aboutsummaryrefslogtreecommitdiffstats
path: root/dist/6318-6318.js.map
blob: 65ba9d2e81e782e4709b14bfaf1b21fe3983f727 (plain)
1
{"version":3,"file":"6318-6318.js?v=82870a18f8b2aa8c6056","mappings":"yeAiCA,MAAMA,EAAI,CACRC,KAAM,uBACNC,MAAO,CACLC,MAAO,CACLC,KAAMC,OACNC,UAAU,GAEZC,QAAS,CACPH,KAAMC,OACNG,QAAS,MAEXC,GAAI,CACFL,KAAMC,OACNG,QAAS,MAEXE,KAAM,CACJN,KAAMC,OACNC,UAAU,GAEZK,QAAS,CACPP,KAAMC,OACNG,QAAS,MAEXI,OAAQ,CACNR,KAAMC,OACNC,UAAU,GAEZO,OAAQ,CACNT,KAAM,CAACU,OAAQC,OACfP,QAAS,KAAM,CAAG,KAGtBQ,SAAU,CACR,SAAAC,GACE,OAAOC,KAAKP,QAAUO,KAAKP,QAAUO,KAAKT,IAAsB,UAAhBS,KAAKN,OAAqBM,KAAKC,aAAaD,KAAKT,GAAI,IAAM,IAC7G,EACA,UAAAW,GACE,IAAIC,EAAGC,EAAGC,EACV,OAA6B,OAApBF,EAAIH,KAAKL,aAAkB,EAASQ,EAAEX,QAA+B,OAApBY,EAAIJ,KAAKL,aAAkB,EAASS,EAAET,SAA+D,aAA9B,OAApBU,EAAIL,KAAKL,aAAkB,EAASU,EAAEV,OACrJ,GAEFW,QAAS,CACP,YAAAL,CAAaE,EAAGC,GACd,OAAO,iBAAE,wBAAyB,CAChCG,KAAMJ,EACNK,KAAMJ,GAEV,IAGJ,IAAIK,EAAI,WACN,IAAIL,EAAIJ,KAAMK,EAAID,EAAEM,MAAMC,GAC1B,OAAON,EAAE,MAAO,CAAEO,YAAa,uBAAyB,CAACP,EAAE,MAAO,CAAEO,YAAa,4BAA6BC,MAAO,CAACT,EAAEZ,KAAM,+BAA8BY,EAAEL,UAAY,cAAgB,KAAOe,MAAOV,EAAEL,UAAY,CAAEgB,gBAAiB,OAAOX,EAAEL,cAAiB,MAAQ,CAAC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tG,EAAEmE,aAAc,CAClB,EAAGuG,QAAS,CAAC,SAASpE,GACpB,OAAQA,EAAExH,KAAK6L,QAAQ,QAAU3K,EAAE4K,GAAGtE,EAAEuE,QAAS,SAAU,CAAC,EAAG,IAAKvE,EAAEwE,IAAK,CAAC,YAAa,SAAU,QAAU,KAAO9K,EAAE4I,SAASmC,MAAM,KAAMC,UAC7I,EAAG,SAAS1E,GACV,OAAQA,EAAExH,KAAK6L,QAAQ,QAAU3K,EAAE4K,GAAGtE,EAAEuE,QAAS,QAAS,GAAIvE,EAAEwE,IAAK,UAAYxE,EAAE2E,SAAW3E,EAAE4E,UAAY5E,EAAE6E,QAAU7E,EAAE8E,QAAU,KAAOpL,EAAEyJ,QAAQsB,MAAM,KAAMC,UACnK,EAAG,SAAS1E,GACV,OAAQA,EAAExH,KAAK6L,QAAQ,QAAU3K,EAAE4K,GAAGtE,EAAEuE,QAAS,QAAS,GAAIvE,EAAEwE,IAAK,WAAaxE,EAAE2E,SAAW3E,EAAE4E,UAAY5E,EAAE6E,QAAU7E,EAAE8E,QAAU,MAAQ9E,EAAEqD,kBAAmBrD,EAAEmB,iBAAkBzH,EAAE4J,YAAYmB,MAAM,KAAMC,WAClN,GAAI9F,MAAOlF,EAAEwH,QAAS,SAAU,SAASlB,GACvC,OAAOA,EAAEqD,kBAAmBrD,EAAEmB,iBAAkBzH,EAAE8J,QAAQiB,MAAM,KAAMC,UACxE,IAAOhL,EAAEgF,WACX,EAAGqG,EAAI,GAUP,MAAMC,GAVyB,OAC7BnK,EACA6I,EACAqB,GACA,EACA,KACA,WACA,KACA,MAEWnK,O","sources":["webpack:///nextcloud/node_modules/@nextcloud/vue/dist/Components/NcRichContenteditable.mjs"],"sourcesContent":["import \"../assets/index-793eae6b.css\";\nimport { r as c } from \"../chunks/index-5f2a5f57.mjs\";\nimport { N as ut } from \"../chunks/index-5f2a5f57.mjs\";\nimport { generateUrl as p } from \"@nextcloud/router\";\nimport { n as u } from \"../chunks/_plugin-vue2_normalizer-71e2aa87.mjs\";\nimport { t as r } from \"../chunks/l10n-05a09c66.mjs\";\nimport \"../Directives/Tooltip.mjs\";\nimport { emojiAddRecent as m, emojiSearch as d } from \"../Functions/emoji.mjs\";\nimport { n as h, j as f } from \"../chunks/referencePickerModal-443a4c57.mjs\";\nimport \"@nextcloud/axios\";\nimport \"unist-util-visit\";\nimport \"unist-builder\";\nimport \"unified\";\nimport \"remark-parse\";\nimport \"remark-breaks\";\nimport \"remark-rehype\";\nimport \"rehype-react\";\nimport \"rehype-external-links\";\nimport \"./NcEmptyContent.mjs\";\nimport \"./NcSelect.mjs\";\nimport \"vue-material-design-icons/LinkVariant.vue\";\nimport \"./NcLoadingIcon.mjs\";\nimport \"./NcTextField.mjs\";\nimport \"vue-material-design-icons/DotsHorizontal.vue\";\nimport \"./NcButton.mjs\";\nimport \"./NcModal.mjs\";\nimport \"@nextcloud/event-bus\";\nimport \"vue-material-design-icons/ArrowLeft.vue\";\nimport \"vue-material-design-icons/Close.vue\";\nimport a from \"tributejs/dist/tribute.esm.js\";\nimport _ from \"debounce\";\nimport g from \"string-length\";\nimport { VTooltip as b } from \"floating-vue\";\nconst y = {\n  name: \"NcAutoCompleteResult\",\n  props: {\n    title: {\n      type: String,\n      required: !0\n    },\n    subline: {\n      type: String,\n      default: null\n    },\n    id: {\n      type: String,\n      default: null\n    },\n    icon: {\n      type: String,\n      required: !0\n    },\n    iconUrl: {\n      type: String,\n      default: null\n    },\n    source: {\n      type: String,\n      required: !0\n    },\n    status: {\n      type: [Object, Array],\n      default: () => ({})\n    }\n  },\n  computed: {\n    avatarUrl() {\n      return this.iconUrl ? this.iconUrl : this.id && this.source === \"users\" ? this.getAvatarUrl(this.id, 44) : null;\n    },\n    haveStatus() {\n      var e, t, n;\n      return ((e = this.status) == null ? void 0 : e.icon) || ((t = this.status) == null ? void 0 : t.status) && ((n = this.status) == null ? void 0 : n.status) !== \"offline\";\n    }\n  },\n  methods: {\n    getAvatarUrl(e, t) {\n      return p(\"/avatar/{user}/{size}\", {\n        user: e,\n        size: t\n      });\n    }\n  }\n};\nvar C = function() {\n  var t = this, n = t._self._c;\n  return n(\"div\", { staticClass: \"autocomplete-result\" }, [n(\"div\", { staticClass: \"autocomplete-result__icon\", class: [t.icon, `autocomplete-result__icon--${t.avatarUrl ? \"with-avatar\" : \"\"}`], style: t.avatarUrl ? { backgroundImage: `url(${t.avatarUrl})` } : null }, [t.haveStatus ? n(\"div\", { staticClass: \"autocomplete-result__status\", class: [`autocomplete-result__status--${t.status && t.status.icon ? \"icon\" : t.status.status}`] }, [t._v(\" \" + t._s(t.status && t.status.icon || \"\") + \" \")]) : t._e()]), n(\"span\", { staticClass: \"autocomplete-result__content\" }, [n(\"span\", { staticClass: \"autocomplete-result__title\", attrs: { title: t.title } }, [t._v(\" \" + t._s(t.title) + \" \")]), t.subline ? n(\"span\", { staticClass: \"autocomplete-result__subline\" }, [t._v(\" \" + t._s(t.subline) + \" \")]) : t._e()])]);\n}, v = [], k = /* @__PURE__ */ u(\n  y,\n  C,\n  v,\n  !1,\n  null,\n  \"25cf09d8\",\n  null,\n  null\n);\nconst x = k.exports;\nconst T = {\n  name: \"NcRichContenteditable\",\n  directives: {\n    tooltip: b\n  },\n  mixins: [c],\n  props: {\n    value: {\n      type: String,\n      default: \"\",\n      required: !0\n    },\n    placeholder: {\n      type: String,\n      default: r(\"Write a message …\")\n    },\n    autoComplete: {\n      type: Function,\n      default: () => []\n    },\n    menuContainer: {\n      type: Element,\n      default: () => document.body\n    },\n    /**\n     * Make the contenteditable looks like a textarea or not.\n     * Default looks like a single-line input.\n     * This also handle the default enter/shift+enter behaviour.\n     * if multiline, enter = newline; otherwise enter = submit\n     * shift+enter always add a new line. ctrl+enter always submits\n     */\n    multiline: {\n      type: Boolean,\n      default: !1\n    },\n    /**\n     * Is the content editable ?\n     */\n    contenteditable: {\n      type: Boolean,\n      default: !0\n    },\n    /**\n     * Disable the editing and show specific disabled design\n     */\n    disabled: {\n      type: Boolean,\n      default: !1\n    },\n    /**\n     * Max allowed length\n     */\n    maxlength: {\n      type: Number,\n      default: null\n    },\n    /**\n     * Enable or disable emoji autocompletion\n     */\n    emojiAutocomplete: {\n      type: Boolean,\n      default: !0\n    },\n    /**\n     * Enable or disable link autocompletion\n     */\n    linkAutocomplete: {\n      type: Boolean,\n      default: !0\n    }\n  },\n  emits: [\n    \"submit\",\n    \"paste\",\n    \"update:value\"\n  ],\n  data() {\n    return {\n      textSmiles: [],\n      tribute: null,\n      autocompleteOptions: {\n        // Allow spaces in the middle of mentions\n        allowSpaces: !0,\n        fillAttr: \"id\",\n        // Search against id and title (display name)\n        lookup: (e) => `${e.id} ${e.title}`,\n        // Where to inject the menu popup\n        menuContainer: this.menuContainer,\n        // Popup mention autocompletion templates\n        menuItemTemplate: (e) => this.renderComponentHtml(e.original, x),\n        // Hide if no results\n        noMatchTemplate: () => '<span class=\"hidden\"></span>',\n        // Inner display of mentions\n        selectTemplate: (e) => {\n          var t;\n          return this.genSelectTemplate((t = e == null ? void 0 : e.original) == null ? void 0 : t.id);\n        },\n        // Autocompletion results\n        values: this.debouncedAutoComplete\n      },\n      emojiOptions: {\n        trigger: \":\",\n        // Don't use the tribute search function at all\n        // We pass search results as values (see below)\n        lookup: (e, t) => t,\n        // Where to inject the menu popup\n        menuContainer: this.menuContainer,\n        // Popup mention autocompletion templates\n        menuItemTemplate: (e) => this.textSmiles.includes(e.original) ? e.original : `<span class=\"tribute-container-emoji__item__emoji\">${e.original.native}</span> :${e.original.short_name}`,\n        // Hide if no results\n        noMatchTemplate: () => r(\"No emoji found\"),\n        // Display raw emoji along with its name\n        selectTemplate: (e) => this.textSmiles.includes(e.original) ? e.original : (m(e.original), e.original.native),\n        // Pass the search results as values\n        values: (e, t) => {\n          const n = d(e);\n          this.textSmiles.includes(\":\" + e) && n.unshift(\":\" + e), t(n);\n        },\n        // Class added to the menu container\n        containerClass: \"tribute-container-emoji\",\n        // Class added to each list item\n        itemClass: \"tribute-container-emoji__item\"\n      },\n      linkOptions: {\n        trigger: \"/\",\n        // Don't use the tribute search function at all\n        // We pass search results as values (see below)\n        lookup: (e, t) => t,\n        // Where to inject the menu popup\n        menuContainer: this.menuContainer,\n        // Popup mention autocompletion templates\n        menuItemTemplate: (e) => `<img class=\"tribute-container-link__item__icon\" src=\"${e.original.icon_url}\"> <span class=\"tribute-container-link__item__title\">${e.original.title}</span>`,\n        // Hide if no results\n        noMatchTemplate: () => r(\"No link provider found\"),\n        selectTemplate: this.getLink,\n        // Pass the search results as values\n        values: (e, t) => t(h(e)),\n        // Class added to the menu container\n        containerClass: \"tribute-container-link\",\n        // Class added to each list item\n        itemClass: \"tribute-container-link__item\"\n      },\n      // Represent the raw untrimmed text of the contenteditable\n      // serves no other purpose than to check whether the\n      // content is empty or not\n      localValue: this.value,\n      // Is in text composition session in IME\n      isComposing: !1\n    };\n  },\n  computed: {\n    /**\n     * Is the current trimmed value empty?\n     *\n     * @return {boolean}\n     */\n    isEmptyValue() {\n      return !this.localValue || this.localValue && this.localValue.trim() === \"\";\n    },\n    /**\n     * Is this Firefox? 🙄\n     *\n     * @return {boolean}\n     */\n    isFF() {\n      return !!navigator.userAgent.match(/firefox/i);\n    },\n    /**\n     * Is the current value over maxlength?\n     *\n     * @return {boolean}\n     */\n    isOverMaxlength() {\n      return this.isEmptyValue || !this.maxlength ? !1 : g(this.localValue) > this.maxlength;\n    },\n    /**\n     * Tooltip to show if characters count is over limit\n     *\n     * @return {string}\n     */\n    tooltipString() {\n      return this.isOverMaxlength ? {\n        content: r(\"Message limit of {count} characters reached\", { count: this.maxlength }),\n        shown: !0,\n        trigger: \"manual\"\n      } : null;\n    },\n    /**\n     * Edit is only allowed when contenteditableis true and disabled is false\n     *\n     * @return {boolean}\n     */\n    canEdit() {\n      return this.contenteditable && !this.disabled;\n    },\n    /**\n     * Proxied native event handlers without custom event handlers\n     *\n     * @return {Record<string, Function>}\n     */\n    listeners() {\n      const e = { ...this.$listeners };\n      return delete e.paste, e;\n    }\n  },\n  watch: {\n    /**\n     * If the parent value change, we compare the plain text rendering\n     * If it's different, we render everything and update the main content\n     */\n    value() {\n      const e = this.$refs.contenteditable.innerHTML;\n      this.value.trim() !== this.parseContent(e).trim() && this.updateContent(this.value);\n    }\n  },\n  mounted() {\n    const e = [\"d\", \"D\", \"p\", \"P\", \"s\", \"S\", \"x\", \"X\", \")\", \"(\", \"|\", \"/\"];\n    this.textSmiles = [], e.forEach((t) => {\n      this.textSmiles.push(\":\" + t), this.textSmiles.push(\":-\" + t);\n    }), this.autocompleteTribute = new a(this.autocompleteOptions), this.autocompleteTribute.attach(this.$el), this.emojiAutocomplete && (this.emojiTribute = new a(this.emojiOptions), this.emojiTribute.attach(this.$el)), this.linkAutocomplete && (this.linkTribute = new a(this.linkOptions), this.linkTribute.attach(this.$el)), this.updateContent(this.value), this.$refs.contenteditable.contentEditable = this.canEdit;\n  },\n  beforeDestroy() {\n    this.autocompleteTribute && this.autocompleteTribute.detach(this.$el), this.emojiTribute && this.emojiTribute.detach(this.$el), this.linkTribute && this.linkTribute.detach(this.$el);\n  },\n  methods: {\n    /**\n     * Focus the richContenteditable\n     *\n     * @public\n     */\n    focus() {\n      this.$refs.contenteditable.focus();\n    },\n    getLink(e) {\n      return f(e.original.id).then((t) => {\n        const n = document.getElementById(\"tmp-link-result-node\"), i = document.createTextNode(t);\n        n.replaceWith(i), this.setCursorAfter(i), this.updateValue(this.$refs.contenteditable.innerHTML);\n      }).catch((t) => {\n        console.debug(\"Smart picker promise rejected:\", t);\n        const n = document.getElementById(\"tmp-link-result-node\");\n        this.setCursorAfter(n), n.remove();\n      }), '<span id=\"tmp-link-result-node\"></span>';\n    },\n    setCursorAfter(e) {\n      const t = document.createRange();\n      t.setEndAfter(e), t.collapse();\n      const n = window.getSelection();\n      n.removeAllRanges(), n.addRange(t);\n    },\n    /**\n     * Re-emit the input event to the parent\n     *\n     * @param {Event} event the input event\n     */\n    onInput(e) {\n      this.updateValue(e.target.innerHTML);\n    },\n    /**\n     * When pasting, sanitize the content, extract text\n     * and render it again\n     *\n     * @param {Event} event the paste event\n     * @fires Event paste the original paste event\n     */\n    onPaste(e) {\n      if (!this.canEdit)\n        return;\n      e.preventDefault();\n      const t = e.clipboardData;\n      if (this.$emit(\"paste\", e), t.files.length !== 0 || !Object.values(t.items).find((l) => l == null ? void 0 : l.type.startsWith(\"text\")))\n        return;\n      const n = t.getData(\"text\"), i = window.getSelection();\n      if (!i.rangeCount) {\n        this.updateValue(n);\n        return;\n      }\n      const s = i.getRangeAt(0);\n      i.deleteFromDocument(), s.insertNode(document.createTextNode(n));\n      const o = document.createRange();\n      o.setStart(e.target, s.endOffset), o.collapse(!0), i.removeAllRanges(), i.addRange(o), this.updateValue(this.$refs.contenteditable.innerHTML);\n    },\n    /**\n     * Update the value text from the provided html\n     *\n     * @param {string} htmlOrText the html content (or raw text with @mentions)\n     */\n    updateValue(e) {\n      const t = this.parseContent(e);\n      this.localValue = t, this.$emit(\"update:value\", t);\n    },\n    /**\n     * Update content and local value\n     *\n     * @param {string} value the message value\n     */\n    updateContent(e) {\n      const t = this.renderContent(e);\n      this.$refs.contenteditable.innerHTML = t, this.localValue = e;\n    },\n    /**\n     * Because FF have a decade old bug preventing contenteditable=false\n     * to properly be deleted on backspace, we have to hack 👀\n     * https://stackoverflow.com/a/59383394/3885878\n     * https://stackoverflow.com/a/30574622\n     *\n     * @param {Event} event the delete keydown event\n     */\n    onDelete(e) {\n      if (!this.isFF || !window.getSelection || !this.canEdit)\n        return;\n      const t = window.getSelection(), n = e.target;\n      if (!t.isCollapsed || !t.rangeCount)\n        return;\n      const i = t.getRangeAt(t.rangeCount - 1);\n      if (i.commonAncestorContainer.nodeType === 3 && i.startOffset > 0)\n        return;\n      const s = document.createRange();\n      if (t.anchorNode !== n)\n        s.selectNodeContents(n), s.setEndBefore(t.anchorNode);\n      else if (t.anchorOffset > 0)\n        s.setEnd(n, t.anchorOffset);\n      else\n        return;\n      s.setStart(n, s.endOffset - 1);\n      const o = s.cloneContents().lastChild;\n      o && o.contentEditable === \"false\" && (s.deleteContents(), e.preventDefault());\n    },\n    /**\n     * Enter key pressed. Submits if not multiline\n     *\n     * @param {Event} event the keydown event\n     */\n    onEnter(e) {\n      this.multiline || this.isOverMaxlength || this.autocompleteTribute.isActive || this.emojiTribute.isActive || this.linkTribute.isActive || this.isComposing || (e.preventDefault(), e.stopPropagation(), this.$emit(\"submit\", e));\n    },\n    /**\n     * Ctrl + Enter key pressed is used to submit\n     *\n     * @param {Event} event the keydown event\n     */\n    onCtrlEnter(e) {\n      this.isOverMaxlength || this.$emit(\"submit\", e);\n    },\n    /**\n     * Debounce the autocomplete function\n     */\n    debouncedAutoComplete: _(async function(e, t) {\n      this.autoComplete(e, t);\n    }, 100),\n    onKeyUp(e) {\n      e.stopImmediatePropagation();\n    }\n  }\n};\nvar S = function() {\n  var t = this, n = t._self._c;\n  return n(\"div\", t._g({ directives: [{ name: \"tooltip\", rawName: \"v-tooltip\", value: t.tooltipString, expression: \"tooltipString\" }], ref: \"contenteditable\", staticClass: \"rich-contenteditable__input\", class: {\n    \"rich-contenteditable__input--empty\": t.isEmptyValue,\n    \"rich-contenteditable__input--multiline\": t.multiline,\n    \"rich-contenteditable__input--overflow\": t.isOverMaxlength,\n    \"rich-contenteditable__input--disabled\": t.disabled\n  }, attrs: { contenteditable: t.canEdit, placeholder: t.placeholder, \"aria-placeholder\": t.placeholder, \"aria-multiline\": \"true\", role: \"textbox\" }, on: { input: t.onInput, compositionstart: function(i) {\n    t.isComposing = !0;\n  }, compositionend: function(i) {\n    t.isComposing = !1;\n  }, keydown: [function(i) {\n    return !i.type.indexOf(\"key\") && t._k(i.keyCode, \"delete\", [8, 46], i.key, [\"Backspace\", \"Delete\", \"Del\"]) ? null : t.onDelete.apply(null, arguments);\n  }, function(i) {\n    return !i.type.indexOf(\"key\") && t._k(i.keyCode, \"enter\", 13, i.key, \"Enter\") || i.ctrlKey || i.shiftKey || i.altKey || i.metaKey ? null : t.onEnter.apply(null, arguments);\n  }, function(i) {\n    return !i.type.indexOf(\"key\") && t._k(i.keyCode, \"enter\", 13, i.key, \"Enter\") || !i.ctrlKey || i.shiftKey || i.altKey || i.metaKey ? null : (i.stopPropagation(), i.preventDefault(), t.onCtrlEnter.apply(null, arguments));\n  }], paste: t.onPaste, \"!keyup\": function(i) {\n    return i.stopPropagation(), i.preventDefault(), t.onKeyUp.apply(null, arguments);\n  } } }, t.listeners));\n}, A = [], E = /* @__PURE__ */ u(\n  T,\n  S,\n  A,\n  !1,\n  null,\n  \"b7f5e546\",\n  null,\n  null\n);\nconst rt = E.exports;\nexport {\n  x as NcAutoCompleteResult,\n  ut as NcMentionBubble,\n  rt as default\n};\n"],"names":["y","name","props","title","type","String","required","subline","default","id","icon","iconUrl","source","status","Object","Array","computed","avatarUrl","this","getAvatarUrl","haveStatus","e","t","n","methods","user","size","C","_self","_c","staticClass","class","style","backgroundImage","_v","_s","_e","attrs","v","x","exports","T","directives","tooltip","mixins","value","placeholder","autoComplete","Function","menuContainer","Element","document","body","multiline","Boolean","contenteditable","disabled","maxlength","Number","emojiAutocomplete","linkAutocomplete","emits","data","textSmiles","tribute","autocompleteOptions","allowSpaces","fillAttr","lookup","menuItemTemplate","renderComponentHtml","original","noMatchTemplate","selectTemplate","genSelectTemplate","values","debouncedAutoComplete","emojiOptions","trigger","includes","native","short_name","unshift","containerClass","itemClass","linkOptions","icon_url","getLink","localValue","isComposing","isEmptyValue","trim","isFF","navigator","userAgent","match","isOverMaxlength","tooltipString","content","count","shown","canEdit","listeners","$listeners","paste","watch","$refs","innerHTML","parseContent","updateContent","mounted","forEach","push","autocompleteTribute","attach","$el","emojiTribute","linkTribute","contentEditable","beforeDestroy","detach","focus","then","getElementById","i","createTextNode","replaceWith","setCursorAfter","updateValue","catch","console","debug","remove","createRange","setEndAfter","collapse","window","getSelection","removeAllRanges","addRange","onInput","target","onPaste","preventDefault","clipboardData","$emit","files","length","items","find","l","startsWith","getData","rangeCount","s","getRangeAt","deleteFromDocument","insertNode","o","setStart","endOffset","renderContent","onDelete","isCollapsed","commonAncestorContainer","nodeType","startOffset","anchorNode","selectNodeContents","setEndBefore","anchorOffset","setEnd","cloneContents","lastChild","deleteContents","onEnter","isActive","stopPropagation","onCtrlEnter","async","onKeyUp","stopImmediatePropagation","S","_g","rawName","expression","ref","role","on","input","compositionstart","compositionend","keydown","indexOf","_k","keyCode","key","apply","arguments","ctrlKey","shiftKey","altKey","metaKey","A","rt"],"sourceRoot":""}