1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8733],{808:(t,e,n)=>{n.d(e,{$L:()=>A,Ln:()=>m,N0:()=>T,Um:()=>M,Wg:()=>g,X9:()=>s,dL:()=>H,jP:()=>b,n9:()=>C,oM:()=>w,zy:()=>E});var r=n(10156);class i{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class o{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&o.empty)return o.empty}recover(t){let e=0,n=65535&t;if(!this.inverted)for(let t=0;t<n;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*n]+e+(t-(65535&t))/65536}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>t)break;let h=this.ranges[l+o],p=this.ranges[l+s],c=a+h;if(t<=c){let o=h?t==a?-1:t==c?1:e:e,s=a+r+(o<0?0:p);if(n)return s;let u=t==(e<0?a:c)?null:l/3+(t-a)*65536,d=t==a?2:t==c?1:4;return(e<0?t!=a:t!=c)&&(d|=8),new i(s,d,u)}r+=p-h}return n?t+r:new i(t+r,0,null)}touches(t,e){let n=0,r=65535&e,i=this.inverted?2:1,o=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let s=this.ranges[e]-(this.inverted?n:0);if(s>t)break;let l=this.ranges[e+i];if(t<=s+l&&e==3*r)return!0;n+=this.ranges[e+o]-l}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),l=o+(this.inverted?0:i),a=this.ranges[r+e],h=this.ranges[r+n];t(s,s+a,l,l+h),i+=h-a}}invert(){return new o(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?o.empty:new o(t<0?[0,-t,0]:[0,0,t])}}o.empty=new o([]);class s{constructor(t,e,n=0,r=t?t.length:0){this.mirror=e,this.from=n,this.to=r,this._maps=t||[],this.ownData=!(t||e)}get maps(){return this._maps}slice(t=0,e=this.maps.length){return new s(this._maps,this.mirror,t,e)}appendMap(t,e){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),null!=e&&this.setMirror(this._maps.length-1,e)}appendMapping(t){for(let e=0,n=this._maps.length;e<t._maps.length;e++){let r=t.getMirror(e);this.appendMap(t._maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror){for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this._maps.length+t._maps.length;e>=0;e--){let r=t.getMirror(e);this.appendMap(t._maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new s;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this._maps[n].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(t,e);if(null!=i.recover){let e=this.getMirror(n);if(null!=e&&e>n&&e<this.to){n=e,t=this._maps[e].recover(i.recover);continue}}r|=i.delInfo,t=i.pos}return n?t:new i(t,r,null)}}let l=Object.create(null);class a{getMap(){return o.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=l[e.stepType];if(!n)throw RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in l)throw RangeError("Duplicate use of step JSON ID "+t);return l[t]=e,e.prototype.jsonID=t,e}}class h{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new h(t,null)}static fail(t){return new h(null,t)}static fromReplace(t,e,n,i){try{return h.ok(t.replace(e,n,i))}catch(t){if(t instanceof r.vI)return h.fail(t.message);throw t}}}function p(t,e,n){let i=[];for(let r=0;r<t.childCount;r++){let o=t.child(r);o.content.size&&(o=o.copy(p(o.content,e,o))),o.isInline&&(o=e(o,n,r)),i.push(o)}return r.FK.fromArray(i)}class c extends a{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}
1apply(t){let e=t.slice(this.from,this.to),n=t.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new r.Ji(p(e.content,(t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t,i),e.openStart,e.openEnd);return h.fromReplace(t,this.from,this.to,o)}invert(){return new u(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new c(e.pos,n.pos,this.mark)}merge(t){return t instanceof c&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new c(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new c(e.from,e.to,t.markFromJSON(e.mark))}}a.jsonID("addMark",c);class u extends a{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new r.Ji(p(e.content,t=>t.mark(this.mark.removeFromSet(t.marks)),t),e.openStart,e.openEnd);return h.fromReplace(t,this.from,this.to,n)}invert(){return new c(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new u(e.pos,n.pos,this.mark)}merge(t){return t instanceof u&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new u(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new u(e.from,e.to,t.markFromJSON(e.mark))}}a.jsonID("removeMark",u);class d extends a{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return h.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return h.fromReplace(t,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!e.isLeaf))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;n<e.marks.length;n++)if(!e.marks[n].isInSet(t))return new d(this.pos,e.marks[n]);return new d(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new d(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new d(e.pos,t.markFromJSON(e.mark))}}a.jsonID("addNodeMark",d);class f extends a{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return h.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return h.fromReplace(t,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!e.isLeaf))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new d(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new f(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new f(e.pos,t.markFromJSON(e.mark))}}a.jsonID("removeNodeMark",f);class m extends a{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&y(t,this.from,this.to)?h.fail("Structure replace would overwrite content"):h.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new o([this.from,this.to-this.from,this.slice.size])}invert(t){return new m(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deletedAcross&&n.deletedAcross?null:new m(e.pos,Math.max(e.pos,n.pos),this.slice)}merge(t){if(!(t instanceof m)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart)if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;else{let e=this.slice.size+t.slice.size==0?r.Ji.empty:new r.Ji(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new m(t.from,this.to,e,this.structure)}{let e=this.slice.size+t.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new m(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new m(e.from,e.to,r.Ji.fromJSON(t,e.slice),!!e.structure)}}a.jsonID("replace",m);class g extends a{constructor(t,e,n,r,i,o,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(t){if(this.structure&&(y(t,this.from,this.gapFrom)||y(t,this.gapTo,this.to)))return h.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return h.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?h.fromReplace(t,this.from,this.to,n):h.fail("Content does not fit in gap")}getMap(){return new o([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new g(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||i>n.pos?null:new g(e.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new g(e.from,e.to,e.gapFrom,e.gapTo,r.Ji.fromJSON(t,e.slice),e.insert,!!e.structure)}}function y(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>
10&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let t=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,i--}}return!1}function v(t,e,n,i=n.contentMatch,o=!0){let s=t.doc.nodeAt(e),l=[],a=e+1;for(let e=0;e<s.childCount;e++){let h=s.child(e),p=a+h.nodeSize,c=i.matchType(h.type);if(c){i=c;for(let e=0;e<h.marks.length;e++)n.allowsMarkType(h.marks[e].type)||t.step(new u(a,p,h.marks[e]));if(o&&h.isText&&"pre"!=n.whitespace){let t,e=/\r?\n|\r/g,i;for(;t=e.exec(h.text);)i||(i=new r.Ji(r.FK.from(n.schema.text(" ",n.allowedMarks(h.marks))),0,0)),l.push(new m(a+t.index,a+t.index+t[0].length,i))}}else l.push(new m(a,p,r.Ji.empty));a=p}if(!i.validEnd){let e=i.fillBefore(r.FK.empty,!0);t.replace(a,a,new r.Ji(e,0,0))}for(let e=l.length-1;e>=0;e--)t.step(l[e])}function b(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),i=t.$from.index(n),o=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(i,o,e))return n;if(0==n||r.type.spec.isolating||!((0==i||r.canReplace(i,r.childCount))&&(o==r.childCount||r.canReplace(0,o))))break}return null}function w(t,e,n=null,r=t){let i=function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}(t,e),o=i&&function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let t=r;l&&t<i;t++)l=l.matchType(n.child(t).type);return l&&l.validEnd?s:null}(r,e);return o?i.map(k).concat({type:e,attrs:n}).concat(o.map(k)):null}function k(t){return{type:t,attrs:null}}function x(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let i=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(i,i+1,e.type.schema.linebreakReplacement.create())}}})}function S(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=t.mapping.slice(r).map(n+1+o);t.replaceWith(i,i+1,e.type.schema.text("\n"))}})}function E(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let t=i.depth-1,e=n-2;t>o;t--,e--){let n=i.node(t),o=i.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),l=r&&r[e+1];l&&(s=s.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[e]||n;if(!n.canReplace(o+1,n.childCount)||!a.type.validContent(s))return!1}let l=i.indexAfter(o),a=r&&r[0];return i.node(o).canReplaceWith(l,l,a?a.type:i.node(o+1).type)}function C(t,e){let n=t.resolve(e),r=n.index();return O(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function O(t,e){return!!(t&&e&&!t.isLeaf&&function(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),s=o.type==r?t.type.schema.nodes.text:o.type;if(!(n=n.matchType(s))||!t.type.allowsMarks(o.marks))return!1}return n.validEnd}(t,e))}function T(t,e,n=-1){let r=t.resolve(e);for(let t=r.depth;;t--){let i,o,s=r.index(t);if(t==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(t+1),s++,o=r.node(t).maybeChild(s)):(i=r.node(t).maybeChild(s-1),o=r.node(t+1)),i&&!i.isTextblock&&O(i,o)&&r.node(t).canReplace(s,s+1))return e;if(0==t)break;e=n<0?r.before(t):r.after(t)}}function M(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let t=0;t<n.openStart;t++)i=i.firstChild.content;for(let t=1;t<=(0==n.openStart&&n.size?2:1);t++)for(let e=r.depth;e>=0;e--){let n=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,o=r.index(e)+ +(n>0),s=r.node(e),l=!1;if(1==t)l=s.canReplace(o,o,i);else{let t=s.contentMatchAt(o).findWrapping(i.firstChild.type);l=t&&s.canReplaceWith(o,o,t[0])}if(l)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}function A(t,e,n=e,i=r.Ji.empty){if(e==n&&!i.size)return null;let o=t.resolve(e),s=t.resolve(n);return R(o,s,i)?new m(e,n,i):new N(o,s,i).fit()}function R(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}a.jsonID("replaceAround",g);class N{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=r.FK.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=r.FK.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;let o=this.placed,s=n.depth,l=i.depth;for(;s&&l&&1==o.childCount;)o=o.firstChild.content,s--,l--;let a=new r.Ji(o,s,l);return t>-1?new g(n.pos,t,this.$to.pos,this.$to.end(),a,e):a.size||n.pos!=this.$to.pos?new m(n.pos,i.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<t;n++){let i=e.firstChild;if(e.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){t=n;break}e=i.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t,i=null,o=(n?(i=D(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let t=this.depth;t>=0;t--){let{type:s,match:l}=this.frontier[t],a,h=null;if(1==e&&(o?l.matchType(o.type)||(h=l.fillBefore(r.FK.from(o),!1)):i&&s.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:t,parent:i,inject:h};
1if(2==e&&o&&(a=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:t,parent:i,wrap:a};if(i&&l.matchType(i.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=D(t,e);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.Ji(t,e+1,Math.max(n,i.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=D(t,e);if(i.childCount<=1&&e>0){let o=t.size-e<=e+i.size;this.unplaced=new r.Ji(I(t,e-1,1),e-1,o?e-1:n)}else this.unplaced=new r.Ji(I(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:i,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let t=0;t<o.length;t++)this.openFrontierNode(o[t]);let s=this.unplaced,l=n?n.content:s.content,a=s.openStart-t,h=0,p=[],{match:c,type:u}=this.frontier[e];if(i){for(let t=0;t<i.childCount;t++)p.push(i.child(t));c=c.matchFragment(i)}let d=l.size+t-(s.content.size-s.openEnd);for(;h<l.childCount;){let t=l.child(h),e=c.matchType(t.type);if(!e)break;(++h>1||0==a||t.content.size)&&(c=e,p.push(function t(e,n,i){if(n<=0)return e;let o=e.content;return n>1&&(o=o.replaceChild(0,t(o.firstChild,n-1,1==o.childCount?i-1:0))),n>0&&(o=e.type.contentMatch.fillBefore(o).append(o),i<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.FK.empty,!0)))),e.copy(o)}(t.mark(u.allowedMarks(t.marks)),1==h?a:0,h==l.childCount?d:-1)))}let f=h==l.childCount;f||(d=-1),this.placed=L(this.placed,e,r.FK.from(p)),this.frontier[e].match=c,f&&d<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=l;t<d;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=f?0==t?r.Ji.empty:new r.Ji(I(s.content,t-1,1),t-1,d<0?s.openEnd:t-1):new r.Ji(I(s.content,t,h),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let t=this.frontier[this.depth],e;if(!t.type.isTextblock||!P(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],i=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),o=P(t,e,r,n,i);if(o){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],i=P(t,n,r,e,!0);if(!i||i.childCount)continue t}return{depth:e,fit:o,move:i?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=L(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=L(this.placed,this.depth,r.FK.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(r.FK.empty,!0);t.childCount&&(this.placed=L(this.placed,this.frontier.length,t))}}function I(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(I(t.firstChild.content,e-1,n)))}function L(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(L(t.lastChild.content,e-1,n)))}function D(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function P(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let l=r.fillBefore(o.content,!0,s);return l&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,o.content,s)?l:null}function z(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let r=t.start(i);if(r<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(r==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==r-1)&&n.push(i)}return n}class F extends a{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return h.fail("No node at attribute step's position");let n=Object.create(null);for(let t in e.attrs)n[t]=e.attrs[t];n[this.attr]=this.value;let i=e.type.create(n,null,e.marks);return h.fromReplace(t,this.pos,this.pos+1,new r.Ji(r.FK.from(i),0,+!e.isLeaf))}getMap(){return o.empty}invert(t){return new F(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new F(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new F(e.pos,e.attr,e.value)}}a.jsonID("attr",F);
1class j extends a{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let n in t.attrs)e[n]=t.attrs[n];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return h.ok(n)}getMap(){return o.empty}invert(t){return new j(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new j(e.attr,e.value)}}a.jsonID("docAttr",j);let B=class extends Error{};(B=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n}).prototype=Object.create(Error.prototype),B.prototype.constructor=B,B.prototype.name="TransformError";class H{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new s}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new B(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=r.Ji.empty){let i=A(this.doc,t,e,n);return i&&this.step(i),this}replaceWith(t,e,n){return this.replace(t,e,new r.Ji(r.FK.from(n),0,0))}delete(t,e){return this.replace(t,e,r.Ji.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return!function(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),s=t.doc.resolve(n);if(R(o,s,i))return t.step(new m(e,n,i));let l=z(o,t.doc.resolve(n));0==l[l.length-1]&&l.pop();let a=-(o.depth+1);l.unshift(a);for(let t=o.depth,e=o.pos-1;t>0;t--,e--){let n=o.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(t)>-1?a=t:o.before(t)==e&&l.splice(1,0,-t)}let h=l.indexOf(a),p=[],c=i.openStart;for(let t=i.content,e=0;;e++){let n=t.firstChild;if(p.push(n),e==i.openStart)break;t=n.content}for(let t=c-1;t>=0;t--){var u;let e=p[t],n=(u=e.type).spec.defining||u.spec.definingForContent;if(n&&!e.sameMarkup(o.node(Math.abs(a)-1)))c=t;else if(n||!e.type.isTextblock)break}for(let e=i.openStart;e>=0;e--){let a=(e+c+1)%(i.openStart+1),u=p[a];if(u)for(let e=0;e<l.length;e++){let p=l[(e+h)%l.length],c=!0;p<0&&(c=!1,p=-p);let d=o.node(p-1),f=o.index(p-1);if(d.canReplaceWith(f,f,u.type,u.marks))return t.replace(o.before(p),c?s.after(p):n,new r.Ji(function t(e,n,i,o,s){if(n<i){let r=e.firstChild;e=e.replaceChild(0,r.copy(t(r.content,n+1,i,o,r)))}if(n>o){let t=s.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.FK.empty,!0))}return e}(i.content,0,i.openStart,a),a,i.openEnd))}}let d=t.steps.length;for(let r=l.length-1;r>=0&&(t.replace(e,n,i),!(t.steps.length>d));r--){let t=l[r];t<0||(e=o.before(t),n=s.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return!function(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let r=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e<r.node(t).childCount)break}return null}(t.doc,e,i.type);null!=r&&(e=n=r)}t.replaceRange(e,n,new r.Ji(r.FK.from(i),0,0))}(this,t,e,n),this}deleteRange(t,e){return!function(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),o=z(r,i);for(let e=0;e<o.length;e++){let n=o[e],s=e==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return t.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return t.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return!function(t,e,n){let{$from:i,$to:o,depth:s}=e,l=i.before(s+1),a=o.after(s+1),h=l,p=a,c=r.FK.empty,u=0;for(let t=s,e=!1;t>n;t--)e||i.index(t)>0?(e=!0,c=r.FK.from(i.node(t).copy(c)),u++):h--;let d=r.FK.empty,f=0;for(let t=s,e=!1;t>n;t--)e||o.after(t+1)<o.end(t)?(e=!0,d=r.FK.from(o.node(t).copy(d)),f++):p++;t.step(new g(h,p,l,a,new r.Ji(c.append(d),u,f),c.size-u,!0))}(this,t,e),this}join(t,e=1){return!function(t,e,n){let i=null,{linebreakReplacement:o}=t.doc.type.schema,s=t.doc.resolve(e-n),l=s.node().type;if(o&&l.inlineContent){let t="pre"==l.whitespace,e=!!l.contentMatch.matchType(o);t&&!e?i=!1:!t&&e&&(i=!0)}let a=t.steps.length;if(!1===i){let r=t.doc.resolve(e+n);S(t,r.node(),r.before(),a)}l.inlineContent&&v(t,e+n-1,l,s.node().contentMatchAt(s.index()),null==i);let h=t.mapping.slice(a),p=h.map(e-n);if(t.step(new m(p,h.map(e+n,-1),r.Ji.empty,!0)),!0===i){let e=t.doc.resolve(p);x(t,e.node(),e.before(),t.steps.length)}}(this,t,e),this}wrap(t,e){return!function(t,e,n){let i=r.FK.empty;for(let t=n.length-1;t>=0;t--){if(i.size){let e=n[t].type.contentMatch.matchFragment(i);if(!e||!e.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.FK.from(n[t].type.create(n[t].attrs,i))}let o=e.start,s=e.end;t.step(new g(o,s,o,s,new r.Ji(i,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,i=null){return!function(t,e,n,i,o){if(!i.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(e,n)=>{var l,a,h;let p,c,u="function"==typeof o?o(e):o;if(e.isTextblock&&!e.hasMarkup(i,u)&&(l=t.doc,a=t.mapping.slice(s).map(n),h=i,c=(p=l.resolve(a)).index(),p.parent.canReplaceWith(c,c+1,h))){let o=null;if(i.schema.linebreakReplacement){let t="pre"==i.whitespace,e=!!i.contentMatch.matchType(i.schema.linebreakReplacement);t&&!e?o=!1:!t&&e&&(o=!0)}!1===o&&S(t,e,n,s),v(t,t.mapping.slice(s).map(n,1),i,void 0,null===o);let l=t.mapping.slice(s),a=l.map(n,1),h=l.map(n+e.nodeSize,1);return t.step(new g(a,h,a+1,h-1,new r.Ji(r.FK.from(i.create(u,null,e.marks)),0,0),1,!0)),!0===o&&x(t,e,n,s),!1}})}(this,t,e,n,i),this}setNodeMarkup(t,e,n=null,i){return!function(t,e,n,i,o){let s=t.doc.nodeAt(e);if(!s)throw RangeError("No node at given position");n||(n=s.type);let l=n.create(i,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,l);if(!n.validContent(s.content))throw RangeError("Invalid content for node type "+n.name);t.step(new g(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new r.Ji(r.FK.from(l),0,0),1,!0))}(this,t,e,n,i),this}setNodeAttribute(t,e,n){return this.step(new F(t,e,n)),this}setDocAttribute(t,e){return this.step(new j(t,e)),this}addNodeMark(t,e){return this.step(new d(t,e)),this}
1removeNodeMark(t,e){if(!(e instanceof r.CU)){let n=this.doc.nodeAt(t);if(!n)throw RangeError("No node at position "+t);if(!(e=e.isInSet(n.marks)))return this}return this.step(new f(t,e)),this}split(t,e=1,n){return!function(t,e,n=1,i){let o=t.doc.resolve(e),s=r.FK.empty,l=r.FK.empty;for(let t=o.depth,e=o.depth-n,a=n-1;t>e;t--,a--){s=r.FK.from(o.node(t).copy(s));let e=i&&i[a];l=r.FK.from(e?e.type.create(e.attrs,l):o.node(t).copy(l))}t.step(new m(e,e,new r.Ji(s.append(l),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){var r;let i,o,s,l;return r=this,s=[],l=[],r.doc.nodesBetween(t,e,(r,a,h)=>{if(!r.isInline)return;let p=r.marks;if(!n.isInSet(p)&&h.type.allowsMarkType(n.type)){let h=Math.max(a,t),d=Math.min(a+r.nodeSize,e),f=n.addToSet(p);for(let t=0;t<p.length;t++)p[t].isInSet(f)||(i&&i.to==h&&i.mark.eq(p[t])?i.to=d:s.push(i=new u(h,d,p[t])));o&&o.to==h?o.to=d:l.push(o=new c(h,d,n))}}),s.forEach(t=>r.step(t)),l.forEach(t=>r.step(t)),this}removeMark(t,e,n){var i;let o,s;return i=this,o=[],s=0,i.doc.nodesBetween(t,e,(i,l)=>{if(!i.isInline)return;s++;let a=null;if(n instanceof r.sX){let t=i.marks,e;for(;e=n.isInSet(t);)(a||(a=[])).push(e),t=e.removeFromSet(t)}else n?n.isInSet(i.marks)&&(a=[n]):a=i.marks;if(a&&a.length){let n=Math.min(l+i.nodeSize,e);for(let e=0;e<a.length;e++){let r=a[e],i;for(let t=0;t<o.length;t++){let e=o[t];e.step==s-1&&r.eq(o[t].style)&&(i=e)}i?(i.to=n,i.step=s):o.push({style:r,from:Math.max(l,t),to:n,step:s})}}}),o.forEach(t=>i.step(new u(t.from,t.to,t.style))),this}clearIncompatible(t,e,n){return v(this,t,e,n),this}}},10156:(t,e,n)=>{function r(t){this.content=t}n.d(e,{S4:()=>H,ZF:()=>G,FK:()=>i,CU:()=>a,sX:()=>F,bP:()=>S,u$:()=>k,vI:()=>h,Sj:()=>j,Ji:()=>p}),r.prototype={constructor:r,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return -1},get:function(t){var e=this.find(t);return -1==e?void 0:this.content[e+1]},update:function(t,e,n){var i=n&&n!=t?this.remove(n):this,o=i.find(t),s=i.content.slice();return -1==o?s.push(n||t,e):(s[o+1]=e,n&&(s[o]=n)),new r(s)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new r(n)},addToStart:function(t,e){return new r([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new r(n)},addBefore:function(t,e,n){var i=this.remove(e),o=i.content.slice(),s=i.find(t);return o.splice(-1==s?o.length:s,0,e,n),new r(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=r.from(t)).size?new r(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=r.from(t)).size?new r(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=r.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};class i{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;e<t.length;e++)this.size+=t[e].nodeSize}nodesBetween(t,e,n,r=0,i){for(let o=0,s=0;s<e;o++){let l=this.content[o],a=s+l.nodeSize;if(a>t&&!1!==n(l,r+s,i||null,o)&&l.content.size){let i=s+1;l.nodesBetween(Math.max(0,t-i),Math.min(l.content.size,e-i),n,r+i)}s=a}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",o=!0;return this.nodesBetween(t,e,(s,l)=>{let a=s.isText?s.text.slice(Math.max(t,l)-l,e-l):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&a||s.isTextblock)&&n&&(o?o=!1:i+=n),i+=a},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);o<t.content.length;o++)r.push(t.content[o]);return new i(r,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let i=0,o=0;o<e;i++){let s=this.content[i],l=o+s.nodeSize;l>t&&((o<t||l>e)&&(s=s.isText?s.cut(Math.max(0,t-o),Math.min(s.text.length,e-o)):s.cut(Math.max(0,t-o-1),Math.min(s.content.size,e-o-1))),n.push(s),r+=s.nodeSize),o=l}return new i(n,r)}cutByIndex(t,e){return t==e?i.empty:0==t&&e==this.content.length?this:new i(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new i(r,o)}addToStart(t){return new i([t].concat(this.content),this.size+t.no
1deSize)}addToEnd(t){return new i(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,e=0){return function t(e,n,r){for(let i=0;;i++){if(i==e.childCount||i==n.childCount)return e.childCount==n.childCount?null:r;let o=e.child(i),s=n.child(i);if(o==s){r+=o.nodeSize;continue}if(!o.sameMarkup(s))return r;if(o.isText&&o.text!=s.text){for(let t=0;o.text[t]==s.text[t];t++)r++;return r}if(o.content.size||s.content.size){let e=t(o.content,s.content,r+1);if(null!=e)return e}r+=o.nodeSize}}(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return function t(e,n,r,i){for(let o=e.childCount,s=n.childCount;;){if(0==o||0==s)return o==s?null:{a:r,b:i};let l=e.child(--o),a=n.child(--s),h=l.nodeSize;if(l==a){r-=h,i-=h;continue}if(!l.sameMarkup(a))return{a:r,b:i};if(l.isText&&l.text!=a.text){let t=0,e=Math.min(l.text.length,a.text.length);for(;t<e&&l.text[l.text.length-t-1]==a.text[a.text.length-t-1];)t++,r--,i--;return{a:r,b:i}}if(l.content.size||a.content.size){let e=t(l.content,a.content,r-1,i-1);if(e)return e}r-=h,i-=h}}(this,t,e,n)}findIndex(t,e=-1){if(0==t)return s(0,t);if(t==this.size)return s(this.content.length,t);if(t>this.size||t<0)throw RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t){if(i==t||e>0)return s(n+1,i);return s(n,r)}r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return i.empty;if(!Array.isArray(e))throw RangeError("Invalid input for Fragment.fromJSON");return new i(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return i.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new i(e||t,n)}static from(t){if(!t)return i.empty;if(t instanceof i)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new i([t],t.nodeSize);throw RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}i.empty=new i([],0);let o={index:0,offset:0};function s(t,e){return o.index=t,o.offset=e,o}function l(t,e){if(t===e)return!0;if(!(t&&"object"==typeof t)||!(e&&"object"==typeof e))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!l(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!l(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class a{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&l(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw RangeError(`There is no mark type ${e.type} in this schema`);let r=n.create(e.attrs);return n.checkAttrs(r.attrs),r}static sameSet(t,e){if(t==e)return!0;
1if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return a.none;if(t instanceof a)return[t];let e=t.slice();return e.sort((t,e)=>t.type.rank-e.type.rank),e}}a.none=[];class h extends Error{}class p{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=function t(e,n,r,i){let{index:o,offset:s}=e.findIndex(n),l=e.maybeChild(o);if(s==n||l.isText)return i&&!i.canReplace(o,o,r)?null:e.cut(0,n).append(r).append(e.cut(n));let a=t(l.content,n-s-1,r);return a&&e.replaceChild(o,l.copy(a))}(this.content,t+this.openStart,e);return n&&new p(n,this.openStart,this.openEnd)}removeBetween(t,e){return new p(function t(e,n,r){let{index:i,offset:o}=e.findIndex(n),s=e.maybeChild(i),{index:l,offset:a}=e.findIndex(r);if(o==n||s.isText){if(a!=r&&!e.child(l).isText)throw RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(r))}if(i!=l)throw RangeError("Removing non-flat range");return e.replaceChild(i,s.copy(t(s.content,n-o-1,r-o-1)))}(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return p.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new p(i.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new p(t,n,r)}}function c(t,e){if(!e.type.compatibleContent(t.type))throw new h("Cannot join "+e.type.name+" onto "+t.type.name)}function u(t,e,n){let r=t.node(n);return c(r,e.node(n)),r}function d(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function f(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(d(t.nodeAfter,r),o++));for(let t=o;t<s;t++)d(i.child(t),r);e&&e.depth==n&&e.textOffset&&d(e.nodeBefore,r)}function m(t,e){return t.type.checkContent(e),t.copy(e)}function g(t,e,n){let r=[];return f(null,t,n,r),t.depth>n&&d(m(u(t,e,n+1),g(t,e,n+1)),r),f(e,null,n,r),new i(r)}p.empty=new p(i.empty,0,0);class y{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e<t;e++)r+=n.child(e).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return a.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new k(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let e=t;;){let{index:t,offset:o}=e.content.findIndex(i),s=i-o;if(n.push(e,t,r+o),!s||(e=e.child(t)).isText)break;
1i=s-1,r+=o+1}return new y(e,n,i)}static resolveCached(t,e){let n=w.get(t);if(n)for(let t=0;t<n.elts.length;t++){let r=n.elts[t];if(r.pos==e)return r}else w.set(t,n=new v);let r=n.elts[n.i]=y.resolve(t,e);return n.i=(n.i+1)%b,r}}class v{constructor(){this.elts=[],this.i=0}}let b=12,w=new WeakMap;class k{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let x=Object.create(null);class S{constructor(t,e,n,r=a.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||i.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&l(this.attrs,e||t.defaultAttrs||x)&&a.sameSet(this.marks,n||a.none)}copy(t=null){return t==this.content?this:new S(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new S(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return p.empty;let r=this.resolve(t),i=this.resolve(e),o=n?0:r.sharedDepth(e),s=r.start(o);return new p(r.node(o).content.cut(r.pos-s,i.pos-s),r.depth-o,i.depth-o)}replace(t,e,n){var r=this.resolve(t),o=this.resolve(e);if(n.openStart>r.depth)throw new h("Inserted content deeper than insertion position");if(r.depth-n.openStart!=o.depth-n.openEnd)throw new h("Inconsistent open depths");return function t(e,n,r,o){let s=e.index(o),l=e.node(o);if(s==n.index(o)&&o<e.depth-r.openStart){let i=t(e,n,r,o+1);return l.copy(l.content.replaceChild(s,i))}if(!r.content.size)return m(l,g(e,n,o));if(r.openStart||r.openEnd||e.depth!=o||n.depth!=o){let{start:t,end:s}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let t=n-1;t>=0;t--)r=e.node(t).copy(i.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(r,e);return m(l,function t(e,n,r,o,s){let l=e.depth>s&&u(e,n,s+1),a=o.depth>s&&u(r,o,s+1),h=[];return f(null,e,s,h),l&&a&&n.index(s)==r.index(s)?(c(l,a),d(m(l,t(e,n,r,o,s+1)),h)):(l&&d(m(l,g(e,n,s+1)),h),f(n,r,s,h),a&&d(m(a,g(r,o,s+1)),h)),f(o,null,s,h),new i(h)}(e,t,s,n,o))}{let t=e.parent,i=t.content;return m(t,i.cut(0,e.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(r,o,n,0)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(!(e=e.maybeChild(n)))return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return y.resolveCached(this,t)}resolveNoCache(t){return y.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,t=>(n.isInSet(t.marks)&&(r=!0),!r)),r}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}
1toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),C(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=i.empty,r=0,o=n.childCount){let s=this.contentMatchAt(t).matchFragment(n,r,o),l=s&&s.matchFragment(this.content,e);if(!l||!l.validEnd)return!1;for(let t=r;t<o;t++)if(!this.type.allowsMarks(n.child(t).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(t).matchType(n),o=i&&i.matchFragment(this.content,e);return!!o&&o.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=a.none;for(let e=0;e<this.marks.length;e++){let n=this.marks[e];n.type.checkAttrs(n.attrs),t=n.addToSet(t)}if(!a.sameSet(t,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(t=>t.toJSON())),t}static fromJSON(t,e){let n;if(!e)throw RangeError("Invalid input for Node.fromJSON");if(e.marks){if(!Array.isArray(e.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=i.fromJSON(t,e.content),o=t.nodeType(e.type).create(e.attrs,r,n);return o.type.checkAttrs(o.attrs),o}}S.prototype.text=void 0;class E extends S{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):C(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new E(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new E(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function C(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class O{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){var n;let r,i=new T(t,e);if(null==i.next)return O.empty;let o=function t(e){let n=[];do n.push(function(e){let n=[];do n.push(function(e){let n=function(e){if(e.eat("(")){let n=t(e);return e.eat(")")||e.err("Missing closing paren"),n}if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=(function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let t in n){let r=n[t];r.isInGroup(e)&&i.push(r)}return 0==i.length&&t.err("No node type or group '"+e+"' found"),i})(e,e.next).map(t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}}(e);for(;;)if(e.eat("+"))n={type:"plus",expr:n};else if(e.eat("*"))n={type:"star",expr:n};else if(e.eat("?"))n={type:"opt",expr:n};else if(e.eat("{"))n=function(t,e){let n=M(t),r=n;return t.eat(",")&&(r="}"!=t.next?M(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}(e,n);else break;return n}(e));while(e.next&&")"!=e.next&&"|"!=e.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(e));while(e.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let s=(n=function(t){let e=[[]];return i(function t(e,o){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(t(n,o)),[]);if("seq"==e.type)for(let r=0;;r++){let s=t(e.exprs[r],o);if(r==e.exprs.length-1)return s;i(s,o=n())}else if("star"==e.type){let s=n();return r(o,s),i(t(e.expr,s),s),[r(s)]}else if("plus"==e.type){let s=n();return i(t(e.expr,o),s),i(t(e.expr,s),s),[r(s)]}else if("opt"==e.type)return[r(o)].concat(t(e.expr,o));else if("range"==e.type){let s=o;for(let r=0;r<e.min;r++){let r=n();i(t(e.expr,s),r),s=r}if(-1==e.max)i(t(e.expr,s),s);else for(let o=e.min;o<e.max;o++){let o=n();r(s,o),i(t(e.expr,s),o),s=o}return[r(s)]}else if("name"==e.type)return[r(o,void 0,e.value)];else throw Error("Unknown expr type")}(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach(t=>t.to=e)}}(o),r=Object.create(null),function t(e){let i=[];e.forEach(t=>{n[t].forEach(({term:t,to:e})=>{let r;if(t){for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);
1R(n,e).forEach(e=>{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)})}})});let o=r[e.join(",")]=new O(e.indexOf(n.length-1)>-1);for(let e=0;e<i.length;e++){let n=i[e][1].sort(A);o.next.push({type:i[e][0],next:r[n.join(",")]||t(n)})}return o}(R(n,0)));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,o=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,i),s}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!(e.isText||e.hasRequiredAttrs()))return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function o(s,l){let a=s.matchFragment(t,n);if(a&&(!e||a.validEnd))return i.from(l.map(t=>t.createAndFill()));for(let t=0;t<s.next.length;t++){let{type:e,next:n}=s.next[t];if(!(e.isText||e.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let t=o(n,l.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<i.next.length;t++){let{type:o,next:s}=i.next[t];o.isLeaf||o.hasRequiredAttrs()||o.name in e||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),e[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return!function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n<e.next.length;n++)r+=(n?", ":"")+e.next[n].type.name+"->"+t.indexOf(e.next[n].next);return r}).join("\n")}}O.empty=new O(!0);class T{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw SyntaxError(t+" (in content expression '"+this.string+"')")}}function M(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function A(t,e){return e-t}function R(t,e){let n=[];return function e(r){let i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(let t=0;t<i.length;t++){let{term:r,to:o}=i[t];r||-1!=n.indexOf(o)||e(o)}}(e),n.sort(A)}function N(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function I(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(void 0===i){let e=t[r];if(e.hasDefault)i=e.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function L(t,e,n,r){for(let r in e)if(!(r in t))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in t){let r=t[n];r.validate&&r.validate(e[n])}}function D(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new z(t,r,e[r]);return n}class P{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=D(t,n.attrs),this.defaultAttrs=N(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==O.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:I(this.attrs,t)}create(t=null,e,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new S(this,this.computeAttrs(t),i.from(e),a.setFrom(n))}createChecked(t=null,e,n){return e=i.from(e),this.checkContent(e),new S(this,this.computeAttrs(t),e,a.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=i.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),o=r&&r.fillBefore(i.empty,!0);return o?new S(this,t,e.append(o),a.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e<t.childCount;e++)if(!this.allowsMarks(t.child(e).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){L(this.attrs,t,"node",this.name)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){let e;if(null==this.markSet)return t;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:a.none:t}static compile(t,e){let n=Object.create(null);t.forEach((t,r)=>n[t]=new P(t,e,r));let r=e.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");
1if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class z{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(t,e,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}(t,e,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class F{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=D(t,r.attrs),this.excluded=null;let i=N(this.attrs);this.instance=i?new a(this,i):null}create(t=null){return!t&&this.instance?this.instance:new a(this,I(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach((t,i)=>n[t]=new F(t,r++,e,i)),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}checkAttrs(t){L(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class j{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let n in t)e[n]=t[n];e.nodes=r.from(t.nodes),e.marks=r.from(t.marks||{}),this.nodes=P.compile(this.spec.nodes,this),this.marks=F.compile(this.spec.marks,this);let n=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],r=e.spec.content||"",i=e.spec.marks;if(e.contentMatch=n[r]||(n[r]=O.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==i?null:i?B(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:B(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else if(t instanceof P){if(t.schema!=this)throw RangeError("Node type from different schema used ("+t.name+")")}else throw RangeError("Invalid node type: "+t);return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new E(n,n.defaultAttrs,t,a.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return S.fromJSON(this,t)}markFromJSON(t){return a.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw RangeError("Unknown node type: "+t);return e}}function B(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let e in t.marks){let r=t.marks[e];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class H{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let n=this.matchedStyles=[];e.forEach(t=>{if(null!=t.tag)this.tags.push(t);else if(null!=t.style){let e=/[^=]*/.exec(t.style)[0];0>n.indexOf(e)&&n.push(e),this.styles.push(t)}}),this.normalizeLists=!this.tags.some(e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)})}parse(t,e={}){let n=new W(this,e,!1);return n.addAll(t,a.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new W(this,e,!0);return n.addAll(t,a.none,e.from,e.to),p.maxOpen(n.finish())}matchTag(t,e,n){for(let o=n?this.tags.indexOf(n)+1:0;o<this.tags.length;o++){var r,i;let n=this.tags[o];if(r=t,i=n.tag,(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,i)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs
1){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(0==o.indexOf(t)&&(!r.context||n.matchesContext(r.context))&&(!(o.length>t.length)||61==o.charCodeAt(t.length)&&o.slice(t.length+1)==e)){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let e in t.marks){let r=t.marks[e].spec.parseDOM;r&&r.forEach(t=>{n(t=U(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)})}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach(t=>{n(t=U(t)),t.node||t.ignore||t.mark||(t.node=e)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new H(t,H.schemaRules(t)))}}let J={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},$={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},K={ol:!0,ul:!0};function V(t,e,n){return null!=e?+!!e|2*("full"===e):t&&"pre"==t.whitespace?3:-5&n}class _{constructor(t,e,n,r,i,o){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=a.none,this.match=i||(4&o?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(i.from(t));if(e)this.match=this.type.contentMatch.matchFragment(e);else{let e=this.type.contentMatch,n;
1return(n=e.findWrapping(t.type))?(this.match=e,n):null}}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t=this.content[this.content.length-1],e;t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))&&(t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=t.withText(t.text.slice(0,t.text.length-e[0].length)))}let e=i.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!J.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class W{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=e.topNode,i,o=V(null,e.preserveWhitespace,0)|4*!!n;i=r?new _(r.type,r.attrs,a.none,!0,e.topMatch||r.type.contentMatch,o):n?new _(null,null,a.none,!0,null,o):new _(t.schema.topNodeType,null,a.none,!0,null,o),this.nodes=[i],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0;if("full"===i||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(i)n="full"!==i?n.replace(/\r?\n|\r/g," "):n.replace(/\r\n?/g,"\n");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let e=r.content[r.content.length-1],i=t.previousSibling;
1(!e||i&&"BR"==i.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),e),this.findInText(t)}else this.findInside(t)}addElement(t,e,n){let r=this.localPreserveWS,i=this.top;("PRE"==t.tagName||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let o=t.nodeName.toLowerCase(),s;K.hasOwnProperty(o)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&K.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,n));e:if(l?l.ignore:$.hasOwnProperty(o))this.findInside(t),this.ignoreFallback(t,e);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let n,r=this.needsBlock;if(J.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);break e}let s=l&&l.skip?e:this.readStyles(t,e);s&&this.addAll(t,s),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(t,e);n&&this.addElementByRule(t,l,n,!1===l.consuming?s:void 0)}this.localPreserveWS=r}leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"),e)}ignoreFallback(t,e){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),e)}readStyles(t,e){let n=t.style;if(n&&n.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let r=this.parser.matchedStyles[t],i=n.getPropertyValue(r);if(i)for(let t;;){let n=this.parser.matchStyle(r,i,this,t);if(!n)break;if(n.ignore)return null;if(e=n.clearMark?e.filter(t=>!n.clearMark(t)):e.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)t=n;else break}}return e}addElementByRule(t,e,n,r){let i,o;if(e.node)if((o=this.parser.schema.nodes[e.node]).isLeaf)this.insertNode(o.create(e.attrs),n)||this.leafFallback(t,n);else{let t=this.enter(o,e.attrs||null,n,e.preserveWhitespace);t&&(i=!0,n=t)}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(t=>this.insertNode(t,n));else{let r=t;"string"==typeof e.contentElement?r=t.querySelector(e.contentElement):"function"==typeof e.contentElement?r=e.contentElement(t):e.contentElement&&(r=e.contentElement),this.findAround(t,r,!0),this.addAll(r,n),this.findAround(t,r,!1)}i&&this.sync(s)&&this.open--}addAll(t,e,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,s=null==r?null:t.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o,e);this.findAtPoint(t,i)}findPlace(t,e){let n,r;for(let e=this.open;e>=0;e--){let i=this.nodes[e],o=i.findWrapping(t);if(o&&(!n||n.length>o.length)&&(n=o,r=i,!o.length)||i.solid)break}if(!n)return null;this.sync(r);for(let t=0;t<n.length;t++)e=this.enterInner(n[t],null,e,!1);return e}insertNode(t,e){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let n=this.findPlace(t,e);if(n){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let r=a.none;for(let i of n.concat(t.marks))(e.type?e.type.allowsMarkType(i.type):q(i.type,t.type))&&(r=i.addToSet(r));return e.content.push(t.mark(r)),!0}return!1}enter(t,e,n,r){let i=this.findPlace(t.create(e),n);return i&&(i=this.enterInner(t,e,n,!0,r)),i}enterInner(t,e,n,r=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(t);let s=V(t,i,o.options);4&o.options&&0==o.content.length&&(s|=4);let l=a.none;return n=n.filter(e=>(o.type?!o.type.allowsMarkType(e.type):!q(e.type,t))||(l=e.addToSet(l),!1)),this.nodes.push(new _(t,e,l,r,null,s)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;else this.localPreserveWS&&(this.nodes[e].options|=1);return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)&&e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,o=(t,s)=>{for(;t>=0;t--){let l=e[t];if(""==l){if(t==e.length-1||0==t)continue;for(;s>=i;s--)if(o(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!t||t.name!=l&&!t.isInGroup(l))return!1;s--}}return!0};return o(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;
1if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}}function U(t){let e={};for(let n in t)e[n]=t[n];return e}function q(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=t=>{o.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e||0>o.indexOf(i)&&s(i))return!0}};if(s(i.contentMatch))return!0}}class G{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=X(e).createDocumentFragment());let r=n,i=[];return t.forEach(t=>{if(i.length||t.marks.length){let n=0,o=0;for(;n<i.length&&o<t.marks.length;){let e=t.marks[o];if(!this.marks[e.type.name]){o++;continue}if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<t.marks.length;){let n=t.marks[o++],s=this.serializeMark(n,t.isInline,e);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))}),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=Z(X(e),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&Z(X(n),r(t,e),null,t.attrs)}static renderSpec(t,e,n=null,r){return Z(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new G(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=Y(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return Y(t.marks)}}function Y(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function X(t){return t.document||window.document}let Q=new WeakMap;function Z(t,e,n,r){let i,o,s;if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let l=e[0],a;if("string"!=typeof l)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(o=Q.get(r))&&Q.set(r,(s=null,function t(e){if(e&&"object"==typeof e)if(Array.isArray(e))if("string"==typeof e[0])s||(s=[]),s.push(e);else for(let n=0;n<e.length;n++)t(e[n]);else for(let n in e)t(e[n])}(r),o=s)),a=o)&&a.indexOf(e)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let h=l.indexOf(" ");h>0&&(n=l.slice(0,h),l=l.slice(h+1));let p=n?t.createElementNS(n,l):t.createElement(l),c=e[1],u=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){for(let t in u=2,c)if(null!=c[t]){let e=t.indexOf(" ");e>0?p.setAttributeNS(t.slice(0,e),t.slice(e+1),c[t]):p.setAttribute(t,c[t])}}for(let o=u;o<e.length;o++){let s=e[o];if(0===s){if(o<e.length-1||o>u)throw RangeError("Content hole must be the only child of its parent node");return{dom:p,contentDOM:p}}{let{dom:e,contentDOM:o}=Z(t,s,n,r);if(p.appendChild(e),o){if(i)throw RangeError("Multiple content holes");i=o}}}return{dom:p,contentDOM:i}}},36645:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});let r=n(88229)._(n(67357));function i(t,e){var n;let i={};"function"==typeof t&&(i.loader=t);let o={...i,...e};return(0,r.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},52571:(t,e,n)=>{n.d(e,{$t:()=>S,LN:()=>s,U3:()=>p,hs:()=>T,i5:()=>f,k_:()=>E,nh:()=>u});var r=n(10156),i=n(808);let o=Object.create(null);class s{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new l(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=r.Ji.empty){let n=e.content.lastChild,i=null;for(let t=0;t<e.openEnd;t++)i=n,n=n.lastChild;let o=t.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:h}=s[l],p=t.mapping.slice(o);t.replaceRange(p.map(a.pos),p.map(h.pos),l?r.Ji.empty:e),0==l&&y(t,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],l=t.mapping.slice(n),a=l.map(o.pos),h=l.map(s.pos);i?t.deleteRange(a,h):(t.replaceRangeWith(a,h,e),y(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new p(t):g(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let r=t.depth-1;r>=0;r--){let i=e<0?g(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):g(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(i)return i}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new f(t.
1node(0))}static atStart(t){return g(t,t,0,0,1)||new f(t)}static atEnd(t){return g(t,t,t.content.size,t.childCount,-1)||new f(t)}static fromJSON(t,e){if(!e||!e.type)throw RangeError("Invalid input for Selection.fromJSON");let n=o[e.type];if(!n)throw RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in o)throw RangeError("Duplicate use of selection JSON ID "+t);return o[t]=e,e.prototype.jsonID=t,e}getBookmark(){return p.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class l{constructor(t,e){this.$from=t,this.$to=e}}let a=!1;function h(t){a||t.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class p extends s{constructor(t,e=t){h(t),h(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=t.resolve(e.map(this.anchor));return new p(r.parent.inlineContent?r:n,n)}replace(t,e=r.Ji.empty){if(super.replace(t,e),e==r.Ji.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof p&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new c(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new p(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if((!n||r)&&(n=r>=0?1:-1),!e.parent.inlineContent){let t=s.findFrom(e,n,!0)||s.findFrom(e,-n,!0);if(!t)return s.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r?t=e:(t=(s.findFrom(t,-n,!0)||s.findFrom(t,n,!0)).$anchor).pos<e.pos==r<0||(t=e)),new p(t,e)}}s.jsonID("text",p);class c{constructor(t,e){this.anchor=t,this.head=e}map(t){return new c(t.map(this.anchor),t.map(this.head))}resolve(t){return p.between(t.resolve(this.anchor),t.resolve(this.head))}}class u extends s{constructor(t){let e=t.nodeAfter;super(t,t.node(0).resolve(t.pos+e.nodeSize)),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),i=t.resolve(r);return n?s.near(i):new u(i)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(t){return t instanceof u&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new d(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new u(t.resolve(e.anchor))}static create(t,e){return new u(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}u.prototype.visible=!1,s.jsonID("node",u);class d{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new c(n,n):new d(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&u.isSelectable(n)?new u(e):s.near(e)}}class f extends s{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=r.Ji.empty){if(e==r.Ji.empty){t.delete(0,t.doc.content.size);let e=s.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new f(t)}map(t){return new f(t)}eq(t){return t instanceof f}getBookmark(){return m}}s.jsonID("all",f);let m={map(){return this},resolve:t=>new f(t)};function g(t,e,n,r,i,o=!1){if(e.inlineContent)return p.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let r=e.child(s);if(r.isAtom){if(!o&&u.isSelectable(r))return u.create(t,n-(i<0?r.nodeSize:0))}else{let e=g(t,r,n+i,i<0?r.childCount:0,i,o);if(e)return e}n+=r.nodeSize*i}return null}function y(t,e,n){let r,o=t.steps.length-1;if(o<e)return;let l=t.steps[o];(l instanceof i.Ln||l instanceof i.Wg)&&(t.mapping.maps[o].forEach((t,e,n,i)=>{null==r&&(r=i)}),t.setSelection(s.near(t.doc.resolve(r),n)))}class v extends i.dL{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return r.CU.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let i=this.storedMarks;if(!i){let t=this.doc.resolve(e);i=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function b(t,e){return e&&t?t.bind(e):t}class w{constructor(t,e,n){this.name=t,this.init=b(e.init,n),this.apply=b(e.apply,n)}}let k=[new w("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new w("selection",{init:(t,e)=>t.selection||s.atStart(e.doc),apply:t=>t.selection}),new w("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new w("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class x{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=k.slice(),e&&e.forEach(t=>{if(this.pluginsByKey[t.key])throw RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new w(t.key,t.spec.state,t))})}}class S{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}
1apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let l=r?r[o].n:0,a=r?r[o].state:this,h=l<e.length&&s.spec.appendTransaction.call(s,l?e.slice(l):e,a,n);if(h&&n.filterTransaction(h,o)){if(h.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<o?{state:n,n:e.length}:{state:this,n:0})}e.push(h),n=n.applyInner(h),i=!0}r&&(r[o]={state:n,n:e.length})}}if(!i)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let e=new S(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];e[i.name]=i.apply(t,this[i.name],this,e)}return e}get tr(){return new v(this)}static create(t){let e=new x(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new S(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new x(this.schema,t.plugins),n=e.fields,r=new S(e);for(let e=0;e<n.length;e++){let i=n[e].name;r[i]=this.hasOwnProperty(i)?this[i]:n[e].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map(t=>t.toJSON())),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],i=r.spec.state;i&&i.toJSON&&(e[n]=i.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw RangeError("Required config field 'schema' missing");let i=new x(t.schema,t.plugins),o=new S(i);return i.fields.forEach(i=>{if("doc"==i.name)o.doc=r.bP.fromJSON(t.schema,e.doc);else if("selection"==i.name)o.selection=s.fromJSON(o.doc,e.selection);else if("storedMarks"==i.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],l=s.spec.state;if(s.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,r)){o[i.name]=l.fromJSON.call(s,t,e[r],o);return}}o[i.name]=i.init(t,o)}}),o}}class E{constructor(t){this.spec=t,this.props={},t.props&&function t(e,n,r){for(let i in e){let o=e[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=t(o,n,{})),r[i]=o}return r}(t.props,this,this.props),this.key=t.key?t.key.key:O("plugin")}getState(t){return t[this.key]}}let C=Object.create(null);function O(t){return t in C?t+"$"+ ++C[t]:(C[t]=0,t+"$")}class T{constructor(t="key"){this.key=O(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},55028:(t,e,n)=>{n.d(e,{default:()=>i.a});var r=n(36645),i=n.n(r)},58292:(t,e,n)=>{n.d(e,{A:()=>ty});var r=n(4701);let i=/^\s*>\s$/,o=r.bP.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return["blockquote",(0,r.KV)(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()}}
1,addInputRules(){return[(0,r.tG)({find:i,type:this.type})]}}),s=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,a=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,h=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,p=r.CU.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&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",(0,r.KV)(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[(0,r.OX)({find:s,type:this.type}),(0,r.OX)({find:a,type:this.t
1ype})]},addPasteRules(){return[(0,r.Zc)({find:l,type:this.type}),(0,r.Zc)({find:h,type:this.type})]}}),c="textStyle",u=/^\s*([-+*])\s$/,d=r.bP.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:t}){return["ul",(0,r.KV)(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("listItem",this.editor.getAttributes(c)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=(0,r.tG)({find:u,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.tG)({find:u,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(c),editor:this.editor})),[t]}}),f=/(^|[^`])`([^`]+)`(?!`)/,m=/(^|[^`])`([^`]+)`(?!`)/g,g=r.CU.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:t}){return["code",(0,r.KV)(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[(0,r.OX)({find:f,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:m,type:this.type})]}});var y=n(52571);let v=/^```([a-z]+)?[\s\n]$/,b=/^~~~([a-z]+)?[\s\n]$/,w=r.bP.create({name:"codeBlock",addOptions:()=>({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;let{languageClassPrefix:n}=this.options,r=[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter(t=>t.startsWith(n)).map(t=>t.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:e}){return["pre",(0,r.KV)(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:()=>{let{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!!t&&e.parent.type.name===this.name&&(!!n||!e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!!o&&!!s&&t.chain().command(({tr:t})=>(t.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let s=i.after();return void 0!==s&&(r.nodeAt(s)?t.commands.command(({tr:t})=>(t.setSelection(y.LN.near(r.resolve(s))),!0)):t.commands.exitCode())}}},addInputRules(){return[(0,r.JJ)({find:v,type:this.type,getAttributes:t=>({language:t[1]})}),(0,r.JJ)({find:b,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new y.k_({key:new y.hs("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;let{tr:s,schema:l}=t.state,a=l.text(n.replace(/\r\n?/g,"\n"));return s.replaceSelectionWith(this.type.create({language:o},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(y.U3.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),k=r.bP.create({name:"doc",topNode:!0,content:"block+"});var x=n(808);class S{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}})}
1destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i;if(r){let t=n.nodeBefore,e=n.nodeAfter;if(t||e){let n=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(n){let r=n.getBoundingClientRect(),o=t?r.bottom:r.top;t&&e&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:r.left,right:r.right,top:o-this.width/2,bottom:o+this.width/2}}}}if(!i){let t=this.editorView.coordsAtPos(this.cursorPos);i={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let o=this.editorView.dom.offsetParent;if(!this.element&&(this.element=o.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),o&&(o!=document.body||"static"!=getComputedStyle(o).position)){let n=o.getBoundingClientRect();t=n.left-o.scrollLeft,e=n.top-o.scrollTop}else t=-pageXOffset,e=-pageYOffset;this.element.style.left=i.left-t+"px",this.element.style.top=i.top-e+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,e,t):r;if(e&&!i){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=(0,x.Um)(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}let E=r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(t={}){return new y.k_({view:e=>new S(e,t)})}(this.options)]}});var C=n(96770),O=n(10156),T=n(42695);class M extends y.LN{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return M.valid(n)?new M(n):y.LN.near(n)}content(){return O.Ji.empty}eq(t){return t instanceof M&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new M(t.resolve(e.pos))}getBookmark(){return new A(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let t=r.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let t=r.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}}return!0}(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,n=!1){n:for(;;){if(!n&&M.valid(t))return t;let r=t.pos,i=null;for(let n=t.depth;;n--){let o=t.node(n);if(e>0?t.indexAfter(n)<o.childCount:t.index(n)>0){i=o.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let s=t.doc.resolve(r);if(M.valid(s))return s}for(;;){let o=e>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!y.nh.isSelectable(i)){t=t.doc.resolve(r+i.nodeSize*e),n=!1;continue n}break}i=o,r+=e;let s=t.doc.resolve(r);if(M.valid(s))return s}return null}}}M.prototype.visible=!1,M.findFrom=M.findGapCursorFrom,y.LN.jsonID("gapcursor",M);class A{constructor(t){this.pos=t}map(t){return new A(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return M.valid(e)?new M(e):y.LN.near(e)}}let R=(0,C.K)({ArrowLeft:N("horiz",-1),ArrowRight:N("horiz",1),ArrowUp:N("vert",-1),ArrowDown:N("vert",1)});function N(t,e){let n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,i){let o=t.selection,s=e>0?o.$to:o.$from,l=o.empty;if(o instanceof y.U3){if(!i.endOfTextblock(n)||0==s.depth)return!1;l=!1,s=t.doc.resolve(e>0?s.after():s.before())}let a=M.findGapCursorFrom(s,e,l);return!!a&&(r&&r(t.tr.setSelection(new M(a))),!0)}}function I(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!M.valid(r))return!1;
1let i=t.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&y.nh.isSelectable(t.state.doc.nodeAt(i.inside)))&&(t.dispatch(t.state.tr.setSelection(new M(r))),!0)}function L(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof M))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=O.FK.empty;for(let t=r.length-1;t>=0;t--)i=O.FK.from(r[t].createAndFill(null,i));let o=t.state.tr.replace(n.pos,n.pos,new O.Ji(i,0,0));return o.setSelection(y.U3.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function D(t){if(!(t.selection instanceof M))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",T.zF.create(t.doc,[T.NZ.widget(t.selection.head,e,{key:"gapcursor"})])}let P=r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[new y.k_({props:{decorations:D,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&M.valid(n)?new M(n):null,handleClick:I,handleKeyDown:R,handleDOMEvents:{beforeinput
1:L}}})],extendNodeSchema(t){var e;let n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=(0,r.gk)((0,r.iI)(t,"allowGapCursor",n)))&&void 0!==e?e:null}}}),z=r.bP.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",(0,r.KV)(this.options.HTMLAttributes,t)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:t,storedMarks:i}=n;if(t.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,l=i||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{if(e&&l&&o){let e=l.filter(t=>s.includes(t.type.name));t.ensureMarks(e)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),F=r.bP.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){let n=this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>(0,r.JJ)({find:RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
1)\\s$`),type:this.type,getAttributes:{level:t}}))}});var j=function(){};j.prototype.append=function(t){return t.length?(t=j.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},j.prototype.prepend=function(t){return t.length?j.from(t).append(this):this},j.prototype.appendInner=function(t){return new H(this,t)},j.prototype.slice=function(t,e){return(void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e)?j.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},j.prototype.get=function(t){if(!(t<0)&&!(t>=this.length))return this.getInner(t)},j.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},j.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(e,n){return r.push(t(e,n))},e,n),r},j.from=function(t){return t instanceof j?t:t&&t.length?new B(t):j.empty};var B=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var i=e;i<n;i++)if(!1===t(this.values[i],r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var i=e-1;i>=n;i--)if(!1===t(this.values[i],r+i))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(j);j.empty=new B([]);var H=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var i=this.left.length;if(e<i&&!1===this.left.forEachInner(t,e,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length;if(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(t,Math.min(e,i),n,r))return!1},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(j);class J{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){let n,r,i,o;if(0==this.eventCount)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}e&&(r=(n=this.remapping(s,this.items.length)).maps.length);let l=t.tr,a=[],h=[];return this.items.forEach((t,e)=>{if(!t.step){n||(r=(n=this.remapping(s,e+1)).maps.length),r--,h.push(t);return}if(n){h.push(new $(t.map));let e=t.step.map(n.slice(r)),i;e&&l.maybeStep(e).doc&&(i=l.mapping.maps[l.mapping.maps.length-1],a.push(new $(i,void 0,void 0,a.length+h.length))),r--,i&&n.appendMap(i,r)}else l.maybeStep(t.step);if(t.selection)return i=n?t.selection.map(n.slice(r)):t.selection,o=new J(this.items.slice(0,s).append(h.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:o,transform:l,selection:i}}addTransform(t,e,n,r){var i,o;let s,l=[],a=this.eventCount,h=this.items,p=!r&&h.length?h.get(h.length-1):null;for(let n=0;n<t.steps.length;n++){let i=t.steps[n].invert(t.docs[n]),o=new $(t.mapping.maps[n],i,e),s;
1(s=p&&p.merge(o))&&(o=s,n?l.pop():h=h.slice(0,h.length-1)),l.push(o),e&&(a++,e=void 0),r||(p=o)}let c=a-n.depth;return c>V&&(i=h,o=c,i.forEach((t,e)=>{if(t.selection&&0==o--)return s=e,!1}),h=i.slice(s),a-=c),new J(h.append(l),a)}remapping(t,e){let n=new x.X9;return this.items.forEach((e,r)=>{let i=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,i)},t,e),n}addMaps(t){return 0==this.eventCount?this:new J(this.items.append(t.map(t=>new $(t))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),i=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(t=>{t.selection&&s--},r);let l=e;this.items.forEach(e=>{let r=i.getMirror(--l);if(null==r)return;o=Math.min(o,r);let a=i.maps[r];if(e.step){let o=t.steps[r].invert(t.docs[r]),h=e.selection&&e.selection.map(i.slice(l+1,r));h&&s++,n.push(new $(a,o,h))}else n.push(new $(a))},r);let a=[];for(let t=e;t<o;t++)a.push(new $(i.maps[t]));let h=new J(this.items.slice(0,r).append(a).append(n),s);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let t=0;return this.items.forEach(e=>{!e.step&&t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],i=0;return this.items.forEach((o,s)=>{if(s>=t)r.push(o),o.selection&&i++;else if(o.step){let t=o.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let l=o.selection&&o.selection.map(e.slice(n));l&&i++;let a=new $(s.invert(),t,l),h,p=r.length-1;(h=r.length&&r[p].merge(a))?r[p]=h:r.push(a)}}else o.map&&n--},this.items.length,0),new J(j.from(r.reverse()),i)}}J.empty=new J(j.empty,0);class ${constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new $(e.getMap().invert(),e,this.selection)}}}class K{constructor(t,e,n,r,i){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let V=20;function _(t){let e=[];for(let n=t.length-1;n>=0&&0==e.length;n--)t[n].forEach((t,n,r,i)=>e.push(r,i));return e}function W(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}let U=!1,q=null;function G(t){let e=t.plugins;if(q!=e){U=!1,q=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){U=!0;break}}return U}let Y=new y.hs("history"),X=new y.hs("closeHistory");function Q(t,e){return(n,r)=>{let i=Y.getState(n);if(!i||0==(t?i.undone:i.done).eventCount)return!1;if(r){let o=function(t,e,n){let r=G(e),i=Y.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),l=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),a=new K(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(s).setMeta(Y,{redo:n,historyState:a})}(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}let Z=Q(!1,!0),tt=Q(!0,!0);Q(!1,!1),Q(!0,!1);let te=r.YY.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>Z(t,e),redo:()=>({state:t,dispatch:e})=>tt(t,e)}),addProseMirrorPlugins(){return[function(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new y.k_({key:Y,state:{init:()=>new K(J.empty,J.empty,null,0,-1),apply:(e,n,r)=>(function(t,e,n,r){let i=n.getMeta(Y),o;if(i)return i.historyState;n.getMeta(X)&&(t=new K(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(Y))if(s.getMeta(Y).redo)return new K(t.done.addTransform(n,void 0,r,G(e)),t.undone,_(n.mapping.maps),t.prevTime,t.prevComposition);else return new K(t.done,t.undone.addTransform(n,void 0,r,G(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))if(o=n.getMeta("rebased"))return new K(t.done.rebased(n,o),t.undone.rebased(n,o),W(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);else return new K(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),W(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let i=n.getMeta("composition"),o=0==t.prevTime||!s&&t.prevComposition!=i&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;
1return t.mapping.maps[0].forEach((t,r)=>{for(let i=0;i<e.length;i+=2)t<=e[i+1]&&r>=e[i]&&(n=!0)}),n}(n,t.prevRanges)),l=s?W(t.prevRanges,n.mapping):_(n.mapping.maps);return new K(t.done.addTransform(n,o?e.selection.getBookmark():void 0,r,G(e)),J.empty,l,n.time,null==i?t.prevComposition:i)}})(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?Z:"historyRedo"==n?tt:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}(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()}}}),tn=r.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",(0,r.KV)(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{let{selection:n}=e,{$from:i,$to:o}=n,s=t();return 0===i.parentOffset?s.insertContentAt({from:Math.max(i.pos-1,0),to:o.pos},{type:this.name}):(0,r.BQ)(n)?s.insertContentAt(o.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:t,dispatch:e})=>{var n;if(e){let{$to:e}=t.selection,r=e.end();if(e.nodeAfter)e.nodeAfter.isTextblock?t.setSelection(y.U3.create(t.doc,e.pos+1)):e.nodeAfter.isBlock?t.setSelection(y.nh.create(t.doc,e.pos)):t.setSelection(y.U3.create(t.doc,e.pos));else{let i=null===(n=e.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();i&&(t.insert(r,i),t.setSelection(y.U3.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.jT)({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
1ype})]}}),tr=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,ti=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,to=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,ts=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,tl=r.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",(0,r.KV)(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[(0,r.OX)({find:tr,type:this.type}),(0,r.OX)({find:to,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:ti,type:this.type}),(0,r.Zc)({find:ts,type:this.type})]}}),ta=r.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.KV)(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)}}}),th="textStyle",tp=/^(\d+)\.\s$/,tc=r.bP.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){let{start:e,...n}=t;return 1===e?["ol",(0,r.KV)(this.options.HTMLAttributes,n),0]:["ol",(0,r.KV)(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("listItem",this.editor.getAttributes(th)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}}
1,addInputRules(){let t=(0,r.tG)({find:tp,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.tG)({find:tp,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(th)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}}),tu=r.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",(0,r.KV)(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),td=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,tf=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,tm=r.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",(0,r.KV)(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()}}
1,addInputRules(){return[(0,r.OX)({find:td,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:tf,type:this.type})]}}),tg=r.bP.create({name:"text",group:"inline"}),ty=r.YY.create({name:"starterKit",addExtensions(){var t,e,n,r,i,s,l,a,h,c,u,f,m,y,v,b,x,S;let C=[];return!1!==this.options.bold&&C.push(p.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.blockquote&&C.push(o.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bulletList&&C.push(d.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&C.push(g.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&C.push(w.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&C.push(k.configure(null===(s=this.options)||void 0===s?void 0:s.document)),!1!==this.options.dropcursor&&C.push(E.configure(null===(l=this.options)||void 0===l?void 0:l.dropcursor)),!1!==this.options.gapcursor&&C.push(P.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&C.push(z.configure(null===(h=this.options)||void 0===h?void 0:h.hardBreak)),!1!==this.options.heading&&C.push(F.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&C.push(te.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&C.push(tn.configure(null===(f=this.options)||void 0===f?void 0:f.horizontalRule)),!1!==this.options.italic&&C.push(tl.configure(null===(m=this.options)||void 0===m?void 0:m.italic)),!1!==this.options.listItem&&C.push(ta.configure(null===(y=this.options)||void 0===y?void 0:y.listItem)),!1!==this.options.orderedList&&C.push(tc.configure(null===(v=this.options)||void 0===v?void 0:v.orderedList)),!1!==this.options.paragraph&&C.push(tu.configure(null===(b=this.options)||void 0===b?void 0:b.paragraph)),!1!==this.options.strike&&C.push(tm.configure(null===(x=this.options)||void 0===x?void 0:x.strike)),!1!==this.options.text&&C.push(tg.configure(null===(S=this.options)||void 0===S?void 0:S.text)),C}})},61514:(t,e,n)=>{n.d(e,{$B:()=>p,Sd:()=>a,T2:()=>h});var r=n(808),i=n(10156);let o=["ol",0],s=["ul",0],l=["li",0];function a(t,e=null){return function(n,o){let{$from:s,$to:l}=n.selection,a=s.blockRange(l);if(!a)return!1;let h=o?n.tr:null;return!!function(t,e,n,o=null){let s=!1,l=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&0==e.startIndex){if(0==e.$from.index(e.depth-1))return!1;let t=a.resolve(e.start-2);l=new i.u$(t,t,e.depth),e.endIndex<e.parent.childCount&&(e=new i.u$(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),s=!0}let h=(0,r.oM)(l,n,o,e);return!!h&&(t&&function(t,e,n,o,s){let l=i.FK.empty;for(let t=n.length-1;t>=0;t--)l=i.FK.from(n[t].type.create(n[t].attrs,l));t.step(new r.Wg(e.start-2*!!o,e.end,e.start,e.end,new i.Ji(l,0,0),n.length,!0));let a=0;for(let t=0;t<n.length;t++)n[t].type==s&&(a=t+1);let h=n.length-a,p=e.start+n.length-2*!!o,c=e.parent;for(let n=e.startIndex,i=e.endIndex,o=!0;n<i;n++,o=!1)!o&&(0,r.zy)(t.doc,p,h)&&(t.split(p,h),p+=2*h),p+=c.child(n).nodeSize}(t,e,h,s,n),!0)}(h,a,t,e)&&(o&&o(h.scrollIntoView()),!0)}}function h(t){return function(e,n){let{$from:o,$to:s}=e.selection,l=o.blockRange(s,e=>e.childCount>0&&e.firstChild.type==t);return!!l&&(!n||(o.node(l.depth-1).type==t?function(t,e,n,o){let s=t.tr,l=o.end,a=o.$to.end(o.depth);l<a&&(s.step(new r.Wg(l-1,a,l,a,new i.Ji(i.FK.from(n.create(null,o.parent.copy())),1,0),1,!0)),o=new i.u$(s.doc.resolve(o.$from.pos),s.doc.resolve(a),o.depth));let h=(0,r.jP)(o);if(null==h)return!1;s.lift(o,h);let p=s.doc.resolve(s.mapping.map(l,-1)-1);return(0,r.n9)(s.doc,p.pos)&&p.nodeBefore.type==p.nodeAfter.type&&s.join(p.pos),e(s.scrollIntoView()),!0}(e,n,t,l):function(t,e,n){let o=t.tr,s=n.parent;for(let t=n.end,e=n.endIndex-1,r=n.startIndex;e>r;e--)t-=s.child(e).nodeSize,o.delete(t-1,t+1);let l=o.doc.resolve(n.start),a=l.nodeAfter;if(o.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let h=0==n.startIndex,p=n.endIndex==s.childCount,c=l.node(-1),u=l.index(-1);if(!c.canReplace(u+ +!h,u+1,a.content.append(p?i.FK.empty:i.FK.from(s))))return!1;let d=l.pos,f=d+a.nodeSize;return o.step(new r.Wg(d-+!!h,f+ +!!p,d+1,f-1,new i.Ji((h?i.FK.empty:i.FK.from(s.copy(i.FK.empty))).append(p?i.FK.empty:i.FK.from(s.copy(i.FK.empty))),+!h,+!p),+!h)),e(o.scrollIntoView()),!0}(e,n,l)))}}function p(t){return function(e,n){let{$from:o,$to:s}=e.selection,l=o.blockRange(s,e=>e.childCount>0&&e.firstChild.type==t);if(!l)return!1;let a=l.startIndex;if(0==a)return!1;let h=l.parent,p=h.child(a-1);if(p.type!=t)return!1;if(n){let o=p.lastChild&&p.lastChild.type==h.type,s=i.FK.from(o?t.create():null),a=new i.Ji(i.FK.from(t.create(null,i.FK.from(h.type.create(null,s)))),o?3:1,0),c=l.start,u=l.end;n(e.tr.step(new r.Wg(c-(o?3:1),u,c,u,a,1,!0)).scrollIntoView())}return!0}}},67357:(t,e,n)=>
1{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});let r=n(95155),i=n(12115),o=n(62146);function s(t){return{default:t&&"default"in t?t.default:t}}n(10255);let l={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},a=function(t){let e={...l,...t},n=(0,i.lazy)(()=>e.loader().then(s)),a=e.loading;function h(t){let s=a?(0,r.jsx)(a,{isLoading:!0,pastDelay:!0,error:null}):null,l=!e.ssr||!!e.loading,h=l?i.Suspense:i.Fragment,p=e.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...t})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...t})});return(0,r.jsx)(h,{...l?{fallback:s}:{},children:p})}return h.displayName="LoadableComponent",h}},70351:(t,e,n)=>{n.r(e),n.d(e,{BubbleMenu:()=>eg,CommandManager:()=>s.FQ,Editor:()=>s.KE,EditorConsumer:()=>ed,EditorContent:()=>et,EditorContext:()=>eu,EditorProvider:()=>em,Extension:()=>s.YY,FloatingMenu:()=>ey,InputRule:()=>s.fV,Mark:()=>s.CU,Node:()=>s.bP,NodePos:()=>s.PF,NodeView:()=>s.Yv,NodeViewContent:()=>ew,NodeViewWrapper:()=>ek,PasteRule:()=>s._n,PureEditorContent:()=>t9,ReactNodeView:()=>eS,ReactNodeViewContext:()=>ev,ReactNodeViewRenderer:()=>eE,ReactRenderer:()=>ex,Tracker:()=>s.JD,callOrReturn:()=>s.gk,combineTransactionSteps:()=>s.T7,createChainableState:()=>s.vq,createDocument:()=>s.ui,createNodeFromContent:()=>s.Iw,createStyleTag:()=>s.Ye,defaultBlockAt:()=>s.Wp,deleteProps:()=>s.oR,elementFromString:()=>s.WF,escapeForRegEx:()=>s.GG,extensions:()=>s.XO,findChildren:()=>s.xe,findChildrenInRange:()=>s.Nx,findDuplicates:()=>s.Ir,findParentNode:()=>s.KP,findParentNodeClosestToPos:()=>s.eL,fromString:()=>s.sH,generateHTML:()=>s.Zx,generateJSON:()=>s.yQ,generateText:()=>s.Df,getAttributes:()=>s.gu,getAttributesFromExtensions:()=>s.EP,getChangedRanges:()=>s.FF,getDebugJSON:()=>s.gp,getExtensionField:()=>s.iI,getHTMLFromFragment:()=>s.su,getMarkAttributes:()=>s.z6,getMarkRange:()=>s.ve,getMarkType:()=>s.I2,getMarksBetween:()=>s.hO,getNodeAtPosition:()=>s.fl,getNodeAttributes:()=>s.I6,getNodeType:()=>s.Pg,getRenderedAttributes:()=>s.zU,getSchema:()=>s._w,getSchemaByResolvedExtensions:()=>s.dL,getSchemaTypeByName:()=>s.wE,getSchemaTypeNameByName:()=>s.Lt,getSplittedAttributes:()=>s.X2,getText:()=>s.q4,getTextBetween:()=>s.Aj,getTextContentFromNodes:()=>s.sY,getTextSerializersFromSchema:()=>s.iR,injectExtensionAttributesToParseRule:()=>s.cS,inputRulesPlugin:()=>s.pS,isActive:()=>s.$m,isAtEndOfNode:()=>s.QN,isAtStartOfNode:()=>s.J_,isEmptyObject:()=>s.RI,isExtensionRulesEnabled:()=>s.mr,isFunction:()=>s.Tn,isList:()=>s.Lv,isMacOS:()=>s.U0,isMarkActive:()=>s._V,isNodeActive:()=>s.rU,isNodeEmpty:()=>s.Op,isNodeSelection:()=>s.BQ,isNumber:()=>s.Et,isPlainObject:()=>s.Qd,isRegExp:()=>s.gd,isString:()=>s.Kg,isTextSelection:()=>s.eE,isiOS:()=>s.OF,markInputRule:()=>s.OX,markPasteRule:()=>s.Zc,mergeAttributes:()=>s.KV,mergeDeep:()=>s.D9,minMax:()=>s.n4,nodeInputRule:()=>s.jT,nodePasteRule:()=>s.gg,objectIncludes:()=>s.Xy,pasteRulesPlugin:()=>s.Uf,posToDOMRect:()=>s.MG,removeDuplicates:()=>s.R3,resolveFocusPosition:()=>s.w0,rewriteUnknownContent:()=>s.Xt,selectionToInsertionEnd:()=>s.Ms,splitExtensions:()=>s.hK,textInputRule:()=>s.Yp,textPasteRule:()=>s.pD,textblockTypeInputRule:()=>s.JJ,useCurrentEditor:()=>ef,useEditor:()=>ec,useEditorState:()=>el,useReactNodeView:()=>eb,wrappingInputRule:()=>s.tG});var r,i,o,s=n(4701),l=n(52571);function a(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function h(t){var e=a(t).Element;return t instanceof e||t instanceof Element}function p(t){var e=a(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function c(t){if("undefined"==typeof ShadowRoot)return!1;var e=a(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}var u=Math.max,d=Math.min,f=Math.round;function m(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function g(){return!/^((?!chrome|android).)*safari/i.test(m())}function y(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&p(t)&&(i=t.offsetWidth>0&&f(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&f(r.height)/t.offsetHeight||1);
1var s=(h(t)?a(t):window).visualViewport,l=!g()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,u=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,m=r.height/o;return{width:d,height:m,top:u,right:c+d,bottom:u+m,left:c,x:c,y:u}}function v(t){var e=a(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function b(t){return t?(t.nodeName||"").toLowerCase():null}function w(t){return((h(t)?t.ownerDocument:t.document)||window.document).documentElement}function k(t){return y(w(t)).left+v(t).scrollLeft}function x(t){return a(t).getComputedStyle(t)}function S(t){var e=x(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function E(t){var e=y(t),n=t.offsetWidth,r=t.offsetHeight;return 1>=Math.abs(e.width-n)&&(n=e.width),1>=Math.abs(e.height-r)&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function C(t){return"html"===b(t)?t:t.assignedSlot||t.parentNode||(c(t)?t.host:null)||w(t)}function O(t,e){void 0===e&&(e=[]);var n,r=function t(e){return["html","body","#document"].indexOf(b(e))>=0?e.ownerDocument.body:p(e)&&S(e)?e:t(C(e))}(t),i=r===(null==(n=t.ownerDocument)?void 0:n.body),o=a(r),s=i?[o].concat(o.visualViewport||[],S(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(O(C(s)))}function T(t){return p(t)&&"fixed"!==x(t).position?t.offsetParent:null}function M(t){for(var e=a(t),n=T(t);n&&["table","td","th"].indexOf(b(n))>=0&&"static"===x(n).position;)n=T(n);return n&&("html"===b(n)||"body"===b(n)&&"static"===x(n).position)?e:n||function(t){var e=/firefox/i.test(m());if(/Trident/i.test(m())&&p(t)&&"fixed"===x(t).position)return null;var n=C(t);for(c(n)&&(n=n.host);p(n)&&0>["html","body"].indexOf(b(n));){var r=x(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}var A="bottom",R="right",N="left",I="auto",L=["top",A,R,N],D="start",P="viewport",z="popper",F=L.reduce(function(t,e){return t.concat([e+"-"+D,e+"-end"])},[]),j=[].concat(L,[I]).reduce(function(t,e){return t.concat([e,e+"-"+D,e+"-end"])},[]),B=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],H={placement:"bottom",modifiers:[],strategy:"absolute"};function J(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}var $={passive:!0};function K(t){return t.split("-")[0]}function V(t){return t.split("-")[1]}function _(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function W(t){var e,n=t.reference,r=t.element,i=t.placement,o=i?K(i):null,s=i?V(i):null,l=n.x+n.width/2-r.width/2,a=n.y+n.height/2-r.height/2;switch(o){case"top":e={x:l,y:n.y-r.height};break;case A:e={x:l,y:n.y+n.height};break;case R:e={x:n.x+n.width,y:a};break;case N:e={x:n.x-r.width,y:a};break;default:e={x:n.x,y:n.y}}var h=o?_(o):null;if(null!=h){var p="y"===h?"height":"width";switch(s){case D:e[h]=e[h]-(n[p]/2-r[p]/2);break;case"end":e[h]=e[h]+(n[p]/2-r[p]/2)}}return e}var U={top:"auto",right:"auto",bottom:"auto",left:"auto"};function q(t){var e,n,r,i,o,s,l,h=t.popper,p=t.popperRect,c=t.placement,u=t.variation,d=t.offsets,m=t.position,g=t.gpuAcceleration,y=t.adaptive,v=t.roundOffsets,b=t.isFixed,k=d.x,S=void 0===k?0:k,E=d.y,C=void 0===E?0:E,O="function"==typeof v?v({x:S,y:C}):{x:S,y:C};S=O.x,C=O.y;var T=d.hasOwnProperty("x"),I=d.hasOwnProperty("y"),L=N,D="top",P=window;if(y){var z=M(h),F="clientHeight",j="clientWidth";z===a(h)&&"static"!==x(z=w(h)).position&&"absolute"===m&&(F="scrollHeight",j="scrollWidth"),("top"===c||(c===N||c===R)&&"end"===u)&&(D=A,C-=(b&&z===P&&P.visualViewport?P.visualViewport.height:z[F])-p.height,C*=g?1:-1),(c===N||("top"===c||c===A)&&"end"===u)&&(L=R,S-=(b&&z===P&&P.visualViewport?P.visualViewport.width:z[j])-p.width,S*=g?1:-1)}var B=Object.assign({position:m},y&&U),H=!0===v?(e={x:S,y:C},n=a(h),r=e.x,i=e.y,{x:f(r*(o=n.devicePixelRatio||1))/o||0,y:f(i*o)/o||0}):{x:S,y:C};return(S=H.x,C=H.y,g)?Object.assign({},B,((l={})[D]=I?"0":"",l[L]=T?"0":"",l.transform=1>=(P.devicePixelRatio||1)?"translate("+S+"px, "+C+"px)":"translate3d("+S+"px, "+C+"px, 0)",l)):Object.assign({},B,((s={})[D]=I?C+"px":"",s[L]=T?S+"px":"",s.transform="",s))}let G={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;
1Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},i=e.elements[t];p(i)&&b(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(t){var e=r[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var r=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});p(r)&&b(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(t){r.removeAttribute(t)}))})}},requires:["computeStyles"]};var Y={left:"right",right:"left",bottom:"top",top:"bottom"};function X(t){return t.replace(/left|right|bottom|top/g,function(t){return Y[t]})}var Q={start:"end",end:"start"};function Z(t){return t.replace(/start|end/g,function(t){return Q[t]})}function tt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&c(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function te(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function tn(t,e,n){var r,i,o,s,l,p,c,d,f,m;return e===P?te(function(t,e){var n=a(t),r=w(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,h=0;if(i){o=i.width,s=i.height;var p=g();(p||!p&&"fixed"===e)&&(l=i.offsetLeft,h=i.offsetTop)}return{width:o,height:s,x:l+k(t),y:h}}(t,n)):h(e)?((r=y(e,!1,"fixed"===n)).top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r):te((i=w(t),s=w(i),l=v(i),p=null==(o=i.ownerDocument)?void 0:o.body,c=u(s.scrollWidth,s.clientWidth,p?p.scrollWidth:0,p?p.clientWidth:0),d=u(s.scrollHeight,s.clientHeight,p?p.scrollHeight:0,p?p.clientHeight:0),f=-l.scrollLeft+k(i),m=-l.scrollTop,"rtl"===x(p||s).direction&&(f+=u(s.clientWidth,p?p.clientWidth:0)-c),{width:c,height:d,x:f,y:m}))}function tr(){return{top:0,right:0,bottom:0,left:0}}function ti(t){return Object.assign({},tr(),t)}function to(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function ts(t,e){void 0===e&&(e={});var n,r,i,o,s,l,a,c=e,f=c.placement,m=void 0===f?t.placement:f,g=c.strategy,v=void 0===g?t.strategy:g,k=c.boundary,S=c.rootBoundary,E=c.elementContext,T=void 0===E?z:E,N=c.altBoundary,I=c.padding,D=void 0===I?0:I,F=ti("number"!=typeof D?D:to(D,L)),j=t.rects.popper,B=t.elements[void 0!==N&&N?T===z?"reference":z:T],H=(n=h(B)?B:B.contextElement||w(t.elements.popper),l=(s=[].concat("clippingParents"===(r=void 0===k?"clippingParents":k)?(i=O(C(n)),h(o=["absolute","fixed"].indexOf(x(n).position)>=0&&p(n)?M(n):n)?i.filter(function(t){return h(t)&&tt(t,o)&&"body"!==b(t)}):[]):[].concat(r),[void 0===S?P:S]))[0],(a=s.reduce(function(t,e){var r=tn(n,e,v);return t.top=u(r.top,t.top),t.right=d(r.right,t.right),t.bottom=d(r.bottom,t.bottom),t.left=u(r.left,t.left),t},tn(n,l,v))).width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a),J=y(t.elements.reference),$=W({reference:J,element:j,strategy:"absolute",placement:m}),K=te(Object.assign({},j,$)),V=T===z?K:J,_={top:H.top-V.top+F.top,bottom:V.bottom-H.bottom+F.bottom,left:H.left-V.left+F.left,right:V.right-H.right+F.right},U=t.modifiersData.offset;if(T===z&&U){var q=U[m];Object.keys(_).forEach(function(t){var e=[R,A].indexOf(t)>=0?1:-1,n=["top",A].indexOf(t)>=0?"y":"x";_[t]+=q[n]*e})}return _}function tl(t,e,n){return u(t,d(e,n))}function ta(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function th(t){return["top",R,A,N].some(function(e){return t[e]>=0})}var tp=function(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,r=void 0===n?[]:n,i=e.defaultOptions,o=void 0===i?H:i;return function(t,e,n){void 0===n&&(n=o);var i,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},H,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(n){var i,a,p,c,f,m="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},o,s.options,m),s.scrollParents={reference:h(t)?O(t):t.contextElement?O(t.contextElement):[],popper:O(e)};var g=(a=Object.keys(i=[].concat(r,s.options.modifiers).reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{})).map(function(t){return i[t]}),p=new Map,c=new Set,f=[],a.forEach(function(t){p.set(t.name,t)}),a.forEach(function(t){c.has(t.name)||function t(e){c.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEac
1h(function(e){if(!c.has(e)){var n=p.get(e);n&&t(n)}}),f.push(e)}(t)}),B.reduce(function(t,e){return t.concat(f.filter(function(t){return t.phase===e}))},[]));return s.orderedModifiers=g.filter(function(t){return t.enabled}),s.orderedModifiers.forEach(function(t){var e=t.name,n=t.options,r=t.effect;if("function"==typeof r){var i=r({state:s,name:e,instance:u,options:void 0===n?{}:n});l.push(i||function(){})}}),u.update()},forceUpdate:function(){if(!c){var t=s.elements,e=t.reference,n=t.popper;if(J(e,n)){s.rects={reference:(r=M(n),i="fixed"===s.options.strategy,o=p(r),m=p(r)&&(h=f((l=r.getBoundingClientRect()).width)/r.offsetWidth||1,d=f(l.height)/r.offsetHeight||1,1!==h||1!==d),g=w(r),x=y(e,m,i),C={scrollLeft:0,scrollTop:0},O={x:0,y:0},(o||!o&&!i)&&(("body"!==b(r)||S(g))&&(C=function(t){return t!==a(t)&&p(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:v(t)}(r)),p(r)?(O=y(r,!0),O.x+=r.clientLeft,O.y+=r.clientTop):g&&(O.x=k(g))),{x:x.left+C.scrollLeft-O.x,y:x.top+C.scrollTop-O.y,width:x.width,height:x.height}),popper:E(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(t){return s.modifiersData[t.name]=Object.assign({},t.data)});for(var r,i,o,l,h,d,m,g,x,C,O,T=0;T<s.orderedModifiers.length;T++){if(!0===s.reset){s.reset=!1,T=-1;continue}var A=s.orderedModifiers[T],R=A.fn,N=A.options,I=void 0===N?{}:N,L=A.name;"function"==typeof R&&(s=R({state:s,options:I,name:L,instance:u})||s)}}}},update:function(){return i||(i=new Promise(function(t){Promise.resolve().then(function(){i=void 0,t(new Promise(function(t){u.forceUpdate(),t(s)}))})})),i},destroy:function(){d(),c=!0}};if(!J(t,e))return u;function d(){l.forEach(function(t){return t()}),l=[]}return u.setOptions(n).then(function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)}),u}}({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,s=r.resize,l=void 0===s||s,h=a(e.elements.popper),p=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&p.forEach(function(t){t.addEventListener("scroll",n.update,$)}),l&&h.addEventListener("resize",n.update,$),function(){o&&p.forEach(function(t){t.removeEventListener("scroll",n.update,$)}),l&&h.removeEventListener("resize",n.update,$)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=W({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=n.adaptive,o=n.roundOffsets,s=void 0===o||o,l={placement:K(e.placement),variation:V(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,q(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:void 0===i||i,roundOffsets:s})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,q(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},G,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=void 0===i?[0,0]:i,s=j.reduce(function(t,n){var r,i,s,l,a,h;return t[n]=(r=e.rects,s=[N,"top"].indexOf(i=K(n))>=0?-1:1,a=(l="function"==typeof o?o(Object.assign({},r,{placement:n})):o)[0],h=l[1],a=a||0,h=(h||0)*s,[N,R].indexOf(i)>=0?{x:h,y:a}:{x:a,y:h}),t},{}),l=s[e.placement],a=l.x,h=l.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=h),e.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,l=void 0===s||s,a=n.fallbackPlacements,h=n.padding,p=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.flipVariations,f=void 0===d||d,m=n.allowedAutoPlacements,g=e.options.placement,y=K(g)===g,v=a||(y||!f?[X(g)]:function(t){if(K(t)===I)return[];var e=X(t);return[Z(t),e,Z(e)]}(g)),b=[g].concat(v).reduce(function(t,n){var r,i,o,s,l,a,u,d,g,y,v,b;return t.concat(K(n)===I?(i=(r={placement:n,boundary:p,rootBoundary:c,padding:h,flipVariations:f,allowedAutoPlacements:m}).placement,o=r.boundary,s=r.rootBoundary,l=r.padding,a=r.flipVariations,d=void 0===(u=r.allowedAutoPlacements)?j:u,0===(v=(y=(g=V(i))?a?F:F.filter(function(t){return V(t)===g}):L).filter(function(t){return d.indexOf(t)>=0})).length&&(v=y),Object.keys(b=v.reduce(function(t,n){return t[n]=ts(e,{placement:n,boundary:o,rootBoundary:s,padding:l})[K(n)],t},{})).sort(function(t,e){return b[t]-b[e]})):n)},[]),w=e.rects.reference,k=e.rects.popper,x=new Map,S=!0,E=b[0],C=0;C<b.length;C++){var O=b[C],T=K(O),M=V(O)===D,P=["top",A].indexOf(T)>
1=0,z=P?"width":"height",B=ts(e,{placement:O,boundary:p,rootBoundary:c,altBoundary:u,padding:h}),H=P?M?R:N:M?A:"top";w[z]>k[z]&&(H=X(H));var J=X(H),$=[];if(o&&$.push(B[T]<=0),l&&$.push(B[H]<=0,B[J]<=0),$.every(function(t){return t})){E=O,S=!1;break}x.set(O,$)}if(S)for(var _=f?3:1,W=function(t){var e=b.find(function(e){var n=x.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return E=e,"break"},U=_;U>0&&"break"!==W(U);U--);e.placement!==E&&(e.modifiersData[r]._skip=!0,e.placement=E,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=n.altAxis,s=n.boundary,l=n.rootBoundary,a=n.altBoundary,h=n.padding,p=n.tether,c=void 0===p||p,f=n.tetherOffset,m=void 0===f?0:f,g=ts(e,{boundary:s,rootBoundary:l,padding:h,altBoundary:a}),y=K(e.placement),v=V(e.placement),b=!v,w=_(y),k="x"===w?"y":"x",x=e.modifiersData.popperOffsets,S=e.rects.reference,C=e.rects.popper,O="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,T="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(x){if(void 0===i||i){var P,z="y"===w?"top":N,F="y"===w?A:R,j="y"===w?"height":"width",B=x[w],H=B+g[z],J=B-g[F],$=c?-C[j]/2:0,W=v===D?S[j]:C[j],U=v===D?-C[j]:-S[j],q=e.elements.arrow,G=c&&q?E(q):{width:0,height:0},Y=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:tr(),X=Y[z],Q=Y[F],Z=tl(0,S[j],G[j]),tt=b?S[j]/2-$-Z-X-T.mainAxis:W-Z-X-T.mainAxis,te=b?-S[j]/2+$+Z+Q+T.mainAxis:U+Z+Q+T.mainAxis,tn=e.elements.arrow&&M(e.elements.arrow),ti=tn?"y"===w?tn.clientTop||0:tn.clientLeft||0:0,to=null!=(P=null==I?void 0:I[w])?P:0,ta=tl(c?d(H,B+tt-to-ti):H,B,c?u(J,B+te-to):J);x[w]=ta,L[w]=ta-B}if(void 0!==o&&o){var th,tp,tc="x"===w?"top":N,tu="x"===w?A:R,td=x[k],tf="y"===k?"height":"width",tm=td+g[tc],tg=td-g[tu],ty=-1!==["top",N].indexOf(y),tv=null!=(tp=null==I?void 0:I[k])?tp:0,tb=ty?tm:td-S[tf]-C[tf]-tv+T.altAxis,tw=ty?td+S[tf]+C[tf]-tv-T.altAxis:tg,tk=c&&ty?(th=tl(tb,td,tw))>tw?tw:th:tl(c?tb:tm,td,c?tw:tg);x[k]=tk,L[k]=tk-td}e.modifiersData[r]=L}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=K(n.placement),a=_(l),h=[N,R].indexOf(l)>=0?"height":"width";if(o&&s){var p,c=ti("number"!=typeof(p="function"==typeof(p=i.padding)?p(Object.assign({},n.rects,{placement:n.placement})):p)?p:to(p,L)),u=E(o),d="y"===a?"top":N,f="y"===a?A:R,m=n.rects.reference[h]+n.rects.reference[a]-s[a]-n.rects.popper[h],g=s[a]-n.rects.reference[a],y=M(o),v=y?"y"===a?y.clientHeight||0:y.clientWidth||0:0,b=c[d],w=v-u[h]-c[f],k=v/2-u[h]/2+(m/2-g/2),x=tl(b,k,w);n.modifiersData[r]=((e={})[a]=x,e.centerOffset=x-k,e)}},effect:function(t){var e=t.state,n=t.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=e.elements.popper.querySelector(r)))&&tt(e.elements.popper,r)&&(e.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=ts(e,{elementContext:"reference"}),l=ts(e,{altBoundary:!0}),a=ta(s,r),h=ta(l,i,o),p=th(a),c=th(h);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:h,isReferenceHidden:p,hasPopperEscaped:c},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":c})}}]}),tc="tippy-content",tu="tippy-arrow",td="tippy-svg-arrow",tf={passive:!0,capture:!0},tm=function(){return document.body};function tg(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function ty(t,e){var n=({}).toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function tv(t,e){return"function"==typeof t?t.apply(void 0,e):t}function tb(t,e){var n;return 0===e?t:function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function tw(t){return[].concat(t)}function tk(t,e){-1===t.indexOf(e)&&t.push(e)}function tx(t){return[].slice.call(t)}function tS(t){return Object.keys(t).reduce(function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e},{})}function tE(){return document.createElement("div")}function tC(t){return["Element","Fragment"].some(function(e){return ty(t,e)})}function tO(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function tT(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function tM(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(e){t[r](e,n)})}function tA(t,e){for(var n,r=e;r;){if(t.contains(r))return!0;r=null==r.getRootNode?void 0:null==(n=r.getRootNode())?void 0:n.host}return!1}var tR={isTouch:!1},tN=0;function tI(){!tR.isTouch&&(tR.isTouch=!0,window.performance&&document.addEventListener("mousemove",tL))}function tL(){var t=performance.now();t-tN<20&&(tR.isTouch=!1,document.removeEventListener("mousemove",tL)),tN=t}function tD(){var t,e=document.activeElement;if((t=e)&&t._tippy&&t._tippy.reference===t){var n=e._tippy;e.blur&&!n.state.isVisible&&e.blur()}}var tP="undefined"!=typeof window&&"undefined"!=typeof document&&!!window.msCrypto;function tz(t){return t.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}var tF=Object.assign({appendTo:tm,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},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),tj=Object.keys(tF);function tB(t){var e=(t.plugins||[]).reduce(function(e,n){var r,i=n.name,o=n.defaultValue;return i&&(e[i]=void 0!==t[i]?t[i]:null!=(r=tF[i])?r:o),e},{});return Object.assign({},t,e)}function tH(t,e){var n,r=Object.assign({},e,{content:tv(e.content,[t])},e.ignoreAttributes?{}:((n=e.plugins)?Object.keys(tB(Object.assign({},tF,{plugins:n}))):tj).reduce(function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e},{}));return r.aria=Object.assign({},tF.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?e.interactive:r.aria.expanded,content:"auto"===r.aria.content?e.
1interactive?null:"describedby":r.aria.content},r}function tJ(t,e){t.innerHTML=e}function t$(t){var e=tE();return!0===t?e.className=tu:(e.className=td,tC(t)?e.appendChild(t):tJ(e,t)),e}function tK(t,e){tC(e.content)?(tJ(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?tJ(t,e.content):t.textContent=e.content)}function tV(t){var e=t.firstElementChild,n=tx(e.children);return{box:e,content:n.find(function(t){return t.classList.contains(tc)}),arrow:n.find(function(t){return t.classList.contains(tu)||t.classList.contains(td)}),backdrop:n.find(function(t){return t.classList.contains("tippy-backdrop")})}}function t_(t){var e=tE(),n=tE();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=tE();function i(n,r){var i=tV(e),o=i.box,s=i.content,l=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),(n.content!==r.content||n.allowHTML!==r.allowHTML)&&tK(s,t.props),r.arrow?l?n.arrow!==r.arrow&&(o.removeChild(l),o.appendChild(t$(r.arrow))):o.appendChild(t$(r.arrow)):l&&o.removeChild(l)}return r.className=tc,r.setAttribute("data-state","hidden"),tK(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props),{popper:e,onUpdate:i}}t_.$$tippy=!0;var tW=1,tU=[],tq=[];function tG(t,e){void 0===e&&(e={});var n,r=tF.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",tI,tf),window.addEventListener("blur",tD);var i=Object.assign({},e,{plugins:r}),o=(tC(n=t)?[n]:ty(n,"NodeList")?tx(n):Array.isArray(n)?n:tx(document.querySelectorAll(n))).reduce(function(t,e){var n=e&&function(t,e){var n,r,i,o,s,l,a,h,p=tH(t,Object.assign({},tF,tB(tS(e)))),c=!1,u=!1,d=!1,f=!1,m=[],g=tb(_,p.interactiveDebounce),y=tW++,v=(n=p.plugins).filter(function(t,e){return n.indexOf(t)===e}),b={id:y,reference:t,popper:tE(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(e){if(!b.state.isDestroyed){N("onBeforeUpdate",[b,e]),K();var n=b.props,r=tH(t,Object.assign({},n,tS(e),{ignoreAttributes:!0}));b.props=r,$(),n.interactiveDebounce!==r.interactiveDebounce&&(D(),g=tb(_,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?tw(n.triggerTarget).forEach(function(t){t.removeAttribute("aria-expanded")}):r.triggerTarget&&t.removeAttribute("aria-expanded"),L(),R(),x&&x(n,r),b.popperInstance&&(G(),X().forEach(function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})),N("onAfterUpdate",[b,e])}},setContent:function(t){b.setProps({content:t})},show:function(){var e=b.state.isVisible,n=b.state.isDestroyed,r=!b.state.isEnabled,i=tR.isTouch&&!b.props.touch,o=tg(b.props.duration,0,tF.duration);if(!(e||n||r||i||(h||t).hasAttribute("disabled"))&&(N("onShow",[b],!1),!1!==b.props.onShow(b))){if(b.state.isVisible=!0,T()&&(k.style.visibility="visible"),R(),j(),b.state.isMounted||(k.style.transition="none"),T()){var s,l,p,c=tV(k);tO([c.box,c.content],0)}a=function(){var t;if(b.state.isVisible&&!f){if(f=!0,k.offsetHeight,k.style.transition=b.props.moveTransition,T()&&b.props.animation){var e=tV(k),n=e.box,r=e.content;tO([n,r],o),tT([n,r],"visible")}I(),L(),tk(tq,b),null==(t=b.popperInstance)||t.forceUpdate(),N("onMount",[b]),b.props.animation&&T()&&H(o,function(){b.state.isShown=!0,N("onShown",[b])})}},l=b.props.appendTo,p=h||t,(s=b.props.interactive&&l===tm||"parent"===l?p.parentNode:tv(l,[p])).contains(k)||s.appendChild(k),b.state.isMounted=!0,G()}},hide:function(){var t=!b.state.isVisible,e=b.state.isDestroyed,n=!b.state.isEnabled,r=tg(b.props.duration,1,tF.duration);if(!t&&!e&&!n&&(N("onHide",[b],!1),!1!==b.props.onHide(b))){if(b.state.isVisible=!1,b.state.isShown=!1,f=!1,c=!1,T()&&(k.style.visibility="hidden"),D(),B(),R(!0),T()){var i,o=tV(k),s=o.box,l=o.content;b.props.animation&&(tO([s,l],r),tT([s,l],"hidden"))}
1(I(),L(),b.props.animation)?T()&&(i=b.unmount,H(r,function(){!b.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&i()})):b.unmount()}},hideWithInteractivity:function(t){M().addEventListener("mousemove",g),tk(tU,g),g(t)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){b.state.isVisible&&b.hide(),b.state.isMounted&&(Y(),X().forEach(function(t){t._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),tq=tq.filter(function(t){return t!==b}),b.state.isMounted=!1,N("onHidden",[b]))},destroy:function(){b.state.isDestroyed||(b.clearDelayTimeouts(),b.unmount(),K(),delete t._tippy,b.state.isDestroyed=!0,N("onDestroy",[b]))}};if(!p.render)return b;var w=p.render(b),k=w.popper,x=w.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+b.id,b.popper=k,t._tippy=b,k._tippy=b;var S=v.map(function(t){return t.fn(b)}),E=t.hasAttribute("aria-expanded");return $(),L(),R(),N("onCreate",[b]),p.showOnCreate&&Q(),k.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&M().addEventListener("mousemove",g)}),b;function C(){var t=b.props.touch;return Array.isArray(t)?t:[t,0]}function O(){return"hold"===C()[0]}function T(){var t;return!!(null!=(t=b.props.render)&&t.$$tippy)}function M(){var e,n,r=(h||t).parentNode;return r&&null!=(n=tw(r)[0])&&null!=(e=n.ownerDocument)&&e.body?n.ownerDocument:document}function A(t){return b.state.isMounted&&!b.state.isVisible||tR.isTouch||s&&"focus"===s.type?0:tg(b.props.delay,+!t,tF.delay)}function R(t){void 0===t&&(t=!1),k.style.pointerEvents=b.props.interactive&&!t?"":"none",k.style.zIndex=""+b.props.zIndex}function N(t,e,n){if(void 0===n&&(n=!0),S.forEach(function(n){n[t]&&n[t].apply(n,e)}),n){var r;(r=b.props)[t].apply(r,e)}}function I(){var e=b.props.aria;if(e.content){var n="aria-"+e.content,r=k.id;tw(b.props.triggerTarget||t).forEach(function(t){var e=t.getAttribute(n);if(b.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var i=e&&e.replace(r,"").trim();i?t.setAttribute(n,i):t.removeAttribute(n)}})}}function L(){!E&&b.props.aria.expanded&&tw(b.props.triggerTarget||t).forEach(function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===(h||t)?"true":"false"):e.removeAttribute("aria-expanded")})}function D(){M().removeEventListener("mousemove",g),tU=tU.filter(function(t){return t!==g})}function P(e){if(!tR.isTouch||!d&&"mousedown"!==e.type){var n=e.composedPath&&e.composedPath()[0]||e.target;if(!(b.props.interactive&&tA(k,n))){if(tw(b.props.triggerTarget||t).some(function(t){return tA(t,n)})){if(tR.isTouch||b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else N("onClickOutside",[b,e]);!0!==b.props.hideOnClick||(b.clearDelayTimeouts(),b.hide(),u=!0,setTimeout(function(){u=!1}),b.state.isMounted||B())}}}function z(){d=!0}function F(){d=!1}function j(){var t=M();t.addEventListener("mousedown",P,!0),t.addEventListener("touchend",P,tf),t.addEventListener("touchstart",F,tf),t.addEventListener("touchmove",z,tf)}function B(){var t=M();t.removeEventListener("mousedown",P,!0),t.removeEventListener("touchend",P,tf),t.removeEventListener("touchstart",F,tf),t.removeEventListener("touchmove",z,tf)}function H(t,e){var n=tV(k).box;function r(t){t.target===n&&(tM(n,"remove",r),e())}if(0===t)return e();tM(n,"remove",l),tM(n,"add",r),l=r}function J(e,n,r){void 0===r&&(r=!1),tw(b.props.triggerTarget||t).forEach(function(t){t.addEventListener(e,n,r),m.push({node:t,eventType:e,handler:n,options:r})})}function $(){O()&&(J("touchstart",V,{passive:!0}),J("touchend",W,{passive:!0})),b.props.trigger.split(/\s+/).filter(Boolean).forEach(function(t){if("manual"!==t)switch(J(t,V),t){case"mouseenter":J("mouseleave",W);break;case"focus":J(tP?"focusout":"blur",U);break;case"focusin":J("focusout",U)}})}function K(){m.forEach(function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)}),m=[]}function V(t){var e,n=!1;if(!(!b.state.isEnabled||q(t))&&!u){var r=(null==(e=s)?void 0:e.type)==="focus";s=t,h=t.currentTarget,L(),!b.state.isVisible&&ty(t,"MouseEvent")&&tU.forEac
1h(function(e){return e(t)}),"click"===t.type&&(0>b.props.trigger.indexOf("mouseenter")||c)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:Q(t),"click"===t.type&&(c=!n),n&&!r&&Z(t)}}function _(e){var n,r,i,o=e.target,s=(h||t).contains(o)||k.contains(o);("mousemove"!==e.type||!s)&&(n=X().concat(k).map(function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:p}:null}).filter(Boolean),r=e.clientX,i=e.clientY,n.every(function(t){var e=t.popperRect,n=t.popperState,o=t.props.interactiveBorder,s=n.placement.split("-")[0],l=n.modifiersData.offset;if(!l)return!0;var a="bottom"===s?l.top.y:0,h="top"===s?l.bottom.y:0,p="right"===s?l.left.x:0,c="left"===s?l.right.x:0,u=e.top-i+a>o,d=i-e.bottom-h>o,f=e.left-r+p>o,m=r-e.right-c>o;return u||d||f||m})&&(D(),Z(e)))}function W(t){if(!(q(t)||b.props.trigger.indexOf("click")>=0&&c)){if(b.props.interactive){b.hideWithInteractivity(t);return}Z(t)}}function U(e){(!(0>b.props.trigger.indexOf("focusin"))||e.target===(h||t))&&(b.props.interactive&&e.relatedTarget&&k.contains(e.relatedTarget)||Z(e))}function q(t){return!!tR.isTouch&&O()!==t.type.indexOf("touch")>=0}function G(){Y();var e=b.props,n=e.popperOptions,r=e.placement,i=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,l=T()?tV(k).arrow:null,p=o?{getBoundingClientRect:o,contextElement:o.contextElement||h||t}:t,c=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(T()){var n=tV(k).box;["placement","reference-hidden","escaped"].forEach(function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)}),e.attributes.popper={}}}}];T()&&l&&c.push({name:"arrow",options:{element:l,padding:3}}),c.push.apply(c,(null==n?void 0:n.modifiers)||[]),b.popperInstance=tp(p,k,Object.assign({},n,{placement:r,onFirstUpdate:a,modifiers:c}))}function Y(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function X(){return tx(k.querySelectorAll("[data-tippy-root]"))}function Q(t){b.clearDelayTimeouts(),t&&N("onTrigger",[b,t]),j();var e=A(!0),n=C(),i=n[0],o=n[1];tR.isTouch&&"hold"===i&&o&&(e=o),e?r=setTimeout(function(){b.show()},e):b.show()}function Z(t){if(b.clearDelayTimeouts(),N("onUntrigger",[b,t]),!b.state.isVisible){B();return}if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0)||!c){var e=A(!1);e?i=setTimeout(function(){b.state.isVisible&&b.hide()},e):o=requestAnimationFrame(function(){b.hide()})}}}(e,i);return n&&t.push(n),t},[]);return tC(t)?o[0]:o}tG.defaultProps=tF,tG.setDefaultProps=function(t){Object.keys(t).forEach(function(e){tF[e]=t[e]})},tG.currentInput=tR,Object.assign({},G,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}});var tY={clientX:0,clientY:0};tG.setDefaultProps({render:t_});class tX{constructor({editor:t,element:e,view:n,tippyOptions:r={},updateDelay:i=250,shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:t,state:e,from:n,to:r})=>{let{doc:i,selection:o}=e,{empty:l}=o,a=!i.textBetween(n,r).length&&(0,s.eE)(e.selection),h=this.element.contains(document.activeElement);return!!(t.hasFocus()||h)&&!l&&!a&&!!this.editor.isEditable},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:t})=>{var e;if(this.preventHide){this.preventHide=!1;return}!((null==t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget)))&&(null==t?void 0:t.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=t=>{this.blurHandler({event:t})},this.handleDebouncedUpdate=(t,e)=>
1{let n=!(null==e?void 0:e.selection.eq(t.state.selection)),r=!(null==e?void 0:e.doc.eq(t.state.doc));(n||r)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(t,n,r,e)},this.updateDelay))},this.updateHandler=(t,e,n,r)=>{var i,o,l;let{state:a,composing:h}=t,{selection:p}=a;if(h||!e&&!n)return;this.createTooltip();let{ranges:c}=p,u=Math.min(...c.map(t=>t.$from.pos)),d=Math.max(...c.map(t=>t.$to.pos));if(!(null===(i=this.shouldShow)||void 0===i?void 0:i.call(this,{editor:this.editor,element:this.element,view:t,state:a,oldState:r,from:u,to:d}))){this.hide();return}null===(o=this.tippy)||void 0===o||o.setProps({getReferenceClientRect:(null===(l=this.tippyOptions)||void 0===l?void 0:l.getReferenceClientRect)||(()=>{if((0,s.BQ)(a.selection)){let e=t.nodeDOM(u);if(e){let t=e.dataset.nodeViewWrapper?e:e.querySelector("[data-node-view-wrapper]");if(t&&(e=t.firstChild),e)return e.getBoundingClientRect()}}return(0,s.MG)(t,u,d)})}),this.show()},this.editor=t,this.element=e,this.view=n,this.updateDelay=i,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){let{element:t}=this.editor.options,e=!!t.parentElement;!this.tippy&&e&&(this.tippy=tG(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,e){let{state:n}=t,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(t,e);return}let i=!(null==e?void 0:e.selection.eq(t.state.selection)),o=!(null==e?void 0:e.doc.eq(t.state.doc));this.updateHandler(t,i,o,e)}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;(null===(t=this.tippy)||void 0===t?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}let tQ=t=>new l.k_({key:"string"==typeof t.pluginKey?new l.hs(t.pluginKey):t.pluginKey,view:e=>new tX({view:e,...t})});s.YY.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[tQ({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});var tZ=n(12115),t0=n(47650);class t1{getTextContent(t){return(0,s.q4)(t,{textSerializers:(0,s.iR)(this.editor.schema)})}constructor({editor:t,element:e,view:n,tippyOptions:r={},shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:t,state:e})=>{let{selection:n}=e,{$anchor:r,empty:i}=n,o=1===r.depth,s=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent&&0===r.parent.childCount&&!this.getTextContent(r.parent);return!!t.hasFocus()&&!!i&&!!o&&!!s&&!!this.editor.isEditable},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:t})=>{var e;if(this.preventHide){this.preventHide=!1;return}!((null==t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget)))&&(null==t?void 0:t.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=t=>{this.blurHandler({event:t})},this.editor=t,this.element=e,this.view=n,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){let{element:t}=this.editor.options,e=!!t.parentElement;!this.tippy&&e&&(this.tippy=tG(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,e){var n,r,i;let{state:o}=t,{doc:l,selection:a}=o,{from:h,to:p}=a;if(!(e&&e.doc.eq(l)&&e.selection.eq(a))){if(this.createTooltip(),!(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:t,state:o,oldState:e}))){this.hide();return}null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(i=this.tippyOptions)||void 0===i?void 0:i.getReferenceClientRect)||(()=>(0,s.MG)(t,h,p))}),this.show()}}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;(null===(t=this.tippy)||void 0===t?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}let t2=t=>new l.k_({key:"string"==typeof t.pluginKey?new l.hs(t.pluginKey):t.pluginKey,view:e=>
1new t1({view:e,...t})});s.YY.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[t2({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});var t3={exports:{}},t5={};t3.exports=function(){if(i)return t5;i=1;var t="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},e=tZ.useState,n=tZ.useEffect,r=tZ.useLayoutEffect,o=tZ.useDebugValue;function s(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!t(e,r)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,i){var l=i(),a=e({inst:{value:l,getSnapshot:i}}),h=a[0].inst,p=a[1];return r(function(){h.value=l,h.getSnapshot=i,s(h)&&p({inst:h})},[t,l,i]),n(function(){return s(h)&&p({inst:h}),t(function(){s(h)&&p({inst:h})})},[t]),o(l),l};return t5.useSyncExternalStore=void 0!==tZ.useSyncExternalStore?tZ.useSyncExternalStore:l,t5}();var t4=t3.exports;let t6=(...t)=>e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})},t7=({contentComponent:t})=>{let e=t4.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return tZ.createElement(tZ.Fragment,null,Object.values(e))};class t9 extends tZ.Component{constructor(t){var e;super(t),this.editorContentRef=tZ.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null===(e=t.editor)||void 0===e?void 0:e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;let e=this.editorContentRef.current;e.append(...t.options.element.childNodes),t.setOptions({element:e}),t.contentComponent=function(){let t=new Set,e={};return{subscribe:e=>(t.add(e),()=>{t.delete(e)}),getSnapshot:()=>e,getServerSnapshot:()=>e,setRenderer(n,r){e={...e,[n]:t0.createPortal(r.reactElement,r.element,n)},t.forEach(t=>t())},removeRenderer(n){let r={...e};delete r[n],e=r,t.forEach(t=>t())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(t=>t.hasContentComponentInitialized?t:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){let t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;let e=document.createElement("div");e.append(...t.options.element.childNodes),t.setOptions({element:e})}render(){let{editor:t,innerRef:e,...n}=this.props;return tZ.createElement(tZ.Fragment,null,tZ.createElement("div",{ref:t6(e,this.editorContentRef),...n}),(null==t?void 0:t.contentComponent)&&tZ.createElement(t7,{contentComponent:t.contentComponent}))}}let t8=(0,tZ.forwardRef)((t,e)=>{let n=tZ.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[t.editor]);return tZ.createElement(t9,{key:n,innerRef:e,...t})}),et=tZ.memo(t8);var ee=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;0!=i--;)if(!t(e[i],n[i]))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(i of e.entries())if(!n.has(i[0]))return!1;for(i of e.entries())if(!t(i[1],n.get(i[0])))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(i of e.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if((r=e.length)!=n.length)return!1;for(i=r;0!=i--;)if(e[i]!==n[i])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var r,i,o,s=o[i];if(("_owner"!==s||!e.$$typeof)&&!t(e[s],n[s]))return!1}return!0}return e!=e&&n!=n}
1),en={exports:{}},er={};en.exports=function(){if(o)return er;o=1;var t="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},e=t4.useSyncExternalStore,n=tZ.useRef,r=tZ.useEffect,i=tZ.useMemo,s=tZ.useDebugValue;return er.useSyncExternalStoreWithSelector=function(o,l,a,h,p){var c=n(null);if(null===c.current){var u={hasValue:!1,value:null};c.current=u}else u=c.current;var d=e(o,(c=i(function(){function e(e){if(!i){if(i=!0,n=e,e=h(e),void 0!==p&&u.hasValue){var o=u.value;if(p(o,e))return r=o}return r=e}if(o=r,t(n,e))return o;var s=h(e);return void 0!==p&&p(o,s)?o:(n=e,r=s)}var n,r,i=!1,o=void 0===a?null:a;return[function(){return e(l())},null===o?void 0:function(){return e(o())}]},[l,a,h,p]))[0],c[1]);return r(function(){u.hasValue=!0,u.value=d},[d]),s(d),d},er}();var ei=en.exports;let eo="undefined"!=typeof window?tZ.useLayoutEffect:tZ.useEffect;class es{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(t=>t())},e=this.editor;return e.on("transaction",t),()=>{e.off("transaction",t)}}}}function el(t){var e;let[n]=(0,tZ.useState)(()=>new es(t.editor)),r=ei.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,null!==(e=t.equalityFn)&&void 0!==e?e:ee);return eo(()=>n.watch(t.editor),[t.editor,n]),(0,tZ.useDebugValue)(r),r}let ea="undefined"==typeof window,eh=ea||!!("undefined"!=typeof window&&window.next);class ep{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(t=>t())}getInitialEditor(){return void 0===this.options.current.immediatelyRender?ea||eh?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){let t={...this.options.current,onBeforeCreate:(...t)=>{var e,n;return null===(n=(e=this.options.current).onBeforeCreate)||void 0===n?void 0:n.call(e,...t)},onBlur:(...t)=>{var e,n;return null===(n=(e=this.options.current).onBlur)||void 0===n?void 0:n.call(e,...t)},onCreate:(...t)=>{var e,n;return null===(n=(e=this.options.current).onCreate)||void 0===n?void 0:n.call(e,...t)},onDestroy:(...t)=>{var e,n;return null===(n=(e=this.options.current).onDestroy)||void 0===n?void 0:n.call(e,...t)},onFocus:(...t)=>{var e,n;return null===(n=(e=this.options.current).onFocus)||void 0===n?void 0:n.call(e,...t)},onSelectionUpdate:(...t)=>{var e,n;return null===(n=(e=this.options.current).onSelectionUpdate)||void 0===n?void 0:n.call(e,...t)},onTransaction:(...t)=>{var e,n;return null===(n=(e=this.options.current).onTransaction)||void 0===n?void 0:n.call(e,...t)}
1,onUpdate:(...t)=>{var e,n;return null===(n=(e=this.options.current).onUpdate)||void 0===n?void 0:n.call(e,...t)},onContentError:(...t)=>{var e,n;return null===(n=(e=this.options.current).onContentError)||void 0===n?void 0:n.call(e,...t)},onDrop:(...t)=>{var e,n;return null===(n=(e=this.options.current).onDrop)||void 0===n?void 0:n.call(e,...t)},onPaste:(...t)=>{var e,n;return null===(n=(e=this.options.current).onPaste)||void 0===n?void 0:n.call(e,...t)}};return new s.KE(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,e){return Object.keys(t).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&t.extensions&&e.extensions?t.extensions.length===e.extensions.length&&t.extensions.every((t,n)=>{var r;return t===(null===(r=e.extensions)||void 0===r?void 0:r[n])}):t[n]===e[n]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?ep.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((e,n)=>e===t[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,e=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){e&&e.setOptions(this.options.current);return}e&&!e.isDestroyed&&(e.destroy(),this.instanceId===t&&this.setEditor(null))},1)}}function ec(t={},e=[]){let n=(0,tZ.useRef)(t);n.current=t;let[r]=(0,tZ.useState)(()=>new ep(n)),i=t4.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,tZ.useDebugValue)(i),(0,tZ.useEffect)(r.onRender(e)),el({editor:i,selector:({transactionNumber:e})=>!1===t.shouldRerenderOnTransaction?null:t.immediatelyRender&&0===e?0:e+1}),i}let eu=(0,tZ.createContext)({editor:null}),ed=eu.Consumer,ef=()=>(0,tZ.useContext)(eu);function em({children:t,slotAfter:e,slotBefore:n,editorContainerProps:r={},...i}){let o=ec(i);return o?tZ.createElement(eu.Provider,{value:{editor:o}},n,tZ.createElement(ed,null,({editor:t})=>tZ.createElement(et,{editor:t,...r})),t,e):null}let eg=t=>{let[e,n]=(0,tZ.useState)(null),{editor:r}=ef();return(0,tZ.useEffect)(()=>{var n;if(!e||(null===(n=t.editor)||void 0===n?void 0:n.isDestroyed)||(null==r?void 0:r.isDestroyed))return;let{pluginKey:i="bubbleMenu",editor:o,tippyOptions:s={},updateDelay:l,shouldShow:a=null}=t,h=o||r;if(!h){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}let p=tQ({updateDelay:l,editor:h,element:e,pluginKey:i,shouldShow:a,tippyOptions:s});return h.registerPlugin(p),()=>{h.unregisterPlugin(i)}},[t.editor,r,e]),tZ.createElement("div",{ref:n,className:t.className,style:{visibility:"hidden"}},t.children)},ey=t=>{let[e,n]=(0,tZ.useState)(null),{editor:r}=ef();return(0,tZ.useEffect)(()=>{var n;if(!e||(null===(n=t.editor)||void 0===n?void 0:n.isDestroyed)||(null==r?void 0:r.isDestroyed))return;let{pluginKey:i="floatingMenu",editor:o,tippyOptions:s={},shouldShow:l=null}=t,a=o||r;if(!a){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}let h=t2({pluginKey:i,editor:a,element:e,tippyOptions:s,shouldShow:l});return a.registerPlugin(h),()=>{a.unregisterPlugin(i)}},[t.editor,r,e]),tZ.createElement("div",{ref:n,className:t.className,style:{visibility:"hidden"}},t.children)},ev=(0,tZ.createContext)({onDragStart:void 0}),eb=()=>(0,tZ.useContext)(ev),ew=t=>{let e=t.as||"div",{nodeViewContentRef:n}=eb();return tZ.createElement(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},ek=tZ.forwardRef((t,e)=>{let{onDragStart:n}=eb(),r=t.as||"div";return tZ.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});class ex{constructor(t,{editor:e,props:n={},as:r="div",className:i=""}){this.ref=null,this.id=Math.floor(0xffffffff*Math.random()).toString(),this.component=t,this.editor=e,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?(0,t0.flushSync)(()=>{this.render()}):this.render()}render(){var t,e;let n=this.component,r=this.props,i=this.editor;("function"==typeof n&&n.prototype&&n.prototype.isReactComponent||"object"==typeof n&&(null===(e=n.$$typeof)||void 0===e?void 0:e.toString())==="Symbol(react.forward_ref)")&&(r.ref=t=>{this.ref=t}),this.reactElement=tZ.createElement(n,{...r}),null===(t=null==i?void 0:i.contentComponent)||void 0===t||t.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t;let e=this.editor;null===(t=null==e?void 0:e.contentComponent)||void 0===t||t.removeRenderer(this.id
1)}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}}class eS extends s.Yv{mount(){let t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(t={})=>this.updateAttributes(t),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){let t;this.component.displayName=(t=this.extension.name).charAt(0).toUpperCase()+t.substring(1)}let e={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:t=>{t&&this.contentDOMElement&&t.firstChild!==this.contentDOMElement&&t.appendChild(this.contentDOMElement)}},n=this.component,r=tZ.memo(t=>tZ.createElement(ev.Provider,{value:e},tZ.createElement(n,t)));r.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let i=this.node.isInline?"span":"div";this.options.as&&(i=this.options.as);let{className:o=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new ex(r,{editor:this.editor,props:t,as:i,className:`node-${this.node.type.name} ${o}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var t;if(this.renderer.element.firstElementChild&&!(null===(t=this.renderer.element.firstElementChild)||void 0===t?void 0:t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){let{from:t,to:e}=this.editor.state.selection,n=this.getPos();if("number"==typeof n)if(t<=n&&e>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,e,n){let r=t=>{this.renderer.updateProps(t),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if("function"==typeof this.options.update){let i=this.node,o=this.decorations,s=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=n,this.options.update({oldNode:i,oldDecorations:o,newNode:t,newDecorations:e,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:t,decorations:e,innerDecorations:n})})}return t===this.node&&this.decorations===e&&this.innerDecorations===n||(this.node=t,this.decorations=e,this.innerDecorations=n,r({node:t,decorations:e,innerDecorations:n}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let t={};if("function"==typeof this.options.attrs){let e=this.editor.extensionManager.attributes,n=(0,s.zU)(this.node,e);t=this.options.attrs({node:this.node,HTMLAttributes:n})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}}function eE(t,e){return n=>n.editor.contentComponent?new eS(t,n,e):{}}},90290:(t,e,n)=>{n.d(e,{$f:()=>N,G2:()=>w,I$:()=>C,Im:()=>L,Qv:()=>h,Sd:()=>v,Z1:()=>O,_G:()=>c,_e:()=>f,bh:()=>k,eB:()=>p,eT:()=>y,ec:()=>I,hy:()=>M,ic:()=>l,iz:()=>T,pC:()=>S,yY:()=>x,y_:()=>D});var r,i=n(808),o=n(10156),s=n(52571);let l=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function a(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("backward",t):!(n.parentOffset>0))?n:null}let h=(t,e,n)=>{let r=a(t,n);if(!r)return!1;let l=m(r);if(!l){let n=r.blockRange(),o=n&&(0,i.jP)(n);return null!=o&&(e&&e(t.tr.lift(n,o).scrollIntoView()),!0)}let h=l.nodeBefore;if(A(t,l,e,-1))return!0;
1if(0==r.parent.content.size&&(d(h,"end")||s.nh.isSelectable(h)))for(let n=r.depth;;n--){let a=(0,i.$L)(t.doc,r.before(n),r.after(n),o.Ji.empty);if(a&&a.slice.size<a.to-a.from){if(e){let n=t.tr.step(a);n.setSelection(d(h,"end")?s.LN.findFrom(n.doc.resolve(n.mapping.map(l.pos,-1)),-1):s.nh.create(n.doc,l.pos-h.nodeSize)),e(n.scrollIntoView())}return!0}if(1==n||r.node(n-1).childCount>1)break}return!!h.isAtom&&l.depth==r.depth-1&&(e&&e(t.tr.delete(l.pos-h.nodeSize,l.pos).scrollIntoView()),!0)},p=(t,e,n)=>{let r=a(t,n);if(!r)return!1;let i=m(r);return!!i&&u(t,i,e)},c=(t,e,n)=>{let r=g(t,n);if(!r)return!1;let i=b(r);return!!i&&u(t,i,e)};function u(t,e,n){let r=e.nodeBefore,l=e.pos-1;for(;!r.isTextblock;l--){if(r.type.spec.isolating)return!1;let t=r.lastChild;if(!t)return!1;r=t}let a=e.nodeAfter,h=e.pos+1;for(;!a.isTextblock;h++){if(a.type.spec.isolating)return!1;let t=a.firstChild;if(!t)return!1;a=t}let p=(0,i.$L)(t.doc,l,h,o.Ji.empty);if(!p||p.from!=l||p instanceof i.Ln&&p.slice.size>=h-l)return!1;if(n){let e=t.tr.step(p);e.setSelection(s.U3.create(e.doc,l)),n(e.scrollIntoView())}return!0}function d(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let f=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=m(r)}let l=o&&o.nodeBefore;return!!(l&&s.nh.isSelectable(l))&&(e&&e(t.tr.setSelection(s.nh.create(t.doc,o.pos-l.nodeSize)).scrollIntoView()),!0)};function m(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 g(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("forward",t):!(n.parentOffset<n.parent.content.size))?n:null}let y=(t,e,n)=>{let r=g(t,n);if(!r)return!1;let l=b(r);if(!l)return!1;let a=l.nodeAfter;if(A(t,l,e,1))return!0;if(0==r.parent.content.size&&(d(a,"start")||s.nh.isSelectable(a))){let n=(0,i.$L)(t.doc,r.before(),r.after(),o.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(d(a,"start")?s.LN.findFrom(r.doc.resolve(r.mapping.map(l.pos)),1):s.nh.create(r.doc,r.mapping.map(l.pos))),e(r.scrollIntoView())}return!0}}return!!a.isAtom&&l.depth==r.depth-1&&(e&&e(t.tr.delete(l.pos,l.pos+a.nodeSize).scrollIntoView()),!0)},v=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=b(r)}let l=o&&o.nodeAfter;return!!(l&&s.nh.isSelectable(l))&&(e&&e(t.tr.setSelection(s.nh.create(t.doc,o.pos)).scrollIntoView()),!0)};function b(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}let w=(t,e)=>{let n=t.selection,r=n instanceof s.nh,o;if(r){if(n.node.isTextblock||!(0,i.n9)(t.doc,n.from))return!1;o=n.from}else if(null==(o=(0,i.N0)(t.doc,n.from,-1)))return!1;if(e){let n=t.tr.join(o);r&&n.setSelection(s.nh.create(n.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(n.scrollIntoView())}return!0},k=(t,e)=>{let n=t.selection,r;if(n instanceof s.nh){if(n.node.isTextblock||!(0,i.n9)(t.doc,n.to))return!1;r=n.to}else if(null==(r=(0,i.N0)(t.doc,n.to,1)))return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},x=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),s=o&&(0,i.jP)(o);return null!=s&&(e&&e(t.tr.lift(o,s).scrollIntoView()),!0)},S=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!!(n.parent.type.spec.code&&n.sameParent(r))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)};function E(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let C=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),l=E(i.contentMatchAt(o));if(!l||!i.canReplaceWith(o,o,l))return!1;if(e){let r=n.after(),i=t.tr.replaceWith(r,r,l.createAndFill());i.setSelection(s.LN.near(i.doc.resolve(r),1)),e(i.scrollIntoView())}return!0},O=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof s.i5||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=E(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=t.tr.insert(n,o.createAndFill());l.setSelection(s.U3.create(l.doc,n+1)),e(l.scrollIntoView())}return!0},T=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if((0,i.zy)(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&(0,i.jP)(r);return null!=o&&(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)},M=(t,e)=>{let{$from:n,to:r}=t.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),e&&e(t.tr.setSelection(s.nh.create(t.doc,i))),!0)};function A(t,e,n,r){let l,a,h,p=e.nodeBefore,c=e.nodeAfter,u,f,m=p.type.spec.isolating||c.type.spec.isolating;if(!m&&(l=e.nodeBefore,a=e.nodeAfter,h=e.index(),l&&a&&l.type.compatibleContent(a.type)&&(!l.content.size&&e.parent.canReplace(h-1,h)?(n&&n(t.tr.delete(e.pos-l.nodeSize,e.pos).scrollIntoView()),!0):!!(e.parent.canReplace(h,h+1)&&(a.isTextblock||(0,i.n9)(t.doc,e.pos)))&&(n&&n(t.tr.join(e.pos).scrollIntoView()),!0))))return!0;let g=!m&&e.parent.canReplace(e.index(),e.index()+1);if(g&&(u=(f=p.contentMatchAt(p.childCount)).findWrapping(c.type))&&f.matchType(u[0]||c.type).validEnd){if(n){let r=e.pos+c.nodeSize,s=o.FK.empty;for(let t=u.length-1;t>=0;t--)s=o.FK.from(u[t].create(null,s));s=o.FK.from(p.copy(s));let l=t.tr.step(new i.Wg(e.pos-1,r,e.pos,r,new o.Ji(s,1,0),u.length,!0)),a=l.doc.resolve(r+2*u.length);a.nodeAfter&&a.nodeAfter.type==p.type&&(0,i.n9)(l.doc,a.pos)&&l.join(a.pos),n(l.scrollIntoView())}return!0}let y=c.type.spec.isolating||r>0&&m?null:s.LN.findFrom(e,1),v=y&&y.$from.blockRange(y.$to),b=v&&(0,i.jP)(v);if(null!=b&&b>=e.depth)return n&&n(t.tr.lift(v,b).scrollIntoView()),!0;if(g&&d(c,"start",!0)&&d(p,"end")){let r=p,s=[];for(;s.push(r),!r.isTextblock;)r=r.lastChild;let l=c,a=1;for(;!l.isTextblock;l=l.firstChild)a++;if(r.canReplace(r.childCount,r.childCount,l.content)){if(n){let r=o.FK.empty;for(let t=s.length-1;t>=0;t--)r=o.FK.from(s[t].copy(r));n(t.tr.step(new i.Wg(e.pos-s.length,e.pos+c.nodeSize,e.pos+a,e.pos+c.nodeSize-a,new o.Ji(r,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function R(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(e.tr.setSelection(s.U3.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}let N=R(-1),I=R(1);function L(t,e=null){return function(n,r){let{$from:o,$to:s}=n.selection,l=o.blockRange(s),a=l&&(0,i.oM)(l,t,e);return!!a&&(r&&r(n.tr.wrap(l,a).scrollIntoView()),!0)}}function D(t,e=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(o,s,(r,o)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(t,e)))if(r.type==t)i=!0;else{let e=n.doc.resolve(o),r=e.index();i=e.parent.canReplaceWith(r,r+1,t)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];i.setBlockType(o,s,t,e)}r(i.scrollIntoView())}return!0}}function P(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let z=P(l,h,f),F=P(l,y,v),j={Enter:P(S,O,T,(t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof s.nh&&t.selection.node.isBlock)return!!(n.parentOffset&&(0,i.zy)(t.doc,n.pos))&&(e&&e(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let o=[],l,a,h=!1,p=!1;for(let t=n.depth;;t--){if(n.node(t).isBlock){let e;h=n.end(t)==n.pos+(n.depth-t),p=n.start(t)==n.pos-(n.depth-t),a=E(n.node(t-1).contentMatchAt(n.indexAfter(t-1)));o.unshift(e||(h&&a?{type:a}:null)),l=t;break}if(1==t)return!1;o.unshift(null)}let c=t.tr;(t.selection instanceof s.U3||t.selection instanceof s.i5)&&c.deleteSelection();let u=c.mapping.map(n.pos),d=(0,i.zy)(c.doc,u,o.length,o);if(d||(o[0]=a?{type:a}:null,d=(0,i.zy)(c.doc,u,o.length,o)),c.split(u,o.length,o),!h&&p&&n.node(l).type!=a){let t=c.mapping.map(n.before(l)),e=c.doc.resolve(t);a&&n.node(l-1).canReplaceWith(e.index(),e.index()+1,a)&&c.setNodeMarkup(c.mapping.map(n.before(l)),a)}return e&&e(c.scrollIntoView()),!0}),"Mod-Enter":C,Backspace:z,"Mod-Backspace":z,"Shift-Backspace":z,Delete:F,"Mod-Delete":F,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new s.i5(t.doc))),!0)},B={"Ctrl-h":j.Backspace,"Alt-Backspace":j["Mod-Backspace"],"Ctrl-d":j.Delete,"Ctrl-Alt-Backspace":j["Mod-Delete"],"Alt-Delete":j["Mod-Delete"],"Alt-d":j["Mod-Delete"],"Ctrl-a":N,"Ctrl-e":I};for(let t in j)B[t]=j[t];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},96770:(t,e,n)=>{n.d(e,{K:()=>d,w:()=>u});for(var r={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:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=0;l<10;l++)r[48+l]=r[96+l]=String(l);for(var l=1;l<=24;l++)r[l+111]="F"+l;for(var l=65;l<=90;l++)r[l]=String.fromCharCode(l+32),i[l]=String.fromCharCode(l);for(var a in r)i.hasOwnProperty(a)||(i[a]=r[a]);
1var h=n(52571);let p="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function c(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function u(t){return new h.k_({props:{handleKeyDown:d(t)}})}function d(t){let e=function(t){let e=Object.create(null);for(let n in t)e[function(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t<o.length-1;t++){let s=o[t];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))p?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+s)}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}(n)]=t[n];return e}(t);return function(t,n){var l;let a=("Esc"==(l=!(o&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||s&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?i:r)[n.keyCode]||n.key||"Unidentified")&&(l="Escape"),"Del"==l&&(l="Delete"),"Left"==l&&(l="ArrowLeft"),"Up"==l&&(l="ArrowUp"),"Right"==l&&(l="ArrowRight"),"Down"==l&&(l="ArrowDown"),l),h,p=e[c(a,n)];if(p&&p(t.state,t.dispatch,t))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=e[c(a,n,!1)];if(r&&r(t.state,t.dispatch,t))return!0}if((n.shiftKey||n.altKey||n.metaKey||a.charCodeAt(0)>127)&&(h=r[n.keyCode])&&h!=a){let r=e[c(h,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}},96919:(t,e,n)=>{n.d(e,{Ay:()=>tK});var r=n(4701);let i=(t,e)=>{for(let n in e)t[n]=e[n];return t},o="numeric",s="ascii",l="alpha",a="asciinumeric",h="alphanumeric",p="domain",c="emoji",u="whitespace";function d(t,e,n){for(let r in e[o]&&(e[a]=!0,e[h]=!0),e[s]&&(e[a]=!0,e[l]=!0),e[a]&&(e[h]=!0),e[l]&&(e[h]=!0),e[h]&&(e[p]=!0),e[c]&&(e[p]=!0),e){let e=(r in n||(n[r]=[]),n[r]);0>e.indexOf(t)&&e.push(t)}}function f(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}f.groups={},f.prototype={accepts(){return!!this.t},go(t){let e=this.j[t];if(e)return e;for(let e=0;e<this.jr.length;e++){let n=this.jr[e][0],r=this.jr[e][1];if(r&&n.test(t))return r}return this.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){let i;return r=r||f.groups,e&&e.j?i=e:(i=new f(e),n&&r&&d(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this,o=t.length;if(!o)return i;for(let e=0;e<o-1;e++)i=i.tt(t[e]);return i.tt(t[o-1],e,n,r)},tt(t,e,n,r){if(r=r||f.groups,e&&e.j)return this.j[t]=e,e;let o,s=this.go(t);return s?(i((o=new f).j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new f,e&&(r&&(o.t&&"string"==typeof o.t?d(e,i(function(t,e){let n={};for(let r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}(o.t,r),n),r):n&&d(e,n,r)),o.t=e),this.j[t]=o,o}};let m=(t,e,n,r,i)=>t.ta(e,n,r,i),g=(t,e,n,r,i)=>t.tr(e,n,r,i),y=(t,e,n,r,i)=>t.ts(e,n,r,i),v=(t,e,n,r,i)=>t.tt(e,n,r,i),b="WORD",w="UWORD",k="ASCIINUMERICAL",x="ALPHANUMERICAL",S="LOCALHOST",E="UTLD",C="SCHEME",O="SLASH_SCHEME",T="OPENBRACE",M="CLOSEBRACE",A="OPENBRACKET",R="CLOSEBRACKET",N="OPENPAREN",I="CLOSEPAREN",L="OPENANGLEBRACKET",D="CLOSEANGLEBRACKET",P="FULLWIDTHLEFTPAREN",z="FULLWIDTHRIGHTPAREN",F="LEFTCORNERBRACKET",j="RIGHTCORNERBRACKET",B="LEFTWHITECORNERBRACKET",H="RIGHTWHITECORNERBRACKET",J="FULLWIDTHLESSTHAN",$="FULLWIDTHGREATERTHAN",K="AMPERSAND",V="APOSTROPHE",_="ASTERISK",W="BACKSLASH",U="BACKTICK",q="CARET",G="COLON",Y="COMMA",X="DOLLAR",Q="EQUALS",Z="EXCLAMATION",tt="HYPHEN",te="PERCENT",tn="PIPE",tr="PLUS",ti="POUND",to="QUERY",ts="QUOTE",tl="FULLWIDTHMIDDLEDOT",ta="SEMI",th="SLASH",tp="TILDE",tc="UNDERSCORE",tu="EMOJI";var td=Object.freeze({__proto__:null,WORD:b,UWORD:w,ASCIINUMERICAL:k,ALPHANUMERICAL:x,LOCALHOST:S,TLD:"TLD",UTLD:E,SCHEME:C,SLASH_SCHEME:O,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:T,CLOSEBRACE:M,OPENBRACKET:A,CLOSEBRACKET:R,OPENPAREN:N,CLOSEPAREN:I,OPENANGLEBRACKET:L,CLOSEANGLEBRACKET:D,FULLWIDTHLEFTPAREN:P,FULLWIDTHRIGHTPAREN:z,LEFTCORNERBRACKET:F,RIGHTCORNERBRACKET:j,LEFTWHITECORNERBRACKET:B,RIGHTWHITECORNERBRACKET:H,FULLWIDTHLESSTHAN:J,FULLWIDTHGREATERTHAN:$,AMPERSAND:K,APOSTROPHE:V,ASTERISK:_,AT:"AT",BACKSLASH:W,BACKTICK:U,CARET:q,COLON:G,COMMA:Y,DOLLAR:X,DOT:"DOT",EQUALS:Q,EXCLAMATION:Z,HYPHEN:tt,PERCENT:te,PIPE:tn,PLUS:tr,POUND:ti,QUERY:to,QUOTE:ts,FULLWIDTHMIDDLEDOT:tl,SEMI:ta,SLASH:th,TILDE:tp,UNDERSCORE:tc,EMOJI:tu,SYM:"SYM"});let tf=/[a-z]/,tm=/\p{L}/u,tg=/\p{Emoji}/u,ty=/\d/,tv=/\s/,tb=null,tw=null;function tk(t,e){let n=function(t){let e=[],n=t.length,r=0;for(;r<n;){let i,o=t.charCodeAt(r),s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,t=>t.toLowerCase())),r=n.length,i=[],o=0,s=0;for(;s<r;){let l=t,a=null,h=0,p=null,c=-1,u=-1;for(;s<r&&(a=l.go(n[s]));)(l=a).accepts()?(c=0,u=0,p=l):c>=0&&(c+=n[s].length,u++),h+=n[s].length,o+=n[s].length,s++;o-=c,s-=u,h-=c,i.push({t:p.t,v:e.slice(o-h,o),s:o-h,e:o})}return i}function tx(t,e,n,r,i){let o,s=e.length;for(let n=0;n<s-1;n++){let s=e[n];t.j[s]?o=t.j[s]:((o=new f(r)).jr=i.slice(),t.j[s]=o),t=o}return(o=new f(n)).jr=i.slice(),t.j[e[s-1]]=o,o}function tS(t){let e=[],n=[],r=0;for(;r<t.length;){let i=0;for(;"0123456789".indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+i),10);e>0;e--)n.pop();r+=i}else n.push(t[r]),r++}return e}let tE={defaultProtocol:"http",events:null,format:tO,formatHref:tO,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function tC(t,e=null){let n=i({},tE);t&&(n=i(n,t instanceof tC?t.o:t));let r=n.ignoreTags,o=[];for(let t=0;t<r.length;t++)o.push(r[t].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}function tO(t){return t}function tT(t,e){this.t="token",this.v=t,this.tk=e}
1function tM(t,e){class n extends tT{constructor(e,n){super(e,n),this.t=t}}for(let t in e)n.prototype[t]=e[t];return n.t=t,n}tC.prototype={o:tE,ignoreTags:[],defaultRender:t=>t,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){let r=null!=e,i=this.o[t];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:tE[t])&&r&&(i=i(e,n)):"function"==typeof i&&r&&(i=i(e,n.t,n))),i},getObj(t,e,n){let r=this.o[t];return"function"==typeof r&&null!=e&&(r=r(e,n.t,n)),r},render(t){let e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}},tT.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){let e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},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=tE.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){let e=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",e,this),r=t.get("tagName",e,this),o=this.toFormattedString(t),s={},l=t.get("className",e,this),a=t.get("target",e,this),h=t.get("rel",e,this),p=t.getObj("attributes",e,this),c=t.getObj("events",e,this);return s.href=n,l&&(s.class=l),a&&(s.target=a),h&&(s.rel=h),p&&i(s,p),{tagName:r,attributes:s,content:o,eventListeners:c}}};let tA=tM("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),tR=tM("text"),tN=tM("nl"),tI=tM("url",{isLink:!0,toHref(t=tE.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){let t=this.tk;return t.length>=2&&t[0].t!==S&&t[1].t===G}}),tL=t=>new f(t);function tD(t,e,n){let r=n[0].s,i=n[n.length-1].e;return new t(e.slice(r,i),n)}let tP="undefined"!=typeof console&&console&&console.warn||(()=>{}),tz={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function tF(t,e=!1){if(tz.initialized&&tP(`linkifyjs: already initialized - will not register custom scheme "${t}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw Error(`linkifyjs: incorrect scheme format. 21. Must only contain digits, lowercase ASCII letters or "-" 32. Cannot start or end with "-" 43. "-" cannot repeat`);tz.customSchemes.push([t,e])}function tj(t){return tz.initialized||function(){tz.scanner=function(t=[]){let e={};f.groups=e;let n=new f;null==tb&&(tb=tS("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
4ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==tw&&(tw=tS("ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
4ºÐ´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")),v(n,"'",V),v(n,"{",T),v(n,"}",M),v(n,"[",A),v(n,"]",R),v(n,"(",N),v(n,")",I),v(n,"<",L),v(n,">",D),v(n,"ï¼",P),v(n,"ï¼",z),v(n,"ã",F),v(n,"ã",j),v(n,"ã",B),v(n,"ã",H),v(n,"ï¼",J),v(n,"ï¼",$),v(n,"&",K),v(n,"*",_),v(n,"@","AT"),v(n,"`",U),v(n,"^",q),v(n,":",G),v(n,",",Y),v(n,"$",X),v(n,".","DOT"),v(n,"=",Q),v(n,"!",Z),v(n,"-",tt),v(n,"%",te),v(n,"|",tn),v(n,"+",tr),v(n,"#",ti),v(n,"?",to),v(n,'"',ts),v(n,"/",th),v(n,";",ta),v(n,"~",tp),v(n,"_",tc),v(n,"\\",W),v(n,"ã»",tl);let r=g(n,ty,"NUM",{[o]:!0});g(r,ty,r);let m=g(r,tf,k,{[a]:!0}),tk=g(r,tm,x,{[h]:!0}),tE=g(n,tf,b,{[s]:!0});g(tE,ty,m),g(tE,tf,tE),g(m,ty,m),g(m,tf,m);let tC=g(n,tm,w,{[l]:!0});g(tC,tf),g(tC,ty,tk),g(tC,tm,tC),g(tk,ty,tk),g(tk,tf),g(tk,tm,tk);let tO=v(n,"\n","NL",{[u]:!0}),tT=v(n,"\r","WS",{[u]:!0}),tM=g(n,tv,"WS",{[u]:!0});v(n,"",tM),v(tT,"\n",tO),v(tT,"",tM),g(tT,tv,tM),v(tM,"\r"),v(tM,"\n"),g(tM,tv,tM),v(tM,"",tM);let tA=g(n,tg,tu,{[c]:!0});v(tA,"#"),g(tA,tg,tA),v(tA,"ï¸",tA);let tR=v(tA,"â");v(tR,"#"),g(tR,tg,tA);let tN=[[tf,tE],[ty,m]],tI=[[tf,null],[tm,tC],[ty,tk]];for(let t=0;t<tb.length;t++)tx(n,tb[t],"TLD",b,tN);for(let t=0;t<tw.length;t++)tx(n,tw[t],E,w,tI);d("TLD",{tld:!0,ascii:!0},e),d(E,{utld:!0,alpha:!0},e),tx(n,"file",C,b,tN),tx(n,"mailto",C,b,tN),tx(n,"http",O,b,tN),tx(n,"https",O,b,tN),tx(n,"ftp",O,b,tN),tx(n,"ftps",O,b,tN),d(C,{scheme:!0,ascii:!0},e),d(O,{slashscheme:!0,ascii:!0},e),t=t.sort((t,e)=>t[0]>e[0]?1:-1);for(let e=0;e<t.length;e++){let r=t[e][0],i=t[e][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?i[p]=!0:tf.test(r)?ty.test(r)?i[a]=!0:i[s]=!0:i[o]=!0,y(n,r,r,i)}return y(n,"localhost",S,{ascii:!0}),n.jd=new f("SYM"),{start:n,tokens:i({groups:e},td)}}(tz.customSchemes);for(let t=0;t<tz.tokenQueue.length;t++)tz.tokenQueue[t][1]({scanner:tz.scanner});tz.parser=function({groups:t}){let e=t.domain.concat([K,_,"AT",W,U,q,X,Q,tt,"NUM",te,tn,tr,ti,th,"SYM",tp,tc]),n=[G,Y,"DOT",Z,te,to,ts,ta,L,D,T,M,R,A,N,I,P,z,F,j,B,H,J,$],r=[K,V,_,W,U,q,X,Q,tt,T,M,te,tn,tr,ti,to,th,"SYM",tp,tc],i=tL(),o=v(i,tp);m(o,r,o),m(o,t.domain,o);let s=tL(),l=tL(),a=tL();m(i,t.domain,s),m(i,t.scheme,l),m(i,t.slashscheme,a),m(s,r,o),m(s,t.domain,s);let h=v(s,"AT");v(o,"AT",h),v(l,"AT",h),v(a,"AT",h);let p=v(o,"DOT");m(p,r,o),m(p,t.domain,o);let c=tL();m(h,t.domain,c),m(c,t.domain,c);let u=v(c,"DOT");m(u,t.domain,c);let d=tL(tA);m(u,t.tld,d),m(u,t.utld,d),v(h,S,d);let f=v(c,tt);v(f,tt,f),m(f,t.domain,c),m(d,t.domain,c),v(d,"DOT",u),v(d,tt,f),m(v(d,G),t.numeric,tA);let g=v(s,tt),y=v(s,"DOT");v(g,tt,g),m(g,t.domain,s),m(y,r,o),m(y,t.domain,s);let b=tL(tI);m(y,t.tld,b),m(y,t.utld,b),m(b,t.domain,s),m(b,r,o),v(b,"DOT",y),v(b,tt,g),v(b,"AT",h);let w=v(b,G),k=tL(tI);m(w,t.numeric,k);let x=tL(tI),E=tL();m(x,e,x),m(x,n,E),m(E,e,x),m(E,n,E),v(b,th,x),v(k,th,x);let C=v(l,G),O=v(a,G),tl=v(O,th),tu=v(tl,th);m(l,t.domain,s),v(l,"DOT",y),v(l,tt,g),m(a,t.domain,s),v(a,"DOT",y),v(a,tt,g),m(C,t.domain,x),v(C,th,x),v(C,to,x),m(tu,t.domain,x),m(tu,e,x),v(tu,th,x);let tf=[[T,M],[A,R],[N,I],[L,D],[P,z],[F,j],[B,H],[J,$]];for(let t=0;t<tf.length;t++){let[r,i]=tf[t],o=v(x,r);v(E,r,o),v(o,i,x);let s=tL(tI);m(o,e,s);let l=tL();m(o,n),m(s,e,s),m(s,n,l),m(l,e,s),m(l,n,l),v(s,i,x),v(l,i,x)}
4return v(i,S,b),v(i,"NL",tN),{start:i,tokens:td}}(tz.scanner.tokens);for(let t=0;t<tz.pluginQueue.length;t++)tz.pluginQueue[t][1]({scanner:tz.scanner,parser:tz.parser});tz.initialized=!0}(),function(t,e,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let l=t,a=null,h=null,p=0,c=null,u=-1;for(;i<r&&!(a=l.go(n[i].t));)s.push(n[i++]);for(;i<r&&(h=a||l.go(n[i].t));)a=null,(l=h).accepts()?(u=0,c=l):u>=0&&u++,i++,p++;if(u<0)(i-=p)<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(tD(tR,e,s)),s=[]),i-=u,p-=u;let t=c.t,r=n.slice(i-p,i);o.push(tD(t,e,r))}}return s.length>0&&o.push(tD(tR,e,s)),o}(tz.parser.start,t,tk(tz.scanner.start,t))}function tB(t,e=null,n=null){if(e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new tC(n),i=tj(t),o=[];for(let t=0;t<i.length;t++){let n=i[t];n.isLink&&(!e||n.t===e)&&r.check(n)&&o.push(n.toFormattedObject(r))}return o}tj.scan=tk;var tH=n(52571);let tJ=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function t$(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(t=>{let e="string"==typeof t?t:t.scheme;e&&n.push(e)}),!t||t.replace(tJ,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}let tK=r.CU.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if("string"==typeof t){tF(t);return}tF(t.scheme,t.optionalSlashes)})},onDestroy(){f.groups={},tz.scanner=null,tz.parser=null,tz.tokenQueue=[],tz.pluginQueue=[],tz.customSchemes=[],tz.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!t$(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}),addAttributes(){return{href:{default:null,parseHTML:t=>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=>{let e=t.getAttribute("href");return!!(e&&this.options.isAllowedUri(e,{defaultValidate:t=>!!t$(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:t=>!!t$(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,r.KV)(this.options.HTMLAttributes,t),0]:["a",(0,r.KV)(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{let{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!t$(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&e().setMark(this.name,t).setMeta("preventAutolink",!0).run()},toggleLink:t=>({chain:e})=>{let{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!t$(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&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[(0,r.Zc)({find:t=>{let e=[];
4if(t){let{protocols:n,defaultProtocol:r}=this.options,i=tB(t).filter(t=>t.isLink&&this.options.isAllowedUri(t.value,{defaultValidate:t=>!!t$(t,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(t=>e.push({text:t.value,data:{href:t.href},index:t.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){var t,e,n;let i=[],{protocols:o,defaultProtocol:s}=this.options;return this.options.autolink&&i.push((t={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!t$(t,o),protocols:o,defaultProtocol:s}),shouldAutoLink:this.options.shouldAutoLink},new tH.k_({key:new tH.hs("autolink"),appendTransaction:(e,n,i)=>{let o=e.some(t=>t.docChanged)&&!n.doc.eq(i.doc),s=e.some(t=>t.getMeta("preventAutolink"));if(!o||s)return;let{tr:l}=i,a=(0,r.T7)(n.doc,[...e]);if((0,r.FF)(a).forEach(({newRange:e})=>{let n,o,s=(0,r.Nx)(i.doc,e,t=>t.isTextblock);if(s.length>1?(n=s[0],o=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ")):s.length&&i.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(n=s[0],o=i.doc.textBetween(n.pos,e.to,void 0," ")),n&&o){let e=o.split(" ").filter(t=>""!==t);if(e.length<=0)return!1;let s=e[e.length-1],a=n.pos+o.lastIndexOf(s);if(!s)return!1;let h=tj(s).map(e=>e.toObject(t.defaultProtocol));if(!(1===h.length?h[0].isLink:3===h.length&&!!h[1].isLink&&["()","[]"].includes(h[0].value+h[2].value)))return!1;h.filter(t=>t.isLink).map(t=>({...t,from:a+t.start+1,to:a+t.end+1})).filter(t=>!i.schema.marks.code||!i.doc.rangeHasMark(t.from,t.to,i.schema.marks.code)).filter(e=>t.validate(e.value)).filter(e=>t.shouldAutoLink(e.value)).forEach(e=>{(0,r.hO)(e.from,e.to,i.doc).some(e=>e.mark.type===t.type)||l.addMark(e.from,e.to,t.type.create({href:e.href}))})}}),l.steps.length)return l}}))),!0===this.options.openOnClick&&i.push((e={type:this.type},new tH.k_({key:new tH.hs("handleClickLink"),props:{handleClick:(t,n,i)=>{var o,s;if(0!==i.button||!t.editable)return!1;let l=i.target,a=[];for(;"DIV"!==l.nodeName;)a.push(l),l=l.parentNode;if(!a.find(t=>"A"===t.nodeName))return!1;let h=(0,r.gu)(t.state,e.type.name),p=i.target,c=null!==(o=null==p?void 0:p.href)&&void 0!==o?o:h.href,u=null!==(s=null==p?void 0:p.target)&&void 0!==s?s:h.target;return!!p&&!!c&&(window.open(c,u),!0)}}}))),this.options.linkOnPaste&&i.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type},new tH.k_({key:new tH.hs("handlePasteLink"),props:{handlePaste:(t,e,r)=>{let{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let l="";r.content.forEach(t=>{l+=t.textContent});let a=tB(l,{defaultProtocol:n.defaultProtocol}).find(t=>t.isLink&&t.value===l);return!!l&&!!a&&n.editor.commands.setMark(n.type,{href:a.href})}}}))),i}})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.