PageSourceSearch

https://kurzly.net/_next/static/chunks/836-5b9a419bd148e815.js

js kurzly.net collected 2026-10-02 02:03:12 UTC 215,819 bytes, 9 lines download raw bytes

1!function(){try{var t="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="48fdef6c-e449-4ec8-a37b-0e0473c71f33",t._sentryDebugIdIdentifier="sentry-dbid-48fdef6c-e449-4ec8-a37b-0e0473c71f33")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[836],{1275:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(51811);let i={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};i.node;let s=(0,r.A)(i)},8039:(t,e,n)=>{t.exports=n(65538)},8242:(t,e,n)=>{n.d(e,{$L:()=>O,Ln:()=>m,N0:()=>A,Um:()=>E,Wg:()=>g,X9:()=>o,Ys:()=>u,dL:()=>B,jP:()=>v,n9:()=>M,oM:()=>b,zy:()=>C});var r=n(27050);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 s{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&s.empty)return s.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,s=this.inverted?2:1,o=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+s],c=this.ranges[l+o],p=a+h;if(t<=p){let s=h?t==a?-1:t==p?1:e:e,o=a+r+(s<0?0:c);if(n)return o;let u=t==(e<0?a:p)?null:l/3+(t-a)*65536,d=t==a?2:t==p?1:4;return(e<0?t!=a:t!=p)&&(d|=8),new i(o,d,u)}r+=c-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,s=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let o=this.ranges[e]-(this.inverted?n:0);if(o>t)break;let l=this.ranges[e+i];if(t<=o+l&&e==3*r)return!0;n+=this.ranges[e+s]-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 s=this.ranges[r],o=s-(this.inverted?i:0),l=s+(this.inverted?0:i),a=this.ranges[r+e],h=this.ranges[r+n];t(o,o+a,l,l+h),i+=h-a}}invert(){return new s(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?s.empty:new s(t<0?[0,-t,0]:[0,0,t])}}s.empty=new s([]);class o{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 o(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 o;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 s.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)}
vendor: 8,078 bytes, line 1
1static 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 c(t,e,n){let i=[];for(let r=0;r<t.childCount;r++){let s=t.child(r);s.content.size&&(s=s.copy(c(s.content,e,s))),s.isInline&&(s=e(s,n,r)),i.push(s)}return r.FK.fromArray(i)}class p 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=t.resolve(this.from),i=n.node(n.sharedDepth(this.to)),s=new r.Ji(c(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,s)}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 p(e.pos,n.pos,this.mark)}merge(t){return t instanceof p&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new p(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 p(e.from,e.to,t.markFromJSON(e.mark))}}a.jsonID("addMark",p);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(c(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 p(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 s([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.to,-1),n=this.from==this.to&&m.MAP_BIAS<0?e:t.mapResult(this.from,1);return n.deletedAcross&&e.deletedAcross?null:new m(n.pos,Math.max(n.pos,e.pos),this.slice,this.structure)}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)}}m.MAP_BIAS=1,a.jsonID("replace",m);class g extends a{constructor(t,e,n,r,i,s,o=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=s,this.structure=o}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 s([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,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let t=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,i--}}return!1}function k(t,e,n,i=n.contentMatch,s=!0){let o=t.doc.nodeAt(e),l=[],a=e+1;for(let e=0;e<o.childCount;e++){let h=o.child(e),c=a+h.nodeSize,p=i.matchType(h.type);if(p){i=p;for(let e=0;e<h.marks.length;e++)n.allowsMarkType(h.marks[e].type)||t.step(new u(a,c,h.marks[e]));if(s&&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,c,r.Ji.empty));a=c}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;
1e--)t.step(l[e])}function v(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,r=0,i=0;;--n){let s=t.$from.node(n),o=t.$from.index(n)+r,l=t.$to.indexAfter(n)-i;if(n<t.depth&&s.canReplace(o,l,e))return n;if(0==n||s.type.spec.isolating||!((0==o||s.canReplace(o,s.childCount))&&(l==s.childCount||s.canReplace(0,l))))break;o&&(r=1),l<s.childCount&&(i=1)}return null}function b(t,e,n=null,r=t){let i=function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}(t,e),s=i&&function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let t=r;l&&t<i;t++)l=l.matchType(n.child(t).type);return l&&l.validEnd?o:null}(r,e);return s?i.map(w).concat({type:e,attrs:n}).concat(s.map(w)):null}function w(t){return{type:t,attrs:null}}function x(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let i=t.mapping.slice(r).map(n+1+s+o.index);t.replaceWith(i,i+1,e.type.schema.linebreakReplacement.create())}}})}function S(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let i=t.mapping.slice(r).map(n+1+s);t.replaceWith(i,i+1,e.type.schema.text("\n"))}})}function C(t,e,n=1,r){let i=t.resolve(e),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let t=i.depth-1,e=n-2;t>s;t--,e--){let n=i.node(t),s=i.index(t);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(s,n.childCount),l=r&&r[e+1];l&&(o=o.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[e]||n;if(!n.canReplace(s+1,n.childCount)||!a.type.validContent(o))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function M(t,e){let n=t.resolve(e),r=n.index();return T(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function T(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 s=e.child(i),o=s.type==r?t.type.schema.nodes.text:s.type;if(!(n=n.matchType(o))||!t.type.allowsMarks(s.marks))return!1}return n.validEnd}(t,e))}function A(t,e,n=-1){let r=t.resolve(e);for(let t=r.depth;;t--){let i,s,o=r.index(t);if(t==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(t+1),o++,s=r.node(t).maybeChild(o)):(i=r.node(t).maybeChild(o-1),s=r.node(t+1)),i&&!i.isTextblock&&T(i,s)&&r.node(t).canReplace(o,o+1))return e;if(0==t)break;e=n<0?r.before(t):r.after(t)}}function E(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,s=r.index(e)+ +(n>0),o=r.node(e),l=!1;if(1==t)l=o.canReplace(s,s,i);else{let t=o.contentMatchAt(s).findWrapping(i.firstChild.type);l=t&&o.canReplaceWith(s,s,t[0])}if(l)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}function O(t,e,n=e,i=r.Ji.empty){if(e==n&&!i.size)return null;let s=t.resolve(e),o=t.resolve(n);return I(s,o,i)?new m(e,n,i):new N(s,o,i).fit()}function I(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 s=this.placed,o=n.depth,l=i.depth;for(;o&&l&&1==s.childCount;)s=s.firstChild.content,o--,l--;let a=new r.Ji(s,o,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=null,i=(n?(t=z(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let s=this.depth;s>=0;s--){let{type:o,match:l}=this.frontier[s],a,h=null;if(1==e&&(i?l.matchType(i.type)||(h=l.fillBefore(r.FK.from(i),!1)):t&&o.compatibleContent(t.type)))return{sliceDepth:n,frontierDepth:s,parent:t,inject:h};
1if(2==e&&i&&(a=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:s,parent:t,wrap:a};if(t&&l.matchType(t.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=z(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=z(t,e);if(i.childCount<=1&&e>0){let s=t.size-e<=e+i.size;this.unplaced=new r.Ji(R(t,e-1,1),e-1,s?e-1:n)}else this.unplaced=new r.Ji(R(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:i,wrap:s}){for(;this.depth>e;)this.closeFrontierNode();if(s)for(let t=0;t<s.length;t++)this.openFrontierNode(s[t]);let o=this.unplaced,l=n?n.content:o.content,a=o.openStart-t,h=0,c=[],{match:p,type:u}=this.frontier[e];if(i){for(let t=0;t<i.childCount;t++)c.push(i.child(t));p=p.matchFragment(i)}let d=l.size+t-(o.content.size-o.openEnd);for(;h<l.childCount;){let t=l.child(h),e=p.matchType(t.type);if(!e)break;(++h>1||0==a||t.content.size)&&(p=e,c.push(function t(e,n,i){if(n<=0)return e;let s=e.content;return n>1&&(s=s.replaceChild(0,t(s.firstChild,n-1,1==s.childCount?i-1:0))),n>0&&(s=e.type.contentMatch.fillBefore(s).append(s),i<=0&&(s=s.append(e.type.contentMatch.matchFragment(s).fillBefore(r.FK.empty,!0)))),e.copy(s)}(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(c)),this.frontier[e].match=p,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(R(o.content,t-1,1),t-1,d<0?o.openEnd:t-1):new r.Ji(R(o.content,t,h),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let t=this.frontier[this.depth],e;if(!t.type.isTextblock||!$(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)),s=$(t,e,r,n,i);if(s){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],i=$(t,n,r,e,!0);if(!i||i.childCount)continue t}return{depth:e,fit:s,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 R(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(R(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 z(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function $(t,e,n,r,i){let s=t.node(e),o=i?t.indexAfter(e):t.index(e);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);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,s.content,o)?l:null}function j(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 D 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 s.empty}invert(t){return new D(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 D(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 D(e.pos,e.attr,e.value)}}a.jsonID("attr",D);class F 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 s.empty}invert(t){return new F(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 F(e.attr,e.value)}}a.jsonID("docAttr",F);
1let P=class extends Error{};(P=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n}).prototype=Object.create(Error.prototype),P.prototype.constructor=P,P.prototype.name="TransformError";class B{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new o}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new P(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}changedRange(){let t=1e9,e=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(t=r.map(t,1),e=r.map(e,-1)),r.forEach((n,r,i,s)=>{t=Math.min(t,i),e=Math.max(e,s)})}return 1e9==t?null:{from:t,to:e}}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=O(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 s=t.doc.resolve(e),o=t.doc.resolve(n);if(I(s,o,i))return t.step(new m(e,n,i));let l=j(s,o);0==l[l.length-1]&&l.pop();let a=-(s.depth+1);l.unshift(a);for(let t=s.depth,e=s.pos-1;t>0;t--,e--){let n=s.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(t)>-1?a=t:s.before(t)==e&&l.splice(1,0,-t)}let h=l.indexOf(a),c=[],p=i.openStart;for(let t=i.content,e=0;;e++){let n=t.firstChild;if(c.push(n),e==i.openStart)break;t=n.content}for(let t=p-1;t>=0;t--){var u;let e=c[t],n=(u=e.type).spec.defining||u.spec.definingForContent;if(n&&!e.sameMarkup(s.node(Math.abs(a)-1)))p=t;else if(n||!e.type.isTextblock)break}for(let e=i.openStart;e>=0;e--){let a=(e+p+1)%(i.openStart+1),u=c[a];if(u)for(let e=0;e<l.length;e++){let c=l[(e+h)%l.length],p=!0;c<0&&(p=!1,c=-c);let d=s.node(c-1),f=s.index(c-1);if(d.canReplaceWith(f,f,u.type,u.marks))return t.replace(s.before(c),p?o.after(c):n,new r.Ji(function t(e,n,i,s,o){if(n<i){let r=e.firstChild;e=e.replaceChild(0,r.copy(t(r.content,n+1,i,s,r)))}if(n>s){let t=o.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=s.before(t),n=o.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){var i=t,s=e;if(!n.isInline&&i==s&&this.doc.resolve(i).parent.content.size){let t=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}(this.doc,i,n.type);null!=t&&(i=s=t)}return this.replaceRange(i,s,new r.Ji(r.FK.from(n),0,0)),this}deleteRange(t,e){return!function(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&0==r.parentOffset&&0==i.parentOffset){let s=r.sharedDepth(n),o=!1;for(let t=r.depth;t>s;t--)r.node(t).type.spec.isolating&&(o=!0);for(let t=i.depth;t>s;t--)i.node(t).type.spec.isolating&&(o=!0);if(!o){for(let t=r.depth;t>0&&e==r.start(t);t--)e=r.before(t);for(let t=i.depth;t>0&&n==i.start(t);t--)n=i.before(t);r=t.doc.resolve(e),i=t.doc.resolve(n)}}let s=j(r,i);for(let e=0;e<s.length;e++){let n=s[e],o=e==s.length-1;if(o&&0==n||r.node(n).type.contentMatch.validEnd)return t.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return t.delete(r.before(n),i.after(n))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return!function(t,e,n){let{$from:i,$to:s,depth:o}=e,l=i.before(o+1),a=s.after(o+1),h=l,c=a,p=r.FK.empty,u=0;for(let t=o,e=!1;t>n;t--)e||i.index(t)>0?(e=!0,p=r.FK.from(i.node(t).copy(p)),u++):h--;let d=r.FK.empty,f=0;for(let t=o,e=!1;t>n;t--)e||s.after(t+1)<s.end(t)?(e=!0,d=r.FK.from(s.node(t).copy(d)),f++):c++;t.step(new g(h,c,l,a,new r.Ji(p.append(d),u,f),p.size-u,!0))}(this,t,e),this}join(t,e=1){return!function(t,e,n){let i=null,{linebreakReplacement:s}=t.doc.type.schema,o=t.doc.resolve(e-n),l=o.node().type;if(s&&l.inlineContent){let t="pre"==l.whitespace,e=!!l.contentMatch.matchType(s);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&&k(t,e+n-1,l,o.node().contentMatchAt(o.index()),null==i);let h=t.mapping.slice(a),c=h.map(e-n);if(t.step(new m(c,h.map(e+n,-1),r.Ji.empty,!0)),!0===i){let e=t.doc.resolve(c);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 s=e.start,o=e.end;t.step(new g(s,o,s,o,new r.Ji(i,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,i=null){var s=this;if(!n.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=s.steps.length;return s.doc.nodesBetween(t,e,(t,e)=>{var l,a,h;let c,p,u="function"==typeof i?i(t):i;if(t.isTextblock&&!t.hasMarkup(n,u)&&(l=s.doc,a=s.mapping.slice(o).map(e),h=n,p=(c=l.resolve(a)).index(),c.parent.canReplaceWith(p,p+1,h))){let i=null;if(n.schema.linebreakReplacement){let t="pre"==n.whitespace,e=!!n.contentMatch.matchType(n.schema.linebreakReplacement);t&&!e?i=!1:!t&&e&&(i=!0)}!1===i&&S(s,t,e,o),k(s,s.mapping.slice(o).map(e,1),n,void 0,null===i);let l=s.mapping.slice(o),a=l.map(e,1),h=l.map(e+t.nodeSize,1);return s.step(new g(a,h,a+1,h-1,new r.Ji(r.FK.from(n.create(u,null,t.marks)),0,0),1,!0)),!0===i&&x(s,t,e,o),!1}}),this}setNodeMarkup(t,e,n=null,i){return!function(t,e,n,i,s){let o=t.doc.nodeAt(e);if(!o)throw RangeError("No node at given position");n||(n=o.type);let l=n.create(i,null,s||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,l);if(!n.validContent(o.content))throw RangeError("Invalid content for node type "+n.name);t.step(new g(e,e+o.nodeSize,e+1,e+o.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 D(t,e,n)),this}setDocAttribute(t,e){return this.step(new F(t,e)),this}addNodeMark(t,e){return this.step(new d(t,e)),this}
1removeNodeMark(t,e){let n=this.doc.nodeAt(t);if(!n)throw RangeError("No node at position "+t);if(e instanceof r.CU)e.isInSet(n.marks)&&this.step(new f(t,e));else{let r=n.marks,i,s=[];for(;i=e.isInSet(r);)s.push(new f(t,i)),r=i.removeFromSet(r);for(let t=s.length-1;t>=0;t--)this.step(s[t])}return this}split(t,e=1,n){return!function(t,e,n=1,i){let s=t.doc.resolve(e),o=r.FK.empty,l=r.FK.empty;for(let t=s.depth,e=s.depth-n,a=n-1;t>e;t--,a--){o=r.FK.from(s.node(t).copy(o));let e=i&&i[a];l=r.FK.from(e?e.type.create(e.attrs,l):s.node(t).copy(l))}t.step(new m(e,e,new r.Ji(o.append(l),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){var r;let i,s,o,l;return r=this,o=[],l=[],r.doc.nodesBetween(t,e,(r,a,h)=>{if(!r.isInline)return;let c=r.marks;if(!n.isInSet(c)&&h.type.allowsMarkType(n.type)){let h=Math.max(a,t),d=Math.min(a+r.nodeSize,e),f=n.addToSet(c);for(let t=0;t<c.length;t++)c[t].isInSet(f)||(i&&i.to==h&&i.mark.eq(c[t])?i.to=d:o.push(i=new u(h,d,c[t])));s&&s.to==h?s.to=d:l.push(s=new p(h,d,n))}}),o.forEach(t=>r.step(t)),l.forEach(t=>r.step(t)),this}removeMark(t,e,n){var i;let s,o;return i=this,s=[],o=0,i.doc.nodesBetween(t,e,(i,l)=>{if(!i.isInline)return;o++;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<s.length;t++){let e=s[t];e.step==o-1&&r.eq(s[t].style)&&(i=e)}i?(i.to=n,i.step=o):s.push({style:r,from:Math.max(l,t),to:n,step:o})}}}),s.forEach(t=>i.step(new u(t.from,t.to,t.style))),this}clearIncompatible(t,e,n){return k(this,t,e,n),this}}},12894:(t,e,n)=>{n.d(e,{K:()=>f,w:()=>d});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:'"'},s="u">typeof navigator&&/Mac/.test(navigator.platform),o="u">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]);var h=n(76865);let c="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),p="u">typeof navigator&&/Win/.test(navigator.platform);function u(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 d(t){return new h.k_({props:{handleKeyDown:f(t)}})}function f(t){let e=function(t){let e=Object.create(null);for(let n in t)e[function(t){let e,n,r,i,s=t.split(/-(?!$)/),o=s[s.length-1];"Space"==o&&(o=" ");for(let t=0;t<s.length-1;t++){let o=s[t];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))e=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))c?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+o)}return e&&(o="Alt-"+o),n&&(o="Ctrl-"+o),i&&(o="Meta-"+o),r&&(o="Shift-"+o),o}(n)]=t[n];return e}(t);return function(t,n){var l;let a=("Esc"==(l=!(s&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||o&&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,c=e[u(a,n)];if(c&&c(t.state,t.dispatch,t))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=e[u(a,n,!1)];if(r&&r(t.state,t.dispatch,t))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(p&&n.ctrlKey&&n.altKey)&&(h=r[n.keyCode])&&h!=a){let r=e[u(h,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}},13439:(t,e,n)=>{n.d(e,{$Z$:()=>J,NVQ:()=>X,hGv:()=>V});var r=n(12115),i=n(47650),s=n(8039),o=n(95155),l=n(82159);let{getOwnPropertyNames:a,getOwnPropertySymbols:h}=Object,{hasOwnProperty:c}=Object.prototype;function p(t,e){return function(n,r,i){return t(n,r,i)&&e(n,r,i)}}function u(t){return function(e,n,r){if(!e||!n||"object"!=typeof e||"object"!=typeof n)return t(e,n,r);let{cache:i}
1=r,s=i.get(e),o=i.get(n);if(s&&o)return s===n&&o===e;i.set(e,n),i.set(n,e);let l=t(e,n,r);return i.delete(e),i.delete(n),l}}function d(t){return a(t).concat(h(t))}let f=Object.hasOwn||((t,e)=>c.call(t,e));function m(t,e){return t===e||!t&&!e&&t!=t&&e!=e}let{getOwnPropertyDescriptor:g,keys:y}=Object;function k(t,e){return t.byteLength===e.byteLength&&I(new Uint8Array(t),new Uint8Array(e))}function v(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function b(t,e){return t.byteLength===e.byteLength&&I(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function w(t,e){return m(t.getTime(),e.getTime())}function x(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function S(t,e){return t===e}function C(t,e,n){let r,i,s=t.size;if(s!==e.size)return!1;if(!s)return!0;let o=Array(s),l=t.entries(),a=0;for(;(r=l.next())&&!r.done;){let s=e.entries(),l=!1,h=0;for(;(i=s.next())&&!i.done;){if(o[h]){h++;continue}let s=r.value,c=i.value;if(n.equals(s[0],c[0],a,h,t,e,n)&&n.equals(s[1],c[1],s[0],c[0],t,e,n)){l=o[h]=!0;break}h++}if(!l)return!1;a++}return!0}function M(t,e,n){let r=y(t),i=r.length;if(y(e).length!==i)return!1;for(;i-- >0;)if(!R(t,e,n,r[i]))return!1;return!0}function T(t,e,n){let r,i,s,o=d(t),l=o.length;if(d(e).length!==l)return!1;for(;l-- >0;)if(!R(t,e,n,r=o[l])||(i=g(t,r),s=g(e,r),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function A(t,e){return m(t.valueOf(),e.valueOf())}function E(t,e){return t.source===e.source&&t.flags===e.flags}function O(t,e,n){let r,i,s=t.size;if(s!==e.size)return!1;if(!s)return!0;let o=Array(s),l=t.values();for(;(r=l.next())&&!r.done;){let s=e.values(),l=!1,a=0;for(;(i=s.next())&&!i.done;){if(!o[a]&&n.equals(r.value,i.value,r.value,i.value,t,e,n)){l=o[a]=!0;break}a++}if(!l)return!1}return!0}function I(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function N(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function R(t,e,n,r){return("_owner"===r||"__o"===r||"__v"===r)&&(!!t.$$typeof||!!e.$$typeof)||f(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}let L={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},z=Object.prototype.toString,$=j();function j(t={}){let{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=function({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:h,areRegExpsEqual:c,areSetsEqual:p,areTypedArraysEqual:u,areUrlsEqual:d,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;if(null==m||null==g)return!1;let k=typeof m;if(k!==typeof g)return!1;if("object"!==k)return"number"===k?l(m,g,y):"function"===k&&s(m,g,y);let v=m.constructor;if(v!==g.constructor)return!1;if(v===Object)return a(m,g,y);if(Array.isArray(m))return e(m,g,y);if(v===Date)return r(m,g,y);if(v===RegExp)return c(m,g,y);if(v===Map)return o(m,g,y);if(v===Set)return p(m,g,y);let b=z.call(m);if("[object Date]"===b)return r(m,g,y);if("[object RegExp]"===b)return c(m,g,y);if("[object Map]"===b)return o(m,g,y);if("[object Set]"===b)return p(m,g,y);if("[object Object]"===b)return"function"!=typeof m.then&&"function"!=typeof g.then&&a(m,g,y);if("[object URL]"===b)return d(m,g,y);if("[object Error]"===b)return i(m,g,y);if("[object Arguments]"===b)return a(m,g,y);if(L[b])return u(m,g,y);if("[object ArrayBuffer]"===b)return t(m,g,y);if("[object DataView]"===b)return n(m,g,y);if("[object Boolean]"===b||"[object Number]"===b||"[object String]"===b)return h(m,g,y);if(f){let t=f[b];if(!t){let e=null!=m?m[Symbol.toStringTag]:void 0;e&&(t=f[e])}if(t)return t(m,g,y)}return!1}}(function({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:k,areArraysEqual:n?T:v,areDataViewsEqual:b,areDatesEqual:w,areErrorsEqual:x,areFunctionsEqual:S,areMapsEqual:n?p(C,T):C,areNumbersEqual:m,areObjectsEqual:n?T:M,arePrimitiveWrappersEqual:A,areRegExpsEqual:E,areSetsEqual:n?p(O,T):O,areTypedArraysEqual:n?p(I,T):I,areUrlsEqual:N,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){let t=u(r.areArraysEqual),e=u(r.areMapsEqual),n=u(r.areObjectsEqual),i=u(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:t,areMapsEqual:e,areObjectsEqual:n,areSetsEqual:i})}return r}(t)),o=n?n(s):function(t,e,n,r,i,o,l){return s(t,e,l)};return function({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(s,o){let{cache:l=t?new WeakMap:void 0,meta:a}=n();return e(s,o,{cache:l,equals:r,meta:a,strict:i})};if(t)return function(t,n){return e(t,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let s={cache:void 0,equals:r,meta:void 0,strict:i};return function(t,n){return e(t,n,s)}}
1({circular:e,comparator:s,createState:r,equals:o,strict:i})}j({strict:!0}),j({circular:!0}),j({circular:!0,strict:!0}),j({createInternalComparator:()=>m}),j({strict:!0,createInternalComparator:()=>m}),j({circular:!0,createInternalComparator:()=>m}),j({circular:!0,createInternalComparator:()=>m,strict:!0});var D=n(94577);let F=({contentComponent:t})=>{let e=(0,s.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getServerSnapshot);return(0,o.jsx)(o.Fragment,{children:Object.values(e)})};var P=class extends r.Component{constructor(t){super(t),this.editorContentRef=r.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;let e=this.props.editor;if(e&&!e.isDestroyed&&(null==(t=e.view.dom)?void 0:t.parentNode)){let t,n,r,s;if(e.contentComponent)return;let o=this.editorContentRef.current;o.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:o}),t=new Set,n={},r=!1,s=()=>{!r&&t.size&&(r=!0,queueMicrotask(()=>{r=!1,t.forEach(t=>t())}))},e.contentComponent={subscribe:e=>(t.add(e),()=>{t.delete(e)}),getSnapshot:()=>n,getServerSnapshot:()=>n,setRenderer(t,e){n={...n,[t]:i.createPortal(e.reactElement,e.element,t)},s()},removeRenderer(t){let e={...n};delete e[t],n=e,s()}},e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let t=this.props.editor;if(t){t.isEditorContentInitialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null;try{var e;if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:t,innerRef:e,...n}=this.props;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:((...t)=>e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})})(e,this.editorContentRef),...n}),(null==t?void 0:t.contentComponent)&&(0,o.jsx)(F,{contentComponent:t.contentComponent})]})}};let B=(0,r.forwardRef)((t,e)=>{let n=r.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[t.editor]);return r.createElement(P,{key:n,innerRef:e,...t})}),J=r.memo(B),H="u">typeof window?r.useLayoutEffect:r.useEffect;var K=class{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,e=e=>{((null==e?void 0:e.transaction)===void 0||e.transaction!==t)&&(t=null==e?void 0:e.transaction,this.transactionNumber+=1,this.subscribers.forEach(t=>t()))},n=this.editor;return n.on("transaction",e),n.on("update",e),()=>{n.off("transaction",e),n.off("update",e)}}}};let U="u"<typeof window,_=U||!!("u">typeof window&&window.next);var W=class t{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(){let t=this.options.current.immediatelyRender,e=null==t||t;return U?e=!1:_&&void 0===t&&(e=!1),e?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...t)=>{var e,n;return null==(e=(n=this.options.current).onBeforeCreate)?void 0:e.call(n,...t)},onBlur:(...t)=>{var e,n;return null==(e=(n=this.options.current).onBlur)?void 0:e.call(n,...t)},onCreate:(...t)=>{var e,n;return null==(e=(n=this.options.current).onCreate)?void 0:e.call(n,...t)},onDestroy:(...t)=>{var e,n;return null==(e=(n=this.options.current).onDestroy)?void 0:e.call(n,...t)},onFocus:(...t)=>{var e,n;return null==(e=(n=this.options.current).onFocus)?void 0:e.call(n,...t)},onSelectionUpdate:(...t)=>{var e,n;return null==(e=(n=this.options.current).onSelectionUpdate)?void 0:e.call(n,...t)},onTransaction:(...t)=>{var e,n;return null==(e=(n=this.options.current).onTransaction)?void 0:e.call(n,...t)}
1,onUpdate:(...t)=>{var e,n;return null==(e=(n=this.options.current).onUpdate)?void 0:e.call(n,...t)},onContentError:(...t)=>{var e,n;return null==(e=(n=this.options.current).onContentError)?void 0:e.call(n,...t)},onDrop:(...t)=>{var e,n;return null==(e=(n=this.options.current).onDrop)?void 0:e.call(n,...t)},onPaste:(...t)=>{var e,n;return null==(e=(n=this.options.current).onPaste)?void 0:e.call(n,...t)},onDelete:(...t)=>{var e,n;return null==(e=(n=this.options.current).onDelete)?void 0:e.call(n,...t)},onMount:(...t)=>{var e,n;return null==(e=(n=this.options.current).onMount)?void 0:e.call(n,...t)},onUnmount:(...t)=>{var e,n;return null==(e=(n=this.options.current).onUnmount)?void 0:e.call(n,...t)}};return new l.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[n])}):t[n]===e[n]))}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===e.length?t.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{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 V(t={},e=[]){let n=(0,r.useRef)(t);n.current=t;let[i]=(0,r.useState)(()=>new W(n)),o=(0,s.useSyncExternalStore)(i.subscribe,i.getEditor,i.getServerSnapshot);return(0,r.useDebugValue)(o),(0,r.useEffect)(i.onRender(e)),!function(t){var e;let[n]=(0,r.useState)(()=>new K(t.editor)),i=(0,D.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,null!=(e=t.equalityFn)?e:$);H(()=>n.watch(t.editor),[t.editor,n]),(0,r.useDebugValue)(i)}({editor:o,selector:({transactionNumber:e})=>!1===t.shouldRerenderOnTransaction||void 0===t.shouldRerenderOnTransaction?null:t.immediatelyRender&&0===e?0:e+1}),o}let q=(0,r.createContext)({editor:null});function G(t){return!!("function"==typeof t&&t.prototype&&t.prototype.isReactComponent)}function Y(t){return!!("object"==typeof t&&t.$$typeof&&("Symbol(react.forward_ref)"===t.$$typeof.toString()||"react.forward_ref"===t.$$typeof.description))}q.Consumer;var X=class{constructor(t,{editor:e,props:n={},as:r="div",className:s=""}){this.ref=null,this.destroyed=!1,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"),s&&this.element.classList.add(...s.split(" ")),this.editor.isEditorContentInitialized?(0,i.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var t;if(this.destroyed)return;let e=this.component,n=this.props,i=this.editor,s=function(){try{if(r.version)return parseInt(r.version.split(".")[0],10)>=19}catch{}return!1}(),l=function(t){if(G(t)||Y(t))return!0;if("object"==typeof t&&t.$$typeof&&("Symbol(react.memo)"===t.$$typeof.toString()||"react.memo"===t.$$typeof.description)){let e=t.type;if(e)return G(e)||Y(e)}return!1}(e),a={...n};a.ref&&!(s||l)&&delete a.ref,!a.ref&&(s||l)&&(a.ref=t=>{this.ref=t}),this.reactElement=(0,o.jsx)(e,{...a}
1),null==i||null==(t=i.contentComponent)||t.setRenderer(this.id,this)}updateProps(t={}){if(this.destroyed)return;let e=!1,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];if(t[i]!==this.props[i]){e=!0;break}}e&&(this.props={...this.props,...t},this.render())}destroy(){var t;this.destroyed=!0;let e=this.editor;null==e||null==(t=e.contentComponent)||t.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}};l.Db;l.Yv,Symbol("tiptapReactWidgetCache");let Q=(0,r.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});function Z({children:t,...e}){let n="editor"in e?e.editor:e.instance;if(!n)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,r.useMemo)(()=>({editor:n}),[n]),s=(0,r.useMemo)(()=>({editor:n}),[n]);return(0,o.jsx)(q.Provider,{value:s,children:(0,o.jsx)(Q.Provider,{value:i,children:t})})}function tt({...t}){let{editor:e}=(0,r.useContext)(Q);return(0,o.jsx)(J,{editor:e,...t})}Q.displayName="TiptapContext",Z.displayName="Tiptap",tt.displayName="Tiptap.Content",Object.assign(Z,{Content:tt})},19820:(t,e,n)=>{n.d(e,{Ke:()=>S,R6:()=>w,UC:()=>E,bL:()=>T,l9:()=>A,z3:()=>y});var r=n(12115),i=n(70379),s=n(68599),o=n(54498),l=n(66294),a=n(47527),h=n(55897),c=n(83935),p=n(89971),u=n(95155),d=Object.defineProperty,f=(t,e)=>d(t,"name",{value:e,configurable:!0}),m="Collapsible",[g,y]=(0,s.A)(m),[k,v]=g(m),b=r.forwardRef(f(function(t,e){let{__scopeCollapsible:n,open:i,defaultOpen:s,disabled:l,onOpenChange:a,...c}=t,[d,f]=(0,o.i)({prop:i,defaultProp:s??!1,onChange:a,caller:m});return(0,u.jsx)(k,{scope:n,disabled:l,contentId:(0,p.B)(),open:d,onOpenToggle:r.useCallback(()=>f(t=>!t),[f]),children:(0,u.jsx)(h.sG.div,{"data-state":M(d),"data-disabled":l?"":void 0,...c,ref:e})})},"Collapsible")),w=r.forwardRef(f(function(t,e){let{__scopeCollapsible:n,...r}=t,s=v("CollapsibleTrigger",n);return(0,u.jsx)(h.sG.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":M(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:(0,i.mK)(t.onClick,s.onOpenToggle)})},"CollapsibleTrigger")),x="CollapsibleContent",S=r.forwardRef(f(function(t,e){let{forceMount:n,...r}=t,i=v(x,t.__scopeCollapsible);return(0,u.jsx)(c.C,{present:n||i.open,children:({present:t})=>(0,u.jsx)(C,{...r,ref:e,present:t})})},"CollapsibleContent")),C=r.forwardRef(f(function(t,e){let{__scopeCollapsible:n,present:i,children:s,...o}=t,c=v(x,n),[p,d]=r.useState(i),f=r.useRef(null),m=(0,a.s)(e,f),g=r.useRef(0),y=g.current,k=r.useRef(0),b=k.current,w=c.open||p,S=r.useRef(w),C=r.useRef(void 0);return r.useEffect(()=>{let t=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(t)},[]),(0,l.N)(()=>{let t=f.current;if(t){C.current=C.current||{transitionDuration:t.style.transitionDuration,animationName:t.style.animationName},t.style.transitionDuration="0s",t.style.animationName="none";let e=t.getBoundingClientRect();g.current=e.height,k.current=e.width,S.current||(t.style.transitionDuration=C.current.transitionDuration,t.style.animationName=C.current.animationName),d(i)}},[c.open,i]),(0,u.jsx)(h.sG.div,{"data-state":M(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!w,...o,ref:m,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...t.style},children:w&&s})},"CollapsibleContentImpl"));function M(t){return t?"open":"closed"}f(M,"getState");var T=b,A=w,E=S},27050:(t,e,n)=>{function r(t){this.content=t}function i(t){return t>=56320&&t<57344}function s(t){return t>=55296&&t<56320}n.d(e,{S4:()=>H,ZF:()=>X,FK:()=>o,CU:()=>c,sX:()=>P,bP:()=>M,u$:()=>S,vI:()=>p,Sj:()=>B,Ji:()=>u}),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,s=i.find(t),o=i.content.slice();return -1==s?o.push(n||t,e):(o[s+1]=e,n&&(o[s]=n)),new r(o)},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),s=i.content.slice(),o=i.find(t);return s.splice(-1==o?s.length:o,0,e,n),new r(s)}
vendor: 6,766 bytes, line 1
1,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 o{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 s=0,o=0;o<e;s++){let l=this.content[s],a=o+l.nodeSize;if(a>t&&!1!==n(l,r+o,i||null,s)&&l.content.size){let i=o+1;l.nodesBetween(Math.max(0,t-i),Math.min(l.content.size,e-i),n,r+i)}o=a}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",s=!0;return this.nodesBetween(t,e,(o,l)=>{let a=o.isText?o.text.slice(Math.max(t,l)-l,e-l):o.isLeaf?r?"function"==typeof r?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&a||o.isTextblock)&&n&&(s?s=!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(),i=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),i=1);i<t.content.length;i++)r.push(t.content[i]);return new o(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,s=0;s<e;i++){let o=this.content[i],l=s+o.nodeSize;l>t&&((s<t||l>e)&&(o=o.isText?o.cut(Math.max(0,t-s),Math.min(o.text.length,e-s)):o.cut(Math.max(0,t-s-1),Math.min(o.content.size,e-s-1))),n.push(o),r+=o.nodeSize),s=l}return new o(n,r)}cutByIndex(t,e){return t==e?o.empty:0==t&&e==this.content.length?this:new o(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),i=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new o(r,i)}addToStart(t){return new o([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new o(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 o=0;;o++){if(o==e.childCount||o==n.childCount)return e.childCount==n.childCount?null:r;let l=e.child(o),a=n.child(o);if(l==a){r+=l.nodeSize;continue}if(!l.sameMarkup(a))return r;if(l.isText&&l.text!=a.text){let t=l.text,e=a.text,n=0;for(;t[n]==e[n];n++)r++;return n&&n<t.length&&n<e.length&&s(t.charCodeAt(n-1))&&i(t.charCodeAt(n))&&r--,r}if(l.content.size||a.content.size){let e=t(l.content,a.content,r+1);if(null!=e)return e}r+=l.nodeSize}}(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return function t(e,n,r,o){for(let l=e.childCount,a=n.childCount;;){if(0==l||0==a)return l==a?null:{a:r,b:o};let h=e.child(--l),c=n.child(--a),p=h.nodeSize;if(h==c){r-=p,o-=p;continue}if(!h.sameMarkup(c))return{a:r,b:o};if(h.isText&&h.text!=c.text){let t=h.text,e=c.text,n=t.length,l=e.length;for(;n>0&&l>0&&t[n-1]==e[l-1];)n--,l--,r--,o--;return n&&l&&n<t.length&&s(t.charCodeAt(n-1))&&i(t.charCodeAt(n))&&(r++,o++),{a:r,b:o}}if(h.content.size||c.content.size){let e=t(h.content,c.content,r-1,o-1);if(e)return e}r-=p,o-=p}}(this,t,e,n)}findIndex(t){if(0==t)return a(0,t);if(t==this.size)return a(this.content.length,t);if(t>this.size||t<0)throw RangeError(`Position ${t} outside of fragment (${this})`);for(let e=0,n=0;;e++){let r=n+this.child(e).nodeSize;if(r>=t){if(r==t)return a(e+1,r);return a(e,n)}n=r}}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 o.empty;if(!Array.isArray(e))throw RangeError("Invalid input for Fragment.fromJSON");return o.fromArray(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return o.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 o(e||t,n)}static from(t){if(!t)return o.empty;if(t instanceof o)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new o([t],t.nodeSize);throw RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}o.empty=new o([],0);let l={index:0,offset:0};function a(t,e){return l.index=t,l.offset=e,l}function h(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(!h(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!h(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class c{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&&h(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;if(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 c.none;if(t instanceof c)return[t];let e=t.slice();return e.sort((t,e)=>t.type.rank-e.type.rank),e}}c.none=[];
vendor: 5,419 bytes, line 1
1class p extends Error{}class u{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,s,o){let{index:l,offset:a}=e.findIndex(n),h=e.maybeChild(l);if(a==n||h.isText)return o&&i<=0&&s<=0&&!o.canReplace(l,l,r)?null:e.cut(0,n).append(r).append(e.cut(n));let c=t(h.content,n-a-1,r,0==l?i-1:0,l==e.childCount-1?s-1:0,h);return c&&e.replaceChild(l,h.copy(c))}(this.content,t+this.openStart,e,this.openStart+1,this.openEnd+1);return n&&new u(n,this.openStart,this.openEnd)}removeBetween(t,e){return new u(function t(e,n,r){let{index:i,offset:s}=e.findIndex(n),o=e.maybeChild(i),{index:l,offset:a}=e.findIndex(r);if(s==n||o.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,o.copy(t(o.content,n-s-1,r-s-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 u.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 u(o.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 u(t,n,r)}}function d(t,e){if(!e.type.compatibleContent(t.type))throw new p("Cannot join "+e.type.name+" onto "+t.type.name)}function f(t,e,n){let r=t.node(n);return d(r,e.node(n)),r}function m(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 g(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(m(t.nodeAfter,r),s++));for(let t=s;t<o;t++)m(i.child(t),r);e&&e.depth==n&&e.textOffset&&m(e.nodeBefore,r)}function y(t,e){if(!t.type.validContent(e))throw new p("Invalid content for node "+t.type.name);return t.copy(e)}function k(t,e,n){let r=[];return g(null,t,n,r),t.depth>n&&m(y(f(t,e,n+1),k(t,e,n+1)),r),g(e,null,n,r),new o(r)}u.empty=new u(o.empty,0,0);class v{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 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 c.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 s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].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 S(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:s}=e.content.findIndex(i),o=i-s;if(n.push(e,t,r+s),!o||(e=e.child(t)).isText)break;
1i=o-1,r+=s+1}return new v(e,n,i)}static resolveCached(t,e){let n=x.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 x.set(t,n=new b);let r=n.elts[n.i]=v.resolve(t,e);return n.i=(n.i+1)%w,r}}class b{constructor(){this.elts=[],this.i=0}}let w=12,x=new WeakMap;class S{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 C=Object.create(null);class M{constructor(t,e,n,r=c.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||o.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&&h(this.attrs,e||t.defaultAttrs||C)&&c.sameSet(this.marks,n||c.none)}copy(t=null){return t==this.content?this:new M(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new M(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 u.empty;let r=this.resolve(t),i=this.resolve(e),s=n?0:r.sharedDepth(e),o=r.start(s);return new u(r.node(s).content.cut(r.pos-o,i.pos-o),r.depth-s,i.depth-s)}replace(t,e,n){var r=this.resolve(t),i=this.resolve(e);if(n.openStart>r.depth)throw new p("Inserted content deeper than insertion position");if(r.depth-n.openStart!=i.depth-n.openEnd)throw new p("Inconsistent open depths");return function t(e,n,r,i){let s=e.index(i),l=e.node(i);if(s==n.index(i)&&i<e.depth-r.openStart){let o=t(e,n,r,i+1);return l.copy(l.content.replaceChild(s,o))}if(!r.content.size)return y(l,k(e,n,i));if(r.openStart||r.openEnd||e.depth!=i||n.depth!=i){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(o.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(r,e);return y(l,function t(e,n,r,i,s){let l=e.depth>s&&f(e,n,s+1),a=i.depth>s&&f(r,i,s+1),h=[];return g(null,e,s,h),l&&a&&n.index(s)==r.index(s)?(d(l,a),m(y(l,t(e,n,r,i,s+1)),h)):(l&&m(y(l,k(e,n,s+1)),h),g(n,r,s,h),a&&m(y(a,k(r,i,s+1)),h)),g(i,null,s,h),new o(h)}(e,t,s,n,i))}{let t=e.parent,i=t.content;return y(t,i.cut(0,e.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(r,i,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 v.resolveCached(this,t)}resolveNoCache(t){return v.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()+")"),A(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=o.empty,r=0,i=n.childCount){let s=this.contentMatchAt(t).matchFragment(n,r,i),l=s&&s.matchFragment(this.content,e);if(!l||!l.validEnd)return!1;for(let t=r;t<i;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),s=i&&i.matchFragment(this.content,e);return!!s&&s.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=c.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(!c.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=o.fromJSON(t,e.content),i=t.nodeType(e.type).create(e.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}M.prototype.text=void 0;class T extends M{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):A(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 T(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new T(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 A(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class E{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){var n;let r,i=new O(t,e);if(null==i.next)return E.empty;let s=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=I(t),r=n;return t.eat(",")&&(r="}"!=t.next?I(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 o=(n=function(t){let e=[[]];return i(function t(e,s){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(t(n,s)),[]);if("seq"==e.type)for(let r=0;;r++){let o=t(e.exprs[r],s);if(r==e.exprs.length-1)return o;i(o,s=n())}else if("star"==e.type){let o=n();return r(s,o),i(t(e.expr,o),o),[r(o)]}else if("plus"==e.type){let o=n();return i(t(e.expr,s),o),i(t(e.expr,o),o),[r(o)]}else if("opt"==e.type)return[r(s)].concat(t(e.expr,s));else if("range"==e.type){let o=s;for(let r=0;r<e.min;r++){let r=n();i(t(e.expr,o),r),o=r}if(-1==e.max)i(t(e.expr,o),o);else for(let s=e.min;s<e.max;s++){let s=n();r(o,s),i(t(e.expr,o),s),o=s}return[r(o)]}else if("name"==e.type)return[r(s,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)}}(s),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]);
vendor: 6,195 bytes, line 1
1R(n,e).forEach(e=>{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)})}})});let s=r[e.join(",")]=new E(e.indexOf(n.length-1)>-1);for(let e=0;e<i.length;e++){let n=i[e][1].sort(N);s.next.push({type:i[e][0],next:r[n.join(",")]||t(n)})}return s}(R(n,0)));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,s=[];for(let e=0;e<t.next.length;e++){let{type:n,next:o}=t.next[e];s.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(o)&&r.push(o)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,i),o}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 i(s,l){let a=s.matchFragment(t,n);if(a&&(!e||a.validEnd))return o.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=i(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:s,next:o}=i.next[t];s.isLeaf||s.hasRequiredAttrs()||s.name in e||r.type&&!o.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),e[s.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")}}E.empty=new E(!0);class O{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 I(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function N(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:s}=i[t];r||-1!=n.indexOf(s)||e(s)}}(e),n.sort(N)}function L(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 z(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 $(t,e,n,r){for(let i in e)if(!(i in t))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in t)t[n].validate&&t[n].validate(e[n])}function j(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new F(t,r,e[r]);return n}class D{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=j(t,n.attrs),this.defaultAttrs=L(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==E.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:z(this.attrs,t)}create(t=null,e,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new M(this,this.computeAttrs(t),o.from(e),c.setFrom(n))}createChecked(t=null,e,n){return e=o.from(e),this.checkContent(e),new M(this,this.computeAttrs(t),e,c.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=o.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),i=r&&r.fillBefore(o.empty,!0);return i?new M(this,t,e.append(i),c.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){$(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:c.none:t}static compile(t,e){let n=Object.create(null);t.forEach((t,r)=>n[t]=new D(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 F{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 P{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=j(t,r.attrs),this.excluded=null;let i=L(this.attrs);this.instance=i?new c(this,i):null}create(t=null){return!t&&this.instance?this.instance:new c(this,z(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach((t,i)=>n[t]=new P(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){$(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class B{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=D.compile(this.spec.nodes,this),this.marks=P.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]=E.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?J(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?[]:J(this,n.split(" "))}this.nodeFromJSON=t=>M.fromJSON(this,t),this.markFromJSON=t=>c.fromJSON(this,t),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 D){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 T(n,n.defaultAttrs,t,c.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw RangeError("Unknown node type: "+t);return e}}function J(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);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(o=r)}if(!o)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 q(this,e,!1);return n.addAll(t,c.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new q(this,e,!0);return n.addAll(t,c.none,e.from,e.to),u.maxOpen(n.finish())}matchTag(t,e,n){for(let s=n?this.tags.indexOf(n)+1:0;s<this.tags.length;s++){var r,i;let n=this.tags[s];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){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],s=r.style;if(0==s.indexOf(t)&&(!r.context||n.matchesContext(r.context))&&(!(s.length>t.length)||61==s.charCodeAt(t.length)&&s.slice(t.length+1)==e)){if(r.getAttrs
1){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=G(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=G(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 K={address:!0,article:!0,aside:!0,blockquote:!0,body:!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},U={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},_={ol:!0,ul:!0};function W(t,e,n){return null!=e?!!e|2*("full"===e):t&&"pre"==t.whitespace?3:-5&n}class V{constructor(t,e,n,r,i,s){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=c.none,this.match=i||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(o.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=o.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(o.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&&!K.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class q{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=e.topNode,i,s=W(null,e.preserveWhitespace,0)|4*!!n;i=r?new V(r.type,r.attrs,c.none,!0,e.topMatch||r.type.contentMatch,s):n?new V(null,null,c.none,!0,null,s):new V(t.schema.topNodeType,null,c.none,!0,null,s),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,{schema:s}=this.parser;if("full"===i||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(s.linebreakReplacement.create())){let t=n.split(/\r?\n|\r/);for(let n=0;n<t.length;n++)n&&this.insertNode(s.linebreakReplacement.create(),e,!0),t[n]&&this.insertNode(s.text(t[n]),e,!/\S/.test(t[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");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;
vendor: 5,690 bytes, line 1
1(!e||i&&"BR"==i.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(n=n.slice(1))}n&&this.insertNode(s.text(n),e,!/\S/.test(n)),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 s=t.nodeName.toLowerCase(),o;_.hasOwnProperty(s)&&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&&_.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)||(o=this.parser.matchTag(t,this,n));e:if(l?l.ignore:U.hasOwnProperty(s))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(K.hasOwnProperty(s))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 o=l&&l.skip?e:this.readStyles(t,e);o&&this.addAll(t,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(t,e);n&&this.addElementByRule(t,l,n,!1===l.consuming?o: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,!0)}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,s;if(e.node)if((s=this.parser.schema.nodes[e.node]).isLeaf)this.insertNode(s.create(e.attrs),n,"BR"==t.nodeName)||this.leafFallback(t,n);else{let t=this.enter(s,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 o=this.top;if(s&&s.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,!1));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(o)&&this.open--}addAll(t,e,n,r){let i=n||0;for(let s=n?t.childNodes[n]:t.firstChild,o=null==r?null:t.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,e);this.findAtPoint(t,i)}findPlace(t,e,n){let r,i;for(let e=this.open,s=0;e>=0;e--){let o=this.nodes[e],l=o.findWrapping(t);if(l&&(!r||r.length>l.length+s)&&(r=l,i=o,!l.length))break;if(o.solid){if(n)break;s+=2}}if(!r)return null;this.sync(i);for(let t=0;t<r.length;t++)e=this.enterInner(r[t],null,e,!1);return e}insertNode(t,e,n){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let r=this.findPlace(t,e,n);if(r){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let n=c.none;for(let i of r.concat(t.marks))(e.type?e.type.allowsMarkType(i.type):Y(i.type,t.type))&&(n=i.addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n,r){let i=this.findPlace(t.create(e),n,!1);return i&&(i=this.enterInner(t,e,n,!0,r)),i}enterInner(t,e,n,r=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let o=W(t,i,s.options);4&s.options&&0==s.content.length&&(o|=4);let l=c.none;return n=n.filter(e=>(s.type?!s.type.allowsMarkType(e.type):!Y(e.type,t))||(l=e.addToSet(l),!1)),this.nodes.push(new V(t,e,l,r,null,o)),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,s=(t,o)=>{for(;t>=0;t--){let l=e[t];if(""==l){if(t==e.length-1||0==t)continue;for(;o>=i;o--)if(s(t-1,o))return!0;return!1}
1{let t=o>0||0==o&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!t||t.name!=l&&!t.isInGroup(l))return!1;o--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}}function G(t){let e={};for(let n in t)e[n]=t[n];return e}function Y(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=t=>{s.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e||0>s.indexOf(i)&&o(i))return!0}};if(o(i.contentMatch))return!0}}class X{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=Z(e).createDocumentFragment());let r=n,i=[];return t.forEach(t=>{if(i.length||t.marks.length){let n=0,s=0;for(;n<i.length&&s<t.marks.length;){let e=t.marks[s];if(!this.marks[e.type.name]){s++;continue}if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,s++}for(;n<i.length;)r=i.pop()[1];for(;s<t.marks.length;){let n=t.marks[s++],o=this.serializeMark(n,t.isInline,e);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(t,e))}),n}serializeNodeInner(t,e){if(t.isText)return Z(e).createTextNode(t.text);let{dom:n,contentDOM:r}=te(Z(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&&te(Z(n),r(t,e),null,t.attrs)}static renderSpec(t,e,n=null,r){return"string"==typeof e?{dom:t.createTextNode(e)}:te(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new X(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=Q(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return Q(t.marks)}}function Q(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Z(t){return t.document||window.document}let tt=new WeakMap;function te(t,e,n,r){let i,s,o;if(1==e.nodeType)return{dom:e};if(e.dom&&1==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===(s=tt.get(r))&&tt.set(r,(o=null,!function t(e){if(e&&"object"==typeof e)if(Array.isArray(e))if("string"==typeof e[0])o||(o=[]),o.push(e);else for(let n=0;n<e.length;n++)t(e[n]);else for(let n in e)t(e[n])}(r),s=o)),a=s)&&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 c=n?t.createElementNS(n,l):t.createElement(l),p=e[1],u=1;if(p&&"object"==typeof p&&null==p.nodeType&&!Array.isArray(p)){for(let t in u=2,p)if(null!=p[t]){let e=t.indexOf(" ");e>0?c.setAttributeNS(t.slice(0,e),t.slice(e+1),p[t]):"style"==t&&c.style?c.style.cssText=p[t]:c.setAttribute(t,p[t])}}for(let s=u;s<e.length;s++){let o=e[s];if(0===o){if(s<e.length-1||s>u)throw RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}if("string"==typeof o)c.appendChild(t.createTextNode(o));else{let{dom:e,contentDOM:s}=te(t,o,n,r);if(c.appendChild(e),s){if(i)throw RangeError("Multiple content holes");i=s}}}return{dom:c,contentDOM:i}}},42080:(t,e,n)=>{n.d(e,{$B:()=>l,Sd:()=>s,T2:()=>o});var r=n(8242),i=n(27050);function s(t,e=null){return function(n,s){let{$from:o,$to:l}=n.selection,a=o.blockRange(l);if(!a)return!1;let h=s?n.tr:null;return!!function(t,e,n,s=null){let o=!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);
1l=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)),o=!0}let h=(0,r.oM)(l,n,s,e);return!!h&&(t&&function(t,e,n,s,o){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*!!s,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==o&&(a=t+1);let h=n.length-a,c=e.start+n.length-2*!!s,p=e.parent;for(let n=e.startIndex,i=e.endIndex,s=!0;n<i;n++,s=!1)!s&&(0,r.zy)(t.doc,c,h)&&(t.split(c,h),c+=2*h),c+=p.child(n).nodeSize}(t,e,h,o,n),!0)}(h,a,t,e)&&(s&&s(h.scrollIntoView()),!0)}}function o(t){return function(e,n){let{$from:s,$to:o}=e.selection,l=s.blockRange(o,e=>e.childCount>0&&e.firstChild.type==t);return!!l&&(!n||(s.node(l.depth-1).type==t?function(t,e,n,s){let o=t.tr,l=s.end,a=s.$to.end(s.depth);l<a&&(o.step(new r.Wg(l-1,a,l,a,new i.Ji(i.FK.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new i.u$(o.doc.resolve(s.$from.pos),o.doc.resolve(a),s.depth));let h=(0,r.jP)(s);if(null==h)return!1;o.lift(s,h);let c=o.doc.resolve(o.mapping.map(l,-1)-1);return(0,r.n9)(o.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&o.join(c.pos),e(o.scrollIntoView()),!0}(e,n,t,l):function(t,e,n){let s=t.tr,o=n.parent;for(let t=n.end,e=n.endIndex-1,r=n.startIndex;e>r;e--)t-=o.child(e).nodeSize,s.delete(t-1,t+1);let l=s.doc.resolve(n.start),a=l.nodeAfter;if(s.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;
1let h=0==n.startIndex,c=n.endIndex==o.childCount,p=l.node(-1),u=l.index(-1);if(!p.canReplace(u+ +!h,u+1,a.content.append(c?i.FK.empty:i.FK.from(o))))return!1;let d=l.pos,f=d+a.nodeSize;return s.step(new r.Wg(d-!!h,f+ +!!c,d+1,f-1,new i.Ji((h?i.FK.empty:i.FK.from(o.copy(i.FK.empty))).append(c?i.FK.empty:i.FK.from(o.copy(i.FK.empty))),+!h,+!c),+!h)),e(s.scrollIntoView()),!0}(e,n,l)))}}function l(t){return function(e,n){let{$from:s,$to:o}=e.selection,l=s.blockRange(o,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,c=h.child(a-1);if(c.type!=t)return!1;if(n){let s=c.lastChild&&c.lastChild.type==h.type,o=i.FK.from(s?t.create():null),a=new i.Ji(i.FK.from(t.create(null,i.FK.from(h.type.create(null,o)))),s?3:1,0),p=l.start,u=l.end;n(e.tr.step(new r.Wg(p-(s?3:1),u,p,u,a,1,!0)).scrollIntoView())}return!0}}},43561:(t,e,n)=>{n.d(e,{A:()=>r});var r=n(62678).Or},62678:(t,e,n)=>{n.d(e,{n4:()=>$,QO:()=>j,vR:()=>D,Or:()=>W,JU:()=>G,lb:()=>Y});var r=n(82159),i=n(76865),s=n(8242);class o{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=null!=(n=e.width)?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){if(null!=this.cursorPos&&e.doc!=t.state.doc)if(this.lastDragEvent){let t=this.computeTarget(this.lastDragEvent);t==this.cursorPos?this.updateOverlay():this.setCursor(t)}else 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,s=this.editorView.dom,o=s.getBoundingClientRect(),l=o.width/s.offsetWidth,a=o.height/s.offsetHeight;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(),s=t?r.bottom:r.top;t&&e&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let o=this.width/2*a;i={left:r.left,right:r.right,top:s-o,bottom:s+o}}}}if(!i){let t=this.editorView.coordsAtPos(this.cursorPos),e=this.width/2*l;i={left:t.left-e,right:t.left+e,top:t.top,bottom:t.bottom}}let h=this.editorView.dom.offsetParent;if(!this.element&&(this.element=h.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),h&&(h!=document.body||"static"!=getComputedStyle(h).position)){let n=h.getBoundingClientRect(),r=n.width/h.offsetWidth,i=n.height/h.offsetHeight;t=n.left-h.scrollLeft*r,e=n.top-h.scrollTop*i}else t=-pageXOffset,e=-pageYOffset;this.element.style.left=(i.left-t)/l+"px",this.element.style.top=(i.top-e)/a+"px",this.element.style.width=(i.right-i.left)/l+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}computeTarget(t){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)return null;let o=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,s.Um)(this.editorView.state.doc,o,this.editorView.dragging.slice);null!=t&&(o=t)}return o}dragover(t){if(!this.editorView.editable)return;this.lastDragEvent=t;let e=this.computeTarget(t);null!=e&&(this.setCursor(e),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}var l=n(63197),a=n(12894),h=n(27050);class c extends i.LN{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return c.valid(n)?new c(n):i.LN.near(n)}content(){return h.Ji.empty}eq(t){return t instanceof c&&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 c(t.resolve(e.pos))}getBookmark(){return new p(this.anchor)}static valid(t){let e=t.parent;if(e.inlineContent||!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||u(t.type))return!0;
1if(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||u(t.type))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&&c.valid(t))return t;let r=t.pos,s=null;for(let n=t.depth;;n--){let i=t.node(n);if(e>0?t.indexAfter(n)<i.childCount:t.index(n)>0){s=i.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let o=t.doc.resolve(r);if(c.valid(o))return o}for(;;){let o=e>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!i.nh.isSelectable(s)){t=t.doc.resolve(r+s.nodeSize*e),n=!1;continue n}break}s=o,r+=e;let l=t.doc.resolve(r);if(c.valid(l))return l}return null}}}c.prototype.visible=!1,c.findFrom=c.findGapCursorFrom,i.LN.jsonID("gapcursor",c);class p{constructor(t){this.pos=t}map(t){return new p(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return c.valid(e)?new c(e):i.LN.near(e)}}function u(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}let d=(0,a.K)({ArrowLeft:f("horiz",-1),ArrowRight:f("horiz",1),ArrowUp:f("vert",-1),ArrowDown:f("vert",1)});function f(t,e){let n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,s){let o=t.selection,l=e>0?o.$to:o.$from,a=o.empty;if(o instanceof i.U3){if(!s.endOfTextblock(n)||0==l.depth)return!1;a=!1,l=t.doc.resolve(e>0?l.after():l.before())}let h=c.findGapCursorFrom(l,e,a);return!!h&&(r&&r(t.tr.setSelection(new c(h))),!0)}}function m(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!c.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return!(s&&s.inside>-1&&i.nh.isSelectable(t.state.doc.nodeAt(s.inside)))&&(t.dispatch(t.state.tr.setSelection(new c(r))),!0)}function g(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof c))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 s=h.FK.empty;for(let t=r.length-1;t>=0;t--)s=h.FK.from(r[t].createAndFill(null,s));let o=t.state.tr.replace(n.pos,n.pos,new h.Ji(s,0,0));return o.setSelection(i.U3.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function y(t){if(!(t.selection instanceof c))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",l.zF.create(t.doc,[l.NZ.widget(t.selection.head,e,{key:"gapcursor"})])}var k=function(){};k.prototype.append=function(t){return t.length?(t=k.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},k.prototype.prepend=function(t){return t.length?k.from(t).append(this):this},k.prototype.appendInner=function(t){return new b(this,t)},k.prototype.slice=function(t,e){return(void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e)?k.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},k.prototype.get=function(t){if(!(t<0)&&!(t>=this.length))return this.getInner(t)},k.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)},k.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},k.from=function(t){return t instanceof k?t:t&&t.length?new v(t):k.empty};var v=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}(k);k.empty=new v([]);var b=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}(k);class w{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){let n,r,i,s;if(0==this.eventCount)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}e&&(r=(n=this.remapping(o,this.items.length)).maps.length);let l=t.tr,a=[],h=[];
1return this.items.forEach((t,e)=>{if(!t.step){n||(r=(n=this.remapping(o,e+1)).maps.length),r--,h.push(t);return}if(n){h.push(new x(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 x(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,s=new w(this.items.slice(0,o).append(h.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:s,transform:l,selection:i}}addTransform(t,e,n,r){var i,s;let o,l=[],a=this.eventCount,h=this.items,c=!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]),s=new x(t.mapping.maps[n],i,e),o;(o=c&&c.merge(s))&&(s=o,n?l.pop():h=h.slice(0,h.length-1)),l.push(s),e&&(a++,e=void 0),r||(c=s)}let p=a-n.depth;return p>C&&(i=h,s=p,i.forEach((t,e)=>{if(t.selection&&0==s--)return o=e,!1}),h=i.slice(o),a-=p),new w(h.append(l),a)}remapping(t,e){let n=new s.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 w(this.items.append(t.map(t=>new x(t))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),i=t.mapping,s=t.steps.length,o=this.eventCount;this.items.forEach(t=>{t.selection&&o--},r);let l=e;this.items.forEach(e=>{let r=i.getMirror(--l);if(null==r)return;s=Math.min(s,r);let a=i.maps[r];if(e.step){let s=t.steps[r].invert(t.docs[r]),h=e.selection&&e.selection.map(i.slice(l+1,r));h&&o++,n.push(new x(a,s,h))}else n.push(new x(a))},r);let a=[];for(let t=e;t<s;t++)a.push(new x(i.maps[t]));let h=new w(this.items.slice(0,r).append(a).append(n),o);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((s,o)=>{if(o>=t)r.push(s),s.selection&&i++;else if(s.step){let t=s.step.map(e.slice(n)),o=t&&t.getMap();if(n--,o&&e.appendMap(o,n),t){let l=s.selection&&s.selection.map(e.slice(n));l&&i++;let a=new x(o.invert(),t,l),h,c=r.length-1;(h=r.length&&r[c].merge(a))?r[c]=h:r.push(a)}}else s.map&&n--},this.items.length,0),new w(k.from(r.reverse()),i)}}w.empty=new w(k.empty,0);class x{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 x(e.getMap().invert(),e,this.selection)}}}class S{constructor(t,e,n,r,i){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let C=20;function M(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 T(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}let A=!1,E=null;function O(t){let e=t.plugins;if(E!=e){A=!1,E=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){A=!0;break}}return A}let I=new i.hs("history"),N=new i.hs("closeHistory");function R(t,e){return(n,r)=>{let i=I.getState(n);if(!i||0==(t?i.undone:i.done).eventCount)return!1;if(r){let s=function(t,e,n){let r=O(e),i=I.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),l=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),a=new S(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(o).setMeta(I,{redo:n,historyState:a})}(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}let L=R(!1,!0),z=R(!0,!0);R(!1,!1),R(!0,!1);let $=r.YY.create({name:"characterCount",addOptions:()=>({limit:null,autoTrim:!0,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(t=>""!==t).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=t=>{let e=(null==t?void 0:t.node)||this.editor.state.doc;if("textSize"===((null==t?void 0:t.mode)||this.options.mode)){let t=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(t)}
1return e.nodeSize},this.storage.words=t=>{let e=(null==t?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new i.k_({key:new i.hs("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;let i=this.options.limit,s=this.options.autoTrim;if(null==i||0===i||!1===s){t=!0;return}let o=this.storage.characters({node:r.doc});if(o>i){console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let e=r.tr.deleteRange(0,o-i);return t=!0,e}t=!0},filterTransaction:(t,e)=>{let n=this.options.limit;if(!t.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:e.doc}),i=this.storage.characters({node:t.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!t.getMeta("paste"))return!1;let s=t.selection.$head.pos;return t.deleteRange(s-(i-n),s),!(this.storage.characters({node:t.doc})>n)}})]}}),j=r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(t={}){return new i.k_({view:e=>new o(e,t)})}(this.options)]}});r.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new i.k_({key:new i.hs("focus"),props:{decorations:({doc:t,selection:e})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!n||!r)return l.zF.create(t,[]);let o=0;"deepest"===this.options.mode&&t.descendants((t,e)=>{if(!t.isText){if(!(i>=e&&i<=e+t.nodeSize-1))return!1;o+=1}});let a=0;return t.descendants((t,e)=>!t.isText&&!!(i>=e&&i<=e+t.nodeSize-1)&&((a+=1,"deepest"===this.options.mode&&o-a>0||"shallowest"===this.options.mode&&a>1)?"deepest"===this.options.mode:void s.push(l.NZ.node(e,e+t.nodeSize,{class:this.options.className})))),l.zF.create(t,s)}}})]}});let D=r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[new i.k_({props:{decorations:y,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&c.valid(n)?new c(n):null,handleClick:m,handleKeyDown:d,handleDOMEvents:{beforeinput
1:g}}})],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)))?e:null}}}),F="placeholder",P=new i.hs("tiptap__placeholder");function B(t){let{editor:e,placeholder:n,dataAttribute:r,pos:i,node:s,isEmptyDoc:o,hasAnchor:a,classes:{emptyNode:h,emptyEditor:c}}=t,p=[h];return o&&p.push(c),l.NZ.node(i,i+s.nodeSize,{class:p.join(" "),[r]:"function"==typeof n?n({editor:e,node:s,pos:i,hasAnchor:a}):n})}function J(t,e){return"function"==typeof t?t(e):t}function H({editor:t,options:e,dataAttribute:n,doc:i,selection:s,from:o,to:l}){let{anchor:a}=s,h=[],c=t.isEmpty;return i.nodesBetween(o,l,(i,s)=>{let o=a>=s&&a<=s+i.nodeSize,l=!i.isLeaf&&(0,r.Op)(i);return i.type.isTextblock&&(o||!e.showOnlyCurrent)&&l&&h.push(B({editor:t,isEmptyDoc:c,dataAttribute:n,hasAnchor:o,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:J(e.emptyNodeClass,{editor:t,node:i,pos:s,hasAnchor:o})},node:i,pos:s})),e.includeChildren}),h}function K({editor:t,options:e,dataAttribute:n,doc:i,selection:s}){if(!(t.isEditable||!e.showOnlyWhenEditable))return null;let{anchor:o}=s,a=[],h=t.isEmpty;if(e.showOnlyCurrent&&!e.includeChildren){let s=i.resolve(o),l=s.depth>0?s.node(1):s.nodeAfter,c=s.depth>0?s.before(1):o;if(l&&l.type.isTextblock&&(0,r.Op)(l)){let r=o>=c&&o<=c+l.nodeSize;a.push(B({editor:t,isEmptyDoc:h,dataAttribute:n,hasAnchor:r,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:J(e.emptyNodeClass,{editor:t,node:l,pos:c,hasAnchor:r})},node:l,pos:c}))}}else a.push(...H({editor:t,options:e,dataAttribute:n,doc:i,selection:s,from:0,to:i.content.size}));return l.zF.create(i,a)}function U(t,e){let n=t.resolve(e);if(0===n.depth){var r;let t=null!=(r=n.nodeAfter)?r:n.nodeBefore;if(!t)return{from:e,to:e};let i=n.nodeAfter?e:e-t.nodeSize;return{from:i,to:i+t.nodeSize}}let i=n.before(1);return{from:i,to:i+n.node(1).nodeSize}}function _(t,e){return{from:Math.max(0,e.from-1),to:Math.min(t.content.size,e.to-1)}}let W=r.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:F,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[function({editor:t,options:e}){let n=e.dataAttribute?`data-${e.dataAttribute.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}`:`data-${F}`,s=e.showOnlyCurrent&&!e.includeChildren;return new i.k_({key:P,...s?{}:{state:function({editor:t,options:e,dataAttribute:n}){return{init(r,i){let s=K({editor:t,options:e,dataAttribute:n,doc:i.doc,selection:i.selection});return null!=s?s:l.zF.empty},apply:(i,s,o,l)=>i.docChanged||i.selectionSet?function({decorations:t,ranges:e,editor:n,options:r,dataAttribute:i,doc:s,selection:o}){let l=t;for(let t of e){let{from:e,to:a}=function(t,e,n){let r=Math.max(0,Math.min(t,n.content.size));return{from:r,to:Math.max(r,Math.min(e,n.content.size))}}(t.from,t.to,s),h=l.find(e,a).filter(t=>t.from>=e&&t.to<=a);h.length&&(l=l.remove(h));let c=H({editor:n,options:r,dataAttribute:i,doc:s,selection:o,from:e,to:a});c.length&&(l=l.add(s,c))}return l}({decorations:s.map(i.mapping,i.doc),ranges:function(t,e,n){let i=[];if(t.docChanged)for(let e of(0,r.FF)(t))i.push(...function(t,e){var n,r;let i,s=(n=e.from,r=e.to,i=[],t.forEach((t,e)=>{let s=e+t.nodeSize,o=s+1;e+1<r&&o>n&&i.push({from:e,to:s})}),i);return s.push(_(t,U(t,e.from))),e.to>e.from?s.push(_(t,U(t,Math.min(e.to,t.content.size+1)-1))):e.from<t.content.size+1&&s.push(_(t,U(t,Math.min(e.from+1,t.content.size)))),s}(n.doc,e.newRange));return t.selectionSet&&(i.push(_(n.doc,U(n.doc,t.mapping.map(e.selection.anchor)))),i.push(_(n.doc,U(n.doc,n.selection.anchor)))),function(t){if(0===t.length)return[];let e=[...t].sort((t,e)=>t.from-e.from),n=[{...e[0]}];for(let t=1;t<e.length;t+=1){let r=n[n.length-1],i=e[t];i.from<=r.to?r.to=Math.max(r.to,i.to):n.push({...i})}return n}(i)}(i,o,l),editor:t,options:e,dataAttribute:n,doc:l.doc,selection:l.selection}):s}}({editor:t,options:e,dataAttribute:n})},props:{decorations:s?({doc:r,selection:i})=>K({editor:t,options:e,dataAttribute:n,doc:r,selection:i}):n=>{var r;return e.showOnlyWhenEditable&&!t.isEditable?l.zF.empty:null!=(r=P.getState(n))?r:l.zF.empty}}})}({editor:this.editor,options:this.options})]}});function V(t,e){return!t.selection.empty&&!(0,r.BQ)(t.selection)&&e.isEditable}function q({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(null==e?void 0:e.type)===t}r.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:t,options:e}=this;return[new i.k_({key:new i.hs("selection"),props:{decorations:n=>!V(n,t)||t.isFocused||t.view.dragging?null:l.zF.create(n.doc,[l.NZ.inline(n.selection.from,n.selection.to,{class:e.className})]),handleDOMEvents:{blur(e){var n;return!!V(e.state,t)&&(null==(n=window.getSelection())||n.removeAllRanges(),!1)},focus:e=>!!V(e.state,t)&&(requestAnimationFrame(()=>{!t.isDestroyed&&e.hasFocus()&&e.focus()}),!1)}}})]}});let G=r.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var t;let e=new i.hs(this.name),n=this.options.node||(null==(t=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,t])=>t).filter(t=>(this.options.notAfter||[]).concat(n).includes(t.name));return[new i.k_({key:e,appendTransaction:(t,r,i)=>{let{doc:s,tr:o,schema:l}=i,a=e.getState(i),h=s.content.size,c=l.nodes[n];if(!t.some(t=>t.getMeta("skipTrailingNode"))&&a)return o.insert(h,c.create())},state:{init:(t,e)=>!q({node:e.tr.doc.lastChild,types:r}),apply:(t,e)=>!t.docChanged||t.getMeta("__uniqueIDTransaction")?e:!q({node:t.doc.lastChild,types:r})}})]}}),Y=r.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>L(t,e),redo:()=>({state:t,dispatch:e})=>z(t,e)}),addProseMirrorPlugins(){return[function(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new i.k_({key:I,state:{init:()=>new S(w.empty,w.empty,null,0,-1),apply:(e,n,r)=>(function(t,e,n,r){let i=n.getMeta(I),s;if(i)return i.historyState;n.getMeta(N)&&(t=new S(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(o&&o.getMeta(I))if(o.getMeta(I).redo)return new S(t.done.addTransform(n,void 0,r,O(e)),t.undone,M(n.mapping.maps),t.prevTime,t.prevComposition);else return new S(t.done,t.undone.addTransform(n,void 0,r,O(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||o&&!1===o.getMeta("addToHistory"))if(s=n.getMeta("rebased"))return new S(t.done.rebased(n,s),t.undone.rebased(n,s),T(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);else return new S(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),T(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let i=n.getMeta("composition"),s=0==t.prevTime||!o&&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=o?T(t.prevRanges,n.mapping):M(n.mapping.maps);return new S(t.done.addTransform(n,s?e.selection.getBookmark():void 0,r,O(e)),w.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?L:"historyRedo"==n?z:null;return!!r&&!!t.editable&&(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()}}})},65538:(t,e,n)=>{var r=n(12115),i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},s=r.useState,o=r.useEffect,l=r.useLayoutEffect,a=r.useDebugValue;function h(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!i(t,n)}catch(t){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=s({inst:{value:n,getSnapshot:e}}),i=r[0].inst,c=r[1];return l(function(){i.value=n,i.getSnapshot=e,h(i)&&c({inst:i})},[t,n,e]),o(function(){return h(i)&&c({inst:i}),t(function(){h(i)&&c({inst:i})})},[t]),a(n),n};e.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},76865:(t,e,n)=>{n.d(e,{$t:()=>S,LN:()=>o,U3:()=>c,hs:()=>A,i5:()=>f,k_:()=>C,nh:()=>u});var r=n(27050),i=n(8242);let s=Object.create(null);class o{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 s=t.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:a,$to:h}=o[l],c=t.mapping.slice(s);t.replaceRange(c.map(a.pos),c.map(h.pos),l?r.Ji.empty:e),0==l&&y(t,s,(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:s,$to:o}=r[i],l=t.mapping.slice(n),a=l.map(s.pos),h=l.map(o.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 c(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.node(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=s[e.type];if(!n)throw RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in s)throw RangeError("Duplicate use of selection JSON ID "+t);return s[t]=e,e.prototype.jsonID=t,e}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}o.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 c extends o{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 o.near(n);let r=t.resolve(e.map(this.anchor));return new c(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 c&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new p(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 c(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=o.findFrom(e,n,!0)||o.findFrom(e,-n,!0);if(!t)return o.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r?t=e:(t=(o.findFrom(t,-n,!0)||o.findFrom(t,n,!0)).$anchor).pos<e.pos!=r<0&&(t=e)),new c(t,e)}}o.jsonID("text",c);class p{constructor(t,e){this.anchor=t,this.head=e}map(t){return new p(t.map(this.anchor),t.map(this.head))}resolve(t){return c.between(t.resolve(this.anchor),t.resolve(this.head))}}class u extends o{constructor(t){let e=t.nodeAfter,n=t.node(0).resolve(t.pos+e.nodeSize);super(t,n),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),i=t.resolve(r);return n?o.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,o.jsonID("node",u);class d{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new p(n,n):new d(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&u.isSelectable(n)?new u(e):o.near(e)}}class f extends o{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}
1replace(t,e=r.Ji.empty){if(e==r.Ji.empty){t.delete(0,t.doc.content.size);let e=o.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}}o.jsonID("all",f);let m={map(){return this},resolve:t=>new f(t)};function g(t,e,n,r,i,s=!1){if(e.inlineContent)return c.create(t,n);for(let o=r-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let r=e.child(o);if(r.isAtom){if(!s&&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,s);if(e)return e}n+=r.nodeSize*i}return null}function y(t,e,n){let r,s=t.steps.length-1;if(s<e)return;let l=t.steps[s];(l instanceof i.Ln||l instanceof i.Wg)&&(t.mapping.maps[s].forEach((t,e,n,i)=>{null==r&&(r=i)}),t.setSelection(o.near(t.doc.resolve(r),n)))}class k 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),!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.selection.to!=e+t.length||this.setSelection(o.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 v(t,e){return e&&t?t.bind(e):t}class b{constructor(t,e,n){this.name=t,this.init=v(e.init,n),this.apply=v(e.apply,n)}}let w=[new b("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new b("selection",{init:(t,e)=>t.selection||o.atStart(e.doc),apply:t=>t.selection}),new b("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new b("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=w.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 b(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 s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let l=r?r[s].n:0,a=r?r[s].state:this,h=l<e.length&&o.spec.appendTransaction.call(o,l?e.slice(l):e,a,n);if(h&&n.filterTransaction(h,s)){if(h.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<s?{state:n,n:e.length}:{state:this,n:0})}e.push(h),n=n.applyInner(h),i=!0}r&&(r[s]={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 k(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),s=new S(i);return i.fields.forEach(i=>{if("doc"==i.name)s.doc=r.bP.fromJSON(t.schema,e.doc);else if("selection"==i.name)s.selection=o.fromJSON(s.doc,e.selection);else if("storedMarks"==i.name)e.storedMarks&&(s.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let r in n){let o=n[r],l=o.spec.state;if(o.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,r)){s[i.name]=l.fromJSON.call(o,t,e[r],s);return}}s[i.name]=i.init(t,s)}}),s}}class C{constructor(t){this.spec=t,this.props={},t.props&&function t(e,n,r){for(let i in e){let s=e[i];s instanceof Function?s=s.bind(n):"handleDOMEvents"==i&&(s=t(s,n,{})),r[i]=s}return r}(t.props,this,this.props),this.key=t.key?t.key.key:T("plugin")}getState(t){return t[this.key]}}let M=Object.create(null);function T(t){return t in M?t+"$"+ ++M[t]:(M[t]=0,t+"$")}class A{constructor(t="key"){this.key=T(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},83694:(t,e,n)=>{n.d(e,{A:()=>s,z:()=>i});var r=n(82159);let i=r.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}],renderHTML({HTMLAttributes:t}){return["u",(0,r.KV)(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown:(t,e)=>`++${e.renderChildren(t)}++`,markdownTokenizer:{name:"underline",level:"inline",start:t=>t.indexOf("++"),tokenize(t,e,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});var s=i},89908:(t,e,n)=>{n.d(e,{t:()=>i});var r=Object.defineProperty,i=(t,e)=>{let n={};for(var i in t)r(n,i,{get:t[i],enumerable:!0});return e||r(n,Symbol.toStringTag,{value:"Module"}),n}},91849:(t,e,n)=>{n.d(e,{A:()=>e1});var r=n(82159),i=n(27050),s=n(76865);let o=new WeakSet,l=new WeakSet;function a(t){return o.add(t),t}function h(t){return Array.isArray(t)&&o.has(t)}let c=(t,e)=>(function(t,e){if("slot"===t)return 0;if(t instanceof Function){let n=t(e);return!Array.isArray(n)||h(n)||l.has(n)?n:a(n)}let{children:n,...r}=null!=e?e:{};if("svg"===t)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");if(Array.isArray(n)){if(h(n))return a([t,r,n]);if(0===n.length)return a([t,r]);let e=function t(e){return e.flatMap(e=>null==e?[]:Array.isArray(e)&&l.has(e)&&!h(e)?t(e):[e])}(n);return 0===e.length?a([t,r]):a([t,r,...e])}return null!=n?a([t,r,n]):a([t,r])})(t,e),p=/^\s*>\s$/,u=r.bP.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return c("blockquote",{...(0,r.KV)(this.options.HTMLAttributes,t),children:c("slot",{})})},parseMarkdown:(t,e)=>{var n;let r=null!=(n=e.parseBlockChildren)?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";let n=[];return t.content.forEach((t,r)=>{var i,s;let o=(null!=(i=null==(s=e.renderChild)?void 0:s.call(e,t,r))?i:e.renderChildren([t])).split("\n").map(t=>""===t.trim()?">":`> ${t}`);n.push(o.join("\n"))}),n.join(`
2>
3`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}}
3,addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>((t,e)=>{var n;let{state:r}=t,{selection:o}=r;if(!o.empty)return!1;let{$from:l}=o;if(0!==l.parentOffset)return!1;let a=l.depth-1;if(a<0)return!1;let h=l.node(a),c=l.index(a);if(0===c)return!1;if(h.type===e)return t.commands.lift(e.name);let p=h.child(c-1);if(p.type!==e||!(null==(n=p.lastChild)?void 0:n.isTextblock))return!1;let u=l.before()-1-1;return t.commands.command(({tr:t,dispatch:e})=>{if(!e)return!0;let n=l.parent.content,r=new i.Ji(n,0,0);return t.replace(u,l.after(),r),t.setSelection(s.U3.create(t.doc,u+n.size)),t.scrollIntoView(),e(t),!0})})(this.editor,this.type)}},addInputRules(){return[(0,r.tG)({find:p,type:this.type})]}}),d=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,f=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,m=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,g=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,y=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 c("strong",{...(0,r.KV)(this.options.HTMLAttributes,t),children:c("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,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()}}
3,addInputRules(){return[(0,r.OX)({find:d,type:this.type}),(0,r.OX)({find:m,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:f,type:this.type}),(0,r.Zc)({find:g,type:this.type})]}}),k=t=>{let e=/`([^`]+)`(?!`)$/.exec(t);return!e||e.index>0&&"`"===t[e.index-1]?null:{index:e.index,text:e[0],replaceWith:e[1]}},v=t=>{let e,n=/`([^`]+)`(?!`)/g,r=[];for(;null!==(e=n.exec(t));)e.index>0&&"`"===t[e.index-1]||r.push({index:e.index,text:e[0],replaceWith:e[1]});return r},b=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]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",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()}}
3,addInputRules(){return[(0,r.OX)({find:k,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:v,type:this.type})]}}),w=/^```([a-z]+)?[\s\n]$/,x=/^~~~([a-z]+)?[\s\n]$/,S=r.bP.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,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;if(!n)return null;let r=[...(null==(e=t.firstElementChild)?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]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return(null==(n=t.raw)?void 0:n.startsWith("```"))===!1&&(null==(r=t.raw)?void 0:r.startsWith("~~~"))===!1&&"indented"!==t.codeBlockStyle?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r=(null==(n=t.attrs)?void 0:n.language)||"";return t.content?[`\`\`\`${r}`,e.renderChildren(t.content),"```"].join("\n"):`\`\`\`${r}
4
5\`\`\``},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()},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=null!=(e=this.options.tabSize)?e:4,{state:r}=t,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;let l=" ".repeat(n);return o?t.commands.insertContent(l):t.commands.command(({tr:t})=>{let{from:e,to:n}=i,s=r.doc.textBetween(e,n,"\n","\n").split("\n").map(t=>l+t).join("\n");return t.replaceWith(e,n,r.schema.text(s)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=null!=(e=this.options.tabSize)?e:4,{state:r}=t,{selection:i}=r,{$from:o,empty:l}=i;return o.parent.type===this.type&&(l?t.commands.command(({tr:t})=>{var e;let{pos:i}=o,l=o.start(),a=o.end(),h=r.doc.textBetween(l,a,"\n","\n").split("\n"),c=0,p=0,u=i-l;for(let t=0;t<h.length;t+=1){if(p+h[t].length>=u){c=t;break}p+=h[t].length+1}let d=Math.min(((null==(e=h[c].match(/^ */))?void 0:e[0])||"").length,n);if(0===d)return!0;let f=l;for(let t=0;t<c;t+=1)f+=h[t].length+1;return t.delete(f,f+d),i-f<=d&&t.setSelection(s.U3.create(t.doc,f)),!0}):t.commands.command(({tr:t})=>{let{from:e,to:s}=i,o=r.doc.textBetween(e,s,"\n","\n").split("\n").map(t=>{var e;let r=Math.min(((null==(e=t.match(/^ */))?void 0:e[0])||"").length,n);return t.slice(r)}).join("\n");return t.replaceWith(e,s,r.schema.text(o)),!0}))},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 s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith("\n\n");return!!s&&!!o&&t.chain().command(({tr:t})=>(t.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:t})=>{if(!this.options.exitOnArrowUp)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type||0!==r.parentOffset)return!1;let s=r.before();return!(s>0)&&t.commands.insertDefaultBlock({pos:s})},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 l=i.after();return void 0!==l&&(r.nodeAt(l)?t.commands.command(({tr:t})=>(t.setSelection(s.LN.near(r.resolve(l))),!0)):t.commands.exitCode())}}}
5,addInputRules(){return[(0,r.JJ)({find:w,type:this.type,getAttributes:t=>({language:t[1]})}),(0,r.JJ)({find:x,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new s.k_({key:new s.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:l,schema:a}=t.state,h=a.text(n.replace(/\r\n?/g,"\n"));return l.replaceSelectionWith(this.type.create({language:o},h)),l.selection.$from.parent.type!==this.type&&l.setSelection(s.U3.near(l.doc.resolve(Math.max(0,l.selection.from-2)))),l.setMeta("paste",!0),t.dispatch(l),!0}}})]}}),C=r.bP.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n\n"):""}),M=r.bP.create({name:"hardBreak",markdownTokenName:"br",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",renderMarkdown:()=>`  
6`,parseMarkdown:()=>({type:"hardBreak"}),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:s}=this.options,{splittableMarks:o}=r.extensionManager,l=i||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{if(e&&l&&s){let e=l.filter(t=>o.includes(t.type.name));t.ensureMarks(e)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),T=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}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;let r=(null==(n=t.attrs)?void 0:n.level)?parseInt(t.attrs.level,10):1,i="#".repeat(r);return t.content?`${i} ${e.renderChildren(t.content)}`:""},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}}
6)\\s$`),type:this.type,getAttributes:{level:t}}))}}),A=r.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",(0,r.KV)(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!(0,r.AB)(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$to:i}=n,o=t();return(0,r.BQ)(n)?o.insertContentAt(i.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:t,tr:e,dispatch:n})=>{if(n){let{$to:n}=e.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?e.setSelection(s.U3.create(e.doc,n.pos+1)):n.nodeAfter.isBlock?e.setSelection(s.nh.create(e.doc,n.pos)):e.setSelection(s.U3.create(e.doc,n.pos));else{let i=t.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,o=null==i?void 0:i.create();o&&(e.insert(r,o),e.setSelection(s.U3.create(e.doc,r+1)))}e.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.Ce)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
6ype})]}}),E=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,O=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,I=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,N=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,R=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)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}}
6,addInputRules(){return[(0,r.OX)({find:E,type:this.type}),(0,r.OX)({find:I,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:O,type:this.type}),(0,r.Zc)({find:N,type:this.type})]}}),L="numeric",z="ascii",$="alpha",j="asciinumeric",D="alphanumeric",F="domain",P="emoji",B="whitespace";function J(t,e,n){for(let r in e[L]&&(e[j]=!0,e[D]=!0),e[z]&&(e[j]=!0,e[$]=!0),e[j]&&(e[D]=!0),e[$]&&(e[D]=!0),e[D]&&(e[F]=!0),e[P]&&(e[F]=!0),e){let e=(r in n||(n[r]=[]),n[r]);0>e.indexOf(t)&&e.push(t)}}function H(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}H.groups={},H.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||H.groups,e&&e.j?i=e:(i=new H(e),n&&r&&J(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this,s=t.length;if(!s)return i;for(let e=0;e<s-1;e++)i=i.tt(t[e]);return i.tt(t[s-1],e,n,r)},tt(t,e,n,r){if(r=r||H.groups,e&&e.j)return this.j[t]=e,e;let i,s=this.go(t);return s?(Object.assign((i=new H).j,s.j),i.jr.push.apply(i.jr,s.jr),i.jd=s.jd,i.t=s.t):i=new H,e&&(r&&(i.t&&"string"==typeof i.t?J(e,Object.assign(function(t,e){let n={};for(let r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}(i.t,r),n),r):n&&J(e,n,r)),i.t=e),this.j[t]=i,i}};let K=(t,e,n,r,i)=>t.ta(e,n,r,i),U=(t,e,n,r,i)=>t.tr(e,n,r,i),_=(t,e,n,r,i)=>t.ts(e,n,r,i),W=(t,e,n,r,i)=>t.tt(e,n,r,i),V="WORD",q="UWORD",G="ASCIINUMERICAL",Y="ALPHANUMERICAL",X="LOCALHOST",Q="UTLD",Z="SCHEME",tt="SLASH_SCHEME",te="OPENBRACE",tn="CLOSEBRACE",tr="OPENBRACKET",ti="CLOSEBRACKET",ts="OPENPAREN",to="CLOSEPAREN",tl="OPENANGLEBRACKET",ta="CLOSEANGLEBRACKET",th="FULLWIDTHLEFTPAREN",tc="FULLWIDTHRIGHTPAREN",tp="LEFTCORNERBRACKET",tu="RIGHTCORNERBRACKET",td="LEFTWHITECORNERBRACKET",tf="RIGHTWHITECORNERBRACKET",tm="FULLWIDTHLESSTHAN",tg="FULLWIDTHGREATERTHAN",ty="AMPERSAND",tk="APOSTROPHE",tv="ASTERISK",tb="BACKSLASH",tw="BACKTICK",tx="CARET",tS="COLON",tC="COMMA",tM="DOLLAR",tT="EQUALS",tA="EXCLAMATION",tE="HYPHEN",tO="PERCENT",tI="PIPE",tN="PLUS",tR="POUND",tL="QUERY",tz="QUOTE",t$="FULLWIDTHMIDDLEDOT",tj="SEMI",tD="SLASH",tF="TILDE",tP="UNDERSCORE",tB="EMOJI";var tJ=Object.freeze({__proto__:null,ALPHANUMERICAL:Y,AMPERSAND:ty,APOSTROPHE:tk,ASCIINUMERICAL:G,ASTERISK:tv,AT:"AT",BACKSLASH:tb,BACKTICK:tw,CARET:tx,CLOSEANGLEBRACKET:ta,CLOSEBRACE:tn,CLOSEBRACKET:ti,CLOSEPAREN:to,COLON:tS,COMMA:tC,DOLLAR:tM,DOT:"DOT",EMOJI:tB,EQUALS:tT,EXCLAMATION:tA,FULLWIDTHGREATERTHAN:tg,FULLWIDTHLEFTPAREN:th,FULLWIDTHLESSTHAN:tm,FULLWIDTHMIDDLEDOT:t$,FULLWIDTHRIGHTPAREN:tc,HYPHEN:tE,LEFTCORNERBRACKET:tp,LEFTWHITECORNERBRACKET:td,LOCALHOST:X,NL:"NL",NUM:"NUM",OPENANGLEBRACKET:tl,OPENBRACE:te,OPENBRACKET:tr,OPENPAREN:ts,PERCENT:tO,PIPE:tI,PLUS:tN,POUND:tR,QUERY:tL,QUOTE:tz,RIGHTCORNERBRACKET:tu,RIGHTWHITECORNERBRACKET:tf,SCHEME:Z,SEMI:tj,SLASH:tD,SLASH_SCHEME:tt,SYM:"SYM",TILDE:tF,TLD:"TLD",UNDERSCORE:tP,UTLD:Q,UWORD:q,WORD:V,WS:"WS"});let tH=/[a-z]/,tK=/\p{L}/u,tU=/\p{Emoji}/u,t_=/\d/,tW=/\s/,tV=null,tq=null;function tG(t,e){let n=function(t){let e=[],n=t.length,r=0;for(;r<n;){let i,s=t.charCodeAt(r),o=s<55296||s>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}(e.replace(/[A-Z]/g,t=>t.toLowerCase())),r=n.length,i=[],s=0,o=0;for(;o<r;){let l=t,a=null,h=0,c=null,p=-1,u=-1;for(;o<r&&(a=l.go(n[o]));)(l=a).accepts()?(p=0,u=0,c=l):p>=0&&(p+=n[o].length,u++),h+=n[o].length,s+=n[o].length,o++;s-=p,o-=u,h-=p,i.push({t:c.t,v:e.slice(s-h,s),s:s-h,e:s})}return i}function tY(t,e,n,r,i){let s,o=e.length;for(let n=0;n<o-1;n++){let o=e[n];t.j[o]?s=t.j[o]:((s=new H(r)).jr=i.slice(),t.j[o]=s),t=s}return(s=new H(n)).jr=i.slice(),t.j[e[o-1]]=s,s}function tX(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 tQ={defaultProtocol:"http",events:null,format:t0,formatHref:t0,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function tZ(t,e=null){let n=Object.assign({},tQ);t&&(n=Object.assign(n,t instanceof tZ?t.o:t));let r=n.ignoreTags,i=[];for(let t=0;t<r.length;t++)i.push(r[t].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}function t0(t){return t}function t1(t,e){this.t="token",this.v=t,this.tk=e}
6function t2(t,e){class n extends t1{constructor(e,n){super(e,n),this.t=t}}for(let t in e)n.prototype[t]=e[t];return n.t=t,n}tZ.prototype={o:tQ,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]:tQ[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)}},t1.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=tQ.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),i=this.toFormattedString(t),s={},o=t.get("className",e,this),l=t.get("target",e,this),a=t.get("rel",e,this),h=t.getObj("attributes",e,this),c=t.getObj("events",e,this);return s.href=n,o&&(s.class=o),l&&(s.target=l),a&&(s.rel=a),h&&Object.assign(s,h),{tagName:r,attributes:s,content:i,eventListeners:c}}};let t3=t2("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),t5=t2("text"),t4=t2("nl"),t6=t2("url",{isLink:!0,toHref(t=tQ.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){let t=this.tk;return t.length>=2&&t[0].t!==X&&t[1].t===tS}}),t9=t=>new H(t);function t8(t,e,n){let r=n[0].s,i=n[n.length-1].e;return new t(e.slice(r,i),n)}let t7="u">typeof console&&console&&console.warn||(()=>{}),et={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ee(t,e=!1){if(et.initialized&&t7(`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.
71. Must only contain digits, lowercase ASCII letters or "-"
82. Cannot start or end with "-"
93. "-" cannot repeat`);et.customSchemes.push([t,e])}function en(t){return et.initialized||function(){et.scanner=function(t=[]){let e={};H.groups=e;let n=new H;null==tV&&(tV=tX("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
9ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==tq&&(tq=tX("ελ1υ2бг1ел3дети4ею2католик6ом3мÐ
9ºÐ´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")),W(n,"'",tk),W(n,"{",te),W(n,"}",tn),W(n,"[",tr),W(n,"]",ti),W(n,"(",ts),W(n,")",to),W(n,"<",tl),W(n,">",ta),W(n,"(",th),W(n,")",tc),W(n,"「",tp),W(n,"」",tu),W(n,"『",td),W(n,"』",tf),W(n,"<",tm),W(n,">",tg),W(n,"&",ty),W(n,"*",tv),W(n,"@","AT"),W(n,"`",tw),W(n,"^",tx),W(n,":",tS),W(n,",",tC),W(n,"$",tM),W(n,".","DOT"),W(n,"=",tT),W(n,"!",tA),W(n,"-",tE),W(n,"%",tO),W(n,"|",tI),W(n,"+",tN),W(n,"#",tR),W(n,"?",tL),W(n,'"',tz),W(n,"/",tD),W(n,";",tj),W(n,"~",tF),W(n,"_",tP),W(n,"\\",tb),W(n,"・",t$);let r=U(n,t_,"NUM",{[L]:!0});U(r,t_,r);let i=U(r,tH,G,{[j]:!0}),s=U(r,tK,Y,{[D]:!0}),o=U(n,tH,V,{[z]:!0});U(o,t_,i),U(o,tH,o),U(i,t_,i),U(i,tH,i);let l=U(n,tK,q,{[$]:!0});U(l,tH),U(l,t_,s),U(l,tK,l),U(s,t_,s),U(s,tH),U(s,tK,s);let a=W(n,"\n","NL",{[B]:!0}),h=W(n,"\r","WS",{[B]:!0}),c=U(n,tW,"WS",{[B]:!0});W(n,"",c),W(h,"\n",a),W(h,"",c),U(h,tW,c),W(c,"\r"),W(c,"\n"),U(c,tW,c),W(c,"",c);let p=U(n,tU,tB,{[P]:!0});W(p,"#"),U(p,tU,p),W(p,"️",p);let u=W(p,"‍");W(u,"#"),U(u,tU,p);let d=[[tH,o],[t_,i]],f=[[tH,null],[tK,l],[t_,s]];for(let t=0;t<tV.length;t++)tY(n,tV[t],"TLD",V,d);for(let t=0;t<tq.length;t++)tY(n,tq[t],Q,q,f);J("TLD",{tld:!0,ascii:!0},e),J(Q,{utld:!0,alpha:!0},e),tY(n,"file",Z,V,d),tY(n,"mailto",Z,V,d),tY(n,"http",tt,V,d),tY(n,"https",tt,V,d),tY(n,"ftp",tt,V,d),tY(n,"ftps",tt,V,d),J(Z,{scheme:!0,ascii:!0},e),J(tt,{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[F]=!0:tH.test(r)?t_.test(r)?i[j]=!0:i[z]=!0:i[L]=!0,_(n,r,r,i)}return _(n,"localhost",X,{ascii:!0}),n.jd=new H("SYM"),{start:n,tokens:Object.assign({groups:e},tJ)}}(et.customSchemes);for(let t=0;t<et.tokenQueue.length;t++)et.tokenQueue[t][1]({scanner:et.scanner});et.parser=function({groups:t}){let e=t.domain.concat([ty,tv,"AT",tb,tw,tx,tM,tT,tE,"NUM",tO,tI,tN,tR,tD,"SYM",tF,tP]),n=[tk,tS,tC,"DOT",tA,tO,tL,tz,tj,tl,ta,te,tn,ti,tr,ts,to,th,tc,tp,tu,td,tf,tm,tg],r=[ty,tk,tv,tb,tw,tx,tM,tT,tE,te,tn,tO,tI,tN,tR,tL,tD,"SYM",tF,tP],i=t9(),s=W(i,tF);K(s,r,s),K(s,t.domain,s);let o=t9(),l=t9(),a=t9();K(i,t.domain,o),K(i,t.scheme,l),K(i,t.slashscheme,a),K(o,r,s),K(o,t.domain,o);let h=W(o,"AT");W(s,"AT",h),W(l,"AT",h),W(a,"AT",h);let c=W(s,"DOT");K(c,r,s),K(c,t.domain,s);let p=t9();K(h,t.domain,p),K(p,t.domain,p);let u=W(p,"DOT");K(u,t.domain,p);let d=t9(t3);K(u,t.tld,d),K(u,t.utld,d),W(h,X,d);let f=W(p,tE);W(f,tE,f),K(f,t.domain,p),K(d,t.domain,p),W(d,"DOT",u),W(d,tE,f);let m=W(o,tE),g=W(o,"DOT");W(m,tE,m),K(m,t.domain,o),K(g,r,s),K(g,t.domain,o);let y=t9(t6);K(g,t.tld,y),K(g,t.utld,y),K(y,t.domain,o),K(y,r,s),W(y,"DOT",g),W(y,tE,m),W(y,"AT",h);let k=W(y,tS),v=t9(t6);K(k,t.numeric,v);let b=t9(t6),w=t9();K(b,e,b),K(b,n,w),K(w,e,b),K(w,n,w),W(y,tD,b),W(v,tD,b);let x=W(l,tS),S=W(a,tS),C=W(S,tD),M=W(C,tD);K(l,t.domain,o),W(l,"DOT",g),W(l,tE,m),K(a,t.domain,o),W(a,"DOT",g),W(a,tE,m),K(x,t.domain,b),W(x,tD,b),W(x,tL,b),K(M,t.domain,b),K(M,e,b),W(M,tD,b);let T=[[te,tn],[tr,ti],[ts,to],[tl,ta],[th,tc],[tp,tu],[td,tf],[tm,tg]];for(let t=0;t<T.length;t++){let[r,i]=T[t],s=W(b,r);W(w,r,s);let o=t9(t6);K(s,e,o);let l=t9();K(s,n,l),W(s,i,b),K(o,e,o),K(o,n,l),K(l,e,o),K(l,n,l),W(o,i,b),W(l,i,b)}return W(i,X,y),W(i,"NL",t4),{start:i,tokens:tJ}}(et.scanner.tokens);for(let t=0;t<et.pluginQueue.length;t++)et.pluginQueue[t][1]({scanner:et.scanner,parser:et.parser});et.initialized=!0}(),function(t,e,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let l=t,a=null,h=null,c=0,p=null,u=-1;for(;i<r&&!(a=l.go(n[i].t));)o.push(n[i++]);for(;i<r&&(h=a||l.go(n[i].t));)a=null,(l=h).accepts()?(u=0,p=l):u>=0&&u++,i++,c++;if(u<0)(i-=c)<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(t8(t5,e,o)),o=[]),i-=u,c-=u;let t=p.t,r=n.slice(i-c,i);s.push(t8(t,e,r))}}return o.length>0&&s.push(t8(t5,e,o)),s}(et.parser.start,t,tG(et.scanner.start,t))}function er(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 tZ(n),i=en(t),s=[];for(let t=0;t<i.length;t++){let n=i[t];n.isLink&&(!e||n.t===e)&&r.check(n)&&s.push(n.toFormattedObject(r))}return s}en.scan=tG;let ei="[\0- \xa0 ᠎ -\u2029  ]",es=new RegExp(ei),eo=RegExp(`${ei}$`),el=RegExp(ei,"g"),ea=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,eh=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function ec(t,e){let n=0;for(let r=e-1;r>=0&&"\\"===t[r];r-=1)n+=1;return n%2==1}function ep(t,e,n){var r,i;let[,s,o]=e;return!((e.index?t[e.index-1]:void 0)==="!"||ec(t,null!=(r=e.index)?r:0)||function(t,e){let n=0,r=0;for(;r<e;){if("`"!==t[r]||0===n&&ec(t,r)){r+=1;continue}let i=0;for(;r<e&&"`"===t[r];)i+=1,r+=1;0===n?n=i:i===n&&(n=0)}return n>0}(t,null!=(i=e.index)?i:0))&&!!s.trim()&&n(o)}function eu(t){var e,n;let[r,i,s,,o,l,a]=t,h=null!=(e=null!=o?o:l)?e:a;return{index:null!=(n=t.index)?n:0,text:r,replaceWith:i,data:{href:s,title:h||null,markdown:!0}}}function ed(t){var e,n,r;return{href:null==(e=t.data)?void 0:e.href,title:null!=(n=null==(r=t.data)?void 0:r.title)?n:null}}function ef(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(el,"").match(RegExp(`^(?:(?:${n.map(t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}let em=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 `val
9idate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{"string"==typeof t?ee(t):ee(t.scheme,t.optionalSlashes)})},onDestroy(){H.groups={},et.scanner=null,et.parser=null,et.tokenQueue=[],et.pluginQueue=[],et.customSchemes=[],et.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!ef(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;let r=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){var t,e,n;return{href:{default:null,parseHTML:t=>t.getAttribute("href")},target:{default:null!=(t=this.options.HTMLAttributes.target)?t:null},rel:{default:null!=(e=this.options.HTMLAttributes.rel)?e:null},class:{default:null!=(n=this.options.HTMLAttributes.class)?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{let e=t.getAttribute("href");return!!e&&!!this.options.isAllowedUri(e,{defaultValidate:t=>!!ef(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:t=>!!ef(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]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,i,s;let o=null!=(n=null==(r=t.attrs)?void 0:r.href)?n:"",l=null!=(i=null==(s=t.attrs)?void 0:s.title)?i:"",a=e.renderChildren(t);return l?`[${a}](${o} "${l}")`:`[${a}](${o})`},addCommands(){return{setLink:t=>({chain:e})=>{let{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!ef(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(!n||!!this.options.isAllowedUri(n,{defaultValidate:t=>!!ef(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()}},addInputRules(){var t;let e;return this.options.markdownLinks?[(t={type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!ef(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})},e=(0,r.OX)({find:e=>{let n=ea.exec(e);return n&&ep(e,n,t.isAllowedHref)?eu(n):null},type:t.type,getAttributes:ed}),new r.fV({find:e.find,handler:t=>{let n=e.handler(t);return null!==n&&t.state.tr.steps.length&&t.state.tr.setMeta("preventAutolink",!0),n}}))]:[]},addPasteRules(){let t=t=>{let e=[];
9if(t){let{protocols:n,defaultProtocol:r}=this.options;er(t).filter(t=>t.isLink&&this.options.isAllowedUri(t.value,{defaultValidate:t=>!!ef(t,n),protocols:n,defaultProtocol:r})).forEach(t=>{this.options.shouldAutoLink(t.value)&&e.push({text:t.value,data:{href:t.href},index:t.start})})}return e};if(this.options.markdownLinks){var e;let n;return[(e={type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!ef(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:t},n=(0,r.Zc)({find:t=>{var n,r;let i=[];for(let n of t.matchAll(eh))ep(t,n,e.isAllowedHref)&&i.push(eu(n));let s=(null!=(n=null==(r=e.findPlainUrls)?void 0:r.call(e,t))?n:[]).filter(t=>!i.some(e=>e.index<t.index+t.text.length&&t.index<e.index+e.text.length));return[...i,...s]},type:e.type,getAttributes:ed}),new r._n({find:n.find,handler:t=>{var e;let r=n.handler(t);return null!==r&&t.state.tr.steps.length&&(null==(e=t.match.data)?void 0:e.markdown)&&t.state.tr.setMeta("preventAutolink",!0),r}}))]}return[(0,r.Zc)({find:t,type:this.type,getAttributes:t=>{var e;return{href:null==(e=t.data)?void 0:e.href}}})]},addProseMirrorPlugins(){var t,e,n;let i=[],{protocols:o,defaultProtocol:l}=this.options;return this.options.autolink&&i.push((t={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!ef(t,o),protocols:o,defaultProtocol:l}),shouldAutoLink:this.options.shouldAutoLink},new s.k_({key:new s.hs("autolink"),appendTransaction:(e,n,i)=>{let s=e.some(t=>t.docChanged)&&!n.doc.eq(i.doc),o=e.some(t=>t.getMeta("preventAutolink"));if(!s||o)return;let{tr:l}=i,a=(0,r.T7)(n.doc,[...e]);if((0,r.FF)(a).forEach(({newRange:e})=>{let n,s,o=(0,r.Nx)(i.doc,e,t=>t.isTextblock);if(o.length>1)n=o[0],s=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ");else if(o.length){let t=i.doc.textBetween(e.from,e.to," "," ");if(!eo.test(t))return;n=o[0],s=i.doc.textBetween(n.pos,e.to,void 0," ")}if(n&&s){let e=s.split(es).filter(Boolean);if(e.length<=0)return!1;let o=e[e.length-1],a=n.pos+s.lastIndexOf(o);if(!o)return!1;let h=en(o).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}}))),i.push((e={type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection},new s.k_({key:new s.hs("handleClickLink"),props:{handleClick:(t,n,i)=>{if(0!==i.button||!t.editable)return!1;let s=null;if(i.target instanceof HTMLAnchorElement)s=i.target;else{let t=i.target;if(!t)return!1;let n=e.editor.view.dom;(s=t.closest("a"))&&!n.contains(s)&&(s=null)}if(!s)return!1;let o=!1;if(e.enableClickSelection&&(o=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){var l,a;let n=(0,r.gu)(t.state,e.type.name),i=null!=(l=s.href)?l:n.href,h=null!=(a=s.target)?a:n.target;i&&(window.open(i,h),o=!0)}return o}}}))),this.options.linkOnPaste&&i.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink},new s.k_({key:new s.hs("handlePasteLink"),props:{handlePaste:(t,e,r)=>{let{shouldAutoLink:i}=n,{state:s}=t,{selection:o}=s,{empty:l}=o;if(l)return!1;let a="";r.content.forEach(t=>{a+=t.textContent});let h=er(a,{defaultProtocol:n.defaultProtocol}).find(t=>t.isLink&&t.value===a);return!!a&&!!h&&(void 0===i||!!i(h.value))&&n.editor.commands.setMark(n.type,{href:h.href})}}}))),i}}),eg="textStyle",ey=/^\s*([-+*])\s$/,ek=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]},markdownTokenName:"list",parseMarkdown:(t,e)=>"list"!==t.type||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownOptions:{indentsContent:!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(eg)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}
9,addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=(0,r.tG)({find:ey,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.tG)({find:ey,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(eg),editor:this.editor})),[t]}}),ev=(t,e)=>r.YY.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>{let n;return n=this.editor,((t,e,n,r)=>{let s=((t,e,n)=>{let{selection:r}=t;if(!r.empty)return null;let{$from:i}=r;if(!i.parent.isTextblock||i.parentOffset!==i.parent.content.size)return null;let s=-1;for(let t=i.depth;t>0;t-=1)if(i.node(t).type.name===e){s=t;break}if(s<0)return null;let o=i.node(s),l=i.index(s);if(l+1>=o.childCount)return null;let a=o.child(l+1);if(!n.includes(a.type.name))return null;let h=t.schema.nodes[e],c=!1;if(a.forEach(t=>{t.type===h&&t.childCount>1&&(c=!0)}),!c)return null;let p=t.doc.resolve(i.after()).nodeAfter;if(!p||!n.includes(p.type.name))return null;let u=[];return(p.forEach(t=>{u.push(t)}),0===u.length)?null:{listItemDepth:s,nestedList:p,nestedListPos:i.after(),insertPos:i.after(s),items:u}})(t,n,r);if(!s)return!1;let{selection:o}=t,{nestedList:l,nestedListPos:a,insertPos:h,items:c}=s,p=t.tr;p.delete(a,a+l.nodeSize);let u=p.mapping.map(h);return p.insert(u,i.FK.from(c)),p.setSelection(o.map(p.doc,p.mapping)),e&&e(p),!0})(n.state,n.view.dispatch,t,e)};return{Delete:n,"Mod-Delete":n}}}),eb=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],ew="abcdefghijklmnopqrstuvwxyz",ex=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function eS(t){let e=t,n="";for(let[t,r]of eb)for(;e>=t;)n+=r,e-=t;return n}function eC(t){return eS(t).toUpperCase()}function eM(t){let e=t.toLowerCase(),n=0,r=0;for(;n<e.length;){let t=!1;for(let[i,s]of eb)if(e.startsWith(s,n)){r+=i,n+=s.length,t=!0;break}if(!t)return 0}return r}function eT(t){if(t<=26)return ew[t-1];let e=Math.floor((t-1)/26)-1,n=(t-1)%26;return e<0?ew[n]:ew[e]+ew[n]}function eA(t){if(!(!t||/^\d+$/.test(t))){if(function(t){if(!/^[ivxlcdmIVXLCDM]+$/.test(t))return!1;let e=eM(t);return!(e<=0)&&(t===t.toLowerCase()?eS(e):eC(e))===t}(t))return t===t.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(t))return"a";if(/^[A-Z]{1,2}$/.test(t))return"A"}}function eE(t){if(/^\d+$/.test(t))return parseInt(t,10);let e=eA(t);if("i"===e||"I"===e)return eM(t);if("a"===e||"A"===e){let e,n=1===(e=t.toLowerCase()).length?e.charCodeAt(0)-97+1:2===e.length?(e.charCodeAt(0)-97+1)*26+(e.charCodeAt(1)-97)+1:0;return n>0?n:1}let n=parseInt(t,10);return Number.isNaN(n)?1:n}let eO=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]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n,r,i,s;if("list_item"!==t.type)return[];let o=null!=(n=e.parseBlockChildren)?n:e.parseChildren,l=[];if(t.tokens&&t.tokens.length>0){let n;if(n=null==(r=t.tokens)?void 0:r[0],t.text&&(null==(i=t.tokens)?void 0:i.length)===1&&(null==n?void 0:n.type)==="list"&&n.ordered&&n.raw===t.text)return{type:"listItem",content:[{type:"paragraph",content:(s=t.text||"",e.tokenizeInline?e.parseInline(e.tokenizeInline(s)):e.parseInline([{type:"text",raw:s,text:s}]))}]};if(t.tokens.some(t=>"paragraph"===t.type))l=o(t.tokens);else{let n=t.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(l=[{type:"paragraph",content:e.parseInline(n.tokens)}],t.tokens.length>1){let e=o(t.tokens.slice(1));l.push(...e)}}else l=o(t.tokens)}}return 0===l.length&&(l=[{type:"paragraph",content:[]}]),{type:"listItem",content:l}},renderMarkdown:(t,e,n)=>(0,r.kj)(t,e,t=>{if("bulletList"===t.parentType)return"- ";if("orderedList"===t.parentType){var e,n;let r=(null==(e=t.meta)||null==(e=e.parentAttrs)?void 0:e.start)||1;return function(t,e,n=". "){let r=e+1;if(!t||"1"===t)return`${r}${n}`;switch(t){case"a":return`${eT(r)}${n}`;case"A":return`${eT(r).toUpperCase()}${n}`;case"i":return`${eS(r)}${n}`;case"I":return`${eC(r)}${n}`;default:return`${r}${n}`}}(null==(n=t.meta)||null==(n=n.parentAttrs)?void 0:n.type,r-1+(t.
9index||0),". ")}return"- "},n,{alignNestedToPrefix:(null==n?void 0:n.parentType)==="orderedList"}),addExtensions(){return[ev(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),eI=(t,e)=>{let{$from:n}=e.selection,i=(0,r.Pg)(t,e.schema),s=n.depth,o=n.pos,l=null;for(;s>0&&null===l;)n.node(s).type===i?l=s:(s-=1,o-=1);return null===l?null:{$pos:e.doc.resolve(o),depth:l}},eN=(t,e)=>{let n=eI(t,e);if(!n)return!1;let[,i]=(0,r.fl)(e,t,n.$pos.pos+4);return i},eR=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!(0,r.rU)(t.state,e)&&((t,e)=>{let{$anchor:n}=t.selection,r=Math.max(0,n.pos-2),i=t.doc.resolve(r).node();return!!i&&!!e.includes(i.type.name)})(t.state,n)){let{$anchor:n}=t.state.selection,r=t.state.doc.resolve(n.before()-1),i=[];r.node().descendants((t,n)=>{t.type.name===e&&i.push({node:t,pos:n})});let s=i.at(-1);if(!s)return!1;let o=t.state.doc.resolve(r.start()+s.pos+1);return t.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!(0,r.rU)(t.state,e)||!(0,r.J_)(t.state))return!1;let{$from:i}=t.state.selection,s=i.depth-1;return i.node(s).type===t.schema.nodes[e]&&0===i.index(s)&&t.chain().liftListItem(e).run()},eL=(t,e)=>{var n,i;let s,o,l,a;if(!(0,r.rU)(t.state,e)||!(0,r.QN)(t.state,e))return!1;let{selection:h}=t.state,{$from:c,$to:p}=h;return!(!h.empty&&c.sameParent(p))&&((s=eN(e,n=t.state),(o=eI(e,n))&&s&&(s>o.depth||0))?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():(l=eN(e,i=t.state),(a=eI(e,i))&&l&&(l<a.depth||0))?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward())},ez=(t,e,n)=>{let{state:o}=t,{selection:l}=o;if(!l.empty)return!1;let{$from:a}=l;if(0!==a.parentOffset||!a.parent.isTextblock||(0,r.rU)(o,e))return!1;let h=(0,r.H_)(a);if(!h||!n.includes(h.type.name))return!1;let c=h.lastChild;if(!c||c.type.name!==e)return!1;let p=a.parent;if(!c.canReplace(c.childCount,c.childCount,i.FK.from(p)))return!1;let u=a.before(),d=a.after(),f=u-2;return t.commands.command(({tr:t,dispatch:e})=>(e&&(t.delete(u,d).insert(f,i.FK.from(p)),t.setSelection(s.U3.create(t.doc,f+1)),t.scrollIntoView()),!0))},e$=r.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==t.state.schema.nodes[n]&&eL(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==t.state.schema.nodes[n]&&eL(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==t.state.schema.nodes[n]&&eR(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==t.state.schema.nodes[n]&&eR(t,n,r)&&(e=!0)}),e},Tab:({editor:t})=>{for(let{itemName:e,wrapperNames:n}of this.options.listTypes)if(void 0!==t.state.schema.nodes[e]&&ez(t,e,n))return!0;return!1}}}}),ej=RegExp(`^(\\s*)(${ex})([.)])\\s+(.*)$`),eD=/^\s/,eF={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/},eP=RegExp(`^(${ex})([.)])\\s+(.+)$`),eB="textStyle",eJ=/^(\d+)\.\s$/;function eH(t){let e=t.match(/list-style-type\s*:\s*([^;]+)/i);if(!e)return null;switch(e[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}let eK=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:null,parseHTML:t=>{let e=t.getAttribute("type");if(e)return e;let n=t.getAttribute("style");if(n){let t=eH(n);if(t)return t}let r=t.querySelector("li");if(r){let t=r.getAttribute("style");if(t){let e=eH(t);if(e)return e}}return null}}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){let{start:e,type:n,...i}=t,s=(0,r.KV)(this.options.HTMLAttributes,i);return 1!==e&&(s.start=e),n&&"1"!==n&&(s.type=n),["ol",s,0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{var n;if("list"!==t.type||!t.ordered)return[];let r=t.start||1,i=t.typeMarker,s=t.items?(n=t.items,n.map(t=>{if("list_item"!==t.type)return e.parseChildren([t])[0];let n=[];return t.tokens&&t.tokens.length>0&&t.tokens.forEach(t=>{if("paragraph"===t.type||"list"===t.type||"blockquote"===t.type||"code"===t.type)n.push(...e.parseChildren([t]));else if("text"===t.type&&t.tokens){let r=e.parseChildren([t]);n.push({type:"paragraph",content:r})}else{let r=e.parseChildren([t]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})):[],o={};return(1!==r&&(o.start=r),i&&(o.type=i),Object.keys(o).length>0)?{type:"orderedList",attrs:o,content:s}:{type:"orderedList",content:s}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(t,e,n)=>{var r,i;let s=t.split("\n"),[o,l]=function(t){let e=[],n=0,r=0;for(;n<t.length;){let i=t[n],s=i.match(ej);if(!s)break;let[,o,l,a,h]=s,c=o.length,p=parseInt(l,10),u=isNaN(p)?eA(l):void 0,d=isNaN(p)?eE(l):p,f=[h],m=n+1,g=[i],y=!1;for(;m<t.length;){let e=t[m];
9if(e.match(ej))break;if(""===e.trim())g.push(e),f.push(""),y=!0,m+=1;else if(e.match(eD)){let t=e.length-e.trimStart().length,n=c+l.length+1;g.push(e),f.push(e.slice(Math.min(t,n))),m+=1}else{if(y||function(t){return Object.values(eF).some(e=>e.test(t))}(e))break;g.push(e),f.push(e),m+=1}}e.push({indent:c,number:d,type:u,content:f.join("\n").trim(),contentLines:f,raw:g.join("\n")}),r=m,n=m}return[e,r]}(s);if(0===o.length)return;let a=function t(e,n,r){let i=[],s=0;for(;s<e.length;){let o=e[s];if(o.indent===n){let{paragraphLines:l,blockLines:a}=function(t){let e=[],n=[],r=!1;return t.forEach(t=>{let i;if(r)return void n.push(t);if(""===t.trim()||e.length>0&&(i=t.trimStart(),eF.bulletItem.test(i)||ej.test(i.trimStart())||eF.heading.test(i)||eF.thematicBreak.test(i)&&!i.startsWith("-")||/^>\s?/.test(i)||eF.codeFence.test(i)||eF.blockMath.test(i))){r=!0,n.push(t);return}e.push(t)}),{paragraphLines:e,blockLines:n}}(o.contentLines),h=l.join("\n").trim(),c=[];h&&c.push({type:"paragraph",raw:h,tokens:r.inlineTokens(h)});let p=a.join("\n").trim();if(p){let t=r.blockTokens(p);c.push(...t)}let u=s+1,d=[];for(;u<e.length&&e[u].indent>n;)d.push(e[u]),u+=1;if(d.length>0){let e=t(d,Math.min(...d.map(t=>t.indent)),r);c.push({type:"list",ordered:!0,start:d[0].number,typeMarker:d[0].type,items:e,raw:d.map(t=>t.raw).join("\n")})}i.push({type:"list_item",raw:o.raw,tokens:c}),s=u}else s+=1}return i}(o,o[0].indent,n);if(0!==a.length)return{type:"list",ordered:!0,start:(null==(r=o[0])?void 0:r.number)||1,typeMarker:null==(i=o[0])?void 0:i.type,items:a,raw:s.slice(0,l).join("\n")}}},markdownOptions:{indentsContent:!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(eB)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins:()=>[new s.k_({props:{handlePaste:(t,e)=>{var n,r;let i=null==(n=e.clipboardData)?void 0:n.getData("text/html");if(null==i?void 0:i.trim())return!1;let s=null==(r=e.clipboardData)?void 0:r.getData("text/plain");if(!s)return!1;let o=function(t){let e=t.split("\n").filter(t=>t.trim().length>0);if(0===e.length)return null;let n=[];for(let t of e){let e=t.trim().match(eP);if(!e)return null;n.push({marker:e[1],content:e[3]})}return!function(t){var e;if(0===t.length)return!1;let n=null!=(e=eA(t[0]))?e:"numeric",r=eE(t[0]);if(r<1)return!1;for(let e=0;e<t.length;e++){let i=function(t,e){if("numeric"===t)return String(e);switch(t){case"a":return eT(e);case"A":return eT(e).toUpperCase();case"i":return eS(e);case"I":return eC(e);default:return String(e)}}(n,r+e);if(t[e]!==i)return!1}return!0}(n.map(t=>t.marker))?null:{type:"orderedList",attrs:function(t){let{type:e,start:n}={type:eA(t),start:eE(t)},r={};return e&&(r.type=e),1!==n&&(r.start=n),r}(n[0].marker),content:n.map(t=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:t.content}]}]}))}}(s);if(!o)return!1;try{let e=t.state.schema.nodeFromJSON(o),n=t.state.tr.replaceSelectionWith(e);return t.dispatch(n),!0}catch{return!1}}}})],addInputRules(){let t=(t,e)=>(!e.attrs.type||"1"===e.attrs.type)&&e.childCount+e.attrs.start===+t[1],e=(0,r.tG)({find:eJ,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:t});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:eJ,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(eB)}),joinPredicate:t,editor:this.editor})),[e]}}),eU=/^\s*(\[([( |x])?\])\s$/,e_=r.bP.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{let e=t.getAttribute("data-checked");return""===e||"true"===e},renderHTML:t=>({"data-checked":t.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:t=>{var e;return null!=(e=t.querySelector("div"))?e:t}}]},renderHTML({node:t,HTMLAttributes:e}){return["li",(0,r.KV)(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{let n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){let r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;let i=`- [${(null==(n=t.attrs)?void 0:n.checked)?"x":" "}] `;return(0,r.kj)(t,e,i)},addExtensions(){return this.options.nested?[ev(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:i})=>{let s=document.createElement("li"),o=document.createElement("label"),l=document.createElement("span"),a=document.createElement("input"),h=document.createElement("div");l.style.cssText="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";let c=t=>{var e,n,r;let i=(e=t.attrs.checked,(null==(n=this.options.a11y)||null==(r=n.checkboxLabel)?void 0:r.call(n,t,e))||`Task item checkbox for ${t.textContent||"empty task item"}`);a.setAttribute("aria-label",i),l.textContent=i};c(t),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",t=>t.preventDefault()),a.addEventListener("change",e=>
9{if(!i.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:r}=e.target;i.isEditable&&"function"==typeof n&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:t})=>{let e=n();if("number"!=typeof e)return!1;let i=t.doc.nodeAt(e);return t.setNodeMarkup(e,void 0,{...null==i?void 0:i.attrs,checked:r}),!0}).run(),i.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(t,r)||(a.checked=!a.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([t,e])=>{s.setAttribute(t,e)}),s.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,o.append(a,l),s.append(o,h),Object.entries(e).forEach(([t,e])=>{s.setAttribute(t,e)});let p=new Set(Object.keys(e));return{dom:s,contentDOM:h,update:t=>{if(t.type!==this.type)return!1;s.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,c(t);let e=i.extensionManager.attributes,n=(0,r.zU)(t,e),o=new Set(Object.keys(n)),l=this.options.HTMLAttributes;return p.forEach(t=>{o.has(t)||(t in l?s.setAttribute(t,l[t]):s.removeAttribute(t))}),Object.entries(n).forEach(([t,e])=>{null==e?t in l?s.setAttribute(t,l[t]):s.removeAttribute(t):s.setAttribute(t,e)}),p=o,!0}}}}
9,addInputRules(){return[(0,r.tG)({find:eU,type:this.type,getAttributes:t=>({checked:"x"===t[t.length-1]})})]}}),eW=r.bP.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",(0,r.KV)(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;let n=null==(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:e.index;return void 0!==n?n:-1},tokenize(t,e,n){let i=t=>{let e=(0,r.Dd)(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:t=>({indentLevel:t[1].length,mainContent:t[4],checked:"x"===t[3].toLowerCase()}),createToken:(t,e)=>({type:"taskItem",raw:"",mainContent:t.mainContent,indentLevel:t.indentLevel,checked:t.checked,text:t.mainContent,tokens:n.inlineTokens(t.mainContent),nestedTokens:e}),customNestedParser:i},n);if(e){let r={type:"taskList",raw:e.raw,items:e.items},i=t.slice(e.raw.length);return i.trim()?[r,...n.blockTokens(i)]:[r]}return n.blockTokens(t)},s=(0,r.Dd)(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:t=>({indentLevel:t[1].length,mainContent:t[4],checked:"x"===t[3].toLowerCase()}),createToken:(t,e)=>({type:"taskItem",raw:"",mainContent:t.mainContent,indentLevel:t.indentLevel,checked:t.checked,text:t.mainContent,tokens:n.inlineTokens(t.mainContent),nestedTokens:e}),customNestedParser:i},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});r.YY.create({name:"listKit",addExtensions(){let t=[];return!1!==this.options.bulletList&&t.push(ek.configure(this.options.bulletList)),!1!==this.options.listItem&&t.push(eO.configure(this.options.listItem)),!1!==this.options.listKeymap&&t.push(e$.configure(this.options.listKeymap)),!1!==this.options.orderedList&&t.push(eK.configure(this.options.orderedList)),!1!==this.options.taskItem&&t.push(e_.configure(this.options.taskItem)),!1!==this.options.taskList&&t.push(eW.configure(this.options.taskList)),t}});let eV="&nbsp;",eq=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]},parseMarkdown:(t,e)=>{let n=t.tokens||[];if(1===n.length&&"image"===n[0].type)return e.parseChildren([n[0]]);let r=e.parseInline(n);return 1===n.length&&"text"===n[0].type&&(n[0].raw===eV||n[0].text===eV||"\xa0"===n[0].raw||"\xa0"===n[0].text)&&1===r.length&&"text"===r[0].type&&(r[0].text===eV||"\xa0"===r[0].text)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{if(!t)return"";let r=Array.isArray(t.content)?t.content:[];if(0===r.length){var i,s;let t=Array.isArray(null==n||null==(i=n.previousNode)?void 0:i.content)?n.previousNode.content:[];return(null==n||null==(s=n.previousNode)?void 0:s.type)==="paragraph"&&0===t.length?eV:""}return e.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),eG=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,eY=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,eX=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]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}}
9,addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,r.OX)({find:eG,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:eY,type:this.type})]}}),eQ=r.bP.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""});var eZ=n(83694),e0=n(62678),e1=r.YY.create({name:"starterKit",addExtensions(){var t,e,n,r;let i=[];return!1!==this.options.bold&&i.push(y.configure(this.options.bold)),!1!==this.options.blockquote&&i.push(u.configure(this.options.blockquote)),!1!==this.options.bulletList&&i.push(ek.configure(this.options.bulletList)),!1!==this.options.code&&i.push(b.configure(this.options.code)),!1!==this.options.codeBlock&&i.push(S.configure(this.options.codeBlock)),!1!==this.options.document&&i.push(C.configure(this.options.document)),!1!==this.options.dropcursor&&i.push(e0.QO.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&i.push(e0.vR.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&i.push(M.configure(this.options.hardBreak)),!1!==this.options.heading&&i.push(T.configure(this.options.heading)),!1!==this.options.undoRedo&&i.push(e0.lb.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&i.push(A.configure(this.options.horizontalRule)),!1!==this.options.italic&&i.push(R.configure(this.options.italic)),!1!==this.options.listItem&&i.push(eO.configure(this.options.listItem)),!1!==this.options.listKeymap&&i.push(e$.configure(null==(t=this.options)?void 0:t.listKeymap)),!1!==this.options.link&&i.push(em.configure(null==(e=this.options)?void 0:e.link)),!1!==this.options.orderedList&&i.push(eK.configure(this.options.orderedList)),!1!==this.options.paragraph&&i.push(eq.configure(this.options.paragraph)),!1!==this.options.strike&&i.push(eX.configure(this.options.strike)),!1!==this.options.text&&i.push(eQ.configure(this.options.text)),!1!==this.options.underline&&i.push(eZ.z.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&i.push(e0.JU.configure(null==(r=this.options)?void 0:r.trailingNode)),i}})},94577:(t,e,n)=>{t.exports=n(99617)},97144:(t,e,n)=>{n.d(e,{$f:()=>I,G2:()=>v,I$:()=>C,Im:()=>R,Qv:()=>a,Sd:()=>y,Z1:()=>M,_G:()=>c,_e:()=>d,bh:()=>b,eB:()=>h,eT:()=>g,ec:()=>N,hy:()=>A,iz:()=>T,pC:()=>x,yY:()=>w,y_:()=>L});var r=n(8242),i=n(27050),s=n(76865);let o=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function l(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("backward",t):!(n.parentOffset>0))?n:null}let a=(t,e,n)=>{let o=l(t,n);if(!o)return!1;let a=f(o);if(!a){let n=o.blockRange(),i=n&&(0,r.jP)(n);return null!=i&&(e&&e(t.tr.lift(n,i).scrollIntoView()),!0)}let h=a.nodeBefore;if(E(t,a,e,-1))return!0;if(0==o.parent.content.size&&(u(h,"end")||s.nh.isSelectable(h)))for(let n=o.depth;;n--){let l=(0,r.$L)(t.doc,o.before(n),o.after(n),i.Ji.empty);if(l&&l.slice.size<l.to-l.from){if(e){let n=t.tr.step(l);n.setSelection(u(h,"end")?s.LN.findFrom(n.doc.resolve(n.mapping.map(a.pos,-1)),-1):s.nh.create(n.doc,a.pos-h.nodeSize)),e(n.scrollIntoView())}return!0}if(1==n||o.node(n-1).childCount>1)break}return!!h.isAtom&&a.depth==o.depth-1&&(e&&e(t.tr.delete(a.pos-h.nodeSize,a.pos).scrollIntoView()),!0)},h=(t,e,n)=>{let r=l(t,n);if(!r)return!1;let i=f(r);return!!i&&p(t,i,e)},c=(t,e,n)=>{let r=m(t,n);if(!r)return!1;let i=k(r);return!!i&&p(t,i,e)};function p(t,e,n){let o=e.nodeBefore,l=e.pos-1;for(;!o.isTextblock;l--){if(o.type.spec.isolating)return!1;let t=o.lastChild;if(!t)return!1;o=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 c=(0,r.$L)(t.doc,l,h,i.Ji.empty);if(!c||c.from!=l||c instanceof r.Ln&&c.slice.size>=h-l)return!1;if(n){let e=t.tr.step(c);e.setSelection(s.U3.create(e.doc,l)),n(e.scrollIntoView())}return!0}function u(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 d=(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=f(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 f(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>
90)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function m(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("forward",t):!(n.parentOffset<n.parent.content.size))?n:null}let g=(t,e,n)=>{let o=m(t,n);if(!o)return!1;let l=k(o);if(!l)return!1;let a=l.nodeAfter;if(E(t,l,e,1))return!0;if(0==o.parent.content.size&&(u(a,"start")||s.nh.isSelectable(a))){let n=(0,r.$L)(t.doc,o.before(),o.after(),i.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(u(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==o.depth-1&&(e&&e(t.tr.delete(l.pos,l.pos+a.nodeSize).scrollIntoView()),!0)},y=(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=k(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 k(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 v=(t,e)=>{let n=t.selection,i=n instanceof s.nh,o;if(i){if(n.node.isTextblock||!(0,r.n9)(t.doc,n.from))return!1;o=n.from}else if(null==(o=(0,r.N0)(t.doc,n.from,-1)))return!1;if(e){let n=t.tr.join(o);i&&n.setSelection(s.nh.create(n.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(n.scrollIntoView())}return!0},b=(t,e)=>{let n=t.selection,i;if(n instanceof s.nh){if(n.node.isTextblock||!(0,r.n9)(t.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.N0)(t.doc,n.to,1)))return!1;return e&&e(t.tr.join(i).scrollIntoView()),!0},w=(t,e)=>{let{$from:n,$to:i}=t.selection,s=n.blockRange(i),o=s&&(0,r.jP)(s);return null!=o&&(e&&e(t.tr.lift(s,o).scrollIntoView()),!0)},x=(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 S(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=S(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},M=(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=S(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 i=n.before();if((0,r.zy)(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),s=i&&(0,r.jP)(i);return null!=s&&(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)},A=(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 E(t,e,n,o){let l,a,h,c=e.nodeBefore,p=e.nodeAfter,d,f,m=c.type.spec.isolating||p.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,r.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&&(d=(f=c.contentMatchAt(c.childCount)).findWrapping(p.type))&&f.matchType(d[0]||p.type).validEnd){if(n){let s=e.pos+p.nodeSize,o=i.FK.empty;for(let t=d.length-1;t>=0;t--)o=i.FK.from(d[t].create(null,o));o=i.FK.from(c.copy(o));let l=t.tr.step(new r.Wg(e.pos-1,s,e.pos,s,new i.Ji(o,1,0),d.length,!0)),a=l.doc.resolve(s+2*d.length);a.nodeAfter&&a.nodeAfter.type==c.type&&(0,r.n9)(l.doc,a.pos)&&l.join(a.pos),n(l.scrollIntoView())}return!0}let y=p.type.spec.isolating||o>0&&m?null:s.LN.findFrom(e,1),k=y&&y.$from.blockRange(y.$to),v=k&&(0,r.jP)(k);if(null!=v&&v>=e.depth)return n&&n(t.tr.lift(k,v).scrollIntoView()),!0;if(g&&u(p,"start",!0)&&u(c,"end")){let s=c,o=[];for(;o.push(s),!s.isTextblock;)s=s.lastChild;let l=p,a=1;for(;!l.isTextblock;l=l.firstChild)a++;if(s.canReplace(s.childCount,s.childCount,l.content)){if(n){let s=i.FK.empty;for(let t=o.length-1;t>=0;t--)s=i.FK.from(o[t].copy(s));n(t.tr.step(new r.Wg(e.pos-o.length,e.pos+p.nodeSize,e.pos+a,e.pos+p.nodeSize-a,new i.Ji(s,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function O(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 I=O(-1),N=O(1);function R(t,e=null){return function(n,i){let{$from:s,$to:o}=n.selection,l=s.blockRange(o),a=l&&(0,r.oM)(l,t,e);return!!a&&(i&&i(n.tr.wrap(l,a).scrollIntoView()),!0)}}function L(t,e=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(s,o,(r,s)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(t,e)))if(r.type==t)i=!0;else{let e=n.doc.resolve(s),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:s},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(s,o,t,e)}r(i.scrollIntoView())}return!0}}function z(...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(o,a,d),j=z(o,g,y),D={Enter:z(x,M,T,(t,e)=>{if(t.selection instanceof s.nh&&t.selection.node.isBlock){let{$from:n}=t.selection;return!!n.parentOffset&&!!(0,r.zy)(t.doc,n.pos)&&(e&&e(t.tr.split(n.pos).scrollIntoView()),!0)}if(!t.selection.$from.depth)return!1;let n=t.tr;!t.selection.empty&&(t.selection instanceof s.U3||t.selection instanceof s.i5)&&n.deleteSelection();let{$from:i}=n.selection,o=n.steps.length,l=[],a,h,c=!1,p=!1;for(let t=i.depth;;t--){if(i.node(t).isBlock){let e;c=i.end(t)==i.pos+(i.depth-t),p=i.start(t)==i.pos-(i.depth-t),h=S(i.node(t-1).contentMatchAt(i.indexAfter(t-1)));l.unshift(e||(c&&h?{type:h}:null)),a=t;break}if(1==t)return!1;l.unshift(null)}let u=i.pos,d=(0,r.zy)(n.doc,u,l.length,l);if(d||(l[0]=h?{type:h}:null,d=(0,r.zy)(n.doc,u,l.length,l)),!d)return!1;if(n.split(u,l.length,l),!c&&p&&i.node(a).type!=h){let t=n.mapping.slice(o),e=t.map(i.before(a)),r=n.doc.resolve(e);h&&i.node(a-1).canReplaceWith(r.index(),r.index()+1,h)&&n.setNodeMarkup(t.map(i.before(a)),h)}return e&&e(n.scrollIntoView()),!0}),"Mod-Enter":C,Backspace:$,"Mod-Backspace":$,"Shift-Backspace":$,Delete:j,"Mod-Delete":j,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new s.i5(t.doc))),!0)},F={"Ctrl-h":D.Backspace,"Alt-Backspace":D["Mod-Backspace"],"Ctrl-d":D.Delete,"Ctrl-Alt-Backspace":D["Mod-Delete"],"Alt-Delete":D["Mod-Delete"],"Alt-d":D["Mod-Delete"],"Ctrl-a":I,"Ctrl-e":N};for(let t in D)F[t]=D[t];"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform()},99314:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(51811);
9let i={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};i.node;let s=(0,r.A)(i)},99617:(t,e,n)=>{var r=n(12115),i=n(8039),s="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},o=i.useSyncExternalStore,l=r.useRef,a=r.useEffect,h=r.useMemo,c=r.useDebugValue;e.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var p=l(null);if(null===p.current){var u={hasValue:!1,value:null};p.current=u}else u=p.current;var d=o(t,(p=h(function(){function t(t){if(!a){if(a=!0,o=t,t=r(t),void 0!==i&&u.hasValue){var e=u.value;if(i(e,t))return l=e}return l=t}if(e=l,s(o,t))return e;var n=r(t);return void 0!==i&&i(e,n)?(o=t,e):(o=t,l=n)}var o,l,a=!1,h=void 0===n?null:n;return[function(){return t(e())},null===h?void 0:function(){return t(h())}]},[e,n,r,i]))[0],p[1]);return a(function(){u.hasValue=!0,u.value=d},[d]),c(d),d}}}]);

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.