{"version":3,"file":"rich_text_editor.vue.cjs","sources":["../../../components/rich_text_editor/rich_text_editor.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- eslint-disable vue/no-restricted-class -->\n<template>\n  <div>\n    <!-- why the hell is this visibility: hidden by default??? -->\n    <bubble-menu\n      v-if=\"editor && link && !hideLinkBubbleMenu\"\n      :editor=\"editor\"\n      :should-show=\"bubbleMenuShouldShow\"\n      :tippy-options=\"tippyOptions\"\n      style=\"visibility: visible;\"\n    >\n      <div class=\"d-popover__dialog\">\n        <dt-stack\n          direction=\"row\"\n          class=\"d-rich-text-editor-bubble-menu__button-stack\"\n          gap=\"0\"\n        >\n          <dt-button\n            kind=\"muted\"\n            importance=\"clear\"\n            @click=\"editLink\"\n          >\n            Edit\n          </dt-button>\n          <dt-button\n            kind=\"muted\"\n            importance=\"clear\"\n            @click=\"openLink\"\n          >\n            Open link\n          </dt-button>\n          <dt-button\n            kind=\"danger\"\n            importance=\"clear\"\n            @click=\"removeLink\"\n          >\n            Remove\n          </dt-button>\n        </dt-stack>\n      </div>\n    </bubble-menu>\n    <editor-content\n      ref=\"editor\"\n      :editor=\"editor\"\n      class=\"d-rich-text-editor\"\n      data-qa=\"dt-rich-text-editor\"\n      v-bind=\"attrs\"\n    />\n  </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { Editor, EditorContent, BubbleMenu } from '@tiptap/vue-3';\nimport { Extension } from '@tiptap/core';\nimport { DtButton } from '../button';\nimport { DtStack } from '../stack';\nimport Blockquote from '@tiptap/extension-blockquote';\nimport CodeBlock from '@tiptap/extension-code-block';\nimport Code from '@tiptap/extension-code';\nimport Document from '@tiptap/extension-document';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Bold from '@tiptap/extension-bold';\nimport BulletList from '@tiptap/extension-bullet-list';\nimport Italic from '@tiptap/extension-italic';\nimport TipTapLink from '@tiptap/extension-link';\nimport ListItem from '@tiptap/extension-list-item';\nimport OrderedList from '@tiptap/extension-ordered-list';\nimport Strike from '@tiptap/extension-strike';\nimport Underline from '@tiptap/extension-underline';\nimport Text from '@tiptap/extension-text';\nimport TextAlign from '@tiptap/extension-text-align';\nimport History from '@tiptap/extension-history';\nimport Emoji from './extensions/emoji';\nimport CustomLink from './extensions/custom_link';\nimport ConfigurableImage from './extensions/image';\nimport DivParagraph from './extensions/div';\nimport { MentionPlugin } from './extensions/mentions/mention';\nimport { ChannelPlugin } from './extensions/channels/channel';\nimport { SlashCommandPlugin } from './extensions/slash_command/slash_command';\nimport {\n  RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n  RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n  RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n} from './rich_text_editor_constants';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport mentionSuggestion from './extensions/mentions/suggestion';\nimport channelSuggestion from './extensions/channels/suggestion';\nimport slashCommandSuggestion from './extensions/slash_command/suggestion';\nimport { warnIfUnmounted, returnFirstEl } from '@/common/utils';\nimport deepEqual from 'deep-equal';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'DtRichTextEditor',\n\n  components: {\n    EditorContent,\n    BubbleMenu,\n    DtButton,\n    DtStack,\n  },\n\n  props: {\n    /**\n     * Value of the input. The object format should match TipTap's JSON\n     * document structure: https://tiptap.dev/guide/output#option-1-json\n     */\n    modelValue: {\n      type: [Object, String],\n      default: '',\n    },\n\n    /**\n     * Whether the input is editable\n     */\n    editable: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Prevents the user from typing any further. Deleting text will still work.\n     */\n    preventTyping: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,\n     * line breaks can still be entered by pressing shift+enter.\n     */\n    allowLineBreaks: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Descriptive label for the input element\n     */\n    inputAriaLabel: {\n      type: String,\n      required: true,\n    },\n\n    /**\n     * Additional class name for the input element. Only accepts a String value\n     * because this is passed to the editor via options. For multiple classes,\n     * join them into one string, e.g. \"d-p8 d-hmx96\"\n     */\n    inputClass: {\n      type: String,\n      default: '',\n    },\n\n    /**\n     * Whether the input should receive focus after the component has been\n     * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n     * - `start`  Sets the focus to the beginning of the input\n     * - `end`    Sets the focus to the end of the input\n     * - `all`    Selects the whole contents of the input\n     * - `Number` Sets the focus to a specific position in the input\n     * - `true`   Defaults to `start`\n     * - `false`  Disables autofocus\n     * @values true, false, start, end, all, number\n     */\n    autoFocus: {\n      type: [Boolean, String, Number],\n      default: false,\n      validator (autoFocus) {\n        if (typeof autoFocus === 'string') {\n          return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n        }\n        return true;\n      },\n    },\n\n    /**\n     * The output format that the editor uses when emitting the \"@input\" event.\n     * One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for\n     * examples.\n     * @values text, json, html\n     */\n    outputFormat: {\n      type: String,\n      default: 'html',\n      validator (outputFormat) {\n        return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n      },\n    },\n\n    /**\n     * Placeholder text\n     */\n    placeholder: {\n      type: String,\n      default: '',\n    },\n\n    /**\n     * Enables the TipTap Link extension and optionally passes configurations to it\n     *\n     * It is not recommended to use this and the custom link extension at the same time.\n     */\n    link: {\n      type: [Boolean, Object],\n      default: false,\n    },\n\n    /**\n     * Enables the Custom Link extension and optionally passes configurations to it\n     *\n     * It is not recommended to use this and the built in TipTap link extension at the same time.\n     *\n     * The custom link does some additional things on top of the built in TipTap link\n     * extension such as styling phone numbers and IP adresses as links, and allows you\n     * to linkify text without having to type a space after the link. Currently it is missing some\n     * functionality such as editing links and will likely require more work to be fully usable,\n     * so it is recommended to use the built in TipTap link for now.\n     */\n    customLink: {\n      type: [Boolean, Object],\n      default: false,\n    },\n\n    /**\n     * suggestion object containing the items query function.\n     * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n     *\n     * The only required key is the items function which is used to query the contacts for suggestion.\n     * items({ query }) => { return [ContactObject]; }\n     * ContactObject format:\n     * { name: string, avatarSrc: string, id: string }\n     *\n     * When null, it does not add the plugin.\n     */\n    mentionSuggestion: {\n      type: Object,\n      default: null,\n    },\n\n    /**\n     * suggestion object containing the items query function.\n     * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n     *\n     * The only required key is the items function which is used to query the channels for suggestion.\n     * items({ query }) => { return [ChannelObject]; }\n     * ChannelObject format:\n     * { name: string, id: string, locked: boolean }\n     *\n     * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n     */\n    channelSuggestion: {\n      type: Object,\n      default: null,\n    },\n\n    /**\n     * suggestion object containing the items query function.\n     * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n     *\n     * The only required key is the items function which is used to query the slash commands for suggestion.\n     * items({ query }) => { return [SlashCommandObject]; }\n     * SlashCommandObject format:\n     * { command: string, description: string, parametersExample?: string }\n     * The \"parametersExample\" parameter is optional, and describes an example\n     * of the parameters that command can take.\n     *\n     * When null, it does not add the plugin.\n     * Note that slash commands only work when they are the first word in the input.\n     */\n    slashCommandSuggestion: {\n      type: Object,\n      default: null,\n    },\n\n    /**\n     * Whether the input allows for block quote.\n     */\n    allowBlockquote: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for bold to be introduced in the text.\n     */\n    allowBold: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for bullet list to be introduced in the text.\n     */\n    allowBulletList: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for italic to be introduced in the text.\n     */\n    allowItalic: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for strike to be introduced in the text.\n     */\n    allowStrike: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for underline to be introduced in the text.\n     */\n    allowUnderline: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows inline code (wrapped in backticks).\n     */\n    allowCode: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows codeblock to be introduced in the text.\n     */\n    allowCodeblock: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows inline images to be rendered.\n     */\n    allowInlineImages: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Additional TipTap extensions to be added to the editor.\n     */\n    additionalExtensions: {\n      type: Array,\n      default: () => [],\n    },\n\n    /**\n     * Manually hide the link bubble menu. The link bubble menu is shown when a link is selected via the cursor.\n     * There are some cases when you may want the link to remain selected but hide the bubble menu such as when You\n     * are showing a custom link editor popup.\n     */\n    hideLinkBubbleMenu: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Show text in HTML div tags instead of paragraph tags\n     */\n    useDivTags: {\n      type: Boolean,\n      default: false,\n    },\n  },\n\n  emits: [\n    /**\n     * Editor input event\n     * @event input\n     * @type {String|JSON}\n     */\n    'input',\n\n    /**\n     * Input event always in JSON format.\n     * @event input\n     * @type {JSON}\n     */\n    'json-input',\n\n    /**\n     * Input event always in HTML format.\n     * @event input\n     * @type {HTML}\n     */\n    'html-input',\n\n    /**\n     * Input event always in text format.\n     * @event input\n     * @type {String}\n     */\n    'text-input',\n\n    /**\n     * Event to sync the value with the parent\n     * @event update:value\n     * @type {String|JSON}\n     */\n    'update:modelValue',\n\n    /**\n     * Editor blur event\n     * @event blur\n     * @type {FocusEvent}\n     */\n    'blur',\n\n    /**\n     * Editor focus event\n     * @event focus\n     * @type {FocusEvent}\n     */\n    'focus',\n\n    /**\n     * Enter was pressed. Note that shift enter must be pressed to line break the input.\n     * @event enter\n     * @type {String}\n     */\n    'enter',\n\n    /**\n     * \"Edit link\" button was clicked. Fires an event for the consuming component to handle the editing of the link.\n     * event contains the link object with two properties href and text.\n     * @event edit-link\n     * @type {Object}\n     */\n    'edit-link',\n\n    /**\n     * \"Selected\" event is fired when the user selects text in the editor. returns the currently selected text.\n     * If the selected text is partially a link, the full link text is returned.\n     * @event selected\n     * @type {String}\n     */\n    'selected',\n  ],\n\n  data () {\n    return {\n      editor: null,\n      tippyOptions: {\n        appendTo: () => returnFirstEl(this.$refs.editor.$el).getRootNode()?.querySelector('body'),\n        placement: 'top-start',\n      },\n    };\n  },\n\n  computed: {\n    attrs () {\n      return {\n        ...this.$attrs,\n        onInput: () => {},\n        onFocus: () => {},\n        onBlur: () => {},\n      };\n    },\n\n    // eslint-disable-next-line complexity\n    extensions () {\n      // These are the default extensions needed just for plain text.\n      const extensions = [Document, Text, History, HardBreak];\n      extensions.push(this.useDivTags ? DivParagraph : Paragraph);\n\n      if (this.allowBlockquote) {\n        extensions.push(Blockquote);\n      }\n      if (this.allowBold) {\n        extensions.push(Bold);\n      }\n      if (this.allowBulletList) {\n        extensions.push(BulletList);\n        extensions.push(ListItem.extend({\n          renderText ({ node }) {\n            return node.textContent;\n          },\n        }));\n        extensions.push(OrderedList);\n      }\n      if (this.allowItalic) {\n        extensions.push(Italic);\n      }\n      if (this.allowStrike) {\n        extensions.push(Strike);\n      }\n      if (this.allowUnderline) {\n        extensions.push(Underline);\n      }\n\n      // Enable placeholderText\n      if (this.placeholder) {\n        extensions.push(\n          Placeholder.configure({ placeholder: this.placeholder }),\n        );\n      }\n\n      const self = this;\n      const ShiftEnter = Extension.create({\n        addKeyboardShortcuts () {\n          return {\n            'Shift-Enter': ({ editor }) => {\n              if (self.allowLineBreaks) {\n                return false;\n              }\n              editor.commands.first(({ commands }) => [\n                () => commands.newlineInCode(),\n                () => self.allowBulletList && commands.splitListItem('listItem'),\n                () => commands.createParagraphNear(),\n                () => commands.liftEmptyBlock(),\n                () => commands.splitBlock(),\n              ]);\n              return true;\n            },\n            Enter: () => {\n              if (self.allowLineBreaks) {\n                return false;\n              }\n              self.$emit('enter');\n              return true;\n            },\n          };\n        },\n      });\n      extensions.push(ShiftEnter);\n\n      if (this.link) {\n        extensions.push(TipTapLink.extend({ inclusive: false }).configure({\n          HTMLAttributes: {\n            class: 'd-link d-wb-break-all',\n          },\n          openOnClick: false,\n          autolink: true,\n          protocols: RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n        }));\n      }\n      if (this.customLink) {\n        extensions.push(this.getExtension(CustomLink, this.customLink));\n      }\n\n      if (this.mentionSuggestion) {\n        // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n        const suggestionObject = { ...this.mentionSuggestion, ...mentionSuggestion };\n        extensions.push(MentionPlugin.configure({ suggestion: suggestionObject }));\n      }\n\n      if (this.channelSuggestion) {\n        // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n        const suggestionObject = { ...this.channelSuggestion, ...channelSuggestion };\n        extensions.push(ChannelPlugin.configure({ suggestion: suggestionObject }));\n      }\n\n      if (this.slashCommandSuggestion) {\n        // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n        const suggestionObject = { ...this.slashCommandSuggestion, ...slashCommandSuggestion };\n        extensions.push(SlashCommandPlugin.configure({ suggestion: suggestionObject }));\n      }\n\n      // Emoji has some interactions with Enter key\n      // hence this should be done last otherwise the enter wont add a emoji.\n      extensions.push(Emoji);\n\n      extensions.push(TextAlign.configure({\n        types: ['paragraph'],\n        defaultAlignment: 'left',\n      }));\n\n      if (this.allowCode) {\n        extensions.push(Code);\n      }\n\n      if (this.allowCodeblock) {\n        extensions.push(CodeBlock.extend({\n          renderText ({ node }) {\n            return `\\`\\`\\`\\n${node.textContent}\\n\\`\\`\\``;\n          },\n        }).configure({\n          HTMLAttributes: {\n            class: 'd-rich-text-editor__code-block',\n          },\n        }));\n      }\n\n      if (this.allowInlineImages) {\n        extensions.push(ConfigurableImage);\n      }\n\n      if (this.additionalExtensions.length) {\n        extensions.push(...this.additionalExtensions);\n      }\n\n      return extensions;\n    },\n\n    inputAttrs () {\n      const attrs = {\n        'aria-label': this.inputAriaLabel,\n        'aria-multiline': true,\n        role: 'textbox',\n      };\n      if (!this.editable) {\n        attrs['aria-readonly'] = true;\n      }\n      return attrs;\n    },\n  },\n\n  /**\n   * Because the Editor instance is initialized when mounted it does not get\n   * updated props automatically, so the ones that can change after mount have\n   * to be hooked up to the Editor's own API.\n   */\n  watch: {\n    editable (isEditable) {\n      this.editor.setEditable(isEditable);\n      this.updateEditorAttributes({ 'aria-readonly': !isEditable });\n    },\n\n    inputClass (newClass) {\n      this.updateEditorAttributes({ class: newClass });\n    },\n\n    inputAriaLabel (newLabel) {\n      this.updateEditorAttributes({ 'aria-label': newLabel });\n    },\n\n    extensions () {\n      // Extensions can't be registered on the fly, so just recreate the editor.\n      // https://github.com/ueberdosis/tiptap/issues/1044\n      this.destroyEditor();\n      this.createEditor();\n    },\n\n    modelValue (newValue) {\n      this.processValue(newValue);\n    },\n  },\n\n  created () {\n    this.createEditor();\n  },\n\n  beforeUnmount () {\n    this.destroyEditor();\n  },\n\n  mounted () {\n    warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n    this.processValue(this.modelValue, false);\n  },\n\n  methods: {\n\n    createEditor () {\n      // For all available options, see https://tiptap.dev/api/editor#settings\n      this.editor = new Editor({\n        autofocus: this.autoFocus,\n        content: this.modelValue,\n        editable: this.editable,\n        extensions: this.extensions,\n        editorProps: {\n          attributes: {\n            ...this.inputAttrs,\n            class: this.inputClass,\n          },\n\n          handlePaste: (_, event) => {\n            // When having link and customLink props we should maintain default paste behavior\n            if (!this.link && !this.customLink) {\n              const regex = /^https?:\\/\\//;\n\n              if (!event?.clipboardData) {\n                return false;\n              }\n              const pastedContent = event.clipboardData.getData('text');\n\n              // Check if the pasted content is a valid URL (starting with http:// or https://)\n              // If it's not a URL, allow the default paste behavior\n              if (!regex.test(pastedContent)) {\n                return false;\n              }\n\n              // If `text/html` is missing from clipboard data, it's a plain link\n              // In this case, allow the default paste behavior\n              if (!event.clipboardData.getData('text/html')) {\n                return false;\n              }\n\n              this.editor.chain().focus().insertContent(pastedContent).run();\n              return true; // Prevent the default paste behavior\n            }\n\n            return false; // Allow the default paste behavior\n          },\n\n          // Moves the <br /> tags inside the previous closing tag to avoid\n          // Prosemirror wrapping them within another </p> tag.\n          transformPastedHTML (html) {\n            return html.replace(/(<\\/\\w+>)((<br \\/>)+)/g, '$2$3$1');\n          },\n        },\n      });\n      this.addEditorListeners();\n    },\n\n    bubbleMenuShouldShow ({ editor, view, state, oldState, from, to }) {\n      return editor.isActive('link');\n    },\n\n    /**\n     * If the selection contains a link, return the existing link text.\n     * Otherwise, use just the selected text.\n     * @param editor the editor instance.\n     */\n    getSelectedLinkText (editor) {\n      const { view, state } = editor;\n      const { from, to } = view.state.selection;\n      const text = state.doc.textBetween(from, to, '');\n      const linkNode = this.editor.state.doc.nodeAt(from);\n      if (linkNode && linkNode.marks?.at(0)?.type?.name === 'link') {\n        return linkNode.textContent;\n      } else {\n        return text;\n      }\n    },\n\n    editLink () {\n      const linkText = this.getSelectedLinkText(this.editor);\n\n      const link = {\n        href: this.editor.getAttributes('link').href,\n        text: linkText,\n      };\n      this.$emit('edit-link', link);\n    },\n\n    removeLink () {\n      this.editor?.chain()?.focus()?.unsetLink()?.run();\n    },\n\n    openLink () {\n      this.editor?.chain()?.focus();\n      const link = this.editor.getAttributes('link').href;\n      window.open(link, '_blank');\n    },\n\n    // eslint-disable-next-line complexity\n    setLink (linkInput, linkText, linkOptions, linkProtocols = RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n      defaultPrefix) {\n      if (!linkInput) {\n        // If link text is set to empty string,\n        // remove any existing links.\n        this.removeLink();\n        return;\n      }\n\n      // Check if input matches any of the supported link formats\n      const prefix = linkProtocols.find(prefixRegex => prefixRegex.test(linkInput));\n\n      if (!prefix) {\n        // If no matching pattern is found, prepend default prefix\n        linkInput = `${defaultPrefix}${linkInput}`;\n      }\n\n      this.editor\n        .chain()\n        .focus()\n        .extendMarkRange('link')\n        .run();\n\n      const selection = this.editor?.view?.state?.selection;\n\n      this.editor\n        .chain()\n        .focus()\n        .insertContent(linkText)\n        .setTextSelection({ from: selection.from, to: selection.from + linkText.length })\n        .setLink({ href: linkInput, class: linkOptions.class })\n        .run();\n    },\n\n    // eslint-disable-next-line complexity\n    processValue (newValue, returnIfEqual = true) {\n      const currentValue = this.getOutput();\n\n      if (returnIfEqual && deepEqual(newValue, currentValue)) {\n        // The new value came from this component and was passed back down\n        // through the parent, so don't do anything here.\n        return;\n      }\n\n      // If the text contains emoji characters convert them to emoji component tags\n      if (typeof newValue === 'string' && this.outputFormat === 'text') {\n        const inputUnicodeRegex = new RegExp(`(${emojiPattern})`, 'g');\n        newValue = newValue?.replace(inputUnicodeRegex, '<emoji-component code=\"$1\"></emoji-component>');\n      }\n\n      // Otherwise replace the content (resets the cursor position).\n      this.editor.commands.setContent(newValue, false);\n    },\n\n    destroyEditor () {\n      this.editor.destroy();\n    },\n\n    triggerInputChangeEvents () {\n      const value = this.getOutput();\n      this.$emit('input', value);\n      this.$emit('update:modelValue', value);\n\n      // Always output JSON in a separate event\n      const jsonValue = this.editor.getJSON();\n      this.$emit('json-input', jsonValue);\n\n      // Always output HTML in a separate event\n      const htmlValue = this.editor.getHTML();\n      this.$emit('html-input', htmlValue);\n\n      // Always output HTML in a separate event\n      const textValue = this.editor.getText({ blockSeparator: '\\n' });\n      this.$emit('text-input', textValue);\n    },\n\n    /**\n     * The Editor exposes event hooks that we have to map our emits into. See\n     * https://tiptap.dev/api/events for all events.\n     */\n    addEditorListeners () {\n      this.editor.on('create', () => {\n        this.triggerInputChangeEvents();\n      });\n      // The content has changed.\n      this.editor.on('update', () => {\n        // When preventTyping is true and user wants to type, we revert to last value\n        // If Backspace (keyCode = 8) is pressed, we allow updating the text\n        if (this.preventTyping && this.editor.view?.input?.lastKeyCode !== 8) {\n          this.editor.commands.setContent(this.value, false);\n          return;\n        }\n        this.triggerInputChangeEvents();\n      });\n\n      this.editor.on('selectionUpdate', ({ editor }) => {\n        this.$emit('selected', this.getSelectedLinkText(editor));\n      });\n\n      // The editor is focused.\n      this.editor.on('focus', ({ event }) => {\n        this.$emit('focus', event);\n      });\n\n      // The editor isn’t focused anymore.\n      this.editor.on('blur', ({ event }) => {\n        this.$emit('blur', event);\n      });\n    },\n\n    getOutput () {\n      switch (this.outputFormat) {\n        case 'json':\n          return this.editor.getJSON();\n        case 'html':\n          return this.editor.getHTML();\n        case 'text':\n        default:\n          return this.editor.getText({ blockSeparator: '\\n' });\n      }\n    },\n\n    getExtension (extension, options) {\n      if (typeof options === 'boolean') {\n        return extension;\n      }\n      return extension.configure?.(options);\n    },\n\n    updateEditorAttributes (attributes) {\n      this.editor.setOptions({\n        editorProps: {\n          attributes: {\n            ...this.inputAttrs,\n            class: this.inputClass,\n            ...attributes,\n          },\n        },\n      });\n    },\n\n    focusEditor () {\n      this.editor.commands.focus();\n    },\n  },\n};\n</script>\n"],"names":["EditorContent","BubbleMenu","DtButton","DtStack","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_OUTPUT_FORMATS","returnFirstEl","DivParagraph","Extension","RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS","CustomLink","mentionSuggestion","MentionPlugin","channelSuggestion","ChannelPlugin","slashCommandSuggestion","SlashCommandPlugin","Emoji","ConfigurableImage","warnIfUnmounted","Editor","emojiPattern","_createElementBlock","_createBlock","_withCtx","_createElementVNode","_createVNode","_createTextVNode","_createCommentVNode","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,mBACVA,KAAa;AAAA,gBACbC,KAAU;AAAA,IACV,UAAAC,OAAQ;AAAA,IACR,SAAAC,MAAO;AAAA,EACR;AAAA,EAED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