@quandis/qbo4.configuration 4.0.1-CI-20251007-060607 → 4.0.1-CI-20251009-060846
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/wwwroot/js/esm/qbo4.configuration.js +66 -39
- package/wwwroot/js/esm/qbo4.configuration.min.js +4 -4
- package/wwwroot/js/esm/qbo4.configuration.min.js.map +1 -1
- package/wwwroot/js/qbo4.configuration.js +66 -39
- package/wwwroot/js/qbo4.configuration.min.js +5 -5
- package/wwwroot/js/qbo4.configuration.min.js.map +1 -1
|
@@ -339,7 +339,7 @@ ${Array.from(to.keys()).map(e=>Xt`<div class="col-3">
|
|
|
339
339
|
<button type="button" class="cancel" @click="${this.cancelChanges}">Cancel</button>
|
|
340
340
|
</div>
|
|
341
341
|
</div>
|
|
342
|
-
</form>`}}Ei([ki({context:$i,subscribe:!0}),se({attribute:!1}),Zi("design:type",Object)],Xi.prototype,"qboConfig",void 0),Ei([se({type:URL}),Zi("design:type",Object)],Xi.prototype,"apiEndpoint",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"buttonClass",void 0),Ei([se({type:Object}),Zi("design:type",Object)],Xi.prototype,"configData",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"formClass",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"rowClass",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"searchClass",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"theme",void 0),customElements.define("qbo-config-editor",Xi);let _i=[],ji=[];function Di(t){if(t<768)return!1;for(let e=0,o=_i.length;;){let r=e+o>>1;if(t<_i[r])o=r;else{if(!(t>=ji[r]))return!0;e=r+1}if(e==o)return!1}}function Yi(t){return t>=127462&&t<=127487}function Vi(t,e,o=!0,r=!0){return(o?Li:Ui)(t,e,r)}function Li(t,e,o){if(e==t.length)return e;e&&Wi(t.charCodeAt(e))&&Ii(t.charCodeAt(e-1))&&e--;let r=Bi(t,e);for(e+=Gi(r);e<t.length;){let i=Bi(t,e);if(8205==r||8205==i||o&&Di(i))e+=Gi(i),r=i;else{if(!Yi(i))break;{let o=0,r=e-2;for(;r>=0&&Yi(Bi(t,r));)o++,r-=2;if(o%2==0)break;e+=2}}}return e}function Ui(t,e,o){for(;e>0;){let r=Li(t,e-2,o);if(r<e)return r;e--}return 0}function Bi(t,e){let o=t.charCodeAt(e);if(!Ii(o)||e+1==t.length)return o;let r=t.charCodeAt(e+1);return Wi(r)?r-56320+(o-55296<<10)+65536:o}function Wi(t){return t>=56320&&t<57344}function Ii(t){return t>=55296&&t<56320}function Gi(t){return t<65536?1:2}(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let e=0,o=0;e<t.length;e++)(e%2?ji:_i).push(o+=t[e])})();class Ni{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,o){[t,e]=nn(this,t,e);let r=[];return this.decompose(0,t,r,2),o.length&&o.decompose(0,o.length,r,3),this.decompose(e,this.length,r,1),Hi.from(r,this.length-(e-t)+o.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=nn(this,t,e);let o=[];return this.decompose(t,e,o,0),Hi.from(o,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),o=this.length-this.scanIdentical(t,-1),r=new tn(this),i=new tn(t);for(let t=e,n=e;;){if(r.next(t),i.next(t),t=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(n+=r.value.length,r.done||n>=o)return!0}}iter(t=1){return new tn(this,t)}iterRange(t,e=this.length){return new en(this,t,e)}iterLines(t,e){let o;if(null==t)o=this.iter();else{null==e&&(e=this.lines+1);let r=this.line(t).from;o=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new on(o)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new Fi(t):Hi.from(Fi.split(t,[])):Ni.empty}}class Fi extends Ni{constructor(t,e=function(t){let e=-1;for(let o of t)e+=o.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,o,r){for(let i=0;;i++){let n=this.text[i],a=r+n.length;if((e?o:a)>=t)return new rn(r,a,o,n);r=a+1,o++}}decompose(t,e,o,r){let i=t<=0&&e>=this.length?this:new Fi(Ji(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&r){let t=o.pop(),e=Ki(i.text,t.text.slice(),0,i.length);if(e.length<=32)o.push(new Fi(e,t.length+i.length));else{let t=e.length>>1;o.push(new Fi(e.slice(0,t)),new Fi(e.slice(t)))}}else o.push(i)}replace(t,e,o){if(!(o instanceof Fi))return super.replace(t,e,o);[t,e]=nn(this,t,e);let r=Ki(this.text,Ki(o.text,Ji(this.text,0,t)),e),i=this.length+o.length-(e-t);return r.length<=32?new Fi(r,i):Hi.from(Fi.split(r,[]),i)}sliceString(t,e=this.length,o="\n"){[t,e]=nn(this,t,e);let r="";for(let i=0,n=0;i<=e&&n<this.text.length;n++){let a=this.text[n],s=i+a.length;i>t&&n&&(r+=o),t<s&&e>i&&(r+=a.slice(Math.max(0,t-i),e-i)),i=s+1}return r}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let o=[],r=-1;for(let i of t)o.push(i),r+=i.length+1,32==o.length&&(e.push(new Fi(o,r)),o=[],r=-1);return r>-1&&e.push(new Fi(o,r)),e}}class Hi extends Ni{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,o,r){for(let i=0;;i++){let n=this.children[i],a=r+n.length,s=o+n.lines-1;if((e?s:a)>=t)return n.lineInner(t,e,o,r);r=a+1,o=s+1}}decompose(t,e,o,r){for(let i=0,n=0;n<=e&&i<this.children.length;i++){let a=this.children[i],s=n+a.length;if(t<=s&&e>=n){let i=r&((n<=t?1:0)|(s>=e?2:0));n>=t&&s<=e&&!i?o.push(a):a.decompose(t-n,e-n,o,i)}n=s+1}}replace(t,e,o){if([t,e]=nn(this,t,e),o.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let n=this.children[r],a=i+n.length;if(t>=i&&e<=a){let s=n.replace(t-i,e-i,o),l=this.lines-n.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let i=this.children.slice();return i[r]=s,new Hi(i,this.length-(e-t)+o.length)}return super.replace(i,a,s)}i=a+1}return super.replace(t,e,o)}sliceString(t,e=this.length,o="\n"){[t,e]=nn(this,t,e);let r="";for(let i=0,n=0;i<this.children.length&&n<=e;i++){let a=this.children[i],s=n+a.length;n>t&&i&&(r+=o),t<s&&e>n&&(r+=a.sliceString(t-n,e-n,o)),n=s+1}return r}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof Hi))return 0;let o=0,[r,i,n,a]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;r+=e,i+=e){if(r==n||i==a)return o;let s=this.children[r],l=t.children[i];if(s!=l)return o+s.scanIdentical(l,e);o+=s.length+1}}static from(t,e=t.reduce((t,e)=>t+e.length+1,-1)){let o=0;for(let e of t)o+=e.lines;if(o<32){let o=[];for(let e of t)e.flatten(o);return new Fi(o,e)}let r=Math.max(32,o>>5),i=r<<1,n=r>>1,a=[],s=0,l=-1,d=[];function c(t){let e;if(t.lines>i&&t instanceof Hi)for(let e of t.children)c(e);else t.lines>n&&(s>n||!s)?(h(),a.push(t)):t instanceof Fi&&s&&(e=d[d.length-1])instanceof Fi&&t.lines+e.lines<=32?(s+=t.lines,l+=t.length+1,d[d.length-1]=new Fi(e.text.concat(t.text),e.length+1+t.length)):(s+t.lines>r&&h(),s+=t.lines,l+=t.length+1,d.push(t))}function h(){0!=s&&(a.push(1==d.length?d[0]:Hi.from(d,l)),l=-1,s=d.length=0)}for(let e of t)c(e);return h(),1==a.length?a[0]:new Hi(a,e)}}function Ki(t,e,o=0,r=1e9){for(let i=0,n=0,a=!0;n<t.length&&i<=r;n++){let s=t[n],l=i+s.length;l>=o&&(l>r&&(s=s.slice(0,r-i)),i<o&&(s=s.slice(o-i)),a?(e[e.length-1]+=s,a=!1):e.push(s)),i=l+1}return e}function Ji(t,e,o){return Ki(t,[""],e,o)}Ni.empty=new Fi([""],0);class tn{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof Fi?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let o=this.nodes.length-1,r=this.nodes[o],i=this.offsets[o],n=i>>1,a=r instanceof Fi?r.text.length:r.children.length;if(n==(e>0?a:0)){if(0==o)return this.done=!0,this.value="",this;e>0&&this.offsets[o-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(e>0?0:1)){if(this.offsets[o]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof Fi){let i=r.text[n+(e<0?-1:0)];if(this.offsets[o]+=e,i.length>Math.max(0,t))return this.value=0==t?i:e>0?i.slice(t):i.slice(0,i.length-t),this;t-=i.length}else{let i=r.children[n+(e<0?-1:0)];t>i.length?(t-=i.length,this.offsets[o]+=e):(e<0&&this.offsets[o]--,this.nodes.push(i),this.offsets.push(e>0?1:(i instanceof Fi?i.text.length:i.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class en{constructor(t,e,o){this.value="",this.done=!1,this.cursor=new tn(t,e>o?-1:1),this.pos=e>o?t.length:0,this.from=Math.min(e,o),this.to=Math.max(e,o)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let o=e<0?this.pos-this.from:this.to-this.pos;t>o&&(t=o),o-=t;let{value:r}=this.cursor.next(t);return this.pos+=(r.length+t)*e,this.value=r.length<=o?r:e<0?r.slice(r.length-o):r.slice(0,o),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class on{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:o,value:r}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):o?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Ni.prototype[Symbol.iterator]=function(){return this.iter()},tn.prototype[Symbol.iterator]=en.prototype[Symbol.iterator]=on.prototype[Symbol.iterator]=function(){return this});class rn{constructor(t,e,o,r){this.from=t,this.to=e,this.number=o,this.text=r}get length(){return this.to-this.from}}function nn(t,e,o){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,o))]}function an(t,e,o=!0,r=!0){return Vi(t,e,o,r)}function sn(t,e){let o=t.charCodeAt(e);if(!((r=o)>=55296&&r<56320&&e+1!=t.length))return o;var r;let i=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(i)?i-56320+(o-55296<<10)+65536:o}function ln(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function dn(t){return t<65536?1:2}const cn=/\r\n?|\n/;var hn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(hn||(hn={}));class pn{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let o=this.sections[e+1];t+=o<0?this.sections[e]:o}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,o=0,r=0;e<this.sections.length;){let i=this.sections[e++],n=this.sections[e++];n<0?(t(o,r,i),r+=i):r+=n,o+=i}}iterChangedRanges(t,e=!1){bn(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let o=this.sections[e++],r=this.sections[e++];r<0?t.push(o,r):t.push(r,o)}return new pn(t)}composeDesc(t){return this.empty?t:t.empty?this:vn(this,t)}mapDesc(t,e=!1){return t.empty?this:gn(this,t,e)}mapPos(t,e=-1,o=hn.Simple){let r=0,i=0;for(let n=0;n<this.sections.length;){let a=this.sections[n++],s=this.sections[n++],l=r+a;if(s<0){if(l>t)return i+(t-r);i+=a}else{if(o!=hn.Simple&&l>=t&&(o==hn.TrackDel&&r<t&&l>t||o==hn.TrackBefore&&r<t||o==hn.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!a)return t==r||e<0?i:i+s;i+=s}r=l}if(t>r)throw new RangeError(`Position ${t} is out of range for changeset of length ${r}`);return i}touchesRange(t,e=t){for(let o=0,r=0;o<this.sections.length&&r<=e;){let i=r+this.sections[o++];if(this.sections[o++]>=0&&r<=e&&i>=t)return!(r<t&&i>e)||"cover";r=i}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let o=this.sections[e++],r=this.sections[e++];t+=(t?" ":"")+o+(r>=0?":"+r:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(t=>"number"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeDesc");return new pn(t)}static create(t){return new pn(t)}}class un extends pn{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return bn(this,(e,o,r,i,n)=>t=t.replace(r,r+(o-e),n),!1),t}mapDesc(t,e=!1){return gn(this,t,e,!0)}invert(t){let e=this.sections.slice(),o=[];for(let r=0,i=0;r<e.length;r+=2){let n=e[r],a=e[r+1];if(a>=0){e[r]=a,e[r+1]=n;let s=r>>1;for(;o.length<s;)o.push(Ni.empty);o.push(n?t.slice(i,i+n):Ni.empty)}i+=n}return new un(e,o)}compose(t){return this.empty?t:t.empty?this:vn(this,t,!0)}map(t,e=!1){return t.empty?this:gn(this,t,e,!0)}iterChanges(t,e=!1){bn(this,t,e)}get desc(){return pn.create(this.sections)}filter(t){let e=[],o=[],r=[],i=new On(this);t:for(let n=0,a=0;;){let s=n==t.length?1e9:t[n++];for(;a<s||a==s&&0==i.len;){if(i.done)break t;let t=Math.min(i.len,s-a);mn(r,t,-1);let n=-1==i.ins?-1:0==i.off?i.ins:0;mn(e,t,n),n>0&&fn(o,e,i.text),i.forward(t),a+=t}let l=t[n++];for(;a<l;){if(i.done)break t;let t=Math.min(i.len,l-a);mn(e,t,-1),mn(r,t,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(t),a+=t}}return{changes:new un(e,o),filtered:pn.create(r)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let o=this.sections[e],r=this.sections[e+1];r<0?t.push(o):0==r?t.push([o]):t.push([o].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,o){let r=[],i=[],n=0,a=null;function s(t=!1){if(!t&&!r.length)return;n<e&&mn(r,e-n,-1);let o=new un(r,i);a=a?a.compose(o.map(a)):o,r=[],i=[],n=0}return function t(l){if(Array.isArray(l))for(let e of l)t(e);else if(l instanceof un){if(l.length!=e)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${e})`);s(),a=a?a.compose(l.map(a)):l}else{let{from:t,to:a=t,insert:d}=l;if(t>a||t<0||a>e)throw new RangeError(`Invalid change range ${t} to ${a} (in doc of length ${e})`);let c=d?"string"==typeof d?Ni.of(d.split(o||cn)):d:Ni.empty,h=c.length;if(t==a&&0==h)return;t<n&&s(),t>n&&mn(r,t-n,-1),mn(r,a-t,h),fn(i,r,c),n=a}}(t),s(!a),a}static empty(t){return new un(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],o=[];for(let r=0;r<t.length;r++){let i=t[r];if("number"==typeof i)e.push(i,-1);else{if(!Array.isArray(i)||"number"!=typeof i[0]||i.some((t,e)=>e&&"string"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)e.push(i[0],0);else{for(;o.length<r;)o.push(Ni.empty);o[r]=Ni.of(i.slice(1)),e.push(i[0],o[r].length)}}}return new un(e,o)}static createSet(t,e){return new un(t,e)}}function mn(t,e,o,r=!1){if(0==e&&o<=0)return;let i=t.length-2;i>=0&&o<=0&&o==t[i+1]?t[i]+=e:i>=0&&0==e&&0==t[i]?t[i+1]+=o:r?(t[i]+=e,t[i+1]+=o):t.push(e,o)}function fn(t,e,o){if(0==o.length)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(o);else{for(;t.length<r;)t.push(Ni.empty);t.push(o)}}function bn(t,e,o){let r=t.inserted;for(let i=0,n=0,a=0;a<t.sections.length;){let s=t.sections[a++],l=t.sections[a++];if(l<0)i+=s,n+=s;else{let d=i,c=n,h=Ni.empty;for(;d+=s,c+=l,l&&r&&(h=h.append(r[a-2>>1])),!(o||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,d,n,c,h),i=d,n=c}}}function gn(t,e,o,r=!1){let i=[],n=r?[]:null,a=new On(t),s=new On(e);for(let t=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(-1==a.ins&&-1==s.ins){let t=Math.min(a.len,s.len);mn(i,t,-1),a.forward(t),s.forward(t)}else if(s.ins>=0&&(a.ins<0||t==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!o))){let e=s.len;for(mn(i,s.ins,-1);e;){let o=Math.min(a.len,e);a.ins>=0&&t<a.i&&a.len<=o&&(mn(i,0,a.ins),n&&fn(n,i,a.text),t=a.i),a.forward(o),e-=o}s.next()}else{if(!(a.ins>=0)){if(a.done&&s.done)return n?un.createSet(i,n):pn.create(i);throw new Error("Mismatched change set lengths")}{let e=0,o=a.len;for(;o;)if(-1==s.ins){let t=Math.min(o,s.len);e+=t,o-=t,s.forward(t)}else{if(!(0==s.ins&&s.len<o))break;o-=s.len,s.next()}mn(i,e,t<a.i?a.ins:0),n&&t<a.i&&fn(n,i,a.text),t=a.i,a.forward(a.len-o)}}}}function vn(t,e,o=!1){let r=[],i=o?[]:null,n=new On(t),a=new On(e);for(let t=!1;;){if(n.done&&a.done)return i?un.createSet(r,i):pn.create(r);if(0==n.ins)mn(r,n.len,0,t),n.next();else if(0!=a.len||a.done){if(n.done||a.done)throw new Error("Mismatched change set lengths");{let e=Math.min(n.len2,a.len),o=r.length;if(-1==n.ins){let o=-1==a.ins?-1:a.off?0:a.ins;mn(r,e,o,t),i&&o&&fn(i,r,a.text)}else-1==a.ins?(mn(r,n.off?0:n.len,e,t),i&&fn(i,r,n.textBit(e))):(mn(r,n.off?0:n.len,a.off?0:a.ins,t),i&&!a.off&&fn(i,r,a.text));t=(n.ins>e||a.ins>=0&&a.len>e)&&(t||r.length>o),n.forward2(e),a.forward(e)}}else mn(r,0,a.ins,t),i&&fn(i,r,a.text),a.next()}}class On{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?Ni.empty:t[e]}textBit(t){let{inserted:e}=this.set,o=this.i-2>>1;return o>=e.length&&!t?Ni.empty:e[o].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class xn{constructor(t,e,o){this.from=t,this.to=e,this.flags=o}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let o,r;return this.empty?o=r=t.mapPos(this.from,e):(o=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),o==this.from&&r==this.to?this:new xn(o,r,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return yn.range(t,e);let o=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return yn.range(this.anchor,o)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return yn.range(t.anchor,t.head)}static create(t,e,o){return new xn(t,e,o)}}class yn{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:yn.create(this.ranges.map(o=>o.map(t,e)),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let o=0;o<this.ranges.length;o++)if(!this.ranges[o].eq(t.ranges[o],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new yn([this.main],0)}addRange(t,e=!0){return yn.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let o=this.ranges.slice();return o[e]=t,yn.create(o,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new yn(t.ranges.map(t=>xn.fromJSON(t)),t.main)}static single(t,e=t){return new yn([yn.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let o=0,r=0;r<t.length;r++){let i=t[r];if(i.empty?i.from<=o:i.from<o)return yn.normalized(t.slice(),e);o=i.to}return new yn(t,e)}static cursor(t,e=0,o,r){return xn.create(t,t,(0==e?0:e<0?8:16)|(null==o?7:Math.min(6,o))|(null!=r?r:16777215)<<6)}static range(t,e,o,r){let i=(null!=o?o:16777215)<<6|(null==r?7:Math.min(6,r));return e<t?xn.create(e,t,48|i):xn.create(t,e,(e>t?8:0)|i)}static normalized(t,e=0){let o=t[e];t.sort((t,e)=>t.from-e.from),e=t.indexOf(o);for(let o=1;o<t.length;o++){let r=t[o],i=t[o-1];if(r.empty?r.from<=i.to:r.from<i.to){let n=i.from,a=Math.max(r.to,i.to);o<=e&&e--,t.splice(--o,2,r.anchor>r.head?yn.range(a,n):yn.range(n,a))}}return new yn(t,e)}}function wn(t,e){for(let o of t.ranges)if(o.to>e)throw new RangeError("Selection points outside of document")}let kn=0;class qn{constructor(t,e,o,r,i){this.combine=t,this.compareInput=e,this.compare=o,this.isStatic=r,this.id=kn++,this.default=t([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(t={}){return new qn(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:Sn),!!t.static,t.enables)}of(t){return new Qn([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qn(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qn(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],o=>e(o.field(t)))}}function Sn(t,e){return t==e||t.length==e.length&&t.every((t,o)=>t===e[o])}class Qn{constructor(t,e,o,r){this.dependencies=t,this.facet=e,this.type=o,this.value=r,this.id=kn++}dynamicSlot(t){var e;let o=this.value,r=this.facet.compareInput,i=this.id,n=t[i]>>1,a=2==this.type,s=!1,l=!1,d=[];for(let o of this.dependencies)"doc"==o?s=!0:"selection"==o?l=!0:1&(null!==(e=t[o.id])&&void 0!==e?e:1)||d.push(t[o.id]);return{create:t=>(t.values[n]=o(t),1),update(t,e){if(s&&e.docChanged||l&&(e.docChanged||e.selection)||Pn(t,d)){let e=o(t);if(a?!$n(e,t.values[n],r):!r(e,t.values[n]))return t.values[n]=e,1}return 0},reconfigure:(t,e)=>{let s,l=e.config.address[i];if(null!=l){let i=jn(e,l);if(this.dependencies.every(o=>o instanceof qn?e.facet(o)===t.facet(o):!(o instanceof An)||e.field(o,!1)==t.field(o,!1))||(a?$n(s=o(t),i,r):r(s=o(t),i)))return t.values[n]=i,0}else s=o(t);return t.values[n]=s,1}}}}function $n(t,e,o){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!o(t[r],e[r]))return!1;return!0}function Pn(t,e){let o=!1;for(let r of e)1&_n(t,r)&&(o=!0);return o}function Cn(t,e,o){let r=o.map(e=>t[e.id]),i=o.map(t=>t.type),n=r.filter(t=>!(1&t)),a=t[e.id]>>1;function s(t){let o=[];for(let e=0;e<r.length;e++){let n=jn(t,r[e]);if(2==i[e])for(let t of n)o.push(t);else o.push(n)}return e.combine(o)}return{create(t){for(let e of r)_n(t,e);return t.values[a]=s(t),1},update(t,o){if(!Pn(t,n))return 0;let r=s(t);return e.compare(r,t.values[a])?0:(t.values[a]=r,1)},reconfigure(t,i){let n=Pn(t,r),l=i.config.facets[e.id],d=i.facet(e);if(l&&!n&&Sn(o,l))return t.values[a]=d,0;let c=s(t);return e.compare(c,d)?(t.values[a]=d,0):(t.values[a]=c,1)}}}const Tn=qn.define({static:!0});class An{constructor(t,e,o,r,i){this.id=t,this.createF=e,this.updateF=o,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let e=new An(kn++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(Tn).find(t=>t.field==this);return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,o)=>{let r=t.values[e],i=this.updateF(r,o);return this.compareF(r,i)?0:(t.values[e]=i,1)},reconfigure:(t,o)=>{let r,i=t.facet(Tn),n=o.facet(Tn);return(r=i.find(t=>t.field==this))&&r!=n.find(t=>t.field==this)?(t.values[e]=r.create(t),1):null!=o.config.address[this.id]?(t.values[e]=o.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,Tn.of({field:this,create:t})]}get extension(){return this}}function Rn(t){return e=>new Mn(e,t)}const zn={highest:Rn(0),high:Rn(1),default:Rn(2),low:Rn(3),lowest:Rn(4)};class Mn{constructor(t,e){this.inner=t,this.prec=e}}class En{of(t){return new Zn(this,t)}reconfigure(t){return En.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Zn{constructor(t,e){this.compartment=t,this.inner=e}}class Xn{constructor(t,e,o,r,i,n){for(this.base=t,this.compartments=e,this.dynamicSlots=o,this.address=r,this.staticValues=i,this.facets=n,this.statusTemplate=[];this.statusTemplate.length<o.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,o){let r=[],i=Object.create(null),n=new Map;for(let o of function(t,e,o){let r=[[],[],[],[],[]],i=new Map;return function t(n,a){let s=i.get(n);if(null!=s){if(s<=a)return;let t=r[s].indexOf(n);t>-1&&r[s].splice(t,1),n instanceof Zn&&o.delete(n.compartment)}if(i.set(n,a),Array.isArray(n))for(let e of n)t(e,a);else if(n instanceof Zn){if(o.has(n.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=e.get(n.compartment)||n.inner;o.set(n.compartment,r),t(r,a)}else if(n instanceof Mn)t(n.inner,n.prec);else if(n instanceof An)r[a].push(n),n.provides&&t(n.provides,a);else if(n instanceof Qn)r[a].push(n),n.facet.extensions&&t(n.facet.extensions,2);else{let e=n.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,a)}}(t,2),r.reduce((t,e)=>t.concat(e))}(t,e,n))o instanceof An?r.push(o):(i[o.facet.id]||(i[o.facet.id]=[])).push(o);let a=Object.create(null),s=[],l=[];for(let t of r)a[t.id]=l.length<<1,l.push(e=>t.slot(e));let d=null==o?void 0:o.config.facets;for(let t in i){let e=i[t],r=e[0].facet,n=d&&d[t]||[];if(e.every(t=>0==t.type))if(a[r.id]=s.length<<1|1,Sn(n,e))s.push(o.facet(r));else{let t=r.combine(e.map(t=>t.value));s.push(o&&r.compare(t,o.facet(r))?o.facet(r):t)}else{for(let t of e)0==t.type?(a[t.id]=s.length<<1|1,s.push(t.value)):(a[t.id]=l.length<<1,l.push(e=>t.dynamicSlot(e)));a[r.id]=l.length<<1,l.push(t=>Cn(t,r,e))}}let c=l.map(t=>t(a));return new Xn(t,n,c,a,s,i)}}function _n(t,e){if(1&e)return 2;let o=e>>1,r=t.status[o];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[o]=4;let i=t.computeSlot(t,t.config.dynamicSlots[o]);return t.status[o]=2|i}function jn(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const Dn=qn.define(),Yn=qn.define({combine:t=>t.some(t=>t),static:!0}),Vn=qn.define({combine:t=>t.length?t[0]:void 0,static:!0}),Ln=qn.define(),Un=qn.define(),Bn=qn.define(),Wn=qn.define({combine:t=>!!t.length&&t[0]});class In{constructor(t,e){this.type=t,this.value=e}static define(){return new Gn}}class Gn{of(t){return new In(this,t)}}class Nn{constructor(t){this.map=t}of(t){return new Fn(this,t)}}class Fn{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new Fn(this.type,e)}is(t){return this.type==t}static define(t={}){return new Nn(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let o=[];for(let r of t){let t=r.map(e);t&&o.push(t)}return o}}Fn.reconfigure=Fn.define(),Fn.appendConfig=Fn.define();class Hn{constructor(t,e,o,r,i,n){this.startState=t,this.changes=e,this.selection=o,this.effects=r,this.annotations=i,this.scrollIntoView=n,this._doc=null,this._state=null,o&&wn(o,e.newLength),i.some(t=>t.type==Hn.time)||(this.annotations=i.concat(Hn.time.of(Date.now())))}static create(t,e,o,r,i,n){return new Hn(t,e,o,r,i,n)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(Hn.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function Kn(t,e){let o=[];for(let r=0,i=0;;){let n,a;if(r<t.length&&(i==e.length||e[i]>=t[r]))n=t[r++],a=t[r++];else{if(!(i<e.length))return o;n=e[i++],a=e[i++]}!o.length||o[o.length-1]<n?o.push(n,a):o[o.length-1]<a&&(o[o.length-1]=a)}}function Jn(t,e,o){var r;let i,n,a;return o?(i=e.changes,n=un.empty(e.changes.length),a=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),n=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(i)),{changes:a,selection:e.selection?e.selection.map(n):null===(r=t.selection)||void 0===r?void 0:r.map(i),effects:Fn.mapEffects(t.effects,i).concat(Fn.mapEffects(e.effects,n)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function ta(t,e,o){let r=e.selection,i=ra(e.annotations);return e.userEvent&&(i=i.concat(Hn.userEvent.of(e.userEvent))),{changes:e.changes instanceof un?e.changes:un.of(e.changes||[],o,t.facet(Vn)),selection:r&&(r instanceof yn?r:yn.single(r.anchor,r.head)),effects:ra(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function ea(t,e,o){let r=ta(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(o=!1);for(let i=1;i<e.length;i++){!1===e[i].filter&&(o=!1);let n=!!e[i].sequential;r=Jn(r,ta(t,e[i],n?r.changes.newLength:t.doc.length),n)}let i=Hn.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(t){let e=t.startState,o=e.facet(Bn),r=t;for(let i=o.length-1;i>=0;i--){let n=o[i](t);n&&Object.keys(n).length&&(r=Jn(r,ta(e,n,t.changes.newLength),!0))}return r==t?t:Hn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(o?function(t){let e=t.startState,o=!0;for(let r of e.facet(Ln)){let e=r(t);if(!1===e){o=!1;break}Array.isArray(e)&&(o=!0===o?e:Kn(o,e))}if(!0!==o){let r,i;if(!1===o)i=t.changes.invertedDesc,r=un.empty(e.doc.length);else{let e=t.changes.filter(o);r=e.changes,i=e.filtered.mapDesc(e.changes).invertedDesc}t=Hn.create(e,r,t.selection&&t.selection.map(i),Fn.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let r=e.facet(Un);for(let o=r.length-1;o>=0;o--){let i=r[o](t);t=i instanceof Hn?i:Array.isArray(i)&&1==i.length&&i[0]instanceof Hn?i[0]:ea(e,ra(i),!1)}return t}(i):i)}Hn.time=In.define(),Hn.userEvent=In.define(),Hn.addToHistory=In.define(),Hn.remote=In.define();const oa=[];function ra(t){return null==t?oa:Array.isArray(t)?t:[t]}var ia=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(ia||(ia={}));const na=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let aa;try{aa=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(At){}class sa{constructor(t,e,o,r,i,n){this.config=t,this.doc=e,this.selection=o,this.values=r,this.status=t.statusTemplate.slice(),this.computeSlot=i,n&&(n._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)_n(this,t<<1);this.computeSlot=null}field(t,e=!0){let o=this.config.address[t.id];if(null!=o)return _n(this,o),jn(this,o);if(e)throw new RangeError("Field is not present in this state")}update(...t){return ea(this,t,!0)}applyTransaction(t){let e,o=this.config,{base:r,compartments:i}=o;for(let e of t.effects)e.is(En.reconfigure)?(o&&(i=new Map,o.compartments.forEach((t,e)=>i.set(e,t)),o=null),i.set(e.value.compartment,e.value.extension)):e.is(Fn.reconfigure)?(o=null,r=e.value):e.is(Fn.appendConfig)&&(o=null,r=ra(r).concat(e.value));o?e=t.startState.values.slice():(o=Xn.resolve(r,i,this),e=new sa(o,this.doc,this.selection,o.dynamicSlots.map(()=>null),(t,e)=>e.reconfigure(t,this),null).values);let n=t.startState.facet(Yn)?t.newSelection:t.newSelection.asSingle();new sa(o,t.newDoc,n,e,(e,o)=>o.update(e,t),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:yn.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,o=t(e.ranges[0]),r=this.changes(o.changes),i=[o.range],n=ra(o.effects);for(let o=1;o<e.ranges.length;o++){let a=t(e.ranges[o]),s=this.changes(a.changes),l=s.map(r);for(let t=0;t<o;t++)i[t]=i[t].map(l);let d=r.mapDesc(s,!0);i.push(a.range.map(d)),r=r.compose(l),n=Fn.mapEffects(n,l).concat(Fn.mapEffects(ra(a.effects),d))}return{changes:r,selection:yn.create(i,e.mainIndex),effects:n}}changes(t=[]){return t instanceof un?t:un.of(t,this.doc.length,this.facet(sa.lineSeparator))}toText(t){return Ni.of(t.split(this.facet(sa.lineSeparator)||cn))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(_n(this,e),jn(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let o in t){let r=t[o];r instanceof An&&null!=this.config.address[r.id]&&(e[o]=r.spec.toJSON(this.field(t[o]),this))}return e}static fromJSON(t,e={},o){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(o)for(let e in o)if(Object.prototype.hasOwnProperty.call(t,e)){let i=o[e],n=t[e];r.push(i.init(t=>i.spec.fromJSON(n,t)))}return sa.create({doc:t.doc,selection:yn.fromJSON(t.selection),extensions:e.extensions?r.concat([e.extensions]):r})}static create(t={}){let e=Xn.resolve(t.extensions||[],new Map),o=t.doc instanceof Ni?t.doc:Ni.of((t.doc||"").split(e.staticFacet(sa.lineSeparator)||cn)),r=t.selection?t.selection instanceof yn?t.selection:yn.single(t.selection.anchor,t.selection.head):yn.single(0);return wn(r,o.length),e.staticFacet(Yn)||(r=r.asSingle()),new sa(e,o,r,e.dynamicSlots.map(()=>null),(t,e)=>e.create(t),null)}get tabSize(){return this.facet(sa.tabSize)}get lineBreak(){return this.facet(sa.lineSeparator)||"\n"}get readOnly(){return this.facet(Wn)}phrase(t,...e){for(let e of this.facet(sa.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,(t,o)=>{if("$"==o)return"$";let r=+(o||1);return!r||r>e.length?t:e[r-1]})),t}languageDataAt(t,e,o=-1){let r=[];for(let i of this.facet(Dn))for(let n of i(this,e,o))Object.prototype.hasOwnProperty.call(n,t)&&r.push(n[t]);return r}charCategorizer(t){return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return ia.Space;if(function(t){if(aa)return aa.test(t);for(let e=0;e<t.length;e++){let o=t[e];if(/\w/.test(o)||o>""&&(o.toUpperCase()!=o.toLowerCase()||na.test(o)))return!0}return!1}(t))return ia.Word;for(let o=0;o<e.length;o++)if(t.indexOf(e[o])>-1)return ia.Word;return ia.Other};var e}wordAt(t){let{text:e,from:o,length:r}=this.doc.lineAt(t),i=this.charCategorizer(t),n=t-o,a=t-o;for(;n>0;){let t=an(e,n,!1);if(i(e.slice(t,n))!=ia.Word)break;n=t}for(;a<r;){let t=an(e,a);if(i(e.slice(a,t))!=ia.Word)break;a=t}return n==a?null:yn.range(n+o,a+o)}}function la(t,e,o={}){let r={};for(let e of t)for(let t of Object.keys(e)){let i=e[t],n=r[t];if(void 0===n)r[t]=i;else if(n===i||void 0===i);else{if(!Object.hasOwnProperty.call(o,t))throw new Error("Config merge conflict for field "+t);r[t]=o[t](n,i)}}for(let t in e)void 0===r[t]&&(r[t]=e[t]);return r}sa.allowMultipleSelections=Yn,sa.tabSize=qn.define({combine:t=>t.length?t[0]:4}),sa.lineSeparator=Vn,sa.readOnly=Wn,sa.phrases=qn.define({compare(t,e){let o=Object.keys(t),r=Object.keys(e);return o.length==r.length&&o.every(o=>t[o]==e[o])}}),sa.languageData=Dn,sa.changeFilter=Ln,sa.transactionFilter=Un,sa.transactionExtender=Bn,En.reconfigure=Fn.define();class da{eq(t){return this==t}range(t,e=t){return ca.create(t,e,this)}}da.prototype.startSide=da.prototype.endSide=0,da.prototype.point=!1,da.prototype.mapMode=hn.TrackDel;class ca{constructor(t,e,o){this.from=t,this.to=e,this.value=o}static create(t,e,o){return new ca(t,e,o)}}function ha(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class pa{constructor(t,e,o,r){this.from=t,this.to=e,this.value=o,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(t,e,o,r=0){let i=o?this.to:this.from;for(let n=r,a=i.length;;){if(n==a)return n;let r=n+a>>1,s=i[r]-t||(o?this.value[r].endSide:this.value[r].startSide)-e;if(r==n)return s>=0?n:a;s>=0?a=r:n=r+1}}between(t,e,o,r){for(let i=this.findIndex(e,-1e9,!0),n=this.findIndex(o,1e9,!1,i);i<n;i++)if(!1===r(this.from[i]+t,this.to[i]+t,this.value[i]))return!1}map(t,e){let o=[],r=[],i=[],n=-1,a=-1;for(let s=0;s<this.value.length;s++){let l,d,c=this.value[s],h=this.from[s]+t,p=this.to[s]+t;if(h==p){let t=e.mapPos(h,c.startSide,c.mapMode);if(null==t)continue;if(l=d=t,c.startSide!=c.endSide&&(d=e.mapPos(h,c.endSide),d<l))continue}else if(l=e.mapPos(h,c.startSide),d=e.mapPos(p,c.endSide),l>d||l==d&&c.startSide>0&&c.endSide<=0)continue;(d-l||c.endSide-c.startSide)<0||(n<0&&(n=l),c.point&&(a=Math.max(a,d-l)),o.push(c),r.push(l-n),i.push(d-n))}return{mapped:o.length?new pa(r,i,o,a):null,pos:n}}}class ua{constructor(t,e,o,r){this.chunkPos=t,this.chunk=e,this.nextLayer=o,this.maxPoint=r}static create(t,e,o,r){return new ua(t,e,o,r)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:o=!1,filterFrom:r=0,filterTo:i=this.length}=t,n=t.filter;if(0==e.length&&!n)return this;if(o&&(e=e.slice().sort(ha)),this.isEmpty)return e.length?ua.of(e):this;let a=new ba(this,null,-1).goto(0),s=0,l=[],d=new ma;for(;a.value||s<e.length;)if(s<e.length&&(a.from-e[s].from||a.startSide-e[s].value.startSide)>=0){let t=e[s++];d.addInner(t.from,t.to,t.value)||l.push(t)}else 1==a.rangeIndex&&a.chunkIndex<this.chunk.length&&(s==e.length||this.chunkEnd(a.chunkIndex)<e[s].from)&&(!n||r>this.chunkEnd(a.chunkIndex)||i<this.chunkPos[a.chunkIndex])&&d.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!n||r>a.to||i<a.from||n(a.from,a.to,a.value))&&(d.addInner(a.from,a.to,a.value)||l.push(ca.create(a.from,a.to,a.value))),a.next());return d.finishInner(this.nextLayer.isEmpty&&!l.length?ua.empty:this.nextLayer.update({add:l,filter:n,filterFrom:r,filterTo:i}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],o=[],r=-1;for(let i=0;i<this.chunk.length;i++){let n=this.chunkPos[i],a=this.chunk[i],s=t.touchesRange(n,n+a.length);if(!1===s)r=Math.max(r,a.maxPoint),e.push(a),o.push(t.mapPos(n));else if(!0===s){let{mapped:i,pos:s}=a.map(n,t);i&&(r=Math.max(r,i.maxPoint),e.push(i),o.push(s))}}let i=this.nextLayer.map(t);return 0==e.length?i:new ua(o,e,i||ua.empty,r)}between(t,e,o){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],n=this.chunk[r];if(e>=i&&t<=i+n.length&&!1===n.between(i,t-i,e-i,o))return}this.nextLayer.between(t,e,o)}}iter(t=0){return ga.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return ga.from(t).goto(e)}static compare(t,e,o,r,i=-1){let n=t.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i),a=e.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i),s=fa(n,a,o),l=new Oa(n,s,i),d=new Oa(a,s,i);o.iterGaps((t,e,o)=>xa(l,t,d,e,o,r)),o.empty&&0==o.length&&xa(l,0,d,0,0,r)}static eq(t,e,o=0,r){null==r&&(r=999999999);let i=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0),n=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0);if(i.length!=n.length)return!1;if(!i.length)return!0;let a=fa(i,n),s=new Oa(i,a,0).goto(o),l=new Oa(n,a,0).goto(o);for(;;){if(s.to!=l.to||!ya(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>r)return!0;s.next(),l.next()}}static spans(t,e,o,r,i=-1){let n=new Oa(t,null,i).goto(e),a=e,s=n.openStart;for(;;){let t=Math.min(n.to,o);if(n.point){let o=n.activeForPoint(n.to),i=n.pointFrom<e?o.length+1:n.point.startSide<0?o.length:Math.min(o.length,s);r.point(a,t,n.point,o,i,n.pointRank),s=Math.min(n.openEnd(t),o.length)}else t>a&&(r.span(a,t,n.active,s),s=n.openEnd(t));if(n.to>o)return s+(n.point&&n.to>o?1:0);a=n.to,n.next()}}static of(t,e=!1){let o=new ma;for(let r of t instanceof ca?[t]:e?function(t){if(t.length>1)for(let e=t[0],o=1;o<t.length;o++){let r=t[o];if(ha(e,r)>0)return t.slice().sort(ha);e=r}return t}(t):t)o.add(r.from,r.to,r.value);return o.finish()}static join(t){if(!t.length)return ua.empty;let e=t[t.length-1];for(let o=t.length-2;o>=0;o--)for(let r=t[o];r!=ua.empty;r=r.nextLayer)e=new ua(r.chunkPos,r.chunk,e,Math.max(r.maxPoint,e.maxPoint));return e}}ua.empty=new ua([],[],null,-1),ua.empty.nextLayer=ua.empty;class ma{finishChunk(t){this.chunks.push(new pa(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,o){this.addInner(t,e,o)||(this.nextLayer||(this.nextLayer=new ma)).add(t,e,o)}addInner(t,e,o){let r=t-this.lastTo||o.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||o.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=o,this.lastFrom=t,this.lastTo=e,this.value.push(o),o.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let o=e.value.length-1;return this.last=e.value[o],this.lastFrom=e.from[o]+t,this.lastTo=e.to[o]+t,!0}finish(){return this.finishInner(ua.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=ua.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function fa(t,e,o){let r=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&r.set(e.chunk[t],e.chunkPos[t]);let i=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let n=r.get(t.chunk[e]);null==n||(o?o.mapPos(n):n)!=t.chunkPos[e]||(null==o?void 0:o.touchesRange(n,n+t.chunk[e].length))||i.add(t.chunk[e])}return i}class ba{constructor(t,e,o,r=0){this.layer=t,this.skip=e,this.minPoint=o,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,o){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,o=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!o||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],o=t+e.from[this.rangeIndex];if(this.from=o,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class ga{constructor(t){this.heap=t}static from(t,e=null,o=-1){let r=[];for(let i=0;i<t.length;i++)for(let n=t[i];!n.isEmpty;n=n.nextLayer)n.maxPoint>=o&&r.push(new ba(n,e,o,i));return 1==r.length?r[0]:new ga(r)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let o of this.heap)o.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)va(this.heap,t);return this.next(),this}forward(t,e){for(let o of this.heap)o.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)va(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),va(this.heap,0)}}}function va(t,e){for(let o=t[e];;){let r=1+(e<<1);if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),o.compare(i)<0)break;t[r]=o,t[e]=i,e=r}}class Oa{constructor(t,e,o){this.minPoint=o,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ga.from(t,e,o)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){wa(this.active,t),wa(this.activeTo,t),wa(this.activeRank,t),this.minActive=qa(this.active,this.activeTo)}addActive(t){let e=0,{value:o,to:r,rank:i}=this.cursor;for(;e<this.activeRank.length&&(i-this.activeRank[e]||r-this.activeTo[e])>0;)e++;ka(this.active,e,o),ka(this.activeTo,e,r),ka(this.activeRank,e,i),t&&ka(t,e,this.cursor.from),this.minActive=qa(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let o=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),o&&wa(o,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(o),this.cursor.next()}}}if(o){this.openStart=0;for(let e=o.length-1;e>=0&&o[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let o=this.active.length-1;o>=0&&!(this.activeRank[o]<this.pointRank);o--)(this.activeTo[o]>t||this.activeTo[o]==t&&this.active[o].endSide>=this.point.endSide)&&e.push(this.active[o]);return e.reverse()}openEnd(t){let e=0;for(let o=this.activeTo.length-1;o>=0&&this.activeTo[o]>t;o--)e++;return e}}function xa(t,e,o,r,i,n){t.goto(e),o.goto(r);let a=r+i,s=r,l=r-e;for(;;){let e=t.to+l-o.to,r=e||t.endSide-o.endSide,i=r<0?t.to+l:o.to,d=Math.min(i,a);if(t.point||o.point?t.point&&o.point&&(t.point==o.point||t.point.eq(o.point))&&ya(t.activeForPoint(t.to),o.activeForPoint(o.to))||n.comparePoint(s,d,t.point,o.point):d>s&&!ya(t.active,o.active)&&n.compareRange(s,d,t.active,o.active),i>a)break;(e||t.openEnd!=o.openEnd)&&n.boundChange&&n.boundChange(i),s=i,r<=0&&t.next(),r>=0&&o.next()}}function ya(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!=e[o]&&!t[o].eq(e[o]))return!1;return!0}function wa(t,e){for(let o=e,r=t.length-1;o<r;o++)t[o]=t[o+1];t.pop()}function ka(t,e,o){for(let o=t.length-1;o>=e;o--)t[o+1]=t[o];t[e]=o}function qa(t,e){let o=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[o].endSide)<0&&(o=i,r=e[i]);return o}function Sa(t,e,o=t.length){let r=0;for(let i=0;i<o&&i<t.length;)9==t.charCodeAt(i)?(r+=e-r%e,i++):(r++,i=an(t,i));return r}function Qa(t,e,o,r){for(let r=0,i=0;;){if(i>=e)return r;if(r==t.length)break;i+=9==t.charCodeAt(r)?o-i%o:1,r=an(t,r)}return!0===r?-1:t.length}const $a="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Pa="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Ca="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Ta{constructor(t,e){this.rules=[];let{finish:o}=e||{};function r(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function i(t,e,n,a){let s=[],l=/^@(\w+)\b/.exec(t[0]),d=l&&"keyframes"==l[1];if(l&&null==e)return n.push(t[0]+";");for(let o in e){let a=e[o];if(/&/.test(o))i(o.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((t,e)=>t.concat(e)),a,n);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+o+") should be a primitive value.");i(r(o),a,s,d)}else null!=a&&s.push(o.replace(/_.*/,"").replace(/[A-Z]/g,t=>"-"+t.toLowerCase())+": "+a+";")}(s.length||d)&&n.push((!o||l||a?t:t.map(o)).join(", ")+" {"+s.join(" ")+"}")}for(let e in t)i(r(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=Ca[$a]||1;return Ca[$a]=t+1,"ͼ"+t.toString(36)}static mount(t,e,o){let r=t[Pa],i=o&&o.nonce;r?i&&r.setNonce(i):r=new Ra(t,i),r.mount(Array.isArray(e)?e:[e],t)}}let Aa=new Map;class Ra{constructor(t,e){let o=t.ownerDocument||t,r=o.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let e=Aa.get(o);if(e)return t[Pa]=e;this.sheet=new r.CSSStyleSheet,Aa.set(o,this)}else this.styleTag=o.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[Pa]=this}mount(t,e){let o=this.sheet,r=0,i=0;for(let e=0;e<t.length;e++){let n=t[e],a=this.modules.indexOf(n);if(a<i&&a>-1&&(this.modules.splice(a,1),i--,a=-1),-1==a){if(this.modules.splice(i++,0,n),o)for(let t=0;t<n.rules.length;t++)o.insertRule(n.rules[t],r++)}else{for(;i<a;)r+=this.modules[i++].rules.length;r+=n.rules.length,i++}}if(o)e.adoptedStyleSheets.indexOf(this.sheet)<0&&(e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets]);else{let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t;let o=e.head||e;this.styleTag.parentNode!=o&&o.insertBefore(this.styleTag,o.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}for(var za={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:"'"},Ma={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ea="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Za="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Xa=0;Xa<10;Xa++)za[48+Xa]=za[96+Xa]=String(Xa);for(Xa=1;Xa<=24;Xa++)za[Xa+111]="F"+Xa;for(Xa=65;Xa<=90;Xa++)za[Xa]=String.fromCharCode(Xa+32),Ma[Xa]=String.fromCharCode(Xa);for(var _a in za)Ma.hasOwnProperty(_a)||(Ma[_a]=za[_a]);function ja(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function Da(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function Ya(t,e){if(!e.anchorNode)return!1;try{return Da(t,e.anchorNode)}catch(t){return!1}}function Va(t){return 3==t.nodeType?es(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function La(t,e,o,r){return!!o&&(Wa(t,e,o,r,-1)||Wa(t,e,o,r,1))}function Ua(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function Ba(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function Wa(t,e,o,r,i){for(;;){if(t==o&&e==r)return!0;if(e==(i<0?0:Ia(t))){if("DIV"==t.nodeName)return!1;let o=t.parentNode;if(!o||1!=o.nodeType)return!1;e=Ua(t)+(i<0?0:1),t=o}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(i<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=i<0?Ia(t):0}}}function Ia(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Ga(t,e){let o=e?t.left:t.right;return{left:o,right:o,top:t.top,bottom:t.bottom}}function Na(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function Fa(t,e){let o=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(o>.995&&o<1.005||!isFinite(o)||Math.abs(e.width-t.offsetWidth)<1)&&(o=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:o,scaleY:r}}class Ha{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:o}=t;this.set(e,Math.min(t.anchorOffset,e?Ia(e):0),o,Math.min(t.focusOffset,o?Ia(o):0))}set(t,e,o,r){this.anchorNode=t,this.anchorOffset=e,this.focusNode=o,this.focusOffset=r}}let Ka,Ja=null;function ts(t){if(t.setActive)return t.setActive();if(Ja)return t.focus(Ja);let e=[];for(let o=t;o&&(e.push(o,o.scrollTop,o.scrollLeft),o!=o.ownerDocument);o=o.parentNode);if(t.focus(null==Ja?{get preventScroll(){return Ja={preventScroll:!0},!0}}:void 0),!Ja){Ja=!1;for(let t=0;t<e.length;){let o=e[t++],r=e[t++],i=e[t++];o.scrollTop!=r&&(o.scrollTop=r),o.scrollLeft!=i&&(o.scrollLeft=i)}}}function es(t,e,o=e){let r=Ka||(Ka=document.createRange());return r.setEnd(t,o),r.setStart(t,e),r}function os(t,e,o,r){let i={key:e,code:e,keyCode:o,which:o,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let n=new KeyboardEvent("keydown",i);n.synthetic=!0,t.dispatchEvent(n);let a=new KeyboardEvent("keyup",i);return a.synthetic=!0,t.dispatchEvent(a),n.defaultPrevented||a.defaultPrevented}function rs(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function is(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function ns(t,e){for(let o=t,r=e;;){if(3==o.nodeType&&r>0)return{node:o,offset:r};if(1==o.nodeType&&r>0){if("false"==o.contentEditable)return null;o=o.childNodes[r-1],r=Ia(o)}else{if(!o.parentNode||Ba(o))return null;r=Ua(o),o=o.parentNode}}}function as(t,e){for(let o=t,r=e;;){if(3==o.nodeType&&r<o.nodeValue.length)return{node:o,offset:r};if(1==o.nodeType&&r<o.childNodes.length){if("false"==o.contentEditable)return null;o=o.childNodes[r],r=0}else{if(!o.parentNode||Ba(o))return null;r=Ua(o)+1,o=o.parentNode}}}class ss{constructor(t,e,o=!0){this.node=t,this.offset=e,this.precise=o}static before(t,e){return new ss(t.parentNode,Ua(t),e)}static after(t,e){return new ss(t.parentNode,Ua(t)+1,e)}}const ls=[];class ds{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let o of this.children){if(o==t)return e;e+=o.length+o.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let o,r=this.dom,i=null;for(let n of this.children){if(7&n.flags){if(!n.dom&&(o=i?i.nextSibling:r.firstChild)){let t=ds.get(o);(!t||!t.parent&&t.canReuseDOM(n))&&n.reuseDOM(o)}n.sync(t,e),n.flags&=-8}if(o=i?i.nextSibling:r.firstChild,e&&!e.written&&e.node==r&&o!=n.dom&&(e.written=!0),n.dom.parentNode==r)for(;o&&o!=n.dom;)o=cs(o);else r.insertBefore(n.dom,o);i=n.dom}for(o=i?i.nextSibling:r.firstChild,o&&e&&e.node==r&&(e.written=!0);o;)o=cs(o)}else if(1&this.flags)for(let o of this.children)7&o.flags&&(o.sync(t,e),o.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,e){let o;if(t==this.dom)o=this.dom.childNodes[e];else{let r=0==Ia(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==r&&e.firstChild!=e.lastChild&&(r=t==e.firstChild?-1:1),t=e}o=r<0?t:t.nextSibling}if(o==this.dom.firstChild)return 0;for(;o&&!ds.get(o);)o=o.nextSibling;if(!o)return this.length;for(let t=0,e=0;;t++){let r=this.children[t];if(r.dom==o)return e;e+=r.length+r.breakAfter}}domBoundsAround(t,e,o=0){let r=-1,i=-1,n=-1,a=-1;for(let s=0,l=o,d=o;s<this.children.length;s++){let o=this.children[s],c=l+o.length;if(l<t&&c>e)return o.domBoundsAround(t,e,l);if(c>=t&&-1==r&&(r=s,i=l),l>e&&o.dom.parentNode==this.dom){n=s,a=d;break}d=c,l=c+o.breakAfter}return{from:i,to:a<0?o+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:n<this.children.length&&n>=0?this.children[n].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,o=ls){this.markDirty();for(let r=t;r<e;r++){let t=this.children[r];t.parent==this&&o.indexOf(t)<0&&t.destroy()}o.length<250?this.children.splice(t,e-t,...o):this.children=[].concat(this.children.slice(0,t),o,this.children.slice(e));for(let t=0;t<o.length;t++)o[t].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new hs(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,e,o,r,i,n){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!(8&(this.flags|t.flags))}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}function cs(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}ds.prototype.breakAfter=0;class hs{constructor(t,e,o){this.children=t,this.pos=e,this.i=o,this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let o=this.children[--this.i];this.pos-=o.length+o.breakAfter}}}function ps(t,e,o,r,i,n,a,s,l){let{children:d}=t,c=d.length?d[e]:null,h=n.length?n[n.length-1]:null,p=h?h.breakAfter:a;if(!(e==r&&c&&!a&&!p&&n.length<2&&c.merge(o,i,n.length?h:null,0==o,s,l))){if(r<d.length){let t=d[r];t&&(i<t.length||t.breakAfter&&(null==h?void 0:h.breakAfter))?(e==r&&(t=t.split(i),i=0),!p&&h&&t.merge(0,i,h,!0,0,l)?n[n.length-1]=t:((i||t.children.length&&!t.children[0].length)&&t.merge(0,i,null,!1,0,l),n.push(t))):(null==t?void 0:t.breakAfter)&&(h?h.breakAfter=1:a=1),r++}for(c&&(c.breakAfter=a,o>0&&(!a&&n.length&&c.merge(o,c.length,n[0],!1,s,0)?c.breakAfter=n.shift().breakAfter:(o<c.length||c.children.length&&0==c.children[c.children.length-1].length)&&c.merge(o,c.length,null,!1,s,0),e++));e<r&&n.length;)if(d[r-1].become(n[n.length-1]))r--,n.pop(),l=n.length?0:s;else{if(!d[e].become(n[0]))break;e++,n.shift(),s=n.length?0:l}!n.length&&e&&r<d.length&&!d[e-1].breakAfter&&d[r].merge(0,0,d[e-1],!1,s,l)&&e--,(e<r||n.length)&&t.replaceChildren(e,r,n)}}function us(t,e,o,r,i,n){let a=t.childCursor(),{i:s,off:l}=a.findPos(o,1),{i:d,off:c}=a.findPos(e,-1),h=e-o;for(let t of r)h+=t.length;t.length+=h,ps(t,d,c,s,l,r,0,i,n)}let ms="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},fs="undefined"!=typeof document?document:{documentElement:{style:{}}};const bs=/Edge\/(\d+)/.exec(ms.userAgent),gs=/MSIE \d/.test(ms.userAgent),vs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ms.userAgent),Os=!!(gs||vs||bs),xs=!Os&&/gecko\/(\d+)/i.test(ms.userAgent),ys=!Os&&/Chrome\/(\d+)/.exec(ms.userAgent),ws="webkitFontSmoothing"in fs.documentElement.style,ks=!Os&&/Apple Computer/.test(ms.vendor),qs=ks&&(/Mobile\/\w+/.test(ms.userAgent)||ms.maxTouchPoints>2);var Ss={mac:qs||/Mac/.test(ms.platform),windows:/Win/.test(ms.platform),linux:/Linux|X11/.test(ms.platform),ie:Os,ie_version:gs?fs.documentMode||6:vs?+vs[1]:bs?+bs[1]:0,gecko:xs,gecko_version:xs?+(/Firefox\/(\d+)/.exec(ms.userAgent)||[0,0])[1]:0,chrome:!!ys,chrome_version:ys?+ys[1]:0,ios:qs,android:/Android\b/.test(ms.userAgent),webkit:ws,safari:ks,webkit_version:ws?+(/\bAppleWebKit\/(\d+)/.exec(ms.userAgent)||[0,0])[1]:0,tabSize:null!=fs.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class Qs extends ds{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,o){return!(8&this.flags||o&&(!(o instanceof Qs)||this.length-(e-t)+o.length>256||8&o.flags)||(this.text=this.text.slice(0,t)+(o?o.text:"")+this.text.slice(e),this.markDirty(),0))}split(t){let e=new Qs(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new ss(this.dom,t)}domBoundsAround(t,e,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,o){let r=t.nodeValue.length;e>r&&(e=r);let i=e,n=e,a=0;0==e&&o<0||e==r&&o>=0?Ss.chrome||Ss.gecko||(e?(i--,a=1):n<r&&(n++,a=-1)):o<0?i--:n<r&&n++;let s=es(t,i,n).getClientRects();if(!s.length)return null;let l=s[(a?a<0:o>=0)?0:s.length-1];return Ss.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,t=>t.width)||l),a?Ga(l,a<0):l||null}(this.dom,t,e)}}class $s extends ds{constructor(t,e=[],o=0){super(),this.mark=t,this.children=e,this.length=o;for(let t of e)t.setParent(this)}setAttrs(t){if(rs(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof $s&&o.mark.eq(this.mark))||t&&i<=0||e<this.length&&n<=0)||(us(this,t,e,o?o.children.slice():[],i-1,n-1),this.markDirty(),0))}split(t){let e=[],o=0,r=-1,i=0;for(let n of this.children){let a=o+n.length;a>t&&e.push(o<t?n.split(t-o):n),r<0&&o>=t&&(r=i),o=a,i++}let n=this.length-t;return this.length=t,r>-1&&(this.children.length=r,this.markDirty()),new $s(this.mark,e,n)}domAtPos(t){return Ts(this,t)}coordsAt(t,e){return Rs(this,t,e)}}class Ps extends ds{static create(t,e,o){return new Ps(t,e,o)}constructor(t,e,o){super(),this.widget=t,this.length=e,this.side=o,this.prevWidget=null}split(t){let e=Ps.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof Ps&&this.widget.compare(o.widget))||t>0&&i<=0||e<this.length&&n<=0)||(this.length=t+(o?o.length:0)+(this.length-e),0))}become(t){return t instanceof Ps&&t.side==this.side&&this.widget.constructor==t.widget.constructor&&(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(0==this.length)return Ni.empty;let t=this;for(;t.parent;)t=t.parent;let{view:e}=t,o=e&&e.state.doc,r=this.posAtStart;return o?o.slice(r,r+this.length):Ni.empty}domAtPos(t){return(this.length?0==t:this.side>0)?ss.before(this.dom):ss.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let o=this.widget.coordsAt(this.dom,t,e);if(o)return o;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let n=this.side?this.side<0:t>0;for(let e=n?r.length-1:0;i=r[e],!(t>0?0==e:e==r.length-1||i.top<i.bottom);e+=n?-1:1);return Ga(i,!n)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Cs extends ds{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof Cs&&t.side==this.side}split(){return new Cs(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?ss.before(this.dom):ss.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ni.empty}get isHidden(){return!0}}function Ts(t,e){let o=t.dom,{children:r}=t,i=0;for(let t=0;i<r.length;i++){let n=r[i],a=t+n.length;if(!(a==t&&n.getSide()<=0)){if(e>t&&e<a&&n.dom.parentNode==o)return n.domAtPos(e-t);if(e<=t)break;t=a}}for(let t=i;t>0;t--){let e=r[t-1];if(e.dom.parentNode==o)return e.domAtPos(e.length)}for(let t=i;t<r.length;t++){let e=r[t];if(e.dom.parentNode==o)return e.domAtPos(0)}return new ss(o,0)}function As(t,e,o){let r,{children:i}=t;o>0&&e instanceof $s&&i.length&&(r=i[i.length-1])instanceof $s&&r.mark.eq(e.mark)?As(r,e.children[0],o-1):(i.push(e),e.setParent(t)),t.length+=e.length}function Rs(t,e,o){let r=null,i=-1,n=null,a=-1;!function t(e,s){for(let l=0,d=0;l<e.children.length&&d<=s;l++){let c=e.children[l],h=d+c.length;h>=s&&(c.children.length?t(c,s-d):(!n||n.isHidden&&(o>0||zs(n,c)))&&(h>s||d==h&&c.getSide()>0)?(n=c,a=s-d):(d<s||d==h&&c.getSide()<0&&!c.isHidden)&&(r=c,i=s-d)),d=h}}(t,e);let s=(o<0?r:n)||r||n;return s?s.coordsAt(Math.max(0,s==r?i:a),o):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let o=Va(e);return o[o.length-1]||null}(t)}function zs(t,e){let o=t.coordsAt(0,1),r=e.coordsAt(0,1);return o&&r&&r.top<o.bottom}function Ms(t,e){for(let o in t)"class"==o&&e.class?e.class+=" "+t.class:"style"==o&&e.style?e.style+=";"+t.style:e[o]=t[o];return e}Qs.prototype.children=Ps.prototype.children=Cs.prototype.children=ls;const Es=Object.create(null);function Zs(t,e,o){if(t==e)return!0;t||(t=Es),e||(e=Es);let r=Object.keys(t),i=Object.keys(e);if(r.length-(o&&r.indexOf(o)>-1?1:0)!=i.length-(o&&i.indexOf(o)>-1?1:0))return!1;for(let n of r)if(n!=o&&(-1==i.indexOf(n)||t[n]!==e[n]))return!1;return!0}function Xs(t,e,o){let r=!1;if(e)for(let i in e)o&&i in o||(r=!0,"style"==i?t.style.cssText="":t.removeAttribute(i));if(o)for(let i in o)e&&e[i]==o[i]||(r=!0,"style"==i?t.style.cssText=o[i]:t.setAttribute(i,o[i]));return r}function _s(t){let e=Object.create(null);for(let o=0;o<t.attributes.length;o++){let r=t.attributes[o];e[r.name]=r.value}return e}class js{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,o){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var Ds=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Ds||(Ds={}));class Ys extends da{constructor(t,e,o,r){super(),this.startSide=t,this.endSide=e,this.widget=o,this.spec=r}get heightRelevant(){return!1}static mark(t){return new Vs(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),o=!!t.block;return e+=o&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new Us(t,e,e,o,t.widget||null,!1)}static replace(t){let e,o,r=!!t.block;if(t.isBlockGap)e=-5e8,o=4e8;else{let{start:i,end:n}=Bs(t,r);e=(i?r?-3e8:-1:5e8)-1,o=1+(n?r?2e8:1:-6e8)}return new Us(t,e,o,r,t.widget||null,!0)}static line(t){return new Ls(t)}static set(t,e=!1){return ua.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Ys.none=ua.empty;class Vs extends Ys{constructor(t){let{start:e,end:o}=Bs(t);super(e?-1:5e8,o?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,o;return this==t||t instanceof Vs&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(o=t.attrs)||void 0===o?void 0:o.class))&&Zs(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Vs.prototype.point=!1;class Ls extends Ys{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof Ls&&this.spec.class==t.spec.class&&Zs(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}Ls.prototype.mapMode=hn.TrackBefore,Ls.prototype.point=!0;class Us extends Ys{constructor(t,e,o,r,i,n){super(e,o,i,t),this.block=r,this.isReplace=n,this.mapMode=r?e<=0?hn.TrackBefore:hn.TrackAfter:hn.TrackDel}get type(){return this.startSide!=this.endSide?Ds.WidgetRange:this.startSide<=0?Ds.WidgetBefore:Ds.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof Us&&function(t,e){return t==e||!!(t&&e&&t.compare(e))}(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function Bs(t,e=!1){let{inclusiveStart:o,inclusiveEnd:r}=t;return null==o&&(o=t.inclusive),null==r&&(r=t.inclusive),{start:null!=o?o:e,end:null!=r?r:e}}function Ws(t,e,o,r=0){let i=o.length-1;i>=0&&o[i]+r>=t?o[i]=Math.max(o[i],e):o.push(t,e)}Us.prototype.point=!0;class Is extends ds{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,o,r,i,n){if(o){if(!(o instanceof Is))return!1;this.dom||o.transferDOM(this)}return r&&this.setDeco(o?o.attrs:null),us(this,t,e,o?o.children.slice():[],i,n),!0}split(t){let e=new Is;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:o,off:r}=this.childPos(t);r&&(e.append(this.children[o].split(r),0),this.children[o].merge(r,this.children[o].length,null,!1,0,0),o++);for(let t=o;t<this.children.length;t++)e.append(this.children[t],0);for(;o>0&&0==this.children[o-1].length;)this.children[--o].destroy();return this.children.length=o,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){Zs(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){As(this,t,e)}addLineDeco(t){let e=t.spec.attributes,o=t.spec.class;e&&(this.attrs=Ms(e,this.attrs||{})),o&&(this.attrs=Ms({class:o},this.attrs||{}))}domAtPos(t){return Ts(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var o;this.dom?4&this.flags&&(rs(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Xs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let r=this.dom.lastChild;for(;r&&ds.get(r)instanceof $s;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(o=ds.get(r))||void 0===o?void 0:o.isEditable)||Ss.ios&&this.children.some(t=>t instanceof Qs)))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let o of this.children){if(!(o instanceof Qs)||/[^ -~]/.test(o.text))return null;let r=Va(o.dom);if(1!=r.length)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let o=Rs(this,t,e);if(!this.children.length&&o&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=o.bottom-o.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight<e){let r=(e-t.textHeight)/2;return{top:o.top+r,bottom:o.bottom-r,left:o.left,right:o.left}}}return o}become(t){return t instanceof Is&&0==this.children.length&&0==t.children.length&&Zs(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,e){for(let o=0,r=0;o<t.children.length;o++){let i=t.children[o],n=r+i.length;if(n>=e){if(i instanceof Is)return i;if(n>e)break}r=n+i.breakAfter}return null}}class Gs extends ds{constructor(t,e,o){super(),this.widget=t,this.length=e,this.deco=o,this.breakAfter=0,this.prevWidget=null}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof Gs&&this.widget.compare(o.widget))||t>0&&i<=0||e<this.length&&n<=0)||(this.length=t+(o?o.length:0)+(this.length-e),0))}domAtPos(t){return 0==t?ss.before(this.dom):ss.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let o=new Gs(this.widget,e,this.deco);return o.breakAfter=this.breakAfter,o}get children(){return ls}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ni.empty}domBoundsAround(){return null}become(t){return t instanceof Gs&&t.widget.constructor==this.widget.constructor&&(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,e){return this.widget.coordsAt(this.dom,t,e)||(this.widget instanceof Ns?null:Ga(this.dom.getBoundingClientRect(),this.length?0==t:e<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:e,endSide:o}=this.deco;return e!=o&&(t<0?e<0:o>0)}}class Ns extends js{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Fs{constructor(t,e,o,r){this.doc=t,this.pos=e,this.end=o,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof Gs&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Is),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Hs(new Cs(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof Gs||this.getLine()}buildText(t,e,o){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:o,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let r=Math.min(this.text.length-this.textOff,t),i=Math.min(r,512);this.flushBuffer(e.slice(e.length-o)),this.getLine().append(Hs(new Qs(this.text.slice(this.textOff,this.textOff+i)),e),o),this.atCursorPos=!0,this.textOff+=i,t-=i,o=r<=i?0:e.length}}span(t,e,o,r){this.buildText(e-t,o,r),this.pos=e,this.openStart<0&&(this.openStart=r)}point(t,e,o,r,i,n){if(this.disallowBlockEffectsFor[n]&&o instanceof Us){if(o.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=e-t;if(o instanceof Us)if(o.block)o.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Gs(o.widget||Ks.block,a,o));else{let n=Ps.create(o.widget||Ks.inline,a,a?0:o.startSide),s=this.atCursorPos&&!n.isEditable&&i<=r.length&&(t<e||o.startSide>0),l=!n.isEditable&&(t<e||i>r.length||o.startSide<=0),d=this.getLine();2!=this.pendingBuffer||s||n.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),s&&(d.append(Hs(new Cs(1),r),i),i=r.length+Math.max(0,i-r.length)),d.append(Hs(n,r),i),this.atCursorPos=l,this.pendingBuffer=l?t<e||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(o);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=i)}static build(t,e,o,r,i){let n=new Fs(t,e,o,i);return n.openEnd=ua.spans(r,e,o,n),n.openStart<0&&(n.openStart=n.openEnd),n.finish(n.openEnd),n}}function Hs(t,e){for(let o of e)t=new $s(o,[t],t.length);return t}class Ks extends js{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ks.inline=new Ks("span"),Ks.block=new Ks("div");var Js=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Js||(Js={}));const tl=Js.LTR,el=Js.RTL;function ol(t){let e=[];for(let o=0;o<t.length;o++)e.push(1<<+t[o]);return e}const rl=ol("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),il=ol("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),nl=Object.create(null),al=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),o=t.charCodeAt(1);nl[e]=o,nl[o]=-e}function sl(t){return t<=247?rl[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?il[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const ll=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class dl{get dir(){return this.level%2?el:tl}constructor(t,e,o){this.from=t,this.to=e,this.level=o}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,o,r){let i=-1;for(let n=0;n<t.length;n++){let a=t[n];if(a.from<=e&&a.to>=e){if(a.level==o)return n;(i<0||(0!=r?r<0?a.from<e:a.to>e:t[i].level>a.level))&&(i=n)}}if(i<0)throw new RangeError("Index out of range");return i}}function cl(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++){let r=t[o],i=e[o];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!cl(r.inner,i.inner))return!1}return!0}const hl=[];function pl(t,e,o,r,i,n,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,d=0;l<o;){let e=!0,c=!1;if(d==n.length||l<n[d].from){let t=hl[l];t!=s&&(e=!1,c=16==t)}let h=e||1!=s?null:[],p=e?r:r+1,u=l;t:for(;;)if(d<n.length&&u==n[d].from){if(c)break t;let m=n[d];if(!e)for(let t=m.to,e=d+1;;){if(t==o)break t;if(!(e<n.length&&n[e].from==t)){if(hl[t]==s)break t;break}t=n[e++].to}d++,h?h.push(m):(m.from>l&&a.push(new dl(l,m.from,p)),ul(t,m.direction==tl!=!(p%2)?r+1:r,i,m.inner,m.from,m.to,a),l=m.to),u=m.to}else{if(u==o||(e?hl[u]!=s:hl[u]==s))break;u++}h?pl(t,l,u,r+1,i,h,a):l<u&&a.push(new dl(l,u,p)),l=u}else for(let l=o,d=n.length;l>e;){let o=!0,c=!1;if(!d||l>n[d-1].to){let t=hl[l-1];t!=s&&(o=!1,c=16==t)}let h=o||1!=s?null:[],p=o?r:r+1,u=l;t:for(;;)if(d&&u==n[d-1].to){if(c)break t;let m=n[--d];if(!o)for(let t=m.from,o=d;;){if(t==e)break t;if(!o||n[o-1].to!=t){if(hl[t-1]==s)break t;break}t=n[--o].from}h?h.push(m):(m.to<l&&a.push(new dl(m.to,l,p)),ul(t,m.direction==tl!=!(p%2)?r+1:r,i,m.inner,m.from,m.to,a),l=m.from),u=m.from}else{if(u==e||(o?hl[u-1]!=s:hl[u-1]==s))break;u--}h?pl(t,u,l,r+1,i,h,a):u<l&&a.push(new dl(u,l,p)),l=u}}function ul(t,e,o,r,i,n,a){let s=e%2?2:1;!function(t,e,o,r,i){for(let n=0;n<=r.length;n++){let a=n?r[n-1].to:e,s=n<r.length?r[n].from:o,l=n?256:i;for(let e=a,o=l,r=l;e<s;e++){let i=sl(t.charCodeAt(e));512==i?i=o:8==i&&4==r&&(i=16),hl[e]=4==i?2:i,7&i&&(r=i),o=i}for(let t=a,e=l,r=l;t<s;t++){let i=hl[t];if(128==i)t<s-1&&e==hl[t+1]&&24&e?i=hl[t]=e:hl[t]=256;else if(64==i){let i=t+1;for(;i<s&&64==hl[i];)i++;let n=t&&8==e||i<o&&8==hl[i]?1==r?1:8:256;for(let e=t;e<i;e++)hl[e]=n;t=i-1}else 8==i&&1==r&&(hl[t]=1);e=i,7&i&&(r=i)}}}(t,i,n,r,s),function(t,e,o,r,i){let n=1==i?2:1;for(let a=0,s=0,l=0;a<=r.length;a++){let d=a?r[a-1].to:e,c=a<r.length?r[a].from:o;for(let e,o,r,a=d;a<c;a++)if(o=nl[e=t.charCodeAt(a)])if(o<0){for(let t=s-3;t>=0;t-=3)if(al[t+1]==-o){let e=al[t+2],o=2&e?i:4&e?1&e?n:i:0;o&&(hl[a]=hl[al[t]]=o),s=t;break}}else{if(189==al.length)break;al[s++]=a,al[s++]=e,al[s++]=l}else if(2==(r=hl[a])||1==r){let t=r==i;l=t?0:1;for(let e=s-3;e>=0;e-=3){let o=al[e+2];if(2&o)break;if(t)al[e+2]|=2;else{if(4&o)break;al[e+2]|=4}}}}}(t,i,n,r,s),function(t,e,o,r){for(let i=0,n=r;i<=o.length;i++){let a=i?o[i-1].to:t,s=i<o.length?o[i].from:e;for(let l=a;l<s;){let a=hl[l];if(256==a){let a=l+1;for(;;)if(a==s){if(i==o.length)break;a=o[i++].to,s=i<o.length?o[i].from:e}else{if(256!=hl[a])break;a++}let d=1==n,c=d==(1==(a<e?hl[a]:r))?d?1:2:r;for(let e=a,r=i,n=r?o[r-1].to:t;e>l;)e==n&&(e=o[--r].from,n=r?o[r-1].to:t),hl[--e]=c;l=a}else n=a,l++}}}(i,n,r,s),pl(t,i,n,e,o,r,a)}function ml(t){return[new dl(0,t,0)]}let fl="";function bl(t,e,o,r,i){var n;let a=r.head-t.from,s=dl.find(e,a,null!==(n=r.bidiLevel)&&void 0!==n?n:-1,r.assoc),l=e[s],d=l.side(i,o);if(a==d){let t=s+=i?1:-1;if(t<0||t>=e.length)return null;l=e[s=t],a=l.side(!i,o),d=l.side(i,o)}let c=an(t.text,a,l.forward(i,o));(c<l.from||c>l.to)&&(c=d),fl=t.text.slice(Math.min(a,c),Math.max(a,c));let h=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return h&&c==d&&h.level+(i?0:1)<l.level?yn.cursor(h.side(!i,o)+t.from,h.forward(i,o)?1:-1,h.level):yn.cursor(c+t.from,l.forward(i,o)?-1:1,l.level)}function gl(t,e,o){for(let r=e;r<o;r++){let e=sl(t.charCodeAt(r));if(1==e)return tl;if(2==e||4==e)return el}return tl}const vl=qn.define(),Ol=qn.define(),xl=qn.define(),yl=qn.define(),wl=qn.define(),kl=qn.define(),ql=qn.define(),Sl=qn.define(),Ql=qn.define(),$l=qn.define({combine:t=>t.some(t=>t)}),Pl=qn.define({combine:t=>t.some(t=>t)}),Cl=qn.define();class Tl{constructor(t,e="nearest",o="nearest",r=5,i=5,n=!1){this.range=t,this.y=e,this.x=o,this.yMargin=r,this.xMargin=i,this.isSnapshot=n}map(t){return t.empty?this:new Tl(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new Tl(yn.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Al=Fn.define({map:(t,e)=>t.map(e)}),Rl=Fn.define();function zl(t,e,o){let r=t.facet(yl);r.length?r[0](e):window.onerror&&window.onerror(String(e),o,void 0,void 0,e)||(o?console.error(o+":",e):console.error(e))}const Ml=qn.define({combine:t=>!t.length||t[0]});let El=0;const Zl=qn.define({combine:t=>t.filter((e,o)=>{for(let r=0;r<o;r++)if(t[r].plugin==e.plugin)return!1;return!0})});class Xl{constructor(t,e,o,r,i){this.id=t,this.create=e,this.domEventHandlers=o,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(Zl.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(Zl.of({plugin:this,arg:t}))}static define(t,e){const{eventHandlers:o,eventObservers:r,provide:i,decorations:n}=e||{};return new Xl(El++,t,o,r,t=>{let e=[];return n&&e.push(Yl.of(e=>{let o=e.plugin(t);return o?n(o):Ys.none})),i&&e.push(i(t)),e})}static fromClass(t,e){return Xl.define((e,o)=>new t(e,o),e)}}class _l{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(zl(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(e){zl(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){zl(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const jl=qn.define(),Dl=qn.define(),Yl=qn.define(),Vl=qn.define(),Ll=qn.define(),Ul=qn.define();function Bl(t,e){let o=t.state.facet(Ul);if(!o.length)return o;let r=o.map(e=>e instanceof Function?e(t):e),i=[];return ua.spans(r,e.from,e.to,{point(){},span(t,o,r,n){let a=t-e.from,s=o-e.from,l=i;for(let t=r.length-1;t>=0;t--,n--){let o,i=r[t].spec.bidiIsolate;if(null==i&&(i=gl(e.text,a,s)),n>0&&l.length&&(o=l[l.length-1]).to==a&&o.direction==i)o.to=s,l=o.inner;else{let t={from:a,to:s,direction:i,inner:[]};l.push(t),l=t.inner}}}}),i}const Wl=qn.define();function Il(t){let e=0,o=0,r=0,i=0;for(let n of t.state.facet(Wl)){let a=n(t);a&&(null!=a.left&&(e=Math.max(e,a.left)),null!=a.right&&(o=Math.max(o,a.right)),null!=a.top&&(r=Math.max(r,a.top)),null!=a.bottom&&(i=Math.max(i,a.bottom)))}return{left:e,right:o,top:r,bottom:i}}const Gl=qn.define();class Nl{constructor(t,e,o,r){this.fromA=t,this.toA=e,this.fromB=o,this.toB=r}join(t){return new Nl(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,o=this;for(;e>0;e--){let r=t[e-1];if(!(r.fromA>o.toA)){if(r.toA<o.fromA)break;o=o.join(r),t.splice(e-1,1)}}return t.splice(e,0,o),t}static extendWithRanges(t,e){if(0==e.length)return t;let o=[];for(let r=0,i=0,n=0,a=0;;r++){let s=r==t.length?null:t[r],l=n-a,d=s?s.fromB:1e9;for(;i<e.length&&e[i]<d;){let t=e[i],r=e[i+1],n=Math.max(a,t),s=Math.min(d,r);if(n<=s&&new Nl(n+l,s+l,n,s).addToSet(o),r>d)break;i+=2}if(!s)return o;new Nl(s.fromA,s.toA,s.fromB,s.toB).addToSet(o),n=s.toA,a=s.toB}}}class Fl{constructor(t,e,o){this.view=t,this.state=e,this.transactions=o,this.flags=0,this.startState=t.state,this.changes=un.empty(this.startState.doc.length);for(let t of o)this.changes=this.changes.compose(t.changes);let r=[];this.changes.iterChangedRanges((t,e,o,i)=>r.push(new Nl(t,e,o,i))),this.changedRanges=r}static create(t,e,o){return new Fl(t,e,o)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}class Hl extends ds{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ys.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new Is],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Nl(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let o=t.changedRanges;this.minWidth>0&&o.length&&(o.every(({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?r=this.domChanged.newSel.head:function(t,e){let o=!1;return e&&t.iterChangedRanges((t,r)=>{t<e.to&&r>e.from&&(o=!0)}),o}(t.changes,this.hasComposition)||t.selectionSet||(r=t.state.selection.main.head));let i=r>-1?function(t,e,o){let r=Kl(t,o);if(!r)return null;let{node:i,from:n,to:a}=r,s=i.nodeValue;if(/[\n\r]/.test(s))return null;if(t.state.doc.sliceString(r.from,r.to)!=s)return null;let l=e.invertedDesc,d=new Nl(l.mapPos(n),l.mapPos(a),n,a),c=[];for(let e=i.parentNode;;e=e.parentNode){let o=ds.get(e);if(o instanceof $s)c.push({node:e,deco:o.mark});else{if(o instanceof Is||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:d,text:i,marks:c,line:e};if(e==t.contentDOM)return null;c.push({node:e,deco:new Vs({inclusive:!0,attributes:_s(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:r}=this.hasComposition;o=new Nl(e,r,t.changes.mapPos(e,-1),t.changes.mapPos(r,1)).addToSet(o.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(Ss.ie||Ss.chrome)&&!i&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let n=function(t,e,o){let r=new Jl;return ua.compare(t,e,o,r),r.changes}(this.decorations,this.updateDeco(),t.changes);return o=Nl.extendWithRanges(o,n),!!(7&this.flags||0!=o.length)&&(this.updateInner(o,t.startState.doc.length,i),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,o){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,o);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=Ss.chrome||Ss.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||r.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(t=>t.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let t of this.children)t instanceof Gs&&t.widget instanceof Ns&&i.push(t.dom);r.updateGaps(i)}updateChildren(t,e,o){let r=o?o.range.addToSet(t.slice()):t,i=this.childCursor(e);for(let t=r.length-1;;t--){let e=t>=0?r[t]:null;if(!e)break;let n,a,s,l,{fromA:d,toA:c,fromB:h,toB:p}=e;if(o&&o.range.fromB<p&&o.range.toB>h){let t=Fs.build(this.view.state.doc,h,o.range.fromB,this.decorations,this.dynamicDecorationMap),e=Fs.build(this.view.state.doc,o.range.toB,p,this.decorations,this.dynamicDecorationMap);a=t.breakAtStart,s=t.openStart,l=e.openEnd;let r=this.compositionView(o);e.breakAtStart?r.breakAfter=1:e.content.length&&r.merge(r.length,r.length,e.content[0],!1,e.openStart,0)&&(r.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&r.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),n=t.content.concat(r).concat(e.content)}else({content:n,breakAtStart:a,openStart:s,openEnd:l}=Fs.build(this.view.state.doc,h,p,this.decorations,this.dynamicDecorationMap));let{i:u,off:m}=i.findPos(c,1),{i:f,off:b}=i.findPos(d,-1);ps(this,f,b,u,m,n,a,s,l)}o&&this.fixCompositionDOM(o)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(Rl)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new Qs(t.text.nodeValue);e.flags|=8;for(let{deco:o}of t.marks)e=new $s(o,[e],e.length);let o=new Is;return o.append(e,0),o}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some(t=>7&t.flags)?1:0),this.markedForComposition.add(e);let o=ds.get(t);o&&o!=e&&(o.dom=null),e.setDOM(t)},o=this.childPos(t.range.fromB,1),r=this.children[o.i];e(t.line,r);for(let i=t.marks.length-1;i>=-1;i--)o=r.childPos(o.off,1),r=r.children[o.i],e(i>=0?t.marks[i].node:t.text,r)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let o=this.view.root.activeElement,r=o==this.dom,i=!r&&!(this.view.state.facet(Ml)||this.dom.tabIndex>-1)&&Ya(this.dom,this.view.observer.selectionRange)&&!(o&&this.dom.contains(o));if(!(r||e||i))return;let n=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(a.anchor)),l=a.empty?s:this.moveToLine(this.domAtPos(a.head));if(Ss.gecko&&a.empty&&!this.hasComposition&&1==(d=s).node.nodeType&&d.node.firstChild&&(0==d.offset||"false"==d.node.childNodes[d.offset-1].contentEditable)&&(d.offset==d.node.childNodes.length||"false"==d.node.childNodes[d.offset].contentEditable)){let t=document.createTextNode("");this.view.observer.ignore(()=>s.node.insertBefore(t,s.node.childNodes[s.offset]||null)),s=l=new ss(t,0),n=!0}var d;let c=this.view.observer.selectionRange;!n&&c.focusNode&&(La(s.node,s.offset,c.anchorNode,c.anchorOffset)&&La(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,a))||(this.view.observer.ignore(()=>{Ss.android&&Ss.chrome&&this.dom.contains(c.focusNode)&&function(t,e){for(let o=t;o&&o!=e;o=o.assignedSlot||o.parentNode)if(1==o.nodeType&&"false"==o.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=ja(this.view.root);if(t)if(a.empty){if(Ss.gecko){let t=(e=s.node,r=s.offset,1!=e.nodeType?0:(r&&"false"==e.childNodes[r-1].contentEditable?1:0)|(r<e.childNodes.length&&"false"==e.childNodes[r].contentEditable?2:0));if(t&&3!=t){let e=(1==t?ns:as)(s.node,s.offset);e&&(s=new ss(e.node,e.offset))}}t.collapse(s.node,s.offset),null!=a.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=a.bidiLevel)}else if(t.extend){t.collapse(s.node,s.offset);try{t.extend(l.node,l.offset)}catch(t){}}else{let e=document.createRange();a.anchor>a.head&&([s,l]=[l,s]),e.setEnd(l.node,l.offset),e.setStart(s.node,s.offset),t.removeAllRanges(),t.addRange(e)}var e,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),o&&o.focus())}),this.view.observer.setSelectionRange(s,l)),this.impreciseAnchor=s.precise?null:new ss(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new ss(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&La(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,o=ja(t.root),{anchorNode:r,anchorOffset:i}=t.observer.selectionRange;if(!(o&&e.empty&&e.assoc&&o.modify))return;let n=Is.find(this,e.head);if(!n)return;let a=n.posAtStart;if(e.head==a||e.head==a+n.length)return;let s=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!s||!l||s.bottom>l.top)return;let d=this.domAtPos(e.head+e.assoc);o.collapse(d.node,d.offset),o.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&o.collapse(r,i)}moveToLine(t){let e,o=this.dom;if(t.node!=o)return t;for(let r=t.offset;!e&&r<o.childNodes.length;r++){let t=ds.get(o.childNodes[r]);t instanceof Is&&(e=t.domAtPos(0))}for(let r=t.offset-1;!e&&r>=0;r--){let t=ds.get(o.childNodes[r]);t instanceof Is&&(e=t.domAtPos(t.length))}return e?new ss(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=ds.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let o=this.nearest(t);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(t,e)+o.posAtStart}domAtPos(t){let{i:e,off:o}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(o<t.length||t instanceof Is)break;e++,o=0}return this.children[e].domAtPos(o)}coordsAt(t,e){let o=null,r=0;for(let i=this.length,n=this.children.length-1;n>=0;n--){let a=this.children[n],s=i-a.breakAfter,l=s-a.length;if(s<t)break;if(l<=t&&(l<t||a.covers(-1))&&(s>t||a.covers(1))&&(!o||a instanceof Is&&!(o instanceof Is&&e>=0)))o=a,r=l;else if(o&&l==t&&s==t&&a instanceof Gs&&Math.abs(e)<2){if(a.deco.startSide<0)break;n&&(o=null)}i=l}return o?o.coordsAt(t-r,e):null}coordsForChar(t){let{i:e,off:o}=this.childPos(t,1),r=this.children[e];if(!(r instanceof Is))return null;for(;r.children.length;){let{i:t,off:e}=r.childPos(o,1);for(;;t++){if(t==r.children.length)return null;if((r=r.children[t]).length)break}o=e}if(!(r instanceof Qs))return null;let i=an(r.text,o);if(i==o)return null;let n=es(r.dom,o,i).getClientRects();for(let t=0;t<n.length;t++){let e=n[t];if(t==n.length-1||e.top<e.bottom&&e.left<e.right)return e}return null}measureVisibleLineHeights(t){let e=[],{from:o,to:r}=t,i=this.view.contentDOM.clientWidth,n=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==Js.LTR;for(let t=0,l=0;l<this.children.length;l++){let d=this.children[l],c=t+d.length;if(c>r)break;if(t>=o){let o=d.dom.getBoundingClientRect();if(e.push(o.height),n){let e=d.dom.lastChild,r=e?Va(e):[];if(r.length){let e=r[r.length-1],n=s?e.right-o.left:o.right-e.left;n>a&&(a=n,this.minWidth=i,this.minWidthFrom=t,this.minWidthTo=c)}}}t=c+d.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?Js.RTL:Js.LTR}measureTextSize(){for(let t of this.children)if(t instanceof Is){let e=t.measureTextSize();if(e)return e}let t,e,o,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let i=Va(r.firstChild)[0];t=r.getBoundingClientRect().height,e=i?i.width/27:7,o=i?i.height:t,r.remove()}),{lineHeight:t,charWidth:e,textHeight:o}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new hs(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let o=0,r=0;;r++){let i=r==e.viewports.length?null:e.viewports[r],n=i?i.from-1:this.length;if(n>o){let r=(e.lineBlockAt(n).bottom-e.lineBlockAt(o).top)/this.view.scaleY;t.push(Ys.replace({widget:new Ns(r),block:!0,inclusive:!0,isBlockGap:!0}).range(o,n))}if(!i)break;o=i.to+1}return Ys.set(t)}updateDeco(){let t=1,e=this.view.state.facet(Yl).map(e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e),o=!1,r=this.view.state.facet(Vl).map((t,e)=>{let r="function"==typeof t;return r&&(o=!0),r?t(this.view):t});for(r.length&&(this.dynamicDecorationMap[t++]=o,e.push(ua.join(r))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);return this.view.scrollDOM.scrollTop=e.top-t.yMargin,void(this.view.scrollDOM.scrollLeft=t.xMargin)}for(let e of this.view.state.facet(Cl))try{if(e(this.view,t.range,t))return!0}catch(t){zl(this.view.state,t,"scroll handler")}let e,{range:o}=t,r=this.coordsAt(o.head,o.empty?o.assoc:o.head>o.anchor?-1:1);if(!r)return;!o.empty&&(e=this.coordsAt(o.anchor,o.anchor>o.head?-1:1))&&(r={left:Math.min(r.left,e.left),top:Math.min(r.top,e.top),right:Math.max(r.right,e.right),bottom:Math.max(r.bottom,e.bottom)});let i=Il(this.view),n={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(t,e,o,r,i,n,a,s){let l=t.ownerDocument,d=l.defaultView||window;for(let c=t,h=!1;c&&!h;)if(1==c.nodeType){let t,p=c==l.body,u=1,m=1;if(p)t=Na(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:u,scaleY:m}=Fa(c,e)),t={left:e.left,right:e.left+c.clientWidth*u,top:e.top,bottom:e.top+c.clientHeight*m}}let f=0,b=0;if("nearest"==i)e.top<t.top?(b=e.top-(t.top+a),o>0&&e.bottom>t.bottom+b&&(b=e.bottom-t.bottom+a)):e.bottom>t.bottom&&(b=e.bottom-t.bottom+a,o<0&&e.top-b<t.top&&(b=e.top-(t.top+a)));else{let r=e.bottom-e.top,n=t.bottom-t.top;b=("center"==i&&r<=n?e.top+r/2-n/2:"start"==i||"center"==i&&o<0?e.top-a:e.bottom-n+a)-t.top}if("nearest"==r?e.left<t.left?(f=e.left-(t.left+n),o>0&&e.right>t.right+f&&(f=e.right-t.right+n)):e.right>t.right&&(f=e.right-t.right+n,o<0&&e.left<t.left+f&&(f=e.left-(t.left+n))):f=("center"==r?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==r==s?e.left-n:e.right-(t.right-t.left)+n)-t.left,f||b)if(p)d.scrollBy(f,b);else{let t=0,o=0;if(b){let t=c.scrollTop;c.scrollTop+=b/m,o=(c.scrollTop-t)*m}if(f){let e=c.scrollLeft;c.scrollLeft+=f/u,t=(c.scrollLeft-e)*u}e={left:e.left-t,top:e.top-o,right:e.right-t,bottom:e.bottom-o},t&&Math.abs(t-f)<1&&(r="nearest"),o&&Math.abs(o-b)<1&&(i="nearest")}if(p)break;(e.top<t.top||e.bottom>t.bottom||e.left<t.left||e.right>t.right)&&(e={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)}),c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,n,o.head<o.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,a),-a),Math.max(Math.min(t.yMargin,s),-s),this.view.textDirection==Js.LTR)}}function Kl(t,e){let o=t.observer.selectionRange;if(!o.focusNode)return null;let r=ns(o.focusNode,o.focusOffset),i=as(o.focusNode,o.focusOffset),n=r||i;if(i&&r&&i.node!=r.node){let e=ds.get(i.node);if(!e||e instanceof Qs&&e.text!=i.node.nodeValue)n=i;else if(t.docView.lastCompositionAfterCursor){let t=ds.get(r.node);!t||t instanceof Qs&&t.text!=r.node.nodeValue||(n=i)}}if(t.docView.lastCompositionAfterCursor=n!=r,!n)return null;let a=e-n.offset;return{from:a,to:a+n.node.nodeValue.length,node:n.node}}let Jl=class{constructor(){this.changes=[]}compareRange(t,e){Ws(t,e,this.changes)}comparePoint(t,e){Ws(t,e,this.changes)}boundChange(t){Ws(t,t,this.changes)}};function td(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function ed(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function od(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function rd(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function id(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function nd(t,e,o){let r,i,n,a,s,l,d,c,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=Va(p);for(let u=0;u<t.length;u++){let m=t[u];i&&od(i,m)&&(m=rd(id(m,i.bottom),i.top));let f=td(e,m),b=ed(o,m);if(0==f&&0==b)return 3==p.nodeType?ad(p,e,o):nd(p,e,o);(!r||a>b||a==b&&n>f)&&(r=p,i=m,n=f,a=b,h=!f||(e<m.left?u>0:u<t.length-1)),0==f?o>m.bottom&&(!d||d.bottom<m.bottom)?(s=p,d=m):o<m.top&&(!c||c.top>m.top)&&(l=p,c=m):d&&od(d,m)?d=id(d,m.bottom):c&&od(c,m)&&(c=rd(c,m.top))}}if(d&&d.bottom>=o?(r=s,i=d):c&&c.top<=o&&(r=l,i=c),!r)return{node:t,offset:0};let p=Math.max(i.left,Math.min(i.right,e));return 3==r.nodeType?ad(r,p,o):h&&"false"!=r.contentEditable?nd(r,p,o):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0)}}function ad(t,e,o){let r=t.nodeValue.length,i=-1,n=1e9,a=0;for(let s=0;s<r;s++){let r=es(t,s,s+1).getClientRects();for(let l=0;l<r.length;l++){let d=r[l];if(d.top==d.bottom)continue;a||(a=e-d.left);let c=(d.top>o?d.top-o:o-d.bottom)-1;if(d.left-1<=e&&d.right+1>=e&&c<n){let o=e>=(d.left+d.right)/2,r=o;if((Ss.chrome||Ss.gecko)&&es(t,s).getBoundingClientRect().left==d.right&&(r=!o),c<=0)return{node:t,offset:s+(r?1:0)};i=s+(r?1:0),n=c}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function sd(t,e,o,r=-1){var i,n;let a,s=t.contentDOM.getBoundingClientRect(),l=s.top+t.viewState.paddingTop,{docHeight:d}=t.viewState,{x:c,y:h}=e,p=h-l;if(p<0)return 0;if(p>d)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,i=!1;a=t.elementAtHeight(p),a.type!=Ds.Text;)for(;p=r>0?a.bottom+e:a.top-e,!(p>=0&&p<=d);){if(i)return o?null:0;i=!0,r=-r}h=l+p;let u=a.from;if(u<t.viewport.from)return 0==t.viewport.from?0:o?null:ld(t,s,a,c,h);if(u>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:o?null:ld(t,s,a,c,h);let m=t.dom.ownerDocument,f=t.root.elementFromPoint?t.root:m,b=f.elementFromPoint(c,h);b&&!t.contentDOM.contains(b)&&(b=null),b||(c=Math.max(s.left+1,Math.min(s.right-1,c)),b=f.elementFromPoint(c,h),b&&!t.contentDOM.contains(b)&&(b=null));let g,v=-1;if(b&&0!=(null===(i=t.docView.nearest(b))||void 0===i?void 0:i.isEditable)){if(m.caretPositionFromPoint){let t=m.caretPositionFromPoint(c,h);t&&({offsetNode:g,offset:v}=t)}else if(m.caretRangeFromPoint){let t=m.caretRangeFromPoint(c,h);t&&({startContainer:g,startOffset:v}=t)}g&&(!t.contentDOM.contains(g)||Ss.safari&&function(t,e,o){return dd(t,e,o)}(g,v,c)||Ss.chrome&&function(t,e,o){if(0!=e)return dd(t,e,o);for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}return o-(1==t.nodeType?t.getBoundingClientRect():es(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(g,v,c))&&(g=void 0),g&&(v=Math.min(Ia(g),v))}if(!g||!t.docView.dom.contains(g)){let e=Is.find(t.docView,u);if(!e)return p>a.top+a.height/2?a.to:a.from;({node:g,offset:v}=nd(e.dom,c,h))}let O=t.docView.nearest(g);if(!O)return null;if(O.isWidget&&1==(null===(n=O.dom)||void 0===n?void 0:n.nodeType)){let t=O.dom.getBoundingClientRect();return e.y<t.top||e.y<=t.bottom&&e.x<=(t.left+t.right)/2?O.posAtStart:O.posAtEnd}return O.localPosFromDOM(g,v)+O.posAtStart}function ld(t,e,o,r,i){let n=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&o.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;n+=Math.floor((i-o.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(o.from,o.to);return o.from+Qa(a,n,t.state.tabSize)}function dd(t,e,o){let r,i=t;if(3!=t.nodeType||e!=(r=t.nodeValue.length))return!1;for(;;){let t=i.nextSibling;if(t){if("BR"==t.nodeName)break;return!1}{let t=i.parentNode;if(!t||"DIV"==t.nodeName)break;i=t}}return es(t,r-1,r).getBoundingClientRect().right>o}function cd(t,e,o){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let t;for(let i of r.type){if(i.from>e)break;if(!(i.to<e)){if(i.from<e&&i.to>e)return i;t&&(i.type!=Ds.Text||t.type==i.type&&!(o<0?i.from<e:i.to>e))||(t=i)}}return t||r}return r}function hd(t,e,o,r){let i=t.state.doc.lineAt(e.head),n=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let e=bl(i,n,a,s,o),d=fl;if(!e){if(i.number==(o?t.state.doc.lines:1))return s;d="\n",i=t.state.doc.line(i.number+(o?1:-1)),n=t.bidiSpans(i),e=t.visualLineSide(i,!o)}if(l){if(!l(d))return s}else{if(!r)return e;l=r(d)}s=e}}function pd(t,e,o){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(t,i,n)=>{if(e>t&&e<i){let n=r||o||(e-t<i-e?-1:1);e=n<0?t:i,r=n}});if(!r)return e}}function ud(t,e){let o=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],n=null;if(i.empty){let e=pd(t,i.from,0);e!=i.from&&(n=yn.cursor(e,-1))}else{let e=pd(t,i.from,-1),o=pd(t,i.to,1);e==i.from&&o==i.to||(n=yn.range(i.from==i.anchor?e:o,i.from==i.head?e:o))}n&&(o||(o=e.ranges.slice()),o[r]=n)}return o?yn.create(o,e.mainIndex):e}function md(t,e,o){let r=pd(t.state.facet(Ll).map(e=>e(t)),o.from,e.head>o.from?-1:1);return r==o.from?o:yn.cursor(r,r<o.from?1:-1)}const fd="";class bd{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(sa.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=fd}readRange(t,e){if(!t)return this;let o=t.parentNode;for(let r=t;;){this.findPointBefore(o,r);let t=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==e)break;let n=ds.get(r),a=ds.get(i);(n&&a?n.breakAfter:(n?n.breakAfter:Ba(r))||Ba(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>t)&&this.lineBreak(),r=i}return this.findPointBefore(o,e),this}readTextNode(t){let e=t.nodeValue;for(let o of this.points)o.node==t&&(o.pos=this.text.length+Math.min(o.offset,e.length));for(let o=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,n=-1,a=1;if(this.lineSeparator?(n=e.indexOf(this.lineSeparator,o),a=this.lineSeparator.length):(i=r.exec(e))&&(n=i.index,a=i[0].length),this.append(e.slice(o,n<0?e.length:n)),n<0)break;if(this.lineBreak(),a>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=a-1);o=n+a}}readNode(t){if(t.cmIgnore)return;let e=ds.get(t),o=e&&e.overrideDOMText;if(null!=o){this.findPointInside(t,o.length);for(let t=o.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let o of this.points)o.node==t&&t.childNodes[o.offset]==e&&(o.pos=this.text.length)}findPointInside(t,e){for(let o of this.points)(3==t.nodeType?o.node==t:t.contains(o.node))&&(o.pos=this.text.length+(gd(t,o.node,o.offset)?e:0))}}function gd(t,e,o){for(;;){if(!e||o<Ia(e))return!1;if(e==t)return!0;o=Ua(e)+1,e=e.parentNode}}class vd{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class Od{constructor(t,e,o,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:i,impreciseAnchor:n}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,o,0))){let e=i||n?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:o,anchorOffset:r,focusNode:i,focusOffset:n}=t.observer.selectionRange;return o&&(e.push(new vd(o,r)),i==o&&n==r||e.push(new vd(i,n))),e}(t),o=new bd(e,t.state);o.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=o.text,this.newSel=function(t,e){if(0==t.length)return null;let o=t[0].pos,r=2==t.length?t[1].pos:o;return o>-1&&r>-1?yn.single(o+e,r+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,o=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!Da(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),r=n&&n.node==e.anchorNode&&n.offset==e.anchorOffset||!Da(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),a=t.viewport;if((Ss.ios||Ss.chrome)&&t.state.selection.main.empty&&o!=r&&(a.from>0||a.to<t.state.doc.length)){let e=Math.min(o,r),i=Math.max(o,r),n=a.from-e,s=a.to-i;0!=n&&1!=n&&0!=e||0!=s&&-1!=s&&i!=t.state.doc.length||(o=0,r=t.state.doc.length)}this.newSel=yn.single(r,o)}}}function xd(t,e){let o,{newSel:r}=e,i=t.state.selection.main,n=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:r,to:a}=e.bounds,s=i.from,l=null;(8===n||Ss.android&&e.text.length<a-r)&&(s=i.to,l="end");let d=function(t,e,o,r){let i=Math.min(t.length,e.length),n=0;for(;n<i&&t.charCodeAt(n)==e.charCodeAt(n);)n++;if(n==i&&t.length==e.length)return null;let a=t.length,s=e.length;for(;a>0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;return"end"==r&&(o-=a+Math.max(0,n-Math.min(a,s))-n),a<n&&t.length<e.length?(n-=o<=n&&o>=a?n-o:0,s=n+(s-a),a=n):s<n&&(n-=o<=n&&o>=s?n-o:0,a=n+(a-s),s=n),{from:n,toA:a,toB:s}}(t.state.doc.sliceString(r,a,fd),e.text,s-r,l);d&&(Ss.chrome&&13==n&&d.toB==d.from+2&&e.text.slice(d.from,d.toB)==fd+fd&&d.toB--,o={from:r+d.from,to:r+d.toA,insert:Ni.of(e.text.slice(d.from,d.toB).split(fd))})}else r&&(!t.hasFocus&&t.state.facet(Ml)||r.main.eq(i))&&(r=null);if(!o&&!r)return!1;if(!o&&e.typeOver&&!i.empty&&r&&r.main.empty?o={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(Ss.mac||Ss.android)&&o&&o.from==o.to&&o.from==i.head-1&&/^\. ?$/.test(o.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(r&&2==o.insert.length&&(r=yn.single(r.main.anchor-1,r.main.head-1)),o={from:o.from,to:o.to,insert:Ni.of([o.insert.toString().replace("."," ")])}):o&&o.from>=i.from&&o.to<=i.to&&(o.from!=i.from||o.to!=i.to)&&i.to-i.from-(o.to-o.from)<=4?o={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,o.from).append(o.insert).append(t.state.doc.slice(o.to,i.to))}:Ss.chrome&&o&&o.from==o.to&&o.from==i.head&&"\n "==o.insert.toString()&&t.lineWrapping&&(r&&(r=yn.single(r.main.anchor-1,r.main.head-1)),o={from:i.from,to:i.to,insert:Ni.of([" "])}),o)return yd(t,o,r,n);if(r&&!r.main.eq(i)){let e=!1,o="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),o=t.inputState.lastSelectionOrigin,"select.pointer"==o&&(r=ud(t.state.facet(Ll).map(e=>e(t)),r))),t.dispatch({selection:r,scrollIntoView:e,userEvent:o}),!0}return!1}function yd(t,e,o,r=-1){if(Ss.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Ss.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&" "==t.state.sliceDoc(e.from,i.from))&&1==e.insert.length&&2==e.insert.lines&&os(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&0==e.insert.length||8==r&&e.insert.length<e.to-e.from&&e.to>i.head)&&os(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&0==e.insert.length&&os(t.contentDOM,"Delete",46)))return!0;let n,a=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s=()=>n||(n=function(t,e,o){let r,i=t.state,n=i.selection.main,a=-1;if(e.from==e.to&&e.from<n.from||e.from>n.to){let o=e.from<n.from?-1:1,r=o<0?n.from:n.to,s=pd(i.facet(Ll).map(e=>e(t)),r,o);e.from==s&&(a=s)}if(a>-1)r={changes:e,selection:yn.cursor(e.from+e.insert.length,-1)};else if(e.from>=n.from&&e.to<=n.to&&e.to-e.from>=(n.to-n.from)/3&&(!o||o.main.empty&&o.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let o=n.from<e.from?i.sliceDoc(n.from,e.from):"",a=n.to>e.to?i.sliceDoc(e.to,n.to):"";r=i.replaceSelection(t.state.toText(o+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let a=i.changes(e),s=o&&o.main.to<=a.newLength?o.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=n.to&&e.to>=n.to-10){let l,d=t.state.sliceDoc(e.from,e.to),c=o&&Kl(t,o.main.head);if(c){let t=e.insert.length-(e.to-e.from);l={from:c.from,to:c.to-t}}else l=t.state.doc.lineAt(n.head);let h=n.to-e.to,p=n.to-n.from;r=i.changeByRange(o=>{if(o.from==n.from&&o.to==n.to)return{changes:a,range:s||o.map(a)};let r=o.to-h,c=r-d.length;if(o.to-o.from!=p||t.state.sliceDoc(c,r)!=d||o.to>=l.from&&o.from<=l.to)return{range:o};let u=i.changes({from:c,to:r,insert:e.insert}),m=o.to-n.to;return{changes:u,range:s?yn.range(Math.max(0,s.anchor+m),Math.max(0,s.head+m)):o.map(u)}})}else r={changes:a,selection:s&&i.selection.replaceRange(s)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}(t,e,o));return t.state.facet(kl).some(o=>o(t,e.from,e.to,a,s))||t.dispatch(s()),!0}class wd{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,Ss.safari&&t.contentDOM.addEventListener("input",()=>null),Ss.gecko&&function(t){Nd.has(t)||(Nd.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let o,r=e.target;r!=t.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(o=ds.get(r))&&o.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(t.type,t)):this.runHandlers(t.type,t)))}runHandlers(t,e){let o=this.handlers[t];if(o){for(let t of o.observers)t(this.view,e);for(let t of o.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=qd(t),o=this.handlers,r=this.view.contentDOM;for(let t in e)if("scroll"!=t){let i=!e[t].handlers.length,n=o[t];n&&i!=!n.handlers.length&&(r.removeEventListener(t,this.handleEvent),n=null),n||r.addEventListener(t,this.handleEvent,{passive:i})}for(let t in o)"scroll"==t||e[t]||r.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&$d.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),Ss.android&&Ss.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!Ss.ios||t.synthetic||t.altKey||t.metaKey||!((e=Sd.find(e=>e.keyCode==t.keyCode))&&!t.ctrlKey||Qd.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&!("Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,os(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(Ss.safari&&!Ss.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function kd(t,e){return(o,r)=>{try{return e.call(t,r,o)}catch(t){zl(o.state,t)}}}function qd(t){let e=Object.create(null);function o(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec,r=t&&t.plugin.domEventHandlers,i=t&&t.plugin.domEventObservers;if(r)for(let t in r){let i=r[t];i&&o(t).handlers.push(kd(e.value,i))}if(i)for(let t in i){let r=i[t];r&&o(t).observers.push(kd(e.value,r))}}for(let t in Td)o(t).handlers.push(Td[t]);for(let t in Ad)o(t).observers.push(Ad[t]);return e}const Sd=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Qd="dthko",$d=[16,17,18,20,91,92,224,225];function Pd(t){return.7*Math.max(0,t)+8}class Cd{constructor(t,e,o,r){this.view=t,this.startEvent=e,this.style=o,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,o,r=t.ownerDocument;for(let i=t.parentNode;i&&!(i==r.body||e&&o);)if(1==i.nodeType)!o&&i.scrollHeight>i.clientHeight&&(o=i),!e&&i.scrollWidth>i.clientWidth&&(e=i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}return{x:e,y:o}}(t.contentDOM),this.atoms=t.state.facet(Ll).map(e=>e(t));let i=t.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(sa.allowMultipleSelections)&&function(t,e){let o=t.state.facet(vl);return o.length?o[0](e):Ss.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:o}=t.state.selection;if(o.empty)return!1;let r=ja(t.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let t=0;t<i.length;t++){let o=i[t];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}(t,e)||1!=Ld(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let e=0,o=0,r=0,i=0,n=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:n}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:a}=this.scrollParents.y.getBoundingClientRect());let s=Il(this.view);t.clientX-s.left<=r+6?e=-Pd(r-t.clientX):t.clientX+s.right>=n-6&&(e=Pd(t.clientX-n)),t.clientY-s.top<=i+6?o=-Pd(i-t.clientY):t.clientY+s.bottom>=a-6&&(o=Pd(t.clientY-a)),this.setScrollSpeed(e,o)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}select(t){let{view:e}=this,o=ud(this.atoms,this.style.get(t,this.extend,this.multiple));!this.mustSelect&&o.eq(e.state.selection,!1===this.dragging)||this.view.dispatch({selection:o,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}}const Td=Object.create(null),Ad=Object.create(null),Rd=Ss.ie&&Ss.ie_version<15||Ss.ios&&Ss.webkit_version<604;function zd(t,e,o){for(let r of t.facet(e))o=r(o,t);return o}function Md(t,e){e=zd(t.state,Sl,e);let o,{state:r}=t,i=1,n=r.toText(e),a=n.lines==r.selection.ranges.length;if(null!=Bd&&r.selection.ranges.every(t=>t.empty)&&Bd==n.toString()){let t=-1;o=r.changeByRange(o=>{let s=r.doc.lineAt(o.from);if(s.from==t)return{range:o};t=s.from;let l=r.toText((a?n.line(i++).text:e)+r.lineBreak);return{changes:{from:s.from,insert:l},range:yn.cursor(o.from+l.length)}})}else o=a?r.changeByRange(t=>{let e=n.line(i++);return{changes:{from:t.from,to:t.to,insert:e.text},range:yn.cursor(t.from+e.length)}}):r.replaceSelection(n);t.dispatch(o,{userEvent:"input.paste",scrollIntoView:!0})}function Ed(t,e,o,r){if(1==r)return yn.cursor(e,o);if(2==r)return function(t,e,o=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),n=e-i.from;if(0==i.length)return yn.cursor(e);0==n?o=1:n==i.length&&(o=-1);let a=n,s=n;o<0?a=an(i.text,n,!1):s=an(i.text,n);let l=r(i.text.slice(a,s));for(;a>0;){let t=an(i.text,a,!1);if(r(i.text.slice(t,a))!=l)break;a=t}for(;s<i.length;){let t=an(i.text,s);if(r(i.text.slice(s,t))!=l)break;s=t}return yn.range(a+i.from,s+i.from)}(t.state,e,o);{let o=Is.find(t.docView,e),r=t.state.doc.lineAt(o?o.posAtEnd:e),i=o?o.posAtStart:r.from,n=o?o.posAtEnd:r.to;return n<t.state.doc.length&&n==r.to&&n++,yn.range(i,n)}}Ad.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},Td.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),Ad.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Ad.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Td.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let o=null;for(let r of t.state.facet(xl))if(o=r(t,e),o)break;if(o||0!=e.button||(o=function(t,e){let o=_d(t,e),r=Ld(e),i=t.state.selection;return{update(t){t.docChanged&&(o.pos=t.changes.mapPos(o.pos),i=i.map(t.changes))},get(e,n,a){let s,l=_d(t,e),d=Ed(t,l.pos,l.bias,r);if(o.pos!=l.pos&&!n){let e=Ed(t,o.pos,o.bias,r),i=Math.min(e.from,d.from),n=Math.max(e.to,d.to);d=i<d.from?yn.range(i,n):yn.range(n,i)}return n?i.replaceRange(i.main.extend(d.from,d.to)):a&&1==r&&i.ranges.length>1&&(s=function(t,e){for(let o=0;o<t.ranges.length;o++){let{from:r,to:i}=t.ranges[o];if(r<=e&&i>=e)return yn.create(t.ranges.slice(0,o).concat(t.ranges.slice(o+1)),t.mainIndex==o?0:t.mainIndex-(t.mainIndex>o?1:0))}return null}(i,l.pos))?s:a?i.addRange(d):yn.create([d])}}}(t,e)),o){let r=!t.hasFocus;t.inputState.startMouseSelection(new Cd(t,e,o,r)),r&&t.observer.ignore(()=>{ts(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),!1===i.dragging}else t.inputState.setSelectionOrigin("select.pointer");return!1};let Zd=(t,e,o)=>e>=o.top&&e<=o.bottom&&t>=o.left&&t<=o.right;function Xd(t,e,o,r){let i=Is.find(t.docView,e);if(!i)return 1;let n=e-i.posAtStart;if(0==n)return 1;if(n==i.length)return-1;let a=i.coordsAt(n,-1);if(a&&Zd(o,r,a))return-1;let s=i.coordsAt(n,1);return s&&Zd(o,r,s)?1:a&&a.bottom>=r?-1:1}function _d(t,e){let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:o,bias:Xd(t,o,e.clientX,e.clientY)}}const jd=Ss.ie&&Ss.ie_version<=11;let Dd=null,Yd=0,Vd=0;function Ld(t){if(!jd)return t.detail;let e=Dd,o=Vd;return Dd=t,Vd=Date.now(),Yd=!e||o>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Yd+1)%3:1}function Ud(t,e,o,r){if(!(o=zd(t.state,Sl,o)))return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:n}=t.inputState,a=r&&n&&function(t,e){let o=t.state.facet(Ol);return o.length?o[0](e):Ss.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:n.from,to:n.to}:null,s={from:i,insert:o},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Td.dragstart=(t,e)=>{let{selection:{main:o}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let t=r.posAtStart,e=t+r.length;(t>=o.to||e<=o.from)&&(o=yn.range(t,e))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=o,e.dataTransfer&&(e.dataTransfer.setData("Text",zd(t.state,Ql,t.state.sliceDoc(o.from,o.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Td.dragend=t=>(t.inputState.draggedContent=null,!1),Td.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let o=e.dataTransfer.files;if(o&&o.length){let r=Array(o.length),i=0,n=()=>{++i==o.length&&Ud(t,e,r.filter(t=>null!=t).join(t.state.lineBreak),!1)};for(let t=0;t<o.length;t++){let e=new FileReader;e.onerror=n,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(r[t]=e.result),n()},e.readAsText(o[t])}return!0}{let o=e.dataTransfer.getData("Text");if(o)return Ud(t,e,o,!0),!0}return!1},Td.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let o=Rd?null:e.clipboardData;return o?(Md(t,o.getData("text/plain")||o.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let o=e.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout(()=>{t.focus(),o.remove(),Md(t,o.value)},50)}(t),!1)};let Bd=null;Td.copy=Td.cut=(t,e)=>{let{text:o,ranges:r,linewise:i}=function(t){let e=[],o=[],r=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),o.push(r));if(!e.length){let i=-1;for(let{from:r}of t.selection.ranges){let n=t.doc.lineAt(r);n.number>i&&(e.push(n.text),o.push({from:n.from,to:Math.min(t.doc.length,n.to+1)})),i=n.number}r=!0}return{text:zd(t,Ql,e.join(t.lineBreak)),ranges:o,linewise:r}}(t.state);if(!o&&!i)return!1;Bd=i?o:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let n=Rd?null:e.clipboardData;return n?(n.clearData(),n.setData("text/plain",o),!0):(function(t,e){let o=t.dom.parentNode;if(!o)return;let r=o.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}(t,o),!1)};const Wd=In.define();function Id(t,e){let o=[];for(let r of t.facet(ql)){let i=r(t,e);i&&o.push(i)}return o.length?t.update({effects:o,annotations:Wd.of(!0)}):null}function Gd(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let o=Id(t.state,e);o?t.dispatch(o):t.update([])}},10)}Ad.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Gd(t)},Ad.blur=t=>{t.observer.clearSelectionRange(),Gd(t)},Ad.compositionstart=Ad.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},Ad.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Ss.chrome&&Ss.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))},Ad.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Td.beforeinput=(t,e)=>{var o,r;if("insertReplacementText"==e.inputType&&t.observer.editContext){let r=null===(o=e.dataTransfer)||void 0===o?void 0:o.getData("text/plain"),i=e.getTargetRanges();if(r&&i.length){let e=i[0],o=t.posAtDOM(e.startContainer,e.startOffset),n=t.posAtDOM(e.endContainer,e.endOffset);return yd(t,{from:o,to:n,insert:t.state.toText(r)},null),!0}}let i;if(Ss.chrome&&Ss.android&&(i=Sd.find(t=>t.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){let e=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout(()=>{var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Ss.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),Ss.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout(()=>Ad.compositionend(t,e),20),!1};const Nd=new Set,Fd=["pre-wrap","normal","pre-line","break-spaces"];let Hd=!1;function Kd(){Hd=!1}class Jd{constructor(t){this.lineWrapping=t,this.doc=Ni.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let o=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(o+=Math.max(0,Math.ceil((e-t-o*this.lineLength*.5)/this.lineLength))),this.lineHeight*o}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return Fd.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let o=0;o<t.length;o++){let r=t[o];r<0?o++:this.heightSamples[Math.floor(10*r)]||(e=!0,this.heightSamples[Math.floor(10*r)]=!0)}return e}refresh(t,e,o,r,i,n){let a=Fd.indexOf(t)>-1,s=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=e,this.charWidth=o,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let t=0;t<n.length;t++){let e=n[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return s}}class tc{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class ec{constructor(t,e,o,r,i){this.from=t,this.length=e,this.top=o,this.height=r,this._content=i}get type(){return"number"==typeof this._content?Ds.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Us?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new ec(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var oc=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(oc||(oc={}));const rc=.001;class ic{constructor(t,e,o=2){this.length=t,this.height=e,this.flags=o}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>rc&&(Hd=!0),this.height=t)}replace(t,e,o){return ic.of(o)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,o,r){let i=this,n=o.doc;for(let a=r.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:d,toB:c}=r[a],h=i.lineAt(s,oc.ByPosNoHeight,o.setDoc(e),0,0),p=h.to>=l?h:i.lineAt(l,oc.ByPosNoHeight,o,0,0);for(c+=p.to-l,l=p.to;a>0&&h.from<=r[a-1].toA;)s=r[a-1].fromA,d=r[a-1].fromB,a--,s<h.from&&(h=i.lineAt(s,oc.ByPosNoHeight,o,0,0));d+=h.from-s,s=h.from;let u=hc.build(o.setDoc(n),t,d,c);i=nc(i,i.replace(s,l,u))}return i.updateHeight(o,0)}static empty(){return new sc(0,0)}static of(t){if(1==t.length)return t[0];let e=0,o=t.length,r=0,i=0;for(;;)if(e==o)if(r>2*i){let i=t[e-1];i.break?t.splice(--e,1,i.left,null,i.right):t.splice(--e,1,i.left,i.right),o+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let e=t[o];e.break?t.splice(o,1,e.left,null,e.right):t.splice(o,1,e.left,e.right),o+=2+e.break,i-=e.size}}else if(r<i){let o=t[e++];o&&(r+=o.size)}else{let e=t[--o];e&&(i+=e.size)}let n=0;return null==t[e-1]?(n=1,e--):null==t[e]&&(n=1,o++),new dc(ic.of(t.slice(0,e)),n,ic.of(t.slice(o)))}}function nc(t,e){return t==e?t:(t.constructor!=e.constructor&&(Hd=!0),e)}ic.prototype.size=1;class ac extends ic{constructor(t,e,o){super(t,e),this.deco=o}blockAt(t,e,o,r){return new ec(r,this.length,o,this.height,this.deco||0)}lineAt(t,e,o,r,i){return this.blockAt(0,o,r,i)}forEachLine(t,e,o,r,i,n){t<=i+this.length&&e>=i&&n(this.blockAt(0,o,r,i))}updateHeight(t,e=0,o=!1,r){return r&&r.from<=e&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class sc extends ac{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,o,r){return new ec(r,this.length,o,this.height,this.breaks)}replace(t,e,o){let r=o[0];return 1==o.length&&(r instanceof sc||r instanceof lc&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof lc?r=new sc(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ic.of(o)}updateHeight(t,e=0,o=!1,r){return r&&r.from<=e&&r.more?this.setHeight(r.heights[r.index++]):(o||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class lc extends ic{constructor(t){super(t,0)}heightMetrics(t,e){let o,r=t.doc.lineAt(e).number,i=t.doc.lineAt(e+this.length).number,n=i-r+1,a=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*n);o=e/n,this.length>n+1&&(a=(this.height-e)/(this.length-n-1))}else o=this.height/n;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(t,e,o,r){let{firstLine:i,lastLine:n,perLine:a,perChar:s}=this.heightMetrics(e,r);if(e.lineWrapping){let i=r+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-o)/this.height))*this.length)),n=e.doc.lineAt(i),l=a+n.length*s,d=Math.max(o,t-l/2);return new ec(n.from,n.length,d,l,0)}{let r=Math.max(0,Math.min(n-i,Math.floor((t-o)/a))),{from:s,length:l}=e.doc.line(i+r);return new ec(s,l,o+a*r,a,0)}}lineAt(t,e,o,r,i){if(e==oc.ByHeight)return this.blockAt(t,o,r,i);if(e==oc.ByPosNoHeight){let{from:e,to:r}=o.doc.lineAt(t);return new ec(e,r-e,0,0,0)}let{firstLine:n,perLine:a,perChar:s}=this.heightMetrics(o,i),l=o.doc.lineAt(t),d=a+l.length*s,c=l.number-n,h=r+a*c+s*(l.from-i-c);return new ec(l.from,l.length,Math.max(r,Math.min(h,r+this.height-d)),d,0)}forEachLine(t,e,o,r,i,n){t=Math.max(t,i),e=Math.min(e,i+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(o,i);for(let d=t,c=r;d<=e;){let e=o.doc.lineAt(d);if(d==t){let o=e.number-a;c+=s*o+l*(t-i-o)}let r=s+l*e.length;n(new ec(e.from,e.length,c,r,0)),c+=r,d=e.to+1}}replace(t,e,o){let r=this.length-e;if(r>0){let t=o[o.length-1];t instanceof lc?o[o.length-1]=new lc(t.length+r):o.push(null,new lc(r-1))}if(t>0){let e=o[0];e instanceof lc?o[0]=new lc(t+e.length):o.unshift(new lc(t-1),null)}return ic.of(o)}decomposeLeft(t,e){e.push(new lc(t-1),null)}decomposeRight(t,e){e.push(null,new lc(this.length-t-1))}updateHeight(t,e=0,o=!1,r){let i=e+this.length;if(r&&r.from<=e+this.length&&r.more){let o=[],n=Math.max(e,r.from),a=-1;for(r.from>e&&o.push(new lc(r.from-e-1).updateHeight(t,e));n<=i&&r.more;){let e=t.doc.lineAt(n).length;o.length&&o.push(null);let i=r.heights[r.index++];-1==a?a=i:Math.abs(i-a)>=rc&&(a=-2);let s=new sc(e,i);s.outdated=!1,o.push(s),n+=e+1}n<=i&&o.push(null,new lc(i-n).updateHeight(t,n));let s=ic.of(o);return(a<0||Math.abs(s.height-this.height)>=rc||Math.abs(a-this.heightMetrics(t,e).perLine)>=rc)&&(Hd=!0),nc(this,s)}return(o||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class dc extends ic{constructor(t,e,o){super(t.length+e+o.length,t.height+o.height,e|(t.outdated||o.outdated?2:0)),this.left=t,this.right=o,this.size=t.size+o.size}get break(){return 1&this.flags}blockAt(t,e,o,r){let i=o+this.left.height;return t<i?this.left.blockAt(t,e,o,r):this.right.blockAt(t,e,i,r+this.left.length+this.break)}lineAt(t,e,o,r,i){let n=r+this.left.height,a=i+this.left.length+this.break,s=e==oc.ByHeight?t<n:t<a,l=s?this.left.lineAt(t,e,o,r,i):this.right.lineAt(t,e,o,n,a);if(this.break||(s?l.to<a:l.from>a))return l;let d=e==oc.ByPosNoHeight?oc.ByPosNoHeight:oc.ByPos;return s?l.join(this.right.lineAt(a,d,o,n,a)):this.left.lineAt(a,d,o,r,i).join(l)}forEachLine(t,e,o,r,i,n){let a=r+this.left.height,s=i+this.left.length+this.break;if(this.break)t<s&&this.left.forEachLine(t,e,o,r,i,n),e>=s&&this.right.forEachLine(t,e,o,a,s,n);else{let l=this.lineAt(s,oc.ByPos,o,r,i);t<l.from&&this.left.forEachLine(t,l.from-1,o,r,i,n),l.to>=t&&l.from<=e&&n(l),e>l.to&&this.right.forEachLine(l.to+1,e,o,a,s,n)}}replace(t,e,o){let r=this.left.length+this.break;if(e<r)return this.balanced(this.left.replace(t,e,o),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-r,e-r,o));let i=[];t>0&&this.decomposeLeft(t,i);let n=i.length;for(let t of o)i.push(t);if(t>0&&cc(i,n-1),e<this.length){let t=i.length;this.decomposeRight(e,i),cc(i,t)}return ic.of(i)}decomposeLeft(t,e){let o=this.left.length;if(t<=o)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&(o++,t>=o&&e.push(null)),t>o&&this.right.decomposeLeft(t-o,e)}decomposeRight(t,e){let o=this.left.length,r=o+this.break;if(t>=r)return this.right.decomposeRight(t-r,e);t<o&&this.left.decomposeRight(t,e),this.break&&t<r&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?ic.of(this.break?[t,null,e]:[t,e]):(this.left=nc(this.left,t),this.right=nc(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,o=!1,r){let{left:i,right:n}=this,a=e+i.length+this.break,s=null;return r&&r.from<=e+i.length&&r.more?s=i=i.updateHeight(t,e,o,r):i.updateHeight(t,e,o),r&&r.from<=a+n.length&&r.more?s=n=n.updateHeight(t,a,o,r):n.updateHeight(t,a,o),s?this.balanced(i,n):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function cc(t,e){let o,r;null==t[e]&&(o=t[e-1])instanceof lc&&(r=t[e+1])instanceof lc&&t.splice(e-1,3,new lc(o.length+1+r.length))}class hc{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof sc?o.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new sc(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,o){if(t<e||o.heightRelevant){let r=o.widget?o.widget.estimatedHeight:0,i=o.widget?o.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let n=e-t;o.block?this.addBlock(new ac(n,r,o)):(n||i||r>=5)&&this.addLineDeco(r,i,n)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new sc(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let o=new lc(e-t);return this.oracle.doc.lineAt(t).to==e&&(o.flags|=4),o}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof sc)return t;let e=new sc(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,o){let r=this.ensureLine();r.length+=o,r.collapsed+=o,r.widgetHeight=Math.max(r.widgetHeight,t),r.breaks+=e,this.writtenTo=this.pos=this.pos+o}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof sc||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new sc(0,-1));let o=t;for(let t of this.nodes)t instanceof sc&&t.updateHeight(this.oracle,o),o+=t?t.length:1;return this.nodes}static build(t,e,o,r){let i=new hc(o,t);return ua.spans(e,o,r,i,0),i.finish(o)}}class pc{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,o,r){(t<e||o&&o.heightRelevant||r&&r.heightRelevant)&&Ws(t,e,this.changes,5)}}function uc(t,e){let o=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,n=Math.max(0,o.left),a=Math.min(i.innerWidth,o.right),s=Math.max(0,o.top),l=Math.min(i.innerHeight,o.bottom);for(let e=t.parentNode;e&&e!=r.body;)if(1==e.nodeType){let o=e,r=window.getComputedStyle(o);if((o.scrollHeight>o.clientHeight||o.scrollWidth>o.clientWidth)&&"visible"!=r.overflow){let r=o.getBoundingClientRect();n=Math.max(n,r.left),a=Math.min(a,r.right),s=Math.max(s,r.top),l=Math.min(e==t.parentNode?i.innerHeight:l,r.bottom)}e="absolute"==r.position||"fixed"==r.position?o.offsetParent:o.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:n-o.left,right:Math.max(n,a)-o.left,top:s-(o.top+e),bottom:Math.max(s,l)-(o.top+e)}}function mc(t,e){let o=t.getBoundingClientRect();return{left:0,right:o.right-o.left,top:e,bottom:o.bottom-(o.top+e)}}class fc{constructor(t,e,o,r){this.from=t,this.to=e,this.size=o,this.displaySize=r}static same(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++){let r=t[o],i=e[o];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(t,e){return Ys.replace({widget:new bc(this.displaySize*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class bc extends js{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class gc{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=yc,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Js.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(Dl).some(t=>"function"!=typeof t&&"cm-lineWrapping"==t.class);this.heightOracle=new Jd(e),this.stateDeco=t.facet(Yl).filter(t=>"function"!=typeof t),this.heightMap=ic.empty().applyChanges(this.stateDeco,Ni.empty,this.heightOracle.setDoc(t.doc),[new Nl(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ys.set(this.lineGaps.map(t=>t.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let o=0;o<=1;o++){let r=o?e.head:e.anchor;if(!t.some(({from:t,to:e})=>r>=t&&r<=e)){let{from:e,to:o}=this.lineBlockAt(r);t.push(new vc(e,o))}}return this.viewports=t.sort((t,e)=>t.from-e.from),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?yc:new wc(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,t=>{this.viewportLines.push(kc(t,this.scaler))})}update(t,e=null){this.state=t.state;let o=this.stateDeco;this.stateDeco=this.state.facet(Yl).filter(t=>"function"!=typeof t);let r=t.changedRanges,i=Nl.extendWithRanges(r,function(t,e,o){let r=new pc;return ua.compare(t,e,o,r,0),r.changes}(o,this.stateDeco,t?t.changes:un.empty(this.state.doc.length))),n=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Kd(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=n||Hd)&&(t.flags|=2),a?(this.scrollAnchorPos=t.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=n);let s=i.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<s.from||e.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,e));let l=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,t.flags|=this.updateForViewport(),(l||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(Pl)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,o=window.getComputedStyle(e),r=this.heightOracle,i=o.whiteSpace;this.defaultTextDirection="rtl"==o.direction?Js.RTL:Js.LTR;let n=this.heightOracle.mustRefreshForWrapping(i),a=e.getBoundingClientRect(),s=n||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,d=0;if(a.width&&a.height){let{scaleX:t,scaleY:o}=Fa(e,a);(t>.005&&Math.abs(this.scaleX-t)>.005||o>.005&&Math.abs(this.scaleY-o)>.005)&&(this.scaleX=t,this.scaleY=o,l|=16,n=s=!0)}let c=(parseInt(o.paddingTop)||0)*this.scaleY,h=(parseInt(o.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==h||(this.paddingTop=c,this.paddingBottom=h,l|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=t.scrollDOM.clientWidth,l|=16);let p=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=is(t.scrollDOM);let u=(this.printing?mc:uc)(e,this.paddingTop),m=u.top-this.pixelViewport.top,f=u.bottom-this.pixelViewport.bottom;this.pixelViewport=u;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(s=!0)),!this.inView&&!this.scrollTarget&&!function(t){let e=t.getBoundingClientRect(),o=t.ownerDocument.defaultView||window;return e.left<o.innerWidth&&e.right>0&&e.top<o.innerHeight&&e.bottom>0}(t.dom))return 0;let g=a.width;if(this.contentDOMWidth==g&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=t.scrollDOM.clientHeight,l|=16),s){let e=t.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(e)&&(n=!0),n||r.lineWrapping&&Math.abs(g-this.contentDOMWidth)>r.charWidth){let{lineHeight:o,charWidth:a,textHeight:s}=t.docView.measureTextSize();n=o>0&&r.refresh(i,o,a,s,Math.max(5,g/a),e),n&&(t.docView.minWidth=0,l|=16)}m>0&&f>0?d=Math.max(m,f):m<0&&f<0&&(d=Math.min(m,f)),Kd();for(let o of this.viewports){let i=o.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(o);this.heightMap=(n?ic.empty().applyChanges(this.stateDeco,Ni.empty,this.heightOracle,[new Nl(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(r,0,n,new tc(o.from,i))}Hd&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),l|=this.updateForViewport()),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(n?[]:this.lineGaps,t)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let o=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:n,visibleBottom:a}=this,s=new vc(r.lineAt(n-1e3*o,oc.ByHeight,i,0,0).from,r.lineAt(a+1e3*(1-o),oc.ByHeight,i,0,0).to);if(e){let{head:t}=e.range;if(t<s.from||t>s.to){let o,n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(t,oc.ByPos,i,0,0);o="center"==e.y?(a.top+a.bottom)/2-n/2:"start"==e.y||"nearest"==e.y&&t<s.from?a.top:a.bottom-n,s=new vc(r.lineAt(o-500,oc.ByHeight,i,0,0).from,r.lineAt(o+n+500,oc.ByHeight,i,0,0).to)}}return s}mapViewport(t,e){let o=e.mapPos(t.from,-1),r=e.mapPos(t.to,1);return new vc(this.heightMap.lineAt(o,oc.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,oc.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},o=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(t,oc.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(e,oc.ByPos,this.heightOracle,0,0),{visibleTop:n,visibleBottom:a}=this;return(0==t||r<=n-Math.max(10,Math.min(-o,250)))&&(e==this.state.doc.length||i>=a+Math.max(10,Math.min(o,250)))&&r>n-2e3&&i<a+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let o=[];for(let r of t)e.touchesRange(r.from,r.to)||o.push(new fc(e.mapPos(r.from),e.mapPos(r.to),r.size,r.displaySize));return o}ensureLineGaps(t,e){let o=this.heightOracle.lineWrapping,r=o?1e4:2e3,i=r>>1,n=r<<1;if(this.defaultTextDirection!=Js.LTR&&!o)return[];let a=[],s=(r,n,l,d)=>{if(n-r<i)return;let c=this.state.selection.main,h=[c.from];c.empty||h.push(c.to);for(let t of h)if(t>r&&t<n)return s(r,t-10,l,d),void s(t+10,n,l,d);let p=function(t,e){for(let o of t)if(e(o))return o}(t,t=>t.from>=l.from&&t.to<=l.to&&Math.abs(t.from-r)<i&&Math.abs(t.to-n)<i&&!h.some(e=>t.from<e&&t.to>e));if(!p){if(n<l.to&&e&&o&&e.visibleRanges.some(t=>t.from<=n&&t.to>=n)){let t=e.moveToLineBoundary(yn.cursor(n),!1,!0).head;t>r&&(n=t)}let t=this.gapSize(l,r,n,d);p=new fc(r,n,t,o||t<2e6?t:2e6)}a.push(p)},l=e=>{if(e.length<n||e.type!=Ds.Text)return;let i=function(t,e,o){let r=[],i=t,n=0;return ua.spans(o,t,e,{span(){},point(t,e){t>i&&(r.push({from:i,to:t}),n+=t-i),i=e}},20),i<e&&(r.push({from:i,to:e}),n+=e-i),{total:n,ranges:r}}(e.from,e.to,this.stateDeco);if(i.total<n)return;let a,l,d=this.scrollTarget?this.scrollTarget.range.head:null;if(o){let t,o,n=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=d){let r=xc(i,d),a=((this.visibleBottom-this.visibleTop)/2+n)/e.height;t=r-a,o=r+a}else t=(this.visibleTop-e.top-n)/e.height,o=(this.visibleBottom-e.top+n)/e.height;a=Oc(i,t),l=Oc(i,o)}else{let o=i.total*this.heightOracle.charWidth,n=r*this.heightOracle.charWidth,s=0;if(o>2e6)for(let o of t)o.from>=e.from&&o.from<e.to&&o.size!=o.displaySize&&o.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=o.size-o.displaySize);let c,h,p=this.pixelViewport.left+s,u=this.pixelViewport.right+s;if(null!=d){let t=xc(i,d),e=((u-p)/2+n)/o;c=t-e,h=t+e}else c=(p-n)/o,h=(u+n)/o;a=Oc(i,c),l=Oc(i,h)}a>e.from&&s(e.from,a,e,i),l<e.to&&s(l,e.to,e,i)};for(let t of this.viewportLines)Array.isArray(t.type)?t.type.forEach(l):l(t);return a}gapSize(t,e,o,r){let i=xc(r,o)-xc(r,e);return this.heightOracle.lineWrapping?t.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(t){fc.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=Ys.set(t.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(t){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let o=[];ua.spans(e,this.viewport.from,this.viewport.to,{span(t,e){o.push({from:t,to:e})},point(){}},20);let r=0;if(o.length!=this.visibleRanges.length)r=12;else for(let e=0;e<o.length&&!(8&r);e++){let i=this.visibleRanges[e],n=o[e];i.from==n.from&&i.to==n.to||(r|=4,t&&t.mapPos(i.from,-1)==n.from&&t.mapPos(i.to,1)==n.to||(r|=8))}return this.visibleRanges=o,r}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(e=>e.from<=t&&e.to>=t)||kc(this.heightMap.lineAt(t,oc.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(e=>e.top<=t&&e.bottom>=t)||kc(this.heightMap.lineAt(this.scaler.fromDOM(t),oc.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return kc(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class vc{constructor(t,e){this.from=t,this.to=e}}function Oc({total:t,ranges:e},o){if(o<=0)return e[0].from;if(o>=1)return e[e.length-1].to;let r=Math.floor(t*o);for(let t=0;;t++){let{from:o,to:i}=e[t],n=i-o;if(r<=n)return o+r;r-=n}}function xc(t,e){let o=0;for(let{from:r,to:i}of t.ranges){if(e<=i){o+=e-r;break}o+=i-r}return o/t.total}const yc={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class wc{constructor(t,e,o){let r=0,i=0,n=0;this.viewports=o.map(({from:o,to:i})=>{let n=e.lineAt(o,oc.ByPos,t,0,0).top,a=e.lineAt(i,oc.ByPos,t,0,0).bottom;return r+=a-n,{from:o,to:i,top:n,bottom:a,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);for(let t of this.viewports)t.domTop=n+(t.top-i)*this.scale,n=t.domBottom=t.domTop+(t.bottom-t.top),i=t.bottom}toDOM(t){for(let e=0,o=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.top)return r+(t-o)*this.scale;if(t<=i.bottom)return i.domTop+(t-i.top);o=i.bottom,r=i.domBottom}}fromDOM(t){for(let e=0,o=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.domTop)return o+(t-r)/this.scale;if(t<=i.domBottom)return i.top+(t-i.domTop);o=i.bottom,r=i.domBottom}}eq(t){return t instanceof wc&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,o)=>e.from==t.viewports[o].from&&e.to==t.viewports[o].to)}}function kc(t,e){if(1==e.scale)return t;let o=e.toDOM(t.top),r=e.toDOM(t.bottom);return new ec(t.from,t.length,o,r-o,Array.isArray(t._content)?t._content.map(t=>kc(t,e)):t._content)}const qc=qn.define({combine:t=>t.join(" ")}),Sc=qn.define({combine:t=>t.indexOf(!0)>-1}),Qc=Ta.newName(),$c=Ta.newName(),Pc=Ta.newName(),Cc={"&light":"."+$c,"&dark":"."+Pc};function Tc(t,e,o){return new Ta(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,e=>{if("&"==e)return t;if(!o||!o[e])throw new RangeError(`Unsupported selector: ${e}`);return o[e]}):t+" "+e})}const Ac=Tc("."+Qc,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Cc),Rc={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zc=Ss.ie&&Ss.ie_version<=11;class Mc{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new Ha,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(e=>{for(let t of e)this.queue.push(t);(Ss.ie&&Ss.ie_version<=11||Ss.ios&&t.composing)&&e.some(t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():this.flush()}),!window.EditContext||!Ss.android||!1===t.constructor.EDIT_CONTEXT||Ss.chrome&&Ss.chrome_version<126||(this.editContext=new Xc(t),t.state.facet(Ml)&&(t.contentDOM.editContext=this.editContext.editContext)),zc&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((e,o)=>e!=t[o]))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:o}=this,r=this.selectionRange;if(o.state.facet(Ml)?o.root.activeElement!=this.dom:!Ya(this.dom,r))return;let i=r.anchorNode&&o.docView.nearest(r.anchorNode);i&&i.ignoreEvent(t)?e||(this.selectionChanged=!1):(Ss.ie&&Ss.ie_version<=11||Ss.android&&Ss.chrome)&&!o.state.selection.main.empty&&r.focusNode&&La(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=ja(t.root);if(!e)return!1;let o=Ss.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return Zc(t,o)}let o=null;function r(t){t.preventDefault(),t.stopImmediatePropagation(),o=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),o?Zc(t,o):null}(this.view,e)||e;if(!o||this.selectionRange.eq(o))return!1;let r=Ya(this.dom,o);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let o=e.focusNode,r=e.focusOffset;if(!o||e.anchorNode!=o||e.anchorOffset!=r)return!1;for(r=Math.min(r,Ia(o));;)if(r){if(1!=o.nodeType)return!1;let t=o.childNodes[r-1];"false"==t.contentEditable?r--:(o=t,r=Ia(o))}else{if(o==t)return!0;r=Ua(o),o=o.parentNode}}(this.dom,o)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(o),r&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let o=this.dom;o;)if(1==o.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==o?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(o),o=o.assignedSlot||o.parentNode;else{if(11!=o.nodeType)break;o=o.host}if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Rc),zc&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),zc&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var o;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;t&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&os(this.dom,t.key,t.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null===(o=this.delayedAndroidKey)||void 0===o?void 0:o.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,o=-1,r=!1;for(let i of t){let t=this.readMutation(i);t&&(t.typeOver&&(r=!0),-1==e?({from:e,to:o}=t):(e=Math.min(t.from,e),o=Math.max(t.to,o)))}return{from:e,to:o,typeOver:r}}readChange(){let{from:t,to:e,typeOver:o}=this.processRecords(),r=this.selectionChanged&&Ya(this.dom,this.selectionRange);if(t<0&&!r)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Od(this.view,t,e,o);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let o=this.view.state,r=xd(this.view,e);return this.view.state==o&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let o=Ec(e,t.previousSibling||t.target.previousSibling,-1),r=Ec(e,t.nextSibling||t.target.nextSibling,1);return{from:o?e.posAfter(o):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(Ml)!=t.state.facet(Ml)&&(t.view.contentDOM.editContext=t.state.facet(Ml)?this.editContext.editContext:null))}destroy(){var t,e,o;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(o=this.resizeScroll)||void 0===o||o.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Ec(t,e,o){for(;e;){let r=ds.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:o>0?e.nextSibling:e.previousSibling}return null}function Zc(t,e){let o=e.startContainer,r=e.startOffset,i=e.endContainer,n=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return La(a.node,a.offset,i,n)&&([o,r,i,n]=[i,n,o,r]),{anchorNode:o,anchorOffset:r,focusNode:i,focusOffset:n}}class Xc{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=o=>{let r=t.state.selection.main,{anchor:i,head:n}=r,a=this.toEditorPos(o.updateRangeStart),s=this.toEditorPos(o.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:o.updateRangeStart,editorBase:a,drifted:!1});let l={from:a,to:s,insert:Ni.of(o.text.split("\n"))};if(l.from==this.from&&i<this.from?l.from=i:l.to==this.to&&i>this.to&&(l.to=i),l.from==l.to&&!l.insert.length){let e=yn.single(this.toEditorPos(o.selectionStart),this.toEditorPos(o.selectionEnd));return void(e.main.eq(r)||t.dispatch({selection:e,userEvent:"select"}))}if((Ss.mac||Ss.android)&&l.from==n-1&&/^\. ?$/.test(o.text)&&"off"==t.contentDOM.getAttribute("autocorrect")&&(l={from:a,to:s,insert:Ni.of([o.text.replace("."," ")])}),this.pendingContextChange=l,!t.state.readOnly){let e=this.to-this.from+(l.to-l.from+l.insert.length);yd(t,l,yn.single(this.toEditorPos(o.selectionStart,e),this.toEditorPos(o.selectionEnd,e)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)),l.from<l.to&&!l.insert.length&&t.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(e.text.slice(Math.max(0,o.updateRangeStart-1),Math.min(e.text.length,o.updateRangeStart+1)))&&this.handlers.compositionend(o)},this.handlers.characterboundsupdate=o=>{let r=[],i=null;for(let e=this.toEditorPos(o.rangeStart),n=this.toEditorPos(o.rangeEnd);e<n;e++){let o=t.coordsForChar(e);i=o&&new DOMRect(o.left,o.top,o.right-o.left,o.bottom-o.top)||i||new DOMRect,r.push(i)}e.updateCharacterBounds(o.rangeStart,r)},this.handlers.textformatupdate=e=>{let o=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,r=t.underlineThickness;if(!/none/i.test(e)&&!/none/i.test(r)){let i=this.toEditorPos(t.rangeStart),n=this.toEditorPos(t.rangeEnd);if(i<n){let t=`text-decoration: underline ${/^[a-z]/.test(e)?e+" ":"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${/thin/i.test(r)?1:2}px`;o.push(Ys.mark({attributes:{style:t}}).range(i,n))}}}t.dispatch({effects:Rl.of(Ys.set(o))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=ja(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,o=!1,r=this.pendingContextChange;return t.changes.iterChanges((i,n,a,s,l)=>{if(o)return;let d=l.length-(n-i);if(r&&n>=r.to){if(r.from==i&&r.to==n&&r.insert.eq(l))return r=this.pendingContextChange=null,e+=d,void(this.to+=d);r=null,this.revertPending(t.state)}if(i+=e,(n+=e)<=this.from)this.from+=d,this.to+=d;else if(i<this.to){if(i<this.from||n>this.to||this.to-this.from+l.length>3e4)return void(o=!0);this.editContext.updateText(this.toContextPos(i),this.toContextPos(n),l.toString()),this.to+=d}e+=d}),r&&!o&&this.revertPending(t.state),!o}update(t){let e=this.pendingContextChange,o=t.startState.selection.main;this.composing&&(this.composing.drifted||!t.changes.touchesRange(o.from,o.to)&&t.transactions.some(t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,o=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),r=this.toContextPos(e.head);this.editContext.selectionStart==o&&this.editContext.selectionEnd==r||this.editContext.updateSelection(o,r)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>3e4)}toEditorPos(t,e=this.to-this.from){t=Math.min(t,e);let o=this.composing;return o&&o.drifted?o.editorBase+(t-o.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class _c{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:o}=t;this.dispatchTransactions=t.dispatchTransactions||o&&(t=>t.forEach(t=>o(t,this)))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new gc(t.state||sa.create(t)),t.scrollTo&&t.scrollTo.is(Al)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Zl).map(t=>new _l(t));for(let t of this.plugins)t.update(this);this.observer=new Mc(this),this.inputState=new wd(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Hl(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...t){let e=1==t.length&&t[0]instanceof Hn?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,o=!1,r=!1,i=this.state;for(let e of t){if(e.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=e.state}if(this.destroyed)return void(this.viewState.state=i);let n=this.hasFocus,a=0,s=null;t.some(t=>t.annotation(Wd))?(this.inputState.notifiedFocused=n,a=1):n!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=n,s=Id(i,n),s||(a=1));let l=this.observer.delayedAndroidKey,d=null;if(l?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(d=null)):this.observer.clear(),i.facet(sa.phrases)!=this.state.facet(sa.phrases))return this.setState(i);e=Fl.create(this,i,t),e.flags|=a;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new Tl(t.empty?t:yn.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(Al)&&(c=t.value.clip(this.state))}this.viewState.update(e,c),this.bidiCache=Yc.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),o=this.docView.update(e),this.state.facet(Gl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(o,t.some(t=>t.isUserEvent("select.pointer")))}finally{this.updateState=0}if(e.startState.facet(qc)!=e.state.facet(qc)&&(this.viewState.mustMeasureContent=!0),(o||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),o&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(wl))try{t(e)}catch(t){zl(this.state,t,"update listener")}(s||d)&&Promise.resolve().then(()=>{s&&this.state==s.startState&&this.dispatch(s),d&&!xd(this,d)&&l.force&&os(this.contentDOM,l.key,l.keyCode)})}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new gc(t),this.plugins=t.facet(Zl).map(t=>new _l(t)),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new Hl(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(Zl),o=t.state.facet(Zl);if(e!=o){let r=[];for(let i of o){let o=e.indexOf(i);if(o<0)r.push(new _l(i));else{let e=this.plugins[o];e.mustUpdate=t,r.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t<this.plugins.length;t++)this.plugins[t].update(this);e!=o&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let e=t.value;if(e&&e.docViewUpdate)try{e.docViewUpdate(this)}catch(t){zl(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,o=this.scrollDOM,r=o.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:n}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(n=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(n<0)if(is(o))i=-1,n=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(r);i=t.from,n=t.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map(t=>{try{return t.read(this)}catch(t){return zl(this.state,t),Dc}}),d=Fl.create(this,this.state,[]),c=!1;d.flags|=a,e?e.flags|=a:e=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),c=this.docView.update(d),c&&this.docViewUpdate());for(let t=0;t<s.length;t++)if(l[t]!=Dc)try{let e=s[t];e.write&&e.write(l[t],this)}catch(t){zl(this.state,t)}if(c&&this.docView.updateSelection(!0),!d.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,n=-1;continue}{let t=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-n;if(t>1||t<-1){r+=t,o.scrollTop=r/this.scaleY,n=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(wl))t(e)}get themeClasses(){return Qc+" "+(this.state.facet(Sc)?Pc:$c)+" "+this.state.facet(qc)}updateAttrs(){let t=Vc(this,jl,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ml)?"true":"false",class:"cm-content",style:`${Ss.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),Vc(this,Dl,e);let o=this.observer.ignore(()=>{let o=Xs(this.contentDOM,this.contentAttrs,e),r=Xs(this.dom,this.editorAttrs,t);return o||r});return this.editorAttrs=t,this.contentAttrs=e,o}showAnnouncements(t){let e=!0;for(let o of t)for(let t of o.effects)t.is(_c.announce)&&(e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value)}mountStyles(){this.styleModules=this.state.facet(Gl);let t=this.state.facet(_c.cspNonce);Ta.mount(this.root,this.styleModules.concat(Ac).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key)return void(this.measureRequests[e]=t);this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.plugin!=t)&&this.pluginMap.set(t,e=this.plugins.find(e=>e.plugin==t)||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,o){return md(this,t,hd(this,t,e,o))}moveByGroup(t,e){return md(this,t,hd(this,t,e,e=>function(t,e,o){let r=t.state.charCategorizer(e),i=r(o);return t=>{let e=r(t);return i==ia.Space&&(i=e),i==e}}(this,t.head,e)))}visualLineSide(t,e){let o=this.bidiSpans(t),r=this.textDirectionAt(t.from),i=o[e?o.length-1:0];return yn.cursor(i.side(e,r)+t.from,i.forward(!e,r)?1:-1)}moveToLineBoundary(t,e,o=!0){return function(t,e,o,r){let i=cd(t,e.head,e.assoc||-1),n=r&&i.type==Ds.Text&&(t.lineWrapping||i.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head):null;if(n){let e=t.dom.getBoundingClientRect(),r=t.textDirectionAt(i.from),a=t.posAtCoords({x:o==(r==Js.LTR)?e.right-1:e.left+1,y:(n.top+n.bottom)/2});if(null!=a)return yn.cursor(a,o?-1:1)}return yn.cursor(o?i.to:i.from,o?-1:1)}(this,t,e,o)}moveVertically(t,e,o){return md(this,t,function(t,e,o,r){let i=e.head,n=o?1:-1;if(i==(o?t.state.doc.length:0))return yn.cursor(i,e.assoc);let a,s=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),d=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(d)null==s&&(s=d.left-l.left),a=n<0?d.top:d.bottom;else{let e=t.viewState.lineBlockAt(i);null==s&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-e.from))),a=(n<0?e.top:e.bottom)+c}let h=l.left+s,p=null!=r?r:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let o=a+(p+e)*n,r=sd(t,{x:h,y:o},!1,n);if(o<l.top||o>l.bottom||(n<0?r<i:r>i)){let e=t.docView.coordsForChar(r),i=!e||o<e.top?-1:1;return yn.cursor(r,i,void 0,s)}}}(this,t,e,o))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),sd(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let o=this.docView.coordsAt(t,e);if(!o||o.left==o.right)return o;let r=this.state.doc.lineAt(t),i=this.bidiSpans(r);return Ga(o,i[dl.find(i,t-r.from,-1,e)].dir==Js.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet($l)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>jc)return ml(t.length);let e,o=this.textDirectionAt(t.from);for(let r of this.bidiCache)if(r.from==t.from&&r.dir==o&&(r.fresh||cl(r.isolates,e=Bl(this,t))))return r.order;e||(e=Bl(this,t));let r=function(t,e,o){if(!t)return[new dl(0,0,e==el?1:0)];if(e==tl&&!o.length&&!ll.test(t))return ml(t.length);if(o.length)for(;t.length>hl.length;)hl[hl.length]=256;let r=[],i=e==tl?0:1;return ul(t,i,i,o,0,t.length,r),r}(t.text,o,e);return this.bidiCache.push(new Yc(t.from,t.to,o,e,!0,r)),r}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||Ss.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ts(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return Al.of(new Tl("number"==typeof t?yn.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,o=this.viewState.scrollAnchorAt(t);return Al.of(new Tl(yn.cursor(o.from),"start","start",o.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return Xl.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return Xl.define(()=>({}),{eventObservers:t})}static theme(t,e){let o=Ta.newName(),r=[qc.of(o),Gl.of(Tc(`.${o}`,t))];return e&&e.dark&&r.push(Sc.of(!0)),r}static baseTheme(t){return zn.lowest(Gl.of(Tc("."+Qc,t,Cc)))}static findFromDOM(t){var e;let o=t.querySelector(".cm-content"),r=o&&ds.get(o)||ds.get(t);return(null===(e=null==r?void 0:r.rootView)||void 0===e?void 0:e.view)||null}}_c.styleModule=Gl,_c.inputHandler=kl,_c.clipboardInputFilter=Sl,_c.clipboardOutputFilter=Ql,_c.scrollHandler=Cl,_c.focusChangeEffect=ql,_c.perLineTextDirection=$l,_c.exceptionSink=yl,_c.updateListener=wl,_c.editable=Ml,_c.mouseSelectionStyle=xl,_c.dragMovesSelection=Ol,_c.clickAddsSelectionRange=vl,_c.decorations=Yl,_c.outerDecorations=Vl,_c.atomicRanges=Ll,_c.bidiIsolatedRanges=Ul,_c.scrollMargins=Wl,_c.darkTheme=Sc,_c.cspNonce=qn.define({combine:t=>t.length?t[0]:""}),_c.contentAttributes=Dl,_c.editorAttributes=jl,_c.lineWrapping=_c.contentAttributes.of({class:"cm-lineWrapping"}),_c.announce=Fn.define();const jc=4096,Dc={};class Yc{constructor(t,e,o,r,i,n){this.from=t,this.to=e,this.dir=o,this.isolates=r,this.fresh=i,this.order=n}static update(t,e){if(e.empty&&!t.some(t=>t.fresh))return t;let o=[],r=t.length?t[t.length-1].dir:Js.LTR;for(let i=Math.max(0,t.length-10);i<t.length;i++){let n=t[i];n.dir!=r||e.touchesRange(n.from,n.to)||o.push(new Yc(e.mapPos(n.from,1),e.mapPos(n.to,-1),n.dir,n.isolates,!1,n.order))}return o}}function Vc(t,e,o){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let e=r[i],n="function"==typeof e?e(t):e;n&&Ms(n,o)}return o}const Lc=Ss.mac?"mac":Ss.windows?"win":Ss.linux?"linux":"key";function Uc(t,e,o){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==o&&e.shiftKey&&(t="Shift-"+t),t}const Bc=zn.default(_c.domEventHandlers({keydown:(t,e)=>Kc(Gc(e.state),t,e,"editor")})),Wc=qn.define({enables:Bc}),Ic=new WeakMap;function Gc(t){let e=t.facet(Wc),o=Ic.get(e);return o||Ic.set(e,o=function(t,e=Lc){let o=Object.create(null),r=Object.create(null),i=(t,e)=>{let o=r[t];if(null==o)r[t]=e;else if(o!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},n=(t,r,n,a,s)=>{var l,d;let c=o[t]||(o[t]=Object.create(null)),h=r.split(/ (?!$)/).map(t=>function(t,e){const o=t.split(/-(?!$)/);let r,i,n,a,s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t<o.length-1;++t){const s=o[t];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))n=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);"mac"==e?a=!0:i=!0}}return r&&(s="Alt-"+s),i&&(s="Ctrl-"+s),a&&(s="Meta-"+s),n&&(s="Shift-"+s),s}(t,e));for(let e=1;e<h.length;e++){let o=h.slice(0,e).join(" ");i(o,!0),c[o]||(c[o]={preventDefault:!0,stopPropagation:!1,run:[e=>{let r=Nc={view:e,prefix:o,scope:t};return setTimeout(()=>{Nc==r&&(Nc=null)},Fc),!0}]})}let p=h.join(" ");i(p,!1);let u=c[p]||(c[p]={preventDefault:!1,stopPropagation:!1,run:(null===(d=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===d?void 0:d.slice())||[]});n&&u.run.push(n),a&&(u.preventDefault=!0),s&&(u.stopPropagation=!0)};for(let r of t){let t=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let e of t){let t=o[e]||(o[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=r;for(let e in t)t[e].run.push(t=>i(t,Hc))}let i=r[e]||r.key;if(i)for(let e of t)n(e,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&n(e,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return o}(e.reduce((t,e)=>t.concat(e),[]))),o}let Nc=null;const Fc=4e3;let Hc=null;function Kc(t,e,o,r){Hc=e;let i=function(t){var e=!(Ea&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Za&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?Ma:za)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),n=dn(sn(i,0))==i.length&&" "!=i,a="",s=!1,l=!1,d=!1;Nc&&Nc.view==o&&Nc.scope==r&&(a=Nc.prefix+" ",$d.indexOf(e.keyCode)<0&&(l=!0,Nc=null));let c,h,p=new Set,u=t=>{if(t){for(let e of t.run)if(!p.has(e)&&(p.add(e),e(o)))return t.stopPropagation&&(d=!0),!0;t.preventDefault&&(t.stopPropagation&&(d=!0),l=!0)}return!1},m=t[r];return m&&(u(m[a+Uc(i,e,!n)])?s=!0:!n||!(e.altKey||e.metaKey||e.ctrlKey)||Ss.windows&&e.ctrlKey&&e.altKey||Ss.mac&&e.altKey&&!e.ctrlKey&&!e.metaKey||!(c=za[e.keyCode])||c==i?n&&e.shiftKey&&u(m[a+Uc(i,e,!0)])&&(s=!0):(u(m[a+Uc(c,e,!0)])||e.shiftKey&&(h=Ma[e.keyCode])!=i&&h!=c&&u(m[a+Uc(h,e,!1)]))&&(s=!0),!s&&u(m._any)&&(s=!0)),l&&(s=!0),s&&d&&e.stopPropagation(),Hc=null,s}class Jc{constructor(t,e,o,r,i){this.className=t,this.left=e,this.top=o,this.width=r,this.height=i}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,o){if(o.empty){let r=t.coordsAtPos(o.head,o.assoc||1);if(!r)return[];let i=th(t);return[new Jc(e,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(t,e,o){if(o.to<=t.viewport.from||o.from>=t.viewport.to)return[];let r=Math.max(o.from,t.viewport.from),i=Math.min(o.to,t.viewport.to),n=t.textDirection==Js.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=th(t),d=a.querySelector(".cm-line"),c=d&&window.getComputedStyle(d),h=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),p=s.right-(c?parseInt(c.paddingRight):0),u=cd(t,r,1),m=cd(t,i,-1),f=u.type==Ds.Text?u:null,b=m.type==Ds.Text?m:null;if(f&&(t.lineWrapping||u.widgetLineBreaks)&&(f=eh(t,r,1,f)),b&&(t.lineWrapping||m.widgetLineBreaks)&&(b=eh(t,i,-1,b)),f&&b&&f.from==b.from&&f.to==b.to)return v(O(o.from,o.to,f));{let e=f?O(o.from,null,f):x(u,!1),r=b?O(null,o.to,b):x(m,!0),i=[];return(f||u).to<(b||m).from-(f&&b?1:0)||u.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<r.top?i.push(g(h,e.bottom,p,r.top)):e.bottom<r.top&&t.elementAtHeight((e.bottom+r.top)/2).type==Ds.Text&&(e.bottom=r.top=(e.bottom+r.top)/2),v(e).concat(i).concat(v(r))}function g(t,o,r,i){return new Jc(e,t-l.left,o-l.top,r-t,i-o)}function v({top:t,bottom:e,horizontal:o}){let r=[];for(let i=0;i<o.length;i+=2)r.push(g(o[i],t,o[i+1],e));return r}function O(e,o,r){let i=1e9,a=-1e9,s=[];function l(e,o,l,d,c){let u=t.coordsAtPos(e,e==r.to?-2:2),m=t.coordsAtPos(l,l==r.from?2:-2);u&&m&&(i=Math.min(u.top,m.top,i),a=Math.max(u.bottom,m.bottom,a),c==Js.LTR?s.push(n&&o?h:u.left,n&&d?p:m.right):s.push(!n&&d?h:m.left,!n&&o?p:u.right))}let d=null!=e?e:r.from,c=null!=o?o:r.to;for(let r of t.visibleRanges)if(r.to>d&&r.from<c)for(let i=Math.max(r.from,d),n=Math.min(r.to,c);;){let r=t.state.doc.lineAt(i);for(let a of t.bidiSpans(r)){let t=a.from+r.from,s=a.to+r.from;if(t>=n)break;s>i&&l(Math.max(t,i),null==e&&t<=d,Math.min(s,n),null==o&&s>=c,a.dir)}if(i=r.to+1,i>=n)break}return 0==s.length&&l(d,null==e,c,null==o,t.textDirection),{top:i,bottom:a,horizontal:s}}function x(t,e){let o=s.top+(e?t.top:t.bottom);return{top:o,bottom:o,horizontal:[]}}}(t,e,o)}}function th(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Js.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function eh(t,e,o,r){let i=t.coordsAtPos(e,2*o);if(!i)return r;let n=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:n.left+1,y:a}),l=t.posAtCoords({x:n.right-1,y:a});return null==s||null==l?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}class oh{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(rh)!=t.state.facet(rh)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,o=t.facet(rh);for(;e<o.length&&o[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;t==this.scaleX&&e==this.scaleY||(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some((t,e)=>!function(t,e){return t.constructor==e.constructor&&t.eq(e)}(t,this.drawn[e]))){let e=this.dom.firstChild,o=0;for(let r of t)r.update&&e&&r.constructor&&this.drawn[o].constructor&&r.update(e,this.drawn[o])?(e=e.nextSibling,o++):this.dom.insertBefore(r.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t,Ss.ios&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const rh=qn.define();function ih(t){return[Xl.define(e=>new oh(e,t)),rh.of(t)]}const nh=qn.define({combine:t=>la(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function ah(t={}){return[nh.of(t),lh,ch,hh,Pl.of(!0)]}function sh(t){return t.startState.facet(nh)!=t.state.facet(nh)}const lh=ih({above:!0,markers(t){let{state:e}=t,o=e.facet(nh),r=[];for(let i of e.selection.ranges){let n=i==e.selection.main;if(i.empty||o.drawRangeCursor){let e=n?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=i.empty?i:yn.cursor(i.head,i.head>i.anchor?-1:1);for(let i of Jc.forRange(t,e,o))r.push(i)}}return r},update(t,e){t.transactions.some(t=>t.selection)&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let o=sh(t);return o&&dh(t.state,e),t.docChanged||t.selectionSet||o},mount(t,e){dh(e.state,t)},class:"cm-cursorLayer"});function dh(t,e){e.style.animationDuration=t.facet(nh).cursorBlinkRate+"ms"}const ch=ih({above:!1,markers:t=>t.state.selection.ranges.map(e=>e.empty?[]:Jc.forRange(t,"cm-selectionBackground",e)).reduce((t,e)=>t.concat(e)),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||sh(t),class:"cm-selectionLayer"}),hh=zn.highest(_c.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),ph=Fn.define({map:(t,e)=>null==t?null:e.mapPos(t)}),uh=An.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce((t,e)=>e.is(ph)?e.value:t,t))}),mh=Xl.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let o=t.state.field(uh);null==o?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(uh)!=o||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(uh),o=null!=e&&t.coordsAtPos(e);if(!o)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:o.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:o.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:o.bottom-o.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:o}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/o+"px",this.cursor.style.height=t.height/o+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(uh)!=t&&this.view.dispatch({effects:ph.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function fh(t,e,o,r,i){e.lastIndex=0;for(let n,a=t.iterRange(o,r),s=o;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;n=e.exec(a.value);)i(s+n.index,n)}class bh{constructor(t){const{regexp:e,decoration:o,decorate:r,boundary:i,maxLength:n=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=(t,e,o,i)=>r(i,o,o+t[0].length,t,e);else if("function"==typeof o)this.addMatch=(t,e,r,i)=>{let n=o(t,e,r);n&&i(r,r+t[0].length,n)};else{if(!o)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,r,i)=>i(r,r+t[0].length,o)}this.boundary=i,this.maxLength=n}createDeco(t){let e=new ma,o=e.add.bind(e);for(let{from:e,to:r}of function(t,e){let o=t.visibleRanges;if(1==o.length&&o[0].from==t.viewport.from&&o[0].to==t.viewport.to)return o;let r=[];for(let{from:i,to:n}of o)i=Math.max(t.state.doc.lineAt(i).from,i-e),n=Math.min(t.state.doc.lineAt(n).to,n+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=n:r.push({from:i,to:n});return r}(t,this.maxLength))fh(t.state.doc,this.regexp,e,r,(e,r)=>this.addMatch(r,t,e,o));return e.finish()}updateDeco(t,e){let o=1e9,r=-1;return t.docChanged&&t.changes.iterChanges((e,i,n,a)=>{a>=t.view.viewport.from&&n<=t.view.viewport.to&&(o=Math.min(n,o),r=Math.max(a,r))}),t.viewportMoved||r-o>1e3?this.createDeco(t.view):r>-1?this.updateRange(t.view,e.map(t.changes),o,r):e}updateRange(t,e,o,r){for(let i of t.visibleRanges){let n=Math.max(i.from,o),a=Math.min(i.to,r);if(a>=n){let o=t.state.doc.lineAt(n),r=o.to<a?t.state.doc.lineAt(a):o,s=Math.max(i.from,o.from),l=Math.min(i.to,r.to);if(this.boundary){for(;n>o.from;n--)if(this.boundary.test(o.text[n-1-o.from])){s=n;break}for(;a<r.to;a++)if(this.boundary.test(r.text[a-r.from])){l=a;break}}let d,c=[],h=(t,e,o)=>c.push(o.range(t,e));if(o==r)for(this.regexp.lastIndex=s-o.from;(d=this.regexp.exec(o.text))&&d.index<l-o.from;)this.addMatch(d,t,d.index+o.from,h);else fh(t.state.doc,this.regexp,s,l,(e,o)=>this.addMatch(o,t,e,h));e=e.update({filterFrom:s,filterTo:l,filter:(t,e)=>t<s||e>l,add:c})}}return e}}const gh=null!=/x/.unicode?"gu":"g",vh=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",gh),Oh={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let xh=null;const yh=qn.define({combine(t){let e=la(t,{render:null,specialChars:vh,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==xh&&"undefined"!=typeof document&&document.body){let e=document.body.style;xh=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return xh||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,gh)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,gh)),e}});function wh(t={}){return[yh.of(t),kh||(kh=Xl.fromClass(class{constructor(t){this.view=t,this.decorations=Ys.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(yh)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new bh({regexp:t.specialChars,decoration:(e,o,r)=>{let{doc:i}=o.state,n=sn(e[0],0);if(9==n){let t=i.lineAt(r),e=o.state.tabSize,n=Sa(t.text,e,r-t.from);return Ys.replace({widget:new Sh((e-n%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[n]||(this.decorationCache[n]=Ys.replace({widget:new qh(t,n)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(yh);t.startState.facet(yh)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let kh=null;class qh extends js{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"":String.fromCharCode(9216+t)}(this.code),o=t.state.phrase("Control character")+" "+(Oh[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,o,e);if(r)return r;let i=document.createElement("span");return i.textContent=e,i.title=o,i.setAttribute("aria-label",o),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class Sh extends js{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const Qh=Ys.line({class:"cm-activeLine"}),$h=Xl.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,o=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(o.push(Qh.range(i.from)),e=i.from)}return Ys.set(o)}},{decorations:t=>t.decorations}),Ph=2e3;function Ch(t,e){let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(o),i=o-r.from,n=i>Ph?-1:i==r.length?function(t,e){let o=t.coordsAtPos(t.viewport.from);return o?Math.round(Math.abs((o.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):Sa(r.text,t.state.tabSize,o-r.from);return{line:r.number,col:n,off:i}}function Th(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return _c.mouseSelectionStyle.of((t,o)=>e(o)?function(t,e){let o=Ch(t,e),r=t.state.selection;return o?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(o.line).from),i=t.state.doc.lineAt(e);o={line:i.number,col:o.col,off:Math.min(o.off,i.length)},r=r.map(t.changes)}},get(e,i,n){let a=Ch(t,e);if(!a)return r;let s=function(t,e,o){let r=Math.min(e.line,o.line),i=Math.max(e.line,o.line),n=[];if(e.off>Ph||o.off>Ph||e.col<0||o.col<0){let a=Math.min(e.off,o.off),s=Math.max(e.off,o.off);for(let e=r;e<=i;e++){let o=t.doc.line(e);o.length<=s&&n.push(yn.range(o.from+a,o.to+s))}}else{let a=Math.min(e.col,o.col),s=Math.max(e.col,o.col);for(let e=r;e<=i;e++){let o=t.doc.line(e),r=Qa(o.text,a,t.tabSize,!0);if(r<0)n.push(yn.cursor(o.to));else{let e=Qa(o.text,s,t.tabSize);n.push(yn.range(o.from+r,o.from+e))}}}return n}(t.state,o,a);return s.length?n?yn.create(s.concat(r.ranges)):yn.create(s):r}}:null}(t,o):null)}const Ah={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Rh={style:"cursor: crosshair"};function zh(t={}){let[e,o]=Ah[t.key||"Alt"],r=Xl.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||o(t))},keyup(t){t.keyCode!=e&&o(t)||this.set(!1)},mousemove(t){this.set(o(t))}}});return[r,_c.contentAttributes.of(t=>{var e;return(null===(e=t.plugin(r))||void 0===e?void 0:e.isDown)?Rh:null})]}const Mh="-10000px";class Eh{constructor(t,e,o,r){this.facet=e,this.createTooltipView=o,this.removeTooltipView=r,this.input=t.state.facet(e),this.tooltips=this.input.filter(t=>t);let i=null;this.tooltipViews=this.tooltips.map(t=>i=o(t,i))}update(t,e){var o;let r=t.state.facet(this.facet),i=r.filter(t=>t);if(r===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let n=[],a=e?[]:null;for(let o=0;o<i.length;o++){let r=i[o],s=-1;if(r){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==r.create&&(s=t)}if(s<0)n[o]=this.createTooltipView(r,o?n[o-1]:null),a&&(a[o]=!!r.above);else{let r=n[o]=this.tooltipViews[s];a&&(a[o]=e[s]),r.update&&r.update(t)}}}for(let t of this.tooltipViews)n.indexOf(t)<0&&(this.removeTooltipView(t),null===(o=t.destroy)||void 0===o||o.call(t));return e&&(a.forEach((t,o)=>e[o]=t),e.length=a.length),this.input=r,this.tooltips=i,this.tooltipViews=n,!0}}function Zh(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Xh=qn.define({combine:t=>{var e,o,r;return{position:Ss.ios?"absolute":(null===(e=t.find(t=>t.position))||void 0===e?void 0:e.position)||"fixed",parent:(null===(o=t.find(t=>t.parent))||void 0===o?void 0:o.parent)||null,tooltipSpace:(null===(r=t.find(t=>t.tooltipSpace))||void 0===r?void 0:r.tooltipSpace)||Zh}}}),_h=new WeakMap,jh=Xl.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Xh);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Eh(t,Lh,(t,e)=>this.createTooltip(t,e),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let o=e||t.geometryChanged,r=t.state.facet(Xh);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;o=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);o=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);o&&this.maybeMeasure()}createTooltip(t,e){let o=t.create(this.view),r=e?e.dom:null;if(o.dom.classList.add("cm-tooltip"),t.arrow&&!o.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",o.dom.appendChild(t)}return o.dom.style.position=this.position,o.dom.style.top=Mh,o.dom.style.left="0px",this.container.insertBefore(o.dom,r),o.mount&&o.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(o.dom),o}destroy(){var t,e,o;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(o=this.intersectionObserver)||void 0===o||o.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,o=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(Ss.gecko)o=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==Mh&&"0px"==t.style.left){let e=t.getBoundingClientRect();o=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(o||"absolute"==this.position)if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=Il(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((t,e)=>{let o=this.manager.tooltipViews[e];return o.getCoords?o.getCoords(t.pos):this.view.coordsAtPos(t.pos)}),size:this.manager.tooltipViews.map(({dom:t})=>t.getBoundingClientRect()),space:this.view.state.facet(Xh).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:o}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{visible:o,space:r,scaleX:i,scaleY:n}=t,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],d=this.manager.tooltipViews[s],{dom:c}=d,h=t.pos[s],p=t.size[s];if(!h||!1!==l.clip&&(h.bottom<=Math.max(o.top,r.top)||h.top>=Math.min(o.bottom,r.bottom)||h.right<Math.max(o.left,r.left)-.1||h.left>Math.min(o.right,r.right)+.1)){c.style.top=Mh;continue}let u=l.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,m=u?7:0,f=p.right-p.left,b=null!==(e=_h.get(d))&&void 0!==e?e:p.bottom-p.top,g=d.offset||Vh,v=this.view.textDirection==Js.LTR,O=p.width>r.right-r.left?v?r.left:r.right-p.width:v?Math.max(r.left,Math.min(h.left-(u?14:0)+g.x,r.right-f)):Math.min(Math.max(r.left,h.left-f+(u?14:0)-g.x),r.right-f),x=this.above[s];!l.strictSide&&(x?h.top-b-m-g.y<r.top:h.bottom+b+m+g.y>r.bottom)&&x==r.bottom-h.bottom>h.top-r.top&&(x=this.above[s]=!x);let y=(x?h.top-r.top:r.bottom-h.bottom)-m;if(y<b&&!1!==d.resize){if(y<this.view.defaultLineHeight){c.style.top=Mh;continue}_h.set(d,b),c.style.height=(b=y)/n+"px"}else c.style.height&&(c.style.height="");let w=x?h.top-b-m-g.y:h.bottom+m+g.y,k=O+f;if(!0!==d.overlap)for(let t of a)t.left<k&&t.right>O&&t.top<w+b&&t.bottom>w&&(w=x?t.top-b-2-m:t.bottom+m+2);if("absolute"==this.position?(c.style.top=(w-t.parent.top)/n+"px",Dh(c,(O-t.parent.left)/i)):(c.style.top=w/n+"px",Dh(c,O/i)),u){let t=h.left+(v?g.x:-g.x)-(O+14-7);u.style.left=t/i+"px"}!0!==d.overlap&&a.push({left:O,top:w,right:k,bottom:w+b}),c.classList.toggle("cm-tooltip-above",x),c.classList.toggle("cm-tooltip-below",!x),d.positioned&&d.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Mh}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Dh(t,e){let o=parseInt(t.style.left,10);(isNaN(o)||Math.abs(e-o)>1)&&(t.style.left=e+"px")}const Yh=_c.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Vh={x:0,y:0},Lh=qn.define({enables:[jh,Yh]}),Uh=qn.define({combine:t=>t.reduce((t,e)=>t.concat(e),[])});class Bh{static create(t){return new Bh(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Eh(t,Uh,(t,e)=>this.createHostedView(t,e),t=>t.dom.remove())}createHostedView(t,e){let o=t.create(this.view);return o.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(o.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&o.mount&&o.mount(this.view),o}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let o of this.manager.tooltipViews){let r=o[t];if(void 0!==r)if(void 0===e)e=r;else if(e!==r)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Wh=Lh.compute([Uh],t=>{let e=t.facet(Uh);return 0===e.length?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos})),create:Bh.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Ih{constructor(t,e,o,r,i){this.view=t,this.source=e,this.field=o,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,o=t.docView.nearest(e.target);if(!o)return;let r,i=1;if(o instanceof Ps)r=o.posAtStart;else{if(r=t.posAtCoords(e),null==r)return;let o=t.coordsAtPos(r);if(!o||e.y<o.top||e.y>o.bottom||e.x<o.left-t.defaultCharacterWidth||e.x>o.right+t.defaultCharacterWidth)return;let n=t.bidiSpans(t.state.doc.lineAt(r)).find(t=>t.from<=r&&t.to>=r),a=n&&n.dir==Js.RTL?-1:1;i=e.x<o.left?-a:a}let n=this.source(t,r,i);if(null==n?void 0:n.then){let e=this.pending={pos:r};n.then(o=>{this.pending==e&&(this.pending=null,!o||Array.isArray(o)&&!o.length||t.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])}))},e=>zl(t.state,e,"hover tooltip"))}else!n||Array.isArray(n)&&!n.length||t.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])})}get tooltip(){let t=this.view.plugin(jh),e=t?t.manager.tooltips.findIndex(t=>t.create==Bh.create):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,o;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&i&&!function(t,e){let o,{left:r,right:i,top:n,bottom:a}=t.getBoundingClientRect();if(o=t.querySelector(".cm-tooltip-arrow")){let t=o.getBoundingClientRect();n=Math.min(t.top,n),a=Math.max(t.bottom,a)}return e.clientX>=r-Gh&&e.clientX<=i+Gh&&e.clientY>=n-Gh&&e.clientY<=a+Gh}(i.dom,t)||this.pending){let{pos:i}=r[0]||this.pending,n=null!==(o=null===(e=r[0])||void 0===e?void 0:e.end)&&void 0!==o?o:i;(i==n?this.view.posAtCoords(this.lastMove)==i:function(t,e,o,r,i){let n=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(n.left>r||n.right<r||n.top>i||Math.min(n.bottom,a)<i)return!1;let s=t.posAtCoords({x:r,y:i},!1);return s>=e&&s<=o}(this.view,i,n,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=o=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(o.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Gh=4;function Nh(t,e={}){let o=Fn.define(),r=An.define({create:()=>[],update(t,r){if(t.length&&(e.hideOnChange&&(r.docChanged||r.selection)?t=[]:e.hideOn&&(t=t.filter(t=>!e.hideOn(r,t))),r.docChanged)){let e=[];for(let o of t){let t=r.changes.mapPos(o.pos,-1,hn.TrackDel);if(null!=t){let i=Object.assign(Object.create(null),o);i.pos=t,null!=i.end&&(i.end=r.changes.mapPos(i.end)),e.push(i)}}t=e}for(let e of r.effects)e.is(o)&&(t=e.value),e.is(Hh)&&(t=[]);return t},provide:t=>Uh.from(t)});return{active:r,extension:[r,Xl.define(i=>new Ih(i,t,r,o,e.hoverTime||300)),Wh]}}function Fh(t,e){let o=t.plugin(jh);if(!o)return null;let r=o.manager.tooltips.indexOf(e);return r<0?null:o.manager.tooltipViews[r]}const Hh=Fn.define(),Kh=qn.define({combine(t){let e,o;for(let r of t)e=e||r.topContainer,o=o||r.bottomContainer;return{topContainer:e,bottomContainer:o}}});function Jh(t,e){let o=t.plugin(tp),r=o?o.specs.indexOf(e):-1;return r>-1?o.panels[r]:null}const tp=Xl.fromClass(class{constructor(t){this.input=t.state.facet(rp),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(e=>e(t));let e=t.state.facet(Kh);this.top=new ep(t,!0,e.topContainer),this.bottom=new ep(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(Kh);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ep(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ep(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let o=t.state.facet(rp);if(o!=this.input){let e=o.filter(t=>t),r=[],i=[],n=[],a=[];for(let o of e){let e,s=this.specs.indexOf(o);s<0?(e=o(t.view),a.push(e)):(e=this.panels[s],e.update&&e.update(t)),r.push(e),(e.top?i:n).push(e)}this.specs=e,this.panels=r,this.top.sync(i),this.bottom.sync(n);for(let t of a)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>_c.scrollMargins.of(e=>{let o=e.plugin(t);return o&&{top:o.top.scrollMargin(),bottom:o.bottom.scrollMargin()}})});class ep{constructor(t,e,o){this.view=t,this.top=e,this.container=o,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=op(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=op(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function op(t){let e=t.nextSibling;return t.remove(),e}const rp=qn.define({enables:tp});class ip extends da{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}ip.prototype.elementClass="",ip.prototype.toDOM=void 0,ip.prototype.mapMode=hn.TrackBefore,ip.prototype.startSide=ip.prototype.endSide=-1,ip.prototype.point=!0;const np=qn.define(),ap=qn.define(),sp={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>ua.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},lp=qn.define();function dp(t){return[hp(),lp.of({...sp,...t})]}const cp=qn.define({combine:t=>t.some(t=>t)});function hp(t){let e=[pp];return t&&!1===t.fixed&&e.push(cp.of(!0)),e}const pp=Xl.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(lp).map(e=>new bp(t,e)),this.fixed=!t.state.facet(cp);for(let t of this.gutters)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,o=t.view.viewport,r=Math.min(e.to,o.to)-Math.max(e.from,o.from);this.syncGutters(r<.8*(o.to-o.from))}if(t.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(cp)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let o=ua.iter(this.view.state.facet(np),this.view.viewport.from),r=[],i=this.gutters.map(t=>new fp(t,this.view.viewport,-this.view.documentPadding.top));for(let t of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(t.type)){let e=!0;for(let n of t.type)if(n.type==Ds.Text&&e){mp(o,r,n.from);for(let t of i)t.line(this.view,n,r);e=!1}else if(n.widget)for(let t of i)t.widget(this.view,n)}else if(t.type==Ds.Text){mp(o,r,t.from);for(let e of i)e.line(this.view,t,r)}else if(t.widget)for(let e of i)e.widget(this.view,t);for(let t of i)t.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(lp),o=t.state.facet(lp),r=t.docChanged||t.heightChanged||t.viewportChanged||!ua.eq(t.startState.facet(np),t.state.facet(np),t.view.viewport.from,t.view.viewport.to);if(e==o)for(let e of this.gutters)e.update(t)&&(r=!0);else{r=!0;let i=[];for(let r of o){let o=e.indexOf(r);o<0?i.push(new bp(this.view,r)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let t of this.gutters)t.dom.remove(),i.indexOf(t)<0&&t.destroy();for(let t of i)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>_c.scrollMargins.of(e=>{let o=e.plugin(t);if(!o||0==o.gutters.length||!o.fixed)return null;let r=o.dom.offsetWidth*e.scaleX,i=o.domAfter?o.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Js.LTR?{left:r,right:i}:{right:r,left:i}})});function up(t){return Array.isArray(t)?t:[t]}function mp(t,e,o){for(;t.value&&t.from<=o;)t.from==o&&e.push(t.value),t.next()}class fp{constructor(t,e,o){this.gutter=t,this.height=o,this.i=0,this.cursor=ua.iter(t.markers,e.from)}addElement(t,e,o){let{gutter:r}=this,i=(e.top-this.height)/t.scaleY,n=e.height/t.scaleY;if(this.i==r.elements.length){let e=new gp(t,n,i,o);r.elements.push(e),r.dom.appendChild(e.dom)}else r.elements[this.i].update(t,n,i,o);this.height=e.bottom,this.i++}line(t,e,o){let r=[];mp(this.cursor,r,e.from),o.length&&(r=r.concat(o));let i=this.gutter.config.lineMarker(t,e,r);i&&r.unshift(i);let n=this.gutter;(0!=r.length||n.config.renderEmptyElements)&&this.addElement(t,e,r)}widget(t,e){let o=this.gutter.config.widgetMarker(t,e.widget,e),r=o?[o]:null;for(let o of t.state.facet(ap)){let i=o(t,e.widget,e);i&&(r||(r=[])).push(i)}r&&this.addElement(t,e,r)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class bp{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let o in e.domEventHandlers)this.dom.addEventListener(o,r=>{let i,n=r.target;if(n!=this.dom&&this.dom.contains(n)){for(;n.parentNode!=this.dom;)n=n.parentNode;let t=n.getBoundingClientRect();i=(t.top+t.bottom)/2}else i=r.clientY;let a=t.lineBlockAtHeight(i-t.documentTop);e.domEventHandlers[o](t,a,r)&&r.preventDefault()});this.markers=up(e.markers(t)),e.initialSpacer&&(this.spacer=new gp(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=up(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let o=t.view.viewport;return!ua.eq(this.markers,e,o.from,o.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class gp{constructor(t,e,o,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,o,r)}update(t,e,o,r){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=o&&(this.dom.style.marginTop=(this.above=o)?o+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(!t[o].compare(e[o]))return!1;return!0}(this.markers,r)||this.setMarkers(t,r)}setMarkers(t,e){let o="cm-gutterElement",r=this.dom.firstChild;for(let i=0,n=0;;){let a=n,s=i<e.length?e[i++]:null,l=!1;if(s){let t=s.elementClass;t&&(o+=" "+t);for(let t=n;t<this.markers.length;t++)if(this.markers[t].compare(s)){a=t,l=!0;break}}else a=this.markers.length;for(;n<a;){let t=this.markers[n++];if(t.toDOM){t.destroy(r);let e=r.nextSibling;r.remove(),r=e}}if(!s)break;s.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(s.toDOM(t),r)),l&&n++}this.dom.className=o,this.markers=e}destroy(){this.setMarkers(null,[])}}const vp=qn.define(),Op=qn.define(),xp=qn.define({combine:t=>la(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let o=Object.assign({},t);for(let t in e){let r=o[t],i=e[t];o[t]=r?(t,e,o)=>r(t,e,o)||i(t,e,o):i}return o}})});class yp extends ip{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function wp(t,e){return t.state.facet(xp).formatNumber(e,t.state)}const kp=lp.compute([xp],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(vp),lineMarker:(t,e,o)=>o.some(t=>t.toDOM)?null:new yp(wp(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,o)=>{for(let r of t.state.facet(Op)){let i=r(t,e,o);if(i)return i}return null},lineMarkerChange:t=>t.startState.facet(xp)!=t.state.facet(xp),initialSpacer:t=>new yp(wp(t,Sp(t.state.doc.lines))),updateSpacer(t,e){let o=wp(e.view,Sp(e.view.state.doc.lines));return o==t.number?t:new yp(o)},domEventHandlers:t.facet(xp).domEventHandlers,side:"before"}));function qp(t={}){return[xp.of(t),hp(),kp]}function Sp(t){let e=9;for(;e<t;)e=10*e+9;return e}const Qp=new class extends ip{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},$p=np.compute(["selection"],t=>{let e=[],o=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>o&&(o=i,e.push(Qp.range(i)))}return ua.of(e)}),Pp=1024;let Cp=0;class Tp{constructor(t,e){this.from=t,this.to=e}}class Ap{constructor(t={}){this.id=Cp++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=Mp.match(t)),e=>{let o=t(e);return void 0===o?null:[this,o]}}}Ap.closedBy=new Ap({deserialize:t=>t.split(" ")}),Ap.openedBy=new Ap({deserialize:t=>t.split(" ")}),Ap.group=new Ap({deserialize:t=>t.split(" ")}),Ap.isolate=new Ap({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),Ap.contextHash=new Ap({perNode:!0}),Ap.lookAhead=new Ap({perNode:!0}),Ap.mounted=new Ap({perNode:!0});class Rp{constructor(t,e,o){this.tree=t,this.overlay=e,this.parser=o}static get(t){return t&&t.props&&t.props[Ap.mounted.id]}}const zp=Object.create(null);class Mp{constructor(t,e,o,r=0){this.name=t,this.props=e,this.id=o,this.flags=r}static define(t){let e=t.props&&t.props.length?Object.create(null):zp,o=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),r=new Mp(t.name||"",e,t.id,o);if(t.props)for(let o of t.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[o[0].id]=o[1]}return r}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(Ap.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let o in t)for(let r of o.split(" "))e[r]=t[o];return t=>{for(let o=t.prop(Ap.group),r=-1;r<(o?o.length:0);r++){let i=e[r<0?t.name:o[r]];if(i)return i}}}}Mp.none=new Mp("",Object.create(null),0,8);class Ep{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let o of this.types){let r=null;for(let e of t){let t=e(o);t&&(r||(r=Object.assign({},o.props)),r[t[0].id]=t[1])}e.push(r?new Mp(o.name,r,o.id,o.flags):o)}return new Ep(e)}}const Zp=new WeakMap,Xp=new WeakMap;var _p;!function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"}(_p||(_p={}));class jp{constructor(t,e,o,r,i){if(this.type=t,this.children=e,this.positions=o,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[t,e]of i)this.props["number"==typeof t?t:t.id]=e}}toString(){let t=Rp.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let t of this.children){let o=t.toString();o&&(e&&(e+=","),e+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new Kp(this.topNode,t)}cursorAt(t,e=0,o=0){let r=Zp.get(this)||this.topNode,i=new Kp(r);return i.moveTo(t,e),Zp.set(this,i._tree),i}get topNode(){return new Bp(this,0,0,null)}resolve(t,e=0){let o=Lp(Zp.get(this)||this.topNode,t,e,!1);return Zp.set(this,o),o}resolveInner(t,e=0){let o=Lp(Xp.get(this)||this.topNode,t,e,!0);return Xp.set(this,o),o}resolveStack(t,e=0){return function(t,e,o){let r=t.resolveInner(e,o),i=null;for(let t=r instanceof Bp?r:r.context.parent;t;t=t.parent)if(t.index<0){let n=t.parent;(i||(i=[r])).push(n.resolve(e,o)),t=n}else{let n=Rp.get(t.tree);if(n&&n.overlay&&n.overlay[0].from<=e&&n.overlay[n.overlay.length-1].to>=e){let a=new Bp(n.tree,n.overlay[0].from+t.from,-1,t);(i||(i=[r])).push(Lp(a,e,o,!1))}}return i?Fp(i):r}(this,t,e)}iterate(t){let{enter:e,leave:o,from:r=0,to:i=this.length}=t,n=t.mode||0,a=(n&_p.IncludeAnonymous)>0;for(let t=this.cursor(n|_p.IncludeAnonymous);;){let n=!1;if(t.from<=i&&t.to>=r&&(!a&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;n=!0}for(;n&&o&&(a||!t.type.isAnonymous)&&o(t),!t.nextSibling();){if(!t.parent())return;n=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:ou(Mp.none,this.children,this.positions,0,this.children.length,0,this.length,(t,e,o)=>new jp(this.type,t,e,o,this.propValues),t.makeTree||((t,e,o)=>new jp(Mp.none,t,e,o)))}static build(t){return function(t){var e;let{buffer:o,nodeSet:r,maxBufferLength:i=Pp,reused:n=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(o)?new Dp(o,o.length):o,l=r.types,d=0,c=0;function h(t,e,o,b,g,v){let{id:O,start:x,end:y,size:w}=s,k=c,q=d;for(;w<0;){if(s.next(),-1==w){let e=n[O];return o.push(e),void b.push(x-t)}if(-3==w)return void(d=O);if(-4==w)return void(c=O);throw new RangeError(`Unrecognized record size: ${w}`)}let S,Q,$=l[O],P=x-t;if(y-x<=i&&(Q=function(t,e){let o=s.fork(),r=0,n=0,l=0,d=o.end-i,c={size:0,start:0,skip:0};t:for(let i=o.pos-t;o.pos>i;){let t=o.size;if(o.id==e&&t>=0){c.size=r,c.start=n,c.skip=l,l+=4,r+=4,o.next();continue}let s=o.pos-t;if(t<0||s<i||o.start<d)break;let h=o.id>=a?4:0,p=o.start;for(o.next();o.pos>s;){if(o.size<0){if(-3!=o.size)break t;h+=4}else o.id>=a&&(h+=4);o.next()}n=p,r+=t,l+=h}return(e<0||r==t)&&(c.size=r,c.start=n,c.skip=l),c.size>4?c:void 0}(s.pos-e,g))){let e=new Uint16Array(Q.size-Q.skip),o=s.pos-Q.size,i=e.length;for(;s.pos>o;)i=f(Q.start,e,i);S=new Yp(e,y-Q.start,r),P=Q.start-t}else{let t=s.pos-w;s.next();let e=[],o=[],r=O>=a?O:-1,n=0,l=y;for(;s.pos>t;)r>=0&&s.id==r&&s.size>=0?(s.end<=l-i&&(u(e,o,x,n,s.end,l,r,k,q),n=e.length,l=s.end),s.next()):v>2500?p(x,t,e,o):h(x,t,e,o,r,v+1);if(r>=0&&n>0&&n<e.length&&u(e,o,x,n,x,l,r,k,q),e.reverse(),o.reverse(),r>-1&&n>0){let t=function(t,e){return(o,r,i)=>{let n,a,s=0,l=o.length-1;if(l>=0&&(n=o[l])instanceof jp){if(!l&&n.type==t&&n.length==i)return n;(a=n.prop(Ap.lookAhead))&&(s=r[l]+n.length+a)}return m(t,o,r,i,s,e)}}($,q);S=ou($,e,o,0,e.length,0,y-x,t,t)}else S=m($,e,o,y-x,k-y,q)}o.push(S),b.push(P)}function p(t,e,o,n){let a=[],l=0,d=-1;for(;s.pos>e;){let{id:t,start:e,end:o,size:r}=s;if(r>4)s.next();else{if(d>-1&&e<d)break;d<0&&(d=o-i),a.push(t,e,o),l++,s.next()}}if(l){let e=new Uint16Array(4*l),i=a[a.length-2];for(let t=a.length-3,o=0;t>=0;t-=3)e[o++]=a[t],e[o++]=a[t+1]-i,e[o++]=a[t+2]-i,e[o++]=o;o.push(new Yp(e,a[2]-i,r)),n.push(i-t)}}function u(t,e,o,i,n,a,s,l,d){let c=[],h=[];for(;t.length>i;)c.push(t.pop()),h.push(e.pop()+o-n);t.push(m(r.types[s],c,h,a-n,l-a,d)),e.push(n-o)}function m(t,e,o,r,i,n,a){if(n){let t=[Ap.contextHash,n];a=a?[t].concat(a):[t]}if(i>25){let t=[Ap.lookAhead,i];a=a?[t].concat(a):[t]}return new jp(t,e,o,r,a)}function f(t,e,o){let{id:r,start:i,end:n,size:l}=s;if(s.next(),l>=0&&r<a){let a=o;if(l>4){let r=s.pos-(l-4);for(;s.pos>r;)o=f(t,e,o)}e[--o]=a,e[--o]=n-t,e[--o]=i-t,e[--o]=r}else-3==l?d=r:-4==l&&(c=r);return o}let b=[],g=[];for(;s.pos>0;)h(t.start||0,t.bufferStart||0,b,g,-1,0);let v=null!==(e=t.length)&&void 0!==e?e:b.length?g[0]+b[0].length:0;return new jp(l[t.topID],b.reverse(),g.reverse(),v)}(t)}}jp.empty=new jp(Mp.none,[],[],0);class Dp{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Dp(this.buffer,this.index)}}class Yp{constructor(t,e,o){this.buffer=t,this.length=e,this.set=o}get type(){return Mp.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],o=this.buffer[t+3],r=this.set.types[e],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),o==(t+=4))return i;let n=[];for(;t<o;)n.push(this.childString(t)),t=this.buffer[t+3];return i+"("+n.join(",")+")"}findChild(t,e,o,r,i){let{buffer:n}=this,a=-1;for(let s=t;s!=e&&!(Vp(i,r,n[s+1],n[s+2])&&(a=s,o>0));s=n[s+3]);return a}slice(t,e,o){let r=this.buffer,i=new Uint16Array(e-t),n=0;for(let a=t,s=0;a<e;){i[s++]=r[a++],i[s++]=r[a++]-o;let e=i[s++]=r[a++]-o;i[s++]=r[a++]-t,n=Math.max(n,e)}return new Yp(i,n,this.set)}}function Vp(t,e,o,r){switch(t){case-2:return o<e;case-1:return r>=e&&o<e;case 0:return o<e&&r>e;case 1:return o<=e&&r>e;case 2:return r>e;case 4:return!0}}function Lp(t,e,o,r){for(var i;t.from==t.to||(o<1?t.from>=e:t.from>e)||(o>-1?t.to<=e:t.to<e);){let e=!r&&t instanceof Bp&&t.index<0?null:t.parent;if(!e)return t;t=e}let n=r?0:_p.IgnoreOverlays;if(r)for(let r=t,a=r.parent;a;r=a,a=r.parent)r instanceof Bp&&r.index<0&&(null===(i=a.enter(e,o,n))||void 0===i?void 0:i.from)!=r.from&&(t=a);for(;;){let r=t.enter(e,o,n);if(!r)return t;t=r}}class Up{cursor(t=0){return new Kp(this,t)}getChild(t,e=null,o=null){let r=Wp(this,t,e,o);return r.length?r[0]:null}getChildren(t,e=null,o=null){return Wp(this,t,e,o)}resolve(t,e=0){return Lp(this,t,e,!1)}resolveInner(t,e=0){return Lp(this,t,e,!0)}matchContext(t){return Ip(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),o=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(o=e,e=t.prevSibling):e=t}return o}get node(){return this}get next(){return this.parent}}class Bp extends Up{constructor(t,e,o,r){super(),this._tree=t,this.from=e,this.index=o,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,o,r,i=0){for(let n=this;;){for(let{children:a,positions:s}=n._tree,l=e>0?a.length:-1;t!=l;t+=e){let l=a[t],d=s[t]+n.from;if(Vp(r,o,d,d+l.length))if(l instanceof Yp){if(i&_p.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,e,o-d,r);if(a>-1)return new Np(new Gp(n,l,t,d),null,a)}else if(i&_p.IncludeAnonymous||!l.type.isAnonymous||Jp(l)){let a;if(!(i&_p.IgnoreMounts)&&(a=Rp.get(l))&&!a.overlay)return new Bp(a.tree,d,t,n);let s=new Bp(l,d,t,n);return i&_p.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(e<0?l.children.length-1:0,e,o,r)}}if(i&_p.IncludeAnonymous||!n.type.isAnonymous)return null;if(t=n.index>=0?n.index+e:e<0?-1:n._parent._tree.children.length,n=n._parent,!n)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,o=0){let r;if(!(o&_p.IgnoreOverlays)&&(r=Rp.get(this._tree))&&r.overlay){let o=t-this.from;for(let{from:t,to:i}of r.overlay)if((e>0?t<=o:t<o)&&(e<0?i>=o:i>o))return new Bp(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,o)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Wp(t,e,o,r){let i=t.cursor(),n=[];if(!i.firstChild())return n;if(null!=o)for(let t=!1;!t;)if(t=i.type.is(o),!i.nextSibling())return n;for(;;){if(null!=r&&i.type.is(r))return n;if(i.type.is(e)&&n.push(i.node),!i.nextSibling())return null==r?n:[]}}function Ip(t,e,o=e.length-1){for(let r=t;o>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[o]&&e[o]!=r.name)return!1;o--}}return!0}class Gp{constructor(t,e,o,r){this.parent=t,this.buffer=e,this.index=o,this.start=r}}class Np extends Up{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,o){super(),this.context=t,this._parent=e,this.index=o,this.type=t.buffer.set.types[t.buffer.buffer[o]]}child(t,e,o){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.context.start,o);return i<0?null:new Np(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,o=0){if(o&_p.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return i<0?null:new Np(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Np(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Np(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:o}=this.context,r=this.index+4,i=o.buffer[this.index+3];if(i>r){let n=o.buffer[this.index+1];t.push(o.slice(r,i,n)),e.push(0)}return new jp(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Fp(t){if(!t.length)return null;let e=0,o=t[0];for(let r=1;r<t.length;r++){let i=t[r];(i.from>o.from||i.to<o.to)&&(o=i,e=r)}let r=o instanceof Bp&&o.index<0?null:o.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new Hp(i,o)}class Hp{constructor(t,e){this.heads=t,this.node=e}get next(){return Fp(this.heads)}}class Kp{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof Bp)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:o,buffer:r}=this.buffer;return this.type=e||r.set.types[r.buffer[t]],this.from=o+r.buffer[t+1],this.to=o+r.buffer[t+2],!0}yield(t){return!!t&&(t instanceof Bp?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,o){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,o,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.buffer.start,o);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,o=this.mode){return this.buffer?!(o&_p.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,o))}parent(){if(!this.buffer)return this.yieldNode(this.mode&_p.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&_p.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,o=this.stack.length-1;if(t<0){let t=o<0?0:this.stack[o]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(o<0?e.buffer.length:e.buffer[this.stack[o]+3]))return this.yieldBuf(t)}return o<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,o,{buffer:r}=this;if(r){if(t>0){if(this.index<r.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(r.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:o}=r)}else({index:e,_parent:o}=this._tree);for(;o;({index:e,_parent:o}=o))if(e>-1)for(let r=e+t,i=t<0?-1:o._tree.children.length;r!=i;r+=t){let t=o._tree.children[r];if(this.mode&_p.IncludeAnonymous||t instanceof Yp||!t.type.isAnonymous||Jp(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,o=0;if(t&&t.context==this.buffer)t:for(let r=this.index,i=this.stack.length;i>=0;){for(let n=t;n;n=n._parent)if(n.index==r){if(r==this.index)return n;e=n,o=i+1;break t}r=this.stack[--i]}for(let t=o;t<this.stack.length;t++)e=new Np(this.buffer,e,this.stack[t]);return this.bufferNode=new Np(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let o=0;;){let r=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){o++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&e&&e(this),r=this.type.isAnonymous,!o)return;if(this.nextSibling())break;this.parent(),o--,r=!0}}}matchContext(t){if(!this.buffer)return Ip(this.node.parent,t);let{buffer:e}=this.buffer,{types:o}=e.set;for(let r=t.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return Ip(this._tree,t,r);let n=o[e.buffer[this.stack[i]]];if(!n.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}}function Jp(t){return t.children.some(t=>t instanceof Yp||!t.type.isAnonymous||Jp(t))}const tu=new WeakMap;function eu(t,e){if(!t.isAnonymous||e instanceof Yp||e.type!=t)return 1;let o=tu.get(e);if(null==o){o=1;for(let r of e.children){if(r.type!=t||!(r instanceof jp)){o=1;break}o+=eu(t,r)}tu.set(e,o)}return o}function ou(t,e,o,r,i,n,a,s,l){let d=0;for(let o=r;o<i;o++)d+=eu(t,e[o]);let c=Math.ceil(1.5*d/8),h=[],p=[];return function e(o,r,i,a,s){for(let d=i;d<a;){let i=d,u=r[d],m=eu(t,o[d]);for(d++;d<a;d++){let e=eu(t,o[d]);if(m+e>=c)break;m+=e}if(d==i+1){if(m>c){let t=o[i];e(t.children,t.positions,0,t.children.length,r[i]+s);continue}h.push(o[i])}else{let e=r[d-1]+o[d-1].length-u;h.push(ou(t,o,r,i,d,u,e,null,l))}p.push(u+s-n)}}(e,o,r,i,0),(s||l)(h,p,a)}class ru{constructor(){this.map=new WeakMap}setBuffer(t,e,o){let r=this.map.get(t);r||this.map.set(t,r=new Map),r.set(e,o)}getBuffer(t,e){let o=this.map.get(t);return o&&o.get(e)}set(t,e){t instanceof Np?this.setBuffer(t.context.buffer,t.index,e):t instanceof Bp&&this.map.set(t.tree,e)}get(t){return t instanceof Np?this.getBuffer(t.context.buffer,t.index):t instanceof Bp?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class iu{constructor(t,e,o,r,i=!1,n=!1){this.from=t,this.to=e,this.tree=o,this.offset=r,this.open=(i?1:0)|(n?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],o=!1){let r=[new iu(0,t.length,t,0,!1,o)];for(let o of e)o.to>t.length&&r.push(o);return r}static applyChanges(t,e,o=128){if(!e.length)return t;let r=[],i=1,n=t.length?t[0]:null;for(let a=0,s=0,l=0;;a++){let d=a<e.length?e[a]:null,c=d?d.fromA:1e9;if(c-s>=o)for(;n&&n.from<c;){let e=n;if(s>=e.from||c<=e.to||l){let t=Math.max(e.from,s)-l,o=Math.min(e.to,c)-l;e=t>=o?null:new iu(t,o,e.tree,e.offset+l,a>0,!!d)}if(e&&r.push(e),n.to>c)break;n=i<t.length?t[i++]:null}if(!d)break;s=d.toA,l=d.toA-d.toB}return r}}class nu{startParse(t,e,o){return"string"==typeof t&&(t=new au(t)),o=o?o.length?o.map(t=>new Tp(t.from,t.to)):[new Tp(0,0)]:[new Tp(0,t.length)],this.createParse(t,e||[],o)}parse(t,e,o){let r=this.startParse(t,e,o);for(;;){let t=r.advance();if(t)return t}}}class au{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}class su{constructor(t,e,o,r,i){this.parser=t,this.parse=e,this.overlay=o,this.target=r,this.from=i}}function lu(t){if(!t.length||t.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class du{constructor(t,e,o,r,i,n,a){this.parser=t,this.predicate=e,this.mounts=o,this.index=r,this.start=i,this.target=n,this.prev=a,this.depth=0,this.ranges=[]}}const cu=new Ap({perNode:!0});class hu{constructor(t,e,o,r,i){this.nest=e,this.input=o,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new jp(t.type,t.children,t.positions,t.length,t.propValues.concat([[cu,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let o=Object.assign(Object.create(null),t.target.props);o[Ap.mounted.id]=new Rp(e,t.overlay,t.parser),t.target.props=o}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].from<t&&(t=Math.min(t,this.inner[e].parse.parsedPos));return t}stopAt(t){if(this.stoppedAt=t,this.baseParse)this.baseParse.stopAt(t);else for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].parse.stopAt(t)}startInner(){let t=new bu(this.fragments),e=null,o=null,r=new Kp(new Bp(this.baseTree,this.ranges[0].from,0,null),_p.IncludeAnonymous|_p.IgnoreMounts);t:for(let i,n;;){let a,s=!0;if(null!=this.stoppedAt&&r.from>=this.stoppedAt)s=!1;else if(t.hasNode(r)){if(e){let t=e.mounts.find(t=>t.frag.from<=r.from&&t.frag.to>=r.to&&t.mount.overlay);if(t)for(let o of t.mount.overlay){let i=o.from+t.pos,n=o.to+t.pos;i>=r.from&&n<=r.to&&!e.ranges.some(t=>t.from<n&&t.to>i)&&e.ranges.push({from:i,to:n})}}s=!1}else if(o&&(n=pu(o.ranges,r.from,r.to)))s=2!=n;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||mu(r);let n=t.findMounts(r.from,i.parser);if("function"==typeof i.overlay)e=new du(i.parser,i.overlay,n,this.inner.length,r.from,r.tree,e);else{let t=gu(this.ranges,i.overlay||(r.from<r.to?[new Tp(r.from,r.to)]:[]));t.length&&lu(t),!t.length&&i.overlay||this.inner.push(new su(i.parser,t.length?i.parser.startParse(this.input,Ou(n,t),t):i.parser.startParse(""),i.overlay?i.overlay.map(t=>new Tp(t.from-r.from,t.to-r.from)):null,r.tree,t.length?t[0].from:r.from)),i.overlay?t.length&&(o={ranges:t,depth:0,prev:o}):s=!1}}else if(e&&(a=e.predicate(r))&&(!0===a&&(a=new Tp(r.from,r.to)),a.from<a.to)){let t=e.ranges.length-1;t>=0&&e.ranges[t].to==a.from?e.ranges[t]={from:e.ranges[t].from,to:a.to}:e.ranges.push(a)}if(s&&r.firstChild())e&&e.depth++,o&&o.depth++;else for(;!r.nextSibling();){if(!r.parent())break t;if(e&&! --e.depth){let t=gu(this.ranges,e.ranges);t.length&&(lu(t),this.inner.splice(e.index,0,new su(e.parser,e.parser.startParse(this.input,Ou(e.mounts,t),t),e.ranges.map(t=>new Tp(t.from-e.start,t.to-e.start)),e.target,t[0].from))),e=e.prev}o&&! --o.depth&&(o=o.prev)}}}}function pu(t,e,o){for(let r of t){if(r.from>=o)break;if(r.to>e)return r.from<=e&&r.to>=o?2:1}return 0}function uu(t,e,o,r,i,n){if(e<o){let a=t.buffer[e+1];r.push(t.slice(e,o,a)),i.push(a-n)}}function mu(t){let{node:e}=t,o=[],r=e.context.buffer;do{o.push(t.index),t.parent()}while(!t.tree);let i=t.tree,n=i.children.indexOf(r),a=i.children[n],s=a.buffer,l=[n];i.children[n]=function t(r,i,n,d,c,h){let p=o[h],u=[],m=[];uu(a,r,p,u,m,d);let f=s[p+1],b=s[p+2];l.push(u.length);let g=h?t(p+4,s[p+3],a.set.types[s[p]],f,b-f,h-1):e.toTree();return u.push(g),m.push(f-d),uu(a,s[p+3],i,u,m,d),new jp(n,u,m,c)}(0,s.length,Mp.none,0,a.length,o.length-1);for(let e of l){let o=t.tree.children[e],r=t.tree.positions[e];t.yield(new Bp(o,r+t.from,e,t._tree))}}class fu{constructor(t,e){this.offset=e,this.done=!1,this.cursor=t.cursor(_p.IncludeAnonymous|_p.IgnoreMounts)}moveTo(t){let{cursor:e}=this,o=t-this.offset;for(;!this.done&&e.from<o;)e.to>=t&&e.enter(o,1,_p.IgnoreOverlays|_p.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof jp))break;e=e.children[0]}return!1}}class bu{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let o=this.curFrag=t[0];this.curTo=null!==(e=o.tree.prop(cu))&&void 0!==e?e:o.to,this.inner=new fu(o.tree,-o.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(cu))&&void 0!==t?t:e.to,this.inner=new fu(e.tree,-e.offset)}}findMounts(t,e){var o;let r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let i=null===(o=t.tree)||void 0===o?void 0:o.prop(Ap.mounted);if(i&&i.parser==e)for(let e=this.fragI;e<this.fragments.length;e++){let o=this.fragments[e];if(o.from>=t.to)break;o.tree==this.curFrag.tree&&r.push({frag:o,pos:t.from-o.offset,mount:i})}}}return r}}function gu(t,e){let o=null,r=e;for(let i=1,n=0;i<t.length;i++){let a=t[i-1].to,s=t[i].from;for(;n<r.length;n++){let t=r[n];if(t.from>=s)break;t.to<=a||(o||(r=o=e.slice()),t.from<a?(o[n]=new Tp(t.from,a),t.to>s&&o.splice(n+1,0,new Tp(s,t.to))):t.to>s?o[n--]=new Tp(s,t.to):o.splice(n--,1))}}return r}function vu(t,e,o,r){let i=0,n=0,a=!1,s=!1,l=-1e9,d=[];for(;;){let c=i==t.length?1e9:a?t[i].to:t[i].from,h=n==e.length?1e9:s?e[n].to:e[n].from;if(a!=s){let t=Math.max(l,o),e=Math.min(c,h,r);t<e&&d.push(new Tp(t,e))}if(l=Math.min(c,h),1e9==l)break;c==l&&(a?(a=!1,i++):a=!0),h==l&&(s?(s=!1,n++):s=!0)}return d}function Ou(t,e){let o=[];for(let{pos:r,mount:i,frag:n}of t){let t=r+(i.overlay?i.overlay[0].from:0),a=t+i.tree.length,s=Math.max(n.from,t),l=Math.min(n.to,a);if(i.overlay){let a=vu(e,i.overlay.map(t=>new Tp(t.from+r,t.to+r)),s,l);for(let e=0,r=s;;e++){let s=e==a.length,d=s?l:a[e].from;if(d>r&&o.push(new iu(r,d,i.tree,-t,n.from>=r||n.openStart,n.to<=d||n.openEnd)),s)break;r=a[e].to}}else o.push(new iu(s,l,i.tree,-t,n.from>=t||n.openStart,n.to<=a||n.openEnd))}return o}let xu=0;class yu{constructor(t,e,o,r){this.name=t,this.set=e,this.base=o,this.modified=r,this.id=xu++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let o="string"==typeof t?t:"?";if(t instanceof yu&&(e=t),null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let r=new yu(o,[],null,[]);if(r.set.push(r),e)for(let t of e.set)r.set.push(t);return r}static defineModifier(t){let e=new ku(t);return t=>t.modified.indexOf(e)>-1?t:ku.get(t.base||t,t.modified.concat(e).sort((t,e)=>t.id-e.id))}}let wu=0;class ku{constructor(t){this.name=t,this.instances=[],this.id=wu++}static get(t,e){if(!e.length)return t;let o=e[0].instances.find(o=>o.base==t&&function(t,e){return t.length==e.length&&t.every((t,o)=>t==e[o])}(e,o.modified));if(o)return o;let r=[],i=new yu(t.name,r,t,e);for(let t of e)t.instances.push(i);let n=function(t){let e=[[]];for(let o=0;o<t.length;o++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[o]));return e.sort((t,e)=>e.length-t.length)}(e);for(let e of t.set)if(!e.modified.length)for(let t of n)r.push(ku.get(e,t));return i}}function qu(t){let e=Object.create(null);for(let o in t){let r=t[o];Array.isArray(r)||(r=[r]);for(let t of o.split(" "))if(t){let o=[],i=2,n=t;for(let e=0;;){if("..."==n&&e>0&&e+3==t.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(n);if(!r)throw new RangeError("Invalid path: "+t);if(o.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),e+=r[0].length,e==t.length)break;let a=t[e++];if(e==t.length&&"!"==a){i=0;break}if("/"!=a)throw new RangeError("Invalid path: "+t);n=t.slice(e)}let a=o.length-1,s=o[a];if(!s)throw new RangeError("Invalid path: "+t);let l=new Qu(r,i,a>0?o.slice(0,a):null);e[s]=l.sort(e[s])}}return Su.add(e)}const Su=new Ap;class Qu{constructor(t,e,o,r){this.tags=t,this.mode=e,this.context=o,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}function $u(t,e){let o=Object.create(null);for(let e of t)if(Array.isArray(e.tag))for(let t of e.tag)o[t.id]=e.class;else o[e.tag.id]=e.class;let{scope:r,all:i=null}=e||{};return{style:t=>{let e=i;for(let r of t)for(let t of r.set){let r=o[t.id];if(r){e=e?e+" "+r:r;break}}return e},scope:r}}function Pu(t,e,o,r=0,i=t.length){let n=new Cu(r,Array.isArray(e)?e:[e],o);n.highlightRange(t.cursor(),r,i,"",n.highlighters),n.flush(i)}Qu.empty=new Qu([],2,null);class Cu{constructor(t,e,o){this.at=t,this.highlighters=e,this.span=o,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,o,r,i){let{type:n,from:a,to:s}=t;if(a>=o||s<=e)return;n.isTop&&(i=this.highlighters.filter(t=>!t.scope||t.scope(n)));let l=r,d=function(t){let e=t.type.prop(Su);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||Qu.empty,c=function(t,e){let o=null;for(let r of t){let t=r.style(e);t&&(o=o?o+" "+t:t)}return o}(i,d.tags);if(c&&(l&&(l+=" "),l+=c,1==d.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(e,a),l),d.opaque)return;let h=t.tree&&t.tree.prop(Ap.mounted);if(h&&h.overlay){let n=t.node.enter(h.overlay[0].from+a,1),d=this.highlighters.filter(t=>!t.scope||t.scope(h.tree.type)),c=t.firstChild();for(let p=0,u=a;;p++){let m=p<h.overlay.length?h.overlay[p]:null,f=m?m.from+a:s,b=Math.max(e,u),g=Math.min(o,f);if(b<g&&c)for(;t.from<g&&(this.highlightRange(t,b,g,r,i),this.startSpan(Math.min(g,t.to),l),!(t.to>=f)&&t.nextSibling()););if(!m||f>o)break;u=m.to+a,u>e&&(this.highlightRange(n.cursor(),Math.max(e,m.from+a),Math.min(o,u),"",d),this.startSpan(Math.min(o,u),l))}c&&t.parent()}else if(t.firstChild()){h&&(r="");do{if(!(t.to<=e)){if(t.from>=o)break;this.highlightRange(t,e,o,r,i),this.startSpan(Math.min(o,t.to),l)}}while(t.nextSibling());t.parent()}}}const Tu=yu.define,Au=Tu(),Ru=Tu(),zu=Tu(Ru),Mu=Tu(Ru),Eu=Tu(),Zu=Tu(Eu),Xu=Tu(Eu),_u=Tu(),ju=Tu(_u),Du=Tu(),Yu=Tu(),Vu=Tu(),Lu=Tu(Vu),Uu=Tu(),Bu={comment:Au,lineComment:Tu(Au),blockComment:Tu(Au),docComment:Tu(Au),name:Ru,variableName:Tu(Ru),typeName:zu,tagName:Tu(zu),propertyName:Mu,attributeName:Tu(Mu),className:Tu(Ru),labelName:Tu(Ru),namespace:Tu(Ru),macroName:Tu(Ru),literal:Eu,string:Zu,docString:Tu(Zu),character:Tu(Zu),attributeValue:Tu(Zu),number:Xu,integer:Tu(Xu),float:Tu(Xu),bool:Tu(Eu),regexp:Tu(Eu),escape:Tu(Eu),color:Tu(Eu),url:Tu(Eu),keyword:Du,self:Tu(Du),null:Tu(Du),atom:Tu(Du),unit:Tu(Du),modifier:Tu(Du),operatorKeyword:Tu(Du),controlKeyword:Tu(Du),definitionKeyword:Tu(Du),moduleKeyword:Tu(Du),operator:Yu,derefOperator:Tu(Yu),arithmeticOperator:Tu(Yu),logicOperator:Tu(Yu),bitwiseOperator:Tu(Yu),compareOperator:Tu(Yu),updateOperator:Tu(Yu),definitionOperator:Tu(Yu),typeOperator:Tu(Yu),controlOperator:Tu(Yu),punctuation:Vu,separator:Tu(Vu),bracket:Lu,angleBracket:Tu(Lu),squareBracket:Tu(Lu),paren:Tu(Lu),brace:Tu(Lu),content:_u,heading:ju,heading1:Tu(ju),heading2:Tu(ju),heading3:Tu(ju),heading4:Tu(ju),heading5:Tu(ju),heading6:Tu(ju),contentSeparator:Tu(_u),list:Tu(_u),quote:Tu(_u),emphasis:Tu(_u),strong:Tu(_u),link:Tu(_u),monospace:Tu(_u),strikethrough:Tu(_u),inserted:Tu(),deleted:Tu(),changed:Tu(),invalid:Tu(),meta:Uu,documentMeta:Tu(Uu),annotation:Tu(Uu),processingInstruction:Tu(Uu),definition:yu.defineModifier("definition"),constant:yu.defineModifier("constant"),function:yu.defineModifier("function"),standard:yu.defineModifier("standard"),local:yu.defineModifier("local"),special:yu.defineModifier("special")};for(let t in Bu){let e=Bu[t];e instanceof yu&&(e.name=t)}var Wu;$u([{tag:Bu.link,class:"tok-link"},{tag:Bu.heading,class:"tok-heading"},{tag:Bu.emphasis,class:"tok-emphasis"},{tag:Bu.strong,class:"tok-strong"},{tag:Bu.keyword,class:"tok-keyword"},{tag:Bu.atom,class:"tok-atom"},{tag:Bu.bool,class:"tok-bool"},{tag:Bu.url,class:"tok-url"},{tag:Bu.labelName,class:"tok-labelName"},{tag:Bu.inserted,class:"tok-inserted"},{tag:Bu.deleted,class:"tok-deleted"},{tag:Bu.literal,class:"tok-literal"},{tag:Bu.string,class:"tok-string"},{tag:Bu.number,class:"tok-number"},{tag:[Bu.regexp,Bu.escape,Bu.special(Bu.string)],class:"tok-string2"},{tag:Bu.variableName,class:"tok-variableName"},{tag:Bu.local(Bu.variableName),class:"tok-variableName tok-local"},{tag:Bu.definition(Bu.variableName),class:"tok-variableName tok-definition"},{tag:Bu.special(Bu.variableName),class:"tok-variableName2"},{tag:Bu.definition(Bu.propertyName),class:"tok-propertyName tok-definition"},{tag:Bu.typeName,class:"tok-typeName"},{tag:Bu.namespace,class:"tok-namespace"},{tag:Bu.className,class:"tok-className"},{tag:Bu.macroName,class:"tok-macroName"},{tag:Bu.propertyName,class:"tok-propertyName"},{tag:Bu.operator,class:"tok-operator"},{tag:Bu.comment,class:"tok-comment"},{tag:Bu.meta,class:"tok-meta"},{tag:Bu.invalid,class:"tok-invalid"},{tag:Bu.punctuation,class:"tok-punctuation"}]);const Iu=new Ap;function Gu(t){return qn.define({combine:t?e=>e.concat(t):void 0})}const Nu=new Ap;class Fu{constructor(t,e,o=[],r=""){this.data=t,this.name=r,sa.prototype.hasOwnProperty("tree")||Object.defineProperty(sa.prototype,"tree",{get(){return Ju(this)}}),this.parser=e,this.extension=[lm.of(this),sa.languageData.of((t,e,o)=>{let r=Hu(t,e,o),i=r.type.prop(Iu);if(!i)return[];let n=t.facet(i),a=r.type.prop(Nu);if(a){let i=r.resolve(e-r.from,o);for(let e of a)if(e.test(i,t)){let o=t.facet(e.facet);return"replace"==e.type?o:o.concat(n)}}return n})].concat(o)}isActiveAt(t,e,o=-1){return Hu(t,e,o).type.prop(Iu)==this.data}findRegions(t){let e=t.facet(lm);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let o=[],r=(t,e)=>{if(t.prop(Iu)==this.data)return void o.push({from:e,to:e+t.length});let i=t.prop(Ap.mounted);if(i){if(i.tree.prop(Iu)==this.data){if(i.overlay)for(let t of i.overlay)o.push({from:t.from+e,to:t.to+e});else o.push({from:e,to:e+t.length});return}if(i.overlay){let t=o.length;if(r(i.tree,i.overlay[0].from+e),o.length>t)return}}for(let o=0;o<t.children.length;o++){let i=t.children[o];i instanceof jp&&r(i,t.positions[o]+e)}};return r(Ju(t),0),o}get allowsNesting(){return!0}}function Hu(t,e,o){let r=t.facet(lm),i=Ju(t).topNode;if(!r||r.allowsNesting)for(let t=i;t;t=t.enter(e,o,_p.ExcludeBuffers))t.type.isTop&&(i=t);return i}Fu.setState=Fn.define();class Ku extends Fu{constructor(t,e,o){super(t,e,[],o),this.parser=e}static define(t){let e=Gu(t.languageData);return new Ku(e,t.parser.configure({props:[Iu.add(t=>t.isTop?e:void 0)]}),t.name)}configure(t,e){return new Ku(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ju(t){let e=t.field(Fu.state,!1);return e?e.tree:jp.empty}class tm{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let o=this.cursorPos-this.string.length;return t<o||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-o,e-o)}}let em=null;class om{constructor(t,e,o=[],r,i,n,a,s){this.parser=t,this.state=e,this.fragments=o,this.tree=r,this.treeLen=i,this.viewport=n,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,e,o){return new om(t,e,[],jp.empty,0,o,[],null)}startParse(){return this.parser.startParse(new tm(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=jp.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var o;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(iu.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(o=this.parse.stoppedAt)&&void 0!==o?o:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}})}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(iu.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=em;em=this;try{return t()}finally{em=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=rm(t,e.from,e.to);return t}changes(t,e){let{fragments:o,tree:r,treeLen:i,viewport:n,skipped:a}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,o,r,i)=>e.push({fromA:t,toA:o,fromB:r,toB:i})),o=iu.applyChanges(o,e),r=jp.empty,i=0,n={from:t.mapPos(n.from,-1),to:t.mapPos(n.to,1)},this.skipped.length){a=[];for(let e of this.skipped){let o=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);o<r&&a.push({from:o,to:r})}}}return new om(this.parser,e,o,r,i,n,a,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:o,to:r}=this.skipped[e];o<t.to&&r>t.from&&(this.fragments=rm(this.fragments,o,r),this.skipped.splice(e--,1))}return!(this.skipped.length>=e||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends nu{createParse(e,o,r){let i=r[0].from,n=r[r.length-1].to;return{parsedPos:i,advance(){let e=em;if(e){for(let t of r)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=n,new jp(Mp.none,[],[],n-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return em}}function rm(t,e,o){return iu.applyChanges(t,[{fromA:e,toA:o,fromB:e,toB:o}])}class im{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),o=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,o)||e.takeTree(),new im(e)}static init(t){let e=Math.min(3e3,t.doc.length),o=om.create(t.facet(lm).parser,t,{from:0,to:e});return o.work(20,e)||o.takeTree(),new im(o)}}Fu.state=An.define({create:im.init,update(t,e){for(let t of e.effects)if(t.is(Fu.setState))return t.value;return e.startState.facet(lm)!=e.state.facet(lm)?im.init(e.state):t.apply(e)}});let nm=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(nm=t=>{let e=-1,o=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(o):cancelIdleCallback(e)});const am="undefined"!=typeof navigator&&(null===(Wu=navigator.scheduling)||void 0===Wu?void 0:Wu.isInputPending)?()=>navigator.scheduling.isInputPending():null,sm=Xl.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(Fu.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(Fu.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=nm(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:o,viewport:{to:r}}=this.view,i=o.field(Fu.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let n=Date.now()+Math.min(this.chunkBudget,100,t&&!am?Math.max(25,t.timeRemaining()-5):1e9),a=i.context.treeLen<r&&o.doc.length>r+1e3,s=i.context.work(()=>am&&am()||Date.now()>n,r+(a?0:1e5));this.chunkBudget-=Date.now()-e,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Fu.setState.of(new im(i.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(t=>zl(this.view.state,t)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),lm=qn.define({combine:t=>t.length?t[0]:null,enables:t=>[Fu.state,sm,_c.contentAttributes.compute([t],e=>{let o=e.facet(t);return o&&o.name?{"data-language":o.name}:{}})]});class dm{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const cm=qn.define(),hm=qn.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function pm(t){let e=t.facet(hm);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function um(t,e){let o="",r=t.tabSize,i=t.facet(hm)[0];if("\t"==i){for(;e>=r;)o+="\t",e-=r;i=" "}for(let t=0;t<e;t++)o+=i;return o}function mm(t,e){t instanceof sa&&(t=new fm(t));for(let o of t.state.facet(cm)){let r=o(t,e);if(void 0!==r)return r}let o=Ju(t.state);return o.length>=e?function(t,e,o){let r=e.resolveStack(o),i=e.resolveInner(o,-1).resolve(o,0).enterUnfinishedNodesBefore(o);if(i!=r.node){let t=[];for(let e=i;e&&!(e.from<r.node.from||e.to>r.node.to||e.from==r.node.from&&e.type==r.node.type);e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)r={node:t[e],next:r}}return gm(r,t,o)}(t,o,e):null}class fm{constructor(t,e={}){this.state=t,this.options=e,this.unit=pm(t)}lineAt(t,e=1){let o=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=o.from&&r<=o.to?i&&r==t?{text:"",from:t}:(e<0?r<t:r<=t)?{text:o.text.slice(r-o.from),from:r}:{text:o.text.slice(0,r-o.from),from:o.from}:o}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:o,from:r}=this.lineAt(t,e);return o.slice(t-r,Math.min(o.length,t+100-r))}column(t,e=1){let{text:o,from:r}=this.lineAt(t,e),i=this.countColumn(o,t-r),n=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return n>-1&&(i+=n-this.countColumn(o,o.search(/\S|$/))),i}countColumn(t,e=t.length){return Sa(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:o,from:r}=this.lineAt(t,e),i=this.options.overrideIndentation;if(i){let t=i(r);if(t>-1)return t}return this.countColumn(o,o.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const bm=new Ap;function gm(t,e,o){for(let r=t;r;r=r.next){let t=vm(r.node);if(t)return t(xm.create(e,o,r))}return 0}function vm(t){let e=t.type.prop(bm);if(e)return e;let o,r=t.firstChild;if(r&&(o=r.type.prop(Ap.closedBy))){let e=t.lastChild,r=e&&o.indexOf(e.name)>-1;return t=>km(t,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?Om:null}function Om(){return 0}class xm extends fm{constructor(t,e,o){super(t.state,t.options),this.base=t,this.pos=e,this.context=o}get node(){return this.context.node}static create(t,e,o){return new xm(t,e,o)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let o=t.resolve(e.from);for(;o.parent&&o.parent.from==o.from;)o=o.parent;if(ym(o,t))break;e=this.state.doc.lineAt(o.from)}return this.lineIndent(e.from)}continue(){return gm(this.context.next,this.base,this.pos)}}function ym(t,e){for(let o=e;o;o=o.parent)if(t==o)return!0;return!1}function wm({closing:t,align:e=!0,units:o=1}){return r=>km(r,e,o,t)}function km(t,e,o,r,i){let n=t.textAfter,a=n.match(/^\s*/)[0].length,s=r&&n.slice(a,a+r.length)==r||i==t.pos+a,l=e?function(t){let e=t.node,o=e.childAfter(e.from),r=e.lastChild;if(!o)return null;let i=t.options.simulateBreak,n=t.state.doc.lineAt(o.from),a=null==i||i<=n.from?n.to:Math.min(n.to,i);for(let t=o.to;;){let i=e.childAfter(t);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=a)return null;let t=/^ */.exec(n.text.slice(o.to-n.from))[0].length;return{from:o.from,to:o.to+t}}t=i.to}}(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*o)}function qm({except:t,units:e=1}={}){return o=>{let r=t&&t.test(o.textAfter);return o.baseIndent+(r?0:e*o.unit)}}const Sm=qn.define(),Qm=new Ap;function $m(t){let e=t.firstChild,o=t.lastChild;return e&&e.to<o.from?{from:e.to,to:o.type.isError?t.to:o.from}:null}function Pm(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Cm(t,e,o){for(let r of t.facet(Sm)){let i=r(t,e,o);if(i)return i}return function(t,e,o){let r=Ju(t);if(r.length<o)return null;let i=null;for(let n=r.resolveStack(o,1);n;n=n.next){let a=n.node;if(a.to<=o||a.from>o)continue;if(i&&a.from<e)break;let s=a.type.prop(Qm);if(s&&(a.to<r.length-50||r.length==t.doc.length||!Pm(a))){let r=s(a,t);r&&r.from<=o&&r.from>=e&&r.to>o&&(i=r)}}return i}(t,e,o)}function Tm(t,e){let o=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return o>=r?void 0:{from:o,to:r}}const Am=Fn.define({map:Tm}),Rm=Fn.define({map:Tm});function zm(t){let e=[];for(let{head:o}of t.state.selection.ranges)e.some(t=>t.from<=o&&t.to>=o)||e.push(t.lineBlockAt(o));return e}const Mm=An.define({create:()=>Ys.none,update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((e,o)=>t=Em(t,e,o)),t=t.map(e.changes);for(let o of e.effects)if(o.is(Am)&&!Xm(t,o.value.from,o.value.to)){let{preparePlaceholder:r}=e.state.facet(Vm),i=r?Ys.replace({widget:new Wm(r(e.state,o.value))}):Bm;t=t.update({add:[i.range(o.value.from,o.value.to)]})}else o.is(Rm)&&(t=t.update({filter:(t,e)=>o.value.from!=t||o.value.to!=e,filterFrom:o.value.from,filterTo:o.value.to}));return e.selection&&(t=Em(t,e.selection.main.head)),t},provide:t=>_c.decorations.from(t),toJSON(t,e){let o=[];return t.between(0,e.doc.length,(t,e)=>{o.push(t,e)}),o},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let o=0;o<t.length;){let r=t[o++],i=t[o++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");e.push(Bm.range(r,i))}return Ys.set(e,!0)}});function Em(t,e,o=e){let r=!1;return t.between(e,o,(t,i)=>{t<o&&i>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:o,filter:(t,r)=>t>=o||r<=e}):t}function Zm(t,e,o){var r;let i=null;return null===(r=t.field(Mm,!1))||void 0===r||r.between(e,o,(t,e)=>{(!i||i.from>t)&&(i={from:t,to:e})}),i}function Xm(t,e,o){let r=!1;return t.between(e,e,(t,i)=>{t==e&&i==o&&(r=!0)}),r}function _m(t,e){return t.field(Mm,!1)?e:e.concat(Fn.appendConfig.of(Lm()))}function jm(t,e,o=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return _c.announce.of(`${t.state.phrase(o?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const Dm=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of zm(t)){let o=Cm(t.state,e.from,e.to);if(o)return t.dispatch({effects:_m(t.state,[Am.of(o),jm(t,o)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(Mm,!1))return!1;let e=[];for(let o of zm(t)){let r=Zm(t.state,o.from,o.to);r&&e.push(Rm.of(r),jm(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,o=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),n=Cm(e,i.from,i.to);n&&o.push(Am.of(n)),r=(n?t.lineBlockAt(n.to):i).to+1}return o.length&&t.dispatch({effects:_m(t.state,o)}),!!o.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(Mm,!1);if(!e||!e.size)return!1;let o=[];return e.between(0,t.state.doc.length,(t,e)=>{o.push(Rm.of({from:t,to:e}))}),t.dispatch({effects:o}),!0}}],Ym={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Vm=qn.define({combine:t=>la(t,Ym)});function Lm(t){let e=[Mm,Fm];return t&&e.push(Vm.of(t)),e}function Um(t,e){let{state:o}=t,r=o.facet(Vm),i=e=>{let o=t.lineBlockAt(t.posAtDOM(e.target)),r=Zm(t.state,o.from,o.to);r&&t.dispatch({effects:Rm.of(r)}),e.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let n=document.createElement("span");return n.textContent=r.placeholderText,n.setAttribute("aria-label",o.phrase("folded code")),n.title=o.phrase("unfold"),n.className="cm-foldPlaceholder",n.onclick=i,n}const Bm=Ys.replace({widget:new class extends js{toDOM(t){return Um(t,null)}}});class Wm extends js{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return Um(t,this.value)}}const Im={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Gm extends ip{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function Nm(t={}){let e={...Im,...t},o=new Gm(e,!0),r=new Gm(e,!1),i=Xl.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(lm)!=t.state.facet(lm)||t.startState.field(Mm,!1)!=t.state.field(Mm,!1)||Ju(t.startState)!=Ju(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new ma;for(let i of t.viewportLineBlocks){let n=Zm(t.state,i.from,i.to)?r:Cm(t.state,i.from,i.to)?o:null;n&&e.add(i.from,i.from,n)}return e.finish()}}),{domEventHandlers:n}=e;return[i,dp({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(i))||void 0===e?void 0:e.markers)||ua.empty},initialSpacer:()=>new Gm(e,!1),domEventHandlers:{...n,click:(t,e,o)=>{if(n.click&&n.click(t,e,o))return!0;let r=Zm(t.state,e.from,e.to);if(r)return t.dispatch({effects:Rm.of(r)}),!0;let i=Cm(t.state,e.from,e.to);return!!i&&(t.dispatch({effects:Am.of(i)}),!0)}}}),Lm()]}const Fm=_c.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Hm{constructor(t,e){let o;function r(t){let e=Ta.newName();return(o||(o=Object.create(null)))["."+e]=t,e}this.specs=t;const i="string"==typeof e.all?e.all:e.all?r(e.all):void 0,n=e.scope;this.scope=n instanceof Fu?t=>t.prop(Iu)==n.data:n?t=>t==n:void 0,this.style=$u(t.map(t=>({tag:t.tag,class:t.class||r(Object.assign({},t,{tag:null}))})),{all:i}).style,this.module=o?new Ta(o):null,this.themeType=e.themeType}static define(t,e){return new Hm(t,e||{})}}const Km=qn.define(),Jm=qn.define({combine:t=>t.length?[t[0]]:null});function tf(t){let e=t.facet(Km);return e.length?e:t.facet(Jm)}function ef(t,e){let o,r=[rf];return t instanceof Hm&&(t.module&&r.push(_c.styleModule.of(t.module)),o=t.themeType),(null==e?void 0:e.fallback)?r.push(Jm.of(t)):o?r.push(Km.computeN([_c.darkTheme],e=>e.facet(_c.darkTheme)==("dark"==o)?[t]:[])):r.push(Km.of(t)),r}class of{constructor(t){this.markCache=Object.create(null),this.tree=Ju(t.state),this.decorations=this.buildDeco(t,tf(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=Ju(t.state),o=tf(t.state),r=o!=tf(t.startState),{viewport:i}=t.view,n=t.changes.mapPos(this.decoratedTo,1);e.length<i.to&&!r&&e.type==this.tree.type&&n>=i.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=n):(e!=this.tree||t.viewportChanged||r)&&(this.tree=e,this.decorations=this.buildDeco(t.view,o),this.decoratedTo=i.to)}buildDeco(t,e){if(!e||!this.tree.length)return Ys.none;let o=new ma;for(let{from:r,to:i}of t.visibleRanges)Pu(this.tree,e,(t,e,r)=>{o.add(t,e,this.markCache[r]||(this.markCache[r]=Ys.mark({class:r})))},r,i);return o.finish()}}const rf=zn.high(Xl.fromClass(of,{decorations:t=>t.decorations})),nf=Hm.define([{tag:Bu.meta,color:"#404740"},{tag:Bu.link,textDecoration:"underline"},{tag:Bu.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Bu.emphasis,fontStyle:"italic"},{tag:Bu.strong,fontWeight:"bold"},{tag:Bu.strikethrough,textDecoration:"line-through"},{tag:Bu.keyword,color:"#708"},{tag:[Bu.atom,Bu.bool,Bu.url,Bu.contentSeparator,Bu.labelName],color:"#219"},{tag:[Bu.literal,Bu.inserted],color:"#164"},{tag:[Bu.string,Bu.deleted],color:"#a11"},{tag:[Bu.regexp,Bu.escape,Bu.special(Bu.string)],color:"#e40"},{tag:Bu.definition(Bu.variableName),color:"#00f"},{tag:Bu.local(Bu.variableName),color:"#30a"},{tag:[Bu.typeName,Bu.namespace],color:"#085"},{tag:Bu.className,color:"#167"},{tag:[Bu.special(Bu.variableName),Bu.macroName],color:"#256"},{tag:Bu.definition(Bu.propertyName),color:"#00c"},{tag:Bu.comment,color:"#940"},{tag:Bu.invalid,color:"#f00"}]),af=_c.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),sf="()[]{}",lf=qn.define({combine:t=>la(t,{afterCursor:!0,brackets:sf,maxScanDistance:1e4,renderMatch:hf})}),df=Ys.mark({class:"cm-matchingBracket"}),cf=Ys.mark({class:"cm-nonmatchingBracket"});function hf(t){let e=[],o=t.matched?df:cf;return e.push(o.range(t.start.from,t.start.to)),t.end&&e.push(o.range(t.end.from,t.end.to)),e}const pf=An.define({create:()=>Ys.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let o=[],r=e.state.facet(lf);for(let t of e.state.selection.ranges){if(!t.empty)continue;let i=vf(e.state,t.head,-1,r)||t.head>0&&vf(e.state,t.head-1,1,r)||r.afterCursor&&(vf(e.state,t.head,1,r)||t.head<e.state.doc.length&&vf(e.state,t.head+1,-1,r));i&&(o=o.concat(r.renderMatch(i,e.state)))}return Ys.set(o,!0)},provide:t=>_c.decorations.from(t)}),uf=[pf,af];function mf(t={}){return[lf.of(t),uf]}const ff=new Ap;function bf(t,e,o){let r=t.prop(e<0?Ap.openedBy:Ap.closedBy);if(r)return r;if(1==t.name.length){let r=o.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[o[r+e]]}return null}function gf(t){let e=t.type.prop(ff);return e?e(t.node):t}function vf(t,e,o,r={}){let i=r.maxScanDistance||1e4,n=r.brackets||sf,a=Ju(t),s=a.resolveInner(e,o);for(let t=s;t;t=t.parent){let r=bf(t.type,o,n);if(r&&t.from<t.to){let i=gf(t);if(i&&(o>0?e>=i.from&&e<i.to:e>i.from&&e<=i.to))return Of(0,0,o,t,i,r,n)}}return function(t,e,o,r,i,n,a){let s=o<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=a.indexOf(s);if(l<0||l%2==0!=o>0)return null;let d={from:o<0?e-1:e,to:o>0?e+1:e},c=t.doc.iterRange(e,o>0?t.doc.length:0),h=0;for(let t=0;!c.next().done&&t<=n;){let n=c.value;o<0&&(t+=n.length);let s=e+t*o;for(let t=o>0?0:n.length-1,e=o>0?n.length:-1;t!=e;t+=o){let e=a.indexOf(n[t]);if(!(e<0||r.resolveInner(s+t,1).type!=i))if(e%2==0==o>0)h++;else{if(1==h)return{start:d,end:{from:s+t,to:s+t+1},matched:e>>1==l>>1};h--}}o>0&&(t+=n.length)}return c.done?{start:d,matched:!1}:null}(t,e,o,a,s.type,i,n)}function Of(t,e,o,r,i,n,a){let s=r.parent,l={from:i.from,to:i.to},d=0,c=null==s?void 0:s.cursor();if(c&&(o<0?c.childBefore(r.from):c.childAfter(r.to)))do{if(o<0?c.to<=r.from:c.from>=r.to){if(0==d&&n.indexOf(c.type.name)>-1&&c.from<c.to){let t=gf(c);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(bf(c.type,o,a))d++;else if(bf(c.type,-o,a)){if(0==d){let t=gf(c);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}d--}}}while(o<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}const xf=Object.create(null),yf=[Mp.none],wf=[],kf=Object.create(null),qf=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])qf[t]=Qf(xf,e);function Sf(t,e){wf.indexOf(t)>-1||(wf.push(t),console.warn(e))}function Qf(t,e){let o=[];for(let r of e.split(" ")){let e=[];for(let o of r.split(".")){let r=t[o]||Bu[o];r?"function"==typeof r?e.length?e=e.map(r):Sf(o,`Modifier ${o} used at start of tag`):e.length?Sf(o,`Tag ${o} used as modifier`):e=Array.isArray(r)?r:[r]:Sf(o,`Unknown highlighting tag ${o}`)}for(let t of e)o.push(t)}if(!o.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+o.map(t=>t.id),n=kf[i];if(n)return n.id;let a=kf[i]=Mp.define({id:yf.length,name:r,props:[qu({[r]:o})]});return yf.push(a),a.id}function $f(t,e){return({state:o,dispatch:r})=>{if(o.readOnly)return!1;let i=t(e,o);return!!i&&(r(o.update(i)),!0)}}Js.RTL,Js.LTR;const Pf=$f(Mf,0),Cf=$f(zf,0),Tf=$f((t,e)=>zf(t,e,function(t){let e=[];for(let o of t.selection.ranges){let r=t.doc.lineAt(o.from),i=o.to<=r.to?r:t.doc.lineAt(o.to);i.from>r.from&&i.from==o.to&&(i=o.to==r.to+1?r:t.doc.lineAt(o.to-1));let n=e.length-1;n>=0&&e[n].to>r.from?e[n].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}(e)),0);function Af(t,e){let o=t.languageDataAt("commentTokens",e,1);return o.length?o[0]:{}}const Rf=50;function zf(t,e,o=e.selection.ranges){let r=o.map(t=>Af(e,t.from).block);if(!r.every(t=>t))return null;let i=o.map((t,o)=>function(t,{open:e,close:o},r,i){let n,a,s=t.sliceDoc(r-Rf,r),l=t.sliceDoc(i,i+Rf),d=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(l)[0].length,h=s.length-d;if(s.slice(h-e.length,h)==e&&l.slice(c,c+o.length)==o)return{open:{pos:r-d,margin:d&&1},close:{pos:i+c,margin:c&&1}};i-r<=2*Rf?n=a=t.sliceDoc(r,i):(n=t.sliceDoc(r,r+Rf),a=t.sliceDoc(i-Rf,i));let p=/^\s*/.exec(n)[0].length,u=/\s*$/.exec(a)[0].length,m=a.length-u-o.length;return n.slice(p,p+e.length)==e&&a.slice(m,m+o.length)==o?{open:{pos:r+p+e.length,margin:/\s/.test(n.charAt(p+e.length))?1:0},close:{pos:i-u-o.length,margin:/\s/.test(a.charAt(m-1))?1:0}}:null}(e,r[o],t.from,t.to));if(2!=t&&!i.every(t=>t))return{changes:e.changes(o.map((t,e)=>i[e]?[]:[{from:t.from,insert:r[e].open+" "},{from:t.to,insert:" "+r[e].close}]))};if(1!=t&&i.some(t=>t)){let t=[];for(let e,o=0;o<i.length;o++)if(e=i[o]){let i=r[o],{open:n,close:a}=e;t.push({from:n.pos-i.open.length,to:n.pos+n.margin},{from:a.pos-a.margin,to:a.pos+i.close.length})}return{changes:t}}return null}function Mf(t,e,o=e.selection.ranges){let r=[],i=-1;for(let{from:t,to:n}of o){let o=r.length,a=1e9,s=Af(e,t).line;if(s){for(let o=t;o<=n;){let l=e.doc.lineAt(o);if(l.from>i&&(t==n||n>l.from)){i=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,o=l.text.slice(t,t+s.length)==s?t:-1;t<l.text.length&&t<a&&(a=t),r.push({line:l,comment:o,token:s,indent:t,empty:e,single:!1})}o=l.to+1}if(a<1e9)for(let t=o;t<r.length;t++)r[t].indent<r[t].line.text.length&&(r[t].indent=a);r.length==o+1&&(r[o].single=!0)}}if(2!=t&&r.some(t=>t.comment<0&&(!t.empty||t.single))){let t=[];for(let{line:e,token:o,indent:i,empty:n,single:a}of r)!a&&n||t.push({from:e.from+i,insert:o+" "});let o=e.changes(t);return{changes:o,selection:e.selection.map(o,1)}}if(1!=t&&r.some(t=>t.comment>=0)){let t=[];for(let{line:e,comment:o,token:i}of r)if(o>=0){let r=e.from+o,n=r+i.length;" "==e.text[n-e.from]&&n++,t.push({from:r,to:n})}return{changes:t}}return null}const Ef=In.define(),Zf=In.define(),Xf=qn.define(),_f=qn.define({combine:t=>la(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(o,r)=>t(o,r)||e(o,r)})}),jf=An.define({create:()=>ob.empty,update(t,e){let o=e.state.facet(_f),r=e.annotation(Ef);if(r){let i=Wf.fromTransaction(e,r.selection),n=r.side,a=0==n?t.undone:t.done;return a=i?If(a,a.length,o.minDepth,i):Hf(a,e.startState.selection),new ob(0==n?r.rest:a,0==n?a:r.rest)}let i=e.annotation(Zf);if("full"!=i&&"before"!=i||(t=t.isolate()),!1===e.annotation(Hn.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let n=Wf.fromTransaction(e),a=e.annotation(Hn.time),s=e.annotation(Hn.userEvent);return n?t=t.addChanges(n,a,s,o,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,o.newGroupDelay)),"full"!=i&&"after"!=i||(t=t.isolate()),t},toJSON:t=>({done:t.done.map(t=>t.toJSON()),undone:t.undone.map(t=>t.toJSON())}),fromJSON:t=>new ob(t.done.map(Wf.fromJSON),t.undone.map(Wf.fromJSON))});function Df(t={}){return[jf,_f.of(t),_c.domEventHandlers({beforeinput(t,e){let o="historyUndo"==t.inputType?Vf:"historyRedo"==t.inputType?Lf:null;return!!o&&(t.preventDefault(),o(e))}})]}function Yf(t,e){return function({state:o,dispatch:r}){if(!e&&o.readOnly)return!1;let i=o.field(jf,!1);if(!i)return!1;let n=i.pop(t,o,e);return!!n&&(r(n),!0)}}const Vf=Yf(0,!1),Lf=Yf(1,!1),Uf=Yf(0,!0),Bf=Yf(1,!0);class Wf{constructor(t,e,o,r,i){this.changes=t,this.effects=e,this.mapped=o,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new Wf(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,o;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(o=this.startSelection)||void 0===o?void 0:o.toJSON(),selectionsAfter:this.selectionsAfter.map(t=>t.toJSON())}}static fromJSON(t){return new Wf(t.changes&&un.fromJSON(t.changes),[],t.mapped&&pn.fromJSON(t.mapped),t.startSelection&&yn.fromJSON(t.startSelection),t.selectionsAfter.map(yn.fromJSON))}static fromTransaction(t,e){let o=Nf;for(let e of t.startState.facet(Xf)){let r=e(t);r.length&&(o=o.concat(r))}return!o.length&&t.changes.empty?null:new Wf(t.changes.invert(t.startState.doc),o,void 0,e||t.startState.selection,Nf)}static selection(t){return new Wf(void 0,Nf,void 0,void 0,t)}}function If(t,e,o,r){let i=e+1>o+20?e-o-1:0,n=t.slice(i,e);return n.push(r),n}function Gf(t,e){return t.length?e.length?t.concat(e):t:e}const Nf=[],Ff=200;function Hf(t,e){if(t.length){let o=t[t.length-1],r=o.selectionsAfter.slice(Math.max(0,o.selectionsAfter.length-Ff));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),If(t,t.length-1,1e9,o.setSelAfter(r)))}return[Wf.selection([e])]}function Kf(t){let e=t[t.length-1],o=t.slice();return o[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),o}function Jf(t,e){if(!t.length)return t;let o=t.length,r=Nf;for(;o;){let i=tb(t[o-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let e=t.slice(0,o);return e[o-1]=i,e}e=i.mapped,o--,r=i.selectionsAfter}return r.length?[Wf.selection(r)]:Nf}function tb(t,e,o){let r=Gf(t.selectionsAfter.length?t.selectionsAfter.map(t=>t.map(e)):Nf,o);if(!t.changes)return Wf.selection(r);let i=t.changes.map(e),n=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(n):n;return new Wf(i,Fn.mapEffects(t.effects,e),a,t.startSelection.map(n),r)}const eb=/^(input\.type|delete)($|\.)/;class ob{constructor(t,e,o=0,r=void 0){this.done=t,this.undone=e,this.prevTime=o,this.prevUserEvent=r}isolate(){return this.prevTime?new ob(this.done,this.undone):this}addChanges(t,e,o,r,i){let n=this.done,a=n[n.length-1];return n=a&&a.changes&&!a.changes.empty&&t.changes&&(!o||eb.test(o))&&(!a.selectionsAfter.length&&e-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,function(t,e){let o=[],r=!1;return t.iterChangedRanges((t,e)=>o.push(t,e)),e.iterChangedRanges((t,e,i,n)=>{for(let t=0;t<o.length;){let e=o[t++],a=o[t++];n>=e&&i<=a&&(r=!0)}}),r}(a.changes,t.changes))||"input.type.compose"==o)?If(n,n.length-1,r.minDepth,new Wf(t.changes.compose(a.changes),Gf(Fn.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,Nf)):If(n,n.length,r.minDepth,t),new ob(n,Nf,e,o)}addSelection(t,e,o,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:Nf;return i.length>0&&e-this.prevTime<r&&o==this.prevUserEvent&&o&&/^select($|\.)/.test(o)&&function(t,e){return t.ranges.length==e.ranges.length&&0===t.ranges.filter((t,o)=>t.empty!=e.ranges[o].empty).length}(i[i.length-1],t)?this:new ob(Hf(this.done,t),this.undone,e,o)}addMapping(t){return new ob(Jf(this.done,t),Jf(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,o){let r=0==t?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],n=i.selectionsAfter[0]||e.selection;if(o&&i.selectionsAfter.length)return e.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:Ef.of({side:t,rest:Kf(r),selection:n}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let o=1==r.length?Nf:r.slice(0,r.length-1);return i.mapped&&(o=Jf(o,i.mapped)),e.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:Ef.of({side:t,rest:o,selection:n}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}ob.empty=new ob(Nf,Nf);const rb=[{key:"Mod-z",run:Vf,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Lf,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Lf,preventDefault:!0},{key:"Mod-u",run:Uf,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Bf,preventDefault:!0}];function ib(t,e){return yn.create(t.ranges.map(e),t.mainIndex)}function nb(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ab({state:t,dispatch:e},o){let r=ib(t.selection,o);return!r.eq(t.selection,!0)&&(e(nb(t,r)),!0)}function sb(t,e){return yn.cursor(e?t.to:t.from)}function lb(t,e){return ab(t,o=>o.empty?t.moveByChar(o,e):sb(o,e))}function db(t){return t.textDirectionAt(t.state.selection.main.head)==Js.LTR}const cb=t=>lb(t,!db(t)),hb=t=>lb(t,db(t));function pb(t,e){return ab(t,o=>o.empty?t.moveByGroup(o,e):sb(o,e))}function ub(t,e,o){if(e.type.prop(o))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function mb(t,e,o){let r,i,n=Ju(t).resolveInner(e.head),a=o?Ap.closedBy:Ap.openedBy;for(let r=e.head;;){let e=o?n.childAfter(r):n.childBefore(r);if(!e)break;ub(t,e,a)?n=e:r=o?e.to:e.from}return i=n.type.prop(a)&&(r=o?vf(t,n.from,1):vf(t,n.to,-1))&&r.matched?o?r.end.to:r.end.from:o?n.to:n.from,yn.cursor(i,o?-1:1)}function fb(t,e){return ab(t,o=>{if(!o.empty)return sb(o,e);let r=t.moveVertically(o,e);return r.head!=o.head?r:t.moveToLineBoundary(o,e)})}"undefined"!=typeof Intl&&Intl.Segmenter;const bb=t=>fb(t,!1),gb=t=>fb(t,!0);function vb(t){let e,o=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,r=0,i=0;if(o){for(let e of t.state.facet(_c.scrollMargins)){let o=e(t);(null==o?void 0:o.top)&&(r=Math.max(null==o?void 0:o.top,r)),(null==o?void 0:o.bottom)&&(i=Math.max(null==o?void 0:o.bottom,i))}e=t.scrollDOM.clientHeight-r-i}else e=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:o,height:Math.max(t.defaultLineHeight,e-5)}}function Ob(t,e){let o,r=vb(t),{state:i}=t,n=ib(i.selection,o=>o.empty?t.moveVertically(o,e,r.height):sb(o,e));if(n.eq(i.selection))return!1;if(r.selfScroll){let e=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,l=a.bottom-r.marginBottom;e&&e.top>s&&e.bottom<l&&(o=_c.scrollIntoView(n.main.head,{y:"start",yMargin:e.top-s}))}return t.dispatch(nb(i,n),{effects:o}),!0}const xb=t=>Ob(t,!1),yb=t=>Ob(t,!0);function wb(t,e,o){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,o);if(i.head==e.head&&i.head!=(o?r.to:r.from)&&(i=t.moveToLineBoundary(e,o,!1)),!o&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=yn.cursor(r.from+o))}return i}function kb(t,e){let o=ib(t.state.selection,t=>{let o=e(t);return yn.range(t.anchor,o.head,o.goalColumn,o.bidiLevel||void 0)});return!o.eq(t.state.selection)&&(t.dispatch(nb(t.state,o)),!0)}function qb(t,e){return kb(t,o=>t.moveByChar(o,e))}const Sb=t=>qb(t,!db(t)),Qb=t=>qb(t,db(t));function $b(t,e){return kb(t,o=>t.moveByGroup(o,e))}function Pb(t,e){return kb(t,o=>t.moveVertically(o,e))}const Cb=t=>Pb(t,!1),Tb=t=>Pb(t,!0);function Ab(t,e){return kb(t,o=>t.moveVertically(o,e,vb(t).height))}const Rb=t=>Ab(t,!1),zb=t=>Ab(t,!0),Mb=({state:t,dispatch:e})=>(e(nb(t,{anchor:0})),!0),Eb=({state:t,dispatch:e})=>(e(nb(t,{anchor:t.doc.length})),!0),Zb=({state:t,dispatch:e})=>(e(nb(t,{anchor:t.selection.main.anchor,head:0})),!0),Xb=({state:t,dispatch:e})=>(e(nb(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function _b(t,e){let{state:o}=t,r=o.selection,i=o.selection.ranges.slice();for(let r of o.selection.ranges){let n=o.doc.lineAt(r.head);if(e?n.to<t.state.doc.length:n.from>0)for(let o=r;;){let r=t.moveVertically(o,e);if(r.head<n.from||r.head>n.to){i.some(t=>t.head==r.head)||i.push(r);break}if(r.head==o.head)break;o=r}}return i.length!=r.ranges.length&&(t.dispatch(nb(o,yn.create(i,i.length-1))),!0)}function jb(t,e){if(t.state.readOnly)return!1;let o="delete.selection",{state:r}=t,i=r.changeByRange(r=>{let{from:i,to:n}=r;if(i==n){let a=e(r);a<i?(o="delete.backward",a=Db(t,a,!1)):a>i&&(o="delete.forward",a=Db(t,a,!0)),i=Math.min(i,a),n=Math.max(n,a)}else i=Db(t,i,!1),n=Db(t,n,!0);return i==n?{range:r}:{changes:{from:i,to:n},range:yn.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:o,effects:"delete.selection"==o?_c.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Db(t,e,o){if(t instanceof _c)for(let r of t.state.facet(_c.atomicRanges).map(e=>e(t)))r.between(e,e,(t,r)=>{t<e&&r>e&&(e=o?r:t)});return e}const Yb=(t,e,o)=>jb(t,r=>{let i,n,a=r.from,{state:s}=t,l=s.doc.lineAt(a);if(o&&!e&&a>l.from&&a<l.from+200&&!/[^ \t]/.test(i=l.text.slice(0,a-l.from))){if("\t"==i[i.length-1])return a-1;let t=Sa(i,s.tabSize)%pm(s)||pm(s);for(let e=0;e<t&&" "==i[i.length-1-e];e++)a--;n=a}else n=an(l.text,a-l.from,e,e)+l.from,n==a&&l.number!=(e?s.doc.lines:1)?n+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(l.text.slice(n-l.from,a-l.from))&&(n=an(l.text,n-l.from,!1,!1)+l.from);return n}),Vb=t=>Yb(t,!1,!0),Lb=t=>Yb(t,!0,!1),Ub=(t,e)=>jb(t,o=>{let r=o.head,{state:i}=t,n=i.doc.lineAt(r),a=i.charCategorizer(r);for(let t=null;;){if(r==(e?n.to:n.from)){r==o.head&&n.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let s=an(n.text,r-n.from,e)+n.from,l=n.text.slice(Math.min(r,s)-n.from,Math.max(r,s)-n.from),d=a(l);if(null!=t&&d!=t)break;" "==l&&r==o.head||(t=d),r=s}return r}),Bb=t=>Ub(t,!1);function Wb(t){let e=[],o=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),n=t.doc.lineAt(r.to);if(r.empty||r.to!=n.from||(n=t.doc.lineAt(r.to-1)),o>=i.number){let t=e[e.length-1];t.to=n.to,t.ranges.push(r)}else e.push({from:i.from,to:n.to,ranges:[r]});o=n.number+1}return e}function Ib(t,e,o){if(t.readOnly)return!1;let r=[],i=[];for(let e of Wb(t)){if(o?e.to==t.doc.length:0==e.from)continue;let n=t.doc.lineAt(o?e.to+1:e.from-1),a=n.length+1;if(o){r.push({from:e.to,to:n.to},{from:e.from,insert:n.text+t.lineBreak});for(let o of e.ranges)i.push(yn.range(Math.min(t.doc.length,o.anchor+a),Math.min(t.doc.length,o.head+a)))}else{r.push({from:n.from,to:e.from},{from:e.to,insert:t.lineBreak+n.text});for(let t of e.ranges)i.push(yn.range(t.anchor-a,t.head-a))}}return!!r.length&&(e(t.update({changes:r,scrollIntoView:!0,selection:yn.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Gb(t,e,o){if(t.readOnly)return!1;let r=[];for(let e of Wb(t))o?r.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):r.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Nb=Hb(!1),Fb=Hb(!0);function Hb(t){return({state:e,dispatch:o})=>{if(e.readOnly)return!1;let r=e.changeByRange(o=>{let{from:r,to:i}=o,n=e.doc.lineAt(r),a=!t&&r==i&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let o,r=Ju(t).resolveInner(e),i=r.childBefore(e),n=r.childAfter(e);return i&&n&&i.to<=e&&n.from>=e&&(o=i.type.prop(Ap.closedBy))&&o.indexOf(n.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(n.from).from&&!/\S/.test(t.sliceDoc(i.to,n.from))?{from:i.to,to:n.from}:null}(e,r);t&&(r=i=(i<=n.to?n:e.doc.lineAt(i)).to);let s=new fm(e,{simulateBreak:r,simulateDoubleBreak:!!a}),l=mm(s,r);for(null==l&&(l=Sa(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));i<n.to&&/\s/.test(n.text[i-n.from]);)i++;a?({from:r,to:i}=a):r>n.from&&r<n.from+100&&!/\S/.test(n.text.slice(0,r))&&(r=n.from);let d=["",um(e,l)];return a&&d.push(um(e,s.lineIndent(n.from,-1))),{changes:{from:r,to:i,insert:Ni.of(d)},range:yn.cursor(r+1+d[1].length)}});return o(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Kb(t,e){let o=-1;return t.changeByRange(r=>{let i=[];for(let n=r.from;n<=r.to;){let a=t.doc.lineAt(n);a.number>o&&(r.empty||r.to>a.from)&&(e(a,i,r),o=a.number),n=a.to+1}let n=t.changes(i);return{changes:i,range:yn.range(n.mapPos(r.anchor,1),n.mapPos(r.head,1))}})}const Jb=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Kb(t,(e,o)=>{o.push({from:e.from,insert:t.facet(hm)})}),{userEvent:"input.indent"})),!0),tg=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Kb(t,(e,o)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let i=Sa(r,t.tabSize),n=0,a=um(t,Math.max(0,i-pm(t)));for(;n<r.length&&n<a.length&&r.charCodeAt(n)==a.charCodeAt(n);)n++;o.push({from:e.from+n,to:e.from+r.length,insert:a.slice(n)})}),{userEvent:"delete.dedent"})),!0),eg=[{key:"ArrowLeft",run:cb,shift:Sb,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>pb(t,!db(t)),shift:t=>$b(t,!db(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>ab(t,e=>wb(t,e,!db(t))),shift:t=>kb(t,e=>wb(t,e,!db(t))),preventDefault:!0},{key:"ArrowRight",run:hb,shift:Qb,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>pb(t,db(t)),shift:t=>$b(t,db(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>ab(t,e=>wb(t,e,db(t))),shift:t=>kb(t,e=>wb(t,e,db(t))),preventDefault:!0},{key:"ArrowUp",run:bb,shift:Cb,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Mb,shift:Zb},{mac:"Ctrl-ArrowUp",run:xb,shift:Rb},{key:"ArrowDown",run:gb,shift:Tb,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Eb,shift:Xb},{mac:"Ctrl-ArrowDown",run:yb,shift:zb},{key:"PageUp",run:xb,shift:Rb},{key:"PageDown",run:yb,shift:zb},{key:"Home",run:t=>ab(t,e=>wb(t,e,!1)),shift:t=>kb(t,e=>wb(t,e,!1)),preventDefault:!0},{key:"Mod-Home",run:Mb,shift:Zb},{key:"End",run:t=>ab(t,e=>wb(t,e,!0)),shift:t=>kb(t,e=>wb(t,e,!0)),preventDefault:!0},{key:"Mod-End",run:Eb,shift:Xb},{key:"Enter",run:Nb,shift:Nb},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Vb,shift:Vb,preventDefault:!0},{key:"Delete",run:Lb,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Bb,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Ub(t,!0),preventDefault:!0},{mac:"Mod-Backspace",run:t=>jb(t,e=>{let o=t.moveToLineBoundary(e,!1).head;return e.head>o?o:Math.max(0,e.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:t=>jb(t,e=>{let o=t.moveToLineBoundary(e,!0).head;return e.head<o?o:Math.min(t.state.doc.length,e.head+1)}),preventDefault:!0}].concat([{key:"Ctrl-b",run:cb,shift:Sb,preventDefault:!0},{key:"Ctrl-f",run:hb,shift:Qb},{key:"Ctrl-p",run:bb,shift:Cb},{key:"Ctrl-n",run:gb,shift:Tb},{key:"Ctrl-a",run:t=>ab(t,e=>yn.cursor(t.lineBlockAt(e.head).from,1)),shift:t=>kb(t,e=>yn.cursor(t.lineBlockAt(e.head).from))},{key:"Ctrl-e",run:t=>ab(t,e=>yn.cursor(t.lineBlockAt(e.head).to,-1)),shift:t=>kb(t,e=>yn.cursor(t.lineBlockAt(e.head).to))},{key:"Ctrl-d",run:Lb},{key:"Ctrl-h",run:Vb},{key:"Ctrl-k",run:t=>jb(t,e=>{let o=t.lineBlockAt(e.head).to;return e.head<o?o:Math.min(t.state.doc.length,e.head+1)})},{key:"Ctrl-Alt-h",run:Bb},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=t.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:Ni.of(["",""])},range:yn.cursor(t.from)}));return e(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=t.changeByRange(e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let o=e.from,r=t.doc.lineAt(o),i=o==r.from?o-1:an(r.text,o-r.from,!1)+r.from,n=o==r.to?o+1:an(r.text,o-r.from,!0)+r.from;return{changes:{from:i,to:n,insert:t.doc.slice(o,n).append(t.doc.slice(i,o))},range:yn.cursor(n)}});return!o.changes.empty&&(e(t.update(o,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:yb}].map(t=>({mac:t.key,run:t.run,shift:t.shift}))),og=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>ab(t,e=>mb(t.state,e,!db(t))),shift:t=>kb(t,e=>mb(t.state,e,!db(t)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>ab(t,e=>mb(t.state,e,db(t))),shift:t=>kb(t,e=>mb(t.state,e,db(t)))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Ib(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>Gb(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Ib(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>Gb(t,e,!0)},{key:"Mod-Alt-ArrowUp",run:t=>_b(t,!1)},{key:"Mod-Alt-ArrowDown",run:t=>_b(t,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let o=t.selection,r=null;return o.ranges.length>1?r=yn.create([o.main]):o.main.empty||(r=yn.create([yn.cursor(o.main.head)])),!!r&&(e(nb(t,r)),!0)}},{key:"Mod-Enter",run:Fb},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let o=Wb(t).map(({from:e,to:o})=>yn.range(e,Math.min(o+1,t.doc.length)));return e(t.update({selection:yn.create(o),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let o=ib(t.selection,e=>{let o=Ju(t),r=o.resolveStack(e.from,1);if(e.empty){let t=o.resolveStack(e.from,-1);t.node.from>=r.node.from&&t.node.to<=r.node.to&&(r=t)}for(let t=r;t;t=t.next){let{node:o}=t;if((o.from<e.from&&o.to>=e.to||o.to>e.to&&o.from<=e.from)&&t.next)return yn.range(o.to,o.from)}return e});return!o.eq(t.selection)&&(e(nb(t,o)),!0)},preventDefault:!0},{key:"Mod-[",run:tg},{key:"Mod-]",run:Jb},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=Object.create(null),r=new fm(t,{overrideIndentation:t=>{let e=o[t];return null==e?-1:e}}),i=Kb(t,(e,i,n)=>{let a=mm(r,e.from);if(null==a)return;/\S/.test(e.text)||(a=0);let s=/^\s*/.exec(e.text)[0],l=um(t,a);(s!=l||n.from<e.from+s.length)&&(o[e.from]=a,i.push({from:e.from,to:e.from+s.length,insert:l}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,o=e.changes(Wb(e).map(({from:t,to:o})=>(t>0?t--:o<e.doc.length&&o++,{from:t,to:o}))),r=ib(e.selection,e=>{let o;if(t.lineWrapping){let r=t.lineBlockAt(e.head),i=t.coordsAtPos(e.head,e.assoc||1);i&&(o=r.bottom+t.documentTop-i.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,o)}).map(o);return t.dispatch({changes:o,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e,o){let r=!1,i=ib(t.selection,e=>{let i=vf(t,e.head,-1)||vf(t,e.head,1)||e.head>0&&vf(t,e.head-1,1)||e.head<t.doc.length&&vf(t,e.head+1,-1);if(!i||!i.end)return e;r=!0;let n=i.start.from==e.head?i.end.to:i.end.from;return o?yn.range(e.anchor,n):yn.cursor(n)});return!!r&&(e(nb(t,i)),!0)}(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,o=e.doc.lineAt(e.selection.main.from),r=Af(t.state,o.from);return r.line?Pf(t):!!r.block&&Tf(t)}},{key:"Alt-A",run:Cf},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat(eg),rg={key:"Tab",run:Jb,shift:tg};class ig{constructor(t,e,o,r,i,n,a,s,l,d=0,c){this.p=t,this.stack=e,this.state=o,this.reducePos=r,this.pos=i,this.score=n,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=d,this.parent=c}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,o=0){let r=t.parser.context;return new ig(t,[],e,o,o,0,[],0,r?new ng(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let o=t>>19,r=65535&t,{parser:i}=this.p,n=this.reducePos<this.pos-25;n&&this.setLookAhead(this.pos);let a=i.dynamicPrecedence(r);if(a&&(this.score+=a),0==o)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,n?8:4,!0),void this.reduceContext(r,this.reducePos);let s=this.stack.length-3*(o-1)-(262144&t?6:0),l=s?this.stack[s-2]:this.p.ranges[0].from,d=this.reducePos-l;d>=2e3&&!(null===(e=this.p.parser.nodeSet.types[r])||void 0===e?void 0:e.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSize<d&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=d));let c=s?this.stack[s-1]:0,h=this.bufferBase+this.buffer.length-c;if(r<i.minRepeatTerm||131072&t){let t=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,t,h+4,!0)}if(262144&t)this.state=this.stack[s];else{let t=this.stack[s-3];this.state=i.getGoto(t,r,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(r,l)}storeNode(t,e,o,r=4,i=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,r=this.buffer.length;if(0==r&&t.parent&&(r=t.bufferBase-t.parent.bufferBase,t=t.parent),r>0&&0==t.buffer[r-4]&&t.buffer[r-1]>-1){if(e==o)return;if(t.buffer[r-2]>=e)return void(t.buffer[r-2]=o)}}if(i&&this.pos!=o){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4]){let t=!1;for(let e=i;e>0&&this.buffer[e-2]>o;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;i>0&&this.buffer[i-2]>o;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=t,this.buffer[i+1]=e,this.buffer[i+2]=o,this.buffer[i+3]=r}else this.buffer.push(t,e,o,r)}shift(t,e,o,r){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=r,this.shiftContext(e,o),e<=this.p.parser.maxNode&&this.buffer.push(e,o,r,4);else{let i=t,{parser:n}=this.p;(r>this.pos||e<=n.maxNode)&&(this.pos=r,n.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,o),this.shiftContext(e,o),e<=n.maxNode&&this.buffer.push(e,o,r,4)}}apply(t,e,o,r){65536&t?this.reduce(t):this.shift(t,e,o,r)}useNode(t,e){let o=this.p.reused.length-1;(o<0||this.p.reused[o]!=t)&&(this.p.reused.push(t),o++);let r=this.pos;this.reducePos=this.pos=r+t.length,this.pushState(e,r),this.buffer.push(o,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let o=t.buffer.slice(e),r=t.bufferBase+e;for(;t&&r==t.bufferBase;)t=t.parent;return new ig(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,o,r,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let o=t<=this.p.parser.maxNode;o&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,o?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new ag(this);;){let o=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==o)return!1;if(!(65536&o))return!0;e.reduce(o)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let o=[];for(let r,i=0;i<e.length;i+=2)(r=e[i+1])!=this.state&&this.p.parser.hasAction(r,t)&&o.push(e[i],r);if(this.stack.length<120)for(let t=0;o.length<8&&t<e.length;t+=2){let r=e[t+1];o.some((t,e)=>1&e&&t==r)||o.push(e[t],r)}e=o}let o=[];for(let t=0;t<e.length&&o.length<4;t+=2){let r=e[t+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(e[t],this.pos),i.reducePos=this.pos,i.score-=200,o.push(i)}return o}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let o=e>>19,r=65535&e,i=this.stack.length-3*o;if(i<0||t.getGoto(this.stack[i],r,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],o=(r,i)=>{if(!e.includes(r))return e.push(r),t.allActions(r,e=>{if(393216&e);else if(65536&e){let o=(e>>19)-i;if(o>1){let r=65535&e,i=this.stack.length-3*o;if(i>=0&&t.getGoto(this.stack[i],r,!1)>=0)return o<<19|65536|r}}else{let t=o(e,i+1);if(null!=t)return t}})};return o(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new ng(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class ng{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class ag{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,o=t>>19;0==o?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(o-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}class sg{constructor(t,e,o){this.stack=t,this.pos=e,this.index=o,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new sg(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new sg(this.stack,this.pos,this.index)}}function lg(t,e=Uint16Array){if("string"!=typeof t)return t;let o=null;for(let r=0,i=0;r<t.length;){let n=0;for(;;){let e=t.charCodeAt(r++),o=!1;if(126==e){n=65535;break}e>=92&&e--,e>=34&&e--;let i=e-32;if(i>=46&&(i-=46,o=!0),n+=i,o)break;n*=46}o?o[i++]=n:o=new e(n)}return o}class dg{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const cg=new dg;class hg{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=cg,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let o=this.range,r=this.rangeIndex,i=this.pos+t;for(;i<o.from;){if(!r)return null;let t=this.ranges[--r];i-=o.from-t.to,o=t}for(;e<0?i>o.to:i>=o.to;){if(r==this.ranges.length-1)return null;let t=this.ranges[++r];i+=t.from-o.to,o=t}return i}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,o,r=this.chunkOff+t;if(r>=0&&r<this.chunk.length)e=this.pos+t,o=this.chunk.charCodeAt(r);else{let r=this.resolveOffset(t,1);if(null==r)return-1;if(e=r,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)o=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,r=this.range;for(;r.to<=e;)r=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-e)),o=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),o}acceptToken(t,e=0){let o=e?this.resolveOffset(e,-1):this.pos;if(null==o||o<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=o}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=cg,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let o="";for(let r of this.ranges){if(r.from>=e)break;r.to>t&&(o+=this.input.read(Math.max(r.from,t),Math.min(r.to,e)))}return o}}class pg{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:o}=e.p;fg(this.data,t,e,this.id,o.data,o.tokenPrecTable)}}pg.prototype.contextual=pg.prototype.fallback=pg.prototype.extend=!1;class ug{constructor(t,e,o){this.precTable=e,this.elseToken=o,this.data="string"==typeof t?lg(t):t}token(t,e){let o=t.pos,r=0;for(;;){let o=t.next<0,i=t.resolveOffset(1,1);if(fg(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(o||r++,null==i)break;t.reset(i,t.token)}r&&(t.reset(o,t.token),t.acceptToken(this.elseToken,r))}}ug.prototype.contextual=pg.prototype.fallback=pg.prototype.extend=!1;class mg{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function fg(t,e,o,r,i,n){let a=0,s=1<<r,{dialect:l}=o.p.parser;t:for(;0!=(s&t[a]);){let o=t[a+1];for(let r=a+3;r<o;r+=2)if((t[r+1]&s)>0){let o=t[r];if(l.allows(o)&&(-1==e.token.value||e.token.value==o||gg(o,e.token.value,i,n))){e.acceptToken(o);break}}let r=e.next,d=0,c=t[a+2];if(!(e.next<0&&c>d&&65535==t[o+3*c-3])){for(;d<c;){let i=d+c>>1,n=o+i+(i<<1),s=t[n],l=t[n+1]||65536;if(r<s)c=i;else{if(!(r>=l)){a=t[n+2],e.advance();continue t}d=i+1}}break}a=t[o+3*c-1]}}function bg(t,e,o){for(let r,i=e;65535!=(r=t[i]);i++)if(r==o)return i-e;return-1}function gg(t,e,o,r){let i=bg(o,r,e);return i<0||bg(o,r,t)<i}const vg="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let Og=null;function xg(t,e,o){let r=t.cursor(_p.IncludeAnonymous);for(r.moveTo(e);;)if(!(o<0?r.childBefore(e):r.childAfter(e)))for(;;){if((o<0?r.to<e:r.from>e)&&!r.type.isError)return o<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(o<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return o<0?0:t.length}}class yg{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?xg(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?xg(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let o=this.trees[e],r=this.index[e];if(r==o.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=o.children[r],n=this.start[e]+o.positions[r];if(n>t)return this.nextStart=n,null;if(i instanceof jp){if(n==t){if(n<this.safeFrom)return null;let t=n+i.length;if(t<=this.safeTo){let e=i.prop(Ap.lookAhead);if(!e||t+e<this.fragment.to)return i}}this.index[e]++,n+i.length>=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(n),this.index.push(0))}else this.index[e]++,this.nextStart=n+i.length}}}class wg{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(t=>new dg)}getActions(t){let e=0,o=null,{parser:r}=t.p,{tokenizers:i}=r,n=r.stateSlot(t.state,3),a=t.curContext?t.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&n))continue;let l=i[r],d=this.tokens[r];if((!o||l.fallback)&&((l.contextual||d.start!=t.pos||d.mask!=n||d.context!=a)&&(this.updateCachedToken(d,l,t),d.mask=n,d.context=a),d.lookAhead>d.end+25&&(s=Math.max(d.lookAhead,s)),0!=d.value)){let r=e;if(d.extended>-1&&(e=this.addActions(t,d.extended,d.end,e)),e=this.addActions(t,d.value,d.end,e),!l.extend&&(o=d,e>r))break}}for(;this.actions.length>e;)this.actions.pop();return s&&t.setLookAhead(s),o||t.pos!=this.stream.end||(o=new dg,o.value=t.p.parser.eofTerm,o.start=o.end=t.pos,e=this.addActions(t,o.value,o.end,e)),this.mainToken=o,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new dg,{pos:o,p:r}=t;return e.start=o,e.end=Math.min(o+1,r.stream.end),e.value=o==r.stream.end?r.parser.eofTerm:0,e}updateCachedToken(t,e,o){let r=this.stream.clipPos(o.pos);if(e.token(this.stream.reset(r,t),o),t.value>-1){let{parser:e}=o.p;for(let r=0;r<e.specialized.length;r++)if(e.specialized[r]==t.value){let i=e.specializers[r](this.stream.read(t.start,t.end),o);if(i>=0&&o.p.parser.dialect.allows(i>>1)){1&i?t.extended=i>>1:t.value=i>>1;break}}}else t.value=0,t.end=this.stream.clipPos(r+1)}putAction(t,e,o,r){for(let e=0;e<r;e+=3)if(this.actions[e]==t)return r;return this.actions[r++]=t,this.actions[r++]=e,this.actions[r++]=o,r}addActions(t,e,o,r){let{state:i}=t,{parser:n}=t.p,{data:a}=n;for(let t=0;t<2;t++)for(let s=n.stateSlot(i,t?2:1);;s+=3){if(65535==a[s]){if(1!=a[s+1]){0==r&&2==a[s+1]&&(r=this.putAction(Cg(a,s+2),e,o,r));break}s=Cg(a,s+2)}a[s]==e&&(r=this.putAction(Cg(a,s+1),e,o,r))}return r}}class kg{constructor(t,e,o,r){this.parser=t,this.input=e,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new hg(e,r),this.tokens=new wg(t,this.stream),this.topTerm=t.top[1];let{from:i}=r[0];this.stacks=[ig.start(this,t.top[0],i)],this.fragments=o.length&&this.stream.end-i>4*t.bufferLength?new yg(o,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,o=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==o.length){let[t]=o;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let n=0;n<o.length;n++){let a=o[n];for(;;){if(this.tokens.mainToken=null,a.pos>r)i.push(a);else{if(this.advanceStack(a,i,o))continue;{t||(t=[],e=[]),t.push(a);let o=this.tokens.getMainToken(a);e.push(o.value,o.end)}}break}}if(!i.length){let e=t&&function(t){let e=null;for(let o of t){let t=o.p.stoppedAt;(o.pos==o.p.stream.end||null!=t&&o.pos>t)&&o.p.parser.stateFlag(o.state,2)&&(!e||e.score<o.score)&&(e=o)}return e}(t);if(e)return vg&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw vg&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&t){let o=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,i);if(o)return vg&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(i.length>t)for(i.sort((t,e)=>e.score-t.score);i.length>t;)i.pop();i.some(t=>t.reducePos>r)&&this.recovering--}else if(i.length>1){t:for(let t=0;t<i.length-1;t++){let e=i[t];for(let o=t+1;o<i.length;o++){let r=i[o];if(e.sameState(r)||e.buffer.length>500&&r.buffer.length>500){if(!((e.score-r.score||e.buffer.length-r.buffer.length)>0)){i.splice(t--,1);continue t}i.splice(o--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let t=1;t<i.length;t++)i[t].pos<this.minStackPos&&(this.minStackPos=i[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,o){let r=t.pos,{parser:i}=this,n=vg?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,o=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?i.getGoto(t.state,a.type.id):-1;if(r>-1&&a.length&&(!e||(a.prop(Ap.contextHash)||0)==o))return t.useNode(a,r),vg&&console.log(n+this.stackID(t)+` (via reuse of ${i.getName(a.type.id)})`),!0;if(!(a instanceof jp)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof jp&&0==a.positions[0]))break;a=s}}let a=i.stateSlot(t.state,4);if(a>0)return t.reduce(a),vg&&console.log(n+this.stackID(t)+` (via always-reduce ${i.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let s=this.tokens.getActions(t);for(let a=0;a<s.length;){let l=s[a++],d=s[a++],c=s[a++],h=a==s.length||!o,p=h?t:t.split(),u=this.tokens.mainToken;if(p.apply(l,d,u?u.start:p.pos,c),vg&&console.log(n+this.stackID(p)+` (via ${65536&l?`reduce of ${i.getName(65535&l)}`:"shift"} for ${i.getName(d)} @ ${r}${p==t?"":", split"})`),h)return!0;p.pos>r?e.push(p):o.push(p)}return!1}advanceFully(t,e){let o=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>o)return qg(t,e),!0}}runRecovery(t,e,o){let r=null,i=!1;for(let n=0;n<t.length;n++){let a=t[n],s=e[n<<1],l=e[1+(n<<1)],d=vg?this.stackID(a)+" -> ":"";if(a.deadEnd){if(i)continue;if(i=!0,a.restart(),vg&&console.log(d+this.stackID(a)+" (restarted)"),this.advanceFully(a,o))continue}let c=a.split(),h=d;for(let t=0;c.forceReduce()&&t<10&&(vg&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,o));t++)vg&&(h=this.stackID(c)+" -> ");for(let t of a.recoverByInsert(s))vg&&console.log(d+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,o);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),vg&&console.log(d+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),qg(a,o)):(!r||r.score<a.score)&&(r=a)}return r}stackToTree(t){return t.close(),jp.build({buffer:sg.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(Og||(Og=new WeakMap)).get(t);return e||Og.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function qg(t,e){for(let o=0;o<e.length;o++){let r=e[o];if(r.pos==t.pos&&r.sameState(t))return void(e[o].score<t.score&&(e[o]=t))}e.push(t)}class Sg{constructor(t,e,o){this.source=t,this.flags=e,this.disabled=o}allows(t){return!this.disabled||0==this.disabled[t]}}const Qg=t=>t;class $g{constructor(t){this.start=t.start,this.shift=t.shift||Qg,this.reduce=t.reduce||Qg,this.reuse=t.reuse||Qg,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class Pg extends nu{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let o=0;o<t.repeatNodeCount;o++)e.push("");let o=Object.keys(t.topRules).map(e=>t.topRules[e][1]),r=[];for(let t=0;t<e.length;t++)r.push([]);function i(t,e,o){r[t].push([e,e.deserialize(String(o))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=Ap[t]);for(let o=1;o<e.length;){let r=e[o++];if(r>=0)i(r,t,e[o++]);else{let n=e[o+-r];for(let a=-r;a>0;a--)i(e[o++],t,n);o++}}}this.nodeSet=new Ep(e.map((e,i)=>Mp.define({name:i>=this.minRepeatTerm?void 0:e,id:i,props:r[i],top:o.indexOf(i)>-1,error:0==i,skipped:t.skippedNodes&&t.skippedNodes.indexOf(i)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=Pp;let n=lg(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(Tg),this.states=lg(t.states,Uint32Array),this.data=lg(t.stateData),this.goto=lg(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(t=>"number"==typeof t?new pg(n,t):t),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,o){let r=new kg(this,t,e,o);for(let i of this.wrappers)r=i(r,t,e,o);return r}getGoto(t,e,o=!1){let r=this.goto;if(e>=r[0])return-1;for(let i=r[e+1];;){let e=r[i++],n=1&e,a=r[i++];if(n&&o)return a;for(let o=i+(e>>1);i<o;i++)if(r[i]==t)return a;if(n)return-1}}hasAction(t,e){let o=this.data;for(let r=0;r<2;r++)for(let i,n=this.stateSlot(t,r?2:1);;n+=3){if(65535==(i=o[n])){if(1!=o[n+1]){if(2==o[n+1])return Cg(o,n+2);break}i=o[n=Cg(o,n+2)]}if(i==e||0==i)return Cg(o,n+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,t=>t==e||null)}allActions(t,e){let o=this.stateSlot(t,4),r=o?e(o):void 0;for(let o=this.stateSlot(t,1);null==r;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])break;o=Cg(this.data,o+2)}r=e(Cg(this.data,o+1))}return r}nextStates(t){let e=[];for(let o=this.stateSlot(t,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])break;o=Cg(this.data,o+2)}if(!(1&this.data[o+2])){let t=this.data[o+1];e.some((e,o)=>1&o&&e==t)||e.push(this.data[o],t)}}return e}configure(t){let e=Object.assign(Object.create(Pg.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let o=this.topRules[t.top];if(!o)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=o}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(e=>{let o=t.tokenizers.find(t=>t.from==e);return o?o.to:e})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((o,r)=>{let i=t.specializers.find(t=>t.from==o.external);if(!i)return o;let n=Object.assign(Object.assign({},o),{external:i.to});return e.specializers[r]=Tg(n),n})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),o=e.map(()=>!1);if(t)for(let r of t.split(" ")){let t=e.indexOf(r);t>=0&&(o[t]=!0)}let r=null;for(let t=0;t<e.length;t++)if(!o[t])for(let o,i=this.dialects[e[t]];65535!=(o=this.data[i++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[o]=1;return new Sg(t,o,r)}static deserialize(t){return new Pg(t)}}function Cg(t,e){return t[e]|t[e+1]<<16}function Tg(t){if(t.external){let e=t.extend?1:0;return(o,r)=>t.external(o,r)<<1|e}return t.get}const Ag={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Rg={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},zg={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Mg(t){return 45==t||46==t||58==t||t>=65&&t<=90||95==t||t>=97&&t<=122||t>=161}let Eg=null,Zg=null,Xg=0;function _g(t,e){let o=t.pos+e;if(Xg==o&&Zg==t)return Eg;let r=t.peek(e),i="";for(;Mg(r);)i+=String.fromCharCode(r),r=t.peek(++e);return Zg=t,Xg=o,Eg=i?i.toLowerCase():r==jg||r==Dg?void 0:null}const jg=63,Dg=33;function Yg(t,e){this.name=t,this.parent=e}const Vg=[6,10,7,8,9],Lg=new $g({start:null,shift:(t,e,o,r)=>Vg.indexOf(e)>-1?new Yg(_g(r,1)||"",t):t,reduce:(t,e)=>21==e&&t?t.parent:t,reuse(t,e,o,r){let i=e.type.id;return 6==i||37==i?new Yg(_g(r,1)||"",t):t},strict:!1}),Ug=new mg((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(58));t.advance();let o=47==t.next;o&&t.advance();let r=_g(t,0);if(void 0===r)return;if(!r)return t.acceptToken(o?15:14);let i=e.context?e.context.name:null;if(o){if(r==i)return t.acceptToken(11);if(i&&Rg[i])return t.acceptToken(58,-2);if(e.dialectEnabled(0))return t.acceptToken(12);for(let t=e.context;t;t=t.parent)if(t.name==r)return;t.acceptToken(13)}else{if("script"==r)return t.acceptToken(7);if("style"==r)return t.acceptToken(8);if("textarea"==r)return t.acceptToken(9);if(Ag.hasOwnProperty(r))return t.acceptToken(10);i&&zg[i]&&zg[i][r]?t.acceptToken(58,-1):t.acceptToken(6)}},{contextual:!0}),Bg=new mg(t=>{for(let e=0,o=0;;o++){if(t.next<0){o&&t.acceptToken(59);break}if(45==t.next)e++;else{if(62==t.next&&e>=2){o>=3&&t.acceptToken(59,-2);break}e=0}t.advance()}}),Wg=new mg((t,e)=>{if(47==t.next&&62==t.peek(1)){let o=e.dialectEnabled(1)||function(t){for(;t;t=t.parent)if("svg"==t.name||"math"==t.name)return!0;return!1}(e.context);t.acceptToken(o?5:4,2)}else 62==t.next&&t.acceptToken(4,1)});function Ig(t,e,o){let r=2+t.length;return new mg(i=>{for(let n=0,a=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(e);break}if(0==n&&60==i.next||1==n&&47==i.next||n>=2&&n<r&&i.next==t.charCodeAt(n-2))n++,a++;else{if(n==r&&62==i.next){s>a?i.acceptToken(e,-a):i.acceptToken(o,-(a-2));break}if((10==i.next||13==i.next)&&s){i.acceptToken(e,1);break}n=a=0}i.advance()}})}const Gg=Ig("script",55,1),Ng=Ig("style",56,2),Fg=Ig("textarea",57,3),Hg=qu({"Text RawText IncompleteTag IncompleteCloseTag":Bu.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Bu.angleBracket,TagName:Bu.tagName,"MismatchedCloseTag/TagName":[Bu.tagName,Bu.invalid],AttributeName:Bu.attributeName,"AttributeValue UnquotedAttributeValue":Bu.attributeValue,Is:Bu.definitionOperator,"EntityReference CharacterReference":Bu.character,Comment:Bu.blockComment,ProcessingInst:Bu.processingInstruction,DoctypeDecl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StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Lg,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[Hg],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!d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q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Gg,Ng,Fg,Wg,Ug,Bg,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function Jg(t,e){let o=Object.create(null);for(let r of t.getChildren(24)){let t=r.getChild(25),i=r.getChild(27)||r.getChild(28);t&&(o[e.read(t.from,t.to)]=i?27==i.type.id?e.read(i.from+1,i.to-1):e.read(i.from,i.to):"")}return o}function tv(t,e){let o=t.getChild(23);return o?e.read(o.from,o.to):" "}function ev(t,e,o){let r;for(let i of o)if(!i.attrs||i.attrs(r||(r=Jg(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function ov(t=[],e=[]){let o=[],r=[],i=[],n=[];for(let e of t)("script"==e.tag?o:"style"==e.tag?r:"textarea"==e.tag?i:n).push(e);let a=e.length?Object.create(null):null;for(let t of e)(a[t.name]||(a[t.name]=[])).push(t);return s=(t,e)=>{let s=t.type.id;if(29==s)return ev(t,e,o);if(32==s)return ev(t,e,r);if(35==s)return ev(t,e,i);if(21==s&&n.length){let o,r=t.node,i=r.firstChild,a=i&&tv(i,e);if(a)for(let t of n)if(t.tag==a&&(!t.attrs||t.attrs(o||(o=Jg(i,e))))){let e=r.lastChild,o=38==e.type.id?e.from:r.to;if(o>i.to)return{parser:t.parser,overlay:[{from:i.to,to:o}]}}}if(a&&24==s){let o,r=t.node;if(o=r.firstChild){let t=a[e.read(o.from,o.to)];if(t)for(let o of t){if(o.tagName&&o.tagName!=tv(r.parent,e))continue;let t=r.lastChild;if(27==t.type.id){let e=t.from+1,r=t.lastChild,i=t.to-(r&&r.isError?0:1);if(i>e)return{parser:o.parser,overlay:[{from:e,to:i}]}}else if(28==t.type.id)return{parser:o.parser,overlay:[{from:t.from,to:t.to}]}}}}return null},(t,e,o,r)=>new hu(t,s,e,o,r);var s}const rv=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function iv(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function nv(t){return t>=48&&t<=57}function av(t){return nv(t)||t>=97&&t<=102||t>=65&&t<=70}const sv=(t,e,o)=>(r,i)=>{for(let n=!1,a=0,s=0;;s++){let{next:l}=r;if(iv(l)||45==l||95==l||n&&nv(l))!n&&(45!=l||s>0)&&(n=!0),a===s&&45==l&&a++,r.advance();else{if(92!=l||10==r.peek(1)){n&&r.acceptToken(2==a&&i.canShift(2)?e:40==l?o:t);break}if(r.advance(),av(r.next)){do{r.advance()}while(av(r.next));32==r.next&&r.advance()}else r.next>-1&&r.advance();n=!0}}},lv=new mg(sv(123,2,124)),dv=new mg(sv(125,3,4)),cv=new mg(t=>{if(rv.includes(t.peek(-1))){let{next:e}=t;(iv(e)||95==e||35==e||46==e||42==e||91==e||58==e&&iv(t.peek(1))||45==e||38==e)&&t.acceptToken(122)}}),hv=new mg(t=>{if(!rv.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),iv(e)){do{t.advance()}while(iv(t.next)||nv(t.next));t.acceptToken(1)}}}),pv=qu({"AtKeyword import charset namespace keyframes media supports":Bu.definitionKeyword,"from to selector":Bu.keyword,NamespaceName:Bu.namespace,KeyframeName:Bu.labelName,KeyframeRangeName:Bu.operatorKeyword,TagName:Bu.tagName,ClassName:Bu.className,PseudoClassName:Bu.constant(Bu.className),IdName:Bu.labelName,"FeatureName PropertyName":Bu.propertyName,AttributeName:Bu.attributeName,NumberLiteral:Bu.number,KeywordQuery:Bu.keyword,UnaryQueryOp:Bu.operatorKeyword,"CallTag ValueName":Bu.atom,VariableName:Bu.variableName,Callee:Bu.operatorKeyword,Unit:Bu.unit,"UniversalSelector NestingSelector":Bu.definitionOperator,"MatchOp CompareOp":Bu.compareOperator,"ChildOp SiblingOp, LogicOp":Bu.logicOperator,BinOp:Bu.arithmeticOperator,Important:Bu.modifier,Comment:Bu.blockComment,ColorLiteral:Bu.color,"ParenthesizedContent StringLiteral":Bu.string,":":Bu.punctuation,"PseudoOp #":Bu.derefOperator,"; ,":Bu.separator,"( )":Bu.paren,"[ ]":Bu.squareBracket,"{ }":Bu.brace}),uv={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},mv={__proto__:null,or:98,and:98,not:106,only:106,layer:170},fv={__proto__:null,selector:112,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#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[pv],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$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Oy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[cv,hv,lv,dv,1,2,3,4,new ug("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:t=>uv[t]||-1},{term:125,get:t=>mv[t]||-1},{term:4,get:t=>fv[t]||-1},{term:25,get:t=>bv[t]||-1},{term:123,get:t=>gv[t]||-1}],tokenPrec:1963});let Ov=null;function xv(){if(!Ov&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],o=new Set;for(let r in t)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof t[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())),o.has(r)||(e.push(r),o.add(r)));Ov=e.sort().map(t=>({type:"property",label:t,apply:t+": "}))}return Ov||[]}const yv=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),wv=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),kv=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),qv=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),Sv=/^(\w[\w-]*|-\w[\w-]*|)$/,Qv=/^-(-[\w-]*)?$/,$v=new ru,Pv=["Declaration"];function Cv(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function Tv(t,e,o){if(e.to-e.from>4096){let r=$v.get(e);if(r)return r;let i=[],n=new Set,a=e.cursor(_p.IncludeAnonymous);if(a.firstChild())do{for(let e of Tv(t,a.node,o))n.has(e.label)||(n.add(e.label),i.push(e))}while(a.nextSibling());return $v.set(e,i),i}{let r=[],i=new Set;return e.cursor().iterate(e=>{var n;if(o(e)&&e.matchContext(Pv)&&":"==(null===(n=e.node.nextSibling)||void 0===n?void 0:n.name)){let o=t.sliceString(e.from,e.to);i.has(o)||(i.add(o),r.push({label:o,type:"variable"}))}}),r}}const Av=t=>e=>{let{state:o,pos:r}=e,i=Ju(o).resolveInner(r,-1),n=i.type.isError&&i.from==i.to-1&&"-"==o.doc.sliceString(i.from,i.to);if("PropertyName"==i.name||(n||"TagName"==i.name)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:xv(),validFor:Sv};if("ValueName"==i.name)return{from:i.from,options:wv,validFor:Sv};if("PseudoClassName"==i.name)return{from:i.from,options:yv,validFor:Sv};if(t(i)||(e.explicit||n)&&function(t,e){var o;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let r=null===(o=t.parent)||void 0===o?void 0:o.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==e.sliceString(r.from,r.to)}(i,o.doc))return{from:t(i)||n?i.from:r,options:Tv(o.doc,Cv(i),t),validFor:Qv};if("TagName"==i.name){for(let{parent:t}=i;t;t=t.parent)if("Block"==t.name)return{from:i.from,options:xv(),validFor:Sv};return{from:i.from,options:kv,validFor:Sv}}if("AtKeyword"==i.name)return{from:i.from,options:qv,validFor:Sv};if(!e.explicit)return null;let a=i.resolve(r),s=a.childBefore(r);return s&&":"==s.name&&"PseudoClassSelector"==a.name?{from:r,options:yv,validFor:Sv}:s&&":"==s.name&&"Declaration"==a.name||"ArgList"==a.name?{from:r,options:wv,validFor:Sv}:"Block"==a.name||"Styles"==a.name?{from:r,options:xv(),validFor:Sv}:null},Rv=Av(t=>"VariableName"==t.name),zv=Ku.define({name:"css",parser:vv.configure({props:[bm.add({Declaration:qm()}),Qm.add({"Block KeyframeList":$m})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Mv(){return new dm(zv,zv.data.of({autocomplete:Rv}))}const Ev=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Zv=new $g({start:!1,shift:(t,e)=>5==e||6==e||320==e?t:321==e,strict:!1}),Xv=new mg((t,e)=>{let{next:o}=t;(125==o||-1==o||e.context)&&t.acceptToken(318)},{contextual:!0,fallback:!0}),_v=new mg((t,e)=>{let o,{next:r}=t;Ev.indexOf(r)>-1||(47!=r||47!=(o=t.peek(1))&&42!=o)&&(125==r||59==r||-1==r||e.context||t.acceptToken(316))},{contextual:!0}),jv=new mg((t,e)=>{91!=t.next||e.context||t.acceptToken(317)},{contextual:!0}),Dv=new mg((t,e)=>{let{next:o}=t;if(43==o||45==o){if(t.advance(),o==t.next){t.advance();let o=!e.context&&e.canShift(1);t.acceptToken(o?1:2)}}else 63==o&&46==t.peek(1)&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(3))},{contextual:!0});function Yv(t,e){return t>=65&&t<=90||t>=97&&t<=122||95==t||t>=192||!e&&t>=48&&t<=57}const Vv=new mg((t,e)=>{if(60!=t.next||!e.dialectEnabled(0))return;if(t.advance(),47==t.next)return;let o=0;for(;Ev.indexOf(t.next)>-1;)t.advance(),o++;if(Yv(t.next,!0)){for(t.advance(),o++;Yv(t.next,!1);)t.advance(),o++;for(;Ev.indexOf(t.next)>-1;)t.advance(),o++;if(44==t.next)return;for(let e=0;;e++){if(7==e){if(!Yv(t.next,!0))return;break}if(t.next!="extends".charCodeAt(e))break;t.advance(),o++}}t.acceptToken(4,-o)}),Lv=qu({"get set async static":Bu.modifier,"for while do if else switch try catch finally return throw break continue default case defer":Bu.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":Bu.operatorKeyword,"let var const using function class extends":Bu.definitionKeyword,"import export from":Bu.moduleKeyword,"with debugger new":Bu.keyword,TemplateString:Bu.special(Bu.string),super:Bu.atom,BooleanLiteral:Bu.bool,this:Bu.self,null:Bu.null,Star:Bu.modifier,VariableName:Bu.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Bu.function(Bu.variableName),VariableDefinition:Bu.definition(Bu.variableName),Label:Bu.labelName,PropertyName:Bu.propertyName,PrivatePropertyName:Bu.special(Bu.propertyName),"CallExpression/MemberExpression/PropertyName":Bu.function(Bu.propertyName),"FunctionDeclaration/VariableDefinition":Bu.function(Bu.definition(Bu.variableName)),"ClassDeclaration/VariableDefinition":Bu.definition(Bu.className),"NewExpression/VariableName":Bu.className,PropertyDefinition:Bu.definition(Bu.propertyName),PrivatePropertyDefinition:Bu.definition(Bu.special(Bu.propertyName)),UpdateOp:Bu.updateOperator,"LineComment Hashbang":Bu.lineComment,BlockComment:Bu.blockComment,Number:Bu.number,String:Bu.string,Escape:Bu.escape,ArithOp:Bu.arithmeticOperator,LogicOp:Bu.logicOperator,BitOp:Bu.bitwiseOperator,CompareOp:Bu.compareOperator,RegExp:Bu.regexp,Equals:Bu.definitionOperator,Arrow:Bu.function(Bu.punctuation),": Spread":Bu.punctuation,"( )":Bu.paren,"[ ]":Bu.squareBracket,"{ }":Bu.brace,"InterpolationStart InterpolationEnd":Bu.special(Bu.brace),".":Bu.derefOperator,", ;":Bu.separator,"@":Bu.meta,TypeName:Bu.typeName,TypeDefinition:Bu.definition(Bu.typeName),"type enum interface implements namespace module declare":Bu.definitionKeyword,"abstract global Privacy readonly override":Bu.modifier,"is keyof unique infer asserts":Bu.operatorKeyword,JSXAttributeValue:Bu.attributeValue,JSXText:Bu.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Bu.angleBracket,"JSXIdentifier JSXNameSpacedName":Bu.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Bu.attributeName,"JSXBuiltin/JSXIdentifier":Bu.standard(Bu.tagName)}),Uv={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Bv={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Wv={__proto__:null,"<":193},Iv=Pg.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#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r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:Zv,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[Lv],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%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v,Vv,2,3,4,5,6,7,8,9,10,11,12,13,14,Xv,new ug("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new ug("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>Uv[t]||-1},{term:343,get:t=>Bv[t]||-1},{term:95,get:t=>Wv[t]||-1}],tokenPrec:15201});class Gv{constructor(t,e,o,r){this.state=t,this.pos=e,this.explicit=o,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=Ju(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),o=Math.max(e.from,this.pos-250),r=e.text.slice(o-e.from,this.pos-e.from),i=r.search(Jv(t,!1));return i<0?null:{from:o+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,o){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),o&&o.onDocChange&&(this.abortOnDocChange=!0))}}function Nv(t){let e=Object.keys(t).join(""),o=/\w/.test(e);return o&&(e=e.replace(/\w/g,"")),`[${o?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Fv(t){let e=t.map(t=>"string"==typeof t?{label:t}:t),[o,r]=e.every(t=>/^\w+$/.test(t.label))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),o=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let t=1;t<r.length;t++)o[r[t]]=!0}let r=Nv(e)+Nv(o)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(e);return t=>{let i=t.matchBefore(r);return i||t.explicit?{from:i?i.from:t.pos,options:e,validFor:o}:null}}class Hv{constructor(t,e,o,r){this.completion=t,this.source=e,this.match=o,this.score=r}}function Kv(t){return t.selection.main.from}function Jv(t,e){var o;let{source:r}=t,i=e&&"^"!=r[0],n="$"!=r[r.length-1];return i||n?new RegExp(`${i?"^":""}(?:${r})${n?"$":""}`,null!==(o=t.flags)&&void 0!==o?o:t.ignoreCase?"i":""):t}const tO=In.define();function eO(t,e,o,r){let{main:i}=t.selection,n=o-i.from,a=r-i.from;return{...t.changeByRange(s=>{if(s!=i&&o!=r&&t.sliceDoc(s.from+n,s.from+a)!=t.sliceDoc(o,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+n,to:r==i.from?s.to:s.from+a,insert:l},range:yn.cursor(s.from+n+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const oO=new WeakMap;function rO(t){if(!Array.isArray(t))return t;let e=oO.get(t);return e||oO.set(t,e=Fv(t)),e}const iO=Fn.define(),nO=Fn.define();class aO{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let o=sn(t,e),r=dn(o);this.chars.push(o);let i=t.slice(e,e+r),n=i.toUpperCase();this.folded.push(sn(n==i?i.toLowerCase():n,0)),e+=r}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:o,any:r,precise:i,byWord:n}=this;if(1==e.length){let r=sn(t,0),i=dn(r),n=i==t.length?0:-100;if(r==e[0]);else{if(r!=o[0])return null;n+=-200}return this.ret(n,[0,i])}let a=t.indexOf(this.pattern);if(0==a)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=e.length,l=0;if(a<0){for(let i=0,n=Math.min(t.length,200);i<n&&l<s;){let n=sn(t,i);n!=e[l]&&n!=o[l]||(r[l++]=i),i+=dn(n)}if(l<s)return null}let d=0,c=0,h=!1,p=0,u=-1,m=-1,f=/[a-z]/.test(t),b=!0;for(let r=0,l=Math.min(t.length,200),g=0;r<l&&c<s;){let l=sn(t,r);a<0&&(d<s&&l==e[d]&&(i[d++]=r),p<s&&(l==e[p]||l==o[p]?(0==p&&(u=r),m=r+1,p++):p=0));let v,O=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(v=ln(l))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!r||1==O&&f||0==g&&0!=O)&&(e[c]==l||o[c]==l&&(h=!0)?n[c++]=r:n.length&&(b=!1)),g=O,r+=dn(l)}return c==s&&0==n[0]&&b?this.result((h?-200:0)-100,n,t):p==s&&0==u?this.ret(-200-t.length+(m==t.length?0:-100),[0,m]):a>-1?this.ret(-700-t.length,[a,a+this.pattern.length]):p==s?this.ret(-900-t.length,[u,m]):c==s?this.result((h?-200:0)-100-700+(b?0:-1100),n,t):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,t)}result(t,e,o){let r=[],i=0;for(let t of e){let e=t+(this.astral?dn(sn(o,t)):1);i&&r[i-1]==t?r[i-1]=e:(r[i++]=t,r[i++]=e)}return this.ret(t-o.length,r)}}class sO{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),o=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==o?null:(this.matched=[0,e.length],this.score=o+(t.length==this.pattern.length?0:-100),this)}}const lO=qn.define({combine:t=>la(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:cO,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>o=>dO(t(o),e(o)),optionClass:(t,e)=>o=>dO(t(o),e(o)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function dO(t,e){return t?e?t+" "+e:t:e}function cO(t,e,o,r,i,n){let a,s,l=t.textDirection==Js.RTL,d=l,c=!1,h="top",p=e.left-i.left,u=i.right-e.right,m=r.right-r.left,f=r.bottom-r.top;if(d&&p<Math.min(m,u)?d=!1:!d&&u<Math.min(m,p)&&(d=!0),m<=(d?p:u))a=Math.max(i.top,Math.min(o.top,i.bottom-f))-e.top,s=Math.min(400,d?p:u);else{c=!0,s=Math.min(400,(l?e.right:i.right-e.left)-30);let t=i.bottom-e.bottom;t>=f||t>e.top?a=o.bottom-e.top:(h="bottom",a=e.bottom-o.top)}return{style:`${h}: ${a/((e.bottom-e.top)/n.offsetHeight)}px; max-width: ${s/((e.right-e.left)/n.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":d?"left":"right")}}function hO(t,e,o){if(t<=o)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/o);return{from:t*o,to:(t+1)*o}}let r=Math.floor((t-e)/o);return{from:t-(r+1)*o,to:t-r*o}}class pO{constructor(t,e,o){this.view=t,this.stateField=e,this.applyCompletion=o,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let r=t.state.field(e),{options:i,selected:n}=r.open,a=t.state.facet(lO);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map(t=>"cm-completionIcon-"+t)),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,o,r){let i=document.createElement("span");i.className="cm-completionLabel";let n=t.displayLabel||t.label,a=0;for(let t=0;t<r.length;){let e=r[t++],o=r[t++];e>a&&i.appendChild(document.createTextNode(n.slice(a,e)));let s=i.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(n.slice(e,o))),s.className="cm-completionMatchedText",a=o}return a<n.length&&i.appendChild(document.createTextNode(n.slice(a))),i},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort((t,e)=>t.position-e.position).map(t=>t.render)}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=hO(i.length,n,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",o=>{let{options:r}=t.state.field(e).open;for(let e,i=o.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(e=/-(\d+)$/.exec(i.id))&&+e[1]<r.length)return this.applyCompletion(t,r[+e[1]]),void o.preventDefault()}),this.dom.addEventListener("focusout",e=>{let o=t.state.field(this.stateField,!1);o&&o.tooltip&&t.state.facet(lO).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:nO.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(t){var e;let o=t.state.field(this.stateField),r=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),o!=r){let{options:i,selected:n,disabled:a}=o.open;r.open&&r.open.options==i||(this.range=hO(i.length,n,t.state.facet(lO).maxRenderedOptions),this.showOptions(i,o.id)),this.updateSel(),a!=(null===(e=r.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=hO(e.options.length,e.selected,this.view.state.facet(lO).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:o}=e.options[e.selected],{info:r}=o;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(o);if(!i)return;"then"in i?i.then(e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,o)}).catch(t=>zl(this.view.state,t,"completion info")):this.addInfoPane(i,o)}}addInfoPane(t,e){this.destroyInfo();let o=this.info=document.createElement("div");if(o.className="cm-tooltip cm-completionInfo",null!=t.nodeType)o.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:r}=t;o.appendChild(e),this.infoDestroy=r||null}this.dom.appendChild(o),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let o=this.list.firstChild,r=this.range.from;o;o=o.nextSibling,r++)"LI"==o.nodeName&&o.id?r==t?o.hasAttribute("aria-selected")||(o.setAttribute("aria-selected","true"),e=o):o.hasAttribute("aria-selected")&&o.removeAttribute("aria-selected"):r--;return e&&function(t,e){let o=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=o.height/t.offsetHeight;r.top<o.top?t.scrollTop-=(o.top-r.top)/i:r.bottom>o.bottom&&(t.scrollTop+=(r.bottom-o.bottom)/i)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.space;if(!i){let t=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:t.clientWidth,bottom:t.clientHeight}}return r.top>Math.min(i.bottom,e.bottom)-10||r.bottom<Math.max(i.top,e.top)+10?null:this.view.state.facet(lO).positionInfo(this.view,e,r,o,i,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,o){const r=document.createElement("ul");r.id=e,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",t=>{t.target==r&&t.preventDefault()});let i=null;for(let n=o.from;n<o.to;n++){let{completion:a,match:s}=t[n],{section:l}=a;if(l){let t="string"==typeof l?l:l.name;t!=i&&(n>o.from||0==o.from)&&(i=t,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=t)}const d=r.appendChild(document.createElement("li"));d.id=e+"-"+n,d.setAttribute("role","option");let c=this.optionClass(a);c&&(d.className=c);for(let t of this.optionContent){let e=t(a,this.view.state,this.view,s);e&&d.appendChild(e)}}return o.from&&r.classList.add("cm-completionListIncompleteTop"),o.to<t.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function uO(t,e){return o=>new pO(o,t,e)}function mO(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class fO{constructor(t,e,o,r,i,n){this.options=t,this.attrs=e,this.tooltip=o,this.timestamp=r,this.selected=i,this.disabled=n}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new fO(this.options,OO(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,o,r,i,n){if(r&&!n&&t.some(t=>t.isPending))return r.setDisabled();let a=function(t,e){let o=[],r=null,i=null,n=t=>{o.push(t);let{section:e}=t.completion;if(e){r||(r=[]);let t="string"==typeof e?e:e.name;r.some(e=>e.name==t)||r.push("string"==typeof e?{name:t}:e)}},a=e.facet(lO);for(let r of t)if(r.hasResult()){let t=r.result.getMatch;if(!1===r.result.filter)for(let e of r.result.options)n(new Hv(e,r.source,t?t(e):[],1e9-o.length));else{let o,s=e.sliceDoc(r.from,r.to),l=a.filterStrict?new sO(s):new aO(s);for(let e of r.result.options)if(o=l.match(e.label)){let a=e.displayLabel?t?t(e,o.matched):[]:o.matched,s=o.score+(e.boost||0);if(n(new Hv(e,r.source,a,s)),"object"==typeof e.section&&"dynamic"===e.section.rank){let{name:t}=e.section;i||(i=Object.create(null)),i[t]=Math.max(s,i[t]||-1e9)}}}}if(r){let t=Object.create(null),e=0,n=(t,e)=>("dynamic"===t.rank&&"dynamic"===e.rank?i[e.name]-i[t.name]:0)||("number"==typeof t.rank?t.rank:1e9)-("number"==typeof e.rank?e.rank:1e9)||(t.name<e.name?-1:1);for(let o of r.sort(n))e-=1e5,t[o.name]=e;for(let e of o){let{section:o}=e.completion;o&&(e.score+=t["string"==typeof o?o:o.name])}}let s=[],l=null,d=a.compareCompletions;for(let t of o.sort((t,e)=>e.score-t.score||d(t.completion,e.completion))){let e=t.completion;!l||l.label!=e.label||l.detail!=e.detail||null!=l.type&&null!=e.type&&l.type!=e.type||l.apply!=e.apply||l.boost!=e.boost?s.push(t):mO(t.completion)>mO(l)&&(s[s.length-1]=t),l=t.completion}return s}(t,e);if(!a.length)return r&&t.some(t=>t.isPending)?r.setDisabled():null;let s=e.facet(lO).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let t=r.options[r.selected].completion;for(let e=0;e<a.length;e++)if(a[e].completion==t){s=e;break}}return new fO(a,OO(o,s),{pos:t.reduce((t,e)=>e.hasResult()?Math.min(t,e.from):t,1e8),create:PO,above:i.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(t){return new fO(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new fO(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class bO{constructor(t,e,o){this.active=t,this.id=e,this.open=o}static start(){return new bO(xO,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,o=e.facet(lO),r=(o.override||e.languageDataAt("autocomplete",Kv(e)).map(rO)).map(e=>{let r=this.active.find(t=>t.source==e)||new wO(e,this.active.some(t=>0!=t.state)?1:0);return r.update(t,o)});r.length==this.active.length&&r.every((t,e)=>t==this.active[e])&&(r=this.active);let i=this.open,n=t.effects.some(t=>t.is(qO));i&&t.docChanged&&(i=i.map(t.changes)),t.selection||r.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!function(t,e){if(t==e)return!0;for(let o=0,r=0;;){for(;o<t.length&&!t[o].hasResult();)o++;for(;r<e.length&&!e[r].hasResult();)r++;let i=o==t.length,n=r==e.length;if(i||n)return i==n;if(t[o++].result!=e[r++].result)return!1}}(r,this.active)||n?i=fO.build(r,e,this.id,i,o,n):i&&i.disabled&&!r.some(t=>t.isPending)&&(i=null),!i&&r.every(t=>!t.isPending)&&r.some(t=>t.hasResult())&&(r=r.map(t=>t.hasResult()?new wO(t.source,0):t));for(let e of t.effects)e.is(SO)&&(i=i&&i.setSelected(e.value,this.id));return r==this.active&&i==this.open?this:new bO(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?gO:vO}}const gO={"aria-autocomplete":"list"},vO={};function OO(t,e){let o={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(o["aria-activedescendant"]=t+"-"+e),o}const xO=[];function yO(t,e){if(t.isUserEvent("input.complete")){let o=t.annotation(tO);if(o&&e.activateOnCompletion(o))return 12}let o=t.isUserEvent("input.type");return o&&e.activateOnTyping?5:o?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class wO{constructor(t,e,o=!1){this.source=t,this.state=e,this.explicit=o}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let o=yO(t,e),r=this;(8&o||16&o&&this.touches(t))&&(r=new wO(r.source,0)),4&o&&0==r.state&&(r=new wO(this.source,1)),r=r.updateFor(t,o);for(let e of t.effects)if(e.is(iO))r=new wO(r.source,1,e.value);else if(e.is(nO))r=new wO(r.source,0);else if(e.is(qO))for(let t of e.value)t.source==r.source&&(r=t);return r}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(Kv(t.state))}}class kO extends wO{constructor(t,e,o,r,i,n){super(t,3,e),this.limit=o,this.result=r,this.from=i,this.to=n}hasResult(){return!0}updateFor(t,e){var o;if(!(3&e))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),n=t.changes.mapPos(this.to,1),a=Kv(t.state);if(a>n||!r||2&e&&(Kv(t.startState)==this.from||a<this.limit))return new wO(this.source,4&e?1:0);let s=t.changes.mapPos(this.limit);return function(t,e,o,r){if(!t)return!1;let i=e.sliceDoc(o,r);return"function"==typeof t?t(i,o,r,e):Jv(t,!0).test(i)}(r.validFor,t.state,i,n)?new kO(this.source,this.explicit,s,r,i,n):r.update&&(r=r.update(r,i,n,new Gv(t.state,a,!1)))?new kO(this.source,this.explicit,s,r,r.from,null!==(o=r.to)&&void 0!==o?o:Kv(t.state)):new wO(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new kO(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new wO(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const qO=Fn.define({map:(t,e)=>t.map(t=>t.map(e))}),SO=Fn.define(),QO=An.define({create:()=>bO.start(),update:(t,e)=>t.update(e),provide:t=>[Lh.from(t,t=>t.tooltip),_c.contentAttributes.from(t,t=>t.attrs)]});function $O(t,e){const o=e.completion.apply||e.completion.label;let r=t.state.field(QO).active.find(t=>t.source==e.source);return r instanceof kO&&("string"==typeof o?t.dispatch({...eO(t.state,o,r.from,r.to),annotations:tO.of(e.completion)}):o(t,e.completion,r.from,r.to),!0)}const PO=uO(QO,$O);function CO(t,e="option"){return o=>{let r=o.state.field(QO,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<o.state.facet(lO).interactionDelay)return!1;let i,n=1;"page"==e&&(i=Fh(o,r.open.tooltip))&&(n=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+n*(t?1:-1):t?0:a-1;return s<0?s="page"==e?0:a-1:s>=a&&(s="page"==e?a-1:0),o.dispatch({effects:SO.of(s)}),!0}}const TO=t=>!!t.state.field(QO,!1)&&(t.dispatch({effects:iO.of(!0)}),!0);class AO{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const RO=Xl.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(QO).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(QO),o=t.state.facet(lO);if(!t.selectionSet&&!t.docChanged&&t.startState.field(QO)==e)return;let r=t.transactions.some(t=>{let e=yO(t,o);return 8&e||(t.selection||t.docChanged)&&!(3&e)});for(let e=0;e<this.running.length;e++){let o=this.running[e];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>50&&Date.now()-o.time>1e3){for(let t of o.context.abortListeners)try{t()}catch(t){zl(this.view.state,t)}o.context.abortListeners=null,this.running.splice(e--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(t=>t.effects.some(t=>t.is(iO)))&&(this.pendingStart=!0);let i=this.pendingStart?50:o.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(t=>t.isPending&&!this.running.some(e=>e.active.source==t.source))?setTimeout(()=>this.startUpdate(),i):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(QO);for(let t of e.active)t.isPending&&!this.running.some(e=>e.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(lO).updateSyncTime))}startQuery(t){let{state:e}=this.view,o=Kv(e),r=new Gv(e,o,t.explicit,this.view),i=new AO(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(t=>{i.context.aborted||(i.done=t||null,this.scheduleAccept())},t=>{this.view.dispatch({effects:nO.of(null)}),zl(this.view.state,t)})}scheduleAccept(){this.running.every(t=>void 0!==t.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(lO).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],o=this.view.state.facet(lO),r=this.view.state.field(QO);for(let i=0;i<this.running.length;i++){let n=this.running[i];if(void 0===n.done)continue;if(this.running.splice(i--,1),n.done){let r=Kv(n.updates.length?n.updates[0].startState:this.view.state),i=Math.min(r,n.done.from+(n.active.explicit?0:1)),a=new kO(n.active.source,n.active.explicit,i,n.done,n.done.from,null!==(t=n.done.to)&&void 0!==t?t:r);for(let t of n.updates)a=a.update(t,o);if(a.hasResult()){e.push(a);continue}}let a=r.active.find(t=>t.source==n.active.source);if(a&&a.isPending)if(null==n.done){let t=new wO(n.active.source,0);for(let e of n.updates)t=t.update(e,o);t.isPending||e.push(t)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:qO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(QO,!1);if(e&&e.tooltip&&this.view.state.facet(lO).closeOnBlur){let o=e.open&&Fh(this.view,e.open.tooltip);o&&o.dom.contains(t.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:nO.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:iO.of(!1)}),20),this.composing=0}}}),zO="object"==typeof navigator&&/Win/.test(navigator.platform),MO=zn.highest(_c.domEventHandlers({keydown(t,e){let o=e.state.field(QO,!1);if(!o||!o.open||o.open.disabled||o.open.selected<0||t.key.length>1||t.ctrlKey&&(!zO||!t.altKey)||t.metaKey)return!1;let r=o.open.options[o.open.selected],i=o.active.find(t=>t.source==r.source),n=r.completion.commitCharacters||i.result.commitCharacters;return n&&n.indexOf(t.key)>-1&&$O(e,r),!1}})),EO=_c.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class ZO{constructor(t,e,o,r){this.field=t,this.line=e,this.from=o,this.to=r}}class XO{constructor(t,e,o){this.field=t,this.from=e,this.to=o}map(t){let e=t.mapPos(this.from,-1,hn.TrackDel),o=t.mapPos(this.to,1,hn.TrackDel);return null==e||null==o?null:new XO(this.field,e,o)}}class _O{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let o=[],r=[e],i=t.doc.lineAt(e),n=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(o.length){let o=n,a=/^\t*/.exec(i)[0].length;for(let e=0;e<a;e++)o+=t.facet(hm);r.push(e+o.length-a),i=o+i.slice(a)}o.push(i),e+=i.length+1}let a=this.fieldPositions.map(t=>new XO(t.field,r[t.line]+t.from,r[t.line]+t.to));return{text:o,ranges:a}}static parse(t){let e,o=[],r=[],i=[];for(let n of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(n);){let t=e[1]?+e[1]:null,a=e[2]||e[3]||"",s=-1,l=a.replace(/\\[{}]/g,t=>t[1]);for(let e=0;e<o.length;e++)(null!=t?o[e].seq==t:l&&o[e].name==l)&&(s=e);if(s<0){let e=0;for(;e<o.length&&(null==t||null!=o[e].seq&&o[e].seq<t);)e++;o.splice(e,0,{seq:t,name:l}),s=e;for(let t of i)t.field>=s&&t.field++}for(let t of i)if(t.line==r.length&&t.from>e.index){let o=e[2]?3+(e[1]||"").length:2;t.from-=o,t.to-=o}i.push(new ZO(s,r.length,e.index,e.index+l.length)),n=n.slice(0,e.index)+a+n.slice(e.index+e[0].length)}n=n.replace(/\\([{}])/g,(t,e,o)=>{for(let t of i)t.line==r.length&&t.from>o&&(t.from--,t.to--);return e}),r.push(n)}return new _O(r,i)}}let jO=Ys.widget({widget:new class extends js{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),DO=Ys.mark({class:"cm-snippetField"});class YO{constructor(t,e){this.ranges=t,this.active=e,this.deco=Ys.set(t.map(t=>(t.from==t.to?jO:DO).range(t.from,t.to)),!0)}map(t){let e=[];for(let o of this.ranges){let r=o.map(t);if(!r)return null;e.push(r)}return new YO(e,this.active)}selectionInsideField(t){return t.ranges.every(t=>this.ranges.some(e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))}}const VO=Fn.define({map:(t,e)=>t&&t.map(e)}),LO=Fn.define(),UO=An.define({create:()=>null,update(t,e){for(let o of e.effects){if(o.is(VO))return o.value;if(o.is(LO)&&t)return new YO(t.ranges,o.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>_c.decorations.from(t,t=>t?t.deco:Ys.none)});function BO(t,e){return yn.create(t.filter(t=>t.field==e).map(t=>yn.range(t.from,t.to)))}function WO(t){let e=_O.parse(t);return(t,o,r,i)=>{let{text:n,ranges:a}=e.instantiate(t.state,r),{main:s}=t.state.selection,l={changes:{from:r,to:i==s.from?s.to:i,insert:Ni.of(n)},scrollIntoView:!0,annotations:o?[tO.of(o),Hn.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=BO(a,0)),a.some(t=>t.field>0)){let e=new YO(a,0),o=l.effects=[VO.of(e)];void 0===t.state.field(UO,!1)&&o.push(Fn.appendConfig.of([UO,FO,KO,EO]))}t.dispatch(t.state.update(l))}}function IO(t){return({state:e,dispatch:o})=>{let r=e.field(UO,!1);if(!r||t<0&&0==r.active)return!1;let i=r.active+t,n=t>0&&!r.ranges.some(e=>e.field==i+t);return o(e.update({selection:BO(r.ranges,i),effects:VO.of(n?null:new YO(r.ranges,i)),scrollIntoView:!0})),!0}}const GO=[{key:"Tab",run:IO(1),shift:IO(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(UO,!1)&&(e(t.update({effects:VO.of(null)})),!0)}],NO=qn.define({combine:t=>t.length?t[0]:GO}),FO=zn.highest(Wc.compute([NO],t=>t.facet(NO)));function HO(t,e){return{...e,apply:WO(t)}}const KO=_c.domEventHandlers({mousedown(t,e){let o,r=e.state.field(UO,!1);if(!r||null==(o=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let i=r.ranges.find(t=>t.from<=o&&t.to>=o);return!(!i||i.field==r.active||(e.dispatch({selection:BO(r.ranges,i.field),effects:VO.of(r.ranges.some(t=>t.field>i.field)?new YO(r.ranges,i.field):null),scrollIntoView:!0}),0))}}),JO={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},tx=Fn.define({map(t,e){let o=e.mapPos(t,-1,hn.TrackAfter);return null==o?void 0:o}}),ex=new class extends da{};ex.startSide=1,ex.endSide=-1;const ox=An.define({create:()=>ua.empty,update(t,e){if(t=t.map(e.changes),e.selection){let o=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=o.from&&t<=o.to})}for(let o of e.effects)o.is(tx)&&(t=t.update({add:[ex.range(o.value,o.value+1)]}));return t}}),rx="()[]{}<>«»»«[]{}";function ix(t){for(let e=0;e<16;e+=2)if(rx.charCodeAt(e)==t)return rx.charAt(e+1);return ln(t<128?t:t+1)}function nx(t,e){return t.languageDataAt("closeBrackets",e)[0]||JO}const ax="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),sx=_c.inputHandler.of((t,e,o,r)=>{if((ax?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||2==r.length&&1==dn(sn(r,0))||e!=i.from||o!=i.to)return!1;let n=function(t,e){let o=nx(t,t.selection.main.head),r=o.brackets||JO.brackets;for(let i of r){let n=ix(sn(i,0));if(e==i)return n==i?ux(t,i,r.indexOf(i+i+i)>-1,o):hx(t,i,n,o.before||JO.before);if(e==n&&dx(t,t.selection.main.from))return px(t,0,n)}return null}(t.state,r);return!!n&&(t.dispatch(n),!0)}),lx=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=nx(t,t.selection.main.head).brackets||JO.brackets,r=null,i=t.changeByRange(e=>{if(e.empty){let r=function(t,e){let o=t.sliceString(e-2,e);return dn(sn(o,0))==o.length?o:o.slice(1)}(t.doc,e.head);for(let i of o)if(i==r&&cx(t.doc,e.head)==ix(sn(i,0)))return{changes:{from:e.head-i.length,to:e.head+i.length},range:yn.cursor(e.head-i.length)}}return{range:r=e}});return r||e(t.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function dx(t,e){let o=!1;return t.field(ox).between(0,t.doc.length,t=>{t==e&&(o=!0)}),o}function cx(t,e){let o=t.sliceString(e,e+2);return o.slice(0,dn(sn(o,0)))}function hx(t,e,o,r){let i=null,n=t.changeByRange(n=>{if(!n.empty)return{changes:[{insert:e,from:n.from},{insert:o,from:n.to}],effects:tx.of(n.to+e.length),range:yn.range(n.anchor+e.length,n.head+e.length)};let a=cx(t.doc,n.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+o,from:n.head},effects:tx.of(n.head+e.length),range:yn.cursor(n.head+e.length)}:{range:i=n}});return i?null:t.update(n,{scrollIntoView:!0,userEvent:"input.type"})}function px(t,e,o){let r=null,i=t.changeByRange(e=>e.empty&&cx(t.doc,e.head)==o?{changes:{from:e.head,to:e.head+o.length,insert:o},range:yn.cursor(e.head+o.length)}:r={range:e});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function ux(t,e,o,r){let i=r.stringPrefixes||JO.stringPrefixes,n=null,a=t.changeByRange(r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:tx.of(r.to+e.length),range:yn.range(r.anchor+e.length,r.head+e.length)};let a,s=r.head,l=cx(t.doc,s);if(l==e){if(mx(t,s))return{changes:{insert:e+e,from:s},effects:tx.of(s+e.length),range:yn.cursor(s+e.length)};if(dx(t,s)){let r=o&&t.sliceDoc(s,s+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:s,to:s+r.length,insert:r},range:yn.cursor(s+r.length)}}}else{if(o&&t.sliceDoc(s-2*e.length,s)==e+e&&(a=fx(t,s-2*e.length,i))>-1&&mx(t,a))return{changes:{insert:e+e+e+e,from:s},effects:tx.of(s+e.length),range:yn.cursor(s+e.length)};if(t.charCategorizer(s)(l)!=ia.Word&&fx(t,s,i)>-1&&!function(t,e,o,r){let i=Ju(t).resolveInner(e,-1),n=r.reduce((t,e)=>Math.max(t,e.length),0);for(let a=0;a<5;a++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+o.length+n)),s=a.indexOf(o);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let e=i.firstChild;for(;e&&e.from==i.from&&e.to-e.from>o.length+s;){if(t.sliceDoc(e.to-o.length,e.to)==o)return!1;e=e.firstChild}return!0}let l=i.to==e&&i.parent;if(!l)break;i=l}return!1}(t,s,e,i))return{changes:{insert:e+e,from:s},effects:tx.of(s+e.length),range:yn.cursor(s+e.length)}}return{range:n=r}});return n?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function mx(t,e){let o=Ju(t).resolveInner(e+1);return o.parent&&o.from==e}function fx(t,e,o){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=ia.Word)return e;for(let i of o){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=ia.Word)return o}return-1}function bx(t={}){return[MO,QO,lO.of(t),RO,vx,EO]}const gx=[{key:"Ctrl-Space",run:TO},{mac:"Alt-`",run:TO},{mac:"Alt-i",run:TO},{key:"Escape",run:t=>{let e=t.state.field(QO,!1);return!(!e||!e.active.some(t=>0!=t.state)||(t.dispatch({effects:nO.of(null)}),0))}},{key:"ArrowDown",run:CO(!0)},{key:"ArrowUp",run:CO(!1)},{key:"PageDown",run:CO(!0,"page")},{key:"PageUp",run:CO(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(QO,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(lO).interactionDelay)&&$O(t,e.open.options[e.open.selected])}}],vx=zn.highest(Wc.computeN([lO],t=>t.facet(lO).defaultKeymap?[gx]:[])),Ox=[HO("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),HO("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),HO("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),HO("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),HO("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),HO("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),HO("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),HO("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),HO("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),HO('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),HO('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],xx=Ox.concat([HO("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),HO("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),HO("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),yx=new ru,wx=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function kx(t){return(e,o)=>{let r=e.node.getChild("VariableDefinition");return r&&o(r,t),!0}}const qx=["FunctionDeclaration"],Sx={FunctionDeclaration:kx("function"),ClassDeclaration:kx("class"),ClassExpression:()=>!0,EnumDeclaration:kx("constant"),TypeAliasDeclaration:kx("type"),NamespaceDeclaration:kx("namespace"),VariableDefinition(t,e){t.matchContext(qx)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function Qx(t,e){let o=yx.get(e);if(o)return o;let r=[],i=!0;function n(e,o){let i=t.sliceString(e.from,e.to);r.push({label:i,type:o})}return e.cursor(_p.IncludeAnonymous).iterate(e=>{if(i)i=!1;else if(e.name){let t=Sx[e.name];if(t&&t(e,n)||wx.has(e.name))return!1}else if(e.to-e.from>8192){for(let o of Qx(t,e.node))r.push(o);return!1}}),yx.set(e,r),r}const $x=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Px=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Cx(t){let e=Ju(t.state).resolveInner(t.pos,-1);if(Px.indexOf(e.name)>-1)return null;let o="VariableName"==e.name||e.to-e.from<20&&$x.test(t.state.sliceDoc(e.from,e.to));if(!o&&!t.explicit)return null;let r=[];for(let o=e;o;o=o.parent)wx.has(o.name)&&(r=r.concat(Qx(t.state.doc,o)));return{options:r,from:o?e.from:t.pos,validFor:$x}}const Tx=Ku.define({name:"javascript",parser:Iv.configure({props:[bm.add({IfStatement:qm({except:/^\s*({|else\b)/}),TryStatement:qm({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:t=>t.baseIndent,SwitchBody:t=>{let e=t.textAfter,o=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(o?0:r?1:2)*t.unit},Block:wm({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":qm({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),Qm.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":$m,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Ax={test:t=>/^JSX/.test(t.name),facet:Gu({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Rx=Tx.configure({dialect:"ts"},"typescript"),zx=Tx.configure({dialect:"jsx",props:[Nu.add(t=>t.isTop?[Ax]:void 0)]}),Mx=Tx.configure({dialect:"jsx ts",props:[Nu.add(t=>t.isTop?[Ax]:void 0)]},"typescript");let Ex=t=>({label:t,type:"keyword"});const Zx="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Ex),Xx=Zx.concat(["declare","implements","private","protected","public"].map(Ex));function _x(t={}){let e=t.jsx?t.typescript?Mx:zx:t.typescript?Rx:Tx,o=t.typescript?xx.concat(Xx):Ox.concat(Zx);return new dm(e,[Tx.data.of({autocomplete:(r=Px,i=Fv(o),t=>{for(let e=Ju(t.state).resolveInner(t.pos,-1);e;e=e.parent){if(r.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return i(t)})}),Tx.data.of({autocomplete:Cx}),t.jsx?Yx:[]]);var r,i}function jx(t,e,o=t.length){for(let r=null==e?void 0:e.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return t.sliceString(r.from,Math.min(r.to,o));return""}const Dx="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Yx=_c.inputHandler.of((t,e,o,r,i)=>{if((Dx?t.composing:t.compositionStarted)||t.state.readOnly||e!=o||">"!=r&&"/"!=r||!Tx.isActiveAt(t.state,e,-1))return!1;let n=i(),{state:a}=n,s=a.changeByRange(t=>{var e;let o,{head:i}=t,n=Ju(a).resolveInner(i-1,-1);if("JSXStartTag"==n.name&&(n=n.parent),a.doc.sliceString(i-1,i)!=r||"JSXAttributeValue"==n.name&&n.to>i);else{if(">"==r&&"JSXFragmentTag"==n.name)return{range:t,changes:{from:i,insert:"</>"}};if("/"==r&&"JSXStartCloseTag"==n.name){let t=n.parent,r=t.parent;if(r&&t.from==i-2&&((o=jx(a.doc,r.firstChild,i))||"JSXFragmentTag"==(null===(e=r.firstChild)||void 0===e?void 0:e.name))){let t=`${o}>`;return{range:yn.cursor(i+t.length,-1),changes:{from:i,insert:t}}}}else if(">"==r){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(n);if(e&&"JSXOpenTag"==e.name&&!/^\/?>|^<\//.test(a.doc.sliceString(i,i+2))&&(o=jx(a.doc,e,i)))return{range:t,changes:{from:i,insert:`</${o}>`}}}}return{range:t}});return!s.changes.empty&&(t.dispatch([n,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Vx=["_blank","_self","_top","_parent"],Lx=["ascii","utf-8","utf-16","latin1","latin1"],Ux=["get","post","put","delete"],Bx=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Wx=["true","false"],Ix={},Gx={a:{attrs:{href:null,ping:null,type:null,media:null,target:Vx,hreflang:null}},abbr:Ix,address:Ix,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ix,aside:Ix,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ix,base:{attrs:{href:null,target:Vx}},bdi:Ix,bdo:Ix,blockquote:{attrs:{cite:null}},body:Ix,br:Ix,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Bx,formmethod:Ux,formnovalidate:["novalidate"],formtarget:Vx,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ix,center:Ix,cite:Ix,code:Ix,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ix,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ix,div:Ix,dl:Ix,dt:Ix,em:Ix,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ix,figure:Ix,footer:Ix,form:{attrs:{action:null,name:null,"accept-charset":Lx,autocomplete:["on","off"],enctype:Bx,method:Ux,novalidate:["novalidate"],target:Vx}},h1:Ix,h2:Ix,h3:Ix,h4:Ix,h5:Ix,h6:Ix,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ix,hgroup:Ix,hr:Ix,html:{attrs:{manifest:null}},i:Ix,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Bx,formmethod:Ux,formnovalidate:["novalidate"],formtarget:Vx,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ix,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ix,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ix,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Lx,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ix,noscript:Ix,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ix,param:{attrs:{name:null,value:null}},pre:Ix,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ix,rt:Ix,ruby:Ix,samp:Ix,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Lx}},section:Ix,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ix,source:{attrs:{src:null,type:null,media:null}},span:Ix,strong:Ix,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ix,summary:Ix,sup:Ix,table:Ix,tbody:Ix,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ix,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ix,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ix,time:{attrs:{datetime:null}},title:Ix,tr:Ix,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ix,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ix},Nx={accesskey:null,class:null,contenteditable:Wx,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Wx,autocorrect:Wx,autocapitalize:Wx,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Wx,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Wx,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Wx,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Wx,"aria-hidden":Wx,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Wx,"aria-multiselectable":Wx,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Wx,"aria-relevant":null,"aria-required":Wx,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Fx="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of Fx)Nx[t]=null;class Hx{constructor(t,e){this.tags={...Gx,...t},this.globalAttrs={...Nx,...e},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function Kx(t,e,o=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,o)):""}function Jx(t,e=!1){for(;t;t=t.parent)if("Element"==t.name){if(!e)return t;e=!1}return null}function ty(t,e,o){let r=o.tags[Kx(t,Jx(e))];return(null==r?void 0:r.children)||o.allTags}function ey(t,e){let o=[];for(let r=Jx(e);r&&!r.type.isTop;r=Jx(r.parent)){let i=Kx(t,r);if(i&&"CloseTag"==r.lastChild.name)break;i&&o.indexOf(i)<0&&("EndTag"==e.name||e.from>=r.firstChild.to)&&o.push(i)}return o}Hx.default=new Hx;const oy=/^[:\-\.\w\u00b7-\uffff]*$/;function ry(t,e,o,r,i){let n=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",a=Jx(o,"StartTag"==o.name||"TagName"==o.name);return{from:r,to:i,options:ty(t.doc,a,e).map(t=>({label:t,type:"type"})).concat(ey(t.doc,o).map((t,e)=>({label:"/"+t,apply:"/"+t+n,type:"type",boost:99-e}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function iy(t,e,o,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:o,to:r,options:ey(t.doc,e).map((t,e)=>({label:t,apply:t+i,type:"type",boost:99-e})),validFor:oy}}function ny(t){let{extraTags:e,extraGlobalAttributes:o}=t,r=o||e?new Hx(e,o):Hx.default;return t=>function(t,e){let{state:o,pos:r}=e,i=Ju(o).resolveInner(r,-1),n=i.resolve(r);for(let t,e=r;n==i&&(t=i.childBefore(e));){let o=t.lastChild;if(!o||!o.type.isError||o.from<o.to)break;n=i=t,e=o.from}return"TagName"==i.name?i.parent&&/CloseTag$/.test(i.parent.name)?iy(o,i,i.from,r):ry(o,t,i,i.from,r):"StartTag"==i.name||"IncompleteTag"==i.name?ry(o,t,i,r,r):"StartCloseTag"==i.name||"IncompleteCloseTag"==i.name?iy(o,i,r,r):"OpenTag"==i.name||"SelfClosingTag"==i.name||"AttributeName"==i.name?function(t,e,o,r,i){let n=Jx(o),a=n?e.tags[Kx(t.doc,n)]:null,s=a&&a.attrs?Object.keys(a.attrs):[];return{from:r,to:i,options:(a&&!1===a.globalAttrs?s:s.length?s.concat(e.globalAttrNames):e.globalAttrNames).map(t=>({label:t,type:"property"})),validFor:oy}}(o,t,i,"AttributeName"==i.name?i.from:r,r):"Is"==i.name||"AttributeValue"==i.name||"UnquotedAttributeValue"==i.name?function(t,e,o,r,i){var n;let a,s=null===(n=o.parent)||void 0===n?void 0:n.getChild("AttributeName"),l=[];if(s){let n=t.sliceDoc(s.from,s.to),d=e.globalAttrs[n];if(!d){let r=Jx(o),i=r?e.tags[Kx(t.doc,r)]:null;d=(null==i?void 0:i.attrs)&&i.attrs[n]}if(d){let e=t.sliceDoc(r,i).toLowerCase(),o='"',n='"';/^['"]/.test(e)?(a='"'==e[0]?/^[^"]*$/:/^[^']*$/,o="",n=t.sliceDoc(i,i+1)==e[0]?"":e[0],e=e.slice(1),r++):a=/^[^\s<>='"]*$/;for(let t of d)l.push({label:t,apply:o+t+n,type:"constant"})}}return{from:r,to:i,options:l,validFor:a}}(o,t,i,"Is"==i.name?r:i.from,r):!e.explicit||"Element"!=n.name&&"Text"!=n.name&&"Document"!=n.name?null:function(t,e,o,r){let i=[],n=0;for(let r of ty(t.doc,o,e))i.push({label:"<"+r,type:"type"});for(let e of ey(t.doc,o))i.push({label:"</"+e+">",type:"type",boost:99-n++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(o,t,i,r)}(r,t)}const ay=Tx.parser.configure({top:"SingleExpression"}),sy=[{tag:"script",attrs:t=>"text/typescript"==t.type||"ts"==t.lang,parser:Rx.parser},{tag:"script",attrs:t=>"text/babel"==t.type||"text/jsx"==t.type,parser:zx.parser},{tag:"script",attrs:t=>"text/typescript-jsx"==t.type,parser:Mx.parser},{tag:"script",attrs:t=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type),parser:ay},{tag:"script",attrs:t=>!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:Tx.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:zv.parser}],ly=[{name:"style",parser:zv.parser.configure({top:"Styles"})}].concat(Fx.map(t=>({name:t,parser:Tx.parser}))),dy=Ku.define({name:"html",parser:Kg.configure({props:[bm.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e,o=null;for(let e=t.node;;){let t=e.lastChild;if(!t||"Element"!=t.name||t.to!=e.to)break;o=e=t}return o&&(!(e=o.lastChild)||"CloseTag"!=e.name&&"SelfClosingTag"!=e.name)?t.lineIndent(o.from)+t.unit:null}}),Qm.add({Element(t){let e=t.firstChild,o=t.lastChild;return e&&"OpenTag"==e.name?{from:e.to,to:"CloseTag"==o.name?o.from:t.to}:null}}),ff.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),cy=dy.configure({wrap:ov(sy,ly)});function hy(t={}){let e,o="";!1===t.matchClosingTags&&(o="noMatch"),!0===t.selfClosingTags&&(o=(o?o+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(e=ov((t.nestedLanguages||[]).concat(sy),(t.nestedAttributes||[]).concat(ly)));let r=e?dy.configure({wrap:e,dialect:o}):o?cy.configure({dialect:o}):cy;return new dm(r,[cy.data.of({autocomplete:ny(t)}),!1!==t.autoCloseTags?uy:[],_x().support,Mv().support])}const py=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),uy=_c.inputHandler.of((t,e,o,r,i)=>{if(t.composing||t.state.readOnly||e!=o||">"!=r&&"/"!=r||!cy.isActiveAt(t.state,e,-1))return!1;let n=i(),{state:a}=n,s=a.changeByRange(t=>{var e,o,i;let n,s=a.doc.sliceString(t.from-1,t.to)==r,{head:l}=t,d=Ju(a).resolveInner(l,-1);if(s&&">"==r&&"EndTag"==d.name){let r=d.parent;if("CloseTag"!=(null===(o=null===(e=r.parent)||void 0===e?void 0:e.lastChild)||void 0===o?void 0:o.name)&&(n=Kx(a.doc,r.parent,l))&&!py.has(n))return{range:t,changes:{from:l,to:l+(">"===a.doc.sliceString(l,l+1)?1:0),insert:`</${n}>`}}}else if(s&&"/"==r&&"IncompleteCloseTag"==d.name){let t=d.parent;if(d.from==l-2&&"CloseTag"!=(null===(i=t.lastChild)||void 0===i?void 0:i.name)&&(n=Kx(a.doc,t,l))&&!py.has(n)){let t=l+(">"===a.doc.sliceString(l,l+1)?1:0),e=`${n}>`;return{range:yn.cursor(l+e.length,-1),changes:{from:l,to:t,insert:e}}}}return{range:t}});return!s.changes.empty&&(t.dispatch([n,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function my(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,o=arguments[1];if(o&&"object"==typeof o&&null==o.nodeType&&!Array.isArray(o)){for(var r in o)if(Object.prototype.hasOwnProperty.call(o,r)){var i=o[r];"string"==typeof i?t.setAttribute(r,i):null!=i&&(t[r]=i)}e++}for(;e<arguments.length;e++)fy(t,arguments[e]);return t}function fy(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var o=0;o<e.length;o++)fy(t,e[o])}}const by="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class gy{constructor(t,e,o=0,r=t.length,i,n){this.test=n,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(o,r),this.bufferStart=o,this.normalize=i?t=>i(by(t)):by,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return sn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=ln(t),o=this.bufferStart+this.bufferPos;this.bufferPos+=dn(t);let r=this.normalize(e);if(r.length)for(let t=0,i=o;;t++){let n=r.charCodeAt(t),a=this.match(n,i,this.bufferPos+this.bufferStart);if(t==r.length-1){if(a)return this.value=a,this;break}i==o&&t<e.length&&e.charCodeAt(t)==n&&i++}}}match(t,e,o){let r=null;for(let e=0;e<this.matches.length;e+=2){let i=this.matches[e],n=!1;this.query.charCodeAt(i)==t&&(i==this.query.length-1?r={from:this.matches[e+1],to:o}:(this.matches[e]++,n=!0)),n||(this.matches.splice(e,2),e-=2)}return this.query.charCodeAt(0)==t&&(1==this.query.length?r={from:e,to:o}:this.matches.push(1,e)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(gy.prototype[Symbol.iterator]=function(){return this});const vy={from:-1,to:-1,match:/.*/.exec("")},Oy="gm"+(null==/x/.unicode?"":"u");class xy{constructor(t,e,o,r=0,i=t.length){if(this.text=t,this.to=i,this.curLine="",this.done=!1,this.value=vy,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new ky(t,e,o,r,i);this.re=new RegExp(e,Oy+((null==o?void 0:o.ignoreCase)?"i":"")),this.test=null==o?void 0:o.test,this.iter=t.iter();let n=t.lineAt(r);this.curLineStart=n.from,this.matchPos=qy(t,r),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let o=this.curLineStart+e.index,r=o+e[0].length;if(this.matchPos=qy(this.text,r+(o==r?1:0)),o==this.curLineStart+this.curLine.length&&this.nextLine(),(o<r||o>this.value.to)&&(!this.test||this.test(o,r,e)))return this.value={from:o,to:r,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}const yy=new WeakMap;class wy{constructor(t,e){this.from=t,this.text=e}get to(){return this.from+this.text.length}static get(t,e,o){let r=yy.get(t);if(!r||r.from>=o||r.to<=e){let r=new wy(e,t.sliceString(e,o));return yy.set(t,r),r}if(r.from==e&&r.to==o)return r;let{text:i,from:n}=r;return n>e&&(i=t.sliceString(e,n)+i,n=e),r.to<o&&(i+=t.sliceString(r.to,o)),yy.set(t,new wy(n,i)),new wy(e,i.slice(e-n,o-n))}}class ky{constructor(t,e,o,r,i){this.text=t,this.to=i,this.done=!1,this.value=vy,this.matchPos=qy(t,r),this.re=new RegExp(e,Oy+((null==o?void 0:o.ignoreCase)?"i":"")),this.test=null==o?void 0:o.test,this.flat=wy.get(t,r,this.chunkEnd(r+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,o=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,o,e)))return this.value={from:t,to:o,match:e},this.matchPos=qy(this.text,o+(t==o?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=wy.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function qy(t,e){if(e>=t.length)return e;let o,r=t.lineAt(e);for(;e<r.to&&(o=r.text.charCodeAt(e-r.from))>=56320&&o<57344;)e++;return e}function Sy(t){let e=my("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function o(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!o)return;let{state:r}=t,i=r.doc.lineAt(r.selection.main.head),[,n,a,s,l]=o,d=s?+s.slice(1):0,c=a?+a:i.number;if(a&&l){let t=c/100;n&&(t=t*("-"==n?-1:1)+i.number/r.doc.lines),c=Math.round(r.doc.lines*t)}else a&&n&&(c=c*("-"==n?-1:1)+i.number);let h=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),p=yn.cursor(h.from+Math.max(0,Math.min(d,h.length)));t.dispatch({effects:[Qy.of(!1),_c.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:my("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:Qy.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),o())},onsubmit:t=>{t.preventDefault(),o()}},my("label",t.state.phrase("Go to line"),": ",e)," ",my("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),my("button",{name:"close",onclick:()=>{t.dispatch({effects:Qy.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]))}}"undefined"!=typeof Symbol&&(xy.prototype[Symbol.iterator]=ky.prototype[Symbol.iterator]=function(){return this});const Qy=Fn.define(),$y=An.define({create:()=>!0,update(t,e){for(let o of e.effects)o.is(Qy)&&(t=o.value);return t},provide:t=>rp.from(t,t=>t?Sy:null)}),Py=_c.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),Cy={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ty=qn.define({combine:t=>la(t,Cy,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function Ay(t){let e=[Zy,Ey];return t&&e.push(Ty.of(t)),e}const Ry=Ys.mark({class:"cm-selectionMatch"}),zy=Ys.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function My(t,e,o,r){return!(0!=o&&t(e.sliceDoc(o-1,o))==ia.Word||r!=e.doc.length&&t(e.sliceDoc(r,r+1))==ia.Word)}const Ey=Xl.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Ty),{state:o}=t,r=o.selection;if(r.ranges.length>1)return Ys.none;let i,n=r.main,a=null;if(n.empty){if(!e.highlightWordAroundCursor)return Ys.none;let t=o.wordAt(n.head);if(!t)return Ys.none;a=o.charCategorizer(n.head),i=o.sliceDoc(t.from,t.to)}else{let t=n.to-n.from;if(t<e.minSelectionLength||t>200)return Ys.none;if(e.wholeWords){if(i=o.sliceDoc(n.from,n.to),a=o.charCategorizer(n.head),!My(a,o,n.from,n.to)||!function(t,e,o,r){return t(e.sliceDoc(o,o+1))==ia.Word&&t(e.sliceDoc(r-1,r))==ia.Word}(a,o,n.from,n.to))return Ys.none}else if(i=o.sliceDoc(n.from,n.to),!i)return Ys.none}let s=[];for(let r of t.visibleRanges){let t=new gy(o.doc,i,r.from,r.to);for(;!t.next().done;){let{from:r,to:i}=t.value;if((!a||My(a,o,r,i))&&(n.empty&&r<=n.from&&i>=n.to?s.push(zy.range(r,i)):(r>=n.to||i<=n.from)&&s.push(Ry.range(r,i)),s.length>e.maxMatches))return Ys.none}}return Ys.set(s)}},{decorations:t=>t.decorations}),Zy=_c.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Xy=qn.define({combine:t=>la(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new pw(t),scrollToMatch:t=>_c.scrollIntoView(t)})});class _y{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,Oy),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new By(this):new Yy(this)}getCursor(t,e=0,o){let r=t.doc?t:sa.create({doc:t});return null==o&&(o=r.doc.length),this.regexp?Vy(this,r,e,o):Dy(this,r,e,o)}}class jy{constructor(t){this.spec=t}}function Dy(t,e,o,r){return new gy(e.doc,t.unquoted,o,r,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?function(t,e){return(o,r,i,n)=>((n>o||n+i.length<r)&&(n=Math.max(0,o-2),i=t.sliceString(n,Math.min(t.length,r+2))),!(e(Ly(i,o-n))==ia.Word&&e(Uy(i,o-n))==ia.Word||e(Uy(i,r-n))==ia.Word&&e(Ly(i,r-n))==ia.Word))}(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}class Yy extends jy{constructor(t){super(t)}nextMatch(t,e,o){let r=Dy(this.spec,t,o,t.doc.length).nextOverlapping();if(r.done){let o=Math.min(t.doc.length,e+this.spec.unquoted.length);r=Dy(this.spec,t,0,o).nextOverlapping()}return r.done||r.value.from==e&&r.value.to==o?null:r.value}prevMatchInRange(t,e,o){for(let r=o;;){let o=Math.max(e,r-1e4-this.spec.unquoted.length),i=Dy(this.spec,t,o,r),n=null;for(;!i.nextOverlapping().done;)n=i.value;if(n)return n;if(o==e)return null;r-=1e4}}prevMatch(t,e,o){let r=this.prevMatchInRange(t,0,e);return r||(r=this.prevMatchInRange(t,Math.max(0,o-this.spec.unquoted.length),t.doc.length)),!r||r.from==e&&r.to==o?null:r}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,e){let o=Dy(this.spec,t,0,t.doc.length),r=[];for(;!o.next().done;){if(r.length>=e)return null;r.push(o.value)}return r}highlight(t,e,o,r){let i=Dy(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,t.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function Vy(t,e,o,r){return new xy(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(i=e.charCategorizer(e.selection.main.head),(t,e,o)=>!o[0].length||(i(Ly(o.input,o.index))!=ia.Word||i(Uy(o.input,o.index))!=ia.Word)&&(i(Uy(o.input,o.index+o[0].length))!=ia.Word||i(Ly(o.input,o.index+o[0].length))!=ia.Word)):void 0},o,r);var i}function Ly(t,e){return t.slice(an(t,e,!1),e)}function Uy(t,e){return t.slice(e,an(t,e))}class By extends jy{nextMatch(t,e,o){let r=Vy(this.spec,t,o,t.doc.length).next();return r.done&&(r=Vy(this.spec,t,0,e).next()),r.done?null:r.value}prevMatchInRange(t,e,o){for(let r=1;;r++){let i=Math.max(e,o-1e4*r),n=Vy(this.spec,t,i,o),a=null;for(;!n.next().done;)a=n.value;if(a&&(i==e||a.from>i+10))return a;if(i==e)return null}}prevMatch(t,e,o){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,o,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(e,o)=>{if("&"==o)return t.match[0];if("$"==o)return"$";for(let e=o.length;e>0;e--){let r=+o.slice(0,e);if(r>0&&r<t.match.length)return t.match[r]+o.slice(e)}return e})}matchAll(t,e){let o=Vy(this.spec,t,0,t.doc.length),r=[];for(;!o.next().done;){if(r.length>=e)return null;r.push(o.value)}return r}highlight(t,e,o,r){let i=Vy(this.spec,t,Math.max(0,e-250),Math.min(o+250,t.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const Wy=Fn.define(),Iy=Fn.define(),Gy=An.define({create:t=>new Ny(aw(t).create(),null),update(t,e){for(let o of e.effects)o.is(Wy)?t=new Ny(o.value.create(),t.panel):o.is(Iy)&&(t=new Ny(t.query,o.value?nw:null));return t},provide:t=>rp.from(t,t=>t.panel)});class Ny{constructor(t,e){this.query=t,this.panel=e}}const Fy=Ys.mark({class:"cm-searchMatch"}),Hy=Ys.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Ky=Xl.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Gy))}update(t){let e=t.state.field(Gy);(e!=t.startState.field(Gy)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ys.none;let{view:o}=this,r=new ma;for(let e=0,i=o.visibleRanges,n=i.length;e<n;e++){let{from:a,to:s}=i[e];for(;e<n-1&&s>i[e+1].from-500;)s=i[++e].to;t.highlight(o.state,a,s,(t,e)=>{let i=o.state.selection.ranges.some(o=>o.from==t&&o.to==e);r.add(t,e,i?Hy:Fy)})}return r.finish()}},{decorations:t=>t.decorations});function Jy(t){return e=>{let o=e.state.field(Gy,!1);return o&&o.query.spec.valid?t(e,o):dw(e)}}const tw=Jy((t,{query:e})=>{let{to:o}=t.state.selection.main,r=e.nextMatch(t.state,o,o);if(!r)return!1;let i=yn.single(r.from,r.to),n=t.state.facet(Xy);return t.dispatch({selection:i,effects:[bw(t,r),n.scrollToMatch(i.main,t)],userEvent:"select.search"}),lw(t),!0}),ew=Jy((t,{query:e})=>{let{state:o}=t,{from:r}=o.selection.main,i=e.prevMatch(o,r,r);if(!i)return!1;let n=yn.single(i.from,i.to),a=t.state.facet(Xy);return t.dispatch({selection:n,effects:[bw(t,i),a.scrollToMatch(n.main,t)],userEvent:"select.search"}),lw(t),!0}),ow=Jy((t,{query:e})=>{let o=e.matchAll(t.state,1e3);return!(!o||!o.length||(t.dispatch({selection:yn.create(o.map(t=>yn.range(t.from,t.to))),userEvent:"select.search.matches"}),0))}),rw=Jy((t,{query:e})=>{let{state:o}=t,{from:r,to:i}=o.selection.main;if(o.readOnly)return!1;let n=e.nextMatch(o,r,r);if(!n)return!1;let a,s,l=n,d=[],c=[];l.from==r&&l.to==i&&(s=o.toText(e.getReplacement(l)),d.push({from:l.from,to:l.to,insert:s}),l=e.nextMatch(o,l.from,l.to),c.push(_c.announce.of(o.phrase("replaced match on line $",o.doc.lineAt(r).number)+".")));let h=t.state.changes(d);return l&&(a=yn.single(l.from,l.to).map(h),c.push(bw(t,l)),c.push(o.facet(Xy).scrollToMatch(a.main,t))),t.dispatch({changes:h,selection:a,effects:c,userEvent:"input.replace"}),!0}),iw=Jy((t,{query:e})=>{if(t.state.readOnly)return!1;let o=e.matchAll(t.state,1e9).map(t=>{let{from:o,to:r}=t;return{from:o,to:r,insert:e.getReplacement(t)}});if(!o.length)return!1;let r=t.state.phrase("replaced $ matches",o.length)+".";return t.dispatch({changes:o,effects:_c.announce.of(r),userEvent:"input.replace.all"}),!0});function nw(t){return t.state.facet(Xy).createPanel(t)}function aw(t,e){var o,r,i,n,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let d=t.facet(Xy);return new _y({search:(null!==(o=null==e?void 0:e.literal)&&void 0!==o?o:d.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==e?void 0:e.caseSensitive)&&void 0!==r?r:d.caseSensitive,literal:null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:d.literal,regexp:null!==(n=null==e?void 0:e.regexp)&&void 0!==n?n:d.regexp,wholeWord:null!==(a=null==e?void 0:e.wholeWord)&&void 0!==a?a:d.wholeWord})}function sw(t){let e=Jh(t,nw);return e&&e.dom.querySelector("[main-field]")}function lw(t){let e=sw(t);e&&e==t.root.activeElement&&e.select()}const dw=t=>{let e=t.state.field(Gy,!1);if(e&&e.panel){let o=sw(t);if(o&&o!=t.root.activeElement){let r=aw(t.state,e.query.spec);r.valid&&t.dispatch({effects:Wy.of(r)}),o.focus(),o.select()}}else t.dispatch({effects:[Iy.of(!0),e?Wy.of(aw(t.state,e.query.spec)):Fn.appendConfig.of(vw)]});return!0},cw=t=>{let e=t.state.field(Gy,!1);if(!e||!e.panel)return!1;let o=Jh(t,nw);return o&&o.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Iy.of(!1)}),!0},hw=[{key:"Mod-f",run:dw,scope:"editor search-panel"},{key:"F3",run:tw,shift:ew,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:tw,shift:ew,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:cw,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let o=t.selection;if(o.ranges.length>1||o.main.empty)return!1;let{from:r,to:i}=o.main,n=[],a=0;for(let e=new gy(t.doc,t.sliceDoc(r,i));!e.next().done;){if(n.length>1e3)return!1;e.value.from==r&&(a=n.length),n.push(yn.range(e.value.from,e.value.to))}return e(t.update({selection:yn.create(n,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=Jh(t,Sy);if(!e){let o=[Qy.of(!0)];null==t.state.field($y,!1)&&o.push(Fn.appendConfig.of([$y,Py])),t.dispatch({effects:o}),e=Jh(t,Sy)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:o}=t.selection;if(o.some(t=>t.from===t.to))return(({state:t,dispatch:e})=>{let{selection:o}=t,r=yn.create(o.ranges.map(e=>t.wordAt(e.head)||yn.cursor(e.head)),o.mainIndex);return!r.eq(o)&&(e(t.update({selection:r})),!0)})({state:t,dispatch:e});let r=t.sliceDoc(o[0].from,o[0].to);if(t.selection.ranges.some(e=>t.sliceDoc(e.from,e.to)!=r))return!1;let i=function(t,e){let{main:o,ranges:r}=t.selection,i=t.wordAt(o.head),n=i&&i.from==o.from&&i.to==o.to;for(let o=!1,i=new gy(t.doc,e,r[r.length-1].to);;){if(i.next(),!i.done){if(o&&r.some(t=>t.from==i.value.from))continue;if(n){let e=t.wordAt(i.value.from);if(!e||e.from!=i.value.from||e.to!=i.value.to)continue}return i.value}if(o)return null;i=new gy(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}}(t,r);return!!i&&(e(t.update({selection:t.selection.addRange(yn.range(i.from,i.to),!1),effects:_c.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class pw{constructor(t){this.view=t;let e=this.query=t.state.field(Gy).query.spec;function o(t,e,o){return my("button",{class:"cm-button",name:t,onclick:e,type:"button"},o)}this.commit=this.commit.bind(this),this.searchField=my("input",{value:e.search,placeholder:uw(t,"Find"),"aria-label":uw(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=my("input",{value:e.replace,placeholder:uw(t,"Replace"),"aria-label":uw(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=my("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=my("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=my("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=my("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,o("next",()=>tw(t),[uw(t,"next")]),o("prev",()=>ew(t),[uw(t,"previous")]),o("select",()=>ow(t),[uw(t,"all")]),my("label",null,[this.caseField,uw(t,"match case")]),my("label",null,[this.reField,uw(t,"regexp")]),my("label",null,[this.wordField,uw(t,"by word")]),...t.state.readOnly?[]:[my("br"),this.replaceField,o("replace",()=>rw(t),[uw(t,"replace")]),o("replaceAll",()=>iw(t),[uw(t,"replace all")])],my("button",{name:"close",onclick:()=>cw(t),"aria-label":uw(t,"close"),type:"button"},["×"])])}commit(){let t=new _y({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:Wy.of(t)}))}keydown(t){var e,o;o=t,Kc(Gc((e=this.view).state),o,e,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?ew:tw)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),rw(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(Wy)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Xy).top}}function uw(t,e){return t.state.phrase(e)}const mw=30,fw=/[\s\.,:;?!]/;function bw(t,{from:e,to:o}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(o).to,n=Math.max(r.from,e-mw),a=Math.min(i,o+mw),s=t.state.sliceDoc(n,a);if(n!=r.from)for(let t=0;t<mw;t++)if(!fw.test(s[t+1])&&fw.test(s[t])){s=s.slice(t);break}if(a!=i)for(let t=s.length-1;t>s.length-mw;t--)if(!fw.test(s[t-1])&&fw.test(s[t])){s=s.slice(0,t);break}return _c.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const gw=_c.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),vw=[Gy,zn.low(Ky),gw];class Ow{constructor(t,e,o){this.from=t,this.to=e,this.diagnostic=o}}class xw{constructor(t,e,o){this.diagnostics=t,this.panel=e,this.selected=o}static init(t,e,o){let r=o.facet(Aw).markerFilter;r&&(t=r(t,o));let i=t.slice().sort((t,e)=>t.from-e.from||t.to-e.to),n=new ma,a=[],s=0;for(let t=0;;){let e,r,l=t==i.length?null:i[t];if(!l&&!a.length)break;for(a.length?(e=s,r=a.reduce((t,e)=>Math.min(t,e.to),l&&l.from>e?l.from:1e8)):(e=l.from,r=l.to,a.push(l),t++);t<i.length;){let o=i[t];if(o.from!=e||!(o.to>o.from||o.to==e)){r=Math.min(o.from,r);break}a.push(o),t++,r=Math.min(o.to,r)}let d=Yw(a);if(a.some(t=>t.from==t.to||t.from==t.to-1&&o.doc.lineAt(t.from).to==t.from))n.add(e,e,Ys.widget({widget:new Ew(d),diagnostics:a.slice()}));else{let t=a.reduce((t,e)=>e.markClass?t+" "+e.markClass:t,"");n.add(e,r,Ys.mark({class:"cm-lintRange cm-lintRange-"+d+t,diagnostics:a.slice(),inclusiveEnd:a.some(t=>t.to>r)}))}s=r;for(let t=0;t<a.length;t++)a[t].to<=s&&a.splice(t--,1)}let l=n.finish();return new xw(l,e,yw(l))}}function yw(t,e=null,o=0){let r=null;return t.between(o,1e9,(t,o,{spec:i})=>{if(!(e&&i.diagnostics.indexOf(e)<0))if(r){if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new Ow(r.from,o,r.diagnostic)}else r=new Ow(t,o,e||i.diagnostics[0])}),r}const ww=Fn.define(),kw=Fn.define(),qw=Fn.define(),Sw=An.define({create:()=>new xw(Ys.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let o=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=yw(o,t.selected.diagnostic,i)||yw(o,null,i)}!o.size&&i&&e.state.facet(Aw).autoPanel&&(i=null),t=new xw(o,i,r)}for(let o of e.effects)if(o.is(ww)){let r=e.state.facet(Aw).autoPanel?o.value.length?Xw.open:null:t.panel;t=xw.init(o.value,r,e.state)}else o.is(kw)?t=new xw(t.diagnostics,o.value?Xw.open:null,t.selected):o.is(qw)&&(t=new xw(t.diagnostics,t.panel,o.value));return t},provide:t=>[rp.from(t,t=>t.panel),_c.decorations.from(t,t=>t.diagnostics)]}),Qw=Ys.mark({class:"cm-lintRange cm-lintRange-active"});function $w(t,e,o){let r,{diagnostics:i}=t.state.field(Sw),n=-1,a=-1;i.between(e-(o<0?1:0),e+(o>0?1:0),(t,i,{spec:s})=>{if(e>=t&&e<=i&&(t==i||(e>t||o>0)&&(e<i||o<0)))return r=s.diagnostics,n=t,a=i,!1});let s=t.state.facet(Aw).tooltipFilter;return r&&s&&(r=s(r,t.state)),r?{pos:n,end:a,above:t.state.doc.lineAt(n).to<a,create:()=>({dom:Pw(t,r)})}:null}function Pw(t,e){return my("ul",{class:"cm-tooltip-lint"},e.map(e=>Mw(t,e,!1)))}const Cw=t=>{let e=t.state.field(Sw,!1);return!(!e||!e.panel||(t.dispatch({effects:kw.of(!1)}),0))},Tw=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(Sw,!1);var o,r;e&&e.panel||t.dispatch({effects:(o=t.state,r=[kw.of(!0)],o.field(Sw,!1)?r:r.concat(Fn.appendConfig.of(Vw)))});let i=Jh(t,Xw.open);return i&&i.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(Sw,!1);if(!e)return!1;let o=t.state.selection.main,r=e.diagnostics.iter(o.to+1);return!(!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==o.from&&r.to==o.to)||(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),0))}}],Aw=qn.define({combine:t=>({sources:t.map(t=>t.source).filter(t=>null!=t),...la(t.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Rw,tooltipFilter:Rw,needsRefresh:(t,e)=>t?e?o=>t(o)||e(o):t:e,hideOn:(t,e)=>t?e?(o,r,i)=>t(o,r,i)||e(o,r,i):t:e,autoPanel:(t,e)=>t||e})})});function Rw(t,e){return t?e?(o,r)=>e(t(o,r),r):t:e}function zw(t){let e=[];if(t)t:for(let{name:o}of t){for(let t=0;t<o.length;t++){let r=o[t];if(/[a-zA-Z]/.test(r)&&!e.some(t=>t.toLowerCase()==r.toLowerCase())){e.push(r);continue t}}e.push("")}return e}function Mw(t,e,o){var r;let i=o?zw(e.actions):[];return my("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},my("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(r=e.actions)||void 0===r?void 0:r.map((o,r)=>{let n=!1,a=r=>{if(r.preventDefault(),n)return;n=!0;let i=yw(t.state.field(Sw).diagnostics,e);i&&o.apply(t,i.from,i.to)},{name:s}=o,l=i[r]?s.indexOf(i[r]):-1,d=l<0?s:[s.slice(0,l),my("u",s.slice(l,l+1)),s.slice(l+1)];return my("button",{type:"button",class:"cm-diagnosticAction"+(o.markClass?" "+o.markClass:""),onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${i[r]})"`}.`},d)}),e.source&&my("div",{class:"cm-diagnosticSource"},e.source))}class Ew extends js{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return my("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Zw{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Mw(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Xw{constructor(t){this.view=t,this.items=[],this.list=my("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)Cw(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:o}=this.items[this.selectedIndex],r=zw(o.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==e.keyCode){let e=yw(this.view.state.field(Sw).diagnostics,o);e&&o.actions[i].apply(t,e.from,e.to)}}}e.preventDefault()},onclick:t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)}}),this.dom=my("div",{class:"cm-panel-lint"},this.list,my("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Cw(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Sw).selected;if(!t)return-1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return-1}update(){let{diagnostics:t,selected:e}=this.view.state.field(Sw),o=0,r=!1,i=null,n=new Set;for(t.between(0,this.view.state.doc.length,(t,a,{spec:s})=>{for(let t of s.diagnostics){if(n.has(t))continue;n.add(t);let a,s=-1;for(let e=o;e<this.items.length;e++)if(this.items[e].diagnostic==t){s=e;break}s<0?(a=new Zw(this.view,t),this.items.splice(o,0,a),r=!0):(a=this.items[s],s>o&&(this.items.splice(o,s-o),r=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),o++}});o<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new Zw(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let o=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/o:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/o)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let o of this.items)if(o.dom.parentNode==this.list){for(;t!=o.dom;)e();t=o.dom.nextSibling}else this.list.insertBefore(o.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=yw(this.view.state.field(Sw).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:qw.of(e)})}static open(t){return new Xw(t)}}function _w(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const jw=_c.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:_w("#d11")},".cm-lintRange-warning":{backgroundImage:_w("orange")},".cm-lintRange-info":{backgroundImage:_w("#999")},".cm-lintRange-hint":{backgroundImage:_w("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function Dw(t){return"error"==t?4:"warning"==t?3:"info"==t?2:1}function Yw(t){let e="hint",o=1;for(let r of t){let t=Dw(r.severity);t>o&&(o=t,e=r.severity)}return e}const Vw=[Sw,_c.decorations.compute([Sw],t=>{let{selected:e,panel:o}=t.field(Sw);return e&&o&&e.from!=e.to?Ys.set([Qw.range(e.from,e.to)]):Ys.none}),Nh($w,{hideOn:function(t,e){let o=e.pos,r=e.end||o,i=t.state.facet(Aw).hideOn(t,o,r);if(null!=i)return i;let n=t.startState.doc.lineAt(e.pos);return!(!t.effects.some(t=>t.is(ww))&&!t.changes.touchesRange(n.from,Math.max(n.to,r)))}}),jw],Lw=(()=>[qp(),$p,wh(),Df(),Nm(),ah(),[uh,mh],sa.allowMultipleSelections.of(!0),sa.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let o=t.newDoc,{head:r}=t.newSelection.main,i=o.lineAt(r);if(r>i.from+200)return t;let n=o.sliceString(i.from,r);if(!e.some(t=>t.test(n)))return t;let{state:a}=t,s=-1,l=[];for(let{head:t}of a.selection.ranges){let e=a.doc.lineAt(t);if(e.from==s)continue;s=e.from;let o=mm(a,e.from);if(null==o)continue;let r=/^\s*/.exec(e.text)[0],i=um(a,o);r!=i&&l.push({from:e.from,to:e.from+r.length,insert:i})}return l.length?[t,{changes:l,sequential:!0}]:t}),ef(nf,{fallback:!0}),mf(),[sx,ox],bx(),Th(),zh(),$h,Ay(),Wc.of([...lx,...og,...hw,...rb,...Dm,...gx,...Tw])])();var Uw=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Bw=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const Ww={},Iw=new Map;function Gw(t){return(e,o)=>{const r=e.prefix??e.constructor?.name;if(!r)return console.error("Template prefix and constructor name not defined.",e,o);const i=Iw.get(r)||new Map;i.set(t??o,e[o]),Iw.set(r,i)}}const Nw=t=>{class e extends t{static{this.styles=[Mi,J`
|
|
342
|
+
</form>`}}Ei([ki({context:$i,subscribe:!0}),se({attribute:!1}),Zi("design:type",Object)],Xi.prototype,"qboConfig",void 0),Ei([se({type:URL}),Zi("design:type",Object)],Xi.prototype,"apiEndpoint",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"buttonClass",void 0),Ei([se({type:Object}),Zi("design:type",Object)],Xi.prototype,"configData",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"formClass",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"rowClass",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"searchClass",void 0),Ei([se({type:String}),Zi("design:type",Object)],Xi.prototype,"theme",void 0),customElements.define("qbo-config-editor",Xi);let _i=[],ji=[];function Di(t){if(t<768)return!1;for(let e=0,o=_i.length;;){let r=e+o>>1;if(t<_i[r])o=r;else{if(!(t>=ji[r]))return!0;e=r+1}if(e==o)return!1}}function Yi(t){return t>=127462&&t<=127487}function Vi(t,e,o=!0,r=!0){return(o?Li:Ui)(t,e,r)}function Li(t,e,o){if(e==t.length)return e;e&&Wi(t.charCodeAt(e))&&Ii(t.charCodeAt(e-1))&&e--;let r=Bi(t,e);for(e+=Gi(r);e<t.length;){let i=Bi(t,e);if(8205==r||8205==i||o&&Di(i))e+=Gi(i),r=i;else{if(!Yi(i))break;{let o=0,r=e-2;for(;r>=0&&Yi(Bi(t,r));)o++,r-=2;if(o%2==0)break;e+=2}}}return e}function Ui(t,e,o){for(;e>0;){let r=Li(t,e-2,o);if(r<e)return r;e--}return 0}function Bi(t,e){let o=t.charCodeAt(e);if(!Ii(o)||e+1==t.length)return o;let r=t.charCodeAt(e+1);return Wi(r)?r-56320+(o-55296<<10)+65536:o}function Wi(t){return t>=56320&&t<57344}function Ii(t){return t>=55296&&t<56320}function Gi(t){return t<65536?1:2}(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k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4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let e=0,o=0;e<t.length;e++)(e%2?ji:_i).push(o+=t[e])})();class Ni{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,o){[t,e]=nn(this,t,e);let r=[];return this.decompose(0,t,r,2),o.length&&o.decompose(0,o.length,r,3),this.decompose(e,this.length,r,1),Hi.from(r,this.length-(e-t)+o.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=nn(this,t,e);let o=[];return this.decompose(t,e,o,0),Hi.from(o,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),o=this.length-this.scanIdentical(t,-1),r=new tn(this),i=new tn(t);for(let t=e,n=e;;){if(r.next(t),i.next(t),t=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(n+=r.value.length,r.done||n>=o)return!0}}iter(t=1){return new tn(this,t)}iterRange(t,e=this.length){return new en(this,t,e)}iterLines(t,e){let o;if(null==t)o=this.iter();else{null==e&&(e=this.lines+1);let r=this.line(t).from;o=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new on(o)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new Fi(t):Hi.from(Fi.split(t,[])):Ni.empty}}class Fi extends Ni{constructor(t,e=function(t){let e=-1;for(let o of t)e+=o.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,o,r){for(let i=0;;i++){let n=this.text[i],a=r+n.length;if((e?o:a)>=t)return new rn(r,a,o,n);r=a+1,o++}}decompose(t,e,o,r){let i=t<=0&&e>=this.length?this:new Fi(Ji(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&r){let t=o.pop(),e=Ki(i.text,t.text.slice(),0,i.length);if(e.length<=32)o.push(new Fi(e,t.length+i.length));else{let t=e.length>>1;o.push(new Fi(e.slice(0,t)),new Fi(e.slice(t)))}}else o.push(i)}replace(t,e,o){if(!(o instanceof Fi))return super.replace(t,e,o);[t,e]=nn(this,t,e);let r=Ki(this.text,Ki(o.text,Ji(this.text,0,t)),e),i=this.length+o.length-(e-t);return r.length<=32?new Fi(r,i):Hi.from(Fi.split(r,[]),i)}sliceString(t,e=this.length,o="\n"){[t,e]=nn(this,t,e);let r="";for(let i=0,n=0;i<=e&&n<this.text.length;n++){let a=this.text[n],s=i+a.length;i>t&&n&&(r+=o),t<s&&e>i&&(r+=a.slice(Math.max(0,t-i),e-i)),i=s+1}return r}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let o=[],r=-1;for(let i of t)o.push(i),r+=i.length+1,32==o.length&&(e.push(new Fi(o,r)),o=[],r=-1);return r>-1&&e.push(new Fi(o,r)),e}}class Hi extends Ni{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,o,r){for(let i=0;;i++){let n=this.children[i],a=r+n.length,s=o+n.lines-1;if((e?s:a)>=t)return n.lineInner(t,e,o,r);r=a+1,o=s+1}}decompose(t,e,o,r){for(let i=0,n=0;n<=e&&i<this.children.length;i++){let a=this.children[i],s=n+a.length;if(t<=s&&e>=n){let i=r&((n<=t?1:0)|(s>=e?2:0));n>=t&&s<=e&&!i?o.push(a):a.decompose(t-n,e-n,o,i)}n=s+1}}replace(t,e,o){if([t,e]=nn(this,t,e),o.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let n=this.children[r],a=i+n.length;if(t>=i&&e<=a){let s=n.replace(t-i,e-i,o),l=this.lines-n.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let i=this.children.slice();return i[r]=s,new Hi(i,this.length-(e-t)+o.length)}return super.replace(i,a,s)}i=a+1}return super.replace(t,e,o)}sliceString(t,e=this.length,o="\n"){[t,e]=nn(this,t,e);let r="";for(let i=0,n=0;i<this.children.length&&n<=e;i++){let a=this.children[i],s=n+a.length;n>t&&i&&(r+=o),t<s&&e>n&&(r+=a.sliceString(t-n,e-n,o)),n=s+1}return r}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof Hi))return 0;let o=0,[r,i,n,a]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;r+=e,i+=e){if(r==n||i==a)return o;let s=this.children[r],l=t.children[i];if(s!=l)return o+s.scanIdentical(l,e);o+=s.length+1}}static from(t,e=t.reduce((t,e)=>t+e.length+1,-1)){let o=0;for(let e of t)o+=e.lines;if(o<32){let o=[];for(let e of t)e.flatten(o);return new Fi(o,e)}let r=Math.max(32,o>>5),i=r<<1,n=r>>1,a=[],s=0,l=-1,d=[];function c(t){let e;if(t.lines>i&&t instanceof Hi)for(let e of t.children)c(e);else t.lines>n&&(s>n||!s)?(h(),a.push(t)):t instanceof Fi&&s&&(e=d[d.length-1])instanceof Fi&&t.lines+e.lines<=32?(s+=t.lines,l+=t.length+1,d[d.length-1]=new Fi(e.text.concat(t.text),e.length+1+t.length)):(s+t.lines>r&&h(),s+=t.lines,l+=t.length+1,d.push(t))}function h(){0!=s&&(a.push(1==d.length?d[0]:Hi.from(d,l)),l=-1,s=d.length=0)}for(let e of t)c(e);return h(),1==a.length?a[0]:new Hi(a,e)}}function Ki(t,e,o=0,r=1e9){for(let i=0,n=0,a=!0;n<t.length&&i<=r;n++){let s=t[n],l=i+s.length;l>=o&&(l>r&&(s=s.slice(0,r-i)),i<o&&(s=s.slice(o-i)),a?(e[e.length-1]+=s,a=!1):e.push(s)),i=l+1}return e}function Ji(t,e,o){return Ki(t,[""],e,o)}Ni.empty=new Fi([""],0);class tn{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof Fi?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let o=this.nodes.length-1,r=this.nodes[o],i=this.offsets[o],n=i>>1,a=r instanceof Fi?r.text.length:r.children.length;if(n==(e>0?a:0)){if(0==o)return this.done=!0,this.value="",this;e>0&&this.offsets[o-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(e>0?0:1)){if(this.offsets[o]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof Fi){let i=r.text[n+(e<0?-1:0)];if(this.offsets[o]+=e,i.length>Math.max(0,t))return this.value=0==t?i:e>0?i.slice(t):i.slice(0,i.length-t),this;t-=i.length}else{let i=r.children[n+(e<0?-1:0)];t>i.length?(t-=i.length,this.offsets[o]+=e):(e<0&&this.offsets[o]--,this.nodes.push(i),this.offsets.push(e>0?1:(i instanceof Fi?i.text.length:i.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class en{constructor(t,e,o){this.value="",this.done=!1,this.cursor=new tn(t,e>o?-1:1),this.pos=e>o?t.length:0,this.from=Math.min(e,o),this.to=Math.max(e,o)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let o=e<0?this.pos-this.from:this.to-this.pos;t>o&&(t=o),o-=t;let{value:r}=this.cursor.next(t);return this.pos+=(r.length+t)*e,this.value=r.length<=o?r:e<0?r.slice(r.length-o):r.slice(0,o),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class on{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:o,value:r}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):o?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Ni.prototype[Symbol.iterator]=function(){return this.iter()},tn.prototype[Symbol.iterator]=en.prototype[Symbol.iterator]=on.prototype[Symbol.iterator]=function(){return this});class rn{constructor(t,e,o,r){this.from=t,this.to=e,this.number=o,this.text=r}get length(){return this.to-this.from}}function nn(t,e,o){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,o))]}function an(t,e,o=!0,r=!0){return Vi(t,e,o,r)}function sn(t,e){let o=t.charCodeAt(e);if(!((r=o)>=55296&&r<56320&&e+1!=t.length))return o;var r;let i=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(i)?i-56320+(o-55296<<10)+65536:o}function ln(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function dn(t){return t<65536?1:2}const cn=/\r\n?|\n/;var hn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(hn||(hn={}));class pn{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let o=this.sections[e+1];t+=o<0?this.sections[e]:o}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,o=0,r=0;e<this.sections.length;){let i=this.sections[e++],n=this.sections[e++];n<0?(t(o,r,i),r+=i):r+=n,o+=i}}iterChangedRanges(t,e=!1){bn(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let o=this.sections[e++],r=this.sections[e++];r<0?t.push(o,r):t.push(r,o)}return new pn(t)}composeDesc(t){return this.empty?t:t.empty?this:vn(this,t)}mapDesc(t,e=!1){return t.empty?this:gn(this,t,e)}mapPos(t,e=-1,o=hn.Simple){let r=0,i=0;for(let n=0;n<this.sections.length;){let a=this.sections[n++],s=this.sections[n++],l=r+a;if(s<0){if(l>t)return i+(t-r);i+=a}else{if(o!=hn.Simple&&l>=t&&(o==hn.TrackDel&&r<t&&l>t||o==hn.TrackBefore&&r<t||o==hn.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!a)return t==r||e<0?i:i+s;i+=s}r=l}if(t>r)throw new RangeError(`Position ${t} is out of range for changeset of length ${r}`);return i}touchesRange(t,e=t){for(let o=0,r=0;o<this.sections.length&&r<=e;){let i=r+this.sections[o++];if(this.sections[o++]>=0&&r<=e&&i>=t)return!(r<t&&i>e)||"cover";r=i}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let o=this.sections[e++],r=this.sections[e++];t+=(t?" ":"")+o+(r>=0?":"+r:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(t=>"number"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeDesc");return new pn(t)}static create(t){return new pn(t)}}class un extends pn{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return bn(this,(e,o,r,i,n)=>t=t.replace(r,r+(o-e),n),!1),t}mapDesc(t,e=!1){return gn(this,t,e,!0)}invert(t){let e=this.sections.slice(),o=[];for(let r=0,i=0;r<e.length;r+=2){let n=e[r],a=e[r+1];if(a>=0){e[r]=a,e[r+1]=n;let s=r>>1;for(;o.length<s;)o.push(Ni.empty);o.push(n?t.slice(i,i+n):Ni.empty)}i+=n}return new un(e,o)}compose(t){return this.empty?t:t.empty?this:vn(this,t,!0)}map(t,e=!1){return t.empty?this:gn(this,t,e,!0)}iterChanges(t,e=!1){bn(this,t,e)}get desc(){return pn.create(this.sections)}filter(t){let e=[],o=[],r=[],i=new On(this);t:for(let n=0,a=0;;){let s=n==t.length?1e9:t[n++];for(;a<s||a==s&&0==i.len;){if(i.done)break t;let t=Math.min(i.len,s-a);mn(r,t,-1);let n=-1==i.ins?-1:0==i.off?i.ins:0;mn(e,t,n),n>0&&fn(o,e,i.text),i.forward(t),a+=t}let l=t[n++];for(;a<l;){if(i.done)break t;let t=Math.min(i.len,l-a);mn(e,t,-1),mn(r,t,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(t),a+=t}}return{changes:new un(e,o),filtered:pn.create(r)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let o=this.sections[e],r=this.sections[e+1];r<0?t.push(o):0==r?t.push([o]):t.push([o].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,o){let r=[],i=[],n=0,a=null;function s(t=!1){if(!t&&!r.length)return;n<e&&mn(r,e-n,-1);let o=new un(r,i);a=a?a.compose(o.map(a)):o,r=[],i=[],n=0}return function t(l){if(Array.isArray(l))for(let e of l)t(e);else if(l instanceof un){if(l.length!=e)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${e})`);s(),a=a?a.compose(l.map(a)):l}else{let{from:t,to:a=t,insert:d}=l;if(t>a||t<0||a>e)throw new RangeError(`Invalid change range ${t} to ${a} (in doc of length ${e})`);let c=d?"string"==typeof d?Ni.of(d.split(o||cn)):d:Ni.empty,h=c.length;if(t==a&&0==h)return;t<n&&s(),t>n&&mn(r,t-n,-1),mn(r,a-t,h),fn(i,r,c),n=a}}(t),s(!a),a}static empty(t){return new un(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],o=[];for(let r=0;r<t.length;r++){let i=t[r];if("number"==typeof i)e.push(i,-1);else{if(!Array.isArray(i)||"number"!=typeof i[0]||i.some((t,e)=>e&&"string"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)e.push(i[0],0);else{for(;o.length<r;)o.push(Ni.empty);o[r]=Ni.of(i.slice(1)),e.push(i[0],o[r].length)}}}return new un(e,o)}static createSet(t,e){return new un(t,e)}}function mn(t,e,o,r=!1){if(0==e&&o<=0)return;let i=t.length-2;i>=0&&o<=0&&o==t[i+1]?t[i]+=e:i>=0&&0==e&&0==t[i]?t[i+1]+=o:r?(t[i]+=e,t[i+1]+=o):t.push(e,o)}function fn(t,e,o){if(0==o.length)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(o);else{for(;t.length<r;)t.push(Ni.empty);t.push(o)}}function bn(t,e,o){let r=t.inserted;for(let i=0,n=0,a=0;a<t.sections.length;){let s=t.sections[a++],l=t.sections[a++];if(l<0)i+=s,n+=s;else{let d=i,c=n,h=Ni.empty;for(;d+=s,c+=l,l&&r&&(h=h.append(r[a-2>>1])),!(o||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,d,n,c,h),i=d,n=c}}}function gn(t,e,o,r=!1){let i=[],n=r?[]:null,a=new On(t),s=new On(e);for(let t=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(-1==a.ins&&-1==s.ins){let t=Math.min(a.len,s.len);mn(i,t,-1),a.forward(t),s.forward(t)}else if(s.ins>=0&&(a.ins<0||t==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!o))){let e=s.len;for(mn(i,s.ins,-1);e;){let o=Math.min(a.len,e);a.ins>=0&&t<a.i&&a.len<=o&&(mn(i,0,a.ins),n&&fn(n,i,a.text),t=a.i),a.forward(o),e-=o}s.next()}else{if(!(a.ins>=0)){if(a.done&&s.done)return n?un.createSet(i,n):pn.create(i);throw new Error("Mismatched change set lengths")}{let e=0,o=a.len;for(;o;)if(-1==s.ins){let t=Math.min(o,s.len);e+=t,o-=t,s.forward(t)}else{if(!(0==s.ins&&s.len<o))break;o-=s.len,s.next()}mn(i,e,t<a.i?a.ins:0),n&&t<a.i&&fn(n,i,a.text),t=a.i,a.forward(a.len-o)}}}}function vn(t,e,o=!1){let r=[],i=o?[]:null,n=new On(t),a=new On(e);for(let t=!1;;){if(n.done&&a.done)return i?un.createSet(r,i):pn.create(r);if(0==n.ins)mn(r,n.len,0,t),n.next();else if(0!=a.len||a.done){if(n.done||a.done)throw new Error("Mismatched change set lengths");{let e=Math.min(n.len2,a.len),o=r.length;if(-1==n.ins){let o=-1==a.ins?-1:a.off?0:a.ins;mn(r,e,o,t),i&&o&&fn(i,r,a.text)}else-1==a.ins?(mn(r,n.off?0:n.len,e,t),i&&fn(i,r,n.textBit(e))):(mn(r,n.off?0:n.len,a.off?0:a.ins,t),i&&!a.off&&fn(i,r,a.text));t=(n.ins>e||a.ins>=0&&a.len>e)&&(t||r.length>o),n.forward2(e),a.forward(e)}}else mn(r,0,a.ins,t),i&&fn(i,r,a.text),a.next()}}class On{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?Ni.empty:t[e]}textBit(t){let{inserted:e}=this.set,o=this.i-2>>1;return o>=e.length&&!t?Ni.empty:e[o].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class xn{constructor(t,e,o){this.from=t,this.to=e,this.flags=o}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let o,r;return this.empty?o=r=t.mapPos(this.from,e):(o=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),o==this.from&&r==this.to?this:new xn(o,r,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return yn.range(t,e);let o=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return yn.range(this.anchor,o)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return yn.range(t.anchor,t.head)}static create(t,e,o){return new xn(t,e,o)}}class yn{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:yn.create(this.ranges.map(o=>o.map(t,e)),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let o=0;o<this.ranges.length;o++)if(!this.ranges[o].eq(t.ranges[o],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new yn([this.main],0)}addRange(t,e=!0){return yn.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let o=this.ranges.slice();return o[e]=t,yn.create(o,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new yn(t.ranges.map(t=>xn.fromJSON(t)),t.main)}static single(t,e=t){return new yn([yn.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let o=0,r=0;r<t.length;r++){let i=t[r];if(i.empty?i.from<=o:i.from<o)return yn.normalized(t.slice(),e);o=i.to}return new yn(t,e)}static cursor(t,e=0,o,r){return xn.create(t,t,(0==e?0:e<0?8:16)|(null==o?7:Math.min(6,o))|(null!=r?r:16777215)<<6)}static range(t,e,o,r){let i=(null!=o?o:16777215)<<6|(null==r?7:Math.min(6,r));return e<t?xn.create(e,t,48|i):xn.create(t,e,(e>t?8:0)|i)}static normalized(t,e=0){let o=t[e];t.sort((t,e)=>t.from-e.from),e=t.indexOf(o);for(let o=1;o<t.length;o++){let r=t[o],i=t[o-1];if(r.empty?r.from<=i.to:r.from<i.to){let n=i.from,a=Math.max(r.to,i.to);o<=e&&e--,t.splice(--o,2,r.anchor>r.head?yn.range(a,n):yn.range(n,a))}}return new yn(t,e)}}function wn(t,e){for(let o of t.ranges)if(o.to>e)throw new RangeError("Selection points outside of document")}let kn=0;class qn{constructor(t,e,o,r,i){this.combine=t,this.compareInput=e,this.compare=o,this.isStatic=r,this.id=kn++,this.default=t([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(t={}){return new qn(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:Sn),!!t.static,t.enables)}of(t){return new Qn([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qn(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qn(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],o=>e(o.field(t)))}}function Sn(t,e){return t==e||t.length==e.length&&t.every((t,o)=>t===e[o])}class Qn{constructor(t,e,o,r){this.dependencies=t,this.facet=e,this.type=o,this.value=r,this.id=kn++}dynamicSlot(t){var e;let o=this.value,r=this.facet.compareInput,i=this.id,n=t[i]>>1,a=2==this.type,s=!1,l=!1,d=[];for(let o of this.dependencies)"doc"==o?s=!0:"selection"==o?l=!0:1&(null!==(e=t[o.id])&&void 0!==e?e:1)||d.push(t[o.id]);return{create:t=>(t.values[n]=o(t),1),update(t,e){if(s&&e.docChanged||l&&(e.docChanged||e.selection)||Pn(t,d)){let e=o(t);if(a?!$n(e,t.values[n],r):!r(e,t.values[n]))return t.values[n]=e,1}return 0},reconfigure:(t,e)=>{let s,l=e.config.address[i];if(null!=l){let i=jn(e,l);if(this.dependencies.every(o=>o instanceof qn?e.facet(o)===t.facet(o):!(o instanceof An)||e.field(o,!1)==t.field(o,!1))||(a?$n(s=o(t),i,r):r(s=o(t),i)))return t.values[n]=i,0}else s=o(t);return t.values[n]=s,1}}}}function $n(t,e,o){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!o(t[r],e[r]))return!1;return!0}function Pn(t,e){let o=!1;for(let r of e)1&_n(t,r)&&(o=!0);return o}function Cn(t,e,o){let r=o.map(e=>t[e.id]),i=o.map(t=>t.type),n=r.filter(t=>!(1&t)),a=t[e.id]>>1;function s(t){let o=[];for(let e=0;e<r.length;e++){let n=jn(t,r[e]);if(2==i[e])for(let t of n)o.push(t);else o.push(n)}return e.combine(o)}return{create(t){for(let e of r)_n(t,e);return t.values[a]=s(t),1},update(t,o){if(!Pn(t,n))return 0;let r=s(t);return e.compare(r,t.values[a])?0:(t.values[a]=r,1)},reconfigure(t,i){let n=Pn(t,r),l=i.config.facets[e.id],d=i.facet(e);if(l&&!n&&Sn(o,l))return t.values[a]=d,0;let c=s(t);return e.compare(c,d)?(t.values[a]=d,0):(t.values[a]=c,1)}}}const Tn=qn.define({static:!0});class An{constructor(t,e,o,r,i){this.id=t,this.createF=e,this.updateF=o,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let e=new An(kn++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(Tn).find(t=>t.field==this);return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,o)=>{let r=t.values[e],i=this.updateF(r,o);return this.compareF(r,i)?0:(t.values[e]=i,1)},reconfigure:(t,o)=>{let r,i=t.facet(Tn),n=o.facet(Tn);return(r=i.find(t=>t.field==this))&&r!=n.find(t=>t.field==this)?(t.values[e]=r.create(t),1):null!=o.config.address[this.id]?(t.values[e]=o.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,Tn.of({field:this,create:t})]}get extension(){return this}}function Rn(t){return e=>new Mn(e,t)}const zn={highest:Rn(0),high:Rn(1),default:Rn(2),low:Rn(3),lowest:Rn(4)};class Mn{constructor(t,e){this.inner=t,this.prec=e}}class En{of(t){return new Zn(this,t)}reconfigure(t){return En.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Zn{constructor(t,e){this.compartment=t,this.inner=e}}class Xn{constructor(t,e,o,r,i,n){for(this.base=t,this.compartments=e,this.dynamicSlots=o,this.address=r,this.staticValues=i,this.facets=n,this.statusTemplate=[];this.statusTemplate.length<o.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,o){let r=[],i=Object.create(null),n=new Map;for(let o of function(t,e,o){let r=[[],[],[],[],[]],i=new Map;return function t(n,a){let s=i.get(n);if(null!=s){if(s<=a)return;let t=r[s].indexOf(n);t>-1&&r[s].splice(t,1),n instanceof Zn&&o.delete(n.compartment)}if(i.set(n,a),Array.isArray(n))for(let e of n)t(e,a);else if(n instanceof Zn){if(o.has(n.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=e.get(n.compartment)||n.inner;o.set(n.compartment,r),t(r,a)}else if(n instanceof Mn)t(n.inner,n.prec);else if(n instanceof An)r[a].push(n),n.provides&&t(n.provides,a);else if(n instanceof Qn)r[a].push(n),n.facet.extensions&&t(n.facet.extensions,2);else{let e=n.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,a)}}(t,2),r.reduce((t,e)=>t.concat(e))}(t,e,n))o instanceof An?r.push(o):(i[o.facet.id]||(i[o.facet.id]=[])).push(o);let a=Object.create(null),s=[],l=[];for(let t of r)a[t.id]=l.length<<1,l.push(e=>t.slot(e));let d=null==o?void 0:o.config.facets;for(let t in i){let e=i[t],r=e[0].facet,n=d&&d[t]||[];if(e.every(t=>0==t.type))if(a[r.id]=s.length<<1|1,Sn(n,e))s.push(o.facet(r));else{let t=r.combine(e.map(t=>t.value));s.push(o&&r.compare(t,o.facet(r))?o.facet(r):t)}else{for(let t of e)0==t.type?(a[t.id]=s.length<<1|1,s.push(t.value)):(a[t.id]=l.length<<1,l.push(e=>t.dynamicSlot(e)));a[r.id]=l.length<<1,l.push(t=>Cn(t,r,e))}}let c=l.map(t=>t(a));return new Xn(t,n,c,a,s,i)}}function _n(t,e){if(1&e)return 2;let o=e>>1,r=t.status[o];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[o]=4;let i=t.computeSlot(t,t.config.dynamicSlots[o]);return t.status[o]=2|i}function jn(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const Dn=qn.define(),Yn=qn.define({combine:t=>t.some(t=>t),static:!0}),Vn=qn.define({combine:t=>t.length?t[0]:void 0,static:!0}),Ln=qn.define(),Un=qn.define(),Bn=qn.define(),Wn=qn.define({combine:t=>!!t.length&&t[0]});class In{constructor(t,e){this.type=t,this.value=e}static define(){return new Gn}}class Gn{of(t){return new In(this,t)}}class Nn{constructor(t){this.map=t}of(t){return new Fn(this,t)}}class Fn{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new Fn(this.type,e)}is(t){return this.type==t}static define(t={}){return new Nn(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let o=[];for(let r of t){let t=r.map(e);t&&o.push(t)}return o}}Fn.reconfigure=Fn.define(),Fn.appendConfig=Fn.define();class Hn{constructor(t,e,o,r,i,n){this.startState=t,this.changes=e,this.selection=o,this.effects=r,this.annotations=i,this.scrollIntoView=n,this._doc=null,this._state=null,o&&wn(o,e.newLength),i.some(t=>t.type==Hn.time)||(this.annotations=i.concat(Hn.time.of(Date.now())))}static create(t,e,o,r,i,n){return new Hn(t,e,o,r,i,n)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(Hn.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function Kn(t,e){let o=[];for(let r=0,i=0;;){let n,a;if(r<t.length&&(i==e.length||e[i]>=t[r]))n=t[r++],a=t[r++];else{if(!(i<e.length))return o;n=e[i++],a=e[i++]}!o.length||o[o.length-1]<n?o.push(n,a):o[o.length-1]<a&&(o[o.length-1]=a)}}function Jn(t,e,o){var r;let i,n,a;return o?(i=e.changes,n=un.empty(e.changes.length),a=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),n=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(i)),{changes:a,selection:e.selection?e.selection.map(n):null===(r=t.selection)||void 0===r?void 0:r.map(i),effects:Fn.mapEffects(t.effects,i).concat(Fn.mapEffects(e.effects,n)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function ta(t,e,o){let r=e.selection,i=ra(e.annotations);return e.userEvent&&(i=i.concat(Hn.userEvent.of(e.userEvent))),{changes:e.changes instanceof un?e.changes:un.of(e.changes||[],o,t.facet(Vn)),selection:r&&(r instanceof yn?r:yn.single(r.anchor,r.head)),effects:ra(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function ea(t,e,o){let r=ta(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(o=!1);for(let i=1;i<e.length;i++){!1===e[i].filter&&(o=!1);let n=!!e[i].sequential;r=Jn(r,ta(t,e[i],n?r.changes.newLength:t.doc.length),n)}let i=Hn.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(t){let e=t.startState,o=e.facet(Bn),r=t;for(let i=o.length-1;i>=0;i--){let n=o[i](t);n&&Object.keys(n).length&&(r=Jn(r,ta(e,n,t.changes.newLength),!0))}return r==t?t:Hn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(o?function(t){let e=t.startState,o=!0;for(let r of e.facet(Ln)){let e=r(t);if(!1===e){o=!1;break}Array.isArray(e)&&(o=!0===o?e:Kn(o,e))}if(!0!==o){let r,i;if(!1===o)i=t.changes.invertedDesc,r=un.empty(e.doc.length);else{let e=t.changes.filter(o);r=e.changes,i=e.filtered.mapDesc(e.changes).invertedDesc}t=Hn.create(e,r,t.selection&&t.selection.map(i),Fn.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let r=e.facet(Un);for(let o=r.length-1;o>=0;o--){let i=r[o](t);t=i instanceof Hn?i:Array.isArray(i)&&1==i.length&&i[0]instanceof Hn?i[0]:ea(e,ra(i),!1)}return t}(i):i)}Hn.time=In.define(),Hn.userEvent=In.define(),Hn.addToHistory=In.define(),Hn.remote=In.define();const oa=[];function ra(t){return null==t?oa:Array.isArray(t)?t:[t]}var ia=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(ia||(ia={}));const na=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let aa;try{aa=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(At){}class sa{constructor(t,e,o,r,i,n){this.config=t,this.doc=e,this.selection=o,this.values=r,this.status=t.statusTemplate.slice(),this.computeSlot=i,n&&(n._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)_n(this,t<<1);this.computeSlot=null}field(t,e=!0){let o=this.config.address[t.id];if(null!=o)return _n(this,o),jn(this,o);if(e)throw new RangeError("Field is not present in this state")}update(...t){return ea(this,t,!0)}applyTransaction(t){let e,o=this.config,{base:r,compartments:i}=o;for(let e of t.effects)e.is(En.reconfigure)?(o&&(i=new Map,o.compartments.forEach((t,e)=>i.set(e,t)),o=null),i.set(e.value.compartment,e.value.extension)):e.is(Fn.reconfigure)?(o=null,r=e.value):e.is(Fn.appendConfig)&&(o=null,r=ra(r).concat(e.value));o?e=t.startState.values.slice():(o=Xn.resolve(r,i,this),e=new sa(o,this.doc,this.selection,o.dynamicSlots.map(()=>null),(t,e)=>e.reconfigure(t,this),null).values);let n=t.startState.facet(Yn)?t.newSelection:t.newSelection.asSingle();new sa(o,t.newDoc,n,e,(e,o)=>o.update(e,t),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:yn.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,o=t(e.ranges[0]),r=this.changes(o.changes),i=[o.range],n=ra(o.effects);for(let o=1;o<e.ranges.length;o++){let a=t(e.ranges[o]),s=this.changes(a.changes),l=s.map(r);for(let t=0;t<o;t++)i[t]=i[t].map(l);let d=r.mapDesc(s,!0);i.push(a.range.map(d)),r=r.compose(l),n=Fn.mapEffects(n,l).concat(Fn.mapEffects(ra(a.effects),d))}return{changes:r,selection:yn.create(i,e.mainIndex),effects:n}}changes(t=[]){return t instanceof un?t:un.of(t,this.doc.length,this.facet(sa.lineSeparator))}toText(t){return Ni.of(t.split(this.facet(sa.lineSeparator)||cn))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(_n(this,e),jn(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let o in t){let r=t[o];r instanceof An&&null!=this.config.address[r.id]&&(e[o]=r.spec.toJSON(this.field(t[o]),this))}return e}static fromJSON(t,e={},o){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(o)for(let e in o)if(Object.prototype.hasOwnProperty.call(t,e)){let i=o[e],n=t[e];r.push(i.init(t=>i.spec.fromJSON(n,t)))}return sa.create({doc:t.doc,selection:yn.fromJSON(t.selection),extensions:e.extensions?r.concat([e.extensions]):r})}static create(t={}){let e=Xn.resolve(t.extensions||[],new Map),o=t.doc instanceof Ni?t.doc:Ni.of((t.doc||"").split(e.staticFacet(sa.lineSeparator)||cn)),r=t.selection?t.selection instanceof yn?t.selection:yn.single(t.selection.anchor,t.selection.head):yn.single(0);return wn(r,o.length),e.staticFacet(Yn)||(r=r.asSingle()),new sa(e,o,r,e.dynamicSlots.map(()=>null),(t,e)=>e.create(t),null)}get tabSize(){return this.facet(sa.tabSize)}get lineBreak(){return this.facet(sa.lineSeparator)||"\n"}get readOnly(){return this.facet(Wn)}phrase(t,...e){for(let e of this.facet(sa.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,(t,o)=>{if("$"==o)return"$";let r=+(o||1);return!r||r>e.length?t:e[r-1]})),t}languageDataAt(t,e,o=-1){let r=[];for(let i of this.facet(Dn))for(let n of i(this,e,o))Object.prototype.hasOwnProperty.call(n,t)&&r.push(n[t]);return r}charCategorizer(t){return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return ia.Space;if(function(t){if(aa)return aa.test(t);for(let e=0;e<t.length;e++){let o=t[e];if(/\w/.test(o)||o>""&&(o.toUpperCase()!=o.toLowerCase()||na.test(o)))return!0}return!1}(t))return ia.Word;for(let o=0;o<e.length;o++)if(t.indexOf(e[o])>-1)return ia.Word;return ia.Other};var e}wordAt(t){let{text:e,from:o,length:r}=this.doc.lineAt(t),i=this.charCategorizer(t),n=t-o,a=t-o;for(;n>0;){let t=an(e,n,!1);if(i(e.slice(t,n))!=ia.Word)break;n=t}for(;a<r;){let t=an(e,a);if(i(e.slice(a,t))!=ia.Word)break;a=t}return n==a?null:yn.range(n+o,a+o)}}function la(t,e,o={}){let r={};for(let e of t)for(let t of Object.keys(e)){let i=e[t],n=r[t];if(void 0===n)r[t]=i;else if(n===i||void 0===i);else{if(!Object.hasOwnProperty.call(o,t))throw new Error("Config merge conflict for field "+t);r[t]=o[t](n,i)}}for(let t in e)void 0===r[t]&&(r[t]=e[t]);return r}sa.allowMultipleSelections=Yn,sa.tabSize=qn.define({combine:t=>t.length?t[0]:4}),sa.lineSeparator=Vn,sa.readOnly=Wn,sa.phrases=qn.define({compare(t,e){let o=Object.keys(t),r=Object.keys(e);return o.length==r.length&&o.every(o=>t[o]==e[o])}}),sa.languageData=Dn,sa.changeFilter=Ln,sa.transactionFilter=Un,sa.transactionExtender=Bn,En.reconfigure=Fn.define();class da{eq(t){return this==t}range(t,e=t){return ca.create(t,e,this)}}da.prototype.startSide=da.prototype.endSide=0,da.prototype.point=!1,da.prototype.mapMode=hn.TrackDel;class ca{constructor(t,e,o){this.from=t,this.to=e,this.value=o}static create(t,e,o){return new ca(t,e,o)}}function ha(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class pa{constructor(t,e,o,r){this.from=t,this.to=e,this.value=o,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(t,e,o,r=0){let i=o?this.to:this.from;for(let n=r,a=i.length;;){if(n==a)return n;let r=n+a>>1,s=i[r]-t||(o?this.value[r].endSide:this.value[r].startSide)-e;if(r==n)return s>=0?n:a;s>=0?a=r:n=r+1}}between(t,e,o,r){for(let i=this.findIndex(e,-1e9,!0),n=this.findIndex(o,1e9,!1,i);i<n;i++)if(!1===r(this.from[i]+t,this.to[i]+t,this.value[i]))return!1}map(t,e){let o=[],r=[],i=[],n=-1,a=-1;for(let s=0;s<this.value.length;s++){let l,d,c=this.value[s],h=this.from[s]+t,p=this.to[s]+t;if(h==p){let t=e.mapPos(h,c.startSide,c.mapMode);if(null==t)continue;if(l=d=t,c.startSide!=c.endSide&&(d=e.mapPos(h,c.endSide),d<l))continue}else if(l=e.mapPos(h,c.startSide),d=e.mapPos(p,c.endSide),l>d||l==d&&c.startSide>0&&c.endSide<=0)continue;(d-l||c.endSide-c.startSide)<0||(n<0&&(n=l),c.point&&(a=Math.max(a,d-l)),o.push(c),r.push(l-n),i.push(d-n))}return{mapped:o.length?new pa(r,i,o,a):null,pos:n}}}class ua{constructor(t,e,o,r){this.chunkPos=t,this.chunk=e,this.nextLayer=o,this.maxPoint=r}static create(t,e,o,r){return new ua(t,e,o,r)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:o=!1,filterFrom:r=0,filterTo:i=this.length}=t,n=t.filter;if(0==e.length&&!n)return this;if(o&&(e=e.slice().sort(ha)),this.isEmpty)return e.length?ua.of(e):this;let a=new ba(this,null,-1).goto(0),s=0,l=[],d=new ma;for(;a.value||s<e.length;)if(s<e.length&&(a.from-e[s].from||a.startSide-e[s].value.startSide)>=0){let t=e[s++];d.addInner(t.from,t.to,t.value)||l.push(t)}else 1==a.rangeIndex&&a.chunkIndex<this.chunk.length&&(s==e.length||this.chunkEnd(a.chunkIndex)<e[s].from)&&(!n||r>this.chunkEnd(a.chunkIndex)||i<this.chunkPos[a.chunkIndex])&&d.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!n||r>a.to||i<a.from||n(a.from,a.to,a.value))&&(d.addInner(a.from,a.to,a.value)||l.push(ca.create(a.from,a.to,a.value))),a.next());return d.finishInner(this.nextLayer.isEmpty&&!l.length?ua.empty:this.nextLayer.update({add:l,filter:n,filterFrom:r,filterTo:i}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],o=[],r=-1;for(let i=0;i<this.chunk.length;i++){let n=this.chunkPos[i],a=this.chunk[i],s=t.touchesRange(n,n+a.length);if(!1===s)r=Math.max(r,a.maxPoint),e.push(a),o.push(t.mapPos(n));else if(!0===s){let{mapped:i,pos:s}=a.map(n,t);i&&(r=Math.max(r,i.maxPoint),e.push(i),o.push(s))}}let i=this.nextLayer.map(t);return 0==e.length?i:new ua(o,e,i||ua.empty,r)}between(t,e,o){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],n=this.chunk[r];if(e>=i&&t<=i+n.length&&!1===n.between(i,t-i,e-i,o))return}this.nextLayer.between(t,e,o)}}iter(t=0){return ga.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return ga.from(t).goto(e)}static compare(t,e,o,r,i=-1){let n=t.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i),a=e.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i),s=fa(n,a,o),l=new Oa(n,s,i),d=new Oa(a,s,i);o.iterGaps((t,e,o)=>xa(l,t,d,e,o,r)),o.empty&&0==o.length&&xa(l,0,d,0,0,r)}static eq(t,e,o=0,r){null==r&&(r=999999999);let i=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0),n=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0);if(i.length!=n.length)return!1;if(!i.length)return!0;let a=fa(i,n),s=new Oa(i,a,0).goto(o),l=new Oa(n,a,0).goto(o);for(;;){if(s.to!=l.to||!ya(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>r)return!0;s.next(),l.next()}}static spans(t,e,o,r,i=-1){let n=new Oa(t,null,i).goto(e),a=e,s=n.openStart;for(;;){let t=Math.min(n.to,o);if(n.point){let o=n.activeForPoint(n.to),i=n.pointFrom<e?o.length+1:n.point.startSide<0?o.length:Math.min(o.length,s);r.point(a,t,n.point,o,i,n.pointRank),s=Math.min(n.openEnd(t),o.length)}else t>a&&(r.span(a,t,n.active,s),s=n.openEnd(t));if(n.to>o)return s+(n.point&&n.to>o?1:0);a=n.to,n.next()}}static of(t,e=!1){let o=new ma;for(let r of t instanceof ca?[t]:e?function(t){if(t.length>1)for(let e=t[0],o=1;o<t.length;o++){let r=t[o];if(ha(e,r)>0)return t.slice().sort(ha);e=r}return t}(t):t)o.add(r.from,r.to,r.value);return o.finish()}static join(t){if(!t.length)return ua.empty;let e=t[t.length-1];for(let o=t.length-2;o>=0;o--)for(let r=t[o];r!=ua.empty;r=r.nextLayer)e=new ua(r.chunkPos,r.chunk,e,Math.max(r.maxPoint,e.maxPoint));return e}}ua.empty=new ua([],[],null,-1),ua.empty.nextLayer=ua.empty;class ma{finishChunk(t){this.chunks.push(new pa(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,o){this.addInner(t,e,o)||(this.nextLayer||(this.nextLayer=new ma)).add(t,e,o)}addInner(t,e,o){let r=t-this.lastTo||o.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||o.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=o,this.lastFrom=t,this.lastTo=e,this.value.push(o),o.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let o=e.value.length-1;return this.last=e.value[o],this.lastFrom=e.from[o]+t,this.lastTo=e.to[o]+t,!0}finish(){return this.finishInner(ua.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=ua.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function fa(t,e,o){let r=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&r.set(e.chunk[t],e.chunkPos[t]);let i=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let n=r.get(t.chunk[e]);null==n||(o?o.mapPos(n):n)!=t.chunkPos[e]||(null==o?void 0:o.touchesRange(n,n+t.chunk[e].length))||i.add(t.chunk[e])}return i}class ba{constructor(t,e,o,r=0){this.layer=t,this.skip=e,this.minPoint=o,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,o){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,o=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!o||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],o=t+e.from[this.rangeIndex];if(this.from=o,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class ga{constructor(t){this.heap=t}static from(t,e=null,o=-1){let r=[];for(let i=0;i<t.length;i++)for(let n=t[i];!n.isEmpty;n=n.nextLayer)n.maxPoint>=o&&r.push(new ba(n,e,o,i));return 1==r.length?r[0]:new ga(r)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let o of this.heap)o.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)va(this.heap,t);return this.next(),this}forward(t,e){for(let o of this.heap)o.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)va(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),va(this.heap,0)}}}function va(t,e){for(let o=t[e];;){let r=1+(e<<1);if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),o.compare(i)<0)break;t[r]=o,t[e]=i,e=r}}class Oa{constructor(t,e,o){this.minPoint=o,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ga.from(t,e,o)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){wa(this.active,t),wa(this.activeTo,t),wa(this.activeRank,t),this.minActive=qa(this.active,this.activeTo)}addActive(t){let e=0,{value:o,to:r,rank:i}=this.cursor;for(;e<this.activeRank.length&&(i-this.activeRank[e]||r-this.activeTo[e])>0;)e++;ka(this.active,e,o),ka(this.activeTo,e,r),ka(this.activeRank,e,i),t&&ka(t,e,this.cursor.from),this.minActive=qa(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let o=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),o&&wa(o,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(o),this.cursor.next()}}}if(o){this.openStart=0;for(let e=o.length-1;e>=0&&o[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let o=this.active.length-1;o>=0&&!(this.activeRank[o]<this.pointRank);o--)(this.activeTo[o]>t||this.activeTo[o]==t&&this.active[o].endSide>=this.point.endSide)&&e.push(this.active[o]);return e.reverse()}openEnd(t){let e=0;for(let o=this.activeTo.length-1;o>=0&&this.activeTo[o]>t;o--)e++;return e}}function xa(t,e,o,r,i,n){t.goto(e),o.goto(r);let a=r+i,s=r,l=r-e;for(;;){let e=t.to+l-o.to,r=e||t.endSide-o.endSide,i=r<0?t.to+l:o.to,d=Math.min(i,a);if(t.point||o.point?t.point&&o.point&&(t.point==o.point||t.point.eq(o.point))&&ya(t.activeForPoint(t.to),o.activeForPoint(o.to))||n.comparePoint(s,d,t.point,o.point):d>s&&!ya(t.active,o.active)&&n.compareRange(s,d,t.active,o.active),i>a)break;(e||t.openEnd!=o.openEnd)&&n.boundChange&&n.boundChange(i),s=i,r<=0&&t.next(),r>=0&&o.next()}}function ya(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!=e[o]&&!t[o].eq(e[o]))return!1;return!0}function wa(t,e){for(let o=e,r=t.length-1;o<r;o++)t[o]=t[o+1];t.pop()}function ka(t,e,o){for(let o=t.length-1;o>=e;o--)t[o+1]=t[o];t[e]=o}function qa(t,e){let o=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[o].endSide)<0&&(o=i,r=e[i]);return o}function Sa(t,e,o=t.length){let r=0;for(let i=0;i<o&&i<t.length;)9==t.charCodeAt(i)?(r+=e-r%e,i++):(r++,i=an(t,i));return r}function Qa(t,e,o,r){for(let r=0,i=0;;){if(i>=e)return r;if(r==t.length)break;i+=9==t.charCodeAt(r)?o-i%o:1,r=an(t,r)}return!0===r?-1:t.length}const $a="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Pa="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Ca="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Ta{constructor(t,e){this.rules=[];let{finish:o}=e||{};function r(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function i(t,e,n,a){let s=[],l=/^@(\w+)\b/.exec(t[0]),d=l&&"keyframes"==l[1];if(l&&null==e)return n.push(t[0]+";");for(let o in e){let a=e[o];if(/&/.test(o))i(o.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((t,e)=>t.concat(e)),a,n);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+o+") should be a primitive value.");i(r(o),a,s,d)}else null!=a&&s.push(o.replace(/_.*/,"").replace(/[A-Z]/g,t=>"-"+t.toLowerCase())+": "+a+";")}(s.length||d)&&n.push((!o||l||a?t:t.map(o)).join(", ")+" {"+s.join(" ")+"}")}for(let e in t)i(r(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=Ca[$a]||1;return Ca[$a]=t+1,"ͼ"+t.toString(36)}static mount(t,e,o){let r=t[Pa],i=o&&o.nonce;r?i&&r.setNonce(i):r=new Ra(t,i),r.mount(Array.isArray(e)?e:[e],t)}}let Aa=new Map;class Ra{constructor(t,e){let o=t.ownerDocument||t,r=o.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let e=Aa.get(o);if(e)return t[Pa]=e;this.sheet=new r.CSSStyleSheet,Aa.set(o,this)}else this.styleTag=o.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[Pa]=this}mount(t,e){let o=this.sheet,r=0,i=0;for(let e=0;e<t.length;e++){let n=t[e],a=this.modules.indexOf(n);if(a<i&&a>-1&&(this.modules.splice(a,1),i--,a=-1),-1==a){if(this.modules.splice(i++,0,n),o)for(let t=0;t<n.rules.length;t++)o.insertRule(n.rules[t],r++)}else{for(;i<a;)r+=this.modules[i++].rules.length;r+=n.rules.length,i++}}if(o)e.adoptedStyleSheets.indexOf(this.sheet)<0&&(e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets]);else{let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t;let o=e.head||e;this.styleTag.parentNode!=o&&o.insertBefore(this.styleTag,o.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}for(var za={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:"'"},Ma={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ea="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Za="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Xa=0;Xa<10;Xa++)za[48+Xa]=za[96+Xa]=String(Xa);for(Xa=1;Xa<=24;Xa++)za[Xa+111]="F"+Xa;for(Xa=65;Xa<=90;Xa++)za[Xa]=String.fromCharCode(Xa+32),Ma[Xa]=String.fromCharCode(Xa);for(var _a in za)Ma.hasOwnProperty(_a)||(Ma[_a]=za[_a]);let ja="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Da="undefined"!=typeof document?document:{documentElement:{style:{}}};const Ya=/Edge\/(\d+)/.exec(ja.userAgent),Va=/MSIE \d/.test(ja.userAgent),La=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ja.userAgent),Ua=!!(Va||La||Ya),Ba=!Ua&&/gecko\/(\d+)/i.test(ja.userAgent),Wa=!Ua&&/Chrome\/(\d+)/.exec(ja.userAgent),Ia="webkitFontSmoothing"in Da.documentElement.style,Ga=!Ua&&/Apple Computer/.test(ja.vendor),Na=Ga&&(/Mobile\/\w+/.test(ja.userAgent)||ja.maxTouchPoints>2);var Fa={mac:Na||/Mac/.test(ja.platform),windows:/Win/.test(ja.platform),linux:/Linux|X11/.test(ja.platform),ie:Ua,ie_version:Va?Da.documentMode||6:La?+La[1]:Ya?+Ya[1]:0,gecko:Ba,gecko_version:Ba?+(/Firefox\/(\d+)/.exec(ja.userAgent)||[0,0])[1]:0,chrome:!!Wa,chrome_version:Wa?+Wa[1]:0,ios:Na,android:/Android\b/.test(ja.userAgent),webkit:Ia,webkit_version:Ia?+(/\bAppleWebKit\/(\d+)/.exec(ja.userAgent)||[0,0])[1]:0,safari:Ga,safari_version:Ga?+(/\bVersion\/(\d+(\.\d+)?)/.exec(ja.userAgent)||[0,0])[1]:0,tabSize:null!=Da.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function Ha(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function Ka(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function Ja(t,e){if(!e.anchorNode)return!1;try{return Ka(t,e.anchorNode)}catch(t){return!1}}function ts(t){return 3==t.nodeType?us(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function es(t,e,o,r){return!!o&&(is(t,e,o,r,-1)||is(t,e,o,r,1))}function os(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function rs(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function is(t,e,o,r,i){for(;;){if(t==o&&e==r)return!0;if(e==(i<0?0:ns(t))){if("DIV"==t.nodeName)return!1;let o=t.parentNode;if(!o||1!=o.nodeType)return!1;e=os(t)+(i<0?0:1),t=o}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(i<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=i<0?ns(t):0}}}function ns(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function as(t,e){let o=e?t.left:t.right;return{left:o,right:o,top:t.top,bottom:t.bottom}}function ss(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function ls(t,e){let o=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(o>.995&&o<1.005||!isFinite(o)||Math.abs(e.width-t.offsetWidth)<1)&&(o=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:o,scaleY:r}}class ds{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:o}=t;this.set(e,Math.min(t.anchorOffset,e?ns(e):0),o,Math.min(t.focusOffset,o?ns(o):0))}set(t,e,o,r){this.anchorNode=t,this.anchorOffset=e,this.focusNode=o,this.focusOffset=r}}let cs,hs=null;function ps(t){if(t.setActive)return t.setActive();if(hs)return t.focus(hs);let e=[];for(let o=t;o&&(e.push(o,o.scrollTop,o.scrollLeft),o!=o.ownerDocument);o=o.parentNode);if(t.focus(null==hs?{get preventScroll(){return hs={preventScroll:!0},!0}}:void 0),!hs){hs=!1;for(let t=0;t<e.length;){let o=e[t++],r=e[t++],i=e[t++];o.scrollTop!=r&&(o.scrollTop=r),o.scrollLeft!=i&&(o.scrollLeft=i)}}}function us(t,e,o=e){let r=cs||(cs=document.createRange());return r.setEnd(t,o),r.setStart(t,e),r}function ms(t,e,o,r){let i={key:e,code:e,keyCode:o,which:o,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let n=new KeyboardEvent("keydown",i);n.synthetic=!0,t.dispatchEvent(n);let a=new KeyboardEvent("keyup",i);return a.synthetic=!0,t.dispatchEvent(a),n.defaultPrevented||a.defaultPrevented}function fs(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function bs(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function gs(t,e){for(let o=t,r=e;;){if(3==o.nodeType&&r>0)return{node:o,offset:r};if(1==o.nodeType&&r>0){if("false"==o.contentEditable)return null;o=o.childNodes[r-1],r=ns(o)}else{if(!o.parentNode||rs(o))return null;r=os(o),o=o.parentNode}}}function vs(t,e){for(let o=t,r=e;;){if(3==o.nodeType&&r<o.nodeValue.length)return{node:o,offset:r};if(1==o.nodeType&&r<o.childNodes.length){if("false"==o.contentEditable)return null;o=o.childNodes[r],r=0}else{if(!o.parentNode||rs(o))return null;r=os(o)+1,o=o.parentNode}}}Fa.safari&&Fa.safari_version>=26&&(hs=!1);class Os{constructor(t,e,o=!0){this.node=t,this.offset=e,this.precise=o}static before(t,e){return new Os(t.parentNode,os(t),e)}static after(t,e){return new Os(t.parentNode,os(t)+1,e)}}const xs=[];class ys{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let o of this.children){if(o==t)return e;e+=o.length+o.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let o,r=this.dom,i=null;for(let n of this.children){if(7&n.flags){if(!n.dom&&(o=i?i.nextSibling:r.firstChild)){let t=ys.get(o);(!t||!t.parent&&t.canReuseDOM(n))&&n.reuseDOM(o)}n.sync(t,e),n.flags&=-8}if(o=i?i.nextSibling:r.firstChild,e&&!e.written&&e.node==r&&o!=n.dom&&(e.written=!0),n.dom.parentNode==r)for(;o&&o!=n.dom;)o=ws(o);else r.insertBefore(n.dom,o);i=n.dom}for(o=i?i.nextSibling:r.firstChild,o&&e&&e.node==r&&(e.written=!0);o;)o=ws(o)}else if(1&this.flags)for(let o of this.children)7&o.flags&&(o.sync(t,e),o.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,e){let o;if(t==this.dom)o=this.dom.childNodes[e];else{let r=0==ns(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==r&&e.firstChild!=e.lastChild&&(r=t==e.firstChild?-1:1),t=e}o=r<0?t:t.nextSibling}if(o==this.dom.firstChild)return 0;for(;o&&!ys.get(o);)o=o.nextSibling;if(!o)return this.length;for(let t=0,e=0;;t++){let r=this.children[t];if(r.dom==o)return e;e+=r.length+r.breakAfter}}domBoundsAround(t,e,o=0){let r=-1,i=-1,n=-1,a=-1;for(let s=0,l=o,d=o;s<this.children.length;s++){let o=this.children[s],c=l+o.length;if(l<t&&c>e)return o.domBoundsAround(t,e,l);if(c>=t&&-1==r&&(r=s,i=l),l>e&&o.dom.parentNode==this.dom){n=s,a=d;break}d=c,l=c+o.breakAfter}return{from:i,to:a<0?o+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:n<this.children.length&&n>=0?this.children[n].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,o=xs){this.markDirty();for(let r=t;r<e;r++){let t=this.children[r];t.parent==this&&o.indexOf(t)<0&&t.destroy()}o.length<250?this.children.splice(t,e-t,...o):this.children=[].concat(this.children.slice(0,t),o,this.children.slice(e));for(let t=0;t<o.length;t++)o[t].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new ks(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,e,o,r,i,n){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!(8&(this.flags|t.flags))}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}function ws(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}ys.prototype.breakAfter=0;class ks{constructor(t,e,o){this.children=t,this.pos=e,this.i=o,this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let o=this.children[--this.i];this.pos-=o.length+o.breakAfter}}}function qs(t,e,o,r,i,n,a,s,l){let{children:d}=t,c=d.length?d[e]:null,h=n.length?n[n.length-1]:null,p=h?h.breakAfter:a;if(!(e==r&&c&&!a&&!p&&n.length<2&&c.merge(o,i,n.length?h:null,0==o,s,l))){if(r<d.length){let t=d[r];t&&(i<t.length||t.breakAfter&&(null==h?void 0:h.breakAfter))?(e==r&&(t=t.split(i),i=0),!p&&h&&t.merge(0,i,h,!0,0,l)?n[n.length-1]=t:((i||t.children.length&&!t.children[0].length)&&t.merge(0,i,null,!1,0,l),n.push(t))):(null==t?void 0:t.breakAfter)&&(h?h.breakAfter=1:a=1),r++}for(c&&(c.breakAfter=a,o>0&&(!a&&n.length&&c.merge(o,c.length,n[0],!1,s,0)?c.breakAfter=n.shift().breakAfter:(o<c.length||c.children.length&&0==c.children[c.children.length-1].length)&&c.merge(o,c.length,null,!1,s,0),e++));e<r&&n.length;)if(d[r-1].become(n[n.length-1]))r--,n.pop(),l=n.length?0:s;else{if(!d[e].become(n[0]))break;e++,n.shift(),s=n.length?0:l}!n.length&&e&&r<d.length&&!d[e-1].breakAfter&&d[r].merge(0,0,d[e-1],!1,s,l)&&e--,(e<r||n.length)&&t.replaceChildren(e,r,n)}}function Ss(t,e,o,r,i,n){let a=t.childCursor(),{i:s,off:l}=a.findPos(o,1),{i:d,off:c}=a.findPos(e,-1),h=e-o;for(let t of r)h+=t.length;t.length+=h,qs(t,d,c,s,l,r,0,i,n)}class Qs extends ys{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,o){return!(8&this.flags||o&&(!(o instanceof Qs)||this.length-(e-t)+o.length>256||8&o.flags)||(this.text=this.text.slice(0,t)+(o?o.text:"")+this.text.slice(e),this.markDirty(),0))}split(t){let e=new Qs(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new Os(this.dom,t)}domBoundsAround(t,e,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,o){let r=t.nodeValue.length;e>r&&(e=r);let i=e,n=e,a=0;0==e&&o<0||e==r&&o>=0?Fa.chrome||Fa.gecko||(e?(i--,a=1):n<r&&(n++,a=-1)):o<0?i--:n<r&&n++;let s=us(t,i,n).getClientRects();if(!s.length)return null;let l=s[(a?a<0:o>=0)?0:s.length-1];return Fa.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,t=>t.width)||l),a?as(l,a<0):l||null}(this.dom,t,e)}}class $s extends ys{constructor(t,e=[],o=0){super(),this.mark=t,this.children=e,this.length=o;for(let t of e)t.setParent(this)}setAttrs(t){if(fs(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof $s&&o.mark.eq(this.mark))||t&&i<=0||e<this.length&&n<=0)||(Ss(this,t,e,o?o.children.slice():[],i-1,n-1),this.markDirty(),0))}split(t){let e=[],o=0,r=-1,i=0;for(let n of this.children){let a=o+n.length;a>t&&e.push(o<t?n.split(t-o):n),r<0&&o>=t&&(r=i),o=a,i++}let n=this.length-t;return this.length=t,r>-1&&(this.children.length=r,this.markDirty()),new $s(this.mark,e,n)}domAtPos(t){return Ts(this,t)}coordsAt(t,e){return Rs(this,t,e)}}class Ps extends ys{static create(t,e,o){return new Ps(t,e,o)}constructor(t,e,o){super(),this.widget=t,this.length=e,this.side=o,this.prevWidget=null}split(t){let e=Ps.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof Ps&&this.widget.compare(o.widget))||t>0&&i<=0||e<this.length&&n<=0)||(this.length=t+(o?o.length:0)+(this.length-e),0))}become(t){return t instanceof Ps&&t.side==this.side&&this.widget.constructor==t.widget.constructor&&(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(0==this.length)return Ni.empty;let t=this;for(;t.parent;)t=t.parent;let{view:e}=t,o=e&&e.state.doc,r=this.posAtStart;return o?o.slice(r,r+this.length):Ni.empty}domAtPos(t){return(this.length?0==t:this.side>0)?Os.before(this.dom):Os.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let o=this.widget.coordsAt(this.dom,t,e);if(o)return o;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let n=this.side?this.side<0:t>0;for(let e=n?r.length-1:0;i=r[e],!(t>0?0==e:e==r.length-1||i.top<i.bottom);e+=n?-1:1);return as(i,!n)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Cs extends ys{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof Cs&&t.side==this.side}split(){return new Cs(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?Os.before(this.dom):Os.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ni.empty}get isHidden(){return!0}}function Ts(t,e){let o=t.dom,{children:r}=t,i=0;for(let t=0;i<r.length;i++){let n=r[i],a=t+n.length;if(!(a==t&&n.getSide()<=0)){if(e>t&&e<a&&n.dom.parentNode==o)return n.domAtPos(e-t);if(e<=t)break;t=a}}for(let t=i;t>0;t--){let e=r[t-1];if(e.dom.parentNode==o)return e.domAtPos(e.length)}for(let t=i;t<r.length;t++){let e=r[t];if(e.dom.parentNode==o)return e.domAtPos(0)}return new Os(o,0)}function As(t,e,o){let r,{children:i}=t;o>0&&e instanceof $s&&i.length&&(r=i[i.length-1])instanceof $s&&r.mark.eq(e.mark)?As(r,e.children[0],o-1):(i.push(e),e.setParent(t)),t.length+=e.length}function Rs(t,e,o){let r=null,i=-1,n=null,a=-1;!function t(e,s){for(let l=0,d=0;l<e.children.length&&d<=s;l++){let c=e.children[l],h=d+c.length;h>=s&&(c.children.length?t(c,s-d):(!n||n.isHidden&&(o>0||zs(n,c)))&&(h>s||d==h&&c.getSide()>0)?(n=c,a=s-d):(d<s||d==h&&c.getSide()<0&&!c.isHidden)&&(r=c,i=s-d)),d=h}}(t,e);let s=(o<0?r:n)||r||n;return s?s.coordsAt(Math.max(0,s==r?i:a),o):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let o=ts(e);return o[o.length-1]||null}(t)}function zs(t,e){let o=t.coordsAt(0,1),r=e.coordsAt(0,1);return o&&r&&r.top<o.bottom}function Ms(t,e){for(let o in t)"class"==o&&e.class?e.class+=" "+t.class:"style"==o&&e.style?e.style+=";"+t.style:e[o]=t[o];return e}Qs.prototype.children=Ps.prototype.children=Cs.prototype.children=xs;const Es=Object.create(null);function Zs(t,e,o){if(t==e)return!0;t||(t=Es),e||(e=Es);let r=Object.keys(t),i=Object.keys(e);if(r.length-(o&&r.indexOf(o)>-1?1:0)!=i.length-(o&&i.indexOf(o)>-1?1:0))return!1;for(let n of r)if(n!=o&&(-1==i.indexOf(n)||t[n]!==e[n]))return!1;return!0}function Xs(t,e,o){let r=!1;if(e)for(let i in e)o&&i in o||(r=!0,"style"==i?t.style.cssText="":t.removeAttribute(i));if(o)for(let i in o)e&&e[i]==o[i]||(r=!0,"style"==i?t.style.cssText=o[i]:t.setAttribute(i,o[i]));return r}function _s(t){let e=Object.create(null);for(let o=0;o<t.attributes.length;o++){let r=t.attributes[o];e[r.name]=r.value}return e}class js{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,o){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var Ds=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Ds||(Ds={}));class Ys extends da{constructor(t,e,o,r){super(),this.startSide=t,this.endSide=e,this.widget=o,this.spec=r}get heightRelevant(){return!1}static mark(t){return new Vs(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),o=!!t.block;return e+=o&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new Us(t,e,e,o,t.widget||null,!1)}static replace(t){let e,o,r=!!t.block;if(t.isBlockGap)e=-5e8,o=4e8;else{let{start:i,end:n}=Bs(t,r);e=(i?r?-3e8:-1:5e8)-1,o=1+(n?r?2e8:1:-6e8)}return new Us(t,e,o,r,t.widget||null,!0)}static line(t){return new Ls(t)}static set(t,e=!1){return ua.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Ys.none=ua.empty;class Vs extends Ys{constructor(t){let{start:e,end:o}=Bs(t);super(e?-1:5e8,o?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,o;return this==t||t instanceof Vs&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(o=t.attrs)||void 0===o?void 0:o.class))&&Zs(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Vs.prototype.point=!1;class Ls extends Ys{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof Ls&&this.spec.class==t.spec.class&&Zs(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}Ls.prototype.mapMode=hn.TrackBefore,Ls.prototype.point=!0;class Us extends Ys{constructor(t,e,o,r,i,n){super(e,o,i,t),this.block=r,this.isReplace=n,this.mapMode=r?e<=0?hn.TrackBefore:hn.TrackAfter:hn.TrackDel}get type(){return this.startSide!=this.endSide?Ds.WidgetRange:this.startSide<=0?Ds.WidgetBefore:Ds.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof Us&&function(t,e){return t==e||!!(t&&e&&t.compare(e))}(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function Bs(t,e=!1){let{inclusiveStart:o,inclusiveEnd:r}=t;return null==o&&(o=t.inclusive),null==r&&(r=t.inclusive),{start:null!=o?o:e,end:null!=r?r:e}}function Ws(t,e,o,r=0){let i=o.length-1;i>=0&&o[i]+r>=t?o[i]=Math.max(o[i],e):o.push(t,e)}Us.prototype.point=!0;class Is extends ys{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,o,r,i,n){if(o){if(!(o instanceof Is))return!1;this.dom||o.transferDOM(this)}return r&&this.setDeco(o?o.attrs:null),Ss(this,t,e,o?o.children.slice():[],i,n),!0}split(t){let e=new Is;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:o,off:r}=this.childPos(t);r&&(e.append(this.children[o].split(r),0),this.children[o].merge(r,this.children[o].length,null,!1,0,0),o++);for(let t=o;t<this.children.length;t++)e.append(this.children[t],0);for(;o>0&&0==this.children[o-1].length;)this.children[--o].destroy();return this.children.length=o,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){Zs(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){As(this,t,e)}addLineDeco(t){let e=t.spec.attributes,o=t.spec.class;e&&(this.attrs=Ms(e,this.attrs||{})),o&&(this.attrs=Ms({class:o},this.attrs||{}))}domAtPos(t){return Ts(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var o;this.dom?4&this.flags&&(fs(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Xs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let r=this.dom.lastChild;for(;r&&ys.get(r)instanceof $s;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(o=ys.get(r))||void 0===o?void 0:o.isEditable)||Fa.ios&&this.children.some(t=>t instanceof Qs)))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let o of this.children){if(!(o instanceof Qs)||/[^ -~]/.test(o.text))return null;let r=ts(o.dom);if(1!=r.length)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let o=Rs(this,t,e);if(!this.children.length&&o&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=o.bottom-o.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight<e){let r=(e-t.textHeight)/2;return{top:o.top+r,bottom:o.bottom-r,left:o.left,right:o.left}}}return o}become(t){return t instanceof Is&&0==this.children.length&&0==t.children.length&&Zs(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,e){for(let o=0,r=0;o<t.children.length;o++){let i=t.children[o],n=r+i.length;if(n>=e){if(i instanceof Is)return i;if(n>e)break}r=n+i.breakAfter}return null}}class Gs extends ys{constructor(t,e,o){super(),this.widget=t,this.length=e,this.deco=o,this.breakAfter=0,this.prevWidget=null}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof Gs&&this.widget.compare(o.widget))||t>0&&i<=0||e<this.length&&n<=0)||(this.length=t+(o?o.length:0)+(this.length-e),0))}domAtPos(t){return 0==t?Os.before(this.dom):Os.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let o=new Gs(this.widget,e,this.deco);return o.breakAfter=this.breakAfter,o}get children(){return xs}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ni.empty}domBoundsAround(){return null}become(t){return t instanceof Gs&&t.widget.constructor==this.widget.constructor&&(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,e){return this.widget.coordsAt(this.dom,t,e)||(this.widget instanceof Ns?null:as(this.dom.getBoundingClientRect(),this.length?0==t:e<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:e,endSide:o}=this.deco;return e!=o&&(t<0?e<0:o>0)}}class Ns extends js{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Fs{constructor(t,e,o,r){this.doc=t,this.pos=e,this.end=o,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof Gs&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Is),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Hs(new Cs(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof Gs||this.getLine()}buildText(t,e,o){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:o,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let r=Math.min(this.text.length-this.textOff,t),i=Math.min(r,512);this.flushBuffer(e.slice(e.length-o)),this.getLine().append(Hs(new Qs(this.text.slice(this.textOff,this.textOff+i)),e),o),this.atCursorPos=!0,this.textOff+=i,t-=i,o=r<=i?0:e.length}}span(t,e,o,r){this.buildText(e-t,o,r),this.pos=e,this.openStart<0&&(this.openStart=r)}point(t,e,o,r,i,n){if(this.disallowBlockEffectsFor[n]&&o instanceof Us){if(o.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=e-t;if(o instanceof Us)if(o.block)o.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Gs(o.widget||Ks.block,a,o));else{let n=Ps.create(o.widget||Ks.inline,a,a?0:o.startSide),s=this.atCursorPos&&!n.isEditable&&i<=r.length&&(t<e||o.startSide>0),l=!n.isEditable&&(t<e||i>r.length||o.startSide<=0),d=this.getLine();2!=this.pendingBuffer||s||n.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),s&&(d.append(Hs(new Cs(1),r),i),i=r.length+Math.max(0,i-r.length)),d.append(Hs(n,r),i),this.atCursorPos=l,this.pendingBuffer=l?t<e||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(o);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=i)}static build(t,e,o,r,i){let n=new Fs(t,e,o,i);return n.openEnd=ua.spans(r,e,o,n),n.openStart<0&&(n.openStart=n.openEnd),n.finish(n.openEnd),n}}function Hs(t,e){for(let o of e)t=new $s(o,[t],t.length);return t}class Ks extends js{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ks.inline=new Ks("span"),Ks.block=new Ks("div");var Js=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Js||(Js={}));const tl=Js.LTR,el=Js.RTL;function ol(t){let e=[];for(let o=0;o<t.length;o++)e.push(1<<+t[o]);return e}const rl=ol("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),il=ol("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),nl=Object.create(null),al=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),o=t.charCodeAt(1);nl[e]=o,nl[o]=-e}function sl(t){return t<=247?rl[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?il[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const ll=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class dl{get dir(){return this.level%2?el:tl}constructor(t,e,o){this.from=t,this.to=e,this.level=o}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,o,r){let i=-1;for(let n=0;n<t.length;n++){let a=t[n];if(a.from<=e&&a.to>=e){if(a.level==o)return n;(i<0||(0!=r?r<0?a.from<e:a.to>e:t[i].level>a.level))&&(i=n)}}if(i<0)throw new RangeError("Index out of range");return i}}function cl(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++){let r=t[o],i=e[o];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!cl(r.inner,i.inner))return!1}return!0}const hl=[];function pl(t,e,o,r,i,n,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,d=0;l<o;){let e=!0,c=!1;if(d==n.length||l<n[d].from){let t=hl[l];t!=s&&(e=!1,c=16==t)}let h=e||1!=s?null:[],p=e?r:r+1,u=l;t:for(;;)if(d<n.length&&u==n[d].from){if(c)break t;let m=n[d];if(!e)for(let t=m.to,e=d+1;;){if(t==o)break t;if(!(e<n.length&&n[e].from==t)){if(hl[t]==s)break t;break}t=n[e++].to}d++,h?h.push(m):(m.from>l&&a.push(new dl(l,m.from,p)),ul(t,m.direction==tl!=!(p%2)?r+1:r,i,m.inner,m.from,m.to,a),l=m.to),u=m.to}else{if(u==o||(e?hl[u]!=s:hl[u]==s))break;u++}h?pl(t,l,u,r+1,i,h,a):l<u&&a.push(new dl(l,u,p)),l=u}else for(let l=o,d=n.length;l>e;){let o=!0,c=!1;if(!d||l>n[d-1].to){let t=hl[l-1];t!=s&&(o=!1,c=16==t)}let h=o||1!=s?null:[],p=o?r:r+1,u=l;t:for(;;)if(d&&u==n[d-1].to){if(c)break t;let m=n[--d];if(!o)for(let t=m.from,o=d;;){if(t==e)break t;if(!o||n[o-1].to!=t){if(hl[t-1]==s)break t;break}t=n[--o].from}h?h.push(m):(m.to<l&&a.push(new dl(m.to,l,p)),ul(t,m.direction==tl!=!(p%2)?r+1:r,i,m.inner,m.from,m.to,a),l=m.from),u=m.from}else{if(u==e||(o?hl[u-1]!=s:hl[u-1]==s))break;u--}h?pl(t,u,l,r+1,i,h,a):u<l&&a.push(new dl(u,l,p)),l=u}}function ul(t,e,o,r,i,n,a){let s=e%2?2:1;!function(t,e,o,r,i){for(let n=0;n<=r.length;n++){let a=n?r[n-1].to:e,s=n<r.length?r[n].from:o,l=n?256:i;for(let e=a,o=l,r=l;e<s;e++){let i=sl(t.charCodeAt(e));512==i?i=o:8==i&&4==r&&(i=16),hl[e]=4==i?2:i,7&i&&(r=i),o=i}for(let t=a,e=l,r=l;t<s;t++){let i=hl[t];if(128==i)t<s-1&&e==hl[t+1]&&24&e?i=hl[t]=e:hl[t]=256;else if(64==i){let i=t+1;for(;i<s&&64==hl[i];)i++;let n=t&&8==e||i<o&&8==hl[i]?1==r?1:8:256;for(let e=t;e<i;e++)hl[e]=n;t=i-1}else 8==i&&1==r&&(hl[t]=1);e=i,7&i&&(r=i)}}}(t,i,n,r,s),function(t,e,o,r,i){let n=1==i?2:1;for(let a=0,s=0,l=0;a<=r.length;a++){let d=a?r[a-1].to:e,c=a<r.length?r[a].from:o;for(let e,o,r,a=d;a<c;a++)if(o=nl[e=t.charCodeAt(a)])if(o<0){for(let t=s-3;t>=0;t-=3)if(al[t+1]==-o){let e=al[t+2],o=2&e?i:4&e?1&e?n:i:0;o&&(hl[a]=hl[al[t]]=o),s=t;break}}else{if(189==al.length)break;al[s++]=a,al[s++]=e,al[s++]=l}else if(2==(r=hl[a])||1==r){let t=r==i;l=t?0:1;for(let e=s-3;e>=0;e-=3){let o=al[e+2];if(2&o)break;if(t)al[e+2]|=2;else{if(4&o)break;al[e+2]|=4}}}}}(t,i,n,r,s),function(t,e,o,r){for(let i=0,n=r;i<=o.length;i++){let a=i?o[i-1].to:t,s=i<o.length?o[i].from:e;for(let l=a;l<s;){let a=hl[l];if(256==a){let a=l+1;for(;;)if(a==s){if(i==o.length)break;a=o[i++].to,s=i<o.length?o[i].from:e}else{if(256!=hl[a])break;a++}let d=1==n,c=d==(1==(a<e?hl[a]:r))?d?1:2:r;for(let e=a,r=i,n=r?o[r-1].to:t;e>l;)e==n&&(e=o[--r].from,n=r?o[r-1].to:t),hl[--e]=c;l=a}else n=a,l++}}}(i,n,r,s),pl(t,i,n,e,o,r,a)}function ml(t){return[new dl(0,t,0)]}let fl="";function bl(t,e,o,r,i){var n;let a=r.head-t.from,s=dl.find(e,a,null!==(n=r.bidiLevel)&&void 0!==n?n:-1,r.assoc),l=e[s],d=l.side(i,o);if(a==d){let t=s+=i?1:-1;if(t<0||t>=e.length)return null;l=e[s=t],a=l.side(!i,o),d=l.side(i,o)}let c=an(t.text,a,l.forward(i,o));(c<l.from||c>l.to)&&(c=d),fl=t.text.slice(Math.min(a,c),Math.max(a,c));let h=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return h&&c==d&&h.level+(i?0:1)<l.level?yn.cursor(h.side(!i,o)+t.from,h.forward(i,o)?1:-1,h.level):yn.cursor(c+t.from,l.forward(i,o)?-1:1,l.level)}function gl(t,e,o){for(let r=e;r<o;r++){let e=sl(t.charCodeAt(r));if(1==e)return tl;if(2==e||4==e)return el}return tl}const vl=qn.define(),Ol=qn.define(),xl=qn.define(),yl=qn.define(),wl=qn.define(),kl=qn.define(),ql=qn.define(),Sl=qn.define(),Ql=qn.define(),$l=qn.define({combine:t=>t.some(t=>t)}),Pl=qn.define({combine:t=>t.some(t=>t)}),Cl=qn.define();class Tl{constructor(t,e="nearest",o="nearest",r=5,i=5,n=!1){this.range=t,this.y=e,this.x=o,this.yMargin=r,this.xMargin=i,this.isSnapshot=n}map(t){return t.empty?this:new Tl(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new Tl(yn.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Al=Fn.define({map:(t,e)=>t.map(e)}),Rl=Fn.define();function zl(t,e,o){let r=t.facet(yl);r.length?r[0](e):window.onerror&&window.onerror(String(e),o,void 0,void 0,e)||(o?console.error(o+":",e):console.error(e))}const Ml=qn.define({combine:t=>!t.length||t[0]});let El=0;const Zl=qn.define({combine:t=>t.filter((e,o)=>{for(let r=0;r<o;r++)if(t[r].plugin==e.plugin)return!1;return!0})});class Xl{constructor(t,e,o,r,i){this.id=t,this.create=e,this.domEventHandlers=o,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(Zl.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(Zl.of({plugin:this,arg:t}))}static define(t,e){const{eventHandlers:o,eventObservers:r,provide:i,decorations:n}=e||{};return new Xl(El++,t,o,r,t=>{let e=[];return n&&e.push(Yl.of(e=>{let o=e.plugin(t);return o?n(o):Ys.none})),i&&e.push(i(t)),e})}static fromClass(t,e){return Xl.define((e,o)=>new t(e,o),e)}}class _l{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(zl(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(e){zl(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){zl(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const jl=qn.define(),Dl=qn.define(),Yl=qn.define(),Vl=qn.define(),Ll=qn.define(),Ul=qn.define();function Bl(t,e){let o=t.state.facet(Ul);if(!o.length)return o;let r=o.map(e=>e instanceof Function?e(t):e),i=[];return ua.spans(r,e.from,e.to,{point(){},span(t,o,r,n){let a=t-e.from,s=o-e.from,l=i;for(let t=r.length-1;t>=0;t--,n--){let o,i=r[t].spec.bidiIsolate;if(null==i&&(i=gl(e.text,a,s)),n>0&&l.length&&(o=l[l.length-1]).to==a&&o.direction==i)o.to=s,l=o.inner;else{let t={from:a,to:s,direction:i,inner:[]};l.push(t),l=t.inner}}}}),i}const Wl=qn.define();function Il(t){let e=0,o=0,r=0,i=0;for(let n of t.state.facet(Wl)){let a=n(t);a&&(null!=a.left&&(e=Math.max(e,a.left)),null!=a.right&&(o=Math.max(o,a.right)),null!=a.top&&(r=Math.max(r,a.top)),null!=a.bottom&&(i=Math.max(i,a.bottom)))}return{left:e,right:o,top:r,bottom:i}}const Gl=qn.define();class Nl{constructor(t,e,o,r){this.fromA=t,this.toA=e,this.fromB=o,this.toB=r}join(t){return new Nl(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,o=this;for(;e>0;e--){let r=t[e-1];if(!(r.fromA>o.toA)){if(r.toA<o.fromA)break;o=o.join(r),t.splice(e-1,1)}}return t.splice(e,0,o),t}static extendWithRanges(t,e){if(0==e.length)return t;let o=[];for(let r=0,i=0,n=0,a=0;;r++){let s=r==t.length?null:t[r],l=n-a,d=s?s.fromB:1e9;for(;i<e.length&&e[i]<d;){let t=e[i],r=e[i+1],n=Math.max(a,t),s=Math.min(d,r);if(n<=s&&new Nl(n+l,s+l,n,s).addToSet(o),r>d)break;i+=2}if(!s)return o;new Nl(s.fromA,s.toA,s.fromB,s.toB).addToSet(o),n=s.toA,a=s.toB}}}class Fl{constructor(t,e,o){this.view=t,this.state=e,this.transactions=o,this.flags=0,this.startState=t.state,this.changes=un.empty(this.startState.doc.length);for(let t of o)this.changes=this.changes.compose(t.changes);let r=[];this.changes.iterChangedRanges((t,e,o,i)=>r.push(new Nl(t,e,o,i))),this.changedRanges=r}static create(t,e,o){return new Fl(t,e,o)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}class Hl extends ys{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ys.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new Is],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Nl(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let o=t.changedRanges;this.minWidth>0&&o.length&&(o.every(({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?r=this.domChanged.newSel.head:function(t,e){let o=!1;return e&&t.iterChangedRanges((t,r)=>{t<e.to&&r>e.from&&(o=!0)}),o}(t.changes,this.hasComposition)||t.selectionSet||(r=t.state.selection.main.head));let i=r>-1?function(t,e,o){let r=Kl(t,o);if(!r)return null;let{node:i,from:n,to:a}=r,s=i.nodeValue;if(/[\n\r]/.test(s))return null;if(t.state.doc.sliceString(r.from,r.to)!=s)return null;let l=e.invertedDesc,d=new Nl(l.mapPos(n),l.mapPos(a),n,a),c=[];for(let e=i.parentNode;;e=e.parentNode){let o=ys.get(e);if(o instanceof $s)c.push({node:e,deco:o.mark});else{if(o instanceof Is||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:d,text:i,marks:c,line:e};if(e==t.contentDOM)return null;c.push({node:e,deco:new Vs({inclusive:!0,attributes:_s(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:r}=this.hasComposition;o=new Nl(e,r,t.changes.mapPos(e,-1),t.changes.mapPos(r,1)).addToSet(o.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(Fa.ie||Fa.chrome)&&!i&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let n=function(t,e,o){let r=new Jl;return ua.compare(t,e,o,r),r.changes}(this.decorations,this.updateDeco(),t.changes);return o=Nl.extendWithRanges(o,n),!!(7&this.flags||0!=o.length)&&(this.updateInner(o,t.startState.doc.length,i),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,o){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,o);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=Fa.chrome||Fa.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||r.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(t=>t.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let t of this.children)t instanceof Gs&&t.widget instanceof Ns&&i.push(t.dom);r.updateGaps(i)}updateChildren(t,e,o){let r=o?o.range.addToSet(t.slice()):t,i=this.childCursor(e);for(let t=r.length-1;;t--){let e=t>=0?r[t]:null;if(!e)break;let n,a,s,l,{fromA:d,toA:c,fromB:h,toB:p}=e;if(o&&o.range.fromB<p&&o.range.toB>h){let t=Fs.build(this.view.state.doc,h,o.range.fromB,this.decorations,this.dynamicDecorationMap),e=Fs.build(this.view.state.doc,o.range.toB,p,this.decorations,this.dynamicDecorationMap);a=t.breakAtStart,s=t.openStart,l=e.openEnd;let r=this.compositionView(o);e.breakAtStart?r.breakAfter=1:e.content.length&&r.merge(r.length,r.length,e.content[0],!1,e.openStart,0)&&(r.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&r.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),n=t.content.concat(r).concat(e.content)}else({content:n,breakAtStart:a,openStart:s,openEnd:l}=Fs.build(this.view.state.doc,h,p,this.decorations,this.dynamicDecorationMap));let{i:u,off:m}=i.findPos(c,1),{i:f,off:b}=i.findPos(d,-1);qs(this,f,b,u,m,n,a,s,l)}o&&this.fixCompositionDOM(o)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(Rl)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new Qs(t.text.nodeValue);e.flags|=8;for(let{deco:o}of t.marks)e=new $s(o,[e],e.length);let o=new Is;return o.append(e,0),o}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some(t=>7&t.flags)?1:0),this.markedForComposition.add(e);let o=ys.get(t);o&&o!=e&&(o.dom=null),e.setDOM(t)},o=this.childPos(t.range.fromB,1),r=this.children[o.i];e(t.line,r);for(let i=t.marks.length-1;i>=-1;i--)o=r.childPos(o.off,1),r=r.children[o.i],e(i>=0?t.marks[i].node:t.text,r)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let o=this.view.root.activeElement,r=o==this.dom,i=!r&&!(this.view.state.facet(Ml)||this.dom.tabIndex>-1)&&Ja(this.dom,this.view.observer.selectionRange)&&!(o&&this.dom.contains(o));if(!(r||e||i))return;let n=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(a.anchor)),l=a.empty?s:this.moveToLine(this.domAtPos(a.head));if(Fa.gecko&&a.empty&&!this.hasComposition&&1==(d=s).node.nodeType&&d.node.firstChild&&(0==d.offset||"false"==d.node.childNodes[d.offset-1].contentEditable)&&(d.offset==d.node.childNodes.length||"false"==d.node.childNodes[d.offset].contentEditable)){let t=document.createTextNode("");this.view.observer.ignore(()=>s.node.insertBefore(t,s.node.childNodes[s.offset]||null)),s=l=new Os(t,0),n=!0}var d;let c=this.view.observer.selectionRange;!n&&c.focusNode&&(es(s.node,s.offset,c.anchorNode,c.anchorOffset)&&es(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,a))||(this.view.observer.ignore(()=>{Fa.android&&Fa.chrome&&this.dom.contains(c.focusNode)&&function(t,e){for(let o=t;o&&o!=e;o=o.assignedSlot||o.parentNode)if(1==o.nodeType&&"false"==o.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=Ha(this.view.root);if(t)if(a.empty){if(Fa.gecko){let t=(e=s.node,r=s.offset,1!=e.nodeType?0:(r&&"false"==e.childNodes[r-1].contentEditable?1:0)|(r<e.childNodes.length&&"false"==e.childNodes[r].contentEditable?2:0));if(t&&3!=t){let e=(1==t?gs:vs)(s.node,s.offset);e&&(s=new Os(e.node,e.offset))}}t.collapse(s.node,s.offset),null!=a.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=a.bidiLevel)}else if(t.extend){t.collapse(s.node,s.offset);try{t.extend(l.node,l.offset)}catch(t){}}else{let e=document.createRange();a.anchor>a.head&&([s,l]=[l,s]),e.setEnd(l.node,l.offset),e.setStart(s.node,s.offset),t.removeAllRanges(),t.addRange(e)}var e,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),o&&o.focus())}),this.view.observer.setSelectionRange(s,l)),this.impreciseAnchor=s.precise?null:new Os(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new Os(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&es(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,o=Ha(t.root),{anchorNode:r,anchorOffset:i}=t.observer.selectionRange;if(!(o&&e.empty&&e.assoc&&o.modify))return;let n=Is.find(this,e.head);if(!n)return;let a=n.posAtStart;if(e.head==a||e.head==a+n.length)return;let s=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!s||!l||s.bottom>l.top)return;let d=this.domAtPos(e.head+e.assoc);o.collapse(d.node,d.offset),o.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&o.collapse(r,i)}moveToLine(t){let e,o=this.dom;if(t.node!=o)return t;for(let r=t.offset;!e&&r<o.childNodes.length;r++){let t=ys.get(o.childNodes[r]);t instanceof Is&&(e=t.domAtPos(0))}for(let r=t.offset-1;!e&&r>=0;r--){let t=ys.get(o.childNodes[r]);t instanceof Is&&(e=t.domAtPos(t.length))}return e?new Os(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=ys.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let o=this.nearest(t);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(t,e)+o.posAtStart}domAtPos(t){let{i:e,off:o}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(o<t.length||t instanceof Is)break;e++,o=0}return this.children[e].domAtPos(o)}coordsAt(t,e){let o=null,r=0;for(let i=this.length,n=this.children.length-1;n>=0;n--){let a=this.children[n],s=i-a.breakAfter,l=s-a.length;if(s<t)break;if(l<=t&&(l<t||a.covers(-1))&&(s>t||a.covers(1))&&(!o||a instanceof Is&&!(o instanceof Is&&e>=0)))o=a,r=l;else if(o&&l==t&&s==t&&a instanceof Gs&&Math.abs(e)<2){if(a.deco.startSide<0)break;n&&(o=null)}i=l}return o?o.coordsAt(t-r,e):null}coordsForChar(t){let{i:e,off:o}=this.childPos(t,1),r=this.children[e];if(!(r instanceof Is))return null;for(;r.children.length;){let{i:t,off:e}=r.childPos(o,1);for(;;t++){if(t==r.children.length)return null;if((r=r.children[t]).length)break}o=e}if(!(r instanceof Qs))return null;let i=an(r.text,o);if(i==o)return null;let n=us(r.dom,o,i).getClientRects();for(let t=0;t<n.length;t++){let e=n[t];if(t==n.length-1||e.top<e.bottom&&e.left<e.right)return e}return null}measureVisibleLineHeights(t){let e=[],{from:o,to:r}=t,i=this.view.contentDOM.clientWidth,n=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==Js.LTR;for(let t=0,l=0;l<this.children.length;l++){let d=this.children[l],c=t+d.length;if(c>r)break;if(t>=o){let o=d.dom.getBoundingClientRect();if(e.push(o.height),n){let e=d.dom.lastChild,r=e?ts(e):[];if(r.length){let e=r[r.length-1],n=s?e.right-o.left:o.right-e.left;n>a&&(a=n,this.minWidth=i,this.minWidthFrom=t,this.minWidthTo=c)}}}t=c+d.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?Js.RTL:Js.LTR}measureTextSize(){for(let t of this.children)if(t instanceof Is){let e=t.measureTextSize();if(e)return e}let t,e,o,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let i=ts(r.firstChild)[0];t=r.getBoundingClientRect().height,e=i?i.width/27:7,o=i?i.height:t,r.remove()}),{lineHeight:t,charWidth:e,textHeight:o}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new ks(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let o=0,r=0;;r++){let i=r==e.viewports.length?null:e.viewports[r],n=i?i.from-1:this.length;if(n>o){let r=(e.lineBlockAt(n).bottom-e.lineBlockAt(o).top)/this.view.scaleY;t.push(Ys.replace({widget:new Ns(r),block:!0,inclusive:!0,isBlockGap:!0}).range(o,n))}if(!i)break;o=i.to+1}return Ys.set(t)}updateDeco(){let t=1,e=this.view.state.facet(Yl).map(e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e),o=!1,r=this.view.state.facet(Vl).map((t,e)=>{let r="function"==typeof t;return r&&(o=!0),r?t(this.view):t});for(r.length&&(this.dynamicDecorationMap[t++]=o,e.push(ua.join(r))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);return this.view.scrollDOM.scrollTop=e.top-t.yMargin,void(this.view.scrollDOM.scrollLeft=t.xMargin)}for(let e of this.view.state.facet(Cl))try{if(e(this.view,t.range,t))return!0}catch(t){zl(this.view.state,t,"scroll handler")}let e,{range:o}=t,r=this.coordsAt(o.head,o.empty?o.assoc:o.head>o.anchor?-1:1);if(!r)return;!o.empty&&(e=this.coordsAt(o.anchor,o.anchor>o.head?-1:1))&&(r={left:Math.min(r.left,e.left),top:Math.min(r.top,e.top),right:Math.max(r.right,e.right),bottom:Math.max(r.bottom,e.bottom)});let i=Il(this.view),n={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(t,e,o,r,i,n,a,s){let l=t.ownerDocument,d=l.defaultView||window;for(let c=t,h=!1;c&&!h;)if(1==c.nodeType){let t,p=c==l.body,u=1,m=1;if(p)t=ss(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:u,scaleY:m}=ls(c,e)),t={left:e.left,right:e.left+c.clientWidth*u,top:e.top,bottom:e.top+c.clientHeight*m}}let f=0,b=0;if("nearest"==i)e.top<t.top?(b=e.top-(t.top+a),o>0&&e.bottom>t.bottom+b&&(b=e.bottom-t.bottom+a)):e.bottom>t.bottom&&(b=e.bottom-t.bottom+a,o<0&&e.top-b<t.top&&(b=e.top-(t.top+a)));else{let r=e.bottom-e.top,n=t.bottom-t.top;b=("center"==i&&r<=n?e.top+r/2-n/2:"start"==i||"center"==i&&o<0?e.top-a:e.bottom-n+a)-t.top}if("nearest"==r?e.left<t.left?(f=e.left-(t.left+n),o>0&&e.right>t.right+f&&(f=e.right-t.right+n)):e.right>t.right&&(f=e.right-t.right+n,o<0&&e.left<t.left+f&&(f=e.left-(t.left+n))):f=("center"==r?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==r==s?e.left-n:e.right-(t.right-t.left)+n)-t.left,f||b)if(p)d.scrollBy(f,b);else{let t=0,o=0;if(b){let t=c.scrollTop;c.scrollTop+=b/m,o=(c.scrollTop-t)*m}if(f){let e=c.scrollLeft;c.scrollLeft+=f/u,t=(c.scrollLeft-e)*u}e={left:e.left-t,top:e.top-o,right:e.right-t,bottom:e.bottom-o},t&&Math.abs(t-f)<1&&(r="nearest"),o&&Math.abs(o-b)<1&&(i="nearest")}if(p)break;(e.top<t.top||e.bottom>t.bottom||e.left<t.left||e.right>t.right)&&(e={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)}),c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,n,o.head<o.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,a),-a),Math.max(Math.min(t.yMargin,s),-s),this.view.textDirection==Js.LTR)}}function Kl(t,e){let o=t.observer.selectionRange;if(!o.focusNode)return null;let r=gs(o.focusNode,o.focusOffset),i=vs(o.focusNode,o.focusOffset),n=r||i;if(i&&r&&i.node!=r.node){let e=ys.get(i.node);if(!e||e instanceof Qs&&e.text!=i.node.nodeValue)n=i;else if(t.docView.lastCompositionAfterCursor){let t=ys.get(r.node);!t||t instanceof Qs&&t.text!=r.node.nodeValue||(n=i)}}if(t.docView.lastCompositionAfterCursor=n!=r,!n)return null;let a=e-n.offset;return{from:a,to:a+n.node.nodeValue.length,node:n.node}}let Jl=class{constructor(){this.changes=[]}compareRange(t,e){Ws(t,e,this.changes)}comparePoint(t,e){Ws(t,e,this.changes)}boundChange(t){Ws(t,t,this.changes)}};function td(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function ed(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function od(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function rd(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function id(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function nd(t,e,o){let r,i,n,a,s,l,d,c,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=ts(p);for(let u=0;u<t.length;u++){let m=t[u];i&&od(i,m)&&(m=rd(id(m,i.bottom),i.top));let f=td(e,m),b=ed(o,m);if(0==f&&0==b)return 3==p.nodeType?ad(p,e,o):nd(p,e,o);(!r||a>b||a==b&&n>f)&&(r=p,i=m,n=f,a=b,h=!f||(e<m.left?u>0:u<t.length-1)),0==f?o>m.bottom&&(!d||d.bottom<m.bottom)?(s=p,d=m):o<m.top&&(!c||c.top>m.top)&&(l=p,c=m):d&&od(d,m)?d=id(d,m.bottom):c&&od(c,m)&&(c=rd(c,m.top))}}if(d&&d.bottom>=o?(r=s,i=d):c&&c.top<=o&&(r=l,i=c),!r)return{node:t,offset:0};let p=Math.max(i.left,Math.min(i.right,e));return 3==r.nodeType?ad(r,p,o):h&&"false"!=r.contentEditable?nd(r,p,o):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0)}}function ad(t,e,o){let r=t.nodeValue.length,i=-1,n=1e9,a=0;for(let s=0;s<r;s++){let r=us(t,s,s+1).getClientRects();for(let l=0;l<r.length;l++){let d=r[l];if(d.top==d.bottom)continue;a||(a=e-d.left);let c=(d.top>o?d.top-o:o-d.bottom)-1;if(d.left-1<=e&&d.right+1>=e&&c<n){let o=e>=(d.left+d.right)/2,r=o;if((Fa.chrome||Fa.gecko)&&us(t,s).getBoundingClientRect().left==d.right&&(r=!o),c<=0)return{node:t,offset:s+(r?1:0)};i=s+(r?1:0),n=c}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function sd(t,e,o,r=-1){var i,n;let a,s=t.contentDOM.getBoundingClientRect(),l=s.top+t.viewState.paddingTop,{docHeight:d}=t.viewState,{x:c,y:h}=e,p=h-l;if(p<0)return 0;if(p>d)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,i=!1;a=t.elementAtHeight(p),a.type!=Ds.Text;)for(;p=r>0?a.bottom+e:a.top-e,!(p>=0&&p<=d);){if(i)return o?null:0;i=!0,r=-r}h=l+p;let u=a.from;if(u<t.viewport.from)return 0==t.viewport.from?0:o?null:ld(t,s,a,c,h);if(u>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:o?null:ld(t,s,a,c,h);let m=t.dom.ownerDocument,f=t.root.elementFromPoint?t.root:m,b=f.elementFromPoint(c,h);b&&!t.contentDOM.contains(b)&&(b=null),b||(c=Math.max(s.left+1,Math.min(s.right-1,c)),b=f.elementFromPoint(c,h),b&&!t.contentDOM.contains(b)&&(b=null));let g,v=-1;if(b&&0!=(null===(i=t.docView.nearest(b))||void 0===i?void 0:i.isEditable)){if(m.caretPositionFromPoint){let t=m.caretPositionFromPoint(c,h);t&&({offsetNode:g,offset:v}=t)}else if(m.caretRangeFromPoint){let t=m.caretRangeFromPoint(c,h);t&&({startContainer:g,startOffset:v}=t)}g&&(!t.contentDOM.contains(g)||Fa.safari&&function(t,e,o){return dd(t,e,o)}(g,v,c)||Fa.chrome&&function(t,e,o){if(0!=e)return dd(t,e,o);for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}return o-(1==t.nodeType?t.getBoundingClientRect():us(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(g,v,c))&&(g=void 0),g&&(v=Math.min(ns(g),v))}if(!g||!t.docView.dom.contains(g)){let e=Is.find(t.docView,u);if(!e)return p>a.top+a.height/2?a.to:a.from;({node:g,offset:v}=nd(e.dom,c,h))}let O=t.docView.nearest(g);if(!O)return null;if(O.isWidget&&1==(null===(n=O.dom)||void 0===n?void 0:n.nodeType)){let t=O.dom.getBoundingClientRect();return e.y<t.top||e.y<=t.bottom&&e.x<=(t.left+t.right)/2?O.posAtStart:O.posAtEnd}return O.localPosFromDOM(g,v)+O.posAtStart}function ld(t,e,o,r,i){let n=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&o.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;n+=Math.floor((i-o.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(o.from,o.to);return o.from+Qa(a,n,t.state.tabSize)}function dd(t,e,o){let r,i=t;if(3!=t.nodeType||e!=(r=t.nodeValue.length))return!1;for(;;){let t=i.nextSibling;if(t){if("BR"==t.nodeName)break;return!1}{let t=i.parentNode;if(!t||"DIV"==t.nodeName)break;i=t}}return us(t,r-1,r).getBoundingClientRect().right>o}function cd(t,e,o){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let t;for(let i of r.type){if(i.from>e)break;if(!(i.to<e)){if(i.from<e&&i.to>e)return i;t&&(i.type!=Ds.Text||t.type==i.type&&!(o<0?i.from<e:i.to>e))||(t=i)}}return t||r}return r}function hd(t,e,o,r){let i=t.state.doc.lineAt(e.head),n=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let e=bl(i,n,a,s,o),d=fl;if(!e){if(i.number==(o?t.state.doc.lines:1))return s;d="\n",i=t.state.doc.line(i.number+(o?1:-1)),n=t.bidiSpans(i),e=t.visualLineSide(i,!o)}if(l){if(!l(d))return s}else{if(!r)return e;l=r(d)}s=e}}function pd(t,e,o){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(t,i,n)=>{if(e>t&&e<i){let n=r||o||(e-t<i-e?-1:1);e=n<0?t:i,r=n}});if(!r)return e}}function ud(t,e){let o=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],n=null;if(i.empty){let e=pd(t,i.from,0);e!=i.from&&(n=yn.cursor(e,-1))}else{let e=pd(t,i.from,-1),o=pd(t,i.to,1);e==i.from&&o==i.to||(n=yn.range(i.from==i.anchor?e:o,i.from==i.head?e:o))}n&&(o||(o=e.ranges.slice()),o[r]=n)}return o?yn.create(o,e.mainIndex):e}function md(t,e,o){let r=pd(t.state.facet(Ll).map(e=>e(t)),o.from,e.head>o.from?-1:1);return r==o.from?o:yn.cursor(r,r<o.from?1:-1)}const fd="";class bd{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(sa.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=fd}readRange(t,e){if(!t)return this;let o=t.parentNode;for(let r=t;;){this.findPointBefore(o,r);let t=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==e)break;let n=ys.get(r),a=ys.get(i);(n&&a?n.breakAfter:(n?n.breakAfter:rs(r))||rs(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>t)&&!vd(i,e)&&this.lineBreak(),r=i}return this.findPointBefore(o,e),this}readTextNode(t){let e=t.nodeValue;for(let o of this.points)o.node==t&&(o.pos=this.text.length+Math.min(o.offset,e.length));for(let o=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,n=-1,a=1;if(this.lineSeparator?(n=e.indexOf(this.lineSeparator,o),a=this.lineSeparator.length):(i=r.exec(e))&&(n=i.index,a=i[0].length),this.append(e.slice(o,n<0?e.length:n)),n<0)break;if(this.lineBreak(),a>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=a-1);o=n+a}}readNode(t){if(t.cmIgnore)return;let e=ys.get(t),o=e&&e.overrideDOMText;if(null!=o){this.findPointInside(t,o.length);for(let t=o.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let o of this.points)o.node==t&&t.childNodes[o.offset]==e&&(o.pos=this.text.length)}findPointInside(t,e){for(let o of this.points)(3==t.nodeType?o.node==t:t.contains(o.node))&&(o.pos=this.text.length+(gd(t,o.node,o.offset)?e:0))}}function gd(t,e,o){for(;;){if(!e||o<ns(e))return!1;if(e==t)return!0;o=os(e)+1,e=e.parentNode}}function vd(t,e){let o;for(;t!=e&&t;t=t.nextSibling){let e=ys.get(t);if(!(null==e?void 0:e.isWidget)&&!t.cmIgnore)return!1;e&&(o||(o=[])).push(e)}if(o)for(let t of o){let e=t.overrideDOMText;if(null==e?void 0:e.length)return!1}return!0}class Od{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class xd{constructor(t,e,o,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:i,impreciseAnchor:n}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,o,0))){let e=i||n?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:o,anchorOffset:r,focusNode:i,focusOffset:n}=t.observer.selectionRange;return o&&(e.push(new Od(o,r)),i==o&&n==r||e.push(new Od(i,n))),e}(t),o=new bd(e,t.state);o.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=o.text,this.newSel=function(t,e){if(0==t.length)return null;let o=t[0].pos,r=2==t.length?t[1].pos:o;return o>-1&&r>-1?yn.single(o+e,r+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,o=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!Ka(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),r=n&&n.node==e.anchorNode&&n.offset==e.anchorOffset||!Ka(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),a=t.viewport;if((Fa.ios||Fa.chrome)&&t.state.selection.main.empty&&o!=r&&(a.from>0||a.to<t.state.doc.length)){let e=Math.min(o,r),i=Math.max(o,r),n=a.from-e,s=a.to-i;0!=n&&1!=n&&0!=e||0!=s&&-1!=s&&i!=t.state.doc.length||(o=0,r=t.state.doc.length)}this.newSel=yn.single(r,o)}}}function yd(t,e){let o,{newSel:r}=e,i=t.state.selection.main,n=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:r,to:a}=e.bounds,s=i.from,l=null;(8===n||Fa.android&&e.text.length<a-r)&&(s=i.to,l="end");let d=kd(t.state.doc.sliceString(r,a,fd),e.text,s-r,l);d&&(Fa.chrome&&13==n&&d.toB==d.from+2&&e.text.slice(d.from,d.toB)==fd+fd&&d.toB--,o={from:r+d.from,to:r+d.toA,insert:Ni.of(e.text.slice(d.from,d.toB).split(fd))})}else r&&(!t.hasFocus&&t.state.facet(Ml)||r.main.eq(i))&&(r=null);if(!o&&!r)return!1;if(!o&&e.typeOver&&!i.empty&&r&&r.main.empty?o={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(Fa.mac||Fa.android)&&o&&o.from==o.to&&o.from==i.head-1&&/^\. ?$/.test(o.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(r&&2==o.insert.length&&(r=yn.single(r.main.anchor-1,r.main.head-1)),o={from:o.from,to:o.to,insert:Ni.of([o.insert.toString().replace("."," ")])}):o&&o.from>=i.from&&o.to<=i.to&&(o.from!=i.from||o.to!=i.to)&&i.to-i.from-(o.to-o.from)<=4?o={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,o.from).append(o.insert).append(t.state.doc.slice(o.to,i.to))}:Fa.chrome&&o&&o.from==o.to&&o.from==i.head&&"\n "==o.insert.toString()&&t.lineWrapping&&(r&&(r=yn.single(r.main.anchor-1,r.main.head-1)),o={from:i.from,to:i.to,insert:Ni.of([" "])}),o)return wd(t,o,r,n);if(r&&!r.main.eq(i)){let e=!1,o="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),o=t.inputState.lastSelectionOrigin,"select.pointer"==o&&(r=ud(t.state.facet(Ll).map(e=>e(t)),r))),t.dispatch({selection:r,scrollIntoView:e,userEvent:o}),!0}return!1}function wd(t,e,o,r=-1){if(Fa.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Fa.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&" "==t.state.sliceDoc(e.from,i.from))&&1==e.insert.length&&2==e.insert.lines&&ms(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&0==e.insert.length||8==r&&e.insert.length<e.to-e.from&&e.to>i.head)&&ms(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&0==e.insert.length&&ms(t.contentDOM,"Delete",46)))return!0;let n,a=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s=()=>n||(n=function(t,e,o){let r,i=t.state,n=i.selection.main,a=-1;if(e.from==e.to&&e.from<n.from||e.from>n.to){let o=e.from<n.from?-1:1,r=o<0?n.from:n.to,s=pd(i.facet(Ll).map(e=>e(t)),r,o);e.from==s&&(a=s)}if(a>-1)r={changes:e,selection:yn.cursor(e.from+e.insert.length,-1)};else if(e.from>=n.from&&e.to<=n.to&&e.to-e.from>=(n.to-n.from)/3&&(!o||o.main.empty&&o.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let o=n.from<e.from?i.sliceDoc(n.from,e.from):"",a=n.to>e.to?i.sliceDoc(e.to,n.to):"";r=i.replaceSelection(t.state.toText(o+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let a=i.changes(e),s=o&&o.main.to<=a.newLength?o.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=n.to&&e.to>=n.to-10){let l,d=t.state.sliceDoc(e.from,e.to),c=o&&Kl(t,o.main.head);if(c){let t=e.insert.length-(e.to-e.from);l={from:c.from,to:c.to-t}}else l=t.state.doc.lineAt(n.head);let h=n.to-e.to,p=n.to-n.from;r=i.changeByRange(o=>{if(o.from==n.from&&o.to==n.to)return{changes:a,range:s||o.map(a)};let r=o.to-h,c=r-d.length;if(o.to-o.from!=p||t.state.sliceDoc(c,r)!=d||o.to>=l.from&&o.from<=l.to)return{range:o};let u=i.changes({from:c,to:r,insert:e.insert}),m=o.to-n.to;return{changes:u,range:s?yn.range(Math.max(0,s.anchor+m),Math.max(0,s.head+m)):o.map(u)}})}else r={changes:a,selection:s&&i.selection.replaceRange(s)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}(t,e,o));return t.state.facet(kl).some(o=>o(t,e.from,e.to,a,s))||t.dispatch(s()),!0}function kd(t,e,o,r){let i=Math.min(t.length,e.length),n=0;for(;n<i&&t.charCodeAt(n)==e.charCodeAt(n);)n++;if(n==i&&t.length==e.length)return null;let a=t.length,s=e.length;for(;a>0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;return"end"==r&&(o-=a+Math.max(0,n-Math.min(a,s))-n),a<n&&t.length<e.length?(n-=o<=n&&o>=a?n-o:0,s=n+(s-a),a=n):s<n&&(n-=o<=n&&o>=s?n-o:0,a=n+(a-s),s=n),{from:n,toA:a,toB:s}}class qd{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,Fa.safari&&t.contentDOM.addEventListener("input",()=>null),Fa.gecko&&function(t){Hd.has(t)||(Hd.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let o,r=e.target;r!=t.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(o=ys.get(r))&&o.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(t.type,t)):this.runHandlers(t.type,t)))}runHandlers(t,e){let o=this.handlers[t];if(o){for(let t of o.observers)t(this.view,e);for(let t of o.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=Qd(t),o=this.handlers,r=this.view.contentDOM;for(let t in e)if("scroll"!=t){let i=!e[t].handlers.length,n=o[t];n&&i!=!n.handlers.length&&(r.removeEventListener(t,this.handleEvent),n=null),n||r.addEventListener(t,this.handleEvent,{passive:i})}for(let t in o)"scroll"==t||e[t]||r.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&Cd.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),Fa.android&&Fa.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!Fa.ios||t.synthetic||t.altKey||t.metaKey||!((e=$d.find(e=>e.keyCode==t.keyCode))&&!t.ctrlKey||Pd.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&!("Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,ms(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0))}ignoreDuringComposition(t){return!(!/^key/.test(t.type)||t.synthetic)&&(this.composing>0||!!(Fa.safari&&!Fa.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Sd(t,e){return(o,r)=>{try{return e.call(t,r,o)}catch(t){zl(o.state,t)}}}function Qd(t){let e=Object.create(null);function o(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec,r=t&&t.plugin.domEventHandlers,i=t&&t.plugin.domEventObservers;if(r)for(let t in r){let i=r[t];i&&o(t).handlers.push(Sd(e.value,i))}if(i)for(let t in i){let r=i[t];r&&o(t).observers.push(Sd(e.value,r))}}for(let t in Rd)o(t).handlers.push(Rd[t]);for(let t in zd)o(t).observers.push(zd[t]);return e}const $d=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Pd="dthko",Cd=[16,17,18,20,91,92,224,225];function Td(t){return.7*Math.max(0,t)+8}class Ad{constructor(t,e,o,r){this.view=t,this.startEvent=e,this.style=o,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,o,r=t.ownerDocument;for(let i=t.parentNode;i&&!(i==r.body||e&&o);)if(1==i.nodeType)!o&&i.scrollHeight>i.clientHeight&&(o=i),!e&&i.scrollWidth>i.clientWidth&&(e=i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}return{x:e,y:o}}(t.contentDOM),this.atoms=t.state.facet(Ll).map(e=>e(t));let i=t.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(sa.allowMultipleSelections)&&function(t,e){let o=t.state.facet(vl);return o.length?o[0](e):Fa.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:o}=t.state.selection;if(o.empty)return!1;let r=Ha(t.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let t=0;t<i.length;t++){let o=i[t];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}(t,e)||1!=Bd(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let e=0,o=0,r=0,i=0,n=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:n}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:a}=this.scrollParents.y.getBoundingClientRect());let s=Il(this.view);t.clientX-s.left<=r+6?e=-Td(r-t.clientX):t.clientX+s.right>=n-6&&(e=Td(t.clientX-n)),t.clientY-s.top<=i+6?o=-Td(i-t.clientY):t.clientY+s.bottom>=a-6&&(o=Td(t.clientY-a)),this.setScrollSpeed(e,o)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}select(t){let{view:e}=this,o=ud(this.atoms,this.style.get(t,this.extend,this.multiple));!this.mustSelect&&o.eq(e.state.selection,!1===this.dragging)||this.view.dispatch({selection:o,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}}const Rd=Object.create(null),zd=Object.create(null),Md=Fa.ie&&Fa.ie_version<15||Fa.ios&&Fa.webkit_version<604;function Ed(t,e,o){for(let r of t.facet(e))o=r(o,t);return o}function Zd(t,e){e=Ed(t.state,Sl,e);let o,{state:r}=t,i=1,n=r.toText(e),a=n.lines==r.selection.ranges.length;if(null!=Id&&r.selection.ranges.every(t=>t.empty)&&Id==n.toString()){let t=-1;o=r.changeByRange(o=>{let s=r.doc.lineAt(o.from);if(s.from==t)return{range:o};t=s.from;let l=r.toText((a?n.line(i++).text:e)+r.lineBreak);return{changes:{from:s.from,insert:l},range:yn.cursor(o.from+l.length)}})}else o=a?r.changeByRange(t=>{let e=n.line(i++);return{changes:{from:t.from,to:t.to,insert:e.text},range:yn.cursor(t.from+e.length)}}):r.replaceSelection(n);t.dispatch(o,{userEvent:"input.paste",scrollIntoView:!0})}function Xd(t,e,o,r){if(1==r)return yn.cursor(e,o);if(2==r)return function(t,e,o=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),n=e-i.from;if(0==i.length)return yn.cursor(e);0==n?o=1:n==i.length&&(o=-1);let a=n,s=n;o<0?a=an(i.text,n,!1):s=an(i.text,n);let l=r(i.text.slice(a,s));for(;a>0;){let t=an(i.text,a,!1);if(r(i.text.slice(t,a))!=l)break;a=t}for(;s<i.length;){let t=an(i.text,s);if(r(i.text.slice(s,t))!=l)break;s=t}return yn.range(a+i.from,s+i.from)}(t.state,e,o);{let o=Is.find(t.docView,e),r=t.state.doc.lineAt(o?o.posAtEnd:e),i=o?o.posAtStart:r.from,n=o?o.posAtEnd:r.to;return n<t.state.doc.length&&n==r.to&&n++,yn.range(i,n)}}zd.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},Rd.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),zd.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},zd.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Rd.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let o=null;for(let r of t.state.facet(xl))if(o=r(t,e),o)break;if(o||0!=e.button||(o=function(t,e){let o=Dd(t,e),r=Bd(e),i=t.state.selection;return{update(t){t.docChanged&&(o.pos=t.changes.mapPos(o.pos),i=i.map(t.changes))},get(e,n,a){let s,l=Dd(t,e),d=Xd(t,l.pos,l.bias,r);if(o.pos!=l.pos&&!n){let e=Xd(t,o.pos,o.bias,r),i=Math.min(e.from,d.from),n=Math.max(e.to,d.to);d=i<d.from?yn.range(i,n):yn.range(n,i)}return n?i.replaceRange(i.main.extend(d.from,d.to)):a&&1==r&&i.ranges.length>1&&(s=function(t,e){for(let o=0;o<t.ranges.length;o++){let{from:r,to:i}=t.ranges[o];if(r<=e&&i>=e)return yn.create(t.ranges.slice(0,o).concat(t.ranges.slice(o+1)),t.mainIndex==o?0:t.mainIndex-(t.mainIndex>o?1:0))}return null}(i,l.pos))?s:a?i.addRange(d):yn.create([d])}}}(t,e)),o){let r=!t.hasFocus;t.inputState.startMouseSelection(new Ad(t,e,o,r)),r&&t.observer.ignore(()=>{ps(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),!1===i.dragging}else t.inputState.setSelectionOrigin("select.pointer");return!1};let _d=(t,e,o)=>e>=o.top&&e<=o.bottom&&t>=o.left&&t<=o.right;function jd(t,e,o,r){let i=Is.find(t.docView,e);if(!i)return 1;let n=e-i.posAtStart;if(0==n)return 1;if(n==i.length)return-1;let a=i.coordsAt(n,-1);if(a&&_d(o,r,a))return-1;let s=i.coordsAt(n,1);return s&&_d(o,r,s)?1:a&&a.bottom>=r?-1:1}function Dd(t,e){let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:o,bias:jd(t,o,e.clientX,e.clientY)}}const Yd=Fa.ie&&Fa.ie_version<=11;let Vd=null,Ld=0,Ud=0;function Bd(t){if(!Yd)return t.detail;let e=Vd,o=Ud;return Vd=t,Ud=Date.now(),Ld=!e||o>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Ld+1)%3:1}function Wd(t,e,o,r){if(!(o=Ed(t.state,Sl,o)))return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:n}=t.inputState,a=r&&n&&function(t,e){let o=t.state.facet(Ol);return o.length?o[0](e):Fa.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:n.from,to:n.to}:null,s={from:i,insert:o},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Rd.dragstart=(t,e)=>{let{selection:{main:o}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let t=r.posAtStart,e=t+r.length;(t>=o.to||e<=o.from)&&(o=yn.range(t,e))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=o,e.dataTransfer&&(e.dataTransfer.setData("Text",Ed(t.state,Ql,t.state.sliceDoc(o.from,o.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Rd.dragend=t=>(t.inputState.draggedContent=null,!1),Rd.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let o=e.dataTransfer.files;if(o&&o.length){let r=Array(o.length),i=0,n=()=>{++i==o.length&&Wd(t,e,r.filter(t=>null!=t).join(t.state.lineBreak),!1)};for(let t=0;t<o.length;t++){let e=new FileReader;e.onerror=n,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(r[t]=e.result),n()},e.readAsText(o[t])}return!0}{let o=e.dataTransfer.getData("Text");if(o)return Wd(t,e,o,!0),!0}return!1},Rd.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let o=Md?null:e.clipboardData;return o?(Zd(t,o.getData("text/plain")||o.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let o=e.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout(()=>{t.focus(),o.remove(),Zd(t,o.value)},50)}(t),!1)};let Id=null;Rd.copy=Rd.cut=(t,e)=>{let{text:o,ranges:r,linewise:i}=function(t){let e=[],o=[],r=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),o.push(r));if(!e.length){let i=-1;for(let{from:r}of t.selection.ranges){let n=t.doc.lineAt(r);n.number>i&&(e.push(n.text),o.push({from:n.from,to:Math.min(t.doc.length,n.to+1)})),i=n.number}r=!0}return{text:Ed(t,Ql,e.join(t.lineBreak)),ranges:o,linewise:r}}(t.state);if(!o&&!i)return!1;Id=i?o:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let n=Md?null:e.clipboardData;return n?(n.clearData(),n.setData("text/plain",o),!0):(function(t,e){let o=t.dom.parentNode;if(!o)return;let r=o.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}(t,o),!1)};const Gd=In.define();function Nd(t,e){let o=[];for(let r of t.facet(ql)){let i=r(t,e);i&&o.push(i)}return o.length?t.update({effects:o,annotations:Gd.of(!0)}):null}function Fd(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let o=Nd(t.state,e);o?t.dispatch(o):t.update([])}},10)}zd.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Fd(t)},zd.blur=t=>{t.observer.clearSelectionRange(),Fd(t)},zd.compositionstart=zd.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},zd.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Fa.chrome&&Fa.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))},zd.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Rd.beforeinput=(t,e)=>{var o,r;if("insertReplacementText"==e.inputType&&t.observer.editContext){let r=null===(o=e.dataTransfer)||void 0===o?void 0:o.getData("text/plain"),i=e.getTargetRanges();if(r&&i.length){let e=i[0],o=t.posAtDOM(e.startContainer,e.startOffset),n=t.posAtDOM(e.endContainer,e.endOffset);return wd(t,{from:o,to:n,insert:t.state.toText(r)},null),!0}}let i;if(Fa.chrome&&Fa.android&&(i=$d.find(t=>t.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){let e=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout(()=>{var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Fa.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),Fa.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout(()=>zd.compositionend(t,e),20),!1};const Hd=new Set,Kd=["pre-wrap","normal","pre-line","break-spaces"];let Jd=!1;function tc(){Jd=!1}class ec{constructor(t){this.lineWrapping=t,this.doc=Ni.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let o=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(o+=Math.max(0,Math.ceil((e-t-o*this.lineLength*.5)/this.lineLength))),this.lineHeight*o}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return Kd.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let o=0;o<t.length;o++){let r=t[o];r<0?o++:this.heightSamples[Math.floor(10*r)]||(e=!0,this.heightSamples[Math.floor(10*r)]=!0)}return e}refresh(t,e,o,r,i,n){let a=Kd.indexOf(t)>-1,s=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=e,this.charWidth=o,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let t=0;t<n.length;t++){let e=n[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return s}}class oc{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class rc{constructor(t,e,o,r,i){this.from=t,this.length=e,this.top=o,this.height=r,this._content=i}get type(){return"number"==typeof this._content?Ds.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Us?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new rc(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var ic=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(ic||(ic={}));const nc=.001;class ac{constructor(t,e,o=2){this.length=t,this.height=e,this.flags=o}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>nc&&(Jd=!0),this.height=t)}replace(t,e,o){return ac.of(o)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,o,r){let i=this,n=o.doc;for(let a=r.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:d,toB:c}=r[a],h=i.lineAt(s,ic.ByPosNoHeight,o.setDoc(e),0,0),p=h.to>=l?h:i.lineAt(l,ic.ByPosNoHeight,o,0,0);for(c+=p.to-l,l=p.to;a>0&&h.from<=r[a-1].toA;)s=r[a-1].fromA,d=r[a-1].fromB,a--,s<h.from&&(h=i.lineAt(s,ic.ByPosNoHeight,o,0,0));d+=h.from-s,s=h.from;let u=uc.build(o.setDoc(n),t,d,c);i=sc(i,i.replace(s,l,u))}return i.updateHeight(o,0)}static empty(){return new dc(0,0)}static of(t){if(1==t.length)return t[0];let e=0,o=t.length,r=0,i=0;for(;;)if(e==o)if(r>2*i){let i=t[e-1];i.break?t.splice(--e,1,i.left,null,i.right):t.splice(--e,1,i.left,i.right),o+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let e=t[o];e.break?t.splice(o,1,e.left,null,e.right):t.splice(o,1,e.left,e.right),o+=2+e.break,i-=e.size}}else if(r<i){let o=t[e++];o&&(r+=o.size)}else{let e=t[--o];e&&(i+=e.size)}let n=0;return null==t[e-1]?(n=1,e--):null==t[e]&&(n=1,o++),new hc(ac.of(t.slice(0,e)),n,ac.of(t.slice(o)))}}function sc(t,e){return t==e?t:(t.constructor!=e.constructor&&(Jd=!0),e)}ac.prototype.size=1;class lc extends ac{constructor(t,e,o){super(t,e),this.deco=o}blockAt(t,e,o,r){return new rc(r,this.length,o,this.height,this.deco||0)}lineAt(t,e,o,r,i){return this.blockAt(0,o,r,i)}forEachLine(t,e,o,r,i,n){t<=i+this.length&&e>=i&&n(this.blockAt(0,o,r,i))}updateHeight(t,e=0,o=!1,r){return r&&r.from<=e&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class dc extends lc{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,o,r){return new rc(r,this.length,o,this.height,this.breaks)}replace(t,e,o){let r=o[0];return 1==o.length&&(r instanceof dc||r instanceof cc&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof cc?r=new dc(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ac.of(o)}updateHeight(t,e=0,o=!1,r){return r&&r.from<=e&&r.more?this.setHeight(r.heights[r.index++]):(o||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class cc extends ac{constructor(t){super(t,0)}heightMetrics(t,e){let o,r=t.doc.lineAt(e).number,i=t.doc.lineAt(e+this.length).number,n=i-r+1,a=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*n);o=e/n,this.length>n+1&&(a=(this.height-e)/(this.length-n-1))}else o=this.height/n;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(t,e,o,r){let{firstLine:i,lastLine:n,perLine:a,perChar:s}=this.heightMetrics(e,r);if(e.lineWrapping){let i=r+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-o)/this.height))*this.length)),n=e.doc.lineAt(i),l=a+n.length*s,d=Math.max(o,t-l/2);return new rc(n.from,n.length,d,l,0)}{let r=Math.max(0,Math.min(n-i,Math.floor((t-o)/a))),{from:s,length:l}=e.doc.line(i+r);return new rc(s,l,o+a*r,a,0)}}lineAt(t,e,o,r,i){if(e==ic.ByHeight)return this.blockAt(t,o,r,i);if(e==ic.ByPosNoHeight){let{from:e,to:r}=o.doc.lineAt(t);return new rc(e,r-e,0,0,0)}let{firstLine:n,perLine:a,perChar:s}=this.heightMetrics(o,i),l=o.doc.lineAt(t),d=a+l.length*s,c=l.number-n,h=r+a*c+s*(l.from-i-c);return new rc(l.from,l.length,Math.max(r,Math.min(h,r+this.height-d)),d,0)}forEachLine(t,e,o,r,i,n){t=Math.max(t,i),e=Math.min(e,i+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(o,i);for(let d=t,c=r;d<=e;){let e=o.doc.lineAt(d);if(d==t){let o=e.number-a;c+=s*o+l*(t-i-o)}let r=s+l*e.length;n(new rc(e.from,e.length,c,r,0)),c+=r,d=e.to+1}}replace(t,e,o){let r=this.length-e;if(r>0){let t=o[o.length-1];t instanceof cc?o[o.length-1]=new cc(t.length+r):o.push(null,new cc(r-1))}if(t>0){let e=o[0];e instanceof cc?o[0]=new cc(t+e.length):o.unshift(new cc(t-1),null)}return ac.of(o)}decomposeLeft(t,e){e.push(new cc(t-1),null)}decomposeRight(t,e){e.push(null,new cc(this.length-t-1))}updateHeight(t,e=0,o=!1,r){let i=e+this.length;if(r&&r.from<=e+this.length&&r.more){let o=[],n=Math.max(e,r.from),a=-1;for(r.from>e&&o.push(new cc(r.from-e-1).updateHeight(t,e));n<=i&&r.more;){let e=t.doc.lineAt(n).length;o.length&&o.push(null);let i=r.heights[r.index++];-1==a?a=i:Math.abs(i-a)>=nc&&(a=-2);let s=new dc(e,i);s.outdated=!1,o.push(s),n+=e+1}n<=i&&o.push(null,new cc(i-n).updateHeight(t,n));let s=ac.of(o);return(a<0||Math.abs(s.height-this.height)>=nc||Math.abs(a-this.heightMetrics(t,e).perLine)>=nc)&&(Jd=!0),sc(this,s)}return(o||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class hc extends ac{constructor(t,e,o){super(t.length+e+o.length,t.height+o.height,e|(t.outdated||o.outdated?2:0)),this.left=t,this.right=o,this.size=t.size+o.size}get break(){return 1&this.flags}blockAt(t,e,o,r){let i=o+this.left.height;return t<i?this.left.blockAt(t,e,o,r):this.right.blockAt(t,e,i,r+this.left.length+this.break)}lineAt(t,e,o,r,i){let n=r+this.left.height,a=i+this.left.length+this.break,s=e==ic.ByHeight?t<n:t<a,l=s?this.left.lineAt(t,e,o,r,i):this.right.lineAt(t,e,o,n,a);if(this.break||(s?l.to<a:l.from>a))return l;let d=e==ic.ByPosNoHeight?ic.ByPosNoHeight:ic.ByPos;return s?l.join(this.right.lineAt(a,d,o,n,a)):this.left.lineAt(a,d,o,r,i).join(l)}forEachLine(t,e,o,r,i,n){let a=r+this.left.height,s=i+this.left.length+this.break;if(this.break)t<s&&this.left.forEachLine(t,e,o,r,i,n),e>=s&&this.right.forEachLine(t,e,o,a,s,n);else{let l=this.lineAt(s,ic.ByPos,o,r,i);t<l.from&&this.left.forEachLine(t,l.from-1,o,r,i,n),l.to>=t&&l.from<=e&&n(l),e>l.to&&this.right.forEachLine(l.to+1,e,o,a,s,n)}}replace(t,e,o){let r=this.left.length+this.break;if(e<r)return this.balanced(this.left.replace(t,e,o),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-r,e-r,o));let i=[];t>0&&this.decomposeLeft(t,i);let n=i.length;for(let t of o)i.push(t);if(t>0&&pc(i,n-1),e<this.length){let t=i.length;this.decomposeRight(e,i),pc(i,t)}return ac.of(i)}decomposeLeft(t,e){let o=this.left.length;if(t<=o)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&(o++,t>=o&&e.push(null)),t>o&&this.right.decomposeLeft(t-o,e)}decomposeRight(t,e){let o=this.left.length,r=o+this.break;if(t>=r)return this.right.decomposeRight(t-r,e);t<o&&this.left.decomposeRight(t,e),this.break&&t<r&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?ac.of(this.break?[t,null,e]:[t,e]):(this.left=sc(this.left,t),this.right=sc(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,o=!1,r){let{left:i,right:n}=this,a=e+i.length+this.break,s=null;return r&&r.from<=e+i.length&&r.more?s=i=i.updateHeight(t,e,o,r):i.updateHeight(t,e,o),r&&r.from<=a+n.length&&r.more?s=n=n.updateHeight(t,a,o,r):n.updateHeight(t,a,o),s?this.balanced(i,n):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function pc(t,e){let o,r;null==t[e]&&(o=t[e-1])instanceof cc&&(r=t[e+1])instanceof cc&&t.splice(e-1,3,new cc(o.length+1+r.length))}class uc{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof dc?o.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new dc(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,o){if(t<e||o.heightRelevant){let r=o.widget?o.widget.estimatedHeight:0,i=o.widget?o.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let n=e-t;o.block?this.addBlock(new lc(n,r,o)):(n||i||r>=5)&&this.addLineDeco(r,i,n)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new dc(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let o=new cc(e-t);return this.oracle.doc.lineAt(t).to==e&&(o.flags|=4),o}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof dc)return t;let e=new dc(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,o){let r=this.ensureLine();r.length+=o,r.collapsed+=o,r.widgetHeight=Math.max(r.widgetHeight,t),r.breaks+=e,this.writtenTo=this.pos=this.pos+o}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof dc||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new dc(0,-1));let o=t;for(let t of this.nodes)t instanceof dc&&t.updateHeight(this.oracle,o),o+=t?t.length:1;return this.nodes}static build(t,e,o,r){let i=new uc(o,t);return ua.spans(e,o,r,i,0),i.finish(o)}}class mc{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,o,r){(t<e||o&&o.heightRelevant||r&&r.heightRelevant)&&Ws(t,e,this.changes,5)}}function fc(t,e){let o=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,n=Math.max(0,o.left),a=Math.min(i.innerWidth,o.right),s=Math.max(0,o.top),l=Math.min(i.innerHeight,o.bottom);for(let e=t.parentNode;e&&e!=r.body;)if(1==e.nodeType){let o=e,r=window.getComputedStyle(o);if((o.scrollHeight>o.clientHeight||o.scrollWidth>o.clientWidth)&&"visible"!=r.overflow){let r=o.getBoundingClientRect();n=Math.max(n,r.left),a=Math.min(a,r.right),s=Math.max(s,r.top),l=Math.min(e==t.parentNode?i.innerHeight:l,r.bottom)}e="absolute"==r.position||"fixed"==r.position?o.offsetParent:o.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:n-o.left,right:Math.max(n,a)-o.left,top:s-(o.top+e),bottom:Math.max(s,l)-(o.top+e)}}function bc(t,e){let o=t.getBoundingClientRect();return{left:0,right:o.right-o.left,top:e,bottom:o.bottom-(o.top+e)}}class gc{constructor(t,e,o,r){this.from=t,this.to=e,this.size=o,this.displaySize=r}static same(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++){let r=t[o],i=e[o];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(t,e){return Ys.replace({widget:new vc(this.displaySize*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class vc extends js{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class Oc{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=kc,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Js.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(Dl).some(t=>"function"!=typeof t&&"cm-lineWrapping"==t.class);this.heightOracle=new ec(e),this.stateDeco=t.facet(Yl).filter(t=>"function"!=typeof t),this.heightMap=ac.empty().applyChanges(this.stateDeco,Ni.empty,this.heightOracle.setDoc(t.doc),[new Nl(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ys.set(this.lineGaps.map(t=>t.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let o=0;o<=1;o++){let r=o?e.head:e.anchor;if(!t.some(({from:t,to:e})=>r>=t&&r<=e)){let{from:e,to:o}=this.lineBlockAt(r);t.push(new xc(e,o))}}return this.viewports=t.sort((t,e)=>t.from-e.from),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?kc:new qc(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,t=>{this.viewportLines.push(Sc(t,this.scaler))})}update(t,e=null){this.state=t.state;let o=this.stateDeco;this.stateDeco=this.state.facet(Yl).filter(t=>"function"!=typeof t);let r=t.changedRanges,i=Nl.extendWithRanges(r,function(t,e,o){let r=new mc;return ua.compare(t,e,o,r,0),r.changes}(o,this.stateDeco,t?t.changes:un.empty(this.state.doc.length))),n=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);tc(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=n||Jd)&&(t.flags|=2),a?(this.scrollAnchorPos=t.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=n);let s=i.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<s.from||e.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,e));let l=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,t.flags|=this.updateForViewport(),(l||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(Pl)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,o=window.getComputedStyle(e),r=this.heightOracle,i=o.whiteSpace;this.defaultTextDirection="rtl"==o.direction?Js.RTL:Js.LTR;let n=this.heightOracle.mustRefreshForWrapping(i),a=e.getBoundingClientRect(),s=n||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,d=0;if(a.width&&a.height){let{scaleX:t,scaleY:o}=ls(e,a);(t>.005&&Math.abs(this.scaleX-t)>.005||o>.005&&Math.abs(this.scaleY-o)>.005)&&(this.scaleX=t,this.scaleY=o,l|=16,n=s=!0)}let c=(parseInt(o.paddingTop)||0)*this.scaleY,h=(parseInt(o.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==h||(this.paddingTop=c,this.paddingBottom=h,l|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=t.scrollDOM.clientWidth,l|=16);let p=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=bs(t.scrollDOM);let u=(this.printing?bc:fc)(e,this.paddingTop),m=u.top-this.pixelViewport.top,f=u.bottom-this.pixelViewport.bottom;this.pixelViewport=u;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(s=!0)),!this.inView&&!this.scrollTarget&&!function(t){let e=t.getBoundingClientRect(),o=t.ownerDocument.defaultView||window;return e.left<o.innerWidth&&e.right>0&&e.top<o.innerHeight&&e.bottom>0}(t.dom))return 0;let g=a.width;if(this.contentDOMWidth==g&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=t.scrollDOM.clientHeight,l|=16),s){let e=t.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(e)&&(n=!0),n||r.lineWrapping&&Math.abs(g-this.contentDOMWidth)>r.charWidth){let{lineHeight:o,charWidth:a,textHeight:s}=t.docView.measureTextSize();n=o>0&&r.refresh(i,o,a,s,Math.max(5,g/a),e),n&&(t.docView.minWidth=0,l|=16)}m>0&&f>0?d=Math.max(m,f):m<0&&f<0&&(d=Math.min(m,f)),tc();for(let o of this.viewports){let i=o.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(o);this.heightMap=(n?ac.empty().applyChanges(this.stateDeco,Ni.empty,this.heightOracle,[new Nl(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(r,0,n,new oc(o.from,i))}Jd&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),l|=this.updateForViewport()),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(n?[]:this.lineGaps,t)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let o=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:n,visibleBottom:a}=this,s=new xc(r.lineAt(n-1e3*o,ic.ByHeight,i,0,0).from,r.lineAt(a+1e3*(1-o),ic.ByHeight,i,0,0).to);if(e){let{head:t}=e.range;if(t<s.from||t>s.to){let o,n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(t,ic.ByPos,i,0,0);o="center"==e.y?(a.top+a.bottom)/2-n/2:"start"==e.y||"nearest"==e.y&&t<s.from?a.top:a.bottom-n,s=new xc(r.lineAt(o-500,ic.ByHeight,i,0,0).from,r.lineAt(o+n+500,ic.ByHeight,i,0,0).to)}}return s}mapViewport(t,e){let o=e.mapPos(t.from,-1),r=e.mapPos(t.to,1);return new xc(this.heightMap.lineAt(o,ic.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,ic.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},o=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(t,ic.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(e,ic.ByPos,this.heightOracle,0,0),{visibleTop:n,visibleBottom:a}=this;return(0==t||r<=n-Math.max(10,Math.min(-o,250)))&&(e==this.state.doc.length||i>=a+Math.max(10,Math.min(o,250)))&&r>n-2e3&&i<a+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let o=[];for(let r of t)e.touchesRange(r.from,r.to)||o.push(new gc(e.mapPos(r.from),e.mapPos(r.to),r.size,r.displaySize));return o}ensureLineGaps(t,e){let o=this.heightOracle.lineWrapping,r=o?1e4:2e3,i=r>>1,n=r<<1;if(this.defaultTextDirection!=Js.LTR&&!o)return[];let a=[],s=(r,n,l,d)=>{if(n-r<i)return;let c=this.state.selection.main,h=[c.from];c.empty||h.push(c.to);for(let t of h)if(t>r&&t<n)return s(r,t-10,l,d),void s(t+10,n,l,d);let p=function(t,e){for(let o of t)if(e(o))return o}(t,t=>t.from>=l.from&&t.to<=l.to&&Math.abs(t.from-r)<i&&Math.abs(t.to-n)<i&&!h.some(e=>t.from<e&&t.to>e));if(!p){if(n<l.to&&e&&o&&e.visibleRanges.some(t=>t.from<=n&&t.to>=n)){let t=e.moveToLineBoundary(yn.cursor(n),!1,!0).head;t>r&&(n=t)}let t=this.gapSize(l,r,n,d);p=new gc(r,n,t,o||t<2e6?t:2e6)}a.push(p)},l=e=>{if(e.length<n||e.type!=Ds.Text)return;let i=function(t,e,o){let r=[],i=t,n=0;return ua.spans(o,t,e,{span(){},point(t,e){t>i&&(r.push({from:i,to:t}),n+=t-i),i=e}},20),i<e&&(r.push({from:i,to:e}),n+=e-i),{total:n,ranges:r}}(e.from,e.to,this.stateDeco);if(i.total<n)return;let a,l,d=this.scrollTarget?this.scrollTarget.range.head:null;if(o){let t,o,n=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=d){let r=wc(i,d),a=((this.visibleBottom-this.visibleTop)/2+n)/e.height;t=r-a,o=r+a}else t=(this.visibleTop-e.top-n)/e.height,o=(this.visibleBottom-e.top+n)/e.height;a=yc(i,t),l=yc(i,o)}else{let o=i.total*this.heightOracle.charWidth,n=r*this.heightOracle.charWidth,s=0;if(o>2e6)for(let o of t)o.from>=e.from&&o.from<e.to&&o.size!=o.displaySize&&o.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=o.size-o.displaySize);let c,h,p=this.pixelViewport.left+s,u=this.pixelViewport.right+s;if(null!=d){let t=wc(i,d),e=((u-p)/2+n)/o;c=t-e,h=t+e}else c=(p-n)/o,h=(u+n)/o;a=yc(i,c),l=yc(i,h)}a>e.from&&s(e.from,a,e,i),l<e.to&&s(l,e.to,e,i)};for(let t of this.viewportLines)Array.isArray(t.type)?t.type.forEach(l):l(t);return a}gapSize(t,e,o,r){let i=wc(r,o)-wc(r,e);return this.heightOracle.lineWrapping?t.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(t){gc.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=Ys.set(t.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(t){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let o=[];ua.spans(e,this.viewport.from,this.viewport.to,{span(t,e){o.push({from:t,to:e})},point(){}},20);let r=0;if(o.length!=this.visibleRanges.length)r=12;else for(let e=0;e<o.length&&!(8&r);e++){let i=this.visibleRanges[e],n=o[e];i.from==n.from&&i.to==n.to||(r|=4,t&&t.mapPos(i.from,-1)==n.from&&t.mapPos(i.to,1)==n.to||(r|=8))}return this.visibleRanges=o,r}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(e=>e.from<=t&&e.to>=t)||Sc(this.heightMap.lineAt(t,ic.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(e=>e.top<=t&&e.bottom>=t)||Sc(this.heightMap.lineAt(this.scaler.fromDOM(t),ic.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return Sc(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class xc{constructor(t,e){this.from=t,this.to=e}}function yc({total:t,ranges:e},o){if(o<=0)return e[0].from;if(o>=1)return e[e.length-1].to;let r=Math.floor(t*o);for(let t=0;;t++){let{from:o,to:i}=e[t],n=i-o;if(r<=n)return o+r;r-=n}}function wc(t,e){let o=0;for(let{from:r,to:i}of t.ranges){if(e<=i){o+=e-r;break}o+=i-r}return o/t.total}const kc={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class qc{constructor(t,e,o){let r=0,i=0,n=0;this.viewports=o.map(({from:o,to:i})=>{let n=e.lineAt(o,ic.ByPos,t,0,0).top,a=e.lineAt(i,ic.ByPos,t,0,0).bottom;return r+=a-n,{from:o,to:i,top:n,bottom:a,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);for(let t of this.viewports)t.domTop=n+(t.top-i)*this.scale,n=t.domBottom=t.domTop+(t.bottom-t.top),i=t.bottom}toDOM(t){for(let e=0,o=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.top)return r+(t-o)*this.scale;if(t<=i.bottom)return i.domTop+(t-i.top);o=i.bottom,r=i.domBottom}}fromDOM(t){for(let e=0,o=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.domTop)return o+(t-r)/this.scale;if(t<=i.domBottom)return i.top+(t-i.domTop);o=i.bottom,r=i.domBottom}}eq(t){return t instanceof qc&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,o)=>e.from==t.viewports[o].from&&e.to==t.viewports[o].to)}}function Sc(t,e){if(1==e.scale)return t;let o=e.toDOM(t.top),r=e.toDOM(t.bottom);return new rc(t.from,t.length,o,r-o,Array.isArray(t._content)?t._content.map(t=>Sc(t,e)):t._content)}const Qc=qn.define({combine:t=>t.join(" ")}),$c=qn.define({combine:t=>t.indexOf(!0)>-1}),Pc=Ta.newName(),Cc=Ta.newName(),Tc=Ta.newName(),Ac={"&light":"."+Cc,"&dark":"."+Tc};function Rc(t,e,o){return new Ta(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,e=>{if("&"==e)return t;if(!o||!o[e])throw new RangeError(`Unsupported selector: ${e}`);return o[e]}):t+" "+e})}const zc=Rc("."+Pc,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Ac),Mc={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ec=Fa.ie&&Fa.ie_version<=11;class Zc{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new ds,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(e=>{for(let t of e)this.queue.push(t);(Fa.ie&&Fa.ie_version<=11||Fa.ios&&t.composing)&&e.some(t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():this.flush()}),!window.EditContext||!Fa.android||!1===t.constructor.EDIT_CONTEXT||Fa.chrome&&Fa.chrome_version<126||(this.editContext=new jc(t),t.state.facet(Ml)&&(t.contentDOM.editContext=this.editContext.editContext)),Ec&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((e,o)=>e!=t[o]))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:o}=this,r=this.selectionRange;if(o.state.facet(Ml)?o.root.activeElement!=this.dom:!Ja(this.dom,r))return;let i=r.anchorNode&&o.docView.nearest(r.anchorNode);i&&i.ignoreEvent(t)?e||(this.selectionChanged=!1):(Fa.ie&&Fa.ie_version<=11||Fa.android&&Fa.chrome)&&!o.state.selection.main.empty&&r.focusNode&&es(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=Ha(t.root);if(!e)return!1;let o=Fa.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return _c(t,o)}let o=null;function r(t){t.preventDefault(),t.stopImmediatePropagation(),o=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),o?_c(t,o):null}(this.view,e)||e;if(!o||this.selectionRange.eq(o))return!1;let r=Ja(this.dom,o);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let o=e.focusNode,r=e.focusOffset;if(!o||e.anchorNode!=o||e.anchorOffset!=r)return!1;for(r=Math.min(r,ns(o));;)if(r){if(1!=o.nodeType)return!1;let t=o.childNodes[r-1];"false"==t.contentEditable?r--:(o=t,r=ns(o))}else{if(o==t)return!0;r=os(o),o=o.parentNode}}(this.dom,o)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(o),r&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let o=this.dom;o;)if(1==o.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==o?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(o),o=o.assignedSlot||o.parentNode;else{if(11!=o.nodeType)break;o=o.host}if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Mc),Ec&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Ec&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var o;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;t&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&ms(this.dom,t.key,t.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null===(o=this.delayedAndroidKey)||void 0===o?void 0:o.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,o=-1,r=!1;for(let i of t){let t=this.readMutation(i);t&&(t.typeOver&&(r=!0),-1==e?({from:e,to:o}=t):(e=Math.min(t.from,e),o=Math.max(t.to,o)))}return{from:e,to:o,typeOver:r}}readChange(){let{from:t,to:e,typeOver:o}=this.processRecords(),r=this.selectionChanged&&Ja(this.dom,this.selectionRange);if(t<0&&!r)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new xd(this.view,t,e,o);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let o=this.view.state,r=yd(this.view,e);return this.view.state==o&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let o=Xc(e,t.previousSibling||t.target.previousSibling,-1),r=Xc(e,t.nextSibling||t.target.nextSibling,1);return{from:o?e.posAfter(o):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(Ml)!=t.state.facet(Ml)&&(t.view.contentDOM.editContext=t.state.facet(Ml)?this.editContext.editContext:null))}destroy(){var t,e,o;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(o=this.resizeScroll)||void 0===o||o.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Xc(t,e,o){for(;e;){let r=ys.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:o>0?e.nextSibling:e.previousSibling}return null}function _c(t,e){let o=e.startContainer,r=e.startOffset,i=e.endContainer,n=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return es(a.node,a.offset,i,n)&&([o,r,i,n]=[i,n,o,r]),{anchorNode:o,anchorOffset:r,focusNode:i,focusOffset:n}}class jc{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=o=>{let r=t.state.selection.main,{anchor:i,head:n}=r,a=this.toEditorPos(o.updateRangeStart),s=this.toEditorPos(o.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:o.updateRangeStart,editorBase:a,drifted:!1});let l=s-a>o.text.length;a==this.from&&i<this.from?a=i:s==this.to&&i>this.to&&(s=i);let d=kd(t.state.sliceDoc(a,s),o.text,(l?r.from:r.to)-a,l?"end":null);if(!d){let e=yn.single(this.toEditorPos(o.selectionStart),this.toEditorPos(o.selectionEnd));return void(e.main.eq(r)||t.dispatch({selection:e,userEvent:"select"}))}let c={from:d.from+a,to:d.toA+a,insert:Ni.of(o.text.slice(d.from,d.toB).split("\n"))};if((Fa.mac||Fa.android)&&c.from==n-1&&/^\. ?$/.test(o.text)&&"off"==t.contentDOM.getAttribute("autocorrect")&&(c={from:a,to:s,insert:Ni.of([o.text.replace("."," ")])}),this.pendingContextChange=c,!t.state.readOnly){let e=this.to-this.from+(c.to-c.from+c.insert.length);wd(t,c,yn.single(this.toEditorPos(o.selectionStart,e),this.toEditorPos(o.selectionEnd,e)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)),c.from<c.to&&!c.insert.length&&t.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(e.text.slice(Math.max(0,o.updateRangeStart-1),Math.min(e.text.length,o.updateRangeStart+1)))&&this.handlers.compositionend(o)},this.handlers.characterboundsupdate=o=>{let r=[],i=null;for(let e=this.toEditorPos(o.rangeStart),n=this.toEditorPos(o.rangeEnd);e<n;e++){let o=t.coordsForChar(e);i=o&&new DOMRect(o.left,o.top,o.right-o.left,o.bottom-o.top)||i||new DOMRect,r.push(i)}e.updateCharacterBounds(o.rangeStart,r)},this.handlers.textformatupdate=e=>{let o=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,r=t.underlineThickness;if(!/none/i.test(e)&&!/none/i.test(r)){let i=this.toEditorPos(t.rangeStart),n=this.toEditorPos(t.rangeEnd);if(i<n){let t=`text-decoration: underline ${/^[a-z]/.test(e)?e+" ":"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${/thin/i.test(r)?1:2}px`;o.push(Ys.mark({attributes:{style:t}}).range(i,n))}}}t.dispatch({effects:Rl.of(Ys.set(o))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=Ha(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,o=!1,r=this.pendingContextChange;return t.changes.iterChanges((i,n,a,s,l)=>{if(o)return;let d=l.length-(n-i);if(r&&n>=r.to){if(r.from==i&&r.to==n&&r.insert.eq(l))return r=this.pendingContextChange=null,e+=d,void(this.to+=d);r=null,this.revertPending(t.state)}if(i+=e,(n+=e)<=this.from)this.from+=d,this.to+=d;else if(i<this.to){if(i<this.from||n>this.to||this.to-this.from+l.length>3e4)return void(o=!0);this.editContext.updateText(this.toContextPos(i),this.toContextPos(n),l.toString()),this.to+=d}e+=d}),r&&!o&&this.revertPending(t.state),!o}update(t){let e=this.pendingContextChange,o=t.startState.selection.main;this.composing&&(this.composing.drifted||!t.changes.touchesRange(o.from,o.to)&&t.transactions.some(t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,o=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),r=this.toContextPos(e.head);this.editContext.selectionStart==o&&this.editContext.selectionEnd==r||this.editContext.updateSelection(o,r)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>3e4)}toEditorPos(t,e=this.to-this.from){t=Math.min(t,e);let o=this.composing;return o&&o.drifted?o.editorBase+(t-o.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class Dc{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:o}=t;this.dispatchTransactions=t.dispatchTransactions||o&&(t=>t.forEach(t=>o(t,this)))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Oc(t.state||sa.create(t)),t.scrollTo&&t.scrollTo.is(Al)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Zl).map(t=>new _l(t));for(let t of this.plugins)t.update(this);this.observer=new Zc(this),this.inputState=new qd(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Hl(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...t){let e=1==t.length&&t[0]instanceof Hn?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,o=!1,r=!1,i=this.state;for(let e of t){if(e.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=e.state}if(this.destroyed)return void(this.viewState.state=i);let n=this.hasFocus,a=0,s=null;t.some(t=>t.annotation(Gd))?(this.inputState.notifiedFocused=n,a=1):n!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=n,s=Nd(i,n),s||(a=1));let l=this.observer.delayedAndroidKey,d=null;if(l?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(d=null)):this.observer.clear(),i.facet(sa.phrases)!=this.state.facet(sa.phrases))return this.setState(i);e=Fl.create(this,i,t),e.flags|=a;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new Tl(t.empty?t:yn.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(Al)&&(c=t.value.clip(this.state))}this.viewState.update(e,c),this.bidiCache=Lc.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),o=this.docView.update(e),this.state.facet(Gl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(o,t.some(t=>t.isUserEvent("select.pointer")))}finally{this.updateState=0}if(e.startState.facet(Qc)!=e.state.facet(Qc)&&(this.viewState.mustMeasureContent=!0),(o||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),o&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(wl))try{t(e)}catch(t){zl(this.state,t,"update listener")}(s||d)&&Promise.resolve().then(()=>{s&&this.state==s.startState&&this.dispatch(s),d&&!yd(this,d)&&l.force&&ms(this.contentDOM,l.key,l.keyCode)})}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Oc(t),this.plugins=t.facet(Zl).map(t=>new _l(t)),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new Hl(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(Zl),o=t.state.facet(Zl);if(e!=o){let r=[];for(let i of o){let o=e.indexOf(i);if(o<0)r.push(new _l(i));else{let e=this.plugins[o];e.mustUpdate=t,r.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t<this.plugins.length;t++)this.plugins[t].update(this);e!=o&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let e=t.value;if(e&&e.docViewUpdate)try{e.docViewUpdate(this)}catch(t){zl(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,o=this.scrollDOM,r=o.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:n}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(n=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(n<0)if(bs(o))i=-1,n=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(r);i=t.from,n=t.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map(t=>{try{return t.read(this)}catch(t){return zl(this.state,t),Vc}}),d=Fl.create(this,this.state,[]),c=!1;d.flags|=a,e?e.flags|=a:e=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),c=this.docView.update(d),c&&this.docViewUpdate());for(let t=0;t<s.length;t++)if(l[t]!=Vc)try{let e=s[t];e.write&&e.write(l[t],this)}catch(t){zl(this.state,t)}if(c&&this.docView.updateSelection(!0),!d.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,n=-1;continue}{let t=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-n;if(t>1||t<-1){r+=t,o.scrollTop=r/this.scaleY,n=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(wl))t(e)}get themeClasses(){return Pc+" "+(this.state.facet($c)?Tc:Cc)+" "+this.state.facet(Qc)}updateAttrs(){let t=Uc(this,jl,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ml)?"true":"false",class:"cm-content",style:`${Fa.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),Uc(this,Dl,e);let o=this.observer.ignore(()=>{let o=Xs(this.contentDOM,this.contentAttrs,e),r=Xs(this.dom,this.editorAttrs,t);return o||r});return this.editorAttrs=t,this.contentAttrs=e,o}showAnnouncements(t){let e=!0;for(let o of t)for(let t of o.effects)t.is(Dc.announce)&&(e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value)}mountStyles(){this.styleModules=this.state.facet(Gl);let t=this.state.facet(Dc.cspNonce);Ta.mount(this.root,this.styleModules.concat(zc).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key)return void(this.measureRequests[e]=t);this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.plugin!=t)&&this.pluginMap.set(t,e=this.plugins.find(e=>e.plugin==t)||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,o){return md(this,t,hd(this,t,e,o))}moveByGroup(t,e){return md(this,t,hd(this,t,e,e=>function(t,e,o){let r=t.state.charCategorizer(e),i=r(o);return t=>{let e=r(t);return i==ia.Space&&(i=e),i==e}}(this,t.head,e)))}visualLineSide(t,e){let o=this.bidiSpans(t),r=this.textDirectionAt(t.from),i=o[e?o.length-1:0];return yn.cursor(i.side(e,r)+t.from,i.forward(!e,r)?1:-1)}moveToLineBoundary(t,e,o=!0){return function(t,e,o,r){let i=cd(t,e.head,e.assoc||-1),n=r&&i.type==Ds.Text&&(t.lineWrapping||i.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head):null;if(n){let e=t.dom.getBoundingClientRect(),r=t.textDirectionAt(i.from),a=t.posAtCoords({x:o==(r==Js.LTR)?e.right-1:e.left+1,y:(n.top+n.bottom)/2});if(null!=a)return yn.cursor(a,o?-1:1)}return yn.cursor(o?i.to:i.from,o?-1:1)}(this,t,e,o)}moveVertically(t,e,o){return md(this,t,function(t,e,o,r){let i=e.head,n=o?1:-1;if(i==(o?t.state.doc.length:0))return yn.cursor(i,e.assoc);let a,s=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),d=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(d)null==s&&(s=d.left-l.left),a=n<0?d.top:d.bottom;else{let e=t.viewState.lineBlockAt(i);null==s&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-e.from))),a=(n<0?e.top:e.bottom)+c}let h=l.left+s,p=null!=r?r:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let o=a+(p+e)*n,r=sd(t,{x:h,y:o},!1,n);if(o<l.top||o>l.bottom||(n<0?r<i:r>i)){let e=t.docView.coordsForChar(r),i=!e||o<e.top?-1:1;return yn.cursor(r,i,void 0,s)}}}(this,t,e,o))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),sd(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let o=this.docView.coordsAt(t,e);if(!o||o.left==o.right)return o;let r=this.state.doc.lineAt(t),i=this.bidiSpans(r);return as(o,i[dl.find(i,t-r.from,-1,e)].dir==Js.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet($l)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>Yc)return ml(t.length);let e,o=this.textDirectionAt(t.from);for(let r of this.bidiCache)if(r.from==t.from&&r.dir==o&&(r.fresh||cl(r.isolates,e=Bl(this,t))))return r.order;e||(e=Bl(this,t));let r=function(t,e,o){if(!t)return[new dl(0,0,e==el?1:0)];if(e==tl&&!o.length&&!ll.test(t))return ml(t.length);if(o.length)for(;t.length>hl.length;)hl[hl.length]=256;let r=[],i=e==tl?0:1;return ul(t,i,i,o,0,t.length,r),r}(t.text,o,e);return this.bidiCache.push(new Lc(t.from,t.to,o,e,!0,r)),r}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||Fa.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ps(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return Al.of(new Tl("number"==typeof t?yn.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,o=this.viewState.scrollAnchorAt(t);return Al.of(new Tl(yn.cursor(o.from),"start","start",o.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return Xl.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return Xl.define(()=>({}),{eventObservers:t})}static theme(t,e){let o=Ta.newName(),r=[Qc.of(o),Gl.of(Rc(`.${o}`,t))];return e&&e.dark&&r.push($c.of(!0)),r}static baseTheme(t){return zn.lowest(Gl.of(Rc("."+Pc,t,Ac)))}static findFromDOM(t){var e;let o=t.querySelector(".cm-content"),r=o&&ys.get(o)||ys.get(t);return(null===(e=null==r?void 0:r.rootView)||void 0===e?void 0:e.view)||null}}Dc.styleModule=Gl,Dc.inputHandler=kl,Dc.clipboardInputFilter=Sl,Dc.clipboardOutputFilter=Ql,Dc.scrollHandler=Cl,Dc.focusChangeEffect=ql,Dc.perLineTextDirection=$l,Dc.exceptionSink=yl,Dc.updateListener=wl,Dc.editable=Ml,Dc.mouseSelectionStyle=xl,Dc.dragMovesSelection=Ol,Dc.clickAddsSelectionRange=vl,Dc.decorations=Yl,Dc.outerDecorations=Vl,Dc.atomicRanges=Ll,Dc.bidiIsolatedRanges=Ul,Dc.scrollMargins=Wl,Dc.darkTheme=$c,Dc.cspNonce=qn.define({combine:t=>t.length?t[0]:""}),Dc.contentAttributes=Dl,Dc.editorAttributes=jl,Dc.lineWrapping=Dc.contentAttributes.of({class:"cm-lineWrapping"}),Dc.announce=Fn.define();const Yc=4096,Vc={};class Lc{constructor(t,e,o,r,i,n){this.from=t,this.to=e,this.dir=o,this.isolates=r,this.fresh=i,this.order=n}static update(t,e){if(e.empty&&!t.some(t=>t.fresh))return t;let o=[],r=t.length?t[t.length-1].dir:Js.LTR;for(let i=Math.max(0,t.length-10);i<t.length;i++){let n=t[i];n.dir!=r||e.touchesRange(n.from,n.to)||o.push(new Lc(e.mapPos(n.from,1),e.mapPos(n.to,-1),n.dir,n.isolates,!1,n.order))}return o}}function Uc(t,e,o){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let e=r[i],n="function"==typeof e?e(t):e;n&&Ms(n,o)}return o}const Bc=Fa.mac?"mac":Fa.windows?"win":Fa.linux?"linux":"key";function Wc(t,e,o){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==o&&e.shiftKey&&(t="Shift-"+t),t}const Ic=zn.default(Dc.domEventHandlers({keydown:(t,e)=>th(Fc(e.state),t,e,"editor")})),Gc=qn.define({enables:Ic}),Nc=new WeakMap;function Fc(t){let e=t.facet(Gc),o=Nc.get(e);return o||Nc.set(e,o=function(t,e=Bc){let o=Object.create(null),r=Object.create(null),i=(t,e)=>{let o=r[t];if(null==o)r[t]=e;else if(o!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},n=(t,r,n,a,s)=>{var l,d;let c=o[t]||(o[t]=Object.create(null)),h=r.split(/ (?!$)/).map(t=>function(t,e){const o=t.split(/-(?!$)/);let r,i,n,a,s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t<o.length-1;++t){const s=o[t];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))n=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);"mac"==e?a=!0:i=!0}}return r&&(s="Alt-"+s),i&&(s="Ctrl-"+s),a&&(s="Meta-"+s),n&&(s="Shift-"+s),s}(t,e));for(let e=1;e<h.length;e++){let o=h.slice(0,e).join(" ");i(o,!0),c[o]||(c[o]={preventDefault:!0,stopPropagation:!1,run:[e=>{let r=Hc={view:e,prefix:o,scope:t};return setTimeout(()=>{Hc==r&&(Hc=null)},Kc),!0}]})}let p=h.join(" ");i(p,!1);let u=c[p]||(c[p]={preventDefault:!1,stopPropagation:!1,run:(null===(d=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===d?void 0:d.slice())||[]});n&&u.run.push(n),a&&(u.preventDefault=!0),s&&(u.stopPropagation=!0)};for(let r of t){let t=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let e of t){let t=o[e]||(o[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=r;for(let e in t)t[e].run.push(t=>i(t,Jc))}let i=r[e]||r.key;if(i)for(let e of t)n(e,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&n(e,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return o}(e.reduce((t,e)=>t.concat(e),[]))),o}let Hc=null;const Kc=4e3;let Jc=null;function th(t,e,o,r){Jc=e;let i=function(t){var e=!(Ea&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Za&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?Ma:za)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),n=dn(sn(i,0))==i.length&&" "!=i,a="",s=!1,l=!1,d=!1;Hc&&Hc.view==o&&Hc.scope==r&&(a=Hc.prefix+" ",Cd.indexOf(e.keyCode)<0&&(l=!0,Hc=null));let c,h,p=new Set,u=t=>{if(t){for(let e of t.run)if(!p.has(e)&&(p.add(e),e(o)))return t.stopPropagation&&(d=!0),!0;t.preventDefault&&(t.stopPropagation&&(d=!0),l=!0)}return!1},m=t[r];return m&&(u(m[a+Wc(i,e,!n)])?s=!0:!n||!(e.altKey||e.metaKey||e.ctrlKey)||Fa.windows&&e.ctrlKey&&e.altKey||Fa.mac&&e.altKey&&!e.ctrlKey&&!e.metaKey||!(c=za[e.keyCode])||c==i?n&&e.shiftKey&&u(m[a+Wc(i,e,!0)])&&(s=!0):(u(m[a+Wc(c,e,!0)])||e.shiftKey&&(h=Ma[e.keyCode])!=i&&h!=c&&u(m[a+Wc(h,e,!1)]))&&(s=!0),!s&&u(m._any)&&(s=!0)),l&&(s=!0),s&&d&&e.stopPropagation(),Jc=null,s}class eh{constructor(t,e,o,r,i){this.className=t,this.left=e,this.top=o,this.width=r,this.height=i}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,o){if(o.empty){let r=t.coordsAtPos(o.head,o.assoc||1);if(!r)return[];let i=oh(t);return[new eh(e,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(t,e,o){if(o.to<=t.viewport.from||o.from>=t.viewport.to)return[];let r=Math.max(o.from,t.viewport.from),i=Math.min(o.to,t.viewport.to),n=t.textDirection==Js.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=oh(t),d=a.querySelector(".cm-line"),c=d&&window.getComputedStyle(d),h=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),p=s.right-(c?parseInt(c.paddingRight):0),u=cd(t,r,1),m=cd(t,i,-1),f=u.type==Ds.Text?u:null,b=m.type==Ds.Text?m:null;if(f&&(t.lineWrapping||u.widgetLineBreaks)&&(f=rh(t,r,1,f)),b&&(t.lineWrapping||m.widgetLineBreaks)&&(b=rh(t,i,-1,b)),f&&b&&f.from==b.from&&f.to==b.to)return v(O(o.from,o.to,f));{let e=f?O(o.from,null,f):x(u,!1),r=b?O(null,o.to,b):x(m,!0),i=[];return(f||u).to<(b||m).from-(f&&b?1:0)||u.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<r.top?i.push(g(h,e.bottom,p,r.top)):e.bottom<r.top&&t.elementAtHeight((e.bottom+r.top)/2).type==Ds.Text&&(e.bottom=r.top=(e.bottom+r.top)/2),v(e).concat(i).concat(v(r))}function g(t,o,r,i){return new eh(e,t-l.left,o-l.top,r-t,i-o)}function v({top:t,bottom:e,horizontal:o}){let r=[];for(let i=0;i<o.length;i+=2)r.push(g(o[i],t,o[i+1],e));return r}function O(e,o,r){let i=1e9,a=-1e9,s=[];function l(e,o,l,d,c){let u=t.coordsAtPos(e,e==r.to?-2:2),m=t.coordsAtPos(l,l==r.from?2:-2);u&&m&&(i=Math.min(u.top,m.top,i),a=Math.max(u.bottom,m.bottom,a),c==Js.LTR?s.push(n&&o?h:u.left,n&&d?p:m.right):s.push(!n&&d?h:m.left,!n&&o?p:u.right))}let d=null!=e?e:r.from,c=null!=o?o:r.to;for(let r of t.visibleRanges)if(r.to>d&&r.from<c)for(let i=Math.max(r.from,d),n=Math.min(r.to,c);;){let r=t.state.doc.lineAt(i);for(let a of t.bidiSpans(r)){let t=a.from+r.from,s=a.to+r.from;if(t>=n)break;s>i&&l(Math.max(t,i),null==e&&t<=d,Math.min(s,n),null==o&&s>=c,a.dir)}if(i=r.to+1,i>=n)break}return 0==s.length&&l(d,null==e,c,null==o,t.textDirection),{top:i,bottom:a,horizontal:s}}function x(t,e){let o=s.top+(e?t.top:t.bottom);return{top:o,bottom:o,horizontal:[]}}}(t,e,o)}}function oh(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Js.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function rh(t,e,o,r){let i=t.coordsAtPos(e,2*o);if(!i)return r;let n=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:n.left+1,y:a}),l=t.posAtCoords({x:n.right-1,y:a});return null==s||null==l?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}class ih{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(nh)!=t.state.facet(nh)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,o=t.facet(nh);for(;e<o.length&&o[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;t==this.scaleX&&e==this.scaleY||(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some((t,e)=>!function(t,e){return t.constructor==e.constructor&&t.eq(e)}(t,this.drawn[e]))){let e=this.dom.firstChild,o=0;for(let r of t)r.update&&e&&r.constructor&&this.drawn[o].constructor&&r.update(e,this.drawn[o])?(e=e.nextSibling,o++):this.dom.insertBefore(r.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t,Fa.ios&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const nh=qn.define();function ah(t){return[Xl.define(e=>new ih(e,t)),nh.of(t)]}const sh=qn.define({combine:t=>la(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function lh(t={}){return[sh.of(t),ch,ph,uh,Pl.of(!0)]}function dh(t){return t.startState.facet(sh)!=t.state.facet(sh)}const ch=ah({above:!0,markers(t){let{state:e}=t,o=e.facet(sh),r=[];for(let i of e.selection.ranges){let n=i==e.selection.main;if(i.empty||o.drawRangeCursor){let e=n?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=i.empty?i:yn.cursor(i.head,i.head>i.anchor?-1:1);for(let i of eh.forRange(t,e,o))r.push(i)}}return r},update(t,e){t.transactions.some(t=>t.selection)&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let o=dh(t);return o&&hh(t.state,e),t.docChanged||t.selectionSet||o},mount(t,e){hh(e.state,t)},class:"cm-cursorLayer"});function hh(t,e){e.style.animationDuration=t.facet(sh).cursorBlinkRate+"ms"}const ph=ah({above:!1,markers:t=>t.state.selection.ranges.map(e=>e.empty?[]:eh.forRange(t,"cm-selectionBackground",e)).reduce((t,e)=>t.concat(e)),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||dh(t),class:"cm-selectionLayer"}),uh=zn.highest(Dc.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),mh=Fn.define({map:(t,e)=>null==t?null:e.mapPos(t)}),fh=An.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce((t,e)=>e.is(mh)?e.value:t,t))}),bh=Xl.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let o=t.state.field(fh);null==o?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(fh)!=o||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(fh),o=null!=e&&t.coordsAtPos(e);if(!o)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:o.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:o.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:o.bottom-o.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:o}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/o+"px",this.cursor.style.height=t.height/o+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(fh)!=t&&this.view.dispatch({effects:mh.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function gh(t,e,o,r,i){e.lastIndex=0;for(let n,a=t.iterRange(o,r),s=o;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;n=e.exec(a.value);)i(s+n.index,n)}class vh{constructor(t){const{regexp:e,decoration:o,decorate:r,boundary:i,maxLength:n=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=(t,e,o,i)=>r(i,o,o+t[0].length,t,e);else if("function"==typeof o)this.addMatch=(t,e,r,i)=>{let n=o(t,e,r);n&&i(r,r+t[0].length,n)};else{if(!o)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,r,i)=>i(r,r+t[0].length,o)}this.boundary=i,this.maxLength=n}createDeco(t){let e=new ma,o=e.add.bind(e);for(let{from:e,to:r}of function(t,e){let o=t.visibleRanges;if(1==o.length&&o[0].from==t.viewport.from&&o[0].to==t.viewport.to)return o;let r=[];for(let{from:i,to:n}of o)i=Math.max(t.state.doc.lineAt(i).from,i-e),n=Math.min(t.state.doc.lineAt(n).to,n+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=n:r.push({from:i,to:n});return r}(t,this.maxLength))gh(t.state.doc,this.regexp,e,r,(e,r)=>this.addMatch(r,t,e,o));return e.finish()}updateDeco(t,e){let o=1e9,r=-1;return t.docChanged&&t.changes.iterChanges((e,i,n,a)=>{a>=t.view.viewport.from&&n<=t.view.viewport.to&&(o=Math.min(n,o),r=Math.max(a,r))}),t.viewportMoved||r-o>1e3?this.createDeco(t.view):r>-1?this.updateRange(t.view,e.map(t.changes),o,r):e}updateRange(t,e,o,r){for(let i of t.visibleRanges){let n=Math.max(i.from,o),a=Math.min(i.to,r);if(a>=n){let o=t.state.doc.lineAt(n),r=o.to<a?t.state.doc.lineAt(a):o,s=Math.max(i.from,o.from),l=Math.min(i.to,r.to);if(this.boundary){for(;n>o.from;n--)if(this.boundary.test(o.text[n-1-o.from])){s=n;break}for(;a<r.to;a++)if(this.boundary.test(r.text[a-r.from])){l=a;break}}let d,c=[],h=(t,e,o)=>c.push(o.range(t,e));if(o==r)for(this.regexp.lastIndex=s-o.from;(d=this.regexp.exec(o.text))&&d.index<l-o.from;)this.addMatch(d,t,d.index+o.from,h);else gh(t.state.doc,this.regexp,s,l,(e,o)=>this.addMatch(o,t,e,h));e=e.update({filterFrom:s,filterTo:l,filter:(t,e)=>t<s||e>l,add:c})}}return e}}const Oh=null!=/x/.unicode?"gu":"g",xh=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",Oh),yh={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let wh=null;const kh=qn.define({combine(t){let e=la(t,{render:null,specialChars:xh,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==wh&&"undefined"!=typeof document&&document.body){let e=document.body.style;wh=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return wh||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,Oh)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Oh)),e}});function qh(t={}){return[kh.of(t),Sh||(Sh=Xl.fromClass(class{constructor(t){this.view=t,this.decorations=Ys.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(kh)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new vh({regexp:t.specialChars,decoration:(e,o,r)=>{let{doc:i}=o.state,n=sn(e[0],0);if(9==n){let t=i.lineAt(r),e=o.state.tabSize,n=Sa(t.text,e,r-t.from);return Ys.replace({widget:new $h((e-n%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[n]||(this.decorationCache[n]=Ys.replace({widget:new Qh(t,n)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(kh);t.startState.facet(kh)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let Sh=null;class Qh extends js{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"":String.fromCharCode(9216+t)}(this.code),o=t.state.phrase("Control character")+" "+(yh[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,o,e);if(r)return r;let i=document.createElement("span");return i.textContent=e,i.title=o,i.setAttribute("aria-label",o),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class $h extends js{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const Ph=Ys.line({class:"cm-activeLine"}),Ch=Xl.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,o=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(o.push(Ph.range(i.from)),e=i.from)}return Ys.set(o)}},{decorations:t=>t.decorations}),Th=2e3;function Ah(t,e){let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(o),i=o-r.from,n=i>Th?-1:i==r.length?function(t,e){let o=t.coordsAtPos(t.viewport.from);return o?Math.round(Math.abs((o.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):Sa(r.text,t.state.tabSize,o-r.from);return{line:r.number,col:n,off:i}}function Rh(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return Dc.mouseSelectionStyle.of((t,o)=>e(o)?function(t,e){let o=Ah(t,e),r=t.state.selection;return o?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(o.line).from),i=t.state.doc.lineAt(e);o={line:i.number,col:o.col,off:Math.min(o.off,i.length)},r=r.map(t.changes)}},get(e,i,n){let a=Ah(t,e);if(!a)return r;let s=function(t,e,o){let r=Math.min(e.line,o.line),i=Math.max(e.line,o.line),n=[];if(e.off>Th||o.off>Th||e.col<0||o.col<0){let a=Math.min(e.off,o.off),s=Math.max(e.off,o.off);for(let e=r;e<=i;e++){let o=t.doc.line(e);o.length<=s&&n.push(yn.range(o.from+a,o.to+s))}}else{let a=Math.min(e.col,o.col),s=Math.max(e.col,o.col);for(let e=r;e<=i;e++){let o=t.doc.line(e),r=Qa(o.text,a,t.tabSize,!0);if(r<0)n.push(yn.cursor(o.to));else{let e=Qa(o.text,s,t.tabSize);n.push(yn.range(o.from+r,o.from+e))}}}return n}(t.state,o,a);return s.length?n?yn.create(s.concat(r.ranges)):yn.create(s):r}}:null}(t,o):null)}const zh={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Mh={style:"cursor: crosshair"};function Eh(t={}){let[e,o]=zh[t.key||"Alt"],r=Xl.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||o(t))},keyup(t){t.keyCode!=e&&o(t)||this.set(!1)},mousemove(t){this.set(o(t))}}});return[r,Dc.contentAttributes.of(t=>{var e;return(null===(e=t.plugin(r))||void 0===e?void 0:e.isDown)?Mh:null})]}const Zh="-10000px";class Xh{constructor(t,e,o,r){this.facet=e,this.createTooltipView=o,this.removeTooltipView=r,this.input=t.state.facet(e),this.tooltips=this.input.filter(t=>t);let i=null;this.tooltipViews=this.tooltips.map(t=>i=o(t,i))}update(t,e){var o;let r=t.state.facet(this.facet),i=r.filter(t=>t);if(r===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let n=[],a=e?[]:null;for(let o=0;o<i.length;o++){let r=i[o],s=-1;if(r){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==r.create&&(s=t)}if(s<0)n[o]=this.createTooltipView(r,o?n[o-1]:null),a&&(a[o]=!!r.above);else{let r=n[o]=this.tooltipViews[s];a&&(a[o]=e[s]),r.update&&r.update(t)}}}for(let t of this.tooltipViews)n.indexOf(t)<0&&(this.removeTooltipView(t),null===(o=t.destroy)||void 0===o||o.call(t));return e&&(a.forEach((t,o)=>e[o]=t),e.length=a.length),this.input=r,this.tooltips=i,this.tooltipViews=n,!0}}function _h(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const jh=qn.define({combine:t=>{var e,o,r;return{position:Fa.ios?"absolute":(null===(e=t.find(t=>t.position))||void 0===e?void 0:e.position)||"fixed",parent:(null===(o=t.find(t=>t.parent))||void 0===o?void 0:o.parent)||null,tooltipSpace:(null===(r=t.find(t=>t.tooltipSpace))||void 0===r?void 0:r.tooltipSpace)||_h}}}),Dh=new WeakMap,Yh=Xl.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(jh);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Xh(t,Bh,(t,e)=>this.createTooltip(t,e),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let o=e||t.geometryChanged,r=t.state.facet(jh);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;o=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);o=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);o&&this.maybeMeasure()}createTooltip(t,e){let o=t.create(this.view),r=e?e.dom:null;if(o.dom.classList.add("cm-tooltip"),t.arrow&&!o.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",o.dom.appendChild(t)}return o.dom.style.position=this.position,o.dom.style.top=Zh,o.dom.style.left="0px",this.container.insertBefore(o.dom,r),o.mount&&o.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(o.dom),o}destroy(){var t,e,o;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(o=this.intersectionObserver)||void 0===o||o.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,o=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(Fa.gecko)o=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==Zh&&"0px"==t.style.left){let e=t.getBoundingClientRect();o=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(o||"absolute"==this.position)if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=Il(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((t,e)=>{let o=this.manager.tooltipViews[e];return o.getCoords?o.getCoords(t.pos):this.view.coordsAtPos(t.pos)}),size:this.manager.tooltipViews.map(({dom:t})=>t.getBoundingClientRect()),space:this.view.state.facet(jh).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:o}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{visible:o,space:r,scaleX:i,scaleY:n}=t,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],d=this.manager.tooltipViews[s],{dom:c}=d,h=t.pos[s],p=t.size[s];if(!h||!1!==l.clip&&(h.bottom<=Math.max(o.top,r.top)||h.top>=Math.min(o.bottom,r.bottom)||h.right<Math.max(o.left,r.left)-.1||h.left>Math.min(o.right,r.right)+.1)){c.style.top=Zh;continue}let u=l.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,m=u?7:0,f=p.right-p.left,b=null!==(e=Dh.get(d))&&void 0!==e?e:p.bottom-p.top,g=d.offset||Uh,v=this.view.textDirection==Js.LTR,O=p.width>r.right-r.left?v?r.left:r.right-p.width:v?Math.max(r.left,Math.min(h.left-(u?14:0)+g.x,r.right-f)):Math.min(Math.max(r.left,h.left-f+(u?14:0)-g.x),r.right-f),x=this.above[s];!l.strictSide&&(x?h.top-b-m-g.y<r.top:h.bottom+b+m+g.y>r.bottom)&&x==r.bottom-h.bottom>h.top-r.top&&(x=this.above[s]=!x);let y=(x?h.top-r.top:r.bottom-h.bottom)-m;if(y<b&&!1!==d.resize){if(y<this.view.defaultLineHeight){c.style.top=Zh;continue}Dh.set(d,b),c.style.height=(b=y)/n+"px"}else c.style.height&&(c.style.height="");let w=x?h.top-b-m-g.y:h.bottom+m+g.y,k=O+f;if(!0!==d.overlap)for(let t of a)t.left<k&&t.right>O&&t.top<w+b&&t.bottom>w&&(w=x?t.top-b-2-m:t.bottom+m+2);if("absolute"==this.position?(c.style.top=(w-t.parent.top)/n+"px",Vh(c,(O-t.parent.left)/i)):(c.style.top=w/n+"px",Vh(c,O/i)),u){let t=h.left+(v?g.x:-g.x)-(O+14-7);u.style.left=t/i+"px"}!0!==d.overlap&&a.push({left:O,top:w,right:k,bottom:w+b}),c.classList.toggle("cm-tooltip-above",x),c.classList.toggle("cm-tooltip-below",!x),d.positioned&&d.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Zh}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Vh(t,e){let o=parseInt(t.style.left,10);(isNaN(o)||Math.abs(e-o)>1)&&(t.style.left=e+"px")}const Lh=Dc.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Uh={x:0,y:0},Bh=qn.define({enables:[Yh,Lh]}),Wh=qn.define({combine:t=>t.reduce((t,e)=>t.concat(e),[])});class Ih{static create(t){return new Ih(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Xh(t,Wh,(t,e)=>this.createHostedView(t,e),t=>t.dom.remove())}createHostedView(t,e){let o=t.create(this.view);return o.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(o.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&o.mount&&o.mount(this.view),o}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let o of this.manager.tooltipViews){let r=o[t];if(void 0!==r)if(void 0===e)e=r;else if(e!==r)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Gh=Bh.compute([Wh],t=>{let e=t.facet(Wh);return 0===e.length?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos})),create:Ih.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Nh{constructor(t,e,o,r,i){this.view=t,this.source=e,this.field=o,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,o=t.docView.nearest(e.target);if(!o)return;let r,i=1;if(o instanceof Ps)r=o.posAtStart;else{if(r=t.posAtCoords(e),null==r)return;let o=t.coordsAtPos(r);if(!o||e.y<o.top||e.y>o.bottom||e.x<o.left-t.defaultCharacterWidth||e.x>o.right+t.defaultCharacterWidth)return;let n=t.bidiSpans(t.state.doc.lineAt(r)).find(t=>t.from<=r&&t.to>=r),a=n&&n.dir==Js.RTL?-1:1;i=e.x<o.left?-a:a}let n=this.source(t,r,i);if(null==n?void 0:n.then){let e=this.pending={pos:r};n.then(o=>{this.pending==e&&(this.pending=null,!o||Array.isArray(o)&&!o.length||t.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])}))},e=>zl(t.state,e,"hover tooltip"))}else!n||Array.isArray(n)&&!n.length||t.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])})}get tooltip(){let t=this.view.plugin(Yh),e=t?t.manager.tooltips.findIndex(t=>t.create==Ih.create):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,o;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&i&&!function(t,e){let o,{left:r,right:i,top:n,bottom:a}=t.getBoundingClientRect();if(o=t.querySelector(".cm-tooltip-arrow")){let t=o.getBoundingClientRect();n=Math.min(t.top,n),a=Math.max(t.bottom,a)}return e.clientX>=r-Fh&&e.clientX<=i+Fh&&e.clientY>=n-Fh&&e.clientY<=a+Fh}(i.dom,t)||this.pending){let{pos:i}=r[0]||this.pending,n=null!==(o=null===(e=r[0])||void 0===e?void 0:e.end)&&void 0!==o?o:i;(i==n?this.view.posAtCoords(this.lastMove)==i:function(t,e,o,r,i){let n=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(n.left>r||n.right<r||n.top>i||Math.min(n.bottom,a)<i)return!1;let s=t.posAtCoords({x:r,y:i},!1);return s>=e&&s<=o}(this.view,i,n,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=o=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(o.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Fh=4;function Hh(t,e={}){let o=Fn.define(),r=An.define({create:()=>[],update(t,r){if(t.length&&(e.hideOnChange&&(r.docChanged||r.selection)?t=[]:e.hideOn&&(t=t.filter(t=>!e.hideOn(r,t))),r.docChanged)){let e=[];for(let o of t){let t=r.changes.mapPos(o.pos,-1,hn.TrackDel);if(null!=t){let i=Object.assign(Object.create(null),o);i.pos=t,null!=i.end&&(i.end=r.changes.mapPos(i.end)),e.push(i)}}t=e}for(let e of r.effects)e.is(o)&&(t=e.value),e.is(Jh)&&(t=[]);return t},provide:t=>Wh.from(t)});return{active:r,extension:[r,Xl.define(i=>new Nh(i,t,r,o,e.hoverTime||300)),Gh]}}function Kh(t,e){let o=t.plugin(Yh);if(!o)return null;let r=o.manager.tooltips.indexOf(e);return r<0?null:o.manager.tooltipViews[r]}const Jh=Fn.define(),tp=qn.define({combine(t){let e,o;for(let r of t)e=e||r.topContainer,o=o||r.bottomContainer;return{topContainer:e,bottomContainer:o}}});function ep(t,e){let o=t.plugin(op),r=o?o.specs.indexOf(e):-1;return r>-1?o.panels[r]:null}const op=Xl.fromClass(class{constructor(t){this.input=t.state.facet(np),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(e=>e(t));let e=t.state.facet(tp);this.top=new rp(t,!0,e.topContainer),this.bottom=new rp(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(tp);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new rp(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new rp(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let o=t.state.facet(np);if(o!=this.input){let e=o.filter(t=>t),r=[],i=[],n=[],a=[];for(let o of e){let e,s=this.specs.indexOf(o);s<0?(e=o(t.view),a.push(e)):(e=this.panels[s],e.update&&e.update(t)),r.push(e),(e.top?i:n).push(e)}this.specs=e,this.panels=r,this.top.sync(i),this.bottom.sync(n);for(let t of a)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Dc.scrollMargins.of(e=>{let o=e.plugin(t);return o&&{top:o.top.scrollMargin(),bottom:o.bottom.scrollMargin()}})});class rp{constructor(t,e,o){this.view=t,this.top=e,this.container=o,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=ip(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=ip(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function ip(t){let e=t.nextSibling;return t.remove(),e}const np=qn.define({enables:op});class ap extends da{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}ap.prototype.elementClass="",ap.prototype.toDOM=void 0,ap.prototype.mapMode=hn.TrackBefore,ap.prototype.startSide=ap.prototype.endSide=-1,ap.prototype.point=!0;const sp=qn.define(),lp=qn.define(),dp={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>ua.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},cp=qn.define();function hp(t){return[up(),cp.of({...dp,...t})]}const pp=qn.define({combine:t=>t.some(t=>t)});function up(t){let e=[mp];return t&&!1===t.fixed&&e.push(pp.of(!0)),e}const mp=Xl.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(cp).map(e=>new vp(t,e)),this.fixed=!t.state.facet(pp);for(let t of this.gutters)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,o=t.view.viewport,r=Math.min(e.to,o.to)-Math.max(e.from,o.from);this.syncGutters(r<.8*(o.to-o.from))}if(t.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(pp)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let o=ua.iter(this.view.state.facet(sp),this.view.viewport.from),r=[],i=this.gutters.map(t=>new gp(t,this.view.viewport,-this.view.documentPadding.top));for(let t of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(t.type)){let e=!0;for(let n of t.type)if(n.type==Ds.Text&&e){bp(o,r,n.from);for(let t of i)t.line(this.view,n,r);e=!1}else if(n.widget)for(let t of i)t.widget(this.view,n)}else if(t.type==Ds.Text){bp(o,r,t.from);for(let e of i)e.line(this.view,t,r)}else if(t.widget)for(let e of i)e.widget(this.view,t);for(let t of i)t.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(cp),o=t.state.facet(cp),r=t.docChanged||t.heightChanged||t.viewportChanged||!ua.eq(t.startState.facet(sp),t.state.facet(sp),t.view.viewport.from,t.view.viewport.to);if(e==o)for(let e of this.gutters)e.update(t)&&(r=!0);else{r=!0;let i=[];for(let r of o){let o=e.indexOf(r);o<0?i.push(new vp(this.view,r)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let t of this.gutters)t.dom.remove(),i.indexOf(t)<0&&t.destroy();for(let t of i)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Dc.scrollMargins.of(e=>{let o=e.plugin(t);if(!o||0==o.gutters.length||!o.fixed)return null;let r=o.dom.offsetWidth*e.scaleX,i=o.domAfter?o.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Js.LTR?{left:r,right:i}:{right:r,left:i}})});function fp(t){return Array.isArray(t)?t:[t]}function bp(t,e,o){for(;t.value&&t.from<=o;)t.from==o&&e.push(t.value),t.next()}class gp{constructor(t,e,o){this.gutter=t,this.height=o,this.i=0,this.cursor=ua.iter(t.markers,e.from)}addElement(t,e,o){let{gutter:r}=this,i=(e.top-this.height)/t.scaleY,n=e.height/t.scaleY;if(this.i==r.elements.length){let e=new Op(t,n,i,o);r.elements.push(e),r.dom.appendChild(e.dom)}else r.elements[this.i].update(t,n,i,o);this.height=e.bottom,this.i++}line(t,e,o){let r=[];bp(this.cursor,r,e.from),o.length&&(r=r.concat(o));let i=this.gutter.config.lineMarker(t,e,r);i&&r.unshift(i);let n=this.gutter;(0!=r.length||n.config.renderEmptyElements)&&this.addElement(t,e,r)}widget(t,e){let o=this.gutter.config.widgetMarker(t,e.widget,e),r=o?[o]:null;for(let o of t.state.facet(lp)){let i=o(t,e.widget,e);i&&(r||(r=[])).push(i)}r&&this.addElement(t,e,r)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class vp{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let o in e.domEventHandlers)this.dom.addEventListener(o,r=>{let i,n=r.target;if(n!=this.dom&&this.dom.contains(n)){for(;n.parentNode!=this.dom;)n=n.parentNode;let t=n.getBoundingClientRect();i=(t.top+t.bottom)/2}else i=r.clientY;let a=t.lineBlockAtHeight(i-t.documentTop);e.domEventHandlers[o](t,a,r)&&r.preventDefault()});this.markers=fp(e.markers(t)),e.initialSpacer&&(this.spacer=new Op(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=fp(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let o=t.view.viewport;return!ua.eq(this.markers,e,o.from,o.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class Op{constructor(t,e,o,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,o,r)}update(t,e,o,r){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=o&&(this.dom.style.marginTop=(this.above=o)?o+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(!t[o].compare(e[o]))return!1;return!0}(this.markers,r)||this.setMarkers(t,r)}setMarkers(t,e){let o="cm-gutterElement",r=this.dom.firstChild;for(let i=0,n=0;;){let a=n,s=i<e.length?e[i++]:null,l=!1;if(s){let t=s.elementClass;t&&(o+=" "+t);for(let t=n;t<this.markers.length;t++)if(this.markers[t].compare(s)){a=t,l=!0;break}}else a=this.markers.length;for(;n<a;){let t=this.markers[n++];if(t.toDOM){t.destroy(r);let e=r.nextSibling;r.remove(),r=e}}if(!s)break;s.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(s.toDOM(t),r)),l&&n++}this.dom.className=o,this.markers=e}destroy(){this.setMarkers(null,[])}}const xp=qn.define(),yp=qn.define(),wp=qn.define({combine:t=>la(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let o=Object.assign({},t);for(let t in e){let r=o[t],i=e[t];o[t]=r?(t,e,o)=>r(t,e,o)||i(t,e,o):i}return o}})});class kp extends ap{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function qp(t,e){return t.state.facet(wp).formatNumber(e,t.state)}const Sp=cp.compute([wp],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(xp),lineMarker:(t,e,o)=>o.some(t=>t.toDOM)?null:new kp(qp(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,o)=>{for(let r of t.state.facet(yp)){let i=r(t,e,o);if(i)return i}return null},lineMarkerChange:t=>t.startState.facet(wp)!=t.state.facet(wp),initialSpacer:t=>new kp(qp(t,$p(t.state.doc.lines))),updateSpacer(t,e){let o=qp(e.view,$p(e.view.state.doc.lines));return o==t.number?t:new kp(o)},domEventHandlers:t.facet(wp).domEventHandlers,side:"before"}));function Qp(t={}){return[wp.of(t),up(),Sp]}function $p(t){let e=9;for(;e<t;)e=10*e+9;return e}const Pp=new class extends ap{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Cp=sp.compute(["selection"],t=>{let e=[],o=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>o&&(o=i,e.push(Pp.range(i)))}return ua.of(e)}),Tp=1024;let Ap=0;class Rp{constructor(t,e){this.from=t,this.to=e}}class zp{constructor(t={}){this.id=Ap++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=Zp.match(t)),e=>{let o=t(e);return void 0===o?null:[this,o]}}}zp.closedBy=new zp({deserialize:t=>t.split(" ")}),zp.openedBy=new zp({deserialize:t=>t.split(" ")}),zp.group=new zp({deserialize:t=>t.split(" ")}),zp.isolate=new zp({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),zp.contextHash=new zp({perNode:!0}),zp.lookAhead=new zp({perNode:!0}),zp.mounted=new zp({perNode:!0});class Mp{constructor(t,e,o){this.tree=t,this.overlay=e,this.parser=o}static get(t){return t&&t.props&&t.props[zp.mounted.id]}}const Ep=Object.create(null);class Zp{constructor(t,e,o,r=0){this.name=t,this.props=e,this.id=o,this.flags=r}static define(t){let e=t.props&&t.props.length?Object.create(null):Ep,o=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),r=new Zp(t.name||"",e,t.id,o);if(t.props)for(let o of t.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[o[0].id]=o[1]}return r}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(zp.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let o in t)for(let r of o.split(" "))e[r]=t[o];return t=>{for(let o=t.prop(zp.group),r=-1;r<(o?o.length:0);r++){let i=e[r<0?t.name:o[r]];if(i)return i}}}}Zp.none=new Zp("",Object.create(null),0,8);class Xp{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let o of this.types){let r=null;for(let e of t){let t=e(o);t&&(r||(r=Object.assign({},o.props)),r[t[0].id]=t[1])}e.push(r?new Zp(o.name,r,o.id,o.flags):o)}return new Xp(e)}}const _p=new WeakMap,jp=new WeakMap;var Dp;!function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"}(Dp||(Dp={}));class Yp{constructor(t,e,o,r,i){if(this.type=t,this.children=e,this.positions=o,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[t,e]of i)this.props["number"==typeof t?t:t.id]=e}}toString(){let t=Mp.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let t of this.children){let o=t.toString();o&&(e&&(e+=","),e+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new tu(this.topNode,t)}cursorAt(t,e=0,o=0){let r=_p.get(this)||this.topNode,i=new tu(r);return i.moveTo(t,e),_p.set(this,i._tree),i}get topNode(){return new Ip(this,0,0,null)}resolve(t,e=0){let o=Bp(_p.get(this)||this.topNode,t,e,!1);return _p.set(this,o),o}resolveInner(t,e=0){let o=Bp(jp.get(this)||this.topNode,t,e,!0);return jp.set(this,o),o}resolveStack(t,e=0){return function(t,e,o){let r=t.resolveInner(e,o),i=null;for(let t=r instanceof Ip?r:r.context.parent;t;t=t.parent)if(t.index<0){let n=t.parent;(i||(i=[r])).push(n.resolve(e,o)),t=n}else{let n=Mp.get(t.tree);if(n&&n.overlay&&n.overlay[0].from<=e&&n.overlay[n.overlay.length-1].to>=e){let a=new Ip(n.tree,n.overlay[0].from+t.from,-1,t);(i||(i=[r])).push(Bp(a,e,o,!1))}}return i?Kp(i):r}(this,t,e)}iterate(t){let{enter:e,leave:o,from:r=0,to:i=this.length}=t,n=t.mode||0,a=(n&Dp.IncludeAnonymous)>0;for(let t=this.cursor(n|Dp.IncludeAnonymous);;){let n=!1;if(t.from<=i&&t.to>=r&&(!a&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;n=!0}for(;n&&o&&(a||!t.type.isAnonymous)&&o(t),!t.nextSibling();){if(!t.parent())return;n=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:iu(Zp.none,this.children,this.positions,0,this.children.length,0,this.length,(t,e,o)=>new Yp(this.type,t,e,o,this.propValues),t.makeTree||((t,e,o)=>new Yp(Zp.none,t,e,o)))}static build(t){return function(t){var e;let{buffer:o,nodeSet:r,maxBufferLength:i=Tp,reused:n=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(o)?new Vp(o,o.length):o,l=r.types,d=0,c=0;function h(t,e,o,b,g,v){let{id:O,start:x,end:y,size:w}=s,k=c,q=d;for(;w<0;){if(s.next(),-1==w){let e=n[O];return o.push(e),void b.push(x-t)}if(-3==w)return void(d=O);if(-4==w)return void(c=O);throw new RangeError(`Unrecognized record size: ${w}`)}let S,Q,$=l[O],P=x-t;if(y-x<=i&&(Q=function(t,e){let o=s.fork(),r=0,n=0,l=0,d=o.end-i,c={size:0,start:0,skip:0};t:for(let i=o.pos-t;o.pos>i;){let t=o.size;if(o.id==e&&t>=0){c.size=r,c.start=n,c.skip=l,l+=4,r+=4,o.next();continue}let s=o.pos-t;if(t<0||s<i||o.start<d)break;let h=o.id>=a?4:0,p=o.start;for(o.next();o.pos>s;){if(o.size<0){if(-3!=o.size)break t;h+=4}else o.id>=a&&(h+=4);o.next()}n=p,r+=t,l+=h}return(e<0||r==t)&&(c.size=r,c.start=n,c.skip=l),c.size>4?c:void 0}(s.pos-e,g))){let e=new Uint16Array(Q.size-Q.skip),o=s.pos-Q.size,i=e.length;for(;s.pos>o;)i=f(Q.start,e,i);S=new Lp(e,y-Q.start,r),P=Q.start-t}else{let t=s.pos-w;s.next();let e=[],o=[],r=O>=a?O:-1,n=0,l=y;for(;s.pos>t;)r>=0&&s.id==r&&s.size>=0?(s.end<=l-i&&(u(e,o,x,n,s.end,l,r,k,q),n=e.length,l=s.end),s.next()):v>2500?p(x,t,e,o):h(x,t,e,o,r,v+1);if(r>=0&&n>0&&n<e.length&&u(e,o,x,n,x,l,r,k,q),e.reverse(),o.reverse(),r>-1&&n>0){let t=function(t,e){return(o,r,i)=>{let n,a,s=0,l=o.length-1;if(l>=0&&(n=o[l])instanceof Yp){if(!l&&n.type==t&&n.length==i)return n;(a=n.prop(zp.lookAhead))&&(s=r[l]+n.length+a)}return m(t,o,r,i,s,e)}}($,q);S=iu($,e,o,0,e.length,0,y-x,t,t)}else S=m($,e,o,y-x,k-y,q)}o.push(S),b.push(P)}function p(t,e,o,n){let a=[],l=0,d=-1;for(;s.pos>e;){let{id:t,start:e,end:o,size:r}=s;if(r>4)s.next();else{if(d>-1&&e<d)break;d<0&&(d=o-i),a.push(t,e,o),l++,s.next()}}if(l){let e=new Uint16Array(4*l),i=a[a.length-2];for(let t=a.length-3,o=0;t>=0;t-=3)e[o++]=a[t],e[o++]=a[t+1]-i,e[o++]=a[t+2]-i,e[o++]=o;o.push(new Lp(e,a[2]-i,r)),n.push(i-t)}}function u(t,e,o,i,n,a,s,l,d){let c=[],h=[];for(;t.length>i;)c.push(t.pop()),h.push(e.pop()+o-n);t.push(m(r.types[s],c,h,a-n,l-a,d)),e.push(n-o)}function m(t,e,o,r,i,n,a){if(n){let t=[zp.contextHash,n];a=a?[t].concat(a):[t]}if(i>25){let t=[zp.lookAhead,i];a=a?[t].concat(a):[t]}return new Yp(t,e,o,r,a)}function f(t,e,o){let{id:r,start:i,end:n,size:l}=s;if(s.next(),l>=0&&r<a){let a=o;if(l>4){let r=s.pos-(l-4);for(;s.pos>r;)o=f(t,e,o)}e[--o]=a,e[--o]=n-t,e[--o]=i-t,e[--o]=r}else-3==l?d=r:-4==l&&(c=r);return o}let b=[],g=[];for(;s.pos>0;)h(t.start||0,t.bufferStart||0,b,g,-1,0);let v=null!==(e=t.length)&&void 0!==e?e:b.length?g[0]+b[0].length:0;return new Yp(l[t.topID],b.reverse(),g.reverse(),v)}(t)}}Yp.empty=new Yp(Zp.none,[],[],0);class Vp{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Vp(this.buffer,this.index)}}class Lp{constructor(t,e,o){this.buffer=t,this.length=e,this.set=o}get type(){return Zp.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],o=this.buffer[t+3],r=this.set.types[e],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),o==(t+=4))return i;let n=[];for(;t<o;)n.push(this.childString(t)),t=this.buffer[t+3];return i+"("+n.join(",")+")"}findChild(t,e,o,r,i){let{buffer:n}=this,a=-1;for(let s=t;s!=e&&!(Up(i,r,n[s+1],n[s+2])&&(a=s,o>0));s=n[s+3]);return a}slice(t,e,o){let r=this.buffer,i=new Uint16Array(e-t),n=0;for(let a=t,s=0;a<e;){i[s++]=r[a++],i[s++]=r[a++]-o;let e=i[s++]=r[a++]-o;i[s++]=r[a++]-t,n=Math.max(n,e)}return new Lp(i,n,this.set)}}function Up(t,e,o,r){switch(t){case-2:return o<e;case-1:return r>=e&&o<e;case 0:return o<e&&r>e;case 1:return o<=e&&r>e;case 2:return r>e;case 4:return!0}}function Bp(t,e,o,r){for(var i;t.from==t.to||(o<1?t.from>=e:t.from>e)||(o>-1?t.to<=e:t.to<e);){let e=!r&&t instanceof Ip&&t.index<0?null:t.parent;if(!e)return t;t=e}let n=r?0:Dp.IgnoreOverlays;if(r)for(let r=t,a=r.parent;a;r=a,a=r.parent)r instanceof Ip&&r.index<0&&(null===(i=a.enter(e,o,n))||void 0===i?void 0:i.from)!=r.from&&(t=a);for(;;){let r=t.enter(e,o,n);if(!r)return t;t=r}}class Wp{cursor(t=0){return new tu(this,t)}getChild(t,e=null,o=null){let r=Gp(this,t,e,o);return r.length?r[0]:null}getChildren(t,e=null,o=null){return Gp(this,t,e,o)}resolve(t,e=0){return Bp(this,t,e,!1)}resolveInner(t,e=0){return Bp(this,t,e,!0)}matchContext(t){return Np(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),o=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(o=e,e=t.prevSibling):e=t}return o}get node(){return this}get next(){return this.parent}}class Ip extends Wp{constructor(t,e,o,r){super(),this._tree=t,this.from=e,this.index=o,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,o,r,i=0){for(let n=this;;){for(let{children:a,positions:s}=n._tree,l=e>0?a.length:-1;t!=l;t+=e){let l=a[t],d=s[t]+n.from;if(Up(r,o,d,d+l.length))if(l instanceof Lp){if(i&Dp.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,e,o-d,r);if(a>-1)return new Hp(new Fp(n,l,t,d),null,a)}else if(i&Dp.IncludeAnonymous||!l.type.isAnonymous||eu(l)){let a;if(!(i&Dp.IgnoreMounts)&&(a=Mp.get(l))&&!a.overlay)return new Ip(a.tree,d,t,n);let s=new Ip(l,d,t,n);return i&Dp.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(e<0?l.children.length-1:0,e,o,r)}}if(i&Dp.IncludeAnonymous||!n.type.isAnonymous)return null;if(t=n.index>=0?n.index+e:e<0?-1:n._parent._tree.children.length,n=n._parent,!n)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,o=0){let r;if(!(o&Dp.IgnoreOverlays)&&(r=Mp.get(this._tree))&&r.overlay){let o=t-this.from;for(let{from:t,to:i}of r.overlay)if((e>0?t<=o:t<o)&&(e<0?i>=o:i>o))return new Ip(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,o)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Gp(t,e,o,r){let i=t.cursor(),n=[];if(!i.firstChild())return n;if(null!=o)for(let t=!1;!t;)if(t=i.type.is(o),!i.nextSibling())return n;for(;;){if(null!=r&&i.type.is(r))return n;if(i.type.is(e)&&n.push(i.node),!i.nextSibling())return null==r?n:[]}}function Np(t,e,o=e.length-1){for(let r=t;o>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[o]&&e[o]!=r.name)return!1;o--}}return!0}class Fp{constructor(t,e,o,r){this.parent=t,this.buffer=e,this.index=o,this.start=r}}class Hp extends Wp{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,o){super(),this.context=t,this._parent=e,this.index=o,this.type=t.buffer.set.types[t.buffer.buffer[o]]}child(t,e,o){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.context.start,o);return i<0?null:new Hp(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,o=0){if(o&Dp.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return i<0?null:new Hp(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Hp(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Hp(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:o}=this.context,r=this.index+4,i=o.buffer[this.index+3];if(i>r){let n=o.buffer[this.index+1];t.push(o.slice(r,i,n)),e.push(0)}return new Yp(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Kp(t){if(!t.length)return null;let e=0,o=t[0];for(let r=1;r<t.length;r++){let i=t[r];(i.from>o.from||i.to<o.to)&&(o=i,e=r)}let r=o instanceof Ip&&o.index<0?null:o.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new Jp(i,o)}class Jp{constructor(t,e){this.heads=t,this.node=e}get next(){return Kp(this.heads)}}class tu{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof Ip)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:o,buffer:r}=this.buffer;return this.type=e||r.set.types[r.buffer[t]],this.from=o+r.buffer[t+1],this.to=o+r.buffer[t+2],!0}yield(t){return!!t&&(t instanceof Ip?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,o){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,o,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.buffer.start,o);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,o=this.mode){return this.buffer?!(o&Dp.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,o))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Dp.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&Dp.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,o=this.stack.length-1;if(t<0){let t=o<0?0:this.stack[o]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(o<0?e.buffer.length:e.buffer[this.stack[o]+3]))return this.yieldBuf(t)}return o<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,o,{buffer:r}=this;if(r){if(t>0){if(this.index<r.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(r.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:o}=r)}else({index:e,_parent:o}=this._tree);for(;o;({index:e,_parent:o}=o))if(e>-1)for(let r=e+t,i=t<0?-1:o._tree.children.length;r!=i;r+=t){let t=o._tree.children[r];if(this.mode&Dp.IncludeAnonymous||t instanceof Lp||!t.type.isAnonymous||eu(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,o=0;if(t&&t.context==this.buffer)t:for(let r=this.index,i=this.stack.length;i>=0;){for(let n=t;n;n=n._parent)if(n.index==r){if(r==this.index)return n;e=n,o=i+1;break t}r=this.stack[--i]}for(let t=o;t<this.stack.length;t++)e=new Hp(this.buffer,e,this.stack[t]);return this.bufferNode=new Hp(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let o=0;;){let r=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){o++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&e&&e(this),r=this.type.isAnonymous,!o)return;if(this.nextSibling())break;this.parent(),o--,r=!0}}}matchContext(t){if(!this.buffer)return Np(this.node.parent,t);let{buffer:e}=this.buffer,{types:o}=e.set;for(let r=t.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return Np(this._tree,t,r);let n=o[e.buffer[this.stack[i]]];if(!n.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}}function eu(t){return t.children.some(t=>t instanceof Lp||!t.type.isAnonymous||eu(t))}const ou=new WeakMap;function ru(t,e){if(!t.isAnonymous||e instanceof Lp||e.type!=t)return 1;let o=ou.get(e);if(null==o){o=1;for(let r of e.children){if(r.type!=t||!(r instanceof Yp)){o=1;break}o+=ru(t,r)}ou.set(e,o)}return o}function iu(t,e,o,r,i,n,a,s,l){let d=0;for(let o=r;o<i;o++)d+=ru(t,e[o]);let c=Math.ceil(1.5*d/8),h=[],p=[];return function e(o,r,i,a,s){for(let d=i;d<a;){let i=d,u=r[d],m=ru(t,o[d]);for(d++;d<a;d++){let e=ru(t,o[d]);if(m+e>=c)break;m+=e}if(d==i+1){if(m>c){let t=o[i];e(t.children,t.positions,0,t.children.length,r[i]+s);continue}h.push(o[i])}else{let e=r[d-1]+o[d-1].length-u;h.push(iu(t,o,r,i,d,u,e,null,l))}p.push(u+s-n)}}(e,o,r,i,0),(s||l)(h,p,a)}class nu{constructor(){this.map=new WeakMap}setBuffer(t,e,o){let r=this.map.get(t);r||this.map.set(t,r=new Map),r.set(e,o)}getBuffer(t,e){let o=this.map.get(t);return o&&o.get(e)}set(t,e){t instanceof Hp?this.setBuffer(t.context.buffer,t.index,e):t instanceof Ip&&this.map.set(t.tree,e)}get(t){return t instanceof Hp?this.getBuffer(t.context.buffer,t.index):t instanceof Ip?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class au{constructor(t,e,o,r,i=!1,n=!1){this.from=t,this.to=e,this.tree=o,this.offset=r,this.open=(i?1:0)|(n?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],o=!1){let r=[new au(0,t.length,t,0,!1,o)];for(let o of e)o.to>t.length&&r.push(o);return r}static applyChanges(t,e,o=128){if(!e.length)return t;let r=[],i=1,n=t.length?t[0]:null;for(let a=0,s=0,l=0;;a++){let d=a<e.length?e[a]:null,c=d?d.fromA:1e9;if(c-s>=o)for(;n&&n.from<c;){let e=n;if(s>=e.from||c<=e.to||l){let t=Math.max(e.from,s)-l,o=Math.min(e.to,c)-l;e=t>=o?null:new au(t,o,e.tree,e.offset+l,a>0,!!d)}if(e&&r.push(e),n.to>c)break;n=i<t.length?t[i++]:null}if(!d)break;s=d.toA,l=d.toA-d.toB}return r}}class su{startParse(t,e,o){return"string"==typeof t&&(t=new lu(t)),o=o?o.length?o.map(t=>new Rp(t.from,t.to)):[new Rp(0,0)]:[new Rp(0,t.length)],this.createParse(t,e||[],o)}parse(t,e,o){let r=this.startParse(t,e,o);for(;;){let t=r.advance();if(t)return t}}}class lu{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}class du{constructor(t,e,o,r,i){this.parser=t,this.parse=e,this.overlay=o,this.target=r,this.from=i}}function cu(t){if(!t.length||t.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class hu{constructor(t,e,o,r,i,n,a){this.parser=t,this.predicate=e,this.mounts=o,this.index=r,this.start=i,this.target=n,this.prev=a,this.depth=0,this.ranges=[]}}const pu=new zp({perNode:!0});class uu{constructor(t,e,o,r,i){this.nest=e,this.input=o,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new Yp(t.type,t.children,t.positions,t.length,t.propValues.concat([[pu,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let o=Object.assign(Object.create(null),t.target.props);o[zp.mounted.id]=new Mp(e,t.overlay,t.parser),t.target.props=o}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].from<t&&(t=Math.min(t,this.inner[e].parse.parsedPos));return t}stopAt(t){if(this.stoppedAt=t,this.baseParse)this.baseParse.stopAt(t);else for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].parse.stopAt(t)}startInner(){let t=new vu(this.fragments),e=null,o=null,r=new tu(new Ip(this.baseTree,this.ranges[0].from,0,null),Dp.IncludeAnonymous|Dp.IgnoreMounts);t:for(let i,n;;){let a,s=!0;if(null!=this.stoppedAt&&r.from>=this.stoppedAt)s=!1;else if(t.hasNode(r)){if(e){let t=e.mounts.find(t=>t.frag.from<=r.from&&t.frag.to>=r.to&&t.mount.overlay);if(t)for(let o of t.mount.overlay){let i=o.from+t.pos,n=o.to+t.pos;i>=r.from&&n<=r.to&&!e.ranges.some(t=>t.from<n&&t.to>i)&&e.ranges.push({from:i,to:n})}}s=!1}else if(o&&(n=mu(o.ranges,r.from,r.to)))s=2!=n;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||bu(r);let n=t.findMounts(r.from,i.parser);if("function"==typeof i.overlay)e=new hu(i.parser,i.overlay,n,this.inner.length,r.from,r.tree,e);else{let t=Ou(this.ranges,i.overlay||(r.from<r.to?[new Rp(r.from,r.to)]:[]));t.length&&cu(t),!t.length&&i.overlay||this.inner.push(new du(i.parser,t.length?i.parser.startParse(this.input,yu(n,t),t):i.parser.startParse(""),i.overlay?i.overlay.map(t=>new Rp(t.from-r.from,t.to-r.from)):null,r.tree,t.length?t[0].from:r.from)),i.overlay?t.length&&(o={ranges:t,depth:0,prev:o}):s=!1}}else if(e&&(a=e.predicate(r))&&(!0===a&&(a=new Rp(r.from,r.to)),a.from<a.to)){let t=e.ranges.length-1;t>=0&&e.ranges[t].to==a.from?e.ranges[t]={from:e.ranges[t].from,to:a.to}:e.ranges.push(a)}if(s&&r.firstChild())e&&e.depth++,o&&o.depth++;else for(;!r.nextSibling();){if(!r.parent())break t;if(e&&! --e.depth){let t=Ou(this.ranges,e.ranges);t.length&&(cu(t),this.inner.splice(e.index,0,new du(e.parser,e.parser.startParse(this.input,yu(e.mounts,t),t),e.ranges.map(t=>new Rp(t.from-e.start,t.to-e.start)),e.target,t[0].from))),e=e.prev}o&&! --o.depth&&(o=o.prev)}}}}function mu(t,e,o){for(let r of t){if(r.from>=o)break;if(r.to>e)return r.from<=e&&r.to>=o?2:1}return 0}function fu(t,e,o,r,i,n){if(e<o){let a=t.buffer[e+1];r.push(t.slice(e,o,a)),i.push(a-n)}}function bu(t){let{node:e}=t,o=[],r=e.context.buffer;do{o.push(t.index),t.parent()}while(!t.tree);let i=t.tree,n=i.children.indexOf(r),a=i.children[n],s=a.buffer,l=[n];i.children[n]=function t(r,i,n,d,c,h){let p=o[h],u=[],m=[];fu(a,r,p,u,m,d);let f=s[p+1],b=s[p+2];l.push(u.length);let g=h?t(p+4,s[p+3],a.set.types[s[p]],f,b-f,h-1):e.toTree();return u.push(g),m.push(f-d),fu(a,s[p+3],i,u,m,d),new Yp(n,u,m,c)}(0,s.length,Zp.none,0,a.length,o.length-1);for(let e of l){let o=t.tree.children[e],r=t.tree.positions[e];t.yield(new Ip(o,r+t.from,e,t._tree))}}class gu{constructor(t,e){this.offset=e,this.done=!1,this.cursor=t.cursor(Dp.IncludeAnonymous|Dp.IgnoreMounts)}moveTo(t){let{cursor:e}=this,o=t-this.offset;for(;!this.done&&e.from<o;)e.to>=t&&e.enter(o,1,Dp.IgnoreOverlays|Dp.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof Yp))break;e=e.children[0]}return!1}}class vu{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let o=this.curFrag=t[0];this.curTo=null!==(e=o.tree.prop(pu))&&void 0!==e?e:o.to,this.inner=new gu(o.tree,-o.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(pu))&&void 0!==t?t:e.to,this.inner=new gu(e.tree,-e.offset)}}findMounts(t,e){var o;let r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let i=null===(o=t.tree)||void 0===o?void 0:o.prop(zp.mounted);if(i&&i.parser==e)for(let e=this.fragI;e<this.fragments.length;e++){let o=this.fragments[e];if(o.from>=t.to)break;o.tree==this.curFrag.tree&&r.push({frag:o,pos:t.from-o.offset,mount:i})}}}return r}}function Ou(t,e){let o=null,r=e;for(let i=1,n=0;i<t.length;i++){let a=t[i-1].to,s=t[i].from;for(;n<r.length;n++){let t=r[n];if(t.from>=s)break;t.to<=a||(o||(r=o=e.slice()),t.from<a?(o[n]=new Rp(t.from,a),t.to>s&&o.splice(n+1,0,new Rp(s,t.to))):t.to>s?o[n--]=new Rp(s,t.to):o.splice(n--,1))}}return r}function xu(t,e,o,r){let i=0,n=0,a=!1,s=!1,l=-1e9,d=[];for(;;){let c=i==t.length?1e9:a?t[i].to:t[i].from,h=n==e.length?1e9:s?e[n].to:e[n].from;if(a!=s){let t=Math.max(l,o),e=Math.min(c,h,r);t<e&&d.push(new Rp(t,e))}if(l=Math.min(c,h),1e9==l)break;c==l&&(a?(a=!1,i++):a=!0),h==l&&(s?(s=!1,n++):s=!0)}return d}function yu(t,e){let o=[];for(let{pos:r,mount:i,frag:n}of t){let t=r+(i.overlay?i.overlay[0].from:0),a=t+i.tree.length,s=Math.max(n.from,t),l=Math.min(n.to,a);if(i.overlay){let a=xu(e,i.overlay.map(t=>new Rp(t.from+r,t.to+r)),s,l);for(let e=0,r=s;;e++){let s=e==a.length,d=s?l:a[e].from;if(d>r&&o.push(new au(r,d,i.tree,-t,n.from>=r||n.openStart,n.to<=d||n.openEnd)),s)break;r=a[e].to}}else o.push(new au(s,l,i.tree,-t,n.from>=t||n.openStart,n.to<=a||n.openEnd))}return o}let wu=0;class ku{constructor(t,e,o,r){this.name=t,this.set=e,this.base=o,this.modified=r,this.id=wu++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let o="string"==typeof t?t:"?";if(t instanceof ku&&(e=t),null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let r=new ku(o,[],null,[]);if(r.set.push(r),e)for(let t of e.set)r.set.push(t);return r}static defineModifier(t){let e=new Su(t);return t=>t.modified.indexOf(e)>-1?t:Su.get(t.base||t,t.modified.concat(e).sort((t,e)=>t.id-e.id))}}let qu=0;class Su{constructor(t){this.name=t,this.instances=[],this.id=qu++}static get(t,e){if(!e.length)return t;let o=e[0].instances.find(o=>o.base==t&&function(t,e){return t.length==e.length&&t.every((t,o)=>t==e[o])}(e,o.modified));if(o)return o;let r=[],i=new ku(t.name,r,t,e);for(let t of e)t.instances.push(i);let n=function(t){let e=[[]];for(let o=0;o<t.length;o++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[o]));return e.sort((t,e)=>e.length-t.length)}(e);for(let e of t.set)if(!e.modified.length)for(let t of n)r.push(Su.get(e,t));return i}}function Qu(t){let e=Object.create(null);for(let o in t){let r=t[o];Array.isArray(r)||(r=[r]);for(let t of o.split(" "))if(t){let o=[],i=2,n=t;for(let e=0;;){if("..."==n&&e>0&&e+3==t.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(n);if(!r)throw new RangeError("Invalid path: "+t);if(o.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),e+=r[0].length,e==t.length)break;let a=t[e++];if(e==t.length&&"!"==a){i=0;break}if("/"!=a)throw new RangeError("Invalid path: "+t);n=t.slice(e)}let a=o.length-1,s=o[a];if(!s)throw new RangeError("Invalid path: "+t);let l=new Pu(r,i,a>0?o.slice(0,a):null);e[s]=l.sort(e[s])}}return $u.add(e)}const $u=new zp;class Pu{constructor(t,e,o,r){this.tags=t,this.mode=e,this.context=o,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}function Cu(t,e){let o=Object.create(null);for(let e of t)if(Array.isArray(e.tag))for(let t of e.tag)o[t.id]=e.class;else o[e.tag.id]=e.class;let{scope:r,all:i=null}=e||{};return{style:t=>{let e=i;for(let r of t)for(let t of r.set){let r=o[t.id];if(r){e=e?e+" "+r:r;break}}return e},scope:r}}function Tu(t,e,o,r=0,i=t.length){let n=new Au(r,Array.isArray(e)?e:[e],o);n.highlightRange(t.cursor(),r,i,"",n.highlighters),n.flush(i)}Pu.empty=new Pu([],2,null);class Au{constructor(t,e,o){this.at=t,this.highlighters=e,this.span=o,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,o,r,i){let{type:n,from:a,to:s}=t;if(a>=o||s<=e)return;n.isTop&&(i=this.highlighters.filter(t=>!t.scope||t.scope(n)));let l=r,d=function(t){let e=t.type.prop($u);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||Pu.empty,c=function(t,e){let o=null;for(let r of t){let t=r.style(e);t&&(o=o?o+" "+t:t)}return o}(i,d.tags);if(c&&(l&&(l+=" "),l+=c,1==d.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(e,a),l),d.opaque)return;let h=t.tree&&t.tree.prop(zp.mounted);if(h&&h.overlay){let n=t.node.enter(h.overlay[0].from+a,1),d=this.highlighters.filter(t=>!t.scope||t.scope(h.tree.type)),c=t.firstChild();for(let p=0,u=a;;p++){let m=p<h.overlay.length?h.overlay[p]:null,f=m?m.from+a:s,b=Math.max(e,u),g=Math.min(o,f);if(b<g&&c)for(;t.from<g&&(this.highlightRange(t,b,g,r,i),this.startSpan(Math.min(g,t.to),l),!(t.to>=f)&&t.nextSibling()););if(!m||f>o)break;u=m.to+a,u>e&&(this.highlightRange(n.cursor(),Math.max(e,m.from+a),Math.min(o,u),"",d),this.startSpan(Math.min(o,u),l))}c&&t.parent()}else if(t.firstChild()){h&&(r="");do{if(!(t.to<=e)){if(t.from>=o)break;this.highlightRange(t,e,o,r,i),this.startSpan(Math.min(o,t.to),l)}}while(t.nextSibling());t.parent()}}}const Ru=ku.define,zu=Ru(),Mu=Ru(),Eu=Ru(Mu),Zu=Ru(Mu),Xu=Ru(),_u=Ru(Xu),ju=Ru(Xu),Du=Ru(),Yu=Ru(Du),Vu=Ru(),Lu=Ru(),Uu=Ru(),Bu=Ru(Uu),Wu=Ru(),Iu={comment:zu,lineComment:Ru(zu),blockComment:Ru(zu),docComment:Ru(zu),name:Mu,variableName:Ru(Mu),typeName:Eu,tagName:Ru(Eu),propertyName:Zu,attributeName:Ru(Zu),className:Ru(Mu),labelName:Ru(Mu),namespace:Ru(Mu),macroName:Ru(Mu),literal:Xu,string:_u,docString:Ru(_u),character:Ru(_u),attributeValue:Ru(_u),number:ju,integer:Ru(ju),float:Ru(ju),bool:Ru(Xu),regexp:Ru(Xu),escape:Ru(Xu),color:Ru(Xu),url:Ru(Xu),keyword:Vu,self:Ru(Vu),null:Ru(Vu),atom:Ru(Vu),unit:Ru(Vu),modifier:Ru(Vu),operatorKeyword:Ru(Vu),controlKeyword:Ru(Vu),definitionKeyword:Ru(Vu),moduleKeyword:Ru(Vu),operator:Lu,derefOperator:Ru(Lu),arithmeticOperator:Ru(Lu),logicOperator:Ru(Lu),bitwiseOperator:Ru(Lu),compareOperator:Ru(Lu),updateOperator:Ru(Lu),definitionOperator:Ru(Lu),typeOperator:Ru(Lu),controlOperator:Ru(Lu),punctuation:Uu,separator:Ru(Uu),bracket:Bu,angleBracket:Ru(Bu),squareBracket:Ru(Bu),paren:Ru(Bu),brace:Ru(Bu),content:Du,heading:Yu,heading1:Ru(Yu),heading2:Ru(Yu),heading3:Ru(Yu),heading4:Ru(Yu),heading5:Ru(Yu),heading6:Ru(Yu),contentSeparator:Ru(Du),list:Ru(Du),quote:Ru(Du),emphasis:Ru(Du),strong:Ru(Du),link:Ru(Du),monospace:Ru(Du),strikethrough:Ru(Du),inserted:Ru(),deleted:Ru(),changed:Ru(),invalid:Ru(),meta:Wu,documentMeta:Ru(Wu),annotation:Ru(Wu),processingInstruction:Ru(Wu),definition:ku.defineModifier("definition"),constant:ku.defineModifier("constant"),function:ku.defineModifier("function"),standard:ku.defineModifier("standard"),local:ku.defineModifier("local"),special:ku.defineModifier("special")};for(let t in Iu){let e=Iu[t];e instanceof ku&&(e.name=t)}var Gu;Cu([{tag:Iu.link,class:"tok-link"},{tag:Iu.heading,class:"tok-heading"},{tag:Iu.emphasis,class:"tok-emphasis"},{tag:Iu.strong,class:"tok-strong"},{tag:Iu.keyword,class:"tok-keyword"},{tag:Iu.atom,class:"tok-atom"},{tag:Iu.bool,class:"tok-bool"},{tag:Iu.url,class:"tok-url"},{tag:Iu.labelName,class:"tok-labelName"},{tag:Iu.inserted,class:"tok-inserted"},{tag:Iu.deleted,class:"tok-deleted"},{tag:Iu.literal,class:"tok-literal"},{tag:Iu.string,class:"tok-string"},{tag:Iu.number,class:"tok-number"},{tag:[Iu.regexp,Iu.escape,Iu.special(Iu.string)],class:"tok-string2"},{tag:Iu.variableName,class:"tok-variableName"},{tag:Iu.local(Iu.variableName),class:"tok-variableName tok-local"},{tag:Iu.definition(Iu.variableName),class:"tok-variableName tok-definition"},{tag:Iu.special(Iu.variableName),class:"tok-variableName2"},{tag:Iu.definition(Iu.propertyName),class:"tok-propertyName tok-definition"},{tag:Iu.typeName,class:"tok-typeName"},{tag:Iu.namespace,class:"tok-namespace"},{tag:Iu.className,class:"tok-className"},{tag:Iu.macroName,class:"tok-macroName"},{tag:Iu.propertyName,class:"tok-propertyName"},{tag:Iu.operator,class:"tok-operator"},{tag:Iu.comment,class:"tok-comment"},{tag:Iu.meta,class:"tok-meta"},{tag:Iu.invalid,class:"tok-invalid"},{tag:Iu.punctuation,class:"tok-punctuation"}]);const Nu=new zp;function Fu(t){return qn.define({combine:t?e=>e.concat(t):void 0})}const Hu=new zp;class Ku{constructor(t,e,o=[],r=""){this.data=t,this.name=r,sa.prototype.hasOwnProperty("tree")||Object.defineProperty(sa.prototype,"tree",{get(){return em(this)}}),this.parser=e,this.extension=[cm.of(this),sa.languageData.of((t,e,o)=>{let r=Ju(t,e,o),i=r.type.prop(Nu);if(!i)return[];let n=t.facet(i),a=r.type.prop(Hu);if(a){let i=r.resolve(e-r.from,o);for(let e of a)if(e.test(i,t)){let o=t.facet(e.facet);return"replace"==e.type?o:o.concat(n)}}return n})].concat(o)}isActiveAt(t,e,o=-1){return Ju(t,e,o).type.prop(Nu)==this.data}findRegions(t){let e=t.facet(cm);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let o=[],r=(t,e)=>{if(t.prop(Nu)==this.data)return void o.push({from:e,to:e+t.length});let i=t.prop(zp.mounted);if(i){if(i.tree.prop(Nu)==this.data){if(i.overlay)for(let t of i.overlay)o.push({from:t.from+e,to:t.to+e});else o.push({from:e,to:e+t.length});return}if(i.overlay){let t=o.length;if(r(i.tree,i.overlay[0].from+e),o.length>t)return}}for(let o=0;o<t.children.length;o++){let i=t.children[o];i instanceof Yp&&r(i,t.positions[o]+e)}};return r(em(t),0),o}get allowsNesting(){return!0}}function Ju(t,e,o){let r=t.facet(cm),i=em(t).topNode;if(!r||r.allowsNesting)for(let t=i;t;t=t.enter(e,o,Dp.ExcludeBuffers))t.type.isTop&&(i=t);return i}Ku.setState=Fn.define();class tm extends Ku{constructor(t,e,o){super(t,e,[],o),this.parser=e}static define(t){let e=Fu(t.languageData);return new tm(e,t.parser.configure({props:[Nu.add(t=>t.isTop?e:void 0)]}),t.name)}configure(t,e){return new tm(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function em(t){let e=t.field(Ku.state,!1);return e?e.tree:Yp.empty}class om{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let o=this.cursorPos-this.string.length;return t<o||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-o,e-o)}}let rm=null;class im{constructor(t,e,o=[],r,i,n,a,s){this.parser=t,this.state=e,this.fragments=o,this.tree=r,this.treeLen=i,this.viewport=n,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,e,o){return new im(t,e,[],Yp.empty,0,o,[],null)}startParse(){return this.parser.startParse(new om(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Yp.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var o;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(au.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(o=this.parse.stoppedAt)&&void 0!==o?o:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}})}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(au.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=rm;rm=this;try{return t()}finally{rm=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=nm(t,e.from,e.to);return t}changes(t,e){let{fragments:o,tree:r,treeLen:i,viewport:n,skipped:a}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,o,r,i)=>e.push({fromA:t,toA:o,fromB:r,toB:i})),o=au.applyChanges(o,e),r=Yp.empty,i=0,n={from:t.mapPos(n.from,-1),to:t.mapPos(n.to,1)},this.skipped.length){a=[];for(let e of this.skipped){let o=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);o<r&&a.push({from:o,to:r})}}}return new im(this.parser,e,o,r,i,n,a,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:o,to:r}=this.skipped[e];o<t.to&&r>t.from&&(this.fragments=nm(this.fragments,o,r),this.skipped.splice(e--,1))}return!(this.skipped.length>=e||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends su{createParse(e,o,r){let i=r[0].from,n=r[r.length-1].to;return{parsedPos:i,advance(){let e=rm;if(e){for(let t of r)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=n,new Yp(Zp.none,[],[],n-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return rm}}function nm(t,e,o){return au.applyChanges(t,[{fromA:e,toA:o,fromB:e,toB:o}])}class am{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),o=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,o)||e.takeTree(),new am(e)}static init(t){let e=Math.min(3e3,t.doc.length),o=im.create(t.facet(cm).parser,t,{from:0,to:e});return o.work(20,e)||o.takeTree(),new am(o)}}Ku.state=An.define({create:am.init,update(t,e){for(let t of e.effects)if(t.is(Ku.setState))return t.value;return e.startState.facet(cm)!=e.state.facet(cm)?am.init(e.state):t.apply(e)}});let sm=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(sm=t=>{let e=-1,o=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(o):cancelIdleCallback(e)});const lm="undefined"!=typeof navigator&&(null===(Gu=navigator.scheduling)||void 0===Gu?void 0:Gu.isInputPending)?()=>navigator.scheduling.isInputPending():null,dm=Xl.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(Ku.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(Ku.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=sm(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:o,viewport:{to:r}}=this.view,i=o.field(Ku.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let n=Date.now()+Math.min(this.chunkBudget,100,t&&!lm?Math.max(25,t.timeRemaining()-5):1e9),a=i.context.treeLen<r&&o.doc.length>r+1e3,s=i.context.work(()=>lm&&lm()||Date.now()>n,r+(a?0:1e5));this.chunkBudget-=Date.now()-e,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Ku.setState.of(new am(i.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(t=>zl(this.view.state,t)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),cm=qn.define({combine:t=>t.length?t[0]:null,enables:t=>[Ku.state,dm,Dc.contentAttributes.compute([t],e=>{let o=e.facet(t);return o&&o.name?{"data-language":o.name}:{}})]});class hm{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const pm=qn.define(),um=qn.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function mm(t){let e=t.facet(um);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function fm(t,e){let o="",r=t.tabSize,i=t.facet(um)[0];if("\t"==i){for(;e>=r;)o+="\t",e-=r;i=" "}for(let t=0;t<e;t++)o+=i;return o}function bm(t,e){t instanceof sa&&(t=new gm(t));for(let o of t.state.facet(pm)){let r=o(t,e);if(void 0!==r)return r}let o=em(t.state);return o.length>=e?function(t,e,o){let r=e.resolveStack(o),i=e.resolveInner(o,-1).resolve(o,0).enterUnfinishedNodesBefore(o);if(i!=r.node){let t=[];for(let e=i;e&&!(e.from<r.node.from||e.to>r.node.to||e.from==r.node.from&&e.type==r.node.type);e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)r={node:t[e],next:r}}return Om(r,t,o)}(t,o,e):null}class gm{constructor(t,e={}){this.state=t,this.options=e,this.unit=mm(t)}lineAt(t,e=1){let o=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=o.from&&r<=o.to?i&&r==t?{text:"",from:t}:(e<0?r<t:r<=t)?{text:o.text.slice(r-o.from),from:r}:{text:o.text.slice(0,r-o.from),from:o.from}:o}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:o,from:r}=this.lineAt(t,e);return o.slice(t-r,Math.min(o.length,t+100-r))}column(t,e=1){let{text:o,from:r}=this.lineAt(t,e),i=this.countColumn(o,t-r),n=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return n>-1&&(i+=n-this.countColumn(o,o.search(/\S|$/))),i}countColumn(t,e=t.length){return Sa(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:o,from:r}=this.lineAt(t,e),i=this.options.overrideIndentation;if(i){let t=i(r);if(t>-1)return t}return this.countColumn(o,o.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const vm=new zp;function Om(t,e,o){for(let r=t;r;r=r.next){let t=xm(r.node);if(t)return t(wm.create(e,o,r))}return 0}function xm(t){let e=t.type.prop(vm);if(e)return e;let o,r=t.firstChild;if(r&&(o=r.type.prop(zp.closedBy))){let e=t.lastChild,r=e&&o.indexOf(e.name)>-1;return t=>Sm(t,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?ym:null}function ym(){return 0}class wm extends gm{constructor(t,e,o){super(t.state,t.options),this.base=t,this.pos=e,this.context=o}get node(){return this.context.node}static create(t,e,o){return new wm(t,e,o)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let o=t.resolve(e.from);for(;o.parent&&o.parent.from==o.from;)o=o.parent;if(km(o,t))break;e=this.state.doc.lineAt(o.from)}return this.lineIndent(e.from)}continue(){return Om(this.context.next,this.base,this.pos)}}function km(t,e){for(let o=e;o;o=o.parent)if(t==o)return!0;return!1}function qm({closing:t,align:e=!0,units:o=1}){return r=>Sm(r,e,o,t)}function Sm(t,e,o,r,i){let n=t.textAfter,a=n.match(/^\s*/)[0].length,s=r&&n.slice(a,a+r.length)==r||i==t.pos+a,l=e?function(t){let e=t.node,o=e.childAfter(e.from),r=e.lastChild;if(!o)return null;let i=t.options.simulateBreak,n=t.state.doc.lineAt(o.from),a=null==i||i<=n.from?n.to:Math.min(n.to,i);for(let t=o.to;;){let i=e.childAfter(t);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=a)return null;let t=/^ */.exec(n.text.slice(o.to-n.from))[0].length;return{from:o.from,to:o.to+t}}t=i.to}}(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*o)}function Qm({except:t,units:e=1}={}){return o=>{let r=t&&t.test(o.textAfter);return o.baseIndent+(r?0:e*o.unit)}}const $m=qn.define(),Pm=new zp;function Cm(t){let e=t.firstChild,o=t.lastChild;return e&&e.to<o.from?{from:e.to,to:o.type.isError?t.to:o.from}:null}function Tm(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Am(t,e,o){for(let r of t.facet($m)){let i=r(t,e,o);if(i)return i}return function(t,e,o){let r=em(t);if(r.length<o)return null;let i=null;for(let n=r.resolveStack(o,1);n;n=n.next){let a=n.node;if(a.to<=o||a.from>o)continue;if(i&&a.from<e)break;let s=a.type.prop(Pm);if(s&&(a.to<r.length-50||r.length==t.doc.length||!Tm(a))){let r=s(a,t);r&&r.from<=o&&r.from>=e&&r.to>o&&(i=r)}}return i}(t,e,o)}function Rm(t,e){let o=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return o>=r?void 0:{from:o,to:r}}const zm=Fn.define({map:Rm}),Mm=Fn.define({map:Rm});function Em(t){let e=[];for(let{head:o}of t.state.selection.ranges)e.some(t=>t.from<=o&&t.to>=o)||e.push(t.lineBlockAt(o));return e}const Zm=An.define({create:()=>Ys.none,update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((e,o)=>t=Xm(t,e,o)),t=t.map(e.changes);for(let o of e.effects)if(o.is(zm)&&!jm(t,o.value.from,o.value.to)){let{preparePlaceholder:r}=e.state.facet(Um),i=r?Ys.replace({widget:new Gm(r(e.state,o.value))}):Im;t=t.update({add:[i.range(o.value.from,o.value.to)]})}else o.is(Mm)&&(t=t.update({filter:(t,e)=>o.value.from!=t||o.value.to!=e,filterFrom:o.value.from,filterTo:o.value.to}));return e.selection&&(t=Xm(t,e.selection.main.head)),t},provide:t=>Dc.decorations.from(t),toJSON(t,e){let o=[];return t.between(0,e.doc.length,(t,e)=>{o.push(t,e)}),o},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let o=0;o<t.length;){let r=t[o++],i=t[o++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");e.push(Im.range(r,i))}return Ys.set(e,!0)}});function Xm(t,e,o=e){let r=!1;return t.between(e,o,(t,i)=>{t<o&&i>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:o,filter:(t,r)=>t>=o||r<=e}):t}function _m(t,e,o){var r;let i=null;return null===(r=t.field(Zm,!1))||void 0===r||r.between(e,o,(t,e)=>{(!i||i.from>t)&&(i={from:t,to:e})}),i}function jm(t,e,o){let r=!1;return t.between(e,e,(t,i)=>{t==e&&i==o&&(r=!0)}),r}function Dm(t,e){return t.field(Zm,!1)?e:e.concat(Fn.appendConfig.of(Bm()))}function Ym(t,e,o=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return Dc.announce.of(`${t.state.phrase(o?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const Vm=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of Em(t)){let o=Am(t.state,e.from,e.to);if(o)return t.dispatch({effects:Dm(t.state,[zm.of(o),Ym(t,o)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(Zm,!1))return!1;let e=[];for(let o of Em(t)){let r=_m(t.state,o.from,o.to);r&&e.push(Mm.of(r),Ym(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,o=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),n=Am(e,i.from,i.to);n&&o.push(zm.of(n)),r=(n?t.lineBlockAt(n.to):i).to+1}return o.length&&t.dispatch({effects:Dm(t.state,o)}),!!o.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(Zm,!1);if(!e||!e.size)return!1;let o=[];return e.between(0,t.state.doc.length,(t,e)=>{o.push(Mm.of({from:t,to:e}))}),t.dispatch({effects:o}),!0}}],Lm={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Um=qn.define({combine:t=>la(t,Lm)});function Bm(t){let e=[Zm,Km];return t&&e.push(Um.of(t)),e}function Wm(t,e){let{state:o}=t,r=o.facet(Um),i=e=>{let o=t.lineBlockAt(t.posAtDOM(e.target)),r=_m(t.state,o.from,o.to);r&&t.dispatch({effects:Mm.of(r)}),e.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let n=document.createElement("span");return n.textContent=r.placeholderText,n.setAttribute("aria-label",o.phrase("folded code")),n.title=o.phrase("unfold"),n.className="cm-foldPlaceholder",n.onclick=i,n}const Im=Ys.replace({widget:new class extends js{toDOM(t){return Wm(t,null)}}});class Gm extends js{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return Wm(t,this.value)}}const Nm={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Fm extends ap{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function Hm(t={}){let e={...Nm,...t},o=new Fm(e,!0),r=new Fm(e,!1),i=Xl.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(cm)!=t.state.facet(cm)||t.startState.field(Zm,!1)!=t.state.field(Zm,!1)||em(t.startState)!=em(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new ma;for(let i of t.viewportLineBlocks){let n=_m(t.state,i.from,i.to)?r:Am(t.state,i.from,i.to)?o:null;n&&e.add(i.from,i.from,n)}return e.finish()}}),{domEventHandlers:n}=e;return[i,hp({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(i))||void 0===e?void 0:e.markers)||ua.empty},initialSpacer:()=>new Fm(e,!1),domEventHandlers:{...n,click:(t,e,o)=>{if(n.click&&n.click(t,e,o))return!0;let r=_m(t.state,e.from,e.to);if(r)return t.dispatch({effects:Mm.of(r)}),!0;let i=Am(t.state,e.from,e.to);return!!i&&(t.dispatch({effects:zm.of(i)}),!0)}}}),Bm()]}const Km=Dc.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Jm{constructor(t,e){let o;function r(t){let e=Ta.newName();return(o||(o=Object.create(null)))["."+e]=t,e}this.specs=t;const i="string"==typeof e.all?e.all:e.all?r(e.all):void 0,n=e.scope;this.scope=n instanceof Ku?t=>t.prop(Nu)==n.data:n?t=>t==n:void 0,this.style=Cu(t.map(t=>({tag:t.tag,class:t.class||r(Object.assign({},t,{tag:null}))})),{all:i}).style,this.module=o?new Ta(o):null,this.themeType=e.themeType}static define(t,e){return new Jm(t,e||{})}}const tf=qn.define(),ef=qn.define({combine:t=>t.length?[t[0]]:null});function of(t){let e=t.facet(tf);return e.length?e:t.facet(ef)}function rf(t,e){let o,r=[af];return t instanceof Jm&&(t.module&&r.push(Dc.styleModule.of(t.module)),o=t.themeType),(null==e?void 0:e.fallback)?r.push(ef.of(t)):o?r.push(tf.computeN([Dc.darkTheme],e=>e.facet(Dc.darkTheme)==("dark"==o)?[t]:[])):r.push(tf.of(t)),r}class nf{constructor(t){this.markCache=Object.create(null),this.tree=em(t.state),this.decorations=this.buildDeco(t,of(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=em(t.state),o=of(t.state),r=o!=of(t.startState),{viewport:i}=t.view,n=t.changes.mapPos(this.decoratedTo,1);e.length<i.to&&!r&&e.type==this.tree.type&&n>=i.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=n):(e!=this.tree||t.viewportChanged||r)&&(this.tree=e,this.decorations=this.buildDeco(t.view,o),this.decoratedTo=i.to)}buildDeco(t,e){if(!e||!this.tree.length)return Ys.none;let o=new ma;for(let{from:r,to:i}of t.visibleRanges)Tu(this.tree,e,(t,e,r)=>{o.add(t,e,this.markCache[r]||(this.markCache[r]=Ys.mark({class:r})))},r,i);return o.finish()}}const af=zn.high(Xl.fromClass(nf,{decorations:t=>t.decorations})),sf=Jm.define([{tag:Iu.meta,color:"#404740"},{tag:Iu.link,textDecoration:"underline"},{tag:Iu.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Iu.emphasis,fontStyle:"italic"},{tag:Iu.strong,fontWeight:"bold"},{tag:Iu.strikethrough,textDecoration:"line-through"},{tag:Iu.keyword,color:"#708"},{tag:[Iu.atom,Iu.bool,Iu.url,Iu.contentSeparator,Iu.labelName],color:"#219"},{tag:[Iu.literal,Iu.inserted],color:"#164"},{tag:[Iu.string,Iu.deleted],color:"#a11"},{tag:[Iu.regexp,Iu.escape,Iu.special(Iu.string)],color:"#e40"},{tag:Iu.definition(Iu.variableName),color:"#00f"},{tag:Iu.local(Iu.variableName),color:"#30a"},{tag:[Iu.typeName,Iu.namespace],color:"#085"},{tag:Iu.className,color:"#167"},{tag:[Iu.special(Iu.variableName),Iu.macroName],color:"#256"},{tag:Iu.definition(Iu.propertyName),color:"#00c"},{tag:Iu.comment,color:"#940"},{tag:Iu.invalid,color:"#f00"}]),lf=Dc.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),df="()[]{}",cf=qn.define({combine:t=>la(t,{afterCursor:!0,brackets:df,maxScanDistance:1e4,renderMatch:uf})}),hf=Ys.mark({class:"cm-matchingBracket"}),pf=Ys.mark({class:"cm-nonmatchingBracket"});function uf(t){let e=[],o=t.matched?hf:pf;return e.push(o.range(t.start.from,t.start.to)),t.end&&e.push(o.range(t.end.from,t.end.to)),e}const mf=An.define({create:()=>Ys.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let o=[],r=e.state.facet(cf);for(let t of e.state.selection.ranges){if(!t.empty)continue;let i=xf(e.state,t.head,-1,r)||t.head>0&&xf(e.state,t.head-1,1,r)||r.afterCursor&&(xf(e.state,t.head,1,r)||t.head<e.state.doc.length&&xf(e.state,t.head+1,-1,r));i&&(o=o.concat(r.renderMatch(i,e.state)))}return Ys.set(o,!0)},provide:t=>Dc.decorations.from(t)}),ff=[mf,lf];function bf(t={}){return[cf.of(t),ff]}const gf=new zp;function vf(t,e,o){let r=t.prop(e<0?zp.openedBy:zp.closedBy);if(r)return r;if(1==t.name.length){let r=o.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[o[r+e]]}return null}function Of(t){let e=t.type.prop(gf);return e?e(t.node):t}function xf(t,e,o,r={}){let i=r.maxScanDistance||1e4,n=r.brackets||df,a=em(t),s=a.resolveInner(e,o);for(let t=s;t;t=t.parent){let r=vf(t.type,o,n);if(r&&t.from<t.to){let i=Of(t);if(i&&(o>0?e>=i.from&&e<i.to:e>i.from&&e<=i.to))return yf(0,0,o,t,i,r,n)}}return function(t,e,o,r,i,n,a){let s=o<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=a.indexOf(s);if(l<0||l%2==0!=o>0)return null;let d={from:o<0?e-1:e,to:o>0?e+1:e},c=t.doc.iterRange(e,o>0?t.doc.length:0),h=0;for(let t=0;!c.next().done&&t<=n;){let n=c.value;o<0&&(t+=n.length);let s=e+t*o;for(let t=o>0?0:n.length-1,e=o>0?n.length:-1;t!=e;t+=o){let e=a.indexOf(n[t]);if(!(e<0||r.resolveInner(s+t,1).type!=i))if(e%2==0==o>0)h++;else{if(1==h)return{start:d,end:{from:s+t,to:s+t+1},matched:e>>1==l>>1};h--}}o>0&&(t+=n.length)}return c.done?{start:d,matched:!1}:null}(t,e,o,a,s.type,i,n)}function yf(t,e,o,r,i,n,a){let s=r.parent,l={from:i.from,to:i.to},d=0,c=null==s?void 0:s.cursor();if(c&&(o<0?c.childBefore(r.from):c.childAfter(r.to)))do{if(o<0?c.to<=r.from:c.from>=r.to){if(0==d&&n.indexOf(c.type.name)>-1&&c.from<c.to){let t=Of(c);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(vf(c.type,o,a))d++;else if(vf(c.type,-o,a)){if(0==d){let t=Of(c);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}d--}}}while(o<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}const wf=Object.create(null),kf=[Zp.none],qf=[],Sf=Object.create(null),Qf=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Qf[t]=Pf(wf,e);function $f(t,e){qf.indexOf(t)>-1||(qf.push(t),console.warn(e))}function Pf(t,e){let o=[];for(let r of e.split(" ")){let e=[];for(let o of r.split(".")){let r=t[o]||Iu[o];r?"function"==typeof r?e.length?e=e.map(r):$f(o,`Modifier ${o} used at start of tag`):e.length?$f(o,`Tag ${o} used as modifier`):e=Array.isArray(r)?r:[r]:$f(o,`Unknown highlighting tag ${o}`)}for(let t of e)o.push(t)}if(!o.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+o.map(t=>t.id),n=Sf[i];if(n)return n.id;let a=Sf[i]=Zp.define({id:kf.length,name:r,props:[Qu({[r]:o})]});return kf.push(a),a.id}function Cf(t,e){return({state:o,dispatch:r})=>{if(o.readOnly)return!1;let i=t(e,o);return!!i&&(r(o.update(i)),!0)}}Js.RTL,Js.LTR;const Tf=Cf(Zf,0),Af=Cf(Ef,0),Rf=Cf((t,e)=>Ef(t,e,function(t){let e=[];for(let o of t.selection.ranges){let r=t.doc.lineAt(o.from),i=o.to<=r.to?r:t.doc.lineAt(o.to);i.from>r.from&&i.from==o.to&&(i=o.to==r.to+1?r:t.doc.lineAt(o.to-1));let n=e.length-1;n>=0&&e[n].to>r.from?e[n].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}(e)),0);function zf(t,e){let o=t.languageDataAt("commentTokens",e,1);return o.length?o[0]:{}}const Mf=50;function Ef(t,e,o=e.selection.ranges){let r=o.map(t=>zf(e,t.from).block);if(!r.every(t=>t))return null;let i=o.map((t,o)=>function(t,{open:e,close:o},r,i){let n,a,s=t.sliceDoc(r-Mf,r),l=t.sliceDoc(i,i+Mf),d=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(l)[0].length,h=s.length-d;if(s.slice(h-e.length,h)==e&&l.slice(c,c+o.length)==o)return{open:{pos:r-d,margin:d&&1},close:{pos:i+c,margin:c&&1}};i-r<=2*Mf?n=a=t.sliceDoc(r,i):(n=t.sliceDoc(r,r+Mf),a=t.sliceDoc(i-Mf,i));let p=/^\s*/.exec(n)[0].length,u=/\s*$/.exec(a)[0].length,m=a.length-u-o.length;return n.slice(p,p+e.length)==e&&a.slice(m,m+o.length)==o?{open:{pos:r+p+e.length,margin:/\s/.test(n.charAt(p+e.length))?1:0},close:{pos:i-u-o.length,margin:/\s/.test(a.charAt(m-1))?1:0}}:null}(e,r[o],t.from,t.to));if(2!=t&&!i.every(t=>t))return{changes:e.changes(o.map((t,e)=>i[e]?[]:[{from:t.from,insert:r[e].open+" "},{from:t.to,insert:" "+r[e].close}]))};if(1!=t&&i.some(t=>t)){let t=[];for(let e,o=0;o<i.length;o++)if(e=i[o]){let i=r[o],{open:n,close:a}=e;t.push({from:n.pos-i.open.length,to:n.pos+n.margin},{from:a.pos-a.margin,to:a.pos+i.close.length})}return{changes:t}}return null}function Zf(t,e,o=e.selection.ranges){let r=[],i=-1;for(let{from:t,to:n}of o){let o=r.length,a=1e9,s=zf(e,t).line;if(s){for(let o=t;o<=n;){let l=e.doc.lineAt(o);if(l.from>i&&(t==n||n>l.from)){i=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,o=l.text.slice(t,t+s.length)==s?t:-1;t<l.text.length&&t<a&&(a=t),r.push({line:l,comment:o,token:s,indent:t,empty:e,single:!1})}o=l.to+1}if(a<1e9)for(let t=o;t<r.length;t++)r[t].indent<r[t].line.text.length&&(r[t].indent=a);r.length==o+1&&(r[o].single=!0)}}if(2!=t&&r.some(t=>t.comment<0&&(!t.empty||t.single))){let t=[];for(let{line:e,token:o,indent:i,empty:n,single:a}of r)!a&&n||t.push({from:e.from+i,insert:o+" "});let o=e.changes(t);return{changes:o,selection:e.selection.map(o,1)}}if(1!=t&&r.some(t=>t.comment>=0)){let t=[];for(let{line:e,comment:o,token:i}of r)if(o>=0){let r=e.from+o,n=r+i.length;" "==e.text[n-e.from]&&n++,t.push({from:r,to:n})}return{changes:t}}return null}const Xf=In.define(),_f=In.define(),jf=qn.define(),Df=qn.define({combine:t=>la(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(o,r)=>t(o,r)||e(o,r)})}),Yf=An.define({create:()=>ib.empty,update(t,e){let o=e.state.facet(Df),r=e.annotation(Xf);if(r){let i=Gf.fromTransaction(e,r.selection),n=r.side,a=0==n?t.undone:t.done;return a=i?Nf(a,a.length,o.minDepth,i):Jf(a,e.startState.selection),new ib(0==n?r.rest:a,0==n?a:r.rest)}let i=e.annotation(_f);if("full"!=i&&"before"!=i||(t=t.isolate()),!1===e.annotation(Hn.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let n=Gf.fromTransaction(e),a=e.annotation(Hn.time),s=e.annotation(Hn.userEvent);return n?t=t.addChanges(n,a,s,o,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,o.newGroupDelay)),"full"!=i&&"after"!=i||(t=t.isolate()),t},toJSON:t=>({done:t.done.map(t=>t.toJSON()),undone:t.undone.map(t=>t.toJSON())}),fromJSON:t=>new ib(t.done.map(Gf.fromJSON),t.undone.map(Gf.fromJSON))});function Vf(t={}){return[Yf,Df.of(t),Dc.domEventHandlers({beforeinput(t,e){let o="historyUndo"==t.inputType?Uf:"historyRedo"==t.inputType?Bf:null;return!!o&&(t.preventDefault(),o(e))}})]}function Lf(t,e){return function({state:o,dispatch:r}){if(!e&&o.readOnly)return!1;let i=o.field(Yf,!1);if(!i)return!1;let n=i.pop(t,o,e);return!!n&&(r(n),!0)}}const Uf=Lf(0,!1),Bf=Lf(1,!1),Wf=Lf(0,!0),If=Lf(1,!0);class Gf{constructor(t,e,o,r,i){this.changes=t,this.effects=e,this.mapped=o,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new Gf(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,o;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(o=this.startSelection)||void 0===o?void 0:o.toJSON(),selectionsAfter:this.selectionsAfter.map(t=>t.toJSON())}}static fromJSON(t){return new Gf(t.changes&&un.fromJSON(t.changes),[],t.mapped&&pn.fromJSON(t.mapped),t.startSelection&&yn.fromJSON(t.startSelection),t.selectionsAfter.map(yn.fromJSON))}static fromTransaction(t,e){let o=Hf;for(let e of t.startState.facet(jf)){let r=e(t);r.length&&(o=o.concat(r))}return!o.length&&t.changes.empty?null:new Gf(t.changes.invert(t.startState.doc),o,void 0,e||t.startState.selection,Hf)}static selection(t){return new Gf(void 0,Hf,void 0,void 0,t)}}function Nf(t,e,o,r){let i=e+1>o+20?e-o-1:0,n=t.slice(i,e);return n.push(r),n}function Ff(t,e){return t.length?e.length?t.concat(e):t:e}const Hf=[],Kf=200;function Jf(t,e){if(t.length){let o=t[t.length-1],r=o.selectionsAfter.slice(Math.max(0,o.selectionsAfter.length-Kf));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Nf(t,t.length-1,1e9,o.setSelAfter(r)))}return[Gf.selection([e])]}function tb(t){let e=t[t.length-1],o=t.slice();return o[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),o}function eb(t,e){if(!t.length)return t;let o=t.length,r=Hf;for(;o;){let i=ob(t[o-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let e=t.slice(0,o);return e[o-1]=i,e}e=i.mapped,o--,r=i.selectionsAfter}return r.length?[Gf.selection(r)]:Hf}function ob(t,e,o){let r=Ff(t.selectionsAfter.length?t.selectionsAfter.map(t=>t.map(e)):Hf,o);if(!t.changes)return Gf.selection(r);let i=t.changes.map(e),n=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(n):n;return new Gf(i,Fn.mapEffects(t.effects,e),a,t.startSelection.map(n),r)}const rb=/^(input\.type|delete)($|\.)/;class ib{constructor(t,e,o=0,r=void 0){this.done=t,this.undone=e,this.prevTime=o,this.prevUserEvent=r}isolate(){return this.prevTime?new ib(this.done,this.undone):this}addChanges(t,e,o,r,i){let n=this.done,a=n[n.length-1];return n=a&&a.changes&&!a.changes.empty&&t.changes&&(!o||rb.test(o))&&(!a.selectionsAfter.length&&e-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,function(t,e){let o=[],r=!1;return t.iterChangedRanges((t,e)=>o.push(t,e)),e.iterChangedRanges((t,e,i,n)=>{for(let t=0;t<o.length;){let e=o[t++],a=o[t++];n>=e&&i<=a&&(r=!0)}}),r}(a.changes,t.changes))||"input.type.compose"==o)?Nf(n,n.length-1,r.minDepth,new Gf(t.changes.compose(a.changes),Ff(Fn.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,Hf)):Nf(n,n.length,r.minDepth,t),new ib(n,Hf,e,o)}addSelection(t,e,o,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:Hf;return i.length>0&&e-this.prevTime<r&&o==this.prevUserEvent&&o&&/^select($|\.)/.test(o)&&function(t,e){return t.ranges.length==e.ranges.length&&0===t.ranges.filter((t,o)=>t.empty!=e.ranges[o].empty).length}(i[i.length-1],t)?this:new ib(Jf(this.done,t),this.undone,e,o)}addMapping(t){return new ib(eb(this.done,t),eb(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,o){let r=0==t?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],n=i.selectionsAfter[0]||e.selection;if(o&&i.selectionsAfter.length)return e.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:Xf.of({side:t,rest:tb(r),selection:n}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let o=1==r.length?Hf:r.slice(0,r.length-1);return i.mapped&&(o=eb(o,i.mapped)),e.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:Xf.of({side:t,rest:o,selection:n}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}ib.empty=new ib(Hf,Hf);const nb=[{key:"Mod-z",run:Uf,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Bf,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Bf,preventDefault:!0},{key:"Mod-u",run:Wf,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:If,preventDefault:!0}];function ab(t,e){return yn.create(t.ranges.map(e),t.mainIndex)}function sb(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function lb({state:t,dispatch:e},o){let r=ab(t.selection,o);return!r.eq(t.selection,!0)&&(e(sb(t,r)),!0)}function db(t,e){return yn.cursor(e?t.to:t.from)}function cb(t,e){return lb(t,o=>o.empty?t.moveByChar(o,e):db(o,e))}function hb(t){return t.textDirectionAt(t.state.selection.main.head)==Js.LTR}const pb=t=>cb(t,!hb(t)),ub=t=>cb(t,hb(t));function mb(t,e){return lb(t,o=>o.empty?t.moveByGroup(o,e):db(o,e))}function fb(t,e,o){if(e.type.prop(o))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function bb(t,e,o){let r,i,n=em(t).resolveInner(e.head),a=o?zp.closedBy:zp.openedBy;for(let r=e.head;;){let e=o?n.childAfter(r):n.childBefore(r);if(!e)break;fb(t,e,a)?n=e:r=o?e.to:e.from}return i=n.type.prop(a)&&(r=o?xf(t,n.from,1):xf(t,n.to,-1))&&r.matched?o?r.end.to:r.end.from:o?n.to:n.from,yn.cursor(i,o?-1:1)}function gb(t,e){return lb(t,o=>{if(!o.empty)return db(o,e);let r=t.moveVertically(o,e);return r.head!=o.head?r:t.moveToLineBoundary(o,e)})}"undefined"!=typeof Intl&&Intl.Segmenter;const vb=t=>gb(t,!1),Ob=t=>gb(t,!0);function xb(t){let e,o=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,r=0,i=0;if(o){for(let e of t.state.facet(Dc.scrollMargins)){let o=e(t);(null==o?void 0:o.top)&&(r=Math.max(null==o?void 0:o.top,r)),(null==o?void 0:o.bottom)&&(i=Math.max(null==o?void 0:o.bottom,i))}e=t.scrollDOM.clientHeight-r-i}else e=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:o,height:Math.max(t.defaultLineHeight,e-5)}}function yb(t,e){let o,r=xb(t),{state:i}=t,n=ab(i.selection,o=>o.empty?t.moveVertically(o,e,r.height):db(o,e));if(n.eq(i.selection))return!1;if(r.selfScroll){let e=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,l=a.bottom-r.marginBottom;e&&e.top>s&&e.bottom<l&&(o=Dc.scrollIntoView(n.main.head,{y:"start",yMargin:e.top-s}))}return t.dispatch(sb(i,n),{effects:o}),!0}const wb=t=>yb(t,!1),kb=t=>yb(t,!0);function qb(t,e,o){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,o);if(i.head==e.head&&i.head!=(o?r.to:r.from)&&(i=t.moveToLineBoundary(e,o,!1)),!o&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=yn.cursor(r.from+o))}return i}function Sb(t,e){let o=ab(t.state.selection,t=>{let o=e(t);return yn.range(t.anchor,o.head,o.goalColumn,o.bidiLevel||void 0)});return!o.eq(t.state.selection)&&(t.dispatch(sb(t.state,o)),!0)}function Qb(t,e){return Sb(t,o=>t.moveByChar(o,e))}const $b=t=>Qb(t,!hb(t)),Pb=t=>Qb(t,hb(t));function Cb(t,e){return Sb(t,o=>t.moveByGroup(o,e))}function Tb(t,e){return Sb(t,o=>t.moveVertically(o,e))}const Ab=t=>Tb(t,!1),Rb=t=>Tb(t,!0);function zb(t,e){return Sb(t,o=>t.moveVertically(o,e,xb(t).height))}const Mb=t=>zb(t,!1),Eb=t=>zb(t,!0),Zb=({state:t,dispatch:e})=>(e(sb(t,{anchor:0})),!0),Xb=({state:t,dispatch:e})=>(e(sb(t,{anchor:t.doc.length})),!0),_b=({state:t,dispatch:e})=>(e(sb(t,{anchor:t.selection.main.anchor,head:0})),!0),jb=({state:t,dispatch:e})=>(e(sb(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function Db(t,e){let{state:o}=t,r=o.selection,i=o.selection.ranges.slice();for(let r of o.selection.ranges){let n=o.doc.lineAt(r.head);if(e?n.to<t.state.doc.length:n.from>0)for(let o=r;;){let r=t.moveVertically(o,e);if(r.head<n.from||r.head>n.to){i.some(t=>t.head==r.head)||i.push(r);break}if(r.head==o.head)break;o=r}}return i.length!=r.ranges.length&&(t.dispatch(sb(o,yn.create(i,i.length-1))),!0)}function Yb(t,e){if(t.state.readOnly)return!1;let o="delete.selection",{state:r}=t,i=r.changeByRange(r=>{let{from:i,to:n}=r;if(i==n){let a=e(r);a<i?(o="delete.backward",a=Vb(t,a,!1)):a>i&&(o="delete.forward",a=Vb(t,a,!0)),i=Math.min(i,a),n=Math.max(n,a)}else i=Vb(t,i,!1),n=Vb(t,n,!0);return i==n?{range:r}:{changes:{from:i,to:n},range:yn.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:o,effects:"delete.selection"==o?Dc.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Vb(t,e,o){if(t instanceof Dc)for(let r of t.state.facet(Dc.atomicRanges).map(e=>e(t)))r.between(e,e,(t,r)=>{t<e&&r>e&&(e=o?r:t)});return e}const Lb=(t,e,o)=>Yb(t,r=>{let i,n,a=r.from,{state:s}=t,l=s.doc.lineAt(a);if(o&&!e&&a>l.from&&a<l.from+200&&!/[^ \t]/.test(i=l.text.slice(0,a-l.from))){if("\t"==i[i.length-1])return a-1;let t=Sa(i,s.tabSize)%mm(s)||mm(s);for(let e=0;e<t&&" "==i[i.length-1-e];e++)a--;n=a}else n=an(l.text,a-l.from,e,e)+l.from,n==a&&l.number!=(e?s.doc.lines:1)?n+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(l.text.slice(n-l.from,a-l.from))&&(n=an(l.text,n-l.from,!1,!1)+l.from);return n}),Ub=t=>Lb(t,!1,!0),Bb=t=>Lb(t,!0,!1),Wb=(t,e)=>Yb(t,o=>{let r=o.head,{state:i}=t,n=i.doc.lineAt(r),a=i.charCategorizer(r);for(let t=null;;){if(r==(e?n.to:n.from)){r==o.head&&n.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let s=an(n.text,r-n.from,e)+n.from,l=n.text.slice(Math.min(r,s)-n.from,Math.max(r,s)-n.from),d=a(l);if(null!=t&&d!=t)break;" "==l&&r==o.head||(t=d),r=s}return r}),Ib=t=>Wb(t,!1);function Gb(t){let e=[],o=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),n=t.doc.lineAt(r.to);if(r.empty||r.to!=n.from||(n=t.doc.lineAt(r.to-1)),o>=i.number){let t=e[e.length-1];t.to=n.to,t.ranges.push(r)}else e.push({from:i.from,to:n.to,ranges:[r]});o=n.number+1}return e}function Nb(t,e,o){if(t.readOnly)return!1;let r=[],i=[];for(let e of Gb(t)){if(o?e.to==t.doc.length:0==e.from)continue;let n=t.doc.lineAt(o?e.to+1:e.from-1),a=n.length+1;if(o){r.push({from:e.to,to:n.to},{from:e.from,insert:n.text+t.lineBreak});for(let o of e.ranges)i.push(yn.range(Math.min(t.doc.length,o.anchor+a),Math.min(t.doc.length,o.head+a)))}else{r.push({from:n.from,to:e.from},{from:e.to,insert:t.lineBreak+n.text});for(let t of e.ranges)i.push(yn.range(t.anchor-a,t.head-a))}}return!!r.length&&(e(t.update({changes:r,scrollIntoView:!0,selection:yn.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Fb(t,e,o){if(t.readOnly)return!1;let r=[];for(let e of Gb(t))o?r.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):r.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Hb=Jb(!1),Kb=Jb(!0);function Jb(t){return({state:e,dispatch:o})=>{if(e.readOnly)return!1;let r=e.changeByRange(o=>{let{from:r,to:i}=o,n=e.doc.lineAt(r),a=!t&&r==i&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let o,r=em(t).resolveInner(e),i=r.childBefore(e),n=r.childAfter(e);return i&&n&&i.to<=e&&n.from>=e&&(o=i.type.prop(zp.closedBy))&&o.indexOf(n.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(n.from).from&&!/\S/.test(t.sliceDoc(i.to,n.from))?{from:i.to,to:n.from}:null}(e,r);t&&(r=i=(i<=n.to?n:e.doc.lineAt(i)).to);let s=new gm(e,{simulateBreak:r,simulateDoubleBreak:!!a}),l=bm(s,r);for(null==l&&(l=Sa(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));i<n.to&&/\s/.test(n.text[i-n.from]);)i++;a?({from:r,to:i}=a):r>n.from&&r<n.from+100&&!/\S/.test(n.text.slice(0,r))&&(r=n.from);let d=["",fm(e,l)];return a&&d.push(fm(e,s.lineIndent(n.from,-1))),{changes:{from:r,to:i,insert:Ni.of(d)},range:yn.cursor(r+1+d[1].length)}});return o(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function tg(t,e){let o=-1;return t.changeByRange(r=>{let i=[];for(let n=r.from;n<=r.to;){let a=t.doc.lineAt(n);a.number>o&&(r.empty||r.to>a.from)&&(e(a,i,r),o=a.number),n=a.to+1}let n=t.changes(i);return{changes:i,range:yn.range(n.mapPos(r.anchor,1),n.mapPos(r.head,1))}})}const eg=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(tg(t,(e,o)=>{o.push({from:e.from,insert:t.facet(um)})}),{userEvent:"input.indent"})),!0),og=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(tg(t,(e,o)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let i=Sa(r,t.tabSize),n=0,a=fm(t,Math.max(0,i-mm(t)));for(;n<r.length&&n<a.length&&r.charCodeAt(n)==a.charCodeAt(n);)n++;o.push({from:e.from+n,to:e.from+r.length,insert:a.slice(n)})}),{userEvent:"delete.dedent"})),!0),rg=[{key:"ArrowLeft",run:pb,shift:$b,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>mb(t,!hb(t)),shift:t=>Cb(t,!hb(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>lb(t,e=>qb(t,e,!hb(t))),shift:t=>Sb(t,e=>qb(t,e,!hb(t))),preventDefault:!0},{key:"ArrowRight",run:ub,shift:Pb,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>mb(t,hb(t)),shift:t=>Cb(t,hb(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>lb(t,e=>qb(t,e,hb(t))),shift:t=>Sb(t,e=>qb(t,e,hb(t))),preventDefault:!0},{key:"ArrowUp",run:vb,shift:Ab,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Zb,shift:_b},{mac:"Ctrl-ArrowUp",run:wb,shift:Mb},{key:"ArrowDown",run:Ob,shift:Rb,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Xb,shift:jb},{mac:"Ctrl-ArrowDown",run:kb,shift:Eb},{key:"PageUp",run:wb,shift:Mb},{key:"PageDown",run:kb,shift:Eb},{key:"Home",run:t=>lb(t,e=>qb(t,e,!1)),shift:t=>Sb(t,e=>qb(t,e,!1)),preventDefault:!0},{key:"Mod-Home",run:Zb,shift:_b},{key:"End",run:t=>lb(t,e=>qb(t,e,!0)),shift:t=>Sb(t,e=>qb(t,e,!0)),preventDefault:!0},{key:"Mod-End",run:Xb,shift:jb},{key:"Enter",run:Hb,shift:Hb},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Ub,shift:Ub,preventDefault:!0},{key:"Delete",run:Bb,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ib,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Wb(t,!0),preventDefault:!0},{mac:"Mod-Backspace",run:t=>Yb(t,e=>{let o=t.moveToLineBoundary(e,!1).head;return e.head>o?o:Math.max(0,e.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:t=>Yb(t,e=>{let o=t.moveToLineBoundary(e,!0).head;return e.head<o?o:Math.min(t.state.doc.length,e.head+1)}),preventDefault:!0}].concat([{key:"Ctrl-b",run:pb,shift:$b,preventDefault:!0},{key:"Ctrl-f",run:ub,shift:Pb},{key:"Ctrl-p",run:vb,shift:Ab},{key:"Ctrl-n",run:Ob,shift:Rb},{key:"Ctrl-a",run:t=>lb(t,e=>yn.cursor(t.lineBlockAt(e.head).from,1)),shift:t=>Sb(t,e=>yn.cursor(t.lineBlockAt(e.head).from))},{key:"Ctrl-e",run:t=>lb(t,e=>yn.cursor(t.lineBlockAt(e.head).to,-1)),shift:t=>Sb(t,e=>yn.cursor(t.lineBlockAt(e.head).to))},{key:"Ctrl-d",run:Bb},{key:"Ctrl-h",run:Ub},{key:"Ctrl-k",run:t=>Yb(t,e=>{let o=t.lineBlockAt(e.head).to;return e.head<o?o:Math.min(t.state.doc.length,e.head+1)})},{key:"Ctrl-Alt-h",run:Ib},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=t.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:Ni.of(["",""])},range:yn.cursor(t.from)}));return e(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=t.changeByRange(e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let o=e.from,r=t.doc.lineAt(o),i=o==r.from?o-1:an(r.text,o-r.from,!1)+r.from,n=o==r.to?o+1:an(r.text,o-r.from,!0)+r.from;return{changes:{from:i,to:n,insert:t.doc.slice(o,n).append(t.doc.slice(i,o))},range:yn.cursor(n)}});return!o.changes.empty&&(e(t.update(o,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:kb}].map(t=>({mac:t.key,run:t.run,shift:t.shift}))),ig=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>lb(t,e=>bb(t.state,e,!hb(t))),shift:t=>Sb(t,e=>bb(t.state,e,!hb(t)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>lb(t,e=>bb(t.state,e,hb(t))),shift:t=>Sb(t,e=>bb(t.state,e,hb(t)))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Nb(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>Fb(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Nb(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>Fb(t,e,!0)},{key:"Mod-Alt-ArrowUp",run:t=>Db(t,!1)},{key:"Mod-Alt-ArrowDown",run:t=>Db(t,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let o=t.selection,r=null;return o.ranges.length>1?r=yn.create([o.main]):o.main.empty||(r=yn.create([yn.cursor(o.main.head)])),!!r&&(e(sb(t,r)),!0)}},{key:"Mod-Enter",run:Kb},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let o=Gb(t).map(({from:e,to:o})=>yn.range(e,Math.min(o+1,t.doc.length)));return e(t.update({selection:yn.create(o),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let o=ab(t.selection,e=>{let o=em(t),r=o.resolveStack(e.from,1);if(e.empty){let t=o.resolveStack(e.from,-1);t.node.from>=r.node.from&&t.node.to<=r.node.to&&(r=t)}for(let t=r;t;t=t.next){let{node:o}=t;if((o.from<e.from&&o.to>=e.to||o.to>e.to&&o.from<=e.from)&&t.next)return yn.range(o.to,o.from)}return e});return!o.eq(t.selection)&&(e(sb(t,o)),!0)},preventDefault:!0},{key:"Mod-[",run:og},{key:"Mod-]",run:eg},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=Object.create(null),r=new gm(t,{overrideIndentation:t=>{let e=o[t];return null==e?-1:e}}),i=tg(t,(e,i,n)=>{let a=bm(r,e.from);if(null==a)return;/\S/.test(e.text)||(a=0);let s=/^\s*/.exec(e.text)[0],l=fm(t,a);(s!=l||n.from<e.from+s.length)&&(o[e.from]=a,i.push({from:e.from,to:e.from+s.length,insert:l}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,o=e.changes(Gb(e).map(({from:t,to:o})=>(t>0?t--:o<e.doc.length&&o++,{from:t,to:o}))),r=ab(e.selection,e=>{let o;if(t.lineWrapping){let r=t.lineBlockAt(e.head),i=t.coordsAtPos(e.head,e.assoc||1);i&&(o=r.bottom+t.documentTop-i.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,o)}).map(o);return t.dispatch({changes:o,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e,o){let r=!1,i=ab(t.selection,e=>{let i=xf(t,e.head,-1)||xf(t,e.head,1)||e.head>0&&xf(t,e.head-1,1)||e.head<t.doc.length&&xf(t,e.head+1,-1);if(!i||!i.end)return e;r=!0;let n=i.start.from==e.head?i.end.to:i.end.from;return o?yn.range(e.anchor,n):yn.cursor(n)});return!!r&&(e(sb(t,i)),!0)}(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,o=e.doc.lineAt(e.selection.main.from),r=zf(t.state,o.from);return r.line?Tf(t):!!r.block&&Rf(t)}},{key:"Alt-A",run:Af},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat(rg),ng={key:"Tab",run:eg,shift:og};class ag{constructor(t,e,o,r,i,n,a,s,l,d=0,c){this.p=t,this.stack=e,this.state=o,this.reducePos=r,this.pos=i,this.score=n,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=d,this.parent=c}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,o=0){let r=t.parser.context;return new ag(t,[],e,o,o,0,[],0,r?new sg(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let o=t>>19,r=65535&t,{parser:i}=this.p,n=this.reducePos<this.pos-25;n&&this.setLookAhead(this.pos);let a=i.dynamicPrecedence(r);if(a&&(this.score+=a),0==o)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,n?8:4,!0),void this.reduceContext(r,this.reducePos);let s=this.stack.length-3*(o-1)-(262144&t?6:0),l=s?this.stack[s-2]:this.p.ranges[0].from,d=this.reducePos-l;d>=2e3&&!(null===(e=this.p.parser.nodeSet.types[r])||void 0===e?void 0:e.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSize<d&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=d));let c=s?this.stack[s-1]:0,h=this.bufferBase+this.buffer.length-c;if(r<i.minRepeatTerm||131072&t){let t=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,t,h+4,!0)}if(262144&t)this.state=this.stack[s];else{let t=this.stack[s-3];this.state=i.getGoto(t,r,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(r,l)}storeNode(t,e,o,r=4,i=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,r=this.buffer.length;if(0==r&&t.parent&&(r=t.bufferBase-t.parent.bufferBase,t=t.parent),r>0&&0==t.buffer[r-4]&&t.buffer[r-1]>-1){if(e==o)return;if(t.buffer[r-2]>=e)return void(t.buffer[r-2]=o)}}if(i&&this.pos!=o){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4]){let t=!1;for(let e=i;e>0&&this.buffer[e-2]>o;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;i>0&&this.buffer[i-2]>o;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=t,this.buffer[i+1]=e,this.buffer[i+2]=o,this.buffer[i+3]=r}else this.buffer.push(t,e,o,r)}shift(t,e,o,r){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=r,this.shiftContext(e,o),e<=this.p.parser.maxNode&&this.buffer.push(e,o,r,4);else{let i=t,{parser:n}=this.p;(r>this.pos||e<=n.maxNode)&&(this.pos=r,n.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,o),this.shiftContext(e,o),e<=n.maxNode&&this.buffer.push(e,o,r,4)}}apply(t,e,o,r){65536&t?this.reduce(t):this.shift(t,e,o,r)}useNode(t,e){let o=this.p.reused.length-1;(o<0||this.p.reused[o]!=t)&&(this.p.reused.push(t),o++);let r=this.pos;this.reducePos=this.pos=r+t.length,this.pushState(e,r),this.buffer.push(o,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let o=t.buffer.slice(e),r=t.bufferBase+e;for(;t&&r==t.bufferBase;)t=t.parent;return new ag(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,o,r,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let o=t<=this.p.parser.maxNode;o&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,o?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new lg(this);;){let o=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==o)return!1;if(!(65536&o))return!0;e.reduce(o)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let o=[];for(let r,i=0;i<e.length;i+=2)(r=e[i+1])!=this.state&&this.p.parser.hasAction(r,t)&&o.push(e[i],r);if(this.stack.length<120)for(let t=0;o.length<8&&t<e.length;t+=2){let r=e[t+1];o.some((t,e)=>1&e&&t==r)||o.push(e[t],r)}e=o}let o=[];for(let t=0;t<e.length&&o.length<4;t+=2){let r=e[t+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(e[t],this.pos),i.reducePos=this.pos,i.score-=200,o.push(i)}return o}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let o=e>>19,r=65535&e,i=this.stack.length-3*o;if(i<0||t.getGoto(this.stack[i],r,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],o=(r,i)=>{if(!e.includes(r))return e.push(r),t.allActions(r,e=>{if(393216&e);else if(65536&e){let o=(e>>19)-i;if(o>1){let r=65535&e,i=this.stack.length-3*o;if(i>=0&&t.getGoto(this.stack[i],r,!1)>=0)return o<<19|65536|r}}else{let t=o(e,i+1);if(null!=t)return t}})};return o(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new sg(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class sg{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class lg{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,o=t>>19;0==o?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(o-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}class dg{constructor(t,e,o){this.stack=t,this.pos=e,this.index=o,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new dg(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new dg(this.stack,this.pos,this.index)}}function cg(t,e=Uint16Array){if("string"!=typeof t)return t;let o=null;for(let r=0,i=0;r<t.length;){let n=0;for(;;){let e=t.charCodeAt(r++),o=!1;if(126==e){n=65535;break}e>=92&&e--,e>=34&&e--;let i=e-32;if(i>=46&&(i-=46,o=!0),n+=i,o)break;n*=46}o?o[i++]=n:o=new e(n)}return o}class hg{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const pg=new hg;class ug{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=pg,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let o=this.range,r=this.rangeIndex,i=this.pos+t;for(;i<o.from;){if(!r)return null;let t=this.ranges[--r];i-=o.from-t.to,o=t}for(;e<0?i>o.to:i>=o.to;){if(r==this.ranges.length-1)return null;let t=this.ranges[++r];i+=t.from-o.to,o=t}return i}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,o,r=this.chunkOff+t;if(r>=0&&r<this.chunk.length)e=this.pos+t,o=this.chunk.charCodeAt(r);else{let r=this.resolveOffset(t,1);if(null==r)return-1;if(e=r,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)o=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,r=this.range;for(;r.to<=e;)r=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-e)),o=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),o}acceptToken(t,e=0){let o=e?this.resolveOffset(e,-1):this.pos;if(null==o||o<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=o}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=pg,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let o="";for(let r of this.ranges){if(r.from>=e)break;r.to>t&&(o+=this.input.read(Math.max(r.from,t),Math.min(r.to,e)))}return o}}class mg{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:o}=e.p;gg(this.data,t,e,this.id,o.data,o.tokenPrecTable)}}mg.prototype.contextual=mg.prototype.fallback=mg.prototype.extend=!1;class fg{constructor(t,e,o){this.precTable=e,this.elseToken=o,this.data="string"==typeof t?cg(t):t}token(t,e){let o=t.pos,r=0;for(;;){let o=t.next<0,i=t.resolveOffset(1,1);if(gg(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(o||r++,null==i)break;t.reset(i,t.token)}r&&(t.reset(o,t.token),t.acceptToken(this.elseToken,r))}}fg.prototype.contextual=mg.prototype.fallback=mg.prototype.extend=!1;class bg{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function gg(t,e,o,r,i,n){let a=0,s=1<<r,{dialect:l}=o.p.parser;t:for(;0!=(s&t[a]);){let o=t[a+1];for(let r=a+3;r<o;r+=2)if((t[r+1]&s)>0){let o=t[r];if(l.allows(o)&&(-1==e.token.value||e.token.value==o||Og(o,e.token.value,i,n))){e.acceptToken(o);break}}let r=e.next,d=0,c=t[a+2];if(!(e.next<0&&c>d&&65535==t[o+3*c-3])){for(;d<c;){let i=d+c>>1,n=o+i+(i<<1),s=t[n],l=t[n+1]||65536;if(r<s)c=i;else{if(!(r>=l)){a=t[n+2],e.advance();continue t}d=i+1}}break}a=t[o+3*c-1]}}function vg(t,e,o){for(let r,i=e;65535!=(r=t[i]);i++)if(r==o)return i-e;return-1}function Og(t,e,o,r){let i=vg(o,r,e);return i<0||vg(o,r,t)<i}const xg="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let yg=null;function wg(t,e,o){let r=t.cursor(Dp.IncludeAnonymous);for(r.moveTo(e);;)if(!(o<0?r.childBefore(e):r.childAfter(e)))for(;;){if((o<0?r.to<e:r.from>e)&&!r.type.isError)return o<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(o<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return o<0?0:t.length}}class kg{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?wg(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?wg(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let o=this.trees[e],r=this.index[e];if(r==o.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=o.children[r],n=this.start[e]+o.positions[r];if(n>t)return this.nextStart=n,null;if(i instanceof Yp){if(n==t){if(n<this.safeFrom)return null;let t=n+i.length;if(t<=this.safeTo){let e=i.prop(zp.lookAhead);if(!e||t+e<this.fragment.to)return i}}this.index[e]++,n+i.length>=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(n),this.index.push(0))}else this.index[e]++,this.nextStart=n+i.length}}}class qg{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(t=>new hg)}getActions(t){let e=0,o=null,{parser:r}=t.p,{tokenizers:i}=r,n=r.stateSlot(t.state,3),a=t.curContext?t.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&n))continue;let l=i[r],d=this.tokens[r];if((!o||l.fallback)&&((l.contextual||d.start!=t.pos||d.mask!=n||d.context!=a)&&(this.updateCachedToken(d,l,t),d.mask=n,d.context=a),d.lookAhead>d.end+25&&(s=Math.max(d.lookAhead,s)),0!=d.value)){let r=e;if(d.extended>-1&&(e=this.addActions(t,d.extended,d.end,e)),e=this.addActions(t,d.value,d.end,e),!l.extend&&(o=d,e>r))break}}for(;this.actions.length>e;)this.actions.pop();return s&&t.setLookAhead(s),o||t.pos!=this.stream.end||(o=new hg,o.value=t.p.parser.eofTerm,o.start=o.end=t.pos,e=this.addActions(t,o.value,o.end,e)),this.mainToken=o,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new hg,{pos:o,p:r}=t;return e.start=o,e.end=Math.min(o+1,r.stream.end),e.value=o==r.stream.end?r.parser.eofTerm:0,e}updateCachedToken(t,e,o){let r=this.stream.clipPos(o.pos);if(e.token(this.stream.reset(r,t),o),t.value>-1){let{parser:e}=o.p;for(let r=0;r<e.specialized.length;r++)if(e.specialized[r]==t.value){let i=e.specializers[r](this.stream.read(t.start,t.end),o);if(i>=0&&o.p.parser.dialect.allows(i>>1)){1&i?t.extended=i>>1:t.value=i>>1;break}}}else t.value=0,t.end=this.stream.clipPos(r+1)}putAction(t,e,o,r){for(let e=0;e<r;e+=3)if(this.actions[e]==t)return r;return this.actions[r++]=t,this.actions[r++]=e,this.actions[r++]=o,r}addActions(t,e,o,r){let{state:i}=t,{parser:n}=t.p,{data:a}=n;for(let t=0;t<2;t++)for(let s=n.stateSlot(i,t?2:1);;s+=3){if(65535==a[s]){if(1!=a[s+1]){0==r&&2==a[s+1]&&(r=this.putAction(Ag(a,s+2),e,o,r));break}s=Ag(a,s+2)}a[s]==e&&(r=this.putAction(Ag(a,s+1),e,o,r))}return r}}class Sg{constructor(t,e,o,r){this.parser=t,this.input=e,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new ug(e,r),this.tokens=new qg(t,this.stream),this.topTerm=t.top[1];let{from:i}=r[0];this.stacks=[ag.start(this,t.top[0],i)],this.fragments=o.length&&this.stream.end-i>4*t.bufferLength?new kg(o,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,o=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==o.length){let[t]=o;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let n=0;n<o.length;n++){let a=o[n];for(;;){if(this.tokens.mainToken=null,a.pos>r)i.push(a);else{if(this.advanceStack(a,i,o))continue;{t||(t=[],e=[]),t.push(a);let o=this.tokens.getMainToken(a);e.push(o.value,o.end)}}break}}if(!i.length){let e=t&&function(t){let e=null;for(let o of t){let t=o.p.stoppedAt;(o.pos==o.p.stream.end||null!=t&&o.pos>t)&&o.p.parser.stateFlag(o.state,2)&&(!e||e.score<o.score)&&(e=o)}return e}(t);if(e)return xg&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw xg&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&t){let o=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,i);if(o)return xg&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(i.length>t)for(i.sort((t,e)=>e.score-t.score);i.length>t;)i.pop();i.some(t=>t.reducePos>r)&&this.recovering--}else if(i.length>1){t:for(let t=0;t<i.length-1;t++){let e=i[t];for(let o=t+1;o<i.length;o++){let r=i[o];if(e.sameState(r)||e.buffer.length>500&&r.buffer.length>500){if(!((e.score-r.score||e.buffer.length-r.buffer.length)>0)){i.splice(t--,1);continue t}i.splice(o--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let t=1;t<i.length;t++)i[t].pos<this.minStackPos&&(this.minStackPos=i[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,o){let r=t.pos,{parser:i}=this,n=xg?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,o=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?i.getGoto(t.state,a.type.id):-1;if(r>-1&&a.length&&(!e||(a.prop(zp.contextHash)||0)==o))return t.useNode(a,r),xg&&console.log(n+this.stackID(t)+` (via reuse of ${i.getName(a.type.id)})`),!0;if(!(a instanceof Yp)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof Yp&&0==a.positions[0]))break;a=s}}let a=i.stateSlot(t.state,4);if(a>0)return t.reduce(a),xg&&console.log(n+this.stackID(t)+` (via always-reduce ${i.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let s=this.tokens.getActions(t);for(let a=0;a<s.length;){let l=s[a++],d=s[a++],c=s[a++],h=a==s.length||!o,p=h?t:t.split(),u=this.tokens.mainToken;if(p.apply(l,d,u?u.start:p.pos,c),xg&&console.log(n+this.stackID(p)+` (via ${65536&l?`reduce of ${i.getName(65535&l)}`:"shift"} for ${i.getName(d)} @ ${r}${p==t?"":", split"})`),h)return!0;p.pos>r?e.push(p):o.push(p)}return!1}advanceFully(t,e){let o=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>o)return Qg(t,e),!0}}runRecovery(t,e,o){let r=null,i=!1;for(let n=0;n<t.length;n++){let a=t[n],s=e[n<<1],l=e[1+(n<<1)],d=xg?this.stackID(a)+" -> ":"";if(a.deadEnd){if(i)continue;if(i=!0,a.restart(),xg&&console.log(d+this.stackID(a)+" (restarted)"),this.advanceFully(a,o))continue}let c=a.split(),h=d;for(let t=0;c.forceReduce()&&t<10&&(xg&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,o));t++)xg&&(h=this.stackID(c)+" -> ");for(let t of a.recoverByInsert(s))xg&&console.log(d+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,o);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),xg&&console.log(d+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),Qg(a,o)):(!r||r.score<a.score)&&(r=a)}return r}stackToTree(t){return t.close(),Yp.build({buffer:dg.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(yg||(yg=new WeakMap)).get(t);return e||yg.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function Qg(t,e){for(let o=0;o<e.length;o++){let r=e[o];if(r.pos==t.pos&&r.sameState(t))return void(e[o].score<t.score&&(e[o]=t))}e.push(t)}class $g{constructor(t,e,o){this.source=t,this.flags=e,this.disabled=o}allows(t){return!this.disabled||0==this.disabled[t]}}const Pg=t=>t;class Cg{constructor(t){this.start=t.start,this.shift=t.shift||Pg,this.reduce=t.reduce||Pg,this.reuse=t.reuse||Pg,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class Tg extends su{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let o=0;o<t.repeatNodeCount;o++)e.push("");let o=Object.keys(t.topRules).map(e=>t.topRules[e][1]),r=[];for(let t=0;t<e.length;t++)r.push([]);function i(t,e,o){r[t].push([e,e.deserialize(String(o))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=zp[t]);for(let o=1;o<e.length;){let r=e[o++];if(r>=0)i(r,t,e[o++]);else{let n=e[o+-r];for(let a=-r;a>0;a--)i(e[o++],t,n);o++}}}this.nodeSet=new Xp(e.map((e,i)=>Zp.define({name:i>=this.minRepeatTerm?void 0:e,id:i,props:r[i],top:o.indexOf(i)>-1,error:0==i,skipped:t.skippedNodes&&t.skippedNodes.indexOf(i)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=Tp;let n=cg(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(Rg),this.states=cg(t.states,Uint32Array),this.data=cg(t.stateData),this.goto=cg(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(t=>"number"==typeof t?new mg(n,t):t),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,o){let r=new Sg(this,t,e,o);for(let i of this.wrappers)r=i(r,t,e,o);return r}getGoto(t,e,o=!1){let r=this.goto;if(e>=r[0])return-1;for(let i=r[e+1];;){let e=r[i++],n=1&e,a=r[i++];if(n&&o)return a;for(let o=i+(e>>1);i<o;i++)if(r[i]==t)return a;if(n)return-1}}hasAction(t,e){let o=this.data;for(let r=0;r<2;r++)for(let i,n=this.stateSlot(t,r?2:1);;n+=3){if(65535==(i=o[n])){if(1!=o[n+1]){if(2==o[n+1])return Ag(o,n+2);break}i=o[n=Ag(o,n+2)]}if(i==e||0==i)return Ag(o,n+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,t=>t==e||null)}allActions(t,e){let o=this.stateSlot(t,4),r=o?e(o):void 0;for(let o=this.stateSlot(t,1);null==r;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])break;o=Ag(this.data,o+2)}r=e(Ag(this.data,o+1))}return r}nextStates(t){let e=[];for(let o=this.stateSlot(t,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])break;o=Ag(this.data,o+2)}if(!(1&this.data[o+2])){let t=this.data[o+1];e.some((e,o)=>1&o&&e==t)||e.push(this.data[o],t)}}return e}configure(t){let e=Object.assign(Object.create(Tg.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let o=this.topRules[t.top];if(!o)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=o}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(e=>{let o=t.tokenizers.find(t=>t.from==e);return o?o.to:e})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((o,r)=>{let i=t.specializers.find(t=>t.from==o.external);if(!i)return o;let n=Object.assign(Object.assign({},o),{external:i.to});return e.specializers[r]=Rg(n),n})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),o=e.map(()=>!1);if(t)for(let r of t.split(" ")){let t=e.indexOf(r);t>=0&&(o[t]=!0)}let r=null;for(let t=0;t<e.length;t++)if(!o[t])for(let o,i=this.dialects[e[t]];65535!=(o=this.data[i++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[o]=1;return new $g(t,o,r)}static deserialize(t){return new Tg(t)}}function Ag(t,e){return t[e]|t[e+1]<<16}function Rg(t){if(t.external){let e=t.extend?1:0;return(o,r)=>t.external(o,r)<<1|e}return t.get}const zg={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Mg={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Eg={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Zg(t){return 45==t||46==t||58==t||t>=65&&t<=90||95==t||t>=97&&t<=122||t>=161}let Xg=null,_g=null,jg=0;function Dg(t,e){let o=t.pos+e;if(jg==o&&_g==t)return Xg;let r=t.peek(e),i="";for(;Zg(r);)i+=String.fromCharCode(r),r=t.peek(++e);return _g=t,jg=o,Xg=i?i.toLowerCase():r==Yg||r==Vg?void 0:null}const Yg=63,Vg=33;function Lg(t,e){this.name=t,this.parent=e}const Ug=[6,10,7,8,9],Bg=new Cg({start:null,shift:(t,e,o,r)=>Ug.indexOf(e)>-1?new Lg(Dg(r,1)||"",t):t,reduce:(t,e)=>21==e&&t?t.parent:t,reuse(t,e,o,r){let i=e.type.id;return 6==i||37==i?new Lg(Dg(r,1)||"",t):t},strict:!1}),Wg=new bg((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(58));t.advance();let o=47==t.next;o&&t.advance();let r=Dg(t,0);if(void 0===r)return;if(!r)return t.acceptToken(o?15:14);let i=e.context?e.context.name:null;if(o){if(r==i)return t.acceptToken(11);if(i&&Mg[i])return t.acceptToken(58,-2);if(e.dialectEnabled(0))return t.acceptToken(12);for(let t=e.context;t;t=t.parent)if(t.name==r)return;t.acceptToken(13)}else{if("script"==r)return t.acceptToken(7);if("style"==r)return t.acceptToken(8);if("textarea"==r)return t.acceptToken(9);if(zg.hasOwnProperty(r))return t.acceptToken(10);i&&Eg[i]&&Eg[i][r]?t.acceptToken(58,-1):t.acceptToken(6)}},{contextual:!0}),Ig=new bg(t=>{for(let e=0,o=0;;o++){if(t.next<0){o&&t.acceptToken(59);break}if(45==t.next)e++;else{if(62==t.next&&e>=2){o>=3&&t.acceptToken(59,-2);break}e=0}t.advance()}}),Gg=new bg((t,e)=>{if(47==t.next&&62==t.peek(1)){let o=e.dialectEnabled(1)||function(t){for(;t;t=t.parent)if("svg"==t.name||"math"==t.name)return!0;return!1}(e.context);t.acceptToken(o?5:4,2)}else 62==t.next&&t.acceptToken(4,1)});function Ng(t,e,o){let r=2+t.length;return new bg(i=>{for(let n=0,a=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(e);break}if(0==n&&60==i.next||1==n&&47==i.next||n>=2&&n<r&&i.next==t.charCodeAt(n-2))n++,a++;else{if(n==r&&62==i.next){s>a?i.acceptToken(e,-a):i.acceptToken(o,-(a-2));break}if((10==i.next||13==i.next)&&s){i.acceptToken(e,1);break}n=a=0}i.advance()}})}const Fg=Ng("script",55,1),Hg=Ng("style",56,2),Kg=Ng("textarea",57,3),Jg=Qu({"Text RawText IncompleteTag IncompleteCloseTag":Iu.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Iu.angleBracket,TagName:Iu.tagName,"MismatchedCloseTag/TagName":[Iu.tagName,Iu.invalid],AttributeName:Iu.attributeName,"AttributeValue UnquotedAttributeValue":Iu.attributeValue,Is:Iu.definitionOperator,"EntityReference CharacterReference":Iu.character,Comment:Iu.blockComment,ProcessingInst:Iu.processingInstruction,DoctypeDecl:Iu.documentMeta}),tv=Tg.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQ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^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Bg,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[Jg],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e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!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Fg,Hg,Kg,Gg,Wg,Ig,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function ev(t,e){let o=Object.create(null);for(let r of t.getChildren(24)){let t=r.getChild(25),i=r.getChild(27)||r.getChild(28);t&&(o[e.read(t.from,t.to)]=i?27==i.type.id?e.read(i.from+1,i.to-1):e.read(i.from,i.to):"")}return o}function ov(t,e){let o=t.getChild(23);return o?e.read(o.from,o.to):" "}function rv(t,e,o){let r;for(let i of o)if(!i.attrs||i.attrs(r||(r=ev(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function iv(t=[],e=[]){let o=[],r=[],i=[],n=[];for(let e of t)("script"==e.tag?o:"style"==e.tag?r:"textarea"==e.tag?i:n).push(e);let a=e.length?Object.create(null):null;for(let t of e)(a[t.name]||(a[t.name]=[])).push(t);return s=(t,e)=>{let s=t.type.id;if(29==s)return rv(t,e,o);if(32==s)return rv(t,e,r);if(35==s)return rv(t,e,i);if(21==s&&n.length){let o,r=t.node,i=r.firstChild,a=i&&ov(i,e);if(a)for(let t of n)if(t.tag==a&&(!t.attrs||t.attrs(o||(o=ev(i,e))))){let e=r.lastChild,o=38==e.type.id?e.from:r.to;if(o>i.to)return{parser:t.parser,overlay:[{from:i.to,to:o}]}}}if(a&&24==s){let o,r=t.node;if(o=r.firstChild){let t=a[e.read(o.from,o.to)];if(t)for(let o of t){if(o.tagName&&o.tagName!=ov(r.parent,e))continue;let t=r.lastChild;if(27==t.type.id){let e=t.from+1,r=t.lastChild,i=t.to-(r&&r.isError?0:1);if(i>e)return{parser:o.parser,overlay:[{from:e,to:i}]}}else if(28==t.type.id)return{parser:o.parser,overlay:[{from:t.from,to:t.to}]}}}}return null},(t,e,o,r)=>new uu(t,s,e,o,r);var s}const nv=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function av(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function sv(t){return t>=48&&t<=57}function lv(t){return sv(t)||t>=97&&t<=102||t>=65&&t<=70}const dv=(t,e,o)=>(r,i)=>{for(let n=!1,a=0,s=0;;s++){let{next:l}=r;if(av(l)||45==l||95==l||n&&sv(l))!n&&(45!=l||s>0)&&(n=!0),a===s&&45==l&&a++,r.advance();else{if(92!=l||10==r.peek(1)){n&&r.acceptToken(2==a&&i.canShift(2)?e:40==l?o:t);break}if(r.advance(),lv(r.next)){do{r.advance()}while(lv(r.next));32==r.next&&r.advance()}else r.next>-1&&r.advance();n=!0}}},cv=new bg(dv(123,2,124)),hv=new bg(dv(125,3,4)),pv=new bg(t=>{if(nv.includes(t.peek(-1))){let{next:e}=t;(av(e)||95==e||35==e||46==e||42==e||91==e||58==e&&av(t.peek(1))||45==e||38==e)&&t.acceptToken(122)}}),uv=new bg(t=>{if(!nv.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),av(e)){do{t.advance()}while(av(t.next)||sv(t.next));t.acceptToken(1)}}}),mv=Qu({"AtKeyword import charset namespace keyframes media supports":Iu.definitionKeyword,"from to selector":Iu.keyword,NamespaceName:Iu.namespace,KeyframeName:Iu.labelName,KeyframeRangeName:Iu.operatorKeyword,TagName:Iu.tagName,ClassName:Iu.className,PseudoClassName:Iu.constant(Iu.className),IdName:Iu.labelName,"FeatureName PropertyName":Iu.propertyName,AttributeName:Iu.attributeName,NumberLiteral:Iu.number,KeywordQuery:Iu.keyword,UnaryQueryOp:Iu.operatorKeyword,"CallTag ValueName":Iu.atom,VariableName:Iu.variableName,Callee:Iu.operatorKeyword,Unit:Iu.unit,"UniversalSelector NestingSelector":Iu.definitionOperator,"MatchOp CompareOp":Iu.compareOperator,"ChildOp SiblingOp, LogicOp":Iu.logicOperator,BinOp:Iu.arithmeticOperator,Important:Iu.modifier,Comment:Iu.blockComment,ColorLiteral:Iu.color,"ParenthesizedContent StringLiteral":Iu.string,":":Iu.punctuation,"PseudoOp #":Iu.derefOperator,"; ,":Iu.separator,"( )":Iu.paren,"[ ]":Iu.squareBracket,"{ }":Iu.brace}),fv={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},bv={__proto__:null,or:98,and:98,not:106,only:106,layer:170},gv={__proto__:null,selector:112,layer:166},vv={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},Ov={__proto__:null,to:207},xv=Tg.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP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yword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[mv],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_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q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[pv,uv,cv,hv,1,2,3,4,new fg("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:t=>fv[t]||-1},{term:125,get:t=>bv[t]||-1},{term:4,get:t=>gv[t]||-1},{term:25,get:t=>vv[t]||-1},{term:123,get:t=>Ov[t]||-1}],tokenPrec:1963});let yv=null;function wv(){if(!yv&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],o=new Set;for(let r in t)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof t[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())),o.has(r)||(e.push(r),o.add(r)));yv=e.sort().map(t=>({type:"property",label:t,apply:t+": "}))}return yv||[]}const kv=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),qv=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),Sv=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Qv=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),$v=/^(\w[\w-]*|-\w[\w-]*|)$/,Pv=/^-(-[\w-]*)?$/,Cv=new nu,Tv=["Declaration"];function Av(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function Rv(t,e,o){if(e.to-e.from>4096){let r=Cv.get(e);if(r)return r;let i=[],n=new Set,a=e.cursor(Dp.IncludeAnonymous);if(a.firstChild())do{for(let e of Rv(t,a.node,o))n.has(e.label)||(n.add(e.label),i.push(e))}while(a.nextSibling());return Cv.set(e,i),i}{let r=[],i=new Set;return e.cursor().iterate(e=>{var n;if(o(e)&&e.matchContext(Tv)&&":"==(null===(n=e.node.nextSibling)||void 0===n?void 0:n.name)){let o=t.sliceString(e.from,e.to);i.has(o)||(i.add(o),r.push({label:o,type:"variable"}))}}),r}}const zv=t=>e=>{let{state:o,pos:r}=e,i=em(o).resolveInner(r,-1),n=i.type.isError&&i.from==i.to-1&&"-"==o.doc.sliceString(i.from,i.to);if("PropertyName"==i.name||(n||"TagName"==i.name)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:wv(),validFor:$v};if("ValueName"==i.name)return{from:i.from,options:qv,validFor:$v};if("PseudoClassName"==i.name)return{from:i.from,options:kv,validFor:$v};if(t(i)||(e.explicit||n)&&function(t,e){var o;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let r=null===(o=t.parent)||void 0===o?void 0:o.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==e.sliceString(r.from,r.to)}(i,o.doc))return{from:t(i)||n?i.from:r,options:Rv(o.doc,Av(i),t),validFor:Pv};if("TagName"==i.name){for(let{parent:t}=i;t;t=t.parent)if("Block"==t.name)return{from:i.from,options:wv(),validFor:$v};return{from:i.from,options:Sv,validFor:$v}}if("AtKeyword"==i.name)return{from:i.from,options:Qv,validFor:$v};if(!e.explicit)return null;let a=i.resolve(r),s=a.childBefore(r);return s&&":"==s.name&&"PseudoClassSelector"==a.name?{from:r,options:kv,validFor:$v}:s&&":"==s.name&&"Declaration"==a.name||"ArgList"==a.name?{from:r,options:qv,validFor:$v}:"Block"==a.name||"Styles"==a.name?{from:r,options:wv(),validFor:$v}:null},Mv=zv(t=>"VariableName"==t.name),Ev=tm.define({name:"css",parser:xv.configure({props:[vm.add({Declaration:Qm()}),Pm.add({"Block KeyframeList":Cm})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Zv(){return new hm(Ev,Ev.data.of({autocomplete:Mv}))}const Xv=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],_v=new Cg({start:!1,shift:(t,e)=>5==e||6==e||320==e?t:321==e,strict:!1}),jv=new bg((t,e)=>{let{next:o}=t;(125==o||-1==o||e.context)&&t.acceptToken(318)},{contextual:!0,fallback:!0}),Dv=new bg((t,e)=>{let o,{next:r}=t;Xv.indexOf(r)>-1||(47!=r||47!=(o=t.peek(1))&&42!=o)&&(125==r||59==r||-1==r||e.context||t.acceptToken(316))},{contextual:!0}),Yv=new bg((t,e)=>{91!=t.next||e.context||t.acceptToken(317)},{contextual:!0}),Vv=new bg((t,e)=>{let{next:o}=t;if(43==o||45==o){if(t.advance(),o==t.next){t.advance();let o=!e.context&&e.canShift(1);t.acceptToken(o?1:2)}}else 63==o&&46==t.peek(1)&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(3))},{contextual:!0});function Lv(t,e){return t>=65&&t<=90||t>=97&&t<=122||95==t||t>=192||!e&&t>=48&&t<=57}const Uv=new bg((t,e)=>{if(60!=t.next||!e.dialectEnabled(0))return;if(t.advance(),47==t.next)return;let o=0;for(;Xv.indexOf(t.next)>-1;)t.advance(),o++;if(Lv(t.next,!0)){for(t.advance(),o++;Lv(t.next,!1);)t.advance(),o++;for(;Xv.indexOf(t.next)>-1;)t.advance(),o++;if(44==t.next)return;for(let e=0;;e++){if(7==e){if(!Lv(t.next,!0))return;break}if(t.next!="extends".charCodeAt(e))break;t.advance(),o++}}t.acceptToken(4,-o)}),Bv=Qu({"get set async static":Iu.modifier,"for while do if else switch try catch finally return throw break continue default case defer":Iu.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":Iu.operatorKeyword,"let var const using function class extends":Iu.definitionKeyword,"import export from":Iu.moduleKeyword,"with debugger new":Iu.keyword,TemplateString:Iu.special(Iu.string),super:Iu.atom,BooleanLiteral:Iu.bool,this:Iu.self,null:Iu.null,Star:Iu.modifier,VariableName:Iu.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Iu.function(Iu.variableName),VariableDefinition:Iu.definition(Iu.variableName),Label:Iu.labelName,PropertyName:Iu.propertyName,PrivatePropertyName:Iu.special(Iu.propertyName),"CallExpression/MemberExpression/PropertyName":Iu.function(Iu.propertyName),"FunctionDeclaration/VariableDefinition":Iu.function(Iu.definition(Iu.variableName)),"ClassDeclaration/VariableDefinition":Iu.definition(Iu.className),"NewExpression/VariableName":Iu.className,PropertyDefinition:Iu.definition(Iu.propertyName),PrivatePropertyDefinition:Iu.definition(Iu.special(Iu.propertyName)),UpdateOp:Iu.updateOperator,"LineComment Hashbang":Iu.lineComment,BlockComment:Iu.blockComment,Number:Iu.number,String:Iu.string,Escape:Iu.escape,ArithOp:Iu.arithmeticOperator,LogicOp:Iu.logicOperator,BitOp:Iu.bitwiseOperator,CompareOp:Iu.compareOperator,RegExp:Iu.regexp,Equals:Iu.definitionOperator,Arrow:Iu.function(Iu.punctuation),": Spread":Iu.punctuation,"( )":Iu.paren,"[ ]":Iu.squareBracket,"{ }":Iu.brace,"InterpolationStart InterpolationEnd":Iu.special(Iu.brace),".":Iu.derefOperator,", ;":Iu.separator,"@":Iu.meta,TypeName:Iu.typeName,TypeDefinition:Iu.definition(Iu.typeName),"type enum interface implements namespace module declare":Iu.definitionKeyword,"abstract global Privacy readonly override":Iu.modifier,"is keyof unique infer asserts":Iu.operatorKeyword,JSXAttributeValue:Iu.attributeValue,JSXText:Iu.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Iu.angleBracket,"JSXIdentifier JSXNameSpacedName":Iu.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Iu.attributeName,"JSXBuiltin/JSXIdentifier":Iu.standard(Iu.tagName)}),Wv={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Iv={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Gv={__proto__:null,"<":193},Nv=Tg.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'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+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:_v,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,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z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new fg("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>Wv[t]||-1},{term:343,get:t=>Iv[t]||-1},{term:95,get:t=>Gv[t]||-1}],tokenPrec:15201});class Fv{constructor(t,e,o,r){this.state=t,this.pos=e,this.explicit=o,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=em(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),o=Math.max(e.from,this.pos-250),r=e.text.slice(o-e.from,this.pos-e.from),i=r.search(eO(t,!1));return i<0?null:{from:o+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,o){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),o&&o.onDocChange&&(this.abortOnDocChange=!0))}}function Hv(t){let e=Object.keys(t).join(""),o=/\w/.test(e);return o&&(e=e.replace(/\w/g,"")),`[${o?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Kv(t){let e=t.map(t=>"string"==typeof t?{label:t}:t),[o,r]=e.every(t=>/^\w+$/.test(t.label))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),o=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let t=1;t<r.length;t++)o[r[t]]=!0}let r=Hv(e)+Hv(o)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(e);return t=>{let i=t.matchBefore(r);return i||t.explicit?{from:i?i.from:t.pos,options:e,validFor:o}:null}}class Jv{constructor(t,e,o,r){this.completion=t,this.source=e,this.match=o,this.score=r}}function tO(t){return t.selection.main.from}function eO(t,e){var o;let{source:r}=t,i=e&&"^"!=r[0],n="$"!=r[r.length-1];return i||n?new RegExp(`${i?"^":""}(?:${r})${n?"$":""}`,null!==(o=t.flags)&&void 0!==o?o:t.ignoreCase?"i":""):t}const oO=In.define();function rO(t,e,o,r){let{main:i}=t.selection,n=o-i.from,a=r-i.from;return{...t.changeByRange(s=>{if(s!=i&&o!=r&&t.sliceDoc(s.from+n,s.from+a)!=t.sliceDoc(o,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+n,to:r==i.from?s.to:s.from+a,insert:l},range:yn.cursor(s.from+n+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const iO=new WeakMap;function nO(t){if(!Array.isArray(t))return t;let e=iO.get(t);return e||iO.set(t,e=Kv(t)),e}const aO=Fn.define(),sO=Fn.define();class lO{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let o=sn(t,e),r=dn(o);this.chars.push(o);let i=t.slice(e,e+r),n=i.toUpperCase();this.folded.push(sn(n==i?i.toLowerCase():n,0)),e+=r}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:o,any:r,precise:i,byWord:n}=this;if(1==e.length){let r=sn(t,0),i=dn(r),n=i==t.length?0:-100;if(r==e[0]);else{if(r!=o[0])return null;n+=-200}return this.ret(n,[0,i])}let a=t.indexOf(this.pattern);if(0==a)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=e.length,l=0;if(a<0){for(let i=0,n=Math.min(t.length,200);i<n&&l<s;){let n=sn(t,i);n!=e[l]&&n!=o[l]||(r[l++]=i),i+=dn(n)}if(l<s)return null}let d=0,c=0,h=!1,p=0,u=-1,m=-1,f=/[a-z]/.test(t),b=!0;for(let r=0,l=Math.min(t.length,200),g=0;r<l&&c<s;){let l=sn(t,r);a<0&&(d<s&&l==e[d]&&(i[d++]=r),p<s&&(l==e[p]||l==o[p]?(0==p&&(u=r),m=r+1,p++):p=0));let v,O=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(v=ln(l))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!r||1==O&&f||0==g&&0!=O)&&(e[c]==l||o[c]==l&&(h=!0)?n[c++]=r:n.length&&(b=!1)),g=O,r+=dn(l)}return c==s&&0==n[0]&&b?this.result((h?-200:0)-100,n,t):p==s&&0==u?this.ret(-200-t.length+(m==t.length?0:-100),[0,m]):a>-1?this.ret(-700-t.length,[a,a+this.pattern.length]):p==s?this.ret(-900-t.length,[u,m]):c==s?this.result((h?-200:0)-100-700+(b?0:-1100),n,t):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,t)}result(t,e,o){let r=[],i=0;for(let t of e){let e=t+(this.astral?dn(sn(o,t)):1);i&&r[i-1]==t?r[i-1]=e:(r[i++]=t,r[i++]=e)}return this.ret(t-o.length,r)}}class dO{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),o=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==o?null:(this.matched=[0,e.length],this.score=o+(t.length==this.pattern.length?0:-100),this)}}const cO=qn.define({combine:t=>la(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:pO,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>o=>hO(t(o),e(o)),optionClass:(t,e)=>o=>hO(t(o),e(o)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function hO(t,e){return t?e?t+" "+e:t:e}function pO(t,e,o,r,i,n){let a,s,l=t.textDirection==Js.RTL,d=l,c=!1,h="top",p=e.left-i.left,u=i.right-e.right,m=r.right-r.left,f=r.bottom-r.top;if(d&&p<Math.min(m,u)?d=!1:!d&&u<Math.min(m,p)&&(d=!0),m<=(d?p:u))a=Math.max(i.top,Math.min(o.top,i.bottom-f))-e.top,s=Math.min(400,d?p:u);else{c=!0,s=Math.min(400,(l?e.right:i.right-e.left)-30);let t=i.bottom-e.bottom;t>=f||t>e.top?a=o.bottom-e.top:(h="bottom",a=e.bottom-o.top)}return{style:`${h}: ${a/((e.bottom-e.top)/n.offsetHeight)}px; max-width: ${s/((e.right-e.left)/n.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":d?"left":"right")}}function uO(t,e,o){if(t<=o)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/o);return{from:t*o,to:(t+1)*o}}let r=Math.floor((t-e)/o);return{from:t-(r+1)*o,to:t-r*o}}class mO{constructor(t,e,o){this.view=t,this.stateField=e,this.applyCompletion=o,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let r=t.state.field(e),{options:i,selected:n}=r.open,a=t.state.facet(cO);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map(t=>"cm-completionIcon-"+t)),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,o,r){let i=document.createElement("span");i.className="cm-completionLabel";let n=t.displayLabel||t.label,a=0;for(let t=0;t<r.length;){let e=r[t++],o=r[t++];e>a&&i.appendChild(document.createTextNode(n.slice(a,e)));let s=i.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(n.slice(e,o))),s.className="cm-completionMatchedText",a=o}return a<n.length&&i.appendChild(document.createTextNode(n.slice(a))),i},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort((t,e)=>t.position-e.position).map(t=>t.render)}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=uO(i.length,n,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",o=>{let{options:r}=t.state.field(e).open;for(let e,i=o.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(e=/-(\d+)$/.exec(i.id))&&+e[1]<r.length)return this.applyCompletion(t,r[+e[1]]),void o.preventDefault()}),this.dom.addEventListener("focusout",e=>{let o=t.state.field(this.stateField,!1);o&&o.tooltip&&t.state.facet(cO).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:sO.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(t){var e;let o=t.state.field(this.stateField),r=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),o!=r){let{options:i,selected:n,disabled:a}=o.open;r.open&&r.open.options==i||(this.range=uO(i.length,n,t.state.facet(cO).maxRenderedOptions),this.showOptions(i,o.id)),this.updateSel(),a!=(null===(e=r.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=uO(e.options.length,e.selected,this.view.state.facet(cO).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:o}=e.options[e.selected],{info:r}=o;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(o);if(!i)return;"then"in i?i.then(e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,o)}).catch(t=>zl(this.view.state,t,"completion info")):this.addInfoPane(i,o)}}addInfoPane(t,e){this.destroyInfo();let o=this.info=document.createElement("div");if(o.className="cm-tooltip cm-completionInfo",null!=t.nodeType)o.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:r}=t;o.appendChild(e),this.infoDestroy=r||null}this.dom.appendChild(o),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let o=this.list.firstChild,r=this.range.from;o;o=o.nextSibling,r++)"LI"==o.nodeName&&o.id?r==t?o.hasAttribute("aria-selected")||(o.setAttribute("aria-selected","true"),e=o):o.hasAttribute("aria-selected")&&o.removeAttribute("aria-selected"):r--;return e&&function(t,e){let o=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=o.height/t.offsetHeight;r.top<o.top?t.scrollTop-=(o.top-r.top)/i:r.bottom>o.bottom&&(t.scrollTop+=(r.bottom-o.bottom)/i)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.space;if(!i){let t=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:t.clientWidth,bottom:t.clientHeight}}return r.top>Math.min(i.bottom,e.bottom)-10||r.bottom<Math.max(i.top,e.top)+10?null:this.view.state.facet(cO).positionInfo(this.view,e,r,o,i,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,o){const r=document.createElement("ul");r.id=e,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",t=>{t.target==r&&t.preventDefault()});let i=null;for(let n=o.from;n<o.to;n++){let{completion:a,match:s}=t[n],{section:l}=a;if(l){let t="string"==typeof l?l:l.name;t!=i&&(n>o.from||0==o.from)&&(i=t,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=t)}const d=r.appendChild(document.createElement("li"));d.id=e+"-"+n,d.setAttribute("role","option");let c=this.optionClass(a);c&&(d.className=c);for(let t of this.optionContent){let e=t(a,this.view.state,this.view,s);e&&d.appendChild(e)}}return o.from&&r.classList.add("cm-completionListIncompleteTop"),o.to<t.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function fO(t,e){return o=>new mO(o,t,e)}function bO(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class gO{constructor(t,e,o,r,i,n){this.options=t,this.attrs=e,this.tooltip=o,this.timestamp=r,this.selected=i,this.disabled=n}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new gO(this.options,yO(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,o,r,i,n){if(r&&!n&&t.some(t=>t.isPending))return r.setDisabled();let a=function(t,e){let o=[],r=null,i=null,n=t=>{o.push(t);let{section:e}=t.completion;if(e){r||(r=[]);let t="string"==typeof e?e:e.name;r.some(e=>e.name==t)||r.push("string"==typeof e?{name:t}:e)}},a=e.facet(cO);for(let r of t)if(r.hasResult()){let t=r.result.getMatch;if(!1===r.result.filter)for(let e of r.result.options)n(new Jv(e,r.source,t?t(e):[],1e9-o.length));else{let o,s=e.sliceDoc(r.from,r.to),l=a.filterStrict?new dO(s):new lO(s);for(let e of r.result.options)if(o=l.match(e.label)){let a=e.displayLabel?t?t(e,o.matched):[]:o.matched,s=o.score+(e.boost||0);if(n(new Jv(e,r.source,a,s)),"object"==typeof e.section&&"dynamic"===e.section.rank){let{name:t}=e.section;i||(i=Object.create(null)),i[t]=Math.max(s,i[t]||-1e9)}}}}if(r){let t=Object.create(null),e=0,n=(t,e)=>("dynamic"===t.rank&&"dynamic"===e.rank?i[e.name]-i[t.name]:0)||("number"==typeof t.rank?t.rank:1e9)-("number"==typeof e.rank?e.rank:1e9)||(t.name<e.name?-1:1);for(let o of r.sort(n))e-=1e5,t[o.name]=e;for(let e of o){let{section:o}=e.completion;o&&(e.score+=t["string"==typeof o?o:o.name])}}let s=[],l=null,d=a.compareCompletions;for(let t of o.sort((t,e)=>e.score-t.score||d(t.completion,e.completion))){let e=t.completion;!l||l.label!=e.label||l.detail!=e.detail||null!=l.type&&null!=e.type&&l.type!=e.type||l.apply!=e.apply||l.boost!=e.boost?s.push(t):bO(t.completion)>bO(l)&&(s[s.length-1]=t),l=t.completion}return s}(t,e);if(!a.length)return r&&t.some(t=>t.isPending)?r.setDisabled():null;let s=e.facet(cO).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let t=r.options[r.selected].completion;for(let e=0;e<a.length;e++)if(a[e].completion==t){s=e;break}}return new gO(a,yO(o,s),{pos:t.reduce((t,e)=>e.hasResult()?Math.min(t,e.from):t,1e8),create:TO,above:i.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(t){return new gO(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new gO(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class vO{constructor(t,e,o){this.active=t,this.id=e,this.open=o}static start(){return new vO(wO,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,o=e.facet(cO),r=(o.override||e.languageDataAt("autocomplete",tO(e)).map(nO)).map(e=>{let r=this.active.find(t=>t.source==e)||new qO(e,this.active.some(t=>0!=t.state)?1:0);return r.update(t,o)});r.length==this.active.length&&r.every((t,e)=>t==this.active[e])&&(r=this.active);let i=this.open,n=t.effects.some(t=>t.is(QO));i&&t.docChanged&&(i=i.map(t.changes)),t.selection||r.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!function(t,e){if(t==e)return!0;for(let o=0,r=0;;){for(;o<t.length&&!t[o].hasResult();)o++;for(;r<e.length&&!e[r].hasResult();)r++;let i=o==t.length,n=r==e.length;if(i||n)return i==n;if(t[o++].result!=e[r++].result)return!1}}(r,this.active)||n?i=gO.build(r,e,this.id,i,o,n):i&&i.disabled&&!r.some(t=>t.isPending)&&(i=null),!i&&r.every(t=>!t.isPending)&&r.some(t=>t.hasResult())&&(r=r.map(t=>t.hasResult()?new qO(t.source,0):t));for(let e of t.effects)e.is($O)&&(i=i&&i.setSelected(e.value,this.id));return r==this.active&&i==this.open?this:new vO(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?OO:xO}}const OO={"aria-autocomplete":"list"},xO={};function yO(t,e){let o={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(o["aria-activedescendant"]=t+"-"+e),o}const wO=[];function kO(t,e){if(t.isUserEvent("input.complete")){let o=t.annotation(oO);if(o&&e.activateOnCompletion(o))return 12}let o=t.isUserEvent("input.type");return o&&e.activateOnTyping?5:o?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class qO{constructor(t,e,o=!1){this.source=t,this.state=e,this.explicit=o}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let o=kO(t,e),r=this;(8&o||16&o&&this.touches(t))&&(r=new qO(r.source,0)),4&o&&0==r.state&&(r=new qO(this.source,1)),r=r.updateFor(t,o);for(let e of t.effects)if(e.is(aO))r=new qO(r.source,1,e.value);else if(e.is(sO))r=new qO(r.source,0);else if(e.is(QO))for(let t of e.value)t.source==r.source&&(r=t);return r}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(tO(t.state))}}class SO extends qO{constructor(t,e,o,r,i,n){super(t,3,e),this.limit=o,this.result=r,this.from=i,this.to=n}hasResult(){return!0}updateFor(t,e){var o;if(!(3&e))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),n=t.changes.mapPos(this.to,1),a=tO(t.state);if(a>n||!r||2&e&&(tO(t.startState)==this.from||a<this.limit))return new qO(this.source,4&e?1:0);let s=t.changes.mapPos(this.limit);return function(t,e,o,r){if(!t)return!1;let i=e.sliceDoc(o,r);return"function"==typeof t?t(i,o,r,e):eO(t,!0).test(i)}(r.validFor,t.state,i,n)?new SO(this.source,this.explicit,s,r,i,n):r.update&&(r=r.update(r,i,n,new Fv(t.state,a,!1)))?new SO(this.source,this.explicit,s,r,r.from,null!==(o=r.to)&&void 0!==o?o:tO(t.state)):new qO(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new SO(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new qO(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const QO=Fn.define({map:(t,e)=>t.map(t=>t.map(e))}),$O=Fn.define(),PO=An.define({create:()=>vO.start(),update:(t,e)=>t.update(e),provide:t=>[Bh.from(t,t=>t.tooltip),Dc.contentAttributes.from(t,t=>t.attrs)]});function CO(t,e){const o=e.completion.apply||e.completion.label;let r=t.state.field(PO).active.find(t=>t.source==e.source);return r instanceof SO&&("string"==typeof o?t.dispatch({...rO(t.state,o,r.from,r.to),annotations:oO.of(e.completion)}):o(t,e.completion,r.from,r.to),!0)}const TO=fO(PO,CO);function AO(t,e="option"){return o=>{let r=o.state.field(PO,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<o.state.facet(cO).interactionDelay)return!1;let i,n=1;"page"==e&&(i=Kh(o,r.open.tooltip))&&(n=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+n*(t?1:-1):t?0:a-1;return s<0?s="page"==e?0:a-1:s>=a&&(s="page"==e?a-1:0),o.dispatch({effects:$O.of(s)}),!0}}const RO=t=>!!t.state.field(PO,!1)&&(t.dispatch({effects:aO.of(!0)}),!0);class zO{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const MO=Xl.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(PO).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(PO),o=t.state.facet(cO);if(!t.selectionSet&&!t.docChanged&&t.startState.field(PO)==e)return;let r=t.transactions.some(t=>{let e=kO(t,o);return 8&e||(t.selection||t.docChanged)&&!(3&e)});for(let e=0;e<this.running.length;e++){let o=this.running[e];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>50&&Date.now()-o.time>1e3){for(let t of o.context.abortListeners)try{t()}catch(t){zl(this.view.state,t)}o.context.abortListeners=null,this.running.splice(e--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(t=>t.effects.some(t=>t.is(aO)))&&(this.pendingStart=!0);let i=this.pendingStart?50:o.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(t=>t.isPending&&!this.running.some(e=>e.active.source==t.source))?setTimeout(()=>this.startUpdate(),i):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(PO);for(let t of e.active)t.isPending&&!this.running.some(e=>e.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(cO).updateSyncTime))}startQuery(t){let{state:e}=this.view,o=tO(e),r=new Fv(e,o,t.explicit,this.view),i=new zO(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(t=>{i.context.aborted||(i.done=t||null,this.scheduleAccept())},t=>{this.view.dispatch({effects:sO.of(null)}),zl(this.view.state,t)})}scheduleAccept(){this.running.every(t=>void 0!==t.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(cO).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],o=this.view.state.facet(cO),r=this.view.state.field(PO);for(let i=0;i<this.running.length;i++){let n=this.running[i];if(void 0===n.done)continue;if(this.running.splice(i--,1),n.done){let r=tO(n.updates.length?n.updates[0].startState:this.view.state),i=Math.min(r,n.done.from+(n.active.explicit?0:1)),a=new SO(n.active.source,n.active.explicit,i,n.done,n.done.from,null!==(t=n.done.to)&&void 0!==t?t:r);for(let t of n.updates)a=a.update(t,o);if(a.hasResult()){e.push(a);continue}}let a=r.active.find(t=>t.source==n.active.source);if(a&&a.isPending)if(null==n.done){let t=new qO(n.active.source,0);for(let e of n.updates)t=t.update(e,o);t.isPending||e.push(t)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:QO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(PO,!1);if(e&&e.tooltip&&this.view.state.facet(cO).closeOnBlur){let o=e.open&&Kh(this.view,e.open.tooltip);o&&o.dom.contains(t.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:sO.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:aO.of(!1)}),20),this.composing=0}}}),EO="object"==typeof navigator&&/Win/.test(navigator.platform),ZO=zn.highest(Dc.domEventHandlers({keydown(t,e){let o=e.state.field(PO,!1);if(!o||!o.open||o.open.disabled||o.open.selected<0||t.key.length>1||t.ctrlKey&&(!EO||!t.altKey)||t.metaKey)return!1;let r=o.open.options[o.open.selected],i=o.active.find(t=>t.source==r.source),n=r.completion.commitCharacters||i.result.commitCharacters;return n&&n.indexOf(t.key)>-1&&CO(e,r),!1}})),XO=Dc.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class _O{constructor(t,e,o,r){this.field=t,this.line=e,this.from=o,this.to=r}}class jO{constructor(t,e,o){this.field=t,this.from=e,this.to=o}map(t){let e=t.mapPos(this.from,-1,hn.TrackDel),o=t.mapPos(this.to,1,hn.TrackDel);return null==e||null==o?null:new jO(this.field,e,o)}}class DO{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let o=[],r=[e],i=t.doc.lineAt(e),n=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(o.length){let o=n,a=/^\t*/.exec(i)[0].length;for(let e=0;e<a;e++)o+=t.facet(um);r.push(e+o.length-a),i=o+i.slice(a)}o.push(i),e+=i.length+1}let a=this.fieldPositions.map(t=>new jO(t.field,r[t.line]+t.from,r[t.line]+t.to));return{text:o,ranges:a}}static parse(t){let e,o=[],r=[],i=[];for(let n of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(n);){let t=e[1]?+e[1]:null,a=e[2]||e[3]||"",s=-1,l=a.replace(/\\[{}]/g,t=>t[1]);for(let e=0;e<o.length;e++)(null!=t?o[e].seq==t:l&&o[e].name==l)&&(s=e);if(s<0){let e=0;for(;e<o.length&&(null==t||null!=o[e].seq&&o[e].seq<t);)e++;o.splice(e,0,{seq:t,name:l}),s=e;for(let t of i)t.field>=s&&t.field++}for(let t of i)if(t.line==r.length&&t.from>e.index){let o=e[2]?3+(e[1]||"").length:2;t.from-=o,t.to-=o}i.push(new _O(s,r.length,e.index,e.index+l.length)),n=n.slice(0,e.index)+a+n.slice(e.index+e[0].length)}n=n.replace(/\\([{}])/g,(t,e,o)=>{for(let t of i)t.line==r.length&&t.from>o&&(t.from--,t.to--);return e}),r.push(n)}return new DO(r,i)}}let YO=Ys.widget({widget:new class extends js{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),VO=Ys.mark({class:"cm-snippetField"});class LO{constructor(t,e){this.ranges=t,this.active=e,this.deco=Ys.set(t.map(t=>(t.from==t.to?YO:VO).range(t.from,t.to)),!0)}map(t){let e=[];for(let o of this.ranges){let r=o.map(t);if(!r)return null;e.push(r)}return new LO(e,this.active)}selectionInsideField(t){return t.ranges.every(t=>this.ranges.some(e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))}}const UO=Fn.define({map:(t,e)=>t&&t.map(e)}),BO=Fn.define(),WO=An.define({create:()=>null,update(t,e){for(let o of e.effects){if(o.is(UO))return o.value;if(o.is(BO)&&t)return new LO(t.ranges,o.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Dc.decorations.from(t,t=>t?t.deco:Ys.none)});function IO(t,e){return yn.create(t.filter(t=>t.field==e).map(t=>yn.range(t.from,t.to)))}function GO(t){let e=DO.parse(t);return(t,o,r,i)=>{let{text:n,ranges:a}=e.instantiate(t.state,r),{main:s}=t.state.selection,l={changes:{from:r,to:i==s.from?s.to:i,insert:Ni.of(n)},scrollIntoView:!0,annotations:o?[oO.of(o),Hn.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=IO(a,0)),a.some(t=>t.field>0)){let e=new LO(a,0),o=l.effects=[UO.of(e)];void 0===t.state.field(WO,!1)&&o.push(Fn.appendConfig.of([WO,KO,tx,XO]))}t.dispatch(t.state.update(l))}}function NO(t){return({state:e,dispatch:o})=>{let r=e.field(WO,!1);if(!r||t<0&&0==r.active)return!1;let i=r.active+t,n=t>0&&!r.ranges.some(e=>e.field==i+t);return o(e.update({selection:IO(r.ranges,i),effects:UO.of(n?null:new LO(r.ranges,i)),scrollIntoView:!0})),!0}}const FO=[{key:"Tab",run:NO(1),shift:NO(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(WO,!1)&&(e(t.update({effects:UO.of(null)})),!0)}],HO=qn.define({combine:t=>t.length?t[0]:FO}),KO=zn.highest(Gc.compute([HO],t=>t.facet(HO)));function JO(t,e){return{...e,apply:GO(t)}}const tx=Dc.domEventHandlers({mousedown(t,e){let o,r=e.state.field(WO,!1);if(!r||null==(o=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let i=r.ranges.find(t=>t.from<=o&&t.to>=o);return!(!i||i.field==r.active||(e.dispatch({selection:IO(r.ranges,i.field),effects:UO.of(r.ranges.some(t=>t.field>i.field)?new LO(r.ranges,i.field):null),scrollIntoView:!0}),0))}}),ex={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ox=Fn.define({map(t,e){let o=e.mapPos(t,-1,hn.TrackAfter);return null==o?void 0:o}}),rx=new class extends da{};rx.startSide=1,rx.endSide=-1;const ix=An.define({create:()=>ua.empty,update(t,e){if(t=t.map(e.changes),e.selection){let o=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=o.from&&t<=o.to})}for(let o of e.effects)o.is(ox)&&(t=t.update({add:[rx.range(o.value,o.value+1)]}));return t}}),nx="()[]{}<>«»»«[]{}";function ax(t){for(let e=0;e<16;e+=2)if(nx.charCodeAt(e)==t)return nx.charAt(e+1);return ln(t<128?t:t+1)}function sx(t,e){return t.languageDataAt("closeBrackets",e)[0]||ex}const lx="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),dx=Dc.inputHandler.of((t,e,o,r)=>{if((lx?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||2==r.length&&1==dn(sn(r,0))||e!=i.from||o!=i.to)return!1;let n=function(t,e){let o=sx(t,t.selection.main.head),r=o.brackets||ex.brackets;for(let i of r){let n=ax(sn(i,0));if(e==i)return n==i?fx(t,i,r.indexOf(i+i+i)>-1,o):ux(t,i,n,o.before||ex.before);if(e==n&&hx(t,t.selection.main.from))return mx(t,0,n)}return null}(t.state,r);return!!n&&(t.dispatch(n),!0)}),cx=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=sx(t,t.selection.main.head).brackets||ex.brackets,r=null,i=t.changeByRange(e=>{if(e.empty){let r=function(t,e){let o=t.sliceString(e-2,e);return dn(sn(o,0))==o.length?o:o.slice(1)}(t.doc,e.head);for(let i of o)if(i==r&&px(t.doc,e.head)==ax(sn(i,0)))return{changes:{from:e.head-i.length,to:e.head+i.length},range:yn.cursor(e.head-i.length)}}return{range:r=e}});return r||e(t.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function hx(t,e){let o=!1;return t.field(ix).between(0,t.doc.length,t=>{t==e&&(o=!0)}),o}function px(t,e){let o=t.sliceString(e,e+2);return o.slice(0,dn(sn(o,0)))}function ux(t,e,o,r){let i=null,n=t.changeByRange(n=>{if(!n.empty)return{changes:[{insert:e,from:n.from},{insert:o,from:n.to}],effects:ox.of(n.to+e.length),range:yn.range(n.anchor+e.length,n.head+e.length)};let a=px(t.doc,n.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+o,from:n.head},effects:ox.of(n.head+e.length),range:yn.cursor(n.head+e.length)}:{range:i=n}});return i?null:t.update(n,{scrollIntoView:!0,userEvent:"input.type"})}function mx(t,e,o){let r=null,i=t.changeByRange(e=>e.empty&&px(t.doc,e.head)==o?{changes:{from:e.head,to:e.head+o.length,insert:o},range:yn.cursor(e.head+o.length)}:r={range:e});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function fx(t,e,o,r){let i=r.stringPrefixes||ex.stringPrefixes,n=null,a=t.changeByRange(r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:ox.of(r.to+e.length),range:yn.range(r.anchor+e.length,r.head+e.length)};let a,s=r.head,l=px(t.doc,s);if(l==e){if(bx(t,s))return{changes:{insert:e+e,from:s},effects:ox.of(s+e.length),range:yn.cursor(s+e.length)};if(hx(t,s)){let r=o&&t.sliceDoc(s,s+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:s,to:s+r.length,insert:r},range:yn.cursor(s+r.length)}}}else{if(o&&t.sliceDoc(s-2*e.length,s)==e+e&&(a=gx(t,s-2*e.length,i))>-1&&bx(t,a))return{changes:{insert:e+e+e+e,from:s},effects:ox.of(s+e.length),range:yn.cursor(s+e.length)};if(t.charCategorizer(s)(l)!=ia.Word&&gx(t,s,i)>-1&&!function(t,e,o,r){let i=em(t).resolveInner(e,-1),n=r.reduce((t,e)=>Math.max(t,e.length),0);for(let a=0;a<5;a++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+o.length+n)),s=a.indexOf(o);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let e=i.firstChild;for(;e&&e.from==i.from&&e.to-e.from>o.length+s;){if(t.sliceDoc(e.to-o.length,e.to)==o)return!1;e=e.firstChild}return!0}let l=i.to==e&&i.parent;if(!l)break;i=l}return!1}(t,s,e,i))return{changes:{insert:e+e,from:s},effects:ox.of(s+e.length),range:yn.cursor(s+e.length)}}return{range:n=r}});return n?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function bx(t,e){let o=em(t).resolveInner(e+1);return o.parent&&o.from==e}function gx(t,e,o){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=ia.Word)return e;for(let i of o){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=ia.Word)return o}return-1}function vx(t={}){return[ZO,PO,cO.of(t),MO,xx,XO]}const Ox=[{key:"Ctrl-Space",run:RO},{mac:"Alt-`",run:RO},{mac:"Alt-i",run:RO},{key:"Escape",run:t=>{let e=t.state.field(PO,!1);return!(!e||!e.active.some(t=>0!=t.state)||(t.dispatch({effects:sO.of(null)}),0))}},{key:"ArrowDown",run:AO(!0)},{key:"ArrowUp",run:AO(!1)},{key:"PageDown",run:AO(!0,"page")},{key:"PageUp",run:AO(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(PO,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(cO).interactionDelay)&&CO(t,e.open.options[e.open.selected])}}],xx=zn.highest(Gc.computeN([cO],t=>t.facet(cO).defaultKeymap?[Ox]:[])),yx=[JO("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),JO("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),JO("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),JO("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),JO("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),JO("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),JO("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),JO("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),JO("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),JO('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),JO('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],wx=yx.concat([JO("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),JO("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),JO("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),kx=new nu,qx=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Sx(t){return(e,o)=>{let r=e.node.getChild("VariableDefinition");return r&&o(r,t),!0}}const Qx=["FunctionDeclaration"],$x={FunctionDeclaration:Sx("function"),ClassDeclaration:Sx("class"),ClassExpression:()=>!0,EnumDeclaration:Sx("constant"),TypeAliasDeclaration:Sx("type"),NamespaceDeclaration:Sx("namespace"),VariableDefinition(t,e){t.matchContext(Qx)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function Px(t,e){let o=kx.get(e);if(o)return o;let r=[],i=!0;function n(e,o){let i=t.sliceString(e.from,e.to);r.push({label:i,type:o})}return e.cursor(Dp.IncludeAnonymous).iterate(e=>{if(i)i=!1;else if(e.name){let t=$x[e.name];if(t&&t(e,n)||qx.has(e.name))return!1}else if(e.to-e.from>8192){for(let o of Px(t,e.node))r.push(o);return!1}}),kx.set(e,r),r}const Cx=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Tx=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Ax(t){let e=em(t.state).resolveInner(t.pos,-1);if(Tx.indexOf(e.name)>-1)return null;let o="VariableName"==e.name||e.to-e.from<20&&Cx.test(t.state.sliceDoc(e.from,e.to));if(!o&&!t.explicit)return null;let r=[];for(let o=e;o;o=o.parent)qx.has(o.name)&&(r=r.concat(Px(t.state.doc,o)));return{options:r,from:o?e.from:t.pos,validFor:Cx}}const Rx=tm.define({name:"javascript",parser:Nv.configure({props:[vm.add({IfStatement:Qm({except:/^\s*({|else\b)/}),TryStatement:Qm({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:t=>t.baseIndent,SwitchBody:t=>{let e=t.textAfter,o=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(o?0:r?1:2)*t.unit},Block:qm({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Qm({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),Pm.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Cm,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),zx={test:t=>/^JSX/.test(t.name),facet:Fu({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Mx=Rx.configure({dialect:"ts"},"typescript"),Ex=Rx.configure({dialect:"jsx",props:[Hu.add(t=>t.isTop?[zx]:void 0)]}),Zx=Rx.configure({dialect:"jsx ts",props:[Hu.add(t=>t.isTop?[zx]:void 0)]},"typescript");let Xx=t=>({label:t,type:"keyword"});const _x="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Xx),jx=_x.concat(["declare","implements","private","protected","public"].map(Xx));function Dx(t={}){let e=t.jsx?t.typescript?Zx:Ex:t.typescript?Mx:Rx,o=t.typescript?wx.concat(jx):yx.concat(_x);return new hm(e,[Rx.data.of({autocomplete:(r=Tx,i=Kv(o),t=>{for(let e=em(t.state).resolveInner(t.pos,-1);e;e=e.parent){if(r.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return i(t)})}),Rx.data.of({autocomplete:Ax}),t.jsx?Lx:[]]);var r,i}function Yx(t,e,o=t.length){for(let r=null==e?void 0:e.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return t.sliceString(r.from,Math.min(r.to,o));return""}const Vx="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Lx=Dc.inputHandler.of((t,e,o,r,i)=>{if((Vx?t.composing:t.compositionStarted)||t.state.readOnly||e!=o||">"!=r&&"/"!=r||!Rx.isActiveAt(t.state,e,-1))return!1;let n=i(),{state:a}=n,s=a.changeByRange(t=>{var e;let o,{head:i}=t,n=em(a).resolveInner(i-1,-1);if("JSXStartTag"==n.name&&(n=n.parent),a.doc.sliceString(i-1,i)!=r||"JSXAttributeValue"==n.name&&n.to>i);else{if(">"==r&&"JSXFragmentTag"==n.name)return{range:t,changes:{from:i,insert:"</>"}};if("/"==r&&"JSXStartCloseTag"==n.name){let t=n.parent,r=t.parent;if(r&&t.from==i-2&&((o=Yx(a.doc,r.firstChild,i))||"JSXFragmentTag"==(null===(e=r.firstChild)||void 0===e?void 0:e.name))){let t=`${o}>`;return{range:yn.cursor(i+t.length,-1),changes:{from:i,insert:t}}}}else if(">"==r){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(n);if(e&&"JSXOpenTag"==e.name&&!/^\/?>|^<\//.test(a.doc.sliceString(i,i+2))&&(o=Yx(a.doc,e,i)))return{range:t,changes:{from:i,insert:`</${o}>`}}}}return{range:t}});return!s.changes.empty&&(t.dispatch([n,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Ux=["_blank","_self","_top","_parent"],Bx=["ascii","utf-8","utf-16","latin1","latin1"],Wx=["get","post","put","delete"],Ix=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Gx=["true","false"],Nx={},Fx={a:{attrs:{href:null,ping:null,type:null,media:null,target:Ux,hreflang:null}},abbr:Nx,address:Nx,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Nx,aside:Nx,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Nx,base:{attrs:{href:null,target:Ux}},bdi:Nx,bdo:Nx,blockquote:{attrs:{cite:null}},body:Nx,br:Nx,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Ix,formmethod:Wx,formnovalidate:["novalidate"],formtarget:Ux,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Nx,center:Nx,cite:Nx,code:Nx,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Nx,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Nx,div:Nx,dl:Nx,dt:Nx,em:Nx,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Nx,figure:Nx,footer:Nx,form:{attrs:{action:null,name:null,"accept-charset":Bx,autocomplete:["on","off"],enctype:Ix,method:Wx,novalidate:["novalidate"],target:Ux}},h1:Nx,h2:Nx,h3:Nx,h4:Nx,h5:Nx,h6:Nx,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Nx,hgroup:Nx,hr:Nx,html:{attrs:{manifest:null}},i:Nx,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Ix,formmethod:Wx,formnovalidate:["novalidate"],formtarget:Ux,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Nx,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Nx,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Nx,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Bx,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Nx,noscript:Nx,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Nx,param:{attrs:{name:null,value:null}},pre:Nx,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Nx,rt:Nx,ruby:Nx,samp:Nx,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Bx}},section:Nx,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Nx,source:{attrs:{src:null,type:null,media:null}},span:Nx,strong:Nx,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Nx,summary:Nx,sup:Nx,table:Nx,tbody:Nx,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Nx,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Nx,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Nx,time:{attrs:{datetime:null}},title:Nx,tr:Nx,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Nx,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Nx},Hx={accesskey:null,class:null,contenteditable:Gx,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Gx,autocorrect:Gx,autocapitalize:Gx,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Gx,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Gx,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Gx,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Gx,"aria-hidden":Gx,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Gx,"aria-multiselectable":Gx,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Gx,"aria-relevant":null,"aria-required":Gx,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Kx="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of Kx)Hx[t]=null;class Jx{constructor(t,e){this.tags={...Fx,...t},this.globalAttrs={...Hx,...e},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function ty(t,e,o=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,o)):""}function ey(t,e=!1){for(;t;t=t.parent)if("Element"==t.name){if(!e)return t;e=!1}return null}function oy(t,e,o){let r=o.tags[ty(t,ey(e))];return(null==r?void 0:r.children)||o.allTags}function ry(t,e){let o=[];for(let r=ey(e);r&&!r.type.isTop;r=ey(r.parent)){let i=ty(t,r);if(i&&"CloseTag"==r.lastChild.name)break;i&&o.indexOf(i)<0&&("EndTag"==e.name||e.from>=r.firstChild.to)&&o.push(i)}return o}Jx.default=new Jx;const iy=/^[:\-\.\w\u00b7-\uffff]*$/;function ny(t,e,o,r,i){let n=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",a=ey(o,"StartTag"==o.name||"TagName"==o.name);return{from:r,to:i,options:oy(t.doc,a,e).map(t=>({label:t,type:"type"})).concat(ry(t.doc,o).map((t,e)=>({label:"/"+t,apply:"/"+t+n,type:"type",boost:99-e}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function ay(t,e,o,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:o,to:r,options:ry(t.doc,e).map((t,e)=>({label:t,apply:t+i,type:"type",boost:99-e})),validFor:iy}}function sy(t){let{extraTags:e,extraGlobalAttributes:o}=t,r=o||e?new Jx(e,o):Jx.default;return t=>function(t,e){let{state:o,pos:r}=e,i=em(o).resolveInner(r,-1),n=i.resolve(r);for(let t,e=r;n==i&&(t=i.childBefore(e));){let o=t.lastChild;if(!o||!o.type.isError||o.from<o.to)break;n=i=t,e=o.from}return"TagName"==i.name?i.parent&&/CloseTag$/.test(i.parent.name)?ay(o,i,i.from,r):ny(o,t,i,i.from,r):"StartTag"==i.name||"IncompleteTag"==i.name?ny(o,t,i,r,r):"StartCloseTag"==i.name||"IncompleteCloseTag"==i.name?ay(o,i,r,r):"OpenTag"==i.name||"SelfClosingTag"==i.name||"AttributeName"==i.name?function(t,e,o,r,i){let n=ey(o),a=n?e.tags[ty(t.doc,n)]:null,s=a&&a.attrs?Object.keys(a.attrs):[];return{from:r,to:i,options:(a&&!1===a.globalAttrs?s:s.length?s.concat(e.globalAttrNames):e.globalAttrNames).map(t=>({label:t,type:"property"})),validFor:iy}}(o,t,i,"AttributeName"==i.name?i.from:r,r):"Is"==i.name||"AttributeValue"==i.name||"UnquotedAttributeValue"==i.name?function(t,e,o,r,i){var n;let a,s=null===(n=o.parent)||void 0===n?void 0:n.getChild("AttributeName"),l=[];if(s){let n=t.sliceDoc(s.from,s.to),d=e.globalAttrs[n];if(!d){let r=ey(o),i=r?e.tags[ty(t.doc,r)]:null;d=(null==i?void 0:i.attrs)&&i.attrs[n]}if(d){let e=t.sliceDoc(r,i).toLowerCase(),o='"',n='"';/^['"]/.test(e)?(a='"'==e[0]?/^[^"]*$/:/^[^']*$/,o="",n=t.sliceDoc(i,i+1)==e[0]?"":e[0],e=e.slice(1),r++):a=/^[^\s<>='"]*$/;for(let t of d)l.push({label:t,apply:o+t+n,type:"constant"})}}return{from:r,to:i,options:l,validFor:a}}(o,t,i,"Is"==i.name?r:i.from,r):!e.explicit||"Element"!=n.name&&"Text"!=n.name&&"Document"!=n.name?null:function(t,e,o,r){let i=[],n=0;for(let r of oy(t.doc,o,e))i.push({label:"<"+r,type:"type"});for(let e of ry(t.doc,o))i.push({label:"</"+e+">",type:"type",boost:99-n++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(o,t,i,r)}(r,t)}const ly=Rx.parser.configure({top:"SingleExpression"}),dy=[{tag:"script",attrs:t=>"text/typescript"==t.type||"ts"==t.lang,parser:Mx.parser},{tag:"script",attrs:t=>"text/babel"==t.type||"text/jsx"==t.type,parser:Ex.parser},{tag:"script",attrs:t=>"text/typescript-jsx"==t.type,parser:Zx.parser},{tag:"script",attrs:t=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type),parser:ly},{tag:"script",attrs:t=>!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:Rx.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:Ev.parser}],cy=[{name:"style",parser:Ev.parser.configure({top:"Styles"})}].concat(Kx.map(t=>({name:t,parser:Rx.parser}))),hy=tm.define({name:"html",parser:tv.configure({props:[vm.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e,o=null;for(let e=t.node;;){let t=e.lastChild;if(!t||"Element"!=t.name||t.to!=e.to)break;o=e=t}return o&&(!(e=o.lastChild)||"CloseTag"!=e.name&&"SelfClosingTag"!=e.name)?t.lineIndent(o.from)+t.unit:null}}),Pm.add({Element(t){let e=t.firstChild,o=t.lastChild;return e&&"OpenTag"==e.name?{from:e.to,to:"CloseTag"==o.name?o.from:t.to}:null}}),gf.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),py=hy.configure({wrap:iv(dy,cy)});function uy(t={}){let e,o="";!1===t.matchClosingTags&&(o="noMatch"),!0===t.selfClosingTags&&(o=(o?o+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(e=iv((t.nestedLanguages||[]).concat(dy),(t.nestedAttributes||[]).concat(cy)));let r=e?hy.configure({wrap:e,dialect:o}):o?py.configure({dialect:o}):py;return new hm(r,[py.data.of({autocomplete:sy(t)}),!1!==t.autoCloseTags?fy:[],Dx().support,Zv().support])}const my=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),fy=Dc.inputHandler.of((t,e,o,r,i)=>{if(t.composing||t.state.readOnly||e!=o||">"!=r&&"/"!=r||!py.isActiveAt(t.state,e,-1))return!1;let n=i(),{state:a}=n,s=a.changeByRange(t=>{var e,o,i;let n,s=a.doc.sliceString(t.from-1,t.to)==r,{head:l}=t,d=em(a).resolveInner(l,-1);if(s&&">"==r&&"EndTag"==d.name){let r=d.parent;if("CloseTag"!=(null===(o=null===(e=r.parent)||void 0===e?void 0:e.lastChild)||void 0===o?void 0:o.name)&&(n=ty(a.doc,r.parent,l))&&!my.has(n))return{range:t,changes:{from:l,to:l+(">"===a.doc.sliceString(l,l+1)?1:0),insert:`</${n}>`}}}else if(s&&"/"==r&&"IncompleteCloseTag"==d.name){let t=d.parent;if(d.from==l-2&&"CloseTag"!=(null===(i=t.lastChild)||void 0===i?void 0:i.name)&&(n=ty(a.doc,t,l))&&!my.has(n)){let t=l+(">"===a.doc.sliceString(l,l+1)?1:0),e=`${n}>`;return{range:yn.cursor(l+e.length,-1),changes:{from:l,to:t,insert:e}}}}return{range:t}});return!s.changes.empty&&(t.dispatch([n,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function by(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,o=arguments[1];if(o&&"object"==typeof o&&null==o.nodeType&&!Array.isArray(o)){for(var r in o)if(Object.prototype.hasOwnProperty.call(o,r)){var i=o[r];"string"==typeof i?t.setAttribute(r,i):null!=i&&(t[r]=i)}e++}for(;e<arguments.length;e++)gy(t,arguments[e]);return t}function gy(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var o=0;o<e.length;o++)gy(t,e[o])}}const vy="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class Oy{constructor(t,e,o=0,r=t.length,i,n){this.test=n,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(o,r),this.bufferStart=o,this.normalize=i?t=>i(vy(t)):vy,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return sn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=ln(t),o=this.bufferStart+this.bufferPos;this.bufferPos+=dn(t);let r=this.normalize(e);if(r.length)for(let t=0,i=o;;t++){let n=r.charCodeAt(t),a=this.match(n,i,this.bufferPos+this.bufferStart);if(t==r.length-1){if(a)return this.value=a,this;break}i==o&&t<e.length&&e.charCodeAt(t)==n&&i++}}}match(t,e,o){let r=null;for(let e=0;e<this.matches.length;e+=2){let i=this.matches[e],n=!1;this.query.charCodeAt(i)==t&&(i==this.query.length-1?r={from:this.matches[e+1],to:o}:(this.matches[e]++,n=!0)),n||(this.matches.splice(e,2),e-=2)}return this.query.charCodeAt(0)==t&&(1==this.query.length?r={from:e,to:o}:this.matches.push(1,e)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(Oy.prototype[Symbol.iterator]=function(){return this});const xy={from:-1,to:-1,match:/.*/.exec("")},yy="gm"+(null==/x/.unicode?"":"u");class wy{constructor(t,e,o,r=0,i=t.length){if(this.text=t,this.to=i,this.curLine="",this.done=!1,this.value=xy,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new Sy(t,e,o,r,i);this.re=new RegExp(e,yy+((null==o?void 0:o.ignoreCase)?"i":"")),this.test=null==o?void 0:o.test,this.iter=t.iter();let n=t.lineAt(r);this.curLineStart=n.from,this.matchPos=Qy(t,r),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let o=this.curLineStart+e.index,r=o+e[0].length;if(this.matchPos=Qy(this.text,r+(o==r?1:0)),o==this.curLineStart+this.curLine.length&&this.nextLine(),(o<r||o>this.value.to)&&(!this.test||this.test(o,r,e)))return this.value={from:o,to:r,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}const ky=new WeakMap;class qy{constructor(t,e){this.from=t,this.text=e}get to(){return this.from+this.text.length}static get(t,e,o){let r=ky.get(t);if(!r||r.from>=o||r.to<=e){let r=new qy(e,t.sliceString(e,o));return ky.set(t,r),r}if(r.from==e&&r.to==o)return r;let{text:i,from:n}=r;return n>e&&(i=t.sliceString(e,n)+i,n=e),r.to<o&&(i+=t.sliceString(r.to,o)),ky.set(t,new qy(n,i)),new qy(e,i.slice(e-n,o-n))}}class Sy{constructor(t,e,o,r,i){this.text=t,this.to=i,this.done=!1,this.value=xy,this.matchPos=Qy(t,r),this.re=new RegExp(e,yy+((null==o?void 0:o.ignoreCase)?"i":"")),this.test=null==o?void 0:o.test,this.flat=qy.get(t,r,this.chunkEnd(r+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,o=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,o,e)))return this.value={from:t,to:o,match:e},this.matchPos=Qy(this.text,o+(t==o?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=qy.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function Qy(t,e){if(e>=t.length)return e;let o,r=t.lineAt(e);for(;e<r.to&&(o=r.text.charCodeAt(e-r.from))>=56320&&o<57344;)e++;return e}function $y(t){let e=by("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function o(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!o)return;let{state:r}=t,i=r.doc.lineAt(r.selection.main.head),[,n,a,s,l]=o,d=s?+s.slice(1):0,c=a?+a:i.number;if(a&&l){let t=c/100;n&&(t=t*("-"==n?-1:1)+i.number/r.doc.lines),c=Math.round(r.doc.lines*t)}else a&&n&&(c=c*("-"==n?-1:1)+i.number);let h=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),p=yn.cursor(h.from+Math.max(0,Math.min(d,h.length)));t.dispatch({effects:[Py.of(!1),Dc.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:by("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:Py.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),o())},onsubmit:t=>{t.preventDefault(),o()}},by("label",t.state.phrase("Go to line"),": ",e)," ",by("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),by("button",{name:"close",onclick:()=>{t.dispatch({effects:Py.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]))}}"undefined"!=typeof Symbol&&(wy.prototype[Symbol.iterator]=Sy.prototype[Symbol.iterator]=function(){return this});const Py=Fn.define(),Cy=An.define({create:()=>!0,update(t,e){for(let o of e.effects)o.is(Py)&&(t=o.value);return t},provide:t=>np.from(t,t=>t?$y:null)}),Ty=Dc.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),Ay={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ry=qn.define({combine:t=>la(t,Ay,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function zy(t){let e=[_y,Xy];return t&&e.push(Ry.of(t)),e}const My=Ys.mark({class:"cm-selectionMatch"}),Ey=Ys.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Zy(t,e,o,r){return!(0!=o&&t(e.sliceDoc(o-1,o))==ia.Word||r!=e.doc.length&&t(e.sliceDoc(r,r+1))==ia.Word)}const Xy=Xl.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Ry),{state:o}=t,r=o.selection;if(r.ranges.length>1)return Ys.none;let i,n=r.main,a=null;if(n.empty){if(!e.highlightWordAroundCursor)return Ys.none;let t=o.wordAt(n.head);if(!t)return Ys.none;a=o.charCategorizer(n.head),i=o.sliceDoc(t.from,t.to)}else{let t=n.to-n.from;if(t<e.minSelectionLength||t>200)return Ys.none;if(e.wholeWords){if(i=o.sliceDoc(n.from,n.to),a=o.charCategorizer(n.head),!Zy(a,o,n.from,n.to)||!function(t,e,o,r){return t(e.sliceDoc(o,o+1))==ia.Word&&t(e.sliceDoc(r-1,r))==ia.Word}(a,o,n.from,n.to))return Ys.none}else if(i=o.sliceDoc(n.from,n.to),!i)return Ys.none}let s=[];for(let r of t.visibleRanges){let t=new Oy(o.doc,i,r.from,r.to);for(;!t.next().done;){let{from:r,to:i}=t.value;if((!a||Zy(a,o,r,i))&&(n.empty&&r<=n.from&&i>=n.to?s.push(Ey.range(r,i)):(r>=n.to||i<=n.from)&&s.push(My.range(r,i)),s.length>e.maxMatches))return Ys.none}}return Ys.set(s)}},{decorations:t=>t.decorations}),_y=Dc.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),jy=qn.define({combine:t=>la(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new mw(t),scrollToMatch:t=>Dc.scrollIntoView(t)})});class Dy{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,yy),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new Iy(this):new Ly(this)}getCursor(t,e=0,o){let r=t.doc?t:sa.create({doc:t});return null==o&&(o=r.doc.length),this.regexp?Uy(this,r,e,o):Vy(this,r,e,o)}}class Yy{constructor(t){this.spec=t}}function Vy(t,e,o,r){return new Oy(e.doc,t.unquoted,o,r,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?function(t,e){return(o,r,i,n)=>((n>o||n+i.length<r)&&(n=Math.max(0,o-2),i=t.sliceString(n,Math.min(t.length,r+2))),!(e(By(i,o-n))==ia.Word&&e(Wy(i,o-n))==ia.Word||e(Wy(i,r-n))==ia.Word&&e(By(i,r-n))==ia.Word))}(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}class Ly extends Yy{constructor(t){super(t)}nextMatch(t,e,o){let r=Vy(this.spec,t,o,t.doc.length).nextOverlapping();if(r.done){let o=Math.min(t.doc.length,e+this.spec.unquoted.length);r=Vy(this.spec,t,0,o).nextOverlapping()}return r.done||r.value.from==e&&r.value.to==o?null:r.value}prevMatchInRange(t,e,o){for(let r=o;;){let o=Math.max(e,r-1e4-this.spec.unquoted.length),i=Vy(this.spec,t,o,r),n=null;for(;!i.nextOverlapping().done;)n=i.value;if(n)return n;if(o==e)return null;r-=1e4}}prevMatch(t,e,o){let r=this.prevMatchInRange(t,0,e);return r||(r=this.prevMatchInRange(t,Math.max(0,o-this.spec.unquoted.length),t.doc.length)),!r||r.from==e&&r.to==o?null:r}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,e){let o=Vy(this.spec,t,0,t.doc.length),r=[];for(;!o.next().done;){if(r.length>=e)return null;r.push(o.value)}return r}highlight(t,e,o,r){let i=Vy(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,t.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function Uy(t,e,o,r){return new wy(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(i=e.charCategorizer(e.selection.main.head),(t,e,o)=>!o[0].length||(i(By(o.input,o.index))!=ia.Word||i(Wy(o.input,o.index))!=ia.Word)&&(i(Wy(o.input,o.index+o[0].length))!=ia.Word||i(By(o.input,o.index+o[0].length))!=ia.Word)):void 0},o,r);var i}function By(t,e){return t.slice(an(t,e,!1),e)}function Wy(t,e){return t.slice(e,an(t,e))}class Iy extends Yy{nextMatch(t,e,o){let r=Uy(this.spec,t,o,t.doc.length).next();return r.done&&(r=Uy(this.spec,t,0,e).next()),r.done?null:r.value}prevMatchInRange(t,e,o){for(let r=1;;r++){let i=Math.max(e,o-1e4*r),n=Uy(this.spec,t,i,o),a=null;for(;!n.next().done;)a=n.value;if(a&&(i==e||a.from>i+10))return a;if(i==e)return null}}prevMatch(t,e,o){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,o,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(e,o)=>{if("&"==o)return t.match[0];if("$"==o)return"$";for(let e=o.length;e>0;e--){let r=+o.slice(0,e);if(r>0&&r<t.match.length)return t.match[r]+o.slice(e)}return e})}matchAll(t,e){let o=Uy(this.spec,t,0,t.doc.length),r=[];for(;!o.next().done;){if(r.length>=e)return null;r.push(o.value)}return r}highlight(t,e,o,r){let i=Uy(this.spec,t,Math.max(0,e-250),Math.min(o+250,t.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const Gy=Fn.define(),Ny=Fn.define(),Fy=An.define({create:t=>new Hy(lw(t).create(),null),update(t,e){for(let o of e.effects)o.is(Gy)?t=new Hy(o.value.create(),t.panel):o.is(Ny)&&(t=new Hy(t.query,o.value?sw:null));return t},provide:t=>np.from(t,t=>t.panel)});class Hy{constructor(t,e){this.query=t,this.panel=e}}const Ky=Ys.mark({class:"cm-searchMatch"}),Jy=Ys.mark({class:"cm-searchMatch cm-searchMatch-selected"}),tw=Xl.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Fy))}update(t){let e=t.state.field(Fy);(e!=t.startState.field(Fy)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ys.none;let{view:o}=this,r=new ma;for(let e=0,i=o.visibleRanges,n=i.length;e<n;e++){let{from:a,to:s}=i[e];for(;e<n-1&&s>i[e+1].from-500;)s=i[++e].to;t.highlight(o.state,a,s,(t,e)=>{let i=o.state.selection.ranges.some(o=>o.from==t&&o.to==e);r.add(t,e,i?Jy:Ky)})}return r.finish()}},{decorations:t=>t.decorations});function ew(t){return e=>{let o=e.state.field(Fy,!1);return o&&o.query.spec.valid?t(e,o):hw(e)}}const ow=ew((t,{query:e})=>{let{to:o}=t.state.selection.main,r=e.nextMatch(t.state,o,o);if(!r)return!1;let i=yn.single(r.from,r.to),n=t.state.facet(jy);return t.dispatch({selection:i,effects:[vw(t,r),n.scrollToMatch(i.main,t)],userEvent:"select.search"}),cw(t),!0}),rw=ew((t,{query:e})=>{let{state:o}=t,{from:r}=o.selection.main,i=e.prevMatch(o,r,r);if(!i)return!1;let n=yn.single(i.from,i.to),a=t.state.facet(jy);return t.dispatch({selection:n,effects:[vw(t,i),a.scrollToMatch(n.main,t)],userEvent:"select.search"}),cw(t),!0}),iw=ew((t,{query:e})=>{let o=e.matchAll(t.state,1e3);return!(!o||!o.length||(t.dispatch({selection:yn.create(o.map(t=>yn.range(t.from,t.to))),userEvent:"select.search.matches"}),0))}),nw=ew((t,{query:e})=>{let{state:o}=t,{from:r,to:i}=o.selection.main;if(o.readOnly)return!1;let n=e.nextMatch(o,r,r);if(!n)return!1;let a,s,l=n,d=[],c=[];l.from==r&&l.to==i&&(s=o.toText(e.getReplacement(l)),d.push({from:l.from,to:l.to,insert:s}),l=e.nextMatch(o,l.from,l.to),c.push(Dc.announce.of(o.phrase("replaced match on line $",o.doc.lineAt(r).number)+".")));let h=t.state.changes(d);return l&&(a=yn.single(l.from,l.to).map(h),c.push(vw(t,l)),c.push(o.facet(jy).scrollToMatch(a.main,t))),t.dispatch({changes:h,selection:a,effects:c,userEvent:"input.replace"}),!0}),aw=ew((t,{query:e})=>{if(t.state.readOnly)return!1;let o=e.matchAll(t.state,1e9).map(t=>{let{from:o,to:r}=t;return{from:o,to:r,insert:e.getReplacement(t)}});if(!o.length)return!1;let r=t.state.phrase("replaced $ matches",o.length)+".";return t.dispatch({changes:o,effects:Dc.announce.of(r),userEvent:"input.replace.all"}),!0});function sw(t){return t.state.facet(jy).createPanel(t)}function lw(t,e){var o,r,i,n,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let d=t.facet(jy);return new Dy({search:(null!==(o=null==e?void 0:e.literal)&&void 0!==o?o:d.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==e?void 0:e.caseSensitive)&&void 0!==r?r:d.caseSensitive,literal:null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:d.literal,regexp:null!==(n=null==e?void 0:e.regexp)&&void 0!==n?n:d.regexp,wholeWord:null!==(a=null==e?void 0:e.wholeWord)&&void 0!==a?a:d.wholeWord})}function dw(t){let e=ep(t,sw);return e&&e.dom.querySelector("[main-field]")}function cw(t){let e=dw(t);e&&e==t.root.activeElement&&e.select()}const hw=t=>{let e=t.state.field(Fy,!1);if(e&&e.panel){let o=dw(t);if(o&&o!=t.root.activeElement){let r=lw(t.state,e.query.spec);r.valid&&t.dispatch({effects:Gy.of(r)}),o.focus(),o.select()}}else t.dispatch({effects:[Ny.of(!0),e?Gy.of(lw(t.state,e.query.spec)):Fn.appendConfig.of(xw)]});return!0},pw=t=>{let e=t.state.field(Fy,!1);if(!e||!e.panel)return!1;let o=ep(t,sw);return o&&o.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Ny.of(!1)}),!0},uw=[{key:"Mod-f",run:hw,scope:"editor search-panel"},{key:"F3",run:ow,shift:rw,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ow,shift:rw,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:pw,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let o=t.selection;if(o.ranges.length>1||o.main.empty)return!1;let{from:r,to:i}=o.main,n=[],a=0;for(let e=new Oy(t.doc,t.sliceDoc(r,i));!e.next().done;){if(n.length>1e3)return!1;e.value.from==r&&(a=n.length),n.push(yn.range(e.value.from,e.value.to))}return e(t.update({selection:yn.create(n,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=ep(t,$y);if(!e){let o=[Py.of(!0)];null==t.state.field(Cy,!1)&&o.push(Fn.appendConfig.of([Cy,Ty])),t.dispatch({effects:o}),e=ep(t,$y)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:o}=t.selection;if(o.some(t=>t.from===t.to))return(({state:t,dispatch:e})=>{let{selection:o}=t,r=yn.create(o.ranges.map(e=>t.wordAt(e.head)||yn.cursor(e.head)),o.mainIndex);return!r.eq(o)&&(e(t.update({selection:r})),!0)})({state:t,dispatch:e});let r=t.sliceDoc(o[0].from,o[0].to);if(t.selection.ranges.some(e=>t.sliceDoc(e.from,e.to)!=r))return!1;let i=function(t,e){let{main:o,ranges:r}=t.selection,i=t.wordAt(o.head),n=i&&i.from==o.from&&i.to==o.to;for(let o=!1,i=new Oy(t.doc,e,r[r.length-1].to);;){if(i.next(),!i.done){if(o&&r.some(t=>t.from==i.value.from))continue;if(n){let e=t.wordAt(i.value.from);if(!e||e.from!=i.value.from||e.to!=i.value.to)continue}return i.value}if(o)return null;i=new Oy(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}}(t,r);return!!i&&(e(t.update({selection:t.selection.addRange(yn.range(i.from,i.to),!1),effects:Dc.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class mw{constructor(t){this.view=t;let e=this.query=t.state.field(Fy).query.spec;function o(t,e,o){return by("button",{class:"cm-button",name:t,onclick:e,type:"button"},o)}this.commit=this.commit.bind(this),this.searchField=by("input",{value:e.search,placeholder:fw(t,"Find"),"aria-label":fw(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=by("input",{value:e.replace,placeholder:fw(t,"Replace"),"aria-label":fw(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=by("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=by("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=by("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=by("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,o("next",()=>ow(t),[fw(t,"next")]),o("prev",()=>rw(t),[fw(t,"previous")]),o("select",()=>iw(t),[fw(t,"all")]),by("label",null,[this.caseField,fw(t,"match case")]),by("label",null,[this.reField,fw(t,"regexp")]),by("label",null,[this.wordField,fw(t,"by word")]),...t.state.readOnly?[]:[by("br"),this.replaceField,o("replace",()=>nw(t),[fw(t,"replace")]),o("replaceAll",()=>aw(t),[fw(t,"replace all")])],by("button",{name:"close",onclick:()=>pw(t),"aria-label":fw(t,"close"),type:"button"},["×"])])}commit(){let t=new Dy({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:Gy.of(t)}))}keydown(t){var e,o;o=t,th(Fc((e=this.view).state),o,e,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?rw:ow)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),nw(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(Gy)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(jy).top}}function fw(t,e){return t.state.phrase(e)}const bw=30,gw=/[\s\.,:;?!]/;function vw(t,{from:e,to:o}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(o).to,n=Math.max(r.from,e-bw),a=Math.min(i,o+bw),s=t.state.sliceDoc(n,a);if(n!=r.from)for(let t=0;t<bw;t++)if(!gw.test(s[t+1])&&gw.test(s[t])){s=s.slice(t);break}if(a!=i)for(let t=s.length-1;t>s.length-bw;t--)if(!gw.test(s[t-1])&&gw.test(s[t])){s=s.slice(0,t);break}return Dc.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const Ow=Dc.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),xw=[Fy,zn.low(tw),Ow];class yw{constructor(t,e,o){this.from=t,this.to=e,this.diagnostic=o}}class ww{constructor(t,e,o){this.diagnostics=t,this.panel=e,this.selected=o}static init(t,e,o){let r=o.facet(zw).markerFilter;r&&(t=r(t,o));let i=t.slice().sort((t,e)=>t.from-e.from||t.to-e.to),n=new ma,a=[],s=0;for(let t=0;;){let e,r,l=t==i.length?null:i[t];if(!l&&!a.length)break;for(a.length?(e=s,r=a.reduce((t,e)=>Math.min(t,e.to),l&&l.from>e?l.from:1e8)):(e=l.from,r=l.to,a.push(l),t++);t<i.length;){let o=i[t];if(o.from!=e||!(o.to>o.from||o.to==e)){r=Math.min(o.from,r);break}a.push(o),t++,r=Math.min(o.to,r)}let d=Lw(a);if(a.some(t=>t.from==t.to||t.from==t.to-1&&o.doc.lineAt(t.from).to==t.from))n.add(e,e,Ys.widget({widget:new Xw(d),diagnostics:a.slice()}));else{let t=a.reduce((t,e)=>e.markClass?t+" "+e.markClass:t,"");n.add(e,r,Ys.mark({class:"cm-lintRange cm-lintRange-"+d+t,diagnostics:a.slice(),inclusiveEnd:a.some(t=>t.to>r)}))}s=r;for(let t=0;t<a.length;t++)a[t].to<=s&&a.splice(t--,1)}let l=n.finish();return new ww(l,e,kw(l))}}function kw(t,e=null,o=0){let r=null;return t.between(o,1e9,(t,o,{spec:i})=>{if(!(e&&i.diagnostics.indexOf(e)<0))if(r){if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new yw(r.from,o,r.diagnostic)}else r=new yw(t,o,e||i.diagnostics[0])}),r}const qw=Fn.define(),Sw=Fn.define(),Qw=Fn.define(),$w=An.define({create:()=>new ww(Ys.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let o=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=kw(o,t.selected.diagnostic,i)||kw(o,null,i)}!o.size&&i&&e.state.facet(zw).autoPanel&&(i=null),t=new ww(o,i,r)}for(let o of e.effects)if(o.is(qw)){let r=e.state.facet(zw).autoPanel?o.value.length?jw.open:null:t.panel;t=ww.init(o.value,r,e.state)}else o.is(Sw)?t=new ww(t.diagnostics,o.value?jw.open:null,t.selected):o.is(Qw)&&(t=new ww(t.diagnostics,t.panel,o.value));return t},provide:t=>[np.from(t,t=>t.panel),Dc.decorations.from(t,t=>t.diagnostics)]}),Pw=Ys.mark({class:"cm-lintRange cm-lintRange-active"});function Cw(t,e,o){let r,{diagnostics:i}=t.state.field($w),n=-1,a=-1;i.between(e-(o<0?1:0),e+(o>0?1:0),(t,i,{spec:s})=>{if(e>=t&&e<=i&&(t==i||(e>t||o>0)&&(e<i||o<0)))return r=s.diagnostics,n=t,a=i,!1});let s=t.state.facet(zw).tooltipFilter;return r&&s&&(r=s(r,t.state)),r?{pos:n,end:a,above:t.state.doc.lineAt(n).to<a,create:()=>({dom:Tw(t,r)})}:null}function Tw(t,e){return by("ul",{class:"cm-tooltip-lint"},e.map(e=>Zw(t,e,!1)))}const Aw=t=>{let e=t.state.field($w,!1);return!(!e||!e.panel||(t.dispatch({effects:Sw.of(!1)}),0))},Rw=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field($w,!1);var o,r;e&&e.panel||t.dispatch({effects:(o=t.state,r=[Sw.of(!0)],o.field($w,!1)?r:r.concat(Fn.appendConfig.of(Uw)))});let i=ep(t,jw.open);return i&&i.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field($w,!1);if(!e)return!1;let o=t.state.selection.main,r=e.diagnostics.iter(o.to+1);return!(!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==o.from&&r.to==o.to)||(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),0))}}],zw=qn.define({combine:t=>({sources:t.map(t=>t.source).filter(t=>null!=t),...la(t.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Mw,tooltipFilter:Mw,needsRefresh:(t,e)=>t?e?o=>t(o)||e(o):t:e,hideOn:(t,e)=>t?e?(o,r,i)=>t(o,r,i)||e(o,r,i):t:e,autoPanel:(t,e)=>t||e})})});function Mw(t,e){return t?e?(o,r)=>e(t(o,r),r):t:e}function Ew(t){let e=[];if(t)t:for(let{name:o}of t){for(let t=0;t<o.length;t++){let r=o[t];if(/[a-zA-Z]/.test(r)&&!e.some(t=>t.toLowerCase()==r.toLowerCase())){e.push(r);continue t}}e.push("")}return e}function Zw(t,e,o){var r;let i=o?Ew(e.actions):[];return by("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},by("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(r=e.actions)||void 0===r?void 0:r.map((o,r)=>{let n=!1,a=r=>{if(r.preventDefault(),n)return;n=!0;let i=kw(t.state.field($w).diagnostics,e);i&&o.apply(t,i.from,i.to)},{name:s}=o,l=i[r]?s.indexOf(i[r]):-1,d=l<0?s:[s.slice(0,l),by("u",s.slice(l,l+1)),s.slice(l+1)];return by("button",{type:"button",class:"cm-diagnosticAction"+(o.markClass?" "+o.markClass:""),onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${i[r]})"`}.`},d)}),e.source&&by("div",{class:"cm-diagnosticSource"},e.source))}class Xw extends js{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return by("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class _w{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Zw(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class jw{constructor(t){this.view=t,this.items=[],this.list=by("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)Aw(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:o}=this.items[this.selectedIndex],r=Ew(o.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==e.keyCode){let e=kw(this.view.state.field($w).diagnostics,o);e&&o.actions[i].apply(t,e.from,e.to)}}}e.preventDefault()},onclick:t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)}}),this.dom=by("div",{class:"cm-panel-lint"},this.list,by("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Aw(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field($w).selected;if(!t)return-1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return-1}update(){let{diagnostics:t,selected:e}=this.view.state.field($w),o=0,r=!1,i=null,n=new Set;for(t.between(0,this.view.state.doc.length,(t,a,{spec:s})=>{for(let t of s.diagnostics){if(n.has(t))continue;n.add(t);let a,s=-1;for(let e=o;e<this.items.length;e++)if(this.items[e].diagnostic==t){s=e;break}s<0?(a=new _w(this.view,t),this.items.splice(o,0,a),r=!0):(a=this.items[s],s>o&&(this.items.splice(o,s-o),r=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),o++}});o<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new _w(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let o=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/o:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/o)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let o of this.items)if(o.dom.parentNode==this.list){for(;t!=o.dom;)e();t=o.dom.nextSibling}else this.list.insertBefore(o.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=kw(this.view.state.field($w).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Qw.of(e)})}static open(t){return new jw(t)}}function Dw(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Yw=Dc.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Dw("#d11")},".cm-lintRange-warning":{backgroundImage:Dw("orange")},".cm-lintRange-info":{backgroundImage:Dw("#999")},".cm-lintRange-hint":{backgroundImage:Dw("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function Vw(t){return"error"==t?4:"warning"==t?3:"info"==t?2:1}function Lw(t){let e="hint",o=1;for(let r of t){let t=Vw(r.severity);t>o&&(o=t,e=r.severity)}return e}const Uw=[$w,Dc.decorations.compute([$w],t=>{let{selected:e,panel:o}=t.field($w);return e&&o&&e.from!=e.to?Ys.set([Pw.range(e.from,e.to)]):Ys.none}),Hh(Cw,{hideOn:function(t,e){let o=e.pos,r=e.end||o,i=t.state.facet(zw).hideOn(t,o,r);if(null!=i)return i;let n=t.startState.doc.lineAt(e.pos);return!(!t.effects.some(t=>t.is(qw))&&!t.changes.touchesRange(n.from,Math.max(n.to,r)))}}),Yw],Bw=(()=>[Qp(),Cp,qh(),Vf(),Hm(),lh(),[fh,bh],sa.allowMultipleSelections.of(!0),sa.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let o=t.newDoc,{head:r}=t.newSelection.main,i=o.lineAt(r);if(r>i.from+200)return t;let n=o.sliceString(i.from,r);if(!e.some(t=>t.test(n)))return t;let{state:a}=t,s=-1,l=[];for(let{head:t}of a.selection.ranges){let e=a.doc.lineAt(t);if(e.from==s)continue;s=e.from;let o=bm(a,e.from);if(null==o)continue;let r=/^\s*/.exec(e.text)[0],i=fm(a,o);r!=i&&l.push({from:e.from,to:e.from+r.length,insert:i})}return l.length?[t,{changes:l,sequential:!0}]:t}),rf(sf,{fallback:!0}),bf(),[dx,ix],vx(),Rh(),Eh(),Ch,zy(),Gc.of([...cx,...ig,...uw,...nb,...Vm,...Ox,...Rw])])();var Ww=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Iw=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const Gw={},Nw=new Map;function Fw(t){return(e,o)=>{const r=e.prefix??e.constructor?.name;if(!r)return console.error("Template prefix and constructor name not defined.",e,o);const i=Nw.get(r)||new Map;i.set(t??o,e[o]),Nw.set(r,i)}}const Hw=t=>{class e extends t{static{this.styles=[Mi,J`
|
|
343
343
|
:host {
|
|
344
344
|
display: block;
|
|
345
345
|
position: relative;
|
|
@@ -354,7 +354,7 @@ input.working {
|
|
|
354
354
|
background-color: #f3f3f3;
|
|
355
355
|
cursor: wait;
|
|
356
356
|
}
|
|
357
|
-
`]}constructor(...t){super(...t),this.dragging=!1,this.resizing=!1,this.offsetX=0,this.offsetY=0,this.startWidth=0,this.startHeight=0,this.regex=/`(.*?)`/s,this.editorError=null,this.type=null,this.editing=!1,this.defaultTemplate=t=>Xt`<span>Template matching type '${t.type}' not defined</span>`,this.apiEndpoint=null,this.templateEndpoint=null,this.prefix=null,this.map=void 0,this.editor=null,this.editorType=this.type,this.editorCoding=!1}async connectedCallback(){super.connectedCallback(),this.prefix??=this.constructor.name,this.templateEndpoint=this.apiEndpoint??`${this.configuration?.get("headers:qbo4-basehref")??""}/configuration/template`,
|
|
357
|
+
`]}constructor(...t){super(...t),this.dragging=!1,this.resizing=!1,this.offsetX=0,this.offsetY=0,this.startWidth=0,this.startHeight=0,this.regex=/`(.*?)`/s,this.editorError=null,this.type=null,this.editing=!1,this.defaultTemplate=t=>Xt`<span>Template matching type '${t.type}' not defined</span>`,this.apiEndpoint=null,this.templateEndpoint=null,this.prefix=null,this.map=void 0,this.editor=null,this.editorType=this.type,this.editorCoding=!1}async connectedCallback(){super.connectedCallback(),this.prefix??=this.constructor.name,this.templateEndpoint=this.apiEndpoint??`${this.configuration?.get("headers:qbo4-basehref")??""}/configuration/template`,Nw.has(this.prefix)||Nw.set(this.prefix,new Map),this.map=Nw.get(this.prefix),void 0===this.map&&console.error(`The prefix ${this.prefix} is not defined in the templates map.`),this.map&&this.type&&!this.map.has(this.type)&&await this.loadScript(this.prefix),this.addEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.addEventListener("mousemove",this._onMouseMove.bind(this)),window.addEventListener("mouseup",this._onMouseUp.bind(this))}async disconnectedCallback(){this.removeEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.removeEventListener("mousemove",this._onMouseMove.bind(this)),window.removeEventListener("mouseup",this._onMouseUp.bind(this))}async willUpdate(t){t.has("configuration")&&this.configuration&&(console.log("Configuration has been updated, recalculating endpoint..."),this.templateEndpoint=this.apiEndpoint??`${this.configuration.get("headers:qbo4-basehref")??""}/configuration/template`,console.info(`set templateEndpoint to ${this.templateEndpoint}`),this.map&&this.type&&!this.map.has(this.type)&&await this.loadScript(this.prefix))}_onMouseDown(t){const e=this.shadowRoot?.querySelector(".qbo-code");if(!e||!t.target.closest(".qbo-code header"))return;const o=window.getComputedStyle(e);e.style.left="auto"===o.left?`${e.getBoundingClientRect().left}px`:o.left,e.style.top="auto"===o.top?`${e.getBoundingClientRect().top}px`:o.top,this.dragging=!0,this.offsetX=t.clientX-parseFloat(o.left||"0"),this.offsetY=t.clientY-parseFloat(o.top||"0")}_onResizeMouseDown(t){if(!t.target.closest(".qbo-code .resize-handle"))return;this.resizing=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.startWidth=e.offsetWidth,this.startHeight=e.offsetHeight,this.offsetX=t.clientX,this.offsetY=t.clientY)}_onMouseMove(t){if(this.dragging){const e=this.shadowRoot?.querySelector(".qbo-code");if(e){const o=t.clientX-this.offsetX,r=t.clientY-this.offsetY;e.style.left=`${o}px`,e.style.top=`${r}px`}}else if(this.resizing){const e=this.shadowRoot?.querySelector(".qbo-code");e&&(e.style.width=`${this.startWidth+(t.clientX-this.offsetX)}px`,e.style.height=`${this.startHeight+(t.clientY-this.offsetY)}px`)}}_onMouseUp(){this.dragging=!1,this.resizing=!1}flattenObjectKeys(t,e=""){return Object.keys(t).reduce((o,r)=>{const i=e.length?`${e}.`:"";return"object"==typeof t[r]&&null!==t[r]?o=o.concat(this.flattenObjectKeys(t[r],`${i}${r}`)):o.push(`${i}${r}`),o},[])}flattenComponentKeys(t){const e=[],o=Object.getPrototypeOf(t);return Object.getOwnPropertyNames(o).forEach(r=>{"constructor"===r||r.startsWith("_")||Reflect.getMetadata("design:type",o,r)&&("object"==typeof t[r]&&null!==t[r]?e.push(...this.flattenObjectKeys(t[r],r)):e.push(r))}),e.map(t=>({label:t,type:"variable"}))}_isSerializable(t){if("function"==typeof t||void 0===t)return!1;try{JSON.stringify(t)}catch(t){return!1}return!0}getComponent(){let t={};return new Set(Object.keys(this)).forEach(e=>{e.startsWith("_")||"constructor"!==e&&"shadowRoot"!==e&&"renderOptions"!==e&&"renderRoot"!==e&&"editor"!==e&&"function"!=typeof this[e]&&(t[e]=this[e])}),t}async loadScript(t){Gw[t]||(Gw[t]=this.fetchScript(t));try{const e=await Gw[t];e?(this.appendScriptToHead(t,e),console.log(`Template script for ${this.prefix} loaded and executed.`),this.requestUpdate()):console.error(`Template script for ${this.prefix} is not defined.`)}catch(t){console.error(`Template script for ${this.prefix} failed to load:`,t)}}async fetchScript(t){const e=await fetch(`${this.templateEndpoint}/search/${t}`);return e.ok?e.text():(console.error(`Failed to fetch templates from: ${this.templateEndpoint}/search/${t}`),null)}appendScriptToHead(t,e){const o=document.createElement("script");o.type="text/javascript",o.text=e,o.id=`${t}`,document.head.appendChild(o)}requestEdit(t){t.ctrlKey&&this.closest(".qbo-design")&&this.toggleEdit(!this.editing)}toggleEdit(t){this.editing=t,this.editing||(this.testTemplate=void 0,this.editor?.destroy(),this.editor=null)}setTemplate(t){const e=new Function("component",`return qbo4.html\`${t}\``);try{e(this),this.editorError=void 0,this.testTemplate=e}catch(e){this.editorError=e,console.error(`Error rendering ${t}`,e)}}resetTemplate(t){this.editorType=t.target.value,this.map?.has(t.target.value)&&(this.testTemplate=this.map.get(t.target.value)??this.defaultTemplate);let e="<span>Template not defined</span>";if(void 0!==this.testTemplate){const t=this.testTemplate.toString().match(this.regex);t&&(e=t[1])}this.editor?.dispatch(this.editor.state.update({changes:{from:0,to:this.editor.state.doc.length,insert:e}}))}updated(t){super.update(t);let e="<span>Template not defined</span>";if(void 0!==this.testTemplate){const t=this.testTemplate.toString().match(this.regex);t&&(e=t[1])}this.editing&&(this.editor??=new Dc({doc:e,extensions:[Bw,uy(),Gc.of([ng]),Dc.updateListener.of(t=>{this.setTemplate(t.state.doc.toString())})],parent:this.shadowRoot?.querySelector("div.editor")}))}edit(){this.editorType=this.type,this.testTemplate??=this.map?.get(this.type)??this.defaultTemplate;const t=Math.random().toString(36).substring(2,15);return Xt`
|
|
358
358
|
<dialog class="qbo-code" open>
|
|
359
359
|
<header>
|
|
360
360
|
<h5>Edit Template</h5>
|
|
@@ -374,7 +374,7 @@ input.working {
|
|
|
374
374
|
<button type="submit" @click=${this.save} ?disabled="${this.editorCoding}">Save</button>
|
|
375
375
|
<button type="reset" @click=${this.cancel} ?disabled="${this.editorCoding}">Cancel</button>
|
|
376
376
|
</footer>
|
|
377
|
-
</dialog>`}cancel(){this.toggleEdit(!1)}async save(){try{if(null==this.editor)return;const t=new FormData;t.append("htmlTemplate",this.editor.state.doc.toString());const e=await fetch(`${this.templateEndpoint}/save/${this.prefix}/${this.editorType}`,{method:"POST",body:t});if(e.ok)return this.map?.set(this.editorType,this.testTemplate),this.type=this.editorType,void this.toggleEdit(!1);throw new Error(`Failed to save template: ${e.statusText}`)}catch(t){console.error(t)}}async code(t){try{if(null==this.editor)return;this.editorCoding=!0;const e=t.target?.value,o=await fetch(`${this.templateEndpoint}/code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({HtmlTemplate:this.editor.state.doc.toString(),Component:this.getComponent(),Prompt:e})});if(this.editorCoding=!1,o.ok){const t=await o.text();return void this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:t}})}throw new Error(`Failed to generate code: ${o.statusText}`)}catch(t){this.editorCoding=!1,console.error(t)}}render(){let t=this.defaultTemplate;return this.type&&this.prefix&&!this.map?.has(this.type)&&(this.map=
|
|
377
|
+
</dialog>`}cancel(){this.toggleEdit(!1)}async save(){try{if(null==this.editor)return;const t=new FormData;t.append("htmlTemplate",this.editor.state.doc.toString());const e=await fetch(`${this.templateEndpoint}/save/${this.prefix}/${this.editorType}`,{method:"POST",body:t});if(e.ok)return this.map?.set(this.editorType,this.testTemplate),this.type=this.editorType,void this.toggleEdit(!1);throw new Error(`Failed to save template: ${e.statusText}`)}catch(t){console.error(t)}}async code(t){try{if(null==this.editor)return;this.editorCoding=!0;const e=t.target?.value,o=await fetch(`${this.templateEndpoint}/code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({HtmlTemplate:this.editor.state.doc.toString(),Component:this.getComponent(),Prompt:e})});if(this.editorCoding=!1,o.ok){const t=await o.text();return void this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:t}})}throw new Error(`Failed to generate code: ${o.statusText}`)}catch(t){this.editorCoding=!1,console.error(t)}}render(){let t=this.defaultTemplate;return this.type&&this.prefix&&!this.map?.has(this.type)&&(this.map=Nw.get(this.prefix)),this.type&&this.map?.has(this.type)&&(t=this.map.get(this.type)),this.editing?Xt`${this.edit()}${this.testTemplate(this)}`:t(this)}}return Ww([se({attribute:!1}),Iw("design:type",Object)],e.prototype,"editorError",void 0),Ww([se(),Iw("design:type",Object)],e.prototype,"type",void 0),Ww([se(),Iw("design:type",Object)],e.prototype,"editing",void 0),Ww([se({attribute:!1}),Iw("design:type",Function)],e.prototype,"defaultTemplate",void 0),Ww([se({attribute:!1}),Iw("design:type",Object)],e.prototype,"testTemplate",void 0),Ww([ki({context:zi,subscribe:!0}),se({attribute:!1}),Iw("design:type",Object)],e.prototype,"configuration",void 0),Ww([se(),Iw("design:type",Object)],e.prototype,"apiEndpoint",void 0),Ww([se(),Iw("design:type",Object)],e.prototype,"prefix",void 0),Ww([se({attribute:!1}),Iw("design:type",Object)],e.prototype,"map",void 0),Ww([se({attribute:!1}),Iw("design:type",Boolean)],e.prototype,"editorCoding",void 0),e},Kw=Hw(oe);var Jw=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},tk=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ek=class extends oe{constructor(){super(...arguments),this.dragging=!1,this.resizing=!1,this.offsetX=0,this.offsetY=0,this.startWidth=0,this.startHeight=0,this.editorError=null,this.editing=!1,this.storageKey="qbo-css",this.customcss="",this.editorCoding=!1,this.apiEndpoint=null,this.editor=null,this.styleElement=null}static{this.styles=[Mi]}async connectedCallback(){super.connectedCallback(),this.apiEndpoint??=`${this.qboConfig?.baseHref}/configuration/css`,this.addEventListener("click",this.requestEdit.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.addEventListener("mousemove",this._onMouseMove.bind(this)),window.addEventListener("mouseup",this._onMouseUp.bind(this)),this.customcss=localStorage.getItem(this.storageKey)??""}async disconnectedCallback(){this.removeEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.removeEventListener("mousemove",this._onMouseMove.bind(this)),window.removeEventListener("mouseup",this._onMouseUp.bind(this))}_onMouseDown(t){if(!t.target.closest(".qbo-code header"))return;this.dragging=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.offsetX=t.clientX-e.getBoundingClientRect().left,this.offsetY=t.clientY-e.getBoundingClientRect().top)}_onResizeMouseDown(t){if(!t.target.closest(".qbo-code .resize-handle"))return;this.resizing=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.startWidth=e.offsetWidth,this.startHeight=e.offsetHeight,this.offsetX=t.clientX,this.offsetY=t.clientY)}_onMouseMove(t){if(this.dragging){const e=this.shadowRoot?.querySelector(".qbo-code"),o=t.clientX-this.offsetX,r=t.clientY-this.offsetY;e&&(e.style.left=`${o}px`,e.style.top=`${r}px`)}else if(this.resizing){const e=this.shadowRoot?.querySelector(".qbo-code");e&&(e.style.width=`${this.startWidth+(t.clientX-this.offsetX)}px`,e.style.height=`${this.startHeight+(t.clientY-this.offsetY)}px`)}}_onMouseUp(){this.dragging=!1,this.resizing=!1}requestEdit(t){t.composedPath().some(t=>t instanceof Element&&t.classList.contains("qbo-code"))||!this.editing&&t.target.closest(".qbo-design")&&this.toggleEdit(!0)}toggleEdit(t){this.editing=t,this.editing||(this.editor?.destroy(),this.editor=null)}cancel(){this.setCss(this.customcss),this.toggleEdit(!1)}firstUpdated(t){super.firstUpdated(t);const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(localStorage.getItem(this.storageKey)??"")),document.head.appendChild(e),this.styleElement=e}updated(t){super.update(t),this.editing&&(this.editor??=new Dc({doc:this.styleElement?.textContent??"",extensions:[Bw,Zv(),Gc.of([ng]),Dc.updateListener.of(t=>{this.setCss(t.state.doc.toString())})],parent:this.shadowRoot?.querySelector("div.editor")}))}async code(t){try{if(null==this.editor)return;this.editorCoding=!0;const e=t.target?.value,o=await fetch(`${this.apiEndpoint}/code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({CssTemplate:this.editor.state.doc.toString(),Prompt:e})});if(this.editorCoding=!1,o.ok){const t=await o.text();return void this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:t}})}throw new Error(`Failed to generate code: ${o.statusText}`)}catch(t){this.editorCoding=!1,console.error(t)}}save(){this.toggleEdit(!1)}setCss(t){if(localStorage.setItem(this.storageKey,t),null!=this.styleElement)try{this.styleElement.textContent=t,this.editorError=void 0}catch(e){this.editorError=e,console.error(`Error rendering ${t}`,e)}}edit(){return Xt`
|
|
378
378
|
<dialog class="qbo-code" open>
|
|
379
379
|
<header>
|
|
380
380
|
<h5>Edit Css</h5>
|
|
@@ -388,5 +388,5 @@ input.working {
|
|
|
388
388
|
<button type="submit" @click=${this.save}>Save</button>
|
|
389
389
|
<button type="reset" @click=${this.cancel}>Cancel</button>
|
|
390
390
|
</footer>
|
|
391
|
-
</dialog>`}render(){return Xt`${this.editing?this.edit():Xt``}<slot>css edit</slot>`}};function
|
|
391
|
+
</dialog>`}render(){return Xt`${this.editing?this.edit():Xt``}<slot>css edit</slot>`}};function ok(){const t=window.customElements.define;window.customElements.define=function(e,o,r){window.customElements.get(e)?console.error(`Custom element ${e} already defined`):t.call(this,e,o,r)}}Jw([se({attribute:!1}),tk("design:type",Object)],ek.prototype,"editorError",void 0),Jw([se(),tk("design:type",Object)],ek.prototype,"editing",void 0),Jw([se(),tk("design:type",String)],ek.prototype,"storageKey",void 0),Jw([se(),tk("design:type",String)],ek.prototype,"customcss",void 0),Jw([se({attribute:!1}),tk("design:type",Boolean)],ek.prototype,"editorCoding",void 0),Jw([ki({context:$i,subscribe:!0}),se({attribute:!1}),tk("design:type",Object)],ek.prototype,"qboConfig",void 0),Jw([se(),tk("design:type",Object)],ek.prototype,"apiEndpoint",void 0),ek=Jw([ie("qbo-css")],ek),window.qbo4=window.qbo4||{},window.qbo4.configuration={templates:Map,html:Xt,css:J},window.qbo4.html=Xt,window.qbo4.css=J;const rk=new class extends yi{constructor(t,e,o){super(void 0!==e.context?e.initialValue:o),this.onContextRequest=t=>{if(t.context!==this.context)return;const e=t.contextTarget??t.composedPath()[0];e!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,e,t.subscribe))},this.onProviderRequest=t=>{if(t.context!==this.context)return;if((t.contextTarget??t.composedPath()[0])===this.host)return;const e=new Set;for(const[t,{consumerHost:o}]of this.subscriptions)e.has(t)||(e.add(t),o.dispatchEvent(new Oi(this.context,o,t,!0)));t.stopPropagation()},this.host=t,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new wi(this.context,this.host))}}(document.documentElement,{context:zi,initialValue:P.getService(Si)});(async()=>{const t=await fetch("/",{method:"HEAD"}),e=new Ti(t.headers);P.container.registerInstance(qi,e),console.info("HeaderConfigurationSource set with ",e.getData()),rk.setValue(P.getService(Si))})();export{Ri as Configuration,Ai as ConfigurationSection,Ci as EmptyConfigurationSource,Ti as HeadersConfigurationSource,qi as IConfigurationSourceToken,Si as IConfigurationToken,Pi as JsonConfigurationSource,Xi as QboConfigEditor,ek as QboCss,Kw as QboTemplate,Hw as QboTemplateMixin,zi as configurationContext,Qi as iterateConfig,$i as qboConfigContext,ok as redefineCustomElements,Fw as template,Nw as templates};
|
|
392
392
|
//# sourceMappingURL=qbo4.configuration.min.js.map
|