vendor: 5,216 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7353],{19443:function(t,e,n){n.d(e,{$:function(){return dU},A:function(){return tP},B:function(){return M},C:function(){return od},D:function(){return og},E:function(){return rP},F:function(){return S},G:function(){return es},H:function(){return rG},I:function(){return te},J:function(){return tr},K:function(){return tE},L:function(){return th},M:function(){return dw},N:function(){return t4},O:function(){return dx},P:function(){return el},Q:function(){return dS},R:function(){return tN},S:function(){return tZ},T:function(){return tX},U:function(){return dv},V:function(){return dB},W:function(){return dF},X:function(){return d$},Y:function(){return dL},Z:function(){return rh},_:function(){return rc},a:function(){return eu},a0:function(){return mN},a1:function(){return mE},a2:function(){return mT},a3:function(){return mR},a4:function(){return mj},a5:function(){return mI},a6:function(){return mW},a7:function(){return mz},a8:function(){return m$},a9:function(){return mF},aa:function(){return mL},ab:function(){return m_},ac:function(){return mV},ad:function(){return mn},ae:function(){return d9},af:function(){return mS},ag:function(){return mq},ah:function(){return ir},ai:function(){return ov},aj:function(){return uh},ak:function(){return um},al:function(){return uy},am:function(){return hq},an:function(){return h4},ao:function(){return t8},ap:function(){return hV},aq:function(){return h8},ar:function(){return F},as:function(){return hU},at:function(){return hn},b:function(){return ol},c:function(){return tz},d:function(){return t3},e:function(){return rX},f:function(){return tj},g:function(){return oi},h:function(){return oe},i:function(){return rZ},j:function(){return ot},k:function(){return r8},l:function(){return tR},m:function(){return t_},n:function(){return r0},o:function(){return r1},p:function(){return on},q:function(){return oa},r:function(){return oy},s:function(){return or},t:function(){return r5},u:function(){return r9},v:function(){return oc},w:function(){return of},x:function(){return oh},y:function(){return om},z:function(){return ob}});var r,o,i,s,l,a,c,u,p,h,f,d,m,g,y=n(54553),b=n(93767),v=n(17556);function w(t){this.content=t}w.prototype={constructor:w,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 r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return -1==o?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new w(i)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new w(n)},addToStart:function(t,e){return new w([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new w(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(-1==i?o.length:i,0,e,n),new w(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=w.from(t)).size?new w(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=w.from(t)).size?new w(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=w.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}},w.from=function(t){if(t instanceof w)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new w(e)};class S{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,o){for(let i=0,s=0;s<e;i++){let l=this.content[i],a=s+l.nodeSize;if(a>t&&!1!==n(l,r+s,o||null,i)&&l.content.size){let o=s+1;l.nodesBetween(Math.max(0,t-o),Math.min(l.content.size,e-o),n,r+o)}s=a}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let o="",i=!0;return this.nodesBetween(t,e,(s,l)=>{let a=s.isText?s.text.slice(Math.max(t,l)-l,e-l):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&a||s.isTextblock)&&n&&(i?i=!1:o+=n),o+=a},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);o<t.content.length;o++)r.push(t.content[o]);return new S(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 o=0,i=0;i<e;o++){let s=this.content[o],l=i+s.nodeSize;l>t&&((i<t||l>e)&&(s=s.isText?s.cut(Math.max(0,t-i),Math.min(s.text.length,e-i)):s.cut(Math.max(0,t-i-1),Math.min(s.content.size,e-i-1))),n.push(s),r+=s.nodeSize),i=l}return new S(n,r)}cutByIndex(t,e){return t==e?S.empty:0==t&&e==this.content.length?this:new S(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new S(r,o)}addToStart(t){return new S([t].concat(this.content),this.size+t.no
1deSize)}addToEnd(t){return new S(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 i=e.child(o),s=n.child(o);if(i==s){r+=i.nodeSize;continue}if(!i.sameMarkup(s))return r;if(i.isText&&i.text!=s.text){for(let t=0;i.text[t]==s.text[t];t++)r++;return r}if(i.content.size||s.content.size){let e=t(i.content,s.content,r+1);if(null!=e)return e}r+=i.nodeSize}}(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return function t(e,n,r,o){for(let i=e.childCount,s=n.childCount;;){if(0==i||0==s)return i==s?null:{a:r,b:o};let l=e.child(--i),a=n.child(--s),c=l.nodeSize;if(l==a){r-=c,o-=c;continue}if(!l.sameMarkup(a))return{a:r,b:o};if(l.isText&&l.text!=a.text){let t=0,e=Math.min(l.text.length,a.text.length);for(;t<e&&l.text[l.text.length-t-1]==a.text[a.text.length-t-1];)t++,r--,o--;return{a:r,b:o}}if(l.content.size||a.content.size){let e=t(l.content,a.content,r-1,o-1);if(e)return e}r-=c,o-=c}}(this,t,e,n)}findIndex(t,e=-1){if(0==t)return k(0,t);if(t==this.size)return k(this.content.length,t);if(t>this.size||t<0)throw RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=t)return o==t||e>0?k(n+1,o):k(n,r);r=o}}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 S.empty;if(!Array.isArray(e))throw RangeError("Invalid input for Fragment.fromJSON");return new S(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return S.empty;let e,n=0;for(let r=0;r<t.length;r++){let o=t[r];n+=o.nodeSize,r&&o.isText&&t[r-1].sameMarkup(o)?(e||(e=t.slice(0,r)),e[e.length-1]=o.withText(e[e.length-1].text+o.text)):e&&e.push(o)}return new S(e||t,n)}static from(t){if(!t)return S.empty;if(t instanceof S)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new S([t],t.nodeSize);throw RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}S.empty=new S([],0);let x={index:0,offset:0};function k(t,e){return x.index=t,x.offset=e,x}function O(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(!O(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!O(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 o=t[r];if(this.eq(o))return t;if(this.type.excludes(o.type))e||(e=t.slice(0,r));else{if(o.type.excludes(this.type))return t;!n&&o.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}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&&O(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;
vendor: 5,547 bytes, line 1
1if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return 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=[];class A extends Error{}class M{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,o){let{index:i,offset:s}=e.findIndex(n),l=e.maybeChild(i);if(s==n||l.isText)return e.cut(0,n).append(r).append(e.cut(n));let a=t(l.content,n-s-1,r);return a&&e.replaceChild(i,l.copy(a))}(this.content,t+this.openStart,e);return n&&new M(n,this.openStart,this.openEnd)}removeBetween(t,e){return new M(function t(e,n,r){let{index:o,offset:i}=e.findIndex(n),s=e.maybeChild(o),{index:l,offset:a}=e.findIndex(r);if(i==n||s.isText){if(a!=r&&!e.child(l).isText)throw RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(r))}if(o!=l)throw RangeError("Removing non-flat range");return e.replaceChild(o,s.copy(t(s.content,n-i-1,r-i-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 M.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 M(S.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 M(t,n,r)}}function N(t,e){if(!e.type.compatibleContent(t.type))throw new A("Cannot join "+e.type.name+" onto "+t.type.name)}function E(t,e,n){let r=t.node(n);return N(r,e.node(n)),r}function T(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 D(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(T(t.nodeAfter,r),i++));for(let t=i;t<s;t++)T(o.child(t),r);e&&e.depth==n&&e.textOffset&&T(e.nodeBefore,r)}function R(t,e){return t.type.checkContent(e),t.copy(e)}function j(t,e,n){let r=[];return D(null,t,n,r),t.depth>n&&T(R(E(t,e,n+1),j(t,e,n+1)),r),D(e,null,n,r),new S(r)}M.empty=new M(S.empty,0,0);class I{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 o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}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 o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].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 _(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,o=e;for(let e=t;;){let{index:t,offset:i}=e.content.findIndex(o),s=o-i;if(n.push(e,t,r+i),!s||(e=e.child(t)).isText)break;o=s-1,r+=i+1}return new I(e,n,o)}
1static resolveCached(t,e){let n=$.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 $.set(t,n=new P);let r=n.elts[n.i]=I.resolve(t,e);return n.i=(n.i+1)%z,r}}class P{constructor(){this.elts=[],this.i=0}}let z=12,$=new WeakMap;class _{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 B=Object.create(null);class F{constructor(t,e,n,r=C.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||S.empty}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&&O(this.attrs,e||t.defaultAttrs||B)&&C.sameSet(this.marks,n||C.none)}copy(t=null){return t==this.content?this:new F(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new F(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 M.empty;let r=this.resolve(t),o=this.resolve(e),i=n?0:r.sharedDepth(e),s=r.start(i);return new M(r.node(i).content.cut(r.pos-s,o.pos-s),r.depth-i,o.depth-i)}replace(t,e,n){return function(t,e,n){if(n.openStart>t.depth)throw new A("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new A("Inconsistent open depths");return function t(e,n,r,o){let i=e.index(o),s=e.node(o);if(i==n.index(o)&&o<e.depth-r.openStart){let l=t(e,n,r,o+1);return s.copy(s.content.replaceChild(i,l))}if(!r.content.size)return R(s,j(e,n,o));if(r.openStart||r.openEnd||e.depth!=o||n.depth!=o){let{start:t,end:i}=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(S.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(r,e);return R(s,function t(e,n,r,o,i){let s=e.depth>i&&E(e,n,i+1),l=o.depth>i&&E(r,o,i+1),a=[];return D(null,e,i,a),s&&l&&n.index(i)==r.index(i)?(N(s,l),T(R(s,t(e,n,r,o,i+1)),a)):(s&&T(R(s,j(e,n,i+1)),a),D(n,r,i,a),l&&T(R(l,j(r,o,i+1)),a)),D(o,null,i,a),new S(a)}(e,t,i,n,o))}{let t=e.parent,o=t.content;return R(t,o.cut(0,e.parentOffset).append(r.content).append(o.cut(n.parentOffset)))}}(t,e,n,0)}(this.resolve(t),this.resolve(e),n)}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 I.resolveCached(this,t)}resolveNoCache(t){return I.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()+")"),V(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=S.empty,r=0,o=n.childCount){let i=this.contentMatchAt(t).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let t=r;t<o;t++)if(!this.type.allowsMarks(n.child(t).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(t).matchType(n),i=o&&o.matchFragment(this.content,e);return!!i&&i.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=S.fromJSON(t,e.content),o=t.nodeType(e.type).create(e.attrs,r,n);return o.type.checkAttrs(o.attrs),o}}F.prototype.text=void 0;class L extends F{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):V(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 L(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new L(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 V(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class W{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){var n;let r,o=new q(t,e);if(null==o.next)return W.empty;let i=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 o=[];for(let t in n){let r=n[t];r.groups.indexOf(e)>-1&&o.push(r)}return 0==o.length&&t.err("No node type or group '"+e+"' found"),o})(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=U(t),r=n;return t.eat(",")&&(r="}"!=t.next?U(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}}(o);o.next&&o.err("Unexpected trailing text");let s=(n=function(t){let e=[[]];return o(function t(e,i){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(t(n,i)),[]);if("seq"==e.type)for(let r=0;;r++){let s=t(e.exprs[r],i);if(r==e.exprs.length-1)return s;o(s,i=n())}else if("star"==e.type){let s=n();return r(i,s),o(t(e.expr,s),s),[r(s)]}else if("plus"==e.type){let s=n();return o(t(e.expr,i),s),o(t(e.expr,s),s),[r(s)]}else{if("opt"==e.type)return[r(i)].concat(t(e.expr,i));if("range"==e.type){let s=i;for(let r=0;r<e.min;r++){let r=n();o(t(e.expr,s),r),s=r}if(-1==e.max)o(t(e.expr,s),s);else for(let i=e.min;i<e.max;i++){let i=n();r(s,i),o(t(e.expr,s),i),s=i}return[r(s)]}if("name"==e.type)return[r(i,void 0,e.value)];throw Error("Unknown expr type")}}(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let o={term:r,to:n};return e[t].push(o),o}function o(t,e){t.forEach(t=>t.to=e)}}(i),r=Object.create(null),function t(e){let o=[];e.forEach(t=>{n[t].forEach(({term:t,to:e})=>{let r;if(t){for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);
vendor: 7,113 bytes, lines 1-2
1J(n,e).forEach(e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)})}})});let i=r[e.join(",")]=new W(e.indexOf(n.length-1)>-1);for(let e=0;e<o.length;e++){let n=o[e][1].sort(H);i.next.push({type:o[e][0],next:r[n.join(",")]||t(n)})}return i}(J(n,0)));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],o=!t.validEnd,i=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];i.push(n.name),o&&!(n.isText||n.hasRequiredAttrs())&&(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,o),s}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let o=e;r&&o<n;o++)r=r.matchType(t.child(o).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!(e.isText||e.hasRequiredAttrs()))return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function o(i,s){let l=i.matchFragment(t,n);if(l&&(!e||l.validEnd))return S.from(s.map(t=>t.createAndFill()));for(let t=0;t<i.next.length;t++){let{type:e,next:n}=i.next[t];if(!(e.isText||e.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let t=o(n,s.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(),o=r.match;if(o.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<o.next.length;t++){let{type:i,next:s}=o.next[t];i.isLeaf||i.hasRequiredAttrs()||i.name in e||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),e[i.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(` 2`)}}W.empty=new W(!0);class q{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 U(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function H(t,e){return e-t}function J(t,e){let n=[];return function e(r){let o=t[r];if(1==o.length&&!o[0].term)return e(o[0].to);n.push(r);for(let t=0;t<o.length;t++){let{term:r,to:i}=o[t];r||-1!=n.indexOf(i)||e(i)}}(e),n.sort(H)}function K(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 G(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(void 0===o){let e=t[r];if(e.hasDefault)o=e.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function Y(t,e,n,r){for(let r in e)if(!(r in t))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in t){let r=t[n];r.validate&&r.validate(e[n])}}function X(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Z(t,r,e[r]);return n}let Q=class t{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=X(t,n.attrs),this.defaultAttrs=K(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==W.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}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:G(this.attrs,t)}create(t=null,e,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new F(this,this.computeAttrs(t),S.from(e),C.setFrom(n))}createChecked(t=null,e,n){return e=S.from(e),this.checkContent(e),new F(this,this.computeAttrs(t),e,C.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=S.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),o=r&&r.fillBefore(S.empty,!0);return o?new F(this,t,e.append(o),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){Y(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(e,n){let r=Object.create(null);e.forEach((e,o)=>r[e]=new t(e,n,o));let o=n.spec.topNode||"doc";if(!r[o])throw RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw RangeError("Every schema needs a 'text' type");for(let t in r.text.attrs)throw RangeError("The text node type should not have attributes");return r}};class Z{constructor(t,e,n){let r;this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?(r=n.validate.split("|"),n=>{let o=null===n?"null":typeof n;if(0>r.indexOf(o))throw RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}):n.validate}get isRequired(){return!this.hasDefault}}class tt{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=X(t,r.attrs),this.excluded=null;let o=K(this.attrs);this.instance=o?new C(this,o):null}create(t=null){return!t&&this.instance?this.instance:new C(this,G(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach((t,o)=>n[t]=new tt(t,r++,e,o)),n}removeFromSet(t){for(var e=0;e<t.length;
2e++)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){Y(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class te{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=w.from(t.nodes),e.marks=w.from(t.marks||{}),this.nodes=Q.compile(this.spec.nodes,this),this.marks=tt.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||"",o=e.spec.marks;if(e.contentMatch=n[r]||(n[r]=W.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="_"==o?null:o?tn(this,o.split(" ")):""!=o&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:tn(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else if(t instanceof Q){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 L(n,n.defaultAttrs,t,C.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return F.fromJSON(this,t)}markFromJSON(t){return C.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw RangeError("Unknown node type: "+t);return e}}function tn(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let e in t.marks){let r=t.marks[e];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class tr{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 tc(this,e,!1);return n.addAll(t,C.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new tc(this,e,!0);return n.addAll(t,C.none,e.from,e.to),M.maxOpen(n.finish())}matchTag(t,e,n){for(let o=n?this.tags.indexOf(n)+1:0;o<this.tags.length;o++){var r;let n=this.tags[o];if(r=n.tag,(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,r)&&(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 o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(t)||r.context&&!n.matchesContext(r.context)||i.length>t.length&&(61!=i.charCodeAt(t.length)||i.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let e in t.marks){let r=t.marks[e].spec.parseDOM;r&&r.forEach(t=>{n(t=tu(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=tu(t)),t.node||t.ignore||t.mark||(t.node=e)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new tr(t,tr.schemaRules(t)))}}let to={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ti={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ts={ol:!0,ul:!0};function tl(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class ta{constructor(t,e,n,r,o,i){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=i,this.content=[],this.activeMarks=C.none,this.match=o||(4&i?null:t.contentMatch)}
2findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(S.from(t));if(e)this.match=this.type.contentMatch.matchFragment(e);else{let e=this.type.contentMatch,n;return(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=S.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(S.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&&!to.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class tc{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0;let r=e.topNode,o,i=tl(null,e.preserveWhitespace,0)|(n?4:0);o=r?new ta(r.type,r.attrs,C.none,!0,e.topMatch||r.type.contentMatch,i):n?new ta(null,null,C.none,!0,null,i):new ta(t.schema.topNodeType,null,C.none,!0,null,i),this.nodes=[o],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;if(2&r.options||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(1&r.options)n=2&r.options?n.replace(/\r\n?/g,` 3`):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],o=t.previousSibling;
3(!e||o&&"BR"==o.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),e),this.findInText(t)}else this.findInside(t)}addElement(t,e,n){let r=t.nodeName.toLowerCase(),o;ts.hasOwnProperty(r)&&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&&ts.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let i=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(o=this.parser.matchTag(t,this,n));if(i?i.ignore:ti.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t,e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(t=i.skip);let n,o=this.top,s=this.needsBlock;if(to.hasOwnProperty(r))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),n=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);return}let l=i&&i.skip?e:this.readStyles(t,e);l&&this.addAll(t,l),n&&this.sync(o),this.needsBlock=s}else{let n=this.readStyles(t,e);n&&this.addElementByRule(t,i,n,!1===i.consuming?o:void 0)}}leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` 4`),e)}ignoreFallback(t,e){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),e)}readStyles(t,e){let n=t.style;if(n&&n.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let r=this.parser.matchedStyles[t],o=n.getPropertyValue(r);if(o)for(let t;;){let n=this.parser.matchStyle(r,o,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 o,i;if(e.node){if((i=this.parser.schema.nodes[e.node]).isLeaf)this.insertNode(i.create(e.attrs),n)||this.leafFallback(t,n);else{let t=this.enter(i,e.attrs||null,n,e.preserveWhitespace);t&&(o=!0,n=t)}}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(t=>this.insertNode(t,n));else{let r=t;"string"==typeof e.contentElement?r=t.querySelector(e.contentElement):"function"==typeof e.contentElement?r=e.contentElement(t):e.contentElement&&(r=e.contentElement),this.findAround(t,r,!0),this.addAll(r,n)}o&&this.sync(s)&&this.open--}addAll(t,e,n,r){let o=n||0;for(let i=n?t.childNodes[n]:t.firstChild,s=null==r?null:t.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i,e);this.findAtPoint(t,o)}findPlace(t,e){let n,r;for(let e=this.open;e>=0;e--){let o=this.nodes[e],i=o.findWrapping(t);if(i&&(!n||n.length>i.length)&&(n=i,r=o,!i.length)||o.solid)break}if(!n)return null;this.sync(r);for(let t=0;t<n.length;t++)e=this.enterInner(n[t],null,e,!1);return e}insertNode(t,e){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let n=this.findPlace(t,e);if(n){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let r=C.none;for(let o of n.concat(t.marks))(e.type?e.type.allowsMarkType(o.type):tp(o.type,t.type))&&(r=o.addToSet(r));return e.content.push(t.mark(r)),!0}return!1}enter(t,e,n,r){let o=this.findPlace(t.create(e),n);return o&&(o=this.enterInner(t,e,n,!0,r)),o}enterInner(t,e,n,r=!1,o){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(t);let s=tl(t,o,i.options);4&i.options&&0==i.content.length&&(s|=4);let l=C.none;return n=n.filter(e=>(i.type?!i.type.allowsMarkType(e.type):!tp(e.type,t))||(l=e.addToSet(l),!1)),this.nodes.push(new ta(t,e,l,r,null,s)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;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),o=-(n?n.depth+1:0)+(r?0:1),i=(t,s)=>{for(;t>=0;t--){let l=e[t];if(""==l){if(t==e.length-1||0==t)continue;for(;s>=o;s--)if(i(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!t||t.name!=l&&-1==t.groups.indexOf(l))return!1;s--}}return!0};return i(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;
4if(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 tu(t){let e={};for(let n in t)e[n]=t[n];return e}function tp(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=t=>{i.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:o}=t.edge(n);if(r==e||0>i.indexOf(o)&&s(o))return!0}};if(s(o.contentMatch))return!0}}class th{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=td(e).createDocumentFragment());let r=n,o=[];return t.forEach(t=>{if(o.length||t.marks.length){let n=0,i=0;for(;n<o.length&&i<t.marks.length;){let e=t.marks[i];if(!this.marks[e.type.name]){i++;continue}if(!e.eq(o[n][0])||!1===e.type.spec.spanning)break;n++,i++}for(;n<o.length;)r=o.pop()[1];for(;i<t.marks.length;){let n=t.marks[i++],s=this.serializeMark(n,t.isInline,e);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))}),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=tg(td(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 o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&tg(td(n),r(t,e),null,t.attrs)}static renderSpec(t,e,n=null,r){return tg(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new th(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=tf(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return tf(t.marks)}}function tf(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function td(t){return t.document||window.document}let tm=new WeakMap;function tg(t,e,n,r){let o,i;if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let s=e[0],l;if("string"!=typeof s)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(o=tm.get(r))&&tm.set(r,(i=null,function t(e){if(e&&"object"==typeof e){if(Array.isArray(e)){if("string"==typeof e[0])i||(i=[]),i.push(e);else for(let n=0;n<e.length;n++)t(e[n])}else for(let n in e)t(e[n])}}(r),o=i)),l=o)&&l.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 a=s.indexOf(" ");a>0&&(n=s.slice(0,a),s=s.slice(a+1));let c,u=n?t.createElementNS(n,s):t.createElement(s),p=e[1],h=1;if(p&&"object"==typeof p&&null==p.nodeType&&!Array.isArray(p)){for(let t in h=2,p)if(null!=p[t]){let e=t.indexOf(" ");e>0?u.setAttributeNS(t.slice(0,e),t.slice(e+1),p[t]):u.setAttribute(t,p[t])}}for(let o=h;o<e.length;o++){let i=e[o];if(0===i){if(o<e.length-1||o>h)throw RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}{let{dom:e,contentDOM:o}=tg(t,i,n,r);if(u.appendChild(e),o){if(c)throw RangeError("Multiple content holes");c=o}}}return{dom:u,contentDOM:c}}class ty{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 tb{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&tb.empty)return tb.empty}recover(t){let e=0,n=65535&t;if(!this.inverted)for(let t=0;t<n;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*n]+e+(t-(65535&t))/65536}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?r:0);if(l>t)break;let a=this.ranges[s+o],c=this.ranges[s+i],u=l+a;if(t<=u){let o=a?t==l?-1:t==u?1:e:e,i=l+r+(o<0?0:c);if(n)return i;let p=t==(e<0?l:u)?null:s/3+(t-l)*65536,h=t==l?2:t==u?1:4;return(e<0?t!=l:t!=u)&&(h|=8),new ty(i,h,p)}r+=c-a}return n?t+r:new ty(t+r,0,null)}touches(t,e){let n=0,r=65535&e,o=this.inverted?2:1,i=this.inverted?1:2;
vendor: 14,917 bytes, line 4
4for(let e=0;e<this.ranges.length;e+=3){let s=this.ranges[e]-(this.inverted?n:0);if(s>t)break;let l=this.ranges[e+o];if(t<=s+l&&e==3*r)return!0;n+=this.ranges[e+i]-l}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),l=i+(this.inverted?0:o),a=this.ranges[r+e],c=this.ranges[r+n];t(s,s+a,l,l+c),o+=c-a}}invert(){return new tb(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?tb.empty:new tb(t<0?[0,-t,0]:[0,0,t])}}tb.empty=new tb([]);class tv{constructor(t=[],e,n=0,r=t.length){this.maps=t,this.mirror=e,this.from=n,this.to=r}slice(t=0,e=this.maps.length){return new tv(this.maps,this.mirror,t,e)}copy(){return new tv(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,e){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 tv;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 o=this.maps[n].mapResult(t,e);if(null!=o.recover){let e=this.getMirror(n);if(null!=e&&e>n&&e<this.to){n=e,t=this.maps[e].recover(o.recover);continue}}r|=o.delInfo,t=o.pos}return n?t:new ty(t,r,null)}}let tw=Object.create(null);class tS{getMap(){return tb.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=tw[e.stepType];if(!n)throw RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in tw)throw RangeError("Duplicate use of step JSON ID "+t);return tw[t]=e,e.prototype.jsonID=t,e}}class tx{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new tx(t,null)}static fail(t){return new tx(null,t)}static fromReplace(t,e,n,r){try{return tx.ok(t.replace(e,n,r))}catch(t){if(t instanceof A)return tx.fail(t.message);throw t}}}function tk(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(tk(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return S.fromArray(r)}class tO extends tS{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),r=n.node(n.sharedDepth(this.to)),o=new M(tk(e.content,(t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t,r),e.openStart,e.openEnd);return tx.fromReplace(t,this.from,this.to,o)}invert(){return new tC(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 tO(e.pos,n.pos,this.mark)}merge(t){return t instanceof tO&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new tO(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 tO(e.from,e.to,t.markFromJSON(e.mark))}}tS.jsonID("addMark",tO);class tC extends tS{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 M(tk(e.content,t=>t.mark(this.mark.removeFromSet(t.marks)),t),e.openStart,e.openEnd);return tx.fromReplace(t,this.from,this.to,n)}invert(){return new tO(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 tC(e.pos,n.pos,this.mark)}merge(t){return t instanceof tC&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new tC(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 tC(e.from,e.to,t.markFromJSON(e.mark))}}tS.jsonID("removeMark",tC);class tA extends tS{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return tx.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return tx.fromReplace(t,this.pos,this.pos+1,new M(S.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;n<e.marks.length;n++)if(!e.marks[n].isInSet(t))return new tA(this.pos,e.marks[n]);return new tA(this.pos,this.mark)}}return new tM(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new tA(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 tA(e.pos,t.markFromJSON(e.mark))}}tS.jsonID("addNodeMark",tA);class tM extends tS{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return tx.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return tx.fromReplace(t,this.pos,this.pos+1,new M(S.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new tA(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new tM(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 tM(e.pos,t.markFromJSON(e.mark))}}tS.jsonID("removeNodeMark",tM);class tN extends tS{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&tT(t,this.from,this.to)?tx.fail("Structure replace would overwrite content"):tx.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new tb([this.from,this.to-this.from,this.slice.size])}invert(t){return new tN(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deletedAcross&&n.deletedAcross?null:new tN(e.pos,Math.max(e.pos,n.pos),this.slice)}merge(t){if(!(t instanceof tN)||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;{let e=this.slice.size+t.slice.size==0?M.empty:new M(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new tN(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?M.empty:new M(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new tN(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 tN(e.from,e.to,M.fromJSON(t,e.slice),!!e.structure)}}tS.jsonID("replace",tN);class tE extends tS{constructor(t,e,n,r,o,i,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(t){if(this.structure&&(tT(t,this.from,this.gapFrom)||tT(t,this.gapTo,this.to)))return tx.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return tx.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?tx.fromReplace(t,this.from,this.to,n):tx.fail("Content does not fit in gap")}getMap(){return new tb([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 tE(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),o=this.to==this.gapTo?n.pos:t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||o>n.pos?null:new tE(e.pos,n.pos,r,o,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 tE(e.from,e.to,e.gapFrom,e.gapTo,M.fromJSON(t,e.slice),e.insert,!!e.structure)}}function tT(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let t=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,o--}}return!1}function tD(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],l=e+1;for(let e=0;e<i.childCount;e++){let a=i.child(e),c=l+a.nodeSize,u=r.matchType(a.type);if(u){r=u;for(let e=0;e<a.marks.length;e++)n.allowsMarkType(a.marks[e].type)||t.step(new tC(l,c,a.marks[e]));if(o&&a.isText&&"pre"!=n.whitespace){let t,e=/\r?\n|\r/g,r;for(;t=e.exec(a.text);)r||(r=new M(S.from(n.schema.text(" ",n.allowedMarks(a.marks))),0,0)),s.push(new tN(l+t.index,l+t.index+t[0].length,r))}}else s.push(new tN(l,c,M.empty));l=c}if(!r.validEnd){let e=r.fillBefore(S.empty,!0);t.replace(l,l,new M(e,0,0))}for(let e=s.length-1;e>=0;e--)t.step(s[e])}function tR(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),o=t.$from.index(n),i=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(o,i,e))return n;if(0==n||r.type.spec.isolating||!((0==o||r.canReplace(o,r.childCount))&&(i==r.childCount||r.canReplace(0,i))))break}return null}function tj(t,e,n=null,r=t){let o=function(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}(t,e),i=o&&function(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let t=r;l&&t<o;t++)l=l.matchType(n.child(t).type);return l&&l.validEnd?s:null}(r,e);return i?o.map(tI).concat({type:e,attrs:n}).concat(i.map(tI)):null}function tI(t){return{type:t,attrs:null}}function tP(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let t=o.depth-1,e=n-2;t>i;t--,e--){let n=o.node(t),i=o.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(i,n.childCount),l=r&&r[e+1];l&&(s=s.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[e]||n;if(!n.canReplace(i+1,n.childCount)||!a.type.validContent(s))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function tz(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&&t.canAppend(e))}function t_(t,e,n=-1){let r=t.resolve(e);for(let t=r.depth;;t--){let o,i,s=r.index(t);if(t==r.depth?(o=r.nodeBefore,i=r.nodeAfter):n>0?(o=r.node(t+1),s++,i=r.node(t).maybeChild(s)):(o=r.node(t).maybeChild(s-1),i=r.node(t+1)),o&&!o.isTextblock&&t$(o,i)&&r.node(t).canReplace(s,s+1))return e;if(0==t)break;e=n<0?r.before(t):r.after(t)}}function tB(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let t=0;t<n.openStart;t++)o=o.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,i=r.index(e)+(n>0?1:0),s=r.node(e),l=!1;if(1==t)l=s.canReplace(i,i,o);else{let t=s.contentMatchAt(i).findWrapping(o.firstChild.type);l=t&&s.canReplaceWith(i,i,t[0])}if(l)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}function tF(t,e,n=e,r=M.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return tL(o,i,r)?new tN(e,n,r):new tV(o,i,r).fit()}function tL(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}tS.jsonID("replaceAround",tE);class tV{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=S.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=S.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,r=this.close(t<0?this.$to:n.doc.resolve(t));if(!r)return null;let o=this.placed,i=n.depth,s=r.depth;for(;i&&s&&1==o.childCount;)o=o.firstChild.content,i--,s--;let l=new M(o,i,s);return t>-1?new tE(n.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||n.pos!=this.$to.pos?new tN(n.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<t;n++){let o=e.firstChild;if(e.childCount>1&&(r=0),o.type.spec.isolating&&r<=n){t=n;break}e=o.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t=null,r=(n?(t=tU(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let o=this.depth;o>=0;o--){let{type:i,match:s}=this.frontier[o],l,a=null;if(1==e&&(r?s.matchType(r.type)||(a=s.fillBefore(S.from(r),!1)):t&&i.compatibleContent(t.type)))return{sliceDepth:n,frontierDepth:o,parent:t,inject:a};if(2==e&&r&&(l=s.findWrapping(r.type)))return{sliceDepth:n,frontierDepth:o,parent:t,wrap:l};
4if(t&&s.matchType(t.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=tU(t,e);return!!r.childCount&&!r.firstChild.isLeaf&&(this.unplaced=new M(t,e+1,Math.max(n,r.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=tU(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new M(tW(t,e-1,1),e-1,o?e-1:n)}else this.unplaced=new M(tW(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:r,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let t=0;t<o.length;t++)this.openFrontierNode(o[t]);let i=this.unplaced,s=n?n.content:i.content,l=i.openStart-t,a=0,c=[],{match:u,type:p}=this.frontier[e];if(r){for(let t=0;t<r.childCount;t++)c.push(r.child(t));u=u.matchFragment(r)}let h=s.size+t-(i.content.size-i.openEnd);for(;a<s.childCount;){let t=s.child(a),e=u.matchType(t.type);if(!e)break;(++a>1||0==l||t.content.size)&&(u=e,c.push(function t(e,n,r){if(n<=0)return e;let o=e.content;return n>1&&(o=o.replaceChild(0,t(o.firstChild,n-1,1==o.childCount?r-1:0))),n>0&&(o=e.type.contentMatch.fillBefore(o).append(o),r<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(S.empty,!0)))),e.copy(o)}(t.mark(p.allowedMarks(t.marks)),1==a?l:0,a==s.childCount?h:-1)))}
vendor: 4,177 bytes, line 4
4let f=a==s.childCount;f||(h=-1),this.placed=tq(this.placed,e,S.from(c)),this.frontier[e].match=u,f&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=s;t<h;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=f?0==t?M.empty:new M(tW(i.content,t-1,1),t-1,h<0?i.openEnd:t-1):new M(tW(i.content,t,a),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let t=this.frontier[this.depth],e;if(!t.type.isTextblock||!tH(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],o=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),i=tH(t,e,r,n,o);if(i){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],o=tH(t,n,r,e,!0);if(!o||o.childCount)continue t}return{depth:e,fit:i,move:o?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=tq(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 r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=tq(this.placed,this.depth,S.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(S.empty,!0);t.childCount&&(this.placed=tq(this.placed,this.frontier.length,t))}}function tW(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(tW(t.firstChild.content,e-1,n)))}function tq(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(tq(t.lastChild.content,e-1,n)))}function tU(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function tH(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,i.content,s)?l:null}function tJ(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let r=t.start(o);if(r<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(r==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==r-1)&&n.push(o)}return n}class tK extends tS{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 tx.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 r=e.type.create(n,null,e.marks);return tx.fromReplace(t,this.pos,this.pos+1,new M(S.from(r),0,e.isLeaf?0:1))}getMap(){return tb.empty}invert(t){return new tK(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 tK(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 tK(e.pos,e.attr,e.value)}}tS.jsonID("attr",tK);class tG extends tS{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 tx.ok(n)}getMap(){return tb.empty}invert(t){return new tG(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 tG(e.attr,e.value)}}tS.jsonID("docAttr",tG);
4let tY=class extends Error{};(tY=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n}).prototype=Object.create(Error.prototype),tY.prototype.constructor=tY,tY.prototype.name="TransformError";class tX{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new tv}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new tY(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=M.empty){let r=tF(this.doc,t,e,n);return r&&this.step(r),this}replaceWith(t,e,n){return this.replace(t,e,new M(S.from(n),0,0))}delete(t,e){return this.replace(t,e,M.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(tL(o,i,r))return t.step(new tN(e,n,r));let s=tJ(o,t.doc.resolve(n));0==s[s.length-1]&&s.pop();let l=-(o.depth+1);s.unshift(l);for(let t=o.depth,e=o.pos-1;t>0;t--,e--){let n=o.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(t)>-1?l=t:o.before(t)==e&&s.splice(1,0,-t)}let a=s.indexOf(l),c=[],u=r.openStart;for(let t=r.content,e=0;;e++){let n=t.firstChild;if(c.push(n),e==r.openStart)break;t=n.content}for(let t=u-1;t>=0;t--){var p;let e=c[t],n=(p=e.type).spec.defining||p.spec.definingForContent;if(n&&!e.sameMarkup(o.node(Math.abs(l)-1)))u=t;else if(n||!e.type.isTextblock)break}for(let e=r.openStart;e>=0;e--){let l=(e+u+1)%(r.openStart+1),p=c[l];if(p)for(let e=0;e<s.length;e++){let c=s[(e+a)%s.length],u=!0;c<0&&(u=!1,c=-c);let h=o.node(c-1),f=o.index(c-1);if(h.canReplaceWith(f,f,p.type,p.marks))return t.replace(o.before(c),u?i.after(c):n,new M(function t(e,n,r,o,i){if(n<r){let i=e.firstChild;e=e.replaceChild(0,i.copy(t(i.content,n+1,r,o,i)))}if(n>o){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(S.empty,!0))}return e}(r.content,0,r.openStart,l),l,r.openEnd))}}let h=t.steps.length;for(let l=s.length-1;l>=0&&(t.replace(e,n,r),!(t.steps.length>h));l--){let t=s[l];t<0||(e=o.before(t),n=i.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e<r.node(t).childCount)break}return null}(t.doc,e,r.type);null!=o&&(e=n=o)}t.replaceRange(e,n,new M(S.from(r),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=tJ(r,o);for(let e=0;e<i.length;e++){let n=i[e],s=e==i.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return t.delete(r.start(n),o.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return t.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return t.delete(r.before(i),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),l=o.after(i+1),a=s,c=l,u=S.empty,p=0;for(let t=i,e=!1;t>n;t--)e||r.index(t)>0?(e=!0,u=S.from(r.node(t).copy(u)),p++):a--;let h=S.empty,f=0;for(let t=i,e=!1;t>n;t--)e||o.after(t+1)<o.end(t)?(e=!0,h=S.from(o.node(t).copy(h)),f++):c++;t.step(new tE(a,c,s,l,new M(u.append(h),p,f),u.size-p,!0))}(this,t,e),this}join(t,e=1){return function(t,e,n){let r=new tN(e-n,e+n,M.empty,!0);t.step(r)}(this,t,e),this}wrap(t,e){return function(t,e,n){let r=S.empty;for(let t=n.length-1;t>=0;t--){if(r.size){let e=n[t].type.contentMatch.matchFragment(r);if(!e||!e.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=S.from(n[t].type.create(n[t].attrs,r))}let o=e.start,i=e.end;t.step(new tE(o,i,o,i,new M(r,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,r=null){return function(t,e,n,r,o){if(!r.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(e,n)=>{var s,l;let a,c,u="function"==typeof o?o(e):o;if(e.isTextblock&&!e.hasMarkup(r,u)&&(s=t.doc,l=t.mapping.slice(i).map(n),c=(a=s.resolve(l)).index(),a.parent.canReplaceWith(c,c+1,r))){let o=null;if(r.schema.linebreakReplacement){let t="pre"==r.whitespace,e=!!r.contentMatch.matchType(r.schema.linebreakReplacement);t&&!e?o=!1:!t&&e&&(o=!0)}!1===o&&function(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+i);t.replaceWith(o,o+1,e.type.schema.text(` 5`))}})}(t,e,n,i),tD(t,t.mapping.slice(i).map(n,1),r,void 0,null===o);let s=t.mapping.slice(i),l=s.map(n,1),a=s.map(n+e.nodeSize,1);return t.step(new tE(l,a,l+1,a-1,new M(S.from(r.create(u,null,e.marks)),0,0),1,!0)),!0===o&&function(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;
5for(;s=l.exec(o.text);){let o=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(o,o+1,e.type.schema.linebreakReplacement.create())}}})}(t,e,n,i),!1}})}(this,t,e,n,r),this}setNodeMarkup(t,e,n=null,r){return function(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw RangeError("Invalid content for node type "+n.name);t.step(new tE(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new M(S.from(s),0,0),1,!0))}(this,t,e,n,r),this}setNodeAttribute(t,e,n){return this.step(new tK(t,e,n)),this}setDocAttribute(t,e){return this.step(new tG(t,e)),this}addNodeMark(t,e){return this.step(new tA(t,e)),this}removeNodeMark(t,e){if(!(e instanceof C)){let n=this.doc.nodeAt(t);if(!n)throw RangeError("No node at position "+t);if(!(e=e.isInSet(n.marks)))return this}return this.step(new tM(t,e)),this}split(t,e=1,n){return function(t,e,n=1,r){let o=t.doc.resolve(e),i=S.empty,s=S.empty;for(let t=o.depth,e=o.depth-n,l=n-1;t>e;t--,l--){i=S.from(o.node(t).copy(i));let e=r&&r[l];s=S.from(e?e.type.create(e.attrs,s):o.node(t).copy(s))}t.step(new tN(e,e,new M(i.append(s),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){var r;let o,i,s,l;return r=this,o=[],i=[],r.doc.nodesBetween(t,e,(r,a,c)=>{if(!r.isInline)return;let u=r.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){let c=Math.max(a,t),p=Math.min(a+r.nodeSize,e),h=n.addToSet(u);for(let t=0;t<u.length;t++)u[t].isInSet(h)||(s&&s.to==c&&s.mark.eq(u[t])?s.to=p:o.push(s=new tC(c,p,u[t])));l&&l.to==c?l.to=p:i.push(l=new tO(c,p,n))}}),o.forEach(t=>r.step(t)),i.forEach(t=>r.step(t)),this}removeMark(t,e,n){var r;let o,i;return r=this,o=[],i=0,r.doc.nodesBetween(t,e,(r,s)=>{if(!r.isInline)return;i++;let l=null;if(n instanceof tt){let t=r.marks,e;for(;e=n.isInSet(t);)(l||(l=[])).push(e),t=e.removeFromSet(t)}else n?n.isInSet(r.marks)&&(l=[n]):l=r.marks;if(l&&l.length){let n=Math.min(s+r.nodeSize,e);for(let e=0;e<l.length;e++){let r=l[e],a;for(let t=0;t<o.length;t++){let e=o[t];e.step==i-1&&r.eq(o[t].style)&&(a=e)}a?(a.to=n,a.step=i):o.push({style:r,from:Math.max(s,t),to:n,step:i})}}}),o.forEach(t=>r.step(new tC(t.from,t.to,t.style))),this}clearIncompatible(t,e,n){return tD(this,t,e,n),this}}let tQ=Object.create(null);class tZ{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new t0(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=M.empty){let n=e.content.lastChild,r=null;for(let t=0;t<e.openEnd;t++)r=n,n=n.lastChild;let o=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:l,$to:a}=i[s],c=t.mapping.slice(o);t.replaceRange(c.map(l.pos),c.map(a.pos),s?M.empty:e),0==s&&et(t,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],l=t.mapping.slice(n),a=l.map(i.pos),c=l.map(s.pos);o?t.deleteRange(a,c):(t.replaceRangeWith(a,c,e),et(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new t3(t):t7(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 o=e<0?t7(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):t7(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(o)return o}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new t8(t.node(0))}static atStart(t){return t7(t,t,0,0,1)||new t8(t)}static atEnd(t){return t7(t,t,t.content.size,t.childCount,-1)||new t8(t)}static fromJSON(t,e){if(!e||!e.type)throw RangeError("Invalid input for Selection.fromJSON");let n=tQ[e.type];if(!n)throw RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in tQ)throw RangeError("Duplicate use of selection JSON ID "+t);return tQ[t]=e,e.prototype.jsonID=t,e}getBookmark(){return t3.between(this.$anchor,this.$head).getBookmark()}}tZ.prototype.visible=!0;class t0{constructor(t,e){this.$from=t,this.$to=e}}let t1=!1;function t2(t){t1||t.parent.inlineContent||(t1=!0,console.warn("TextSelection endpoint not pointing into a
5node with inline content ("+t.parent.type.name+")"))}class t3 extends tZ{constructor(t,e=t){t2(t),t2(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 tZ.near(n);let r=t.resolve(e.map(this.anchor));return new t3(r.parent.inlineContent?r:n,n)}replace(t,e=M.empty){if(super.replace(t,e),e==M.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof t3&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new t5(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 t3(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=tZ.findFrom(e,n,!0)||tZ.findFrom(e,-n,!0);if(!t)return tZ.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r?t=e:(t=(tZ.findFrom(t,-n,!0)||tZ.findFrom(t,n,!0)).$anchor).pos<e.pos!=r<0&&(t=e)),new t3(t,e)}}tZ.jsonID("text",t3);class t5{constructor(t,e){this.anchor=t,this.head=e}map(t){return new t5(t.map(this.anchor),t.map(this.head))}resolve(t){return t3.between(t.resolve(this.anchor),t.resolve(this.head))}}class t4 extends tZ{constructor(t){let e=t.nodeAfter;super(t,t.node(0).resolve(t.pos+e.nodeSize)),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),o=t.resolve(r);return n?tZ.near(o):new t4(o)}content(){return new M(S.from(this.node),0,0)}eq(t){return t instanceof t4&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new t6(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new t4(t.resolve(e.anchor))}static create(t,e){return new t4(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}t4.prototype.visible=!1,tZ.jsonID("node",t4);class t6{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new t5(n,n):new t6(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&t4.isSelectable(n)?new t4(e):tZ.near(e)}}class t8 extends tZ{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=M.empty){if(e==M.empty){t.delete(0,t.doc.content.size);let e=tZ.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new t8(t)}map(t){return new t8(t)}eq(t){return t instanceof t8}getBookmark(){return t9}}tZ.jsonID("all",t8);let t9={map(){return this},resolve:t=>new t8(t)};function t7(t,e,n,r,o,i=!1){if(e.inlineContent)return t3.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let r=e.child(s);if(r.isAtom){if(!i&&t4.isSelectable(r))return t4.create(t,n-(o<0?r.nodeSize:0))}else{let e=t7(t,r,n+o,o<0?r.childCount:0,o,i);if(e)return e}n+=r.nodeSize*o}return null}function et(t,e,n){let r,o=t.steps.length-1;if(o<e)return;let i=t.steps[o];(i instanceof tN||i instanceof tE)&&(t.mapping.maps[o].forEach((t,e,n,o)=>{null==r&&(r=o)}),t.setSelection(tZ.near(t.doc.resolve(r),n)))}class ee extends tX{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 C.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)||C.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=n??e,!t)return this.deleteRange(e,n);let o=this.storedMarks;if(!o){let t=this.doc.resolve(e);o=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(tZ.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 en(t,e){return e&&t?t.bind(e):t}class er{constructor(t,e,n){this.name=t,this.init=en(e.init,n),this.apply=en(e.apply,n)}}let eo=[new er("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new er("selection",{init:(t,e)=>t.selection||tZ.atStart(e.doc),apply:t=>t.selection}),new er("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new er("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class ei{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=eo.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 er(t.key,t.spec.state,t))})}}class es{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}
5apply(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 o=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let l=r?r[i].n:0,a=r?r[i].state:this,c=l<e.length&&s.spec.appendTransaction.call(s,l?e.slice(l):e,a,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<i?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:e.length})}}if(!o)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let e=new es(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];e[o.name]=o.apply(t,this[o.name],this,e)}return e}get tr(){return new ee(this)}static create(t){let e=new ei(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new es(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 ei(this.schema,t.plugins),n=e.fields,r=new es(e);for(let e=0;e<n.length;e++){let o=n[e].name;r[o]=this.hasOwnProperty(o)?this[o]: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],o=r.spec.state;o&&o.toJSON&&(e[n]=o.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 r=new ei(t.schema,t.plugins),o=new es(r);return r.fields.forEach(r=>{if("doc"==r.name)o.doc=F.fromJSON(t.schema,e.doc);else if("selection"==r.name)o.selection=tZ.fromJSON(o.doc,e.selection);else if("storedMarks"==r.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let i in n){let s=n[i],l=s.spec.state;if(s.key==r.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,i)){o[r.name]=l.fromJSON.call(s,t,e[i],o);return}}o[r.name]=r.init(t,o)}}),o}}
5class el{constructor(t){this.spec=t,this.props={},t.props&&function t(e,n,r){for(let o in e){let i=e[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=t(i,n,{})),r[o]=i}return r}(t.props,this,this.props),this.key=t.key?t.key.key:ec("plugin")}getState(t){return t[this.key]}}let ea=Object.create(null);function ec(t){return t in ea?t+"$"+ ++ea[t]:(ea[t]=0,t+"$")}class eu{constructor(t="key"){this.key=ec(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}let ep=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},eh=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e},ef=null,ed=function(t,e,n){let r=ef||(ef=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},em=function(){ef=null},eg=function(t,e,n,r){return n&&(eb(t,e,n,r,-1)||eb(t,e,n,r,1))},ey=/^(img|br|input|textarea|hr)$/i;function eb(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:ev(t))){let n=t.parentNode;if(!n||1!=n.nodeType||ew(t)||ey.test(t.nodeName)||"false"==t.contentEditable)return!1;e=ep(t)+(o<0?0:1),t=n}else{if(1!=t.nodeType||"false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?ev(t):0}}}function ev(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function ew(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}let eS=function(t){return t.focusNode&&eg(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ex(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}let ek="u">typeof navigator?navigator:null,eO="u">typeof document?document:null,eC=ek&&ek.userAgent||"",eA=/Edge\/(\d+)/.exec(eC),eM=/MSIE \d/.exec(eC),eN=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(eC),eE=!!(eM||eN||eA),eT=eM?document.documentMode:eN?+eN[1]:eA?+eA[1]:0,eD=!eE&&/gecko\/(\d+)/i.test(eC);eD&&(/Firefox\/(\d+)/.exec(eC)||[0,0])[1];let eR=!eE&&/Chrome\/(\d+)/.exec(eC),ej=!!eR,eI=eR?+eR[1]:0,eP=!eE&&!!ek&&/Apple Computer/.test(ek.vendor),ez=eP&&(/Mobile\/\w+/.test(eC)||!!ek&&ek.maxTouchPoints>2),e$=ez||!!ek&&/Mac/.test(ek.platform),e_=!!ek&&/Win/.test(ek.platform),eB=/Android \d/.test(eC),eF=!!eO&&"webkitFontSmoothing"in eO.documentElement.style,eL=eF?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function eV(t,e){return"number"==typeof t?t:t[e]}function eW(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;s=eh(s)){if(1!=s.nodeType)continue;let t=s,n=t==i.body,l=n?function(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}(i):function(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}(t),a=0,c=0;if(e.top<l.top+eV(r,"top")?c=-(l.top-e.top+eV(o,"top")):e.bottom>l.bottom-eV(r,"bottom")&&(c=e.bottom-e.top>l.bottom-l.top?e.top+eV(o,"top")-l.top:e.bottom-l.bottom+eV(o,"bottom")),e.left<l.left+eV(r,"left")?a=-(l.left-e.left+eV(o,"left")):e.right>l.right-eV(r,"right")&&(a=e.right-l.right+eV(o,"right")),a||c){if(n)i.defaultView.scrollBy(a,c);else{let n=t.scrollLeft,r=t.scrollTop;c&&(t.scrollTop+=c),a&&(t.scrollLeft+=a);let o=t.scrollLeft-n,i=t.scrollTop-r;e={left:e.left-o,top:e.top-i,right:e.right-o,bottom:e.bottom-i}}}if(n||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function eq(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=eh(r));return e}function eU(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let eH=null;function eJ(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function eK(t){return t.top<t.bottom||t.left<t.right}function eG(t,e){let n=t.getClientRects();if(n.length){let t=n[e<0?0:n.length-1];if(eK(t))return t}return Array.prototype.find.call(n,eK)||t.getBoundingClientRect()}let eY=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function eX(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=eF||eD;if(3==r.nodeType){if(s&&(eY.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let t=eG(ed(r,o,o),n);if(eD&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let e=eG(ed(r,o-1,o-1),-1);
vendor: 4,210 bytes, line 5
5if(e.top==t.top){let n=eG(ed(r,o,o+1),-1);if(n.top!=t.top)return eQ(n,n.left<e.left)}}return t}{let t=o,e=o,i=n<0?1:-1;return n<0&&!o?(e++,i=-1):n>=0&&o==r.nodeValue.length?(t--,i=1):n<0?t--:e++,eQ(eG(ed(r,t,e),i),i<0)}}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(null==i&&o&&(n<0||o==ev(r))){let t=r.childNodes[o-1];if(1==t.nodeType)return eZ(t.getBoundingClientRect(),!1)}if(null==i&&o<ev(r)){let t=r.childNodes[o];if(1==t.nodeType)return eZ(t.getBoundingClientRect(),!0)}return eZ(r.getBoundingClientRect(),n>=0)}if(null==i&&o&&(n<0||o==ev(r))){let t=r.childNodes[o-1],e=3==t.nodeType?ed(t,ev(t)-(s?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return eQ(eG(e,1),!1)}if(null==i&&o<ev(r)){let t=r.childNodes[o];for(;t.pmViewDesc&&t.pmViewDesc.ignoreForCoords;)t=t.nextSibling;let e=t?3==t.nodeType?ed(t,0,s?0:1):1==t.nodeType?t:null:null;if(e)return eQ(eG(e,-1),!0)}return eQ(eG(3==r.nodeType?ed(r):r,-n),n>=0)}function eQ(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function eZ(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function e0(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}let e1=/[\u0590-\u08ac]/,e2=null,e3=null,e5=!1;class e4{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;e<this.children.length;e++)t+=this.children[e].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let e=0,n=this.posAtStart;;e++){let r=this.children[e];if(r==t)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,e,n){let r;if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){let n,r;if(t==this.contentDOM)n=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(t==this.contentDOM)n=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}if(t==this.dom&&this.contentDOM)r=e>ep(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let o=this.getDesc(r),i;if(o&&(!e||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==t.nodeType?t:t.parentNode):i==t))return o;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let t=e;t;t=t.parent)if(t==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return -1}descAt(t){for(let e=0,n=0;e<this.children.length;e++){let r=this.children[e],o=n+r.size;if(n==t&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(t<o)return r.descAt(t-n-r.border);n=o}}domFromPos(t,e){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let n=0,r=0;for(let e=0;n<this.children.length;n++){let o=this.children[n],i=e+o.size;if(i>t||o instanceof nn){r=t-e;break}e=i}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(let t;
5n&&!(t=this.children[n-1]).size&&t instanceof e6&&t.side>=0;n--);if(e<=0){let t,r=!0;for(;!(!(t=n?this.children[n-1]:null)||t.dom.parentNode==this.contentDOM);n--,r=!1);return t&&e&&r&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?ep(t.dom)+1:0}}{let t,r=!0;for(;!(!(t=n<this.children.length?this.children[n]:null)||t.dom.parentNode==this.contentDOM);n++,r=!1);return t&&r&&!t.border&&!t.domAtom?t.domFromPos(0,e):{node:this.contentDOM,offset:t?ep(t.dom):this.contentDOM.childNodes.length}}}parseRange(t,e,n=0){if(0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,s=0;;s++){let n=this.children[s],l=i+n.size;if(-1==r&&t<=l){let o=i+n.border;if(t>=o&&e<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,o);t=i;for(let e=s;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=ep(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(l>e||s==this.children.length-1)){e=l;for(let t=s+1;t<this.children.length;t++){let n=this.children[t];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=ep(n.dom);break}e+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)}domAfterPos(t){let{node:e,offset:n}=this.domFromPos(t,0);if(1!=e.nodeType||n==e.childNodes.length)throw RangeError("No node after pos "+t);return e.childNodes[n]}setSelection(t,e,n,r=!1){let o=Math.min(t,e),i=Math.max(t,e);for(let s=0,l=0;s<this.children.length;s++){let a=this.children[s],c=l+a.size;if(o>l&&i<c)return a.setSelection(t-l-a.border,e-l-a.border,n,r);l=c}let s=this.domFromPos(t,t?-1:1),l=e==t?s:this.domFromPos(e,e?-1:1),a=n.getSelection(),c=!1;if((eD||eP)&&t==e){let{node:t,offset:e}=s;if(3==t.nodeType){if((c=!!(e&&t.nodeValue[e-1]==` 6`))&&e==t.nodeValue.length)for(let e=t,n;e;e=e.parentNode){if(n=e.nextSibling){"BR"==n.nodeName&&(s=l={node:n.parentNode,offset:ep(n)+1});break}let t=e.pmViewDesc;if(t&&t.node&&t.node.isBlock)break}}else{let n=t.childNodes[e-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(eD&&a.focusNode&&a.focusNode!=l.node&&1==a.focusNode.nodeType){let t=a.focusNode.childNodes[a.focusOffset];t&&"false"==t.contentEditable&&(r=!0)}if(!(r||c&&eP)&&eg(s.node,s.offset,a.anchorNode,a.anchorOffset)&&eg(l.node,l.offset,a.focusNode,a.focusOffset))return;let u=!1;if((a.extend||t==e)&&!c){a.collapse(s.node,s.offset);try{t!=e&&a.extend(l.node,l.offset),u=!0}catch{}}if(!u){if(t>e){let t=s;s=l,l=t}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(s.node,s.offset),a.removeAllRanges(),a.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?t<=i&&e>=n:t<i&&e>n){let r=n+o.border,s=i-o.border;if(t>=r&&e<=s){this.dirty=t==n||e==i?2:1,t==r&&e==s&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=3:o.markDirty(t-r,e-r);return}o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirty<n&&(e.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class e6 extends e4{constructor(t,e,n,r){let o,i=e.type.toDOM;if("function"==typeof i&&(i=i(n,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r)),!e.type.spec.raw){if(1!=i.nodeType){let t=document.createElement("span");t.appendChild(i),i=t}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class e8 extends e4{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class e9 extends e4{constructor(t,e,n,r){super(t,[],n,r),this.mark=e}static create(t,e,n,r){let o=r.nodeViews[e.type.name],i=o&&o(e,r,n);return i&&i.dom||(i=th.renderSpec(document,e.type.spec.toDOM(e,n),null,e.attrs)),new e9(t,e,i.dom,i.contentDOM||i.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty<this.dirty&&(t.dirty=this.dirty),this.dirty=0}}slice(t,e,n){let r=e9.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;e<i&&(o=nf(o,e,i,n)),t>0&&(o=nf(o,0,t,n));for(let t=0;t<o.length;t++)o[t].parent=r;return r.children=o,r}}class e7 extends e4{constructor(t,e,n,r,o,i,s,l,a){super(t,[],o,i),this.node=e,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(t,e,n,r,o,i){let s=o.nodeViews[e.type.name],l,a=s&&s(e,o,()=>l?l.parent?l.parent.posBeforeChild(l):void 0:i,n,r),c=a&&a.dom,u=a&&a.contentDOM;if(e.isText){if(c){if(3!=c.nodeType)throw RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(e.text)}else c||({dom:c,contentDOM:u}=th.renderSpec(document,e.type.spec.toDOM(e),null,e.attrs));u||e.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),e.type.spec.draggable&&(c.draggable=!0));let p=c;
6return c=na(c,n,e),a?l=new nr(t,e,n,r,c,u||null,p,a,o,i+1):e.isText?new ne(t,e,n,r,c,p,o):new e7(t,e,n,r,c,u||null,p,o,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM){if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>S.empty)}else t.contentElement=this.contentDOM}else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&nc(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,o=t.composing?this.localCompositionInfo(t,e):null,i=o&&o.pos>-1?o:null,s=o&&o.pos<0,l=new np(this,i&&i.node,t);(function(t,e,n,r){let o=e.locals(t),i=0;if(0==o.length){for(let n=0;n<t.childCount;n++){let s=t.child(n);r(s,o,e.forChild(i,s),n),i+=s.nodeSize}return}let s=0,l=[],a=null;for(let c=0;;){let u,p,h,f;for(;s<o.length&&o[s].to==i;){let t=o[s++];t.widget&&(u?(p||(p=[u])).push(t):u=t)}if(u){if(p){p.sort(nh);for(let t=0;t<p.length;t++)n(p[t],c,!!a)}else n(u,c,!!a)}if(a)f=-1,h=a,a=null;else if(c<t.childCount)f=c,h=t.child(c++);else break;for(let t=0;t<l.length;t++)l[t].to<=i&&l.splice(t--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)l.push(o[s++]);let d=i+h.nodeSize;if(h.isText){let t=d;s<o.length&&o[s].from<t&&(t=o[s].from);for(let e=0;e<l.length;e++)l[e].to<t&&(t=l[e].to);t<d&&(a=h.cut(t-i),h=h.cut(0,t-i),d=t,f=-1)}else for(;s<o.length&&o[s].to<d;)s++;let m=h.isInline&&!h.isLeaf?l.filter(t=>!t.inline):l.slice();r(h,m,e.forChild(i,h),f),i=d}})(this.node,this.innerDeco,(e,o,i)=>{e.spec.marks?l.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!i&&l.syncToMarks(o==this.node.childCount?C.none:this.node.child(o).marks,n,t),l.placeWidget(e,t,r)},(e,i,a,c)=>{let u;l.syncToMarks(e.marks,n,t),l.findNodeMatch(e,i,a,c)||s&&t.state.selection.from>r&&t.state.selection.to<r+e.nodeSize&&(u=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(e,i,a,u,t)||l.updateNextNode(e,i,a,t,c,r)||l.addNode(e,i,a,t,r),r+=e.nodeSize}),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(i&&this.protectLocalComposition(t,i),function t(e,n,r){let o=e.firstChild,i=!1;for(let s=0;s<n.length;s++){let l=n[s],a=l.dom;if(a.parentNode==e){for(;a!=o;)o=nu(o),i=!0;o=o.nextSibling}else i=!0,e.insertBefore(a,o);if(l instanceof e9){let n=o?o.previousSibling:e.lastChild;t(l.contentDOM,l.children,r),o=n?n.nextSibling:e.firstChild}}for(;o;)o=nu(o),i=!0;i&&r.trackWrites==e&&(r.trackWrites=null)}(this.contentDOM,this.children,t),ez&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))}localCompositionInfo(t,e){let{from:n,to:r}=t.state.selection;if(!(t.state.selection instanceof t3)||n<e||r>e+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(!this.node.inlineContent)return{node:o,pos:-1,text:""};{let t=o.nodeValue,i=function(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),l=i;if(i+=s.nodeSize,!s.isText)continue;let a=s.text;for(;o<t.childCount;){let e=t.child(o++);if(i+=e.nodeSize,!e.isText)break;a+=e.text}if(i>=n){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let t=l<r?a.lastIndexOf(e,r-l-1):-1;if(t>=0&&t+e.length+l>=n)return l+t;if(n==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return -1}(this.node.content,t,n-e,r-e);return i<0?null:{node:o,pos:i,text:t}}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let o=e;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new e8(this,o,e,r);t.input.compositionNodes.push(i),this.children=nf(this.children,n,n+r.length,t,i)}update(t,e,n,r){return!!(3!=this.dirty&&t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(nc(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=nl(this.dom,this.nodeDOM,ns(this.outerDeco,this.node,e),ns(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function nt(t,e,n,r,o){na(r,e,t);let i=new e7(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class ne extends e7{constructor(t,e,n,r,o,i,s){super(t,e,n,r,o,null,i,s,0
6)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!!(3!=this.dirty&&(0==this.dirty||this.inParent())&&t.sameMarkup(this.node))&&(this.updateOuterDeco(e),(0!=this.dirty||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),o=document.createTextNode(r.text);return new ne(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(t,e){super.markDirty(t,e),this.dom!=this.nodeDOM&&(0==t||e==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}isText(t){return this.node.text==t}}class nn extends e4{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class nr extends e7{constructor(t,e,n,r,o,i,s,l,a,c){super(t,e,n,r,o,i,s,a,c),this.spec=l}update(t,e,n,r){if(3==this.dirty)return!1;if(!this.spec.update)return(!!this.contentDOM||!!t.isLeaf)&&super.update(t,e,n,r);{let o=this.spec.update(t,e,n);return o&&this.updateInner(t,e,n,r),o}}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}let no=function(t){t&&(this.nodeName=t)};no.prototype=Object.create(null);let ni=[new no];function ns(t,e,n){if(0==t.length)return ni;let r=n?ni[0]:new no,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s)for(let t in s.nodeName&&o.push(r=new no(s.nodeName)),s){let i=s[t];null!=i&&(n&&1==o.length&&o.push(r=new no(e.isInline?"span":"div")),"class"==t?r.class=(r.class?r.class+" ":"")+i:"style"==t?r.style=(r.style?r.style+";":"")+i:"nodeName"!=t&&(r[t]=i))}}return o}function nl(t,e,n,r){if(n==ni&&r==ni)return e;let o=e;for(let e=0;e<r.length;e++){let i=r[e],s=n[e];if(e){let e;s&&s.nodeName==i.nodeName&&o!=t&&(e=o.parentNode)&&e.nodeName.toLowerCase()==i.nodeName||((e=document.createElement(i.nodeName)).pmIsDeco=!0,e.appendChild(o),s=ni[0]),o=e}!function(t,e,n){for(let r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let e=0;e<r.length;e++)-1==o.indexOf(r[e])&&t.classList.remove(r[e]);for(let e=0;e<o.length;e++)-1==r.indexOf(o[e])&&t.classList.add(o[e]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(e.style);)t.style.removeProperty(r[1])}n.style&&(t.style.cssText+=n.style)}}(o,s||ni[0],i)}return o}function na(t,e,n){return nl(t,t,ni,ns(e,n,1!=t.nodeType))}function nc(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function nu(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class np{constructor(t,e,n){this.lock=e,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];t:for(;o>0;){let l;for(;;)if(r){let t=n.children[r-1];if(t instanceof e9)n=t,r=t.children.length;else{l=t,r--;break}}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,e,n){let r=0,o=this.stack.length>>1,i=Math.min(o,t.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<t.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let e=this.index;e<Math.min(this.index+3,this.top.children.length);e++){let n=this.top.children[e];if(n.matchesMark(t[o])&&!this.isLocked(n.dom)){r=e;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=e9.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,n,r){let o=-1,i;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(t,e,n))o=this.top.children.indexOf(i,this.index);else for(let r=this.index,i=Math.min(this.top.children.length,r+5);r<i;r++){let i=this.top.children[r];if(i.matchesNode(t,e,n)&&!this.preMatch.matched.has(i)){o=r;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(t,e,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(t,e,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(t){for(;;){let e=t.parentNode;if(!e)return -1;if(e==this.top.contentDOM){let e=t.pmViewDesc;if(e){for(let t=this.index;t<this.top.children.length;t++)if(this.top.children[t]==e)return t}return -1}t=e}}updateNextNode(t,e,n,r,o,i){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof e7){let a=this.preMatch.matched.get(l);if(null!=a&&a!=o)return!1;
6let c=l.dom,u,p=this.isLocked(c)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&3!=l.dirty&&nc(e,l.outerDeco));if(!p&&l.update(t,e,n,r))return this.destroyBetween(this.index,s),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!p&&(u=this.recreateWrapper(l,t,e,n,r,i)))return this.top.children[this.index]=u,u.contentDOM&&(u.dirty=2,u.updateChildren(r,i+1),u.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,e,n,r,o,i){if(t.dirty||e.isAtom||!t.children.length||!t.node.content.eq(e.content))return null;let s=e7.create(this.top,e,n,r,o,i);if(s.contentDOM)for(let e of(s.children=t.children,t.children=[],s.children))e.parent=s;return t.destroy(),s}addNode(t,e,n,r,o){let i=e7.create(this.top,t,e,n,r,o);i.contentDOM&&i.updateChildren(r,o+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(t,e,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(t)&&(t==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new e6(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],e=this.top;for(;t instanceof e9;)t=(e=t).children[e.children.length-1];(!t||!(t instanceof ne)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((eP||ej)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG",e),this.addHackNode("BR",this.top))}addHackNode(t,e){if(e==this.top&&this.index<e.children.length&&e.children[this.index].matchesHack(t))this.index++;else{let n=document.createElement(t);"IMG"==t&&(n.className="ProseMirror-separator",n.alt=""),"BR"==t&&(n.className="ProseMirror-trailingBreak");let r=new nn(this.top,[],n,null);e!=this.top?e.children.push(r):e.children.splice(this.index++,0,r),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||1==t.nodeType&&t.contains(this.lock.parentNode))}}function nh(t,e){return t.type.side-e.type.side}function nf(t,e,n,r,o){let i=[];for(let s=0,l=0;s<t.length;s++){let a=t[s],c=l,u=l+=a.size;c>=n||u<=e?i.push(a):(c<e&&i.push(a.slice(0,e-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(a.slice(n-c,a.size,r)))}return i}function nd(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&0==o.size,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,c;if(eS(n)){for(a=l;o&&!o.node;)o=o.parent;let t=o.node;if(o&&t.isAtom&&t4.isSelectable(t)&&o.parent&&!(t.isInline&&function(t,e,n){for(let r=0==e,o=e==ev(t);r||o;){if(t==n)return!0;let e=ep(t);if(!(t=t.parentNode))return!1;r=r&&0==e,o=o&&e==ev(t)}}(n.focusNode,n.focusOffset,o.dom))){let t=o.posBefore;c=new t4(s==t?l:r.resolve(t))}}else{let e=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(e<0)return null;a=r.resolve(e)}if(!c){let n="pointer"==e||t.state.selection.head<l.pos&&!i?1:-1;c=nk(t,a,l,n)}return c}function nm(t){return t.editable?t.hasFocus():nC(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ng(t,e=!1){let n=t.state.selection;if(nS(t,n),nm(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&ej){let e=t.domSelectionRange(),n=t.domObserver.currentSelection;if(e.anchorNode&&n.anchorNode&&eg(e.anchorNode,e.anchorOffset,n.anchorNode,n.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setStart(r.parentNode,ep(r)+1):n.setStart(r,0);let i=t.state.selection;if(i.empty)n.collapse(!0);else{let e=t.domAtPos(i.to);n.setEnd(e.node,e.offset)}e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&eE&&eT<=11&&(r.disabled=!0,r.disabled=!1)}(t);else{let r,o,i,s,{anchor:l,head:a}=n,c,u;!ny||n instanceof t3||(n.$from.parent.inlineContent||(c=nb(t,n.from)),n.empty||n.$from.parent.inlineContent||(u=nb(t,n.to))),t.docView.setSelection(l,a,t.root,e),ny&&(c&&nw(c),u&&nw(u)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&((r=t.dom.ownerDocument).removeEventListener("selectionchange",t.input.hide
6SelectionGuard),i=(o=t.domSelectionRange()).anchorNode,s=o.anchorOffset,r.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(o.anchorNode!=i||o.anchorOffset!=s)&&(r.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!nm(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}let ny=eP||ej&&eI<63;function nb(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(eP&&o&&"false"==o.contentEditable)return nv(o);if((!o||"false"==o.contentEditable)&&(!i||"false"==i.contentEditable)){if(o)return nv(o);if(i)return nv(i)}}function nv(t){return t.contentEditable="true",eP&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function nw(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function nS(t,e){if(e instanceof t4){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(nx(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else nx(t)}function nx(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function nk(t,e,n,r){return t.someProp("createSelectionBetween",r=>r(t,e,n))||t3.between(e,n,r)}function nO(t){return(!t.editable||!!t.hasFocus())&&nC(t)}function nC(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function nA(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&tZ.findFrom(i,e)}function nM(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function nN(t,e,n){let r=t.state.selection;if(r instanceof t3){if(n.indexOf("s")>-1){let{$head:n}=r,o=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let i=t.state.doc.resolve(n.pos+o.nodeSize*(e<0?-1:1));return nM(t,new t3(r.$anchor,i))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=nA(t.state,e);return!!n&&n instanceof t4&&nM(t,n)}if(!(e$&&n.indexOf("m")>-1)){let n=r.$head,o=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter,i;if(!o||o.isText)return!1;let s=e<0?n.pos-o.nodeSize:n.pos;return!!(o.isAtom||(i=t.docView.descAt(s))&&!i.contentDOM)&&(t4.isSelectable(o)?nM(t,new t4(e<0?t.state.doc.resolve(n.pos-o.nodeSize):n)):!!eF&&nM(t,new t3(t.state.doc.resolve(e<0?s:s+o.nodeSize))))}}else{if(r instanceof t4&&r.node.isInline)return nM(t,new t3(e>0?r.$to:r.$from));{let n=nA(t.state,e);return!!n&&nM(t,n)}}}function nE(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function nT(t,e){let n=t.pmViewDesc;return n&&0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName)}function nD(t,e){return e<0?function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(eD&&1==n.nodeType&&r<nE(n)&&nT(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if(nT(t,-1))o=n,i=--r;else if(3==t.nodeType)r=(n=t).nodeValue.length;else break}}else{if(nR(n))break;{let e=n.previousSibling;for(;e&&nT(e,-1);)o=n.parentNode,i=ep(e),e=e.previousSibling;if(e)r=nE(n=e);else{if((n=n.parentNode)==t.dom)break;r=0}}}s?nj(t,n,r):o&&nj(t,o,i)}(t):function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=nE(n),i,s;for(;;)if(r<o){if(1!=n.nodeType)break;if(nT(n.childNodes[r],1))i=n,s=++r;else break}else{if(nR(n))break;{let e=n.nextSibling;for(;e&&nT(e,1);)i=e.parentNode,s=ep(e)+1,e=e.nextSibling;if(e)r=0,o=nE(n=e);else{if((n=n.parentNode)==t.dom)break;r=o=0}}}i&&nj(t,i,s)}(t)}function nR(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function nj(t,e,n){if(3!=e.nodeType){let t,r;(r=function(t,e){for(;t&&e==t.childNodes.length&&!ew(t);)e=ep(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=n,e=0}}
vendor: 2,094 bytes, line 6
6(e,n))?(e=r,n=0):(t=function(t,e){for(;t&&!e&&!ew(t);)e=ep(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=(t=n).childNodes.length}}(e,n))&&(e=t,n=t.nodeValue.length)}let r=t.domSelection();if(!r)return;if(eS(r)){let t=document.createRange();t.setEnd(e,n),t.setStart(e,n),r.removeAllRanges(),r.addRange(t)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&ng(t)},50)}function nI(t,e){let n=t.state.doc.resolve(e);if(!(ej||e_)&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let n=t.coordsAtPos(e-1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(e<n.end()){let n=t.coordsAtPos(e+1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(t.dom).direction?"rtl":"ltr"}function nP(t,e,n){let r=t.state.selection;if(r instanceof t3&&!r.empty||n.indexOf("s")>-1||e$&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=nA(t.state,e);if(n&&n instanceof t4)return nM(t,n)}if(!o.parent.inlineContent){let n=e<0?o:i,s=r instanceof t8?tZ.near(n,e):tZ.findFrom(n,e);return!!s&&nM(t,s)}return!1}function nz(t,e){if(!(t.state.selection instanceof t3))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let r=t.state.tr;return e<0?r.delete(n.pos-i.nodeSize,n.pos):r.delete(n.pos,n.pos+i.nodeSize),t.dispatch(r),!0}return!1}function n$(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function n_(t,e){t.someProp("transformCopied",n=>{e=n(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}
6let s=t.someProp("clipboardSerializer")||th.fromSchema(t.state.schema),l=nH(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let c=a.firstChild,u,p=0;for(;c&&1==c.nodeType&&(u=nq[c.nodeName.toLowerCase()]);){for(let t=u.length-1;t>=0;t--){let e=l.createElement(u[t]);for(;a.firstChild;)e.appendChild(a.firstChild);a.appendChild(e),p++}c=a.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${o} ${i}${p?` -${p}`:""} ${JSON.stringify(n)}`),{dom:a,text:t.someProp("clipboardTextSerializer",n=>n(e,t))||e.content.textBetween(0,e.content.size,` 7 8`),slice:e}}function nB(t,e,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!e)return null;let a=e&&(r||i||!n);if(a){if(t.someProp("transformPastedText",n=>{e=n(e,i||r,t)}),i)return e?new M(S.from(t.state.schema.text(e.replace(/\r\n?/g,` 9`))),0,0):M.empty;let n=t.someProp("clipboardTextParser",n=>n(e,o,r,t));if(n)l=n;else{let n=o.marks(),{schema:r}=t.state,i=th.fromSchema(r);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(t=>{let e=s.appendChild(document.createElement("p"));t&&e.appendChild(i.serializeNode(r.text(t,n)))})}}else t.someProp("transformPastedHTML",e=>{n=e(n,t)}),s=function(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=nH().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&nq[r[1].toLowerCase()])&&(t=o.map(t=>"<"+t+">").join("")+t+o.map(t=>"</"+t+">").reverse().join("")),n.innerHTML=t,o)for(let t=0;t<o.length;t++)n=n.querySelector(o[t])||n;return n}(n),eF&&function(t){let e=t.querySelectorAll(ej?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let t=+u[3];t>0;t--){let t=s.firstChild;for(;t&&1!=t.nodeType;)t=t.nextSibling;if(!t)break;s=t}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||tr.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:o,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||nF.test(t.parentNode.nodeName)?null:{ignore:!0}})),u)l=function(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let t=r.length-2;t>=0;t-=2){let e=n.nodes[r[t]];if(!e||e.hasRequiredAttrs())break;o=S.from(e.create(r[t+1],o)),i++,s++}return new M(o,i,s)}(nW(l,+u[1],+u[2]),u[4]);else if((l=M.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.index(n)),o,i=[];if(t.forEach(t=>{if(!i)return;let e=r.findWrapping(t.type),n;if(!e)return i=null;if(n=i.length&&o.length&&function t(e,n,r,o,i){if(i<e.length&&i<n.length&&e[i]==n[i]){let s=t(e,n,r,o.lastChild,i+1);if(s)return o.copy(o.content.replaceChild(o.childCount-1,s));if(o.contentMatchAt(o.childCount).matchType(i==e.length-1?r.type:e[i+1]))return o.copy(o.content.append(S.from(nL(r,e,i+1))))}}(e,o,t,i[i.length-1],0))i[i.length-1]=n;else{i.length&&(i[i.length-1]=function t(e,n){if(0==n)return e;let r=e.content.replaceChild(e.childCount-1,t(e.lastChild,n-1)),o=e.contentMatchAt(e.childCount).fillBefore(S.empty,!0);return e.copy(r.append(o))}(i[i.length-1],o.length));let n=nL(t,e);i.push(n),r=r.matchType(n.type),o=e}}),i)return S.from(i)}return t}(l.content,o),!0)).openStart||l.openEnd){let t=0,e=0;for(let e=l.content.firstChild;t<l.openStart&&!e.type.spec.isolating;t++,e=e.firstChild);for(let t=l.content.lastChild;e<l.openEnd&&!t.type.spec.isolating;e++,t=t.lastChild);l=nW(l,t,e)}return t.someProp("transformPasted",e=>{l=e(l,t)}),l}let nF=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function nL(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,S.from(t));return t}function nV(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(i=0),o<r-1&&(l=nV(l,e,n,r,o+1,i)),o>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(S.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function nW(t,e,n){return e<t.openStart&&(t=new M(nV(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new M(nV(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}let nq={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},nU=null;function nH(){return nU||(nU=document.implementation.createHTMLDocument("title"))}let nJ={},nK={},nG={touchstart:!0,touchmove:!0};
9class nY{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function nX(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function nQ(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>nZ(t,e))})}function nZ(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function n0(t){return{left:t.clientX,top:t.clientY}}function n1(t,e,n,r,o){if(-1==r)return!1;let i=t.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(t.someProp(e,e=>r>i.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1)))return!0;return!1}function n2(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}nK.keydown=(t,e)=>{if(t.input.shiftKey=16==e.keyCode||e.shiftKey,!n4(t,e)&&(t.input.lastKeyCode=e.keyCode,t.input.lastKeyCodeTime=Date.now(),!(eB&&ej&&13==e.keyCode))){if(229!=e.keyCode&&t.domObserver.forceFlush(),!ez||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",n=>n(t,e))||function(t,e){let n;let r=e.keyCode,o=(n="",e.ctrlKey&&(n+="c"),e.metaKey&&(n+="m"),e.altKey&&(n+="a"),e.shiftKey&&(n+="s"),n);if(8==r||e$&&72==r&&"c"==o)return nz(t,-1)||nD(t,-1);if(46==r&&!e.shiftKey||e$&&68==r&&"c"==o)return nz(t,1)||nD(t,1);if(13==r||27==r)return!0;if(37==r||e$&&66==r&&"c"==o){let e=37==r?"ltr"==nI(t,t.state.selection.from)?-1:1:-1;return nN(t,e,o)||nD(t,e)}if(39==r||e$&&70==r&&"c"==o){let e=39==r?"ltr"==nI(t,t.state.selection.from)?1:-1:1;return nN(t,e,o)||nD(t,e)}return 38==r||e$&&80==r&&"c"==o?nP(t,-1,o)||nD(t,-1):40==r||e$&&78==r&&"c"==o?function(t){if(!eP||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;n$(t,n,"true"),setTimeout(()=>n$(t,n,"false"),20)}return!1}(t)||nP(t,1,o)||nD(t,1):o==(e$?"m":"c")&&(66==r||73==r||89==r||90==r)}(t,e)?e.preventDefault():nX(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",e=>e(t,ex(13,"Enter"))),t.input.lastIOSEnter=0)},200)}}},nK.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},nK.keypress=(t,e)=>{if(n4(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||e$&&e.metaKey)return;if(t.someProp("handleKeyPress",n=>n(t,e))){e.preventDefault();return}let n=t.state.selection;if(!(n instanceof t3)||!n.$from.sameParent(n.$to)){let r=String.fromCharCode(e.charCode);/[\r\n]/.test(r)||t.someProp("handleTextInput",e=>e(t,n.$from.pos,n.$to.pos,r))||t.dispatch(t.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}};let n3=e$?"metaKey":"ctrlKey";nJ.mousedown=(t,e)=>{var n;let r,o;t.input.shiftKey=e.shiftKey;let i=n7(t),s=Date.now(),l="singleClick";s-t.input.lastClick.time<500&&(r=(n=t.input.lastClick).x-e.clientX)*r+(o=n.y-e.clientY)*o<100&&!e[n3]&&("singleClick"==t.input.lastClick.type?l="doubleClick":"doubleClick"==t.input.lastClick.type&&(l="tripleClick")),t.input.lastClick={time:s,x:e.clientX,y:e.clientY,type:l};let a=t.posAtCoords(n0(e));a&&("singleClick"==l?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new n5(t,a,e,!!i)):("doubleClick"==l?function(t,e,n,r){return n1(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",n=>n(t,e,r))}:function(t,e,n,r){return n1(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",n=>n(t,e,r))||function(t,e,n){if(0!=n.button)return!1;let r=t.state.doc;if(-1==e)return!!r.inlineContent&&(n2(t,t3.create(r,0,r.content.size)),!0);let o=r.resolve(e);for(let e=o.depth+1;e>0;e--){let n=e>o.depth?o.nodeAfter:o.node(e),i=o.before(e);if(n.inlineContent)n2(t,t3.create(r,i+1,i+1+n.content.size));else{if(!t4.isSelectable(n))continue;n2(t,t4.create(r,i))}return!0}}(t,n,r)})(t,a.pos,a.inside,e)?e.preventDefault():nX(t,"pointer"))};
9class n5{constructor(t,e,n,r){let o,i;if(this.view=t,this.pos=e,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[n3],this.allowDefault=n.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),i=e.inside;else{let n=t.state.doc.resolve(e.pos);o=n.parent,i=n.depth?n.before():0}let s=r?null:n.target,l=s?t.docView.nearestDesc(s,!0):null;this.target=l&&1==l.dom.nodeType?l.dom:null;let{selection:a}=t.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||a instanceof t4&&a.from<=i&&a.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&eD&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),nX(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ng(this.view)),this.view.input.mouseDown=null}up(t){var e,n,r,o;if(this.done(),!this.view.dom.contains(t.target))return;let i=this.pos;this.view.state.doc!=this.startDoc&&(i=this.view.posAtCoords(n0(t))),this.updateAllowDefault(t),this.allowDefault||!i?nX(this.view,"pointer"):(e=this.view,n=i.pos,r=i.inside,o=this.selectNode,n1(e,"handleClickOn",n,r,t)||e.someProp("handleClick",r=>r(e,n,t))||(o?function(t,e){if(-1==e)return!1;let n=t.state.selection,r,o;n instanceof t4&&(r=n.node);let i=t.state.doc.resolve(e);for(let t=i.depth+1;t>0;t--){let e=t>i.depth?i.nodeAfter:i.node(t);if(t4.isSelectable(e)){o=r&&n.$from.depth>0&&t>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?i.before(n.$from.depth):i.before(t);break}}return null!=o&&(n2(t,t4.create(t.state.doc,o)),!0)}(e,r):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&t4.isSelectable(r))&&(n2(t,new t4(n)),!0)}(e,r)))?t.preventDefault():0==t.button&&(this.flushed||eP&&this.mightDrag&&!this.mightDrag.node.isAtom||ej&&!this.view.state.selection.visible&&2>=Math.min(Math.abs(i.pos-this.view.state.selection.from),Math.abs(i.pos-this.view.state.selection.to)))?(n2(this.view,tZ.near(this.view.state.doc.resolve(i.pos))),t.preventDefault()):nX(this.view,"pointer")}move(t){this.updateAllowDefault(t),nX(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function n4(t,e){return!!t.composing||!!(eP&&500>Math.abs(e.timeStamp-t.input.compositionEndedAt))&&(t.input.compositionEndedAt=-2e8,!0)}nJ.touchstart=t=>{t.input.lastTouch=Date.now(),n7(t),nX(t,"pointer")},nJ.touchmove=t=>{t.input.lastTouch=Date.now(),nX(t,"pointer")},nJ.contextmenu=t=>n7(t);let n6=eB?5e3:-1;function n8(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>n7(t),e))}function n9(t){let e;for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=((e=document.createEvent("Event")).initEvent("event",!0,!0),e.timeStamp));t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function n7(t,e=!1){if(!(eB&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),n9(t),e||t.docView&&t.docView.dirty){let e=nd(t);return e&&!e.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(e)):t.updateState(t.state),!0}return!1}}nK.compositionstart=nK.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof t3&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(t=>!1===t.type.spec.inclusive)))t.markCursor=t.state.storedMarks||n.marks(),n7(t,!0),t.markCursor=null;else if(n7(t),eD&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,r=e.focusOffset;n&&1==n.nodeType&&0!=r;){let e=r<0?n.lastChild:n.childNodes[r-1];if(!e)break;if(3==e.nodeType){let n=t.domSelection();n&&n.collapse(e,e.nodeValue.length);break}n=e,r=-1}}t.input.composing=!0}n8(t,n6)},nK.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,n8(t,20))};let rt=eE&&eT<15||ez&&eL<604;function re(t,e,n,r,o){let i=nB(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",e=>e(t,o,i||M.empty)))return!0;
9if(!i)return!1;let s=0==i.openStart&&0==i.openEnd&&1==i.content.childCount?i.content.firstChild:null,l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function rn(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}nJ.copy=nK.cut=(t,e)=>{let n=t.state.selection,r="cut"==e.type;if(n.empty)return;let o=rt?null:e.clipboardData,{dom:i,text:s}=n_(t,n.content());o?(e.preventDefault(),o.clearData(),o.setData("text/html",i.innerHTML),o.setData("text/plain",s)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}(t,i),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},nK.paste=(t,e)=>{if(t.composing&&!eB)return;let n=rt?null:e.clipboardData,r=t.input.shiftKey&&45!=t.input.lastKeyCode;n&&re(t,rn(n),n.getData("text/html"),r,e)?e.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&45!=t.input.lastKeyCode;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?re(t,r.value,null,o,e):re(t,r.textContent,r.innerHTML,o,e)},50)}(t,e)};class rr{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}}let ro=e$?"altKey":"ctrlKey";for(let t in nJ.dragstart=(t,e)=>{let n=t.input.mouseDown;if(n&&n.done(),!e.dataTransfer)return;let r=t.state.selection,o=r.empty?null:t.posAtCoords(n0(e)),i;if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof t4?r.to-1:r.to))){if(n&&n.mightDrag)i=t4.create(t.state.doc,n.mightDrag.pos);else if(e.target&&1==e.target.nodeType){let n=t.docView.nearestDesc(e.target,!0);n&&n.node.type.spec.draggable&&n!=t.docView&&(i=t4.create(t.state.doc,n.posBefore))}}let s=(i||t.state.selection).content(),{dom:l,text:a,slice:c}=n_(t,s);e.dataTransfer.files.length&&ej&&!(eI>120)||e.dataTransfer.clearData(),e.dataTransfer.setData(rt?"Text":"text/html",l.innerHTML),e.dataTransfer.effectAllowed="copyMove",rt||e.dataTransfer.setData("text/plain",a),t.dragging=new rr(c,!e[ro],i)},nJ.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},nK.dragover=nK.dragenter=(t,e)=>e.preventDefault(),nK.drop=(t,e)=>{let n=t.dragging;if(t.dragging=null,!e.dataTransfer)return;let r=t.posAtCoords(n0(e));if(!r)return;let o=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",e=>{i=e(i,t)}):i=nB(t,rn(e.dataTransfer),rt?null:e.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&!e[ro]);if(t.someProp("handleDrop",n=>n(t,e,i||M.empty,s))){e.preventDefault();return}if(!i)return;e.preventDefault();let l=i?tB(t.state.doc,o.pos,i):o.pos;null==l&&(l=o.pos);let a=t.state.tr;if(s){let{node:t}=n;t?t.replace(a):a.deleteSelection()}let c=a.mapping.map(l),u=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,p=a.doc;if(u?a.replaceRangeWith(c,c,i.content.firstChild):a.replaceRange(c,c,i),a.doc.eq(p))return;let h=a.doc.resolve(c);if(u&&t4.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))a.setSelection(new t4(h));else{let e=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((t,n,r,o)=>e=o),a.setSelection(nk(t,h,a.doc.resolve(e)))}t.focus(),t.dispatch(a.setMeta("uiEvent","drop"))},nJ.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&ng(t)},20))},nJ.blur=(t,e)=>{t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),e.relatedTarget&&t.dom.contains(e.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},nJ.beforeinput=(t,e)=>{if(ej&&eB&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=e||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",e=>e(t,ex(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}},nK)nJ[t]=nK[t];function ri(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class rs{constructor(t,e){this.toDOM=t,this.spec=e||rp,this.side=this.spec.side||0}map(t,e,n,r){let{pos:o,deleted:i}=t.mapResult(e.from+r,this.side<0?-1:1);return i?null:new rc(o-n,o-n,this)}valid(){return!0}eq(t){return this==t||t instanceof rs&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ri(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class rl{constructor(t,e){this.attrs=t,this.spec=e||rp}map(t,e,n,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new rc(o,i,this)}valid(t,e){return e.from<e.to}eq(t){return this==t||t instanceof rl&&ri(this.attrs,t.attrs)&&ri(this.spec,t.spec)}static is(t){return t.type instanceof rl}destroy(){}}class ra{constructor(t,e){this.attrs=t,this.spec=e||rp}map(t,e,n,r){let o=t.mapResult(e.from+r,1);if(o.deleted)return null;let i=t.mapResult(e.to+r,-1);return i.deleted||i.pos<=o.pos?null:new rc(o.pos-n,i.pos-n,this)}valid(t,e){let{index:n,offset:r}=t.content.findIndex(e.from),o;return r==e.from&&!(o=t.child(n)).isText&&r+o.nodeSize==e.to}eq(t){return this==t||t instanceof ra&&ri(this.attrs,t.attrs)&&ri(this.spec,t.spec)}destroy(){}}class rc{constructor(t,e,n){this.from=t,this.to=e,this.type=n}copy(t,e){return new rc(t,e,this.type)}eq(t,e=0){return this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to}map(t,e,n){return this.type.map(t,this,e,n)}static widget(t,e,n){return new rc(t,t,new rs(e,n))}static inline(t,e,n,r){return new rc(t,e,new rl(n,r))}
vendor: 6,674 bytes, line 9
9static node(t,e,n,r){return new rc(t,e,new ra(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof rl}get widget(){return this.type instanceof rs}}let ru=[],rp={};class rh{constructor(t,e){this.local=t.length?t:ru,this.children=e.length?e:ru}static create(t,e){return e.length?rb(e,t,0,rp):rf}find(t,e,n){let r=[];return this.findInner(t??0,e??1e9,r,0,n),r}findInner(t,e,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=e&&s.to>=t&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<e&&this.children[i+1]>t){let s=this.children[i]+1;this.children[i+2].findInner(t-s,e-s,n,r+s,o)}}map(t,e,n){return this==rf||0==t.maps.length?this:this.mapInner(t,e,0,0,n||rp)}mapInner(t,e,n,r,o){let i;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(t,n,r);l&&l.type.valid(e,l)?(i||(i=[])).push(l):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(t,e,n,r,o,i,s){let l=t.slice();for(let t=0,e=i;t<n.maps.length;t++){let r=0;n.maps[t].forEach((t,n,o,i)=>{let s=i-o-(n-t);for(let o=0;o<l.length;o+=3){let i=l[o+1];if(i<0||t>i+e-r)continue;let a=l[o]+e-r;n>=a?l[o+1]=t<=a?-2:-1:t>=e&&s&&(l[o]+=s,l[o+1]+=s)}r+=s}),e=n.maps[t].map(e,-1)}let a=!1;for(let e=0;e<l.length;e+=3)if(l[e+1]<0){if(-2==l[e+1]){a=!0,l[e+1]=-1;continue}let c=n.map(t[e]+i),u=c-o;if(u<0||u>=r.content.size){a=!0;continue}let p=n.map(t[e+1]+i,-1)-o,{index:h,offset:f}=r.content.findIndex(u),d=r.maybeChild(h);if(d&&f==u&&f+d.nodeSize==p){let r=l[e+2].mapInner(n,d,c+1,t[e]+i+1,s);r!=rf?(l[e]=u,l[e+1]=p,l[e+2]=r):(l[e+1]=-2,a=!0)}else a=!0}if(a){let a=rb(function(t,e,n,r,o,i,s){for(let l=0;l<t.length;l+=3)-1==t[l+1]&&function t(e,i){for(let t=0;t<e.local.length;t++){let l=e.local[t].map(r,o,i);l?n.push(l):s.onRemove&&s.onRemove(e.local[t].spec)}for(let n=0;n<e.children.length;n+=3)t(e.children[n+2],e.children[n]+i+1)}(t[l+2],e[l]+i+1);return n}(l,t,e,n,o,i,s),r,0,s);e=a.local;for(let t=0;t<l.length;t+=3)l[t+1]<0&&(l.splice(t,3),t-=3);for(let t=0,e=0;t<a.children.length;t+=3){let n=a.children[t];for(;e<l.length&&l[e]<n;)e+=3;l.splice(e,0,a.children[t],a.children[t+1],a.children[t+2])}}return new rh(e.sort(rv),l)}(this.children,i||[],t,e,n,r,o):i?new rh(i.sort(rv),ru):rf}add(t,e){return e.length?this==rf?rh.create(t,e):this.addInner(t,e,0):this}addInner(t,e,n){let r,o=0;t.forEach((t,i)=>{let s=i+n,l;if(l=rg(e,t,s)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(t,l,s+1):r.splice(o,0,i,i+t.nodeSize,rb(l,t,s+1,rp)),o+=3}});let i=rm(o?ry(e):e,-n);for(let e=0;e<i.length;e++)i[e].type.valid(t,i[e])||i.splice(e--,1);return new rh(i.length?this.local.concat(i).sort(rv):this.local,r||this.children)}remove(t){return 0==t.length||this==rf?this:this.removeInner(t,0)}removeInner(t,e){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o,i=n[r]+e,s=n[r+1]+e;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>i&&n.to<s&&(t[e]=null,(o||(o=[])).push(n));if(!o)continue;n==this.children&&(n=this.children.slice());let l=n[r+2].removeInner(o,i+1);l!=rf?n[r+2]=l:(n.splice(r,3),r-=3)}if(r.length){for(let n=0,o;n<t.length;n++)if(o=t[n])for(let t=0;t<r.length;t++)r[t].eq(o,e)&&(r==this.local&&(r=this.local.slice()),r.splice(t--,1))}return n==this.children&&r==this.local?this:r.length||n.length?new rh(r,n):rf}forChild(t,e){let n,r;if(this==rf)return this;if(e.isLeaf)return rh.empty;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(n=this.children[e+2]);break}let o=t+1,i=o+e.content.size;for(let t=0;t<this.local.length;t++){let e=this.local[t];if(e.from<i&&e.to>o&&e.type instanceof rl){let t=Math.max(o,e.from)-o,n=Math.min(i,e.to)-o;t<n&&(r||(r=[])).push(e.copy(t,n))}}if(r){let t=new rh(r.sort(rv),ru);return n?new rd([t,n]):t}return n||rf}eq(t){if(this==t)return!0;if(!(t instanceof rh)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(t){return rw(this.localsInner(t))}localsInner(t){if(this==rf)return ru;if(t.inlineContent||!this.local.some(rl.is))return this.local;let e=[];for(let t=0;t<this.local.length;t++)this.local[t].type instanceof rl||e.push(this.local[t]);return e}}rh.empty=new rh([],[]),rh.removeOverlap=rw;let rf=rh.empty;class rd{constructor(t){this.members=t}map(t,e){let n=this.members.map(n=>n.map(t,e,rp));return rd.from(n)}forChild(t,e){if(e.isLeaf)return rh.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(t,e);o!=rf&&(o instanceof rd?n=n.concat(o.members):n.push(o))}return rd.from(n)}eq(t){if(!(t instanceof rd)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(t){let e,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(t);if(o.length){if(e){n&&(e=e.slice(),n=!1);for(let t=0;t<o.length;t++)e.push(o[t])}else e=o}}return e?rw(n?e:e.sort(rv)):ru}static from(t){switch(t.length){case 0:return rf;case 1:return t[0];default:return new rd(t.every(t=>t instanceof rh)?t:t.reduce((t,e)=>t.concat(e instanceof rh?e:e.members),[]))}}}function rm(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new rc(o.from+e,o.to+e,o.type))}return n}function rg(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let e=0,i;e<t.length;e++)(i=t[e])&&i.from>n&&i.to<r&&((o||(o=[])).push(i),t[e]=null);return o}function ry(t){let e=[];for(let n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function rb(t,e,n,r){let o=[],i=!1;e.forEach((e,s)=>{let l=rg(t,e,s+n);if(l){i=!0;let t=rb(l,e,n+s+1,r);t!=rf&&o.push(s,s+e.nodeSize,t)}});let s=rm(i?ry(t):t,-n).sort(rv);for(let t=0;t<s.length;t++)s[t].type.valid(e,s[t])||(r.onRemove&&r.onRemove(s[t].spec),s.splice(t--,1));return s.length||o.length?new rh(s,o):rf}function rv(t,e){return t.from-e.from||t.to-e.to}function rw(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),rS(e,o+1,i.copy(r.to,i.to)));continue}i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),rS(e,o,r.copy(i.from,r.to)));break}}return e}function rS(t,e,n){for(;e<t.length&&rv(n,t[e])>0;)e++;t.splice(e,0,n)}function rx(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=rf&&e.push(r)}
9),t.cursorWrapper&&e.push(rh.create(t.state.doc,[t.cursorWrapper.deco])),rd.from(e)}let rk={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},rO=eE&&eT<=11;class rC{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class rA{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new rC,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);eE&&eT<=11&&t.some(t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():this.flush()}),rO&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,rk)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;e<t.length;e++)this.queue.push(t[e]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(nO(this.view)){if(this.suppressingSelectionUpdates)return ng(this.view);if(eE&&eT<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&eg(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e=new Set,n;for(let n=t.focusNode;n;n=eh(n))e.add(n);for(let r=t.anchorNode;r;r=eh(r))if(e.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:"selection",target:3==n.nodeType?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&nO(t)&&!this.ignoreSelectionChange(n),o=-1,i=-1,s=!1,l=[];if(t.editable)for(let t=0;t<e.length;t++){let n=this.registerMutation(e[t],l);n&&(o=o<0?n.from:Math.min(n.from,o),i=i<0?n.to:Math.max(n.to,i),n.typeOver&&(s=!0))}if(eD&&l.length){let e=l.filter(t=>"BR"==t.nodeName);if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of e){let e=r.parentNode;e&&"LI"==e.nodeName&&(!n||function(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let e=t.docView.nearestDesc(n,!0);if(e&&e.node.isBlock)return n}return null}(t,n)!=e)&&r.remove()}}}let a=null;o<0&&r&&t.input.lastFocus>
9Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&eS(n)&&(a=nd(t))&&a.eq(tZ.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,ng(t),this.currentSelection.set(n),t.scrollToSelection()):(o>-1||r)&&(o>-1&&(t.docView.markDirty(o,i),rM.has(t)||(rM.set(t,null),-1===["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace))||(t.requiresGeckoHackNode=eD,rN||(console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),rN=!0))),this.handleDOMChange(o,i,s,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||ng(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if("childList"!=t.type)return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=t.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue});{for(let n=0;n<t.addedNodes.length;n++){let r=t.addedNodes[n];e.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};let r=t.previousSibling,o=t.nextSibling;if(eE&&eT<=11&&t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){let{previousSibling:n,nextSibling:i}=t.addedNodes[e];(!n||0>Array.prototype.indexOf.call(t.addedNodes,n))&&(r=n),(!i||0>Array.prototype.indexOf.call(t.addedNodes,i))&&(o=i)}let i=r&&r.parentNode==t.target?ep(r)+1:0,s=n.localPosFromDOM(t.target,i,-1),l=o&&o.parentNode==t.target?ep(o):t.target.childNodes.length;return{from:s,to:n.localPosFromDOM(t.target,l,1)}}}}let rM=new WeakMap,rN=!1;function rE(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return eg(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function rT(t){let e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(eP&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(t.parentNode.lastChild==t||eP&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}let rD=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function rR(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:nk(t,e.resolve(n.anchor),e.resolve(n.head))}function rj(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));for(;e&&!e.isLeaf;)e=e.firstChild,o++}return o}function rI(t){if(2!=t.length)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class rP{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new nY,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(rF),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=r_(this),r$(this),this.nodeViews=rB(this),this.docView=nt(this.state.doc,rz(this),rx(this),this.dom,this),this.domObserver=new rA(this,(t,e,n,r)=>(function(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=nd(t,e);
9if(n&&!t.state.selection.eq(n)){if(ej&&eB&&13===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",e=>e(t,ex(13,"Enter"))))return;let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),i&&r.setMeta("composition",i),t.dispatch(r)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a=t.state.selection,c=function(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:s,to:l}=t.docView.parseRange(e,n),a=t.domSelectionRange(),c,u=a.anchorNode;if(u&&t.dom.contains(1==u.nodeType?u:u.parentNode)&&(c=[{node:u,offset:a.anchorOffset}],eS(a)||c.push({node:a.focusNode,offset:a.focusOffset})),ej&&8===t.input.lastKeyCode)for(let t=i;t>o;t--){let e=r.childNodes[t-1],n=e.pmViewDesc;if("BR"==e.nodeName&&!n){i=t;break}if(!n||n.size)break}let p=t.state.doc,h=t.someProp("domParser")||tr.fromSchema(t.state.schema),f=p.resolve(s),d=null,m=h.parse(r,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:i,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:c,ruleFromNode:rT,context:f});if(c&&null!=c[0].pos){let t=c[0].pos,e=c[1]&&c[1].pos;null==e&&(e=t),d={anchor:t+s,head:e+s}}return{doc:m,sel:d,from:s,to:l}}(t,e,n),u=t.state.doc,p=u.slice(c.from,c.to),h,f;8===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,f="end"):(h=t.state.selection.from,f="start"),t.input.lastKeyCode=null;let d=function(t,e,n,r,o){let i=t.findDiffStart(e,n);if(null==i)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if("end"==o){let t=Math.max(0,i-Math.min(s,l));r-=s+t-i}if(s<i&&t.size<e.size){let t=r<=i&&r>=s?i-r:0;(i-=t)&&i<e.size&&rI(e.textBetween(i-1,i+1))&&(i+=t?1:-1),l=i+(l-s),s=i}else if(l<i){let e=r<=i&&r>=l?i-r:0;(i-=e)&&i<t.size&&rI(t.textBetween(i-1,i+1))&&(i+=e?1:-1),s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}(p.content,c.doc.content,c.from,h,f);if((ez&&t.input.lastIOSEnter>Date.now()-225||eB)&&o.some(t=>1==t.nodeType&&!rD.test(t.nodeName))&&(!d||d.endA>=d.endB)&&t.someProp("handleKeyDown",e=>e(t,ex(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!d){if(r&&a instanceof t3&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))d={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let e=rR(t,t.state.doc,c.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);i&&n.setMeta("composition",i),t.dispatch(n)}}return}}t.input.domChangeCount++,t.state.selection.from<t.state.selection.to&&d.start==d.endB&&t.state.selection instanceof t3&&(d.start>t.state.selection.from&&d.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?d.start=t.state.selection.from:d.endA<t.state.selection.to&&d.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(d.endB+=t.state.selection.to-d.endA,d.endA=t.state.selection.to)),eE&&eT<=11&&d.endB==d.start+1&&d.endA==d.start&&d.start>c.from&&" \xa0"==c.doc.textBetween(d.start-c.from-1,d.start-c.from+1)&&(d.start--,d.endA--,d.endB--);let m=c.doc.resolveNoCache(d.start-c.from),g=c.doc.resolveNoCache(d.endB-c.from),y=u.resolve(d.start),b=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=d.endA,v;if((ez&&t.input.lastIOSEnter>Date.now()-225&&(!b||o.some(t=>"DIV"==t.nodeName||"P"==t.nodeName))||!b&&m.pos<c.doc.content.size&&!m.sameParent(g)&&(v=tZ.findFrom(c.doc.resolve(m.pos+1),1,!0))&&v.head==g.pos)&&t.someProp("handleKeyDown",e=>e(t,ex(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>d.start&&function(t,e,n,r,o){if(n-e<=o.pos-r.pos||rj(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let t=i.nodeAfter;return null!=t&&n==e+t.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(rj(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||rj(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(u,d.start,d.endA,m,g)&&t.someProp("handleKeyDown",e=>e(t,ex(8,"Backspace")))){eB&&ej&&t.domObserver.suppressSelectionUpdates();return}ej&&eB&&d.endB==d.start&&(t.input.lastAndroidDelete=Date.now()),eB&&!b&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==d.endA&&(d.endB-=2,g=c.doc.resolveNoCache(d.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(e){return e(t,ex(13,"Enter"))})},20));let w=d.start,x=d.endA,k,O,C;if(b){if(m.pos==g.pos)eE&&eT<=11&&0==m.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ng(t),20)),k=t.state.tr.delete(w,x),O=u.resolve(d.start).marksAcross(u.resolve(d.endA));else if(d.endA==d.endB&&(C=function(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,l,a;for(let t=0;t<r.length;t++)o=r[t].removeFromSet(o);for(let t=0;t<n.length;t++)i=n[t].removeFromSet(i);if(1==o.length&&0==i.length)l=o[0],s="add",a=t=>t.mark(l.addToSet(t.marks));else{if(0!=o.length||1!=i.length)return null;l=i[0],s="remove",a=t=>t.mark(l.removeFromSet(t.marks))}let c=[];for(let t=0;t<e.childCount;t++)c.push(a(e.child(t)));if(S.from(c).eq(t))return{mark:l,type:s}}(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,d.endA-y.start()))))k=t.state.tr,"add"==C.type?k.addMark(w,x,C.mark):k.removeMark(w,x,C.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let e=m.parent.textBetween(m.parentOffset,g.parentOffset);if(t.someProp("handleTextInput",n=>n(t,w,x,e)))return;k=t.state.tr.insertText(e,w,x)}}
9if(k||(k=t.state.tr.replace(w,x,c.doc.slice(d.start-c.from,d.endB-c.from))),c.sel){let e=rR(t,k.doc,c.sel);e&&!(ej&&eB&&t.composing&&e.empty&&(d.start!=d.endB||t.input.lastAndroidDelete<Date.now()-100)&&(e.head==w||e.head==k.mapping.map(x)-1)||eE&&e.empty&&e.head==w)&&k.setSelection(e)}O&&k.ensureMarks(O),i&&k.setMeta("composition",i),t.dispatch(k.scrollIntoView())})(this,t,e,n,r)),this.domObserver.start(),function(t){for(let e in nJ){let n=nJ[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}(t,e)||nZ(t,e)||!t.editable&&e.type in nK||n(t,e)},nG[e]?{passive:!0}:void 0)}eP&&t.dom.addEventListener("input",()=>null),nQ(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;for(let e in this._props={},t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&nQ(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(rF),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let t in this._props)e[t]=this._props[t];for(let n in e.state=this.state,t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n,r,o;let i=this.state,s=!1,l=!1;t.storedMarks&&this.composing&&(n9(this),l=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=e.plugins;if(a||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=rB(this);(function(t,e){let n=0,r=0;for(let r in t){if(t[r]!=e[r])return!0;n++}for(let t in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,s=!0)}(a||e.handleDOMEvents!=this._props.handleDOMEvents)&&nQ(this),this.editable=r_(this),r$(this);let c=rx(this),u=rz(this),p=i.plugins==t.plugins||i.doc.eq(t.doc)?t.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",h=s||!this.docView.matchesNode(t.doc,u,c);(h||!t.selection.eq(i.selection))&&(l=!0);let f="preserve"==p&&l&&null==this.dom.style.overflowAnchor&&function(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let e=t.root.elementFromPoint(i,s);if(!e||e==t.dom||!t.dom.contains(e))continue;let l=e.getBoundingClientRect();if(l.top>=n-20){r=e,o=l.top;break}}return{refDOM:r,refTop:o,stack:eq(t.dom)}}(this);if(l){let e,n,l;this.domObserver.stop();let a=h&&(eE||ej)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&(r=i.selection,o=t.selection,l=Math.min(r.$anchor.sharedDepth(r.head),o.$anchor.sharedDepth(o.head)),r.$anchor.start(l)!=o.$anchor.start(l));if(h){let e=ej?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=function(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=function(t,e){for(;;){if(3==t.nodeType&&e)return t;if(1==t.nodeType&&e>0){if("false"==t.contentEditable)return null;e=ev(t=t.childNodes[e-1])}else{if(!t.parentNode||ew(t))return null;e=ep(t),t=t.parentNode}}}(e.focusNode,e.focusOffset),r=function(t,e){for(;;){if(3==t.nodeType&&e<t.nodeValue.length)return t;if(1==t.nodeType&&e<t.childNodes.length){if("false"==t.contentEditable)return null;t=t.childNodes[e],e=0}else{if(!t.parentNode||ew(t))return null;e=ep(t)+1,t=t.parentNode}}}(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let e=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!e||!e.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let t=n.pmViewDesc;if(!(!t||!t.isText(n.nodeValue)))return r}}return n||r}(this)),(s||!this.docView.update(t.doc,u,c,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=nt(t.doc,u,c,this.dom,this)),e&&!this.trackWrites&&(a=!0)}a||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(e=this.docView.domFromPos(this.state.selection.anchor,0),n=this.domSelectionRange(),eg(e.node,e.offset,n.anchorNode,n.anchorOffset)))?ng(this,a):(nS(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),null===(n=this.dragging)||void 0===n||!n.node||i.doc.eq(t.doc)||this.updateDraggedNode(this.dragging,i),"reset"==p?this.dom.scrollTop=0:"to selection"==p?this.scrollToSelection():f&&function({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;eU(n,0==r?0:r-e)}(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this))){if(this.state.selection instanceof t4){let e=this.docView.domAfterPos(this.state.selection.from);
91==e.nodeType&&eW(this,e.getBoundingClientRect(),t)}else eW(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e<this.pluginViews.length;e++){let n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let e=this.directPlugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let e=this.state.plugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}}}updateDraggedNode(t,e){let n=t.node,r=-1;if(this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let t=n.from+(this.state.doc.content.size-e.doc.content.size);(t>0&&this.state.doc.nodeAt(t))==n.node&&(r=t)}this.dragging=new rr(t.slice,t.move,r<0?void 0:t4.create(this.state.doc,r))}someProp(t,e){let n=this._props&&this._props[t],r;if(null!=n&&(r=e?e(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let o=this.directPlugins[n].props[t];if(null!=o&&(r=e?e(o):o))return r}let o=this.state.plugins;if(o)for(let n=0;n<o.length;n++){let i=o[n].props[t];if(null!=i&&(r=e?e(i):i))return r}}hasFocus(){if(eE){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if("false"==t.contentEditable)return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(eH)return t.focus(eH);let e=eq(t);t.focus(null==eH?{get preventScroll(){return eH={preventScroll:!0},!0}}:void 0),eH||(eH=!1,eU(e,0))}(this.dom),ng(this),this.domObserver.start()}get root(){let t=this._root;if(null==t){for(let t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return t||document}updateRoot(){this._root=null}posAtCoords(t){return function(t,e){var n;let r,o=t.dom.ownerDocument,i,s=0,l=function(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}(o,e.left,e.top);l&&({node:i,offset:s}=l);let a=(t.root.elementFromPoint?t.root:o).elementFromPoint(e.left,e.top),c;if(!a||!t.dom.contains(1!=a.nodeType?a.parentNode:a)){let n=t.dom.getBoundingClientRect();if(!eJ(e,n)||!(a=function t(e,n,r){let o=e.childNodes.length;if(o&&r.top<r.bottom)for(let i=Math.max(0,Math.min(o-1,Math.floor(o*(n.top-r.top)/(r.bottom-r.top))-2)),s=i;;){let r=e.childNodes[s];if(1==r.nodeType){let e=r.getClientRects();for(let o=0;o<e.length;o++){let i=e[o];if(eJ(n,i))return t(r,n,i)}}if((s=(s+1)%o)==i)break}return e}(t.dom,e,n)))return null}if(eP)for(let t=a;i&&t;t=eh(t))t.draggable&&(i=void 0);if(a=(r=(n=a).parentNode)&&/^li$/i.test(r.nodeName)&&e.left<n.getBoundingClientRect().left?r:n,i){let n;if(eD&&1==i.nodeType&&(s=Math.min(s,i.childNodes.length))<i.childNodes.length){let t=i.childNodes[s],n;"IMG"==t.nodeName&&(n=t.getBoundingClientRect()).right<=e.left&&n.bottom>e.top&&s++}eF&&s&&1==i.nodeType&&1==(n=i.childNodes[s-1]).nodeType&&"false"==n.contentEditable&&n.getBoundingClientRect().top>=e.top&&s--,i==t.dom&&s==i.childNodes.length-1&&1==i.lastChild.nodeType&&e.top>i.lastChild.getBoundingClientRect().bottom?c=t.state.doc.content.size:(0==s||1!=i.nodeType||"BR"!=i.childNodes[s-1].nodeName)&&(c=function(t,e,n,r){let o=-1;for(let n=e,i=!1;n!=t.dom;){let e=t.docView.nearestDesc(n,!0);if(!e)return null;if(1==e.dom.nodeType&&(e.node.isBlock&&e.parent||!e.contentDOM)){let t=e.dom.getBoundingClientRect();if(e.node.isBlock&&e.parent&&(!i&&t.left>r.left||t.top>r.top?o=e.posBefore:(!i&&t.right<r.left||t.bottom<r.top)&&(o=e.posAfter),i=!0),!e.contentDOM&&o<0&&!e.node.isText)return(e.node.isBlock?r.top<(t.top+t.bottom)/2:r.left<(t.left+t.right)/2)?e.posBefore:e.posAfter}n=e.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}(t,i,s,e))}null==c&&(c=function(t,e,n){let{node:r,offset:o}=function t(e,n){let r,o=2e8,i,s=0,l=n.top,a=n.top,c,u;for(let t=e.firstChild,p=0;t;t=t.nextSibling,p++){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=ed(t).getClientRects()}for(let h=0;h<e.length;h++){let f=e[h];if(f.top<=l&&f.bottom>=a){l=Math.max(f.bottom,l),a=Math.min(f.top,a);let e=f.left>n.left?f.left-n.left:f.right<n.left?n.left-f.right:0;if(e<o){r=t,o=e,i=e&&3==r.nodeType?{left:f.right<n.left?f.right:f.left,top:n.top}:n,1==t.nodeType&&e&&(s=p+(n.left>=(f.left+f.right)/2?1:0));continue}}else f.top>n.top&&!c&&f.left<=n.left&&f.right>=n.left&&(c=t,u={left:Math.max(f.left,Math.min(f.right,n.left)),top:f.top});!r&&(n.left>=f.right&&n.top>=f.top||n.left>=f.left&&n.top>=f.bottom)&&(s=p+1)}}return!r&&c&&(r=c,i=u,o=0),r&&3==r.nodeType?function(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let n=eG(r,1);if(n.top!=n.bottom&&eJ(e,n))return{node:t,offset:o+(e.left>=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}(r,i):!r||o&&1==r.nodeType?{node:e,offset:s}:t(r,i)}(e,n),i=-1;if(1==r.nodeType&&!r.firstChild){let t=r.getBoundingClientRect();i=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}(t,a,e));let u=t.docView.nearestDesc(a,!0);return{pos:c,inside:u?u.posAtStart-u.border:-1}}(this,t)}coordsAtPos(t,e=1){return eX(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){var n,r;let o,i;return n=e||this.state,e2==n&&e3==t?e5:(e2=n,e3=t,e5="up"==t||"down"==t?(r=this,o=n.selection,i="up"==t?o.$from:o.$to,e0(r,n,()=>{let{node:e}=r.docView.domFromPos(i.pos,"up"==t?-1:1);for(;;){let t=r.docView.nearestDesc(e,!0);if(!t)break;
9if(t.node.isBlock){e=t.contentDOM||t.dom;break}e=t.dom.parentNode}let n=eX(r,i.pos,1);for(let r=e.firstChild;r;r=r.nextSibling){let e;if(1==r.nodeType)e=r.getClientRects();else{if(3!=r.nodeType)continue;e=ed(r,0,r.nodeValue.length).getClientRects()}for(let r=0;r<e.length;r++){let o=e[r];if(o.bottom>o.top+1&&("up"==t?n.top-o.top>(o.bottom-n.top)*2:o.bottom-n.bottom>(n.bottom-o.top)*2))return!1}}return!0})):function(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=o==r.parent.content.size,s=t.domSelection();return s?e1.test(r.parent.textContent)&&s.modify?e0(t,e,()=>{let{focusNode:e,focusOffset:o,anchorNode:i,anchorOffset:l}=t.domSelectionRange(),a=s.caretBidiLevel;s.modify("move",n,"character");let c=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:u,focusOffset:p}=t.domSelectionRange(),h=u&&!c.contains(1==u.nodeType?u:u.parentNode)||e==u&&o==p;try{s.collapse(i,l),e&&(e!=i||o!=l)&&s.extend&&s.extend(e,o)}catch{}return null!=a&&(s.caretBidiLevel=a),h}):"left"==n||"backward"==n?!o:i:r.pos==r.start()||r.pos==r.end()}(this,n,t))}pasteHTML(t,e){return re(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return re(this,t,null,!0,e||new ClipboardEvent("paste"))}destroy(){this.docView&&(function(t){for(let e in t.domObserver.stop(),t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],rx(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,em())}get isDestroyed(){return null==this.docView}dispatchEvent(t){nZ(this,t)||!nJ[t.type]||!this.editable&&t.type in nK||nJ[t.type](this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?eP&&11===this.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom&&function(t,e){let n;if(e.getComposedRanges){let n=e.getComposedRanges(t.root)[0];if(n)return rE(t,n)}function r(t){t.preventDefault(),t.stopImmediatePropagation(),n=t.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?rE(t,n):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function rz(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t?e.class+=" "+n[t]:"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))}),e.translate||(e.translate="no"),[rc.node(0,t.state.doc.content.size,e)]}function r$(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:rc.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function r_(t){return!t.someProp("editable",e=>!1===e(t.state))}function rB(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function rF(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}for(var rL={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:"'"},rV={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rW="u">typeof navigator&&/Mac/.test(navigator.platform),rq="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),rU=0;rU<10;rU++)rL[48+rU]=rL[96+rU]=String(rU);for(var rU=1;rU<=24;rU++)rL[rU+111]="F"+rU;for(var rU=65;rU<=90;rU++)rL[rU]=String.fromCharCode(rU+32),rV[rU]=String.fromCharCode(rU);for(var rH in rL)rV.hasOwnProperty(rH)||(rV[rH]=rL[rH]);let rJ="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);
9function rK(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 rG(t){return new el({props:{handleKeyDown:rY(t)}})}function rY(t){let e=function(t){let e=Object.create(null);for(let n in t)e[function(t){let e,n,r,o,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let t=0;t<i.length-1;t++){let s=i[t];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))rJ?o=!0:n=!0;else throw Error("Unrecognized modifier name: "+s)}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}(n)]=t[n];return e}(t);return function(t,n){var r;let o=("Esc"==(r=!(rW&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||rq&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?rV:rL)[n.keyCode]||n.key||"Unidentified")&&(r="Escape"),"Del"==r&&(r="Delete"),"Left"==r&&(r="ArrowLeft"),"Up"==r&&(r="ArrowUp"),"Right"==r&&(r="ArrowRight"),"Down"==r&&(r="ArrowDown"),r),i,s=e[rK(o,n)];if(s&&s(t.state,t.dispatch,t))return!0;if(1==o.length&&" "!=o){if(n.shiftKey){let r=e[rK(o,n,!1)];if(r&&r(t.state,t.dispatch,t))return!0}if((n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(i=rL[n.keyCode])&&i!=o){let r=e[rK(i,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}let rX=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function rQ(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("backward",t):!(n.parentOffset>0))?n:null}let rZ=(t,e,n)=>{let r=rQ(t,n);if(!r)return!1;let o=r4(r);if(!o){let n=r.blockRange(),o=n&&tR(n);return null!=o&&(e&&e(t.tr.lift(n,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(ou(t,o,e,-1))return!0;if(0==r.parent.content.size&&(r3(i,"end")||t4.isSelectable(i)))for(let n=r.depth;;n--){let s=tF(t.doc,r.before(n),r.after(n),M.empty);if(s&&s.slice.size<s.to-s.from){if(e){let n=t.tr.step(s);n.setSelection(r3(i,"end")?tZ.findFrom(n.doc.resolve(n.mapping.map(o.pos,-1)),-1):t4.create(n.doc,o.pos-i.nodeSize)),e(n.scrollIntoView())}return!0}if(1==n||r.node(n-1).childCount>1)break}return!!i.isAtom&&o.depth==r.depth-1&&(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0)},r0=(t,e,n)=>{let r=rQ(t,n);if(!r)return!1;let o=r4(r);return!!o&&r2(t,o,e)},r1=(t,e,n)=>{let r=r6(t,n);if(!r)return!1;let o=r7(r);return!!o&&r2(t,o,e)};function r2(t,e,n){let r=e.nodeBefore,o=e.pos-1;for(;!r.isTextblock;o--){if(r.type.spec.isolating)return!1;let t=r.lastChild;if(!t)return!1;r=t}let i=e.nodeAfter,s=e.pos+1;for(;!i.isTextblock;s++){if(i.type.spec.isolating)return!1;let t=i.firstChild;if(!t)return!1;i=t}let l=tF(t.doc,o,s,M.empty);if(!l||l.from!=o||l instanceof tN&&l.slice.size>=s-o)return!1;if(n){let e=t.tr.step(l);e.setSelection(t3.create(e.doc,o)),n(e.scrollIntoView())}return!0}function r3(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 r5=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=r4(r)}let s=i&&i.nodeBefore;return!!(s&&t4.isSelectable(s))&&(e&&e(t.tr.setSelection(t4.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function r4(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function r6(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("forward",t):!(n.parentOffset<n.parent.content.size))?n:null}let r8=(t,e,n)=>{let r=r6(t,n);if(!r)return!1;let o=r7(r);if(!o)return!1;let i=o.nodeAfter;if(ou(t,o,e,1))return!0;if(0==r.parent.content.size&&(r3(i,"start")||t4.isSelectable(i))){let n=tF(t.doc,r.before(),r.after(),M.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(r3(i,"start")?tZ.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):t4.create(r.doc,r.mapping.map(o.pos))),e(r.scrollIntoView())}return!0}}return!!i.isAtom&&o.depth==r.depth-1&&(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)},r9=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=r7(r)}let s=i&&i.nodeAfter;return!!(s&&t4.isSelectable(s))&&(e&&e(t.tr.setSelection(t4.create(t.doc,i.pos)).scrollIntoView()),!0)};function r7(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 ot=(t,e)=>{let n=t.selection,r=n instanceof t4,o;if(r){if(n.node.isTextblock||!tz(t.doc,n.from))return!1;o=n.from}else if(null==(o=t_(t.doc,n.from,-1)))return!1;if(e){let n=t.tr.join(o);r&&n.setSelection(t4.create(n.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(n.scrollIntoView())}return!0},oe=(t,e)=>{let n=t.selection,r;if(n instanceof t4){if(n.node.isTextblock||!tz(t.doc,n.to))return!1;r=n.to}else if(null==(r=t_(t.doc,n.to,1)))return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},on=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&tR(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},or=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!!(n.parent.type.spec.code&&n.sameParent(r))&&(e&&e(t.tr.insertText(` 10`).scrollIntoView()),!0)};function oo(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 oi=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=oo(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let r=n.after(),o=t.tr.replaceWith(r,r,s.createAndFill());o.setSelection(tZ.near(o.doc.resolve(r),1)),e(o.scrollIntoView())}return!0},ol=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof t8||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=oo(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=t.tr.insert(n,i.createAndFill());s.setSelection(t3.create(s.doc,n+1)),e(s.scrollIntoView())}return!0},oa=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(tP(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&tR(r);return null!=o&&(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)},oc=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return 0!=i&&(o=n.before(i),e&&e(t.tr.setSelection(t4.create(t.doc,o))),!0)};function ou(t,e,n,r){let o,i,s,l=e.nodeBefore,a=e.nodeAfter,c,u,p=l.type.spec.isolating||a.type.spec.isolating;if(!p&&(o=e.nodeBefore,i=e.nodeAfter,s=e.index(),o&&i&&o.type.compatibleContent(i.type)&&(!o.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-o.nodeSize,e.pos).scrollIntoView()),!0):!!(e.parent.canReplace(s,s+1)&&(i.isTextblock||tz(t.doc,e.pos)))&&(n&&n(t.tr.clearIncompatible(e.pos,o.type,o.contentMatchAt(o.childCount)).join(e.pos).scrollIntoView()),!0))))return!0;let h=!p&&e.parent.canReplace(e.index(),e.index()+1);if(h&&(c=(u=l.contentMatchAt(l.childCount)).findWrapping(a.type))&&u.matchType(c[0]||a.type).validEnd){if(n){let r=e.pos+a.nodeSize,o=S.empty;for(let t=c.length-1;t>=0;t--)o=S.from(c[t].create(null,o));o=S.from(l.copy(o));let i=t.tr.step(new tE(e.pos-1,r,e.pos,r,new M(o,1,0),c.length,!0)),s=r+2*c.length;tz(i.doc,s)&&i.join(s),n(i.scrollIntoView())}return!0}let f=a.type.spec.isolating||r>0&&p?null:tZ.findFrom(e,1),d=f&&f.$from.blockRange(f.$to),m=d&&tR(d);if(null!=m&&m>=e.depth)return n&&n(t.tr.lift(d,m).scrollIntoView()),!0;if(h&&r3(a,"start",!0)&&r3(l,"end")){let r=l,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let i=a,s=1;for(;!i.isTextblock;
10i=i.firstChild)s++;if(r.canReplace(r.childCount,r.childCount,i.content)){if(n){let r=S.empty;for(let t=o.length-1;t>=0;t--)r=S.from(o[t].copy(r));n(t.tr.step(new tE(e.pos-o.length,e.pos+a.nodeSize,e.pos+s,e.pos+a.nodeSize-s,new M(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function op(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(e.tr.setSelection(t3.create(e.doc,t<0?o.start(i):o.end(i)))),!0)}}let oh=op(-1),of=op(1);function od(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&tj(s,t,e);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}function om(t,e=null){return function(n,r){let o=!1;for(let r=0;r<n.selection.ranges.length&&!o;r++){let{$from:{pos:i},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(i,s,(r,i)=>{if(o)return!1;if(!(!r.isTextblock||r.hasMarkup(t,e))){if(r.type==t)o=!0;else{let e=n.doc.resolve(i),r=e.index();o=e.parent.canReplaceWith(r,r+1,t)}}})}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:i},$to:{pos:s}}=n.selection.ranges[r];o.setBlockType(i,s,t,e)}r(o.scrollIntoView())}return!0}}function og(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=!1,a=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(t)&&0==s.startIndex){if(0==o.index(s.depth-1))return!1;let t=n.doc.resolve(s.start-2);a=new _(t,t,s.depth),s.endIndex<s.parent.childCount&&(s=new _(o,n.doc.resolve(i.end(s.depth)),s.depth)),l=!0}let c=tj(a,t,e,s);return!!c&&(r&&r((function(t,e,n,r,o){let i=S.empty;for(let t=n.length-1;t>=0;t--)i=S.from(n[t].type.create(n[t].attrs,i));t.step(new tE(e.start-(r?2:0),e.end,e.start,e.end,new M(i,0,0),n.length,!0));let s=0;for(let t=0;t<n.length;t++)n[t].type==o&&(s=t+1);let l=n.length-s,a=e.start+n.length-(r?2:0),c=e.parent;for(let n=e.startIndex,r=e.endIndex,o=!0;n<r;n++,o=!1)!o&&tP(t.doc,a,l)&&(t.split(a,l),a+=2*l),a+=c.child(n).nodeSize;return t})(n.tr,s,c,l,t).scrollIntoView()),!0)}}function oy(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,e=>e.childCount>0&&e.firstChild.type==t);return!!i&&(!n||(r.node(i.depth-1).type==t?function(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new tE(i-1,s,i,s,new M(S.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new _(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));let l=tR(r);if(null==l)return!1;o.lift(r,l);let a=o.mapping.map(i,-1)-1;return tz(o.doc,a)&&o.join(a),e(o.scrollIntoView()),!0}(e,n,t,i):function(t,e,n){let r=t.tr,o=n.parent;for(let t=n.end,e=n.endIndex-1,i=n.startIndex;e>i;e--)t-=o.child(e).nodeSize,r.delete(t-1,t+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,a=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(l?0:1),u+1,s.content.append(a?S.empty:S.from(o))))return!1;let p=i.pos,h=p+s.nodeSize;return r.step(new tE(p-(l?1:0),h+(a?1:0),p+1,h-1,new M((l?S.empty:S.from(o.copy(S.empty))).append(a?S.empty:S.from(o.copy(S.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}(e,n,i)))}}function ob(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,e=>e.childCount>0&&e.firstChild.type==t);if(!i)return!1;let s=i.startIndex;if(0==s)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=t)return!1;if(n){let r=a.lastChild&&a.lastChild.type==l.type,o=S.from(r?t.create():null),s=new M(S.from(t.create(null,S.from(l.type.create(null,o)))),r?3:1,0),c=i.start,u=i.end;n(e.tr.step(new tE(c-(r?3:1),u,c,u,s,1,!0)).scrollIntoView())}return!0}}function ov(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=function t(e){var n,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e){if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(r=t(e[n]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r)}return o}(t))&&(r&&(r+=" "),r+=e);return r}"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform();let ow=t=>{let e=oO(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:t=>{let n=t.split("-");return""===n[0]&&1!==n.length&&n.shift(),oS(n,e)||ok(t)},getConflictingClassGroupIds:(t,e)=>{let o=n[t]||[];return e&&r[t]?[...o,...r[t]]:o}}},oS=(t,e)=>{var n;if(0===t.length)return e.classGroupId;let r=t[0],o=e.nextPart.get(r),i=o?oS(t.slice(1),o):void 0;if(i)return i;if(0===e.validators.length)return;let s=t.join("-");return null==(n=e.validators.find(({validator:t})=>t(s)))?void 0:n.classGroupId},ox=/^\[(.+)\]$/,ok=t=>{if(ox.test(t)){let e=ox.exec(t)[1],n=null==e?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},oO=t=>{let{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};
10return oN(Object.entries(t.classGroups),n).forEach(([t,n])=>{oC(n,r,t,e)}),r},oC=(t,e,n,r)=>{t.forEach(t=>{if("string"==typeof t){(""===t?e:oA(e,t)).classGroupId=n;return}if("function"==typeof t){if(oM(t)){oC(t(r),e,n,r);return}e.validators.push({validator:t,classGroupId:n});return}Object.entries(t).forEach(([t,o])=>{oC(o,oA(e,t),n,r)})})},oA=(t,e)=>{let n=t;return e.split("-").forEach(t=>{n.nextPart.has(t)||n.nextPart.set(t,{nextPart:new Map,validators:[]}),n=n.nextPart.get(t)}),n},oM=t=>t.isThemeGetter,oN=(t,e)=>e?t.map(([t,n])=>[t,n.map(t=>"string"==typeof t?e+t:"object"==typeof t?Object.fromEntries(Object.entries(t).map(([t,n])=>[e+t,n])):t)]):t,oE=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map,o=(o,i)=>{n.set(o,i),++e>t&&(e=0,r=n,n=new Map)};return{get(t){let e=n.get(t);return void 0!==e?e:void 0!==(e=r.get(t))?(o(t,e),e):void 0},set(t,e){n.has(t)?n.set(t,e):o(t,e)}}},oT=t=>{let{separator:e,experimentalParseClassName:n}=t,r=1===e.length,o=e[0],i=e.length,s=t=>{let n=[],s=0,l=0,a;for(let c=0;c<t.length;c++){let u=t[c];if(0===s){if(u===o&&(r||t.slice(c,c+i)===e)){n.push(t.slice(l,c)),l=c+i;continue}if("/"===u){a=c;continue}}"["===u?s++:"]"===u&&s--}let c=0===n.length?t:t.substring(l),u=c.startsWith("!"),p=u?c.substring(1):c;return{modifiers:n,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return n?t=>n({className:t,parseClassName:s}):s},oD=t=>{if(t.length<=1)return t;let e=[],n=[];return t.forEach(t=>{"["===t[0]?(e.push(...n.sort(),t),n=[]):n.push(t)}),e.push(...n.sort()),e},oR=t=>({cache:oE(t.cacheSize),parseClassName:oT(t),...ow(t)}),oj=/\s+/,oI=(t,e)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=e,i=[],s=t.trim().split(oj),l="";for(let t=s.length-1;t>=0;t-=1){let e=s[t],{modifiers:a,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:p}=n(e),h=!!p,f=r(h?u.substring(0,p):u);if(!f){if(!h||!(f=r(u))){l=e+(l.length>0?" "+l:l);continue}h=!1}let d=oD(a).join(":"),m=c?d+"!":d,g=m+f;if(i.includes(g))continue;i.push(g);let y=o(f,h);for(let t=0;t<y.length;++t){let e=y[t];i.push(m+e)}l=e+(l.length>0?" "+l:l)}return l};function oP(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=oz(e))&&(r&&(r+=" "),r+=n);return r}let oz=t=>{if("string"==typeof t)return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=oz(t[r]))&&(n&&(n+=" "),n+=e);return n},o$=t=>{let e=e=>e[t]||[];return e.isThemeGetter=!0,e},o_=/^\[(?:([a-z-]+):)?(.+)\]$/i,oB=/^\d+\/\d+$/,oF=new Set(["px","full","screen"]),oL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oV=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oH=t=>oK(t)||oF.has(t)||oB.test(t),oJ=t=>o8(t,"length",o9),oK=t=>!!t&&!Number.isNaN(Number(t)),oG=t=>o8(t,"number",oK),oY=t=>!!t&&Number.isInteger(Number(t)),oX=t=>t.endsWith("%")&&oK(t.slice(0,-1)),oQ=t=>o_.test(t),oZ=t=>oL.test(t),o0=new Set(["length","size","percentage"]),o1=t=>o8(t,o0,o7),o2=t=>o8(t,"position",o7),o3=new Set(["image","url"]),o5=t=>o8(t,o3,ie),o4=t=>o8(t,"",it),o6=()=>!0,o8=(t,e,n)=>{let r=o_.exec(t);return!!r&&(r[1]?"string"==typeof e?r[1]===e:e.has(r[1]):n(r[2]))},o9=t=>oV.test(t)&&!oW.test(t),o7=()=>!1,it=t=>oq.test(t),ie=t=>oU.test(t),ir=function(t,...e){let n,r,o,i=function(l){return r=(n=oR(e.reduce((t,e)=>e(t),t()))).cache.get,o=n.cache.set,i=s,s(l)};function s(t){let e=r(t);if(e)return e;let i=oI(t,n);return o(t,i),i}return function(){return i(oP.apply(null,arguments))}}(()=>
vendor: 7,586 bytes, line 10
10{let t=o$("colors"),e=o$("spacing"),n=o$("blur"),r=o$("brightness"),o=o$("borderColor"),i=o$("borderRadius"),s=o$("borderSpacing"),l=o$("borderWidth"),a=o$("contrast"),c=o$("grayscale"),u=o$("hueRotate"),p=o$("invert"),h=o$("gap"),f=o$("gradientColorStops"),d=o$("gradientColorStopPositions"),m=o$("inset"),g=o$("margin"),y=o$("opacity"),b=o$("padding"),v=o$("saturate"),w=o$("scale"),S=o$("sepia"),x=o$("skew"),k=o$("space"),O=o$("translate"),C=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",oQ,e],N=()=>[oQ,e],E=()=>["",oH,oJ],T=()=>["auto",oK,oQ],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",oQ],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[oK,oQ];return{cacheSize:500,separator:":",theme:{colors:[o6],spacing:[oH,oJ],blur:["none","",oZ,oQ],brightness:$(),borderColor:[t],borderRadius:["none","","full",oZ,oQ],borderSpacing:N(),borderWidth:E(),contrast:$(),grayscale:P(),hueRotate:$(),invert:P(),gap:N(),gradientColorStops:[t],gradientColorStopPositions:[oX,oJ],inset:M(),margin:M(),opacity:$(),padding:N(),saturate:$(),scale:$(),sepia:P(),skew:$(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",oQ]}],container:["container"],columns:[{columns:[oZ]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),oQ]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",oY,oQ]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",oQ]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",oY,oQ]}],"grid-cols":[{"grid-cols":[o6]}],"col-start-end":[{col:["auto",{span:["full",oY,oQ]},oQ]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[o6]}],"row-start-end":[{row:["auto",{span:[oY,oQ]},oQ]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",oQ]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",oQ]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",oQ,e]}],"min-w":[{"min-w":[oQ,e,"min","max","fit"]}],"max-w":[{"max-w":[oQ,e,"none","full","min","max","fit","prose",{screen:[oZ]},oZ]}],h:[{h:[oQ,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[oQ,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[oQ,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[oQ,e,"auto","min","max","fit"]}],"font-size":[{text:["base",oZ,oJ]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",oG]}],"font-family":[{font:[o6]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",oQ]}],"line-clamp":[{"line-clamp":["none",oK,oG]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",oH,oQ]}],"list-image":[{"list-image":["none",oQ]}],"list-style-type":[{list:["none","disc","decimal",oQ]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",oH,oJ]}],"underline-offset":[{"underline-offset":["auto",oH,oQ]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oQ]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oQ]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),o2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",o1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},o5]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[d]}
10],"gradient-via-pos":[{via:[d]}],"gradient-to-pos":[{to:[d]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...R(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}
vendor: 4,395 bytes, line 10
10],"divide-style":[{divide:R()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...R()]}],"outline-offset":[{"outline-offset":[oH,oQ]}],"outline-w":[{outline:[oH,oJ]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[oH,oJ]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",oZ,o4]}],"shadow-color":[{shadow:[o6]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",oZ,oQ]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[p]}],saturate:[{saturate:[v]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",oQ]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",oQ]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",oQ]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[oY,oQ]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[x]}],"skew-y":[{"skew-y":[x]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",oQ]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oQ]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oQ]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[oH,oJ,oG]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
10none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});var io="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{};function ii(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var is,il,ia=Object.prototype.toString,ic=function(t){var e=ia.call(t),n="[object Arguments]"===e;return n||(n="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===ia.call(t.callee)),n},iu=Array.prototype.slice,ip=Object.keys,ih=ip?function(t){return ip(t)}:function(){if(il)return is;if(il=1,!Object.keys){var t,e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.prototype.propertyIsEnumerable,o=!r.call({toString:null},"toString"),i=r.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},a={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch{return!0}}catch{return!0}return!1}(),u=function(t){if(typeof window>"u"||!c)return l(t);try{return l(t)}catch{return!1}};t=function(t){var r=null!==t&&"object"==typeof t,l="[object Function]"===n.call(t),a=ic(t),c=r&&"[object String]"===n.call(t),p=[];if(!r&&!l&&!a)throw TypeError("Object.keys called on a non-object");var h=i&&l;if(c&&t.length>0&&!e.call(t,0))for(var f=0;f<t.length;++f)p.push(String(f));if(a&&t.length>0)for(var d=0;d<t.length;++d)p.push(String(d));else for(var m in t)!(h&&"prototype"===m)&&e.call(t,m)&&p.push(String(m));if(o)for(var g=u(t),y=0;y<s.length;++y)!(g&&"constructor"===s[y])&&e.call(t,s[y])&&p.push(s[y]);return p}}return is=t}(),id=Object.keys;ih.shim=function(){return Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return ic(t)?id(iu.call(t)):id(t)}):Object.keys=ih,Object.keys||ih};var im,ig=Error,iy=EvalError,ib=RangeError,iv=ReferenceError,iw=SyntaxError,iS=TypeError,ix=URIError,ik=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);
10if("string"==typeof e||"[object Symbol]"!==Object.prototype.toString.call(e)||"[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0},iO="u">typeof Symbol&&Symbol,iC=function(){return"function"==typeof iO&&"function"==typeof Symbol&&"symbol"==typeof iO("foo")&&"symbol"==typeof Symbol("bar")&&ik()},iA={__proto__:null,foo:{}},iM=Object,iN=Object.prototype.toString,iE=Math.max,iT=function(t,e){for(var n=[],r=0;r<t.length;r+=1)n[r]=t[r];for(var o=0;o<e.length;o+=1)n[o+t.length]=e[o];return n},iD=function(t,e){for(var n=[],r=e,o=0;r<t.length;r+=1,o+=1)n[o]=t[r];return n},iR=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n},ij=Function.prototype.bind||function(t){var e=this;if("function"!=typeof e||"[object Function]"!==iN.apply(e))throw TypeError("Function.prototype.bind called on incompatible "+e);for(var n,r=iD(arguments,1),o=iE(0,e.length-r.length),i=[],s=0;s<o;s++)i[s]="$"+s;if(n=Function("binder","return function ("+iR(i,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var o=e.apply(this,iT(r,arguments));return Object(o)===o?o:this}return e.apply(t,iT(r,arguments))}),e.prototype){var l=function(){};l.prototype=e.prototype,n.prototype=new l,l.prototype=null}return n},iI=Function.prototype.call,iP=Object.prototype.hasOwnProperty,iz=ij.call(iI,iP),i$=Function,i_=function(t){try{return i$('"use strict"; return ('+t+").constructor;")()}catch{}},iB=Object.getOwnPropertyDescriptor;if(iB)try{iB({},"")}catch{iB=null}var iF=function(){throw new iS},iL=iB?function(){try{return arguments.callee,iF}catch{try{return iB(arguments,"callee").get}catch{return iF}}}():iF,iV=iC(),iW={__proto__:iA}.foo===iA.foo&&!(iA instanceof iM),iq=Object.getPrototypeOf||(iW?function(t){return t.__proto__}:null),iU={},iH=typeof Uint8Array>"u"||!iq?im:iq(Uint8Array),iJ={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?im:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?im:ArrayBuffer,"%ArrayIteratorPrototype%":iV&&iq?iq([][Symbol.iterator]()):im,"%AsyncFromSyncIteratorPrototype%":im,"%AsyncFunction%":iU,"%AsyncGenerator%":iU,"%AsyncGeneratorFunction%":iU,"%AsyncIteratorPrototype%":iU,"%Atomics%":typeof Atomics>"u"?im:Atomics,"%BigInt%":typeof BigInt>"u"?im:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?im:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?im:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?im:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ig,"%eval%":eval,"%EvalError%":iy,"%Float32Array%":typeof Float32Array>"u"?im:Float32Array,"%Float64Array%":typeof Float64Array>"u"?im:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?im:FinalizationRegistry,"%Function%":i$,"%GeneratorFunction%":iU,"%Int8Array%":typeof Int8Array>"u"?im:Int8Array,"%Int16Array%":typeof Int16Array>"u"?im:Int16Array,"%Int32Array%":typeof Int32Array>
10"u"?im:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":iV&&iq?iq(iq([][Symbol.iterator]())):im,"%JSON%":"object"==typeof JSON?JSON:im,"%Map%":typeof Map>"u"?im:Map,"%MapIteratorPrototype%":!(typeof Map>"u")&&iV&&iq?iq(new Map()[Symbol.iterator]()):im,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?im:Promise,"%Proxy%":typeof Proxy>"u"?im:Proxy,"%RangeError%":ib,"%ReferenceError%":iv,"%Reflect%":typeof Reflect>"u"?im:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?im:Set,"%SetIteratorPrototype%":!(typeof Set>"u")&&iV&&iq?iq(new Set()[Symbol.iterator]()):im,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?im:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":iV&&iq?iq(""[Symbol.iterator]()):im,"%Symbol%":iV?Symbol:im,"%SyntaxError%":iw,"%ThrowTypeError%":iL,"%TypedArray%":iH,"%TypeError%":iS,"%Uint8Array%":typeof Uint8Array>"u"?im:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?im:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?im:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?im:Uint32Array,"%URIError%":ix,"%WeakMap%":typeof WeakMap>"u"?im:WeakMap,"%WeakRef%":typeof WeakRef>"u"?im:WeakRef,"%WeakSet%":typeof WeakSet>"u"?im:WeakSet};if(iq)try{null.error}catch(t){var iK=iq(iq(t));iJ["%Error.prototype%"]=iK}var iG=function t(e){var n;if("%AsyncFunction%"===e)n=i_("async function () {}");else if("%GeneratorFunction%"===e)n=i_("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=i_("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&iq&&(n=iq(o.prototype))}return iJ[e]=n,n},iY={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},iX=ij.call(Function.call,Array.prototype.concat),iQ=ij.call(Function.apply,Array.prototype.splice),iZ=ij.call(Function.call,String.prototype.replace),i0=ij.call(Function.call,String.prototype.slice),i1=ij.call(Function.call,RegExp.prototype.exec),i2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,i3=/\\(\\)?/g,i5=function(t){var e=i0(t,0,1),n=i0(t,-1);if("%"===e&&"%"!==n)throw new iw("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new iw("invalid intrinsic syntax, expected opening `%`");var r=[];return iZ(t,i2,function(t,e,n,o){r[r.length]=n?iZ(o,i3,"$1"):e||t}),r},i4=function(t,e){var n,r=t;if(iz(iY,r)&&(r="%"+(n=iY[r])[0]+"%"),iz(iJ,r)){var o=iJ[r];if(o===iU&&(o=iG(r)),typeof o>"u"&&!e)throw new iS("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new iw("intrinsic "+t+" does not exist!")},i6=function(t,e){if("string"!=typeof t||0===t.length)throw new iS("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new iS('"allowMissing" argument must be a boolean');if(null===i1(/^%?[^%]*%?$/,t))throw new iw("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=i5(t),r=n.length>0?n[0]:"",o=i4("%"+r+"%",e),i=o.name,s=o.value,l=!1,a=o.alias;a&&(r=a[0],iQ(n,iX([0,1],a)));for(var c=1,u=!0;c<n.length;c+=1){var p=n[c],h=i0(p,0,1),f=i0(p,-1);if(('"'===h||"'"===h||"`"===h||'"'===f||"'"===f||"`"===f)&&h!==f)throw new iw("property names with quotes must have matching quotes");if("constructor"!==p&&u||(l=!0),r+="."+p,iz(iJ,i="%"+r+"%"))s=iJ[i];else if(null!=s){if(!(p in s)){if(!e)throw new iS("base intrinsic for "+t+" exists, but the property is not available.");return}if(iB&&c+1>=n.length){var d=iB(s,p);s=(u=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:s[p]}else u=iz(s,p),s=s[p];u&&!l&&(iJ[i]=s)}}return s},i8=i6("%Object.defineProperty%",!0)||!1;if(i8)try{i8({},"a",{value:1})}catch{i8=!1}var i9=i8,i7=i6("%Object.getOwnPropertyDescriptor%",!0);if(i7)try{i7([],"length")}catch{i7=null}var st=i7,se=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new iS("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new iS("`property` must be a string or a symbol`");
10if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new iS("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new iS("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new iS("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new iS("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,s=arguments.length>6&&arguments[6],l=!!st&&st(t,e);if(i9)i9(t,e,{configurable:null===i&&l?l.configurable:!i,enumerable:null===r&&l?l.enumerable:!r,value:n,writable:null===o&&l?l.writable:!o});else if(!s&&(r||o||i))throw new iw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else t[e]=n},sn=function(){return!!i9};sn.hasArrayLengthDefineBug=function(){if(!i9)return null;try{return 1!==i9([],"length",{value:1}).length}catch{return!0}};var sr="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),so=Object.prototype.toString,si=Array.prototype.concat,ss=sn(),sl=function(t,e,n,r){if(e in t){if(!0===r){if(t[e]===n)return}else if(!("function"==typeof r&&"[object Function]"===so.call(r))||!r())return}ss?se(t,e,n,!0):se(t,e,n)},sa=function(t,e){var n=arguments.length>2?arguments[2]:{},r=ih(e);sr&&(r=si.call(r,Object.getOwnPropertySymbols(e)));for(var o=0;o<r.length;o+=1)sl(t,r[o],e[r[o]],n[r[o]])};sa.supportsDescriptors=!!ss;var sc={exports:{}},su=sn(),sp=i6("%Math.floor%"),sh=function(t,e){if("function"!=typeof t)throw new iS("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||sp(e)!==e)throw new iS("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,o=!0;if("length"in t&&st){var i=st(t,"length");i&&!i.configurable&&(r=!1),i&&!i.writable&&(o=!1)}return(r||o||!n)&&(su?se(t,"length",e,!0,!0):se(t,"length",e)),t};lQ=i6("%Function.prototype.apply%"),lZ=i6("%Function.prototype.call%"),l0=i6("%Reflect.apply%",!0)||ij.call(lZ,lQ),l1=i6("%Math.max%"),sc.exports=function(t){if("function"!=typeof t)throw new iS("a function is required");var e=l0(ij,lZ,arguments);return sh(e,1+l1(0,t.length-(arguments.length-1)),!0)},l2=function(){return l0(ij,lQ,arguments)},i9?i9(sc.exports,"apply",{value:l2}):sc.exports.apply=l2;var sf=sc.exports,sd=sf(i6("String.prototype.indexOf")),sm=function(t,e){var n=i6(t,!!e);return"function"==typeof n&&sd(t,".prototype.")>-1?sf(n):n},sg=ik(),sy=Object,sb=sm("Array.prototype.push"),sv=sm("Object.prototype.propertyIsEnumerable"),sw=sg?Object.getOwnPropertySymbols:null,sS=function(t,e){if(null==t)throw TypeError("target must be an object");var n=sy(t);if(1==arguments.length)return n;for(var r=1;r<arguments.length;++r){var o=sy(arguments[r]),i=ih(o),s=sg&&(Object.getOwnPropertySymbols||sw);if(s)for(var l=s(o),a=0;a<l.length;++a){var c=l[a];sv(o,c)&&sb(i,c)}for(var u=0;u<i.length;++u){var p=i[u];if(sv(o,p)){var h=o[p];n[p]=h}}}return n},sx=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),n={},r=0;r<e.length;++r)n[e[r]]=e[r];var o=Object.assign({},n),i="";for(var s in o)i+=s;return t!==i},sk=function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch{return"y"===t[1]}return!1},sO=function(){return!Object.assign||sx()||sk()?sS:Object.assign},sC=sf.apply(sO()),sA=function(t,e){return sC(Object,arguments)};sa(sA,{getPolyfill:sO,implementation:sS,shim:function(){var t=sO();return sa(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t}});var sM=function(){return"string"==typeof(function(){}).name},sN=Object.getOwnPropertyDescriptor;if(sN)try{sN([],"length")}catch{sN=null}sM.functionsHaveConfigurableNames=function(){if(!sM()||!sN)return!1;var t=sN(function(){},"name");return!!t&&!!t.configurable};var sE=Function.prototype.bind;sM.boundFunctionsHaveNames=function(){return sM()&&"function"==typeof sE&&""!==(function(){}).bind().name};var sT=sn(),sD=sM.functionsHaveConfigurableNames(),sR=Object,sj=function(t,e){if("function"!=typeof t)throw new iS("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];
10return(!n||sD)&&(sT?se(t,"name",e,!0,!0):se(t,"name",e)),t}(function(){if(this==null||this!==sR(this))throw new iS("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),sI=sa.supportsDescriptors,sP=Object.getOwnPropertyDescriptor,sz=function(){if(sI&&"gim"===/a/mig.flags){var t=sP(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(n,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return sj},s$=sa.supportsDescriptors,s_=Object.getOwnPropertyDescriptor,sB=Object.defineProperty,sF=TypeError,sL=Object.getPrototypeOf,sV=/a/,sW=sf(sz());sa(sW,{getPolyfill:sz,implementation:sj,shim:function(){if(!s$||!sL)throw new sF("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=sz(),e=sL(sV),n=s_(e,"flags");
10return n&&n.get===t||sB(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}});var sq={exports:{}},sU=function(){return ik()&&!!Symbol.toStringTag},sH=sU(),sJ=sm("Object.prototype.toString"),sK=function(t){return(!sH||!t||"object"!=typeof t||!(Symbol.toStringTag in t))&&"[object Arguments]"===sJ(t)},sG=function(t){return!!sK(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==sJ(t)&&"[object Function]"===sJ(t.callee)},sY=function(){return sK(arguments)}();sK.isLegacyArguments=sG;var sX=sY?sK:sG;let sQ=function(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),n}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var sZ="function"==typeof Map&&Map.prototype,s0=Object.getOwnPropertyDescriptor&&sZ?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s1=sZ&&s0&&"function"==typeof s0.get?s0.get:null,s2=sZ&&Map.prototype.forEach,s3="function"==typeof Set&&Set.prototype,s5=Object.getOwnPropertyDescriptor&&s3?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s4=s3&&s5&&"function"==typeof s5.get?s5.get:null,s6=s3&&Set.prototype.forEach,s8="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,s9="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s7="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,lt=Boolean.prototype.valueOf,le=Object.prototype.toString,ln=Function.prototype.toString,lr=String.prototype.match,lo=String.prototype.slice,li=String.prototype.replace,ls=String.prototype.toUpperCase,ll=String.prototype.toLowerCase,la=RegExp.prototype.test,lc=Array.prototype.concat,lu=Array.prototype.join,lp=Array.prototype.slice,lh=Math.floor,lf="function"==typeof BigInt?BigInt.prototype.valueOf:null,ld=Object.getOwnPropertySymbols,lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,lg="function"==typeof Symbol&&"object"==typeof Symbol.iterator,ly="function"==typeof Symbol&&Symbol.toStringTag?Symbol.toStringTag:null,lb=Object.prototype.propertyIsEnumerable,lv=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function lw(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||la.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var r=t<0?-lh(-t):lh(t);if(r!==t){var o=String(r),i=lo.call(e,o.length+1);return li.call(o,n,"$&_")+"."+li.call(li.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return li.call(e,n,"$&_")}var lS=sQ.custom,lx=lA(lS)?lS:null;function lk(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function lO(t){return"[object Array]"===lE(t)&&(!ly||!("object"==typeof t&&ly in t))}function lC(t){return"[object RegExp]"===lE(t)&&(!ly||!("object"==typeof t&&ly in t))}function lA(t){if(lg)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!lm)return!1;try{return lm.call(t),!0}catch{}return!1}var lM=Object.prototype.hasOwnProperty||function(t){return t in this};function lN(t,e){return lM.call(t,e)}function lE(t){return le.call(t)}function lT(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return -1}function lD(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+ls.call(e.toString(16))}function lR(t){return"Object("+t+")"}function lj(t){return t+" { ? }"}function lI(t,e,n,r){return t+" ("+e+") {"+(r?lP(n,r):lu.call(n,", "))+"}"}function lP(t,e){if(0===t.length)return"";var n=` 11`+e.prev+e.base;return n+lu.call(t,","+n)+` 12`+e.prev}function lz(t,e){var n=lO(t),r=[];if(n){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=lN(t,o)?e(t[o],t):""}var i,s="function"==typeof ld?ld(t):[];if(lg){i={};for(var l=0;l<s.length;l++)i["$"+s[l]]=s[l]}for(var a in t)lN(t,a)&&(n&&String(Number(a))===a&&a<t.length||lg&&i["$"+a]instanceof Symbol||(la.call(/[^\w$]/,a)?r.pu
12sh(e(a,t)+": "+e(t[a],t)):r.push(a+": "+e(t[a],t))));if("function"==typeof ld)for(var c=0;c<s.length;c++)lb.call(t,s[c])&&r.push("["+e(s[c])+"]: "+e(t[s[c]],t));return r}var l$=function t(e,n,r,o){var i=n||{};if(lN(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw TypeError('option "quoteStyle" must be "single" or "double"');if(lN(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=!lN(i,"customInspect")||i.customInspect;if("boolean"!=typeof s&&"symbol"!==s)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(lN(i,"indent")&&null!==i.indent&&" "!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(lN(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=i.numericSeparator;if(typeof e>"u")return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,n){if(e.length>n.maxStringLength){var r=e.length-n.maxStringLength;return t(lo.call(e,0,n.maxStringLength),n)+"... "+r+" more character"+(r>1?"s":"")}return lk(li.call(li.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lD),"single",n)}(e,i);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var a=String(e);return l?lw(e,a):a}if("bigint"==typeof e){var c=String(e)+"n";return l?lw(e,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&"object"==typeof e)return lO(e)?"[Array]":"[Object]";var p=function(t,e){var n;if(" "===t.indent)n=" ";else{if("number"!=typeof t.indent||!(t.indent>0))return null;n=lu.call(Array(t.indent+1)," ")}return{base:n,prev:lu.call(Array(e+1),n)}}(i,r);if(typeof o>"u")o=[];else if(lT(o,e)>=0)return"[Circular]";function h(e,n,s){if(n&&(o=lp.call(o)).push(n),s){var l={depth:i.depth};return lN(i,"quoteStyle")&&(l.quoteStyle=i.quoteStyle),t(e,l,r+1,o)}return t(e,i,r+1,o)}if("function"==typeof e&&!lC(e)){var f=function(t){if(t.name)return t.name;var e=lr.call(ln.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),d=lz(e,h);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(d.length>0?" { "+lu.call(d,", ")+" }":"")}if(lA(e)){var m=lg?li.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):lm.call(e);return"object"!=typeof e||lg?m:lR(m)}if(e&&"object"==typeof e&&("u">typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)){for(var g,y="<"+ll.call(String(e.nodeName)),b=e.attributes||[],v=0;v<b.length;v++)y+=" "+b[v].name+"="+lk((g=b[v].value,li.call(String(g),/"/g,""")),"double",i);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+ll.call(String(e.nodeName))+">"}if(lO(e)){if(0===e.length)return"[]";var w=lz(e,h);return p&&!function(t){for(var e=0;e<t.length;e++)if(lT(t[e],` 13`)>=0)return!1;return!0}(w)?"["+lP(w,p)+"]":"[ "+lu.call(w,", ")+" ]"}if("[object Error]"===lE(e)&&(!ly||!("object"==typeof e&&ly in e))){var S=lz(e,h);return"cause"in Error.prototype||!("cause"in e)||lb.call(e,"cause")?0===S.length?"["+String(e)+"]":"{ ["+String(e)+"] "+lu.call(S,", ")+" }":"{ ["+String(e)+"] "+lu.call(lc.call("[cause]: "+h(e.cause),S),", ")+" }"}if("object"==typeof e&&s){if(lx&&"function"==typeof e[lx]&&sQ)return sQ(e,{depth:u-r});if("symbol"!==s&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!s1||!t||"object"!=typeof t)return!1;try{s1.call(t);try{s4.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}(e)){var x=[];return s2&&s2.call(e,function(t,n){x.push(h(n,e,!0)+" => "+h(t,e))}),lI("Map",s1.call(e),x,p)}if(function(t){if(!s4||!t||"object"!=typeof t)return!1;try{s4.call(t);try{s1.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}(e)){var k=[];return s6&&s6.call(e,function(t){k.push(h(t,e))}),lI("Set",s4.call(e),k,p)}if(function(t){if(!s8||!t||"object"!=typeof t)return!1;try{s8.call(t,s8);try{s9.call(t,s9)}catch{return!0}return t instanceof WeakMap}catch{}return!1}(e))return lj("WeakMap");if(function(t){if(!s9||!t||"object"!=typeof t)return!1;try{s9.call(t,s9);try{s8.call(t,s8)}catch{return!0}return t instanceof WeakSet}catch{}return!1}(e))return lj("WeakSet");if(function(t){if(!s7||!t||"object"!=typeof t)return!1;try{return s7.call(t),!0}catch{}return!1}(e))return lj("WeakRef");if("[object Number]"===lE(e)&&(!ly||!("object"==typeof e&&ly in e)))return lR(h(Number(e)));if(function(t){if(!t||"object"!=typeof t||!lf)return!1;try{return lf.call(t),!0}catch{}return!1}(e))return lR(h(lf.call(e)));if("[object Boolean]"===lE(e)&&(!ly||!("object"==typeof e&&ly in e)))return lR(lt.call(e));if("[object String]"===lE(e)&&(!ly||!("object"==typeof e&&ly in e)))return lR(h(String(e)));if("u">typeof window&&e===window)return"{ [object Window] }";if("u">typeof globalThis&&e===globalThis||"u">typeof io&&e===io)return"{ [object globalThis] }";if(!("[object Date]"===lE(e)&&(!ly||!("object"==typeof e&&ly in e)))&&!lC(e)){var O=lz(e,h),C=lv?lv(e)===Object.prototype:e instanceof Object||e.constructor===Object,A=e instanceof Object?"":"null prototype",M=!C&&ly&&Object(e)===e&&ly in e?lo.call(lE(e),8,-1):A?"Object":"",N=(C||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(M||A?"["+lu.call(lc.call([],M||[],A||[]),": ")+"] ":"");return 0===O.length?N+"{}":p?N+"{"+lP(O,p)+"}":N+"{ "+lu.call(O,", ")+" }"}return String(e)},l_=i6("%WeakMap%",!0),lB=i6("%Map%",!0),lF=sm("WeakMap.prototype.get",!0),lL=sm("WeakMap.prototype.set",!0),lV=sm("WeakMap.prototype.has",!0),lW=sm("Map.prototype.get",!0),lq=sm("Map.prototype.set",!0),lU=sm("Map.prototype.has",!0),lH=function(t,e){for(var n,r=t;null!==(n=r.next);
13r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n},lJ=function(t,e){var n=lH(t,e);return n&&n.value},lK=function(t,e,n){var r=lH(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},lG=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new iS("Side channel does not contain "+l$(t))},get:function(r){if(l_&&r&&("object"==typeof r||"function"==typeof r)){if(t)return lF(t,r)}else if(lB){if(e)return lW(e,r)}else if(n)return lJ(n,r)},has:function(r){if(l_&&r&&("object"==typeof r||"function"==typeof r)){if(t)return lV(t,r)}else if(lB){if(e)return lU(e,r)}else if(n)return!!lH(n,r);return!1},set:function(r,o){l_&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new l_),lL(t,r,o)):lB?(e||(e=new lB),lq(e,r,o)):(n||(n={key:{},next:null}),lK(n,r,o))}};return r},lY=lG(),lX={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new iS("`O` is not an object");if("string"!=typeof e)throw new iS("`slot` must be a string");if(lY.assert(t),!lX.has(t,e))throw new iS("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new iS("`O` is not an object");if("string"!=typeof e)throw new iS("`slot` must be a string");var n=lY.get(t);return n&&n["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new iS("`O` is not an object");if("string"!=typeof e)throw new iS("`slot` must be a string");var n=lY.get(t);return!!n&&iz(n,"$"+e)},set:function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new iS("`O` is not an object");if("string"!=typeof e)throw new iS("`slot` must be a string");var r=lY.get(t);r||(r={},lY.set(t,r)),r["$"+e]=n}};Object.freeze&&Object.freeze(lX);var lQ,lZ,l0,l1,l2,l3,l5=SyntaxError,l4="object"==typeof StopIteration?StopIteration:null,l6={}.toString,l8=Array.isArray||function(t){return"[object Array]"==l6.call(t)},l9=String.prototype.valueOf,l7=function(t){try{return l9.call(t),!0}catch{return!1}},at=Object.prototype.toString,ae=sU(),an=function(t){return"string"==typeof t||"object"==typeof t&&(ae?l7(t):"[object String]"===at.call(t))},ar="function"==typeof Map&&Map.prototype?Map:null,ao="function"==typeof Set&&Set.prototype?Set:null;ar||(l3=function(t){return!1});var ai=ar?Map.prototype.has:null,as=ao?Set.prototype.has:null;l3||ai||(l3=function(t){return!1});var al,aa=l3||function(t){if(!t||"object"!=typeof t)return!1;try{if(ai.call(t),as)try{as.call(t)}catch{return!0}return t instanceof ar}catch{}return!1},ac="function"==typeof Map&&Map.prototype?Map:null,au="function"==typeof Set&&Set.prototype?Set:null;au||(al=function(t){return!1});var ap=ac?Map.prototype.has:null,ah=au?Set.prototype.has:null;al||ah||(al=function(t){return!1});var af=al||function(t){if(!t||"object"!=typeof t)return!1;try{if(ah.call(t),ap)try{ap.call(t)}catch{return!0}return t instanceof au}catch{}return!1},ad=function(t){if(!l4)throw new l5("this environment lacks StopIteration");lX.set(t,"[[Done]]",!1);var e={next:function(){var t=lX.get(this,"[[Iterator]]"),e=lX.get(t,"[[Done]]");try{return{done:e,value:e?void 0:t.next()}}catch(e){if(lX.set(t,"[[Done]]",!0),e!==l4)throw e;return{done:!0,value:void 0}}}};return lX.set(e,"[[Iterator]]",t),e};if(iC()||ik()){var am=Symbol.iterator;sq.exports=function(t){return null!=t&&"u">typeof t[am]?t[am]():sX(t)?Array.prototype[am].call(t):void 0}}else{var ag=i6("%Map%",!0),ay=i6("%Set%",!0),ab=sm("Array.prototype.push"),av=sm("String.prototype.charCodeAt"),aw=sm("String.prototype.slice"),aS=function(t,e){if(e+1>=t.length)return e+1;var n=av(t,e);if(n<55296||n>56319)return e+1;var r=av(t,e+1);return r<56320||r>57343?e+1:e+2},ax=function(t){var e=0;return{next:function(){var n,r=e>=t.length;return r||(n=t[e],e+=1),{done:r,value:n}}}},ak=function(t,e){if(l8(t)||sX(t))return ax(t);if(an(t)){var n=0;return{next:function(){var e=aS(t,n),r=aw(t,n,e);return n=e,{done:e>t.length,value:r}}}}if(e&&"u">typeof t["_es6-shim iterator_"])return t["_es6-shim iterator_"]()};if(ag||ay){var aO=sm("Map.prototype.forEach",!0),aC=sm("Set.prototype.forEach",!0);if(typeof v>"u"||!v.versions||!v.versions.node)var aA=sm("Map.prototype.iterator",!0),aM=sm("Set.prototype.iterator",!0);var aN=sm("Map.prototype.@@iterator",!0)||sm("Map.prototype._es6-shim iterator_",!0),aE=sm("Set.prototype.@@iterator",!0)||sm("Set.prototype._es6-shim iterator_",!0),aT=function(t){if(aa(t)){if(aA)return ad(aA(t));if(aN)return aN(t);if(aO){var e=[];return aO(t,function(t,n){ab(e,[n,t])}),ax(e)}}if(af(t)){if(aM)return ad(aM(t));if(aE)return aE(t);if(aC){var n=[];return aC(t,function(t){ab(n,t)}),ax(n)}}};sq.exports=function(t){return aT(t)||ak(t)}}else sq.exports=function(t){if(null!=t)return ak(t,!0)}}var aD=sq.exports,aR=function(t){return t!=t},aj=function(t,e){return 0===t&&0===e?1/t==1/e:!!(t===e||aR(t)&&aR(e))},aI=function(){return"function"==typeof Object.is?Object.is:aj}
13,aP=sf(aI(),Object);sa(aP,{getPolyfill:aI,implementation:aj,shim:function(){var t=aI();return sa(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var az,a$,a_,aB,aF=i6("%ArrayBuffer%",!0),aL=sm("ArrayBuffer.prototype.byteLength",!0),aV=sm("Object.prototype.toString"),aW=!!aF&&!aL&&new aF(0).slice,aq=!!aW&&sf(aW),aU=aL||aq?function(t){if(!t||"object"!=typeof t)return!1;try{return aL?aL(t):aq(t,0),!0}catch{return!1}}:aF?function(t){return"[object ArrayBuffer]"===aV(t)}:function(t){return!1},aH=Date.prototype.getDay,aJ=function(t){try{return aH.call(t),!0}catch{return!1}},aK=Object.prototype.toString,aG=sU(),aY=sU();if(aY){az=sm("Object.prototype.hasOwnProperty"),a$=sm("RegExp.prototype.exec"),a_={};var aX=function(){throw a_};aB={toString:aX,valueOf:aX},"symbol"==typeof Symbol.toPrimitive&&(aB[Symbol.toPrimitive]=aX)}var aQ=sm("Object.prototype.toString"),aZ=Object.getOwnPropertyDescriptor,a0=aY?function(t){if(!t||"object"!=typeof t)return!1;var e=aZ(t,"lastIndex");if(!(e&&az(e,"value")))return!1;try{a$(t,aB)}catch(t){return t===a_}}:function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"[object RegExp]"===aQ(t)},a1=sm("SharedArrayBuffer.prototype.byteLength",!0),a2=a1?function(t){if(!t||"object"!=typeof t)return!1;try{return a1(t),!0}catch{return!1}}:function(t){return!1},a3=Number.prototype.toString,a5=function(t){try{return a3.call(t),!0}catch{return!1}},a4=Object.prototype.toString,a6=sU(),a8=sm("Boolean.prototype.toString"),a9=sm("Object.prototype.toString"),a7=function(t){try{return a8(t),!0}catch{return!1}},ct=sU(),ce={exports:{}},cn=Object.prototype.toString;if(iC()){var cr=Symbol.prototype.toString,co=/^Symbol\(.*\)$/;ce.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==cn.call(t))return!1;try{return"symbol"==typeof t.valueOf()&&co.test(cr.call(t))}catch{return!1}}}else ce.exports=function(t){return!1};var ci=ce.exports,cs={exports:{}},cl="u">typeof BigInt&&BigInt;if("function"==typeof cl&&"function"==typeof BigInt&&"bigint"==typeof cl(42)&&"bigint"==typeof BigInt(42)){var ca=BigInt.prototype.valueOf,cc=function(t){try{return ca.call(t),!0}catch{}return!1};cs.exports=function(t){return null!==t&&!(typeof t>"u")&&"boolean"!=typeof t&&"string"!=typeof t&&"number"!=typeof t&&"symbol"!=typeof t&&"function"!=typeof t&&("bigint"==typeof t||cc(t))}}else cs.exports=function(t){return!1};var cu,cp=cs.exports,ch="function"==typeof WeakMap&&WeakMap.prototype?WeakMap:null,cf="function"==typeof WeakSet&&WeakSet.prototype?WeakSet:null;ch||(cu=function(t){return!1});var cd=ch?ch.prototype.has:null,cm=cf?cf.prototype.has:null;cu||cd||(cu=function(t){return!1});var cg=cu||function(t){if(!t||"object"!=typeof t)return!1;try{if(cd.call(t,cd),cm)try{cm.call(t,cm)}catch{return!0}return t instanceof ch}catch{}return!1},cy={exports:{}},cb=i6("%WeakSet%",!0),cv=sm("WeakSet.prototype.has",!0);if(cv){var cw=sm("WeakMap.prototype.has",!0);cy.exports=function(t){if(!t||"object"!=typeof t)return!1;try{if(cv(t,cv),cw)try{cw(t,cw)}catch{return!0}return t instanceof cb}catch{}return!1}}else cy.exports=function(t){return!1};var cS,cx,ck=cy.exports,cO=Function.prototype.toString,cC="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof cC&&"function"==typeof Object.defineProperty)try{cS=Object.defineProperty({},"length",{get:function(){throw cx}}),cx={},cC(function(){throw 42},null,cS)}catch(t){t!==cx&&(cC=null)}else cC=null;var cA=/^\s*class\b/,cM=function(t){try{var e=cO.call(t);return cA.test(e)}catch{return!1}},cN=function(t){try{return!cM(t)&&(cO.call(t),!0)}catch{return!1}},cE=Object.prototype.toString,cT="function"==typeof Symbol&&!!Symbol.toStringTag,cD=!(0 in[,]),cR=function(){return!1};if("object"==typeof document){var cj=document.all;cE.call(cj)===cE.call(document.all)&&(cR=function(t){if((cD||!t)&&(typeof t>"u"||"object"==typeof t))try{var e=cE.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch{}return!1})}var cI=cC?function(t){if(cR(t))return!0;if(!t||"function"!=typeof t&&"object"!=typeof t)return!1;try{cC(t,null,cS)}catch(t){if(t!==cx)return!1}return!cM(t)&&cN(t)}:function(t){if(cR(t))return!0;
13if(!t||"function"!=typeof t&&"object"!=typeof t)return!1;if(cT)return cN(t);if(cM(t))return!1;var e=cE.call(t);return!!("[object Function]"===e||"[object GeneratorFunction]"===e||/^\[object HTML/.test(e))&&cN(t)},cP=Object.prototype.toString,cz=Object.prototype.hasOwnProperty,c$=function(t,e,n){for(var r=0,o=t.length;r<o;r++)cz.call(t,r)&&(null==n?e(t[r],r,t):e.call(n,t[r],r,t))},c_=function(t,e,n){for(var r=0,o=t.length;r<o;r++)null==n?e(t.charAt(r),r,t):e.call(n,t.charAt(r),r,t)},cB=function(t,e,n){for(var r in t)cz.call(t,r)&&(null==n?e(t[r],r,t):e.call(n,t[r],r,t))},cF=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],cL=typeof globalThis>"u"?io:globalThis,cV=function(t,e,n){var r;if(!cI(e))throw TypeError("iterator must be a function");arguments.length>=3&&(r=n),"[object Array]"===cP.call(t)?c$(t,e,r):"string"==typeof t?c_(t,e,r):cB(t,e,r)},cW=sm("Object.prototype.toString"),cq=sU(),cU=typeof globalThis>"u"?io:globalThis,cH=function(){for(var t=[],e=0;e<cF.length;e++)"function"==typeof cL[cF[e]]&&(t[t.length]=cF[e]);return t}(),cJ=sm("String.prototype.slice"),cK=Object.getPrototypeOf,cG=sm("Array.prototype.indexOf",!0)||function(t,e){for(var n=0;n<t.length;n+=1)if(t[n]===e)return n;return -1},cY={__proto__:null};cq&&st&&cK?cV(cH,function(t){var e=new cU[t];if(Symbol.toStringTag in e){var n=cK(e),r=st(n,Symbol.toStringTag);r||(r=st(cK(n),Symbol.toStringTag)),cY["$"+t]=sf(r.get)}}):cV(cH,function(t){var e=new cU[t],n=e.slice||e.set;n&&(cY["$"+t]=sf(n))});var cX=function(t){var e=!1;return cV(cY,function(n,r){if(!e)try{"$"+n(t)===r&&(e=cJ(r,1))}catch{}}),e},cQ=function(t){var e=!1;return cV(cY,function(n,r){if(!e)try{n(t),e=cJ(r,1)}catch{}}),e},cZ=sm("ArrayBuffer.prototype.byteLength",!0),c0=function(t){return"object"==typeof t&&null!==t&&(aG?aJ(t):"[object Date]"===aK.call(t))},c1=function(t){return null==t||"object"!=typeof t&&"function"!=typeof t?null:an(t)?"String":"number"==typeof t||"object"==typeof t&&(a6?a5(t):"[object Number]"===a4.call(t))?"Number":"boolean"==typeof t||null!==t&&"object"==typeof t&&(ct&&Symbol.toStringTag in t?a7(t):"[object Boolean]"===a9(t))?"Boolean":ci(t)?"Symbol":cp(t)?"BigInt":void 0},c2=function(t){if(t&&"object"==typeof t){if(aa(t))return"Map";if(af(t))return"Set";if(cg(t))return"WeakMap";if(ck(t))return"WeakSet"}return!1},c3=function(t){if(!t||"object"!=typeof t)return!1;if(!cq){var e=cJ(cW(t),8,-1);return cG(cH,e)>-1?e:"Object"===e&&cQ(t)}return st?cX(t):null},c5=function(t){return aU(t)?cZ?cZ(t):t.byteLength:NaN},c4=sm("SharedArrayBuffer.prototype.byteLength",!0),c6=sm("Date.prototype.getTime"),c8=Object.getPrototypeOf,c9=sm("Object.prototype.toString"),c7=i6("%Set%",!0),ut=sm("Map.prototype.has",!0),ue=sm("Map.prototype.get",!0),un=sm("Map.prototype.size",!0),ur=sm("Set.prototype.add",!0),uo=sm("Set.prototype.delete",!0),ui=sm("Set.prototype.has",!0),us=sm("Set.prototype.size",!0);function ul(t,e,n,r){for(var o,i=aD(t);(o=i.next())&&!o.done;)if(uu(e,o.value,n,r))return uo(t,o.value),!0;return!1}function ua(t){return typeof t>"u"?null:"object"!=typeof t?"symbol"!=typeof t&&("string"!=typeof t&&"number"!=typeof t||+t==+t):void 0}function uc(t,e,n,r,o,i){for(var s,l,a=aD(t);(s=a.next())&&!s.done;)if(uu(n,l=s.value,o,i)&&uu(r,ue(e,l),o,i))return uo(t,l),!0;return!1}function uu(t,e,n,r){var o=n||{};if(o.strict?aP(t,e):t===e)return!0;if(c1(t)!==c1(e))return!1;if(!t||!e||"object"!=typeof t&&"object"!=typeof e)return o.strict?aP(t,e):t==e;var i,s=r.has(t),l=r.has(e);if(s&&l){if(r.get(t)===r.get(e))return!0}else i={};return s||r.set(t,i),l||r.set(e,i),function(t,e,n,r){if(typeof t!=typeof e||null==t||null==e||c9(t)!==c9(e)||sX(t)!==sX(e)||l8(t)!==l8(e))return!1;var o,i,s=t instanceof Error,l=e instanceof Error;if(s!==l||(s||l)&&(t.name!==e.name||t.message!==e.message))return!1;var a=a0(t),c=a0(e);if(a!==c||(a||c)&&(t.source!==e.source||sW(t)!==sW(e)))return!1;var u=c0(t),p=c0(e);if(u!==p||(u||p)&&c6(t)!==c6(e)||n.strict&&c8&&c8(t)!==c8(e))return!1;var h=c3(t),f=c3(e);if(h!==f)return!1;if(h||f){if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}var d=up(t),m=up(e);if(d!==m)return!1;if(d||m){if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}var g=aU(t),y=aU(e);if(g!==y)return!1;if(g||y)return c5(t)===c5(e)&&"function"==typeof Uint8Array&&uu(new Uint8Array(t),new Uint8Array(e),n,r);var b=a2(t),v=a2(e);
13if(b!==v)return!1;if(b||v)return c4(t)===c4(e)&&"function"==typeof Uint8Array&&uu(new Uint8Array(t),new Uint8Array(e),n,r);if(typeof t!=typeof e)return!1;var w=ih(t),S=ih(e);if(w.length!==S.length)return!1;for(w.sort(),S.sort(),o=w.length-1;o>=0;o--)if(w[o]!=S[o])return!1;for(o=w.length-1;o>=0;o--)if(!uu(t[i=w[o]],e[i],n,r))return!1;var x=c2(t),k=c2(e);return x===k&&("Set"===x||"Set"===k?function(t,e,n,r){if(us(t)!==us(e))return!1;for(var o,i,s,l=aD(t),a=aD(e);(o=l.next())&&!o.done;)if(o.value&&"object"==typeof o.value)s||(s=new c7),ur(s,o.value);else if(!ui(e,o.value)){if(n.strict||!function(t,e,n){var r=ua(n);return r??(ui(e,r)&&!ui(t,r))}(t,e,o.value))return!1;s||(s=new c7),ur(s,o.value)}if(s){for(;(i=a.next())&&!i.done;)if(i.value&&"object"==typeof i.value){if(!ul(s,i.value,n.strict,r))return!1}else if(!n.strict&&!ui(t,i.value)&&!ul(s,i.value,n.strict,r))return!1;return 0===us(s)}return!0}(t,e,n,r):"Map"!==x||function(t,e,n,r){if(un(t)!==un(e))return!1;for(var o,i,s,l,a,c,u=aD(t),p=aD(e);(o=u.next())&&!o.done;)if(l=o.value[0],a=o.value[1],l&&"object"==typeof l)s||(s=new c7),ur(s,l);else if(typeof(c=ue(e,l))>"u"&&!ut(e,l)||!uu(a,c,n,r)){if(n.strict||!function(t,e,n,r,o,i){var s=ua(n);if(null!=s)return s;var l=ue(e,s),a=sA({},o,{strict:!1});return!!((!(typeof l>"u")||ut(e,s))&&uu(r,l,a,i))&&!ut(t,s)&&uu(r,l,a,i)}(t,e,l,a,n,r))return!1;s||(s=new c7),ur(s,l)}if(s){for(;(i=p.next())&&!i.done;)if(l=i.value[0],c=i.value[1],l&&"object"==typeof l){if(!uc(s,t,l,c,n,r))return!1}else if(!n.strict&&(!t.has(l)||!uu(ue(t,l),c,n,r))&&!uc(s,t,l,c,sA({},n,{strict:!1}),r))return!1;return 0===us(s)}return!0}(t,e,n,r))}(t,e,o,r)}function up(t){return!!t&&"object"==typeof t&&"number"==typeof t.length&&"function"==typeof t.copy&&"function"==typeof t.slice&&(!(t.length>0)||"number"==typeof t[0])&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}let uh=ii(function(t,e,n){return uu(t,e,n,lG())}),uf=t=>"boolean"==typeof t?"".concat(t):0===t?"0":t,ud=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=function t(e){var n,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e){if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(r=t(e[n]))&&(o&&(o+=" "),o+=r);else for(n in e)e[n]&&(o&&(o+=" "),o+=n)}return o}(t))&&(r&&(r+=" "),r+=e);return r},um=(t,e)=>n=>{var r;if((null==e?void 0:e.variants)==null)return ud(t,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(t=>{let e=null==n?void 0:n[t],r=null==i?void 0:i[t];if(null===e)return null;let s=uf(e)||uf(r);return o[t][s]}),l=n&&Object.entries(n).reduce((t,e)=>{let[n,r]=e;return void 0===r||(t[n]=r),t},{});return ud(t,s,null==e||null===(r=e.compoundVariants)||void 0===r?void 0:r.reduce((t,e)=>{let{class:n,className:r,...o}=e;return Object.entries(o).every(t=>{let[e,n]=t;return Array.isArray(n)?n.includes({...i,...l}[e]):({...i,...l})[e]===n})?[...t,n,r]:t},[]),null==n?void 0:n.class,null==n?void 0:n.className)};var ug={exports:{}};r=function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e||4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,(function(e){return t[e]}).bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){t.exports=n(5)()},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=function(t,e,n){var r=t.direction,o=t.value;switch(r){case"top":return n.top+o<e.top&&n.bottom>e.bottom&&n.left<e.left&&n.right>e.right;case"left":return n.left+o<e.left&&n.bottom>e.bottom&&n.top<e.top&&n.right>e.right;case"bottom":return n.bottom-o>e.bottom&&n.left<e.left&&n.right>e.right&&n.top<e.top;case"right":return n.right-o>e.right&&n.left<e.left&&n.top<e.top&&n.bottom>e.bottom}}},function(t,e,n){n.r(e),n.d(e,"default",function(){return g});var r=n(1),o=n.n(r),i=n(2),s=n.n(i),l=n(0),a=n.n(l),c=n(3),u=n.n(c);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
13function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=function(t){var e;function n(t){var e,r;return function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,n),e=(r=h(n).call(this,t))&&("object"===p(r)||"function"==typeof r)?r:f(this),m(f(e),"getContainer",function(){return e.props.containment||window}),m(f(e),"addEventListener",function(t,n,r,o){e.debounceCheck||(e.debounceCheck={});var i,s=function(){i=null,e.check()},l={target:t,fn:o>-1?function(){i||(i=setTimeout(s,o||0))}:function(){clearTimeout(i),i=setTimeout(s,r||0)},getLastTimeout:function(){return i}};t.addEventListener(n,l.fn),e.debounceCheck[n]=l}),m(f(e),"startWatching",function(){e.debounceCheck||e.interval||(e.props.intervalCheck&&(e.interval=setInterval(e.check,e.props.intervalDelay)),e.props.scrollCheck&&e.addEventListener(e.getContainer(),"scroll",e.props.scrollDelay,e.props.scrollThrottle),e.props.resizeCheck&&e.addEventListener(window,"resize",e.props.resizeDelay,e.props.resizeThrottle),e.props.delayedCall||e.check())}),m(f(e),"stopWatching",function(){if(e.debounceCheck){for(var t in e.debounceCheck)if(e.debounceCheck.hasOwnProperty(t)){var n=e.debounceCheck[t];clearTimeout(n.getLastTimeout()),n.target.removeEventListener(t,n.fn),e.debounceCheck[t]=null}}e.debounceCheck=null,e.interval&&(e.interval=clearInterval(e.interval))}),m(f(e),"check",function(){var t,n,r=e.node;if(!r)return e.state;if(void 0===(t=e.roundRectDown(r.getBoundingClientRect())).width&&(t.width=t.right-t.left),void 0===t.height&&(t.height=t.bottom-t.top),e.props.containment){var o=e.props.containment.getBoundingClientRect();n={top:o.top,left:o.left,bottom:o.bottom,right:o.right}}else n={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var i=e.props.offset||{};"object"===p(i)&&(n.top+=i.top||0,n.left+=i.left||0,n.bottom-=i.bottom||0,n.right-=i.right||0);var s={top:t.top>=n.top,left:t.left>=n.left,bottom:t.bottom<=n.bottom,right:t.right<=n.right},l=t.height>0&&t.width>0,a=l&&s.top&&s.left&&s.bottom&&s.right;if(l&&e.props.partialVisibility){var c=t.top<=n.bottom&&t.bottom>=n.top&&t.left<=n.right&&t.right>=n.left;"string"==typeof e.props.partialVisibility&&(c=s[e.props.partialVisibility]),a=e.props.minTopValue?c&&t.top<=n.bottom-e.props.minTopValue:c}"string"==typeof i.direction&&"number"==typeof i.value&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",i.direction,i.value),a=u()(i,t,n));var h=e.state;return e.state.isVisible!==a&&(h={isVisible:a,visibilityRect:s},e.setState(h),e.props.onChange&&e.props.onChange(a)),h}),e.state={isVisible:null,visibilityRect:{}},e}return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(n,t),e=[{key:"componentDidMount",value:function(){this.node=s.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(t){this.node=s.a.findDOMNode(this),this.props.active&&!t.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(t){return{top:Math.floor(t.top),left:Math.floor(t.left),bottom:Math.floor(t.bottom),right:Math.floor(t.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):o.a.Children.only(this.props.children)}}],function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,e),n}(o.a.Component);m(g,"defaultProps",{active:!0,partialVisibility:!1,minTopValue:0,scrollCheck:!1,scrollDelay:250,scrollThrottle:-1,resizeCheck:!1,resizeDelay:250,resizeThrottle:-1,intervalCheck:!0,intervalDelay:100,delayedCall:!1,offset:{},containment:null,children:o.a.createElement("span",null)}),m(g,"propTypes",{onChange:a.a.func,active:a.a.bool,partialVisibility:a.a.oneOfType([a.a.bool,a.a.oneOf(["top","right","bottom","left"])]),delayedCall:a.a.bool,offset:a.a.oneOfType([a.a.shape({top:a.a.number,left:a.a.number,bottom:a.a.number,right:a.a.number}),a.a.shape({direction:a.a.oneOf(["top","right","bottom","left"]),value:a.a.number})]),scrollCheck:a.a.bool,scrollDelay:a.a.number,scrollThrottle:a.a.number,resizeCheck:a.a.bool,resizeDelay:a.a.number,resizeThrottle:a.a.number,intervalCheck:a.a.bool,intervalDelay:a.a.number,containment:"u">typeof window?a.a.instanceOf(window.Element):a.a.any,children:a.a.oneOfType([a.a.element,a.a.func]),minTopValue:a.a.number})},function(t,e,n){var r=n(6);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,s){if(s!==r){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(t,e,n){t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])},ug.exports=r(y,b);let uy=ii(ug.exports);var ub="object"==typeof global&&global&&global.Object===Object&&global,uv="object"==typeof self&&self&&self.Object===Object&&self,uw=ub||uv||Function("return this")(),uS=uw.Symbol,ux=Object.prototype,uk=ux.hasOwnProperty,uO=ux.toString,uC=uS?uS.toStringTag:void 0,uA=Object.prototype.toString,uM=uS?uS.toStringTag:void 0;
13function uN(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":uM&&uM in Object(t)?function(t){var e=uk.call(t,uC),n=t[uC];try{t[uC]=void 0;var r=!0}catch{}var o=uO.call(t);return r&&(e?t[uC]=n:delete t[uC]),o}(t):uA.call(t)}function uE(t){return null!=t&&"object"==typeof t}function uT(t){return"symbol"==typeof t||uE(t)&&"[object Symbol]"==uN(t)}function uD(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}var uR=Array.isArray,uj=1/0,uI=uS?uS.prototype:void 0,uP=uI?uI.toString:void 0;function uz(t){if("string"==typeof t)return t;if(uR(t))return uD(t,uz)+"";if(uT(t))return uP?uP.call(t):"";var e=t+"";return"0"==e&&1/t==-uj?"-0":e}var u$=/\s/,u_=/^\s+/;function uB(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var uF=NaN,uL=/^[-+]0x[0-9a-f]+$/i,uV=/^0b[01]+$/i,uW=/^0o[0-7]+$/i,uq=parseInt;function uU(t){if("number"==typeof t)return t;if(uT(t))return uF;if(uB(t)){var e,n="function"==typeof t.valueOf?t.valueOf():t;t=uB(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=(e=t)&&e.slice(0,function(t){for(var e=t.length;e--&&u$.test(t.charAt(e)););return e}(e)+1).replace(u_,"");var r=uV.test(t);return r||uW.test(t)?uq(t.slice(2),r?2:8):uL.test(t)?uF:+t}var uH=1/0;function uJ(t){return t}function uK(t){if(!uB(t))return!1;var e=uN(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var uG=uw["__core-js_shared__"],uY=(o=/[^.]+$/.exec(uG&&uG.keys&&uG.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",uX=Function.prototype.toString;function uQ(t){if(null!=t){try{return uX.call(t)}catch{}try{return t+""}catch{}}return""}var uZ=/^\[object .+?Constructor\]$/,u0=Object.prototype,u1=Function.prototype.toString,u2=u0.hasOwnProperty,u3=RegExp("^"+u1.call(u2).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u5(t,e){var n=null==t?void 0:t[e];return uB(n)&&(!uY||!(uY in n))&&(uK(n)?u3:uZ).test(uQ(n))?n:void 0}var u4=u5(uw,"WeakMap"),u6=Date.now,u8=function(){try{var t=u5(Object,"defineProperty");return t({},"",{}),t}catch{}}(),u9=(i=u8?function(t,e){return u8(t,"toString",{configurable:!0,enumerable:!1,value:function(){return e},writable:!0})}:uJ,s=0,l=0,function(){var t=u6(),e=16-(t-l);if(l=t,e>0){if(++s>=800)return arguments[0]}else s=0;return i.apply(void 0,arguments)});function u7(t){return t!=t}function pt(t,e){return!!(null==t?0:t.length)&&(e==e?function(t,e,n){for(var r=-1,o=t.length;++r<o;)if(t[r]===e)return r;return -1}(t,e,0):function(t,e,n,r){for(var o=t.length,i=-1;++i<o;)if(e(t[i],i,t))return i;return -1}(t,u7,0))>-1}var pe=/^(?:0|[1-9]\d*)$/;function pn(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&("number"==n||"symbol"!=n&&pe.test(t))&&t>-1&&t%1==0&&t<e}function pr(t,e){return t===e||t!=t&&e!=e}var po=Math.max;function pi(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function ps(t){return null!=t&&pi(t.length)&&!uK(t)}var pl=Object.prototype;function pa(t){return uE(t)&&"[object Arguments]"==uN(t)}var pc=Object.prototype,pu=pc.hasOwnProperty,pp=pc.propertyIsEnumerable,ph=pa(function(){return arguments}())?pa:function(t){return uE(t)&&pu.call(t,"callee")&&!pp.call(t,"callee")},pf="object"==typeof exports&&exports&&!exports.nodeType&&exports,pd=pf&&"object"==typeof module&&module&&!module.nodeType&&module,pm=pd&&pd.exports===pf?uw.Buffer:void 0,pg=(pm?pm.isBuffer:void 0)||function(){return!1},py={};function pb(t){return function(e){return t(e)}}py["[object Float32Array]"]=py["[object Float64Array]"]=py["[object Int8Array]"]=py["[object Int16Array]"]=py["[object Int32Array]"]=py["[object Uint8Array]"]=py["[object Uint8ClampedArray]"]=py["[object Uint16Array]"]=py["[object Uint32Array]"]=!0,py["[object Arguments]"]=py["[object Array]"]=py["[object ArrayBuffer]"]=py["[object Boolean]"]=py["[object DataView]"]=py["[object Date]"]=py["[object Error]"]=py["[object Function]"]=py["[object Map]"]=py["[object Number]"]=py["[object Object]"]=py["[object RegExp]"]=py["[object Set]"]=py["[object String]"]=py["[object WeakMap]"]=!1;
13var pv="object"==typeof exports&&exports&&!exports.nodeType&&exports,pw=pv&&"object"==typeof module&&module&&!module.nodeType&&module,pS=pw&&pw.exports===pv&&ub.process,px=function(){try{return pw&&pw.require&&pw.require("util").types||pS&&pS.binding&&pS.binding("util")}catch{}}(),pk=px&&px.isTypedArray,pO=pk?pb(pk):function(t){return uE(t)&&pi(t.length)&&!!py[uN(t)]},pC=Object.prototype.hasOwnProperty,pA=(a=Object.keys,c=Object,function(t){return a(c(t))}),pM=Object.prototype.hasOwnProperty;function pN(t){return ps(t)?function(t,e){var n=uR(t),r=!n&&ph(t),o=!n&&!r&&pg(t),i=!n&&!r&&!o&&pO(t),s=n||r||o||i,l=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],a=l.length;for(var c in t)pC.call(t,c)&&!(s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||pn(c,a)))&&l.push(c);return l}(t):function(t){if(e=t&&t.constructor,t!==("function"==typeof e&&e.prototype||pl))return pA(t);var e,n=[];for(var r in Object(t))pM.call(t,r)&&"constructor"!=r&&n.push(r);return n}(t)}var pE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pT=/^\w*$/;function pD(t,e){if(uR(t))return!1;var n=typeof t;return!!("number"==n||"symbol"==n||"boolean"==n||null==t||uT(t))||pT.test(t)||!pE.test(t)||null!=e&&t in Object(e)}var pR=u5(Object,"create"),pj=Object.prototype.hasOwnProperty,pI=Object.prototype.hasOwnProperty;function pP(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function pz(t,e){for(var n=t.length;n--;)if(pr(t[n][0],e))return n;return -1}pP.prototype.clear=function(){this.__data__=pR?pR(null):{},this.size=0},pP.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},pP.prototype.get=function(t){var e=this.__data__;if(pR){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return pj.call(e,t)?e[t]:void 0},pP.prototype.has=function(t){var e=this.__data__;return pR?void 0!==e[t]:pI.call(e,t)},pP.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=pR&&void 0===e?"__lodash_hash_undefined__":e,this};var p$=Array.prototype.splice;function p_(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}p_.prototype.clear=function(){this.__data__=[],this.size=0},p_.prototype.delete=function(t){var e=this.__data__,n=pz(e,t);return!(n<0)&&(n==e.length-1?e.pop():p$.call(e,n,1),--this.size,!0)},p_.prototype.get=function(t){var e=this.__data__,n=pz(e,t);return n<0?void 0:e[n][1]},p_.prototype.has=function(t){return pz(this.__data__,t)>-1},p_.prototype.set=function(t,e){var n=this.__data__,r=pz(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var pB=u5(uw,"Map");function pF(t,e){var n,r=t.__data__;return("string"==(n=typeof e)||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?r["string"==typeof e?"string":"hash"]:r.map}function pL(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function pV(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(pV.Cache||pL),n}pL.prototype.clear=function(){this.size=0,this.__data__={hash:new pP,map:new(pB||p_),string:new pP}},pL.prototype.delete=function(t){var e=pF(this,t).delete(t);return this.size-=e?1:0,e},pL.prototype.get=function(t){return pF(this,t).get(t)},pL.prototype.has=function(t){return pF(this,t).has(t)},pL.prototype.set=function(t,e){var n=pF(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},pV.Cache=pL;var pW=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pq=/\\(\\)?/g,pU=(p=(u=pV(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(pW,function(t,n,r,o){e.push(r?o.replace(pq,"$1"):n||t)}),e},function(t){return 500===p.size&&p.clear(),t})).cache,u);function pH(t){return null==t?"":uz(t)}function pJ(t,e){return uR(t)?t:pD(t,e)?[t]:pU(pH(t))}var pK=1/0;function pG(t){if("string"==typeof t||uT(t))return t;var e=t+"";return"0"==e&&1/t==-pK?"-0":e}function pY(t,e){e=pJ(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[pG(e[n++])];return n&&n==r?t:void 0}function pX(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}var pQ=uS?uS.isConcatSpreadable:void 0;function pZ(t){return uR(t)||ph(t)||!!(pQ&&t&&t[pQ])}var p0=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function p1(t){return p0.test(t)}var p2="\ud800-\udfff",p3="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",p5="\ud83c[\udffb-\udfff]",p4="[^"+p2+"]",p6="(?:\ud83c[\udde6-\uddff]){2}",p8="[\ud800-\udbff][\udc00-\udfff]",p9="(?:"+p3+"|"+p5+")?",p7="[\\ufe0e\\ufe0f]?",ht="(?:\\u200d(?:"+[p4,p6,p8].join("|")+")"+p7+p9+")*",he=RegExp(p5+"(?="+p5+")|(?:"+[p4+p3+"?",p3,p6,p8,"["+p2+"]"].join("|")+")"+(p7+p9+ht),"g");function hn(t,e,n){var r,o,i;return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=uU(n))==n?n:0),void 0!==e&&(e=(e=uU(e))==e?e:0),r=uU(t),o=e,i=n,r==r&&(void 0!==i&&(r=r<=i?r:i),void 0!==o&&(r=r>=o?r:o)),r}function hr(t){var e=this.__data__=new p_(t);this.size=e.size}hr.prototype.clear=function(){this.__data__=new p_,this.size=0},hr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},hr.prototype.get=function(t){return this.__data__.get(t)},hr.prototype.has=function(t){return this.__data__.has(t)},hr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof p_){var r=n.__data__;
13if(!pB||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new pL(r)}return n.set(t,e),this.size=n.size,this};var ho=Object.prototype.propertyIsEnumerable,hi=Object.getOwnPropertySymbols,hs=hi?function(t){return null==t?[]:function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}(hi(t=Object(t)),function(e){return ho.call(t,e)})}:function(){return[]};function hl(t){var e;return e=pN(t),uR(t)?e:pX(e,hs(t))}var ha=u5(uw,"DataView"),hc=u5(uw,"Promise"),hu=u5(uw,"Set"),hp="[object Map]",hh="[object Promise]",hf="[object Set]",hd="[object WeakMap]",hm="[object DataView]",hg=uQ(ha),hy=uQ(pB),hb=uQ(hc),hv=uQ(hu),hw=uQ(u4),hS=uN;(ha&&hS(new ha(new ArrayBuffer(1)))!=hm||pB&&hS(new pB)!=hp||hc&&hS(hc.resolve())!=hh||hu&&hS(new hu)!=hf||u4&&hS(new u4)!=hd)&&(hS=function(t){var e=uN(t),n="[object Object]"==e?t.constructor:void 0,r=n?uQ(n):"";if(r)switch(r){case hg:return hm;case hy:return hp;case hb:return hh;case hv:return hf;case hw:return hd}return e});var hx=uw.Uint8Array;function hk(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new pL;++e<n;)this.add(t[e])}function hO(t,e){return t.has(e)}function hC(t,e,n,r,o,i){var s=1&n,l=t.length,a=e.length;if(l!=a&&!(s&&a>l))return!1;var c=i.get(t),u=i.get(e);if(c&&u)return c==e&&u==t;var p=-1,h=!0,f=2&n?new hk:void 0;for(i.set(t,e),i.set(e,t);++p<l;){var d=t[p],m=e[p];if(r)var g=s?r(m,d,p,e,t,i):r(d,m,p,t,e,i);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}(e,function(t,e){if(!hO(f,e)&&(d===t||o(d,t,n,r,i)))return f.push(e)})){h=!1;break}}else if(!(d===m||o(d,m,n,r,i))){h=!1;break}}return i.delete(t),i.delete(e),h}function hA(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function hM(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}hk.prototype.add=hk.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},hk.prototype.has=function(t){return this.__data__.has(t)};var hN=uS?uS.prototype:void 0,hE=hN?hN.valueOf:void 0,hT=Object.prototype.hasOwnProperty,hD="[object Arguments]",hR="[object Array]",hj="[object Object]",hI=Object.prototype.hasOwnProperty;function hP(t,e,n,r,o){return t===e||(null!=t&&null!=e&&(uE(t)||uE(e))?function(t,e,n,r,o,i){var s=uR(t),l=uR(e),a=s?hR:hS(t),c=l?hR:hS(e);a=a==hD?hj:a,c=c==hD?hj:c;var u=a==hj,p=c==hj,h=a==c;if(h&&pg(t)){if(!pg(e))return!1;s=!0,u=!1}if(h&&!u)return i||(i=new hr),s||pO(t)?hC(t,e,n,r,o,i):function(t,e,n,r,o,i,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new hx(t),new hx(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return pr(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=hA;case"[object Set]":var a=1&r;if(l||(l=hM),t.size!=e.size&&!a)break;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var u=hC(l(t),l(e),r,o,i,s);return s.delete(t),u;case"[object Symbol]":if(hE)return hE.call(t)==hE.call(e)}return!1}(t,e,a,n,r,o,i);if(!(1&n)){var f=u&&hI.call(t,"__wrapped__"),d=p&&hI.call(e,"__wrapped__");
13if(f||d){var m=f?t.value():t,g=d?e.value():e;return i||(i=new hr),o(m,g,n,r,i)}}return!!h&&(i||(i=new hr),function(t,e,n,r,o,i){var s=1&n,l=hl(t),a=l.length;if(a!=hl(e).length&&!s)return!1;for(var c=a;c--;){var u=l[c];if(!(s?u in e:hT.call(e,u)))return!1}var p=i.get(t),h=i.get(e);if(p&&h)return p==e&&h==t;var f=!0;i.set(t,e),i.set(e,t);for(var d=s;++c<a;){var m=t[u=l[c]],g=e[u];if(r)var y=s?r(g,m,u,e,t,i):r(m,g,u,t,e,i);if(!(void 0===y?m===g||o(m,g,n,r,i):y)){f=!1;break}d||(d="constructor"==u)}if(f&&!d){var b=t.constructor,v=e.constructor;b!=v&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v)&&(f=!1)}return i.delete(t),i.delete(e),f}(t,e,n,r,o,i))}(t,e,n,r,hP,o):t!=t&&e!=e)}function hz(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}function h$(t,e){return null!=t&&e in Object(t)}function h_(t){return function(e){return null==e?void 0:e[t]}}var hB=function(){return uw.Date.now()},hF=Math.max,hL=Math.min;function hV(t,e,n){var r,o,i,s,l,a,c=0,u=!1,p=!1,h=!0;if("function"!=typeof t)throw TypeError("Expected a function");function f(e){var n=r,i=o;return r=o=void 0,c=e,s=t.apply(i,n)}function d(t){var n=t-a,r=t-c;return void 0===a||n>=e||n<0||p&&r>=i}function m(){var t,n,r,o=hB();if(d(o))return g(o);l=setTimeout(m,(t=o-a,n=o-c,r=e-t,p?hL(r,i-n):r))}function g(t){return l=void 0,h&&r?f(t):(r=o=void 0,s)}function y(){var t,n=hB(),i=d(n);if(r=arguments,o=this,a=n,i){if(void 0===l)return c=t=a,l=setTimeout(m,e),u?f(t):s;if(p)return clearTimeout(l),l=setTimeout(m,e),f(a)}return void 0===l&&(l=setTimeout(m,e)),s}return e=uU(e)||0,uB(n)&&(u=!!n.leading,i=(p="maxWait"in n)?hF(uU(n.maxWait)||0,e):i,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=a=o=l=void 0},y.flush=function(){return void 0===l?s:g(hB())},y}function hW(t){return uE(t)&&ps(t)}var hq=u9((f=h=function(t,e){var n,r,o,i,s,l,a=(n=null==e?0:e.length)?e[n-1]:void 0;return hW(a)&&(a=void 0),hW(t)?function(t,e,n,r){var o=-1,i=pt,s=!0,l=t.length,a=[],c=e.length;if(!l)return a;n&&(e=uD(e,pb(n))),e.length>=200&&(i=hO,s=!1,e=new hk(e));t:for(;++o<l;){var u=t[o],p=null==n?u:n(u);if(u=0!==u?u:0,s&&p==p){for(var h=c;h--;)if(e[h]===p)continue t;a.push(u)}else i(e,p,void 0)||a.push(u)}return a}(t,function(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=pZ),o||(o=[]);++i<s;){var l=t[i];n(l)&&pX(o,l)}return o}(e,0,hW),"function"==typeof(r=a)?r:null==r?uJ:"object"==typeof r?uR(r)?(o=r[0],i=r[1],pD(o)&&(s=i)==s&&!uB(s)?hz(pG(o),i):function(t){var e,n=void 0===(e=null==t?void 0:pY(t,o))?void 0:e;return void 0===n&&n===i?null!=t&&function(t,e,n){e=pJ(e,t);for(var r=-1,o=e.length,i=!1;++r<o;){var s=pG(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&pi(o)&&pn(s,o)&&(uR(t)||ph(t))}(t,o,h$):hP(i,n,3)}):1==(l=function(t){for(var e=pN(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,o==o&&!uB(o)]}return e}(r)).length&&l[0][2]?hz(l[0][0],l[0][1]):function(t){return t===r||function(t,e,n,r){var o=n.length,i=o;if(null==t)return!i;for(t=Object(t);o--;){var s=n[o];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<i;){var l=(s=n[o])[0],a=t[l],c=s[1];if(s[2]){if(void 0===a&&!(l in t))return!1}else{var u,p=new hr;if(!(void 0===u?hP(c,a,3,void 0,p):u))return!1}}return!0}(t,0,l)}:pD(r)?h_(pG(r)):function(t){return pY(t,r)}):[]},d=po((d=void 0,f.length-1),0),function(){for(var t=arguments,e=-1,n=po(t.length-d,0),r=Array(n);++e<n;)r[e]=t[d+e];e=-1;for(var o=Array(d+1);++e<d;)o[e]=t[e];return o[d]=uJ(r),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(f,this,o)}),h+"");function hU(t){return"number"==typeof t||uE(t)&&"[object Number]"==uN(t)}var hH=px&&px.isRegExp,hJ=hH?pb(hH):function(t){return uE(t)&&"[object RegExp]"==uN(t)},hK=h_("length"),hG="\ud800-\udfff",hY="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",hX="\ud83c[\udffb-\udfff]",hQ="[^"+hG+"]",hZ="(?:\ud83c[\udde6-\uddff]){2}",h0="[\ud800-\udbff][\udc00-\udfff]",h1="(?:"+hY+"|"+hX+")?",h2="[\\ufe0e\\ufe0f]?",h3="(?:\\u200d(?:"+[hQ,hZ,h0].join("|")+")"+h2+h1+")*",h5=RegExp(hX+"(?="+hX+")|(?:"+[hQ+hY+"?",hY,hZ,h0,"["+hG+"]"].join("|")+")"+(
13h2+h1+h3),"g");function h4(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw TypeError("Expected a function");return uB(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),hV(t,e,{leading:r,maxWait:e,trailing:o})}var h6=/\w*$/;function h8(t,e){var n=30,r="...";if(uB(e)){var o,i,s,l="separator"in e?e.separator:l;n="length"in e?(s=(i=(o=e.length)?(o=uU(o))===uH||o===-uH?(o<0?-1:1)*17976931348623157e292:o==o?o:0:0===o?o:0)%1,i==i?s?i-s:i:0):n,r="omission"in e?uz(e.omission):r}var a=(t=pH(t)).length;if(p1(t)){var c,u=p1(c=t)?c.match(he)||[]:c.split("");a=u.length}if(n>=a)return t;var p=n-(p1(f=r)?function(t){for(var e=h5.lastIndex=0;h5.test(t);)++e;return e}(f):hK(f));if(p<1)return r;var h=u?(d=u,m=p,g=d.length,(m=void 0===m?g:m)>=g?d:function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r<o;)i[r]=t[r+e];return i}(d,0,m)).join(""):t.slice(0,p);if(void 0===l)return h+r;if(u&&(p+=h.length-p),hJ(l)){if(t.slice(p).search(l)){var f,d,m,g,y,b=h;for(l.global||(l=RegExp(l.source,pH(h6.exec(l))+"g")),l.lastIndex=0;y=l.exec(b);)var v=y.index;h=h.slice(0,void 0===v?p:v)}}else if(t.indexOf(uz(l),p)!=p){var w=h.lastIndexOf(l);w>-1&&(h=h.slice(0,w))}return h+r}let h9=(t,e)=>{for(let n in e)t[n]=e[n];return t},h7="numeric",ft="ascii",fe="alpha",fn="asciinumeric",fr="alphanumeric",fo="domain",fi="emoji",fs="whitespace";function fl(t,e,n){for(let r in e[h7]&&(e[fn]=!0,e[fr]=!0),e[ft]&&(e[fn]=!0,e[fe]=!0),e[fn]&&(e[fr]=!0),e[fe]&&(e[fr]=!0),e[fr]&&(e[fo]=!0),e[fi]&&(e[fo]=!0),e){let e=(r in n||(n[r]=[]),n[r]);0>e.indexOf(t)&&e.push(t)}}function fa(t){void 0===t&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}fa.groups={},fa.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){return void 0===e&&(e=!1),e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){let o;return r=r||fa.groups,e&&e.j?o=e:(o=new fa(e),n&&r&&fl(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this,i=t.length;if(!i)return o;for(let e=0;e<i-1;e++)o=o.tt(t[e]);return o.tt(t[i-1],e,n,r)},tt(t,e,n,r){if(r=r||fa.groups,e&&e.j)return this.j[t]=e,e;let o,i=this.go(t);return i?(h9((o=new fa).j,i.j),o.jr.push.apply(o.jr,i.jr),o.jd=i.jd,o.t=i.t):o=new fa,e&&(r&&(o.t&&"string"==typeof o.t?fl(e,h9(function(t,e){let n={};for(let r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}(o.t,r),n),r):n&&fl(e,n,r)),o.t=e),this.j[t]=o,o}};let fc=(t,e,n,r,o)=>t.ta(e,n,r,o),fu=(t,e,n,r,o)=>t.tr(e,n,r,o),fp=(t,e,n,r,o)=>t.ts(e,n,r,o),fh=(t,e,n,r,o)=>t.tt(e,n,r,o),ff="WORD",fd="UWORD",fm="LOCALHOST",fg="UTLD",fy="SCHEME",fb="SLASH_SCHEME",fv="OPENBRACE",fw="CLOSEBRACE",fS="OPENBRACKET",fx="CLOSEBRACKET",fk="OPENPAREN",fO="CLOSEPAREN",fC="OPENANGLEBRACKET",fA="CLOSEANGLEBRACKET",fM="FULLWIDTHLEFTPAREN",fN="FULLWIDTHRIGHTPAREN",fE="LEFTCORNERBRACKET",fT="RIGHTCORNERBRACKET",fD="LEFTWHITECORNERBRACKET",fR="RIGHTWHITECORNERBRACKET",fj="FULLWIDTHLESSTHAN",fI="FULLWIDTHGREATERTHAN",fP="AMPERSAND",fz="APOSTROPHE",f$="ASTERISK",f_="BACKSLASH",fB="BACKTICK",fF="CARET",fL="COLON",fV="COMMA",fW="DOLLAR",fq="EQUALS",fU="EXCLAMATION",fH="HYPHEN",fJ="PERCENT",fK="PIPE",fG="PLUS",fY="POUND",fX="QUERY",fQ="QUOTE",fZ="SEMI",f0="SLASH",f1="TILDE",f2="UNDERSCORE",f3="EMOJI";var f5=Object.freeze({__proto__:null,WORD:ff,UWORD:fd,LOCALHOST:fm,TLD:"TLD",UTLD:fg,SCHEME:fy,SLASH_SCHEME:fb,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:fv,CLOSEBRACE:fw,OPENBRACKET:fS,CLOSEBRACKET:fx,OPENPAREN:fk,CLOSEPAREN:fO,OPENANGLEBRACKET:fC,CLOSEANGLEBRACKET:fA,FULLWIDTHLEFTPAREN:fM,FULLWIDTHRIGHTPAREN:fN,LEFTCORNERBRACKET:fE,RIGHTCORNERBRACKET:fT,LEFTWHITECORNERBRACKET:fD,RIGHTWHITECORNERBRACKET:fR,FULLWIDTHLESSTHAN:fj,FULLWIDTHGREATERTHAN:fI,AMPERSAND:fP,APOSTROPHE:fz,ASTERISK:f$,AT:"AT",BACKSLASH:f_,BACKTICK:fB,CARET:fF,COLON:fL,COMMA:fV,DOLLAR:fW,DOT:"DOT",EQUALS:fq,EXCLAMATION:fU,HYPHEN:fH,PERCENT:fJ,PIPE:fK,PLUS:fG,POUND:fY,QUERY:fX,QUOTE:fQ,SEMI:fZ,SLASH:f0,TILDE:f1,UNDERSCORE:f2,EMOJI:f3,SYM:"SYM"});let f4=/[a-z]/,f6=RegExp("\\p{L}","u"),f8=RegExp("\\p{Emoji}","u"),f9=/\d/,f7=/\s/,dt=` 14`,de=null,dn=null;function dr(t,e,n,r,o){let i;let s=e.length;for(let n=0;n<s-1;n++){let s=e[n];t.j[s]?i=t.j[s]:((i=new fa(r)).jr=o.slice(),t.j[s]=i),t=i}return(i=new fa(n)).jr=o.slice(),t.j[e[s-1]]=i,i}function di(t){let e=[],n=[],r=0;for(;r<t.length;){let o=0;for(;"0123456789".indexOf(t[r+o])>=0;)o++;if(o>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+o),10);e>0;e--)n.pop();r+=o}else n.push(t[r]),r++}return e}let ds={defaultProtocol:"http",events:null,format:da,formatHref:da,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function dl(t,e){void 0===e&&(e=null);let n=h9({},ds);t&&(n=h9(n,t instanceof dl?t.o:t));let r=n.ignoreTags,o=[];for(let t=0;t<r.length;t++)o.push(r[t].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}function da(t){return t}function dc(t,e){this.t="token",this.v=t,this.tk=e}
14function du(t,e){class n extends dc{constructor(e,n){super(e,n),this.t=t}}for(let t in e)n.prototype[t]=e[t];return n.t=t,n}dl.prototype={o:ds,ignoreTags:[],defaultRender:t=>t,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){let r=null!=e,o=this.o[t];return o&&("object"==typeof o?"function"==typeof(o=n.t in o?o[n.t]:ds[t])&&r&&(o=o(e,n)):"function"==typeof o&&r&&(o=o(e,n.t,n)),o)},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)}},dc.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){return void 0===t&&(t=ds.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){let e=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",e,this),r=t.get("tagName",e,this),o=this.toFormattedString(t),i={},s=t.get("className",e,this),l=t.get("target",e,this),a=t.get("rel",e,this),c=t.getObj("attributes",e,this),u=t.getObj("events",e,this);return i.href=n,s&&(i.class=s),l&&(i.target=l),a&&(i.rel=a),c&&h9(i,c),{tagName:r,attributes:i,content:o,eventListeners:u}}};let dp=du("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),dh=du("text"),df=du("nl"),dd=du("url",{isLink:!0,toHref(t){return void 0===t&&(t=ds.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){let t=this.tk;return t.length>=2&&t[0].t!==fm&&t[1].t===fL}}),dm=t=>new fa(t);function dg(t,e,n){let r=n[0].s,o=n[n.length-1].e;return new t(e.slice(r,o),n)}let dy="u">typeof console&&console&&console.warn||(()=>{}),db={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function dv(){fa.groups={},db.scanner=null,db.parser=null,db.tokenQueue=[],db.pluginQueue=[],db.customSchemes=[],db.initialized=!1}function dw(t,e){if(void 0===e&&(e=!1),db.initialized&&dy(`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. 151. Must only contain digits, lowercase ASCII letters or "-" 162. Cannot start or end with "-" 173. "-" cannot repeat`);db.customSchemes.push([t,e])}function dS(t){return db.initialized||function(){db.scanner=function(t){void 0===t&&(t=[]);let e={};fa.groups=e;let n=new fa;null==de&&(de=di("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
17ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==dn&&(dn=di("ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
17ºÐ´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")),fh(n,"'",fz),fh(n,"{",fv),fh(n,"}",fw),fh(n,"[",fS),fh(n,"]",fx),fh(n,"(",fk),fh(n,")",fO),fh(n,"<",fC),fh(n,">",fA),fh(n,"ï¼",fM),fh(n,"ï¼",fN),fh(n,"ã",fE),fh(n,"ã",fT),fh(n,"ã",fD),fh(n,"ã",fR),fh(n,"ï¼",fj),fh(n,"ï¼",fI),fh(n,"&",fP),fh(n,"*",f$),fh(n,"@","AT"),fh(n,"`",fB),fh(n,"^",fF),fh(n,":",fL),fh(n,",",fV),fh(n,"$",fW),fh(n,".","DOT"),fh(n,"=",fq),fh(n,"!",fU),fh(n,"-",fH),fh(n,"%",fJ),fh(n,"|",fK),fh(n,"+",fG),fh(n,"#",fY),fh(n,"?",fX),fh(n,'"',fQ),fh(n,"/",f0),fh(n,";",fZ),fh(n,"~",f1),fh(n,"_",f2),fh(n,"\\",f_);let r=fu(n,f9,"NUM",{[h7]:!0});fu(r,f9,r);let o=fu(n,f4,ff,{[ft]:!0});fu(o,f4,o);let i=fu(n,f6,fd,{[fe]:!0});fu(i,f4),fu(i,f6,i);let s=fu(n,f7,"WS",{[fs]:!0});fh(n,dt,"NL",{[fs]:!0}),fh(s,dt),fu(s,f7,s);let l=fu(n,f8,f3,{[fi]:!0});fu(l,f8,l),fh(l,"ï¸",l),fu(fh(l,"â"),f8,l);let a=[[f4,o]],c=[[f4,null],[f6,i]];for(let t=0;t<de.length;t++)dr(n,de[t],"TLD",ff,a);for(let t=0;t<dn.length;t++)dr(n,dn[t],fg,fd,c);fl("TLD",{tld:!0,ascii:!0},e),fl(fg,{utld:!0,alpha:!0},e),dr(n,"file",fy,ff,a),dr(n,"mailto",fy,ff,a),dr(n,"http",fb,ff,a),dr(n,"https",fb,ff,a),dr(n,"ftp",fb,ff,a),dr(n,"ftps",fb,ff,a),fl(fy,{scheme:!0,ascii:!0},e),fl(fb,{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],o=t[e][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?o[fo]=!0:f4.test(r)?f9.test(r)?o[fn]=!0:o[ft]=!0:o[h7]=!0,fp(n,r,r,o)}return fp(n,"localhost",fm,{ascii:!0}),n.jd=new fa("SYM"),{start:n,tokens:h9({groups:e},f5)}}(db.customSchemes);for(let t=0;t<db.tokenQueue.length;t++)db.tokenQueue[t][1]({scanner:db.scanner});db.parser=function(t){let{groups:e}=t,n=e.domain.concat([fP,f$,"AT",f_,fB,fF,fW,fq,fH,"NUM",fJ,fK,fG,fY,f0,"SYM",f1,f2]),r=[fz,fL,fV,"DOT",fU,fX,fQ,fZ,fC,fA,fv,fw,fx,fS,fk,fO,fM,fN,fE,fT,fD,fR,fj,fI],o=[fP,fz,f$,f_,fB,fF,fW,fq,fH,fv,fw,fJ,fK,fG,fY,fX,f0,"SYM",f1,f2],i=dm(),s=fh(i,f1);fc(s,o,s),fc(s,e.domain,s);let l=dm(),a=dm(),c=dm();fc(i,e.domain,l),fc(i,e.scheme,a),fc(i,e.slashscheme,c),fc(l,o,s),fc(l,e.domain,l);let u=fh(l,"AT");fh(s,"AT",u),fh(a,"AT",u),fh(c,"AT",u);let p=fh(s,"DOT");fc(p,o,s),fc(p,e.domain,s);let h=dm();fc(u,e.domain,h),fc(h,e.domain,h);let f=fh(h,"DOT");fc(f,e.domain,h);let d=dm(dp);fc(f,e.tld,d),fc(f,e.utld,d),fh(u,fm,d);let m=fh(h,fH);fc(m,e.domain,h),fc(d,e.domain,h),fh(d,"DOT",f),fh(d,fH,m),fc(fh(d,fL),e.numeric,dp);let g=fh(l,fH),y=fh(l,"DOT");fc(g,e.domain,l),fc(y,o,s),fc(y,e.domain,l);let b=dm(dd);fc(y,e.tld,b),fc(y,e.utld,b),fc(b,e.domain,l),fc(b,o,s),fh(b,"DOT",y),fh(b,fH,g),fh(b,"AT",u);let v=fh(b,fL),w=dm(dd);fc(v,e.numeric,w);let S=dm(dd),x=dm();fc(S,n,S),fc(S,r,x),fc(x,n,S),fc(x,r,x),fh(b,f0,S),fh(w,f0,S);let k=fh(a,fL),O=fh(c,fL),C=fh(O,f0),A=fh(C,f0);fc(a,e.domain,l),fh(a,"DOT",y),fh(a,fH,g),fc(c,e.domain,l),fh(c,"DOT",y),fh(c,fH,g),fc(k,e.domain,S),fh(k,f0,S),fc(A,e.domain,S),fc(A,n,S),fh(A,f0,S);let M=[[fv,fw],[fS,fx],[fk,fO],[fC,fA],[fM,fN],[fE,fT],[fD,fR],[fj,fI]];for(let t=0;t<M.length;t++){let[e,o]=M[t],i=fh(S,e);fh(x,e,i),fh(i,o,S);let s=dm(dd);fc(i,n,s);let l=dm();fc(i,r),fc(s,n,s),fc(s,r,l),fc(l,n,s),fc(l,r,l),fh(s,o,S),fh(l,o,S)}return fh(i,fm,b),fh(i,"NL",df),{start:i,tokens:f5}}(db.scanner.tokens);for(let t=0;t<db.pluginQueue.length;t++)db.pluginQueue[t][1]({scanner:db.scanner,parser:db.parser});db.initialized=!0}(),function(t,e,n){let r=n.length,o=0,i=[],s=[];for(;o<r;){let l=t,a=null,c=null,u=0,p=null,h=-1;for(;o<r&&!(a=l.go(n[o].t));)s.push(n[o++]);for(;o<r&&(c=a||l.go(n[o].t));
17)a=null,(l=c).accepts()?(h=0,p=l):h>=0&&h++,o++,u++;if(h<0)(o-=u)<r&&(s.push(n[o]),o++);else{s.length>0&&(i.push(dg(dh,e,s)),s=[]),o-=h,u-=h;let t=p.t,r=n.slice(o-u,o);i.push(dg(t,e,r))}}return s.length>0&&i.push(dg(dh,e,s)),i}(db.parser.start,t,function(t,e){let n=function(t){let e=[],n=t.length,r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,t=>t.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s<r;){let l=t,a=null,c=0,u=null,p=-1,h=-1;for(;s<r&&(a=l.go(n[s]));)(l=a).accepts()?(p=0,h=0,u=l):p>=0&&(p+=n[s].length,h++),c+=n[s].length,i+=n[s].length,s++;i-=p,s-=h,c-=p,o.push({t:u.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}(db.scanner.start,t))}function dx(t,e,n){if(void 0===e&&(e=null),void 0===n&&(n=null),e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new dl(n),o=dS(t),i=[];for(let t=0;t<o.length;t++){let n=o[t];n.isLink&&(!e||n.t===e)&&r.check(n)&&i.push(n.toFormattedObject(r))}return i}var dk=function(){};dk.prototype.append=function(t){return t.length?(t=dk.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},dk.prototype.prepend=function(t){return t.length?dk.from(t).append(this):this},dk.prototype.appendInner=function(t){return new dC(this,t)},dk.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?dk.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},dk.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},dk.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)},dk.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},dk.from=function(t){return t instanceof dk?t:t&&t.length?new dO(t):dk.empty};var dO=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 o=e;o<n;o++)if(!1===t(this.values[o],r+o))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var o=e-1;o>=n;o--)if(!1===t(this.values[o],r+o))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}(dk);dk.empty=new dO([]);var dC=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 o=this.left.length;if(e<o&&!1===this.left.forEachInner(t,e,Math.min(n,o),r)||n>o&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;if(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o)||n<o&&!1===this.left.forEachInvertedInner(t,Math.min(e,o),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}(dk);class dA{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){let n,r;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 i=t.tr,s,l,a=[],c=[];
17return this.items.forEach((t,e)=>{if(!t.step){n||(r=(n=this.remapping(o,e+1)).maps.length),r--,c.push(t);return}if(n){c.push(new dM(t.map));let e=t.step.map(n.slice(r)),o;e&&i.maybeStep(e).doc&&(o=i.mapping.maps[i.mapping.maps.length-1],a.push(new dM(o,void 0,void 0,a.length+c.length))),r--,o&&n.appendMap(o,r)}else i.maybeStep(t.step);if(t.selection)return s=n?t.selection.map(n.slice(r)):t.selection,l=new dA(this.items.slice(0,o).append(c.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:s}}addTransform(t,e,n,r){var o,i;let s,l=[],a=this.eventCount,c=this.items,u=!r&&c.length?c.get(c.length-1):null;for(let n=0;n<t.steps.length;n++){let o=t.steps[n].invert(t.docs[n]),i=new dM(t.mapping.maps[n],o,e),s;(s=u&&u.merge(i))&&(i=s,n?l.pop():c=c.slice(0,c.length-1)),l.push(i),e&&(a++,e=void 0),r||(u=i)}let p=a-n.depth;return p>dE&&(o=c,i=p,o.forEach((t,e)=>{if(t.selection&&0==i--)return s=e,!1}),c=o.slice(s),a-=p),new dA(c.append(l),a)}remapping(t,e){let n=new tv;return this.items.forEach((e,r)=>{let o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,o)},t,e),n}addMaps(t){return 0==this.eventCount?this:new dA(this.items.append(t.map(t=>new dM(t))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach(t=>{t.selection&&s--},r);let l=e;this.items.forEach(e=>{let r=o.getMirror(--l);if(null==r)return;i=Math.min(i,r);let a=o.maps[r];if(e.step){let i=t.steps[r].invert(t.docs[r]),c=e.selection&&e.selection.map(o.slice(l+1,r));c&&s++,n.push(new dM(a,i,c))}else n.push(new dM(a))},r);let a=[];for(let t=e;t<i;t++)a.push(new dM(o.maps[t]));let c=new dA(this.items.slice(0,r).append(a).append(n),s);return c.emptyItemCount()>500&&(c=c.compress(this.items.length-n.length)),c}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=[],o=0;return this.items.forEach((i,s)=>{if(s>=t)r.push(i),i.selection&&o++;else if(i.step){let t=i.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let l=i.selection&&i.selection.map(e.slice(n));l&&o++;let a=new dM(s.invert(),t,l),c,u=r.length-1;(c=r.length&&r[u].merge(a))?r[u]=c:r.push(a)}}else i.map&&n--},this.items.length,0),new dA(dk.from(r.reverse()),o)}}dA.empty=new dA(dk.empty,0);class dM{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 dM(e.getMap().invert(),e,this.selection)}}}class dN{constructor(t,e,n,r,o){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}let dE=20;function dT(t){let e=[];for(let n=t.length-1;n>=0&&0==e.length;n--)t[n].forEach((t,n,r,o)=>e.push(r,o));return e}function dD(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}let dR=!1,dj=null;function dI(t){let e=t.plugins;if(dj!=e){dR=!1,dj=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){dR=!0;break}}return dR}let dP=new eu("history"),dz=new eu("closeHistory");function d$(t={}){return new el({key:dP,state:{init:()=>new dN(dA.empty,dA.empty,null,0,-1),apply:(e,n,r)=>(function(t,e,n,r){let o=n.getMeta(dP),i;if(o)return o.historyState;n.getMeta(dz)&&(t=new dN(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(dP))return s.getMeta(dP).redo?new dN(t.done.addTransform(n,void 0,r,dI(e)),t.undone,dT(n.mapping.maps),t.prevTime,t.prevComposition):new dN(t.done,t.undone.addTransform(n,void 0,r,dI(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new dN(t.done.rebased(n,i),t.undone.rebased(n,i),dD(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new dN(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),dD(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let o=n.getMeta("composition"),i=0==t.prevTime||!s&&t.prevComposition!=o&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;
17return t.mapping.maps[0].forEach((t,r)=>{for(let o=0;o<e.length;o+=2)t<=e[o+1]&&r>=e[o]&&(n=!0)}),n}(n,t.prevRanges)),l=s?dD(t.prevRanges,n.mapping):dT(n.mapping.maps);return new dN(t.done.addTransform(n,i?e.selection.getBookmark():void 0,r,dI(e)),dA.empty,l,n.time,o??t.prevComposition)}})(n,r,e,t)},config:t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?dB:"historyRedo"==n?dF:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}function d_(t,e){return(n,r)=>{let o=dP.getState(n);if(!o||0==(t?o.undone:o.done).eventCount)return!1;if(r){let i=function(t,e,n){let r=dI(e),o=dP.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),l=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),a=new dN(n?l:i.remaining,n?i.remaining:l,null,0,-1);return i.transform.setSelection(s).setMeta(dP,{redo:n,historyState:a})}(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}let dB=d_(!1,!0),dF=d_(!0,!0);function dL(t={}){return new el({view:e=>new dV(e,t)})}class dV{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,o;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(),i=t?r.bottom:r.top;t&&e&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),o={left:r.left,right:r.right,top:i-this.width/2,bottom:i+this.width/2}}}}if(!o){let t=this.editorView.coordsAtPos(this.cursorPos);o={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),i&&(i!=document.body||"static"!=getComputedStyle(i).position)){let n=i.getBoundingClientRect();t=n.left-i.scrollLeft,e=n.top-i.scrollTop}else t=-pageXOffset,e=-pageYOffset;this.element.style.left=o.left-t+"px",this.element.style.top=o.top-e+"px",this.element.style.width=o.right-o.left+"px",this.element.style.height=o.bottom-o.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,e,t):r;if(e&&!o){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=tB(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}class dW extends tZ{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return dW.valid(n)?new dW(n):tZ.near(n)}content(){return M.empty}eq(t){return t instanceof dW&&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 dW(t.resolve(e.pos))}getBookmark(){return new dq(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let t=r.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;
17if(t.inlineContent)return!1}}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let t=r.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}}return!0}(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&dW.valid(t))return t;let r=t.pos,o=null;for(let n=t.depth;;n--){let i=t.node(n);if(e>0?t.indexAfter(n)<i.childCount:t.index(n)>0){o=i.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let s=t.doc.resolve(r);if(dW.valid(s))return s}for(;;){let i=e>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!t4.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*e),n=!1;continue t}break}o=i,r+=e;let s=t.doc.resolve(r);if(dW.valid(s))return s}return null}}}dW.prototype.visible=!1,dW.findFrom=dW.findGapCursorFrom,tZ.jsonID("gapcursor",dW);class dq{constructor(t){this.pos=t}map(t){return new dq(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return dW.valid(e)?new dW(e):tZ.near(e)}}function dU(){return new el({props:{decorations:dY,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&dW.valid(n)?new dW(n):null,handleClick:dK,handleKeyDown:dH,handleDOMEvents:{beforeinput
17:dG}}})}let dH=rY({ArrowLeft:dJ("horiz",-1),ArrowRight:dJ("horiz",1),ArrowUp:dJ("vert",-1),ArrowDown:dJ("vert",1)});function dJ(t,e){let n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,o){let i=t.selection,s=e>0?i.$to:i.$from,l=i.empty;if(i instanceof t3){if(!o.endOfTextblock(n)||0==s.depth)return!1;l=!1,s=t.doc.resolve(e>0?s.after():s.before())}let a=dW.findGapCursorFrom(s,e,l);return!!a&&(r&&r(t.tr.setSelection(new dW(a))),!0)}}function dK(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!dW.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&t4.isSelectable(t.state.doc.nodeAt(o.inside)))&&(t.dispatch(t.state.tr.setSelection(new dW(r))),!0)}function dG(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof dW))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 o=S.empty;for(let t=r.length-1;t>=0;t--)o=S.from(r[t].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new M(o,0,0));return i.setSelection(t3.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function dY(t){if(!(t.selection instanceof dW))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",rh.create(t.doc,[rc.widget(t.selection.head,e,{key:"gapcursor"})])}if("u">typeof WeakMap){let t=new WeakMap;m=e=>t.get(e),g=(e,n)=>(t.set(e,n),n)}else{let t=[],e=0;m=e=>{for(let n=0;n<t.length;n+=2)if(t[n]==e)return t[n+1]},g=(n,r)=>(10==e&&(e=0),t[e++]=n,t[e++]=r)}var dX=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){let n=this.map[e];if(n!=t)continue;let r=e%this.width,o=e/this.width|0,i=r+1,s=o+1;for(let t=1;i<this.width&&this.map[e+t]==n;t++)i++;for(let t=1;s<this.height&&this.map[e+this.width*t]==n;t++)s++;return{left:r,top:o,right:i,bottom:s}}throw RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){let{left:r,right:o,top:i,bottom:s}=this.findCell(t);return"horiz"==e?(n<0?0==r:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?0==i:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(t,e){let{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:s,right:l,top:a,bottom:c}=this.findCell(e);return{left:Math.min(n,s),top:Math.min(o,a),right:Math.max(r,l),bottom:Math.max(i,c)}}cellsInRect(t){let e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){let i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,o==t.left&&o&&this.map[i-1]==s||r==t.top&&r&&this.map[i-this.width]==s||e.push(s))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){let i=o+n.child(r).nodeSize;if(r==t){let n=e+t*this.width,r=(t+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?i-1:this.map[n]}o=i}}static get(t){return m(t)||g(t,function(t){if("table"!=t.type.spec.tableRole)throw RangeError("Not a table node: "+t.type.name);let e=function(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){let o=t.child(r),i=0;if(n)for(let e=0;e<r;e++){let n=t.child(e);for(let t=0;t<n.childCount;t++){let o=n.child(t);e+o.attrs.rowspan>r&&(i+=o.attrs.colspan)}}for(let t=0;t<o.childCount;t++){let e=o.child(t);i+=e.attrs.colspan,e.attrs.rowspan>1&&(n=!0)}-1==e?e=i:e!=i&&(e=Math.max(e,i))}return e}(t),n=t.childCount,r=[],o=0,i=null,s=[];for(let t=0,o=e*n;t<o;t++)r[t]=0;for(let l=0,a=0;l<n;l++){let c=t.child(l);a++;for(let t=0;;t++){for(;o<r.length&&0!=r[o];)o++;if(t==c.childCount)break;let u=c.child(t),{colspan:p,rowspan:h,colwidth:f}=u.attrs;for(let t=0;t<h;t++){if(t+l>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:a,n:h-t});break}let c=o+t*e;for(let t=0;t<p;t++){0==r[c+t]?r[c+t]=a:(i||(i=[])).push({type:"collision",row:l,pos:a,n:p-t});let n=f&&f[t];if(n){let r=(c+t)%e*2,o=s[r];null==o||o!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):o==n&&s[r+1]++}}}o+=p,a+=u.nodeSize}let u=(l+1)*e,p=0;for(;o<u;)0==r[o++]&&p++;p&&(i||(i=[])).push({type:"missing",row:l,n:p}),a++}let l=new dX(e,n,r,i),a=!1;for(let t=0;!a&&t<s.length;t+=2)null!=s[t]&&s[t+1]<n&&(a=!0);return a&&function(t,e,n){t.problems||(t.problems=[]);let r={};for(let o=0;o<t.map.length;o++){let i=t.map[o];if(r[i])continue;
17r[i]=!0;let s=n.nodeAt(i);if(!s)throw RangeError(`No cell with offset ${i} found`);let l=null,a=s.attrs;for(let n=0;n<a.colspan;n++){let r=e[(o+n)%t.width*2];null==r||a.colwidth&&a.colwidth[n]==r||((l||(l=function(t){if(t.colwidth)return t.colwidth.slice();let e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}(a)))[n]=r)}l&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:l})}}(l,s,t),l}(t))}};function dQ(t){let e=t.cached.tableNodeTypes;if(!e)for(let n in e=t.cached.tableNodeTypes={},t.nodes){let r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}return e}var dZ=new eu("selectingCells");function d0(t){for(let e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function d1(t){let e=t.selection.$head;for(let t=e.depth;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return!0;return!1}function d2(t){let e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;let n=d0(e.$head)||function(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){let r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){let r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n-e.nodeSize)}}(e.$head);if(n)return n;throw RangeError(`No cell found around position ${e.head}`)}function d3(t){return"row"==t.parent.type.spec.tableRole&&!!t.nodeAfter}function d5(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function d4(t,e,n){let r=t.node(-1),o=dX.get(r),i=t.start(-1),s=o.nextCell(t.pos-i,e,n);return null==s?null:t.node(0).resolve(i+s)}function d6(t,e,n=1){let r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(t=>t>0)||(r.colwidth=null)),r}function d8(t,e,n=1){let r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let t=0;t<n;t++)r.colwidth.splice(e,0,0)}return r}var d9=class t extends tZ{constructor(t,e=t){let n=t.node(-1),r=dX.get(n),o=t.start(-1),i=r.rectBetween(t.pos-o,e.pos-o),s=t.node(0),l=r.cellsInRect(i).filter(t=>t!=e.pos-o);l.unshift(e.pos-o);let a=l.map(t=>{let e=n.nodeAt(t);if(!e)throw RangeError(`No cell with offset ${t} found`);let r=o+t+1;return new t0(s.resolve(r),s.resolve(r+e.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=e}map(e,n){let r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(d3(r)&&d3(o)&&d5(r,o)){let e=this.$anchorCell.node(-1)!=r.node(-1);return e&&this.isRowSelection()?t.rowSelection(r,o):e&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return t3.between(r,o)}content(){let t=this.$anchorCell.node(-1),e=dX.get(t),n=this.$anchorCell.start(-1),r=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[];for(let n=r.top;n<r.bottom;n++){let s=[];for(let i=n*e.width+r.left,l=r.left;l<r.right;l++,i++){let n=e.map[i];if(o[n])continue;o[n]=!0;let l=e.findCell(n),a=t.nodeAt(n);if(!a)throw RangeError(`No cell with offset ${n} found`);let c=r.left-l.left,u=l.right-r.right;if(c>0||u>0){let t=a.attrs;if(c>0&&(t=d6(t,0,c)),u>0&&(t=d6(t,t.colspan-u,u)),l.left<r.left){if(!(a=a.type.createAndFill(t)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(t)}`)}else a=a.type.create(t,a.content)}if(l.top<r.top||l.bottom>r.bottom){let t={...a.attrs,rowspan:Math.min(l.bottom,r.bottom)-Math.max(l.top,r.top)};a=l.top<r.top?a.type.createAndFill(t):a.type.create(t,a.content)}s.push(a)}i.push(t.child(n).copy(S.from(s)))}let s=this.isColSelection()&&this.isRowSelection()?t:i;return new M(S.from(s),1,1)}replace(t,e=M.empty){let n=t.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],l=t.mapping.slice(n);t.replace(l.map(i.pos),l.map(s.pos),o?M.empty:e)}let o=tZ.findFrom(t.doc.resolve(t.mapping.slice(n).map(this.to)),-1);o&&t.setSelection(o)}replaceWith(t,e){this.replace(t,new M(S.from(e),0,0))}forEachCell(t){let e=this.$anchorCell.node(-1),n=dX.get(e),r=this.$anchorCell.start(-1),o=n.cells
17InRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<o.length;n++)t(e.nodeAt(o[n]),r+o[n])}isColSelection(){let t=this.$anchorCell.index(-1),e=this.$headCell.index(-1);return!(Math.min(t,e)>0)&&Math.max(t+this.$anchorCell.nodeAfter.attrs.rowspan,e+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){let r=e.node(-1),o=dX.get(r),i=e.start(-1),s=o.findCell(e.pos-i),l=o.findCell(n.pos-i),a=e.node(0);return s.top<=l.top?(s.top>0&&(e=a.resolve(i+o.map[s.left])),l.bottom<o.height&&(n=a.resolve(i+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=a.resolve(i+o.map[l.left])),s.bottom<o.height&&(e=a.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))),new t(e,n)}isRowSelection(){let t=this.$anchorCell.node(-1),e=dX.get(t),n=this.$anchorCell.start(-1),r=e.colCount(this.$anchorCell.pos-n),o=e.colCount(this.$headCell.pos-n);return!(Math.min(r,o)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.colspan,o+this.$headCell.nodeAfter.attrs.colspan)==e.width}eq(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){let r=e.node(-1),o=dX.get(r),i=e.start(-1),s=o.findCell(e.pos-i),l=o.findCell(n.pos-i),a=e.node(0);return s.left<=l.left?(s.left>0&&(e=a.resolve(i+o.map[s.top*o.width])),l.right<o.width&&(n=a.resolve(i+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=a.resolve(i+o.map[l.top*o.width])),s.right<o.width&&(e=a.resolve(i+o.map[o.width*(s.top+1)-1]))),new t(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new t(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new t(e.resolve(n),e.resolve(r))}getBookmark(){return new d7(this.$anchorCell.pos,this.$headCell.pos)}};d9.prototype.visible=!1,tZ.jsonID("cell",d9);var d7=class t{constructor(t,e){this.anchor=t,this.head=e}map(e){return new t(e.map(this.anchor),e.map(this.head))}resolve(t){let e=t.resolve(this.anchor),n=t.resolve(this.head);return"row"==e.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&e.index()<e.parent.childCount&&n.index()<n.parent.childCount&&d5(e,n)?new d9(e,n):tZ.near(n,1)}};function mt(t){if(!(t.selection instanceof d9))return null;let e=[];return t.selection.forEachCell((t,n)=>{e.push(rc.node(n,n+t.nodeSize,{class:"selectedCell"}))}),rh.create(t.doc,e)}var me=new eu("fix-tables");function mn(t,e){let n;let r=(e,r)=>{"table"==e.type.spec.tableRole&&(n=function(t,e,n,r){let o,i;let s=dX.get(e);if(!s.problems)return r;r||(r=t.tr);let l=[];for(let t=0;t<s.height;t++)l.push(0);for(let t=0;t<s.problems.length;t++){let o=s.problems[t];if("collision"==o.type){let t=e.nodeAt(o.pos);if(!t)continue;let i=t.attrs;for(let t=0;t<i.rowspan;t++)l[o.row+t]+=o.n;
17r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,d6(i,i.colspan-o.n,o.n))}else if("missing"==o.type)l[o.row]+=o.n;else if("overlong_rowspan"==o.type){let t=e.nodeAt(o.pos);if(!t)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...t.attrs,rowspan:t.attrs.rowspan-o.n})}else if("colwidth mismatch"==o.type){let t=e.nodeAt(o.pos);if(!t)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...t.attrs,colwidth:o.colwidth})}}for(let t=0;t<l.length;t++)l[t]&&(null==o&&(o=t),i=t);for(let a=0,c=n+1;a<s.height;a++){let n=e.child(a),s=c+n.nodeSize,u=l[a];if(u>0){let e="cell";n.firstChild&&(e=n.firstChild.type.spec.tableRole);let l=[];for(let n=0;n<u;n++){let n=dQ(t.schema)[e].createAndFill();n&&l.push(n)}let p=(0==a||o==a-1)&&i==a?c+1:s-1;r.insert(r.mapping.map(p),l)}c=s}return r.setMeta(me,{fixTables:!0})}(t,e,r,n))};return e?e.doc!=t.doc&&function t(e,n,r,o){let i=e.childCount,s=n.childCount;t:for(let l=0,a=0;l<s;l++){let s=n.child(l);for(let t=a,n=Math.min(i,l+3);t<n;t++)if(e.child(t)==s){a=t+1,r+=s.nodeSize;continue t}o(s,r),a<i&&e.child(a).sameMarkup(s)?t(e.child(a),s,r+1,o):s.nodesBetween(0,s.content.size,o,r+1),r+=s.nodeSize}}(e.doc,t.doc,0,r):t.doc.descendants(r),n}function mr(t,e){let n=t.createAndFill();return new tX(n).replace(0,n.content.size,e).doc}function mo(t,e,n,r,o,i,s,l){if(0==s||s==e.height)return!1;let a=!1;for(let c=o;c<i;c++){let o=s*e.width+c,i=e.map[o];if(e.map[o-e.width]==i){a=!0;let o=n.nodeAt(i),{top:u,left:p}=e.findCell(i);t.setNodeMarkup(t.mapping.slice(l).map(i+r),null,{...o.attrs,rowspan:s-u}),t.insert(t.mapping.slice(l).map(e.positionAt(s,p,n)),o.type.createAndFill({...o.attrs,rowspan:u+o.attrs.rowspan-s})),c+=o.attrs.colspan-1}}return a}function mi(t,e,n,r,o,i,s,l){if(0==s||s==e.width)return!1;let a=!1;for(let c=o;c<i;c++){let o=c*e.width+s,i=e.map[o];if(e.map[o-1]==i){a=!0;let o=n.nodeAt(i),u=e.colCount(i),p=t.mapping.slice(l).map(i+r);t.setNodeMarkup(p,null,d6(o.attrs,s-u,o.attrs.colspan-(s-u))),t.insert(p+o.nodeSize,o.type.createAndFill(d6(o.attrs,0,s-u))),c+=o.attrs.rowspan-1}}return a}function ms(t,e,n,r,o){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw Error("No table found");let s=dX.get(i),{top:l,left:a}=r,c=a+o.width,u=l+o.height,p=t.tr,h=0;function f(){if(!(i=n?p.doc.nodeAt(n-1):p.doc))throw Error("No table found");s=dX.get(i),h=p.mapping.maps.length}(function(t,e,n,r,o,i,s){let l,a;let c=dQ(t.doc.type.schema);if(o>e.width)for(let i=0,s=0;i<e.height;i++){let u;let p=n.child(i);s+=p.nodeSize;let h=[];u=null==p.lastChild||p.lastChild.type==c.cell?l||(l=c.cell.createAndFill()):a||(a=c.header_cell.createAndFill());for(let t=e.width;t<o;t++)h.push(u);t.insert(t.mapping.slice(0).map(s-1+r),h)}if(i>e.height){let s=[];for(let t=0,r=(e.height-1)*e.width;t<Math.max(e.width,o);t++){let o=!(t>=e.width)&&n.nodeAt(e.map[r+t]).type==c.header_cell;s.push(o?a||(a=c.header_cell.createAndFill()):l||(l=c.cell.createAndFill()))}let u=c.row.create(null,S.from(s)),p=[];for(let t=e.height;t<i;t++)p.push(u);t.insert(t.mapping.slice(0).map(r+n.nodeSize-2),p)}return!!(l||a)})(p,s,i,n,c,u,0)&&f(),mo(p,s,i,n,a,c,l,h)&&f(),mo(p,s,i,n,a,c,u,h)&&f(),mi(p,s,i,n,l,u,a,h)&&f(),mi(p,s,i,n,l,u,c,h)&&f();for(let t=l;t<u;t++){let e=s.positionAt(t,a,i),r=s.positionAt(t,c,i);p.replace(p.mapping.slice(h).map(e+n),p.mapping.slice(h).map(r+n),new M(o.rows[t-l],0,0))}f(),p.setSelection(new d9(p.doc.resolve(n+s.positionAt(l,a,i)),p.doc.resolve(n+s.positionAt(u-1,c-1,i)))),e(p)}var ml=rY({ArrowLeft:mc("horiz",-1),ArrowRight:mc("horiz",1),ArrowUp:mc("vert",-1),ArrowDown:mc("vert",1),"Shift-ArrowLeft":mu("horiz",-1),"Shift-ArrowRight":mu("horiz",1),"Shift-ArrowUp":mu("vert",
17-1),"Shift-ArrowDown":mu("vert",1),Backspace:mp,"Mod-Backspace":mp,Delete:mp,"Mod-Delete":mp});function ma(t,e,n){return!n.eq(t.selection)&&(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function mc(t,e){return(n,r,o)=>{if(!o)return!1;let i=n.selection;if(i instanceof d9)return ma(n,r,tZ.near(i.$headCell,e));if("horiz"!=t&&!i.empty)return!1;let s=mm(o,t,e);if(null==s)return!1;if("horiz"==t)return ma(n,r,tZ.near(n.doc.resolve(i.head+e),e));{let o;let i=n.doc.resolve(s),l=d4(i,t,e);return o=l?tZ.near(l,1):e<0?tZ.near(n.doc.resolve(i.before(-1)),-1):tZ.near(n.doc.resolve(i.after(-1)),1),ma(n,r,o)}}}function mu(t,e){return(n,r,o)=>{let i;if(!o)return!1;let s=n.selection;if(s instanceof d9)i=s;else{let r=mm(o,t,e);if(null==r)return!1;i=new d9(n.doc.resolve(r))}let l=d4(i.$headCell,t,e);return!!l&&ma(n,r,new d9(i.$anchorCell,l))}}function mp(t,e){let n=t.selection;if(!(n instanceof d9))return!1;if(e){let r=t.tr,o=dQ(t.schema).cell.createAndFill().content;n.forEachCell((t,e)=>{t.content.eq(o)||r.replace(r.mapping.map(e+1),r.mapping.map(e+t.nodeSize-1),new M(o,0,0))}),r.docChanged&&e(r)}return!0}function mh(t,e){let n=d0(t.state.doc.resolve(e));return!!n&&(t.dispatch(t.state.tr.setSelection(new d9(n))),!0)}function mf(t,e,n){if(!d1(t.state))return!1;let r=function(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;1==e.childCount&&(n>0&&r>0||"table"==e.child(0).type.spec.tableRole);)n--,r--,e=e.child(0).content;let o=e.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if("row"==i)for(let t=0;t<e.childCount;t++){let o=e.child(t).content,i=t?0:Math.max(0,n-1),a=t<e.childCount-1?0:Math.max(0,r-1);(i||a)&&(o=mr(dQ(s).row,new M(o,i,a)).content),l.push(o)}else{if("cell"!=i&&"header_cell"!=i)return null;l.push(n||r?mr(dQ(s).row,new M(e,n,r)).content:e)}return function(t,e){let n=[];for(let t=0;t<e.length;t++){let r=e[t];for(let e=r.childCount-1;e>=0;e--){let{rowspan:o,colspan:i}=r.child(e).attrs;for(let e=t;e<t+o;e++)n[e]=(n[e]||0)+i}}let r=0;for(let t=0;t<n.length;t++)r=Math.max(r,n[t]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(S.empty),n[o]<r){let i=dQ(t).cell.createAndFill(),s=[];for(let t=n[o];t<r;t++)s.push(i);e[o]=e[o].append(S.from(s))}return{height:e.length,width:r,rows:e}}(s,l)}(n),o=t.state.selection;if(o instanceof d9){r||(r={width:1,height:1,rows:[S.from(mr(dQ(t.state.schema).cell,n))]});let e=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),s=dX.get(e).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=function({width:t,height:e,rows:n},r,o){if(t!=r){let e=[],o=[];for(let t=0;t<n.length;t++){let i=n[t],s=[];for(let n=e[t]||0,o=0;n<r;o++){let l=i.child(o%i.childCount);n+l.attrs.colspan>r&&(l=l.type.createChecked(d6(l.attrs,l.attrs.colspan,n+l.attrs.colspan-r),l.content)),s.push(l),n+=l.attrs.colspan;for(let n=1;n<l.attrs.rowspan;n++)e[t+n]=(e[t+n]||0)+l.attrs.colspan}o.push(S.from(s))}n=o,t=r}if(e!=o){let t=[];for(let r=0,i=0;r<o;r++,i++){let s=[],l=n[i%e];for(let t=0;t<l.childCount;t++){let e=l.child(t);r+e.attrs.rowspan>o&&(e=e.type.create({...e.attrs,rowspan:Math.max(1,o-e.attrs.rowspan)},e.content)),s.push(e)}t.push(S.from(s))}n=t,e=o}return{width:t,height:e,rows:n}}(r,s.right-s.left,s.bottom-s.top),ms(t.state,t.dispatch,i,s,r),!0}if(!r)return!1;{let e=d2(t.state),n=e.start(-1);return ms(t.state,t.dispatch,n,dX.get(e.node(-1)).findCell(e.pos-n),r),!0}}function md(t,e){var n;let r;if(e.ctrlKey||e.metaKey)return;let o=mg(t,e.target);if(e.shiftKey&&t.state.selection instanceof d9)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&o&&null!=(r=d0(t.state.selection.$anchor))&&(null==(n=my(t,e))?void 0:n.pos)!=r.pos)i(r,e),e.preventDefault();else if(!o)return;function i(e,n){let r=my(t,n),o=null==dZ.getState(t.state);if(!r||!d5(e,r)){if(!o)return;r=e}let i=new d9(e,r);if(o||!t.state.selection.eq(i)){let n=t.state.tr.setSelection(i);o&&n.setMeta(dZ,e.pos),t.dispatch(n)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",l),null!=dZ.getState(t.state)&&t.dispatch(t.state.tr.setMeta(dZ,-1))}function l(n){let r;let l=dZ.getState(t.state);if(null!=l)r=t.state.doc.resolve(l);else if(mg(t,n.target)!=o&&!(r=my(t,e)))return s();r&&i(r,n)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",l)}function mm(t,e,n){if(!(t.state.selection instanceof t3))return null;let{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;
17o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))break;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){let i=r.before(o),s="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(s)?i:null}}return null}function mg(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function my(t,e){let n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?d0(t.state.doc.resolve(n.pos)):null}var mb=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),mv(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type==this.node.type&&(this.node=t,mv(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}};function mv(t,e,n,r,o,i){var s;let l=0,a=!0,c=e.firstChild,u=t.firstChild;if(u){for(let t=0,n=0;t<u.childCount;t++){let{colspan:s,colwidth:p}=u.child(t).attrs;for(let t=0;t<s;t++,n++){let s=o==n?i:p&&p[t],u=s?s+"px":"";l+=s||r,s||(a=!1),c?(c.style.width!=u&&(c.style.width=u),c=c.nextSibling):e.appendChild(document.createElement("col")).style.width=u}}for(;c;){let t=c.nextSibling;null==(s=c.parentNode)||s.removeChild(c),c=t}a?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var mw=new eu("tableColumnResizing");function mS({handleWidth:t=5,cellMinWidth:e=25,View:n=mb,lastColumnResizable:r=!0}={}){let o=new el({key:mw,state:{init(t,r){var i,s;let l=null==(s=null==(i=o.spec)?void 0:i.props)?void 0:s.nodeViews,a=dQ(r.schema).table.name;return n&&l&&(l[a]=(t,r)=>new n(t,e,r)),new mx(-1,!1)},apply:(t,e)=>e.apply(t)},props:{attributes:t=>{let e=mw.getState(t);return e&&e.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(e,n)=>{!function(t,e,n,r,o){let i=mw.getState(t.state);if(i&&!i.dragging){let r=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target),s=-1;if(r){let{left:o,right:i}=r.getBoundingClientRect();e.clientX-o<=n?s=mk(t,e,"left",n):i-e.clientX<=n&&(s=mk(t,e,"right",n))}if(s!=i.activeHandle){if(!o&&-1!==s){let e=t.state.doc.resolve(s),n=e.node(-1),r=dX.get(n),o=e.start(-1);if(r.colCount(e.pos-o)+e.nodeAfter.attrs.colspan-1==r.width-1)return}mC(t,s)}}}(e,n,t,0,r)},mouseleave:t=>{!function(t){let e=mw.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&mC(t,-1)}(t)},mousedown:(t,n)=>{!function(t,e,n){var r;let o=null!=(r=t.dom.ownerDocument.defaultView)?r:window,i=mw.getState(t.state);if(!i||-1==i.activeHandle||i.dragging)return;let s=t.state.doc.nodeAt(i.activeHandle),l=function(t,e,{colspan:n,colwidth:r}){let o=r&&r[r.length-1];if(o)return o;let i=t.domAtPos(e),s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let t=0;t<n;t++)r[t]&&(s-=r[t],l--);return s/l}(t,i.activeHandle,s.attrs);function a(e){o.removeEventListener("mouseup",a),o.removeEventListener("mousemove",c);let r=mw.getState(t.state);null!=r&&r.dragging&&(function(t,e,n){let r=t.state.doc.resolve(e),o=r.node(-1),i=dX.get(o),s=r.start(-1),l=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,a=t.state.tr;for(let t=0;t<i.height;t++){let e=t*i.width+l;if(t&&i.map[e]==i.map[e-i.width])continue;let r=i.map[e],c=o.nodeAt(r).attrs,u=1==c.colspan?0:l-i.colCount(r);if(c.colwidth&&c.colwidth[u]==n)continue;let p=c.colwidth?c.colwidth.slice():Array(c.colspan).fill(0);p[u]=n,a.setNodeMarkup(s+r,null,{...c,colwidth:p})}a.docChanged&&t.dispatch(a)}(t,r.activeHandle,mO(r.dragging,e,n)),t.dispatch(t.state.tr.setMeta(mw,{setDragging:null})))}function c(e){if(!e.which)return a(e);let r=mw.getState(t.state);if(r&&r.dragging){let o=mO(r.dragging,e,n);!function(t,e,n,r){let o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),l=dX.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,a=t.domAtPos(o.start(-1)).node;for(;a&&"TABLE"!=a.nodeName;)a=a.parentNode;a&&mv(i,a.firstChild,a,r,l,n)}(t,r.activeHandle,o,n)}}t.dispatch(t.state.tr.setMeta(mw,{setDragging:{startX:e.clientX,startWidth:l}})),o.addEventListener("mouseup",a),o.addEventListener("mousemove",c),e.preventDefault()}
17(t,n,e)}},decorations:t=>{let e=mw.getState(t);if(e&&e.activeHandle>-1)return function(t,e){let n=[],r=t.doc.resolve(e),o=r.node(-1);if(!o)return rh.empty;let i=dX.get(o),s=r.start(-1),l=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<i.height;t++){let e=l+t*i.width;if((l==i.width-1||i.map[e]!=i.map[e+1])&&(0==t||i.map[e]!=i.map[e-i.width])){let t=i.map[e],r=s+t+o.nodeAt(t).nodeSize-1,l=document.createElement("div");l.className="column-resize-handle",n.push(rc.widget(r,l))}}return rh.create(t.doc,n)}(t,e.activeHandle)},nodeViews:{}}});return o}var mx=class t{constructor(t,e){this.activeHandle=t,this.dragging=e}apply(e){let n=e.getMeta(mw);if(n&&null!=n.setHandle)return new t(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new t(this.activeHandle,n.setDragging);if(this.activeHandle>-1&&e.docChanged){let n=e.mapping.map(this.activeHandle,-1);return d3(e.doc.resolve(n))||(n=-1),new t(n,this.dragging)}return this}};function mk(t,e,n,r){let o=t.posAtCoords({left:e.clientX+("right"==n?-r:r),top:e.clientY});if(!o)return -1;let{pos:i}=o,s=d0(t.state.doc.resolve(i));if(!s)return -1;if("right"==n)return s.pos;let l=dX.get(s.node(-1)),a=s.start(-1),c=l.map.indexOf(s.pos-a);return c%l.width==0?-1:a+l.map[c-1]}function mO(t,e,n){let r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function mC(t,e){t.dispatch(t.state.tr.setMeta(mw,{setHandle:e}))}function mA(t){let e=t.selection,n=d2(t),r=n.node(-1),o=n.start(-1),i=dX.get(r);return{...e instanceof d9?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function mM(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;(function(t,e,n){let r=dQ(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0})(e,r,o+i)&&(i=0==o||o==e.width?null:0);for(let s=0;s<e.height;s++){let l=s*e.width+o;if(o>0&&o<e.width&&e.map[l-1]==e.map[l]){let i=e.map[l],a=r.nodeAt(i);t.setNodeMarkup(t.mapping.map(n+i),null,d8(a.attrs,o-e.colCount(i))),s+=a.attrs.rowspan-1}else{let a=null==i?dQ(r.type.schema).cell:r.nodeAt(e.map[l+i]).type,c=e.positionAt(s,o,r);t.insert(t.mapping.map(n+c),a.createAndFill())}}return t}function mN(t,e){if(!d1(t))return!1;if(e){let n=mA(t);e(mM(t.tr,n,n.left))}return!0}function mE(t,e){if(!d1(t))return!1;if(e){let n=mA(t);e(mM(t.tr,n,n.right))}return!0}function mT(t,e){if(!d1(t))return!1;if(e){let n=mA(t),r=t.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let t=n.right-1;function(t,{map:e,table:n,tableStart:r},o){let i=t.mapping.maps.length;for(let s=0;s<e.height;){let l=s*e.width+o,a=e.map[l],c=n.nodeAt(a),u=c.attrs;if(o>0&&e.map[l-1]==a||o<e.width-1&&e.map[l+1]==a)t.setNodeMarkup(t.mapping.slice(i).map(r+a),null,d6(u,o-e.colCount(a)));else{let e=t.mapping.slice(i).map(r+a);t.delete(e,e+c.nodeSize)}s+=u.rowspan}}(r,n,t),t!=n.left;t--){let t=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!t)throw RangeError("No table found");n.table=t,n.map=dX.get(t)}e(r)}return!0}function mD(t,{map:e,tableStart:n,table:r},o){var i;let s=n;for(let t=0;t<o;t++)s+=r.child(t).nodeSize;let l=[],a=o>0?-1:0;(function(t,e,n){var r;let o=dQ(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if((null==(r=e.nodeAt(t.map[i+n*t.width]))?void 0:r.type)!=o)return!1;return!0})(e,r,o+a)&&(a=0==o||o==e.height?null:0);for(let s=0,c=e.width*o;s<e.width;s++,c++)if(o>0&&o<e.height&&e.map[c]==e.map[c-e.width]){let o=e.map[c],i=r.nodeAt(o).attrs;t.setNodeMarkup(n+o,null,{...i,rowspan:i.rowspan+1}),s+=i.colspan-1}else{let t=null==a?dQ(r.type.schema).cell:null==(i=r.nodeAt(e.map[c+a*e.width]))?void 0:i.type,n=null==t?void 0:t.createAndFill();n&&l.push(n)}return t.insert(s,dQ(r.type.schema).row.create(null,l)),t}function mR(t,e){if(!d1(t))return!1;if(e){let n=mA(t);e(mD(t.tr,n,n.top))}return!0}function mj(t,e){if(!d1(t))return!1;if(e){let n=mA(t);e(mD(t.tr,n,n.bottom))}return!0}function mI(t,e){if(!d1(t))return!1;if(e){let n=mA(t),r=t.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let t=n.bottom-1;function(t,{map:e,table:n,tableStart:r},o){let i=0;for(let t=0;t<o;t++)i+=n.child(t).nodeSize;let s=i+n.child(o).nodeSize,l=t.mapping.maps.length;t.delete(i+r,s+r);let a=new Set;for(let i=0,s=o*e.width;i<e.width;i++,s++){let c=e.map[s];
17if(!a.has(c)){if(a.add(c),o>0&&c==e.map[s-e.width]){let e=n.nodeAt(c).attrs;t.setNodeMarkup(t.mapping.slice(l).map(c+r),null,{...e,rowspan:e.rowspan-1}),i+=e.colspan-1}else if(o<e.height&&c==e.map[s+e.width]){let s=n.nodeAt(c),a=s.attrs,u=s.type.create({...a,rowspan:s.attrs.rowspan-1},s.content),p=e.positionAt(o+1,i,n);t.insert(t.mapping.slice(l).map(r+p),u),i+=a.colspan-1}}}}(r,n,t),t!=n.top;t--){let t=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!t)throw RangeError("No table found");n.table=t,n.map=dX.get(n.table)}e(r)}return!0}function mP(t){let e=t.content;return 1==e.childCount&&e.child(0).isTextblock&&0==e.child(0).childCount}function mz(t,e){let n=t.selection;if(!(n instanceof d9)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=mA(t),{map:o}=r;if(function({width:t,height:e,map:n},r){let o=r.top*t+r.left,i=o,s=(r.bottom-1)*t+r.left,l=o+(r.right-r.left-1);for(let e=r.top;e<r.bottom;e++){if(r.left>0&&n[i]==n[i-1]||r.right<t&&n[l]==n[l+1])return!0;i+=t,l+=t}for(let i=r.left;i<r.right;i++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[s]==n[s+t])return!0;o++,s++}return!1}(o,r))return!1;if(e){let n=t.tr,i={},s=S.empty,l,a;for(let t=r.top;t<r.bottom;t++)for(let e=r.left;e<r.right;e++){let c=o.map[t*o.width+e],u=r.table.nodeAt(c);if(!(i[c]||!u)){if(i[c]=!0,null==l)l=c,a=u;else{mP(u)||(s=s.append(u.content));let t=n.mapping.map(c+r.tableStart);n.delete(t,t+u.nodeSize)}}}if(null==l||null==a)return!0;if(n.setNodeMarkup(l+r.tableStart,null,{...d8(a.attrs,a.attrs.colspan,r.right-r.left-a.attrs.colspan),rowspan:r.bottom-r.top}),s.size){let t=l+1+a.content.size,e=mP(a)?l+1:t;n.replaceWith(e+r.tableStart,t+r.tableStart,s)}n.setSelection(new d9(n.doc.resolve(l+r.tableStart))),e(n)}return!0}function m$(t,e){var n;let r=dQ(t.schema);return(n=({node:t})=>r[t.type.spec.tableRole],(t,e)=>{var r;let o,i;let s=t.selection;if(s instanceof d9){if(s.$anchorCell.pos!=s.$headCell.pos)return!1;o=s.$anchorCell.nodeAfter,i=s.$anchorCell.pos}else{if(!(o=function(t){for(let e=t.depth;e>0;e--){let n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}(s.$from)))return!1;i=null==(r=d0(s.$from))?void 0:r.pos}if(null==o||null==i||1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(e){let r,l=o.attrs,a=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});let u=mA(t),p=t.tr;for(let t=0;t<u.right-u.left;t++)a.push(c?{...l,colwidth:c&&c[t]?[c[t]]:null}:l);for(let t=u.top;t<u.bottom;t++){let e=u.map.positionAt(t,u.left,u.table);t==u.top&&(e+=o.nodeSize);for(let i=u.left,s=0;i<u.right;i++,s++)i==u.left&&t==u.top||p.insert(r=p.mapping.map(e+u.tableStart,1),n({node:o,row:t,col:i}).createAndFill(a[s]))}p.setNodeMarkup(i,n({node:o,row:u.top,col:u.left}),a[0]),s instanceof d9&&p.setSelection(new d9(p.doc.resolve(s.$anchorCell.pos),r?p.doc.resolve(r):void 0)),e(p)}return!0})(t,e)}function m_(t,e){return function(n,r){if(!d1(n))return!1;let o=d2(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){let i=n.tr;n.selection instanceof d9?n.selection.forEachCell((n,r)=>{n.attrs[t]!==e&&i.setNodeMarkup(r,null,{...n.attrs,[t]:e})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}function mB(t,e,n){let r=e.map.cellsInRect({left:0,top:0,right:"row"==t?e.map.width:1,bottom:"column"==t?e.map.height:1});for(let t=0;t<r.length;t++){let o=e.table.nodeAt(r[t]);if(o&&o.type!==n.header_cell)return!1}return!0}function mF(t,e){return(e=e||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e,n){if(!d1(e))return!1;if(n){let r=dQ(e.schema),o=mA(e),i=e.tr,s=o.map.cellsInRect("column"==t?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==t?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=s.map(t=>o.table.nodeAt(t));for(let t=0;t<s.length;t++)l[t].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[t],r.cell,l[t].attrs);if(0==i.steps.length)for(let t=0;t<s.length;t++)i.setNodeMarkup(o.tableStart+s[t],r.header_cell,l[t].attrs);n(i)}return!0}:function(e,n){if(!d1(e))return!1;if(n){let r=dQ(e.schema),o=mA(e),i=e.tr,s=mB("row",o,r),l=mB("column",o,r),a=("column"===t?s:"row"===t&&l)?1:0,c="column"==t?{left:0,top:a,right:1,bottom:o.map.height}:"row"==t?{left:a,top:0,right:o.map.width,bottom:1}:o,u="column"==t?l?r.cell:r.header_cell:"row"==t?s?r.cell:r.header_cell:r.cell;
17o.map.cellsInRect(c).forEach(t=>{let e=t+o.tableStart,n=i.doc.nodeAt(e);n&&i.setNodeMarkup(e,u,n.attrs)}),n(i)}return!0}}mF("row",{useDeprecatedLogic:!0}),mF("column",{useDeprecatedLogic:!0});var mL=mF("cell",{useDeprecatedLogic:!0});function mV(t){return function(e,n){if(!d1(e))return!1;let r=function(t,e){if(e<0){let e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let e=t.index(-1)-1,n=t.before();e>=0;e--){let r=t.node(-1).child(e),o=r.lastChild;if(o)return n-1-o.nodeSize;n-=r.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;let e=t.node(-1);for(let n=t.indexAfter(-1),r=t.after();n<e.childCount;n++){let t=e.child(n);if(t.childCount)return r+1;r+=t.nodeSize}}return null}(d2(e),t);if(null==r)return!1;if(n){let t=e.doc.resolve(r);n(e.tr.setSelection(t3.between(t,t.node(0).resolve(t.pos+t.nodeAfter.nodeSize))).scrollIntoView())}return!0}}function mW(t,e){let n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function mq({allowTableNodeSelection:t=!1}={}){return new el({key:dZ,state:{init:()=>null,apply(t,e){let n=t.getMeta(dZ);if(null!=n)return -1==n?null:n;if(null==e||!t.docChanged)return e;let{deleted:r,pos:o}=t.mapping.mapResult(e);return r?null:o}},props:{decorations:mt,handleDOMEvents:{mousedown:md},createSelectionBetween:t=>null!=dZ.getState(t.state)?t.state.selection:null,handleTripleClick:mh,handleKeyDown:ml,handlePaste:mf},appendTransaction:(e,n,r)=>(function(t,e,n){let r,o;let i=(e||t).selection,s=(e||t).doc;if(i instanceof t4&&(o=i.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=d9.create(s,i.from);else if("row"==o){let t=s.resolve(i.from+1);r=d9.rowSelection(t,t)}else if(!n){let t=dX.get(i.node),e=i.from+1,n=e+t.map[t.width*t.height-1];r=d9.create(s,e+1,n)}}else i instanceof t3&&function({$from:t,$to:e}){if(t.pos==e.pos||t.pos<t.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let t=e.depth;t>=0&&!(e.before(t+1)>e.start(t));t--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}(i)?r=t3.create(s,i.from):i instanceof t3&&function({$from:t,$to:e}){let n,r;for(let e=t.depth;e>0;e--){let r=t.node(e);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let t=e.depth;t>0;t--){let n=e.node(t);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===e.parentOffset}(i)&&(r=t3.create(s,i.$from.start(),i.$from.end()));return r&&(e||(e=t.tr)).setSelection(r),e})(r,mn(r,n),t)})}}}]);
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.