reactjs-tiptap-editor-pro 0.2.38 → 0.2.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./ColorPicker-DGbrNkQ-.cjs"),On=require("shiki"),O=require("react/jsx-runtime"),pe=require("react"),Ce=require("./locale-bundle-PAhriAQT.cjs"),$e=require("lucide-react"),Id=require("@radix-ui/react-select"),Wd=require("@radix-ui/react-slot"),no=require("tippy.js"),io=require("scroll-into-view-if-needed"),Jt=require("frimousse"),Uu=require("docx"),Ut=require("prosemirror-docx");function Eu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const an=Eu(pe),Me=Eu(Id),ro=pe.forwardRef(({asChild:e,...t},n)=>{var a;const i=T.icons[t.icon],r=e?Wd.Slot:T.Button;return O.jsxs(T.Tooltip,{children:[O.jsx(T.TooltipTrigger,{asChild:!0,children:O.jsx(r,{className:"h-[32px] min-w-24 overflow-hidden px-[5px] py-0",disabled:t==null?void 0:t.disabled,ref:n,variant:"ghost",...t,children:O.jsxs("div",{className:"flex h-full items-center font-normal",children:[(t==null?void 0:t.title)&&O.jsx("div",{className:"grow truncate text-left text-sm",children:t==null?void 0:t.title}),i&&O.jsx(i,{className:"ml-1 size-3 shrink-0 text-zinc-500"})]})})}),O.jsx(T.TooltipContent,{children:O.jsxs("div",{className:"flex max-w-24 flex-col items-center text-center",children:[(t==null?void 0:t.tooltip)&&O.jsx("div",{children:t==null?void 0:t.tooltip}),O.jsx("div",{className:"flex",children:!!((a=t==null?void 0:t.shortcutKeys)!=null&&a.length)&&O.jsx("span",{children:T.getShortcutKeys(t==null?void 0:t.shortcutKeys)})})]})})]})}),Od=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Md=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Pd=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,jd=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,qd=T.Mark.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[T.markInputRule({find:Od,type:this.type}),T.markInputRule({find:Pd,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Md,type:this.type}),T.markPasteRule({find:jd,type:this.type})]}}),Hd=qd.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleBold(),isActive:()=>t.isActive("bold")||!1,disabled:!t.can().toggleBold(),icon:"Bold",shortcutKeys:["mod","B"],tooltip:n("editor.bold.tooltip")}})}}}),zd=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Xd=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Vd=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,$d=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Kd=T.Mark.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[T.markInputRule({find:zd,type:this.type}),T.markInputRule({find:Vd,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Xd,type:this.type}),T.markPasteRule({find:$d,type:this.type})]}}),Gd=Kd.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:n}){return{component:T.ActionButton,componentProps:{action:()=>t.commands.toggleItalic(),isActive:()=>t.isActive("italic")||!1,disabled:!t.can().toggleItalic(),shortcutKeys:["mod","I"],icon:"Italic",tooltip:n("editor.italic.tooltip")}}}}}}),Zd=T.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Yd=Zd.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:n}){return{component:T.ActionButton,componentProps:{action:()=>t.commands.toggleUnderline(),isActive:()=>t.isActive("underline")||!1,disabled:!t.can().toggleUnderline(),icon:"Underline",shortcutKeys:["mod","U"],tooltip:n("editor.underline.tooltip")}}}}}}),Qd=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Jd=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,eh=T.Mark.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[T.markInputRule({find:Qd,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Jd,type:this.type})]}}),th=eh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleStrike(),isActive:()=>t.isActive("strike")||!1,disabled:!t.can().toggleStrike(),icon:"Strikethrough",shortcutKeys:["shift","mod","S"],tooltip:n("editor.strike.tooltip")}})}}}),nh=/(^|[^`])`([^`]+)`(?!`)/,ih=/(^|[^`])`([^`]+)`(?!`)/g,rh=T.Mark.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[T.markInputRule({find:nh,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:ih,type:this.type})]}}),ah=rh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleCode(),isActive:()=>t.isActive("code")||!1,disabled:!t.can().toggleCode(),icon:"Code",shortcutKeys:["mod","E"],tooltip:n("editor.code.tooltip")}})}}}),oh=/^```([a-z]+)?[\s\n]$/,sh=/^~~~([a-z]+)?[\s\n]$/,ch=T.Node.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,a=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return a||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",T.mergeAttributes(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:i,empty:r}=n;if(!r||i.parent.type!==this.type)return!1;const a=i.parentOffset===i.parent.nodeSize-2,o=i.parent.textContent.endsWith(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./ColorPicker-CvEUnlMl.cjs"),On=require("shiki"),O=require("react/jsx-runtime"),pe=require("react"),Ce=require("./locale-bundle-PAhriAQT.cjs"),$e=require("lucide-react"),Id=require("@radix-ui/react-select"),Wd=require("@radix-ui/react-slot"),no=require("tippy.js"),io=require("scroll-into-view-if-needed"),Jt=require("frimousse"),Uu=require("docx"),Ut=require("prosemirror-docx");function Eu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const an=Eu(pe),Me=Eu(Id),ro=pe.forwardRef(({asChild:e,...t},n)=>{var a;const i=T.icons[t.icon],r=e?Wd.Slot:T.Button;return O.jsxs(T.Tooltip,{children:[O.jsx(T.TooltipTrigger,{asChild:!0,children:O.jsx(r,{className:"h-[32px] min-w-24 overflow-hidden px-[5px] py-0",disabled:t==null?void 0:t.disabled,ref:n,variant:"ghost",...t,children:O.jsxs("div",{className:"flex h-full items-center font-normal",children:[(t==null?void 0:t.title)&&O.jsx("div",{className:"grow truncate text-left text-sm",children:t==null?void 0:t.title}),i&&O.jsx(i,{className:"ml-1 size-3 shrink-0 text-zinc-500"})]})})}),O.jsx(T.TooltipContent,{children:O.jsxs("div",{className:"flex max-w-24 flex-col items-center text-center",children:[(t==null?void 0:t.tooltip)&&O.jsx("div",{children:t==null?void 0:t.tooltip}),O.jsx("div",{className:"flex",children:!!((a=t==null?void 0:t.shortcutKeys)!=null&&a.length)&&O.jsx("span",{children:T.getShortcutKeys(t==null?void 0:t.shortcutKeys)})})]})})]})}),Od=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Md=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Pd=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,jd=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,qd=T.Mark.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[T.markInputRule({find:Od,type:this.type}),T.markInputRule({find:Pd,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Md,type:this.type}),T.markPasteRule({find:jd,type:this.type})]}}),Hd=qd.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleBold(),isActive:()=>t.isActive("bold")||!1,disabled:!t.can().toggleBold(),icon:"Bold",shortcutKeys:["mod","B"],tooltip:n("editor.bold.tooltip")}})}}}),zd=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Xd=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Vd=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,$d=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Kd=T.Mark.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[T.markInputRule({find:zd,type:this.type}),T.markInputRule({find:Vd,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Xd,type:this.type}),T.markPasteRule({find:$d,type:this.type})]}}),Gd=Kd.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:n}){return{component:T.ActionButton,componentProps:{action:()=>t.commands.toggleItalic(),isActive:()=>t.isActive("italic")||!1,disabled:!t.can().toggleItalic(),shortcutKeys:["mod","I"],icon:"Italic",tooltip:n("editor.italic.tooltip")}}}}}}),Zd=T.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Yd=Zd.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:n}){return{component:T.ActionButton,componentProps:{action:()=>t.commands.toggleUnderline(),isActive:()=>t.isActive("underline")||!1,disabled:!t.can().toggleUnderline(),icon:"Underline",shortcutKeys:["mod","U"],tooltip:n("editor.underline.tooltip")}}}}}}),Qd=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Jd=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,eh=T.Mark.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[T.markInputRule({find:Qd,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Jd,type:this.type})]}}),th=eh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleStrike(),isActive:()=>t.isActive("strike")||!1,disabled:!t.can().toggleStrike(),icon:"Strikethrough",shortcutKeys:["shift","mod","S"],tooltip:n("editor.strike.tooltip")}})}}}),nh=/(^|[^`])`([^`]+)`(?!`)/,ih=/(^|[^`])`([^`]+)`(?!`)/g,rh=T.Mark.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[T.markInputRule({find:nh,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:ih,type:this.type})]}}),ah=rh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleCode(),isActive:()=>t.isActive("code")||!1,disabled:!t.can().toggleCode(),icon:"Code",shortcutKeys:["mod","E"],tooltip:n("editor.code.tooltip")}})}}}),oh=/^```([a-z]+)?[\s\n]$/,sh=/^~~~([a-z]+)?[\s\n]$/,ch=T.Node.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,a=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return a||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",T.mergeAttributes(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:i,empty:r}=n;if(!r||i.parent.type!==this.type)return!1;const a=i.parentOffset===i.parent.nodeSize-2,o=i.parent.textContent.endsWith(`
2
2
 
3
3
  `);return!a||!o?!1:e.chain().command(({tr:s})=>(s.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:i}=t,{$from:r,empty:a}=n;if(!a||r.parent.type!==this.type||!(r.parentOffset===r.parent.nodeSize-2))return!1;const s=r.after();return s===void 0?!1:i.nodeAt(s)?e.commands.command(({tr:u})=>(u.setSelection(T.Selection.near(i.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[T.textblockTypeInputRule({find:oh,type:this.type,getAttributes:e=>({language:e[1]})}),T.textblockTypeInputRule({find:sh,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),r=i?JSON.parse(i):void 0,a=r==null?void 0:r.mode;if(!n||!a)return!1;const{tr:o,schema:s}=e.state,c=s.text(n.replace(/\r\n?/g,`
4
4
  `));return o.replaceSelectionWith(this.type.create({language:a},c)),o.selection.$from.parent.type!==this.type&&o.setSelection(T.TextSelection.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),e.dispatch(o),!0}}})]}});let mt,Tn;const Gr=new Set,Zr=new Set;function uh(){return mt}function lh(e){if(!mt&&!Tn){const t=e.themes.filter(i=>!!i&&i in On.bundledThemes),n=e.languages.filter(i=>!!i&&i in On.bundledLanguages);return Tn=On.createHighlighter({themes:t,langs:n}).then(i=>{mt=i}),Tn}if(Tn)return Tn}async function Au(e){return mt&&!mt.getLoadedThemes().includes(e)&&!Zr.has(e)&&e in On.bundledThemes?(Zr.add(e),await mt.loadTheme(e),Zr.delete(e),!0):!1}async function Cu(e){return mt&&!mt.getLoadedLanguages().includes(e)&&!Gr.has(e)&&e in On.bundledLanguages?(Gr.add(e),await mt.loadLanguage(e),Gr.delete(e),!0):!1}async function dh({doc:e,name:t,defaultTheme:n,defaultLanguage:i}){const r=T.findChildren(e,s=>s.type.name===t),a=[...r.map(s=>s.node.attrs.theme),n],o=[...r.map(s=>s.node.attrs.language),i];mt?await Promise.all([...a.flatMap(s=>Au(s)),...o.flatMap(s=>!!s&&Cu(s))]):await lh({languages:o,themes:a})}function us({doc:e,name:t,defaultTheme:n,defaultLanguage:i}){const r=[];return T.findChildren(e,o=>o.type.name===t).forEach(o=>{let s=o.pos+1,c=o.node.attrs.language||i;const u=o.node.attrs.theme||n,l=uh();if(!l)return;l.getLoadedLanguages().includes(c)||(c="plaintext");const f=l.getLoadedThemes().includes(u)?u:l.getLoadedThemes()[0],g=l.codeToTokensBase(o.node.textContent,{lang:c,theme:f});for(const d of g){for(const x of d){const m=s+x.content.length,h=T.Decoration.inline(s,m,{style:`color: ${x.color}`});r.push(h),s=m}s+=1}}),T.DecorationSet.create(e,r)}function hh({name:e,defaultLanguage:t,defaultTheme:n}){const i=new T.Plugin({key:new T.PluginKey("shiki"),view(r){class a{constructor(){this.initDecorations()}update(){this.checkUndecoratedBlocks()}destroy(){}async initDecorations(){const s=r.state.doc;await dh({doc:s,name:e,defaultLanguage:t,defaultTheme:n});const c=r.state.tr.setMeta("shikiPluginForceDecoration",!0);r.dispatch(c)}async checkUndecoratedBlocks(){const s=T.findChildren(r.state.doc,l=>l.type.name===e);if((await Promise.all(s.flatMap(l=>[Au(l.node.attrs.theme),Cu(l.node.attrs.language)]))).includes(!0)){const l=r.state.tr.setMeta("shikiPluginForceDecoration",!0);r.dispatch(l)}}}return new a},state:{init:(r,{doc:a})=>us({doc:a,name:e,defaultLanguage:t,defaultTheme:n}),apply:(r,a,o,s)=>{const c=o.selection.$head.parent.type.name,u=s.selection.$head.parent.type.name,l=T.findChildren(o.doc,d=>d.type.name===e),f=T.findChildren(s.doc,d=>d.type.name===e),g=r.docChanged&&([c,u].includes(e)||f.length!==l.length||r.steps.some(d=>d.from!==void 0&&d.to!==void 0&&l.some(x=>x.pos>=d.from&&x.pos+x.node.nodeSize<=d.to)));return r.getMeta("shikiPluginForceDecoration")||g?us({doc:r.doc,name:e,defaultLanguage:t,defaultTheme:n}):a.map(r.mapping,r.doc)}},props:{decorations(r){return i.getState(r)}}});return i}function fh({action:e,languages:t,...n}){const i=a=>{e(a)},r=pe.useMemo(()=>t==null?void 0:t.map(a=>({title:Ce.MAP_LANGUAGE_CODE_LABELS[a]||a,language:a})),[t]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{disabled:n==null?void 0:n.disabled,asChild:!0,children:O.jsx(T.ActionButton,{tooltip:n==null?void 0:n.tooltip,disabled:n==null?void 0:n.disabled,icon:n==null?void 0:n.icon})}),O.jsx(T.DropdownMenuContent,{className:"w-full !max-h-[180px] !overflow-y-scroll",children:r==null?void 0:r.map(a=>O.jsx(T.DropdownMenuItem,{onClick:()=>i(a.language),children:O.jsx("div",{className:"h-full ml-1",children:a.title})},`codeblock-${a.title}`))})]})}const gh=Me.Root,ph=Me.Value,ku=an.forwardRef(({className:e,children:t,...n},i)=>O.jsxs(Me.Trigger,{ref:i,className:T.cn("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,O.jsx(Me.Icon,{asChild:!0,children:O.jsx($e.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ku.displayName=Me.Trigger.displayName;const Fu=an.forwardRef(({className:e,...t},n)=>O.jsx(Me.ScrollUpButton,{ref:n,className:T.cn("flex cursor-default items-center justify-center py-1",e),...t,children:O.jsx($e.ChevronUp,{className:"h-4 w-4"})}));Fu.displayName=Me.ScrollUpButton.displayName;const Su=an.forwardRef(({className:e,...t},n)=>O.jsx(Me.ScrollDownButton,{ref:n,className:T.cn("flex cursor-default items-center justify-center py-1",e),...t,children:O.jsx($e.ChevronDown,{className:"h-4 w-4"})}));Su.displayName=Me.ScrollDownButton.displayName;const Bu=an.forwardRef(({className:e,children:t,position:n="popper",...i},r)=>O.jsx(Me.Portal,{children:O.jsxs(Me.Content,{ref:r,className:T.cn("relative z-50 max-h-60 overflow-y-auto min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:[O.jsx(Fu,{}),O.jsx(Me.Viewport,{className:T.cn("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),O.jsx(Su,{})]})}));Bu.displayName=Me.Content.displayName;const mh=an.forwardRef(({className:e,...t},n)=>O.jsx(Me.Label,{ref:n,className:T.cn("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));mh.displayName=Me.Label.displayName;const Xa=an.forwardRef(({className:e,children:t,...n},i)=>O.jsxs(Me.Item,{ref:i,className:T.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[O.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(Me.ItemIndicator,{children:O.jsx($e.Check,{className:"h-4 w-4"})})}),O.jsx(Me.ItemText,{children:t})]}));Xa.displayName=Me.Item.displayName;const bh=an.forwardRef(({className:e,...t},n)=>O.jsx(Me.Separator,{ref:n,className:T.cn("-mx-1 my-1 h-px bg-muted",e),...t}));bh.displayName=Me.Separator.displayName;function yh(){const[e,t]=pe.useState(!1);return{isCopied:e,copyToClipboard:async i=>{try{await navigator.clipboard.writeText(i),t(!0),setTimeout(()=>t(!1),2e3)}catch(r){console.error("Failed to copy text: ",r),t(!1)}}}}const xh="_wrap_fsdar_1",Dh="_maxHeight_fsdar_10",vh="_btnCopy_fsdar_13",_h="_btnDelete_fsdar_14",wh="_blockInfo_fsdar_18",Th="_blockInfoEditable_fsdar_28",Uh="_selectLang_fsdar_32",Eh="_copied_fsdar_58",Ft={wrap:xh,maxHeight:Dh,btnCopy:vh,btnDelete:_h,blockInfo:wh,blockInfoEditable:Th,selectLang:Uh,copied:Eh};function Ah({editor:e,node:{attrs:t},updateAttributes:n,extension:i}){var g,d;const{isCopied:r,copyToClipboard:a}=yh(),o=pe.useMemo(()=>{var x;return(x=i.options.languages)!=null&&x.length?i.options.languages:Ce.DEFAULT_LANGUAGE_CODE_BLOCK},[i.options.languages]),s=T.useEditableEditor(),c=(d=(g=e==null?void 0:e.options)==null?void 0:g.editorProps)==null?void 0:d.print,{language:u}=t,l=pe.useRef(null),f=pe.useCallback(()=>T.deleteNode(Nu.name,e),[e]);return O.jsxs(T.NodeViewWrapper,{className:T.clsx(Ft.wrap,!c&&Ft.maxHeight,"render-wrapper"),children:[O.jsxs("div",{className:T.clsx(Ft.blockInfo,{[Ft.blockInfoEditable]:!s}),children:[O.jsx("span",{className:T.clsx(Ft.btnCopy,r&&Ft.copied),onClick:()=>a(l.current.innerText),children:r?O.jsx($e.CopyCheck,{size:16}):O.jsx($e.Copy,{size:16})}),O.jsx("span",{className:Ft.btnDelete,onClick:f,children:O.jsx(T.IconComponent,{name:"Trash2"})}),O.jsx("div",{className:Ft.selectLang,children:O.jsxs(gh,{defaultValue:u||"auto",disabled:!s,onValueChange:x=>n({language:x}),children:[O.jsx(ku,{children:O.jsx(ph,{placeholder:"Language"})}),O.jsxs(Bu,{className:"max-h-60 overflow-y-auto",children:[O.jsx(Xa,{value:"auto",children:"Auto"}),o.map((x,m)=>O.jsx(Xa,{value:x,children:x.charAt(0).toUpperCase()+x.slice(1)},`code-lang-${m}`))]})]})})]}),O.jsx("pre",{ref:l,children:O.jsx(T.NodeViewContent,{as:"code"})})]})}const Nu=ch.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),languages:[],button:({editor:t,t:n,extension:i})=>{var a,o,s;const r=(o=(a=i==null?void 0:i.options)==null?void 0:a.languages)!=null&&o.length?(s=i==null?void 0:i.options)==null?void 0:s.languages:Ce.DEFAULT_LANGUAGE_CODE_BLOCK;return{component:fh,componentProps:{action:(c="js")=>t.commands.setCodeBlock({language:c}),isActive:()=>t.isActive("codeBlock")||!1,disabled:!t.can().toggleCodeBlock(),icon:"Code2",tooltip:n("editor.codeblock.tooltip"),languages:r}}}}},addNodeView(){return T.ReactNodeViewRenderer(Ah)},addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],hh({name:this.name,defaultLanguage:null,defaultTheme:this.options.defaultTheme})]}}),Ch=e=>{if(!e.children.length)return;const t=e.querySelectorAll("span");t&&t.forEach(n=>{var i,r;const a=n.getAttribute("style"),o=(r=(i=n.parentElement)===null||i===void 0?void 0:i.closest("span"))===null||r===void 0?void 0:r.getAttribute("style");n.setAttribute("style",`${o};${a}`)})},kh=T.Mark.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Ch(e),{}):!1}]},renderHTML({HTMLAttributes:e}){return["span",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:e})=>{const{selection:t}=e;return e.doc.nodesBetween(t.from,t.to,(n,i)=>{if(n.isTextblock)return!0;n.marks.filter(r=>r.type===this.type).some(r=>Object.values(r.attrs).some(a=>!!a))||e.removeMark(i,i+n.nodeSize,this.type)}),!0}}}}),Fh=T.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:e=>e.style.fontFamily,renderHTML:e=>e.fontFamily?{style:`font-family: ${e.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:e=>({chain:t})=>t().setMark("textStyle",{fontFamily:e}).run(),unsetFontFamily:()=>({chain:e})=>e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});function Sh(e){var r,a,o;const{t,lang:n}=Ce.useLocale(),i=pe.useMemo(()=>{var u;const s=(u=e==null?void 0:e.items)==null?void 0:u.find(l=>l.isActive());return s&&!s.default?{...s}:{title:e.tooltip,font:t("editor.fontFamily.default.tooltip"),isActive:()=>!1,disabled:!1,action:()=>e.editor.chain().focus().unsetFontFamily().run()}},[t,n,e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(ro,{disabled:e==null?void 0:e.disabled,icon:"MenuDown",title:((r=i==null?void 0:i.font)==null?void 0:r.length)>7?`${(a=i==null?void 0:i.font)==null?void 0:a.slice(0,6)}...`:i==null?void 0:i.font,tooltip:e==null?void 0:e.tooltip})}),O.jsx(T.DropdownMenuContent,{className:"w-full",children:(o=e==null?void 0:e.items)==null?void 0:o.map((s,c)=>{const u=s.font===t("editor.fontFamily.default.tooltip")?{}:{fontFamily:s.font};return O.jsxs(pe.Fragment,{children:[O.jsx(T.DropdownMenuCheckboxItem,{checked:(i==null?void 0:i.font)===s.font,onClick:s.action,children:O.jsx("div",{className:"ml-1 h-full",style:u,children:s.font})}),s.font===t("editor.fontFamily.default.tooltip")&&O.jsx(T.DropdownMenuSeparator,{})]},`font-family-${c}`)})})]})}const Bh=Fh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),fontFamilyList:Ce.DEFAULT_FONT_FAMILY_LIST,button({editor:t,extension:n,t:i}){var u;const{extensions:r=[]}=t.extensionManager??[],a=T.ensureNameValueOptions(((u=n==null?void 0:n.options)==null?void 0:u.fontFamilyList)||[]),o=r.find(l=>l.name==="base-kit"),s=a.map(l=>({action:()=>{t.chain().focus().setFontFamily(l.value).run()},isActive:()=>t.isActive("textStyle",{fontFamily:l.value})||!1,disabled:!t.can().setFontFamily(l.value),title:l.name,font:l.value}));o&&o.options.textStyle!==!1&&s.unshift({action:()=>t.chain().focus().unsetFontFamily().run(),isActive:()=>!1,disabled:!1,font:i("editor.fontFamily.default.tooltip"),title:i("editor.fontFamily.tooltip")});const c=s.filter(l=>l.disabled).length===s.length;return{component:Sh,componentProps:{tooltip:i("editor.fontFamily.tooltip"),disabled:c,items:s,editor:t}}}}}}),Nh=T.Node.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,T.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>T.textblockTypeInputRule({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});function Lh(e){var n;const t=pe.useMemo(()=>{var a;const i=(a=e==null?void 0:e.items)==null?void 0:a.find(o=>o.isActive());return i&&!i.default?{...i}:{title:e.tooltip,level:0,isActive:()=>!1}},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(ro,{disabled:e==null?void 0:e.disabled,icon:"MenuDown",title:t==null?void 0:t.title,tooltip:e==null?void 0:e.tooltip})}),O.jsx(T.DropdownMenuContent,{className:"w-full",children:(n=e==null?void 0:e.items)==null?void 0:n.map((i,r)=>{var a,o;return O.jsxs(pe.Fragment,{children:[O.jsxs(T.DropdownMenuCheckboxItem,{checked:(t==null?void 0:t.title)===i.title,onClick:i.action,children:[O.jsx("div",{className:`heading- ml-1 h-full${i.level}`,children:i.title}),!!((a=i==null?void 0:i.shortcutKeys)!=null&&a.length)&&O.jsx(T.DropdownMenuShortcut,{className:"pl-4",children:(o=i==null?void 0:i.shortcutKeys)==null?void 0:o.map(s=>T.getShortcutKey(s)).join(" ")})]}),i.level===0&&O.jsx(T.DropdownMenuSeparator,{})]},`heading-k-${r}`)})})]})}const Rh=Nh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),levels:[1,2,3,4,5,6],button({editor:t,extension:n,t:i}){var u;const{extensions:r=[]}=t.extensionManager??[],a=((u=n.options)==null?void 0:u.levels)||[],o=r.find(l=>l.name==="base-kit"),s=a.map(l=>({action:()=>t.commands.toggleHeading({level:l}),isActive:()=>t.isActive("heading",{level:l})||!1,disabled:!t.can().toggleHeading({level:l}),title:i(`editor.heading.h${l}.tooltip`),level:l,shortcutKeys:["alt","mod",`${l}`]}));o&&o.options.paragraph!==!1&&s.unshift({action:()=>t.commands.setParagraph(),isActive:()=>t.isActive("paragraph")||!1,disabled:!t.can().setParagraph(),level:0,title:i("editor.paragraph.tooltip"),shortcutKeys:["alt","mod","0"]});const c=s.filter(l=>l.disabled).length===s.length;return{component:Lh,componentProps:{tooltip:i("editor.heading.tooltip"),disabled:c,items:s,editor:t}}}}}}),Ih=T.Extension.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{const t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).every(n=>n):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).every(t=>t)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});function Wh(e){var n;const t=pe.useMemo(()=>{var a;const i=(a=e==null?void 0:e.items)==null?void 0:a.find(o=>o.isActive());return i&&!i.default?{...i,icon:i.icon?i.icon:e.icon}:{title:e==null?void 0:e.tooltip,icon:e.icon,isActive:()=>!1}},[e]);return O.jsxs(T.Popover,{modal:!0,children:[O.jsx(T.PopoverTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:e==null?void 0:e.icon,tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.IconComponent,{className:"ml-1 size-3 text-zinc-500",name:"MenuDown"})})}),O.jsx(T.PopoverContent,{align:"start",className:"flex w-full min-w-4 flex-row gap-1 !p-[4px]",side:"bottom",children:(n=e==null?void 0:e.items)==null?void 0:n.map((i,r)=>{var a,o;return O.jsxs(T.Tooltip,{children:[O.jsx(T.TooltipTrigger,{asChild:!0,children:O.jsx(T.Toggle,{className:"size-7 p-1","data-state":t.title===i.title?"on":"off",onClick:i==null?void 0:i.action,pressed:t.title===i.title,size:"sm",children:(i==null?void 0:i.icon)&&O.jsx(T.IconComponent,{name:i.icon})})}),O.jsxs(T.TooltipContent,{className:"flex flex-col items-center",children:[O.jsx("span",{children:i.title}),!!((a=i.shortcutKeys)!=null&&a.length)&&O.jsx("span",{children:(o=i.shortcutKeys)==null?void 0:o.map(s=>T.getShortcutKey(s)).join(" ")})]})]},`text-align-${r}`)})})]})}const Oh=Ih.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["heading","paragraph","list_item","title"],button({editor:t,extension:n,t:i}){var u;const r=((u=n.options)==null?void 0:u.alignments)||[],a={left:["mod","Shift","L"],center:["mod","Shift","E"],right:["mod","Shift","R"],justify:["mod","Shift","J"]},o={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},s=r.map(l=>{var f,g,d;return{title:i(`editor.textalign.${l}.tooltip`),icon:o[l],shortcutKeys:a[l],isActive:()=>t.isActive({textAlign:l})||!1,action:()=>{var x,m;return(m=(x=t.commands)==null?void 0:x.setTextAlign)==null?void 0:m.call(x,l)},disabled:!((d=(g=(f=t==null?void 0:t.can)==null?void 0:f.call(t))==null?void 0:g.setTextAlign)!=null&&d.call(g,l))}}),c=s.filter(l=>l.disabled).length===s.length;return{component:Wh,componentProps:{icon:"AlignJustify",tooltip:i("editor.textalign.tooltip"),disabled:c,items:s}}}}}});function Mh(e){var r;const{t}=Ce.useLocale(),n=pe.useRef(null),i=pe.useMemo(()=>{const a=(e.items||[]).find(s=>s.isActive());return a||{title:t("editor.fontSize.default.tooltip"),isActive:()=>!1}},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx("div",{ref:n,children:O.jsx(ro,{disabled:e==null?void 0:e.disabled,icon:"MenuDown",title:i==null?void 0:i.title,tooltip:`${e==null?void 0:e.tooltip}`})})}),O.jsx(T.DropdownMenuContent,{container:n.current,className:"max-h-[40vh] w-32 overflow-y-auto",children:(r=e==null?void 0:e.items)==null?void 0:r.map((a,o)=>O.jsx(T.DropdownMenuCheckboxItem,{checked:i.title===a.title,onClick:a.action,children:O.jsx("div",{className:"ml-1 h-full",children:a.title})},`font-size-${o}`))})]})}const Ph=T.Extension.create({name:"fontSize",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["textStyle"],fontSizes:[...Ce.DEFAULT_FONT_SIZE_LIST],button({editor:t,extension:n,t:i}){var c;const r=T.ensureNameValueOptions(((c=n.options)==null?void 0:c.fontSizes)||Ce.DEFAULT_FONT_SIZE_VALUE),a=T.ensureNameValueOptions([Ce.DEFAULT_FONT_SIZE_VALUE])[0],o=r.map(u=>({title:u.value===a.value?i("editor.fontSize.default.tooltip"):String(u.name),isActive:()=>{const{fontSize:l}=t.getAttributes("textStyle");return u.value===a.value&&l===void 0?!0:t.isActive({fontSize:String(u.value)})||!1},action:()=>{if(u.value===a.value){t.commands.unsetFontSize();return}t.commands.setFontSize(String(u.value))},disabled:!t.can().setFontSize(String(u.value)),divider:u.value===a.value||!1,default:u.value===a.value||!1})),s=o.filter(u=>u.disabled).length===o.length;return{component:Mh,componentProps:{editor:t,tooltip:i("editor.fontSize.tooltip"),disabled:s,items:o,maxHeight:280}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>e.style.fontSize.replaceAll(/["']+/g,""),renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),jh=T.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function qh({fill:e}){return O.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 240 240",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:O.jsx("g",{transform:"translate(0.000000, 0.500000)",children:O.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[O.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",id:"矩形",fill:e||"#DF2A3F",fillRule:"evenodd"}),O.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",id:"路径-21",fill:"currentColor",fillRule:"nonzero"}),O.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",id:"路径-22",fill:"currentColor",fillRule:"nonzero"})]})})})})}function Hh(e){const[t,n]=pe.useState(void 0);function i(o){var s;(s=e.action)==null||s.call(e,o)}function r(){var o;(o=e.action)==null||o.call(e,t)}const a=pe.useCallback(T.debounce(o=>{n(o)},350),[]);return O.jsxs("div",{className:"flex items-center h-[32px]",children:[O.jsx(T.ActionButton,{tooltip:e==null?void 0:e.tooltip,disabled:e==null?void 0:e.disabled,action:r,children:O.jsx("span",{className:"flex items-center justify-center text-sm",children:O.jsx(qh,{fill:t})})}),O.jsx(T.ColorPicker,{selectedColor:t,setSelectedColor:a,onChange:i,disabled:e==null?void 0:e.disabled,colors:e==null?void 0:e.colors,defaultColor:e==null?void 0:e.defaultColor,children:O.jsx(T.Button,{variant:"ghost",size:"icon",className:"r!ichtext-h-[32px] !w-3",disabled:e==null?void 0:e.disabled,children:O.jsx(T.IconComponent,{className:"!w-3 !h-3 text-zinc-500",name:"MenuDown"})})})]})}const zh=jh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:n,extension:i}){return{component:Hh,componentProps:{colors:i.options.colors,defaultColor:i.options.defaultColor,action:r=>{r===void 0&&t.chain().focus().unsetColor().run(),typeof r=="string"&&t.chain().focus().setColor(r).run()},isActive:()=>{const{color:r}=t.getAttributes("textStyle");return r&&t.isActive({color:r})||!1},editor:t,disabled:!t.can().setColor(""),tooltip:n("editor.color.tooltip")}}}}}}),Xh=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Vh=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,$h=T.Mark.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[T.markInputRule({find:Xh,type:this.type})]},addPasteRules(){return[T.markPasteRule({find:Vh,type:this.type})]}}),Kh=$h.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),multicolor:!0,button:({editor:t,t:n})=>({component:T.HighlightActionButton,componentProps:{action:i=>{typeof i=="string"&&t.chain().focus().setHighlight({color:i}).run(),i===void 0&&t.chain().focus().unsetHighlight().run()},editor:t,isActive:()=>t.isActive("highlight")||!1,disabled:!t.can().setHighlight(),shortcutKeys:["⇧","mod","H"],tooltip:n("editor.highlight.tooltip")}})}}}),Gh="listItem",ls="textStyle",ds=/^\s*([-+*])\s$/,Zh=T.Node.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Gh,this.editor.getAttributes(ls)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=T.wrappingInputRule({find:ds,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=T.wrappingInputRule({find:ds,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(ls),editor:this.editor})),[e]}}),Yh=Zh.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleBulletList(),isActive:()=>t.isActive("bulletList")||!1,disabled:!1,shortcutKeys:["shift","mod","8"],icon:"List",tooltip:n("editor.bulletlist.tooltip")}})}}}),Qh=T.Node.create({name:"clear",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.chain().focus().clearNodes().unsetAllMarks().run(),disabled:!t.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:n("editor.clear.tooltip")}})}}}),Jh="listItem",hs="textStyle",fs=/^(\d+)\.\s$/,ef=T.Node.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",T.mergeAttributes(this.options.HTMLAttributes,n),0]:["ol",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Jh,this.editor.getAttributes(hs)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=T.wrappingInputRule({find:fs,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=T.wrappingInputRule({find:fs,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(hs)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),tf=ef.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleOrderedList(),isActive:()=>t.isActive("orderedList")||!1,disabled:!1,icon:"ListOrdered",shortcutKeys:["mod","shift","7"],tooltip:n("editor.orderedlist.tooltip")}})}}}),nf=/^\s*(\[([( |x])?\])\s$/,rf=T.Node.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",T.mergeAttributes(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:i})=>{const r=document.createElement("li"),a=document.createElement("label"),o=document.createElement("span"),s=document.createElement("input"),c=document.createElement("div");return a.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",u=>u.preventDefault()),s.addEventListener("change",u=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:l}=u.target;i.isEditable&&typeof n=="function"&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{const g=n();if(typeof g!="number")return!1;const d=f.doc.nodeAt(g);return f.setNodeMarkup(g,void 0,{...d==null?void 0:d.attrs,checked:l}),!0}).run(),!i.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,l)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,l])=>{r.setAttribute(u,l)}),r.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),r.append(a,c),Object.entries(t).forEach(([u,l])=>{r.setAttribute(u,l)}),{dom:r,contentDOM:c,update:u=>u.type!==this.type?!1:(r.dataset.checked=u.attrs.checked,s.checked=u.attrs.checked,!0)}}},addInputRules(){return[T.wrappingInputRule({find:nf,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),af=T.Node.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",T.mergeAttributes(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),of=af.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleTaskList(),isActive:()=>t.isActive("taskList")||!1,disabled:!1,icon:"ListTodo",shortcutKeys:["shift","mod","9"],tooltip:n("editor.tasklist.tooltip")}})}},addExtensions(){return[rf.configure(this.options.taskItem)]}}),sf=/^\s*>\s$/,cf=T.Node.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[T.wrappingInputRule({find:sf,type:this.type})]}}),uf=cf.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"blockquote"},button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.toggleBlockquote(),isActive:()=>t.isActive("blockquote")||!1,disabled:!t.can().toggleBlockquote(),icon:"TextQuote",shortcutKeys:["shift","mod","B"],tooltip:n("editor.blockquote.tooltip")}})}}}),lf="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",df="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",bn=(e,t)=>{for(const n in t)e[n]=t[n];return e},Va="numeric",$a="ascii",Ka="alpha",Mn="asciinumeric",Wn="alphanumeric",Ga="domain",Lu="emoji",hf="scheme",ff="slashscheme",Yr="whitespace";function gf(e,t){return e in t||(t[e]=[]),t[e]}function en(e,t,n){t[Va]&&(t[Mn]=!0,t[Wn]=!0),t[$a]&&(t[Mn]=!0,t[Ka]=!0),t[Mn]&&(t[Wn]=!0),t[Ka]&&(t[Wn]=!0),t[Wn]&&(t[Ga]=!0),t[Lu]&&(t[Ga]=!0);for(const i in t){const r=gf(i,n);r.indexOf(e)<0&&r.push(e)}}function pf(e,t){const n={};for(const i in t)t[i].indexOf(e)>=0&&(n[i]=!0);return n}function Ze(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Ze.groups={};Ze.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let i=0;i<t.jr.length;i++){const r=t.jr[i][0],a=t.jr[i][1];if(a&&r.test(e))return a}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,i){for(let r=0;r<e.length;r++)this.tt(e[r],t,n,i)},tr(e,t,n,i){i=i||Ze.groups;let r;return t&&t.j?r=t:(r=new Ze(t),n&&i&&en(t,n,i)),this.jr.push([e,r]),r},ts(e,t,n,i){let r=this;const a=e.length;if(!a)return r;for(let o=0;o<a-1;o++)r=r.tt(e[o]);return r.tt(e[a-1],t,n,i)},tt(e,t,n,i){i=i||Ze.groups;const r=this;if(t&&t.j)return r.j[e]=t,t;const a=t;let o,s=r.go(e);if(s?(o=new Ze,bn(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new Ze,a){if(i)if(o.t&&typeof o.t=="string"){const c=bn(pf(o.t,i),n);en(a,c,i)}else n&&en(a,n,i);o.t=a}return r.j[e]=o,o}};const Ee=(e,t,n,i,r)=>e.ta(t,n,i,r),We=(e,t,n,i,r)=>e.tr(t,n,i,r),gs=(e,t,n,i,r)=>e.ts(t,n,i,r),le=(e,t,n,i,r)=>e.tt(t,n,i,r),Tt="WORD",Za="UWORD",Ru="ASCIINUMERICAL",Iu="ALPHANUMERICAL",Xn="LOCALHOST",Ya="TLD",Qa="UTLD",wi="SCHEME",gn="SLASH_SCHEME",ao="NUM",Ja="WS",oo="NL",Pn="OPENBRACE",jn="CLOSEBRACE",Vi="OPENBRACKET",$i="CLOSEBRACKET",Ki="OPENPAREN",Gi="CLOSEPAREN",Zi="OPENANGLEBRACKET",Yi="CLOSEANGLEBRACKET",Qi="FULLWIDTHLEFTPAREN",Ji="FULLWIDTHRIGHTPAREN",er="LEFTCORNERBRACKET",tr="RIGHTCORNERBRACKET",nr="LEFTWHITECORNERBRACKET",ir="RIGHTWHITECORNERBRACKET",rr="FULLWIDTHLESSTHAN",ar="FULLWIDTHGREATERTHAN",or="AMPERSAND",so="APOSTROPHE",sr="ASTERISK",Lt="AT",cr="BACKSLASH",ur="BACKTICK",lr="CARET",It="COLON",co="COMMA",dr="DOLLAR",ft="DOT",hr="EQUALS",uo="EXCLAMATION",rt="HYPHEN",qn="PERCENT",fr="PIPE",gr="PLUS",pr="POUND",Hn="QUERY",lo="QUOTE",Wu="FULLWIDTHMIDDLEDOT",ho="SEMI",gt="SLASH",zn="TILDE",mr="UNDERSCORE",Ou="EMOJI",br="SYM";var Mu=Object.freeze({__proto__:null,WORD:Tt,UWORD:Za,ASCIINUMERICAL:Ru,ALPHANUMERICAL:Iu,LOCALHOST:Xn,TLD:Ya,UTLD:Qa,SCHEME:wi,SLASH_SCHEME:gn,NUM:ao,WS:Ja,NL:oo,OPENBRACE:Pn,CLOSEBRACE:jn,OPENBRACKET:Vi,CLOSEBRACKET:$i,OPENPAREN:Ki,CLOSEPAREN:Gi,OPENANGLEBRACKET:Zi,CLOSEANGLEBRACKET:Yi,FULLWIDTHLEFTPAREN:Qi,FULLWIDTHRIGHTPAREN:Ji,LEFTCORNERBRACKET:er,RIGHTCORNERBRACKET:tr,LEFTWHITECORNERBRACKET:nr,RIGHTWHITECORNERBRACKET:ir,FULLWIDTHLESSTHAN:rr,FULLWIDTHGREATERTHAN:ar,AMPERSAND:or,APOSTROPHE:so,ASTERISK:sr,AT:Lt,BACKSLASH:cr,BACKTICK:ur,CARET:lr,COLON:It,COMMA:co,DOLLAR:dr,DOT:ft,EQUALS:hr,EXCLAMATION:uo,HYPHEN:rt,PERCENT:qn,PIPE:fr,PLUS:gr,POUND:pr,QUERY:Hn,QUOTE:lo,FULLWIDTHMIDDLEDOT:Wu,SEMI:ho,SLASH:gt,TILDE:zn,UNDERSCORE:mr,EMOJI:Ou,SYM:br});const Dt=/[a-z]/,Un=new RegExp("\\p{L}","u"),Qr=new RegExp("\\p{Emoji}","u"),vt=/\d/,Jr=/\s/,ps="\r",ea=`
@@ -6,7 +6,7 @@
6
6
  1. Must only contain digits, lowercase ASCII letters or "-"
7
7
  2. Cannot start or end with "-"
8
8
  3. "-" cannot repeat`);Ie.customSchemes.push([e,t])}function Ef(){Ie.scanner=yf(Ie.customSchemes);for(let e=0;e<Ie.tokenQueue.length;e++)Ie.tokenQueue[e][1]({scanner:Ie.scanner});Ie.parser=vf(Ie.scanner.tokens);for(let e=0;e<Ie.pluginQueue.length;e++)Ie.pluginQueue[e][1]({scanner:Ie.scanner,parser:Ie.parser});return Ie.initialized=!0,Ie}function go(e){return Ie.initialized||Ef(),_f(Ie.parser.start,e,Pu(Ie.scanner.start,e))}go.scan=Pu;function qu(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const i=new fo(n),r=go(e),a=[];for(let o=0;o<r.length;o++){const s=r[o];s.isLink&&(!t||s.t===t)&&i.check(s)&&a.push(s.toFormattedObject(i))}return a}function Af(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function Cf(e){return new T.Plugin({key:new T.PluginKey("autolink"),appendTransaction:(t,n,i)=>{const r=t.some(u=>u.docChanged)&&!n.doc.eq(i.doc),a=t.some(u=>u.getMeta("preventAutolink"));if(!r||a)return;const{tr:o}=i,s=T.combineTransactionSteps(n.doc,[...t]);if(T.getChangedRanges(s).forEach(({newRange:u})=>{const l=T.findChildrenInRange(i.doc,u,d=>d.isTextblock);let f,g;if(l.length>1?(f=l[0],g=i.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):l.length&&i.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(f=l[0],g=i.doc.textBetween(f.pos,u.to,void 0," ")),f&&g){const d=g.split(" ").filter(b=>b!=="");if(d.length<=0)return!1;const x=d[d.length-1],m=f.pos+g.lastIndexOf(x);if(!x)return!1;const h=go(x).map(b=>b.toObject(e.defaultProtocol));if(!Af(h))return!1;h.filter(b=>b.isLink).map(b=>({...b,from:m+b.start+1,to:m+b.end+1})).filter(b=>i.schema.marks.code?!i.doc.rangeHasMark(b.from,b.to,i.schema.marks.code):!0).filter(b=>e.validate(b.value)).filter(b=>e.shouldAutoLink(b.value)).forEach(b=>{T.getMarksBetween(b.from,b.to,i.doc).some(p=>p.mark.type===e.type)||o.addMark(b.from,b.to,e.type.create({href:b.href}))})}}),!!o.steps.length)return o}})}function kf(e){return new T.Plugin({key:new T.PluginKey("handleClickLink"),props:{handleClick:(t,n,i)=>{var r,a;if(i.button!==0||!t.editable)return!1;let o=i.target;const s=[];for(;o.nodeName!=="DIV";)s.push(o),o=o.parentNode;if(!s.find(g=>g.nodeName==="A"))return!1;const c=T.getAttributes(t.state,e.type.name),u=i.target,l=(r=u==null?void 0:u.href)!==null&&r!==void 0?r:c.href,f=(a=u==null?void 0:u.target)!==null&&a!==void 0?a:c.target;return u&&l?(window.open(l,f),!0):!1}}})}function Ff(e){return new T.Plugin({key:new T.PluginKey("handlePasteLink"),props:{handlePaste:(t,n,i)=>{const{state:r}=t,{selection:a}=r,{empty:o}=a;if(o)return!1;let s="";i.content.forEach(u=>{s+=u.textContent});const c=qu(s,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===s);return!s||!c?!1:e.editor.commands.setMark(e.type,{href:c.href})}}})}const Sf=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function $t(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(i=>{const r=typeof i=="string"?i:i.scheme;r&&n.push(r)}),!e||e.replace(Sf,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Bf=T.Mark.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){Ds(e);return}Ds(e.scheme,e.optionalSlashes)})},onDestroy(){Uf()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!$t(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!$t(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!$t(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",T.mergeAttributes(this.options.HTMLAttributes,e),0]:["a",T.mergeAttributes(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:i=>!!$t(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:i=>!!$t(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[T.markPasteRule({find:e=>{const t=[];if(e){const{protocols:n,defaultProtocol:i}=this.options,r=qu(e).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:o=>!!$t(o,n),protocols:n,defaultProtocol:i}));r.length&&r.forEach(a=>t.push({text:a.value,data:{href:a.href},index:a.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(Cf({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:i=>this.options.isAllowedUri(i,{defaultValidate:r=>!!$t(r,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&e.push(kf({type:this.type})),this.options.linkOnPaste&&e.push(Ff({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}});function Nf(e){const[t,n]=pe.useState(!1);function i(r,a,o){e.action&&(e.action({link:r,text:a,openInNewTab:o}),n(!1))}return O.jsxs(T.Popover,{modal:!0,open:t,onOpenChange:n,children:[O.jsx(T.PopoverTrigger,{disabled:e==null?void 0:e.disabled,asChild:!0,children:O.jsx(T.ActionButton,{tooltip:e==null?void 0:e.tooltip,isActive:e==null?void 0:e.isActive,disabled:e==null?void 0:e.disabled,children:O.jsx(T.IconComponent,{name:e==null?void 0:e.icon})})}),O.jsx(T.PopoverContent,{hideWhenDetached:!0,className:"w-full",align:"start",side:"bottom",children:O.jsx(T.LinkEditBlock,{editor:e.editor,onSetLink:i})})]})}const Lf=Bf.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",T.mergeAttributes(this.options.HTMLAttributes,e,{class:"link"}),0]},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),openOnClick:!0,button:({editor:t,t:n})=>({component:Nf,componentProps:{editor:t,action:i=>{const{link:r,text:a,openInNewTab:o}=i;t.chain().extendMarkRange("link").insertContent({type:"text",text:a,marks:[{type:"link",attrs:{href:r,target:o?"_blank":""}}]}).setLink({href:r}).focus().run()},id:"linkk",isActive:()=>t.isActive("link")||!1,disabled:!t.can().setLink({href:""}),icon:"Link",tooltip:n("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new T.Plugin({props:{handleClick:(e,t)=>{const{schema:n,doc:i,tr:r}=e.state,a=T.getMarkRange(i.resolve(t),n.marks.link);if(!a)return!1;const o=i.resolve(a.from),s=i.resolve(a.to),c=r.setSelection(new T.TextSelection(o,s));e.dispatch(c)}}})]}}),Rf=T.Node.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",T.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{selection:n}=t,{$from:i,$to:r}=n,a=e();return i.parentOffset===0?a.insertContentAt({from:Math.max(i.pos-1,0),to:r.pos},{type:this.name}):T.isNodeSelection(n)?a.insertContentAt(r.pos,{type:this.name}):a.insertContent({type:this.name}),a.command(({tr:o,dispatch:s})=>{var c;if(s){const{$to:u}=o.selection,l=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?o.setSelection(T.TextSelection.create(o.doc,u.pos+1)):u.nodeAfter.isBlock?o.setSelection(T.NodeSelection.create(o.doc,u.pos)):o.setSelection(T.TextSelection.create(o.doc,u.pos));else{const f=(c=u.parent.type.contentMatch.defaultType)===null||c===void 0?void 0:c.create();f&&(o.insert(l,f),o.setSelection(T.TextSelection.create(o.doc,l+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[T.nodeInputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),If=Rf.extend({renderHTML(){return["div",T.mergeAttributes(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.setHorizontalRule(),disabled:!t.can().setHorizontalRule(),icon:"Minus",shortcutKeys:["mod","alt","S"],tooltip:n("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});var yr=200,He=function(){};He.prototype.append=function(t){return t.length?(t=He.from(t),!this.length&&t||t.length<yr&&this.leafAppend(t)||this.length<yr&&t.leafPrepend(this)||this.appendInner(t)):this};He.prototype.prepend=function(t){return t.length?He.from(t).append(this):this};He.prototype.appendInner=function(t){return new Wf(this,t)};He.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?He.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};He.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};He.prototype.forEach=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length),n<=i?this.forEachInner(t,n,i,0):this.forEachInvertedInner(t,n,i,0)};He.prototype.map=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length);var r=[];return this.forEach(function(a,o){return r.push(t(a,o))},n,i),r};He.from=function(t){return t instanceof He?t:t&&t.length?new Hu(t):He.empty};var Hu=function(e){function t(i){e.call(this),this.values=i}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,a){return r==0&&a==this.length?this:new t(this.values.slice(r,a))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,a,o,s){for(var c=a;c<o;c++)if(r(this.values[c],s+c)===!1)return!1},t.prototype.forEachInvertedInner=function(r,a,o,s){for(var c=a-1;c>=o;c--)if(r(this.values[c],s+c)===!1)return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=yr)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=yr)return new t(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(He);He.empty=new Hu([]);var Wf=function(e){function t(n,i){e.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)},t.prototype.forEachInner=function(i,r,a,o){var s=this.left.length;if(r<s&&this.left.forEachInner(i,r,Math.min(a,s),o)===!1||a>s&&this.right.forEachInner(i,Math.max(r-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},t.prototype.forEachInvertedInner=function(i,r,a,o){var s=this.left.length;if(r>s&&this.right.forEachInvertedInner(i,r-s,Math.max(a,s)-s,o+s)===!1||a<s&&this.left.forEachInvertedInner(i,Math.min(r,s),a,o)===!1)return!1},t.prototype.sliceInner=function(i,r){if(i==0&&r==this.length)return this;var a=this.left.length;return r<=a?this.left.slice(i,r):i>=a?this.right.slice(i-a,r-a):this.left.slice(i,a).append(this.right.slice(0,r-a))},t.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new t(r,this.right)},t.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new t(this.left,new t(this.right,i)):new t(this,i)},t}(He);const Of=500;class ut{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let r,a;n&&(r=this.remapping(i,this.items.length),a=r.maps.length);let o=t.tr,s,c,u=[],l=[];return this.items.forEach((f,g)=>{if(!f.step){r||(r=this.remapping(i,g+1),a=r.maps.length),a--,l.push(f);return}if(r){l.push(new pt(f.map));let d=f.step.map(r.slice(a)),x;d&&o.maybeStep(d).doc&&(x=o.mapping.maps[o.mapping.maps.length-1],u.push(new pt(x,void 0,void 0,u.length+l.length))),a--,x&&r.appendMap(x,a)}else o.maybeStep(f.step);if(f.selection)return s=r?f.selection.map(r.slice(a)):f.selection,c=new ut(this.items.slice(0,i).append(l.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,i,r){let a=[],o=this.eventCount,s=this.items,c=!r&&s.length?s.get(s.length-1):null;for(let l=0;l<t.steps.length;l++){let f=t.steps[l].invert(t.docs[l]),g=new pt(t.mapping.maps[l],f,n),d;(d=c&&c.merge(g))&&(g=d,l?a.pop():s=s.slice(0,s.length-1)),a.push(g),n&&(o++,n=void 0),r||(c=g)}let u=o-i.depth;return u>Pf&&(s=Mf(s,u),o-=u),new ut(s.append(a),o)}remapping(t,n){let i=new T.Mapping;return this.items.forEach((r,a)=>{let o=r.mirrorOffset!=null&&a-r.mirrorOffset>=t?i.maps.length-r.mirrorOffset:void 0;i.appendMap(r.map,o)},t,n),i}addMaps(t){return this.eventCount==0?this:new ut(this.items.append(t.map(n=>new pt(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(g=>{g.selection&&s--},r);let c=n;this.items.forEach(g=>{let d=a.getMirror(--c);if(d==null)return;o=Math.min(o,d);let x=a.maps[d];if(g.step){let m=t.steps[d].invert(t.docs[d]),h=g.selection&&g.selection.map(a.slice(c+1,d));h&&s++,i.push(new pt(x,m,h))}else i.push(new pt(x))},r);let u=[];for(let g=n;g<o;g++)u.push(new pt(a.maps[g]));let l=this.items.slice(0,r).append(u).append(i),f=new ut(l,s);return f.emptyItemCount()>Of&&(f=f.compress(this.items.length-i.length)),f}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),i=n.maps.length,r=[],a=0;return this.items.forEach((o,s)=>{if(s>=t)r.push(o),o.selection&&a++;else if(o.step){let c=o.step.map(n.slice(i)),u=c&&c.getMap();if(i--,u&&n.appendMap(u,i),c){let l=o.selection&&o.selection.map(n.slice(i));l&&a++;let f=new pt(u.invert(),c,l),g,d=r.length-1;(g=r.length&&r[d].merge(f))?r[d]=g:r.push(f)}}else o.map&&i--},this.items.length,0),new ut(He.from(r.reverse()),a)}}ut.empty=new ut(He.empty,0);function Mf(e,t){let n;return e.forEach((i,r)=>{if(i.selection&&t--==0)return n=r,!1}),e.slice(n)}class pt{constructor(t,n,i,r){this.map=t,this.step=n,this.selection=i,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new pt(n.getMap().invert(),n,this.selection)}}}class Rt{constructor(t,n,i,r,a){this.done=t,this.undone=n,this.prevRanges=i,this.prevTime=r,this.prevComposition=a}}const Pf=20;function jf(e,t,n,i){let r=n.getMeta(tn),a;if(r)return r.historyState;n.getMeta(zf)&&(e=new Rt(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(o&&o.getMeta(tn))return o.getMeta(tn).redo?new Rt(e.done.addTransform(n,void 0,i,Ti(t)),e.undone,vs(n.mapping.maps),e.prevTime,e.prevComposition):new Rt(e.done,e.undone.addTransform(n,void 0,i,Ti(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),c=e.prevTime==0||!o&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-i.newGroupDelay||!qf(n,e.prevRanges)),u=o?ia(e.prevRanges,n.mapping):vs(n.mapping.maps);return new Rt(e.done.addTransform(n,c?t.selection.getBookmark():void 0,i,Ti(t)),ut.empty,u,n.time,s??e.prevComposition)}else return(a=n.getMeta("rebased"))?new Rt(e.done.rebased(n,a),e.undone.rebased(n,a),ia(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Rt(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),ia(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function qf(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((i,r)=>{for(let a=0;a<t.length;a+=2)i<=t[a+1]&&r>=t[a]&&(n=!0)}),n}function vs(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((i,r,a,o)=>t.push(a,o));return t}function ia(e,t){if(!e)return null;let n=[];for(let i=0;i<e.length;i+=2){let r=t.map(e[i],1),a=t.map(e[i+1],-1);r<=a&&n.push(r,a)}return n}function Hf(e,t,n){let i=Ti(t),r=tn.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,i);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),r,i),c=new Rt(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(tn,{redo:n,historyState:c})}let ra=!1,_s=null;function Ti(e){let t=e.plugins;if(_s!=t){ra=!1,_s=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){ra=!0;break}}return ra}const tn=new T.PluginKey("history"),zf=new T.PluginKey("closeHistory");function Xf(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new T.Plugin({key:tn,state:{init(){return new Rt(ut.empty,ut.empty,null,0,-1)},apply(t,n,i){return jf(n,i,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let i=n.inputType,r=i=="historyUndo"?Xu:i=="historyRedo"?Vu:null;return r?(n.preventDefault(),r(t.state,t.dispatch)):!1}}}})}function zu(e,t){return(n,i)=>{let r=tn.getState(n);if(!r||(e?r.undone:r.done).eventCount==0)return!1;if(i){let a=Hf(r,n,e);a&&i(t?a.scrollIntoView():a)}return!0}}const Xu=zu(!1,!0),Vu=zu(!0,!0),Vf=T.Extension.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Xu(e,t),redo:()=>({state:e,dispatch:t})=>Vu(e,t)}},addProseMirrorPlugins(){return[Xf(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});function $f(e){var u;const{icon:t=void 0,tooltip:n=void 0,customClass:i="",tooltipOptions:r={},action:a=void 0,isActive:o=void 0,children:s}=e,c=T.icons[t];return O.jsxs(T.Tooltip,{children:[O.jsx(T.TooltipTrigger,{asChild:!0,children:O.jsxs(T.Toggle,{size:"sm",className:`w-[32px] h-[32px] ${i}`,disabled:o==null?void 0:o(),onClick:a,children:[c&&O.jsx(c,{className:"w-4 h-4"}),s&&O.jsx(O.Fragment,{children:s})]})}),n&&O.jsx(T.TooltipContent,{...r,children:O.jsxs("div",{className:"flex flex-col items-center text-center max-w-24",children:[O.jsx("div",{children:n}),!!((u=e==null?void 0:e.shortcutKeys)!=null&&u.length)&&O.jsx("span",{children:T.getShortcutKeys(e==null?void 0:e.shortcutKeys)})]})})]})}const Kf=["undo","redo"],Gf=Vf.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),depth:100,newGroupDelay:500,button:({editor:t,t:n})=>Kf.map(i=>({component:$f,componentProps:{action:()=>{i==="undo"&&t.chain().focus().undo().run(),i==="redo"&&t.chain().focus().redo().run()},shortcutKeys:i==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:i==="undo"?!t.can().undo():!t.can().redo(),isActive:()=>i==="undo"?!t.can().undo():!t.can().redo(),icon:i==="undo"?"Undo2":"Redo2",tooltip:n(`editor.${i}.tooltip`)}}))}}}),Zf=T.Extension.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){const i=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(i)}return t.nodeSize},this.storage.words=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new T.Plugin({key:new T.PluginKey("characterCount"),appendTransaction:(t,n,i)=>{if(e)return;const r=this.options.limit;if(r==null||r===0){e=!0;return}const a=this.storage.characters({node:i.doc});if(a>r){const o=a-r,s=0,c=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);const u=i.tr.deleteRange(s,c);return e=!0,u}e=!0},filterTransaction:(t,n)=>{const i=this.options.limit;if(!t.docChanged||i===0||i===null||i===void 0)return!0;const r=this.storage.characters({node:n.doc}),a=this.storage.characters({node:t.doc});if(a<=i||r>i&&a>i&&a<=r)return!0;if(r>i&&a>i&&a>r||!t.getMeta("paste"))return!1;const s=t.selection.$head.pos,c=a-i,u=s-c,l=s;return t.deleteRange(u,l),!(this.storage.characters({node:t.doc})>i)}})]}});function Yf(e={}){return new T.Plugin({view(t){return new Qf(t,e)}})}class Qf{constructor(t,n){var i;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(i=n.width)!==null&&i!==void 0?i:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let a=o=>{this[r](o)};return t.dom.addEventListener(r,a),{name:r,handler:a}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,i;if(n){let s=t.nodeBefore,c=t.nodeAfter;if(s||c){let u=this.editorView.nodeDOM(this.cursorPos-(s?s.nodeSize:0));if(u){let l=u.getBoundingClientRect(),f=s?l.bottom:l.top;s&&c&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:l.left,right:l.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!i){let s=this.editorView.coordsAtPos(this.cursorPos);i={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}let r=this.editorView.dom.offsetParent;this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let a,o;if(!r||r==document.body&&getComputedStyle(r).position=="static")a=-pageXOffset,o=-pageYOffset;else{let s=r.getBoundingClientRect();a=s.left-r.scrollLeft,o=s.top-r.scrollTop}this.element.style.left=i.left-a+"px",this.element.style.top=i.top-o+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),i=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),r=i&&i.type.spec.disableDropCursor,a=typeof r=="function"?r(this.editorView,n,t):r;if(n&&!a){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=T.dropPoint(this.editorView.state.doc,o,this.editorView.dragging.slice);s!=null&&(o=s)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const Jf=T.Extension.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Yf(this.options)]}}),eg=T.Extension.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:i}=this.editor,{anchor:r}=t,a=[];if(!n||!i)return T.DecorationSet.create(e,[]);let o=0;this.options.mode==="deepest"&&e.descendants((c,u)=>{if(c.isText)return;if(!(r>=u&&r<=u+c.nodeSize-1))return!1;o+=1});let s=0;return e.descendants((c,u)=>{if(c.isText||!(r>=u&&r<=u+c.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&o-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";a.push(T.Decoration.node(u,u+c.nodeSize,{class:this.options.className}))}),T.DecorationSet.create(e,a)}}})]}});class Oe extends T.Selection{constructor(t){super(t,t)}map(t,n){let i=t.resolve(n.map(this.head));return Oe.valid(i)?new Oe(i):T.Selection.near(i)}content(){return T.Slice.empty}eq(t){return t instanceof Oe&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Oe(t.resolve(n.pos))}getBookmark(){return new po(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!tg(t)||!ng(t))return!1;let i=n.type.spec.allowGapCursor;if(i!=null)return i;let r=n.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,i=!1){e:for(;;){if(!i&&Oe.valid(t))return t;let r=t.pos,a=null;for(let o=t.depth;;o--){let s=t.node(o);if(n>0?t.indexAfter(o)<s.childCount:t.index(o)>0){a=s.child(n>0?t.indexAfter(o):t.index(o)-1);break}else if(o==0)return null;r+=n;let c=t.doc.resolve(r);if(Oe.valid(c))return c}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!T.NodeSelection.isSelectable(a)){t=t.doc.resolve(r+a.nodeSize*n),i=!1;continue e}break}a=o,r+=n;let s=t.doc.resolve(r);if(Oe.valid(s))return s}return null}}}Oe.prototype.visible=!1;Oe.findFrom=Oe.findGapCursorFrom;T.Selection.jsonID("gapcursor",Oe);class po{constructor(t){this.pos=t}map(t){return new po(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Oe.valid(n)?new Oe(n):T.Selection.near(n)}}function tg(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),i=e.node(t);if(n==0){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(n-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function ng(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),i=e.node(t);if(n==i.childCount){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(n);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function ig(){return new T.Plugin({props:{decorations:sg,createSelectionBetween(e,t,n){return t.pos==n.pos&&Oe.valid(n)?new Oe(n):null},handleClick:ag,handleKeyDown:rg,handleDOMEvents:{beforeinput:og}}})}const rg=T.keydownHandler({ArrowLeft:si("horiz",-1),ArrowRight:si("horiz",1),ArrowUp:si("vert",-1),ArrowDown:si("vert",1)});function si(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(i,r,a){let o=i.selection,s=t>0?o.$to:o.$from,c=o.empty;if(o instanceof T.TextSelection){if(!a.endOfTextblock(n)||s.depth==0)return!1;c=!1,s=i.doc.resolve(t>0?s.after():s.before())}let u=Oe.findGapCursorFrom(s,t,c);return u?(r&&r(i.tr.setSelection(new Oe(u))),!0):!1}}function ag(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!Oe.valid(i))return!1;let r=e.posAtCoords({left:n.clientX,top:n.clientY});return r&&r.inside>-1&&T.NodeSelection.isSelectable(e.state.doc.nodeAt(r.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Oe(i))),!0)}function og(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Oe))return!1;let{$from:n}=e.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!i)return!1;let r=T.Fragment.empty;for(let o=i.length-1;o>=0;o--)r=T.Fragment.from(i[o].createAndFill(null,r));let a=e.state.tr.replace(n.pos,n.pos,new T.Slice(r,0,0));return a.setSelection(T.TextSelection.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function sg(e){if(!(e.selection instanceof Oe))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",T.DecorationSet.create(e.doc,[T.Decoration.widget(e.selection.head,t,{key:"gapcursor"})])}const cg=T.Extension.create({name:"gapCursor",addProseMirrorPlugins(){return[ig()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=T.callOrReturn(T.getExtensionField(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),ug=T.Node.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",T.mergeAttributes(this.options.HTMLAttributes,e)]},renderText(){return`
9
- `},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:r,storedMarks:a}=n;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=i.extensionManager,c=a||r.$to.parentOffset&&r.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:l})=>{if(l&&c&&o){const f=c.filter(g=>s.includes(g.type.name));u.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),lg=T.Node.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),dg=T.Node.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),hg=T.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,r=[];if(!n)return null;const a=this.editor.isEmpty;return e.descendants((o,s)=>{const c=i>=s&&i<=s+o.nodeSize,u=!o.isLeaf&&T.isNodeEmpty(o);if((c||!this.options.showOnlyCurrent)&&u){const l=[this.options.emptyNodeClass];a&&l.push(this.options.emptyEditorClass);const f=T.Decoration.node(s,s+o.nodeSize,{class:l.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:s,hasAnchor:c}):this.options.placeholder});r.push(f)}return this.options.includeChildren}),T.DecorationSet.create(e,r)}}})]}}),fg=T.Node.create({name:"text",group:"inline"}),gg=T.Node.create({name:"doc",topNode:!0,content:"block+"}),pg=gg.extend({content:"(block|columns)+"}),mg=T.Extension.create({name:"columnActionButton",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>{t.chain().focus().insertColumns({cols:2}).run()},icon:"Columns",tooltip:n("editor.columns.tooltip")}})}}}),bg=T.Extension.create({name:"selection",addProseMirrorPlugins(){const{editor:e}=this;return[new T.Plugin({key:new T.PluginKey("selection"),props:{decorations(t){return t.selection.empty||e.isFocused===!0?null:T.DecorationSet.create(t.doc,[T.Decoration.inline(t.selection.from,t.selection.to,{class:"selection"})])}}})]}});function yg(e){const{t}=Ce.useLocale(),n=pe.useMemo(()=>[{name:"paragraph",label:t("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:t("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:t("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:t("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:t("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:t("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:t("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:t("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:t("editor.codeblock.tooltip"),isActive:()=>e.editor.isActive("codeBlock"),iconName:"Code2",action:()=>e.editor.chain().focus().clearNodes().toggleCodeBlock().run()}],[e.editor,t]),i=pe.useMemo(()=>n.findLast(r=>r.isActive())??{label:"Empty"},[n]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,children:O.jsxs(T.Button,{className:"flex h-[32px] gap-1 px-1.5",variant:"ghost",children:[O.jsxs("span",{className:"whitespace-nowrap text-sm font-normal",children:[" ",i==null?void 0:i.label]}),O.jsx($e.ChevronDown,{className:"size-4"})]})}),O.jsx(T.DropdownMenuContent,{align:"start",className:"w-full p-1",hideWhenDetached:!0,sideOffset:5,children:n.map((r,a)=>{var s;const o=T.icons[r.iconName];return O.jsx(T.DropdownMenuCheckboxItem,{checked:((s=r.isActive)==null?void 0:s.call(r))||!1,className:"cursor-pointer",onClick:()=>r.action(),children:O.jsxs("div",{className:"flex items-center gap-2 px-2",children:[O.jsx(o,{className:"h3 w-3"}),O.jsxs("span",{children:[" ",r.label]})]})},`text-bubble-${a}`)})})]})}const xg=T.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:yg,componentProps:{}})}}});function ws({types:e,node:t}){return Array.isArray(e)&&e.includes(t.type)||t.type===e}const Dg=T.Extension.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph"]}},addProseMirrorPlugins(){const e=new T.PluginKey(this.name),t=Object.entries(this.editor.schema.nodes).map(([,n])=>n).filter(n=>this.options.notAfter.includes(n.name));return[new T.Plugin({key:e,appendTransaction:(n,i,r)=>{const{doc:a,tr:o,schema:s}=r,c=e.getState(r),u=a.content.size,l=s.nodes[this.options.node];if(c)return o.insert(u,l.create())},state:{init:(n,i)=>{const r=i.tr.doc.lastChild;return!ws({node:r,types:t})},apply:(n,i)=>{if(!n.docChanged)return i;const r=n.doc.lastChild;return!ws({node:r,types:t})}}})]}}),vg=T.Extension.create({name:"base-kit",addExtensions(){const e=[];return this.options.document!==!1&&e.push(pg.configure()),this.options.placeholder!==!1&&e.push(hg.configure({placeholder:({node:t,pos:n,editor:i})=>{var r,a,o,s,c;return((r=t==null?void 0:t.type)==null?void 0:r.name)==="columns"||((a=t==null?void 0:t.content)==null?void 0:a.size)!==0?"":((o=t==null?void 0:t.type)==null?void 0:o.name)==="heading"?`${Ce.localeActions.t(`editor.heading.h${t.attrs.level}.tooltip`)}`:((s=t==null?void 0:t.type)==null?void 0:s.name)==="codeBlock"||((c=t==null?void 0:t.type)==null?void 0:c.name)==="table"?"":i.extensionManager.extensions.some(u=>u.name==="slashCommand")?Ce.localeActions.t("editor.slash"):Ce.localeActions.t("editor.content")},...this.options.placeholder})),this.options.focus!==!1&&e.push(eg.configure({className:"focus",...this.options.focus})),this.options.text!==!1&&e.push(fg.configure()),this.options.textBubble!==!1&&e.push(xg.configure()),this.options.gapcursor!==!1&&e.push(cg.configure()),this.options.dropcursor!==!1&&e.push(Jf.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&e.push(Zf.configure(this.options.characterCount)),this.options.paragraph!==!1&&e.push(dg.configure(this.options.paragraph)),this.options.hardBreak!==!1&&e.push(ug.configure(this.options.hardBreak)),this.options.listItem!==!1&&e.push(lg.configure(this.options.listItem)),this.options.textStyle!==!1&&e.push(kh.configure(this.options.textStyle)),this.options.trailingNode!==!1&&e.push(Dg.configure(this.options.trailingNode)),this.options.selection!==!1&&e.push(bg),this.options.multiColumn!==!1&&e.push(T.Column,T.MultiColumn),e}}),$u=T.Mark.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Ku=T.Mark.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),_g=T.Extension.create({name:"subAndSuperScript",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,extension:n,t:i})=>{const r=n.options.subscript,a=n.options.superscript,o={component:T.ActionButton,componentProps:{action:()=>t.commands.toggleSubscript(),isActive:()=>t.isActive("subscript")||!1,disabled:!t.can().toggleSubscript(),icon:"Subscript",tooltip:i("editor.subscript.tooltip")}},s={component:T.ActionButton,componentProps:{action:()=>t.commands.toggleSuperscript(),isActive:()=>t.isActive("superscript")||!1,disabled:!t.can().toggleSuperscript(),icon:"Superscript",tooltip:i("editor.superscript.tooltip")}},c=[];return r!==!1&&c.push(o),a!==!1&&c.push(s),c}}},addExtensions(){const e=[];return this.options.subscript!==!1&&e.push($u.configure(this.options.subscript)),this.options.superscript!==!1&&e.push(Ku.configure(this.options.superscript)),e}});function wg(e){var n;const t=pe.useMemo(()=>{var a;const i=(a=e==null?void 0:e.items)==null?void 0:a.find(o=>o.isActive());return i&&!i.default?{...i,icon:i!=null&&i.icon?i==null?void 0:i.icon:e==null?void 0:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:e==null?void 0:e.icon,tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.MenuDown,{className:"size-3 text-gray-500"})})}),O.jsx(T.DropdownMenuContent,{className:"w-full",children:(n=e==null?void 0:e.items)==null?void 0:n.map((i,r)=>O.jsxs(T.DropdownMenuCheckboxItem,{checked:t.title===i.title,className:"flex items-center gap-3",onClick:i.action,children:[O.jsx(T.IconComponent,{name:i==null?void 0:i.icon}),O.jsx("span",{className:"ml-1",children:i.title}),!!(i!=null&&i.shortcutKeys)&&O.jsx("span",{className:"ml-auto text-xs tracking-widest opacity-60",children:T.getShortcutKeys(i.shortcutKeys)})]},`more-mark-${r}`))})]})}const Tg=T.Extension.create({name:"moreMark",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,extension:n,t:i}){const r=n.options.subscript,a=n.options.superscript,o={action:()=>t.commands.toggleSubscript(),isActive:()=>t.isActive("subscript")||!1,disabled:!t.can().toggleSubscript(),icon:"Subscript",title:i("editor.subscript.tooltip"),shortcutKeys:["mod","."]},s={action:()=>t.commands.toggleSuperscript(),isActive:()=>t.isActive("superscript")||!1,disabled:!t.can().toggleSuperscript(),icon:"Superscript",title:i("editor.superscript.tooltip"),shortcutKeys:["mod",","]},c=[];return r!==!1&&c.push(o),a!==!1&&c.push(s),{component:wg,componentProps:{icon:"Type",tooltip:i("editor.moremark"),disabled:!t.isEditable,items:c}}}}},addExtensions(){const e=[];return this.options.subscript!==!1&&e.push($u.configure(this.options.subscript)),this.options.superscript!==!1&&e.push(Ku.configure(this.options.superscript)),e}}),Ug=T.Extension.create({name:"indent",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","blockquote"],minIndent:T.IndentProps.min,maxIndent:T.IndentProps.max,button({editor:t,t:n}){return[{component:T.ActionButton,componentProps:{action:()=>{t.commands.indent()},shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")}},{component:T.ActionButton,componentProps:{action:()=>{t.commands.outdent()},shortcutKeys:["Shift","Tab"],icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:e=>{const t=e.dataset.indent;return(t?Number.parseInt(t,10):0)||0},renderHTML:e=>e.indent?{"data-indent":e.indent}:{}}}}]},addCommands(){return{indent:()=>T.createIndentCommand({delta:T.IndentProps.more,types:this.options.types}),outdent:()=>T.createIndentCommand({delta:T.IndentProps.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});function Eg(e){return Number.parseFloat(e.replace("%",""))/100}function Ag(e){const{t}=Ce.useLocale(),[n,i]=pe.useState("default");function r(o){o==="default"?e.editor.commands.unsetLineHeight():e.editor.commands.setLineHeight(o),i(o)}const a=pe.useMemo(()=>{const c=e.editor.extensionManager.extensions.find(u=>u.name==="lineHeight").options.lineHeights.map(u=>({label:Eg(u),value:u}));return c.unshift({label:t("editor.default"),value:"default"}),c},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:"LineHeight",tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.IconComponent,{className:"ml-1 size-3 text-zinc-500",name:"MenuDown"})})}),O.jsx(T.DropdownMenuContent,{className:"min-w-24",children:a==null?void 0:a.map((o,s)=>O.jsx(T.DropdownMenuCheckboxItem,{checked:o.value===n,onClick:()=>r(o.value),children:o.label},`lineHeight-${s}`))})]})}const Cg=["paragraph","heading","list_item","todo_item"];function kg(e,t){const{selection:n,doc:i}=e;if(!n||!i||!(n instanceof T.TextSelection||n instanceof T.AllSelection))return e;const{from:r,to:a}=n,o=[],s=t&&t!==Ce.DEFAULT_LINE_HEIGHT?t:null;if(i.nodesBetween(r,a,(c,u)=>{const l=c.type;return Cg.includes(l.name)?((c.attrs.lineHeight||null)!==s&&o.push({node:c,pos:u,nodeType:l}),l.name!=="list_item"&&l.name!=="todo_item"):!0}),o.length===0)return e;for(const c of o){const{node:u,pos:l,nodeType:f}=c;let{attrs:g}=u;g={...g,lineHeight:s},e=e.setNodeMarkup(l,f,g,u.marks)}return e}function Fg(e){return({state:t,dispatch:n})=>{const{selection:i}=t;let{tr:r}=t;return r=r.setSelection(i),r=kg(r,e),r.docChanged?(n&&n(r),!0):!1}}const Sg=T.Extension.create({name:"lineHeight",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:Ce.DEFAULT_LINE_HEIGHT_LIST,defaultHeight:Ce.DEFAULT_LINE_HEIGHT,button({editor:t,t:n}){return{component:Ag,componentProps:{editor:t,tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight||this.options.defaultHeight,renderHTML:e=>e.lineHeight===this.options.defaultHeight||!e.lineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>Fg(e),unsetLineHeight:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"lineHeight"))}}});function Bg(e){var t;const{char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:a,startOfLine:o,$position:s}=e,c=i&&!r,u=T.escapeForRegEx(n),l=new RegExp(`\\s${u}$`),f=o?"^":"",g=r?"":u,d=c?new RegExp(`${f}${u}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${f}(?:^)?${u}[^\\s${g}]*`,"gm"),x=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!x)return null;const m=s.pos-x.length,h=Array.from(x.matchAll(d)).pop();if(!h||h.input===void 0||h.index===void 0)return null;const b=h.input.slice(Math.max(0,h.index-1),h.index),p=new RegExp(`^[${a==null?void 0:a.join("")}\0]?$`).test(b);if(a!==null&&!p)return null;const D=m+h.index;let w=D+h[0].length;return c&&l.test(x.slice(w-1,w+1))&&(h[0]+=" ",w+=1),D<s.pos&&w>=s.pos?{range:{from:D,to:w},query:h[0].slice(n.length),text:h[0]}:null}const Ng=new T.PluginKey("suggestion");function mo({pluginKey:e=Ng,editor:t,char:n="@",allowSpaces:i=!1,allowToIncludeChar:r=!1,allowedPrefixes:a=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:c="suggestion",command:u=()=>null,items:l=()=>[],render:f=()=>({}),allow:g=()=>!0,findSuggestionMatch:d=Bg}){let x;const m=f==null?void 0:f(),h=new T.Plugin({key:e,view(){return{update:async(b,p)=>{var D,w,_,U,E,L,A;const W=(D=this.key)===null||D===void 0?void 0:D.getState(p),N=(w=this.key)===null||w===void 0?void 0:w.getState(b.state),F=W.active&&N.active&&W.range.from!==N.range.from,q=!W.active&&N.active,v=W.active&&!N.active,k=!q&&!v&&W.query!==N.query,V=q||F&&k,P=k||F,J=v||F&&k;if(!V&&!P&&!J)return;const K=J&&!V?W:N,re=b.dom.querySelector(`[data-decoration-id="${K.decorationId}"]`);x={editor:t,range:K.range,query:K.query,text:K.text,items:[],command:j=>u({editor:t,range:K.range,props:j}),decorationNode:re,clientRect:re?()=>{var j;const{decorationId:I}=(j=this.key)===null||j===void 0?void 0:j.getState(t.state),oe=b.dom.querySelector(`[data-decoration-id="${I}"]`);return(oe==null?void 0:oe.getBoundingClientRect())||null}:null},V&&((_=m==null?void 0:m.onBeforeStart)===null||_===void 0||_.call(m,x)),P&&((U=m==null?void 0:m.onBeforeUpdate)===null||U===void 0||U.call(m,x)),(P||V)&&(x.items=await l({editor:t,query:K.query})),J&&((E=m==null?void 0:m.onExit)===null||E===void 0||E.call(m,x)),P&&((L=m==null?void 0:m.onUpdate)===null||L===void 0||L.call(m,x)),V&&((A=m==null?void 0:m.onStart)===null||A===void 0||A.call(m,x))},destroy:()=>{var b;x&&((b=m==null?void 0:m.onExit)===null||b===void 0||b.call(m,x))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(b,p,D,w){const{isEditable:_}=t,{composing:U}=t.view,{selection:E}=b,{empty:L,from:A}=E,W={...p};if(W.composing=U,_&&(L||t.view.composing)){(A<p.range.from||A>p.range.to)&&!U&&!p.composing&&(W.active=!1);const N=d({char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:a,startOfLine:o,$position:E.$from}),F=`id_${Math.floor(Math.random()*4294967295)}`;N&&g({editor:t,state:w,range:N.range,isActive:p.active})?(W.active=!0,W.decorationId=p.decorationId?p.decorationId:F,W.range=N.range,W.query=N.query,W.text=N.text):W.active=!1}else W.active=!1;return W.active||(W.decorationId=null,W.range={from:0,to:0},W.query=null,W.text=null),W}},props:{handleKeyDown(b,p){var D;const{active:w,range:_}=h.getState(b.state);return w&&((D=m==null?void 0:m.onKeyDown)===null||D===void 0?void 0:D.call(m,{view:b,event:p,range:_}))||!1},decorations(b){const{active:p,range:D,decorationId:w}=h.getState(b);return p?T.DecorationSet.create(b.doc,[T.Decoration.inline(D.from,D.to,{nodeName:s,class:c,"data-decoration-id":w})]):null}}});return h}function Lg(e,t){var h,b;const[n,i]=pe.useState(0),[r,a]=pe.useState(0),o=pe.useRef(null),{t:s}=Ce.useLocale(),c=pe.useRef([]);pe.useImperativeHandle(t,()=>({onKeyDown:u})),pe.useEffect(()=>{if(!o.current)return;const p=r*1e3+n,D=c.current[p];D&&D.scrollIntoView({behavior:"smooth",block:"nearest"})},[n,r]);function u({event:p}){return p.key==="ArrowUp"?(l(),!0):p.key==="ArrowDown"?(f(),!0):p.key==="Enter"?(g(),!0):!1}function l(){var w;if(e.items.length===0)return!1;let p=n-1,D=r;p<0&&(D=r-1,p=((w=e.items[D])==null?void 0:w.commands.length)-1||0),D<0&&(D=e.items.length-1,p=e.items[D].commands.length-1),i(p),a(D)}function f(){if(e.items.length===0)return!1;const p=e.items[r].commands;let D=n+1,w=r;p.length-1<D&&(D=0,w=r+1),e.items.length-1<w&&(w=0),i(D),a(w)}function g(){if(e.items.length===0||r===-1||n===-1)return!1;d(r,n)}function d(p,D){const w=e.items[p].commands[D];e.command(w)}function x(p,D){d(p,D)}function m(p,D,w){c.current[p*1e3+D]=w}return O.jsx("div",{className:"mb-8 max-h-[min(80vh,24rem)] flex-wrap overflow-auto rounded-lg !border !border-neutral-200 !bg-white p-1 !text-black shadow-sm dark:!border-neutral-800 dark:!bg-black",ref:o,children:(h=e==null?void 0:e.items)!=null&&h.length?O.jsx("div",{className:"grid min-w-48 grid-cols-1 gap-0.5",children:(b=e==null?void 0:e.items)==null?void 0:b.map((p,D)=>O.jsxs(pe.Fragment,{children:[O.jsx("div",{className:"col-[1/-1] mx-2 mt-2 select-none text-[0.65rem] font-semibold uppercase tracking-wider !text-neutral-500 first:mt-0.5",children:p.title}),p.commands.map((w,_)=>O.jsxs("button",{onClick:()=>x(D,_),ref:U=>m(D,_,U),className:T.cn("flex items-center gap-3 px-2 py-1.5 text-sm !text-neutral-800 dark:!text-neutral-200 text-left w-full rounded-sm outline-none transition-colors !bg-transparent hover:!bg-accent ",{"slash-command-active":r===D&&n===_}),children:[w.iconUrl&&O.jsx("img",{alt:"",className:"size-6",src:w.iconUrl}),w.iconName&&O.jsx(T.IconComponent,{className:"!mr-1 !text-lg",name:w.iconName}),w.label]},`command-${_}`))]},`slash-${p.title}`))}):O.jsx("div",{className:"p-3",children:O.jsx("span",{className:"text-xs text-gray-800 dark:text-gray-100",children:s("editor.slash.empty")})})})}const Rg=pe.forwardRef(Lg),Ig={setOpen:(e,t)=>{T.dispatchEvent(T.EVENTS.UPLOAD_VIDEO(e),t)}};function Wg(e,t){const n=[{name:"format",title:Ce.localeActions.t("editor.slash.format"),commands:[]},{name:"insert",title:Ce.localeActions.t("editor.slash.insert"),commands:[]}];return e.forEach(i=>{i.name.toLowerCase()==="heading"&&i.options.levels.forEach(r=>{n[0].commands.push({name:`heading${r}`,label:Ce.localeActions.t(`editor.heading.h${r}.tooltip`),aliases:[`h${r}`,"bt",`bt${r}`],iconName:`Heading${r}`,action:({editor:a,range:o})=>{a.chain().focus().deleteRange(o).setHeading({level:r}).run()}})}),i.name.toLowerCase()==="bulletlist"&&n[0].commands.push({name:"bulletList",label:Ce.localeActions.t("editor.bulletlist.tooltip"),aliases:["ul","yxlb"],iconName:"List",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleBulletList().run()}}),i.name.toLowerCase()==="orderedlist"&&n[0].commands.push({name:"numberedList",label:Ce.localeActions.t("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleOrderedList().run()}}),i.name.toLowerCase()==="tasklist"&&n[0].commands.push({name:"taskList",label:Ce.localeActions.t("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleTaskList().run()}}),i.name.toLowerCase()==="blockquote"&&n[0].commands.push({name:"blockquote",label:Ce.localeActions.t("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setBlockquote().run()}}),i.name.toLowerCase()==="codeblock"&&n[0].commands.push({name:"codeBlock",label:Ce.localeActions.t("editor.codeblock.tooltip"),iconName:"Code2",description:"Code block with syntax highlighting",shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setCodeBlock().run()}}),i.name.toLowerCase()===T.Image.name&&n[1].commands.push({name:"image",label:Ce.localeActions.t("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).run(),T.actionDialogImage.setOpen(r.id,!0)}}),i.name.toLowerCase()===T.Video.name&&n[1].commands.push({name:"video",label:Ce.localeActions.t("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).run(),Ig.setOpen(r.id,!0)}}),i.name.toLowerCase()==="table"&&n[1].commands.push({name:"table",label:Ce.localeActions.t("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}}),i.name.toLowerCase()==="horizontalrule"&&n[1].commands.push({name:"horizontalRule",label:Ce.localeActions.t("editor.horizontalrule.tooltip"),iconName:"Minus",description:"Insert a horizontal divider",aliases:["hr","fgx","fg"],action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setHorizontalRule().run()}}),i.name.toLowerCase()==="columns"&&n[1].commands.push({name:"columns",label:Ce.localeActions.t("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",action:({editor:r})=>{r.chain().focus().insertColumns({cols:2}).run()}}),t==null||t(i,n)}),n}const Kt="slashCommand";let Ne;const Og=T.Extension.create({name:Kt,priority:200,onCreate(){Ne=no("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[mo({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new T.PluginKey(Kt),allow:({state:e,range:t})=>{var u,l,f;const n=e.doc.resolve(t.from),i=n.depth===1,r=n.parent.type.name==="paragraph",a=((u=n.parent.textContent)==null?void 0:u.charAt(0))==="/",o=this.editor.isActive("column"),s=(f=n.parent.textContent)==null?void 0:f.slice(Math.max(0,(l=n.parent.textContent)==null?void 0:l.indexOf("/"))),c=!(s!=null&&s.endsWith(" "));return(i&&r&&a||o&&r&&a)&&c},command:({editor:e,range:t,props:n})=>{const{view:i}=e;n.action({editor:e,range:t}),i.focus()},items:({query:e,editor:t})=>Wg(t.extensionManager.extensions,this.options.renderGroupItem).map(o=>({...o,commands:o.commands.filter(s=>{const c=s.label.toLowerCase().trim(),u=e.toLowerCase().trim();if(s.aliases){const l=s.aliases.map(d=>d.toLowerCase().trim()),f=c.match(u),g=l.some(d=>d.match(u));return f||g}return c.match(u)}).filter(s=>s.shouldBeHidden?!s.shouldBeHidden(this.editor):!0)})).filter(o=>o.commands.length>0).map(o=>({...o,commands:o.commands.map(s=>({...s,isEnabled:!0}))})),render:()=>{let e,t=null;return{onStart:n=>{var a;e=new T.ReactRenderer(Rg,{props:n,editor:n.editor});const{view:i}=n.editor,r=()=>{if(!n.clientRect)return n.editor.storage[Kt].rect;const o=n.clientRect();if(!o)return n.editor.storage[Kt].rect;let s=o.y;if(o.top+e.element.offsetHeight+40>window.innerHeight){const c=o.top+e.element.offsetHeight-window.innerHeight+40;s=o.y-c}return new DOMRect(o.x,s,o.width,o.height)};t=()=>{Ne==null||Ne[0].setProps({getReferenceClientRect:r})},(a=i.dom.parentElement)==null||a.addEventListener("scroll",t),Ne==null||Ne[0].setProps({getReferenceClientRect:r,appendTo:()=>document.body,content:e.element}),Ne==null||Ne[0].show()},onUpdate(n){var o;e.updateProps(n);const{view:i}=n.editor,r=()=>{if(!n.clientRect)return n.editor.storage[Kt].rect;const s=n.clientRect();return s?new DOMRect(s.x,s.y,s.width,s.height):n.editor.storage[Kt].rect},a=()=>{Ne==null||Ne[0].setProps({getReferenceClientRect:r})};(o=i.dom.parentElement)==null||o.addEventListener("scroll",a),n.editor.storage[Kt].rect=n.clientRect?r():{width:0,height:0,left:0,top:0,right:0,bottom:0},Ne==null||Ne[0].setProps({getReferenceClientRect:r})},onKeyDown(n){var i;return n.event.key==="Escape"?(Ne==null||Ne[0].hide(),!0):(Ne!=null&&Ne[0].state.isShown||Ne==null||Ne[0].show(),(i=e.ref)==null?void 0:i.onKeyDown(n))},onExit(n){var i;if(Ne==null||Ne[0].hide(),t){const{view:r}=n.editor;(i=r.dom.parentElement)==null||i.removeEventListener("scroll",t)}e.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}}),Mg=T.Extension.create({name:"painter",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>{t.commands.setPainter(t==null?void 0:t.state.selection.$head.marks())},icon:"PaintRoller",tooltip:n("editor.format")}})}},addCommands(){return{setPainter:e=>({view:{dispatch:t,state:{tr:n},dom:i}})=>{const o=`url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;return i.style.cursor=o,t(n.setMeta("painterAction",{type:"start",marks:e})),!0}}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("format-painter"),state:{init:()=>[],apply:(e,t)=>{const n=e.getMeta("painterAction");return n&&n.type==="start"?t=n.marks:n&&n.type==="end"&&(t=[]),t}},props:{handleDOMEvents:{mousedown(e){const t=this.getState(e.state);if(!t||t.length===0)return e.dom.style.cursor="",!1;const n=()=>{document.removeEventListener("mouseup",n);let{dispatch:i,state:{tr:r,selection:a},dom:o}=e;o.style.cursor="",r=r.removeMark(a.from,a.to);for(const s of t)s.type.name!=="link"&&(r=r.addMark(a.from,a.to,s));i(r.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",n),!0}}}})]}});function Pg({editor:e,...t}){const{t:n}=Ce.useLocale(),[i,r]=pe.useState(-1),[a,o]=pe.useState([]),[s,c]=pe.useState(""),[u,l]=pe.useState(""),[f,g]=pe.useState(!1),[d,x]=pe.useState(!1);return pe.useEffect(()=>{f||(c(""),l(""),r(-1),o([]),e.commands.setSearchTerm(""),e.commands.setReplaceTerm(""))},[e,f]),pe.useEffect(()=>{f&&e&&e.commands&&e.commands.setSearchTerm&&e.commands.setSearchTerm(s)},[f,s,e]),pe.useEffect(()=>{f&&e&&e.commands&&e.commands.setReplaceTerm&&e.commands.setReplaceTerm(u)},[f,u,e]),pe.useEffect(()=>{if(!e)return;const m=e.extensionManager.extensions.find(b=>b.name===Gu.name);if(!m)return;const h=()=>{if(!f)return;const b=m?m.storage.currentIndex:-1,p=m?m.storage.results:[];r(D=>D!==b?b:D),o(D=>T.deepEqual(D,p)?D:p)};return T.listenEvent(T.EVENTS.SEARCH_REPLCE,h),()=>{m&&T.listenEvent(T.EVENTS.SEARCH_REPLCE,h)}},[f,e]),O.jsxs(T.Popover,{onOpenChange:g,open:f,children:[O.jsx(T.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:O.jsx(T.ActionButton,{disabled:t==null?void 0:t.disabled,isActive:t==null?void 0:t.isActive,tooltip:t==null?void 0:t.tooltip,children:O.jsx(T.IconComponent,{name:t==null?void 0:t.icon})})}),O.jsxs(T.PopoverContent,{align:"start",className:"w-full",hideWhenDetached:!0,side:"bottom",children:[O.jsxs("div",{className:"mb-[6px] flex items-center justify-between",children:[O.jsx(T.Label,{children:n("editor.search.dialog.text")}),O.jsx("span",{className:"font-semibold",children:a.length>0?`${i+1}/${a.length}`:"0/0"})]}),O.jsxs("div",{className:"mb-[10px] flex w-full max-w-sm items-center gap-1.5",children:[O.jsx(T.Input,{autoFocus:!0,className:"w-full",onChange:m=>c(m.target.value),placeholder:"Text",required:!0,type:"text",value:s}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.goToPrevSearchResult,children:O.jsx(T.IconComponent,{name:"ChevronUp"})}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.goToNextSearchResult,children:O.jsx(T.IconComponent,{name:"ChevronDown"})})]}),O.jsx(T.Label,{className:"mb-[6px]",children:n("editor.replace.dialog.text")}),O.jsx("div",{className:"mb-[5px] flex w-full max-w-sm items-center gap-1.5",children:O.jsx("div",{className:"relative w-full max-w-sm items-center",children:O.jsx(T.Input,{className:"w-80",onChange:m=>l(m.target.value),placeholder:"Text",required:!0,type:"text",value:u})})}),O.jsxs("div",{className:"mb-[10px] flex items-center space-x-2",children:[O.jsx(T.Switch,{checked:d,onCheckedChange:m=>{x(m),e.commands.setCaseSensitive(m)}}),O.jsx(T.Label,{children:n("editor.replace.caseSensitive")})]}),O.jsxs("div",{className:"flex items-center gap-[10px]",children:[O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.replace,children:n("editor.replace.dialog.text")}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.replaceAll,children:n("editor.replaceAll.dialog.text")})]})]})]})}const En=(e,t)=>t(e.tr);function jg(e,t,n){return RegExp(t?e.replace(/[$()*+./?[\\\]^{|}-]/g,String.raw`\$&`):e,n?"gu":"gui")}function qg(e,t,n){const i=[];let r=[];const a=[];let o=0;if(!t)return{decorationsToReturn:[],results:[]};e==null||e.descendants((s,c)=>{s.isText?r[o]?r[o]={text:r[o].text+s.text,pos:r[o].pos}:r[o]={text:`${s.text}`,pos:c}:o+=1}),r=r.filter(Boolean);for(const{text:s,pos:c}of r){const u=[...s.matchAll(t)];for(const l of u){if(l[0]==="")break;l.index!==void 0&&a.push({from:c+l.index,to:c+l.index+l[0].length})}}for(const s of a)i.push(T.Decoration.inline(s.from,s.to,{class:n}));return{decorationsToReturn:i,results:a}}function Ts(e,t,{state:n,dispatch:i}){if(!t[0])return;const{from:a,to:o}=t[0];i&&i(n.tr.insertText(e,a,o))}function Hg(e,t,n,i){const r=t+1;if(!i[r])return null;const{from:a,to:o}=i[t],s=o-a-e.length+n,{from:c,to:u}=i[r];return i[r]={to:u-s,from:c-s},[s,i]}function zg(e,t,{tr:n,dispatch:i}){let r=0,a=t.slice();if(a.length===0)return!1;for(let o=0;o<a.length;o+=1){const{from:s,to:c}=a[o];n.insertText(e,s,c);const u=Hg(e,o,r,a);u&&(r=u[0],a=u[1])}return i(n),!0}function Us({view:e,tr:t,searchResults:n,searchResultCurrentClass:i,gotoIndex:r}){const a=n[r];if(a){const o=t.setMeta("directDecoration",{fromPos:a.from,toPos:a.to,attrs:{class:i}});return e==null||e.dispatch(o),setTimeout(()=>{const s=window.document.querySelector(`.${i}`);s&&io(s,{behavior:"smooth",scrollMode:"if-needed"})},0),!0}return!1}const Gu=T.Extension.create({name:"search",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),searchTerm:"",replaceTerm:"",results:[],currentIndex:0,searchResultClass:"search-result",searchResultCurrentClass:"search-result-current",caseSensitive:!1,disableRegex:!1,onChange:()=>{},button:({editor:t,t:n})=>({component:Pg,componentProps:{action:()=>{},icon:"SearchAndReplace",tooltip:n("editor.searchAndReplace.tooltip"),isActive:()=>!1,disabled:!1,editor:t}})}},addStorage(){return{results:[],currentIndex:-1}},addCommands(){return{setSearchTerm:e=>({state:t,dispatch:n})=>(this.options.searchTerm=e,this.storage.results=[],this.storage.currentIndex=0,T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(t,n),!1),setReplaceTerm:e=>({state:t,dispatch:n})=>(this.options.replaceTerm=e,En(t,n),!1),setCaseSensitive:e=>({state:t,dispatch:n})=>(this.options.caseSensitive=e,En(t,n),!1),replace:()=>({state:e,dispatch:t})=>{const{replaceTerm:n}=this.options,{currentIndex:i,results:r}=this.storage,a=r[i];return a?(Ts(n,[a],{state:e,dispatch:t}),this.storage.results.splice(i,1)):(Ts(n,r,{state:e,dispatch:t}),this.storage.results.shift()),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(e,t),!1},replaceAll:()=>({state:e,tr:t,dispatch:n})=>{const{replaceTerm:i}=this.options,{results:r}=this.storage;return zg(i,r,{tr:t,dispatch:n}),this.storage.currentIndex=-1,this.storage.results=[],T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(e,n),!1},goToPrevSearchResult:()=>({view:e,tr:t})=>{const{searchResultCurrentClass:n}=this.options,{currentIndex:i,results:r}=this.storage,a=(i+r.length-1)%r.length;return this.storage.currentIndex=a,T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),Us({view:e,tr:t,searchResults:r,searchResultCurrentClass:n,gotoIndex:a})},goToNextSearchResult:()=>({view:e,tr:t})=>{const{searchResultCurrentClass:n}=this.options,{currentIndex:i,results:r}=this.storage,a=(i+1)%r.length;return this.storage.currentIndex=a,this.options.onChange&&this.options.onChange(),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),Us({view:e,tr:t,searchResults:r,searchResultCurrentClass:n,gotoIndex:a})}}},addProseMirrorPlugins(){const e=this;return[new T.Plugin({key:new T.PluginKey("search"),state:{init(){return T.DecorationSet.empty},apply(t){const{doc:n,docChanged:i}=t,{searchTerm:r,searchResultClass:a,searchResultCurrentClass:o,disableRegex:s,caseSensitive:c}=e.options;if(i||r){const{decorationsToReturn:u,results:l}=qg(n,jg(r,s,c),a);if(e.storage.results=l,e.storage.currentIndex>l.length-1&&(e.storage.currentIndex=0),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),t.getMeta("directDecoration")){const{fromPos:f,toPos:g,attrs:d}=t.getMeta("directDecoration");u.push(T.Decoration.inline(f,g,d))}else l.length>0&&(u[0]=T.Decoration.inline(l[0].from,l[0].to,{class:o}));return T.DecorationSet.create(n,u)}return T.DecorationSet.empty}},props:{decorations(t){return this.getState(t)}}})]}});function Xg({className:e,...t}){return O.jsx(Jt.EmojiPicker.Root,{className:T.cn("bg-popover text-popover-foreground isolate flex h-full w-fit flex-col overflow-hidden rounded-md",e),"data-slot":"emoji-picker",...t})}function Vg({className:e,...t}){return O.jsxs("div",{className:T.cn("flex h-9 items-center gap-2 border-b px-3",e),"data-slot":"emoji-picker-search-wrapper",children:[O.jsx($e.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),O.jsx(Jt.EmojiPicker.Search,{className:"outline-hidden placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50","data-slot":"emoji-picker-search",...t})]})}function $g({children:e,...t}){return O.jsx("div",{...t,className:"scroll-my-1 px-1","data-slot":"emoji-picker-row",children:e})}function Kg({emoji:e,className:t,...n}){return O.jsx("button",{...n,className:T.cn("data-[active]:bg-accent flex size-7 items-center justify-center rounded-sm text-base",t),"data-slot":"emoji-picker-emoji",children:e.emoji})}function Gg({category:e,...t}){return O.jsx("div",{...t,className:"bg-popover text-muted-foreground px-3 pb-2 pt-3.5 text-xs leading-none","data-slot":"emoji-picker-category-header",children:e.label})}function Zg({className:e,...t}){return O.jsxs(Jt.EmojiPicker.Viewport,{className:T.cn("outline-hidden relative flex-1",e),"data-slot":"emoji-picker-viewport",...t,children:[O.jsx(Jt.EmojiPicker.Loading,{className:"absolute inset-0 flex items-center justify-center text-muted-foreground","data-slot":"emoji-picker-loading",children:O.jsx($e.LoaderIcon,{className:"size-4 animate-spin"})}),O.jsx(Jt.EmojiPicker.Empty,{className:"absolute inset-0 flex items-center justify-center text-muted-foreground text-sm","data-slot":"emoji-picker-empty",children:"No emoji found."}),O.jsx(Jt.EmojiPicker.List,{className:"select-none pb-1",components:{Row:$g,Emoji:Kg,CategoryHeader:Gg},"data-slot":"emoji-picker-list"})]})}function Yg({className:e,...t}){return O.jsx("div",{className:T.cn("max-w-(--frimousse-viewport-width) flex w-full min-w-0 items-center gap-1 border-t p-2",e),"data-slot":"emoji-picker-footer",...t,children:O.jsx(Jt.EmojiPicker.ActiveEmoji,{children:({emoji:n})=>n?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"flex size-7 flex-none items-center justify-center text-lg",children:n.emoji}),O.jsx("span",{className:"text-secondary-foreground truncate text-xs",children:n.label})]}):O.jsx("span",{className:"text-muted-foreground ml-1.5 flex h-7 items-center truncate text-xs",children:"Select an emoji…"})})})}function Qg({onSelectEmoji:e,children:t}){return O.jsxs(T.Popover,{modal:!0,children:[O.jsx(T.PopoverTrigger,{asChild:!0,children:t}),O.jsx(T.PopoverContent,{align:"start",className:"size-full p-2",hideWhenDetached:!0,side:"bottom",children:O.jsxs(Xg,{className:"!h-[342px]",onEmojiSelect:({emoji:n})=>{e(n)},children:[O.jsx(Vg,{}),O.jsx(Zg,{}),O.jsx(Yg,{})]})})]})}function Jg({editor:e,icon:t,...n}){const i=pe.useCallback(r=>{const{selection:a}=e.state,{$anchor:o}=a;return e.chain().insertContentAt(o.pos,r).run()},[e]);return O.jsx(Qg,{onSelectEmoji:i,children:O.jsx(T.ActionButton,{icon:t,tooltip:n==null?void 0:n.tooltip})})}const Zu=pe.forwardRef((e,t)=>{const n=pe.useRef(null),[i,r]=pe.useState(0),{t:a}=Ce.useLocale(),o=l=>{const f=e.items[l];f&&e.command(f)},s=()=>{r((i+e.items.length-1)%e.items.length)},c=()=>{r((i+1)%e.items.length)},u=()=>{o(i)};return pe.useEffect(()=>r(0),[e.items]),pe.useEffect(()=>{if(Number.isNaN(i+1))return;const l=n.current.querySelector(`span:nth-of-type(${i+1})`);l&&io(l,{behavior:"smooth",scrollMode:"if-needed"})},[i]),pe.useImperativeHandle(t,()=>({onKeyDown:({event:l})=>l.key==="ArrowUp"?(s(),!0):l.key==="ArrowDown"?(c(),!0):l.key==="Enter"?(u(),!0):!1})),O.jsx("div",{className:"max-h-[320px] w-[200px] overflow-y-auto overflow-x-hidden rounded-sm !border bg-popover p-1 text-popover-foreground shadow-md outline-none",children:O.jsx("div",{ref:n,children:e.items.length>0?e.items.map((l,f)=>O.jsxs("span",{className:T.clsx(" relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground",f===i?"bg-accent":""),onClick:()=>o(f),children:[l.fallbackImage?O.jsx("img",{className:"size-[1em]",src:l.fallbackImage}):l.emoji,":",l.name,":"]},`emoji-list-code-${f}`)):O.jsx("div",{className:"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors",children:O.jsx("span",{children:a("no_result_found")})})})})});Zu.displayName="EmojiList";const yn={100:"💯",1234:"🔢",grinning:"😀",smiley:"😃",smile:"😄",grin:"😁",laughing:"😆",satisfied:"😆",sweat_smile:"😅",rofl:"🤣",joy:"😂",slightly_smiling_face:"🙂",upside_down_face:"🙃",wink:"😉",blush:"😊",innocent:"😇",smiling_face_with_three_hearts:"🥰",heart_eyes:"😍",star_struck:"🤩",kissing_heart:"😘",kissing:"😗",relaxed:"☺️",kissing_closed_eyes:"😚",kissing_smiling_eyes:"😙",smiling_face_with_tear:"🥲",yum:"😋",stuck_out_tongue:"😛",stuck_out_tongue_winking_eye:"😜",zany_face:"🤪",stuck_out_tongue_closed_eyes:"😝",money_mouth_face:"🤑",hugs:"🤗",hand_over_mouth:"🤭",shushing_face:"🤫",thinking:"🤔",zipper_mouth_face:"🤐",raised_eyebrow:"🤨",neutral_face:"😐",expressionless:"😑",no_mouth:"😶",smirk:"😏",unamused:"😒",roll_eyes:"🙄",grimacing:"😬",lying_face:"🤥",relieved:"😌",pensive:"😔",sleepy:"😪",drooling_face:"🤤",sleeping:"😴",mask:"😷",face_with_thermometer:"🤒",face_with_head_bandage:"🤕",nauseated_face:"🤢",vomiting_face:"🤮",sneezing_face:"🤧",hot_face:"🥵",cold_face:"🥶",woozy_face:"🥴",dizzy_face:"😵",exploding_head:"🤯",cowboy_hat_face:"🤠",partying_face:"🥳",disguised_face:"🥸",sunglasses:"😎",nerd_face:"🤓",monocle_face:"🧐",confused:"😕",worried:"😟",slightly_frowning_face:"🙁",frowning_face:"☹️",open_mouth:"😮",hushed:"😯",astonished:"😲",flushed:"😳",pleading_face:"🥺",frowning:"😦",anguished:"😧",fearful:"😨",cold_sweat:"😰",disappointed_relieved:"😥",cry:"😢",sob:"😭",scream:"😱",confounded:"😖",persevere:"😣",disappointed:"😞",sweat:"😓",weary:"😩",tired_face:"😫",yawning_face:"🥱",triumph:"😤",rage:"😡",pout:"😡",angry:"😠",cursing_face:"🤬",smiling_imp:"😈",imp:"👿",skull:"💀",skull_and_crossbones:"☠️",hankey:"💩",poop:"💩",shit:"💩",clown_face:"🤡",japanese_ogre:"👹",japanese_goblin:"👺",ghost:"👻",alien:"👽",space_invader:"👾",robot:"🤖",smiley_cat:"😺",smile_cat:"😸",joy_cat:"😹",heart_eyes_cat:"😻",smirk_cat:"😼",kissing_cat:"😽",scream_cat:"🙀",crying_cat_face:"😿",pouting_cat:"😾",see_no_evil:"🙈",hear_no_evil:"🙉",speak_no_evil:"🙊",kiss:"💋",love_letter:"💌",cupid:"💘",gift_heart:"💝",sparkling_heart:"💖",heartpulse:"💗",heartbeat:"💓",revolving_hearts:"💞",two_hearts:"💕",heart_decoration:"💟",heavy_heart_exclamation:"❣️",broken_heart:"💔",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",brown_heart:"🤎",black_heart:"🖤",white_heart:"🤍",anger:"💢",boom:"💥",collision:"💥",dizzy:"💫",sweat_drops:"💦",dash:"💨",hole:"🕳️",bomb:"💣",speech_balloon:"💬",eye_speech_bubble:"👁️‍🗨️",left_speech_bubble:"🗨️",right_anger_bubble:"🗯️",thought_balloon:"💭",zzz:"💤",wave:"👋",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐️",hand:"✋",raised_hand:"✋",vulcan_salute:"🖖",ok_hand:"👌",pinched_fingers:"🤌",pinching_hand:"🤏",v:"✌️",crossed_fingers:"🤞",love_you_gesture:"🤟",metal:"🤘",call_me_hand:"🤙",point_left:"👈",point_right:"👉",point_up_2:"👆",middle_finger:"🖕",fu:"🖕",point_down:"👇",point_up:"☝️","+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",fist_raised:"✊",fist:"✊",fist_oncoming:"👊",facepunch:"👊",punch:"👊",fist_left:"🤛",fist_right:"🤜",clap:"👏",raised_hands:"🙌",open_hands:"👐",palms_up_together:"🤲",handshake:"🤝",pray:"🙏",writing_hand:"✍️",nail_care:"💅",selfie:"🤳",muscle:"💪",mechanical_arm:"🦾",mechanical_leg:"🦿",leg:"🦵",foot:"🦶",ear:"👂",ear_with_hearing_aid:"🦻",nose:"👃",brain:"🧠",anatomical_heart:"🫀",lungs:"🫁",tooth:"🦷",bone:"🦴",eyes:"👀",eye:"👁️",tongue:"👅",lips:"👄",baby:"👶",child:"🧒",boy:"👦",girl:"👧",adult:"🧑",blond_haired_person:"👱",man:"👨",bearded_person:"🧔",red_haired_man:"👨‍🦰",curly_haired_man:"👨‍🦱",white_haired_man:"👨‍🦳",bald_man:"👨‍🦲",woman:"👩",red_haired_woman:"👩‍🦰",person_red_hair:"🧑‍🦰",curly_haired_woman:"👩‍🦱",person_curly_hair:"🧑‍🦱",white_haired_woman:"👩‍🦳",person_white_hair:"🧑‍🦳",bald_woman:"👩‍🦲",person_bald:"🧑‍🦲",blond_haired_woman:"👱‍♀️",blonde_woman:"👱‍♀️",blond_haired_man:"👱‍♂️",older_adult:"🧓",older_man:"👴",older_woman:"👵",frowning_person:"🙍",frowning_man:"🙍‍♂️",frowning_woman:"🙍‍♀️",pouting_face:"🙎",pouting_man:"🙎‍♂️",pouting_woman:"🙎‍♀️",no_good:"🙅",no_good_man:"🙅‍♂️",ng_man:"🙅‍♂️",no_good_woman:"🙅‍♀️",ng_woman:"🙅‍♀️",ok_person:"🙆",ok_man:"🙆‍♂️",ok_woman:"🙆‍♀️",tipping_hand_person:"💁",information_desk_person:"💁",tipping_hand_man:"💁‍♂️",sassy_man:"💁‍♂️",tipping_hand_woman:"💁‍♀️",sassy_woman:"💁‍♀️",raising_hand:"🙋",raising_hand_man:"🙋‍♂️",raising_hand_woman:"🙋‍♀️",deaf_person:"🧏",deaf_man:"🧏‍♂️",deaf_woman:"🧏‍♀️",bow:"🙇",bowing_man:"🙇‍♂️",bowing_woman:"🙇‍♀️",facepalm:"🤦",man_facepalming:"🤦‍♂️",woman_facepalming:"🤦‍♀️",shrug:"🤷",man_shrugging:"🤷‍♂️",woman_shrugging:"🤷‍♀️",health_worker:"🧑‍⚕️",man_health_worker:"👨‍⚕️",woman_health_worker:"👩‍⚕️",student:"🧑‍🎓",man_student:"👨‍🎓",woman_student:"👩‍🎓",teacher:"🧑‍🏫",man_teacher:"👨‍🏫",woman_teacher:"👩‍🏫",judge:"🧑‍⚖️",man_judge:"👨‍⚖️",woman_judge:"👩‍⚖️",farmer:"🧑‍🌾",man_farmer:"👨‍🌾",woman_farmer:"👩‍🌾",cook:"🧑‍🍳",man_cook:"👨‍🍳",woman_cook:"👩‍🍳",mechanic:"🧑‍🔧",man_mechanic:"👨‍🔧",woman_mechanic:"👩‍🔧",factory_worker:"🧑‍🏭",man_factory_worker:"👨‍🏭",woman_factory_worker:"👩‍🏭",office_worker:"🧑‍💼",man_office_worker:"👨‍💼",woman_office_worker:"👩‍💼",scientist:"🧑‍🔬",man_scientist:"👨‍🔬",woman_scientist:"👩‍🔬",technologist:"🧑‍💻",man_technologist:"👨‍💻",woman_technologist:"👩‍💻",singer:"🧑‍🎤",man_singer:"👨‍🎤",woman_singer:"👩‍🎤",artist:"🧑‍🎨",man_artist:"👨‍🎨",woman_artist:"👩‍🎨",pilot:"🧑‍✈️",man_pilot:"👨‍✈️",woman_pilot:"👩‍✈️",astronaut:"🧑‍🚀",man_astronaut:"👨‍🚀",woman_astronaut:"👩‍🚀",firefighter:"🧑‍🚒",man_firefighter:"👨‍🚒",woman_firefighter:"👩‍🚒",police_officer:"👮",cop:"👮",policeman:"👮‍♂️",policewoman:"👮‍♀️",detective:"🕵️",male_detective:"🕵️‍♂️",female_detective:"🕵️‍♀️",guard:"💂",guardsman:"💂‍♂️",guardswoman:"💂‍♀️",ninja:"🥷",construction_worker:"👷",construction_worker_man:"👷‍♂️",construction_worker_woman:"👷‍♀️",prince:"🤴",princess:"👸",person_with_turban:"👳",man_with_turban:"👳‍♂️",woman_with_turban:"👳‍♀️",man_with_gua_pi_mao:"👲",woman_with_headscarf:"🧕",person_in_tuxedo:"🤵",man_in_tuxedo:"🤵‍♂️",woman_in_tuxedo:"🤵‍♀️",person_with_veil:"👰",man_with_veil:"👰‍♂️",woman_with_veil:"👰‍♀️",bride_with_veil:"👰‍♀️",pregnant_woman:"🤰",breast_feeding:"🤱",woman_feeding_baby:"👩‍🍼",man_feeding_baby:"👨‍🍼",person_feeding_baby:"🧑‍🍼",angel:"👼",santa:"🎅",mrs_claus:"🤶",mx_claus:"🧑‍🎄",superhero:"🦸",superhero_man:"🦸‍♂️",superhero_woman:"🦸‍♀️",supervillain:"🦹",supervillain_man:"🦹‍♂️",supervillain_woman:"🦹‍♀️",mage:"🧙",mage_man:"🧙‍♂️",mage_woman:"🧙‍♀️",fairy:"🧚",fairy_man:"🧚‍♂️",fairy_woman:"🧚‍♀️",vampire:"🧛",vampire_man:"🧛‍♂️",vampire_woman:"🧛‍♀️",merperson:"🧜",merman:"🧜‍♂️",mermaid:"🧜‍♀️",elf:"🧝",elf_man:"🧝‍♂️",elf_woman:"🧝‍♀️",genie:"🧞",genie_man:"🧞‍♂️",genie_woman:"🧞‍♀️",zombie:"🧟",zombie_man:"🧟‍♂️",zombie_woman:"🧟‍♀️",massage:"💆",massage_man:"💆‍♂️",massage_woman:"💆‍♀️",haircut:"💇",haircut_man:"💇‍♂️",haircut_woman:"💇‍♀️",walking:"🚶",walking_man:"🚶‍♂️",walking_woman:"🚶‍♀️",standing_person:"🧍",standing_man:"🧍‍♂️",standing_woman:"🧍‍♀️",kneeling_person:"🧎",kneeling_man:"🧎‍♂️",kneeling_woman:"🧎‍♀️",person_with_probing_cane:"🧑‍🦯",man_with_probing_cane:"👨‍🦯",woman_with_probing_cane:"👩‍🦯",person_in_motorized_wheelchair:"🧑‍🦼",man_in_motorized_wheelchair:"👨‍🦼",woman_in_motorized_wheelchair:"👩‍🦼",person_in_manual_wheelchair:"🧑‍🦽",man_in_manual_wheelchair:"👨‍🦽",woman_in_manual_wheelchair:"👩‍🦽",runner:"🏃",running:"🏃",running_man:"🏃‍♂️",running_woman:"🏃‍♀️",woman_dancing:"💃",dancer:"💃",man_dancing:"🕺",business_suit_levitating:"🕴️",dancers:"👯",dancing_men:"👯‍♂️",dancing_women:"👯‍♀️",sauna_person:"🧖",sauna_man:"🧖‍♂️",sauna_woman:"🧖‍♀️",climbing:"🧗",climbing_man:"🧗‍♂️",climbing_woman:"🧗‍♀️",person_fencing:"🤺",horse_racing:"🏇",skier:"⛷️",snowboarder:"🏂",golfing:"🏌️",golfing_man:"🏌️‍♂️",golfing_woman:"🏌️‍♀️",surfer:"🏄",surfing_man:"🏄‍♂️",surfing_woman:"🏄‍♀️",rowboat:"🚣",rowing_man:"🚣‍♂️",rowing_woman:"🚣‍♀️",swimmer:"🏊",swimming_man:"🏊‍♂️",swimming_woman:"🏊‍♀️",bouncing_ball_person:"⛹️",bouncing_ball_man:"⛹️‍♂️",basketball_man:"⛹️‍♂️",bouncing_ball_woman:"⛹️‍♀️",basketball_woman:"⛹️‍♀️",weight_lifting:"🏋️",weight_lifting_man:"🏋️‍♂️",weight_lifting_woman:"🏋️‍♀️",bicyclist:"🚴",biking_man:"🚴‍♂️",biking_woman:"🚴‍♀️",mountain_bicyclist:"🚵",mountain_biking_man:"🚵‍♂️",mountain_biking_woman:"🚵‍♀️",cartwheeling:"🤸",man_cartwheeling:"🤸‍♂️",woman_cartwheeling:"🤸‍♀️",wrestling:"🤼",men_wrestling:"🤼‍♂️",women_wrestling:"🤼‍♀️",water_polo:"🤽",man_playing_water_polo:"🤽‍♂️",woman_playing_water_polo:"🤽‍♀️",handball_person:"🤾",man_playing_handball:"🤾‍♂️",woman_playing_handball:"🤾‍♀️",juggling_person:"🤹",man_juggling:"🤹‍♂️",woman_juggling:"🤹‍♀️",lotus_position:"🧘",lotus_position_man:"🧘‍♂️",lotus_position_woman:"🧘‍♀️",bath:"🛀",sleeping_bed:"🛌",people_holding_hands:"🧑‍🤝‍🧑",two_women_holding_hands:"👭",couple:"👫",two_men_holding_hands:"👬",couplekiss:"💏",couplekiss_man_woman:"👩‍❤️‍💋‍👨",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",couple_with_heart:"💑",couple_with_heart_woman_man:"👩‍❤️‍👨",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",family:"👪",family_man_woman_boy:"👨‍👩‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",speaking_head:"🗣️",bust_in_silhouette:"👤",busts_in_silhouette:"👥",people_hugging:"🫂",footprints:"👣",monkey_face:"🐵",monkey:"🐒",gorilla:"🦍",orangutan:"🦧",dog:"🐶",dog2:"🐕",guide_dog:"🦮",service_dog:"🐕‍🦺",poodle:"🐩",wolf:"🐺",fox_face:"🦊",raccoon:"🦝",cat:"🐱",cat2:"🐈",black_cat:"🐈‍⬛",lion:"🦁",tiger:"🐯",tiger2:"🐅",leopard:"🐆",horse:"🐴",racehorse:"🐎",unicorn:"🦄",zebra:"🦓",deer:"🦌",bison:"🦬",cow:"🐮",ox:"🐂",water_buffalo:"🐃",cow2:"🐄",pig:"🐷",pig2:"🐖",boar:"🐗",pig_nose:"🐽",ram:"🐏",sheep:"🐑",goat:"🐐",dromedary_camel:"🐪",camel:"🐫",llama:"🦙",giraffe:"🦒",elephant:"🐘",mammoth:"🦣",rhinoceros:"🦏",hippopotamus:"🦛",mouse:"🐭",mouse2:"🐁",rat:"🐀",hamster:"🐹",rabbit:"🐰",rabbit2:"🐇",chipmunk:"🐿️",beaver:"🦫",hedgehog:"🦔",bat:"🦇",bear:"🐻",polar_bear:"🐻‍❄️",koala:"🐨",panda_face:"🐼",sloth:"🦥",otter:"🦦",skunk:"🦨",kangaroo:"🦘",badger:"🦡",feet:"🐾",paw_prints:"🐾",turkey:"🦃",chicken:"🐔",rooster:"🐓",hatching_chick:"🐣",baby_chick:"🐤",hatched_chick:"🐥",bird:"🐦",penguin:"🐧",dove:"🕊️",eagle:"🦅",duck:"🦆",swan:"🦢",owl:"🦉",dodo:"🦤",feather:"🪶",flamingo:"🦩",peacock:"🦚",parrot:"🦜",frog:"🐸",crocodile:"🐊",turtle:"🐢",lizard:"🦎",snake:"🐍",dragon_face:"🐲",dragon:"🐉",sauropod:"🦕","t-rex":"🦖",whale:"🐳",whale2:"🐋",dolphin:"🐬",flipper:"🐬",seal:"🦭",fish:"🐟",tropical_fish:"🐠",blowfish:"🐡",shark:"🦈",octopus:"🐙",shell:"🐚",snail:"🐌",butterfly:"🦋",bug:"🐛",ant:"🐜",bee:"🐝",honeybee:"🐝",beetle:"🪲",lady_beetle:"🐞",cricket:"🦗",cockroach:"🪳",spider:"🕷️",spider_web:"🕸️",scorpion:"🦂",mosquito:"🦟",fly:"🪰",worm:"🪱",microbe:"🦠",bouquet:"💐",cherry_blossom:"🌸",white_flower:"💮",rosette:"🏵️",rose:"🌹",wilted_flower:"🥀",hibiscus:"🌺",sunflower:"🌻",blossom:"🌼",tulip:"🌷",seedling:"🌱",potted_plant:"🪴",evergreen_tree:"🌲",deciduous_tree:"🌳",palm_tree:"🌴",cactus:"🌵",ear_of_rice:"🌾",herb:"🌿",shamrock:"☘️",four_leaf_clover:"🍀",maple_leaf:"🍁",fallen_leaf:"🍂",leaves:"🍃",grapes:"🍇",melon:"🍈",watermelon:"🍉",tangerine:"🍊",orange:"🍊",mandarin:"🍊",lemon:"🍋",banana:"🍌",pineapple:"🍍",mango:"🥭",apple:"🍎",green_apple:"🍏",pear:"🍐",peach:"🍑",cherries:"🍒",strawberry:"🍓",blueberries:"🫐",kiwi_fruit:"🥝",tomato:"🍅",olive:"🫒",coconut:"🥥",avocado:"🥑",eggplant:"🍆",potato:"🥔",carrot:"🥕",corn:"🌽",hot_pepper:"🌶️",bell_pepper:"🫑",cucumber:"🥒",leafy_green:"🥬",broccoli:"🥦",garlic:"🧄",onion:"🧅",mushroom:"🍄",peanuts:"🥜",chestnut:"🌰",bread:"🍞",croissant:"🥐",baguette_bread:"🥖",flatbread:"🫓",pretzel:"🥨",bagel:"🥯",pancakes:"🥞",waffle:"🧇",cheese:"🧀",meat_on_bone:"🍖",poultry_leg:"🍗",cut_of_meat:"🥩",bacon:"🥓",hamburger:"🍔",fries:"🍟",pizza:"🍕",hotdog:"🌭",sandwich:"🥪",taco:"🌮",burrito:"🌯",tamale:"🫔",stuffed_flatbread:"🥙",falafel:"🧆",egg:"🥚",fried_egg:"🍳",shallow_pan_of_food:"🥘",stew:"🍲",fondue:"🫕",bowl_with_spoon:"🥣",green_salad:"🥗",popcorn:"🍿",butter:"🧈",salt:"🧂",canned_food:"🥫",bento:"🍱",rice_cracker:"🍘",rice_ball:"🍙",rice:"🍚",curry:"🍛",ramen:"🍜",spaghetti:"🍝",sweet_potato:"🍠",oden:"🍢",sushi:"🍣",fried_shrimp:"🍤",fish_cake:"🍥",moon_cake:"🥮",dango:"🍡",dumpling:"🥟",fortune_cookie:"🥠",takeout_box:"🥡",crab:"🦀",lobster:"🦞",shrimp:"🦐",squid:"🦑",oyster:"🦪",icecream:"🍦",shaved_ice:"🍧",ice_cream:"🍨",doughnut:"🍩",cookie:"🍪",birthday:"🎂",cake:"🍰",cupcake:"🧁",pie:"🥧",chocolate_bar:"🍫",candy:"🍬",lollipop:"🍭",custard:"🍮",honey_pot:"🍯",baby_bottle:"🍼",milk_glass:"🥛",coffee:"☕",teapot:"🫖",tea:"🍵",sake:"🍶",champagne:"🍾",wine_glass:"🍷",cocktail:"🍸",tropical_drink:"🍹",beer:"🍺",beers:"🍻",clinking_glasses:"🥂",tumbler_glass:"🥃",cup_with_straw:"🥤",bubble_tea:"🧋",beverage_box:"🧃",mate:"🧉",ice_cube:"🧊",chopsticks:"🥢",plate_with_cutlery:"🍽️",fork_and_knife:"🍴",spoon:"🥄",hocho:"🔪",knife:"🔪",amphora:"🏺",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",globe_with_meridians:"🌐",world_map:"🗺️",japan:"🗾",compass:"🧭",mountain_snow:"🏔️",mountain:"⛰️",volcano:"🌋",mount_fuji:"🗻",camping:"🏕️",beach_umbrella:"🏖️",desert:"🏜️",desert_island:"🏝️",national_park:"🏞️",stadium:"🏟️",classical_building:"🏛️",building_construction:"🏗️",bricks:"🧱",rock:"🪨",wood:"🪵",hut:"🛖",houses:"🏘️",derelict_house:"🏚️",house:"🏠",house_with_garden:"🏡",office:"🏢",post_office:"🏣",european_post_office:"🏤",hospital:"🏥",bank:"🏦",hotel:"🏨",love_hotel:"🏩",convenience_store:"🏪",school:"🏫",department_store:"🏬",factory:"🏭",japanese_castle:"🏯",european_castle:"🏰",wedding:"💒",tokyo_tower:"🗼",statue_of_liberty:"🗽",church:"⛪",mosque:"🕌",hindu_temple:"🛕",synagogue:"🕍",shinto_shrine:"⛩️",kaaba:"🕋",fountain:"⛲",tent:"⛺",foggy:"🌁",night_with_stars:"🌃",cityscape:"🏙️",sunrise_over_mountains:"🌄",sunrise:"🌅",city_sunset:"🌆",city_sunrise:"🌇",bridge_at_night:"🌉",hotsprings:"♨️",carousel_horse:"🎠",ferris_wheel:"🎡",roller_coaster:"🎢",barber:"💈",circus_tent:"🎪",steam_locomotive:"🚂",railway_car:"🚃",bullettrain_side:"🚄",bullettrain_front:"🚅",train2:"🚆",metro:"🚇",light_rail:"🚈",station:"🚉",tram:"🚊",monorail:"🚝",mountain_railway:"🚞",train:"🚋",bus:"🚌",oncoming_bus:"🚍",trolleybus:"🚎",minibus:"🚐",ambulance:"🚑",fire_engine:"🚒",police_car:"🚓",oncoming_police_car:"🚔",taxi:"🚕",oncoming_taxi:"🚖",car:"🚗",red_car:"🚗",oncoming_automobile:"🚘",blue_car:"🚙",pickup_truck:"🛻",truck:"🚚",articulated_lorry:"🚛",tractor:"🚜",racing_car:"🏎️",motorcycle:"🏍️",motor_scooter:"🛵",manual_wheelchair:"🦽",motorized_wheelchair:"🦼",auto_rickshaw:"🛺",bike:"🚲",kick_scooter:"🛴",skateboard:"🛹",roller_skate:"🛼",busstop:"🚏",motorway:"🛣️",railway_track:"🛤️",oil_drum:"🛢️",fuelpump:"⛽",rotating_light:"🚨",traffic_light:"🚥",vertical_traffic_light:"🚦",stop_sign:"🛑",construction:"🚧",anchor:"⚓",boat:"⛵",sailboat:"⛵",canoe:"🛶",speedboat:"🚤",passenger_ship:"🛳️",ferry:"⛴️",motor_boat:"🛥️",ship:"🚢",airplane:"✈️",small_airplane:"🛩️",flight_departure:"🛫",flight_arrival:"🛬",parachute:"🪂",seat:"💺",helicopter:"🚁",suspension_railway:"🚟",mountain_cableway:"🚠",aerial_tramway:"🚡",artificial_satellite:"🛰️",rocket:"🚀",flying_saucer:"🛸",bellhop_bell:"🛎️",luggage:"🧳",hourglass:"⌛",hourglass_flowing_sand:"⏳",watch:"⌚",alarm_clock:"⏰",stopwatch:"⏱️",timer_clock:"⏲️",mantelpiece_clock:"🕰️",clock12:"🕛",clock1230:"🕧",clock1:"🕐",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",new_moon:"🌑",waxing_crescent_moon:"🌒",first_quarter_moon:"🌓",moon:"🌔",waxing_gibbous_moon:"🌔",full_moon:"🌕",waning_gibbous_moon:"🌖",last_quarter_moon:"🌗",waning_crescent_moon:"🌘",crescent_moon:"🌙",new_moon_with_face:"🌚",first_quarter_moon_with_face:"🌛",last_quarter_moon_with_face:"🌜",thermometer:"🌡️",sunny:"☀️",full_moon_with_face:"🌝",sun_with_face:"🌞",ringed_planet:"🪐",star:"⭐",star2:"🌟",stars:"🌠",milky_way:"🌌",cloud:"☁️",partly_sunny:"⛅",cloud_with_lightning_and_rain:"⛈️",sun_behind_small_cloud:"🌤️",sun_behind_large_cloud:"🌥️",sun_behind_rain_cloud:"🌦️",cloud_with_rain:"🌧️",cloud_with_snow:"🌨️",cloud_with_lightning:"🌩️",tornado:"🌪️",fog:"🌫️",wind_face:"🌬️",cyclone:"🌀",rainbow:"🌈",closed_umbrella:"🌂",open_umbrella:"☂️",umbrella:"☔",parasol_on_ground:"⛱️",zap:"⚡",snowflake:"❄️",snowman_with_snow:"☃️",snowman:"⛄",comet:"☄️",fire:"🔥",droplet:"💧",ocean:"🌊",jack_o_lantern:"🎃",christmas_tree:"🎄",fireworks:"🎆",sparkler:"🎇",firecracker:"🧨",sparkles:"✨",balloon:"🎈",tada:"🎉",confetti_ball:"🎊",tanabata_tree:"🎋",bamboo:"🎍",dolls:"🎎",flags:"🎏",wind_chime:"🎐",rice_scene:"🎑",red_envelope:"🧧",ribbon:"🎀",gift:"🎁",reminder_ribbon:"🎗️",tickets:"🎟️",ticket:"🎫",medal_military:"🎖️",trophy:"🏆",medal_sports:"🏅","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉",soccer:"⚽",baseball:"⚾",softball:"🥎",basketball:"🏀",volleyball:"🏐",football:"🏈",rugby_football:"🏉",tennis:"🎾",flying_disc:"🥏",bowling:"🎳",cricket_game:"🏏",field_hockey:"🏑",ice_hockey:"🏒",lacrosse:"🥍",ping_pong:"🏓",badminton:"🏸",boxing_glove:"🥊",martial_arts_uniform:"🥋",goal_net:"🥅",golf:"⛳",ice_skate:"⛸️",fishing_pole_and_fish:"🎣",diving_mask:"🤿",running_shirt_with_sash:"🎽",ski:"🎿",sled:"🛷",curling_stone:"🥌",dart:"🎯",yo_yo:"🪀",kite:"🪁","8ball":"🎱",crystal_ball:"🔮",magic_wand:"🪄",nazar_amulet:"🧿",video_game:"🎮",joystick:"🕹️",slot_machine:"🎰",game_die:"🎲",jigsaw:"🧩",teddy_bear:"🧸",pinata:"🪅",nesting_dolls:"🪆",spades:"♠️",hearts:"♥️",diamonds:"♦️",clubs:"♣️",chess_pawn:"♟️",black_joker:"🃏",mahjong:"🀄",flower_playing_cards:"🎴",performing_arts:"🎭",framed_picture:"🖼️",art:"🎨",thread:"🧵",sewing_needle:"🪡",yarn:"🧶",knot:"🪢",eyeglasses:"👓",dark_sunglasses:"🕶️",goggles:"🥽",lab_coat:"🥼",safety_vest:"🦺",necktie:"👔",shirt:"👕",tshirt:"👕",jeans:"👖",scarf:"🧣",gloves:"🧤",coat:"🧥",socks:"🧦",dress:"👗",kimono:"👘",sari:"🥻",one_piece_swimsuit:"🩱",swim_brief:"🩲",shorts:"🩳",bikini:"👙",womans_clothes:"👚",purse:"👛",handbag:"👜",pouch:"👝",shopping:"🛍️",school_satchel:"🎒",thong_sandal:"🩴",mans_shoe:"👞",shoe:"👞",athletic_shoe:"👟",hiking_boot:"🥾",flat_shoe:"🥿",high_heel:"👠",sandal:"👡",ballet_shoes:"🩰",boot:"👢",crown:"👑",womans_hat:"👒",tophat:"🎩",mortar_board:"🎓",billed_cap:"🧢",military_helmet:"🪖",rescue_worker_helmet:"⛑️",prayer_beads:"📿",lipstick:"💄",ring:"💍",gem:"💎",mute:"🔇",speaker:"🔈",sound:"🔉",loud_sound:"🔊",loudspeaker:"📢",mega:"📣",postal_horn:"📯",bell:"🔔",no_bell:"🔕",musical_score:"🎼",musical_note:"🎵",notes:"🎶",studio_microphone:"🎙️",level_slider:"🎚️",control_knobs:"🎛️",microphone:"🎤",headphones:"🎧",radio:"📻",saxophone:"🎷",accordion:"🪗",guitar:"🎸",musical_keyboard:"🎹",trumpet:"🎺",violin:"🎻",banjo:"🪕",drum:"🥁",long_drum:"🪘",iphone:"📱",calling:"📲",phone:"☎️",telephone:"☎️",telephone_receiver:"📞",pager:"📟",fax:"📠",battery:"🔋",electric_plug:"🔌",computer:"💻",desktop_computer:"🖥️",printer:"🖨️",keyboard:"⌨️",computer_mouse:"🖱️",trackball:"🖲️",minidisc:"💽",floppy_disk:"💾",cd:"💿",dvd:"📀",abacus:"🧮",movie_camera:"🎥",film_strip:"🎞️",film_projector:"📽️",clapper:"🎬",tv:"📺",camera:"📷",camera_flash:"📸",video_camera:"📹",vhs:"📼",mag:"🔍",mag_right:"🔎",candle:"🕯️",bulb:"💡",flashlight:"🔦",izakaya_lantern:"🏮",lantern:"🏮",diya_lamp:"🪔",notebook_with_decorative_cover:"📔",closed_book:"📕",book:"📖",open_book:"📖",green_book:"📗",blue_book:"📘",orange_book:"📙",books:"📚",notebook:"📓",ledger:"📒",page_with_curl:"📃",scroll:"📜",page_facing_up:"📄",newspaper:"📰",newspaper_roll:"🗞️",bookmark_tabs:"📑",bookmark:"🔖",label:"🏷️",moneybag:"💰",coin:"🪙",yen:"💴",dollar:"💵",euro:"💶",pound:"💷",money_with_wings:"💸",credit_card:"💳",receipt:"🧾",chart:"💹",envelope:"✉️",email:"📧","e-mail":"📧",incoming_envelope:"📨",envelope_with_arrow:"📩",outbox_tray:"📤",inbox_tray:"📥",package:"📦",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",postbox:"📮",ballot_box:"🗳️",pencil2:"✏️",black_nib:"✒️",fountain_pen:"🖋️",pen:"🖊️",paintbrush:"🖌️",crayon:"🖍️",memo:"📝",pencil:"📝",briefcase:"💼",file_folder:"📁",open_file_folder:"📂",card_index_dividers:"🗂️",date:"📅",calendar:"📆",spiral_notepad:"🗒️",spiral_calendar:"🗓️",card_index:"📇",chart_with_upwards_trend:"📈",chart_with_downwards_trend:"📉",bar_chart:"📊",clipboard:"📋",pushpin:"📌",round_pushpin:"📍",paperclip:"📎",paperclips:"🖇️",straight_ruler:"📏",triangular_ruler:"📐",scissors:"✂️",card_file_box:"🗃️",file_cabinet:"🗄️",wastebasket:"🗑️",lock:"🔒",unlock:"🔓",lock_with_ink_pen:"🔏",closed_lock_with_key:"🔐",key:"🔑",old_key:"🗝️",hammer:"🔨",axe:"🪓",pick:"⛏️",hammer_and_pick:"⚒️",hammer_and_wrench:"🛠️",dagger:"🗡️",crossed_swords:"⚔️",gun:"🔫",boomerang:"🪃",bow_and_arrow:"🏹",shield:"🛡️",carpentry_saw:"🪚",wrench:"🔧",screwdriver:"🪛",nut_and_bolt:"🔩",gear:"⚙️",clamp:"🗜️",balance_scale:"⚖️",probing_cane:"🦯",link:"🔗",chains:"⛓️",hook:"🪝",toolbox:"🧰",magnet:"🧲",ladder:"🪜",alembic:"⚗️",test_tube:"🧪",petri_dish:"🧫",dna:"🧬",microscope:"🔬",telescope:"🔭",satellite:"📡",syringe:"💉",drop_of_blood:"🩸",pill:"💊",adhesive_bandage:"🩹",stethoscope:"🩺",door:"🚪",elevator:"🛗",mirror:"🪞",window:"🪟",bed:"🛏️",couch_and_lamp:"🛋️",chair:"🪑",toilet:"🚽",plunger:"🪠",shower:"🚿",bathtub:"🛁",mouse_trap:"🪤",razor:"🪒",lotion_bottle:"🧴",safety_pin:"🧷",broom:"🧹",basket:"🧺",roll_of_paper:"🧻",bucket:"🪣",soap:"🧼",toothbrush:"🪥",sponge:"🧽",fire_extinguisher:"🧯",shopping_cart:"🛒",smoking:"🚬",coffin:"⚰️",headstone:"🪦",funeral_urn:"⚱️",moyai:"🗿",placard:"🪧",atm:"🏧",put_litter_in_its_place:"🚮",potable_water:"🚰",wheelchair:"♿",mens:"🚹",womens:"🚺",restroom:"🚻",baby_symbol:"🚼",wc:"🚾",passport_control:"🛂",customs:"🛃",baggage_claim:"🛄",left_luggage:"🛅",warning:"⚠️",children_crossing:"🚸",no_entry:"⛔",no_entry_sign:"🚫",no_bicycles:"🚳",no_smoking:"🚭",do_not_litter:"🚯","non-potable_water":"🚱",no_pedestrians:"🚷",no_mobile_phones:"📵",underage:"🔞",radioactive:"☢️",biohazard:"☣️",arrow_up:"⬆️",arrow_upper_right:"↗️",arrow_right:"➡️",arrow_lower_right:"↘️",arrow_down:"⬇️",arrow_lower_left:"↙️",arrow_left:"⬅️",arrow_upper_left:"↖️",arrow_up_down:"↕️",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",arrow_right_hook:"↪️",arrow_heading_up:"⤴️",arrow_heading_down:"⤵️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",back:"🔙",end:"🔚",on:"🔛",soon:"🔜",top:"🔝",place_of_worship:"🛐",atom_symbol:"⚛️",om:"🕉️",star_of_david:"✡️",wheel_of_dharma:"☸️",yin_yang:"☯️",latin_cross:"✝️",orthodox_cross:"☦️",star_and_crescent:"☪️",peace_symbol:"☮️",menorah:"🕎",six_pointed_star:"🔯",aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpius:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓",ophiuchus:"⛎",twisted_rightwards_arrows:"🔀",repeat:"🔁",repeat_one:"🔂",arrow_forward:"▶️",fast_forward:"⏩",next_track_button:"⏭️",play_or_pause_button:"⏯️",arrow_backward:"◀️",rewind:"⏪",previous_track_button:"⏮️",arrow_up_small:"🔼",arrow_double_up:"⏫",arrow_down_small:"🔽",arrow_double_down:"⏬",pause_button:"⏸️",stop_button:"⏹️",record_button:"⏺️",eject_button:"⏏️",cinema:"🎦",low_brightness:"🔅",high_brightness:"🔆",signal_strength:"📶",vibration_mode:"📳",mobile_phone_off:"📴",female_sign:"♀️",male_sign:"♂️",transgender_symbol:"⚧️",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",heavy_minus_sign:"➖",heavy_division_sign:"➗",infinity:"♾️",bangbang:"‼️",interrobang:"⁉️",question:"❓",grey_question:"❔",grey_exclamation:"❕",exclamation:"❗",heavy_exclamation_mark:"❗",wavy_dash:"〰️",currency_exchange:"💱",heavy_dollar_sign:"💲",medical_symbol:"⚕️",recycle:"♻️",fleur_de_lis:"⚜️",trident:"🔱",name_badge:"📛",beginner:"🔰",o:"⭕",white_check_mark:"✅",ballot_box_with_check:"☑️",heavy_check_mark:"✔️",x:"❌",negative_squared_cross_mark:"❎",curly_loop:"➰",loop:"➿",part_alternation_mark:"〽️",eight_spoked_asterisk:"✳️",eight_pointed_black_star:"✴️",sparkle:"❇️",copyright:"©️",registered:"®️",tm:"™️",hash:"#️⃣",asterisk:"*️⃣",zero:"0️⃣",one:"1️⃣",two:"2️⃣",three:"3️⃣",four:"4️⃣",five:"5️⃣",six:"6️⃣",seven:"7️⃣",eight:"8️⃣",nine:"9️⃣",keycap_ten:"🔟",capital_abcd:"🔠",abcd:"🔡",symbols:"🔣",abc:"🔤",a:"🅰️",ab:"🆎",b:"🅱️",cl:"🆑",cool:"🆒",free:"🆓",information_source:"ℹ️",id:"🆔",m:"Ⓜ️",new:"🆕",ng:"🆖",o2:"🅾️",ok:"🆗",parking:"🅿️",sos:"🆘",up:"🆙",vs:"🆚",koko:"🈁",sa:"🈂️",ideograph_advantage:"🉐",accept:"🉑",congratulations:"㊗️",secret:"㊙️",u6e80:"🈵",red_circle:"🔴",orange_circle:"🟠",yellow_circle:"🟡",green_circle:"🟢",large_blue_circle:"🔵",purple_circle:"🟣",brown_circle:"🟤",black_circle:"⚫",white_circle:"⚪",red_square:"🟥",orange_square:"🟧",yellow_square:"🟨",green_square:"🟩",blue_square:"🟦",purple_square:"🟪",brown_square:"🟫",black_large_square:"⬛",white_large_square:"⬜",black_medium_square:"◼️",white_medium_square:"◻️",black_medium_small_square:"◾",white_medium_small_square:"◽",black_small_square:"▪️",white_small_square:"▫️",large_orange_diamond:"🔶",large_blue_diamond:"🔷",small_orange_diamond:"🔸",small_blue_diamond:"🔹",small_red_triangle:"🔺",small_red_triangle_down:"🔻",diamond_shape_with_a_dot_inside:"💠",radio_button:"🔘",white_square_button:"🔳",black_square_button:"🔲",checkered_flag:"🏁",triangular_flag_on_post:"🚩",crossed_flags:"🎌",black_flag:"🏴",white_flag:"🏳️",rainbow_flag:"🏳️‍🌈",transgender_flag:"🏳️‍⚧️",pirate_flag:"🏴‍☠️",ascension_island:"🇦🇨",andorra:"🇦🇩",united_arab_emirates:"🇦🇪",afghanistan:"🇦🇫",antigua_barbuda:"🇦🇬",anguilla:"🇦🇮",albania:"🇦🇱",armenia:"🇦🇲",angola:"🇦🇴",antarctica:"🇦🇶",argentina:"🇦🇷",american_samoa:"🇦🇸",austria:"🇦🇹",australia:"🇦🇺",aruba:"🇦🇼",aland_islands:"🇦🇽",azerbaijan:"🇦🇿",bosnia_herzegovina:"🇧🇦",barbados:"🇧🇧",bangladesh:"🇧🇩",belgium:"🇧🇪",burkina_faso:"🇧🇫",bulgaria:"🇧🇬",bahrain:"🇧🇭",burundi:"🇧🇮",benin:"🇧🇯",st_barthelemy:"🇧🇱",bermuda:"🇧🇲",brunei:"🇧🇳",bolivia:"🇧🇴",caribbean_netherlands:"🇧🇶",brazil:"🇧🇷",bahamas:"🇧🇸",bhutan:"🇧🇹",bouvet_island:"🇧🇻",botswana:"🇧🇼",belarus:"🇧🇾",belize:"🇧🇿",canada:"🇨🇦",cocos_islands:"🇨🇨",congo_kinshasa:"🇨🇩",central_african_republic:"🇨🇫",congo_brazzaville:"🇨🇬",switzerland:"🇨🇭",cote_divoire:"🇨🇮",cook_islands:"🇨🇰",chile:"🇨🇱",cameroon:"🇨🇲",cn:"🇨🇳",colombia:"🇨🇴",clipperton_island:"🇨🇵",costa_rica:"🇨🇷",cuba:"🇨🇺",cape_verde:"🇨🇻",curacao:"🇨🇼",christmas_island:"🇨🇽",cyprus:"🇨🇾",czech_republic:"🇨🇿",de:"🇩🇪",diego_garcia:"🇩🇬",djibouti:"🇩🇯",denmark:"🇩🇰",dominica:"🇩🇲",dominican_republic:"🇩🇴",algeria:"🇩🇿",ceuta_melilla:"🇪🇦",ecuador:"🇪🇨",estonia:"🇪🇪",egypt:"🇪🇬",western_sahara:"🇪🇭",eritrea:"🇪🇷",es:"🇪🇸",ethiopia:"🇪🇹",eu:"🇪🇺",european_union:"🇪🇺",finland:"🇫🇮",fiji:"🇫🇯",falkland_islands:"🇫🇰",micronesia:"🇫🇲",faroe_islands:"🇫🇴",fr:"🇫🇷",gabon:"🇬🇦",gb:"🇬🇧",uk:"🇬🇧",grenada:"🇬🇩",georgia:"🇬🇪",french_guiana:"🇬🇫",guernsey:"🇬🇬",ghana:"🇬🇭",gibraltar:"🇬🇮",greenland:"🇬🇱",gambia:"🇬🇲",guinea:"🇬🇳",guadeloupe:"🇬🇵",equatorial_guinea:"🇬🇶",greece:"🇬🇷",south_georgia_south_sandwich_islands:"🇬🇸",guatemala:"🇬🇹",guam:"🇬🇺",guinea_bissau:"🇬🇼",guyana:"🇬🇾",hong_kong:"🇭🇰",heard_mcdonald_islands:"🇭🇲",honduras:"🇭🇳",croatia:"🇭🇷",haiti:"🇭🇹",hungary:"🇭🇺",canary_islands:"🇮🇨",indonesia:"🇮🇩",ireland:"🇮🇪",israel:"🇮🇱",isle_of_man:"🇮🇲",india:"🇮🇳",british_indian_ocean_territory:"🇮🇴",iraq:"🇮🇶",iran:"🇮🇷",iceland:"🇮🇸",it:"🇮🇹",jersey:"🇯🇪",jamaica:"🇯🇲",jordan:"🇯🇴",jp:"🇯🇵",kenya:"🇰🇪",kyrgyzstan:"🇰🇬",cambodia:"🇰🇭",kiribati:"🇰🇮",comoros:"🇰🇲",st_kitts_nevis:"🇰🇳",north_korea:"🇰🇵",kr:"🇰🇷",kuwait:"🇰🇼",cayman_islands:"🇰🇾",kazakhstan:"🇰🇿",laos:"🇱🇦",lebanon:"🇱🇧",st_lucia:"🇱🇨",liechtenstein:"🇱🇮",sri_lanka:"🇱🇰",liberia:"🇱🇷",lesotho:"🇱🇸",lithuania:"🇱🇹",luxembourg:"🇱🇺",latvia:"🇱🇻",libya:"🇱🇾",morocco:"🇲🇦",monaco:"🇲🇨",moldova:"🇲🇩",montenegro:"🇲🇪",st_martin:"🇲🇫",madagascar:"🇲🇬",marshall_islands:"🇲🇭",macedonia:"🇲🇰",mali:"🇲🇱",myanmar:"🇲🇲",mongolia:"🇲🇳",macau:"🇲🇴",northern_mariana_islands:"🇲🇵",martinique:"🇲🇶",mauritania:"🇲🇷",montserrat:"🇲🇸",malta:"🇲🇹",mauritius:"🇲🇺",maldives:"🇲🇻",malawi:"🇲🇼",mexico:"🇲🇽",malaysia:"🇲🇾",mozambique:"🇲🇿",namibia:"🇳🇦",new_caledonia:"🇳🇨",niger:"🇳🇪",norfolk_island:"🇳🇫",nigeria:"🇳🇬",nicaragua:"🇳🇮",netherlands:"🇳🇱",norway:"🇳🇴",nepal:"🇳🇵",nauru:"🇳🇷",niue:"🇳🇺",new_zealand:"🇳🇿",oman:"🇴🇲",panama:"🇵🇦",peru:"🇵🇪",french_polynesia:"🇵🇫",papua_new_guinea:"🇵🇬",philippines:"🇵🇭",pakistan:"🇵🇰",poland:"🇵🇱",st_pierre_miquelon:"🇵🇲",pitcairn_islands:"🇵🇳",puerto_rico:"🇵🇷",palestinian_territories:"🇵🇸",portugal:"🇵🇹",palau:"🇵🇼",paraguay:"🇵🇾",qatar:"🇶🇦",reunion:"🇷🇪",romania:"🇷🇴",serbia:"🇷🇸",ru:"🇷🇺",rwanda:"🇷🇼",saudi_arabia:"🇸🇦",solomon_islands:"🇸🇧",seychelles:"🇸🇨",sudan:"🇸🇩",sweden:"🇸🇪",singapore:"🇸🇬",st_helena:"🇸🇭",slovenia:"🇸🇮",svalbard_jan_mayen:"🇸🇯",slovakia:"🇸🇰",sierra_leone:"🇸🇱",san_marino:"🇸🇲",senegal:"🇸🇳",somalia:"🇸🇴",suriname:"🇸🇷",south_sudan:"🇸🇸",sao_tome_principe:"🇸🇹",el_salvador:"🇸🇻",sint_maarten:"🇸🇽",syria:"🇸🇾",swaziland:"🇸🇿",tristan_da_cunha:"🇹🇦",turks_caicos_islands:"🇹🇨",chad:"🇹🇩",french_southern_territories:"🇹🇫",togo:"🇹🇬",thailand:"🇹🇭",tajikistan:"🇹🇯",tokelau:"🇹🇰",timor_leste:"🇹🇱",turkmenistan:"🇹🇲",tunisia:"🇹🇳",tonga:"🇹🇴",tr:"🇹🇷",trinidad_tobago:"🇹🇹",tuvalu:"🇹🇻",taiwan:"🇹🇼",tanzania:"🇹🇿",ukraine:"🇺🇦",uganda:"🇺🇬",us_outlying_islands:"🇺🇲",united_nations:"🇺🇳",us:"🇺🇸",uruguay:"🇺🇾",uzbekistan:"🇺🇿",vatican_city:"🇻🇦",st_vincent_grenadines:"🇻🇨",venezuela:"🇻🇪",british_virgin_islands:"🇻🇬",us_virgin_islands:"🇻🇮",vietnam:"🇻🇳",vanuatu:"🇻🇺",wallis_futuna:"🇼🇫",samoa:"🇼🇸",kosovo:"🇽🇰",yemen:"🇾🇪",mayotte:"🇾🇹",south_africa:"🇿🇦",zambia:"🇿🇲",zimbabwe:"🇿🇼",england:"🏴󠁧󠁢󠁥󠁮󠁧󠁿",scotland:"🏴󠁧󠁢󠁳󠁣󠁴󠁿",wales:"🏴󠁧󠁢󠁷󠁬󠁳󠁿"};Object.keys(yn).reduce((e,t)=>{const n=yn[t];return e[n]=t,e},{});const ep=Object.keys(yn).map(e=>e);Object.keys(yn).map(e=>yn[e]);function tp(e){return ep.filter(t=>t.startsWith(e)).map(t=>({name:t,emoji:yn[t]}))}const np=200,ip=new T.PluginKey("emoji"),rp=T.Node.create({name:"emoji",content:"text*",priority:np,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{},suggestion:{char:":",pluginKey:ip,command:({editor:t,range:n,props:i})=>{t.chain().focus().insertContentAt(n,`${i.emoji} `).run()}},button:({editor:t,t:n})=>({component:Jg,componentProps:{editor:t,action:()=>{},isActive:()=>!1,disabled:!1,icon:"EmojiIcon",tooltip:n("editor.emoji.tooltip")}})}},addCommands(){return{setEmoji:e=>({commands:t})=>t.insertContent(`${e.emoji} `)}},addProseMirrorPlugins(){return[mo({editor:this.editor,...this.options.suggestion})]}}).configure({suggestion:{items:({query:e})=>tp(e),render:()=>{let e,t,n;return{onStart:i=>{n=i.editor.isEditable,n&&(e=new T.ReactRenderer(Zu,{props:i,editor:i.editor}),t=no("body",{getReferenceClientRect:i.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(i){n&&(e.updateProps(i),t[0].setProps({getReferenceClientRect:i.clientRect}))},onKeyDown(i){var r;if(n)return i.event.key==="Escape"?(t[0].hide(),!0):(r=e.ref)==null?void 0:r.onKeyDown(i)},onExit(){n&&(t[0].destroy(),e.destroy())}}}}});function ap(e){const t=document.createElement("iframe");t.setAttribute("style","position: absolute; width: 0; height: 0; top: 0; left: 0;"),document.body.appendChild(t),t.textContent=`
9
+ `},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:r,storedMarks:a}=n;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=i.extensionManager,c=a||r.$to.parentOffset&&r.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:l})=>{if(l&&c&&o){const f=c.filter(g=>s.includes(g.type.name));u.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),lg=T.Node.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),dg=T.Node.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),hg=T.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,r=[];if(!n)return null;const a=this.editor.isEmpty;return e.descendants((o,s)=>{const c=i>=s&&i<=s+o.nodeSize,u=!o.isLeaf&&T.isNodeEmpty(o);if((c||!this.options.showOnlyCurrent)&&u){const l=[this.options.emptyNodeClass];a&&l.push(this.options.emptyEditorClass);const f=T.Decoration.node(s,s+o.nodeSize,{class:l.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:s,hasAnchor:c}):this.options.placeholder});r.push(f)}return this.options.includeChildren}),T.DecorationSet.create(e,r)}}})]}}),fg=T.Node.create({name:"text",group:"inline"}),gg=T.Node.create({name:"doc",topNode:!0,content:"block+"}),pg=gg.extend({content:"(block|columns)+"}),mg=T.Extension.create({name:"columnActionButton",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>{t.chain().focus().insertColumns({cols:2}).run()},icon:"Columns",tooltip:n("editor.columns.tooltip")}})}}}),bg=T.Extension.create({name:"selection",addProseMirrorPlugins(){const{editor:e}=this;return[new T.Plugin({key:new T.PluginKey("selection"),props:{decorations(t){return t.selection.empty||e.isFocused===!0?null:T.DecorationSet.create(t.doc,[T.Decoration.inline(t.selection.from,t.selection.to,{class:"selection"})])}}})]}});function yg(e){const{t}=Ce.useLocale(),n=pe.useMemo(()=>[{name:"paragraph",label:t("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:t("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:t("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:t("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:t("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:t("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:t("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:t("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:t("editor.codeblock.tooltip"),isActive:()=>e.editor.isActive("codeBlock"),iconName:"Code2",action:()=>e.editor.chain().focus().clearNodes().toggleCodeBlock().run()}],[e.editor,t]),i=pe.useMemo(()=>n.findLast(r=>r.isActive())??{label:"Empty"},[n]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,children:O.jsxs(T.Button,{className:"flex h-[32px] gap-1 px-1.5",variant:"ghost",children:[O.jsxs("span",{className:"whitespace-nowrap text-sm font-normal",children:[" ",i==null?void 0:i.label]}),O.jsx($e.ChevronDown,{className:"size-4"})]})}),O.jsx(T.DropdownMenuContent,{align:"start",className:"w-full p-1",hideWhenDetached:!0,sideOffset:5,children:n.map((r,a)=>{var s;const o=T.icons[r.iconName];return O.jsx(T.DropdownMenuCheckboxItem,{checked:((s=r.isActive)==null?void 0:s.call(r))||!1,className:"cursor-pointer",onClick:()=>r.action(),children:O.jsxs("div",{className:"flex items-center gap-2 px-2",children:[O.jsx(o,{className:"h3 w-3"}),O.jsxs("span",{children:[" ",r.label]})]})},`text-bubble-${a}`)})})]})}const xg=T.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:yg,componentProps:{}})}}});function ws({types:e,node:t}){return Array.isArray(e)&&e.includes(t.type)||t.type===e}const Dg=T.Extension.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph"]}},addProseMirrorPlugins(){const e=new T.PluginKey(this.name),t=Object.entries(this.editor.schema.nodes).map(([,n])=>n).filter(n=>this.options.notAfter.includes(n.name));return[new T.Plugin({key:e,appendTransaction:(n,i,r)=>{const{doc:a,tr:o,schema:s}=r,c=e.getState(r),u=a.content.size,l=s.nodes[this.options.node];if(c)return o.insert(u,l.create())},state:{init:(n,i)=>{const r=i.tr.doc.lastChild;return!ws({node:r,types:t})},apply:(n,i)=>{if(!n.docChanged)return i;const r=n.doc.lastChild;return!ws({node:r,types:t})}}})]}}),vg=T.Extension.create({name:"base-kit",addExtensions(){const e=[];return this.options.document!==!1&&e.push(pg.configure()),this.options.placeholder!==!1&&e.push(hg.configure({placeholder:({node:t,pos:n,editor:i})=>{var r,a,o,s,c;return((r=t==null?void 0:t.type)==null?void 0:r.name)==="columns"||((a=t==null?void 0:t.content)==null?void 0:a.size)!==0?"":((o=t==null?void 0:t.type)==null?void 0:o.name)==="heading"?`${Ce.localeActions.t(`editor.heading.h${t.attrs.level}.tooltip`)}`:((s=t==null?void 0:t.type)==null?void 0:s.name)==="codeBlock"||((c=t==null?void 0:t.type)==null?void 0:c.name)==="table"?"":i.extensionManager.extensions.some(u=>u.name==="slashCommand")?Ce.localeActions.t("editor.slash"):Ce.localeActions.t("editor.content")},...this.options.placeholder})),this.options.focus!==!1&&e.push(eg.configure({className:"focus",...this.options.focus})),this.options.text!==!1&&e.push(fg.configure()),this.options.textBubble!==!1&&e.push(xg.configure()),this.options.gapcursor!==!1&&e.push(cg.configure()),this.options.dropcursor!==!1&&e.push(Jf.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&e.push(Zf.configure(this.options.characterCount)),this.options.paragraph!==!1&&e.push(dg.configure(this.options.paragraph)),this.options.hardBreak!==!1&&e.push(ug.configure(this.options.hardBreak)),this.options.listItem!==!1&&e.push(lg.configure(this.options.listItem)),this.options.textStyle!==!1&&e.push(kh.configure(this.options.textStyle)),this.options.trailingNode!==!1&&e.push(Dg.configure(this.options.trailingNode)),this.options.selection!==!1&&e.push(bg),this.options.multiColumn!==!1&&e.push(T.Column,T.MultiColumn),e}}),$u=T.Mark.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Ku=T.Mark.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),_g=T.Extension.create({name:"subAndSuperScript",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,extension:n,t:i})=>{const r=n.options.subscript,a=n.options.superscript,o={component:T.ActionButton,componentProps:{action:()=>t.commands.toggleSubscript(),isActive:()=>t.isActive("subscript")||!1,disabled:!t.can().toggleSubscript(),icon:"Subscript",tooltip:i("editor.subscript.tooltip")}},s={component:T.ActionButton,componentProps:{action:()=>t.commands.toggleSuperscript(),isActive:()=>t.isActive("superscript")||!1,disabled:!t.can().toggleSuperscript(),icon:"Superscript",tooltip:i("editor.superscript.tooltip")}},c=[];return r!==!1&&c.push(o),a!==!1&&c.push(s),c}}},addExtensions(){const e=[];return this.options.subscript!==!1&&e.push($u.configure(this.options.subscript)),this.options.superscript!==!1&&e.push(Ku.configure(this.options.superscript)),e}});function wg(e){var n;const t=pe.useMemo(()=>{var a;const i=(a=e==null?void 0:e.items)==null?void 0:a.find(o=>o.isActive());return i&&!i.default?{...i,icon:i!=null&&i.icon?i==null?void 0:i.icon:e==null?void 0:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:e==null?void 0:e.icon,tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.MenuDown,{className:"size-3 text-gray-500"})})}),O.jsx(T.DropdownMenuContent,{className:"w-full",children:(n=e==null?void 0:e.items)==null?void 0:n.map((i,r)=>O.jsxs(T.DropdownMenuCheckboxItem,{checked:t.title===i.title,className:"flex items-center gap-3",onClick:i.action,children:[O.jsx(T.IconComponent,{name:i==null?void 0:i.icon}),O.jsx("span",{className:"ml-1",children:i.title}),!!(i!=null&&i.shortcutKeys)&&O.jsx("span",{className:"ml-auto text-xs tracking-widest opacity-60",children:T.getShortcutKeys(i.shortcutKeys)})]},`more-mark-${r}`))})]})}const Tg=T.Extension.create({name:"moreMark",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,extension:n,t:i}){const r=n.options.subscript,a=n.options.superscript,o={action:()=>t.commands.toggleSubscript(),isActive:()=>t.isActive("subscript")||!1,disabled:!t.can().toggleSubscript(),icon:"Subscript",title:i("editor.subscript.tooltip"),shortcutKeys:["mod","."]},s={action:()=>t.commands.toggleSuperscript(),isActive:()=>t.isActive("superscript")||!1,disabled:!t.can().toggleSuperscript(),icon:"Superscript",title:i("editor.superscript.tooltip"),shortcutKeys:["mod",","]},c=[];return r!==!1&&c.push(o),a!==!1&&c.push(s),{component:wg,componentProps:{icon:"Type",tooltip:i("editor.moremark"),disabled:!t.isEditable,items:c}}}}},addExtensions(){const e=[];return this.options.subscript!==!1&&e.push($u.configure(this.options.subscript)),this.options.superscript!==!1&&e.push(Ku.configure(this.options.superscript)),e}}),Ug=T.Extension.create({name:"indent",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","blockquote"],minIndent:T.IndentProps.min,maxIndent:T.IndentProps.max,button({editor:t,t:n}){return[{component:T.ActionButton,componentProps:{action:()=>{t.commands.indent()},shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")}},{component:T.ActionButton,componentProps:{action:()=>{t.commands.outdent()},shortcutKeys:["Shift","Tab"],icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:e=>{const t=e.dataset.indent;return(t?Number.parseInt(t,10):0)||0},renderHTML:e=>e.indent?{"data-indent":e.indent}:{}}}}]},addCommands(){return{indent:()=>T.createIndentCommand({delta:T.IndentProps.more,types:this.options.types}),outdent:()=>T.createIndentCommand({delta:T.IndentProps.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});function Eg(e){return Number.parseFloat(e.replace("%",""))/100}function Ag(e){const{t}=Ce.useLocale(),[n,i]=pe.useState("default");function r(o){o==="default"?e.editor.commands.unsetLineHeight():e.editor.commands.setLineHeight(o),i(o)}const a=pe.useMemo(()=>{const c=e.editor.extensionManager.extensions.find(u=>u.name==="lineHeight").options.lineHeights.map(u=>({label:Eg(u),value:u}));return c.unshift({label:t("editor.default"),value:"default"}),c},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:"LineHeight",tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.IconComponent,{className:"ml-1 size-3 text-zinc-500",name:"MenuDown"})})}),O.jsx(T.DropdownMenuContent,{className:"min-w-24",children:a==null?void 0:a.map((o,s)=>O.jsx(T.DropdownMenuCheckboxItem,{checked:o.value===n,onClick:()=>r(o.value),children:o.label},`lineHeight-${s}`))})]})}const Cg=["paragraph","heading","list_item","todo_item"];function kg(e,t){const{selection:n,doc:i}=e;if(!n||!i||!(n instanceof T.TextSelection||n instanceof T.AllSelection))return e;const{from:r,to:a}=n,o=[],s=t&&t!==Ce.DEFAULT_LINE_HEIGHT?t:null;if(i.nodesBetween(r,a,(c,u)=>{const l=c.type;return Cg.includes(l.name)?((c.attrs.lineHeight||null)!==s&&o.push({node:c,pos:u,nodeType:l}),l.name!=="list_item"&&l.name!=="todo_item"):!0}),o.length===0)return e;for(const c of o){const{node:u,pos:l,nodeType:f}=c;let{attrs:g}=u;g={...g,lineHeight:s},e=e.setNodeMarkup(l,f,g,u.marks)}return e}function Fg(e){return({state:t,dispatch:n})=>{const{selection:i}=t;let{tr:r}=t;return r=r.setSelection(i),r=kg(r,e),r.docChanged?(n&&n(r),!0):!1}}const Sg=T.Extension.create({name:"lineHeight",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:Ce.DEFAULT_LINE_HEIGHT_LIST,defaultHeight:Ce.DEFAULT_LINE_HEIGHT,button({editor:t,t:n}){return{component:Ag,componentProps:{editor:t,tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight||this.options.defaultHeight,renderHTML:e=>e.lineHeight===this.options.defaultHeight||!e.lineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>Fg(e),unsetLineHeight:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"lineHeight"))}}});function Bg(e){var t;const{char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:a,startOfLine:o,$position:s}=e,c=i&&!r,u=T.escapeForRegEx(n),l=new RegExp(`\\s${u}$`),f=o?"^":"",g=r?"":u,d=c?new RegExp(`${f}${u}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${f}(?:^)?${u}[^\\s${g}]*`,"gm"),x=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!x)return null;const m=s.pos-x.length,h=Array.from(x.matchAll(d)).pop();if(!h||h.input===void 0||h.index===void 0)return null;const b=h.input.slice(Math.max(0,h.index-1),h.index),p=new RegExp(`^[${a==null?void 0:a.join("")}\0]?$`).test(b);if(a!==null&&!p)return null;const D=m+h.index;let w=D+h[0].length;return c&&l.test(x.slice(w-1,w+1))&&(h[0]+=" ",w+=1),D<s.pos&&w>=s.pos?{range:{from:D,to:w},query:h[0].slice(n.length),text:h[0]}:null}const Ng=new T.PluginKey("suggestion");function mo({pluginKey:e=Ng,editor:t,char:n="@",allowSpaces:i=!1,allowToIncludeChar:r=!1,allowedPrefixes:a=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:c="suggestion",command:u=()=>null,items:l=()=>[],render:f=()=>({}),allow:g=()=>!0,findSuggestionMatch:d=Bg}){let x;const m=f==null?void 0:f(),h=new T.Plugin({key:e,view(){return{update:async(b,p)=>{var D,w,_,U,E,L,A;const W=(D=this.key)===null||D===void 0?void 0:D.getState(p),N=(w=this.key)===null||w===void 0?void 0:w.getState(b.state),F=W.active&&N.active&&W.range.from!==N.range.from,q=!W.active&&N.active,v=W.active&&!N.active,k=!q&&!v&&W.query!==N.query,V=q||F&&k,P=k||F,J=v||F&&k;if(!V&&!P&&!J)return;const K=J&&!V?W:N,re=b.dom.querySelector(`[data-decoration-id="${K.decorationId}"]`);x={editor:t,range:K.range,query:K.query,text:K.text,items:[],command:j=>u({editor:t,range:K.range,props:j}),decorationNode:re,clientRect:re?()=>{var j;const{decorationId:I}=(j=this.key)===null||j===void 0?void 0:j.getState(t.state),oe=b.dom.querySelector(`[data-decoration-id="${I}"]`);return(oe==null?void 0:oe.getBoundingClientRect())||null}:null},V&&((_=m==null?void 0:m.onBeforeStart)===null||_===void 0||_.call(m,x)),P&&((U=m==null?void 0:m.onBeforeUpdate)===null||U===void 0||U.call(m,x)),(P||V)&&(x.items=await l({editor:t,query:K.query})),J&&((E=m==null?void 0:m.onExit)===null||E===void 0||E.call(m,x)),P&&((L=m==null?void 0:m.onUpdate)===null||L===void 0||L.call(m,x)),V&&((A=m==null?void 0:m.onStart)===null||A===void 0||A.call(m,x))},destroy:()=>{var b;x&&((b=m==null?void 0:m.onExit)===null||b===void 0||b.call(m,x))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(b,p,D,w){const{isEditable:_}=t,{composing:U}=t.view,{selection:E}=b,{empty:L,from:A}=E,W={...p};if(W.composing=U,_&&(L||t.view.composing)){(A<p.range.from||A>p.range.to)&&!U&&!p.composing&&(W.active=!1);const N=d({char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:a,startOfLine:o,$position:E.$from}),F=`id_${Math.floor(Math.random()*4294967295)}`;N&&g({editor:t,state:w,range:N.range,isActive:p.active})?(W.active=!0,W.decorationId=p.decorationId?p.decorationId:F,W.range=N.range,W.query=N.query,W.text=N.text):W.active=!1}else W.active=!1;return W.active||(W.decorationId=null,W.range={from:0,to:0},W.query=null,W.text=null),W}},props:{handleKeyDown(b,p){var D;const{active:w,range:_}=h.getState(b.state);return w&&((D=m==null?void 0:m.onKeyDown)===null||D===void 0?void 0:D.call(m,{view:b,event:p,range:_}))||!1},decorations(b){const{active:p,range:D,decorationId:w}=h.getState(b);return p?T.DecorationSet.create(b.doc,[T.Decoration.inline(D.from,D.to,{nodeName:s,class:c,"data-decoration-id":w})]):null}}});return h}function Lg(e,t){var h,b;const[n,i]=pe.useState(0),[r,a]=pe.useState(0),o=pe.useRef(null),{t:s}=Ce.useLocale(),c=pe.useRef([]);pe.useImperativeHandle(t,()=>({onKeyDown:u})),pe.useEffect(()=>{if(!o.current)return;const p=r*1e3+n,D=c.current[p];D&&D.scrollIntoView({behavior:"smooth",block:"nearest"})},[n,r]);function u({event:p}){return p.key==="ArrowUp"?(l(),!0):p.key==="ArrowDown"?(f(),!0):p.key==="Enter"?(g(),!0):!1}function l(){var w;if(e.items.length===0)return!1;let p=n-1,D=r;p<0&&(D=r-1,p=((w=e.items[D])==null?void 0:w.commands.length)-1||0),D<0&&(D=e.items.length-1,p=e.items[D].commands.length-1),i(p),a(D)}function f(){if(e.items.length===0)return!1;const p=e.items[r].commands;let D=n+1,w=r;p.length-1<D&&(D=0,w=r+1),e.items.length-1<w&&(w=0),i(D),a(w)}function g(){if(e.items.length===0||r===-1||n===-1)return!1;d(r,n)}function d(p,D){const w=e.items[p].commands[D];e.command(w)}function x(p,D){d(p,D)}function m(p,D,w){c.current[p*1e3+D]=w}return O.jsx("div",{className:"mb-8 max-h-[min(80vh,24rem)] flex-wrap overflow-auto rounded-lg !border !border-neutral-200 !bg-white p-1 !text-black shadow-sm dark:!border-neutral-800 dark:!bg-black",ref:o,children:(h=e==null?void 0:e.items)!=null&&h.length?O.jsx("div",{className:"grid min-w-48 grid-cols-1 gap-0.5",children:(b=e==null?void 0:e.items)==null?void 0:b.map((p,D)=>O.jsxs(pe.Fragment,{children:[O.jsx("div",{className:"col-[1/-1] mx-2 mt-2 select-none text-[0.65rem] font-semibold uppercase tracking-wider !text-neutral-500 first:mt-0.5",children:p.title}),p.commands.map((w,_)=>O.jsxs("button",{onClick:()=>x(D,_),ref:U=>m(D,_,U),className:T.cn("flex items-center gap-3 px-2 py-1.5 text-sm !text-neutral-800 dark:!text-neutral-200 text-left w-full rounded-sm outline-none transition-colors !bg-transparent hover:!bg-accent ",{"slash-command-active":r===D&&n===_}),children:[w.iconUrl&&O.jsx("img",{alt:"",className:"size-6",src:w.iconUrl}),w.iconName&&O.jsx(T.IconComponent,{className:"!mr-1 !text-lg",name:w.iconName}),w.label]},`command-${_}`))]},`slash-${p.title}`))}):O.jsx("div",{className:"p-3",children:O.jsx("span",{className:"text-xs text-gray-800 dark:text-gray-100",children:s("editor.slash.empty")})})})}const Rg=pe.forwardRef(Lg),Ig={setOpen:(e,t)=>{T.dispatchEvent(T.EVENTS.UPLOAD_VIDEO(e),t)}};function Wg(e,t){const n=[{name:"format",title:Ce.localeActions.t("editor.slash.format"),commands:[]},{name:"insert",title:Ce.localeActions.t("editor.slash.insert"),commands:[]}];return e.forEach(i=>{i.name.toLowerCase()==="heading"&&i.options.levels.forEach(r=>{n[0].commands.push({name:`heading${r}`,label:Ce.localeActions.t(`editor.heading.h${r}.tooltip`),aliases:[`h${r}`,"bt",`bt${r}`],iconName:`Heading${r}`,action:({editor:a,range:o})=>{a.chain().focus().deleteRange(o).setHeading({level:r}).run()}})}),i.name.toLowerCase()==="bulletlist"&&n[0].commands.push({name:"bulletList",label:Ce.localeActions.t("editor.bulletlist.tooltip"),aliases:["ul","yxlb"],iconName:"List",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleBulletList().run()}}),i.name.toLowerCase()==="orderedlist"&&n[0].commands.push({name:"numberedList",label:Ce.localeActions.t("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleOrderedList().run()}}),i.name.toLowerCase()==="tasklist"&&n[0].commands.push({name:"taskList",label:Ce.localeActions.t("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleTaskList().run()}}),i.name.toLowerCase()==="blockquote"&&n[0].commands.push({name:"blockquote",label:Ce.localeActions.t("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setBlockquote().run()}}),i.name.toLowerCase()==="codeblock"&&n[0].commands.push({name:"codeBlock",label:Ce.localeActions.t("editor.codeblock.tooltip"),iconName:"Code2",description:"Code block with syntax highlighting",shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setCodeBlock().run()}}),i.name.toLowerCase()===T.Image.name&&n[1].commands.push({name:"image",label:Ce.localeActions.t("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).run(),T.actionDialogImage.setOpen(r.id,!0)}}),i.name.toLowerCase()===T.Video.name&&n[1].commands.push({name:"video",label:Ce.localeActions.t("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).run(),Ig.setOpen(r.id,!0)}}),i.name.toLowerCase()==="table"&&n[1].commands.push({name:"table",label:Ce.localeActions.t("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}}),i.name.toLowerCase()==="horizontalrule"&&n[1].commands.push({name:"horizontalRule",label:Ce.localeActions.t("editor.horizontalrule.tooltip"),iconName:"Minus",description:"Insert a horizontal divider",aliases:["hr","fgx","fg"],action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setHorizontalRule().run()}}),i.name.toLowerCase()==="columns"&&n[1].commands.push({name:"columns",label:Ce.localeActions.t("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",action:({editor:r})=>{r.chain().focus().insertColumns({cols:2}).run()}}),t==null||t(i,n)}),n}const Kt="slashCommand";let Ne;const Og=T.Extension.create({name:Kt,priority:200,onCreate(){Ne=no("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[mo({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!1,allowedPrefixes:null,pluginKey:new T.PluginKey(Kt),allow:({state:e,range:t})=>{var a,o;const n=e.doc.resolve(t.from);return((o=n.parent.textContent)==null?void 0:o.slice(Math.max(0,(a=n.parent.textContent)==null?void 0:a.indexOf("/")))).endsWith("/")},command:({editor:e,range:t,props:n})=>{const{view:i}=e;n.action({editor:e,range:t}),i.focus()},items:({query:e,editor:t})=>Wg(t.extensionManager.extensions,this.options.renderGroupItem).map(o=>({...o,commands:o.commands.filter(s=>{const c=s.label.toLowerCase().trim(),u=e.toLowerCase().trim();if(s.aliases){const l=s.aliases.map(d=>d.toLowerCase().trim()),f=c.match(u),g=l.some(d=>d.match(u));return f||g}return c.match(u)}).filter(s=>s.shouldBeHidden?!s.shouldBeHidden(this.editor):!0)})).filter(o=>o.commands.length>0).map(o=>({...o,commands:o.commands.map(s=>({...s,isEnabled:!0}))})),render:()=>{let e,t=null;return{onStart:n=>{var a;e=new T.ReactRenderer(Rg,{props:n,editor:n.editor});const{view:i}=n.editor,r=()=>{if(!n.clientRect)return n.editor.storage[Kt].rect;const o=n.clientRect();if(!o)return n.editor.storage[Kt].rect;let s=o.y;if(o.top+e.element.offsetHeight+40>window.innerHeight){const c=o.top+e.element.offsetHeight-window.innerHeight+40;s=o.y-c}return new DOMRect(o.x,s,o.width,o.height)};t=()=>{Ne==null||Ne[0].setProps({getReferenceClientRect:r})},(a=i.dom.parentElement)==null||a.addEventListener("scroll",t),Ne==null||Ne[0].setProps({getReferenceClientRect:r,appendTo:()=>document.body,content:e.element}),Ne==null||Ne[0].show()},onUpdate(n){var o;e.updateProps(n);const{view:i}=n.editor,r=()=>{if(!n.clientRect)return n.editor.storage[Kt].rect;const s=n.clientRect();return s?new DOMRect(s.x,s.y,s.width,s.height):n.editor.storage[Kt].rect},a=()=>{Ne==null||Ne[0].setProps({getReferenceClientRect:r})};(o=i.dom.parentElement)==null||o.addEventListener("scroll",a),n.editor.storage[Kt].rect=n.clientRect?r():{width:0,height:0,left:0,top:0,right:0,bottom:0},Ne==null||Ne[0].setProps({getReferenceClientRect:r})},onKeyDown(n){var i;return n.event.key==="Escape"?(Ne==null||Ne[0].hide(),!0):(Ne!=null&&Ne[0].state.isShown||Ne==null||Ne[0].show(),(i=e.ref)==null?void 0:i.onKeyDown(n))},onExit(n){var i;if(Ne==null||Ne[0].hide(),t){const{view:r}=n.editor;(i=r.dom.parentElement)==null||i.removeEventListener("scroll",t)}e.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}}),Mg=T.Extension.create({name:"painter",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>{t.commands.setPainter(t==null?void 0:t.state.selection.$head.marks())},icon:"PaintRoller",tooltip:n("editor.format")}})}},addCommands(){return{setPainter:e=>({view:{dispatch:t,state:{tr:n},dom:i}})=>{const o=`url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;return i.style.cursor=o,t(n.setMeta("painterAction",{type:"start",marks:e})),!0}}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("format-painter"),state:{init:()=>[],apply:(e,t)=>{const n=e.getMeta("painterAction");return n&&n.type==="start"?t=n.marks:n&&n.type==="end"&&(t=[]),t}},props:{handleDOMEvents:{mousedown(e){const t=this.getState(e.state);if(!t||t.length===0)return e.dom.style.cursor="",!1;const n=()=>{document.removeEventListener("mouseup",n);let{dispatch:i,state:{tr:r,selection:a},dom:o}=e;o.style.cursor="",r=r.removeMark(a.from,a.to);for(const s of t)s.type.name!=="link"&&(r=r.addMark(a.from,a.to,s));i(r.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",n),!0}}}})]}});function Pg({editor:e,...t}){const{t:n}=Ce.useLocale(),[i,r]=pe.useState(-1),[a,o]=pe.useState([]),[s,c]=pe.useState(""),[u,l]=pe.useState(""),[f,g]=pe.useState(!1),[d,x]=pe.useState(!1);return pe.useEffect(()=>{f||(c(""),l(""),r(-1),o([]),e.commands.setSearchTerm(""),e.commands.setReplaceTerm(""))},[e,f]),pe.useEffect(()=>{f&&e&&e.commands&&e.commands.setSearchTerm&&e.commands.setSearchTerm(s)},[f,s,e]),pe.useEffect(()=>{f&&e&&e.commands&&e.commands.setReplaceTerm&&e.commands.setReplaceTerm(u)},[f,u,e]),pe.useEffect(()=>{if(!e)return;const m=e.extensionManager.extensions.find(b=>b.name===Gu.name);if(!m)return;const h=()=>{if(!f)return;const b=m?m.storage.currentIndex:-1,p=m?m.storage.results:[];r(D=>D!==b?b:D),o(D=>T.deepEqual(D,p)?D:p)};return T.listenEvent(T.EVENTS.SEARCH_REPLCE,h),()=>{m&&T.listenEvent(T.EVENTS.SEARCH_REPLCE,h)}},[f,e]),O.jsxs(T.Popover,{onOpenChange:g,open:f,children:[O.jsx(T.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:O.jsx(T.ActionButton,{disabled:t==null?void 0:t.disabled,isActive:t==null?void 0:t.isActive,tooltip:t==null?void 0:t.tooltip,children:O.jsx(T.IconComponent,{name:t==null?void 0:t.icon})})}),O.jsxs(T.PopoverContent,{align:"start",className:"w-full",hideWhenDetached:!0,side:"bottom",children:[O.jsxs("div",{className:"mb-[6px] flex items-center justify-between",children:[O.jsx(T.Label,{children:n("editor.search.dialog.text")}),O.jsx("span",{className:"font-semibold",children:a.length>0?`${i+1}/${a.length}`:"0/0"})]}),O.jsxs("div",{className:"mb-[10px] flex w-full max-w-sm items-center gap-1.5",children:[O.jsx(T.Input,{autoFocus:!0,className:"w-full",onChange:m=>c(m.target.value),placeholder:"Text",required:!0,type:"text",value:s}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.goToPrevSearchResult,children:O.jsx(T.IconComponent,{name:"ChevronUp"})}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.goToNextSearchResult,children:O.jsx(T.IconComponent,{name:"ChevronDown"})})]}),O.jsx(T.Label,{className:"mb-[6px]",children:n("editor.replace.dialog.text")}),O.jsx("div",{className:"mb-[5px] flex w-full max-w-sm items-center gap-1.5",children:O.jsx("div",{className:"relative w-full max-w-sm items-center",children:O.jsx(T.Input,{className:"w-80",onChange:m=>l(m.target.value),placeholder:"Text",required:!0,type:"text",value:u})})}),O.jsxs("div",{className:"mb-[10px] flex items-center space-x-2",children:[O.jsx(T.Switch,{checked:d,onCheckedChange:m=>{x(m),e.commands.setCaseSensitive(m)}}),O.jsx(T.Label,{children:n("editor.replace.caseSensitive")})]}),O.jsxs("div",{className:"flex items-center gap-[10px]",children:[O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.replace,children:n("editor.replace.dialog.text")}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.replaceAll,children:n("editor.replaceAll.dialog.text")})]})]})]})}const En=(e,t)=>t(e.tr);function jg(e,t,n){return RegExp(t?e.replace(/[$()*+./?[\\\]^{|}-]/g,String.raw`\$&`):e,n?"gu":"gui")}function qg(e,t,n){const i=[];let r=[];const a=[];let o=0;if(!t)return{decorationsToReturn:[],results:[]};e==null||e.descendants((s,c)=>{s.isText?r[o]?r[o]={text:r[o].text+s.text,pos:r[o].pos}:r[o]={text:`${s.text}`,pos:c}:o+=1}),r=r.filter(Boolean);for(const{text:s,pos:c}of r){const u=[...s.matchAll(t)];for(const l of u){if(l[0]==="")break;l.index!==void 0&&a.push({from:c+l.index,to:c+l.index+l[0].length})}}for(const s of a)i.push(T.Decoration.inline(s.from,s.to,{class:n}));return{decorationsToReturn:i,results:a}}function Ts(e,t,{state:n,dispatch:i}){if(!t[0])return;const{from:a,to:o}=t[0];i&&i(n.tr.insertText(e,a,o))}function Hg(e,t,n,i){const r=t+1;if(!i[r])return null;const{from:a,to:o}=i[t],s=o-a-e.length+n,{from:c,to:u}=i[r];return i[r]={to:u-s,from:c-s},[s,i]}function zg(e,t,{tr:n,dispatch:i}){let r=0,a=t.slice();if(a.length===0)return!1;for(let o=0;o<a.length;o+=1){const{from:s,to:c}=a[o];n.insertText(e,s,c);const u=Hg(e,o,r,a);u&&(r=u[0],a=u[1])}return i(n),!0}function Us({view:e,tr:t,searchResults:n,searchResultCurrentClass:i,gotoIndex:r}){const a=n[r];if(a){const o=t.setMeta("directDecoration",{fromPos:a.from,toPos:a.to,attrs:{class:i}});return e==null||e.dispatch(o),setTimeout(()=>{const s=window.document.querySelector(`.${i}`);s&&io(s,{behavior:"smooth",scrollMode:"if-needed"})},0),!0}return!1}const Gu=T.Extension.create({name:"search",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),searchTerm:"",replaceTerm:"",results:[],currentIndex:0,searchResultClass:"search-result",searchResultCurrentClass:"search-result-current",caseSensitive:!1,disableRegex:!1,onChange:()=>{},button:({editor:t,t:n})=>({component:Pg,componentProps:{action:()=>{},icon:"SearchAndReplace",tooltip:n("editor.searchAndReplace.tooltip"),isActive:()=>!1,disabled:!1,editor:t}})}},addStorage(){return{results:[],currentIndex:-1}},addCommands(){return{setSearchTerm:e=>({state:t,dispatch:n})=>(this.options.searchTerm=e,this.storage.results=[],this.storage.currentIndex=0,T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(t,n),!1),setReplaceTerm:e=>({state:t,dispatch:n})=>(this.options.replaceTerm=e,En(t,n),!1),setCaseSensitive:e=>({state:t,dispatch:n})=>(this.options.caseSensitive=e,En(t,n),!1),replace:()=>({state:e,dispatch:t})=>{const{replaceTerm:n}=this.options,{currentIndex:i,results:r}=this.storage,a=r[i];return a?(Ts(n,[a],{state:e,dispatch:t}),this.storage.results.splice(i,1)):(Ts(n,r,{state:e,dispatch:t}),this.storage.results.shift()),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(e,t),!1},replaceAll:()=>({state:e,tr:t,dispatch:n})=>{const{replaceTerm:i}=this.options,{results:r}=this.storage;return zg(i,r,{tr:t,dispatch:n}),this.storage.currentIndex=-1,this.storage.results=[],T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(e,n),!1},goToPrevSearchResult:()=>({view:e,tr:t})=>{const{searchResultCurrentClass:n}=this.options,{currentIndex:i,results:r}=this.storage,a=(i+r.length-1)%r.length;return this.storage.currentIndex=a,T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),Us({view:e,tr:t,searchResults:r,searchResultCurrentClass:n,gotoIndex:a})},goToNextSearchResult:()=>({view:e,tr:t})=>{const{searchResultCurrentClass:n}=this.options,{currentIndex:i,results:r}=this.storage,a=(i+1)%r.length;return this.storage.currentIndex=a,this.options.onChange&&this.options.onChange(),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),Us({view:e,tr:t,searchResults:r,searchResultCurrentClass:n,gotoIndex:a})}}},addProseMirrorPlugins(){const e=this;return[new T.Plugin({key:new T.PluginKey("search"),state:{init(){return T.DecorationSet.empty},apply(t){const{doc:n,docChanged:i}=t,{searchTerm:r,searchResultClass:a,searchResultCurrentClass:o,disableRegex:s,caseSensitive:c}=e.options;if(i||r){const{decorationsToReturn:u,results:l}=qg(n,jg(r,s,c),a);if(e.storage.results=l,e.storage.currentIndex>l.length-1&&(e.storage.currentIndex=0),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),t.getMeta("directDecoration")){const{fromPos:f,toPos:g,attrs:d}=t.getMeta("directDecoration");u.push(T.Decoration.inline(f,g,d))}else l.length>0&&(u[0]=T.Decoration.inline(l[0].from,l[0].to,{class:o}));return T.DecorationSet.create(n,u)}return T.DecorationSet.empty}},props:{decorations(t){return this.getState(t)}}})]}});function Xg({className:e,...t}){return O.jsx(Jt.EmojiPicker.Root,{className:T.cn("bg-popover text-popover-foreground isolate flex h-full w-fit flex-col overflow-hidden rounded-md",e),"data-slot":"emoji-picker",...t})}function Vg({className:e,...t}){return O.jsxs("div",{className:T.cn("flex h-9 items-center gap-2 border-b px-3",e),"data-slot":"emoji-picker-search-wrapper",children:[O.jsx($e.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),O.jsx(Jt.EmojiPicker.Search,{className:"outline-hidden placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50","data-slot":"emoji-picker-search",...t})]})}function $g({children:e,...t}){return O.jsx("div",{...t,className:"scroll-my-1 px-1","data-slot":"emoji-picker-row",children:e})}function Kg({emoji:e,className:t,...n}){return O.jsx("button",{...n,className:T.cn("data-[active]:bg-accent flex size-7 items-center justify-center rounded-sm text-base",t),"data-slot":"emoji-picker-emoji",children:e.emoji})}function Gg({category:e,...t}){return O.jsx("div",{...t,className:"bg-popover text-muted-foreground px-3 pb-2 pt-3.5 text-xs leading-none","data-slot":"emoji-picker-category-header",children:e.label})}function Zg({className:e,...t}){return O.jsxs(Jt.EmojiPicker.Viewport,{className:T.cn("outline-hidden relative flex-1",e),"data-slot":"emoji-picker-viewport",...t,children:[O.jsx(Jt.EmojiPicker.Loading,{className:"absolute inset-0 flex items-center justify-center text-muted-foreground","data-slot":"emoji-picker-loading",children:O.jsx($e.LoaderIcon,{className:"size-4 animate-spin"})}),O.jsx(Jt.EmojiPicker.Empty,{className:"absolute inset-0 flex items-center justify-center text-muted-foreground text-sm","data-slot":"emoji-picker-empty",children:"No emoji found."}),O.jsx(Jt.EmojiPicker.List,{className:"select-none pb-1",components:{Row:$g,Emoji:Kg,CategoryHeader:Gg},"data-slot":"emoji-picker-list"})]})}function Yg({className:e,...t}){return O.jsx("div",{className:T.cn("max-w-(--frimousse-viewport-width) flex w-full min-w-0 items-center gap-1 border-t p-2",e),"data-slot":"emoji-picker-footer",...t,children:O.jsx(Jt.EmojiPicker.ActiveEmoji,{children:({emoji:n})=>n?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"flex size-7 flex-none items-center justify-center text-lg",children:n.emoji}),O.jsx("span",{className:"text-secondary-foreground truncate text-xs",children:n.label})]}):O.jsx("span",{className:"text-muted-foreground ml-1.5 flex h-7 items-center truncate text-xs",children:"Select an emoji…"})})})}function Qg({onSelectEmoji:e,children:t}){return O.jsxs(T.Popover,{modal:!0,children:[O.jsx(T.PopoverTrigger,{asChild:!0,children:t}),O.jsx(T.PopoverContent,{align:"start",className:"size-full p-2",hideWhenDetached:!0,side:"bottom",children:O.jsxs(Xg,{className:"!h-[342px]",onEmojiSelect:({emoji:n})=>{e(n)},children:[O.jsx(Vg,{}),O.jsx(Zg,{}),O.jsx(Yg,{})]})})]})}function Jg({editor:e,icon:t,...n}){const i=pe.useCallback(r=>{const{selection:a}=e.state,{$anchor:o}=a;return e.chain().insertContentAt(o.pos,r).run()},[e]);return O.jsx(Qg,{onSelectEmoji:i,children:O.jsx(T.ActionButton,{icon:t,tooltip:n==null?void 0:n.tooltip})})}const Zu=pe.forwardRef((e,t)=>{const n=pe.useRef(null),[i,r]=pe.useState(0),{t:a}=Ce.useLocale(),o=l=>{const f=e.items[l];f&&e.command(f)},s=()=>{r((i+e.items.length-1)%e.items.length)},c=()=>{r((i+1)%e.items.length)},u=()=>{o(i)};return pe.useEffect(()=>r(0),[e.items]),pe.useEffect(()=>{if(Number.isNaN(i+1))return;const l=n.current.querySelector(`span:nth-of-type(${i+1})`);l&&io(l,{behavior:"smooth",scrollMode:"if-needed"})},[i]),pe.useImperativeHandle(t,()=>({onKeyDown:({event:l})=>l.key==="ArrowUp"?(s(),!0):l.key==="ArrowDown"?(c(),!0):l.key==="Enter"?(u(),!0):!1})),O.jsx("div",{className:"max-h-[320px] w-[200px] overflow-y-auto overflow-x-hidden rounded-sm !border bg-popover p-1 text-popover-foreground shadow-md outline-none",children:O.jsx("div",{ref:n,children:e.items.length>0?e.items.map((l,f)=>O.jsxs("span",{className:T.clsx(" relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground",f===i?"bg-accent":""),onClick:()=>o(f),children:[l.fallbackImage?O.jsx("img",{className:"size-[1em]",src:l.fallbackImage}):l.emoji,":",l.name,":"]},`emoji-list-code-${f}`)):O.jsx("div",{className:"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors",children:O.jsx("span",{children:a("no_result_found")})})})})});Zu.displayName="EmojiList";const yn={100:"💯",1234:"🔢",grinning:"😀",smiley:"😃",smile:"😄",grin:"😁",laughing:"😆",satisfied:"😆",sweat_smile:"😅",rofl:"🤣",joy:"😂",slightly_smiling_face:"🙂",upside_down_face:"🙃",wink:"😉",blush:"😊",innocent:"😇",smiling_face_with_three_hearts:"🥰",heart_eyes:"😍",star_struck:"🤩",kissing_heart:"😘",kissing:"😗",relaxed:"☺️",kissing_closed_eyes:"😚",kissing_smiling_eyes:"😙",smiling_face_with_tear:"🥲",yum:"😋",stuck_out_tongue:"😛",stuck_out_tongue_winking_eye:"😜",zany_face:"🤪",stuck_out_tongue_closed_eyes:"😝",money_mouth_face:"🤑",hugs:"🤗",hand_over_mouth:"🤭",shushing_face:"🤫",thinking:"🤔",zipper_mouth_face:"🤐",raised_eyebrow:"🤨",neutral_face:"😐",expressionless:"😑",no_mouth:"😶",smirk:"😏",unamused:"😒",roll_eyes:"🙄",grimacing:"😬",lying_face:"🤥",relieved:"😌",pensive:"😔",sleepy:"😪",drooling_face:"🤤",sleeping:"😴",mask:"😷",face_with_thermometer:"🤒",face_with_head_bandage:"🤕",nauseated_face:"🤢",vomiting_face:"🤮",sneezing_face:"🤧",hot_face:"🥵",cold_face:"🥶",woozy_face:"🥴",dizzy_face:"😵",exploding_head:"🤯",cowboy_hat_face:"🤠",partying_face:"🥳",disguised_face:"🥸",sunglasses:"😎",nerd_face:"🤓",monocle_face:"🧐",confused:"😕",worried:"😟",slightly_frowning_face:"🙁",frowning_face:"☹️",open_mouth:"😮",hushed:"😯",astonished:"😲",flushed:"😳",pleading_face:"🥺",frowning:"😦",anguished:"😧",fearful:"😨",cold_sweat:"😰",disappointed_relieved:"😥",cry:"😢",sob:"😭",scream:"😱",confounded:"😖",persevere:"😣",disappointed:"😞",sweat:"😓",weary:"😩",tired_face:"😫",yawning_face:"🥱",triumph:"😤",rage:"😡",pout:"😡",angry:"😠",cursing_face:"🤬",smiling_imp:"😈",imp:"👿",skull:"💀",skull_and_crossbones:"☠️",hankey:"💩",poop:"💩",shit:"💩",clown_face:"🤡",japanese_ogre:"👹",japanese_goblin:"👺",ghost:"👻",alien:"👽",space_invader:"👾",robot:"🤖",smiley_cat:"😺",smile_cat:"😸",joy_cat:"😹",heart_eyes_cat:"😻",smirk_cat:"😼",kissing_cat:"😽",scream_cat:"🙀",crying_cat_face:"😿",pouting_cat:"😾",see_no_evil:"🙈",hear_no_evil:"🙉",speak_no_evil:"🙊",kiss:"💋",love_letter:"💌",cupid:"💘",gift_heart:"💝",sparkling_heart:"💖",heartpulse:"💗",heartbeat:"💓",revolving_hearts:"💞",two_hearts:"💕",heart_decoration:"💟",heavy_heart_exclamation:"❣️",broken_heart:"💔",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",brown_heart:"🤎",black_heart:"🖤",white_heart:"🤍",anger:"💢",boom:"💥",collision:"💥",dizzy:"💫",sweat_drops:"💦",dash:"💨",hole:"🕳️",bomb:"💣",speech_balloon:"💬",eye_speech_bubble:"👁️‍🗨️",left_speech_bubble:"🗨️",right_anger_bubble:"🗯️",thought_balloon:"💭",zzz:"💤",wave:"👋",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐️",hand:"✋",raised_hand:"✋",vulcan_salute:"🖖",ok_hand:"👌",pinched_fingers:"🤌",pinching_hand:"🤏",v:"✌️",crossed_fingers:"🤞",love_you_gesture:"🤟",metal:"🤘",call_me_hand:"🤙",point_left:"👈",point_right:"👉",point_up_2:"👆",middle_finger:"🖕",fu:"🖕",point_down:"👇",point_up:"☝️","+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",fist_raised:"✊",fist:"✊",fist_oncoming:"👊",facepunch:"👊",punch:"👊",fist_left:"🤛",fist_right:"🤜",clap:"👏",raised_hands:"🙌",open_hands:"👐",palms_up_together:"🤲",handshake:"🤝",pray:"🙏",writing_hand:"✍️",nail_care:"💅",selfie:"🤳",muscle:"💪",mechanical_arm:"🦾",mechanical_leg:"🦿",leg:"🦵",foot:"🦶",ear:"👂",ear_with_hearing_aid:"🦻",nose:"👃",brain:"🧠",anatomical_heart:"🫀",lungs:"🫁",tooth:"🦷",bone:"🦴",eyes:"👀",eye:"👁️",tongue:"👅",lips:"👄",baby:"👶",child:"🧒",boy:"👦",girl:"👧",adult:"🧑",blond_haired_person:"👱",man:"👨",bearded_person:"🧔",red_haired_man:"👨‍🦰",curly_haired_man:"👨‍🦱",white_haired_man:"👨‍🦳",bald_man:"👨‍🦲",woman:"👩",red_haired_woman:"👩‍🦰",person_red_hair:"🧑‍🦰",curly_haired_woman:"👩‍🦱",person_curly_hair:"🧑‍🦱",white_haired_woman:"👩‍🦳",person_white_hair:"🧑‍🦳",bald_woman:"👩‍🦲",person_bald:"🧑‍🦲",blond_haired_woman:"👱‍♀️",blonde_woman:"👱‍♀️",blond_haired_man:"👱‍♂️",older_adult:"🧓",older_man:"👴",older_woman:"👵",frowning_person:"🙍",frowning_man:"🙍‍♂️",frowning_woman:"🙍‍♀️",pouting_face:"🙎",pouting_man:"🙎‍♂️",pouting_woman:"🙎‍♀️",no_good:"🙅",no_good_man:"🙅‍♂️",ng_man:"🙅‍♂️",no_good_woman:"🙅‍♀️",ng_woman:"🙅‍♀️",ok_person:"🙆",ok_man:"🙆‍♂️",ok_woman:"🙆‍♀️",tipping_hand_person:"💁",information_desk_person:"💁",tipping_hand_man:"💁‍♂️",sassy_man:"💁‍♂️",tipping_hand_woman:"💁‍♀️",sassy_woman:"💁‍♀️",raising_hand:"🙋",raising_hand_man:"🙋‍♂️",raising_hand_woman:"🙋‍♀️",deaf_person:"🧏",deaf_man:"🧏‍♂️",deaf_woman:"🧏‍♀️",bow:"🙇",bowing_man:"🙇‍♂️",bowing_woman:"🙇‍♀️",facepalm:"🤦",man_facepalming:"🤦‍♂️",woman_facepalming:"🤦‍♀️",shrug:"🤷",man_shrugging:"🤷‍♂️",woman_shrugging:"🤷‍♀️",health_worker:"🧑‍⚕️",man_health_worker:"👨‍⚕️",woman_health_worker:"👩‍⚕️",student:"🧑‍🎓",man_student:"👨‍🎓",woman_student:"👩‍🎓",teacher:"🧑‍🏫",man_teacher:"👨‍🏫",woman_teacher:"👩‍🏫",judge:"🧑‍⚖️",man_judge:"👨‍⚖️",woman_judge:"👩‍⚖️",farmer:"🧑‍🌾",man_farmer:"👨‍🌾",woman_farmer:"👩‍🌾",cook:"🧑‍🍳",man_cook:"👨‍🍳",woman_cook:"👩‍🍳",mechanic:"🧑‍🔧",man_mechanic:"👨‍🔧",woman_mechanic:"👩‍🔧",factory_worker:"🧑‍🏭",man_factory_worker:"👨‍🏭",woman_factory_worker:"👩‍🏭",office_worker:"🧑‍💼",man_office_worker:"👨‍💼",woman_office_worker:"👩‍💼",scientist:"🧑‍🔬",man_scientist:"👨‍🔬",woman_scientist:"👩‍🔬",technologist:"🧑‍💻",man_technologist:"👨‍💻",woman_technologist:"👩‍💻",singer:"🧑‍🎤",man_singer:"👨‍🎤",woman_singer:"👩‍🎤",artist:"🧑‍🎨",man_artist:"👨‍🎨",woman_artist:"👩‍🎨",pilot:"🧑‍✈️",man_pilot:"👨‍✈️",woman_pilot:"👩‍✈️",astronaut:"🧑‍🚀",man_astronaut:"👨‍🚀",woman_astronaut:"👩‍🚀",firefighter:"🧑‍🚒",man_firefighter:"👨‍🚒",woman_firefighter:"👩‍🚒",police_officer:"👮",cop:"👮",policeman:"👮‍♂️",policewoman:"👮‍♀️",detective:"🕵️",male_detective:"🕵️‍♂️",female_detective:"🕵️‍♀️",guard:"💂",guardsman:"💂‍♂️",guardswoman:"💂‍♀️",ninja:"🥷",construction_worker:"👷",construction_worker_man:"👷‍♂️",construction_worker_woman:"👷‍♀️",prince:"🤴",princess:"👸",person_with_turban:"👳",man_with_turban:"👳‍♂️",woman_with_turban:"👳‍♀️",man_with_gua_pi_mao:"👲",woman_with_headscarf:"🧕",person_in_tuxedo:"🤵",man_in_tuxedo:"🤵‍♂️",woman_in_tuxedo:"🤵‍♀️",person_with_veil:"👰",man_with_veil:"👰‍♂️",woman_with_veil:"👰‍♀️",bride_with_veil:"👰‍♀️",pregnant_woman:"🤰",breast_feeding:"🤱",woman_feeding_baby:"👩‍🍼",man_feeding_baby:"👨‍🍼",person_feeding_baby:"🧑‍🍼",angel:"👼",santa:"🎅",mrs_claus:"🤶",mx_claus:"🧑‍🎄",superhero:"🦸",superhero_man:"🦸‍♂️",superhero_woman:"🦸‍♀️",supervillain:"🦹",supervillain_man:"🦹‍♂️",supervillain_woman:"🦹‍♀️",mage:"🧙",mage_man:"🧙‍♂️",mage_woman:"🧙‍♀️",fairy:"🧚",fairy_man:"🧚‍♂️",fairy_woman:"🧚‍♀️",vampire:"🧛",vampire_man:"🧛‍♂️",vampire_woman:"🧛‍♀️",merperson:"🧜",merman:"🧜‍♂️",mermaid:"🧜‍♀️",elf:"🧝",elf_man:"🧝‍♂️",elf_woman:"🧝‍♀️",genie:"🧞",genie_man:"🧞‍♂️",genie_woman:"🧞‍♀️",zombie:"🧟",zombie_man:"🧟‍♂️",zombie_woman:"🧟‍♀️",massage:"💆",massage_man:"💆‍♂️",massage_woman:"💆‍♀️",haircut:"💇",haircut_man:"💇‍♂️",haircut_woman:"💇‍♀️",walking:"🚶",walking_man:"🚶‍♂️",walking_woman:"🚶‍♀️",standing_person:"🧍",standing_man:"🧍‍♂️",standing_woman:"🧍‍♀️",kneeling_person:"🧎",kneeling_man:"🧎‍♂️",kneeling_woman:"🧎‍♀️",person_with_probing_cane:"🧑‍🦯",man_with_probing_cane:"👨‍🦯",woman_with_probing_cane:"👩‍🦯",person_in_motorized_wheelchair:"🧑‍🦼",man_in_motorized_wheelchair:"👨‍🦼",woman_in_motorized_wheelchair:"👩‍🦼",person_in_manual_wheelchair:"🧑‍🦽",man_in_manual_wheelchair:"👨‍🦽",woman_in_manual_wheelchair:"👩‍🦽",runner:"🏃",running:"🏃",running_man:"🏃‍♂️",running_woman:"🏃‍♀️",woman_dancing:"💃",dancer:"💃",man_dancing:"🕺",business_suit_levitating:"🕴️",dancers:"👯",dancing_men:"👯‍♂️",dancing_women:"👯‍♀️",sauna_person:"🧖",sauna_man:"🧖‍♂️",sauna_woman:"🧖‍♀️",climbing:"🧗",climbing_man:"🧗‍♂️",climbing_woman:"🧗‍♀️",person_fencing:"🤺",horse_racing:"🏇",skier:"⛷️",snowboarder:"🏂",golfing:"🏌️",golfing_man:"🏌️‍♂️",golfing_woman:"🏌️‍♀️",surfer:"🏄",surfing_man:"🏄‍♂️",surfing_woman:"🏄‍♀️",rowboat:"🚣",rowing_man:"🚣‍♂️",rowing_woman:"🚣‍♀️",swimmer:"🏊",swimming_man:"🏊‍♂️",swimming_woman:"🏊‍♀️",bouncing_ball_person:"⛹️",bouncing_ball_man:"⛹️‍♂️",basketball_man:"⛹️‍♂️",bouncing_ball_woman:"⛹️‍♀️",basketball_woman:"⛹️‍♀️",weight_lifting:"🏋️",weight_lifting_man:"🏋️‍♂️",weight_lifting_woman:"🏋️‍♀️",bicyclist:"🚴",biking_man:"🚴‍♂️",biking_woman:"🚴‍♀️",mountain_bicyclist:"🚵",mountain_biking_man:"🚵‍♂️",mountain_biking_woman:"🚵‍♀️",cartwheeling:"🤸",man_cartwheeling:"🤸‍♂️",woman_cartwheeling:"🤸‍♀️",wrestling:"🤼",men_wrestling:"🤼‍♂️",women_wrestling:"🤼‍♀️",water_polo:"🤽",man_playing_water_polo:"🤽‍♂️",woman_playing_water_polo:"🤽‍♀️",handball_person:"🤾",man_playing_handball:"🤾‍♂️",woman_playing_handball:"🤾‍♀️",juggling_person:"🤹",man_juggling:"🤹‍♂️",woman_juggling:"🤹‍♀️",lotus_position:"🧘",lotus_position_man:"🧘‍♂️",lotus_position_woman:"🧘‍♀️",bath:"🛀",sleeping_bed:"🛌",people_holding_hands:"🧑‍🤝‍🧑",two_women_holding_hands:"👭",couple:"👫",two_men_holding_hands:"👬",couplekiss:"💏",couplekiss_man_woman:"👩‍❤️‍💋‍👨",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",couple_with_heart:"💑",couple_with_heart_woman_man:"👩‍❤️‍👨",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",family:"👪",family_man_woman_boy:"👨‍👩‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",speaking_head:"🗣️",bust_in_silhouette:"👤",busts_in_silhouette:"👥",people_hugging:"🫂",footprints:"👣",monkey_face:"🐵",monkey:"🐒",gorilla:"🦍",orangutan:"🦧",dog:"🐶",dog2:"🐕",guide_dog:"🦮",service_dog:"🐕‍🦺",poodle:"🐩",wolf:"🐺",fox_face:"🦊",raccoon:"🦝",cat:"🐱",cat2:"🐈",black_cat:"🐈‍⬛",lion:"🦁",tiger:"🐯",tiger2:"🐅",leopard:"🐆",horse:"🐴",racehorse:"🐎",unicorn:"🦄",zebra:"🦓",deer:"🦌",bison:"🦬",cow:"🐮",ox:"🐂",water_buffalo:"🐃",cow2:"🐄",pig:"🐷",pig2:"🐖",boar:"🐗",pig_nose:"🐽",ram:"🐏",sheep:"🐑",goat:"🐐",dromedary_camel:"🐪",camel:"🐫",llama:"🦙",giraffe:"🦒",elephant:"🐘",mammoth:"🦣",rhinoceros:"🦏",hippopotamus:"🦛",mouse:"🐭",mouse2:"🐁",rat:"🐀",hamster:"🐹",rabbit:"🐰",rabbit2:"🐇",chipmunk:"🐿️",beaver:"🦫",hedgehog:"🦔",bat:"🦇",bear:"🐻",polar_bear:"🐻‍❄️",koala:"🐨",panda_face:"🐼",sloth:"🦥",otter:"🦦",skunk:"🦨",kangaroo:"🦘",badger:"🦡",feet:"🐾",paw_prints:"🐾",turkey:"🦃",chicken:"🐔",rooster:"🐓",hatching_chick:"🐣",baby_chick:"🐤",hatched_chick:"🐥",bird:"🐦",penguin:"🐧",dove:"🕊️",eagle:"🦅",duck:"🦆",swan:"🦢",owl:"🦉",dodo:"🦤",feather:"🪶",flamingo:"🦩",peacock:"🦚",parrot:"🦜",frog:"🐸",crocodile:"🐊",turtle:"🐢",lizard:"🦎",snake:"🐍",dragon_face:"🐲",dragon:"🐉",sauropod:"🦕","t-rex":"🦖",whale:"🐳",whale2:"🐋",dolphin:"🐬",flipper:"🐬",seal:"🦭",fish:"🐟",tropical_fish:"🐠",blowfish:"🐡",shark:"🦈",octopus:"🐙",shell:"🐚",snail:"🐌",butterfly:"🦋",bug:"🐛",ant:"🐜",bee:"🐝",honeybee:"🐝",beetle:"🪲",lady_beetle:"🐞",cricket:"🦗",cockroach:"🪳",spider:"🕷️",spider_web:"🕸️",scorpion:"🦂",mosquito:"🦟",fly:"🪰",worm:"🪱",microbe:"🦠",bouquet:"💐",cherry_blossom:"🌸",white_flower:"💮",rosette:"🏵️",rose:"🌹",wilted_flower:"🥀",hibiscus:"🌺",sunflower:"🌻",blossom:"🌼",tulip:"🌷",seedling:"🌱",potted_plant:"🪴",evergreen_tree:"🌲",deciduous_tree:"🌳",palm_tree:"🌴",cactus:"🌵",ear_of_rice:"🌾",herb:"🌿",shamrock:"☘️",four_leaf_clover:"🍀",maple_leaf:"🍁",fallen_leaf:"🍂",leaves:"🍃",grapes:"🍇",melon:"🍈",watermelon:"🍉",tangerine:"🍊",orange:"🍊",mandarin:"🍊",lemon:"🍋",banana:"🍌",pineapple:"🍍",mango:"🥭",apple:"🍎",green_apple:"🍏",pear:"🍐",peach:"🍑",cherries:"🍒",strawberry:"🍓",blueberries:"🫐",kiwi_fruit:"🥝",tomato:"🍅",olive:"🫒",coconut:"🥥",avocado:"🥑",eggplant:"🍆",potato:"🥔",carrot:"🥕",corn:"🌽",hot_pepper:"🌶️",bell_pepper:"🫑",cucumber:"🥒",leafy_green:"🥬",broccoli:"🥦",garlic:"🧄",onion:"🧅",mushroom:"🍄",peanuts:"🥜",chestnut:"🌰",bread:"🍞",croissant:"🥐",baguette_bread:"🥖",flatbread:"🫓",pretzel:"🥨",bagel:"🥯",pancakes:"🥞",waffle:"🧇",cheese:"🧀",meat_on_bone:"🍖",poultry_leg:"🍗",cut_of_meat:"🥩",bacon:"🥓",hamburger:"🍔",fries:"🍟",pizza:"🍕",hotdog:"🌭",sandwich:"🥪",taco:"🌮",burrito:"🌯",tamale:"🫔",stuffed_flatbread:"🥙",falafel:"🧆",egg:"🥚",fried_egg:"🍳",shallow_pan_of_food:"🥘",stew:"🍲",fondue:"🫕",bowl_with_spoon:"🥣",green_salad:"🥗",popcorn:"🍿",butter:"🧈",salt:"🧂",canned_food:"🥫",bento:"🍱",rice_cracker:"🍘",rice_ball:"🍙",rice:"🍚",curry:"🍛",ramen:"🍜",spaghetti:"🍝",sweet_potato:"🍠",oden:"🍢",sushi:"🍣",fried_shrimp:"🍤",fish_cake:"🍥",moon_cake:"🥮",dango:"🍡",dumpling:"🥟",fortune_cookie:"🥠",takeout_box:"🥡",crab:"🦀",lobster:"🦞",shrimp:"🦐",squid:"🦑",oyster:"🦪",icecream:"🍦",shaved_ice:"🍧",ice_cream:"🍨",doughnut:"🍩",cookie:"🍪",birthday:"🎂",cake:"🍰",cupcake:"🧁",pie:"🥧",chocolate_bar:"🍫",candy:"🍬",lollipop:"🍭",custard:"🍮",honey_pot:"🍯",baby_bottle:"🍼",milk_glass:"🥛",coffee:"☕",teapot:"🫖",tea:"🍵",sake:"🍶",champagne:"🍾",wine_glass:"🍷",cocktail:"🍸",tropical_drink:"🍹",beer:"🍺",beers:"🍻",clinking_glasses:"🥂",tumbler_glass:"🥃",cup_with_straw:"🥤",bubble_tea:"🧋",beverage_box:"🧃",mate:"🧉",ice_cube:"🧊",chopsticks:"🥢",plate_with_cutlery:"🍽️",fork_and_knife:"🍴",spoon:"🥄",hocho:"🔪",knife:"🔪",amphora:"🏺",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",globe_with_meridians:"🌐",world_map:"🗺️",japan:"🗾",compass:"🧭",mountain_snow:"🏔️",mountain:"⛰️",volcano:"🌋",mount_fuji:"🗻",camping:"🏕️",beach_umbrella:"🏖️",desert:"🏜️",desert_island:"🏝️",national_park:"🏞️",stadium:"🏟️",classical_building:"🏛️",building_construction:"🏗️",bricks:"🧱",rock:"🪨",wood:"🪵",hut:"🛖",houses:"🏘️",derelict_house:"🏚️",house:"🏠",house_with_garden:"🏡",office:"🏢",post_office:"🏣",european_post_office:"🏤",hospital:"🏥",bank:"🏦",hotel:"🏨",love_hotel:"🏩",convenience_store:"🏪",school:"🏫",department_store:"🏬",factory:"🏭",japanese_castle:"🏯",european_castle:"🏰",wedding:"💒",tokyo_tower:"🗼",statue_of_liberty:"🗽",church:"⛪",mosque:"🕌",hindu_temple:"🛕",synagogue:"🕍",shinto_shrine:"⛩️",kaaba:"🕋",fountain:"⛲",tent:"⛺",foggy:"🌁",night_with_stars:"🌃",cityscape:"🏙️",sunrise_over_mountains:"🌄",sunrise:"🌅",city_sunset:"🌆",city_sunrise:"🌇",bridge_at_night:"🌉",hotsprings:"♨️",carousel_horse:"🎠",ferris_wheel:"🎡",roller_coaster:"🎢",barber:"💈",circus_tent:"🎪",steam_locomotive:"🚂",railway_car:"🚃",bullettrain_side:"🚄",bullettrain_front:"🚅",train2:"🚆",metro:"🚇",light_rail:"🚈",station:"🚉",tram:"🚊",monorail:"🚝",mountain_railway:"🚞",train:"🚋",bus:"🚌",oncoming_bus:"🚍",trolleybus:"🚎",minibus:"🚐",ambulance:"🚑",fire_engine:"🚒",police_car:"🚓",oncoming_police_car:"🚔",taxi:"🚕",oncoming_taxi:"🚖",car:"🚗",red_car:"🚗",oncoming_automobile:"🚘",blue_car:"🚙",pickup_truck:"🛻",truck:"🚚",articulated_lorry:"🚛",tractor:"🚜",racing_car:"🏎️",motorcycle:"🏍️",motor_scooter:"🛵",manual_wheelchair:"🦽",motorized_wheelchair:"🦼",auto_rickshaw:"🛺",bike:"🚲",kick_scooter:"🛴",skateboard:"🛹",roller_skate:"🛼",busstop:"🚏",motorway:"🛣️",railway_track:"🛤️",oil_drum:"🛢️",fuelpump:"⛽",rotating_light:"🚨",traffic_light:"🚥",vertical_traffic_light:"🚦",stop_sign:"🛑",construction:"🚧",anchor:"⚓",boat:"⛵",sailboat:"⛵",canoe:"🛶",speedboat:"🚤",passenger_ship:"🛳️",ferry:"⛴️",motor_boat:"🛥️",ship:"🚢",airplane:"✈️",small_airplane:"🛩️",flight_departure:"🛫",flight_arrival:"🛬",parachute:"🪂",seat:"💺",helicopter:"🚁",suspension_railway:"🚟",mountain_cableway:"🚠",aerial_tramway:"🚡",artificial_satellite:"🛰️",rocket:"🚀",flying_saucer:"🛸",bellhop_bell:"🛎️",luggage:"🧳",hourglass:"⌛",hourglass_flowing_sand:"⏳",watch:"⌚",alarm_clock:"⏰",stopwatch:"⏱️",timer_clock:"⏲️",mantelpiece_clock:"🕰️",clock12:"🕛",clock1230:"🕧",clock1:"🕐",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",new_moon:"🌑",waxing_crescent_moon:"🌒",first_quarter_moon:"🌓",moon:"🌔",waxing_gibbous_moon:"🌔",full_moon:"🌕",waning_gibbous_moon:"🌖",last_quarter_moon:"🌗",waning_crescent_moon:"🌘",crescent_moon:"🌙",new_moon_with_face:"🌚",first_quarter_moon_with_face:"🌛",last_quarter_moon_with_face:"🌜",thermometer:"🌡️",sunny:"☀️",full_moon_with_face:"🌝",sun_with_face:"🌞",ringed_planet:"🪐",star:"⭐",star2:"🌟",stars:"🌠",milky_way:"🌌",cloud:"☁️",partly_sunny:"⛅",cloud_with_lightning_and_rain:"⛈️",sun_behind_small_cloud:"🌤️",sun_behind_large_cloud:"🌥️",sun_behind_rain_cloud:"🌦️",cloud_with_rain:"🌧️",cloud_with_snow:"🌨️",cloud_with_lightning:"🌩️",tornado:"🌪️",fog:"🌫️",wind_face:"🌬️",cyclone:"🌀",rainbow:"🌈",closed_umbrella:"🌂",open_umbrella:"☂️",umbrella:"☔",parasol_on_ground:"⛱️",zap:"⚡",snowflake:"❄️",snowman_with_snow:"☃️",snowman:"⛄",comet:"☄️",fire:"🔥",droplet:"💧",ocean:"🌊",jack_o_lantern:"🎃",christmas_tree:"🎄",fireworks:"🎆",sparkler:"🎇",firecracker:"🧨",sparkles:"✨",balloon:"🎈",tada:"🎉",confetti_ball:"🎊",tanabata_tree:"🎋",bamboo:"🎍",dolls:"🎎",flags:"🎏",wind_chime:"🎐",rice_scene:"🎑",red_envelope:"🧧",ribbon:"🎀",gift:"🎁",reminder_ribbon:"🎗️",tickets:"🎟️",ticket:"🎫",medal_military:"🎖️",trophy:"🏆",medal_sports:"🏅","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉",soccer:"⚽",baseball:"⚾",softball:"🥎",basketball:"🏀",volleyball:"🏐",football:"🏈",rugby_football:"🏉",tennis:"🎾",flying_disc:"🥏",bowling:"🎳",cricket_game:"🏏",field_hockey:"🏑",ice_hockey:"🏒",lacrosse:"🥍",ping_pong:"🏓",badminton:"🏸",boxing_glove:"🥊",martial_arts_uniform:"🥋",goal_net:"🥅",golf:"⛳",ice_skate:"⛸️",fishing_pole_and_fish:"🎣",diving_mask:"🤿",running_shirt_with_sash:"🎽",ski:"🎿",sled:"🛷",curling_stone:"🥌",dart:"🎯",yo_yo:"🪀",kite:"🪁","8ball":"🎱",crystal_ball:"🔮",magic_wand:"🪄",nazar_amulet:"🧿",video_game:"🎮",joystick:"🕹️",slot_machine:"🎰",game_die:"🎲",jigsaw:"🧩",teddy_bear:"🧸",pinata:"🪅",nesting_dolls:"🪆",spades:"♠️",hearts:"♥️",diamonds:"♦️",clubs:"♣️",chess_pawn:"♟️",black_joker:"🃏",mahjong:"🀄",flower_playing_cards:"🎴",performing_arts:"🎭",framed_picture:"🖼️",art:"🎨",thread:"🧵",sewing_needle:"🪡",yarn:"🧶",knot:"🪢",eyeglasses:"👓",dark_sunglasses:"🕶️",goggles:"🥽",lab_coat:"🥼",safety_vest:"🦺",necktie:"👔",shirt:"👕",tshirt:"👕",jeans:"👖",scarf:"🧣",gloves:"🧤",coat:"🧥",socks:"🧦",dress:"👗",kimono:"👘",sari:"🥻",one_piece_swimsuit:"🩱",swim_brief:"🩲",shorts:"🩳",bikini:"👙",womans_clothes:"👚",purse:"👛",handbag:"👜",pouch:"👝",shopping:"🛍️",school_satchel:"🎒",thong_sandal:"🩴",mans_shoe:"👞",shoe:"👞",athletic_shoe:"👟",hiking_boot:"🥾",flat_shoe:"🥿",high_heel:"👠",sandal:"👡",ballet_shoes:"🩰",boot:"👢",crown:"👑",womans_hat:"👒",tophat:"🎩",mortar_board:"🎓",billed_cap:"🧢",military_helmet:"🪖",rescue_worker_helmet:"⛑️",prayer_beads:"📿",lipstick:"💄",ring:"💍",gem:"💎",mute:"🔇",speaker:"🔈",sound:"🔉",loud_sound:"🔊",loudspeaker:"📢",mega:"📣",postal_horn:"📯",bell:"🔔",no_bell:"🔕",musical_score:"🎼",musical_note:"🎵",notes:"🎶",studio_microphone:"🎙️",level_slider:"🎚️",control_knobs:"🎛️",microphone:"🎤",headphones:"🎧",radio:"📻",saxophone:"🎷",accordion:"🪗",guitar:"🎸",musical_keyboard:"🎹",trumpet:"🎺",violin:"🎻",banjo:"🪕",drum:"🥁",long_drum:"🪘",iphone:"📱",calling:"📲",phone:"☎️",telephone:"☎️",telephone_receiver:"📞",pager:"📟",fax:"📠",battery:"🔋",electric_plug:"🔌",computer:"💻",desktop_computer:"🖥️",printer:"🖨️",keyboard:"⌨️",computer_mouse:"🖱️",trackball:"🖲️",minidisc:"💽",floppy_disk:"💾",cd:"💿",dvd:"📀",abacus:"🧮",movie_camera:"🎥",film_strip:"🎞️",film_projector:"📽️",clapper:"🎬",tv:"📺",camera:"📷",camera_flash:"📸",video_camera:"📹",vhs:"📼",mag:"🔍",mag_right:"🔎",candle:"🕯️",bulb:"💡",flashlight:"🔦",izakaya_lantern:"🏮",lantern:"🏮",diya_lamp:"🪔",notebook_with_decorative_cover:"📔",closed_book:"📕",book:"📖",open_book:"📖",green_book:"📗",blue_book:"📘",orange_book:"📙",books:"📚",notebook:"📓",ledger:"📒",page_with_curl:"📃",scroll:"📜",page_facing_up:"📄",newspaper:"📰",newspaper_roll:"🗞️",bookmark_tabs:"📑",bookmark:"🔖",label:"🏷️",moneybag:"💰",coin:"🪙",yen:"💴",dollar:"💵",euro:"💶",pound:"💷",money_with_wings:"💸",credit_card:"💳",receipt:"🧾",chart:"💹",envelope:"✉️",email:"📧","e-mail":"📧",incoming_envelope:"📨",envelope_with_arrow:"📩",outbox_tray:"📤",inbox_tray:"📥",package:"📦",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",postbox:"📮",ballot_box:"🗳️",pencil2:"✏️",black_nib:"✒️",fountain_pen:"🖋️",pen:"🖊️",paintbrush:"🖌️",crayon:"🖍️",memo:"📝",pencil:"📝",briefcase:"💼",file_folder:"📁",open_file_folder:"📂",card_index_dividers:"🗂️",date:"📅",calendar:"📆",spiral_notepad:"🗒️",spiral_calendar:"🗓️",card_index:"📇",chart_with_upwards_trend:"📈",chart_with_downwards_trend:"📉",bar_chart:"📊",clipboard:"📋",pushpin:"📌",round_pushpin:"📍",paperclip:"📎",paperclips:"🖇️",straight_ruler:"📏",triangular_ruler:"📐",scissors:"✂️",card_file_box:"🗃️",file_cabinet:"🗄️",wastebasket:"🗑️",lock:"🔒",unlock:"🔓",lock_with_ink_pen:"🔏",closed_lock_with_key:"🔐",key:"🔑",old_key:"🗝️",hammer:"🔨",axe:"🪓",pick:"⛏️",hammer_and_pick:"⚒️",hammer_and_wrench:"🛠️",dagger:"🗡️",crossed_swords:"⚔️",gun:"🔫",boomerang:"🪃",bow_and_arrow:"🏹",shield:"🛡️",carpentry_saw:"🪚",wrench:"🔧",screwdriver:"🪛",nut_and_bolt:"🔩",gear:"⚙️",clamp:"🗜️",balance_scale:"⚖️",probing_cane:"🦯",link:"🔗",chains:"⛓️",hook:"🪝",toolbox:"🧰",magnet:"🧲",ladder:"🪜",alembic:"⚗️",test_tube:"🧪",petri_dish:"🧫",dna:"🧬",microscope:"🔬",telescope:"🔭",satellite:"📡",syringe:"💉",drop_of_blood:"🩸",pill:"💊",adhesive_bandage:"🩹",stethoscope:"🩺",door:"🚪",elevator:"🛗",mirror:"🪞",window:"🪟",bed:"🛏️",couch_and_lamp:"🛋️",chair:"🪑",toilet:"🚽",plunger:"🪠",shower:"🚿",bathtub:"🛁",mouse_trap:"🪤",razor:"🪒",lotion_bottle:"🧴",safety_pin:"🧷",broom:"🧹",basket:"🧺",roll_of_paper:"🧻",bucket:"🪣",soap:"🧼",toothbrush:"🪥",sponge:"🧽",fire_extinguisher:"🧯",shopping_cart:"🛒",smoking:"🚬",coffin:"⚰️",headstone:"🪦",funeral_urn:"⚱️",moyai:"🗿",placard:"🪧",atm:"🏧",put_litter_in_its_place:"🚮",potable_water:"🚰",wheelchair:"♿",mens:"🚹",womens:"🚺",restroom:"🚻",baby_symbol:"🚼",wc:"🚾",passport_control:"🛂",customs:"🛃",baggage_claim:"🛄",left_luggage:"🛅",warning:"⚠️",children_crossing:"🚸",no_entry:"⛔",no_entry_sign:"🚫",no_bicycles:"🚳",no_smoking:"🚭",do_not_litter:"🚯","non-potable_water":"🚱",no_pedestrians:"🚷",no_mobile_phones:"📵",underage:"🔞",radioactive:"☢️",biohazard:"☣️",arrow_up:"⬆️",arrow_upper_right:"↗️",arrow_right:"➡️",arrow_lower_right:"↘️",arrow_down:"⬇️",arrow_lower_left:"↙️",arrow_left:"⬅️",arrow_upper_left:"↖️",arrow_up_down:"↕️",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",arrow_right_hook:"↪️",arrow_heading_up:"⤴️",arrow_heading_down:"⤵️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",back:"🔙",end:"🔚",on:"🔛",soon:"🔜",top:"🔝",place_of_worship:"🛐",atom_symbol:"⚛️",om:"🕉️",star_of_david:"✡️",wheel_of_dharma:"☸️",yin_yang:"☯️",latin_cross:"✝️",orthodox_cross:"☦️",star_and_crescent:"☪️",peace_symbol:"☮️",menorah:"🕎",six_pointed_star:"🔯",aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpius:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓",ophiuchus:"⛎",twisted_rightwards_arrows:"🔀",repeat:"🔁",repeat_one:"🔂",arrow_forward:"▶️",fast_forward:"⏩",next_track_button:"⏭️",play_or_pause_button:"⏯️",arrow_backward:"◀️",rewind:"⏪",previous_track_button:"⏮️",arrow_up_small:"🔼",arrow_double_up:"⏫",arrow_down_small:"🔽",arrow_double_down:"⏬",pause_button:"⏸️",stop_button:"⏹️",record_button:"⏺️",eject_button:"⏏️",cinema:"🎦",low_brightness:"🔅",high_brightness:"🔆",signal_strength:"📶",vibration_mode:"📳",mobile_phone_off:"📴",female_sign:"♀️",male_sign:"♂️",transgender_symbol:"⚧️",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",heavy_minus_sign:"➖",heavy_division_sign:"➗",infinity:"♾️",bangbang:"‼️",interrobang:"⁉️",question:"❓",grey_question:"❔",grey_exclamation:"❕",exclamation:"❗",heavy_exclamation_mark:"❗",wavy_dash:"〰️",currency_exchange:"💱",heavy_dollar_sign:"💲",medical_symbol:"⚕️",recycle:"♻️",fleur_de_lis:"⚜️",trident:"🔱",name_badge:"📛",beginner:"🔰",o:"⭕",white_check_mark:"✅",ballot_box_with_check:"☑️",heavy_check_mark:"✔️",x:"❌",negative_squared_cross_mark:"❎",curly_loop:"➰",loop:"➿",part_alternation_mark:"〽️",eight_spoked_asterisk:"✳️",eight_pointed_black_star:"✴️",sparkle:"❇️",copyright:"©️",registered:"®️",tm:"™️",hash:"#️⃣",asterisk:"*️⃣",zero:"0️⃣",one:"1️⃣",two:"2️⃣",three:"3️⃣",four:"4️⃣",five:"5️⃣",six:"6️⃣",seven:"7️⃣",eight:"8️⃣",nine:"9️⃣",keycap_ten:"🔟",capital_abcd:"🔠",abcd:"🔡",symbols:"🔣",abc:"🔤",a:"🅰️",ab:"🆎",b:"🅱️",cl:"🆑",cool:"🆒",free:"🆓",information_source:"ℹ️",id:"🆔",m:"Ⓜ️",new:"🆕",ng:"🆖",o2:"🅾️",ok:"🆗",parking:"🅿️",sos:"🆘",up:"🆙",vs:"🆚",koko:"🈁",sa:"🈂️",ideograph_advantage:"🉐",accept:"🉑",congratulations:"㊗️",secret:"㊙️",u6e80:"🈵",red_circle:"🔴",orange_circle:"🟠",yellow_circle:"🟡",green_circle:"🟢",large_blue_circle:"🔵",purple_circle:"🟣",brown_circle:"🟤",black_circle:"⚫",white_circle:"⚪",red_square:"🟥",orange_square:"🟧",yellow_square:"🟨",green_square:"🟩",blue_square:"🟦",purple_square:"🟪",brown_square:"🟫",black_large_square:"⬛",white_large_square:"⬜",black_medium_square:"◼️",white_medium_square:"◻️",black_medium_small_square:"◾",white_medium_small_square:"◽",black_small_square:"▪️",white_small_square:"▫️",large_orange_diamond:"🔶",large_blue_diamond:"🔷",small_orange_diamond:"🔸",small_blue_diamond:"🔹",small_red_triangle:"🔺",small_red_triangle_down:"🔻",diamond_shape_with_a_dot_inside:"💠",radio_button:"🔘",white_square_button:"🔳",black_square_button:"🔲",checkered_flag:"🏁",triangular_flag_on_post:"🚩",crossed_flags:"🎌",black_flag:"🏴",white_flag:"🏳️",rainbow_flag:"🏳️‍🌈",transgender_flag:"🏳️‍⚧️",pirate_flag:"🏴‍☠️",ascension_island:"🇦🇨",andorra:"🇦🇩",united_arab_emirates:"🇦🇪",afghanistan:"🇦🇫",antigua_barbuda:"🇦🇬",anguilla:"🇦🇮",albania:"🇦🇱",armenia:"🇦🇲",angola:"🇦🇴",antarctica:"🇦🇶",argentina:"🇦🇷",american_samoa:"🇦🇸",austria:"🇦🇹",australia:"🇦🇺",aruba:"🇦🇼",aland_islands:"🇦🇽",azerbaijan:"🇦🇿",bosnia_herzegovina:"🇧🇦",barbados:"🇧🇧",bangladesh:"🇧🇩",belgium:"🇧🇪",burkina_faso:"🇧🇫",bulgaria:"🇧🇬",bahrain:"🇧🇭",burundi:"🇧🇮",benin:"🇧🇯",st_barthelemy:"🇧🇱",bermuda:"🇧🇲",brunei:"🇧🇳",bolivia:"🇧🇴",caribbean_netherlands:"🇧🇶",brazil:"🇧🇷",bahamas:"🇧🇸",bhutan:"🇧🇹",bouvet_island:"🇧🇻",botswana:"🇧🇼",belarus:"🇧🇾",belize:"🇧🇿",canada:"🇨🇦",cocos_islands:"🇨🇨",congo_kinshasa:"🇨🇩",central_african_republic:"🇨🇫",congo_brazzaville:"🇨🇬",switzerland:"🇨🇭",cote_divoire:"🇨🇮",cook_islands:"🇨🇰",chile:"🇨🇱",cameroon:"🇨🇲",cn:"🇨🇳",colombia:"🇨🇴",clipperton_island:"🇨🇵",costa_rica:"🇨🇷",cuba:"🇨🇺",cape_verde:"🇨🇻",curacao:"🇨🇼",christmas_island:"🇨🇽",cyprus:"🇨🇾",czech_republic:"🇨🇿",de:"🇩🇪",diego_garcia:"🇩🇬",djibouti:"🇩🇯",denmark:"🇩🇰",dominica:"🇩🇲",dominican_republic:"🇩🇴",algeria:"🇩🇿",ceuta_melilla:"🇪🇦",ecuador:"🇪🇨",estonia:"🇪🇪",egypt:"🇪🇬",western_sahara:"🇪🇭",eritrea:"🇪🇷",es:"🇪🇸",ethiopia:"🇪🇹",eu:"🇪🇺",european_union:"🇪🇺",finland:"🇫🇮",fiji:"🇫🇯",falkland_islands:"🇫🇰",micronesia:"🇫🇲",faroe_islands:"🇫🇴",fr:"🇫🇷",gabon:"🇬🇦",gb:"🇬🇧",uk:"🇬🇧",grenada:"🇬🇩",georgia:"🇬🇪",french_guiana:"🇬🇫",guernsey:"🇬🇬",ghana:"🇬🇭",gibraltar:"🇬🇮",greenland:"🇬🇱",gambia:"🇬🇲",guinea:"🇬🇳",guadeloupe:"🇬🇵",equatorial_guinea:"🇬🇶",greece:"🇬🇷",south_georgia_south_sandwich_islands:"🇬🇸",guatemala:"🇬🇹",guam:"🇬🇺",guinea_bissau:"🇬🇼",guyana:"🇬🇾",hong_kong:"🇭🇰",heard_mcdonald_islands:"🇭🇲",honduras:"🇭🇳",croatia:"🇭🇷",haiti:"🇭🇹",hungary:"🇭🇺",canary_islands:"🇮🇨",indonesia:"🇮🇩",ireland:"🇮🇪",israel:"🇮🇱",isle_of_man:"🇮🇲",india:"🇮🇳",british_indian_ocean_territory:"🇮🇴",iraq:"🇮🇶",iran:"🇮🇷",iceland:"🇮🇸",it:"🇮🇹",jersey:"🇯🇪",jamaica:"🇯🇲",jordan:"🇯🇴",jp:"🇯🇵",kenya:"🇰🇪",kyrgyzstan:"🇰🇬",cambodia:"🇰🇭",kiribati:"🇰🇮",comoros:"🇰🇲",st_kitts_nevis:"🇰🇳",north_korea:"🇰🇵",kr:"🇰🇷",kuwait:"🇰🇼",cayman_islands:"🇰🇾",kazakhstan:"🇰🇿",laos:"🇱🇦",lebanon:"🇱🇧",st_lucia:"🇱🇨",liechtenstein:"🇱🇮",sri_lanka:"🇱🇰",liberia:"🇱🇷",lesotho:"🇱🇸",lithuania:"🇱🇹",luxembourg:"🇱🇺",latvia:"🇱🇻",libya:"🇱🇾",morocco:"🇲🇦",monaco:"🇲🇨",moldova:"🇲🇩",montenegro:"🇲🇪",st_martin:"🇲🇫",madagascar:"🇲🇬",marshall_islands:"🇲🇭",macedonia:"🇲🇰",mali:"🇲🇱",myanmar:"🇲🇲",mongolia:"🇲🇳",macau:"🇲🇴",northern_mariana_islands:"🇲🇵",martinique:"🇲🇶",mauritania:"🇲🇷",montserrat:"🇲🇸",malta:"🇲🇹",mauritius:"🇲🇺",maldives:"🇲🇻",malawi:"🇲🇼",mexico:"🇲🇽",malaysia:"🇲🇾",mozambique:"🇲🇿",namibia:"🇳🇦",new_caledonia:"🇳🇨",niger:"🇳🇪",norfolk_island:"🇳🇫",nigeria:"🇳🇬",nicaragua:"🇳🇮",netherlands:"🇳🇱",norway:"🇳🇴",nepal:"🇳🇵",nauru:"🇳🇷",niue:"🇳🇺",new_zealand:"🇳🇿",oman:"🇴🇲",panama:"🇵🇦",peru:"🇵🇪",french_polynesia:"🇵🇫",papua_new_guinea:"🇵🇬",philippines:"🇵🇭",pakistan:"🇵🇰",poland:"🇵🇱",st_pierre_miquelon:"🇵🇲",pitcairn_islands:"🇵🇳",puerto_rico:"🇵🇷",palestinian_territories:"🇵🇸",portugal:"🇵🇹",palau:"🇵🇼",paraguay:"🇵🇾",qatar:"🇶🇦",reunion:"🇷🇪",romania:"🇷🇴",serbia:"🇷🇸",ru:"🇷🇺",rwanda:"🇷🇼",saudi_arabia:"🇸🇦",solomon_islands:"🇸🇧",seychelles:"🇸🇨",sudan:"🇸🇩",sweden:"🇸🇪",singapore:"🇸🇬",st_helena:"🇸🇭",slovenia:"🇸🇮",svalbard_jan_mayen:"🇸🇯",slovakia:"🇸🇰",sierra_leone:"🇸🇱",san_marino:"🇸🇲",senegal:"🇸🇳",somalia:"🇸🇴",suriname:"🇸🇷",south_sudan:"🇸🇸",sao_tome_principe:"🇸🇹",el_salvador:"🇸🇻",sint_maarten:"🇸🇽",syria:"🇸🇾",swaziland:"🇸🇿",tristan_da_cunha:"🇹🇦",turks_caicos_islands:"🇹🇨",chad:"🇹🇩",french_southern_territories:"🇹🇫",togo:"🇹🇬",thailand:"🇹🇭",tajikistan:"🇹🇯",tokelau:"🇹🇰",timor_leste:"🇹🇱",turkmenistan:"🇹🇲",tunisia:"🇹🇳",tonga:"🇹🇴",tr:"🇹🇷",trinidad_tobago:"🇹🇹",tuvalu:"🇹🇻",taiwan:"🇹🇼",tanzania:"🇹🇿",ukraine:"🇺🇦",uganda:"🇺🇬",us_outlying_islands:"🇺🇲",united_nations:"🇺🇳",us:"🇺🇸",uruguay:"🇺🇾",uzbekistan:"🇺🇿",vatican_city:"🇻🇦",st_vincent_grenadines:"🇻🇨",venezuela:"🇻🇪",british_virgin_islands:"🇻🇬",us_virgin_islands:"🇻🇮",vietnam:"🇻🇳",vanuatu:"🇻🇺",wallis_futuna:"🇼🇫",samoa:"🇼🇸",kosovo:"🇽🇰",yemen:"🇾🇪",mayotte:"🇾🇹",south_africa:"🇿🇦",zambia:"🇿🇲",zimbabwe:"🇿🇼",england:"🏴󠁧󠁢󠁥󠁮󠁧󠁿",scotland:"🏴󠁧󠁢󠁳󠁣󠁴󠁿",wales:"🏴󠁧󠁢󠁷󠁬󠁳󠁿"};Object.keys(yn).reduce((e,t)=>{const n=yn[t];return e[n]=t,e},{});const ep=Object.keys(yn).map(e=>e);Object.keys(yn).map(e=>yn[e]);function tp(e){return ep.filter(t=>t.startsWith(e)).map(t=>({name:t,emoji:yn[t]}))}const np=200,ip=new T.PluginKey("emoji"),rp=T.Node.create({name:"emoji",content:"text*",priority:np,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{},suggestion:{char:":",pluginKey:ip,command:({editor:t,range:n,props:i})=>{t.chain().focus().insertContentAt(n,`${i.emoji} `).run()}},button:({editor:t,t:n})=>({component:Jg,componentProps:{editor:t,action:()=>{},isActive:()=>!1,disabled:!1,icon:"EmojiIcon",tooltip:n("editor.emoji.tooltip")}})}},addCommands(){return{setEmoji:e=>({commands:t})=>t.insertContent(`${e.emoji} `)}},addProseMirrorPlugins(){return[mo({editor:this.editor,...this.options.suggestion})]}}).configure({suggestion:{items:({query:e})=>tp(e),render:()=>{let e,t,n;return{onStart:i=>{n=i.editor.isEditable,n&&(e=new T.ReactRenderer(Zu,{props:i,editor:i.editor}),t=no("body",{getReferenceClientRect:i.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(i){n&&(e.updateProps(i),t[0].setProps({getReferenceClientRect:i.clientRect}))},onKeyDown(i){var r;if(n)return i.event.key==="Escape"?(t[0].hide(),!0):(r=e.ref)==null?void 0:r.onKeyDown(i)},onExit(){n&&(t[0].destroy(),e.destroy())}}}}});function ap(e){const t=document.createElement("iframe");t.setAttribute("style","position: absolute; width: 0; height: 0; top: 0; left: 0;"),document.body.appendChild(t),t.textContent=`
10
10
  <!DOCTYPE html>
11
11
  <html lang="en">
12
12
  <head>