react-input-emoji 5.7.0 → 5.7.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/index.es.js +19 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +19 -5
- package/dist/index.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/text-input.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/utils/emoji-utils.js","../src/utils/input-event-utils.js","../src/hooks/use-sanitize.js","../src/hooks/use-expose.js","../src/hooks/use-emit.js","../src/text-input.js","../src/components/emoji-picker-button.js","../node_modules/@emoji-mart/react/dist/module.js","../src/components/emoji-picker.js","../src/components/emoji-picker-container.js","../src/components/emoji-picker-wrapper.js","../src/utils/mention-utils.js","../src/hooks/use-mention.js","../src/components/mention-user-list.js","../src/components/mention-wrapper.js","../src/utils/observer.js","../src/hooks/use-event-listeners.js","../src/hooks/user-pollute.js","../src/index.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/* eslint-disable valid-jsdoc */\n// @ts-check\n\nexport const TRANSPARENT_GIF =\n \"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\";\n\nexport const EMOJI_STYLE = \"\";\n\n/**\n * Replace all text with emoji with an image html tag\n * @param {string} text\n * @return {string}\n */\nexport function replaceAllTextEmojis(text) {\n let allEmojis = getAllEmojisFromText(text);\n\n if (allEmojis) {\n allEmojis = [...new Set(allEmojis)]; // remove duplicates\n\n allEmojis.forEach(emoji => {\n text = replaceAll(text, emoji, getInputEmojiHTML('', emoji));\n });\n }\n\n return text;\n}\n\n/**\n * Replace all occurrencies in a string\n * @param {string} str\n * @param {string} find\n * @param {string} replace\n * @return {string}\n */\nfunction replaceAll(str, find, replace) {\n return str.replace(new RegExp(find, \"g\"), replace);\n}\n\n/**\n * Get all emojis from the text\n * @param {string} text\n * @return {string[]}\n */\nfunction getAllEmojisFromText(text) {\n return text.match(\n /(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*/g\n );\n}\n\n// eslint-disable-next-line valid-jsdoc\n/**\n *\n * @param { import(\"../types/types\").EmojiMartItem } emoji\n * @return {string}\n */\nexport function getImageEmoji(emoji) {\n /** @type {HTMLElement | null} */\n const emojiPickerEl = document.querySelector('em-emoji-picker')\n\n if (!emojiPickerEl) {\n return getInputEmojiNativeHTML(emoji.native)\n }\n\n /** @type {HTMLSpanElement | null=} */\n const emojiSpanEl = emojiPickerEl?.shadowRoot?.querySelector(`[title=\"${emoji.name}\"] > span > span`)\n\n if (!emojiSpanEl) {\n return getInputEmojiNativeHTML(emoji.native)\n }\n\n const style = replaceAll(emojiSpanEl.style.cssText, '\"', \"'\");\n\n return getInputEmojiHTML(style, emoji.native);\n}\n\n// eslint-disable-next-line valid-jsdoc\n/**\n *\n * @param {string} style\n * @param {string} emoji\n * @returns\n */\nfunction getInputEmojiHTML(style, emoji) {\n return `<img style=\"${style}; display: inline-block\" data-emoji=\"${emoji}\" src=\"${TRANSPARENT_GIF}\" />`;\n}\n\n/**\n * \n * @param {string} emoji \n * @returns \n */\nfunction getInputEmojiNativeHTML(emoji) {\n return `<span class=\"width: 18px; height: 18px; display: inline-block; margin: 0 1px;\">${emoji}</span>`;\n}\n\n/**\n *\n * @param {string} html\n * @return {string}\n */\nexport function replaceAllTextEmojiToString(html) {\n const container = document.createElement(\"div\");\n container.innerHTML = html;\n\n const images = Array.prototype.slice.call(container.querySelectorAll(\"img\"));\n\n images.forEach(image => {\n container.innerHTML = container.innerHTML.replace(\n image.outerHTML,\n image.dataset.emoji\n );\n });\n\n return container.innerHTML;\n}\n","// @ts-check\n\nimport {\n getImageEmoji,\n replaceAllTextEmojis,\n replaceAllTextEmojiToString,\n} from \"./emoji-utils\";\n\n/**\n * Handle copy of current selected text\n * @param {React.ClipboardEvent} event\n */\nexport function handleCopy(event) {\n const selectedText = window.getSelection();\n\n if (selectedText === null) {\n return;\n }\n\n let container = document.createElement(\"div\");\n\n for (let i = 0, len = selectedText.rangeCount; i < len; ++i) {\n container.appendChild(selectedText.getRangeAt(i).cloneContents());\n }\n\n container = replaceEmojiToString(container);\n\n event.clipboardData.setData(\"text\", container.innerText);\n event.preventDefault();\n}\n\n/**\n *\n * @param {string} html\n */\nexport function handlePasteHtmlAtCaret(html) {\n let sel;\n let range;\n if (window.getSelection) {\n // IE9 and non-IE\n sel = window.getSelection();\n\n if (sel === null) return;\n\n if (sel.getRangeAt && sel.rangeCount) {\n range = sel.getRangeAt(0);\n range.deleteContents();\n\n // Range.createContextualFragment() would be useful here but is\n // non-standard and not supported in all browsers (IE9, for one)\n const el = document.createElement(\"div\");\n el.innerHTML = html;\n const frag = document.createDocumentFragment();\n let node;\n let 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}\n\n/**\n * Replace emoji img to its string value\n * @param {HTMLDivElement} container\n * @return {HTMLDivElement}\n */\nfunction replaceEmojiToString(container) {\n const images = Array.prototype.slice.call(container.querySelectorAll(\"img\"));\n\n images.forEach((image) => {\n image.outerHTML = image.dataset.emoji;\n });\n\n return container;\n}\n\n/**\n * Handle past on input\n * @param {React.ClipboardEvent} event\n */\nexport function handlePaste(event) {\n event.preventDefault();\n let content;\n if (event.clipboardData) {\n content = event.clipboardData.getData(\"text/plain\");\n content = replaceAllTextEmojis(content);\n document.execCommand(\"insertHTML\", false, content);\n }\n}\n\n/**\n * @typedef {object} HandleKeyDownOptions\n * @property {HTMLDivElement} placeholderEl\n * @property {number} maxLength\n * @property {HTMLDivElement} inputEl\n * @property {React.MutableRefObject<string>} cleanedTextRef\n * @property {React.MutableRefObject<HTMLDivElement>} textInputRef\n * @property {boolean} cleanOnEnter\n * @property {function(): void} emitChange\n * @property {(function(string): void)=} onEnter\n * @property {(function(KeyboardEvent): void)=} onKeyDown\n * @property {(function(string): void)} updateHTML\n */\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * @typedef {Object} HandleSelectEmojiProps\n * @property {import(\"../types/types\").EmojiMartItem} emoji\n * @property {React.MutableRefObject<import('../text-input').Ref>} textInputRef\n * @property {boolean} keepOpened\n * @property {() => void} toggleShowPicker\n * @property {number=} maxLength\n */\n\n/**\n *\n * @param {HandleSelectEmojiProps} props\n */\nexport function handleSelectEmoji({\n emoji,\n textInputRef,\n keepOpened,\n toggleShowPicker,\n maxLength,\n}) {\n if (\n typeof maxLength !== \"undefined\" &&\n totalCharacters(textInputRef.current) >= maxLength\n ) {\n return;\n }\n\n textInputRef.current.appendContent(getImageEmoji(emoji));\n\n if (!keepOpened) {\n toggleShowPicker();\n }\n}\n\n/**\n *\n * @param {{text: string, html: string}} props\n * @return {number}\n */\nexport function totalCharacters({ text, html }) {\n const textCount = text.length;\n const emojisCount = (html.match(/<img/g) || []).length;\n\n return textCount + emojisCount;\n}\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * Handle keyup event\n * @param {() => void} emitChange\n * @param {(event: KeyboardEvent) => void} onKeyDownMention\n * @param {React.MutableRefObject<string>} cleanedTextRef\n * @param {React.MutableRefObject<HTMLDivElement>} textInputRef\n * @return {(event: KeyboardEvent) => void}\n */\nexport function handleKeyup(\n emitChange,\n onKeyDownMention,\n cleanedTextRef,\n textInputRef,\n) {\n return (event) => {\n const text = replaceAllTextEmojiToString(textInputRef.current.innerHTML);\n cleanedTextRef.current = text;\n emitChange();\n onKeyDownMention(event);\n };\n}\n\n/**\n * Handle focus event\n * @param {function(FocusEvent): void} onFocus\n * @return {function(FocusEvent): void}\n */\nexport function handleFocus(onFocus) {\n return (event) => {\n onFocus(event);\n };\n}\n\n/**\n * Set caret to the end of text value\n * @param {React.MutableRefObject<HTMLDivElement| null>} input\n */\nexport function moveCaretToEnd(input) {\n let range;\n let selection;\n if (document.createRange && input.current) {\n range = document.createRange();\n range.selectNodeContents(input.current);\n range.collapse(false);\n selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n}\n/**\n *\n * @param {HTMLDivElement} inputDiv\n * @return {string}\n */\nexport function removeHtmlExceptBr(inputDiv) {\n const temp = inputDiv.innerHTML.replaceAll(/<br\\s*\\/?>/gi, \"[BR]\"); // temporarily replace <br> with placeholder\n const tempContainer = document.createElement(\"div\");\n tempContainer.innerHTML = temp;\n const stripped = tempContainer.innerText; // strip all html tags\n const final = stripped.replaceAll(/\\[BR\\]/gi, \"</br>\"); // replace placeholders with <br>\n return final;\n}\n\n/**\n * \n * @param {*} range \n * @returns \n */\nexport function getSelectionStart(range) {\n let node = range.startContainer;\n let offset = range.startOffset;\n\n // Handle cases where the selection start node is not a text node\n if (node.nodeType !== Node.TEXT_NODE) {\n while (node.nodeType !== Node.TEXT_NODE) {\n node = node.nextSibling;\n if (!node) break;\n }\n if (!node) {\n node = range.commonAncestorContainer;\n while (node.nodeType !== Node.TEXT_NODE) {\n node = node.firstChild;\n }\n }\n offset = 0;\n }\n\n return { node, offset };\n}\n\n/**\n * \n * @return {Object} cursor\n */\nexport function getCursor() {\n const selection = window.getSelection();\n const range = selection.getRangeAt(0);\n const selectionStart = getSelectionStart(range);\n\n return {selection, range, selectionStart}\n}\n\n/**\n *\n */\nexport function addLineBreak() {\n const { selection, range, selectionStart } = getCursor()\n\n // If cursor is at the end of the text content, add one more line break\n if (\n selection.isCollapsed &&\n selectionStart.offset === selectionStart.node.textContent.length\n ) {\n const br = document.createElement(\"br\");\n range.insertNode(br);\n range.setStartAfter(br);\n range.setEndAfter(br);\n selection.removeAllRanges();\n selection.addRange(range);\n\n const br2 = document.createElement(\"br\");\n range.insertNode(br2);\n range.setStartAfter(br2);\n range.setEndAfter(br2);\n selection.removeAllRanges();\n selection.addRange(range);\n } else {\n const br = document.createElement(\"br\");\n range.insertNode(br);\n range.setStartAfter(br);\n range.setEndAfter(br);\n selection.removeAllRanges();\n selection.addRange(range);\n // Set cursor position right before the first letter after the line break\n if (\n selectionStart.node.nextSibling &&\n selectionStart.node.nextSibling.nodeType === Node.TEXT_NODE\n ) {\n range.setStart(selectionStart.node.nextSibling, 1);\n range.setEnd(selectionStart.node.nextSibling, 1);\n }\n selection.removeAllRanges();\n selection.addRange(range);\n }\n}\n","// @ts-check\n\nimport { useCallback, useRef } from \"react\";\nimport { removeHtmlExceptBr } from \"../utils/input-event-utils\";\n\n/**\n * @typedef {import('../types/types').SanitizeFn} SanitizeFn\n */\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * @param {boolean} shouldReturn\n */\nexport function useSanitize(shouldReturn) {\n /** @type {React.MutableRefObject<SanitizeFn[]>} */\n const sanitizeFnsRef = useRef([]);\n\n const sanitizedTextRef = useRef(\"\");\n\n /** @type {(fn: SanitizeFn) => void} */\n const addSanitizeFn = useCallback(fn => {\n sanitizeFnsRef.current.push(fn);\n }, []);\n\n /** @type {(html: string) => string} */\n const sanitize = useCallback(html => {\n let result = sanitizeFnsRef.current.reduce((acc, fn) => {\n return fn(acc);\n }, html);\n\n result = replaceAllHtmlToString(result, shouldReturn);\n\n sanitizedTextRef.current = result;\n\n return result;\n }, []);\n\n return { addSanitizeFn, sanitize, sanitizedTextRef };\n}\n\n/**\n *\n * @param {string} html\n * @param {boolean} shouldReturn\n * @return {string}\n */\nexport function replaceAllHtmlToString(html, shouldReturn) {\n const container = document.createElement(\"div\");\n container.innerHTML = html;\n let text\n if(shouldReturn) {\n text = removeHtmlExceptBr(container)\n } else {\n text = container.innerText || \"\";\n }\n\n // remove all ↵ for safari\n text = text.replace(/\\n/gi, \"\");\n\n return text;\n}\n","// @ts-check\n\nimport { useImperativeHandle } from \"react\";\nimport { useSanitize } from \"./use-sanitize\";\n\n/**\n * @typedef {Object} Props\n * @property {React.Ref<any>} ref\n * @property {React.MutableRefObject<import('../text-input').Ref | null>} textInputRef\n * @property {(value: string) => void} setValue\n * @property {() => void} emitChange\n */\n\n/**\n *\n * @param {Props} props\n */\nexport function useExpose({ ref, textInputRef, setValue, emitChange }) {\n const { sanitize, sanitizedTextRef } = useSanitize(false);\n\n useImperativeHandle(ref, () => ({\n get value() {\n return sanitizedTextRef.current;\n },\n set value(value) {\n setValue(value);\n },\n focus: () => {\n if (textInputRef.current === null) return\n textInputRef.current.focus();\n },\n blur: () => {\n if (textInputRef.current !== null) {\n sanitize(textInputRef.current.html);\n\n }\n\n emitChange();\n }\n }));\n}\n","// @ts-check\n\nimport { useCallback, useEffect, useRef } from \"react\";\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * useEmit\n * @param {React.MutableRefObject<import('../text-input').Ref | null>} textInputRef\n * @param {(size: {width: number, height: number}) => void} onResize\n * @param {(text: string) => void} onChange\n */\nexport function useEmit(textInputRef, onResize, onChange) {\n /** @type {React.MutableRefObject<{width: number; height: number} | null>} */\n const currentSizeRef = useRef(null);\n const onChangeFn = useRef(onChange);\n\n const checkAndEmitResize = useCallback(() => {\n if (textInputRef.current !== null) {\n const currentSize = currentSizeRef.current;\n\n const nextSize = textInputRef.current.size;\n\n if (\n (!currentSize ||\n currentSize.width !== nextSize.width ||\n currentSize.height !== nextSize.height) &&\n typeof onResize === \"function\"\n ) {\n onResize(nextSize);\n }\n\n currentSizeRef.current = nextSize;\n }\n }, [onResize, textInputRef]);\n\n const emitChange = useCallback((sanitizedText) => {\n if (typeof onChangeFn.current === \"function\") {\n onChangeFn.current(sanitizedText);\n }\n\n if (typeof onResize === \"function\") {\n checkAndEmitResize();\n }\n }, [checkAndEmitResize, onResize]);\n\n useEffect(() => {\n if (textInputRef.current) {\n checkAndEmitResize();\n }\n }, [checkAndEmitResize, textInputRef]);\n\n return emitChange;\n}\n","// @ts-check\n// vendors\nimport React, { useImperativeHandle, forwardRef, useRef, useMemo } from \"react\";\nimport { addLineBreak, handlePasteHtmlAtCaret } from \"./utils/input-event-utils\";\nimport { replaceAllTextEmojiToString } from \"./utils/emoji-utils\";\n\n/**\n * @typedef {Object} Props\n * @property {(event: React.KeyboardEvent) => void} onKeyDown\n * @property {(event: React.KeyboardEvent) => void} onKeyUp\n * @property {() => void} onFocus\n * @property {() => void} onBlur\n * @property {(sanitizedText: string) => void=} onChange\n * @property {(event: React.KeyboardEvent) => void} onArrowUp\n * @property {(event: React.KeyboardEvent) => void} onArrowDown\n * @property {(event: React.KeyboardEvent) => void} onEnter\n * @property {boolean} shouldReturn\n * @property {(event: React.ClipboardEvent) => void} onCopy\n * @property {(event: React.ClipboardEvent) => void} onPaste\n * @property {string} placeholder\n * @property {{borderRadius?: number; borderColor?: string; fontSize?: number; fontFamily?: string; background: string; placeholderColor?: string;}} style\n * @property {number} tabIndex\n * @property {string} className\n * @property {(html: string) => void} onChange\n */\n\n/**\n * @typedef {{\n * appendContent: (html: string) => void;\n * html: string;\n * text: string;\n * size: { width: number; height: number;};\n * focus: () => void;\n * }} Ref\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** @type {React.ForwardRefRenderFunction<Ref, Props>} */\nconst TextInput = (\n { placeholder, style, tabIndex, className, onChange, ...props },\n ref\n) => {\n useImperativeHandle(ref, () => ({\n appendContent: html => {\n if (textInputRef.current) {\n textInputRef.current.focus();\n }\n\n handlePasteHtmlAtCaret(html);\n\n if (textInputRef.current) {\n textInputRef.current.focus();\n }\n\n if (textInputRef.current && placeholderRef.current && replaceAllTextEmojiToString(textInputRef.current.innerHTML) === \"\") {\n placeholderRef.current.style.visibility = \"visible\";\n } else if (placeholderRef.current) {\n placeholderRef.current.style.visibility = \"hidden\";\n }\n\n if (textInputRef.current && typeof onChange === 'function') {\n onChange(textInputRef.current.innerHTML);\n }\n },\n set html(value) {\n if (textInputRef.current) {\n textInputRef.current.innerHTML = value;\n }\n \n if (placeholderRef.current) {\n const text = replaceAllTextEmojiToString(value)\n if (text === \"\") {\n placeholderRef.current.style.visibility = \"visible\";\n } else {\n placeholderRef.current.style.visibility = \"hidden\";\n }\n }\n\n if (typeof onChange === 'function' && textInputRef.current) {\n onChange(textInputRef.current.innerHTML);\n }\n },\n get html() {\n if (!textInputRef.current) return ''\n\n return textInputRef.current.innerHTML;\n },\n get text() {\n if (!textInputRef.current) return ''\n\n return textInputRef.current.innerText;\n },\n get size() {\n if (!textInputRef.current) {\n return {\n width: 0,\n height: 0\n }\n }\n\n return {\n width: textInputRef.current.offsetWidth,\n height: textInputRef.current.offsetHeight\n };\n },\n focus() {\n if (!textInputRef.current) return\n\n textInputRef.current.focus();\n }\n }));\n\n /** @type {React.CSSProperties} */\n const placeholderStyle = useMemo(() => {\n const placeholderStyle = {}\n\n if (style.placeholderColor) {\n placeholderStyle.color = style.placeholderColor\n }\n\n return placeholderStyle\n }, [style.placeholderColor])\n\n /** @type {React.MutableRefObject<HTMLDivElement | null>} */\n const placeholderRef = useRef(null);\n /** @type {React.MutableRefObject<HTMLDivElement | null>} */\n const textInputRef = useRef(null);\n\n /**\n *\n * @param {React.KeyboardEvent} event\n */\n function handleKeyDown(event) { \n if (event.key === \"Enter\" && (event.shiftKey === true || event.ctrlKey === true) && props.shouldReturn) {\n event.preventDefault();\n if(textInputRef.current) {\n addLineBreak()\n return;\n }\n } \n if (event.key === \"Enter\") {\n props.onEnter(event);\n } else if (event.key === \"ArrowUp\") {\n props.onArrowUp(event);\n } else if (event.key === \"ArrowDown\") {\n props.onArrowDown(event);\n } else {\n if (event.key.length === 1 && placeholderRef.current) {\n placeholderRef.current.style.visibility = \"hidden\";\n }\n }\n\n props.onKeyDown(event);\n }\n\n /** */\n function handleClick() {\n props.onFocus();\n }\n\n /**\n *\n * @param {React.KeyboardEvent} event\n */\n function handleKeyUp(event) {\n props.onKeyUp(event);\n\n const input = textInputRef.current;\n\n if (placeholderRef.current && input) {\n const text = replaceAllTextEmojiToString(input.innerHTML)\n if (text === \"\") {\n placeholderRef.current.style.visibility = \"visible\";\n } else {\n placeholderRef.current.style.visibility = \"hidden\";\n }\n }\n\n if (typeof onChange === 'function' && textInputRef.current) {\n onChange(textInputRef.current.innerHTML);\n }\n }\n\n return (\n <div className=\"react-input-emoji--container\" style={style}>\n <div className=\"react-input-emoji--wrapper\" onClick={handleClick}>\n <div ref={placeholderRef} className=\"react-input-emoji--placeholder\" style={placeholderStyle}>\n {placeholder}\n </div>\n <div\n ref={textInputRef}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n tabIndex={tabIndex}\n contentEditable\n className={`react-input-emoji--input${className ? ` ${className}` : \"\"\n }`}\n onBlur={props.onBlur}\n onCopy={props.onCopy}\n onPaste={props.onPaste}\n data-testid=\"react-input-emoji--input\"\n />\n </div>\n </div>\n );\n};\n\nconst TextInputWithRef = forwardRef(TextInput);\n\nexport default TextInputWithRef;\n","// vendors\nimport React, { useEffect, useRef, useState } from \"react\";\n\n/**\n * @typedef {object} Props\n * @property {boolean} showPicker\n * @property {(event: React.MouseEvent) => void} toggleShowPicker\n * @property {HTMLDivElement=} buttonElement\n * @property {React.MutableRefObject=} buttonRef\n */\n\n/**\n * Emoji Picker Button Component\n * @param {Props} props\n * @return {JSX.Element}\n */\nfunction EmojiPickerButton({ showPicker, toggleShowPicker, buttonElement, buttonRef }) {\n \n const localButtonRef = useRef(null);\n const [showCustomButtonContent, setShowCustomButtonContent] = useState(false);\n\n useEffect(() => {\n if ((buttonRef?.current?.childNodes?.length ?? 0) > 2) {\n localButtonRef.current.appendChild(buttonRef.current.childNodes[0]);\n setShowCustomButtonContent(true);\n } else if ((buttonElement?.childNodes?.length ?? 0) > 2) {\n localButtonRef.current.appendChild(buttonElement?.childNodes[0]);\n setShowCustomButtonContent(true);\n }\n }, [buttonElement?.childNodes]);\n\n return (\n <button\n ref={localButtonRef}\n type=\"button\"\n className={`react-input-emoji--button${\n showPicker ? \" react-input-emoji--button__show\" : \"\"\n }`}\n onClick={toggleShowPicker}\n >\n {!showCustomButtonContent && (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n className=\"react-input-emoji--button--icon\"\n >\n {/* eslint-disable-next-line max-len */}\n <path d=\"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10\" />\n {/* eslint-disable-next-line max-len */}\n <path d=\"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0\" />\n </svg>\n )}\n </button>\n );\n}\n\nexport default EmojiPickerButton;\n","import $dvPge$react, {useRef as $dvPge$useRef, useEffect as $dvPge$useEffect} from \"react\";\nimport {Picker as $dvPge$Picker} from \"emoji-mart\";\n\n\n\nfunction $e5534fc185f7111e$export$2e2bcd8739ae039(props) {\n const ref = (0, $dvPge$useRef)(null);\n const instance = (0, $dvPge$useRef)(null);\n if (instance.current) instance.current.update(props);\n (0, $dvPge$useEffect)(()=>{\n instance.current = new (0, $dvPge$Picker)({\n ...props,\n ref: ref\n });\n return ()=>{\n instance.current = null;\n };\n }, []);\n return /*#__PURE__*/ (0, $dvPge$react).createElement(\"div\", {\n ref: ref\n });\n}\n\n\nexport {$e5534fc185f7111e$export$2e2bcd8739ae039 as default};\n//# sourceMappingURL=module.js.map\n","// vendors\nimport React, { memo, useEffect, useMemo, useState } from \"react\";\nimport Picker from \"@emoji-mart/react\";\n\nconst EMOJI_MART_DATA_URL = \"https://cdn.jsdelivr.net/npm/@emoji-mart/data\";\nconst cacheI18n = {};\n\n/**\n * @typedef {object} Props\n * @property {'light' | 'dark' | 'auto'} theme\n * @property {function(import(\"../types/types\").EmojiMartItem): void} onSelectEmoji\n * @property {boolean} disableRecent\n * @property {any[]=} customEmojis\n * @property {import('../types/types').Languages=} language\n */\n\n/**\n * Emoji Picker Component\n * @param {Props} props\n */\nfunction EmojiPicker(props) {\n const { theme, onSelectEmoji, disableRecent, customEmojis, language } = props;\n\n /** @type {string[]} */\n const categories = useMemo(() => {\n /** @type {string[]} */\n let categoryies = [];\n\n if (!disableRecent) {\n categoryies.push(\"frequent\");\n }\n\n categoryies = [\n ...categoryies,\n \"people\",\n \"nature\",\n \"foods\",\n \"activity\",\n \"places\",\n \"objects\",\n \"symbols\",\n \"flags\"\n ];\n\n return categoryies;\n }, [disableRecent]);\n\n const [i18n, setI18n] = useState(undefined);\n\n useEffect(() => {\n if (!language) {\n if (cacheI18n.en) {\n setI18n(cacheI18n.en);\n return;\n }\n\n // @ts-ignore\n fetch(`${EMOJI_MART_DATA_URL}/i18n/en.json`)\n .then(async data => {\n const translations = await data.json();\n setI18n(translations);\n cacheI18n.en = translations;\n })\n .catch(error => {\n console.error(\"Failed to load translations:\", error);\n });\n return;\n }\n\n if (cacheI18n[language]) {\n setI18n(cacheI18n[language]);\n return;\n }\n\n // @ts-ignore\n fetch(`${EMOJI_MART_DATA_URL}/i18n/${language}.json`)\n .then(async data => {\n const translations = await data.json();\n setI18n(translations);\n cacheI18n[language] = translations;\n })\n .catch(error => {\n console.error(\"Failed to load translations:\", error);\n });\n }, [language]);\n\n if (!i18n) {\n return null;\n }\n\n return (\n <Picker\n data={undefined}\n theme={theme}\n previewPosition=\"none\"\n onEmojiSelect={onSelectEmoji}\n custom={customEmojis}\n categories={categories}\n set=\"apple\"\n i18n={i18n}\n />\n );\n}\n\n\nexport default memo(EmojiPicker);\n","import React from \"react\";\nimport EmojiPicker from \"./emoji-picker\";\n\n/**\n * @typedef {object} Props\n * @property {boolean} showPicker\n * @property {'light' | 'dark' | 'auto'} theme\n * @property {(emoji: import(\"../types/types\").EmojiMartItem) => void} handleSelectEmoji\n * @property {boolean} disableRecent\n * @property {any[]=} customEmojis\n * @property {('above' | 'below')=} position\n * @property {import('../types/types').Languages=} language\n */\n\n/**\n * Emoji Picker Button Component\n * @param {Props} props\n * @return {JSX.Element}\n */\nfunction EmojiPickerContainer({\n showPicker,\n theme,\n handleSelectEmoji,\n disableRecent,\n customEmojis,\n position,\n language\n}) {\n return (\n <div className=\"react-emoji-picker--container\">\n {showPicker && (\n <div\n className=\"react-emoji-picker--wrapper\"\n onClick={evt => evt.stopPropagation()}\n style={position === 'below' ? {top: '40px'} : {}}\n >\n <div className=\"react-emoji-picker\">\n <EmojiPicker\n theme={theme}\n onSelectEmoji={handleSelectEmoji}\n disableRecent={disableRecent}\n customEmojis={customEmojis}\n language={language}\n />\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport default EmojiPickerContainer;\n","// @ts-check\n// vendors\nimport React, { useEffect, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport {\n getImageEmoji,\n replaceAllTextEmojis,\n replaceAllTextEmojiToString\n} from \"../utils/emoji-utils\";\n\nimport EmojiPickerButton from \"./emoji-picker-button\";\nimport EmojiPickerContainer from \"./emoji-picker-container\";\n\nconst EMOJI_PICKER_CONTAINER_HEIGHT = 435;\n\n/**\n * @typedef {import('../types/types').SanitizeFn} SanitizeFn\n */\n\n/**\n * @typedef {import('../types/types').PolluteFn} PolluteFn\n */\n\n/**\n * @typedef {Object} Props\n * @property {'light' | 'dark' | 'auto'} theme\n * @property {boolean} keepOpened\n * @property {boolean} disableRecent\n * @property {any[]=} customEmojis\n * @property {(fn: SanitizeFn) => void} addSanitizeFn\n * @property {(fn: PolluteFn) => void} addPolluteFn\n * @property {(html: string) => void} appendContent\n * @property {HTMLDivElement=} buttonElement\n * @property {React.MutableRefObject=} buttonRef\n * @property {import('../types/types').Languages=} language\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** @type {React.FC<Props>} */\nconst EmojiPickerWrapper = props => {\n const {\n theme,\n keepOpened,\n disableRecent,\n customEmojis,\n addSanitizeFn,\n addPolluteFn,\n appendContent,\n buttonElement,\n buttonRef,\n language\n } = props;\n\n const [showPicker, setShowPicker] = useState(false);\n /** @type {[HTMLDivElement | undefined, React.Dispatch<React.SetStateAction<HTMLDivElement | undefined>>]} */\n const [customButton, setCustomButton] = useState();\n /** @type {['above' | 'below' | undefined, React.Dispatch<React.SetStateAction<'above' | 'below' | undefined>>]} */\n const [emojiPickerPosition, setEmojiPickerPosition] = useState()\n\n useEffect(() => {\n addSanitizeFn(replaceAllTextEmojiToString);\n }, [addSanitizeFn]);\n\n useEffect(() => {\n addPolluteFn(replaceAllTextEmojis);\n }, [addPolluteFn]);\n\n useEffect(() => {\n /**\n *\n * @param {MouseEvent} event\n */\n function checkClickOutside(event) {\n /** @type {HTMLElement} */\n // @ts-ignore\n const element = event.target;\n\n if (\n element.classList.contains(\"react-input-emoji--button\") ||\n element.classList.contains(\"react-input-emoji--button--icon\")\n ) {\n return;\n }\n\n setShowPicker(false);\n }\n\n document.addEventListener(\"click\", checkClickOutside);\n\n return () => {\n document.removeEventListener(\"click\", checkClickOutside);\n };\n }, []);\n\n /**\n *\n * @param {React.MouseEvent} event\n */\n function toggleShowPicker(event) {\n event.stopPropagation();\n event.preventDefault();\n\n setEmojiPickerPosition(calcTopPosition(event))\n\n setShowPicker(currentShowPicker => !currentShowPicker);\n }\n\n /**\n * \n * @param {React.MouseEvent} event\n * @return {'above' | 'below'}\n */\n function calcTopPosition(event) {\n const btn = event.currentTarget\n const btnRect = btn.getBoundingClientRect();\n\n const popoverHeight = EMOJI_PICKER_CONTAINER_HEIGHT;\n\n // Decide to display above or below based on available space\n if (btnRect.top >= popoverHeight) {\n // Display above\n return 'above'\n } else {\n // Display below\n return 'below'\n }\n }\n\n // eslint-disable-next-line valid-jsdoc\n /**\n *\n * @param {import(\"../types/types\").EmojiMartItem} emoji\n */\n function handleSelectEmoji(emoji) {\n appendContent(getImageEmoji(emoji));\n\n if (!keepOpened) {\n setShowPicker(currentShowPicker => !currentShowPicker);\n }\n }\n\n useEffect(() => {\n if (buttonRef?.current?.style) {\n buttonRef.current.style.position = \"relative\";\n setCustomButton(buttonRef.current);\n } else if (buttonElement?.style) {\n buttonElement.style.position = \"relative\";\n setCustomButton(buttonElement);\n }\n }, [buttonRef, buttonElement]);\n\n return customButton ? (\n (ReactDOM.createPortal(\n <>\n <EmojiPickerContainer\n showPicker={showPicker}\n theme={theme}\n handleSelectEmoji={handleSelectEmoji}\n disableRecent={disableRecent}\n customEmojis={customEmojis}\n position={emojiPickerPosition}\n language={language}\n />\n <EmojiPickerButton\n showPicker={showPicker}\n toggleShowPicker={toggleShowPicker}\n buttonElement={customButton}\n buttonRef={buttonRef}\n />\n </>,\n customButton\n ))\n ) : (\n (<>\n <EmojiPickerContainer\n showPicker={showPicker}\n theme={theme}\n handleSelectEmoji={handleSelectEmoji}\n disableRecent={disableRecent}\n customEmojis={customEmojis}\n position={emojiPickerPosition}\n language={language}\n />\n <EmojiPickerButton\n showPicker={showPicker}\n toggleShowPicker={toggleShowPicker}\n />\n </>)\n );\n};\n\nexport default EmojiPickerWrapper;\n","// @ts-check\n\n/**\n *\n * @return {string | null}\n */\nexport function getTextFromAtToCaret() {\n const range = getRangeFromAtToCaret();\n\n if (!range) return null;\n\n const text = range.text.substring(range.begin, range.end);\n\n return text || null;\n}\n\n// eslint-disable-next-line valid-jsdoc\n/** */\nexport function deleteTextFromAtToCaret() {\n const range = getRangeFromAtToCaret();\n\n if (!range) return;\n\n // @ts-ignore\n range.element.deleteData(range.begin, range.end - range.begin);\n}\n\n/**\n *\n * @return {{begin: number, end: number, text: string, element: Node} | null}\n */\nfunction getRangeFromAtToCaret() {\n const elementWithFocus = getElementWithFocus();\n\n if (!elementWithFocus) {\n return null;\n }\n\n const { element, caretOffset } = elementWithFocus;\n const text = element.textContent;\n const lastAt = text.lastIndexOf(\"@\");\n\n if (\n lastAt === -1 ||\n lastAt >= caretOffset ||\n (lastAt !== 0 && text[lastAt - 1] !== \" \")\n ) {\n return null;\n }\n\n return { begin: lastAt, end: caretOffset, text, element };\n}\n\n/**\n *\n * @return {{element: Node, caretOffset: number}}\n */\nexport function getElementWithFocus() {\n const element = getSelectionStart();\n\n if (element === null) {\n return null;\n }\n\n let caretOffset = 0;\n if (typeof window.getSelection != \"undefined\") {\n const range = window.getSelection().getRangeAt(0);\n const preCaretRange = range.cloneRange();\n preCaretRange.selectNodeContents(element);\n preCaretRange.setEnd(range.endContainer, range.endOffset);\n caretOffset = preCaretRange.toString().length;\n } else if (\n // @ts-ignore\n typeof document.selection != \"undefined\" &&\n // @ts-ignore\n document.selection.type != \"Control\"\n ) {\n // @ts-ignore\n const textRange = document.selection.createRange();\n // @ts-ignore\n const preCaretTextRange = document.body.createTextRange();\n preCaretTextRange.moveToElementText(element);\n preCaretTextRange.setEndPoint(\"EndToEnd\", textRange);\n caretOffset = preCaretTextRange.text.length;\n }\n\n return { element, caretOffset };\n}\n\n/**\n *\n * @return {Node | null}\n */\nfunction getSelectionStart() {\n const node = document.getSelection().anchorNode;\n return node?.nodeType == 3 ? node : null;\n}\n","// @ts-check\nimport { useCallback, useState } from \"react\";\nimport {\n deleteTextFromAtToCaret,\n getElementWithFocus,\n getTextFromAtToCaret\n} from \"../utils/mention-utils\";\n\n/**\n * @typedef {import('../types/types').MentionUser} MentionUser\n */\n\n// eslint-disable-next-line valid-jsdoc\n/**\n *\n * @param {(text: string) => Promise<MentionUser[]>=} searchMention\n * @returns {{mentionSearchText: string | null, mentionUsers: MentionUser[], onKeyUp: (event: React.KeyboardEvent) => void, onFocus: () => void, onSelectUser: () => void, loading: boolean}}\n */\nexport function useMention(searchMention) {\n const [loading, setLoading] = useState(false);\n\n /** @type {[MentionUser[], React.Dispatch<React.SetStateAction<MentionUser[]>>]} */\n const [mentionUsers, setMentionUsers] = useState([]);\n\n /** @type {[string | null, React.Dispatch<React.SetStateAction<string | null>>]} */\n const [mentionSearchText, setMentionSearchText] = useState(null);\n\n const onSelectUser = useCallback(() => {\n deleteTextFromAtToCaret();\n setMentionUsers([]);\n }, []);\n\n /** */\n const checkMentionText = useCallback(async () => {\n const metionText = getTextFromAtToCaret();\n\n setMentionSearchText(metionText);\n\n if (metionText === null) {\n setMentionUsers([]);\n } else {\n setLoading(true);\n const users = await searchMention(metionText);\n setLoading(false);\n setMentionUsers(users);\n }\n }, [searchMention]);\n\n /** @type {(event: React.KeyboardEvent) => void} */\n const onKeyUp = useCallback(\n async event => {\n if (typeof searchMention !== \"function\") return;\n\n if (\n event.key === \"Backspace\" &&\n getElementWithFocus()?.element.parentElement.hasAttribute(\n \"data-mention-id\"\n )\n ) {\n const elementWithFocus = getElementWithFocus();\n elementWithFocus.element.parentElement.remove();\n } else if (\n ![\"ArrowUp\", \"ArrowDown\", \"Esc\", \"Escape\"].includes(event.key)\n ) {\n checkMentionText();\n }\n },\n [checkMentionText, searchMention]\n );\n\n const onFocus = useCallback(() => {\n checkMentionText();\n }, [checkMentionText]);\n\n return {\n mentionSearchText,\n mentionUsers,\n onKeyUp,\n onFocus,\n onSelectUser,\n loading\n };\n}\n","// @ts-check\n// vendors\nimport React, {\n useImperativeHandle,\n useState,\n forwardRef,\n useMemo,\n useEffect\n} from \"react\";\n\n/**\n * @typedef {import('../types/types').MentionUser} MentionUser\n */\n\n/**\n * @typedef {import('../types/types').TextInputListeners} TextInputListeners\n */\n\n/**\n * @typedef {Object} Props\n * @property {MentionUser[]} users\n * @property {string | null} mentionSearchText\n * @property {(user: MentionUser) => void} onSelect\n * @property {(event: keyof TextInputListeners, fn: import('../types/types').Listerner<any>) => () => void} addEventListener\n */\n\n/**\n * @typedef {{prevUser: () => void; nextUser: () => void;}} Ref\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** @type {React.ForwardRefRenderFunction<Ref, Props>} */\nconst MentionUserList = (\n { users, mentionSearchText, onSelect, addEventListener },\n ref\n) => {\n const [selectedUser, setSelectedUser] = useState(0);\n\n useImperativeHandle(ref, () => ({\n prevUser: () => {\n setSelectedUser(currentSelectedUser => {\n if (currentSelectedUser === 0) {\n return 0;\n }\n\n return currentSelectedUser - 1;\n });\n },\n nextUser: () => {\n setSelectedUser(currentSelectedUser => {\n if (currentSelectedUser === users.length - 1) {\n return users.length - 1;\n }\n\n return currentSelectedUser + 1;\n });\n }\n }));\n\n useEffect(() => {\n setSelectedUser(0);\n }, [users]);\n\n /**\n *\n * @param {string} selectedText\n * @param {string} rest\n * @return {string}\n */\n function getMentionSelectedNameEl(selectedText, rest) {\n return `<span class=\"react-input-emoji--mention--item--name__selected\" data-testid=\"metion-selected-word\">${selectedText}</span>${rest}`;\n }\n\n /** @type {(MentionUser & {nameHtml: string})[]} */\n const usersFiltered = useMemo(() => {\n const searchText = mentionSearchText\n ? mentionSearchText.substring(1).toLocaleLowerCase()\n : \"\";\n return users.map(user => {\n let nameHtml = user.name;\n\n if (mentionSearchText && mentionSearchText.length > 1) {\n if (user.name.toLowerCase().startsWith(searchText)) {\n nameHtml = getMentionSelectedNameEl(\n user.name.substring(0, searchText.length),\n user.name.substring(searchText.length)\n );\n } else {\n const names = user.name.split(\" \");\n\n nameHtml = names\n .map(name => {\n if (name.toLocaleLowerCase().startsWith(searchText)) {\n return getMentionSelectedNameEl(\n name.substring(0, searchText.length),\n name.substring(searchText.length)\n );\n }\n return name;\n })\n .join(\" \");\n }\n }\n\n return {\n ...user,\n nameHtml\n };\n });\n }, [mentionSearchText, users]);\n\n // eslint-disable-next-line valid-jsdoc\n /**\n *\n * @param {MentionUser} user\n * @returns {(event: React.MouseEvent) => void} event\n */\n function handleClick(user) {\n return event => {\n event.stopPropagation();\n event.preventDefault();\n\n onSelect(user);\n };\n }\n\n useEffect(() => {\n const unsubscribe = addEventListener(\"enter\", event => {\n event.stopPropagation();\n event.preventDefault();\n onSelect(usersFiltered[selectedUser]);\n });\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onSelect, selectedUser, usersFiltered]);\n\n return (\n <ul\n className=\"react-input-emoji--mention--list\"\n data-testid=\"mention-user-list\"\n >\n {usersFiltered.map((user, index) => (\n <li key={user.id}>\n <button\n type=\"button\"\n onClick={handleClick(user)}\n className={`react-input-emoji--mention--item${\n selectedUser === index\n ? \" react-input-emoji--mention--item__selected\"\n : \"\"\n }`}\n onMouseOver={() => setSelectedUser(index)}\n >\n <img\n className=\"react-input-emoji--mention--item--img\"\n src={user.image}\n />\n <div\n className=\"react-input-emoji--mention--item--name\"\n dangerouslySetInnerHTML={{ __html: user.nameHtml }}\n />\n </button>\n </li>\n ))}\n </ul>\n );\n};\n\nconst MentionUserListWithRef = forwardRef(MentionUserList);\n\nexport default MentionUserListWithRef;\n","// @ts-check\n// vendors\nimport React, { useEffect, useRef, useState } from \"react\";\n\n// hooks\nimport { useMention } from \"../hooks/use-mention\";\n\n// components\nimport MentionUserList from \"./mention-user-list\";\n\n/**\n * @typedef {import('../types/types').MentionUser} MetionUser\n */\n\n/**\n * @typedef {import('../types/types').TextInputListeners} TextInputListeners\n */\n\n/**\n * @typedef {import('../types/types').SanitizeFn} SanitizeFn\n */\n\n/**\n * @typedef {Object} Props\n * @property {(text: string) => Promise<MetionUser[]>=} searchMention\n * @property {(event: keyof TextInputListeners, fn: import('../types/types').Listerner<any>) => () => void} addEventListener\n * @property {(html: string) => void} appendContent\n * @property {(fn: SanitizeFn) => void} addSanitizeFn\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** @type {React.FC<Props>} */\nconst MentionWrapper = ({\n searchMention,\n addEventListener,\n appendContent,\n addSanitizeFn\n}) => {\n /** @type {React.MutableRefObject<import('./mention-user-list').Ref | null>} */\n const metionUserListRef = useRef(null);\n const [showUserList, setShowUserList] = useState(false);\n\n const {\n mentionSearchText,\n mentionUsers,\n loading,\n onKeyUp,\n onFocus,\n onSelectUser\n } = useMention(searchMention);\n\n useEffect(() => {\n addSanitizeFn(html => {\n const container = document.createElement(\"div\");\n container.innerHTML = html;\n\n const mentionsEl = Array.prototype.slice.call(\n container.querySelectorAll(\".react-input-emoji--mention--text\")\n );\n\n mentionsEl.forEach(mentionEl => {\n container.innerHTML = container.innerHTML.replace(\n mentionEl.outerHTML,\n `@[${mentionEl.dataset.mentionName}](userId:${mentionEl.dataset.mentionId})`\n );\n });\n\n return container.innerHTML;\n });\n }, [addSanitizeFn]);\n\n useEffect(() => {\n setShowUserList(mentionUsers.length > 0);\n }, [mentionUsers]);\n\n useEffect(() => {\n /** */\n function checkClickOutside() {\n setShowUserList(false);\n }\n\n document.addEventListener(\"click\", checkClickOutside);\n\n return () => {\n document.removeEventListener(\"click\", checkClickOutside);\n };\n }, []);\n\n useEffect(() => {\n const unsubscribe = addEventListener(\"keyUp\", onKeyUp);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onKeyUp]);\n\n useEffect(() => {\n /**\n *\n * @param {React.KeyboardEvent} event\n */\n function handleKeyDown(event) {\n switch (event.key) {\n case \"Esc\": // IE/Edge specific value\n case \"Escape\":\n setShowUserList(false);\n break;\n default:\n break;\n }\n }\n\n const unsubscribe = addEventListener(\"keyDown\", handleKeyDown);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener]);\n\n useEffect(() => {\n const unsubscribe = addEventListener(\"focus\", onFocus);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onFocus]);\n\n useEffect(() => {\n if (showUserList) {\n const unsubscribeArrowUp = addEventListener(\"arrowUp\", event => {\n event.stopPropagation();\n event.preventDefault();\n metionUserListRef.current.prevUser();\n });\n\n const unsubscribeArrowDown = addEventListener(\"arrowDown\", event => {\n event.stopPropagation();\n event.preventDefault();\n metionUserListRef.current.nextUser();\n });\n\n return () => {\n unsubscribeArrowUp();\n unsubscribeArrowDown();\n };\n }\n }, [addEventListener, showUserList]);\n\n /**\n *\n * @param {MetionUser} user\n */\n function handleSelect(user) {\n onSelectUser();\n appendContent(\n `<span class=\"react-input-emoji--mention--text\" data-mention-id=\"${user.id}\" data-mention-name=\"${user.name}\">@${user.name}</span> `\n );\n }\n\n return (\n <>\n {loading ? (\n <div className=\"react-input-emoji--mention--container\">\n <div className=\"react-input-emoji--mention--loading\">\n <div className=\"react-input-emoji--mention--loading--spinner\">\n Loading...\n </div>\n </div>\n </div>\n ) : (\n showUserList && (\n <div\n className=\"react-input-emoji--mention--container\"\n onClick={evt => evt.stopPropagation()}\n >\n <MentionUserList\n ref={metionUserListRef}\n mentionSearchText={mentionSearchText}\n users={mentionUsers}\n onSelect={handleSelect}\n addEventListener={addEventListener}\n />\n </div>\n )\n )}\n </>\n );\n};\n\nexport default MentionWrapper;\n","// @ts-check\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * @template T\n * @returns {import('../types/types').ListenerObj<T>}\n */\nexport function createObserver() {\n /** @type {import('../types/types').Listerner<T>[]} */\n let listeners = [];\n\n return {\n subscribe: listener => {\n listeners.push(listener);\n return () => {\n listeners = listeners.filter(l => l !== listener);\n };\n },\n publish: event => {\n listeners.forEach(listener => listener(event));\n },\n get currentListerners() {\n return listeners;\n }\n };\n}\n","// @ts-check\n\nimport { useCallback, useMemo } from \"react\";\nimport { createObserver } from \"../utils/observer\";\n\n/**\n * @typedef {import('../types/types').TextInputListeners} TextInputListeners\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** */\nexport function useEventListeners() {\n /** @type {TextInputListeners} */\n const listeners = useMemo(\n () => ({\n keyDown: createObserver(),\n keyUp: createObserver(),\n arrowUp: createObserver(),\n arrowDown: createObserver(),\n enter: createObserver(),\n focus: createObserver(),\n blur: createObserver()\n }),\n []\n );\n\n /**\n * @template {keyof TextInputListeners} T, K\n * @type {(event: keyof TextInputListeners, fn: import('../types/types').Listerner<any>) => () => void}\n */\n const addEventListener = useCallback(\n (event, fn) => {\n return listeners[event].subscribe(fn);\n },\n [listeners]\n );\n\n return { addEventListener, listeners };\n}\n","// @ts-check\n\nimport { useCallback, useRef } from \"react\";\n\n/**\n * @typedef {import('../types/types').PolluteFn} PolluteFn\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** */\nexport function usePollute() {\n /** @type {React.MutableRefObject<PolluteFn[]>} */\n const polluteFnsRef = useRef([]);\n\n /** @type {(fn: PolluteFn) => void} */\n const addPolluteFn = useCallback(fn => {\n polluteFnsRef.current.push(fn);\n }, []);\n\n /** @type {(html: string) => string} */\n const pollute = useCallback(text => {\n const result = polluteFnsRef.current.reduce((acc, fn) => {\n return fn(acc);\n }, text);\n\n return result;\n }, []);\n\n return { addPolluteFn, pollute };\n}\n","// @ts-check\n// vendors\nimport React, { useEffect, useRef, forwardRef, useCallback } from \"react\";\n\n// css\nimport \"./styles.css\";\n\n// utils\nimport { replaceAllTextEmojis } from \"./utils/emoji-utils\";\nimport { handleCopy, totalCharacters } from \"./utils/input-event-utils\";\n\n// hooks\nimport { useExpose } from \"./hooks/use-expose\";\nimport { useEmit } from \"./hooks/use-emit\";\n\n// components\nimport TextInput from \"./text-input\";\nimport EmojiPickerWrapper from \"./components/emoji-picker-wrapper\";\nimport MentionWrapper from \"./components/mention-wrapper\";\nimport { useEventListeners } from \"./hooks/use-event-listeners\";\nimport { useSanitize } from \"./hooks/use-sanitize\";\nimport { usePollute } from \"./hooks/user-pollute\";\n\n/**\n * @typedef {import('./types/types').MentionUser} MetionUser\n */\n\n/**\n * @typedef {import('./types/types').ListenerObj<any>} ListenerObj\n */\n\n/**\n * @typedef {object} Props\n * @property {string} value\n * @property {(value: string) => void} onChange\n * @property {\"light\" | \"dark\" | \"auto\"=} theme\n * @property {boolean=} cleanOnEnter\n * @property {(text: string) => void=} onEnter\n * @property {string=} placeholder\n * @property {string=} placeholderColor\n * @property {(size: {width: number, height: number}) => void=} onResize\n * @property {() => void=} onClick\n * @property {() => void=} onFocus\n * @property {() => void=} onBlur\n * @property {boolean=} shouldReturn\n * @property {number=} maxLength\n * @property {boolean=} keepOpened\n * @property {(event: KeyboardEvent) => void=} onKeyDown\n * @property {string=} inputClass\n * @property {boolean=} disableRecent\n * @property {number=} tabIndex\n * @property {number=} height\n * @property {number=} borderRadius\n * @property {string=} borderColor\n * @property {number=} fontSize\n * @property {string=} fontFamily\n * @property {string=} background\n * @property {{id: string; name: string; emojis: {id: string; name: string; keywords: string[], skins: {src: string}[]}}[]=} customEmojis\n * @property {import('./types/types').Languages=} language\n * @property {(text: string) => Promise<MetionUser[]>=} searchMention\n * @property {HTMLDivElement=} buttonElement\n * @property {React.MutableRefObject=} buttonRef\n */\n\n/**\n * Input Emoji Component\n * @param {Props} props\n * @param {React.Ref<any>} ref\n * @return {JSX.Element}\n */\nfunction InputEmoji(props, ref) {\n const {\n onChange,\n onEnter,\n shouldReturn,\n onResize,\n onClick,\n onFocus,\n onBlur,\n onKeyDown,\n theme,\n cleanOnEnter,\n placeholder,\n maxLength,\n keepOpened,\n inputClass,\n disableRecent,\n tabIndex,\n value,\n customEmojis,\n language,\n searchMention,\n buttonElement,\n buttonRef,\n // style\n borderRadius,\n borderColor,\n fontSize,\n fontFamily,\n background,\n placeholderColor,\n } = props;\n\n /** @type {React.MutableRefObject<import('./text-input').Ref | null>} */\n const textInputRef = useRef(null);\n\n const { addEventListener, listeners } = useEventListeners();\n\n const { addSanitizeFn, sanitize, sanitizedTextRef } = useSanitize(props.shouldReturn);\n\n const { addPolluteFn, pollute } = usePollute();\n\n const updateHTML = useCallback(\n (nextValue = \"\") => {\n if (textInputRef.current === null) return;\n\n textInputRef.current.html = replaceAllTextEmojis(nextValue);\n sanitizedTextRef.current = nextValue;\n },\n [sanitizedTextRef]\n );\n\n const setValue = useCallback(\n /**\n * \n * @param {string} value\n */\n (value) => {\n updateHTML(value);\n },\n [updateHTML]\n );\n\n const emitChange = useEmit(textInputRef, onResize, onChange);\n\n useExpose({\n ref,\n setValue,\n textInputRef,\n emitChange\n });\n\n useEffect(() => {\n if (sanitizedTextRef.current !== value) {\n setValue(value);\n }\n }, [sanitizedTextRef, setValue, value]);\n\n // useEffect(() => {\n // updateHTML();\n // }, [updateHTML]);\n\n useEffect(() => {\n /**\n * Handle keydown event\n * @param {React.KeyboardEvent} event\n * @return {boolean}\n */\n function handleKeydown(event) {\n if (\n typeof maxLength !== \"undefined\" &&\n event.key !== \"Backspace\" &&\n textInputRef.current !== null &&\n totalCharacters(textInputRef.current) >= maxLength\n ) {\n event.preventDefault();\n }\n\n if (event.key === \"Enter\" && textInputRef.current) {\n event.preventDefault();\n\n const text = sanitize(textInputRef.current.html);\n\n emitChange(sanitizedTextRef.current);\n\n if (\n typeof onEnter === \"function\" &&\n listeners.enter.currentListerners.length === 0\n ) {\n onEnter(text);\n }\n\n if (cleanOnEnter && listeners.enter.currentListerners.length === 0) {\n updateHTML(\"\");\n }\n\n if (typeof onKeyDown === \"function\") {\n onKeyDown(event.nativeEvent);\n }\n\n return false;\n }\n\n if (typeof onKeyDown === \"function\") {\n onKeyDown(event.nativeEvent);\n }\n\n return true;\n }\n\n const unsubscribe = addEventListener(\"keyDown\", handleKeydown);\n\n return () => {\n unsubscribe();\n };\n }, [\n addEventListener,\n cleanOnEnter,\n emitChange,\n listeners.enter.currentListerners.length,\n maxLength,\n onEnter,\n onKeyDown,\n sanitize,\n sanitizedTextRef,\n updateHTML\n ]);\n\n useEffect(() => {\n /** */\n function handleFocus() {\n if (typeof onClick === \"function\") {\n onClick();\n }\n\n if (typeof onFocus === \"function\") {\n onFocus();\n }\n }\n\n const unsubscribe = addEventListener(\"focus\", handleFocus);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onClick, onFocus]);\n\n useEffect(() => {\n /** */\n function handleBlur() {\n if (typeof onBlur === \"function\") {\n onBlur();\n }\n }\n\n const unsubscribe = addEventListener(\"blur\", handleBlur);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onBlur]);\n\n /**\n *\n * @param {string} html\n */\n function handleTextInputChange(html) {\n sanitize(html);\n\n if (value !== sanitizedTextRef.current) {\n emitChange(sanitizedTextRef.current);\n }\n }\n\n /**\n *\n * @param {string} html\n */\n function appendContent(html) {\n if (\n typeof maxLength !== \"undefined\" &&\n textInputRef.current !== null &&\n totalCharacters(textInputRef.current) >= maxLength\n ) {\n return;\n }\n\n if (textInputRef.current !== null) {\n textInputRef.current.appendContent(html);\n }\n }\n\n /**\n * Handle past on input\n * @param {React.ClipboardEvent} event\n */\n function handlePaste(event) {\n event.preventDefault();\n let content;\n if (event.clipboardData) {\n content = event.clipboardData.getData(\"text/plain\");\n content = pollute(content);\n document.execCommand(\"insertHTML\", false, content);\n }\n }\n\n return (\n <div className=\"react-emoji\">\n <MentionWrapper\n searchMention={searchMention}\n addEventListener={addEventListener}\n appendContent={appendContent}\n addSanitizeFn={addSanitizeFn}\n />\n <TextInput\n ref={textInputRef}\n onCopy={handleCopy}\n onPaste={handlePaste}\n shouldReturn={shouldReturn}\n onBlur={listeners.blur.publish}\n onFocus={listeners.focus.publish}\n onArrowUp={listeners.arrowUp.publish}\n onArrowDown={listeners.arrowDown.publish}\n onKeyUp={listeners.keyUp.publish}\n onKeyDown={listeners.keyDown.publish}\n onEnter={listeners.enter.publish}\n placeholder={placeholder}\n style={{\n borderRadius,\n borderColor,\n fontSize,\n fontFamily,\n background,\n placeholderColor\n }}\n tabIndex={tabIndex}\n className={inputClass}\n onChange={handleTextInputChange}\n />\n <EmojiPickerWrapper\n theme={theme}\n keepOpened={keepOpened}\n disableRecent={disableRecent}\n customEmojis={customEmojis}\n addSanitizeFn={addSanitizeFn}\n addPolluteFn={addPolluteFn}\n appendContent={appendContent}\n buttonElement={buttonElement}\n buttonRef={buttonRef}\n language={language}\n />\n </div>\n );\n}\n\nconst InputEmojiWithRef = forwardRef(InputEmoji);\n\nInputEmojiWithRef.defaultProps = {\n theme: /** @type {const} */ (\"auto\"),\n height: 30,\n placeholder: \"Type a message\",\n borderRadius: 21,\n borderColor: \"#EAEAEA\",\n fontSize: 15,\n fontFamily: \"sans-serif\",\n background: \"white\",\n tabIndex: 0,\n shouldReturn: false,\n customEmojis: [],\n language: undefined,\n};\n\nexport default InputEmojiWithRef;\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","TRANSPARENT_GIF","replaceAllTextEmojis","text","allEmojis","getAllEmojisFromText","_toConsumableArray","Set","forEach","emoji","replaceAll","getInputEmojiHTML","str","find","replace","RegExp","match","getImageEmoji","_emojiPickerEl$shadow","emojiPickerEl","querySelector","getInputEmojiNativeHTML","emojiSpanEl","shadowRoot","concat","name","replaceAllTextEmojiToString","html","container","innerHTML","images","Array","prototype","slice","call","querySelectorAll","image","outerHTML","dataset","handleCopy","event","selectedText","window","getSelection","i","len","rangeCount","getRangeAt","cloneContents","replaceEmojiToString","clipboardData","setData","innerText","preventDefault","handlePasteHtmlAtCaret","sel","range","deleteContents","el","frag","createDocumentFragment","node","lastNode","insertNode","cloneRange","setStartAfter","collapse","removeAllRanges","addRange","totalCharacters","_ref2","textCount","length","emojisCount","removeHtmlExceptBr","inputDiv","temp","tempContainer","stripped","final","getSelectionStart","startContainer","offset","startOffset","nodeType","Node","TEXT_NODE","nextSibling","commonAncestorContainer","getCursor","selection","selectionStart","addLineBreak","_getCursor","isCollapsed","textContent","br","setEndAfter","br2","setStart","setEnd","useSanitize","shouldReturn","sanitizeFnsRef","useRef","sanitizedTextRef","addSanitizeFn","useCallback","fn","current","push","sanitize","result","reduce","acc","replaceAllHtmlToString","useExpose","_ref","textInputRef","setValue","emitChange","_useSanitize","useImperativeHandle","value","focus","blur","useEmit","onResize","onChange","currentSizeRef","onChangeFn","checkAndEmitResize","currentSize","nextSize","size","width","height","sanitizedText","useEffect","TextInput","placeholder","tabIndex","className","props","_objectWithoutProperties","_excluded","appendContent","placeholderRef","visibility","offsetWidth","offsetHeight","placeholderStyle","useMemo","placeholderColor","color","handleKeyDown","key","shiftKey","ctrlKey","onEnter","onArrowUp","onArrowDown","onKeyDown","handleClick","onFocus","handleKeyUp","onKeyUp","input","React","onClick","contentEditable","onBlur","onCopy","onPaste","TextInputWithRef","forwardRef","EmojiPickerButton","showPicker","toggleShowPicker","buttonElement","buttonRef","localButtonRef","_useState","useState","_useState2","_slicedToArray","showCustomButtonContent","setShowCustomButtonContent","_buttonRef$current$ch","_buttonRef$current","_buttonElement$childN","_buttonElement$childN2","childNodes","xmlns","viewBox","d","$e5534fc185f7111e$export$2e2bcd8739ae039","$dvPge$useRef","instance","update","$dvPge$useEffect","$dvPge$Picker","$dvPge$react","EMOJI_MART_DATA_URL","cacheI18n","EmojiPicker","theme","onSelectEmoji","disableRecent","customEmojis","language","categories","categoryies","undefined","i18n","setI18n","en","fetch","then","_x","_asyncToGenerator","_regeneratorRuntime","mark","_callee","data","translations","wrap","_callee$","_context","prev","next","json","sent","stop","apply","arguments","error","console","_x2","_callee2","_callee2$","_context2","Picker","previewPosition","onEmojiSelect","custom","set","memo","EmojiPickerContainer","handleSelectEmoji","position","evt","stopPropagation","top","EMOJI_PICKER_CONTAINER_HEIGHT","EmojiPickerWrapper","keepOpened","addPolluteFn","setShowPicker","_useState3","_useState4","customButton","setCustomButton","_useState5","_useState6","emojiPickerPosition","setEmojiPickerPosition","checkClickOutside","element","target","classList","contains","addEventListener","removeEventListener","calcTopPosition","currentShowPicker","btn","currentTarget","btnRect","getBoundingClientRect","popoverHeight","ReactDOM","createPortal","Fragment","getTextFromAtToCaret","getRangeFromAtToCaret","substring","begin","end","deleteTextFromAtToCaret","deleteData","elementWithFocus","getElementWithFocus","caretOffset","lastAt","lastIndexOf","preCaretRange","selectNodeContents","endContainer","endOffset","toString","textRange","createRange","preCaretTextRange","body","createTextRange","moveToElementText","setEndPoint","anchorNode","useMention","searchMention","loading","setLoading","mentionUsers","setMentionUsers","mentionSearchText","setMentionSearchText","onSelectUser","checkMentionText","metionText","users","_getElementWithFocus","abrupt","parentElement","hasAttribute","remove","includes","MentionUserList","onSelect","selectedUser","setSelectedUser","prevUser","currentSelectedUser","nextUser","getMentionSelectedNameEl","rest","usersFiltered","searchText","toLocaleLowerCase","map","user","nameHtml","toLowerCase","startsWith","names","split","join","_objectSpread","unsubscribe","index","id","onMouseOver","src","dangerouslySetInnerHTML","__html","MentionUserListWithRef","MentionWrapper","metionUserListRef","showUserList","setShowUserList","_useMention","mentionsEl","mentionEl","mentionName","mentionId","unsubscribeArrowUp","unsubscribeArrowDown","handleSelect","createObserver","listeners","subscribe","listener","filter","l","publish","currentListerners","useEventListeners","keyDown","keyUp","arrowUp","arrowDown","enter","usePollute","polluteFnsRef","pollute","InputEmoji","cleanOnEnter","maxLength","inputClass","borderRadius","borderColor","fontSize","fontFamily","background","_useEventListeners","_usePollute","updateHTML","nextValue","handleKeydown","nativeEvent","handleFocus","handleBlur","handleTextInputChange","handlePaste","content","getData","execCommand","InputEmojiWithRef","defaultProps"],"mappings":";;;;;;;;;;AAAA,SAASA,WAAWA,CAACC,GAAG,EAAEC,GAAG,EAAE;EAC7B,IAAKA,GAAG,KAAK,KAAK,CAAC,EAAGA,GAAG,GAAG,EAAE,CAAA;AAC9B,EAAA,IAAIC,QAAQ,GAAGD,GAAG,CAACC,QAAQ,CAAA;AAE3B,EAAA,IAAI,CAACF,GAAG,IAAI,OAAOG,QAAQ,KAAK,WAAW,EAAE;AAAE,IAAA,OAAA;AAAQ,GAAA;AAEvD,EAAA,IAAIC,IAAI,GAAGD,QAAQ,CAACC,IAAI,IAAID,Q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AM;AACbkD,IAAAA,UAAU,EAAEA,UAAW;AACvBhD,IAAAA,aAAa,EAAEA,aAAc;AAC7BC,IAAAA,YAAY,EAAEA,YAAa;AAC3BvG,IAAAA,aAAa,EAAEA,aAAc;AAC7BuJ,IAAAA,YAAY,EAAEA,YAAa;AAC3B/G,IAAAA,aAAa,EAAEA,aAAc;AAC7BiC,IAAAA,aAAa,EAAEA,aAAc;AAC7BC,IAAAA,SAAS,EAAEA,SAAU;AACrB8B,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GACpB,CACE,CAAC,CAAA;AAEV,CAAA;AAEA,IAAMqM,iBAAiB,gBAAGxO,gBAAU,CAACkN,UAAU,EAAC;AAEhDsB,iBAAiB,CAACC,YAAY,GAAG;EAC/B1M,KAAK,sBAAwB,MAAO;AACpCtE,EAAAA,MAAM,EAAE,EAAE;AACVI,EAAAA,WAAW,EAAE,gBAAgB;AAC7ByP,EAAAA,YAAY,EAAE,EAAE;AAChBC,EAAAA,WAAW,EAAE,SAAS;AACtBC,EAAAA,QAAQ,EAAE,EAAE;AACZC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,UAAU,EAAE,OAAO;AACnB5P,EAAAA,QAAQ,EAAE,CAAC;AACXvC,EAAAA,YAAY,EAAE,KAAK;AACnB2G,EAAAA,YAAY,EAAE,EAAE;AAChBC,EAAAA,QAAQ,EAAEG,SAAAA;AACZ,CAAC;;;;"}
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/utils/emoji-utils.js","../src/utils/input-event-utils.js","../src/hooks/use-sanitize.js","../src/hooks/use-expose.js","../src/hooks/use-emit.js","../src/text-input.js","../src/components/emoji-picker-button.js","../node_modules/@emoji-mart/react/dist/module.js","../src/components/emoji-picker.js","../src/components/emoji-picker-container.js","../src/components/emoji-picker-wrapper.js","../src/utils/mention-utils.js","../src/hooks/use-mention.js","../src/components/mention-user-list.js","../src/components/mention-wrapper.js","../src/utils/observer.js","../src/hooks/use-event-listeners.js","../src/hooks/user-pollute.js","../src/index.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/* eslint-disable valid-jsdoc */\n// @ts-check\n\nexport const TRANSPARENT_GIF =\n \"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\";\n\nexport const EMOJI_STYLE = \"\";\n\n/**\n * Replace all text with emoji with an image html tag\n * @param {string} text\n * @return {string}\n */\nexport function replaceAllTextEmojis(text) {\n let allEmojis = getAllEmojisFromText(text);\n\n if (allEmojis) {\n allEmojis = [...new Set(allEmojis)]; // remove duplicates\n\n allEmojis.forEach(emoji => {\n text = replaceAll(text, emoji, getInputEmojiHTML('', emoji));\n });\n }\n\n return text;\n}\n\n/**\n * Replace all occurrencies in a string\n * @param {string} str\n * @param {string} find\n * @param {string} replace\n * @return {string}\n */\nfunction replaceAll(str, find, replace) {\n return str.replace(new RegExp(find, \"g\"), replace);\n}\n\n/**\n * Get all emojis from the text\n * @param {string} text\n * @return {string[]}\n */\nfunction getAllEmojisFromText(text) {\n return text.match(\n /(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*/g\n );\n}\n\n// eslint-disable-next-line valid-jsdoc\n/**\n *\n * @param { import(\"../types/types\").EmojiMartItem } emoji\n * @return {string}\n */\nexport function getImageEmoji(emoji) {\n /** @type {HTMLElement | null} */\n const emojiPickerEl = document.querySelector('em-emoji-picker')\n\n if (!emojiPickerEl) {\n return getInputEmojiNativeHTML(emoji.native)\n }\n\n /** @type {HTMLSpanElement | null=} */\n const emojiSpanEl = emojiPickerEl?.shadowRoot?.querySelector(`[title=\"${emoji.name}\"] > span > span`)\n\n if (!emojiSpanEl) {\n return getInputEmojiNativeHTML(emoji.native)\n }\n\n const style = replaceAll(emojiSpanEl.style.cssText, '\"', \"'\");\n\n return getInputEmojiHTML(style, emoji.native);\n}\n\n// eslint-disable-next-line valid-jsdoc\n/**\n *\n * @param {string} style\n * @param {string} emoji\n * @returns\n */\nfunction getInputEmojiHTML(style, emoji) {\n return `<img style=\"${style}; display: inline-block\" data-emoji=\"${emoji}\" src=\"${TRANSPARENT_GIF}\" />`;\n}\n\n/**\n * \n * @param {string} emoji \n * @returns \n */\nfunction getInputEmojiNativeHTML(emoji) {\n return `<span class=\"width: 18px; height: 18px; display: inline-block; margin: 0 1px;\">${emoji}</span>`;\n}\n\n/**\n *\n * @param {string} html\n * @return {string}\n */\nexport function replaceAllTextEmojiToString(html) {\n const container = document.createElement(\"div\");\n container.innerHTML = html;\n\n const images = Array.prototype.slice.call(container.querySelectorAll(\"img\"));\n\n images.forEach(image => {\n container.innerHTML = container.innerHTML.replace(\n image.outerHTML,\n image.dataset.emoji\n );\n });\n\n return container.innerHTML;\n}\n","// @ts-check\n\nimport {\n getImageEmoji,\n replaceAllTextEmojis,\n replaceAllTextEmojiToString,\n} from \"./emoji-utils\";\n\n/**\n * Handle copy of current selected text\n * @param {React.ClipboardEvent} event\n */\nexport function handleCopy(event) {\n const selectedText = window.getSelection();\n\n if (selectedText === null) {\n return;\n }\n\n let container = document.createElement(\"div\");\n\n for (let i = 0, len = selectedText.rangeCount; i < len; ++i) {\n container.appendChild(selectedText.getRangeAt(i).cloneContents());\n }\n\n container = replaceEmojiToString(container);\n\n event.clipboardData.setData(\"text\", container.innerText);\n event.preventDefault();\n}\n\n/**\n *\n * @param {string} html\n */\nexport function handlePasteHtmlAtCaret(html) {\n let sel;\n let range;\n if (window.getSelection) {\n // IE9 and non-IE\n sel = window.getSelection();\n\n if (sel === null) return;\n\n if (sel.getRangeAt && sel.rangeCount) {\n range = sel.getRangeAt(0);\n range.deleteContents();\n\n // Range.createContextualFragment() would be useful here but is\n // non-standard and not supported in all browsers (IE9, for one)\n const el = document.createElement(\"div\");\n el.innerHTML = html;\n const frag = document.createDocumentFragment();\n let node;\n let 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}\n\n/**\n * Replace emoji img to its string value\n * @param {HTMLDivElement} container\n * @return {HTMLDivElement}\n */\nfunction replaceEmojiToString(container) {\n const images = Array.prototype.slice.call(container.querySelectorAll(\"img\"));\n\n images.forEach((image) => {\n image.outerHTML = image.dataset.emoji;\n });\n\n return container;\n}\n\n/**\n * Handle past on input\n * @param {React.ClipboardEvent} event\n */\nexport function handlePaste(event) {\n event.preventDefault();\n let content;\n if (event.clipboardData) {\n content = event.clipboardData.getData(\"text/plain\");\n content = replaceAllTextEmojis(content);\n document.execCommand(\"insertHTML\", false, content);\n }\n}\n\n/**\n * @typedef {object} HandleKeyDownOptions\n * @property {HTMLDivElement} placeholderEl\n * @property {number} maxLength\n * @property {HTMLDivElement} inputEl\n * @property {React.MutableRefObject<string>} cleanedTextRef\n * @property {React.MutableRefObject<HTMLDivElement>} textInputRef\n * @property {boolean} cleanOnEnter\n * @property {function(): void} emitChange\n * @property {(function(string): void)=} onEnter\n * @property {(function(KeyboardEvent): void)=} onKeyDown\n * @property {(function(string): void)} updateHTML\n */\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * @typedef {Object} HandleSelectEmojiProps\n * @property {import(\"../types/types\").EmojiMartItem} emoji\n * @property {React.MutableRefObject<import('../text-input').Ref>} textInputRef\n * @property {boolean} keepOpened\n * @property {() => void} toggleShowPicker\n * @property {number=} maxLength\n */\n\n/**\n *\n * @param {HandleSelectEmojiProps} props\n */\nexport function handleSelectEmoji({\n emoji,\n textInputRef,\n keepOpened,\n toggleShowPicker,\n maxLength,\n}) {\n if (\n typeof maxLength !== \"undefined\" &&\n totalCharacters(textInputRef.current) >= maxLength\n ) {\n return;\n }\n\n textInputRef.current.appendContent(getImageEmoji(emoji));\n\n if (!keepOpened) {\n toggleShowPicker();\n }\n}\n\n/**\n *\n * @param {{text: string, html: string}} props\n * @return {number}\n */\nexport function totalCharacters({ text, html }) {\n const textCount = text.length;\n const emojisCount = (html.match(/<img/g) || []).length;\n\n return textCount + emojisCount;\n}\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * Handle keyup event\n * @param {() => void} emitChange\n * @param {(event: KeyboardEvent) => void} onKeyDownMention\n * @param {React.MutableRefObject<string>} cleanedTextRef\n * @param {React.MutableRefObject<HTMLDivElement>} textInputRef\n * @return {(event: KeyboardEvent) => void}\n */\nexport function handleKeyup(\n emitChange,\n onKeyDownMention,\n cleanedTextRef,\n textInputRef,\n) {\n return (event) => {\n const text = replaceAllTextEmojiToString(textInputRef.current.innerHTML);\n cleanedTextRef.current = text;\n emitChange();\n onKeyDownMention(event);\n };\n}\n\n/**\n * Handle focus event\n * @param {function(FocusEvent): void} onFocus\n * @return {function(FocusEvent): void}\n */\nexport function handleFocus(onFocus) {\n return (event) => {\n onFocus(event);\n };\n}\n\n/**\n * Set caret to the end of text value\n * @param {React.MutableRefObject<HTMLDivElement| null>} input\n */\nexport function moveCaretToEnd(input) {\n let range;\n let selection;\n if (document.createRange && input.current) {\n range = document.createRange();\n range.selectNodeContents(input.current);\n range.collapse(false);\n selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n}\n/**\n *\n * @param {HTMLDivElement} inputDiv\n * @return {string}\n */\nexport function removeHtmlExceptBr(inputDiv) {\n const temp = inputDiv.innerHTML.replaceAll(/<br\\s*\\/?>/gi, \"[BR]\"); // temporarily replace <br> with placeholder\n const tempContainer = document.createElement(\"div\");\n tempContainer.innerHTML = temp;\n const stripped = tempContainer.innerText; // strip all html tags\n const final = stripped.replaceAll(/\\[BR\\]/gi, \"</br>\"); // replace placeholders with <br>\n return final;\n}\n\n/**\n * \n * @param {*} range \n * @returns \n */\nexport function getSelectionStart(range) {\n let node = range.startContainer;\n let offset = range.startOffset;\n\n // Handle cases where the selection start node is not a text node\n if (node.nodeType !== Node.TEXT_NODE) {\n while (node.nodeType !== Node.TEXT_NODE) {\n node = node.nextSibling;\n if (!node) break;\n }\n if (!node) {\n node = range.commonAncestorContainer;\n while (node.nodeType !== Node.TEXT_NODE) {\n node = node.firstChild;\n }\n }\n offset = 0;\n }\n\n return { node, offset };\n}\n\n/**\n * \n * @return {Object} cursor\n */\nexport function getCursor() {\n const selection = window.getSelection();\n const range = selection.getRangeAt(0);\n const selectionStart = getSelectionStart(range);\n\n return {selection, range, selectionStart}\n}\n\n/**\n *\n */\nexport function addLineBreak() {\n const { selection, range, selectionStart } = getCursor()\n\n // If cursor is at the end of the text content, add one more line break\n if (\n selection.isCollapsed &&\n selectionStart.offset === selectionStart.node.textContent.length\n ) {\n const br = document.createElement(\"br\");\n range.insertNode(br);\n range.setStartAfter(br);\n range.setEndAfter(br);\n selection.removeAllRanges();\n selection.addRange(range);\n\n const br2 = document.createElement(\"br\");\n range.insertNode(br2);\n range.setStartAfter(br2);\n range.setEndAfter(br2);\n selection.removeAllRanges();\n selection.addRange(range);\n } else {\n const br = document.createElement(\"br\");\n range.insertNode(br);\n range.setStartAfter(br);\n range.setEndAfter(br);\n selection.removeAllRanges();\n selection.addRange(range);\n // Set cursor position right before the first letter after the line break\n if (\n selectionStart.node.nextSibling &&\n selectionStart.node.nextSibling.nodeType === Node.TEXT_NODE\n ) {\n range.setStart(selectionStart.node.nextSibling, 1);\n range.setEnd(selectionStart.node.nextSibling, 1);\n }\n selection.removeAllRanges();\n selection.addRange(range);\n }\n}\n","// @ts-check\n\nimport { useCallback, useRef } from \"react\";\nimport { removeHtmlExceptBr } from \"../utils/input-event-utils\";\n\n/**\n * @typedef {import('../types/types').SanitizeFn} SanitizeFn\n */\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * @param {boolean} shouldReturn\n */\nexport function useSanitize(shouldReturn) {\n /** @type {React.MutableRefObject<SanitizeFn[]>} */\n const sanitizeFnsRef = useRef([]);\n\n const sanitizedTextRef = useRef(\"\");\n\n /** @type {(fn: SanitizeFn) => void} */\n const addSanitizeFn = useCallback(fn => {\n sanitizeFnsRef.current.push(fn);\n }, []);\n\n /** @type {(html: string) => string} */\n const sanitize = useCallback(html => {\n let result = sanitizeFnsRef.current.reduce((acc, fn) => {\n return fn(acc);\n }, html);\n\n result = replaceAllHtmlToString(result, shouldReturn);\n\n sanitizedTextRef.current = result;\n\n return result;\n }, []);\n\n return { addSanitizeFn, sanitize, sanitizedTextRef };\n}\n\n/**\n *\n * @param {string} html\n * @param {boolean} shouldReturn\n * @return {string}\n */\nexport function replaceAllHtmlToString(html, shouldReturn) {\n const container = document.createElement(\"div\");\n container.innerHTML = html;\n let text\n if(shouldReturn) {\n text = removeHtmlExceptBr(container)\n } else {\n text = container.innerText || \"\";\n }\n\n // remove all ↵ for safari\n text = text.replace(/\\n/gi, \"\");\n\n return text;\n}\n","// @ts-check\n\nimport { useImperativeHandle } from \"react\";\nimport { useSanitize } from \"./use-sanitize\";\n\n/**\n * @typedef {Object} Props\n * @property {React.Ref<any>} ref\n * @property {React.MutableRefObject<import('../text-input').Ref | null>} textInputRef\n * @property {(value: string) => void} setValue\n * @property {() => void} emitChange\n */\n\n/**\n *\n * @param {Props} props\n */\nexport function useExpose({ ref, textInputRef, setValue, emitChange }) {\n const { sanitize, sanitizedTextRef } = useSanitize(false);\n\n useImperativeHandle(ref, () => ({\n get value() {\n return sanitizedTextRef.current;\n },\n set value(value) {\n setValue(value);\n },\n focus: () => {\n if (textInputRef.current === null) return\n textInputRef.current.focus();\n },\n blur: () => {\n if (textInputRef.current !== null) {\n sanitize(textInputRef.current.html);\n\n }\n\n emitChange();\n }\n }));\n}\n","// @ts-check\n\nimport { useCallback, useEffect, useRef } from \"react\";\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * useEmit\n * @param {React.MutableRefObject<import('../text-input').Ref | null>} textInputRef\n * @param {(size: {width: number, height: number}) => void} onResize\n * @param {(text: string) => void} onChange\n */\nexport function useEmit(textInputRef, onResize, onChange) {\n /** @type {React.MutableRefObject<{width: number; height: number} | null>} */\n const currentSizeRef = useRef(null);\n const onChangeFn = useRef(onChange);\n\n const checkAndEmitResize = useCallback(() => {\n if (textInputRef.current !== null) {\n const currentSize = currentSizeRef.current;\n\n const nextSize = textInputRef.current.size;\n\n if (\n (!currentSize ||\n currentSize.width !== nextSize.width ||\n currentSize.height !== nextSize.height) &&\n typeof onResize === \"function\"\n ) {\n onResize(nextSize);\n }\n\n currentSizeRef.current = nextSize;\n }\n }, [onResize, textInputRef]);\n\n const emitChange = useCallback((sanitizedText) => {\n if (typeof onChangeFn.current === \"function\") {\n onChangeFn.current(sanitizedText);\n }\n\n if (typeof onResize === \"function\") {\n checkAndEmitResize();\n }\n }, [checkAndEmitResize, onResize]);\n\n useEffect(() => {\n if (textInputRef.current) {\n checkAndEmitResize();\n }\n }, [checkAndEmitResize, textInputRef]);\n\n return emitChange;\n}\n","// @ts-check\n// vendors\nimport React, { useImperativeHandle, forwardRef, useRef, useMemo } from \"react\";\nimport { addLineBreak, handlePasteHtmlAtCaret } from \"./utils/input-event-utils\";\nimport { replaceAllTextEmojiToString } from \"./utils/emoji-utils\";\n\n/**\n * @typedef {Object} Props\n * @property {(event: React.KeyboardEvent) => void} onKeyDown\n * @property {(event: React.KeyboardEvent) => void} onKeyUp\n * @property {() => void} onFocus\n * @property {() => void} onBlur\n * @property {(sanitizedText: string) => void=} onChange\n * @property {(event: React.KeyboardEvent) => void} onArrowUp\n * @property {(event: React.KeyboardEvent) => void} onArrowDown\n * @property {(event: React.KeyboardEvent) => void} onEnter\n * @property {boolean} shouldReturn\n * @property {(event: React.ClipboardEvent) => void} onCopy\n * @property {(event: React.ClipboardEvent) => void} onPaste\n * @property {string} placeholder\n * @property {{borderRadius?: number; color?: string; borderColor?: string; fontSize?: number; fontFamily?: string; background: string; placeholderColor?: string;}} style\n * @property {number} tabIndex\n * @property {string} className\n * @property {(html: string) => void} onChange\n */\n\n/**\n * @typedef {{\n * appendContent: (html: string) => void;\n * html: string;\n * text: string;\n * size: { width: number; height: number;};\n * focus: () => void;\n * }} Ref\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** @type {React.ForwardRefRenderFunction<Ref, Props>} */\nconst TextInput = (\n { placeholder, style, tabIndex, className, onChange, ...props },\n ref\n) => {\n useImperativeHandle(ref, () => ({\n appendContent: html => {\n if (textInputRef.current) {\n textInputRef.current.focus();\n }\n\n handlePasteHtmlAtCaret(html);\n\n if (textInputRef.current) {\n textInputRef.current.focus();\n }\n\n if (textInputRef.current && placeholderRef.current && replaceAllTextEmojiToString(textInputRef.current.innerHTML) === \"\") {\n placeholderRef.current.style.visibility = \"visible\";\n } else if (placeholderRef.current) {\n placeholderRef.current.style.visibility = \"hidden\";\n }\n\n if (textInputRef.current && typeof onChange === 'function') {\n onChange(textInputRef.current.innerHTML);\n }\n },\n set html(value) {\n if (textInputRef.current) {\n textInputRef.current.innerHTML = value;\n }\n \n if (placeholderRef.current) {\n const text = replaceAllTextEmojiToString(value)\n if (text === \"\") {\n placeholderRef.current.style.visibility = \"visible\";\n } else {\n placeholderRef.current.style.visibility = \"hidden\";\n }\n }\n\n if (typeof onChange === 'function' && textInputRef.current) {\n onChange(textInputRef.current.innerHTML);\n }\n },\n get html() {\n if (!textInputRef.current) return ''\n\n return textInputRef.current.innerHTML;\n },\n get text() {\n if (!textInputRef.current) return ''\n\n return textInputRef.current.innerText;\n },\n get size() {\n if (!textInputRef.current) {\n return {\n width: 0,\n height: 0\n }\n }\n\n return {\n width: textInputRef.current.offsetWidth,\n height: textInputRef.current.offsetHeight\n };\n },\n focus() {\n if (!textInputRef.current) return\n\n textInputRef.current.focus();\n }\n }));\n\n /** @type {React.CSSProperties} */\n const placeholderStyle = useMemo(() => {\n const placeholderStyle = {}\n\n if (style.placeholderColor) {\n placeholderStyle.color = style.placeholderColor\n }\n\n return placeholderStyle\n }, [style?.placeholderColor])\n\n /** @type {React.CSSProperties} */\n const inputStyle = useMemo(() => {\n const inputStyle = {}\n\n if (style.color) {\n inputStyle.color = style.color\n }\n\n return inputStyle\n }, [style?.color])\n\n /** @type {React.MutableRefObject<HTMLDivElement | null>} */\n const placeholderRef = useRef(null);\n /** @type {React.MutableRefObject<HTMLDivElement | null>} */\n const textInputRef = useRef(null);\n\n /**\n *\n * @param {React.KeyboardEvent} event\n */\n function handleKeyDown(event) { \n if (event.key === \"Enter\" && (event.shiftKey === true || event.ctrlKey === true) && props.shouldReturn) {\n event.preventDefault();\n if(textInputRef.current) {\n addLineBreak()\n return;\n }\n } \n if (event.key === \"Enter\") {\n props.onEnter(event);\n } else if (event.key === \"ArrowUp\") {\n props.onArrowUp(event);\n } else if (event.key === \"ArrowDown\") {\n props.onArrowDown(event);\n } else {\n if (event.key.length === 1 && placeholderRef.current) {\n placeholderRef.current.style.visibility = \"hidden\";\n }\n }\n\n props.onKeyDown(event);\n }\n\n /** */\n function handleClick() {\n props.onFocus();\n }\n\n /**\n *\n * @param {React.KeyboardEvent} event\n */\n function handleKeyUp(event) {\n props.onKeyUp(event);\n\n const input = textInputRef.current;\n\n if (placeholderRef.current && input) {\n const text = replaceAllTextEmojiToString(input.innerHTML)\n if (text === \"\") {\n placeholderRef.current.style.visibility = \"visible\";\n } else {\n placeholderRef.current.style.visibility = \"hidden\";\n }\n }\n\n if (typeof onChange === 'function' && textInputRef.current) {\n onChange(textInputRef.current.innerHTML);\n }\n }\n\n return (\n <div className=\"react-input-emoji--container\" style={style}>\n <div className=\"react-input-emoji--wrapper\" onClick={handleClick}>\n <div ref={placeholderRef} className=\"react-input-emoji--placeholder\" style={placeholderStyle}>\n {placeholder}\n </div>\n <div\n ref={textInputRef}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n tabIndex={tabIndex}\n contentEditable\n className={`react-input-emoji--input${className ? ` ${className}` : \"\"\n }`}\n onBlur={props.onBlur}\n onCopy={props.onCopy}\n onPaste={props.onPaste}\n data-testid=\"react-input-emoji--input\"\n style={inputStyle}\n />\n </div>\n </div>\n );\n};\n\nconst TextInputWithRef = forwardRef(TextInput);\n\nexport default TextInputWithRef;\n","// vendors\nimport React, { useEffect, useRef, useState } from \"react\";\n\n/**\n * @typedef {object} Props\n * @property {boolean} showPicker\n * @property {(event: React.MouseEvent) => void} toggleShowPicker\n * @property {HTMLDivElement=} buttonElement\n * @property {React.MutableRefObject=} buttonRef\n */\n\n/**\n * Emoji Picker Button Component\n * @param {Props} props\n * @return {JSX.Element}\n */\nfunction EmojiPickerButton({ showPicker, toggleShowPicker, buttonElement, buttonRef }) {\n \n const localButtonRef = useRef(null);\n const [showCustomButtonContent, setShowCustomButtonContent] = useState(false);\n\n useEffect(() => {\n if ((buttonRef?.current?.childNodes?.length ?? 0) > 2) {\n localButtonRef.current.appendChild(buttonRef.current.childNodes[0]);\n setShowCustomButtonContent(true);\n } else if ((buttonElement?.childNodes?.length ?? 0) > 2) {\n localButtonRef.current.appendChild(buttonElement?.childNodes[0]);\n setShowCustomButtonContent(true);\n }\n }, [buttonElement?.childNodes]);\n\n return (\n <button\n ref={localButtonRef}\n type=\"button\"\n className={`react-input-emoji--button${\n showPicker ? \" react-input-emoji--button__show\" : \"\"\n }`}\n onClick={toggleShowPicker}\n >\n {!showCustomButtonContent && (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n className=\"react-input-emoji--button--icon\"\n >\n {/* eslint-disable-next-line max-len */}\n <path d=\"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10\" />\n {/* eslint-disable-next-line max-len */}\n <path d=\"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0\" />\n </svg>\n )}\n </button>\n );\n}\n\nexport default EmojiPickerButton;\n","import $dvPge$react, {useRef as $dvPge$useRef, useEffect as $dvPge$useEffect} from \"react\";\nimport {Picker as $dvPge$Picker} from \"emoji-mart\";\n\n\n\nfunction $e5534fc185f7111e$export$2e2bcd8739ae039(props) {\n const ref = (0, $dvPge$useRef)(null);\n const instance = (0, $dvPge$useRef)(null);\n if (instance.current) instance.current.update(props);\n (0, $dvPge$useEffect)(()=>{\n instance.current = new (0, $dvPge$Picker)({\n ...props,\n ref: ref\n });\n return ()=>{\n instance.current = null;\n };\n }, []);\n return /*#__PURE__*/ (0, $dvPge$react).createElement(\"div\", {\n ref: ref\n });\n}\n\n\nexport {$e5534fc185f7111e$export$2e2bcd8739ae039 as default};\n//# sourceMappingURL=module.js.map\n","// vendors\nimport React, { memo, useEffect, useMemo, useState } from \"react\";\nimport Picker from \"@emoji-mart/react\";\n\nconst EMOJI_MART_DATA_URL = \"https://cdn.jsdelivr.net/npm/@emoji-mart/data\";\nconst cacheI18n = {};\n\n/**\n * @typedef {object} Props\n * @property {'light' | 'dark' | 'auto'} theme\n * @property {function(import(\"../types/types\").EmojiMartItem): void} onSelectEmoji\n * @property {boolean} disableRecent\n * @property {any[]=} customEmojis\n * @property {import('../types/types').Languages=} language\n */\n\n/**\n * Emoji Picker Component\n * @param {Props} props\n */\nfunction EmojiPicker(props) {\n const { theme, onSelectEmoji, disableRecent, customEmojis, language } = props;\n\n /** @type {string[]} */\n const categories = useMemo(() => {\n /** @type {string[]} */\n let categoryies = [];\n\n if (!disableRecent) {\n categoryies.push(\"frequent\");\n }\n\n categoryies = [\n ...categoryies,\n \"people\",\n \"nature\",\n \"foods\",\n \"activity\",\n \"places\",\n \"objects\",\n \"symbols\",\n \"flags\"\n ];\n\n return categoryies;\n }, [disableRecent]);\n\n const [i18n, setI18n] = useState(undefined);\n\n useEffect(() => {\n if (!language) {\n if (cacheI18n.en) {\n setI18n(cacheI18n.en);\n return;\n }\n\n // @ts-ignore\n fetch(`${EMOJI_MART_DATA_URL}/i18n/en.json`)\n .then(async data => {\n const translations = await data.json();\n setI18n(translations);\n cacheI18n.en = translations;\n })\n .catch(error => {\n console.error(\"Failed to load translations:\", error);\n });\n return;\n }\n\n if (cacheI18n[language]) {\n setI18n(cacheI18n[language]);\n return;\n }\n\n // @ts-ignore\n fetch(`${EMOJI_MART_DATA_URL}/i18n/${language}.json`)\n .then(async data => {\n const translations = await data.json();\n setI18n(translations);\n cacheI18n[language] = translations;\n })\n .catch(error => {\n console.error(\"Failed to load translations:\", error);\n });\n }, [language]);\n\n if (!i18n) {\n return null;\n }\n\n return (\n <Picker\n data={undefined}\n theme={theme}\n previewPosition=\"none\"\n onEmojiSelect={onSelectEmoji}\n custom={customEmojis}\n categories={categories}\n set=\"apple\"\n i18n={i18n}\n />\n );\n}\n\n\nexport default memo(EmojiPicker);\n","import React from \"react\";\nimport EmojiPicker from \"./emoji-picker\";\n\n/**\n * @typedef {object} Props\n * @property {boolean} showPicker\n * @property {'light' | 'dark' | 'auto'} theme\n * @property {(emoji: import(\"../types/types\").EmojiMartItem) => void} handleSelectEmoji\n * @property {boolean} disableRecent\n * @property {any[]=} customEmojis\n * @property {('above' | 'below')=} position\n * @property {import('../types/types').Languages=} language\n */\n\n/**\n * Emoji Picker Button Component\n * @param {Props} props\n * @return {JSX.Element}\n */\nfunction EmojiPickerContainer({\n showPicker,\n theme,\n handleSelectEmoji,\n disableRecent,\n customEmojis,\n position,\n language\n}) {\n return (\n <div className=\"react-emoji-picker--container\">\n {showPicker && (\n <div\n className=\"react-emoji-picker--wrapper\"\n onClick={evt => evt.stopPropagation()}\n style={position === 'below' ? {top: '40px'} : {}}\n >\n <div className=\"react-emoji-picker\">\n <EmojiPicker\n theme={theme}\n onSelectEmoji={handleSelectEmoji}\n disableRecent={disableRecent}\n customEmojis={customEmojis}\n language={language}\n />\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport default EmojiPickerContainer;\n","// @ts-check\n// vendors\nimport React, { useEffect, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport {\n getImageEmoji,\n replaceAllTextEmojis,\n replaceAllTextEmojiToString\n} from \"../utils/emoji-utils\";\n\nimport EmojiPickerButton from \"./emoji-picker-button\";\nimport EmojiPickerContainer from \"./emoji-picker-container\";\n\nconst EMOJI_PICKER_CONTAINER_HEIGHT = 435;\n\n/**\n * @typedef {import('../types/types').SanitizeFn} SanitizeFn\n */\n\n/**\n * @typedef {import('../types/types').PolluteFn} PolluteFn\n */\n\n/**\n * @typedef {Object} Props\n * @property {'light' | 'dark' | 'auto'} theme\n * @property {boolean} keepOpened\n * @property {boolean} disableRecent\n * @property {any[]=} customEmojis\n * @property {(fn: SanitizeFn) => void} addSanitizeFn\n * @property {(fn: PolluteFn) => void} addPolluteFn\n * @property {(html: string) => void} appendContent\n * @property {HTMLDivElement=} buttonElement\n * @property {React.MutableRefObject=} buttonRef\n * @property {import('../types/types').Languages=} language\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** @type {React.FC<Props>} */\nconst EmojiPickerWrapper = props => {\n const {\n theme,\n keepOpened,\n disableRecent,\n customEmojis,\n addSanitizeFn,\n addPolluteFn,\n appendContent,\n buttonElement,\n buttonRef,\n language\n } = props;\n\n const [showPicker, setShowPicker] = useState(false);\n /** @type {[HTMLDivElement | undefined, React.Dispatch<React.SetStateAction<HTMLDivElement | undefined>>]} */\n const [customButton, setCustomButton] = useState();\n /** @type {['above' | 'below' | undefined, React.Dispatch<React.SetStateAction<'above' | 'below' | undefined>>]} */\n const [emojiPickerPosition, setEmojiPickerPosition] = useState()\n\n useEffect(() => {\n addSanitizeFn(replaceAllTextEmojiToString);\n }, [addSanitizeFn]);\n\n useEffect(() => {\n addPolluteFn(replaceAllTextEmojis);\n }, [addPolluteFn]);\n\n useEffect(() => {\n /**\n *\n * @param {MouseEvent} event\n */\n function checkClickOutside(event) {\n /** @type {HTMLElement} */\n // @ts-ignore\n const element = event.target;\n\n if (\n element.classList.contains(\"react-input-emoji--button\") ||\n element.classList.contains(\"react-input-emoji--button--icon\")\n ) {\n return;\n }\n\n setShowPicker(false);\n }\n\n document.addEventListener(\"click\", checkClickOutside);\n\n return () => {\n document.removeEventListener(\"click\", checkClickOutside);\n };\n }, []);\n\n /**\n *\n * @param {React.MouseEvent} event\n */\n function toggleShowPicker(event) {\n event.stopPropagation();\n event.preventDefault();\n\n setEmojiPickerPosition(calcTopPosition(event))\n\n setShowPicker(currentShowPicker => !currentShowPicker);\n }\n\n /**\n * \n * @param {React.MouseEvent} event\n * @return {'above' | 'below'}\n */\n function calcTopPosition(event) {\n const btn = event.currentTarget\n const btnRect = btn.getBoundingClientRect();\n\n const popoverHeight = EMOJI_PICKER_CONTAINER_HEIGHT;\n\n // Decide to display above or below based on available space\n if (btnRect.top >= popoverHeight) {\n // Display above\n return 'above'\n } else {\n // Display below\n return 'below'\n }\n }\n\n // eslint-disable-next-line valid-jsdoc\n /**\n *\n * @param {import(\"../types/types\").EmojiMartItem} emoji\n */\n function handleSelectEmoji(emoji) {\n appendContent(getImageEmoji(emoji));\n\n if (!keepOpened) {\n setShowPicker(currentShowPicker => !currentShowPicker);\n }\n }\n\n useEffect(() => {\n if (buttonRef?.current?.style) {\n buttonRef.current.style.position = \"relative\";\n setCustomButton(buttonRef.current);\n } else if (buttonElement?.style) {\n buttonElement.style.position = \"relative\";\n setCustomButton(buttonElement);\n }\n }, [buttonRef, buttonElement]);\n\n return customButton ? (\n (ReactDOM.createPortal(\n <>\n <EmojiPickerContainer\n showPicker={showPicker}\n theme={theme}\n handleSelectEmoji={handleSelectEmoji}\n disableRecent={disableRecent}\n customEmojis={customEmojis}\n position={emojiPickerPosition}\n language={language}\n />\n <EmojiPickerButton\n showPicker={showPicker}\n toggleShowPicker={toggleShowPicker}\n buttonElement={customButton}\n buttonRef={buttonRef}\n />\n </>,\n customButton\n ))\n ) : (\n (<>\n <EmojiPickerContainer\n showPicker={showPicker}\n theme={theme}\n handleSelectEmoji={handleSelectEmoji}\n disableRecent={disableRecent}\n customEmojis={customEmojis}\n position={emojiPickerPosition}\n language={language}\n />\n <EmojiPickerButton\n showPicker={showPicker}\n toggleShowPicker={toggleShowPicker}\n />\n </>)\n );\n};\n\nexport default EmojiPickerWrapper;\n","// @ts-check\n\n/**\n *\n * @return {string | null}\n */\nexport function getTextFromAtToCaret() {\n const range = getRangeFromAtToCaret();\n\n if (!range) return null;\n\n const text = range.text.substring(range.begin, range.end);\n\n return text || null;\n}\n\n// eslint-disable-next-line valid-jsdoc\n/** */\nexport function deleteTextFromAtToCaret() {\n const range = getRangeFromAtToCaret();\n\n if (!range) return;\n\n // @ts-ignore\n range.element.deleteData(range.begin, range.end - range.begin);\n}\n\n/**\n *\n * @return {{begin: number, end: number, text: string, element: Node} | null}\n */\nfunction getRangeFromAtToCaret() {\n const elementWithFocus = getElementWithFocus();\n\n if (!elementWithFocus) {\n return null;\n }\n\n const { element, caretOffset } = elementWithFocus;\n const text = element.textContent;\n const lastAt = text.lastIndexOf(\"@\");\n\n if (\n lastAt === -1 ||\n lastAt >= caretOffset ||\n (lastAt !== 0 && text[lastAt - 1] !== \" \")\n ) {\n return null;\n }\n\n return { begin: lastAt, end: caretOffset, text, element };\n}\n\n/**\n *\n * @return {{element: Node, caretOffset: number}}\n */\nexport function getElementWithFocus() {\n const element = getSelectionStart();\n\n if (element === null) {\n return null;\n }\n\n let caretOffset = 0;\n if (typeof window.getSelection != \"undefined\") {\n const range = window.getSelection().getRangeAt(0);\n const preCaretRange = range.cloneRange();\n preCaretRange.selectNodeContents(element);\n preCaretRange.setEnd(range.endContainer, range.endOffset);\n caretOffset = preCaretRange.toString().length;\n } else if (\n // @ts-ignore\n typeof document.selection != \"undefined\" &&\n // @ts-ignore\n document.selection.type != \"Control\"\n ) {\n // @ts-ignore\n const textRange = document.selection.createRange();\n // @ts-ignore\n const preCaretTextRange = document.body.createTextRange();\n preCaretTextRange.moveToElementText(element);\n preCaretTextRange.setEndPoint(\"EndToEnd\", textRange);\n caretOffset = preCaretTextRange.text.length;\n }\n\n return { element, caretOffset };\n}\n\n/**\n *\n * @return {Node | null}\n */\nfunction getSelectionStart() {\n const node = document.getSelection().anchorNode;\n return node?.nodeType == 3 ? node : null;\n}\n","// @ts-check\nimport { useCallback, useState } from \"react\";\nimport {\n deleteTextFromAtToCaret,\n getElementWithFocus,\n getTextFromAtToCaret\n} from \"../utils/mention-utils\";\n\n/**\n * @typedef {import('../types/types').MentionUser} MentionUser\n */\n\n// eslint-disable-next-line valid-jsdoc\n/**\n *\n * @param {(text: string) => Promise<MentionUser[]>=} searchMention\n * @returns {{mentionSearchText: string | null, mentionUsers: MentionUser[], onKeyUp: (event: React.KeyboardEvent) => void, onFocus: () => void, onSelectUser: () => void, loading: boolean}}\n */\nexport function useMention(searchMention) {\n const [loading, setLoading] = useState(false);\n\n /** @type {[MentionUser[], React.Dispatch<React.SetStateAction<MentionUser[]>>]} */\n const [mentionUsers, setMentionUsers] = useState([]);\n\n /** @type {[string | null, React.Dispatch<React.SetStateAction<string | null>>]} */\n const [mentionSearchText, setMentionSearchText] = useState(null);\n\n const onSelectUser = useCallback(() => {\n deleteTextFromAtToCaret();\n setMentionUsers([]);\n }, []);\n\n /** */\n const checkMentionText = useCallback(async () => {\n const metionText = getTextFromAtToCaret();\n\n setMentionSearchText(metionText);\n\n if (metionText === null) {\n setMentionUsers([]);\n } else {\n setLoading(true);\n const users = await searchMention(metionText);\n setLoading(false);\n setMentionUsers(users);\n }\n }, [searchMention]);\n\n /** @type {(event: React.KeyboardEvent) => void} */\n const onKeyUp = useCallback(\n async event => {\n if (typeof searchMention !== \"function\") return;\n\n if (\n event.key === \"Backspace\" &&\n getElementWithFocus()?.element.parentElement.hasAttribute(\n \"data-mention-id\"\n )\n ) {\n const elementWithFocus = getElementWithFocus();\n elementWithFocus.element.parentElement.remove();\n } else if (\n ![\"ArrowUp\", \"ArrowDown\", \"Esc\", \"Escape\"].includes(event.key)\n ) {\n checkMentionText();\n }\n },\n [checkMentionText, searchMention]\n );\n\n const onFocus = useCallback(() => {\n checkMentionText();\n }, [checkMentionText]);\n\n return {\n mentionSearchText,\n mentionUsers,\n onKeyUp,\n onFocus,\n onSelectUser,\n loading\n };\n}\n","// @ts-check\n// vendors\nimport React, {\n useImperativeHandle,\n useState,\n forwardRef,\n useMemo,\n useEffect\n} from \"react\";\n\n/**\n * @typedef {import('../types/types').MentionUser} MentionUser\n */\n\n/**\n * @typedef {import('../types/types').TextInputListeners} TextInputListeners\n */\n\n/**\n * @typedef {Object} Props\n * @property {MentionUser[]} users\n * @property {string | null} mentionSearchText\n * @property {(user: MentionUser) => void} onSelect\n * @property {(event: keyof TextInputListeners, fn: import('../types/types').Listerner<any>) => () => void} addEventListener\n */\n\n/**\n * @typedef {{prevUser: () => void; nextUser: () => void;}} Ref\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** @type {React.ForwardRefRenderFunction<Ref, Props>} */\nconst MentionUserList = (\n { users, mentionSearchText, onSelect, addEventListener },\n ref\n) => {\n const [selectedUser, setSelectedUser] = useState(0);\n\n useImperativeHandle(ref, () => ({\n prevUser: () => {\n setSelectedUser(currentSelectedUser => {\n if (currentSelectedUser === 0) {\n return 0;\n }\n\n return currentSelectedUser - 1;\n });\n },\n nextUser: () => {\n setSelectedUser(currentSelectedUser => {\n if (currentSelectedUser === users.length - 1) {\n return users.length - 1;\n }\n\n return currentSelectedUser + 1;\n });\n }\n }));\n\n useEffect(() => {\n setSelectedUser(0);\n }, [users]);\n\n /**\n *\n * @param {string} selectedText\n * @param {string} rest\n * @return {string}\n */\n function getMentionSelectedNameEl(selectedText, rest) {\n return `<span class=\"react-input-emoji--mention--item--name__selected\" data-testid=\"metion-selected-word\">${selectedText}</span>${rest}`;\n }\n\n /** @type {(MentionUser & {nameHtml: string})[]} */\n const usersFiltered = useMemo(() => {\n const searchText = mentionSearchText\n ? mentionSearchText.substring(1).toLocaleLowerCase()\n : \"\";\n return users.map(user => {\n let nameHtml = user.name;\n\n if (mentionSearchText && mentionSearchText.length > 1) {\n if (user.name.toLowerCase().startsWith(searchText)) {\n nameHtml = getMentionSelectedNameEl(\n user.name.substring(0, searchText.length),\n user.name.substring(searchText.length)\n );\n } else {\n const names = user.name.split(\" \");\n\n nameHtml = names\n .map(name => {\n if (name.toLocaleLowerCase().startsWith(searchText)) {\n return getMentionSelectedNameEl(\n name.substring(0, searchText.length),\n name.substring(searchText.length)\n );\n }\n return name;\n })\n .join(\" \");\n }\n }\n\n return {\n ...user,\n nameHtml\n };\n });\n }, [mentionSearchText, users]);\n\n // eslint-disable-next-line valid-jsdoc\n /**\n *\n * @param {MentionUser} user\n * @returns {(event: React.MouseEvent) => void} event\n */\n function handleClick(user) {\n return event => {\n event.stopPropagation();\n event.preventDefault();\n\n onSelect(user);\n };\n }\n\n useEffect(() => {\n const unsubscribe = addEventListener(\"enter\", event => {\n event.stopPropagation();\n event.preventDefault();\n onSelect(usersFiltered[selectedUser]);\n });\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onSelect, selectedUser, usersFiltered]);\n\n return (\n <ul\n className=\"react-input-emoji--mention--list\"\n data-testid=\"mention-user-list\"\n >\n {usersFiltered.map((user, index) => (\n <li key={user.id}>\n <button\n type=\"button\"\n onClick={handleClick(user)}\n className={`react-input-emoji--mention--item${\n selectedUser === index\n ? \" react-input-emoji--mention--item__selected\"\n : \"\"\n }`}\n onMouseOver={() => setSelectedUser(index)}\n >\n <img\n className=\"react-input-emoji--mention--item--img\"\n src={user.image}\n />\n <div\n className=\"react-input-emoji--mention--item--name\"\n dangerouslySetInnerHTML={{ __html: user.nameHtml }}\n />\n </button>\n </li>\n ))}\n </ul>\n );\n};\n\nconst MentionUserListWithRef = forwardRef(MentionUserList);\n\nexport default MentionUserListWithRef;\n","// @ts-check\n// vendors\nimport React, { useEffect, useRef, useState } from \"react\";\n\n// hooks\nimport { useMention } from \"../hooks/use-mention\";\n\n// components\nimport MentionUserList from \"./mention-user-list\";\n\n/**\n * @typedef {import('../types/types').MentionUser} MetionUser\n */\n\n/**\n * @typedef {import('../types/types').TextInputListeners} TextInputListeners\n */\n\n/**\n * @typedef {import('../types/types').SanitizeFn} SanitizeFn\n */\n\n/**\n * @typedef {Object} Props\n * @property {(text: string) => Promise<MetionUser[]>=} searchMention\n * @property {(event: keyof TextInputListeners, fn: import('../types/types').Listerner<any>) => () => void} addEventListener\n * @property {(html: string) => void} appendContent\n * @property {(fn: SanitizeFn) => void} addSanitizeFn\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** @type {React.FC<Props>} */\nconst MentionWrapper = ({\n searchMention,\n addEventListener,\n appendContent,\n addSanitizeFn\n}) => {\n /** @type {React.MutableRefObject<import('./mention-user-list').Ref | null>} */\n const metionUserListRef = useRef(null);\n const [showUserList, setShowUserList] = useState(false);\n\n const {\n mentionSearchText,\n mentionUsers,\n loading,\n onKeyUp,\n onFocus,\n onSelectUser\n } = useMention(searchMention);\n\n useEffect(() => {\n addSanitizeFn(html => {\n const container = document.createElement(\"div\");\n container.innerHTML = html;\n\n const mentionsEl = Array.prototype.slice.call(\n container.querySelectorAll(\".react-input-emoji--mention--text\")\n );\n\n mentionsEl.forEach(mentionEl => {\n container.innerHTML = container.innerHTML.replace(\n mentionEl.outerHTML,\n `@[${mentionEl.dataset.mentionName}](userId:${mentionEl.dataset.mentionId})`\n );\n });\n\n return container.innerHTML;\n });\n }, [addSanitizeFn]);\n\n useEffect(() => {\n setShowUserList(mentionUsers.length > 0);\n }, [mentionUsers]);\n\n useEffect(() => {\n /** */\n function checkClickOutside() {\n setShowUserList(false);\n }\n\n document.addEventListener(\"click\", checkClickOutside);\n\n return () => {\n document.removeEventListener(\"click\", checkClickOutside);\n };\n }, []);\n\n useEffect(() => {\n const unsubscribe = addEventListener(\"keyUp\", onKeyUp);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onKeyUp]);\n\n useEffect(() => {\n /**\n *\n * @param {React.KeyboardEvent} event\n */\n function handleKeyDown(event) {\n switch (event.key) {\n case \"Esc\": // IE/Edge specific value\n case \"Escape\":\n setShowUserList(false);\n break;\n default:\n break;\n }\n }\n\n const unsubscribe = addEventListener(\"keyDown\", handleKeyDown);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener]);\n\n useEffect(() => {\n const unsubscribe = addEventListener(\"focus\", onFocus);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onFocus]);\n\n useEffect(() => {\n if (showUserList) {\n const unsubscribeArrowUp = addEventListener(\"arrowUp\", event => {\n event.stopPropagation();\n event.preventDefault();\n metionUserListRef.current.prevUser();\n });\n\n const unsubscribeArrowDown = addEventListener(\"arrowDown\", event => {\n event.stopPropagation();\n event.preventDefault();\n metionUserListRef.current.nextUser();\n });\n\n return () => {\n unsubscribeArrowUp();\n unsubscribeArrowDown();\n };\n }\n }, [addEventListener, showUserList]);\n\n /**\n *\n * @param {MetionUser} user\n */\n function handleSelect(user) {\n onSelectUser();\n appendContent(\n `<span class=\"react-input-emoji--mention--text\" data-mention-id=\"${user.id}\" data-mention-name=\"${user.name}\">@${user.name}</span> `\n );\n }\n\n return (\n <>\n {loading ? (\n <div className=\"react-input-emoji--mention--container\">\n <div className=\"react-input-emoji--mention--loading\">\n <div className=\"react-input-emoji--mention--loading--spinner\">\n Loading...\n </div>\n </div>\n </div>\n ) : (\n showUserList && (\n <div\n className=\"react-input-emoji--mention--container\"\n onClick={evt => evt.stopPropagation()}\n >\n <MentionUserList\n ref={metionUserListRef}\n mentionSearchText={mentionSearchText}\n users={mentionUsers}\n onSelect={handleSelect}\n addEventListener={addEventListener}\n />\n </div>\n )\n )}\n </>\n );\n};\n\nexport default MentionWrapper;\n","// @ts-check\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * @template T\n * @returns {import('../types/types').ListenerObj<T>}\n */\nexport function createObserver() {\n /** @type {import('../types/types').Listerner<T>[]} */\n let listeners = [];\n\n return {\n subscribe: listener => {\n listeners.push(listener);\n return () => {\n listeners = listeners.filter(l => l !== listener);\n };\n },\n publish: event => {\n listeners.forEach(listener => listener(event));\n },\n get currentListerners() {\n return listeners;\n }\n };\n}\n","// @ts-check\n\nimport { useCallback, useMemo } from \"react\";\nimport { createObserver } from \"../utils/observer\";\n\n/**\n * @typedef {import('../types/types').TextInputListeners} TextInputListeners\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** */\nexport function useEventListeners() {\n /** @type {TextInputListeners} */\n const listeners = useMemo(\n () => ({\n keyDown: createObserver(),\n keyUp: createObserver(),\n arrowUp: createObserver(),\n arrowDown: createObserver(),\n enter: createObserver(),\n focus: createObserver(),\n blur: createObserver()\n }),\n []\n );\n\n /**\n * @template {keyof TextInputListeners} T, K\n * @type {(event: keyof TextInputListeners, fn: import('../types/types').Listerner<any>) => () => void}\n */\n const addEventListener = useCallback(\n (event, fn) => {\n return listeners[event].subscribe(fn);\n },\n [listeners]\n );\n\n return { addEventListener, listeners };\n}\n","// @ts-check\n\nimport { useCallback, useRef } from \"react\";\n\n/**\n * @typedef {import('../types/types').PolluteFn} PolluteFn\n */\n\n// eslint-disable-next-line valid-jsdoc\n/** */\nexport function usePollute() {\n /** @type {React.MutableRefObject<PolluteFn[]>} */\n const polluteFnsRef = useRef([]);\n\n /** @type {(fn: PolluteFn) => void} */\n const addPolluteFn = useCallback(fn => {\n polluteFnsRef.current.push(fn);\n }, []);\n\n /** @type {(html: string) => string} */\n const pollute = useCallback(text => {\n const result = polluteFnsRef.current.reduce((acc, fn) => {\n return fn(acc);\n }, text);\n\n return result;\n }, []);\n\n return { addPolluteFn, pollute };\n}\n","// @ts-check\n// vendors\nimport React, { useEffect, useRef, forwardRef, useCallback } from \"react\";\n\n// css\nimport \"./styles.css\";\n\n// utils\nimport { replaceAllTextEmojis } from \"./utils/emoji-utils\";\nimport { handleCopy, totalCharacters } from \"./utils/input-event-utils\";\n\n// hooks\nimport { useExpose } from \"./hooks/use-expose\";\nimport { useEmit } from \"./hooks/use-emit\";\n\n// components\nimport TextInput from \"./text-input\";\nimport EmojiPickerWrapper from \"./components/emoji-picker-wrapper\";\nimport MentionWrapper from \"./components/mention-wrapper\";\nimport { useEventListeners } from \"./hooks/use-event-listeners\";\nimport { useSanitize } from \"./hooks/use-sanitize\";\nimport { usePollute } from \"./hooks/user-pollute\";\n\n/**\n * @typedef {import('./types/types').MentionUser} MetionUser\n */\n\n/**\n * @typedef {import('./types/types').ListenerObj<any>} ListenerObj\n */\n\n/**\n * @typedef {object} Props\n * @property {string} value\n * @property {(value: string) => void} onChange\n * @property {\"light\" | \"dark\" | \"auto\"=} theme\n * @property {boolean=} cleanOnEnter\n * @property {(text: string) => void=} onEnter\n * @property {string=} placeholder\n * @property {string=} placeholderColor\n * @property {string=} color\n * @property {(size: {width: number, height: number}) => void=} onResize\n * @property {() => void=} onClick\n * @property {() => void=} onFocus\n * @property {() => void=} onBlur\n * @property {boolean=} shouldReturn\n * @property {number=} maxLength\n * @property {boolean=} keepOpened\n * @property {(event: KeyboardEvent) => void=} onKeyDown\n * @property {string=} inputClass\n * @property {boolean=} disableRecent\n * @property {number=} tabIndex\n * @property {number=} height\n * @property {number=} borderRadius\n * @property {string=} borderColor\n * @property {number=} fontSize\n * @property {string=} fontFamily\n * @property {string=} background\n * @property {{id: string; name: string; emojis: {id: string; name: string; keywords: string[], skins: {src: string}[]}}[]=} customEmojis\n * @property {import('./types/types').Languages=} language\n * @property {(text: string) => Promise<MetionUser[]>=} searchMention\n * @property {HTMLDivElement=} buttonElement\n * @property {React.MutableRefObject=} buttonRef\n */\n\n/**\n * Input Emoji Component\n * @param {Props} props\n * @param {React.Ref<any>} ref\n * @return {JSX.Element}\n */\nfunction InputEmoji(props, ref) {\n const {\n onChange,\n onEnter,\n shouldReturn,\n onResize,\n onClick,\n onFocus,\n onBlur,\n onKeyDown,\n theme,\n cleanOnEnter,\n placeholder,\n maxLength,\n keepOpened,\n inputClass,\n disableRecent,\n tabIndex,\n value,\n customEmojis,\n language,\n searchMention,\n buttonElement,\n buttonRef,\n // style\n borderRadius,\n borderColor,\n fontSize,\n fontFamily,\n background,\n placeholderColor,\n color,\n } = props;\n\n /** @type {React.MutableRefObject<import('./text-input').Ref | null>} */\n const textInputRef = useRef(null);\n\n const { addEventListener, listeners } = useEventListeners();\n\n const { addSanitizeFn, sanitize, sanitizedTextRef } = useSanitize(props.shouldReturn);\n\n const { addPolluteFn, pollute } = usePollute();\n\n const updateHTML = useCallback(\n (nextValue = \"\") => {\n if (textInputRef.current === null) return;\n\n textInputRef.current.html = replaceAllTextEmojis(nextValue);\n sanitizedTextRef.current = nextValue;\n },\n [sanitizedTextRef]\n );\n\n const setValue = useCallback(\n /**\n * \n * @param {string} value\n */\n (value) => {\n updateHTML(value);\n },\n [updateHTML]\n );\n\n const emitChange = useEmit(textInputRef, onResize, onChange);\n\n useExpose({\n ref,\n setValue,\n textInputRef,\n emitChange\n });\n\n useEffect(() => {\n if (sanitizedTextRef.current !== value) {\n setValue(value);\n }\n }, [sanitizedTextRef, setValue, value]);\n\n // useEffect(() => {\n // updateHTML();\n // }, [updateHTML]);\n\n useEffect(() => {\n /**\n * Handle keydown event\n * @param {React.KeyboardEvent} event\n * @return {boolean}\n */\n function handleKeydown(event) {\n if (\n typeof maxLength !== \"undefined\" &&\n event.key !== \"Backspace\" &&\n textInputRef.current !== null &&\n totalCharacters(textInputRef.current) >= maxLength\n ) {\n event.preventDefault();\n }\n\n if (event.key === \"Enter\" && textInputRef.current) {\n event.preventDefault();\n\n const text = sanitize(textInputRef.current.html);\n\n emitChange(sanitizedTextRef.current);\n\n if (\n typeof onEnter === \"function\" &&\n listeners.enter.currentListerners.length === 0\n ) {\n onEnter(text);\n }\n\n if (cleanOnEnter && listeners.enter.currentListerners.length === 0) {\n updateHTML(\"\");\n }\n\n if (typeof onKeyDown === \"function\") {\n onKeyDown(event.nativeEvent);\n }\n\n return false;\n }\n\n if (typeof onKeyDown === \"function\") {\n onKeyDown(event.nativeEvent);\n }\n\n return true;\n }\n\n const unsubscribe = addEventListener(\"keyDown\", handleKeydown);\n\n return () => {\n unsubscribe();\n };\n }, [\n addEventListener,\n cleanOnEnter,\n emitChange,\n listeners.enter.currentListerners.length,\n maxLength,\n onEnter,\n onKeyDown,\n sanitize,\n sanitizedTextRef,\n updateHTML\n ]);\n\n useEffect(() => {\n /** */\n function handleFocus() {\n if (typeof onClick === \"function\") {\n onClick();\n }\n\n if (typeof onFocus === \"function\") {\n onFocus();\n }\n }\n\n const unsubscribe = addEventListener(\"focus\", handleFocus);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onClick, onFocus]);\n\n useEffect(() => {\n /** */\n function handleBlur() {\n if (typeof onBlur === \"function\") {\n onBlur();\n }\n }\n\n const unsubscribe = addEventListener(\"blur\", handleBlur);\n\n return () => {\n unsubscribe();\n };\n }, [addEventListener, onBlur]);\n\n /**\n *\n * @param {string} html\n */\n function handleTextInputChange(html) {\n sanitize(html);\n\n if (value !== sanitizedTextRef.current) {\n emitChange(sanitizedTextRef.current);\n }\n }\n\n /**\n *\n * @param {string} html\n */\n function appendContent(html) {\n if (\n typeof maxLength !== \"undefined\" &&\n textInputRef.current !== null &&\n totalCharacters(textInputRef.current) >= maxLength\n ) {\n return;\n }\n\n if (textInputRef.current !== null) {\n textInputRef.current.appendContent(html);\n }\n }\n\n /**\n * Handle past on input\n * @param {React.ClipboardEvent} event\n */\n function handlePaste(event) {\n event.preventDefault();\n let content;\n if (event.clipboardData) {\n content = event.clipboardData.getData(\"text/plain\");\n content = pollute(content);\n document.execCommand(\"insertHTML\", false, content);\n }\n }\n\n return (\n <div className=\"react-emoji\">\n <MentionWrapper\n searchMention={searchMention}\n addEventListener={addEventListener}\n appendContent={appendContent}\n addSanitizeFn={addSanitizeFn}\n />\n <TextInput\n ref={textInputRef}\n onCopy={handleCopy}\n onPaste={handlePaste}\n shouldReturn={shouldReturn}\n onBlur={listeners.blur.publish}\n onFocus={listeners.focus.publish}\n onArrowUp={listeners.arrowUp.publish}\n onArrowDown={listeners.arrowDown.publish}\n onKeyUp={listeners.keyUp.publish}\n onKeyDown={listeners.keyDown.publish}\n onEnter={listeners.enter.publish}\n placeholder={placeholder}\n style={{\n borderRadius,\n borderColor,\n fontSize,\n fontFamily,\n background,\n placeholderColor,\n color\n }}\n tabIndex={tabIndex}\n className={inputClass}\n onChange={handleTextInputChange}\n />\n <EmojiPickerWrapper\n theme={theme}\n keepOpened={keepOpened}\n disableRecent={disableRecent}\n customEmojis={customEmojis}\n addSanitizeFn={addSanitizeFn}\n addPolluteFn={addPolluteFn}\n appendContent={appendContent}\n buttonElement={buttonElement}\n buttonRef={buttonRef}\n language={language}\n />\n </div>\n );\n}\n\nconst InputEmojiWithRef = forwardRef(InputEmoji);\n\nInputEmojiWithRef.defaultProps = {\n theme: /** @type {const} */ (\"auto\"),\n height: 30,\n placeholder: \"Type a message\",\n borderRadius: 21,\n borderColor: \"#EAEAEA\",\n color: \"black\",\n fontSize: 15,\n fontFamily: \"sans-serif\",\n background: \"white\",\n tabIndex: 0,\n shouldReturn: false,\n customEmojis: [],\n language: undefined,\n};\n\nexport default InputEmojiWithRef;\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","TRANSPARENT_GIF","replaceAllTextEmojis","text","allEmojis","getAllEmojisFromText","_toConsumableArray","Set","forEach","emoji","replaceAll","getInputEmojiHTML","str","find","replace","RegExp","match","getImageEmoji","_emojiPickerEl$shadow","emojiPickerEl","querySelector","getInputEmojiNativeHTML","emojiSpanEl","shadowRoot","concat","name","replaceAllTextEmojiToString","html","container","innerHTML","images","Array","prototype","slice","call","querySelectorAll","image","outerHTML","dataset","handleCopy","event","selectedText","window","getSelection","i","len","rangeCount","getRangeAt","cloneContents","replaceEmojiToString","clipboardData","setData","innerText","preventDefault","handlePasteHtmlAtCaret","sel","range","deleteContents","el","frag","createDocumentFragment","node","lastNode","insertNode","cloneRange","setStartAfter","collapse","removeAllRanges","addRange","totalCharacters","_ref2","textCount","length","emojisCount","removeHtmlExceptBr","inputDiv","temp","tempContainer","stripped","final","getSelectionStart","startContainer","offset","startOffset","nodeType","Node","TEXT_NODE","nextSibling","commonAncestorContainer","getCursor","selection","selectionStart","addLineBreak","_getCursor","isCollapsed","textContent","br","setEndAfter","br2","setStart","setEnd","useSanitize","shouldReturn","sanitizeFnsRef","useRef","sanitizedTextRef","addSanitizeFn","useCallback","fn","current","push","sanitize","result","reduce","acc","replaceAllHtmlToString","useExpose","_ref","textInputRef","setValue","emitChange","_useSanitize","useImperativeHandle","value","focus","blur","useEmit","onResize","onChange","currentSizeRef","onChangeFn","checkAndEmitResize","currentSize","nextSize","size","width","height","sanitizedText","useEffect","TextInput","placeholder","tabIndex","className","props","_objectWithoutProperties","_excluded","appendContent","placeholderRef","visibility","offsetWidth","offsetHeight","placeholderStyle","useMemo","placeholderColor","color","inputStyle","handleKeyDown","key","shiftKey","ctrlKey","onEnter","onArrowUp","onArrowDown","onKeyDown","handleClick","onFocus","handleKeyUp","onKeyUp","input","React","onClick","contentEditable","onBlur","onCopy","onPaste","TextInputWithRef","forwardRef","EmojiPickerButton","showPicker","toggleShowPicker","buttonElement","buttonRef","localButtonRef","_useState","useState","_useState2","_slicedToArray","showCustomButtonContent","setShowCustomButtonContent","_buttonRef$current$ch","_buttonRef$current","_buttonElement$childN","_buttonElement$childN2","childNodes","xmlns","viewBox","d","$e5534fc185f7111e$export$2e2bcd8739ae039","$dvPge$useRef","instance","update","$dvPge$useEffect","$dvPge$Picker","$dvPge$react","EMOJI_MART_DATA_URL","cacheI18n","EmojiPicker","theme","onSelectEmoji","disableRecent","customEmojis","language","categories","categoryies","undefined","i18n","setI18n","en","fetch","then","_x","_asyncToGenerator","_regeneratorRuntime","mark","_callee","data","translations","wrap","_callee$","_context","prev","next","json","sent","stop","apply","arguments","error","console","_x2","_callee2","_callee2$","_context2","Picker","previewPosition","onEmojiSelect","custom","set","memo","EmojiPickerContainer","handleSelectEmoji","position","evt","stopPropagation","top","EMOJI_PICKER_CONTAINER_HEIGHT","EmojiPickerWrapper","keepOpened","addPolluteFn","setShowPicker","_useState3","_useState4","customButton","setCustomButton","_useState5","_useState6","emojiPickerPosition","setEmojiPickerPosition","checkClickOutside","element","target","classList","contains","addEventListener","removeEventListener","calcTopPosition","currentShowPicker","btn","currentTarget","btnRect","getBoundingClientRect","popoverHeight","ReactDOM","createPortal","Fragment","getTextFromAtToCaret","getRangeFromAtToCaret","substring","begin","end","deleteTextFromAtToCaret","deleteData","elementWithFocus","getElementWithFocus","caretOffset","lastAt","lastIndexOf","preCaretRange","selectNodeContents","endContainer","endOffset","toString","textRange","createRange","preCaretTextRange","body","createTextRange","moveToElementText","setEndPoint","anchorNode","useMention","searchMention","loading","setLoading","mentionUsers","setMentionUsers","mentionSearchText","setMentionSearchText","onSelectUser","checkMentionText","metionText","users","_getElementWithFocus","abrupt","parentElement","hasAttribute","remove","includes","MentionUserList","onSelect","selectedUser","setSelectedUser","prevUser","currentSelectedUser","nextUser","getMentionSelectedNameEl","rest","usersFiltered","searchText","toLocaleLowerCase","map","user","nameHtml","toLowerCase","startsWith","names","split","join","_objectSpread","unsubscribe","index","id","onMouseOver","src","dangerouslySetInnerHTML","__html","MentionUserListWithRef","MentionWrapper","metionUserListRef","showUserList","setShowUserList","_useMention","mentionsEl","mentionEl","mentionName","mentionId","unsubscribeArrowUp","unsubscribeArrowDown","handleSelect","createObserver","listeners","subscribe","listener","filter","l","publish","currentListerners","useEventListeners","keyDown","keyUp","arrowUp","arrowDown","enter","usePollute","polluteFnsRef","pollute","InputEmoji","cleanOnEnter","maxLength","inputClass","borderRadius","borderColor","fontSize","fontFamily","background","_useEventListeners","_usePollute","updateHTML","nextValue","handleKeydown","nativeEvent","handleFocus","handleBlur","handleTextInputChange","handlePaste","content","getData","execCommand","InputEmojiWithRef","defaultProps"],"mappings":";;;;;;;;;;AAAA,SAASA,WAAWA,CAACC,GAAG,EAAEC,GAAG,EAAE;EAC7B,IAAKA,GAAG,KAAK,KAAK,CAAC,EAAGA,GAAG,GAAG,EAAE,CAAA;AAC9B,EAAA,IAAIC,QAAQ,GAAGD,GAAG,CAACC,QAAQ,CAAA;AAE3B,EAAA,IAAI,CAACF,GAAG,IAAI,OAAOG,QAAQ,KAAK,WAAW,EAAE;AAAE,IAAA,OAAA;AAAQ,GAAA;AAEvD,EAAA,IAAIC,IAAI,GAAGD,QAAQ,CAACC,IAAI,IAAID,QAAQ,CAACE,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AACpE,EAAA,IAAIC,KAAK,GAAGH,QAAQ,CAACI,aAAa,CAAC,OAAO,CAAC,CAAA;EAC3CD,KAAK,CAACE,IAAI,GAAG,UAAU,CAAA;EAEvB,IAAIN,QAAQ,KAAK,KAAK,EAAE;IACtB,IAAIE,IAAI,CAACK,UAAU,EAAE;MACnBL,IAAI,CAACM,YAAY,CAACJ,KAAK,EAAEF,IAAI,CAACK,UAAU,CAAC,CAAA;AAC3C,KAAC,MAAM;AACLL,MAAAA,IAAI,CAACO,WAAW,CAACL,KAAK,CAAC,CAAA;AACzB,KAAA;AACF,GAAC,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