@ahzoo/sus 2.0.1 → 2.0.2
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/t/index.js +5 -5
- package/dist/t/index.umd.cjs +1 -1
- package/dist/t/style.css +1 -1
- package/package.json +1 -1
package/dist/t/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as et, shallowRef as Uh, onMounted as Dr, onBeforeUnmount as ls, h as an, ref as qe, getCurrentInstance as Wh, watchEffect as Kh, nextTick as qh, unref as Ye, markRaw as Jh, customRef as Gh, createElementBlock as Z, openBlock as X, Fragment as as, renderList as Go, createElementVNode as T, Teleport as Uc, withDirectives as Te, createBlock as ho, createCommentVNode as ke, withModifiers as Yh, withKeys as Xh, vModelText as ai, vShow as We, withCtx as $n, reactive as sa, toDisplayString as rt, createVNode as bt, createStaticVNode as Bs, createTextVNode as po, normalizeClass as Qh } from "vue";
|
|
2
2
|
import { createLowlight as Zh } from "lowlight";
|
|
3
|
-
import {
|
|
3
|
+
import { OuOToolTip as Kr, OuOCheckBox as ep } from "@ahzoo/ouo";
|
|
4
4
|
function Ie(n) {
|
|
5
5
|
this.content = n;
|
|
6
6
|
}
|
|
@@ -19539,7 +19539,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19539
19539
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19540
19540
|
viewBox: "0 0 24 24"
|
|
19541
19541
|
}, [...P[5] || (P[5] = [
|
|
19542
|
-
Bs('<g fill="none" data-v-
|
|
19542
|
+
Bs('<g fill="none" data-v-978fa2fc><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M9 16c.85.63 1.885 1 3 1s2.15-.37 3-1" data-v-978fa2fc></path><path fill="currentColor" d="M16 10.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5s.448-1.5 1-1.5s1 .672 1 1.5" data-v-978fa2fc></path><ellipse cx="9" cy="10.5" fill="currentColor" rx="1" ry="1.5" data-v-978fa2fc></ellipse><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 3.338A9.95 9.95 0 0 1 12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12c0-1.821.487-3.53 1.338-5" data-v-978fa2fc></path></g>', 1)
|
|
19543
19543
|
])]))
|
|
19544
19544
|
])) : ke("", !0),
|
|
19545
19545
|
n.toolBar?.image ? (X(), Z("div", hk, [
|
|
@@ -19552,7 +19552,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19552
19552
|
name: "image",
|
|
19553
19553
|
accept: "image/*"
|
|
19554
19554
|
}, null, 544),
|
|
19555
|
-
P[6] || (P[6] = Bs('<label for="upload-input" data-v-
|
|
19555
|
+
P[6] || (P[6] = Bs('<label for="upload-input" data-v-978fa2fc><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-978fa2fc><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5" data-v-978fa2fc><path d="m2 12.5l1.752-1.533a2.3 2.3 0 0 1 3.14.105l4.29 4.29a2 2 0 0 0 2.564.222l.299-.21a3 3 0 0 1 3.731.225L21 18.5m-6-13h3.5m0 0H22m-3.5 0V9m0-3.5V2" data-v-978fa2fc></path><path d="M22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12c0-1.128 0-2.122.02-3M12 2C7.286 2 4.929 2 3.464 3.464c-.424.425-.726.925-.94 1.536" data-v-978fa2fc></path></g></svg></label>', 1))
|
|
19556
19556
|
])) : ke("", !0),
|
|
19557
19557
|
n.toolBar?.notify ? (X(), Z("div", {
|
|
19558
19558
|
key: 2,
|
|
@@ -19646,14 +19646,14 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19646
19646
|
onClick: (Se) => V(te),
|
|
19647
19647
|
class: "mask"
|
|
19648
19648
|
}, [...P[10] || (P[10] = [
|
|
19649
|
-
Bs('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-
|
|
19649
|
+
Bs('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-978fa2fc><g fill="none" stroke="currentColor" stroke-width="1.5" data-v-978fa2fc><path stroke-linecap="round" d="M20.5 6h-17m6 5l.5 5m4.5-5l-.5 5" data-v-978fa2fc></path><path d="M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6" data-v-978fa2fc></path><path stroke-linecap="round" d="M18.374 15.4c-.177 2.654-.266 3.981-1.131 4.79s-2.195.81-4.856.81h-.774c-2.66 0-3.99 0-4.856-.81c-.865-.809-.953-2.136-1.13-4.79l-.46-6.9m13.666 0l-.2 3" data-v-978fa2fc></path></g></svg>', 1)
|
|
19650
19650
|
])], 8, bk)
|
|
19651
19651
|
]))), 128))
|
|
19652
19652
|
])
|
|
19653
19653
|
])
|
|
19654
19654
|
]));
|
|
19655
19655
|
}
|
|
19656
|
-
}), kk = /* @__PURE__ */ Dn(wk, [["__scopeId", "data-v-
|
|
19656
|
+
}), kk = /* @__PURE__ */ Dn(wk, [["__scopeId", "data-v-978fa2fc"]]);
|
|
19657
19657
|
function xk(n) {
|
|
19658
19658
|
const e = new Date(n), t = e.getFullYear(), r = e.getMonth() + 1, i = e.getDate(), s = /* @__PURE__ */ new Date(), o = s.getFullYear(), l = s.getMonth() + 1, a = s.getDate();
|
|
19659
19659
|
if (o === t && l == r) {
|
package/dist/t/index.umd.cjs
CHANGED
|
@@ -103,4 +103,4 @@ img.ProseMirror-separator {
|
|
|
103
103
|
2. Cannot start or end with "-"
|
|
104
104
|
3. "-" cannot repeat`);oe.customSchemes.push([n,e])}function y0(){oe.scanner=c0(oe.customSchemes);for(let n=0;n<oe.tokenQueue.length;n++)oe.tokenQueue[n][1]({scanner:oe.scanner});oe.parser=f0(oe.scanner.tokens);for(let n=0;n<oe.pluginQueue.length;n++)oe.pluginQueue[n][1]({scanner:oe.scanner,parser:oe.parser});return oe.initialized=!0,oe}function qo(n){return oe.initialized||y0(),h0(oe.parser.start,n,Hu(oe.scanner.start,n))}qo.scan=Hu;function Ju(n,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new Wo(t),i=qo(n),s=[];for(let o=0;o<i.length;o++){const l=i[o];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}var Jo="[\0- -\u2029 ]",b0=new RegExp(Jo),w0=new RegExp(`${Jo}$`),k0=new RegExp(Jo,"g");function x0(n){return n.length===1?n[0].isLink:n.length===3&&n[1].isLink?["()","[]"].includes(n[0].value+n[2].value):!1}function S0(n){return new se({key:new le("autolink"),appendTransaction:(e,t,r)=>{const i=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=r,l=Yc(t.doc,[...e]);if(lu(l).forEach(({newRange:c})=>{const u=Hm(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1)d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(u.length){const h=r.doc.textBetween(c.from,c.to," "," ");if(!w0.test(h))return;d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")}if(d&&f){const h=f.split(b0).filter(Boolean);if(h.length<=0)return!1;const p=h[h.length-1],g=d.pos+f.lastIndexOf(p);if(!p)return!1;const y=qo(p).map(w=>w.toObject(n.defaultProtocol));if(!x0(y))return!1;y.filter(w=>w.isLink).map(w=>({...w,from:g+w.start+1,to:g+w.end+1})).filter(w=>r.schema.marks.code?!r.doc.rangeHasMark(w.from,w.to,r.schema.marks.code):!0).filter(w=>n.validate(w.value)).filter(w=>n.shouldAutoLink(w.value)).forEach(w=>{go(w.from,w.to,r.doc).some(k=>k.mark.type===n.type)||o.addMark(w.from,w.to,n.type.create({href:w.href}))})}}),!!o.steps.length)return o}})}function C0(n){return new se({key:new le("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{let u=r.target;const d=[];for(;u.nodeName!=="DIV";)d.push(u),u=u.parentNode;o=d.find(f=>f.nodeName==="A")}if(!o)return!1;const l=ou(e.state,n.type.name),a=(i=o?.href)!=null?i:l.href,c=(s=o?.target)!=null?s:l.target;return n.enableClickSelection&&n.editor.commands.extendMarkRange(n.type.name),o&&a?(window.open(a,c),!0):!1}}})}function E0(n){return new se({key:new le("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:i}=e,{selection:s}=i,{empty:o}=s;if(o)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const a=Ju(l,{defaultProtocol:n.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!a?!1:n.editor.commands.setMark(n.type,{href:a.href})}}})}function kn(n,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&t.push(i)}),!n||n.replace(k0,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Gu=gn.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){qu(n);return}qu(n.scheme,n.optionalSlashes)})},onDestroy(){g0()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!kn(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>!!n}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{const e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!kn(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!kn(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",ce(this.options.HTMLAttributes,n),0]:["a",ce(this.options.HTMLAttributes,{...n,href:""}),0]},addCommands(){return{setLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!kn(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{const{href:t}=n||{};return t&&!this.options.isAllowedUri(t,{defaultValidate:r=>!!kn(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[yn({find:n=>{const e=[];if(n){const{protocols:t,defaultProtocol:r}=this.options,i=Ju(n).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:o=>!!kn(o,t),protocols:t,defaultProtocol:r}));i.length&&i.forEach(s=>e.push({text:s.value,data:{href:s.href},index:s.start}))}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(S0({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!kn(i,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&n.push(C0({type:this.type,editor:this.editor,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&n.push(E0({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),n}}),M0=Gu,v0=Object.defineProperty,T0=(n,e)=>{for(var t in e)v0(n,t,{get:e[t],enumerable:!0})},O0="listItem",Yu="textStyle",Xu=/^\s*([-+*])\s$/,Qu=$e.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",ce(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(O0,this.editor.getAttributes(Yu)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=_n({find:Xu,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=_n({find:Xu,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Yu),editor:this.editor})),[n]}}),Zu=$e.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ce(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),N0={};T0(N0,{findListItemPos:()=>Er,getNextListDepth:()=>Go,handleBackspace:()=>Yo,handleDelete:()=>Xo,hasListBefore:()=>ed,hasListItemAfter:()=>A0,hasListItemBefore:()=>td,listItemHasSubList:()=>nd,nextListIsDeeper:()=>rd,nextListIsHigher:()=>id});var Er=(n,e)=>{const{$from:t}=e.selection,r=be(n,e.schema);let i=null,s=t.depth,o=t.pos,l=null;for(;s>0&&l===null;)i=t.node(s),i.type===r?l=s:(s-=1,o-=1);return l===null?null:{$pos:e.doc.resolve(o),depth:l}},Go=(n,e)=>{const t=Er(n,e);if(!t)return!1;const[,r]=Ym(e,n,t.$pos.pos+4);return r},ed=(n,e,t)=>{const{$anchor:r}=n.selection,i=Math.max(0,r.pos-2),s=n.doc.resolve(i).node();return!(!s||!t.includes(s.type.name))},td=(n,e)=>{var t;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((t=i.nodeBefore)==null?void 0:t.type.name)!==n)},nd=(n,e,t)=>{if(!t)return!1;const r=be(n,e.schema);let i=!1;return t.descendants(s=>{s.type===r&&(i=!0)}),i},Yo=(n,e,t)=>{if(n.commands.undoInputRule())return!0;if(n.state.selection.from!==n.state.selection.to)return!1;if(!Gt(n.state,e)&&ed(n.state,e,t)){const{$anchor:l}=n.state.selection,a=n.state.doc.resolve(l.before()-1),c=[];a.node().descendants((f,h)=>{f.type.name===e&&c.push({node:f,pos:h})});const u=c.at(-1);if(!u)return!1;const d=n.state.doc.resolve(a.start()+u.pos+1);return n.chain().cut({from:l.start()-1,to:l.end()+1},d.end()).joinForward().run()}if(!Gt(n.state,e)||!eg(n.state))return!1;const r=Er(e,n.state);if(!r)return!1;const s=n.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=nd(e,n.state,s);return td(e,n.state)&&!o?n.commands.joinItemBackward():n.chain().liftListItem(e).run()},rd=(n,e)=>{const t=Go(n,e),r=Er(n,e);return!r||!t?!1:t>r.depth},id=(n,e)=>{const t=Go(n,e),r=Er(n,e);return!r||!t?!1:t<r.depth},Xo=(n,e)=>{if(!Gt(n.state,e)||!Zm(n.state,e))return!1;const{selection:t}=n.state,{$from:r,$to:i}=t;return!t.empty&&r.sameParent(i)?!1:rd(e,n.state)?n.chain().focus(n.state.selection.from+4).lift(e).joinBackward().run():id(e,n.state)?n.chain().joinForward().joinBackward().run():n.commands.joinItemForward()},A0=(n,e)=>{var t;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((t=i.nodeAfter)==null?void 0:t.type.name)!==n)},sd=ue.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t})=>{n.state.schema.nodes[t]!==void 0&&Xo(n,t)&&(e=!0)}),e},"Mod-Delete":({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t})=>{n.state.schema.nodes[t]!==void 0&&Xo(n,t)&&(e=!0)}),e},Backspace:({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t,wrapperNames:r})=>{n.state.schema.nodes[t]!==void 0&&Yo(n,t,r)&&(e=!0)}),e},"Mod-Backspace":({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t,wrapperNames:r})=>{n.state.schema.nodes[t]!==void 0&&Yo(n,t,r)&&(e=!0)}),e}}}}),R0="listItem",od="textStyle",ld=/^(\d+)\.\s$/,ad=$e.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1},type:{default:null,parseHTML:n=>n.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",ce(this.options.HTMLAttributes,t),0]:["ol",ce(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(R0,this.editor.getAttributes(od)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=_n({find:ld,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=_n({find:ld,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(od)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),D0=/^\s*(\[([( |x])?\])\s$/,I0=$e.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:n=>{const e=n.getAttribute("data-checked");return e===""||e==="true"},renderHTML:n=>({"data-checked":n.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:n,HTMLAttributes:e}){return["li",ce(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:n.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const n={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...n,Tab:()=>this.editor.commands.sinkListItem(this.name)}:n},addNodeView(){return({node:n,HTMLAttributes:e,getPos:t,editor:r})=>{const i=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),c=u=>{var d,f;l.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,u,l.checked))||`Task item checkbox for ${u.textContent||"empty task item"}`};return c(n),s.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",u=>u.preventDefault()),l.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:d}=u.target;r.isEditable&&typeof t=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{const h=t();if(typeof h!="number")return!1;const p=f.doc.nodeAt(h);return f.setNodeMarkup(h,void 0,{...p?.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(n,d)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,d])=>{i.setAttribute(u,d)}),i.dataset.checked=n.attrs.checked,l.checked=n.attrs.checked,s.append(l,o),i.append(s,a),Object.entries(e).forEach(([u,d])=>{i.setAttribute(u,d)}),{dom:i,contentDOM:a,update:u=>u.type!==this.type?!1:(i.dataset.checked=u.attrs.checked,l.checked=u.attrs.checked,c(u),!0)}}},addInputRules(){return[_n({find:D0,type:this.type,getAttributes:n=>({checked:n[n.length-1]==="x"})})]}}),P0=$e.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:n}){return["ul",ce(this.options.HTMLAttributes,n,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});ue.create({name:"listKit",addExtensions(){const n=[];return this.options.bulletList!==!1&&n.push(Qu.configure(this.options.bulletList)),this.options.listItem!==!1&&n.push(Zu.configure(this.options.listItem)),this.options.listKeymap!==!1&&n.push(sd.configure(this.options.listKeymap)),this.options.orderedList!==!1&&n.push(ad.configure(this.options.orderedList)),this.options.taskItem!==!1&&n.push(I0.configure(this.options.taskItem)),this.options.taskList!==!1&&n.push(P0.configure(this.options.taskList)),n}});var L0=$e.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",ce(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),B0=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,_0=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,V0=gn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",ce(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Bn({find:B0,type:this.type})]},addPasteRules(){return[yn({find:_0,type:this.type})]}}),$0=$e.create({name:"text",group:"inline"}),z0=gn.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",ce(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function H0(n={}){return new se({view(e){return new F0(e,n)}})}class F0{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r,i=this.editorView.dom,s=i.getBoundingClientRect(),o=s.width/i.offsetWidth,l=s.height/i.offsetHeight;if(t){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let h=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(h){let p=h.getBoundingClientRect(),g=d?p.bottom:p.top;d&&f&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let y=this.width/2*l;r={left:p.left,right:p.right,top:g-y,bottom:g+y}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let c,u;if(!a||a==document.body&&getComputedStyle(a).position=="static")c=-pageXOffset,u=-pageYOffset;else{let d=a.getBoundingClientRect(),f=d.width/a.offsetWidth,h=d.height/a.offsetHeight;c=d.left-a.scrollLeft*f,u=d.top-a.scrollTop*h}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-u)/l+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!s){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=aa(this.editorView.state.doc,o,this.editorView.dragging.slice);l!=null&&(o=l)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class fe extends H{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return fe.valid(r)?new fe(r):H.near(r)}content(){return N.empty}eq(e){return e instanceof fe&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new fe(e.resolve(t.pos))}getBookmark(){return new Qo(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!j0(e)||!U0(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&fe.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let l=e.node(o);if(t>0?e.indexAfter(o)<l.childCount:e.index(o)>0){s=l.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=t;let a=e.doc.resolve(i);if(fe.valid(a))return a}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!V.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*t),r=!1;continue e}break}s=o,i+=t;let l=e.doc.resolve(i);if(fe.valid(l))return l}return null}}}fe.prototype.visible=!1,fe.findFrom=fe.findGapCursorFrom,H.jsonID("gapcursor",fe);class Qo{constructor(e){this.pos=e}map(e){return new Qo(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return fe.valid(t)?new fe(t):H.near(t)}}function j0(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),r=n.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function U0(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),r=n.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function W0(){return new se({props:{decorations:G0,createSelectionBetween(n,e,t){return e.pos==t.pos&&fe.valid(t)?new fe(t):null},handleClick:q0,handleKeyDown:K0,handleDOMEvents:{beforeinput:J0}}})}const K0=to({ArrowLeft:Ui("horiz",-1),ArrowRight:Ui("horiz",1),ArrowUp:Ui("vert",-1),ArrowDown:Ui("vert",1)});function Ui(n,e){const t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let o=r.selection,l=e>0?o.$to:o.$from,a=o.empty;if(o instanceof F){if(!s.endOfTextblock(t)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=fe.findGapCursorFrom(l,e,a);return c?(i&&i(r.tr.setSelection(new fe(c))),!0):!1}}function q0(n,e,t){if(!n||!n.editable)return!1;let r=n.state.doc.resolve(e);if(!fe.valid(r))return!1;let i=n.posAtCoords({left:t.clientX,top:t.clientY});return i&&i.inside>-1&&V.isSelectable(n.state.doc.nodeAt(i.inside))?!1:(n.dispatch(n.state.tr.setSelection(new fe(r))),!0)}function J0(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof fe))return!1;let{$from:t}=n.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!r)return!1;let i=S.empty;for(let o=r.length-1;o>=0;o--)i=S.from(r[o].createAndFill(null,i));let s=n.state.tr.replace(t.pos,t.pos,new N(i,0,0));return s.setSelection(F.near(s.doc.resolve(t.pos+1))),n.dispatch(s),!1}function G0(n){if(!(n.selection instanceof fe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ae.create(n.doc,[Ie.widget(n.selection.head,e,{key:"gapcursor"})])}var Wi=200,Ee=function(){};Ee.prototype.append=function(e){return e.length?(e=Ee.from(e),!this.length&&e||e.length<Wi&&this.leafAppend(e)||this.length<Wi&&e.leafPrepend(this)||this.appendInner(e)):this},Ee.prototype.prepend=function(e){return e.length?Ee.from(e).append(this):this},Ee.prototype.appendInner=function(e){return new Y0(this,e)},Ee.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Ee.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Ee.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Ee.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)},Ee.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},t,r),i},Ee.from=function(e){return e instanceof Ee?e:e&&e.length?new cd(e):Ee.empty};var cd=(function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,l){for(var a=s;a<o;a++)if(i(this.values[a],l+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,o,l){for(var a=s-1;a>=o;a--)if(i(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Wi)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Wi)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e})(Ee);Ee.empty=new cd([]);var Y0=(function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,o){var l=this.left.length;if(i<l&&this.left.forEachInner(r,i,Math.min(s,l),o)===!1||s>l&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,s)-l,o+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,o){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(s,l)-l,o+l)===!1||s<l&&this.left.forEachInvertedInner(r,Math.min(i,l),s,o)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(Ee);const X0=500;class nt{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;t&&(i=this.remapping(r,this.items.length),s=i.maps.length);let o=e.tr,l,a,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){i||(i=this.remapping(r,f+1),s=i.maps.length),s--,u.push(d);return}if(i){u.push(new dt(d.map));let h=d.step.map(i.slice(s)),p;h&&o.maybeStep(h).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],c.push(new dt(p,void 0,void 0,c.length+u.length))),s--,p&&i.appendMap(p,s)}else o.maybeStep(d.step);if(d.selection)return l=i?d.selection.map(i.slice(s)):d.selection,a=new nt(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:o,selection:l}}addTransform(e,t,r,i){let s=[],o=this.eventCount,l=this.items,a=!i&&l.length?l.get(l.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new dt(e.mapping.maps[u],d,t),h;(h=a&&a.merge(f))&&(f=h,u?s.pop():l=l.slice(0,l.length-1)),s.push(f),t&&(o++,t=void 0),i||(a=f)}let c=o-r.depth;return c>Z0&&(l=Q0(l,c),o-=c),new nt(l.append(s),o)}remapping(e,t){let r=new Qn;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},e,t),r}addMaps(e){return this.eventCount==0?this:new nt(this.items.append(e.map(t=>new dt(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),s=e.mapping,o=e.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},i);let a=t;this.items.forEach(f=>{let h=s.getMirror(--a);if(h==null)return;o=Math.min(o,h);let p=s.maps[h];if(f.step){let g=e.steps[h].invert(e.docs[h]),y=f.selection&&f.selection.map(s.slice(a+1,h));y&&l++,r.push(new dt(p,g,y))}else r.push(new dt(p))},i);let c=[];for(let f=t;f<o;f++)c.push(new dt(s.maps[f]));let u=this.items.slice(0,i).append(c).append(r),d=new nt(u,l);return d.emptyItemCount()>X0&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],s=0;return this.items.forEach((o,l)=>{if(l>=e)i.push(o),o.selection&&s++;else if(o.step){let a=o.step.map(t.slice(r)),c=a&&a.getMap();if(r--,c&&t.appendMap(c,r),a){let u=o.selection&&o.selection.map(t.slice(r));u&&s++;let d=new dt(c.invert(),a,u),f,h=i.length-1;(f=i.length&&i[h].merge(d))?i[h]=f:i.push(d)}}else o.map&&r--},this.items.length,0),new nt(Ee.from(i.reverse()),s)}}nt.empty=new nt(Ee.empty,0);function Q0(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}class dt{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new dt(t.getMap().invert(),t,this.selection)}}}class Zt{constructor(e,t,r,i,s){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const Z0=20;function e1(n,e,t,r){let i=t.getMeta(xn),s;if(i)return i.historyState;t.getMeta(r1)&&(n=new Zt(n.done,n.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(o&&o.getMeta(xn))return o.getMeta(xn).redo?new Zt(n.done.addTransform(t,void 0,r,Ki(e)),n.undone,ud(t.mapping.maps),n.prevTime,n.prevComposition):new Zt(n.done,n.undone.addTransform(t,void 0,r,Ki(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),a=n.prevTime==0||!o&&n.prevComposition!=l&&(n.prevTime<(t.time||0)-r.newGroupDelay||!t1(t,n.prevRanges)),c=o?Zo(n.prevRanges,t.mapping):ud(t.mapping.maps);return new Zt(n.done.addTransform(t,a?e.selection.getBookmark():void 0,r,Ki(e)),nt.empty,c,t.time,l??n.prevComposition)}else return(s=t.getMeta("rebased"))?new Zt(n.done.rebased(t,s),n.undone.rebased(t,s),Zo(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Zt(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),Zo(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function t1(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(t=!0)}),t}function ud(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,i,s,o)=>e.push(s,o));return e}function Zo(n,e){if(!n)return null;let t=[];for(let r=0;r<n.length;r+=2){let i=e.map(n[r],1),s=e.map(n[r+1],-1);i<=s&&t.push(i,s)}return t}function n1(n,e,t){let r=Ki(e),i=xn.get(e).spec.config,s=(t?n.undone:n.done).popEvent(e,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),l=(t?n.done:n.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),a=new Zt(t?l:s.remaining,t?s.remaining:l,null,0,-1);return s.transform.setSelection(o).setMeta(xn,{redo:t,historyState:a})}let el=!1,dd=null;function Ki(n){let e=n.plugins;if(dd!=e){el=!1,dd=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){el=!0;break}}return el}const xn=new le("history"),r1=new le("closeHistory");function i1(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new se({key:xn,state:{init(){return new Zt(nt.empty,nt.empty,null,0,-1)},apply(e,t,r){return e1(t,r,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,i=r=="historyUndo"?hd:r=="historyRedo"?pd:null;return i?(t.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function fd(n,e){return(t,r)=>{let i=xn.getState(t);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let s=n1(i,t,n);s&&r(e?s.scrollIntoView():s)}return!0}}const hd=fd(!1,!0),pd=fd(!0,!0);ue.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:n=>n.length,wordCounter:n=>n.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=n=>{const e=n?.node||this.editor.state.doc;if((n?.mode||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=n=>{const e=n?.node||this.editor.state.doc,t=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(t)}},addProseMirrorPlugins(){let n=!1;return[new se({key:new le("characterCount"),appendTransaction:(e,t,r)=>{if(n)return;const i=this.options.limit;if(i==null||i===0){n=!0;return}const s=this.storage.characters({node:r.doc});if(s>i){const o=s-i,l=0,a=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(l,a);return n=!0,c}n=!0},filterTransaction:(e,t)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,a=s-r,c=l-a,u=l;return e.deleteRange(c,u),!(this.storage.characters({node:e.doc})>r)}})]}});var s1=ue.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[H0(this.options)]}});ue.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new se({key:new le("focus"),props:{decorations:({doc:n,selection:e})=>{const{isEditable:t,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!t||!r)return ae.create(n,[]);let o=0;this.options.mode==="deepest"&&n.descendants((a,c)=>{if(a.isText)return;if(!(i>=c&&i<=c+a.nodeSize-1))return!1;o+=1});let l=0;return n.descendants((a,c)=>{if(a.isText||!(i>=c&&i<=c+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&o-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";s.push(Ie.node(c,c+a.nodeSize,{class:this.options.className}))}),ae.create(n,s)}}})]}});var o1=ue.create({name:"gapCursor",addProseMirrorPlugins(){return[W0()]},extendNodeSchema(n){var e;const t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=ee($(n,"allowGapCursor",t)))!=null?e:null}}}),l1=ue.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new se({key:new le("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!t)return null;const s=this.editor.isEmpty;return n.descendants((o,l)=>{const a=r>=l&&r<=l+o.nodeSize,c=!o.isLeaf&&si(o);if((a||!this.options.showOnlyCurrent)&&c){const u=[this.options.emptyNodeClass];s&&u.push(this.options.emptyEditorClass);const d=Ie.node(l,l+o.nodeSize,{class:u.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:l,hasAnchor:a}):this.options.placeholder});i.push(d)}return this.options.includeChildren}),ae.create(n,i)}}})]}});ue.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:n,options:e}=this;return[new se({key:new le("selection"),props:{decorations(t){return t.selection.empty||n.isFocused||!n.isEditable||fu(t.selection)||n.view.dragging?null:ae.create(t.doc,[Ie.inline(t.selection.from,t.selection.to,{class:e.className})])}}})]}});function md({types:n,node:e}){return e&&Array.isArray(n)&&n.includes(e.type)||e?.type===n}var a1=ue.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:[]}},addProseMirrorPlugins(){const n=new le(this.name),e=Object.entries(this.editor.schema.nodes).map(([,t])=>t).filter(t=>(this.options.notAfter||[]).concat(this.options.node).includes(t.name));return[new se({key:n,appendTransaction:(t,r,i)=>{const{doc:s,tr:o,schema:l}=i,a=n.getState(i),c=s.content.size,u=l.nodes[this.options.node];if(a)return o.insert(c,u.create())},state:{init:(t,r)=>{const i=r.tr.doc.lastChild;return!md({node:i,types:e})},apply:(t,r)=>{if(!t.docChanged)return r;const i=t.doc.lastChild;return!md({node:i,types:e})}}})]}}),c1=ue.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>hd(n,e),redo:()=>({state:n,dispatch:e})=>pd(n,e)}},addProseMirrorPlugins(){return[i1(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),u1=ue.create({name:"starterKit",addExtensions(){var n,e,t,r;const i=[];return this.options.bold!==!1&&i.push($y.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(Py.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(Qu.configure(this.options.bulletList)),this.options.code!==!1&&i.push(Fy.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(Du.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(Ky.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(s1.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(o1.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(qy.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(Jy.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(c1.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(Gy.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(e0.configure(this.options.italic)),this.options.listItem!==!1&&i.push(Zu.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(sd.configure((n=this.options)==null?void 0:n.listKeymap)),this.options.link!==!1&&i.push(Gu.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(ad.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(L0.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(V0.configure(this.options.strike)),this.options.text!==!1&&i.push($0.configure(this.options.text)),this.options.underline!==!1&&i.push(z0.configure((t=this.options)==null?void 0:t.underline)),this.options.trailingNode!==!1&&i.push(a1.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),d1=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,f1=$e.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",ce(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[Au({find:d1,type:this.type,getAttributes:n=>{const[,,e,t,r]=n;return{src:t,alt:e,title:r}}})]}}),h1=f1;function p1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var tl,gd;function m1(){if(gd)return tl;gd=1;function n(b){return b instanceof Map?b.clear=b.delete=b.set=function(){throw new Error("map is read-only")}:b instanceof Set&&(b.add=b.clear=b.delete=function(){throw new Error("set is read-only")}),Object.freeze(b),Object.getOwnPropertyNames(b).forEach(x=>{const O=b[x],q=typeof O;(q==="object"||q==="function")&&!Object.isFrozen(O)&&n(O)}),b}class e{constructor(x){x.data===void 0&&(x.data={}),this.data=x.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function t(b){return b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(b,...x){const O=Object.create(null);for(const q in b)O[q]=b[q];return x.forEach(function(q){for(const me in q)O[me]=q[me]}),O}const i="</span>",s=b=>!!b.scope,o=(b,{prefix:x})=>{if(b.startsWith("language:"))return b.replace("language:","language-");if(b.includes(".")){const O=b.split(".");return[`${x}${O.shift()}`,...O.map((q,me)=>`${q}${"_".repeat(me+1)}`)].join(" ")}return`${x}${b}`};class l{constructor(x,O){this.buffer="",this.classPrefix=O.classPrefix,x.walk(this)}addText(x){this.buffer+=t(x)}openNode(x){if(!s(x))return;const O=o(x.scope,{prefix:this.classPrefix});this.span(O)}closeNode(x){s(x)&&(this.buffer+=i)}value(){return this.buffer}span(x){this.buffer+=`<span class="${x}">`}}const a=(b={})=>{const x={children:[]};return Object.assign(x,b),x};class c{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(x){this.top.children.push(x)}openNode(x){const O=a({scope:x});this.add(O),this.stack.push(O)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(x){return this.constructor._walk(x,this.rootNode)}static _walk(x,O){return typeof O=="string"?x.addText(O):O.children&&(x.openNode(O),O.children.forEach(q=>this._walk(x,q)),x.closeNode(O)),x}static _collapse(x){typeof x!="string"&&x.children&&(x.children.every(O=>typeof O=="string")?x.children=[x.children.join("")]:x.children.forEach(O=>{c._collapse(O)}))}}class u extends c{constructor(x){super(),this.options=x}addText(x){x!==""&&this.add(x)}startScope(x){this.openNode(x)}endScope(){this.closeNode()}__addSublanguage(x,O){const q=x.root;O&&(q.scope=`language:${O}`),this.add(q)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(b){return b?typeof b=="string"?b:b.source:null}function f(b){return g("(?=",b,")")}function h(b){return g("(?:",b,")*")}function p(b){return g("(?:",b,")?")}function g(...b){return b.map(O=>d(O)).join("")}function y(b){const x=b[b.length-1];return typeof x=="object"&&x.constructor===Object?(b.splice(b.length-1,1),x):{}}function w(...b){return"("+(y(b).capture?"":"?:")+b.map(q=>d(q)).join("|")+")"}function k(b){return new RegExp(b.toString()+"|").exec("").length-1}function C(b,x){const O=b&&b.exec(x);return O&&O.index===0}const R=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function M(b,{joinWith:x}){let O=0;return b.map(q=>{O+=1;const me=O;let ge=d(q),L="";for(;ge.length>0;){const D=R.exec(ge);if(!D){L+=ge;break}L+=ge.substring(0,D.index),ge=ge.substring(D.index+D[0].length),D[0][0]==="\\"&&D[1]?L+="\\"+String(Number(D[1])+me):(L+=D[0],D[0]==="("&&O++)}return L}).map(q=>`(${q})`).join(x)}const I=/\b\B/,T="[a-zA-Z]\\w*",_="[a-zA-Z_]\\w*",W="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",K="\\b(0b[01]+)",P="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Q=(b={})=>{const x=/^#![ ]*\//;return b.binary&&(b.begin=g(x,/.*\b/,b.binary,/\b.*/)),r({scope:"meta",begin:x,end:/$/,relevance:0,"on:begin":(O,q)=>{O.index!==0&&q.ignoreMatch()}},b)},Z={begin:"\\\\[\\s\\S]",relevance:0},ke={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Z]},he={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Z]},pe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Me=function(b,x,O={}){const q=r({scope:"comment",begin:b,end:x,contains:[]},O);q.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const me=w("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return q.contains.push({begin:g(/[ ]+/,"(",me,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),q},yt=Me("//","$"),pl=Me("/\\*","\\*/"),Vw=Me("#","$"),$w={scope:"number",begin:W,relevance:0},zw={scope:"number",begin:j,relevance:0},Hw={scope:"number",begin:K,relevance:0},Fw={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Z,{begin:/\[/,end:/\]/,relevance:0,contains:[Z]}]},jw={scope:"title",begin:T,relevance:0},Uw={scope:"title",begin:_,relevance:0},Ww={begin:"\\.\\s*"+_,relevance:0};var ss=Object.freeze({__proto__:null,APOS_STRING_MODE:ke,BACKSLASH_ESCAPE:Z,BINARY_NUMBER_MODE:Hw,BINARY_NUMBER_RE:K,COMMENT:Me,C_BLOCK_COMMENT_MODE:pl,C_LINE_COMMENT_MODE:yt,C_NUMBER_MODE:zw,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(b){return Object.assign(b,{"on:begin":(x,O)=>{O.data._beginMatch=x[1]},"on:end":(x,O)=>{O.data._beginMatch!==x[1]&&O.ignoreMatch()}})},HASH_COMMENT_MODE:Vw,IDENT_RE:T,MATCH_NOTHING_RE:I,METHOD_GUARD:Ww,NUMBER_MODE:$w,NUMBER_RE:W,PHRASAL_WORDS_MODE:pe,QUOTE_STRING_MODE:he,REGEXP_MODE:Fw,RE_STARTERS_RE:P,SHEBANG:Q,TITLE_MODE:jw,UNDERSCORE_IDENT_RE:_,UNDERSCORE_TITLE_MODE:Uw});function Kw(b,x){b.input[b.index-1]==="."&&x.ignoreMatch()}function qw(b,x){b.className!==void 0&&(b.scope=b.className,delete b.className)}function Jw(b,x){x&&b.beginKeywords&&(b.begin="\\b("+b.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",b.__beforeBegin=Kw,b.keywords=b.keywords||b.beginKeywords,delete b.beginKeywords,b.relevance===void 0&&(b.relevance=0))}function Gw(b,x){Array.isArray(b.illegal)&&(b.illegal=w(...b.illegal))}function Yw(b,x){if(b.match){if(b.begin||b.end)throw new Error("begin & end are not supported with match");b.begin=b.match,delete b.match}}function Xw(b,x){b.relevance===void 0&&(b.relevance=1)}const Qw=(b,x)=>{if(!b.beforeMatch)return;if(b.starts)throw new Error("beforeMatch cannot be used with starts");const O=Object.assign({},b);Object.keys(b).forEach(q=>{delete b[q]}),b.keywords=O.keywords,b.begin=g(O.beforeMatch,f(O.begin)),b.starts={relevance:0,contains:[Object.assign(O,{endsParent:!0})]},b.relevance=0,delete O.beforeMatch},Zw=["of","and","for","in","not","or","if","then","parent","list","value"],ek="keyword";function pf(b,x,O=ek){const q=Object.create(null);return typeof b=="string"?me(O,b.split(" ")):Array.isArray(b)?me(O,b):Object.keys(b).forEach(function(ge){Object.assign(q,pf(b[ge],x,ge))}),q;function me(ge,L){x&&(L=L.map(D=>D.toLowerCase())),L.forEach(function(D){const U=D.split("|");q[U[0]]=[ge,tk(U[0],U[1])]})}}function tk(b,x){return x?Number(x):nk(b)?0:1}function nk(b){return Zw.includes(b.toLowerCase())}const mf={},Sn=b=>{console.error(b)},gf=(b,...x)=>{console.log(`WARN: ${b}`,...x)},Un=(b,x)=>{mf[`${b}/${x}`]||(console.log(`Deprecated as of ${b}. ${x}`),mf[`${b}/${x}`]=!0)},ls=new Error;function yf(b,x,{key:O}){let q=0;const me=b[O],ge={},L={};for(let D=1;D<=x.length;D++)L[D+q]=me[D],ge[D+q]=!0,q+=k(x[D-1]);b[O]=L,b[O]._emit=ge,b[O]._multi=!0}function rk(b){if(Array.isArray(b.begin)){if(b.skip||b.excludeBegin||b.returnBegin)throw Sn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ls;if(typeof b.beginScope!="object"||b.beginScope===null)throw Sn("beginScope must be object"),ls;yf(b,b.begin,{key:"beginScope"}),b.begin=M(b.begin,{joinWith:""})}}function ik(b){if(Array.isArray(b.end)){if(b.skip||b.excludeEnd||b.returnEnd)throw Sn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ls;if(typeof b.endScope!="object"||b.endScope===null)throw Sn("endScope must be object"),ls;yf(b,b.end,{key:"endScope"}),b.end=M(b.end,{joinWith:""})}}function sk(b){b.scope&&typeof b.scope=="object"&&b.scope!==null&&(b.beginScope=b.scope,delete b.scope)}function ok(b){sk(b),typeof b.beginScope=="string"&&(b.beginScope={_wrap:b.beginScope}),typeof b.endScope=="string"&&(b.endScope={_wrap:b.endScope}),rk(b),ik(b)}function lk(b){function x(L,D){return new RegExp(d(L),"m"+(b.case_insensitive?"i":"")+(b.unicodeRegex?"u":"")+(D?"g":""))}class O{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(D,U){U.position=this.position++,this.matchIndexes[this.matchAt]=U,this.regexes.push([U,D]),this.matchAt+=k(D)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const D=this.regexes.map(U=>U[1]);this.matcherRe=x(M(D,{joinWith:"|"}),!0),this.lastIndex=0}exec(D){this.matcherRe.lastIndex=this.lastIndex;const U=this.matcherRe.exec(D);if(!U)return null;const ve=U.findIndex((Tr,gl)=>gl>0&&Tr!==void 0),we=this.matchIndexes[ve];return U.splice(0,ve),Object.assign(U,we)}}class q{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(D){if(this.multiRegexes[D])return this.multiRegexes[D];const U=new O;return this.rules.slice(D).forEach(([ve,we])=>U.addRule(ve,we)),U.compile(),this.multiRegexes[D]=U,U}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(D,U){this.rules.push([D,U]),U.type==="begin"&&this.count++}exec(D){const U=this.getMatcher(this.regexIndex);U.lastIndex=this.lastIndex;let ve=U.exec(D);if(this.resumingScanAtSamePosition()&&!(ve&&ve.index===this.lastIndex)){const we=this.getMatcher(0);we.lastIndex=this.lastIndex+1,ve=we.exec(D)}return ve&&(this.regexIndex+=ve.position+1,this.regexIndex===this.count&&this.considerAll()),ve}}function me(L){const D=new q;return L.contains.forEach(U=>D.addRule(U.begin,{rule:U,type:"begin"})),L.terminatorEnd&&D.addRule(L.terminatorEnd,{type:"end"}),L.illegal&&D.addRule(L.illegal,{type:"illegal"}),D}function ge(L,D){const U=L;if(L.isCompiled)return U;[qw,Yw,ok,Qw].forEach(we=>we(L,D)),b.compilerExtensions.forEach(we=>we(L,D)),L.__beforeBegin=null,[Jw,Gw,Xw].forEach(we=>we(L,D)),L.isCompiled=!0;let ve=null;return typeof L.keywords=="object"&&L.keywords.$pattern&&(L.keywords=Object.assign({},L.keywords),ve=L.keywords.$pattern,delete L.keywords.$pattern),ve=ve||/\w+/,L.keywords&&(L.keywords=pf(L.keywords,b.case_insensitive)),U.keywordPatternRe=x(ve,!0),D&&(L.begin||(L.begin=/\B|\b/),U.beginRe=x(U.begin),!L.end&&!L.endsWithParent&&(L.end=/\B|\b/),L.end&&(U.endRe=x(U.end)),U.terminatorEnd=d(U.end)||"",L.endsWithParent&&D.terminatorEnd&&(U.terminatorEnd+=(L.end?"|":"")+D.terminatorEnd)),L.illegal&&(U.illegalRe=x(L.illegal)),L.contains||(L.contains=[]),L.contains=[].concat(...L.contains.map(function(we){return ak(we==="self"?L:we)})),L.contains.forEach(function(we){ge(we,U)}),L.starts&&ge(L.starts,D),U.matcher=me(U),U}if(b.compilerExtensions||(b.compilerExtensions=[]),b.contains&&b.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return b.classNameAliases=r(b.classNameAliases||{}),ge(b)}function bf(b){return b?b.endsWithParent||bf(b.starts):!1}function ak(b){return b.variants&&!b.cachedVariants&&(b.cachedVariants=b.variants.map(function(x){return r(b,{variants:null},x)})),b.cachedVariants?b.cachedVariants:bf(b)?r(b,{starts:b.starts?r(b.starts):null}):Object.isFrozen(b)?r(b):b}var ck="11.11.1";class uk extends Error{constructor(x,O){super(x),this.name="HTMLInjectionError",this.html=O}}const ml=t,wf=r,kf=Symbol("nomatch"),dk=7,xf=function(b){const x=Object.create(null),O=Object.create(null),q=[];let me=!0;const ge="Could not find the language '{}', did you forget to load/include a language module?",L={disableAutodetect:!0,name:"Plain text",contains:[]};let D={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:u};function U(v){return D.noHighlightRe.test(v)}function ve(v){let z=v.className+" ";z+=v.parentNode?v.parentNode.className:"";const X=D.languageDetectRe.exec(z);if(X){const re=tn(X[1]);return re||(gf(ge.replace("{}",X[1])),gf("Falling back to no-highlight mode for this block.",v)),re?X[1]:"no-highlight"}return z.split(/\s+/).find(re=>U(re)||tn(re))}function we(v,z,X){let re="",xe="";typeof z=="object"?(re=v,X=z.ignoreIllegals,xe=z.language):(Un("10.7.0","highlight(lang, code, ...args) has been deprecated."),Un("10.7.0",`Please use highlight(code, options) instead.
|
|
105
105
|
https://github.com/highlightjs/highlight.js/issues/2277`),xe=v,re=z),X===void 0&&(X=!0);const ot={code:re,language:xe};cs("before:highlight",ot);const nn=ot.result?ot.result:Tr(ot.language,ot.code,X);return nn.code=ot.code,cs("after:highlight",nn),nn}function Tr(v,z,X,re){const xe=Object.create(null);function ot(A,B){return A.keywords[B]}function nn(){if(!J.keywords){Ae.addText(ie);return}let A=0;J.keywordPatternRe.lastIndex=0;let B=J.keywordPatternRe.exec(ie),Y="";for(;B;){Y+=ie.substring(A,B.index);const te=wt.case_insensitive?B[0].toLowerCase():B[0],Le=ot(J,te);if(Le){const[It,Ok]=Le;if(Ae.addText(Y),Y="",xe[te]=(xe[te]||0)+1,xe[te]<=dk&&(fs+=Ok),It.startsWith("_"))Y+=B[0];else{const Nk=wt.classNameAliases[It]||It;bt(B[0],Nk)}}else Y+=B[0];A=J.keywordPatternRe.lastIndex,B=J.keywordPatternRe.exec(ie)}Y+=ie.substring(A),Ae.addText(Y)}function us(){if(ie==="")return;let A=null;if(typeof J.subLanguage=="string"){if(!x[J.subLanguage]){Ae.addText(ie);return}A=Tr(J.subLanguage,ie,!0,Nf[J.subLanguage]),Nf[J.subLanguage]=A._top}else A=yl(ie,J.subLanguage.length?J.subLanguage:null);J.relevance>0&&(fs+=A.relevance),Ae.__addSublanguage(A._emitter,A.language)}function qe(){J.subLanguage!=null?us():nn(),ie=""}function bt(A,B){A!==""&&(Ae.startScope(B),Ae.addText(A),Ae.endScope())}function Mf(A,B){let Y=1;const te=B.length-1;for(;Y<=te;){if(!A._emit[Y]){Y++;continue}const Le=wt.classNameAliases[A[Y]]||A[Y],It=B[Y];Le?bt(It,Le):(ie=It,nn(),ie=""),Y++}}function vf(A,B){return A.scope&&typeof A.scope=="string"&&Ae.openNode(wt.classNameAliases[A.scope]||A.scope),A.beginScope&&(A.beginScope._wrap?(bt(ie,wt.classNameAliases[A.beginScope._wrap]||A.beginScope._wrap),ie=""):A.beginScope._multi&&(Mf(A.beginScope,B),ie="")),J=Object.create(A,{parent:{value:J}}),J}function Tf(A,B,Y){let te=C(A.endRe,Y);if(te){if(A["on:end"]){const Le=new e(A);A["on:end"](B,Le),Le.isMatchIgnored&&(te=!1)}if(te){for(;A.endsParent&&A.parent;)A=A.parent;return A}}if(A.endsWithParent)return Tf(A.parent,B,Y)}function Ck(A){return J.matcher.regexIndex===0?(ie+=A[0],1):(xl=!0,0)}function Ek(A){const B=A[0],Y=A.rule,te=new e(Y),Le=[Y.__beforeBegin,Y["on:begin"]];for(const It of Le)if(It&&(It(A,te),te.isMatchIgnored))return Ck(B);return Y.skip?ie+=B:(Y.excludeBegin&&(ie+=B),qe(),!Y.returnBegin&&!Y.excludeBegin&&(ie=B)),vf(Y,A),Y.returnBegin?0:B.length}function Mk(A){const B=A[0],Y=z.substring(A.index),te=Tf(J,A,Y);if(!te)return kf;const Le=J;J.endScope&&J.endScope._wrap?(qe(),bt(B,J.endScope._wrap)):J.endScope&&J.endScope._multi?(qe(),Mf(J.endScope,A)):Le.skip?ie+=B:(Le.returnEnd||Le.excludeEnd||(ie+=B),qe(),Le.excludeEnd&&(ie=B));do J.scope&&Ae.closeNode(),!J.skip&&!J.subLanguage&&(fs+=J.relevance),J=J.parent;while(J!==te.parent);return te.starts&&vf(te.starts,A),Le.returnEnd?0:B.length}function vk(){const A=[];for(let B=J;B!==wt;B=B.parent)B.scope&&A.unshift(B.scope);A.forEach(B=>Ae.openNode(B))}let ds={};function Of(A,B){const Y=B&&B[0];if(ie+=A,Y==null)return qe(),0;if(ds.type==="begin"&&B.type==="end"&&ds.index===B.index&&Y===""){if(ie+=z.slice(B.index,B.index+1),!me){const te=new Error(`0 width match regex (${v})`);throw te.languageName=v,te.badRule=ds.rule,te}return 1}if(ds=B,B.type==="begin")return Ek(B);if(B.type==="illegal"&&!X){const te=new Error('Illegal lexeme "'+Y+'" for mode "'+(J.scope||"<unnamed>")+'"');throw te.mode=J,te}else if(B.type==="end"){const te=Mk(B);if(te!==kf)return te}if(B.type==="illegal"&&Y==="")return ie+=`
|
|
106
|
-
`,1;if(kl>1e5&&kl>B.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ie+=Y,Y.length}const wt=tn(v);if(!wt)throw Sn(ge.replace("{}",v)),new Error('Unknown language: "'+v+'"');const Tk=lk(wt);let wl="",J=re||Tk;const Nf={},Ae=new D.__emitter(D);vk();let ie="",fs=0,Cn=0,kl=0,xl=!1;try{if(wt.__emitTokens)wt.__emitTokens(z,Ae);else{for(J.matcher.considerAll();;){kl++,xl?xl=!1:J.matcher.considerAll(),J.matcher.lastIndex=Cn;const A=J.matcher.exec(z);if(!A)break;const B=z.substring(Cn,A.index),Y=Of(B,A);Cn=A.index+Y}Of(z.substring(Cn))}return Ae.finalize(),wl=Ae.toHTML(),{language:v,value:wl,relevance:fs,illegal:!1,_emitter:Ae,_top:J}}catch(A){if(A.message&&A.message.includes("Illegal"))return{language:v,value:ml(z),illegal:!0,relevance:0,_illegalBy:{message:A.message,index:Cn,context:z.slice(Cn-100,Cn+100),mode:A.mode,resultSoFar:wl},_emitter:Ae};if(me)return{language:v,value:ml(z),illegal:!1,relevance:0,errorRaised:A,_emitter:Ae,_top:J};throw A}}function gl(v){const z={value:ml(v),illegal:!1,relevance:0,_top:L,_emitter:new D.__emitter(D)};return z._emitter.addText(v),z}function yl(v,z){z=z||D.languages||Object.keys(x);const X=gl(v),re=z.filter(tn).filter(Ef).map(qe=>Tr(qe,v,!1));re.unshift(X);const xe=re.sort((qe,bt)=>{if(qe.relevance!==bt.relevance)return bt.relevance-qe.relevance;if(qe.language&&bt.language){if(tn(qe.language).supersetOf===bt.language)return 1;if(tn(bt.language).supersetOf===qe.language)return-1}return 0}),[ot,nn]=xe,us=ot;return us.secondBest=nn,us}function fk(v,z,X){const re=z&&O[z]||X;v.classList.add("hljs"),v.classList.add(`language-${re}`)}function bl(v){let z=null;const X=ve(v);if(U(X))return;if(cs("before:highlightElement",{el:v,language:X}),v.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",v);return}if(v.children.length>0&&(D.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(v)),D.throwUnescapedHTML))throw new uk("One of your code blocks includes unescaped HTML.",v.innerHTML);z=v;const re=z.textContent,xe=X?we(re,{language:X,ignoreIllegals:!0}):yl(re);v.innerHTML=xe.value,v.dataset.highlighted="yes",fk(v,X,xe.language),v.result={language:xe.language,re:xe.relevance,relevance:xe.relevance},xe.secondBest&&(v.secondBest={language:xe.secondBest.language,relevance:xe.secondBest.relevance}),cs("after:highlightElement",{el:v,result:xe,text:re})}function hk(v){D=wf(D,v)}const pk=()=>{as(),Un("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function mk(){as(),Un("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Sf=!1;function as(){function v(){as()}if(document.readyState==="loading"){Sf||window.addEventListener("DOMContentLoaded",v,!1),Sf=!0;return}document.querySelectorAll(D.cssSelector).forEach(bl)}function gk(v,z){let X=null;try{X=z(b)}catch(re){if(Sn("Language definition for '{}' could not be registered.".replace("{}",v)),me)Sn(re);else throw re;X=L}X.name||(X.name=v),x[v]=X,X.rawDefinition=z.bind(null,b),X.aliases&&Cf(X.aliases,{languageName:v})}function yk(v){delete x[v];for(const z of Object.keys(O))O[z]===v&&delete O[z]}function bk(){return Object.keys(x)}function tn(v){return v=(v||"").toLowerCase(),x[v]||x[O[v]]}function Cf(v,{languageName:z}){typeof v=="string"&&(v=[v]),v.forEach(X=>{O[X.toLowerCase()]=z})}function Ef(v){const z=tn(v);return z&&!z.disableAutodetect}function wk(v){v["before:highlightBlock"]&&!v["before:highlightElement"]&&(v["before:highlightElement"]=z=>{v["before:highlightBlock"](Object.assign({block:z.el},z))}),v["after:highlightBlock"]&&!v["after:highlightElement"]&&(v["after:highlightElement"]=z=>{v["after:highlightBlock"](Object.assign({block:z.el},z))})}function kk(v){wk(v),q.push(v)}function xk(v){const z=q.indexOf(v);z!==-1&&q.splice(z,1)}function cs(v,z){const X=v;q.forEach(function(re){re[X]&&re[X](z)})}function Sk(v){return Un("10.7.0","highlightBlock will be removed entirely in v12.0"),Un("10.7.0","Please use highlightElement now."),bl(v)}Object.assign(b,{highlight:we,highlightAuto:yl,highlightAll:as,highlightElement:bl,highlightBlock:Sk,configure:hk,initHighlighting:pk,initHighlightingOnLoad:mk,registerLanguage:gk,unregisterLanguage:yk,listLanguages:bk,getLanguage:tn,registerAliases:Cf,autoDetection:Ef,inherit:wf,addPlugin:kk,removePlugin:xk}),b.debugMode=function(){me=!1},b.safeMode=function(){me=!0},b.versionString=ck,b.regex={concat:g,lookahead:f,either:w,optional:p,anyNumberOfTimes:h};for(const v in ss)typeof ss[v]=="object"&&n(ss[v]);return Object.assign(b,ss),b},Wn=xf({});return Wn.newInstance=()=>xf({}),tl=Wn,Wn.HighlightJS=Wn,Wn.default=Wn,tl}var g1=m1();const y1=p1(g1);function yd(n,e=[]){return n.flatMap(t=>{const r=[...e,...t.properties?t.properties.className:[]];return t.children?yd(t.children,r):{text:t.value,classes:r}})}function bd(n){return n.value||n.children||[]}function b1(n){return!!y1.getLanguage(n)}function wd({doc:n,name:e,lowlight:t,defaultLanguage:r}){const i=[];return ao(n,s=>s.type.name===e).forEach(s=>{var o;let l=s.pos+1;const a=s.node.attrs.language||r,c=t.listLanguages(),u=a&&(c.includes(a)||b1(a)||(o=t.registered)!=null&&o.call(t,a))?bd(t.highlight(a,s.node.textContent)):bd(t.highlightAuto(s.node.textContent));yd(u).forEach(d=>{const f=l+d.text.length;if(d.classes.length){const h=Ie.inline(l,f,{class:d.classes.join(" ")});i.push(h)}l=f})}),ae.create(n,i)}function w1(n){return typeof n=="function"}function k1({name:n,lowlight:e,defaultLanguage:t}){if(!["highlight","highlightAuto","listLanguages"].every(i=>w1(e[i])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new se({key:new le("lowlight"),state:{init:(i,{doc:s})=>wd({doc:s,name:n,lowlight:e,defaultLanguage:t}),apply:(i,s,o,l)=>{const a=o.selection.$head.parent.type.name,c=l.selection.$head.parent.type.name,u=ao(o.doc,f=>f.type.name===n),d=ao(l.doc,f=>f.type.name===n);return i.docChanged&&([a,c].includes(n)||d.length!==u.length||i.steps.some(f=>f.from!==void 0&&f.to!==void 0&&u.some(h=>h.pos>=f.from&&h.pos+h.node.nodeSize<=f.to)))?wd({doc:i.doc,name:n,lowlight:e,defaultLanguage:t}):s.map(i.mapping,i.doc)}},props:{decorations(i){return r.getState(i)}}});return r}var x1=Wy.extend({addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var n;return[...((n=this.parent)==null?void 0:n.call(this))||[],k1({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});const S1=Lf.createLowlight(),C1=x1.extend({addNodeView(){return({node:n,getPos:e,editor:t})=>{const r=document.createElement("div"),i=document.createElement("pre"),s=document.createElement("code"),o=document.createElement("select");o.setAttribute("class","code-select"),r.setAttribute("class","code-box");const l=["plaintext","java","javascript","html","shell"];return n.attrs.language&&l.lastIndexOf(n.attrs.language)<0&&l.push(n.attrs.language),l.forEach(a=>{const c=document.createElement("option");c.value=a,c.textContent=a,n.attrs.language===a&&(c.selected=!0),o.appendChild(c)}),o.addEventListener("change",a=>{const{value:c}=a.target;t.commands.updateAttributes("codeBlock",{language:c})}),i.appendChild(s),r.appendChild(o),r.appendChild(i),{dom:r,contentDOM:s}}}}).configure({lowlight:S1}),kd=["top","right","bottom","left"],xd=["start","end"],Sd=kd.reduce((n,e)=>n.concat(e,e+"-"+xd[0],e+"-"+xd[1]),[]),ft=Math.min,ze=Math.max,qi=Math.round,ht=n=>({x:n,y:n}),E1={left:"right",right:"left",bottom:"top",top:"bottom"},M1={start:"end",end:"start"};function nl(n,e,t){return ze(n,ft(e,t))}function At(n,e){return typeof n=="function"?n(e):n}function et(n){return n.split("-")[0]}function rt(n){return n.split("-")[1]}function Cd(n){return n==="x"?"y":"x"}function rl(n){return n==="y"?"height":"width"}const v1=new Set(["top","bottom"]);function pt(n){return v1.has(et(n))?"y":"x"}function il(n){return Cd(pt(n))}function Ed(n,e,t){t===void 0&&(t=!1);const r=rt(n),i=il(n),s=rl(i);let o=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Gi(o)),[o,Gi(o)]}function T1(n){const e=Gi(n);return[Ji(n),e,Ji(e)]}function Ji(n){return n.replace(/start|end/g,e=>M1[e])}const Md=["left","right"],vd=["right","left"],O1=["top","bottom"],N1=["bottom","top"];function A1(n,e,t){switch(n){case"top":case"bottom":return t?e?vd:Md:e?Md:vd;case"left":case"right":return e?O1:N1;default:return[]}}function R1(n,e,t,r){const i=rt(n);let s=A1(et(n),t==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Ji)))),s}function Gi(n){return n.replace(/left|right|bottom|top/g,e=>E1[e])}function D1(n){return{top:0,right:0,bottom:0,left:0,...n}}function sl(n){return typeof n!="number"?D1(n):{top:n,right:n,bottom:n,left:n}}function $n(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function Td(n,e,t){let{reference:r,floating:i}=n;const s=pt(e),o=il(e),l=rl(o),a=et(e),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[l]/2-i[l]/2;let h;switch(a){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(rt(e)){case"start":h[o]-=f*(t&&c?-1:1);break;case"end":h[o]+=f*(t&&c?-1:1);break}return h}const I1=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=t,l=s.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:n,floating:e,strategy:i}),{x:u,y:d}=Td(c,r,a),f=r,h={},p=0;for(let g=0;g<l.length;g++){const{name:y,fn:w}=l[g],{x:k,y:C,data:R,reset:M}=await w({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:n,floating:e}});u=k??u,d=C??d,h={...h,[y]:{...h[y],...R}},M&&p<=50&&(p++,typeof M=="object"&&(M.placement&&(f=M.placement),M.rects&&(c=M.rects===!0?await o.getElementRects({reference:n,floating:e,strategy:i}):M.rects),{x:u,y:d}=Td(c,f,a)),g=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function zn(n,e){var t;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:l,strategy:a}=n,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=At(e,n),p=sl(h),y=l[f?d==="floating"?"reference":"floating":d],w=$n(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(y)))==null||t?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),k=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),R=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},M=$n(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:C,strategy:a}):k);return{top:(w.top-M.top+p.top)/R.y,bottom:(M.bottom-w.bottom+p.bottom)/R.y,left:(w.left-M.left+p.left)/R.x,right:(M.right-w.right+p.right)/R.x}}const P1=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:r,placement:i,rects:s,platform:o,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=At(n,e)||{};if(c==null)return{};const d=sl(u),f={x:t,y:r},h=il(i),p=rl(h),g=await o.getDimensions(c),y=h==="y",w=y?"top":"left",k=y?"bottom":"right",C=y?"clientHeight":"clientWidth",R=s.reference[p]+s.reference[h]-f[h]-s.floating[p],M=f[h]-s.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let T=I?I[C]:0;(!T||!await(o.isElement==null?void 0:o.isElement(I)))&&(T=l.floating[C]||s.floating[p]);const _=R/2-M/2,W=T/2-g[p]/2-1,j=ft(d[w],W),K=ft(d[k],W),P=j,Q=T-g[p]-K,Z=T/2-g[p]/2+_,ke=nl(P,Z,Q),he=!a.arrow&&rt(i)!=null&&Z!==ke&&s.reference[p]/2-(Z<P?j:K)-g[p]/2<0,pe=he?Z<P?Z-P:Z-Q:0;return{[h]:f[h]+pe,data:{[h]:ke,centerOffset:Z-ke-pe,...he&&{alignmentOffset:pe}},reset:he}}});function L1(n,e,t){return(n?[...t.filter(i=>rt(i)===n),...t.filter(i=>rt(i)!==n)]:t.filter(i=>et(i)===i)).filter(i=>n?rt(i)===n||(e?Ji(i)!==i:!1):!0)}const B1=function(n){return n===void 0&&(n={}),{name:"autoPlacement",options:n,async fn(e){var t,r,i;const{rects:s,middlewareData:o,placement:l,platform:a,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Sd,autoAlignment:h=!0,...p}=At(n,e),g=d!==void 0||f===Sd?L1(d||null,h,f):f,y=await zn(e,p),w=((t=o.autoPlacement)==null?void 0:t.index)||0,k=g[w];if(k==null)return{};const C=Ed(k,s,await(a.isRTL==null?void 0:a.isRTL(c.floating)));if(l!==k)return{reset:{placement:g[0]}};const R=[y[et(k)],y[C[0]],y[C[1]]],M=[...((r=o.autoPlacement)==null?void 0:r.overflows)||[],{placement:k,overflows:R}],I=g[w+1];if(I)return{data:{index:w+1,overflows:M},reset:{placement:I}};const T=M.map(j=>{const K=rt(j.placement);return[j.placement,K&&u?j.overflows.slice(0,2).reduce((P,Q)=>P+Q,0):j.overflows[0],j.overflows]}).sort((j,K)=>j[1]-K[1]),W=((i=T.filter(j=>j[2].slice(0,rt(j[0])?2:3).every(K=>K<=0))[0])==null?void 0:i[0])||T[0][0];return W!==l?{data:{index:w+1,overflows:M},reset:{placement:W}}:{}}}},_1=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=At(n,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const w=et(i),k=pt(l),C=et(l)===l,R=await(a.isRTL==null?void 0:a.isRTL(c.floating)),M=f||(C||!g?[Gi(l)]:T1(l)),I=p!=="none";!f&&I&&M.push(...R1(l,g,p,R));const T=[l,...M],_=await zn(e,y),W=[];let j=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&W.push(_[w]),d){const Z=Ed(i,o,R);W.push(_[Z[0]],_[Z[1]])}if(j=[...j,{placement:i,overflows:W}],!W.every(Z=>Z<=0)){var K,P;const Z=(((K=s.flip)==null?void 0:K.index)||0)+1,ke=T[Z];if(ke&&(!(d==="alignment"?k!==pt(ke):!1)||j.every(Me=>pt(Me.placement)===k?Me.overflows[0]>0:!0)))return{data:{index:Z,overflows:j},reset:{placement:ke}};let he=(P=j.filter(pe=>pe.overflows[0]<=0).sort((pe,Me)=>pe.overflows[1]-Me.overflows[1])[0])==null?void 0:P.placement;if(!he)switch(h){case"bestFit":{var Q;const pe=(Q=j.filter(Me=>{if(I){const yt=pt(Me.placement);return yt===k||yt==="y"}return!0}).map(Me=>[Me.placement,Me.overflows.filter(yt=>yt>0).reduce((yt,pl)=>yt+pl,0)]).sort((Me,yt)=>Me[1]-yt[1])[0])==null?void 0:Q[0];pe&&(he=pe);break}case"initialPlacement":he=l;break}if(i!==he)return{reset:{placement:he}}}return{}}}};function Od(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function Nd(n){return kd.some(e=>n[e]>=0)}const V1=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:r="referenceHidden",...i}=At(n,e);switch(r){case"referenceHidden":{const s=await zn(e,{...i,elementContext:"reference"}),o=Od(s,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Nd(o)}}}case"escaped":{const s=await zn(e,{...i,altBoundary:!0}),o=Od(s,t.floating);return{data:{escapedOffsets:o,escaped:Nd(o)}}}default:return{}}}}};function Ad(n){const e=ft(...n.map(s=>s.left)),t=ft(...n.map(s=>s.top)),r=ze(...n.map(s=>s.right)),i=ze(...n.map(s=>s.bottom));return{x:e,y:t,width:r-e,height:i-t}}function $1(n){const e=n.slice().sort((i,s)=>i.y-s.y),t=[];let r=null;for(let i=0;i<e.length;i++){const s=e[i];!r||s.y-r.y>r.height/2?t.push([s]):t[t.length-1].push(s),r=s}return t.map(i=>$n(Ad(i)))}const z1=function(n){return n===void 0&&(n={}),{name:"inline",options:n,async fn(e){const{placement:t,elements:r,rects:i,platform:s,strategy:o}=e,{padding:l=2,x:a,y:c}=At(n,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),d=$1(u),f=$n(Ad(u)),h=sl(l);function p(){if(d.length===2&&d[0].left>d[1].right&&a!=null&&c!=null)return d.find(y=>a>y.left-h.left&&a<y.right+h.right&&c>y.top-h.top&&c<y.bottom+h.bottom)||f;if(d.length>=2){if(pt(t)==="y"){const j=d[0],K=d[d.length-1],P=et(t)==="top",Q=j.top,Z=K.bottom,ke=P?j.left:K.left,he=P?j.right:K.right,pe=he-ke,Me=Z-Q;return{top:Q,bottom:Z,left:ke,right:he,width:pe,height:Me,x:ke,y:Q}}const y=et(t)==="left",w=ze(...d.map(j=>j.right)),k=ft(...d.map(j=>j.left)),C=d.filter(j=>y?j.left===k:j.right===w),R=C[0].top,M=C[C.length-1].bottom,I=k,T=w,_=T-I,W=M-R;return{top:R,bottom:M,left:I,right:T,width:_,height:W,x:I,y:R}}return f}const g=await s.getElementRects({reference:{getBoundingClientRect:p},floating:r.floating,strategy:o});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},H1=new Set(["left","top"]);async function F1(n,e){const{placement:t,platform:r,elements:i}=n,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=et(t),l=rt(t),a=pt(t)==="y",c=H1.has(o)?-1:1,u=s&&a?-1:1,d=At(e,n);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof p=="number"&&(h=l==="end"?p*-1:p),a?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const j1=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:s,placement:o,middlewareData:l}=e,a=await F1(e,n);return o===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:o}}}}},U1=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:w,y:k}=y;return{x:w,y:k}}},...a}=At(n,e),c={x:t,y:r},u=await zn(e,a),d=pt(et(i)),f=Cd(d);let h=c[f],p=c[d];if(s){const y=f==="y"?"top":"left",w=f==="y"?"bottom":"right",k=h+u[y],C=h-u[w];h=nl(k,h,C)}if(o){const y=d==="y"?"top":"left",w=d==="y"?"bottom":"right",k=p+u[y],C=p-u[w];p=nl(k,p,C)}const g=l.fn({...e,[f]:h,[d]:p});return{...g,data:{x:g.x-t,y:g.y-r,enabled:{[f]:s,[d]:o}}}}}},W1=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,r;const{placement:i,rects:s,platform:o,elements:l}=e,{apply:a=()=>{},...c}=At(n,e),u=await zn(e,c),d=et(i),f=rt(i),h=pt(i)==="y",{width:p,height:g}=s.floating;let y,w;d==="top"||d==="bottom"?(y=d,w=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(w=d,y=f==="end"?"top":"bottom");const k=g-u.top-u.bottom,C=p-u.left-u.right,R=ft(g-u[y],k),M=ft(p-u[w],C),I=!e.middlewareData.shift;let T=R,_=M;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(_=C),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(T=k),I&&!f){const j=ze(u.left,0),K=ze(u.right,0),P=ze(u.top,0),Q=ze(u.bottom,0);h?_=p-2*(j!==0||K!==0?j+K:ze(u.left,u.right)):T=g-2*(P!==0||Q!==0?P+Q:ze(u.top,u.bottom))}await a({...e,availableWidth:_,availableHeight:T});const W=await o.getDimensions(l.floating);return p!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Yi(){return typeof window<"u"}function Hn(n){return Rd(n)?(n.nodeName||"").toLowerCase():"#document"}function Ke(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function Rt(n){var e;return(e=(Rd(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function Rd(n){return Yi()?n instanceof Node||n instanceof Ke(n).Node:!1}function it(n){return Yi()?n instanceof Element||n instanceof Ke(n).Element:!1}function mt(n){return Yi()?n instanceof HTMLElement||n instanceof Ke(n).HTMLElement:!1}function Dd(n){return!Yi()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ke(n).ShadowRoot}const K1=new Set(["inline","contents"]);function Mr(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=st(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!K1.has(i)}const q1=new Set(["table","td","th"]);function J1(n){return q1.has(Hn(n))}const G1=[":popover-open",":modal"];function Xi(n){return G1.some(e=>{try{return n.matches(e)}catch{return!1}})}const Y1=["transform","translate","scale","rotate","perspective"],X1=["transform","translate","scale","rotate","perspective","filter"],Q1=["paint","layout","strict","content"];function ol(n){const e=ll(),t=it(n)?st(n):n;return Y1.some(r=>t[r]?t[r]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||X1.some(r=>(t.willChange||"").includes(r))||Q1.some(r=>(t.contain||"").includes(r))}function Z1(n){let e=en(n);for(;mt(e)&&!Fn(e);){if(ol(e))return e;if(Xi(e))return null;e=en(e)}return null}function ll(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const eb=new Set(["html","body","#document"]);function Fn(n){return eb.has(Hn(n))}function st(n){return Ke(n).getComputedStyle(n)}function Qi(n){return it(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function en(n){if(Hn(n)==="html")return n;const e=n.assignedSlot||n.parentNode||Dd(n)&&n.host||Rt(n);return Dd(e)?e.host:e}function Id(n){const e=en(n);return Fn(e)?n.ownerDocument?n.ownerDocument.body:n.body:mt(e)&&Mr(e)?e:Id(e)}function Pd(n,e,t){var r;e===void 0&&(e=[]);const i=Id(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),o=Ke(i);return s?(al(o),e.concat(o,o.visualViewport||[],Mr(i)?i:[],[])):e.concat(i,Pd(i,[]))}function al(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Ld(n){const e=st(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=mt(n),s=i?n.offsetWidth:t,o=i?n.offsetHeight:r,l=qi(t)!==s||qi(r)!==o;return l&&(t=s,r=o),{width:t,height:r,$:l}}function Bd(n){return it(n)?n:n.contextElement}function jn(n){const e=Bd(n);if(!mt(e))return ht(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:s}=Ld(e);let o=(s?qi(t.width):t.width)/r,l=(s?qi(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const tb=ht(0);function _d(n){const e=Ke(n);return!ll()||!e.visualViewport?tb:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function nb(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Ke(n)?!1:e}function vr(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),s=Bd(n);let o=ht(1);e&&(r?it(r)&&(o=jn(r)):o=jn(n));const l=nb(s,t,r)?_d(s):ht(0);let a=(i.left+l.x)/o.x,c=(i.top+l.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const f=Ke(s),h=r&&it(r)?Ke(r):r;let p=f,g=al(p);for(;g&&r&&h!==p;){const y=jn(g),w=g.getBoundingClientRect(),k=st(g),C=w.left+(g.clientLeft+parseFloat(k.paddingLeft))*y.x,R=w.top+(g.clientTop+parseFloat(k.paddingTop))*y.y;a*=y.x,c*=y.y,u*=y.x,d*=y.y,a+=C,c+=R,p=Ke(g),g=al(p)}}return $n({width:u,height:d,x:a,y:c})}function Zi(n,e){const t=Qi(n).scrollLeft;return e?e.left+t:vr(Rt(n)).left+t}function Vd(n,e){const t=n.getBoundingClientRect(),r=t.left+e.scrollLeft-Zi(n,t),i=t.top+e.scrollTop;return{x:r,y:i}}function rb(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const s=i==="fixed",o=Rt(r),l=e?Xi(e.floating):!1;if(r===o||l&&s)return t;let a={scrollLeft:0,scrollTop:0},c=ht(1);const u=ht(0),d=mt(r);if((d||!d&&!s)&&((Hn(r)!=="body"||Mr(o))&&(a=Qi(r)),mt(r))){const h=vr(r);c=jn(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=o&&!d&&!s?Vd(o,a):ht(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-a.scrollLeft*c.x+u.x+f.x,y:t.y*c.y-a.scrollTop*c.y+u.y+f.y}}function ib(n){return Array.from(n.getClientRects())}function sb(n){const e=Rt(n),t=Qi(n),r=n.ownerDocument.body,i=ze(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=ze(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-t.scrollLeft+Zi(n);const l=-t.scrollTop;return st(r).direction==="rtl"&&(o+=ze(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:l}}const $d=25;function ob(n,e){const t=Ke(n),r=Rt(n),i=t.visualViewport;let s=r.clientWidth,o=r.clientHeight,l=0,a=0;if(i){s=i.width,o=i.height;const u=ll();(!u||u&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}const c=Zi(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-h);p<=$d&&(s-=p)}else c<=$d&&(s+=c);return{width:s,height:o,x:l,y:a}}const lb=new Set(["absolute","fixed"]);function ab(n,e){const t=vr(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,s=mt(n)?jn(n):ht(1),o=n.clientWidth*s.x,l=n.clientHeight*s.y,a=i*s.x,c=r*s.y;return{width:o,height:l,x:a,y:c}}function zd(n,e,t){let r;if(e==="viewport")r=ob(n,t);else if(e==="document")r=sb(Rt(n));else if(it(e))r=ab(e,t);else{const i=_d(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return $n(r)}function Hd(n,e){const t=en(n);return t===e||!it(t)||Fn(t)?!1:st(t).position==="fixed"||Hd(t,e)}function cb(n,e){const t=e.get(n);if(t)return t;let r=Pd(n,[]).filter(l=>it(l)&&Hn(l)!=="body"),i=null;const s=st(n).position==="fixed";let o=s?en(n):n;for(;it(o)&&!Fn(o);){const l=st(o),a=ol(o);!a&&l.position==="fixed"&&(i=null),(s?!a&&!i:!a&&l.position==="static"&&!!i&&lb.has(i.position)||Mr(o)&&!a&&Hd(n,o))?r=r.filter(u=>u!==o):i=l,o=en(o)}return e.set(n,r),r}function ub(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const o=[...t==="clippingAncestors"?Xi(e)?[]:cb(e,this._c):[].concat(t),r],l=o[0],a=o.reduce((c,u)=>{const d=zd(e,u,i);return c.top=ze(d.top,c.top),c.right=ft(d.right,c.right),c.bottom=ft(d.bottom,c.bottom),c.left=ze(d.left,c.left),c},zd(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function db(n){const{width:e,height:t}=Ld(n);return{width:e,height:t}}function fb(n,e,t){const r=mt(e),i=Rt(e),s=t==="fixed",o=vr(n,!0,s,e);let l={scrollLeft:0,scrollTop:0};const a=ht(0);function c(){a.x=Zi(i)}if(r||!r&&!s)if((Hn(e)!=="body"||Mr(i))&&(l=Qi(e)),r){const h=vr(e,!0,s,e);a.x=h.x+e.clientLeft,a.y=h.y+e.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?Vd(i,l):ht(0),d=o.left+l.scrollLeft-a.x-u.x,f=o.top+l.scrollTop-a.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function cl(n){return st(n).position==="static"}function Fd(n,e){if(!mt(n)||st(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return Rt(n)===t&&(t=t.ownerDocument.body),t}function jd(n,e){const t=Ke(n);if(Xi(n))return t;if(!mt(n)){let i=en(n);for(;i&&!Fn(i);){if(it(i)&&!cl(i))return i;i=en(i)}return t}let r=Fd(n,e);for(;r&&J1(r)&&cl(r);)r=Fd(r,e);return r&&Fn(r)&&cl(r)&&!ol(r)?t:r||Z1(n)||t}const hb=async function(n){const e=this.getOffsetParent||jd,t=this.getDimensions,r=await t(n.floating);return{reference:fb(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pb(n){return st(n).direction==="rtl"}const mb={convertOffsetParentRelativeRectToViewportRelativeRect:rb,getDocumentElement:Rt,getClippingRect:ub,getOffsetParent:jd,getElementRects:hb,getClientRects:ib,getDimensions:db,getScale:jn,isElement:it,isRTL:pb},Ud=j1,Wd=B1,Kd=U1,qd=_1,Jd=W1,Gd=V1,Yd=P1,Xd=z1,Qd=(n,e,t)=>{const r=new Map,i={platform:mb,...t},s={...i.platform,_c:r};return I1(n,e,{...i,platform:s})};var ul,dl;if(typeof WeakMap<"u"){let n=new WeakMap;ul=e=>n.get(e),dl=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;ul=r=>{for(let i=0;i<n.length;i+=2)if(n[i]==r)return n[i+1]},dl=(r,i)=>(t==10&&(t=0),n[t++]=r,n[t++]=i)}var Dt=class{constructor(n,e,t,r){this.width=n,this.height=e,this.map=t,this.problems=r}findCell(n){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=n)continue;const r=e%this.width,i=e/this.width|0;let s=r+1,o=i+1;for(let l=1;s<this.width&&this.map[e+l]==t;l++)s++;for(let l=1;o<this.height&&this.map[e+this.width*l]==t;l++)o++;return{left:r,top:i,right:s,bottom:o}}throw new RangeError(`No cell with offset ${n} found`)}colCount(n){for(let e=0;e<this.map.length;e++)if(this.map[e]==n)return e%this.width;throw new RangeError(`No cell with offset ${n} found`)}nextCell(n,e,t){const{left:r,right:i,top:s,bottom:o}=this.findCell(n);return e=="horiz"?(t<0?r==0:i==this.width)?null:this.map[s*this.width+(t<0?r-1:i)]:(t<0?s==0:o==this.height)?null:this.map[r+this.width*(t<0?s-1:o)]}rectBetween(n,e){const{left:t,right:r,top:i,bottom:s}=this.findCell(n),{left:o,right:l,top:a,bottom:c}=this.findCell(e);return{left:Math.min(t,o),top:Math.min(i,a),right:Math.max(r,l),bottom:Math.max(s,c)}}cellsInRect(n){const e=[],t={};for(let r=n.top;r<n.bottom;r++)for(let i=n.left;i<n.right;i++){const s=r*this.width+i,o=this.map[s];t[o]||(t[o]=!0,!(i==n.left&&i&&this.map[s-1]==o||r==n.top&&r&&this.map[s-this.width]==o)&&e.push(o))}return e}positionAt(n,e,t){for(let r=0,i=0;;r++){const s=i+t.child(r).nodeSize;if(r==n){let o=e+n*this.width;const l=(n+1)*this.width;for(;o<l&&this.map[o]<i;)o++;return o==l?s-1:this.map[o]}i=s}}static get(n){return ul(n)||dl(n,gb(n))}};function gb(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);const e=yb(n),t=n.childCount,r=[];let i=0,s=null;const o=[];for(let c=0,u=e*t;c<u;c++)r[c]=0;for(let c=0,u=0;c<t;c++){const d=n.child(c);u++;for(let p=0;;p++){for(;i<r.length&&r[i]!=0;)i++;if(p==d.childCount)break;const g=d.child(p),{colspan:y,rowspan:w,colwidth:k}=g.attrs;for(let C=0;C<w;C++){if(C+c>=t){(s||(s=[])).push({type:"overlong_rowspan",pos:u,n:w-C});break}const R=i+C*e;for(let M=0;M<y;M++){r[R+M]==0?r[R+M]=u:(s||(s=[])).push({type:"collision",row:c,pos:u,n:y-M});const I=k&&k[M];if(I){const T=(R+M)%e*2,_=o[T];_==null||_!=I&&o[T+1]==1?(o[T]=I,o[T+1]=1):_==I&&o[T+1]++}}}i+=y,u+=g.nodeSize}const f=(c+1)*e;let h=0;for(;i<f;)r[i++]==0&&h++;h&&(s||(s=[])).push({type:"missing",row:c,n:h}),u++}(e===0||t===0)&&(s||(s=[])).push({type:"zero_sized"});const l=new Dt(e,t,r,s);let a=!1;for(let c=0;!a&&c<o.length;c+=2)o[c]!=null&&o[c+1]<t&&(a=!0);return a&&bb(l,o,n),l}function yb(n){let e=-1,t=!1;for(let r=0;r<n.childCount;r++){const i=n.child(r);let s=0;if(t)for(let o=0;o<r;o++){const l=n.child(o);for(let a=0;a<l.childCount;a++){const c=l.child(a);o+c.attrs.rowspan>r&&(s+=c.attrs.colspan)}}for(let o=0;o<i.childCount;o++){const l=i.child(o);s+=l.attrs.colspan,l.attrs.rowspan>1&&(t=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function bb(n,e,t){n.problems||(n.problems=[]);const r={};for(let i=0;i<n.map.length;i++){const s=n.map[i];if(r[s])continue;r[s]=!0;const o=t.nodeAt(s);if(!o)throw new RangeError(`No cell with offset ${s} found`);let l=null;const a=o.attrs;for(let c=0;c<a.colspan;c++){const u=(i+c)%n.width,d=e[u*2];d!=null&&(!a.colwidth||a.colwidth[c]!=d)&&((l||(l=wb(a)))[c]=d)}l&&n.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function wb(n){if(n.colwidth)return n.colwidth.slice();const e=[];for(let t=0;t<n.colspan;t++)e.push(0);return e}function fl(n){let e=n.cached.tableNodeTypes;if(!e){e=n.cached.tableNodeTypes={};for(const t in n.nodes){const r=n.nodes[t],i=r.spec.tableRole;i&&(e[i]=r)}}return e}new le("selectingCells");function kb(n){for(let e=n.depth-1;e>0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function Zd(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function xb(n){const e=n.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const t=kb(e.$head)||Sb(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function Sb(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function ef(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function tf(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function nf(n,e,t){const r=n.node(-1),i=Dt.get(r),s=n.start(-1),o=i.nextCell(n.pos-s,e,t);return o==null?null:n.node(0).resolve(s+o)}function rf(n,e,t=1){const r={...n,colspan:n.colspan-t};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,t),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}var gt=class Pt extends H{constructor(e,t=e){const r=e.node(-1),i=Dt.get(r),s=e.start(-1),o=i.rectBetween(e.pos-s,t.pos-s),l=e.node(0),a=i.cellsInRect(o).filter(u=>u!=t.pos-s);a.unshift(t.pos-s);const c=a.map(u=>{const d=r.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const f=s+u+1;return new pa(l.resolve(f),l.resolve(f+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(e,t){const r=e.resolve(t.map(this.$anchorCell.pos)),i=e.resolve(t.map(this.$headCell.pos));if(ef(r)&&ef(i)&&tf(r,i)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Pt.rowSelection(r,i):s&&this.isColSelection()?Pt.colSelection(r,i):new Pt(r,i)}return F.between(r,i)}content(){const e=this.$anchorCell.node(-1),t=Dt.get(e),r=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},o=[];for(let a=i.top;a<i.bottom;a++){const c=[];for(let u=a*t.width+i.left,d=i.left;d<i.right;d++,u++){const f=t.map[u];if(s[f])continue;s[f]=!0;const h=t.findCell(f);let p=e.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const g=i.left-h.left,y=h.right-i.right;if(g>0||y>0){let w=p.attrs;if(g>0&&(w=rf(w,0,g)),y>0&&(w=rf(w,w.colspan-y,y)),h.left<i.left){if(p=p.type.createAndFill(w),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else p=p.type.create(w,p.content)}if(h.top<i.top||h.bottom>i.bottom){const w={...p.attrs,rowspan:Math.min(h.bottom,i.bottom)-Math.max(h.top,i.top)};h.top<i.top?p=p.type.createAndFill(w):p=p.type.create(w,p.content)}c.push(p)}o.push(e.child(a).copy(S.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:o;return new N(S.from(l),1,1)}replace(e,t=N.empty){const r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){const{$from:l,$to:a}=i[o],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(a.pos),o?N.empty:t)}const s=H.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,t){this.replace(e,new N(S.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),r=Dt.get(t),i=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let o=0;o<s.length;o++)e(t.nodeAt(s[o]),i+s[o])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const r=e.node(-1),i=Dt.get(r),s=e.start(-1),o=i.findCell(e.pos-s),l=i.findCell(t.pos-s),a=e.node(0);return o.top<=l.top?(o.top>0&&(e=a.resolve(s+i.map[o.left])),l.bottom<i.height&&(t=a.resolve(s+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(t=a.resolve(s+i.map[l.left])),o.bottom<i.height&&(e=a.resolve(s+i.map[i.width*(i.height-1)+o.right-1]))),new Pt(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=Dt.get(e),r=this.$anchorCell.start(-1),i=t.colCount(this.$anchorCell.pos-r),s=t.colCount(this.$headCell.pos-r);if(Math.min(i,s)>0)return!1;const o=i+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,l)==t.width}eq(e){return e instanceof Pt&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const r=e.node(-1),i=Dt.get(r),s=e.start(-1),o=i.findCell(e.pos-s),l=i.findCell(t.pos-s),a=e.node(0);return o.left<=l.left?(o.left>0&&(e=a.resolve(s+i.map[o.top*i.width])),l.right<i.width&&(t=a.resolve(s+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(t=a.resolve(s+i.map[l.top*i.width])),o.right<i.width&&(e=a.resolve(s+i.map[i.width*(o.top+1)-1]))),new Pt(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Pt(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){return new Pt(e.resolve(t),e.resolve(r))}getBookmark(){return new Cb(this.$anchorCell.pos,this.$headCell.pos)}};gt.prototype.visible=!1,H.jsonID("cell",gt);var Cb=class Pf{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Pf(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),r=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&r.index()<r.parent.childCount&&tf(t,r)?new gt(t,r):H.near(r,1)}};new le("fix-tables");function sf(n){const e=n.selection,t=xb(n),r=t.node(-1),i=t.start(-1),s=Dt.get(r);return{...e instanceof gt?s.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):s.findCell(t.pos-i),tableStart:i,map:s,table:r}}function Eb(n){return function(e,t){if(!Zd(e))return!1;if(t){const r=fl(e.schema),i=sf(e),s=e.tr,o=i.map.cellsInRect(n=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:n=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=o.map(a=>i.table.nodeAt(a));for(let a=0;a<o.length;a++)l[a].type==r.header_cell&&s.setNodeMarkup(i.tableStart+o[a],r.cell,l[a].attrs);if(s.steps.length==0)for(let a=0;a<o.length;a++)s.setNodeMarkup(i.tableStart+o[a],r.header_cell,l[a].attrs);t(s)}return!0}}function of(n,e,t){const r=e.map.cellsInRect({left:0,top:0,right:n=="row"?e.map.width:1,bottom:n=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const s=e.table.nodeAt(r[i]);if(s&&s.type!==t.header_cell)return!1}return!0}function hl(n,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?Eb(n):function(t,r){if(!Zd(t))return!1;if(r){const i=fl(t.schema),s=sf(t),o=t.tr,l=of("row",s,i),a=of("column",s,i),u=(n==="column"?l:n==="row"?a:!1)?1:0,d=n=="column"?{left:0,top:u,right:1,bottom:s.map.height}:n=="row"?{left:u,top:0,right:s.map.width,bottom:1}:s,f=n=="column"?a?i.cell:i.header_cell:n=="row"?l?i.cell:i.header_cell:i.cell;s.map.cellsInRect(d).forEach(h=>{const p=h+s.tableStart,g=o.doc.nodeAt(p);g&&o.setNodeMarkup(p,f,g.attrs)}),r(o)}return!0}}hl("row",{useDeprecatedLogic:!0}),hl("column",{useDeprecatedLogic:!0}),hl("cell",{useDeprecatedLogic:!0});function es(n,e){const t=n.selection;if(!(t instanceof gt))return!1;if(e){const r=n.tr,i=fl(n.schema).cell.createAndFill().content;t.forEachCell((s,o)=>{s.content.eq(i)||r.replace(r.mapping.map(o+1),r.mapping.map(o+s.nodeSize-1),new N(i,0,0))}),r.docChanged&&e(r)}return!0}to({ArrowLeft:ns("horiz",-1),ArrowRight:ns("horiz",1),ArrowUp:ns("vert",-1),ArrowDown:ns("vert",1),"Shift-ArrowLeft":rs("horiz",-1),"Shift-ArrowRight":rs("horiz",1),"Shift-ArrowUp":rs("vert",-1),"Shift-ArrowDown":rs("vert",1),Backspace:es,"Mod-Backspace":es,Delete:es,"Mod-Delete":es});function ts(n,e,t){return t.eq(n.selection)?!1:(e&&e(n.tr.setSelection(t).scrollIntoView()),!0)}function ns(n,e){return(t,r,i)=>{if(!i)return!1;const s=t.selection;if(s instanceof gt)return ts(t,r,H.near(s.$headCell,e));if(n!="horiz"&&!s.empty)return!1;const o=lf(i,n,e);if(o==null)return!1;if(n=="horiz")return ts(t,r,H.near(t.doc.resolve(s.head+e),e));{const l=t.doc.resolve(o),a=nf(l,n,e);let c;return a?c=H.near(a,1):e<0?c=H.near(t.doc.resolve(l.before(-1)),-1):c=H.near(t.doc.resolve(l.after(-1)),1),ts(t,r,c)}}}function rs(n,e){return(t,r,i)=>{if(!i)return!1;const s=t.selection;let o;if(s instanceof gt)o=s;else{const a=lf(i,n,e);if(a==null)return!1;o=new gt(t.doc.resolve(a))}const l=nf(o.$headCell,n,e);return l?ts(t,r,new gt(o.$anchorCell,l)):!1}}function lf(n,e,t){if(!(n.state.selection instanceof F))return null;const{$head:r}=n.state.selection;for(let i=r.depth-1;i>=0;i--){const s=r.node(i);if((t<0?r.index(i):r.indexAfter(i))!=(t<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=r.before(i),a=e=="vert"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(a)?l:null}}return null}new le("tableColumnResizing");function Mb(n,e){const t=Math.min(n.top,e.top),r=Math.max(n.bottom,e.bottom),i=Math.min(n.left,e.left),o=Math.max(n.right,e.right)-i,l=r-t,a=i,c=t;return new DOMRect(a,c,o,l)}var vb=class{constructor({editor:n,element:e,view:t,updateDelay:r=250,resizeDelay:i=60,shouldShow:s,appendTo:o,getReferencedVirtualElement:l,options:a}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:u,state:d,from:f,to:h})=>{const{doc:p,selection:g}=d,{empty:y}=g,w=!p.textBetween(f,h).length&&wo(d.selection),k=this.element.contains(document.activeElement);return!(!(u.hasFocus()||k)||y||w||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(u,d)=>{const f=!d?.selection.eq(u.state.selection),h=!d?.doc.eq(u.state.doc);!f&&!h||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(u,f,h,d)},this.updateDelay))},this.updateHandler=(u,d,f,h)=>{const{composing:p}=u;if(p||!d&&!f)return;if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:u})=>{u.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var c;this.editor=n,this.element=e,this.view=t,this.updateDelay=r,this.resizeDelay=i,this.appendTo=o,this.scrollTarget=(c=a?.scrollTarget)!=null?c:window,this.getReferencedVirtualElement=l,this.floatingUIOptions={...this.floatingUIOptions,...a},this.element.tabIndex=0,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(t,t.state),this.getShouldShow()&&this.show()}get middlewares(){const n=[];return this.floatingUIOptions.flip&&n.push(qd(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&n.push(Kd(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&n.push(Ud(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&n.push(Yd(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&n.push(Jd(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&n.push(Wd(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&n.push(Gd(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&n.push(Xd(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),n}get virtualElement(){var n;const{selection:e}=this.editor.state,t=(n=this.getReferencedVirtualElement)==null?void 0:n.call(this);if(t)return t;const r=hu(this.view,e.from,e.to);let i={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(e instanceof V){let s=this.view.nodeDOM(e.from);const o=s.dataset.nodeViewWrapper?s:s.querySelector("[data-node-view-wrapper]");o&&(s=o),s&&(i={getBoundingClientRect:()=>s.getBoundingClientRect(),getClientRects:()=>[s.getBoundingClientRect()]})}if(e instanceof gt){const{$anchorCell:s,$headCell:o}=e,l=s?s.pos:o.pos,a=o?o.pos:s.pos,c=this.view.nodeDOM(l),u=this.view.nodeDOM(a);if(!c||!u)return;const d=c===u?c.getBoundingClientRect():Mb(c.getBoundingClientRect(),u.getBoundingClientRect());i={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return i}updatePosition(){const n=this.virtualElement;n&&Qd(n,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(n,e){const{state:t}=n,r=t.selection.from!==t.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(n,e);return}const i=!e?.selection.eq(n.state.selection),s=!e?.doc.eq(n.state.doc);this.updateHandler(n,i,s,e)}getShouldShow(n){var e;const{state:t}=this.view,{selection:r}=t,{ranges:i}=r,s=Math.min(...i.map(a=>a.$from.pos)),o=Math.max(...i.map(a=>a.$to.pos));return(e=this.shouldShow)==null?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:t,oldState:n,from:s,to:o})}show(){var n;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(n=e??this.view.dom.parentElement)==null||n.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},af=n=>new se({key:typeof n.pluginKey=="string"?new le(n.pluginKey):n.pluginKey,view:e=>new vb({view:e,...n})});ue.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[af({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Tb=m.defineComponent({name:"BubbleMenu",inheritAttrs:!1,props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},resizeDelay:{type:Number,default:void 0},options:{type:Object,default:()=>({})},appendTo:{type:Object,default:void 0},shouldShow:{type:Function,default:null},getReferencedVirtualElement:{type:Function,default:void 0}},setup(n,{slots:e,attrs:t}){const r=m.ref(null);return m.onMounted(()=>{const{editor:i,options:s,pluginKey:o,resizeDelay:l,appendTo:a,shouldShow:c,getReferencedVirtualElement:u,updateDelay:d}=n;r.value&&(r.value.style.visibility="hidden",r.value.style.position="absolute",r.value.remove(),i.registerPlugin(af({editor:i,element:r.value,options:s,pluginKey:o,resizeDelay:l,appendTo:a,shouldShow:c,getReferencedVirtualElement:u,updateDelay:d})))}),m.onBeforeUnmount(()=>{const{pluginKey:i,editor:s}=n;s.unregisterPlugin(i)}),()=>{var i;return m.h(m.Teleport,{to:"body"},m.h("div",{...t,ref:r},(i=e.default)==null?void 0:i.call(e)))}}}),Ob=class{constructor({editor:n,element:e,view:t,options:r,appendTo:i,shouldShow:s}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:o,state:l})=>{const{selection:a}=l,{$anchor:c,empty:u}=a,d=c.depth===1,f=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent&&c.parent.childCount===0&&!this.getTextContent(c.parent);return!(!o.hasFocus()||!u||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(o,l,a,c)=>{const{composing:u}=o;if(u||!l&&!a)return;if(!this.getShouldShow(c)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var l;if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&((l=this.element.parentNode)!=null&&l.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=n,this.element=e,this.view=t,this.appendTo=i,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(t,t.state),this.getShouldShow()&&this.show()}getTextContent(n){return iu(n,{textSerializers:ho(this.editor.schema)})}get middlewares(){const n=[];return this.floatingUIOptions.flip&&n.push(qd(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&n.push(Kd(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&n.push(Ud(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&n.push(Yd(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&n.push(Jd(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&n.push(Wd(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&n.push(Gd(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&n.push(Xd(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),n}getShouldShow(n){var e;const{state:t}=this.view,{selection:r}=t,{ranges:i}=r,s=Math.min(...i.map(a=>a.$from.pos)),o=Math.max(...i.map(a=>a.$to.pos));return(e=this.shouldShow)==null?void 0:e.call(this,{editor:this.editor,view:this.view,state:t,oldState:n,from:s,to:o})}updatePosition(){const{selection:n}=this.editor.state,e=hu(this.view,n.from,n.to);Qd({getBoundingClientRect:()=>e,getClientRects:()=>[e]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:i,strategy:s})=>{this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${r}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(n,e){const t=!e?.selection.eq(n.state.selection),r=!e?.doc.eq(n.state.doc);this.updateHandler(n,t,r,e)}show(){var n;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(n=e??this.view.dom.parentElement)==null||n.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},cf=n=>new se({key:typeof n.pluginKey=="string"?new le(n.pluginKey):n.pluginKey,view:e=>new Ob({view:e,...n})});ue.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[cf({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}}),m.defineComponent({name:"FloatingMenu",inheritAttrs:!1,props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},options:{type:Object,default:()=>({})},appendTo:{type:Object,default:void 0},shouldShow:{type:Function,default:null}},setup(n,{slots:e,attrs:t}){const r=m.ref(null);return m.onMounted(()=>{const{pluginKey:i,editor:s,options:o,appendTo:l,shouldShow:a}=n;r.value&&(r.value.style.visibility="hidden",r.value.style.position="absolute",r.value.remove(),s.registerPlugin(cf({pluginKey:i,editor:s,element:r.value,options:o,appendTo:l,shouldShow:a})))}),m.onBeforeUnmount(()=>{const{pluginKey:i,editor:s}=n;s.unregisterPlugin(i)}),()=>{var i;return m.h(m.Teleport,{to:"body"},m.h("div",{...t,ref:r},(i=e.default)==null?void 0:i.call(e)))}}});const Nb={class:"sus-bubble-menu"},Ab=bn(m.defineComponent({__name:"BubbleMenu",props:{editor:{},showMenu:{type:Boolean}},setup(n){const e=n,t=m.ref(""),r=m.ref(!1);function i(){if(r.value){r.value=!1;return}t.value=e.editor?.getAttributes("link").href,r.value=!0}function s(){if(!t.value){e.editor?.chain().focus().extendMarkRange("link").unsetLink().run(),r.value=!1;return}e.editor?.chain().focus().extendMarkRange("link").setLink({href:t.value}).run(),r.value=!1}function o(){t.value&&window.open(e.editor?.getAttributes("link").href)}return(l,a)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.withDirectives(m.createElementVNode("div",{class:"inset-0 absolute",onClick:a[2]||(a[2]=c=>r.value=!1)},[m.createElementVNode("div",{class:"sus-link",onClick:a[1]||(a[1]=m.withModifiers(()=>{},["stop"]))},[m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>t.value=c),onKeyup:m.withKeys(s,["enter"]),class:"sus-link-input",type:"text",placeholder:"请输入链接"},null,544),[[m.vModelText,t.value]]),(m.openBlock(),m.createElementBlock("svg",{onClick:s,title:"确定",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[...a[4]||(a[4]=[m.createElementVNode("rect",{width:"24",height:"24",fill:"none"},null,-1),m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{"stroke-linejoin":"round",d:"m21 3l-9 9m0 0h5.344M12 12V6.656"}),m.createElementVNode("path",{d:"M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2m10 10c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465c-.973-.973-1.3-2.342-1.409-4.535"})],-1)])])),(m.openBlock(),m.createElementBlock("svg",{onClick:o,title:"预览",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...a[5]||(a[5]=[m.createElementVNode("rect",{width:"24",height:"24",fill:"none"},null,-1),m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{"stroke-linejoin":"round",d:"m13 11l9-9m0 0h-5.344M22 2v5.344"}),m.createElementVNode("path",{d:"M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2m10 10c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465c-.973-.973-1.3-2.342-1.409-4.535"})],-1)])]))])],512),[[m.vShow,r.value]]),n.editor&&n.showMenu?(m.openBlock(),m.createBlock(m.unref(Tb),{key:0,editor:n.editor,options:{placement:"bottom",offset:8}},{default:m.withCtx(()=>[m.createElementVNode("div",Nb,[m.createElementVNode("button",{onClick:i,title:"添加链接"}," 链接 "),m.createElementVNode("button",{onClick:a[3]||(a[3]=c=>n.editor.commands.unsetAllMarks()),title:"清除当前选中格式"}," 清除 ")])]),_:1},8,["editor"])):m.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-3f87b608"]]),Rb=$e.create({name:"emoji",inline:!0,group:"inline",atom:!0,addAttributes(){return{name:{default:null},src:{default:null}}},parseHTML(){return[{tag:"span[data-type='emoji']"}]},renderHTML({HTMLAttributes:n}){return["span",{"data-type":"emoji",class:"emoji",contenteditable:"false"},["img",ce(n,{src:n.src,alt:n.name,draggable:"false",loading:"lazy",align:"absmiddle"})]]}}),Db={class:"sus-comment relative flex flex-row w-full"},Ib={key:0,class:"sus-comment-avatar"},Pb=["src"],Lb={class:"sus-comment__main"},Bb={key:0,class:"sus-comment__info my-1"},_b={key:0,class:"sus-comment__info-input"},Vb=["placeholder"],$b={key:1,class:"sus-comment__info-input"},zb=["placeholder"],Hb={key:2,class:"sus-comment__info-input"},Fb=["placeholder"],jb={class:"relative"},Ub={class:"sus-comment__footer flex justify-between"},Wb={class:"flex flex-row items-center"},Kb={key:0,class:"p-1"},qb={key:1,class:"sus-upload p-1"},Jb={class:"sus-comment__toolbar relative flex"},Gb={class:"sus-comment__toolbar-mask absolute inset-0"},Yb={class:"sus-comment__extend flex"},Xb=["src"],Qb=["onClick"],uf=bn(m.defineComponent({__name:"index",props:{reply:{},toolBar:{},infoBar:{},placeholder:{default:"支持常见的markdown语法,如图片、代码块等"},comment:{}},emits:["on-save","on-cancel","add-image","update-avatar"],setup(n,{expose:e,emit:t}){class r{articleId="";userName="";userEmail="";userWebsite="";userAvatar="";content="";contentText="";replyName="";parentId="";notify=0;privacy=!1}const i=n;e({updateImage:M,updatePreviewImage:T});const s=t,o=m.reactive({emojis:i.toolBar?.emoji?.emojis||[],showPanel:!1}),l=i.reply?.userName,a=m.ref("在此处留下你的足迹吧!(支持markdown语法)"),c=m.reactive(new r),u=m.ref(""),d=m.ref(null),f=m.ref([]),h=m.ref(null),p=i.comment?.privacy||!1,g={enable:i.infoBar?.enable===void 0?!0:i.infoBar.enable,name:{show:i.infoBar?.name?.show===void 0?!0:i.infoBar.name.show,placeholder:i.infoBar?.name?.placeholder||"昵称(必填)"},website:{show:i.infoBar?.website?.show===void 0?!0:i.infoBar.website.show,placeholder:i.infoBar?.website?.placeholder||"网址(https://)",tips:i.infoBar?.website?.tips||"点击昵称时可跳转"},email:{show:i.infoBar?.email?.show===void 0?!0:i.infoBar.email.show,placeholder:i.infoBar?.email?.placeholder||"邮箱(不会公开,仅用于通知回复)",tips:i.infoBar?.email?.tips||"输入QQ邮箱自动获取头像"}},y=Oy({extensions:[u1,h1,l1.configure({placeholder:i.placeholder}),M0.configure({openOnClick:!1,defaultProtocol:"https"}),Rb,C1]});function w(){i.comment&&(c.privacy=i.comment.privacy||!1,c.notify=i.comment.notify||1,c.userName=i.comment.userName||"",c.userEmail=i.comment.userEmail||"",c.userWebsite=i.comment.userWebsite||"",c.userAvatar=i.comment.userAvatar||"",c.content=i.comment.content||"",c.articleId=i.comment.articleId||"")}async function k(){if(!(!y||!y.value)){if(u.value=y.value.getHTML(),c.userWebsite&&(c.userWebsite.concat("http://")||c.userWebsite.concat("https://")||(c.userWebsite="https://"+c.userWebsite)),localStorage.setItem("user",JSON.stringify(c)),localStorage.setItem("comment-content",u.value),i.reply.id!="0"){const K=i.reply.parentId;c.parentId=K==="0"?i.reply.id:K,c.replyName=i.reply.userName,a.value="@"+l+":"}c.content=u.value,c.contentText=y.value.getText(),s("on-save",c,h.value)}}function C(){localStorage.setItem("comment-content",""),s("on-cancel")}function R(){s("add-image",d.value,h.value)}function M(K){h.value||(h.value=[]),!h.value||h.value.length==0?h.value=K:h.value=I(h.value,K[0]),f.value=[];for(let P=0;P<h.value.length;P++)f.value.push(URL.createObjectURL(h.value[P]))}function I(K,P){return[...K,P]}function T(K){f.value=K}function _(){s("update-avatar",c)}function W(){c.notify==1?c.notify=0:c.notify=1}function j(K){try{if(!h.value||!h.value.length||h.value.length<=1){h.value=[],f.value=[];return}h.value?.splice(K,1),f.value.splice(K,1)}catch(P){console.log("remove image error: ",P),h.value=[],f.value=[]}}return m.onMounted(()=>{if(!y||!y.value)return;w();const K=localStorage.getItem("user");if(c.content&&c.content.length>3)y.value.commands.setContent(c.content);else{const P=localStorage.getItem("comment-content");P&&y.value.commands.setContent(P)}if(K){const P=JSON.parse(K);c.userName=P.userName,c.userEmail=P.userEmail,c.userWebsite=P.userWebsite,_()}c.notify=1}),(K,P)=>(m.openBlock(),m.createElementBlock("div",Db,[g.enable?(m.openBlock(),m.createElementBlock("div",Ib,[m.withDirectives(m.createElementVNode("img",{alt:"头像",src:c.userAvatar,class:"sus-avatar",onerror:"this.onerror=null,this.src='/error.webp'"},null,8,Pb),[[m.vShow,!!c.userAvatar]]),m.withDirectives(m.createElementVNode("span",{class:"sus-avatar-text flex w-full h-full items-center justify-center"},m.toDisplayString(c?.userName?.charAt(0)),513),[[m.vShow,!c.userAvatar]])])):m.createCommentVNode("",!0),m.createElementVNode("div",Lb,[g.enable?(m.openBlock(),m.createElementBlock("div",Bb,[g.name.show?(m.openBlock(),m.createElementBlock("div",_b,[m.withDirectives(m.createElementVNode("input",{class:"sus-input sus-username",placeholder:g.name.placeholder,"onUpdate:modelValue":P[0]||(P[0]=Q=>c.userName=Q),maxlength:"23"},null,8,Vb),[[m.vModelText,c.userName]])])):m.createCommentVNode("",!0),g.website.show?(m.openBlock(),m.createElementBlock("div",$b,[m.createVNode(m.unref(qn.OuOTooltip),{content:g.website.tips},{default:m.withCtx(()=>[m.withDirectives(m.createElementVNode("input",{class:"sus-input sus-web",placeholder:g.website.placeholder,"onUpdate:modelValue":P[1]||(P[1]=Q=>c.userWebsite=Q),maxlength:"35"},null,8,zb),[[m.vModelText,c.userWebsite]])]),_:1},8,["content"])])):m.createCommentVNode("",!0),g.email.show?(m.openBlock(),m.createElementBlock("div",Hb,[m.createVNode(m.unref(qn.OuOTooltip),{content:g.email.tips},{default:m.withCtx(()=>[m.withDirectives(m.createElementVNode("input",{onBlur:_,class:"sus-input sus-email",placeholder:g.email.placeholder,"onUpdate:modelValue":P[2]||(P[2]=Q=>c.userEmail=Q),maxlength:"35"},null,40,Fb),[[m.vModelText,c.userEmail]])]),_:1},8,["content"])])):m.createCommentVNode("",!0)])):m.createCommentVNode("",!0),m.createElementVNode("div",jb,[m.createVNode(Ab,{editor:m.unref(y),showMenu:n.toolBar?.bubbleMenu?.show},null,8,["editor","showMenu"]),m.withDirectives(m.createVNode(Dy,{class:"absolute bottom-2 left-1",emoji:o,editor:m.unref(y)},null,8,["emoji","editor"]),[[m.vShow,o.showPanel]]),m.createVNode(m.unref(Ty),{class:"sus-comment-input",editor:m.unref(y)},null,8,["editor"])]),m.createElementVNode("div",Ub,[m.createElementVNode("div",Wb,[o.emojis.length>=0?(m.openBlock(),m.createElementBlock("div",Kb,[(m.openBlock(),m.createElementBlock("svg",{onClick:P[3]||(P[3]=Q=>o.showPanel=!o.showPanel),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...P[5]||(P[5]=[m.createStaticVNode('<g fill="none" data-v-968e6aef><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M9 16c.85.63 1.885 1 3 1s2.15-.37 3-1" data-v-968e6aef></path><path fill="currentColor" d="M16 10.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5s.448-1.5 1-1.5s1 .672 1 1.5" data-v-968e6aef></path><ellipse cx="9" cy="10.5" fill="currentColor" rx="1" ry="1.5" data-v-968e6aef></ellipse><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 3.338A9.95 9.95 0 0 1 12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12c0-1.821.487-3.53 1.338-5" data-v-968e6aef></path></g>',1)])]))])):m.createCommentVNode("",!0),n.toolBar?.image?(m.openBlock(),m.createElementBlock("div",qb,[m.createElementVNode("input",{ref_key:"imgRef",ref:d,onChange:R,type:"file",id:"upload-input",name:"image",accept:"image/*"},null,544),P[6]||(P[6]=m.createStaticVNode('<label for="upload-input" data-v-968e6aef><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-968e6aef><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5" data-v-968e6aef><path d="m2 12.5l1.752-1.533a2.3 2.3 0 0 1 3.14.105l4.29 4.29a2 2 0 0 0 2.564.222l.299-.21a3 3 0 0 1 3.731.225L21 18.5m-6-13h3.5m0 0H22m-3.5 0V9m0-3.5V2" data-v-968e6aef></path><path d="M22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12c0-1.128 0-2.122.02-3M12 2C7.286 2 4.929 2 3.464 3.464c-.424.425-.726.925-.94 1.536" data-v-968e6aef></path></g></svg></label>',1))])):m.createCommentVNode("",!0),n.toolBar?.notify?(m.openBlock(),m.createElementBlock("div",{key:2,onClick:W,class:"p-1"},[m.withDirectives(m.createVNode(m.unref(qn.OuOTooltip),{content:"收到回复后通知"},{default:m.withCtx(()=>[...P[7]||(P[7]=[m.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[m.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",d:"M12 6v4m-4.5 9c.655 1.748 2.422 3 4.5 3q.367 0 .72-.05M16.5 19a4.5 4.5 0 0 1-1.302 1.84M9.107 2.674A6.5 6.5 0 0 1 12 2c3.727 0 6.75 3.136 6.75 7.005v.705a4.4 4.4 0 0 0 .692 2.375l1.108 1.724c1.011 1.575.239 3.716-1.52 4.214a25.8 25.8 0 0 1-14.06 0c-1.759-.498-2.531-2.639-1.52-4.213l1.108-1.725A4.4 4.4 0 0 0 5.25 9.71v-.705c0-1.074.233-2.092.65-3.002"})],-1)])]),_:1},512),[[m.vShow,c.notify===1]]),m.withDirectives(m.createVNode(m.unref(qn.OuOTooltip),{content:"收到回复后不通知"},{default:m.withCtx(()=>[...P[8]||(P[8]=[m.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{"stroke-linejoin":"round",d:"M10 9h4l-4 4h4"}),m.createElementVNode("path",{d:"M7.5 19c.655 1.748 2.422 3 4.5 3q.367 0 .72-.05M16.5 19a4.5 4.5 0 0 1-1.302 1.84M9.107 2.674A6.5 6.5 0 0 1 12 2c3.727 0 6.75 3.136 6.75 7.005v.705a4.4 4.4 0 0 0 .692 2.375l1.108 1.724c1.011 1.575.239 3.716-1.52 4.214a25.8 25.8 0 0 1-14.06 0c-1.759-.498-2.531-2.639-1.52-4.213l1.108-1.725A4.4 4.4 0 0 0 5.25 9.71v-.705c0-1.074.233-2.092.65-3.002"})])],-1)])]),_:1},512),[[m.vShow,c.notify!==1]])])):m.createCommentVNode("",!0)]),m.createElementVNode("div",{class:"sus-comment__footer-send flex justify-end my-2"},[m.createElementVNode("button",{class:"sus-button cancel mx-2",onClick:C},"取消"),m.createElementVNode("button",{class:"sus-button ok",onClick:k},"发送")])]),m.createElementVNode("div",Jb,[m.withDirectives(m.createVNode(m.unref(qn.OuOCheckbox),{modelValue:c.privacy,"onUpdate:modelValue":P[4]||(P[4]=Q=>c.privacy=Q),checked:m.unref(p)},{default:m.withCtx(()=>[...P[9]||(P[9]=[m.createTextVNode(" 仅博主可见 ",-1)])]),_:1},8,["modelValue","checked"]),[[m.vShow,n.toolBar?.privacy?.show]]),m.withDirectives(m.createElementVNode("div",Gb,null,512),[[m.vShow,n.toolBar?.privacy?.disable]])]),m.createElementVNode("div",Yb,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(f.value,(Q,Z)=>(m.openBlock(),m.createElementBlock("div",{class:"sus-comment__extend-img relative",key:Q},[m.createElementVNode("img",{class:"img-item",src:Q,alt:""},null,8,Xb),m.createElementVNode("div",{onClick:ke=>j(Z),class:"mask"},[...P[10]||(P[10]=[m.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-968e6aef><g fill="none" stroke="currentColor" stroke-width="1.5" data-v-968e6aef><path stroke-linecap="round" d="M20.5 6h-17m6 5l.5 5m4.5-5l-.5 5" data-v-968e6aef></path><path d="M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6" data-v-968e6aef></path><path stroke-linecap="round" d="M18.374 15.4c-.177 2.654-.266 3.981-1.131 4.79s-2.195.81-4.856.81h-.774c-2.66 0-3.99 0-4.856-.81c-.865-.809-.953-2.136-1.13-4.79l-.46-6.9m13.666 0l-.2 3" data-v-968e6aef></path></g></svg>',1)])],8,Qb)]))),128))])])]))}}),[["__scopeId","data-v-968e6aef"]]);function Zb(n){const e=new Date(n),t=e.getFullYear(),r=e.getMonth()+1,i=e.getDate(),s=new Date,o=s.getFullYear(),l=s.getMonth()+1,a=s.getDate();if(o===t&&l==r){const c=a-i;if(c===0)return"今天";if(c<7)return c+"天前"}return o===t?`${r}月${i}日`:`${t}年${r}月${i}日`}const ew={class:"sus-item__container relative"},tw={class:"sus-item-svg",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},nw={class:"flex flex-row"},rw={class:"sus-item__operate absolute flex"},iw={class:"sus-comment-aside"},sw={class:"sus-comment-avatar"},ow=["src"],lw={class:"sus-item-floor mt-2"},aw={class:"sus-item__main w-full overflow-hidden"},cw={class:"sus-item__user leading-loose"},uw=["rel","href"],dw={key:0,class:"sus-item-tag mx-1",title:"博主"},fw={key:1,class:"sus-item__content-name mx-1.5"},hw={class:"sus-item__user-date ml-3"},pw={key:0,class:"sus-item__content"},mw=["innerHTML"],gw={key:1,class:"sus-item__content"},yw=["innerHTML"],bw={key:0,class:"sus-item__info flex justify-end mx-1"},ww={class:"sus-item__info-area flex items-center"},kw={class:"sus-item__info-useragent flex items-center"},is=bn(m.defineComponent({__name:"item",props:{comment:{},lineHeight:{},showFooter:{type:Boolean},num:{default:1}},emits:["on-reply","on-remove"],setup(n,{emit:e}){const t=n,r=m.ref(),i=m.ref(),s=m.ref(!1),o=e;function l(){r.value.style.display="block",s.value=!1}function a(){const h=r?.value?.clientHeight||0,p=t.lineHeight*5;h>=p&&(s.value=!0)}function c(){o("on-reply",t.comment)}function u(){o("on-remove",t.comment)}function d(){t.comment.userAvatar||(t.comment.userAvatar="/error.webp")}function f(){const h=new Date(t.comment?.createdDate),p=new Date,g=new Date(p.getFullYear()-1,p.getMonth(),p.getDate());return h>g?"ugc noopener nofollow":"ugc noopener noreferrer nofollow"}return m.onMounted(()=>{d(),a()}),(h,p)=>(m.openBlock(),m.createElementBlock("div",ew,[m.withDirectives((m.openBlock(),m.createElementBlock("svg",tw,[...p[0]||(p[0]=[m.createElementVNode("rect",{width:"24",height:"24",fill:"none"},null,-1),m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{d:"M21 7v-.281c0-2.19 0-3.285-.707-3.884c-.707-.6-1.788-.42-3.95-.059l-1.055.176c-1.64.273-2.46.41-3.288.41s-1.648-.137-3.288-.41l-1.054-.176c-2.162-.36-3.243-.54-3.95.059S3 4.529 3 6.719V12c0 5.49 4.239 8.155 6.899 9.286c.721.307 1.082.46 2.101.46c1.02 0 1.38-.153 2.101-.46C16.761 20.155 21 17.49 21 12v-1"}),m.createElementVNode("path",{d:"M6.5 9c.291-.583 1.077-1 2-1s1.709.417 2 1m3 0c.291-.583 1.077-1 2-1s1.709.417 2 1m-9 5s1.05 1 3.5 1s3.5-1 3.5-1"})],-1)])],512)),[[m.vShow,n.comment.band==="privacy"]]),m.createElementVNode("div",nw,[m.createElementVNode("div",rw,[m.withDirectives(m.createElementVNode("span",{onClick:u,class:"sus-item__operate-delete cursor-pointer"}," 删除 ",512),[[m.vShow,!n.comment.privacy&&n.comment.showEdit]]),m.withDirectives(m.createElementVNode("span",{onClick:c,class:"sus-item__operate-edit cursor-pointer"}," 编辑 ",512),[[m.vShow,!n.comment.privacy&&n.comment.showEdit]]),m.withDirectives(m.createElementVNode("span",{onClick:c,class:"sus-item__operate-reply cursor-pointer"}," 回复 ",512),[[m.vShow,!n.comment.privacy]])]),m.createElementVNode("div",iw,[m.createElementVNode("div",sw,[m.withDirectives(m.createElementVNode("img",{alt:"",class:"sus-avatar",src:n.comment.userAvatar,onerror:"this.onerror=null,this.src='/error.webp'"},null,8,ow),[[m.vShow,!!n.comment.userAvatar]]),m.withDirectives(m.createElementVNode("span",{class:"sus-avatar-text flex w-full h-full items-center justify-center"},m.toDisplayString(n.comment.userName.charAt(0)),513),[[m.vShow,!n.comment.userAvatar]])]),m.createElementVNode("p",lw,m.toDisplayString(n.num),1)]),m.createElementVNode("div",aw,[m.createElementVNode("div",cw,[m.createElementVNode("a",{target:"_blank",rel:f(),href:n.comment.userWebsite,class:m.normalizeClass([n.comment.tagName,"sus-item__user-name font-semibold ml-1 cursor-pointer"])},m.toDisplayString(n.comment.userName),11,uw),n.comment.tagName==="owner"?(m.openBlock(),m.createElementBlock("span",dw," 博主 ")):m.createCommentVNode("",!0),n.comment.replyName?(m.openBlock(),m.createElementBlock("span",fw,"@"+m.toDisplayString(n.comment.replyName),1)):m.createCommentVNode("",!0),m.createElementVNode("span",hw,m.toDisplayString(m.unref(Zb)(n.comment.createdDate)),1)]),n.comment.privacy?(m.openBlock(),m.createElementBlock("div",pw,[p[1]||(p[1]=m.createElementVNode("div",{class:"sus-item-privacy"},null,-1)),m.createElementVNode("span",{class:"sus-item-privacy-text",innerHTML:n.comment.content},null,8,mw)])):(m.openBlock(),m.createElementBlock("div",gw,[m.createElementVNode("span",{ref_key:"contentDom",ref:r,class:"sus-item__content-text",innerHTML:n.comment.content+(n.comment.contentExtends||"")},null,8,yw),s.value?(m.openBlock(),m.createElementBlock("a",{key:0,ref_key:"showMoreDom",ref:i,class:"sus-show-detail my-1.5 cursor-pointer",onClick:l},"显示更多>",512)):m.createCommentVNode("",!0)]))])]),n.showFooter&&n.comment.area&&!n.comment.privacy?(m.openBlock(),m.createElementBlock("div",bw,[m.createElementVNode("span",ww,[p[2]||(p[2]=m.createElementVNode("svg",{class:"sus-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{d:"M12.5 7.041A3 3 0 1 0 14.959 9.5"}),m.createElementVNode("path",{d:"M5 15.216c-.647-1.654-1-3.415-1-5.073C4 5.646 7.582 2 12 2s8 3.646 8 8.143c0 4.462-2.553 9.67-6.537 11.531a3.45 3.45 0 0 1-2.926 0C9.265 21.08 8.138 20.144 7.194 19"})])],-1)),m.createTextVNode(" "+m.toDisplayString(n.comment.area),1)]),m.createElementVNode("span",kw,[p[3]||(p[3]=m.createElementVNode("svg",{class:"sus-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[m.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",d:"M5 2.252c-.774.169-1.359.45-1.828.92C2 4.343 2 6.229 2 10v1c0 2.828 0 4.243.879 5.121C3.757 17 5.172 17 8 17h8c2.828 0 4.243 0 5.121-.879C22 15.243 22 13.828 22 11v-1c0-3.771 0-5.657-1.172-6.828S17.771 2 14 2H9m7 20H8m4-5v5m10-9h-6M2 13h10"})],-1)),m.createTextVNode(" "+m.toDisplayString(n.comment.userAgent),1)])])):m.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-8ee9ae13"]]),xw={class:"sus-comment__item"},Sw={key:0,class:"sus-comment__item-child"},Cw={key:1},Ew={key:0,class:"sus-comment__item-footer flex justify-center w-full cursor-pointer"},df=bn(m.defineComponent({__name:"index",props:{comment:{},lineHeight:{default:23},showFooter:{type:Boolean,default:!1}},emits:["on-reply"],setup(n,{emit:e}){const t=m.ref(!1),r=e;function i(s){r("on-reply",s)}return(s,o)=>(m.openBlock(),m.createElementBlock("div",xw,[m.createVNode(is,{comment:n.comment,onOnReply:o[0]||(o[0]=l=>i(n.comment)),lineHeight:n.lineHeight,showFooter:n.showFooter},null,8,["comment","lineHeight","showFooter"]),n.comment.child?.length>0?(m.openBlock(),m.createElementBlock("div",Sw,[m.createVNode(is,{onOnReply:o[1]||(o[1]=l=>i(n.comment.child[0])),comment:n.comment.child[0],num:2,showFooter:n.showFooter,lineHeight:n.lineHeight,class:"sus-comment__item-child__item"},null,8,["comment","showFooter","lineHeight"]),n.comment.child?.length>1?(m.openBlock(),m.createBlock(is,{key:0,onOnReply:o[2]||(o[2]=l=>i(n.comment.child[1])),comment:n.comment.child[1],num:3,showFooter:n.showFooter,lineHeight:n.lineHeight,class:"sus-comment__item-child__item"},null,8,["comment","showFooter","lineHeight"])):m.createCommentVNode("",!0),n.comment.child?.length>2?(m.openBlock(),m.createElementBlock("div",Cw,[t.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Ew,[m.createElementVNode("p",{class:"sus-load-more",onClick:o[3]||(o[3]=l=>t.value=!0)}," 查看更多回复 > ")])),t.value?(m.openBlock(!0),m.createElementBlock(m.Fragment,{key:1},m.renderList(n.comment.child.slice(2),(l,a)=>(m.openBlock(),m.createBlock(is,{onOnReply:c=>i(l),key:a,comment:l,num:4+a,showFooter:n.showFooter,lineHeight:n.lineHeight,class:"sus-comment__item-child__item"},null,8,["onOnReply","comment","num","showFooter","lineHeight"]))),128)):m.createCommentVNode("",!0)])):m.createCommentVNode("",!0)])):m.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-162930a9"]]),Mw={class:"sus-top-item flex items-start p-1.5 overflow-hidden"},vw={class:"sus-top-item__info flex flex-col mr-1"},Tw={class:"sus-top-item__user whitespace-nowrap"},Ow={key:0,class:"sus-top-item__reply whitespace-nowrap"},Nw=["innerHTML"],ff=bn(m.defineComponent({__name:"simple",props:{comment:{}},setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",Mw,[m.createElementVNode("div",vw,[m.createElementVNode("span",Tw,m.toDisplayString(n.comment.userName)+": ",1),n.comment.replyName?(m.openBlock(),m.createElementBlock("span",Ow,m.toDisplayString("@"+n.comment.replyName),1)):m.createCommentVNode("",!0)]),m.createElementVNode("span",{class:"sus-top-item__content w-full",innerHTML:n.comment.content},null,8,Nw)]))}}),[["__scopeId","data-v-7407d86d"]]),Aw={class:"sus-top-item__user flex items-center"},Rw={key:0,class:"sus-top-item__user-avatar ml-1 mr-2"},Dw=["src"],Iw={class:"sus-top-item__user-owner"},Pw={class:"sus-top-item__user-reply ml-3 opacity-70"},Lw=["innerHTML"],hf=bn(m.defineComponent({__name:"index",props:{comment:{}},emits:["go-local"],setup(n,{emit:e}){const t=e;function r(){t("go-local")}return(i,s)=>(m.openBlock(),m.createElementBlock("div",{class:"sus-top-item p-1.5 cursor-pointer overflow-hidden",onClick:r},[m.createElementVNode("div",Aw,[n.comment.userAvatar?(m.openBlock(),m.createElementBlock("div",Rw,[m.createElementVNode("img",{alt:"",class:"sus-avatar",loading:"lazy",decoding:"async",src:n.comment.userAvatar,onerror:"this.onerror=null,this.src='/error.webp'"},null,8,Dw)])):m.createCommentVNode("",!0),m.createElementVNode("div",Iw,m.toDisplayString(n.comment.userName),1),m.createElementVNode("div",Pw,m.toDisplayString(n.comment.replyName?"@"+n.comment.replyName:""),1)]),m.createElementVNode("div",{class:"sus-top-item__content p-1",innerHTML:n.comment.content},null,8,Lw)]))}}),[["__scopeId","data-v-1e2f9488"]]),Bw=[uf,df,hf,ff],_w={install(n){Bw.forEach(e=>{n.component(e.name,e)})}};je.SuSComment=uf,je.SuSList=df,je.SuSSimpleTop=ff,je.SuSTop=hf,je.default=_w,Object.defineProperties(je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
106
|
+
`,1;if(kl>1e5&&kl>B.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ie+=Y,Y.length}const wt=tn(v);if(!wt)throw Sn(ge.replace("{}",v)),new Error('Unknown language: "'+v+'"');const Tk=lk(wt);let wl="",J=re||Tk;const Nf={},Ae=new D.__emitter(D);vk();let ie="",fs=0,Cn=0,kl=0,xl=!1;try{if(wt.__emitTokens)wt.__emitTokens(z,Ae);else{for(J.matcher.considerAll();;){kl++,xl?xl=!1:J.matcher.considerAll(),J.matcher.lastIndex=Cn;const A=J.matcher.exec(z);if(!A)break;const B=z.substring(Cn,A.index),Y=Of(B,A);Cn=A.index+Y}Of(z.substring(Cn))}return Ae.finalize(),wl=Ae.toHTML(),{language:v,value:wl,relevance:fs,illegal:!1,_emitter:Ae,_top:J}}catch(A){if(A.message&&A.message.includes("Illegal"))return{language:v,value:ml(z),illegal:!0,relevance:0,_illegalBy:{message:A.message,index:Cn,context:z.slice(Cn-100,Cn+100),mode:A.mode,resultSoFar:wl},_emitter:Ae};if(me)return{language:v,value:ml(z),illegal:!1,relevance:0,errorRaised:A,_emitter:Ae,_top:J};throw A}}function gl(v){const z={value:ml(v),illegal:!1,relevance:0,_top:L,_emitter:new D.__emitter(D)};return z._emitter.addText(v),z}function yl(v,z){z=z||D.languages||Object.keys(x);const X=gl(v),re=z.filter(tn).filter(Ef).map(qe=>Tr(qe,v,!1));re.unshift(X);const xe=re.sort((qe,bt)=>{if(qe.relevance!==bt.relevance)return bt.relevance-qe.relevance;if(qe.language&&bt.language){if(tn(qe.language).supersetOf===bt.language)return 1;if(tn(bt.language).supersetOf===qe.language)return-1}return 0}),[ot,nn]=xe,us=ot;return us.secondBest=nn,us}function fk(v,z,X){const re=z&&O[z]||X;v.classList.add("hljs"),v.classList.add(`language-${re}`)}function bl(v){let z=null;const X=ve(v);if(U(X))return;if(cs("before:highlightElement",{el:v,language:X}),v.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",v);return}if(v.children.length>0&&(D.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(v)),D.throwUnescapedHTML))throw new uk("One of your code blocks includes unescaped HTML.",v.innerHTML);z=v;const re=z.textContent,xe=X?we(re,{language:X,ignoreIllegals:!0}):yl(re);v.innerHTML=xe.value,v.dataset.highlighted="yes",fk(v,X,xe.language),v.result={language:xe.language,re:xe.relevance,relevance:xe.relevance},xe.secondBest&&(v.secondBest={language:xe.secondBest.language,relevance:xe.secondBest.relevance}),cs("after:highlightElement",{el:v,result:xe,text:re})}function hk(v){D=wf(D,v)}const pk=()=>{as(),Un("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function mk(){as(),Un("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Sf=!1;function as(){function v(){as()}if(document.readyState==="loading"){Sf||window.addEventListener("DOMContentLoaded",v,!1),Sf=!0;return}document.querySelectorAll(D.cssSelector).forEach(bl)}function gk(v,z){let X=null;try{X=z(b)}catch(re){if(Sn("Language definition for '{}' could not be registered.".replace("{}",v)),me)Sn(re);else throw re;X=L}X.name||(X.name=v),x[v]=X,X.rawDefinition=z.bind(null,b),X.aliases&&Cf(X.aliases,{languageName:v})}function yk(v){delete x[v];for(const z of Object.keys(O))O[z]===v&&delete O[z]}function bk(){return Object.keys(x)}function tn(v){return v=(v||"").toLowerCase(),x[v]||x[O[v]]}function Cf(v,{languageName:z}){typeof v=="string"&&(v=[v]),v.forEach(X=>{O[X.toLowerCase()]=z})}function Ef(v){const z=tn(v);return z&&!z.disableAutodetect}function wk(v){v["before:highlightBlock"]&&!v["before:highlightElement"]&&(v["before:highlightElement"]=z=>{v["before:highlightBlock"](Object.assign({block:z.el},z))}),v["after:highlightBlock"]&&!v["after:highlightElement"]&&(v["after:highlightElement"]=z=>{v["after:highlightBlock"](Object.assign({block:z.el},z))})}function kk(v){wk(v),q.push(v)}function xk(v){const z=q.indexOf(v);z!==-1&&q.splice(z,1)}function cs(v,z){const X=v;q.forEach(function(re){re[X]&&re[X](z)})}function Sk(v){return Un("10.7.0","highlightBlock will be removed entirely in v12.0"),Un("10.7.0","Please use highlightElement now."),bl(v)}Object.assign(b,{highlight:we,highlightAuto:yl,highlightAll:as,highlightElement:bl,highlightBlock:Sk,configure:hk,initHighlighting:pk,initHighlightingOnLoad:mk,registerLanguage:gk,unregisterLanguage:yk,listLanguages:bk,getLanguage:tn,registerAliases:Cf,autoDetection:Ef,inherit:wf,addPlugin:kk,removePlugin:xk}),b.debugMode=function(){me=!1},b.safeMode=function(){me=!0},b.versionString=ck,b.regex={concat:g,lookahead:f,either:w,optional:p,anyNumberOfTimes:h};for(const v in ss)typeof ss[v]=="object"&&n(ss[v]);return Object.assign(b,ss),b},Wn=xf({});return Wn.newInstance=()=>xf({}),tl=Wn,Wn.HighlightJS=Wn,Wn.default=Wn,tl}var g1=m1();const y1=p1(g1);function yd(n,e=[]){return n.flatMap(t=>{const r=[...e,...t.properties?t.properties.className:[]];return t.children?yd(t.children,r):{text:t.value,classes:r}})}function bd(n){return n.value||n.children||[]}function b1(n){return!!y1.getLanguage(n)}function wd({doc:n,name:e,lowlight:t,defaultLanguage:r}){const i=[];return ao(n,s=>s.type.name===e).forEach(s=>{var o;let l=s.pos+1;const a=s.node.attrs.language||r,c=t.listLanguages(),u=a&&(c.includes(a)||b1(a)||(o=t.registered)!=null&&o.call(t,a))?bd(t.highlight(a,s.node.textContent)):bd(t.highlightAuto(s.node.textContent));yd(u).forEach(d=>{const f=l+d.text.length;if(d.classes.length){const h=Ie.inline(l,f,{class:d.classes.join(" ")});i.push(h)}l=f})}),ae.create(n,i)}function w1(n){return typeof n=="function"}function k1({name:n,lowlight:e,defaultLanguage:t}){if(!["highlight","highlightAuto","listLanguages"].every(i=>w1(e[i])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new se({key:new le("lowlight"),state:{init:(i,{doc:s})=>wd({doc:s,name:n,lowlight:e,defaultLanguage:t}),apply:(i,s,o,l)=>{const a=o.selection.$head.parent.type.name,c=l.selection.$head.parent.type.name,u=ao(o.doc,f=>f.type.name===n),d=ao(l.doc,f=>f.type.name===n);return i.docChanged&&([a,c].includes(n)||d.length!==u.length||i.steps.some(f=>f.from!==void 0&&f.to!==void 0&&u.some(h=>h.pos>=f.from&&h.pos+h.node.nodeSize<=f.to)))?wd({doc:i.doc,name:n,lowlight:e,defaultLanguage:t}):s.map(i.mapping,i.doc)}},props:{decorations(i){return r.getState(i)}}});return r}var x1=Wy.extend({addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var n;return[...((n=this.parent)==null?void 0:n.call(this))||[],k1({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});const S1=Lf.createLowlight(),C1=x1.extend({addNodeView(){return({node:n,getPos:e,editor:t})=>{const r=document.createElement("div"),i=document.createElement("pre"),s=document.createElement("code"),o=document.createElement("select");o.setAttribute("class","code-select"),r.setAttribute("class","code-box");const l=["plaintext","java","javascript","html","shell"];return n.attrs.language&&l.lastIndexOf(n.attrs.language)<0&&l.push(n.attrs.language),l.forEach(a=>{const c=document.createElement("option");c.value=a,c.textContent=a,n.attrs.language===a&&(c.selected=!0),o.appendChild(c)}),o.addEventListener("change",a=>{const{value:c}=a.target;t.commands.updateAttributes("codeBlock",{language:c})}),i.appendChild(s),r.appendChild(o),r.appendChild(i),{dom:r,contentDOM:s}}}}).configure({lowlight:S1}),kd=["top","right","bottom","left"],xd=["start","end"],Sd=kd.reduce((n,e)=>n.concat(e,e+"-"+xd[0],e+"-"+xd[1]),[]),ft=Math.min,ze=Math.max,qi=Math.round,ht=n=>({x:n,y:n}),E1={left:"right",right:"left",bottom:"top",top:"bottom"},M1={start:"end",end:"start"};function nl(n,e,t){return ze(n,ft(e,t))}function At(n,e){return typeof n=="function"?n(e):n}function et(n){return n.split("-")[0]}function rt(n){return n.split("-")[1]}function Cd(n){return n==="x"?"y":"x"}function rl(n){return n==="y"?"height":"width"}const v1=new Set(["top","bottom"]);function pt(n){return v1.has(et(n))?"y":"x"}function il(n){return Cd(pt(n))}function Ed(n,e,t){t===void 0&&(t=!1);const r=rt(n),i=il(n),s=rl(i);let o=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Gi(o)),[o,Gi(o)]}function T1(n){const e=Gi(n);return[Ji(n),e,Ji(e)]}function Ji(n){return n.replace(/start|end/g,e=>M1[e])}const Md=["left","right"],vd=["right","left"],O1=["top","bottom"],N1=["bottom","top"];function A1(n,e,t){switch(n){case"top":case"bottom":return t?e?vd:Md:e?Md:vd;case"left":case"right":return e?O1:N1;default:return[]}}function R1(n,e,t,r){const i=rt(n);let s=A1(et(n),t==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Ji)))),s}function Gi(n){return n.replace(/left|right|bottom|top/g,e=>E1[e])}function D1(n){return{top:0,right:0,bottom:0,left:0,...n}}function sl(n){return typeof n!="number"?D1(n):{top:n,right:n,bottom:n,left:n}}function $n(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function Td(n,e,t){let{reference:r,floating:i}=n;const s=pt(e),o=il(e),l=rl(o),a=et(e),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[l]/2-i[l]/2;let h;switch(a){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(rt(e)){case"start":h[o]-=f*(t&&c?-1:1);break;case"end":h[o]+=f*(t&&c?-1:1);break}return h}const I1=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=t,l=s.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:n,floating:e,strategy:i}),{x:u,y:d}=Td(c,r,a),f=r,h={},p=0;for(let g=0;g<l.length;g++){const{name:y,fn:w}=l[g],{x:k,y:C,data:R,reset:M}=await w({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:n,floating:e}});u=k??u,d=C??d,h={...h,[y]:{...h[y],...R}},M&&p<=50&&(p++,typeof M=="object"&&(M.placement&&(f=M.placement),M.rects&&(c=M.rects===!0?await o.getElementRects({reference:n,floating:e,strategy:i}):M.rects),{x:u,y:d}=Td(c,f,a)),g=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function zn(n,e){var t;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:l,strategy:a}=n,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=At(e,n),p=sl(h),y=l[f?d==="floating"?"reference":"floating":d],w=$n(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(y)))==null||t?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),k=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),R=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},M=$n(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:C,strategy:a}):k);return{top:(w.top-M.top+p.top)/R.y,bottom:(M.bottom-w.bottom+p.bottom)/R.y,left:(w.left-M.left+p.left)/R.x,right:(M.right-w.right+p.right)/R.x}}const P1=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:r,placement:i,rects:s,platform:o,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=At(n,e)||{};if(c==null)return{};const d=sl(u),f={x:t,y:r},h=il(i),p=rl(h),g=await o.getDimensions(c),y=h==="y",w=y?"top":"left",k=y?"bottom":"right",C=y?"clientHeight":"clientWidth",R=s.reference[p]+s.reference[h]-f[h]-s.floating[p],M=f[h]-s.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let T=I?I[C]:0;(!T||!await(o.isElement==null?void 0:o.isElement(I)))&&(T=l.floating[C]||s.floating[p]);const _=R/2-M/2,W=T/2-g[p]/2-1,j=ft(d[w],W),K=ft(d[k],W),P=j,Q=T-g[p]-K,Z=T/2-g[p]/2+_,ke=nl(P,Z,Q),he=!a.arrow&&rt(i)!=null&&Z!==ke&&s.reference[p]/2-(Z<P?j:K)-g[p]/2<0,pe=he?Z<P?Z-P:Z-Q:0;return{[h]:f[h]+pe,data:{[h]:ke,centerOffset:Z-ke-pe,...he&&{alignmentOffset:pe}},reset:he}}});function L1(n,e,t){return(n?[...t.filter(i=>rt(i)===n),...t.filter(i=>rt(i)!==n)]:t.filter(i=>et(i)===i)).filter(i=>n?rt(i)===n||(e?Ji(i)!==i:!1):!0)}const B1=function(n){return n===void 0&&(n={}),{name:"autoPlacement",options:n,async fn(e){var t,r,i;const{rects:s,middlewareData:o,placement:l,platform:a,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Sd,autoAlignment:h=!0,...p}=At(n,e),g=d!==void 0||f===Sd?L1(d||null,h,f):f,y=await zn(e,p),w=((t=o.autoPlacement)==null?void 0:t.index)||0,k=g[w];if(k==null)return{};const C=Ed(k,s,await(a.isRTL==null?void 0:a.isRTL(c.floating)));if(l!==k)return{reset:{placement:g[0]}};const R=[y[et(k)],y[C[0]],y[C[1]]],M=[...((r=o.autoPlacement)==null?void 0:r.overflows)||[],{placement:k,overflows:R}],I=g[w+1];if(I)return{data:{index:w+1,overflows:M},reset:{placement:I}};const T=M.map(j=>{const K=rt(j.placement);return[j.placement,K&&u?j.overflows.slice(0,2).reduce((P,Q)=>P+Q,0):j.overflows[0],j.overflows]}).sort((j,K)=>j[1]-K[1]),W=((i=T.filter(j=>j[2].slice(0,rt(j[0])?2:3).every(K=>K<=0))[0])==null?void 0:i[0])||T[0][0];return W!==l?{data:{index:w+1,overflows:M},reset:{placement:W}}:{}}}},_1=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=At(n,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const w=et(i),k=pt(l),C=et(l)===l,R=await(a.isRTL==null?void 0:a.isRTL(c.floating)),M=f||(C||!g?[Gi(l)]:T1(l)),I=p!=="none";!f&&I&&M.push(...R1(l,g,p,R));const T=[l,...M],_=await zn(e,y),W=[];let j=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&W.push(_[w]),d){const Z=Ed(i,o,R);W.push(_[Z[0]],_[Z[1]])}if(j=[...j,{placement:i,overflows:W}],!W.every(Z=>Z<=0)){var K,P;const Z=(((K=s.flip)==null?void 0:K.index)||0)+1,ke=T[Z];if(ke&&(!(d==="alignment"?k!==pt(ke):!1)||j.every(Me=>pt(Me.placement)===k?Me.overflows[0]>0:!0)))return{data:{index:Z,overflows:j},reset:{placement:ke}};let he=(P=j.filter(pe=>pe.overflows[0]<=0).sort((pe,Me)=>pe.overflows[1]-Me.overflows[1])[0])==null?void 0:P.placement;if(!he)switch(h){case"bestFit":{var Q;const pe=(Q=j.filter(Me=>{if(I){const yt=pt(Me.placement);return yt===k||yt==="y"}return!0}).map(Me=>[Me.placement,Me.overflows.filter(yt=>yt>0).reduce((yt,pl)=>yt+pl,0)]).sort((Me,yt)=>Me[1]-yt[1])[0])==null?void 0:Q[0];pe&&(he=pe);break}case"initialPlacement":he=l;break}if(i!==he)return{reset:{placement:he}}}return{}}}};function Od(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function Nd(n){return kd.some(e=>n[e]>=0)}const V1=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:r="referenceHidden",...i}=At(n,e);switch(r){case"referenceHidden":{const s=await zn(e,{...i,elementContext:"reference"}),o=Od(s,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Nd(o)}}}case"escaped":{const s=await zn(e,{...i,altBoundary:!0}),o=Od(s,t.floating);return{data:{escapedOffsets:o,escaped:Nd(o)}}}default:return{}}}}};function Ad(n){const e=ft(...n.map(s=>s.left)),t=ft(...n.map(s=>s.top)),r=ze(...n.map(s=>s.right)),i=ze(...n.map(s=>s.bottom));return{x:e,y:t,width:r-e,height:i-t}}function $1(n){const e=n.slice().sort((i,s)=>i.y-s.y),t=[];let r=null;for(let i=0;i<e.length;i++){const s=e[i];!r||s.y-r.y>r.height/2?t.push([s]):t[t.length-1].push(s),r=s}return t.map(i=>$n(Ad(i)))}const z1=function(n){return n===void 0&&(n={}),{name:"inline",options:n,async fn(e){const{placement:t,elements:r,rects:i,platform:s,strategy:o}=e,{padding:l=2,x:a,y:c}=At(n,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),d=$1(u),f=$n(Ad(u)),h=sl(l);function p(){if(d.length===2&&d[0].left>d[1].right&&a!=null&&c!=null)return d.find(y=>a>y.left-h.left&&a<y.right+h.right&&c>y.top-h.top&&c<y.bottom+h.bottom)||f;if(d.length>=2){if(pt(t)==="y"){const j=d[0],K=d[d.length-1],P=et(t)==="top",Q=j.top,Z=K.bottom,ke=P?j.left:K.left,he=P?j.right:K.right,pe=he-ke,Me=Z-Q;return{top:Q,bottom:Z,left:ke,right:he,width:pe,height:Me,x:ke,y:Q}}const y=et(t)==="left",w=ze(...d.map(j=>j.right)),k=ft(...d.map(j=>j.left)),C=d.filter(j=>y?j.left===k:j.right===w),R=C[0].top,M=C[C.length-1].bottom,I=k,T=w,_=T-I,W=M-R;return{top:R,bottom:M,left:I,right:T,width:_,height:W,x:I,y:R}}return f}const g=await s.getElementRects({reference:{getBoundingClientRect:p},floating:r.floating,strategy:o});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},H1=new Set(["left","top"]);async function F1(n,e){const{placement:t,platform:r,elements:i}=n,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=et(t),l=rt(t),a=pt(t)==="y",c=H1.has(o)?-1:1,u=s&&a?-1:1,d=At(e,n);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof p=="number"&&(h=l==="end"?p*-1:p),a?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const j1=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:s,placement:o,middlewareData:l}=e,a=await F1(e,n);return o===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:o}}}}},U1=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:w,y:k}=y;return{x:w,y:k}}},...a}=At(n,e),c={x:t,y:r},u=await zn(e,a),d=pt(et(i)),f=Cd(d);let h=c[f],p=c[d];if(s){const y=f==="y"?"top":"left",w=f==="y"?"bottom":"right",k=h+u[y],C=h-u[w];h=nl(k,h,C)}if(o){const y=d==="y"?"top":"left",w=d==="y"?"bottom":"right",k=p+u[y],C=p-u[w];p=nl(k,p,C)}const g=l.fn({...e,[f]:h,[d]:p});return{...g,data:{x:g.x-t,y:g.y-r,enabled:{[f]:s,[d]:o}}}}}},W1=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,r;const{placement:i,rects:s,platform:o,elements:l}=e,{apply:a=()=>{},...c}=At(n,e),u=await zn(e,c),d=et(i),f=rt(i),h=pt(i)==="y",{width:p,height:g}=s.floating;let y,w;d==="top"||d==="bottom"?(y=d,w=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(w=d,y=f==="end"?"top":"bottom");const k=g-u.top-u.bottom,C=p-u.left-u.right,R=ft(g-u[y],k),M=ft(p-u[w],C),I=!e.middlewareData.shift;let T=R,_=M;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(_=C),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(T=k),I&&!f){const j=ze(u.left,0),K=ze(u.right,0),P=ze(u.top,0),Q=ze(u.bottom,0);h?_=p-2*(j!==0||K!==0?j+K:ze(u.left,u.right)):T=g-2*(P!==0||Q!==0?P+Q:ze(u.top,u.bottom))}await a({...e,availableWidth:_,availableHeight:T});const W=await o.getDimensions(l.floating);return p!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Yi(){return typeof window<"u"}function Hn(n){return Rd(n)?(n.nodeName||"").toLowerCase():"#document"}function Ke(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function Rt(n){var e;return(e=(Rd(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function Rd(n){return Yi()?n instanceof Node||n instanceof Ke(n).Node:!1}function it(n){return Yi()?n instanceof Element||n instanceof Ke(n).Element:!1}function mt(n){return Yi()?n instanceof HTMLElement||n instanceof Ke(n).HTMLElement:!1}function Dd(n){return!Yi()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ke(n).ShadowRoot}const K1=new Set(["inline","contents"]);function Mr(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=st(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!K1.has(i)}const q1=new Set(["table","td","th"]);function J1(n){return q1.has(Hn(n))}const G1=[":popover-open",":modal"];function Xi(n){return G1.some(e=>{try{return n.matches(e)}catch{return!1}})}const Y1=["transform","translate","scale","rotate","perspective"],X1=["transform","translate","scale","rotate","perspective","filter"],Q1=["paint","layout","strict","content"];function ol(n){const e=ll(),t=it(n)?st(n):n;return Y1.some(r=>t[r]?t[r]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||X1.some(r=>(t.willChange||"").includes(r))||Q1.some(r=>(t.contain||"").includes(r))}function Z1(n){let e=en(n);for(;mt(e)&&!Fn(e);){if(ol(e))return e;if(Xi(e))return null;e=en(e)}return null}function ll(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const eb=new Set(["html","body","#document"]);function Fn(n){return eb.has(Hn(n))}function st(n){return Ke(n).getComputedStyle(n)}function Qi(n){return it(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function en(n){if(Hn(n)==="html")return n;const e=n.assignedSlot||n.parentNode||Dd(n)&&n.host||Rt(n);return Dd(e)?e.host:e}function Id(n){const e=en(n);return Fn(e)?n.ownerDocument?n.ownerDocument.body:n.body:mt(e)&&Mr(e)?e:Id(e)}function Pd(n,e,t){var r;e===void 0&&(e=[]);const i=Id(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),o=Ke(i);return s?(al(o),e.concat(o,o.visualViewport||[],Mr(i)?i:[],[])):e.concat(i,Pd(i,[]))}function al(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Ld(n){const e=st(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=mt(n),s=i?n.offsetWidth:t,o=i?n.offsetHeight:r,l=qi(t)!==s||qi(r)!==o;return l&&(t=s,r=o),{width:t,height:r,$:l}}function Bd(n){return it(n)?n:n.contextElement}function jn(n){const e=Bd(n);if(!mt(e))return ht(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:s}=Ld(e);let o=(s?qi(t.width):t.width)/r,l=(s?qi(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const tb=ht(0);function _d(n){const e=Ke(n);return!ll()||!e.visualViewport?tb:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function nb(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Ke(n)?!1:e}function vr(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),s=Bd(n);let o=ht(1);e&&(r?it(r)&&(o=jn(r)):o=jn(n));const l=nb(s,t,r)?_d(s):ht(0);let a=(i.left+l.x)/o.x,c=(i.top+l.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const f=Ke(s),h=r&&it(r)?Ke(r):r;let p=f,g=al(p);for(;g&&r&&h!==p;){const y=jn(g),w=g.getBoundingClientRect(),k=st(g),C=w.left+(g.clientLeft+parseFloat(k.paddingLeft))*y.x,R=w.top+(g.clientTop+parseFloat(k.paddingTop))*y.y;a*=y.x,c*=y.y,u*=y.x,d*=y.y,a+=C,c+=R,p=Ke(g),g=al(p)}}return $n({width:u,height:d,x:a,y:c})}function Zi(n,e){const t=Qi(n).scrollLeft;return e?e.left+t:vr(Rt(n)).left+t}function Vd(n,e){const t=n.getBoundingClientRect(),r=t.left+e.scrollLeft-Zi(n,t),i=t.top+e.scrollTop;return{x:r,y:i}}function rb(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const s=i==="fixed",o=Rt(r),l=e?Xi(e.floating):!1;if(r===o||l&&s)return t;let a={scrollLeft:0,scrollTop:0},c=ht(1);const u=ht(0),d=mt(r);if((d||!d&&!s)&&((Hn(r)!=="body"||Mr(o))&&(a=Qi(r)),mt(r))){const h=vr(r);c=jn(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=o&&!d&&!s?Vd(o,a):ht(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-a.scrollLeft*c.x+u.x+f.x,y:t.y*c.y-a.scrollTop*c.y+u.y+f.y}}function ib(n){return Array.from(n.getClientRects())}function sb(n){const e=Rt(n),t=Qi(n),r=n.ownerDocument.body,i=ze(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=ze(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-t.scrollLeft+Zi(n);const l=-t.scrollTop;return st(r).direction==="rtl"&&(o+=ze(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:l}}const $d=25;function ob(n,e){const t=Ke(n),r=Rt(n),i=t.visualViewport;let s=r.clientWidth,o=r.clientHeight,l=0,a=0;if(i){s=i.width,o=i.height;const u=ll();(!u||u&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}const c=Zi(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-h);p<=$d&&(s-=p)}else c<=$d&&(s+=c);return{width:s,height:o,x:l,y:a}}const lb=new Set(["absolute","fixed"]);function ab(n,e){const t=vr(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,s=mt(n)?jn(n):ht(1),o=n.clientWidth*s.x,l=n.clientHeight*s.y,a=i*s.x,c=r*s.y;return{width:o,height:l,x:a,y:c}}function zd(n,e,t){let r;if(e==="viewport")r=ob(n,t);else if(e==="document")r=sb(Rt(n));else if(it(e))r=ab(e,t);else{const i=_d(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return $n(r)}function Hd(n,e){const t=en(n);return t===e||!it(t)||Fn(t)?!1:st(t).position==="fixed"||Hd(t,e)}function cb(n,e){const t=e.get(n);if(t)return t;let r=Pd(n,[]).filter(l=>it(l)&&Hn(l)!=="body"),i=null;const s=st(n).position==="fixed";let o=s?en(n):n;for(;it(o)&&!Fn(o);){const l=st(o),a=ol(o);!a&&l.position==="fixed"&&(i=null),(s?!a&&!i:!a&&l.position==="static"&&!!i&&lb.has(i.position)||Mr(o)&&!a&&Hd(n,o))?r=r.filter(u=>u!==o):i=l,o=en(o)}return e.set(n,r),r}function ub(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const o=[...t==="clippingAncestors"?Xi(e)?[]:cb(e,this._c):[].concat(t),r],l=o[0],a=o.reduce((c,u)=>{const d=zd(e,u,i);return c.top=ze(d.top,c.top),c.right=ft(d.right,c.right),c.bottom=ft(d.bottom,c.bottom),c.left=ze(d.left,c.left),c},zd(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function db(n){const{width:e,height:t}=Ld(n);return{width:e,height:t}}function fb(n,e,t){const r=mt(e),i=Rt(e),s=t==="fixed",o=vr(n,!0,s,e);let l={scrollLeft:0,scrollTop:0};const a=ht(0);function c(){a.x=Zi(i)}if(r||!r&&!s)if((Hn(e)!=="body"||Mr(i))&&(l=Qi(e)),r){const h=vr(e,!0,s,e);a.x=h.x+e.clientLeft,a.y=h.y+e.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?Vd(i,l):ht(0),d=o.left+l.scrollLeft-a.x-u.x,f=o.top+l.scrollTop-a.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function cl(n){return st(n).position==="static"}function Fd(n,e){if(!mt(n)||st(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return Rt(n)===t&&(t=t.ownerDocument.body),t}function jd(n,e){const t=Ke(n);if(Xi(n))return t;if(!mt(n)){let i=en(n);for(;i&&!Fn(i);){if(it(i)&&!cl(i))return i;i=en(i)}return t}let r=Fd(n,e);for(;r&&J1(r)&&cl(r);)r=Fd(r,e);return r&&Fn(r)&&cl(r)&&!ol(r)?t:r||Z1(n)||t}const hb=async function(n){const e=this.getOffsetParent||jd,t=this.getDimensions,r=await t(n.floating);return{reference:fb(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pb(n){return st(n).direction==="rtl"}const mb={convertOffsetParentRelativeRectToViewportRelativeRect:rb,getDocumentElement:Rt,getClippingRect:ub,getOffsetParent:jd,getElementRects:hb,getClientRects:ib,getDimensions:db,getScale:jn,isElement:it,isRTL:pb},Ud=j1,Wd=B1,Kd=U1,qd=_1,Jd=W1,Gd=V1,Yd=P1,Xd=z1,Qd=(n,e,t)=>{const r=new Map,i={platform:mb,...t},s={...i.platform,_c:r};return I1(n,e,{...i,platform:s})};var ul,dl;if(typeof WeakMap<"u"){let n=new WeakMap;ul=e=>n.get(e),dl=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;ul=r=>{for(let i=0;i<n.length;i+=2)if(n[i]==r)return n[i+1]},dl=(r,i)=>(t==10&&(t=0),n[t++]=r,n[t++]=i)}var Dt=class{constructor(n,e,t,r){this.width=n,this.height=e,this.map=t,this.problems=r}findCell(n){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=n)continue;const r=e%this.width,i=e/this.width|0;let s=r+1,o=i+1;for(let l=1;s<this.width&&this.map[e+l]==t;l++)s++;for(let l=1;o<this.height&&this.map[e+this.width*l]==t;l++)o++;return{left:r,top:i,right:s,bottom:o}}throw new RangeError(`No cell with offset ${n} found`)}colCount(n){for(let e=0;e<this.map.length;e++)if(this.map[e]==n)return e%this.width;throw new RangeError(`No cell with offset ${n} found`)}nextCell(n,e,t){const{left:r,right:i,top:s,bottom:o}=this.findCell(n);return e=="horiz"?(t<0?r==0:i==this.width)?null:this.map[s*this.width+(t<0?r-1:i)]:(t<0?s==0:o==this.height)?null:this.map[r+this.width*(t<0?s-1:o)]}rectBetween(n,e){const{left:t,right:r,top:i,bottom:s}=this.findCell(n),{left:o,right:l,top:a,bottom:c}=this.findCell(e);return{left:Math.min(t,o),top:Math.min(i,a),right:Math.max(r,l),bottom:Math.max(s,c)}}cellsInRect(n){const e=[],t={};for(let r=n.top;r<n.bottom;r++)for(let i=n.left;i<n.right;i++){const s=r*this.width+i,o=this.map[s];t[o]||(t[o]=!0,!(i==n.left&&i&&this.map[s-1]==o||r==n.top&&r&&this.map[s-this.width]==o)&&e.push(o))}return e}positionAt(n,e,t){for(let r=0,i=0;;r++){const s=i+t.child(r).nodeSize;if(r==n){let o=e+n*this.width;const l=(n+1)*this.width;for(;o<l&&this.map[o]<i;)o++;return o==l?s-1:this.map[o]}i=s}}static get(n){return ul(n)||dl(n,gb(n))}};function gb(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);const e=yb(n),t=n.childCount,r=[];let i=0,s=null;const o=[];for(let c=0,u=e*t;c<u;c++)r[c]=0;for(let c=0,u=0;c<t;c++){const d=n.child(c);u++;for(let p=0;;p++){for(;i<r.length&&r[i]!=0;)i++;if(p==d.childCount)break;const g=d.child(p),{colspan:y,rowspan:w,colwidth:k}=g.attrs;for(let C=0;C<w;C++){if(C+c>=t){(s||(s=[])).push({type:"overlong_rowspan",pos:u,n:w-C});break}const R=i+C*e;for(let M=0;M<y;M++){r[R+M]==0?r[R+M]=u:(s||(s=[])).push({type:"collision",row:c,pos:u,n:y-M});const I=k&&k[M];if(I){const T=(R+M)%e*2,_=o[T];_==null||_!=I&&o[T+1]==1?(o[T]=I,o[T+1]=1):_==I&&o[T+1]++}}}i+=y,u+=g.nodeSize}const f=(c+1)*e;let h=0;for(;i<f;)r[i++]==0&&h++;h&&(s||(s=[])).push({type:"missing",row:c,n:h}),u++}(e===0||t===0)&&(s||(s=[])).push({type:"zero_sized"});const l=new Dt(e,t,r,s);let a=!1;for(let c=0;!a&&c<o.length;c+=2)o[c]!=null&&o[c+1]<t&&(a=!0);return a&&bb(l,o,n),l}function yb(n){let e=-1,t=!1;for(let r=0;r<n.childCount;r++){const i=n.child(r);let s=0;if(t)for(let o=0;o<r;o++){const l=n.child(o);for(let a=0;a<l.childCount;a++){const c=l.child(a);o+c.attrs.rowspan>r&&(s+=c.attrs.colspan)}}for(let o=0;o<i.childCount;o++){const l=i.child(o);s+=l.attrs.colspan,l.attrs.rowspan>1&&(t=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function bb(n,e,t){n.problems||(n.problems=[]);const r={};for(let i=0;i<n.map.length;i++){const s=n.map[i];if(r[s])continue;r[s]=!0;const o=t.nodeAt(s);if(!o)throw new RangeError(`No cell with offset ${s} found`);let l=null;const a=o.attrs;for(let c=0;c<a.colspan;c++){const u=(i+c)%n.width,d=e[u*2];d!=null&&(!a.colwidth||a.colwidth[c]!=d)&&((l||(l=wb(a)))[c]=d)}l&&n.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function wb(n){if(n.colwidth)return n.colwidth.slice();const e=[];for(let t=0;t<n.colspan;t++)e.push(0);return e}function fl(n){let e=n.cached.tableNodeTypes;if(!e){e=n.cached.tableNodeTypes={};for(const t in n.nodes){const r=n.nodes[t],i=r.spec.tableRole;i&&(e[i]=r)}}return e}new le("selectingCells");function kb(n){for(let e=n.depth-1;e>0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function Zd(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function xb(n){const e=n.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const t=kb(e.$head)||Sb(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function Sb(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function ef(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function tf(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function nf(n,e,t){const r=n.node(-1),i=Dt.get(r),s=n.start(-1),o=i.nextCell(n.pos-s,e,t);return o==null?null:n.node(0).resolve(s+o)}function rf(n,e,t=1){const r={...n,colspan:n.colspan-t};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,t),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}var gt=class Pt extends H{constructor(e,t=e){const r=e.node(-1),i=Dt.get(r),s=e.start(-1),o=i.rectBetween(e.pos-s,t.pos-s),l=e.node(0),a=i.cellsInRect(o).filter(u=>u!=t.pos-s);a.unshift(t.pos-s);const c=a.map(u=>{const d=r.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const f=s+u+1;return new pa(l.resolve(f),l.resolve(f+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(e,t){const r=e.resolve(t.map(this.$anchorCell.pos)),i=e.resolve(t.map(this.$headCell.pos));if(ef(r)&&ef(i)&&tf(r,i)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Pt.rowSelection(r,i):s&&this.isColSelection()?Pt.colSelection(r,i):new Pt(r,i)}return F.between(r,i)}content(){const e=this.$anchorCell.node(-1),t=Dt.get(e),r=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},o=[];for(let a=i.top;a<i.bottom;a++){const c=[];for(let u=a*t.width+i.left,d=i.left;d<i.right;d++,u++){const f=t.map[u];if(s[f])continue;s[f]=!0;const h=t.findCell(f);let p=e.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const g=i.left-h.left,y=h.right-i.right;if(g>0||y>0){let w=p.attrs;if(g>0&&(w=rf(w,0,g)),y>0&&(w=rf(w,w.colspan-y,y)),h.left<i.left){if(p=p.type.createAndFill(w),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else p=p.type.create(w,p.content)}if(h.top<i.top||h.bottom>i.bottom){const w={...p.attrs,rowspan:Math.min(h.bottom,i.bottom)-Math.max(h.top,i.top)};h.top<i.top?p=p.type.createAndFill(w):p=p.type.create(w,p.content)}c.push(p)}o.push(e.child(a).copy(S.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:o;return new N(S.from(l),1,1)}replace(e,t=N.empty){const r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){const{$from:l,$to:a}=i[o],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(a.pos),o?N.empty:t)}const s=H.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,t){this.replace(e,new N(S.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),r=Dt.get(t),i=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let o=0;o<s.length;o++)e(t.nodeAt(s[o]),i+s[o])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const r=e.node(-1),i=Dt.get(r),s=e.start(-1),o=i.findCell(e.pos-s),l=i.findCell(t.pos-s),a=e.node(0);return o.top<=l.top?(o.top>0&&(e=a.resolve(s+i.map[o.left])),l.bottom<i.height&&(t=a.resolve(s+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(t=a.resolve(s+i.map[l.left])),o.bottom<i.height&&(e=a.resolve(s+i.map[i.width*(i.height-1)+o.right-1]))),new Pt(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=Dt.get(e),r=this.$anchorCell.start(-1),i=t.colCount(this.$anchorCell.pos-r),s=t.colCount(this.$headCell.pos-r);if(Math.min(i,s)>0)return!1;const o=i+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,l)==t.width}eq(e){return e instanceof Pt&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const r=e.node(-1),i=Dt.get(r),s=e.start(-1),o=i.findCell(e.pos-s),l=i.findCell(t.pos-s),a=e.node(0);return o.left<=l.left?(o.left>0&&(e=a.resolve(s+i.map[o.top*i.width])),l.right<i.width&&(t=a.resolve(s+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(t=a.resolve(s+i.map[l.top*i.width])),o.right<i.width&&(e=a.resolve(s+i.map[i.width*(o.top+1)-1]))),new Pt(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Pt(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){return new Pt(e.resolve(t),e.resolve(r))}getBookmark(){return new Cb(this.$anchorCell.pos,this.$headCell.pos)}};gt.prototype.visible=!1,H.jsonID("cell",gt);var Cb=class Pf{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Pf(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),r=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&r.index()<r.parent.childCount&&tf(t,r)?new gt(t,r):H.near(r,1)}};new le("fix-tables");function sf(n){const e=n.selection,t=xb(n),r=t.node(-1),i=t.start(-1),s=Dt.get(r);return{...e instanceof gt?s.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):s.findCell(t.pos-i),tableStart:i,map:s,table:r}}function Eb(n){return function(e,t){if(!Zd(e))return!1;if(t){const r=fl(e.schema),i=sf(e),s=e.tr,o=i.map.cellsInRect(n=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:n=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=o.map(a=>i.table.nodeAt(a));for(let a=0;a<o.length;a++)l[a].type==r.header_cell&&s.setNodeMarkup(i.tableStart+o[a],r.cell,l[a].attrs);if(s.steps.length==0)for(let a=0;a<o.length;a++)s.setNodeMarkup(i.tableStart+o[a],r.header_cell,l[a].attrs);t(s)}return!0}}function of(n,e,t){const r=e.map.cellsInRect({left:0,top:0,right:n=="row"?e.map.width:1,bottom:n=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const s=e.table.nodeAt(r[i]);if(s&&s.type!==t.header_cell)return!1}return!0}function hl(n,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?Eb(n):function(t,r){if(!Zd(t))return!1;if(r){const i=fl(t.schema),s=sf(t),o=t.tr,l=of("row",s,i),a=of("column",s,i),u=(n==="column"?l:n==="row"?a:!1)?1:0,d=n=="column"?{left:0,top:u,right:1,bottom:s.map.height}:n=="row"?{left:u,top:0,right:s.map.width,bottom:1}:s,f=n=="column"?a?i.cell:i.header_cell:n=="row"?l?i.cell:i.header_cell:i.cell;s.map.cellsInRect(d).forEach(h=>{const p=h+s.tableStart,g=o.doc.nodeAt(p);g&&o.setNodeMarkup(p,f,g.attrs)}),r(o)}return!0}}hl("row",{useDeprecatedLogic:!0}),hl("column",{useDeprecatedLogic:!0}),hl("cell",{useDeprecatedLogic:!0});function es(n,e){const t=n.selection;if(!(t instanceof gt))return!1;if(e){const r=n.tr,i=fl(n.schema).cell.createAndFill().content;t.forEachCell((s,o)=>{s.content.eq(i)||r.replace(r.mapping.map(o+1),r.mapping.map(o+s.nodeSize-1),new N(i,0,0))}),r.docChanged&&e(r)}return!0}to({ArrowLeft:ns("horiz",-1),ArrowRight:ns("horiz",1),ArrowUp:ns("vert",-1),ArrowDown:ns("vert",1),"Shift-ArrowLeft":rs("horiz",-1),"Shift-ArrowRight":rs("horiz",1),"Shift-ArrowUp":rs("vert",-1),"Shift-ArrowDown":rs("vert",1),Backspace:es,"Mod-Backspace":es,Delete:es,"Mod-Delete":es});function ts(n,e,t){return t.eq(n.selection)?!1:(e&&e(n.tr.setSelection(t).scrollIntoView()),!0)}function ns(n,e){return(t,r,i)=>{if(!i)return!1;const s=t.selection;if(s instanceof gt)return ts(t,r,H.near(s.$headCell,e));if(n!="horiz"&&!s.empty)return!1;const o=lf(i,n,e);if(o==null)return!1;if(n=="horiz")return ts(t,r,H.near(t.doc.resolve(s.head+e),e));{const l=t.doc.resolve(o),a=nf(l,n,e);let c;return a?c=H.near(a,1):e<0?c=H.near(t.doc.resolve(l.before(-1)),-1):c=H.near(t.doc.resolve(l.after(-1)),1),ts(t,r,c)}}}function rs(n,e){return(t,r,i)=>{if(!i)return!1;const s=t.selection;let o;if(s instanceof gt)o=s;else{const a=lf(i,n,e);if(a==null)return!1;o=new gt(t.doc.resolve(a))}const l=nf(o.$headCell,n,e);return l?ts(t,r,new gt(o.$anchorCell,l)):!1}}function lf(n,e,t){if(!(n.state.selection instanceof F))return null;const{$head:r}=n.state.selection;for(let i=r.depth-1;i>=0;i--){const s=r.node(i);if((t<0?r.index(i):r.indexAfter(i))!=(t<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=r.before(i),a=e=="vert"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(a)?l:null}}return null}new le("tableColumnResizing");function Mb(n,e){const t=Math.min(n.top,e.top),r=Math.max(n.bottom,e.bottom),i=Math.min(n.left,e.left),o=Math.max(n.right,e.right)-i,l=r-t,a=i,c=t;return new DOMRect(a,c,o,l)}var vb=class{constructor({editor:n,element:e,view:t,updateDelay:r=250,resizeDelay:i=60,shouldShow:s,appendTo:o,getReferencedVirtualElement:l,options:a}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:u,state:d,from:f,to:h})=>{const{doc:p,selection:g}=d,{empty:y}=g,w=!p.textBetween(f,h).length&&wo(d.selection),k=this.element.contains(document.activeElement);return!(!(u.hasFocus()||k)||y||w||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var d;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&((d=this.element.parentNode)!=null&&d.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(u,d)=>{const f=!d?.selection.eq(u.state.selection),h=!d?.doc.eq(u.state.doc);!f&&!h||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(u,f,h,d)},this.updateDelay))},this.updateHandler=(u,d,f,h)=>{const{composing:p}=u;if(p||!d&&!f)return;if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:u})=>{u.getMeta("bubbleMenu")==="updatePosition"&&this.updatePosition()};var c;this.editor=n,this.element=e,this.view=t,this.updateDelay=r,this.resizeDelay=i,this.appendTo=o,this.scrollTarget=(c=a?.scrollTarget)!=null?c:window,this.getReferencedVirtualElement=l,this.floatingUIOptions={...this.floatingUIOptions,...a},this.element.tabIndex=0,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(t,t.state),this.getShouldShow()&&this.show()}get middlewares(){const n=[];return this.floatingUIOptions.flip&&n.push(qd(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&n.push(Kd(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&n.push(Ud(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&n.push(Yd(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&n.push(Jd(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&n.push(Wd(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&n.push(Gd(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&n.push(Xd(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),n}get virtualElement(){var n;const{selection:e}=this.editor.state,t=(n=this.getReferencedVirtualElement)==null?void 0:n.call(this);if(t)return t;const r=hu(this.view,e.from,e.to);let i={getBoundingClientRect:()=>r,getClientRects:()=>[r]};if(e instanceof V){let s=this.view.nodeDOM(e.from);const o=s.dataset.nodeViewWrapper?s:s.querySelector("[data-node-view-wrapper]");o&&(s=o),s&&(i={getBoundingClientRect:()=>s.getBoundingClientRect(),getClientRects:()=>[s.getBoundingClientRect()]})}if(e instanceof gt){const{$anchorCell:s,$headCell:o}=e,l=s?s.pos:o.pos,a=o?o.pos:s.pos,c=this.view.nodeDOM(l),u=this.view.nodeDOM(a);if(!c||!u)return;const d=c===u?c.getBoundingClientRect():Mb(c.getBoundingClientRect(),u.getBoundingClientRect());i={getBoundingClientRect:()=>d,getClientRects:()=>[d]}}return i}updatePosition(){const n=this.virtualElement;n&&Qd(n,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:r})=>{this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(n,e){const{state:t}=n,r=t.selection.from!==t.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(n,e);return}const i=!e?.selection.eq(n.state.selection),s=!e?.doc.eq(n.state.doc);this.updateHandler(n,i,s,e)}getShouldShow(n){var e;const{state:t}=this.view,{selection:r}=t,{ranges:i}=r,s=Math.min(...i.map(a=>a.$from.pos)),o=Math.max(...i.map(a=>a.$to.pos));return(e=this.shouldShow)==null?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:t,oldState:n,from:s,to:o})}show(){var n;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(n=e??this.view.dom.parentElement)==null||n.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},af=n=>new se({key:typeof n.pluginKey=="string"?new le(n.pluginKey):n.pluginKey,view:e=>new vb({view:e,...n})});ue.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[af({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Tb=m.defineComponent({name:"BubbleMenu",inheritAttrs:!1,props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},resizeDelay:{type:Number,default:void 0},options:{type:Object,default:()=>({})},appendTo:{type:Object,default:void 0},shouldShow:{type:Function,default:null},getReferencedVirtualElement:{type:Function,default:void 0}},setup(n,{slots:e,attrs:t}){const r=m.ref(null);return m.onMounted(()=>{const{editor:i,options:s,pluginKey:o,resizeDelay:l,appendTo:a,shouldShow:c,getReferencedVirtualElement:u,updateDelay:d}=n;r.value&&(r.value.style.visibility="hidden",r.value.style.position="absolute",r.value.remove(),i.registerPlugin(af({editor:i,element:r.value,options:s,pluginKey:o,resizeDelay:l,appendTo:a,shouldShow:c,getReferencedVirtualElement:u,updateDelay:d})))}),m.onBeforeUnmount(()=>{const{pluginKey:i,editor:s}=n;s.unregisterPlugin(i)}),()=>{var i;return m.h(m.Teleport,{to:"body"},m.h("div",{...t,ref:r},(i=e.default)==null?void 0:i.call(e)))}}}),Ob=class{constructor({editor:n,element:e,view:t,options:r,appendTo:i,shouldShow:s}){this.preventHide=!1,this.isVisible=!1,this.shouldShow=({view:o,state:l})=>{const{selection:a}=l,{$anchor:c,empty:u}=a,d=c.depth===1,f=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent&&c.parent.childCount===0&&!this.getTextContent(c.parent);return!(!o.hasFocus()||!u||!d||!f||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(o,l,a,c)=>{const{composing:u}=o;if(u||!l&&!a)return;if(!this.getShouldShow(c)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var l;if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&((l=this.element.parentNode)!=null&&l.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.editor=n,this.element=e,this.view=t,this.appendTo=i,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.update(t,t.state),this.getShouldShow()&&this.show()}getTextContent(n){return iu(n,{textSerializers:ho(this.editor.schema)})}get middlewares(){const n=[];return this.floatingUIOptions.flip&&n.push(qd(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&n.push(Kd(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&n.push(Ud(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&n.push(Yd(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&n.push(Jd(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&n.push(Wd(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&n.push(Gd(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&n.push(Xd(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),n}getShouldShow(n){var e;const{state:t}=this.view,{selection:r}=t,{ranges:i}=r,s=Math.min(...i.map(a=>a.$from.pos)),o=Math.max(...i.map(a=>a.$to.pos));return(e=this.shouldShow)==null?void 0:e.call(this,{editor:this.editor,view:this.view,state:t,oldState:n,from:s,to:o})}updatePosition(){const{selection:n}=this.editor.state,e=hu(this.view,n.from,n.to);Qd({getBoundingClientRect:()=>e,getClientRects:()=>[e]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:i,strategy:s})=>{this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${r}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(n,e){const t=!e?.selection.eq(n.state.selection),r=!e?.doc.eq(n.state.doc);this.updateHandler(n,t,r,e)}show(){var n;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(n=e??this.view.dom.parentElement)==null||n.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},cf=n=>new se({key:typeof n.pluginKey=="string"?new le(n.pluginKey):n.pluginKey,view:e=>new Ob({view:e,...n})});ue.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[cf({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}}),m.defineComponent({name:"FloatingMenu",inheritAttrs:!1,props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},options:{type:Object,default:()=>({})},appendTo:{type:Object,default:void 0},shouldShow:{type:Function,default:null}},setup(n,{slots:e,attrs:t}){const r=m.ref(null);return m.onMounted(()=>{const{pluginKey:i,editor:s,options:o,appendTo:l,shouldShow:a}=n;r.value&&(r.value.style.visibility="hidden",r.value.style.position="absolute",r.value.remove(),s.registerPlugin(cf({pluginKey:i,editor:s,element:r.value,options:o,appendTo:l,shouldShow:a})))}),m.onBeforeUnmount(()=>{const{pluginKey:i,editor:s}=n;s.unregisterPlugin(i)}),()=>{var i;return m.h(m.Teleport,{to:"body"},m.h("div",{...t,ref:r},(i=e.default)==null?void 0:i.call(e)))}}});const Nb={class:"sus-bubble-menu"},Ab=bn(m.defineComponent({__name:"BubbleMenu",props:{editor:{},showMenu:{type:Boolean}},setup(n){const e=n,t=m.ref(""),r=m.ref(!1);function i(){if(r.value){r.value=!1;return}t.value=e.editor?.getAttributes("link").href,r.value=!0}function s(){if(!t.value){e.editor?.chain().focus().extendMarkRange("link").unsetLink().run(),r.value=!1;return}e.editor?.chain().focus().extendMarkRange("link").setLink({href:t.value}).run(),r.value=!1}function o(){t.value&&window.open(e.editor?.getAttributes("link").href)}return(l,a)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.withDirectives(m.createElementVNode("div",{class:"inset-0 absolute",onClick:a[2]||(a[2]=c=>r.value=!1)},[m.createElementVNode("div",{class:"sus-link",onClick:a[1]||(a[1]=m.withModifiers(()=>{},["stop"]))},[m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>t.value=c),onKeyup:m.withKeys(s,["enter"]),class:"sus-link-input",type:"text",placeholder:"请输入链接"},null,544),[[m.vModelText,t.value]]),(m.openBlock(),m.createElementBlock("svg",{onClick:s,title:"确定",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[...a[4]||(a[4]=[m.createElementVNode("rect",{width:"24",height:"24",fill:"none"},null,-1),m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{"stroke-linejoin":"round",d:"m21 3l-9 9m0 0h5.344M12 12V6.656"}),m.createElementVNode("path",{d:"M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2m10 10c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465c-.973-.973-1.3-2.342-1.409-4.535"})],-1)])])),(m.openBlock(),m.createElementBlock("svg",{onClick:o,title:"预览",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...a[5]||(a[5]=[m.createElementVNode("rect",{width:"24",height:"24",fill:"none"},null,-1),m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{"stroke-linejoin":"round",d:"m13 11l9-9m0 0h-5.344M22 2v5.344"}),m.createElementVNode("path",{d:"M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2m10 10c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465c-.973-.973-1.3-2.342-1.409-4.535"})],-1)])]))])],512),[[m.vShow,r.value]]),n.editor&&n.showMenu?(m.openBlock(),m.createBlock(m.unref(Tb),{key:0,editor:n.editor,options:{placement:"bottom",offset:8}},{default:m.withCtx(()=>[m.createElementVNode("div",Nb,[m.createElementVNode("button",{onClick:i,title:"添加链接"}," 链接 "),m.createElementVNode("button",{onClick:a[3]||(a[3]=c=>n.editor.commands.unsetAllMarks()),title:"清除当前选中格式"}," 清除 ")])]),_:1},8,["editor"])):m.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-3f87b608"]]),Rb=$e.create({name:"emoji",inline:!0,group:"inline",atom:!0,addAttributes(){return{name:{default:null},src:{default:null}}},parseHTML(){return[{tag:"span[data-type='emoji']"}]},renderHTML({HTMLAttributes:n}){return["span",{"data-type":"emoji",class:"emoji",contenteditable:"false"},["img",ce(n,{src:n.src,alt:n.name,draggable:"false",loading:"lazy",align:"absmiddle"})]]}}),Db={class:"sus-comment relative flex flex-row w-full"},Ib={key:0,class:"sus-comment-avatar"},Pb=["src"],Lb={class:"sus-comment__main"},Bb={key:0,class:"sus-comment__info my-1"},_b={key:0,class:"sus-comment__info-input"},Vb=["placeholder"],$b={key:1,class:"sus-comment__info-input"},zb=["placeholder"],Hb={key:2,class:"sus-comment__info-input"},Fb=["placeholder"],jb={class:"relative"},Ub={class:"sus-comment__footer flex justify-between"},Wb={class:"flex flex-row items-center"},Kb={key:0,class:"p-1"},qb={key:1,class:"sus-upload p-1"},Jb={class:"sus-comment__toolbar relative flex"},Gb={class:"sus-comment__toolbar-mask absolute inset-0"},Yb={class:"sus-comment__extend flex"},Xb=["src"],Qb=["onClick"],uf=bn(m.defineComponent({__name:"index",props:{reply:{},toolBar:{},infoBar:{},placeholder:{default:"支持常见的markdown语法,如图片、代码块等"},comment:{}},emits:["on-save","on-cancel","add-image","update-avatar"],setup(n,{expose:e,emit:t}){class r{articleId="";userName="";userEmail="";userWebsite="";userAvatar="";content="";contentText="";replyName="";parentId="";notify=0;privacy=!1}const i=n;e({updateImage:M,updatePreviewImage:T});const s=t,o=m.reactive({emojis:i.toolBar?.emoji?.emojis||[],showPanel:!1}),l=i.reply?.userName,a=m.ref("在此处留下你的足迹吧!(支持markdown语法)"),c=m.reactive(new r),u=m.ref(""),d=m.ref(null),f=m.ref([]),h=m.ref(null),p=i.comment?.privacy||!1,g={enable:i.infoBar?.enable===void 0?!0:i.infoBar.enable,name:{show:i.infoBar?.name?.show===void 0?!0:i.infoBar.name.show,placeholder:i.infoBar?.name?.placeholder||"昵称(必填)"},website:{show:i.infoBar?.website?.show===void 0?!0:i.infoBar.website.show,placeholder:i.infoBar?.website?.placeholder||"网址(https://)",tips:i.infoBar?.website?.tips||"点击昵称时可跳转"},email:{show:i.infoBar?.email?.show===void 0?!0:i.infoBar.email.show,placeholder:i.infoBar?.email?.placeholder||"邮箱(不会公开,仅用于通知回复)",tips:i.infoBar?.email?.tips||"输入QQ邮箱自动获取头像"}},y=Oy({extensions:[u1,h1,l1.configure({placeholder:i.placeholder}),M0.configure({openOnClick:!1,defaultProtocol:"https"}),Rb,C1]});function w(){i.comment&&(c.privacy=i.comment.privacy||!1,c.notify=i.comment.notify||1,c.userName=i.comment.userName||"",c.userEmail=i.comment.userEmail||"",c.userWebsite=i.comment.userWebsite||"",c.userAvatar=i.comment.userAvatar||"",c.content=i.comment.content||"",c.articleId=i.comment.articleId||"")}async function k(){if(!(!y||!y.value)){if(u.value=y.value.getHTML(),c.userWebsite&&(c.userWebsite.concat("http://")||c.userWebsite.concat("https://")||(c.userWebsite="https://"+c.userWebsite)),localStorage.setItem("user",JSON.stringify(c)),localStorage.setItem("comment-content",u.value),i.reply.id!="0"){const K=i.reply.parentId;c.parentId=K==="0"?i.reply.id:K,c.replyName=i.reply.userName,a.value="@"+l+":"}c.content=u.value,c.contentText=y.value.getText(),s("on-save",c,h.value)}}function C(){localStorage.setItem("comment-content",""),s("on-cancel")}function R(){s("add-image",d.value,h.value)}function M(K){h.value||(h.value=[]),!h.value||h.value.length==0?h.value=K:h.value=I(h.value,K[0]),f.value=[];for(let P=0;P<h.value.length;P++)f.value.push(URL.createObjectURL(h.value[P]))}function I(K,P){return[...K,P]}function T(K){f.value=K}function _(){s("update-avatar",c)}function W(){c.notify==1?c.notify=0:c.notify=1}function j(K){try{if(!h.value||!h.value.length||h.value.length<=1){h.value=[],f.value=[];return}h.value?.splice(K,1),f.value.splice(K,1)}catch(P){console.log("remove image error: ",P),h.value=[],f.value=[]}}return m.onMounted(()=>{if(!y||!y.value)return;w();const K=localStorage.getItem("user");if(c.content&&c.content.length>3)y.value.commands.setContent(c.content);else{const P=localStorage.getItem("comment-content");P&&y.value.commands.setContent(P)}if(K){const P=JSON.parse(K);c.userName=P.userName,c.userEmail=P.userEmail,c.userWebsite=P.userWebsite,_()}c.notify=1}),(K,P)=>(m.openBlock(),m.createElementBlock("div",Db,[g.enable?(m.openBlock(),m.createElementBlock("div",Ib,[m.withDirectives(m.createElementVNode("img",{alt:"头像",src:c.userAvatar,class:"sus-avatar",onerror:"this.onerror=null,this.src='/error.webp'"},null,8,Pb),[[m.vShow,!!c.userAvatar]]),m.withDirectives(m.createElementVNode("span",{class:"sus-avatar-text flex w-full h-full items-center justify-center"},m.toDisplayString(c?.userName?.charAt(0)),513),[[m.vShow,!c.userAvatar]])])):m.createCommentVNode("",!0),m.createElementVNode("div",Lb,[g.enable?(m.openBlock(),m.createElementBlock("div",Bb,[g.name.show?(m.openBlock(),m.createElementBlock("div",_b,[m.withDirectives(m.createElementVNode("input",{class:"sus-input sus-username",placeholder:g.name.placeholder,"onUpdate:modelValue":P[0]||(P[0]=Q=>c.userName=Q),maxlength:"23"},null,8,Vb),[[m.vModelText,c.userName]])])):m.createCommentVNode("",!0),g.website.show?(m.openBlock(),m.createElementBlock("div",$b,[m.createVNode(m.unref(qn.OuOToolTip),{content:g.website.tips},{default:m.withCtx(()=>[m.withDirectives(m.createElementVNode("input",{class:"sus-input sus-web",placeholder:g.website.placeholder,"onUpdate:modelValue":P[1]||(P[1]=Q=>c.userWebsite=Q),maxlength:"35"},null,8,zb),[[m.vModelText,c.userWebsite]])]),_:1},8,["content"])])):m.createCommentVNode("",!0),g.email.show?(m.openBlock(),m.createElementBlock("div",Hb,[m.createVNode(m.unref(qn.OuOToolTip),{content:g.email.tips},{default:m.withCtx(()=>[m.withDirectives(m.createElementVNode("input",{onBlur:_,class:"sus-input sus-email",placeholder:g.email.placeholder,"onUpdate:modelValue":P[2]||(P[2]=Q=>c.userEmail=Q),maxlength:"35"},null,40,Fb),[[m.vModelText,c.userEmail]])]),_:1},8,["content"])])):m.createCommentVNode("",!0)])):m.createCommentVNode("",!0),m.createElementVNode("div",jb,[m.createVNode(Ab,{editor:m.unref(y),showMenu:n.toolBar?.bubbleMenu?.show},null,8,["editor","showMenu"]),m.withDirectives(m.createVNode(Dy,{class:"absolute bottom-2 left-1",emoji:o,editor:m.unref(y)},null,8,["emoji","editor"]),[[m.vShow,o.showPanel]]),m.createVNode(m.unref(Ty),{class:"sus-comment-input",editor:m.unref(y)},null,8,["editor"])]),m.createElementVNode("div",Ub,[m.createElementVNode("div",Wb,[o.emojis.length>=0?(m.openBlock(),m.createElementBlock("div",Kb,[(m.openBlock(),m.createElementBlock("svg",{onClick:P[3]||(P[3]=Q=>o.showPanel=!o.showPanel),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...P[5]||(P[5]=[m.createStaticVNode('<g fill="none" data-v-978fa2fc><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M9 16c.85.63 1.885 1 3 1s2.15-.37 3-1" data-v-978fa2fc></path><path fill="currentColor" d="M16 10.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5s.448-1.5 1-1.5s1 .672 1 1.5" data-v-978fa2fc></path><ellipse cx="9" cy="10.5" fill="currentColor" rx="1" ry="1.5" data-v-978fa2fc></ellipse><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 3.338A9.95 9.95 0 0 1 12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12c0-1.821.487-3.53 1.338-5" data-v-978fa2fc></path></g>',1)])]))])):m.createCommentVNode("",!0),n.toolBar?.image?(m.openBlock(),m.createElementBlock("div",qb,[m.createElementVNode("input",{ref_key:"imgRef",ref:d,onChange:R,type:"file",id:"upload-input",name:"image",accept:"image/*"},null,544),P[6]||(P[6]=m.createStaticVNode('<label for="upload-input" data-v-978fa2fc><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-978fa2fc><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5" data-v-978fa2fc><path d="m2 12.5l1.752-1.533a2.3 2.3 0 0 1 3.14.105l4.29 4.29a2 2 0 0 0 2.564.222l.299-.21a3 3 0 0 1 3.731.225L21 18.5m-6-13h3.5m0 0H22m-3.5 0V9m0-3.5V2" data-v-978fa2fc></path><path d="M22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12c0-1.128 0-2.122.02-3M12 2C7.286 2 4.929 2 3.464 3.464c-.424.425-.726.925-.94 1.536" data-v-978fa2fc></path></g></svg></label>',1))])):m.createCommentVNode("",!0),n.toolBar?.notify?(m.openBlock(),m.createElementBlock("div",{key:2,onClick:W,class:"p-1"},[m.withDirectives(m.createVNode(m.unref(qn.OuOToolTip),{content:"收到回复后通知"},{default:m.withCtx(()=>[...P[7]||(P[7]=[m.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[m.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",d:"M12 6v4m-4.5 9c.655 1.748 2.422 3 4.5 3q.367 0 .72-.05M16.5 19a4.5 4.5 0 0 1-1.302 1.84M9.107 2.674A6.5 6.5 0 0 1 12 2c3.727 0 6.75 3.136 6.75 7.005v.705a4.4 4.4 0 0 0 .692 2.375l1.108 1.724c1.011 1.575.239 3.716-1.52 4.214a25.8 25.8 0 0 1-14.06 0c-1.759-.498-2.531-2.639-1.52-4.213l1.108-1.725A4.4 4.4 0 0 0 5.25 9.71v-.705c0-1.074.233-2.092.65-3.002"})],-1)])]),_:1},512),[[m.vShow,c.notify===1]]),m.withDirectives(m.createVNode(m.unref(qn.OuOToolTip),{content:"收到回复后不通知"},{default:m.withCtx(()=>[...P[8]||(P[8]=[m.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{"stroke-linejoin":"round",d:"M10 9h4l-4 4h4"}),m.createElementVNode("path",{d:"M7.5 19c.655 1.748 2.422 3 4.5 3q.367 0 .72-.05M16.5 19a4.5 4.5 0 0 1-1.302 1.84M9.107 2.674A6.5 6.5 0 0 1 12 2c3.727 0 6.75 3.136 6.75 7.005v.705a4.4 4.4 0 0 0 .692 2.375l1.108 1.724c1.011 1.575.239 3.716-1.52 4.214a25.8 25.8 0 0 1-14.06 0c-1.759-.498-2.531-2.639-1.52-4.213l1.108-1.725A4.4 4.4 0 0 0 5.25 9.71v-.705c0-1.074.233-2.092.65-3.002"})])],-1)])]),_:1},512),[[m.vShow,c.notify!==1]])])):m.createCommentVNode("",!0)]),m.createElementVNode("div",{class:"sus-comment__footer-send flex justify-end my-2"},[m.createElementVNode("button",{class:"sus-button cancel mx-2",onClick:C},"取消"),m.createElementVNode("button",{class:"sus-button ok",onClick:k},"发送")])]),m.createElementVNode("div",Jb,[m.withDirectives(m.createVNode(m.unref(qn.OuOCheckBox),{modelValue:c.privacy,"onUpdate:modelValue":P[4]||(P[4]=Q=>c.privacy=Q),checked:m.unref(p)},{default:m.withCtx(()=>[...P[9]||(P[9]=[m.createTextVNode(" 仅博主可见 ",-1)])]),_:1},8,["modelValue","checked"]),[[m.vShow,n.toolBar?.privacy?.show]]),m.withDirectives(m.createElementVNode("div",Gb,null,512),[[m.vShow,n.toolBar?.privacy?.disable]])]),m.createElementVNode("div",Yb,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(f.value,(Q,Z)=>(m.openBlock(),m.createElementBlock("div",{class:"sus-comment__extend-img relative",key:Q},[m.createElementVNode("img",{class:"img-item",src:Q,alt:""},null,8,Xb),m.createElementVNode("div",{onClick:ke=>j(Z),class:"mask"},[...P[10]||(P[10]=[m.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-978fa2fc><g fill="none" stroke="currentColor" stroke-width="1.5" data-v-978fa2fc><path stroke-linecap="round" d="M20.5 6h-17m6 5l.5 5m4.5-5l-.5 5" data-v-978fa2fc></path><path d="M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6" data-v-978fa2fc></path><path stroke-linecap="round" d="M18.374 15.4c-.177 2.654-.266 3.981-1.131 4.79s-2.195.81-4.856.81h-.774c-2.66 0-3.99 0-4.856-.81c-.865-.809-.953-2.136-1.13-4.79l-.46-6.9m13.666 0l-.2 3" data-v-978fa2fc></path></g></svg>',1)])],8,Qb)]))),128))])])]))}}),[["__scopeId","data-v-978fa2fc"]]);function Zb(n){const e=new Date(n),t=e.getFullYear(),r=e.getMonth()+1,i=e.getDate(),s=new Date,o=s.getFullYear(),l=s.getMonth()+1,a=s.getDate();if(o===t&&l==r){const c=a-i;if(c===0)return"今天";if(c<7)return c+"天前"}return o===t?`${r}月${i}日`:`${t}年${r}月${i}日`}const ew={class:"sus-item__container relative"},tw={class:"sus-item-svg",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},nw={class:"flex flex-row"},rw={class:"sus-item__operate absolute flex"},iw={class:"sus-comment-aside"},sw={class:"sus-comment-avatar"},ow=["src"],lw={class:"sus-item-floor mt-2"},aw={class:"sus-item__main w-full overflow-hidden"},cw={class:"sus-item__user leading-loose"},uw=["rel","href"],dw={key:0,class:"sus-item-tag mx-1",title:"博主"},fw={key:1,class:"sus-item__content-name mx-1.5"},hw={class:"sus-item__user-date ml-3"},pw={key:0,class:"sus-item__content"},mw=["innerHTML"],gw={key:1,class:"sus-item__content"},yw=["innerHTML"],bw={key:0,class:"sus-item__info flex justify-end mx-1"},ww={class:"sus-item__info-area flex items-center"},kw={class:"sus-item__info-useragent flex items-center"},is=bn(m.defineComponent({__name:"item",props:{comment:{},lineHeight:{},showFooter:{type:Boolean},num:{default:1}},emits:["on-reply","on-remove"],setup(n,{emit:e}){const t=n,r=m.ref(),i=m.ref(),s=m.ref(!1),o=e;function l(){r.value.style.display="block",s.value=!1}function a(){const h=r?.value?.clientHeight||0,p=t.lineHeight*5;h>=p&&(s.value=!0)}function c(){o("on-reply",t.comment)}function u(){o("on-remove",t.comment)}function d(){t.comment.userAvatar||(t.comment.userAvatar="/error.webp")}function f(){const h=new Date(t.comment?.createdDate),p=new Date,g=new Date(p.getFullYear()-1,p.getMonth(),p.getDate());return h>g?"ugc noopener nofollow":"ugc noopener noreferrer nofollow"}return m.onMounted(()=>{d(),a()}),(h,p)=>(m.openBlock(),m.createElementBlock("div",ew,[m.withDirectives((m.openBlock(),m.createElementBlock("svg",tw,[...p[0]||(p[0]=[m.createElementVNode("rect",{width:"24",height:"24",fill:"none"},null,-1),m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{d:"M21 7v-.281c0-2.19 0-3.285-.707-3.884c-.707-.6-1.788-.42-3.95-.059l-1.055.176c-1.64.273-2.46.41-3.288.41s-1.648-.137-3.288-.41l-1.054-.176c-2.162-.36-3.243-.54-3.95.059S3 4.529 3 6.719V12c0 5.49 4.239 8.155 6.899 9.286c.721.307 1.082.46 2.101.46c1.02 0 1.38-.153 2.101-.46C16.761 20.155 21 17.49 21 12v-1"}),m.createElementVNode("path",{d:"M6.5 9c.291-.583 1.077-1 2-1s1.709.417 2 1m3 0c.291-.583 1.077-1 2-1s1.709.417 2 1m-9 5s1.05 1 3.5 1s3.5-1 3.5-1"})],-1)])],512)),[[m.vShow,n.comment.band==="privacy"]]),m.createElementVNode("div",nw,[m.createElementVNode("div",rw,[m.withDirectives(m.createElementVNode("span",{onClick:u,class:"sus-item__operate-delete cursor-pointer"}," 删除 ",512),[[m.vShow,!n.comment.privacy&&n.comment.showEdit]]),m.withDirectives(m.createElementVNode("span",{onClick:c,class:"sus-item__operate-edit cursor-pointer"}," 编辑 ",512),[[m.vShow,!n.comment.privacy&&n.comment.showEdit]]),m.withDirectives(m.createElementVNode("span",{onClick:c,class:"sus-item__operate-reply cursor-pointer"}," 回复 ",512),[[m.vShow,!n.comment.privacy]])]),m.createElementVNode("div",iw,[m.createElementVNode("div",sw,[m.withDirectives(m.createElementVNode("img",{alt:"",class:"sus-avatar",src:n.comment.userAvatar,onerror:"this.onerror=null,this.src='/error.webp'"},null,8,ow),[[m.vShow,!!n.comment.userAvatar]]),m.withDirectives(m.createElementVNode("span",{class:"sus-avatar-text flex w-full h-full items-center justify-center"},m.toDisplayString(n.comment.userName.charAt(0)),513),[[m.vShow,!n.comment.userAvatar]])]),m.createElementVNode("p",lw,m.toDisplayString(n.num),1)]),m.createElementVNode("div",aw,[m.createElementVNode("div",cw,[m.createElementVNode("a",{target:"_blank",rel:f(),href:n.comment.userWebsite,class:m.normalizeClass([n.comment.tagName,"sus-item__user-name font-semibold ml-1 cursor-pointer"])},m.toDisplayString(n.comment.userName),11,uw),n.comment.tagName==="owner"?(m.openBlock(),m.createElementBlock("span",dw," 博主 ")):m.createCommentVNode("",!0),n.comment.replyName?(m.openBlock(),m.createElementBlock("span",fw,"@"+m.toDisplayString(n.comment.replyName),1)):m.createCommentVNode("",!0),m.createElementVNode("span",hw,m.toDisplayString(m.unref(Zb)(n.comment.createdDate)),1)]),n.comment.privacy?(m.openBlock(),m.createElementBlock("div",pw,[p[1]||(p[1]=m.createElementVNode("div",{class:"sus-item-privacy"},null,-1)),m.createElementVNode("span",{class:"sus-item-privacy-text",innerHTML:n.comment.content},null,8,mw)])):(m.openBlock(),m.createElementBlock("div",gw,[m.createElementVNode("span",{ref_key:"contentDom",ref:r,class:"sus-item__content-text",innerHTML:n.comment.content+(n.comment.contentExtends||"")},null,8,yw),s.value?(m.openBlock(),m.createElementBlock("a",{key:0,ref_key:"showMoreDom",ref:i,class:"sus-show-detail my-1.5 cursor-pointer",onClick:l},"显示更多>",512)):m.createCommentVNode("",!0)]))])]),n.showFooter&&n.comment.area&&!n.comment.privacy?(m.openBlock(),m.createElementBlock("div",bw,[m.createElementVNode("span",ww,[p[2]||(p[2]=m.createElementVNode("svg",{class:"sus-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[m.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[m.createElementVNode("path",{d:"M12.5 7.041A3 3 0 1 0 14.959 9.5"}),m.createElementVNode("path",{d:"M5 15.216c-.647-1.654-1-3.415-1-5.073C4 5.646 7.582 2 12 2s8 3.646 8 8.143c0 4.462-2.553 9.67-6.537 11.531a3.45 3.45 0 0 1-2.926 0C9.265 21.08 8.138 20.144 7.194 19"})])],-1)),m.createTextVNode(" "+m.toDisplayString(n.comment.area),1)]),m.createElementVNode("span",kw,[p[3]||(p[3]=m.createElementVNode("svg",{class:"sus-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[m.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",d:"M5 2.252c-.774.169-1.359.45-1.828.92C2 4.343 2 6.229 2 10v1c0 2.828 0 4.243.879 5.121C3.757 17 5.172 17 8 17h8c2.828 0 4.243 0 5.121-.879C22 15.243 22 13.828 22 11v-1c0-3.771 0-5.657-1.172-6.828S17.771 2 14 2H9m7 20H8m4-5v5m10-9h-6M2 13h10"})],-1)),m.createTextVNode(" "+m.toDisplayString(n.comment.userAgent),1)])])):m.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-8ee9ae13"]]),xw={class:"sus-comment__item"},Sw={key:0,class:"sus-comment__item-child"},Cw={key:1},Ew={key:0,class:"sus-comment__item-footer flex justify-center w-full cursor-pointer"},df=bn(m.defineComponent({__name:"index",props:{comment:{},lineHeight:{default:23},showFooter:{type:Boolean,default:!1}},emits:["on-reply"],setup(n,{emit:e}){const t=m.ref(!1),r=e;function i(s){r("on-reply",s)}return(s,o)=>(m.openBlock(),m.createElementBlock("div",xw,[m.createVNode(is,{comment:n.comment,onOnReply:o[0]||(o[0]=l=>i(n.comment)),lineHeight:n.lineHeight,showFooter:n.showFooter},null,8,["comment","lineHeight","showFooter"]),n.comment.child?.length>0?(m.openBlock(),m.createElementBlock("div",Sw,[m.createVNode(is,{onOnReply:o[1]||(o[1]=l=>i(n.comment.child[0])),comment:n.comment.child[0],num:2,showFooter:n.showFooter,lineHeight:n.lineHeight,class:"sus-comment__item-child__item"},null,8,["comment","showFooter","lineHeight"]),n.comment.child?.length>1?(m.openBlock(),m.createBlock(is,{key:0,onOnReply:o[2]||(o[2]=l=>i(n.comment.child[1])),comment:n.comment.child[1],num:3,showFooter:n.showFooter,lineHeight:n.lineHeight,class:"sus-comment__item-child__item"},null,8,["comment","showFooter","lineHeight"])):m.createCommentVNode("",!0),n.comment.child?.length>2?(m.openBlock(),m.createElementBlock("div",Cw,[t.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Ew,[m.createElementVNode("p",{class:"sus-load-more",onClick:o[3]||(o[3]=l=>t.value=!0)}," 查看更多回复 > ")])),t.value?(m.openBlock(!0),m.createElementBlock(m.Fragment,{key:1},m.renderList(n.comment.child.slice(2),(l,a)=>(m.openBlock(),m.createBlock(is,{onOnReply:c=>i(l),key:a,comment:l,num:4+a,showFooter:n.showFooter,lineHeight:n.lineHeight,class:"sus-comment__item-child__item"},null,8,["onOnReply","comment","num","showFooter","lineHeight"]))),128)):m.createCommentVNode("",!0)])):m.createCommentVNode("",!0)])):m.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-162930a9"]]),Mw={class:"sus-top-item flex items-start p-1.5 overflow-hidden"},vw={class:"sus-top-item__info flex flex-col mr-1"},Tw={class:"sus-top-item__user whitespace-nowrap"},Ow={key:0,class:"sus-top-item__reply whitespace-nowrap"},Nw=["innerHTML"],ff=bn(m.defineComponent({__name:"simple",props:{comment:{}},setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",Mw,[m.createElementVNode("div",vw,[m.createElementVNode("span",Tw,m.toDisplayString(n.comment.userName)+": ",1),n.comment.replyName?(m.openBlock(),m.createElementBlock("span",Ow,m.toDisplayString("@"+n.comment.replyName),1)):m.createCommentVNode("",!0)]),m.createElementVNode("span",{class:"sus-top-item__content w-full",innerHTML:n.comment.content},null,8,Nw)]))}}),[["__scopeId","data-v-7407d86d"]]),Aw={class:"sus-top-item__user flex items-center"},Rw={key:0,class:"sus-top-item__user-avatar ml-1 mr-2"},Dw=["src"],Iw={class:"sus-top-item__user-owner"},Pw={class:"sus-top-item__user-reply ml-3 opacity-70"},Lw=["innerHTML"],hf=bn(m.defineComponent({__name:"index",props:{comment:{}},emits:["go-local"],setup(n,{emit:e}){const t=e;function r(){t("go-local")}return(i,s)=>(m.openBlock(),m.createElementBlock("div",{class:"sus-top-item p-1.5 cursor-pointer overflow-hidden",onClick:r},[m.createElementVNode("div",Aw,[n.comment.userAvatar?(m.openBlock(),m.createElementBlock("div",Rw,[m.createElementVNode("img",{alt:"",class:"sus-avatar",loading:"lazy",decoding:"async",src:n.comment.userAvatar,onerror:"this.onerror=null,this.src='/error.webp'"},null,8,Dw)])):m.createCommentVNode("",!0),m.createElementVNode("div",Iw,m.toDisplayString(n.comment.userName),1),m.createElementVNode("div",Pw,m.toDisplayString(n.comment.replyName?"@"+n.comment.replyName:""),1)]),m.createElementVNode("div",{class:"sus-top-item__content p-1",innerHTML:n.comment.content},null,8,Lw)]))}}),[["__scopeId","data-v-1e2f9488"]]),Bw=[uf,df,hf,ff],_w={install(n){Bw.forEach(e=>{n.component(e.name,e)})}};je.SuSComment=uf,je.SuSList=df,je.SuSSimpleTop=ff,je.SuSTop=hf,je.default=_w,Object.defineProperties(je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/dist/t/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
html{--sus-font-color: 51, 51, 51;--sus-danger-font-color: 245, 108, 108;--sus-primary-color: 94, 114, 228;--sus-primary-hover-color: 61, 85, 223;--sus-danger-color: 245, 108, 108;--sus-primary-fontcolor: 255, 255, 255;--sus-basic-input-bg: 231, 235, 240;--sus-common-bg: 255, 255, 255;--sus-gray-bg: 230, 230, 233;--sus-select-bg: 231, 235, 240;--sus-item-bg: 188, 190, 190;--sus-linear-gradient-bg: 188, 190, 190;--sus-item-hover-bg: 231, 235, 240;--sus-avatar-size: 43px;--sus-item-margin: 45px;--sus-item-hover-opacity: .5;--sus-item-opacity: .12;--sus-item-primary-opacity: .8;--sus-item-padding: 11px 9px 9px;--sus-item-child-padding: 3px 11px}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-2{bottom:.5rem}.left-1{left:.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-3{margin-left:.75rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-full{width:100%}.flex-grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.border{border-width:1px}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.font-semibold{font-weight:600}.leading-loose{line-height:2}.opacity-70{opacity:.7}.outline{outline-style:solid}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.sus-comment [data-type=emoji] img,.sus-comment .emoji,.sus-comment-item [data-type=emoji] img,.sus-comment-item .emoji{display:inline;width:24px;margin:0}.sus-comment .ProseMirror,.sus-comment-item .ProseMirror{position:unset!important;height:160px;border-radius:5px;border-color:transparent;outline:none}.sus-comment .ProseMirror pre,.sus-comment-item .ProseMirror pre{padding:1em;margin:.5em 0;color:#ccc;border-radius:5px;overflow-x:scroll!important;overflow-y:hidden!important;background-color:#2d2d2d;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-webkit-hyphens:none;hyphens:none}.sus-comment .code-box,.sus-comment-item .code-box{position:relative}.sus-comment .code-select,.sus-comment-item .code-select{position:absolute;top:3px;right:3px;padding:2px;text-align:center;width:-moz-min-content;width:min-content;background:transparent;border:none;outline:none;color:rgba(var(--sus-primary-color));cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.sus-comment p.is-editor-empty:first-child:before,.sus-comment-item p.is-editor-empty:first-child:before{color:rgba(var(--sus-font-color),.4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.sus-comment .tiptap input,.sus-comment .tiptap button,.sus-comment-item .tiptap input,.sus-comment-item .tiptap button{padding:5px 7px;margin:0 3px;background-color:rgba(var(--sus-gray-bg));border-radius:5px;border-color:transparent;outline:none}.sus-comment .tiptap .button-group,.sus-comment-item .tiptap .button-group{margin-bottom:3px}.sus-avatar{border-radius:999px;width:100%;height:100%}.sus-comment-avatar{width:var(--sus-avatar-size);height:var(--sus-avatar-size);min-width:var(--sus-avatar-size);margin:3px 5px}.sus-input{display:block;color:inherit;width:100%;height:32px;min-width:120px;padding:0 9px;background-color:rgba(var(--sus-basic-input-bg));border-radius:5px;border-color:transparent;outline:none}.sus-input::-moz-placeholder{opacity:.7;font-size:90%}.sus-input::placeholder{opacity:.7;font-size:90%}.sus-textarea{display:block;color:inherit;width:100%;height:185px;min-width:120px;max-height:185px;padding:7px 9px;background-color:rgba(var(--sus-basic-input-bg));border-radius:5px;border-color:transparent;outline:none}.sus-textarea::-moz-placeholder{opacity:.7;font-size:90%}.sus-textarea::placeholder{opacity:.7;font-size:90%}.sus-button{padding:7px 18px;border-radius:5px;border:none;outline:none;white-space:nowrap;transition:all .25s}.sus-button.ok{color:rgb(var(--sus-primary-fontcolor));background-color:rgb(var(--sus-primary-color))}.sus-button.ok:hover{background-color:rgb(var(--sus-primary-hover-color))}.sus-button.cancel{background-color:rgba(var(--sus-gray-bg),.5)}.sus-button.cancel:hover{color:rgb(var(--sus-primary-fontcolor));background-color:rgb(var(--sus-danger-color))}.sus-avatar-text{font-size:1.2rem;font-weight:700;color:rgb(var(--sus-primary-fontcolor));background-color:rgba(var(--sus-primary-color),.9);border-radius:99px;box-shadow:0 1px 6px #27272740;font-family:cursive,serif}.sus-emoji-panel[data-v-4b6da5f8]{z-index:2;grid-template-columns:repeat(7,1fr);padding:9px 7px;width:-moz-fit-content;width:fit-content;border-radius:5px;border:rgba(var(--sus-primary-color),.2) solid 1px;background-color:rgba(var(--sus-common-bg),.6);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);animation:susSlideInUp-4b6da5f8 .5s}.sus-emoji-item[data-v-4b6da5f8]{margin:2px;width:25px;height:25px;transition:all .2s}.sus-emoji-item[data-v-4b6da5f8]:hover{scale:1.3}@keyframes susSlideInUp-4b6da5f8{0%{transform:translate3d(0,30%,0);visibility:visible}to{transform:translateZ(0)}}.sus-link[data-v-3f87b608]{position:absolute;display:flex;top:3px;left:3px;padding:3px 5px;border-radius:5px;box-shadow:0 16px 48px #1118270a,0 12px 24px #1118270a,0 6px 8px #11182705,0 2px 3px #11182705}.sus-link-input[data-v-3f87b608]{outline:none;border:none}.sus-link svg[data-v-3f87b608]{width:20px;height:20px;padding:3px;opacity:.7}.sus-link svg[data-v-3f87b608]:hover{opacity:1}.sus-bubble-menu[data-v-3f87b608]{background-color:rgba(var(--sus-common-bg),.5);border-radius:12px;padding:3px 7px;box-shadow:0 12px 33px #0000000f,0 3.618px 9.949px #0000000a}.sus-bubble-menu button[data-v-3f87b608]{padding:5px 9px;border:none;border-radius:8px;background-color:transparent}.sus-bubble-menu button[data-v-3f87b608]:hover{background-color:rgba(var(--sus-select-bg),.5)}.sus-comment[data-v-968e6aef]{min-height:200px;color:rgb(var(--sus-font-color));transition:all .25s}.sus-comment__main[data-v-968e6aef]{width:inherit;height:inherit;transition:inherit}.sus-comment__editor[data-v-968e6aef]{margin:0 2px;min-height:180px;transition:all .25s}.sus-comment__toolbar[data-v-968e6aef]{width:100%;text-align:end;font-size:90%;margin:3px}.sus-comment__toolbar-mask[data-v-968e6aef]{background-color:rgba(var(--sus-common-bg),.5)}.sus-comment__extend-img[data-v-968e6aef]{margin:5px;max-height:120px;max-width:200px;border-radius:5px;transition:all .25s}.sus-comment__extend-img:hover .mask[data-v-968e6aef],.sus-comment__extend-img:focus .mask[data-v-968e6aef]{opacity:1;width:50%}.sus-comment__extend-img .mask[data-v-968e6aef]{display:flex;position:absolute;opacity:0;top:0;right:0;width:0;height:100%;color:rgba(var(--sus-danger-color));background-color:rgba(var(--sus-gray-bg),.7);transition:all .25s}.sus-comment__extend-img .mask svg[data-v-968e6aef]{margin:auto}.sus-comment__extend-img .img-item[data-v-968e6aef]{max-height:100%;max-width:100%;-o-object-fit:cover;object-fit:cover}.sus-comment__extend-img img[data-v-968e6aef]{border-radius:5px}.sus-comment__info[data-v-968e6aef]{display:inline-flex;position:relative;width:inherit}.sus-comment__info-input[data-v-968e6aef]{position:relative;flex-grow:1;display:flex;margin:2px}.sus-comment__footer svg[data-v-968e6aef]{width:22px;height:22px}.sus-comment__footer svg[data-v-968e6aef]:hover{color:rgba(var(--sus-primary-color))}.sus-comment__footer svg[data-v-968e6aef]:focus{outline:none}.sus-input.sus-email[data-v-968e6aef]{min-width:180px}.sus-upload #upload-input[data-v-968e6aef]{display:none}.sus-upload label[data-v-968e6aef]{display:block;width:22px;height:24px}.sus-comment__info-input .ouo-tooltip-trigger{width:inherit}.sus-comment__info-input .ouo-tooltip-wrapper:first-child{width:100%;display:inline-flex}.sus-comment-input{padding:11px 15px;border-radius:5px;background-color:rgba(var(--sus-basic-input-bg));overflow-y:scroll}.sus-comment-input .is-empty.is-editor-empty{font-size:90%}.sus-link-input{padding:5px 7px;border-radius:5px;background-color:rgba(var(--sus-basic-input-bg))}.sus-svg[data-v-8ee9ae13]{height:13px;width:13px;margin:0 3px}.sus-item__container[data-v-8ee9ae13]{margin:10px 0;padding:var(--sus-item-padding);color:rgb(var(--sus-font-color));overflow:hidden}.sus-item-tag[data-v-8ee9ae13]{padding:1px 2px;margin:0 6px;font-size:clamp(11px,80%,13px);color:rgb(var(--sus-primary-fontcolor));background-color:rgba(var(--sus-primary-color),var(--sus-item-primary-opacity));border-radius:3px}.sus-item-floor[data-v-8ee9ae13]{opacity:.6;font-size:clamp(10px,70%,12px);text-align:center}.sus-item-floor[data-v-8ee9ae13]:before{content:"#";margin:0 1px}.sus-item-privacy[data-v-8ee9ae13]{z-index:10;position:absolute;width:100%;height:100%;background:linear-gradient(45deg,rgba(var(--sus-linear-gradient-bg),.5) 0,rgba(var(--sus-linear-gradient-bg),.5) 25%,transparent 25%,transparent 50%,rgba(var(--sus-linear-gradient-bg),.5) 50%,rgba(var(--sus-linear-gradient-bg),.5) 75%,transparent 75%,transparent);background-size:50px 50px}.sus-item-privacy-text[data-v-8ee9ae13]{display:flex;align-items:center;justify-content:center;opacity:.7;font-size:110%;font-weight:700;height:60px}.sus-item-svg[data-v-8ee9ae13]{position:absolute;right:-25px;bottom:-25px;width:110px;height:110px;color:rgba(var(--sus-font-color),.03);transform-origin:50% 50%;transform:rotate(-20deg)}.sus-item__info[data-v-8ee9ae13]{opacity:.7;font-size:70%;margin-top:3px;margin-bottom:-2px;-moz-column-gap:5px;column-gap:5px}.sus-item__operate[data-v-8ee9ae13]{top:0;right:0;font-size:80%;-moz-column-gap:3px;column-gap:3px}.sus-item__operate-reply[data-v-8ee9ae13],.sus-item__operate-delete[data-v-8ee9ae13],.sus-item__operate-edit[data-v-8ee9ae13]{padding:4px 15px;background-color:rgba(var(--sus-gray-bg),.9);transition:all .25s}.sus-item__operate-reply[data-v-8ee9ae13]:hover,.sus-item__operate-delete[data-v-8ee9ae13]:hover,.sus-item__operate-edit[data-v-8ee9ae13]:hover{color:rgb(var(--sus-primary-fontcolor));background-color:rgba(var(--sus-primary-color),var(--sus-item-primary-opacity))}.sus-item__operate-reply[data-v-8ee9ae13]{color:rgba(var(--sus-font-color),.8);border-radius:0 9px}.sus-item__operate-delete[data-v-8ee9ae13]{color:rgba(var(--sus-danger-font-color),.8);border-radius:0 9px}.sus-item__operate-delete[data-v-8ee9ae13]:hover{background-color:rgba(var(--sus-danger-color),var(--sus-item-primary-opacity))}.sus-item__operate-edit[data-v-8ee9ae13]{color:rgba(var(--sus-font-color),.8);border-radius:0 9px}.sus-item__user[data-v-8ee9ae13]{margin-right:37px}.sus-item__user-date[data-v-8ee9ae13]{font-size:90%;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sus-item__user-name[data-v-8ee9ae13]{font-size:105%}.sus-item__user-name.master[data-v-8ee9ae13]{color:rgb(var(--sus-primary-color))}.sus-item__user a[data-v-8ee9ae13]{background-color:transparent;text-decoration:none}.sus-item__content[data-v-8ee9ae13]{position:relative;padding:5px;min-width:52px}.sus-item__content-text[data-v-8ee9ae13]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden}.sus-item__content-name[data-v-8ee9ae13]{font-size:90%;padding:2px 5px;border-radius:3px;background-color:rgba(var(--sus-gray-bg))}.sus-item__content img[data-v-8ee9ae13]{display:inline-block;width:auto;max-width:400px;max-height:100px}.sus-show-detail[data-v-8ee9ae13]{color:rgba(var(--sus-primary-color),var(--sus-item-primary-opacity))}.sus-show-detail[data-v-8ee9ae13]:hover{color:rgb(var(--sus-primary-color))}.sus-item__content img{width:auto;max-width:400px;max-height:100px}.sus-comment__item[data-v-162930a9]{position:relative;margin:15px 0;line-height:1.5;background-color:rgba(var(--sus-item-bg),var(--sus-item-opacity));border-radius:0 9px 9px;transition:box-shadow .25s ease-in-out}.sus-comment__item[data-v-162930a9]:hover{box-shadow:3px 3px 15px rgba(var(--sus-item-bg),.1)}.sus-comment__item-child[data-v-162930a9]{padding:var(--sus-item-child-padding);margin-left:var(--sus-item-margin)}.sus-comment__item-child__item[data-v-162930a9]{background-color:rgba(var(--sus-item-bg),var(--sus-item-opacity));border-radius:0 9px 9px;transition:box-shadow .2s ease-in-out}.sus-comment__item-child__item[data-v-162930a9]:hover{box-shadow:3px 3px 15px rgba(var(--sus-item-bg),.1)}.sus-comment__item-footer[data-v-162930a9]{margin-top:15px;margin-bottom:10px}.sus-load-more[data-v-162930a9]{color:rgba(var(--sus-primary-color),var(--sus-item-primary-opacity))}.sus-load-more[data-v-162930a9]:hover{color:rgb(var(--sus-primary-color))}.sus-top-item[data-v-7407d86d]{width:inherit;max-height:80px}.sus-top-item[data-v-7407d86d]:hover{border-radius:5px;background-color:rgba(var(--sus-select-bg),.5);transition:all .25s}.sus-top-item__content[data-v-7407d86d]{display:-webkit-box;color:rgb(var(--sus-font-color));line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-y:hidden;flex:1}.sus-top-item__reply[data-v-7407d86d]{font-size:90%;width:-moz-fit-content;width:fit-content;margin-top:3px;border-radius:3px;background-color:rgba(var(--sus-item-bg),var(--sus-item-opacity));opacity:.8}.sus-top-item__info[data-v-7407d86d]{max-width:28%;overflow:hidden}.sus-top-item[data-v-1e2f9488]{max-height:80px}.sus-top-item[data-v-1e2f9488]:hover{border-radius:5px;background-color:rgba(var(--sus-item-hover-bg),.5);transition:all .25s}.sus-top-item__content[data-v-1e2f9488]{display:-webkit-box;margin:3px 1px 0;color:rgb(var(--sus-font-color));-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-y:hidden}.sus-top-item__user[data-v-1e2f9488]{font-size:90%}.sus-top-item__user-owner[data-v-1e2f9488]{padding:3px 6px;width:-moz-fit-content;width:fit-content;background-color:rgba(var(--sus-basic-input-bg),var(--sus-item-opacity));border-radius:7px}.sus-top-item__user-avatar[data-v-1e2f9488]{width:28px;height:28px}.sus-top-item__user-avatar .sus-avatar[data-v-1e2f9488]{border:thin solid;-o-object-fit:cover;object-fit:cover;-o-object-position:top;object-position:top;box-shadow:.1em .1em 0 -.05em;color:rgba(var(--sus-font-color),.1)}.sus-top-item .code-toolbar[data-v-1e2f9488]{display:none}
|
|
1
|
+
html{--sus-font-color: 51, 51, 51;--sus-danger-font-color: 245, 108, 108;--sus-primary-color: 94, 114, 228;--sus-primary-hover-color: 61, 85, 223;--sus-danger-color: 245, 108, 108;--sus-primary-fontcolor: 255, 255, 255;--sus-basic-input-bg: 231, 235, 240;--sus-common-bg: 255, 255, 255;--sus-gray-bg: 230, 230, 233;--sus-select-bg: 231, 235, 240;--sus-item-bg: 188, 190, 190;--sus-linear-gradient-bg: 188, 190, 190;--sus-item-hover-bg: 231, 235, 240;--sus-avatar-size: 43px;--sus-item-margin: 45px;--sus-item-hover-opacity: .5;--sus-item-opacity: .12;--sus-item-primary-opacity: .8;--sus-item-padding: 11px 9px 9px;--sus-item-child-padding: 3px 11px}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-2{bottom:.5rem}.left-1{left:.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-1\.5{margin-top:.375rem;margin-bottom:.375rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-3{margin-left:.75rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-full{width:100%}.flex-grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.border{border-width:1px}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.font-semibold{font-weight:600}.leading-loose{line-height:2}.opacity-70{opacity:.7}.outline{outline-style:solid}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.sus-comment [data-type=emoji] img,.sus-comment .emoji,.sus-comment-item [data-type=emoji] img,.sus-comment-item .emoji{display:inline;width:24px;margin:0}.sus-comment .ProseMirror,.sus-comment-item .ProseMirror{position:unset!important;height:160px;border-radius:5px;border-color:transparent;outline:none}.sus-comment .ProseMirror pre,.sus-comment-item .ProseMirror pre{padding:1em;margin:.5em 0;color:#ccc;border-radius:5px;overflow-x:scroll!important;overflow-y:hidden!important;background-color:#2d2d2d;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-webkit-hyphens:none;hyphens:none}.sus-comment .code-box,.sus-comment-item .code-box{position:relative}.sus-comment .code-select,.sus-comment-item .code-select{position:absolute;top:3px;right:3px;padding:2px;text-align:center;width:-moz-min-content;width:min-content;background:transparent;border:none;outline:none;color:rgba(var(--sus-primary-color));cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.sus-comment p.is-editor-empty:first-child:before,.sus-comment-item p.is-editor-empty:first-child:before{color:rgba(var(--sus-font-color),.4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.sus-comment .tiptap input,.sus-comment .tiptap button,.sus-comment-item .tiptap input,.sus-comment-item .tiptap button{padding:5px 7px;margin:0 3px;background-color:rgba(var(--sus-gray-bg));border-radius:5px;border-color:transparent;outline:none}.sus-comment .tiptap .button-group,.sus-comment-item .tiptap .button-group{margin-bottom:3px}.sus-avatar{border-radius:999px;width:100%;height:100%}.sus-comment-avatar{width:var(--sus-avatar-size);height:var(--sus-avatar-size);min-width:var(--sus-avatar-size);margin:3px 5px}.sus-input{display:block;color:inherit;width:100%;height:32px;min-width:120px;padding:0 9px;background-color:rgba(var(--sus-basic-input-bg));border-radius:5px;border-color:transparent;outline:none}.sus-input::-moz-placeholder{opacity:.7;font-size:90%}.sus-input::placeholder{opacity:.7;font-size:90%}.sus-textarea{display:block;color:inherit;width:100%;height:185px;min-width:120px;max-height:185px;padding:7px 9px;background-color:rgba(var(--sus-basic-input-bg));border-radius:5px;border-color:transparent;outline:none}.sus-textarea::-moz-placeholder{opacity:.7;font-size:90%}.sus-textarea::placeholder{opacity:.7;font-size:90%}.sus-button{padding:7px 18px;border-radius:5px;border:none;outline:none;white-space:nowrap;transition:all .25s}.sus-button.ok{color:rgb(var(--sus-primary-fontcolor));background-color:rgb(var(--sus-primary-color))}.sus-button.ok:hover{background-color:rgb(var(--sus-primary-hover-color))}.sus-button.cancel{background-color:rgba(var(--sus-gray-bg),.5)}.sus-button.cancel:hover{color:rgb(var(--sus-primary-fontcolor));background-color:rgb(var(--sus-danger-color))}.sus-avatar-text{font-size:1.2rem;font-weight:700;color:rgb(var(--sus-primary-fontcolor));background-color:rgba(var(--sus-primary-color),.9);border-radius:99px;box-shadow:0 1px 6px #27272740;font-family:cursive,serif}.sus-emoji-panel[data-v-4b6da5f8]{z-index:2;grid-template-columns:repeat(7,1fr);padding:9px 7px;width:-moz-fit-content;width:fit-content;border-radius:5px;border:rgba(var(--sus-primary-color),.2) solid 1px;background-color:rgba(var(--sus-common-bg),.6);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);animation:susSlideInUp-4b6da5f8 .5s}.sus-emoji-item[data-v-4b6da5f8]{margin:2px;width:25px;height:25px;transition:all .2s}.sus-emoji-item[data-v-4b6da5f8]:hover{scale:1.3}@keyframes susSlideInUp-4b6da5f8{0%{transform:translate3d(0,30%,0);visibility:visible}to{transform:translateZ(0)}}.sus-link[data-v-3f87b608]{position:absolute;display:flex;top:3px;left:3px;padding:3px 5px;border-radius:5px;box-shadow:0 16px 48px #1118270a,0 12px 24px #1118270a,0 6px 8px #11182705,0 2px 3px #11182705}.sus-link-input[data-v-3f87b608]{outline:none;border:none}.sus-link svg[data-v-3f87b608]{width:20px;height:20px;padding:3px;opacity:.7}.sus-link svg[data-v-3f87b608]:hover{opacity:1}.sus-bubble-menu[data-v-3f87b608]{background-color:rgba(var(--sus-common-bg),.5);border-radius:12px;padding:3px 7px;box-shadow:0 12px 33px #0000000f,0 3.618px 9.949px #0000000a}.sus-bubble-menu button[data-v-3f87b608]{padding:5px 9px;border:none;border-radius:8px;background-color:transparent}.sus-bubble-menu button[data-v-3f87b608]:hover{background-color:rgba(var(--sus-select-bg),.5)}.sus-comment[data-v-978fa2fc]{min-height:200px;color:rgb(var(--sus-font-color));transition:all .25s}.sus-comment__main[data-v-978fa2fc]{width:inherit;height:inherit;transition:inherit}.sus-comment__editor[data-v-978fa2fc]{margin:0 2px;min-height:180px;transition:all .25s}.sus-comment__toolbar[data-v-978fa2fc]{width:100%;text-align:end;font-size:90%;margin:3px}.sus-comment__toolbar-mask[data-v-978fa2fc]{background-color:rgba(var(--sus-common-bg),.5)}.sus-comment__extend-img[data-v-978fa2fc]{margin:5px;max-height:120px;max-width:200px;border-radius:5px;transition:all .25s}.sus-comment__extend-img:hover .mask[data-v-978fa2fc],.sus-comment__extend-img:focus .mask[data-v-978fa2fc]{opacity:1;width:50%}.sus-comment__extend-img .mask[data-v-978fa2fc]{display:flex;position:absolute;opacity:0;top:0;right:0;width:0;height:100%;color:rgba(var(--sus-danger-color));background-color:rgba(var(--sus-gray-bg),.7);transition:all .25s}.sus-comment__extend-img .mask svg[data-v-978fa2fc]{margin:auto}.sus-comment__extend-img .img-item[data-v-978fa2fc]{max-height:100%;max-width:100%;-o-object-fit:cover;object-fit:cover}.sus-comment__extend-img img[data-v-978fa2fc]{border-radius:5px}.sus-comment__info[data-v-978fa2fc]{display:inline-flex;position:relative;width:inherit}.sus-comment__info-input[data-v-978fa2fc]{position:relative;flex-grow:1;display:flex;margin:2px}.sus-comment__footer svg[data-v-978fa2fc]{width:22px;height:22px}.sus-comment__footer svg[data-v-978fa2fc]:hover{color:rgba(var(--sus-primary-color))}.sus-comment__footer svg[data-v-978fa2fc]:focus{outline:none}.sus-input.sus-email[data-v-978fa2fc]{min-width:180px}.sus-upload #upload-input[data-v-978fa2fc]{display:none}.sus-upload label[data-v-978fa2fc]{display:block;width:22px;height:24px}.sus-comment__info-input .ouo-tooltip-trigger{width:inherit}.sus-comment__info-input .ouo-tooltip-wrapper:first-child{width:100%;display:inline-flex}.sus-comment-input{padding:11px 15px;border-radius:5px;background-color:rgba(var(--sus-basic-input-bg));overflow-y:scroll}.sus-comment-input .is-empty.is-editor-empty{font-size:90%}.sus-link-input{padding:5px 7px;border-radius:5px;background-color:rgba(var(--sus-basic-input-bg))}.sus-svg[data-v-8ee9ae13]{height:13px;width:13px;margin:0 3px}.sus-item__container[data-v-8ee9ae13]{margin:10px 0;padding:var(--sus-item-padding);color:rgb(var(--sus-font-color));overflow:hidden}.sus-item-tag[data-v-8ee9ae13]{padding:1px 2px;margin:0 6px;font-size:clamp(11px,80%,13px);color:rgb(var(--sus-primary-fontcolor));background-color:rgba(var(--sus-primary-color),var(--sus-item-primary-opacity));border-radius:3px}.sus-item-floor[data-v-8ee9ae13]{opacity:.6;font-size:clamp(10px,70%,12px);text-align:center}.sus-item-floor[data-v-8ee9ae13]:before{content:"#";margin:0 1px}.sus-item-privacy[data-v-8ee9ae13]{z-index:10;position:absolute;width:100%;height:100%;background:linear-gradient(45deg,rgba(var(--sus-linear-gradient-bg),.5) 0,rgba(var(--sus-linear-gradient-bg),.5) 25%,transparent 25%,transparent 50%,rgba(var(--sus-linear-gradient-bg),.5) 50%,rgba(var(--sus-linear-gradient-bg),.5) 75%,transparent 75%,transparent);background-size:50px 50px}.sus-item-privacy-text[data-v-8ee9ae13]{display:flex;align-items:center;justify-content:center;opacity:.7;font-size:110%;font-weight:700;height:60px}.sus-item-svg[data-v-8ee9ae13]{position:absolute;right:-25px;bottom:-25px;width:110px;height:110px;color:rgba(var(--sus-font-color),.03);transform-origin:50% 50%;transform:rotate(-20deg)}.sus-item__info[data-v-8ee9ae13]{opacity:.7;font-size:70%;margin-top:3px;margin-bottom:-2px;-moz-column-gap:5px;column-gap:5px}.sus-item__operate[data-v-8ee9ae13]{top:0;right:0;font-size:80%;-moz-column-gap:3px;column-gap:3px}.sus-item__operate-reply[data-v-8ee9ae13],.sus-item__operate-delete[data-v-8ee9ae13],.sus-item__operate-edit[data-v-8ee9ae13]{padding:4px 15px;background-color:rgba(var(--sus-gray-bg),.9);transition:all .25s}.sus-item__operate-reply[data-v-8ee9ae13]:hover,.sus-item__operate-delete[data-v-8ee9ae13]:hover,.sus-item__operate-edit[data-v-8ee9ae13]:hover{color:rgb(var(--sus-primary-fontcolor));background-color:rgba(var(--sus-primary-color),var(--sus-item-primary-opacity))}.sus-item__operate-reply[data-v-8ee9ae13]{color:rgba(var(--sus-font-color),.8);border-radius:0 9px}.sus-item__operate-delete[data-v-8ee9ae13]{color:rgba(var(--sus-danger-font-color),.8);border-radius:0 9px}.sus-item__operate-delete[data-v-8ee9ae13]:hover{background-color:rgba(var(--sus-danger-color),var(--sus-item-primary-opacity))}.sus-item__operate-edit[data-v-8ee9ae13]{color:rgba(var(--sus-font-color),.8);border-radius:0 9px}.sus-item__user[data-v-8ee9ae13]{margin-right:37px}.sus-item__user-date[data-v-8ee9ae13]{font-size:90%;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sus-item__user-name[data-v-8ee9ae13]{font-size:105%}.sus-item__user-name.master[data-v-8ee9ae13]{color:rgb(var(--sus-primary-color))}.sus-item__user a[data-v-8ee9ae13]{background-color:transparent;text-decoration:none}.sus-item__content[data-v-8ee9ae13]{position:relative;padding:5px;min-width:52px}.sus-item__content-text[data-v-8ee9ae13]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden}.sus-item__content-name[data-v-8ee9ae13]{font-size:90%;padding:2px 5px;border-radius:3px;background-color:rgba(var(--sus-gray-bg))}.sus-item__content img[data-v-8ee9ae13]{display:inline-block;width:auto;max-width:400px;max-height:100px}.sus-show-detail[data-v-8ee9ae13]{color:rgba(var(--sus-primary-color),var(--sus-item-primary-opacity))}.sus-show-detail[data-v-8ee9ae13]:hover{color:rgb(var(--sus-primary-color))}.sus-item__content img{width:auto;max-width:400px;max-height:100px}.sus-comment__item[data-v-162930a9]{position:relative;margin:15px 0;line-height:1.5;background-color:rgba(var(--sus-item-bg),var(--sus-item-opacity));border-radius:0 9px 9px;transition:box-shadow .25s ease-in-out}.sus-comment__item[data-v-162930a9]:hover{box-shadow:3px 3px 15px rgba(var(--sus-item-bg),.1)}.sus-comment__item-child[data-v-162930a9]{padding:var(--sus-item-child-padding);margin-left:var(--sus-item-margin)}.sus-comment__item-child__item[data-v-162930a9]{background-color:rgba(var(--sus-item-bg),var(--sus-item-opacity));border-radius:0 9px 9px;transition:box-shadow .2s ease-in-out}.sus-comment__item-child__item[data-v-162930a9]:hover{box-shadow:3px 3px 15px rgba(var(--sus-item-bg),.1)}.sus-comment__item-footer[data-v-162930a9]{margin-top:15px;margin-bottom:10px}.sus-load-more[data-v-162930a9]{color:rgba(var(--sus-primary-color),var(--sus-item-primary-opacity))}.sus-load-more[data-v-162930a9]:hover{color:rgb(var(--sus-primary-color))}.sus-top-item[data-v-7407d86d]{width:inherit;max-height:80px}.sus-top-item[data-v-7407d86d]:hover{border-radius:5px;background-color:rgba(var(--sus-select-bg),.5);transition:all .25s}.sus-top-item__content[data-v-7407d86d]{display:-webkit-box;color:rgb(var(--sus-font-color));line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-y:hidden;flex:1}.sus-top-item__reply[data-v-7407d86d]{font-size:90%;width:-moz-fit-content;width:fit-content;margin-top:3px;border-radius:3px;background-color:rgba(var(--sus-item-bg),var(--sus-item-opacity));opacity:.8}.sus-top-item__info[data-v-7407d86d]{max-width:28%;overflow:hidden}.sus-top-item[data-v-1e2f9488]{max-height:80px}.sus-top-item[data-v-1e2f9488]:hover{border-radius:5px;background-color:rgba(var(--sus-item-hover-bg),.5);transition:all .25s}.sus-top-item__content[data-v-1e2f9488]{display:-webkit-box;margin:3px 1px 0;color:rgb(var(--sus-font-color));-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-y:hidden}.sus-top-item__user[data-v-1e2f9488]{font-size:90%}.sus-top-item__user-owner[data-v-1e2f9488]{padding:3px 6px;width:-moz-fit-content;width:fit-content;background-color:rgba(var(--sus-basic-input-bg),var(--sus-item-opacity));border-radius:7px}.sus-top-item__user-avatar[data-v-1e2f9488]{width:28px;height:28px}.sus-top-item__user-avatar .sus-avatar[data-v-1e2f9488]{border:thin solid;-o-object-fit:cover;object-fit:cover;-o-object-position:top;object-position:top;box-shadow:.1em .1em 0 -.05em;color:rgba(var(--sus-font-color),.1)}.sus-top-item .code-toolbar[data-v-1e2f9488]{display:none}
|