@yiitap/vue 0.10.0 → 0.11.0

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.
package/dist/index.js CHANGED
@@ -65,5 +65,5 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ve=T,ye=K),de===void 0
65
65
  body { margin: 0 !important; padding: 0; }
66
66
  </style>
67
67
  ${A}
68
- `}function Q(){k.value=!k.value}function R(){switch(h.value){case"mermaid":W();break}}function L(){Oo.initialize({...f,theme:r.value?"dark":m.value}),R()}async function W(){try{d.value="";const A=`mermaid-${Mg()}`,{svg:G}=await Oo.render(A,b.value);u.value=G}catch(A){console.error(A),d.value=A.message}}return e.watch(b,A=>{R()}),e.watch(h,A=>{R()}),e.watch(r,A=>{L()}),e.onMounted(()=>{var G;const A=n.editor.extensionManager.extensions.find(v=>v.name==="codeBlock");m.value=((G=A==null?void 0:A.options)==null?void 0:G.diagramTheme)||"default",L()}),(A,G)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-code-block-view",`language-${h.value} ${g.value}`]}),{default:e.withCtx(()=>[e.createElementVNode("div",Rg,[e.createElementVNode("div",Dg,[e.createElementVNode("div",Ig,e.toDisplayString(h.value),1),e.createVNode(e.unref(qa),{language:h.value,class:"editable",onSelect:C},null,8,["language"])]),e.createElementVNode("div",Lg,[g.value?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,modelValue:p.value,"onUpdate:modelValue":G[0]||(G[0]=v=>p.value=v),class:"editable"},null,8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(pe),{icon:E.value,"icon-class":{"rotate-270":k.value},tooltip:"Wrap",class:"editable",onClick:Q},null,8,["icon","icon-class"]),w.value?(e.openBlock(),e.createBlock(e.unref(Fa),{key:1,onDownload:M})):(e.openBlock(),e.createBlock(e.unref(pe),{key:2,icon:"download",tooltip:e.unref(a)("label.download"),onClick:M},null,8,["tooltip"])),_.value?(e.openBlock(),e.createBlock(e.unref(pe),{key:3,icon:"play_circle",tooltip:"Run",onClick:H})):e.createCommentVNode("",!0),e.createVNode(e.unref(pe),{icon:s.value,tooltip:e.unref(a)("label.copy"),onClick:N},null,8,["icon","tooltip"])])]),e.createVNode(e.unref(ki),{show:l.value,"onUpdate:show":G[1]||(G[1]=v=>l.value=v)},{title:e.withCtx(()=>[...G[2]||(G[2]=[e.createTextVNode("Run",-1)])]),default:e.withCtx(()=>[e.createElementVNode("iframe",{sandbox:"allow-same-origin allow-scripts",srcdoc:c.value},null,8,Vg)]),_:1},8,["show"]),e.createElementVNode("pre",null,[e.createVNode(e.unref($.NodeViewContent),{as:"code",class:e.normalizeClass({wrap:k.value})},null,8,["class"])]),w.value?(e.openBlock(),e.createElementBlock("section",Pg,[d.value?(e.openBlock(),e.createElementBlock("div",$g,e.toDisplayString(d.value),1)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"mermaid-svg",innerHTML:u.value},null,8,Fg))])):e.createCommentVNode("",!0)]),_:1},16,["class"]))}}),Zi=Ng(_g);Zi.register("mermaid",Sg);const zg=Rl.extend({draggable:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),diagramTheme:"default"}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),wrap:{default:!0,rendered:!1}}},addNodeView(){return $.VueNodeViewRenderer(Ug)}}).configure({languageClassPrefix:"language-",defaultLanguage:"bash",diagramTheme:"neutral",lowlight:Zi}),Hg=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,o=e.ref(!!n.node.attrs.open);function a(){const r=!o.value;o.value=r,n.updateAttributes({open:r})}return(r,i)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:"o-details-view"}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["details",{"is-open":o.value}])},[e.createElementVNode("button",{type:"button",onClick:a},[e.createVNode(e.unref(V),{name:"details_arrow"})]),e.createVNode(e.unref($.NodeViewContent))],2)]),_:1},16))}}),Gg=xo.Details.extend({draggable:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),triggerCharacters:[">"]}},addInputRules(){const{triggerCharacters:t}=this.options,n=t.map(a=>a.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join(""),o=new RegExp(`^[${n}]\\s$`);return[new xe.InputRule({find:o,handler:({state:a,range:r})=>{const{tr:i,schema:s}=a,{$from:l}=i.selection,c=l.before(l.depth),u=l.after(l.depth);i.delete(r.from,r.to);const d=s.nodes.details.create(null,[s.nodes.detailsSummary.create(null),s.nodes.detailsContent.create(null,s.nodes.paragraph.create())]);i.replaceRangeWith(c,u,d);const p=pt.TextSelection.near(i.doc.resolve(c+2));return i.setSelection(p),i}})]},addNodeView(){return $.VueNodeViewRenderer(Hg)}}),qg=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,o=e.computed(()=>n.node.attrs.level);return(a,r)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-heading-view",`h${o.value}`],style:`text-align: ${a.node.attrs.textAlign}`}),{default:e.withCtx(()=>[e.createVNode(e.unref($.NodeViewContent))]),_:1},16,["class","style"]))}}),Kg=Ll.extend({draggable:!0,addNodeView(){return $.VueNodeViewRenderer(qg)}}),Wg={class:"horizontal"},jg=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:"o-horizontal-view"}),{default:e.withCtx(()=>[e.createElementVNode("div",Wg,[e.createVNode(e.unref($.NodeViewContent),{as:"div",class:"divider"})])]),_:1},16))}}),Yg=Vl.extend({draggable:!0,addNodeView(){return $.VueNodeViewRenderer(jg)}}),Zg={key:1,class:"image-container"},Xg={key:1},Qg=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,{isEditable:o}=te(),a=e.ref(!1),r=e.ref(!1),i=e.ref({}),s=e.ref(null),l=e.ref(!1),c=e.computed(()=>n.node.attrs),u=e.computed({get(){return n.node.attrs.src},set(_){n.updateAttributes({src:_})}}),d=e.computed({get(){return n.node.attrs.title},set(_){n.updateAttributes({title:_})}});function p(){l.value=!0,setTimeout(()=>{var _;(_=s.value)==null||_.focus()},0)}function m(){l.value=!1}function f(){u.value==="init"&&k(!0)}function h(_){switch(a.value=!1,_.value){case"replace":k(!0);break}}function b(_){u.value=_,k(!1)}function k(_){r.value=_}return e.onMounted(()=>{k(u.value==="init")}),(_,E)=>{var w;return e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-image-view",{"with-caption":c.value.alt,"with-ratio":c.value.ratio,readonly:!((w=_.editor)!=null&&w.isEditable),init:u.value==="init"}],size:c.value.size,as:"div",onClick:f}),{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{modelValue:r.value,"onUpdate:modelValue":E[1]||(E[1]=g=>r.value=g),placement:u.value==="init"?"bottom":"top","show-arrow":""},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ro),{val:u.value==="init"?"":u.value,type:"image",onInput:b},null,8,["val"])]),default:e.withCtx(()=>{var g;return[u.value==="init"?(e.openBlock(),e.createBlock(e.unref(Pn),{key:0,icon:"image",placeholder:"Add an image"})):(e.openBlock(),e.createElementBlock("div",Zg,[e.unref(o)?(e.openBlock(),e.createBlock(e.unref(vo),e.mergeProps({key:0},n,{onAction:h}),{default:e.withCtx(()=>[e.createVNode(e.unref(pe),{icon:"subtitles",tooltip:"image.caption",onClick:p})]),_:1},16)):e.createCommentVNode("",!0),e.createElementVNode("img",e.mergeProps(c.value,{draggable:"true","data-drag-handle":""}),null,16),e.createElementVNode("div",{class:"caption",onClick:p},[(g=_.editor)!=null&&g.isEditable&&l.value?(e.openBlock(),e.createBlock(e.unref(ct),{key:0,ref_key:"captionInput",ref:s,class:"caption-input",modelValue:d.value,"onUpdate:modelValue":E[0]||(E[0]=C=>d.value=C),type:"text",placeholder:"Input caption",autosize:"",onBlur:m},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("span",Xg,e.toDisplayString(d.value),1))])]))]}),_:1},8,["modelValue","placement"]),e.createVNode(e.unref(wn),{modelValue:a.value,"onUpdate:modelValue":E[2]||(E[2]=g=>a.value=g),event:i.value},{default:e.withCtx(()=>[e.createVNode(e.unref(Mt),e.mergeProps(n,{onAction:h}),null,16)]),_:1},8,["modelValue","event"])]),_:1},16,["class","size"])}}}),Jg=Pl.extend({addNodeView(){return $.VueNodeViewRenderer(Qg)}}).configure({inline:!0});function eb(t){return new pt.Plugin({key:new pt.PluginKey("handleClickSelectLink"),props:{handleClick:(n,o,a)=>{const{schema:r,doc:i,tr:s}=n.state,l=xe.getMarkRange(i.resolve(o),r.marks.link);if(!l)return!1;const c=i.resolve(l.from),u=i.resolve(l.to),d=s.setSelection(new pt.TextSelection(c,u));return n.dispatch(d),!0}}})}const tb=va.extend({addProseMirrorPlugins(){var t;return[...((t=this.parent)==null?void 0:t.call(this))||[],eb({type:this.type})]}}).configure({openOnClick:!1}),nb=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:"o-paragraph-view"}),{default:e.withCtx(()=>[e.createVNode(e.unref($.NodeViewContent),{as:"p",style:e.normalizeStyle(`text-align: ${o.node.attrs.textAlign}`)},null,8,["style"])]),_:1},16))}}),ob=$l.extend({draggable:!1,addNodeView(){return $.VueNodeViewRenderer(nb,{stopEvent:()=>!1})}}),ab={class:"add"},rb=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,{tr:o}=j(),{isEditable:a,run:r}=te(),i=e.ref(!1);function s(){i.value=!0}function l(){c("tableSelectRow",{pos:n.getPos()})}function c(u,d={}){u==="tableDeleteRow"&&(i.value=!1),setTimeout(()=>{r(n.editor,u,d)},0)}return(u,d)=>(e.openBlock(),e.createBlock(e.unref($.NodeViewWrapper),e.mergeProps({class:"o-table-cell-view",as:"td"},u.node.attrs,{style:{background:u.node.attrs.background}}),{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(e.unref(ft),{key:0,modelValue:i.value,"onUpdate:modelValue":d[2]||(d[2]=p=>i.value=p),placement:"left-start","tippy-class":"o-row-popover",offset:[-6,26],"hide-click-outside":""},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ce),{icon:"select_all",placement:"left",tooltip:e.unref(o)("table.selectRow"),onClick:l},null,8,["tooltip"]),e.createVNode(e.unref(Ce),{icon:"delete",placement:"left",tooltip:e.unref(o)("table.removeRow"),onClick:d[1]||(d[1]=p=>c("tableDeleteRow"))},null,8,["tooltip"])]),default:e.withCtx(()=>[e.createElementVNode("section",{class:e.normalizeClass(["row-handler",{active:i.value}]),onClick:s},[e.createElementVNode("div",ab,[d[3]||(d[3]=e.createElementVNode("div",{class:"indicator"},[e.createElementVNode("svg",{width:"3",height:"3",viewBox:"0 0 3 3",fill:"none"},[e.createElementVNode("circle",{cx:"1.5",cy:"1.5",r:"1.5",fill:"#BBBFC4"})])],-1)),e.createVNode(e.unref(it),{icon:"add_circle",color:e.unref(X).blue,tooltip:e.unref(o)("table.addRow"),placement:"left",onClick:d[0]||(d[0]=e.withModifiers(p=>c("tableAddRow"),["stop"]))},null,8,["color","tooltip"])])],2)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref($.NodeViewContent))]),_:1},16,["style"]))}}),ib=Ht.TableCell.extend({addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),background:{default:""}}},addNodeView(){return $.VueNodeViewRenderer(rb,{stopEvent:()=>!1})}}),lb={class:"add"},sb={class:"add"},cb=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,{tr:o}=j(),{isEditable:a,run:r}=te(),i=e.ref(!1),s=e.ref(!1);function l(){setTimeout(()=>{i.value=!0},0)}function c(){s.value=!0}function u(){i.value=!1,p("tableSelectColumn",{pos:n.getPos()})}function d(){p("tableSelectRow",{pos:n.getPos()})}function p(m,f={}){m==="tableDeleteRow"?s.value=!1:m==="tableDeleteColumn"&&(i.value=!1),setTimeout(()=>{r(n.editor,m,f)},0)}return(m,f)=>(e.openBlock(),e.createBlock(e.unref($.NodeViewWrapper),e.mergeProps({class:"o-table-header-view",as:"th"},m.node.attrs,{style:{background:m.node.attrs.background}}),{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(ft),{modelValue:i.value,"onUpdate:modelValue":f[2]||(f[2]=h=>i.value=h),placement:"top","tippy-class":"o-column-popover",offset:[0,20],"hide-click-outside":""},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ce),{icon:"select_all",tooltip:e.unref(o)("table.selectColumn"),onClick:u},null,8,["tooltip"]),e.createVNode(e.unref(Ce),{icon:"delete",tooltip:e.unref(o)("table.removeColumn"),onClick:f[1]||(f[1]=h=>p("tableDeleteColumn"))},null,8,["tooltip"])]),default:e.withCtx(()=>[e.createElementVNode("section",{class:e.normalizeClass(["col-handler",{active:i.value}]),onClick:l},[e.createElementVNode("div",lb,[f[6]||(f[6]=e.createElementVNode("div",{class:"indicator"},[e.createElementVNode("svg",{width:"3",height:"3",viewBox:"0 0 3 3",fill:"none"},[e.createElementVNode("circle",{cx:"1.5",cy:"1.5",r:"1.5",fill:"#BBBFC4"})])],-1)),e.createVNode(e.unref(it),{icon:"add_circle",color:e.unref(X).blue,tooltip:e.unref(o)("table.addColumn"),onClick:f[0]||(f[0]=e.withModifiers(h=>p("tableAddColumn"),["stop"]))},null,8,["color","tooltip"])])],2)]),_:1},8,["modelValue"]),e.createVNode(e.unref(ft),{modelValue:s.value,"onUpdate:modelValue":f[5]||(f[5]=h=>s.value=h),placement:"left-start","tippy-class":"o-row-popover",offset:[-6,26],"hide-click-outside":""},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ce),{icon:"select_all",placement:"left",tooltip:e.unref(o)("table.selectRow"),onClick:d},null,8,["tooltip"]),e.createVNode(e.unref(Ce),{icon:"delete",placement:"left",tooltip:e.unref(o)("table.removeRow"),onClick:f[4]||(f[4]=h=>p("tableDeleteRow"))},null,8,["tooltip"])]),default:e.withCtx(()=>[e.createElementVNode("section",{class:e.normalizeClass(["row-handler",{active:s.value}]),onClick:c},[e.createElementVNode("div",sb,[f[7]||(f[7]=e.createElementVNode("div",{class:"indicator"},[e.createElementVNode("svg",{width:"3",height:"3",viewBox:"0 0 3 3",fill:"none"},[e.createElementVNode("circle",{cx:"1.5",cy:"1.5",r:"1.5",fill:"#BBBFC4"})])],-1)),e.createVNode(e.unref(it),{icon:"add_circle",color:e.unref(X).blue,tooltip:e.unref(o)("table.addRow"),placement:"left",onClick:f[3]||(f[3]=e.withModifiers(h=>p("tableAddRow"),["stop"]))},null,8,["color","tooltip"])])],2)]),_:1},8,["modelValue"])],64)):e.createCommentVNode("",!0),e.createVNode(e.unref($.NodeViewContent))]),_:1},16,["style"]))}}),db=Ht.TableHeader.extend({addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),background:{default:""}}},addNodeView(){return $.VueNodeViewRenderer(cb,{stopEvent:()=>!1})}}),ub=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,o=e.inject("sideNode",{value:!1}),a=e.ref(!1),r=e.computed(()=>{const{selection:s}=n.editor.view.state,l=s.from,c=n.getPos(),u=c+n.node.nodeSize;return l>=c&&l<=u});function i(s){a.value=s}return e.watch(r,s=>{console.log("isFocused",n.node.attrs),i(s)}),(s,l)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-table-wrapper-view",{"side-node-enabled":e.unref(o)}]}),{default:e.withCtx(()=>[e.createVNode(e.unref($.NodeViewContent),{as:"table"})]),_:1},16,["class"]))}}),pb=Fl.TableWrapper.extend({addNodeView(){return $.VueNodeViewRenderer(ub,{stopEvent:()=>!1})}}),fb={key:1,class:"video-container"},mb={key:1},gb=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,{isEditable:o}=te(),a=e.ref(!1),r=e.ref({}),i=e.ref(null),s=e.ref(!1),l=e.ref(!1),c=e.computed({get(){return n.node.attrs.caption},set(_){n.updateAttributes({caption:_})}}),u=e.computed({get(){return n.node.attrs.src},set(_){n.updateAttributes({src:_})}});function d(_){switch(a.value=!1,_.value){case"replace":k(!0);break}}function p(){s.value=!0,setTimeout(()=>{var _;(_=i.value)==null||_.focus()},0)}function m(){s.value=!1}function f(){u.value==="init"&&k(!0)}function h(_){a.value=!0,r.value=_}function b(_){u.value=_,k(!1)}function k(_){l.value=_}return e.onMounted(()=>{k(u.value==="init")}),(_,E)=>{var w;return e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-video-view",{readonly:!((w=_.editor)!=null&&w.isEditable),init:u.value==="init"}],as:"div",onContextmenu:e.withModifiers(h,["prevent"]),onClick:f}),{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{modelValue:l.value,"onUpdate:modelValue":E[1]||(E[1]=g=>l.value=g),placement:u.value==="init"?"bottom":"top"},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ro),{val:u.value==="init"?"":u.value,type:"video",onInput:b},null,8,["val"])]),default:e.withCtx(()=>{var g;return[u.value==="init"?(e.openBlock(),e.createBlock(e.unref(Pn),{key:0,icon:"videocam",placeholder:"Add a video"})):(e.openBlock(),e.createElementBlock("div",fb,[E[3]||(E[3]=e.createElementVNode("div",{class:"video-cover"},null,-1)),e.unref(o)?(e.openBlock(),e.createBlock(e.unref(vo),e.mergeProps({key:0},n,{onAction:d}),{default:e.withCtx(()=>[e.createVNode(e.unref(pe),{icon:"subtitles",tooltip:"image.caption",onClick:p})]),_:1},16)):e.createCommentVNode("",!0),e.createElementVNode("video",e.mergeProps(_.node.attrs,{draggable:"true","data-drag-handle":"",controls:""}),[e.createElementVNode("source",e.normalizeProps(e.guardReactiveProps(_.node.attrs)),null,16)],16),e.createElementVNode("div",{class:"caption",onClick:p},[(g=_.editor)!=null&&g.isEditable&&s.value?(e.openBlock(),e.createBlock(e.unref(ct),{key:0,ref_key:"captionInput",ref:i,class:"caption-input",modelValue:c.value,"onUpdate:modelValue":E[0]||(E[0]=C=>c.value=C),type:"text",placeholder:"Input caption",autosize:"",onBlur:m},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("span",mb,e.toDisplayString(c.value),1))])]))]}),_:1},8,["modelValue","placement"]),e.createVNode(e.unref(wn),{modelValue:a.value,"onUpdate:modelValue":E[2]||(E[2]=g=>a.value=g),event:r.value},{default:e.withCtx(()=>[e.createVNode(e.unref(Mt),e.mergeProps(n,{onAction:d}),null,16)]),_:1},8,["modelValue","event"])]),_:1},16,["class"])}}}),bb=Ul.Video.extend({addNodeView(){return $.VueNodeViewRenderer(gb)}}),hb=["Highlight","BackgroundColor","Color","Focus","FontFamily","Subscript","Superscript","Table","TaskItem","TaskList","TextAlign","TextStyle","Typography","UniqueID","OHorizontalRule","OSelectionDecoration"],_b=["Highlight","BackgroundColor","BlockMath","Bold","BulletList","Color","Code","CodeBlockLowlight","Emoji","Focus","FontFamily","HorizontalRule","Image","InlineMath","Italic","Link","ListItem","Markdown","Mention","OrderedList","Strike","Subscript","Superscript","Table","TaskItem","TaskList","TextAlign","TextStyle","Typography","Underline","UniqueID"],kb=["OAiBlock","OBlockMath","OBlockquote","OCallout","OCharCommand","OCodeBlock","OColon","OColorHighlighter","ODetails","OFocus","OHeading","OHorizontalRule","OImage","OInlinePlaceholder","OLink","OParagraph","OSelectionDecoration","OShortcut","OSlash","OSlashZh","OTableWrapper","OTaskItem","OVideo"],yb=[..._b,...kb],wb={key:0},Eb=e.defineComponent({__name:"OBubbleMenu",props:{editor:{type:xe.Editor},menu:{type:Array,default:function(){return[]}},tableToolbar:{type:Array,default:function(){return[]}},menuClass:{type:String,default:""}},setup(t){const n=t,{tr:o}=j(),{theme:a}=jt(),r=e.ref(!1),i=e.ref(!1),s=e.ref(!1),l=e.ref(!1),c=e.ref({offset:10,placement:"bottom-start",onShow:()=>{r.value=!1,i.value=!1,s.value=!1},onHide:()=>{s.value=!1}});function u(){r.value=!0}function d(w){w==="ai"&&(i.value=!0)}function p(){s.value=!0}function m(w){const{schema:g}=n.editor,C=g.marks.link;if(!C||!w)return!1;const{$from:N,$to:M}=w;return!!xe.getMarkRange(N,C)}function f({editor:w,element:g,view:C,state:N,oldState:M,from:P,to:I}){var v;const{doc:H,selection:ne}=N,{empty:Q}=ne,R=!H.textBetween(P,I).length&&xe.isTextSelection(N.selection);if(l.value=n.editor.isActive("inlineMath"),E.value||n.editor.isActive("inlineMath"))return!0;if(!C.hasFocus()||Q||s.value||R&&w.isActive("link")&&!w.isActive("image"))return!1;const L=["image"],W=["toc","video","model-viewer"],A=ne.node,G=(v=A==null?void 0:A.type)==null?void 0:v.name;return!(w.isActive("codeBlock")||W.indexOf(G)>=0||G&&!L.includes(G))}const h=e.computed(()=>{if(n.editor){const{state:w}=n.editor,{tr:g}=w,{selection:C}=g;return m(C)}else return!1}),b=e.computed(()=>{var w,g;return!r.value&&!((w=n.editor)!=null&&w.isActive("image"))&&(h.value||((g=n.editor)==null?void 0:g.isActive("inlineMath")))}),k=e.computed(()=>E.value||l.value),_=e.computed(()=>{var g,C,N;let w=n.menu;return r.value||((g=n.editor)!=null&&g.isActive("image")?w=h.value?$r:Pr:(C=n.editor)!=null&&C.isActive("table")?w=Ur:h.value?w=Vr:(N=n.editor)!=null&&N.isActive("inlineMath")&&(w=Lr)),w.length>0?w:Ir}),E=e.computed(()=>{const w=on.InlinePlaceholderKey.getState(n.editor.state);return!!(w!=null&&w.active)});return e.onMounted(()=>{r.value=!1}),(w,g)=>t.editor?(e.openBlock(),e.createElementBlock("section",wb,[e.createVNode(e.unref(Ra.BubbleMenu),{editor:t.editor,"should-show":f,options:c.value},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(e.unref(Ci),{key:0,editor:t.editor,onConfirm:p},null,8,["editor"])):k.value?(e.openBlock(),e.createBlock(e.unref(Ni),{key:1,editor:t.editor},null,8,["editor"])):(e.openBlock(),e.createElementBlock("section",{key:2,class:e.normalizeClass(["tiptap-toolbar",t.menuClass])},[b.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(pe),{icon:"arrow_back",tooltip:e.unref(o)("link.back"),onClick:u},null,8,["tooltip"]),e.createVNode(e.unref(Ie),{vertical:""})],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(C,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:N},[C==="separator"?(e.openBlock(),e.createBlock(e.unref(Ie),{key:0,vertical:""})):typeof C=="string"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(so)(C)),{key:1,name:C,editor:t.editor,onClick:M=>d(C)},null,8,["name","editor","onClick"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C),{key:2,editor:t.editor},null,8,["editor"]))],64))),128))],2))]),_:1},8,["editor","options"])])):e.createCommentVNode("",!0)}}),Cb={key:0},Nb=e.defineComponent({__name:"OFloatingMenu",props:{editor:{type:$.Editor},menu:{type:Array,default:function(){return[]}},tableToolbar:{type:Array,default:function(){return[]}},menuClass:{type:String,default:""}},setup(t){const n=t,o=e.ref(!1),a=e.ref({placement:"right",offset:168});function r(){o.value=!0}function i(d){const{schema:p}=n.editor,m=p.marks.link;if(!m||!d)return!1;const{$from:f,$to:h}=d;return!!xe.getMarkRange(f,m)}const s=e.computed(()=>{if(n.editor){const{state:d}=n.editor,{tr:p}=d,{selection:m}=p;return i(m)}else return!1}),l=e.computed(()=>!o.value&&s.value),c=e.computed(()=>{let d=n.menu;return d.length>0?d:zr}),u=e.computed(()=>{const d=on.InlinePlaceholderKey.getState(n.editor.state);return!!(d!=null&&d.active)});return(d,p)=>t.editor&&!u.value?(e.openBlock(),e.createElementBlock("section",Cb,[e.createVNode(e.unref(Ra.FloatingMenu),{editor:t.editor,options:a.value},{default:e.withCtx(()=>[e.createElementVNode("section",{class:e.normalizeClass(["tiptap-toolbar",t.menuClass])},[l.value?(e.openBlock(),e.createBlock(e.unref(pe),{key:0,icon:"arrow_back",onClick:r})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(m,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f},[m==="separator"?(e.openBlock(),e.createBlock(e.unref(Ie),{key:0,vertical:""})):typeof m=="string"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(so)(m)),{key:1,name:m,editor:t.editor},null,8,["name","editor"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m),{key:2,editor:t.editor},null,8,["editor"]))],64))),128))],2)]),_:1},8,["editor","options"])])):e.createCommentVNode("",!0)}});function ga(t,n){const o=n==null?void 0:n.posAtCoords(t);if(!o)return;let a=_o(o.pos,n);if(a!==n.dom){for(;a&&a.parentNode&&a.parentNode!==n.dom;)a=a.parentNode;if(a)return a}}function _o(t,n){return n.nodeDOM(t)||n.domAtPos(t).node}function ba(t,n){const o=ga(t,n);if(o&&o.nodeType===1){const a=n.docView,r=a.nearestDesc(o,!0);return!r||r===a?null:r.posBefore}return null}function xb(t,n){let o,a;const r=n.resolve(t.from).node().type.spec.group==="blockContent",i=n.resolve(t.to).node().type.spec.group==="blockContent",s=Math.min(t.$anchor.depth,t.$head.depth);if(r&&i){const l=t.$from.start(s-1),c=t.$to.end(s-1);o=n.resolve(l-1).pos,a=n.resolve(c+1).pos}else o=t.from,a=t.to;return{from:o,to:a}}function Sb(t,n){const o=ba(t,n.view);return o&&o>=0?{node:n.state.doc.nodeAt(o),pos:o}:{node:null,pos:o}}const ko=new pt.PluginKey("sideMenu");class Tb{constructor(){Ne(this,"hovered",!1);Ne(this,"coords",{left:0,top:0});Ne(this,"className","")}init(n){return this}apply({tr:n,oldState:o,newState:a}){return n.docChanged?this:this}setHover(n,o,a=""){this.hovered=n,this.coords=o,this.className=a}}class Ob{constructor({editor:n,element:o,view:a,tippyOptions:r={},updateDelay:i=250}){Ne(this,"editor");Ne(this,"element");Ne(this,"view");Ne(this,"preventHide",!1);Ne(this,"tippy");Ne(this,"tippyOptions");Ne(this,"updateDelay");Ne(this,"updateDebounceTimer");Ne(this,"mousedownHandler",()=>{this.preventHide=!0});Ne(this,"onDragStart",n=>{this.hide()});Ne(this,"blurHandler",({event:n})=>{var o;n!=null&&n.relatedTarget&&((o=this.element.parentNode)!=null&&o.contains(n.relatedTarget))||this.hide()});Ne(this,"tippyBlurHandler",n=>{this.blurHandler({event:n})});Ne(this,"handleDebouncedUpdate",(n,o)=>{const a=!(o!=null&&o.selection.eq(n.state.selection)),r=!(o!=null&&o.doc.eq(n.state.doc));!a&&!r||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(n,a,r,o)},this.updateDelay))});Ne(this,"updateHandler",(n,o,a,r)=>{var d,p;const{state:i,composing:s}=n,{coords:l}=ko.getState(i),c=ga(l,n),u=ba(l,n);!c||u<=0||(this.createTooltip(),(p=this.tippy)==null||p.setProps({getReferenceClientRect:((d=this.tippyOptions)==null?void 0:d.getReferenceClientRect)||(()=>c.getBoundingClientRect())}),this.show())});this.editor=n,this.element=o,this.view=a,this.updateDelay=i,this.view.dom.addEventListener("dragstart",this.onDragStart),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:n}=this.editor.options,o=n instanceof Element?n:"mount"in n?n.mount:null,a=!!(o!=null&&o.parentElement);this.tippy||!a||(this.tippy=ht(o,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"left",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(n,o){const{state:a}=n,r=!(o!=null&&o.selection.eq(n.state.selection)),i=!(o!=null&&o.doc.eq(n.state.doc));this.updateHandler(n,r,i,o)}show(){var n;(n=this.tippy)==null||n.show()}hide(){var n;(n=this.tippy)==null||n.hide()}destroy(){var n,o;(n=this.tippy)!=null&&n.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(o=this.tippy)==null||o.destroy(),this.view.dom.removeEventListener("dragstart",this.onDragStart)}}const Ab=(t,n)=>{if(!t.dataTransfer)return;const o=n.view,a=o.dom.getBoundingClientRect(),r={left:a.left+a.width/2,top:t.clientY},i=ba(r,o);if(i===null)return;const s=o.state.selection,l=o.state.doc;xb(s,l),o.dispatch(o.state.tr.setSelection(pt.NodeSelection.create(o.state.doc,i))),vb(o,i);const c=o.state.selection.content(),{dom:u,text:d}=o.serializeForClipboard(c);t.dataTransfer.clearData(),t.dataTransfer.setData("text/html",u.innerHTML),t.dataTransfer.setData("text/plain",d),t.dataTransfer.effectAllowed="move",t.dataTransfer.setDragImage(Qt,0,0),o.dragging={slice:c,move:!0}},Bb=(t,n)=>{Xi()};let Qt;function vb(t,n,o=n){const a=t.domAtPos(n).node.cloneNode(!0),r=t.domAtPos(n).node,i=(p,m)=>Array.prototype.indexOf.call(p.children,m),s=p=>{let m=p,f=m.parentElement;for(;f;){if(f===t.dom)return m;m=f,f=m.parentElement}return m};let l=-1,c=-1;n===o?(l=i(r,s(_o(n,t))),c=l):(l=i(r,s(_o(n+1,t))),c=i(r,s(_o(o-1,t))));for(let p=r.childElementCount-1;p>=0;p--)(p>l||p<c)&&a.removeChild(a.children[p]);Xi(),Qt=a;const d=t.dom.className.split(" ").filter(p=>p!=="ProseMirror"&&p!=="yiitap-root"&&p!=="yiitap-editor").join(" ");Qt.className+=" yiitap-dragging-preview "+d,document.body.appendChild(Qt)}function Xi(){Qt!==void 0&&(document.body.removeChild(Qt),Qt=void 0)}class Mb{constructor(n){Ne(this,"options");Ne(this,"plugin");Ne(this,"sideMenuView");const o=new Tb;this.options=n,this.plugin=new pt.Plugin({key:ko,props:{handleDOMEvents:{mouseover(a,r){const i={left:r.clientX,top:r.clientY},s=ga(i,a),l=(s==null?void 0:s.className)||"",c=o.className;l.indexOf("o-table-wrapper-view")>=0&&c.indexOf("o-table-wrapper-view")>=0||(o.setHover(!0,i,l),a.dispatch(a.state.tr.setMeta(ko,o)))}}},state:{init(a,r){return o.init(r)},apply(a,r,i,s){return o.apply({tr:a,oldState:i,newState:s})}},view:a=>(this.sideMenuView=new Ob({view:a,...n}),this.sideMenuView)})}dragstart(n){Ab(n,this.options.editor)}dragend(n){Bb(n,this.options.editor)}}const Rb=e.defineComponent({name:"SideMenu",props:{pluginKey:{type:[String,Object],default:"sideMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})}},setup(t,{expose:n,slots:o}){const a=e.ref(null),r=e.ref(),i=l=>{var c;(c=r.value)==null||c.dragstart(l)},s=l=>{var c;(c=r.value)==null||c.dragend(l)};return e.onMounted(()=>{const{pluginKey:l,editor:c,updateDelay:u,tippyOptions:d}=t;r.value=new Mb({updateDelay:u,editor:c,element:a.value,pluginKey:l,tippyOptions:d}),c.registerPlugin(r.value.plugin)}),e.onBeforeUnmount(()=>{const{pluginKey:l,editor:c}=t;c.unregisterPlugin(l)}),n({...t,dragstart:i,dragend:s}),()=>{var l;return e.h("div",{ref:a},(l=o.default)==null?void 0:l.call(o))}}}),Db={key:0,class:"o-side-menu"},Ib={class:"container"},Lb=e.defineComponent({__name:"OSideMenu",props:{editor:{type:xe.Editor,required:!0},menuClass:{type:String,default:""},add:{type:String,default:"menu"}},setup(t){const n=t,o=e.ref(null),a=e.ref(null),r=e.ref(0),i=e.computed(()=>({arrow:!1,duration:100,placement:"left"})),s=e.computed(()=>({editor:n.editor,node:a.value,decorations:[],selected:!1,extension:{},getPos:()=>r.value,pos:r.value,updateAttributes:c,deleteNode:l,view:{},innerDecorations:[],HTMLAttributes:{},add:n.add}));function l(){var h,b;const m=r.value,f=m+((h=a.value)==null?void 0:h.nodeSize);(b=n.editor)==null||b.commands.deleteRange({from:m,to:f})}function c(m){var f;(f=n.editor)==null||f.commands.command(({tr:h})=>{var b;return h.setNodeMarkup(r.value,void 0,{...(b=a.value)==null?void 0:b.attrs,...m}),!0})}function u({editor:m,transaction:f}){let h={left:0,top:0};const b=ko.getState(n.editor.view.state);if(b){h=b.coords;const k=Sb(h,m);k.node&&k.pos>0&&(a.value=k.node,r.value=k.pos)}}function d(m){var f;(f=o.value)==null||f.dragstart(m)}function p(m){var f;(f=o.value)==null||f.dragend(m)}return e.onMounted(()=>{var m;(m=n.editor)==null||m.on("transaction",u)}),(m,f)=>t.editor?(e.openBlock(),e.createElementBlock("section",Db,[e.createVNode(e.unref(Rb),{ref_key:"menu",ref:o,class:e.normalizeClass(["side-menu",t.menuClass]),editor:t.editor,"tippy-options":i.value},{default:e.withCtx(()=>[e.createElementVNode("section",Ib,[a.value?(e.openBlock(),e.createBlock(e.unref(bi),e.normalizeProps(e.mergeProps({key:0},s.value)),null,16)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createBlock(e.unref(hi),e.mergeProps({key:1},s.value,{onDragstart:d,onDragend:p}),null,16)):e.createCommentVNode("",!0)])]),_:1},8,["class","editor","tippy-options"])])):e.createCommentVNode("",!0)}}),Vb={props:{items:{type:Array,required:!0},command:{type:Function,required:!0},editor:{type:Object},range:{type:Object}},setup(){const{locale:t,tr:n}=j(),{run:o}=te();return{locale:t,tr:n,run:o}},data(){return{view:"main"}},components:{OEmojiSelect:zn},methods:{onSelect(t){this.editor.commands.deleteRange(this.range),this.editor.commands.insertContent(t.emoji),this.editor.chain().focus()},onKeyDown({event:t}){return!1}}},ha=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},Pb={class:"o-colon-view"};function $b(t,n,o,a,r,i){const s=e.resolveComponent("o-emoji-select");return e.openBlock(),e.createElementBlock("section",Pb,[e.createVNode(s,{items:o.items,onSelect:i.onSelect},null,8,["items","onSelect"])])}const Fb=ha(Vb,[["render",$b]]),Ub={items:({query:t})=>yn.filterEmojiGroups(t),render:()=>{let t,n;return{onStart:o=>{t=new $.VueRenderer(Fb,{props:o,editor:o.editor}),o.clientRect&&(n=ht("body",{getReferenceClientRect:o.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,onShow(a){a.popper.classList.add("emoji-tippy")}}))},onUpdate(o){t.updateProps(o),n[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown(o){var a;return o.event.key==="Escape"?(n[0].hide(),t.destroy(),!0):(a=t.ref)==null?void 0:a.onKeyDown(o)},onExit(){n[0].destroy(),t.destroy()}}}},zb={props:{items:{type:Array,required:!0},command:{type:Function,required:!0},editor:{type:xe.Editor},range:{type:Object}},setup(){const{locale:t,tr:n}=j(),{onCommand:o,run:a}=te();return{locale:t,tr:n,onCommand:o,run:a}},data(){return{view:"main",selectedIndex:0}},components:{ODivider:Ie,OIcon:V,OList:Fe,OListItem:Pe},watch:{items(){this.selectedIndex=0}},methods:{onClick(t){switch(t.value){default:this.runCommand(t);break}return!0},runCommand(t){const n=this.editor.chain().focus().deleteRange(this.range),o=this.editor.commands;["blockMath","codeBlock","content","details","diagram","emoji","inlineMath","taskList"].includes(t.value)?(o.deleteRange(this.range),this.run(this.editor,t.value,t.options)):this.onCommand(o,n,t.value,t.options)},onKeyDown({event:t}){return t.key==="ArrowUp"?(this.upHandler(),!0):t.key==="ArrowDown"?(this.downHandler(),!0):t.key==="Enter"?(this.enterHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length},enterHandler(){this.selectItem(this.selectedIndex)},selectItem(t){const n=this.items[t];n&&this.onClick(n)},setEmoji(t){this.onClick({value:"content",options:{content:t}})}},computed:{basicBlocks(){return rn.slice(1)}},mounted(){this.selectedIndex=0}},Hb={key:0,class:"view-main"},Gb={class:"group o-tips"},qb={class:"o-tips"},Kb={key:1,class:"item"},Wb={key:1,class:"view-emoji"},jb={key:2,class:"view-emoji"};function Yb(t,n,o,a,r,i){const s=e.resolveComponent("o-divider"),l=e.resolveComponent("o-icon"),c=e.resolveComponent("o-list-item"),u=e.resolveComponent("o-list");return e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["o-slash-view o-shadow-3 o-menu o-scroll",`view-${r.view}`])},[r.view==="main"?(e.openBlock(),e.createElementBlock("section",Hb,[e.createVNode(u,{hoverable:"",clickable:""},{default:e.withCtx(()=>[o.items.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.items,(d,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:p},[d.group?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p>0?(e.openBlock(),e.createBlock(s,{key:0})):e.createCommentVNode("",!0),e.createElementVNode("div",Gb,e.toDisplayString(a.tr(d.group)),1)],64)):e.createCommentVNode("",!0),e.createVNode(c,{class:e.normalizeClass(["item",{"is-active":p===r.selectedIndex}]),clickable:"",onClick:m=>i.onClick(d)},{prefix:e.withCtx(()=>[e.createVNode(l,{name:d.icon,color:d.color},null,8,["name","color"])]),suffix:e.withCtx(()=>[e.createElementVNode("span",qb,e.toDisplayString(d.tips),1)]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(a.tr(d.label)),1)]),_:2},1032,["class","onClick"])],64))),128)):(e.openBlock(),e.createElementBlock("div",Kb,"No result"))]),_:1})])):r.view==="emoji"?(e.openBlock(),e.createElementBlock("section",Wb)):r.view==="ai"?(e.openBlock(),e.createElementBlock("section",jb)):e.createCommentVNode("",!0)],2)}const Zb=ha(zb,[["render",Yb]]),Qi={items:({query:t})=>Fn.filter(n=>{var o;return n.value.toLowerCase().includes(t.toLowerCase())||((o=n.keywords)==null?void 0:o.toLowerCase().includes(t.toLowerCase()))}),render:()=>{let t,n;return{onStart:o=>{t=new $.VueRenderer(Zb,{props:o,editor:o.editor}),o.clientRect&&(n=ht("body",{getReferenceClientRect:o.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,onShow:a=>{a.popper.classList.add("slash-tippy")}}))},onUpdate(o){t.updateProps(o),n[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown(o){var a;return o.event.key==="Escape"?(n[0].hide(),t.destroy(),!0):(a=t.ref)==null?void 0:a.onKeyDown(o)},onExit(){n[0].destroy(),t.destroy()}}}},Xb={props:{items:{type:Array,required:!0},command:{type:Function,required:!0},editor:{type:Object,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:t}){return t.key==="ArrowUp"?(this.upHandler(),!0):t.key==="ArrowDown"?(this.downHandler(),!0):t.key==="Enter"?(this.enterHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length},enterHandler(){this.selectItem(this.selectedIndex)},selectItem(t){const n=this.items[t];n&&this.command({name:n.name})}}},Qb={class:"dropdown-menu"},Jb=["onClick"],eh=["src"];function th(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",Qb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,(s,l)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass({"is-selected":l===r.selectedIndex}),key:l,onClick:c=>i.selectItem(l)},[s.fallbackImage?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.fallbackImage,align:"absmiddle"},null,8,eh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s.emoji),1)],64)),e.createTextVNode(" :"+e.toDisplayString(s.name)+": ",1)],10,Jb))),128))])}const nh=ha(Xb,[["render",th]]),oh={items:({editor:t,query:n})=>t.storage.emoji.emojis.filter(({shortcodes:o,tags:a})=>o.find(r=>r.startsWith(n.toLowerCase()))||a.find(r=>r.startsWith(n.toLowerCase()))).slice(0,10),render:()=>{let t;function n(o){if(!t||!t.element)return;la({getBoundingClientRect(){return o}},t.element,{placement:"bottom-start"}).then(r=>{Object.assign(t.element.style,{left:`${r.x}px`,top:`${r.y}px`,position:r.strategy==="fixed"?"fixed":"absolute"})})}return{onStart:o=>{t=new $.VueRenderer(nh,{props:o,editor:o.editor}),document.body.appendChild(t.element),n(o.clientRect())},onUpdate(o){t.updateProps(o),n(o.clientRect())},onKeyDown(o){var a;return o.event.key==="Escape"?(document.body.removeChild(t.element),t.destroy(),!0):(a=t.ref)==null?void 0:a.onKeyDown(o)},onExit(){document.body.contains(t.element)&&document.body.removeChild(t.element),t.destroy()}}}},ah={BackgroundColor:Vn.BackgroundColor.configure({types:["textStyle"]}),BlockMath:So.BlockMath,Color:Vn.Color,Emoji:Ba.configure({emojis:Ba.gitHubEmojis,enableEmoticons:!0,suggestion:oh}),Focus:ul.Focus,FontFamily:Vn.FontFamily,Highlight:ml.configure({multicolor:!0}),Image:gl,InlineMath:So.InlineMath,Link:va,Markdown:fl.Markdown.configure({indentation:{style:"space",size:2},markedOptions:{gfm:!0,breaks:!0,pedantic:!1}}),Subscript:bl,Superscript:hl,TaskItem:Sl,TaskList:pl.TaskList.configure({itemTypeName:"taskItem"}),TextAlign:_l.configure({types:["heading","paragraph"]}),TextStyle:Vn.TextStyle,Underline:yl,Typography:kl,OAiBlock:$f,OBlockMath:Gf,OColon:To.ColonCommand.configure({suggestion:Ub}),OSlash:To.SlashCommand.configure({suggestion:Qi}),OSlashZh:To.SlashZhCommand.configure({suggestion:Qi}),OBlockquote:Kf.configure({triggerCharacters:['"',"“","”"]}),OCallout:Xf,OCodeBlock:zg,OColorHighlighter:El,OHeading:Kg,OHorizontalRule:Yg,OImage:Jg,OInlinePlaceholder:Cl,OLink:tb.configure({openOnClick:!1}),OParagraph:ob,OSelectionDecoration:Nl,UniqueID:wl.configure({attributeName:"id",types:["blockquote","codeBlock","callout","heading","image","paragraph","table-wrapper","video"]}),OVideo:bb};class rh{constructor(n){return ah[n]}}const ih=[Gg.configure({persist:!0,HTMLAttributes:{class:"details"}}),xo.DetailsContent,xo.DetailsSummary],lh=[pb,xl.configure({resizable:!0}),Ht.TableRow,db,ib];Ht.Table.configure({resizable:!0}),Ht.TableRow,Ht.TableHeader,Ht.TableCell;const sh=["data-theme"],Ji=e.defineComponent({name:"YiiEditor",__name:"YiiEditor",props:{content:{type:[String,Object],default:""},title:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},autofocus:{type:[String,Number,Boolean],default:!1},locale:{type:String,default:"en"},darkMode:{type:Boolean,default:!1},showMainMenu:{type:Boolean,default:!1},showBubbleMenu:{type:Boolean,default:!1},showFloatingMenu:{type:Boolean,default:!1},sideMenu:{type:Object,default:()=>({show:!0,add:"menu"})},showSideNode:{type:Boolean,default:!1},extensions:{type:Array,default:()=>[]},mainMenu:{type:Array,default:()=>[]},tableMenu:{type:Array,default:()=>[]},bubbleMenu:{type:Array,default:()=>[]},floatingMenu:{type:Array,default:()=>[]},pageView:{type:String,default:"page",validator:t=>["page","full"].includes(t)},aiOption:{type:Object,default:()=>{}},collab:{type:Object,default:()=>({enabled:!1,collaboration:null,collaborationCaret:null})}},emits:["transaction","update"],setup(t,{expose:n,emit:o}){const a=t,r=o,{tr:i}=j(),s=e.ref(!1),l=e.ref(!0),c=e.ref("en"),u=e.ref(!1),d=e.ref(),p=e.ref(!1);e.provide("darkMode",s),e.provide("isEditable",l),e.provide("locale",c),e.provide("sideNode",u),e.provide("aiOption",d);const m=e.computed(()=>E()),f=$.useEditor({editable:a.editable,content:a.content,autofocus:a.autofocus,extensions:m.value,onCreate:()=>{p.value=!0},onUpdate:()=>{var C,N;if(!p.value)return;const w=(C=f.value)==null?void 0:C.getJSON(),g=(N=f.value)==null?void 0:N.getHTML();r("update",{json:w,html:g})},onTransaction:({editor:w,transaction:g})=>{r("transaction",{editor:w,transaction:g})}}),h=e.computed(()=>({editor:f.value,menu:a.mainMenu})),b=e.computed(()=>({editor:f.value,menu:a.bubbleMenu})),k=e.computed(()=>({editor:f.value,menu:a.floatingMenu})),_=e.computed(()=>({editor:f.value,add:a.sideMenu.add,menu:[]}));function E(){const w=[];a.title?w.push(Aa.extend({content:"heading block*"})):w.push(Aa),w.push(on.configure({placeholder:({editor:C,node:N,pos:M})=>{if(N.type.name==="heading"){const P=N.attrs.level;return M>0?`H${P}`:i("label.untitled")}else return N.type.name==="paragraph"?i("label.typeForCommands"):""}})),w.push(sl.configure({dropcursor:{width:5,color:"skyblue",class:"yiitap-dropcursor"},codeBlock:!1,document:!1,horizontalRule:!1,link:!1,blockquote:a.extensions.includes("OBlockquote")?!1:{},heading:a.extensions.includes("OHeading")?!1:{levels:[1,2,3,4,5]},paragraph:a.extensions.includes("OParagraph")?!1:{},trailingNode:{node:"paragraph",notAfter:["paragraph","heading"]},undoRedo:a.collab.enabled?!1:{depth:100,newGroupDelay:500}}));const g=hb.concat(a.extensions);for(const C of g)if(typeof C=="string"){if(!yb.includes(C))continue;switch(C){case"ODetails":w.push(...ih);break;case"Table":w.push(...lh);break;default:try{const N=new rh(C);w.push(N)}catch(N){console.error(N.message)}break}}else w.push(C);return a.collab.enabled&&w.push(cl.configure(a.collab.collaboration),dl.configure(a.collab.collaborationCaret)),g.includes("OShortcut")&&(g.includes("Markdown")?w.push(Ma.configure({markdown:{enabled:!0}})):w.push(Ma)),w}return e.watch(()=>a.darkMode,w=>{s.value=w}),e.watch(()=>a.locale,w=>{c.value=w}),e.watch(()=>a.aiOption,w=>{d.value=w},{deep:!0}),e.watch(()=>a.editable,w=>{var g;(g=f.value)==null||g.setEditable(w),l.value=w}),e.onBeforeMount(()=>{l.value=a.editable,d.value=a.aiOption,s.value=a.darkMode,c.value=a.locale,u.value=!a.sideMenu.show&&a.showSideNode}),n({editor:f,darkMode:s,locale:c}),(w,g)=>{var C,N,M;return e.openBlock(),e.createElementBlock("main",{class:"yiitap yiitap-editor","data-theme":s.value?"dark":""},[t.showMainMenu?(e.openBlock(),e.createBlock(wi,e.mergeProps({key:0},h.value,{class:"desktop-only"}),{left:e.withCtx(()=>[e.renderSlot(w.$slots,"toolbar-left")]),right:e.withCtx(()=>[e.renderSlot(w.$slots,"toolbar-right")]),_:3},16)):e.createCommentVNode("",!0),(C=e.unref(f))!=null&&C.isEditable&&t.showBubbleMenu?(e.openBlock(),e.createBlock(Eb,e.normalizeProps(e.mergeProps({key:1},b.value)),null,16)):e.createCommentVNode("",!0),(N=e.unref(f))!=null&&N.isEditable&&t.showFloatingMenu?(e.openBlock(),e.createBlock(Nb,e.normalizeProps(e.mergeProps({key:2},k.value)),null,16)):e.createCommentVNode("",!0),(M=e.unref(f))!=null&&M.isEditable&&t.sideMenu.show?(e.openBlock(),e.createBlock(Lb,e.normalizeProps(e.mergeProps({key:3},_.value)),null,16)):e.createCommentVNode("",!0),e.createVNode(e.unref($.EditorContent),{class:e.normalizeClass(["editor-content",`${t.pageView}-view`]),editor:e.unref(f)},null,8,["class","editor"])],8,sh)}}}),ch={installed:!1,spellcheck:!0,install(t){this.installed=!0,t.component("YiiEditor",Ji)}};return O.AddNode=bi,O.AdvancedBlocks=za,O.AiBlocks=Ga,O.AiProviders=Mr,O.AskAiBlocks=Ha,O.BasicBlocks=rn,O.BlockMenus=Un,O.Blocks=Fn,O.Color=X,O.ColorList=ns,O.CommonBlocks=sn,O.DefaultBubble=Ir,O.DefaultEmbedServices=Ad,O.DefaultFloating=zr,O.DefaultMenu=Rr,O.DragNode=hi,O.ImageBubble=Pr,O.ImageLinkBubble=$r,O.InlineMathBubble=Lr,O.LinkBubble=Vr,O.MoreBubble=Fr,O.OAiMenu=Ci,O.OBlockList=$n,O.OBlockListItem=Ao,O.OBlockMenu=Mt,O.OBlockPlaceholder=Pn,O.OBlockPopover=ft,O.OBlockToolbar=vo,O.OBtn=Se,O.OBtnGroup=_i,O.OCalloutColorBoard=Mo,O.OCalloutColorDropdown=gs,O.OCheckbox=ca,O.OCodeBlockDownloadDropdown=Fa,O.OCodeBlockViewDropdown=Ua,O.OColorBoard=Gt,O.OCommandBtn=Ce,O.OCommonBtn=it,O.OContextMenu=wn,O.ODialog=ki,O.ODivider=Ie,O.ODocToc=Os,O.OEmojiSelect=zn,O.OFloatingToast=Du,O.OIcon=V,O.OInlineMathMenu=Ni,O.OInput=ct,O.OLanguageDropdown=qa,O.OList=Fe,O.OListItem=Pe,O.OMainMenu=wi,O.OMediaInput=Ro,O.OMenubarBtn=pe,O.OMetaInput=Gn,O.ONodeView=Ze,O.OPopover=ce,O.OTableCellBackground=Kr,O.OTableGrid=qr,O.OTextColorBoard=ea,O.OTextarea=yi,O.OToast=sa,O.OTooltip=nt,O.Prompts=Qo,O.StyleBlocks=ln,O.TableBubble=Ur,O.TableFloating=Od,O.TableMenu=Dr,O.TableWrapperBubble=Td,O.YiiEditor=Ji,O.YiiEditorPlugin=ch,O.getProviderProp=Xo,O.useAi=Jo,O.useCommon=Hr,O.useI18n=j,O.useNodeView=Gr,O.useTheme=jt,O.useTiptap=te,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),O})({},Vue,CustomtiptapVue3,CustomtiptapStarterKit,CustomtiptapExtensionDocument,CustomtiptapExtensionCollaboration,CustomtiptapExtensionCollaborationCaret,CustomtiptapExtensions,CustomtiptapExtensionDetails,CustomtiptapExtensionList,CustomtiptapExtensionMathematics,CustomtiptapExtensionTable,CustomtiptapExtensionTextStyle,CustomtiptapMarkdown,CustomtiptapExtensionHighlight,CustomtiptapExtensionEmoji,CustomtiptapExtensionImage,CustomtiptapExtensionLink,CustomtiptapExtensionMention,CustomtiptapExtensionSubscript,CustomtiptapExtensionSuperscript,CustomtiptapExtensionTextAlign,CustomtiptapExtensionTypography,CustomtiptapExtensionUnderline,CustomtiptapExtensionUniqueId,CustomyiitapExtensionColorHighlighter,CustomyiitapExtensionFocus,CustomyiitapExtensionInlinePlaceholder,CustomyiitapExtensionPlaceholder,CustomyiitapExtensionSelectionDecoration,CustomyiitapExtensionShortcut,CustomyiitapExtensionTable,CustomyiitapExtensionTaskItem,CustomyiitapExtensionCharCommand,CustomyiitapExtensionAiBlock,CustomtiptapCore,Katex,OpenAI,MarkdownIt,CustomtiptapExtensionBlockquote,CustomtiptapPmState,CustomyiitapExtensionCallout,CustomtiptapExtensionCodeBlockLowlight,Mermaid,CustommermaidJsLayoutElk,CustomyiitapCore,CustomtiptapExtensionHeading,CustomtiptapExtensionHorizontalRule,CustomyiitapExtensionImage,CustomtiptapExtensionParagraph,CustomyiitapExtensionTableWrapper,CustomyiitapExtensionVideo,CustomyiitapUtilEmoji,CustomtiptapVue3Menus,CustomtiptapPmModel);
68
+ `}function Q(){k.value=!k.value}function R(){switch(h.value){case"mermaid":W();break}}function L(){Oo.initialize({...f,theme:r.value?"dark":m.value}),R()}async function W(){try{d.value="";const A=`mermaid-${Mg()}`,{svg:G}=await Oo.render(A,b.value);u.value=G}catch(A){console.error(A),d.value=A.message}}return e.watch(b,A=>{R()}),e.watch(h,A=>{R()}),e.watch(r,A=>{L()}),e.onMounted(()=>{var G;const A=n.editor.extensionManager.extensions.find(v=>v.name==="codeBlock");m.value=((G=A==null?void 0:A.options)==null?void 0:G.diagramTheme)||"default",L()}),(A,G)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-code-block-view",`language-${h.value} ${g.value}`]}),{default:e.withCtx(()=>[e.createElementVNode("div",Rg,[e.createElementVNode("div",Dg,[e.createElementVNode("div",Ig,e.toDisplayString(h.value),1),e.createVNode(e.unref(qa),{language:h.value,class:"editable",onSelect:C},null,8,["language"])]),e.createElementVNode("div",Lg,[g.value?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,modelValue:p.value,"onUpdate:modelValue":G[0]||(G[0]=v=>p.value=v),class:"editable"},null,8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(pe),{icon:E.value,"icon-class":{"rotate-270":k.value},tooltip:"Wrap",class:"editable",onClick:Q},null,8,["icon","icon-class"]),w.value?(e.openBlock(),e.createBlock(e.unref(Fa),{key:1,onDownload:M})):(e.openBlock(),e.createBlock(e.unref(pe),{key:2,icon:"download",tooltip:e.unref(a)("label.download"),onClick:M},null,8,["tooltip"])),_.value?(e.openBlock(),e.createBlock(e.unref(pe),{key:3,icon:"play_circle",tooltip:"Run",onClick:H})):e.createCommentVNode("",!0),e.createVNode(e.unref(pe),{icon:s.value,tooltip:e.unref(a)("label.copy"),onClick:N},null,8,["icon","tooltip"])])]),e.createVNode(e.unref(ki),{show:l.value,"onUpdate:show":G[1]||(G[1]=v=>l.value=v)},{title:e.withCtx(()=>[...G[2]||(G[2]=[e.createTextVNode("Run",-1)])]),default:e.withCtx(()=>[e.createElementVNode("iframe",{sandbox:"allow-same-origin allow-scripts",srcdoc:c.value},null,8,Vg)]),_:1},8,["show"]),e.createElementVNode("pre",null,[e.createVNode(e.unref($.NodeViewContent),{as:"code",class:e.normalizeClass({wrap:k.value})},null,8,["class"])]),w.value?(e.openBlock(),e.createElementBlock("section",Pg,[d.value?(e.openBlock(),e.createElementBlock("div",$g,e.toDisplayString(d.value),1)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"mermaid-svg",innerHTML:u.value},null,8,Fg))])):e.createCommentVNode("",!0)]),_:1},16,["class"]))}}),Zi=Ng(_g);Zi.register("mermaid",Sg);const zg=Rl.extend({draggable:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),diagramTheme:"default"}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),wrap:{default:!0,rendered:!1}}},addNodeView(){return $.VueNodeViewRenderer(Ug)}}).configure({languageClassPrefix:"language-",defaultLanguage:"bash",diagramTheme:"neutral",lowlight:Zi}),Hg=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,o=e.ref(!!n.node.attrs.open);function a(){const r=!o.value;o.value=r,n.updateAttributes({open:r})}return(r,i)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:"o-details-view"}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["details",{"is-open":o.value}])},[e.createElementVNode("button",{type:"button",onClick:a},[e.createVNode(e.unref(V),{name:"details_arrow"})]),e.createVNode(e.unref($.NodeViewContent))],2)]),_:1},16))}}),Gg=xo.Details.extend({draggable:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),triggerCharacters:[">"]}},addInputRules(){const{triggerCharacters:t}=this.options,n=t.map(a=>a.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join(""),o=new RegExp(`^[${n}]\\s$`);return[new xe.InputRule({find:o,handler:({state:a,range:r})=>{const{tr:i,schema:s}=a,{$from:l}=i.selection,c=l.before(l.depth),u=l.after(l.depth);i.delete(r.from,r.to);const d=s.nodes.details.create(null,[s.nodes.detailsSummary.create(null),s.nodes.detailsContent.create(null,s.nodes.paragraph.create())]);i.replaceRangeWith(c,u,d);const p=pt.TextSelection.near(i.doc.resolve(c+2));return i.setSelection(p),i}})]},addNodeView(){return $.VueNodeViewRenderer(Hg)}}),qg=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,o=e.computed(()=>n.node.attrs.level);return(a,r)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-heading-view",`h${o.value}`],style:`text-align: ${a.node.attrs.textAlign}`}),{default:e.withCtx(()=>[e.createVNode(e.unref($.NodeViewContent))]),_:1},16,["class","style"]))}}),Kg=Ll.extend({draggable:!0,addNodeView(){return $.VueNodeViewRenderer(qg)}}),Wg={class:"horizontal"},jg=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:"o-horizontal-view"}),{default:e.withCtx(()=>[e.createElementVNode("div",Wg,[e.createVNode(e.unref($.NodeViewContent),{as:"div",class:"divider"})])]),_:1},16))}}),Yg=Vl.extend({draggable:!0,addNodeView(){return $.VueNodeViewRenderer(jg)}}),Zg={key:1,class:"image-container"},Xg={key:1},Qg=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,{isEditable:o}=te(),a=e.ref(!1),r=e.ref(!1),i=e.ref({}),s=e.ref(null),l=e.ref(!1),c=e.computed(()=>n.node.attrs),u=e.computed({get(){return n.node.attrs.src},set(_){n.updateAttributes({src:_})}}),d=e.computed({get(){return n.node.attrs.title},set(_){n.updateAttributes({title:_})}});function p(){l.value=!0,setTimeout(()=>{var _;(_=s.value)==null||_.focus()},0)}function m(){l.value=!1}function f(){u.value==="init"&&k(!0)}function h(_){switch(a.value=!1,_.value){case"replace":k(!0);break}}function b(_){u.value=_,k(!1)}function k(_){r.value=_}return e.onMounted(()=>{k(u.value==="init")}),(_,E)=>{var w;return e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-image-view",{"with-caption":c.value.alt,"with-ratio":c.value.ratio,readonly:!((w=_.editor)!=null&&w.isEditable),init:u.value==="init"}],size:c.value.size,as:"div",onClick:f}),{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{modelValue:r.value,"onUpdate:modelValue":E[1]||(E[1]=g=>r.value=g),placement:u.value==="init"?"bottom":"top","show-arrow":""},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ro),{val:u.value==="init"?"":u.value,type:"image",onInput:b},null,8,["val"])]),default:e.withCtx(()=>{var g;return[u.value==="init"?(e.openBlock(),e.createBlock(e.unref(Pn),{key:0,icon:"image",placeholder:"Add an image"})):(e.openBlock(),e.createElementBlock("div",Zg,[e.unref(o)?(e.openBlock(),e.createBlock(e.unref(vo),e.mergeProps({key:0},n,{onAction:h}),{default:e.withCtx(()=>[e.createVNode(e.unref(pe),{icon:"subtitles",tooltip:"image.caption",onClick:p})]),_:1},16)):e.createCommentVNode("",!0),e.createElementVNode("img",e.mergeProps(c.value,{draggable:"true","data-drag-handle":""}),null,16),e.createElementVNode("div",{class:"caption",onClick:p},[(g=_.editor)!=null&&g.isEditable&&l.value?(e.openBlock(),e.createBlock(e.unref(ct),{key:0,ref_key:"captionInput",ref:s,class:"caption-input",modelValue:d.value,"onUpdate:modelValue":E[0]||(E[0]=C=>d.value=C),type:"text",placeholder:"Input caption",autosize:"",onBlur:m},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("span",Xg,e.toDisplayString(d.value),1))])]))]}),_:1},8,["modelValue","placement"]),e.createVNode(e.unref(wn),{modelValue:a.value,"onUpdate:modelValue":E[2]||(E[2]=g=>a.value=g),event:i.value},{default:e.withCtx(()=>[e.createVNode(e.unref(Mt),e.mergeProps(n,{onAction:h}),null,16)]),_:1},8,["modelValue","event"])]),_:1},16,["class","size"])}}}),Jg=Pl.extend({addNodeView(){return $.VueNodeViewRenderer(Qg)}}).configure({inline:!0});function eb(t){return new pt.Plugin({key:new pt.PluginKey("handleClickSelectLink"),props:{handleClick:(n,o,a)=>{const{schema:r,doc:i,tr:s}=n.state,l=xe.getMarkRange(i.resolve(o),r.marks.link);if(!l)return!1;const c=i.resolve(l.from),u=i.resolve(l.to),d=s.setSelection(new pt.TextSelection(c,u));return n.dispatch(d),!0}}})}const tb=va.extend({addProseMirrorPlugins(){var t;return[...((t=this.parent)==null?void 0:t.call(this))||[],eb({type:this.type})]}}).configure({openOnClick:!1}),nb=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:"o-paragraph-view"}),{default:e.withCtx(()=>[e.createVNode(e.unref($.NodeViewContent),{as:"p",style:e.normalizeStyle(`text-align: ${o.node.attrs.textAlign}`)},null,8,["style"])]),_:1},16))}}),ob=$l.extend({draggable:!1,addNodeView(){return $.VueNodeViewRenderer(nb,{stopEvent:()=>!1})}}),ab={class:"add"},rb=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,{tr:o}=j(),{isEditable:a,run:r}=te(),i=e.ref(!1);function s(){i.value=!0}function l(){c("tableSelectRow",{pos:n.getPos()})}function c(u,d={}){u==="tableDeleteRow"&&(i.value=!1),setTimeout(()=>{r(n.editor,u,d)},0)}return(u,d)=>(e.openBlock(),e.createBlock(e.unref($.NodeViewWrapper),e.mergeProps({class:"o-table-cell-view",as:"td"},u.node.attrs,{style:{background:u.node.attrs.background}}),{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(e.unref(ft),{key:0,modelValue:i.value,"onUpdate:modelValue":d[2]||(d[2]=p=>i.value=p),placement:"left-start","tippy-class":"o-row-popover",offset:[-6,26],"hide-click-outside":""},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ce),{icon:"select_all",placement:"left",tooltip:e.unref(o)("table.selectRow"),onClick:l},null,8,["tooltip"]),e.createVNode(e.unref(Ce),{icon:"delete",placement:"left",tooltip:e.unref(o)("table.removeRow"),onClick:d[1]||(d[1]=p=>c("tableDeleteRow"))},null,8,["tooltip"])]),default:e.withCtx(()=>[e.createElementVNode("section",{class:e.normalizeClass(["row-handler",{active:i.value}]),onClick:s},[e.createElementVNode("div",ab,[d[3]||(d[3]=e.createElementVNode("div",{class:"indicator"},[e.createElementVNode("svg",{width:"3",height:"3",viewBox:"0 0 3 3",fill:"none"},[e.createElementVNode("circle",{cx:"1.5",cy:"1.5",r:"1.5",fill:"#BBBFC4"})])],-1)),e.createVNode(e.unref(it),{icon:"add_circle",color:e.unref(X).blue,tooltip:e.unref(o)("table.addRow"),placement:"left",onClick:d[0]||(d[0]=e.withModifiers(p=>c("tableAddRow"),["stop"]))},null,8,["color","tooltip"])])],2)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref($.NodeViewContent))]),_:1},16,["style"]))}}),ib=Ht.TableCell.extend({addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),background:{default:""}}},addNodeView(){return $.VueNodeViewRenderer(rb,{stopEvent:()=>!1})}}),lb={class:"add"},sb={class:"add"},cb=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,{tr:o}=j(),{isEditable:a,run:r}=te(),i=e.ref(!1),s=e.ref(!1);function l(){setTimeout(()=>{i.value=!0},0)}function c(){s.value=!0}function u(){i.value=!1,p("tableSelectColumn",{pos:n.getPos()})}function d(){p("tableSelectRow",{pos:n.getPos()})}function p(m,f={}){m==="tableDeleteRow"?s.value=!1:m==="tableDeleteColumn"&&(i.value=!1),setTimeout(()=>{r(n.editor,m,f)},0)}return(m,f)=>(e.openBlock(),e.createBlock(e.unref($.NodeViewWrapper),e.mergeProps({class:"o-table-header-view",as:"th"},m.node.attrs,{style:{background:m.node.attrs.background}}),{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(ft),{modelValue:i.value,"onUpdate:modelValue":f[2]||(f[2]=h=>i.value=h),placement:"top","tippy-class":"o-column-popover",offset:[0,20],"hide-click-outside":""},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ce),{icon:"select_all",tooltip:e.unref(o)("table.selectColumn"),onClick:u},null,8,["tooltip"]),e.createVNode(e.unref(Ce),{icon:"delete",tooltip:e.unref(o)("table.removeColumn"),onClick:f[1]||(f[1]=h=>p("tableDeleteColumn"))},null,8,["tooltip"])]),default:e.withCtx(()=>[e.createElementVNode("section",{class:e.normalizeClass(["col-handler",{active:i.value}]),onClick:l},[e.createElementVNode("div",lb,[f[6]||(f[6]=e.createElementVNode("div",{class:"indicator"},[e.createElementVNode("svg",{width:"3",height:"3",viewBox:"0 0 3 3",fill:"none"},[e.createElementVNode("circle",{cx:"1.5",cy:"1.5",r:"1.5",fill:"#BBBFC4"})])],-1)),e.createVNode(e.unref(it),{icon:"add_circle",color:e.unref(X).blue,tooltip:e.unref(o)("table.addColumn"),onClick:f[0]||(f[0]=e.withModifiers(h=>p("tableAddColumn"),["stop"]))},null,8,["color","tooltip"])])],2)]),_:1},8,["modelValue"]),e.createVNode(e.unref(ft),{modelValue:s.value,"onUpdate:modelValue":f[5]||(f[5]=h=>s.value=h),placement:"left-start","tippy-class":"o-row-popover",offset:[-6,26],"hide-click-outside":""},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ce),{icon:"select_all",placement:"left",tooltip:e.unref(o)("table.selectRow"),onClick:d},null,8,["tooltip"]),e.createVNode(e.unref(Ce),{icon:"delete",placement:"left",tooltip:e.unref(o)("table.removeRow"),onClick:f[4]||(f[4]=h=>p("tableDeleteRow"))},null,8,["tooltip"])]),default:e.withCtx(()=>[e.createElementVNode("section",{class:e.normalizeClass(["row-handler",{active:s.value}]),onClick:c},[e.createElementVNode("div",sb,[f[7]||(f[7]=e.createElementVNode("div",{class:"indicator"},[e.createElementVNode("svg",{width:"3",height:"3",viewBox:"0 0 3 3",fill:"none"},[e.createElementVNode("circle",{cx:"1.5",cy:"1.5",r:"1.5",fill:"#BBBFC4"})])],-1)),e.createVNode(e.unref(it),{icon:"add_circle",color:e.unref(X).blue,tooltip:e.unref(o)("table.addRow"),placement:"left",onClick:f[3]||(f[3]=e.withModifiers(h=>p("tableAddRow"),["stop"]))},null,8,["color","tooltip"])])],2)]),_:1},8,["modelValue"])],64)):e.createCommentVNode("",!0),e.createVNode(e.unref($.NodeViewContent))]),_:1},16,["style"]))}}),db=Ht.TableHeader.extend({addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),background:{default:""}}},addNodeView(){return $.VueNodeViewRenderer(cb,{stopEvent:()=>!1})}}),ub=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,o=e.inject("sideNode",{value:!1}),a=e.ref(!1),r=e.computed(()=>{const{selection:s}=n.editor.view.state,l=s.from,c=n.getPos(),u=c+n.node.nodeSize;return l>=c&&l<=u});function i(s){a.value=s}return e.watch(r,s=>{console.log("isFocused",n.node.attrs),i(s)}),(s,l)=>(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-table-wrapper-view",{"side-node-enabled":e.unref(o)}]}),{default:e.withCtx(()=>[e.createVNode(e.unref($.NodeViewContent),{as:"table"})]),_:1},16,["class"]))}}),pb=Fl.TableWrapper.extend({addNodeView(){return $.VueNodeViewRenderer(ub,{stopEvent:()=>!1})}}),fb={key:1,class:"video-container"},mb={key:1},gb=e.defineComponent({__name:"view",props:$.nodeViewProps,setup(t){const n=t,{isEditable:o}=te(),a=e.ref(!1),r=e.ref({}),i=e.ref(null),s=e.ref(!1),l=e.ref(!1),c=e.computed({get(){return n.node.attrs.caption},set(_){n.updateAttributes({caption:_})}}),u=e.computed({get(){return n.node.attrs.src},set(_){n.updateAttributes({src:_})}});function d(_){switch(a.value=!1,_.value){case"replace":k(!0);break}}function p(){s.value=!0,setTimeout(()=>{var _;(_=i.value)==null||_.focus()},0)}function m(){s.value=!1}function f(){u.value==="init"&&k(!0)}function h(_){a.value=!0,r.value=_}function b(_){u.value=_,k(!1)}function k(_){l.value=_}return e.onMounted(()=>{k(u.value==="init")}),(_,E)=>{var w;return e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps(n,{class:["o-video-view",{readonly:!((w=_.editor)!=null&&w.isEditable),init:u.value==="init"}],as:"div",onContextmenu:e.withModifiers(h,["prevent"]),onClick:f}),{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{modelValue:l.value,"onUpdate:modelValue":E[1]||(E[1]=g=>l.value=g),placement:u.value==="init"?"bottom":"top"},{"popover-content":e.withCtx(()=>[e.createVNode(e.unref(Ro),{val:u.value==="init"?"":u.value,type:"video",onInput:b},null,8,["val"])]),default:e.withCtx(()=>{var g;return[u.value==="init"?(e.openBlock(),e.createBlock(e.unref(Pn),{key:0,icon:"videocam",placeholder:"Add a video"})):(e.openBlock(),e.createElementBlock("div",fb,[E[3]||(E[3]=e.createElementVNode("div",{class:"video-cover"},null,-1)),e.unref(o)?(e.openBlock(),e.createBlock(e.unref(vo),e.mergeProps({key:0},n,{onAction:d}),{default:e.withCtx(()=>[e.createVNode(e.unref(pe),{icon:"subtitles",tooltip:"image.caption",onClick:p})]),_:1},16)):e.createCommentVNode("",!0),e.createElementVNode("video",e.mergeProps(_.node.attrs,{draggable:"true","data-drag-handle":"",controls:""}),[e.createElementVNode("source",e.normalizeProps(e.guardReactiveProps(_.node.attrs)),null,16)],16),e.createElementVNode("div",{class:"caption",onClick:p},[(g=_.editor)!=null&&g.isEditable&&s.value?(e.openBlock(),e.createBlock(e.unref(ct),{key:0,ref_key:"captionInput",ref:i,class:"caption-input",modelValue:c.value,"onUpdate:modelValue":E[0]||(E[0]=C=>c.value=C),type:"text",placeholder:"Input caption",autosize:"",onBlur:m},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("span",mb,e.toDisplayString(c.value),1))])]))]}),_:1},8,["modelValue","placement"]),e.createVNode(e.unref(wn),{modelValue:a.value,"onUpdate:modelValue":E[2]||(E[2]=g=>a.value=g),event:r.value},{default:e.withCtx(()=>[e.createVNode(e.unref(Mt),e.mergeProps(n,{onAction:d}),null,16)]),_:1},8,["modelValue","event"])]),_:1},16,["class"])}}}),bb=Ul.Video.extend({addNodeView(){return $.VueNodeViewRenderer(gb)}}),hb=["Highlight","BackgroundColor","Color","Focus","FontFamily","Subscript","Superscript","Table","TaskItem","TaskList","TextAlign","TextStyle","Typography","UniqueID","OHorizontalRule","OSelectionDecoration"],_b=["Highlight","BackgroundColor","BlockMath","Bold","BulletList","Color","Code","CodeBlockLowlight","Emoji","Focus","FontFamily","HorizontalRule","Image","InlineMath","Italic","Link","ListItem","Markdown","Mention","OrderedList","Strike","Subscript","Superscript","Table","TaskItem","TaskList","TextAlign","TextStyle","Typography","Underline","UniqueID"],kb=["OAiBlock","OBlockMath","OBlockquote","OCallout","OCharCommand","OCodeBlock","OColon","OColorHighlighter","ODetails","OFocus","OHeading","OHorizontalRule","OImage","OInlinePlaceholder","OLink","OParagraph","OSelectionDecoration","OShortcut","OSlash","OSlashZh","OTableWrapper","OTaskItem","OVideo"],yb=[..._b,...kb],wb={key:0},Eb=e.defineComponent({__name:"OBubbleMenu",props:{editor:{type:xe.Editor},menu:{type:Array,default:function(){return[]}},tableToolbar:{type:Array,default:function(){return[]}},menuClass:{type:String,default:""}},setup(t){const n=t,{tr:o}=j(),{theme:a}=jt(),r=e.ref(!1),i=e.ref(!1),s=e.ref(!1),l=e.ref(!1),c=e.ref({offset:10,placement:"bottom-start",onShow:()=>{r.value=!1,i.value=!1,s.value=!1},onHide:()=>{s.value=!1}});function u(){r.value=!0}function d(w){w==="ai"&&(i.value=!0)}function p(){s.value=!0}function m(w){const{schema:g}=n.editor,C=g.marks.link;if(!C||!w)return!1;const{$from:N,$to:M}=w;return!!xe.getMarkRange(N,C)}function f({editor:w,element:g,view:C,state:N,oldState:M,from:P,to:I}){var v;const{doc:H,selection:ne}=N,{empty:Q}=ne,R=!H.textBetween(P,I).length&&xe.isTextSelection(N.selection);if(l.value=n.editor.isActive("inlineMath"),E.value||n.editor.isActive("inlineMath"))return!0;if(!C.hasFocus()||Q||s.value||R&&w.isActive("link")&&!w.isActive("image"))return!1;const L=["image"],W=["toc","video","model-viewer"],A=ne.node,G=(v=A==null?void 0:A.type)==null?void 0:v.name;return!(w.isActive("codeBlock")||W.indexOf(G)>=0||G&&!L.includes(G))}const h=e.computed(()=>{if(n.editor){const{state:w}=n.editor,{tr:g}=w,{selection:C}=g;return m(C)}else return!1}),b=e.computed(()=>{var w,g;return!r.value&&!((w=n.editor)!=null&&w.isActive("image"))&&(h.value||((g=n.editor)==null?void 0:g.isActive("inlineMath")))}),k=e.computed(()=>E.value||l.value),_=e.computed(()=>{var g,C,N;let w=n.menu;return r.value||((g=n.editor)!=null&&g.isActive("image")?w=h.value?$r:Pr:(C=n.editor)!=null&&C.isActive("table")?w=Ur:h.value?w=Vr:(N=n.editor)!=null&&N.isActive("inlineMath")&&(w=Lr)),w.length>0?w:Ir}),E=e.computed(()=>{const w=on.InlinePlaceholderKey.getState(n.editor.state);return!!(w!=null&&w.active)});return e.onMounted(()=>{r.value=!1}),(w,g)=>t.editor?(e.openBlock(),e.createElementBlock("section",wb,[e.createVNode(e.unref(Ra.BubbleMenu),{editor:t.editor,"should-show":f,options:c.value},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(e.unref(Ci),{key:0,editor:t.editor,onConfirm:p},null,8,["editor"])):k.value?(e.openBlock(),e.createBlock(e.unref(Ni),{key:1,editor:t.editor},null,8,["editor"])):(e.openBlock(),e.createElementBlock("section",{key:2,class:e.normalizeClass(["tiptap-toolbar",t.menuClass])},[b.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(pe),{icon:"arrow_back",tooltip:e.unref(o)("link.back"),onClick:u},null,8,["tooltip"]),e.createVNode(e.unref(Ie),{vertical:""})],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(C,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:N},[C==="separator"?(e.openBlock(),e.createBlock(e.unref(Ie),{key:0,vertical:""})):typeof C=="string"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(so)(C)),{key:1,name:C,editor:t.editor,onClick:M=>d(C)},null,8,["name","editor","onClick"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C),{key:2,editor:t.editor},null,8,["editor"]))],64))),128))],2))]),_:1},8,["editor","options"])])):e.createCommentVNode("",!0)}}),Cb={key:0},Nb=e.defineComponent({__name:"OFloatingMenu",props:{editor:{type:$.Editor},menu:{type:Array,default:function(){return[]}},tableToolbar:{type:Array,default:function(){return[]}},menuClass:{type:String,default:""}},setup(t){const n=t,o=e.ref(!1),a=e.ref({placement:"right",offset:168});function r(){o.value=!0}function i(d){const{schema:p}=n.editor,m=p.marks.link;if(!m||!d)return!1;const{$from:f,$to:h}=d;return!!xe.getMarkRange(f,m)}const s=e.computed(()=>{if(n.editor){const{state:d}=n.editor,{tr:p}=d,{selection:m}=p;return i(m)}else return!1}),l=e.computed(()=>!o.value&&s.value),c=e.computed(()=>{let d=n.menu;return d.length>0?d:zr}),u=e.computed(()=>{const d=on.InlinePlaceholderKey.getState(n.editor.state);return!!(d!=null&&d.active)});return(d,p)=>t.editor&&!u.value?(e.openBlock(),e.createElementBlock("section",Cb,[e.createVNode(e.unref(Ra.FloatingMenu),{editor:t.editor,options:a.value},{default:e.withCtx(()=>[e.createElementVNode("section",{class:e.normalizeClass(["tiptap-toolbar",t.menuClass])},[l.value?(e.openBlock(),e.createBlock(e.unref(pe),{key:0,icon:"arrow_back",onClick:r})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(m,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f},[m==="separator"?(e.openBlock(),e.createBlock(e.unref(Ie),{key:0,vertical:""})):typeof m=="string"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(so)(m)),{key:1,name:m,editor:t.editor},null,8,["name","editor"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m),{key:2,editor:t.editor},null,8,["editor"]))],64))),128))],2)]),_:1},8,["editor","options"])])):e.createCommentVNode("",!0)}});function ga(t,n){const o=n==null?void 0:n.posAtCoords(t);if(!o)return;let a=_o(o.pos,n);if(a!==n.dom){for(;a&&a.parentNode&&a.parentNode!==n.dom;)a=a.parentNode;if(a)return a}}function _o(t,n){return n.nodeDOM(t)||n.domAtPos(t).node}function ba(t,n){const o=ga(t,n);if(o&&o.nodeType===1){const a=n.docView,r=a.nearestDesc(o,!0);return!r||r===a?null:r.posBefore}return null}function xb(t,n){let o,a;const r=n.resolve(t.from).node().type.spec.group==="blockContent",i=n.resolve(t.to).node().type.spec.group==="blockContent",s=Math.min(t.$anchor.depth,t.$head.depth);if(r&&i){const l=t.$from.start(s-1),c=t.$to.end(s-1);o=n.resolve(l-1).pos,a=n.resolve(c+1).pos}else o=t.from,a=t.to;return{from:o,to:a}}function Sb(t,n){const o=ba(t,n.view);return o&&o>=0?{node:n.state.doc.nodeAt(o),pos:o}:{node:null,pos:o}}const ko=new pt.PluginKey("sideMenu");class Tb{constructor(){Ne(this,"hovered",!1);Ne(this,"coords",{left:0,top:0});Ne(this,"className","")}init(n){return this}apply({tr:n,oldState:o,newState:a}){return n.docChanged?this:this}setHover(n,o,a=""){this.hovered=n,this.coords=o,this.className=a}}class Ob{constructor({editor:n,element:o,view:a,tippyOptions:r={},updateDelay:i=250}){Ne(this,"editor");Ne(this,"element");Ne(this,"view");Ne(this,"preventHide",!1);Ne(this,"tippy");Ne(this,"tippyOptions");Ne(this,"updateDelay");Ne(this,"updateDebounceTimer");Ne(this,"mousedownHandler",()=>{this.preventHide=!0});Ne(this,"onDragStart",n=>{this.hide()});Ne(this,"blurHandler",({event:n})=>{var o;n!=null&&n.relatedTarget&&((o=this.element.parentNode)!=null&&o.contains(n.relatedTarget))||this.hide()});Ne(this,"tippyBlurHandler",n=>{this.blurHandler({event:n})});Ne(this,"handleDebouncedUpdate",(n,o)=>{const a=!(o!=null&&o.selection.eq(n.state.selection)),r=!(o!=null&&o.doc.eq(n.state.doc));!a&&!r||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(n,a,r,o)},this.updateDelay))});Ne(this,"updateHandler",(n,o,a,r)=>{var d,p;const{state:i,composing:s}=n,{coords:l}=ko.getState(i),c=ga(l,n),u=ba(l,n);!c||u<=0||(this.createTooltip(),(p=this.tippy)==null||p.setProps({getReferenceClientRect:((d=this.tippyOptions)==null?void 0:d.getReferenceClientRect)||(()=>c.getBoundingClientRect())}),this.show())});this.editor=n,this.element=o,this.view=a,this.updateDelay=i,this.view.dom.addEventListener("dragstart",this.onDragStart),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:n}=this.editor.options,o=n instanceof Element?n:"mount"in n?n.mount:null,a=!!(o!=null&&o.parentElement);this.tippy||!a||(this.tippy=ht(o,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"left",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(n,o){const{state:a}=n,r=!(o!=null&&o.selection.eq(n.state.selection)),i=!(o!=null&&o.doc.eq(n.state.doc));this.updateHandler(n,r,i,o)}show(){var n;(n=this.tippy)==null||n.show()}hide(){var n;(n=this.tippy)==null||n.hide()}destroy(){var n,o;(n=this.tippy)!=null&&n.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(o=this.tippy)==null||o.destroy(),this.view.dom.removeEventListener("dragstart",this.onDragStart)}}const Ab=(t,n)=>{if(!t.dataTransfer)return;const o=n.view,a=o.dom.getBoundingClientRect(),r={left:a.left+a.width/2,top:t.clientY},i=ba(r,o);if(i===null)return;const s=o.state.selection,l=o.state.doc;xb(s,l),o.dispatch(o.state.tr.setSelection(pt.NodeSelection.create(o.state.doc,i))),vb(o,i);const c=o.state.selection.content(),{dom:u,text:d}=o.serializeForClipboard(c);t.dataTransfer.clearData(),t.dataTransfer.setData("text/html",u.innerHTML),t.dataTransfer.setData("text/plain",d),t.dataTransfer.effectAllowed="move",t.dataTransfer.setDragImage(Qt,0,0),o.dragging={slice:c,move:!0}},Bb=(t,n)=>{Xi()};let Qt;function vb(t,n,o=n){const a=t.domAtPos(n).node.cloneNode(!0),r=t.domAtPos(n).node,i=(p,m)=>Array.prototype.indexOf.call(p.children,m),s=p=>{let m=p,f=m.parentElement;for(;f;){if(f===t.dom)return m;m=f,f=m.parentElement}return m};let l=-1,c=-1;n===o?(l=i(r,s(_o(n,t))),c=l):(l=i(r,s(_o(n+1,t))),c=i(r,s(_o(o-1,t))));for(let p=r.childElementCount-1;p>=0;p--)(p>l||p<c)&&a.removeChild(a.children[p]);Xi(),Qt=a;const d=t.dom.className.split(" ").filter(p=>p!=="ProseMirror"&&p!=="yiitap-root"&&p!=="yiitap-editor").join(" ");Qt.className+=" yiitap-dragging-preview "+d,document.body.appendChild(Qt)}function Xi(){Qt!==void 0&&(document.body.removeChild(Qt),Qt=void 0)}class Mb{constructor(n){Ne(this,"options");Ne(this,"plugin");Ne(this,"sideMenuView");const o=new Tb;this.options=n,this.plugin=new pt.Plugin({key:ko,props:{handleDOMEvents:{mouseover(a,r){const i={left:r.clientX,top:r.clientY},s=ga(i,a),l=(s==null?void 0:s.className)||"",c=o.className;l.indexOf("o-table-wrapper-view")>=0&&c.indexOf("o-table-wrapper-view")>=0||(o.setHover(!0,i,l),a.dispatch(a.state.tr.setMeta(ko,o)))}}},state:{init(a,r){return o.init(r)},apply(a,r,i,s){return o.apply({tr:a,oldState:i,newState:s})}},view:a=>(this.sideMenuView=new Ob({view:a,...n}),this.sideMenuView)})}dragstart(n){Ab(n,this.options.editor)}dragend(n){Bb(n,this.options.editor)}}const Rb=e.defineComponent({name:"SideMenu",props:{pluginKey:{type:[String,Object],default:"sideMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})}},setup(t,{expose:n,slots:o}){const a=e.ref(null),r=e.ref(),i=l=>{var c;(c=r.value)==null||c.dragstart(l)},s=l=>{var c;(c=r.value)==null||c.dragend(l)};return e.onMounted(()=>{const{pluginKey:l,editor:c,updateDelay:u,tippyOptions:d}=t;r.value=new Mb({updateDelay:u,editor:c,element:a.value,pluginKey:l,tippyOptions:d}),c.registerPlugin(r.value.plugin)}),e.onBeforeUnmount(()=>{const{pluginKey:l,editor:c}=t;c.unregisterPlugin(l)}),n({...t,dragstart:i,dragend:s}),()=>{var l;return e.h("div",{ref:a},(l=o.default)==null?void 0:l.call(o))}}}),Db={key:0,class:"o-side-menu"},Ib={class:"container"},Lb=e.defineComponent({__name:"OSideMenu",props:{editor:{type:xe.Editor,required:!0},menuClass:{type:String,default:""},add:{type:String,default:"menu"}},setup(t){const n=t,o=e.ref(null),a=e.ref(null),r=e.ref(0),i=e.computed(()=>({arrow:!1,duration:100,placement:"left"})),s=e.computed(()=>({editor:n.editor,node:a.value,decorations:[],selected:!1,extension:{},getPos:()=>r.value,pos:r.value,updateAttributes:c,deleteNode:l,view:{},innerDecorations:[],HTMLAttributes:{},add:n.add}));function l(){var h,b;const m=r.value,f=m+((h=a.value)==null?void 0:h.nodeSize);(b=n.editor)==null||b.commands.deleteRange({from:m,to:f})}function c(m){var f;(f=n.editor)==null||f.commands.command(({tr:h})=>{var b;return h.setNodeMarkup(r.value,void 0,{...(b=a.value)==null?void 0:b.attrs,...m}),!0})}function u({editor:m,transaction:f}){let h={left:0,top:0};const b=ko.getState(n.editor.view.state);if(b){h=b.coords;const k=Sb(h,m);k.node&&k.pos>0&&(a.value=k.node,r.value=k.pos)}}function d(m){var f;(f=o.value)==null||f.dragstart(m)}function p(m){var f;(f=o.value)==null||f.dragend(m)}return e.onMounted(()=>{var m;(m=n.editor)==null||m.on("transaction",u)}),(m,f)=>t.editor?(e.openBlock(),e.createElementBlock("section",Db,[e.createVNode(e.unref(Rb),{ref_key:"menu",ref:o,class:e.normalizeClass(["side-menu",t.menuClass]),editor:t.editor,"tippy-options":i.value},{default:e.withCtx(()=>[e.createElementVNode("section",Ib,[a.value?(e.openBlock(),e.createBlock(e.unref(bi),e.normalizeProps(e.mergeProps({key:0},s.value)),null,16)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createBlock(e.unref(hi),e.mergeProps({key:1},s.value,{onDragstart:d,onDragend:p}),null,16)):e.createCommentVNode("",!0)])]),_:1},8,["class","editor","tippy-options"])])):e.createCommentVNode("",!0)}}),Vb={props:{items:{type:Array,required:!0},command:{type:Function,required:!0},editor:{type:Object},range:{type:Object}},setup(){const{locale:t,tr:n}=j(),{run:o}=te();return{locale:t,tr:n,run:o}},data(){return{view:"main"}},components:{OEmojiSelect:zn},methods:{onSelect(t){this.editor.commands.deleteRange(this.range),this.editor.commands.insertContent(t.emoji),this.editor.chain().focus()},onKeyDown({event:t}){return!1}}},ha=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},Pb={class:"o-colon-view"};function $b(t,n,o,a,r,i){const s=e.resolveComponent("o-emoji-select");return e.openBlock(),e.createElementBlock("section",Pb,[e.createVNode(s,{items:o.items,onSelect:i.onSelect},null,8,["items","onSelect"])])}const Fb=ha(Vb,[["render",$b]]),Ub={items:({query:t})=>yn.filterEmojiGroups(t),render:()=>{let t,n;return{onStart:o=>{t=new $.VueRenderer(Fb,{props:o,editor:o.editor}),o.clientRect&&(n=ht("body",{getReferenceClientRect:o.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,onShow(a){a.popper.classList.add("emoji-tippy")}}))},onUpdate(o){t.updateProps(o),n[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown(o){var a;return o.event.key==="Escape"?(n[0].hide(),t.destroy(),!0):(a=t.ref)==null?void 0:a.onKeyDown(o)},onExit(){n[0].destroy(),t.destroy()}}}},zb={props:{items:{type:Array,required:!0},command:{type:Function,required:!0},editor:{type:xe.Editor},range:{type:Object}},setup(){const{locale:t,tr:n}=j(),{onCommand:o,run:a}=te();return{locale:t,tr:n,onCommand:o,run:a}},data(){return{view:"main",selectedIndex:0}},components:{ODivider:Ie,OIcon:V,OList:Fe,OListItem:Pe},watch:{items(){this.selectedIndex=0}},methods:{onClick(t){switch(t.value){default:this.runCommand(t);break}return!0},runCommand(t){const n=this.editor.chain().focus().deleteRange(this.range),o=this.editor.commands;["blockMath","codeBlock","content","details","diagram","emoji","inlineMath","taskList"].includes(t.value)?(o.deleteRange(this.range),this.run(this.editor,t.value,t.options)):this.onCommand(o,n,t.value,t.options)},onKeyDown({event:t}){return t.key==="ArrowUp"?(this.upHandler(),!0):t.key==="ArrowDown"?(this.downHandler(),!0):t.key==="Enter"?(this.enterHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length},enterHandler(){this.selectItem(this.selectedIndex)},selectItem(t){const n=this.items[t];n&&this.onClick(n)},setEmoji(t){this.onClick({value:"content",options:{content:t}})}},computed:{basicBlocks(){return rn.slice(1)}},mounted(){this.selectedIndex=0}},Hb={key:0,class:"view-main"},Gb={class:"group o-tips"},qb={class:"o-tips"},Kb={key:1,class:"item"},Wb={key:1,class:"view-emoji"},jb={key:2,class:"view-emoji"};function Yb(t,n,o,a,r,i){const s=e.resolveComponent("o-divider"),l=e.resolveComponent("o-icon"),c=e.resolveComponent("o-list-item"),u=e.resolveComponent("o-list");return e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["o-slash-view o-shadow-3 o-menu o-scroll",`view-${r.view}`])},[r.view==="main"?(e.openBlock(),e.createElementBlock("section",Hb,[e.createVNode(u,{hoverable:"",clickable:""},{default:e.withCtx(()=>[o.items.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.items,(d,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:p},[d.group?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p>0?(e.openBlock(),e.createBlock(s,{key:0})):e.createCommentVNode("",!0),e.createElementVNode("div",Gb,e.toDisplayString(a.tr(d.group)),1)],64)):e.createCommentVNode("",!0),e.createVNode(c,{class:e.normalizeClass(["item",{"is-active":p===r.selectedIndex}]),clickable:"",onClick:m=>i.onClick(d)},{prefix:e.withCtx(()=>[e.createVNode(l,{name:d.icon,color:d.color},null,8,["name","color"])]),suffix:e.withCtx(()=>[e.createElementVNode("span",qb,e.toDisplayString(d.tips),1)]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(a.tr(d.label)),1)]),_:2},1032,["class","onClick"])],64))),128)):(e.openBlock(),e.createElementBlock("div",Kb,"No result"))]),_:1})])):r.view==="emoji"?(e.openBlock(),e.createElementBlock("section",Wb)):r.view==="ai"?(e.openBlock(),e.createElementBlock("section",jb)):e.createCommentVNode("",!0)],2)}const Zb=ha(zb,[["render",Yb]]),Qi={items:({query:t})=>Fn.filter(n=>{var o;return n.value.toLowerCase().includes(t.toLowerCase())||((o=n.keywords)==null?void 0:o.toLowerCase().includes(t.toLowerCase()))}),render:()=>{let t,n;return{onStart:o=>{t=new $.VueRenderer(Zb,{props:o,editor:o.editor}),o.clientRect&&(n=ht("body",{getReferenceClientRect:o.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,onShow:a=>{a.popper.classList.add("slash-tippy")}}))},onUpdate(o){t.updateProps(o),n[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown(o){var a;return o.event.key==="Escape"?(n[0].hide(),t.destroy(),!0):(a=t.ref)==null?void 0:a.onKeyDown(o)},onExit(){n[0].destroy(),t.destroy()}}}},Xb={props:{items:{type:Array,required:!0},command:{type:Function,required:!0},editor:{type:Object,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:t}){return t.key==="ArrowUp"?(this.upHandler(),!0):t.key==="ArrowDown"?(this.downHandler(),!0):t.key==="Enter"?(this.enterHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length},enterHandler(){this.selectItem(this.selectedIndex)},selectItem(t){const n=this.items[t];n&&this.command({name:n.name})}}},Qb={class:"dropdown-menu"},Jb=["onClick"],eh=["src"];function th(t,n,o,a,r,i){return e.openBlock(),e.createElementBlock("div",Qb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,(s,l)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass({"is-selected":l===r.selectedIndex}),key:l,onClick:c=>i.selectItem(l)},[s.fallbackImage?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.fallbackImage,align:"absmiddle"},null,8,eh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s.emoji),1)],64)),e.createTextVNode(" :"+e.toDisplayString(s.name)+": ",1)],10,Jb))),128))])}const nh=ha(Xb,[["render",th]]),oh={items:({editor:t,query:n})=>t.storage.emoji.emojis.filter(({shortcodes:o,tags:a})=>o.find(r=>r.startsWith(n.toLowerCase()))||a.find(r=>r.startsWith(n.toLowerCase()))).slice(0,10),render:()=>{let t;function n(o){if(!t||!t.element)return;la({getBoundingClientRect(){return o}},t.element,{placement:"bottom-start"}).then(r=>{Object.assign(t.element.style,{left:`${r.x}px`,top:`${r.y}px`,position:r.strategy==="fixed"?"fixed":"absolute"})})}return{onStart:o=>{t=new $.VueRenderer(nh,{props:o,editor:o.editor}),document.body.appendChild(t.element),n(o.clientRect())},onUpdate(o){t.updateProps(o),n(o.clientRect())},onKeyDown(o){var a;return o.event.key==="Escape"?(document.body.removeChild(t.element),t.destroy(),!0):(a=t.ref)==null?void 0:a.onKeyDown(o)},onExit(){document.body.contains(t.element)&&document.body.removeChild(t.element),t.destroy()}}}},ah={BackgroundColor:Vn.BackgroundColor.configure({types:["textStyle"]}),BlockMath:So.BlockMath,Color:Vn.Color,Emoji:Ba.configure({emojis:Ba.gitHubEmojis,enableEmoticons:!0,suggestion:oh}),Focus:ul.Focus,FontFamily:Vn.FontFamily,Highlight:ml.configure({multicolor:!0}),Image:gl,InlineMath:So.InlineMath,Link:va,Markdown:fl.Markdown.configure({indentation:{style:"space",size:2},markedOptions:{gfm:!0,breaks:!0,pedantic:!1}}),Subscript:bl,Superscript:hl,TaskItem:Sl,TaskList:pl.TaskList.configure({itemTypeName:"taskItem"}),TextAlign:_l.configure({types:["heading","paragraph"]}),TextStyle:Vn.TextStyle,Underline:yl,Typography:kl,OAiBlock:$f,OBlockMath:Gf,OColon:To.ColonCommand.configure({suggestion:Ub}),OSlash:To.SlashCommand.configure({suggestion:Qi}),OSlashZh:To.SlashZhCommand.configure({suggestion:Qi}),OBlockquote:Kf.configure({triggerCharacters:['"',"“","”"]}),OCallout:Xf,OCodeBlock:zg,OColorHighlighter:El,OHeading:Kg,OHorizontalRule:Yg,OImage:Jg,OInlinePlaceholder:Cl,OLink:tb.configure({openOnClick:!1}),OParagraph:ob,OSelectionDecoration:Nl,UniqueID:wl.configure({attributeName:"id",types:["blockquote","codeBlock","callout","heading","image","paragraph","table-wrapper","video"]}),OVideo:bb};class rh{constructor(n){return ah[n]}}const ih=[Gg.configure({persist:!0,HTMLAttributes:{class:"details"}}),xo.DetailsContent,xo.DetailsSummary],lh=[pb,xl.configure({resizable:!0}),Ht.TableRow,db,ib];Ht.Table.configure({resizable:!0}),Ht.TableRow,Ht.TableHeader,Ht.TableCell;const sh=["data-theme"],Ji=e.defineComponent({name:"YiiEditor",__name:"YiiEditor",props:{content:{type:[String,Object],default:""},title:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},autofocus:{type:[String,Number,Boolean],default:!1},locale:{type:String,default:"en"},darkMode:{type:Boolean,default:!1},showMainMenu:{type:Boolean,default:!1},showBubbleMenu:{type:Boolean,default:!1},showFloatingMenu:{type:Boolean,default:!1},sideMenu:{type:Object,default:()=>({show:!0,add:"menu"})},showSideNode:{type:Boolean,default:!1},extensions:{type:Array,default:()=>[]},mainMenu:{type:Array,default:()=>[]},tableMenu:{type:Array,default:()=>[]},bubbleMenu:{type:Array,default:()=>[]},floatingMenu:{type:Array,default:()=>[]},pageView:{type:String,default:"page",validator:t=>["page","full"].includes(t)},aiOption:{type:Object,default:()=>{}},collab:{type:Object,default:()=>({enabled:!1,collaboration:null,collaborationCaret:null})}},emits:["create","transaction","update"],setup(t,{expose:n,emit:o}){const a=t,r=o,{tr:i}=j(),s=e.ref(!1),l=e.ref(!0),c=e.ref("en"),u=e.ref(!1),d=e.ref(),p=e.ref(!1);e.provide("darkMode",s),e.provide("isEditable",l),e.provide("locale",c),e.provide("sideNode",u),e.provide("aiOption",d);const m=e.computed(()=>E()),f=$.useEditor({editable:a.editable,content:a.content,autofocus:a.autofocus,extensions:m.value,onCreate:()=>{p.value=!0,r("create",f.value)},onUpdate:()=>{var C,N;if(!p.value)return;const w=(C=f.value)==null?void 0:C.getJSON(),g=(N=f.value)==null?void 0:N.getHTML();r("update",{json:w,html:g})},onTransaction:({editor:w,transaction:g})=>{r("transaction",{editor:w,transaction:g})}}),h=e.computed(()=>({editor:f.value,menu:a.mainMenu})),b=e.computed(()=>({editor:f.value,menu:a.bubbleMenu})),k=e.computed(()=>({editor:f.value,menu:a.floatingMenu})),_=e.computed(()=>({editor:f.value,add:a.sideMenu.add,menu:[]}));function E(){const w=[];a.title?w.push(Aa.extend({content:"heading block*"})):w.push(Aa),w.push(on.configure({placeholder:({editor:C,node:N,pos:M})=>{if(N.type.name==="heading"){const P=N.attrs.level;return M>0?`H${P}`:i("label.untitled")}else return N.type.name==="paragraph"?i("label.typeForCommands"):""}})),w.push(sl.configure({dropcursor:{width:5,color:"skyblue",class:"yiitap-dropcursor"},codeBlock:!1,document:!1,horizontalRule:!1,link:!1,blockquote:a.extensions.includes("OBlockquote")?!1:{},heading:a.extensions.includes("OHeading")?!1:{levels:[1,2,3,4,5]},paragraph:a.extensions.includes("OParagraph")?!1:{},trailingNode:{node:"paragraph",notAfter:["paragraph","heading"]},undoRedo:a.collab.enabled?!1:{depth:100,newGroupDelay:500}}));const g=hb.concat(a.extensions);for(const C of g)if(typeof C=="string"){if(!yb.includes(C))continue;switch(C){case"ODetails":w.push(...ih);break;case"Table":w.push(...lh);break;default:try{const N=new rh(C);w.push(N)}catch(N){console.error(N.message)}break}}else w.push(C);return a.collab.enabled&&w.push(cl.configure(a.collab.collaboration),dl.configure(a.collab.collaborationCaret)),g.includes("OShortcut")&&(g.includes("Markdown")?w.push(Ma.configure({markdown:{enabled:!0}})):w.push(Ma)),w}return e.watch(()=>a.darkMode,w=>{s.value=w}),e.watch(()=>a.locale,w=>{c.value=w}),e.watch(()=>a.aiOption,w=>{d.value=w},{deep:!0}),e.watch(()=>a.editable,w=>{var g;(g=f.value)==null||g.setEditable(w),l.value=w}),e.onBeforeMount(()=>{l.value=a.editable,d.value=a.aiOption,s.value=a.darkMode,c.value=a.locale,u.value=!a.sideMenu.show&&a.showSideNode}),n({editor:f,darkMode:s,locale:c}),(w,g)=>{var C,N,M;return e.openBlock(),e.createElementBlock("main",{class:"yiitap yiitap-editor","data-theme":s.value?"dark":""},[t.showMainMenu?(e.openBlock(),e.createBlock(wi,e.mergeProps({key:0},h.value,{class:"desktop-only"}),{left:e.withCtx(()=>[e.renderSlot(w.$slots,"toolbar-left")]),right:e.withCtx(()=>[e.renderSlot(w.$slots,"toolbar-right")]),_:3},16)):e.createCommentVNode("",!0),(C=e.unref(f))!=null&&C.isEditable&&t.showBubbleMenu?(e.openBlock(),e.createBlock(Eb,e.normalizeProps(e.mergeProps({key:1},b.value)),null,16)):e.createCommentVNode("",!0),(N=e.unref(f))!=null&&N.isEditable&&t.showFloatingMenu?(e.openBlock(),e.createBlock(Nb,e.normalizeProps(e.mergeProps({key:2},k.value)),null,16)):e.createCommentVNode("",!0),(M=e.unref(f))!=null&&M.isEditable&&t.sideMenu.show?(e.openBlock(),e.createBlock(Lb,e.normalizeProps(e.mergeProps({key:3},_.value)),null,16)):e.createCommentVNode("",!0),e.createVNode(e.unref($.EditorContent),{class:e.normalizeClass(["editor-content",`${t.pageView}-view`]),editor:e.unref(f)},null,8,["class","editor"])],8,sh)}}}),ch={installed:!1,spellcheck:!0,install(t){this.installed=!0,t.component("YiiEditor",Ji)}};return O.AddNode=bi,O.AdvancedBlocks=za,O.AiBlocks=Ga,O.AiProviders=Mr,O.AskAiBlocks=Ha,O.BasicBlocks=rn,O.BlockMenus=Un,O.Blocks=Fn,O.Color=X,O.ColorList=ns,O.CommonBlocks=sn,O.DefaultBubble=Ir,O.DefaultEmbedServices=Ad,O.DefaultFloating=zr,O.DefaultMenu=Rr,O.DragNode=hi,O.ImageBubble=Pr,O.ImageLinkBubble=$r,O.InlineMathBubble=Lr,O.LinkBubble=Vr,O.MoreBubble=Fr,O.OAiMenu=Ci,O.OBlockList=$n,O.OBlockListItem=Ao,O.OBlockMenu=Mt,O.OBlockPlaceholder=Pn,O.OBlockPopover=ft,O.OBlockToolbar=vo,O.OBtn=Se,O.OBtnGroup=_i,O.OCalloutColorBoard=Mo,O.OCalloutColorDropdown=gs,O.OCheckbox=ca,O.OCodeBlockDownloadDropdown=Fa,O.OCodeBlockViewDropdown=Ua,O.OColorBoard=Gt,O.OCommandBtn=Ce,O.OCommonBtn=it,O.OContextMenu=wn,O.ODialog=ki,O.ODivider=Ie,O.ODocToc=Os,O.OEmojiSelect=zn,O.OFloatingToast=Du,O.OIcon=V,O.OInlineMathMenu=Ni,O.OInput=ct,O.OLanguageDropdown=qa,O.OList=Fe,O.OListItem=Pe,O.OMainMenu=wi,O.OMediaInput=Ro,O.OMenubarBtn=pe,O.OMetaInput=Gn,O.ONodeView=Ze,O.OPopover=ce,O.OTableCellBackground=Kr,O.OTableGrid=qr,O.OTextColorBoard=ea,O.OTextarea=yi,O.OToast=sa,O.OTooltip=nt,O.Prompts=Qo,O.StyleBlocks=ln,O.TableBubble=Ur,O.TableFloating=Od,O.TableMenu=Dr,O.TableWrapperBubble=Td,O.YiiEditor=Ji,O.YiiEditorPlugin=ch,O.getProviderProp=Xo,O.useAi=Jo,O.useCommon=Hr,O.useI18n=j,O.useNodeView=Gr,O.useTheme=jt,O.useTiptap=te,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),O})({},Vue,CustomtiptapVue3,CustomtiptapStarterKit,CustomtiptapExtensionDocument,CustomtiptapExtensionCollaboration,CustomtiptapExtensionCollaborationCaret,CustomtiptapExtensions,CustomtiptapExtensionDetails,CustomtiptapExtensionList,CustomtiptapExtensionMathematics,CustomtiptapExtensionTable,CustomtiptapExtensionTextStyle,CustomtiptapMarkdown,CustomtiptapExtensionHighlight,CustomtiptapExtensionEmoji,CustomtiptapExtensionImage,CustomtiptapExtensionLink,CustomtiptapExtensionMention,CustomtiptapExtensionSubscript,CustomtiptapExtensionSuperscript,CustomtiptapExtensionTextAlign,CustomtiptapExtensionTypography,CustomtiptapExtensionUnderline,CustomtiptapExtensionUniqueId,CustomyiitapExtensionColorHighlighter,CustomyiitapExtensionFocus,CustomyiitapExtensionInlinePlaceholder,CustomyiitapExtensionPlaceholder,CustomyiitapExtensionSelectionDecoration,CustomyiitapExtensionShortcut,CustomyiitapExtensionTable,CustomyiitapExtensionTaskItem,CustomyiitapExtensionCharCommand,CustomyiitapExtensionAiBlock,CustomtiptapCore,Katex,OpenAI,MarkdownIt,CustomtiptapExtensionBlockquote,CustomtiptapPmState,CustomyiitapExtensionCallout,CustomtiptapExtensionCodeBlockLowlight,Mermaid,CustommermaidJsLayoutElk,CustomyiitapCore,CustomtiptapExtensionHeading,CustomtiptapExtensionHorizontalRule,CustomyiitapExtensionImage,CustomtiptapExtensionParagraph,CustomyiitapExtensionTableWrapper,CustomyiitapExtensionVideo,CustomyiitapUtilEmoji,CustomtiptapVue3Menus,CustomtiptapPmModel);
69
69
  //# sourceMappingURL=index.js.map