import{_ as bn,x as Br,o as U,m as nr,I as f1,e as sn,d as de,J as Ls,i as br,z as Wo,a as ae,j as Qt,y as nd,K as si,L as id,M as T4,N as p1,k as _s,O as hs,P as D4,g as m1,Q as g1,R as O4,S as N4,U as sd,c as Z,F as ra,r as b1,n as Le,t as Ru,B as L4,b as ge,V as go,p as Vi,q as _4,W as z4,C as na,s as R4,u as I4,w as Nr}from"./main-D6qyxymd.js";const B4={props:{content:{type:Object,required:!0},wwElementState:{type:Object,required:!0}},setup(t){const{getIcon:e}=wwLib.useIcons(),{hasLink:r,tag:n,properties:i}=wwLib.wwElement.useLink(),s=sn(null),o=de(()=>t.wwElementState.props.icon||t.content.icon),a=de(()=>t.wwElementState.props.color||t.content.color),l=de(()=>``);return Ls(async()=>{try{s.value=await e(o.value)}catch{s.value=null}}),{getIcon:e,iconText:s,hasLink:r,tag:n,properties:i,color:a,placeholder:l}},computed:{iconHTML(){return this.iconText||this.placeholder},style(){return{"--icon-color":this.color}}}};function F4(t,e,r,n,i,s){return U(),Br(f1(n.hasLink?n.tag:"div"),nr({innerHTML:s.iconHTML},n.properties,{style:s.style,class:["ww-icon",{"-link":n.hasLink}]}),null,16,["innerHTML","style","class"])}const FM=bn(B4,[["render",F4],["__scopeId","data-v-ec5c837b"]]),P4={center:"center",right:"flex-end",left:"flex-start",justify:"center"},H4={props:{content:{type:Object,required:!0},wwFrontState:{type:Object,required:!0},wwElementState:{type:Object,required:!0}},emits:["update:content","update:content:effect","change-menu-visibility","change-borders-style","add-state","remove-state","trigger-event"],setup(t){const{hasLink:e,tag:r,properties:n}=wwLib.wwElement.useLink({isDisabled:de(()=>t.content.disabled)});return{hasLink:e,linkTag:r,properties:n}},data(){return{isReallyFocused:!1,isReallyActive:!1}},computed:{buttonStyle(){return{justifyContent:P4[this.content["_ww-text_textAlign"]]||"center"}},isEditing(){return!1},tag(){return this.isEditing?"div":this.hasLink?this.linkTag:this.content.buttonType==="submit"||this.content.buttonType==="reset"||this.content.buttonType==="button"?"button":"div"},buttonType(){return this.isEditing||this.hasLink?"":this.content.buttonType==="submit"||this.content.buttonType==="reset"||this.content.buttonType==="button"?this.content.buttonType:""},text(){return this.wwElementState.props.text},isFocused(){return this.isReallyFocused},isActive(){return this.isReallyActive}},watch:{"content.disabled":{immediate:!0,handler(t){t?this.$emit("add-state","disabled"):this.$emit("remove-state","disabled")}},isReallyFocused(t,e){t&&!e?this.$emit("trigger-event",{name:"focus"}):!t&&e&&this.$emit("trigger-event",{name:"blur"})},isFocused:{immediate:!0,handler(t){t?this.$emit("add-state","focus"):this.$emit("remove-state","focus")}},isActive:{immediate:!0,handler(t){t?this.$emit("add-state","active"):this.$emit("remove-state","active")}}},methods:{onBlur(){this.isReallyFocused=!1},onActivate(t){this.isReallyActive=!0;const e=t.type;this.$emit("trigger-event",{name:e,event:t})},onDeactivate(t){this.isReallyActive=!1;const e=t.type;this.$emit("trigger-event",{name:e,event:t})},onTouchActivate(){this.isReallyActive=!0},onTouchDeactivate(){this.isReallyActive=!1},onMouseActivate(){this.isReallyActive=!0},onMouseDeactivate(){this.isReallyActive=!1},onKeyActivate(){this.isReallyActive=!0},onKeyDeactivate(){this.isReallyActive=!1},onKeyDown(t){this.$emit("trigger-event",{name:"keydown",event:t})},onKeyUp(t){this.$emit("trigger-event",{name:"keyup",event:t})}}};function q4(t,e,r,n,i,s){const o=br("wwElement",!0),a=br("wwText");return U(),Br(f1(s.tag),nr({class:["ww-button",{button:s.tag,"-link":n.hasLink&&!s.isEditing,active:s.isActive}],type:s.buttonType,style:s.buttonStyle,"data-ww-flag":"btn-"+r.content.buttonType,disabled:r.content.disabled},n.properties,{onFocus:e[0]||(e[0]=l=>i.isReallyFocused=!0),onBlur:e[1]||(e[1]=l=>s.onBlur(l)),onMousedown:s.onMouseActivate,onMouseup:s.onMouseDeactivate,onMouseleave:s.onMouseDeactivate,onTouchstart:s.onTouchActivate,onTouchend:s.onTouchDeactivate,onTouchcancel:s.onTouchDeactivate,onKeydown:[si(s.onKeyActivate,["enter"]),si(s.onKeyActivate,["space"]),s.onKeyDown],onKeyup:[si(s.onKeyDeactivate,["enter"]),si(s.onKeyDeactivate,["space"]),s.onKeyUp]}),{default:Wo(()=>[r.content.hasLeftIcon&&r.content.leftIcon?(U(),Br(o,nd(nr({key:0},r.content.leftIcon)),null,16)):ae("",!0),Qt(a,{tag:"span",text:s.text},null,8,["text"]),r.content.hasRightIcon&&r.content.rightIcon?(U(),Br(o,nd(nr({key:1},r.content.rightIcon)),null,16)):ae("",!0)]),_:1},16,["class","type","style","data-ww-flag","disabled","onMousedown","onMouseup","onMouseleave","onTouchstart","onTouchend","onTouchcancel","onKeydown","onKeyup"])}const PM=bn(H4,[["render",q4],["__scopeId","data-v-cbcbcea4"]]),V4={props:{content:{type:Object,required:!0},wwElementState:{type:Object,required:!0}},emits:["update:content:effect","update:content","element-event"],setup(){const{hasLink:t,tag:e,properties:r}=wwLib.wwElement.useLink(),n=wwLib.wwElement.useBackgroundVideo();return{hasLink:t,properties:r,backgroundVideo:n,tag:e}},computed:{children(){return!this.content.children||!Array.isArray(this.content.children)?[]:this.content.children},isFixed(){return this.wwElementState.props.isFixed},noDropzone(){return this.wwElementState.props.noDropzone},isEditing(){return!1}},methods:{onElementClick(t){let e=t.currentTarget.dataset.wwFlexboxIndex,r=parseInt(e);isNaN(r)&&(r=0),this.$emit("element-event",{type:"click",index:r})}}};function $4(t,e,r,n,i,s){const o=br("wwSimpleLayout"),a=br("wwBackgroundVideo"),l=br("wwElement",!0),u=br("wwLayout");return s.noDropzone?(U(),Br(o,nr({key:0,tag:n.tag,class:"ww-flexbox","ww-responsive":"wwLayoutSlot"},n.properties,{class:{"-link":n.hasLink&&!s.isEditing}}),{default:Wo(()=>[id(t.$slots,"default",{},void 0,!0)]),_:3},16,["tag","class"])):(U(),Br(u,nr({key:1,class:"ww-flexbox",path:"children",direction:r.content.direction,"disable-edit":s.isFixed,"ww-responsive":"wwLayout",tag:n.tag},n.properties,{class:{"-link":n.hasLink&&!s.isEditing}}),{header:Wo(()=>[n.backgroundVideo?(U(),Br(a,{key:0,video:n.backgroundVideo},null,8,["video"])):ae("",!0),s.noDropzone?ae("",!0):id(t.$slots,"default",{key:1},void 0,!0)]),default:Wo(({item:c,index:d,itemStyle:h})=>[Qt(l,nr(c,{"extra-style":h,class:"ww-flexbox__object","ww-responsive":`wwobject-${d}`,"data-ww-flexbox-index":d,onClick:s.onElementClick}),null,16,["extra-style","ww-responsive","data-ww-flexbox-index","onClick"])]),_:3},16,["direction","disable-edit","tag","class"]))}const HM=bn(V4,[["render",$4],["__scopeId","data-v-14f7a5a5"]]);function ht(t){this.content=t}ht.prototype={constructor:ht,find:function(t){for(var e=0;e>1}};ht.from=function(t){if(t instanceof ht)return t;var e=[];if(t)for(var r in t)e.push(r,t[r]);return new ht(e)};function y1(t,e,r){for(let n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:r;let i=t.child(n),s=e.child(n);if(i==s){r+=i.nodeSize;continue}if(!i.sameMarkup(s))return r;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)r++;return r}if(i.content.size||s.content.size){let o=y1(i.content,s.content,r+1);if(o!=null)return o}r+=i.nodeSize}}function v1(t,e,r,n){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:r,b:n};let o=t.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){r-=l,n-=l;continue}if(!o.sameMarkup(a))return{a:r,b:n};if(o.isText&&o.text!=a.text){let u=0,c=Math.min(o.text.length,a.text.length);for(;ue&&n(l,i+a,s||null,o)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,r-c),n,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,r,n,i){let s="",o=!0;return this.nodesBetween(e,r,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,r-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&n&&(o?o=!1:s+=n),s+=u},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let r=this.lastChild,n=e.firstChild,i=this.content.slice(),s=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),s=1);se)for(let s=0,o=0;oe&&((or)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,r-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,r-o-1))),n.push(a),i+=a.nodeSize),o=l}return new R(n,i)}cutByIndex(e,r){return e==r?R.empty:e==0&&r==this.content.length?this:new R(this.content.slice(e,r))}replaceChild(e,r){let n=this.content[e];if(n==r)return this;let i=this.content.slice(),s=this.size+r.nodeSize-n.nodeSize;return i[e]=r,new R(i,s)}addToStart(e){return new R([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new R(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let r=0;rthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,n=0;;r++){let i=this.child(r),s=n+i.nodeSize;if(s>=e)return s==e?bo(r+1,s):bo(r,n);n=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,r){if(!r)return R.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new R(r.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return R.empty;let r,n=0;for(let i=0;ithis.type.rank&&(r||(r=e.slice(0,i)),r.push(this),n=!0),r&&r.push(s)}}return r||(r=e.slice()),n||r.push(this),r}removeFromSet(e){for(let r=0;rn.type.rank-i.type.rank),r}};we.none=[];class sa extends Error{}class V{constructor(e,r,n){this.content=e,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,r){let n=k1(this.content,e+this.openStart,r);return n&&new V(n,this.openStart,this.openEnd)}removeBetween(e,r){return new V(x1(this.content,e+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,r){if(!r)return V.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new V(R.fromJSON(e,r.content),n,i)}static maxOpen(e,r=!0){let n=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=e.lastChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.lastChild)i++;return new V(e,n,i)}}V.empty=new V(R.empty,0,0);function x1(t,e,r){let{index:n,offset:i}=t.findIndex(e),s=t.maybeChild(n),{index:o,offset:a}=t.findIndex(r);if(i==e||s.isText){if(a!=r&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(n!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(n,s.copy(x1(s.content,e-i-1,r-i-1)))}function k1(t,e,r,n){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i);if(s==e||o.isText)return n&&!n.canReplace(i,i,r)?null:t.cut(0,e).append(r).append(t.cut(e));let a=k1(o.content,e-s-1,r,o);return a&&t.replaceChild(i,o.copy(a))}function j4(t,e,r){if(r.openStart>t.depth)throw new sa("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new sa("Inconsistent open depths");return w1(t,e,r,0)}function w1(t,e,r,n){let i=t.index(n),s=t.node(n);if(i==e.index(n)&&n=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function ys(t,e,r,n){let i=(e||t).node(r),s=0,o=e?e.index(r):i.childCount;t&&(s=t.index(r),t.depth>r?s++:t.textOffset&&(ci(t.nodeAfter,n),s++));for(let a=s;ai&&Fl(t,e,i+1),o=n.depth>i&&Fl(r,n,i+1),a=[];return ys(null,t,i,a),s&&o&&e.index(i)==r.index(i)?(S1(s,o),ci(di(s,C1(t,e,r,n,i+1)),a)):(s&&ci(di(s,oa(t,e,i+1)),a),ys(e,r,i,a),o&&ci(di(o,oa(r,n,i+1)),a)),ys(n,null,i,a),new R(a)}function oa(t,e,r){let n=[];if(ys(null,t,r,n),t.depth>r){let i=Fl(t,e,r+1);ci(di(i,oa(t,e,r+1)),n)}return ys(e,null,r,n),new R(n)}function W4(t,e){let r=e.depth-t.openStart,i=e.node(r).copy(t.content);for(let s=r-1;s>=0;s--)i=e.node(s).copy(R.from(i));return{start:i.resolveNoCache(t.openStart+r),end:i.resolveNoCache(i.content.size-t.openEnd-r)}}class zs{constructor(e,r,n){this.pos=e,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,r=this.index(this.depth);if(r==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(r);return n?e.child(r).cut(n):i}get nodeBefore(){let e=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(e).cut(0,r):e==0?null:this.parent.child(e-1)}posAtIndex(e,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let s=0;s0;r--)if(this.start(r)<=e&&this.end(r)>=e)return r;return 0}blockRange(e=this,r){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!r||r(this.node(n))))return new aa(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&r<=e.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,s=r;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),u=s-l;if(n.push(o,a,i+l),!u||(o=o.child(a),o.isText))break;s=u-1,i+=l+1}return new zs(r,n,s)}static resolveCached(e,r){let n=od.get(e);if(n)for(let s=0;se&&this.nodesBetween(e,r,s=>(n.isInSet(s.marks)&&(i=!0),!i)),i}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),A1(this.marks,e)}contentMatchAt(e){let r=this.type.contentMatch.matchFragment(this.content,0,e);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(e,r,n=R.empty,i=0,s=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,s),a=o&&o.matchFragment(this.content,r);if(!a||!a.validEnd)return!1;for(let l=i;lr.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(r=>r.toJSON())),e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(e.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(r.text,n)}let i=R.fromJSON(e,r.content),s=e.nodeType(r.type).create(r.attrs,i,n);return s.type.checkAttrs(s.attrs),s}};Bn.prototype.text=void 0;let J4=class Hl extends Bn{constructor(e,r,n,i){if(super(e,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):A1(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,r){return this.text.slice(e,r)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Hl(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Hl(this.type,this.attrs,e,this.marks)}cut(e=0,r=this.text.length){return e==0&&r==this.text.length?this:this.withText(this.text.slice(e,r))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function A1(t,e){for(let r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}class gi{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,r){let n=new Y4(e,r);if(n.next==null)return gi.empty;let i=M1(n);n.next&&n.err("Unexpected trailing text");let s=n3(r3(i));return i3(s,n),s}matchType(e){for(let r=0;ru.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function r(n){e.push(n);for(let i=0;i{let s=i+(n.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(n.next[o].next);return s}).join(`
`)}}gi.empty=new gi(!0);class Y4{constructor(e,r){this.string=e,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function M1(t){let e=[];do e.push(Z4(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Z4(t){let e=[];do e.push(X4(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function X4(t){let e=t3(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("{"))e=Q4(t,e);else break;return e}function ad(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Q4(t,e){let r=ad(t),n=r;return t.eat(",")&&(t.next!="}"?n=ad(t):n=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:e}}function e3(t,e){let r=t.nodeTypes,n=r[e];if(n)return[n];let i=[];for(let s in r){let o=r[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function t3(t){if(t.eat("(")){let e=M1(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=e3(t,t.next).map(r=>(t.inline==null?t.inline=r.isInline:t.inline!=r.isInline&&t.err("Mixing inline and block content"),{type:"name",value:r}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function r3(t){let e=[[]];return i(s(t,0),r()),e;function r(){return e.push([])-1}function n(o,a,l){let u={term:l,to:a};return e[o].push(u),u}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(s(u,a)),[]);if(o.type=="seq")for(let l=0;;l++){let u=s(o.exprs[l],a);if(l==o.exprs.length-1)return u;i(u,a=r())}else if(o.type=="star"){let l=r();return n(a,l),i(s(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=r();return i(s(o.expr,a),l),i(s(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let u=0;u{t[o].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c{u||i.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=e[n.join(",")]=new gi(n.indexOf(t.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:D1(this.attrs,e)}create(e=null,r,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Bn(this,this.computeAttrs(e),R.from(r),we.setFrom(n))}createChecked(e=null,r,n){return r=R.from(r),this.checkContent(r),new Bn(this,this.computeAttrs(e),r,we.setFrom(n))}createAndFill(e=null,r,n){if(e=this.computeAttrs(e),r=R.from(r),r.size){let o=this.contentMatch.fillBefore(r);if(!o)return null;r=o.append(r)}let i=this.contentMatch.matchFragment(r),s=i&&i.fillBefore(R.empty,!0);return s?new Bn(this,e,r.append(s),we.setFrom(n)):null}validContent(e){let r=this.contentMatch.matchFragment(e);if(!r||!r.validEnd)return!1;for(let n=0;n-1}allowsMarks(e){if(this.markSet==null)return!0;for(let r=0;rn[s]=new L1(s,r,o));let i=r.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function s3(t,e,r){let n=r.split("|");return i=>{let s=i===null?"null":typeof i;if(n.indexOf(s)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${t}, got ${s}`)}}class o3{constructor(e,r,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?s3(e,r,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class t0{constructor(e,r,n,i){this.name=e,this.rank=r,this.schema=n,this.spec=i,this.attrs=N1(e,i.attrs),this.excluded=null;let s=T1(this.attrs);this.instance=s?new we(this,s):null}create(e=null){return!e&&this.instance?this.instance:new we(this,D1(this.attrs,e))}static compile(e,r){let n=Object.create(null),i=0;return e.forEach((s,o)=>n[s]=new t0(s,i++,r,o)),n}removeFromSet(e){for(var r=0;r-1}}class Iu{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let i in e)r[i]=e[i];r.nodes=ht.from(e.nodes),r.marks=ht.from(e.marks||{}),this.nodes=ud.compile(this.spec.nodes,this),this.marks=t0.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=n[o]||(n[o]=gi.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?cd(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:cd(this,o.split(" "))}this.nodeFromJSON=i=>Bn.fromJSON(this,i),this.markFromJSON=i=>we.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,r=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ud){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(r,n,i)}text(e,r){let n=this.nodes.text;return new J4(n,n.defaultAttrs,e,we.setFrom(r))}mark(e,r){return typeof e=="string"&&(e=this.marks[e]),e.create(r)}nodeType(e){let r=this.nodes[e];if(!r)throw new RangeError("Unknown node type: "+e);return r}}function cd(t,e){let r=[];for(let n=0;n-1)&&r.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return r}function a3(t){return t.tag!=null}function l3(t){return t.style!=null}class an{constructor(e,r){this.schema=e,this.rules=r,this.tags=[],this.styles=[];let n=this.matchedStyles=[];r.forEach(i=>{if(a3(i))this.tags.push(i);else if(l3(i)){let s=/[^=]*/.exec(i.style)[0];n.indexOf(s)<0&&n.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,r={}){let n=new hd(this,r,!1);return n.addAll(e,we.none,r.from,r.to),n.finish()}parseSlice(e,r={}){let n=new hd(this,r,!0);return n.addAll(e,we.none,r.from,r.to),V.maxOpen(n.finish())}matchTag(e,r,n){for(let i=n?this.tags.indexOf(n)+1:0;ie.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=r))){if(o.getAttrs){let l=o.getAttrs(r);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let r=[];function n(i){let s=i.priority==null?50:i.priority,o=0;for(;o{n(o=fd(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{n(o=fd(o)),o.node||o.ignore||o.mark||(o.node=i)})}return r}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new an(e,an.schemaRules(e)))}}const _1={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},u3={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},z1={ol:!0,ul:!0},Rs=1,ql=2,vs=4;function dd(t,e,r){return e!=null?(e?Rs:0)|(e==="full"?ql:0):t&&t.whitespace=="pre"?Rs|ql:r&~vs}class yo{constructor(e,r,n,i,s,o){this.type=e,this.attrs=r,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=we.none,this.match=s||(o&vs?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(R.from(e));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Rs)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let r=R.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(R.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!_1.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class hd{constructor(e,r,n){this.parser=e,this.options=r,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=r.topNode,s,o=dd(null,r.preserveWhitespace,0)|(n?vs:0);i?s=new yo(i.type,i.attrs,we.none,!0,r.topMatch||i.type.contentMatch,o):n?s=new yo(null,null,we.none,!0,null,o):s=new yo(e.schema.topNodeType,null,we.none,!0,null,o),this.nodes=[s],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,r){e.nodeType==3?this.addTextNode(e,r):e.nodeType==1&&this.addElement(e,r)}addTextNode(e,r){let n=e.nodeValue,i=this.top,s=i.options&ql?"full":this.localPreserveWS||(i.options&Rs)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(s)if(s==="full")n=n.replace(/\r\n?/g,`
`);else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=n.split(/\r?\n|\r/);for(let l=0;l!l.clearMark(u)):r=r.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return r}addElementByRule(e,r,n,i){let s,o;if(r.node)if(o=this.parser.schema.nodes[r.node],o.isLeaf)this.insertNode(o.create(r.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(o,r.attrs||null,n,r.preserveWhitespace);l&&(s=!0,n=l)}else{let l=this.parser.schema.marks[r.mark];n=n.concat(l.create(r.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(r.getContent)this.findInside(e),r.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof r.contentElement=="string"?l=e.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(e):r.contentElement&&(l=r.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}s&&this.sync(a)&&this.open--}addAll(e,r,n,i){let s=n||0;for(let o=n?e.childNodes[n]:e.firstChild,a=i==null?null:e.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,r);this.findAtPoint(e,s)}findPlace(e,r,n){let i,s;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+a)&&(i=u,s=l,!u.length))break;if(l.solid){if(n)break;a+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(u.type):pd(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new yo(e,r,l,i,null,a)),this.open++,n}closeExtra(e=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(e));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(e){for(let r=this.open;r>=0;r--){if(this.nodes[r]==e)return this.open=r,!0;this.localPreserveWS&&(this.nodes[r].options|=Rs)}return!1}get currentPos(){this.closeExtra();let e=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;r&&e++}return e}findAtPoint(e,r){if(this.find)for(let n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let r=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let u=r[a];if(u==""){if(a==r.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:n&&l>=s?n.node(l-s).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return o(r.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let r=e.depth;r>=0;r--){let n=e.node(r).contentMatchAt(e.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}}function c3(t){for(let e=t.firstChild,r=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&z1.hasOwnProperty(n)&&r?(r.appendChild(e),e=r):n=="li"?r=e:n&&(r=null)}}function d3(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function fd(t){let e={};for(let r in t)e[r]=t[r];return e}function pd(t,e){let r=e.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(t))continue;let s=[],o=a=>{s.push(a);for(let l=0;l{if(s.length||o.marks.length){let a=0,l=0;for(;a=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,r);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(e,r,n={}){let i=this.marks[e.type.name];return i&&Uo(z0(n),i(e,r),null,e.attrs)}static renderSpec(e,r,n=null,i){return Uo(e,r,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Si(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let r=md(e.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(e){return md(e.marks)}}function md(t){let e={};for(let r in t){let n=t[r].spec.toDOM;n&&(e[r]=n)}return e}function z0(t){return t.document||window.document}const gd=new WeakMap;function h3(t){let e=gd.get(t);return e===void 0&&gd.set(t,e=f3(t)),e}function f3(t){let e=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let a,l=r?t.createElementNS(r,i):t.createElement(i),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=Uo(t,h,r,n);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const R1=65535,I1=Math.pow(2,16);function p3(t,e){return t+e*I1}function bd(t){return t&R1}function m3(t){return(t-(t&R1))/I1}const B1=1,F1=2,Ko=4,P1=8;class Vl{constructor(e,r,n){this.pos=e,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&P1)>0}get deletedBefore(){return(this.delInfo&(B1|Ko))>0}get deletedAfter(){return(this.delInfo&(F1|Ko))>0}get deletedAcross(){return(this.delInfo&Ko)>0}}class $t{constructor(e,r=!1){if(this.ranges=e,this.inverted=r,!e.length&&$t.empty)return $t.empty}recover(e){let r=0,n=bd(e);if(!this.inverted)for(let i=0;ie)break;let u=this.ranges[a+s],c=this.ranges[a+o],d=l+u;if(e<=d){let h=u?e==l?-1:e==d?1:r:r,f=l+i+(h<0?0:c);if(n)return f;let p=e==(r<0?l:d)?null:p3(a/3,e-l),b=e==l?F1:e==d?B1:Ko;return(r<0?e!=l:e!=d)&&(b|=P1),new Vl(f,b,p)}i+=c-u}return n?e+i:new Vl(e+i,0,null)}touches(e,r){let n=0,i=bd(r),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;ae)break;let u=this.ranges[a+s],c=l+u;if(e<=c&&a==i*3)return!0;n+=this.ranges[a+o]-u}return!1}forEach(e){let r=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,s=0;i=0;r--){let i=e.getMirror(r);this.appendMap(e._maps[r].invert(),i!=null&&i>r?n-i-1:void 0)}}invert(){let e=new Is;return e.appendMappingInverted(this),e}map(e,r=1){if(this.mirror)return this._map(e,r,!0);for(let n=this.from;ns&&l!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),r.openStart,r.openEnd);return Xe.fromReplace(e,this.from,this.to,s)}invert(){return new Lr(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Ln(r.pos,n.pos,this.mark)}merge(e){return e instanceof Ln&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ln(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ln(r.from,r.to,e.markFromJSON(r.mark))}}vt.jsonID("addMark",Ln);class Lr extends vt{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=new V(Bu(r.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),r.openStart,r.openEnd);return Xe.fromReplace(e,this.from,this.to,n)}invert(){return new Ln(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Lr(r.pos,n.pos,this.mark)}merge(e){return e instanceof Lr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Lr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Lr(r.from,r.to,e.markFromJSON(r.mark))}}vt.jsonID("removeMark",Lr);class _n extends vt{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return Xe.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return Xe.fromReplace(e,this.pos,this.pos+1,new V(R.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let i=0;in.pos?null:new ut(r.pos,n.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ut(r.from,r.to,r.gapFrom,r.gapTo,V.fromJSON(e,r.slice),r.insert,!!r.structure)}}vt.jsonID("replaceAround",ut);function $l(t,e,r){let n=t.resolve(e),i=r-e,s=n.depth;for(;i>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,i--;if(i>0){let o=n.node(s).maybeChild(n.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function g3(t,e,r,n){let i=[],s=[],o,a;t.doc.nodesBetween(e,r,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!n.isInSet(d)&&c.type.allowsMarkType(n.type)){let h=Math.max(u,e),f=Math.min(u+l.nodeSize,r),p=n.addToSet(d);for(let b=0;bt.step(l)),s.forEach(l=>t.step(l))}function b3(t,e,r,n){let i=[],s=0;t.doc.nodesBetween(e,r,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(n instanceof t0){let u=o.marks,c;for(;c=n.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let u=Math.min(a+o.nodeSize,r);for(let c=0;ct.step(new Lr(o.from,o.to,o.style)))}function Fu(t,e,r,n=r.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l=0;l--)t.step(o[l])}function y3(t,e,r){return(e==0||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function rs(t){let r=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,i=0,s=0;;--n){let o=t.$from.node(n),a=t.$from.index(n)+i,l=t.$to.indexAfter(n)-s;if(nr;p--)b||n.index(p)>0?(b=!0,c=R.from(n.node(p).copy(c)),d++):l--;let h=R.empty,f=0;for(let p=s,b=!1;p>r;p--)b||i.after(p+1)=0;o--){if(n.size){let a=r[o].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=R.from(r[o].type.create(r[o].attrs,n))}let i=e.start,s=e.end;t.step(new ut(i,s,i,s,new V(n,0,0),r.length,!0))}function S3(t,e,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,r,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&C3(t.doc,t.mapping.slice(s).map(a),n)){let u=null;if(n.schema.linebreakReplacement){let f=n.whitespace=="pre",p=!!n.contentMatch.matchType(n.schema.linebreakReplacement);f&&!p?u=!1:!f&&p&&(u=!0)}u===!1&&q1(t,o,a,s),Fu(t,t.mapping.slice(s).map(a,1),n,void 0,u===null);let c=t.mapping.slice(s),d=c.map(a,1),h=c.map(a+o.nodeSize,1);return t.step(new ut(d,h,d+1,h-1,new V(R.from(n.create(l,null,o.marks)),0,0),1,!0)),u===!0&&H1(t,o,a,s),!1}})}function H1(t,e,r,n){e.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=t.mapping.slice(n).map(r+1+s+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function q1(t,e,r,n){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(n).map(r+1+s);t.replaceWith(o,o+1,e.type.schema.text(`
`))}})}function C3(t,e,r){let n=t.resolve(e),i=n.index();return n.parent.canReplaceWith(i,i+1,r)}function A3(t,e,r,n,i){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");r||(r=s.type);let o=r.create(n,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,o);if(!r.validContent(s.content))throw new RangeError("Invalid content for node type "+r.name);t.step(new ut(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new V(R.from(o),0,0),1,!0))}function ln(t,e,r=1,n){let i=t.resolve(e),s=i.depth-r,o=n&&n[n.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=r-2;u>s;u--,c--){let d=i.node(u),h=i.index(u);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=n&&n[c+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let b=n&&n[c]||d;if(!d.canReplace(h+1,d.childCount)||!b.type.validContent(f))return!1}let a=i.indexAfter(s),l=n&&n[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function M3(t,e,r=1,n){let i=t.doc.resolve(e),s=R.empty,o=R.empty;for(let a=i.depth,l=i.depth-r,u=r-1;a>l;a--,u--){s=R.from(i.node(a).copy(s));let c=n&&n[u];o=R.from(c?c.type.create(c.attrs,o):i.node(a).copy(o))}t.step(new at(e,e,new V(s.append(o),r,r),!0))}function Wn(t,e){let r=t.resolve(e),n=r.index();return V1(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function E3(t,e){e.content.size||t.type.compatibleContent(e.type);let r=t.contentMatchAt(t.childCount),{linebreakReplacement:n}=t.type.schema;for(let i=0;i0?(s=n.node(i+1),a++,o=n.node(i).maybeChild(a)):(s=n.node(i).maybeChild(a-1),o=n.node(i+1)),s&&!s.isTextblock&&V1(s,o)&&n.node(i).canReplace(a,a+1))return e;if(i==0)break;e=r<0?n.before(i):n.after(i)}}function T3(t,e,r){let n=null,{linebreakReplacement:i}=t.doc.type.schema,s=t.doc.resolve(e-r),o=s.node().type;if(i&&o.inlineContent){let c=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);c&&!d?n=!1:!c&&d&&(n=!0)}let a=t.steps.length;if(n===!1){let c=t.doc.resolve(e+r);q1(t,c.node(),c.before(),a)}o.inlineContent&&Fu(t,e+r-1,o,s.node().contentMatchAt(s.index()),n==null);let l=t.mapping.slice(a),u=l.map(e-r);if(t.step(new at(u,l.map(e+r,-1),V.empty,!0)),n===!0){let c=t.doc.resolve(u);H1(t,c.node(),c.before(),t.steps.length)}return t}function D3(t,e,r){let n=t.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),r))return e;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let s=n.index(i);if(n.node(i).canReplaceWith(s,s,r))return n.before(i+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let s=n.indexAfter(i);if(n.node(i).canReplaceWith(s,s,r))return n.after(i+1);if(s=0;o--){let a=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(a>0?1:0),u=n.node(o),c=!1;if(s==1)c=u.canReplace(l,l,i);else{let d=u.contentMatchAt(l).findWrapping(i.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return a==0?n.pos:a<0?n.before(o+1):n.after(o+1)}return null}function n0(t,e,r=e,n=V.empty){if(e==r&&!n.size)return null;let i=t.resolve(e),s=t.resolve(r);return j1(i,s,n)?new at(e,r,n):new O3(i,s,n).fit()}function j1(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}class O3{constructor(e,r,n){this.$from=e,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=R.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=R.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let s=this.placed,o=n.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new V(s,o,a);return e>-1?new ut(n.pos,e,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new at(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,i=this.unplaced.openEnd;n1&&(i=0),s.type.spec.isolating&&i<=n){e=n;break}r=s.content}for(let r=1;r<=2;r++)for(let n=r==1?e:this.unplaced.openStart;n>=0;n--){let i,s=null;n?(s=I0(this.unplaced.content,n-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,d=null;if(r==1&&(o?u.matchType(o.type)||(d=u.fillBefore(R.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:a,parent:s,inject:d};if(r==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:a,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:e,openStart:r,openEnd:n}=this.unplaced,i=I0(e,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new V(e,r+1,Math.max(n,i.size+r>=e.size-n?r+1:0)),!0)}dropNode(){let{content:e,openStart:r,openEnd:n}=this.unplaced,i=I0(e,r);if(i.childCount<=1&&r>0){let s=e.size-r<=r+i.size;this.unplaced=new V(fs(e,r-1,1),r-1,s?r-1:n)}else this.unplaced=new V(fs(e,r,1),r,n)}placeNodes({sliceDepth:e,frontierDepth:r,parent:n,inject:i,wrap:s}){for(;this.depth>r;)this.closeFrontierNode();if(s)for(let b=0;b1||l==0||b.content.size)&&(d=y,c.push(W1(b.mark(h.allowedMarks(b.marks)),u==1?l:0,u==a.childCount?f:-1)))}let p=u==a.childCount;p||(f=-1),this.placed=ps(this.placed,r,R.from(c)),this.frontier[r].match=d,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,y=a;b1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(e){e:for(let r=Math.min(this.depth,e.depth);r>=0;r--){let{match:n,type:i}=this.frontier[r],s=r=0;a--){let{match:l,type:u}=this.frontier[a],c=B0(e,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:r,fit:o,move:s?e.doc.resolve(e.after(r+1)):e}}}}close(e){let r=this.findCloseLevel(e);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=ps(this.placed,r.depth,r.fit)),e=r.move;for(let n=r.depth+1;n<=e.depth;n++){let i=e.node(n),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(n));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,r=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=ps(this.placed,this.depth,R.from(e.create(r,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(R.empty,!0);r.childCount&&(this.placed=ps(this.placed,this.frontier.length,r))}}function fs(t,e,r){return e==0?t.cutByIndex(r,t.childCount):t.replaceChild(0,t.firstChild.copy(fs(t.firstChild.content,e-1,r)))}function ps(t,e,r){return e==0?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(ps(t.lastChild.content,e-1,r)))}function I0(t,e){for(let r=0;r1&&(n=n.replaceChild(0,W1(n.firstChild,e-1,n.childCount==1?r-1:0))),e>0&&(n=t.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(t.type.contentMatch.matchFragment(n).fillBefore(R.empty,!0)))),t.copy(n)}function B0(t,e,r,n,i){let s=t.node(e),o=i?t.indexAfter(e):t.index(e);if(o==s.childCount&&!r.compatibleContent(s.type))return null;let a=n.fillBefore(s.content,!0,o);return a&&!N3(r,s.content,o)?a:null}function N3(t,e,r){for(let n=r;n0;h--,f--){let p=i.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(h)>-1?a=h:i.before(h)==f&&o.splice(1,0,-h)}let l=o.indexOf(a),u=[],c=n.openStart;for(let h=n.content,f=0;;f++){let p=h.firstChild;if(u.push(p),f==n.openStart)break;h=p.content}for(let h=c-1;h>=0;h--){let f=u[h],p=L3(f.type);if(p&&!f.sameMarkup(i.node(Math.abs(a)-1)))c=h;else if(p||!f.type.isTextblock)break}for(let h=n.openStart;h>=0;h--){let f=(h+c+1)%(n.openStart+1),p=u[f];if(p)for(let b=0;b=0&&(t.replace(e,r,n),!(t.steps.length>d));h--){let f=o[h];f<0||(e=i.before(f),r=s.after(f))}}function U1(t,e,r,n,i){if(en){let s=i.contentMatchAt(0),o=s.fillBefore(t).append(t);t=o.append(s.matchFragment(o).fillBefore(R.empty,!0))}return t}function z3(t,e,r,n){if(!n.isInline&&e==r&&t.doc.resolve(e).parent.content.size){let i=D3(t.doc,e,n.type);i!=null&&(e=r=i)}t.replaceRange(e,r,new V(R.from(n),0,0))}function R3(t,e,r){let n=t.doc.resolve(e),i=t.doc.resolve(r),s=K1(n,i);for(let o=0;o0&&(l||n.node(a-1).canReplace(n.index(a-1),i.indexAfter(a-1))))return t.delete(n.before(a),i.after(a))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(e-n.start(o)==n.depth-o&&r>n.end(o)&&i.end(o)-r!=i.depth-o&&n.start(o-1)==i.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),i.index(o-1)))return t.delete(n.before(o),r);t.delete(e,r)}function K1(t,e){let r=[],n=Math.min(t.depth,e.depth);for(let i=n;i>=0;i--){let s=t.start(i);if(se.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&r.push(i)}return r}class Fi extends vt{constructor(e,r,n){super(),this.pos=e,this.attr=r,this.value=n}apply(e){let r=e.nodeAt(this.pos);if(!r)return Xe.fail("No node at attribute step's position");let n=Object.create(null);for(let s in r.attrs)n[s]=r.attrs[s];n[this.attr]=this.value;let i=r.type.create(n,null,r.marks);return Xe.fromReplace(e,this.pos,this.pos+1,new V(R.from(i),0,r.isLeaf?0:1))}getMap(){return $t.empty}invert(e){return new Fi(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new Fi(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Fi(r.pos,r.attr,r.value)}}vt.jsonID("attr",Fi);class Bs extends vt{constructor(e,r){super(),this.attr=e,this.value=r}apply(e){let r=Object.create(null);for(let i in e.attrs)r[i]=e.attrs[i];r[this.attr]=this.value;let n=e.type.create(r,e.content,e.marks);return Xe.ok(n)}getMap(){return $t.empty}invert(e){return new Bs(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Bs(r.attr,r.value)}}vt.jsonID("docAttr",Bs);let $i=class extends Error{};$i=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r};$i.prototype=Object.create(Error.prototype);$i.prototype.constructor=$i;$i.prototype.name="TransformError";class Hu{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Is}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let r=this.maybeStep(e);if(r.failed)throw new $i(r.failed);return this}maybeStep(e){let r=e.apply(this.doc);return r.failed||this.addStep(e,r.doc),r}get docChanged(){return this.steps.length>0}addStep(e,r){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=r}replace(e,r=e,n=V.empty){let i=n0(this.doc,e,r,n);return i&&this.step(i),this}replaceWith(e,r,n){return this.replace(e,r,new V(R.from(n),0,0))}delete(e,r){return this.replace(e,r,V.empty)}insert(e,r){return this.replaceWith(e,e,r)}replaceRange(e,r,n){return _3(this,e,r,n),this}replaceRangeWith(e,r,n){return z3(this,e,r,n),this}deleteRange(e,r){return R3(this,e,r),this}lift(e,r){return v3(this,e,r),this}join(e,r=1){return T3(this,e,r),this}wrap(e,r){return w3(this,e,r),this}setBlockType(e,r=e,n,i=null){return S3(this,e,r,n,i),this}setNodeMarkup(e,r,n=null,i){return A3(this,e,r,n,i),this}setNodeAttribute(e,r,n){return this.step(new Fi(e,r,n)),this}setDocAttribute(e,r){return this.step(new Bs(e,r)),this}addNodeMark(e,r){return this.step(new _n(e,r)),this}removeNodeMark(e,r){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(r instanceof we)r.isInSet(n.marks)&&this.step(new bi(e,r));else{let i=n.marks,s,o=[];for(;s=r.isInSet(i);)o.push(new bi(e,s)),i=s.removeFromSet(i);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,r=1,n){return M3(this,e,r,n),this}addMark(e,r,n){return g3(this,e,r,n),this}removeMark(e,r,n){return b3(this,e,r,n),this}clearIncompatible(e,r,n){return Fu(this,e,r,n),this}}const F0=Object.create(null);class ne{constructor(e,r,n){this.$anchor=e,this.$head=r,this.ranges=n||[new G1(e.min(r),e.max(r))]}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 e=this.ranges;for(let r=0;r=0;s--){let o=r<0?Li(e.node(0),e.node(s),e.before(s+1),e.index(s),r,n):Li(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,r,n);if(o)return o}return null}static near(e,r=1){return this.findFrom(e,r)||this.findFrom(e,-r)||new Ut(e.node(0))}static atStart(e){return Li(e,e,0,0,1)||new Ut(e)}static atEnd(e){return Li(e,e,e.content.size,e.childCount,-1)||new Ut(e)}static fromJSON(e,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=F0[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in F0)throw new RangeError("Duplicate use of selection JSON ID "+e);return F0[e]=r,r.prototype.jsonID=e,r}getBookmark(){return ee.between(this.$anchor,this.$head).getBookmark()}}ne.prototype.visible=!0;class G1{constructor(e,r){this.$from=e,this.$to=r}}let vd=!1;function xd(t){!vd&&!t.parent.inlineContent&&(vd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class ee extends ne{constructor(e,r=e){xd(e),xd(r),super(e,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,r){let n=e.resolve(r.map(this.head));if(!n.parent.inlineContent)return ne.near(n);let i=e.resolve(r.map(this.anchor));return new ee(i.parent.inlineContent?i:n,n)}replace(e,r=V.empty){if(super.replace(e,r),r==V.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof ee&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new i0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ee(e.resolve(r.anchor),e.resolve(r.head))}static create(e,r,n=r){let i=e.resolve(r);return new this(i,n==r?i:e.resolve(n))}static between(e,r,n){let i=e.pos-r.pos;if((!n||i)&&(n=i>=0?1:-1),!r.parent.inlineContent){let s=ne.findFrom(r,n,!0)||ne.findFrom(r,-n,!0);if(s)r=s.$head;else return ne.near(r,n)}return e.parent.inlineContent||(i==0?e=r:(e=(ne.findFrom(e,-n,!0)||ne.findFrom(e,n,!0)).$anchor,e.pos0?0:1);i>0?o=0;o+=i){let a=e.child(o);if(a.isAtom){if(!s&&X.isSelectable(a))return X.create(t,r-(i<0?a.nodeSize:0))}else{let l=Li(t,a,r+i,i<0?a.childCount:0,i,s);if(l)return l}r+=a.nodeSize*i}return null}function kd(t,e,r){let n=t.steps.length-1;if(n{o==null&&(o=c)}),t.setSelection(ne.near(t.doc.resolve(o),r))}const wd=1,vo=2,Sd=4;class B3 extends Hu{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=vo,this}ensureMarks(e){return we.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&vo)>0}addStep(e,r){super.addStep(e,r),this.updated=this.updated&~vo,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,r=!0){let n=this.selection;return r&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||we.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,r,n){let i=this.doc.type.schema;if(r==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(n==null&&(n=r),!e)return this.deleteRange(r,n);let s=this.storedMarks;if(!s){let o=this.doc.resolve(r);s=n==r?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,i.text(e,s)),!this.selection.empty&&this.selection.to==r+e.length&&this.setSelection(ne.near(this.selection.$to)),this}}setMeta(e,r){return this.meta[typeof e=="string"?e:e.key]=r,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Sd,this}get scrolledIntoView(){return(this.updated&Sd)>0}}function Cd(t,e){return!e||!t?t:t.bind(e)}class ms{constructor(e,r,n){this.name=e,this.init=Cd(r.init,n),this.apply=Cd(r.apply,n)}}const F3=[new ms("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new ms("selection",{init(t,e){return t.selection||ne.atStart(e.doc)},apply(t){return t.selection}}),new ms("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,r,n){return n.selection.$cursor?t.storedMarks:null}}),new ms("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class P0{constructor(e,r){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=F3.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new ms(n.key,n.spec.state,n))})}}class Ii{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,r=-1){for(let n=0;nn.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[n],s=i.spec.state;s&&s.toJSON&&(r[n]=s.toJSON.call(i,this[i.key]))}return r}static fromJSON(e,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new P0(e.schema,e.plugins),s=new Ii(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=Bn.fromJSON(e.schema,r.doc);else if(o.name=="selection")s.selection=ne.fromJSON(s.doc,r.selection);else if(o.name=="storedMarks")r.storedMarks&&(s.storedMarks=r.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(r,a)){s[o.name]=u.fromJSON.call(l,e,r[a],s);return}}s[o.name]=o.init(e,s)}}),s}}function J1(t,e,r){for(let n in t){let i=t[n];i instanceof Function?i=i.bind(e):n=="handleDOMEvents"&&(i=J1(i,e,{})),r[n]=i}return r}class Ve{constructor(e){this.spec=e,this.props={},e.props&&J1(e.props,this,this.props),this.key=e.key?e.key.key:Y1("plugin")}getState(e){return e[this.key]}}const H0=Object.create(null);function Y1(t){return t in H0?t+"$"+ ++H0[t]:(H0[t]=0,t+"$")}class Je{constructor(e="key"){this.key=Y1(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const ft=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},ji=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let jl=null;const rn=function(t,e,r){let n=jl||(jl=document.createRange());return n.setEnd(t,r??t.nodeValue.length),n.setStart(t,e||0),n},P3=function(){jl=null},yi=function(t,e,r,n){return r&&(Ad(t,e,r,n,-1)||Ad(t,e,r,n,1))},H3=/^(img|br|input|textarea|hr)$/i;function Ad(t,e,r,n,i){for(var s;;){if(t==r&&e==n)return!0;if(e==(i<0?0:tr(t))){let o=t.parentNode;if(!o||o.nodeType!=1||eo(t)||H3.test(t.nodeName)||t.contentEditable=="false")return!1;e=ft(t)+(i<0?0:1),t=o}else if(t.nodeType==1){let o=t.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else t=o,e=i<0?tr(t):0}else return!1}}function tr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function q3(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=tr(t)}else if(t.parentNode&&!eo(t))e=ft(t),t=t.parentNode;else return null}}function V3(t,e){for(;;){if(t.nodeType==3&&e2),er=Wi||(Pr?/Mac/.test(Pr.platform):!1),U3=Pr?/Win/.test(Pr.platform):!1,on=/Android \d/.test(Un),to=!!Md&&"webkitFontSmoothing"in Md.documentElement.style,K3=to?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function G3(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 Yr(t,e){return typeof t=="number"?t:t[e]}function J3(t){let e=t.getBoundingClientRect(),r=e.width/t.offsetWidth||1,n=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*r,top:e.top,bottom:e.top+t.clientHeight*n}}function Ed(t,e,r){let n=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let o=r||t.dom;o;){if(o.nodeType!=1){o=ji(o);continue}let a=o,l=a==s.body,u=l?G3(s):J3(a),c=0,d=0;if(e.topu.bottom-Yr(n,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+Yr(i,"top")-u.top:e.bottom-u.bottom+Yr(i,"bottom")),e.leftu.right-Yr(n,"right")&&(c=e.right-u.right+Yr(i,"right")),c||d)if(l)s.defaultView.scrollBy(c,d);else{let f=a.scrollLeft,p=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let b=a.scrollLeft-f,y=a.scrollTop-p;e={left:e.left-b,top:e.top-y,right:e.right-b,bottom:e.bottom-y}}let h=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(h))break;o=h=="absolute"?o.offsetParent:ji(o)}}function Y3(t){let e=t.dom.getBoundingClientRect(),r=Math.max(0,e.top),n,i;for(let s=(e.left+e.right)/2,o=r+1;o=r-20){n=a,i=l.top;break}}return{refDOM:n,refTop:i,stack:Q1(t.dom)}}function Q1(t){let e=[],r=t.ownerDocument;for(let n=t;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),t!=r);n=ji(n));return e}function Z3({refDOM:t,refTop:e,stack:r}){let n=t?t.getBoundingClientRect().top:0;ep(r,n==0?0:n-e)}function ep(t,e){for(let r=0;r=a){o=Math.max(p.bottom,o),a=Math.min(p.top,a);let b=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=c,u={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!r&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!r&&l&&(r=l,i=u,n=0),r&&r.nodeType==3?Q3(r,i):!r||n&&r.nodeType==1?{node:t,offset:s}:tp(r,i)}function Q3(t,e){let r=t.nodeValue.length,n=document.createRange();for(let i=0;i=(s.left+s.right)/2?1:0)}}return{node:t,offset:0}}function Vu(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function e6(t,e){let r=t.parentNode;return r&&/^li$/i.test(r.nodeName)&&e.left(o.left+o.right)/2?1:-1}return t.docView.posFromDOM(n,i,s)}function r6(t,e,r,n){let i=-1;for(let s=e,o=!1;s!=t.dom;){let a=t.docView.nearestDesc(s,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!o&&l.left>n.left||l.top>n.top?i=a.posBefore:(!o&&l.right-1?i:t.docView.posFromDOM(e,r,-1)}function rp(t,e,r){let n=t.childNodes.length;if(n&&r.tope.top&&i++}let u;to&&i&&n.nodeType==1&&(u=n.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(a=r6(t,n,i,e))}a==null&&(a=t6(t,o,e));let l=t.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Td(t){return t.top=0&&i==n.nodeValue.length?(l--,c=1):r<0?l--:u++,ls(Sn(rn(n,l,u),c),c<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(r<0||i==tr(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return q0(l.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(r<0||i==tr(n))){let l=n.childNodes[i-1],u=l.nodeType==3?rn(l,tr(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return ls(Sn(u,1),!1)}if(s==null&&i
=0)}function ls(t,e){if(t.width==0)return t;let r=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:r,right:r}}function q0(t,e){if(t.height==0)return t;let r=e?t.top:t.bottom;return{top:r,bottom:r,left:t.left,right:t.right}}function ip(t,e,r){let n=t.state,i=t.root.activeElement;n!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return r()}finally{n!=e&&t.updateState(n),i!=t.dom&&i&&i.focus()}}function s6(t,e,r){let n=e.selection,i=r=="up"?n.$from:n.$to;return ip(t,e,()=>{let{node:s}=t.docView.domFromPos(i.pos,r=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=np(t,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=rn(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;uc.top+1&&(r=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}const o6=/[\u0590-\u08ac]/;function a6(t,e,r){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,s=!i,o=i==n.parent.content.size,a=t.domSelection();return a?!o6.test(n.parent.textContent)||!a.modify?r=="left"||r=="backward"?s:o:ip(t,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=t.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",r,"character");let f=n.depth?t.docView.domAfterPos(n.before()):t.dom,{focusNode:p,focusOffset:b}=t.domSelectionRange(),y=p&&!f.contains(p.nodeType==1?p:p.parentNode)||l==p&&u==b;try{a.collapse(c,d),l&&(l!=c||u!=d)&&a.extend&&a.extend(l,u)}catch{}return h!=null&&(a.caretBidiLevel=h),y}):n.pos==n.start()||n.pos==n.end()}let Dd=null,Od=null,Nd=!1;function l6(t,e,r){return Dd==e&&Od==r?Nd:(Dd=e,Od=r,Nd=r=="up"||r=="down"?s6(t,e,r):a6(t,e,r))}const sr=0,Ld=1,oi=2,Hr=3;class ro{constructor(e,r,n,i){this.parent=e,this.children=r,this.dom=n,this.contentDOM=i,this.dirty=sr,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,r,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let r=0;rft(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&r==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,r=!1){for(let n=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!r||s.node))if(n&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))n=!1;else return s}}getDesc(e){let r=e.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(e,r,n){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,r,n)}return-1}descAt(e){for(let r=0,n=0;re||o instanceof op){i=e-s;break}s=a}if(i)return this.children[n].domFromPos(i-this.children[n].border,r);for(let s;n&&!(s=this.children[n-1]).size&&s instanceof sp&&s.side>=0;n--);if(r<=0){let s,o=!0;for(;s=n?this.children[n-1]:null,!(!s||s.dom.parentNode==this.contentDOM);n--,o=!1);return s&&r&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,r):{node:this.contentDOM,offset:s?ft(s.dom)+1:0}}else{let s,o=!0;for(;s=n=c&&r<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,r,c);e=o;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=ft(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(u>r||a==this.children.length-1)){r=u;for(let c=a+1;cp&&or){let p=a;a=l,l=p}let f=document.createRange();f.setEnd(l.node,l.offset),f.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,r){for(let n=0,i=0;i=n:en){let a=n+s.border,l=o-s.border;if(e>=a&&r<=l){this.dirty=e==n||r==o?oi:Ld,e==a&&r==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Hr:s.markDirty(e-a,r-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?oi:Hr}n=o}this.dirty=oi}markParentsDirty(){let e=1;for(let r=this.parent;r;r=r.parent,e++){let n=e==1?oi:Ld;r.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!r.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=r,this.widget=r,s=this}matchesWidget(e){return this.dirty==sr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let r=this.widget.spec.stopEvent;return r?r(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class u6 extends ro{constructor(e,r,n,i){super(e,[],r,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(e,r){return e!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class vi extends ro{constructor(e,r,n,i,s){super(e,[],n,i),this.mark=r,this.spec=s}static create(e,r,n,i){let s=i.nodeViews[r.type.name],o=s&&s(r,i,n);return(!o||!o.dom)&&(o=Si.renderSpec(document,r.type.spec.toDOM(r,n),null,r.attrs)),new vi(e,r,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Hr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Hr&&this.mark.eq(e)}markDirty(e,r){if(super.markDirty(e,r),this.dirty!=sr){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty0&&(s=Jl(s,0,e,n));for(let a=0;a{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},n,i),c=u&&u.dom,d=u&&u.contentDOM;if(r.isText){if(!c)c=document.createTextNode(r.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Si.renderSpec(document,r.type.spec.toDOM(r),null,r.attrs));!d&&!r.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),r.type.spec.draggable&&(c.draggable=!0));let h=c;return c=up(c,n,r),u?l=new c6(e,r,n,i,c,d||null,h,u,s,o+1):r.isText?new o0(e,r,n,i,c,h,s):new Pn(e,r,n,i,c,d||null,h,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>R.empty)}return e}matchesNode(e,r,n){return this.dirty==sr&&e.eq(this.node)&&la(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,r){let n=this.node.inlineContent,i=r,s=e.composing?this.localCompositionInfo(e,r):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new h6(this,o&&o.node,e);m6(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,n,e):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?we.none:this.node.child(c).marks,n,e),l.placeWidget(u,e,i)},(u,c,d,h)=>{l.syncToMarks(u.marks,n,e);let f;l.findNodeMatch(u,c,d,h)||a&&e.state.selection.from>i&&e.state.selection.to-1&&l.updateNodeAt(u,c,d,f,e)||l.updateNextNode(u,c,d,e,h,i)||l.addNode(u,c,d,e,i),i+=u.nodeSize}),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==oi)&&(o&&this.protectLocalComposition(e,o),ap(this.contentDOM,this.children,e),Wi&&g6(this.dom))}localCompositionInfo(e,r){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof ee)||nr+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,a=b6(this.node.content,o,n-r,i-r);return a<0?null:{node:s,pos:a,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:r,pos:n,text:i}){if(this.getDesc(r))return;let s=r;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new u6(this,s,r,i);e.input.compositionNodes.push(o),this.children=Jl(this.children,n,n+i.length,e,o)}update(e,r,n,i){return this.dirty==Hr||!e.sameMarkup(this.node)?!1:(this.updateInner(e,r,n,i),!0)}updateInner(e,r,n,i){this.updateOuterDeco(r),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=sr}updateOuterDeco(e){if(la(e,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=lp(this.dom,this.nodeDOM,Gl(this.outerDeco,this.node,r),Gl(e,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function _d(t,e,r,n,i){up(n,e,t);let s=new Pn(void 0,t,e,r,n,n,n,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class o0 extends Pn{constructor(e,r,n,i,s,o,a){super(e,r,n,i,s,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,r,n,i){return this.dirty==Hr||this.dirty!=sr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=sr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=sr,!0)}inParent(){let e=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,r,n){return e==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(e,r,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,r,n){let i=this.node.cut(e,r),s=document.createTextNode(i.text);return new o0(this.parent,i,this.outerDeco,this.innerDeco,s,s,n)}markDirty(e,r){super.markDirty(e,r),this.dom!=this.nodeDOM&&(e==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=Hr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class op extends ro{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==sr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class c6 extends Pn{constructor(e,r,n,i,s,o,a,l,u,c){super(e,r,n,i,s,o,a,u,c),this.spec=l}update(e,r,n,i){if(this.dirty==Hr)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,r,n);return s&&this.updateInner(e,r,n,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,r,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,r,n,i){this.spec.setSelection?this.spec.setSelection(e,r,n.root):super.setSelection(e,r,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function ap(t,e,r){let n=t.firstChild,i=!1;for(let s=0;s>1,o=Math.min(s,e.length);for(;i-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=vi.create(this.top,e[s],r,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(e,r,n,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,r,n))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(n){let u=r.children[n-1];if(u instanceof vi)r=u,n=u.children.length;else{a=u,n--;break}}else{if(r==e)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function p6(t,e){return t.type.side-e.type.side}function m6(t,e,r,n){let i=e.locals(t),s=0;if(i.length==0){for(let u=0;us;)a.push(i[o++]);let p=s+h.nodeSize;if(h.isText){let y=p;o!y.inline):a.slice();n(h,b,e.forChild(s,h),f),s=p}}function g6(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function b6(t,e,r,n){for(let i=0,s=0;i=r){if(s>=n&&l.slice(n-e.length-a,n-a)==e)return n-e.length;let u=a=0&&u+e.length+a>=r)return a+u;if(r==n&&l.length>=n+e.length-a&&l.slice(n-a,n-a+e.length)==e)return n}}return-1}function Jl(t,e,r,n,i){let s=[];for(let o=0,a=0;o=r||c<=e?s.push(l):(ur&&s.push(l.slice(r-u,l.size,n)))}return s}function $u(t,e=null){let r=t.domSelectionRange(),n=t.state.doc;if(!r.focusNode)return null;let i=t.docView.nearestDesc(r.focusNode),s=i&&i.size==0,o=t.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(o<0)return null;let a=n.resolve(o),l,u;if(s0(r)){for(l=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&X.isSelectable(d)&&i.parent&&!(d.isInline&&$3(r.focusNode,r.focusOffset,i.dom))){let h=i.posBefore;u=new X(o==h?a:n.resolve(h))}}else{if(r instanceof t.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let d=o,h=o;for(let f=0;f{(r.anchorNode!=n||r.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!cp(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function v6(t){let e=t.domSelection();if(!e)return;let r=t.cursorWrapper.dom,n=r.nodeName=="IMG";n?e.collapse(r.parentNode,ft(r)+1):e.collapse(r,0),!n&&!t.state.selection.visible&&It&&Fn<=11&&(r.disabled=!0,r.disabled=!1)}function dp(t,e){if(e instanceof X){let r=t.docView.descAt(e.from);r!=t.lastSelectedViewDesc&&(Fd(t),r&&r.selectNode(),t.lastSelectedViewDesc=r)}else Fd(t)}function Fd(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ju(t,e,r,n){return t.someProp("createSelectionBetween",i=>i(t,e,r))||ee.between(e,r,n)}function Pd(t){return t.editable&&!t.hasFocus()?!1:hp(t)}function hp(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function x6(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),r=t.domSelectionRange();return yi(e.node,e.offset,r.anchorNode,r.anchorOffset)}function Yl(t,e){let{$anchor:r,$head:n}=t.selection,i=e>0?r.max(n):r.min(n),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&ne.findFrom(s,e)}function Cn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Hd(t,e,r){let n=t.state.selection;if(n instanceof ee)if(r.indexOf("s")>-1){let{$head:i}=n,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=t.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return Cn(t,new ee(n.$anchor,o))}else if(n.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=Yl(t.state,e);return i&&i instanceof X?Cn(t,i):!1}else if(!(er&&r.indexOf("m")>-1)){let i=n.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=t.docView.descAt(a))&&!o.contentDOM?X.isSelectable(s)?Cn(t,new X(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):to?Cn(t,new ee(t.state.doc.resolve(e<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(n instanceof X&&n.node.isInline)return Cn(t,new ee(e>0?n.$to:n.$from));{let i=Yl(t.state,e);return i?Cn(t,i):!1}}}function ua(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function ks(t,e){let r=t.pmViewDesc;return r&&r.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Ti(t,e){return e<0?k6(t):w6(t)}function k6(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let i,s,o=!1;for(ir&&r.nodeType==1&&n0){if(r.nodeType!=1)break;{let a=r.childNodes[n-1];if(ks(a,-1))i=r,s=--n;else if(a.nodeType==3)r=a,n=r.nodeValue.length;else break}}else{if(fp(r))break;{let a=r.previousSibling;for(;a&&ks(a,-1);)i=r.parentNode,s=ft(a),a=a.previousSibling;if(a)r=a,n=ua(r);else{if(r=r.parentNode,r==t.dom)break;n=0}}}o?Zl(t,r,n):i&&Zl(t,i,s)}function w6(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let i=ua(r),s,o;for(;;)if(n{t.state==i&&un(t)},50)}function qd(t,e){let r=t.state.doc.resolve(e);if(!(bt||U3)&&r.parent.inlineContent){let i=t.coordsAtPos(e);if(e>r.start()){let s=t.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Vd(t,e,r){let n=t.state.selection;if(n instanceof ee&&!n.empty||r.indexOf("s")>-1||er&&r.indexOf("m")>-1)return!1;let{$from:i,$to:s}=n;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let o=Yl(t.state,e);if(o&&o instanceof X)return Cn(t,o)}if(!i.parent.inlineContent){let o=e<0?i:s,a=n instanceof Ut?ne.near(o,e):ne.findFrom(o,e);return a?Cn(t,a):!1}return!1}function $d(t,e){if(!(t.state.selection instanceof ee))return!0;let{$head:r,$anchor:n,empty:i}=t.state.selection;if(!r.sameParent(n))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){let o=t.state.tr;return e<0?o.delete(r.pos-s.nodeSize,r.pos):o.delete(r.pos,r.pos+s.nodeSize),t.dispatch(o),!0}return!1}function jd(t,e,r){t.domObserver.stop(),e.contentEditable=r,t.domObserver.start()}function A6(t){if(!Et||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:r}=t.domSelectionRange();if(e&&e.nodeType==1&&r==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;jd(t,n,"true"),setTimeout(()=>jd(t,n,"false"),20)}return!1}function M6(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function E6(t,e){let r=e.keyCode,n=M6(e);if(r==8||er&&r==72&&n=="c")return $d(t,-1)||Ti(t,-1);if(r==46&&!e.shiftKey||er&&r==68&&n=="c")return $d(t,1)||Ti(t,1);if(r==13||r==27)return!0;if(r==37||er&&r==66&&n=="c"){let i=r==37?qd(t,t.state.selection.from)=="ltr"?-1:1:-1;return Hd(t,i,n)||Ti(t,i)}else if(r==39||er&&r==70&&n=="c"){let i=r==39?qd(t,t.state.selection.from)=="ltr"?1:-1:1;return Hd(t,i,n)||Ti(t,i)}else{if(r==38||er&&r==80&&n=="c")return Vd(t,-1,n)||Ti(t,-1);if(r==40||er&&r==78&&n=="c")return A6(t)||Vd(t,1,n)||Ti(t,1);if(n==(er?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function Wu(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let r=[],{content:n,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,s--;let f=n.firstChild;r.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),n=f.content}let o=t.someProp("clipboardSerializer")||Si.fromSchema(t.state.schema),a=vp(),l=a.createElement("div");l.appendChild(o.serializeFragment(n,{document:a}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=yp[u.nodeName.toLowerCase()]);){for(let f=c.length-1;f>=0;f--){let p=a.createElement(c[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(r)}`);let h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,`
`);return{dom:l,text:h,slice:e}}function pp(t,e,r,n,i){let s=i.parent.type.spec.code,o,a;if(!r&&!e)return null;let l=!!e&&(n||s||!r);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,s||n,t)}),s)return a=new V(R.from(t.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0),t.someProp("transformPasted",h=>{a=h(a,t,!0)}),a;let d=t.someProp("clipboardTextParser",h=>h(e,i,n,t));if(d)a=d;else{let h=i.marks(),{schema:f}=t.state,p=Si.fromSchema(f);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(b=>{let y=o.appendChild(document.createElement("p"));b&&y.appendChild(p.serializeNode(f.text(b,h)))})}}else t.someProp("transformPastedHTML",d=>{r=d(r,t)}),o=N6(r),to&&L6(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||an.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||c),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!T6.test(h.parentNode.nodeName)?{ignore:!0}:null}})),c)a=_6(Wd(a,+c[1],+c[2]),c[4]);else if(a=V.maxOpen(D6(a.content,i),!0),a.openStart||a.openEnd){let d=0,h=0;for(let f=a.content.firstChild;d{a=d(a,t,l)}),a}const T6=/^(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 D6(t,e){if(t.childCount<2)return t;for(let r=e.depth;r>=0;r--){let i=e.node(r).contentMatchAt(e.index(r)),s,o=[];if(t.forEach(a=>{if(!o)return;let l=i.findWrapping(a.type),u;if(!l)return o=null;if(u=o.length&&s.length&&gp(l,s,a,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=bp(o[o.length-1],s.length));let c=mp(a,l);o.push(c),i=i.matchType(c.type),s=l}}),o)return R.from(o)}return t}function mp(t,e,r=0){for(let n=e.length-1;n>=r;n--)t=e[n].create(null,R.from(t));return t}function gp(t,e,r,n,i){if(i1&&(s=0),i=r&&(a=e<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(R.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(a))}function Wd(t,e,r){return er})),$0.createHTML(t)):t}function N6(t){let e=/^(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let r=vp().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(t),i;if((i=n&&yp[n[1].toLowerCase()])&&(t=i.map(s=>"<"+s+">").join("")+t+i.map(s=>""+s+">").reverse().join("")),r.innerHTML=O6(t),i)for(let s=0;s=0;a-=2){let l=r.nodes[n[a]];if(!l||l.hasRequiredAttrs())break;i=R.from(l.create(n[a+1],i)),s++,o++}return new V(i,s,o)}const Tt={},Dt={},z6={touchstart:!0,touchmove:!0};class R6{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=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 I6(t){for(let e in Tt){let r=Tt[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=n=>{F6(t,n)&&!Uu(t,n)&&(t.editable||!(n.type in Dt))&&r(t,n)},z6[e]?{passive:!0}:void 0)}Et&&t.dom.addEventListener("input",()=>null),Ql(t)}function zn(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function B6(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 Ql(t){t.someProp("handleDOMEvents",e=>{for(let r in e)t.input.eventHandlers[r]||t.dom.addEventListener(r,t.input.eventHandlers[r]=n=>Uu(t,n))})}function Uu(t,e){return t.someProp("handleDOMEvents",r=>{let n=r[e.type];return n?n(t,e)||e.defaultPrevented:!1})}function F6(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let r=e.target;r!=t.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(e))return!1;return!0}function P6(t,e){!Uu(t,e)&&Tt[e.type]&&(t.editable||!(e.type in Dt))&&Tt[e.type](t,e)}Dt.keydown=(t,e)=>{let r=e;if(t.input.shiftKey=r.keyCode==16||r.shiftKey,!kp(t,r)&&(t.input.lastKeyCode=r.keyCode,t.input.lastKeyCodeTime=Date.now(),!(on&&bt&&r.keyCode==13)))if(r.keyCode!=229&&t.domObserver.forceFlush(),Wi&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();t.input.lastIOSEnter=n,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==n&&(t.someProp("handleKeyDown",i=>i(t,ni(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",n=>n(t,r))||E6(t,r)?r.preventDefault():zn(t,"key")};Dt.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Dt.keypress=(t,e)=>{let r=e;if(kp(t,r)||!r.charCode||r.ctrlKey&&!r.altKey||er&&r.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,r))){r.preventDefault();return}let n=t.state.selection;if(!(n instanceof ee)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(r.charCode),s=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,n.$from.pos,n.$to.pos,i,s))&&t.dispatch(s()),r.preventDefault()}};function a0(t){return{left:t.clientX,top:t.clientY}}function H6(t,e){let r=e.x-t.clientX,n=e.y-t.clientY;return r*r+n*n<100}function Ku(t,e,r,n,i){if(n==-1)return!1;let s=t.state.doc.resolve(n);for(let o=s.depth+1;o>0;o--)if(t.someProp(e,a=>o>s.depth?a(t,r,s.nodeAfter,s.before(o),i,!0):a(t,r,s.node(o),s.before(o),i,!1)))return!0;return!1}function Pi(t,e,r){if(t.focused||t.focus(),t.state.selection.eq(e))return;let n=t.state.tr.setSelection(e);n.setMeta("pointer",!0),t.dispatch(n)}function q6(t,e){if(e==-1)return!1;let r=t.state.doc.resolve(e),n=r.nodeAfter;return n&&n.isAtom&&X.isSelectable(n)?(Pi(t,new X(r)),!0):!1}function V6(t,e){if(e==-1)return!1;let r=t.state.selection,n,i;r instanceof X&&(n=r.node);let s=t.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(X.isSelectable(a)){n&&r.$from.depth>0&&o>=r.$from.depth&&s.before(r.$from.depth+1)==r.$from.pos?i=s.before(r.$from.depth):i=s.before(o);break}}return i!=null?(Pi(t,X.create(t.state.doc,i)),!0):!1}function $6(t,e,r,n,i){return Ku(t,"handleClickOn",e,r,n)||t.someProp("handleClick",s=>s(t,e,n))||(i?V6(t,r):q6(t,r))}function j6(t,e,r,n){return Ku(t,"handleDoubleClickOn",e,r,n)||t.someProp("handleDoubleClick",i=>i(t,e,n))}function W6(t,e,r,n){return Ku(t,"handleTripleClickOn",e,r,n)||t.someProp("handleTripleClick",i=>i(t,e,n))||U6(t,r,n)}function U6(t,e,r){if(r.button!=0)return!1;let n=t.state.doc;if(e==-1)return n.inlineContent?(Pi(t,ee.create(n,0,n.content.size)),!0):!1;let i=n.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)Pi(t,ee.create(n,a+1,a+1+o.content.size));else if(X.isSelectable(o))Pi(t,X.create(n,a));else continue;return!0}}function Gu(t){return ca(t)}const xp=er?"metaKey":"ctrlKey";Tt.mousedown=(t,e)=>{let r=e;t.input.shiftKey=r.shiftKey;let n=Gu(t),i=Date.now(),s="singleClick";i-t.input.lastClick.time<500&&H6(r,t.input.lastClick)&&!r[xp]&&t.input.lastClick.button==r.button&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:i,x:r.clientX,y:r.clientY,type:s,button:r.button};let o=t.posAtCoords(a0(r));o&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new K6(t,o,r,!!n)):(s=="doubleClick"?j6:W6)(t,o.pos,o.inside,r)?r.preventDefault():zn(t,"pointer"))};class K6{constructor(e,r,n,i){this.view=e,this.pos=r,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[xp],this.allowDefault=n.shiftKey;let s,o;if(r.inside>-1)s=e.state.doc.nodeAt(r.inside),o=r.inside;else{let c=e.state.doc.resolve(r.pos);s=c.parent,o=c.depth?c.before():0}const a=i?null:n.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=e.state;(n.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof X&&u.from<=o&&u.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ir&&!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()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),zn(e,"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(()=>un(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(a0(e))),this.updateAllowDefault(e),this.allowDefault||!r?zn(this.view,"pointer"):$6(this.view,r.pos,r.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Et&&this.mightDrag&&!this.mightDrag.node.isAtom||bt&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(Pi(this.view,ne.near(this.view.state.doc.resolve(r.pos))),e.preventDefault()):zn(this.view,"pointer")}move(e){this.updateAllowDefault(e),zn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Tt.touchstart=t=>{t.input.lastTouch=Date.now(),Gu(t),zn(t,"pointer")};Tt.touchmove=t=>{t.input.lastTouch=Date.now(),zn(t,"pointer")};Tt.contextmenu=t=>Gu(t);function kp(t,e){return t.composing?!0:Et&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const G6=on?5e3:-1;Dt.compositionstart=Dt.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,r=e.selection.$to;if(e.selection instanceof ee&&(e.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||r.marks(),ca(t,!0),t.markCursor=null;else if(ca(t,!e.selection.empty),ir&&e.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=t.domSelectionRange();for(let i=n.focusNode,s=n.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let a=t.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}t.input.composing=!0}wp(t,G6)};Dt.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++,wp(t,20))};function wp(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ca(t),e))}function Sp(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Y6());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function J6(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let r=q3(e.focusNode,e.focusOffset),n=V3(e.focusNode,e.focusOffset);if(r&&n&&r!=n){let i=n.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(r==s||n==s)return s;if(!i||!i.isText(n.nodeValue))return n;if(t.input.compositionNode==n){let o=r.pmViewDesc;if(!(!o||!o.isText(r.nodeValue)))return n}}return r||n}function Y6(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function ca(t,e=!1){if(!(on&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Sp(t),e||t.docView&&t.docView.dirty){let r=$u(t),n=t.state.selection;return r&&!r.eq(n)?t.dispatch(t.state.tr.setSelection(r)):(t.markCursor||e)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Z6(t,e){if(!t.dom.parentNode)return;let r=t.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),t.focus()},50)}const Fs=It&&Fn<15||Wi&&K3<604;Tt.copy=Dt.cut=(t,e)=>{let r=e,n=t.state.selection,i=r.type=="cut";if(n.empty)return;let s=Fs?null:r.clipboardData,o=n.content(),{dom:a,text:l}=Wu(t,o);s?(r.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):Z6(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function X6(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Q6(t,e){if(!t.dom.parentNode)return;let r=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,n=t.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),n.parentNode&&n.parentNode.removeChild(n),r?Ps(t,n.value,null,i,e):Ps(t,n.textContent,n.innerHTML,i,e)},50)}function Ps(t,e,r,n,i){let s=pp(t,e,r,n,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,s||V.empty)))return!0;if(!s)return!1;let o=X6(s),a=o?t.state.tr.replaceSelectionWith(o,n):t.state.tr.replaceSelection(s);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Cp(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let r=t.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}Dt.paste=(t,e)=>{let r=e;if(t.composing&&!on)return;let n=Fs?null:r.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;n&&Ps(t,Cp(n),n.getData("text/html"),i,r)?r.preventDefault():Q6(t,r)};class Ap{constructor(e,r,n){this.slice=e,this.move=r,this.node=n}}const eg=er?"altKey":"ctrlKey";function Mp(t,e){let r=t.someProp("dragCopies",n=>!n(e));return r??!e[eg]}Tt.dragstart=(t,e)=>{let r=e,n=t.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let i=t.state.selection,s=i.empty?null:t.posAtCoords(a0(r)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof X?i.to-1:i.to))){if(n&&n.mightDrag)o=X.create(t.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let d=t.docView.nearestDesc(r.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(o=X.create(t.state.doc,d.posBefore))}}let a=(o||t.state.selection).content(),{dom:l,text:u,slice:c}=Wu(t,a);(!r.dataTransfer.files.length||!bt||X1>120)&&r.dataTransfer.clearData(),r.dataTransfer.setData(Fs?"Text":"text/html",l.innerHTML),r.dataTransfer.effectAllowed="copyMove",Fs||r.dataTransfer.setData("text/plain",u),t.dragging=new Ap(c,Mp(t,r),o)};Tt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Dt.dragover=Dt.dragenter=(t,e)=>e.preventDefault();Dt.drop=(t,e)=>{let r=e,n=t.dragging;if(t.dragging=null,!r.dataTransfer)return;let i=t.posAtCoords(a0(r));if(!i)return;let s=t.state.doc.resolve(i.pos),o=n&&n.slice;o?t.someProp("transformPasted",p=>{o=p(o,t,!1)}):o=pp(t,Cp(r.dataTransfer),Fs?null:r.dataTransfer.getData("text/html"),!1,s);let a=!!(n&&Mp(t,r));if(t.someProp("handleDrop",p=>p(t,r,o||V.empty,a))){r.preventDefault();return}if(!o)return;r.preventDefault();let l=o?$1(t.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let u=t.state.tr;if(a){let{node:p}=n;p?p.replace(u):u.deleteSelection()}let c=u.mapping.map(l),d=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,h=u.doc;if(d?u.replaceRangeWith(c,c,o.content.firstChild):u.replaceRange(c,c,o),u.doc.eq(h))return;let f=u.doc.resolve(c);if(d&&X.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new X(f));else{let p=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((b,y,x,S)=>p=S),u.setSelection(ju(t,f,u.doc.resolve(p)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};Tt.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())&&un(t)},20))};Tt.blur=(t,e)=>{let r=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),r.relatedTarget&&t.dom.contains(r.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Tt.beforeinput=(t,e)=>{if(bt&&on&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,ni(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in Dt)Tt[t]=Dt[t];function Hs(t,e){if(t==e)return!0;for(let r in t)if(t[r]!==e[r])return!1;for(let r in e)if(!(r in t))return!1;return!0}class da{constructor(e,r){this.toDOM=e,this.spec=r||hi,this.side=this.spec.side||0}map(e,r,n,i){let{pos:s,deleted:o}=e.mapResult(r.from+i,this.side<0?-1:1);return o?null:new rt(s-n,s-n,this)}valid(){return!0}eq(e){return this==e||e instanceof da&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Hs(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Hn{constructor(e,r){this.attrs=e,this.spec=r||hi}map(e,r,n,i){let s=e.map(r.from+i,this.spec.inclusiveStart?-1:1)-n,o=e.map(r.to+i,this.spec.inclusiveEnd?1:-1)-n;return s>=o?null:new rt(s,o,this)}valid(e,r){return r.from=e&&(!s||s(a.spec))&&n.push(a.copy(a.from+i,a.to+i))}for(let o=0;oe){let a=this.children[o]+1;this.children[o+2].findInner(e-a,r-a,n,i+a,s)}}map(e,r,n){return this==gt||e.maps.length==0?this:this.mapInner(e,r,0,0,n||hi)}mapInner(e,r,n,i,s){let o;for(let a=0;a{let u=l+n,c;if(c=Tp(r,a,u)){for(i||(i=this.children.slice());sa&&d.to=e){this.children[a]==e&&(n=this.children[a+2]);break}let s=e+1,o=s+r.content.size;for(let a=0;as&&l.type instanceof Hn){let u=Math.max(s,l.from)-s,c=Math.min(o,l.to)-s;ui.map(e,r,hi));return Tn.from(n)}forChild(e,r){if(r.isLeaf)return ze.empty;let n=[];for(let i=0;ir instanceof ze)?e:e.reduce((r,n)=>r.concat(n instanceof ze?n:n.members),[]))}}forEachSet(e){for(let r=0;r{let y=b-p-(f-h);for(let x=0;xS+c-d)continue;let M=a[x]+c-d;f>=M?a[x+1]=h<=M?-2:-1:h>=c&&y&&(a[x]+=y,a[x+1]+=y)}d+=y}),c=r.maps[u].map(c,-1)}let l=!1;for(let u=0;u=n.content.size){l=!0;continue}let h=r.map(t[u+1]+s,-1),f=h-i,{index:p,offset:b}=n.content.findIndex(d),y=n.maybeChild(p);if(y&&b==d&&b+y.nodeSize==f){let x=a[u+2].mapInner(r,y,c+1,t[u]+s+1,o);x!=gt?(a[u]=d,a[u+1]=f,a[u+2]=x):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=rg(a,t,e,r,i,s,o),c=ha(u,n,0,o);e=c.local;for(let d=0;dr&&o.to{let u=Tp(t,a,l+r);if(u){s=!0;let c=ha(u,a,r+l+1,n);c!=gt&&i.push(l,l+a.nodeSize,c)}});let o=Ep(s?Dp(t):t,-r).sort(fi);for(let a=0;a0;)e++;t.splice(e,0,r)}function j0(t){let e=[];return t.someProp("decorations",r=>{let n=r(t.state);n&&n!=gt&&e.push(n)}),t.cursorWrapper&&e.push(ze.create(t.state.doc,[t.cursorWrapper.deco])),Tn.from(e)}const ng={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ig=It&&Fn<=11;class sg{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class og{constructor(e,r){this.view=e,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new sg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),ig&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.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,ng)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let r=0;rthis.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(Pd(this.view)){if(this.suppressingSelectionUpdates)return un(this.view);if(It&&Fn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&yi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let r=new Set,n;for(let s=e.focusNode;s;s=ji(s))r.add(s);for(let s=e.anchorNode;s;s=ji(s))if(r.has(s)){n=s;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Pd(e)&&!this.ignoreSelectionChange(n),s=-1,o=-1,a=!1,l=[];if(e.editable)for(let c=0;cd.nodeName=="BR");if(c.length==2){let[d,h]=c;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of c){let f=h.parentNode;f&&f.nodeName=="LI"&&(!d||ug(e,d)!=f)&&h.remove()}}}let u=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||i)&&(s>-1&&(e.docView.markDirty(s,o),ag(e)),this.handleDOMChange(s,o,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||un(e),this.currentSelection.set(n))}registerMutation(e,r){if(r.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;ci;y--){let x=n.childNodes[y-1],S=x.pmViewDesc;if(x.nodeName=="BR"&&!S){s=y;break}if(!S||S.size)break}let d=t.state.doc,h=t.someProp("domParser")||an.fromSchema(t.state.schema),f=d.resolve(o),p=null,b=h.parse(n,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:s,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:dg,context:f});if(u&&u[0].pos!=null){let y=u[0].pos,x=u[1]&&u[1].pos;x==null&&(x=y),p={anchor:y+o,head:x+o}}return{doc:b,sel:p,from:o,to:a}}function dg(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Et&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(t.parentNode.lastChild==t||Et&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const hg=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function fg(t,e,r,n,i){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let O=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,I=$u(t,O);if(I&&!t.state.selection.eq(I)){if(bt&&on&&t.input.lastKeyCode===13&&Date.now()-100$(t,ni(13,"Enter"))))return;let _=t.state.tr.setSelection(I);O=="pointer"?_.setMeta("pointer",!0):O=="key"&&_.scrollIntoView(),s&&_.setMeta("composition",s),t.dispatch(_)}return}let o=t.state.doc.resolve(e),a=o.sharedDepth(r);e=o.before(a+1),r=t.state.doc.resolve(r).after(a+1);let l=t.state.selection,u=cg(t,e,r),c=t.state.doc,d=c.slice(u.from,u.to),h,f;t.input.lastKeyCode===8&&Date.now()-100Date.now()-225||on)&&i.some(O=>O.nodeType==1&&!hg.test(O.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",O=>O(t,ni(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(n&&l instanceof ee&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let O=Zd(t,t.state.doc,u.sel);if(O&&!O.eq(t.state.selection)){let I=t.state.tr.setSelection(O);s&&I.setMeta("composition",s),t.dispatch(I)}}return}t.state.selection.fromt.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?p.start=t.state.selection.from:p.endA=t.state.selection.to-2&&t.state.selection.to<=u.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),It&&Fn<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)==" "&&(p.start--,p.endA--,p.endB--);let b=u.doc.resolveNoCache(p.start-u.from),y=u.doc.resolveNoCache(p.endB-u.from),x=c.resolve(p.start),S=b.sameParent(y)&&b.parent.inlineContent&&x.end()>=p.endA;if((Wi&&t.input.lastIOSEnter>Date.now()-225&&(!S||i.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!S&&b.posO(t,ni(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&mg(c,p.start,p.endA,b,y)&&t.someProp("handleKeyDown",O=>O(t,ni(8,"Backspace")))){on&&bt&&t.domObserver.suppressSelectionUpdates();return}bt&&p.endB==p.start&&(t.input.lastChromeDelete=Date.now()),on&&!S&&b.start()!=y.start()&&y.parentOffset==0&&b.depth==y.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,y=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(O){return O(t,ni(13,"Enter"))})},20));let M=p.start,w=p.endA,T=O=>{let I=O||t.state.tr.replace(M,w,u.doc.slice(p.start-u.from,p.endB-u.from));if(u.sel){let _=Zd(t,I.doc,u.sel);_&&!(bt&&t.composing&&_.empty&&(p.start!=p.endB||t.input.lastChromeDeleteun(t),20));let O=T(t.state.tr.delete(M,w)),I=c.resolve(p.start).marksAcross(c.resolve(p.endA));I&&O.ensureMarks(I),t.dispatch(O)}else if(p.endA==p.endB&&(D=pg(b.parent.content.cut(b.parentOffset,y.parentOffset),x.parent.content.cut(x.parentOffset,p.endA-x.start())))){let O=T(t.state.tr);D.type=="add"?O.addMark(M,w,D.mark):O.removeMark(M,w,D.mark),t.dispatch(O)}else if(b.parent.child(b.index()).isText&&b.index()==y.index()-(y.textOffset?0:1)){let O=b.parent.textBetween(b.parentOffset,y.parentOffset),I=()=>T(t.state.tr.insertText(O,M,w));t.someProp("handleTextInput",_=>_(t,M,w,O,I))||t.dispatch(I())}else t.dispatch(T());else t.dispatch(T())}function Zd(t,e,r){return Math.max(r.anchor,r.head)>e.content.size?null:ju(t,e.resolve(r.anchor),e.resolve(r.head))}function pg(t,e){let r=t.firstChild.marks,n=e.firstChild.marks,i=r,s=n,o,a,l;for(let c=0;cc.mark(a.addToSet(c.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;cr||W0(o,!0,!1)0&&(e||t.indexAfter(n)==t.node(n).childCount);)n--,i++,e=!1;if(r){let s=t.node(n).maybeChild(t.indexAfter(n));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function gg(t,e,r,n,i){let s=t.findDiffStart(e,r);if(s==null)return null;let{a:o,b:a}=t.findDiffEnd(e,r+t.size,r+e.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o=o?s-n:0;s-=l,s&&s=a?s-n:0;s-=l,s&&s=56320&&e<=57343&&r>=55296&&r<=56319}class Op{constructor(e,r){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 R6,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(nh),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=th(this),eh(this),this.nodeViews=rh(this),this.docView=_d(this.state.doc,Qd(this),j0(this),this.dom,this),this.domObserver=new og(this,(n,i,s,o)=>fg(this,n,i,s,o)),this.domObserver.start(),I6(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let r in e)this._props[r]=e[r];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ql(this);let r=this._props;this._props=e,e.plugins&&(e.plugins.forEach(nh),this.directPlugins=e.plugins),this.updateStateInner(e.state,r)}setProps(e){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in e)r[n]=e[n];this.update(r)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,r){var n;let i=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(Sp(this),o=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=r.plugins;if(a||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let f=rh(this);yg(f,this.nodeViews)&&(this.nodeViews=f,s=!0)}(a||r.handleDOMEvents!=this._props.handleDOMEvents)&&Ql(this),this.editable=th(this),eh(this);let l=j0(this),u=Qd(this),c=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,u,l);(d||!e.selection.eq(i.selection))&&(o=!0);let h=c=="preserve"&&o&&this.dom.style.overflowAnchor==null&&Y3(this);if(o){this.domObserver.stop();let f=d&&(It||bt)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&bg(i.selection,e.selection);if(d){let p=bt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=J6(this)),(s||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=_d(e.doc,u,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&x6(this))?un(this,f):(dp(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&Z3(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof X){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&Ed(this,r.getBoundingClientRect(),e)}else Ed(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;r0&&this.state.doc.nodeAt(s))==n.node&&(i=s)}this.dragging=new Ap(e.slice,e.move,i<0?void 0:X.create(this.state.doc,i))}someProp(e,r){let n=this._props&&this._props[e],i;if(n!=null&&(i=r?r(n):n))return i;for(let o=0;or.ownerDocument.getSelection()),this._root=r}return e||document}updateRoot(){this._root=null}posAtCoords(e){return n6(this,e)}coordsAtPos(e,r=1){return np(this,e,r)}domAtPos(e,r=0){return this.docView.domFromPos(e,r)}nodeDOM(e){let r=this.docView.descAt(e);return r?r.nodeDOM:null}posAtDOM(e,r,n=-1){let i=this.docView.posFromDOM(e,r,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,r){return l6(this,r||this.state,e)}pasteHTML(e,r){return Ps(this,"",e,!1,r||new ClipboardEvent("paste"))}pasteText(e,r){return Ps(this,e,null,!0,r||new ClipboardEvent("paste"))}serializeForClipboard(e){return Wu(this,e)}destroy(){this.docView&&(B6(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],j0(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,P3())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return P6(this,e)}domSelectionRange(){let e=this.domSelection();return e?Et&&this.root.nodeType===11&&j3(this.dom.ownerDocument)==this.dom&&lg(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Op.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function Qd(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(t.state)),r)for(let n in r)n=="class"?e.class+=" "+r[n]:n=="style"?e.style=(e.style?e.style+";":"")+r[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(r[n]))}),e.translate||(e.translate="no"),[rt.node(0,t.state.doc.content.size,e)]}function eh(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:rt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function th(t){return!t.someProp("editable",e=>e(t.state)===!1)}function bg(t,e){let r=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(r)!=e.$anchor.start(r)}function rh(t){let e=Object.create(null);function r(n){for(let i in n)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=n[i])}return t.someProp("nodeViews",r),t.someProp("markViews",r),e}function yg(t,e){let r=0,n=0;for(let i in t){if(t[i]!=e[i])return!0;r++}for(let i in e)n++;return r!=n}function nh(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")}var hn={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:"'"},fa={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},vg=typeof navigator<"u"&&/Mac/.test(navigator.platform),xg=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var pt=0;pt<10;pt++)hn[48+pt]=hn[96+pt]=String(pt);for(var pt=1;pt<=24;pt++)hn[pt+111]="F"+pt;for(var pt=65;pt<=90;pt++)hn[pt]=String.fromCharCode(pt+32),fa[pt]=String.fromCharCode(pt);for(var U0 in hn)fa.hasOwnProperty(U0)||(fa[U0]=hn[U0]);function Np(t){var e=vg&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||xg&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",r=!e&&t.key||(t.shiftKey?fa:hn)[t.keyCode]||t.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const kg=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),wg=typeof navigator<"u"&&/Win/.test(navigator.platform);function Sg(t){let e=t.split(/-(?!$)/),r=e[e.length-1];r=="Space"&&(r=" ");let n,i,s,o;for(let a=0;at.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function _p(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("backward",t):r.parentOffset>0)?null:r}const zp=(t,e,r)=>{let n=_p(t,r);if(!n)return!1;let i=Xu(n);if(!i){let o=n.blockRange(),a=o&&rs(o);return a==null?!1:(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if($p(t,i,e,-1))return!0;if(n.parent.content.size==0&&(Ui(s,"end")||X.isSelectable(s)))for(let o=n.depth;;o--){let a=n0(t.doc,n.before(o),n.after(o),V.empty);if(a&&a.slice.size1)break}return s.isAtom&&i.depth==n.depth-1?(e&&e(t.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},Mg=(t,e,r)=>{let n=_p(t,r);if(!n)return!1;let i=Xu(n);return i?Rp(t,i,e):!1},Eg=(t,e,r)=>{let n=Bp(t,r);if(!n)return!1;let i=Qu(n);return i?Rp(t,i,e):!1};function Rp(t,e,r){let n=e.nodeBefore,i=n,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let o=e.nodeAfter,a=o,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=n0(t.doc,s,l,V.empty);if(!u||u.from!=s||u instanceof at&&u.slice.size>=l-s)return!1;if(r){let c=t.tr.step(u);c.setSelection(ee.create(c.doc,s)),r(c.scrollIntoView())}return!0}function Ui(t,e,r=!1){for(let n=t;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const Ip=(t,e,r)=>{let{$head:n,empty:i}=t.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",t):n.parentOffset>0)return!1;s=Xu(n)}let o=s&&s.nodeBefore;return!o||!X.isSelectable(o)?!1:(e&&e(t.tr.setSelection(X.create(t.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function Xu(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 Bp(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("forward",t):r.parentOffset{let n=Bp(t,r);if(!n)return!1;let i=Qu(n);if(!i)return!1;let s=i.nodeAfter;if($p(t,i,e,1))return!0;if(n.parent.content.size==0&&(Ui(s,"start")||X.isSelectable(s))){let o=n0(t.doc,n.before(),n.after(),V.empty);if(o&&o.slice.size{let{$head:n,empty:i}=t.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",t):n.parentOffset=0;e--){let r=t.node(e);if(t.index(e)+1{let r=t.selection,n=r instanceof X,i;if(n){if(r.node.isTextblock||!Wn(t.doc,r.from))return!1;i=r.from}else if(i=r0(t.doc,r.from,-1),i==null)return!1;if(e){let s=t.tr.join(i);n&&s.setSelection(X.create(s.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},Dg=(t,e)=>{let r=t.selection,n;if(r instanceof X){if(r.node.isTextblock||!Wn(t.doc,r.to))return!1;n=r.to}else if(n=r0(t.doc,r.to,1),n==null)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0},Og=(t,e)=>{let{$from:r,$to:n}=t.selection,i=r.blockRange(n),s=i&&rs(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)},Hp=(t,e)=>{let{$head:r,$anchor:n}=t.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(e&&e(t.tr.insertText(`
`).scrollIntoView()),!0)};function ec(t){for(let e=0;e{let{$head:r,$anchor:n}=t.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),s=r.indexAfter(-1),o=ec(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let a=r.after(),l=t.tr.replaceWith(a,a,o.createAndFill());l.setSelection(ne.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},qp=(t,e)=>{let r=t.selection,{$from:n,$to:i}=r;if(r instanceof Ut||n.parent.inlineContent||i.parent.inlineContent)return!1;let s=ec(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!n.parentOffset&&i.index(){let{$cursor:r}=t.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let s=r.before();if(ln(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let n=r.blockRange(),i=n&&rs(n);return i==null?!1:(e&&e(t.tr.lift(n,i).scrollIntoView()),!0)};function Lg(t){return(e,r)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof X&&e.selection.node.isBlock)return!n.parentOffset||!ln(e.doc,n.pos)?!1:(r&&r(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let s=[],o,a,l=!1,u=!1;for(let f=n.depth;;f--)if(n.node(f).isBlock){l=n.end(f)==n.pos+(n.depth-f),u=n.start(f)==n.pos-(n.depth-f),a=ec(n.node(f-1).contentMatchAt(n.indexAfter(f-1))),s.unshift(l&&a?{type:a}:null),o=f;break}else{if(f==1)return!1;s.unshift(null)}let c=e.tr;(e.selection instanceof ee||e.selection instanceof Ut)&&c.deleteSelection();let d=c.mapping.map(n.pos),h=ln(c.doc,d,s.length,s);if(h||(s[0]=a?{type:a}:null,h=ln(c.doc,d,s.length,s)),!h)return!1;if(c.split(d,s.length,s),!l&&u&&n.node(o).type!=a){let f=c.mapping.map(n.before(o)),p=c.doc.resolve(f);a&&n.node(o-1).canReplaceWith(p.index(),p.index()+1,a)&&c.setNodeMarkup(c.mapping.map(n.before(o)),a)}return r&&r(c.scrollIntoView()),!0}}const _g=Lg(),zg=(t,e)=>{let{$from:r,to:n}=t.selection,i,s=r.sharedDepth(n);return s==0?!1:(i=r.before(s),e&&e(t.tr.setSelection(X.create(t.doc,i))),!0)};function Rg(t,e,r){let n=e.nodeBefore,i=e.nodeAfter,s=e.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&e.parent.canReplace(s-1,s)?(r&&r(t.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||Wn(t.doc,e.pos))?!1:(r&&r(t.tr.join(e.pos).scrollIntoView()),!0)}function $p(t,e,r,n){let i=e.nodeBefore,s=e.nodeAfter,o,a,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&Rg(t,e,r))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(a=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&a.matchType(o[0]||s.type).validEnd){if(r){let f=e.pos+s.nodeSize,p=R.empty;for(let x=o.length-1;x>=0;x--)p=R.from(o[x].create(null,p));p=R.from(i.copy(p));let b=t.tr.step(new ut(e.pos-1,f,e.pos,f,new V(p,1,0),o.length,!0)),y=b.doc.resolve(f+2*o.length);y.nodeAfter&&y.nodeAfter.type==i.type&&Wn(b.doc,y.pos)&&b.join(y.pos),r(b.scrollIntoView())}return!0}let c=s.type.spec.isolating||n>0&&l?null:ne.findFrom(e,1),d=c&&c.$from.blockRange(c.$to),h=d&&rs(d);if(h!=null&&h>=e.depth)return r&&r(t.tr.lift(d,h).scrollIntoView()),!0;if(u&&Ui(s,"start",!0)&&Ui(i,"end")){let f=i,p=[];for(;p.push(f),!f.isTextblock;)f=f.lastChild;let b=s,y=1;for(;!b.isTextblock;b=b.firstChild)y++;if(f.canReplace(f.childCount,f.childCount,b.content)){if(r){let x=R.empty;for(let M=p.length-1;M>=0;M--)x=R.from(p[M].copy(x));let S=t.tr.step(new ut(e.pos-p.length,e.pos+s.nodeSize,e.pos+y,e.pos+s.nodeSize-y,new V(x,p.length,0),0,!0));r(S.scrollIntoView())}return!0}}return!1}function jp(t){return function(e,r){let n=e.selection,i=t<0?n.$from:n.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(r&&r(e.tr.setSelection(ee.create(e.doc,t<0?i.start(s):i.end(s)))),!0):!1}}const Ig=jp(-1),Bg=jp(1);function Fg(t,e=null){return function(r,n){let{$from:i,$to:s}=r.selection,o=i.blockRange(s),a=o&&Pu(o,t,e);return a?(n&&n(r.tr.wrap(o,a).scrollIntoView()),!0):!1}}function ih(t,e=null){return function(r,n){let i=!1;for(let s=0;s{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)i=!0;else{let c=r.doc.resolve(u),d=c.index();i=c.parent.canReplaceWith(d,d+1,t)}})}if(!i)return!1;if(n){let s=r.tr;for(let o=0;o=2&&e.$from.node(e.depth-1).type.compatibleContent(r)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);s=new aa(l,l,e.depth),e.endIndex=0;c--)s=R.from(r[c].type.create(r[c].attrs,s));t.step(new ut(e.start-(n?2:0),e.end,e.start,e.end,new V(s,0,0),r.length,!0));let o=0;for(let c=0;co.childCount>0&&o.firstChild.type==t);return s?r?n.node(s.depth-1).type==t?$g(e,r,t,s):jg(e,r,s):!0:!1}}function $g(t,e,r,n){let i=t.tr,s=n.end,o=n.$to.end(n.depth);sb;p--)f-=i.child(p).nodeSize,n.delete(f-1,f+1);let s=n.doc.resolve(r.start),o=s.nodeAfter;if(n.mapping.map(r.end)!=r.start+s.nodeAfter.nodeSize)return!1;let a=r.startIndex==0,l=r.endIndex==i.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(a?0:1),c+1,o.content.append(l?R.empty:R.from(i))))return!1;let d=s.pos,h=d+o.nodeSize;return n.step(new ut(d-(a?1:0),h+(l?1:0),d+1,h-1,new V((a?R.empty:R.from(i.copy(R.empty))).append(l?R.empty:R.from(i.copy(R.empty))),a?0:1,l?0:1),a?0:1)),e(n.scrollIntoView()),!0}function Wg(t){return function(e,r){let{$from:n,$to:i}=e.selection,s=n.blockRange(i,u=>u.childCount>0&&u.firstChild.type==t);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=t)return!1;if(r){let u=l.lastChild&&l.lastChild.type==a.type,c=R.from(u?t.create():null),d=new V(R.from(t.create(null,R.from(a.type.create(null,c)))),u?3:1,0),h=s.start,f=s.end;r(e.tr.step(new ut(h-(u?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}function l0(t){const{state:e,transaction:r}=t;let{selection:n}=r,{doc:i}=r,{storedMarks:s}=r;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 s},get selection(){return n},get doc(){return i},get tr(){return n=r.selection,i=r.doc,s=r.storedMarks,r}}}class u0{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:r,state:n}=this,{view:i}=r,{tr:s}=n,o=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>{const d=l(...c)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a=[],l=!!e,u=e||s.tr,c=()=>(!l&&r&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(u),a.every(h=>h===!0)),d={...Object.fromEntries(Object.entries(n).map(([h,f])=>[h,(...b)=>{const y=this.buildProps(u,r),x=f(...b)(y);return a.push(x),d}])),run:c};return d}createCan(e){const{rawCommands:r,state:n}=this,i=!1,s=e||n.tr,o=this.buildProps(s,i);return{...Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...c)=>u(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,i)}}buildProps(e,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a={tr:e,editor:i,view:o,state:l0({state:s,transaction:e}),dispatch:r?()=>{}:void 0,chain:()=>this.createChain(e,r),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...c)=>u(...c)(a)]))}};return a}}class Ug{constructor(){this.callbacks={}}on(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),this}emit(e,...r){const n=this.callbacks[e];return n&&n.forEach(i=>i.apply(this,r)),this}off(e,r){const n=this.callbacks[e];return n&&(r?this.callbacks[e]=n.filter(i=>i!==r):delete this.callbacks[e]),this}once(e,r){const n=(...i)=>{this.off(e,n),r.apply(this,i)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}}function J(t,e,r){return t.config[e]===void 0&&t.parent?J(t.parent,e,r):typeof t.config[e]=="function"?t.config[e].bind({...r,parent:t.parent?J(t.parent,e,r):null}):t.config[e]}function c0(t){const e=t.filter(i=>i.type==="extension"),r=t.filter(i=>i.type==="node"),n=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:r,markExtensions:n}}function Wp(t){const e=[],{nodeExtensions:r,markExtensions:n}=c0(t),i=[...r,...n],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:i},l=J(o,"addGlobalAttributes",a);if(!l)return;l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([h,f])=>{e.push({type:d,name:h,attribute:{...s,...f}})})})})}),i.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=J(o,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([c,d])=>{const h={...s,...d};typeof(h==null?void 0:h.default)=="function"&&(h.default=h.default()),h!=null&&h.isRequired&&(h==null?void 0:h.default)===void 0&&delete h.default,e.push({type:o.name,name:c,attribute:h})})}),e}function dt(t,e){if(typeof t=="string"){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 Se(...t){return t.filter(e=>!!e).reduce((e,r)=>{const n={...e};return Object.entries(r).forEach(([i,s])=>{if(!n[i]){n[i]=s;return}if(i==="class"){const a=s?String(s).split(" "):[],l=n[i]?n[i].split(" "):[],u=a.filter(c=>!l.includes(c));n[i]=[...l,...u].join(" ")}else if(i==="style"){const a=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],l=n[i]?n[i].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{const[d,h]=c.split(":").map(f=>f.trim());u.set(d,h)}),a.forEach(c=>{const[d,h]=c.split(":").map(f=>f.trim());u.set(d,h)}),n[i]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else n[i]=s}),n},{})}function eu(t,e){return e.filter(r=>r.type===t.type.name).filter(r=>r.attribute.rendered).map(r=>r.attribute.renderHTML?r.attribute.renderHTML(t.attrs)||{}:{[r.name]:t.attrs[r.name]}).reduce((r,n)=>Se(r,n),{})}function Up(t){return typeof t=="function"}function pe(t,e=void 0,...r){return Up(t)?e?t.bind(e)(...r):t(...r):t}function Kg(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Gg(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function sh(t,e){return"style"in t?t:{...t,getAttrs:r=>{const n=t.getAttrs?t.getAttrs(r):t.attrs;if(n===!1)return!1;const i=e.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(r):Gg(r.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...n,...i}}}}function oh(t){return Object.fromEntries(Object.entries(t).filter(([e,r])=>e==="attrs"&&Kg(r)?!1:r!=null))}function Jg(t,e){var r;const n=Wp(t),{nodeExtensions:i,markExtensions:s}=c0(t),o=(r=i.find(u=>J(u,"topNode")))===null||r===void 0?void 0:r.name,a=Object.fromEntries(i.map(u=>{const c=n.filter(x=>x.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},h=t.reduce((x,S)=>{const M=J(S,"extendNodeSchema",d);return{...x,...M?M(u):{}}},{}),f=oh({...h,content:pe(J(u,"content",d)),marks:pe(J(u,"marks",d)),group:pe(J(u,"group",d)),inline:pe(J(u,"inline",d)),atom:pe(J(u,"atom",d)),selectable:pe(J(u,"selectable",d)),draggable:pe(J(u,"draggable",d)),code:pe(J(u,"code",d)),whitespace:pe(J(u,"whitespace",d)),linebreakReplacement:pe(J(u,"linebreakReplacement",d)),defining:pe(J(u,"defining",d)),isolating:pe(J(u,"isolating",d)),attrs:Object.fromEntries(c.map(x=>{var S;return[x.name,{default:(S=x==null?void 0:x.attribute)===null||S===void 0?void 0:S.default}]}))}),p=pe(J(u,"parseHTML",d));p&&(f.parseDOM=p.map(x=>sh(x,c)));const b=J(u,"renderHTML",d);b&&(f.toDOM=x=>b({node:x,HTMLAttributes:eu(x,c)}));const y=J(u,"renderText",d);return y&&(f.toText=y),[u.name,f]})),l=Object.fromEntries(s.map(u=>{const c=n.filter(y=>y.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},h=t.reduce((y,x)=>{const S=J(x,"extendMarkSchema",d);return{...y,...S?S(u):{}}},{}),f=oh({...h,inclusive:pe(J(u,"inclusive",d)),excludes:pe(J(u,"excludes",d)),group:pe(J(u,"group",d)),spanning:pe(J(u,"spanning",d)),code:pe(J(u,"code",d)),attrs:Object.fromEntries(c.map(y=>{var x;return[y.name,{default:(x=y==null?void 0:y.attribute)===null||x===void 0?void 0:x.default}]}))}),p=pe(J(u,"parseHTML",d));p&&(f.parseDOM=p.map(y=>sh(y,c)));const b=J(u,"renderHTML",d);return b&&(f.toDOM=y=>b({mark:y,HTMLAttributes:eu(y,c)})),[u.name,f]}));return new Iu({topNode:o,nodes:a,marks:l})}function G0(t,e){return e.nodes[t]||e.marks[t]||null}function ah(t,e){return Array.isArray(e)?e.some(r=>(typeof r=="string"?r:r.name)===t.name):e}function no(t,e){const r=Si.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(r),i.innerHTML}const Yg=(t,e=500)=>{let r="";const n=t.parentOffset;return t.parent.nodesBetween(Math.max(0,n-e),n,(i,s,o,a)=>{var l,u;const c=((u=(l=i.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";r+=i.isAtom&&!i.isText?c:c.slice(0,Math.max(0,n-s))}),r};function rc(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class d0{constructor(e){this.find=e.find,this.handler=e.handler}}const Zg=(t,e)=>{if(rc(e))return e.exec(t);const r=e(t);if(!r)return null;const n=[r.text];return n.index=r.index,n.input=t,n.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(r.replaceWith)),n};function xo(t){var e;const{editor:r,from:n,to:i,text:s,rules:o,plugin:a}=t,{view:l}=r;if(l.composing)return!1;const u=l.state.doc.resolve(n);if(u.parent.type.spec.code||!((e=u.nodeBefore||u.nodeAfter)===null||e===void 0)&&e.marks.find(h=>h.type.spec.code))return!1;let c=!1;const d=Yg(u)+s;return o.forEach(h=>{if(c)return;const f=Zg(d,h.find);if(!f)return;const p=l.state.tr,b=l0({state:l.state,transaction:p}),y={from:n-(f[0].length-s.length),to:i},{commands:x,chain:S,can:M}=new u0({editor:r,state:b});h.handler({state:b,range:y,match:f,commands:x,chain:S,can:M})===null||!p.steps.length||(p.setMeta(a,{transform:p,from:n,to:i,text:s}),l.dispatch(p),c=!0)}),c}function Xg(t){const{editor:e,rules:r}=t,n=new Ve({state:{init(){return null},apply(i,s,o){const a=i.getMeta(n);if(a)return a;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=no(R.from(c),o.schema);const{from:d}=l,h=d+c.length;xo({editor:e,from:d,to:h,text:c,rules:r,plugin:n})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return xo({editor:e,from:s,to:o,text:a,rules:r,plugin:n})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&xo({editor:e,from:s.pos,to:s.pos,text:"",rules:r,plugin:n})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?xo({editor:e,from:o.pos,to:o.pos,text:`
`,rules:r,plugin:n}):!1}},isInputRules:!0});return n}function Qg(t){return Object.prototype.toString.call(t).slice(8,-1)}function ko(t){return Qg(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function h0(t,e){const r={...t};return ko(t)&&ko(e)&&Object.keys(e).forEach(n=>{ko(e[n])&&ko(t[n])?r[n]=h0(t[n],e[n]):r[n]=e[n]}),r}class mt{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.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=pe(J(this,"addOptions",{name:this.name}))),this.storage=pe(J(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new mt(e)}configure(e={}){const r=this.extend({...this.config,addOptions:()=>h0(this.options,e)});return r.name=this.name,r.parent=this.parent,r}extend(e={}){const r=new mt(e);return r.parent=this,this.child=r,r.name=e.name?e.name:r.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=pe(J(r,"addOptions",{name:r.name})),r.storage=pe(J(r,"addStorage",{name:r.name,options:r.options})),r}static handleExit({editor:e,mark:r}){const{tr:n}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===r.name))return!1;const l=o.find(u=>(u==null?void 0:u.type.name)===r.name);return l&&n.removeStoredMark(l),n.insertText(" ",i.pos),e.view.dispatch(n),!0}return!1}}function e5(t){return typeof t=="number"}class t5{constructor(e){this.find=e.find,this.handler=e.handler}}const r5=(t,e,r)=>{if(rc(e))return[...t.matchAll(e)];const n=e(t,r);return n?n.map(i=>{const s=[i.text];return s.index=i.index,s.input=t,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function n5(t){const{editor:e,state:r,from:n,to:i,rule:s,pasteEvent:o,dropEvent:a}=t,{commands:l,chain:u,can:c}=new u0({editor:e,state:r}),d=[];return r.doc.nodesBetween(n,i,(f,p)=>{if(!f.isTextblock||f.type.spec.code)return;const b=Math.max(n,p),y=Math.min(i,p+f.content.size),x=f.textBetween(b-p,y-p,void 0,"");r5(x,s.find,o).forEach(M=>{if(M.index===void 0)return;const w=b+M.index+1,T=w+M[0].length,D={from:r.tr.mapping.map(w),to:r.tr.mapping.map(T)},O=s.handler({state:r,range:D,match:M,commands:l,chain:u,can:c,pasteEvent:o,dropEvent:a});d.push(O)})}),d.every(f=>f!==null)}let wo=null;const i5=t=>{var e;const r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=r.clipboardData)===null||e===void 0||e.setData("text/html",t),r};function s5(t){const{editor:e,rules:r}=t;let n=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:c,from:d,to:h,rule:f,pasteEvt:p})=>{const b=c.tr,y=l0({state:c,transaction:b});if(!(!n5({editor:e,state:y,from:Math.max(d-1,0),to:h.b-1,rule:f,pasteEvent:p,dropEvent:a})||!b.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,b}};return r.map(c=>new Ve({view(d){const h=p=>{var b;n=!((b=d.dom.parentElement)===null||b===void 0)&&b.contains(p.target)?d.dom.parentElement:null,n&&(wo=e)},f=()=>{wo&&(wo=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",f),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",f)}}},props:{handleDOMEvents:{drop:(d,h)=>{if(s=n===d.dom.parentElement,a=h,!s){const f=wo;f!=null&&f.isEditable&&setTimeout(()=>{const p=f.state.selection;p&&f.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(d,h)=>{var f;const p=(f=h.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return o=h,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,h,f)=>{const p=d[0],b=p.getMeta("uiEvent")==="paste"&&!i,y=p.getMeta("uiEvent")==="drop"&&!s,x=p.getMeta("applyPasteRules"),S=!!x;if(!b&&!y&&!S)return;if(S){let{text:T}=x;typeof T=="string"?T=T:T=no(R.from(T),f.schema);const{from:D}=x,O=D+T.length,I=i5(T);return l({rule:c,state:f,from:D,to:{b:O},pasteEvt:I})}const M=h.doc.content.findDiffStart(f.doc.content),w=h.doc.content.findDiffEnd(f.doc.content);if(!(!e5(M)||!w||M===w.b))return l({rule:c,state:f,from:M,to:w,pasteEvt:o})}}))}function o5(t){const e=t.filter((r,n)=>t.indexOf(r)!==n);return Array.from(new Set(e))}class Bi{constructor(e,r){this.splittableMarks=[],this.editor=r,this.extensions=Bi.resolve(e),this.schema=Jg(this.extensions,r),this.setupExtensions()}static resolve(e){const r=Bi.sort(Bi.flatten(e)),n=o5(r.map(i=>i.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),r}static flatten(e){return e.map(r=>{const n={name:r.name,options:r.options,storage:r.storage},i=J(r,"addExtensions",n);return i?[r,...this.flatten(i())]:r}).flat(10)}static sort(e){return e.sort((n,i)=>{const s=J(n,"priority")||100,o=J(i,"priority")||100;return s>o?-1:s{const n={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:G0(r.name,this.schema)},i=J(r,"addCommands",n);return i?{...e,...i()}:e},{})}get plugins(){const{editor:e}=this,r=Bi.sort([...this.extensions].reverse()),n=[],i=[],s=r.map(o=>{const a={name:o.name,options:o.options,storage:o.storage,editor:e,type:G0(o.name,this.schema)},l=[],u=J(o,"addKeyboardShortcuts",a);let c={};if(o.type==="mark"&&J(o,"exitable",a)&&(c.ArrowRight=()=>mt.handleExit({editor:e,mark:o})),u){const b=Object.fromEntries(Object.entries(u()).map(([y,x])=>[y,()=>x({editor:e})]));c={...c,...b}}const d=Ag(c);l.push(d);const h=J(o,"addInputRules",a);ah(o,e.options.enableInputRules)&&h&&n.push(...h());const f=J(o,"addPasteRules",a);ah(o,e.options.enablePasteRules)&&f&&i.push(...f());const p=J(o,"addProseMirrorPlugins",a);if(p){const b=p();l.push(...b)}return l}).flat();return[Xg({editor:e,rules:n}),...s5({editor:e,rules:i}),...s]}get attributes(){return Wp(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:r}=c0(this.extensions);return Object.fromEntries(r.filter(n=>!!J(n,"addNodeView")).map(n=>{const i=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:e,type:dt(n.name,this.schema)},o=J(n,"addNodeView",s);if(!o)return[];const a=(l,u,c,d,h)=>{const f=eu(l,i);return o()({node:l,view:u,getPos:c,decorations:d,innerDecorations:h,editor:e,extension:n,HTMLAttributes:f})};return[n.name,a]}))}setupExtensions(){this.extensions.forEach(e=>{var r;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:G0(e.name,this.schema)};e.type==="mark"&&(!((r=pe(J(e,"keepOnSplit",n)))!==null&&r!==void 0)||r)&&this.splittableMarks.push(e.name);const i=J(e,"onBeforeCreate",n),s=J(e,"onCreate",n),o=J(e,"onUpdate",n),a=J(e,"onSelectionUpdate",n),l=J(e,"onTransaction",n),u=J(e,"onFocus",n),c=J(e,"onBlur",n),d=J(e,"onDestroy",n);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}}class Ke{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.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=pe(J(this,"addOptions",{name:this.name}))),this.storage=pe(J(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ke(e)}configure(e={}){const r=this.extend({...this.config,addOptions:()=>h0(this.options,e)});return r.name=this.name,r.parent=this.parent,r}extend(e={}){const r=new Ke({...this.config,...e});return r.parent=this,this.child=r,r.name=e.name?e.name:r.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=pe(J(r,"addOptions",{name:r.name})),r.storage=pe(J(r,"addStorage",{name:r.name,options:r.options})),r}}function Kp(t,e,r){const{from:n,to:i}=e,{blockSeparator:s=`
`,textSerializers:o={}}=r||{};let a="";return t.nodesBetween(n,i,(l,u,c,d)=>{var h;l.isBlock&&u>n&&(a+=s);const f=o==null?void 0:o[l.type.name];if(f)return c&&(a+=f({node:l,pos:u,parent:c,index:d,range:e})),!1;l.isText&&(a+=(h=l==null?void 0:l.text)===null||h===void 0?void 0:h.slice(Math.max(n,u)-u,i-u))}),a}function Gp(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,r])=>[e,r.spec.toText]))}const Jp=Ke.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Ve({key:new Je("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:r}=t,{doc:n,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(c=>c.$from.pos)),a=Math.max(...s.map(c=>c.$to.pos)),l=Gp(r);return Kp(n,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),a5=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var r;t.isDestroyed||(e.dom.blur(),(r=window==null?void 0:window.getSelection())===null||r===void 0||r.removeAllRanges())}),!0),l5=(t=!1)=>({commands:e})=>e.setContent("",t),u5=()=>({state:t,tr:e,dispatch:r})=>{const{selection:n}=e,{ranges:i}=n;return r&&i.forEach(({$from:s,$to:o})=>{t.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:c}=e,d=u.resolve(c.map(l)),h=u.resolve(c.map(l+a.nodeSize)),f=d.blockRange(h);if(!f)return;const p=rs(f);if(a.type.isTextblock){const{defaultType:b}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(f.start,b)}(p||p===0)&&e.lift(f,p)})}),!0},c5=t=>e=>t(e),d5=()=>({state:t,dispatch:e})=>qp(t,e),h5=(t,e)=>({editor:r,tr:n})=>{const{state:i}=r,s=i.doc.slice(t.from,t.to);n.deleteRange(t.from,t.to);const o=n.mapping.map(e);return n.insert(o,s.content),n.setSelection(new ee(n.doc.resolve(Math.max(o-1,0)))),!0},f5=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,n=r.$anchor.node();if(n.content.size>0)return!1;const i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===n.type){if(e){const a=i.before(s),l=i.after(s);t.delete(a,l).scrollIntoView()}return!0}return!1},p5=t=>({tr:e,state:r,dispatch:n})=>{const i=dt(t,r.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(n){const l=s.before(o),u=s.after(o);e.delete(l,u).scrollIntoView()}return!0}return!1},m5=t=>({tr:e,dispatch:r})=>{const{from:n,to:i}=t;return r&&e.delete(n,i),!0},g5=()=>({state:t,dispatch:e})=>Zu(t,e),b5=()=>({commands:t})=>t.keyboardShortcut("Enter"),y5=()=>({state:t,dispatch:e})=>Ng(t,e);function pa(t,e,r={strict:!0}){const n=Object.keys(e);return n.length?n.every(i=>r.strict?e[i]===t[i]:rc(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function Yp(t,e,r={}){return t.find(n=>n.type===e&&pa(Object.fromEntries(Object.keys(r).map(i=>[i,n.attrs[i]])),r))}function lh(t,e,r={}){return!!Yp(t,e,r)}function nc(t,e,r){var n;if(!t||!e)return;let i=t.parent.childAfter(t.parentOffset);if((!i.node||!i.node.marks.some(c=>c.type===e))&&(i=t.parent.childBefore(t.parentOffset)),!i.node||!i.node.marks.some(c=>c.type===e)||(r=r||((n=i.node.marks[0])===null||n===void 0?void 0:n.attrs),!Yp([...i.node.marks],e,r)))return;let o=i.index,a=t.start()+i.offset,l=o+1,u=a+i.node.nodeSize;for(;o>0&&lh([...t.parent.child(o-1).marks],e,r);)o-=1,a-=t.parent.child(o).nodeSize;for(;l({tr:r,state:n,dispatch:i})=>{const s=Kn(t,n.schema),{doc:o,selection:a}=r,{$from:l,from:u,to:c}=a;if(i){const d=nc(l,s,e);if(d&&d.from<=u&&d.to>=c){const h=ee.create(o,d.from,d.to);r.setSelection(h)}}return!0},x5=t=>e=>{const r=typeof t=="function"?t(e):t;for(let n=0;n({editor:r,view:n,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};const o=()=>{(ic()||k5())&&n.dom.focus(),requestAnimationFrame(()=>{r.isDestroyed||(n.focus(),e!=null&&e.scrollIntoView&&r.commands.scrollIntoView())})};if(n.hasFocus()&&t===null||t===!1)return!0;if(s&&t===null&&!Zp(r.state.selection))return o(),!0;const a=Xp(i.doc,t)||r.state.selection,l=r.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},S5=(t,e)=>r=>t.every((n,i)=>e(n,{...r,index:i})),C5=(t,e)=>({tr:r,commands:n})=>n.insertContentAt({from:r.selection.from,to:r.selection.to},t,e),Qp=t=>{const e=t.childNodes;for(let r=e.length-1;r>=0;r-=1){const n=e[r];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?t.removeChild(n):n.nodeType===1&&Qp(n)}return t};function So(t){const e=`${t}`,r=new window.DOMParser().parseFromString(e,"text/html").body;return Qp(r)}function qs(t,e,r){if(t instanceof Bn||t instanceof R)return t;r={slice:!0,parseOptions:{},...r};const n=typeof t=="object"&&t!==null,i=typeof t=="string";if(n)try{if(Array.isArray(t)&&t.length>0)return R.fromArray(t.map(a=>e.nodeFromJSON(a)));const o=e.nodeFromJSON(t);return r.errorOnInvalidContent&&o.check(),o}catch(s){if(r.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),qs("",e,r)}if(i){if(r.errorOnInvalidContent){let o=!1,a="";const l=new Iu({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(r.slice?an.fromSchema(l).parseSlice(So(t),r.parseOptions):an.fromSchema(l).parse(So(t),r.parseOptions),r.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=an.fromSchema(e);return r.slice?s.parseSlice(So(t),r.parseOptions).content:s.parse(So(t),r.parseOptions)}return qs("",e,r)}function A5(t,e,r){const n=t.steps.length-1;if(n{o===0&&(o=c)}),t.setSelection(ne.near(t.doc.resolve(o),r))}const M5=t=>!("type"in t),E5=(t,e,r)=>({tr:n,dispatch:i,editor:s})=>{var o;if(i){r={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};let a;const l=y=>{s.emit("contentError",{editor:s,error:y,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...r.parseOptions};if(!r.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{qs(e,s.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(y){l(y)}try{a=qs(e,s.schema,{parseOptions:u,errorOnInvalidContent:(o=r.errorOnInvalidContent)!==null&&o!==void 0?o:s.options.enableContentCheck})}catch(y){return l(y),!1}let{from:c,to:d}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},h=!0,f=!0;if((M5(a)?a:[a]).forEach(y=>{y.check(),h=h?y.isText&&y.marks.length===0:!1,f=f?y.isBlock:!1}),c===d&&f){const{parent:y}=n.doc.resolve(c);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(c-=1,d+=1)}let b;if(h){if(Array.isArray(e))b=e.map(y=>y.text||"").join("");else if(e instanceof R){let y="";e.forEach(x=>{x.text&&(y+=x.text)}),b=y}else typeof e=="object"&&e&&e.text?b=e.text:b=e;n.insertText(b,c,d)}else b=a,n.replaceWith(c,d,b);r.updateSelection&&A5(n,n.steps.length-1,-1),r.applyInputRules&&n.setMeta("applyInputRules",{from:c,text:b}),r.applyPasteRules&&n.setMeta("applyPasteRules",{from:c,text:b})}return!0},T5=()=>({state:t,dispatch:e})=>Tg(t,e),D5=()=>({state:t,dispatch:e})=>Dg(t,e),O5=()=>({state:t,dispatch:e})=>zp(t,e),N5=()=>({state:t,dispatch:e})=>Fp(t,e),L5=()=>({state:t,dispatch:e,tr:r})=>{try{const n=r0(t.doc,t.selection.$from.pos,-1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},_5=()=>({state:t,dispatch:e,tr:r})=>{try{const n=r0(t.doc,t.selection.$from.pos,1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},z5=()=>({state:t,dispatch:e})=>Mg(t,e),R5=()=>({state:t,dispatch:e})=>Eg(t,e);function em(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function I5(t){const e=t.split(/-(?!$)/);let r=e[e.length-1];r==="Space"&&(r=" ");let n,i,s,o;for(let a=0;a({editor:e,view:r,tr:n,dispatch:i})=>{const s=I5(t).split(/-(?!$)/),o=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{r.someProp("handleKeyDown",u=>u(r,a))});return l==null||l.steps.forEach(u=>{const c=u.map(n.mapping);c&&i&&n.maybeStep(c)}),!0};function Vs(t,e,r={}){const{from:n,to:i,empty:s}=t.selection,o=e?dt(e,t.schema):null,a=[];t.doc.nodesBetween(n,i,(d,h)=>{if(d.isText)return;const f=Math.max(n,h),p=Math.min(i,h+d.nodeSize);a.push({node:d,from:f,to:p})});const l=i-n,u=a.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>pa(d.node.attrs,r,{strict:!1}));return s?!!u.length:u.reduce((d,h)=>d+h.to-h.from,0)>=l}const F5=(t,e={})=>({state:r,dispatch:n})=>{const i=dt(t,r.schema);return Vs(r,i,e)?Og(r,n):!1},P5=()=>({state:t,dispatch:e})=>Vp(t,e),H5=t=>({state:e,dispatch:r})=>{const n=dt(t,e.schema);return Vg(n)(e,r)},q5=()=>({state:t,dispatch:e})=>Hp(t,e);function f0(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function uh(t,e){const r=typeof e=="string"?[e]:e;return Object.keys(t).reduce((n,i)=>(r.includes(i)||(n[i]=t[i]),n),{})}const V5=(t,e)=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=f0(typeof t=="string"?t:t.name,n.schema);return a?(a==="node"&&(s=dt(t,n.schema)),a==="mark"&&(o=Kn(t,n.schema)),i&&r.selection.ranges.forEach(l=>{n.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,c)=>{s&&s===u.type&&r.setNodeMarkup(c,void 0,uh(u.attrs,e)),o&&u.marks.length&&u.marks.forEach(d=>{o===d.type&&r.addMark(c,c+u.nodeSize,o.create(uh(d.attrs,e)))})})}),!0):!1},$5=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),j5=()=>({tr:t,dispatch:e})=>{if(e){const r=new Ut(t.doc);t.setSelection(r)}return!0},W5=()=>({state:t,dispatch:e})=>Ip(t,e),U5=()=>({state:t,dispatch:e})=>Pp(t,e),K5=()=>({state:t,dispatch:e})=>zg(t,e),G5=()=>({state:t,dispatch:e})=>Bg(t,e),J5=()=>({state:t,dispatch:e})=>Ig(t,e);function tu(t,e,r={},n={}){return qs(t,e,{slice:!1,parseOptions:r,errorOnInvalidContent:n.errorOnInvalidContent})}const Y5=(t,e=!1,r={},n={})=>({editor:i,tr:s,dispatch:o,commands:a})=>{var l,u;const{doc:c}=s;if(r.preserveWhitespace!=="full"){const d=tu(t,i.schema,r,{errorOnInvalidContent:(l=n.errorOnInvalidContent)!==null&&l!==void 0?l:i.options.enableContentCheck});return o&&s.replaceWith(0,c.content.size,d).setMeta("preventUpdate",!e),!0}return o&&s.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:c.content.size},t,{parseOptions:r,errorOnInvalidContent:(u=n.errorOnInvalidContent)!==null&&u!==void 0?u:i.options.enableContentCheck})};function sc(t,e){const r=Kn(e,t.schema),{from:n,to:i,empty:s}=t.selection,o=[];s?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(n,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===r.name);return a?{...a.attrs}:{}}function Z5(t,e){const r=new Hu(t);return e.forEach(n=>{n.steps.forEach(i=>{r.step(i)})}),r}function X5(t){for(let e=0;e{r(i)&&n.push({node:i,pos:s})}),n}function tm(t,e){for(let r=t.depth;r>0;r-=1){const n=t.node(r);if(e(n))return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:n}}}function oc(t){return e=>tm(e.$from,t)}function e7(t,e){const r={from:0,to:t.content.size};return Kp(t,r,e)}function t7(t,e){const r=dt(e,t.schema),{from:n,to:i}=t.selection,s=[];t.doc.nodesBetween(n,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===r.name);return o?{...o.attrs}:{}}function rm(t,e){const r=f0(typeof e=="string"?e:e.name,t.schema);return r==="node"?t7(t,e):r==="mark"?sc(t,e):{}}function r7(t,e=JSON.stringify){const r={};return t.filter(n=>{const i=e(n);return Object.prototype.hasOwnProperty.call(r,i)?!1:r[i]=!0})}function n7(t){const e=r7(t);return e.length===1?e:e.filter((r,n)=>!e.filter((s,o)=>o!==n).some(s=>r.oldRange.from>=s.oldRange.from&&r.oldRange.to<=s.oldRange.to&&r.newRange.from>=s.newRange.from&&r.newRange.to<=s.newRange.to))}function nm(t){const{mapping:e,steps:r}=t,n=[];return e.maps.forEach((i,s)=>{const o=[];if(i.ranges.length)i.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=r[s];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const u=e.slice(s).map(a,-1),c=e.slice(s).map(l),d=e.invert().map(u,-1),h=e.invert().map(c);n.push({oldRange:{from:d,to:h},newRange:{from:u,to:c}})})}),n7(n)}function ac(t,e,r){const n=[];return t===e?r.resolve(t).marks().forEach(i=>{const s=r.resolve(t),o=nc(s,i.type);o&&n.push({mark:i,...o})}):r.nodesBetween(t,e,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||n.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),n}function Go(t,e,r){return Object.fromEntries(Object.entries(r).filter(([n])=>{const i=t.find(s=>s.type===e&&s.name===n);return i?i.attribute.keepOnSplit:!1}))}function ru(t,e,r={}){const{empty:n,ranges:i}=t.selection,s=e?Kn(e,t.schema):null;if(n)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>pa(d.attrs,r,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:d,$to:h})=>{const f=d.pos,p=h.pos;t.doc.nodesBetween(f,p,(b,y)=>{if(!b.isText&&!b.marks.length)return;const x=Math.max(f,y),S=Math.min(p,y+b.nodeSize),M=S-x;o+=M,a.push(...b.marks.map(w=>({mark:w,from:x,to:S})))})}),o===0)return!1;const l=a.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>pa(d.mark.attrs,r,{strict:!1})).reduce((d,h)=>d+h.to-h.from,0),u=a.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,h)=>d+h.to-h.from,0);return(l>0?l+u:l)>=o}function i7(t,e,r={}){if(!e)return Vs(t,null,r)||ru(t,null,r);const n=f0(e,t.schema);return n==="node"?Vs(t,e,r):n==="mark"?ru(t,e,r):!1}function ch(t,e){const{nodeExtensions:r}=c0(e),n=r.find(o=>o.name===t);if(!n)return!1;const i={name:n.name,options:n.options,storage:n.storage},s=pe(J(n,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function p0(t,{checkChildren:e=!0,ignoreWhitespace:r=!1}={}){var n;if(r){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((n=t.text)!==null&&n!==void 0?n:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let i=!0;return t.content.forEach(s=>{i!==!1&&(p0(s,{ignoreWhitespace:r,checkChildren:e})||(i=!1))}),i}return!1}function s7(t){return t instanceof X}function o7(t,e,r){var n;const{selection:i}=e;let s=null;if(Zp(i)&&(s=i.$cursor),s){const a=(n=t.storedMarks)!==null&&n!==void 0?n:s.marks();return!!r.isInSet(a)||!a.some(l=>l.type.excludes(r))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let u=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(r):!1;return t.doc.nodesBetween(a.pos,l.pos,(c,d,h)=>{if(u)return!1;if(c.isInline){const f=!h||h.type.allowsMarkType(r),p=!!r.isInSet(c.marks)||!c.marks.some(b=>b.type.excludes(r));u=f&&p}return!u}),u})}const a7=(t,e={})=>({tr:r,state:n,dispatch:i})=>{const{selection:s}=r,{empty:o,ranges:a}=s,l=Kn(t,n.schema);if(i)if(o){const u=sc(n,l);r.addStoredMark(l.create({...u,...e}))}else a.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;n.doc.nodesBetween(c,d,(h,f)=>{const p=Math.max(f,c),b=Math.min(f+h.nodeSize,d);h.marks.find(x=>x.type===l)?h.marks.forEach(x=>{l===x.type&&r.addMark(p,b,l.create({...x.attrs,...e}))}):r.addMark(p,b,l.create(e))})});return o7(n,r,l)},l7=(t,e)=>({tr:r})=>(r.setMeta(t,e),!0),u7=(t,e={})=>({state:r,dispatch:n,chain:i})=>{const s=dt(t,r.schema);let o;return r.selection.$anchor.sameParent(r.selection.$head)&&(o=r.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:a})=>ih(s,{...o,...e})(r)?!0:a.clearNodes()).command(({state:a})=>ih(s,{...o,...e})(a,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},c7=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,i=li(t,0,n.content.size),s=X.create(n,i);e.setSelection(s)}return!0},d7=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,{from:i,to:s}=typeof t=="number"?{from:t,to:t}:t,o=ee.atStart(n).from,a=ee.atEnd(n).to,l=li(i,o,a),u=li(s,o,a),c=ee.create(n,l,u);e.setSelection(c)}return!0},h7=t=>({state:e,dispatch:r})=>{const n=dt(t,e.schema);return Wg(n)(e,r)};function dh(t,e){const r=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(r){const n=r.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(n)}}const f7=({keepMarks:t=!0}={})=>({tr:e,state:r,dispatch:n,editor:i})=>{const{selection:s,doc:o}=e,{$from:a,$to:l}=s,u=i.extensionManager.attributes,c=Go(u,a.node().type.name,a.node().attrs);if(s instanceof X&&s.node.isBlock)return!a.parentOffset||!ln(o,a.pos)?!1:(n&&(t&&dh(r,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,h=a.depth===0?void 0:X5(a.node(-1).contentMatchAt(a.indexAfter(-1)));let f=d&&h?[{type:h,attrs:c}]:void 0,p=ln(e.doc,e.mapping.map(a.pos),1,f);if(!f&&!p&&ln(e.doc,e.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(p=!0,f=h?[{type:h,attrs:c}]:void 0),n){if(p&&(s instanceof ee&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,f),h&&!d&&!a.parentOffset&&a.parent.type!==h)){const b=e.mapping.map(a.before()),y=e.doc.resolve(b);a.node(-1).canReplaceWith(y.index(),y.index()+1,h)&&e.setNodeMarkup(e.mapping.map(a.before()),h)}t&&dh(r,i.extensionManager.splittableMarks),e.scrollIntoView()}return p},p7=(t,e={})=>({tr:r,state:n,dispatch:i,editor:s})=>{var o;const a=dt(t,n.schema),{$from:l,$to:u}=n.selection,c=n.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;const d=l.node(-1);if(d.type!==a)return!1;const h=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let x=R.empty;const S=l.index(-1)?1:l.index(-2)?2:3;for(let I=l.depth-S;I>=l.depth-3;I-=1)x=R.from(l.node(I).copy(x));const M=l.indexAfter(-1){if(O>-1)return!1;I.isTextblock&&I.content.size===0&&(O=_+1)}),O>-1&&r.setSelection(ee.near(r.doc.resolve(O))),r.scrollIntoView()}return!0}const f=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,p={...Go(h,d.type.name,d.attrs),...e},b={...Go(h,l.node().type.name,l.node().attrs),...e};r.delete(l.pos,u.pos);const y=f?[{type:a,attrs:p},{type:f,attrs:b}]:[{type:a,attrs:p}];if(!ln(r.doc,l.pos,2))return!1;if(i){const{selection:x,storedMarks:S}=n,{splittableMarks:M}=s.extensionManager,w=S||x.$to.parentOffset&&x.$from.marks();if(r.split(l.pos,2,y).scrollIntoView(),!w||!i)return!0;const T=w.filter(D=>M.includes(D.type.name));r.ensureMarks(T)}return!0},J0=(t,e)=>{const r=oc(o=>o.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(n===void 0)return!0;const i=t.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&Wn(t.doc,r.pos)&&t.join(r.pos),!0},Y0=(t,e)=>{const r=oc(o=>o.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(r.start).after(r.depth);if(n===void 0)return!0;const i=t.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&Wn(t.doc,n)&&t.join(n),!0},m7=(t,e,r,n={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:u,can:c})=>{const{extensions:d,splittableMarks:h}=i.extensionManager,f=dt(t,o.schema),p=dt(e,o.schema),{selection:b,storedMarks:y}=o,{$from:x,$to:S}=b,M=x.blockRange(S),w=y||b.$to.parentOffset&&b.$from.marks();if(!M)return!1;const T=oc(D=>ch(D.type.name,d))(b);if(M.depth>=1&&T&&M.depth-T.depth<=1){if(T.node.type===f)return u.liftListItem(p);if(ch(T.node.type.name,d)&&f.validContent(T.node.content)&&a)return l().command(()=>(s.setNodeMarkup(T.pos,f),!0)).command(()=>J0(s,f)).command(()=>Y0(s,f)).run()}return!r||!w||!a?l().command(()=>c().wrapInList(f,n)?!0:u.clearNodes()).wrapInList(f,n).command(()=>J0(s,f)).command(()=>Y0(s,f)).run():l().command(()=>{const D=c().wrapInList(f,n),O=w.filter(I=>h.includes(I.type.name));return s.ensureMarks(O),D?!0:u.clearNodes()}).wrapInList(f,n).command(()=>J0(s,f)).command(()=>Y0(s,f)).run()},g7=(t,e={},r={})=>({state:n,commands:i})=>{const{extendEmptyMarkRange:s=!1}=r,o=Kn(t,n.schema);return ru(n,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},b7=(t,e,r={})=>({state:n,commands:i})=>{const s=dt(t,n.schema),o=dt(e,n.schema),a=Vs(n,s,r);let l;return n.selection.$anchor.sameParent(n.selection.$head)&&(l=n.selection.$anchor.parent.attrs),a?i.setNode(o,l):i.setNode(s,{...l,...r})},y7=(t,e={})=>({state:r,commands:n})=>{const i=dt(t,r.schema);return Vs(r,i,e)?n.lift(i):n.wrapIn(i,e)},v7=()=>({state:t,dispatch:e})=>{const r=t.plugins;for(let n=0;n=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,t.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},x7=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,{empty:n,ranges:i}=r;return n||e&&i.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},k7=(t,e={})=>({tr:r,state:n,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=e,{selection:a}=r,l=Kn(t,n.schema),{$from:u,empty:c,ranges:d}=a;if(!i)return!0;if(c&&o){let{from:h,to:f}=a;const p=(s=u.marks().find(y=>y.type===l))===null||s===void 0?void 0:s.attrs,b=nc(u,l,p);b&&(h=b.from,f=b.to),r.removeMark(h,f,l)}else d.forEach(h=>{r.removeMark(h.$from.pos,h.$to.pos,l)});return r.removeStoredMark(l),!0},w7=(t,e={})=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=f0(typeof t=="string"?t:t.name,n.schema);return a?(a==="node"&&(s=dt(t,n.schema)),a==="mark"&&(o=Kn(t,n.schema)),i&&r.selection.ranges.forEach(l=>{const u=l.$from.pos,c=l.$to.pos;let d,h,f,p;r.selection.empty?n.doc.nodesBetween(u,c,(b,y)=>{s&&s===b.type&&(f=Math.max(y,u),p=Math.min(y+b.nodeSize,c),d=y,h=b)}):n.doc.nodesBetween(u,c,(b,y)=>{y=u&&y<=c&&(s&&s===b.type&&r.setNodeMarkup(y,void 0,{...b.attrs,...e}),o&&b.marks.length&&b.marks.forEach(x=>{if(o===x.type){const S=Math.max(y,u),M=Math.min(y+b.nodeSize,c);r.addMark(S,M,o.create({...x.attrs,...e}))}}))}),h&&(d!==void 0&&r.setNodeMarkup(d,void 0,{...h.attrs,...e}),o&&h.marks.length&&h.marks.forEach(b=>{o===b.type&&r.addMark(f,p,o.create({...b.attrs,...e}))}))}),!0):!1},S7=(t,e={})=>({state:r,dispatch:n})=>{const i=dt(t,r.schema);return Fg(i,e)(r,n)},C7=(t,e={})=>({state:r,dispatch:n})=>{const i=dt(t,r.schema);return Pg(i,e)(r,n)};var A7=Object.freeze({__proto__:null,blur:a5,clearContent:l5,clearNodes:u5,command:c5,createParagraphNear:d5,cut:h5,deleteCurrentNode:f5,deleteNode:p5,deleteRange:m5,deleteSelection:g5,enter:b5,exitCode:y5,extendMarkRange:v5,first:x5,focus:w5,forEach:S5,insertContent:C5,insertContentAt:E5,joinBackward:O5,joinDown:D5,joinForward:N5,joinItemBackward:L5,joinItemForward:_5,joinTextblockBackward:z5,joinTextblockForward:R5,joinUp:T5,keyboardShortcut:B5,lift:F5,liftEmptyBlock:P5,liftListItem:H5,newlineInCode:q5,resetAttributes:V5,scrollIntoView:$5,selectAll:j5,selectNodeBackward:W5,selectNodeForward:U5,selectParentNode:K5,selectTextblockEnd:G5,selectTextblockStart:J5,setContent:Y5,setMark:a7,setMeta:l7,setNode:u7,setNodeSelection:c7,setTextSelection:d7,sinkListItem:h7,splitBlock:f7,splitListItem:p7,toggleList:m7,toggleMark:g7,toggleNode:b7,toggleWrap:y7,undoInputRule:v7,unsetAllMarks:x7,unsetMark:k7,updateAttributes:w7,wrapIn:S7,wrapInList:C7});const im=Ke.create({name:"commands",addCommands(){return{...A7}}}),sm=Ke.create({name:"drop",addProseMirrorPlugins(){return[new Ve({key:new Je("tiptapDrop"),props:{handleDrop:(t,e,r,n)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:r,moved:n})}}})]}}),om=Ke.create({name:"editable",addProseMirrorPlugins(){return[new Ve({key:new Je("editable"),props:{editable:()=>this.editor.options.editable}})]}}),am=new Je("focusEvents"),lm=Ke.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Ve({key:am,props:{handleDOMEvents:{focus:(e,r)=>{t.isFocused=!0;const n=t.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1},blur:(e,r)=>{t.isFocused=!1;const n=t.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1}}}})]}}),um=Ke.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:h,parent:f}=d,p=d.parent.isTextblock&&h>0?a.doc.resolve(h-1):d,b=p.parent.type.spec.isolating,y=d.pos-d.parentOffset,x=b&&p.parent.childCount===1?y===d.pos:ne.atStart(u).from===h;return!c||!f.type.isTextblock||f.textContent.length||!x||x&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"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()},i={...n},s={...n,"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 ic()||em()?s:i},addProseMirrorPlugins(){return[new Ve({key:new Je("clearDocument"),appendTransaction:(t,e,r)=>{if(t.some(b=>b.getMeta("composition")))return;const n=t.some(b=>b.docChanged)&&!e.doc.eq(r.doc),i=t.some(b=>b.getMeta("preventClearDocument"));if(!n||i)return;const{empty:s,from:o,to:a}=e.selection,l=ne.atStart(e.doc).from,u=ne.atEnd(e.doc).to;if(s||!(o===l&&a===u)||!p0(r.doc))return;const h=r.tr,f=l0({state:r,transaction:h}),{commands:p}=new u0({editor:this.editor,state:f});if(p.clearNodes(),!!h.steps.length)return h}})]}}),cm=Ke.create({name:"paste",addProseMirrorPlugins(){return[new Ve({key:new Je("tiptapPaste"),props:{handlePaste:(t,e,r)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:r})}}})]}}),dm=Ke.create({name:"tabindex",addProseMirrorPlugins(){return[new Ve({key:new Je("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});var M7=Object.freeze({__proto__:null,ClipboardTextSerializer:Jp,Commands:im,Drop:sm,Editable:om,FocusEvents:lm,Keymap:um,Paste:cm,Tabindex:dm,focusEventsPluginKey:am});class ii{get name(){return this.node.type.name}constructor(e,r,n=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=r,this.currentNode=i}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let r=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:r,to:n},e)}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(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(e);return new ii(r,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ii(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ii(e,this.editor)}get children(){const e=[];return this.node.content.forEach((r,n)=>{const i=r.isBlock&&!r.isTextblock,s=r.isAtom&&!r.isText,o=this.pos+n+(s?0:1);if(o<0||o>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(o);if(!i&&a.depth<=this.depth)return;const l=new ii(a,this.editor,i,i?r:null);i&&(l.actualDepth=this.depth+1),e.push(new ii(a,this.editor,i,i?r:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,r={}){let n=null,i=this.parent;for(;i&&!n;){if(i.node.type.name===e)if(Object.keys(r).length>0){const s=i.node.attrs,o=Object.keys(r);for(let a=0;a{n&&i.length>0||(o.node.type.name===e&&s.every(l=>r[l]===o.node.attrs[l])&&i.push(o),!(n&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,r,n))))}),i}setAttribute(e){const{tr:r}=this.editor.state;r.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(r)}}const E7=`.ProseMirror {
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
white-space: pre-wrap;
}
.ProseMirror pre {
white-space: pre-wrap;
}
img.ProseMirror-separator {
display: inline !important;
border: none !important;
margin: 0 !important;
width: 0 !important;
height: 0 !important;
}
.ProseMirror-gapcursor {
display: none;
pointer-events: none;
position: absolute;
margin: 0;
}
.ProseMirror-gapcursor:after {
content: "";
display: block;
position: absolute;
top: -2px;
width: 20px;
border-top: 1px solid black;
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes ProseMirror-cursor-blink {
to {
visibility: hidden;
}
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-hideselection * {
caret-color: transparent;
}
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}
.tippy-box[data-animation=fade][data-state=hidden] {
opacity: 0
}`;function T7(t,e,r){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}let D7=class extends Ug{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!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,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),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),this.on("drop",({event:r,slice:n,moved:i})=>this.options.onDrop(r,n,i)),this.on("paste",({event:r,slice:n})=>this.options.onPaste(r,n)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},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=T7(E7,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,r=!0){this.setOptions({editable:e}),r&&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(e,r){const n=Up(r)?r(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;const r=this.state.plugins;let n=r;if([].concat(e).forEach(s=>{const o=typeof s=="string"?`${s}$`:s.key;n=n.filter(a=>!a.key.startsWith(o))}),r.length===n.length)return;const i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var e,r;const i=[...this.options.enableCoreExtensions?[om,Jp.configure({blockSeparator:(r=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||r===void 0?void 0:r.blockSeparator}),im,lm,um,dm,sm,cm].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new Bi(i,this)}createCommandManager(){this.commandManager=new u0({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let r;try{r=tu(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),r=tu(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=Xp(r,this.options.autofocus);this.view=new Op(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Ii.create({doc:r,selection:n||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();const s=this.view.dom;s.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const r=this.capturedTransaction;return this.capturedTransaction=null,r}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(o=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(o)});return}const r=this.state.apply(e),n=!this.state.selection.eq(r.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:r}),this.view.updateState(r),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const i=e.getMeta("focus"),s=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),s&&this.emit("blur",{editor:this,event:s.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return rm(this.state,e)}isActive(e,r){const n=typeof e=="string"?e:null,i=typeof e=="string"?r:e;return i7(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return no(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:r=`
`,textSerializers:n={}}=e||{};return e7(this.state.doc,{blockSeparator:r,textSerializers:{...Gp(this.schema),...n}})}get isEmpty(){return p0(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(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(e,r))||null}$nodes(e,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(e,r))||null}$pos(e){const r=this.state.doc.resolve(e);return new ii(r,this)}get $doc(){return this.$pos(0)}};function Ki(t){return new d0({find:t.find,handler:({state:e,range:r,match:n})=>{const i=pe(t.getAttributes,void 0,n);if(i===!1||i===null)return null;const{tr:s}=e,o=n[n.length-1],a=n[0];if(o){const l=a.search(/\S/),u=r.from+a.indexOf(o),c=u+o.length;if(ac(r.from,r.to,e.doc).filter(f=>f.mark.type.excluded.find(b=>b===t.type&&b!==f.mark.type)).filter(f=>f.to>u).length)return null;cr.from&&s.delete(r.from+l,u);const h=r.from+l+o.length;s.addMark(r.from+l,h,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function hm(t){return new d0({find:t.find,handler:({state:e,range:r,match:n})=>{const i=pe(t.getAttributes,void 0,n)||{},{tr:s}=e,o=r.from;let a=r.to;const l=t.type.create(i);if(n[1]){const u=n[0].lastIndexOf(n[1]);let c=o+u;c>a?c=a:a=c+n[1].length;const d=n[0][n[0].length-1];s.insertText(d,o+n[0].length-1),s.replaceWith(c,a,l)}else if(n[0]){const u=t.type.isInline?o:o-1;s.insert(u,t.type.create(i)).delete(s.mapping.map(o),s.mapping.map(a))}s.scrollIntoView()}})}function nu(t){return new d0({find:t.find,handler:({state:e,range:r,match:n})=>{const i=e.doc.resolve(r.from),s=pe(t.getAttributes,void 0,n)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(r.from,r.to).setBlockType(r.from,r.from,t.type,s)}})}function Gi(t){return new d0({find:t.find,handler:({state:e,range:r,match:n,chain:i})=>{const s=pe(t.getAttributes,void 0,n)||{},o=e.tr.delete(r.from,r.to),l=o.doc.resolve(r.from).blockRange(),u=l&&Pu(l,t.type,s);if(!u)return null;if(o.wrap(l,u),t.keepMarks&&t.editor){const{selection:d,storedMarks:h}=e,{splittableMarks:f}=t.editor.extensionManager,p=h||d.$to.parentOffset&&d.$from.marks();if(p){const b=p.filter(y=>f.includes(y.type.name));o.ensureMarks(b)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,s).run()}const c=o.doc.resolve(r.from-1).nodeBefore;c&&c.type===t.type&&Wn(o.doc,r.from-1)&&(!t.joinPredicate||t.joinPredicate(n,c))&&o.join(r.from-1)}})}let ye=class iu{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.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=pe(J(this,"addOptions",{name:this.name}))),this.storage=pe(J(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new iu(e)}configure(e={}){const r=this.extend({...this.config,addOptions:()=>h0(this.options,e)});return r.name=this.name,r.parent=this.parent,r}extend(e={}){const r=new iu(e);return r.parent=this,this.child=r,r.name=e.name?e.name:r.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=pe(J(r,"addOptions",{name:r.name})),r.storage=pe(J(r,"addStorage",{name:r.name,options:r.options})),r}};function xi(t){return new t5({find:t.find,handler:({state:e,range:r,match:n,pasteEvent:i})=>{const s=pe(t.getAttributes,void 0,n,i);if(s===!1||s===null)return null;const{tr:o}=e,a=n[n.length-1],l=n[0];let u=r.to;if(a){const c=l.search(/\S/),d=r.from+l.indexOf(a),h=d+a.length;if(ac(r.from,r.to,e.doc).filter(p=>p.mark.type.excluded.find(y=>y===t.type&&y!==p.mark.type)).filter(p=>p.to>d).length)return null;hr.from&&o.delete(r.from+c,d),u=r.from+c+a.length,o.addMark(r.from+c,u,t.type.create(s||{})),o.removeStoredMark(t.type)}}})}function O7(t,e){const{selection:r}=t,{$from:n}=r;if(r instanceof X){const s=n.index();return n.parent.canReplaceWith(s,s+1,e)}let i=n.depth;for(;i>=0;){const s=n.index(i);if(n.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}function N7(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var Bt="top",ar="bottom",lr="right",Ft="left",lc="auto",io=[Bt,ar,lr,Ft],Ji="start",$s="end",L7="clippingParents",fm="viewport",us="popper",_7="reference",hh=io.reduce(function(t,e){return t.concat([e+"-"+Ji,e+"-"+$s])},[]),pm=[].concat(io,[lc]).reduce(function(t,e){return t.concat([e,e+"-"+Ji,e+"-"+$s])},[]),z7="beforeRead",R7="read",I7="afterRead",B7="beforeMain",F7="main",P7="afterMain",H7="beforeWrite",q7="write",V7="afterWrite",$7=[z7,R7,I7,B7,F7,P7,H7,q7,V7];function qr(t){return t?(t.nodeName||"").toLowerCase():null}function Kt(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ki(t){var e=Kt(t).Element;return t instanceof e||t instanceof Element}function or(t){var e=Kt(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function uc(t){if(typeof ShadowRoot>"u")return!1;var e=Kt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function j7(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},i=e.attributes[r]||{},s=e.elements[r];!or(s)||!qr(s)||(Object.assign(s.style,n),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function W7(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],s=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),a=o.reduce(function(l,u){return l[u]="",l},{});!or(i)||!qr(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(l){i.removeAttribute(l)}))})}}const mm={name:"applyStyles",enabled:!0,phase:"write",fn:j7,effect:W7,requires:["computeStyles"]};function Fr(t){return t.split("-")[0]}var pi=Math.max,ma=Math.min,Yi=Math.round;function su(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function gm(){return!/^((?!chrome|android).)*safari/i.test(su())}function Zi(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,s=1;e&&or(t)&&(i=t.offsetWidth>0&&Yi(n.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Yi(n.height)/t.offsetHeight||1);var o=ki(t)?Kt(t):window,a=o.visualViewport,l=!gm()&&r,u=(n.left+(l&&a?a.offsetLeft:0))/i,c=(n.top+(l&&a?a.offsetTop:0))/s,d=n.width/i,h=n.height/s;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function cc(t){var e=Zi(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function bm(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&uc(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function fn(t){return Kt(t).getComputedStyle(t)}function U7(t){return["table","td","th"].indexOf(qr(t))>=0}function Gn(t){return((ki(t)?t.ownerDocument:t.document)||window.document).documentElement}function m0(t){return qr(t)==="html"?t:t.assignedSlot||t.parentNode||(uc(t)?t.host:null)||Gn(t)}function fh(t){return!or(t)||fn(t).position==="fixed"?null:t.offsetParent}function K7(t){var e=/firefox/i.test(su()),r=/Trident/i.test(su());if(r&&or(t)){var n=fn(t);if(n.position==="fixed")return null}var i=m0(t);for(uc(i)&&(i=i.host);or(i)&&["html","body"].indexOf(qr(i))<0;){var s=fn(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function so(t){for(var e=Kt(t),r=fh(t);r&&U7(r)&&fn(r).position==="static";)r=fh(r);return r&&(qr(r)==="html"||qr(r)==="body"&&fn(r).position==="static")?e:r||K7(t)||e}function dc(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ws(t,e,r){return pi(t,ma(e,r))}function G7(t,e,r){var n=ws(t,e,r);return n>r?r:n}function ym(){return{top:0,right:0,bottom:0,left:0}}function vm(t){return Object.assign({},ym(),t)}function xm(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var J7=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,vm(typeof e!="number"?e:xm(e,io))};function Y7(t){var e,r=t.state,n=t.name,i=t.options,s=r.elements.arrow,o=r.modifiersData.popperOffsets,a=Fr(r.placement),l=dc(a),u=[Ft,lr].indexOf(a)>=0,c=u?"height":"width";if(!(!s||!o)){var d=J7(i.padding,r),h=cc(s),f=l==="y"?Bt:Ft,p=l==="y"?ar:lr,b=r.rects.reference[c]+r.rects.reference[l]-o[l]-r.rects.popper[c],y=o[l]-r.rects.reference[l],x=so(s),S=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,M=b/2-y/2,w=d[f],T=S-h[c]-d[p],D=S/2-h[c]/2+M,O=ws(w,D,T),I=l;r.modifiersData[n]=(e={},e[I]=O,e.centerOffset=O-D,e)}}function Z7(t){var e=t.state,r=t.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||bm(e.elements.popper,i)&&(e.elements.arrow=i))}const X7={name:"arrow",enabled:!0,phase:"main",fn:Y7,effect:Z7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xi(t){return t.split("-")[1]}var Q7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function e8(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:Yi(r*i)/i||0,y:Yi(n*i)/i||0}}function ph(t){var e,r=t.popper,n=t.popperRect,i=t.placement,s=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=o.x,f=h===void 0?0:h,p=o.y,b=p===void 0?0:p,y=typeof c=="function"?c({x:f,y:b}):{x:f,y:b};f=y.x,b=y.y;var x=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),M=Ft,w=Bt,T=window;if(u){var D=so(r),O="clientHeight",I="clientWidth";if(D===Kt(r)&&(D=Gn(r),fn(D).position!=="static"&&a==="absolute"&&(O="scrollHeight",I="scrollWidth")),D=D,i===Bt||(i===Ft||i===lr)&&s===$s){w=ar;var _=d&&D===T&&T.visualViewport?T.visualViewport.height:D[O];b-=_-n.height,b*=l?1:-1}if(i===Ft||(i===Bt||i===ar)&&s===$s){M=lr;var $=d&&D===T&&T.visualViewport?T.visualViewport.width:D[I];f-=$-n.width,f*=l?1:-1}}var z=Object.assign({position:a},u&&Q7),j=c===!0?e8({x:f,y:b},Kt(r)):{x:f,y:b};if(f=j.x,b=j.y,l){var G;return Object.assign({},z,(G={},G[w]=S?"0":"",G[M]=x?"0":"",G.transform=(T.devicePixelRatio||1)<=1?"translate("+f+"px, "+b+"px)":"translate3d("+f+"px, "+b+"px, 0)",G))}return Object.assign({},z,(e={},e[w]=S?b+"px":"",e[M]=x?f+"px":"",e.transform="",e))}function t8(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=n===void 0?!0:n,s=r.adaptive,o=s===void 0?!0:s,a=r.roundOffsets,l=a===void 0?!0:a,u={placement:Fr(e.placement),variation:Xi(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ph(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ph(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const r8={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:t8,data:{}};var Co={passive:!0};function n8(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,s=i===void 0?!0:i,o=n.resize,a=o===void 0?!0:o,l=Kt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&u.forEach(function(c){c.addEventListener("scroll",r.update,Co)}),a&&l.addEventListener("resize",r.update,Co),function(){s&&u.forEach(function(c){c.removeEventListener("scroll",r.update,Co)}),a&&l.removeEventListener("resize",r.update,Co)}}const i8={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:n8,data:{}};var s8={left:"right",right:"left",bottom:"top",top:"bottom"};function Jo(t){return t.replace(/left|right|bottom|top/g,function(e){return s8[e]})}var o8={start:"end",end:"start"};function mh(t){return t.replace(/start|end/g,function(e){return o8[e]})}function hc(t){var e=Kt(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function fc(t){return Zi(Gn(t)).left+hc(t).scrollLeft}function a8(t,e){var r=Kt(t),n=Gn(t),i=r.visualViewport,s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;var u=gm();(u||!u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a+fc(t),y:l}}function l8(t){var e,r=Gn(t),n=hc(t),i=(e=t.ownerDocument)==null?void 0:e.body,s=pi(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=pi(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-n.scrollLeft+fc(t),l=-n.scrollTop;return fn(i||r).direction==="rtl"&&(a+=pi(r.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function pc(t){var e=fn(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function km(t){return["html","body","#document"].indexOf(qr(t))>=0?t.ownerDocument.body:or(t)&&pc(t)?t:km(m0(t))}function Ss(t,e){var r;e===void 0&&(e=[]);var n=km(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),s=Kt(n),o=i?[s].concat(s.visualViewport||[],pc(n)?n:[]):n,a=e.concat(o);return i?a:a.concat(Ss(m0(o)))}function ou(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function u8(t,e){var r=Zi(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function gh(t,e,r){return e===fm?ou(a8(t,r)):ki(e)?u8(e,r):ou(l8(Gn(t)))}function c8(t){var e=Ss(m0(t)),r=["absolute","fixed"].indexOf(fn(t).position)>=0,n=r&&or(t)?so(t):t;return ki(n)?e.filter(function(i){return ki(i)&&bm(i,n)&&qr(i)!=="body"}):[]}function d8(t,e,r,n){var i=e==="clippingParents"?c8(t):[].concat(e),s=[].concat(i,[r]),o=s[0],a=s.reduce(function(l,u){var c=gh(t,u,n);return l.top=pi(c.top,l.top),l.right=ma(c.right,l.right),l.bottom=ma(c.bottom,l.bottom),l.left=pi(c.left,l.left),l},gh(t,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function wm(t){var e=t.reference,r=t.element,n=t.placement,i=n?Fr(n):null,s=n?Xi(n):null,o=e.x+e.width/2-r.width/2,a=e.y+e.height/2-r.height/2,l;switch(i){case Bt:l={x:o,y:e.y-r.height};break;case ar:l={x:o,y:e.y+e.height};break;case lr:l={x:e.x+e.width,y:a};break;case Ft:l={x:e.x-r.width,y:a};break;default:l={x:e.x,y:e.y}}var u=i?dc(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(s){case Ji:l[u]=l[u]-(e[c]/2-r[c]/2);break;case $s:l[u]=l[u]+(e[c]/2-r[c]/2);break}}return l}function js(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=n===void 0?t.placement:n,s=r.strategy,o=s===void 0?t.strategy:s,a=r.boundary,l=a===void 0?L7:a,u=r.rootBoundary,c=u===void 0?fm:u,d=r.elementContext,h=d===void 0?us:d,f=r.altBoundary,p=f===void 0?!1:f,b=r.padding,y=b===void 0?0:b,x=vm(typeof y!="number"?y:xm(y,io)),S=h===us?_7:us,M=t.rects.popper,w=t.elements[p?S:h],T=d8(ki(w)?w:w.contextElement||Gn(t.elements.popper),l,c,o),D=Zi(t.elements.reference),O=wm({reference:D,element:M,placement:i}),I=ou(Object.assign({},M,O)),_=h===us?I:D,$={top:T.top-_.top+x.top,bottom:_.bottom-T.bottom+x.bottom,left:T.left-_.left+x.left,right:_.right-T.right+x.right},z=t.modifiersData.offset;if(h===us&&z){var j=z[i];Object.keys($).forEach(function(G){var ce=[lr,ar].indexOf(G)>=0?1:-1,le=[Bt,ar].indexOf(G)>=0?"y":"x";$[G]+=j[le]*ce})}return $}function h8(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=r.boundary,s=r.rootBoundary,o=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?pm:l,c=Xi(n),d=c?a?hh:hh.filter(function(p){return Xi(p)===c}):io,h=d.filter(function(p){return u.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,b){return p[b]=js(t,{placement:b,boundary:i,rootBoundary:s,padding:o})[Fr(b)],p},{});return Object.keys(f).sort(function(p,b){return f[p]-f[b]})}function f8(t){if(Fr(t)===lc)return[];var e=Jo(t);return[mh(t),e,mh(e)]}function p8(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,s=i===void 0?!0:i,o=r.altAxis,a=o===void 0?!0:o,l=r.fallbackPlacements,u=r.padding,c=r.boundary,d=r.rootBoundary,h=r.altBoundary,f=r.flipVariations,p=f===void 0?!0:f,b=r.allowedAutoPlacements,y=e.options.placement,x=Fr(y),S=x===y,M=l||(S||!p?[Jo(y)]:f8(y)),w=[y].concat(M).reduce(function(kt,Ze){return kt.concat(Fr(Ze)===lc?h8(e,{placement:Ze,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:b}):Ze)},[]),T=e.rects.reference,D=e.rects.popper,O=new Map,I=!0,_=w[0],$=0;$=0,le=ce?"width":"height",Q=js(e,{placement:z,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),me=ce?G?lr:Ft:G?ar:Bt;T[le]>D[le]&&(me=Jo(me));var be=Jo(me),et=[];if(s&&et.push(Q[j]<=0),a&&et.push(Q[me]<=0,Q[be]<=0),et.every(function(kt){return kt})){_=z,I=!1;break}O.set(z,et)}if(I)for(var De=p?3:1,Ye=function(Ze){var Nt=w.find(function(wt){var it=O.get(wt);if(it)return it.slice(0,Ze).every(function(Vt){return Vt})});if(Nt)return _=Nt,"break"},Ce=De;Ce>0;Ce--){var xt=Ye(Ce);if(xt==="break")break}e.placement!==_&&(e.modifiersData[n]._skip=!0,e.placement=_,e.reset=!0)}}const m8={name:"flip",enabled:!0,phase:"main",fn:p8,requiresIfExists:["offset"],data:{_skip:!1}};function bh(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function yh(t){return[Bt,lr,ar,Ft].some(function(e){return t[e]>=0})}function g8(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=js(e,{elementContext:"reference"}),a=js(e,{altBoundary:!0}),l=bh(o,n),u=bh(a,i,s),c=yh(l),d=yh(u);e.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const b8={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:g8};function y8(t,e,r){var n=Fr(t),i=[Ft,Bt].indexOf(n)>=0?-1:1,s=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[Ft,lr].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function v8(t){var e=t.state,r=t.options,n=t.name,i=r.offset,s=i===void 0?[0,0]:i,o=pm.reduce(function(c,d){return c[d]=y8(d,e.rects,s),c},{}),a=o[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=o}const x8={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:v8};function k8(t){var e=t.state,r=t.name;e.modifiersData[r]=wm({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const w8={name:"popperOffsets",enabled:!0,phase:"read",fn:k8,data:{}};function S8(t){return t==="x"?"y":"x"}function C8(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,s=i===void 0?!0:i,o=r.altAxis,a=o===void 0?!1:o,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,d=r.padding,h=r.tether,f=h===void 0?!0:h,p=r.tetherOffset,b=p===void 0?0:p,y=js(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),x=Fr(e.placement),S=Xi(e.placement),M=!S,w=dc(x),T=S8(w),D=e.modifiersData.popperOffsets,O=e.rects.reference,I=e.rects.popper,_=typeof b=="function"?b(Object.assign({},e.rects,{placement:e.placement})):b,$=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),z=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(D){if(s){var G,ce=w==="y"?Bt:Ft,le=w==="y"?ar:lr,Q=w==="y"?"height":"width",me=D[w],be=me+y[ce],et=me-y[le],De=f?-I[Q]/2:0,Ye=S===Ji?O[Q]:I[Q],Ce=S===Ji?-I[Q]:-O[Q],xt=e.elements.arrow,kt=f&&xt?cc(xt):{width:0,height:0},Ze=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:ym(),Nt=Ze[ce],wt=Ze[le],it=ws(0,O[Q],kt[Q]),Vt=M?O[Q]/2-De-it-Nt-$.mainAxis:Ye-it-Nt-$.mainAxis,St=M?-O[Q]/2+De+it+wt+$.mainAxis:Ce+it+wt+$.mainAxis,wr=e.elements.arrow&&so(e.elements.arrow),se=wr?w==="y"?wr.clientTop||0:wr.clientLeft||0:0,Oe=(G=z==null?void 0:z[w])!=null?G:0,Ae=me+Vt-Oe-se,st=me+St-Oe,Me=ws(f?ma(be,Ae):be,me,f?pi(et,st):et);D[w]=Me,j[w]=Me-me}if(a){var Ee,Ne=w==="x"?Bt:Ft,ue=w==="x"?ar:lr,tt=D[T],Sr=T==="y"?"height":"width",Yn=tt+y[Ne],dr=tt-y[ue],Jr=[Bt,Ft].indexOf(x)!==-1,Cr=(Ee=z==null?void 0:z[T])!=null?Ee:0,hr=Jr?Yn:tt-O[Sr]-I[Sr]-Cr+$.altAxis,Zn=Jr?tt+O[Sr]+I[Sr]-Cr-$.altAxis:dr,Ar=f&&Jr?G7(hr,tt,Zn):ws(f?hr:Yn,tt,f?Zn:dr);D[T]=Ar,j[T]=Ar-tt}e.modifiersData[n]=j}}const A8={name:"preventOverflow",enabled:!0,phase:"main",fn:C8,requiresIfExists:["offset"]};function M8(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function E8(t){return t===Kt(t)||!or(t)?hc(t):M8(t)}function T8(t){var e=t.getBoundingClientRect(),r=Yi(e.width)/t.offsetWidth||1,n=Yi(e.height)/t.offsetHeight||1;return r!==1||n!==1}function D8(t,e,r){r===void 0&&(r=!1);var n=or(e),i=or(e)&&T8(e),s=Gn(e),o=Zi(t,i,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((qr(e)!=="body"||pc(s))&&(a=E8(e)),or(e)?(l=Zi(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=fc(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function O8(t){var e=new Map,r=new Set,n=[];t.forEach(function(s){e.set(s.name,s)});function i(s){r.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!r.has(a)){var l=e.get(a);l&&i(l)}}),n.push(s)}return t.forEach(function(s){r.has(s.name)||i(s)}),n}function N8(t){var e=O8(t);return $7.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function L8(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function _8(t){var e=t.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var vh={placement:"bottom",modifiers:[],strategy:"absolute"};function xh(){for(var t=arguments.length,e=new Array(t),r=0;r-1}function Em(t,e){return typeof t=="function"?t.apply(void 0,e):t}function kh(t,e){if(e===0)return t;var r;return function(n){clearTimeout(r),r=setTimeout(function(){t(n)},e)}}function P8(t){return t.split(/\s+/).filter(Boolean)}function zi(t){return[].concat(t)}function wh(t,e){t.indexOf(e)===-1&&t.push(e)}function H8(t){return t.filter(function(e,r){return t.indexOf(e)===r})}function q8(t){return t.split("-")[0]}function ga(t){return[].slice.call(t)}function Sh(t){return Object.keys(t).reduce(function(e,r){return t[r]!==void 0&&(e[r]=t[r]),e},{})}function Cs(){return document.createElement("div")}function g0(t){return["Element","Fragment"].some(function(e){return mc(t,e)})}function V8(t){return mc(t,"NodeList")}function $8(t){return mc(t,"MouseEvent")}function j8(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function W8(t){return g0(t)?[t]:V8(t)?ga(t):Array.isArray(t)?t:ga(document.querySelectorAll(t))}function X0(t,e){t.forEach(function(r){r&&(r.style.transitionDuration=e+"ms")})}function Ch(t,e){t.forEach(function(r){r&&r.setAttribute("data-state",e)})}function U8(t){var e,r=zi(t),n=r[0];return n!=null&&(e=n.ownerDocument)!=null&&e.body?n.ownerDocument:document}function K8(t,e){var r=e.clientX,n=e.clientY;return t.every(function(i){var s=i.popperRect,o=i.popperState,a=i.props,l=a.interactiveBorder,u=q8(o.placement),c=o.modifiersData.offset;if(!c)return!0;var d=u==="bottom"?c.top.y:0,h=u==="top"?c.bottom.y:0,f=u==="right"?c.left.x:0,p=u==="left"?c.right.x:0,b=s.top-n+d>l,y=n-s.bottom-h>l,x=s.left-r+f>l,S=r-s.right-p>l;return b||y||x||S})}function Q0(t,e,r){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[n](i,r)})}function Ah(t,e){for(var r=e;r;){var n;if(t.contains(r))return!0;r=r.getRootNode==null||(n=r.getRootNode())==null?void 0:n.host}return!1}var Dr={isTouch:!1},Mh=0;function G8(){Dr.isTouch||(Dr.isTouch=!0,window.performance&&document.addEventListener("mousemove",Tm))}function Tm(){var t=performance.now();t-Mh<20&&(Dr.isTouch=!1,document.removeEventListener("mousemove",Tm)),Mh=t}function J8(){var t=document.activeElement;if(j8(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function Y8(){document.addEventListener("touchstart",G8,ri),window.addEventListener("blur",J8)}var Z8=typeof window<"u"&&typeof document<"u",X8=Z8?!!window.msCrypto:!1,Q8={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},eb={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},yr=Object.assign({appendTo:Mm,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},Q8,eb),tb=Object.keys(yr),rb=function(e){var r=Object.keys(e);r.forEach(function(n){yr[n]=e[n]})};function Dm(t){var e=t.plugins||[],r=e.reduce(function(n,i){var s=i.name,o=i.defaultValue;if(s){var a;n[s]=t[s]!==void 0?t[s]:(a=yr[s])!=null?a:o}return n},{});return Object.assign({},t,r)}function nb(t,e){var r=e?Object.keys(Dm(Object.assign({},yr,{plugins:e}))):tb,n=r.reduce(function(i,s){var o=(t.getAttribute("data-tippy-"+s)||"").trim();if(!o)return i;if(s==="content")i[s]=o;else try{i[s]=JSON.parse(o)}catch{i[s]=o}return i},{});return n}function Eh(t,e){var r=Object.assign({},e,{content:Em(e.content,[t])},e.ignoreAttributes?{}:nb(t,e.plugins));return r.aria=Object.assign({},yr.aria,r.aria),r.aria={expanded:r.aria.expanded==="auto"?e.interactive:r.aria.expanded,content:r.aria.content==="auto"?e.interactive?null:"describedby":r.aria.content},r}var ib=function(){return"innerHTML"};function au(t,e){t[ib()]=e}function Th(t){var e=Cs();return t===!0?e.className=Cm:(e.className=Am,g0(t)?e.appendChild(t):au(e,t)),e}function Dh(t,e){g0(e.content)?(au(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?au(t,e.content):t.textContent=e.content)}function lu(t){var e=t.firstElementChild,r=ga(e.children);return{box:e,content:r.find(function(n){return n.classList.contains(Sm)}),arrow:r.find(function(n){return n.classList.contains(Cm)||n.classList.contains(Am)}),backdrop:r.find(function(n){return n.classList.contains(F8)})}}function Om(t){var e=Cs(),r=Cs();r.className=B8,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=Cs();n.className=Sm,n.setAttribute("data-state","hidden"),Dh(n,t.props),e.appendChild(r),r.appendChild(n),i(t.props,t.props);function i(s,o){var a=lu(e),l=a.box,u=a.content,c=a.arrow;o.theme?l.setAttribute("data-theme",o.theme):l.removeAttribute("data-theme"),typeof o.animation=="string"?l.setAttribute("data-animation",o.animation):l.removeAttribute("data-animation"),o.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?l.setAttribute("role",o.role):l.removeAttribute("role"),(s.content!==o.content||s.allowHTML!==o.allowHTML)&&Dh(u,t.props),o.arrow?c?s.arrow!==o.arrow&&(l.removeChild(c),l.appendChild(Th(o.arrow))):l.appendChild(Th(o.arrow)):c&&l.removeChild(c)}return{popper:e,onUpdate:i}}Om.$$tippy=!0;var sb=1,Ao=[],el=[];function ob(t,e){var r=Eh(t,Object.assign({},yr,Dm(Sh(e)))),n,i,s,o=!1,a=!1,l=!1,u=!1,c,d,h,f=[],p=kh(Ae,r.interactiveDebounce),b,y=sb++,x=null,S=H8(r.plugins),M={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:y,reference:t,popper:Cs(),popperInstance:x,props:r,state:M,plugins:S,clearDelayTimeouts:hr,setProps:Zn,setContent:Ar,show:fr,hide:pr,hideWithInteractivity:Lt,enable:Jr,disable:Cr,unmount:Xn,destroy:vn};if(!r.render)return w;var T=r.render(w),D=T.popper,O=T.onUpdate;D.setAttribute("data-tippy-root",""),D.id="tippy-"+w.id,w.popper=D,t._tippy=w,D._tippy=w;var I=S.map(function(L){return L.fn(w)}),_=t.hasAttribute("aria-expanded");return wr(),De(),me(),be("onCreate",[w]),r.showOnCreate&&Yn(),D.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),D.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&ce().addEventListener("mousemove",p)}),w;function $(){var L=w.props.touch;return Array.isArray(L)?L:[L,0]}function z(){return $()[0]==="hold"}function j(){var L;return!!((L=w.props.render)!=null&&L.$$tippy)}function G(){return b||t}function ce(){var L=G().parentNode;return L?U8(L):document}function le(){return lu(D)}function Q(L){return w.state.isMounted&&!w.state.isVisible||Dr.isTouch||c&&c.type==="focus"?0:Z0(w.props.delay,L?0:1,yr.delay)}function me(L){L===void 0&&(L=!1),D.style.pointerEvents=w.props.interactive&&!L?"":"none",D.style.zIndex=""+w.props.zIndex}function be(L,Y,oe){if(oe===void 0&&(oe=!0),I.forEach(function(ve){ve[L]&&ve[L].apply(ve,Y)}),oe){var Te;(Te=w.props)[L].apply(Te,Y)}}function et(){var L=w.props.aria;if(L.content){var Y="aria-"+L.content,oe=D.id,Te=zi(w.props.triggerTarget||t);Te.forEach(function(ve){var Ct=ve.getAttribute(Y);if(w.state.isVisible)ve.setAttribute(Y,Ct?Ct+" "+oe:oe);else{var Yt=Ct&&Ct.replace(oe,"").trim();Yt?ve.setAttribute(Y,Yt):ve.removeAttribute(Y)}})}}function De(){if(!(_||!w.props.aria.expanded)){var L=zi(w.props.triggerTarget||t);L.forEach(function(Y){w.props.interactive?Y.setAttribute("aria-expanded",w.state.isVisible&&Y===G()?"true":"false"):Y.removeAttribute("aria-expanded")})}}function Ye(){ce().removeEventListener("mousemove",p),Ao=Ao.filter(function(L){return L!==p})}function Ce(L){if(!(Dr.isTouch&&(l||L.type==="mousedown"))){var Y=L.composedPath&&L.composedPath()[0]||L.target;if(!(w.props.interactive&&Ah(D,Y))){if(zi(w.props.triggerTarget||t).some(function(oe){return Ah(oe,Y)})){if(Dr.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else be("onClickOutside",[w,L]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),a=!0,setTimeout(function(){a=!1}),w.state.isMounted||Nt())}}}function xt(){l=!0}function kt(){l=!1}function Ze(){var L=ce();L.addEventListener("mousedown",Ce,!0),L.addEventListener("touchend",Ce,ri),L.addEventListener("touchstart",kt,ri),L.addEventListener("touchmove",xt,ri)}function Nt(){var L=ce();L.removeEventListener("mousedown",Ce,!0),L.removeEventListener("touchend",Ce,ri),L.removeEventListener("touchstart",kt,ri),L.removeEventListener("touchmove",xt,ri)}function wt(L,Y){Vt(L,function(){!w.state.isVisible&&D.parentNode&&D.parentNode.contains(D)&&Y()})}function it(L,Y){Vt(L,Y)}function Vt(L,Y){var oe=le().box;function Te(ve){ve.target===oe&&(Q0(oe,"remove",Te),Y())}if(L===0)return Y();Q0(oe,"remove",d),Q0(oe,"add",Te),d=Te}function St(L,Y,oe){oe===void 0&&(oe=!1);var Te=zi(w.props.triggerTarget||t);Te.forEach(function(ve){ve.addEventListener(L,Y,oe),f.push({node:ve,eventType:L,handler:Y,options:oe})})}function wr(){z()&&(St("touchstart",Oe,{passive:!0}),St("touchend",st,{passive:!0})),P8(w.props.trigger).forEach(function(L){if(L!=="manual")switch(St(L,Oe),L){case"mouseenter":St("mouseleave",st);break;case"focus":St(X8?"focusout":"blur",Me);break;case"focusin":St("focusout",Me);break}})}function se(){f.forEach(function(L){var Y=L.node,oe=L.eventType,Te=L.handler,ve=L.options;Y.removeEventListener(oe,Te,ve)}),f=[]}function Oe(L){var Y,oe=!1;if(!(!w.state.isEnabled||Ee(L)||a)){var Te=((Y=c)==null?void 0:Y.type)==="focus";c=L,b=L.currentTarget,De(),!w.state.isVisible&&$8(L)&&Ao.forEach(function(ve){return ve(L)}),L.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||o)&&w.props.hideOnClick!==!1&&w.state.isVisible?oe=!0:Yn(L),L.type==="click"&&(o=!oe),oe&&!Te&&dr(L)}}function Ae(L){var Y=L.target,oe=G().contains(Y)||D.contains(Y);if(!(L.type==="mousemove"&&oe)){var Te=Sr().concat(D).map(function(ve){var Ct,Yt=ve._tippy,Ai=(Ct=Yt.popperInstance)==null?void 0:Ct.state;return Ai?{popperRect:ve.getBoundingClientRect(),popperState:Ai,props:r}:null}).filter(Boolean);K8(Te,L)&&(Ye(),dr(L))}}function st(L){var Y=Ee(L)||w.props.trigger.indexOf("click")>=0&&o;if(!Y){if(w.props.interactive){w.hideWithInteractivity(L);return}dr(L)}}function Me(L){w.props.trigger.indexOf("focusin")<0&&L.target!==G()||w.props.interactive&&L.relatedTarget&&D.contains(L.relatedTarget)||dr(L)}function Ee(L){return Dr.isTouch?z()!==L.type.indexOf("touch")>=0:!1}function Ne(){ue();var L=w.props,Y=L.popperOptions,oe=L.placement,Te=L.offset,ve=L.getReferenceClientRect,Ct=L.moveTransition,Yt=j()?lu(D).arrow:null,Ai=ve?{getBoundingClientRect:ve,contextElement:ve.contextElement||G()}:t,rd={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(po){var Mi=po.state;if(j()){var E4=le(),L0=E4.box;["placement","reference-hidden","escaped"].forEach(function(mo){mo==="placement"?L0.setAttribute("data-placement",Mi.placement):Mi.attributes.popper["data-popper-"+mo]?L0.setAttribute("data-"+mo,""):L0.removeAttribute("data-"+mo)}),Mi.attributes.popper={}}}},Qn=[{name:"offset",options:{offset:Te}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Ct}},rd];j()&&Yt&&Qn.push({name:"arrow",options:{element:Yt,padding:3}}),Qn.push.apply(Qn,(Y==null?void 0:Y.modifiers)||[]),w.popperInstance=I8(Ai,D,Object.assign({},Y,{placement:oe,onFirstUpdate:h,modifiers:Qn}))}function ue(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function tt(){var L=w.props.appendTo,Y,oe=G();w.props.interactive&&L===Mm||L==="parent"?Y=oe.parentNode:Y=Em(L,[oe]),Y.contains(D)||Y.appendChild(D),w.state.isMounted=!0,Ne()}function Sr(){return ga(D.querySelectorAll("[data-tippy-root]"))}function Yn(L){w.clearDelayTimeouts(),L&&be("onTrigger",[w,L]),Ze();var Y=Q(!0),oe=$(),Te=oe[0],ve=oe[1];Dr.isTouch&&Te==="hold"&&ve&&(Y=ve),Y?n=setTimeout(function(){w.show()},Y):w.show()}function dr(L){if(w.clearDelayTimeouts(),be("onUntrigger",[w,L]),!w.state.isVisible){Nt();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(L.type)>=0&&o)){var Y=Q(!1);Y?i=setTimeout(function(){w.state.isVisible&&w.hide()},Y):s=requestAnimationFrame(function(){w.hide()})}}function Jr(){w.state.isEnabled=!0}function Cr(){w.hide(),w.state.isEnabled=!1}function hr(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(s)}function Zn(L){if(!w.state.isDestroyed){be("onBeforeUpdate",[w,L]),se();var Y=w.props,oe=Eh(t,Object.assign({},Y,Sh(L),{ignoreAttributes:!0}));w.props=oe,wr(),Y.interactiveDebounce!==oe.interactiveDebounce&&(Ye(),p=kh(Ae,oe.interactiveDebounce)),Y.triggerTarget&&!oe.triggerTarget?zi(Y.triggerTarget).forEach(function(Te){Te.removeAttribute("aria-expanded")}):oe.triggerTarget&&t.removeAttribute("aria-expanded"),De(),me(),O&&O(Y,oe),w.popperInstance&&(Ne(),Sr().forEach(function(Te){requestAnimationFrame(Te._tippy.popperInstance.forceUpdate)})),be("onAfterUpdate",[w,L])}}function Ar(L){w.setProps({content:L})}function fr(){var L=w.state.isVisible,Y=w.state.isDestroyed,oe=!w.state.isEnabled,Te=Dr.isTouch&&!w.props.touch,ve=Z0(w.props.duration,0,yr.duration);if(!(L||Y||oe||Te)&&!G().hasAttribute("disabled")&&(be("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,j()&&(D.style.visibility="visible"),me(),Ze(),w.state.isMounted||(D.style.transition="none"),j()){var Ct=le(),Yt=Ct.box,Ai=Ct.content;X0([Yt,Ai],0)}h=function(){var Qn;if(!(!w.state.isVisible||u)){if(u=!0,D.offsetHeight,D.style.transition=w.props.moveTransition,j()&&w.props.animation){var N0=le(),po=N0.box,Mi=N0.content;X0([po,Mi],ve),Ch([po,Mi],"visible")}et(),De(),wh(el,w),(Qn=w.popperInstance)==null||Qn.forceUpdate(),be("onMount",[w]),w.props.animation&&j()&&it(ve,function(){w.state.isShown=!0,be("onShown",[w])})}},tt()}}function pr(){var L=!w.state.isVisible,Y=w.state.isDestroyed,oe=!w.state.isEnabled,Te=Z0(w.props.duration,1,yr.duration);if(!(L||Y||oe)&&(be("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,u=!1,o=!1,j()&&(D.style.visibility="hidden"),Ye(),Nt(),me(!0),j()){var ve=le(),Ct=ve.box,Yt=ve.content;w.props.animation&&(X0([Ct,Yt],Te),Ch([Ct,Yt],"hidden"))}et(),De(),w.props.animation?j()&&wt(Te,w.unmount):w.unmount()}}function Lt(L){ce().addEventListener("mousemove",p),wh(Ao,p),p(L)}function Xn(){w.state.isVisible&&w.hide(),w.state.isMounted&&(ue(),Sr().forEach(function(L){L._tippy.unmount()}),D.parentNode&&D.parentNode.removeChild(D),el=el.filter(function(L){return L!==w}),w.state.isMounted=!1,be("onHidden",[w]))}function vn(){w.state.isDestroyed||(w.clearDelayTimeouts(),w.unmount(),se(),delete t._tippy,w.state.isDestroyed=!0,be("onDestroy",[w]))}}function oo(t,e){e===void 0&&(e={});var r=yr.plugins.concat(e.plugins||[]);Y8();var n=Object.assign({},e,{plugins:r}),i=W8(t),s=i.reduce(function(o,a){var l=a&&ob(a,n);return l&&o.push(l),o},[]);return g0(t)?s[0]:s}oo.defaultProps=yr;oo.setDefaultProps=rb;oo.currentInput=Dr;Object.assign({},mm,{effect:function(e){var r=e.state,n={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,n.popper),r.styles=n,r.elements.arrow&&Object.assign(r.elements.arrow.style,n.arrow)}});oo.setDefaultProps({render:Om});function Oh(t){return O4((e,r)=>({get(){return e(),t},set(n){t=n,requestAnimationFrame(()=>{requestAnimationFrame(()=>{r()})})}}))}class ab extends D7{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=Oh(this.view.state),this.reactiveExtensionStorage=Oh(this.extensionStorage),this.on("beforeTransaction",({nextState:r})=>{this.reactiveState.value=r,this.reactiveExtensionStorage.value=this.extensionStorage}),g1(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,r){const n=super.registerPlugin(e,r);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(e){const r=super.unregisterPlugin(e);return this.reactiveState&&r&&(this.reactiveState.value=r),r}}const lb=T4({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=sn(),r=D4();return Ls(()=>{const n=t.editor;n&&n.options.element&&e.value&&_s(()=>{if(!e.value||!n.options.element.firstChild)return;const i=hs(e.value);e.value.append(...n.options.element.childNodes),n.contentComponent=r.ctx._,r&&(n.appContext={...r.appContext,provides:r.provides}),n.setOptions({element:i}),n.createNodeViews()})}),m1(()=>{const n=t.editor;if(!n||(n.isDestroyed||n.view.setProps({nodeViews:{}}),n.contentComponent=null,n.appContext=null,!n.options.element.firstChild))return;const i=document.createElement("div");i.append(...n.options.element.childNodes),n.setOptions({element:i})}),{rootEl:e}},render(){return p1("div",{ref:t=>{this.rootEl=t}})}});class ub{constructor(e,{props:r={},editor:n}){this.editor=n,this.component=g1(e),this.el=document.createElement("div"),this.props=N4(r),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var e,r,n,i;return!((r=(e=this.renderedComponent.vNode)===null||e===void 0?void 0:e.component)===null||r===void 0)&&r.exposed?this.renderedComponent.vNode.component.exposed:(i=(n=this.renderedComponent.vNode)===null||n===void 0?void 0:n.component)===null||i===void 0?void 0:i.proxy}renderComponent(){let e=p1(this.component,this.props);return this.editor.appContext&&(e.appContext=this.editor.appContext),typeof document<"u"&&this.el&&sd(e,this.el),{vNode:e,destroy:()=>{this.el&&sd(null,this.el),this.el=null,e=null},el:this.el?this.el.firstElementChild:null}}updateProps(e={}){Object.entries(e).forEach(([r,n])=>{this.props[r]=n}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}}const cb=/^\s*>\s$/,db=ye.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Se(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[Gi({find:cb,type:this.type})]}}),hb=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,fb=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,pb=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,mb=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,gb=mt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Se(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[Ki({find:hb,type:this.type}),Ki({find:pb,type:this.type})]},addPasteRules(){return[xi({find:fb,type:this.type}),xi({find:mb,type:this.type})]}}),bb="listItem",Nh="textStyle",Lh=/^\s*([-+*])\s$/,yb=ye.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",Se(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(bb,this.editor.getAttributes(Nh)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Gi({find:Lh,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Gi({find:Lh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Nh),editor:this.editor})),[t]}}),vb=/(^|[^`])`([^`]+)`(?!`)/,xb=/(^|[^`])`([^`]+)`(?!`)/g,kb=mt.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Se(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[Ki({find:vb,type:this.type})]},addPasteRules(){return[xi({find:xb,type:this.type})]}}),wb=/^```([a-z]+)?[\s\n]$/,Sb=/^~~~([a-z]+)?[\s\n]$/,Cb=ye.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:r}=this.options,s=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(o=>o.startsWith(r)).map(o=>o.replace(r,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Se(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,r=e.pos===1;return!t||e.parent.type.name!==this.name?!1:r||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:r}=e,{$from:n,empty:i}=r;if(!i||n.parent.type!==this.type)return!1;const s=n.parentOffset===n.parent.nodeSize-2,o=n.parent.textContent.endsWith(`
`);return!s||!o?!1:t.chain().command(({tr:a})=>(a.delete(n.pos-2,n.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:r,doc:n}=e,{$from:i,empty:s}=r;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:n.nodeAt(a)?t.commands.command(({tr:u})=>(u.setSelection(ne.near(n.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[nu({find:wb,type:this.type,getAttributes:t=>({language:t[1]})}),nu({find:Sb,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Ve({key:new Je("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const r=e.clipboardData.getData("text/plain"),n=e.clipboardData.getData("vscode-editor-data"),i=n?JSON.parse(n):void 0,s=i==null?void 0:i.mode;if(!r||!s)return!1;const{tr:o,schema:a}=t.state,l=a.text(r.replace(/\r\n?/g,`
`));return o.replaceSelectionWith(this.type.create({language:s},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(ee.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),Ab=ye.create({name:"doc",topNode:!0,content:"block+"});function Mb(t={}){return new Ve({view(e){return new Eb(e,t)}})}class Eb{constructor(e,r){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=r.width)!==null&&n!==void 0?n:1,this.color=r.color===!1?void 0:r.color||"black",this.class=r.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:r})=>this.editorView.dom.removeEventListener(e,r))}update(e,r){this.cursorPos!=null&&r.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),r=!e.parent.inlineContent,n,i=this.editorView.dom,s=i.getBoundingClientRect(),o=s.width/i.offsetWidth,a=s.height/i.offsetHeight;if(r){let d=e.nodeBefore,h=e.nodeAfter;if(d||h){let f=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(f){let p=f.getBoundingClientRect(),b=d?p.bottom:p.top;d&&h&&(b=(b+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let y=this.width/2*a;n={left:p.left,right:p.right,top:b-y,bottom:b+y}}}}if(!n){let d=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*o;n={left:d.left-h,right:d.left+h,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.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",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),h=d.width/l.offsetWidth,f=d.height/l.offsetHeight;u=d.left-l.scrollLeft*h,c=d.top-l.scrollTop*f}this.element.style.left=(n.left-u)/o+"px",this.element.style.top=(n.top-c)/a+"px",this.element.style.width=(n.right-n.left)/o+"px",this.element.style.height=(n.bottom-n.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let r=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=r&&r.inside>=0&&this.editorView.state.doc.nodeAt(r.inside),i=n&&n.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,r,e):i;if(r&&!s){let o=r.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=$1(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const Tb=Ke.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Mb(this.options)]}});class We extends ne{constructor(e){super(e,e)}map(e,r){let n=e.resolve(r.map(this.head));return We.valid(n)?new We(n):ne.near(n)}content(){return V.empty}eq(e){return e instanceof We&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new We(e.resolve(r.pos))}getBookmark(){return new gc(this.anchor)}static valid(e){let r=e.parent;if(r.isTextblock||!Db(e)||!Ob(e))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let i=r.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,r,n=!1){e:for(;;){if(!n&&We.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(r>0?e.indexAfter(o)0){s=a.child(r>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=r;let l=e.doc.resolve(i);if(We.valid(l))return l}for(;;){let o=r>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!X.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*r),n=!1;continue e}break}s=o,i+=r;let a=e.doc.resolve(i);if(We.valid(a))return a}return null}}}We.prototype.visible=!1;We.findFrom=We.findGapCursorFrom;ne.jsonID("gapcursor",We);class gc{constructor(e){this.pos=e}map(e){return new gc(e.map(this.pos))}resolve(e){let r=e.resolve(this.pos);return We.valid(r)?new We(r):ne.near(r)}}function Nm(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function Db(t){for(let e=t.depth;e>=0;e--){let r=t.index(e),n=t.node(e);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||Nm(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Ob(t){for(let e=t.depth;e>=0;e--){let r=t.indexAfter(e),n=t.node(e);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||Nm(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Nb(){return new Ve({props:{decorations:Rb,createSelectionBetween(t,e,r){return e.pos==r.pos&&We.valid(r)?new We(r):null},handleClick:_b,handleKeyDown:Lb,handleDOMEvents:{beforeinput:zb}}})}const Lb=Lp({ArrowLeft:Mo("horiz",-1),ArrowRight:Mo("horiz",1),ArrowUp:Mo("vert",-1),ArrowDown:Mo("vert",1)});function Mo(t,e){const r=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,i,s){let o=n.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof ee){if(!s.endOfTextblock(r)||a.depth==0)return!1;l=!1,a=n.doc.resolve(e>0?a.after():a.before())}let u=We.findGapCursorFrom(a,e,l);return u?(i&&i(n.tr.setSelection(new We(u))),!0):!1}}function _b(t,e,r){if(!t||!t.editable)return!1;let n=t.state.doc.resolve(e);if(!We.valid(n))return!1;let i=t.posAtCoords({left:r.clientX,top:r.clientY});return i&&i.inside>-1&&X.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new We(n))),!0)}function zb(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof We))return!1;let{$from:r}=t.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(t.state.schema.nodes.text);if(!n)return!1;let i=R.empty;for(let o=n.length-1;o>=0;o--)i=R.from(n[o].createAndFill(null,i));let s=t.state.tr.replace(r.pos,r.pos,new V(i,0,0));return s.setSelection(ee.near(s.doc.resolve(r.pos+1))),t.dispatch(s),!1}function Rb(t){if(!(t.selection instanceof We))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ze.create(t.doc,[rt.widget(t.selection.head,e,{key:"gapcursor"})])}const Ib=Ke.create({name:"gapCursor",addProseMirrorPlugins(){return[Nb()]},extendNodeSchema(t){var e;const r={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=pe(J(t,"allowGapCursor",r)))!==null&&e!==void 0?e:null}}}),Bb=ye.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Se(this.options.HTMLAttributes,t)]},renderText(){return`
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:r,editor:n})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=r;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=n.extensionManager,l=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&o){const d=l.filter(h=>a.includes(h.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Fb=ye.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}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Se(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},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=>nu({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var ba=200,ct=function(){};ct.prototype.append=function(e){return e.length?(e=ct.from(e),!this.length&&e||e.length=r?ct.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,r))};ct.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};ct.prototype.forEach=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(e,r,n,0):this.forEachInvertedInner(e,r,n,0)};ct.prototype.map=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},r,n),i};ct.from=function(e){return e instanceof ct?e:e&&e.length?new Lm(e):ct.empty};var Lm=(function(t){function e(n){t.call(this),this.values=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,a){for(var l=s;l=o;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=ba)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=ba)return new e(i.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(e.prototype,r),e})(ct);ct.empty=new Lm([]);var Pb=(function(t){function e(r,n){t.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.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(n){return na&&this.right.forEachInner(n,Math.max(i-a,0),Math.min(this.length,s)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,s,o){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(n,i-a,Math.max(s,a)-a,o+a)===!1||s=s?this.right.slice(n-s,i-s):this.left.slice(n,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(ct);const Hb=500;class gr{constructor(e,r){this.items=e,this.eventCount=r}popEvent(e,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,s;r&&(i=this.remapping(n,this.items.length),s=i.maps.length);let o=e.tr,a,l,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step){i||(i=this.remapping(n,h+1),s=i.maps.length),s--,c.push(d);return}if(i){c.push(new Mr(d.map));let f=d.step.map(i.slice(s)),p;f&&o.maybeStep(f).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],u.push(new Mr(p,void 0,void 0,u.length+c.length))),s--,p&&i.appendMap(p,s)}else o.maybeStep(d.step);if(d.selection)return a=i?d.selection.map(i.slice(s)):d.selection,l=new gr(this.items.slice(0,n).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,r,n,i){let s=[],o=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;cVb&&(a=qb(a,u),o-=u),new gr(a.append(s),o)}remapping(e,r){let n=new Is;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,o)},e,r),n}addMaps(e){return this.eventCount==0?this:new gr(this.items.append(e.map(r=>new Mr(r))),this.eventCount)}rebased(e,r){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-r),s=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=r;this.items.forEach(h=>{let f=s.getMirror(--l);if(f==null)return;o=Math.min(o,f);let p=s.maps[f];if(h.step){let b=e.steps[f].invert(e.docs[f]),y=h.selection&&h.selection.map(s.slice(l+1,f));y&&a++,n.push(new Mr(p,b,y))}else n.push(new Mr(p))},i);let u=[];for(let h=r;hHb&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let e=0;return this.items.forEach(r=>{r.step||e++}),e}compress(e=this.items.length){let r=this.remapping(0,e),n=r.maps.length,i=[],s=0;return this.items.forEach((o,a)=>{if(a>=e)i.push(o),o.selection&&s++;else if(o.step){let l=o.step.map(r.slice(n)),u=l&&l.getMap();if(n--,u&&r.appendMap(u,n),l){let c=o.selection&&o.selection.map(r.slice(n));c&&s++;let d=new Mr(u.invert(),l,c),h,f=i.length-1;(h=i.length&&i[f].merge(d))?i[f]=h:i.push(d)}}else o.map&&n--},this.items.length,0),new gr(ct.from(i.reverse()),s)}}gr.empty=new gr(ct.empty,0);function qb(t,e){let r;return t.forEach((n,i)=>{if(n.selection&&e--==0)return r=i,!1}),t.slice(r)}class Mr{constructor(e,r,n,i){this.map=e,this.step=r,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let r=e.step.merge(this.step);if(r)return new Mr(r.getMap().invert(),r,this.selection)}}}class An{constructor(e,r,n,i,s){this.done=e,this.undone=r,this.prevRanges=n,this.prevTime=i,this.prevComposition=s}}const Vb=20;function $b(t,e,r,n){let i=r.getMeta(mi),s;if(i)return i.historyState;r.getMeta(Ub)&&(t=new An(t.done,t.undone,null,0,-1));let o=r.getMeta("appendedTransaction");if(r.steps.length==0)return t;if(o&&o.getMeta(mi))return o.getMeta(mi).redo?new An(t.done.addTransform(r,void 0,n,Yo(e)),t.undone,_h(r.mapping.maps),t.prevTime,t.prevComposition):new An(t.done,t.undone.addTransform(r,void 0,n,Yo(e)),null,t.prevTime,t.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=r.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(r.time||0)-n.newGroupDelay||!jb(r,t.prevRanges)),u=o?tl(t.prevRanges,r.mapping):_h(r.mapping.maps);return new An(t.done.addTransform(r,l?e.selection.getBookmark():void 0,n,Yo(e)),gr.empty,u,r.time,a??t.prevComposition)}else return(s=r.getMeta("rebased"))?new An(t.done.rebased(r,s),t.undone.rebased(r,s),tl(t.prevRanges,r.mapping),t.prevTime,t.prevComposition):new An(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),tl(t.prevRanges,r.mapping),t.prevTime,t.prevComposition)}function jb(t,e){if(!e)return!1;if(!t.docChanged)return!0;let r=!1;return t.mapping.maps[0].forEach((n,i)=>{for(let s=0;s=e[s]&&(r=!0)}),r}function _h(t){let e=[];for(let r=t.length-1;r>=0&&e.length==0;r--)t[r].forEach((n,i,s,o)=>e.push(s,o));return e}function tl(t,e){if(!t)return null;let r=[];for(let n=0;n{let i=mi.getState(r);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(n){let s=Wb(i,r,t);s&&n(e?s.scrollIntoView():s)}return!0}}const zm=_m(!1,!0),Rm=_m(!0,!0),Gb=Ke.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>zm(t,e),redo:()=>({state:t,dispatch:e})=>Rm(t,e)}},addProseMirrorPlugins(){return[Kb(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()}}}),Jb=ye.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Se(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!O7(e,e.schema.nodes[this.name]))return!1;const{selection:r}=e,{$from:n,$to:i}=r,s=t();return n.parentOffset===0?s.insertContentAt({from:Math.max(n.pos-1,0),to:i.pos},{type:this.name}):s7(r)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:o,dispatch:a})=>{var l;if(a){const{$to:u}=o.selection,c=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?o.setSelection(ee.create(o.doc,u.pos+1)):u.nodeAfter.isBlock?o.setSelection(X.create(o.doc,u.pos)):o.setSelection(ee.create(o.doc,u.pos));else{const d=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(o.insert(c,d),o.setSelection(ee.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[hm({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Yb=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Zb=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Xb=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Qb=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,e9=mt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Se(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[Ki({find:Yb,type:this.type}),Ki({find:Xb,type:this.type})]},addPasteRules(){return[xi({find:Zb,type:this.type}),xi({find:Qb,type:this.type})]}}),t9=ye.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Se(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)}}}),r9="listItem",Rh="textStyle",Ih=/^(\d+)\.\s$/,n9=ye.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},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...r}=t;return e===1?["ol",Se(this.options.HTMLAttributes,r),0]:["ol",Se(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(r9,this.editor.getAttributes(Rh)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Gi({find:Ih,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Gi({find:Ih,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Rh)}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1],editor:this.editor})),[t]}}),i9=ye.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),s9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,o9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,a9=mt.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")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Se(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[Ki({find:s9,type:this.type})]},addPasteRules(){return[xi({find:o9,type:this.type})]}}),l9=ye.create({name:"text",group:"inline"}),u9=Ke.create({name:"starterKit",addExtensions(){var t,e,r,n,i,s,o,a,l,u,c,d,h,f,p,b,y,x;const S=[];return this.options.bold!==!1&&S.push(gb.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&S.push(db.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&S.push(yb.configure((r=this.options)===null||r===void 0?void 0:r.bulletList)),this.options.code!==!1&&S.push(kb.configure((n=this.options)===null||n===void 0?void 0:n.code)),this.options.codeBlock!==!1&&S.push(Cb.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&S.push(Ab.configure((s=this.options)===null||s===void 0?void 0:s.document)),this.options.dropcursor!==!1&&S.push(Tb.configure((o=this.options)===null||o===void 0?void 0:o.dropcursor)),this.options.gapcursor!==!1&&S.push(Ib.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&S.push(Bb.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&S.push(Fb.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&S.push(Gb.configure((c=this.options)===null||c===void 0?void 0:c.history)),this.options.horizontalRule!==!1&&S.push(Jb.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&S.push(e9.configure((h=this.options)===null||h===void 0?void 0:h.italic)),this.options.listItem!==!1&&S.push(t9.configure((f=this.options)===null||f===void 0?void 0:f.listItem)),this.options.orderedList!==!1&&S.push(n9.configure((p=this.options)===null||p===void 0?void 0:p.orderedList)),this.options.paragraph!==!1&&S.push(i9.configure((b=this.options)===null||b===void 0?void 0:b.paragraph)),this.options.strike!==!1&&S.push(a9.configure((y=this.options)===null||y===void 0?void 0:y.strike)),this.options.text!==!1&&S.push(l9.configure((x=this.options)===null||x===void 0?void 0:x.text)),S}});function c9(t){var e;const{char:r,allowSpaces:n,allowedPrefixes:i,startOfLine:s,$position:o}=t,a=N7(r),l=new RegExp(`\\s${a}$`),u=s?"^":"",c=n?new RegExp(`${u}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${u}(?:^)?${a}[^\\s${a}]*`,"gm"),d=((e=o.nodeBefore)===null||e===void 0?void 0:e.isText)&&o.nodeBefore.text;if(!d)return null;const h=o.pos-d.length,f=Array.from(d.matchAll(c)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const p=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(p);if(i!==null&&!b)return null;const y=h+f.index;let x=y+f[0].length;return n&&l.test(d.slice(x-1,x+1))&&(f[0]+=" ",x+=1),y=o.pos?{range:{from:y,to:x},query:f[0].slice(r.length),text:f[0]}:null}const d9=new Je("suggestion");function h9({pluginKey:t=d9,editor:e,char:r="@",allowSpaces:n=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:o="span",decorationClass:a="suggestion",command:l=()=>null,items:u=()=>[],render:c=()=>({}),allow:d=()=>!0,findSuggestionMatch:h=c9}){let f;const p=c==null?void 0:c(),b=new Ve({key:t,view(){return{update:async(y,x)=>{var S,M,w,T,D,O,I;const _=(S=this.key)===null||S===void 0?void 0:S.getState(x),$=(M=this.key)===null||M===void 0?void 0:M.getState(y.state),z=_.active&&$.active&&_.range.from!==$.range.from,j=!_.active&&$.active,G=_.active&&!$.active,ce=!j&&!G&&_.query!==$.query,le=j||z&&ce,Q=ce||z,me=G||z&&ce;if(!le&&!Q&&!me)return;const be=me&&!le?_:$,et=y.dom.querySelector(`[data-decoration-id="${be.decorationId}"]`);f={editor:e,range:be.range,query:be.query,text:be.text,items:[],command:De=>l({editor:e,range:be.range,props:De}),decorationNode:et,clientRect:et?()=>{var De;const{decorationId:Ye}=(De=this.key)===null||De===void 0?void 0:De.getState(e.state),Ce=y.dom.querySelector(`[data-decoration-id="${Ye}"]`);return(Ce==null?void 0:Ce.getBoundingClientRect())||null}:null},le&&((w=p==null?void 0:p.onBeforeStart)===null||w===void 0||w.call(p,f)),Q&&((T=p==null?void 0:p.onBeforeUpdate)===null||T===void 0||T.call(p,f)),(Q||le)&&(f.items=await u({editor:e,query:be.query})),me&&((D=p==null?void 0:p.onExit)===null||D===void 0||D.call(p,f)),Q&&((O=p==null?void 0:p.onUpdate)===null||O===void 0||O.call(p,f)),le&&((I=p==null?void 0:p.onStart)===null||I===void 0||I.call(p,f))},destroy:()=>{var y;f&&((y=p==null?void 0:p.onExit)===null||y===void 0||y.call(p,f))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(y,x,S,M){const{isEditable:w}=e,{composing:T}=e.view,{selection:D}=y,{empty:O,from:I}=D,_={...x};if(_.composing=T,w&&(O||e.view.composing)){(Ix.range.to)&&!T&&!x.composing&&(_.active=!1);const $=h({char:r,allowSpaces:n,allowedPrefixes:i,startOfLine:s,$position:D.$from}),z=`id_${Math.floor(Math.random()*4294967295)}`;$&&d({editor:e,state:M,range:$.range,isActive:x.active})?(_.active=!0,_.decorationId=x.decorationId?x.decorationId:z,_.range=$.range,_.query=$.query,_.text=$.text):_.active=!1}else _.active=!1;return _.active||(_.decorationId=null,_.range={from:0,to:0},_.query=null,_.text=null),_}},props:{handleKeyDown(y,x){var S;const{active:M,range:w}=b.getState(y.state);return M&&((S=p==null?void 0:p.onKeyDown)===null||S===void 0?void 0:S.call(p,{view:y,event:x,range:w}))||!1},decorations(y){const{active:x,range:S,decorationId:M}=b.getState(y);return x?ze.create(y.doc,[rt.inline(S.from,S.to,{nodeName:o,class:a,"data-decoration-id":M})]):null}}});return b}const f9=new Je("mention"),p9=ye.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderText({options:t,node:e}){var r;return`${t.suggestion.char}${(r=e.attrs.label)!==null&&r!==void 0?r:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:t,node:e}){var r;return["span",Se(this.HTMLAttributes,t.HTMLAttributes),`${t.suggestion.char}${(r=e.attrs.label)!==null&&r!==void 0?r:e.attrs.id}`]},suggestion:{char:"@",pluginKey:f9,command:({editor:t,range:e,props:r})=>{var n,i,s;const o=t.view.state.selection.$to.nodeAfter;((n=o==null?void 0:o.text)===null||n===void 0?void 0:n.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:r},{type:"text",text:" "}]).run(),(s=(i=t.view.dom.ownerDocument.defaultView)===null||i===void 0?void 0:i.getSelection())===null||s===void 0||s.collapseToEnd()},allow:({state:t,range:e})=>{const r=t.doc.resolve(e.from),n=t.schema.nodes[this.name];return!!r.parent.type.contentMatch.matchType(n)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",Se({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})];const r={...this.options};r.HTMLAttributes=Se({"data-type":this.name},this.options.HTMLAttributes,e);const n=this.options.renderHTML({options:r,node:t});return typeof n=="string"?["span",Se({"data-type":this.name},this.options.HTMLAttributes,e),n]:n},renderText({node:t}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:t})):this.options.renderText({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let r=!1;const{selection:n}=e,{empty:i,anchor:s}=n;return i?(e.doc.nodesBetween(s-1,s,(o,a)=>{if(o.type.name===this.name)return r=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",a,a+o.nodeSize),!1}),r):!1})}},addProseMirrorPlugins(){return[h9({editor:this.editor,...this.options.suggestion})]}}),m9=mt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",Se(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const r=sc(t,this.type);return Object.entries(r).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),g9=Ke.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?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()}}}),b9="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",y9="ελ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",uu="numeric",cu="ascii",du="alpha",As="asciinumeric",gs="alphanumeric",hu="domain",Im="emoji",v9="scheme",x9="slashscheme",nl="whitespace";function k9(t,e){return t in e||(e[t]=[]),e[t]}function ui(t,e,r){e[uu]&&(e[As]=!0,e[gs]=!0),e[cu]&&(e[As]=!0,e[du]=!0),e[As]&&(e[gs]=!0),e[du]&&(e[gs]=!0),e[gs]&&(e[hu]=!0),e[Im]&&(e[hu]=!0);for(const n in e){const i=k9(n,r);i.indexOf(t)<0&&i.push(t)}}function w9(t,e){const r={};for(const n in e)e[n].indexOf(t)>=0&&(r[n]=!0);return r}function Rt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Rt.groups={};Rt.prototype={accepts(){return!!this.t},go(t){const e=this,r=e.j[t];if(r)return r;for(let n=0;nt.ta(e,r,n,i),$e=(t,e,r,n,i)=>t.tr(e,r,n,i),Bh=(t,e,r,n,i)=>t.ts(e,r,n,i),P=(t,e,r,n,i)=>t.tt(e,r,n,i),en="WORD",fu="UWORD",Bm="ASCIINUMERICAL",Fm="ALPHANUMERICAL",Ws="LOCALHOST",pu="TLD",mu="UTLD",Zo="SCHEME",Ri="SLASH_SCHEME",bc="NUM",gu="WS",yc="NL",Ms="OPENBRACE",Es="CLOSEBRACE",ya="OPENBRACKET",va="CLOSEBRACKET",xa="OPENPAREN",ka="CLOSEPAREN",wa="OPENANGLEBRACKET",Sa="CLOSEANGLEBRACKET",Ca="FULLWIDTHLEFTPAREN",Aa="FULLWIDTHRIGHTPAREN",Ma="LEFTCORNERBRACKET",Ea="RIGHTCORNERBRACKET",Ta="LEFTWHITECORNERBRACKET",Da="RIGHTWHITECORNERBRACKET",Oa="FULLWIDTHLESSTHAN",Na="FULLWIDTHGREATERTHAN",La="AMPERSAND",_a="APOSTROPHE",za="ASTERISK",Mn="AT",Ra="BACKSLASH",Ia="BACKTICK",Ba="CARET",Dn="COLON",vc="COMMA",Fa="DOLLAR",Er="DOT",Pa="EQUALS",xc="EXCLAMATION",Xt="HYPHEN",Ts="PERCENT",Ha="PIPE",qa="PLUS",Va="POUND",Ds="QUERY",kc="QUOTE",Pm="FULLWIDTHMIDDLEDOT",wc="SEMI",Tr="SLASH",Os="TILDE",$a="UNDERSCORE",Hm="EMOJI",ja="SYM";var qm=Object.freeze({__proto__:null,ALPHANUMERICAL:Fm,AMPERSAND:La,APOSTROPHE:_a,ASCIINUMERICAL:Bm,ASTERISK:za,AT:Mn,BACKSLASH:Ra,BACKTICK:Ia,CARET:Ba,CLOSEANGLEBRACKET:Sa,CLOSEBRACE:Es,CLOSEBRACKET:va,CLOSEPAREN:ka,COLON:Dn,COMMA:vc,DOLLAR:Fa,DOT:Er,EMOJI:Hm,EQUALS:Pa,EXCLAMATION:xc,FULLWIDTHGREATERTHAN:Na,FULLWIDTHLEFTPAREN:Ca,FULLWIDTHLESSTHAN:Oa,FULLWIDTHMIDDLEDOT:Pm,FULLWIDTHRIGHTPAREN:Aa,HYPHEN:Xt,LEFTCORNERBRACKET:Ma,LEFTWHITECORNERBRACKET:Ta,LOCALHOST:Ws,NL:yc,NUM:bc,OPENANGLEBRACKET:wa,OPENBRACE:Ms,OPENBRACKET:ya,OPENPAREN:xa,PERCENT:Ts,PIPE:Ha,PLUS:qa,POUND:Va,QUERY:Ds,QUOTE:kc,RIGHTCORNERBRACKET:Ea,RIGHTWHITECORNERBRACKET:Da,SCHEME:Zo,SEMI:wc,SLASH:Tr,SLASH_SCHEME:Ri,SYM:ja,TILDE:Os,TLD:pu,UNDERSCORE:$a,UTLD:mu,UWORD:fu,WORD:en,WS:gu});const Zr=/[a-z]/,cs=new RegExp("\\p{L}","u"),il=new RegExp("\\p{Emoji}","u"),Xr=/\d/,sl=/\s/,Fh="\r",ol=`
`,S9="️",C9="",al="";let Eo=null,To=null;function A9(t=[]){const e={};Rt.groups=e;const r=new Rt;Eo==null&&(Eo=Ph(b9)),To==null&&(To=Ph(y9)),P(r,"'",_a),P(r,"{",Ms),P(r,"}",Es),P(r,"[",ya),P(r,"]",va),P(r,"(",xa),P(r,")",ka),P(r,"<",wa),P(r,">",Sa),P(r,"(",Ca),P(r,")",Aa),P(r,"「",Ma),P(r,"」",Ea),P(r,"『",Ta),P(r,"』",Da),P(r,"<",Oa),P(r,">",Na),P(r,"&",La),P(r,"*",za),P(r,"@",Mn),P(r,"`",Ia),P(r,"^",Ba),P(r,":",Dn),P(r,",",vc),P(r,"$",Fa),P(r,".",Er),P(r,"=",Pa),P(r,"!",xc),P(r,"-",Xt),P(r,"%",Ts),P(r,"|",Ha),P(r,"+",qa),P(r,"#",Va),P(r,"?",Ds),P(r,'"',kc),P(r,"/",Tr),P(r,";",wc),P(r,"~",Os),P(r,"_",$a),P(r,"\\",Ra),P(r,"・",Pm);const n=$e(r,Xr,bc,{[uu]:!0});$e(n,Xr,n);const i=$e(n,Zr,Bm,{[As]:!0}),s=$e(n,cs,Fm,{[gs]:!0}),o=$e(r,Zr,en,{[cu]:!0});$e(o,Xr,i),$e(o,Zr,o),$e(i,Xr,i),$e(i,Zr,i);const a=$e(r,cs,fu,{[du]:!0});$e(a,Zr),$e(a,Xr,s),$e(a,cs,a),$e(s,Xr,s),$e(s,Zr),$e(s,cs,s);const l=P(r,ol,yc,{[nl]:!0}),u=P(r,Fh,gu,{[nl]:!0}),c=$e(r,sl,gu,{[nl]:!0});P(r,al,c),P(u,ol,l),P(u,al,c),$e(u,sl,c),P(c,Fh),P(c,ol),$e(c,sl,c),P(c,al,c);const d=$e(r,il,Hm,{[Im]:!0});P(d,"#"),$e(d,il,d),P(d,S9,d);const h=P(d,C9);P(h,"#"),$e(h,il,d);const f=[[Zr,o],[Xr,i]],p=[[Zr,null],[cs,a],[Xr,s]];for(let b=0;bb[0]>y[0]?1:-1);for(let b=0;b=0?S[hu]=!0:Zr.test(y)?Xr.test(y)?S[As]=!0:S[cu]=!0:S[uu]=!0,Bh(r,y,y,S)}return Bh(r,"localhost",Ws,{ascii:!0}),r.jd=new Rt(ja),{start:r,tokens:Object.assign({groups:e},qm)}}function Vm(t,e){const r=M9(e.replace(/[A-Z]/g,a=>a.toLowerCase())),n=r.length,i=[];let s=0,o=0;for(;o=0&&(d+=r[o].length,h++),u+=r[o].length,s+=r[o].length,o++;s-=d,o-=h,u-=d,i.push({t:c.t,v:e.slice(s-u,s),s:s-u,e:s})}return i}function M9(t){const e=[],r=t.length;let n=0;for(;n56319||n+1===r||(s=t.charCodeAt(n+1))<56320||s>57343?t[n]:t.slice(n,n+2);e.push(o),n+=o.length}return e}function xn(t,e,r,n,i){let s;const o=e.length;for(let a=0;a=0;)s++;if(s>0){e.push(r.join(""));for(let o=parseInt(t.substring(n,n+s),10);o>0;o--)r.pop();n+=s}else r.push(t[n]),n++}return e}const Us={defaultProtocol:"http",events:null,format:Hh,formatHref:Hh,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Sc(t,e=null){let r=Object.assign({},Us);t&&(r=Object.assign(r,t instanceof Sc?t.o:t));const n=r.ignoreTags,i=[];for(let s=0;sr?n.substring(0,r)+"…":n},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=Us.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,r=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",r,this),i=t.get("tagName",r,e),s=this.toFormattedString(t),o={},a=t.get("className",r,e),l=t.get("target",r,e),u=t.get("rel",r,e),c=t.getObj("attributes",r,e),d=t.getObj("events",r,e);return o.href=n,a&&(o.class=a),l&&(o.target=l),u&&(o.rel=u),c&&Object.assign(o,c),{tagName:i,attributes:o,content:s,eventListeners:d}}};function b0(t,e){class r extends $m{constructor(i,s){super(i,s),this.t=t}}for(const n in e)r.prototype[n]=e[n];return r.t=t,r}const qh=b0("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Vh=b0("text"),E9=b0("nl"),Do=b0("url",{isLink:!0,toHref(t=Us.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Ws&&t[1].t===Dn}}),Zt=t=>new Rt(t);function T9({groups:t}){const e=t.domain.concat([La,za,Mn,Ra,Ia,Ba,Fa,Pa,Xt,bc,Ts,Ha,qa,Va,Tr,ja,Os,$a]),r=[_a,Dn,vc,Er,xc,Ts,Ds,kc,wc,wa,Sa,Ms,Es,va,ya,xa,ka,Ca,Aa,Ma,Ea,Ta,Da,Oa,Na],n=[La,_a,za,Ra,Ia,Ba,Fa,Pa,Xt,Ms,Es,Ts,Ha,qa,Va,Ds,Tr,ja,Os,$a],i=Zt(),s=P(i,Os);fe(s,n,s),fe(s,t.domain,s);const o=Zt(),a=Zt(),l=Zt();fe(i,t.domain,o),fe(i,t.scheme,a),fe(i,t.slashscheme,l),fe(o,n,s),fe(o,t.domain,o);const u=P(o,Mn);P(s,Mn,u),P(a,Mn,u),P(l,Mn,u);const c=P(s,Er);fe(c,n,s),fe(c,t.domain,s);const d=Zt();fe(u,t.domain,d),fe(d,t.domain,d);const h=P(d,Er);fe(h,t.domain,d);const f=Zt(qh);fe(h,t.tld,f),fe(h,t.utld,f),P(u,Ws,f);const p=P(d,Xt);P(p,Xt,p),fe(p,t.domain,d),fe(f,t.domain,d),P(f,Er,h),P(f,Xt,p);const b=P(f,Dn);fe(b,t.numeric,qh);const y=P(o,Xt),x=P(o,Er);P(y,Xt,y),fe(y,t.domain,o),fe(x,n,s),fe(x,t.domain,o);const S=Zt(Do);fe(x,t.tld,S),fe(x,t.utld,S),fe(S,t.domain,o),fe(S,n,s),P(S,Er,x),P(S,Xt,y),P(S,Mn,u);const M=P(S,Dn),w=Zt(Do);fe(M,t.numeric,w);const T=Zt(Do),D=Zt();fe(T,e,T),fe(T,r,D),fe(D,e,T),fe(D,r,D),P(S,Tr,T),P(w,Tr,T);const O=P(a,Dn),I=P(l,Dn),_=P(I,Tr),$=P(_,Tr);fe(a,t.domain,o),P(a,Er,x),P(a,Xt,y),fe(l,t.domain,o),P(l,Er,x),P(l,Xt,y),fe(O,t.domain,T),P(O,Tr,T),P(O,Ds,T),fe($,t.domain,T),fe($,e,T),P($,Tr,T);const z=[[Ms,Es],[ya,va],[xa,ka],[wa,Sa],[Ca,Aa],[Ma,Ea],[Ta,Da],[Oa,Na]];for(let j=0;j=0&&h++,i++,c++;if(h<0)i-=c,i0&&(s.push(ll(Vh,e,o)),o=[]),i-=h,c-=h;const f=d.t,p=r.slice(i-c,i);s.push(ll(f,e,p))}}return o.length>0&&s.push(ll(Vh,e,o)),s}function ll(t,e,r){const n=r[0].s,i=r[r.length-1].e,s=e.slice(n,i);return new t(s,r)}const O9=typeof console<"u"&&console&&console.warn||(()=>{}),N9="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Fe={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function L9(){return Rt.groups={},Fe.scanner=null,Fe.parser=null,Fe.tokenQueue=[],Fe.pluginQueue=[],Fe.customSchemes=[],Fe.initialized=!1,Fe}function $h(t,e=!1){if(Fe.initialized&&O9(`linkifyjs: already initialized - will not register custom scheme "${t}" ${N9}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);Fe.customSchemes.push([t,e])}function _9(){Fe.scanner=A9(Fe.customSchemes);for(let t=0;t{const i=e.some(u=>u.docChanged)&&!r.doc.eq(n.doc),s=e.some(u=>u.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=n,a=Z5(r.doc,[...e]);if(nm(a).forEach(({newRange:u})=>{const c=Q5(n.doc,u,f=>f.isTextblock);let d,h;if(c.length>1?(d=c[0],h=n.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):c.length&&n.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(d=c[0],h=n.doc.textBetween(d.pos,u.to,void 0," ")),d&&h){const f=h.split(" ").filter(x=>x!=="");if(f.length<=0)return!1;const p=f[f.length-1],b=d.pos+h.lastIndexOf(p);if(!p)return!1;const y=Cc(p).map(x=>x.toObject(t.defaultProtocol));if(!z9(y))return!1;y.filter(x=>x.isLink).map(x=>({...x,from:b+x.start+1,to:b+x.end+1})).filter(x=>n.schema.marks.code?!n.doc.rangeHasMark(x.from,x.to,n.schema.marks.code):!0).filter(x=>t.validate(x.value)).forEach(x=>{ac(x.from,x.to,n.doc).some(S=>S.mark.type===t.type)||o.addMark(x.from,x.to,t.type.create({href:x.href}))})}}),!!o.steps.length)return o}})}function I9(t){return new Ve({key:new Je("handleClickLink"),props:{handleClick:(e,r,n)=>{var i,s;if(n.button!==0||!e.editable)return!1;let o=n.target;const a=[];for(;o.nodeName!=="DIV";)a.push(o),o=o.parentNode;if(!a.find(h=>h.nodeName==="A"))return!1;const l=rm(e.state,t.type.name),u=n.target,c=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:l.href,d=(s=u==null?void 0:u.target)!==null&&s!==void 0?s:l.target;return u&&c?(window.open(c,d),!0):!1}}})}function B9(t){return new Ve({key:new Je("handlePasteLink"),props:{handlePaste:(e,r,n)=>{const{state:i}=e,{selection:s}=i,{empty:o}=s;if(o)return!1;let a="";n.content.forEach(u=>{a+=u.textContent});const l=jm(a,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:(t.editor.commands.setMark(t.type,{href:l.href}),!0)}}})}const F9=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function jh(t,e){const r=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(n=>{const i=typeof n=="string"?n:n.scheme;i&&r.push(i)}),!t||t.replace(F9,"").match(new RegExp(`^(?:(?:${r.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}const P9=mt.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(t=>{if(typeof t=="string"){$h(t);return}$h(t.scheme,t.optionalSlashes)})},onDestroy(){L9()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!jh(e,this.options.protocols)?!1:null}}]},renderHTML({HTMLAttributes:t}){return jh(t.href,this.options.protocols)?["a",Se(this.options.HTMLAttributes,t),0]:["a",Se(this.options.HTMLAttributes,{...t,href:""}),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[xi({find:t=>{const e=[];if(t){const{validate:r}=this.options,n=jm(t).filter(i=>i.isLink&&r(i.value));n.length&&n.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[];return this.options.autolink&&t.push(R9({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&t.push(I9({type:this.type})),this.options.linkOnPaste&&t.push(B9({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),H9=Ke.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Ve({key:new Je("placeholder"),props:{decorations:({doc:t,selection:e})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,i=[];if(!r)return null;const s=this.editor.isEmpty;return t.descendants((o,a)=>{const l=n>=a&&n<=a+o.nodeSize,u=!o.isLeaf&&p0(o);if((l||!this.options.showOnlyCurrent)&&u){const c=[this.options.emptyNodeClass];s&&c.push(this.options.emptyEditorClass);const d=rt.node(a,a+o.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:a,hasAnchor:l}):this.options.placeholder});i.push(d)}return this.options.includeChildren}),ze.create(t,i)}}})]}}),q9=mt.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Se(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()}}}),V9=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,$9=ye.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",Se(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[hm({find:V9,type:this.type,getAttributes:t=>{const[,,e,r,n]=t;return{src:r,alt:e,title:n}}})]}}),j9=/^\s*(\[([( |x])?\])\s$/,W9=ye.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Se(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:r,editor:n})=>{const i=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");return s.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!n.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:c}=u.target;n.isEditable&&typeof r=="function"&&n.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:d})=>{const h=r();if(typeof h!="number")return!1;const f=d.doc.nodeAt(h);return d.setNodeMarkup(h,void 0,{...f==null?void 0:f.attrs,checked:c}),!0}).run(),!n.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,c)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,c])=>{i.setAttribute(u,c)}),i.dataset.checked=t.attrs.checked,t.attrs.checked&&a.setAttribute("checked","checked"),s.append(a,o),i.append(s,l),Object.entries(e).forEach(([u,c])=>{i.setAttribute(u,c)}),{dom:i,contentDOM:l,update:u=>u.type!==this.type?!1:(i.dataset.checked=u.attrs.checked,u.attrs.checked?a.setAttribute("checked","checked"):a.removeAttribute("checked"),!0)}}},addInputRules(){return[Gi({find:j9,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),U9=Ke.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign||this.options.defaultAlignment;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${t.textAlign}`}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(r=>e.updateAttributes(r,{textAlign:t})).every(r=>r):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),K9=ye.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Se(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),G9=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),J9=typeof navigator<"u"&&/Win/.test(navigator.platform);function Y9(t){let e=t.split(/-(?!$)/),r=e[e.length-1];r=="Space"&&(r=" ");let n,i,s,o;for(let a=0;at.get(e),yu=(e,r)=>(t.set(e,r),r)}else{const t=[];let r=0;bu=n=>{for(let i=0;i(r==10&&(r=0),t[r++]=n,t[r++]=i)}var Ue=class{constructor(t,e,r,n){this.width=t,this.height=e,this.map=r,this.problems=n}findCell(t){for(let e=0;e=r){(s||(s=[])).push({type:"overlong_rowspan",pos:c,n:x-M});break}const w=i+M*e;for(let T=0;Tn&&(s+=u.attrs.colspan)}}for(let o=0;o1&&(r=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function ty(t,e,r){t.problems||(t.problems=[]);const n={};for(let i=0;i0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function ny(t){for(let e=t.depth;e>0;e--){const r=t.node(e).type.spec.tableRole;if(r==="cell"||r==="header_cell")return t.node(e)}return null}function xr(t){const e=t.selection.$head;for(let r=e.depth;r>0;r--)if(e.node(r).type.spec.tableRole=="row")return!0;return!1}function y0(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&&e.node.type.spec.tableRole=="cell")return e.$anchor;const r=ns(e.$head)||iy(e.$head);if(r)return r;throw new RangeError(`No cell found around position ${e.head}`)}function iy(t){for(let e=t.nodeAfter,r=t.pos;e;e=e.firstChild,r++){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return t.doc.resolve(r)}for(let e=t.nodeBefore,r=t.pos;e;e=e.lastChild,r--){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return t.doc.resolve(r-e.nodeSize)}}function vu(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function sy(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Ac(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Wm(t,e,r){const n=t.node(-1),i=Ue.get(n),s=t.start(-1),o=i.nextCell(t.pos-s,e,r);return o==null?null:t.node(0).resolve(s+o)}function wi(t,e,r=1){const n={...t,colspan:t.colspan-r};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(e,r),n.colwidth.some(i=>i>0)||(n.colwidth=null)),n}function Um(t,e,r=1){const n={...t,colspan:t.colspan+r};if(n.colwidth){n.colwidth=n.colwidth.slice();for(let i=0;ic!=r.pos-s);l.unshift(r.pos-s);const u=l.map(c=>{const d=n.nodeAt(c);if(!d)throw RangeError(`No cell with offset ${c} found`);const h=s+c+1;return new G1(a.resolve(h),a.resolve(h+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=r}map(e,r){const n=e.resolve(r.map(this.$anchorCell.pos)),i=e.resolve(r.map(this.$headCell.pos));if(vu(n)&&vu(i)&&Ac(n,i)){const s=this.$anchorCell.node(-1)!=n.node(-1);return s&&this.isRowSelection()?tn.rowSelection(n,i):s&&this.isColSelection()?tn.colSelection(n,i):new tn(n,i)}return ee.between(n,i)}content(){const e=this.$anchorCell.node(-1),r=Ue.get(e),n=this.$anchorCell.start(-1),i=r.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),s={},o=[];for(let l=i.top;l0||y>0){let x=p.attrs;if(b>0&&(x=wi(x,0,b)),y>0&&(x=wi(x,x.colspan-y,y)),f.lefti.bottom){const x={...p.attrs,rowspan:Math.min(f.bottom,i.bottom)-Math.max(f.top,i.top)};f.top0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=r+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,i)==this.$headCell.node(-1).childCount}static colSelection(e,r=e){const n=e.node(-1),i=Ue.get(n),s=e.start(-1),o=i.findCell(e.pos-s),a=i.findCell(r.pos-s),l=e.node(0);return o.top<=a.top?(o.top>0&&(e=l.resolve(s+i.map[o.left])),a.bottom0&&(r=l.resolve(s+i.map[a.left])),o.bottom0)return!1;const o=i+this.$anchorCell.nodeAfter.attrs.colspan,a=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,a)==r.width}eq(e){return e instanceof tn&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,r=e){const n=e.node(-1),i=Ue.get(n),s=e.start(-1),o=i.findCell(e.pos-s),a=i.findCell(r.pos-s),l=e.node(0);return o.left<=a.left?(o.left>0&&(e=l.resolve(s+i.map[o.top*i.width])),a.right0&&(r=l.resolve(s+i.map[a.top*i.width])),o.right{e.push(rt.node(n,n+r.nodeSize,{class:"selectedCell"}))}),ze.create(t.doc,e)}function uy({$from:t,$to:e}){if(t.pos==e.pos||t.pos=0&&!(t.after(i+1)=0&&!(e.before(s+1)>e.start(s));s--,n--);return r==n&&/row|table/.test(t.node(i).type.spec.tableRole)}function cy({$from:t,$to:e}){let r,n;for(let i=t.depth;i>0;i--){const s=t.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}for(let i=e.depth;i>0;i--){const s=e.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}return r!==n&&e.parentOffset===0}function dy(t,e,r){const n=(e||t).selection,i=(e||t).doc;let s,o;if(n instanceof X&&(o=n.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")s=Ie.create(i,n.from);else if(o=="row"){const a=i.resolve(n.from+1);s=Ie.rowSelection(a,a)}else if(!r){const a=Ue.get(n.node),l=n.from+1,u=l+a.map[a.width*a.height-1];s=Ie.create(i,l+1,u)}}else n instanceof ee&&uy(n)?s=ee.create(i,n.from):n instanceof ee&&cy(n)&&(s=ee.create(i,n.$from.start(),n.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var hy=new Je("fix-tables");function Gm(t,e,r,n){const i=t.childCount,s=e.childCount;e:for(let o=0,a=0;o{i.type.spec.tableRole=="table"&&(r=fy(t,i,s,r))};return e?e.doc!=t.doc&&Gm(e.doc,t.doc,0,n):t.doc.descendants(n),r}function fy(t,e,r,n){const i=Ue.get(e);if(!i.problems)return n;n||(n=t.tr);const s=[];for(let l=0;l0){let f="cell";c.firstChild&&(f=c.firstChild.type.spec.tableRole);const p=[];for(let y=0;y0?-1:0;oy(e,n,i+s)&&(s=i==0||i==e.width?null:0);for(let o=0;o0&&i0&&e.map[a-1]==l||i0?-1:0;yy(e,n,i+l)&&(l=i==0||i==e.height?null:0);for(let u=0,c=e.width*i;u0&&i0&&d==e.map[c-e.width]){const h=r.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(a).map(d+n),null,{...h,rowspan:h.rowspan-1}),u+=h.colspan-1}else if(i0&&r[s]==r[s-1]||n.right0&&r[i]==r[i-t]||n.bottomr[n.type.spec.tableRole])(t,e)}function Cy(t){return(e,r)=>{var n;const i=e.selection;let s,o;if(i instanceof Ie){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;s=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(s=ny(i.$from),!s)return!1;o=(n=ns(i.$from))==null?void 0:n.pos}if(s==null||o==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(r){let a=s.attrs;const l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const c=Vr(e),d=e.tr;for(let f=0;f{o.attrs[t]!==e&&s.setNodeMarkup(a,null,{...o.attrs,[t]:e})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),n(s)}return!0}}function My(t){return function(e,r){if(!xr(e))return!1;if(r){const n=yt(e.schema),i=Vr(e),s=e.tr,o=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=o.map(l=>i.table.nodeAt(l));for(let l=0;l{const p=f+s.tableStart,b=o.doc.nodeAt(p);b&&o.setNodeMarkup(p,h,b.attrs)}),n(o)}return!0}}Ks("row",{useDeprecatedLogic:!0});Ks("column",{useDeprecatedLogic:!0});var Ey=Ks("cell",{useDeprecatedLogic:!0});function Ty(t,e){if(e<0){const r=t.nodeBefore;if(r)return t.pos-r.nodeSize;for(let n=t.index(-1)-1,i=t.before();n>=0;n--){const s=t.node(-1).child(n),o=s.lastChild;if(o)return i-1-o.nodeSize;i-=s.nodeSize}}else{if(t.index()0;n--)if(r.node(n).type.spec.tableRole=="table")return e&&e(t.tr.delete(r.before(n),r.after(n)).scrollIntoView()),!0;return!1}function Oo(t,e){const r=t.selection;if(!(r instanceof Ie))return!1;if(e){const n=t.tr,i=yt(t.schema).cell.createAndFill().content;r.forEachCell((s,o)=>{s.content.eq(i)||n.replace(n.mapping.map(o+1),n.mapping.map(o+s.nodeSize-1),new V(i,0,0))}),n.docChanged&&e(n)}return!0}function Oy(t){if(!t.size)return null;let{content:e,openStart:r,openEnd:n}=t;for(;e.childCount==1&&(r>0&&n>0||e.child(0).type.spec.tableRole=="table");)r--,n--,e=e.child(0).content;const i=e.child(0),s=i.type.spec.tableRole,o=i.type.schema,a=[];if(s=="row")for(let l=0;l=0;o--){const{rowspan:a,colspan:l}=s.child(o).attrs;for(let u=i;u=e.length&&e.push(R.empty),r[i]n&&(h=h.type.createChecked(wi(h.attrs,h.attrs.colspan,c+h.attrs.colspan-n),h.content)),u.push(h),c+=h.attrs.colspan;for(let f=1;fi&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),l.push(d)}s.push(R.from(l))}r=s,e=i}return{width:t,height:e,rows:r}}function _y(t,e,r,n,i,s,o){const a=t.doc.type.schema,l=yt(a);let u,c;if(i>e.width)for(let d=0,h=0;de.height){const d=[];for(let p=0,b=(e.height-1)*e.width;p=e.width?!1:r.nodeAt(e.map[b+p]).type==l.header_cell;d.push(y?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const h=l.row.create(null,R.from(d)),f=[];for(let p=e.height;p{if(!i)return!1;const s=r.selection;if(s instanceof Ie)return Xo(r,n,ne.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const o=Xm(i,t,e);if(o==null)return!1;if(t=="horiz")return Xo(r,n,ne.near(r.doc.resolve(s.head+e),e));{const a=r.doc.resolve(o),l=Wm(a,t,e);let u;return l?u=ne.near(l,1):e<0?u=ne.near(r.doc.resolve(a.before(-1)),-1):u=ne.near(r.doc.resolve(a.after(-1)),1),Xo(r,n,u)}}}function Lo(t,e){return(r,n,i)=>{if(!i)return!1;const s=r.selection;let o;if(s instanceof Ie)o=s;else{const l=Xm(i,t,e);if(l==null)return!1;o=new Ie(r.doc.resolve(l))}const a=Wm(o.$headCell,t,e);return a?Xo(r,n,new Ie(o.$anchorCell,a)):!1}}function Ry(t,e){const r=t.state.doc,n=ns(r.resolve(e));return n?(t.dispatch(t.state.tr.setSelection(new Ie(n))),!0):!1}function Iy(t,e,r){if(!xr(t.state))return!1;let n=Oy(r);const i=t.state.selection;if(i instanceof Ie){n||(n={width:1,height:1,rows:[R.from(xu(yt(t.state.schema).cell,r))]});const s=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),a=Ue.get(s).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return n=Ly(n,a.right-a.left,a.bottom-a.top),Xh(t.state,t.dispatch,o,a,n),!0}else if(n){const s=y0(t.state),o=s.start(-1);return Xh(t.state,t.dispatch,o,Ue.get(s.node(-1)).findCell(s.pos-o),n),!0}else return!1}function By(t,e){var r;if(e.ctrlKey||e.metaKey)return;const n=Qh(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof Ie)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&n&&(i=ns(t.state.selection.$anchor))!=null&&((r=cl(t,e))==null?void 0:r.pos)!=i.pos)s(i,e),e.preventDefault();else if(!n)return;function s(l,u){let c=cl(t,u);const d=On.getState(t.state)==null;if(!c||!Ac(l,c))if(d)c=l;else return;const h=new Ie(l,c);if(d||!t.state.selection.eq(h)){const f=t.state.tr.setSelection(h);d&&f.setMeta(On,l.pos),t.dispatch(f)}}function o(){t.root.removeEventListener("mouseup",o),t.root.removeEventListener("dragstart",o),t.root.removeEventListener("mousemove",a),On.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(On,-1))}function a(l){const u=l,c=On.getState(t.state);let d;if(c!=null)d=t.state.doc.resolve(c);else if(Qh(t,u.target)!=n&&(d=cl(t,e),!d))return o();d&&s(d,u)}t.root.addEventListener("mouseup",o),t.root.addEventListener("dragstart",o),t.root.addEventListener("mousemove",a)}function Xm(t,e,r){if(!(t.state.selection instanceof ee))return null;const{$head:n}=t.state.selection;for(let i=n.depth-1;i>=0;i--){const s=n.node(i);if((r<0?n.index(i):n.indexAfter(i))!=(r<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const a=n.before(i),l=e=="vert"?r>0?"down":"up":r>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function Qh(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function cl(t,e){const r=t.posAtCoords({left:e.clientX,top:e.clientY});return r&&r?ns(t.state.doc.resolve(r.pos)):null}var Fy=class{constructor(e,r){this.node=e,this.defaultCellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${r}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ku(e,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,ku(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function ku(t,e,r,n,i,s){var o;let a=0,l=!0,u=e.firstChild;const c=t.firstChild;if(c){for(let d=0,h=0;dnew n(h,r,f)),new Hy(-1,!1)},apply(o,a){return a.apply(o)}},props:{attributes:o=>{const a=jt.getState(o);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,a)=>{qy(o,a,t,i)},mouseleave:o=>{Vy(o)},mousedown:(o,a)=>{$y(o,a,e,r)}},decorations:o=>{const a=jt.getState(o);if(a&&a.activeHandle>-1)return Gy(o,a.activeHandle)},nodeViews:{}}});return s}var Hy=class Qo{constructor(e,r){this.activeHandle=e,this.dragging=r}apply(e){const r=this,n=e.getMeta(jt);if(n&&n.setHandle!=null)return new Qo(n.setHandle,!1);if(n&&n.setDragging!==void 0)return new Qo(r.activeHandle,n.setDragging);if(r.activeHandle>-1&&e.docChanged){let i=e.mapping.map(r.activeHandle,-1);return vu(e.doc.resolve(i))||(i=-1),new Qo(i,r.dragging)}return r}};function qy(t,e,r,n){if(!t.editable)return;const i=jt.getState(t.state);if(i&&!i.dragging){const s=Wy(e.target);let o=-1;if(s){const{left:a,right:l}=s.getBoundingClientRect();e.clientX-a<=r?o=ef(t,e,"left",r):l-e.clientX<=r&&(o=ef(t,e,"right",r))}if(o!=i.activeHandle){if(!n&&o!==-1){const a=t.state.doc.resolve(o),l=a.node(-1),u=Ue.get(l),c=a.start(-1);if(u.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==u.width-1)return}Qm(t,o)}}}function Vy(t){if(!t.editable)return;const e=jt.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Qm(t,-1)}function $y(t,e,r,n){var i;if(!t.editable)return!1;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,o=jt.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const a=t.state.doc.nodeAt(o.activeHandle),l=jy(t,o.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(jt,{setDragging:{startX:e.clientX,startWidth:l}}));function u(d){s.removeEventListener("mouseup",u),s.removeEventListener("mousemove",c);const h=jt.getState(t.state);h!=null&&h.dragging&&(Uy(t,h.activeHandle,tf(h.dragging,d,r)),t.dispatch(t.state.tr.setMeta(jt,{setDragging:null})))}function c(d){if(!d.which)return u(d);const h=jt.getState(t.state);if(h&&h.dragging){const f=tf(h.dragging,d,r);rf(t,h.activeHandle,f,n)}}return rf(t,o.activeHandle,l,n),s.addEventListener("mouseup",u),s.addEventListener("mousemove",c),e.preventDefault(),!0}function jy(t,e,{colspan:r,colwidth:n}){const i=n&&n[n.length-1];if(i)return i;const s=t.domAtPos(e);let a=s.node.childNodes[s.offset].offsetWidth,l=r;if(n)for(let u=0;u{const n=t.nodes[r];n.spec.tableRole&&(e[n.spec.tableRole]=n)}),t.cached.tableNodeTypes=e,e}function Qy(t,e,r,n,i){const s=Xy(t),o=[],a=[];for(let u=0;u{const{selection:e}=t.state;if(!ev(e))return!1;let r=0;const n=tm(e.ranges[0].$from,s=>s.type.name==="table");return n==null||n.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(r+=1)}),r===e.ranges.length?(t.commands.deleteTable(),!0):!1},tv=ye.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Yy,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:r,tableWidth:n,tableMinWidth:i}=Zy(t,this.options.cellMinWidth);return["table",Se(this.options.HTMLAttributes,e,{style:n?`width: ${n}`:`min-width: ${i}`}),r,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:r=!0}={})=>({tr:n,dispatch:i,editor:s})=>{const o=Qy(s.schema,t,e,r);if(i){const a=n.selection.from+1;n.replaceSelectionWith(o).scrollIntoView().setSelection(ee.near(n.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>py(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>my(t,e),deleteColumn:()=>({state:t,dispatch:e})=>by(t,e),addRowBefore:()=>({state:t,dispatch:e})=>vy(t,e),addRowAfter:()=>({state:t,dispatch:e})=>xy(t,e),deleteRow:()=>({state:t,dispatch:e})=>wy(t,e),deleteTable:()=>({state:t,dispatch:e})=>Dy(t,e),mergeCells:()=>({state:t,dispatch:e})=>Uh(t,e),splitCell:()=>({state:t,dispatch:e})=>Kh(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Ks("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Ks("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Ey(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Uh(t,e)?!0:Kh(t,e),setCellAttribute:(t,e)=>({state:r,dispatch:n})=>Ay(t,e)(r,n),goToNextCell:()=>({state:t,dispatch:e})=>Jh(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>Jh(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Jm(t),!0),setCellSelection:t=>({tr:e,dispatch:r})=>{if(r){const n=Ie.create(e.doc,t.anchorCell,t.headCell);e.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:_o,"Mod-Backspace":_o,Delete:_o,"Mod-Delete":_o}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Py({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Jy({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:pe(J(t,"tableRole",e))}}}),rv=ye.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");return e?[parseInt(e,10)]:null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",Se(this.options.HTMLAttributes,t),0]}}),nv=ye.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");return e?[parseInt(e,10)]:null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",Se(this.options.HTMLAttributes,t),0]}}),iv=ye.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Se(this.options.HTMLAttributes,t),0]}});class zt{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new zt(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}let vr=class e2{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new e2(r,zt.range(this,e))}};class H{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,s,o=r&&r.loc;if(o&&o.start<=o.end){var a=o.lexer.input;i=o.start,s=o.end,i===a.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=a.slice(i,s).replace(/[^]/g,"$&̲"),u;i>15?u="…"+a.slice(i-15,i):u=a.slice(0,i);var c;s+15":">","<":"<",'"':""","'":"'"},uv=/[&><"']/g;function cv(t){return String(t).replace(uv,e=>lv[e])}var t2=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},dv=function(e){var r=t2(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},hv=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},fv=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|*58|*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},ke={deflt:sv,escape:cv,hyphenate:av,getBaseElem:t2,isCharacterBox:dv,protocolFromUrl:fv},ea={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function pv(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Mc{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in ea)if(ea.hasOwnProperty(r)){var n=ea[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:pv(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new H("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=ke.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class kn{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return Or[mv[this.id]]}sub(){return Or[gv[this.id]]}fracNum(){return Or[bv[this.id]]}fracDen(){return Or[yv[this.id]]}cramp(){return Or[vv[this.id]]}text(){return Or[xv[this.id]]}isTight(){return this.size>=2}}var Ec=0,Wa=1,Hi=2,cn=3,Gs=4,rr=5,Qi=6,Mt=7,Or=[new kn(Ec,0,!1),new kn(Wa,0,!0),new kn(Hi,1,!1),new kn(cn,1,!0),new kn(Gs,2,!1),new kn(rr,2,!0),new kn(Qi,3,!1),new kn(Mt,3,!0)],mv=[Gs,rr,Gs,rr,Qi,Mt,Qi,Mt],gv=[rr,rr,rr,rr,Mt,Mt,Mt,Mt],bv=[Hi,cn,Gs,rr,Qi,Mt,Qi,Mt],yv=[cn,cn,rr,rr,Mt,Mt,Mt,Mt],vv=[Wa,Wa,cn,cn,rr,rr,Mt,Mt],xv=[Ec,Wa,Hi,cn,Hi,cn,Hi,cn],re={DISPLAY:Or[Ec],TEXT:Or[Hi],SCRIPT:Or[Gs],SCRIPTSCRIPT:Or[Qi]},wu=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function kv(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}var ta=[];wu.forEach(t=>t.blocks.forEach(e=>ta.push(...e)));function r2(t){for(var e=0;e=ta[e]&&t<=ta[e+1])return!0;return!1}var Di=80,wv=function(e,r){return"M95,"+(622+e+r)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+e/2.075+" -"+e+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+e)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Sv=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+e/2.084+" -"+e+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+e)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Cv=function(e,r){return"M983 "+(10+e+r)+`
l`+e/3.13+" -"+e+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Av=function(e,r){return"M424,"+(2398+e+r)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+e)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+`
h400000v`+(40+e)+"h-400000z"},Mv=function(e,r){return"M473,"+(2713+e+r)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},Ev=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},Tv=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`
H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},Dv=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=wv(r,Di);break;case"sqrtSize1":i=Sv(r,Di);break;case"sqrtSize2":i=Cv(r,Di);break;case"sqrtSize3":i=Av(r,Di);break;case"sqrtSize4":i=Mv(r,Di);break;case"sqrtTall":i=Tv(r,Di,n)}return i},Ov=function(e,r){switch(e){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},of={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Nv=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class ao{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(e).join("")}}var _r={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},zo={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},af={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Lv(t,e){_r[t]=e}function Tc(t,e,r){if(!_r[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=_r[e][n];if(!i&&t[0]in af&&(n=af[t[0]].charCodeAt(0),i=_r[e][n]),!i&&r==="text"&&r2(n)&&(i=_r[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var dl={};function _v(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!dl[e]){var r=dl[e]={cssEmPerMu:zo.quad[e]/18};for(var n in zo)zo.hasOwnProperty(n)&&(r[n]=zo[n][e])}return dl[e]}var zv=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],lf=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],uf=function(e,r){return r.size<2?e:zv[e-1][r.size-1]};class nn{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||nn.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=lf[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new nn(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:uf(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:lf[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=uf(nn.BASESIZE,e);return this.size===r&&this.textSize===nn.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==nn.BASESIZE?["sizing","reset-size"+this.size,"size"+nn.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=_v(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}nn.BASESIZE=6;var Su={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Rv={ex:!0,em:!0,mu:!0},n2=function(e){return typeof e!="string"&&(e=e.unit),e in Su||e in Rv||e==="ex"},qe=function(e,r){var n;if(e.unit in Su)n=Su[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new H("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},q=function(e){return+e.toFixed(4)+"em"},qn=function(e){return e.filter(r=>r).join(" ")},i2=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},s2=function(e){var r=document.createElement(e);r.className=qn(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var s=0;s/=\x00-\x1f]/,o2=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+ke.escape(qn(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=ke.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+ke.escape(n)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(Iv.test(s))throw new H("Invalid attribute name '"+s+"'");r+=" "+s+'="'+ke.escape(this.attributes[s])+'"'}r+=">";for(var o=0;o",r};class lo{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,i2.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return s2.call(this,"span")}toMarkup(){return o2.call(this,"span")}}class Dc{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,i2.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return s2.call(this,"a")}toMarkup(){return o2.call(this,"a")}}class Bv{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e='
",e}}var Fv={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class ur{constructor(e,r,n,i,s,o,a,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=r||0,this.depth=n||0,this.italic=i||0,this.skew=s||0,this.width=o||0,this.classes=a||[],this.style=l||{},this.maxFontSize=0;var u=kv(this.text.charCodeAt(0));u&&this.classes.push(u+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Fv[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=q(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=qn(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=ke.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+ke.escape(n)+'"');var s=ke.escape(this.text);return e?(r+=">",r+=s,r+="",r):s}}class pn{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i";for(var n=0;n",e}}class Vn{constructor(e,r){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=r}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",of[this.pathName]),r}toMarkup(){return this.alternate?'':''}}class Cu{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="",e}}function cf(t){if(t instanceof ur)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function Pv(t){if(t instanceof lo)return t;throw new Error("Expected span but got "+String(t)+".")}var Hv={bin:1,close:1,inner:1,open:1,punct:1,rel:1},qv={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Be={math:{},text:{}};function m(t,e,r,n,i,s){Be[t][i]={font:e,group:r,replace:n},s&&n&&(Be[t][n]=Be[t][i])}var g="math",B="text",v="main",C="ams",Pe="accent-token",K="bin",Ot="close",is="inner",te="mathord",Qe="op-token",Jt="open",v0="punct",A="rel",yn="spacing",E="textord";m(g,v,A,"≡","\\equiv",!0);m(g,v,A,"≺","\\prec",!0);m(g,v,A,"≻","\\succ",!0);m(g,v,A,"∼","\\sim",!0);m(g,v,A,"⊥","\\perp");m(g,v,A,"⪯","\\preceq",!0);m(g,v,A,"⪰","\\succeq",!0);m(g,v,A,"≃","\\simeq",!0);m(g,v,A,"∣","\\mid",!0);m(g,v,A,"≪","\\ll",!0);m(g,v,A,"≫","\\gg",!0);m(g,v,A,"≍","\\asymp",!0);m(g,v,A,"∥","\\parallel");m(g,v,A,"⋈","\\bowtie",!0);m(g,v,A,"⌣","\\smile",!0);m(g,v,A,"⊑","\\sqsubseteq",!0);m(g,v,A,"⊒","\\sqsupseteq",!0);m(g,v,A,"≐","\\doteq",!0);m(g,v,A,"⌢","\\frown",!0);m(g,v,A,"∋","\\ni",!0);m(g,v,A,"∝","\\propto",!0);m(g,v,A,"⊢","\\vdash",!0);m(g,v,A,"⊣","\\dashv",!0);m(g,v,A,"∋","\\owns");m(g,v,v0,".","\\ldotp");m(g,v,v0,"⋅","\\cdotp");m(g,v,E,"#","\\#");m(B,v,E,"#","\\#");m(g,v,E,"&","\\&");m(B,v,E,"&","\\&");m(g,v,E,"ℵ","\\aleph",!0);m(g,v,E,"∀","\\forall",!0);m(g,v,E,"ℏ","\\hbar",!0);m(g,v,E,"∃","\\exists",!0);m(g,v,E,"∇","\\nabla",!0);m(g,v,E,"♭","\\flat",!0);m(g,v,E,"ℓ","\\ell",!0);m(g,v,E,"♮","\\natural",!0);m(g,v,E,"♣","\\clubsuit",!0);m(g,v,E,"℘","\\wp",!0);m(g,v,E,"♯","\\sharp",!0);m(g,v,E,"♢","\\diamondsuit",!0);m(g,v,E,"ℜ","\\Re",!0);m(g,v,E,"♡","\\heartsuit",!0);m(g,v,E,"ℑ","\\Im",!0);m(g,v,E,"♠","\\spadesuit",!0);m(g,v,E,"§","\\S",!0);m(B,v,E,"§","\\S");m(g,v,E,"¶","\\P",!0);m(B,v,E,"¶","\\P");m(g,v,E,"†","\\dag");m(B,v,E,"†","\\dag");m(B,v,E,"†","\\textdagger");m(g,v,E,"‡","\\ddag");m(B,v,E,"‡","\\ddag");m(B,v,E,"‡","\\textdaggerdbl");m(g,v,Ot,"⎱","\\rmoustache",!0);m(g,v,Jt,"⎰","\\lmoustache",!0);m(g,v,Ot,"⟯","\\rgroup",!0);m(g,v,Jt,"⟮","\\lgroup",!0);m(g,v,K,"∓","\\mp",!0);m(g,v,K,"⊖","\\ominus",!0);m(g,v,K,"⊎","\\uplus",!0);m(g,v,K,"⊓","\\sqcap",!0);m(g,v,K,"∗","\\ast");m(g,v,K,"⊔","\\sqcup",!0);m(g,v,K,"◯","\\bigcirc",!0);m(g,v,K,"∙","\\bullet",!0);m(g,v,K,"‡","\\ddagger");m(g,v,K,"≀","\\wr",!0);m(g,v,K,"⨿","\\amalg");m(g,v,K,"&","\\And");m(g,v,A,"⟵","\\longleftarrow",!0);m(g,v,A,"⇐","\\Leftarrow",!0);m(g,v,A,"⟸","\\Longleftarrow",!0);m(g,v,A,"⟶","\\longrightarrow",!0);m(g,v,A,"⇒","\\Rightarrow",!0);m(g,v,A,"⟹","\\Longrightarrow",!0);m(g,v,A,"↔","\\leftrightarrow",!0);m(g,v,A,"⟷","\\longleftrightarrow",!0);m(g,v,A,"⇔","\\Leftrightarrow",!0);m(g,v,A,"⟺","\\Longleftrightarrow",!0);m(g,v,A,"↦","\\mapsto",!0);m(g,v,A,"⟼","\\longmapsto",!0);m(g,v,A,"↗","\\nearrow",!0);m(g,v,A,"↩","\\hookleftarrow",!0);m(g,v,A,"↪","\\hookrightarrow",!0);m(g,v,A,"↘","\\searrow",!0);m(g,v,A,"↼","\\leftharpoonup",!0);m(g,v,A,"⇀","\\rightharpoonup",!0);m(g,v,A,"↙","\\swarrow",!0);m(g,v,A,"↽","\\leftharpoondown",!0);m(g,v,A,"⇁","\\rightharpoondown",!0);m(g,v,A,"↖","\\nwarrow",!0);m(g,v,A,"⇌","\\rightleftharpoons",!0);m(g,C,A,"≮","\\nless",!0);m(g,C,A,"","\\@nleqslant");m(g,C,A,"","\\@nleqq");m(g,C,A,"⪇","\\lneq",!0);m(g,C,A,"≨","\\lneqq",!0);m(g,C,A,"","\\@lvertneqq");m(g,C,A,"⋦","\\lnsim",!0);m(g,C,A,"⪉","\\lnapprox",!0);m(g,C,A,"⊀","\\nprec",!0);m(g,C,A,"⋠","\\npreceq",!0);m(g,C,A,"⋨","\\precnsim",!0);m(g,C,A,"⪹","\\precnapprox",!0);m(g,C,A,"≁","\\nsim",!0);m(g,C,A,"","\\@nshortmid");m(g,C,A,"∤","\\nmid",!0);m(g,C,A,"⊬","\\nvdash",!0);m(g,C,A,"⊭","\\nvDash",!0);m(g,C,A,"⋪","\\ntriangleleft");m(g,C,A,"⋬","\\ntrianglelefteq",!0);m(g,C,A,"⊊","\\subsetneq",!0);m(g,C,A,"","\\@varsubsetneq");m(g,C,A,"⫋","\\subsetneqq",!0);m(g,C,A,"","\\@varsubsetneqq");m(g,C,A,"≯","\\ngtr",!0);m(g,C,A,"","\\@ngeqslant");m(g,C,A,"","\\@ngeqq");m(g,C,A,"⪈","\\gneq",!0);m(g,C,A,"≩","\\gneqq",!0);m(g,C,A,"","\\@gvertneqq");m(g,C,A,"⋧","\\gnsim",!0);m(g,C,A,"⪊","\\gnapprox",!0);m(g,C,A,"⊁","\\nsucc",!0);m(g,C,A,"⋡","\\nsucceq",!0);m(g,C,A,"⋩","\\succnsim",!0);m(g,C,A,"⪺","\\succnapprox",!0);m(g,C,A,"≆","\\ncong",!0);m(g,C,A,"","\\@nshortparallel");m(g,C,A,"∦","\\nparallel",!0);m(g,C,A,"⊯","\\nVDash",!0);m(g,C,A,"⋫","\\ntriangleright");m(g,C,A,"⋭","\\ntrianglerighteq",!0);m(g,C,A,"","\\@nsupseteqq");m(g,C,A,"⊋","\\supsetneq",!0);m(g,C,A,"","\\@varsupsetneq");m(g,C,A,"⫌","\\supsetneqq",!0);m(g,C,A,"","\\@varsupsetneqq");m(g,C,A,"⊮","\\nVdash",!0);m(g,C,A,"⪵","\\precneqq",!0);m(g,C,A,"⪶","\\succneqq",!0);m(g,C,A,"","\\@nsubseteqq");m(g,C,K,"⊴","\\unlhd");m(g,C,K,"⊵","\\unrhd");m(g,C,A,"↚","\\nleftarrow",!0);m(g,C,A,"↛","\\nrightarrow",!0);m(g,C,A,"⇍","\\nLeftarrow",!0);m(g,C,A,"⇏","\\nRightarrow",!0);m(g,C,A,"↮","\\nleftrightarrow",!0);m(g,C,A,"⇎","\\nLeftrightarrow",!0);m(g,C,A,"△","\\vartriangle");m(g,C,E,"ℏ","\\hslash");m(g,C,E,"▽","\\triangledown");m(g,C,E,"◊","\\lozenge");m(g,C,E,"Ⓢ","\\circledS");m(g,C,E,"®","\\circledR");m(B,C,E,"®","\\circledR");m(g,C,E,"∡","\\measuredangle",!0);m(g,C,E,"∄","\\nexists");m(g,C,E,"℧","\\mho");m(g,C,E,"Ⅎ","\\Finv",!0);m(g,C,E,"⅁","\\Game",!0);m(g,C,E,"‵","\\backprime");m(g,C,E,"▲","\\blacktriangle");m(g,C,E,"▼","\\blacktriangledown");m(g,C,E,"■","\\blacksquare");m(g,C,E,"⧫","\\blacklozenge");m(g,C,E,"★","\\bigstar");m(g,C,E,"∢","\\sphericalangle",!0);m(g,C,E,"∁","\\complement",!0);m(g,C,E,"ð","\\eth",!0);m(B,v,E,"ð","ð");m(g,C,E,"╱","\\diagup");m(g,C,E,"╲","\\diagdown");m(g,C,E,"□","\\square");m(g,C,E,"□","\\Box");m(g,C,E,"◊","\\Diamond");m(g,C,E,"¥","\\yen",!0);m(B,C,E,"¥","\\yen",!0);m(g,C,E,"✓","\\checkmark",!0);m(B,C,E,"✓","\\checkmark");m(g,C,E,"ℶ","\\beth",!0);m(g,C,E,"ℸ","\\daleth",!0);m(g,C,E,"ℷ","\\gimel",!0);m(g,C,E,"ϝ","\\digamma",!0);m(g,C,E,"ϰ","\\varkappa");m(g,C,Jt,"┌","\\@ulcorner",!0);m(g,C,Ot,"┐","\\@urcorner",!0);m(g,C,Jt,"└","\\@llcorner",!0);m(g,C,Ot,"┘","\\@lrcorner",!0);m(g,C,A,"≦","\\leqq",!0);m(g,C,A,"⩽","\\leqslant",!0);m(g,C,A,"⪕","\\eqslantless",!0);m(g,C,A,"≲","\\lesssim",!0);m(g,C,A,"⪅","\\lessapprox",!0);m(g,C,A,"≊","\\approxeq",!0);m(g,C,K,"⋖","\\lessdot");m(g,C,A,"⋘","\\lll",!0);m(g,C,A,"≶","\\lessgtr",!0);m(g,C,A,"⋚","\\lesseqgtr",!0);m(g,C,A,"⪋","\\lesseqqgtr",!0);m(g,C,A,"≑","\\doteqdot");m(g,C,A,"≓","\\risingdotseq",!0);m(g,C,A,"≒","\\fallingdotseq",!0);m(g,C,A,"∽","\\backsim",!0);m(g,C,A,"⋍","\\backsimeq",!0);m(g,C,A,"⫅","\\subseteqq",!0);m(g,C,A,"⋐","\\Subset",!0);m(g,C,A,"⊏","\\sqsubset",!0);m(g,C,A,"≼","\\preccurlyeq",!0);m(g,C,A,"⋞","\\curlyeqprec",!0);m(g,C,A,"≾","\\precsim",!0);m(g,C,A,"⪷","\\precapprox",!0);m(g,C,A,"⊲","\\vartriangleleft");m(g,C,A,"⊴","\\trianglelefteq");m(g,C,A,"⊨","\\vDash",!0);m(g,C,A,"⊪","\\Vvdash",!0);m(g,C,A,"⌣","\\smallsmile");m(g,C,A,"⌢","\\smallfrown");m(g,C,A,"≏","\\bumpeq",!0);m(g,C,A,"≎","\\Bumpeq",!0);m(g,C,A,"≧","\\geqq",!0);m(g,C,A,"⩾","\\geqslant",!0);m(g,C,A,"⪖","\\eqslantgtr",!0);m(g,C,A,"≳","\\gtrsim",!0);m(g,C,A,"⪆","\\gtrapprox",!0);m(g,C,K,"⋗","\\gtrdot");m(g,C,A,"⋙","\\ggg",!0);m(g,C,A,"≷","\\gtrless",!0);m(g,C,A,"⋛","\\gtreqless",!0);m(g,C,A,"⪌","\\gtreqqless",!0);m(g,C,A,"≖","\\eqcirc",!0);m(g,C,A,"≗","\\circeq",!0);m(g,C,A,"≜","\\triangleq",!0);m(g,C,A,"∼","\\thicksim");m(g,C,A,"≈","\\thickapprox");m(g,C,A,"⫆","\\supseteqq",!0);m(g,C,A,"⋑","\\Supset",!0);m(g,C,A,"⊐","\\sqsupset",!0);m(g,C,A,"≽","\\succcurlyeq",!0);m(g,C,A,"⋟","\\curlyeqsucc",!0);m(g,C,A,"≿","\\succsim",!0);m(g,C,A,"⪸","\\succapprox",!0);m(g,C,A,"⊳","\\vartriangleright");m(g,C,A,"⊵","\\trianglerighteq");m(g,C,A,"⊩","\\Vdash",!0);m(g,C,A,"∣","\\shortmid");m(g,C,A,"∥","\\shortparallel");m(g,C,A,"≬","\\between",!0);m(g,C,A,"⋔","\\pitchfork",!0);m(g,C,A,"∝","\\varpropto");m(g,C,A,"◀","\\blacktriangleleft");m(g,C,A,"∴","\\therefore",!0);m(g,C,A,"∍","\\backepsilon");m(g,C,A,"▶","\\blacktriangleright");m(g,C,A,"∵","\\because",!0);m(g,C,A,"⋘","\\llless");m(g,C,A,"⋙","\\gggtr");m(g,C,K,"⊲","\\lhd");m(g,C,K,"⊳","\\rhd");m(g,C,A,"≂","\\eqsim",!0);m(g,v,A,"⋈","\\Join");m(g,C,A,"≑","\\Doteq",!0);m(g,C,K,"∔","\\dotplus",!0);m(g,C,K,"∖","\\smallsetminus");m(g,C,K,"⋒","\\Cap",!0);m(g,C,K,"⋓","\\Cup",!0);m(g,C,K,"⩞","\\doublebarwedge",!0);m(g,C,K,"⊟","\\boxminus",!0);m(g,C,K,"⊞","\\boxplus",!0);m(g,C,K,"⋇","\\divideontimes",!0);m(g,C,K,"⋉","\\ltimes",!0);m(g,C,K,"⋊","\\rtimes",!0);m(g,C,K,"⋋","\\leftthreetimes",!0);m(g,C,K,"⋌","\\rightthreetimes",!0);m(g,C,K,"⋏","\\curlywedge",!0);m(g,C,K,"⋎","\\curlyvee",!0);m(g,C,K,"⊝","\\circleddash",!0);m(g,C,K,"⊛","\\circledast",!0);m(g,C,K,"⋅","\\centerdot");m(g,C,K,"⊺","\\intercal",!0);m(g,C,K,"⋒","\\doublecap");m(g,C,K,"⋓","\\doublecup");m(g,C,K,"⊠","\\boxtimes",!0);m(g,C,A,"⇢","\\dashrightarrow",!0);m(g,C,A,"⇠","\\dashleftarrow",!0);m(g,C,A,"⇇","\\leftleftarrows",!0);m(g,C,A,"⇆","\\leftrightarrows",!0);m(g,C,A,"⇚","\\Lleftarrow",!0);m(g,C,A,"↞","\\twoheadleftarrow",!0);m(g,C,A,"↢","\\leftarrowtail",!0);m(g,C,A,"↫","\\looparrowleft",!0);m(g,C,A,"⇋","\\leftrightharpoons",!0);m(g,C,A,"↶","\\curvearrowleft",!0);m(g,C,A,"↺","\\circlearrowleft",!0);m(g,C,A,"↰","\\Lsh",!0);m(g,C,A,"⇈","\\upuparrows",!0);m(g,C,A,"↿","\\upharpoonleft",!0);m(g,C,A,"⇃","\\downharpoonleft",!0);m(g,v,A,"⊶","\\origof",!0);m(g,v,A,"⊷","\\imageof",!0);m(g,C,A,"⊸","\\multimap",!0);m(g,C,A,"↭","\\leftrightsquigarrow",!0);m(g,C,A,"⇉","\\rightrightarrows",!0);m(g,C,A,"⇄","\\rightleftarrows",!0);m(g,C,A,"↠","\\twoheadrightarrow",!0);m(g,C,A,"↣","\\rightarrowtail",!0);m(g,C,A,"↬","\\looparrowright",!0);m(g,C,A,"↷","\\curvearrowright",!0);m(g,C,A,"↻","\\circlearrowright",!0);m(g,C,A,"↱","\\Rsh",!0);m(g,C,A,"⇊","\\downdownarrows",!0);m(g,C,A,"↾","\\upharpoonright",!0);m(g,C,A,"⇂","\\downharpoonright",!0);m(g,C,A,"⇝","\\rightsquigarrow",!0);m(g,C,A,"⇝","\\leadsto");m(g,C,A,"⇛","\\Rrightarrow",!0);m(g,C,A,"↾","\\restriction");m(g,v,E,"‘","`");m(g,v,E,"$","\\$");m(B,v,E,"$","\\$");m(B,v,E,"$","\\textdollar");m(g,v,E,"%","\\%");m(B,v,E,"%","\\%");m(g,v,E,"_","\\_");m(B,v,E,"_","\\_");m(B,v,E,"_","\\textunderscore");m(g,v,E,"∠","\\angle",!0);m(g,v,E,"∞","\\infty",!0);m(g,v,E,"′","\\prime");m(g,v,E,"△","\\triangle");m(g,v,E,"Γ","\\Gamma",!0);m(g,v,E,"Δ","\\Delta",!0);m(g,v,E,"Θ","\\Theta",!0);m(g,v,E,"Λ","\\Lambda",!0);m(g,v,E,"Ξ","\\Xi",!0);m(g,v,E,"Π","\\Pi",!0);m(g,v,E,"Σ","\\Sigma",!0);m(g,v,E,"Υ","\\Upsilon",!0);m(g,v,E,"Φ","\\Phi",!0);m(g,v,E,"Ψ","\\Psi",!0);m(g,v,E,"Ω","\\Omega",!0);m(g,v,E,"A","Α");m(g,v,E,"B","Β");m(g,v,E,"E","Ε");m(g,v,E,"Z","Ζ");m(g,v,E,"H","Η");m(g,v,E,"I","Ι");m(g,v,E,"K","Κ");m(g,v,E,"M","Μ");m(g,v,E,"N","Ν");m(g,v,E,"O","Ο");m(g,v,E,"P","Ρ");m(g,v,E,"T","Τ");m(g,v,E,"X","Χ");m(g,v,E,"¬","\\neg",!0);m(g,v,E,"¬","\\lnot");m(g,v,E,"⊤","\\top");m(g,v,E,"⊥","\\bot");m(g,v,E,"∅","\\emptyset");m(g,C,E,"∅","\\varnothing");m(g,v,te,"α","\\alpha",!0);m(g,v,te,"β","\\beta",!0);m(g,v,te,"γ","\\gamma",!0);m(g,v,te,"δ","\\delta",!0);m(g,v,te,"ϵ","\\epsilon",!0);m(g,v,te,"ζ","\\zeta",!0);m(g,v,te,"η","\\eta",!0);m(g,v,te,"θ","\\theta",!0);m(g,v,te,"ι","\\iota",!0);m(g,v,te,"κ","\\kappa",!0);m(g,v,te,"λ","\\lambda",!0);m(g,v,te,"μ","\\mu",!0);m(g,v,te,"ν","\\nu",!0);m(g,v,te,"ξ","\\xi",!0);m(g,v,te,"ο","\\omicron",!0);m(g,v,te,"π","\\pi",!0);m(g,v,te,"ρ","\\rho",!0);m(g,v,te,"σ","\\sigma",!0);m(g,v,te,"τ","\\tau",!0);m(g,v,te,"υ","\\upsilon",!0);m(g,v,te,"ϕ","\\phi",!0);m(g,v,te,"χ","\\chi",!0);m(g,v,te,"ψ","\\psi",!0);m(g,v,te,"ω","\\omega",!0);m(g,v,te,"ε","\\varepsilon",!0);m(g,v,te,"ϑ","\\vartheta",!0);m(g,v,te,"ϖ","\\varpi",!0);m(g,v,te,"ϱ","\\varrho",!0);m(g,v,te,"ς","\\varsigma",!0);m(g,v,te,"φ","\\varphi",!0);m(g,v,K,"∗","*",!0);m(g,v,K,"+","+");m(g,v,K,"−","-",!0);m(g,v,K,"⋅","\\cdot",!0);m(g,v,K,"∘","\\circ",!0);m(g,v,K,"÷","\\div",!0);m(g,v,K,"±","\\pm",!0);m(g,v,K,"×","\\times",!0);m(g,v,K,"∩","\\cap",!0);m(g,v,K,"∪","\\cup",!0);m(g,v,K,"∖","\\setminus",!0);m(g,v,K,"∧","\\land");m(g,v,K,"∨","\\lor");m(g,v,K,"∧","\\wedge",!0);m(g,v,K,"∨","\\vee",!0);m(g,v,E,"√","\\surd");m(g,v,Jt,"⟨","\\langle",!0);m(g,v,Jt,"∣","\\lvert");m(g,v,Jt,"∥","\\lVert");m(g,v,Ot,"?","?");m(g,v,Ot,"!","!");m(g,v,Ot,"⟩","\\rangle",!0);m(g,v,Ot,"∣","\\rvert");m(g,v,Ot,"∥","\\rVert");m(g,v,A,"=","=");m(g,v,A,":",":");m(g,v,A,"≈","\\approx",!0);m(g,v,A,"≅","\\cong",!0);m(g,v,A,"≥","\\ge");m(g,v,A,"≥","\\geq",!0);m(g,v,A,"←","\\gets");m(g,v,A,">","\\gt",!0);m(g,v,A,"∈","\\in",!0);m(g,v,A,"","\\@not");m(g,v,A,"⊂","\\subset",!0);m(g,v,A,"⊃","\\supset",!0);m(g,v,A,"⊆","\\subseteq",!0);m(g,v,A,"⊇","\\supseteq",!0);m(g,C,A,"⊈","\\nsubseteq",!0);m(g,C,A,"⊉","\\nsupseteq",!0);m(g,v,A,"⊨","\\models");m(g,v,A,"←","\\leftarrow",!0);m(g,v,A,"≤","\\le");m(g,v,A,"≤","\\leq",!0);m(g,v,A,"<","\\lt",!0);m(g,v,A,"→","\\rightarrow",!0);m(g,v,A,"→","\\to");m(g,C,A,"≱","\\ngeq",!0);m(g,C,A,"≰","\\nleq",!0);m(g,v,yn," ","\\ ");m(g,v,yn," ","\\space");m(g,v,yn," ","\\nobreakspace");m(B,v,yn," ","\\ ");m(B,v,yn," "," ");m(B,v,yn," ","\\space");m(B,v,yn," ","\\nobreakspace");m(g,v,yn,null,"\\nobreak");m(g,v,yn,null,"\\allowbreak");m(g,v,v0,",",",");m(g,v,v0,";",";");m(g,C,K,"⊼","\\barwedge",!0);m(g,C,K,"⊻","\\veebar",!0);m(g,v,K,"⊙","\\odot",!0);m(g,v,K,"⊕","\\oplus",!0);m(g,v,K,"⊗","\\otimes",!0);m(g,v,E,"∂","\\partial",!0);m(g,v,K,"⊘","\\oslash",!0);m(g,C,K,"⊚","\\circledcirc",!0);m(g,C,K,"⊡","\\boxdot",!0);m(g,v,K,"△","\\bigtriangleup");m(g,v,K,"▽","\\bigtriangledown");m(g,v,K,"†","\\dagger");m(g,v,K,"⋄","\\diamond");m(g,v,K,"⋆","\\star");m(g,v,K,"◃","\\triangleleft");m(g,v,K,"▹","\\triangleright");m(g,v,Jt,"{","\\{");m(B,v,E,"{","\\{");m(B,v,E,"{","\\textbraceleft");m(g,v,Ot,"}","\\}");m(B,v,E,"}","\\}");m(B,v,E,"}","\\textbraceright");m(g,v,Jt,"{","\\lbrace");m(g,v,Ot,"}","\\rbrace");m(g,v,Jt,"[","\\lbrack",!0);m(B,v,E,"[","\\lbrack",!0);m(g,v,Ot,"]","\\rbrack",!0);m(B,v,E,"]","\\rbrack",!0);m(g,v,Jt,"(","\\lparen",!0);m(g,v,Ot,")","\\rparen",!0);m(B,v,E,"<","\\textless",!0);m(B,v,E,">","\\textgreater",!0);m(g,v,Jt,"⌊","\\lfloor",!0);m(g,v,Ot,"⌋","\\rfloor",!0);m(g,v,Jt,"⌈","\\lceil",!0);m(g,v,Ot,"⌉","\\rceil",!0);m(g,v,E,"\\","\\backslash");m(g,v,E,"∣","|");m(g,v,E,"∣","\\vert");m(B,v,E,"|","\\textbar",!0);m(g,v,E,"∥","\\|");m(g,v,E,"∥","\\Vert");m(B,v,E,"∥","\\textbardbl");m(B,v,E,"~","\\textasciitilde");m(B,v,E,"\\","\\textbackslash");m(B,v,E,"^","\\textasciicircum");m(g,v,A,"↑","\\uparrow",!0);m(g,v,A,"⇑","\\Uparrow",!0);m(g,v,A,"↓","\\downarrow",!0);m(g,v,A,"⇓","\\Downarrow",!0);m(g,v,A,"↕","\\updownarrow",!0);m(g,v,A,"⇕","\\Updownarrow",!0);m(g,v,Qe,"∐","\\coprod");m(g,v,Qe,"⋁","\\bigvee");m(g,v,Qe,"⋀","\\bigwedge");m(g,v,Qe,"⨄","\\biguplus");m(g,v,Qe,"⋂","\\bigcap");m(g,v,Qe,"⋃","\\bigcup");m(g,v,Qe,"∫","\\int");m(g,v,Qe,"∫","\\intop");m(g,v,Qe,"∬","\\iint");m(g,v,Qe,"∭","\\iiint");m(g,v,Qe,"∏","\\prod");m(g,v,Qe,"∑","\\sum");m(g,v,Qe,"⨂","\\bigotimes");m(g,v,Qe,"⨁","\\bigoplus");m(g,v,Qe,"⨀","\\bigodot");m(g,v,Qe,"∮","\\oint");m(g,v,Qe,"∯","\\oiint");m(g,v,Qe,"∰","\\oiiint");m(g,v,Qe,"⨆","\\bigsqcup");m(g,v,Qe,"∫","\\smallint");m(B,v,is,"…","\\textellipsis");m(g,v,is,"…","\\mathellipsis");m(B,v,is,"…","\\ldots",!0);m(g,v,is,"…","\\ldots",!0);m(g,v,is,"⋯","\\@cdots",!0);m(g,v,is,"⋱","\\ddots",!0);m(g,v,E,"⋮","\\varvdots");m(B,v,E,"⋮","\\varvdots");m(g,v,Pe,"ˊ","\\acute");m(g,v,Pe,"ˋ","\\grave");m(g,v,Pe,"¨","\\ddot");m(g,v,Pe,"~","\\tilde");m(g,v,Pe,"ˉ","\\bar");m(g,v,Pe,"˘","\\breve");m(g,v,Pe,"ˇ","\\check");m(g,v,Pe,"^","\\hat");m(g,v,Pe,"⃗","\\vec");m(g,v,Pe,"˙","\\dot");m(g,v,Pe,"˚","\\mathring");m(g,v,te,"","\\@imath");m(g,v,te,"","\\@jmath");m(g,v,E,"ı","ı");m(g,v,E,"ȷ","ȷ");m(B,v,E,"ı","\\i",!0);m(B,v,E,"ȷ","\\j",!0);m(B,v,E,"ß","\\ss",!0);m(B,v,E,"æ","\\ae",!0);m(B,v,E,"œ","\\oe",!0);m(B,v,E,"ø","\\o",!0);m(B,v,E,"Æ","\\AE",!0);m(B,v,E,"Œ","\\OE",!0);m(B,v,E,"Ø","\\O",!0);m(B,v,Pe,"ˊ","\\'");m(B,v,Pe,"ˋ","\\`");m(B,v,Pe,"ˆ","\\^");m(B,v,Pe,"˜","\\~");m(B,v,Pe,"ˉ","\\=");m(B,v,Pe,"˘","\\u");m(B,v,Pe,"˙","\\.");m(B,v,Pe,"¸","\\c");m(B,v,Pe,"˚","\\r");m(B,v,Pe,"ˇ","\\v");m(B,v,Pe,"¨",'\\"');m(B,v,Pe,"˝","\\H");m(B,v,Pe,"◯","\\textcircled");var a2={"--":!0,"---":!0,"``":!0,"''":!0};m(B,v,E,"–","--",!0);m(B,v,E,"–","\\textendash");m(B,v,E,"—","---",!0);m(B,v,E,"—","\\textemdash");m(B,v,E,"‘","`",!0);m(B,v,E,"‘","\\textquoteleft");m(B,v,E,"’","'",!0);m(B,v,E,"’","\\textquoteright");m(B,v,E,"“","``",!0);m(B,v,E,"“","\\textquotedblleft");m(B,v,E,"”","''",!0);m(B,v,E,"”","\\textquotedblright");m(g,v,E,"°","\\degree",!0);m(B,v,E,"°","\\degree");m(B,v,E,"°","\\textdegree",!0);m(g,v,E,"£","\\pounds");m(g,v,E,"£","\\mathsterling",!0);m(B,v,E,"£","\\pounds");m(B,v,E,"£","\\textsterling",!0);m(g,C,E,"✠","\\maltese");m(B,C,E,"✠","\\maltese");var df='0123456789/@."';for(var hl=0;hl0)return mr(s,u,i,r,o.concat(c));if(l){var d,h;if(l==="boldsymbol"){var f=jv(s,i,r,o,n);d=f.fontName,h=[f.fontClass]}else a?(d=c2[l].fontName,h=[l]):(d=Fo(l,r.fontWeight,r.fontShape),h=[l,r.fontWeight,r.fontShape]);if(x0(s,d,i).metrics)return mr(s,d,i,r,o.concat(h));if(a2.hasOwnProperty(s)&&d.slice(0,10)==="Typewriter"){for(var p=[],b=0;b{if(qn(t.classes)!==qn(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},Kv=t=>{for(var e=0;er&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},_t=function(e,r,n,i){var s=new lo(e,r,n,i);return Oc(s),s},l2=(t,e,r,n)=>new lo(t,e,r,n),Gv=function(e,r,n){var i=_t([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=q(i.height),i.maxFontSize=1,i},Jv=function(e,r,n,i){var s=new Dc(e,r,n,i);return Oc(s),s},u2=function(e){var r=new ao(e);return Oc(r),r},Yv=function(e,r){return e instanceof ao?_t([],[e],r):e},Zv=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,s=i,o=1;o{var r=_t(["mspace"],[],e),n=qe(t,e);return r.style.marginRight=q(n),r},Fo=function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var s;return r==="textbf"&&n==="textit"?s="BoldItalic":r==="textbf"?s="Bold":r==="textit"?s="Italic":s="Regular",i+"-"+s},c2={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},d2={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ex=function(e,r){var[n,i,s]=d2[e],o=new Vn(n),a=new pn([o],{width:q(i),height:q(s),style:"width:"+q(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=l2(["overlay"],[a],r);return l.height=s,l.style.height=q(s),l.style.width=q(i),l},N={fontMap:c2,makeSymbol:mr,mathsym:$v,makeSpan:_t,makeSvgSpan:l2,makeLineSpan:Gv,makeAnchor:Jv,makeFragment:u2,wrapFragment:Yv,makeVList:Xv,makeOrd:Wv,makeGlue:Qv,staticSvg:ex,svgData:d2,tryCombineChars:Kv},He={number:3,unit:"mu"},ti={number:4,unit:"mu"},Qr={number:5,unit:"mu"},tx={mord:{mop:He,mbin:ti,mrel:Qr,minner:He},mop:{mord:He,mop:He,mrel:Qr,minner:He},mbin:{mord:ti,mop:ti,mopen:ti,minner:ti},mrel:{mord:Qr,mop:Qr,mopen:Qr,minner:Qr},mopen:{},mclose:{mop:He,mbin:ti,mrel:Qr,minner:He},mpunct:{mord:He,mop:He,mrel:Qr,mopen:He,mclose:He,mpunct:He,minner:He},minner:{mord:He,mop:He,mbin:ti,mrel:Qr,mopen:He,mpunct:He,minner:He}},rx={mord:{mop:He},mop:{mord:He,mop:He},mbin:{},mrel:{},mopen:{},mclose:{mop:He},mpunct:{},minner:{mop:He}},h2={},Ka={},Ga={};function W(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:s,mathmlBuilder:o}=t,a={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l{var y=b.classes[0],x=p.classes[0];y==="mbin"&&ix.includes(x)?b.classes[0]="mord":x==="mbin"&&nx.includes(y)&&(p.classes[0]="mord")},{node:d},h,f),gf(s,(p,b)=>{var y=Mu(b),x=Mu(p),S=y&&x?p.hasClass("mtight")?rx[y][x]:tx[y][x]:null;if(S)return N.makeGlue(S,u)},{node:d},h,f),s},gf=function t(e,r,n,i,s){i&&e.push(i);for(var o=0;oh=>{e.splice(d+1,0,h),o++})(o)}i&&e.pop()},f2=function(e){return e instanceof ao||e instanceof Dc||e instanceof lo&&e.hasClass("enclosing")?e:null},ax=function t(e,r){var n=f2(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},Mu=function(e,r){return e?(r&&(e=ax(e,r)),ox[e.classes[0]]||null):null},Js=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return mn(r.concat(n))},xe=function(e,r,n){if(!e)return mn();if(Ka[e.type]){var i=Ka[e.type](e,r);if(n&&r.size!==n.size){i=mn(r.sizingClasses(n),[i],r);var s=r.sizeMultiplier/n.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new H("Got group of unknown type: '"+e.type+"'")};function Po(t,e){var r=mn(["base"],t,e),n=mn(["strut"]);return n.style.height=q(r.height+r.depth),r.depth&&(n.style.verticalAlign=q(-r.depth)),r.children.unshift(n),r}function Eu(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=nt(t,e,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var s=[],o=[],a=0;a0&&(s.push(Po(o,e)),o=[]),s.push(n[a]));o.length>0&&s.push(Po(o,e));var u;r?(u=Po(nt(r,e,!0)),u.classes=["tag"],s.push(u)):i&&s.push(i);var c=mn(["katex-html"],s);if(c.setAttribute("aria-hidden","true"),u){var d=u.children[0];d.style.height=q(c.height+c.depth),c.depth&&(d.style.verticalAlign=q(-c.depth))}return c}function p2(t){return new ao(t)}class Wt{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=qn(this.classes));for(var n=0;n0&&(e+=' class ="'+ke.escape(qn(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}}class zr{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ke.escape(this.toText())}toText(){return this.text}}class lx{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character=" ":e>=-.05556&&e<=-.05555?this.character=" ":e>=-.1667&&e<=-.1666?this.character=" ":e>=-.2223&&e<=-.2222?this.character=" ":e>=-.2778&&e<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",q(this.width)),e}toMarkup(){return this.character?"