reactjs-tiptap-editor-pro 0.2.33 → 0.2.34

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-ZncOwjAP.cjs"),On=require("shiki"),O=require("react/jsx-runtime"),pe=require("react"),Ce=require("./locale-bundle-DiqW5jwb.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-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(`
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=`
@@ -130,4 +130,4 @@ Character number: `+t.characterNumber},e.prototype.lineNumber=function(){return
130
130
  fill="currentColor"
131
131
  d="m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"
132
132
  />
133
- </svg>`,excel:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',ppt:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'};function P2(e){const t=M2[e],r=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,a=["svg",{...Array.from(r.attributes).reduce((o,s)=>(o[s.name]=s.value,o),{})}];return Array.from(r.childNodes).forEach(o=>{if(o.nodeType===1){const s=[o.tagName.toLowerCase(),Array.from(o.attributes).reduce((c,u)=>(c[u.name]=u.value,c),{})];o.textContent&&s.push(o.textContent),a.push(s)}}),a}const j2={audio:O.jsx($e.LucideAudioLines,{}),video:O.jsx($e.LucideVideo,{}),file:O.jsx($e.LucideFile,{}),image:O.jsx($e.LucideImage,{}),pdf:O.jsx(T.ExportPdf,{}),word:O.jsx(T.ExportWord,{}),excel:O.jsx($e.LucideSheet,{}),ppt:O.jsx($e.LucideTableProperties,{})};function Rd(e,t=!1){const n=T.normalizeFileType(e),i=j2[n]||O.jsx(O.Fragment,{});return t?P2(n):i}const q2="_wrap_1x1ms_2",za={wrap:q2};function H2({editor:e,node:t,updateAttributes:n,deleteNode:i,extension:r}){var _;const a=pe.useRef(null),o=T.useEditableEditor(),{hasTrigger:s,fileName:c,fileSize:u,fileExt:l,fileType:f,url:g,error:d}=t.attrs,[x,m]=pe.useState(!1),{t:h}=Ce.useLocale(),b=(_=r==null?void 0:r.options)==null?void 0:_.upload,p=pe.useCallback(()=>{!o||g||o&&a.current.click()},[o,g]),D=pe.useCallback(async U=>{const E=U.target.files&&U.target.files[0];if(!E)return;const L={fileName:T.extractFilename(E.name),fileSize:E.size,fileType:E.type,fileExt:T.extractFileExtension(E.name)};m(!0);try{const A=await b(E);n({...L,url:A}),m(!1)}catch(A){n({error:`File upload fail: ${A&&A.message}`||"Unknown error"}),m(!1),a.current.value=""}},[m,n]);pe.useEffect(()=>{!g&&!s&&(p(),n({hasTrigger:!0}))},[g,s,p,n]);const w=pe.useCallback(()=>i(),[e]);return o&&!g?O.jsx(T.NodeViewWrapper,{children:O.jsxs("div",{className:T.clsx(za.wrap,"render-wrapper"),children:[O.jsx("p",{onClick:p,style:{cursor:"pointer"},children:x?O.jsx("span",{children:h("editor.attachment.uploading")}):O.jsx("span",{children:h("editor.attachment.please_upload")})}),O.jsx("input",{hidden:!0,onChange:D,ref:a,type:"file"})]})}):g?O.jsx(T.NodeViewWrapper,{children:O.jsxs("div",{className:T.clsx(za.wrap,"render-wrapper"),onClick:p,children:[O.jsxs("div",{className:"flex items-center gap-[4px]",children:[O.jsx("span",{children:Rd(f)}),O.jsxs("span",{children:[c,".",l]}),O.jsxs("span",{children:["(",T.normalizeFileSize(u),")"]})]}),O.jsx(T.ActionButton,{action:w,icon:"Trash2",tooltip:h("editor.delete")})]})}):d!=="null"?O.jsx(T.NodeViewWrapper,{children:O.jsx("div",{className:T.clsx(za.wrap,"render-wrapper"),onClick:p,children:O.jsx("p",{children:d})})}):O.jsx(O.Fragment,{})}const z2=T.Node.create({name:"attachment",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"attachment"},button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.chain().focus().setAttachment().run(),isActive:()=>!1,disabled:!1,icon:"Attachment",tooltip:n("editor.attachment.tooltip")}})}},parseHTML(){return[{tag:"div[class=attachment]"}]},renderHTML({HTMLAttributes:e}){const{url:t="",fileName:n="",fileSize:i="",fileType:r="",fileExt:a=""}=e||{};return["div",T.mergeAttributes(this.options.HTMLAttributes||{},e||{}),t?["a",{href:t||"#"},["span",{class:"attachment__icon"},Rd(r,!0)],["span",{class:"attachment__text"},`${n}.${a} (${T.normalizeFileSize(i)})`]]:["div",{class:"attachment__placeholder"}]]},addAttributes(){return{fileName:{default:null,parseHTML:T.getDatasetAttribute("filename")},fileSize:{default:null,parseHTML:T.getDatasetAttribute("filesize")},fileType:{default:null,parseHTML:T.getDatasetAttribute("filetype")},fileExt:{default:null,parseHTML:T.getDatasetAttribute("fileext")},url:{default:null,parseHTML:T.getDatasetAttribute("url")},hasTrigger:{default:!1,parseHTML:e=>T.getDatasetAttribute("hastrigger")(e)==="true"},error:{default:null,parseHTML:T.getDatasetAttribute("error")}}},addCommands(){return{setAttachment:(e={})=>({chain:t})=>t().insertContent({type:this.name,attrs:e}).run()}},addNodeView(){return T.ReactNodeViewRenderer(H2)}});exports.Column=T.Column;exports.Drawer=T.Drawer;exports.Excalidraw=T.Excalidraw;exports.Iframe=T.Iframe;exports.Image=T.Image;exports.ImageGif=T.ImageGif;exports.Katex=T.Katex;exports.Mermaid=T.Mermaid;exports.MultiColumn=T.MultiColumn;exports.Table=T.Table;exports.Twitter=T.Twitter;exports.Video=T.Video;exports.Attachment=z2;exports.BaseKit=vg;exports.Blockquote=uf;exports.Bold=Hd;exports.BulletList=Yh;exports.Clear=Qh;exports.Code=ah;exports.CodeBlock=Nu;exports.Color=zh;exports.ColumnActionButton=mg;exports.Emoji=rp;exports.ExportPdf=sp;exports.ExportWord=b2;exports.FontFamily=Bh;exports.FontSize=Ph;exports.FormatPainter=Mg;exports.Heading=Rh;exports.Highlight=Kh;exports.History=Gf;exports.HorizontalRule=If;exports.ImportWord=h2;exports.Indent=Ug;exports.Italic=Gd;exports.LineHeight=Sg;exports.Link=Lf;exports.Mention=O2;exports.MoreMark=Tg;exports.OrderedList=tf;exports.SearchAndReplace=Gu;exports.SlashCommand=Og;exports.Strike=th;exports.SubAndSuperScript=_g;exports.TableOfContents=Ld;exports.TaskList=of;exports.TextAlign=Oh;exports.TextDirection=k2;exports.Underline=Yd;
133
+ </svg>`,excel:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',ppt:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'};function P2(e){const t=M2[e],r=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,a=["svg",{...Array.from(r.attributes).reduce((o,s)=>(o[s.name]=s.value,o),{})}];return Array.from(r.childNodes).forEach(o=>{if(o.nodeType===1){const s=[o.tagName.toLowerCase(),Array.from(o.attributes).reduce((c,u)=>(c[u.name]=u.value,c),{})];o.textContent&&s.push(o.textContent),a.push(s)}}),a}const j2={audio:O.jsx($e.LucideAudioLines,{}),video:O.jsx($e.LucideVideo,{}),file:O.jsx($e.LucideFile,{}),image:O.jsx($e.LucideImage,{}),pdf:O.jsx(T.ExportPdf,{}),word:O.jsx(T.ExportWord,{}),excel:O.jsx($e.LucideSheet,{}),ppt:O.jsx($e.LucideTableProperties,{})};function Rd(e,t=!1){const n=T.normalizeFileType(e),i=j2[n]||O.jsx(O.Fragment,{});return t?P2(n):i}const q2="_wrap_1x1ms_2",za={wrap:q2};function H2({editor:e,node:t,updateAttributes:n,deleteNode:i,extension:r}){var _;const a=pe.useRef(null),o=T.useEditableEditor(),{hasTrigger:s,fileName:c,fileSize:u,fileExt:l,fileType:f,url:g,error:d}=t.attrs,[x,m]=pe.useState(!1),{t:h}=Ce.useLocale(),b=(_=r==null?void 0:r.options)==null?void 0:_.upload,p=pe.useCallback(()=>{!o||g||o&&a.current.click()},[o,g]),D=pe.useCallback(async U=>{const E=U.target.files&&U.target.files[0];if(!E)return;const L={fileName:T.extractFilename(E.name),fileSize:E.size,fileType:E.type,fileExt:T.extractFileExtension(E.name)};m(!0);try{const A=await b(E);n({...L,url:A}),m(!1)}catch(A){n({error:`File upload fail: ${A&&A.message}`||"Unknown error"}),m(!1),a.current.value=""}},[m,n]);pe.useEffect(()=>{!g&&!s&&(p(),n({hasTrigger:!0}))},[g,s,p,n]);const w=pe.useCallback(()=>i(),[e]);return o&&!g?O.jsx(T.NodeViewWrapper,{children:O.jsxs("div",{className:T.clsx(za.wrap,"render-wrapper"),children:[O.jsx("p",{onClick:p,style:{cursor:"pointer"},children:x?O.jsx("span",{children:h("editor.attachment.uploading")}):O.jsx("span",{children:h("editor.attachment.please_upload")})}),O.jsx("input",{hidden:!0,onChange:D,ref:a,type:"file"})]})}):g?O.jsx(T.NodeViewWrapper,{children:O.jsxs("div",{className:T.clsx(za.wrap,"render-wrapper"),onClick:p,children:[O.jsxs("div",{className:"flex items-center gap-[4px]",children:[O.jsx("span",{children:Rd(f)}),O.jsxs("span",{children:[c,".",l]}),O.jsxs("span",{children:["(",T.normalizeFileSize(u),")"]})]}),O.jsx(T.ActionButton,{action:w,icon:"Trash2",tooltip:h("editor.delete")})]})}):d!=="null"?O.jsx(T.NodeViewWrapper,{children:O.jsx("div",{className:T.clsx(za.wrap,"render-wrapper"),onClick:p,children:O.jsx("p",{children:d})})}):O.jsx(O.Fragment,{})}const z2=T.Node.create({name:"attachment",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"attachment"},button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.chain().focus().setAttachment().run(),isActive:()=>!1,disabled:!1,icon:"Attachment",tooltip:n("editor.attachment.tooltip")}})}},parseHTML(){return[{tag:"div[class=attachment]"}]},renderHTML({HTMLAttributes:e}){const{url:t="",fileName:n="",fileSize:i="",fileType:r="",fileExt:a=""}=e||{};return["div",T.mergeAttributes(this.options.HTMLAttributes||{},e||{}),t?["a",{href:t||"#"},["span",{class:"attachment__icon"},Rd(r,!0)],["span",{class:"attachment__text"},`${n}.${a} (${T.normalizeFileSize(i)})`]]:["div",{class:"attachment__placeholder"}]]},addAttributes(){return{fileName:{default:null,parseHTML:T.getDatasetAttribute("filename")},fileSize:{default:null,parseHTML:T.getDatasetAttribute("filesize")},fileType:{default:null,parseHTML:T.getDatasetAttribute("filetype")},fileExt:{default:null,parseHTML:T.getDatasetAttribute("fileext")},url:{default:null,parseHTML:T.getDatasetAttribute("url")},hasTrigger:{default:!1,parseHTML:e=>T.getDatasetAttribute("hastrigger")(e)==="true"},error:{default:null,parseHTML:T.getDatasetAttribute("error")}}},addCommands(){return{setAttachment:(e={})=>({chain:t})=>t().insertContent({type:this.name,attrs:e}).run()}},addNodeView(){return T.ReactNodeViewRenderer(H2)}});exports.Column=T.Column;exports.Drawer=T.Drawer;exports.Iframe=T.Iframe;exports.Image=T.Image;exports.ImageGif=T.ImageGif;exports.Katex=T.Katex;exports.Mermaid=T.Mermaid;exports.MultiColumn=T.MultiColumn;exports.Table=T.Table;exports.Twitter=T.Twitter;exports.Video=T.Video;exports.Attachment=z2;exports.BaseKit=vg;exports.Blockquote=uf;exports.Bold=Hd;exports.BulletList=Yh;exports.Clear=Qh;exports.Code=ah;exports.CodeBlock=Nu;exports.Color=zh;exports.ColumnActionButton=mg;exports.Emoji=rp;exports.ExportPdf=sp;exports.ExportWord=b2;exports.FontFamily=Bh;exports.FontSize=Ph;exports.FormatPainter=Mg;exports.Heading=Rh;exports.Highlight=Kh;exports.History=Gf;exports.HorizontalRule=If;exports.ImportWord=h2;exports.Indent=Ug;exports.Italic=Gd;exports.LineHeight=Sg;exports.Link=Lf;exports.Mention=O2;exports.MoreMark=Tg;exports.OrderedList=tf;exports.SearchAndReplace=Gu;exports.SlashCommand=Og;exports.Strike=th;exports.SubAndSuperScript=_g;exports.TableOfContents=Ld;exports.TaskList=of;exports.TextAlign=Oh;exports.TextDirection=k2;exports.Underline=Yd;
@@ -285,8 +285,6 @@ declare interface DrawerOptions extends GeneralOptions<DrawerOptions> {
285
285
 
286
286
  export declare const Emoji: Node_2<any, any>;
287
287
 
288
- export declare const Excalidraw: Node_2<any, any>;
289
-
290
288
  export declare const ExportPdf: Extension<any, any>;
291
289
 
292
290
  export declare const ExportWord: Extension<ExportWordOptions, any>;
@@ -727,15 +725,19 @@ declare module '@tiptap/core' {
727
725
 
728
726
  declare module '@tiptap/core' {
729
727
  interface Commands<ReturnType> {
730
- indent: {
728
+ imageUpload: {
731
729
  /**
732
- * Set the indent attribute
730
+ * Add an image
733
731
  */
734
- indent: () => ReturnType;
732
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
735
733
  /**
736
- * Set the outdent attribute
734
+ * Update an image
737
735
  */
738
- outdent: () => ReturnType;
736
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
737
+ /**
738
+ * Set image alignment
739
+ */
740
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
739
741
  };
740
742
  }
741
743
  }
@@ -743,9 +745,13 @@ declare module '@tiptap/core' {
743
745
 
744
746
  declare module '@tiptap/core' {
745
747
  interface Commands<ReturnType> {
746
- lineHeight: {
747
- setLineHeight: (lineHeight: string) => ReturnType;
748
- unsetLineHeight: () => ReturnType;
748
+ columns: {
749
+ insertColumns: (attrs?: {
750
+ cols: number;
751
+ }) => ReturnType;
752
+ addColBefore: () => ReturnType;
753
+ addColAfter: () => ReturnType;
754
+ deleteCol: () => ReturnType;
749
755
  };
750
756
  }
751
757
  }
@@ -753,19 +759,9 @@ declare module '@tiptap/core' {
753
759
 
754
760
  declare module '@tiptap/core' {
755
761
  interface Commands<ReturnType> {
756
- imageUpload: {
757
- /**
758
- * Add an image
759
- */
760
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
761
- /**
762
- * Update an image
763
- */
764
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
765
- /**
766
- * Set image alignment
767
- */
768
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
762
+ lineHeight: {
763
+ setLineHeight: (lineHeight: string) => ReturnType;
764
+ unsetLineHeight: () => ReturnType;
769
765
  };
770
766
  }
771
767
  }
@@ -773,8 +769,15 @@ declare module '@tiptap/core' {
773
769
 
774
770
  declare module '@tiptap/core' {
775
771
  interface Commands<ReturnType> {
776
- painter: {
777
- setPainter: (marks: Mark[]) => ReturnType;
772
+ indent: {
773
+ /**
774
+ * Set the indent attribute
775
+ */
776
+ indent: () => ReturnType;
777
+ /**
778
+ * Set the outdent attribute
779
+ */
780
+ outdent: () => ReturnType;
778
781
  };
779
782
  }
780
783
  }
@@ -782,13 +785,9 @@ declare module '@tiptap/core' {
782
785
 
783
786
  declare module '@tiptap/core' {
784
787
  interface Commands<ReturnType> {
785
- columns: {
786
- insertColumns: (attrs?: {
787
- cols: number;
788
- }) => ReturnType;
789
- addColBefore: () => ReturnType;
790
- addColAfter: () => ReturnType;
791
- deleteCol: () => ReturnType;
788
+ tableCellBackground: {
789
+ setTableCellBackground: (color: string) => ReturnType;
790
+ unsetTableCellBackground: () => ReturnType;
792
791
  };
793
792
  }
794
793
  }
@@ -796,9 +795,8 @@ declare module '@tiptap/core' {
796
795
 
797
796
  declare module '@tiptap/core' {
798
797
  interface Commands<ReturnType> {
799
- tableCellBackground: {
800
- setTableCellBackground: (color: string) => ReturnType;
801
- unsetTableCellBackground: () => ReturnType;
798
+ painter: {
799
+ setPainter: (marks: Mark[]) => ReturnType;
802
800
  };
803
801
  }
804
802
  }
@@ -821,14 +819,8 @@ declare module '@tiptap/core' {
821
819
 
822
820
  declare module '@tiptap/core' {
823
821
  interface Commands<ReturnType> {
824
- search: {
825
- setSearchTerm: (searchTerm: string) => ReturnType;
826
- setReplaceTerm: (replaceTerm: string) => ReturnType;
827
- replace: () => ReturnType;
828
- replaceAll: () => ReturnType;
829
- goToPrevSearchResult: () => void;
830
- goToNextSearchResult: () => void;
831
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
822
+ exportWord: {
823
+ exportToWord: () => ReturnType;
832
824
  };
833
825
  }
834
826
  }
@@ -848,8 +840,14 @@ declare module '@tiptap/core' {
848
840
 
849
841
  declare module '@tiptap/core' {
850
842
  interface Commands<ReturnType> {
851
- katex: {
852
- setKatex: (arg?: IKatexAttrs) => ReturnType;
843
+ search: {
844
+ setSearchTerm: (searchTerm: string) => ReturnType;
845
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
846
+ replace: () => ReturnType;
847
+ replaceAll: () => ReturnType;
848
+ goToPrevSearchResult: () => void;
849
+ goToNextSearchResult: () => void;
850
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
853
851
  };
854
852
  }
855
853
  }
@@ -857,8 +855,8 @@ declare module '@tiptap/core' {
857
855
 
858
856
  declare module '@tiptap/core' {
859
857
  interface Commands<ReturnType> {
860
- excalidraw: {
861
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
858
+ katex: {
859
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
862
860
  };
863
861
  }
864
862
  }
@@ -876,8 +874,18 @@ declare module '@tiptap/core' {
876
874
 
877
875
  declare module '@tiptap/core' {
878
876
  interface Commands<ReturnType> {
879
- exportWord: {
880
- exportToWord: () => ReturnType;
877
+ attachment: {
878
+ setAttachment: (attrs?: unknown) => ReturnType;
879
+ };
880
+ }
881
+ }
882
+
883
+
884
+ declare module '@tiptap/core' {
885
+ interface Commands<ReturnType> {
886
+ drawer: {
887
+ setDrawer: (options: any, replace?: any) => ReturnType;
888
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
881
889
  };
882
890
  }
883
891
  }
@@ -903,25 +911,6 @@ declare module '@tiptap/core' {
903
911
  }
904
912
 
905
913
 
906
- declare module '@tiptap/core' {
907
- interface Commands<ReturnType> {
908
- attachment: {
909
- setAttachment: (attrs?: unknown) => ReturnType;
910
- };
911
- }
912
- }
913
-
914
-
915
- declare module '@tiptap/core' {
916
- interface Commands<ReturnType> {
917
- mermaid: {
918
- setMermaid: (options: any, replace?: any) => ReturnType;
919
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
920
- };
921
- }
922
- }
923
-
924
-
925
914
  declare module '@tiptap/core' {
926
915
  interface Commands<ReturnType> {
927
916
  twitter: {
@@ -939,9 +928,9 @@ declare module '@tiptap/core' {
939
928
 
940
929
  declare module '@tiptap/core' {
941
930
  interface Commands<ReturnType> {
942
- drawer: {
943
- setDrawer: (options: any, replace?: any) => ReturnType;
944
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
931
+ mermaid: {
932
+ setMermaid: (options: any, replace?: any) => ReturnType;
933
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
945
934
  };
946
935
  }
947
936
  }
@@ -285,8 +285,6 @@ declare interface DrawerOptions extends GeneralOptions<DrawerOptions> {
285
285
 
286
286
  export declare const Emoji: Node_2<any, any>;
287
287
 
288
- export declare const Excalidraw: Node_2<any, any>;
289
-
290
288
  export declare const ExportPdf: Extension<any, any>;
291
289
 
292
290
  export declare const ExportWord: Extension<ExportWordOptions, any>;
@@ -727,15 +725,19 @@ declare module '@tiptap/core' {
727
725
 
728
726
  declare module '@tiptap/core' {
729
727
  interface Commands<ReturnType> {
730
- indent: {
728
+ imageUpload: {
731
729
  /**
732
- * Set the indent attribute
730
+ * Add an image
733
731
  */
734
- indent: () => ReturnType;
732
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
735
733
  /**
736
- * Set the outdent attribute
734
+ * Update an image
737
735
  */
738
- outdent: () => ReturnType;
736
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
737
+ /**
738
+ * Set image alignment
739
+ */
740
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
739
741
  };
740
742
  }
741
743
  }
@@ -743,9 +745,13 @@ declare module '@tiptap/core' {
743
745
 
744
746
  declare module '@tiptap/core' {
745
747
  interface Commands<ReturnType> {
746
- lineHeight: {
747
- setLineHeight: (lineHeight: string) => ReturnType;
748
- unsetLineHeight: () => ReturnType;
748
+ columns: {
749
+ insertColumns: (attrs?: {
750
+ cols: number;
751
+ }) => ReturnType;
752
+ addColBefore: () => ReturnType;
753
+ addColAfter: () => ReturnType;
754
+ deleteCol: () => ReturnType;
749
755
  };
750
756
  }
751
757
  }
@@ -753,19 +759,9 @@ declare module '@tiptap/core' {
753
759
 
754
760
  declare module '@tiptap/core' {
755
761
  interface Commands<ReturnType> {
756
- imageUpload: {
757
- /**
758
- * Add an image
759
- */
760
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
761
- /**
762
- * Update an image
763
- */
764
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
765
- /**
766
- * Set image alignment
767
- */
768
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
762
+ lineHeight: {
763
+ setLineHeight: (lineHeight: string) => ReturnType;
764
+ unsetLineHeight: () => ReturnType;
769
765
  };
770
766
  }
771
767
  }
@@ -773,8 +769,15 @@ declare module '@tiptap/core' {
773
769
 
774
770
  declare module '@tiptap/core' {
775
771
  interface Commands<ReturnType> {
776
- painter: {
777
- setPainter: (marks: Mark[]) => ReturnType;
772
+ indent: {
773
+ /**
774
+ * Set the indent attribute
775
+ */
776
+ indent: () => ReturnType;
777
+ /**
778
+ * Set the outdent attribute
779
+ */
780
+ outdent: () => ReturnType;
778
781
  };
779
782
  }
780
783
  }
@@ -782,13 +785,9 @@ declare module '@tiptap/core' {
782
785
 
783
786
  declare module '@tiptap/core' {
784
787
  interface Commands<ReturnType> {
785
- columns: {
786
- insertColumns: (attrs?: {
787
- cols: number;
788
- }) => ReturnType;
789
- addColBefore: () => ReturnType;
790
- addColAfter: () => ReturnType;
791
- deleteCol: () => ReturnType;
788
+ tableCellBackground: {
789
+ setTableCellBackground: (color: string) => ReturnType;
790
+ unsetTableCellBackground: () => ReturnType;
792
791
  };
793
792
  }
794
793
  }
@@ -796,9 +795,8 @@ declare module '@tiptap/core' {
796
795
 
797
796
  declare module '@tiptap/core' {
798
797
  interface Commands<ReturnType> {
799
- tableCellBackground: {
800
- setTableCellBackground: (color: string) => ReturnType;
801
- unsetTableCellBackground: () => ReturnType;
798
+ painter: {
799
+ setPainter: (marks: Mark[]) => ReturnType;
802
800
  };
803
801
  }
804
802
  }
@@ -821,14 +819,8 @@ declare module '@tiptap/core' {
821
819
 
822
820
  declare module '@tiptap/core' {
823
821
  interface Commands<ReturnType> {
824
- search: {
825
- setSearchTerm: (searchTerm: string) => ReturnType;
826
- setReplaceTerm: (replaceTerm: string) => ReturnType;
827
- replace: () => ReturnType;
828
- replaceAll: () => ReturnType;
829
- goToPrevSearchResult: () => void;
830
- goToNextSearchResult: () => void;
831
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
822
+ exportWord: {
823
+ exportToWord: () => ReturnType;
832
824
  };
833
825
  }
834
826
  }
@@ -848,8 +840,14 @@ declare module '@tiptap/core' {
848
840
 
849
841
  declare module '@tiptap/core' {
850
842
  interface Commands<ReturnType> {
851
- katex: {
852
- setKatex: (arg?: IKatexAttrs) => ReturnType;
843
+ search: {
844
+ setSearchTerm: (searchTerm: string) => ReturnType;
845
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
846
+ replace: () => ReturnType;
847
+ replaceAll: () => ReturnType;
848
+ goToPrevSearchResult: () => void;
849
+ goToNextSearchResult: () => void;
850
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
853
851
  };
854
852
  }
855
853
  }
@@ -857,8 +855,8 @@ declare module '@tiptap/core' {
857
855
 
858
856
  declare module '@tiptap/core' {
859
857
  interface Commands<ReturnType> {
860
- excalidraw: {
861
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
858
+ katex: {
859
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
862
860
  };
863
861
  }
864
862
  }
@@ -876,8 +874,18 @@ declare module '@tiptap/core' {
876
874
 
877
875
  declare module '@tiptap/core' {
878
876
  interface Commands<ReturnType> {
879
- exportWord: {
880
- exportToWord: () => ReturnType;
877
+ attachment: {
878
+ setAttachment: (attrs?: unknown) => ReturnType;
879
+ };
880
+ }
881
+ }
882
+
883
+
884
+ declare module '@tiptap/core' {
885
+ interface Commands<ReturnType> {
886
+ drawer: {
887
+ setDrawer: (options: any, replace?: any) => ReturnType;
888
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
881
889
  };
882
890
  }
883
891
  }
@@ -903,25 +911,6 @@ declare module '@tiptap/core' {
903
911
  }
904
912
 
905
913
 
906
- declare module '@tiptap/core' {
907
- interface Commands<ReturnType> {
908
- attachment: {
909
- setAttachment: (attrs?: unknown) => ReturnType;
910
- };
911
- }
912
- }
913
-
914
-
915
- declare module '@tiptap/core' {
916
- interface Commands<ReturnType> {
917
- mermaid: {
918
- setMermaid: (options: any, replace?: any) => ReturnType;
919
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
920
- };
921
- }
922
- }
923
-
924
-
925
914
  declare module '@tiptap/core' {
926
915
  interface Commands<ReturnType> {
927
916
  twitter: {
@@ -939,9 +928,9 @@ declare module '@tiptap/core' {
939
928
 
940
929
  declare module '@tiptap/core' {
941
930
  interface Commands<ReturnType> {
942
- drawer: {
943
- setDrawer: (options: any, replace?: any) => ReturnType;
944
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
931
+ mermaid: {
932
+ setMermaid: (options: any, replace?: any) => ReturnType;
933
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
945
934
  };
946
935
  }
947
936
  }