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ACAE,IACA,EACA,KACA,WACA,KACA,MAEY1U,QACdwF,eAAeoP,GAAGta,EAAI,KAAMpR,OAAI,GAC9B,aAAa,IAAIugB,SAAQ,CAAC9E,EAAGf,KAC3B,IAAIiR,EACJ,MAAkCvuB,EAAI3B,SAASgM,cAAc,OAC7DrK,EAAEuP,GADQ,uBACAlR,SAAS4J,KAAKoP,OAAOrX,GAC/B,MAAMkkB,EAAU,OAANlQ,EAAa,KAAsB,OAAdua,EA1pBnC,SAAYva,GACV,OAAOA,IAAMd,EAAImM,EAAIwE,IAAI9mB,MAAM6F,GAAMA,EAAE2M,KAAOyE,GAChD,CAwpBuCwa,CAAGxa,IAAcua,EAAI,KAAwBtb,EAAI,IAAlB,UAAEwb,OAAOJ,IAAS,CAAM,CACxFK,UAAW,CACTnD,gBAAiBrH,EACjBiJ,eAAgBvqB,KAEjB+rB,OAAO3uB,GACViT,EAAEsQ,IAAI,UAAU,KACdtQ,EAAE2b,WAAYtR,EAAE,IAAIxc,MAAM,qBAAqB,IAC7CmS,EAAEsQ,IAAI,UAAWsL,IACnB5b,EAAE2b,WAAYvQ,EAAEwQ,EAAE,GAClB,GAEN,C,iECt3Be,SAASC,EAAazd,GAAQ,qBAAC0d,GAAuB,GAAS,CAAC,GAC9E,MAAe,KAAX1d,EACI,GAGH0d,IACJ1d,GAAS,OAAUA,IAGL,KAAXA,EACI,EAGDA,EAAOzD,OAAM,UAAatQ,OAClC,C","sources":["webpack:///nextcloud/node_modules/tributejs/dist/tribute.esm.js","webpack:///nextcloud/node_modules/@nextcloud/vue/dist/Components/NcRichContenteditable.mjs","webpack:///nextcloud/node_modules/@nextcloud/vue/dist/chunks/referencePickerModal-6bc8f6b9.mjs","webpack:///nextcloud/node_modules/string-length/index.js"],"sourcesContent":["if (!Array.prototype.find) {\n Array.prototype.find = function(predicate) {\n if (this === null) {\n throw new TypeError('Array.prototype.find called on null or undefined')\n }\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function')\n }\n var list = Object(this);\n var length = list.length >>> 0;\n var thisArg = arguments[1];\n var value;\n\n for (var i = 0; i < length; i++) {\n value = list[i];\n if (predicate.call(thisArg, value, i, list)) {\n return value\n }\n }\n return undefined\n };\n}\n\nif (window && typeof window.CustomEvent !== \"function\") {\n function CustomEvent$1(event, params) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt\n }\n\n if (typeof window.Event !== 'undefined') {\n CustomEvent$1.prototype = window.Event.prototype;\n }\n\n window.CustomEvent = CustomEvent$1;\n}\n\nclass TributeEvents {\n constructor(tribute) {\n this.tribute = tribute;\n this.tribute.events = this;\n }\n\n static keys() {\n return [\n {\n key: 9,\n value: \"TAB\"\n },\n {\n key: 8,\n value: \"DELETE\"\n },\n {\n key: 13,\n value: \"ENTER\"\n },\n {\n key: 27,\n value: \"ESCAPE\"\n },\n {\n key: 32,\n value: \"SPACE\"\n },\n {\n key: 38,\n value: \"UP\"\n },\n {\n key: 40,\n value: \"DOWN\"\n }\n ];\n }\n\n bind(element) {\n element.boundKeydown = this.keydown.bind(element, this);\n element.boundKeyup = this.keyup.bind(element, this);\n element.boundInput = this.input.bind(element, this);\n\n element.addEventListener(\"keydown\", element.boundKeydown, false);\n element.addEventListener(\"keyup\", element.boundKeyup, false);\n element.addEventListener(\"input\", element.boundInput, false);\n }\n\n unbind(element) {\n element.removeEventListener(\"keydown\", element.boundKeydown, false);\n element.removeEventListener(\"keyup\", element.boundKeyup, false);\n element.removeEventListener(\"input\", element.boundInput, false);\n\n delete element.boundKeydown;\n delete element.boundKeyup;\n delete element.boundInput;\n }\n\n keydown(instance, event) {\n if (instance.shouldDeactivate(event)) {\n instance.tribute.isActive = false;\n instance.tribute.hideMenu();\n }\n\n let element = this;\n instance.commandEvent = false;\n\n TributeEvents.keys().forEach(o => {\n if (o.key === event.keyCode) {\n instance.commandEvent = true;\n instance.callbacks()[o.value.toLowerCase()](event, element);\n }\n });\n }\n\n input(instance, event) {\n instance.inputEvent = true;\n instance.keyup.call(this, instance, event);\n }\n\n click(instance, event) {\n let tribute = instance.tribute;\n if (tribute.menu && tribute.menu.contains(event.target)) {\n let li = event.target;\n event.preventDefault();\n event.stopPropagation();\n while (li.nodeName.toLowerCase() !== \"li\") {\n li = li.parentNode;\n if (!li || li === tribute.menu) {\n throw new Error(\"cannot find the <li> container for the click\");\n }\n }\n tribute.selectItemAtIndex(li.getAttribute(\"data-index\"), event);\n tribute.hideMenu();\n\n // TODO: should fire with externalTrigger and target is outside of menu\n } else if (tribute.current.element && !tribute.current.externalTrigger) {\n tribute.current.externalTrigger = false;\n setTimeout(() => tribute.hideMenu());\n }\n }\n\n keyup(instance, event) {\n if (instance.inputEvent) {\n instance.inputEvent = false;\n }\n instance.updateSelection(this);\n\n if (event.keyCode === 27) return;\n\n if (!instance.tribute.allowSpaces && instance.tribute.hasTrailingSpace) {\n instance.tribute.hasTrailingSpace = false;\n instance.commandEvent = true;\n instance.callbacks()[\"space\"](event, this);\n return;\n }\n\n if (!instance.tribute.isActive) {\n if (instance.tribute.autocompleteMode) {\n instance.callbacks().triggerChar(event, this, \"\");\n } else {\n let keyCode = instance.getKeyCode(instance, this, event);\n\n if (isNaN(keyCode) || !keyCode) return;\n\n let trigger = instance.tribute.triggers().find(trigger => {\n return trigger.charCodeAt(0) === keyCode;\n });\n\n if (typeof trigger !== \"undefined\") {\n instance.callbacks().triggerChar(event, this, trigger);\n }\n }\n }\n\n if (\n instance.tribute.current.mentionText.length <\n instance.tribute.current.collection.menuShowMinLength\n ) {\n return;\n }\n\n if (\n ((instance.tribute.current.trigger ||\n instance.tribute.autocompleteMode) &&\n instance.commandEvent === false) ||\n (instance.tribute.isActive && event.keyCode === 8)\n ) {\n instance.tribute.showMenuFor(this, true);\n }\n }\n\n shouldDeactivate(event) {\n if (!this.tribute.isActive) return false;\n\n if (this.tribute.current.mentionText.length === 0) {\n let eventKeyPressed = false;\n TributeEvents.keys().forEach(o => {\n if (event.keyCode === o.key) eventKeyPressed = true;\n });\n\n return !eventKeyPressed;\n }\n\n return false;\n }\n\n getKeyCode(instance, el, event) {\n let tribute = instance.tribute;\n let info = tribute.range.getTriggerInfo(\n false,\n tribute.hasTrailingSpace,\n true,\n tribute.allowSpaces,\n tribute.autocompleteMode\n );\n\n if (info) {\n return info.mentionTriggerChar.charCodeAt(0);\n } else {\n return false;\n }\n }\n\n updateSelection(el) {\n this.tribute.current.element = el;\n let info = this.tribute.range.getTriggerInfo(\n false,\n this.tribute.hasTrailingSpace,\n true,\n this.tribute.allowSpaces,\n this.tribute.autocompleteMode\n );\n\n if (info) {\n this.tribute.current.selectedPath = info.mentionSelectedPath;\n this.tribute.current.mentionText = info.mentionText;\n this.tribute.current.selectedOffset = info.mentionSelectedOffset;\n }\n }\n\n callbacks() {\n return {\n triggerChar: (e, el, trigger) => {\n let tribute = this.tribute;\n tribute.current.trigger = trigger;\n\n let collectionItem = tribute.collection.find(item => {\n return item.trigger === trigger;\n });\n\n tribute.current.collection = collectionItem;\n\n if (\n tribute.current.mentionText.length >=\n tribute.current.collection.menuShowMinLength &&\n tribute.inputEvent\n ) {\n tribute.showMenuFor(el, true);\n }\n },\n enter: (e, el) => {\n // choose selection\n if (this.tribute.isActive && this.tribute.current.filteredItems) {\n e.preventDefault();\n e.stopPropagation();\n setTimeout(() => {\n this.tribute.selectItemAtIndex(this.tribute.menuSelected, e);\n this.tribute.hideMenu();\n }, 0);\n }\n },\n escape: (e, el) => {\n if (this.tribute.isActive) {\n e.preventDefault();\n e.stopPropagation();\n this.tribute.isActive = false;\n this.tribute.hideMenu();\n }\n },\n tab: (e, el) => {\n // choose first match\n this.callbacks().enter(e, el);\n },\n space: (e, el) => {\n if (this.tribute.isActive) {\n if (this.tribute.spaceSelectsMatch) {\n this.callbacks().enter(e, el);\n } else if (!this.tribute.allowSpaces) {\n e.stopPropagation();\n setTimeout(() => {\n this.tribute.hideMenu();\n this.tribute.isActive = false;\n }, 0);\n }\n }\n },\n up: (e, el) => {\n // navigate up ul\n if (this.tribute.isActive && this.tribute.current.filteredItems) {\n e.preventDefault();\n e.stopPropagation();\n let count = this.tribute.current.filteredItems.length,\n selected = this.tribute.menuSelected;\n\n if (count > selected && selected > 0) {\n this.tribute.menuSelected--;\n this.setActiveLi();\n } else if (selected === 0) {\n this.tribute.menuSelected = count - 1;\n this.setActiveLi();\n this.tribute.menu.scrollTop = this.tribute.menu.scrollHeight;\n }\n }\n },\n down: (e, el) => {\n // navigate down ul\n if (this.tribute.isActive && this.tribute.current.filteredItems) {\n e.preventDefault();\n e.stopPropagation();\n let count = this.tribute.current.filteredItems.length - 1,\n selected = this.tribute.menuSelected;\n\n if (count > selected) {\n this.tribute.menuSelected++;\n this.setActiveLi();\n } else if (count === selected) {\n this.tribute.menuSelected = 0;\n this.setActiveLi();\n this.tribute.menu.scrollTop = 0;\n }\n }\n },\n delete: (e, el) => {\n if (\n this.tribute.isActive &&\n this.tribute.current.mentionText.length < 1\n ) {\n this.tribute.hideMenu();\n } else if (this.tribute.isActive) {\n this.tribute.showMenuFor(el);\n }\n }\n };\n }\n\n setActiveLi(index) {\n let lis = this.tribute.menu.querySelectorAll(\"li\"),\n length = lis.length >>> 0;\n\n if (index) this.tribute.menuSelected = parseInt(index);\n\n for (let i = 0; i < length; i++) {\n let li = lis[i];\n if (i === this.tribute.menuSelected) {\n li.classList.add(this.tribute.current.collection.selectClass);\n\n let liClientRect = li.getBoundingClientRect();\n let menuClientRect = this.tribute.menu.getBoundingClientRect();\n\n if (liClientRect.bottom > menuClientRect.bottom) {\n let scrollDistance = liClientRect.bottom - menuClientRect.bottom;\n this.tribute.menu.scrollTop += scrollDistance;\n } else if (liClientRect.top < menuClientRect.top) {\n let scrollDistance = menuClientRect.top - liClientRect.top;\n this.tribute.menu.scrollTop -= scrollDistance;\n }\n } else {\n li.classList.remove(this.tribute.current.collection.selectClass);\n }\n }\n }\n\n getFullHeight(elem, includeMargin) {\n let height = elem.getBoundingClientRect().height;\n\n if (includeMargin) {\n let style = elem.currentStyle || window.getComputedStyle(elem);\n return (\n height + parseFloat(style.marginTop) + parseFloat(style.marginBottom)\n );\n }\n\n return height;\n }\n}\n\nclass TributeMenuEvents {\n constructor(tribute) {\n this.tribute = tribute;\n this.tribute.menuEvents = this;\n this.menu = this.tribute.menu;\n }\n\n bind(menu) {\n this.menuClickEvent = this.tribute.events.click.bind(null, this);\n this.menuContainerScrollEvent = this.debounce(\n () => {\n if (this.tribute.isActive) {\n this.tribute.showMenuFor(this.tribute.current.element, false);\n }\n },\n 300,\n false\n );\n this.windowResizeEvent = this.debounce(\n () => {\n if (this.tribute.isActive) {\n this.tribute.range.positionMenuAtCaret(true);\n }\n },\n 300,\n false\n );\n\n // fixes IE11 issues with mousedown\n this.tribute.range\n .getDocument()\n .addEventListener(\"MSPointerDown\", this.menuClickEvent, false);\n this.tribute.range\n .getDocument()\n .addEventListener(\"mousedown\", this.menuClickEvent, false);\n window.addEventListener(\"resize\", this.windowResizeEvent);\n\n if (this.menuContainer) {\n this.menuContainer.addEventListener(\n \"scroll\",\n this.menuContainerScrollEvent,\n false\n );\n } else {\n window.addEventListener(\"scroll\", this.menuContainerScrollEvent);\n }\n }\n\n unbind(menu) {\n this.tribute.range\n .getDocument()\n .removeEventListener(\"mousedown\", this.menuClickEvent, false);\n this.tribute.range\n .getDocument()\n .removeEventListener(\"MSPointerDown\", this.menuClickEvent, false);\n window.removeEventListener(\"resize\", this.windowResizeEvent);\n\n if (this.menuContainer) {\n this.menuContainer.removeEventListener(\n \"scroll\",\n this.menuContainerScrollEvent,\n false\n );\n } else {\n window.removeEventListener(\"scroll\", this.menuContainerScrollEvent);\n }\n }\n\n debounce(func, wait, immediate) {\n var timeout;\n return () => {\n var context = this,\n args = arguments;\n var later = () => {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }\n}\n\n// Thanks to https://github.com/jeff-collins/ment.io\n\nclass TributeRange {\n constructor(tribute) {\n this.tribute = tribute;\n this.tribute.range = this;\n }\n\n getDocument() {\n let iframe;\n if (this.tribute.current.collection) {\n iframe = this.tribute.current.collection.iframe;\n }\n\n if (!iframe) {\n return document\n }\n\n return iframe.contentWindow.document\n }\n\n positionMenuAtCaret(scrollTo) {\n let context = this.tribute.current,\n coordinates;\n\n let info = this.getTriggerInfo(false, this.tribute.hasTrailingSpace, true, this.tribute.allowSpaces, this.tribute.autocompleteMode);\n\n if (typeof info !== 'undefined') {\n\n if(!this.tribute.positionMenu){\n this.tribute.menu.style.cssText = `display: block;`;\n return\n }\n\n if (!this.isContentEditable(context.element)) {\n coordinates = this.getTextAreaOrInputUnderlinePosition(this.tribute.current.element,\n info.mentionPosition);\n }\n else {\n coordinates = this.getContentEditableCaretPosition(info.mentionPosition);\n }\n\n this.tribute.menu.style.cssText = `top: ${coordinates.top}px;\n left: ${coordinates.left}px;\n right: ${coordinates.right}px;\n bottom: ${coordinates.bottom}px;\n position: absolute;\n display: block;`;\n\n if (coordinates.left === 'auto') {\n this.tribute.menu.style.left = 'auto';\n }\n\n if (coordinates.top === 'auto') {\n this.tribute.menu.style.top = 'auto';\n }\n\n if (scrollTo) this.scrollIntoView();\n\n window.setTimeout(() => {\n let menuDimensions = {\n width: this.tribute.menu.offsetWidth,\n height: this.tribute.menu.offsetHeight\n };\n let menuIsOffScreen = this.isMenuOffScreen(coordinates, menuDimensions);\n\n let menuIsOffScreenHorizontally = window.innerWidth > menuDimensions.width && (menuIsOffScreen.left || menuIsOffScreen.right);\n let menuIsOffScreenVertically = window.innerHeight > menuDimensions.height && (menuIsOffScreen.top || menuIsOffScreen.bottom);\n if (menuIsOffScreenHorizontally || menuIsOffScreenVertically) {\n this.tribute.menu.style.cssText = 'display: none';\n this.positionMenuAtCaret(scrollTo);\n }\n }, 0);\n\n } else {\n this.tribute.menu.style.cssText = 'display: none';\n }\n }\n\n get menuContainerIsBody() {\n return this.tribute.menuContainer === document.body || !this.tribute.menuContainer;\n }\n\n\n selectElement(targetElement, path, offset) {\n let range;\n let elem = targetElement;\n\n if (path) {\n for (var i = 0; i < path.length; i++) {\n elem = elem.childNodes[path[i]];\n if (elem === undefined) {\n return\n }\n while (elem.length < offset) {\n offset -= elem.length;\n elem = elem.nextSibling;\n }\n if (elem.childNodes.length === 0 && !elem.length) {\n elem = elem.previousSibling;\n }\n }\n }\n let sel = this.getWindowSelection();\n\n range = this.getDocument().createRange();\n range.setStart(elem, offset);\n range.setEnd(elem, offset);\n range.collapse(true);\n\n try {\n sel.removeAllRanges();\n } catch (error) {}\n\n sel.addRange(range);\n targetElement.focus();\n }\n\n replaceTriggerText(text, requireLeadingSpace, hasTrailingSpace, originalEvent, item) {\n let info = this.getTriggerInfo(true, hasTrailingSpace, requireLeadingSpace, this.tribute.allowSpaces, this.tribute.autocompleteMode);\n\n if (info !== undefined) {\n let context = this.tribute.current;\n let replaceEvent = new CustomEvent('tribute-replaced', {\n detail: {\n item: item,\n instance: context,\n context: info,\n event: originalEvent,\n }\n });\n\n if (!this.isContentEditable(context.element)) {\n let myField = this.tribute.current.element;\n let textSuffix = typeof this.tribute.replaceTextSuffix == 'string'\n ? this.tribute.replaceTextSuffix\n : ' ';\n text += textSuffix;\n let startPos = info.mentionPosition;\n let endPos = info.mentionPosition + info.mentionText.length + textSuffix.length;\n if (!this.tribute.autocompleteMode) {\n endPos += info.mentionTriggerChar.length - 1;\n }\n myField.value = myField.value.substring(0, startPos) + text +\n myField.value.substring(endPos, myField.value.length);\n myField.selectionStart = startPos + text.length;\n myField.selectionEnd = startPos + text.length;\n } else {\n // add a space to the end of the pasted text\n let textSuffix = typeof this.tribute.replaceTextSuffix == 'string'\n ? this.tribute.replaceTextSuffix\n : '\\xA0';\n text += textSuffix;\n let endPos = info.mentionPosition + info.mentionText.length;\n if (!this.tribute.autocompleteMode) {\n endPos += info.mentionTriggerChar.length;\n }\n this.pasteHtml(text, info.mentionPosition, endPos);\n }\n\n context.element.dispatchEvent(new CustomEvent('input', { bubbles: true }));\n context.element.dispatchEvent(replaceEvent);\n }\n }\n\n pasteHtml(html, startPos, endPos) {\n let range, sel;\n sel = this.getWindowSelection();\n range = this.getDocument().createRange();\n range.setStart(sel.anchorNode, startPos);\n range.setEnd(sel.anchorNode, endPos);\n range.deleteContents();\n\n let el = this.getDocument().createElement('div');\n el.innerHTML = html;\n let frag = this.getDocument().createDocumentFragment(),\n node, lastNode;\n while ((node = el.firstChild)) {\n lastNode = frag.appendChild(node);\n }\n range.insertNode(frag);\n\n // Preserve the selection\n if (lastNode) {\n range = range.cloneRange();\n range.setStartAfter(lastNode);\n range.collapse(true);\n sel.removeAllRanges();\n sel.addRange(range);\n }\n }\n\n getWindowSelection() {\n if (this.tribute.collection.iframe) {\n return this.tribute.collection.iframe.contentWindow.getSelection()\n }\n\n return window.getSelection()\n }\n\n getNodePositionInParent(element) {\n if (element.parentNode === null) {\n return 0\n }\n\n for (var i = 0; i < element.parentNode.childNodes.length; i++) {\n let node = element.parentNode.childNodes[i];\n\n if (node === element) {\n return i\n }\n }\n }\n\n getContentEditableSelectedPath(ctx) {\n let sel = this.getWindowSelection();\n let selected = sel.anchorNode;\n let path = [];\n let offset;\n\n if (selected != null) {\n let i;\n let ce = selected.contentEditable;\n while (selected !== null && ce !== 'true') {\n i = this.getNodePositionInParent(selected);\n path.push(i);\n selected = selected.parentNode;\n if (selected !== null) {\n ce = selected.contentEditable;\n }\n }\n path.reverse();\n\n // getRangeAt may not exist, need alternative\n offset = sel.getRangeAt(0).startOffset;\n\n return {\n selected: selected,\n path: path,\n offset: offset\n }\n }\n }\n\n getTextPrecedingCurrentSelection() {\n let context = this.tribute.current,\n text = '';\n\n if (!this.isContentEditable(context.element)) {\n let textComponent = this.tribute.current.element;\n if (textComponent) {\n let startPos = textComponent.selectionStart;\n if (textComponent.value && startPos >= 0) {\n text = textComponent.value.substring(0, startPos);\n }\n }\n\n } else {\n let selectedElem = this.getWindowSelection().anchorNode;\n\n if (selectedElem != null) {\n let workingNodeContent = selectedElem.textContent;\n let selectStartOffset = this.getWindowSelection().getRangeAt(0).startOffset;\n\n if (workingNodeContent && selectStartOffset >= 0) {\n text = workingNodeContent.substring(0, selectStartOffset);\n }\n }\n }\n\n return text\n }\n\n getLastWordInText(text) {\n text = text.replace(/\\u00A0/g, ' '); // https://stackoverflow.com/questions/29850407/how-do-i-replace-unicode-character-u00a0-with-a-space-in-javascript\n let wordsArray = text.split(/\\s+/);\n let worldsCount = wordsArray.length - 1;\n return wordsArray[worldsCount].trim()\n }\n\n getTriggerInfo(menuAlreadyActive, hasTrailingSpace, requireLeadingSpace, allowSpaces, isAutocomplete) {\n let ctx = this.tribute.current;\n let selected, path, offset;\n\n if (!this.isContentEditable(ctx.element)) {\n selected = this.tribute.current.element;\n } else {\n let selectionInfo = this.getContentEditableSelectedPath(ctx);\n\n if (selectionInfo) {\n selected = selectionInfo.selected;\n path = selectionInfo.path;\n offset = selectionInfo.offset;\n }\n }\n\n let effectiveRange = this.getTextPrecedingCurrentSelection();\n let lastWordOfEffectiveRange = this.getLastWordInText(effectiveRange);\n\n if (isAutocomplete) {\n return {\n mentionPosition: effectiveRange.length - lastWordOfEffectiveRange.length,\n mentionText: lastWordOfEffectiveRange,\n mentionSelectedElement: selected,\n mentionSelectedPath: path,\n mentionSelectedOffset: offset\n }\n }\n\n if (effectiveRange !== undefined && effectiveRange !== null) {\n let mostRecentTriggerCharPos = -1;\n let triggerChar;\n\n this.tribute.collection.forEach(config => {\n let c = config.trigger;\n let idx = config.requireLeadingSpace ?\n this.lastIndexWithLeadingSpace(effectiveRange, c) :\n effectiveRange.lastIndexOf(c);\n\n if (idx > mostRecentTriggerCharPos) {\n mostRecentTriggerCharPos = idx;\n triggerChar = c;\n requireLeadingSpace = config.requireLeadingSpace;\n }\n });\n\n if (mostRecentTriggerCharPos >= 0 &&\n (\n mostRecentTriggerCharPos === 0 ||\n !requireLeadingSpace ||\n /[\\xA0\\s]/g.test(\n effectiveRange.substring(\n mostRecentTriggerCharPos - 1,\n mostRecentTriggerCharPos)\n )\n )\n ) {\n let currentTriggerSnippet = effectiveRange.substring(mostRecentTriggerCharPos + triggerChar.length,\n effectiveRange.length);\n\n triggerChar = effectiveRange.substring(mostRecentTriggerCharPos, mostRecentTriggerCharPos + triggerChar.length);\n let firstSnippetChar = currentTriggerSnippet.substring(0, 1);\n let leadingSpace = currentTriggerSnippet.length > 0 &&\n (\n firstSnippetChar === ' ' ||\n firstSnippetChar === '\\xA0'\n );\n if (hasTrailingSpace) {\n currentTriggerSnippet = currentTriggerSnippet.trim();\n }\n\n let regex = allowSpaces ? /[^\\S ]/g : /[\\xA0\\s]/g;\n\n this.tribute.hasTrailingSpace = regex.test(currentTriggerSnippet);\n\n if (!leadingSpace && (menuAlreadyActive || !(regex.test(currentTriggerSnippet)))) {\n return {\n mentionPosition: mostRecentTriggerCharPos,\n mentionText: currentTriggerSnippet,\n mentionSelectedElement: selected,\n mentionSelectedPath: path,\n mentionSelectedOffset: offset,\n mentionTriggerChar: triggerChar\n }\n }\n }\n }\n }\n\n lastIndexWithLeadingSpace (str, trigger) {\n let reversedStr = str.split('').reverse().join('');\n let index = -1;\n\n for (let cidx = 0, len = str.length; cidx < len; cidx++) {\n let firstChar = cidx === str.length - 1;\n let leadingSpace = /\\s/.test(reversedStr[cidx + 1]);\n\n let match = true;\n for (let triggerIdx = trigger.length - 1; triggerIdx >= 0; triggerIdx--) {\n if (trigger[triggerIdx] !== reversedStr[cidx-triggerIdx]) {\n match = false;\n break\n }\n }\n\n if (match && (firstChar || leadingSpace)) {\n index = str.length - 1 - cidx;\n break\n }\n }\n\n return index\n }\n\n isContentEditable(element) {\n return element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA'\n }\n\n isMenuOffScreen(coordinates, menuDimensions) {\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n let doc = document.documentElement;\n let windowLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n let windowTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\n\n let menuTop = typeof coordinates.top === 'number' ? coordinates.top : windowTop + windowHeight - coordinates.bottom - menuDimensions.height;\n let menuRight = typeof coordinates.right === 'number' ? coordinates.right : coordinates.left + menuDimensions.width;\n let menuBottom = typeof coordinates.bottom === 'number' ? coordinates.bottom : coordinates.top + menuDimensions.height;\n let menuLeft = typeof coordinates.left === 'number' ? coordinates.left : windowLeft + windowWidth - coordinates.right - menuDimensions.width;\n\n return {\n top: menuTop < Math.floor(windowTop),\n right: menuRight > Math.ceil(windowLeft + windowWidth),\n bottom: menuBottom > Math.ceil(windowTop + windowHeight),\n left: menuLeft < Math.floor(windowLeft)\n }\n }\n\n getMenuDimensions() {\n // Width of the menu depends of its contents and position\n // We must check what its width would be without any obstruction\n // This way, we can achieve good positioning for flipping the menu\n let dimensions = {\n width: null,\n height: null\n };\n\n this.tribute.menu.style.cssText = `top: 0px;\n left: 0px;\n position: fixed;\n display: block;\n visibility; hidden;`;\n dimensions.width = this.tribute.menu.offsetWidth;\n dimensions.height = this.tribute.menu.offsetHeight;\n\n this.tribute.menu.style.cssText = `display: none;`;\n\n return dimensions\n }\n\n getTextAreaOrInputUnderlinePosition(element, position, flipped) {\n let properties = ['direction', 'boxSizing', 'width', 'height', 'overflowX',\n 'overflowY', 'borderTopWidth', 'borderRightWidth',\n 'borderBottomWidth', 'borderLeftWidth', 'paddingTop',\n 'paddingRight', 'paddingBottom', 'paddingLeft',\n 'fontStyle', 'fontVariant', 'fontWeight', 'fontStretch',\n 'fontSize', 'fontSizeAdjust', 'lineHeight', 'fontFamily',\n 'textAlign', 'textTransform', 'textIndent',\n 'textDecoration', 'letterSpacing', 'wordSpacing'\n ];\n\n let isFirefox = (window.mozInnerScreenX !== null);\n\n let div = this.getDocument().createElement('div');\n div.id = 'input-textarea-caret-position-mirror-div';\n this.getDocument().body.appendChild(div);\n\n let style = div.style;\n let computed = window.getComputedStyle ? getComputedStyle(element) : element.currentStyle;\n\n style.whiteSpace = 'pre-wrap';\n if (element.nodeName !== 'INPUT') {\n style.wordWrap = 'break-word';\n }\n\n // position off-screen\n style.position = 'absolute';\n style.visibility = 'hidden';\n\n // transfer the element's properties to the div\n properties.forEach(prop => {\n style[prop] = computed[prop];\n });\n\n if (isFirefox) {\n style.width = `${(parseInt(computed.width) - 2)}px`;\n if (element.scrollHeight > parseInt(computed.height))\n style.overflowY = 'scroll';\n } else {\n style.overflow = 'hidden';\n }\n\n div.textContent = element.value.substring(0, position);\n\n if (element.nodeName === 'INPUT') {\n div.textContent = div.textContent.replace(/\\s/g, ' ');\n }\n\n let span = this.getDocument().createElement('span');\n span.textContent = element.value.substring(position) || '.';\n div.appendChild(span);\n\n let rect = element.getBoundingClientRect();\n let doc = document.documentElement;\n let windowLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n let windowTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\n\n let top = 0;\n let left = 0;\n if (this.menuContainerIsBody) {\n top = rect.top;\n left = rect.left;\n }\n\n let coordinates = {\n top: top + windowTop + span.offsetTop + parseInt(computed.borderTopWidth) + parseInt(computed.fontSize) - element.scrollTop,\n left: left + windowLeft + span.offsetLeft + parseInt(computed.borderLeftWidth)\n };\n\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n\n let menuDimensions = this.getMenuDimensions();\n let menuIsOffScreen = this.isMenuOffScreen(coordinates, menuDimensions);\n\n if (menuIsOffScreen.right) {\n coordinates.right = windowWidth - coordinates.left;\n coordinates.left = 'auto';\n }\n\n let parentHeight = this.tribute.menuContainer\n ? this.tribute.menuContainer.offsetHeight\n : this.getDocument().body.offsetHeight;\n\n if (menuIsOffScreen.bottom) {\n let parentRect = this.tribute.menuContainer\n ? this.tribute.menuContainer.getBoundingClientRect()\n : this.getDocument().body.getBoundingClientRect();\n let scrollStillAvailable = parentHeight - (windowHeight - parentRect.top);\n\n coordinates.bottom = scrollStillAvailable + (windowHeight - rect.top - span.offsetTop);\n coordinates.top = 'auto';\n }\n\n menuIsOffScreen = this.isMenuOffScreen(coordinates, menuDimensions);\n if (menuIsOffScreen.left) {\n coordinates.left = windowWidth > menuDimensions.width\n ? windowLeft + windowWidth - menuDimensions.width\n : windowLeft;\n delete coordinates.right;\n }\n if (menuIsOffScreen.top) {\n coordinates.top = windowHeight > menuDimensions.height\n ? windowTop + windowHeight - menuDimensions.height\n : windowTop;\n delete coordinates.bottom;\n }\n\n this.getDocument().body.removeChild(div);\n return coordinates\n }\n\n getContentEditableCaretPosition(selectedNodePosition) {\n let range;\n let sel = this.getWindowSelection();\n\n range = this.getDocument().createRange();\n range.setStart(sel.anchorNode, selectedNodePosition);\n range.setEnd(sel.anchorNode, selectedNodePosition);\n\n range.collapse(false);\n\n let rect = range.getBoundingClientRect();\n let doc = document.documentElement;\n let windowLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n let windowTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\n\n let left = rect.left;\n let top = rect.top;\n\n let coordinates = {\n left: left + windowLeft,\n top: top + rect.height + windowTop\n };\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n\n let menuDimensions = this.getMenuDimensions();\n let menuIsOffScreen = this.isMenuOffScreen(coordinates, menuDimensions);\n\n if (menuIsOffScreen.right) {\n coordinates.left = 'auto';\n coordinates.right = windowWidth - rect.left - windowLeft;\n }\n\n let parentHeight = this.tribute.menuContainer\n ? this.tribute.menuContainer.offsetHeight\n : this.getDocument().body.offsetHeight;\n\n if (menuIsOffScreen.bottom) {\n let parentRect = this.tribute.menuContainer\n ? this.tribute.menuContainer.getBoundingClientRect()\n : this.getDocument().body.getBoundingClientRect();\n let scrollStillAvailable = parentHeight - (windowHeight - parentRect.top);\n\n coordinates.top = 'auto';\n coordinates.bottom = scrollStillAvailable + (windowHeight - rect.top);\n }\n\n menuIsOffScreen = this.isMenuOffScreen(coordinates, menuDimensions);\n if (menuIsOffScreen.left) {\n coordinates.left = windowWidth > menuDimensions.width\n ? windowLeft + windowWidth - menuDimensions.width\n : windowLeft;\n delete coordinates.right;\n }\n if (menuIsOffScreen.top) {\n coordinates.top = windowHeight > menuDimensions.height\n ? windowTop + windowHeight - menuDimensions.height\n : windowTop;\n delete coordinates.bottom;\n }\n\n if (!this.menuContainerIsBody) {\n coordinates.left = coordinates.left ? coordinates.left - this.tribute.menuContainer.offsetLeft : coordinates.left;\n coordinates.top = coordinates.top ? coordinates.top - this.tribute.menuContainer.offsetTop : coordinates.top;\n }\n\n return coordinates\n }\n\n scrollIntoView(elem) {\n let reasonableBuffer = 20,\n clientRect;\n let maxScrollDisplacement = 100;\n let e = this.menu;\n\n if (typeof e === 'undefined') return;\n\n while (clientRect === undefined || clientRect.height === 0) {\n clientRect = e.getBoundingClientRect();\n\n if (clientRect.height === 0) {\n e = e.childNodes[0];\n if (e === undefined || !e.getBoundingClientRect) {\n return\n }\n }\n }\n\n let elemTop = clientRect.top;\n let elemBottom = elemTop + clientRect.height;\n\n if (elemTop < 0) {\n window.scrollTo(0, window.pageYOffset + clientRect.top - reasonableBuffer);\n } else if (elemBottom > window.innerHeight) {\n let maxY = window.pageYOffset + clientRect.top - reasonableBuffer;\n\n if (maxY - window.pageYOffset > maxScrollDisplacement) {\n maxY = window.pageYOffset + maxScrollDisplacement;\n }\n\n let targetY = window.pageYOffset - (window.innerHeight - elemBottom);\n\n if (targetY > maxY) {\n targetY = maxY;\n }\n\n window.scrollTo(0, targetY);\n }\n }\n}\n\n// Thanks to https://github.com/mattyork/fuzzy\nclass TributeSearch {\n constructor(tribute) {\n this.tribute = tribute;\n this.tribute.search = this;\n }\n\n simpleFilter(pattern, array) {\n return array.filter(string => {\n return this.test(pattern, string)\n })\n }\n\n test(pattern, string) {\n return this.match(pattern, string) !== null\n }\n\n match(pattern, string, opts) {\n opts = opts || {};\n let len = string.length,\n pre = opts.pre || '',\n post = opts.post || '',\n compareString = opts.caseSensitive && string || string.toLowerCase();\n\n if (opts.skip) {\n return {rendered: string, score: 0}\n }\n\n pattern = opts.caseSensitive && pattern || pattern.toLowerCase();\n\n let patternCache = this.traverse(compareString, pattern, 0, 0, []);\n if (!patternCache) {\n return null\n }\n return {\n rendered: this.render(string, patternCache.cache, pre, post),\n score: patternCache.score\n }\n }\n\n traverse(string, pattern, stringIndex, patternIndex, patternCache) {\n // if the pattern search at end\n if (pattern.length === patternIndex) {\n\n // calculate score and copy the cache containing the indices where it's found\n return {\n score: this.calculateScore(patternCache),\n cache: patternCache.slice()\n }\n }\n\n // if string at end or remaining pattern > remaining string\n if (string.length === stringIndex || pattern.length - patternIndex > string.length - stringIndex) {\n return undefined\n }\n\n let c = pattern[patternIndex];\n let index = string.indexOf(c, stringIndex);\n let best, temp;\n\n while (index > -1) {\n patternCache.push(index);\n temp = this.traverse(string, pattern, index + 1, patternIndex + 1, patternCache);\n patternCache.pop();\n\n // if downstream traversal failed, return best answer so far\n if (!temp) {\n return best\n }\n\n if (!best || best.score < temp.score) {\n best = temp;\n }\n\n index = string.indexOf(c, index + 1);\n }\n\n return best\n }\n\n calculateScore(patternCache) {\n let score = 0;\n let temp = 1;\n\n patternCache.forEach((index, i) => {\n if (i > 0) {\n if (patternCache[i - 1] + 1 === index) {\n temp += temp + 1;\n }\n else {\n temp = 1;\n }\n }\n\n score += temp;\n });\n\n return score\n }\n\n render(string, indices, pre, post) {\n var rendered = string.substring(0, indices[0]);\n\n indices.forEach((index, i) => {\n rendered += pre + string[index] + post +\n string.substring(index + 1, (indices[i + 1]) ? indices[i + 1] : string.length);\n });\n\n return rendered\n }\n\n filter(pattern, arr, opts) {\n opts = opts || {};\n return arr\n .reduce((prev, element, idx, arr) => {\n let str = element;\n\n if (opts.extract) {\n str = opts.extract(element);\n\n if (!str) { // take care of undefineds / nulls / etc.\n str = '';\n }\n }\n\n let rendered = this.match(pattern, str, opts);\n\n if (rendered != null) {\n prev[prev.length] = {\n string: rendered.rendered,\n score: rendered.score,\n index: idx,\n original: element\n };\n }\n\n return prev\n }, [])\n\n .sort((a, b) => {\n let compare = b.score - a.score;\n if (compare) return compare\n return a.index - b.index\n })\n }\n}\n\nclass Tribute {\n constructor({\n values = null,\n iframe = null,\n selectClass = \"highlight\",\n containerClass = \"tribute-container\",\n itemClass = \"\",\n trigger = \"@\",\n autocompleteMode = false,\n selectTemplate = null,\n menuItemTemplate = null,\n lookup = \"key\",\n fillAttr = \"value\",\n collection = null,\n menuContainer = null,\n noMatchTemplate = null,\n requireLeadingSpace = true,\n allowSpaces = false,\n replaceTextSuffix = null,\n positionMenu = true,\n spaceSelectsMatch = false,\n searchOpts = {},\n menuItemLimit = null,\n menuShowMinLength = 0\n }) {\n this.autocompleteMode = autocompleteMode;\n this.menuSelected = 0;\n this.current = {};\n this.inputEvent = false;\n this.isActive = false;\n this.menuContainer = menuContainer;\n this.allowSpaces = allowSpaces;\n this.replaceTextSuffix = replaceTextSuffix;\n this.positionMenu = positionMenu;\n this.hasTrailingSpace = false;\n this.spaceSelectsMatch = spaceSelectsMatch;\n\n if (this.autocompleteMode) {\n trigger = \"\";\n allowSpaces = false;\n }\n\n if (values) {\n this.collection = [\n {\n // symbol that starts the lookup\n trigger: trigger,\n\n // is it wrapped in an iframe\n iframe: iframe,\n\n // class applied to selected item\n selectClass: selectClass,\n\n // class applied to the Container\n containerClass: containerClass,\n\n // class applied to each item\n itemClass: itemClass,\n\n // function called on select that retuns the content to insert\n selectTemplate: (\n selectTemplate || Tribute.defaultSelectTemplate\n ).bind(this),\n\n // function called that returns content for an item\n menuItemTemplate: (\n menuItemTemplate || Tribute.defaultMenuItemTemplate\n ).bind(this),\n\n // function called when menu is empty, disables hiding of menu.\n noMatchTemplate: (t => {\n if (typeof t === \"string\") {\n if (t.trim() === \"\") return null;\n return t;\n }\n if (typeof t === \"function\") {\n return t.bind(this);\n }\n\n return (\n noMatchTemplate ||\n function() {\n return \"<li>No Match Found!</li>\";\n }.bind(this)\n );\n })(noMatchTemplate),\n\n // column to search against in the object\n lookup: lookup,\n\n // column that contains the content to insert by default\n fillAttr: fillAttr,\n\n // array of objects or a function returning an array of objects\n values: values,\n\n requireLeadingSpace: requireLeadingSpace,\n\n searchOpts: searchOpts,\n\n menuItemLimit: menuItemLimit,\n\n menuShowMinLength: menuShowMinLength\n }\n ];\n } else if (collection) {\n if (this.autocompleteMode)\n console.warn(\n \"Tribute in autocomplete mode does not work for collections\"\n );\n this.collection = collection.map(item => {\n return {\n trigger: item.trigger || trigger,\n iframe: item.iframe || iframe,\n selectClass: item.selectClass || selectClass,\n containerClass: item.containerClass || containerClass,\n itemClass: item.itemClass || itemClass,\n selectTemplate: (\n item.selectTemplate || Tribute.defaultSelectTemplate\n ).bind(this),\n menuItemTemplate: (\n item.menuItemTemplate || Tribute.defaultMenuItemTemplate\n ).bind(this),\n // function called when menu is empty, disables hiding of menu.\n noMatchTemplate: (t => {\n if (typeof t === \"string\") {\n if (t.trim() === \"\") return null;\n return t;\n }\n if (typeof t === \"function\") {\n return t.bind(this);\n }\n\n return (\n noMatchTemplate ||\n function() {\n return \"<li>No Match Found!</li>\";\n }.bind(this)\n );\n })(noMatchTemplate),\n lookup: item.lookup || lookup,\n fillAttr: item.fillAttr || fillAttr,\n values: item.values,\n requireLeadingSpace: item.requireLeadingSpace,\n searchOpts: item.searchOpts || searchOpts,\n menuItemLimit: item.menuItemLimit || menuItemLimit,\n menuShowMinLength: item.menuShowMinLength || menuShowMinLength\n };\n });\n } else {\n throw new Error(\"[Tribute] No collection specified.\");\n }\n\n new TributeRange(this);\n new TributeEvents(this);\n new TributeMenuEvents(this);\n new TributeSearch(this);\n }\n\n get isActive() {\n return this._isActive;\n }\n\n set isActive(val) {\n if (this._isActive != val) {\n this._isActive = val;\n if (this.current.element) {\n let noMatchEvent = new CustomEvent(`tribute-active-${val}`);\n this.current.element.dispatchEvent(noMatchEvent);\n }\n }\n }\n\n static defaultSelectTemplate(item) {\n if (typeof item === \"undefined\")\n return `${this.current.collection.trigger}${this.current.mentionText}`;\n if (this.range.isContentEditable(this.current.element)) {\n return (\n '<span class=\"tribute-mention\">' +\n (this.current.collection.trigger +\n item.original[this.current.collection.fillAttr]) +\n \"</span>\"\n );\n }\n\n return (\n this.current.collection.trigger +\n item.original[this.current.collection.fillAttr]\n );\n }\n\n static defaultMenuItemTemplate(matchItem) {\n return matchItem.string;\n }\n\n static inputTypes() {\n return [\"TEXTAREA\", \"INPUT\"];\n }\n\n triggers() {\n return this.collection.map(config => {\n return config.trigger;\n });\n }\n\n attach(el) {\n if (!el) {\n throw new Error(\"[Tribute] Must pass in a DOM node or NodeList.\");\n }\n\n // Check if it is a jQuery collection\n if (typeof jQuery !== \"undefined\" && el instanceof jQuery) {\n el = el.get();\n }\n\n // Is el an Array/Array-like object?\n if (\n el.constructor === NodeList ||\n el.constructor === HTMLCollection ||\n el.constructor === Array\n ) {\n let length = el.length;\n for (var i = 0; i < length; ++i) {\n this._attach(el[i]);\n }\n } else {\n this._attach(el);\n }\n }\n\n _attach(el) {\n if (el.hasAttribute(\"data-tribute\")) {\n console.warn(\"Tribute was already bound to \" + el.nodeName);\n }\n\n this.ensureEditable(el);\n this.events.bind(el);\n el.setAttribute(\"data-tribute\", true);\n }\n\n ensureEditable(element) {\n if (Tribute.inputTypes().indexOf(element.nodeName) === -1) {\n if (element.contentEditable) {\n element.contentEditable = true;\n } else {\n throw new Error(\"[Tribute] Cannot bind to \" + element.nodeName);\n }\n }\n }\n\n createMenu(containerClass) {\n let wrapper = this.range.getDocument().createElement(\"div\"),\n ul = this.range.getDocument().createElement(\"ul\");\n wrapper.className = containerClass;\n wrapper.appendChild(ul);\n\n if (this.menuContainer) {\n return this.menuContainer.appendChild(wrapper);\n }\n\n return this.range.getDocument().body.appendChild(wrapper);\n }\n\n showMenuFor(element, scrollTo) {\n // Only proceed if menu isn't already shown for the current element & mentionText\n if (\n this.isActive &&\n this.current.element === element &&\n this.current.mentionText === this.currentMentionTextSnapshot\n ) {\n return;\n }\n this.currentMentionTextSnapshot = this.current.mentionText;\n\n // create the menu if it doesn't exist.\n if (!this.menu) {\n this.menu = this.createMenu(this.current.collection.containerClass);\n element.tributeMenu = this.menu;\n this.menuEvents.bind(this.menu);\n }\n\n this.isActive = true;\n this.menuSelected = 0;\n\n if (!this.current.mentionText) {\n this.current.mentionText = \"\";\n }\n\n const processValues = values => {\n // Tribute may not be active any more by the time the value callback returns\n if (!this.isActive) {\n return;\n }\n\n let items = this.search.filter(this.current.mentionText, values, {\n pre: this.current.collection.searchOpts.pre || \"<span>\",\n post: this.current.collection.searchOpts.post || \"</span>\",\n skip: this.current.collection.searchOpts.skip,\n extract: el => {\n if (typeof this.current.collection.lookup === \"string\") {\n return el[this.current.collection.lookup];\n } else if (typeof this.current.collection.lookup === \"function\") {\n return this.current.collection.lookup(el, this.current.mentionText);\n } else {\n throw new Error(\n \"Invalid lookup attribute, lookup must be string or function.\"\n );\n }\n }\n });\n\n if (this.current.collection.menuItemLimit) {\n items = items.slice(0, this.current.collection.menuItemLimit);\n }\n\n this.current.filteredItems = items;\n\n let ul = this.menu.querySelector(\"ul\");\n\n this.range.positionMenuAtCaret(scrollTo);\n\n if (!items.length) {\n let noMatchEvent = new CustomEvent(\"tribute-no-match\", {\n detail: this.menu\n });\n this.current.element.dispatchEvent(noMatchEvent);\n if (\n (typeof this.current.collection.noMatchTemplate === \"function\" &&\n !this.current.collection.noMatchTemplate()) ||\n !this.current.collection.noMatchTemplate\n ) {\n this.hideMenu();\n } else {\n typeof this.current.collection.noMatchTemplate === \"function\"\n ? (ul.innerHTML = this.current.collection.noMatchTemplate())\n : (ul.innerHTML = this.current.collection.noMatchTemplate);\n }\n\n return;\n }\n\n ul.innerHTML = \"\";\n let fragment = this.range.getDocument().createDocumentFragment();\n\n items.forEach((item, index) => {\n let li = this.range.getDocument().createElement(\"li\");\n li.setAttribute(\"data-index\", index);\n li.className = this.current.collection.itemClass;\n li.addEventListener(\"mousemove\", e => {\n let [li, index] = this._findLiTarget(e.target);\n if (e.movementY !== 0) {\n this.events.setActiveLi(index);\n }\n });\n if (this.menuSelected === index) {\n li.classList.add(this.current.collection.selectClass);\n }\n li.innerHTML = this.current.collection.menuItemTemplate(item);\n fragment.appendChild(li);\n });\n ul.appendChild(fragment);\n };\n\n if (typeof this.current.collection.values === \"function\") {\n this.current.collection.values(this.current.mentionText, processValues);\n } else {\n processValues(this.current.collection.values);\n }\n }\n\n _findLiTarget(el) {\n if (!el) return [];\n const index = el.getAttribute(\"data-index\");\n return !index ? this._findLiTarget(el.parentNode) : [el, index];\n }\n\n showMenuForCollection(element, collectionIndex) {\n if (element !== document.activeElement) {\n this.placeCaretAtEnd(element);\n }\n\n this.current.collection = this.collection[collectionIndex || 0];\n this.current.externalTrigger = true;\n this.current.element = element;\n\n if (element.isContentEditable)\n this.insertTextAtCursor(this.current.collection.trigger);\n else this.insertAtCaret(element, this.current.collection.trigger);\n\n this.showMenuFor(element);\n }\n\n // TODO: make sure this works for inputs/textareas\n placeCaretAtEnd(el) {\n el.focus();\n if (\n typeof window.getSelection != \"undefined\" &&\n typeof document.createRange != \"undefined\"\n ) {\n var range = document.createRange();\n range.selectNodeContents(el);\n range.collapse(false);\n var sel = window.getSelection();\n sel.removeAllRanges();\n sel.addRange(range);\n } else if (typeof document.body.createTextRange != \"undefined\") {\n var textRange = document.body.createTextRange();\n textRange.moveToElementText(el);\n textRange.collapse(false);\n textRange.select();\n }\n }\n\n // for contenteditable\n insertTextAtCursor(text) {\n var sel, range;\n sel = window.getSelection();\n range = sel.getRangeAt(0);\n range.deleteContents();\n var textNode = document.createTextNode(text);\n range.insertNode(textNode);\n range.selectNodeContents(textNode);\n range.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range);\n }\n\n // for regular inputs\n insertAtCaret(textarea, text) {\n var scrollPos = textarea.scrollTop;\n var caretPos = textarea.selectionStart;\n\n var front = textarea.value.substring(0, caretPos);\n var back = textarea.value.substring(\n textarea.selectionEnd,\n textarea.value.length\n );\n textarea.value = front + text + back;\n caretPos = caretPos + text.length;\n textarea.selectionStart = caretPos;\n textarea.selectionEnd = caretPos;\n textarea.focus();\n textarea.scrollTop = scrollPos;\n }\n\n hideMenu() {\n if (this.menu) {\n this.menu.style.cssText = \"display: none;\";\n this.isActive = false;\n this.menuSelected = 0;\n this.current = {};\n }\n }\n\n selectItemAtIndex(index, originalEvent) {\n index = parseInt(index);\n if (typeof index !== \"number\" || isNaN(index)) return;\n let item = this.current.filteredItems[index];\n let content = this.current.collection.selectTemplate(item);\n if (content !== null) this.replaceText(content, originalEvent, item);\n }\n\n replaceText(content, originalEvent, item) {\n this.range.replaceTriggerText(content, true, true, originalEvent, item);\n }\n\n _append(collection, newValues, replace) {\n if (typeof collection.values === \"function\") {\n throw new Error(\"Unable to append to values, as it is a function.\");\n } else if (!replace) {\n collection.values = collection.values.concat(newValues);\n } else {\n collection.values = newValues;\n }\n }\n\n append(collectionIndex, newValues, replace) {\n let index = parseInt(collectionIndex);\n if (typeof index !== \"number\")\n throw new Error(\"please provide an index for the collection to update.\");\n\n let collection = this.collection[index];\n\n this._append(collection, newValues, replace);\n }\n\n appendCurrent(newValues, replace) {\n if (this.isActive) {\n this._append(this.current.collection, newValues, replace);\n } else {\n throw new Error(\n \"No active state. Please use append instead and pass an index.\"\n );\n }\n }\n\n detach(el) {\n if (!el) {\n throw new Error(\"[Tribute] Must pass in a DOM node or NodeList.\");\n }\n\n // Check if it is a jQuery collection\n if (typeof jQuery !== \"undefined\" && el instanceof jQuery) {\n el = el.get();\n }\n\n // Is el an Array/Array-like object?\n if (\n el.constructor === NodeList ||\n el.constructor === HTMLCollection ||\n el.constructor === Array\n ) {\n let length = el.length;\n for (var i = 0; i < length; ++i) {\n this._detach(el[i]);\n }\n } else {\n this._detach(el);\n }\n }\n\n _detach(el) {\n this.events.unbind(el);\n if (el.tributeMenu) {\n this.menuEvents.unbind(el.tributeMenu);\n }\n\n setTimeout(() => {\n el.removeAttribute(\"data-tribute\");\n this.isActive = false;\n if (el.tributeMenu) {\n el.tributeMenu.remove();\n }\n });\n }\n}\n\n/**\n * Tribute.js\n * Native ES6 JavaScript @mention Plugin\n **/\n\nexport default Tribute;\n","import \"../assets/index-d9ae9479.css\";\nimport { r as c } from \"../chunks/index-5f2a5f57.mjs\";\nimport { N as rt } 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 o } from \"../chunks/l10n-f692947e.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-6bc8f6b9.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 \"./NcLoadingIcon.mjs\";\nimport \"./NcTextField.mjs\";\nimport \"./NcButton.mjs\";\nimport \"./NcModal.mjs\";\nimport \"@nextcloud/event-bus\";\nimport l 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: o(\"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 \"smart-picker-submit\"\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: () => o(\"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: () => o(\"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: o(\"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 l(this.autocompleteOptions), this.autocompleteTribute.attach(this.$el), this.emojiAutocomplete && (this.emojiTribute = new l(this.emojiOptions), this.emojiTribute.attach(this.$el)), this.linkAutocomplete && (this.linkTribute = new l(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-smart-picker-result-node\"), i = {\n result: t,\n insertText: !0\n };\n if (this.$emit(\"smart-picker-submit\", i), i.insertText) {\n const s = document.createTextNode(t);\n n.replaceWith(s), this.setCursorAfter(s), this.updateValue(this.$refs.contenteditable.innerHTML);\n } else\n n.remove();\n }).catch((t) => {\n console.debug(\"Smart picker promise rejected:\", t);\n const n = document.getElementById(\"tmp-smart-picker-result-node\");\n this.setCursorAfter(n), n.remove();\n }), '<span id=\"tmp-smart-picker-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((a) => a == null ? void 0 : a.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 r = document.createRange();\n r.setStart(e.target, s.endOffset), r.collapse(!0), i.removeAllRanges(), i.addRange(r), 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 r = s.cloneContents().lastChild;\n r && r.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 \"599f92d5\",\n null,\n null\n);\nconst it = E.exports;\nexport {\n x as NcAutoCompleteResult,\n rt as NcMentionBubble,\n it as default\n};\n","import \"../assets/referencePickerModal-3a127978.css\";\nimport { n as c } from \"./_plugin-vue2_normalizer-71e2aa87.mjs\";\nimport { t as n } from \"./l10n-f692947e.mjs\";\nimport p from \"@nextcloud/axios\";\nimport { loadState as C } from \"@nextcloud/initial-state\";\nimport { imagePath as L, generateOcsUrl as _ } from \"@nextcloud/router\";\nimport m from \"../Components/NcEmptyContent.mjs\";\nimport { N as P } from \"./index-20a9ace9.mjs\";\nimport w from \"../Components/NcSelect.mjs\";\nimport N from \"../Components/NcLoadingIcon.mjs\";\nimport E from \"../Components/NcTextField.mjs\";\nimport { D as I } from \"./DotsHorizontal-0ee7d901.mjs\";\nimport O from \"../Components/NcButton.mjs\";\nimport B from \"../Components/NcModal.mjs\";\nimport { emit as M } from \"@nextcloud/event-bus\";\nimport { A as V } from \"./ArrowLeft-3779ba88.mjs\";\nimport { C as W } from \"./Close-271f72e2.mjs\";\nimport q from \"vue\";\nwindow._vue_richtext_widgets || (window._vue_richtext_widgets = {});\nconst T = (t) => !!window._vue_richtext_widgets[t], j = (t, e, r = (s) => {\n}) => {\n if (window._vue_richtext_widgets[t]) {\n console.error(\"Widget for id \" + t + \" already registered\");\n return;\n }\n window._vue_richtext_widgets[t] = {\n id: t,\n callback: e,\n onDestroy: r\n };\n}, z = (t, { richObjectType: e, richObject: r, accessible: s }) => {\n if (e !== \"open-graph\") {\n if (!window._vue_richtext_widgets[e]) {\n console.error(\"Widget for rich object type \" + e + \" not registered\");\n return;\n }\n window._vue_richtext_widgets[e].callback(t, { richObjectType: e, richObject: r, accessible: s });\n }\n}, D = (t, e) => {\n t !== \"open-graph\" && window._vue_richtext_widgets[t] && window._vue_richtext_widgets[t].onDestroy(e);\n};\nwindow._registerWidget = j;\nconst A = {\n name: \"NcReferenceWidget\",\n props: {\n reference: {\n type: Object,\n required: !0\n }\n },\n data() {\n return {\n compact: 3\n };\n },\n computed: {\n hasCustomWidget() {\n return T(this.reference.richObjectType);\n },\n noAccess() {\n return this.reference && !this.reference.accessible;\n },\n descriptionStyle() {\n if (this.compact === 0)\n return {\n display: \"none\"\n };\n const t = this.compact < 4 ? this.compact : 3;\n return {\n lineClamp: t,\n webkitLineClamp: t\n };\n },\n compactLink() {\n const t = this.reference.openGraphObject.link;\n return t ? t.startsWith(\"https://\") ? t.substring(8) : t.startsWith(\"http://\") ? t.substring(7) : t : \"\";\n }\n },\n mounted() {\n this.renderWidget(), this.observer = new ResizeObserver((t) => {\n t[0].contentRect.width < 450 ? this.compact = 0 : t[0].contentRect.width < 550 ? this.compact = 1 : t[0].contentRect.width < 650 ? this.compact = 2 : this.compact = 3;\n }), this.observer.observe(this.$el);\n },\n beforeDestroy() {\n this.observer.disconnect(), D(this.reference.richObjectType, this.$el);\n },\n methods: {\n renderWidget() {\n var t;\n this.$refs.customWidget && (this.$refs.customWidget.innerHTML = \"\"), ((t = this == null ? void 0 : this.reference) == null ? void 0 : t.richObjectType) !== \"open-graph\" && this.$nextTick(() => {\n z(this.$refs.customWidget, this.reference);\n });\n }\n }\n};\nvar F = function() {\n var e = this, r = e._self._c;\n return r(\"div\", [e.reference && e.hasCustomWidget ? r(\"div\", { staticClass: \"widget-custom\" }, [r(\"div\", { ref: \"customWidget\" })]) : !e.noAccess && e.reference && e.reference.openGraphObject && !e.hasCustomWidget ? r(\"a\", { staticClass: \"widget-default\", attrs: { href: e.reference.openGraphObject.link, rel: \"noopener noreferrer\", target: \"_blank\" } }, [e.reference.openGraphObject.thumb ? r(\"img\", { staticClass: \"widget-default--image\", attrs: { src: e.reference.openGraphObject.thumb } }) : e._e(), r(\"div\", { staticClass: \"widget-default--details\" }, [r(\"p\", { staticClass: \"widget-default--name\" }, [e._v(e._s(e.reference.openGraphObject.name))]), r(\"p\", { staticClass: \"widget-default--description\", style: e.descriptionStyle }, [e._v(e._s(e.reference.openGraphObject.description))]), r(\"p\", { staticClass: \"widget-default--link\" }, [e._v(e._s(e.compactLink))])])]) : e._e()]);\n}, U = [], Q = /* @__PURE__ */ c(\n A,\n F,\n U,\n !1,\n null,\n \"b1c5a80f\",\n null,\n null\n);\nconst G = Q.exports;\nwindow._vue_richtext_custom_picker_elements || (window._vue_richtext_custom_picker_elements = {});\nclass nt {\n /**\n * @param {HTMLElement} element The HTML element\n * @param {object} object The object\n */\n constructor(e, r) {\n this.element = e, this.object = r;\n }\n}\nconst h = (t) => !!window._vue_richtext_custom_picker_elements[t], H = (t) => {\n var r;\n const e = (r = window._vue_richtext_custom_picker_elements[t]) == null ? void 0 : r.size;\n return [\"small\", \"normal\", \"large\", \"full\"].includes(e) ? e : null;\n}, Z = (t, e, r = (i) => {\n}, s = \"large\") => {\n if (window._vue_richtext_custom_picker_elements[t]) {\n console.error(\"Custom reference picker element for id \" + t + \" already registered\");\n return;\n }\n window._vue_richtext_custom_picker_elements[t] = {\n id: t,\n callback: e,\n onDestroy: r,\n size: s\n };\n}, J = (t, { providerId: e, accessible: r }) => {\n if (!window._vue_richtext_custom_picker_elements[e]) {\n console.error(\"Custom reference picker element for reference provider ID \" + e + \" not registered\");\n return;\n }\n return window._vue_richtext_custom_picker_elements[e].callback(t, { providerId: e, accessible: r });\n}, K = (t, e, r) => {\n window._vue_richtext_custom_picker_elements[t] && window._vue_richtext_custom_picker_elements[t].onDestroy(e, r);\n};\nwindow._registerCustomPickerElement = Z;\nconst X = {\n name: \"NcCustomPickerElement\",\n props: {\n /**\n * The reference provider\n */\n provider: {\n type: Object,\n required: !0\n }\n },\n emits: [\n \"cancel\",\n \"submit\"\n ],\n data() {\n return {\n isRegistered: h(this.provider.id),\n renderResult: null\n };\n },\n mounted() {\n this.isRegistered && this.renderElement();\n },\n beforeDestroy() {\n this.isRegistered && K(this.provider.id, this.$el, this.renderResult);\n },\n methods: {\n renderElement() {\n this.$refs.domElement && (this.$refs.domElement.innerHTML = \"\");\n const t = J(this.$refs.domElement, { providerId: this.provider.id, accessible: !1 });\n Promise.resolve(t).then((e) => {\n var r, s;\n this.renderResult = e, (r = this.renderResult.object) != null && r._isVue && ((s = this.renderResult.object) != null && s.$on) && (this.renderResult.object.$on(\"submit\", this.onSubmit), this.renderResult.object.$on(\"cancel\", this.onCancel)), this.renderResult.element.addEventListener(\"submit\", (i) => {\n this.onSubmit(i.detail);\n }), this.renderResult.element.addEventListener(\"cancel\", this.onCancel);\n });\n },\n onSubmit(t) {\n this.$emit(\"submit\", t);\n },\n onCancel() {\n this.$emit(\"cancel\");\n }\n }\n};\nvar Y = function() {\n var e = this, r = e._self._c;\n return r(\"div\", { ref: \"domElement\" });\n}, ee = [], te = /* @__PURE__ */ c(\n X,\n Y,\n ee,\n !1,\n null,\n \"cf695ff9\",\n null,\n null\n);\nconst re = te.exports, b = \"any-link\", S = {\n id: b,\n title: n(\"Any link\"),\n icon_url: L(\"core\", \"filetypes/link.svg\")\n};\nwindow._vue_richtext_reference_providers || (window._vue_richtext_reference_providers = C(\"core\", \"reference-provider-list\", []));\nwindow._vue_richtext_reference_provider_timestamps || (window._vue_richtext_reference_provider_timestamps = C(\"core\", \"reference-provider-timestamps\", {}));\nfunction se(t) {\n return t === b ? S : R().find((e) => e.id === t);\n}\nfunction R() {\n return window._vue_richtext_reference_providers.filter((t) => {\n const e = !!t.search_providers_ids && t.search_providers_ids.length > 0 || h(t.id);\n return e || console.debug(\"[smart picker]\", t.id, \"reference provider is discoverable but does not have any related search provider or custom picker component registered\"), e;\n });\n}\nfunction ie(t) {\n const e = window._vue_richtext_reference_provider_timestamps;\n return t.sort((r, s) => r.order === s.order ? 0 : r.order > s.order ? 1 : -1).sort((r, s) => {\n const i = e[r.id], o = e[s.id];\n return i === o ? 0 : o === void 0 ? -1 : i === void 0 ? 1 : i > o ? -1 : 1;\n });\n}\nfunction ne(t, e = null) {\n const r = R(), s = t.replace(/[/\\-\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\"), i = new RegExp(s, \"i\"), l = ie(r).filter((a) => a.title.match(i)), u = e ? l.slice(0, e) : l;\n return (t === \"\" || u.length === 0) && u.push(S), u;\n}\nfunction oe(t) {\n const e = Math.floor(Date.now() / 1e3), r = {\n timestamp: e\n }, s = _(\"references/provider/{providerId}\", { providerId: t });\n p.put(s, r).then((i) => {\n window._vue_richtext_reference_provider_timestamps[t] = e;\n });\n}\nlet y = 0;\nfunction x(t, e) {\n return function() {\n const r = this, s = arguments;\n clearTimeout(y), y = setTimeout(function() {\n t.apply(r, s);\n }, e || 0);\n };\n}\nfunction f(t) {\n try {\n return !!new URL(t);\n } catch {\n return !1;\n }\n}\nconst ce = {\n name: \"LinkVariantIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar le = function() {\n var e = this, r = e._self._c;\n return r(\"span\", e._b({ staticClass: \"material-design-icon link-variant-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(s) {\n return e.$emit(\"click\", s);\n } } }, \"span\", e.$attrs, !1), [r(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [r(\"path\", { attrs: { d: \"M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z\" } }, [e.title ? r(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, ae = [], ue = /* @__PURE__ */ c(\n ce,\n le,\n ae,\n !1,\n null,\n null,\n null,\n null\n);\nconst v = ue.exports;\nconst de = {\n name: \"NcProviderList\",\n components: {\n NcSelect: w,\n NcHighlight: P,\n NcEmptyContent: m,\n LinkVariantIcon: v\n },\n emits: [\n \"select-provider\",\n \"submit\"\n ],\n data() {\n return {\n selectedProvider: null,\n query: \"\",\n multiselectPlaceholder: n(\"Select provider\"),\n providerIconAlt: n(\"Provider icon\")\n };\n },\n computed: {\n options() {\n const t = [];\n return this.query !== \"\" && f(this.query) && t.push({\n id: this.query,\n title: this.query,\n isLink: !0\n }), t.push(...ne(this.query)), t;\n }\n },\n methods: {\n focus() {\n setTimeout(() => {\n var t, e, r;\n (r = (e = (t = this.$refs[\"provider-select\"]) == null ? void 0 : t.$el) == null ? void 0 : e.querySelector(\"#provider-select-input\")) == null || r.focus();\n }, 300);\n },\n onProviderSelected(t) {\n t !== null && (t.isLink ? this.$emit(\"submit\", t.title) : this.$emit(\"select-provider\", t), this.selectedProvider = null);\n },\n onSearch(t, e) {\n this.query = t;\n }\n }\n};\nvar he = function() {\n var e = this, r = e._self._c;\n return r(\"div\", { staticClass: \"provider-list\" }, [r(\"NcSelect\", { ref: \"provider-select\", staticClass: \"provider-list--select\", attrs: { \"input-id\": \"provider-select-input\", label: \"title\", placeholder: e.multiselectPlaceholder, options: e.options, \"append-to-body\": !1, \"clear-search-on-select\": !0, \"clear-search-on-blur\": () => !1, filterable: !1 }, on: { search: e.onSearch, input: e.onProviderSelected }, scopedSlots: e._u([{ key: \"option\", fn: function(s) {\n return [s.isLink ? r(\"div\", { staticClass: \"provider\" }, [r(\"LinkVariantIcon\", { staticClass: \"link-icon\", attrs: { size: 20 } }), r(\"span\", [e._v(e._s(s.title))])], 1) : r(\"div\", { staticClass: \"provider\" }, [r(\"img\", { staticClass: \"provider-icon\", attrs: { src: s.icon_url, alt: e.providerIconAlt } }), r(\"NcHighlight\", { staticClass: \"option-text\", attrs: { search: e.query, text: s.title } })], 1)];\n } }]), model: { value: e.selectedProvider, callback: function(s) {\n e.selectedProvider = s;\n }, expression: \"selectedProvider\" } }), r(\"NcEmptyContent\", { staticClass: \"provider-list--empty-content\", scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [r(\"LinkVariantIcon\")];\n }, proxy: !0 }]) })], 1);\n}, _e = [], pe = /* @__PURE__ */ c(\n de,\n he,\n _e,\n !1,\n null,\n \"9d850ea5\",\n null,\n null\n);\nconst me = pe.exports;\nconst fe = {\n name: \"NcRawLinkInput\",\n components: {\n LinkVariantIcon: v,\n NcEmptyContent: m,\n NcLoadingIcon: N,\n NcReferenceWidget: G,\n NcTextField: E\n },\n props: {\n /**\n * The reference provider\n */\n provider: {\n type: Object,\n required: !0\n }\n },\n emits: [\n \"submit\"\n ],\n data() {\n return {\n inputValue: \"\",\n loading: !1,\n reference: null,\n abortController: null,\n inputPlaceholder: n(\"Enter link\")\n };\n },\n computed: {\n isLinkValid() {\n return f(this.inputValue);\n }\n },\n methods: {\n focus() {\n var t;\n (t = this.$refs[\"url-input\"].$el.getElementsByTagName(\"input\")[0]) == null || t.focus();\n },\n onSubmit(t) {\n const e = t.target.value;\n this.isLinkValid && this.$emit(\"submit\", e);\n },\n onClear() {\n this.inputValue = \"\", this.reference = null;\n },\n onInput() {\n this.reference = null, this.abortController && this.abortController.abort(), this.isLinkValid && x(() => {\n this.updateReference();\n }, 500)();\n },\n updateReference() {\n this.loading = !0, this.abortController = new AbortController(), p.get(_(\"references/resolve\", 2) + \"?reference=\" + encodeURIComponent(this.inputValue), {\n signal: this.abortController.signal\n }).then((t) => {\n this.reference = t.data.ocs.data.references[this.inputValue];\n }).catch((t) => {\n console.error(t);\n }).then(() => {\n this.loading = !1;\n });\n }\n }\n};\nvar ve = function() {\n var e = this, r = e._self._c;\n return r(\"div\", { staticClass: \"raw-link\" }, [r(\"div\", { staticClass: \"input-wrapper\" }, [r(\"NcTextField\", { ref: \"url-input\", attrs: { value: e.inputValue, \"show-trailing-button\": e.inputValue !== \"\", label: e.inputPlaceholder }, on: { \"update:value\": [function(s) {\n e.inputValue = s;\n }, e.onInput], \"trailing-button-click\": e.onClear }, nativeOn: { keyup: function(s) {\n return !s.type.indexOf(\"key\") && e._k(s.keyCode, \"enter\", 13, s.key, \"Enter\") ? null : e.onSubmit.apply(null, arguments);\n } } }, [e.loading ? r(\"NcLoadingIcon\", { attrs: { size: 16 } }) : r(\"LinkVariantIcon\", { attrs: { size: 16 } })], 1)], 1), e.reference !== null ? r(\"NcReferenceWidget\", { staticClass: \"reference-widget\", attrs: { reference: e.reference } }) : r(\"NcEmptyContent\", { staticClass: \"raw-link--empty-content\", scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [e.provider.icon_url ? r(\"img\", { staticClass: \"provider-icon\", attrs: { src: e.provider.icon_url } }) : r(\"LinkVariantIcon\")];\n }, proxy: !0 }]) })], 1);\n}, ge = [], ye = /* @__PURE__ */ c(\n fe,\n ve,\n ge,\n !1,\n null,\n \"d0ba247a\",\n null,\n null\n);\nconst ke = ye.exports;\nconst Ce = {\n name: \"NcSearchResult\",\n components: {\n NcHighlight: P\n },\n props: {\n /**\n * Unified search result entry\n */\n entry: {\n type: Object,\n required: !0\n },\n /**\n * The query that led to getting this result\n * Used to highlight the entry text\n */\n query: {\n type: String,\n required: !0\n }\n }\n};\nvar Pe = function() {\n var e = this, r = e._self._c;\n return r(\"div\", { staticClass: \"result\" }, [e.entry.icon ? r(\"div\", { staticClass: \"result--icon-class\", class: { [e.entry.icon]: !0, rounded: e.entry.rounded } }) : r(\"img\", { staticClass: \"result--image\", class: { rounded: e.entry.rounded }, attrs: { src: e.entry.thumbnailUrl } }), r(\"div\", { staticClass: \"result--content\" }, [r(\"span\", { staticClass: \"result--content--name\" }, [r(\"NcHighlight\", { attrs: { search: e.query, text: e.entry.title } })], 1), r(\"span\", { staticClass: \"result--content--subline\" }, [r(\"NcHighlight\", { attrs: { search: e.query, text: e.entry.subline } })], 1)])]);\n}, we = [], be = /* @__PURE__ */ c(\n Ce,\n Pe,\n we,\n !1,\n null,\n \"7a394a58\",\n null,\n null\n);\nconst Se = be.exports;\nconst k = 5, Re = {\n name: \"NcSearch\",\n components: {\n LinkVariantIcon: v,\n DotsHorizontalIcon: I,\n NcEmptyContent: m,\n NcSelect: w,\n NcSearchResult: Se\n },\n props: {\n /**\n * The selected reference provider\n */\n provider: {\n type: Object,\n required: !0\n },\n showEmptyContent: {\n type: Boolean,\n default: !0\n },\n searchPlaceholder: {\n type: String,\n default: null\n }\n },\n emits: [\n \"submit\"\n ],\n data() {\n return {\n searchQuery: \"\",\n selectedResult: null,\n resultsBySearchProvider: {},\n searching: !1,\n searchingMoreOf: null,\n abortController: null,\n noOptionsText: n(\"Start typing to search\"),\n providerIconAlt: n(\"Provider icon\")\n };\n },\n computed: {\n mySearchPlaceholder() {\n return this.searchPlaceholder || n(\"Search\");\n },\n searchProviderIds() {\n return this.provider.search_providers_ids;\n },\n options() {\n if (this.searchQuery === \"\")\n return [];\n const t = [];\n return f(this.searchQuery) && t.push(this.rawLinkEntry), t.push(...this.formattedSearchResults), t;\n },\n rawLinkEntry() {\n return {\n id: \"rawLinkEntry\",\n resourceUrl: this.searchQuery,\n isRawLink: !0\n };\n },\n formattedSearchResults() {\n const t = [];\n return this.searchProviderIds.forEach((e) => {\n if (this.resultsBySearchProvider[e].entries.length > 0) {\n (this.searchProviderIds.length > 1 || this.resultsBySearchProvider[e].entries.length > 1) && t.push({\n id: \"groupTitle-\" + e,\n name: this.resultsBySearchProvider[e].name,\n isCustomGroupTitle: !0,\n providerId: e\n });\n const r = this.resultsBySearchProvider[e].entries.map((s, i) => ({\n id: \"provider-\" + e + \"-entry-\" + i,\n ...s\n }));\n t.push(...r), this.resultsBySearchProvider[e].isPaginated && t.push({\n id: \"moreOf-\" + e,\n name: this.resultsBySearchProvider[e].name,\n isMore: !0,\n providerId: e,\n isLoading: this.searchingMoreOf === e\n });\n }\n }), t;\n }\n },\n mounted() {\n this.resetResults();\n },\n beforeDestroy() {\n this.cancelSearchRequests();\n },\n methods: {\n t: n,\n resetResults() {\n const t = {};\n this.searchProviderIds.forEach((e) => {\n t[e] = {\n entries: []\n };\n }), this.resultsBySearchProvider = t;\n },\n focus() {\n setTimeout(() => {\n var t, e, r;\n (r = (e = (t = this.$refs[\"search-select\"]) == null ? void 0 : t.$el) == null ? void 0 : e.querySelector(\"#search-select-input\")) == null || r.focus();\n }, 300);\n },\n cancelSearchRequests() {\n this.abortController && this.abortController.abort();\n },\n onSearchInput(t, e) {\n this.searchQuery = t, x(() => {\n this.updateSearch();\n }, 500)();\n },\n onSelectResultSelected(t) {\n t !== null && (t.resourceUrl ? (this.cancelSearchRequests(), this.$emit(\"submit\", t.resourceUrl)) : t.isMore && this.searchMoreOf(t.providerId).then(() => {\n this.selectedResult = null;\n }));\n },\n searchMoreOf(t) {\n return this.searchingMoreOf = t, this.cancelSearchRequests(), this.searchProviders(t);\n },\n updateSearch() {\n if (this.cancelSearchRequests(), this.resetResults(), this.searchQuery === \"\") {\n this.searching = !1;\n return;\n }\n return this.searchProviders();\n },\n searchProviders(t = null) {\n var r, s;\n this.abortController = new AbortController(), this.searching = !0;\n const e = t === null ? [...this.searchProviderIds].map((i) => this.searchOneProvider(i)) : [this.searchOneProvider(t, (s = (r = this.resultsBySearchProvider[t]) == null ? void 0 : r.cursor) != null ? s : null)];\n return Promise.allSettled(e).then((i) => {\n !!i.find((l) => l.status === \"rejected\" && (l.reason.name === \"CanceledError\" || l.reason.code === \"ERR_CANCELED\")) || (this.searching = !1, this.searchingMoreOf = null);\n });\n },\n searchOneProvider(t, e = null) {\n const r = e === null ? _(\"search/providers/{providerId}/search?term={term}&limit={limit}\", { providerId: t, term: this.searchQuery, limit: k }) : _(\"search/providers/{providerId}/search?term={term}&limit={limit}&cursor={cursor}\", { providerId: t, term: this.searchQuery, limit: k, cursor: e });\n return p.get(r, {\n signal: this.abortController.signal\n }).then((s) => {\n const i = s.data.ocs.data;\n this.resultsBySearchProvider[t].name = i.name, this.resultsBySearchProvider[t].cursor = i.cursor, this.resultsBySearchProvider[t].isPaginated = i.isPaginated, this.resultsBySearchProvider[t].entries.push(...i.entries);\n });\n }\n }\n};\nvar xe = function() {\n var e = this, r = e._self._c;\n return r(\"div\", { staticClass: \"smart-picker-search\", class: { \"with-empty-content\": e.showEmptyContent } }, [r(\"NcSelect\", { ref: \"search-select\", staticClass: \"smart-picker-search--select\", attrs: { \"input-id\": \"search-select-input\", label: \"name\", placeholder: e.mySearchPlaceholder, options: e.options, \"append-to-body\": !1, \"close-on-select\": !1, \"clear-search-on-select\": !1, \"clear-search-on-blur\": () => !1, \"reset-focus-on-options-change\": !1, filterable: !1, autoscroll: !0, \"reset-on-options-change\": !1, loading: e.searching }, on: { search: e.onSearchInput, input: e.onSelectResultSelected }, scopedSlots: e._u([{ key: \"option\", fn: function(s) {\n return [s.isRawLink ? r(\"div\", { staticClass: \"custom-option\" }, [r(\"LinkVariantIcon\", { staticClass: \"option-simple-icon\", attrs: { size: 20 } }), r(\"span\", { staticClass: \"option-text\" }, [e._v(\" \" + e._s(e.t(\"Raw link {options}\", { options: s.resourceUrl })) + \" \")])], 1) : s.resourceUrl ? r(\"NcSearchResult\", { staticClass: \"search-result\", attrs: { entry: s, query: e.searchQuery } }) : s.isCustomGroupTitle ? r(\"span\", { staticClass: \"custom-option group-name\" }, [e.provider.icon_url ? r(\"img\", { staticClass: \"provider-icon group-name-icon\", attrs: { src: e.provider.icon_url } }) : e._e(), r(\"span\", { staticClass: \"option-text\" }, [r(\"strong\", [e._v(e._s(s.name))])])]) : s.isMore ? r(\"span\", { class: { \"custom-option\": !0 } }, [s.isLoading ? r(\"span\", { staticClass: \"option-simple-icon icon-loading-small\" }) : r(\"DotsHorizontalIcon\", { staticClass: \"option-simple-icon\", attrs: { size: 20 } }), r(\"span\", { staticClass: \"option-text\" }, [e._v(\" \" + e._s(e.t('Load more \"{options}\"', { options: s.name })) + \" \")])], 1) : e._e()];\n } }, { key: \"no-options\", fn: function() {\n return [e._v(\" \" + e._s(e.noOptionsText) + \" \")];\n }, proxy: !0 }]), model: { value: e.selectedResult, callback: function(s) {\n e.selectedResult = s;\n }, expression: \"selectedResult\" } }), e.showEmptyContent ? r(\"NcEmptyContent\", { staticClass: \"smart-picker-search--empty-content\", scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [e.provider.icon_url ? r(\"img\", { staticClass: \"provider-icon\", attrs: { alt: e.providerIconAlt, src: e.provider.icon_url } }) : r(\"LinkVariantIcon\")];\n }, proxy: !0 }], null, !1, 2922132592) }) : e._e()], 1);\n}, $e = [], Le = /* @__PURE__ */ c(\n Re,\n xe,\n $e,\n !1,\n null,\n \"97d196f0\",\n null,\n null\n);\nconst Ne = Le.exports;\nconst d = {\n providerList: 1,\n standardLinkInput: 2,\n searchInput: 3,\n customElement: 4\n}, Ee = {\n name: \"NcReferencePicker\",\n components: {\n NcCustomPickerElement: re,\n NcProviderList: me,\n NcRawLinkInput: ke,\n NcSearch: Ne\n },\n props: {\n /**\n * Provider to select on creation\n * Default: null. Show the provider list\n */\n initialProvider: {\n type: Object,\n default: () => null\n },\n /**\n * Optional width in pixels\n * Default: 100%\n */\n width: {\n type: Number,\n default: null\n },\n /**\n * Focus on the provider list select input on creation\n * Default: true\n */\n focusOnCreate: {\n type: Boolean,\n default: !0\n }\n },\n emits: [\n \"cancel\",\n \"cancel-raw-link\",\n \"cancel-search\",\n \"provider-selected\",\n \"submit\"\n ],\n data() {\n return {\n MODES: d,\n selectedProvider: this.initialProvider\n };\n },\n computed: {\n mode() {\n return this.selectedProvider === null ? d.providerList : h(this.selectedProvider.id) ? d.customElement : this.selectedProvider.search_providers_ids ? d.searchInput : d.standardLinkInput;\n },\n pickerWrapperStyle() {\n return {\n width: this.width ? this.width + \"px\" : void 0\n };\n }\n },\n mounted() {\n this.focusOnCreate && (this.initialProvider ? setTimeout(() => {\n var t;\n (t = this.$refs[\"url-input\"]) == null || t.focus();\n }, 300) : this.$nextTick(() => {\n var t;\n (t = this.$refs[\"provider-list\"]) == null || t.focus();\n }));\n },\n methods: {\n onEscapePressed() {\n this.selectedProvider !== null ? this.deselectProvider() : this.cancelProviderSelection();\n },\n onProviderSelected(t) {\n this.selectedProvider = t, this.$emit(\"provider-selected\", t), this.$nextTick(() => {\n var e;\n (e = this.$refs[\"url-input\"]) == null || e.focus();\n });\n },\n cancelCustomElement() {\n this.deselectProvider();\n },\n cancelSearch() {\n var t;\n this.$emit(\"cancel-search\", (t = this.selectedProvider) == null ? void 0 : t.title), this.deselectProvider();\n },\n cancelRawLinkInput() {\n var t;\n this.$emit(\"cancel-raw-link\", (t = this.selectedProvider) == null ? void 0 : t.title), this.deselectProvider();\n },\n cancelProviderSelection() {\n this.$emit(\"cancel\");\n },\n submitLink(t) {\n this.selectedProvider !== null && oe(this.selectedProvider.id), this.$emit(\"submit\", t), this.deselectProvider();\n },\n deselectProvider() {\n this.selectedProvider = null, this.$emit(\"provider-selected\", null), setTimeout(() => {\n var t;\n (t = this.$refs[\"provider-list\"]) == null || t.focus();\n }, 300);\n }\n }\n};\nvar Ie = function() {\n var e = this, r = e._self._c;\n return r(\"div\", { staticClass: \"reference-picker\", style: e.pickerWrapperStyle, attrs: { tabindex: \"-1\" }, on: { keydown: function(s) {\n return !s.type.indexOf(\"key\") && e._k(s.keyCode, \"esc\", 27, s.key, [\"Esc\", \"Escape\"]) ? null : (s.stopPropagation(), s.preventDefault(), e.onEscapePressed.apply(null, arguments));\n } } }, [e.mode === e.MODES.providerList ? r(\"NcProviderList\", { ref: \"provider-list\", on: { \"select-provider\": e.onProviderSelected, submit: e.submitLink, cancel: e.cancelProviderSelection } }) : e.mode === e.MODES.standardLinkInput ? r(\"NcRawLinkInput\", { ref: \"url-input\", attrs: { provider: e.selectedProvider }, on: { submit: e.submitLink, cancel: e.cancelRawLinkInput } }) : e.mode === e.MODES.searchInput ? r(\"NcSearch\", { ref: \"url-input\", attrs: { provider: e.selectedProvider }, on: { cancel: e.cancelSearch, submit: e.submitLink } }) : e.mode === e.MODES.customElement ? r(\"div\", { staticClass: \"custom-element-wrapper\" }, [r(\"NcCustomPickerElement\", { attrs: { provider: e.selectedProvider }, on: { submit: e.submitLink, cancel: e.cancelCustomElement } })], 1) : e._e()], 1);\n}, Oe = [], Be = /* @__PURE__ */ c(\n Ee,\n Ie,\n Oe,\n !1,\n null,\n \"aa77d0d3\",\n null,\n null\n);\nconst Me = Be.exports;\nconst Ve = {\n name: \"NcReferencePickerModal\",\n components: {\n NcReferencePicker: Me,\n NcModal: B,\n NcButton: O,\n ArrowLeftIcon: V,\n CloseIcon: W\n },\n props: {\n /**\n * Provider to select on creation\n * Show the provider list if no initial one is provided\n */\n initialProvider: {\n type: Object,\n default: () => null\n },\n /**\n * Focus on the input item on create\n */\n focusOnCreate: {\n type: Boolean,\n default: !0\n },\n /**\n * If true, add the modal content to the Viewer trap elements via the event-bus\n */\n isInsideViewer: {\n type: Boolean,\n default: !1\n }\n },\n emits: [\n \"cancel\",\n \"submit\"\n ],\n data() {\n return {\n show: !0,\n selectedProvider: this.initialProvider,\n backButtonTitle: n(\"Back to provider selection\"),\n closeButtonTitle: n(\"Close\"),\n closeButtonLabel: n(\"Close Smart Picker\")\n };\n },\n computed: {\n isProviderSelected() {\n return this.selectedProvider !== null;\n },\n showBackButton() {\n return this.initialProvider === null && this.isProviderSelected;\n },\n modalSize() {\n var t;\n return this.isProviderSelected && h(this.selectedProvider.id) ? (t = H(this.selectedProvider.id)) != null ? t : \"large\" : \"normal\";\n },\n showModalName() {\n return !this.isProviderSelected || !h(this.selectedProvider.id);\n },\n modalName() {\n return this.isProviderSelected ? this.selectedProvider.title : n(\"Smart Picker\");\n }\n },\n mounted() {\n if (this.isInsideViewer) {\n const t = this.$refs.modal_content;\n M(\"viewer:trapElements:changed\", t);\n }\n },\n methods: {\n onCancel() {\n this.show = !1, this.$emit(\"cancel\");\n },\n onSubmit(t) {\n this.show = !1, this.$emit(\"submit\", t);\n },\n onProviderSelect(t) {\n this.selectedProvider = t, t === null && this.initialProvider !== null && this.onCancel();\n },\n onBackClicked() {\n this.$refs.referencePicker.deselectProvider();\n }\n }\n};\nvar We = function() {\n var e = this, r = e._self._c;\n return e.show ? r(\"NcModal\", { staticClass: \"reference-picker-modal\", attrs: { size: e.modalSize, \"can-close\": !1 }, on: { close: e.onCancel } }, [r(\"div\", { ref: \"modal_content\", staticClass: \"reference-picker-modal--content\" }, [e.showBackButton ? r(\"NcButton\", { staticClass: \"back-button\", attrs: { \"aria-label\": e.backButtonTitle, title: e.backButtonTitle }, on: { click: e.onBackClicked }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [r(\"ArrowLeftIcon\")];\n }, proxy: !0 }], null, !1, 3001860362) }) : e._e(), r(\"NcButton\", { staticClass: \"close-button\", attrs: { \"aria-label\": e.closeButtonLabel, title: e.closeButtonTitle, type: \"tertiary\" }, on: { click: e.onCancel }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [r(\"CloseIcon\")];\n }, proxy: !0 }], null, !1, 2491825086) }), e.showModalName ? r(\"h2\", [e._v(\" \" + e._s(e.modalName) + \" \")]) : e._e(), r(\"NcReferencePicker\", { ref: \"referencePicker\", attrs: { \"initial-provider\": e.initialProvider, \"focus-on-create\": e.focusOnCreate }, on: { \"provider-selected\": e.onProviderSelect, submit: e.onSubmit, cancel: e.onCancel } })], 1)]) : e._e();\n}, qe = [], Te = /* @__PURE__ */ c(\n Ve,\n We,\n qe,\n !1,\n null,\n \"3f1a4ac7\",\n null,\n null\n);\nconst je = Te.exports;\nasync function ot(t = null, e = void 0) {\n return await new Promise((r, s) => {\n var g;\n const i = \"referencePickerModal\", o = document.createElement(\"div\");\n o.id = i, document.body.append(o);\n const l = t === null ? null : (g = se(t)) != null ? g : null, u = q.extend(je), a = new u({\n propsData: {\n initialProvider: l,\n isInsideViewer: e\n }\n }).$mount(o);\n a.$on(\"cancel\", () => {\n a.$destroy(), s(new Error(\"User cancellation\"));\n }), a.$on(\"submit\", ($) => {\n a.$destroy(), r($);\n });\n });\n}\nexport {\n G as N,\n Me as a,\n je as b,\n Ne as c,\n z as d,\n nt as e,\n Z as f,\n J as g,\n h,\n T as i,\n ot as j,\n b as k,\n se as l,\n R as m,\n ne as n,\n j as r,\n ie as s\n};\n","import stripAnsi from 'strip-ansi';\nimport charRegex from 'char-regex';\n\nexport default function stringLength(string, {countAnsiEscapeCodes = false} = {}) {\n\tif (string === '') {\n\t\treturn 0;\n\t}\n\n\tif (!countAnsiEscapeCodes) {\n\t\tstring = stripAnsi(string);\n\t}\n\n\tif (string === '') {\n\t\treturn 0;\n\t}\n\n\treturn string.match(charRegex()).length;\n}\n"],"names":["Array","prototype","find","predicate","this","TypeError","value","list","Object","length","thisArg","arguments","i","call","window","CustomEvent","CustomEvent$1","event","params","bubbles","cancelable","detail","undefined","evt","document","createEvent","initCustomEvent","Event","TributeEvents","constructor","tribute","events","keys","key","bind","element","boundKeydown","keydown","boundKeyup","keyup","boundInput","input","addEventListener","unbind","removeEventListener","instance","shouldDeactivate","isActive","hideMenu","commandEvent","forEach","o","keyCode","callbacks","toLowerCase","inputEvent","click","menu","contains","target","li","preventDefault","stopPropagation","nodeName","parentNode","Error","selectItemAtIndex","getAttribute","current","externalTrigger","setTimeout","updateSelection","allowSpaces","hasTrailingSpace","autocompleteMode","triggerChar","getKeyCode","isNaN","trigger","triggers","charCodeAt","mentionText","collection","menuShowMinLength","showMenuFor","eventKeyPressed","el","info","range","getTriggerInfo","mentionTriggerChar","selectedPath","mentionSelectedPath","selectedOffset","mentionSelectedOffset","e","collectionItem","item","enter","filteredItems","menuSelected","escape","tab","space","spaceSelectsMatch","up","count","selected","setActiveLi","scrollTop","scrollHeight","down","delete","index","lis","querySelectorAll","parseInt","classList","add","selectClass","liClientRect","getBoundingClientRect","menuClientRect","bottom","scrollDistance","top","remove","getFullHeight","elem","includeMargin","height","style","currentStyle","getComputedStyle","parseFloat","marginTop","marginBottom","TributeMenuEvents","menuEvents","menuClickEvent","menuContainerScrollEvent","debounce","windowResizeEvent","positionMenuAtCaret","getDocument","menuContainer","func","wait","immediate","timeout","context","args","callNow","clearTimeout","apply","TributeRange","iframe","contentWindow","scrollTo","coordinates","positionMenu","cssText","isContentEditable","getContentEditableCaretPosition","mentionPosition","getTextAreaOrInputUnderlinePosition","left","right","scrollIntoView","menuDimensions","width","offsetWidth","offsetHeight","menuIsOffScreen","isMenuOffScreen","menuIsOffScreenHorizontally","innerWidth","menuIsOffScreenVertically","innerHeight","menuContainerIsBody","body","selectElement","targetElement","path","offset","childNodes","nextSibling","previousSibling","sel","getWindowSelection","createRange","setStart","setEnd","collapse","removeAllRanges","error","addRange","focus","replaceTriggerText","text","requireLeadingSpace","originalEvent","replaceEvent","replaceTextSuffix","endPos","pasteHtml","myField","textSuffix","startPos","substring","selectionStart","selectionEnd","dispatchEvent","html","anchorNode","deleteContents","createElement","innerHTML","node","lastNode","frag","createDocumentFragment","firstChild","appendChild","insertNode","cloneRange","setStartAfter","getSelection","getNodePositionInParent","getContentEditableSelectedPath","ctx","ce","contentEditable","push","reverse","getRangeAt","startOffset","getTextPrecedingCurrentSelection","selectedElem","workingNodeContent","textContent","selectStartOffset","textComponent","getLastWordInText","wordsArray","replace","split","trim","menuAlreadyActive","isAutocomplete","selectionInfo","effectiveRange","lastWordOfEffectiveRange","mentionSelectedElement","mostRecentTriggerCharPos","config","c","idx","lastIndexWithLeadingSpace","lastIndexOf","test","currentTriggerSnippet","firstSnippetChar","leadingSpace","regex","str","reversedStr","join","cidx","len","firstChar","match","triggerIdx","windowWidth","windowHeight","doc","documentElement","windowLeft","pageXOffset","scrollLeft","clientLeft","windowTop","pageYOffset","clientTop","menuTop","menuRight","menuBottom","menuLeft","Math","floor","ceil","getMenuDimensions","dimensions","position","flipped","isFirefox","mozInnerScreenX","div","id","computed","whiteSpace","wordWrap","visibility","prop","overflowY","overflow","span","rect","offsetTop","borderTopWidth","fontSize","offsetLeft","borderLeftWidth","parentHeight","scrollStillAvailable","removeChild","selectedNodePosition","clientRect","elemTop","elemBottom","maxY","targetY","TributeSearch","search","simpleFilter","pattern","array","filter","string","opts","pre","post","compareString","caseSensitive","skip","rendered","score","patternCache","traverse","render","cache","stringIndex","patternIndex","calculateScore","slice","best","temp","indexOf","pop","indices","arr","reduce","prev","extract","original","sort","a","b","Tribute","values","containerClass","itemClass","selectTemplate","menuItemTemplate","lookup","fillAttr","noMatchTemplate","searchOpts","menuItemLimit","defaultSelectTemplate","defaultMenuItemTemplate","t","console","warn","map","_isActive","val","noMatchEvent","matchItem","inputTypes","attach","jQuery","get","NodeList","HTMLCollection","_attach","hasAttribute","ensureEditable","setAttribute","createMenu","wrapper","ul","className","currentMentionTextSnapshot","tributeMenu","processValues","items","querySelector","fragment","_findLiTarget","movementY","showMenuForCollection","collectionIndex","activeElement","placeCaretAtEnd","insertTextAtCursor","insertAtCaret","selectNodeContents","createTextRange","textRange","moveToElementText","select","textNode","createTextNode","textarea","scrollPos","caretPos","front","back","content","replaceText","_append","newValues","concat","append","appendCurrent","detach","_detach","removeAttribute","y","name","props","title","type","String","required","subline","default","icon","iconUrl","source","status","avatarUrl","getAvatarUrl","haveStatus","n","methods","user","size","C","_self","_c","staticClass","class","backgroundImage","_v","_s","_e","attrs","v","x","exports","T","directives","tooltip","mixins","placeholder","autoComplete","Function","Element","multiline","Boolean","contenteditable","disabled","maxlength","Number","emojiAutocomplete","linkAutocomplete","emits","data","textSmiles","autocompleteOptions","renderComponentHtml","genSelectTemplate","debouncedAutoComplete","emojiOptions","includes","native","short_name","unshift","linkOptions","icon_url","getLink","localValue","isComposing","isEmptyValue","isFF","navigator","userAgent","isOverMaxlength","tooltipString","shown","canEdit","listeners","$listeners","paste","watch","$refs","parseContent","updateContent","mounted","autocompleteTribute","$el","emojiTribute","linkTribute","beforeDestroy","then","getElementById","result","insertText","$emit","s","replaceWith","setCursorAfter","updateValue","catch","debug","setEndAfter","onInput","onPaste","clipboardData","files","startsWith","getData","rangeCount","deleteFromDocument","r","endOffset","renderContent","onDelete","isCollapsed","commonAncestorContainer","nodeType","setEndBefore","anchorOffset","cloneContents","lastChild","onEnter","onCtrlEnter","async","onKeyUp","stopImmediatePropagation","S","_g","rawName","expression","ref","role","on","compositionstart","compositionend","_k","ctrlKey","shiftKey","altKey","metaKey","A","it","_vue_richtext_widgets","_registerWidget","callback","onDestroy","reference","compact","hasCustomWidget","richObjectType","noAccess","accessible","descriptionStyle","display","lineClamp","webkitLineClamp","compactLink","openGraphObject","link","renderWidget","observer","ResizeObserver","contentRect","observe","disconnect","customWidget","$nextTick","richObject","z","F","href","rel","thumb","src","description","U","G","_vue_richtext_custom_picker_elements","h","_registerCustomPickerElement","X","provider","isRegistered","renderResult","renderElement","domElement","providerId","J","Promise","resolve","object","_isVue","$on","onSubmit","onCancel","Y","ee","re","R","_vue_richtext_reference_providers","search_providers_ids","ne","RegExp","l","_vue_richtext_reference_provider_timestamps","order","ie","u","f","URL","fillColor","le","_b","$attrs","fill","viewBox","d","ae","de","components","NcSelect","NcHighlight","NcEmptyContent","LinkVariantIcon","selectedProvider","query","multiselectPlaceholder","providerIconAlt","options","isLink","onProviderSelected","onSearch","he","label","filterable","scopedSlots","_u","fn","alt","model","proxy","me","fe","NcLoadingIcon","NcReferenceWidget","NcTextField","inputValue","loading","abortController","inputPlaceholder","isLinkValid","getElementsByTagName","onClear","abort","updateReference","AbortController","encodeURIComponent","signal","ocs","references","ve","nativeOn","ge","ke","Ce","entry","Pe","rounded","thumbnailUrl","we","Se","Re","DotsHorizontalIcon","NcSearchResult","showEmptyContent","searchPlaceholder","searchQuery","selectedResult","resultsBySearchProvider","searching","searchingMoreOf","noOptionsText","mySearchPlaceholder","searchProviderIds","rawLinkEntry","formattedSearchResults","resourceUrl","isRawLink","entries","isCustomGroupTitle","isPaginated","isMore","isLoading","resetResults","cancelSearchRequests","onSearchInput","updateSearch","onSelectResultSelected","searchMoreOf","searchProviders","searchOneProvider","cursor","allSettled","reason","code","term","limit","xe","autoscroll","$e","Ne","providerList","standardLinkInput","searchInput","customElement","Ee","NcCustomPickerElement","NcProviderList","NcRawLinkInput","NcSearch","initialProvider","focusOnCreate","MODES","mode","pickerWrapperStyle","onEscapePressed","deselectProvider","cancelProviderSelection","cancelCustomElement","cancelSearch","cancelRawLinkInput","submitLink","Date","now","timestamp","put","oe","Ie","tabindex","submit","cancel","Oe","Ve","NcReferencePicker","NcModal","NcButton","ArrowLeftIcon","CloseIcon","isInsideViewer","show","backButtonTitle","closeButtonTitle","closeButtonLabel","isProviderSelected","showBackButton","modalSize","H","showModalName","modalName","modal_content","onProviderSelect","onBackClicked","referencePicker","We","close","qe","je","ot","g","se","extend","propsData","$mount","$destroy","$","stringLength","countAnsiEscapeCodes"],"sourceRoot":""}