"use strict";(self["webpackChunkmiriamgemeinde"]=self["webpackChunkmiriamgemeinde"]||[]).push([[662],{2165:function(t,e,n){n.d(e,{A:function(){return w}});var o=n(641),r=n(33);const i=t=>((0,o.Qi)("data-v-59dc7db8"),t=t(),(0,o.jt)(),t),s={key:0,class:"dialog-overlay"},l={class:"dialog-content"},a=i((()=>(0,o.Lk)("h3",null,"Bild auswählen",-1))),c={class:"images-container"},p=["onClick"],d=["src"],h=["title"],u={key:1},f={class:"button-container"};function m(t,e,n,i,m,g){return(0,o.uX)(),(0,o.CE)("div",null,[i.isOpen?((0,o.uX)(),(0,o.CE)("div",s,[(0,o.Lk)("div",l,[a,(0,o.Lk)("div",c,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(i.images,(t=>((0,o.uX)(),(0,o.CE)("div",{key:t.id,class:(0,r.C4)(["image-block",{selected:t.id===i.selectedImage?.id}]),onClick:e=>i.selectImage(t)},[(0,o.Lk)("img",{src:"/images/uploads/"+t.filename},null,8,d),t.description?((0,o.uX)(),(0,o.CE)("span",{key:0,title:t.description},(0,r.v_)(t.title),9,h)):((0,o.uX)(),(0,o.CE)("span",u,(0,r.v_)(t.title),1))],10,p)))),128))]),(0,o.Lk)("div",f,[(0,o.Lk)("button",{onClick:e[0]||(e[0]=(...t)=>i.confirmAddImageConfiguration&&i.confirmAddImageConfiguration(...t))},"Bestätigen"),(0,o.Lk)("button",{onClick:e[1]||(e[1]=(...t)=>i.closeAddImageDialog&&i.closeAddImageDialog(...t))},"Schließen")])])])):(0,o.Q3)("",!0)])}var g=n(953),x=n(3173),M={name:"AddImageDialog",emits:["confirm"],setup(t,{emit:e}){const n=(0,g.KR)(!1),o=(0,g.KR)([]),r=(0,g.KR)(null),i=()=>{n.value=!0,a()},s=()=>{n.value=!1},l=()=>{r.value&&e("confirm",`${r.value.id}`),s()},a=async()=>{try{const t=await x.A.get("/image");o.value=t.data}catch(t){console.error("Fehler beim Laden der Bilder:",t),o.value=[]}},c=t=>{console.log(t),r.value=t};return{isOpen:n,images:o,selectedImage:r,openAddImageDialog:i,closeAddImageDialog:s,confirmAddImageConfiguration:l,selectImage:c}}},y=n(6262);const v=(0,y.A)(M,[["render",m],["__scopeId","data-v-59dc7db8"]]);var w=v},2577:function(t,e,n){var o=n(6518),r=n(2652),i=n(9306),s=n(8551),l=n(1767);o({target:"Iterator",proto:!0,real:!0},{find:function(t){s(this),i(t);var e=l(this),n=0;return r(e,(function(e,o){if(t(e,n++))return o(e)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},5662:function(t,e,n){n.r(e),n.d(e,{default:function(){return tk}});var o=n(641),r=n(33),i=n(3751);const s=t=>((0,o.Qi)("data-v-52a47670"),t=t(),(0,o.jt)(),t),l={class:"edit-pages"},a=s((()=>(0,o.Lk)("h2",null,"Webseiten bearbeiten",-1))),c=s((()=>(0,o.Lk)("label",{for:"page-select"},"Wähle eine Seite:",-1))),p=["value"],d={class:"toolbar"},h={class:"table-toolbar"},u={class:"additional-toolbar"},f={class:(0,r.C4)(["htmleditor"])};function m(t,e,n,s,m,g){const x=(0,o.g2)("BoldIcon"),M=(0,o.g2)("ItalicIcon"),y=(0,o.g2)("UnderlineIcon"),v=(0,o.g2)("StrikethroughIcon"),w=(0,o.g2)("TableIcon"),b=(0,o.g2)("ListIcon"),k=(0,o.g2)("NumberedListLeftIcon"),W=(0,o.g2)("StatsReportIcon"),Q=(0,o.g2)("OpenInWindowIcon"),C=(0,o.g2)("DownloadIcon"),S=(0,o.g2)("ArrowDownIcon"),O=(0,o.g2)("Table2ColumnsIcon"),T=(0,o.g2)("ArrowRightIcon"),A=(0,o.g2)("TableRowsIcon"),E=(0,o.g2)("AlignTopBoxIcon"),L=(0,o.g2)("AlignLeftBoxIcon"),N=(0,o.g2)("EditorContent"),D=(0,o.g2)("WorshipDialog"),R=(0,o.g2)("AddImageDialog"),I=(0,o.g2)("AddContactDialog"),P=(0,o.g2)("AddEventDialog"),H=(0,o.g2)("AddLinkDialog"),$=(0,o.g2)("AddDownloadDialog"),B=(0,o.g2)("AddInstitutionDialog");return(0,o.uX)(),(0,o.CE)("div",l,[a,(0,o.Lk)("div",null,[c,(0,o.bo)((0,o.Lk)("select",{id:"page-select","onUpdate:modelValue":e[0]||(e[0]=t=>s.selectedPage=t),onChange:e[1]||(e[1]=(...t)=>s.loadPageContent&&s.loadPageContent(...t))},[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(s.sortedPages,(t=>((0,o.uX)(),(0,o.CE)("option",{key:t.link,value:t.link},(0,r.v_)(t.name),9,p)))),128))],544),[[i.u1,s.selectedPage]])]),(0,o.Lk)("div",d,[(0,o.Lk)("button",{onClick:e[2]||(e[2]=t=>s.toggleHeading(3))},"H3"),(0,o.Lk)("button",{onClick:e[3]||(e[3]=t=>s.toggleHeading(4))},"H4"),(0,o.Lk)("button",{onClick:e[4]||(e[4]=t=>s.toggleHeading(5))},"H5"),(0,o.Lk)("button",{onClick:e[5]||(e[5]=t=>s.toggleHeading(6))},"H6"),(0,o.Lk)("button",{onClick:e[6]||(e[6]=t=>s.toggleBold()),width:"24",height:"24"},[(0,o.bF)(x,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[7]||(e[7]=t=>s.toggleItalic())},[(0,o.bF)(M,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[8]||(e[8]=t=>s.toggleUnderline())},[(0,o.bF)(y,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[9]||(e[9]=t=>s.toggleStrike())},[(0,o.bF)(v,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[10]||(e[10]=t=>s.insertTable())},[(0,o.bF)(w,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[11]||(e[11]=t=>s.toggleBulletList())},[(0,o.bF)(b,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[12]||(e[12]=t=>s.toggleOrderedList())},[(0,o.bF)(k,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[13]||(e[13]=(...t)=>s.openAddImageDialog&&s.openAddImageDialog(...t))},[(0,o.bF)(W,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[14]||(e[14]=(...t)=>s.openAddLinkDialog&&s.openAddLinkDialog(...t))},[(0,o.bF)(Q,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[15]||(e[15]=(...t)=>s.openAddDownloadDialog&&s.openAddDownloadDialog(...t))},[(0,o.bF)(C,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[16]||(e[16]=(...t)=>s.openColorPicker&&s.openColorPicker(...t))},"Schriftfarbe"),(0,o.Lk)("input",{type:"color",ref:"colorPicker",onInput:e[17]||(e[17]=(...t)=>s.setColor&&s.setColor(...t)),style:{display:"none"}},null,544)]),(0,o.Lk)("div",h,[(0,o.Lk)("button",{onClick:e[18]||(e[18]=e=>t.addColumnBefore())},[(0,o.bF)(S,{width:"10",height:"10",class:"align-top"}),(0,o.bF)(O,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[19]||(e[19]=e=>t.addColumnAfter())},[(0,o.bF)(O,{width:"24",height:"24"}),(0,o.bF)(S,{width:"10",height:"10",class:"align-top"})]),(0,o.Lk)("button",{onClick:e[20]||(e[20]=e=>t.addRowBefore())},[(0,o.bF)(T,{width:"10",height:"10",class:"align-top"}),(0,o.bF)(A,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[21]||(e[21]=e=>t.addRowAfter())},[(0,o.bF)(T,{width:"10",height:"10"}),(0,o.bF)(A,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[22]||(e[22]=e=>t.deleteColumn())},[(0,o.bF)(O,{width:"24",height:"24",class:"delete-icon"})]),(0,o.Lk)("button",{onClick:e[23]||(e[23]=e=>t.deleteRow())},[(0,o.bF)(A,{width:"24",height:"24",class:"delete-icon"})]),(0,o.Lk)("button",{onClick:e[24]||(e[24]=e=>t.toggleHeaderColumn())},[(0,o.bF)(E,{width:"24",height:"24"})]),(0,o.Lk)("button",{onClick:e[25]||(e[25]=e=>t.toggleHeaderRow())},[(0,o.bF)(L,{width:"24",height:"24"})])]),(0,o.Lk)("div",u,[(0,o.Lk)("button",{onClick:e[26]||(e[26]=(...t)=>s.openAddEventsDialog&&s.openAddEventsDialog(...t))},"Events"),(0,o.Lk)("button",{onClick:e[27]||(e[27]=(...t)=>s.openAddContactDialog&&s.openAddContactDialog(...t))},"Kontaktpersonen"),(0,o.Lk)("button",{onClick:e[28]||(e[28]=(...t)=>s.openAddInstitutionDialog&&s.openAddInstitutionDialog(...t))},"Institutionen"),(0,o.Lk)("button",{onClick:e[29]||(e[29]=(...t)=>s.openWorshipDialog&&s.openWorshipDialog(...t))},"Gottesdienste")]),(0,o.Lk)("div",f,[(0,o.bF)(N,{editor:s.editor},null,8,["editor"])]),(0,o.Lk)("button",{onClick:e[30]||(e[30]=(...t)=>s.savePageContent&&s.savePageContent(...t))},"Speichern"),(0,o.bF)(D,{ref:"worshipDialog",onConfirm:s.insertWorshipList},null,8,["onConfirm"]),(0,o.bF)(R,{ref:"addImageDialog",onConfirm:s.insertImage},null,8,["onConfirm"]),(0,o.bF)(I,{ref:"addContactDialog",onConfirm:s.insertContact},null,8,["onConfirm"]),(0,o.bF)(P,{ref:"addEventDialog",onConfirm:s.insertEvent},null,8,["onConfirm"]),(0,o.bF)(H,{ref:"addLinkDialog",onConfirm:s.insertLink},null,8,["onConfirm"]),(0,o.bF)($,{ref:"addDownloadDialog",onConfirm:s.insertDownload},null,8,["onConfirm"]),(0,o.bF)(B,{ref:"addInstitutionDialog",onConfirm:s.insertInstitution},null,8,["onConfirm"]),(0,o.Lk)("input",{type:"color",ref:"colorPicker",onInput:e[31]||(e[31]=(...t)=>s.setColor&&s.setColor(...t)),style:{display:"none"}},null,544)])}n(4114),n(8992),n(2577),n(3949);var g=n(953),x=n(6278),M=n(3173);function y(t){this.content=t}y.prototype={constructor:y,find:function(t){for(var e=0;e>1}},y.from=function(t){if(t instanceof y)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new y(e)};var v=y;function w(t,e,n){for(let o=0;;o++){if(o==t.childCount||o==e.childCount)return t.childCount==e.childCount?null:n;let r=t.child(o),i=e.child(o);if(r!=i){if(!r.sameMarkup(i))return n;if(r.isText&&r.text!=i.text){for(let t=0;r.text[t]==i.text[t];t++)n++;return n}if(r.content.size||i.content.size){let t=w(r.content,i.content,n+1);if(null!=t)return t}n+=r.nodeSize}else n+=r.nodeSize}}function b(t,e,n,o){for(let r=t.childCount,i=e.childCount;;){if(0==r||0==i)return r==i?null:{a:n,b:o};let s=t.child(--r),l=e.child(--i),a=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:n,b:o};if(s.isText&&s.text!=l.text){let t=0,e=Math.min(s.text.length,l.text.length);while(tt&&!1!==n(l,o+s,r||null,i)&&l.content.size){let r=s+1;l.nodesBetween(Math.max(0,t-r),Math.min(l.content.size,e-r),n,o+r)}s=a}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,o){let r="",i=!0;return this.nodesBetween(t,e,((s,l)=>{let a=s.isText?s.text.slice(Math.max(t,l)-l,e-l):s.isLeaf?o?"function"===typeof o?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&a||s.isTextblock)&&n&&(i?i=!1:r+=n),r+=a}),0),r}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,o=this.content.slice(),r=0;for(e.isText&&e.sameMarkup(n)&&(o[o.length-1]=e.withText(e.text+n.text),r=1);rt)for(let r=0,i=0;it&&((ie)&&(s=s.isText?s.cut(Math.max(0,t-i),Math.min(s.text.length,e-i)):s.cut(Math.max(0,t-i-1),Math.min(s.content.size,e-i-1))),n.push(s),o+=s.nodeSize),i=l}return new k(n,o)}cutByIndex(t,e){return t==e?k.empty:0==t&&e==this.content.length?this:new k(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let o=this.content.slice(),r=this.size+e.nodeSize-n.nodeSize;return o[t]=e,new k(o,r)}addToStart(t){return new k([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new k(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,o=0;;n++){let r=this.child(n),i=o+r.nodeSize;if(i>=t)return i==t||e>0?Q(n+1,i):Q(n,o);o=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return k.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return k.empty;let e,n=0;for(let o=0;othis.type.rank&&(e||(e=t.slice(0,o)),e.push(this),n=!0),e&&e.push(r)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;et.type.rank-e.type.rank)),e}}S.none=[];class O extends Error{}class T{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=E(this.content,t+this.openStart,e);return n&&new T(n,this.openStart,this.openEnd)}removeBetween(t,e){return new T(A(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return T.empty;let n=e.openStart||0,o=e.openEnd||0;if("number"!=typeof n||"number"!=typeof o)throw new RangeError("Invalid input for Slice.fromJSON");return new T(k.fromJSON(t,e.content),n,o)}static maxOpen(t,e=!0){let n=0,o=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let r=t.lastChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.lastChild)o++;return new T(t,n,o)}}function A(t,e,n){let{index:o,offset:r}=t.findIndex(e),i=t.maybeChild(o),{index:s,offset:l}=t.findIndex(n);if(r==e||i.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(o!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(o,i.copy(A(i.content,e-r-1,n-r-1)))}function E(t,e,n,o){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r);if(i==e||s.isText)return o&&!o.canReplace(r,r,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=E(s.content,e-i-1,n);return l&&t.replaceChild(r,s.copy(l))}function L(t,e,n){if(n.openStart>t.depth)throw new O("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new O("Inconsistent open depths");return N(t,e,n,0)}function N(t,e,n,o){let r=t.index(o),i=t.node(o);if(r==e.index(o)&&o=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function P(t,e,n,o){let r=(e||t).node(n),i=0,s=e?e.index(n):r.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(I(t.nodeAfter,o),i++));for(let l=i;lr&&R(t,e,r+1),s=o.depth>r&&R(n,o,r+1),l=[];return P(null,t,r,l),i&&s&&e.index(r)==n.index(r)?(D(i,s),I(H(i,$(t,e,n,o,r+1)),l)):(i&&I(H(i,B(t,e,r+1)),l),P(e,n,r,l),s&&I(H(s,B(n,o,r+1)),l)),P(o,null,r,l),new k(l)}function B(t,e,n){let o=[];if(P(null,t,n,o),t.depth>n){let r=R(t,e,n+1);I(H(r,B(t,e,n+1)),o)}return P(e,null,n,o),new k(o)}function z(t,e){let n=e.depth-t.openStart,o=e.node(n),r=o.copy(t.content);for(let i=n-1;i>=0;i--)r=e.node(i).copy(k.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}T.empty=new T(k.empty,0,0);class V{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return t=this.resolveDepth(t),0==t?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],o=t.child(e);return n?t.child(e).cut(n):o}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],o=0==e?0:this.path[3*e-1]+1;for(let r=0;r0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new _(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],o=0,r=e;for(let i=t;;){let{index:t,offset:e}=i.content.findIndex(r),s=r-e;if(n.push(i,t,o+e),!s)break;if(i=i.child(t),i.isText)break;r=s-1,o+=e+1}return new V(e,n,r)}static resolveCached(t,e){for(let o=0;ot&&this.nodesBetween(t,e,(t=>(n.isInSet(t.marks)&&(o=!0),!o))),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),X(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=k.empty,o=0,r=n.childCount){let i=this.contentMatchAt(t).matchFragment(n,o,r),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let l=o;lt.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let o=k.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,o,n)}}U.prototype.text=void 0;class J extends U{constructor(t,e,n,o){if(super(t,e,null,o),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):X(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new J(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new J(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function X(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class G{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new Y(t,e);if(null==n.next)return G.empty;let o=Z(n);n.next&&n.err("Unexpected trailing text");let r=ct(st(o));return pt(r,n),r}matchType(t){for(let e=0;et.createAndFill())));for(let t=0;t=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function e(n){t.push(n);for(let o=0;o{let o=n+(e.validEnd?"*":" ")+" ";for(let r=0;r"+t.indexOf(e.next[r].next);return o})).join("\n")}}G.empty=new G(!0);class Y{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function Z(t){let e=[];do{e.push(tt(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function tt(t){let e=[];do{e.push(et(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function et(t){let e=it(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=ot(t,e)}return e}function nt(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function ot(t,e){let n=nt(t),o=n;return t.eat(",")&&(o="}"!=t.next?nt(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:o,expr:e}}function rt(t,e){let n=t.nodeTypes,o=n[e];if(o)return[o];let r=[];for(let i in n){let t=n[i];t.groups.indexOf(e)>-1&&r.push(t)}return 0==r.length&&t.err("No node type or group '"+e+"' found"),r}function it(t){if(t.eat("(")){let e=Z(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=rt(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}function st(t){let e=[[]];return r(i(t,0),n()),e;function n(){return e.push([])-1}function o(t,n,o){let r={term:o,to:n};return e[t].push(r),r}function r(t,e){t.forEach((t=>t.to=e))}function i(t,e){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(i(n,e))),[]);if("seq"!=t.type){if("star"==t.type){let s=n();return o(e,s),r(i(t.expr,s),s),[o(s)]}if("plus"==t.type){let s=n();return r(i(t.expr,e),s),r(i(t.expr,s),s),[o(s)]}if("opt"==t.type)return[o(e)].concat(i(t.expr,e));if("range"==t.type){let s=e;for(let e=0;e{t[e].forEach((({term:e,to:n})=>{if(!e)return;let o;for(let t=0;t{o||r.push([e,o=[]]),-1==o.indexOf(t)&&o.push(t)}))}))}));let i=e[o.join(",")]=new G(o.indexOf(t.length-1)>-1);for(let t=0;t-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;en[t]=new ft(t,e,o)));let o=e.spec.topNode||"doc";if(!n[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let r in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class mt{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class gt{constructor(t,e,n,o){this.name=t,this.rank=e,this.schema=n,this.spec=o,this.attrs=ut(o.attrs),this.excluded=null;let r=dt(this.attrs);this.instance=r?new S(this,r):null}create(t=null){return!t&&this.instance?this.instance:new S(this,ht(this.attrs,t))}static compile(t,e){let n=Object.create(null),o=0;return t.forEach(((t,r)=>n[t]=new gt(t,o++,e,r))),n}removeFromSet(t){for(var e=0;e-1}}class xt{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let o in t)e[o]=t[o];e.nodes=v.from(t.nodes),e.marks=v.from(t.marks||{}),this.nodes=ft.compile(this.spec.nodes,this),this.marks=gt.compile(this.spec.marks,this);let n=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let t=this.nodes[o],e=t.spec.content||"",r=t.spec.marks;if(t.contentMatch=n[e]||(n[e]=G.parse(e,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==r?null:r?Mt(this,r.split(" ")):""!=r&&t.inlineContent?null:[]}for(let o in this.marks){let t=this.marks[o],e=t.spec.excludes;t.excluded=null==e?[t]:""==e?[]:Mt(this,e.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,o){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof ft))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,o)}text(t,e){let n=this.nodes.text;return new J(n,n.defaultAttrs,t,S.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return U.fromJSON(this,t)}markFromJSON(t){return S.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function Mt(t,e){let n=[];for(let o=0;o-1)&&n.push(s=o)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[o]+"'")}return n}function yt(t){return null!=t.tag}function vt(t){return null!=t.style}class wt{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((t=>{yt(t)?this.tags.push(t):vt(t)&&this.styles.push(t)})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}parse(t,e={}){let n=new At(this,e,!1);return n.addAll(t,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new At(this,e,!0);return n.addAll(t,e.from,e.to),T.maxOpen(n.finish())}matchTag(t,e,n){for(let o=n?this.tags.indexOf(n)+1:0;ot.length&&(61!=i.charCodeAt(t.length)||i.slice(t.length+1)!=e))){if(o.getAttrs){let t=o.getAttrs(e);if(!1===t)continue;o.attrs=t||void 0}return o}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,o=0;for(;o{n(t=Nt(t)),t.mark||t.ignore||t.clearMark||(t.mark=o)}))}for(let o in t.nodes){let e=t.nodes[o].spec.parseDOM;e&&e.forEach((t=>{n(t=Nt(t)),t.node||t.ignore||t.mark||(t.node=o)}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new wt(t,wt.schemaRules(t)))}}const bt={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},kt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Wt={ol:!0,ul:!0},Qt=1,Ct=2,St=4;function Ot(t,e,n){return null!=e?(e?Qt:0)|("full"===e?Ct:0):t&&"pre"==t.whitespace?Qt|Ct:n&~St}class Tt{constructor(t,e,n,o,r,i,s){this.type=t,this.attrs=e,this.marks=n,this.pendingMarks=o,this.solid=r,this.options=s,this.content=[],this.activeMarks=S.none,this.stashMarks=[],this.match=i||(s&St?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(k.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Qt)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=k.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,n=this.pendingMarks;ethis.addAll(t))),e&&this.sync(n),this.needsBlock=i}else this.withStyleRules(t,(()=>{this.addElementByRule(t,r,!1===r.consuming?n:void 0)}))}leafFallback(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))}ignoreFallback(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(t){let e=S.none,n=S.none;for(let o=0,r=t.length;o{i.clearMark(t)&&(n=t.addToSet(n))})):e=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(e),!1!==i.consuming)break;o=i}}return[e,n]}addElementByRule(t,e,n){let o,r,i;if(e.node)r=this.parser.schema.nodes[e.node],r.isLeaf?this.insertNode(r.create(e.attrs))||this.leafFallback(t):o=this.enter(r,e.attrs||null,e.preserveWhitespace);else{let t=this.parser.schema.marks[e.mark];i=t.create(e.attrs),this.addPendingMark(i)}let s=this.top;if(r&&r.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t)));else{let n=t;"string"==typeof e.contentElement?n=t.querySelector(e.contentElement):"function"==typeof e.contentElement?n=e.contentElement(t):e.contentElement&&(n=e.contentElement),this.findAround(t,n,!0),this.addAll(n)}o&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(t,e,n){let o=e||0;for(let r=e?t.childNodes[e]:t.firstChild,i=null==n?null:t.childNodes[n];r!=i;r=r.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(r);this.findAtPoint(t,o)}findPlace(t){let e,n;for(let o=this.open;o>=0;o--){let r=this.nodes[o],i=r.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=r,!i.length))break;if(r.solid)break}if(!e)return!1;this.sync(n);for(let o=0;othis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,o=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),r=-(n?n.depth+1:0)+(o?0:1),i=(t,s)=>{for(;t>=0;t--){let l=e[t];if(""==l){if(t==e.length-1||0==t)continue;for(;s>=r;s--)if(i(t-1,s))return!0;return!1}{let t=s>0||0==s&&o?this.nodes[s].type:n&&s>=r?n.node(s-r).type:null;if(!t||t.name!=l&&-1==t.groups.indexOf(l))return!1;s--}}return!0};return i(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(t){let e=Rt(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,e){for(let n=this.open;n>=0;n--){let o=this.nodes[n],r=o.pendingMarks.lastIndexOf(t);if(r>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let e=o.popFromStashMark(t);e&&o.type&&o.type.allowsMarkType(e.type)&&(o.activeMarks=e.addToSet(o.activeMarks))}if(o==e)break}}}function Et(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&Wt.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}function Lt(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Nt(t){let e={};for(let n in t)e[n]=t[n];return e}function Dt(t,e){let n=e.schema.nodes;for(let o in n){let r=n[o];if(!r.allowsMarkType(t))continue;let i=[],s=t=>{i.push(t);for(let n=0;n{if(r.length||t.marks.length){let n=0,i=0;while(n=0;o--){let r=this.serializeMark(t.marks[o],t.isInline,e);r&&((r.contentDOM||r.dom).appendChild(n),n=r.dom)}return n}serializeMark(t,e,n={}){let o=this.marks[t.type.name];return o&&It.renderSpec(Ht(n),o(t,e))}static renderSpec(t,e,n=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let o,r=e[0],i=r.indexOf(" ");i>0&&(n=r.slice(0,i),r=r.slice(i+1));let s=n?t.createElementNS(n,r):t.createElement(r),l=e[1],a=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)){a=2;for(let t in l)if(null!=l[t]){let e=t.indexOf(" ");e>0?s.setAttributeNS(t.slice(0,e),t.slice(e+1),l[t]):s.setAttribute(t,l[t])}}for(let c=a;ca)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:e,contentDOM:i}=It.renderSpec(t,r,n);if(s.appendChild(e),i){if(o)throw new RangeError("Multiple content holes");o=i}}}return{dom:s,contentDOM:o}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new It(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=Pt(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return Pt(t.marks)}}function Pt(t){let e={};for(let n in t){let o=t[n].spec.toDOM;o&&(e[n]=o)}return e}function Ht(t){return t.document||window.document}const $t=65535,Bt=Math.pow(2,16);function zt(t,e){return t+e*Bt}function Vt(t){return t&$t}function Ft(t){return(t-(t&$t))/Bt}const jt=1,Kt=2,_t=4,qt=8;class Ut{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(this.delInfo&qt)>0}get deletedBefore(){return(this.delInfo&(jt|_t))>0}get deletedAfter(){return(this.delInfo&(Kt|_t))>0}get deletedAcross(){return(this.delInfo&_t)>0}}class Jt{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&Jt.empty)return Jt.empty}recover(t){let e=0,n=Vt(t);if(!this.inverted)for(let o=0;ot)break;let a=this.ranges[s+r],c=this.ranges[s+i],p=l+a;if(t<=p){let r=a?t==l?-1:t==p?1:e:e,i=l+o+(r<0?0:c);if(n)return i;let d=t==(e<0?l:p)?null:zt(s/3,t-l),h=t==l?Kt:t==p?jt:_t;return(e<0?t!=l:t!=p)&&(h|=qt),new Ut(i,h,d)}o+=c-a}return n?t+o:new Ut(t+o,0,null)}touches(t,e){let n=0,o=Vt(e),r=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;st)break;let l=this.ranges[s+r],a=e+l;if(t<=a&&s==3*o)return!0;n+=this.ranges[s+i]-l}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let o=0,r=0;o=0;e--){let o=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=o&&o>e?n-o-1:void 0)}}invert(){let t=new Xt;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;nr&&et.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),o),e.openStart,e.openEnd);return Zt.fromReplace(t,this.from,this.to,r)}invert(){return new ne(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new ee(e.pos,n.pos,this.mark)}merge(t){return t instanceof ee&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ee(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ee(e.from,e.to,t.markFromJSON(e.mark))}}Yt.jsonID("addMark",ee);class ne extends Yt{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new T(te(e.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),t),e.openStart,e.openEnd);return Zt.fromReplace(t,this.from,this.to,n)}invert(){return new ee(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new ne(e.pos,n.pos,this.mark)}merge(t){return t instanceof ne&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ne(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ne(e.from,e.to,t.markFromJSON(e.mark))}}Yt.jsonID("removeMark",ne);class oe extends Yt{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return Zt.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return Zt.fromReplace(t,this.pos,this.pos+1,new T(k.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;nn.pos?null:new se(e.pos,n.pos,o,r,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new se(e.from,e.to,e.gapFrom,e.gapTo,T.fromJSON(t,e.slice),e.insert,!!e.structure)}}function le(t,e,n){let o=t.resolve(e),r=n-e,i=o.depth;while(r>0&&i>0&&o.indexAfter(i)==o.node(i).childCount)i--,r--;if(r>0){let t=o.node(i).maybeChild(o.indexAfter(i));while(r>0){if(!t||t.isLeaf)return!0;t=t.firstChild,r--}}return!1}function ae(t,e,n,o){let r,i,s=[],l=[];t.doc.nodesBetween(e,n,((t,a,c)=>{if(!t.isInline)return;let p=t.marks;if(!o.isInSet(p)&&c.type.allowsMarkType(o.type)){let c=Math.max(a,e),d=Math.min(a+t.nodeSize,n),h=o.addToSet(p);for(let t=0;tt.step(e))),l.forEach((e=>t.step(e)))}function ce(t,e,n,o){let r=[],i=0;t.doc.nodesBetween(e,n,((t,s)=>{if(!t.isInline)return;i++;let l=null;if(o instanceof gt){let e,n=t.marks;while(e=o.isInSet(n))(l||(l=[])).push(e),n=e.removeFromSet(n)}else o?o.isInSet(t.marks)&&(l=[o]):l=t.marks;if(l&&l.length){let o=Math.min(s+t.nodeSize,n);for(let t=0;tt.step(new ne(e.from,e.to,e.style))))}function pe(t,e,n,o=n.contentMatch,r=!0){let i=t.doc.nodeAt(e),s=[],l=e+1;for(let a=0;a=0;a--)t.step(s[a])}function de(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function he(t){let e=t.parent,n=e.content.cutByIndex(t.startIndex,t.endIndex);for(let o=t.depth;;--o){let e=t.$from.node(o),r=t.$from.index(o),i=t.$to.indexAfter(o);if(on;f--)m||o.index(f)>0?(m=!0,p=k.from(o.node(f).copy(p)),d++):a--;let h=k.empty,u=0;for(let f=i,m=!1;f>n;f--)m||r.after(f+1)=0;s--){if(o.size){let t=n[s].type.contentMatch.matchFragment(o);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=k.from(n[s].type.create(n[s].attrs,o))}let r=e.start,i=e.end;t.step(new se(r,i,r,i,new T(o,0,0),n.length,!0))}function ye(t,e,n,o,r){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,((e,n)=>{if(e.isTextblock&&!e.hasMarkup(o,r)&&be(t.doc,t.mapping.slice(i).map(n),o)){let s=null;if(o.schema.linebreakReplacement){let t="pre"==o.whitespace,e=!!o.contentMatch.matchType(o.schema.linebreakReplacement);t&&!e?s=!1:!t&&e&&(s=!0)}!1===s&&we(t,e,n,i),pe(t,t.mapping.slice(i).map(n,1),o,void 0,null===s);let l=t.mapping.slice(i),a=l.map(n,1),c=l.map(n+e.nodeSize,1);return t.step(new se(a,c,a+1,c-1,new T(k.from(o.create(r,null,e.marks)),0,0),1,!0)),!0===s&&ve(t,e,n,i),!1}}))}function ve(t,e,n,o){e.forEach(((r,i)=>{if(r.isText){let s,l=/\r?\n|\r/g;while(s=l.exec(r.text)){let r=t.mapping.slice(o).map(n+1+i+s.index);t.replaceWith(r,r+1,e.type.schema.linebreakReplacement.create())}}}))}function we(t,e,n,o){e.forEach(((r,i)=>{if(r.type==r.type.schema.linebreakReplacement){let r=t.mapping.slice(o).map(n+1+i);t.replaceWith(r,r+1,e.type.schema.text("\n"))}}))}function be(t,e,n){let o=t.resolve(e),r=o.index();return o.parent.canReplaceWith(r,r+1,n)}function ke(t,e,n,o,r){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(o,null,r||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new se(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new T(k.from(s),0,0),1,!0))}function We(t,e,n=1,o){let r=t.resolve(e),i=r.depth-n,s=o&&o[o.length-1]||r.parent;if(i<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!s.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let c=r.depth-1,p=n-2;c>i;c--,p--){let t=r.node(c),e=r.index(c);if(t.type.spec.isolating)return!1;let n=t.content.cutByIndex(e,t.childCount),i=o&&o[p+1];i&&(n=n.replaceChild(0,i.type.create(i.attrs)));let s=o&&o[p]||t;if(!t.canReplace(e+1,t.childCount)||!s.type.validContent(n))return!1}let l=r.indexAfter(i),a=o&&o[0];return r.node(i).canReplaceWith(l,l,a?a.type:r.node(i+1).type)}function Qe(t,e,n=1,o){let r=t.doc.resolve(e),i=k.empty,s=k.empty;for(let l=r.depth,a=r.depth-n,c=n-1;l>a;l--,c--){i=k.from(r.node(l).copy(i));let t=o&&o[c];s=k.from(t?t.type.create(t.attrs,s):r.node(l).copy(s))}t.step(new ie(e,e,new T(i.append(s),n,n),!0))}function Ce(t,e){let n=t.resolve(e),o=n.index();return Se(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(o,o+1)}function Se(t,e){return!(!t||!e||t.isLeaf||!t.canAppend(e))}function Oe(t,e,n=-1){let o=t.resolve(e);for(let r=o.depth;;r--){let t,i,s=o.index(r);if(r==o.depth?(t=o.nodeBefore,i=o.nodeAfter):n>0?(t=o.node(r+1),s++,i=o.node(r).maybeChild(s)):(t=o.node(r).maybeChild(s-1),i=o.node(r+1)),t&&!t.isTextblock&&Se(t,i)&&o.node(r).canReplace(s,s+1))return e;if(0==r)break;e=n<0?o.before(r):o.after(r)}}function Te(t,e,n){let o=new ie(e-n,e+n,T.empty,!0);t.step(o)}function Ae(t,e,n){let o=t.resolve(e);if(o.parent.canReplaceWith(o.index(),o.index(),n))return e;if(0==o.parentOffset)for(let r=o.depth-1;r>=0;r--){let t=o.index(r);if(o.node(r).canReplaceWith(t,t,n))return o.before(r+1);if(t>0)return null}if(o.parentOffset==o.parent.content.size)for(let r=o.depth-1;r>=0;r--){let t=o.indexAfter(r);if(o.node(r).canReplaceWith(t,t,n))return o.after(r+1);if(t=0;t--){let e=t==o.depth?0:o.pos<=(o.start(t+1)+o.end(t+1))/2?-1:1,n=o.index(t)+(e>0?1:0),s=o.node(t),l=!1;if(1==i)l=s.canReplace(n,n,r);else{let t=s.contentMatchAt(n).findWrapping(r.firstChild.type);l=t&&s.canReplaceWith(n,n,t[0])}if(l)return 0==e?o.pos:e<0?o.before(t+1):o.after(t+1)}return null}function Le(t,e,n=e,o=T.empty){if(e==n&&!o.size)return null;let r=t.resolve(e),i=t.resolve(n);return Ne(r,i,o)?new ie(e,n,o):new De(r,i,o).fit()}function Ne(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}Yt.jsonID("replaceAround",se);class De{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=k.empty;for(let o=0;o<=t.depth;o++){let e=t.node(o);this.frontier.push({type:e.type,match:e.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=k.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){while(this.unplaced.size){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(t<0?this.$to:n.doc.resolve(t));if(!o)return null;let r=this.placed,i=n.depth,s=o.depth;while(i&&s&&1==r.childCount)r=r.firstChild.content,i--,s--;let l=new T(r,i,s);return t>-1?new se(n.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||n.pos!=this.$to.pos?new ie(n.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,o=this.unplaced.openEnd;n1&&(o=0),r.type.spec.isolating&&o<=n){t=n;break}e=r.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t,o=null;n?(o=Pe(this.unplaced.content,n-1).firstChild,t=o.content):t=this.unplaced.content;let r=t.firstChild;for(let i=this.depth;i>=0;i--){let t,{type:s,match:l}=this.frontier[i],a=null;if(1==e&&(r?l.matchType(r.type)||(a=l.fillBefore(k.from(r),!1)):o&&s.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:i,parent:o,inject:a};if(2==e&&r&&(t=l.findWrapping(r.type)))return{sliceDepth:n,frontierDepth:i,parent:o,wrap:t};if(o&&l.matchType(o.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,o=Pe(t,e);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new T(t,e+1,Math.max(n,o.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,o=Pe(t,e);if(o.childCount<=1&&e>0){let r=t.size-e<=e+o.size;this.unplaced=new T(Re(t,e-1,1),e-1,r?e-1:n)}else this.unplaced=new T(Re(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:o,wrap:r}){while(this.depth>e)this.closeFrontierNode();if(r)for(let f=0;f1||0==l||t.content.size)&&(p=e,c.push(He(t.mark(d.allowedMarks(t.marks)),1==a?l:0,a==s.childCount?h:-1)))}let u=a==s.childCount;u||(h=-1),this.placed=Ie(this.placed,e,k.from(c)),this.frontier[e].match=p,u&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let f=0,m=s;f1&&o==this.$to.end(--n))++o;return o}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:o}=this.frontier[e],r=e=0;n--){let{match:e,type:o}=this.frontier[n],r=$e(t,n,o,e,!0);if(!r||r.childCount)continue t}return{depth:e,fit:i,move:r?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;while(this.depth>e.depth)this.closeFrontierNode();e.fit.childCount&&(this.placed=Ie(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),o=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,o)}return t}openFrontierNode(t,e=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Ie(this.placed,this.depth,k.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop(),e=t.match.fillBefore(k.empty,!0);e.childCount&&(this.placed=Ie(this.placed,this.frontier.length,e))}}function Re(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Re(t.firstChild.content,e-1,n)))}function Ie(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Ie(t.lastChild.content,e-1,n)))}function Pe(t,e){for(let n=0;n1&&(o=o.replaceChild(0,He(o.firstChild,e-1,1==o.childCount?n-1:0))),e>0&&(o=t.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(k.empty,!0)))),t.copy(o)}function $e(t,e,n,o,r){let i=t.node(e),s=r?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=o.fillBefore(i.content,!0,s);return l&&!Be(n,i.content,s)?l:null}function Be(t,e,n){for(let o=n;o0;h--,u--){let t=r.node(h).type.spec;if(t.defining||t.definingAsContext||t.isolating)break;s.indexOf(h)>-1?l=h:r.before(h)==u&&s.splice(1,0,-h)}let a=s.indexOf(l),c=[],p=o.openStart;for(let h=o.content,u=0;;u++){let t=h.firstChild;if(c.push(t),u==o.openStart)break;h=t.content}for(let h=p-1;h>=0;h--){let t=c[h],e=ze(t.type);if(e&&!t.sameMarkup(r.node(Math.abs(l)-1)))p=h;else if(e||!t.type.isTextblock)break}for(let h=o.openStart;h>=0;h--){let e=(h+p+1)%(o.openStart+1),l=c[e];if(l)for(let c=0;c=0;h--){if(t.replace(e,n,o),t.steps.length>d)break;let l=s[h];l<0||(e=r.before(l),n=i.after(l))}}function Fe(t,e,n,o,r){if(eo){let e=r.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(k.empty,!0))}return t}function je(t,e,n,o){if(!o.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let r=Ae(t.doc,e,o.type);null!=r&&(e=n=r)}t.replaceRange(e,n,new T(k.from(o),0,0))}function Ke(t,e,n){let o=t.doc.resolve(e),r=t.doc.resolve(n),i=_e(o,r);for(let s=0;s0&&(n||o.node(e-1).canReplace(o.index(e-1),r.indexAfter(e-1))))return t.delete(o.before(e),r.after(e))}for(let s=1;s<=o.depth&&s<=r.depth;s++)if(e-o.start(s)==o.depth-s&&n>o.end(s)&&r.end(s)-n!=r.depth-s)return t.delete(o.before(s),n);t.delete(e,n)}function _e(t,e){let n=[],o=Math.min(t.depth,e.depth);for(let r=o;r>=0;r--){let o=t.start(r);if(oe.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&n.push(r)}return n}class qe extends Yt{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return Zt.fail("No node at attribute step's position");let n=Object.create(null);for(let r in e.attrs)n[r]=e.attrs[r];n[this.attr]=this.value;let o=e.type.create(n,null,e.marks);return Zt.fromReplace(t,this.pos,this.pos+1,new T(k.from(o),0,e.isLeaf?0:1))}getMap(){return Jt.empty}invert(t){return new qe(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new qe(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new qe(e.pos,e.attr,e.value)}}Yt.jsonID("attr",qe);class Ue extends Yt{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let o in t.attrs)e[o]=t.attrs[o];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return Zt.ok(n)}getMap(){return Jt.empty}invert(t){return new Ue(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ue(e.attr,e.value)}}Yt.jsonID("docAttr",Ue);let Je=class extends Error{};Je=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},Je.prototype=Object.create(Error.prototype),Je.prototype.constructor=Je,Je.prototype.name="TransformError";class Xe{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Xt}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Je(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=T.empty){let o=Le(this.doc,t,e,n);return o&&this.step(o),this}replaceWith(t,e,n){return this.replace(t,e,new T(k.from(n),0,0))}delete(t,e){return this.replace(t,e,T.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return Ve(this,t,e,n),this}replaceRangeWith(t,e,n){return je(this,t,e,n),this}deleteRange(t,e){return Ke(this,t,e),this}lift(t,e){return ue(this,t,e),this}join(t,e=1){return Te(this,t,e),this}wrap(t,e){return Me(this,t,e),this}setBlockType(t,e=t,n,o=null){return ye(this,t,e,n,o),this}setNodeMarkup(t,e,n=null,o){return ke(this,t,e,n,o),this}setNodeAttribute(t,e,n){return this.step(new qe(t,e,n)),this}setDocAttribute(t,e){return this.step(new Ue(t,e)),this}addNodeMark(t,e){return this.step(new oe(t,e)),this}removeNodeMark(t,e){if(!(e instanceof S)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(e=e.isInSet(n.marks),!e)return this}return this.step(new re(t,e)),this}split(t,e=1,n){return Qe(this,t,e,n),this}addMark(t,e,n){return ae(this,t,e,n),this}removeMark(t,e,n){return ce(this,t,e,n),this}clearIncompatible(t,e,n){return pe(this,t,e,n),this}}const Ge=Object.create(null);class Ye{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new Ze(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e=0;r--){let o=e<0?cn(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):cn(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(o)return o}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new ln(t.node(0))}static atStart(t){return cn(t,t,0,0,1)||new ln(t)}static atEnd(t){return cn(t,t,t.content.size,t.childCount,-1)||new ln(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Ge[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in Ge)throw new RangeError("Duplicate use of selection JSON ID "+t);return Ge[t]=e,e.prototype.jsonID=t,e}getBookmark(){return nn.between(this.$anchor,this.$head).getBookmark()}}Ye.prototype.visible=!0;class Ze{constructor(t,e){this.$from=t,this.$to=e}}let tn=!1;function en(t){tn||t.parent.inlineContent||(tn=!0,console["warn"]("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class nn extends Ye{constructor(t,e=t){en(t),en(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return Ye.near(n);let o=t.resolve(e.map(this.anchor));return new nn(o.parent.inlineContent?o:n,n)}replace(t,e=T.empty){if(super.replace(t,e),e==T.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof nn&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new on(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new nn(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let o=t.resolve(e);return new this(o,n==e?o:t.resolve(n))}static between(t,e,n){let o=t.pos-e.pos;if(n&&!o||(n=o>=0?1:-1),!e.parent.inlineContent){let t=Ye.findFrom(e,n,!0)||Ye.findFrom(e,-n,!0);if(!t)return Ye.near(e,n);e=t.$head}return t.parent.inlineContent||(0==o?t=e:(t=(Ye.findFrom(t,-n,!0)||Ye.findFrom(t,n,!0)).$anchor,t.pos0?0:1);r>0?s=0;s+=r){let o=e.child(s);if(o.isAtom){if(!i&&rn.isSelectable(o))return rn.create(t,n-(r<0?o.nodeSize:0))}else{let e=cn(t,o,n+r,r<0?o.childCount:0,r,i);if(e)return e}n+=o.nodeSize*r}return null}function pn(t,e,n){let o=t.steps.length-1;if(o{null==i&&(i=o)})),t.setSelection(Ye.near(t.doc.resolve(i),n))}const dn=1,hn=2,un=4;class fn extends Xe{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=hn,this}ensureMarks(t){return S.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&hn)>0}addStep(t,e){super.addStep(t,e),this.updated=this.updated&~hn,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||S.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let o=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let r=this.storedMarks;if(!r){let t=this.doc.resolve(e);r=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,o.text(t,r)),this.selection.empty||this.setSelection(Ye.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=un,this}get scrolledIntoView(){return(this.updated&un)>0}}function mn(t,e){return e&&t?t.bind(e):t}class gn{constructor(t,e,n){this.name=t,this.init=mn(e.init,n),this.apply=mn(e.apply,n)}}const xn=[new gn("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new gn("selection",{init(t,e){return t.selection||Ye.atStart(e.doc)},apply(t){return t.selection}}),new gn("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,o){return o.selection.$cursor?t.storedMarks:null}}),new gn("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Mn{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=xn.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new gn(t.key,t.spec.state,t))}))}}class yn{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;nt.toJSON()))),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[n],r=o.spec.state;r&&r.toJSON&&(e[n]=r.toJSON.call(o,this[o.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new Mn(t.schema,t.plugins),r=new yn(o);return o.fields.forEach((o=>{if("doc"==o.name)r.doc=U.fromJSON(t.schema,e.doc);else if("selection"==o.name)r.selection=Ye.fromJSON(r.doc,e.selection);else if("storedMarks"==o.name)e.storedMarks&&(r.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let i in n){let s=n[i],l=s.spec.state;if(s.key==o.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,i))return void(r[o.name]=l.fromJSON.call(s,t,e[i],r))}r[o.name]=o.init(t,r)}})),r}}function vn(t,e,n){for(let o in t){let r=t[o];r instanceof Function?r=r.bind(e):"handleDOMEvents"==o&&(r=vn(r,e,{})),n[o]=r}return n}class wn{constructor(t){this.spec=t,this.props={},t.props&&vn(t.props,this,this.props),this.key=t.key?t.key.key:kn("plugin")}getState(t){return t[this.key]}}const bn=Object.create(null);function kn(t){return t in bn?t+"$"+ ++bn[t]:(bn[t]=0,t+"$")}class Wn{constructor(t="key"){this.key=kn(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Qn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Cn=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let Sn=null;const On=function(t,e,n){let o=Sn||(Sn=document.createRange());return o.setEnd(t,null==n?t.nodeValue.length:n),o.setStart(t,e||0),o},Tn=function(){Sn=null},An=function(t,e,n,o){return n&&(Ln(t,e,n,o,-1)||Ln(t,e,n,o,1))},En=/^(img|br|input|textarea|hr)$/i;function Ln(t,e,n,o,r){for(;;){if(t==n&&e==o)return!0;if(e==(r<0?0:Nn(t))){let n=t.parentNode;if(!n||1!=n.nodeType||Pn(t)||En.test(t.nodeName)||"false"==t.contentEditable)return!1;e=Qn(t)+(r<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if(t=t.childNodes[e+(r<0?-1:0)],"false"==t.contentEditable)return!1;e=r<0?Nn(t):0}}}function Nn(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Dn(t,e){for(;;){if(3==t.nodeType&&e)return t;if(1==t.nodeType&&e>0){if("false"==t.contentEditable)return null;t=t.childNodes[e-1],e=Nn(t)}else{if(!t.parentNode||Pn(t))return null;e=Qn(t),t=t.parentNode}}}function Rn(t,e){for(;;){if(3==t.nodeType&&e2),no=eo||!!Vn&&/Mac/.test(Vn.platform),oo=!!Vn&&/Win/.test(Vn.platform),ro=/Android \d/.test(jn),io=!!Fn&&"webkitFontSmoothing"in Fn.documentElement.style,so=io?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function lo(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function ao(t,e){return"number"==typeof t?t:t[e]}function co(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,o=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*o}}function po(t,e,n){let o=t.someProp("scrollThreshold")||0,r=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;;s=Cn(s)){if(!s)break;if(1!=s.nodeType)continue;let t=s,n=t==i.body,l=n?lo(i):co(t),a=0,c=0;if(e.topl.bottom-ao(o,"bottom")&&(c=e.bottom-e.top>l.bottom-l.top?e.top+ao(r,"top")-l.top:e.bottom-l.bottom+ao(r,"bottom")),e.leftl.right-ao(o,"right")&&(a=e.right-l.right+ao(r,"right")),a||c)if(n)i.defaultView.scrollBy(a,c);else{let n=t.scrollLeft,o=t.scrollTop;c&&(t.scrollTop+=c),a&&(t.scrollLeft+=a);let r=t.scrollLeft-n,i=t.scrollTop-o;e={left:e.left-r,top:e.top-i,right:e.right-r,bottom:e.bottom-i}}if(n||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function ho(t){let e,n,o=t.dom.getBoundingClientRect(),r=Math.max(0,o.top);for(let i=(o.left+o.right)/2,s=r+1;s=r-20){e=o,n=l.top;break}}return{refDOM:e,refTop:n,stack:uo(t.dom)}}function uo(t){let e=[],n=t.ownerDocument;for(let o=t;o;o=Cn(o))if(e.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),t==n)break;return e}function fo({refDOM:t,refTop:e,stack:n}){let o=t?t.getBoundingClientRect().top:0;mo(n,0==o?0:o-e)}function mo(t,e){for(let n=0;n=c){a=Math.max(u.bottom,a),c=Math.min(u.top,c);let t=u.left>e.left?u.left-e.left:u.right=(u.left+u.right)/2?1:0));continue}}else u.top>e.top&&!r&&u.left<=e.left&&u.right>=e.left&&(r=p,i={left:Math.max(u.left,Math.min(u.right,e.left)),top:u.top});!n&&(e.left>=u.right&&e.top>=u.top||e.left>=u.left&&e.top>=u.bottom)&&(l=d+1)}}return!n&&r&&(n=r,o=i,s=0),n&&3==n.nodeType?yo(n,o):!n||s&&1==n.nodeType?{node:t,offset:l}:Mo(n,o)}function yo(t,e){let n=t.nodeValue.length,o=document.createRange();for(let r=0;r=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}function vo(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function wo(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(o,r,i)}function ko(t,e,n,o){let r=-1;for(let i=e,s=!1;;){if(i==t.dom)break;let e=t.docView.nearestDesc(i,!0);if(!e)return null;if(1==e.dom.nodeType&&(e.node.isBlock&&e.parent||!e.contentDOM)){let t=e.dom.getBoundingClientRect();if(e.node.isBlock&&e.parent&&(!s&&t.left>o.left||t.top>o.top?r=e.posBefore:(!s&&t.right-1?r:t.docView.posFromDOM(e,n,-1)}function Wo(t,e,n){let o=t.childNodes.length;if(o&&n.tope.top&&r++}let o;io&&r&&1==n.nodeType&&1==(o=n.childNodes[r-1]).nodeType&&"false"==o.contentEditable&&o.getBoundingClientRect().top>=e.top&&r--,n==t.dom&&r==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:0!=r&&1==n.nodeType&&"BR"==n.childNodes[r-1].nodeName||(s=ko(t,n,r,e))}null==s&&(s=bo(t,l,e));let a=t.docView.nearestDesc(l,!0);return{pos:s,inside:a?a.posAtStart-a.border:-1}}function Co(t){return t.top=0&&r==o.nodeValue.length?(t--,i=1):n<0?t--:e++,Ao(So(On(o,t,e),i),i<0)}{let t=So(On(o,r,r),n);if(Xn&&r&&/\s/.test(o.nodeValue[r-1])&&r=0)}if(null==i&&r&&(n<0||r==Nn(o))){let t=o.childNodes[r-1],e=3==t.nodeType?On(t,Nn(t)-(s?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return Ao(So(e,1),!1)}if(null==i&&r=0)}function Ao(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Eo(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Lo(t,e,n){let o=t.state,r=t.root.activeElement;o!=e&&t.updateState(e),r!=t.dom&&t.focus();try{return n()}finally{o!=e&&t.updateState(o),r!=t.dom&&r&&r.focus()}}function No(t,e,n){let o=e.selection,r="up"==n?o.$from:o.$to;return Lo(t,e,(()=>{let{node:e}=t.docView.domFromPos(r.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.contentDOM||n.dom;break}e=n.dom.parentNode}let o=To(t,r.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=On(t,0,t.nodeValue.length).getClientRects()}for(let t=0;tr.top+1&&("up"==n?o.top-r.top>2*(r.bottom-o.top):r.bottom-o.bottom>2*(o.bottom-r.top)))return!1}}return!0}))}const Do=/[\u0590-\u08ac]/;function Ro(t,e,n){let{$head:o}=e.selection;if(!o.parent.isTextblock)return!1;let r=o.parentOffset,i=!r,s=r==o.parent.content.size,l=t.domSelection();return Do.test(o.parent.textContent)&&l.modify?Lo(t,e,(()=>{let{focusNode:e,focusOffset:r,anchorNode:i,anchorOffset:s}=t.domSelectionRange(),a=l.caretBidiLevel;l.modify("move",n,"character");let c=o.depth?t.docView.domAfterPos(o.before()):t.dom,{focusNode:p,focusOffset:d}=t.domSelectionRange(),h=p&&!c.contains(1==p.nodeType?p:p.parentNode)||e==p&&r==d;try{l.collapse(i,s),e&&(e!=i||r!=s)&&l.extend&&l.extend(e,r)}catch(u){}return null!=a&&(l.caretBidiLevel=a),h})):"left"==n||"backward"==n?i:s}let Io=null,Po=null,Ho=!1;function $o(t,e,n){return Io==e&&Po==n?Ho:(Io=e,Po=n,Ho="up"==n||"down"==n?No(t,e,n):Ro(t,e,n))}const Bo=0,zo=1,Vo=2,Fo=3;class jo{constructor(t,e,n,o){this.parent=t,this.children=e,this.dom=n,this.contentDOM=o,this.dirty=Bo,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;eQn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){o=!1;break}if(e.previousSibling)break}if(null==o&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){o=!0;break}if(e.nextSibling)break}}return(null==o?n>0:o)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,o=t;o;o=o.parentNode){let r,i=this.getDesc(o);if(i&&(!e||i.node)){if(!n||!(r=i.nodeDOM)||(1==r.nodeType?r.contains(1==t.nodeType?t:t.parentNode):r==t))return i;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let n=e;n;n=n.parent)if(n==this)return e}posFromDOM(t,e,n){for(let o=t;o;o=o.parentNode){let r=this.getDesc(o);if(r)return r.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;et||e instanceof Go){o=t-r;break}r=i}if(o)return this.children[n].domFromPos(o-this.children[n].border,e);for(let r;n&&!(r=this.children[n-1]).size&&r instanceof Ko&&r.side>=0;n--);if(e<=0){let t,o=!0;for(;;n--,o=!1)if(t=n?this.children[n-1]:null,!t||t.dom.parentNode==this.contentDOM)break;return t&&e&&o&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?Qn(t.dom)+1:0}}{let t,o=!0;for(;;n++,o=!1)if(t=n=r&&e<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,r);t=i;for(let e=s;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){o=Qn(n.dom)+1;break}t-=n.size}-1==o&&(o=0)}if(o>-1&&(l>e||s==this.children.length-1)){e=l;for(let t=s+1;tu&&ie){let t=s;s=l,l=t}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(s.node,s.offset),a.removeAllRanges(),a.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,o=0;o=n:tn){let o=n+r.border,s=i-r.border;if(t>=o&&e<=s)return this.dirty=t==n||e==i?Vo:zo,void(t!=o||e!=s||!r.contentLost&&r.dom.parentNode==this.contentDOM?r.markDirty(t-o,e-o):r.dirty=Fo);r.dirty=r.dom!=r.contentDOM||r.dom.parentNode!=this.contentDOM||r.children.length?Fo:Vo}n=i}this.dirty=Vo}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?Vo:zo;e.dirtyr?r.parent?r.parent.posBeforeChild(r):void 0:o))),!e.type.spec.raw){if(1!=i.nodeType){let t=document.createElement("span");t.appendChild(i),i=t}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=e,this.widget=e,r=this}matchesWidget(t){return this.dirty==Bo&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class _o extends jo{constructor(t,e,n,o){super(t,[],e,null),this.textDOM=n,this.text=o}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class qo extends jo{constructor(t,e,n,o){super(t,[],n,o),this.mark=e}static create(t,e,n,o){let r=o.nodeViews[e.type.name],i=r&&r(e,o,n);return i&&i.dom||(i=It.renderSpec(document,e.type.spec.toDOM(e,n))),new qo(t,e,i.dom,i.contentDOM||i.dom)}parseRule(){return this.dirty&Fo||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Fo&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),this.dirty!=Bo){let t=this.parent;while(!t.node)t=t.parent;t.dirty0&&(r=fr(r,0,t,n));for(let s=0;ss?s.parent?s.parent.posBeforeChild(s):void 0:i),n,o),c=a&&a.dom,p=a&&a.contentDOM;if(e.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(e.text);else c||({dom:c,contentDOM:p}=It.renderSpec(document,e.type.spec.toDOM(e)));p||e.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),e.type.spec.draggable&&(c.draggable=!0));let d=c;return c=ir(c,n,e),a?s=new Yo(t,e,n,o,c,p||null,d,a,r,i+1):e.isText?new Xo(t,e,n,o,c,d,r):new Uo(t,e,n,o,c,p||null,d,r,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>k.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return this.dirty==Bo&&t.eq(this.node)&&sr(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,o=e,r=t.composing?this.localCompositionInfo(t,e):null,i=r&&r.pos>-1?r:null,s=r&&r.pos<0,l=new ar(this,i&&i.node,t);dr(this.node,this.innerDeco,((e,r,i)=>{e.spec.marks?l.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!i&&l.syncToMarks(r==this.node.childCount?S.none:this.node.child(r).marks,n,t),l.placeWidget(e,t,o)}),((e,i,a,c)=>{let p;l.syncToMarks(e.marks,n,t),l.findNodeMatch(e,i,a,c)||s&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(e,i,a,p,t)||l.updateNextNode(e,i,a,t,c,o)||l.addNode(e,i,a,t,o),o+=e.nodeSize})),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Vo)&&(i&&this.protectLocalComposition(t,i),Zo(this.contentDOM,this.children,t),eo&&hr(this.dom))}localCompositionInfo(t,e){let{from:n,to:o}=t.state.selection;if(!(t.state.selection instanceof nn)||ne+this.node.content.size)return null;let r=t.input.compositionNode;if(!r||!this.dom.contains(r.parentNode))return null;if(this.node.inlineContent){let t=r.nodeValue,i=ur(this.node.content,t,n-e,o-e);return i<0?null:{node:r,pos:i,text:t}}return{node:r,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:o}){if(this.getDesc(e))return;let r=e;for(;;r=r.parentNode){if(r.parentNode==this.contentDOM)break;while(r.previousSibling)r.parentNode.removeChild(r.previousSibling);while(r.nextSibling)r.parentNode.removeChild(r.nextSibling);r.pmViewDesc&&(r.pmViewDesc=void 0)}let i=new _o(this,r,e,o);t.input.compositionNodes.push(i),this.children=fr(this.children,n,n+o.length,t,i)}update(t,e,n,o){return!(this.dirty==Fo||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,o),!0)}updateInner(t,e,n,o){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Bo}updateOuterDeco(t){if(sr(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=or(this.dom,this.nodeDOM,nr(this.outerDeco,this.node,e),nr(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Jo(t,e,n,o,r){ir(o,e,t);let i=new Uo(void 0,t,e,n,o,o,o,r,0);return i.contentDOM&&i.updateChildren(r,0),i}class Xo extends Uo{constructor(t,e,n,o,r,i,s){super(t,e,n,o,r,null,i,s,0)}parseRule(){let t=this.nodeDOM.parentNode;while(t&&t!=this.dom&&!t.pmIsDeco)t=t.parentNode;return{skip:t||!0}}update(t,e,n,o){return!(this.dirty==Fo||this.dirty!=Bo&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),this.dirty==Bo&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Bo,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let o=this.node.cut(t,e),r=document.createTextNode(o.text);return new Xo(this.parent,o,this.outerDeco,this.innerDeco,r,r,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=Fo)}get domAtom(){return!1}isText(t){return this.node.text==t}}class Go extends jo{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Bo&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Yo extends Uo{constructor(t,e,n,o,r,i,s,l,a,c){super(t,e,n,o,r,i,s,a,c),this.spec=l}update(t,e,n,o){if(this.dirty==Fo)return!1;if(this.spec.update){let r=this.spec.update(t,e,n);return r&&this.updateInner(t,e,n,o),r}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,o){this.spec.setSelection?this.spec.setSelection(t,e,n):super.setSelection(t,e,n,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function Zo(t,e,n){let o=t.firstChild,r=!1;for(let i=0;i>1,i=Math.min(r,t.length);while(o-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let o=qo.create(this.top,t[r],e,n);this.top.children.splice(this.index,0,o),this.top=o,this.changed=!0}this.index=0,r++}}findNodeMatch(t,e,n,o){let r,i=-1;if(o>=this.preMatch.index&&(r=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&r.matchesNode(t,e,n))i=this.top.children.indexOf(r,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s0){let l;for(;;)if(o){let t=n.children[o-1];if(!(t instanceof qo)){l=t,o--;break}n=t,o=t.children.length}else{if(n==e)break t;o=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(r-1))break;--r,i.set(l,r),s.push(l)}}return{index:r,matched:i,matches:s.reverse()}}function pr(t,e){return t.type.side-e.type.side}function dr(t,e,n,o){let r=e.locals(t),i=0;if(0==r.length){for(let n=0;ni)l.push(r[s++]);let f=i+h.nodeSize;if(h.isText){let t=f;s!t.inline)):l.slice();o(h,m,e.forChild(i,h),u),i=f}}function hr(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function ur(t,e,n,o){for(let r=0,i=0;r=n){if(i>=o&&a.slice(o-e.length-l,o-l)==e)return o-e.length;let t=l=0&&t+e.length+l>=n)return l+t;if(n==o&&a.length>=o+e.length-l&&a.slice(o-l,o-l+e.length)==e)return o}}return-1}function fr(t,e,n,o,r){let i=[];for(let s=0,l=0;s=n||p<=e?i.push(a):(cn&&i.push(a.slice(n-c,a.size,o)))}return i}function mr(t,e=null){let n=t.domSelectionRange(),o=t.state.doc;if(!n.focusNode)return null;let r=t.docView.nearestDesc(n.focusNode),i=r&&0==r.size,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l,a,c=o.resolve(s);if(Hn(n)){l=c;while(r&&!r.node)r=r.parent;let t=r.node;if(r&&t.isAtom&&rn.isSelectable(t)&&r.parent&&(!t.isInline||!In(n.focusNode,n.focusOffset,r.dom))){let t=r.posBefore;a=new rn(s==t?c:o.resolve(t))}}else{let e=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(e<0)return null;l=o.resolve(e)}if(!a){let n="pointer"==e||t.state.selection.head{n.anchorNode==o&&n.anchorOffset==r||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout((()=>{gr(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}function kr(t){let e=t.domSelection(),n=document.createRange(),o=t.cursorWrapper.dom,r="IMG"==o.nodeName;r?n.setEnd(o.parentNode,Qn(o)+1):n.setEnd(o,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!r&&!t.state.selection.visible&&Un&&Jn<=11&&(o.disabled=!0,o.disabled=!1)}function Wr(t,e){if(e instanceof rn){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Qr(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Qr(t)}function Qr(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Cr(t,e,n,o){return t.someProp("createSelectionBetween",(o=>o(t,e,n)))||nn.between(e,n,o)}function Sr(t){return!(t.editable&&!t.hasFocus())&&Or(t)}function Or(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function Tr(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return An(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Ar(t,e){let{$anchor:n,$head:o}=t.selection,r=e>0?n.max(o):n.min(o),i=r.parent.inlineContent?r.depth?t.doc.resolve(e>0?r.after():r.before()):null:r;return i&&Ye.findFrom(i,e)}function Er(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Lr(t,e,n){let o=t.state.selection;if(!(o instanceof nn)){if(o instanceof rn&&o.node.isInline)return Er(t,new nn(e>0?o.$to:o.$from));{let n=Ar(t.state,e);return!!n&&Er(t,n)}}if(n.indexOf("s")>-1){let{$head:n}=o,r=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!r||r.isText||!r.isLeaf)return!1;let i=t.state.doc.resolve(n.pos+r.nodeSize*(e<0?-1:1));return Er(t,new nn(o.$anchor,i))}if(!o.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=Ar(t.state,e);return!!(n&&n instanceof rn)&&Er(t,n)}if(!(no&&n.indexOf("m")>-1)){let n,r=o.$head,i=r.textOffset?null:e<0?r.nodeBefore:r.nodeAfter;if(!i||i.isText)return!1;let s=e<0?r.pos-i.nodeSize:r.pos;return!!(i.isAtom||(n=t.docView.descAt(s))&&!n.contentDOM)&&(rn.isSelectable(i)?Er(t,new rn(e<0?t.state.doc.resolve(r.pos-i.nodeSize):r)):!!io&&Er(t,new nn(t.state.doc.resolve(e<0?s:s+i.nodeSize))))}}function Nr(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Dr(t,e){let n=t.pmViewDesc;return n&&0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName)}function Rr(t,e){return e<0?Ir(t):Pr(t)}function Ir(t){let e=t.domSelectionRange(),n=e.focusNode,o=e.focusOffset;if(!n)return;let r,i,s=!1;for(Xn&&1==n.nodeType&&o0){if(1!=n.nodeType)break;{let t=n.childNodes[o-1];if(Dr(t,-1))r=n,i=--o;else{if(3!=t.nodeType)break;n=t,o=n.nodeValue.length}}}else{if(Hr(n))break;{let e=n.previousSibling;while(e&&Dr(e,-1))r=n.parentNode,i=Qn(e),e=e.previousSibling;if(e)n=e,o=Nr(n);else{if(n=n.parentNode,n==t.dom)break;o=0}}}s?zr(t,n,o):r&&zr(t,r,i)}function Pr(t){let e=t.domSelectionRange(),n=e.focusNode,o=e.focusOffset;if(!n)return;let r,i,s=Nr(n);for(;;)if(o{t.state==r&&xr(t)}),50)}function Vr(t,e){let n=t.state.doc.resolve(e);if(!Yn&&!oo&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let n=t.coordsAtPos(e-1),r=(n.top+n.bottom)/2;if(r>o.top&&r1)return n.lefto.top&&r1)return n.left>o.left?"ltr":"rtl"}}let o=getComputedStyle(t.dom).direction;return"rtl"==o?"rtl":"ltr"}function Fr(t,e,n){let o=t.state.selection;if(o instanceof nn&&!o.empty||n.indexOf("s")>-1)return!1;if(no&&n.indexOf("m")>-1)return!1;let{$from:r,$to:i}=o;if(!r.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Ar(t.state,e);if(n&&n instanceof rn)return Er(t,n)}if(!r.parent.inlineContent){let n=e<0?r:i,s=o instanceof ln?Ye.near(n,e):Ye.findFrom(n,e);return!!s&&Er(t,s)}return!1}function jr(t,e){if(!(t.state.selection instanceof nn))return!0;let{$head:n,$anchor:o,empty:r}=t.state.selection;if(!n.sameParent(o))return!0;if(!r)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let o=t.state.tr;return e<0?o.delete(n.pos-i.nodeSize,n.pos):o.delete(n.pos,n.pos+i.nodeSize),t.dispatch(o),!0}return!1}function Kr(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function _r(t){if(!to||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;Kr(t,n,"true"),setTimeout((()=>Kr(t,n,"false")),20)}return!1}function qr(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function Ur(t,e){let n=e.keyCode,o=qr(e);if(8==n||no&&72==n&&"c"==o)return jr(t,-1)||Rr(t,-1);if(46==n&&!e.shiftKey||no&&68==n&&"c"==o)return jr(t,1)||Rr(t,1);if(13==n||27==n)return!0;if(37==n||no&&66==n&&"c"==o){let e=37==n?"ltr"==Vr(t,t.state.selection.from)?-1:1:-1;return Lr(t,e,o)||Rr(t,e)}if(39==n||no&&70==n&&"c"==o){let e=39==n?"ltr"==Vr(t,t.state.selection.from)?1:-1:1;return Lr(t,e,o)||Rr(t,e)}return 38==n||no&&80==n&&"c"==o?Fr(t,-1,o)||Rr(t,-1):40==n||no&&78==n&&"c"==o?_r(t)||Fr(t,1,o)||Rr(t,1):o==(no?"m":"c")&&(66==n||73==n||89==n||90==n)}function Jr(t,e){t.someProp("transformCopied",(n=>{e=n(e,t)}));let n=[],{content:o,openStart:r,openEnd:i}=e;while(r>1&&i>1&&1==o.childCount&&1==o.firstChild.childCount){r--,i--;let t=o.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),o=t.content}let s=t.someProp("clipboardSerializer")||It.fromSchema(t.state.schema),l=si(),a=l.createElement("div");a.appendChild(s.serializeFragment(o,{document:l}));let c,p=a.firstChild,d=0;while(p&&1==p.nodeType&&(c=ri[p.nodeName.toLowerCase()])){for(let t=c.length-1;t>=0;t--){let e=l.createElement(c[t]);while(a.firstChild)e.appendChild(a.firstChild);a.appendChild(e),d++}p=a.firstChild}p&&1==p.nodeType&&p.setAttribute("data-pm-slice",`${r} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",(n=>n(e,t)))||e.content.textBetween(0,e.content.size,"\n\n");return{dom:a,text:h,slice:e}}function Xr(t,e,n,o,r){let i,s,l=r.parent.type.spec.code;if(!n&&!e)return null;let a=e&&(o||l||!n);if(a){if(t.someProp("transformPastedText",(n=>{e=n(e,l||o,t)})),l)return e?new T(k.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):T.empty;let n=t.someProp("clipboardTextParser",(n=>n(e,r,o,t)));if(n)s=n;else{let n=r.marks(),{schema:o}=t.state,s=It.fromSchema(o);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((t=>{let e=i.appendChild(document.createElement("p"));t&&e.appendChild(s.serializeNode(o.text(t,n)))}))}}else t.someProp("transformPastedHTML",(e=>{n=e(n,t)})),i=li(n),io&&ai(i);let c=i&&i.querySelector("[data-pm-slice]"),p=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let d=+p[3];d>0;d--){let t=i.firstChild;while(t&&1!=t.nodeType)t=t.nextSibling;if(!t)break;i=t}if(!s){let e=t.someProp("clipboardParser")||t.someProp("domParser")||wt.fromSchema(t.state.schema);s=e.parseSlice(i,{preserveWhitespace:!(!a&&!p),context:r,ruleFromNode(t){return"BR"!=t.nodeName||t.nextSibling||!t.parentNode||Gr.test(t.parentNode.nodeName)?null:{ignore:!0}}})}if(p)s=ci(oi(s,+p[1],+p[2]),p[4]);else if(s=T.maxOpen(Yr(s.content,r),!0),s.openStart||s.openEnd){let t=0,e=0;for(let n=s.content.firstChild;t{s=e(s,t)})),s}const Gr=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Yr(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o,r=e.node(n),i=r.contentMatchAt(e.index(n)),s=[];if(t.forEach((t=>{if(!s)return;let e,n=i.findWrapping(t.type);if(!n)return s=null;if(e=s.length&&o.length&&ti(n,o,t,s[s.length-1],0))s[s.length-1]=e;else{s.length&&(s[s.length-1]=ei(s[s.length-1],o.length));let e=Zr(t,n);s.push(e),i=i.matchType(e.type),o=n}})),s)return k.from(s)}return t}function Zr(t,e,n=0){for(let o=e.length-1;o>=n;o--)t=e[o].create(null,k.from(t));return t}function ti(t,e,n,o,r){if(r1&&(i=0),r=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=r).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(k.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function oi(t,e,n){return e]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,o=si().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t);if((n=r&&ri[r[1].toLowerCase()])&&(t=n.map((t=>"<"+t+">")).join("")+t+n.map((t=>"")).reverse().join("")),o.innerHTML=t,n)for(let i=0;i=0;a-=2){let t=o.nodes[n[a]];if(!t||t.hasRequiredAttrs())break;r=k.from(t.create(n[a+1],r)),i++,s++}return new T(r,i,s)}const pi={},di={},hi={touchstart:!0,touchmove:!0};class ui{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function fi(t){for(let e in pi){let n=pi[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!yi(t,e)||Mi(t,e)||!t.editable&&e.type in di||n(t,e)},hi[e]?{passive:!0}:void 0)}to&&t.dom.addEventListener("input",(()=>null)),xi(t)}function mi(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function gi(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function xi(t){t.someProp("handleDOMEvents",(e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>Mi(t,e))}))}function Mi(t,e){return t.someProp("handleDOMEvents",(n=>{let o=n[e.type];return!!o&&(o(t,e)||e.defaultPrevented)}))}function yi(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function vi(t,e){Mi(t,e)||!pi[e.type]||!t.editable&&e.type in di||pi[e.type](t,e)}function wi(t){return{left:t.clientX,top:t.clientY}}function bi(t,e){let n=e.x-t.clientX,o=e.y-t.clientY;return n*n+o*o<100}function ki(t,e,n,o,r){if(-1==o)return!1;let i=t.state.doc.resolve(o);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,(e=>s>i.depth?e(t,n,i.nodeAfter,i.before(s),r,!0):e(t,n,i.node(s),i.before(s),r,!1))))return!0;return!1}function Wi(t,e,n){t.focused||t.focus();let o=t.state.tr.setSelection(e);"pointer"==n&&o.setMeta("pointer",!0),t.dispatch(o)}function Qi(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),o=n.nodeAfter;return!!(o&&o.isAtom&&rn.isSelectable(o))&&(Wi(t,new rn(n),"pointer"),!0)}function Ci(t,e){if(-1==e)return!1;let n,o,r=t.state.selection;r instanceof rn&&(n=r.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let t=s>i.depth?i.nodeAfter:i.node(s);if(rn.isSelectable(t)){o=n&&r.$from.depth>0&&s>=r.$from.depth&&i.before(r.$from.depth+1)==r.$from.pos?i.before(r.$from.depth):i.before(s);break}}return null!=o&&(Wi(t,rn.create(t.state.doc,o),"pointer"),!0)}function Si(t,e,n,o,r){return ki(t,"handleClickOn",e,n,o)||t.someProp("handleClick",(n=>n(t,e,o)))||(r?Ci(t,n):Qi(t,n))}function Oi(t,e,n,o){return ki(t,"handleDoubleClickOn",e,n,o)||t.someProp("handleDoubleClick",(n=>n(t,e,o)))}function Ti(t,e,n,o){return ki(t,"handleTripleClickOn",e,n,o)||t.someProp("handleTripleClick",(n=>n(t,e,o)))||Ai(t,n,o)}function Ai(t,e,n){if(0!=n.button)return!1;let o=t.state.doc;if(-1==e)return!!o.inlineContent&&(Wi(t,nn.create(o,0,o.content.size),"pointer"),!0);let r=o.resolve(e);for(let i=r.depth+1;i>0;i--){let e=i>r.depth?r.nodeAfter:r.node(i),n=r.before(i);if(e.inlineContent)Wi(t,nn.create(o,n+1,n+1+e.content.size),"pointer");else{if(!rn.isSelectable(e))continue;Wi(t,rn.create(o,n),"pointer")}return!0}}function Ei(t){return Bi(t)}di.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!Di(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!ro||!Yn||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!eo||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",(e=>e(t,n)))||Ur(t,n)?n.preventDefault():mi(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",(e=>e(t,$n(13,"Enter")))),t.input.lastIOSEnter=0)}),200)}},di.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},di.keypress=(t,e)=>{let n=e;if(Di(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||no&&n.metaKey)return;if(t.someProp("handleKeyPress",(e=>e(t,n))))return void n.preventDefault();let o=t.state.selection;if(!(o instanceof nn)||!o.$from.sameParent(o.$to)){let e=String.fromCharCode(n.charCode);/[\r\n]/.test(e)||t.someProp("handleTextInput",(n=>n(t,o.$from.pos,o.$to.pos,e)))||t.dispatch(t.state.tr.insertText(e).scrollIntoView()),n.preventDefault()}};const Li=no?"metaKey":"ctrlKey";pi.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let o=Ei(t),r=Date.now(),i="singleClick";r-t.input.lastClick.time<500&&bi(n,t.input.lastClick)&&!n[Li]&&("singleClick"==t.input.lastClick.type?i="doubleClick":"doubleClick"==t.input.lastClick.type&&(i="tripleClick")),t.input.lastClick={time:r,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(wi(n));s&&("singleClick"==i?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Ni(t,s,n,!!o)):("doubleClick"==i?Oi:Ti)(t,s.pos,s.inside,n)?n.preventDefault():mi(t,"pointer"))};class Ni{constructor(t,e,n,o){let r,i;if(this.view=t,this.pos=e,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[Li],this.allowDefault=n.shiftKey,e.inside>-1)r=t.state.doc.nodeAt(e.inside),i=e.inside;else{let n=t.state.doc.resolve(e.pos);r=n.parent,i=n.depth?n.before():0}const s=o?null:n.target,l=s?t.docView.nearestDesc(s,!0):null;this.target=l&&1==l.dom.nodeType?l.dom:null;let{selection:a}=t.state;(0==n.button&&r.type.spec.draggable&&!1!==r.type.spec.selectable||a instanceof rn&&a.from<=i&&a.to>i)&&(this.mightDrag={node:r,pos:i,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Xn||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),mi(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>xr(this.view))),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(wi(t))),this.updateAllowDefault(t),this.allowDefault||!e?mi(this.view,"pointer"):Si(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||to&&this.mightDrag&&!this.mightDrag.node.isAtom||Yn&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(Wi(this.view,Ye.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):mi(this.view,"pointer")}move(t){this.updateAllowDefault(t),mi(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function Di(t,e){return!!t.composing||!!(to&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}pi.touchstart=t=>{t.input.lastTouch=Date.now(),Ei(t),mi(t,"pointer")},pi.touchmove=t=>{t.input.lastTouch=Date.now(),mi(t,"pointer")},pi.contextmenu=t=>Ei(t);const Ri=ro?5e3:-1;function Ii(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout((()=>Bi(t)),e))}function Pi(t){t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=$i());while(t.input.compositionNodes.length>0)t.input.compositionNodes.pop().markParentsDirty()}function Hi(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Dn(e.focusNode,e.focusOffset),o=Rn(e.focusNode,e.focusOffset);if(n&&o&&n!=o){let e=o.pmViewDesc,r=t.domObserver.lastChangedTextNode;if(n==r||o==r)return r;if(!e||!e.isText(o.nodeValue))return o;if(t.input.compositionNode==o){let t=n.pmViewDesc;if(t&&t.isText(n.nodeValue))return o}}return n||o}function $i(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Bi(t,e=!1){if(!(ro&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Pi(t),e||t.docView&&t.docView.dirty){let e=mr(t);return e&&!e.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(e)):t.updateState(t.state),!0}return!1}}function zi(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let o=getSelection(),r=document.createRange();r.selectNodeContents(e),t.dom.blur(),o.removeAllRanges(),o.addRange(r),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}di.compositionstart=di.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((t=>!1===t.type.spec.inclusive))))t.markCursor=t.state.storedMarks||n.marks(),Bi(t,!0),t.markCursor=null;else if(Bi(t),Xn&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,o=e.focusOffset;n&&1==n.nodeType&&0!=o;){let e=o<0?n.lastChild:n.childNodes[o-1];if(!e)break;if(3==e.nodeType){t.domSelection().collapse(e,e.nodeValue.length);break}n=e,o=-1}}t.input.composing=!0}Ii(t,Ri)},di.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then((()=>t.domObserver.flush())),t.input.compositionID++,Ii(t,20))};const Vi=Un&&Jn<15||eo&&so<604;function Fi(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}function ji(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,o=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus();let r=t.input.shiftKey&&45!=t.input.lastKeyCode;setTimeout((()=>{t.focus(),o.parentNode&&o.parentNode.removeChild(o),n?Ki(t,o.value,null,r,e):Ki(t,o.textContent,o.innerHTML,r,e)}),50)}function Ki(t,e,n,o,r){let i=Xr(t,e,n,o,t.state.selection.$from);if(t.someProp("handlePaste",(e=>e(t,r,i||T.empty))))return!0;if(!i)return!1;let s=Fi(i),l=s?t.state.tr.replaceSelectionWith(s,o):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function _i(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}pi.copy=di.cut=(t,e)=>{let n=e,o=t.state.selection,r="cut"==n.type;if(o.empty)return;let i=Vi?null:n.clipboardData,s=o.content(),{dom:l,text:a}=Jr(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):zi(t,l),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},di.paste=(t,e)=>{let n=e;if(t.composing&&!ro)return;let o=Vi?null:n.clipboardData,r=t.input.shiftKey&&45!=t.input.lastKeyCode;o&&Ki(t,_i(o),o.getData("text/html"),r,n)?n.preventDefault():ji(t,n)};class qi{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}}const Ui=no?"altKey":"ctrlKey";pi.dragstart=(t,e)=>{let n=e,o=t.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let r,i=t.state.selection,s=i.empty?null:t.posAtCoords(wi(n));if(s&&s.pos>=i.from&&s.pos<=(i instanceof rn?i.to-1:i.to));else if(o&&o.mightDrag)r=rn.create(t.state.doc,o.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&(r=rn.create(t.state.doc,e.posBefore))}let l=(r||t.state.selection).content(),{dom:a,text:c,slice:p}=Jr(t,l);n.dataTransfer.clearData(),n.dataTransfer.setData(Vi?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Vi||n.dataTransfer.setData("text/plain",c),t.dragging=new qi(p,!n[Ui],r)},pi.dragend=t=>{let e=t.dragging;window.setTimeout((()=>{t.dragging==e&&(t.dragging=null)}),50)},di.dragover=di.dragenter=(t,e)=>e.preventDefault(),di.drop=(t,e)=>{let n=e,o=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let r=t.posAtCoords(wi(n));if(!r)return;let i=t.state.doc.resolve(r.pos),s=o&&o.slice;s?t.someProp("transformPasted",(e=>{s=e(s,t)})):s=Xr(t,_i(n.dataTransfer),Vi?null:n.dataTransfer.getData("text/html"),!1,i);let l=!(!o||n[Ui]);if(t.someProp("handleDrop",(e=>e(t,n,s||T.empty,l))))return void n.preventDefault();if(!s)return;n.preventDefault();let a=s?Ee(t.state.doc,i.pos,s):i.pos;null==a&&(a=i.pos);let c=t.state.tr;if(l){let{node:t}=o;t?t.replace(c):c.deleteSelection()}let p=c.mapping.map(a),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,h=c.doc;if(d?c.replaceRangeWith(p,p,s.content.firstChild):c.replaceRange(p,p,s),c.doc.eq(h))return;let u=c.doc.resolve(p);if(d&&rn.isSelectable(s.content.firstChild)&&u.nodeAfter&&u.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new rn(u));else{let e=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach(((t,n,o,r)=>e=r)),c.setSelection(Cr(t,u,c.doc.resolve(e)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))},pi.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&xr(t)}),20))},pi.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},pi.beforeinput=(t,e)=>{let n=e;if(Yn&&ro&&"deleteContentBackward"==n.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout((()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",(e=>e(t,$n(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let os in di)pi[os]=di[os];function Ji(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Xi{constructor(t,e){this.toDOM=t,this.spec=e||es,this.side=this.spec.side||0}map(t,e,n,o){let{pos:r,deleted:i}=t.mapResult(e.from+o,this.side<0?-1:1);return i?null:new Zi(r-n,r-n,this)}valid(){return!0}eq(t){return this==t||t instanceof Xi&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ji(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Gi{constructor(t,e){this.attrs=t,this.spec=e||es}map(t,e,n,o){let r=t.map(e.from+o,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+o,this.spec.inclusiveEnd?1:-1)-n;return r>=i?null:new Zi(r,i,this)}valid(t,e){return e.from=t&&(!r||r(s.spec))&&n.push(s.copy(s.from+o,s.to+o))}for(let i=0;it){let s=this.children[i]+1;this.children[i+2].findInner(t-s,e-s,n,o+s,r)}}map(t,e,n){return this==rs||0==t.maps.length?this:this.mapInner(t,e,0,0,n||es)}mapInner(t,e,n,o,r){let i;for(let s=0;s{let s,l=i+n;if(s=cs(e,t,l)){o||(o=this.children.slice());while(ri&&e.to=t){this.children[s]==t&&(n=this.children[s+2]);break}let r=t+1,i=r+e.content.size;for(let s=0;sr&&t.type instanceof Gi){let e=Math.max(r,t.from)-r,n=Math.min(i,t.to)-r;en.map(t,e,es)));return is.from(n)}forChild(t,e){if(e.isLeaf)return ns.empty;let n=[];for(let o=0;ot instanceof ns))?t:t.reduce(((t,e)=>t.concat(e instanceof ns?e:e.members)),[]))}}}function ss(t,e,n,o,r,i,s){let l=t.slice();for(let c=0,p=i;c{let i=r-o-(n-e);for(let s=0;so+p-t)continue;let r=l[s]+p-t;n>=r?l[s+1]=e<=r?-2:-1:e>=p&&i&&(l[s]+=i,l[s+1]+=i)}t+=i})),p=n.maps[c].map(p,-1)}let a=!1;for(let c=0;c=o.content.size){a=!0;continue}let d=n.map(t[c+1]+i,-1),h=d-r,{index:u,offset:f}=o.content.findIndex(p),m=o.maybeChild(u);if(m&&f==p&&f+m.nodeSize==h){let o=l[c+2].mapInner(n,m,e+1,t[c]+i+1,s);o!=rs?(l[c]=p,l[c+1]=h,l[c+2]=o):(l[c+1]=-2,a=!0)}else a=!0}if(a){let a=as(l,t,e,n,r,i,s),c=ds(a,o,0,s);e=c.local;for(let t=0;tn&&i.to{let l=cs(t,e,s+n);if(l){i=!0;let t=ds(l,e,n+s+1,o);t!=rs&&r.push(s,s+e.nodeSize,t)}}));let s=ls(i?ps(t):t,-n).sort(hs);for(let l=0;l0)e++;t.splice(e,0,n)}function ms(t){let e=[];return t.someProp("decorations",(n=>{let o=n(t.state);o&&o!=rs&&e.push(o)})),t.cursorWrapper&&e.push(ns.create(t.state.doc,[t.cursorWrapper.deco])),is.from(e)}const gs={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},xs=Un&&Jn<=11;class Ms{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class ys{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Ms,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((t=>{for(let e=0;e"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),xs&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,gs)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;ethis.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Sr(this.view)){if(this.suppressingSelectionUpdates)return xr(this.view);if(Un&&Jn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&An(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,n=new Set;for(let r=t.focusNode;r;r=Cn(r))n.add(r);for(let r=t.anchorNode;r;r=Cn(r))if(n.has(r)){e=r;break}let o=e&&this.view.docView.nearestDesc(e);return o&&o.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Sr(t)&&!this.ignoreSelectionChange(n),r=-1,i=-1,s=!1,l=[];if(t.editable)for(let c=0;c"BR"==t.nodeName));if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let o of e){let e=o.parentNode;!e||"LI"!=e.nodeName||n&&Qs(t,n)==e||o.remove()}}}let a=null;r<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(r>-1&&(t.docView.markDirty(r,i),bs(t)),this.handleDOMChange(r,i,s,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||xr(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;ni;g--){let t=r.childNodes[g-1],e=t.pmViewDesc;if("BR"==t.nodeName&&!e){s=g;break}if(!e||e.size)break}let d=t.state.doc,h=t.someProp("domParser")||wt.fromSchema(t.state.schema),u=d.resolve(l),f=null,m=h.parse(r,{topNode:u.parent,topMatch:u.parent.contentMatchAt(u.index()),topOpen:!0,from:i,to:s,preserveWhitespace:"pre"!=u.parent.type.whitespace||"full",findPositions:o,ruleFromNode:Ss,context:u});if(o&&null!=o[0].pos){let t=o[0].pos,e=o[1]&&o[1].pos;null==e&&(e=t),f={anchor:t+l,head:e+l}}return{doc:m,sel:f,from:l,to:a}}function Ss(t){let e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(to&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(t.parentNode.lastChild==t||to&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Os=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Ts(t,e,n,o,r){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=mr(t,e);if(n&&!t.state.selection.eq(n)){if(Yn&&ro&&13===t.input.lastKeyCode&&Date.now()-100e(t,$n(13,"Enter")))))return;let o=t.state.tr.setSelection(n);"pointer"==e?o.setMeta("pointer",!0):"key"==e&&o.scrollIntoView(),i&&o.setMeta("composition",i),t.dispatch(o)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a,c,p=t.state.selection,d=Cs(t,e,n),h=t.state.doc,u=h.slice(d.from,d.to);8===t.input.lastKeyCode&&Date.now()-100Date.now()-225||ro)&&r.some((t=>1==t.nodeType&&!Os.test(t.nodeName)))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",(e=>e(t,$n(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(!f){if(!(o&&p instanceof nn&&!p.empty&&p.$head.sameParent(p.$anchor))||t.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let e=As(t,t.state.doc,d.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);i&&n.setMeta("composition",i),t.dispatch(n)}}return}f={start:p.from,endA:p.to,endB:p.to}}t.input.domChangeCount++,t.state.selection.fromt.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?f.start=t.state.selection.from:f.endA=t.state.selection.to-2&&t.state.selection.to<=d.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),Un&&Jn<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>d.from&&"  "==d.doc.textBetween(f.start-d.from-1,f.start-d.from+1)&&(f.start--,f.endA--,f.endB--);let m,g=d.doc.resolveNoCache(f.start-d.from),x=d.doc.resolveNoCache(f.endB-d.from),M=h.resolve(f.start),y=g.sameParent(x)&&g.parent.inlineContent&&M.end()>=f.endA;if((eo&&t.input.lastIOSEnter>Date.now()-225&&(!y||r.some((t=>"DIV"==t.nodeName||"P"==t.nodeName)))||!y&&g.pose(t,$n(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>f.start&&Ls(h,f.start,f.endA,g,x)&&t.someProp("handleKeyDown",(e=>e(t,$n(8,"Backspace")))))return void(ro&&Yn&&t.domObserver.suppressSelectionUpdates());Yn&&ro&&f.endB==f.start&&(t.input.lastAndroidDelete=Date.now()),ro&&!y&&g.start()!=x.start()&&0==x.parentOffset&&g.depth==x.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==f.endA&&(f.endB-=2,x=d.doc.resolveNoCache(f.endB-d.from),setTimeout((()=>{t.someProp("handleKeyDown",(function(e){return e(t,$n(13,"Enter"))}))}),20));let v,w,b,k=f.start,W=f.endA;if(y)if(g.pos==x.pos)Un&&Jn<=11&&0==g.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((()=>xr(t)),20)),v=t.state.tr.delete(k,W),w=h.resolve(f.start).marksAcross(h.resolve(f.endA));else if(f.endA==f.endB&&(b=Es(g.parent.content.cut(g.parentOffset,x.parentOffset),M.parent.content.cut(M.parentOffset,f.endA-M.start()))))v=t.state.tr,"add"==b.type?v.addMark(k,W,b.mark):v.removeMark(k,W,b.mark);else if(g.parent.child(g.index()).isText&&g.index()==x.index()-(x.textOffset?0:1)){let e=g.parent.textBetween(g.parentOffset,x.parentOffset);if(t.someProp("handleTextInput",(n=>n(t,k,W,e))))return;v=t.state.tr.insertText(e,k,W)}if(v||(v=t.state.tr.replace(k,W,d.doc.slice(f.start-d.from,f.endB-d.from))),d.sel){let e=As(t,v.doc,d.sel);e&&!(Yn&&ro&&t.composing&&e.empty&&(f.start!=f.endB||t.input.lastAndroidDeletee.content.size?null:Cr(t,e.resolve(n.anchor),e.resolve(n.head))}function Es(t,e){let n,o,r,i=t.firstChild.marks,s=e.firstChild.marks,l=i,a=s;for(let p=0;pt.mark(o.addToSet(t.marks));else{if(0!=l.length||1!=a.length)return null;o=a[0],n="remove",r=t=>t.mark(o.removeFromSet(t.marks))}let c=[];for(let p=0;pn||Ns(s,!0,!1)0&&(e||t.indexAfter(o)==t.node(o).childCount))o--,r++,e=!1;if(n){let e=t.node(o).maybeChild(t.indexAfter(o));while(e&&!e.isLeaf)e=e.firstChild,r++}return r}function Ds(t,e,n,o,r){let i=t.findDiffStart(e,n);if(null==i)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if("end"==r){let t=Math.max(0,i-Math.min(s,l));o-=s+t-i}if(s=s?i-o:0;i-=t,i&&i=l?i-o:0;i-=e,i&&i=56320&&e<=57343&&n>=55296&&n<=56319}class Is{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ui,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(Fs),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=$s(this),Hs(this),this.nodeViews=zs(this),this.docView=Jo(this.state.doc,Ps(this),ms(this),this.dom,this),this.domObserver=new ys(this,((t,e,n,o)=>Ts(this,t,e,n,o))),this.domObserver.start(),fi(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&xi(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Fs),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let n in this._props)e[n]=this._props[n];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n;let o=this.state,r=!1,i=!1;t.storedMarks&&this.composing&&(Pi(this),i=!0),this.state=t;let s=o.plugins!=t.plugins||this._props.plugins!=e.plugins;if(s||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=zs(this);Vs(t,this.nodeViews)&&(this.nodeViews=t,r=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&xi(this),this.editable=$s(this),Hs(this);let l=ms(this),a=Ps(this),c=o.plugins==t.plugins||o.doc.eq(t.doc)?t.scrollToSelection>o.scrollToSelection?"to selection":"preserve":"reset",p=r||!this.docView.matchesNode(t.doc,a,l);!p&&t.selection.eq(o.selection)||(i=!0);let d="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&ho(this);if(i){this.domObserver.stop();let e=p&&(Un||Yn)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&Bs(o.selection,t.selection);if(p){let n=Yn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Hi(this)),!r&&this.docView.update(t.doc,a,l,this)||(this.docView.updateOuterDeco(a),this.docView.destroy(),this.docView=Jo(t.doc,a,l,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Tr(this))?xr(this,e):(Wr(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():d&&fo(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(t=>t(this))));else if(this.state.selection instanceof rn){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&po(this,e.getBoundingClientRect(),t)}else po(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;while(t=this.pluginViews.pop())t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e0&&this.state.doc.nodeAt(t);r==n.node&&(o=t)}this.dragging=new qi(t.slice,t.move,o<0?void 0:rn.create(this.state.doc,o))}someProp(t,e){let n,o=this._props&&this._props[t];if(null!=o&&(n=e?e(o):o))return n;for(let i=0;ie.ownerDocument.getSelection()),this._root=e;return t||document}updateRoot(){this._root=null}posAtCoords(t){return Qo(this,t)}coordsAtPos(t,e=1){return To(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let o=this.docView.posFromDOM(t,e,n);if(null==o)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,e){return $o(this,e||this.state,t)}pasteHTML(t,e){return Ki(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Ki(this,t,null,!0,e||new ClipboardEvent("paste"))}destroy(){this.docView&&(gi(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ms(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Tn())}get isDestroyed(){return null==this.docView}dispatchEvent(t){return vi(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return to&&11===this.root.nodeType&&Bn(this.dom.ownerDocument)==this.dom&&Ws(this,t)||t}domSelection(){return this.root.getSelection()}}function Ps(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t?e.class+=" "+n[t]:"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))})),e.translate||(e.translate="no"),[Zi.node(0,t.state.doc.content.size,e)]}function Hs(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Zi.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function $s(t){return!t.someProp("editable",(e=>!1===e(t.state)))}function Bs(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function zs(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Vs(t,e){let n=0,o=0;for(let r in t){if(t[r]!=e[r])return!0;n++}for(let r in e)o++;return n!=o}function Fs(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var js={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ks={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),qs="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Us=0;Us<10;Us++)js[48+Us]=js[96+Us]=String(Us);for(Us=1;Us<=24;Us++)js[Us+111]="F"+Us;for(Us=65;Us<=90;Us++)js[Us]=String.fromCharCode(Us+32),Ks[Us]=String.fromCharCode(Us);for(var Js in js)Ks.hasOwnProperty(Js)||(Ks[Js]=js[Js]);function Xs(t){var e=_s&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||qs&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key,n=!e&&t.key||(t.shiftKey?Ks:js)[t.keyCode]||t.key||"Unidentified";return"Esc"==n&&(n="Escape"),"Del"==n&&(n="Delete"),"Left"==n&&(n="ArrowLeft"),"Up"==n&&(n="ArrowUp"),"Right"==n&&(n="ArrowRight"),"Down"==n&&(n="ArrowDown"),n}const Gs="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Ys(t){let e,n,o,r,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let l=0;l127)&&(o=js[n.keyCode])&&o!=r){let r=e[tl(o,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}const ol=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function rl(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const il=(t,e,n)=>{let o=rl(t,n);if(!o)return!1;let r=dl(o);if(!r){let n=o.blockRange(),r=n&&he(n);return null!=r&&(e&&e(t.tr.lift(n,r).scrollIntoView()),!0)}let i=r.nodeBefore;if(!i.type.spec.isolating&&Tl(t,r,e))return!0;if(0==o.parent.content.size&&(cl(i,"end")||rn.isSelectable(i))){let n=Le(t.doc,o.before(),o.after(),T.empty);if(n&&n.slice.size{let o=rl(t,n);if(!o)return!1;let r=dl(o);return!!r&&al(t,r,e)},ll=(t,e,n)=>{let o=hl(t,n);if(!o)return!1;let r=ml(o);return!!r&&al(t,r,e)};function al(t,e,n){let o=e.nodeBefore,r=o,i=e.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let t=r.lastChild;if(!t)return!1;r=t}let s=e.nodeAfter,l=s,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let t=l.firstChild;if(!t)return!1;l=t}let c=Le(t.doc,i,a,T.empty);if(!c||c.from!=i||c instanceof ie&&c.slice.size>=a-i)return!1;if(n){let e=t.tr.step(c);e.setSelection(nn.create(e.doc,i)),n(e.scrollIntoView())}return!0}function cl(t,e,n=!1){for(let o=t;o;o="start"==e?o.firstChild:o.lastChild){if(o.isTextblock)return!0;if(n&&1!=o.childCount)return!1}return!1}const pl=(t,e,n)=>{let{$head:o,empty:r}=t.selection,i=o;if(!r)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):o.parentOffset>0)return!1;i=dl(o)}let s=i&&i.nodeBefore;return!(!s||!rn.isSelectable(s))&&(e&&e(t.tr.setSelection(rn.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function dl(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function hl(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset{let o=hl(t,n);if(!o)return!1;let r=ml(o);if(!r)return!1;let i=r.nodeAfter;if(Tl(t,r,e))return!0;if(0==o.parent.content.size&&(cl(i,"start")||rn.isSelectable(i))){let n=Le(t.doc,o.before(),o.after(),T.empty);if(n&&n.slice.size{let{$head:o,empty:r}=t.selection,i=o;if(!r)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):o.parentOffset=0;e--){let n=t.node(e);if(t.index(e)+1{let n,o=t.selection,r=o instanceof rn;if(r){if(o.node.isTextblock||!Ce(t.doc,o.from))return!1;n=o.from}else if(n=Oe(t.doc,o.from,-1),null==n)return!1;if(e){let o=t.tr.join(n);r&&o.setSelection(rn.create(o.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},xl=(t,e)=>{let n,o=t.selection;if(o instanceof rn){if(o.node.isTextblock||!Ce(t.doc,o.to))return!1;n=o.to}else if(n=Oe(t.doc,o.to,1),null==n)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0},Ml=(t,e)=>{let{$from:n,$to:o}=t.selection,r=n.blockRange(o),i=r&&he(r);return null!=i&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},yl=(t,e)=>{let{$head:n,$anchor:o}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(o))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)};function vl(t){for(let e=0;e{let{$head:n,$anchor:o}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(o))return!1;let r=n.node(-1),i=n.indexAfter(-1),s=vl(r.contentMatchAt(i));if(!s||!r.canReplaceWith(i,i,s))return!1;if(e){let o=n.after(),r=t.tr.replaceWith(o,o,s.createAndFill());r.setSelection(Ye.near(r.doc.resolve(o),1)),e(r.scrollIntoView())}return!0},bl=(t,e)=>{let n=t.selection,{$from:o,$to:r}=n;if(n instanceof ln||o.parent.inlineContent||r.parent.inlineContent)return!1;let i=vl(r.parent.contentMatchAt(r.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let n=(!o.parentOffset&&r.index(){let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(We(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let o=n.blockRange(),r=o&&he(o);return null!=r&&(e&&e(t.tr.lift(o,r).scrollIntoView()),!0)};function Wl(t){return(e,n)=>{let{$from:o,$to:r}=e.selection;if(e.selection instanceof rn&&e.selection.node.isBlock)return!(!o.parentOffset||!We(e.doc,o.pos))&&(n&&n(e.tr.split(o.pos).scrollIntoView()),!0);if(!o.parent.isBlock)return!1;if(n){let i=r.parentOffset==r.parent.content.size,s=e.tr;(e.selection instanceof nn||e.selection instanceof ln)&&s.deleteSelection();let l=0==o.depth?null:vl(o.node(-1).contentMatchAt(o.indexAfter(-1))),a=t&&t(r.parent,i),c=a?[a]:i&&l?[{type:l}]:void 0,p=We(s.doc,s.mapping.map(o.pos),1,c);if(c||p||!We(s.doc,s.mapping.map(o.pos),1,l?[{type:l}]:void 0)||(l&&(c=[{type:l}]),p=!0),p&&(s.split(s.mapping.map(o.pos),1,c),!i&&!o.parentOffset&&o.parent.type!=l)){let t=s.mapping.map(o.before()),e=s.doc.resolve(t);l&&o.node(-1).canReplaceWith(e.index(),e.index()+1,l)&&s.setNodeMarkup(s.mapping.map(o.before()),l)}n(s.scrollIntoView())}return!0}}const Ql=Wl(),Cl=(t,e)=>{let n,{$from:o,to:r}=t.selection,i=o.sharedDepth(r);return 0!=i&&(n=o.before(i),e&&e(t.tr.setSelection(rn.create(t.doc,n))),!0)},Sl=(t,e)=>(e&&e(t.tr.setSelection(new ln(t.doc))),!0);function Ol(t,e,n){let o=e.nodeBefore,r=e.nodeAfter,i=e.index();return!!(o&&r&&o.type.compatibleContent(r.type))&&(!o.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-o.nodeSize,e.pos).scrollIntoView()),!0):!(!e.parent.canReplace(i,i+1)||!r.isTextblock&&!Ce(t.doc,e.pos))&&(n&&n(t.tr.clearIncompatible(e.pos,o.type,o.contentMatchAt(o.childCount)).join(e.pos).scrollIntoView()),!0))}function Tl(t,e,n){let o,r,i=e.nodeBefore,s=e.nodeAfter;if(i.type.spec.isolating||s.type.spec.isolating)return!1;if(Ol(t,e,n))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(o=(r=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&r.matchType(o[0]||s.type).validEnd){if(n){let r=e.pos+s.nodeSize,l=k.empty;for(let t=o.length-1;t>=0;t--)l=k.from(o[t].create(null,l));l=k.from(i.copy(l));let a=t.tr.step(new se(e.pos-1,r,e.pos,r,new T(l,1,0),o.length,!0)),c=r+2*o.length;Ce(a.doc,c)&&a.join(c),n(a.scrollIntoView())}return!0}let a=Ye.findFrom(e,1),c=a&&a.$from.blockRange(a.$to),p=c&&he(c);if(null!=p&&p>=e.depth)return n&&n(t.tr.lift(c,p).scrollIntoView()),!0;if(l&&cl(s,"start",!0)&&cl(i,"end")){let o=i,r=[];for(;;){if(r.push(o),o.isTextblock)break;o=o.lastChild}let l=s,a=1;for(;!l.isTextblock;l=l.firstChild)a++;if(o.canReplace(o.childCount,o.childCount,l.content)){if(n){let o=k.empty;for(let t=r.length-1;t>=0;t--)o=k.from(r[t].copy(o));let i=t.tr.step(new se(e.pos-r.length,e.pos+s.nodeSize,e.pos+a,e.pos+s.nodeSize-a,new T(o,r.length,0),0,!0));n(i.scrollIntoView())}return!0}}return!1}function Al(t){return function(e,n){let o=e.selection,r=t<0?o.$from:o.$to,i=r.depth;while(r.node(i).isInline){if(!i)return!1;i--}return!!r.node(i).isTextblock&&(n&&n(e.tr.setSelection(nn.create(e.doc,t<0?r.start(i):r.end(i)))),!0)}}const El=Al(-1),Ll=Al(1);function Nl(t,e=null){return function(n,o){let{$from:r,$to:i}=n.selection,s=r.blockRange(i),l=s&&fe(s,t,e);return!!l&&(o&&o(n.tr.wrap(s,l).scrollIntoView()),!0)}}function Dl(t,e=null){return function(n,o){let r=!1;for(let i=0;i{if(r)return!1;if(o.isTextblock&&!o.hasMarkup(t,e))if(o.type==t)r=!0;else{let e=n.doc.resolve(i),o=e.index();r=e.parent.canReplaceWith(o,o+1,t)}}))}if(!r)return!1;if(o){let r=n.tr;for(let o=0;o=2&&r.node(s.depth-1).type.compatibleContent(t)&&0==s.startIndex){if(0==r.index(s.depth-1))return!1;let t=n.doc.resolve(s.start-2);a=new _(t,t,s.depth),s.endIndex=0;p--)i=k.from(n[p].type.create(n[p].attrs,i));t.step(new se(e.start-(o?2:0),e.end,e.start,e.end,new T(i,0,0),n.length,!0));let s=0;for(let p=0;pe.childCount>0&&e.firstChild.type==t));return!!i&&(!n||(o.node(i.depth-1).type==t?Fl(e,n,t,i):jl(e,n,i)))}}function Fl(t,e,n,o){let r=t.tr,i=o.end,s=o.$to.end(o.depth);im;f--)u-=r.child(f).nodeSize,o.delete(u-1,u+1);let i=o.doc.resolve(n.start),s=i.nodeAfter;if(o.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,a=n.endIndex==r.childCount,c=i.node(-1),p=i.index(-1);if(!c.canReplace(p+(l?0:1),p+1,s.content.append(a?k.empty:k.from(r))))return!1;let d=i.pos,h=d+s.nodeSize;return o.step(new se(d-(l?1:0),h+(a?1:0),d+1,h-1,new T((l?k.empty:k.from(r.copy(k.empty))).append(a?k.empty:k.from(r.copy(k.empty))),l?0:1,a?0:1),l?0:1)),e(o.scrollIntoView()),!0}function Kl(t){return function(e,n){let{$from:o,$to:r}=e.selection,i=o.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==t));if(!i)return!1;let s=i.startIndex;if(0==s)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=t)return!1;if(n){let o=a.lastChild&&a.lastChild.type==l.type,r=k.from(o?t.create():null),s=new T(k.from(t.create(null,k.from(l.type.create(null,r)))),o?3:1,0),c=i.start,p=i.end;n(e.tr.step(new se(c-(o?3:1),p,c,p,s,1,!0)).scrollIntoView())}return!0}}function _l(t){const{state:e,transaction:n}=t;let{selection:o}=n,{doc:r}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return o},get doc(){return r},get tr(){return o=n.selection,r=n.doc,i=n.storedMarks,n}}}class ql{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:o}=e,{tr:r}=n,i=this.buildProps(r);return Object.fromEntries(Object.entries(t).map((([t,e])=>{const n=(...t)=>{const n=e(...t)(i);return r.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(r),n};return[t,n]})))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:o,state:r}=this,{view:i}=o,s=[],l=!!t,a=t||r.tr,c=()=>(l||!e||a.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(a),s.every((t=>!0===t))),p={...Object.fromEntries(Object.entries(n).map((([t,n])=>{const o=(...t)=>{const o=this.buildProps(a,e),r=n(...t)(o);return s.push(r),p};return[t,o]}))),run:c};return p}createCan(t){const{rawCommands:e,state:n}=this,o=!1,r=t||n.tr,i=this.buildProps(r,o),s=Object.fromEntries(Object.entries(e).map((([t,e])=>[t,(...t)=>e(...t)({...i,dispatch:void 0})])));return{...s,chain:()=>this.createChain(r,o)}}buildProps(t,e=!0){const{rawCommands:n,editor:o,state:r}=this,{view:i}=o,s={tr:t,editor:o,view:i,state:_l({state:r,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map((([t,e])=>[t,(...t)=>e(...t)(s)])))}};return s}}class Ul{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter((t=>t!==e)):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function Jl(t,e,n){if(void 0===t.config[e]&&t.parent)return Jl(t.parent,e,n);if("function"===typeof t.config[e]){const o=t.config[e].bind({...n,parent:t.parent?Jl(t.parent,e,n):null});return o}return t.config[e]}function Xl(t){const e=t.filter((t=>"extension"===t.type)),n=t.filter((t=>"node"===t.type)),o=t.filter((t=>"mark"===t.type));return{baseExtensions:e,nodeExtensions:n,markExtensions:o}}function Gl(t){const e=[],{nodeExtensions:n,markExtensions:o}=Xl(t),r=[...n,...o],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach((t=>{const n={name:t.name,options:t.options,storage:t.storage},o=Jl(t,"addGlobalAttributes",n);if(!o)return;const r=o();r.forEach((t=>{t.types.forEach((n=>{Object.entries(t.attributes).forEach((([t,o])=>{e.push({type:n,name:t,attribute:{...i,...o}})}))}))}))})),r.forEach((t=>{const n={name:t.name,options:t.options,storage:t.storage},o=Jl(t,"addAttributes",n);if(!o)return;const r=o();Object.entries(r).forEach((([n,o])=>{const r={...i,...o};"function"===typeof(null===r||void 0===r?void 0:r.default)&&(r.default=r.default()),(null===r||void 0===r?void 0:r.isRequired)&&void 0===(null===r||void 0===r?void 0:r.default)&&delete r.default,e.push({type:t.name,name:n,attribute:r})}))})),e}function Yl(t,e){if("string"===typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Zl(...t){return t.filter((t=>!!t)).reduce(((t,e)=>{const n={...t};return Object.entries(e).forEach((([t,e])=>{const o=n[t];if(o)if("class"===t){const o=e?e.split(" "):[],r=n[t]?n[t].split(" "):[],i=o.filter((t=>!r.includes(t)));n[t]=[...r,...i].join(" ")}else n[t]="style"===t?[n[t],e].join("; "):e;else n[t]=e})),n}),{})}function ta(t,e){return e.filter((t=>t.attribute.rendered)).map((e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]})).reduce(((t,e)=>Zl(t,e)),{})}function ea(t){return"function"===typeof t}function na(t,e=void 0,...n){return ea(t)?e?t.bind(e)(...n):t(...n):t}function oa(t={}){return 0===Object.keys(t).length&&t.constructor===Object}function ra(t){return"string"!==typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}function ia(t,e){return t.style?t:{...t,getAttrs:n=>{const o=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===o)return!1;const r=e.reduce(((t,e)=>{const o=e.attribute.parseHTML?e.attribute.parseHTML(n):ra(n.getAttribute(e.name));return null===o||void 0===o?t:{...t,[e.name]:o}}),{});return{...o,...r}}}}function sa(t){return Object.fromEntries(Object.entries(t).filter((([t,e])=>("attrs"!==t||!oa(e))&&(null!==e&&void 0!==e))))}function la(t,e){var n;const o=Gl(t),{nodeExtensions:r,markExtensions:i}=Xl(t),s=null===(n=r.find((t=>Jl(t,"topNode"))))||void 0===n?void 0:n.name,l=Object.fromEntries(r.map((n=>{const r=o.filter((t=>t.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:e},s=t.reduce(((t,e)=>{const o=Jl(e,"extendNodeSchema",i);return{...t,...o?o(n):{}}}),{}),l=sa({...s,content:na(Jl(n,"content",i)),marks:na(Jl(n,"marks",i)),group:na(Jl(n,"group",i)),inline:na(Jl(n,"inline",i)),atom:na(Jl(n,"atom",i)),selectable:na(Jl(n,"selectable",i)),draggable:na(Jl(n,"draggable",i)),code:na(Jl(n,"code",i)),defining:na(Jl(n,"defining",i)),isolating:na(Jl(n,"isolating",i)),attrs:Object.fromEntries(r.map((t=>{var e;return[t.name,{default:null===(e=null===t||void 0===t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=na(Jl(n,"parseHTML",i));a&&(l.parseDOM=a.map((t=>ia(t,r))));const c=Jl(n,"renderHTML",i);c&&(l.toDOM=t=>c({node:t,HTMLAttributes:ta(t,r)}));const p=Jl(n,"renderText",i);return p&&(l.toText=p),[n.name,l]}))),a=Object.fromEntries(i.map((n=>{const r=o.filter((t=>t.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:e},s=t.reduce(((t,e)=>{const o=Jl(e,"extendMarkSchema",i);return{...t,...o?o(n):{}}}),{}),l=sa({...s,inclusive:na(Jl(n,"inclusive",i)),excludes:na(Jl(n,"excludes",i)),group:na(Jl(n,"group",i)),spanning:na(Jl(n,"spanning",i)),code:na(Jl(n,"code",i)),attrs:Object.fromEntries(r.map((t=>{var e;return[t.name,{default:null===(e=null===t||void 0===t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=na(Jl(n,"parseHTML",i));a&&(l.parseDOM=a.map((t=>ia(t,r))));const c=Jl(n,"renderHTML",i);return c&&(l.toDOM=t=>c({mark:t,HTMLAttributes:ta(t,r)})),[n.name,l]})));return new xt({topNode:s,nodes:l,marks:a})}function aa(t,e){return e.nodes[t]||e.marks[t]||null}function ca(t,e){return Array.isArray(e)?e.some((e=>{const n="string"===typeof e?e:e.name;return n===t.name})):e}const pa=(t,e=500)=>{let n="";const o=t.parentOffset;return t.parent.nodesBetween(Math.max(0,o-e),o,((t,e,r,i)=>{var s,l;const a=(null===(l=(s=t.type.spec).toText)||void 0===l?void 0:l.call(s,{node:t,pos:e,parent:r,index:i}))||t.textContent||"%leaf%";n+=a.slice(0,Math.max(0,o-e))})),n};function da(t){return"[object RegExp]"===Object.prototype.toString.call(t)}class ha{constructor(t){this.find=t.find,this.handler=t.handler}}const ua=(t,e)=>{if(da(e))return e.exec(t);const n=e(t);if(!n)return null;const o=[n.text];return o.index=n.index,o.input=t,o.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),o.push(n.replaceWith)),o};function fa(t){var e;const{editor:n,from:o,to:r,text:i,rules:s,plugin:l}=t,{view:a}=n;if(a.composing)return!1;const c=a.state.doc.resolve(o);if(c.parent.type.spec.code||(null===(e=c.nodeBefore||c.nodeAfter)||void 0===e?void 0:e.marks.find((t=>t.type.spec.code))))return!1;let p=!1;const d=pa(c)+i;return s.forEach((t=>{if(p)return;const e=ua(d,t.find);if(!e)return;const s=a.state.tr,c=_l({state:a.state,transaction:s}),h={from:o-(e[0].length-i.length),to:r},{commands:u,chain:f,can:m}=new ql({editor:n,state:c}),g=t.handler({state:c,range:h,match:e,commands:u,chain:f,can:m});null!==g&&s.steps.length&&(s.setMeta(l,{transform:s,from:o,to:r,text:i}),a.dispatch(s),p=!0)})),p}function ma(t){const{editor:e,rules:n}=t,o=new wn({state:{init(){return null},apply(t,r){const i=t.getMeta(o);if(i)return i;const s=t.getMeta("applyInputRules"),l=!!s;return l&&setTimeout((()=>{const{from:t,text:r}=s,i=t+r.length;fa({editor:e,from:t,to:i,text:r,rules:n,plugin:o})})),t.selectionSet||t.docChanged?null:r}},props:{handleTextInput(t,r,i,s){return fa({editor:e,from:r,to:i,text:s,rules:n,plugin:o})},handleDOMEvents:{compositionend:t=>(setTimeout((()=>{const{$cursor:r}=t.state.selection;r&&fa({editor:e,from:r.pos,to:r.pos,text:"",rules:n,plugin:o})})),!1)},handleKeyDown(t,r){if("Enter"!==r.key)return!1;const{$cursor:i}=t.state.selection;return!!i&&fa({editor:e,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:o})}},isInputRules:!0});return o}function ga(t){return"number"===typeof t}class xa{constructor(t){this.find=t.find,this.handler=t.handler}}const Ma=(t,e,n)=>{if(da(e))return[...t.matchAll(e)];const o=e(t,n);return o?o.map((e=>{const n=[e.text];return n.index=e.index,n.input=t,n.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(e.replaceWith)),n})):[]};function ya(t){const{editor:e,state:n,from:o,to:r,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:a,chain:c,can:p}=new ql({editor:e,state:n}),d=[];n.doc.nodesBetween(o,r,((t,e)=>{if(!t.isTextblock||t.type.spec.code)return;const h=Math.max(o,e),u=Math.min(r,e+t.content.size),f=t.textBetween(h-e,u-e,void 0,""),m=Ma(f,i.find,s);m.forEach((t=>{if(void 0===t.index)return;const e=h+t.index+1,o=e+t[0].length,r={from:n.tr.mapping.map(e),to:n.tr.mapping.map(o)},u=i.handler({state:n,range:r,match:t,commands:a,chain:c,can:p,pasteEvent:s,dropEvent:l});d.push(u)}))}));const h=d.every((t=>null!==t));return h}const va=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(e=n.clipboardData)||void 0===e||e.setData("text/html",t),n};function wa(t){const{editor:e,rules:n}=t;let o=null,r=!1,i=!1,s="undefined"!==typeof ClipboardEvent?new ClipboardEvent("paste"):null,l="undefined"!==typeof DragEvent?new DragEvent("drop"):null;const a=({state:t,from:n,to:o,rule:r,pasteEvt:i})=>{const a=t.tr,c=_l({state:t,transaction:a}),p=ya({editor:e,state:c,from:Math.max(n-1,0),to:o.b-1,rule:r,pasteEvent:i,dropEvent:l});if(p&&a.steps.length)return l="undefined"!==typeof DragEvent?new DragEvent("drop"):null,s="undefined"!==typeof ClipboardEvent?new ClipboardEvent("paste"):null,a},c=n.map((t=>new wn({view(t){const e=e=>{var n;o=(null===(n=t.dom.parentElement)||void 0===n?void 0:n.contains(e.target))?t.dom.parentElement:null};return window.addEventListener("dragstart",e),{destroy(){window.removeEventListener("dragstart",e)}}},props:{handleDOMEvents:{drop:(t,e)=>(i=o===t.dom.parentElement,l=e,!1),paste:(t,e)=>{var n;const o=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/html");return s=e,r=!!(null===o||void 0===o?void 0:o.includes("data-pm-slice")),!1}}},appendTransaction:(e,n,o)=>{const l=e[0],c="paste"===l.getMeta("uiEvent")&&!r,p="drop"===l.getMeta("uiEvent")&&!i,d=l.getMeta("applyPasteRules"),h=!!d;if(!c&&!p&&!h)return;if(h){const{from:e,text:n}=d,r=e+n.length,i=va(n);return a({rule:t,state:o,from:e,to:{b:r},pasteEvt:i})}const u=n.doc.content.findDiffStart(o.doc.content),f=n.doc.content.findDiffEnd(o.doc.content);return ga(u)&&f&&u!==f.b?a({rule:t,state:o,from:u,to:f,pasteEvt:s}):void 0}})));return c}function ba(t){const e=t.filter(((e,n)=>t.indexOf(e)!==n));return[...new Set(e)]}class ka{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=ka.resolve(t),this.schema=la(this.extensions,e),this.setupExtensions()}static resolve(t){const e=ka.sort(ka.flatten(t)),n=ba(e.map((t=>t.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((t=>`'${t}'`)).join(", ")}]. This can lead to issues.`),e}static flatten(t){return t.map((t=>{const e={name:t.name,options:t.options,storage:t.storage},n=Jl(t,"addExtensions",e);return n?[t,...this.flatten(n())]:t})).flat(10)}static sort(t){const e=100;return t.sort(((t,n)=>{const o=Jl(t,"priority")||e,r=Jl(n,"priority")||e;return o>r?-1:o{const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:aa(e.name,this.schema)},o=Jl(e,"addCommands",n);return o?{...t,...o()}:t}),{})}get plugins(){const{editor:t}=this,e=ka.sort([...this.extensions].reverse()),n=[],o=[],r=e.map((e=>{const r={name:e.name,options:e.options,storage:e.storage,editor:t,type:aa(e.name,this.schema)},i=[],s=Jl(e,"addKeyboardShortcuts",r);let l={};if("mark"===e.type&&e.config.exitable&&(l.ArrowRight=()=>Bp.handleExit({editor:t,mark:e})),s){const e=Object.fromEntries(Object.entries(s()).map((([e,n])=>[e,()=>n({editor:t})])));l={...l,...e}}const a=el(l);i.push(a);const c=Jl(e,"addInputRules",r);ca(e,t.options.enableInputRules)&&c&&n.push(...c());const p=Jl(e,"addPasteRules",r);ca(e,t.options.enablePasteRules)&&p&&o.push(...p());const d=Jl(e,"addProseMirrorPlugins",r);if(d){const t=d();i.push(...t)}return i})).flat();return[ma({editor:t,rules:n}),...wa({editor:t,rules:o}),...r]}get attributes(){return Gl(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Xl(this.extensions);return Object.fromEntries(e.filter((t=>!!Jl(t,"addNodeView"))).map((e=>{const n=this.attributes.filter((t=>t.type===e.name)),o={name:e.name,options:e.options,storage:e.storage,editor:t,type:Yl(e.name,this.schema)},r=Jl(e,"addNodeView",o);if(!r)return[];const i=(o,i,s,l)=>{const a=ta(o,n);return r()({editor:t,node:o,getPos:s,decorations:l,HTMLAttributes:a,extension:e})};return[e.name,i]})))}setupExtensions(){this.extensions.forEach((t=>{var e;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:aa(t.name,this.schema)};if("mark"===t.type){const o=null===(e=na(Jl(t,"keepOnSplit",n)))||void 0===e||e;o&&this.splittableMarks.push(t.name)}const o=Jl(t,"onBeforeCreate",n),r=Jl(t,"onCreate",n),i=Jl(t,"onUpdate",n),s=Jl(t,"onSelectionUpdate",n),l=Jl(t,"onTransaction",n),a=Jl(t,"onFocus",n),c=Jl(t,"onBlur",n),p=Jl(t,"onDestroy",n);o&&this.editor.on("beforeCreate",o),r&&this.editor.on("create",r),i&&this.editor.on("update",i),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),a&&this.editor.on("focus",a),c&&this.editor.on("blur",c),p&&this.editor.on("destroy",p)}))}}function Wa(t){return Object.prototype.toString.call(t).slice(8,-1)}function Qa(t){return"Object"===Wa(t)&&(t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype)}function Ca(t,e){const n={...t};return Qa(t)&&Qa(e)&&Object.keys(e).forEach((o=>{Qa(e[o])?o in t?n[o]=Ca(t[o],e[o]):Object.assign(n,{[o]:e[o]}):Object.assign(n,{[o]:e[o]})})),n}class Sa{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=na(Jl(this,"addOptions",{name:this.name}))),this.storage=na(Jl(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Sa(t)}configure(t={}){const e=this.extend();return e.parent=this.parent,e.options=Ca(this.options,t),e.storage=na(Jl(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Sa({...this.config,...t});return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=na(Jl(e,"addOptions",{name:e.name})),e.storage=na(Jl(e,"addStorage",{name:e.name,options:e.options})),e}}function Oa(t,e,n){const{from:o,to:r}=e,{blockSeparator:i="\n\n",textSerializers:s={}}=n||{};let l="";return t.nodesBetween(o,r,((t,n,a,c)=>{var p;t.isBlock&&n>o&&(l+=i);const d=null===s||void 0===s?void 0:s[t.type.name];if(d)return a&&(l+=d({node:t,pos:n,parent:a,index:c,range:e})),!1;t.isText&&(l+=null===(p=null===t||void 0===t?void 0:t.text)||void 0===p?void 0:p.slice(Math.max(o,n)-n,r-n))})),l}function Ta(t){return Object.fromEntries(Object.entries(t.nodes).filter((([,t])=>t.spec.toText)).map((([t,e])=>[t,e.spec.toText])))}const Aa=Sa.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new wn({key:new Wn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:o,selection:r}=e,{ranges:i}=r,s=Math.min(...i.map((t=>t.$from.pos))),l=Math.max(...i.map((t=>t.$to.pos))),a=Ta(n),c={from:s,to:l};return Oa(o,c,{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),Ea=()=>({editor:t,view:e})=>(requestAnimationFrame((()=>{var n;t.isDestroyed||(e.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),La=(t=!1)=>({commands:e})=>e.setContent("",t),Na=()=>({state:t,tr:e,dispatch:n})=>{const{selection:o}=e,{ranges:r}=o;return!n||(r.forEach((({$from:n,$to:o})=>{t.doc.nodesBetween(n.pos,o.pos,((t,n)=>{if(t.type.isText)return;const{doc:o,mapping:r}=e,i=o.resolve(r.map(n)),s=o.resolve(r.map(n+t.nodeSize)),l=i.blockRange(s);if(!l)return;const a=he(l);if(t.type.isTextblock){const{defaultType:t}=i.parent.contentMatchAt(i.index());e.setNodeMarkup(l.start,t)}(a||0===a)&&e.lift(l,a)}))})),!0)},Da=t=>e=>t(e),Ra=()=>({state:t,dispatch:e})=>bl(t,e),Ia=(t,e)=>({editor:n,tr:o})=>{const{state:r}=n,i=r.doc.slice(t.from,t.to);o.deleteRange(t.from,t.to);const s=o.mapping.map(e);return o.insert(s,i.content),o.setSelection(new nn(o.doc.resolve(s-1))),!0},Pa=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,o=n.$anchor.node();if(o.content.size>0)return!1;const r=t.selection.$anchor;for(let i=r.depth;i>0;i-=1){const n=r.node(i);if(n.type===o.type){if(e){const e=r.before(i),n=r.after(i);t.delete(e,n).scrollIntoView()}return!0}}return!1},Ha=t=>({tr:e,state:n,dispatch:o})=>{const r=Yl(t,n.schema),i=e.selection.$anchor;for(let t=i.depth;t>0;t-=1){const n=i.node(t);if(n.type===r){if(o){const n=i.before(t),o=i.after(t);e.delete(n,o).scrollIntoView()}return!0}}return!1},$a=t=>({tr:e,dispatch:n})=>{const{from:o,to:r}=t;return n&&e.delete(o,r),!0},Ba=()=>({state:t,dispatch:e})=>ol(t,e),za=()=>({commands:t})=>t.keyboardShortcut("Enter"),Va=()=>({state:t,dispatch:e})=>wl(t,e);function Fa(t,e,n={strict:!0}){const o=Object.keys(e);return!o.length||o.every((o=>n.strict?e[o]===t[o]:da(e[o])?e[o].test(t[o]):e[o]===t[o]))}function ja(t,e,n={}){return t.find((t=>t.type===e&&Fa(t.attrs,n)))}function Ka(t,e,n={}){return!!ja(t,e,n)}function _a(t,e,n={}){if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if(t.parentOffset===o.offset&&0!==o.offset&&(o=t.parent.childBefore(t.parentOffset)),!o.node)return;const r=ja([...o.node.marks],e,n);if(!r)return;let i=o.index,s=t.start()+o.offset,l=i+1,a=s+o.node.nodeSize;ja([...o.node.marks],e,n);while(i>0&&r.isInSet(t.parent.child(i-1).marks))i-=1,s-=t.parent.child(i).nodeSize;while(l({tr:n,state:o,dispatch:r})=>{const i=qa(t,o.schema),{doc:s,selection:l}=n,{$from:a,from:c,to:p}=l;if(r){const t=_a(a,i,e);if(t&&t.from<=c&&t.to>=p){const e=nn.create(s,t.from,t.to);n.setSelection(e)}}return!0},Ja=t=>e=>{const n="function"===typeof t?t(e):t;for(let t=0;t({editor:n,view:o,tr:r,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{Za()&&o.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(o.focus(),(null===e||void 0===e?void 0:e.scrollIntoView)&&n.commands.scrollIntoView())}))};if(o.hasFocus()&&null===t||!1===t)return!0;if(i&&null===t&&!Xa(n.state.selection))return s(),!0;const l=Ya(r.doc,t)||n.state.selection,a=n.state.selection.eq(l);return i&&(a||r.setSelection(l),a&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},ec=(t,e)=>n=>t.every(((t,o)=>e(t,{...n,index:o}))),nc=(t,e)=>({tr:n,commands:o})=>o.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),oc=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const o=e[n];3===o.nodeType&&o.nodeValue&&/^(\n\s\s|\n)$/.test(o.nodeValue)?t.removeChild(o):1===o.nodeType&&oc(o)}return t};function rc(t){const e=`${t}`,n=(new window.DOMParser).parseFromString(e,"text/html").body;return oc(n)}function ic(t,e,n){n={slice:!0,parseOptions:{},...n};const o="object"===typeof t&&null!==t,r="string"===typeof t;if(o)try{const n=Array.isArray(t)&&t.length>0;return n?k.fromArray(t.map((t=>e.nodeFromJSON(t)))):e.nodeFromJSON(t)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),ic("",e,n)}if(r){const o=wt.fromSchema(e);return n.slice?o.parseSlice(rc(t),n.parseOptions).content:o.parse(rc(t),n.parseOptions)}return ic("",e,n)}function sc(t,e,n){const o=t.steps.length-1;if(o{0===s&&(s=o)})),t.setSelection(Ye.near(t.doc.resolve(s),n))}const lc=t=>t.toString().startsWith("<"),ac=(t,e,n)=>({tr:o,dispatch:r,editor:i})=>{if(r){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};const r=ic(e,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===r.toString())return!0;let{from:s,to:l}="number"===typeof t?{from:t,to:t}:{from:t.from,to:t.to},a=!0,c=!0;const p=lc(r)?r:[r];if(p.forEach((t=>{t.check(),a=!!a&&(t.isText&&0===t.marks.length),c=!!c&&t.isBlock})),s===l&&c){const{parent:t}=o.doc.resolve(s),e=t.isTextblock&&!t.type.spec.code&&!t.childCount;e&&(s-=1,l+=1)}let d;a?(d=Array.isArray(e)?e.map((t=>t.text||"")).join(""):"object"===typeof e&&e&&e.text?e.text:e,o.insertText(d,s,l)):(d=r,o.replaceWith(s,l,d)),n.updateSelection&&sc(o,o.steps.length-1,-1),n.applyInputRules&&o.setMeta("applyInputRules",{from:s,text:d}),n.applyPasteRules&&o.setMeta("applyPasteRules",{from:s,text:d})}return!0},cc=()=>({state:t,dispatch:e})=>gl(t,e),pc=()=>({state:t,dispatch:e})=>xl(t,e),dc=()=>({state:t,dispatch:e})=>il(t,e),hc=()=>({state:t,dispatch:e})=>ul(t,e),uc=()=>({tr:t,state:e,dispatch:n})=>{try{const o=Oe(e.doc,e.selection.$from.pos,-1);return null!==o&&void 0!==o&&(t.join(o,2),n&&n(t),!0)}catch{return!1}},fc=()=>({state:t,dispatch:e,tr:n})=>{try{const o=Oe(t.doc,t.selection.$from.pos,1);return null!==o&&void 0!==o&&(n.join(o,2),e&&e(n),!0)}catch(o){return!1}},mc=()=>({state:t,dispatch:e})=>sl(t,e),gc=()=>({state:t,dispatch:e})=>ll(t,e);function xc(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}function Mc(t){const e=t.split(/-(?!$)/);let n,o,r,i,s=e[e.length-1];"Space"===s&&(s=" ");for(let l=0;l({editor:e,view:n,tr:o,dispatch:r})=>{const i=Mc(t).split(/-(?!$)/),s=i.find((t=>!["Alt","Ctrl","Meta","Shift"].includes(t))),l=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction((()=>{n.someProp("handleKeyDown",(t=>t(n,l)))}));return null===a||void 0===a||a.steps.forEach((t=>{const e=t.map(o.mapping);e&&r&&o.maybeStep(e)})),!0};function vc(t,e,n={}){const{from:o,to:r,empty:i}=t.selection,s=e?Yl(e,t.schema):null,l=[];t.doc.nodesBetween(o,r,((t,e)=>{if(t.isText)return;const n=Math.max(o,e),i=Math.min(r,e+t.nodeSize);l.push({node:t,from:n,to:i})}));const a=r-o,c=l.filter((t=>!s||s.name===t.node.type.name)).filter((t=>Fa(t.node.attrs,n,{strict:!1})));if(i)return!!c.length;const p=c.reduce(((t,e)=>t+e.to-e.from),0);return p>=a}const wc=(t,e={})=>({state:n,dispatch:o})=>{const r=Yl(t,n.schema),i=vc(n,r,e);return!!i&&Ml(n,o)},bc=()=>({state:t,dispatch:e})=>kl(t,e),kc=t=>({state:e,dispatch:n})=>{const o=Yl(t,e.schema);return Vl(o)(e,n)},Wc=()=>({state:t,dispatch:e})=>yl(t,e);function Qc(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Cc(t,e){const n="string"===typeof e?[e]:e;return Object.keys(t).reduce(((e,o)=>(n.includes(o)||(e[o]=t[o]),e)),{})}const Sc=(t,e)=>({tr:n,state:o,dispatch:r})=>{let i=null,s=null;const l=Qc("string"===typeof t?t:t.name,o.schema);return!!l&&("node"===l&&(i=Yl(t,o.schema)),"mark"===l&&(s=qa(t,o.schema)),r&&n.selection.ranges.forEach((t=>{o.doc.nodesBetween(t.$from.pos,t.$to.pos,((t,o)=>{i&&i===t.type&&n.setNodeMarkup(o,void 0,Cc(t.attrs,e)),s&&t.marks.length&&t.marks.forEach((r=>{s===r.type&&n.addMark(o,o+t.nodeSize,s.create(Cc(r.attrs,e)))}))}))})),!0)},Oc=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),Tc=()=>({tr:t,commands:e})=>e.setTextSelection({from:0,to:t.doc.content.size}),Ac=()=>({state:t,dispatch:e})=>pl(t,e),Ec=()=>({state:t,dispatch:e})=>fl(t,e),Lc=()=>({state:t,dispatch:e})=>Cl(t,e),Nc=()=>({state:t,dispatch:e})=>Ll(t,e),Dc=()=>({state:t,dispatch:e})=>El(t,e);function Rc(t,e,n={}){return ic(t,e,{slice:!1,parseOptions:n})}const Ic=(t,e=!1,n={})=>({tr:o,editor:r,dispatch:i})=>{const{doc:s}=o,l=Rc(t,r.schema,n);return i&&o.replaceWith(0,s.content.size,l).setMeta("preventUpdate",!e),!0};function Pc(t,e){const n=qa(e,t.schema),{from:o,to:r,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(o,r,(t=>{s.push(...t.marks)}));const l=s.find((t=>t.type.name===n.name));return l?{...l.attrs}:{}}function Hc(t,e){const n=new Xe(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}function $c(t){for(let e=0;e{n(t)&&o.push({node:t,pos:e})})),o}function zc(t,e){for(let n=t.depth;n>0;n-=1){const o=t.node(n);if(e(o))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:o}}}function Vc(t){return e=>zc(e.$from,t)}function Fc(t,e){const n=It.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument(),r=o.createElement("div");return r.appendChild(n),r.innerHTML}function jc(t,e){const n={from:0,to:t.content.size};return Oa(t,n,e)}function Kc(t,e){const n=Yl(e,t.schema),{from:o,to:r}=t.selection,i=[];t.doc.nodesBetween(o,r,(t=>{i.push(t)}));const s=i.reverse().find((t=>t.type.name===n.name));return s?{...s.attrs}:{}}function _c(t,e){const n=Qc("string"===typeof e?e:e.name,t.schema);return"node"===n?Kc(t,e):"mark"===n?Pc(t,e):{}}function qc(t,e=JSON.stringify){const n={};return t.filter((t=>{const o=e(t);return!Object.prototype.hasOwnProperty.call(n,o)&&(n[o]=!0)}))}function Uc(t){const e=qc(t);return 1===e.length?e:e.filter(((t,n)=>{const o=e.filter(((t,e)=>e!==n));return!o.some((e=>t.oldRange.from>=e.oldRange.from&&t.oldRange.to<=e.oldRange.to&&t.newRange.from>=e.newRange.from&&t.newRange.to<=e.newRange.to))}))}function Jc(t){const{mapping:e,steps:n}=t,o=[];return e.maps.forEach(((t,r)=>{const i=[];if(t.ranges.length)t.forEach(((t,e)=>{i.push({from:t,to:e})}));else{const{from:t,to:e}=n[r];if(void 0===t||void 0===e)return;i.push({from:t,to:e})}i.forEach((({from:t,to:n})=>{const i=e.slice(r).map(t,-1),s=e.slice(r).map(n),l=e.invert().map(i,-1),a=e.invert().map(s);o.push({oldRange:{from:l,to:a},newRange:{from:i,to:s}})}))})),Uc(o)}function Xc(t,e,n){const o=[];return t===e?n.resolve(t).marks().forEach((e=>{const r=n.resolve(t-1),i=_a(r,e.type);i&&o.push({mark:e,...i})})):n.nodesBetween(t,e,((t,e)=>{t&&void 0!==(null===t||void 0===t?void 0:t.nodeSize)&&o.push(...t.marks.map((n=>({from:e,to:e+t.nodeSize,mark:n}))))})),o}function Gc(t,e,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const o=t.find((t=>t.type===e&&t.name===n));return!!o&&o.attribute.keepOnSplit})))}function Yc(t,e,n={}){const{empty:o,ranges:r}=t.selection,i=e?qa(e,t.schema):null;if(o)return!!(t.storedMarks||t.selection.$from.marks()).filter((t=>!i||i.name===t.type.name)).find((t=>Fa(t.attrs,n,{strict:!1})));let s=0;const l=[];if(r.forEach((({$from:e,$to:n})=>{const o=e.pos,r=n.pos;t.doc.nodesBetween(o,r,((t,e)=>{if(!t.isText&&!t.marks.length)return;const n=Math.max(o,e),i=Math.min(r,e+t.nodeSize),a=i-n;s+=a,l.push(...t.marks.map((t=>({mark:t,from:n,to:i}))))}))})),0===s)return!1;const a=l.filter((t=>!i||i.name===t.mark.type.name)).filter((t=>Fa(t.mark.attrs,n,{strict:!1}))).reduce(((t,e)=>t+e.to-e.from),0),c=l.filter((t=>!i||t.mark.type!==i&&t.mark.type.excludes(i))).reduce(((t,e)=>t+e.to-e.from),0),p=a>0?a+c:a;return p>=s}function Zc(t,e,n={}){if(!e)return vc(t,null,n)||Yc(t,null,n);const o=Qc(e,t.schema);return"node"===o?vc(t,e,n):"mark"===o&&Yc(t,e,n)}function tp(t,e){const{nodeExtensions:n}=Xl(e),o=n.find((e=>e.name===t));if(!o)return!1;const r={name:o.name,options:o.options,storage:o.storage},i=na(Jl(o,"group",r));return"string"===typeof i&&i.split(" ").includes("list")}function ep(t){var e;const n=null===(e=t.type.createAndFill())||void 0===e?void 0:e.toJSON(),o=t.toJSON();return JSON.stringify(n)===JSON.stringify(o)}function np(t){return t instanceof rn}function op(t,e,n){const o=0,r=t.state.doc.content.size,i=Ga(e,o,r),s=Ga(n,o,r),l=t.coordsAtPos(i),a=t.coordsAtPos(s,-1),c=Math.min(l.top,a.top),p=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),h=Math.max(l.right,a.right),u=h-d,f=p-c,m=d,g=c,x={top:c,bottom:p,left:d,right:h,width:u,height:f,x:m,y:g};return{...x,toJSON:()=>x}}function rp(t,e,n){var o;const{selection:r}=e;let i=null;if(Xa(r)&&(i=r.$cursor),i){const e=null!==(o=t.storedMarks)&&void 0!==o?o:i.marks();return!!n.isInSet(e)||!e.some((t=>t.type.excludes(n)))}const{ranges:s}=r;return s.some((({$from:e,$to:o})=>{let r=0===e.depth&&(t.doc.inlineContent&&t.doc.type.allowsMarkType(n));return t.doc.nodesBetween(e.pos,o.pos,((t,e,o)=>{if(r)return!1;if(t.isInline){const e=!o||o.type.allowsMarkType(n),i=!!n.isInSet(t.marks)||!t.marks.some((t=>t.type.excludes(n)));r=e&&i}return!r})),r}))}const ip=(t,e={})=>({tr:n,state:o,dispatch:r})=>{const{selection:i}=n,{empty:s,ranges:l}=i,a=qa(t,o.schema);if(r)if(s){const t=Pc(o,a);n.addStoredMark(a.create({...t,...e}))}else l.forEach((t=>{const r=t.$from.pos,i=t.$to.pos;o.doc.nodesBetween(r,i,((t,o)=>{const s=Math.max(o,r),l=Math.min(o+t.nodeSize,i),c=t.marks.find((t=>t.type===a));c?t.marks.forEach((t=>{a===t.type&&n.addMark(s,l,a.create({...t.attrs,...e}))})):n.addMark(s,l,a.create(e))}))}));return rp(o,n,a)},sp=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),lp=(t,e={})=>({state:n,dispatch:o,chain:r})=>{const i=Yl(t,n.schema);return i.isTextblock?r().command((({commands:t})=>{const o=Dl(i,e)(n);return!!o||t.clearNodes()})).command((({state:t})=>Dl(i,e)(t,o))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},ap=t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,o=Ga(t,0,n.content.size),r=rn.create(n,o);e.setSelection(r)}return!0},cp=t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:o,to:r}="number"===typeof t?{from:t,to:t}:t,i=nn.atStart(n).from,s=nn.atEnd(n).to,l=Ga(o,i,s),a=Ga(r,i,s),c=nn.create(n,l,a);e.setSelection(c)}return!0},pp=t=>({state:e,dispatch:n})=>{const o=Yl(t,e.schema);return Kl(o)(e,n)};function dp(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const o=n.filter((t=>null===e||void 0===e?void 0:e.includes(t.type.name)));t.tr.ensureMarks(o)}}const hp=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:o,editor:r})=>{const{selection:i,doc:s}=e,{$from:l,$to:a}=i,c=r.extensionManager.attributes,p=Gc(c,l.node().type.name,l.node().attrs);if(i instanceof rn&&i.node.isBlock)return!(!l.parentOffset||!We(s,l.pos))&&(o&&(t&&dp(n,r.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(o){const o=a.parentOffset===a.parent.content.size;i instanceof nn&&e.deleteSelection();const s=0===l.depth?void 0:$c(l.node(-1).contentMatchAt(l.indexAfter(-1)));let c=o&&s?[{type:s,attrs:p}]:void 0,d=We(e.doc,e.mapping.map(l.pos),1,c);if(c||d||!We(e.doc,e.mapping.map(l.pos),1,s?[{type:s}]:void 0)||(d=!0,c=s?[{type:s,attrs:p}]:void 0),d&&(e.split(e.mapping.map(l.pos),1,c),s&&!o&&!l.parentOffset&&l.parent.type!==s)){const t=e.mapping.map(l.before()),n=e.doc.resolve(t);l.node(-1).canReplaceWith(n.index(),n.index()+1,s)&&e.setNodeMarkup(e.mapping.map(l.before()),s)}t&&dp(n,r.extensionManager.splittableMarks),e.scrollIntoView()}return!0},up=t=>({tr:e,state:n,dispatch:o,editor:r})=>{var i;const s=Yl(t,n.schema),{$from:l,$to:a}=n.selection,c=n.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(a))return!1;const p=l.node(-1);if(p.type!==s)return!1;const d=r.extensionManager.attributes;if(0===l.parent.content.size&&l.node(-1).childCount===l.indexAfter(-1)){if(2===l.depth||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let t=k.empty;const n=l.index(-1)?1:l.index(-2)?2:3;for(let e=l.depth-n;e>=l.depth-3;e-=1)t=k.from(l.node(e).copy(t));const o=l.indexAfter(-1){if(p>-1)return!1;t.isTextblock&&0===t.content.size&&(p=e+1)})),p>-1&&e.setSelection(nn.near(e.doc.resolve(p))),e.scrollIntoView()}return!0}const h=a.pos===l.end()?p.contentMatchAt(0).defaultType:null,u=Gc(d,p.type.name,p.attrs),f=Gc(d,l.node().type.name,l.node().attrs);e.delete(l.pos,a.pos);const m=h?[{type:s,attrs:u},{type:h,attrs:f}]:[{type:s,attrs:u}];if(!We(e.doc,l.pos,2))return!1;if(o){const{selection:t,storedMarks:i}=n,{splittableMarks:s}=r.extensionManager,a=i||t.$to.parentOffset&&t.$from.marks();if(e.split(l.pos,2,m).scrollIntoView(),!a||!o)return!0;const c=a.filter((t=>s.includes(t.type.name)));e.ensureMarks(c)}return!0},fp=(t,e)=>{const n=Vc((t=>t.type===e))(t.selection);if(!n)return!0;const o=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===o)return!0;const r=t.doc.nodeAt(o),i=n.node.type===(null===r||void 0===r?void 0:r.type)&&Ce(t.doc,n.pos);return!i||(t.join(n.pos),!0)},mp=(t,e)=>{const n=Vc((t=>t.type===e))(t.selection);if(!n)return!0;const o=t.doc.resolve(n.start).after(n.depth);if(void 0===o)return!0;const r=t.doc.nodeAt(o),i=n.node.type===(null===r||void 0===r?void 0:r.type)&&Ce(t.doc,o);return!i||(t.join(o),!0)},gp=(t,e,n,o={})=>({editor:r,tr:i,state:s,dispatch:l,chain:a,commands:c,can:p})=>{const{extensions:d,splittableMarks:h}=r.extensionManager,u=Yl(t,s.schema),f=Yl(e,s.schema),{selection:m,storedMarks:g}=s,{$from:x,$to:M}=m,y=x.blockRange(M),v=g||m.$to.parentOffset&&m.$from.marks();if(!y)return!1;const w=Vc((t=>tp(t.type.name,d)))(m);if(y.depth>=1&&w&&y.depth-w.depth<=1){if(w.node.type===u)return c.liftListItem(f);if(tp(w.node.type.name,d)&&u.validContent(w.node.content)&&l)return a().command((()=>(i.setNodeMarkup(w.pos,u),!0))).command((()=>fp(i,u))).command((()=>mp(i,u))).run()}return n&&v&&l?a().command((()=>{const t=p().wrapInList(u,o),e=v.filter((t=>h.includes(t.type.name)));return i.ensureMarks(e),!!t||c.clearNodes()})).wrapInList(u,o).command((()=>fp(i,u))).command((()=>mp(i,u))).run():a().command((()=>{const t=p().wrapInList(u,o);return!!t||c.clearNodes()})).wrapInList(u,o).command((()=>fp(i,u))).command((()=>mp(i,u))).run()},xp=(t,e={},n={})=>({state:o,commands:r})=>{const{extendEmptyMarkRange:i=!1}=n,s=qa(t,o.schema),l=Yc(o,s,e);return l?r.unsetMark(s,{extendEmptyMarkRange:i}):r.setMark(s,e)},Mp=(t,e,n={})=>({state:o,commands:r})=>{const i=Yl(t,o.schema),s=Yl(e,o.schema),l=vc(o,i,n);return l?r.setNode(s):r.setNode(i,n)},yp=(t,e={})=>({state:n,commands:o})=>{const r=Yl(t,n.schema),i=vc(n,r,e);return i?o.lift(r):o.wrapIn(r,e)},vp=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let o=0;o=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(i.text){const n=e.doc.resolve(i.from).marks();e.replaceWith(i.from,i.to,t.schema.text(i.text,n))}else e.delete(i.from,i.to)}return!0}}return!1},wp=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:o,ranges:r}=n;return o||e&&r.forEach((e=>{t.removeMark(e.$from.pos,e.$to.pos)})),!0},bp=(t,e={})=>({tr:n,state:o,dispatch:r})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=n,a=qa(t,o.schema),{$from:c,empty:p,ranges:d}=l;if(!r)return!0;if(p&&s){let{from:t,to:e}=l;const o=null===(i=c.marks().find((t=>t.type===a)))||void 0===i?void 0:i.attrs,r=_a(c,a,o);r&&(t=r.from,e=r.to),n.removeMark(t,e,a)}else d.forEach((t=>{n.removeMark(t.$from.pos,t.$to.pos,a)}));return n.removeStoredMark(a),!0},kp=(t,e={})=>({tr:n,state:o,dispatch:r})=>{let i=null,s=null;const l=Qc("string"===typeof t?t:t.name,o.schema);return!!l&&("node"===l&&(i=Yl(t,o.schema)),"mark"===l&&(s=qa(t,o.schema)),r&&n.selection.ranges.forEach((t=>{const r=t.$from.pos,l=t.$to.pos;o.doc.nodesBetween(r,l,((t,o)=>{i&&i===t.type&&n.setNodeMarkup(o,void 0,{...t.attrs,...e}),s&&t.marks.length&&t.marks.forEach((i=>{if(s===i.type){const a=Math.max(o,r),c=Math.min(o+t.nodeSize,l);n.addMark(a,c,s.create({...i.attrs,...e}))}}))}))})),!0)},Wp=(t,e={})=>({state:n,dispatch:o})=>{const r=Yl(t,n.schema);return Nl(r,e)(n,o)},Qp=(t,e={})=>({state:n,dispatch:o})=>{const r=Yl(t,n.schema);return Bl(r,e)(n,o)};var Cp=Object.freeze({__proto__:null,blur:Ea,clearContent:La,clearNodes:Na,command:Da,createParagraphNear:Ra,cut:Ia,deleteCurrentNode:Pa,deleteNode:Ha,deleteRange:$a,deleteSelection:Ba,enter:za,exitCode:Va,extendMarkRange:Ua,first:Ja,focus:tc,forEach:ec,insertContent:nc,insertContentAt:ac,joinUp:cc,joinDown:pc,joinBackward:dc,joinForward:hc,joinItemBackward:uc,joinItemForward:fc,joinTextblockBackward:mc,joinTextblockForward:gc,keyboardShortcut:yc,lift:wc,liftEmptyBlock:bc,liftListItem:kc,newlineInCode:Wc,resetAttributes:Sc,scrollIntoView:Oc,selectAll:Tc,selectNodeBackward:Ac,selectNodeForward:Ec,selectParentNode:Lc,selectTextblockEnd:Nc,selectTextblockStart:Dc,setContent:Ic,setMark:ip,setMeta:sp,setNode:lp,setNodeSelection:ap,setTextSelection:cp,sinkListItem:pp,splitBlock:hp,splitListItem:up,toggleList:gp,toggleMark:xp,toggleNode:Mp,toggleWrap:yp,undoInputRule:vp,unsetAllMarks:wp,unsetMark:bp,updateAttributes:kp,wrapIn:Wp,wrapInList:Qp});const Sp=Sa.create({name:"commands",addCommands(){return{...Cp}}}),Op=Sa.create({name:"editable",addProseMirrorPlugins(){return[new wn({key:new Wn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Tp=Sa.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new wn({key:new Wn("focusEvents"),props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const o=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(o),!1},blur:(e,n)=>{t.isFocused=!1;const o=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(o),!1}}}})]}}),Ap=Sa.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first((({commands:t})=>[()=>t.undoInputRule(),()=>t.command((({tr:e})=>{const{selection:n,doc:o}=e,{empty:r,$anchor:i}=n,{pos:s,parent:l}=i,a=i.parent.isTextblock&&s>0?e.doc.resolve(s-1):i,c=a.parent.type.spec.isolating,p=i.pos-i.parentOffset,d=c&&1===a.parent.childCount?p===i.pos:Ye.atStart(o).from===s;return!(!r||!l.type.isTextblock||l.textContent.length||!d||d&&"paragraph"===i.parent.type.name)&&t.clearNodes()})),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()])),e=()=>this.editor.commands.first((({commands:t})=>[()=>t.deleteSelection(),()=>t.deleteCurrentNode(),()=>t.joinForward(),()=>t.selectNodeForward()])),n=()=>this.editor.commands.first((({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()])),o={Enter:n,"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},r={...o},i={...o,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Za()||xc()?i:r},addProseMirrorPlugins(){return[new wn({key:new Wn("clearDocument"),appendTransaction:(t,e,n)=>{const o=t.some((t=>t.docChanged))&&!e.doc.eq(n.doc);if(!o)return;const{empty:r,from:i,to:s}=e.selection,l=Ye.atStart(e.doc).from,a=Ye.atEnd(e.doc).to,c=i===l&&s===a;if(r||!c)return;const p=0===n.doc.textBetween(0,n.doc.content.size," "," ").length;if(!p)return;const d=n.tr,h=_l({state:n,transaction:d}),{commands:u}=new ql({editor:this.editor,state:h});return u.clearNodes(),d.steps.length?d:void 0}})]}}),Ep=Sa.create({name:"tabindex",addProseMirrorPlugins(){return[new wn({key:new Wn("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Lp{constructor(t,e,n=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=e,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return null!==(t=this.actualDepth)&&void 0!==t?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let e=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);e=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:e,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),e=this.resolvedPos.doc.resolve(t);return new Lp(e,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Lp(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Lp(t,this.editor)}get children(){const t=[];return this.node.content.forEach(((e,n)=>{const o=e.isBlock&&!e.isTextblock,r=this.pos+n+1,i=this.resolvedPos.doc.resolve(r);if(!o&&i.depth<=this.depth)return;const s=new Lp(i,this.editor,o,o?e:null);o&&(s.actualDepth=this.depth+1),t.push(new Lp(i,this.editor,o,o?e:null))})),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,e={}){let n=null,o=this.parent;while(o&&!n){if(o.node.type.name===t)if(Object.keys(e).length>0){const t=o.node.attrs,n=Object.keys(e);for(let o=0;o{if(!(n&&o.length>0)){if(i.node.type.name===t){const t=r.every((t=>e[t]===i.node.attrs[t]));t&&o.push(i)}n&&o.length>0||(o=o.concat(i.querySelectorAll(t,e,n)))}})),o}setAttribute(t){const e=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,t).setTextSelection(e.from).run()}}const Np='.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}';function Dp(t,e,n){const o=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(null!==o)return o;const r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.setAttribute("data-tiptap-style"+(n?`-${n}`:""),""),r.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(r),r}class Rp extends Ul{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=Dp(Np,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const n=ea(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],o=this.state.reconfigure({plugins:n});this.view.updateState(o)}unregisterPlugin(t){if(this.isDestroyed)return;const e="string"===typeof t?`${t}$`:t.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((t=>!t.key.startsWith(e)))});this.view.updateState(n)}createExtensionManager(){var t,e;const n=this.options.enableCoreExtensions?[Op,Aa.configure({blockSeparator:null===(e=null===(t=this.options.coreExtensionOptions)||void 0===t?void 0:t.clipboardTextSerializer)||void 0===e?void 0:e.blockSeparator}),Sp,Tp,Ap,Ep]:[],o=[...n,...this.options.extensions].filter((t=>["extension","node","mark"].includes(null===t||void 0===t?void 0:t.type)));this.extensionManager=new ka(o,this)}createCommandManager(){this.commandManager=new ql({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=Rc(this.options.content,this.schema,this.options.parseOptions),e=Ya(t,this.options.autofocus);this.view=new Is(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:yn.create({doc:t,selection:e||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e;return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)})):void(this.capturedTransaction=t);const e=this.state.apply(t),n=!this.state.selection.eq(e.selection);this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=t.getMeta("focus"),r=t.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:t}),r&&this.emit("blur",{editor:this,event:r.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return _c(this.state,t)}isActive(t,e){const n="string"===typeof t?t:null,o="string"===typeof t?e:t;return Zc(this.state,n,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Fc(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return jc(this.state.doc,{blockSeparator:e,textSerializers:{...Ta(this.schema),...n}})}get isEmpty(){return ep(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(null===(t=this.view)||void 0===t?void 0:t.docView)}$node(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new Lp(e,this)}get $doc(){return this.$pos(0)}}function Ip(t){return new ha({find:t.find,handler:({state:e,range:n,match:o})=>{const r=na(t.getAttributes,void 0,o);if(!1===r||null===r)return null;const{tr:i}=e,s=o[o.length-1],l=o[0];if(s){const o=l.search(/\S/),a=n.from+l.indexOf(s),c=a+s.length,p=Xc(n.from,n.to,e.doc).filter((e=>{const n=e.mark.type.excluded;return n.find((n=>n===t.type&&n!==e.mark.type))})).filter((t=>t.to>a));if(p.length)return null;cn.from&&i.delete(n.from+o,a);const d=n.from+o+s.length;i.addMark(n.from+o,d,t.type.create(r||{})),i.removeStoredMark(t.type)}}})}function Pp(t){return new ha({find:t.find,handler:({state:e,range:n,match:o})=>{const r=na(t.getAttributes,void 0,o)||{},{tr:i}=e,s=n.from;let l=n.to;const a=t.type.create(r);if(o[1]){const t=o[0].lastIndexOf(o[1]);let e=s+t;e>l?e=l:l=e+o[1].length;const n=o[0][o[0].length-1];i.insertText(n,s+o[0].length-1),i.replaceWith(e,l,a)}else o[0]&&i.insert(s-1,t.type.create(r)).delete(i.mapping.map(s),i.mapping.map(l));i.scrollIntoView()}})}function Hp(t){return new ha({find:t.find,handler:({state:e,range:n,match:o})=>{const r=e.doc.resolve(n.from),i=na(t.getAttributes,void 0,o)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function $p(t){return new ha({find:t.find,handler:({state:e,range:n,match:o,chain:r})=>{const i=na(t.getAttributes,void 0,o)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from),a=l.blockRange(),c=a&&fe(a,t.type,i);if(!c)return null;if(s.wrap(a,c),t.keepMarks&&t.editor){const{selection:n,storedMarks:o}=e,{splittableMarks:r}=t.editor.extensionManager,i=o||n.$to.parentOffset&&n.$from.marks();if(i){const t=i.filter((t=>r.includes(t.type.name)));s.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";r().updateAttributes(e,i).run()}const p=s.doc.resolve(n.from-1).nodeBefore;p&&p.type===t.type&&Ce(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(o,p))&&s.join(n.from-1)}})}class Bp{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=na(Jl(this,"addOptions",{name:this.name}))),this.storage=na(Jl(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Bp(t)}configure(t={}){const e=this.extend();return e.options=Ca(this.options,t),e.storage=na(Jl(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Bp({...this.config,...t});return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=na(Jl(e,"addOptions",{name:e.name})),e.storage=na(Jl(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:n}=t.state,o=t.state.selection.$from,r=o.pos===o.end();if(r){const r=o.marks(),i=!!r.find((t=>(null===t||void 0===t?void 0:t.type.name)===e.name));if(!i)return!1;const s=r.find((t=>(null===t||void 0===t?void 0:t.type.name)===e.name));return s&&n.removeStoredMark(s),n.insertText(" ",o.pos),t.view.dispatch(n),!0}return!1}}class zp{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=na(Jl(this,"addOptions",{name:this.name}))),this.storage=na(Jl(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new zp(t)}configure(t={}){const e=this.extend();return e.options=Ca(this.options,t),e.storage=na(Jl(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new zp({...this.config,...t});return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=na(Jl(e,"addOptions",{name:e.name})),e.storage=na(Jl(e,"addStorage",{name:e.name,options:e.options})),e}}function Vp(t){return new xa({find:t.find,handler:({state:e,range:n,match:o,pasteEvent:r})=>{const i=na(t.getAttributes,void 0,o,r);if(!1===i||null===i)return null;const{tr:s}=e,l=o[o.length-1],a=o[0];let c=n.to;if(l){const o=a.search(/\S/),r=n.from+a.indexOf(l),p=r+l.length,d=Xc(n.from,n.to,e.doc).filter((e=>{const n=e.mark.type.excluded;return n.find((n=>n===t.type&&n!==e.mark.type))})).filter((t=>t.to>r));if(d.length)return null;pn.from&&s.delete(n.from+o,r),c=n.from+o+l.length,s.addMark(n.from+o,c,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function Fp(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function jp(t){var e=Fp(t).Element;return t instanceof e||t instanceof Element}function Kp(t){var e=Fp(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function _p(t){if("undefined"===typeof ShadowRoot)return!1;var e=Fp(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}var qp=Math.max,Up=Math.min,Jp=Math.round;function Xp(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function Gp(){return!/^((?!chrome|android).)*safari/i.test(Xp())}function Yp(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var o=t.getBoundingClientRect(),r=1,i=1;e&&Kp(t)&&(r=t.offsetWidth>0&&Jp(o.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Jp(o.height)/t.offsetHeight||1);var s=jp(t)?Fp(t):window,l=s.visualViewport,a=!Gp()&&n,c=(o.left+(a&&l?l.offsetLeft:0))/r,p=(o.top+(a&&l?l.offsetTop:0))/i,d=o.width/r,h=o.height/i;return{width:d,height:h,top:p,right:c+d,bottom:p+h,left:c,x:c,y:p}}function Zp(t){var e=Fp(t),n=e.pageXOffset,o=e.pageYOffset;return{scrollLeft:n,scrollTop:o}}function td(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function ed(t){return t!==Fp(t)&&Kp(t)?td(t):Zp(t)}function nd(t){return t?(t.nodeName||"").toLowerCase():null}function od(t){return((jp(t)?t.ownerDocument:t.document)||window.document).documentElement}function rd(t){return Yp(od(t)).left+Zp(t).scrollLeft}function id(t){return Fp(t).getComputedStyle(t)}function sd(t){var e=id(t),n=e.overflow,o=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function ld(t){var e=t.getBoundingClientRect(),n=Jp(e.width)/t.offsetWidth||1,o=Jp(e.height)/t.offsetHeight||1;return 1!==n||1!==o}function ad(t,e,n){void 0===n&&(n=!1);var o=Kp(e),r=Kp(e)&&ld(e),i=od(e),s=Yp(t,r,n),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!n)&&(("body"!==nd(e)||sd(i))&&(l=ed(e)),Kp(e)?(a=Yp(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=rd(i))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function cd(t){var e=Yp(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function pd(t){return"html"===nd(t)?t:t.assignedSlot||t.parentNode||(_p(t)?t.host:null)||od(t)}function dd(t){return["html","body","#document"].indexOf(nd(t))>=0?t.ownerDocument.body:Kp(t)&&sd(t)?t:dd(pd(t))}function hd(t,e){var n;void 0===e&&(e=[]);var o=dd(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=Fp(o),s=r?[i].concat(i.visualViewport||[],sd(o)?o:[]):o,l=e.concat(s);return r?l:l.concat(hd(pd(s)))}function ud(t){return["table","td","th"].indexOf(nd(t))>=0}function fd(t){return Kp(t)&&"fixed"!==id(t).position?t.offsetParent:null}function md(t){var e=/firefox/i.test(Xp()),n=/Trident/i.test(Xp());if(n&&Kp(t)){var o=id(t);if("fixed"===o.position)return null}var r=pd(t);_p(r)&&(r=r.host);while(Kp(r)&&["html","body"].indexOf(nd(r))<0){var i=id(r);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return r;r=r.parentNode}return null}function gd(t){var e=Fp(t),n=fd(t);while(n&&ud(n)&&"static"===id(n).position)n=fd(n);return n&&("html"===nd(n)||"body"===nd(n)&&"static"===id(n).position)?e:n||md(t)||e}var xd="top",Md="bottom",yd="right",vd="left",wd="auto",bd=[xd,Md,yd,vd],kd="start",Wd="end",Qd="clippingParents",Cd="viewport",Sd="popper",Od="reference",Td=bd.reduce((function(t,e){return t.concat([e+"-"+kd,e+"-"+Wd])}),[]),Ad=[].concat(bd,[wd]).reduce((function(t,e){return t.concat([e,e+"-"+kd,e+"-"+Wd])}),[]),Ed="beforeRead",Ld="read",Nd="afterRead",Dd="beforeMain",Rd="main",Id="afterMain",Pd="beforeWrite",Hd="write",$d="afterWrite",Bd=[Ed,Ld,Nd,Dd,Rd,Id,Pd,Hd,$d];function zd(t){var e=new Map,n=new Set,o=[];function r(t){n.add(t.name);var i=[].concat(t.requires||[],t.requiresIfExists||[]);i.forEach((function(t){if(!n.has(t)){var o=e.get(t);o&&r(o)}})),o.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||r(t)})),o}function Vd(t){var e=zd(t);return Bd.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}function Fd(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function jd(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var Kd={placement:"bottom",modifiers:[],strategy:"absolute"};function _d(){for(var t=arguments.length,e=new Array(t),n=0;n=0?"x":"y"}function th(t){var e,n=t.reference,o=t.element,r=t.placement,i=r?Gd(r):null,s=r?Yd(r):null,l=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2;switch(i){case xd:e={x:l,y:n.y-o.height};break;case Md:e={x:l,y:n.y+n.height};break;case yd:e={x:n.x+n.width,y:a};break;case vd:e={x:n.x-o.width,y:a};break;default:e={x:n.x,y:n.y}}var c=i?Zd(i):null;if(null!=c){var p="y"===c?"height":"width";switch(s){case kd:e[c]=e[c]-(n[p]/2-o[p]/2);break;case Wd:e[c]=e[c]+(n[p]/2-o[p]/2);break;default:}}return e}function eh(t){var e=t.state,n=t.name;e.modifiersData[n]=th({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var nh={name:"popperOffsets",enabled:!0,phase:"read",fn:eh,data:{}},oh={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rh(t,e){var n=t.x,o=t.y,r=e.devicePixelRatio||1;return{x:Jp(n*r)/r||0,y:Jp(o*r)/r||0}}function ih(t){var e,n=t.popper,o=t.popperRect,r=t.placement,i=t.variation,s=t.offsets,l=t.position,a=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,d=t.isFixed,h=s.x,u=void 0===h?0:h,f=s.y,m=void 0===f?0:f,g="function"===typeof p?p({x:u,y:m}):{x:u,y:m};u=g.x,m=g.y;var x=s.hasOwnProperty("x"),M=s.hasOwnProperty("y"),y=vd,v=xd,w=window;if(c){var b=gd(n),k="clientHeight",W="clientWidth";if(b===Fp(n)&&(b=od(n),"static"!==id(b).position&&"absolute"===l&&(k="scrollHeight",W="scrollWidth")),r===xd||(r===vd||r===yd)&&i===Wd){v=Md;var Q=d&&b===w&&w.visualViewport?w.visualViewport.height:b[k];m-=Q-o.height,m*=a?1:-1}if(r===vd||(r===xd||r===Md)&&i===Wd){y=yd;var C=d&&b===w&&w.visualViewport?w.visualViewport.width:b[W];u-=C-o.width,u*=a?1:-1}}var S,O=Object.assign({position:l},c&&oh),T=!0===p?rh({x:u,y:m},Fp(n)):{x:u,y:m};return u=T.x,m=T.y,a?Object.assign({},O,(S={},S[v]=M?"0":"",S[y]=x?"0":"",S.transform=(w.devicePixelRatio||1)<=1?"translate("+u+"px, "+m+"px)":"translate3d("+u+"px, "+m+"px, 0)",S)):Object.assign({},O,(e={},e[v]=M?m+"px":"",e[y]=x?u+"px":"",e.transform="",e))}function sh(t){var e=t.state,n=t.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,s=void 0===i||i,l=n.roundOffsets,a=void 0===l||l,c={placement:Gd(e.placement),variation:Yd(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,ih(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,ih(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var lh={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:sh,data:{}};function ah(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},r=e.elements[t];Kp(r)&&nd(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(t){var e=o[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))}function ch(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var o=e.elements[t],r=e.attributes[t]||{},i=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]),s=i.reduce((function(t,e){return t[e]="",t}),{});Kp(o)&&nd(o)&&(Object.assign(o.style,s),Object.keys(r).forEach((function(t){o.removeAttribute(t)})))}))}}var ph={name:"applyStyles",enabled:!0,phase:"write",fn:ah,effect:ch,requires:["computeStyles"]};function dh(t,e,n){var o=Gd(t),r=[vd,xd].indexOf(o)>=0?-1:1,i="function"===typeof n?n(Object.assign({},e,{placement:t})):n,s=i[0],l=i[1];return s=s||0,l=(l||0)*r,[vd,yd].indexOf(o)>=0?{x:l,y:s}:{x:s,y:l}}function hh(t){var e=t.state,n=t.options,o=t.name,r=n.offset,i=void 0===r?[0,0]:r,s=Ad.reduce((function(t,n){return t[n]=dh(n,e.rects,i),t}),{}),l=s[e.placement],a=l.x,c=l.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=c),e.modifiersData[o]=s}var uh={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hh},fh={left:"right",right:"left",bottom:"top",top:"bottom"};function mh(t){return t.replace(/left|right|bottom|top/g,(function(t){return fh[t]}))}var gh={start:"end",end:"start"};function xh(t){return t.replace(/start|end/g,(function(t){return gh[t]}))}function Mh(t,e){var n=Fp(t),o=od(t),r=n.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,a=0;if(r){i=r.width,s=r.height;var c=Gp();(c||!c&&"fixed"===e)&&(l=r.offsetLeft,a=r.offsetTop)}return{width:i,height:s,x:l+rd(t),y:a}}function yh(t){var e,n=od(t),o=Zp(t),r=null==(e=t.ownerDocument)?void 0:e.body,i=qp(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=qp(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+rd(t),a=-o.scrollTop;return"rtl"===id(r||n).direction&&(l+=qp(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:l,y:a}}function vh(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&_p(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function wh(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function bh(t,e){var n=Yp(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function kh(t,e,n){return e===Cd?wh(Mh(t,n)):jp(e)?bh(e,n):wh(yh(od(t)))}function Wh(t){var e=hd(pd(t)),n=["absolute","fixed"].indexOf(id(t).position)>=0,o=n&&Kp(t)?gd(t):t;return jp(o)?e.filter((function(t){return jp(t)&&vh(t,o)&&"body"!==nd(t)})):[]}function Qh(t,e,n,o){var r="clippingParents"===e?Wh(t):[].concat(e),i=[].concat(r,[n]),s=i[0],l=i.reduce((function(e,n){var r=kh(t,n,o);return e.top=qp(r.top,e.top),e.right=Up(r.right,e.right),e.bottom=Up(r.bottom,e.bottom),e.left=qp(r.left,e.left),e}),kh(t,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Ch(){return{top:0,right:0,bottom:0,left:0}}function Sh(t){return Object.assign({},Ch(),t)}function Oh(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function Th(t,e){void 0===e&&(e={});var n=e,o=n.placement,r=void 0===o?t.placement:o,i=n.strategy,s=void 0===i?t.strategy:i,l=n.boundary,a=void 0===l?Qd:l,c=n.rootBoundary,p=void 0===c?Cd:c,d=n.elementContext,h=void 0===d?Sd:d,u=n.altBoundary,f=void 0!==u&&u,m=n.padding,g=void 0===m?0:m,x=Sh("number"!==typeof g?g:Oh(g,bd)),M=h===Sd?Od:Sd,y=t.rects.popper,v=t.elements[f?M:h],w=Qh(jp(v)?v:v.contextElement||od(t.elements.popper),a,p,s),b=Yp(t.elements.reference),k=th({reference:b,element:y,strategy:"absolute",placement:r}),W=wh(Object.assign({},y,k)),Q=h===Sd?W:b,C={top:w.top-Q.top+x.top,bottom:Q.bottom-w.bottom+x.bottom,left:w.left-Q.left+x.left,right:Q.right-w.right+x.right},S=t.modifiersData.offset;if(h===Sd&&S){var O=S[r];Object.keys(C).forEach((function(t){var e=[yd,Md].indexOf(t)>=0?1:-1,n=[xd,Md].indexOf(t)>=0?"y":"x";C[t]+=O[n]*e}))}return C}function Ah(t,e){void 0===e&&(e={});var n=e,o=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,c=void 0===a?Ad:a,p=Yd(o),d=p?l?Td:Td.filter((function(t){return Yd(t)===p})):bd,h=d.filter((function(t){return c.indexOf(t)>=0}));0===h.length&&(h=d);var u=h.reduce((function(e,n){return e[n]=Th(t,{placement:n,boundary:r,rootBoundary:i,padding:s})[Gd(n)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}function Eh(t){if(Gd(t)===wd)return[];var e=mh(t);return[xh(t),e,xh(e)]}function Lh(t){var e=t.state,n=t.options,o=t.name;if(!e.modifiersData[o]._skip){for(var r=n.mainAxis,i=void 0===r||r,s=n.altAxis,l=void 0===s||s,a=n.fallbackPlacements,c=n.padding,p=n.boundary,d=n.rootBoundary,h=n.altBoundary,u=n.flipVariations,f=void 0===u||u,m=n.allowedAutoPlacements,g=e.options.placement,x=Gd(g),M=x===g,y=a||(M||!f?[mh(g)]:Eh(g)),v=[g].concat(y).reduce((function(t,n){return t.concat(Gd(n)===wd?Ah(e,{placement:n,boundary:p,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),w=e.rects.reference,b=e.rects.popper,k=new Map,W=!0,Q=v[0],C=0;C=0,E=A?"width":"height",L=Th(e,{placement:S,boundary:p,rootBoundary:d,altBoundary:h,padding:c}),N=A?T?yd:vd:T?Md:xd;w[E]>b[E]&&(N=mh(N));var D=mh(N),R=[];if(i&&R.push(L[O]<=0),l&&R.push(L[N]<=0,L[D]<=0),R.every((function(t){return t}))){Q=S,W=!1;break}k.set(S,R)}if(W)for(var I=f?3:1,P=function(t){var e=v.find((function(e){var n=k.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return Q=e,"break"},H=I;H>0;H--){var $=P(H);if("break"===$)break}e.placement!==Q&&(e.modifiersData[o]._skip=!0,e.placement=Q,e.reset=!0)}}var Nh={name:"flip",enabled:!0,phase:"main",fn:Lh,requiresIfExists:["offset"],data:{_skip:!1}};function Dh(t){return"x"===t?"y":"x"}function Rh(t,e,n){return qp(t,Up(e,n))}function Ih(t,e,n){var o=Rh(t,e,n);return o>n?n:o}function Ph(t){var e=t.state,n=t.options,o=t.name,r=n.mainAxis,i=void 0===r||r,s=n.altAxis,l=void 0!==s&&s,a=n.boundary,c=n.rootBoundary,p=n.altBoundary,d=n.padding,h=n.tether,u=void 0===h||h,f=n.tetherOffset,m=void 0===f?0:f,g=Th(e,{boundary:a,rootBoundary:c,padding:d,altBoundary:p}),x=Gd(e.placement),M=Yd(e.placement),y=!M,v=Zd(x),w=Dh(v),b=e.modifiersData.popperOffsets,k=e.rects.reference,W=e.rects.popper,Q="function"===typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,C="number"===typeof Q?{mainAxis:Q,altAxis:Q}:Object.assign({mainAxis:0,altAxis:0},Q),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,O={x:0,y:0};if(b){if(i){var T,A="y"===v?xd:vd,E="y"===v?Md:yd,L="y"===v?"height":"width",N=b[v],D=N+g[A],R=N-g[E],I=u?-W[L]/2:0,P=M===kd?k[L]:W[L],H=M===kd?-W[L]:-k[L],$=e.elements.arrow,B=u&&$?cd($):{width:0,height:0},z=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ch(),V=z[A],F=z[E],j=Rh(0,k[L],B[L]),K=y?k[L]/2-I-j-V-C.mainAxis:P-j-V-C.mainAxis,_=y?-k[L]/2+I+j+F+C.mainAxis:H+j+F+C.mainAxis,q=e.elements.arrow&&gd(e.elements.arrow),U=q?"y"===v?q.clientTop||0:q.clientLeft||0:0,J=null!=(T=null==S?void 0:S[v])?T:0,X=N+K-J-U,G=N+_-J,Y=Rh(u?Up(D,X):D,N,u?qp(R,G):R);b[v]=Y,O[v]=Y-N}if(l){var Z,tt="x"===v?xd:vd,et="x"===v?Md:yd,nt=b[w],ot="y"===w?"height":"width",rt=nt+g[tt],it=nt-g[et],st=-1!==[xd,vd].indexOf(x),lt=null!=(Z=null==S?void 0:S[w])?Z:0,at=st?rt:nt-k[ot]-W[ot]-lt+C.altAxis,ct=st?nt+k[ot]+W[ot]-lt-C.altAxis:it,pt=u&&st?Ih(at,nt,ct):Rh(u?at:rt,nt,u?ct:it);b[w]=pt,O[w]=pt-nt}e.modifiersData[o]=O}}var Hh={name:"preventOverflow",enabled:!0,phase:"main",fn:Ph,requiresIfExists:["offset"]},$h=function(t,e){return t="function"===typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t,Sh("number"!==typeof t?t:Oh(t,bd))};function Bh(t){var e,n=t.state,o=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,l=Gd(n.placement),a=Zd(l),c=[vd,yd].indexOf(l)>=0,p=c?"height":"width";if(i&&s){var d=$h(r.padding,n),h=cd(i),u="y"===a?xd:vd,f="y"===a?Md:yd,m=n.rects.reference[p]+n.rects.reference[a]-s[a]-n.rects.popper[p],g=s[a]-n.rects.reference[a],x=gd(i),M=x?"y"===a?x.clientHeight||0:x.clientWidth||0:0,y=m/2-g/2,v=d[u],w=M-h[p]-d[f],b=M/2-h[p]/2+y,k=Rh(v,b,w),W=a;n.modifiersData[o]=(e={},e[W]=k,e.centerOffset=k-b,e)}}function zh(t){var e=t.state,n=t.options,o=n.element,r=void 0===o?"[data-popper-arrow]":o;null!=r&&("string"!==typeof r||(r=e.elements.popper.querySelector(r),r))&&vh(e.elements.popper,r)&&(e.elements.arrow=r)}var Vh={name:"arrow",enabled:!0,phase:"main",fn:Bh,effect:zh,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fh(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function jh(t){return[xd,yd,Md,vd].some((function(e){return t[e]>=0}))}function Kh(t){var e=t.state,n=t.name,o=e.rects.reference,r=e.rects.popper,i=e.modifiersData.preventOverflow,s=Th(e,{elementContext:"reference"}),l=Th(e,{altBoundary:!0}),a=Fh(s,o),c=Fh(l,r,i),p=jh(a),d=jh(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":d})}var _h={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Kh},qh=[Xd,nh,lh,ph,uh,Nh,Hh,Vh,_h],Uh=qd({defaultModifiers:qh}),Jh="tippy-box",Xh="tippy-content",Gh="tippy-backdrop",Yh="tippy-arrow",Zh="tippy-svg-arrow",tu={passive:!0,capture:!0},eu=function(){return document.body};function nu(t,e,n){if(Array.isArray(t)){var o=t[e];return null==o?Array.isArray(n)?n[e]:n:o}return t}function ou(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function ru(t,e){return"function"===typeof t?t.apply(void 0,e):t}function iu(t,e){return 0===e?t:function(o){clearTimeout(n),n=setTimeout((function(){t(o)}),e)};var n}function su(t){return t.split(/\s+/).filter(Boolean)}function lu(t){return[].concat(t)}function au(t,e){-1===t.indexOf(e)&&t.push(e)}function cu(t){return t.filter((function(e,n){return t.indexOf(e)===n}))}function pu(t){return t.split("-")[0]}function du(t){return[].slice.call(t)}function hu(t){return Object.keys(t).reduce((function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e}),{})}function uu(){return document.createElement("div")}function fu(t){return["Element","Fragment"].some((function(e){return ou(t,e)}))}function mu(t){return ou(t,"NodeList")}function gu(t){return ou(t,"MouseEvent")}function xu(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Mu(t){return fu(t)?[t]:mu(t)?du(t):Array.isArray(t)?t:du(document.querySelectorAll(t))}function yu(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function vu(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function wu(t){var e,n=lu(t),o=n[0];return null!=o&&null!=(e=o.ownerDocument)&&e.body?o.ownerDocument:document}function bu(t,e){var n=e.clientX,o=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,i=t.props,s=i.interactiveBorder,l=pu(r.placement),a=r.modifiersData.offset;if(!a)return!0;var c="bottom"===l?a.top.y:0,p="top"===l?a.bottom.y:0,d="right"===l?a.left.x:0,h="left"===l?a.right.x:0,u=e.top-o+c>s,f=o-e.bottom-p>s,m=e.left-n+d>s,g=n-e.right-h>s;return u||f||m||g}))}function ku(t,e,n){var o=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[o](e,n)}))}function Wu(t,e){var n=e;while(n){var o;if(t.contains(n))return!0;n=null==n.getRootNode||null==(o=n.getRootNode())?void 0:o.host}return!1}var Qu={isTouch:!1},Cu=0;function Su(){Qu.isTouch||(Qu.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ou))}function Ou(){var t=performance.now();t-Cu<20&&(Qu.isTouch=!1,document.removeEventListener("mousemove",Ou)),Cu=t}function Tu(){var t=document.activeElement;if(xu(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Au(){document.addEventListener("touchstart",Su,tu),window.addEventListener("blur",Tu)}var Eu="undefined"!==typeof window&&"undefined"!==typeof document,Lu=!!Eu&&!!window.msCrypto;var Nu={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Du={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ru=Object.assign({appendTo:eu,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Nu,Du),Iu=Object.keys(Ru),Pu=function(t){var e=Object.keys(t);e.forEach((function(e){Ru[e]=t[e]}))};function Hu(t){var e=t.plugins||[],n=e.reduce((function(e,n){var o,r=n.name,i=n.defaultValue;r&&(e[r]=void 0!==t[r]?t[r]:null!=(o=Ru[r])?o:i);return e}),{});return Object.assign({},t,n)}function $u(t,e){var n=e?Object.keys(Hu(Object.assign({},Ru,{plugins:e}))):Iu,o=n.reduce((function(e,n){var o=(t.getAttribute("data-tippy-"+n)||"").trim();if(!o)return e;if("content"===n)e[n]=o;else try{e[n]=JSON.parse(o)}catch(r){e[n]=o}return e}),{});return o}function Bu(t,e){var n=Object.assign({},e,{content:ru(e.content,[t])},e.ignoreAttributes?{}:$u(t,e.plugins));return n.aria=Object.assign({},Ru.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}var zu=function(){return"innerHTML"};function Vu(t,e){t[zu()]=e}function Fu(t){var e=uu();return!0===t?e.className=Yh:(e.className=Zh,fu(t)?e.appendChild(t):Vu(e,t)),e}function ju(t,e){fu(e.content)?(Vu(t,""),t.appendChild(e.content)):"function"!==typeof e.content&&(e.allowHTML?Vu(t,e.content):t.textContent=e.content)}function Ku(t){var e=t.firstElementChild,n=du(e.children);return{box:e,content:n.find((function(t){return t.classList.contains(Xh)})),arrow:n.find((function(t){return t.classList.contains(Yh)||t.classList.contains(Zh)})),backdrop:n.find((function(t){return t.classList.contains(Gh)}))}}function _u(t){var e=uu(),n=uu();n.className=Jh,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var o=uu();function r(n,o){var r=Ku(e),i=r.box,s=r.content,l=r.arrow;o.theme?i.setAttribute("data-theme",o.theme):i.removeAttribute("data-theme"),"string"===typeof o.animation?i.setAttribute("data-animation",o.animation):i.removeAttribute("data-animation"),o.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"===typeof o.maxWidth?o.maxWidth+"px":o.maxWidth,o.role?i.setAttribute("role",o.role):i.removeAttribute("role"),n.content===o.content&&n.allowHTML===o.allowHTML||ju(s,t.props),o.arrow?l?n.arrow!==o.arrow&&(i.removeChild(l),i.appendChild(Fu(o.arrow))):i.appendChild(Fu(o.arrow)):l&&i.removeChild(l)}return o.className=Xh,o.setAttribute("data-state","hidden"),ju(o,t.props),e.appendChild(n),n.appendChild(o),r(t.props,t.props),{popper:e,onUpdate:r}}_u.$$tippy=!0;var qu=1,Uu=[],Ju=[];function Xu(t,e){var n,o,r,i,s,l,a,c=Bu(t,Object.assign({},Ru,Hu(hu(e)))),p=!1,d=!1,h=!1,u=!1,f=[],m=iu(X,c.interactiveDebounce),g=qu++,x=null,M=cu(c.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:g,reference:t,popper:uu(),popperInstance:x,props:c,state:y,plugins:M,clearDelayTimeouts:at,setProps:ct,setContent:pt,show:dt,hide:ht,hideWithInteractivity:ut,enable:st,disable:lt,unmount:ft,destroy:mt};if(!c.render)return v;var w=c.render(v),b=w.popper,k=w.onUpdate;b.setAttribute("data-tippy-root",""),b.id="tippy-"+v.id,v.popper=b,t._tippy=v,b._tippy=v;var W=M.map((function(t){return t.fn(v)})),Q=t.hasAttribute("aria-expanded");return q(),I(),N(),D("onCreate",[v]),c.showOnCreate&&rt(),b.addEventListener("mouseenter",(function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()})),b.addEventListener("mouseleave",(function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",m)})),v;function C(){var t=v.props.touch;return Array.isArray(t)?t:[t,0]}function S(){return"hold"===C()[0]}function O(){var t;return!(null==(t=v.props.render)||!t.$$tippy)}function T(){return a||t}function A(){var t=T().parentNode;return t?wu(t):document}function E(){return Ku(b)}function L(t){return v.state.isMounted&&!v.state.isVisible||Qu.isTouch||i&&"focus"===i.type?0:nu(v.props.delay,t?0:1,Ru.delay)}function N(t){void 0===t&&(t=!1),b.style.pointerEvents=v.props.interactive&&!t?"":"none",b.style.zIndex=""+v.props.zIndex}function D(t,e,n){var o;(void 0===n&&(n=!0),W.forEach((function(n){n[t]&&n[t].apply(n,e)})),n)&&(o=v.props)[t].apply(o,e)}function R(){var e=v.props.aria;if(e.content){var n="aria-"+e.content,o=b.id,r=lu(v.props.triggerTarget||t);r.forEach((function(t){var e=t.getAttribute(n);if(v.state.isVisible)t.setAttribute(n,e?e+" "+o:o);else{var r=e&&e.replace(o,"").trim();r?t.setAttribute(n,r):t.removeAttribute(n)}}))}}function I(){if(!Q&&v.props.aria.expanded){var e=lu(v.props.triggerTarget||t);e.forEach((function(t){v.props.interactive?t.setAttribute("aria-expanded",v.state.isVisible&&t===T()?"true":"false"):t.removeAttribute("aria-expanded")}))}}function P(){A().removeEventListener("mousemove",m),Uu=Uu.filter((function(t){return t!==m}))}function H(e){if(!Qu.isTouch||!h&&"mousedown"!==e.type){var n=e.composedPath&&e.composedPath()[0]||e.target;if(!v.props.interactive||!Wu(b,n)){if(lu(v.props.triggerTarget||t).some((function(t){return Wu(t,n)}))){if(Qu.isTouch)return;if(v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[v,e]);!0===v.props.hideOnClick&&(v.clearDelayTimeouts(),v.hide(),d=!0,setTimeout((function(){d=!1})),v.state.isMounted||V())}}}function $(){h=!0}function B(){h=!1}function z(){var t=A();t.addEventListener("mousedown",H,!0),t.addEventListener("touchend",H,tu),t.addEventListener("touchstart",B,tu),t.addEventListener("touchmove",$,tu)}function V(){var t=A();t.removeEventListener("mousedown",H,!0),t.removeEventListener("touchend",H,tu),t.removeEventListener("touchstart",B,tu),t.removeEventListener("touchmove",$,tu)}function F(t,e){K(t,(function(){!v.state.isVisible&&b.parentNode&&b.parentNode.contains(b)&&e()}))}function j(t,e){K(t,e)}function K(t,e){var n=E().box;function o(t){t.target===n&&(ku(n,"remove",o),e())}if(0===t)return e();ku(n,"remove",s),ku(n,"add",o),s=o}function _(e,n,o){void 0===o&&(o=!1);var r=lu(v.props.triggerTarget||t);r.forEach((function(t){t.addEventListener(e,n,o),f.push({node:t,eventType:e,handler:n,options:o})}))}function q(){S()&&(_("touchstart",J,{passive:!0}),_("touchend",G,{passive:!0})),su(v.props.trigger).forEach((function(t){if("manual"!==t)switch(_(t,J),t){case"mouseenter":_("mouseleave",G);break;case"focus":_(Lu?"focusout":"blur",Y);break;case"focusin":_("focusout",Y);break}}))}function U(){f.forEach((function(t){var e=t.node,n=t.eventType,o=t.handler,r=t.options;e.removeEventListener(n,o,r)})),f=[]}function J(t){var e,n=!1;if(v.state.isEnabled&&!Z(t)&&!d){var o="focus"===(null==(e=i)?void 0:e.type);i=t,a=t.currentTarget,I(),!v.state.isVisible&&gu(t)&&Uu.forEach((function(e){return e(t)})),"click"===t.type&&(v.props.trigger.indexOf("mouseenter")<0||p)&&!1!==v.props.hideOnClick&&v.state.isVisible?n=!0:rt(t),"click"===t.type&&(p=!n),n&&!o&&it(t)}}function X(t){var e=t.target,n=T().contains(e)||b.contains(e);if("mousemove"!==t.type||!n){var o=ot().concat(b).map((function(t){var e,n=t._tippy,o=null==(e=n.popperInstance)?void 0:e.state;return o?{popperRect:t.getBoundingClientRect(),popperState:o,props:c}:null})).filter(Boolean);bu(o,t)&&(P(),it(t))}}function G(t){var e=Z(t)||v.props.trigger.indexOf("click")>=0&&p;e||(v.props.interactive?v.hideWithInteractivity(t):it(t))}function Y(t){v.props.trigger.indexOf("focusin")<0&&t.target!==T()||v.props.interactive&&t.relatedTarget&&b.contains(t.relatedTarget)||it(t)}function Z(t){return!!Qu.isTouch&&S()!==t.type.indexOf("touch")>=0}function tt(){et();var e=v.props,n=e.popperOptions,o=e.placement,r=e.offset,i=e.getReferenceClientRect,s=e.moveTransition,a=O()?Ku(b).arrow:null,c=i?{getBoundingClientRect:i,contextElement:i.contextElement||T()}:t,p={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(O()){var n=E(),o=n.box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?o.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?o.setAttribute("data-"+t,""):o.removeAttribute("data-"+t)})),e.attributes.popper={}}}},d=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},p];O()&&a&&d.push({name:"arrow",options:{element:a,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),v.popperInstance=Uh(c,b,Object.assign({},n,{placement:o,onFirstUpdate:l,modifiers:d}))}function et(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function nt(){var t,e=v.props.appendTo,n=T();t=v.props.interactive&&e===eu||"parent"===e?n.parentNode:ru(e,[n]),t.contains(b)||t.appendChild(b),v.state.isMounted=!0,tt()}function ot(){return du(b.querySelectorAll("[data-tippy-root]"))}function rt(t){v.clearDelayTimeouts(),t&&D("onTrigger",[v,t]),z();var e=L(!0),o=C(),r=o[0],i=o[1];Qu.isTouch&&"hold"===r&&i&&(e=i),e?n=setTimeout((function(){v.show()}),e):v.show()}function it(t){if(v.clearDelayTimeouts(),D("onUntrigger",[v,t]),v.state.isVisible){if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&p)){var e=L(!1);e?o=setTimeout((function(){v.state.isVisible&&v.hide()}),e):r=requestAnimationFrame((function(){v.hide()}))}}else V()}function st(){v.state.isEnabled=!0}function lt(){v.hide(),v.state.isEnabled=!1}function at(){clearTimeout(n),clearTimeout(o),cancelAnimationFrame(r)}function ct(e){if(!v.state.isDestroyed){D("onBeforeUpdate",[v,e]),U();var n=v.props,o=Bu(t,Object.assign({},n,hu(e),{ignoreAttributes:!0}));v.props=o,q(),n.interactiveDebounce!==o.interactiveDebounce&&(P(),m=iu(X,o.interactiveDebounce)),n.triggerTarget&&!o.triggerTarget?lu(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):o.triggerTarget&&t.removeAttribute("aria-expanded"),I(),N(),k&&k(n,o),v.popperInstance&&(tt(),ot().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}))),D("onAfterUpdate",[v,e])}}function pt(t){v.setProps({content:t})}function dt(){var t=v.state.isVisible,e=v.state.isDestroyed,n=!v.state.isEnabled,o=Qu.isTouch&&!v.props.touch,r=nu(v.props.duration,0,Ru.duration);if(!(t||e||n||o)&&!T().hasAttribute("disabled")&&(D("onShow",[v],!1),!1!==v.props.onShow(v))){if(v.state.isVisible=!0,O()&&(b.style.visibility="visible"),N(),z(),v.state.isMounted||(b.style.transition="none"),O()){var i=E(),s=i.box,a=i.content;yu([s,a],0)}l=function(){var t;if(v.state.isVisible&&!u){if(u=!0,b.offsetHeight,b.style.transition=v.props.moveTransition,O()&&v.props.animation){var e=E(),n=e.box,o=e.content;yu([n,o],r),vu([n,o],"visible")}R(),I(),au(Ju,v),null==(t=v.popperInstance)||t.forceUpdate(),D("onMount",[v]),v.props.animation&&O()&&j(r,(function(){v.state.isShown=!0,D("onShown",[v])}))}},nt()}}function ht(){var t=!v.state.isVisible,e=v.state.isDestroyed,n=!v.state.isEnabled,o=nu(v.props.duration,1,Ru.duration);if(!(t||e||n)&&(D("onHide",[v],!1),!1!==v.props.onHide(v))){if(v.state.isVisible=!1,v.state.isShown=!1,u=!1,p=!1,O()&&(b.style.visibility="hidden"),P(),V(),N(!0),O()){var r=E(),i=r.box,s=r.content;v.props.animation&&(yu([i,s],o),vu([i,s],"hidden"))}R(),I(),v.props.animation?O()&&F(o,v.unmount):v.unmount()}}function ut(t){A().addEventListener("mousemove",m),au(Uu,m),m(t)}function ft(){v.state.isVisible&&v.hide(),v.state.isMounted&&(et(),ot().forEach((function(t){t._tippy.unmount()})),b.parentNode&&b.parentNode.removeChild(b),Ju=Ju.filter((function(t){return t!==v})),v.state.isMounted=!1,D("onHidden",[v]))}function mt(){v.state.isDestroyed||(v.clearDelayTimeouts(),v.unmount(),U(),delete t._tippy,v.state.isDestroyed=!0,D("onDestroy",[v]))}}function Gu(t,e){void 0===e&&(e={});var n=Ru.plugins.concat(e.plugins||[]);Au();var o=Object.assign({},e,{plugins:n}),r=Mu(t),i=r.reduce((function(t,e){var n=e&&Xu(e,o);return n&&t.push(n),t}),[]);return fu(t)?i[0]:i}Gu.defaultProps=Ru,Gu.setDefaultProps=Pu,Gu.currentInput=Qu;Object.assign({},ph,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}});Gu.setDefaultProps({render:_u});var Yu=Gu;class Zu{constructor({editor:t,element:e,view:n,tippyOptions:o={},updateDelay:r=250,shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:t,state:e,from:n,to:o})=>{const{doc:r,selection:i}=e,{empty:s}=i,l=!r.textBetween(n,o).length&&Xa(e.selection),a=this.element.contains(document.activeElement),c=t.hasFocus()||a;return!(!c||s||l||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:t})=>{var e;this.preventHide?this.preventHide=!1:(null===t||void 0===t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget))||this.hide()},this.tippyBlurHandler=t=>{this.blurHandler({event:t})},this.handleDebouncedUpdate=(t,e)=>{const n=!(null===e||void 0===e?void 0:e.selection.eq(t.state.selection)),o=!(null===e||void 0===e?void 0:e.doc.eq(t.state.doc));(n||o)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout((()=>{this.updateHandler(t,n,o,e)}),this.updateDelay))},this.updateHandler=(t,e,n,o)=>{var r,i,s;const{state:l,composing:a}=t,{selection:c}=l,p=!e&&!n;if(a||p)return;this.createTooltip();const{ranges:d}=c,h=Math.min(...d.map((t=>t.$from.pos))),u=Math.max(...d.map((t=>t.$to.pos))),f=null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,view:t,state:l,oldState:o,from:h,to:u});f?(null===(i=this.tippy)||void 0===i||i.setProps({getReferenceClientRect:(null===(s=this.tippyOptions)||void 0===s?void 0:s.getReferenceClientRect)||(()=>{if(np(l.selection)){let e=t.nodeDOM(h);const n=e.dataset.nodeViewWrapper?e:e.querySelector("[data-node-view-wrapper]");if(n&&(e=n.firstChild),e)return e.getBoundingClientRect()}return op(t,h,u)})}),this.show()):this.hide()},this.editor=t,this.element=e,this.view=n,this.updateDelay=r,i&&(this.shouldShow=i),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.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,e=!!t.parentElement;!this.tippy&&e&&(this.tippy=Yu(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,e){const{state:n}=t,o=n.selection.$from.pos!==n.selection.$to.pos;if(this.updateDelay>0&&o)return void this.handleDebouncedUpdate(t,e);const r=!(null===e||void 0===e?void 0:e.selection.eq(t.state.selection)),i=!(null===e||void 0===e?void 0:e.doc.eq(t.state.doc));this.updateHandler(t,r,i,e)}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;(null===(t=this.tippy)||void 0===t?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const tf=t=>new wn({key:"string"===typeof t.pluginKey?new Wn(t.pluginKey):t.pluginKey,view:e=>new Zu({view:e,...t})});Sa.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[tf({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class ef{constructor({editor:t,element:e,view:n,tippyOptions:o={},shouldShow:r}){this.preventHide=!1,this.shouldShow=({view:t,state:e})=>{const{selection:n}=e,{$anchor:o,empty:r}=n,i=1===o.depth,s=o.parent.isTextblock&&!o.parent.type.spec.code&&!o.parent.textContent;return!!(t.hasFocus()&&r&&i&&s&&this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:t})=>{var e;this.preventHide?this.preventHide=!1:(null===t||void 0===t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget))||this.hide()},this.tippyBlurHandler=t=>{this.blurHandler({event:t})},this.editor=t,this.element=e,this.view=n,r&&(this.shouldShow=r),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,e=!!t.parentElement;!this.tippy&&e&&(this.tippy=Yu(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,e){var n,o,r;const{state:i}=t,{doc:s,selection:l}=i,{from:a,to:c}=l,p=e&&e.doc.eq(s)&&e.selection.eq(l);if(p)return;this.createTooltip();const d=null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:t,state:i,oldState:e});d?(null===(o=this.tippy)||void 0===o||o.setProps({getReferenceClientRect:(null===(r=this.tippyOptions)||void 0===r?void 0:r.getReferenceClientRect)||(()=>op(t,a,c))}),this.show()):this.hide()}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;(null===(t=this.tippy)||void 0===t?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const nf=t=>new wn({key:"string"===typeof t.pluginKey?new Wn(t.pluginKey):t.pluginKey,view:e=>new ef({view:e,...t})});Sa.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[nf({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),(0,o.pM)({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=(0,g.KR)(null);return(0,o.sV)((()=>{const{updateDelay:e,editor:o,pluginKey:r,shouldShow:i,tippyOptions:s}=t;o.registerPlugin(tf({updateDelay:e,editor:o,element:n.value,pluginKey:r,shouldShow:i,tippyOptions:s}))})),(0,o.xo)((()=>{const{pluginKey:e,editor:n}=t;n.unregisterPlugin(e)})),()=>{var t;return(0,o.h)("div",{ref:n},null===(t=e.default)||void 0===t?void 0:t.call(e))}}});function of(t){return(0,g.rY)(((e,n)=>({get(){return e(),t},set(e){t=e,requestAnimationFrame((()=>{requestAnimationFrame((()=>{n()}))}))}})))}class rf extends Rp{constructor(t={}){return super(t),this.vueRenderers=(0,g.Kh)(new Map),this.contentComponent=null,this.reactiveState=of(this.view.state),this.reactiveExtensionStorage=of(this.extensionStorage),this.on("transaction",(()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage})),(0,g.IG)(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,e){super.registerPlugin(t,e),this.reactiveState.value=this.view.state}unregisterPlugin(t){super.unregisterPlugin(t),this.reactiveState.value=this.view.state}}const sf=(0,o.pM)({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=(0,g.KR)(),n=(0,o.nI)();return(0,o.nT)((()=>{const r=t.editor;r&&r.options.element&&e.value&&(0,o.dY)((()=>{if(!e.value||!r.options.element.firstChild)return;const t=(0,g.R1)(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,r.setOptions({element:t}),r.createNodeViews()}))})),(0,o.xo)((()=>{const e=t.editor;if(!e)return;if(e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!e.options.element.firstChild)return;const n=document.createElement("div");n.append(...e.options.element.childNodes),e.setOptions({element:n})})),{rootEl:e}},render(){const t=[];return this.editor&&this.editor.vueRenderers.forEach((e=>{const n=(0,o.h)(o.Im,{to:e.teleportElement,key:e.id},(0,o.h)(e.component,{ref:e.id,...e.props}));t.push(n)})),(0,o.h)("div",{ref:t=>{this.rootEl=t}},...t)}}),lf=((0,o.pM)({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=(0,g.KR)(null);return(0,o.sV)((()=>{const{pluginKey:e,editor:o,tippyOptions:r,shouldShow:i}=t;o.registerPlugin(nf({pluginKey:e,editor:o,element:n.value,tippyOptions:r,shouldShow:i}))})),(0,o.xo)((()=>{const{pluginKey:e,editor:n}=t;n.unregisterPlugin(e)})),()=>{var t;return(0,o.h)("div",{ref:n},null===(t=e.default)||void 0===t?void 0:t.call(e))}}}),(0,o.pM)({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return(0,o.h)(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),(0,o.pM)({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return(0,o.h)(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))}}),(t={})=>{const e=(0,g.IJ)();return(0,o.sV)((()=>{e.value=new rf(t)})),(0,o.xo)((()=>{var t;null===(t=e.value)||void 0===t||t.destroy()})),e});Boolean;const af=/^\s*>\s$/,cf=zp.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[$p({find:af,type:this.type})]}}),pf=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,df=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,hf=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,uf=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,ff=Bp.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ip({find:pf,type:this.type}),Ip({find:hf,type:this.type})]},addPasteRules(){return[Vp({find:df,type:this.type}),Vp({find:uf,type:this.type})]}}),mf=zp.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Zl(this.options.HTMLAttributes,t),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)}}}),gf=Bp.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>{const e=t.hasAttribute("style");return!!e&&{}}}]},renderHTML({HTMLAttributes:t}){return["span",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=Pc(t,this.type),o=Object.entries(n).some((([,t])=>!!t));return!!o||e.unsetMark(this.name)}}}}),xf=/^\s*([-+*])\s$/,Mf=zp.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:t}){return["ul",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(mf.name,this.editor.getAttributes(gf.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=$p({find:xf,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=$p({find:xf,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(gf.name),editor:this.editor})),[t]}}),yf=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,vf=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,wf=Bp.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ip({find:yf,type:this.type})]},addPasteRules(){return[Vp({find:vf,type:this.type})]}}),bf=/^```([a-z]+)?[\s\n]$/,kf=/^~~~([a-z]+)?[\s\n]$/,Wf=zp.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,o=[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]],r=o.filter((t=>t.startsWith(n))).map((t=>t.replace(n,""))),i=r[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Zl(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!(!t||e.parent.type.name!==this.name)&&(!(!n&&e.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:o,empty:r}=n;if(!r||o.parent.type!==this.type)return!1;const i=o.parentOffset===o.parent.nodeSize-2,s=o.parent.textContent.endsWith("\n\n");return!(!i||!s)&&t.chain().command((({tr:t})=>(t.delete(o.pos-2,o.pos),!0))).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:o}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2;if(!s)return!1;const l=r.after();if(void 0===l)return!1;const a=o.nodeAt(l);return!a&&t.commands.exitCode()}}},addInputRules(){return[Hp({find:bf,type:this.type,getAttributes:t=>({language:t[1]})}),Hp({find:kf,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new wn({key:new Wn("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),o=e.clipboardData.getData("vscode-editor-data"),r=o?JSON.parse(o):void 0,i=null===r||void 0===r?void 0:r.mode;if(!n||!i)return!1;const{tr:s}=t.state;return t.state.selection.from===t.state.doc.nodeSize-(1+2*t.state.selection.$to.depth)?s.insert(t.state.selection.from-1,this.type.create({language:i})):s.replaceSelectionWith(this.type.create({language:i})),s.setSelection(nn.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),Qf=zp.create({name:"doc",topNode:!0,content:"block+"});function Cf(t={}){return new wn({view(e){return new Sf(e,t)}})}class Sf{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map((e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}destroy(){this.handlers.forEach((({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e)))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent;if(n){let n=e.nodeBefore,o=e.nodeAfter;if(n||o){let e=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(e){let r=e.getBoundingClientRect(),i=n?r.bottom:r.top;n&&o&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:r.left,right:r.right,top:i-this.width/2,bottom:i+this.width/2}}}}if(!t){let e=this.editorView.coordsAtPos(this.cursorPos);t={left:e.left-this.width/2,right:e.left+this.width/2,top:e.top,bottom:e.bottom}}let o,r,i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!i||i==document.body&&"static"==getComputedStyle(i).position)o=-pageXOffset,r=-pageYOffset;else{let t=i.getBoundingClientRect();o=t.left-i.scrollLeft,r=t.top-i.scrollTop}this.element.style.left=t.left-o+"px",this.element.style.top=t.top-r+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),o=n&&n.type.spec.disableDropCursor,r="function"==typeof o?o(this.editorView,e,t):o;if(e&&!r){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=Ee(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}const Of=Sa.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Cf(this.options)]}});class Tf extends Ye{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return Tf.valid(n)?new Tf(n):Ye.near(n)}content(){return T.empty}eq(t){return t instanceof Tf&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new Tf(t.resolve(e.pos))}getBookmark(){return new Af(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!Ef(t)||!Lf(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let o=e.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&Tf.valid(t))return t;let o=t.pos,r=null;for(let n=t.depth;;n--){let i=t.node(n);if(e>0?t.indexAfter(n)0){r=i.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;o+=e;let s=t.doc.resolve(o);if(Tf.valid(s))return s}for(;;){let i=e>0?r.firstChild:r.lastChild;if(!i){if(r.isAtom&&!r.isText&&!rn.isSelectable(r)){t=t.doc.resolve(o+r.nodeSize*e),n=!1;continue t}break}r=i,o+=e;let s=t.doc.resolve(o);if(Tf.valid(s))return s}return null}}}Tf.prototype.visible=!1,Tf.findFrom=Tf.findGapCursorFrom,Ye.jsonID("gapcursor",Tf);class Af{constructor(t){this.pos=t}map(t){return new Af(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return Tf.valid(e)?new Tf(e):Ye.near(e)}}function Ef(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),o=t.node(e);if(0!=n)for(let t=o.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(o.type.spec.isolating)return!0}return!0}function Lf(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),o=t.node(e);if(n!=o.childCount)for(let t=o.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(o.type.spec.isolating)return!0}return!0}function Nf(){return new wn({props:{decorations:Hf,createSelectionBetween(t,e,n){return e.pos==n.pos&&Tf.valid(n)?new Tf(n):null},handleClick:If,handleKeyDown:Df,handleDOMEvents:{beforeinput:Pf}}})}const Df=nl({ArrowLeft:Rf("horiz",-1),ArrowRight:Rf("horiz",1),ArrowUp:Rf("vert",-1),ArrowDown:Rf("vert",1)});function Rf(t,e){const n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,o,r){let i=t.selection,s=e>0?i.$to:i.$from,l=i.empty;if(i instanceof nn){if(!r.endOfTextblock(n)||0==s.depth)return!1;l=!1,s=t.doc.resolve(e>0?s.after():s.before())}let a=Tf.findGapCursorFrom(s,e,l);return!!a&&(o&&o(t.tr.setSelection(new Tf(a))),!0)}}function If(t,e,n){if(!t||!t.editable)return!1;let o=t.state.doc.resolve(e);if(!Tf.valid(o))return!1;let r=t.posAtCoords({left:n.clientX,top:n.clientY});return!(r&&r.inside>-1&&rn.isSelectable(t.state.doc.nodeAt(r.inside)))&&(t.dispatch(t.state.tr.setSelection(new Tf(o))),!0)}function Pf(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof Tf))return!1;let{$from:n}=t.state.selection,o=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!o)return!1;let r=k.empty;for(let s=o.length-1;s>=0;s--)r=k.from(o[s].createAndFill(null,r));let i=t.state.tr.replace(n.pos,n.pos,new T(r,0,0));return i.setSelection(nn.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function Hf(t){if(!(t.selection instanceof Tf))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ns.create(t.doc,[Zi.widget(t.selection.head,e,{key:"gapcursor"})])}const $f=Sa.create({name:"gapCursor",addProseMirrorPlugins(){return[Nf()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=na(Jl(t,"allowGapCursor",n)))&&void 0!==e?e:null}}}),Bf=zp.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Zl(this.options.HTMLAttributes,t)]},renderText(){return"\n"},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:o})=>t.first([()=>t.exitCode(),()=>t.command((()=>{const{selection:t,storedMarks:r}=n;if(t.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:s}=o.extensionManager,l=r||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command((({tr:t,dispatch:e})=>{if(e&&l&&i){const e=l.filter((t=>s.includes(t.type.name)));t.ensureMarks(e)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),zf=zp.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML({node:t,HTMLAttributes:e}){const n=this.options.levels.includes(t.attrs.level),o=n?t.attrs.level:this.options.levels[0];return[`h${o}`,Zl(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>Hp({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}});var Vf=200,Ff=function(){};Ff.prototype.append=function(t){return t.length?(t=Ff.from(t),!this.length&&t||t.length=e?Ff.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Ff.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Ff.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},Ff.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var o=[];return this.forEach((function(e,n){return o.push(t(e,n))}),e,n),o},Ff.from=function(t){return t instanceof Ff?t:t&&t.length?new jf(t):Ff.empty};var jf=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,o){for(var r=e;r=n;r--)if(!1===t(this.values[r],o+r))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=Vf)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=Vf)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Ff);Ff.empty=new jf([]);var Kf=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return tr&&!1===this.right.forEachInner(t,Math.max(e-r,0),Math.min(this.length,n)-r,o+r))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,o){var r=this.left.length;return!(e>r&&!1===this.right.forEachInvertedInner(t,e-r,Math.max(n,r)-r,o+r))&&(!(n=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(Ff),_f=Ff;const qf=500;class Uf{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let n,o,r=this.items.length;for(;;r--){let t=this.items.get(r-1);if(t.selection){--r;break}}e&&(n=this.remapping(r,this.items.length),o=n.maps.length);let i,s,l=t.tr,a=[],c=[];return this.items.forEach(((t,e)=>{if(!t.step)return n||(n=this.remapping(r,e+1),o=n.maps.length),o--,void c.push(t);if(n){c.push(new Xf(t.map));let e,r=t.step.map(n.slice(o));r&&l.maybeStep(r).doc&&(e=l.mapping.maps[l.mapping.maps.length-1],a.push(new Xf(e,void 0,void 0,a.length+c.length))),o--,e&&n.appendMap(e,o)}else l.maybeStep(t.step);return t.selection?(i=n?t.selection.map(n.slice(o)):t.selection,s=new Uf(this.items.slice(0,r).append(c.reverse().concat(a)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:l,selection:i}}addTransform(t,e,n,o){let r=[],i=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let c=0;cYf&&(s=Jf(s,a),i-=a),new Uf(s.append(r),i)}remapping(t,e){let n=new Xt;return this.items.forEach(((e,o)=>{let r=null!=e.mirrorOffset&&o-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,r)}),t,e),n}addMaps(t){return 0==this.eventCount?this:new Uf(this.items.append(t.map((t=>new Xf(t)))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],o=Math.max(0,this.items.length-e),r=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach((t=>{t.selection&&s--}),o);let l=e;this.items.forEach((e=>{let o=r.getMirror(--l);if(null==o)return;i=Math.min(i,o);let a=r.maps[o];if(e.step){let i=t.steps[o].invert(t.docs[o]),c=e.selection&&e.selection.map(r.slice(l+1,o));c&&s++,n.push(new Xf(a,i,c))}else n.push(new Xf(a))}),o);let a=[];for(let d=e;dqf&&(p=p.compress(this.items.length-n.length)),p}emptyItemCount(){let t=0;return this.items.forEach((e=>{e.step||t++})),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,o=[],r=0;return this.items.forEach(((i,s)=>{if(s>=t)o.push(i),i.selection&&r++;else if(i.step){let t=i.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let l=i.selection&&i.selection.map(e.slice(n));l&&r++;let a,c=new Xf(s.invert(),t,l),p=o.length-1;(a=o.length&&o[p].merge(c))?o[p]=a:o.push(c)}}else i.map&&n--}),this.items.length,0),new Uf(_f.from(o.reverse()),r)}}function Jf(t,e){let n;return t.forEach(((t,o)=>{if(t.selection&&0==e--)return n=o,!1})),t.slice(n)}Uf.empty=new Uf(_f.empty,0);class Xf{constructor(t,e,n,o){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new Xf(e.getMap().invert(),e,this.selection)}}}class Gf{constructor(t,e,n,o,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=o,this.prevComposition=r}}const Yf=20;function Zf(t,e,n,o){let r,i=n.getMeta(lm);if(i)return i.historyState;n.getMeta(am)&&(t=new Gf(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(lm))return s.getMeta(lm).redo?new Gf(t.done.addTransform(n,void 0,o,sm(e)),t.undone,em(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new Gf(t.done,t.undone.addTransform(n,void 0,o,sm(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(r=n.getMeta("rebased"))?new Gf(t.done.rebased(n,r),t.undone.rebased(n,r),nm(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Gf(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),nm(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let r=n.getMeta("composition"),i=0==t.prevTime||!s&&t.prevComposition!=r&&(t.prevTime<(n.time||0)-o.newGroupDelay||!tm(n,t.prevRanges)),l=s?nm(t.prevRanges,n.mapping):em(n.mapping.maps[n.steps.length-1]);return new Gf(t.done.addTransform(n,i?e.selection.getBookmark():void 0,o,sm(e)),Uf.empty,l,n.time,null==r?t.prevComposition:r)}}function tm(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach(((t,o)=>{for(let r=0;r=e[r]&&(n=!0)})),n}function em(t){let e=[];return t.forEach(((t,n,o,r)=>e.push(o,r))),e}function nm(t,e){if(!t)return null;let n=[];for(let o=0;o{let r=lm.getState(n);if(!r||0==(t?r.undone:r.done).eventCount)return!1;if(o){let i=om(r,n,t);i&&o(e?i.scrollIntoView():i)}return!0}}const dm=pm(!1,!0),hm=pm(!0,!0);pm(!1,!1),pm(!0,!1);const um=Sa.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>dm(t,e),redo:()=>({state:t,dispatch:e})=>hm(t,e)}},addProseMirrorPlugins(){return[cm(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()}}}),fm=zp.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Zl(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{$to:n}=e.selection,o=t();return 0===n.parentOffset?o.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):o.insertContent({type:this.name}),o.command((({tr:t,dispatch:e})=>{var n;if(e){const{$to:e}=t.selection,o=e.end();if(e.nodeAfter)e.nodeAfter.isTextblock?t.setSelection(nn.create(t.doc,e.pos+1)):e.nodeAfter.isBlock?t.setSelection(rn.create(t.doc,e.pos)):t.setSelection(nn.create(t.doc,e.pos));else{const r=null===(n=e.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();r&&(t.insert(o,r),t.setSelection(nn.create(t.doc,o+1)))}t.scrollIntoView()}return!0})).run()}}},addInputRules(){return[Pp({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),mm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,gm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,xm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Mm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,ym=Bp.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ip({find:mm,type:this.type}),Ip({find:xm,type:this.type})]},addPasteRules(){return[Vp({find:gm,type:this.type}),Vp({find:Mm,type:this.type})]}}),vm=zp.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Zl(this.options.HTMLAttributes,t),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)}}}),wm=zp.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Zl(this.options.HTMLAttributes,t),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)}}}),bm=Bp.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>{const e=t.hasAttribute("style");return!!e&&{}}}]},renderHTML({HTMLAttributes:t}){return["span",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=Pc(t,this.type),o=Object.entries(n).some((([,t])=>!!t));return!!o||e.unsetMark(this.name)}}}}),km=/^(\d+)\.\s$/,Wm=zp.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:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return 1===e?["ol",Zl(this.options.HTMLAttributes,n),0]:["ol",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(wm.name,this.editor.getAttributes(bm.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=$p({find:km,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=$p({find:km,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(bm.name)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}}),Qm=zp.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Cm=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Sm=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Om=Bp.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}]},renderHTML({HTMLAttributes:t}){return["s",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ip({find:Cm,type:this.type})]},addPasteRules(){return[Vp({find:Sm,type:this.type})]}}),Tm=zp.create({name:"text",group:"inline"}),Am=Sa.create({name:"starterKit",addExtensions(){var t,e,n,o,r,i,s,l,a,c,p,d,h,u,f,m,g,x;const M=[];return!1!==this.options.blockquote&&M.push(cf.configure(null===(t=this.options)||void 0===t?void 0:t.blockquote)),!1!==this.options.bold&&M.push(ff.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.bulletList&&M.push(Mf.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&M.push(wf.configure(null===(o=this.options)||void 0===o?void 0:o.code)),!1!==this.options.codeBlock&&M.push(Wf.configure(null===(r=this.options)||void 0===r?void 0:r.codeBlock)),!1!==this.options.document&&M.push(Qf.configure(null===(i=this.options)||void 0===i?void 0:i.document)),!1!==this.options.dropcursor&&M.push(Of.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&M.push($f.configure(null===(l=this.options)||void 0===l?void 0:l.gapcursor)),!1!==this.options.hardBreak&&M.push(Bf.configure(null===(a=this.options)||void 0===a?void 0:a.hardBreak)),!1!==this.options.heading&&M.push(zf.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&M.push(um.configure(null===(p=this.options)||void 0===p?void 0:p.history)),!1!==this.options.horizontalRule&&M.push(fm.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&M.push(ym.configure(null===(h=this.options)||void 0===h?void 0:h.italic)),!1!==this.options.listItem&&M.push(vm.configure(null===(u=this.options)||void 0===u?void 0:u.listItem)),!1!==this.options.orderedList&&M.push(Wm.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&M.push(Qm.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&M.push(Om.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&M.push(Tm.configure(null===(x=this.options)||void 0===x?void 0:x.text)),M}});var Em,Lm;if("undefined"!=typeof WeakMap){let t=new WeakMap;Em=e=>t.get(e),Lm=(e,n)=>(t.set(e,n),n)}else{const t=[],e=10;let n=0;Em=e=>{for(let n=0;n(n==e&&(n=0),t[n++]=o,t[n++]=r)}var Nm=class{constructor(t,e,n,o){this.width=t,this.height=e,this.map=n,this.problems=o}findCell(t){for(let e=0;e=n){(i||(i=[])).push({type:"overlong_rowspan",pos:p,n:h-t});break}const l=r+t*e;for(let t=0;to&&(i+=r.attrs.colspan)}}for(let t=0;t1&&(n=!0)}-1==e?e=i:e!=i&&(e=Math.max(e,i))}return e}function Im(t,e,n){t.problems||(t.problems=[]);const o={};for(let r=0;r0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function zm(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}function Vm(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if("row"==e.node(n).type.spec.tableRole)return!0;return!1}function Fm(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;const n=Bm(e.$head)||jm(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function jm(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const o=e.type.spec.tableRole;if("cell"==o||"header_cell"==o)return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const o=e.type.spec.tableRole;if("cell"==o||"header_cell"==o)return t.doc.resolve(n-e.nodeSize)}}function Km(t){return"row"==t.parent.type.spec.tableRole&&!!t.nodeAfter}function _m(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function qm(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Um(t,e,n){const o=t.node(-1),r=Nm.get(o),i=t.start(-1),s=r.nextCell(t.pos-i,e,n);return null==s?null:t.node(0).resolve(i+s)}function Jm(t,e,n=1){const o={...t,colspan:t.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(e,n),o.colwidth.some((t=>t>0))||(o.colwidth=null)),o}function Xm(t,e,n=1){const o={...t,colspan:t.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let t=0;tt!=e.pos-r));l.unshift(e.pos-r);const a=l.map((t=>{const e=n.nodeAt(t);if(!e)throw RangeError(`No cell with offset ${t} found`);const o=r+t+1;return new Ze(s.resolve(o),s.resolve(o+e.content.size))}));super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=e}map(e,n){const o=e.resolve(n.map(this.$anchorCell.pos)),r=e.resolve(n.map(this.$headCell.pos));if(Km(o)&&Km(r)&&qm(o,r)){const e=this.$anchorCell.node(-1)!=o.node(-1);return e&&this.isRowSelection()?t.rowSelection(o,r):e&&this.isColSelection()?t.colSelection(o,r):new t(o,r)}return nn.between(o,r)}content(){const t=this.$anchorCell.node(-1),e=Nm.get(t),n=this.$anchorCell.start(-1),o=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),r={},i=[];for(let l=o.top;l0||p>0){let t=a.attrs;if(c>0&&(t=Jm(t,0,c)),p>0&&(t=Jm(t,t.colspan-p,p)),l.lefto.bottom){const t={...a.attrs,rowspan:Math.min(l.bottom,o.bottom)-Math.max(l.top,o.top)};a=l.top0)return!1;const n=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const o=e.node(-1),r=Nm.get(o),i=e.start(-1),s=r.findCell(e.pos-i),l=r.findCell(n.pos-i),a=e.node(0);return s.top<=l.top?(s.top>0&&(e=a.resolve(i+r.map[s.left])),l.bottom0&&(n=a.resolve(i+r.map[l.left])),s.bottom0)return!1;const i=o+this.$anchorCell.nodeAfter.attrs.colspan,s=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==e.width}eq(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const o=e.node(-1),r=Nm.get(o),i=e.start(-1),s=r.findCell(e.pos-i),l=r.findCell(n.pos-i),a=e.node(0);return s.left<=l.left?(s.left>0&&(e=a.resolve(i+r.map[s.top*r.width])),l.right0&&(n=a.resolve(i+r.map[l.top*r.width])),s.right{e.push(Zi.node(n,n+t.nodeSize,{class:"selectedCell"}))})),ns.create(t.doc,e)}function eg({$from:t,$to:e}){if(t.pos==e.pos||t.pos=0;r--,n++)if(t.after(r+1)=0;i--,o--)if(e.before(i+1)>e.start(i))break;return n==o&&/row|table/.test(t.node(r).type.spec.tableRole)}function ng({$from:t,$to:e}){let n,o;for(let r=t.depth;r>0;r--){const e=t.node(r);if("cell"===e.type.spec.tableRole||"header_cell"===e.type.spec.tableRole){n=e;break}}for(let r=e.depth;r>0;r--){const t=e.node(r);if("cell"===t.type.spec.tableRole||"header_cell"===t.type.spec.tableRole){o=t;break}}return n!==o&&0===e.parentOffset}function og(t,e,n){const o=(e||t).selection,r=(e||t).doc;let i,s;if(o instanceof rn&&(s=o.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)i=Ym.create(r,o.from);else if("row"==s){const t=r.resolve(o.from+1);i=Ym.rowSelection(t,t)}else if(!n){const t=Nm.get(o.node),e=o.from+1,n=e+t.map[t.width*t.height-1];i=Ym.create(r,e+1,n)}}else o instanceof nn&&eg(o)?i=nn.create(r,o.from):o instanceof nn&&ng(o)&&(i=nn.create(r,o.$from.start(),o.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var rg=new Wn("fix-tables");function ig(t,e,n,o){const r=t.childCount,i=e.childCount;t:for(let s=0,l=0;s{"table"==e.type.spec.tableRole&&(n=lg(t,e,o,n))};return e?e.doc!=t.doc&&ig(e.doc,t.doc,0,o):t.doc.descendants(o),n}function lg(t,e,n,o){const r=Nm.get(e);if(!r.problems)return o;o||(o=t.tr);const i=[];for(let a=0;a0){let e="cell";n.firstChild&&(e=n.firstChild.type.spec.tableRole);const i=[];for(let n=0;n0&&o>0||"table"==e.child(0).type.spec.tableRole))n--,o--,e=e.child(0).content;const r=e.child(0),i=r.type.spec.tableRole,s=r.type.schema,l=[];if("row"==i)for(let a=0;a=0;e--){const{rowspan:o,colspan:i}=t.child(e).attrs;for(let t=r;t=e.length&&e.push(k.empty),n[r]o&&(l=l.type.createChecked(Jm(l.attrs,l.attrs.colspan,n+l.attrs.colspan-o),l.content)),s.push(l),n+=l.attrs.colspan;for(let n=1;nr&&(e=e.type.create({...e.attrs,rowspan:Math.max(1,r-e.attrs.rowspan)},e.content)),s.push(e)}t.push(k.from(s))}n=t,e=r}return{width:t,height:e,rows:n}}function hg(t,e,n,o,r,i,s){const l=t.doc.type.schema,a=Hm(l);let c,p;if(r>e.width)for(let d=0,h=0;de.height){const l=[];for(let t=0,o=(e.height-1)*e.width;t=e.width)&&n.nodeAt(e.map[o+t]).type==a.header_cell;l.push(r?p||(p=a.header_cell.createAndFill()):c||(c=a.cell.createAndFill()))}const d=a.row.create(null,k.from(l)),h=[];for(let t=e.height;t{if(!r)return!1;const i=n.selection;if(i instanceof Ym)return xg(n,o,Ye.near(i.$headCell,e));if("horiz"!=t&&!i.empty)return!1;const s=Wg(r,t,e);if(null==s)return!1;if("horiz"==t)return xg(n,o,Ye.near(n.doc.resolve(i.head+e),e));{const r=n.doc.resolve(s),i=Um(r,t,e);let l;return l=i?Ye.near(i,1):e<0?Ye.near(n.doc.resolve(r.before(-1)),-1):Ye.near(n.doc.resolve(r.after(-1)),1),xg(n,o,l)}}}function yg(t,e){return(n,o,r)=>{if(!r)return!1;const i=n.selection;let s;if(i instanceof Ym)s=i;else{const o=Wg(r,t,e);if(null==o)return!1;s=new Ym(n.doc.resolve(o))}const l=Um(s.$headCell,t,e);return!!l&&xg(n,o,new Ym(s.$anchorCell,l))}}function vg(t,e){const n=t.selection;if(!(n instanceof Ym))return!1;if(e){const o=t.tr,r=Hm(t.schema).cell.createAndFill().content;n.forEachCell(((t,e)=>{t.content.eq(r)||o.replace(o.mapping.map(e+1),o.mapping.map(e+t.nodeSize-1),new T(r,0,0))})),o.docChanged&&e(o)}return!0}function wg(t,e){const n=t.state.doc,o=Bm(n.resolve(e));return!!o&&(t.dispatch(t.state.tr.setSelection(new Ym(o))),!0)}function bg(t,e,n){if(!Vm(t.state))return!1;let o=ag(n);const r=t.state.selection;if(r instanceof Ym){o||(o={width:1,height:1,rows:[k.from(pg(Hm(t.state.schema).cell,n))]});const e=r.$anchorCell.node(-1),i=r.$anchorCell.start(-1),s=Nm.get(e).rectBetween(r.$anchorCell.pos-i,r.$headCell.pos-i);return o=dg(o,s.right-s.left,s.bottom-s.top),mg(t.state,t.dispatch,i,s,o),!0}if(o){const e=Fm(t.state),n=e.start(-1);return mg(t.state,t.dispatch,n,Nm.get(e.node(-1)).findCell(e.pos-n),o),!0}return!1}function kg(t,e){var n;if(e.ctrlKey||e.metaKey)return;const o=Qg(t,e.target);let r;if(e.shiftKey&&t.state.selection instanceof Ym)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&o&&null!=(r=Bm(t.state.selection.$anchor))&&(null==(n=Cg(t,e))?void 0:n.pos)!=r.pos)i(r,e),e.preventDefault();else if(!o)return;function i(e,n){let o=Cg(t,n);const r=null==$m.getState(t.state);if(!o||!qm(e,o)){if(!r)return;o=e}const i=new Ym(e,o);if(r||!t.state.selection.eq(i)){const n=t.state.tr.setSelection(i);r&&n.setMeta($m,e.pos),t.dispatch(n)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",l),null!=$m.getState(t.state)&&t.dispatch(t.state.tr.setMeta($m,-1))}function l(n){const r=n,l=$m.getState(t.state);let a;if(null!=l)a=t.state.doc.resolve(l);else if(Qg(t,r.target)!=o&&(a=Cg(t,e),!a))return s();a&&i(a,r)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",l)}function Wg(t,e,n){if(!(t.state.selection instanceof nn))return null;const{$head:o}=t.state.selection;for(let r=o.depth-1;r>=0;r--){const i=o.node(r),s=n<0?o.index(r):o.indexAfter(r);if(s!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){const i=o.before(r),s="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(s)?i:null}}return null}function Qg(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function Cg(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Bm(t.state.doc.resolve(n.pos)):null}var Sg=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Og(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type==this.node.type&&(this.node=t,Og(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}};function Og(t,e,n,o,r,i){var s;let l=0,a=!0,c=e.firstChild;const p=t.firstChild;if(p){for(let t=0,n=0;tnew n(t,e,o),new Eg(-1,!1)},apply(t,e){return e.apply(t)}},props:{attributes:t=>{const e=Tg.getState(t);return e&&e.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(n,r)=>{Lg(n,r,t,e,o)},mouseleave:t=>{Ng(t)},mousedown:(t,n)=>{Dg(t,n,e)}},decorations:t=>{const e=Tg.getState(t);if(e&&e.activeHandle>-1)return Fg(t,e.activeHandle)},nodeViews:{}}});return r}var Eg=class t{constructor(t,e){this.activeHandle=t,this.dragging=e}apply(e){const n=this,o=e.getMeta(Tg);if(o&&null!=o.setHandle)return new t(o.setHandle,!1);if(o&&void 0!==o.setDragging)return new t(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return Km(e.doc.resolve(o))||(o=-1),new t(o,n.dragging)}return n}};function Lg(t,e,n,o,r){const i=Tg.getState(t.state);if(i&&!i.dragging){const o=Ig(e.target);let s=-1;if(o){const{left:r,right:i}=o.getBoundingClientRect();e.clientX-r<=n?s=Pg(t,e,"left",n):i-e.clientX<=n&&(s=Pg(t,e,"right",n))}if(s!=i.activeHandle){if(!r&&-1!==s){const e=t.state.doc.resolve(s),n=e.node(-1),o=Nm.get(n),r=e.start(-1),i=o.colCount(e.pos-r)+e.nodeAfter.attrs.colspan-1;if(i==o.width-1)return}$g(t,s)}}}function Ng(t){const e=Tg.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&$g(t,-1)}function Dg(t,e,n){var o;const r=null!=(o=t.dom.ownerDocument.defaultView)?o:window,i=Tg.getState(t.state);if(!i||-1==i.activeHandle||i.dragging)return!1;const s=t.state.doc.nodeAt(i.activeHandle),l=Rg(t,i.activeHandle,s.attrs);function a(e){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",c);const o=Tg.getState(t.state);(null==o?void 0:o.dragging)&&(Bg(t,o.activeHandle,Hg(o.dragging,e,n)),t.dispatch(t.state.tr.setMeta(Tg,{setDragging:null})))}function c(e){if(!e.which)return a(e);const o=Tg.getState(t.state);if(o&&o.dragging){const r=Hg(o.dragging,e,n);zg(t,o.activeHandle,r,n)}}return t.dispatch(t.state.tr.setMeta(Tg,{setDragging:{startX:e.clientX,startWidth:l}})),r.addEventListener("mouseup",a),r.addEventListener("mousemove",c),e.preventDefault(),!0}function Rg(t,e,{colspan:n,colwidth:o}){const r=o&&o[o.length-1];if(r)return r;const i=t.domAtPos(e),s=i.node.childNodes[i.offset];let l=s.offsetWidth,a=n;if(o)for(let c=0;c0?-1:0;Gm(e,o,r+i)&&(i=0==r||r==e.width?null:0);for(let s=0;s0&&r0&&e.map[l-1]==a||r0?-1:0;Xg(e,o,r+a)&&(a=0==r||r==e.height?null:0);for(let c=0,p=e.width*r;c0&&r0&&i==e.map[p-e.width]){const e=n.nodeAt(i).attrs;t.setNodeMarkup(t.mapping.slice(l).map(i+o),null,{...e,rowspan:e.rowspan-1}),c+=e.colspan-1}else if(r0&&n[i]==n[i-1]||o.right0&&n[r]==n[r-t]||o.bottomn[t.type.spec.tableRole]))(t,e)}function sx(t){return(e,n)=>{var o;const r=e.selection;let i,s;if(r instanceof Ym){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{if(i=zm(r.$from),!i)return!1;s=null==(o=Bm(r.$from))?void 0:o.pos}if(null==i||null==s)return!1;if(1==i.attrs.colspan&&1==i.attrs.rowspan)return!1;if(n){let o=i.attrs;const l=[],a=o.colwidth;o.rowspan>1&&(o={...o,rowspan:1}),o.colspan>1&&(o={...o,colspan:1});const c=jg(e),p=e.tr;for(let t=0;t{n.attrs[t]!==e&&i.setNodeMarkup(o,null,{...n.attrs,[t]:e})})):i.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[t]:e}),o(i)}return!0}}function ax(t){return function(e,n){if(!Vm(e))return!1;if(n){const o=Hm(e.schema),r=jg(e),i=e.tr,s=r.map.cellsInRect("column"==t?{left:r.left,top:0,right:r.right,bottom:r.map.height}:"row"==t?{left:0,top:r.top,right:r.map.width,bottom:r.bottom}:r),l=s.map((t=>r.table.nodeAt(t)));for(let t=0;t{const e=t+r.tableStart,n=i.doc.nodeAt(e);n&&i.setNodeMarkup(e,d,n.attrs)})),n(i)}return!0}}px("row",{useDeprecatedLogic:!0}),px("column",{useDeprecatedLogic:!0});var dx=px("cell",{useDeprecatedLogic:!0});function hx(t,e){if(e<0){const e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let n=t.index(-1)-1,o=t.before();n>=0;n--){const e=t.node(-1).child(n),r=e.lastChild;if(r)return o-1-r.nodeSize;o-=e.nodeSize}}else{if(t.index()0;o--){const r=n.node(o);if("table"==r.type.spec.tableRole)return e&&e(t.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0}return!1}function mx({allowTableNodeSelection:t=!1}={}){return new wn({key:$m,state:{init(){return null},apply(t,e){const n=t.getMeta($m);if(null!=n)return-1==n?null:n;if(null==e||!t.docChanged)return e;const{deleted:o,pos:r}=t.mapping.mapResult(e);return o?null:r}},props:{decorations:tg,handleDOMEvents:{mousedown:kg},createSelectionBetween(t){return null!=$m.getState(t.state)?t.state.selection:null},handleTripleClick:wg,handleKeyDown:gg,handlePaste:bg},appendTransaction(e,n,o){return og(o,sg(o,n),t)}})}function gx(t,e,n,o,r,i){let s=0,l=!0,a=e.firstChild;const c=t.firstChild;for(let p=0,d=0;p{const o=t.nodes[n];o.spec.tableRole&&(e[o.spec.tableRole]=o)})),t.cached.tableNodeTypes=e,e}function wx(t,e,n,o,r){const i=vx(t),s=[],l=[];for(let c=0;c{const{selection:e}=t.state;if(!bx(e))return!1;let n=0;const o=zc(e.ranges[0].$from,(t=>"table"===t.type.name));null===o||void 0===o||o.node.descendants((t=>{if("table"===t.type.name)return!1;["tableCell","tableHeader"].includes(t.type.name)&&(n+=1)}));const r=n===e.ranges.length;return!!r&&(t.commands.deleteTable(),!0)},Wx=zp.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:xx,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:o,tableMinWidth:r}=Mx(t,this.options.cellMinWidth),i=["table",Zl(this.options.HTMLAttributes,e,{style:o?`width: ${o}`:`minWidth: ${r}`}),n,["tbody",0]];return i},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:o,dispatch:r,editor:i})=>{const s=wx(i.schema,t,e,n);if(r){const t=o.selection.anchor+1;o.replaceSelectionWith(s).scrollIntoView().setSelection(nn.near(o.doc.resolve(t)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>_g(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>qg(t,e),deleteColumn:()=>({state:t,dispatch:e})=>Jg(t,e),addRowBefore:()=>({state:t,dispatch:e})=>Yg(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Zg(t,e),deleteRow:()=>({state:t,dispatch:e})=>ex(t,e),deleteTable:()=>({state:t,dispatch:e})=>fx(t,e),mergeCells:()=>({state:t,dispatch:e})=>rx(t,e),splitCell:()=>({state:t,dispatch:e})=>ix(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>px("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>px("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>dx(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>!!rx(t,e)||ix(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:o})=>lx(t,e)(n,o),goToNextCell:()=>({state:t,dispatch:e})=>ux(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>ux(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&sg(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const n=Ym.create(e.doc,t.anchorCell,t.headCell);e.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:kx,"Mod-Backspace":kx,Delete:kx,"Mod-Delete":kx}},addProseMirrorPlugins(){const t=this.options.resizable&&this.editor.isEditable;return[...t?[Ag({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],mx({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:na(Jl(t,"tableRole",e))}}}),Qx=zp.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Zl(this.options.HTMLAttributes,t),0]}}),Cx=Bp.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}]},renderHTML({HTMLAttributes:t}){return["u",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Sx="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Ox="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Tx="numeric",Ax="ascii",Ex="alpha",Lx="asciinumeric",Nx="alphanumeric",Dx="domain",Rx="emoji",Ix="scheme",Px="slashscheme",Hx="whitespace";function $x(t,e){return t in e||(e[t]=[]),e[t]}function Bx(t,e,n){e[Tx]&&(e[Lx]=!0,e[Nx]=!0),e[Ax]&&(e[Lx]=!0,e[Ex]=!0),e[Lx]&&(e[Nx]=!0),e[Ex]&&(e[Nx]=!0),e[Nx]&&(e[Dx]=!0),e[Rx]&&(e[Dx]=!0);for(const o in e){const e=$x(o,n);e.indexOf(t)<0&&e.push(t)}}function zx(t,e){const n={};for(const o in e)e[o].indexOf(t)>=0&&(n[o]=!0);return n}function Vx(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Vx.groups={},Vx.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let o=0;ot.ta(e,n,o,r),jx=(t,e,n,o,r)=>t.tr(e,n,o,r),Kx=(t,e,n,o,r)=>t.ts(e,n,o,r),_x=(t,e,n,o,r)=>t.tt(e,n,o,r),qx="WORD",Ux="UWORD",Jx="ASCIINUMERICAL",Xx="ALPHANUMERICAL",Gx="LOCALHOST",Yx="TLD",Zx="UTLD",tM="SCHEME",eM="SLASH_SCHEME",nM="NUM",oM="WS",rM="NL",iM="OPENBRACE",sM="CLOSEBRACE",lM="OPENBRACKET",aM="CLOSEBRACKET",cM="OPENPAREN",pM="CLOSEPAREN",dM="OPENANGLEBRACKET",hM="CLOSEANGLEBRACKET",uM="FULLWIDTHLEFTPAREN",fM="FULLWIDTHRIGHTPAREN",mM="LEFTCORNERBRACKET",gM="RIGHTCORNERBRACKET",xM="LEFTWHITECORNERBRACKET",MM="RIGHTWHITECORNERBRACKET",yM="FULLWIDTHLESSTHAN",vM="FULLWIDTHGREATERTHAN",wM="AMPERSAND",bM="APOSTROPHE",kM="ASTERISK",WM="AT",QM="BACKSLASH",CM="BACKTICK",SM="CARET",OM="COLON",TM="COMMA",AM="DOLLAR",EM="DOT",LM="EQUALS",NM="EXCLAMATION",DM="HYPHEN",RM="PERCENT",IM="PIPE",PM="PLUS",HM="POUND",$M="QUERY",BM="QUOTE",zM="FULLWIDTHMIDDLEDOT",VM="SEMI",FM="SLASH",jM="TILDE",KM="UNDERSCORE",_M="EMOJI",qM="SYM";var UM=Object.freeze({__proto__:null,ALPHANUMERICAL:Xx,AMPERSAND:wM,APOSTROPHE:bM,ASCIINUMERICAL:Jx,ASTERISK:kM,AT:WM,BACKSLASH:QM,BACKTICK:CM,CARET:SM,CLOSEANGLEBRACKET:hM,CLOSEBRACE:sM,CLOSEBRACKET:aM,CLOSEPAREN:pM,COLON:OM,COMMA:TM,DOLLAR:AM,DOT:EM,EMOJI:_M,EQUALS:LM,EXCLAMATION:NM,FULLWIDTHGREATERTHAN:vM,FULLWIDTHLEFTPAREN:uM,FULLWIDTHLESSTHAN:yM,FULLWIDTHMIDDLEDOT:zM,FULLWIDTHRIGHTPAREN:fM,HYPHEN:DM,LEFTCORNERBRACKET:mM,LEFTWHITECORNERBRACKET:xM,LOCALHOST:Gx,NL:rM,NUM:nM,OPENANGLEBRACKET:dM,OPENBRACE:iM,OPENBRACKET:lM,OPENPAREN:cM,PERCENT:RM,PIPE:IM,PLUS:PM,POUND:HM,QUERY:$M,QUOTE:BM,RIGHTCORNERBRACKET:gM,RIGHTWHITECORNERBRACKET:MM,SCHEME:tM,SEMI:VM,SLASH:FM,SLASH_SCHEME:eM,SYM:qM,TILDE:jM,TLD:Yx,UNDERSCORE:KM,UTLD:Zx,UWORD:Ux,WORD:qx,WS:oM});const JM=/[a-z]/,XM=/\p{L}/u,GM=/\p{Emoji}/u,YM=/\d/,ZM=/\s/;const ty="\r",ey="\n",ny="️",oy="‍",ry="";let iy=null,sy=null;function ly(t=[]){const e={};Vx.groups=e;const n=new Vx;null==iy&&(iy=dy(Sx)),null==sy&&(sy=dy(Ox)),_x(n,"'",bM),_x(n,"{",iM),_x(n,"}",sM),_x(n,"[",lM),_x(n,"]",aM),_x(n,"(",cM),_x(n,")",pM),_x(n,"<",dM),_x(n,">",hM),_x(n,"(",uM),_x(n,")",fM),_x(n,"「",mM),_x(n,"」",gM),_x(n,"『",xM),_x(n,"』",MM),_x(n,"<",yM),_x(n,">",vM),_x(n,"&",wM),_x(n,"*",kM),_x(n,"@",WM),_x(n,"`",CM),_x(n,"^",SM),_x(n,":",OM),_x(n,",",TM),_x(n,"$",AM),_x(n,".",EM),_x(n,"=",LM),_x(n,"!",NM),_x(n,"-",DM),_x(n,"%",RM),_x(n,"|",IM),_x(n,"+",PM),_x(n,"#",HM),_x(n,"?",$M),_x(n,'"',BM),_x(n,"/",FM),_x(n,";",VM),_x(n,"~",jM),_x(n,"_",KM),_x(n,"\\",QM),_x(n,"・",zM);const o=jx(n,YM,nM,{[Tx]:!0});jx(o,YM,o);const r=jx(o,JM,Jx,{[Lx]:!0}),i=jx(o,XM,Xx,{[Nx]:!0}),s=jx(n,JM,qx,{[Ax]:!0});jx(s,YM,r),jx(s,JM,s),jx(r,YM,r),jx(r,JM,r);const l=jx(n,XM,Ux,{[Ex]:!0});jx(l,JM),jx(l,YM,i),jx(l,XM,l),jx(i,YM,i),jx(i,JM),jx(i,XM,i);const a=_x(n,ey,rM,{[Hx]:!0}),c=_x(n,ty,oM,{[Hx]:!0}),p=jx(n,ZM,oM,{[Hx]:!0});_x(n,ry,p),_x(c,ey,a),_x(c,ry,p),jx(c,ZM,p),_x(p,ty),_x(p,ey),jx(p,ZM,p),_x(p,ry,p);const d=jx(n,GM,_M,{[Rx]:!0});_x(d,"#"),jx(d,GM,d),_x(d,ny,d);const h=_x(d,oy);_x(h,"#"),jx(h,GM,d);const u=[[JM,s],[YM,r]],f=[[JM,null],[XM,l],[YM,i]];for(let m=0;mt[0]>e[0]?1:-1));for(let m=0;m=0?r[Dx]=!0:JM.test(e)?YM.test(e)?r[Lx]=!0:r[Ax]=!0:r[Tx]=!0,Kx(n,e,e,r)}return Kx(n,"localhost",Gx,{ascii:!0}),n.jd=new Vx(qM),{start:n,tokens:Object.assign({groups:e},UM)}}function ay(t,e){const n=cy(e.replace(/[A-Z]/g,(t=>t.toLowerCase()))),o=n.length,r=[];let i=0,s=0;while(s=0&&(d+=n[s].length,h++),c+=n[s].length,i+=n[s].length,s++;i-=d,s-=h,c-=d,r.push({t:p.t,v:e.slice(i-c,i),s:i-c,e:i})}return r}function cy(t){const e=[],n=t.length;let o=0;while(o56319||o+1===n||(r=t.charCodeAt(o+1))<56320||r>57343?t[o]:t.slice(o,o+2);e.push(s),o+=s.length}return e}function py(t,e,n,o,r){let i;const s=e.length;for(let l=0;l=0)i++;if(i>0){e.push(n.join(""));for(let e=parseInt(t.substring(o,o+i),10);e>0;e--)n.pop();o+=i}else n.push(t[o]),o++}return e}const hy={defaultProtocol:"http",events:null,format:fy,formatHref:fy,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function uy(t,e=null){let n=Object.assign({},hy);t&&(n=Object.assign(n,t instanceof uy?t.o:t));const o=n.ignoreTags,r=[];for(let i=0;in?o.substring(0,n)+"…":o},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=hy.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),o=t.get("formatHref",n,this),r=t.get("tagName",n,e),i=this.toFormattedString(t),s={},l=t.get("className",n,e),a=t.get("target",n,e),c=t.get("rel",n,e),p=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return s.href=o,l&&(s.class=l),a&&(s.target=a),c&&(s.rel=c),p&&Object.assign(s,p),{tagName:r,attributes:s,content:i,eventListeners:d}}};const xy=gy("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),My=gy("text"),yy=gy("nl"),vy=gy("url",{isLink:!0,toHref(t=hy.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Gx&&t[1].t===OM}});const wy=t=>new Vx(t);function by({groups:t}){const e=t.domain.concat([wM,kM,WM,QM,CM,SM,AM,LM,DM,nM,RM,IM,PM,HM,FM,qM,jM,KM]),n=[bM,OM,TM,EM,NM,RM,$M,BM,VM,dM,hM,iM,sM,aM,lM,cM,pM,uM,fM,mM,gM,xM,MM,yM,vM],o=[wM,bM,kM,QM,CM,SM,AM,LM,DM,iM,sM,RM,IM,PM,HM,$M,FM,qM,jM,KM],r=wy(),i=_x(r,jM);Fx(i,o,i),Fx(i,t.domain,i);const s=wy(),l=wy(),a=wy();Fx(r,t.domain,s),Fx(r,t.scheme,l),Fx(r,t.slashscheme,a),Fx(s,o,i),Fx(s,t.domain,s);const c=_x(s,WM);_x(i,WM,c),_x(l,WM,c),_x(a,WM,c);const p=_x(i,EM);Fx(p,o,i),Fx(p,t.domain,i);const d=wy();Fx(c,t.domain,d),Fx(d,t.domain,d);const h=_x(d,EM);Fx(h,t.domain,d);const u=wy(xy);Fx(h,t.tld,u),Fx(h,t.utld,u),_x(c,Gx,u);const f=_x(d,DM);_x(f,DM,f),Fx(f,t.domain,d),Fx(u,t.domain,d),_x(u,EM,h),_x(u,DM,f);const m=_x(u,OM);Fx(m,t.numeric,xy);const g=_x(s,DM),x=_x(s,EM);_x(g,DM,g),Fx(g,t.domain,s),Fx(x,o,i),Fx(x,t.domain,s);const M=wy(vy);Fx(x,t.tld,M),Fx(x,t.utld,M),Fx(M,t.domain,s),Fx(M,o,i),_x(M,EM,x),_x(M,DM,g),_x(M,WM,c);const y=_x(M,OM),v=wy(vy);Fx(y,t.numeric,v);const w=wy(vy),b=wy();Fx(w,e,w),Fx(w,n,b),Fx(b,e,w),Fx(b,n,b),_x(M,FM,w),_x(v,FM,w);const k=_x(l,OM),W=_x(a,OM),Q=_x(W,FM),C=_x(Q,FM);Fx(l,t.domain,s),_x(l,EM,x),_x(l,DM,g),Fx(a,t.domain,s),_x(a,EM,x),_x(a,DM,g),Fx(k,t.domain,w),_x(k,FM,w),_x(k,$M,w),Fx(C,t.domain,w),Fx(C,e,w),_x(C,FM,w);const S=[[iM,sM],[lM,aM],[cM,pM],[dM,hM],[uM,fM],[mM,gM],[xM,MM],[yM,vM]];for(let O=0;O=0&&h++,r++,p++;if(h<0)r-=p,r0&&(i.push(Wy(My,e,s)),s=[]),r-=h,p-=h;const t=d.t,o=n.slice(r-p,r);i.push(Wy(t,e,o))}}return s.length>0&&i.push(Wy(My,e,s)),i}function Wy(t,e,n){const o=n[0].s,r=n[n.length-1].e,i=e.slice(o,r);return new t(i,n)}const Qy="undefined"!==typeof console&&console&&console.warn||(()=>{}),Cy="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Sy={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Oy(){return Vx.groups={},Sy.scanner=null,Sy.parser=null,Sy.tokenQueue=[],Sy.pluginQueue=[],Sy.customSchemes=[],Sy.initialized=!1,Sy}function Ty(t,e=!1){if(Sy.initialized&&Qy(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Cy}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');Sy.customSchemes.push([t,e])}function Ay(){Sy.scanner=ly(Sy.customSchemes);for(let t=0;t{const r=e.some((t=>t.docChanged))&&!n.doc.eq(o.doc),i=e.some((t=>t.getMeta("preventAutolink")));if(!r||i)return;const{tr:s}=o,l=Hc(n.doc,[...e]),a=Jc(l);return a.forEach((({newRange:e})=>{const n=Bc(o.doc,e,(t=>t.isTextblock));let r,i;if(n.length>1?(r=n[0],i=o.doc.textBetween(r.pos,r.pos+r.node.nodeSize,void 0," ")):n.length&&o.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(r=n[0],i=o.doc.textBetween(r.pos,e.to,void 0," ")),r&&i){const e=i.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],l=r.pos+i.lastIndexOf(n);if(!n)return!1;const a=Ey(n).map((t=>t.toObject()));if(!Ny(a))return!1;a.filter((t=>t.isLink)).map((t=>({...t,from:l+t.start+1,to:l+t.end+1}))).filter((t=>!o.schema.marks.code||!o.doc.rangeHasMark(t.from,t.to,o.schema.marks.code))).filter((e=>!t.validate||t.validate(e.value))).forEach((e=>{Xc(e.from,e.to,o.doc).some((e=>e.mark.type===t.type))||s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),s.steps.length?s:void 0}})}function Ry(t){return new wn({key:new Wn("handleClickLink"),props:{handleClick:(e,n,o)=>{var r,i;if(t.whenNotEditable&&e.editable)return!1;if(0!==o.button)return!1;let s=o.target;const l=[];while("DIV"!==s.nodeName)l.push(s),s=s.parentNode;if(!l.find((t=>"A"===t.nodeName)))return!1;const a=_c(e.state,t.type.name),c=o.target,p=null!==(r=null===c||void 0===c?void 0:c.href)&&void 0!==r?r:a.href,d=null!==(i=null===c||void 0===c?void 0:c.target)&&void 0!==i?i:a.target;return!(!c||!p)&&(window.open(p,d),!0)}}})}function Iy(t){return new wn({key:new Wn("handlePasteLink"),props:{handlePaste:(e,n,o)=>{const{state:r}=e,{selection:i}=r,{empty:s}=i;if(s)return!1;let l="";o.content.forEach((t=>{l+=t.textContent}));const a=Ly(l).find((t=>t.isLink&&t.value===l));return!(!l||!a)&&(t.editor.commands.setMark(t.type,{href:a.href}),!0)}}})}Ey.scan=ay;const Py=Bp.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((t=>{"string"!==typeof t?Ty(t.scheme,t.optionalSlashes):Ty(t)}))},onDestroy(){Oy()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:t}){var e;return(null===(e=t.href)||void 0===e?void 0:e.startsWith("javascript:"))?["a",Zl(this.options.HTMLAttributes,{...t,href:""}),0]:["a",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Vp({find:t=>{const e=[];if(t){const n=Ly(t).filter((t=>t.isLink));n.length&&n.forEach((t=>e.push({text:t.value,data:{href:t.href},index:t.start})))}return e},type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[];return this.options.autolink&&t.push(Dy({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push(Ry({type:this.type,whenNotEditable:"whenNotEditable"===this.options.openOnClick})),this.options.linkOnPaste&&t.push(Iy({editor:this.editor,type:this.type})),t}}),Hy=Bp.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>{const e=t.hasAttribute("style");return!!e&&{}}}]},renderHTML({HTMLAttributes:t}){return["span",Zl(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=Pc(t,this.type),o=Object.entries(n).some((([,t])=>!!t));return!!o||e.unsetMark(this.name)}}}}),$y=Sa.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return null===(e=t.style.color)||void 0===e?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),By=zp.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth"),n=e?[parseInt(e,10)]:null;return n}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",Zl(this.options.HTMLAttributes,t),0]}}),zy=zp.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth"),n=e?[parseInt(e,10)]:null;return n}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",Zl(this.options.HTMLAttributes,t),0]}}),Vy=By.extend({content:"inline*",parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",t,0]}}),Fy=zy.extend({content:"inline*",parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",t,0]}}),jy=t=>((0,o.Qi)("data-v-660e0d32"),t=t(),(0,o.jt)(),t),Ky={key:0,class:"dialog-overlay"},_y={class:"dialog-content"},qy=jy((()=>(0,o.Lk)("h3",null,"Gottesdienst-Konfiguration",-1))),Uy=jy((()=>(0,o.Lk)("div",null,[(0,o.Lk)("label",{for:"location-select"},"Bitte wählen Sie den Ort für den Gottestdienst aus:")],-1)));function Jy(t,e,n,r,i,s){const l=(0,o.g2)("multiselect");return(0,o.uX)(),(0,o.CE)("div",null,[r.isOpen?((0,o.uX)(),(0,o.CE)("div",Ky,[(0,o.Lk)("div",_y,[qy,Uy,(0,o.Lk)("div",null,[(0,o.bF)(l,{modelValue:r.selectedLocations,"onUpdate:modelValue":e[0]||(e[0]=t=>r.selectedLocations=t),options:r.locations,multiple:!0,"close-on-select":!1,"clear-on-select":!1,"preserve-search":!0,"preselect-first":!1,label:"name","track-by":"id",placeholder:"Orte auswählen"},null,8,["modelValue","options"])]),(0,o.Lk)("div",null,[(0,o.Lk)("button",{onClick:e[1]||(e[1]=(...t)=>r.confirmWorshipConfiguration&&r.confirmWorshipConfiguration(...t))},"Bestätigen"),(0,o.Lk)("button",{onClick:e[2]||(e[2]=(...t)=>r.closeWorshipDialog&&r.closeWorshipDialog(...t))},"Schließen")])])])):(0,o.Q3)("",!0)])}n(1454);var Xy=n(5877),Gy={name:"WorshipDialog",components:{Multiselect:Xy.Ay},emits:["confirm"],setup(t,{emit:e}){const n=(0,g.KR)(!1),o=(0,g.KR)([]),r=(0,g.KR)([]),i=()=>{n.value=!0,l()},s=()=>{n.value=!1},l=async()=>{try{const t=await M.A.get("/event-places");o.value=t.data}catch(t){console.error("Fehler beim Laden der Orte:",t)}},a=()=>{const t=JSON.stringify(r.value.map((t=>t.id)));e("confirm",t),s()};return{isOpen:n,locations:o,selectedLocations:r,openWorshipDialog:i,closeWorshipDialog:s,confirmWorshipConfiguration:a}}},Yy=n(6262);const Zy=(0,Yy.A)(Gy,[["render",Jy],["__scopeId","data-v-660e0d32"]]);var tv=Zy,ev=n(2165);n(7550);const nv=t=>((0,o.Qi)("data-v-208f7992"),t=t(),(0,o.jt)(),t),ov={key:0,class:"dialog-overlay"},rv={class:"dialog-content"},iv=nv((()=>(0,o.Lk)("h3",null,"Kontaktperson hinzufügen",-1))),sv=nv((()=>(0,o.Lk)("label",{for:"type-select"},"Typen:",-1))),lv={key:0},av=nv((()=>(0,o.Lk)("label",{for:"places-select"},"Wählen Sie Orte:",-1))),cv={key:1},pv=nv((()=>(0,o.Lk)("label",{for:"types-select"},"Wählen Sie Typen:",-1))),dv={key:2},hv=nv((()=>(0,o.Lk)("label",{for:"position-select"},"Wählen Sie eine Position:",-1))),uv={key:3},fv=nv((()=>(0,o.Lk)("label",{for:"contact-select"},"Wählen Sie eine Kontaktperson:",-1))),mv=nv((()=>(0,o.Lk)("label",null,"Wählen Sie welche Elemente angezeigt werden sollen:",-1))),gv={class:"display-options"},xv=nv((()=>(0,o.Lk)("label",{for:"displayStyle"},"Anzeigen als",-1))),Mv=["value"];function yv(t,e,n,s,l,a){const c=(0,o.g2)("multiselect");return(0,o.uX)(),(0,o.CE)("div",null,[s.isOpen?((0,o.uX)(),(0,o.CE)("div",ov,[(0,o.Lk)("div",rv,[iv,(0,o.Lk)("div",null,[sv,(0,o.bF)(c,{id:"type-select",modelValue:s.selectedTypes,"onUpdate:modelValue":e[0]||(e[0]=t=>s.selectedTypes=t),options:s.typeOptions,multiple:!0,label:"caption","track-by":"id",onSelect:s.onTypeSelect},null,8,["modelValue","options","onSelect"])]),s.selectedTypes.some((t=>"places"===t.id))?((0,o.uX)(),(0,o.CE)("div",lv,[av,(0,o.bF)(c,{id:"places-select",modelValue:s.selectedPlaces,"onUpdate:modelValue":e[1]||(e[1]=t=>s.selectedPlaces=t),options:s.places,multiple:!0,label:"name","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),s.selectedTypes.some((t=>"types"===t.id))?((0,o.uX)(),(0,o.CE)("div",cv,[pv,(0,o.bF)(c,{id:"types-select",modelValue:s.selectedEventTypes,"onUpdate:modelValue":e[2]||(e[2]=t=>s.selectedEventTypes=t),options:s.eventTypes,multiple:!0,label:"caption","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),s.selectedTypes.some((t=>"position"===t.id))?((0,o.uX)(),(0,o.CE)("div",dv,[hv,(0,o.bF)(c,{id:"position-select",modelValue:s.selectedPositions,"onUpdate:modelValue":e[3]||(e[3]=t=>s.selectedPositions=t),options:s.positions,multiple:!1,label:"caption","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),s.selectedTypes.some((t=>"specific"===t.id))?((0,o.uX)(),(0,o.CE)("div",uv,[fv,(0,o.bF)(c,{id:"contact-select",modelValue:s.selectedContact,"onUpdate:modelValue":e[4]||(e[4]=t=>s.selectedContact=t),options:s.contacts,multiple:!1,label:"name","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),(0,o.Lk)("div",null,[mv,(0,o.Lk)("div",gv,[(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=t=>s.displayOptions.phone=t)},null,512),[[i.lH,s.displayOptions.phone]]),(0,o.eW)(" Telefon")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=t=>s.displayOptions.street=t)},null,512),[[i.lH,s.displayOptions.street]]),(0,o.eW)(" Straße")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=t=>s.displayOptions.zipcode=t)},null,512),[[i.lH,s.displayOptions.zipcode]]),(0,o.eW)(" Postleitzahl")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[8]||(e[8]=t=>s.displayOptions.city=t)},null,512),[[i.lH,s.displayOptions.city]]),(0,o.eW)(" Stadt")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[9]||(e[9]=t=>s.displayOptions.email=t)},null,512),[[i.lH,s.displayOptions.email]]),(0,o.eW)(" E-Mail")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[10]||(e[10]=t=>s.displayOptions.positions=t)},null,512),[[i.lH,s.displayOptions.positions]]),(0,o.eW)(" Positionen")])]),(0,o.Lk)("div",null,[xv,(0,o.bo)((0,o.Lk)("select",{id:"displayStyle","onUpdate:modelValue":e[11]||(e[11]=t=>s.displayStyle=t)},[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(s.displayStyles,(t=>((0,o.uX)(),(0,o.CE)("option",{value:t.id,key:t.id},(0,r.v_)(t.label),9,Mv)))),128))],512),[[i.u1,s.displayStyle]])])]),(0,o.Lk)("div",null,[(0,o.Lk)("button",{onClick:e[12]||(e[12]=(...t)=>s.confirmAddContactConfiguration&&s.confirmAddContactConfiguration(...t))},"Bestätigen"),(0,o.Lk)("button",{onClick:e[13]||(e[13]=(...t)=>s.closeAddContactDialog&&s.closeAddContactDialog(...t))},"Schließen")])])])):(0,o.Q3)("",!0)])}n(4520);var vv={name:"AddContactDialog",components:{Multiselect:Xy.Ay},emits:["confirm"],setup(t,{emit:e}){const n=(0,g.KR)(!1),o=(0,g.KR)([]),r=(0,g.KR)([]),i=(0,g.KR)([]),s=(0,g.KR)([]),l=(0,g.KR)(null),a=(0,g.KR)([]),c=(0,g.KR)([]),p=(0,g.KR)([]),d=(0,g.KR)([]),h=(0,g.KR)("float"),u=(0,g.KR)({phone:!1,street:!1,zipcode:!1,city:!1,email:!1,positions:!1}),f=(0,g.KR)([{id:"all",caption:"Alle"},{id:"specific",caption:"Eine Person"},{id:"places",caption:"Für bestimmte Orte"},{id:"types",caption:"Für bestimmte Typen"},{id:"position",caption:"Für bestimmte Positionen"}]),m=(0,g.KR)([{id:"float",label:"Durchlaufender Text"},{id:"box",label:"Textbox"}]),x=()=>{n.value=!0,b(),k(),W(),Q()},y=()=>{n.value=!1},v=()=>{a.value.some((t=>"all"===t.id))?(a.value=[{id:"all",caption:"Alle"}],l.value=null,c.value=[],d.value=[],p.value=[]):a.value.some((t=>"specific"===t.id))?(a.value=[{id:"specific",caption:"Eine Person"}],c.value=[],d.value=[],p.value=[]):(a.value.some((t=>"places"===t.id))||a.value.some((t=>"types"===t.id))||a.value.some((t=>"position"===t.id)))&&(l.value=null)},w=()=>{console.log("Selected positions:",p.value);let t="";const n=Object.keys(u.value).filter((t=>u.value[t]));let o={};a.value.some((t=>"all"===t.id))?o["id"]="all":a.value.some((t=>"specific"===t.id))&&l.value?o["id"]=l.value.id:(o["types"]=c.value.map((t=>t.id)),o["places"]=d.value.map((t=>t.id)),o["positions"]=Array.isArray(p.value)?p.value.map((t=>t.id)):[]);const r={selection:o,display:n,style:h.value};t="{{ contact:"+JSON.stringify(r)+" }}",console.log("Emitting config:",t),e("confirm",t),y()},b=async()=>{try{const t=await M.A.get("/contact-persons");o.value=t.data}catch(t){console.error("Fehler beim Laden der Kontaktpersonen:",t)}},k=async()=>{try{const t=await M.A.get("/event-types");r.value=t.data}catch(t){console.error("Fehler beim Laden der Event-Typen:",t)}},W=async()=>{try{const t=await M.A.get("/event-places");i.value=t.data}catch(t){console.error("Fehler beim Laden der Orte:",t)}},Q=async()=>{try{const t=await M.A.get("/positions");s.value=t.data}catch(t){console.error("Fehler beim Laden der Positionen:",t)}};return{isOpen:n,contacts:o,selectedContact:l,selectedTypes:a,selectedEventTypes:c,selectedPlaces:d,displayOptions:u,displayStyle:h,displayStyles:m,typeOptions:f,openAddContactDialog:x,closeAddContactDialog:y,confirmAddContactConfiguration:w,onTypeSelect:v,places:i,eventTypes:r,positions:s,selectedPositions:p}}};const wv=(0,Yy.A)(vv,[["render",yv],["__scopeId","data-v-208f7992"]]);var bv=wv;const kv=t=>((0,o.Qi)("data-v-577814c6"),t=t(),(0,o.jt)(),t),Wv={key:0,class:"dialog-overlay"},Qv={class:"dialog-content"},Cv=kv((()=>(0,o.Lk)("h3",null,"Ereignisse hinzufügen",-1))),Sv=kv((()=>(0,o.Lk)("label",{for:"selection-type"},"Wählen Sie den Typ:",-1))),Ov={key:0},Tv=kv((()=>(0,o.Lk)("label",{for:"places-select"},"Wählen Sie Orte:",-1))),Av={key:1},Ev=kv((()=>(0,o.Lk)("label",{for:"types-select"},"Wählen Sie Typen:",-1))),Lv={key:2},Nv=kv((()=>(0,o.Lk)("label",{for:"event-select"},"Wählen Sie ein Event:",-1))),Dv=kv((()=>(0,o.Lk)("label",null,"Wählen Sie welche Elemente angezeigt werden sollen:",-1))),Rv={class:"display-options"};function Iv(t,e,n,r,s,l){const a=(0,o.g2)("multiselect");return(0,o.uX)(),(0,o.CE)("div",null,[r.isOpen?((0,o.uX)(),(0,o.CE)("div",Wv,[(0,o.Lk)("div",Qv,[Cv,(0,o.Lk)("div",null,[Sv,(0,o.bF)(a,{id:"selection-type",modelValue:r.selectedTypes,"onUpdate:modelValue":e[0]||(e[0]=t=>r.selectedTypes=t),options:r.typeOptions,multiple:!0,"close-on-select":!1,"clear-on-select":!1,"preserve-search":!0,onSelect:r.onTypeSelect},null,8,["modelValue","options","onSelect"])]),(0,o.Lk)("div",null,[(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=t=>r.isHomepage=t)},null,512),[[i.lH,r.isHomepage]]),(0,o.eW)(" Auch Ereignisse für die Homepage zeigen")])]),r.selectedTypes.includes("Für bestimmte Orte")?((0,o.uX)(),(0,o.CE)("div",Ov,[Tv,(0,o.bF)(a,{id:"places-select",modelValue:r.selectedPlaces,"onUpdate:modelValue":e[2]||(e[2]=t=>r.selectedPlaces=t),options:r.places,multiple:!0,"close-on-select":!1,"clear-on-select":!1,"preserve-search":!0,label:"name","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),r.selectedTypes.includes("Für bestimmte Typen")?((0,o.uX)(),(0,o.CE)("div",Av,[Ev,(0,o.bF)(a,{id:"types-select",modelValue:r.selectedEventTypes,"onUpdate:modelValue":e[3]||(e[3]=t=>r.selectedEventTypes=t),options:r.eventTypes,multiple:!0,"close-on-select":!1,"clear-on-select":!1,"preserve-search":!0,label:"caption","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),r.selectedTypes.includes("Ein bestimmtes")?((0,o.uX)(),(0,o.CE)("div",Lv,[Nv,(0,o.bF)(a,{id:"event-select",modelValue:r.selectedEvent,"onUpdate:modelValue":e[4]||(e[4]=t=>r.selectedEvent=t),options:r.events,multiple:!1,label:"name","track-by":"id"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),(0,o.Lk)("div",null,[Dv,(0,o.Lk)("div",Rv,[(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=t=>r.displayOptions.name=t)},null,512),[[i.lH,r.displayOptions.name]]),(0,o.eW)(" Name")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=t=>r.displayOptions.type=t)},null,512),[[i.lH,r.displayOptions.type]]),(0,o.eW)(" Typ")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=t=>r.displayOptions.place=t)},null,512),[[i.lH,r.displayOptions.place]]),(0,o.eW)(" Ort")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[8]||(e[8]=t=>r.displayOptions.description=t)},null,512),[[i.lH,r.displayOptions.description]]),(0,o.eW)(" Beschreibung")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[9]||(e[9]=t=>r.displayOptions.time=t)},null,512),[[i.lH,r.displayOptions.time]]),(0,o.eW)(" Uhrzeit")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[10]||(e[10]=t=>r.displayOptions.contactPerson=t)},null,512),[[i.lH,r.displayOptions.contactPerson]]),(0,o.eW)(" Kontaktperson")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[11]||(e[11]=t=>r.displayOptions.day=t)},null,512),[[i.lH,r.displayOptions.day]]),(0,o.eW)(" Veranstaltungstag")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[12]||(e[12]=t=>r.displayOptions.institution=t)},null,512),[[i.lH,r.displayOptions.institution]]),(0,o.eW)(" Institution")])])]),(0,o.Lk)("div",null,[(0,o.Lk)("button",{onClick:e[13]||(e[13]=(...t)=>r.confirmAddEventConfiguration&&r.confirmAddEventConfiguration(...t))},"Bestätigen"),(0,o.Lk)("button",{onClick:e[14]||(e[14]=(...t)=>r.closeAddEventDialog&&r.closeAddEventDialog(...t))},"Schließen")])])])):(0,o.Q3)("",!0)])}var Pv={name:"AddEventDialog",components:{Multiselect:Xy.Ay},emits:["confirm"],setup(t,{emit:e}){const n=(0,g.KR)(!1),o=(0,g.KR)(["Alle","Für bestimmte Orte","Für bestimmte Typen","Ein bestimmtes","Ereignisse für Homepage"]),r=(0,g.KR)([]),i=(0,g.KR)([]),s=(0,g.KR)([]),l=(0,g.KR)([]),a=(0,g.KR)([]),c=(0,g.KR)([]),p=(0,g.KR)(null),d=(0,g.KR)(!1),h=(0,g.KR)({name:!1,type:!1,place:!1,description:!1,time:!1,contactPerson:!1,day:!1,institution:!1}),u=()=>{n.value=!0,y(),v(),w()},f=()=>{n.value=!1},m=t=>{r.value="Alle"===t||"Ein bestimmtes"===t?[t]:r.value.filter((t=>"Alle"!==t&&"Ein bestimmtes"!==t))},x=()=>{const t={};t.display=Object.keys(h.value).filter((t=>h.value[t])),d.value?t.id="home":r.value.includes("Alle")?t.id="all":r.value.includes("Ein bestimmtes")?t.id=p.value.id:(t.types=c.value.map((t=>t.id)),t.places=a.value.map((t=>t.id))),e("confirm","{{ events:"+JSON.stringify(t)+" }}"),f()},y=async()=>{try{const t=await M.A.get("/event-places");i.value=t.data}catch(t){console.error("Fehler beim Laden der Orte:",t)}},v=async()=>{try{const t=await M.A.get("/event-types");s.value=t.data}catch(t){console.error("Fehler beim Laden der Typen:",t)}},w=async()=>{try{const t=await M.A.get("/events");l.value=t.data}catch(t){console.error("Fehler beim Laden der Events:",t)}};return{isOpen:n,typeOptions:o,selectedTypes:r,places:i,eventTypes:s,events:l,selectedPlaces:a,selectedEventTypes:c,selectedEvent:p,displayOptions:h,openAddEventDialog:u,closeAddEventDialog:f,confirmAddEventConfiguration:x,onTypeSelect:m,isHomepage:d}}};const Hv=(0,Yy.A)(Pv,[["render",Iv],["__scopeId","data-v-577814c6"]]);var $v=Hv;const Bv=t=>((0,o.Qi)("data-v-7d73fa71"),t=t(),(0,o.jt)(),t),zv={key:0,class:"modal"},Vv={class:"modal-content"},Fv=Bv((()=>(0,o.Lk)("h2",null,"Link hinzufügen",-1))),jv=Bv((()=>(0,o.Lk)("td",null,[(0,o.Lk)("label",{for:"link-url"},"URL:")],-1))),Kv=Bv((()=>(0,o.Lk)("td",null,[(0,o.Lk)("label",{for:"link-text"},"Linktext:")],-1)));function _v(t,e,n,r,s,l){return s.showDialog?((0,o.uX)(),(0,o.CE)("div",zv,[(0,o.Lk)("div",Vv,[(0,o.Lk)("span",{class:"close",onClick:e[0]||(e[0]=(...t)=>l.closeDialog&&l.closeDialog(...t))},"×"),Fv,(0,o.Lk)("table",null,[(0,o.Lk)("tr",null,[jv,(0,o.Lk)("td",null,[(0,o.bo)((0,o.Lk)("input",{id:"link-url","onUpdate:modelValue":e[1]||(e[1]=t=>s.url=t),type:"text"},null,512),[[i.Jo,s.url]])])]),(0,o.Lk)("tr",null,[Kv,(0,o.Lk)("td",null,[(0,o.bo)((0,o.Lk)("input",{id:"link-text","onUpdate:modelValue":e[2]||(e[2]=t=>s.text=t),type:"text"},null,512),[[i.Jo,s.text]])])])]),(0,o.Lk)("button",{onClick:e[3]||(e[3]=(...t)=>l.confirm&&l.confirm(...t))},"Hinzufügen")])])):(0,o.Q3)("",!0)}var qv={name:"AddLinkDialog",data(){return{showDialog:!1,url:"",text:""}},methods:{openAddLinkDialog(){this.showDialog=!0},closeDialog(){this.showDialog=!1,this.url="",this.text=""},confirm(){this.$emit("confirm",this.url,this.text),this.closeDialog()}}};const Uv=(0,Yy.A)(qv,[["render",_v],["__scopeId","data-v-7d73fa71"]]);var Jv=Uv;const Xv=t=>((0,o.Qi)("data-v-c200d490"),t=t(),(0,o.jt)(),t),Gv={key:0,class:"modal"},Yv={class:"modal-content"},Zv=Xv((()=>(0,o.Lk)("h2",null,"Datei zum Download hinzufügen",-1))),tw=Xv((()=>(0,o.Lk)("td",null,[(0,o.Lk)("label",{for:"file-select"},"Datei auswählen:")],-1))),ew=["value"];function nw(t,e,n,s,l,a){return l.showDialog?((0,o.uX)(),(0,o.CE)("div",Gv,[(0,o.Lk)("div",Yv,[(0,o.Lk)("span",{class:"close",onClick:e[0]||(e[0]=(...t)=>a.closeDialog&&a.closeDialog(...t))},"×"),Zv,(0,o.Lk)("table",null,[(0,o.Lk)("tr",null,[tw,(0,o.Lk)("td",null,[(0,o.bo)((0,o.Lk)("select",{id:"file-select","onUpdate:modelValue":e[1]||(e[1]=t=>l.selectedFile=t)},[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(l.files,(t=>((0,o.uX)(),(0,o.CE)("option",{key:t.id,value:t},(0,r.v_)(t.title)+" ("+(0,r.v_)(t.originalName)+") ",9,ew)))),128))],512),[[i.u1,l.selectedFile]])])])]),(0,o.Lk)("button",{onClick:e[2]||(e[2]=(...t)=>a.confirm&&a.confirm(...t))},"Hinzufügen")])])):(0,o.Q3)("",!0)}var ow={name:"AddDownloadDialog",data(){return{showDialog:!1,selectedFile:null,files:[]}},methods:{async openAddDownloadDialog(){this.showDialog=!0;try{const t=await M.A.get("/files");this.files=t.data}catch(t){console.error("Fehler beim Abrufen der Dateien:",t)}},closeDialog(){this.showDialog=!1,this.selectedFile=null},confirm(){this.selectedFile?(console.log(this.selectedFile.hash),this.$emit("confirm",{hash:this.selectedFile.hash}),this.closeDialog()):alert("Bitte wählen Sie eine Datei aus.")}}};const rw=(0,Yy.A)(ow,[["render",nw],["__scopeId","data-v-c200d490"]]);var iw=rw;const sw=t=>((0,o.Qi)("data-v-1dd5c408"),t=t(),(0,o.jt)(),t),lw={key:0,class:"dialog-overlay"},aw={class:"dialog-content"},cw=sw((()=>(0,o.Lk)("h3",null,"Institution hinzufügen",-1))),pw=sw((()=>(0,o.Lk)("label",{for:"institution-select"},"Wählen Sie eine Institution:",-1))),dw=sw((()=>(0,o.Lk)("label",null,"Wählen Sie welche Elemente angezeigt werden sollen:",-1))),hw={class:"display-options"},uw=sw((()=>(0,o.Lk)("label",{for:"displayStyle"},"Anzeigen als",-1))),fw=["value"];function mw(t,e,n,s,l,a){const c=(0,o.g2)("multiselect");return(0,o.uX)(),(0,o.CE)("div",null,[s.isOpen?((0,o.uX)(),(0,o.CE)("div",lw,[(0,o.Lk)("div",aw,[cw,(0,o.Lk)("div",null,[pw,(0,o.bF)(c,{id:"institution-select",modelValue:s.selectedInstitution,"onUpdate:modelValue":e[0]||(e[0]=t=>s.selectedInstitution=t),options:s.institutionOptions,multiple:!1,label:"name","track-by":"id",onSelect:s.onInstitutionSelect},null,8,["modelValue","options","onSelect"])]),(0,o.Lk)("div",null,[dw,(0,o.Lk)("div",hw,[(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=t=>s.displayOptions.street=t)},null,512),[[i.lH,s.displayOptions.street]]),(0,o.eW)(" Straße")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=t=>s.displayOptions.zipcode=t)},null,512),[[i.lH,s.displayOptions.zipcode]]),(0,o.eW)(" Postleitzahl")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=t=>s.displayOptions.city=t)},null,512),[[i.lH,s.displayOptions.city]]),(0,o.eW)(" Stadt")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=t=>s.displayOptions.phone=t)},null,512),[[i.lH,s.displayOptions.phone]]),(0,o.eW)(" Telefon")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=t=>s.displayOptions.fax=t)},null,512),[[i.lH,s.displayOptions.fax]]),(0,o.eW)(" Fax")]),(0,o.Lk)("label",null,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=t=>s.displayOptions.email=t)},null,512),[[i.lH,s.displayOptions.email]]),(0,o.eW)(" E-Mail")])]),(0,o.Lk)("div",null,[uw,(0,o.bo)((0,o.Lk)("select",{id:"displayStyle","onUpdate:modelValue":e[7]||(e[7]=t=>s.displayStyle=t)},[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(s.displayStyles,(t=>((0,o.uX)(),(0,o.CE)("option",{value:t.id,key:t.id},(0,r.v_)(t.label),9,fw)))),128))],512),[[i.u1,s.displayStyle]])])]),(0,o.Lk)("div",null,[(0,o.Lk)("button",{onClick:e[8]||(e[8]=(...t)=>s.confirmAddInstitutionConfiguration&&s.confirmAddInstitutionConfiguration(...t))},"Bestätigen"),(0,o.Lk)("button",{onClick:e[9]||(e[9]=(...t)=>s.closeAddInstitutionDialog&&s.closeAddInstitutionDialog(...t))},"Schließen")])])])):(0,o.Q3)("",!0)])}var gw={name:"AddInstitutionDialog",components:{Multiselect:Xy.Ay},emits:["confirm"],setup(t,{emit:e}){const n=(0,g.KR)(!1),o=(0,g.KR)([]),r=(0,g.KR)(null),i=(0,g.KR)("float"),s=(0,g.KR)({street:!1,zipcode:!1,city:!1,phone:!1,fax:!1,email:!1}),l=(0,g.KR)([{id:"all",name:"Alle"},...o.value]),a=(0,g.KR)([{id:"float",label:"Durchlaufender Text"},{id:"box",label:"Textbox"}]),c=()=>{n.value=!0,u()},p=()=>{n.value=!1},d=()=>{r.value&&"all"===r.value.id&&(l.value=[{id:"all",name:"Alle"}],r.value={id:"all",name:"Alle"})},h=()=>{const t=Object.keys(s.value).filter((t=>s.value[t])),n={id:r.value.id,display:t,style:i.value},o=`{{ institution:${JSON.stringify(n)} }}`;e("confirm",o),p()},u=async()=>{try{const t=await M.A.get("/institutions");o.value=t.data,l.value=[{id:"all",name:"Alle"},...o.value]}catch(t){console.error("Fehler beim Laden der Institutionen:",t)}};return{isOpen:n,institutions:o,selectedInstitution:r,displayOptions:s,displayStyle:i,displayStyles:a,institutionOptions:l,openAddInstitutionDialog:c,closeAddInstitutionDialog:p,confirmAddInstitutionConfiguration:h,onInstitutionSelect:d}}};const xw=(0,Yy.A)(gw,[["render",mw],["__scopeId","data-v-1dd5c408"]]);var Mw=xw;const yw=Symbol(),vw=yw,ww=((0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n});(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const bw=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),kw=(0,o.Fv)('',8),Ww=[kw];function Qw(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),Ww,16)}const Cw=ww(bw,[["render",Qw]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const Sw=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),Ow=(0,o.Fv)('',8),Tw=[Ow];function Aw(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),Tw,16)}const Ew=ww(Sw,[["render",Aw]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const Lw=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),Nw=(0,o.Lk)("path",{d:"M12 3L12 21M12 21L20.5 12.5M12 21L3.5 12.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Dw=[Nw];function Rw(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),Dw,16)}const Iw=ww(Lw,[["render",Rw]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const Pw=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),Hw=(0,o.Lk)("path",{d:"M3 12L21 12M21 12L12.5 3.5M21 12L12.5 20.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),$w=[Hw];function Bw(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),$w,16)}const zw=ww(Pw,[["render",Bw]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const Vw=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),Fw=(0,o.Lk)("path",{d:"M12 11.6667H8M12 11.6667C12 11.6667 15.3333 11.6667 15.3333 8.33333C15.3333 5.00002 12 5 12 5C12 5 12 5 12 5H8.6C8.26863 5 8 5.26863 8 5.6V11.6667M12 11.6667C12 11.6667 16 11.6667 16 15.3333C16 19 12 19 12 19C12 19 12 19 12 19H8.6C8.26863 19 8 18.7314 8 18.4V11.6667",stroke:"currentColor","stroke-width":"1.5"},null,-1),jw=[Fw];function Kw(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),jw,16)}const _w=ww(Vw,[["render",Kw]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const qw=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),Uw=(0,o.Lk)("path",{d:"M6 20L18 20",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Jw=(0,o.Lk)("path",{d:"M12 4V16M12 16L15.5 12.5M12 16L8.5 12.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Xw=[Uw,Jw];function Gw(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),Xw,16)}const Yw=ww(qw,[["render",Gw]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const Zw=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),tb=(0,o.Lk)("path",{d:"M11 5L14 5M17 5L14 5M14 5L10 19M10 19L7 19M10 19L13 19",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),eb=[tb];function nb(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),eb,16)}const ob=ww(Zw,[["render",nb]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const rb=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),ib=(0,o.Fv)('',6),sb=[ib];function lb(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),sb,16)}const ab=ww(rb,[["render",lb]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const cb=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),pb=(0,o.Fv)('',7),db=[pb];function hb(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),db,16)}const ub=ww(cb,[["render",hb]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const fb=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),mb=(0,o.Lk)("path",{d:"M8 21H20.4C20.7314 21 21 20.7314 21 20.4V3.6C21 3.26863 20.7314 3 20.4 3H3.6C3.26863 3 3 3.26863 3 3.6V16",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),gb=(0,o.Lk)("path",{d:"M3.5 20.5L12 12M12 12V16M12 12H8",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),xb=[mb,gb];function Mb(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),xb,16)}const yb=ww(fb,[["render",Mb]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const vb=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),wb=(0,o.Fv)('',5),bb=[wb];function kb(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),bb,16)}const Wb=ww(vb,[["render",kb]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const Qb=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),Cb=(0,o.Lk)("path",{d:"M3 12L21 12",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Sb=(0,o.Lk)("path",{d:"M16.2857 3L10.068 3C7.82129 3 6 4.82129 6 7.06797C6 8.81895 7.12044 10.3735 8.78157 10.9272L12 12M6 21H13.932C16.1787 21 18 19.1787 18 16.932C18 16.2409 17.8255 15.5804 17.512 15",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Ob=[Cb,Sb];function Tb(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),Ob,16)}const Ab=ww(Qb,[["render",Tb]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const Eb=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),Lb=(0,o.Fv)('',5),Nb=[Lb];function Db(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),Nb,16)}const Rb=ww(Eb,[["render",Db]]),Ib=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),Pb=(0,o.Lk)("path",{d:"M3 12H7.5H12H16.5H21M3 12V16.5M3 12V7.5M21 12V16.5M21 12V7.5M3 16.5V20.4C3 20.7314 3.26863 21 3.6 21H7.5H12H16.5H20.4C20.7314 21 21 20.7314 21 20.4V16.5M3 16.5H7.5H12H16.5H21M21 7.5V3.6C21 3.26863 20.7314 3 20.4 3H16.5H12H7.5H3.6C3.26863 3 3 3.26863 3 3.6V7.5M21 7.5H16.5H12H7.5H3",stroke:"currentColor","stroke-width":"1.5"},null,-1),Hb=[Pb];function $b(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),Hb,16)}const Bb=ww(Ib,[["render",$b]]),zb=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),Vb=(0,o.Fv)('',7),Fb=[Vb];function jb(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),Fb,16)}const Kb=ww(zb,[["render",jb]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));const _b=(0,o.pM)((()=>({context:(0,o.WQ)(vw)}))),qb=(0,o.Lk)("path",{d:"M16 5V11C16 13.2091 14.2091 15 12 15V15C9.79086 15 8 13.2091 8 11V5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Ub=(0,o.Lk)("path",{d:"M6 19L18 19",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Jb=[qb,Ub];function Xb(t,e,n,r,i,s){return(0,o.uX)(),(0,o.CE)("svg",(0,o.v6)({width:"24",height:"24","stroke-width":"1.5",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.context),Jb,16)}const Gb=ww(_b,[["render",Xb]]);(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));(0,o.pM)((()=>({context:(0,o.WQ)(vw)})));var Yb={name:"EditPagesComponent",components:{EditorContent:sf,WorshipDialog:tv,AddImageDialog:ev.A,BoldIcon:_w,ItalicIcon:ob,UnderlineIcon:Gb,StrikethroughIcon:Ab,ListIcon:ab,NumberedListLeftIcon:ub,TableIcon:Kb,Table2ColumnsIcon:Rb,ArrowDownIcon:Iw,ArrowRightIcon:zw,TableRowsIcon:Bb,AlignTopBoxIcon:Ew,AlignLeftBoxIcon:Cw,StatsReportIcon:Wb,AddEventDialog:$v,AddContactDialog:bv,AddLinkDialog:Jv,AddDownloadDialog:iw,AddInstitutionDialog:Mw,OpenInWindowIcon:yb,DownloadIcon:Yw},setup(){const t=(0,x.Pj)(),e=(0,g.KR)([]),n=(0,g.KR)(""),r=(0,o.EW)((()=>t.state.pageContent)),i=(0,g.KR)(null),s=(0,g.KR)(null),l=(0,g.KR)(null),a=(0,g.KR)(null),c=(0,g.KR)(null),p=(0,g.KR)(null),d=(0,g.KR)(null),h=(0,g.KR)(null),u=lf({extensions:[Am,Wx.configure({resizable:!0}),Qx,Vy,Fy,ff,ym,Cx,Om,Mf,Wm,zf.configure({levels:[3,4,5,6]}),Py.configure({openOnClick:!1}),Hy,$y],content:"",onUpdate:({editor:e})=>{t.commit("SET_PAGE_CONTENT",e.getHTML())}}),f=(t,e,n="")=>{t.forEach((t=>{const o=n?`${n} -> ${t.name}`:t.name;e.push({...t,name:o}),t.submenu&&t.submenu.length&&f(t.submenu,e,o)}))},m=async()=>{try{const n=await M.A.get("/menu-data"),o=n.data,r=[];f(o,r),e.value=r.sort(((t,e)=>t.name.localeCompare(e.name))),t.commit("setMenuData",o)}catch(n){console.error("Fehler beim Abrufen der Seiten:",n)}},y=async()=>{try{await t.dispatch("loadPageContent",n.value);const e=t.getters.pageContent,o=()=>{u.value&&u.value.commands?u.value.commands.setContent(e,!1):setTimeout(o,100)};o()}catch(e){console.error("Fehler beim Laden des Seiteninhalts:",e)}},v=async()=>{try{const o=e.value.find((t=>t.link===n.value))?.name||"";if(!o)return;const r=u.value.getHTML();t.commit("SET_PAGE_CONTENT",r),await t.dispatch("savePageContent",{link:n.value,name:o})}catch(o){console.error("Fehler beim Speichern des Seiteninhalts:",o)}};(0,o.sV)(m);const w=(0,o.EW)((()=>e.value));(0,o.wB)(n,(n=>{t.dispatch("setSelectedPage",n);const o=e.value.find((t=>t.link===n));o&&t.dispatch("setPageTitle",o.name),y()}));const b=()=>{i.value.openWorshipDialog()},k=()=>{s.value.openAddImageDialog()},W=t=>{if(u.value){const e={location:t,order:"date asc"};u.value.chain().focus().insertContent("{{ worshipslist:"+JSON.stringify(e)+" }}").run()}},Q=t=>{u.value&&u.value.chain().focus().insertContent(`{{ image:${t} }}`).run()},C=()=>{l.value.openAddEventDialog()},S=t=>{u.value&&u.value.chain().focus().insertContent(t).run()},O=()=>{a.value.openAddContactDialog()},T=t=>{u.value&&u.value.chain().focus().insertContent(t).run()},A=()=>{c.value.openAddLinkDialog()},E=(t,e)=>{if(!u.value)return;if(!t)return;const n=u.value.state.doc.textBetween(u.value.state.selection.from,u.value.state.selection.to),o=e&&e.trim()||n||t,r=t=>t.replace(/[&<>"']/g,(t=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[t]))),i=r(o),s=t.trim();u.value.chain().focus().insertContent(`${i}`).run()},L=()=>{p.value.openAddDownloadDialog()},N=({hash:t})=>{if(t&&u.value){const e="{{ download:"+t+" }}";u.value.chain().focus().insertContent(e).run()}},D=()=>{d.value.openAddInstitutionDialog()},R=t=>{u.value&&u.value.chain().focus().insertContent(t).run()},I=()=>{h.value.click()},P=t=>{const e=t.target.value;u.value&&u.value.chain().focus().setColor(e).run()},H=t=>{u.value.chain().focus().toggleHeading({level:t}).run()},$=()=>{u.value.chain().focus().toggleItalic().run()},B=()=>{u.value.chain().focus().toggleBold().run()},z=()=>{u.value.chain().focus().toggleUnderline().run()},V=()=>{u.value.chain().focus().toggleStrike().run()},F=()=>{u.value.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},j=()=>{u.value.chain().focus().toggleBulletList().run()},K=()=>{u.value.chain().focus().toggleOrderedList().run()};return{pages:e,sortedPages:w,selectedPage:n,editor:u,loadPageContent:y,savePageContent:v,pageHtmlContent:r,openWorshipDialog:b,insertWorshipList:W,worshipDialog:i,addImageDialog:s,openAddImageDialog:k,insertImage:Q,addEventDialog:l,openAddEventsDialog:C,addContactDialog:a,openAddContactDialog:O,insertContact:T,insertEvent:S,addLinkDialog:c,openAddLinkDialog:A,insertLink:E,addDownloadDialog:p,openAddDownloadDialog:L,insertDownload:N,addInstitutionDialog:d,openAddInstitutionDialog:D,insertInstitution:R,colorPicker:h,openColorPicker:I,setColor:P,toggleHeading:H,toggleBold:B,toggleItalic:$,toggleUnderline:z,toggleStrike:V,insertTable:F,toggleBulletList:j,toggleOrderedList:K}}};const Zb=(0,Yy.A)(Yb,[["render",m],["__scopeId","data-v-52a47670"]]);var tk=Zb}}]); //# sourceMappingURL=662.36a2e177.js.map