From 6f4908509d6abf3e52cb1684e58be2ff87c28fa5 Mon Sep 17 00:00:00 2001 From: Bobby Towers Date: Wed, 28 Jun 2023 05:46:40 -0700 Subject: [PATCH] revert truncate results --- README.md | 2 +- .../{index-53d4dbe5.js => index-1337c271.js} | 403 +++++++++--------- dist/index.html | 2 +- package.json | 2 +- src/eval-region.js | 13 +- 5 files changed, 207 insertions(+), 215 deletions(-) rename dist/assets/{index-53d4dbe5.js => index-1337c271.js} (82%) diff --git a/README.md b/README.md index e6314cd..4adab56 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Alpha. Certainly contains bugs. There is a [live demo](https://bobbicodes.github - ✅ Test published package - ✅ Handle errors - ✅ Pretty-print eval result -- ✅ Truncate very long eval result +- [ ] Truncate very long eval result - [ ] Handle infinite loops ## Run demo locally diff --git a/dist/assets/index-53d4dbe5.js b/dist/assets/index-1337c271.js similarity index 82% rename from dist/assets/index-53d4dbe5.js rename to dist/assets/index-1337c271.js index 46c2f46..be05aaf 100644 --- a/dist/assets/index-53d4dbe5.js +++ b/dist/assets/index-1337c271.js @@ -1,41 +1,41 @@ -(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))l(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const i of u.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&l(i)}).observe(document,{childList:!0,subtree:!0});function e(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(r){if(r.ep)return;r.ep=!0;const u=e(r);fetch(r.href,u)}})();class Ie{lineAt(n){if(n<0||n>this.length)throw new RangeError(`Invalid position ${n} in document of length ${this.length}`);return this.lineInner(n,!1,1,0)}line(n){if(n<1||n>this.lines)throw new RangeError(`Invalid line number ${n} in ${this.lines}-line document`);return this.lineInner(n,!0,1,0)}replace(n,e,l){let r=[];return this.decompose(0,n,r,2),l.length&&l.decompose(0,l.length,r,3),this.decompose(e,this.length,r,1),eo.from(r,this.length-(e-n)+l.length)}append(n){return this.replace(this.length,this.length,n)}slice(n,e=this.length){let l=[];return this.decompose(n,e,l,0),eo.from(l,e-n)}eq(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;let e=this.scanIdentical(n,1),l=this.length-this.scanIdentical(n,-1),r=new g1(this),u=new g1(n);for(let i=e,s=e;;){if(r.next(i),u.next(i),i=0,r.lineBreak!=u.lineBreak||r.done!=u.done||r.value!=u.value)return!1;if(s+=r.value.length,r.done||s>=l)return!0}}iter(n=1){return new g1(this,n)}iterRange(n,e=this.length){return new JL(this,n,e)}iterLines(n,e){let l;if(n==null)l=this.iter();else{e==null&&(e=this.lines+1);let r=this.line(n).from;l=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new KL(l)}toString(){return this.sliceString(0)}toJSON(){let n=[];return this.flatten(n),n}constructor(){}static of(n){if(n.length==0)throw new RangeError("A document must have at least one line");return n.length==1&&!n[0]?Ie.empty:n.length<=32?new Gl(n):eo.from(Gl.split(n,[]))}}class Gl extends Ie{constructor(n,e=UJ(n)){super(),this.text=n,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(n,e,l,r){for(let u=0;;u++){let i=this.text[u],s=r+i.length;if((e?l:s)>=n)return new YJ(r,s,l,i);r=s+1,l++}}decompose(n,e,l,r){let u=n<=0&&e>=this.length?this:new Gl(mD(this.text,n,e),Math.min(e,this.length)-Math.max(0,n));if(r&1){let i=l.pop(),s=Cv(u.text,i.text.slice(),0,u.length);if(s.length<=32)l.push(new Gl(s,i.length+u.length));else{let a=s.length>>1;l.push(new Gl(s.slice(0,a)),new Gl(s.slice(a)))}}else l.push(u)}replace(n,e,l){if(!(l instanceof Gl))return super.replace(n,e,l);let r=Cv(this.text,Cv(l.text,mD(this.text,0,n)),e),u=this.length+l.length-(e-n);return r.length<=32?new Gl(r,u):eo.from(Gl.split(r,[]),u)}sliceString(n,e=this.length,l=` +(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))l(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const i of u.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&l(i)}).observe(document,{childList:!0,subtree:!0});function e(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(r){if(r.ep)return;r.ep=!0;const u=e(r);fetch(r.href,u)}})();class Ie{lineAt(n){if(n<0||n>this.length)throw new RangeError(`Invalid position ${n} in document of length ${this.length}`);return this.lineInner(n,!1,1,0)}line(n){if(n<1||n>this.lines)throw new RangeError(`Invalid line number ${n} in ${this.lines}-line document`);return this.lineInner(n,!0,1,0)}replace(n,e,l){let r=[];return this.decompose(0,n,r,2),l.length&&l.decompose(0,l.length,r,3),this.decompose(e,this.length,r,1),eo.from(r,this.length-(e-n)+l.length)}append(n){return this.replace(this.length,this.length,n)}slice(n,e=this.length){let l=[];return this.decompose(n,e,l,0),eo.from(l,e-n)}eq(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;let e=this.scanIdentical(n,1),l=this.length-this.scanIdentical(n,-1),r=new g1(this),u=new g1(n);for(let i=e,s=e;;){if(r.next(i),u.next(i),i=0,r.lineBreak!=u.lineBreak||r.done!=u.done||r.value!=u.value)return!1;if(s+=r.value.length,r.done||s>=l)return!0}}iter(n=1){return new g1(this,n)}iterRange(n,e=this.length){return new GL(this,n,e)}iterLines(n,e){let l;if(n==null)l=this.iter();else{e==null&&(e=this.lines+1);let r=this.line(n).from;l=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new JL(l)}toString(){return this.sliceString(0)}toJSON(){let n=[];return this.flatten(n),n}constructor(){}static of(n){if(n.length==0)throw new RangeError("A document must have at least one line");return n.length==1&&!n[0]?Ie.empty:n.length<=32?new Gl(n):eo.from(Gl.split(n,[]))}}class Gl extends Ie{constructor(n,e=zJ(n)){super(),this.text=n,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(n,e,l,r){for(let u=0;;u++){let i=this.text[u],s=r+i.length;if((e?l:s)>=n)return new UJ(r,s,l,i);r=s+1,l++}}decompose(n,e,l,r){let u=n<=0&&e>=this.length?this:new Gl(gD(this.text,n,e),Math.min(e,this.length)-Math.max(0,n));if(r&1){let i=l.pop(),s=Cv(u.text,i.text.slice(),0,u.length);if(s.length<=32)l.push(new Gl(s,i.length+u.length));else{let a=s.length>>1;l.push(new Gl(s.slice(0,a)),new Gl(s.slice(a)))}}else l.push(u)}replace(n,e,l){if(!(l instanceof Gl))return super.replace(n,e,l);let r=Cv(this.text,Cv(l.text,gD(this.text,0,n)),e),u=this.length+l.length-(e-n);return r.length<=32?new Gl(r,u):eo.from(Gl.split(r,[]),u)}sliceString(n,e=this.length,l=` `){let r="";for(let u=0,i=0;u<=e&&in&&i&&(r+=l),nu&&(r+=s.slice(Math.max(0,n-u),e-u)),u=a+1}return r}flatten(n){for(let e of this.text)n.push(e)}scanIdentical(){return 0}static split(n,e){let l=[],r=-1;for(let u of n)l.push(u),r+=u.length+1,l.length==32&&(e.push(new Gl(l,r)),l=[],r=-1);return r>-1&&e.push(new Gl(l,r)),e}}class eo extends Ie{constructor(n,e){super(),this.children=n,this.length=e,this.lines=0;for(let l of n)this.lines+=l.lines}lineInner(n,e,l,r){for(let u=0;;u++){let i=this.children[u],s=r+i.length,a=l+i.lines-1;if((e?a:s)>=n)return i.lineInner(n,e,l,r);r=s+1,l=a+1}}decompose(n,e,l,r){for(let u=0,i=0;i<=e&&u=i){let o=r&((i<=n?1:0)|(a>=e?2:0));i>=n&&a<=e&&!o?l.push(s):s.decompose(n-i,e-i,l,o)}i=a+1}}replace(n,e,l){if(l.lines=u&&e<=s){let a=i.replace(n-u,e-u,l),o=this.lines-i.lines+a.lines;if(a.lines>5-1&&a.lines>o>>5+1){let h=this.children.slice();return h[r]=a,new eo(h,this.length-(e-n)+l.length)}return super.replace(u,s,a)}u=s+1}return super.replace(n,e,l)}sliceString(n,e=this.length,l=` -`){let r="";for(let u=0,i=0;un&&u&&(r+=l),ni&&(r+=s.sliceString(n-i,e-i,l)),i=a+1}return r}flatten(n){for(let e of this.children)e.flatten(n)}scanIdentical(n,e){if(!(n instanceof eo))return 0;let l=0,[r,u,i,s]=e>0?[0,0,this.children.length,n.children.length]:[this.children.length-1,n.children.length-1,-1,-1];for(;;r+=e,u+=e){if(r==i||u==s)return l;let a=this.children[r],o=n.children[u];if(a!=o)return l+a.scanIdentical(o,e);l+=a.length+1}}static from(n,e=n.reduce((l,r)=>l+r.length+1,-1)){let l=0;for(let d of n)l+=d.lines;if(l<32){let d=[];for(let C of n)C.flatten(d);return new Gl(d,e)}let r=Math.max(32,l>>5),u=r<<1,i=r>>1,s=[],a=0,o=-1,h=[];function c(d){let C;if(d.lines>u&&d instanceof eo)for(let I of d.children)c(I);else d.lines>i&&(a>i||!a)?(f(),s.push(d)):d instanceof Gl&&a&&(C=h[h.length-1])instanceof Gl&&d.lines+C.lines<=32?(a+=d.lines,o+=d.length+1,h[h.length-1]=new Gl(C.text.concat(d.text),C.length+1+d.length)):(a+d.lines>r&&f(),a+=d.lines,o+=d.length+1,h.push(d))}function f(){a!=0&&(s.push(h.length==1?h[0]:eo.from(h,o)),o=-1,a=h.length=0)}for(let d of n)c(d);return f(),s.length==1?s[0]:new eo(s,e)}}Ie.empty=new Gl([""],0);function UJ(t){let n=-1;for(let e of t)n+=e.length+1;return n}function Cv(t,n,e=0,l=1e9){for(let r=0,u=0,i=!0;u=e&&(a>l&&(s=s.slice(0,l-r)),r0?1:(n instanceof Gl?n.text.length:n.children.length)<<1]}nextInner(n,e){for(this.done=this.lineBreak=!1;;){let l=this.nodes.length-1,r=this.nodes[l],u=this.offsets[l],i=u>>1,s=r instanceof Gl?r.text.length:r.children.length;if(i==(e>0?s:0)){if(l==0)return this.done=!0,this.value="",this;e>0&&this.offsets[l-1]++,this.nodes.pop(),this.offsets.pop()}else if((u&1)==(e>0?0:1)){if(this.offsets[l]+=e,n==0)return this.lineBreak=!0,this.value=` -`,this;n--}else if(r instanceof Gl){let a=r.text[i+(e<0?-1:0)];if(this.offsets[l]+=e,a.length>Math.max(0,n))return this.value=n==0?a:e>0?a.slice(n):a.slice(0,a.length-n),this;n-=a.length}else{let a=r.children[i+(e<0?-1:0)];n>a.length?(n-=a.length,this.offsets[l]+=e):(e<0&&this.offsets[l]--,this.nodes.push(a),this.offsets.push(e>0?1:(a instanceof Gl?a.text.length:a.children.length)<<1))}}}next(n=0){return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}class JL{constructor(n,e,l){this.value="",this.done=!1,this.cursor=new g1(n,e>l?-1:1),this.pos=e>l?n.length:0,this.from=Math.min(e,l),this.to=Math.max(e,l)}nextInner(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let l=e<0?this.pos-this.from:this.to-this.pos;n>l&&(n=l),l-=n;let{value:r}=this.cursor.next(n);return this.pos+=(r.length+n)*e,this.value=r.length<=l?r:e<0?r.slice(r.length-l):r.slice(0,l),this.done=!this.value,this}next(n=0){return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class KL{constructor(n){this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}next(n=0){let{done:e,lineBreak:l,value:r}=this.inner.next(n);return e?(this.done=!0,this.value=""):l?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ie.prototype[Symbol.iterator]=function(){return this.iter()},g1.prototype[Symbol.iterator]=JL.prototype[Symbol.iterator]=KL.prototype[Symbol.iterator]=function(){return this});class YJ{constructor(n,e,l,r){this.from=n,this.to=e,this.number=l,this.text=r}get length(){return this.to-this.from}}let xm="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 t=1;tt)return xm[n-1]<=t;return!1}function wD(t){return t>=127462&&t<=127487}const dD=8205;function Ou(t,n,e=!0,l=!0){return(e?BL:GJ)(t,n,l)}function BL(t,n,e){if(n==t.length)return n;n&&XL(t.charCodeAt(n))&&FL(t.charCodeAt(n-1))&&n--;let l=Jr(t,n);for(n+=Bi(l);n=0&&wD(Jr(t,i));)u++,i-=2;if(u%2==0)break;n+=2}else break}return n}function GJ(t,n,e){for(;n>0;){let l=BL(t,n-2,e);if(l=56320&&t<57344}function FL(t){return t>=55296&&t<56320}function Jr(t,n){let e=t.charCodeAt(n);if(!FL(e)||n+1==t.length)return e;let l=t.charCodeAt(n+1);return XL(l)?(e-55296<<10)+(l-56320)+65536:e}function GR(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Bi(t){return t<65536?1:2}const Cx=/\r\n?|\n/;var ku=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(ku||(ku={}));class fo{constructor(n){this.sections=n}get length(){let n=0;for(let e=0;en)return u+(n-r);u+=s}else{if(l!=ku.Simple&&o>=n&&(l==ku.TrackDel&&rn||l==ku.TrackBefore&&rn))return null;if(o>n||o==n&&e<0&&!s)return n==r||e<0?u:u+a;u+=a}r=o}if(n>r)throw new RangeError(`Position ${n} is out of range for changeset of length ${r}`);return u}touchesRange(n,e=n){for(let l=0,r=0;l=0&&r<=e&&s>=n)return re?"cover":!0;r=s}return!1}toString(){let n="";for(let e=0;e=0?":"+r:"")}return n}toJSON(){return this.sections}static fromJSON(n){if(!Array.isArray(n)||n.length%2||n.some(e=>typeof e!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new fo(n)}static create(n){return new fo(n)}}class pr extends fo{constructor(n,e){super(n),this.inserted=e}apply(n){if(this.length!=n.length)throw new RangeError("Applying change set to a document with the wrong length");return Ax(this,(e,l,r,u,i)=>n=n.replace(r,r+(l-e),i),!1),n}mapDesc(n,e=!1){return Ex(this,n,e,!0)}invert(n){let e=this.sections.slice(),l=[];for(let r=0,u=0;r=0){e[r]=s,e[r+1]=i;let a=r>>1;for(;l.length0&&Rh(l,e,u.text),u.forward(h),s+=h}let o=n[i++];for(;s>1].toJSON()))}return n}static of(n,e,l){let r=[],u=[],i=0,s=null;function a(h=!1){if(!h&&!r.length)return;if||c<0||f>e)throw new RangeError(`Invalid change range ${c} to ${f} (in doc of length ${e})`);let C=d?typeof d=="string"?Ie.of(d.split(l||Cx)):d:Ie.empty,I=C.length;if(c==f&&I==0)return;ci&&uu(r,c-i,-1),uu(r,f-c,I),Rh(u,r,C),i=f}}return o(n),a(!s),s}static empty(n){return new pr(n?[n,-1]:[],[])}static fromJSON(n){if(!Array.isArray(n))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],l=[];for(let r=0;rs&&typeof i!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(u.length==1)e.push(u[0],0);else{for(;l.length=0&&e<=0&&e==t[r+1]?t[r]+=n:n==0&&t[r]==0?t[r+1]+=e:l?(t[r]+=n,t[r+1]+=e):t.push(n,e)}function Rh(t,n,e){if(e.length==0)return;let l=n.length-2>>1;if(l>1])),!(e||i==t.sections.length||t.sections[i+1]<0);)s=t.sections[i++],a=t.sections[i++];n(r,o,u,h,c),r=o,u=h}}}function Ex(t,n,e,l=!1){let r=[],u=l?[]:null,i=new E1(t),s=new E1(n);for(let a=-1;;)if(i.ins==-1&&s.ins==-1){let o=Math.min(i.len,s.len);uu(r,o,-1),i.forward(o),s.forward(o)}else if(s.ins>=0&&(i.ins<0||a==i.i||i.off==0&&(s.len=0&&a=0){let o=0,h=i.len;for(;h;)if(s.ins==-1){let c=Math.min(h,s.len);o+=c,h-=c,s.forward(c)}else if(s.ins==0&&s.lena||i.ins>=0&&i.len>a)&&(s||l.length>o),u.forward2(a),i.forward(a)}}}}class E1{constructor(n){this.set=n,this.i=0,this.next()}next(){let{sections:n}=this.set;this.i>1;return e>=n.length?Ie.empty:n[e]}textBit(n){let{inserted:e}=this.set,l=this.i-2>>1;return l>=e.length&&!n?Ie.empty:e[l].slice(this.off,n==null?void 0:this.off+n)}forward(n){n==this.len?this.next():(this.len-=n,this.off+=n)}forward2(n){this.ins==-1?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}class sf{constructor(n,e,l){this.from=n,this.to=e,this.flags=l}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let n=this.flags&3;return n==3?null:n}get goalColumn(){let n=this.flags>>5;return n==33554431?void 0:n}map(n,e=-1){let l,r;return this.empty?l=r=n.mapPos(this.from,e):(l=n.mapPos(this.from,1),r=n.mapPos(this.to,-1)),l==this.from&&r==this.to?this:new sf(l,r,this.flags)}extend(n,e=n){if(n<=this.anchor&&e>=this.anchor)return Tn.range(n,e);let l=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return Tn.range(this.anchor,l)}eq(n){return this.anchor==n.anchor&&this.head==n.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(n){if(!n||typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Tn.range(n.anchor,n.head)}static create(n,e,l){return new sf(n,e,l)}}class Tn{constructor(n,e){this.ranges=n,this.mainIndex=e}map(n,e=-1){return n.empty?this:Tn.create(this.ranges.map(l=>l.map(n,e)),this.mainIndex)}eq(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(let e=0;en.toJSON()),main:this.mainIndex}}static fromJSON(n){if(!n||!Array.isArray(n.ranges)||typeof n.main!="number"||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Tn(n.ranges.map(e=>sf.fromJSON(e)),n.main)}static single(n,e=n){return new Tn([Tn.range(n,e)],0)}static create(n,e=0){if(n.length==0)throw new RangeError("A selection needs at least one range");for(let l=0,r=0;rn?4:0)|u)}static normalized(n,e=0){let l=n[e];n.sort((r,u)=>r.from-u.from),e=n.indexOf(l);for(let r=1;ru.head?Tn.range(a,s):Tn.range(s,a))}}return new Tn(n,e)}}function ZL(t,n){for(let e of t.ranges)if(e.to>n)throw new RangeError("Selection points outside of document")}let JR=0;class dt{constructor(n,e,l,r,u){this.combine=n,this.compareInput=e,this.compare=l,this.isStatic=r,this.id=JR++,this.default=n([]),this.extensions=typeof u=="function"?u(this):u}static define(n={}){return new dt(n.combine||(e=>e),n.compareInput||((e,l)=>e===l),n.compare||(n.combine?(e,l)=>e===l:KR),!!n.static,n.enables)}of(n){return new Av([],this,0,n)}compute(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Av(n,this,1,e)}computeN(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Av(n,this,2,e)}from(n,e){return e||(e=l=>l),this.compute([n],l=>e(l.field(n)))}}function KR(t,n){return t==n||t.length==n.length&&t.every((e,l)=>e===n[l])}class Av{constructor(n,e,l,r){this.dependencies=n,this.facet=e,this.type=l,this.value=r,this.id=JR++}dynamicSlot(n){var e;let l=this.value,r=this.facet.compareInput,u=this.id,i=n[u]>>1,s=this.type==2,a=!1,o=!1,h=[];for(let c of this.dependencies)c=="doc"?a=!0:c=="selection"?o=!0:((e=n[c.id])!==null&&e!==void 0?e:1)&1||h.push(n[c.id]);return{create(c){return c.values[i]=l(c),1},update(c,f){if(a&&f.docChanged||o&&(f.docChanged||f.selection)||Rx(c,h)){let d=l(c);if(s?!pD(d,c.values[i],r):!r(d,c.values[i]))return c.values[i]=d,1}return 0},reconfigure:(c,f)=>{let d,C=f.config.address[u];if(C!=null){let I=u2(f,C);if(this.dependencies.every(T=>T instanceof dt?f.facet(T)===c.facet(T):T instanceof eu?f.field(T,!1)==c.field(T,!1):!0)||(s?pD(d=l(c),I,r):r(d=l(c),I)))return c.values[i]=I,0}else d=l(c);return c.values[i]=d,1}}}}function pD(t,n,e){if(t.length!=n.length)return!1;for(let l=0;lt[a.id]),r=e.map(a=>a.type),u=l.filter(a=>!(a&1)),i=t[n.id]>>1;function s(a){let o=[];for(let h=0;hl===r),n);return n.provide&&(e.provides=n.provide(e)),e}create(n){let e=n.facet(vD).find(l=>l.field==this);return((e==null?void 0:e.create)||this.createF)(n)}slot(n){let e=n[this.id]>>1;return{create:l=>(l.values[e]=this.create(l),1),update:(l,r)=>{let u=l.values[e],i=this.updateF(u,r);return this.compareF(u,i)?0:(l.values[e]=i,1)},reconfigure:(l,r)=>r.config.address[this.id]!=null?(l.values[e]=r.field(this),0):(l.values[e]=this.create(l),1)}}init(n){return[this,vD.of({field:this,create:n})]}get extension(){return this}}const ef={lowest:4,low:3,default:2,high:1,highest:0};function Wd(t){return n=>new bL(n,t)}const fg={highest:Wd(ef.highest),high:Wd(ef.high),default:Wd(ef.default),low:Wd(ef.low),lowest:Wd(ef.lowest)};class bL{constructor(n,e){this.inner=n,this.prec=e}}class c5{of(n){return new Px(this,n)}reconfigure(n){return c5.reconfigure.of({compartment:this,extension:n})}get(n){return n.config.compartments.get(this)}}class Px{constructor(n,e){this.compartment=n,this.inner=e}}class r2{constructor(n,e,l,r,u,i){for(this.base=n,this.compartments=e,this.dynamicSlots=l,this.address=r,this.staticValues=u,this.facets=i,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(n,e,l){let r=[],u=Object.create(null),i=new Map;for(let f of KJ(n,e,i))f instanceof eu?r.push(f):(u[f.facet.id]||(u[f.facet.id]=[])).push(f);let s=Object.create(null),a=[],o=[];for(let f of r)s[f.id]=o.length<<1,o.push(d=>f.slot(d));let h=l==null?void 0:l.config.facets;for(let f in u){let d=u[f],C=d[0].facet,I=h&&h[f]||[];if(d.every(T=>T.type==0))if(s[C.id]=a.length<<1|1,KR(I,d))a.push(l.facet(C));else{let T=C.combine(d.map($=>$.value));a.push(l&&C.compare(T,l.facet(C))?l.facet(C):T)}else{for(let T of d)T.type==0?(s[T.id]=a.length<<1|1,a.push(T.value)):(s[T.id]=o.length<<1,o.push($=>T.dynamicSlot($)));s[C.id]=o.length<<1,o.push(T=>JJ(T,C,d))}}let c=o.map(f=>f(s));return new r2(n,i,c,s,a,u)}}function KJ(t,n,e){let l=[[],[],[],[],[]],r=new Map;function u(i,s){let a=r.get(i);if(a!=null){if(a<=s)return;let o=l[a].indexOf(i);o>-1&&l[a].splice(o,1),i instanceof Px&&e.delete(i.compartment)}if(r.set(i,s),Array.isArray(i))for(let o of i)u(o,s);else if(i instanceof Px){if(e.has(i.compartment))throw new RangeError("Duplicate use of compartment in extensions");let o=n.get(i.compartment)||i.inner;e.set(i.compartment,o),u(o,s)}else if(i instanceof bL)u(i.inner,i.prec);else if(i instanceof eu)l[s].push(i),i.provides&&u(i.provides,s);else if(i instanceof Av)l[s].push(i),i.facet.extensions&&u(i.facet.extensions,ef.default);else{let o=i.extension;if(!o)throw new Error(`Unrecognized extension value in extension set (${i}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);u(o,s)}}return u(t,ef.default),l.reduce((i,s)=>i.concat(s))}function m1(t,n){if(n&1)return 2;let e=n>>1,l=t.status[e];if(l==4)throw new Error("Cyclic dependency between fields and/or facets");if(l&2)return l;t.status[e]=4;let r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function u2(t,n){return n&1?t.config.staticValues[n>>1]:t.values[n>>1]}const nW=dt.define(),tW=dt.define({combine:t=>t.some(n=>n),static:!0}),eW=dt.define({combine:t=>t.length?t[0]:void 0,static:!0}),lW=dt.define(),rW=dt.define(),uW=dt.define(),iW=dt.define({combine:t=>t.length?t[0]:!1});class eh{constructor(n,e){this.type=n,this.value=e}static define(){return new BJ}}class BJ{of(n){return new eh(this,n)}}class XJ{constructor(n){this.map=n}of(n){return new ee(this,n)}}class ee{constructor(n,e){this.type=n,this.value=e}map(n){let e=this.type.map(this.value,n);return e===void 0?void 0:e==this.value?this:new ee(this.type,e)}is(n){return this.type==n}static define(n={}){return new XJ(n.map||(e=>e))}static mapEffects(n,e){if(!n.length)return n;let l=[];for(let r of n){let u=r.map(e);u&&l.push(u)}return l}}ee.reconfigure=ee.define();ee.appendConfig=ee.define();class yr{constructor(n,e,l,r,u,i){this.startState=n,this.changes=e,this.selection=l,this.effects=r,this.annotations=u,this.scrollIntoView=i,this._doc=null,this._state=null,l&&ZL(l,e.newLength),u.some(s=>s.type==yr.time)||(this.annotations=u.concat(yr.time.of(Date.now())))}static create(n,e,l,r,u,i){return new yr(n,e,l,r,u,i)}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(n){for(let e of this.annotations)if(e.type==n)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(n){let e=this.annotation(yr.userEvent);return!!(e&&(e==n||e.length>n.length&&e.slice(0,n.length)==n&&e[n.length]=="."))}}yr.time=eh.define();yr.userEvent=eh.define();yr.addToHistory=eh.define();yr.remote=eh.define();function FJ(t,n){let e=[];for(let l=0,r=0;;){let u,i;if(l=t[l]))u=t[l++],i=t[l++];else if(r=0;r--){let u=l[r](t);u instanceof yr?t=u:Array.isArray(u)&&u.length==1&&u[0]instanceof yr?t=u[0]:t=oW(n,km(u),!1)}return t}function ZJ(t){let n=t.startState,e=n.facet(uW),l=t;for(let r=e.length-1;r>=0;r--){let u=e[r](t);u&&Object.keys(u).length&&(l=sW(l,Ix(n,u,t.changes.newLength),!0))}return l==t?t:yr.create(n,t.changes,t.selection,l.effects,l.annotations,l.scrollIntoView)}const bJ=[];function km(t){return t==null?bJ:Array.isArray(t)?t:[t]}var dl=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(dl||(dl={}));const nK=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let _x;try{_x=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function tK(t){if(_x)return _x.test(t);for(let n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||nK.test(e)))return!0}return!1}function eK(t){return n=>{if(!/\S/.test(n))return dl.Space;if(tK(n))return dl.Word;for(let e=0;e-1)return dl.Word;return dl.Other}}class Oe{constructor(n,e,l,r,u,i){this.config=n,this.doc=e,this.selection=l,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=u,i&&(i._state=this);for(let s=0;sr.set(a,s)),e=null),r.set(i.value.compartment,i.value.extension)):i.is(ee.reconfigure)?(e=null,l=i.value):i.is(ee.appendConfig)&&(e=null,l=km(l).concat(i.value));let u;e?u=n.startState.values.slice():(e=r2.resolve(l,r,this),u=new Oe(e,this.doc,this.selection,e.dynamicSlots.map(()=>null),(s,a)=>a.reconfigure(s,this),null).values),new Oe(e,n.newDoc,n.newSelection,u,(i,s)=>s.update(i,n),n)}replaceSelection(n){return typeof n=="string"&&(n=this.toText(n)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:n},range:Tn.cursor(e.from+n.length)}))}changeByRange(n){let e=this.selection,l=n(e.ranges[0]),r=this.changes(l.changes),u=[l.range],i=km(l.effects);for(let s=1;si.spec.fromJSON(s,a)))}}return Oe.create({doc:n.doc,selection:Tn.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}static create(n={}){let e=r2.resolve(n.extensions||[],new Map),l=n.doc instanceof Ie?n.doc:Ie.of((n.doc||"").split(e.staticFacet(Oe.lineSeparator)||Cx)),r=n.selection?n.selection instanceof Tn?n.selection:Tn.single(n.selection.anchor,n.selection.head):Tn.single(0);return ZL(r,l.length),e.staticFacet(tW)||(r=r.asSingle()),new Oe(e,l,r,e.dynamicSlots.map(()=>null),(u,i)=>i.create(u),null)}get tabSize(){return this.facet(Oe.tabSize)}get lineBreak(){return this.facet(Oe.lineSeparator)||` -`}get readOnly(){return this.facet(iW)}phrase(n,...e){for(let l of this.facet(Oe.phrases))if(Object.prototype.hasOwnProperty.call(l,n)){n=l[n];break}return e.length&&(n=n.replace(/\$(\$|\d*)/g,(l,r)=>{if(r=="$")return"$";let u=+(r||1);return!u||u>e.length?l:e[u-1]})),n}languageDataAt(n,e,l=-1){let r=[];for(let u of this.facet(nW))for(let i of u(this,e,l))Object.prototype.hasOwnProperty.call(i,n)&&r.push(i[n]);return r}charCategorizer(n){return eK(this.languageDataAt("wordChars",n).join(""))}wordAt(n){let{text:e,from:l,length:r}=this.doc.lineAt(n),u=this.charCategorizer(n),i=n-l,s=n-l;for(;i>0;){let a=Ou(e,i,!1);if(u(e.slice(a,i))!=dl.Word)break;i=a}for(;st.length?t[0]:4});Oe.lineSeparator=eW;Oe.readOnly=iW;Oe.phrases=dt.define({compare(t,n){let e=Object.keys(t),l=Object.keys(n);return e.length==l.length&&e.every(r=>t[r]==n[r])}});Oe.languageData=nW;Oe.changeFilter=lW;Oe.transactionFilter=rW;Oe.transactionExtender=uW;c5.reconfigure=ee.define();function Wo(t,n,e={}){let l={};for(let r of t)for(let u of Object.keys(r)){let i=r[u],s=l[u];if(s===void 0)l[u]=i;else if(!(s===i||i===void 0))if(Object.hasOwnProperty.call(e,u))l[u]=e[u](s,i);else throw new Error("Config merge conflict for field "+u)}for(let r in n)l[r]===void 0&&(l[r]=n[r]);return l}class Rf{eq(n){return this==n}range(n,e=n){return Tx.create(n,e,this)}}Rf.prototype.startSide=Rf.prototype.endSide=0;Rf.prototype.point=!1;Rf.prototype.mapMode=ku.TrackDel;let Tx=class aW{constructor(n,e,l){this.from=n,this.to=e,this.value=l}static create(n,e,l){return new aW(n,e,l)}};function Dx(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}class BR{constructor(n,e,l,r){this.from=n,this.to=e,this.value=l,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(n,e,l,r=0){let u=l?this.to:this.from;for(let i=r,s=u.length;;){if(i==s)return i;let a=i+s>>1,o=u[a]-n||(l?this.value[a].endSide:this.value[a].startSide)-e;if(a==i)return o>=0?i:s;o>=0?s=a:i=a+1}}between(n,e,l,r){for(let u=this.findIndex(e,-1e9,!0),i=this.findIndex(l,1e9,!1,u);ud||f==d&&o.startSide>0&&o.endSide<=0)continue;(d-f||o.endSide-o.startSide)<0||(i<0&&(i=f),o.point&&(s=Math.max(s,d-f)),l.push(o),r.push(f-i),u.push(d-i))}return{mapped:l.length?new BR(r,u,l,s):null,pos:i}}}class We{constructor(n,e,l,r){this.chunkPos=n,this.chunk=e,this.nextLayer=l,this.maxPoint=r}static create(n,e,l,r){return new We(n,e,l,r)}get length(){let n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let n=this.nextLayer.size;for(let e of this.chunk)n+=e.value.length;return n}chunkEnd(n){return this.chunkPos[n]+this.chunk[n].length}update(n){let{add:e=[],sort:l=!1,filterFrom:r=0,filterTo:u=this.length}=n,i=n.filter;if(e.length==0&&!i)return this;if(l&&(e=e.slice().sort(Dx)),this.isEmpty)return e.length?We.of(e):this;let s=new hW(this,null,-1).goto(0),a=0,o=[],h=new Qh;for(;s.value||a=0){let c=e[a++];h.addInner(c.from,c.to,c.value)||o.push(c)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||us.to||u=u&&n<=u+i.length&&i.between(u,n-u,e-u,l)===!1)return}this.nextLayer.between(n,e,l)}}iter(n=0){return R1.from([this]).goto(n)}get isEmpty(){return this.nextLayer==this}static iter(n,e=0){return R1.from(n).goto(e)}static compare(n,e,l,r,u=-1){let i=n.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=u),s=e.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=u),a=yD(i,s,l),o=new Vd(i,a,u),h=new Vd(s,a,u);l.iterGaps((c,f,d)=>jD(o,c,h,f,d,r)),l.empty&&l.length==0&&jD(o,0,h,0,0,r)}static eq(n,e,l=0,r){r==null&&(r=1e9-1);let u=n.filter(h=>!h.isEmpty&&e.indexOf(h)<0),i=e.filter(h=>!h.isEmpty&&n.indexOf(h)<0);if(u.length!=i.length)return!1;if(!u.length)return!0;let s=yD(u,i),a=new Vd(u,s,0).goto(l),o=new Vd(i,s,0).goto(l);for(;;){if(a.to!=o.to||!Mx(a.active,o.active)||a.point&&(!o.point||!a.point.eq(o.point)))return!1;if(a.to>r)return!0;a.next(),o.next()}}static spans(n,e,l,r,u=-1){let i=new Vd(n,null,u).goto(e),s=e,a=i.openStart;for(;;){let o=Math.min(i.to,l);if(i.point){let h=i.activeForPoint(i.to),c=i.pointFroms&&(r.span(s,o,i.active,a),a=i.openEnd(o));if(i.to>l)return a+(i.point&&i.to>l?1:0);s=i.to,i.next()}}static of(n,e=!1){let l=new Qh;for(let r of n instanceof Tx?[n]:e?lK(n):n)l.add(r.from,r.to,r.value);return l.finish()}}We.empty=new We([],[],null,-1);function lK(t){if(t.length>1)for(let n=t[0],e=1;e0)return t.slice().sort(Dx);n=l}return t}We.empty.nextLayer=We.empty;class Qh{finishChunk(n){this.chunks.push(new BR(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,n&&(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(n,e,l){this.addInner(n,e,l)||(this.nextLayer||(this.nextLayer=new Qh)).add(n,e,l)}addInner(n,e,l){let r=n-this.lastTo||l.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||l.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=l,this.lastFrom=n,this.lastTo=e,this.value.push(l),l.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),!0)}addChunk(n,e){if((n-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(n);let l=e.value.length-1;return this.last=e.value[l],this.lastFrom=e.from[l]+n,this.lastTo=e.to[l]+n,!0}finish(){return this.finishInner(We.empty)}finishInner(n){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return n;let e=We.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}function yD(t,n,e){let l=new Map;for(let u of t)for(let i=0;i=this.minPoint)break}}setRangeIndex(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=l&&r.push(new hW(i,e,l,u));return r.length==1?r[0]:new R1(r)}get startSide(){return this.value?this.value.startSide:0}goto(n,e=-1e9){for(let l of this.heap)l.goto(n,e);for(let l=this.heap.length>>1;l>=0;l--)hj(this.heap,l);return this.next(),this}forward(n,e){for(let l of this.heap)l.forward(n,e);for(let l=this.heap.length>>1;l>=0;l--)hj(this.heap,l);(this.to-n||this.value.endSide-e)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),hj(this.heap,0)}}}function hj(t,n){for(let e=t[n];;){let l=(n<<1)+1;if(l>=t.length)break;let r=t[l];if(l+1=0&&(r=t[l+1],l++),e.compare(r)<0)break;t[l]=e,t[n]=r,n=l}}class Vd{constructor(n,e,l){this.minPoint=l,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=R1.from(n,e,l)}goto(n,e=-1e9){return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}forward(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}removeActive(n){$0(this.active,n),$0(this.activeTo,n),$0(this.activeRank,n),this.minActive=xD(this.active,this.activeTo)}addActive(n){let e=0,{value:l,to:r,rank:u}=this.cursor;for(;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),l&&$0(l,r)}else if(this.cursor.value)if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let u=this.cursor.value;if(!u.point)this.addActive(l),this.cursor.next();else if(e&&this.cursor.to==this.to&&this.cursor.from=0&&l[r]=0&&!(this.activeRank[l]n||this.activeTo[l]==n&&this.active[l].endSide>=this.point.endSide)&&e.push(this.active[l]);return e.reverse()}openEnd(n){let e=0;for(let l=this.activeTo.length-1;l>=0&&this.activeTo[l]>n;l--)e++;return e}}function jD(t,n,e,l,r,u){t.goto(n),e.goto(l);let i=l+r,s=l,a=l-n;for(;;){let o=t.to+a-e.to||t.endSide-e.endSide,h=o<0?t.to+a:e.to,c=Math.min(h,i);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&Mx(t.activeForPoint(t.to),e.activeForPoint(e.to))||u.comparePoint(s,c,t.point,e.point):c>s&&!Mx(t.active,e.active)&&u.compareRange(s,c,t.active,e.active),h>i)break;s=h,o<=0&&t.next(),o>=0&&e.next()}}function Mx(t,n){if(t.length!=n.length)return!1;for(let e=0;e=n;l--)t[l+1]=t[l];t[n]=e}function xD(t,n){let e=-1,l=1e9;for(let r=0;r=n)return r;if(r==t.length)break;u+=t.charCodeAt(r)==9?e-u%e:1,r=Ou(t,r)}return l===!0?-1:t.length}const Nx="ͼ",kD=typeof Symbol>"u"?"__"+Nx:Symbol.for(Nx),qx=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),SD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Gh{constructor(n,e){this.rules=[];let{finish:l}=e||{};function r(i){return/^@/.test(i)?[i]:i.split(/,\s*/)}function u(i,s,a,o){let h=[],c=/^@(\w+)\b/.exec(i[0]),f=c&&c[1]=="keyframes";if(c&&s==null)return a.push(i[0]+";");for(let d in s){let C=s[d];if(/&/.test(d))u(d.split(/,\s*/).map(I=>i.map(T=>I.replace(/&/,T))).reduce((I,T)=>I.concat(T)),C,a);else if(C&&typeof C=="object"){if(!c)throw new RangeError("The value of a property ("+d+") should be a primitive value.");u(r(d),C,h,f)}else C!=null&&h.push(d.replace(/_.*/,"").replace(/[A-Z]/g,I=>"-"+I.toLowerCase())+": "+C+";")}(h.length||f)&&a.push((l&&!c&&!o?i.map(l):i).join(", ")+" {"+h.join(" ")+"}")}for(let i in n)u(r(i),n[i],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let n=SD[kD]||1;return SD[kD]=n+1,Nx+n.toString(36)}static mount(n,e){(n[qx]||new rK(n)).mount(Array.isArray(e)?e:[e])}}let OD=new Map;class rK{constructor(n){let e=n.ownerDocument||n,l=e.defaultView;if(!n.head&&n.adoptedStyleSheets&&l.CSSStyleSheet){let r=OD.get(e);if(r)return n.adoptedStyleSheets=[r.sheet,...n.adoptedStyleSheets],n[qx]=r;this.sheet=new l.CSSStyleSheet,n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets],OD.set(e,this)}else{this.styleTag=e.createElement("style");let r=n.head||n;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],n[qx]=this}mount(n){let e=this.sheet,l=0,r=0;for(let u=0;u-1&&(this.modules.splice(s,1),r--,s=-1),s==-1){if(this.modules.splice(r++,0,i),e)for(let a=0;a",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},uK=typeof navigator<"u"&&/Mac/.test(navigator.platform),iK=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Kr=0;Kr<10;Kr++)Jh[48+Kr]=Jh[96+Kr]=String(Kr);for(var Kr=1;Kr<=24;Kr++)Jh[Kr+111]="F"+Kr;for(var Kr=65;Kr<=90;Kr++)Jh[Kr]=String.fromCharCode(Kr+32),P1[Kr]=String.fromCharCode(Kr);for(var cj in Jh)P1.hasOwnProperty(cj)||(P1[cj]=Jh[cj]);function sK(t){var n=uK&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||iK&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",e=!n&&t.key||(t.shiftKey?P1:Jh)[t.keyCode]||t.key||"Unidentified";return e=="Esc"&&(e="Escape"),e=="Del"&&(e="Delete"),e=="Left"&&(e="ArrowLeft"),e=="Up"&&(e="ArrowUp"),e=="Right"&&(e="ArrowRight"),e=="Down"&&(e="ArrowDown"),e}function i2(t){let n;return t.nodeType==11?n=t.getSelection?t:t.ownerDocument:n=t,n.getSelection()}function bm(t,n){return n?t==n||t.contains(n.nodeType!=1?n.parentNode:n):!1}function oK(t){let n=t.activeElement;for(;n&&n.shadowRoot;)n=n.shadowRoot.activeElement;return n}function Ev(t,n){if(!n.anchorNode)return!1;try{return bm(t,n.anchorNode)}catch{return!1}}function I1(t){return t.nodeType==3?nw(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function s2(t,n,e,l){return e?CD(t,n,e,l,-1)||CD(t,n,e,l,1):!1}function o2(t){for(var n=0;;n++)if(t=t.previousSibling,!t)return n}function CD(t,n,e,l,r){for(;;){if(t==e&&n==l)return!0;if(n==(r<0?0:Kh(t))){if(t.nodeName=="DIV")return!1;let u=t.parentNode;if(!u||u.nodeType!=1)return!1;n=o2(t)+(r<0?0:1),t=u}else if(t.nodeType==1){if(t=t.childNodes[n+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;n=r<0?Kh(t):0}else return!1}}function Kh(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function XR(t,n){let e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function aK(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function hK(t,n,e,l,r,u,i,s){let a=t.ownerDocument,o=a.defaultView||window;for(let h=t;h;)if(h.nodeType==1){let c,f=h==a.body;if(f)c=aK(o);else{if(h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let I=h.getBoundingClientRect();c={left:I.left,right:I.left+h.clientWidth,top:I.top,bottom:I.top+h.clientHeight}}let d=0,C=0;if(r=="nearest")n.top0&&n.bottom>c.bottom+C&&(C=n.bottom-c.bottom+C+i)):n.bottom>c.bottom&&(C=n.bottom-c.bottom+i,e<0&&n.top-C0&&n.right>c.right+d&&(d=n.right-c.right+d+u)):n.right>c.right&&(d=n.right-c.right+u,e<0&&n.lefte.clientHeight||e.scrollWidth>e.clientWidth)return e;e=e.assignedSlot||e.parentNode}else if(e.nodeType==11)e=e.host;else break;return null}class fK{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}setRange(n){let{anchorNode:e,focusNode:l}=n;this.set(e,Math.min(n.anchorOffset,e?Kh(e):0),l,Math.min(n.focusOffset,l?Kh(l):0))}set(n,e,l,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=l,this.focusOffset=r}}let Gg=null;function cW(t){if(t.setActive)return t.setActive();if(Gg)return t.focus(Gg);let n=[];for(let e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(Gg==null?{get preventScroll(){return Gg={preventScroll:!0},!0}}:void 0),!Gg){Gg=!1;for(let e=0;ee)return c.domBoundsAround(n,e,o);if(f>=n&&r==-1&&(r=a,u=o),o>e&&c.dom.parentNode==this.dom){i=a,s=h;break}h=f,o=f+c.breakAfter}return{from:u,to:s<0?l+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i=0?this.children[i].dom:null}}markDirty(n=!1){this.dirty|=2,this.markParentsDirty(n)}markParentsDirty(n){for(let e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),e.dirty&1)return;e.dirty|=1,n=!1}}setParent(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}setDOM(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}get rootView(){for(let n=this;;){let e=n.parent;if(!e)return n;n=e}}replaceChildren(n,e,l=FR){this.markDirty();for(let r=n;rthis.pos||n==this.pos&&(e>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;let l=this.children[--this.i];this.pos-=l.length+l.breakAfter}}}function mW(t,n,e,l,r,u,i,s,a){let{children:o}=t,h=o.length?o[n]:null,c=u.length?u[u.length-1]:null,f=c?c.breakAfter:i;if(!(n==l&&h&&!i&&!f&&u.length<2&&h.merge(e,r,u.length?c:null,e==0,s,a))){if(l0&&(!i&&u.length&&h.merge(e,h.length,u[0],!1,s,0)?h.breakAfter=u.shift().breakAfter:(e2);var gt={mac:ID||/Mac/.test(vi.platform),windows:/Win/.test(vi.platform),linux:/Linux|X11/.test(vi.platform),ie:f5,ie_version:dW?Lx.documentMode||6:Vx?+Vx[1]:Wx?+Wx[1]:0,gecko:RD,gecko_version:RD?+(/Firefox\/(\d+)/.exec(vi.userAgent)||[0,0])[1]:0,chrome:!!fj,chrome_version:fj?+fj[1]:0,ios:ID,android:/Android\b/.test(vi.userAgent),webkit:PD,safari:pW,webkit_version:PD?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Lx.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const wK=256;class Pf extends ll{constructor(n){super(),this.text=n}get length(){return this.text.length}createDOM(n){this.setDOM(n||document.createTextNode(this.text))}sync(n,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(n){n.nodeType==3&&this.createDOM(n)}merge(n,e,l){return l&&(!(l instanceof Pf)||this.length-(e-n)+l.length>wK)?!1:(this.text=this.text.slice(0,n)+(l?l.text:"")+this.text.slice(e),this.markDirty(),!0)}split(n){let e=new Pf(this.text.slice(n));return this.text=this.text.slice(0,n),this.markDirty(),e}localPosFromDOM(n,e){return n==this.dom?e:e?this.text.length:0}domAtPos(n){return new Br(this.dom,n)}domBoundsAround(n,e,l){return{from:l,to:l+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(n,e){return zx(this.dom,n,e)}}class Ta extends ll{constructor(n,e=[],l=0){super(),this.mark=n,this.children=e,this.length=l;for(let r of e)r.setParent(this)}setAttrs(n){if(fW(n),this.mark.class&&(n.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)n.setAttribute(e,this.mark.attrs[e]);return n}reuseDOM(n){n.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(n),this.dirty|=6)}sync(n,e){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(n,e)}merge(n,e,l,r,u,i){return l&&(!(l instanceof Ta&&l.mark.eq(this.mark))||n&&u<=0||en&&e.push(l=n&&(r=u),l=a,u++}let i=this.length-n;return this.length=n,r>-1&&(this.children.length=r,this.markDirty()),new Ta(this.mark,e,i)}domAtPos(n){return kW(this,n)}coordsAt(n,e){return OW(this,n,e)}}function zx(t,n,e){let l=t.nodeValue.length;n>l&&(n=l);let r=n,u=n,i=0;n==0&&e<0||n==l&&e>=0?gt.chrome||gt.gecko||(n?(r--,i=1):u=0)?0:s.length-1];return gt.safari&&!i&&a.width==0&&(a=Array.prototype.find.call(s,o=>o.width)||a),i?XR(a,i<0):a||null}class Ph extends ll{constructor(n,e,l){super(),this.widget=n,this.length=e,this.side=l,this.prevWidget=null}static create(n,e,l){return new(n.customView||Ph)(n,e,l)}split(n){let e=Ph.create(this.widget,this.length-n,this.side);return this.length-=n,e}sync(n){(!this.dom||!this.widget.updateDOM(this.dom,n))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(n)),this.dom.contentEditable="false")}getSide(){return this.side}merge(n,e,l,r,u,i){return l&&(!(l instanceof Ph)||!this.widget.compare(l.widget)||n>0&&u<=0||e0)?Br.before(this.dom):Br.after(this.dom,n==this.length)}domBoundsAround(){return null}coordsAt(n,e){let l=this.widget.coordsAt(this.dom,n,e);if(l)return l;let r=this.dom.getClientRects(),u=null;if(!r.length)return null;let i=this.side?this.side<0:n>0;for(let s=i?r.length-1:0;u=r[s],!(n>0?s==0:s==r.length-1||u.topr.domAtPos(u),(r,u)=>new Br(r,Math.min(u,r.nodeValue.length))):new Br(l,Math.min(n,l.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(n,e){let{topView:l,text:r}=this.widget;return l?jW(n,e,l,r,this.length-l.length):Math.min(e,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(n,e){let{topView:l,text:r}=this.widget;return l?Ux(n,e,l,r,this.length-l.length,(u,i,s)=>u.coordsAt(i,s),(u,i,s)=>zx(u,i,s)):zx(r,n,e)}destroy(){var n;super.destroy(),(n=this.widget.topView)===null||n===void 0||n.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function Ux(t,n,e,l,r,u,i){if(e instanceof Ta){for(let s=e.dom.firstChild;s;s=s.nextSibling){let a=ll.get(s);if(a){let o=bm(s,l),h=a.length+(o?r:0);if(t0?Br.before(this.dom):Br.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(n){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ie.empty}get isHidden(){return!0}}Pf.prototype.children=Ph.prototype.children=tw.prototype.children=FR;function kW(t,n){let e=t.dom,{children:l}=t,r=0;for(let u=0;ru&&n0;u--){let i=l[u-1];if(i.dom.parentNode==e)return i.domAtPos(i.length)}for(let u=r;u0&&n instanceof Ta&&r.length&&(l=r[r.length-1])instanceof Ta&&l.mark.eq(n.mark)?SW(l,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function OW(t,n,e){let l=null,r=-1,u=null,i=-1;function s(o,h){for(let c=0,f=0;c=h&&(d.children.length?s(d,h-f):(!u||u.isHidden&&e>0)&&(C>h||f==C&&d.getSide()>0)?(u=d,i=h-f):(f0?3e8:-4e8:e>0?1e8:-1e8,new Bh(n,e,e,l,n.widget||null,!1)}static replace(n){let e=!!n.block,l,r;if(n.isBlockGap)l=-5e8,r=4e8;else{let{start:u,end:i}=CW(n,e);l=(u?e?-3e8:-1:5e8)-1,r=(i?e?2e8:1:-6e8)+1}return new Bh(n,l,r,e,n.widget||null,!0)}static line(n){return new _p(n)}static set(n,e=!1){return We.of(n,e)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Tt.none=We.empty;class g5 extends Tt{constructor(n){let{start:e,end:l}=CW(n);super(e?-1:5e8,l?1:-6e8,null,n),this.tagName=n.tagName||"span",this.class=n.class||"",this.attrs=n.attributes||null}eq(n){return this==n||n instanceof g5&&this.tagName==n.tagName&&this.class==n.class&&HR(this.attrs,n.attrs)}range(n,e=n){if(n>=e)throw new RangeError("Mark decorations may not be empty");return super.range(n,e)}}g5.prototype.point=!1;class _p extends Tt{constructor(n){super(-2e8,-2e8,null,n)}eq(n){return n instanceof _p&&this.spec.class==n.spec.class&&HR(this.spec.attributes,n.spec.attributes)}range(n,e=n){if(e!=n)throw new RangeError("Line decoration ranges must be zero-length");return super.range(n,e)}}_p.prototype.mapMode=ku.TrackBefore;_p.prototype.point=!0;class Bh extends Tt{constructor(n,e,l,r,u,i){super(e,l,u,n),this.block=r,this.isReplace=i,this.mapMode=r?e<=0?ku.TrackBefore:ku.TrackAfter:ku.TrackDel}get type(){return this.startSide=5||this.widget.lineBreaks>0)}eq(n){return n instanceof Bh&&pK(this.widget,n.widget)&&this.block==n.block&&this.startSide==n.startSide&&this.endSide==n.endSide}range(n,e=n){if(this.isReplace&&(n>e||n==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=n)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(n,e)}}Bh.prototype.point=!0;function CW(t,n=!1){let{inclusiveStart:e,inclusiveEnd:l}=t;return e==null&&(e=t.inclusive),l==null&&(l=t.inclusive),{start:e??n,end:l??n}}function pK(t,n){return t==n||!!(t&&n&&t.compare(n))}function Gx(t,n,e,l=0){let r=e.length-1;r>=0&&e[r]+l>=t?e[r]=Math.max(e[r],n):e.push(t,n)}class Ku extends ll{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(n,e,l,r,u,i){if(l){if(!(l instanceof Ku))return!1;this.dom||l.transferDOM(this)}return r&&this.setDeco(l?l.attrs:null),wW(this,n,e,l?l.children:[],u,i),!0}split(n){let e=new Ku;if(e.breakAfter=this.breakAfter,this.length==0)return e;let{i:l,off:r}=this.childPos(n);r&&(e.append(this.children[l].split(r),0),this.children[l].merge(r,this.children[l].length,null,!1,0,0),l++);for(let u=l;u0&&this.children[l-1].length==0;)this.children[--l].destroy();return this.children.length=l,this.markDirty(),this.length=n,e}transferDOM(n){this.dom&&(this.markDirty(),n.setDOM(this.dom),n.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(n){HR(this.attrs,n)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=n)}append(n,e){SW(this,n,e)}addLineDeco(n){let e=n.spec.attributes,l=n.spec.class;e&&(this.attrs=Yx(e,this.attrs||{})),l&&(this.attrs=Yx({class:l},this.attrs||{}))}domAtPos(n){return kW(this,n)}reuseDOM(n){n.nodeName=="DIV"&&(this.setDOM(n),this.dirty|=6)}sync(n,e){var l;this.dom?this.dirty&4&&(fW(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),this.prevAttrs!==void 0&&(Qx(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(n,e);let r=this.dom.lastChild;for(;r&&ll.get(r)instanceof Ta;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((l=ll.get(r))===null||l===void 0?void 0:l.isEditable)==!1&&(!gt.ios||!this.children.some(u=>u instanceof Pf))){let u=document.createElement("BR");u.cmIgnore=!0,this.dom.appendChild(u)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let n=0,e;for(let l of this.children){if(!(l instanceof Pf)||/[^ -~]/.test(l.text))return null;let r=I1(l.dom);if(r.length!=1)return null;n+=r[0].width,e=r[0].height}return n?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:n/this.length,textHeight:e}:null}coordsAt(n,e){let l=OW(this,n,e);if(!this.children.length&&l&&this.parent){let{heightOracle:r}=this.parent.view.viewState,u=l.bottom-l.top;if(Math.abs(u-r.lineHeight)<2&&r.textHeight=e){if(u instanceof Ku)return u;if(i>e)break}r=i+u.breakAfter}return null}}class gf extends ll{constructor(n,e,l){super(),this.widget=n,this.length=e,this.type=l,this.breakAfter=0,this.prevWidget=null}merge(n,e,l,r,u,i){return l&&(!(l instanceof gf)||!this.widget.compare(l.widget)||n>0&&u<=0||e0;){if(this.textOff==this.text.length){let{value:u,lineBreak:i,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(i){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,n--;continue}else this.text=u,this.textOff=0}let r=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-l)),this.getLine().append(q0(new Pf(this.text.slice(this.textOff,this.textOff+r)),e),l),this.atCursorPos=!0,this.textOff+=r,n-=r,l=0}}span(n,e,l,r){this.buildText(e-n,l,r),this.pos=e,this.openStart<0&&(this.openStart=r)}point(n,e,l,r,u,i){if(this.disallowBlockEffectsFor[i]&&l instanceof Bh){if(l.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 s=e-n;if(l instanceof Bh)if(l.block){let{type:a}=l;a==El.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new gf(l.widget||new _D("div"),s,a))}else{let a=Ph.create(l.widget||new _D("span"),s,s?0:l.startSide),o=this.atCursorPos&&!a.isEditable&&u<=r.length&&(n0),h=!a.isEditable&&(nr.length||l.startSide<=0),c=this.getLine();this.pendingBuffer==2&&!o&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),o&&(c.append(q0(new tw(1),r),u),u=r.length+Math.max(0,u-r.length)),c.append(q0(a,r),u),this.atCursorPos=h,this.pendingBuffer=h?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(l);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=u)}static build(n,e,l,r,u){let i=new ZR(n,e,l,u);return i.openEnd=We.spans(r,e,l,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}}function q0(t,n){for(let e of n)t=new Ta(e,[t],t.length);return t}class _D extends Ic{constructor(n){super(),this.tag=n}eq(n){return n.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(n){return n.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const AW=dt.define(),EW=dt.define(),RW=dt.define(),PW=dt.define(),Jx=dt.define(),IW=dt.define(),_W=dt.define(),TW=dt.define({combine:t=>t.some(n=>n)}),DW=dt.define({combine:t=>t.some(n=>n)});class a2{constructor(n,e="nearest",l="nearest",r=5,u=5){this.range=n,this.y=e,this.x=l,this.yMargin=r,this.xMargin=u}map(n){return n.empty?this:new a2(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}const TD=ee.define({map:(t,n)=>t.map(n)});function bi(t,n,e){let l=t.facet(PW);l.length?l[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}const m5=dt.define({combine:t=>t.length?t[0]:!0});let vK=0;const Fd=dt.define();class Or{constructor(n,e,l,r){this.id=n,this.create=e,this.domEventHandlers=l,this.extension=r(this)}static define(n,e){const{eventHandlers:l,provide:r,decorations:u}=e||{};return new Or(vK++,n,l,i=>{let s=[Fd.of(i)];return u&&s.push(_1.of(a=>{let o=a.plugin(i);return o?u(o):Tt.none})),r&&s.push(r(i)),s})}static fromClass(n,e){return Or.define(l=>new n(l),e)}}class gj{constructor(n){this.spec=n,this.mustUpdate=null,this.value=null}update(n){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(l){if(bi(e.state,l,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(e){bi(n.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(n){var e;if(!((e=this.value)===null||e===void 0)&&e.destroy)try{this.value.destroy()}catch(l){bi(n.state,l,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const MW=dt.define(),bR=dt.define(),_1=dt.define(),nP=dt.define(),$W=dt.define();function NW(t){let n=0,e=0,l=0,r=0;for(let u of t.state.facet($W)){let i=u(t);i&&(i.left!=null&&(n=Math.max(n,i.left)),i.right!=null&&(e=Math.max(e,i.right)),i.top!=null&&(l=Math.max(l,i.top)),i.bottom!=null&&(r=Math.max(r,i.bottom)))}return{left:n,right:e,top:l,bottom:r}}const Hd=dt.define();class go{constructor(n,e,l,r){this.fromA=n,this.toA=e,this.fromB=l,this.toB=r}join(n){return new go(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}addToSet(n){let e=n.length,l=this;for(;e>0;e--){let r=n[e-1];if(!(r.fromA>l.toA)){if(r.toAh)break;u+=2}if(!a)return l;new go(a.fromA,a.toA,a.fromB,a.toB).addToSet(l),i=a.toA,s=a.toB}}}class h2{constructor(n,e,l){this.view=n,this.state=e,this.transactions=l,this.flags=0,this.startState=n.state,this.changes=pr.empty(this.startState.doc.length);for(let u of l)this.changes=this.changes.compose(u.changes);let r=[];this.changes.iterChangedRanges((u,i,s,a)=>r.push(new go(u,i,s,a))),this.changedRanges=r}static create(n,e,l){return new h2(n,e,l)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(n=>n.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var Cl=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Cl||(Cl={}));const Kx=Cl.LTR,yK=Cl.RTL;function qW(t){let n=[];for(let e=0;e=e){if(s.level==l)return i;(u<0||(r!=0?r<0?s.frome:n[u].level>s.level))&&(u=i)}}if(u<0)throw new RangeError("Index out of range");return u}}const jl=[];function OK(t,n){let e=t.length,l=n==Kx?1:2,r=n==Kx?2:1;if(!t||l==1&&!SK.test(t))return LW(e);for(let i=0,s=l,a=l;i=0;f-=3)if(Gs[f+1]==-h){let d=Gs[f+2],C=d&2?l:d&4?d&1?r:l:0;C&&(jl[i]=jl[Gs[f]]=C),s=f;break}}else{if(Gs.length==189)break;Gs[s++]=i,Gs[s++]=o,Gs[s++]=a}else if((c=jl[i])==2||c==1){let f=c==l;a=f?0:1;for(let d=s-3;d>=0;d-=3){let C=Gs[d+2];if(C&2)break;if(f)Gs[d+2]|=2;else{if(C&4)break;Gs[d+2]|=4}}}for(let i=0;is;){let h=o,c=jl[--o]!=2;for(;o>s&&c==(jl[o-1]!=2);)o--;u.push(new Om(o,h,c?2:1))}else u.push(new Om(s,i,0))}else for(let i=0;iu)&&this.lineBreak(),r=i}return this.findPointBefore(l,e),this}readTextNode(n){let e=n.nodeValue;for(let l of this.points)l.node==n&&(l.pos=this.text.length+Math.min(l.offset,e.length));for(let l=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let u=-1,i=1,s;if(this.lineSeparator?(u=e.indexOf(this.lineSeparator,l),i=this.lineSeparator.length):(s=r.exec(e))&&(u=s.index,i=s[0].length),this.append(e.slice(l,u<0?e.length:u)),u<0)break;if(this.lineBreak(),i>1)for(let a of this.points)a.node==n&&a.pos>this.text.length&&(a.pos-=i-1);l=u+i}}readNode(n){if(n.cmIgnore)return;let e=ll.get(n),l=e&&e.overrideDOMText;if(l!=null){this.findPointInside(n,l.length);for(let r=l.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else n.nodeType==3?this.readTextNode(n):n.nodeName=="BR"?n.nextSibling&&this.lineBreak():n.nodeType==1&&this.readRange(n.firstChild,null)}findPointBefore(n,e){for(let l of this.points)l.node==n&&n.childNodes[l.offset]==e&&(l.pos=this.text.length)}findPointInside(n,e){for(let l of this.points)(n.nodeType==3?l.node==n:n.contains(l.node))&&(l.pos=this.text.length+Math.min(e,l.offset))}}function DD(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class MD{constructor(n,e){this.node=n,this.offset=e,this.pos=-1}}class $D extends ll{constructor(n){super(),this.view=n,this.compositionDeco=Tt.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(n.contentDOM),this.children=[new Ku],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new go(0,0,0,n.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(n){let e=n.changedRanges;this.minWidth>0&&e.length&&(e.every(({fromA:i,toA:s})=>sthis.minWidthTo)?(this.minWidthFrom=n.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=n.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=Tt.none:(n.transactions.length||this.dirty)&&(this.compositionDeco=EK(this.view,n.changes)),(gt.ie||gt.chrome)&&!this.compositionDeco.size&&n&&n.state.doc.lines!=n.startState.doc.lines&&(this.forceSelection=!0);let l=this.decorations,r=this.updateDeco(),u=_K(l,r,n.changes);return e=go.extendWithRanges(e,u),this.dirty==0&&e.length==0?!1:(this.updateInner(e,n.startState.doc.length),n.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(n,e){this.view.viewState.mustMeasureContent=!0,this.updateChildren(n,e);let{observer:l}=this.view;l.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let u=gt.chrome||gt.ios?{node:l.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,u),this.dirty=0,u&&(u.written||l.selectionRange.focusNode!=u.node)&&(this.forceSelection=!0),this.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to=0?n[r]:null;if(!u)break;let{fromA:i,toA:s,fromB:a,toB:o}=u,{content:h,breakAtStart:c,openStart:f,openEnd:d}=ZR.build(this.view.state.doc,a,o,this.decorations,this.dynamicDecorationMap),{i:C,off:I}=l.findPos(s,1),{i:T,off:$}=l.findPos(i,-1);mW(this,T,$,C,I,h,c,f,d)}}updateSelection(n=!1,e=!1){(n||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let l=this.view.root.activeElement,r=l==this.dom,u=!r&&Ev(this.dom,this.view.observer.selectionRange)&&!(l&&this.dom.contains(l));if(!(r||e||u))return;let i=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.domAtPos(s.anchor),o=s.empty?a:this.domAtPos(s.head);if(gt.gecko&&s.empty&&!this.compositionDeco.size&&AK(a)){let c=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(c,a.node.childNodes[a.offset]||null)),a=o=new Br(c,0),i=!0}let h=this.view.observer.selectionRange;(i||!h.focusNode||!s2(a.node,a.offset,h.anchorNode,h.anchorOffset)||!s2(o.node,o.offset,h.focusNode,h.focusOffset))&&(this.view.observer.ignore(()=>{gt.android&>.chrome&&this.dom.contains(h.focusNode)&&TK(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let c=i2(this.view.root);if(c)if(s.empty){if(gt.gecko){let f=PK(a.node,a.offset);if(f&&f!=3){let d=UW(a.node,a.offset,f==1?1:-1);d&&(a=new Br(d,f==1?0:d.nodeValue.length))}}c.collapse(a.node,a.offset),s.bidiLevel!=null&&h.cursorBidiLevel!=null&&(h.cursorBidiLevel=s.bidiLevel)}else if(c.extend){c.collapse(a.node,a.offset);try{c.extend(o.node,o.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([a,o]=[o,a]),f.setEnd(o.node,o.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}u&&this.view.root.activeElement==this.dom&&(this.dom.blur(),l&&l.focus())}),this.view.observer.setSelectionRange(a,o)),this.impreciseAnchor=a.precise?null:new Br(h.anchorNode,h.anchorOffset),this.impreciseHead=o.precise?null:new Br(h.focusNode,h.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:n}=this,e=n.state.selection.main,l=i2(n.root),{anchorNode:r,anchorOffset:u}=n.observer.selectionRange;if(!l||!e.empty||!e.assoc||!l.modify)return;let i=Ku.find(this,e.head);if(!i)return;let s=i.posAtStart;if(e.head==s||e.head==s+i.length)return;let a=this.coordsAt(e.head,-1),o=this.coordsAt(e.head,1);if(!a||!o||a.bottom>o.top)return;let h=this.domAtPos(e.head+e.assoc);l.collapse(h.node,h.offset),l.modify("move",e.assoc<0?"forward":"backward","lineboundary"),n.observer.readSelectionRange();let c=n.observer.selectionRange;n.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&l.collapse(r,u)}nearest(n){for(let e=n;e;){let l=ll.get(e);if(l&&l.rootView==this)return l;e=e.parentNode}return null}posFromDOM(n,e){let l=this.nearest(n);if(!l)throw new RangeError("Trying to find position for a DOM position outside of the document");return l.localPosFromDOM(n,e)+l.posAtStart}domAtPos(n){let{i:e,off:l}=this.childCursor().findPos(n,-1);for(;ei||n==i&&u.type!=El.WidgetBefore&&u.type!=El.WidgetAfter&&(!r||e==2||this.children[r-1].breakAfter||this.children[r-1].type==El.WidgetBefore&&e>-2))return u.coordsAt(n-i,e);l=i}}measureVisibleLineHeights(n){let e=[],{from:l,to:r}=n,u=this.view.contentDOM.clientWidth,i=u>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==Cl.LTR;for(let o=0,h=0;hr)break;if(o>=l){let d=c.dom.getBoundingClientRect();if(e.push(d.height),i){let C=c.dom.lastChild,I=C?I1(C):[];if(I.length){let T=I[I.length-1],$=a?T.right-d.left:d.right-T.left;$>s&&(s=$,this.minWidth=u,this.minWidthFrom=o,this.minWidthTo=f)}}}o=f+c.breakAfter}return e}textDirectionAt(n){let{i:e}=this.childPos(n,1);return getComputedStyle(this.children[e].dom).direction=="rtl"?Cl.RTL:Cl.LTR}measureTextSize(){for(let u of this.children)if(u instanceof Ku){let i=u.measureTextSize();if(i)return i}let n=document.createElement("div"),e,l,r;return n.className="cm-line",n.style.width="99999px",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(n);let u=I1(n.firstChild)[0];e=n.getBoundingClientRect().height,l=u?u.width/27:7,r=u?u.height:e,n.remove()}),{lineHeight:e,charWidth:l,textHeight:r}}childCursor(n=this.length){let e=this.children.length;return e&&(n-=this.children[--e].length),new gW(this.children,n,e)}computeBlockGapDeco(){let n=[],e=this.view.viewState;for(let l=0,r=0;;r++){let u=r==e.viewports.length?null:e.viewports[r],i=u?u.from-1:this.length;if(i>l){let s=e.lineBlockAt(i).bottom-e.lineBlockAt(l).top;n.push(Tt.replace({widget:new ND(s),block:!0,inclusive:!0,isBlockGap:!0}).range(l,i))}if(!u)break;l=u.to+1}return Tt.set(n)}updateDeco(){let n=this.view.state.facet(_1).map((e,l)=>(this.dynamicDecorationMap[l]=typeof e=="function")?e(this.view):e);for(let e=n.length;ee.anchor?-1:1),r;if(!l)return;!e.empty&&(r=this.coordsAt(e.anchor,e.anchor>e.head?-1:1))&&(l={left:Math.min(l.left,r.left),top:Math.min(l.top,r.top),right:Math.max(l.right,r.right),bottom:Math.max(l.bottom,r.bottom)});let u=NW(this.view),i={left:l.left-u.left,top:l.top-u.top,right:l.right+u.right,bottom:l.bottom+u.bottom};hK(this.view.scrollDOM,i,e.head-1)return Tt.none;if(a-s0)l=l.childNodes[r-1],r=Kh(l);else break}if(e>=0)for(let l=t,r=n;;){if(l.nodeType==3)return l;if(l.nodeType==1&&r=0)l=l.childNodes[r],r=0;else break}return null}function PK(t,n){return t.nodeType!=1?0:(n&&t.childNodes[n-1].contentEditable=="false"?1:0)|(n0;){let o=Ou(r.text,i,!1);if(l(r.text.slice(o,i))!=a)break;i=o}for(;st?n.left-t:Math.max(0,t-n.right)}function $K(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function mj(t,n){return t.topn.top+1}function qD(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function Xx(t,n,e){let l,r,u,i,s=!1,a,o,h,c;for(let C=t.firstChild;C;C=C.nextSibling){let I=I1(C);for(let T=0;Tb||i==b&&u>G){l=C,r=$,u=G,i=b;let en=b?e<$.top?-1:1:G?n<$.left?-1:1:0;s=!en||(en>0?T0)}G==0?e>$.bottom&&(!h||h.bottom<$.bottom)?(a=C,h=$):e<$.top&&(!c||c.top>$.top)&&(o=C,c=$):h&&mj(h,$)?h=LD(h,$.bottom):c&&mj(c,$)&&(c=qD(c,$.top))}}if(h&&h.bottom>=e?(l=a,r=h):c&&c.top<=e&&(l=o,r=c),!l)return{node:t,offset:0};let f=Math.max(r.left,Math.min(r.right,n));if(l.nodeType==3)return WD(l,f,e);if(s&&l.contentEditable!="false")return Xx(l,f,e);let d=Array.prototype.indexOf.call(t.childNodes,l)+(n>=(r.left+r.right)/2?1:0);return{node:t,offset:d}}function WD(t,n,e){let l=t.nodeValue.length,r=-1,u=1e9,i=0;for(let s=0;se?h.top-e:e-h.bottom)-1;if(h.left-1<=n&&h.right+1>=n&&c=(h.left+h.right)/2,d=f;if((gt.chrome||gt.gecko)&&nw(t,s).getBoundingClientRect().left==h.right&&(d=!f),c<=0)return{node:t,offset:s+(d?1:0)};r=s+(d?1:0),u=c}}}return{node:t,offset:r>-1?r:i>0?t.nodeValue.length:0}}function YW(t,n,e,l=-1){var r,u;let i=t.contentDOM.getBoundingClientRect(),s=i.top+t.viewState.paddingTop,a,{docHeight:o}=t.viewState,{x:h,y:c}=n,f=c-s;if(f<0)return 0;if(f>o)return t.state.doc.length;for(let en=t.defaultLineHeight/2,ln=!1;a=t.elementAtHeight(f),a.type!=El.Text;)for(;f=l>0?a.bottom+en:a.top-en,!(f>=0&&f<=o);){if(ln)return e?null:0;ln=!0,l=-l}c=s+f;let d=a.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:VD(t,i,a,h,c);let C=t.dom.ownerDocument,I=t.root.elementFromPoint?t.root:C,T=I.elementFromPoint(h,c);T&&!t.contentDOM.contains(T)&&(T=null),T||(h=Math.max(i.left+1,Math.min(i.right-1,h)),T=I.elementFromPoint(h,c),T&&!t.contentDOM.contains(T)&&(T=null));let $,G=-1;if(T&&((r=t.docView.nearest(T))===null||r===void 0?void 0:r.isEditable)!=!1){if(C.caretPositionFromPoint){let en=C.caretPositionFromPoint(h,c);en&&({offsetNode:$,offset:G}=en)}else if(C.caretRangeFromPoint){let en=C.caretRangeFromPoint(h,c);en&&({startContainer:$,startOffset:G}=en,(!t.contentDOM.contains($)||gt.safari&&NK($,G,h)||gt.chrome&&qK($,G,h))&&($=void 0))}}if(!$||!t.docView.dom.contains($)){let en=Ku.find(t.docView,d);if(!en)return f>a.top+a.height/2?a.to:a.from;({node:$,offset:G}=Xx(en.dom,h,c))}let b=t.docView.nearest($);if(!b)return null;if(b.isWidget&&((u=b.dom)===null||u===void 0?void 0:u.nodeType)==1){let en=b.dom.getBoundingClientRect();return n.yt.defaultLineHeight*1.5){let s=Math.floor((r-e.top)/t.defaultLineHeight);u+=s*t.viewState.heightOracle.lineLength}let i=t.state.sliceDoc(e.from,e.to);return e.from+$x(i,u,t.state.tabSize)}function NK(t,n,e){let l;if(t.nodeType!=3||n!=(l=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return nw(t,l-1,l).getBoundingClientRect().left>e}function qK(t,n,e){if(n!=0)return!1;for(let r=t;;){let u=r.parentNode;if(!u||u.nodeType!=1||u.firstChild!=r)return!1;if(u.classList.contains("cm-line"))break;r=u}let l=t.nodeType==1?t.getBoundingClientRect():nw(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return e-l.left>5}function Fx(t,n){let e=t.lineBlockAt(n);if(Array.isArray(e.type)){for(let l of e.type)if(l.to>n||l.to==n&&(l.to==e.to||l.type==El.Text))return l}return e}function LK(t,n,e,l){let r=Fx(t,n.head),u=!l||r.type!=El.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(n.assoc<0&&n.head>r.from?n.head-1:n.head);if(u){let i=t.dom.getBoundingClientRect(),s=t.textDirectionAt(r.from),a=t.posAtCoords({x:e==(s==Cl.LTR)?i.right-1:i.left+1,y:(u.top+u.bottom)/2});if(a!=null)return Tn.cursor(a,e?-1:1)}return Tn.cursor(e?r.to:r.from,e?-1:1)}function zD(t,n,e,l){let r=t.state.doc.lineAt(n.head),u=t.bidiSpans(r),i=t.textDirectionAt(r.from);for(let s=n,a=null;;){let o=CK(r,u,i,s,e),h=WW;if(!o){if(r.number==(e?t.state.doc.lines:1))return s;h=` -`,r=t.state.doc.line(r.number+(e?1:-1)),u=t.bidiSpans(r),o=Tn.cursor(e?r.from:r.to)}if(a){if(!a(h))return s}else{if(!l)return o;a=l(h)}s=o}}function WK(t,n,e){let l=t.state.charCategorizer(n),r=l(e);return u=>{let i=l(u);return r==dl.Space&&(r=i),r==i}}function VK(t,n,e,l){let r=n.head,u=e?1:-1;if(r==(e?t.state.doc.length:0))return Tn.cursor(r,n.assoc);let i=n.goalColumn,s,a=t.contentDOM.getBoundingClientRect(),o=t.coordsAtPos(r),h=t.documentTop;if(o)i==null&&(i=o.left-a.left),s=u<0?o.top:o.bottom;else{let d=t.viewState.lineBlockAt(r);i==null&&(i=Math.min(a.right-a.left,t.defaultCharacterWidth*(r-d.from))),s=(u<0?d.top:d.bottom)+h}let c=a.left+i,f=l??t.defaultLineHeight>>1;for(let d=0;;d+=10){let C=s+(f+d)*u,I=YW(t,{x:c,y:C},!1,u);if(Ca.bottom||(u<0?Ir))return Tn.cursor(I,n.assoc,void 0,i)}}function Rv(t,n,e){for(;;){let l=0;for(let r of t)r.between(n-1,n+1,(u,i,s)=>{if(n>u&&nr(t)),e.from,n.head>e.from?-1:1);return l==e.from?e:Tn.cursor(l,l{this.ignoreDuringComposition(r)||r.type=="keydown"&&this.keydown(n,r)||(this.mustFlushObserver(r)&&n.observer.forceFlush(),this.runCustomHandlers(r.type,n,r)?r.preventDefault():l(n,r))};for(let l in er){let r=er[l];n.contentDOM.addEventListener(l,u=>{UD(n,u)&&e(r,u)},Hx[l]),this.registeredEvents.push(l)}n.scrollDOM.addEventListener("mousedown",l=>{if(l.target==n.scrollDOM&&l.clientY>n.contentDOM.getBoundingClientRect().bottom&&(e(er.mousedown,l),!l.defaultPrevented&&l.button==2)){let r=n.contentDOM.style.minHeight;n.contentDOM.style.minHeight="100%",setTimeout(()=>n.contentDOM.style.minHeight=r,200)}}),n.scrollDOM.addEventListener("drop",l=>{l.target==n.scrollDOM&&l.clientY>n.contentDOM.getBoundingClientRect().bottom&&e(er.drop,l)}),gt.chrome&>.chrome_version==102&&n.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,gt.safari&&n.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}ensureHandlers(n,e){var l;let r;this.customHandlers=[];for(let u of e)if(r=(l=u.update(n).spec)===null||l===void 0?void 0:l.domEventHandlers){this.customHandlers.push({plugin:u.value,handlers:r});for(let i in r)this.registeredEvents.indexOf(i)<0&&i!="scroll"&&(this.registeredEvents.push(i),n.contentDOM.addEventListener(i,s=>{UD(n,s)&&this.runCustomHandlers(i,n,s)&&s.preventDefault()}))}}runCustomHandlers(n,e,l){for(let r of this.customHandlers){let u=r.handlers[n];if(u)try{if(u.call(r.plugin,l,e)||l.defaultPrevented)return!0}catch(i){bi(e.state,i)}}return!1}runScrollHandlers(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;for(let l of this.customHandlers){let r=l.handlers.scroll;if(r)try{r.call(l.plugin,e,n)}catch(u){bi(n.state,u)}}}keydown(n,e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()r.keyCode==e.keyCode))&&!e.ctrlKey||UK.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=l||e,setTimeout(()=>this.flushIOSKey(n),250),!0):!1}flushIOSKey(n){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,Sm(n.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(n){return/^key/.test(n.type)?this.composing>0?!0:gt.safari&&!gt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}mustFlushObserver(n){return n.type=="keydown"&&n.keyCode!=229}startMouseSelection(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}update(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const QW=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],UK="dthko",GW=[16,17,18,20,91,92,224,225],L0=6;function W0(t){return Math.max(0,t)*.7+8}class YK{constructor(n,e,l,r){this.view=n,this.style=l,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=cK(n.contentDOM),this.atoms=n.state.facet(nP).map(i=>i(n));let u=n.contentDOM.ownerDocument;u.addEventListener("mousemove",this.move=this.move.bind(this)),u.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(Oe.allowMultipleSelections)&&QK(n,e),this.dragMove=GK(n,e),this.dragging=JK(n,e)&&XW(e)==1?null:!1}start(n){this.dragging===!1&&(n.preventDefault(),this.select(n))}move(n){var e;if(n.buttons==0)return this.destroy();if(this.dragging!==!1)return;this.select(this.lastEvent=n);let l=0,r=0,u=((e=this.scrollParent)===null||e===void 0?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},i=NW(this.view);n.clientX-i.left<=u.left+L0?l=-W0(u.left-n.clientX):n.clientX+i.right>=u.right-L0&&(l=W0(n.clientX-u.right)),n.clientY-i.top<=u.top+L0?r=-W0(u.top-n.clientY):n.clientY+i.bottom>=u.bottom-L0&&(r=W0(n.clientY-u.bottom)),this.setScrollSpeed(l,r)}up(n){this.dragging==null&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(n,e){this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(n){let e=null;for(let l=0;lthis.select(this.lastEvent),20)}}function QK(t,n){let e=t.state.facet(AW);return e.length?e[0](n):gt.mac?n.metaKey:n.ctrlKey}function GK(t,n){let e=t.state.facet(EW);return e.length?e[0](n):gt.mac?!n.altKey:!n.ctrlKey}function JK(t,n){let{main:e}=t.state.selection;if(e.empty)return!1;let l=i2(t.root);if(!l||l.rangeCount==0)return!0;let r=l.getRangeAt(0).getClientRects();for(let u=0;u=n.clientX&&i.top<=n.clientY&&i.bottom>=n.clientY)return!0}return!1}function UD(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(let e=n.target,l;e!=t.contentDOM;e=e.parentNode)if(!e||e.nodeType==11||(l=ll.get(e))&&l.ignoreEvent(n))return!1;return!0}const er=Object.create(null),Hx=Object.create(null),JW=gt.ie&>.ie_version<15||gt.ios&>.webkit_version<604;function KK(t){let n=t.dom.parentNode;if(!n)return;let e=n.appendChild(document.createElement("textarea"));e.style.cssText="position: fixed; left: -10000px; top: 10px",e.focus(),setTimeout(()=>{t.focus(),e.remove(),KW(t,e.value)},50)}function KW(t,n){let{state:e}=t,l,r=1,u=e.toText(n),i=u.lines==e.selection.ranges.length;if(Zx!=null&&e.selection.ranges.every(a=>a.empty)&&Zx==u.toString()){let a=-1;l=e.changeByRange(o=>{let h=e.doc.lineAt(o.from);if(h.from==a)return{range:o};a=h.from;let c=e.toText((i?u.line(r++).text:n)+e.lineBreak);return{changes:{from:h.from,insert:c},range:Tn.cursor(o.from+c.length)}})}else i?l=e.changeByRange(a=>{let o=u.line(r++);return{changes:{from:a.from,to:a.to,insert:o.text},range:Tn.cursor(a.from+o.length)}}):l=e.replaceSelection(u);t.dispatch(l,{userEvent:"input.paste",scrollIntoView:!0})}er.keydown=(t,n)=>{t.inputState.setSelectionOrigin("select"),n.keyCode==27&&(t.inputState.lastEscPress=Date.now())};er.touchstart=(t,n)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};er.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Hx.touchstart=Hx.touchmove={passive:!0};er.mousedown=(t,n)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return;let e=null;for(let l of t.state.facet(RW))if(e=l(t,n),e)break;if(!e&&n.button==0&&(e=FK(t,n)),e){let l=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new YK(t,n,e,l)),l&&t.observer.ignore(()=>cW(t.contentDOM)),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}};function YD(t,n,e,l){if(l==1)return Tn.cursor(n,e);if(l==2)return DK(t.state,n,e);{let r=Ku.find(t.docView,n),u=t.state.doc.lineAt(r?r.posAtEnd:n),i=r?r.posAtStart:u.from,s=r?r.posAtEnd:u.to;return st>=n.top&&t<=n.bottom,QD=(t,n,e)=>BW(n,e)&&t>=e.left&&t<=e.right;function BK(t,n,e,l){let r=Ku.find(t.docView,n);if(!r)return 1;let u=n-r.posAtStart;if(u==0)return 1;if(u==r.length)return-1;let i=r.coordsAt(u,-1);if(i&&QD(e,l,i))return-1;let s=r.coordsAt(u,1);return s&&QD(e,l,s)?1:i&&BW(l,i)?-1:1}function GD(t,n){let e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:BK(t,e,n.clientX,n.clientY)}}const XK=gt.ie&>.ie_version<=11;let JD=null,KD=0,BD=0;function XW(t){if(!XK)return t.detail;let n=JD,e=BD;return JD=t,BD=Date.now(),KD=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(KD+1)%3:1}function FK(t,n){let e=GD(t,n),l=XW(n),r=t.state.selection;return{update(u){u.docChanged&&(e.pos=u.changes.mapPos(e.pos),r=r.map(u.changes))},get(u,i,s){let a=GD(t,u),o,h=YD(t,a.pos,a.bias,l);if(e.pos!=a.pos&&!i){let c=YD(t,e.pos,e.bias,l),f=Math.min(c.from,h.from),d=Math.max(c.to,h.to);h=f1&&(o=HK(r,a.pos))?o:s?r.addRange(h):Tn.create([h])}}}function HK(t,n){for(let e=0;e=n)return Tn.create(t.ranges.slice(0,e).concat(t.ranges.slice(e+1)),t.mainIndex==e?0:t.mainIndex-(t.mainIndex>e?1:0))}return null}er.dragstart=(t,n)=>{let{selection:{main:e}}=t.state,{mouseSelection:l}=t.inputState;l&&(l.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")};function XD(t,n,e,l){if(!e)return;let r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();let{mouseSelection:u}=t.inputState,i=l&&u&&u.dragging&&u.dragMove?{from:u.dragging.from,to:u.dragging.to}:null,s={from:r,insert:e},a=t.state.changes(i?[i,s]:s);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(r,-1),head:a.mapPos(r,1)},userEvent:i?"move.drop":"input.drop"})}er.drop=(t,n)=>{if(!n.dataTransfer)return;if(t.state.readOnly)return n.preventDefault();let e=n.dataTransfer.files;if(e&&e.length){n.preventDefault();let l=Array(e.length),r=0,u=()=>{++r==e.length&&XD(t,n,l.filter(i=>i!=null).join(t.state.lineBreak),!1)};for(let i=0;i{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(l[i]=s.result),u()},s.readAsText(e[i])}}else XD(t,n,n.dataTransfer.getData("Text"),!0)};er.paste=(t,n)=>{if(t.state.readOnly)return n.preventDefault();t.observer.flush();let e=JW?null:n.clipboardData;e?(KW(t,e.getData("text/plain")||e.getData("text/uri-text")),n.preventDefault()):KK(t)};function ZK(t,n){let e=t.dom.parentNode;if(!e)return;let l=e.appendChild(document.createElement("textarea"));l.style.cssText="position: fixed; left: -10000px; top: 10px",l.value=n,l.focus(),l.selectionEnd=n.length,l.selectionStart=0,setTimeout(()=>{l.remove(),t.focus()},50)}function bK(t){let n=[],e=[],l=!1;for(let r of t.selection.ranges)r.empty||(n.push(t.sliceDoc(r.from,r.to)),e.push(r));if(!n.length){let r=-1;for(let{from:u}of t.selection.ranges){let i=t.doc.lineAt(u);i.number>r&&(n.push(i.text),e.push({from:i.from,to:Math.min(t.doc.length,i.to+1)})),r=i.number}l=!0}return{text:n.join(t.lineBreak),ranges:e,linewise:l}}let Zx=null;er.copy=er.cut=(t,n)=>{let{text:e,ranges:l,linewise:r}=bK(t.state);if(!e&&!r)return;Zx=r?e:null;let u=JW?null:n.clipboardData;u?(n.preventDefault(),u.clearData(),u.setData("text/plain",e)):ZK(t,e),n.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:l,scrollIntoView:!0,userEvent:"delete.cut"})};const FW=eh.define();function HW(t,n){let e=[];for(let l of t.facet(_W)){let r=l(t,n);r&&e.push(r)}return e?t.update({effects:e,annotations:FW.of(!0)}):null}function ZW(t){setTimeout(()=>{let n=t.hasFocus;if(n!=t.inputState.notifiedFocused){let e=HW(t.state,n);e?t.dispatch(e):t.update([])}},10)}er.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),ZW(t)};er.blur=t=>{t.observer.clearSelectionRange(),ZW(t)};er.compositionstart=er.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};er.compositionend=t=>{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,gt.chrome&>.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)};er.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};er.beforeinput=(t,n)=>{var e;let l;if(gt.chrome&>.android&&(l=QW.find(r=>r.inputType==n.inputType))&&(t.observer.delayAndroidKey(l.key,l.keyCode),l.key=="Backspace"||l.key=="Delete")){let r=((e=window.visualViewport)===null||e===void 0?void 0:e.height)||0;setTimeout(()=>{var u;(((u=window.visualViewport)===null||u===void 0?void 0:u.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};const FD=["pre-wrap","normal","pre-line","break-spaces"];class nB{constructor(n){this.lineWrapping=n,this.doc=Ie.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(n,e){let l=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(l+=Math.max(0,Math.ceil((e-n-l*this.lineLength*.5)/this.lineLength))),this.lineHeight*l}heightForLine(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(n){return this.doc=n,this}mustRefreshForWrapping(n){return FD.indexOf(n)>-1!=this.lineWrapping}mustRefreshForHeights(n){let e=!1;for(let l=0;l-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=l,this.textHeight=r,this.lineLength=u,a){this.heightSamples={};for(let o=0;o0}set outdated(n){this.flags=(n?2:0)|this.flags&-3}setHeight(n,e){this.height!=e&&(Math.abs(this.height-e)>Pv&&(n.heightChanged=!0),this.height=e)}replace(n,e,l){return Au.of(l)}decomposeLeft(n,e){e.push(this)}decomposeRight(n,e){e.push(this)}applyChanges(n,e,l,r){let u=this,i=l.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:o,fromB:h,toB:c}=r[s],f=u.lineAt(a,sl.ByPosNoHeight,l.setDoc(e),0,0),d=f.to>=o?f:u.lineAt(o,sl.ByPosNoHeight,l,0,0);for(c+=d.to-o,o=d.to;s>0&&f.from<=r[s-1].toA;)a=r[s-1].fromA,h=r[s-1].fromB,s--,au*2){let s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),l+=1+s.break,r-=s.size}else if(u>r*2){let s=n[l];s.break?n.splice(l,1,s.left,null,s.right):n.splice(l,1,s.left,s.right),l+=2+s.break,u-=s.size}else break;else if(r=u&&i(this.blockAt(0,l,r,u))}updateHeight(n,e=0,l=!1,r){return r&&r.from<=e&&r.more&&this.setHeight(n,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class mi extends bW{constructor(n,e){super(n,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(n,e,l,r){return new lo(r,this.length,l,this.height,this.breaks)}replace(n,e,l){let r=l[0];return l.length==1&&(r instanceof mi||r instanceof Yr&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Yr?r=new mi(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Au.of(l)}updateHeight(n,e=0,l=!1,r){return r&&r.from<=e&&r.more?this.setHeight(n,r.heights[r.index++]):(l||this.outdated)&&this.setHeight(n,Math.max(this.widgetHeight,n.heightForLine(this.length-this.collapsed))+this.breaks*n.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Yr extends Au{constructor(n){super(n,0)}heightMetrics(n,e){let l=n.doc.lineAt(e).number,r=n.doc.lineAt(e+this.length).number,u=r-l+1,i,s=0;if(n.lineWrapping){let a=Math.min(this.height,n.lineHeight*u);i=a/u,this.length>u+1&&(s=(this.height-a)/(this.length-u-1))}else i=this.height/u;return{firstLine:l,lastLine:r,perLine:i,perChar:s}}blockAt(n,e,l,r){let{firstLine:u,lastLine:i,perLine:s,perChar:a}=this.heightMetrics(e,r);if(e.lineWrapping){let o=r+Math.round(Math.max(0,Math.min(1,(n-l)/this.height))*this.length),h=e.doc.lineAt(o),c=s+h.length*a,f=Math.max(l,n-c/2);return new lo(h.from,h.length,f,c,0)}else{let o=Math.max(0,Math.min(i-u,Math.floor((n-l)/s))),{from:h,length:c}=e.doc.line(u+o);return new lo(h,c,l+s*o,s,0)}}lineAt(n,e,l,r,u){if(e==sl.ByHeight)return this.blockAt(n,l,r,u);if(e==sl.ByPosNoHeight){let{from:d,to:C}=l.doc.lineAt(n);return new lo(d,C-d,0,0,0)}let{firstLine:i,perLine:s,perChar:a}=this.heightMetrics(l,u),o=l.doc.lineAt(n),h=s+o.length*a,c=o.number-i,f=r+s*c+a*(o.from-u-c);return new lo(o.from,o.length,Math.max(r,Math.min(f,r+this.height-h)),h,0)}forEachLine(n,e,l,r,u,i){n=Math.max(n,u),e=Math.min(e,u+this.length);let{firstLine:s,perLine:a,perChar:o}=this.heightMetrics(l,u);for(let h=n,c=r;h<=e;){let f=l.doc.lineAt(h);if(h==n){let C=f.number-s;c+=a*C+o*(n-u-C)}let d=a+o*f.length;i(new lo(f.from,f.length,c,d,0)),c+=d,h=f.to+1}}replace(n,e,l){let r=this.length-e;if(r>0){let u=l[l.length-1];u instanceof Yr?l[l.length-1]=new Yr(u.length+r):l.push(null,new Yr(r-1))}if(n>0){let u=l[0];u instanceof Yr?l[0]=new Yr(n+u.length):l.unshift(new Yr(n-1),null)}return Au.of(l)}decomposeLeft(n,e){e.push(new Yr(n-1),null)}decomposeRight(n,e){e.push(null,new Yr(this.length-n-1))}updateHeight(n,e=0,l=!1,r){let u=e+this.length;if(r&&r.from<=e+this.length&&r.more){let i=[],s=Math.max(e,r.from),a=-1;for(r.from>e&&i.push(new Yr(r.from-e-1).updateHeight(n,e));s<=u&&r.more;){let h=n.doc.lineAt(s).length;i.length&&i.push(null);let c=r.heights[r.index++];a==-1?a=c:Math.abs(c-a)>=Pv&&(a=-2);let f=new mi(h,c);f.outdated=!1,i.push(f),s+=h+1}s<=u&&i.push(null,new Yr(u-s).updateHeight(n,s));let o=Au.of(i);return(a<0||Math.abs(o.height-this.height)>=Pv||Math.abs(a-this.heightMetrics(n,e).perLine)>=Pv)&&(n.heightChanged=!0),o}else(l||this.outdated)&&(this.setHeight(n,n.heightForGap(e,e+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class eB extends Au{constructor(n,e,l){super(n.length+e+l.length,n.height+l.height,e|(n.outdated||l.outdated?2:0)),this.left=n,this.right=l,this.size=n.size+l.size}get break(){return this.flags&1}blockAt(n,e,l,r){let u=l+this.left.height;return ns))return o;let h=e==sl.ByPosNoHeight?sl.ByPosNoHeight:sl.ByPos;return a?o.join(this.right.lineAt(s,h,l,i,s)):this.left.lineAt(s,h,l,r,u).join(o)}forEachLine(n,e,l,r,u,i){let s=r+this.left.height,a=u+this.left.length+this.break;if(this.break)n=a&&this.right.forEachLine(n,e,l,s,a,i);else{let o=this.lineAt(a,sl.ByPos,l,r,u);n=n&&o.from<=e&&i(o),e>o.to&&this.right.forEachLine(o.to+1,e,l,s,a,i)}}replace(n,e,l){let r=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(n-r,e-r,l));let u=[];n>0&&this.decomposeLeft(n,u);let i=u.length;for(let s of l)u.push(s);if(n>0&&HD(u,i-1),e=l&&e.push(null)),n>l&&this.right.decomposeLeft(n-l,e)}decomposeRight(n,e){let l=this.left.length,r=l+this.break;if(n>=r)return this.right.decomposeRight(n-r,e);n2*e.size||e.size>2*n.size?Au.of(this.break?[n,null,e]:[n,e]):(this.left=n,this.right=e,this.height=n.height+e.height,this.outdated=n.outdated||e.outdated,this.size=n.size+e.size,this.length=n.length+this.break+e.length,this)}updateHeight(n,e=0,l=!1,r){let{left:u,right:i}=this,s=e+u.length+this.break,a=null;return r&&r.from<=e+u.length&&r.more?a=u=u.updateHeight(n,e,l,r):u.updateHeight(n,e,l),r&&r.from<=s+i.length&&r.more?a=i=i.updateHeight(n,s,l,r):i.updateHeight(n,s,l),a?this.balanced(u,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function HD(t,n){let e,l;t[n]==null&&(e=t[n-1])instanceof Yr&&(l=t[n+1])instanceof Yr&&t.splice(n-1,3,new Yr(e.length+1+l.length))}const lB=5;class tP{constructor(n,e){this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(n,e){if(this.lineStart>-1){let l=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof mi?r.length+=l-this.pos:(l>this.pos||!this.isCovered)&&this.nodes.push(new mi(l-this.pos,-1)),this.writtenTo=l,e>l&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(n,e,l){if(n=lB)&&this.addLineDeco(r,u,i)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:n,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=n,this.lineEnd=e,this.writtenTon&&this.nodes.push(new mi(this.pos-n,-1)),this.writtenTo=this.pos}blankContent(n,e){let l=new Yr(e-n);return this.oracle.doc.lineAt(n).to==e&&(l.flags|=4),l}ensureLine(){this.enterLine();let n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof mi)return n;let e=new mi(0,-1);return this.nodes.push(e),e}addBlock(n){var e;this.enterLine();let l=(e=n.deco)===null||e===void 0?void 0:e.type;l==El.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,l!=El.WidgetBefore&&(this.covering=n)}addLineDeco(n,e,l){let r=this.ensureLine();r.length+=l,r.collapsed+=l,r.widgetHeight=Math.max(r.widgetHeight,n),r.breaks+=e,this.writtenTo=this.pos=this.pos+l}finish(n){let e=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(e instanceof mi)&&!this.isCovered?this.nodes.push(new mi(0,-1)):(this.writtenToh.clientHeight||h.scrollWidth>h.clientWidth)&&c.overflow!="visible"){let f=h.getBoundingClientRect();u=Math.max(u,f.left),i=Math.min(i,f.right),s=Math.max(s,f.top),a=o==t.parentNode?f.bottom:Math.min(a,f.bottom)}o=c.position=="absolute"||c.position=="fixed"?h.offsetParent:h.parentNode}else if(o.nodeType==11)o=o.host;else break;return{left:u-e.left,right:Math.max(u,i)-e.left,top:s-(e.top+n),bottom:Math.max(s,a)-(e.top+n)}}function sB(t,n){let e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}class dj{constructor(n,e,l){this.from=n,this.to=e,this.size=l}static same(n,e){if(n.length!=e.length)return!1;for(let l=0;ltypeof l!="function"&&l.class=="cm-lineWrapping");this.heightOracle=new nB(e),this.stateDeco=n.facet(_1).filter(l=>typeof l!="function"),this.heightMap=Au.empty().applyChanges(this.stateDeco,Ie.empty,this.heightOracle.setDoc(n.doc),[new go(0,0,0,n.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Tt.set(this.lineGaps.map(l=>l.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let n=[this.viewport],{main:e}=this.state.selection;for(let l=0;l<=1;l++){let r=l?e.head:e.anchor;if(!n.some(({from:u,to:i})=>r>=u&&r<=i)){let{from:u,to:i}=this.lineBlockAt(r);n.push(new V0(u,i))}}this.viewports=n.sort((l,r)=>l.from-r.from),this.scaler=this.heightMap.height<=7e6?bD:new cB(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,n=>{this.viewportLines.push(this.scaler.scale==1?n:Zd(n,this.scaler))})}update(n,e=null){this.state=n.state;let l=this.stateDeco;this.stateDeco=this.state.facet(_1).filter(h=>typeof h!="function");let r=n.changedRanges,u=go.extendWithRanges(r,rB(l,this.stateDeco,n?n.changes:pr.empty(this.state.doc.length))),i=this.heightMap.height,s=this.scrolledToBottom?null:this.lineBlockAtHeight(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),u),this.heightMap.height!=i&&(n.flags|=2),s?(this.scrollAnchorPos=n.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=u.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let o=!n.changes.empty||n.flags&2||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),o&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(DW)&&(this.mustEnforceCursorAssoc=!0)}measure(n){let e=n.contentDOM,l=window.getComputedStyle(e),r=this.heightOracle,u=l.whiteSpace;this.defaultTextDirection=l.direction=="rtl"?Cl.RTL:Cl.LTR;let i=this.heightOracle.mustRefreshForWrapping(u),s=e.getBoundingClientRect(),a=i||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let o=0,h=0,c=parseInt(l.paddingTop)||0,f=parseInt(l.paddingBottom)||0;(this.paddingTop!=c||this.paddingBottom!=f)&&(this.paddingTop=c,this.paddingBottom=f,o|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=n.scrollDOM.clientWidth,o|=8),this.scrollTop!=n.scrollDOM.scrollTop&&(this.scrollAnchorHeight=-1,this.scrollTop=n.scrollDOM.scrollTop),this.scrolledToBottom=this.scrollTop>n.scrollDOM.scrollHeight-n.scrollDOM.clientHeight-4;let d=(this.printing?sB:iB)(e,this.paddingTop),C=d.top-this.pixelViewport.top,I=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let T=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(T!=this.inView&&(this.inView=T,T&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let $=s.width;if((this.contentDOMWidth!=$||this.editorHeight!=n.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=n.scrollDOM.clientHeight,o|=8),a){let b=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(b)&&(i=!0),i||r.lineWrapping&&Math.abs($-this.contentDOMWidth)>r.charWidth){let{lineHeight:en,charWidth:ln,textHeight:B}=n.docView.measureTextSize();i=en>0&&r.refresh(u,en,ln,B,$/ln,b),i&&(n.docView.minWidth=0,o|=8)}C>0&&I>0?h=Math.max(C,I):C<0&&I<0&&(h=Math.min(C,I)),r.heightChanged=!1;for(let en of this.viewports){let ln=en.from==this.viewport.from?b:n.docView.measureVisibleLineHeights(en);this.heightMap=(i?Au.empty().applyChanges(this.stateDeco,Ie.empty,this.heightOracle,[new go(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,i,new tB(en.from,ln))}r.heightChanged&&(o|=2)}let G=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return G&&(this.viewport=this.getViewport(h,this.scrollTarget)),this.updateForViewport(),(o&2||G)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,n)),o|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.docView.enforceCursorAssoc()),o}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(n,e){let l=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,u=this.heightOracle,{visibleTop:i,visibleBottom:s}=this,a=new V0(r.lineAt(i-l*1e3,sl.ByHeight,u,0,0).from,r.lineAt(s+(1-l)*1e3,sl.ByHeight,u,0,0).to);if(e){let{head:o}=e.range;if(oa.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),c=r.lineAt(o,sl.ByPos,u,0,0),f;e.y=="center"?f=(c.top+c.bottom)/2-h/2:e.y=="start"||e.y=="nearest"&&o=s+Math.max(10,Math.min(l,250)))&&r>i-2*1e3&&u>1,i=r<<1;if(this.defaultTextDirection!=Cl.LTR&&!l)return[];let s=[],a=(o,h,c,f)=>{if(h-oo&&TT.from>=c.from&&T.to<=c.to&&Math.abs(T.from-o)T.from<$&&T.to>$));if(!I){if(hT.from<=h&&T.to>=h)){let T=e.moveToLineBoundary(Tn.cursor(h),!1,!0).head;T>o&&(h=T)}I=new dj(o,h,this.gapSize(c,o,h,f))}s.push(I)};for(let o of this.viewportLines){if(o.lengtho.from&&a(o.from,f,o,h),de.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let e=[];We.spans(n,this.viewport.from,this.viewport.to,{span(r,u){e.push({from:r,to:u})},point(){}},20);let l=e.length!=this.visibleRanges.length||this.visibleRanges.some((r,u)=>r.from!=e[u].from||r.to!=e[u].to);return this.visibleRanges=e,l?4:0}lineBlockAt(n){return n>=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(e=>e.from<=n&&e.to>=n)||Zd(this.heightMap.lineAt(n,sl.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(n){return Zd(this.heightMap.lineAt(this.scaler.fromDOM(n),sl.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(n){return Zd(this.heightMap.blockAt(this.scaler.fromDOM(n),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 V0{constructor(n,e){this.from=n,this.to=e}}function aB(t,n,e){let l=[],r=t,u=0;return We.spans(e,t,n,{span(){},point(i,s){i>r&&(l.push({from:r,to:i}),u+=i-r),r=s}},20),r=1)return n[n.length-1].to;let l=Math.floor(t*e);for(let r=0;;r++){let{from:u,to:i}=n[r],s=i-u;if(l<=s)return u+l;l-=s}}function U0(t,n){let e=0;for(let{from:l,to:r}of t.ranges){if(n<=r){e+=n-l;break}e+=r-l}return e/t.total}function hB(t,n){for(let e of t)if(n(e))return e}const bD={toDOM(t){return t},fromDOM(t){return t},scale:1};class cB{constructor(n,e,l){let r=0,u=0,i=0;this.viewports=l.map(({from:s,to:a})=>{let o=e.lineAt(s,sl.ByPos,n,0,0).top,h=e.lineAt(a,sl.ByPos,n,0,0).bottom;return r+=h-o,{from:s,to:a,top:o,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);for(let s of this.viewports)s.domTop=i+(s.top-u)*this.scale,i=s.domBottom=s.domTop+(s.bottom-s.top),u=s.bottom}toDOM(n){for(let e=0,l=0,r=0;;e++){let u=eZd(r,n)):t._content)}const Y0=dt.define({combine:t=>t.join(" ")}),bx=dt.define({combine:t=>t.indexOf(!0)>-1}),nk=Gh.newName(),nV=Gh.newName(),tV=Gh.newName(),eV={"&light":"."+nV,"&dark":"."+tV};function tk(t,n,e){return new Gh(n,{finish(l){return/&/.test(l)?l.replace(/&\w*/,r=>{if(r=="&")return t;if(!e||!e[r])throw new RangeError(`Unsupported selector: ${r}`);return e[r]}):t+" "+l}})}const fB=tk("."+nk,{"&":{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},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",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:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&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",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&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},"&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-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"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,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"}},eV);class gB{constructor(n,e,l,r){this.typeOver=r,this.bounds=null,this.text="";let{impreciseHead:u,impreciseAnchor:i}=n.docView;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,l,0))){let s=u||i?[]:wB(n),a=new VW(s,n.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=dB(s,this.bounds.from)}else{let s=n.observer.selectionRange,a=u&&u.node==s.focusNode&&u.offset==s.focusOffset||!bm(n.contentDOM,s.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(s.focusNode,s.focusOffset),o=i&&i.node==s.anchorNode&&i.offset==s.anchorOffset||!bm(n.contentDOM,s.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(s.anchorNode,s.anchorOffset);this.newSel=Tn.single(o,a)}}}function lV(t,n){let e,{newSel:l}=n,r=t.state.selection.main,u=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(n.bounds){let{from:i,to:s}=n.bounds,a=r.from,o=null;(u===8||gt.android&&n.text.length=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(gt.mac||gt.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(l&&e.insert.length==2&&(l=Tn.single(l.main.anchor-1,l.main.head-1)),e={from:r.from,to:r.to,insert:Ie.of([" "])}):gt.chrome&&e&&e.from==e.to&&e.from==r.head&&e.insert.toString()==` - `&&t.lineWrapping&&(l&&(l=Tn.single(l.main.anchor-1,l.main.head-1)),e={from:r.from,to:r.to,insert:Ie.of([" "])}),e){let i=t.state;if(gt.ios&&t.inputState.flushIOSKey(t)||gt.android&&(e.from==r.from&&e.to==r.to&&e.insert.length==1&&e.insert.lines==2&&Sm(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||u==8&&e.insert.lengthh(t,e.from,e.to,s)))return!0;t.inputState.composing>=0&&t.inputState.composing++;let a;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!l||l.main.empty&&l.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let h=r.frome.to?i.sliceDoc(e.to,r.to):"";a=i.replaceSelection(t.state.toText(h+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let h=i.changes(e),c=l&&l.main.to<=h.newLength?l.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let f=t.state.sliceDoc(e.from,e.to),d=zW(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,I=r.to-r.from;a=i.changeByRange(T=>{if(T.from==r.from&&T.to==r.to)return{changes:h,range:c||T.map(h)};let $=T.to-C,G=$-f.length;if(T.to-T.from!=I||t.state.sliceDoc(G,$)!=f||d&&T.to>=d.from&&T.from<=d.to)return{range:T};let b=i.changes({from:G,to:$,insert:e.insert}),en=T.to-r.to;return{changes:b,range:c?Tn.range(Math.max(0,c.anchor+en),Math.max(0,c.head+en)):T.map(b)}})}else a={changes:h,selection:c&&i.selection.replaceRange(c)}}let o="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(a,{scrollIntoView:!0,userEvent:o}),!0}else if(l&&!l.main.eq(r)){let i=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(i=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:l,scrollIntoView:i,userEvent:s}),!0}else return!1}function mB(t,n,e,l){let r=Math.min(t.length,n.length),u=0;for(;u0&&s>0&&t.charCodeAt(i-1)==n.charCodeAt(s-1);)i--,s--;if(l=="end"){let a=Math.max(0,u-Math.min(i,s));e-=i+a-u}if(i=i?u-e:0;u-=a,s=u+(s-i),i=u}else if(s=s?u-e:0;u-=a,i=u+(i-s),s=u}return{from:u,toA:i,toB:s}}function wB(t){let n=[];if(t.root.activeElement!=t.contentDOM)return n;let{anchorNode:e,anchorOffset:l,focusNode:r,focusOffset:u}=t.observer.selectionRange;return e&&(n.push(new MD(e,l)),(r!=e||u!=l)&&n.push(new MD(r,u))),n}function dB(t,n){if(t.length==0)return null;let e=t[0].pos,l=t.length==2?t[1].pos:e;return e>-1&&l>-1?Tn.single(e+n,l+n):null}const pB={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},pj=gt.ie&>.ie_version<=11;class vB{constructor(n){this.view=n,this.active=!1,this.selectionRange=new fK,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.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(e=>{for(let l of e)this.queue.push(l);(gt.ie&>.ie_version<=11||gt.ios&&n.composing)&&e.some(l=>l.type=="childList"&&l.removedNodes.length||l.type=="characterData"&&l.oldValue.length>l.target.nodeValue.length)?this.flushSoon():this.flush()}),pj&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.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),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var e;((e=this.view.docView)===null||e===void 0?void 0:e.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(n.contentDOM)),this.addWindowListeners(this.win=n.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.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(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}onScroll(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some((e,l)=>e!=n[l]))){this.gapIntersection.disconnect();for(let e of n)this.gapIntersection.observe(e);this.gaps=n}}onSelectionChange(n){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:l}=this,r=this.selectionRange;if(l.state.facet(m5)?l.root.activeElement!=this.dom:!Ev(l.dom,r))return;let u=r.anchorNode&&l.docView.nearest(r.anchorNode);if(u&&u.ignoreEvent(n)){e||(this.selectionChanged=!1);return}(gt.ie&>.ie_version<=11||gt.android&>.chrome)&&!l.state.selection.main.empty&&r.focusNode&&s2(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:n}=this,e=gt.safari&&n.root.nodeType==11&&oK(this.dom.ownerDocument)==this.dom&&yB(this.view)||i2(n.root);if(!e||this.selectionRange.eq(e))return!1;let l=Ev(this.dom,e);return l&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime{let u=this.delayedAndroidKey;u&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=u.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&u.force&&Sm(this.dom,u.key,u.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||n=="Enter")&&(this.delayedAndroidKey={key:n,keyCode:e,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let n of this.observer.takeRecords())this.queue.push(n);return this.queue}processRecords(){let n=this.pendingRecords();n.length&&(this.queue=[]);let e=-1,l=-1,r=!1;for(let u of n){let i=this.readMutation(u);i&&(i.typeOver&&(r=!0),e==-1?{from:e,to:l}=i:(e=Math.min(i.from,e),l=Math.max(i.to,l)))}return{from:e,to:l,typeOver:r}}readChange(){let{from:n,to:e,typeOver:l}=this.processRecords(),r=this.selectionChanged&&Ev(this.dom,this.selectionRange);return n<0&&!r?null:(n>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new gB(this.view,n,e,l))}flush(n=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;n&&this.readSelectionRange();let e=this.readChange();if(!e)return!1;let l=this.view.state,r=lV(this.view,e);return this.view.state==l&&this.view.update([]),r}readMutation(n){let e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty(n.type=="attributes"),n.type=="attributes"&&(e.dirty|=4),n.type=="childList"){let l=nM(e,n.previousSibling||n.target.previousSibling,-1),r=nM(e,n.nextSibling||n.target.nextSibling,1);return{from:l?e.posAfter(l):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}else return n.type=="characterData"?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}setWindow(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}addWindowListeners(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var n,e,l,r;this.stop(),(n=this.intersection)===null||n===void 0||n.disconnect(),(e=this.gapIntersection)===null||e===void 0||e.disconnect(),(l=this.resizeScroll)===null||l===void 0||l.disconnect(),(r=this.resizeContent)===null||r===void 0||r.disconnect();for(let u of this.scrollTargets)u.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function nM(t,n,e){for(;n;){let l=ll.get(n);if(l&&l.parent==t)return l;let r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}function yB(t){let n=null;function e(a){a.preventDefault(),a.stopImmediatePropagation(),n=a.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",e,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",e,!0),!n)return null;let l=n.startContainer,r=n.startOffset,u=n.endContainer,i=n.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return s2(s.node,s.offset,u,i)&&([l,r,u,i]=[u,i,l,r]),{anchorNode:l,anchorOffset:r,focusNode:u,focusOffset:i}}class kt{constructor(n={}){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.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=n.dispatch||(e=>this.update([e])),this.dispatch=this.dispatch.bind(this),this._root=n.root||gK(n.parent)||document,this.viewState=new ZD(n.state||Oe.create(n)),this.plugins=this.state.facet(Fd).map(e=>new gj(e));for(let e of this.plugins)e.update(this);this.observer=new vB(this),this.inputState=new zK(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new $D(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),n.parent&&n.parent.appendChild(this.dom)}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.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...n){let e=n.length==1&&n[0]instanceof yr?n[0]:this.state.update(...n);this._dispatch(e,this)}update(n){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e=!1,l=!1,r,u=this.state;for(let f of n){if(f.startState!=u)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");u=f.state}if(this.destroyed){this.viewState.state=u;return}let i=this.hasFocus,s=0,a=null;n.some(f=>f.annotation(FW))?(this.inputState.notifiedFocused=i,s=1):i!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=i,a=HW(u,i),a||(s=1));let o=this.observer.delayedAndroidKey,h=null;if(o?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(u.doc)||!this.state.selection.eq(u.selection))&&(h=null)):this.observer.clear(),u.facet(Oe.phrases)!=this.state.facet(Oe.phrases))return this.setState(u);r=h2.create(this,u,n),r.flags|=s;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let f of n){if(c&&(c=c.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;c=new a2(d.empty?d:Tn.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(TD)&&(c=d.value)}this.viewState.update(r,c),this.bidiCache=c2.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),e=this.docView.update(r),this.state.facet(Hd)!=this.styleModules&&this.mountStyles(),l=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(e,n.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Y0)!=r.state.facet(Y0)&&(this.viewState.mustMeasureContent=!0),(e||l||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!r.empty)for(let f of this.state.facet(Jx))f(r);(a||h)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!lV(this,h)&&o.force&&Sm(this.contentDOM,o.key,o.keyCode)})}setState(n){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=n;return}this.updateState=2;let e=this.hasFocus;try{for(let l of this.plugins)l.destroy(this);this.viewState=new ZD(n),this.plugins=n.facet(Fd).map(l=>new gj(l)),this.pluginMap.clear();for(let l of this.plugins)l.update(this);this.docView=new $D(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(n){let e=n.startState.facet(Fd),l=n.state.facet(Fd);if(e!=l){let r=[];for(let u of l){let i=e.indexOf(u);if(i<0)r.push(new gj(u));else{let s=this.plugins[i];s.mustUpdate=n,r.push(s)}}for(let u of this.plugins)u.mustUpdate!=n&&u.destroy(this);this.plugins=r,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let r of this.plugins)r.mustUpdate=n;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,n&&this.observer.forceFlush();let e=null,l=this.scrollDOM,{scrollTop:r}=l,{scrollAnchorPos:u,scrollAnchorHeight:i}=this.viewState;if(this.viewState.scrollAnchorHeight=-1,i<0||r!=this.viewState.scrollTop)if(r>l.scrollHeight-l.clientHeight-4)u=-1,i=this.viewState.heightMap.height;else{let s=this.viewState.lineBlockAtHeight(r);u=s.from,i=s.top}try{for(let s=0;;s++){this.updateState=1;let a=this.viewport,o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];o&4||([this.measureRequests,h]=[h,this.measureRequests]);let c=h.map(I=>{try{return I.read(this)}catch(T){return bi(this.state,T),tM}}),f=h2.create(this,this.state,[]),d=!1,C=!1;f.flags|=o,e?e.flags|=o:e=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f));for(let I=0;I-1){let T=(u<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(u).top)-i;(T>1||T<-1)&&(l.scrollTop=r+T,C=!0)}}if(d&&this.docView.updateSelection(!0),this.viewport.from==a.from&&this.viewport.to==a.to&&!C&&this.measureRequests.length==0)break;i=-1}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let s of this.state.facet(Jx))s(e)}get themeClasses(){return nk+" "+(this.state.facet(bx)?tV:nV)+" "+this.state.facet(Y0)}updateAttrs(){let n=eM(this,MW,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(m5)?"true":"false",class:"cm-content",style:`${gt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),eM(this,bR,e);let l=this.observer.ignore(()=>{let r=Qx(this.contentDOM,this.contentAttrs,e),u=Qx(this.dom,this.editorAttrs,n);return r||u});return this.editorAttrs=n,this.contentAttrs=e,l}showAnnouncements(n){let e=!0;for(let l of n)for(let r of l.effects)if(r.is(kt.announce)){e&&(this.announceDOM.textContent=""),e=!1;let u=this.announceDOM.appendChild(document.createElement("div"));u.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Hd),Gh.mount(this.root,this.styleModules.concat(fB).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(n){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),n){if(this.measureRequests.indexOf(n)>-1)return;if(n.key!=null){for(let e=0;el.spec==n)||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}}elementAtHeight(n){return this.readMeasured(),this.viewState.elementAtHeight(n)}lineBlockAtHeight(n){return this.readMeasured(),this.viewState.lineBlockAtHeight(n)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(n){return this.viewState.lineBlockAt(n)}get contentHeight(){return this.viewState.contentHeight}moveByChar(n,e,l){return wj(this,n,zD(this,n,e,l))}moveByGroup(n,e){return wj(this,n,zD(this,n,e,l=>WK(this,n.head,l)))}moveToLineBoundary(n,e,l=!0){return LK(this,n,e,l)}moveVertically(n,e,l){return wj(this,n,VK(this,n,e,l))}domAtPos(n){return this.docView.domAtPos(n)}posAtDOM(n,e=0){return this.docView.posFromDOM(n,e)}posAtCoords(n,e=!0){return this.readMeasured(),YW(this,n,e)}coordsAtPos(n,e=1){this.readMeasured();let l=this.docView.coordsAt(n,e);if(!l||l.left==l.right)return l;let r=this.state.doc.lineAt(n),u=this.bidiSpans(r),i=u[Om.find(u,n-r.from,-1,e)];return XR(l,i.dir==Cl.LTR==e>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(n){return!this.state.facet(TW)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(n){if(n.length>jB)return LW(n.length);let e=this.textDirectionAt(n.from);for(let r of this.bidiCache)if(r.from==n.from&&r.dir==e)return r.order;let l=OK(n.text,e);return this.bidiCache.push(new c2(n.from,n.to,e,l)),l}get hasFocus(){var n;return(this.dom.ownerDocument.hasFocus()||gt.safari&&((n=this.inputState)===null||n===void 0?void 0:n.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{cW(this.contentDOM),this.docView.updateSelection()})}setRoot(n){this._root!=n&&(this._root=n,this.observer.setWindow((n.nodeType==9?n:n.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let n of this.plugins)n.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(n,e={}){return TD.of(new a2(typeof n=="number"?Tn.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}static domEventHandlers(n){return Or.define(()=>({}),{eventHandlers:n})}static theme(n,e){let l=Gh.newName(),r=[Y0.of(l),Hd.of(tk(`.${l}`,n))];return e&&e.dark&&r.push(bx.of(!0)),r}static baseTheme(n){return fg.lowest(Hd.of(tk("."+nk,n,eV)))}static findFromDOM(n){var e;let l=n.querySelector(".cm-content"),r=l&&ll.get(l)||ll.get(n);return((e=r==null?void 0:r.rootView)===null||e===void 0?void 0:e.view)||null}}kt.styleModule=Hd;kt.inputHandler=IW;kt.focusChangeEffect=_W;kt.perLineTextDirection=TW;kt.exceptionSink=PW;kt.updateListener=Jx;kt.editable=m5;kt.mouseSelectionStyle=RW;kt.dragMovesSelection=EW;kt.clickAddsSelectionRange=AW;kt.decorations=_1;kt.atomicRanges=nP;kt.scrollMargins=$W;kt.darkTheme=bx;kt.contentAttributes=bR;kt.editorAttributes=MW;kt.lineWrapping=kt.contentAttributes.of({class:"cm-lineWrapping"});kt.announce=ee.define();const jB=4096,tM={};class c2{constructor(n,e,l,r){this.from=n,this.to=e,this.dir=l,this.order=r}static update(n,e){if(e.empty)return n;let l=[],r=n.length?n[n.length-1].dir:Cl.LTR;for(let u=Math.max(0,n.length-10);u=0;r--){let u=l[r],i=typeof u=="function"?u(t):u;i&&Yx(i,e)}return e}const xB=gt.mac?"mac":gt.windows?"win":gt.linux?"linux":"key";function kB(t,n){const e=t.split(/-(?!$)/);let l=e[e.length-1];l=="Space"&&(l=" ");let r,u,i,s;for(let a=0;al.concat(r),[]))),e}function OB(t,n,e){return uV(rV(t.state),n,t,e)}let Ah=null;const CB=4e3;function AB(t,n=xB){let e=Object.create(null),l=Object.create(null),r=(i,s)=>{let a=l[i];if(a==null)l[i]=s;else if(a!=s)throw new Error("Key binding "+i+" is used both as a regular binding and as a multi-stroke prefix")},u=(i,s,a,o)=>{var h,c;let f=e[i]||(e[i]=Object.create(null)),d=s.split(/ (?!$)/).map(T=>kB(T,n));for(let T=1;T{let b=Ah={view:G,prefix:$,scope:i};return setTimeout(()=>{Ah==b&&(Ah=null)},CB),!0}]})}let C=d.join(" ");r(C,!1);let I=f[C]||(f[C]={preventDefault:!1,run:((c=(h=f._any)===null||h===void 0?void 0:h.run)===null||c===void 0?void 0:c.slice())||[]});a&&I.run.push(a),o&&(I.preventDefault=!0)};for(let i of t){let s=i.scope?i.scope.split(" "):["editor"];if(i.any)for(let o of s){let h=e[o]||(e[o]=Object.create(null));h._any||(h._any={preventDefault:!1,run:[]});for(let c in h)h[c].run.push(i.any)}let a=i[n]||i.key;if(a)for(let o of s)u(o,a,i.run,i.preventDefault),i.shift&&u(o,"Shift-"+a,i.shift,i.preventDefault)}return e}function uV(t,n,e,l){let r=sK(n),u=Jr(r,0),i=Bi(u)==r.length&&r!=" ",s="",a=!1;Ah&&Ah.view==e&&Ah.scope==l&&(s=Ah.prefix+" ",(a=GW.indexOf(n.keyCode)<0)&&(Ah=null));let o=new Set,h=C=>{if(C){for(let I of C.run)if(!o.has(I)&&(o.add(I),I(e,n)))return!0;C.preventDefault&&(a=!0)}return!1},c=t[l],f,d;if(c){if(h(c[s+Q0(r,n,!i)]))return!0;if(i&&(n.altKey||n.metaKey||n.ctrlKey)&&!(gt.windows&&n.ctrlKey&&n.altKey)&&(f=Jh[n.keyCode])&&f!=r){if(h(c[s+Q0(f,n,!0)]))return!0;if(n.shiftKey&&(d=P1[n.keyCode])!=r&&d!=f&&h(c[s+Q0(d,n,!1)]))return!0}else if(i&&n.shiftKey&&h(c[s+Q0(r,n,!0)]))return!0;if(h(c._any))return!0}return a}class Tp{constructor(n,e,l,r,u){this.className=n,this.left=e,this.top=l,this.width=r,this.height=u}draw(){let n=document.createElement("div");return n.className=this.className,this.adjust(n),n}update(n,e){return e.className!=this.className?!1:(this.adjust(n),!0)}adjust(n){n.style.left=this.left+"px",n.style.top=this.top+"px",this.width!=null&&(n.style.width=this.width+"px"),n.style.height=this.height+"px"}eq(n){return this.left==n.left&&this.top==n.top&&this.width==n.width&&this.height==n.height&&this.className==n.className}static forRange(n,e,l){if(l.empty){let r=n.coordsAtPos(l.head,l.assoc||1);if(!r)return[];let u=iV(n);return[new Tp(e,r.left-u.left,r.top-u.top,null,r.bottom-r.top)]}else return EB(n,e,l)}}function iV(t){let n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Cl.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function rM(t,n,e){let l=Tn.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(l,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(l,!0,!0).from),type:El.Text}}function EB(t,n,e){if(e.to<=t.viewport.from||e.from>=t.viewport.to)return[];let l=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),u=t.textDirection==Cl.LTR,i=t.contentDOM,s=i.getBoundingClientRect(),a=iV(t),o=i.querySelector(".cm-line"),h=o&&window.getComputedStyle(o),c=s.left+(h?parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)):0),f=s.right-(h?parseInt(h.paddingRight):0),d=Fx(t,l),C=Fx(t,r),I=d.type==El.Text?d:null,T=C.type==El.Text?C:null;if(I&&(t.lineWrapping||d.widgetLineBreaks)&&(I=rM(t,l,I)),T&&(t.lineWrapping||C.widgetLineBreaks)&&(T=rM(t,r,T)),I&&T&&I.from==T.from)return G(b(e.from,e.to,I));{let ln=I?b(e.from,null,I):en(d,!1),B=T?b(null,e.to,T):en(C,!0),O=[];return(I||d).to<(T||C).from-(I&&T?1:0)||d.widgetLineBreaks>1&&ln.bottom+t.defaultLineHeight/2Z&&tn.from=hn)break;yn>sn&&_(Math.max(pn,sn),ln==null&&pn<=Z,Math.min(yn,hn),B==null&&yn>=nn,wn.dir)}if(sn=mn.to+1,sn>=hn)break}return R.length==0&&_(Z,ln==null,nn,B==null,t.textDirection),{top:k,bottom:H,horizontal:R}}function en(ln,B){let O=s.top+(B?ln.top:ln.bottom);return{top:O,bottom:O,horizontal:[]}}}function RB(t,n){return t.constructor==n.constructor&&t.eq(n)}class PB{constructor(n,e){this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.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.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}update(n){n.startState.facet(Iv)!=n.state.facet(Iv)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}setOrder(n){let e=0,l=n.facet(Iv);for(;e!RB(e,this.drawn[l]))){let e=this.dom.firstChild,l=0;for(let r of n)r.update&&e&&r.constructor&&this.drawn[l].constructor&&r.update(e,this.drawn[l])?(e=e.nextSibling,l++):this.dom.insertBefore(r.draw(),e);for(;e;){let r=e.nextSibling;e.remove(),e=r}this.drawn=n}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Iv=dt.define();function sV(t){return[Or.define(n=>new PB(n,t)),Iv.of(t)]}const oV=!gt.ios,T1=dt.define({combine(t){return Wo(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(n,e)=>Math.min(n,e),drawRangeCursor:(n,e)=>n||e})}});function IB(t={}){return[T1.of(t),_B,TB,DB,DW.of(!0)]}function aV(t){return t.startState.facet(T1)!=t.state.facet(T1)}const _B=sV({above:!0,markers(t){let{state:n}=t,e=n.facet(T1),l=[];for(let r of n.selection.ranges){let u=r==n.selection.main;if(r.empty?!u||oV:e.drawRangeCursor){let i=u?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=r.empty?r:Tn.cursor(r.head,r.head>r.anchor?-1:1);for(let a of Tp.forRange(t,i,s))l.push(a)}}return l},update(t,n){t.transactions.some(l=>l.selection)&&(n.style.animationName=n.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let e=aV(t);return e&&uM(t.state,n),t.docChanged||t.selectionSet||e},mount(t,n){uM(n.state,t)},class:"cm-cursorLayer"});function uM(t,n){n.style.animationDuration=t.facet(T1).cursorBlinkRate+"ms"}const TB=sV({above:!1,markers(t){return t.state.selection.ranges.map(n=>n.empty?[]:Tp.forRange(t,"cm-selectionBackground",n)).reduce((n,e)=>n.concat(e))},update(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||aV(t)},class:"cm-selectionLayer"}),hV={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};oV&&(hV[".cm-line"].caretColor="transparent !important");const DB=fg.highest(kt.theme(hV)),cV=ee.define({map(t,n){return t==null?null:n.mapPos(t)}}),bd=eu.define({create(){return null},update(t,n){return t!=null&&(t=n.changes.mapPos(t)),n.effects.reduce((e,l)=>l.is(cV)?l.value:e,t)}}),MB=Or.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 n;let e=t.state.field(bd);e==null?this.cursor!=null&&((n=this.cursor)===null||n===void 0||n.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(bd)!=e||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let t=this.view.state.field(bd),n=t!=null&&this.view.coordsAtPos(t);if(!n)return null;let e=this.view.scrollDOM.getBoundingClientRect();return{left:n.left-e.left+this.view.scrollDOM.scrollLeft,top:n.top-e.top+this.view.scrollDOM.scrollTop,height:n.bottom-n.top}}drawCursor(t){this.cursor&&(t?(this.cursor.style.left=t.left+"px",this.cursor.style.top=t.top+"px",this.cursor.style.height=t.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(bd)!=t&&this.view.dispatch({effects:cV.of(t)})}},{eventHandlers:{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 $B(){return[bd,MB]}function iM(t,n,e,l,r){n.lastIndex=0;for(let u=t.iterRange(e,l),i=e,s;!u.next().done;i+=u.value.length)if(!u.lineBreak)for(;s=n.exec(u.value);)r(i+s.index,s)}function NB(t,n){let e=t.visibleRanges;if(e.length==1&&e[0].from==t.viewport.from&&e[0].to==t.viewport.to)return e;let l=[];for(let{from:r,to:u}of e)r=Math.max(t.state.doc.lineAt(r).from,r-n),u=Math.min(t.state.doc.lineAt(u).to,u+n),l.length&&l[l.length-1].to>=r?l[l.length-1].to=u:l.push({from:r,to:u});return l}class qB{constructor(n){const{regexp:e,decoration:l,decorate:r,boundary:u,maxLength:i=1e3}=n;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=(s,a,o,h)=>r(h,o,o+s[0].length,s,a);else if(typeof l=="function")this.addMatch=(s,a,o,h)=>{let c=l(s,a,o);c&&h(o,o+s[0].length,c)};else if(l)this.addMatch=(s,a,o,h)=>h(o,o+s[0].length,l);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=u,this.maxLength=i}createDeco(n){let e=new Qh,l=e.add.bind(e);for(let{from:r,to:u}of NB(n,this.maxLength))iM(n.state.doc,this.regexp,r,u,(i,s)=>this.addMatch(s,n,i,l));return e.finish()}updateDeco(n,e){let l=1e9,r=-1;return n.docChanged&&n.changes.iterChanges((u,i,s,a)=>{a>n.view.viewport.from&&s1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),l,r):e}updateRange(n,e,l,r){for(let u of n.visibleRanges){let i=Math.max(u.from,l),s=Math.min(u.to,r);if(s>i){let a=n.state.doc.lineAt(i),o=a.toa.from;i--)if(this.boundary.test(a.text[i-1-a.from])){h=i;break}for(;sf.push($.range(I,T));if(a==o)for(this.regexp.lastIndex=h-a.from;(d=this.regexp.exec(a.text))&&d.indexthis.addMatch(T,n,I,C));e=e.update({filterFrom:h,filterTo:c,filter:(I,T)=>Ic,add:f})}}return e}}const ek=/x/.unicode!=null?"gu":"g",LB=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,ek),WB={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 vj=null;function VB(){var t;if(vj==null&&typeof document<"u"&&document.body){let n=document.body.style;vj=((t=n.tabSize)!==null&&t!==void 0?t:n.MozTabSize)!=null}return vj||!1}const _v=dt.define({combine(t){let n=Wo(t,{render:null,specialChars:LB,addSpecialChars:null});return(n.replaceTabs=!VB())&&(n.specialChars=new RegExp(" |"+n.specialChars.source,ek)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,ek)),n}});function zB(t={}){return[_v.of(t),UB()]}let sM=null;function UB(){return sM||(sM=Or.fromClass(class{constructor(t){this.view=t,this.decorations=Tt.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(_v)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new qB({regexp:t.specialChars,decoration:(n,e,l)=>{let{doc:r}=e.state,u=Jr(n[0],0);if(u==9){let i=r.lineAt(l),s=e.state.tabSize,a=Ip(i.text,s,l-i.from);return Tt.replace({widget:new JB((s-a%s)*this.view.defaultCharacterWidth)})}return this.decorationCache[u]||(this.decorationCache[u]=Tt.replace({widget:new GB(t,u)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let n=t.state.facet(_v);t.startState.facet(_v)!=n?(this.decorator=this.makeDecorator(n),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const YB="•";function QB(t){return t>=32?YB:t==10?"␤":String.fromCharCode(9216+t)}class GB extends Ic{constructor(n,e){super(),this.options=n,this.code=e}eq(n){return n.code==this.code}toDOM(n){let e=QB(this.code),l=n.state.phrase("Control character")+" "+(WB[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,l,e);if(r)return r;let u=document.createElement("span");return u.textContent=e,u.title=l,u.setAttribute("aria-label",l),u.className="cm-specialChar",u}ignoreEvent(){return!1}}class JB extends Ic{constructor(n){super(),this.width=n}eq(n){return n.width==this.width}toDOM(){let n=document.createElement("span");return n.textContent=" ",n.className="cm-tab",n.style.width=this.width+"px",n}ignoreEvent(){return!1}}function KB(){return XB}const BB=Tt.line({class:"cm-activeLine"}),XB=Or.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let n=-1,e=[];for(let l of t.state.selection.ranges){let r=t.lineBlockAt(l.head);r.from>n&&(e.push(BB.range(r.from)),n=r.from)}return Tt.set(e)}},{decorations:t=>t.decorations}),lk=2e3;function FB(t,n,e){let l=Math.min(n.line,e.line),r=Math.max(n.line,e.line),u=[];if(n.off>lk||e.off>lk||n.col<0||e.col<0){let i=Math.min(n.off,e.off),s=Math.max(n.off,e.off);for(let a=l;a<=r;a++){let o=t.doc.line(a);o.length<=s&&u.push(Tn.range(o.from+i,o.to+s))}}else{let i=Math.min(n.col,e.col),s=Math.max(n.col,e.col);for(let a=l;a<=r;a++){let o=t.doc.line(a),h=$x(o.text,i,t.tabSize,!0);if(h<0)u.push(Tn.cursor(o.to));else{let c=$x(o.text,s,t.tabSize);u.push(Tn.range(o.from+h,o.from+c))}}}return u}function HB(t,n){let e=t.coordsAtPos(t.viewport.from);return e?Math.round(Math.abs((e.left-n)/t.defaultCharacterWidth)):-1}function oM(t,n){let e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),l=t.state.doc.lineAt(e),r=e-l.from,u=r>lk?-1:r==l.length?HB(t,n.clientX):Ip(l.text,t.state.tabSize,e-l.from);return{line:l.number,col:u,off:r}}function ZB(t,n){let e=oM(t,n),l=t.state.selection;return e?{update(r){if(r.docChanged){let u=r.changes.mapPos(r.startState.doc.line(e.line).from),i=r.state.doc.lineAt(u);e={line:i.number,col:e.col,off:Math.min(e.off,i.length)},l=l.map(r.changes)}},get(r,u,i){let s=oM(t,r);if(!s)return l;let a=FB(t.state,e,s);return a.length?i?Tn.create(a.concat(l.ranges)):Tn.create(a):l}}:null}function bB(t){let n=(t==null?void 0:t.eventFilter)||(e=>e.altKey&&e.button==0);return kt.mouseSelectionStyle.of((e,l)=>n(l)?ZB(e,l):null)}const nX={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},tX={style:"cursor: crosshair"};function eX(t={}){let[n,e]=nX[t.key||"Alt"],l=Or.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventHandlers:{keydown(r){this.set(r.keyCode==n||e(r))},keyup(r){(r.keyCode==n||!e(r))&&this.set(!1)},mousemove(r){this.set(e(r))}}});return[l,kt.contentAttributes.of(r=>{var u;return!((u=r.plugin(l))===null||u===void 0)&&u.isDown?tX:null})]}const G0="-10000px";class fV{constructor(n,e,l){this.facet=e,this.createTooltipView=l,this.input=n.state.facet(e),this.tooltips=this.input.filter(r=>r),this.tooltipViews=this.tooltips.map(l)}update(n){var e;let l=n.state.facet(this.facet),r=l.filter(i=>i);if(l===this.input){for(let i of this.tooltipViews)i.update&&i.update(n);return!1}let u=[];for(let i=0;i{var n,e,l;return{position:gt.ios?"absolute":((n=t.find(r=>r.position))===null||n===void 0?void 0:n.position)||"fixed",parent:((e=t.find(r=>r.parent))===null||e===void 0?void 0:e.parent)||null,tooltipSpace:((l=t.find(r=>r.tooltipSpace))===null||l===void 0?void 0:l.tooltipSpace)||lX}}}),aM=new WeakMap,gV=Or.fromClass(class{constructor(t){this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let n=t.state.facet(yj);this.position=n.position,this.parent=n.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new fV(t,eP,e=>this.createTooltip(e)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.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 n=this.manager.update(t);n&&this.observeIntersection();let e=n||t.geometryChanged,l=t.state.facet(yj);if(l.position!=this.position){this.position=l.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;e=!0}if(l.parent!=this.parent){this.parent&&this.container.remove(),this.parent=l.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);e=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);e&&this.maybeMeasure()}createTooltip(t){let n=t.create(this.view);if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=G0,this.container.appendChild(n.dom),n.mount&&n.mount(this.view),n}destroy(){var t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),(t=e.destroy)===null||t===void 0||t.call(e);(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((n,e)=>{let l=this.manager.tooltipViews[e];return l.getCoords?l.getCoords(n.pos):this.view.coordsAtPos(n.pos)}),size:this.manager.tooltipViews.map(({dom:n})=>n.getBoundingClientRect()),space:this.view.state.facet(yj).tooltipSpace(this.view)}}writeMeasure(t){var n;let{editor:e,space:l}=t,r=[];for(let u=0;u=Math.min(e.bottom,l.bottom)||o.rightMath.min(e.right,l.right)+.1){a.style.top=G0;continue}let c=i.arrow?s.dom.querySelector(".cm-tooltip-arrow"):null,f=c?7:0,d=h.right-h.left,C=(n=aM.get(s))!==null&&n!==void 0?n:h.bottom-h.top,I=s.offset||uX,T=this.view.textDirection==Cl.LTR,$=h.width>l.right-l.left?T?l.left:l.right-h.width:T?Math.min(o.left-(c?14:0)+I.x,l.right-d):Math.max(l.left,o.left-d+(c?14:0)-I.x),G=!!i.above;!i.strictSide&&(G?o.top-(h.bottom-h.top)-I.yl.bottom)&&G==l.bottom-o.bottom>o.top-l.top&&(G=!G);let b=(G?o.top-l.top:l.bottom-o.bottom)-f;if(b$&&B.topen&&(en=G?B.top-C-2-f:B.bottom+f+2);this.position=="absolute"?(a.style.top=en-t.parent.top+"px",a.style.left=$-t.parent.left+"px"):(a.style.top=en+"px",a.style.left=$+"px"),c&&(c.style.left=`${o.left+(T?I.x:-I.x)-($+14-7)}px`),s.overlap!==!0&&r.push({left:$,top:en,right:ln,bottom:en+C}),a.classList.toggle("cm-tooltip-above",G),a.classList.toggle("cm-tooltip-below",!G),s.positioned&&s.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=G0}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),rX=kt.baseTheme({".cm-tooltip":{zIndex:100,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:`${7*2}px`,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"}}}),uX={x:0,y:0},eP=dt.define({enables:[gV,rX]}),f2=dt.define();class lP{constructor(n){this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new fV(n,f2,e=>this.createHostedView(e))}static create(n){return new lP(n)}createHostedView(n){let e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}mount(n){for(let e of this.manager.tooltipViews)e.mount&&e.mount(n);this.mounted=!0}positioned(n){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(n)}update(n){this.manager.update(n)}destroy(){var n;for(let e of this.manager.tooltipViews)(n=e.destroy)===null||n===void 0||n.call(e)}}const iX=eP.compute([f2],t=>{let n=t.facet(f2).filter(e=>e);return n.length===0?null:{pos:Math.min(...n.map(e=>e.pos)),end:Math.max(...n.filter(e=>e.end!=null).map(e=>e.end)),create:lP.create,above:n[0].above,arrow:n.some(e=>e.arrow)}});class sX{constructor(n,e,l,r,u){this.view=n,this.source=e,this.field=l,this.setHover=r,this.hoverTime=u,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.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)return;let n=Date.now()-this.lastMove.time;nl.bottom||n.xl.right+this.view.defaultCharacterWidth)return;let r=this.view.bidiSpans(this.view.state.doc.lineAt(e)).find(s=>s.from<=e&&s.to>=e),u=r&&r.dir==Cl.RTL?-1:1,i=this.source(this.view,e,n.x{this.pending==s&&(this.pending=null,a&&this.view.dispatch({effects:this.setHover.of(a)}))},a=>bi(this.view.state,a,"hover tooltip"))}else i&&this.view.dispatch({effects:this.setHover.of(i)})}mousemove(n){var e;this.lastMove={x:n.clientX,y:n.clientY,target:n.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let l=this.active;if(l&&!hM(this.lastMove.target)||this.pending){let{pos:r}=l||this.pending,u=(e=l==null?void 0:l.end)!==null&&e!==void 0?e:r;(r==u?this.view.posAtCoords(this.lastMove)!=r:!oX(this.view,r,u,n.clientX,n.clientY,6))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(n){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!hM(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function hM(t){for(let n=t;n;n=n.parentNode)if(n.nodeType==1&&n.classList.contains("cm-tooltip"))return!0;return!1}function oX(t,n,e,l,r,u){let i=document.createRange(),s=t.domAtPos(n),a=t.domAtPos(e);i.setEnd(a.node,a.offset),i.setStart(s.node,s.offset);let o=i.getClientRects();i.detach();for(let h=0;hf2.from(r)});return[l,Or.define(r=>new sX(r,t,l,e,n.hoverTime||300)),iX]}function mV(t,n){let e=t.plugin(gV);if(!e)return null;let l=e.manager.tooltips.indexOf(n);return l<0?null:e.manager.tooltipViews[l]}const hX=ee.define(),cM=dt.define({combine(t){let n,e;for(let l of t)n=n||l.topContainer,e=e||l.bottomContainer;return{topContainer:n,bottomContainer:e}}});function D1(t,n){let e=t.plugin(wV),l=e?e.specs.indexOf(n):-1;return l>-1?e.panels[l]:null}const wV=Or.fromClass(class{constructor(t){this.input=t.state.facet(M1),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(e=>e(t));let n=t.state.facet(cM);this.top=new J0(t,!0,n.topContainer),this.bottom=new J0(t,!1,n.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(t){let n=t.state.facet(cM);this.top.container!=n.topContainer&&(this.top.sync([]),this.top=new J0(t.view,!0,n.topContainer)),this.bottom.container!=n.bottomContainer&&(this.bottom.sync([]),this.bottom=new J0(t.view,!1,n.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let e=t.state.facet(M1);if(e!=this.input){let l=e.filter(a=>a),r=[],u=[],i=[],s=[];for(let a of l){let o=this.specs.indexOf(a),h;o<0?(h=a(t.view),s.push(h)):(h=this.panels[o],h.update&&h.update(t)),r.push(h),(h.top?u:i).push(h)}this.specs=l,this.panels=r,this.top.sync(u),this.bottom.sync(i);for(let a of s)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let l of this.panels)l.update&&l.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>kt.scrollMargins.of(n=>{let e=n.plugin(t);return e&&{top:e.top.scrollMargin(),bottom:e.bottom.scrollMargin()}})});class J0{constructor(n,e,l){this.view=n,this.top=e,this.container=l,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(n){for(let e of this.panels)e.destroy&&n.indexOf(e)<0&&e.destroy();this.panels=n,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}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 e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let n=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;n!=e.dom;)n=fM(n);n=n.nextSibling}else this.dom.insertBefore(e.dom,n);for(;n;)n=fM(n)}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 n of this.classes.split(" "))n&&this.container.classList.remove(n);for(let n of(this.classes=this.view.themeClasses).split(" "))n&&this.container.classList.add(n)}}}function fM(t){let n=t.nextSibling;return t.remove(),n}const M1=dt.define({enables:wV});class Da extends Rf{compare(n){return this==n||this.constructor==n.constructor&&this.eq(n)}eq(n){return!1}destroy(n){}}Da.prototype.elementClass="";Da.prototype.toDOM=void 0;Da.prototype.mapMode=ku.TrackBefore;Da.prototype.startSide=Da.prototype.endSide=-1;Da.prototype.point=!0;const Tv=dt.define(),cX={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>We.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},w1=dt.define();function fX(t){return[dV(),w1.of(Object.assign(Object.assign({},cX),t))]}const rk=dt.define({combine:t=>t.some(n=>n)});function dV(t){let n=[gX];return t&&t.fixed===!1&&n.push(rk.of(!0)),n}const gX=Or.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(w1).map(n=>new mM(t,n));for(let n of this.gutters)this.dom.appendChild(n.dom);this.fixed=!t.state.facet(rk),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let n=this.prevViewport,e=t.view.viewport,l=Math.min(n.to,e.to)-Math.max(n.from,e.from);this.syncGutters(l<(e.to-e.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(rk)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let n=this.dom.nextSibling;t&&this.dom.remove();let e=We.iter(this.view.state.facet(Tv),this.view.viewport.from),l=[],r=this.gutters.map(u=>new mX(u,this.view.viewport,-this.view.documentPadding.top));for(let u of this.view.viewportLineBlocks)if(l.length&&(l=[]),Array.isArray(u.type)){let i=!0;for(let s of u.type)if(s.type==El.Text&&i){uk(e,l,s.from);for(let a of r)a.line(this.view,s,l);i=!1}else if(s.widget)for(let a of r)a.widget(this.view,s)}else if(u.type==El.Text){uk(e,l,u.from);for(let i of r)i.line(this.view,u,l)}for(let u of r)u.finish();t&&this.view.scrollDOM.insertBefore(this.dom,n)}updateGutters(t){let n=t.startState.facet(w1),e=t.state.facet(w1),l=t.docChanged||t.heightChanged||t.viewportChanged||!We.eq(t.startState.facet(Tv),t.state.facet(Tv),t.view.viewport.from,t.view.viewport.to);if(n==e)for(let r of this.gutters)r.update(t)&&(l=!0);else{l=!0;let r=[];for(let u of e){let i=n.indexOf(u);i<0?r.push(new mM(this.view,u)):(this.gutters[i].update(t),r.push(this.gutters[i]))}for(let u of this.gutters)u.dom.remove(),r.indexOf(u)<0&&u.destroy();for(let u of r)this.dom.appendChild(u.dom);this.gutters=r}return l}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>kt.scrollMargins.of(n=>{let e=n.plugin(t);return!e||e.gutters.length==0||!e.fixed?null:n.textDirection==Cl.LTR?{left:e.dom.offsetWidth}:{right:e.dom.offsetWidth}})});function gM(t){return Array.isArray(t)?t:[t]}function uk(t,n,e){for(;t.value&&t.from<=e;)t.from==e&&n.push(t.value),t.next()}class mX{constructor(n,e,l){this.gutter=n,this.height=l,this.i=0,this.cursor=We.iter(n.markers,e.from)}addElement(n,e,l){let{gutter:r}=this,u=e.top-this.height;if(this.i==r.elements.length){let i=new pV(n,e.height,u,l);r.elements.push(i),r.dom.appendChild(i.dom)}else r.elements[this.i].update(n,e.height,u,l);this.height=e.bottom,this.i++}line(n,e,l){let r=[];uk(this.cursor,r,e.from),l.length&&(r=r.concat(l));let u=this.gutter.config.lineMarker(n,e,r);u&&r.unshift(u);let i=this.gutter;r.length==0&&!i.config.renderEmptyElements||this.addElement(n,e,r)}widget(n,e){let l=this.gutter.config.widgetMarker(n,e.widget,e);l&&this.addElement(n,e,[l])}finish(){let n=this.gutter;for(;n.elements.length>this.i;){let e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}class mM{constructor(n,e){this.view=n,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 l in e.domEventHandlers)this.dom.addEventListener(l,r=>{let u=r.target,i;if(u!=this.dom&&this.dom.contains(u)){for(;u.parentNode!=this.dom;)u=u.parentNode;let a=u.getBoundingClientRect();i=(a.top+a.bottom)/2}else i=r.clientY;let s=n.lineBlockAtHeight(i-n.documentTop);e.domEventHandlers[l](n,s,r)&&r.preventDefault()});this.markers=gM(e.markers(n)),e.initialSpacer&&(this.spacer=new pV(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(n){let e=this.markers;if(this.markers=gM(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],n);r!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[r])}let l=n.view.viewport;return!We.eq(this.markers,e,l.from,l.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(n):!1)}destroy(){for(let n of this.elements)n.destroy()}}class pV{constructor(n,e,l,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,l,r)}update(n,e,l,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=l&&(this.dom.style.marginTop=(this.above=l)?l+"px":""),wX(this.markers,r)||this.setMarkers(n,r)}setMarkers(n,e){let l="cm-gutterElement",r=this.dom.firstChild;for(let u=0,i=0;;){let s=i,a=uu(s,a,o)||i(s,a,o):i}return l}})}});class jj extends Da{constructor(n){super(),this.number=n}eq(n){return this.number==n.number}toDOM(){return document.createTextNode(this.number)}}function xj(t,n){return t.state.facet(cm).formatNumber(n,t.state)}const pX=w1.compute([cm],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(n){return n.state.facet(dX)},lineMarker(n,e,l){return l.some(r=>r.toDOM)?null:new jj(xj(n,n.state.doc.lineAt(e.from).number))},widgetMarker:()=>null,lineMarkerChange:n=>n.startState.facet(cm)!=n.state.facet(cm),initialSpacer(n){return new jj(xj(n,wM(n.state.doc.lines)))},updateSpacer(n,e){let l=xj(e.view,wM(e.view.state.doc.lines));return l==n.number?n:new jj(l)},domEventHandlers:t.facet(cm).domEventHandlers}));function vX(t={}){return[cm.of(t),dV(),pX]}function wM(t){let n=9;for(;n{let n=[],e=-1;for(let l of t.selection.ranges){let r=t.doc.lineAt(l.head).from;r>e&&(e=r,n.push(yX.range(r)))}return We.of(n)});function xX(){return jX}const vV=1024;let kX=0;class kj{constructor(n,e){this.from=n,this.to=e}}class le{constructor(n={}){this.id=kX++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(n){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof n!="function"&&(n=ti.match(n)),e=>{let l=n(e);return l===void 0?null:[this,l]}}}le.closedBy=new le({deserialize:t=>t.split(" ")});le.openedBy=new le({deserialize:t=>t.split(" ")});le.group=new le({deserialize:t=>t.split(" ")});le.contextHash=new le({perNode:!0});le.lookAhead=new le({perNode:!0});le.mounted=new le({perNode:!0});const SX=Object.create(null);class ti{constructor(n,e,l,r=0){this.name=n,this.props=e,this.id=l,this.flags=r}static define(n){let e=n.props&&n.props.length?Object.create(null):SX,l=(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(n.name==null?8:0),r=new ti(n.name||"",e,n.id,l);if(n.props){for(let u of n.props)if(Array.isArray(u)||(u=u(r)),u){if(u[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[u[0].id]=u[1]}}return r}prop(n){return this.props[n.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(n){if(typeof n=="string"){if(this.name==n)return!0;let e=this.prop(le.group);return e?e.indexOf(n)>-1:!1}return this.id==n}static match(n){let e=Object.create(null);for(let l in n)for(let r of l.split(" "))e[r]=n[l];return l=>{for(let r=l.prop(le.group),u=-1;u<(r?r.length:0);u++){let i=e[u<0?l.name:r[u]];if(i)return i}}}}ti.none=new ti("",Object.create(null),0,8);class rP{constructor(n){this.types=n;for(let e=0;e0;for(let a=this.cursor(i|Dr.IncludeAnonymous);;){let o=!1;if(a.from<=u&&a.to>=r&&(!s&&a.type.isAnonymous||e(a)!==!1)){if(a.firstChild())continue;o=!0}for(;o&&l&&(s||!a.type.isAnonymous)&&l(a),!a.nextSibling();){if(!a.parent())return;o=!0}}}prop(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}get propValues(){let n=[];if(this.props)for(let e in this.props)n.push([+e,this.props[e]]);return n}balance(n={}){return this.children.length<=8?this:sP(ti.none,this.children,this.positions,0,this.children.length,0,this.length,(e,l,r)=>new lr(this.type,e,l,r,this.propValues),n.makeTree||((e,l,r)=>new lr(ti.none,e,l,r)))}static build(n){return CX(n)}}lr.empty=new lr(ti.none,[],[],0);class uP{constructor(n,e){this.buffer=n,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 uP(this.buffer,this.index)}}class gg{constructor(n,e,l){this.buffer=n,this.length=e,this.set=l}get type(){return ti.none}toString(){let n=[];for(let e=0;e0));a=i[a+3]);return s}slice(n,e,l){let r=this.buffer,u=new Uint16Array(e-n),i=0;for(let s=n,a=0;s=n&&en;case 1:return e<=n&&l>n;case 2:return l>n;case 4:return!0}}function jV(t,n){let e=t.childBefore(n);for(;e;){let l=e.lastChild;if(!l||l.to!=e.to)break;l.type.isError&&l.from==l.to?(t=e,e=l.prevSibling):e=l}return t}function ew(t,n,e,l){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to0?s.length:-1;n!=o;n+=e){let h=s[n],c=a[n]+i.from;if(yV(r,l,c,c+h.length)){if(h instanceof gg){if(u&Dr.ExcludeBuffers)continue;let f=h.findChild(0,h.buffer.length,e,l-c,r);if(f>-1)return new Ih(new OX(i,h,n,c),null,f)}else if(u&Dr.IncludeAnonymous||!h.type.isAnonymous||iP(h)){let f;if(!(u&Dr.IgnoreMounts)&&h.props&&(f=h.prop(le.mounted))&&!f.overlay)return new Sa(f.tree,c,n,i);let d=new Sa(h,c,n,i);return u&Dr.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(e<0?h.children.length-1:0,e,l,r)}}}if(u&Dr.IncludeAnonymous||!i.type.isAnonymous||(i.index>=0?n=i.index+e:n=e<0?-1:i._parent._tree.children.length,i=i._parent,!i))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(n){return this.nextChild(0,1,n,2)}childBefore(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}enter(n,e,l=0){let r;if(!(l&Dr.IgnoreOverlays)&&(r=this._tree.prop(le.mounted))&&r.overlay){let u=n-this.from;for(let{from:i,to:s}of r.overlay)if((e>0?i<=u:i=u:s>u))return new Sa(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,n,e,l)}nextSignificantParent(){let n=this;for(;n.type.isAnonymous&&n._parent;)n=n._parent;return n}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}cursor(n=0){return new w2(this,n)}get tree(){return this._tree}toTree(){return this._tree}resolve(n,e=0){return ew(this,n,e,!1)}resolveInner(n,e=0){return ew(this,n,e,!0)}enterUnfinishedNodesBefore(n){return jV(this,n)}getChild(n,e=null,l=null){let r=g2(this,n,e,l);return r.length?r[0]:null}getChildren(n,e=null,l=null){return g2(this,n,e,l)}toString(){return this._tree.toString()}get node(){return this}matchContext(n){return m2(this,n)}}function g2(t,n,e,l){let r=t.cursor(),u=[];if(!r.firstChild())return u;if(e!=null){for(;!r.type.is(e);)if(!r.nextSibling())return u}for(;;){if(l!=null&&r.type.is(l))return u;if(r.type.is(n)&&u.push(r.node),!r.nextSibling())return l==null?u:[]}}function m2(t,n,e=n.length-1){for(let l=t.parent;e>=0;l=l.parent){if(!l)return!1;if(!l.type.isAnonymous){if(n[e]&&n[e]!=l.name)return!1;e--}}return!0}class OX{constructor(n,e,l,r){this.parent=n,this.buffer=e,this.index=l,this.start=r}}class Ih{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(n,e,l){this.context=n,this._parent=e,this.index=l,this.type=n.buffer.set.types[n.buffer.buffer[l]]}child(n,e,l){let{buffer:r}=this.context,u=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,l);return u<0?null:new Ih(this.context,this,u)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(n){return this.child(1,n,2)}childBefore(n){return this.child(-1,n,-2)}enter(n,e,l=0){if(l&Dr.ExcludeBuffers)return null;let{buffer:r}=this.context,u=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);return u<0?null:new Ih(this.context,this,u)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}get nextSibling(){let{buffer:n}=this.context,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new Ih(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:n}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Ih(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}cursor(n=0){return new w2(this,n)}get tree(){return null}toTree(){let n=[],e=[],{buffer:l}=this.context,r=this.index+4,u=l.buffer[this.index+3];if(u>r){let i=l.buffer[this.index+1];n.push(l.slice(r,u,i)),e.push(0)}return new lr(this.type,n,e,this.to-this.from)}resolve(n,e=0){return ew(this,n,e,!1)}resolveInner(n,e=0){return ew(this,n,e,!0)}enterUnfinishedNodesBefore(n){return jV(this,n)}toString(){return this.context.buffer.childString(this.index)}getChild(n,e=null,l=null){let r=g2(this,n,e,l);return r.length?r[0]:null}getChildren(n,e=null,l=null){return g2(this,n,e,l)}get node(){return this}matchContext(n){return m2(this,n)}}class w2{get name(){return this.type.name}constructor(n,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof Sa)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(let l=n._parent;l;l=l._parent)this.stack.unshift(l.index);this.bufferNode=n,this.yieldBuf(n.index)}}yieldNode(n){return n?(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0):!1}yieldBuf(n,e){this.index=n;let{start:l,buffer:r}=this.buffer;return this.type=e||r.set.types[r.buffer[n]],this.from=l+r.buffer[n+1],this.to=l+r.buffer[n+2],!0}yield(n){return n?n instanceof Sa?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(n,e,l){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,l,this.mode));let{buffer:r}=this.buffer,u=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,l);return u<0?!1:(this.stack.push(this.index),this.yieldBuf(u))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(n){return this.enterChild(1,n,2)}childBefore(n){return this.enterChild(-1,n,-2)}enter(n,e,l=this.mode){return this.buffer?l&Dr.ExcludeBuffers?!1:this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,l))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Dr.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let n=this.mode&Dr.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}sibling(n){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode)):!1;let{buffer:e}=this.buffer,l=this.stack.length-1;if(n<0){let r=l<0?0:this.stack[l]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{let r=e.buffer[this.index+3];if(r<(l<0?e.buffer.length:e.buffer[this.stack[l]+3]))return this.yieldBuf(r)}return l<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(n){let e,l,{buffer:r}=this;if(r){if(n>0){if(this.index-1)for(let u=e+n,i=n<0?-1:l._tree.children.length;u!=i;u+=n){let s=l._tree.children[u];if(this.mode&Dr.IncludeAnonymous||s instanceof gg||!s.type.isAnonymous||iP(s))return!1}return!0}move(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}next(n=!0){return this.move(1,n)}prev(n=!0){return this.move(-1,n)}moveTo(n,e=0){for(;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(let i=n;i;i=i._parent)if(i.index==r){if(r==this.index)return i;e=i,l=u+1;break n}r=this.stack[--u]}for(let r=l;r=0;u--){if(u<0)return m2(this.node,n,r);let i=l[e.buffer[this.stack[u]]];if(!i.isAnonymous){if(n[r]&&n[r]!=i.name)return!1;r--}}return!0}}function iP(t){return t.children.some(n=>n instanceof gg||!n.type.isAnonymous||iP(n))}function CX(t){var n;let{buffer:e,nodeSet:l,maxBufferLength:r=vV,reused:u=[],minRepeatType:i=l.types.length}=t,s=Array.isArray(e)?new uP(e,e.length):e,a=l.types,o=0,h=0;function c(en,ln,B,O,k){let{id:H,start:R,end:_,size:Z}=s,nn=h;for(;Z<0;)if(s.next(),Z==-1){let wn=u[H];B.push(wn),O.push(R-en);return}else if(Z==-3){o=H;return}else if(Z==-4){h=H;return}else throw new RangeError(`Unrecognized record size: ${Z}`);let tn=a[H],sn,hn,mn=R-en;if(_-R<=r&&(hn=I(s.pos-ln,k))){let wn=new Uint16Array(hn.size-hn.skip),pn=s.pos-hn.size,yn=wn.length;for(;s.pos>pn;)yn=T(hn.start,wn,yn);sn=new gg(wn,_-hn.start,l),mn=hn.start-en}else{let wn=s.pos-Z;s.next();let pn=[],yn=[],An=H>=i?H:-1,jn=0,Sn=_;for(;s.pos>wn;)An>=0&&s.id==An&&s.size>=0?(s.end<=Sn-r&&(d(pn,yn,R,jn,s.end,Sn,An,nn),jn=pn.length,Sn=s.end),s.next()):c(R,wn,pn,yn,An);if(An>=0&&jn>0&&jn-1&&jn>0){let Pn=f(tn);sn=sP(tn,pn,yn,0,pn.length,0,_-R,Pn,Pn)}else sn=C(tn,pn,yn,_-R,nn-_)}B.push(sn),O.push(mn)}function f(en){return(ln,B,O)=>{let k=0,H=ln.length-1,R,_;if(H>=0&&(R=ln[H])instanceof lr){if(!H&&R.type==en&&R.length==O)return R;(_=R.prop(le.lookAhead))&&(k=B[H]+R.length+_)}return C(en,ln,B,O,k)}}function d(en,ln,B,O,k,H,R,_){let Z=[],nn=[];for(;en.length>O;)Z.push(en.pop()),nn.push(ln.pop()+B-k);en.push(C(l.types[R],Z,nn,H-k,_-H)),ln.push(k-B)}function C(en,ln,B,O,k=0,H){if(o){let R=[le.contextHash,o];H=H?[R].concat(H):[R]}if(k>25){let R=[le.lookAhead,k];H=H?[R].concat(H):[R]}return new lr(en,ln,B,O,H)}function I(en,ln){let B=s.fork(),O=0,k=0,H=0,R=B.end-r,_={size:0,start:0,skip:0};n:for(let Z=B.pos-en;B.pos>Z;){let nn=B.size;if(B.id==ln&&nn>=0){_.size=O,_.start=k,_.skip=H,H+=4,O+=4,B.next();continue}let tn=B.pos-nn;if(nn<0||tn=i?4:0,hn=B.start;for(B.next();B.pos>tn;){if(B.size<0)if(B.size==-3)sn+=4;else break n;else B.id>=i&&(sn+=4);B.next()}k=hn,O+=nn,H+=sn}return(ln<0||O==en)&&(_.size=O,_.start=k,_.skip=H),_.size>4?_:void 0}function T(en,ln,B){let{id:O,start:k,end:H,size:R}=s;if(s.next(),R>=0&&O4){let Z=s.pos-(R-4);for(;s.pos>Z;)B=T(en,ln,B)}ln[--B]=_,ln[--B]=H-en,ln[--B]=k-en,ln[--B]=O}else R==-3?o=O:R==-4&&(h=O);return B}let $=[],G=[];for(;s.pos>0;)c(t.start||0,t.bufferStart||0,$,G,-1);let b=(n=t.length)!==null&&n!==void 0?n:$.length?G[0]+$[0].length:0;return new lr(a[t.topID],$.reverse(),G.reverse(),b)}const pM=new WeakMap;function Dv(t,n){if(!t.isAnonymous||n instanceof gg||n.type!=t)return 1;let e=pM.get(n);if(e==null){e=1;for(let l of n.children){if(l.type!=t||!(l instanceof lr)){e=1;break}e+=Dv(t,l)}pM.set(n,e)}return e}function sP(t,n,e,l,r,u,i,s,a){let o=0;for(let C=l;C=h)break;B+=O}if(b==en+1){if(B>h){let O=C[en];d(O.children,O.positions,0,O.children.length,I[en]+G);continue}c.push(C[en])}else{let O=I[b-1]+C[b-1].length-ln;c.push(sP(t,C,I,en,b,ln,O,null,a))}f.push(ln+G-u)}}return d(n,e,l,r,0),(s||a)(c,f,i)}class mf{constructor(n,e,l,r,u=!1,i=!1){this.from=n,this.to=e,this.tree=l,this.offset=r,this.open=(u?1:0)|(i?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(n,e=[],l=!1){let r=[new mf(0,n.length,n,0,!1,l)];for(let u of e)u.to>n.length&&r.push(u);return r}static applyChanges(n,e,l=128){if(!e.length)return n;let r=[],u=1,i=n.length?n[0]:null;for(let s=0,a=0,o=0;;s++){let h=s=l)for(;i&&i.from=f.from||c<=f.to||o){let d=Math.max(f.from,a)-o,C=Math.min(f.to,c)-o;f=d>=C?null:new mf(d,C,f.tree,f.offset+o,s>0,!!h)}if(f&&r.push(f),i.to>c)break;i=unew kj(r.from,r.to)):[new kj(0,0)]:[new kj(0,n.length)],this.createParse(n,e||[],l)}parse(n,e,l){let r=this.startParse(n,e,l);for(;;){let u=r.advance();if(u)return u}}}class AX{constructor(n){this.string=n}get length(){return this.string.length}chunk(n){return this.string.slice(n)}get lineChunks(){return!1}read(n,e){return this.string.slice(n,e)}}new le({perNode:!0});let EX=0;class Hs{constructor(n,e,l){this.set=n,this.base=e,this.modified=l,this.id=EX++}static define(n){if(n!=null&&n.base)throw new Error("Can not derive from a modified tag");let e=new Hs([],null,[]);if(e.set.push(e),n)for(let l of n.set)e.set.push(l);return e}static defineModifier(){let n=new d2;return e=>e.modified.indexOf(n)>-1?e:d2.get(e.base||e,e.modified.concat(n).sort((l,r)=>l.id-r.id))}}let RX=0;class d2{constructor(){this.instances=[],this.id=RX++}static get(n,e){if(!e.length)return n;let l=e[0].instances.find(s=>s.base==n&&PX(e,s.modified));if(l)return l;let r=[],u=new Hs(r,n,e);for(let s of e)s.instances.push(u);let i=IX(e);for(let s of n.set)if(!s.modified.length)for(let a of i)r.push(d2.get(s,a));return u}}function PX(t,n){return t.length==n.length&&t.every((e,l)=>e==n[l])}function IX(t){let n=[[]];for(let e=0;el.length-e.length)}function kV(t){let n=Object.create(null);for(let e in t){let l=t[e];Array.isArray(l)||(l=[l]);for(let r of e.split(" "))if(r){let u=[],i=2,s=r;for(let c=0;;){if(s=="..."&&c>0&&c+3==r.length){i=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+r);if(u.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),c+=f[0].length,c==r.length)break;let d=r[c++];if(c==r.length&&d=="!"){i=0;break}if(d!="/")throw new RangeError("Invalid path: "+r);s=r.slice(c)}let a=u.length-1,o=u[a];if(!o)throw new RangeError("Invalid path: "+r);let h=new p2(l,i,a>0?u.slice(0,a):null);n[o]=h.sort(n[o])}}return SV.add(n)}const SV=new le;class p2{constructor(n,e,l,r){this.tags=n,this.mode=e,this.context=l,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(n){return!n||n.depth{let i=r;for(let s of u)for(let a of s.set){let o=e[a.id];if(o){i=i?i+" "+o:o;break}}return i},scope:l}}function _X(t,n){let e=null;for(let l of t){let r=l.style(n);r&&(e=e?e+" "+r:r)}return e}function TX(t,n,e,l=0,r=t.length){let u=new DX(l,Array.isArray(n)?n:[n],e);u.highlightRange(t.cursor(),l,r,"",u.highlighters),u.flush(r)}class DX{constructor(n,e,l){this.at=n,this.highlighters=e,this.span=l,this.class=""}startSpan(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}flush(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}highlightRange(n,e,l,r,u){let{type:i,from:s,to:a}=n;if(s>=l||a<=e)return;i.isTop&&(u=this.highlighters.filter(d=>!d.scope||d.scope(i)));let o=r,h=MX(n)||p2.empty,c=_X(u,h.tags);if(c&&(o&&(o+=" "),o+=c,h.mode==1&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(e,s),o),h.opaque)return;let f=n.tree&&n.tree.prop(le.mounted);if(f&&f.overlay){let d=n.node.enter(f.overlay[0].from+s,1),C=this.highlighters.filter(T=>!T.scope||T.scope(f.tree.type)),I=n.firstChild();for(let T=0,$=s;;T++){let G=T=b||!n.nextSibling())););if(!G||b>l)break;$=G.to+s,$>e&&(this.highlightRange(d.cursor(),Math.max(e,G.from+s),Math.min(l,$),"",C),this.startSpan(Math.min(l,$),o))}I&&n.parent()}else if(n.firstChild()){f&&(r="");do if(!(n.to<=e)){if(n.from>=l)break;this.highlightRange(n,e,l,r,u),this.startSpan(Math.min(l,n.to),o)}while(n.nextSibling());n.parent()}}}function MX(t){let n=t.type.prop(SV);for(;n&&n.context&&!t.matchContext(n.context);)n=n.next;return n||null}const Hn=Hs.define,B0=Hn(),xh=Hn(),vM=Hn(xh),yM=Hn(xh),kh=Hn(),X0=Hn(kh),Sj=Hn(kh),Xs=Hn(),bc=Hn(Xs),Js=Hn(),Ks=Hn(),ik=Hn(),zd=Hn(ik),F0=Hn(),Jn={comment:B0,lineComment:Hn(B0),blockComment:Hn(B0),docComment:Hn(B0),name:xh,variableName:Hn(xh),typeName:vM,tagName:Hn(vM),propertyName:yM,attributeName:Hn(yM),className:Hn(xh),labelName:Hn(xh),namespace:Hn(xh),macroName:Hn(xh),literal:kh,string:X0,docString:Hn(X0),character:Hn(X0),attributeValue:Hn(X0),number:Sj,integer:Hn(Sj),float:Hn(Sj),bool:Hn(kh),regexp:Hn(kh),escape:Hn(kh),color:Hn(kh),url:Hn(kh),keyword:Js,self:Hn(Js),null:Hn(Js),atom:Hn(Js),unit:Hn(Js),modifier:Hn(Js),operatorKeyword:Hn(Js),controlKeyword:Hn(Js),definitionKeyword:Hn(Js),moduleKeyword:Hn(Js),operator:Ks,derefOperator:Hn(Ks),arithmeticOperator:Hn(Ks),logicOperator:Hn(Ks),bitwiseOperator:Hn(Ks),compareOperator:Hn(Ks),updateOperator:Hn(Ks),definitionOperator:Hn(Ks),typeOperator:Hn(Ks),controlOperator:Hn(Ks),punctuation:ik,separator:Hn(ik),bracket:zd,angleBracket:Hn(zd),squareBracket:Hn(zd),paren:Hn(zd),brace:Hn(zd),content:Xs,heading:bc,heading1:Hn(bc),heading2:Hn(bc),heading3:Hn(bc),heading4:Hn(bc),heading5:Hn(bc),heading6:Hn(bc),contentSeparator:Hn(Xs),list:Hn(Xs),quote:Hn(Xs),emphasis:Hn(Xs),strong:Hn(Xs),link:Hn(Xs),monospace:Hn(Xs),strikethrough:Hn(Xs),inserted:Hn(),deleted:Hn(),changed:Hn(),invalid:Hn(),meta:F0,documentMeta:Hn(F0),annotation:Hn(F0),processingInstruction:Hn(F0),definition:Hs.defineModifier(),constant:Hs.defineModifier(),function:Hs.defineModifier(),standard:Hs.defineModifier(),local:Hs.defineModifier(),special:Hs.defineModifier()};OV([{tag:Jn.link,class:"tok-link"},{tag:Jn.heading,class:"tok-heading"},{tag:Jn.emphasis,class:"tok-emphasis"},{tag:Jn.strong,class:"tok-strong"},{tag:Jn.keyword,class:"tok-keyword"},{tag:Jn.atom,class:"tok-atom"},{tag:Jn.bool,class:"tok-bool"},{tag:Jn.url,class:"tok-url"},{tag:Jn.labelName,class:"tok-labelName"},{tag:Jn.inserted,class:"tok-inserted"},{tag:Jn.deleted,class:"tok-deleted"},{tag:Jn.literal,class:"tok-literal"},{tag:Jn.string,class:"tok-string"},{tag:Jn.number,class:"tok-number"},{tag:[Jn.regexp,Jn.escape,Jn.special(Jn.string)],class:"tok-string2"},{tag:Jn.variableName,class:"tok-variableName"},{tag:Jn.local(Jn.variableName),class:"tok-variableName tok-local"},{tag:Jn.definition(Jn.variableName),class:"tok-variableName tok-definition"},{tag:Jn.special(Jn.variableName),class:"tok-variableName2"},{tag:Jn.definition(Jn.propertyName),class:"tok-propertyName tok-definition"},{tag:Jn.typeName,class:"tok-typeName"},{tag:Jn.namespace,class:"tok-namespace"},{tag:Jn.className,class:"tok-className"},{tag:Jn.macroName,class:"tok-macroName"},{tag:Jn.propertyName,class:"tok-propertyName"},{tag:Jn.operator,class:"tok-operator"},{tag:Jn.comment,class:"tok-comment"},{tag:Jn.meta,class:"tok-meta"},{tag:Jn.invalid,class:"tok-invalid"},{tag:Jn.punctuation,class:"tok-punctuation"}]);var Oj;const fm=new le;function $X(t){return dt.define({combine:t?n=>n.concat(t):void 0})}const NX=new le;class Os{constructor(n,e,l=[],r=""){this.data=n,this.name=r,Oe.prototype.hasOwnProperty("tree")||Object.defineProperty(Oe.prototype,"tree",{get(){return xr(this)}}),this.parser=e,this.extension=[Xh.of(this),Oe.languageData.of((u,i,s)=>{let a=jM(u,i,s),o=a.type.prop(fm);if(!o)return[];let h=u.facet(o),c=a.type.prop(NX);if(c){let f=a.resolve(i-a.from,s);for(let d of c)if(d.test(f,u)){let C=u.facet(d.facet);return d.type=="replace"?C:C.concat(h)}}return h})].concat(l)}isActiveAt(n,e,l=-1){return jM(n,e,l).type.prop(fm)==this.data}findRegions(n){let e=n.facet(Xh);if((e==null?void 0:e.data)==this.data)return[{from:0,to:n.doc.length}];if(!e||!e.allowsNesting)return[];let l=[],r=(u,i)=>{if(u.prop(fm)==this.data){l.push({from:i,to:i+u.length});return}let s=u.prop(le.mounted);if(s){if(s.tree.prop(fm)==this.data){if(s.overlay)for(let a of s.overlay)l.push({from:a.from+i,to:a.to+i});else l.push({from:i,to:i+u.length});return}else if(s.overlay){let a=l.length;if(r(s.tree,s.overlay[0].from+i),l.length>a)return}}for(let a=0;al.isTop?e:void 0)]}),n.name)}configure(n,e){return new v2(this.data,this.parser.configure(n),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function xr(t){let n=t.field(Os.state,!1);return n?n.tree:lr.empty}class qX{constructor(n){this.doc=n,this.cursorPos=0,this.string="",this.cursor=n.iter()}get length(){return this.doc.length}syncTo(n){return this.string=this.cursor.next(n-this.cursorPos).value,this.cursorPos=n+this.string.length,this.cursorPos-this.string.length}chunk(n){return this.syncTo(n),this.string}get lineChunks(){return!0}read(n,e){let l=this.cursorPos-this.string.length;return n=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-l,e-l)}}let Ud=null;class y2{constructor(n,e,l=[],r,u,i,s,a){this.parser=n,this.state=e,this.fragments=l,this.tree=r,this.treeLen=u,this.viewport=i,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(n,e,l){return new y2(n,e,[],lr.empty,0,l,[],null)}startParse(){return this.parser.startParse(new qX(this.state.doc),this.fragments)}work(n,e){return e!=null&&e>=this.state.doc.length&&(e=void 0),this.tree!=lr.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var l;if(typeof n=="number"){let r=Date.now()+n;n=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),e!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&e=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(mf.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(n){let e=Ud;Ud=this;try{return n()}finally{Ud=e}}withoutTempSkipped(n){for(let e;e=this.tempSkipped.pop();)n=xM(n,e.from,e.to);return n}changes(n,e){let{fragments:l,tree:r,treeLen:u,viewport:i,skipped:s}=this;if(this.takeTree(),!n.empty){let a=[];if(n.iterChangedRanges((o,h,c,f)=>a.push({fromA:o,toA:h,fromB:c,toB:f})),l=mf.applyChanges(l,a),r=lr.empty,u=0,i={from:n.mapPos(i.from,-1),to:n.mapPos(i.to,1)},this.skipped.length){s=[];for(let o of this.skipped){let h=n.mapPos(o.from,1),c=n.mapPos(o.to,-1);hn.from&&(this.fragments=xM(this.fragments,r,u),this.skipped.splice(l--,1))}return this.skipped.length>=e?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(n,e){this.skipped.push({from:n,to:e})}static getSkippingParser(n){return new class extends xV{createParse(e,l,r){let u=r[0].from,i=r[r.length-1].to;return{parsedPos:u,advance(){let a=Ud;if(a){for(let o of r)a.tempSkipped.push(o);n&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,n]):n)}return this.parsedPos=i,new lr(ti.none,[],[],i-u)},stoppedAt:null,stopAt(){}}}}}isDone(n){n=Math.min(n,this.state.doc.length);let e=this.fragments;return this.treeLen>=n&&e.length&&e[0].from==0&&e[0].to>=n}static get(){return Ud}}function xM(t,n,e){return mf.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}class lw{constructor(n){this.context=n,this.tree=n.tree}apply(n){if(!n.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(n.changes,n.state),l=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,l)||e.takeTree(),new lw(e)}static init(n){let e=Math.min(3e3,n.doc.length),l=y2.create(n.facet(Xh).parser,n,{from:0,to:e});return l.work(20,e)||l.takeTree(),new lw(l)}}Os.state=eu.define({create:lw.init,update(t,n){for(let e of n.effects)if(e.is(Os.setState))return e.value;return n.startState.facet(Xh)!=n.state.facet(Xh)?lw.init(n.state):t.apply(n)}});let CV=t=>{let n=setTimeout(()=>t(),500);return()=>clearTimeout(n)};typeof requestIdleCallback<"u"&&(CV=t=>{let n=-1,e=setTimeout(()=>{n=requestIdleCallback(t,{timeout:500-100})},100);return()=>n<0?clearTimeout(e):cancelIdleCallback(n)});const Cj=typeof navigator<"u"&&(!((Oj=navigator.scheduling)===null||Oj===void 0)&&Oj.isInputPending)?()=>navigator.scheduling.isInputPending():null,LX=Or.fromClass(class{constructor(n){this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(n){let e=this.view.state.field(Os.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:n}=this.view,e=n.field(Os.state);(e.tree!=e.context.tree||!e.context.isDone(n.doc.length))&&(this.working=CV(this.work))}work(n){this.working=null;let e=Date.now();if(this.chunkEndr+1e3,a=u.context.work(()=>Cj&&Cj()||Date.now()>i,r+(s?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(u.context.takeTree(),this.view.dispatch({effects:Os.setState.of(new lw(u.context))})),this.chunkBudget>0&&!(a&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(u.context)}checkAsyncSchedule(n){n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(()=>this.scheduleWork()).catch(e=>bi(this.view.state,e)).then(()=>this.workScheduled--),n.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Xh=dt.define({combine(t){return t.length?t[0]:null},enables:t=>[Os.state,LX,kt.contentAttributes.compute([t],n=>{let e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]});class WX{constructor(n,e=[]){this.language=n,this.support=e,this.extension=[n,e]}}const VX=dt.define(),oP=dt.define({combine:t=>{if(!t.length)return" ";let n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(e=>e!=n[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function j2(t){let n=t.facet(oP);return n.charCodeAt(0)==9?t.tabSize*n.length:n.length}function $1(t,n){let e="",l=t.tabSize,r=t.facet(oP)[0];if(r==" "){for(;n>=l;)e+=" ",n-=l;r=" "}for(let u=0;u=l.from&&r<=l.to?u&&r==n?{text:"",from:n}:(e<0?r-1&&(u+=i-this.countColumn(l,l.search(/\S|$/))),u}countColumn(n,e=n.length){return Ip(n,this.state.tabSize,e)}lineIndent(n,e=1){let{text:l,from:r}=this.lineAt(n,e),u=this.options.overrideIndentation;if(u){let i=u(r);if(i>-1)return i}return this.countColumn(l,l.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const AV=new le;function zX(t,n,e){return EV(n.resolveInner(e).enterUnfinishedNodesBefore(e),e,t)}function UX(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function YX(t){let n=t.type.prop(AV);if(n)return n;let e=t.firstChild,l;if(e&&(l=e.type.prop(le.closedBy))){let r=t.lastChild,u=r&&l.indexOf(r.name)>-1;return i=>KX(i,!0,1,void 0,u&&!UX(i)?r.from:void 0)}return t.parent==null?QX:null}function EV(t,n,e){for(;t;t=t.parent){let l=YX(t);if(l)return l(hP.create(e,n,t))}return null}function QX(){return 0}class hP extends d5{constructor(n,e,l){super(n.state,n.options),this.base=n,this.pos=e,this.node=l}static create(n,e,l){return new hP(n,e,l)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(n){let e=this.state.doc.lineAt(n.from);for(;;){let l=n.resolve(e.from);for(;l.parent&&l.parent.from==l.from;)l=l.parent;if(GX(l,n))break;e=this.state.doc.lineAt(l.from)}return this.lineIndent(e.from)}continue(){let n=this.node.parent;return n?EV(n,this.pos,this.base):0}}function GX(t,n){for(let e=n;e;e=e.parent)if(t==e)return!0;return!1}function JX(t){let n=t.node,e=n.childAfter(n.from),l=n.lastChild;if(!e)return null;let r=t.options.simulateBreak,u=t.state.doc.lineAt(e.from),i=r==null||r<=u.from?u.to:Math.min(u.to,r);for(let s=e.to;;){let a=n.childAfter(s);if(!a||a==l)return null;if(!a.type.isSkipped)return a.from{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let n=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!n.length)return t;let e=t.newDoc,{head:l}=t.newSelection.main,r=e.lineAt(l);if(l>r.from+BX)return t;let u=e.sliceString(r.from,l);if(!n.some(o=>o.test(u)))return t;let{state:i}=t,s=-1,a=[];for(let{head:o}of i.selection.ranges){let h=i.doc.lineAt(o);if(h.from==s)continue;s=h.from;let c=aP(i,h.from);if(c==null)continue;let f=/^\s*/.exec(h.text)[0],d=$1(i,c);f!=d&&a.push({from:h.from,to:h.from+f.length,insert:d})}return a.length?[t,{changes:a,sequential:!0}]:t})}const FX=dt.define(),RV=new le;function HX(t){let n=t.firstChild,e=t.lastChild;return n&&n.toe)continue;if(u&&i.from=n&&a.to>e&&(u=a)}}return u}function bX(t){let n=t.lastChild;return n&&n.to==t.to&&n.type.isError}function x2(t,n,e){for(let l of t.facet(FX)){let r=l(t,n,e);if(r)return r}return ZX(t,n,e)}function PV(t,n){let e=n.mapPos(t.from,1),l=n.mapPos(t.to,-1);return e>=l?void 0:{from:e,to:l}}const p5=ee.define({map:PV}),Dp=ee.define({map:PV});function IV(t){let n=[];for(let{head:e}of t.state.selection.ranges)n.some(l=>l.from<=e&&l.to>=e)||n.push(t.lineBlockAt(e));return n}const If=eu.define({create(){return Tt.none},update(t,n){t=t.map(n.changes);for(let e of n.effects)e.is(p5)&&!nF(t,e.value.from,e.value.to)?t=t.update({add:[kM.range(e.value.from,e.value.to)]}):e.is(Dp)&&(t=t.update({filter:(l,r)=>e.value.from!=l||e.value.to!=r,filterFrom:e.value.from,filterTo:e.value.to}));if(n.selection){let e=!1,{head:l}=n.selection.main;t.between(l,l,(r,u)=>{rl&&(e=!0)}),e&&(t=t.update({filterFrom:l,filterTo:l,filter:(r,u)=>u<=l||r>=l}))}return t},provide:t=>kt.decorations.from(t),toJSON(t,n){let e=[];return t.between(0,n.doc.length,(l,r)=>{e.push(l,r)}),e},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let n=[];for(let e=0;e{(!r||r.from>u)&&(r={from:u,to:i})}),r}function nF(t,n,e){let l=!1;return t.between(n,n,(r,u)=>{r==n&&u==e&&(l=!0)}),l}function _V(t,n){return t.field(If,!1)?n:n.concat(ee.appendConfig.of(MV()))}const tF=t=>{for(let n of IV(t)){let e=x2(t.state,n.from,n.to);if(e)return t.dispatch({effects:_V(t.state,[p5.of(e),TV(t,e)])}),!0}return!1},eF=t=>{if(!t.state.field(If,!1))return!1;let n=[];for(let e of IV(t)){let l=k2(t.state,e.from,e.to);l&&n.push(Dp.of(l),TV(t,l,!1))}return n.length&&t.dispatch({effects:n}),n.length>0};function TV(t,n,e=!0){let l=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return kt.announce.of(`${t.state.phrase(e?"Folded lines":"Unfolded lines")} ${l} ${t.state.phrase("to")} ${r}.`)}const lF=t=>{let{state:n}=t,e=[];for(let l=0;l{let n=t.state.field(If,!1);if(!n||!n.size)return!1;let e=[];return n.between(0,t.state.doc.length,(l,r)=>{e.push(Dp.of({from:l,to:r}))}),t.dispatch({effects:e}),!0},uF=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:tF},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:eF},{key:"Ctrl-Alt-[",run:lF},{key:"Ctrl-Alt-]",run:rF}],iF={placeholderDOM:null,placeholderText:"…"},DV=dt.define({combine(t){return Wo(t,iF)}});function MV(t){let n=[If,aF];return t&&n.push(DV.of(t)),n}const kM=Tt.replace({widget:new class extends Ic{toDOM(t){let{state:n}=t,e=n.facet(DV),l=u=>{let i=t.lineBlockAt(t.posAtDOM(u.target)),s=k2(t.state,i.from,i.to);s&&t.dispatch({effects:Dp.of(s)}),u.preventDefault()};if(e.placeholderDOM)return e.placeholderDOM(t,l);let r=document.createElement("span");return r.textContent=e.placeholderText,r.setAttribute("aria-label",n.phrase("folded code")),r.title=n.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=l,r}}}),sF={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Aj extends Da{constructor(n,e){super(),this.config=n,this.open=e}eq(n){return this.config==n.config&&this.open==n.open}toDOM(n){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=n.state.phrase(this.open?"Fold line":"Unfold line"),e}}function oF(t={}){let n=Object.assign(Object.assign({},sF),t),e=new Aj(n,!0),l=new Aj(n,!1),r=Or.fromClass(class{constructor(i){this.from=i.viewport.from,this.markers=this.buildMarkers(i)}update(i){(i.docChanged||i.viewportChanged||i.startState.facet(Xh)!=i.state.facet(Xh)||i.startState.field(If,!1)!=i.state.field(If,!1)||xr(i.startState)!=xr(i.state)||n.foldingChanged(i))&&(this.markers=this.buildMarkers(i.view))}buildMarkers(i){let s=new Qh;for(let a of i.viewportLineBlocks){let o=k2(i.state,a.from,a.to)?l:x2(i.state,a.from,a.to)?e:null;o&&s.add(a.from,a.from,o)}return s.finish()}}),{domEventHandlers:u}=n;return[r,fX({class:"cm-foldGutter",markers(i){var s;return((s=i.plugin(r))===null||s===void 0?void 0:s.markers)||We.empty},initialSpacer(){return new Aj(n,!1)},domEventHandlers:Object.assign(Object.assign({},u),{click:(i,s,a)=>{if(u.click&&u.click(i,s,a))return!0;let o=k2(i.state,s.from,s.to);if(o)return i.dispatch({effects:Dp.of(o)}),!0;let h=x2(i.state,s.from,s.to);return h?(i.dispatch({effects:p5.of(h)}),!0):!1}})}),MV()]}const aF=kt.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 v5{constructor(n,e){this.specs=n;let l;function r(s){let a=Gh.newName();return(l||(l=Object.create(null)))["."+a]=s,a}const u=typeof e.all=="string"?e.all:e.all?r(e.all):void 0,i=e.scope;this.scope=i instanceof Os?s=>s.prop(fm)==i.data:i?s=>s==i:void 0,this.style=OV(n.map(s=>({tag:s.tag,class:s.class||r(Object.assign({},s,{tag:null}))})),{all:u}).style,this.module=l?new Gh(l):null,this.themeType=e.themeType}static define(n,e){return new v5(n,e||{})}}const sk=dt.define(),$V=dt.define({combine(t){return t.length?[t[0]]:null}});function Ej(t){let n=t.facet(sk);return n.length?n:t.facet($V)}function hF(t,n){let e=[fF],l;return t instanceof v5&&(t.module&&e.push(kt.styleModule.of(t.module)),l=t.themeType),n!=null&&n.fallback?e.push($V.of(t)):l?e.push(sk.computeN([kt.darkTheme],r=>r.facet(kt.darkTheme)==(l=="dark")?[t]:[])):e.push(sk.of(t)),e}class cF{constructor(n){this.markCache=Object.create(null),this.tree=xr(n.state),this.decorations=this.buildDeco(n,Ej(n.state))}update(n){let e=xr(n.state),l=Ej(n.state),r=l!=Ej(n.startState);e.length{l.add(i,s,this.markCache[a]||(this.markCache[a]=Tt.mark({class:a})))},r,u);return l.finish()}}const fF=fg.high(Or.fromClass(cF,{decorations:t=>t.decorations})),gF=v5.define([{tag:Jn.meta,color:"#404740"},{tag:Jn.link,textDecoration:"underline"},{tag:Jn.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Jn.emphasis,fontStyle:"italic"},{tag:Jn.strong,fontWeight:"bold"},{tag:Jn.strikethrough,textDecoration:"line-through"},{tag:Jn.keyword,color:"#708"},{tag:[Jn.atom,Jn.bool,Jn.url,Jn.contentSeparator,Jn.labelName],color:"#219"},{tag:[Jn.literal,Jn.inserted],color:"#164"},{tag:[Jn.string,Jn.deleted],color:"#a11"},{tag:[Jn.regexp,Jn.escape,Jn.special(Jn.string)],color:"#e40"},{tag:Jn.definition(Jn.variableName),color:"#00f"},{tag:Jn.local(Jn.variableName),color:"#30a"},{tag:[Jn.typeName,Jn.namespace],color:"#085"},{tag:Jn.className,color:"#167"},{tag:[Jn.special(Jn.variableName),Jn.macroName],color:"#256"},{tag:Jn.definition(Jn.propertyName),color:"#00c"},{tag:Jn.comment,color:"#940"},{tag:Jn.invalid,color:"#f00"}]),mF=kt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),NV=1e4,qV="()[]{}",LV=dt.define({combine(t){return Wo(t,{afterCursor:!0,brackets:qV,maxScanDistance:NV,renderMatch:pF})}}),wF=Tt.mark({class:"cm-matchingBracket"}),dF=Tt.mark({class:"cm-nonmatchingBracket"});function pF(t){let n=[],e=t.matched?wF:dF;return n.push(e.range(t.start.from,t.start.to)),t.end&&n.push(e.range(t.end.from,t.end.to)),n}const vF=eu.define({create(){return Tt.none},update(t,n){if(!n.docChanged&&!n.selection)return t;let e=[],l=n.state.facet(LV);for(let r of n.state.selection.ranges){if(!r.empty)continue;let u=uo(n.state,r.head,-1,l)||r.head>0&&uo(n.state,r.head-1,1,l)||l.afterCursor&&(uo(n.state,r.head,1,l)||r.headkt.decorations.from(t)}),yF=[vF,mF];function jF(t={}){return[LV.of(t),yF]}const xF=new le;function ok(t,n,e){let l=t.prop(n<0?le.openedBy:le.closedBy);if(l)return l;if(t.name.length==1){let r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function ak(t){let n=t.type.prop(xF);return n?n(t.node):t}function uo(t,n,e,l={}){let r=l.maxScanDistance||NV,u=l.brackets||qV,i=xr(t),s=i.resolveInner(n,e);for(let a=s;a;a=a.parent){let o=ok(a.type,e,u);if(o&&a.from0?n>=h.from&&nh.from&&n<=h.to))return kF(t,n,e,a,h,o,u)}}return SF(t,n,e,i,s.type,r,u)}function kF(t,n,e,l,r,u,i){let s=l.parent,a={from:r.from,to:r.to},o=0,h=s==null?void 0:s.cursor();if(h&&(e<0?h.childBefore(l.from):h.childAfter(l.to)))do if(e<0?h.to<=l.from:h.from>=l.to){if(o==0&&u.indexOf(h.type.name)>-1&&h.from0)return null;let o={from:e<0?n-1:n,to:e>0?n+1:n},h=t.doc.iterRange(n,e>0?t.doc.length:0),c=0;for(let f=0;!h.next().done&&f<=u;){let d=h.value;e<0&&(f+=d.length);let C=n+f*e;for(let I=e>0?0:d.length-1,T=e>0?d.length:-1;I!=T;I+=e){let $=i.indexOf(d[I]);if(!($<0||l.resolveInner(C+I,1).type!=r))if($%2==0==e>0)c++;else{if(c==1)return{start:o,end:{from:C+I,to:C+I+1},matched:$>>1==a>>1};c--}}e>0&&(f+=d.length)}return h.done?{start:o,matched:!1}:null}const OF=Object.create(null),SM=[ti.none],OM=[],CF=Object.create(null);for(let[t,n]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"]])CF[t]=AF(OF,n);function Rj(t,n){OM.indexOf(t)>-1||(OM.push(t),console.warn(n))}function AF(t,n){let e=null;for(let u of n.split(".")){let i=t[u]||Jn[u];i?typeof i=="function"?e?e=i(e):Rj(u,`Modifier ${u} used at start of tag`):e?Rj(u,`Tag ${u} used as modifier`):e=i:Rj(u,`Unknown highlighting tag ${u}`)}if(!e)return 0;let l=n.replace(/ /g,"_"),r=ti.define({id:SM.length,name:l,props:[kV({[l]:e})]});return SM.push(r),r.id}const EF=t=>{let{state:n}=t,e=n.doc.lineAt(n.selection.main.from),l=fP(t.state,e.from);return l.line?RF(t):l.block?IF(t):!1};function cP(t,n){return({state:e,dispatch:l})=>{if(e.readOnly)return!1;let r=t(n,e);return r?(l(e.update(r)),!0):!1}}const RF=cP(DF,0),PF=cP(WV,0),IF=cP((t,n)=>WV(t,n,TF(n)),0);function fP(t,n){let e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}const Yd=50;function _F(t,{open:n,close:e},l,r){let u=t.sliceDoc(l-Yd,l),i=t.sliceDoc(r,r+Yd),s=/\s*$/.exec(u)[0].length,a=/^\s*/.exec(i)[0].length,o=u.length-s;if(u.slice(o-n.length,o)==n&&i.slice(a,a+e.length)==e)return{open:{pos:l-s,margin:s&&1},close:{pos:r+a,margin:a&&1}};let h,c;r-l<=2*Yd?h=c=t.sliceDoc(l,r):(h=t.sliceDoc(l,l+Yd),c=t.sliceDoc(r-Yd,r));let f=/^\s*/.exec(h)[0].length,d=/\s*$/.exec(c)[0].length,C=c.length-d-e.length;return h.slice(f,f+n.length)==n&&c.slice(C,C+e.length)==e?{open:{pos:l+f+n.length,margin:/\s/.test(h.charAt(f+n.length))?1:0},close:{pos:r-d-e.length,margin:/\s/.test(c.charAt(C-1))?1:0}}:null}function TF(t){let n=[];for(let e of t.selection.ranges){let l=t.doc.lineAt(e.from),r=e.to<=l.to?l:t.doc.lineAt(e.to),u=n.length-1;u>=0&&n[u].to>l.from?n[u].to=r.to:n.push({from:l.from+/^\s*/.exec(l.text)[0].length,to:r.to})}return n}function WV(t,n,e=n.selection.ranges){let l=e.map(u=>fP(n,u.from).block);if(!l.every(u=>u))return null;let r=e.map((u,i)=>_F(n,l[i],u.from,u.to));if(t!=2&&!r.every(u=>u))return{changes:n.changes(e.map((u,i)=>r[i]?[]:[{from:u.from,insert:l[i].open+" "},{from:u.to,insert:" "+l[i].close}]))};if(t!=1&&r.some(u=>u)){let u=[];for(let i=0,s;ir&&(u==i||i>c.from)){r=c.from;let f=/^\s*/.exec(c.text)[0].length,d=f==c.length,C=c.text.slice(f,f+o.length)==o?f:-1;fu.comment<0&&(!u.empty||u.single))){let u=[];for(let{line:s,token:a,indent:o,empty:h,single:c}of l)(c||!h)&&u.push({from:s.from+o,insert:a+" "});let i=n.changes(u);return{changes:i,selection:n.selection.map(i,1)}}else if(t!=1&&l.some(u=>u.comment>=0)){let u=[];for(let{line:i,comment:s,token:a}of l)if(s>=0){let o=i.from+s,h=o+a.length;i.text[h-i.from]==" "&&h++,u.push({from:o,to:h})}return{changes:u}}return null}const hk=eh.define(),MF=eh.define(),$F=dt.define(),VV=dt.define({combine(t){return Wo(t,{minDepth:100,newGroupDelay:500,joinToEvent:(n,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(n,e)=>(l,r)=>n(l,r)||e(l,r)})}});function NF(t){let n=0;return t.iterChangedRanges((e,l)=>n=l),n}const zV=eu.define({create(){return io.empty},update(t,n){let e=n.state.facet(VV),l=n.annotation(hk);if(l){let a=n.docChanged?Tn.single(NF(n.changes)):void 0,o=Bu.fromTransaction(n,a),h=l.side,c=h==0?t.undone:t.done;return o?c=S2(c,c.length,e.minDepth,o):c=QV(c,n.startState.selection),new io(h==0?l.rest:c,h==0?c:l.rest)}let r=n.annotation(MF);if((r=="full"||r=="before")&&(t=t.isolate()),n.annotation(yr.addToHistory)===!1)return n.changes.empty?t:t.addMapping(n.changes.desc);let u=Bu.fromTransaction(n),i=n.annotation(yr.time),s=n.annotation(yr.userEvent);return u?t=t.addChanges(u,i,s,e,n):n.selection&&(t=t.addSelection(n.startState.selection,i,s,e.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(n=>n.toJSON()),undone:t.undone.map(n=>n.toJSON())}},fromJSON(t){return new io(t.done.map(Bu.fromJSON),t.undone.map(Bu.fromJSON))}});function qF(t={}){return[zV,VV.of(t),kt.domEventHandlers({beforeinput(n,e){let l=n.inputType=="historyUndo"?UV:n.inputType=="historyRedo"?ck:null;return l?(n.preventDefault(),l(e)):!1}})]}function y5(t,n){return function({state:e,dispatch:l}){if(!n&&e.readOnly)return!1;let r=e.field(zV,!1);if(!r)return!1;let u=r.pop(t,e,n);return u?(l(u),!0):!1}}const UV=y5(0,!1),ck=y5(1,!1),LF=y5(0,!0),WF=y5(1,!0);class Bu{constructor(n,e,l,r,u){this.changes=n,this.effects=e,this.mapped=l,this.startSelection=r,this.selectionsAfter=u}setSelAfter(n){return new Bu(this.changes,this.effects,this.mapped,this.startSelection,n)}toJSON(){var n,e,l;return{changes:(n=this.changes)===null||n===void 0?void 0:n.toJSON(),mapped:(e=this.mapped)===null||e===void 0?void 0:e.toJSON(),startSelection:(l=this.startSelection)===null||l===void 0?void 0:l.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(n){return new Bu(n.changes&&pr.fromJSON(n.changes),[],n.mapped&&fo.fromJSON(n.mapped),n.startSelection&&Tn.fromJSON(n.startSelection),n.selectionsAfter.map(Tn.fromJSON))}static fromTransaction(n,e){let l=Fi;for(let r of n.startState.facet($F)){let u=r(n);u.length&&(l=l.concat(u))}return!l.length&&n.changes.empty?null:new Bu(n.changes.invert(n.startState.doc),l,void 0,e||n.startState.selection,Fi)}static selection(n){return new Bu(void 0,Fi,void 0,void 0,n)}}function S2(t,n,e,l){let r=n+1>e+20?n-e-1:0,u=t.slice(r,n);return u.push(l),u}function VF(t,n){let e=[],l=!1;return t.iterChangedRanges((r,u)=>e.push(r,u)),n.iterChangedRanges((r,u,i,s)=>{for(let a=0;a=o&&i<=h&&(l=!0)}}),l}function zF(t,n){return t.ranges.length==n.ranges.length&&t.ranges.filter((e,l)=>e.empty!=n.ranges[l].empty).length===0}function YV(t,n){return t.length?n.length?t.concat(n):t:n}const Fi=[],UF=200;function QV(t,n){if(t.length){let e=t[t.length-1],l=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-UF));return l.length&&l[l.length-1].eq(n)?t:(l.push(n),S2(t,t.length-1,1e9,e.setSelAfter(l)))}else return[Bu.selection([n])]}function YF(t){let n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function Pj(t,n){if(!t.length)return t;let e=t.length,l=Fi;for(;e;){let r=QF(t[e-1],n,l);if(r.changes&&!r.changes.empty||r.effects.length){let u=t.slice(0,e);return u[e-1]=r,u}else n=r.mapped,e--,l=r.selectionsAfter}return l.length?[Bu.selection(l)]:Fi}function QF(t,n,e){let l=YV(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(n)):Fi,e);if(!t.changes)return Bu.selection(l);let r=t.changes.map(n),u=n.mapDesc(t.changes,!0),i=t.mapped?t.mapped.composeDesc(u):u;return new Bu(r,ee.mapEffects(t.effects,n),i,t.startSelection.map(u),l)}const GF=/^(input\.type|delete)($|\.)/;class io{constructor(n,e,l=0,r=void 0){this.done=n,this.undone=e,this.prevTime=l,this.prevUserEvent=r}isolate(){return this.prevTime?new io(this.done,this.undone):this}addChanges(n,e,l,r,u){let i=this.done,s=i[i.length-1];return s&&s.changes&&!s.changes.empty&&n.changes&&(!l||GF.test(l))&&(!s.selectionsAfter.length&&e-this.prevTime0&&e-this.prevTimee.empty?t.moveByChar(e,n):j5(e,n))}function pu(t){return t.textDirectionAt(t.state.selection.main.head)==Cl.LTR}const JV=t=>GV(t,!pu(t)),KV=t=>GV(t,pu(t));function BV(t,n){return Vs(t,e=>e.empty?t.moveByGroup(e,n):j5(e,n))}const KF=t=>BV(t,!pu(t)),BF=t=>BV(t,pu(t));function XF(t,n,e){if(n.type.prop(e))return!0;let l=n.to-n.from;return l&&(l>2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function x5(t,n,e){let l=xr(t).resolveInner(n.head),r=e?le.closedBy:le.openedBy;for(let a=n.head;;){let o=e?l.childAfter(a):l.childBefore(a);if(!o)break;XF(t,o,r)?l=o:a=e?o.to:o.from}let u=l.type.prop(r),i,s;return u&&(i=e?uo(t,l.from,1):uo(t,l.to,-1))&&i.matched?s=e?i.end.to:i.end.from:s=e?l.to:l.from,Tn.cursor(s,e?-1:1)}const FF=t=>Vs(t,n=>x5(t.state,n,!pu(t))),HF=t=>Vs(t,n=>x5(t.state,n,pu(t)));function XV(t,n){return Vs(t,e=>{if(!e.empty)return j5(e,n);let l=t.moveVertically(e,n);return l.head!=e.head?l:t.moveToLineBoundary(e,n)})}const FV=t=>XV(t,!1),HV=t=>XV(t,!0);function ZV(t){let n=t.scrollDOM.clientHeighti.empty?t.moveVertically(i,n,e.height):j5(i,n));if(r.eq(l.selection))return!1;let u;if(e.selfScroll){let i=t.coordsAtPos(l.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),a=s.top+e.marginTop,o=s.bottom-e.marginBottom;i&&i.top>a&&i.bottombV(t,!1),fk=t=>bV(t,!0);function _c(t,n,e){let l=t.lineBlockAt(n.head),r=t.moveToLineBoundary(n,e);if(r.head==n.head&&r.head!=(e?l.to:l.from)&&(r=t.moveToLineBoundary(n,e,!1)),!e&&r.head==l.from&&l.length){let u=/^\s*/.exec(t.state.sliceDoc(l.from,Math.min(l.from+100,l.to)))[0].length;u&&n.head!=l.from+u&&(r=Tn.cursor(l.from+u))}return r}const ZF=t=>Vs(t,n=>_c(t,n,!0)),bF=t=>Vs(t,n=>_c(t,n,!1)),nH=t=>Vs(t,n=>_c(t,n,!pu(t))),tH=t=>Vs(t,n=>_c(t,n,pu(t))),eH=t=>Vs(t,n=>Tn.cursor(t.lineBlockAt(n.head).from,1)),lH=t=>Vs(t,n=>Tn.cursor(t.lineBlockAt(n.head).to,-1));function rH(t,n,e){let l=!1,r=Gw(t.selection,u=>{let i=uo(t,u.head,-1)||uo(t,u.head,1)||u.head>0&&uo(t,u.head-1,1)||u.headrH(t,n,!1);function cs(t,n){let e=Gw(t.state.selection,l=>{let r=n(l);return Tn.range(l.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return e.eq(t.state.selection)?!1:(t.dispatch(Vo(t.state,e)),!0)}function nz(t,n){return cs(t,e=>t.moveByChar(e,n))}const tz=t=>nz(t,!pu(t)),ez=t=>nz(t,pu(t));function lz(t,n){return cs(t,e=>t.moveByGroup(e,n))}const iH=t=>lz(t,!pu(t)),sH=t=>lz(t,pu(t)),oH=t=>cs(t,n=>x5(t.state,n,!pu(t))),aH=t=>cs(t,n=>x5(t.state,n,pu(t)));function rz(t,n){return cs(t,e=>t.moveVertically(e,n))}const uz=t=>rz(t,!1),iz=t=>rz(t,!0);function sz(t,n){return cs(t,e=>t.moveVertically(e,n,ZV(t).height))}const AM=t=>sz(t,!1),EM=t=>sz(t,!0),hH=t=>cs(t,n=>_c(t,n,!0)),cH=t=>cs(t,n=>_c(t,n,!1)),fH=t=>cs(t,n=>_c(t,n,!pu(t))),gH=t=>cs(t,n=>_c(t,n,pu(t))),mH=t=>cs(t,n=>Tn.cursor(t.lineBlockAt(n.head).from)),wH=t=>cs(t,n=>Tn.cursor(t.lineBlockAt(n.head).to)),RM=({state:t,dispatch:n})=>(n(Vo(t,{anchor:0})),!0),PM=({state:t,dispatch:n})=>(n(Vo(t,{anchor:t.doc.length})),!0),IM=({state:t,dispatch:n})=>(n(Vo(t,{anchor:t.selection.main.anchor,head:0})),!0),_M=({state:t,dispatch:n})=>(n(Vo(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),dH=({state:t,dispatch:n})=>(n(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),pH=({state:t,dispatch:n})=>{let e=S5(t).map(({from:l,to:r})=>Tn.range(l,Math.min(r+1,t.doc.length)));return n(t.update({selection:Tn.create(e),userEvent:"select"})),!0},vH=({state:t,dispatch:n})=>{let e=Gw(t.selection,l=>{var r;let u=xr(t).resolveInner(l.head,1);for(;!(u.from=l.to||u.to>l.to&&u.from<=l.from||!(!((r=u.parent)===null||r===void 0)&&r.parent));)u=u.parent;return Tn.range(u.to,u.from)});return n(Vo(t,e)),!0},yH=({state:t,dispatch:n})=>{let e=t.selection,l=null;return e.ranges.length>1?l=Tn.create([e.main]):e.main.empty||(l=Tn.create([Tn.cursor(e.main.head)])),l?(n(Vo(t,l)),!0):!1};function k5(t,n){if(t.state.readOnly)return!1;let e="delete.selection",{state:l}=t,r=l.changeByRange(u=>{let{from:i,to:s}=u;if(i==s){let a=n(i);ai&&(e="delete.forward",a=H0(t,a,!0)),i=Math.min(i,a),s=Math.max(s,a)}else i=H0(t,i,!1),s=H0(t,s,!0);return i==s?{range:u}:{changes:{from:i,to:s},range:Tn.cursor(i)}});return r.changes.empty?!1:(t.dispatch(l.update(r,{scrollIntoView:!0,userEvent:e,effects:e=="delete.selection"?kt.announce.of(l.phrase("Selection deleted")):void 0})),!0)}function H0(t,n,e){if(t instanceof kt)for(let l of t.state.facet(kt.atomicRanges).map(r=>r(t)))l.between(n,n,(r,u)=>{rn&&(n=e?u:r)});return n}const oz=(t,n)=>k5(t,e=>{let{state:l}=t,r=l.doc.lineAt(e),u,i;if(!n&&e>r.from&&eoz(t,!1),az=t=>oz(t,!0),hz=(t,n)=>k5(t,e=>{let l=e,{state:r}=t,u=r.doc.lineAt(l),i=r.charCategorizer(l);for(let s=null;;){if(l==(n?u.to:u.from)){l==e&&u.number!=(n?r.doc.lines:1)&&(l+=n?1:-1);break}let a=Ou(u.text,l-u.from,n)+u.from,o=u.text.slice(Math.min(l,a)-u.from,Math.max(l,a)-u.from),h=i(o);if(s!=null&&h!=s)break;(o!=" "||l!=e)&&(s=h),l=a}return l}),cz=t=>hz(t,!1),jH=t=>hz(t,!0),fz=t=>k5(t,n=>{let e=t.lineBlockAt(n).to;return nk5(t,n=>{let e=t.lineBlockAt(n).from;return n>e?e:Math.max(0,n-1)}),kH=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let e=t.changeByRange(l=>({changes:{from:l.from,to:l.to,insert:Ie.of(["",""])},range:Tn.cursor(l.from)}));return n(t.update(e,{scrollIntoView:!0,userEvent:"input"})),!0},SH=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let e=t.changeByRange(l=>{if(!l.empty||l.from==0||l.from==t.doc.length)return{range:l};let r=l.from,u=t.doc.lineAt(r),i=r==u.from?r-1:Ou(u.text,r-u.from,!1)+u.from,s=r==u.to?r+1:Ou(u.text,r-u.from,!0)+u.from;return{changes:{from:i,to:s,insert:t.doc.slice(r,s).append(t.doc.slice(i,r))},range:Tn.cursor(s)}});return e.changes.empty?!1:(n(t.update(e,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function S5(t){let n=[],e=-1;for(let l of t.selection.ranges){let r=t.doc.lineAt(l.from),u=t.doc.lineAt(l.to);if(!l.empty&&l.to==u.from&&(u=t.doc.lineAt(l.to-1)),e>=r.number){let i=n[n.length-1];i.to=u.to,i.ranges.push(l)}else n.push({from:r.from,to:u.to,ranges:[l]});e=u.number+1}return n}function gz(t,n,e){if(t.readOnly)return!1;let l=[],r=[];for(let u of S5(t)){if(e?u.to==t.doc.length:u.from==0)continue;let i=t.doc.lineAt(e?u.to+1:u.from-1),s=i.length+1;if(e){l.push({from:u.to,to:i.to},{from:u.from,insert:i.text+t.lineBreak});for(let a of u.ranges)r.push(Tn.range(Math.min(t.doc.length,a.anchor+s),Math.min(t.doc.length,a.head+s)))}else{l.push({from:i.from,to:u.from},{from:u.to,insert:t.lineBreak+i.text});for(let a of u.ranges)r.push(Tn.range(a.anchor-s,a.head-s))}}return l.length?(n(t.update({changes:l,scrollIntoView:!0,selection:Tn.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const OH=({state:t,dispatch:n})=>gz(t,n,!1),CH=({state:t,dispatch:n})=>gz(t,n,!0);function mz(t,n,e){if(t.readOnly)return!1;let l=[];for(let r of S5(t))e?l.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):l.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return n(t.update({changes:l,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const AH=({state:t,dispatch:n})=>mz(t,n,!1),EH=({state:t,dispatch:n})=>mz(t,n,!0),RH=t=>{if(t.state.readOnly)return!1;let{state:n}=t,e=n.changes(S5(n).map(({from:r,to:u})=>(r>0?r--:ut.moveVertically(r,!0)).map(e);return t.dispatch({changes:e,selection:l,scrollIntoView:!0,userEvent:"delete.line"}),!0};function PH(t,n){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(n-1,n+1)))return{from:n,to:n};let e=xr(t).resolveInner(n),l=e.childBefore(n),r=e.childAfter(n),u;return l&&r&&l.to<=n&&r.from>=n&&(u=l.type.prop(le.closedBy))&&u.indexOf(r.name)>-1&&t.doc.lineAt(l.to).from==t.doc.lineAt(r.from).from?{from:l.to,to:r.from}:null}const IH=wz(!1),_H=wz(!0);function wz(t){return({state:n,dispatch:e})=>{if(n.readOnly)return!1;let l=n.changeByRange(r=>{let{from:u,to:i}=r,s=n.doc.lineAt(u),a=!t&&u==i&&PH(n,u);t&&(u=i=(i<=s.to?s:n.doc.lineAt(i)).to);let o=new d5(n,{simulateBreak:u,simulateDoubleBreak:!!a}),h=aP(o,u);for(h==null&&(h=/^\s*/.exec(n.doc.lineAt(u).text)[0].length);is.from&&u{let r=[];for(let i=l.from;i<=l.to;){let s=t.doc.lineAt(i);s.number>e&&(l.empty||l.to>s.from)&&(n(s,r,l),e=s.number),i=s.to+1}let u=t.changes(r);return{changes:r,range:Tn.range(u.mapPos(l.anchor,1),u.mapPos(l.head,1))}})}const TH=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let e=Object.create(null),l=new d5(t,{overrideIndentation:u=>{let i=e[u];return i??-1}}),r=gP(t,(u,i,s)=>{let a=aP(l,u.from);if(a==null)return;/\S/.test(u.text)||(a=0);let o=/^\s*/.exec(u.text)[0],h=$1(t,a);(o!=h||s.fromt.readOnly?!1:(n(t.update(gP(t,(e,l)=>{l.push({from:e.from,insert:t.facet(oP)})}),{userEvent:"input.indent"})),!0),MH=({state:t,dispatch:n})=>t.readOnly?!1:(n(t.update(gP(t,(e,l)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let u=Ip(r,t.tabSize),i=0,s=$1(t,Math.max(0,u-j2(t)));for(;i({mac:t.key,run:t.run,shift:t.shift}))),qH=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:FF,shift:oH},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:HF,shift:aH},{key:"Alt-ArrowUp",run:OH},{key:"Shift-Alt-ArrowUp",run:AH},{key:"Alt-ArrowDown",run:CH},{key:"Shift-Alt-ArrowDown",run:EH},{key:"Escape",run:yH},{key:"Mod-Enter",run:_H},{key:"Alt-l",mac:"Ctrl-l",run:pH},{key:"Mod-i",run:vH,preventDefault:!0},{key:"Mod-[",run:MH},{key:"Mod-]",run:DH},{key:"Mod-Alt-\\",run:TH},{key:"Shift-Mod-k",run:RH},{key:"Shift-Mod-\\",run:uH},{key:"Mod-/",run:EF},{key:"Alt-A",run:PF}].concat(NH);function nl(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var n=1,e=arguments[1];if(e&&typeof e=="object"&&e.nodeType==null&&!Array.isArray(e)){for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var r=e[l];typeof r=="string"?t.setAttribute(l,r):r!=null&&(t[l]=r)}n++}for(;nt.normalize("NFKD"):t=>t;class rw{constructor(n,e,l=0,r=n.length,u,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(l,r),this.bufferStart=l,this.normalize=u?s=>u(TM(s)):TM,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 Jr(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let n=this.peek();if(n<0)return this.done=!0,this;let e=GR(n),l=this.bufferStart+this.bufferPos;this.bufferPos+=Bi(n);let r=this.normalize(e);for(let u=0,i=l;;u++){let s=r.charCodeAt(u),a=this.match(s,i);if(a)return this.value=a,this;if(u==r.length-1)break;i==l&&uthis.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 n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let l=this.curLineStart+e.index,r=l+e[0].length;if(this.matchPos=O2(this.text,r+(l==r?1:0)),l==this.curLineStart+this.curLine.length&&this.nextLine(),(lthis.value.to)&&(!this.test||this.test(l,r,e)))return this.value={from:l,to:r,match:e},this;n=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=l||r.to<=e){let s=new Cm(e,n.sliceString(e,l));return Ij.set(n,s),s}if(r.from==e&&r.to==l)return r;let{text:u,from:i}=r;return i>e&&(u=n.sliceString(e,i)+u,i=e),r.to=this.to?this.to:this.text.lineAt(n).to}next(){for(;;){let n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){let l=this.flat.from+e.index,r=l+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(l,r,e)))return this.value={from:l,to:r,match:e},this.matchPos=O2(this.text,r+(l==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Cm.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(vz.prototype[Symbol.iterator]=yz.prototype[Symbol.iterator]=function(){return this});function LH(t){try{return new RegExp(t,mP),!0}catch{return!1}}function O2(t,n){if(n>=t.length)return n;let e=t.lineAt(n),l;for(;n=56320&&l<57344;)n++;return n}function mk(t){let n=nl("input",{class:"cm-textfield",name:"line"}),e=nl("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),t.dispatch({effects:C2.of(!1)}),t.focus()):r.keyCode==13&&(r.preventDefault(),l())},onsubmit:r=>{r.preventDefault(),l()}},nl("label",t.state.phrase("Go to line"),": ",n)," ",nl("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function l(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!r)return;let{state:u}=t,i=u.doc.lineAt(u.selection.main.head),[,s,a,o,h]=r,c=o?+o.slice(1):0,f=a?+a:i.number;if(a&&h){let C=f/100;s&&(C=C*(s=="-"?-1:1)+i.number/u.doc.lines),f=Math.round(u.doc.lines*C)}else a&&s&&(f=f*(s=="-"?-1:1)+i.number);let d=u.doc.line(Math.max(1,Math.min(u.doc.lines,f)));t.dispatch({effects:C2.of(!1),selection:Tn.cursor(d.from+Math.max(0,Math.min(c,d.length))),scrollIntoView:!0}),t.focus()}return{dom:e}}const C2=ee.define(),DM=eu.define({create(){return!0},update(t,n){for(let e of n.effects)e.is(C2)&&(t=e.value);return t},provide:t=>M1.from(t,n=>n?mk:null)}),WH=t=>{let n=D1(t,mk);if(!n){let e=[C2.of(!0)];t.state.field(DM,!1)==null&&e.push(ee.appendConfig.of([DM,VH])),t.dispatch({effects:e}),n=D1(t,mk)}return n&&n.dom.querySelector("input").focus(),!0},VH=kt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),zH={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},jz=dt.define({combine(t){return Wo(t,zH,{highlightWordAroundCursor:(n,e)=>n||e,minSelectionLength:Math.min,maxMatches:Math.min})}});function UH(t){let n=[KH,JH];return t&&n.push(jz.of(t)),n}const YH=Tt.mark({class:"cm-selectionMatch"}),QH=Tt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function MM(t,n,e,l){return(e==0||t(n.sliceDoc(e-1,e))!=dl.Word)&&(l==n.doc.length||t(n.sliceDoc(l,l+1))!=dl.Word)}function GH(t,n,e,l){return t(n.sliceDoc(e,e+1))==dl.Word&&t(n.sliceDoc(l-1,l))==dl.Word}const JH=Or.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 n=t.state.facet(jz),{state:e}=t,l=e.selection;if(l.ranges.length>1)return Tt.none;let r=l.main,u,i=null;if(r.empty){if(!n.highlightWordAroundCursor)return Tt.none;let a=e.wordAt(r.head);if(!a)return Tt.none;i=e.charCategorizer(r.head),u=e.sliceDoc(a.from,a.to)}else{let a=r.to-r.from;if(a200)return Tt.none;if(n.wholeWords){if(u=e.sliceDoc(r.from,r.to),i=e.charCategorizer(r.head),!(MM(i,e,r.from,r.to)&&GH(i,e,r.from,r.to)))return Tt.none}else if(u=e.sliceDoc(r.from,r.to).trim(),!u)return Tt.none}let s=[];for(let a of t.visibleRanges){let o=new rw(e.doc,u,a.from,a.to);for(;!o.next().done;){let{from:h,to:c}=o.value;if((!i||MM(i,e,h,c))&&(r.empty&&h<=r.from&&c>=r.to?s.push(QH.range(h,c)):(h>=r.to||c<=r.from)&&s.push(YH.range(h,c)),s.length>n.maxMatches))return Tt.none}}return Tt.set(s)}},{decorations:t=>t.decorations}),KH=kt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),BH=({state:t,dispatch:n})=>{let{selection:e}=t,l=Tn.create(e.ranges.map(r=>t.wordAt(r.head)||Tn.cursor(r.head)),e.mainIndex);return l.eq(e)?!1:(n(t.update({selection:l})),!0)};function XH(t,n){let{main:e,ranges:l}=t.selection,r=t.wordAt(e.head),u=r&&r.from==e.from&&r.to==e.to;for(let i=!1,s=new rw(t.doc,n,l[l.length-1].to);;)if(s.next(),s.done){if(i)return null;s=new rw(t.doc,n,0,Math.max(0,l[l.length-1].from-1)),i=!0}else{if(i&&l.some(a=>a.from==s.value.from))continue;if(u){let a=t.wordAt(s.value.from);if(!a||a.from!=s.value.from||a.to!=s.value.to)continue}return s.value}}const FH=({state:t,dispatch:n})=>{let{ranges:e}=t.selection;if(e.some(u=>u.from===u.to))return BH({state:t,dispatch:n});let l=t.sliceDoc(e[0].from,e[0].to);if(t.selection.ranges.some(u=>t.sliceDoc(u.from,u.to)!=l))return!1;let r=XH(t,l);return r?(n(t.update({selection:t.selection.addRange(Tn.range(r.from,r.to),!1),effects:kt.scrollIntoView(r.to)})),!0):!1},Jw=dt.define({combine(t){return Wo(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:n=>new oZ(n),scrollToMatch:n=>kt.scrollIntoView(n)})}});class xz{constructor(n){this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||LH(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}unquote(n){return this.literal?n:n.replace(/\\([nrt\\])/g,(e,l)=>l=="n"?` -`:l=="r"?"\r":l=="t"?" ":"\\")}eq(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}create(){return this.regexp?new nZ(this):new ZH(this)}getCursor(n,e=0,l){let r=n.doc?n:Oe.create({doc:n});return l==null&&(l=r.doc.length),this.regexp?sm(this,r,e,l):im(this,r,e,l)}}class kz{constructor(n){this.spec=n}}function im(t,n,e,l){return new rw(n.doc,t.unquoted,e,l,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?HH(n.doc,n.charCategorizer(n.selection.main.head)):void 0)}function HH(t,n){return(e,l,r,u)=>((u>e||u+r.length=e)return null;r.push(l.value)}return r}highlight(n,e,l,r){let u=im(this.spec,n,Math.max(0,e-this.spec.unquoted.length),Math.min(l+this.spec.unquoted.length,n.doc.length));for(;!u.next().done;)r(u.value.from,u.value.to)}}function sm(t,n,e,l){return new vz(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?bH(n.charCategorizer(n.selection.main.head)):void 0},e,l)}function A2(t,n){return t.slice(Ou(t,n,!1),n)}function E2(t,n){return t.slice(n,Ou(t,n))}function bH(t){return(n,e,l)=>!l[0].length||(t(A2(l.input,l.index))!=dl.Word||t(E2(l.input,l.index))!=dl.Word)&&(t(E2(l.input,l.index+l[0].length))!=dl.Word||t(A2(l.input,l.index+l[0].length))!=dl.Word)}class nZ extends kz{nextMatch(n,e,l){let r=sm(this.spec,n,l,n.doc.length).next();return r.done&&(r=sm(this.spec,n,0,e).next()),r.done?null:r.value}prevMatchInRange(n,e,l){for(let r=1;;r++){let u=Math.max(e,l-r*1e4),i=sm(this.spec,n,u,l),s=null;for(;!i.next().done;)s=i.value;if(s&&(u==e||s.from>u+10))return s;if(u==e)return null}}prevMatch(n,e,l){return this.prevMatchInRange(n,0,e)||this.prevMatchInRange(n,l,n.doc.length)}getReplacement(n){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(e,l)=>l=="$"?"$":l=="&"?n.match[0]:l!="0"&&+l=e)return null;r.push(l.value)}return r}highlight(n,e,l,r){let u=sm(this.spec,n,Math.max(0,e-250),Math.min(l+250,n.doc.length));for(;!u.next().done;)r(u.value.from,u.value.to)}}const N1=ee.define(),wP=ee.define(),Mh=eu.define({create(t){return new _j(wk(t).create(),null)},update(t,n){for(let e of n.effects)e.is(N1)?t=new _j(e.value.create(),t.panel):e.is(wP)&&(t=new _j(t.query,e.value?dP:null));return t},provide:t=>M1.from(t,n=>n.panel)});class _j{constructor(n,e){this.query=n,this.panel=e}}const tZ=Tt.mark({class:"cm-searchMatch"}),eZ=Tt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),lZ=Or.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Mh))}update(t){let n=t.state.field(Mh);(n!=t.startState.field(Mh)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(n))}highlight({query:t,panel:n}){if(!n||!t.spec.valid)return Tt.none;let{view:e}=this,l=new Qh;for(let r=0,u=e.visibleRanges,i=u.length;ru[r+1].from-2*250;)a=u[++r].to;t.highlight(e.state,s,a,(o,h)=>{let c=e.state.selection.ranges.some(f=>f.from==o&&f.to==h);l.add(o,h,c?eZ:tZ)})}return l.finish()}},{decorations:t=>t.decorations});function Mp(t){return n=>{let e=n.state.field(Mh,!1);return e&&e.query.spec.valid?t(n,e):Cz(n)}}const R2=Mp((t,{query:n})=>{let{to:e}=t.state.selection.main,l=n.nextMatch(t.state,e,e);if(!l)return!1;let r=Tn.single(l.from,l.to),u=t.state.facet(Jw);return t.dispatch({selection:r,effects:[pP(t,l),u.scrollToMatch(r.main,t)],userEvent:"select.search"}),Oz(t),!0}),P2=Mp((t,{query:n})=>{let{state:e}=t,{from:l}=e.selection.main,r=n.prevMatch(e,l,l);if(!r)return!1;let u=Tn.single(r.from,r.to),i=t.state.facet(Jw);return t.dispatch({selection:u,effects:[pP(t,r),i.scrollToMatch(u.main,t)],userEvent:"select.search"}),Oz(t),!0}),rZ=Mp((t,{query:n})=>{let e=n.matchAll(t.state,1e3);return!e||!e.length?!1:(t.dispatch({selection:Tn.create(e.map(l=>Tn.range(l.from,l.to))),userEvent:"select.search.matches"}),!0)}),uZ=({state:t,dispatch:n})=>{let e=t.selection;if(e.ranges.length>1||e.main.empty)return!1;let{from:l,to:r}=e.main,u=[],i=0;for(let s=new rw(t.doc,t.sliceDoc(l,r));!s.next().done;){if(u.length>1e3)return!1;s.value.from==l&&(i=u.length),u.push(Tn.range(s.value.from,s.value.to))}return n(t.update({selection:Tn.create(u,i),userEvent:"select.search.matches"})),!0},$M=Mp((t,{query:n})=>{let{state:e}=t,{from:l,to:r}=e.selection.main;if(e.readOnly)return!1;let u=n.nextMatch(e,l,l);if(!u)return!1;let i=[],s,a,o=[];if(u.from==l&&u.to==r&&(a=e.toText(n.getReplacement(u)),i.push({from:u.from,to:u.to,insert:a}),u=n.nextMatch(e,u.from,u.to),o.push(kt.announce.of(e.phrase("replaced match on line $",e.doc.lineAt(l).number)+"."))),u){let h=i.length==0||i[0].from>=u.to?0:u.to-u.from-a.length;s=Tn.single(u.from-h,u.to-h),o.push(pP(t,u)),o.push(e.facet(Jw).scrollToMatch(s.main,t))}return t.dispatch({changes:i,selection:s,effects:o,userEvent:"input.replace"}),!0}),iZ=Mp((t,{query:n})=>{if(t.state.readOnly)return!1;let e=n.matchAll(t.state,1e9).map(r=>{let{from:u,to:i}=r;return{from:u,to:i,insert:n.getReplacement(r)}});if(!e.length)return!1;let l=t.state.phrase("replaced $ matches",e.length)+".";return t.dispatch({changes:e,effects:kt.announce.of(l),userEvent:"input.replace.all"}),!0});function dP(t){return t.state.facet(Jw).createPanel(t)}function wk(t,n){var e,l,r,u,i;let s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;let o=t.facet(Jw);return new xz({search:((e=n==null?void 0:n.literal)!==null&&e!==void 0?e:o.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(l=n==null?void 0:n.caseSensitive)!==null&&l!==void 0?l:o.caseSensitive,literal:(r=n==null?void 0:n.literal)!==null&&r!==void 0?r:o.literal,regexp:(u=n==null?void 0:n.regexp)!==null&&u!==void 0?u:o.regexp,wholeWord:(i=n==null?void 0:n.wholeWord)!==null&&i!==void 0?i:o.wholeWord})}function Sz(t){let n=D1(t,dP);return n&&n.dom.querySelector("[main-field]")}function Oz(t){let n=Sz(t);n&&n==t.root.activeElement&&n.select()}const Cz=t=>{let n=t.state.field(Mh,!1);if(n&&n.panel){let e=Sz(t);if(e&&e!=t.root.activeElement){let l=wk(t.state,n.query.spec);l.valid&&t.dispatch({effects:N1.of(l)}),e.focus(),e.select()}}else t.dispatch({effects:[wP.of(!0),n?N1.of(wk(t.state,n.query.spec)):ee.appendConfig.of(hZ)]});return!0},Az=t=>{let n=t.state.field(Mh,!1);if(!n||!n.panel)return!1;let e=D1(t,dP);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:wP.of(!1)}),!0},sZ=[{key:"Mod-f",run:Cz,scope:"editor search-panel"},{key:"F3",run:R2,shift:P2,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:R2,shift:P2,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Az,scope:"editor search-panel"},{key:"Mod-Shift-l",run:uZ},{key:"Alt-g",run:WH},{key:"Mod-d",run:FH,preventDefault:!0}];class oZ{constructor(n){this.view=n;let e=this.query=n.state.field(Mh).query.spec;this.commit=this.commit.bind(this),this.searchField=nl("input",{value:e.search,placeholder:ci(n,"Find"),"aria-label":ci(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=nl("input",{value:e.replace,placeholder:ci(n,"Replace"),"aria-label":ci(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=nl("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=nl("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=nl("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit});function l(r,u,i){return nl("button",{class:"cm-button",name:r,onclick:u,type:"button"},i)}this.dom=nl("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,l("next",()=>R2(n),[ci(n,"next")]),l("prev",()=>P2(n),[ci(n,"previous")]),l("select",()=>rZ(n),[ci(n,"all")]),nl("label",null,[this.caseField,ci(n,"match case")]),nl("label",null,[this.reField,ci(n,"regexp")]),nl("label",null,[this.wordField,ci(n,"by word")]),...n.state.readOnly?[]:[nl("br"),this.replaceField,l("replace",()=>$M(n),[ci(n,"replace")]),l("replaceAll",()=>iZ(n),[ci(n,"replace all")])],nl("button",{name:"close",onclick:()=>Az(n),"aria-label":ci(n,"close"),type:"button"},["×"])])}commit(){let n=new xz({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:N1.of(n)}))}keydown(n){OB(this.view,n,"search-panel")?n.preventDefault():n.keyCode==13&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?P2:R2)(this.view)):n.keyCode==13&&n.target==this.replaceField&&(n.preventDefault(),$M(this.view))}update(n){for(let e of n.transactions)for(let l of e.effects)l.is(N1)&&!l.value.eq(this.query)&&this.setQuery(l.value)}setQuery(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Jw).top}}function ci(t,n){return t.state.phrase(n)}const Z0=30,b0=/[\s\.,:;?!]/;function pP(t,{from:n,to:e}){let l=t.state.doc.lineAt(n),r=t.state.doc.lineAt(e).to,u=Math.max(l.from,n-Z0),i=Math.min(r,e+Z0),s=t.state.sliceDoc(u,i);if(u!=l.from){for(let a=0;as.length-Z0;a--)if(!b0.test(s[a-1])&&b0.test(s[a])){s=s.slice(0,a);break}}return kt.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${l.number}.`)}const aZ=kt.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"}}),hZ=[Mh,fg.lowest(lZ),aZ];class Ez{constructor(n,e,l){this.state=n,this.pos=e,this.explicit=l,this.abortListeners=[]}tokenBefore(n){let e=xr(this.state).resolveInner(this.pos,-1);for(;e&&n.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(n){let e=this.state.doc.lineAt(this.pos),l=Math.max(e.from,this.pos-250),r=e.text.slice(l-e.from,this.pos-e.from),u=r.search(Rz(n,!1));return u<0?null:{from:l+u,to:this.pos,text:r.slice(u)}}get aborted(){return this.abortListeners==null}addEventListener(n,e){n=="abort"&&this.abortListeners&&this.abortListeners.push(e)}}function NM(t){let n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),`[${e?"\\w":""}${n.replace(/[^\w\s]/g,"\\$&")}]`}function cZ(t){let n=Object.create(null),e=Object.create(null);for(let{label:r}of t){n[r[0]]=!0;for(let u=1;utypeof r=="string"?{label:r}:r),[e,l]=n.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:cZ(n);return r=>{let u=r.matchBefore(l);return u||r.explicit?{from:u?u.from:r.pos,options:n,validFor:e}:null}}class qM{constructor(n,e,l,r){this.completion=n,this.source=e,this.match=l,this.score=r}}function $h(t){return t.selection.main.from}function Rz(t,n){var e;let{source:l}=t,r=n&&l[0]!="^",u=l[l.length-1]!="$";return!r&&!u?t:new RegExp(`${r?"^":""}(?:${l})${u?"$":""}`,(e=t.flags)!==null&&e!==void 0?e:t.ignoreCase?"i":"")}const gZ=eh.define();function mZ(t,n,e,l){let{main:r}=t.selection,u=e-r.from,i=l-r.from;return Object.assign(Object.assign({},t.changeByRange(s=>s!=r&&e!=l&&t.sliceDoc(s.from+u,s.from+i)!=t.sliceDoc(e,l)?{range:s}:{changes:{from:s.from+u,to:l==r.from?s.to:s.from+i,insert:n},range:Tn.cursor(s.from+u+n.length)})),{userEvent:"input.complete"})}const LM=new WeakMap;function wZ(t){if(!Array.isArray(t))return t;let n=LM.get(t);return n||LM.set(t,n=fZ(t)),n}const vP=ee.define(),q1=ee.define();class dZ{constructor(n){this.pattern=n,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let e=0;e=48&&ln<=57||ln>=97&&ln<=122?2:ln>=65&&ln<=90?1:0:(B=GR(ln))!=B.toLowerCase()?1:B!=B.toUpperCase()?2:0;(!G||O==1&&T||en==0&&O!=0)&&(e[c]==ln||l[c]==ln&&(f=!0)?i[c++]=G:i.length&&($=!1)),en=O,G+=Bi(ln)}return c==a&&i[0]==0&&$?this.result(-100+(f?-200:0),i,n):d==a&&C==0?[-200-n.length+(I==n.length?0:-100),0,I]:s>-1?[-700-n.length,s,s+this.pattern.length]:d==a?[-200+-700-n.length,C,I]:c==a?this.result(-100+(f?-200:0)+-700+($?0:-1100),i,n):e.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,n)}result(n,e,l){let r=[n-l.length],u=1;for(let i of e){let s=i+(this.astral?Bi(Jr(l,i)):1);u>1&&r[u-1]==i?r[u-1]=s:(r[u++]=i,r[u++]=s)}return r}}const Xu=dt.define({combine(t){return Wo(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:pZ,compareCompletions:(n,e)=>n.label.localeCompare(e.label),interactionDelay:75},{defaultKeymap:(n,e)=>n&&e,closeOnBlur:(n,e)=>n&&e,icons:(n,e)=>n&&e,tooltipClass:(n,e)=>l=>WM(n(l),e(l)),optionClass:(n,e)=>l=>WM(n(l),e(l)),addToOptions:(n,e)=>n.concat(e)})}});function WM(t,n){return t?n?t+" "+n:t:n}function pZ(t,n,e,l,r){let u=t.textDirection==Cl.RTL,i=u,s=!1,a="top",o,h,c=n.left-r.left,f=r.right-n.right,d=l.right-l.left,C=l.bottom-l.top;if(i&&c=C||I>n.top?o=e.bottom-n.top:(a="bottom",o=n.bottom-e.top)}return{style:`${a}: ${o}px; max-width: ${h}px`,class:"cm-completionInfo-"+(s?u?"left-narrow":"right-narrow":i?"left":"right")}}function vZ(t){let n=t.addToOptions.slice();return t.icons&&n.push({render(e){let l=document.createElement("div");return l.classList.add("cm-completionIcon"),e.type&&l.classList.add(...e.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),l.setAttribute("aria-hidden","true"),l},position:20}),n.push({render(e,l,r){let u=document.createElement("span");u.className="cm-completionLabel";let{label:i}=e,s=0;for(let a=1;as&&u.appendChild(document.createTextNode(i.slice(s,o)));let c=u.appendChild(document.createElement("span"));c.appendChild(document.createTextNode(i.slice(o,h))),c.className="cm-completionMatchedText",s=h}return se.position-l.position).map(e=>e.render)}function VM(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){let r=Math.floor(n/e);return{from:r*e,to:(r+1)*e}}let l=Math.floor((t-n)/e);return{from:t-(l+1)*e,to:t-l*e}}class yZ{constructor(n,e,l){this.view=n,this.stateField=e,this.applyCompletion=l,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let r=n.state.field(e),{options:u,selected:i}=r.open,s=n.state.facet(Xu);this.optionContent=vZ(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=VM(u.length,i,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(n.state),this.dom.addEventListener("mousedown",a=>{for(let o=a.target,h;o&&o!=this.dom;o=o.parentNode)if(o.nodeName=="LI"&&(h=/-(\d+)$/.exec(o.id))&&+h[1]{let o=n.state.field(this.stateField,!1);o&&o.tooltip&&n.state.facet(Xu).closeOnBlur&&a.relatedTarget!=n.contentDOM&&n.dispatch({effects:q1.of(null)})}),this.list=this.dom.appendChild(this.createListBox(u,r.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(n){var e,l,r;let u=n.state.field(this.stateField),i=n.startState.field(this.stateField);this.updateTooltipClass(n.state),u!=i&&(this.updateSel(),((e=u.open)===null||e===void 0?void 0:e.disabled)!=((l=i.open)===null||l===void 0?void 0:l.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((r=u.open)===null||r===void 0)&&r.disabled)))}updateTooltipClass(n){let e=this.tooltipClass(n);if(e!=this.currentClass){for(let l of this.currentClass.split(" "))l&&this.dom.classList.remove(l);for(let l of e.split(" "))l&&this.dom.classList.add(l);this.currentClass=e}}positioned(n){this.space=n,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let n=this.view.state.field(this.stateField),e=n.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=VM(e.options.length,e.selected,this.view.state.facet(Xu).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e.options,n.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:l}=e.options[e.selected],{info:r}=l;if(!r)return;let u=typeof r=="string"?document.createTextNode(r):r(l);if(!u)return;"then"in u?u.then(i=>{i&&this.view.state.field(this.stateField,!1)==n&&this.addInfoPane(i,l)}).catch(i=>bi(this.view.state,i,"completion info")):this.addInfoPane(u,l)}}addInfoPane(n,e){this.destroyInfo();let l=this.info=document.createElement("div");if(l.className="cm-tooltip cm-completionInfo",n.nodeType!=null)l.appendChild(n),this.infoDestroy=null;else{let{dom:r,destroy:u}=n;l.appendChild(r),this.infoDestroy=u||null}this.dom.appendChild(l),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(n){let e=null;for(let l=this.list.firstChild,r=this.range.from;l;l=l.nextSibling,r++)l.nodeName!="LI"||!l.id?r--:r==n?l.hasAttribute("aria-selected")||(l.setAttribute("aria-selected","true"),e=l):l.hasAttribute("aria-selected")&&l.removeAttribute("aria-selected");return e&&xZ(this.list,e),e}measureInfo(){let n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;let e=this.dom.getBoundingClientRect(),l=this.info.getBoundingClientRect(),r=n.getBoundingClientRect(),u=this.space;if(!u){let i=this.dom.ownerDocument.defaultView||window;u={left:0,top:0,right:i.innerWidth,bottom:i.innerHeight}}return r.top>Math.min(u.bottom,e.bottom)-10||r.bottoml.from||l.from==0))if(u=f,typeof o!="string"&&o.header)r.appendChild(o.header(o));else{let d=r.appendChild(document.createElement("completion-section"));d.textContent=f}}const h=r.appendChild(document.createElement("li"));h.id=e+"-"+i,h.setAttribute("role","option");let c=this.optionClass(s);c&&(h.className=c);for(let f of this.optionContent){let d=f(s,this.view.state,a);d&&h.appendChild(d)}}return l.from&&r.classList.add("cm-completionListIncompleteTop"),l.tonew yZ(e,t,n)}function xZ(t,n){let e=t.getBoundingClientRect(),l=n.getBoundingClientRect();l.tope.bottom&&(t.scrollTop+=l.bottom-e.bottom)}function zM(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function kZ(t,n){let e=[],l=null,r=a=>{e.push(a);let{section:o}=a.completion;if(o){l||(l=[]);let h=typeof o=="string"?o:o.name;l.some(c=>c.name==h)||l.push(typeof o=="string"?{name:h}:o)}};for(let a of t)if(a.hasResult())if(a.result.filter===!1){let o=a.result.getMatch;for(let h of a.result.options){let c=[1e9-e.length];if(o)for(let f of o(h))c.push(f);r(new qM(h,a.source,c,c[0]))}}else{let o=new dZ(n.sliceDoc(a.from,a.to)),h;for(let c of a.result.options)(h=o.match(c.label))&&r(new qM(c,a.source,h,h[0]+(c.boost||0)))}if(l){let a=Object.create(null),o=0,h=(c,f)=>{var d,C;return((d=c.rank)!==null&&d!==void 0?d:1e9)-((C=f.rank)!==null&&C!==void 0?C:1e9)||(c.nameh.score-o.score||s(o.completion,h.completion)))!i||i.label!=a.completion.label||i.detail!=a.completion.detail||i.type!=null&&a.completion.type!=null&&i.type!=a.completion.type||i.apply!=a.completion.apply?u.push(a):zM(a.completion)>zM(i)&&(u[u.length-1]=a),i=a.completion;return u}class gm{constructor(n,e,l,r,u,i){this.options=n,this.attrs=e,this.tooltip=l,this.timestamp=r,this.selected=u,this.disabled=i}setSelected(n,e){return n==this.selected||n>=this.options.length?this:new gm(this.options,UM(e,n),this.tooltip,this.timestamp,n,this.disabled)}static build(n,e,l,r,u){let i=kZ(n,e);if(!i.length)return r&&n.some(a=>a.state==1)?new gm(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=e.facet(Xu).selectOnOpen?0:-1;if(r&&r.selected!=s&&r.selected!=-1){let a=r.options[r.selected].completion;for(let o=0;oo.hasResult()?Math.min(a,o.from):a,1e8),create:jZ(wi,_z),above:u.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(n){return new gm(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class I2{constructor(n,e,l){this.active=n,this.id=e,this.open=l}static start(){return new I2(CZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(n){let{state:e}=n,l=e.facet(Xu),u=(l.override||e.languageDataAt("autocomplete",$h(e)).map(wZ)).map(s=>(this.active.find(o=>o.source==s)||new Qu(s,this.active.some(o=>o.state!=0)?1:0)).update(n,l));u.length==this.active.length&&u.every((s,a)=>s==this.active[a])&&(u=this.active);let i=this.open;i&&n.docChanged&&(i=i.map(n.changes)),n.selection||u.some(s=>s.hasResult()&&n.changes.touchesRange(s.from,s.to))||!SZ(u,this.active)?i=gm.build(u,e,this.id,i,l):i&&i.disabled&&!u.some(s=>s.state==1)&&(i=null),!i&&u.every(s=>s.state!=1)&&u.some(s=>s.hasResult())&&(u=u.map(s=>s.hasResult()?new Qu(s.source,0):s));for(let s of n.effects)s.is(Iz)&&(i=i&&i.setSelected(s.value,this.id));return u==this.active&&i==this.open?this:new I2(u,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:OZ}}function SZ(t,n){if(t==n)return!0;for(let e=0,l=0;;){for(;e-1&&(e["aria-activedescendant"]=t+"-"+n),e}const CZ=[];function dk(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Qu{constructor(n,e,l=-1){this.source=n,this.state=e,this.explicitPos=l}hasResult(){return!1}update(n,e){let l=dk(n),r=this;l?r=r.handleUserEvent(n,l,e):n.docChanged?r=r.handleChange(n):n.selection&&r.state!=0&&(r=new Qu(r.source,0));for(let u of n.effects)if(u.is(vP))r=new Qu(r.source,1,u.value?$h(n.state):-1);else if(u.is(q1))r=new Qu(r.source,0);else if(u.is(Pz))for(let i of u.value)i.source==r.source&&(r=i);return r}handleUserEvent(n,e,l){return e=="delete"||!l.activateOnTyping?this.map(n.changes):new Qu(this.source,1)}handleChange(n){return n.changes.touchesRange($h(n.startState))?new Qu(this.source,0):this.map(n.changes)}map(n){return n.empty||this.explicitPos<0?this:new Qu(this.source,this.state,n.mapPos(this.explicitPos))}}class Am extends Qu{constructor(n,e,l,r,u){super(n,2,e),this.result=l,this.from=r,this.to=u}hasResult(){return!0}handleUserEvent(n,e,l){var r;let u=n.changes.mapPos(this.from),i=n.changes.mapPos(this.to,1),s=$h(n.state);if((this.explicitPos<0?s<=u:si||e=="delete"&&$h(n.startState)==this.from)return new Qu(this.source,e=="input"&&l.activateOnTyping?1:0);let a=this.explicitPos<0?-1:n.changes.mapPos(this.explicitPos),o;return AZ(this.result.validFor,n.state,u,i)?new Am(this.source,a,this.result,u,i):this.result.update&&(o=this.result.update(this.result,u,i,new Ez(n.state,s,a>=0)))?new Am(this.source,a,o,o.from,(r=o.to)!==null&&r!==void 0?r:$h(n.state)):new Qu(this.source,1,a)}handleChange(n){return n.changes.touchesRange(this.from,this.to)?new Qu(this.source,0):this.map(n.changes)}map(n){return n.empty?this:new Am(this.source,this.explicitPos<0?-1:n.mapPos(this.explicitPos),this.result,n.mapPos(this.from),n.mapPos(this.to,1))}}function AZ(t,n,e,l){if(!t)return!1;let r=n.sliceDoc(e,l);return typeof t=="function"?t(r,e,l,n):Rz(t,!0).test(r)}const Pz=ee.define({map(t,n){return t.map(e=>e.map(n))}}),Iz=ee.define(),wi=eu.define({create(){return I2.start()},update(t,n){return t.update(n)},provide:t=>[eP.from(t,n=>n.tooltip),kt.contentAttributes.from(t,n=>n.attrs)]});function _z(t,n){const e=n.completion.apply||n.completion.label;let l=t.state.field(wi).active.find(r=>r.source==n.source);return l instanceof Am?(typeof e=="string"?t.dispatch(Object.assign(Object.assign({},mZ(t.state,e,l.from,l.to)),{annotations:gZ.of(n.completion)})):e(t,n.completion,l.from,l.to),!0):!1}function nv(t,n="option"){return e=>{let l=e.state.field(wi,!1);if(!l||!l.open||l.open.disabled||Date.now()-l.open.timestamp-1?l.open.selected+r*(t?1:-1):t?0:i-1;return s<0?s=n=="page"?0:i-1:s>=i&&(s=n=="page"?i-1:0),e.dispatch({effects:Iz.of(s)}),!0}}const EZ=t=>{let n=t.state.field(wi,!1);return t.state.readOnly||!n||!n.open||n.open.selected<0||Date.now()-n.open.timestampt.state.field(wi,!1)?(t.dispatch({effects:vP.of(!0)}),!0):!1,PZ=t=>{let n=t.state.field(wi,!1);return!n||!n.active.some(e=>e.state!=0)?!1:(t.dispatch({effects:q1.of(null)}),!0)};class IZ{constructor(n,e){this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const YM=50,_Z=50,TZ=1e3,DZ=Or.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let n of t.state.field(wi).active)n.state==1&&this.startQuery(n)}update(t){let n=t.state.field(wi);if(!t.selectionSet&&!t.docChanged&&t.startState.field(wi)==n)return;let e=t.transactions.some(l=>(l.selection||l.docChanged)&&!dk(l));for(let l=0;l_Z&&Date.now()-r.time>TZ){for(let u of r.context.abortListeners)try{u()}catch(i){bi(this.view.state,i)}r.context.abortListeners=null,this.running.splice(l--,1)}else r.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=n.active.some(l=>l.state==1&&!this.running.some(r=>r.active.source==l.source))?setTimeout(()=>this.startUpdate(),YM):-1,this.composing!=0)for(let l of t.transactions)dk(l)=="input"?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,n=t.field(wi);for(let e of n.active)e.state==1&&!this.running.some(l=>l.active.source==e.source)&&this.startQuery(e)}startQuery(t){let{state:n}=this.view,e=$h(n),l=new Ez(n,e,t.explicitPos==e),r=new IZ(t,l);this.running.push(r),Promise.resolve(t.source(l)).then(u=>{r.context.aborted||(r.done=u||null,this.scheduleAccept())},u=>{this.view.dispatch({effects:q1.of(null)}),bi(this.view.state,u)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),YM))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let n=[],e=this.view.state.facet(Xu);for(let l=0;li.source==r.active.source);if(u&&u.state==1)if(r.done==null){let i=new Qu(r.active.source,0);for(let s of r.updates)i=i.update(s,e);i.state!=1&&n.push(i)}else this.startQuery(u)}n.length&&this.view.dispatch({effects:Pz.of(n)})}},{eventHandlers:{blur(t){let n=this.view.state.field(wi,!1);if(n&&n.tooltip&&this.view.state.facet(Xu).closeOnBlur){let e=n.open&&mV(this.view,n.open.tooltip);(!e||!e.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:q1.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:vP.of(!1)}),20),this.composing=0}}}),MZ=kt.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"},".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"}}}),L1={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},of=ee.define({map(t,n){let e=n.mapPos(t,-1,ku.TrackAfter);return e??void 0}}),yP=new class extends Rf{};yP.startSide=1;yP.endSide=-1;const Tz=eu.define({create(){return We.empty},update(t,n){if(n.selection){let e=n.state.doc.lineAt(n.selection.main.head).from,l=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(l,-1)&&(t=We.empty)}t=t.map(n.changes);for(let e of n.effects)e.is(of)&&(t=t.update({add:[yP.range(e.value,e.value+1)]}));return t}});function $Z(){return[qZ,Tz]}const Tj="()[]{}<>";function Dz(t){for(let n=0;n{if((NZ?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(l.length>2||l.length==2&&Bi(Jr(l,0))==1||n!=r.from||e!=r.to)return!1;let u=VZ(t.state,l);return u?(t.dispatch(u),!0):!1}),LZ=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let l=Mz(t,t.selection.main.head).brackets||L1.brackets,r=null,u=t.changeByRange(i=>{if(i.empty){let s=zZ(t.doc,i.head);for(let a of l)if(a==s&&O5(t.doc,i.head)==Dz(Jr(a,0)))return{changes:{from:i.head-a.length,to:i.head+a.length},range:Tn.cursor(i.head-a.length)}}return{range:r=i}});return r||n(t.update(u,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},WZ=[{key:"Backspace",run:LZ}];function VZ(t,n){let e=Mz(t,t.selection.main.head),l=e.brackets||L1.brackets;for(let r of l){let u=Dz(Jr(r,0));if(n==r)return u==r?QZ(t,r,l.indexOf(r+r+r)>-1,e):UZ(t,r,u,e.before||L1.before);if(n==u&&$z(t,t.selection.main.from))return YZ(t,r,u)}return null}function $z(t,n){let e=!1;return t.field(Tz).between(0,t.doc.length,l=>{l==n&&(e=!0)}),e}function O5(t,n){let e=t.sliceString(n,n+2);return e.slice(0,Bi(Jr(e,0)))}function zZ(t,n){let e=t.sliceString(n-2,n);return Bi(Jr(e,0))==e.length?e:e.slice(1)}function UZ(t,n,e,l){let r=null,u=t.changeByRange(i=>{if(!i.empty)return{changes:[{insert:n,from:i.from},{insert:e,from:i.to}],effects:of.of(i.to+n.length),range:Tn.range(i.anchor+n.length,i.head+n.length)};let s=O5(t.doc,i.head);return!s||/\s/.test(s)||l.indexOf(s)>-1?{changes:{insert:n+e,from:i.head},effects:of.of(i.head+n.length),range:Tn.cursor(i.head+n.length)}:{range:r=i}});return r?null:t.update(u,{scrollIntoView:!0,userEvent:"input.type"})}function YZ(t,n,e){let l=null,r=t.changeByRange(u=>u.empty&&O5(t.doc,u.head)==e?{changes:{from:u.head,to:u.head+e.length,insert:e},range:Tn.cursor(u.head+e.length)}:l={range:u});return l?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function QZ(t,n,e,l){let r=l.stringPrefixes||L1.stringPrefixes,u=null,i=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:n,from:s.to}],effects:of.of(s.to+n.length),range:Tn.range(s.anchor+n.length,s.head+n.length)};let a=s.head,o=O5(t.doc,a),h;if(o==n){if(QM(t,a))return{changes:{insert:n+n,from:a},effects:of.of(a+n.length),range:Tn.cursor(a+n.length)};if($z(t,a)){let f=e&&t.sliceDoc(a,a+n.length*3)==n+n+n?n+n+n:n;return{changes:{from:a,to:a+f.length,insert:f},range:Tn.cursor(a+f.length)}}}else{if(e&&t.sliceDoc(a-2*n.length,a)==n+n&&(h=GM(t,a-2*n.length,r))>-1&&QM(t,h))return{changes:{insert:n+n+n+n,from:a},effects:of.of(a+n.length),range:Tn.cursor(a+n.length)};if(t.charCategorizer(a)(o)!=dl.Word&&GM(t,a,r)>-1&&!GZ(t,a,n,r))return{changes:{insert:n+n,from:a},effects:of.of(a+n.length),range:Tn.cursor(a+n.length)}}return{range:u=s}});return u?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function QM(t,n){let e=xr(t).resolveInner(n+1);return e.parent&&e.from==n}function GZ(t,n,e,l){let r=xr(t).resolveInner(n,-1),u=l.reduce((i,s)=>Math.max(i,s.length),0);for(let i=0;i<5;i++){let s=t.sliceDoc(r.from,Math.min(r.to,r.from+e.length+u)),a=s.indexOf(e);if(!a||a>-1&&l.indexOf(s.slice(0,a))>-1){let h=r.firstChild;for(;h&&h.from==r.from&&h.to-h.from>e.length+a;){if(t.sliceDoc(h.to-e.length,h.to)==e)return!1;h=h.firstChild}return!0}let o=r.to==n&&r.parent;if(!o)break;r=o}return!1}function GM(t,n,e){let l=t.charCategorizer(n);if(l(t.sliceDoc(n-1,n))!=dl.Word)return n;for(let r of e){let u=n-r.length;if(t.sliceDoc(u,n)==r&&l(t.sliceDoc(u-1,u))!=dl.Word)return u}return-1}function JZ(t={}){return[wi,Xu.of(t),DZ,KZ,MZ]}const Nz=[{key:"Ctrl-Space",run:RZ},{key:"Escape",run:PZ},{key:"ArrowDown",run:nv(!0)},{key:"ArrowUp",run:nv(!1)},{key:"PageDown",run:nv(!0,"page")},{key:"PageUp",run:nv(!1,"page")},{key:"Enter",run:EZ}],KZ=fg.highest(w5.computeN([Xu],t=>t.facet(Xu).defaultKeymap?[Nz]:[]));class BZ{constructor(n,e,l){this.from=n,this.to=e,this.diagnostic=l}}class lf{constructor(n,e,l){this.diagnostics=n,this.panel=e,this.selected=l}static init(n,e,l){let r=n,u=l.facet(Wz).markerFilter;u&&(r=u(r));let i=Tt.set(r.map(s=>s.from==s.to||s.from==s.to-1&&l.doc.lineAt(s.from).to==s.from?Tt.widget({widget:new lb(s),diagnostic:s}).range(s.from):Tt.mark({attributes:{class:"cm-lintRange cm-lintRange-"+s.severity},diagnostic:s}).range(s.from,s.to)),!0);return new lf(i,e,uw(i))}}function uw(t,n=null,e=0){let l=null;return t.between(e,1e9,(r,u,{spec:i})=>{if(!(n&&i.diagnostic!=n))return l=new BZ(r,u,i.diagnostic),!1}),l}function XZ(t,n){let e=t.startState.doc.lineAt(n.pos);return!!(t.effects.some(l=>l.is(qz))||t.changes.touchesRange(e.from,e.to))}function FZ(t,n){return t.field(ji,!1)?n:n.concat(ee.appendConfig.of(ib))}const qz=ee.define(),jP=ee.define(),Lz=ee.define(),ji=eu.define({create(){return new lf(Tt.none,null,null)},update(t,n){if(n.docChanged){let e=t.diagnostics.map(n.changes),l=null;if(t.selected){let r=n.changes.mapPos(t.selected.from,1);l=uw(e,t.selected.diagnostic,r)||uw(e,null,r)}t=new lf(e,t.panel,l)}for(let e of n.effects)e.is(qz)?t=lf.init(e.value,t.panel,n.state):e.is(jP)?t=new lf(t.diagnostics,e.value?C5.open:null,t.selected):e.is(Lz)&&(t=new lf(t.diagnostics,t.panel,e.value));return t},provide:t=>[M1.from(t,n=>n.panel),kt.decorations.from(t,n=>n.diagnostics)]}),HZ=Tt.mark({class:"cm-lintRange cm-lintRange-active"});function ZZ(t,n,e){let{diagnostics:l}=t.state.field(ji),r=[],u=2e8,i=0;l.between(n-(e<0?1:0),n+(e>0?1:0),(a,o,{spec:h})=>{n>=a&&n<=o&&(a==o||(n>a||e>0)&&(nzz(t,e,!1)))}const nb=t=>{let n=t.state.field(ji,!1);(!n||!n.panel)&&t.dispatch({effects:FZ(t.state,[jP.of(!0)])});let e=D1(t,C5.open);return e&&e.dom.querySelector(".cm-panel-lint ul").focus(),!0},JM=t=>{let n=t.state.field(ji,!1);return!n||!n.panel?!1:(t.dispatch({effects:jP.of(!1)}),!0)},tb=t=>{let n=t.state.field(ji,!1);if(!n)return!1;let e=t.state.selection.main,l=n.diagnostics.iter(e.to+1);return!l.value&&(l=n.diagnostics.iter(0),!l.value||l.from==e.from&&l.to==e.to)?!1:(t.dispatch({selection:{anchor:l.from,head:l.to},scrollIntoView:!0}),!0)},eb=[{key:"Mod-Shift-m",run:nb,preventDefault:!0},{key:"F8",run:tb}],Wz=dt.define({combine(t){return Object.assign({sources:t.map(n=>n.source)},Wo(t.map(n=>n.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(n,e)=>n?e?l=>n(l)||e(l):n:e}))}});function Vz(t){let n=[];if(t)n:for(let{name:e}of t){for(let l=0;lu.toLowerCase()==r.toLowerCase())){n.push(r);continue n}}n.push("")}return n}function zz(t,n,e){var l;let r=e?Vz(n.actions):[];return nl("li",{class:"cm-diagnostic cm-diagnostic-"+n.severity},nl("span",{class:"cm-diagnosticText"},n.renderMessage?n.renderMessage():n.message),(l=n.actions)===null||l===void 0?void 0:l.map((u,i)=>{let s=!1,a=f=>{if(f.preventDefault(),s)return;s=!0;let d=uw(t.state.field(ji).diagnostics,n);d&&u.apply(t,d.from,d.to)},{name:o}=u,h=r[i]?o.indexOf(r[i]):-1,c=h<0?o:[o.slice(0,h),nl("u",o.slice(h,h+1)),o.slice(h+1)];return nl("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${o}${h<0?"":` (access key "${r[i]})"`}.`},c)}),n.source&&nl("div",{class:"cm-diagnosticSource"},n.source))}class lb extends Ic{constructor(n){super(),this.diagnostic=n}eq(n){return n.diagnostic==this.diagnostic}toDOM(){return nl("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class KM{constructor(n,e){this.diagnostic=e,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=zz(n,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class C5{constructor(n){this.view=n,this.items=[];let e=r=>{if(r.keyCode==27)JM(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:u}=this.items[this.selectedIndex],i=Vz(u.actions);for(let s=0;s{for(let u=0;uJM(this.view)},"×")),this.update()}get selectedIndex(){let n=this.view.state.field(ji).selected;if(!n)return-1;for(let e=0;e{let o=-1,h;for(let c=l;cl&&(this.items.splice(l,o-l),r=!0)),e&&h.diagnostic==e.diagnostic?h.dom.hasAttribute("aria-selected")||(h.dom.setAttribute("aria-selected","true"),u=h):h.dom.hasAttribute("aria-selected")&&h.dom.removeAttribute("aria-selected"),l++});l({sel:u.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:i,panel:s})=>{i.tops.bottom&&(this.list.scrollTop+=i.bottom-s.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let n=this.list.firstChild;function e(){let l=n;n=l.nextSibling,l.remove()}for(let l of this.items)if(l.dom.parentNode==this.list){for(;n!=l.dom;)e();n=l.dom.nextSibling}else this.list.insertBefore(l.dom,n);for(;n;)e()}moveSelection(n){if(this.selectedIndex<0)return;let e=this.view.state.field(ji),l=uw(e.diagnostics,this.items[n].diagnostic);l&&this.view.dispatch({selection:{anchor:l.from,head:l.to},scrollIntoView:!0,effects:Lz.of(l)})}static open(n){return new C5(n)}}function rb(t,n='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Dj(t){return rb(``,'width="6" height="3"')}const ub=kt.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-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:Dj("#d11")},".cm-lintRange-warning":{backgroundImage:Dj("orange")},".cm-lintRange-info":{backgroundImage:Dj("#999")},".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-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}}}),ib=[ji,kt.decorations.compute([ji],t=>{let{selected:n,panel:e}=t.field(ji);return!n||!e||n.from==n.to?Tt.none:Tt.set([HZ.range(n.from,n.to)])}),aX(ZZ,{hideOn:XZ}),ub],sb=(()=>[vX(),xX(),zB(),qF(),oF(),IB(),$B(),Oe.allowMultipleSelections.of(!0),XX(),hF(gF,{fallback:!0}),jF(),$Z(),JZ(),bB(),eX(),KB(),UH(),w5.of([...WZ,...qH,...sZ,...JF,...uF,...Nz,...eb])])();class _2{constructor(n,e,l,r,u,i,s,a,o,h=0,c){this.p=n,this.stack=e,this.state=l,this.reducePos=r,this.pos=u,this.score=i,this.buffer=s,this.bufferBase=a,this.curContext=o,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter((n,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(n,e,l=0){let r=n.parser.context;return new _2(n,[],e,l,l,0,[],0,r?new BM(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}reduce(n){var e;let l=n>>19,r=n&65535,{parser:u}=this.p,i=u.dynamicPrecedence(r);if(i&&(this.score+=i),l==0){this.pushState(u.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((e=this.p.parser.nodeSet.types[r])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=o):this.p.lastBigReductionSizes;)this.stack.pop();this.reduceContext(r,a)}storeNode(n,e,l,r=4,u=!1){if(n==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&i.buffer[s-4]==0&&i.buffer[s-1]>-1){if(e==l)return;if(i.buffer[s-2]>=e){i.buffer[s-2]=l;return}}}if(!u||this.pos==l)this.buffer.push(n,e,l,r);else{let i=this.buffer.length;if(i>0&&this.buffer[i-4]!=0)for(;i>0&&this.buffer[i-2]>l;)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]=n,this.buffer[i+1]=e,this.buffer[i+2]=l,this.buffer[i+3]=r}}shift(n,e,l){let r=this.pos;if(n&131072)this.pushState(n&65535,this.pos);else if(n&262144)this.pos=l,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,l,4);else{let u=n,{parser:i}=this.p;(l>this.pos||e<=i.maxNode)&&(this.pos=l,i.stateFlag(u,1)||(this.reducePos=l)),this.pushState(u,r),this.shiftContext(e,r),e<=i.maxNode&&this.buffer.push(e,r,l,4)}}apply(n,e,l){n&65536?this.reduce(n):this.shift(n,e,l)}useNode(n,e){let l=this.p.reused.length-1;(l<0||this.p.reused[l]!=n)&&(this.p.reused.push(n),l++);let r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(l,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}split(){let n=this,e=n.buffer.length;for(;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;let l=n.buffer.slice(e),r=n.bufferBase+e;for(;n&&r==n.bufferBase;)n=n.parent;return new _2(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,l,r,this.curContext,this.lookAhead,n)}recoverByDelete(n,e){let l=n<=this.p.parser.maxNode;l&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,l?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(n){for(let e=new ob(this);;){let l=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(l==0)return!1;if(!(l&65536))return!0;e.reduce(l)}}recoverByInsert(n){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let r=[];for(let u=0,i;ua&1&&s==i)||r.push(e[u],i)}e=r}let l=[];for(let r=0;r>19,r=e&65535,u=this.stack.length-l*3;if(u<0||n.getGoto(this.stack[u],r,!1)<0){let i=this.findForcedReduction();if(i==null)return!1;e=i}this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:n}=this.p,e=[],l=(r,u)=>{if(!e.includes(r))return e.push(r),n.allActions(r,i=>{if(!(i&393216))if(i&65536){let s=(i>>19)-u;if(s>1){let a=i&65535,o=this.stack.length-s*3;if(o>=0&&n.getGoto(this.stack[o],a,!1)>=0)return s<<19|65536|a}}else{let s=l(i,u+1);if(s!=null)return s}})};return l(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(this.stack.length!=3)return!1;let{parser:n}=this.p;return n.data[n.stateSlot(this.state,1)]==65535&&!n.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class BM{constructor(n,e){this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0}}var XM;(function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth",t[t.MinBigReduction=2e3]="MinBigReduction"})(XM||(XM={}));class ob{constructor(n){this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}reduce(n){let e=n&65535,l=n>>19;l==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(l-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}class T2{constructor(n,e,l){this.stack=n,this.pos=e,this.index=l,this.buffer=n.buffer,this.index==0&&this.maybeNext()}static create(n,e=n.bufferBase+n.buffer.length){return new T2(n,e,e-n.bufferBase)}maybeNext(){let n=this.stack.parent;n!=null&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.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,this.index==0&&this.maybeNext()}fork(){return new T2(this.stack,this.pos,this.index)}}function tv(t,n=Uint16Array){if(typeof t!="string")return t;let e=null;for(let l=0,r=0;l=92&&i--,i>=34&&i--;let a=i-32;if(a>=46&&(a-=46,s=!0),u+=a,s)break;u*=46}e?e[r++]=u:e=new n(u)}return e}class Mv{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FM=new Mv;class ab{constructor(n,e){this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FM,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(n,e){let l=this.range,r=this.rangeIndex,u=this.pos+n;for(;ul.to:u>=l.to;){if(r==this.ranges.length-1)return null;let i=this.ranges[++r];u+=i.from-l.to,l=i}return u}clipPos(n){if(n>=this.range.from&&nn)return Math.max(n,e.from);return this.end}peek(n){let e=this.chunkOff+n,l,r;if(e>=0&&e=this.chunk2Pos&&ls.to&&(this.chunk2=this.chunk2.slice(0,s.to-l)),r=this.chunk2.charCodeAt(0)}}return l>=this.token.lookAhead&&(this.token.lookAhead=l+1),r}acceptToken(n,e=0){let l=e?this.resolveOffset(e,-1):this.pos;if(l==null||l=this.chunk2Pos&&this.posthis.range.to?n.slice(0,this.range.to-this.pos):n,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(n=1){for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,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(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=FM,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);let l="";for(let r of this.ranges){if(r.from>=e)break;r.to>n&&(l+=this.input.read(Math.max(r.from,n),Math.min(r.to,e)))}return l}}class Em{constructor(n,e){this.data=n,this.id=e}token(n,e){let{parser:l}=e.p;hb(this.data,n,e,this.id,l.data,l.tokenPrecTable)}}Em.prototype.contextual=Em.prototype.fallback=Em.prototype.extend=!1;Em.prototype.fallback=Em.prototype.extend=!1;function hb(t,n,e,l,r,u){let i=0,s=1<0){let C=t[d];if(a.allows(C)&&(n.token.value==-1||n.token.value==C||cb(C,n.token.value,r,u))){n.acceptToken(C);break}}let h=n.next,c=0,f=t[i+2];if(n.next<0&&f>c&&t[o+f*3-3]==65535&&t[o+f*3-3]==65535){i=t[o+f*3-1];continue n}for(;c>1,C=o+d+(d<<1),I=t[C],T=t[C+1]||65536;if(h=T)c=d+1;else{i=t[C+2],n.advance();continue n}}break}}function HM(t,n,e){for(let l=n,r;(r=t[l])!=65535;l++)if(r==e)return l-n;return-1}function cb(t,n,e,l){let r=HM(e,l,n);return r<0||HM(e,l,t)n)&&!l.type.isError)return e<0?Math.max(0,Math.min(l.to-1,n-25)):Math.min(t.length,Math.max(l.from+1,n+25));if(e<0?l.prevSibling():l.nextSibling())break;if(!l.parent())return e<0?0:t.length}}class fb{constructor(n,e){this.fragments=n,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 n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?bM(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?bM(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(n){if(nn)return this.nextStart=i,null;if(u instanceof lr){if(i==n){if(i=Math.max(this.safeFrom,n)&&(this.trees.push(u),this.start.push(i),this.index.push(0))}else this.index[e]++,this.nextStart=i+u.length}}}class gb{constructor(n,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(l=>new Mv)}getActions(n){let e=0,l=null,{parser:r}=n.p,{tokenizers:u}=r,i=r.stateSlot(n.state,3),s=n.curContext?n.curContext.hash:0,a=0;for(let o=0;oc.end+25&&(a=Math.max(c.lookAhead,a)),c.value!=0)){let f=e;if(c.extended>-1&&(e=this.addActions(n,c.extended,c.end,e)),e=this.addActions(n,c.value,c.end,e),!h.extend&&(l=c,e>f))break}}for(;this.actions.length>e;)this.actions.pop();return a&&n.setLookAhead(a),!l&&n.pos==this.stream.end&&(l=new Mv,l.value=n.p.parser.eofTerm,l.start=l.end=n.pos,e=this.addActions(n,l.value,l.end,e)),this.mainToken=l,this.actions}getMainToken(n){if(this.mainToken)return this.mainToken;let e=new Mv,{pos:l,p:r}=n;return e.start=l,e.end=Math.min(l+1,r.stream.end),e.value=l==r.stream.end?r.parser.eofTerm:0,e}updateCachedToken(n,e,l){let r=this.stream.clipPos(l.pos);if(e.token(this.stream.reset(r,n),l),n.value>-1){let{parser:u}=l.p;for(let i=0;i=0&&l.p.parser.dialect.allows(s>>1)){s&1?n.extended=s>>1:n.value=s>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}putAction(n,e,l,r){for(let u=0;un.bufferLength*4?new fb(l,n.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let n=this.stacks,e=this.minStackPos,l=this.stacks=[],r,u;if(this.bigReductionCount>300&&n.length==1){let[i]=n;for(;i.forceReduce()&&i.stack.length&&i.stack[i.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;ie)l.push(s);else{if(this.advanceStack(s,l,n))continue;{r||(r=[],u=[]),r.push(s);let a=this.tokens.getMainToken(s);u.push(a.value,a.end)}}break}}if(!l.length){let i=r&&db(r);if(i)return this.stackToTree(i);if(this.parser.strict)throw ds&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&r){let i=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,u,l);if(i)return this.stackToTree(i.forceAll())}if(this.recovering){let i=this.recovering==1?1:this.recovering*3;if(l.length>i)for(l.sort((s,a)=>a.score-s.score);l.length>i;)l.pop();l.some(s=>s.reducePos>e)&&this.recovering--}else if(l.length>1){n:for(let i=0;i500&&o.buffer.length>500)if((s.score-o.score||s.buffer.length-o.buffer.length)>0)l.splice(a--,1);else{l.splice(i--,1);continue n}}}l.length>12&&l.splice(12,l.length-12)}this.minStackPos=l[0].pos;for(let i=1;i ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments){let o=n.curContext&&n.curContext.tracker.strict,h=o?n.curContext.hash:0;for(let c=this.fragments.nodeAt(r);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?u.getGoto(n.state,c.type.id):-1;if(f>-1&&c.length&&(!o||(c.prop(le.contextHash)||0)==h))return n.useNode(c,f),ds&&console.log(i+this.stackID(n)+` (via reuse of ${u.getName(c.type.id)})`),!0;if(!(c instanceof lr)||c.children.length==0||c.positions[0]>0)break;let d=c.children[0];if(d instanceof lr&&c.positions[0]==0)c=d;else break}}let s=u.stateSlot(n.state,4);if(s>0)return n.reduce(s),ds&&console.log(i+this.stackID(n)+` (via always-reduce ${u.getName(s&65535)})`),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););let a=this.tokens.getActions(n);for(let o=0;or?e.push(C):l.push(C)}return!1}advanceFully(n,e){let l=n.pos;for(;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>l)return t$(n,e),!0}}runRecovery(n,e,l){let r=null,u=!1;for(let i=0;i ":"";if(s.deadEnd&&(u||(u=!0,s.restart(),ds&&console.log(h+this.stackID(s)+" (restarted)"),this.advanceFully(s,l))))continue;let c=s.split(),f=h;for(let d=0;c.forceReduce()&&d<10&&(ds&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,l));d++)ds&&(f=this.stackID(c)+" -> ");for(let d of s.recoverByInsert(a))ds&&console.log(h+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,l);this.stream.end>s.pos?(o==s.pos&&(o++,a=0),s.recoverByDelete(a,o),ds&&console.log(h+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),t$(s,l)):(!r||r.scoren.topRules[s][1]),r=[];for(let s=0;s=0)u(h,a,s[o++]);else{let c=s[o+-h];for(let f=-h;f>0;f--)u(s[o++],a,c);o++}}}this.nodeSet=new rP(e.map((s,a)=>ti.define({name:a>=this.minRepeatTerm?void 0:s,id:a,props:r[a],top:l.indexOf(a)>-1,error:a==0,skipped:n.skippedNodes&&n.skippedNodes.indexOf(a)>-1}))),n.propSources&&(this.nodeSet=this.nodeSet.extend(...n.propSources)),this.strict=!1,this.bufferLength=vV;let i=tv(n.tokenData);this.context=n.context,this.specializerSpecs=n.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new Em(i,s):s),this.topRules=n.topRules,this.dialects=n.dialects||{},this.dynamicPrecedences=n.dynamicPrecedences||null,this.tokenPrecTable=n.tokenPrec,this.termNames=n.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(n,e,l){let r=new mb(this,n,e,l);for(let u of this.wrappers)r=u(r,n,e,l);return r}getGoto(n,e,l=!1){let r=this.goto;if(e>=r[0])return-1;for(let u=r[e+1];;){let i=r[u++],s=i&1,a=r[u++];if(s&&l)return a;for(let o=u+(i>>1);u0}validAction(n,e){return!!this.allActions(n,l=>l==e?!0:null)}allActions(n,e){let l=this.stateSlot(n,4),r=l?e(l):void 0;for(let u=this.stateSlot(n,1);r==null;u+=3){if(this.data[u]==65535)if(this.data[u+1]==1)u=sa(this.data,u+2);else break;r=e(sa(this.data,u+1))}return r}nextStates(n){let e=[];for(let l=this.stateSlot(n,1);;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=sa(this.data,l+2);else break;if(!(this.data[l+2]&1)){let r=this.data[l+1];e.some((u,i)=>i&1&&u==r)||e.push(this.data[l],r)}}return e}configure(n){let e=Object.assign(Object.create(D2.prototype),this);if(n.props&&(e.nodeSet=this.nodeSet.extend(...n.props)),n.top){let l=this.topRules[n.top];if(!l)throw new RangeError(`Invalid top rule name ${n.top}`);e.top=l}return n.tokenizers&&(e.tokenizers=this.tokenizers.map(l=>{let r=n.tokenizers.find(u=>u.from==l);return r?r.to:l})),n.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((l,r)=>{let u=n.specializers.find(s=>s.from==l.external);if(!u)return l;let i=Object.assign(Object.assign({},l),{external:u.to});return e.specializers[r]=e$(i),i})),n.contextTracker&&(e.context=n.contextTracker),n.dialect&&(e.dialect=this.parseDialect(n.dialect)),n.strict!=null&&(e.strict=n.strict),n.wrap&&(e.wrappers=e.wrappers.concat(n.wrap)),n.bufferLength!=null&&(e.bufferLength=n.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(n){return this.termNames?this.termNames[n]:String(n<=this.maxNode&&this.nodeSet.types[n].name||n)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(n){let e=this.dynamicPrecedences;return e==null?0:e[n]||0}parseDialect(n){let e=Object.keys(this.dialects),l=e.map(()=>!1);if(n)for(let u of n.split(" ")){let i=e.indexOf(u);i>=0&&(l[i]=!0)}let r=null;for(let u=0;ul)&&e.p.parser.stateFlag(e.state,2)&&(!n||n.scoret.external(e,l)<<1|n}return t.get}let $p=()=>new le({deserialize:t=>!0});const Uz=$p(),Yz=$p(),Qz=$p(),Gz=$p(),Jz=$p();var Kw=Object.freeze({__proto__:null,coll:Uz,prefixColl:Yz,prefixEdge:Qz,sameEdge:Gz,prefixContainer:Jz});const pb={__proto__:null,true:136,false:136,nil:138,def:147,defn:147,"defn-":147,defmacro:147,definline:147,defonce:147,deftest:147,defcard:147,ns:155},vb=D2.deserialize({version:14,states:"-zQ]QPOOP!pOPOOOOQO'#C`'#C`OOQO'#Cb'#CbO]QPO'#CcO]QPO'#CeO]QPO'#CgO]QPO'#CiO]QPO'#CkO]OPO'#CtO]OPO'#CvO!uOQO'#C|OOQO'#Dm'#DmQ]QPOOO$hQPO'#CqO$oQPO'#DUO$vQPO'#DXO$}OSO'#DZO%cOPO'#D]O%hOPO'#D`O%mOPO'#DbO%uOWO'#DdO]QPO'#DgO]QPO'#DhO%zQPO'#DjOOQO'#Dq'#DqP&SQPO'#C^POOO)C?e)C?eOOQO,58},58}OOQO,59P,59POOQO,59R,59ROOQO,59T,59TOOQO,59V,59VOOQO,59`,59`OOQO,59b,59bOOQO,59h,59hO'gOPO,59hOOQO-E7k-E7kOOQO'#Cr'#CrO!}QPO'#CsOOQO'#Dv'#DvO'lQPO'#D|O'sQPO'#DuOOQO'#DO'#DOOOQO'#Dz'#DzO'sQPO'#DyOOQO'#DQ'#DQOOQO'#D}'#D}O'lQPO'#D|OOQO'#Dt'#DtO(OQPO,59]O(TQPO,59pOOQO,59p,59pO([QPO,59sOOQO,59s,59sOOQO,59u,59uOOOO,59x,59xOOQO,59y,59yOOQO,5:Q,5:QOOQO,5:T,5:TOOQO,5:V,5:VOOQO,59w,59wOOQO,59z,59zOOQO,59|,59|OOQO,5:O,5:OOOQO,5:R,5:ROOQO,5:S,5:SOOQO,5:U,5:UPOOO,58x,58xOOQO1G/S1G/SOOQO,59_,59_OOQO,59k,59kOOQO,59m,59mOOQO'#Cx'#CxO'sQPO'#CyOOQO'#Dx'#DxO(cQPO,5:aO(jQPO,5:eO(qQPO,5:hOOQO1G.w1G.wOOQO1G/[1G/[OOQO1G/_1G/_OOQO,59e,59eO(xQPO'#CzO*`QPO1G/{O]QPO1G/{OOQO'#Cz'#CzO*gQPO1G0PO*gQPO1G0PO*nQPO7+%gO*uQPO7+%kP&SQPO'#CcP&SQPO'#CeP&SQPO'#CgP&SQPO'#CiP&SQPO'#CkP*|OPO'#DbP&SQPO'#DgP&SQPO'#Dh",stateData:"+[~O!dOSPOSRPQ~OTiOWSOYTO[UO^VO`WOaiObiOd^OiXOkYOoZOw_Oz`O|iO!OaO!TcO!VdO!XeO!fQO!gRO~ORjO~OosOqtO~OT!OOWSOYTO[UO^VO`WOaiObiOd^OiXOkYOoZOw_Oz`O|iO!OaO!TcO!VdO!XeO!fQO!gRO!kvO!o{O~Oc!pP~P!}Ov!UO~P]Oy!WO~P]Od^OoZOz`O!r!YO!t!]O!u!^O~Oz`O~OT!`O~OWSOd^O~O!s!bO~Ow_Oz`O~OTiOW!}OY#OO[#PO^#QO`#ROaiObiOd^OiXOkYOoZOw_Oz`O|iO!OaO!TcO!V#SO!XeO!fQO!gRO~Oo!gO~Oc!pX~P]OT!kOiXOkYO~Oc!qO~Ov!rO~P]Oy!sO~P]Oc!ia~P]Oc!ma~P]Oc!pa~P]OTnXWnXYnX[nX^nX`nXanXbnXc!eXdnXinXknXonXwnXznX|nX!OnX!TnX!VnX!XnX!fnX!gnX~Oc!ii~P]Oc!mi~P]Oc!iq~P]Oc!mq~P]OW!}Od^O~Oa!u!tT!t~",goto:"/]!rPP!sP!vP!v#nP!vP!vP!vP!vPPPPP$j%i%i%mP%mP&n&n&sP&yP'x'x'|'|PP(QPP({P!vP!v)|!v!vP!vP!vP!v!v!v*t!v+nP,fPPP-^PP.j.m.pP.v.m/PP.m/VRkP!kiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#U!jiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UT!ad#S!jiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UQ![aT!ad#STx^w!UfOSTUVWXY]_`fgy!Q!T!V!n!o!p!v!w!y!z!{!|Sw^wU!lz}!la#Tj!}#O#P#Q#R#T#UV!mz}!lQ!w!nR!z!o!fiOSTUVWXY]^_`fgjwy!Q!T!V!p!v!w!y!z!{!|!}#O#P#Q#R#T#UQ!ZaQ!u!nR!x!oT|^wT!P^w!jiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UR!eh!jiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UQ!XaQ!_bR!eh!kbOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#U!YgOSTUVWXY]^_`fgwy!Q!T!V!n!o!p!v!w!y!z!{!|a#Uj!}#O#P#Q#R#T#U!khOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UQ]Obu]y!T!V!p!v!y!{!|Qy^Q!T_Q!V`Q!p!QQ!v!nQ!y!oQ!{!wR!|!zt[O]^_`y!Q!T!V!n!o!p!v!w!y!z!{!|SlS!}SmT#OSnU#PSoV#QSpW#RQqXQrYU!cfw#TS!dg#UR!fjR!S^R!R^Qz^R!hwQ!nzQ!o}R!t!lQ}^R!iwQ!Q^R!jw",nodeNames:"⚠ LineComment Discard #_ Boolean Symbol Nil Deref @ Quote ' SyntaxQuote ` Unquote ~ UnquoteSplice ~@ Number Keyword ) ( List DefLike Meta Metadata ^ ReaderMetadata #^ VarName Meta DocString \" String StringContent NS Meta Operator Meta ] [ Vector } { Map Character Set # NamespacedMap KeywordPrefix RegExp Var #' ReaderConditional #? SymbolicValue ## AnonymousFunction Meta TaggedLiteral ReaderTag ConstructorCall ConstructorPrefix Program",maxTerm:83,nodeProps:[[Qz,-14,3,8,10,12,14,16,25,27,46,48,51,53,55,61,""],[Yz,-13,7,9,11,13,15,24,26,45,47,49,50,52,56,""],["openedBy",19,"(",31,'"',38,"[",41,"{"],["closedBy",20,")",31,'"',39,"]",42,"}"],[Uz,-3,21,40,43,""],[Jz,-7,23,29,35,37,57,58,60,""],[Gz,31,""]],skippedNodes:[0,1,2,3],repeatNodeCount:1,tokenData:"#6x~R![OX$wX^%n^p$wpq%nqr'grs,Tst,Ytu/Yuv'gvw'gwx6Vxy6jyz6}z{'g{|7b|}%n}!O7b!O!P9t!P!Q)v!Q!R!8[!R![!>t![!]!Cp!]!^!J]!^!_'g!_!`'g!`!a'g!a!b'g!b!c!Kr!c!}/Y!}#O!LV#O#P!Lj#P#Q#3w#Q#R#4[#R#S/Y#S#T#4o#T#o/Y#o#p#5S#p#q$w#q#r#5g#r#s#5z#s#y$w#y#z%n#z$f$w$f$g%n$g##l/Y##l#BY$w#BY#BZ%n#BZ$IS$w$IS$I_%n$I_$I|$w$I|$JO%n$JO$JT$w$JT$JU%n$JU$KV$w$KV$KW%n$KW&FU$w&FU&FV%n&FV~$wQ$|SqQOr$ws#O$w#O#P%Y#P~$wQ%_TqQOr$wrs$ws#O$w#O#P%Y#P~$wR%ujqQ!dPOX$wX^%n^p$wpq%nqr$ws|$w|}%n}#O$w#O#P%Y#P#y$w#y#z%n#z$f$w$f$g%n$g#BY$w#BY#BZ%n#BZ$IS$w$IS$I_%n$I_$I|$w$I|$JO%n$JO$JT$w$JT$JU%n$JU$KV$w$KV$KW%n$KW&FU$w&FU&FV%n&FV~$w_'rpqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q!['g![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$wZ*PpqQ!sWTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![)v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$w~,YOo~R,a[!OPqQOr$wst-Vtw$wwx-jx!a$w!a!b-}!b#O$w#O#P%Y#P#Q$w#Q#R.b#R#S.u#S~$wR-^S!XPqQOr$ws#O$w#O#P%Y#P~$wR-qS!TPqQOr$ws#O$w#O#P%Y#P~$wR.US!VPqQOr$ws#O$w#O#P%Y#P~$wR.iSkPqQOr$ws#O$w#O#P%Y#P~$wR.|SRPqQOr$ws#O$w#O#P%Y#P~$w_/epqQ!sW!tSTPOq$wqr'gst)vtu/Yuv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P1i!P!Q'g!Q![/Y![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}/Y!}#O$w#O#P%Y#P#R$w#R#S/Y#S#T$w#T#o/Y#o$g$w$g##l/Y##l~$w_1rpqQ!sWTPOq$wqr)vst)vtu3vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![)v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!}3v!}#O$w#O#P%Y#P#R$w#R#S3v#S#T$w#T#o3v#o$g$w$g##l3v##l~$w_4RpqQ!sW!uSTPOq$wqr)vst)vtu3vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P1i!P!Q)v!Q![3v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!}3v!}#O$w#O#P%Y#P#R$w#R#S3v#S#T$w#T#o3v#o$g$w$g##l3v##l~$wR6^SYPqQOr$ws#O$w#O#P%Y#P~$wV6qSdTqQOr$ws#O$w#O#P%Y#P~$wR7UScPqQOr$ws#O$w#O#P%Y#P~$w_7mqqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P9t!P!Q'g!Q!RHO!R![!&|![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$wZ9}pqQ!sWTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![n!h!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#X)v#X#Y>n#Y#o)v#o$g$w$g##l)v##l~$wZ>wpqQ!sWTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|@{|}$w}!O@{!O!P)v!P!Q)v!Q![CY![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$wZAUpqQ!sWTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![CY![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$wZCerqQ!sWaPTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![CY![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!o)v!o!pEo!p!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$wZEzpqQ!sWaPTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![)v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$w_H]yqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!PJ|!P!Q!![!Q![!&|![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!g'g!g!h!)t!h!o'g!o!p!0{!p!q!0{!q!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#X'g#X#Y!)t#Y#l'g#l#m!3^#m#o'g#o$g$w$g##l'g##l~$wZKXvqQ!sWaPTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![J|![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!g)v!g!h>n!h!o)v!o!pMo!p!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#X)v#X#Y>n#Y#o)v#o$g$w$g##l)v##l~$wZMztqQ!sWaPTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![)v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!g)v!g!h>n!h!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#X)v#X#Y>n#Y#o)v#o$g$w$g##l)v##l~$w_!!gpqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!$k![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!$xpqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!$k![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!'ZwqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!PJ|!P!Q!![!Q![!&|![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!g'g!g!h!)t!h!o'g!o!p!0{!p!q!0{!q!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#X'g#X#Y!)t#Y#o'g#o$g$w$g##l'g##l~$w_!*PpqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|!,T|}$w}!O!,T!O!P)v!P!Q'g!Q![!.d![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!,`pqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!.d![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!.qrqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!.d![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!o'g!o!p!0{!p!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!1YpqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q!['g![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!3irqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!5s![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!i!5s!i!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#Z!5s#Z#o'g#o$g$w$g##l'g##l~$w_!6QrqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!5s![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!i!5s!i!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#Z!5s#Z#o'g#o$g$w$g##l'g##l~$wR!8ceqQaPOr$ws!O$w!O!P!9t!P!Q!=r!Q![!>t![!g$w!g!h!:q!h!o$w!o!p!Z![#O$w#O#P%Y#P~$wR!>bUqQaPOr$ws!Q$w!Q![!>Z![#O$w#O#P%Y#P~$wR!>{_qQaPOr$ws!O$w!O!P!9t!P!Q!=r!Q![!>t![!g$w!g!h!:q!h!o$w!o!p!pb[t]||-1}],tokenPrec:466});var p,zn=function(t){var n=typeof t;return n!="object"?n:t?Array.isArray(t)?"array":n:"null"},A5=function(t){return Object.prototype.hasOwnProperty.call(t,Qj)&&t[Qj]||(t[Qj]=++een)},Np=function(t,n){const e=t.length-n.length;return 0<=e&&t.indexOf(n,e)==e},W1=function(t){return/^[\s\xa0]*$/.test(t)},E5=function(t){const n=[];let e=0;for(const l in t)n[e++]=l;return n},R5=function(t,n){return t!==null&&n in t?t[n]:void 0},pk=function(t){const n=arguments.length;if(n==1&&Array.isArray(arguments[0]))return pk.apply(null,arguments[0]);if(n%2)throw Error("Uneven number of arguments");const e={};for(let l=0;ln?1:t=t||"€"<=t&&"�">=t},xP=function(t){return String(t.charAt(0)).toUpperCase()+String(t.slice(1)).toLowerCase()},rl=function(t,n){t!=null&&this.append.apply(this,arguments)},po=function(){return new P(null,5,[NQ,!0,vd,Be,HI,or,Bun,Rl,_7,Jt],null)},Bz=function(){Qe=!1,Fl=function(){var t=arguments,n=console.log,e=n.apply,l=console;{const r=t.length;if(0>>-15,461845907)},Bw=function(t,n){return t=(t|0)^(n|0),oc(t<<13|t>>>-13,5)+-430675100|0},Xw=function(t,n){return t=(t|0)^n,t=oc(t^t>>>16,-2048144789),t=oc(t^t>>>13,-1028477387),t^t>>>16},nU=function(t){if(255>2)},lh=function(t){return t instanceof S},kP=function(t){var n=t.name;n:for(var e=1,l=0;;)if(e=l)return-1;for(!(0e&&(e+=l,e=0>e?0:e);;)if(ee?l+e:e;;)if(0<=e){if(X.g(m.g?m.g(t,e):m.call(null,t,e),n))return e;--e}else return-1},AP=function(t,n){this.s=t,this.D=n},un=function(t,n,e){this.s=t,this.D=n,this.B=e,this.v=166592766,this.H=139264},z=function(t){return 0t):!1},Gn=function(t,n){return t!=null&&(t.v&512||On===t.Nd)?t.fb(null,n):Qn(xk,t)?N2(t,n):cn.i(t,n,Mu)!==Mu},Xi=function(t,n){return(t!=null?On===t.hc||!t.Oc&&Qn(h$,t):Qn(h$,t))?q2(t,n):t!=null&&uU(t)&&Gn(t,n)?new Ln(n,cn.g(t,n)):null},Zh=function(t,n){if(t===n)return 0;if(t==null)return-1;if(n==null)return 1;if(typeof t=="number"){if(typeof n=="number")return ns(t,n);throw Error(["Cannot compare ",M.h(t)," to ",M.h(n)].join(""))}if(t!=null?t.H&2048||On===t.fc||!t.H&&Qn(k$,t):Qn(k$,t))return Dk(t,n);if(typeof t!="string"&&!vu(t)&&t!==!0&&t!==!1||cr(t)!==cr(n))throw Error(["Cannot compare ",M.h(t)," to ",M.h(n)].join(""));return ns(t,n)},zp=function(t,n){var e=an(t),l=an(n);if(el)t=1;else if(e===0)t=0;else n:for(l=0;;){var r=Zh(m.g(t,l),m.g(n,l));if(r===0&&l+1>n},uN=function(t,n){return t>>>n},$a=function(t){return t-=t>>1&1431655765,t=(t&858993459)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24},iN=function(t){return 0t},Fe=function(t,n){if(mo(n))if(Y1(t)&&Y1(n)&&an(t)!==an(n))t=!1;else n:for(t=E(t),n=E(n);;){if(t==null){t=n==null;break n}if(n!=null&&X.g(j(t),j(n)))t=A(t),n=A(n);else{t=!1;break n}}else t=null;return ol(t)},g=function(t,n,e,l,r){this.B=t,this.first=n,this.$b=e,this.count=l,this.C=r,this.v=65937646,this.H=8192},Zw=function(t){return t!=null?t.v&33554432||On===t.ef?!0:t.v?!1:Qn(p$,t):Qn(p$,t)},bw=function(t){this.B=t,this.v=65937614,this.H=8192},cU=function(t){return t!=null?t.v&134217728||On===t.jf?!0:t.v?!1:Qn(v$,t):Qn(v$,t)},df=function(t){return cU(t)?(t=z1(t))?t:At:En.i(In,At,t)},Na=function(t,n,e,l){this.B=t,this.first=n,this.$b=e,this.C=l,this.v=65929452,this.H=8192},Dn=function(t,n){return n==null?new g(null,t,null,1,null):n!=null&&(n.v&64||On===n.Ac)?new Na(null,t,n,null):new Na(null,t,E(n),null)},Sb=function(t,n){if(t.za===n.za)return 0;var e=Xn(t.eb);return x(e&&n.eb)?-1:x(t.eb)?Xn(n.eb)?1:(e=ns(t.eb,n.eb),e===0?ns(t.name,n.name):e):ns(t.name,n.name)},F=function(t,n,e,l){this.eb=t,this.name=n,this.za=e,this.vc=l,this.v=2153775105,this.H=4096},Lk=function(t){return t instanceof F},on=function(t,n){return t===n?!0:t instanceof F&&n instanceof F?t.za===n.za:!1},qe=function(t){if(t!=null&&(t.H&4096||On===t.Ud))return t.yc(null);throw Error(["Doesn't support namespace: ",M.h(t)].join(""))},Wk=function(t){return t instanceof F||t instanceof S},Up=function(t){return t instanceof S&&qe(t)==null},$v=function(t){var n=t instanceof S;return n?(t=qe(t),t=x(t)?!0:t):t=n,ol(t)},Mt=function(t,n,e,l){this.B=t,this.ra=n,this.R=e,this.C=l,this.v=32374988,this.H=1},aN=function(t){return t.ra!=null&&(t.R=t.ra.m?t.ra.m():t.ra.call(null),t.ra=null),t.R},T5=function(t){this.mc=t,this.end=0,this.v=2,this.H=0},ui=function(t){return new T5(Array(t))},$f=function(t,n,e){this.s=t,this.Za=n,this.end=e,this.v=524306,this.H=0},Mc=function(t,n,e,l){this.Va=t,this.Bb=n,this.B=e,this.C=l,this.v=31850732,this.H=1536},al=function(t,n){return Es(t)===0?n:new Mc(t,n,null,null)},qa=function(t,n){return t.add(n)},ql=function(t){return t.Va()},di=function(t){var n=[];for(t=E(t);;)if(t!=null)n.push(j(t)),t=A(t);else return n},nd=function(t,n){if(Y1(n))return an(n);var e=0;for(n=E(n);;)if(n!=null&&et?0:t-1>>>5<<5},L5=function(t,n,e){for(;;){if(n===0)return e;var l=xU(t);l.s[0]=e,e=l,n-=5}},kU=function(t,n){throw Error(["No item ",M.h(t)," in vector of length ",M.h(n)].join(""))},rs=function(t,n){if(n>=qc(t))return t.$a;var e=t.root;for(t=t.shift;;)if(0>>t&31],t=l}else return e.s},MP=function(t,n){return 0<=n&&ne)return new v(null,e,5,y,t,null);n=32;for(var l=new v(null,32,5,y,t.slice(0,32),null).wc(null);;)if(ne||lan(n))throw Error("Index out of bounds");return new bh(t,n,e,l,r)}},Q1=function(t,n){return t===n.$?n:new vo(t,Ae(n.s))},Nj=function(t){return new vo({},Ae(t.s))},qj=function(t){var n=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];return ei(t,0,n,0,t.length),n},CU=function(t,n,e,l){this.A=t,this.shift=n,this.root=e,this.$a=l,this.H=88,this.v=275},Ob=function(t,n,e){if(t.root.$){if(0<=n&&n>>u&31;u=r(u-5,i.s[s]),i.s[s]=u}return i}(t.shift,t.root);t.root=l}return t}if(n===t.A)return t.Cc(null,e);throw Error(["Index ",M.h(n)," out of bounds for TransientVector of length",M.h(t.A)].join(""))}throw Error("assoc! after persistent!")},W5=function(t,n){this.Dc=t,this.Yc=n},yo=function(t,n,e,l){this.B=t,this.ib=n,this.kb=e,this.C=l,this.v=31850700,this.H=0},us=function(t,n,e,l,r){this.B=t,this.count=n,this.ib=e,this.kb=l,this.C=r,this.H=139264,this.v=31858766},AU=function(){this.v=2097152,this.H=0},EU=function(t,n){return ol(we(n)&&!Dc(n)&&an(t)===an(n)?(t!=null?t.v&1048576||On===t.df||!t.v&&Qn(w$,t):Qn(w$,t))?Hw(function(e,l,r){return X.g(cn.i(n,l,HN),r)?!0:zo(!1)},!0,t):Ol(function(e){return X.g(cn.i(n,j(e),HN),Rt(e))},t):null)},yu=function(t,n,e,l){this.D=0,this.Ne=t,this.Ld=n,this.Je=e,this.fe=l},V5=function(t){this.R=t},LP=function(t){this.R=t},Lc=function(t,n){if(n instanceof F)n:{var e=t.length;n=n.za;for(var l=0;;){if(e<=l){t=-1;break n}if(t[l]instanceof F&&n===t[l].za){t=l;break n}l+=2}}else if(typeof n=="string"||typeof n=="number")n:for(e=t.length,l=0;;){if(e<=l){t=-1;break n}if(n===t[l]){t=l;break n}l+=2}else if(n instanceof S)n:for(e=t.length,n=n.Mb,l=0;;){if(e<=l){t=-1;break n}if(t[l]instanceof S&&n===t[l].Mb){t=l;break n}l+=2}else if(n==null)n:for(n=t.length,e=0;;){if(n<=e){t=-1;break n}if(t[e]==null){t=e;break n}e+=2}else n:for(e=t.length,l=0;;){if(e<=l){t=-1;break n}if(X.g(n,t[l])){t=l;break n}l+=2}return t},Ln=function(t,n){this.key=t,this.val=n,this.C=null,this.v=166619935,this.H=0},Oa=function(t){return t!=null?!!(t.v&2048||On===t.gf):!1},uh=function(t,n,e){this.s=t,this.D=n,this.sb=e,this.v=32374990,this.H=0},WP=function(t,n){this.s=t,this.D=0,this.A=n},P=function(t,n,e,l){this.B=t,this.A=n,this.s=e,this.C=l,this.v=16647951,this.H=139268},Ri=function(t,n){return t===n||on(t,n)?!0:X.g(t,n)},Cb=function(t){for(var n=0,e=0;;)if(n=r){if(Ri(e[r],e[i]))return i;i-=2}else return i}(),t[u]=e[r],t[u+1]=e[n+1],n=2+u,r=2+r,u=n);return new P(null,t.length/2,t,null)}return new P(null,e.length/2,e,null)},RU=function(t,n){this.qc={},this.zb=t,this.s=n,this.v=259,this.H=56},Lj=function(t,n){for(var e=He(md),l=0;;)if(ll?e.left:e.right}else return null},Wc=function(t,n){this.aa=t,this.sb=n,this.v=32374988,this.H=0},xe=function(t){return(t=E(t))?new Wc(t,null):null},Nl=function(t){return bu(t)},Vc=function(t,n){this.aa=t,this.sb=n,this.v=32374988,this.H=0},ir=function(t){return(t=E(t))?new Vc(t,null):null},su=function(t){return Ei(t)},zc=function(t,n){var e=vn;for(n=E(n);;)if(n){var l=j(n),r=cn.i(t,l,iL);e=es.g(r,iL)?fn.i(e,l,r):e,n=A(n)}else return Re(e,Wn(t))},Q5=function(t){this.Gc=t},ht=function(t,n,e){this.B=t,this.Yb=n,this.C=e,this.v=15077647,this.H=139268},ih=function(t){for(var n=t.length,e=He(Ke),l=0;lye)return Rn(t,"#");if(Rn(t,e),_7.h(u)===0)E(i)&&Rn(t,function(){var d=qq.h(u);return x(d)?d:"..."}());else{if(E(i)){var a=j(i);n.i?n.i(a,t,u):n.call(null,a,t,u)}for(var o=A(i),h=_7.h(u)-1;;)if(!o||h!=null&&h===0){E(o)&&h===0&&(Rn(t,l),Rn(t,function(){var d=qq.h(u);return x(d)?d:"..."}()));break}else{Rn(t,l);var c=j(o);e=t,i=u,n.i?n.i(c,e,i):n.call(null,c,e,i);var f=A(o);e=h-1,o=f,h=e}}return Rn(t,r)}finally{ye=s}},ps=function(t,n){n=E(n);for(var e=null,l=0,r=0;;)if(rjs",t)}return t},pN=function(t,n){return(t!=null?On===t.we||!t.Oc&&Qn(Z2,t):Qn(Z2,t))?b2(t):typeof t=="string"||typeof t=="number"||t instanceof F||t instanceof S?n.h?n.h(t):n.call(null,t):Us.j(z([t]))},vN=function(){},Gk=function(t,n){if(t!=null&&t.ve!=null)t=t.ve(t,n);else{var e=Gk[zn(t??null)];if(e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else if(e=Gk._,e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else throw Un("IEncodeClojure.-js->clj",t)}return t},LU=function(t){var n=et.h(vn);return function(){function e(r){var u=null;if(0=n||n>=2+an(t)?In.g(_n(Dn("",Mn.g(M,E(t)))),""):x(pi.g?pi.g(1,n):pi.call(null,1,n))?new v(null,1,5,y,[t],null):x(pi.g?pi.g(2,n):pi.call(null,2,n))?new v(null,2,5,y,["",t],null):(n-=2,In.g(_n(Dn("",Ba.i(_n(Mn.g(M,E(t))),0,n))),vt.g(t,n)))},GU=function(t,n){return t.indexOf(n)!=-1},pf=function(t,n,e,l,r){this.Lb=t,this.form=n,this.J=e,this.G=l,this.C=r,this.v=2230716170,this.H=139264},Nb=function(t,n){return new pf(n,t,null,null,null)},Aa=function(t){return t==null?null:t===","?!0:esn.test(t)},ry=function(t){return t==null?null:!/[^0-9]/.test(t)},H5=function(t){return t===` +`){let r="";for(let u=0,i=0;un&&u&&(r+=l),ni&&(r+=s.sliceString(n-i,e-i,l)),i=a+1}return r}flatten(n){for(let e of this.children)e.flatten(n)}scanIdentical(n,e){if(!(n instanceof eo))return 0;let l=0,[r,u,i,s]=e>0?[0,0,this.children.length,n.children.length]:[this.children.length-1,n.children.length-1,-1,-1];for(;;r+=e,u+=e){if(r==i||u==s)return l;let a=this.children[r],o=n.children[u];if(a!=o)return l+a.scanIdentical(o,e);l+=a.length+1}}static from(n,e=n.reduce((l,r)=>l+r.length+1,-1)){let l=0;for(let d of n)l+=d.lines;if(l<32){let d=[];for(let C of n)C.flatten(d);return new Gl(d,e)}let r=Math.max(32,l>>5),u=r<<1,i=r>>1,s=[],a=0,o=-1,h=[];function c(d){let C;if(d.lines>u&&d instanceof eo)for(let I of d.children)c(I);else d.lines>i&&(a>i||!a)?(f(),s.push(d)):d instanceof Gl&&a&&(C=h[h.length-1])instanceof Gl&&d.lines+C.lines<=32?(a+=d.lines,o+=d.length+1,h[h.length-1]=new Gl(C.text.concat(d.text),C.length+1+d.length)):(a+d.lines>r&&f(),a+=d.lines,o+=d.length+1,h.push(d))}function f(){a!=0&&(s.push(h.length==1?h[0]:eo.from(h,o)),o=-1,a=h.length=0)}for(let d of n)c(d);return f(),s.length==1?s[0]:new eo(s,e)}}Ie.empty=new Gl([""],0);function zJ(t){let n=-1;for(let e of t)n+=e.length+1;return n}function Cv(t,n,e=0,l=1e9){for(let r=0,u=0,i=!0;u=e&&(a>l&&(s=s.slice(0,l-r)),r0?1:(n instanceof Gl?n.text.length:n.children.length)<<1]}nextInner(n,e){for(this.done=this.lineBreak=!1;;){let l=this.nodes.length-1,r=this.nodes[l],u=this.offsets[l],i=u>>1,s=r instanceof Gl?r.text.length:r.children.length;if(i==(e>0?s:0)){if(l==0)return this.done=!0,this.value="",this;e>0&&this.offsets[l-1]++,this.nodes.pop(),this.offsets.pop()}else if((u&1)==(e>0?0:1)){if(this.offsets[l]+=e,n==0)return this.lineBreak=!0,this.value=` +`,this;n--}else if(r instanceof Gl){let a=r.text[i+(e<0?-1:0)];if(this.offsets[l]+=e,a.length>Math.max(0,n))return this.value=n==0?a:e>0?a.slice(n):a.slice(0,a.length-n),this;n-=a.length}else{let a=r.children[i+(e<0?-1:0)];n>a.length?(n-=a.length,this.offsets[l]+=e):(e<0&&this.offsets[l]--,this.nodes.push(a),this.offsets.push(e>0?1:(a instanceof Gl?a.text.length:a.children.length)<<1))}}}next(n=0){return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}class GL{constructor(n,e,l){this.value="",this.done=!1,this.cursor=new g1(n,e>l?-1:1),this.pos=e>l?n.length:0,this.from=Math.min(e,l),this.to=Math.max(e,l)}nextInner(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let l=e<0?this.pos-this.from:this.to-this.pos;n>l&&(n=l),l-=n;let{value:r}=this.cursor.next(n);return this.pos+=(r.length+n)*e,this.value=r.length<=l?r:e<0?r.slice(r.length-l):r.slice(0,l),this.done=!this.value,this}next(n=0){return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class JL{constructor(n){this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}next(n=0){let{done:e,lineBreak:l,value:r}=this.inner.next(n);return e?(this.done=!0,this.value=""):l?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ie.prototype[Symbol.iterator]=function(){return this.iter()},g1.prototype[Symbol.iterator]=GL.prototype[Symbol.iterator]=JL.prototype[Symbol.iterator]=function(){return this});class UJ{constructor(n,e,l,r){this.from=n,this.to=e,this.number=l,this.text=r}get length(){return this.to-this.from}}let xm="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 t=1;tt)return xm[n-1]<=t;return!1}function mD(t){return t>=127462&&t<=127487}const wD=8205;function Ou(t,n,e=!0,l=!0){return(e?KL:QJ)(t,n,l)}function KL(t,n,e){if(n==t.length)return n;n&&BL(t.charCodeAt(n))&&XL(t.charCodeAt(n-1))&&n--;let l=Jr(t,n);for(n+=Bi(l);n=0&&mD(Jr(t,i));)u++,i-=2;if(u%2==0)break;n+=2}else break}return n}function QJ(t,n,e){for(;n>0;){let l=KL(t,n-2,e);if(l=56320&&t<57344}function XL(t){return t>=55296&&t<56320}function Jr(t,n){let e=t.charCodeAt(n);if(!XL(e)||n+1==t.length)return e;let l=t.charCodeAt(n+1);return BL(l)?(e-55296<<10)+(l-56320)+65536:e}function GR(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Bi(t){return t<65536?1:2}const Cx=/\r\n?|\n/;var ku=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(ku||(ku={}));class fo{constructor(n){this.sections=n}get length(){let n=0;for(let e=0;en)return u+(n-r);u+=s}else{if(l!=ku.Simple&&o>=n&&(l==ku.TrackDel&&rn||l==ku.TrackBefore&&rn))return null;if(o>n||o==n&&e<0&&!s)return n==r||e<0?u:u+a;u+=a}r=o}if(n>r)throw new RangeError(`Position ${n} is out of range for changeset of length ${r}`);return u}touchesRange(n,e=n){for(let l=0,r=0;l=0&&r<=e&&s>=n)return re?"cover":!0;r=s}return!1}toString(){let n="";for(let e=0;e=0?":"+r:"")}return n}toJSON(){return this.sections}static fromJSON(n){if(!Array.isArray(n)||n.length%2||n.some(e=>typeof e!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new fo(n)}static create(n){return new fo(n)}}class pr extends fo{constructor(n,e){super(n),this.inserted=e}apply(n){if(this.length!=n.length)throw new RangeError("Applying change set to a document with the wrong length");return Ax(this,(e,l,r,u,i)=>n=n.replace(r,r+(l-e),i),!1),n}mapDesc(n,e=!1){return Ex(this,n,e,!0)}invert(n){let e=this.sections.slice(),l=[];for(let r=0,u=0;r=0){e[r]=s,e[r+1]=i;let a=r>>1;for(;l.length0&&Rh(l,e,u.text),u.forward(h),s+=h}let o=n[i++];for(;s>1].toJSON()))}return n}static of(n,e,l){let r=[],u=[],i=0,s=null;function a(h=!1){if(!h&&!r.length)return;if||c<0||f>e)throw new RangeError(`Invalid change range ${c} to ${f} (in doc of length ${e})`);let C=d?typeof d=="string"?Ie.of(d.split(l||Cx)):d:Ie.empty,I=C.length;if(c==f&&I==0)return;ci&&uu(r,c-i,-1),uu(r,f-c,I),Rh(u,r,C),i=f}}return o(n),a(!s),s}static empty(n){return new pr(n?[n,-1]:[],[])}static fromJSON(n){if(!Array.isArray(n))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],l=[];for(let r=0;rs&&typeof i!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(u.length==1)e.push(u[0],0);else{for(;l.length=0&&e<=0&&e==t[r+1]?t[r]+=n:n==0&&t[r]==0?t[r+1]+=e:l?(t[r]+=n,t[r+1]+=e):t.push(n,e)}function Rh(t,n,e){if(e.length==0)return;let l=n.length-2>>1;if(l>1])),!(e||i==t.sections.length||t.sections[i+1]<0);)s=t.sections[i++],a=t.sections[i++];n(r,o,u,h,c),r=o,u=h}}}function Ex(t,n,e,l=!1){let r=[],u=l?[]:null,i=new E1(t),s=new E1(n);for(let a=-1;;)if(i.ins==-1&&s.ins==-1){let o=Math.min(i.len,s.len);uu(r,o,-1),i.forward(o),s.forward(o)}else if(s.ins>=0&&(i.ins<0||a==i.i||i.off==0&&(s.len=0&&a=0){let o=0,h=i.len;for(;h;)if(s.ins==-1){let c=Math.min(h,s.len);o+=c,h-=c,s.forward(c)}else if(s.ins==0&&s.lena||i.ins>=0&&i.len>a)&&(s||l.length>o),u.forward2(a),i.forward(a)}}}}class E1{constructor(n){this.set=n,this.i=0,this.next()}next(){let{sections:n}=this.set;this.i>1;return e>=n.length?Ie.empty:n[e]}textBit(n){let{inserted:e}=this.set,l=this.i-2>>1;return l>=e.length&&!n?Ie.empty:e[l].slice(this.off,n==null?void 0:this.off+n)}forward(n){n==this.len?this.next():(this.len-=n,this.off+=n)}forward2(n){this.ins==-1?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}class sf{constructor(n,e,l){this.from=n,this.to=e,this.flags=l}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let n=this.flags&3;return n==3?null:n}get goalColumn(){let n=this.flags>>5;return n==33554431?void 0:n}map(n,e=-1){let l,r;return this.empty?l=r=n.mapPos(this.from,e):(l=n.mapPos(this.from,1),r=n.mapPos(this.to,-1)),l==this.from&&r==this.to?this:new sf(l,r,this.flags)}extend(n,e=n){if(n<=this.anchor&&e>=this.anchor)return Tn.range(n,e);let l=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return Tn.range(this.anchor,l)}eq(n){return this.anchor==n.anchor&&this.head==n.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(n){if(!n||typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Tn.range(n.anchor,n.head)}static create(n,e,l){return new sf(n,e,l)}}class Tn{constructor(n,e){this.ranges=n,this.mainIndex=e}map(n,e=-1){return n.empty?this:Tn.create(this.ranges.map(l=>l.map(n,e)),this.mainIndex)}eq(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(let e=0;en.toJSON()),main:this.mainIndex}}static fromJSON(n){if(!n||!Array.isArray(n.ranges)||typeof n.main!="number"||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Tn(n.ranges.map(e=>sf.fromJSON(e)),n.main)}static single(n,e=n){return new Tn([Tn.range(n,e)],0)}static create(n,e=0){if(n.length==0)throw new RangeError("A selection needs at least one range");for(let l=0,r=0;rn?4:0)|u)}static normalized(n,e=0){let l=n[e];n.sort((r,u)=>r.from-u.from),e=n.indexOf(l);for(let r=1;ru.head?Tn.range(a,s):Tn.range(s,a))}}return new Tn(n,e)}}function HL(t,n){for(let e of t.ranges)if(e.to>n)throw new RangeError("Selection points outside of document")}let JR=0;class dt{constructor(n,e,l,r,u){this.combine=n,this.compareInput=e,this.compare=l,this.isStatic=r,this.id=JR++,this.default=n([]),this.extensions=typeof u=="function"?u(this):u}static define(n={}){return new dt(n.combine||(e=>e),n.compareInput||((e,l)=>e===l),n.compare||(n.combine?(e,l)=>e===l:KR),!!n.static,n.enables)}of(n){return new Av([],this,0,n)}compute(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Av(n,this,1,e)}computeN(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Av(n,this,2,e)}from(n,e){return e||(e=l=>l),this.compute([n],l=>e(l.field(n)))}}function KR(t,n){return t==n||t.length==n.length&&t.every((e,l)=>e===n[l])}class Av{constructor(n,e,l,r){this.dependencies=n,this.facet=e,this.type=l,this.value=r,this.id=JR++}dynamicSlot(n){var e;let l=this.value,r=this.facet.compareInput,u=this.id,i=n[u]>>1,s=this.type==2,a=!1,o=!1,h=[];for(let c of this.dependencies)c=="doc"?a=!0:c=="selection"?o=!0:((e=n[c.id])!==null&&e!==void 0?e:1)&1||h.push(n[c.id]);return{create(c){return c.values[i]=l(c),1},update(c,f){if(a&&f.docChanged||o&&(f.docChanged||f.selection)||Rx(c,h)){let d=l(c);if(s?!dD(d,c.values[i],r):!r(d,c.values[i]))return c.values[i]=d,1}return 0},reconfigure:(c,f)=>{let d,C=f.config.address[u];if(C!=null){let I=u2(f,C);if(this.dependencies.every(T=>T instanceof dt?f.facet(T)===c.facet(T):T instanceof eu?f.field(T,!1)==c.field(T,!1):!0)||(s?dD(d=l(c),I,r):r(d=l(c),I)))return c.values[i]=I,0}else d=l(c);return c.values[i]=d,1}}}}function dD(t,n,e){if(t.length!=n.length)return!1;for(let l=0;lt[a.id]),r=e.map(a=>a.type),u=l.filter(a=>!(a&1)),i=t[n.id]>>1;function s(a){let o=[];for(let h=0;hl===r),n);return n.provide&&(e.provides=n.provide(e)),e}create(n){let e=n.facet(pD).find(l=>l.field==this);return((e==null?void 0:e.create)||this.createF)(n)}slot(n){let e=n[this.id]>>1;return{create:l=>(l.values[e]=this.create(l),1),update:(l,r)=>{let u=l.values[e],i=this.updateF(u,r);return this.compareF(u,i)?0:(l.values[e]=i,1)},reconfigure:(l,r)=>r.config.address[this.id]!=null?(l.values[e]=r.field(this),0):(l.values[e]=this.create(l),1)}}init(n){return[this,pD.of({field:this,create:n})]}get extension(){return this}}const ef={lowest:4,low:3,default:2,high:1,highest:0};function Wd(t){return n=>new ZL(n,t)}const fg={highest:Wd(ef.highest),high:Wd(ef.high),default:Wd(ef.default),low:Wd(ef.low),lowest:Wd(ef.lowest)};class ZL{constructor(n,e){this.inner=n,this.prec=e}}class c5{of(n){return new Px(this,n)}reconfigure(n){return c5.reconfigure.of({compartment:this,extension:n})}get(n){return n.config.compartments.get(this)}}class Px{constructor(n,e){this.compartment=n,this.inner=e}}class r2{constructor(n,e,l,r,u,i){for(this.base=n,this.compartments=e,this.dynamicSlots=l,this.address=r,this.staticValues=u,this.facets=i,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(n,e,l){let r=[],u=Object.create(null),i=new Map;for(let f of JJ(n,e,i))f instanceof eu?r.push(f):(u[f.facet.id]||(u[f.facet.id]=[])).push(f);let s=Object.create(null),a=[],o=[];for(let f of r)s[f.id]=o.length<<1,o.push(d=>f.slot(d));let h=l==null?void 0:l.config.facets;for(let f in u){let d=u[f],C=d[0].facet,I=h&&h[f]||[];if(d.every(T=>T.type==0))if(s[C.id]=a.length<<1|1,KR(I,d))a.push(l.facet(C));else{let T=C.combine(d.map($=>$.value));a.push(l&&C.compare(T,l.facet(C))?l.facet(C):T)}else{for(let T of d)T.type==0?(s[T.id]=a.length<<1|1,a.push(T.value)):(s[T.id]=o.length<<1,o.push($=>T.dynamicSlot($)));s[C.id]=o.length<<1,o.push(T=>GJ(T,C,d))}}let c=o.map(f=>f(s));return new r2(n,i,c,s,a,u)}}function JJ(t,n,e){let l=[[],[],[],[],[]],r=new Map;function u(i,s){let a=r.get(i);if(a!=null){if(a<=s)return;let o=l[a].indexOf(i);o>-1&&l[a].splice(o,1),i instanceof Px&&e.delete(i.compartment)}if(r.set(i,s),Array.isArray(i))for(let o of i)u(o,s);else if(i instanceof Px){if(e.has(i.compartment))throw new RangeError("Duplicate use of compartment in extensions");let o=n.get(i.compartment)||i.inner;e.set(i.compartment,o),u(o,s)}else if(i instanceof ZL)u(i.inner,i.prec);else if(i instanceof eu)l[s].push(i),i.provides&&u(i.provides,s);else if(i instanceof Av)l[s].push(i),i.facet.extensions&&u(i.facet.extensions,ef.default);else{let o=i.extension;if(!o)throw new Error(`Unrecognized extension value in extension set (${i}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);u(o,s)}}return u(t,ef.default),l.reduce((i,s)=>i.concat(s))}function m1(t,n){if(n&1)return 2;let e=n>>1,l=t.status[e];if(l==4)throw new Error("Cyclic dependency between fields and/or facets");if(l&2)return l;t.status[e]=4;let r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function u2(t,n){return n&1?t.config.staticValues[n>>1]:t.values[n>>1]}const bL=dt.define(),nW=dt.define({combine:t=>t.some(n=>n),static:!0}),tW=dt.define({combine:t=>t.length?t[0]:void 0,static:!0}),eW=dt.define(),lW=dt.define(),rW=dt.define(),uW=dt.define({combine:t=>t.length?t[0]:!1});class eh{constructor(n,e){this.type=n,this.value=e}static define(){return new KJ}}class KJ{of(n){return new eh(this,n)}}class BJ{constructor(n){this.map=n}of(n){return new ee(this,n)}}class ee{constructor(n,e){this.type=n,this.value=e}map(n){let e=this.type.map(this.value,n);return e===void 0?void 0:e==this.value?this:new ee(this.type,e)}is(n){return this.type==n}static define(n={}){return new BJ(n.map||(e=>e))}static mapEffects(n,e){if(!n.length)return n;let l=[];for(let r of n){let u=r.map(e);u&&l.push(u)}return l}}ee.reconfigure=ee.define();ee.appendConfig=ee.define();class yr{constructor(n,e,l,r,u,i){this.startState=n,this.changes=e,this.selection=l,this.effects=r,this.annotations=u,this.scrollIntoView=i,this._doc=null,this._state=null,l&&HL(l,e.newLength),u.some(s=>s.type==yr.time)||(this.annotations=u.concat(yr.time.of(Date.now())))}static create(n,e,l,r,u,i){return new yr(n,e,l,r,u,i)}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(n){for(let e of this.annotations)if(e.type==n)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(n){let e=this.annotation(yr.userEvent);return!!(e&&(e==n||e.length>n.length&&e.slice(0,n.length)==n&&e[n.length]=="."))}}yr.time=eh.define();yr.userEvent=eh.define();yr.addToHistory=eh.define();yr.remote=eh.define();function XJ(t,n){let e=[];for(let l=0,r=0;;){let u,i;if(l=t[l]))u=t[l++],i=t[l++];else if(r=0;r--){let u=l[r](t);u instanceof yr?t=u:Array.isArray(u)&&u.length==1&&u[0]instanceof yr?t=u[0]:t=sW(n,km(u),!1)}return t}function HJ(t){let n=t.startState,e=n.facet(rW),l=t;for(let r=e.length-1;r>=0;r--){let u=e[r](t);u&&Object.keys(u).length&&(l=iW(l,Ix(n,u,t.changes.newLength),!0))}return l==t?t:yr.create(n,t.changes,t.selection,l.effects,l.annotations,l.scrollIntoView)}const ZJ=[];function km(t){return t==null?ZJ:Array.isArray(t)?t:[t]}var dl=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(dl||(dl={}));const bJ=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let _x;try{_x=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function nK(t){if(_x)return _x.test(t);for(let n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||bJ.test(e)))return!0}return!1}function tK(t){return n=>{if(!/\S/.test(n))return dl.Space;if(nK(n))return dl.Word;for(let e=0;e-1)return dl.Word;return dl.Other}}class Oe{constructor(n,e,l,r,u,i){this.config=n,this.doc=e,this.selection=l,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=u,i&&(i._state=this);for(let s=0;sr.set(a,s)),e=null),r.set(i.value.compartment,i.value.extension)):i.is(ee.reconfigure)?(e=null,l=i.value):i.is(ee.appendConfig)&&(e=null,l=km(l).concat(i.value));let u;e?u=n.startState.values.slice():(e=r2.resolve(l,r,this),u=new Oe(e,this.doc,this.selection,e.dynamicSlots.map(()=>null),(s,a)=>a.reconfigure(s,this),null).values),new Oe(e,n.newDoc,n.newSelection,u,(i,s)=>s.update(i,n),n)}replaceSelection(n){return typeof n=="string"&&(n=this.toText(n)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:n},range:Tn.cursor(e.from+n.length)}))}changeByRange(n){let e=this.selection,l=n(e.ranges[0]),r=this.changes(l.changes),u=[l.range],i=km(l.effects);for(let s=1;si.spec.fromJSON(s,a)))}}return Oe.create({doc:n.doc,selection:Tn.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}static create(n={}){let e=r2.resolve(n.extensions||[],new Map),l=n.doc instanceof Ie?n.doc:Ie.of((n.doc||"").split(e.staticFacet(Oe.lineSeparator)||Cx)),r=n.selection?n.selection instanceof Tn?n.selection:Tn.single(n.selection.anchor,n.selection.head):Tn.single(0);return HL(r,l.length),e.staticFacet(nW)||(r=r.asSingle()),new Oe(e,l,r,e.dynamicSlots.map(()=>null),(u,i)=>i.create(u),null)}get tabSize(){return this.facet(Oe.tabSize)}get lineBreak(){return this.facet(Oe.lineSeparator)||` +`}get readOnly(){return this.facet(uW)}phrase(n,...e){for(let l of this.facet(Oe.phrases))if(Object.prototype.hasOwnProperty.call(l,n)){n=l[n];break}return e.length&&(n=n.replace(/\$(\$|\d*)/g,(l,r)=>{if(r=="$")return"$";let u=+(r||1);return!u||u>e.length?l:e[u-1]})),n}languageDataAt(n,e,l=-1){let r=[];for(let u of this.facet(bL))for(let i of u(this,e,l))Object.prototype.hasOwnProperty.call(i,n)&&r.push(i[n]);return r}charCategorizer(n){return tK(this.languageDataAt("wordChars",n).join(""))}wordAt(n){let{text:e,from:l,length:r}=this.doc.lineAt(n),u=this.charCategorizer(n),i=n-l,s=n-l;for(;i>0;){let a=Ou(e,i,!1);if(u(e.slice(a,i))!=dl.Word)break;i=a}for(;st.length?t[0]:4});Oe.lineSeparator=tW;Oe.readOnly=uW;Oe.phrases=dt.define({compare(t,n){let e=Object.keys(t),l=Object.keys(n);return e.length==l.length&&e.every(r=>t[r]==n[r])}});Oe.languageData=bL;Oe.changeFilter=eW;Oe.transactionFilter=lW;Oe.transactionExtender=rW;c5.reconfigure=ee.define();function Wo(t,n,e={}){let l={};for(let r of t)for(let u of Object.keys(r)){let i=r[u],s=l[u];if(s===void 0)l[u]=i;else if(!(s===i||i===void 0))if(Object.hasOwnProperty.call(e,u))l[u]=e[u](s,i);else throw new Error("Config merge conflict for field "+u)}for(let r in n)l[r]===void 0&&(l[r]=n[r]);return l}class Rf{eq(n){return this==n}range(n,e=n){return Tx.create(n,e,this)}}Rf.prototype.startSide=Rf.prototype.endSide=0;Rf.prototype.point=!1;Rf.prototype.mapMode=ku.TrackDel;let Tx=class oW{constructor(n,e,l){this.from=n,this.to=e,this.value=l}static create(n,e,l){return new oW(n,e,l)}};function Dx(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}class BR{constructor(n,e,l,r){this.from=n,this.to=e,this.value=l,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(n,e,l,r=0){let u=l?this.to:this.from;for(let i=r,s=u.length;;){if(i==s)return i;let a=i+s>>1,o=u[a]-n||(l?this.value[a].endSide:this.value[a].startSide)-e;if(a==i)return o>=0?i:s;o>=0?s=a:i=a+1}}between(n,e,l,r){for(let u=this.findIndex(e,-1e9,!0),i=this.findIndex(l,1e9,!1,u);ud||f==d&&o.startSide>0&&o.endSide<=0)continue;(d-f||o.endSide-o.startSide)<0||(i<0&&(i=f),o.point&&(s=Math.max(s,d-f)),l.push(o),r.push(f-i),u.push(d-i))}return{mapped:l.length?new BR(r,u,l,s):null,pos:i}}}class We{constructor(n,e,l,r){this.chunkPos=n,this.chunk=e,this.nextLayer=l,this.maxPoint=r}static create(n,e,l,r){return new We(n,e,l,r)}get length(){let n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let n=this.nextLayer.size;for(let e of this.chunk)n+=e.value.length;return n}chunkEnd(n){return this.chunkPos[n]+this.chunk[n].length}update(n){let{add:e=[],sort:l=!1,filterFrom:r=0,filterTo:u=this.length}=n,i=n.filter;if(e.length==0&&!i)return this;if(l&&(e=e.slice().sort(Dx)),this.isEmpty)return e.length?We.of(e):this;let s=new aW(this,null,-1).goto(0),a=0,o=[],h=new Qh;for(;s.value||a=0){let c=e[a++];h.addInner(c.from,c.to,c.value)||o.push(c)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||us.to||u=u&&n<=u+i.length&&i.between(u,n-u,e-u,l)===!1)return}this.nextLayer.between(n,e,l)}}iter(n=0){return R1.from([this]).goto(n)}get isEmpty(){return this.nextLayer==this}static iter(n,e=0){return R1.from(n).goto(e)}static compare(n,e,l,r,u=-1){let i=n.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=u),s=e.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=u),a=vD(i,s,l),o=new Vd(i,a,u),h=new Vd(s,a,u);l.iterGaps((c,f,d)=>yD(o,c,h,f,d,r)),l.empty&&l.length==0&&yD(o,0,h,0,0,r)}static eq(n,e,l=0,r){r==null&&(r=1e9-1);let u=n.filter(h=>!h.isEmpty&&e.indexOf(h)<0),i=e.filter(h=>!h.isEmpty&&n.indexOf(h)<0);if(u.length!=i.length)return!1;if(!u.length)return!0;let s=vD(u,i),a=new Vd(u,s,0).goto(l),o=new Vd(i,s,0).goto(l);for(;;){if(a.to!=o.to||!Mx(a.active,o.active)||a.point&&(!o.point||!a.point.eq(o.point)))return!1;if(a.to>r)return!0;a.next(),o.next()}}static spans(n,e,l,r,u=-1){let i=new Vd(n,null,u).goto(e),s=e,a=i.openStart;for(;;){let o=Math.min(i.to,l);if(i.point){let h=i.activeForPoint(i.to),c=i.pointFroms&&(r.span(s,o,i.active,a),a=i.openEnd(o));if(i.to>l)return a+(i.point&&i.to>l?1:0);s=i.to,i.next()}}static of(n,e=!1){let l=new Qh;for(let r of n instanceof Tx?[n]:e?eK(n):n)l.add(r.from,r.to,r.value);return l.finish()}}We.empty=new We([],[],null,-1);function eK(t){if(t.length>1)for(let n=t[0],e=1;e0)return t.slice().sort(Dx);n=l}return t}We.empty.nextLayer=We.empty;class Qh{finishChunk(n){this.chunks.push(new BR(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,n&&(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(n,e,l){this.addInner(n,e,l)||(this.nextLayer||(this.nextLayer=new Qh)).add(n,e,l)}addInner(n,e,l){let r=n-this.lastTo||l.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||l.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=l,this.lastFrom=n,this.lastTo=e,this.value.push(l),l.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),!0)}addChunk(n,e){if((n-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(n);let l=e.value.length-1;return this.last=e.value[l],this.lastFrom=e.from[l]+n,this.lastTo=e.to[l]+n,!0}finish(){return this.finishInner(We.empty)}finishInner(n){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return n;let e=We.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}function vD(t,n,e){let l=new Map;for(let u of t)for(let i=0;i=this.minPoint)break}}setRangeIndex(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=l&&r.push(new aW(i,e,l,u));return r.length==1?r[0]:new R1(r)}get startSide(){return this.value?this.value.startSide:0}goto(n,e=-1e9){for(let l of this.heap)l.goto(n,e);for(let l=this.heap.length>>1;l>=0;l--)hj(this.heap,l);return this.next(),this}forward(n,e){for(let l of this.heap)l.forward(n,e);for(let l=this.heap.length>>1;l>=0;l--)hj(this.heap,l);(this.to-n||this.value.endSide-e)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),hj(this.heap,0)}}}function hj(t,n){for(let e=t[n];;){let l=(n<<1)+1;if(l>=t.length)break;let r=t[l];if(l+1=0&&(r=t[l+1],l++),e.compare(r)<0)break;t[l]=e,t[n]=r,n=l}}class Vd{constructor(n,e,l){this.minPoint=l,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=R1.from(n,e,l)}goto(n,e=-1e9){return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}forward(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}removeActive(n){$0(this.active,n),$0(this.activeTo,n),$0(this.activeRank,n),this.minActive=jD(this.active,this.activeTo)}addActive(n){let e=0,{value:l,to:r,rank:u}=this.cursor;for(;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),l&&$0(l,r)}else if(this.cursor.value)if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let u=this.cursor.value;if(!u.point)this.addActive(l),this.cursor.next();else if(e&&this.cursor.to==this.to&&this.cursor.from=0&&l[r]=0&&!(this.activeRank[l]n||this.activeTo[l]==n&&this.active[l].endSide>=this.point.endSide)&&e.push(this.active[l]);return e.reverse()}openEnd(n){let e=0;for(let l=this.activeTo.length-1;l>=0&&this.activeTo[l]>n;l--)e++;return e}}function yD(t,n,e,l,r,u){t.goto(n),e.goto(l);let i=l+r,s=l,a=l-n;for(;;){let o=t.to+a-e.to||t.endSide-e.endSide,h=o<0?t.to+a:e.to,c=Math.min(h,i);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&Mx(t.activeForPoint(t.to),e.activeForPoint(e.to))||u.comparePoint(s,c,t.point,e.point):c>s&&!Mx(t.active,e.active)&&u.compareRange(s,c,t.active,e.active),h>i)break;s=h,o<=0&&t.next(),o>=0&&e.next()}}function Mx(t,n){if(t.length!=n.length)return!1;for(let e=0;e=n;l--)t[l+1]=t[l];t[n]=e}function jD(t,n){let e=-1,l=1e9;for(let r=0;r=n)return r;if(r==t.length)break;u+=t.charCodeAt(r)==9?e-u%e:1,r=Ou(t,r)}return l===!0?-1:t.length}const Nx="ͼ",xD=typeof Symbol>"u"?"__"+Nx:Symbol.for(Nx),qx=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),kD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Gh{constructor(n,e){this.rules=[];let{finish:l}=e||{};function r(i){return/^@/.test(i)?[i]:i.split(/,\s*/)}function u(i,s,a,o){let h=[],c=/^@(\w+)\b/.exec(i[0]),f=c&&c[1]=="keyframes";if(c&&s==null)return a.push(i[0]+";");for(let d in s){let C=s[d];if(/&/.test(d))u(d.split(/,\s*/).map(I=>i.map(T=>I.replace(/&/,T))).reduce((I,T)=>I.concat(T)),C,a);else if(C&&typeof C=="object"){if(!c)throw new RangeError("The value of a property ("+d+") should be a primitive value.");u(r(d),C,h,f)}else C!=null&&h.push(d.replace(/_.*/,"").replace(/[A-Z]/g,I=>"-"+I.toLowerCase())+": "+C+";")}(h.length||f)&&a.push((l&&!c&&!o?i.map(l):i).join(", ")+" {"+h.join(" ")+"}")}for(let i in n)u(r(i),n[i],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let n=kD[xD]||1;return kD[xD]=n+1,Nx+n.toString(36)}static mount(n,e){(n[qx]||new lK(n)).mount(Array.isArray(e)?e:[e])}}let SD=new Map;class lK{constructor(n){let e=n.ownerDocument||n,l=e.defaultView;if(!n.head&&n.adoptedStyleSheets&&l.CSSStyleSheet){let r=SD.get(e);if(r)return n.adoptedStyleSheets=[r.sheet,...n.adoptedStyleSheets],n[qx]=r;this.sheet=new l.CSSStyleSheet,n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets],SD.set(e,this)}else{this.styleTag=e.createElement("style");let r=n.head||n;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],n[qx]=this}mount(n){let e=this.sheet,l=0,r=0;for(let u=0;u-1&&(this.modules.splice(s,1),r--,s=-1),s==-1){if(this.modules.splice(r++,0,i),e)for(let a=0;a",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rK=typeof navigator<"u"&&/Mac/.test(navigator.platform),uK=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Kr=0;Kr<10;Kr++)Jh[48+Kr]=Jh[96+Kr]=String(Kr);for(var Kr=1;Kr<=24;Kr++)Jh[Kr+111]="F"+Kr;for(var Kr=65;Kr<=90;Kr++)Jh[Kr]=String.fromCharCode(Kr+32),P1[Kr]=String.fromCharCode(Kr);for(var cj in Jh)P1.hasOwnProperty(cj)||(P1[cj]=Jh[cj]);function iK(t){var n=rK&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||uK&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",e=!n&&t.key||(t.shiftKey?P1:Jh)[t.keyCode]||t.key||"Unidentified";return e=="Esc"&&(e="Escape"),e=="Del"&&(e="Delete"),e=="Left"&&(e="ArrowLeft"),e=="Up"&&(e="ArrowUp"),e=="Right"&&(e="ArrowRight"),e=="Down"&&(e="ArrowDown"),e}function i2(t){let n;return t.nodeType==11?n=t.getSelection?t:t.ownerDocument:n=t,n.getSelection()}function bm(t,n){return n?t==n||t.contains(n.nodeType!=1?n.parentNode:n):!1}function sK(t){let n=t.activeElement;for(;n&&n.shadowRoot;)n=n.shadowRoot.activeElement;return n}function Ev(t,n){if(!n.anchorNode)return!1;try{return bm(t,n.anchorNode)}catch{return!1}}function I1(t){return t.nodeType==3?nw(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function s2(t,n,e,l){return e?OD(t,n,e,l,-1)||OD(t,n,e,l,1):!1}function o2(t){for(var n=0;;n++)if(t=t.previousSibling,!t)return n}function OD(t,n,e,l,r){for(;;){if(t==e&&n==l)return!0;if(n==(r<0?0:Kh(t))){if(t.nodeName=="DIV")return!1;let u=t.parentNode;if(!u||u.nodeType!=1)return!1;n=o2(t)+(r<0?0:1),t=u}else if(t.nodeType==1){if(t=t.childNodes[n+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;n=r<0?Kh(t):0}else return!1}}function Kh(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function XR(t,n){let e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function oK(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function aK(t,n,e,l,r,u,i,s){let a=t.ownerDocument,o=a.defaultView||window;for(let h=t;h;)if(h.nodeType==1){let c,f=h==a.body;if(f)c=oK(o);else{if(h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let I=h.getBoundingClientRect();c={left:I.left,right:I.left+h.clientWidth,top:I.top,bottom:I.top+h.clientHeight}}let d=0,C=0;if(r=="nearest")n.top0&&n.bottom>c.bottom+C&&(C=n.bottom-c.bottom+C+i)):n.bottom>c.bottom&&(C=n.bottom-c.bottom+i,e<0&&n.top-C0&&n.right>c.right+d&&(d=n.right-c.right+d+u)):n.right>c.right&&(d=n.right-c.right+u,e<0&&n.lefte.clientHeight||e.scrollWidth>e.clientWidth)return e;e=e.assignedSlot||e.parentNode}else if(e.nodeType==11)e=e.host;else break;return null}class cK{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}setRange(n){let{anchorNode:e,focusNode:l}=n;this.set(e,Math.min(n.anchorOffset,e?Kh(e):0),l,Math.min(n.focusOffset,l?Kh(l):0))}set(n,e,l,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=l,this.focusOffset=r}}let Gg=null;function hW(t){if(t.setActive)return t.setActive();if(Gg)return t.focus(Gg);let n=[];for(let e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(Gg==null?{get preventScroll(){return Gg={preventScroll:!0},!0}}:void 0),!Gg){Gg=!1;for(let e=0;ee)return c.domBoundsAround(n,e,o);if(f>=n&&r==-1&&(r=a,u=o),o>e&&c.dom.parentNode==this.dom){i=a,s=h;break}h=f,o=f+c.breakAfter}return{from:u,to:s<0?l+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i=0?this.children[i].dom:null}}markDirty(n=!1){this.dirty|=2,this.markParentsDirty(n)}markParentsDirty(n){for(let e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),e.dirty&1)return;e.dirty|=1,n=!1}}setParent(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}setDOM(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}get rootView(){for(let n=this;;){let e=n.parent;if(!e)return n;n=e}}replaceChildren(n,e,l=FR){this.markDirty();for(let r=n;rthis.pos||n==this.pos&&(e>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;let l=this.children[--this.i];this.pos-=l.length+l.breakAfter}}}function gW(t,n,e,l,r,u,i,s,a){let{children:o}=t,h=o.length?o[n]:null,c=u.length?u[u.length-1]:null,f=c?c.breakAfter:i;if(!(n==l&&h&&!i&&!f&&u.length<2&&h.merge(e,r,u.length?c:null,e==0,s,a))){if(l0&&(!i&&u.length&&h.merge(e,h.length,u[0],!1,s,0)?h.breakAfter=u.shift().breakAfter:(e2);var gt={mac:PD||/Mac/.test(vi.platform),windows:/Win/.test(vi.platform),linux:/Linux|X11/.test(vi.platform),ie:f5,ie_version:wW?Lx.documentMode||6:Vx?+Vx[1]:Wx?+Wx[1]:0,gecko:ED,gecko_version:ED?+(/Firefox\/(\d+)/.exec(vi.userAgent)||[0,0])[1]:0,chrome:!!fj,chrome_version:fj?+fj[1]:0,ios:PD,android:/Android\b/.test(vi.userAgent),webkit:RD,safari:dW,webkit_version:RD?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Lx.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const mK=256;class Pf extends ll{constructor(n){super(),this.text=n}get length(){return this.text.length}createDOM(n){this.setDOM(n||document.createTextNode(this.text))}sync(n,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(n){n.nodeType==3&&this.createDOM(n)}merge(n,e,l){return l&&(!(l instanceof Pf)||this.length-(e-n)+l.length>mK)?!1:(this.text=this.text.slice(0,n)+(l?l.text:"")+this.text.slice(e),this.markDirty(),!0)}split(n){let e=new Pf(this.text.slice(n));return this.text=this.text.slice(0,n),this.markDirty(),e}localPosFromDOM(n,e){return n==this.dom?e:e?this.text.length:0}domAtPos(n){return new Br(this.dom,n)}domBoundsAround(n,e,l){return{from:l,to:l+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(n,e){return zx(this.dom,n,e)}}class Ta extends ll{constructor(n,e=[],l=0){super(),this.mark=n,this.children=e,this.length=l;for(let r of e)r.setParent(this)}setAttrs(n){if(cW(n),this.mark.class&&(n.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)n.setAttribute(e,this.mark.attrs[e]);return n}reuseDOM(n){n.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(n),this.dirty|=6)}sync(n,e){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(n,e)}merge(n,e,l,r,u,i){return l&&(!(l instanceof Ta&&l.mark.eq(this.mark))||n&&u<=0||en&&e.push(l=n&&(r=u),l=a,u++}let i=this.length-n;return this.length=n,r>-1&&(this.children.length=r,this.markDirty()),new Ta(this.mark,e,i)}domAtPos(n){return xW(this,n)}coordsAt(n,e){return SW(this,n,e)}}function zx(t,n,e){let l=t.nodeValue.length;n>l&&(n=l);let r=n,u=n,i=0;n==0&&e<0||n==l&&e>=0?gt.chrome||gt.gecko||(n?(r--,i=1):u=0)?0:s.length-1];return gt.safari&&!i&&a.width==0&&(a=Array.prototype.find.call(s,o=>o.width)||a),i?XR(a,i<0):a||null}class Ph extends ll{constructor(n,e,l){super(),this.widget=n,this.length=e,this.side=l,this.prevWidget=null}static create(n,e,l){return new(n.customView||Ph)(n,e,l)}split(n){let e=Ph.create(this.widget,this.length-n,this.side);return this.length-=n,e}sync(n){(!this.dom||!this.widget.updateDOM(this.dom,n))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(n)),this.dom.contentEditable="false")}getSide(){return this.side}merge(n,e,l,r,u,i){return l&&(!(l instanceof Ph)||!this.widget.compare(l.widget)||n>0&&u<=0||e0)?Br.before(this.dom):Br.after(this.dom,n==this.length)}domBoundsAround(){return null}coordsAt(n,e){let l=this.widget.coordsAt(this.dom,n,e);if(l)return l;let r=this.dom.getClientRects(),u=null;if(!r.length)return null;let i=this.side?this.side<0:n>0;for(let s=i?r.length-1:0;u=r[s],!(n>0?s==0:s==r.length-1||u.topr.domAtPos(u),(r,u)=>new Br(r,Math.min(u,r.nodeValue.length))):new Br(l,Math.min(n,l.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(n,e){let{topView:l,text:r}=this.widget;return l?yW(n,e,l,r,this.length-l.length):Math.min(e,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(n,e){let{topView:l,text:r}=this.widget;return l?Ux(n,e,l,r,this.length-l.length,(u,i,s)=>u.coordsAt(i,s),(u,i,s)=>zx(u,i,s)):zx(r,n,e)}destroy(){var n;super.destroy(),(n=this.widget.topView)===null||n===void 0||n.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function Ux(t,n,e,l,r,u,i){if(e instanceof Ta){for(let s=e.dom.firstChild;s;s=s.nextSibling){let a=ll.get(s);if(a){let o=bm(s,l),h=a.length+(o?r:0);if(t0?Br.before(this.dom):Br.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(n){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ie.empty}get isHidden(){return!0}}Pf.prototype.children=Ph.prototype.children=tw.prototype.children=FR;function xW(t,n){let e=t.dom,{children:l}=t,r=0;for(let u=0;ru&&n0;u--){let i=l[u-1];if(i.dom.parentNode==e)return i.domAtPos(i.length)}for(let u=r;u0&&n instanceof Ta&&r.length&&(l=r[r.length-1])instanceof Ta&&l.mark.eq(n.mark)?kW(l,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function SW(t,n,e){let l=null,r=-1,u=null,i=-1;function s(o,h){for(let c=0,f=0;c=h&&(d.children.length?s(d,h-f):(!u||u.isHidden&&e>0)&&(C>h||f==C&&d.getSide()>0)?(u=d,i=h-f):(f0?3e8:-4e8:e>0?1e8:-1e8,new Bh(n,e,e,l,n.widget||null,!1)}static replace(n){let e=!!n.block,l,r;if(n.isBlockGap)l=-5e8,r=4e8;else{let{start:u,end:i}=OW(n,e);l=(u?e?-3e8:-1:5e8)-1,r=(i?e?2e8:1:-6e8)+1}return new Bh(n,l,r,e,n.widget||null,!0)}static line(n){return new _p(n)}static set(n,e=!1){return We.of(n,e)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Tt.none=We.empty;class g5 extends Tt{constructor(n){let{start:e,end:l}=OW(n);super(e?-1:5e8,l?1:-6e8,null,n),this.tagName=n.tagName||"span",this.class=n.class||"",this.attrs=n.attributes||null}eq(n){return this==n||n instanceof g5&&this.tagName==n.tagName&&this.class==n.class&&HR(this.attrs,n.attrs)}range(n,e=n){if(n>=e)throw new RangeError("Mark decorations may not be empty");return super.range(n,e)}}g5.prototype.point=!1;class _p extends Tt{constructor(n){super(-2e8,-2e8,null,n)}eq(n){return n instanceof _p&&this.spec.class==n.spec.class&&HR(this.spec.attributes,n.spec.attributes)}range(n,e=n){if(e!=n)throw new RangeError("Line decoration ranges must be zero-length");return super.range(n,e)}}_p.prototype.mapMode=ku.TrackBefore;_p.prototype.point=!0;class Bh extends Tt{constructor(n,e,l,r,u,i){super(e,l,u,n),this.block=r,this.isReplace=i,this.mapMode=r?e<=0?ku.TrackBefore:ku.TrackAfter:ku.TrackDel}get type(){return this.startSide=5||this.widget.lineBreaks>0)}eq(n){return n instanceof Bh&&dK(this.widget,n.widget)&&this.block==n.block&&this.startSide==n.startSide&&this.endSide==n.endSide}range(n,e=n){if(this.isReplace&&(n>e||n==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=n)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(n,e)}}Bh.prototype.point=!0;function OW(t,n=!1){let{inclusiveStart:e,inclusiveEnd:l}=t;return e==null&&(e=t.inclusive),l==null&&(l=t.inclusive),{start:e??n,end:l??n}}function dK(t,n){return t==n||!!(t&&n&&t.compare(n))}function Gx(t,n,e,l=0){let r=e.length-1;r>=0&&e[r]+l>=t?e[r]=Math.max(e[r],n):e.push(t,n)}class Ku extends ll{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(n,e,l,r,u,i){if(l){if(!(l instanceof Ku))return!1;this.dom||l.transferDOM(this)}return r&&this.setDeco(l?l.attrs:null),mW(this,n,e,l?l.children:[],u,i),!0}split(n){let e=new Ku;if(e.breakAfter=this.breakAfter,this.length==0)return e;let{i:l,off:r}=this.childPos(n);r&&(e.append(this.children[l].split(r),0),this.children[l].merge(r,this.children[l].length,null,!1,0,0),l++);for(let u=l;u0&&this.children[l-1].length==0;)this.children[--l].destroy();return this.children.length=l,this.markDirty(),this.length=n,e}transferDOM(n){this.dom&&(this.markDirty(),n.setDOM(this.dom),n.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(n){HR(this.attrs,n)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=n)}append(n,e){kW(this,n,e)}addLineDeco(n){let e=n.spec.attributes,l=n.spec.class;e&&(this.attrs=Yx(e,this.attrs||{})),l&&(this.attrs=Yx({class:l},this.attrs||{}))}domAtPos(n){return xW(this,n)}reuseDOM(n){n.nodeName=="DIV"&&(this.setDOM(n),this.dirty|=6)}sync(n,e){var l;this.dom?this.dirty&4&&(cW(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),this.prevAttrs!==void 0&&(Qx(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(n,e);let r=this.dom.lastChild;for(;r&&ll.get(r)instanceof Ta;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((l=ll.get(r))===null||l===void 0?void 0:l.isEditable)==!1&&(!gt.ios||!this.children.some(u=>u instanceof Pf))){let u=document.createElement("BR");u.cmIgnore=!0,this.dom.appendChild(u)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let n=0,e;for(let l of this.children){if(!(l instanceof Pf)||/[^ -~]/.test(l.text))return null;let r=I1(l.dom);if(r.length!=1)return null;n+=r[0].width,e=r[0].height}return n?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:n/this.length,textHeight:e}:null}coordsAt(n,e){let l=SW(this,n,e);if(!this.children.length&&l&&this.parent){let{heightOracle:r}=this.parent.view.viewState,u=l.bottom-l.top;if(Math.abs(u-r.lineHeight)<2&&r.textHeight=e){if(u instanceof Ku)return u;if(i>e)break}r=i+u.breakAfter}return null}}class gf extends ll{constructor(n,e,l){super(),this.widget=n,this.length=e,this.type=l,this.breakAfter=0,this.prevWidget=null}merge(n,e,l,r,u,i){return l&&(!(l instanceof gf)||!this.widget.compare(l.widget)||n>0&&u<=0||e0;){if(this.textOff==this.text.length){let{value:u,lineBreak:i,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(i){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,n--;continue}else this.text=u,this.textOff=0}let r=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-l)),this.getLine().append(q0(new Pf(this.text.slice(this.textOff,this.textOff+r)),e),l),this.atCursorPos=!0,this.textOff+=r,n-=r,l=0}}span(n,e,l,r){this.buildText(e-n,l,r),this.pos=e,this.openStart<0&&(this.openStart=r)}point(n,e,l,r,u,i){if(this.disallowBlockEffectsFor[i]&&l instanceof Bh){if(l.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 s=e-n;if(l instanceof Bh)if(l.block){let{type:a}=l;a==El.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new gf(l.widget||new ID("div"),s,a))}else{let a=Ph.create(l.widget||new ID("span"),s,s?0:l.startSide),o=this.atCursorPos&&!a.isEditable&&u<=r.length&&(n0),h=!a.isEditable&&(nr.length||l.startSide<=0),c=this.getLine();this.pendingBuffer==2&&!o&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),o&&(c.append(q0(new tw(1),r),u),u=r.length+Math.max(0,u-r.length)),c.append(q0(a,r),u),this.atCursorPos=h,this.pendingBuffer=h?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(l);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=u)}static build(n,e,l,r,u){let i=new ZR(n,e,l,u);return i.openEnd=We.spans(r,e,l,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}}function q0(t,n){for(let e of n)t=new Ta(e,[t],t.length);return t}class ID extends Ic{constructor(n){super(),this.tag=n}eq(n){return n.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(n){return n.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const CW=dt.define(),AW=dt.define(),EW=dt.define(),RW=dt.define(),Jx=dt.define(),PW=dt.define(),IW=dt.define(),_W=dt.define({combine:t=>t.some(n=>n)}),TW=dt.define({combine:t=>t.some(n=>n)});class a2{constructor(n,e="nearest",l="nearest",r=5,u=5){this.range=n,this.y=e,this.x=l,this.yMargin=r,this.xMargin=u}map(n){return n.empty?this:new a2(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}const _D=ee.define({map:(t,n)=>t.map(n)});function bi(t,n,e){let l=t.facet(RW);l.length?l[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}const m5=dt.define({combine:t=>t.length?t[0]:!0});let pK=0;const Fd=dt.define();class Or{constructor(n,e,l,r){this.id=n,this.create=e,this.domEventHandlers=l,this.extension=r(this)}static define(n,e){const{eventHandlers:l,provide:r,decorations:u}=e||{};return new Or(pK++,n,l,i=>{let s=[Fd.of(i)];return u&&s.push(_1.of(a=>{let o=a.plugin(i);return o?u(o):Tt.none})),r&&s.push(r(i)),s})}static fromClass(n,e){return Or.define(l=>new n(l),e)}}class gj{constructor(n){this.spec=n,this.mustUpdate=null,this.value=null}update(n){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(l){if(bi(e.state,l,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(e){bi(n.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(n){var e;if(!((e=this.value)===null||e===void 0)&&e.destroy)try{this.value.destroy()}catch(l){bi(n.state,l,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const DW=dt.define(),bR=dt.define(),_1=dt.define(),nP=dt.define(),MW=dt.define();function $W(t){let n=0,e=0,l=0,r=0;for(let u of t.state.facet(MW)){let i=u(t);i&&(i.left!=null&&(n=Math.max(n,i.left)),i.right!=null&&(e=Math.max(e,i.right)),i.top!=null&&(l=Math.max(l,i.top)),i.bottom!=null&&(r=Math.max(r,i.bottom)))}return{left:n,right:e,top:l,bottom:r}}const Hd=dt.define();class go{constructor(n,e,l,r){this.fromA=n,this.toA=e,this.fromB=l,this.toB=r}join(n){return new go(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}addToSet(n){let e=n.length,l=this;for(;e>0;e--){let r=n[e-1];if(!(r.fromA>l.toA)){if(r.toAh)break;u+=2}if(!a)return l;new go(a.fromA,a.toA,a.fromB,a.toB).addToSet(l),i=a.toA,s=a.toB}}}class h2{constructor(n,e,l){this.view=n,this.state=e,this.transactions=l,this.flags=0,this.startState=n.state,this.changes=pr.empty(this.startState.doc.length);for(let u of l)this.changes=this.changes.compose(u.changes);let r=[];this.changes.iterChangedRanges((u,i,s,a)=>r.push(new go(u,i,s,a))),this.changedRanges=r}static create(n,e,l){return new h2(n,e,l)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(n=>n.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var Cl=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Cl||(Cl={}));const Kx=Cl.LTR,vK=Cl.RTL;function NW(t){let n=[];for(let e=0;e=e){if(s.level==l)return i;(u<0||(r!=0?r<0?s.frome:n[u].level>s.level))&&(u=i)}}if(u<0)throw new RangeError("Index out of range");return u}}const jl=[];function SK(t,n){let e=t.length,l=n==Kx?1:2,r=n==Kx?2:1;if(!t||l==1&&!kK.test(t))return qW(e);for(let i=0,s=l,a=l;i=0;f-=3)if(Gs[f+1]==-h){let d=Gs[f+2],C=d&2?l:d&4?d&1?r:l:0;C&&(jl[i]=jl[Gs[f]]=C),s=f;break}}else{if(Gs.length==189)break;Gs[s++]=i,Gs[s++]=o,Gs[s++]=a}else if((c=jl[i])==2||c==1){let f=c==l;a=f?0:1;for(let d=s-3;d>=0;d-=3){let C=Gs[d+2];if(C&2)break;if(f)Gs[d+2]|=2;else{if(C&4)break;Gs[d+2]|=4}}}for(let i=0;is;){let h=o,c=jl[--o]!=2;for(;o>s&&c==(jl[o-1]!=2);)o--;u.push(new Om(o,h,c?2:1))}else u.push(new Om(s,i,0))}else for(let i=0;iu)&&this.lineBreak(),r=i}return this.findPointBefore(l,e),this}readTextNode(n){let e=n.nodeValue;for(let l of this.points)l.node==n&&(l.pos=this.text.length+Math.min(l.offset,e.length));for(let l=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let u=-1,i=1,s;if(this.lineSeparator?(u=e.indexOf(this.lineSeparator,l),i=this.lineSeparator.length):(s=r.exec(e))&&(u=s.index,i=s[0].length),this.append(e.slice(l,u<0?e.length:u)),u<0)break;if(this.lineBreak(),i>1)for(let a of this.points)a.node==n&&a.pos>this.text.length&&(a.pos-=i-1);l=u+i}}readNode(n){if(n.cmIgnore)return;let e=ll.get(n),l=e&&e.overrideDOMText;if(l!=null){this.findPointInside(n,l.length);for(let r=l.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else n.nodeType==3?this.readTextNode(n):n.nodeName=="BR"?n.nextSibling&&this.lineBreak():n.nodeType==1&&this.readRange(n.firstChild,null)}findPointBefore(n,e){for(let l of this.points)l.node==n&&n.childNodes[l.offset]==e&&(l.pos=this.text.length)}findPointInside(n,e){for(let l of this.points)(n.nodeType==3?l.node==n:n.contains(l.node))&&(l.pos=this.text.length+Math.min(e,l.offset))}}function TD(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class DD{constructor(n,e){this.node=n,this.offset=e,this.pos=-1}}class MD extends ll{constructor(n){super(),this.view=n,this.compositionDeco=Tt.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(n.contentDOM),this.children=[new Ku],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new go(0,0,0,n.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(n){let e=n.changedRanges;this.minWidth>0&&e.length&&(e.every(({fromA:i,toA:s})=>sthis.minWidthTo)?(this.minWidthFrom=n.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=n.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=Tt.none:(n.transactions.length||this.dirty)&&(this.compositionDeco=AK(this.view,n.changes)),(gt.ie||gt.chrome)&&!this.compositionDeco.size&&n&&n.state.doc.lines!=n.startState.doc.lines&&(this.forceSelection=!0);let l=this.decorations,r=this.updateDeco(),u=IK(l,r,n.changes);return e=go.extendWithRanges(e,u),this.dirty==0&&e.length==0?!1:(this.updateInner(e,n.startState.doc.length),n.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(n,e){this.view.viewState.mustMeasureContent=!0,this.updateChildren(n,e);let{observer:l}=this.view;l.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let u=gt.chrome||gt.ios?{node:l.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,u),this.dirty=0,u&&(u.written||l.selectionRange.focusNode!=u.node)&&(this.forceSelection=!0),this.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to=0?n[r]:null;if(!u)break;let{fromA:i,toA:s,fromB:a,toB:o}=u,{content:h,breakAtStart:c,openStart:f,openEnd:d}=ZR.build(this.view.state.doc,a,o,this.decorations,this.dynamicDecorationMap),{i:C,off:I}=l.findPos(s,1),{i:T,off:$}=l.findPos(i,-1);gW(this,T,$,C,I,h,c,f,d)}}updateSelection(n=!1,e=!1){(n||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let l=this.view.root.activeElement,r=l==this.dom,u=!r&&Ev(this.dom,this.view.observer.selectionRange)&&!(l&&this.dom.contains(l));if(!(r||e||u))return;let i=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.domAtPos(s.anchor),o=s.empty?a:this.domAtPos(s.head);if(gt.gecko&&s.empty&&!this.compositionDeco.size&&CK(a)){let c=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(c,a.node.childNodes[a.offset]||null)),a=o=new Br(c,0),i=!0}let h=this.view.observer.selectionRange;(i||!h.focusNode||!s2(a.node,a.offset,h.anchorNode,h.anchorOffset)||!s2(o.node,o.offset,h.focusNode,h.focusOffset))&&(this.view.observer.ignore(()=>{gt.android&>.chrome&&this.dom.contains(h.focusNode)&&_K(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let c=i2(this.view.root);if(c)if(s.empty){if(gt.gecko){let f=RK(a.node,a.offset);if(f&&f!=3){let d=zW(a.node,a.offset,f==1?1:-1);d&&(a=new Br(d,f==1?0:d.nodeValue.length))}}c.collapse(a.node,a.offset),s.bidiLevel!=null&&h.cursorBidiLevel!=null&&(h.cursorBidiLevel=s.bidiLevel)}else if(c.extend){c.collapse(a.node,a.offset);try{c.extend(o.node,o.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([a,o]=[o,a]),f.setEnd(o.node,o.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}u&&this.view.root.activeElement==this.dom&&(this.dom.blur(),l&&l.focus())}),this.view.observer.setSelectionRange(a,o)),this.impreciseAnchor=a.precise?null:new Br(h.anchorNode,h.anchorOffset),this.impreciseHead=o.precise?null:new Br(h.focusNode,h.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:n}=this,e=n.state.selection.main,l=i2(n.root),{anchorNode:r,anchorOffset:u}=n.observer.selectionRange;if(!l||!e.empty||!e.assoc||!l.modify)return;let i=Ku.find(this,e.head);if(!i)return;let s=i.posAtStart;if(e.head==s||e.head==s+i.length)return;let a=this.coordsAt(e.head,-1),o=this.coordsAt(e.head,1);if(!a||!o||a.bottom>o.top)return;let h=this.domAtPos(e.head+e.assoc);l.collapse(h.node,h.offset),l.modify("move",e.assoc<0?"forward":"backward","lineboundary"),n.observer.readSelectionRange();let c=n.observer.selectionRange;n.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&l.collapse(r,u)}nearest(n){for(let e=n;e;){let l=ll.get(e);if(l&&l.rootView==this)return l;e=e.parentNode}return null}posFromDOM(n,e){let l=this.nearest(n);if(!l)throw new RangeError("Trying to find position for a DOM position outside of the document");return l.localPosFromDOM(n,e)+l.posAtStart}domAtPos(n){let{i:e,off:l}=this.childCursor().findPos(n,-1);for(;ei||n==i&&u.type!=El.WidgetBefore&&u.type!=El.WidgetAfter&&(!r||e==2||this.children[r-1].breakAfter||this.children[r-1].type==El.WidgetBefore&&e>-2))return u.coordsAt(n-i,e);l=i}}measureVisibleLineHeights(n){let e=[],{from:l,to:r}=n,u=this.view.contentDOM.clientWidth,i=u>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==Cl.LTR;for(let o=0,h=0;hr)break;if(o>=l){let d=c.dom.getBoundingClientRect();if(e.push(d.height),i){let C=c.dom.lastChild,I=C?I1(C):[];if(I.length){let T=I[I.length-1],$=a?T.right-d.left:d.right-T.left;$>s&&(s=$,this.minWidth=u,this.minWidthFrom=o,this.minWidthTo=f)}}}o=f+c.breakAfter}return e}textDirectionAt(n){let{i:e}=this.childPos(n,1);return getComputedStyle(this.children[e].dom).direction=="rtl"?Cl.RTL:Cl.LTR}measureTextSize(){for(let u of this.children)if(u instanceof Ku){let i=u.measureTextSize();if(i)return i}let n=document.createElement("div"),e,l,r;return n.className="cm-line",n.style.width="99999px",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(n);let u=I1(n.firstChild)[0];e=n.getBoundingClientRect().height,l=u?u.width/27:7,r=u?u.height:e,n.remove()}),{lineHeight:e,charWidth:l,textHeight:r}}childCursor(n=this.length){let e=this.children.length;return e&&(n-=this.children[--e].length),new fW(this.children,n,e)}computeBlockGapDeco(){let n=[],e=this.view.viewState;for(let l=0,r=0;;r++){let u=r==e.viewports.length?null:e.viewports[r],i=u?u.from-1:this.length;if(i>l){let s=e.lineBlockAt(i).bottom-e.lineBlockAt(l).top;n.push(Tt.replace({widget:new $D(s),block:!0,inclusive:!0,isBlockGap:!0}).range(l,i))}if(!u)break;l=u.to+1}return Tt.set(n)}updateDeco(){let n=this.view.state.facet(_1).map((e,l)=>(this.dynamicDecorationMap[l]=typeof e=="function")?e(this.view):e);for(let e=n.length;ee.anchor?-1:1),r;if(!l)return;!e.empty&&(r=this.coordsAt(e.anchor,e.anchor>e.head?-1:1))&&(l={left:Math.min(l.left,r.left),top:Math.min(l.top,r.top),right:Math.max(l.right,r.right),bottom:Math.max(l.bottom,r.bottom)});let u=$W(this.view),i={left:l.left-u.left,top:l.top-u.top,right:l.right+u.right,bottom:l.bottom+u.bottom};aK(this.view.scrollDOM,i,e.head-1)return Tt.none;if(a-s0)l=l.childNodes[r-1],r=Kh(l);else break}if(e>=0)for(let l=t,r=n;;){if(l.nodeType==3)return l;if(l.nodeType==1&&r=0)l=l.childNodes[r],r=0;else break}return null}function RK(t,n){return t.nodeType!=1?0:(n&&t.childNodes[n-1].contentEditable=="false"?1:0)|(n0;){let o=Ou(r.text,i,!1);if(l(r.text.slice(o,i))!=a)break;i=o}for(;st?n.left-t:Math.max(0,t-n.right)}function MK(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function mj(t,n){return t.topn.top+1}function ND(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function Xx(t,n,e){let l,r,u,i,s=!1,a,o,h,c;for(let C=t.firstChild;C;C=C.nextSibling){let I=I1(C);for(let T=0;Tb||i==b&&u>G){l=C,r=$,u=G,i=b;let en=b?e<$.top?-1:1:G?n<$.left?-1:1:0;s=!en||(en>0?T0)}G==0?e>$.bottom&&(!h||h.bottom<$.bottom)?(a=C,h=$):e<$.top&&(!c||c.top>$.top)&&(o=C,c=$):h&&mj(h,$)?h=qD(h,$.bottom):c&&mj(c,$)&&(c=ND(c,$.top))}}if(h&&h.bottom>=e?(l=a,r=h):c&&c.top<=e&&(l=o,r=c),!l)return{node:t,offset:0};let f=Math.max(r.left,Math.min(r.right,n));if(l.nodeType==3)return LD(l,f,e);if(s&&l.contentEditable!="false")return Xx(l,f,e);let d=Array.prototype.indexOf.call(t.childNodes,l)+(n>=(r.left+r.right)/2?1:0);return{node:t,offset:d}}function LD(t,n,e){let l=t.nodeValue.length,r=-1,u=1e9,i=0;for(let s=0;se?h.top-e:e-h.bottom)-1;if(h.left-1<=n&&h.right+1>=n&&c=(h.left+h.right)/2,d=f;if((gt.chrome||gt.gecko)&&nw(t,s).getBoundingClientRect().left==h.right&&(d=!f),c<=0)return{node:t,offset:s+(d?1:0)};r=s+(d?1:0),u=c}}}return{node:t,offset:r>-1?r:i>0?t.nodeValue.length:0}}function UW(t,n,e,l=-1){var r,u;let i=t.contentDOM.getBoundingClientRect(),s=i.top+t.viewState.paddingTop,a,{docHeight:o}=t.viewState,{x:h,y:c}=n,f=c-s;if(f<0)return 0;if(f>o)return t.state.doc.length;for(let en=t.defaultLineHeight/2,ln=!1;a=t.elementAtHeight(f),a.type!=El.Text;)for(;f=l>0?a.bottom+en:a.top-en,!(f>=0&&f<=o);){if(ln)return e?null:0;ln=!0,l=-l}c=s+f;let d=a.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:WD(t,i,a,h,c);let C=t.dom.ownerDocument,I=t.root.elementFromPoint?t.root:C,T=I.elementFromPoint(h,c);T&&!t.contentDOM.contains(T)&&(T=null),T||(h=Math.max(i.left+1,Math.min(i.right-1,h)),T=I.elementFromPoint(h,c),T&&!t.contentDOM.contains(T)&&(T=null));let $,G=-1;if(T&&((r=t.docView.nearest(T))===null||r===void 0?void 0:r.isEditable)!=!1){if(C.caretPositionFromPoint){let en=C.caretPositionFromPoint(h,c);en&&({offsetNode:$,offset:G}=en)}else if(C.caretRangeFromPoint){let en=C.caretRangeFromPoint(h,c);en&&({startContainer:$,startOffset:G}=en,(!t.contentDOM.contains($)||gt.safari&&$K($,G,h)||gt.chrome&&NK($,G,h))&&($=void 0))}}if(!$||!t.docView.dom.contains($)){let en=Ku.find(t.docView,d);if(!en)return f>a.top+a.height/2?a.to:a.from;({node:$,offset:G}=Xx(en.dom,h,c))}let b=t.docView.nearest($);if(!b)return null;if(b.isWidget&&((u=b.dom)===null||u===void 0?void 0:u.nodeType)==1){let en=b.dom.getBoundingClientRect();return n.yt.defaultLineHeight*1.5){let s=Math.floor((r-e.top)/t.defaultLineHeight);u+=s*t.viewState.heightOracle.lineLength}let i=t.state.sliceDoc(e.from,e.to);return e.from+$x(i,u,t.state.tabSize)}function $K(t,n,e){let l;if(t.nodeType!=3||n!=(l=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return nw(t,l-1,l).getBoundingClientRect().left>e}function NK(t,n,e){if(n!=0)return!1;for(let r=t;;){let u=r.parentNode;if(!u||u.nodeType!=1||u.firstChild!=r)return!1;if(u.classList.contains("cm-line"))break;r=u}let l=t.nodeType==1?t.getBoundingClientRect():nw(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return e-l.left>5}function Fx(t,n){let e=t.lineBlockAt(n);if(Array.isArray(e.type)){for(let l of e.type)if(l.to>n||l.to==n&&(l.to==e.to||l.type==El.Text))return l}return e}function qK(t,n,e,l){let r=Fx(t,n.head),u=!l||r.type!=El.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(n.assoc<0&&n.head>r.from?n.head-1:n.head);if(u){let i=t.dom.getBoundingClientRect(),s=t.textDirectionAt(r.from),a=t.posAtCoords({x:e==(s==Cl.LTR)?i.right-1:i.left+1,y:(u.top+u.bottom)/2});if(a!=null)return Tn.cursor(a,e?-1:1)}return Tn.cursor(e?r.to:r.from,e?-1:1)}function VD(t,n,e,l){let r=t.state.doc.lineAt(n.head),u=t.bidiSpans(r),i=t.textDirectionAt(r.from);for(let s=n,a=null;;){let o=OK(r,u,i,s,e),h=LW;if(!o){if(r.number==(e?t.state.doc.lines:1))return s;h=` +`,r=t.state.doc.line(r.number+(e?1:-1)),u=t.bidiSpans(r),o=Tn.cursor(e?r.from:r.to)}if(a){if(!a(h))return s}else{if(!l)return o;a=l(h)}s=o}}function LK(t,n,e){let l=t.state.charCategorizer(n),r=l(e);return u=>{let i=l(u);return r==dl.Space&&(r=i),r==i}}function WK(t,n,e,l){let r=n.head,u=e?1:-1;if(r==(e?t.state.doc.length:0))return Tn.cursor(r,n.assoc);let i=n.goalColumn,s,a=t.contentDOM.getBoundingClientRect(),o=t.coordsAtPos(r),h=t.documentTop;if(o)i==null&&(i=o.left-a.left),s=u<0?o.top:o.bottom;else{let d=t.viewState.lineBlockAt(r);i==null&&(i=Math.min(a.right-a.left,t.defaultCharacterWidth*(r-d.from))),s=(u<0?d.top:d.bottom)+h}let c=a.left+i,f=l??t.defaultLineHeight>>1;for(let d=0;;d+=10){let C=s+(f+d)*u,I=UW(t,{x:c,y:C},!1,u);if(Ca.bottom||(u<0?Ir))return Tn.cursor(I,n.assoc,void 0,i)}}function Rv(t,n,e){for(;;){let l=0;for(let r of t)r.between(n-1,n+1,(u,i,s)=>{if(n>u&&nr(t)),e.from,n.head>e.from?-1:1);return l==e.from?e:Tn.cursor(l,l{this.ignoreDuringComposition(r)||r.type=="keydown"&&this.keydown(n,r)||(this.mustFlushObserver(r)&&n.observer.forceFlush(),this.runCustomHandlers(r.type,n,r)?r.preventDefault():l(n,r))};for(let l in er){let r=er[l];n.contentDOM.addEventListener(l,u=>{zD(n,u)&&e(r,u)},Hx[l]),this.registeredEvents.push(l)}n.scrollDOM.addEventListener("mousedown",l=>{if(l.target==n.scrollDOM&&l.clientY>n.contentDOM.getBoundingClientRect().bottom&&(e(er.mousedown,l),!l.defaultPrevented&&l.button==2)){let r=n.contentDOM.style.minHeight;n.contentDOM.style.minHeight="100%",setTimeout(()=>n.contentDOM.style.minHeight=r,200)}}),n.scrollDOM.addEventListener("drop",l=>{l.target==n.scrollDOM&&l.clientY>n.contentDOM.getBoundingClientRect().bottom&&e(er.drop,l)}),gt.chrome&>.chrome_version==102&&n.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,gt.safari&&n.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}ensureHandlers(n,e){var l;let r;this.customHandlers=[];for(let u of e)if(r=(l=u.update(n).spec)===null||l===void 0?void 0:l.domEventHandlers){this.customHandlers.push({plugin:u.value,handlers:r});for(let i in r)this.registeredEvents.indexOf(i)<0&&i!="scroll"&&(this.registeredEvents.push(i),n.contentDOM.addEventListener(i,s=>{zD(n,s)&&this.runCustomHandlers(i,n,s)&&s.preventDefault()}))}}runCustomHandlers(n,e,l){for(let r of this.customHandlers){let u=r.handlers[n];if(u)try{if(u.call(r.plugin,l,e)||l.defaultPrevented)return!0}catch(i){bi(e.state,i)}}return!1}runScrollHandlers(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;for(let l of this.customHandlers){let r=l.handlers.scroll;if(r)try{r.call(l.plugin,e,n)}catch(u){bi(n.state,u)}}}keydown(n,e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()r.keyCode==e.keyCode))&&!e.ctrlKey||zK.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=l||e,setTimeout(()=>this.flushIOSKey(n),250),!0):!1}flushIOSKey(n){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,Sm(n.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(n){return/^key/.test(n.type)?this.composing>0?!0:gt.safari&&!gt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}mustFlushObserver(n){return n.type=="keydown"&&n.keyCode!=229}startMouseSelection(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}update(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const YW=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],zK="dthko",QW=[16,17,18,20,91,92,224,225],L0=6;function W0(t){return Math.max(0,t)*.7+8}class UK{constructor(n,e,l,r){this.view=n,this.style=l,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=hK(n.contentDOM),this.atoms=n.state.facet(nP).map(i=>i(n));let u=n.contentDOM.ownerDocument;u.addEventListener("mousemove",this.move=this.move.bind(this)),u.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(Oe.allowMultipleSelections)&&YK(n,e),this.dragMove=QK(n,e),this.dragging=GK(n,e)&&BW(e)==1?null:!1}start(n){this.dragging===!1&&(n.preventDefault(),this.select(n))}move(n){var e;if(n.buttons==0)return this.destroy();if(this.dragging!==!1)return;this.select(this.lastEvent=n);let l=0,r=0,u=((e=this.scrollParent)===null||e===void 0?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},i=$W(this.view);n.clientX-i.left<=u.left+L0?l=-W0(u.left-n.clientX):n.clientX+i.right>=u.right-L0&&(l=W0(n.clientX-u.right)),n.clientY-i.top<=u.top+L0?r=-W0(u.top-n.clientY):n.clientY+i.bottom>=u.bottom-L0&&(r=W0(n.clientY-u.bottom)),this.setScrollSpeed(l,r)}up(n){this.dragging==null&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(n,e){this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(n){let e=null;for(let l=0;lthis.select(this.lastEvent),20)}}function YK(t,n){let e=t.state.facet(CW);return e.length?e[0](n):gt.mac?n.metaKey:n.ctrlKey}function QK(t,n){let e=t.state.facet(AW);return e.length?e[0](n):gt.mac?!n.altKey:!n.ctrlKey}function GK(t,n){let{main:e}=t.state.selection;if(e.empty)return!1;let l=i2(t.root);if(!l||l.rangeCount==0)return!0;let r=l.getRangeAt(0).getClientRects();for(let u=0;u=n.clientX&&i.top<=n.clientY&&i.bottom>=n.clientY)return!0}return!1}function zD(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(let e=n.target,l;e!=t.contentDOM;e=e.parentNode)if(!e||e.nodeType==11||(l=ll.get(e))&&l.ignoreEvent(n))return!1;return!0}const er=Object.create(null),Hx=Object.create(null),GW=gt.ie&>.ie_version<15||gt.ios&>.webkit_version<604;function JK(t){let n=t.dom.parentNode;if(!n)return;let e=n.appendChild(document.createElement("textarea"));e.style.cssText="position: fixed; left: -10000px; top: 10px",e.focus(),setTimeout(()=>{t.focus(),e.remove(),JW(t,e.value)},50)}function JW(t,n){let{state:e}=t,l,r=1,u=e.toText(n),i=u.lines==e.selection.ranges.length;if(Zx!=null&&e.selection.ranges.every(a=>a.empty)&&Zx==u.toString()){let a=-1;l=e.changeByRange(o=>{let h=e.doc.lineAt(o.from);if(h.from==a)return{range:o};a=h.from;let c=e.toText((i?u.line(r++).text:n)+e.lineBreak);return{changes:{from:h.from,insert:c},range:Tn.cursor(o.from+c.length)}})}else i?l=e.changeByRange(a=>{let o=u.line(r++);return{changes:{from:a.from,to:a.to,insert:o.text},range:Tn.cursor(a.from+o.length)}}):l=e.replaceSelection(u);t.dispatch(l,{userEvent:"input.paste",scrollIntoView:!0})}er.keydown=(t,n)=>{t.inputState.setSelectionOrigin("select"),n.keyCode==27&&(t.inputState.lastEscPress=Date.now())};er.touchstart=(t,n)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};er.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Hx.touchstart=Hx.touchmove={passive:!0};er.mousedown=(t,n)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return;let e=null;for(let l of t.state.facet(EW))if(e=l(t,n),e)break;if(!e&&n.button==0&&(e=XK(t,n)),e){let l=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new UK(t,n,e,l)),l&&t.observer.ignore(()=>hW(t.contentDOM)),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}};function UD(t,n,e,l){if(l==1)return Tn.cursor(n,e);if(l==2)return TK(t.state,n,e);{let r=Ku.find(t.docView,n),u=t.state.doc.lineAt(r?r.posAtEnd:n),i=r?r.posAtStart:u.from,s=r?r.posAtEnd:u.to;return st>=n.top&&t<=n.bottom,YD=(t,n,e)=>KW(n,e)&&t>=e.left&&t<=e.right;function KK(t,n,e,l){let r=Ku.find(t.docView,n);if(!r)return 1;let u=n-r.posAtStart;if(u==0)return 1;if(u==r.length)return-1;let i=r.coordsAt(u,-1);if(i&&YD(e,l,i))return-1;let s=r.coordsAt(u,1);return s&&YD(e,l,s)?1:i&&KW(l,i)?-1:1}function QD(t,n){let e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:KK(t,e,n.clientX,n.clientY)}}const BK=gt.ie&>.ie_version<=11;let GD=null,JD=0,KD=0;function BW(t){if(!BK)return t.detail;let n=GD,e=KD;return GD=t,KD=Date.now(),JD=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(JD+1)%3:1}function XK(t,n){let e=QD(t,n),l=BW(n),r=t.state.selection;return{update(u){u.docChanged&&(e.pos=u.changes.mapPos(e.pos),r=r.map(u.changes))},get(u,i,s){let a=QD(t,u),o,h=UD(t,a.pos,a.bias,l);if(e.pos!=a.pos&&!i){let c=UD(t,e.pos,e.bias,l),f=Math.min(c.from,h.from),d=Math.max(c.to,h.to);h=f1&&(o=FK(r,a.pos))?o:s?r.addRange(h):Tn.create([h])}}}function FK(t,n){for(let e=0;e=n)return Tn.create(t.ranges.slice(0,e).concat(t.ranges.slice(e+1)),t.mainIndex==e?0:t.mainIndex-(t.mainIndex>e?1:0))}return null}er.dragstart=(t,n)=>{let{selection:{main:e}}=t.state,{mouseSelection:l}=t.inputState;l&&(l.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")};function BD(t,n,e,l){if(!e)return;let r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();let{mouseSelection:u}=t.inputState,i=l&&u&&u.dragging&&u.dragMove?{from:u.dragging.from,to:u.dragging.to}:null,s={from:r,insert:e},a=t.state.changes(i?[i,s]:s);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(r,-1),head:a.mapPos(r,1)},userEvent:i?"move.drop":"input.drop"})}er.drop=(t,n)=>{if(!n.dataTransfer)return;if(t.state.readOnly)return n.preventDefault();let e=n.dataTransfer.files;if(e&&e.length){n.preventDefault();let l=Array(e.length),r=0,u=()=>{++r==e.length&&BD(t,n,l.filter(i=>i!=null).join(t.state.lineBreak),!1)};for(let i=0;i{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(l[i]=s.result),u()},s.readAsText(e[i])}}else BD(t,n,n.dataTransfer.getData("Text"),!0)};er.paste=(t,n)=>{if(t.state.readOnly)return n.preventDefault();t.observer.flush();let e=GW?null:n.clipboardData;e?(JW(t,e.getData("text/plain")||e.getData("text/uri-text")),n.preventDefault()):JK(t)};function HK(t,n){let e=t.dom.parentNode;if(!e)return;let l=e.appendChild(document.createElement("textarea"));l.style.cssText="position: fixed; left: -10000px; top: 10px",l.value=n,l.focus(),l.selectionEnd=n.length,l.selectionStart=0,setTimeout(()=>{l.remove(),t.focus()},50)}function ZK(t){let n=[],e=[],l=!1;for(let r of t.selection.ranges)r.empty||(n.push(t.sliceDoc(r.from,r.to)),e.push(r));if(!n.length){let r=-1;for(let{from:u}of t.selection.ranges){let i=t.doc.lineAt(u);i.number>r&&(n.push(i.text),e.push({from:i.from,to:Math.min(t.doc.length,i.to+1)})),r=i.number}l=!0}return{text:n.join(t.lineBreak),ranges:e,linewise:l}}let Zx=null;er.copy=er.cut=(t,n)=>{let{text:e,ranges:l,linewise:r}=ZK(t.state);if(!e&&!r)return;Zx=r?e:null;let u=GW?null:n.clipboardData;u?(n.preventDefault(),u.clearData(),u.setData("text/plain",e)):HK(t,e),n.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:l,scrollIntoView:!0,userEvent:"delete.cut"})};const XW=eh.define();function FW(t,n){let e=[];for(let l of t.facet(IW)){let r=l(t,n);r&&e.push(r)}return e?t.update({effects:e,annotations:XW.of(!0)}):null}function HW(t){setTimeout(()=>{let n=t.hasFocus;if(n!=t.inputState.notifiedFocused){let e=FW(t.state,n);e?t.dispatch(e):t.update([])}},10)}er.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),HW(t)};er.blur=t=>{t.observer.clearSelectionRange(),HW(t)};er.compositionstart=er.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};er.compositionend=t=>{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,gt.chrome&>.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)};er.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};er.beforeinput=(t,n)=>{var e;let l;if(gt.chrome&>.android&&(l=YW.find(r=>r.inputType==n.inputType))&&(t.observer.delayAndroidKey(l.key,l.keyCode),l.key=="Backspace"||l.key=="Delete")){let r=((e=window.visualViewport)===null||e===void 0?void 0:e.height)||0;setTimeout(()=>{var u;(((u=window.visualViewport)===null||u===void 0?void 0:u.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};const XD=["pre-wrap","normal","pre-line","break-spaces"];class bK{constructor(n){this.lineWrapping=n,this.doc=Ie.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(n,e){let l=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(l+=Math.max(0,Math.ceil((e-n-l*this.lineLength*.5)/this.lineLength))),this.lineHeight*l}heightForLine(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(n){return this.doc=n,this}mustRefreshForWrapping(n){return XD.indexOf(n)>-1!=this.lineWrapping}mustRefreshForHeights(n){let e=!1;for(let l=0;l-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=l,this.textHeight=r,this.lineLength=u,a){this.heightSamples={};for(let o=0;o0}set outdated(n){this.flags=(n?2:0)|this.flags&-3}setHeight(n,e){this.height!=e&&(Math.abs(this.height-e)>Pv&&(n.heightChanged=!0),this.height=e)}replace(n,e,l){return Au.of(l)}decomposeLeft(n,e){e.push(this)}decomposeRight(n,e){e.push(this)}applyChanges(n,e,l,r){let u=this,i=l.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:o,fromB:h,toB:c}=r[s],f=u.lineAt(a,sl.ByPosNoHeight,l.setDoc(e),0,0),d=f.to>=o?f:u.lineAt(o,sl.ByPosNoHeight,l,0,0);for(c+=d.to-o,o=d.to;s>0&&f.from<=r[s-1].toA;)a=r[s-1].fromA,h=r[s-1].fromB,s--,au*2){let s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),l+=1+s.break,r-=s.size}else if(u>r*2){let s=n[l];s.break?n.splice(l,1,s.left,null,s.right):n.splice(l,1,s.left,s.right),l+=2+s.break,u-=s.size}else break;else if(r=u&&i(this.blockAt(0,l,r,u))}updateHeight(n,e=0,l=!1,r){return r&&r.from<=e&&r.more&&this.setHeight(n,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class mi extends ZW{constructor(n,e){super(n,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(n,e,l,r){return new lo(r,this.length,l,this.height,this.breaks)}replace(n,e,l){let r=l[0];return l.length==1&&(r instanceof mi||r instanceof Yr&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Yr?r=new mi(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Au.of(l)}updateHeight(n,e=0,l=!1,r){return r&&r.from<=e&&r.more?this.setHeight(n,r.heights[r.index++]):(l||this.outdated)&&this.setHeight(n,Math.max(this.widgetHeight,n.heightForLine(this.length-this.collapsed))+this.breaks*n.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Yr extends Au{constructor(n){super(n,0)}heightMetrics(n,e){let l=n.doc.lineAt(e).number,r=n.doc.lineAt(e+this.length).number,u=r-l+1,i,s=0;if(n.lineWrapping){let a=Math.min(this.height,n.lineHeight*u);i=a/u,this.length>u+1&&(s=(this.height-a)/(this.length-u-1))}else i=this.height/u;return{firstLine:l,lastLine:r,perLine:i,perChar:s}}blockAt(n,e,l,r){let{firstLine:u,lastLine:i,perLine:s,perChar:a}=this.heightMetrics(e,r);if(e.lineWrapping){let o=r+Math.round(Math.max(0,Math.min(1,(n-l)/this.height))*this.length),h=e.doc.lineAt(o),c=s+h.length*a,f=Math.max(l,n-c/2);return new lo(h.from,h.length,f,c,0)}else{let o=Math.max(0,Math.min(i-u,Math.floor((n-l)/s))),{from:h,length:c}=e.doc.line(u+o);return new lo(h,c,l+s*o,s,0)}}lineAt(n,e,l,r,u){if(e==sl.ByHeight)return this.blockAt(n,l,r,u);if(e==sl.ByPosNoHeight){let{from:d,to:C}=l.doc.lineAt(n);return new lo(d,C-d,0,0,0)}let{firstLine:i,perLine:s,perChar:a}=this.heightMetrics(l,u),o=l.doc.lineAt(n),h=s+o.length*a,c=o.number-i,f=r+s*c+a*(o.from-u-c);return new lo(o.from,o.length,Math.max(r,Math.min(f,r+this.height-h)),h,0)}forEachLine(n,e,l,r,u,i){n=Math.max(n,u),e=Math.min(e,u+this.length);let{firstLine:s,perLine:a,perChar:o}=this.heightMetrics(l,u);for(let h=n,c=r;h<=e;){let f=l.doc.lineAt(h);if(h==n){let C=f.number-s;c+=a*C+o*(n-u-C)}let d=a+o*f.length;i(new lo(f.from,f.length,c,d,0)),c+=d,h=f.to+1}}replace(n,e,l){let r=this.length-e;if(r>0){let u=l[l.length-1];u instanceof Yr?l[l.length-1]=new Yr(u.length+r):l.push(null,new Yr(r-1))}if(n>0){let u=l[0];u instanceof Yr?l[0]=new Yr(n+u.length):l.unshift(new Yr(n-1),null)}return Au.of(l)}decomposeLeft(n,e){e.push(new Yr(n-1),null)}decomposeRight(n,e){e.push(null,new Yr(this.length-n-1))}updateHeight(n,e=0,l=!1,r){let u=e+this.length;if(r&&r.from<=e+this.length&&r.more){let i=[],s=Math.max(e,r.from),a=-1;for(r.from>e&&i.push(new Yr(r.from-e-1).updateHeight(n,e));s<=u&&r.more;){let h=n.doc.lineAt(s).length;i.length&&i.push(null);let c=r.heights[r.index++];a==-1?a=c:Math.abs(c-a)>=Pv&&(a=-2);let f=new mi(h,c);f.outdated=!1,i.push(f),s+=h+1}s<=u&&i.push(null,new Yr(u-s).updateHeight(n,s));let o=Au.of(i);return(a<0||Math.abs(o.height-this.height)>=Pv||Math.abs(a-this.heightMetrics(n,e).perLine)>=Pv)&&(n.heightChanged=!0),o}else(l||this.outdated)&&(this.setHeight(n,n.heightForGap(e,e+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class tB extends Au{constructor(n,e,l){super(n.length+e+l.length,n.height+l.height,e|(n.outdated||l.outdated?2:0)),this.left=n,this.right=l,this.size=n.size+l.size}get break(){return this.flags&1}blockAt(n,e,l,r){let u=l+this.left.height;return ns))return o;let h=e==sl.ByPosNoHeight?sl.ByPosNoHeight:sl.ByPos;return a?o.join(this.right.lineAt(s,h,l,i,s)):this.left.lineAt(s,h,l,r,u).join(o)}forEachLine(n,e,l,r,u,i){let s=r+this.left.height,a=u+this.left.length+this.break;if(this.break)n=a&&this.right.forEachLine(n,e,l,s,a,i);else{let o=this.lineAt(a,sl.ByPos,l,r,u);n=n&&o.from<=e&&i(o),e>o.to&&this.right.forEachLine(o.to+1,e,l,s,a,i)}}replace(n,e,l){let r=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(n-r,e-r,l));let u=[];n>0&&this.decomposeLeft(n,u);let i=u.length;for(let s of l)u.push(s);if(n>0&&FD(u,i-1),e=l&&e.push(null)),n>l&&this.right.decomposeLeft(n-l,e)}decomposeRight(n,e){let l=this.left.length,r=l+this.break;if(n>=r)return this.right.decomposeRight(n-r,e);n2*e.size||e.size>2*n.size?Au.of(this.break?[n,null,e]:[n,e]):(this.left=n,this.right=e,this.height=n.height+e.height,this.outdated=n.outdated||e.outdated,this.size=n.size+e.size,this.length=n.length+this.break+e.length,this)}updateHeight(n,e=0,l=!1,r){let{left:u,right:i}=this,s=e+u.length+this.break,a=null;return r&&r.from<=e+u.length&&r.more?a=u=u.updateHeight(n,e,l,r):u.updateHeight(n,e,l),r&&r.from<=s+i.length&&r.more?a=i=i.updateHeight(n,s,l,r):i.updateHeight(n,s,l),a?this.balanced(u,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function FD(t,n){let e,l;t[n]==null&&(e=t[n-1])instanceof Yr&&(l=t[n+1])instanceof Yr&&t.splice(n-1,3,new Yr(e.length+1+l.length))}const eB=5;class tP{constructor(n,e){this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(n,e){if(this.lineStart>-1){let l=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof mi?r.length+=l-this.pos:(l>this.pos||!this.isCovered)&&this.nodes.push(new mi(l-this.pos,-1)),this.writtenTo=l,e>l&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(n,e,l){if(n=eB)&&this.addLineDeco(r,u,i)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:n,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=n,this.lineEnd=e,this.writtenTon&&this.nodes.push(new mi(this.pos-n,-1)),this.writtenTo=this.pos}blankContent(n,e){let l=new Yr(e-n);return this.oracle.doc.lineAt(n).to==e&&(l.flags|=4),l}ensureLine(){this.enterLine();let n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof mi)return n;let e=new mi(0,-1);return this.nodes.push(e),e}addBlock(n){var e;this.enterLine();let l=(e=n.deco)===null||e===void 0?void 0:e.type;l==El.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,l!=El.WidgetBefore&&(this.covering=n)}addLineDeco(n,e,l){let r=this.ensureLine();r.length+=l,r.collapsed+=l,r.widgetHeight=Math.max(r.widgetHeight,n),r.breaks+=e,this.writtenTo=this.pos=this.pos+l}finish(n){let e=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(e instanceof mi)&&!this.isCovered?this.nodes.push(new mi(0,-1)):(this.writtenToh.clientHeight||h.scrollWidth>h.clientWidth)&&c.overflow!="visible"){let f=h.getBoundingClientRect();u=Math.max(u,f.left),i=Math.min(i,f.right),s=Math.max(s,f.top),a=o==t.parentNode?f.bottom:Math.min(a,f.bottom)}o=c.position=="absolute"||c.position=="fixed"?h.offsetParent:h.parentNode}else if(o.nodeType==11)o=o.host;else break;return{left:u-e.left,right:Math.max(u,i)-e.left,top:s-(e.top+n),bottom:Math.max(s,a)-(e.top+n)}}function iB(t,n){let e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}class dj{constructor(n,e,l){this.from=n,this.to=e,this.size=l}static same(n,e){if(n.length!=e.length)return!1;for(let l=0;ltypeof l!="function"&&l.class=="cm-lineWrapping");this.heightOracle=new bK(e),this.stateDeco=n.facet(_1).filter(l=>typeof l!="function"),this.heightMap=Au.empty().applyChanges(this.stateDeco,Ie.empty,this.heightOracle.setDoc(n.doc),[new go(0,0,0,n.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Tt.set(this.lineGaps.map(l=>l.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let n=[this.viewport],{main:e}=this.state.selection;for(let l=0;l<=1;l++){let r=l?e.head:e.anchor;if(!n.some(({from:u,to:i})=>r>=u&&r<=i)){let{from:u,to:i}=this.lineBlockAt(r);n.push(new V0(u,i))}}this.viewports=n.sort((l,r)=>l.from-r.from),this.scaler=this.heightMap.height<=7e6?ZD:new hB(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,n=>{this.viewportLines.push(this.scaler.scale==1?n:Zd(n,this.scaler))})}update(n,e=null){this.state=n.state;let l=this.stateDeco;this.stateDeco=this.state.facet(_1).filter(h=>typeof h!="function");let r=n.changedRanges,u=go.extendWithRanges(r,lB(l,this.stateDeco,n?n.changes:pr.empty(this.state.doc.length))),i=this.heightMap.height,s=this.scrolledToBottom?null:this.lineBlockAtHeight(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),u),this.heightMap.height!=i&&(n.flags|=2),s?(this.scrollAnchorPos=n.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=u.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let o=!n.changes.empty||n.flags&2||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),o&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(TW)&&(this.mustEnforceCursorAssoc=!0)}measure(n){let e=n.contentDOM,l=window.getComputedStyle(e),r=this.heightOracle,u=l.whiteSpace;this.defaultTextDirection=l.direction=="rtl"?Cl.RTL:Cl.LTR;let i=this.heightOracle.mustRefreshForWrapping(u),s=e.getBoundingClientRect(),a=i||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let o=0,h=0,c=parseInt(l.paddingTop)||0,f=parseInt(l.paddingBottom)||0;(this.paddingTop!=c||this.paddingBottom!=f)&&(this.paddingTop=c,this.paddingBottom=f,o|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=n.scrollDOM.clientWidth,o|=8),this.scrollTop!=n.scrollDOM.scrollTop&&(this.scrollAnchorHeight=-1,this.scrollTop=n.scrollDOM.scrollTop),this.scrolledToBottom=this.scrollTop>n.scrollDOM.scrollHeight-n.scrollDOM.clientHeight-4;let d=(this.printing?iB:uB)(e,this.paddingTop),C=d.top-this.pixelViewport.top,I=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let T=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(T!=this.inView&&(this.inView=T,T&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let $=s.width;if((this.contentDOMWidth!=$||this.editorHeight!=n.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=n.scrollDOM.clientHeight,o|=8),a){let b=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(b)&&(i=!0),i||r.lineWrapping&&Math.abs($-this.contentDOMWidth)>r.charWidth){let{lineHeight:en,charWidth:ln,textHeight:B}=n.docView.measureTextSize();i=en>0&&r.refresh(u,en,ln,B,$/ln,b),i&&(n.docView.minWidth=0,o|=8)}C>0&&I>0?h=Math.max(C,I):C<0&&I<0&&(h=Math.min(C,I)),r.heightChanged=!1;for(let en of this.viewports){let ln=en.from==this.viewport.from?b:n.docView.measureVisibleLineHeights(en);this.heightMap=(i?Au.empty().applyChanges(this.stateDeco,Ie.empty,this.heightOracle,[new go(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,i,new nB(en.from,ln))}r.heightChanged&&(o|=2)}let G=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return G&&(this.viewport=this.getViewport(h,this.scrollTarget)),this.updateForViewport(),(o&2||G)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,n)),o|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.docView.enforceCursorAssoc()),o}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(n,e){let l=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,u=this.heightOracle,{visibleTop:i,visibleBottom:s}=this,a=new V0(r.lineAt(i-l*1e3,sl.ByHeight,u,0,0).from,r.lineAt(s+(1-l)*1e3,sl.ByHeight,u,0,0).to);if(e){let{head:o}=e.range;if(oa.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),c=r.lineAt(o,sl.ByPos,u,0,0),f;e.y=="center"?f=(c.top+c.bottom)/2-h/2:e.y=="start"||e.y=="nearest"&&o=s+Math.max(10,Math.min(l,250)))&&r>i-2*1e3&&u>1,i=r<<1;if(this.defaultTextDirection!=Cl.LTR&&!l)return[];let s=[],a=(o,h,c,f)=>{if(h-oo&&TT.from>=c.from&&T.to<=c.to&&Math.abs(T.from-o)T.from<$&&T.to>$));if(!I){if(hT.from<=h&&T.to>=h)){let T=e.moveToLineBoundary(Tn.cursor(h),!1,!0).head;T>o&&(h=T)}I=new dj(o,h,this.gapSize(c,o,h,f))}s.push(I)};for(let o of this.viewportLines){if(o.lengtho.from&&a(o.from,f,o,h),de.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let e=[];We.spans(n,this.viewport.from,this.viewport.to,{span(r,u){e.push({from:r,to:u})},point(){}},20);let l=e.length!=this.visibleRanges.length||this.visibleRanges.some((r,u)=>r.from!=e[u].from||r.to!=e[u].to);return this.visibleRanges=e,l?4:0}lineBlockAt(n){return n>=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(e=>e.from<=n&&e.to>=n)||Zd(this.heightMap.lineAt(n,sl.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(n){return Zd(this.heightMap.lineAt(this.scaler.fromDOM(n),sl.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(n){return Zd(this.heightMap.blockAt(this.scaler.fromDOM(n),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 V0{constructor(n,e){this.from=n,this.to=e}}function oB(t,n,e){let l=[],r=t,u=0;return We.spans(e,t,n,{span(){},point(i,s){i>r&&(l.push({from:r,to:i}),u+=i-r),r=s}},20),r=1)return n[n.length-1].to;let l=Math.floor(t*e);for(let r=0;;r++){let{from:u,to:i}=n[r],s=i-u;if(l<=s)return u+l;l-=s}}function U0(t,n){let e=0;for(let{from:l,to:r}of t.ranges){if(n<=r){e+=n-l;break}e+=r-l}return e/t.total}function aB(t,n){for(let e of t)if(n(e))return e}const ZD={toDOM(t){return t},fromDOM(t){return t},scale:1};class hB{constructor(n,e,l){let r=0,u=0,i=0;this.viewports=l.map(({from:s,to:a})=>{let o=e.lineAt(s,sl.ByPos,n,0,0).top,h=e.lineAt(a,sl.ByPos,n,0,0).bottom;return r+=h-o,{from:s,to:a,top:o,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);for(let s of this.viewports)s.domTop=i+(s.top-u)*this.scale,i=s.domBottom=s.domTop+(s.bottom-s.top),u=s.bottom}toDOM(n){for(let e=0,l=0,r=0;;e++){let u=eZd(r,n)):t._content)}const Y0=dt.define({combine:t=>t.join(" ")}),bx=dt.define({combine:t=>t.indexOf(!0)>-1}),nk=Gh.newName(),bW=Gh.newName(),nV=Gh.newName(),tV={"&light":"."+bW,"&dark":"."+nV};function tk(t,n,e){return new Gh(n,{finish(l){return/&/.test(l)?l.replace(/&\w*/,r=>{if(r=="&")return t;if(!e||!e[r])throw new RangeError(`Unsupported selector: ${r}`);return e[r]}):t+" "+l}})}const cB=tk("."+nk,{"&":{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},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",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:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&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",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&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},"&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-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"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,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"}},tV);class fB{constructor(n,e,l,r){this.typeOver=r,this.bounds=null,this.text="";let{impreciseHead:u,impreciseAnchor:i}=n.docView;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,l,0))){let s=u||i?[]:mB(n),a=new WW(s,n.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=wB(s,this.bounds.from)}else{let s=n.observer.selectionRange,a=u&&u.node==s.focusNode&&u.offset==s.focusOffset||!bm(n.contentDOM,s.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(s.focusNode,s.focusOffset),o=i&&i.node==s.anchorNode&&i.offset==s.anchorOffset||!bm(n.contentDOM,s.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(s.anchorNode,s.anchorOffset);this.newSel=Tn.single(o,a)}}}function eV(t,n){let e,{newSel:l}=n,r=t.state.selection.main,u=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(n.bounds){let{from:i,to:s}=n.bounds,a=r.from,o=null;(u===8||gt.android&&n.text.length=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(gt.mac||gt.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(l&&e.insert.length==2&&(l=Tn.single(l.main.anchor-1,l.main.head-1)),e={from:r.from,to:r.to,insert:Ie.of([" "])}):gt.chrome&&e&&e.from==e.to&&e.from==r.head&&e.insert.toString()==` + `&&t.lineWrapping&&(l&&(l=Tn.single(l.main.anchor-1,l.main.head-1)),e={from:r.from,to:r.to,insert:Ie.of([" "])}),e){let i=t.state;if(gt.ios&&t.inputState.flushIOSKey(t)||gt.android&&(e.from==r.from&&e.to==r.to&&e.insert.length==1&&e.insert.lines==2&&Sm(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||u==8&&e.insert.lengthh(t,e.from,e.to,s)))return!0;t.inputState.composing>=0&&t.inputState.composing++;let a;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!l||l.main.empty&&l.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let h=r.frome.to?i.sliceDoc(e.to,r.to):"";a=i.replaceSelection(t.state.toText(h+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let h=i.changes(e),c=l&&l.main.to<=h.newLength?l.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let f=t.state.sliceDoc(e.from,e.to),d=VW(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,I=r.to-r.from;a=i.changeByRange(T=>{if(T.from==r.from&&T.to==r.to)return{changes:h,range:c||T.map(h)};let $=T.to-C,G=$-f.length;if(T.to-T.from!=I||t.state.sliceDoc(G,$)!=f||d&&T.to>=d.from&&T.from<=d.to)return{range:T};let b=i.changes({from:G,to:$,insert:e.insert}),en=T.to-r.to;return{changes:b,range:c?Tn.range(Math.max(0,c.anchor+en),Math.max(0,c.head+en)):T.map(b)}})}else a={changes:h,selection:c&&i.selection.replaceRange(c)}}let o="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(a,{scrollIntoView:!0,userEvent:o}),!0}else if(l&&!l.main.eq(r)){let i=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(i=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:l,scrollIntoView:i,userEvent:s}),!0}else return!1}function gB(t,n,e,l){let r=Math.min(t.length,n.length),u=0;for(;u0&&s>0&&t.charCodeAt(i-1)==n.charCodeAt(s-1);)i--,s--;if(l=="end"){let a=Math.max(0,u-Math.min(i,s));e-=i+a-u}if(i=i?u-e:0;u-=a,s=u+(s-i),i=u}else if(s=s?u-e:0;u-=a,i=u+(i-s),s=u}return{from:u,toA:i,toB:s}}function mB(t){let n=[];if(t.root.activeElement!=t.contentDOM)return n;let{anchorNode:e,anchorOffset:l,focusNode:r,focusOffset:u}=t.observer.selectionRange;return e&&(n.push(new DD(e,l)),(r!=e||u!=l)&&n.push(new DD(r,u))),n}function wB(t,n){if(t.length==0)return null;let e=t[0].pos,l=t.length==2?t[1].pos:e;return e>-1&&l>-1?Tn.single(e+n,l+n):null}const dB={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},pj=gt.ie&>.ie_version<=11;class pB{constructor(n){this.view=n,this.active=!1,this.selectionRange=new cK,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.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(e=>{for(let l of e)this.queue.push(l);(gt.ie&>.ie_version<=11||gt.ios&&n.composing)&&e.some(l=>l.type=="childList"&&l.removedNodes.length||l.type=="characterData"&&l.oldValue.length>l.target.nodeValue.length)?this.flushSoon():this.flush()}),pj&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.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),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var e;((e=this.view.docView)===null||e===void 0?void 0:e.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(n.contentDOM)),this.addWindowListeners(this.win=n.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.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(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}onScroll(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some((e,l)=>e!=n[l]))){this.gapIntersection.disconnect();for(let e of n)this.gapIntersection.observe(e);this.gaps=n}}onSelectionChange(n){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:l}=this,r=this.selectionRange;if(l.state.facet(m5)?l.root.activeElement!=this.dom:!Ev(l.dom,r))return;let u=r.anchorNode&&l.docView.nearest(r.anchorNode);if(u&&u.ignoreEvent(n)){e||(this.selectionChanged=!1);return}(gt.ie&>.ie_version<=11||gt.android&>.chrome)&&!l.state.selection.main.empty&&r.focusNode&&s2(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:n}=this,e=gt.safari&&n.root.nodeType==11&&sK(this.dom.ownerDocument)==this.dom&&vB(this.view)||i2(n.root);if(!e||this.selectionRange.eq(e))return!1;let l=Ev(this.dom,e);return l&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime{let u=this.delayedAndroidKey;u&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=u.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&u.force&&Sm(this.dom,u.key,u.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||n=="Enter")&&(this.delayedAndroidKey={key:n,keyCode:e,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let n of this.observer.takeRecords())this.queue.push(n);return this.queue}processRecords(){let n=this.pendingRecords();n.length&&(this.queue=[]);let e=-1,l=-1,r=!1;for(let u of n){let i=this.readMutation(u);i&&(i.typeOver&&(r=!0),e==-1?{from:e,to:l}=i:(e=Math.min(i.from,e),l=Math.max(i.to,l)))}return{from:e,to:l,typeOver:r}}readChange(){let{from:n,to:e,typeOver:l}=this.processRecords(),r=this.selectionChanged&&Ev(this.dom,this.selectionRange);return n<0&&!r?null:(n>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new fB(this.view,n,e,l))}flush(n=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;n&&this.readSelectionRange();let e=this.readChange();if(!e)return!1;let l=this.view.state,r=eV(this.view,e);return this.view.state==l&&this.view.update([]),r}readMutation(n){let e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty(n.type=="attributes"),n.type=="attributes"&&(e.dirty|=4),n.type=="childList"){let l=bD(e,n.previousSibling||n.target.previousSibling,-1),r=bD(e,n.nextSibling||n.target.nextSibling,1);return{from:l?e.posAfter(l):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}else return n.type=="characterData"?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}setWindow(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}addWindowListeners(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var n,e,l,r;this.stop(),(n=this.intersection)===null||n===void 0||n.disconnect(),(e=this.gapIntersection)===null||e===void 0||e.disconnect(),(l=this.resizeScroll)===null||l===void 0||l.disconnect(),(r=this.resizeContent)===null||r===void 0||r.disconnect();for(let u of this.scrollTargets)u.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function bD(t,n,e){for(;n;){let l=ll.get(n);if(l&&l.parent==t)return l;let r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}function vB(t){let n=null;function e(a){a.preventDefault(),a.stopImmediatePropagation(),n=a.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",e,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",e,!0),!n)return null;let l=n.startContainer,r=n.startOffset,u=n.endContainer,i=n.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return s2(s.node,s.offset,u,i)&&([l,r,u,i]=[u,i,l,r]),{anchorNode:l,anchorOffset:r,focusNode:u,focusOffset:i}}class kt{constructor(n={}){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.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=n.dispatch||(e=>this.update([e])),this.dispatch=this.dispatch.bind(this),this._root=n.root||fK(n.parent)||document,this.viewState=new HD(n.state||Oe.create(n)),this.plugins=this.state.facet(Fd).map(e=>new gj(e));for(let e of this.plugins)e.update(this);this.observer=new pB(this),this.inputState=new VK(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new MD(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),n.parent&&n.parent.appendChild(this.dom)}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.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...n){let e=n.length==1&&n[0]instanceof yr?n[0]:this.state.update(...n);this._dispatch(e,this)}update(n){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e=!1,l=!1,r,u=this.state;for(let f of n){if(f.startState!=u)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");u=f.state}if(this.destroyed){this.viewState.state=u;return}let i=this.hasFocus,s=0,a=null;n.some(f=>f.annotation(XW))?(this.inputState.notifiedFocused=i,s=1):i!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=i,a=FW(u,i),a||(s=1));let o=this.observer.delayedAndroidKey,h=null;if(o?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(u.doc)||!this.state.selection.eq(u.selection))&&(h=null)):this.observer.clear(),u.facet(Oe.phrases)!=this.state.facet(Oe.phrases))return this.setState(u);r=h2.create(this,u,n),r.flags|=s;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let f of n){if(c&&(c=c.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;c=new a2(d.empty?d:Tn.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(_D)&&(c=d.value)}this.viewState.update(r,c),this.bidiCache=c2.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),e=this.docView.update(r),this.state.facet(Hd)!=this.styleModules&&this.mountStyles(),l=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(e,n.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Y0)!=r.state.facet(Y0)&&(this.viewState.mustMeasureContent=!0),(e||l||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!r.empty)for(let f of this.state.facet(Jx))f(r);(a||h)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!eV(this,h)&&o.force&&Sm(this.contentDOM,o.key,o.keyCode)})}setState(n){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=n;return}this.updateState=2;let e=this.hasFocus;try{for(let l of this.plugins)l.destroy(this);this.viewState=new HD(n),this.plugins=n.facet(Fd).map(l=>new gj(l)),this.pluginMap.clear();for(let l of this.plugins)l.update(this);this.docView=new MD(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(n){let e=n.startState.facet(Fd),l=n.state.facet(Fd);if(e!=l){let r=[];for(let u of l){let i=e.indexOf(u);if(i<0)r.push(new gj(u));else{let s=this.plugins[i];s.mustUpdate=n,r.push(s)}}for(let u of this.plugins)u.mustUpdate!=n&&u.destroy(this);this.plugins=r,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let r of this.plugins)r.mustUpdate=n;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,n&&this.observer.forceFlush();let e=null,l=this.scrollDOM,{scrollTop:r}=l,{scrollAnchorPos:u,scrollAnchorHeight:i}=this.viewState;if(this.viewState.scrollAnchorHeight=-1,i<0||r!=this.viewState.scrollTop)if(r>l.scrollHeight-l.clientHeight-4)u=-1,i=this.viewState.heightMap.height;else{let s=this.viewState.lineBlockAtHeight(r);u=s.from,i=s.top}try{for(let s=0;;s++){this.updateState=1;let a=this.viewport,o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];o&4||([this.measureRequests,h]=[h,this.measureRequests]);let c=h.map(I=>{try{return I.read(this)}catch(T){return bi(this.state,T),nM}}),f=h2.create(this,this.state,[]),d=!1,C=!1;f.flags|=o,e?e.flags|=o:e=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f));for(let I=0;I-1){let T=(u<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(u).top)-i;(T>1||T<-1)&&(l.scrollTop=r+T,C=!0)}}if(d&&this.docView.updateSelection(!0),this.viewport.from==a.from&&this.viewport.to==a.to&&!C&&this.measureRequests.length==0)break;i=-1}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let s of this.state.facet(Jx))s(e)}get themeClasses(){return nk+" "+(this.state.facet(bx)?nV:bW)+" "+this.state.facet(Y0)}updateAttrs(){let n=tM(this,DW,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(m5)?"true":"false",class:"cm-content",style:`${gt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),tM(this,bR,e);let l=this.observer.ignore(()=>{let r=Qx(this.contentDOM,this.contentAttrs,e),u=Qx(this.dom,this.editorAttrs,n);return r||u});return this.editorAttrs=n,this.contentAttrs=e,l}showAnnouncements(n){let e=!0;for(let l of n)for(let r of l.effects)if(r.is(kt.announce)){e&&(this.announceDOM.textContent=""),e=!1;let u=this.announceDOM.appendChild(document.createElement("div"));u.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Hd),Gh.mount(this.root,this.styleModules.concat(cB).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(n){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),n){if(this.measureRequests.indexOf(n)>-1)return;if(n.key!=null){for(let e=0;el.spec==n)||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}}elementAtHeight(n){return this.readMeasured(),this.viewState.elementAtHeight(n)}lineBlockAtHeight(n){return this.readMeasured(),this.viewState.lineBlockAtHeight(n)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(n){return this.viewState.lineBlockAt(n)}get contentHeight(){return this.viewState.contentHeight}moveByChar(n,e,l){return wj(this,n,VD(this,n,e,l))}moveByGroup(n,e){return wj(this,n,VD(this,n,e,l=>LK(this,n.head,l)))}moveToLineBoundary(n,e,l=!0){return qK(this,n,e,l)}moveVertically(n,e,l){return wj(this,n,WK(this,n,e,l))}domAtPos(n){return this.docView.domAtPos(n)}posAtDOM(n,e=0){return this.docView.posFromDOM(n,e)}posAtCoords(n,e=!0){return this.readMeasured(),UW(this,n,e)}coordsAtPos(n,e=1){this.readMeasured();let l=this.docView.coordsAt(n,e);if(!l||l.left==l.right)return l;let r=this.state.doc.lineAt(n),u=this.bidiSpans(r),i=u[Om.find(u,n-r.from,-1,e)];return XR(l,i.dir==Cl.LTR==e>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(n){return!this.state.facet(_W)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(n){if(n.length>yB)return qW(n.length);let e=this.textDirectionAt(n.from);for(let r of this.bidiCache)if(r.from==n.from&&r.dir==e)return r.order;let l=SK(n.text,e);return this.bidiCache.push(new c2(n.from,n.to,e,l)),l}get hasFocus(){var n;return(this.dom.ownerDocument.hasFocus()||gt.safari&&((n=this.inputState)===null||n===void 0?void 0:n.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{hW(this.contentDOM),this.docView.updateSelection()})}setRoot(n){this._root!=n&&(this._root=n,this.observer.setWindow((n.nodeType==9?n:n.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let n of this.plugins)n.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(n,e={}){return _D.of(new a2(typeof n=="number"?Tn.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}static domEventHandlers(n){return Or.define(()=>({}),{eventHandlers:n})}static theme(n,e){let l=Gh.newName(),r=[Y0.of(l),Hd.of(tk(`.${l}`,n))];return e&&e.dark&&r.push(bx.of(!0)),r}static baseTheme(n){return fg.lowest(Hd.of(tk("."+nk,n,tV)))}static findFromDOM(n){var e;let l=n.querySelector(".cm-content"),r=l&&ll.get(l)||ll.get(n);return((e=r==null?void 0:r.rootView)===null||e===void 0?void 0:e.view)||null}}kt.styleModule=Hd;kt.inputHandler=PW;kt.focusChangeEffect=IW;kt.perLineTextDirection=_W;kt.exceptionSink=RW;kt.updateListener=Jx;kt.editable=m5;kt.mouseSelectionStyle=EW;kt.dragMovesSelection=AW;kt.clickAddsSelectionRange=CW;kt.decorations=_1;kt.atomicRanges=nP;kt.scrollMargins=MW;kt.darkTheme=bx;kt.contentAttributes=bR;kt.editorAttributes=DW;kt.lineWrapping=kt.contentAttributes.of({class:"cm-lineWrapping"});kt.announce=ee.define();const yB=4096,nM={};class c2{constructor(n,e,l,r){this.from=n,this.to=e,this.dir=l,this.order=r}static update(n,e){if(e.empty)return n;let l=[],r=n.length?n[n.length-1].dir:Cl.LTR;for(let u=Math.max(0,n.length-10);u=0;r--){let u=l[r],i=typeof u=="function"?u(t):u;i&&Yx(i,e)}return e}const jB=gt.mac?"mac":gt.windows?"win":gt.linux?"linux":"key";function xB(t,n){const e=t.split(/-(?!$)/);let l=e[e.length-1];l=="Space"&&(l=" ");let r,u,i,s;for(let a=0;al.concat(r),[]))),e}function SB(t,n,e){return rV(lV(t.state),n,t,e)}let Ah=null;const OB=4e3;function CB(t,n=jB){let e=Object.create(null),l=Object.create(null),r=(i,s)=>{let a=l[i];if(a==null)l[i]=s;else if(a!=s)throw new Error("Key binding "+i+" is used both as a regular binding and as a multi-stroke prefix")},u=(i,s,a,o)=>{var h,c;let f=e[i]||(e[i]=Object.create(null)),d=s.split(/ (?!$)/).map(T=>xB(T,n));for(let T=1;T{let b=Ah={view:G,prefix:$,scope:i};return setTimeout(()=>{Ah==b&&(Ah=null)},OB),!0}]})}let C=d.join(" ");r(C,!1);let I=f[C]||(f[C]={preventDefault:!1,run:((c=(h=f._any)===null||h===void 0?void 0:h.run)===null||c===void 0?void 0:c.slice())||[]});a&&I.run.push(a),o&&(I.preventDefault=!0)};for(let i of t){let s=i.scope?i.scope.split(" "):["editor"];if(i.any)for(let o of s){let h=e[o]||(e[o]=Object.create(null));h._any||(h._any={preventDefault:!1,run:[]});for(let c in h)h[c].run.push(i.any)}let a=i[n]||i.key;if(a)for(let o of s)u(o,a,i.run,i.preventDefault),i.shift&&u(o,"Shift-"+a,i.shift,i.preventDefault)}return e}function rV(t,n,e,l){let r=iK(n),u=Jr(r,0),i=Bi(u)==r.length&&r!=" ",s="",a=!1;Ah&&Ah.view==e&&Ah.scope==l&&(s=Ah.prefix+" ",(a=QW.indexOf(n.keyCode)<0)&&(Ah=null));let o=new Set,h=C=>{if(C){for(let I of C.run)if(!o.has(I)&&(o.add(I),I(e,n)))return!0;C.preventDefault&&(a=!0)}return!1},c=t[l],f,d;if(c){if(h(c[s+Q0(r,n,!i)]))return!0;if(i&&(n.altKey||n.metaKey||n.ctrlKey)&&!(gt.windows&&n.ctrlKey&&n.altKey)&&(f=Jh[n.keyCode])&&f!=r){if(h(c[s+Q0(f,n,!0)]))return!0;if(n.shiftKey&&(d=P1[n.keyCode])!=r&&d!=f&&h(c[s+Q0(d,n,!1)]))return!0}else if(i&&n.shiftKey&&h(c[s+Q0(r,n,!0)]))return!0;if(h(c._any))return!0}return a}class Tp{constructor(n,e,l,r,u){this.className=n,this.left=e,this.top=l,this.width=r,this.height=u}draw(){let n=document.createElement("div");return n.className=this.className,this.adjust(n),n}update(n,e){return e.className!=this.className?!1:(this.adjust(n),!0)}adjust(n){n.style.left=this.left+"px",n.style.top=this.top+"px",this.width!=null&&(n.style.width=this.width+"px"),n.style.height=this.height+"px"}eq(n){return this.left==n.left&&this.top==n.top&&this.width==n.width&&this.height==n.height&&this.className==n.className}static forRange(n,e,l){if(l.empty){let r=n.coordsAtPos(l.head,l.assoc||1);if(!r)return[];let u=uV(n);return[new Tp(e,r.left-u.left,r.top-u.top,null,r.bottom-r.top)]}else return AB(n,e,l)}}function uV(t){let n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Cl.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function lM(t,n,e){let l=Tn.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(l,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(l,!0,!0).from),type:El.Text}}function AB(t,n,e){if(e.to<=t.viewport.from||e.from>=t.viewport.to)return[];let l=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),u=t.textDirection==Cl.LTR,i=t.contentDOM,s=i.getBoundingClientRect(),a=uV(t),o=i.querySelector(".cm-line"),h=o&&window.getComputedStyle(o),c=s.left+(h?parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)):0),f=s.right-(h?parseInt(h.paddingRight):0),d=Fx(t,l),C=Fx(t,r),I=d.type==El.Text?d:null,T=C.type==El.Text?C:null;if(I&&(t.lineWrapping||d.widgetLineBreaks)&&(I=lM(t,l,I)),T&&(t.lineWrapping||C.widgetLineBreaks)&&(T=lM(t,r,T)),I&&T&&I.from==T.from)return G(b(e.from,e.to,I));{let ln=I?b(e.from,null,I):en(d,!1),B=T?b(null,e.to,T):en(C,!0),O=[];return(I||d).to<(T||C).from-(I&&T?1:0)||d.widgetLineBreaks>1&&ln.bottom+t.defaultLineHeight/2Z&&tn.from=hn)break;yn>sn&&_(Math.max(pn,sn),ln==null&&pn<=Z,Math.min(yn,hn),B==null&&yn>=nn,wn.dir)}if(sn=mn.to+1,sn>=hn)break}return R.length==0&&_(Z,ln==null,nn,B==null,t.textDirection),{top:k,bottom:H,horizontal:R}}function en(ln,B){let O=s.top+(B?ln.top:ln.bottom);return{top:O,bottom:O,horizontal:[]}}}function EB(t,n){return t.constructor==n.constructor&&t.eq(n)}class RB{constructor(n,e){this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.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.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}update(n){n.startState.facet(Iv)!=n.state.facet(Iv)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}setOrder(n){let e=0,l=n.facet(Iv);for(;e!EB(e,this.drawn[l]))){let e=this.dom.firstChild,l=0;for(let r of n)r.update&&e&&r.constructor&&this.drawn[l].constructor&&r.update(e,this.drawn[l])?(e=e.nextSibling,l++):this.dom.insertBefore(r.draw(),e);for(;e;){let r=e.nextSibling;e.remove(),e=r}this.drawn=n}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Iv=dt.define();function iV(t){return[Or.define(n=>new RB(n,t)),Iv.of(t)]}const sV=!gt.ios,T1=dt.define({combine(t){return Wo(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(n,e)=>Math.min(n,e),drawRangeCursor:(n,e)=>n||e})}});function PB(t={}){return[T1.of(t),IB,_B,TB,TW.of(!0)]}function oV(t){return t.startState.facet(T1)!=t.state.facet(T1)}const IB=iV({above:!0,markers(t){let{state:n}=t,e=n.facet(T1),l=[];for(let r of n.selection.ranges){let u=r==n.selection.main;if(r.empty?!u||sV:e.drawRangeCursor){let i=u?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=r.empty?r:Tn.cursor(r.head,r.head>r.anchor?-1:1);for(let a of Tp.forRange(t,i,s))l.push(a)}}return l},update(t,n){t.transactions.some(l=>l.selection)&&(n.style.animationName=n.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let e=oV(t);return e&&rM(t.state,n),t.docChanged||t.selectionSet||e},mount(t,n){rM(n.state,t)},class:"cm-cursorLayer"});function rM(t,n){n.style.animationDuration=t.facet(T1).cursorBlinkRate+"ms"}const _B=iV({above:!1,markers(t){return t.state.selection.ranges.map(n=>n.empty?[]:Tp.forRange(t,"cm-selectionBackground",n)).reduce((n,e)=>n.concat(e))},update(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||oV(t)},class:"cm-selectionLayer"}),aV={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};sV&&(aV[".cm-line"].caretColor="transparent !important");const TB=fg.highest(kt.theme(aV)),hV=ee.define({map(t,n){return t==null?null:n.mapPos(t)}}),bd=eu.define({create(){return null},update(t,n){return t!=null&&(t=n.changes.mapPos(t)),n.effects.reduce((e,l)=>l.is(hV)?l.value:e,t)}}),DB=Or.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 n;let e=t.state.field(bd);e==null?this.cursor!=null&&((n=this.cursor)===null||n===void 0||n.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(bd)!=e||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let t=this.view.state.field(bd),n=t!=null&&this.view.coordsAtPos(t);if(!n)return null;let e=this.view.scrollDOM.getBoundingClientRect();return{left:n.left-e.left+this.view.scrollDOM.scrollLeft,top:n.top-e.top+this.view.scrollDOM.scrollTop,height:n.bottom-n.top}}drawCursor(t){this.cursor&&(t?(this.cursor.style.left=t.left+"px",this.cursor.style.top=t.top+"px",this.cursor.style.height=t.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(bd)!=t&&this.view.dispatch({effects:hV.of(t)})}},{eventHandlers:{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 MB(){return[bd,DB]}function uM(t,n,e,l,r){n.lastIndex=0;for(let u=t.iterRange(e,l),i=e,s;!u.next().done;i+=u.value.length)if(!u.lineBreak)for(;s=n.exec(u.value);)r(i+s.index,s)}function $B(t,n){let e=t.visibleRanges;if(e.length==1&&e[0].from==t.viewport.from&&e[0].to==t.viewport.to)return e;let l=[];for(let{from:r,to:u}of e)r=Math.max(t.state.doc.lineAt(r).from,r-n),u=Math.min(t.state.doc.lineAt(u).to,u+n),l.length&&l[l.length-1].to>=r?l[l.length-1].to=u:l.push({from:r,to:u});return l}class NB{constructor(n){const{regexp:e,decoration:l,decorate:r,boundary:u,maxLength:i=1e3}=n;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=(s,a,o,h)=>r(h,o,o+s[0].length,s,a);else if(typeof l=="function")this.addMatch=(s,a,o,h)=>{let c=l(s,a,o);c&&h(o,o+s[0].length,c)};else if(l)this.addMatch=(s,a,o,h)=>h(o,o+s[0].length,l);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=u,this.maxLength=i}createDeco(n){let e=new Qh,l=e.add.bind(e);for(let{from:r,to:u}of $B(n,this.maxLength))uM(n.state.doc,this.regexp,r,u,(i,s)=>this.addMatch(s,n,i,l));return e.finish()}updateDeco(n,e){let l=1e9,r=-1;return n.docChanged&&n.changes.iterChanges((u,i,s,a)=>{a>n.view.viewport.from&&s1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),l,r):e}updateRange(n,e,l,r){for(let u of n.visibleRanges){let i=Math.max(u.from,l),s=Math.min(u.to,r);if(s>i){let a=n.state.doc.lineAt(i),o=a.toa.from;i--)if(this.boundary.test(a.text[i-1-a.from])){h=i;break}for(;sf.push($.range(I,T));if(a==o)for(this.regexp.lastIndex=h-a.from;(d=this.regexp.exec(a.text))&&d.indexthis.addMatch(T,n,I,C));e=e.update({filterFrom:h,filterTo:c,filter:(I,T)=>Ic,add:f})}}return e}}const ek=/x/.unicode!=null?"gu":"g",qB=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,ek),LB={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 vj=null;function WB(){var t;if(vj==null&&typeof document<"u"&&document.body){let n=document.body.style;vj=((t=n.tabSize)!==null&&t!==void 0?t:n.MozTabSize)!=null}return vj||!1}const _v=dt.define({combine(t){let n=Wo(t,{render:null,specialChars:qB,addSpecialChars:null});return(n.replaceTabs=!WB())&&(n.specialChars=new RegExp(" |"+n.specialChars.source,ek)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,ek)),n}});function VB(t={}){return[_v.of(t),zB()]}let iM=null;function zB(){return iM||(iM=Or.fromClass(class{constructor(t){this.view=t,this.decorations=Tt.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(_v)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new NB({regexp:t.specialChars,decoration:(n,e,l)=>{let{doc:r}=e.state,u=Jr(n[0],0);if(u==9){let i=r.lineAt(l),s=e.state.tabSize,a=Ip(i.text,s,l-i.from);return Tt.replace({widget:new GB((s-a%s)*this.view.defaultCharacterWidth)})}return this.decorationCache[u]||(this.decorationCache[u]=Tt.replace({widget:new QB(t,u)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let n=t.state.facet(_v);t.startState.facet(_v)!=n?(this.decorator=this.makeDecorator(n),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const UB="•";function YB(t){return t>=32?UB:t==10?"␤":String.fromCharCode(9216+t)}class QB extends Ic{constructor(n,e){super(),this.options=n,this.code=e}eq(n){return n.code==this.code}toDOM(n){let e=YB(this.code),l=n.state.phrase("Control character")+" "+(LB[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,l,e);if(r)return r;let u=document.createElement("span");return u.textContent=e,u.title=l,u.setAttribute("aria-label",l),u.className="cm-specialChar",u}ignoreEvent(){return!1}}class GB extends Ic{constructor(n){super(),this.width=n}eq(n){return n.width==this.width}toDOM(){let n=document.createElement("span");return n.textContent=" ",n.className="cm-tab",n.style.width=this.width+"px",n}ignoreEvent(){return!1}}function JB(){return BB}const KB=Tt.line({class:"cm-activeLine"}),BB=Or.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let n=-1,e=[];for(let l of t.state.selection.ranges){let r=t.lineBlockAt(l.head);r.from>n&&(e.push(KB.range(r.from)),n=r.from)}return Tt.set(e)}},{decorations:t=>t.decorations}),lk=2e3;function XB(t,n,e){let l=Math.min(n.line,e.line),r=Math.max(n.line,e.line),u=[];if(n.off>lk||e.off>lk||n.col<0||e.col<0){let i=Math.min(n.off,e.off),s=Math.max(n.off,e.off);for(let a=l;a<=r;a++){let o=t.doc.line(a);o.length<=s&&u.push(Tn.range(o.from+i,o.to+s))}}else{let i=Math.min(n.col,e.col),s=Math.max(n.col,e.col);for(let a=l;a<=r;a++){let o=t.doc.line(a),h=$x(o.text,i,t.tabSize,!0);if(h<0)u.push(Tn.cursor(o.to));else{let c=$x(o.text,s,t.tabSize);u.push(Tn.range(o.from+h,o.from+c))}}}return u}function FB(t,n){let e=t.coordsAtPos(t.viewport.from);return e?Math.round(Math.abs((e.left-n)/t.defaultCharacterWidth)):-1}function sM(t,n){let e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),l=t.state.doc.lineAt(e),r=e-l.from,u=r>lk?-1:r==l.length?FB(t,n.clientX):Ip(l.text,t.state.tabSize,e-l.from);return{line:l.number,col:u,off:r}}function HB(t,n){let e=sM(t,n),l=t.state.selection;return e?{update(r){if(r.docChanged){let u=r.changes.mapPos(r.startState.doc.line(e.line).from),i=r.state.doc.lineAt(u);e={line:i.number,col:e.col,off:Math.min(e.off,i.length)},l=l.map(r.changes)}},get(r,u,i){let s=sM(t,r);if(!s)return l;let a=XB(t.state,e,s);return a.length?i?Tn.create(a.concat(l.ranges)):Tn.create(a):l}}:null}function ZB(t){let n=(t==null?void 0:t.eventFilter)||(e=>e.altKey&&e.button==0);return kt.mouseSelectionStyle.of((e,l)=>n(l)?HB(e,l):null)}const bB={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},nX={style:"cursor: crosshair"};function tX(t={}){let[n,e]=bB[t.key||"Alt"],l=Or.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventHandlers:{keydown(r){this.set(r.keyCode==n||e(r))},keyup(r){(r.keyCode==n||!e(r))&&this.set(!1)},mousemove(r){this.set(e(r))}}});return[l,kt.contentAttributes.of(r=>{var u;return!((u=r.plugin(l))===null||u===void 0)&&u.isDown?nX:null})]}const G0="-10000px";class cV{constructor(n,e,l){this.facet=e,this.createTooltipView=l,this.input=n.state.facet(e),this.tooltips=this.input.filter(r=>r),this.tooltipViews=this.tooltips.map(l)}update(n){var e;let l=n.state.facet(this.facet),r=l.filter(i=>i);if(l===this.input){for(let i of this.tooltipViews)i.update&&i.update(n);return!1}let u=[];for(let i=0;i{var n,e,l;return{position:gt.ios?"absolute":((n=t.find(r=>r.position))===null||n===void 0?void 0:n.position)||"fixed",parent:((e=t.find(r=>r.parent))===null||e===void 0?void 0:e.parent)||null,tooltipSpace:((l=t.find(r=>r.tooltipSpace))===null||l===void 0?void 0:l.tooltipSpace)||eX}}}),oM=new WeakMap,fV=Or.fromClass(class{constructor(t){this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let n=t.state.facet(yj);this.position=n.position,this.parent=n.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new cV(t,eP,e=>this.createTooltip(e)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.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 n=this.manager.update(t);n&&this.observeIntersection();let e=n||t.geometryChanged,l=t.state.facet(yj);if(l.position!=this.position){this.position=l.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;e=!0}if(l.parent!=this.parent){this.parent&&this.container.remove(),this.parent=l.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);e=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);e&&this.maybeMeasure()}createTooltip(t){let n=t.create(this.view);if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=G0,this.container.appendChild(n.dom),n.mount&&n.mount(this.view),n}destroy(){var t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),(t=e.destroy)===null||t===void 0||t.call(e);(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((n,e)=>{let l=this.manager.tooltipViews[e];return l.getCoords?l.getCoords(n.pos):this.view.coordsAtPos(n.pos)}),size:this.manager.tooltipViews.map(({dom:n})=>n.getBoundingClientRect()),space:this.view.state.facet(yj).tooltipSpace(this.view)}}writeMeasure(t){var n;let{editor:e,space:l}=t,r=[];for(let u=0;u=Math.min(e.bottom,l.bottom)||o.rightMath.min(e.right,l.right)+.1){a.style.top=G0;continue}let c=i.arrow?s.dom.querySelector(".cm-tooltip-arrow"):null,f=c?7:0,d=h.right-h.left,C=(n=oM.get(s))!==null&&n!==void 0?n:h.bottom-h.top,I=s.offset||rX,T=this.view.textDirection==Cl.LTR,$=h.width>l.right-l.left?T?l.left:l.right-h.width:T?Math.min(o.left-(c?14:0)+I.x,l.right-d):Math.max(l.left,o.left-d+(c?14:0)-I.x),G=!!i.above;!i.strictSide&&(G?o.top-(h.bottom-h.top)-I.yl.bottom)&&G==l.bottom-o.bottom>o.top-l.top&&(G=!G);let b=(G?o.top-l.top:l.bottom-o.bottom)-f;if(b$&&B.topen&&(en=G?B.top-C-2-f:B.bottom+f+2);this.position=="absolute"?(a.style.top=en-t.parent.top+"px",a.style.left=$-t.parent.left+"px"):(a.style.top=en+"px",a.style.left=$+"px"),c&&(c.style.left=`${o.left+(T?I.x:-I.x)-($+14-7)}px`),s.overlap!==!0&&r.push({left:$,top:en,right:ln,bottom:en+C}),a.classList.toggle("cm-tooltip-above",G),a.classList.toggle("cm-tooltip-below",!G),s.positioned&&s.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=G0}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),lX=kt.baseTheme({".cm-tooltip":{zIndex:100,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:`${7*2}px`,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"}}}),rX={x:0,y:0},eP=dt.define({enables:[fV,lX]}),f2=dt.define();class lP{constructor(n){this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new cV(n,f2,e=>this.createHostedView(e))}static create(n){return new lP(n)}createHostedView(n){let e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}mount(n){for(let e of this.manager.tooltipViews)e.mount&&e.mount(n);this.mounted=!0}positioned(n){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(n)}update(n){this.manager.update(n)}destroy(){var n;for(let e of this.manager.tooltipViews)(n=e.destroy)===null||n===void 0||n.call(e)}}const uX=eP.compute([f2],t=>{let n=t.facet(f2).filter(e=>e);return n.length===0?null:{pos:Math.min(...n.map(e=>e.pos)),end:Math.max(...n.filter(e=>e.end!=null).map(e=>e.end)),create:lP.create,above:n[0].above,arrow:n.some(e=>e.arrow)}});class iX{constructor(n,e,l,r,u){this.view=n,this.source=e,this.field=l,this.setHover=r,this.hoverTime=u,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.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)return;let n=Date.now()-this.lastMove.time;nl.bottom||n.xl.right+this.view.defaultCharacterWidth)return;let r=this.view.bidiSpans(this.view.state.doc.lineAt(e)).find(s=>s.from<=e&&s.to>=e),u=r&&r.dir==Cl.RTL?-1:1,i=this.source(this.view,e,n.x{this.pending==s&&(this.pending=null,a&&this.view.dispatch({effects:this.setHover.of(a)}))},a=>bi(this.view.state,a,"hover tooltip"))}else i&&this.view.dispatch({effects:this.setHover.of(i)})}mousemove(n){var e;this.lastMove={x:n.clientX,y:n.clientY,target:n.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let l=this.active;if(l&&!aM(this.lastMove.target)||this.pending){let{pos:r}=l||this.pending,u=(e=l==null?void 0:l.end)!==null&&e!==void 0?e:r;(r==u?this.view.posAtCoords(this.lastMove)!=r:!sX(this.view,r,u,n.clientX,n.clientY,6))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(n){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!aM(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function aM(t){for(let n=t;n;n=n.parentNode)if(n.nodeType==1&&n.classList.contains("cm-tooltip"))return!0;return!1}function sX(t,n,e,l,r,u){let i=document.createRange(),s=t.domAtPos(n),a=t.domAtPos(e);i.setEnd(a.node,a.offset),i.setStart(s.node,s.offset);let o=i.getClientRects();i.detach();for(let h=0;hf2.from(r)});return[l,Or.define(r=>new iX(r,t,l,e,n.hoverTime||300)),uX]}function gV(t,n){let e=t.plugin(fV);if(!e)return null;let l=e.manager.tooltips.indexOf(n);return l<0?null:e.manager.tooltipViews[l]}const aX=ee.define(),hM=dt.define({combine(t){let n,e;for(let l of t)n=n||l.topContainer,e=e||l.bottomContainer;return{topContainer:n,bottomContainer:e}}});function D1(t,n){let e=t.plugin(mV),l=e?e.specs.indexOf(n):-1;return l>-1?e.panels[l]:null}const mV=Or.fromClass(class{constructor(t){this.input=t.state.facet(M1),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(e=>e(t));let n=t.state.facet(hM);this.top=new J0(t,!0,n.topContainer),this.bottom=new J0(t,!1,n.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(t){let n=t.state.facet(hM);this.top.container!=n.topContainer&&(this.top.sync([]),this.top=new J0(t.view,!0,n.topContainer)),this.bottom.container!=n.bottomContainer&&(this.bottom.sync([]),this.bottom=new J0(t.view,!1,n.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let e=t.state.facet(M1);if(e!=this.input){let l=e.filter(a=>a),r=[],u=[],i=[],s=[];for(let a of l){let o=this.specs.indexOf(a),h;o<0?(h=a(t.view),s.push(h)):(h=this.panels[o],h.update&&h.update(t)),r.push(h),(h.top?u:i).push(h)}this.specs=l,this.panels=r,this.top.sync(u),this.bottom.sync(i);for(let a of s)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let l of this.panels)l.update&&l.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>kt.scrollMargins.of(n=>{let e=n.plugin(t);return e&&{top:e.top.scrollMargin(),bottom:e.bottom.scrollMargin()}})});class J0{constructor(n,e,l){this.view=n,this.top=e,this.container=l,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(n){for(let e of this.panels)e.destroy&&n.indexOf(e)<0&&e.destroy();this.panels=n,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}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 e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let n=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;n!=e.dom;)n=cM(n);n=n.nextSibling}else this.dom.insertBefore(e.dom,n);for(;n;)n=cM(n)}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 n of this.classes.split(" "))n&&this.container.classList.remove(n);for(let n of(this.classes=this.view.themeClasses).split(" "))n&&this.container.classList.add(n)}}}function cM(t){let n=t.nextSibling;return t.remove(),n}const M1=dt.define({enables:mV});class Da extends Rf{compare(n){return this==n||this.constructor==n.constructor&&this.eq(n)}eq(n){return!1}destroy(n){}}Da.prototype.elementClass="";Da.prototype.toDOM=void 0;Da.prototype.mapMode=ku.TrackBefore;Da.prototype.startSide=Da.prototype.endSide=-1;Da.prototype.point=!0;const Tv=dt.define(),hX={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>We.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},w1=dt.define();function cX(t){return[wV(),w1.of(Object.assign(Object.assign({},hX),t))]}const rk=dt.define({combine:t=>t.some(n=>n)});function wV(t){let n=[fX];return t&&t.fixed===!1&&n.push(rk.of(!0)),n}const fX=Or.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(w1).map(n=>new gM(t,n));for(let n of this.gutters)this.dom.appendChild(n.dom);this.fixed=!t.state.facet(rk),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let n=this.prevViewport,e=t.view.viewport,l=Math.min(n.to,e.to)-Math.max(n.from,e.from);this.syncGutters(l<(e.to-e.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(rk)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let n=this.dom.nextSibling;t&&this.dom.remove();let e=We.iter(this.view.state.facet(Tv),this.view.viewport.from),l=[],r=this.gutters.map(u=>new gX(u,this.view.viewport,-this.view.documentPadding.top));for(let u of this.view.viewportLineBlocks)if(l.length&&(l=[]),Array.isArray(u.type)){let i=!0;for(let s of u.type)if(s.type==El.Text&&i){uk(e,l,s.from);for(let a of r)a.line(this.view,s,l);i=!1}else if(s.widget)for(let a of r)a.widget(this.view,s)}else if(u.type==El.Text){uk(e,l,u.from);for(let i of r)i.line(this.view,u,l)}for(let u of r)u.finish();t&&this.view.scrollDOM.insertBefore(this.dom,n)}updateGutters(t){let n=t.startState.facet(w1),e=t.state.facet(w1),l=t.docChanged||t.heightChanged||t.viewportChanged||!We.eq(t.startState.facet(Tv),t.state.facet(Tv),t.view.viewport.from,t.view.viewport.to);if(n==e)for(let r of this.gutters)r.update(t)&&(l=!0);else{l=!0;let r=[];for(let u of e){let i=n.indexOf(u);i<0?r.push(new gM(this.view,u)):(this.gutters[i].update(t),r.push(this.gutters[i]))}for(let u of this.gutters)u.dom.remove(),r.indexOf(u)<0&&u.destroy();for(let u of r)this.dom.appendChild(u.dom);this.gutters=r}return l}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>kt.scrollMargins.of(n=>{let e=n.plugin(t);return!e||e.gutters.length==0||!e.fixed?null:n.textDirection==Cl.LTR?{left:e.dom.offsetWidth}:{right:e.dom.offsetWidth}})});function fM(t){return Array.isArray(t)?t:[t]}function uk(t,n,e){for(;t.value&&t.from<=e;)t.from==e&&n.push(t.value),t.next()}class gX{constructor(n,e,l){this.gutter=n,this.height=l,this.i=0,this.cursor=We.iter(n.markers,e.from)}addElement(n,e,l){let{gutter:r}=this,u=e.top-this.height;if(this.i==r.elements.length){let i=new dV(n,e.height,u,l);r.elements.push(i),r.dom.appendChild(i.dom)}else r.elements[this.i].update(n,e.height,u,l);this.height=e.bottom,this.i++}line(n,e,l){let r=[];uk(this.cursor,r,e.from),l.length&&(r=r.concat(l));let u=this.gutter.config.lineMarker(n,e,r);u&&r.unshift(u);let i=this.gutter;r.length==0&&!i.config.renderEmptyElements||this.addElement(n,e,r)}widget(n,e){let l=this.gutter.config.widgetMarker(n,e.widget,e);l&&this.addElement(n,e,[l])}finish(){let n=this.gutter;for(;n.elements.length>this.i;){let e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}class gM{constructor(n,e){this.view=n,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 l in e.domEventHandlers)this.dom.addEventListener(l,r=>{let u=r.target,i;if(u!=this.dom&&this.dom.contains(u)){for(;u.parentNode!=this.dom;)u=u.parentNode;let a=u.getBoundingClientRect();i=(a.top+a.bottom)/2}else i=r.clientY;let s=n.lineBlockAtHeight(i-n.documentTop);e.domEventHandlers[l](n,s,r)&&r.preventDefault()});this.markers=fM(e.markers(n)),e.initialSpacer&&(this.spacer=new dV(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(n){let e=this.markers;if(this.markers=fM(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],n);r!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[r])}let l=n.view.viewport;return!We.eq(this.markers,e,l.from,l.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(n):!1)}destroy(){for(let n of this.elements)n.destroy()}}class dV{constructor(n,e,l,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,l,r)}update(n,e,l,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=l&&(this.dom.style.marginTop=(this.above=l)?l+"px":""),mX(this.markers,r)||this.setMarkers(n,r)}setMarkers(n,e){let l="cm-gutterElement",r=this.dom.firstChild;for(let u=0,i=0;;){let s=i,a=uu(s,a,o)||i(s,a,o):i}return l}})}});class jj extends Da{constructor(n){super(),this.number=n}eq(n){return this.number==n.number}toDOM(){return document.createTextNode(this.number)}}function xj(t,n){return t.state.facet(cm).formatNumber(n,t.state)}const dX=w1.compute([cm],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(n){return n.state.facet(wX)},lineMarker(n,e,l){return l.some(r=>r.toDOM)?null:new jj(xj(n,n.state.doc.lineAt(e.from).number))},widgetMarker:()=>null,lineMarkerChange:n=>n.startState.facet(cm)!=n.state.facet(cm),initialSpacer(n){return new jj(xj(n,mM(n.state.doc.lines)))},updateSpacer(n,e){let l=xj(e.view,mM(e.view.state.doc.lines));return l==n.number?n:new jj(l)},domEventHandlers:t.facet(cm).domEventHandlers}));function pX(t={}){return[cm.of(t),wV(),dX]}function mM(t){let n=9;for(;n{let n=[],e=-1;for(let l of t.selection.ranges){let r=t.doc.lineAt(l.head).from;r>e&&(e=r,n.push(vX.range(r)))}return We.of(n)});function jX(){return yX}const pV=1024;let xX=0;class kj{constructor(n,e){this.from=n,this.to=e}}class le{constructor(n={}){this.id=xX++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(n){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof n!="function"&&(n=ti.match(n)),e=>{let l=n(e);return l===void 0?null:[this,l]}}}le.closedBy=new le({deserialize:t=>t.split(" ")});le.openedBy=new le({deserialize:t=>t.split(" ")});le.group=new le({deserialize:t=>t.split(" ")});le.contextHash=new le({perNode:!0});le.lookAhead=new le({perNode:!0});le.mounted=new le({perNode:!0});const kX=Object.create(null);class ti{constructor(n,e,l,r=0){this.name=n,this.props=e,this.id=l,this.flags=r}static define(n){let e=n.props&&n.props.length?Object.create(null):kX,l=(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(n.name==null?8:0),r=new ti(n.name||"",e,n.id,l);if(n.props){for(let u of n.props)if(Array.isArray(u)||(u=u(r)),u){if(u[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[u[0].id]=u[1]}}return r}prop(n){return this.props[n.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(n){if(typeof n=="string"){if(this.name==n)return!0;let e=this.prop(le.group);return e?e.indexOf(n)>-1:!1}return this.id==n}static match(n){let e=Object.create(null);for(let l in n)for(let r of l.split(" "))e[r]=n[l];return l=>{for(let r=l.prop(le.group),u=-1;u<(r?r.length:0);u++){let i=e[u<0?l.name:r[u]];if(i)return i}}}}ti.none=new ti("",Object.create(null),0,8);class rP{constructor(n){this.types=n;for(let e=0;e0;for(let a=this.cursor(i|Dr.IncludeAnonymous);;){let o=!1;if(a.from<=u&&a.to>=r&&(!s&&a.type.isAnonymous||e(a)!==!1)){if(a.firstChild())continue;o=!0}for(;o&&l&&(s||!a.type.isAnonymous)&&l(a),!a.nextSibling();){if(!a.parent())return;o=!0}}}prop(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}get propValues(){let n=[];if(this.props)for(let e in this.props)n.push([+e,this.props[e]]);return n}balance(n={}){return this.children.length<=8?this:sP(ti.none,this.children,this.positions,0,this.children.length,0,this.length,(e,l,r)=>new lr(this.type,e,l,r,this.propValues),n.makeTree||((e,l,r)=>new lr(ti.none,e,l,r)))}static build(n){return OX(n)}}lr.empty=new lr(ti.none,[],[],0);class uP{constructor(n,e){this.buffer=n,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 uP(this.buffer,this.index)}}class gg{constructor(n,e,l){this.buffer=n,this.length=e,this.set=l}get type(){return ti.none}toString(){let n=[];for(let e=0;e0));a=i[a+3]);return s}slice(n,e,l){let r=this.buffer,u=new Uint16Array(e-n),i=0;for(let s=n,a=0;s=n&&en;case 1:return e<=n&&l>n;case 2:return l>n;case 4:return!0}}function yV(t,n){let e=t.childBefore(n);for(;e;){let l=e.lastChild;if(!l||l.to!=e.to)break;l.type.isError&&l.from==l.to?(t=e,e=l.prevSibling):e=l}return t}function ew(t,n,e,l){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to0?s.length:-1;n!=o;n+=e){let h=s[n],c=a[n]+i.from;if(vV(r,l,c,c+h.length)){if(h instanceof gg){if(u&Dr.ExcludeBuffers)continue;let f=h.findChild(0,h.buffer.length,e,l-c,r);if(f>-1)return new Ih(new SX(i,h,n,c),null,f)}else if(u&Dr.IncludeAnonymous||!h.type.isAnonymous||iP(h)){let f;if(!(u&Dr.IgnoreMounts)&&h.props&&(f=h.prop(le.mounted))&&!f.overlay)return new Sa(f.tree,c,n,i);let d=new Sa(h,c,n,i);return u&Dr.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(e<0?h.children.length-1:0,e,l,r)}}}if(u&Dr.IncludeAnonymous||!i.type.isAnonymous||(i.index>=0?n=i.index+e:n=e<0?-1:i._parent._tree.children.length,i=i._parent,!i))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(n){return this.nextChild(0,1,n,2)}childBefore(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}enter(n,e,l=0){let r;if(!(l&Dr.IgnoreOverlays)&&(r=this._tree.prop(le.mounted))&&r.overlay){let u=n-this.from;for(let{from:i,to:s}of r.overlay)if((e>0?i<=u:i=u:s>u))return new Sa(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,n,e,l)}nextSignificantParent(){let n=this;for(;n.type.isAnonymous&&n._parent;)n=n._parent;return n}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}cursor(n=0){return new w2(this,n)}get tree(){return this._tree}toTree(){return this._tree}resolve(n,e=0){return ew(this,n,e,!1)}resolveInner(n,e=0){return ew(this,n,e,!0)}enterUnfinishedNodesBefore(n){return yV(this,n)}getChild(n,e=null,l=null){let r=g2(this,n,e,l);return r.length?r[0]:null}getChildren(n,e=null,l=null){return g2(this,n,e,l)}toString(){return this._tree.toString()}get node(){return this}matchContext(n){return m2(this,n)}}function g2(t,n,e,l){let r=t.cursor(),u=[];if(!r.firstChild())return u;if(e!=null){for(;!r.type.is(e);)if(!r.nextSibling())return u}for(;;){if(l!=null&&r.type.is(l))return u;if(r.type.is(n)&&u.push(r.node),!r.nextSibling())return l==null?u:[]}}function m2(t,n,e=n.length-1){for(let l=t.parent;e>=0;l=l.parent){if(!l)return!1;if(!l.type.isAnonymous){if(n[e]&&n[e]!=l.name)return!1;e--}}return!0}class SX{constructor(n,e,l,r){this.parent=n,this.buffer=e,this.index=l,this.start=r}}class Ih{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(n,e,l){this.context=n,this._parent=e,this.index=l,this.type=n.buffer.set.types[n.buffer.buffer[l]]}child(n,e,l){let{buffer:r}=this.context,u=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,l);return u<0?null:new Ih(this.context,this,u)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(n){return this.child(1,n,2)}childBefore(n){return this.child(-1,n,-2)}enter(n,e,l=0){if(l&Dr.ExcludeBuffers)return null;let{buffer:r}=this.context,u=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);return u<0?null:new Ih(this.context,this,u)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}get nextSibling(){let{buffer:n}=this.context,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new Ih(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:n}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Ih(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}cursor(n=0){return new w2(this,n)}get tree(){return null}toTree(){let n=[],e=[],{buffer:l}=this.context,r=this.index+4,u=l.buffer[this.index+3];if(u>r){let i=l.buffer[this.index+1];n.push(l.slice(r,u,i)),e.push(0)}return new lr(this.type,n,e,this.to-this.from)}resolve(n,e=0){return ew(this,n,e,!1)}resolveInner(n,e=0){return ew(this,n,e,!0)}enterUnfinishedNodesBefore(n){return yV(this,n)}toString(){return this.context.buffer.childString(this.index)}getChild(n,e=null,l=null){let r=g2(this,n,e,l);return r.length?r[0]:null}getChildren(n,e=null,l=null){return g2(this,n,e,l)}get node(){return this}matchContext(n){return m2(this,n)}}class w2{get name(){return this.type.name}constructor(n,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof Sa)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(let l=n._parent;l;l=l._parent)this.stack.unshift(l.index);this.bufferNode=n,this.yieldBuf(n.index)}}yieldNode(n){return n?(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0):!1}yieldBuf(n,e){this.index=n;let{start:l,buffer:r}=this.buffer;return this.type=e||r.set.types[r.buffer[n]],this.from=l+r.buffer[n+1],this.to=l+r.buffer[n+2],!0}yield(n){return n?n instanceof Sa?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(n,e,l){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,l,this.mode));let{buffer:r}=this.buffer,u=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,l);return u<0?!1:(this.stack.push(this.index),this.yieldBuf(u))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(n){return this.enterChild(1,n,2)}childBefore(n){return this.enterChild(-1,n,-2)}enter(n,e,l=this.mode){return this.buffer?l&Dr.ExcludeBuffers?!1:this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,l))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Dr.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let n=this.mode&Dr.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}sibling(n){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode)):!1;let{buffer:e}=this.buffer,l=this.stack.length-1;if(n<0){let r=l<0?0:this.stack[l]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{let r=e.buffer[this.index+3];if(r<(l<0?e.buffer.length:e.buffer[this.stack[l]+3]))return this.yieldBuf(r)}return l<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(n){let e,l,{buffer:r}=this;if(r){if(n>0){if(this.index-1)for(let u=e+n,i=n<0?-1:l._tree.children.length;u!=i;u+=n){let s=l._tree.children[u];if(this.mode&Dr.IncludeAnonymous||s instanceof gg||!s.type.isAnonymous||iP(s))return!1}return!0}move(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}next(n=!0){return this.move(1,n)}prev(n=!0){return this.move(-1,n)}moveTo(n,e=0){for(;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(let i=n;i;i=i._parent)if(i.index==r){if(r==this.index)return i;e=i,l=u+1;break n}r=this.stack[--u]}for(let r=l;r=0;u--){if(u<0)return m2(this.node,n,r);let i=l[e.buffer[this.stack[u]]];if(!i.isAnonymous){if(n[r]&&n[r]!=i.name)return!1;r--}}return!0}}function iP(t){return t.children.some(n=>n instanceof gg||!n.type.isAnonymous||iP(n))}function OX(t){var n;let{buffer:e,nodeSet:l,maxBufferLength:r=pV,reused:u=[],minRepeatType:i=l.types.length}=t,s=Array.isArray(e)?new uP(e,e.length):e,a=l.types,o=0,h=0;function c(en,ln,B,O,k){let{id:H,start:R,end:_,size:Z}=s,nn=h;for(;Z<0;)if(s.next(),Z==-1){let wn=u[H];B.push(wn),O.push(R-en);return}else if(Z==-3){o=H;return}else if(Z==-4){h=H;return}else throw new RangeError(`Unrecognized record size: ${Z}`);let tn=a[H],sn,hn,mn=R-en;if(_-R<=r&&(hn=I(s.pos-ln,k))){let wn=new Uint16Array(hn.size-hn.skip),pn=s.pos-hn.size,yn=wn.length;for(;s.pos>pn;)yn=T(hn.start,wn,yn);sn=new gg(wn,_-hn.start,l),mn=hn.start-en}else{let wn=s.pos-Z;s.next();let pn=[],yn=[],An=H>=i?H:-1,jn=0,Sn=_;for(;s.pos>wn;)An>=0&&s.id==An&&s.size>=0?(s.end<=Sn-r&&(d(pn,yn,R,jn,s.end,Sn,An,nn),jn=pn.length,Sn=s.end),s.next()):c(R,wn,pn,yn,An);if(An>=0&&jn>0&&jn-1&&jn>0){let Pn=f(tn);sn=sP(tn,pn,yn,0,pn.length,0,_-R,Pn,Pn)}else sn=C(tn,pn,yn,_-R,nn-_)}B.push(sn),O.push(mn)}function f(en){return(ln,B,O)=>{let k=0,H=ln.length-1,R,_;if(H>=0&&(R=ln[H])instanceof lr){if(!H&&R.type==en&&R.length==O)return R;(_=R.prop(le.lookAhead))&&(k=B[H]+R.length+_)}return C(en,ln,B,O,k)}}function d(en,ln,B,O,k,H,R,_){let Z=[],nn=[];for(;en.length>O;)Z.push(en.pop()),nn.push(ln.pop()+B-k);en.push(C(l.types[R],Z,nn,H-k,_-H)),ln.push(k-B)}function C(en,ln,B,O,k=0,H){if(o){let R=[le.contextHash,o];H=H?[R].concat(H):[R]}if(k>25){let R=[le.lookAhead,k];H=H?[R].concat(H):[R]}return new lr(en,ln,B,O,H)}function I(en,ln){let B=s.fork(),O=0,k=0,H=0,R=B.end-r,_={size:0,start:0,skip:0};n:for(let Z=B.pos-en;B.pos>Z;){let nn=B.size;if(B.id==ln&&nn>=0){_.size=O,_.start=k,_.skip=H,H+=4,O+=4,B.next();continue}let tn=B.pos-nn;if(nn<0||tn=i?4:0,hn=B.start;for(B.next();B.pos>tn;){if(B.size<0)if(B.size==-3)sn+=4;else break n;else B.id>=i&&(sn+=4);B.next()}k=hn,O+=nn,H+=sn}return(ln<0||O==en)&&(_.size=O,_.start=k,_.skip=H),_.size>4?_:void 0}function T(en,ln,B){let{id:O,start:k,end:H,size:R}=s;if(s.next(),R>=0&&O4){let Z=s.pos-(R-4);for(;s.pos>Z;)B=T(en,ln,B)}ln[--B]=_,ln[--B]=H-en,ln[--B]=k-en,ln[--B]=O}else R==-3?o=O:R==-4&&(h=O);return B}let $=[],G=[];for(;s.pos>0;)c(t.start||0,t.bufferStart||0,$,G,-1);let b=(n=t.length)!==null&&n!==void 0?n:$.length?G[0]+$[0].length:0;return new lr(a[t.topID],$.reverse(),G.reverse(),b)}const dM=new WeakMap;function Dv(t,n){if(!t.isAnonymous||n instanceof gg||n.type!=t)return 1;let e=dM.get(n);if(e==null){e=1;for(let l of n.children){if(l.type!=t||!(l instanceof lr)){e=1;break}e+=Dv(t,l)}dM.set(n,e)}return e}function sP(t,n,e,l,r,u,i,s,a){let o=0;for(let C=l;C=h)break;B+=O}if(b==en+1){if(B>h){let O=C[en];d(O.children,O.positions,0,O.children.length,I[en]+G);continue}c.push(C[en])}else{let O=I[b-1]+C[b-1].length-ln;c.push(sP(t,C,I,en,b,ln,O,null,a))}f.push(ln+G-u)}}return d(n,e,l,r,0),(s||a)(c,f,i)}class mf{constructor(n,e,l,r,u=!1,i=!1){this.from=n,this.to=e,this.tree=l,this.offset=r,this.open=(u?1:0)|(i?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(n,e=[],l=!1){let r=[new mf(0,n.length,n,0,!1,l)];for(let u of e)u.to>n.length&&r.push(u);return r}static applyChanges(n,e,l=128){if(!e.length)return n;let r=[],u=1,i=n.length?n[0]:null;for(let s=0,a=0,o=0;;s++){let h=s=l)for(;i&&i.from=f.from||c<=f.to||o){let d=Math.max(f.from,a)-o,C=Math.min(f.to,c)-o;f=d>=C?null:new mf(d,C,f.tree,f.offset+o,s>0,!!h)}if(f&&r.push(f),i.to>c)break;i=unew kj(r.from,r.to)):[new kj(0,0)]:[new kj(0,n.length)],this.createParse(n,e||[],l)}parse(n,e,l){let r=this.startParse(n,e,l);for(;;){let u=r.advance();if(u)return u}}}class CX{constructor(n){this.string=n}get length(){return this.string.length}chunk(n){return this.string.slice(n)}get lineChunks(){return!1}read(n,e){return this.string.slice(n,e)}}new le({perNode:!0});let AX=0;class Hs{constructor(n,e,l){this.set=n,this.base=e,this.modified=l,this.id=AX++}static define(n){if(n!=null&&n.base)throw new Error("Can not derive from a modified tag");let e=new Hs([],null,[]);if(e.set.push(e),n)for(let l of n.set)e.set.push(l);return e}static defineModifier(){let n=new d2;return e=>e.modified.indexOf(n)>-1?e:d2.get(e.base||e,e.modified.concat(n).sort((l,r)=>l.id-r.id))}}let EX=0;class d2{constructor(){this.instances=[],this.id=EX++}static get(n,e){if(!e.length)return n;let l=e[0].instances.find(s=>s.base==n&&RX(e,s.modified));if(l)return l;let r=[],u=new Hs(r,n,e);for(let s of e)s.instances.push(u);let i=PX(e);for(let s of n.set)if(!s.modified.length)for(let a of i)r.push(d2.get(s,a));return u}}function RX(t,n){return t.length==n.length&&t.every((e,l)=>e==n[l])}function PX(t){let n=[[]];for(let e=0;el.length-e.length)}function xV(t){let n=Object.create(null);for(let e in t){let l=t[e];Array.isArray(l)||(l=[l]);for(let r of e.split(" "))if(r){let u=[],i=2,s=r;for(let c=0;;){if(s=="..."&&c>0&&c+3==r.length){i=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+r);if(u.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),c+=f[0].length,c==r.length)break;let d=r[c++];if(c==r.length&&d=="!"){i=0;break}if(d!="/")throw new RangeError("Invalid path: "+r);s=r.slice(c)}let a=u.length-1,o=u[a];if(!o)throw new RangeError("Invalid path: "+r);let h=new p2(l,i,a>0?u.slice(0,a):null);n[o]=h.sort(n[o])}}return kV.add(n)}const kV=new le;class p2{constructor(n,e,l,r){this.tags=n,this.mode=e,this.context=l,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(n){return!n||n.depth{let i=r;for(let s of u)for(let a of s.set){let o=e[a.id];if(o){i=i?i+" "+o:o;break}}return i},scope:l}}function IX(t,n){let e=null;for(let l of t){let r=l.style(n);r&&(e=e?e+" "+r:r)}return e}function _X(t,n,e,l=0,r=t.length){let u=new TX(l,Array.isArray(n)?n:[n],e);u.highlightRange(t.cursor(),l,r,"",u.highlighters),u.flush(r)}class TX{constructor(n,e,l){this.at=n,this.highlighters=e,this.span=l,this.class=""}startSpan(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}flush(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}highlightRange(n,e,l,r,u){let{type:i,from:s,to:a}=n;if(s>=l||a<=e)return;i.isTop&&(u=this.highlighters.filter(d=>!d.scope||d.scope(i)));let o=r,h=DX(n)||p2.empty,c=IX(u,h.tags);if(c&&(o&&(o+=" "),o+=c,h.mode==1&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(e,s),o),h.opaque)return;let f=n.tree&&n.tree.prop(le.mounted);if(f&&f.overlay){let d=n.node.enter(f.overlay[0].from+s,1),C=this.highlighters.filter(T=>!T.scope||T.scope(f.tree.type)),I=n.firstChild();for(let T=0,$=s;;T++){let G=T=b||!n.nextSibling())););if(!G||b>l)break;$=G.to+s,$>e&&(this.highlightRange(d.cursor(),Math.max(e,G.from+s),Math.min(l,$),"",C),this.startSpan(Math.min(l,$),o))}I&&n.parent()}else if(n.firstChild()){f&&(r="");do if(!(n.to<=e)){if(n.from>=l)break;this.highlightRange(n,e,l,r,u),this.startSpan(Math.min(l,n.to),o)}while(n.nextSibling());n.parent()}}}function DX(t){let n=t.type.prop(kV);for(;n&&n.context&&!t.matchContext(n.context);)n=n.next;return n||null}const Hn=Hs.define,B0=Hn(),xh=Hn(),pM=Hn(xh),vM=Hn(xh),kh=Hn(),X0=Hn(kh),Sj=Hn(kh),Xs=Hn(),bc=Hn(Xs),Js=Hn(),Ks=Hn(),ik=Hn(),zd=Hn(ik),F0=Hn(),Jn={comment:B0,lineComment:Hn(B0),blockComment:Hn(B0),docComment:Hn(B0),name:xh,variableName:Hn(xh),typeName:pM,tagName:Hn(pM),propertyName:vM,attributeName:Hn(vM),className:Hn(xh),labelName:Hn(xh),namespace:Hn(xh),macroName:Hn(xh),literal:kh,string:X0,docString:Hn(X0),character:Hn(X0),attributeValue:Hn(X0),number:Sj,integer:Hn(Sj),float:Hn(Sj),bool:Hn(kh),regexp:Hn(kh),escape:Hn(kh),color:Hn(kh),url:Hn(kh),keyword:Js,self:Hn(Js),null:Hn(Js),atom:Hn(Js),unit:Hn(Js),modifier:Hn(Js),operatorKeyword:Hn(Js),controlKeyword:Hn(Js),definitionKeyword:Hn(Js),moduleKeyword:Hn(Js),operator:Ks,derefOperator:Hn(Ks),arithmeticOperator:Hn(Ks),logicOperator:Hn(Ks),bitwiseOperator:Hn(Ks),compareOperator:Hn(Ks),updateOperator:Hn(Ks),definitionOperator:Hn(Ks),typeOperator:Hn(Ks),controlOperator:Hn(Ks),punctuation:ik,separator:Hn(ik),bracket:zd,angleBracket:Hn(zd),squareBracket:Hn(zd),paren:Hn(zd),brace:Hn(zd),content:Xs,heading:bc,heading1:Hn(bc),heading2:Hn(bc),heading3:Hn(bc),heading4:Hn(bc),heading5:Hn(bc),heading6:Hn(bc),contentSeparator:Hn(Xs),list:Hn(Xs),quote:Hn(Xs),emphasis:Hn(Xs),strong:Hn(Xs),link:Hn(Xs),monospace:Hn(Xs),strikethrough:Hn(Xs),inserted:Hn(),deleted:Hn(),changed:Hn(),invalid:Hn(),meta:F0,documentMeta:Hn(F0),annotation:Hn(F0),processingInstruction:Hn(F0),definition:Hs.defineModifier(),constant:Hs.defineModifier(),function:Hs.defineModifier(),standard:Hs.defineModifier(),local:Hs.defineModifier(),special:Hs.defineModifier()};SV([{tag:Jn.link,class:"tok-link"},{tag:Jn.heading,class:"tok-heading"},{tag:Jn.emphasis,class:"tok-emphasis"},{tag:Jn.strong,class:"tok-strong"},{tag:Jn.keyword,class:"tok-keyword"},{tag:Jn.atom,class:"tok-atom"},{tag:Jn.bool,class:"tok-bool"},{tag:Jn.url,class:"tok-url"},{tag:Jn.labelName,class:"tok-labelName"},{tag:Jn.inserted,class:"tok-inserted"},{tag:Jn.deleted,class:"tok-deleted"},{tag:Jn.literal,class:"tok-literal"},{tag:Jn.string,class:"tok-string"},{tag:Jn.number,class:"tok-number"},{tag:[Jn.regexp,Jn.escape,Jn.special(Jn.string)],class:"tok-string2"},{tag:Jn.variableName,class:"tok-variableName"},{tag:Jn.local(Jn.variableName),class:"tok-variableName tok-local"},{tag:Jn.definition(Jn.variableName),class:"tok-variableName tok-definition"},{tag:Jn.special(Jn.variableName),class:"tok-variableName2"},{tag:Jn.definition(Jn.propertyName),class:"tok-propertyName tok-definition"},{tag:Jn.typeName,class:"tok-typeName"},{tag:Jn.namespace,class:"tok-namespace"},{tag:Jn.className,class:"tok-className"},{tag:Jn.macroName,class:"tok-macroName"},{tag:Jn.propertyName,class:"tok-propertyName"},{tag:Jn.operator,class:"tok-operator"},{tag:Jn.comment,class:"tok-comment"},{tag:Jn.meta,class:"tok-meta"},{tag:Jn.invalid,class:"tok-invalid"},{tag:Jn.punctuation,class:"tok-punctuation"}]);var Oj;const fm=new le;function MX(t){return dt.define({combine:t?n=>n.concat(t):void 0})}const $X=new le;class Os{constructor(n,e,l=[],r=""){this.data=n,this.name=r,Oe.prototype.hasOwnProperty("tree")||Object.defineProperty(Oe.prototype,"tree",{get(){return xr(this)}}),this.parser=e,this.extension=[Xh.of(this),Oe.languageData.of((u,i,s)=>{let a=yM(u,i,s),o=a.type.prop(fm);if(!o)return[];let h=u.facet(o),c=a.type.prop($X);if(c){let f=a.resolve(i-a.from,s);for(let d of c)if(d.test(f,u)){let C=u.facet(d.facet);return d.type=="replace"?C:C.concat(h)}}return h})].concat(l)}isActiveAt(n,e,l=-1){return yM(n,e,l).type.prop(fm)==this.data}findRegions(n){let e=n.facet(Xh);if((e==null?void 0:e.data)==this.data)return[{from:0,to:n.doc.length}];if(!e||!e.allowsNesting)return[];let l=[],r=(u,i)=>{if(u.prop(fm)==this.data){l.push({from:i,to:i+u.length});return}let s=u.prop(le.mounted);if(s){if(s.tree.prop(fm)==this.data){if(s.overlay)for(let a of s.overlay)l.push({from:a.from+i,to:a.to+i});else l.push({from:i,to:i+u.length});return}else if(s.overlay){let a=l.length;if(r(s.tree,s.overlay[0].from+i),l.length>a)return}}for(let a=0;al.isTop?e:void 0)]}),n.name)}configure(n,e){return new v2(this.data,this.parser.configure(n),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function xr(t){let n=t.field(Os.state,!1);return n?n.tree:lr.empty}class NX{constructor(n){this.doc=n,this.cursorPos=0,this.string="",this.cursor=n.iter()}get length(){return this.doc.length}syncTo(n){return this.string=this.cursor.next(n-this.cursorPos).value,this.cursorPos=n+this.string.length,this.cursorPos-this.string.length}chunk(n){return this.syncTo(n),this.string}get lineChunks(){return!0}read(n,e){let l=this.cursorPos-this.string.length;return n=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-l,e-l)}}let Ud=null;class y2{constructor(n,e,l=[],r,u,i,s,a){this.parser=n,this.state=e,this.fragments=l,this.tree=r,this.treeLen=u,this.viewport=i,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(n,e,l){return new y2(n,e,[],lr.empty,0,l,[],null)}startParse(){return this.parser.startParse(new NX(this.state.doc),this.fragments)}work(n,e){return e!=null&&e>=this.state.doc.length&&(e=void 0),this.tree!=lr.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var l;if(typeof n=="number"){let r=Date.now()+n;n=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),e!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&e=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(mf.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(n){let e=Ud;Ud=this;try{return n()}finally{Ud=e}}withoutTempSkipped(n){for(let e;e=this.tempSkipped.pop();)n=jM(n,e.from,e.to);return n}changes(n,e){let{fragments:l,tree:r,treeLen:u,viewport:i,skipped:s}=this;if(this.takeTree(),!n.empty){let a=[];if(n.iterChangedRanges((o,h,c,f)=>a.push({fromA:o,toA:h,fromB:c,toB:f})),l=mf.applyChanges(l,a),r=lr.empty,u=0,i={from:n.mapPos(i.from,-1),to:n.mapPos(i.to,1)},this.skipped.length){s=[];for(let o of this.skipped){let h=n.mapPos(o.from,1),c=n.mapPos(o.to,-1);hn.from&&(this.fragments=jM(this.fragments,r,u),this.skipped.splice(l--,1))}return this.skipped.length>=e?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(n,e){this.skipped.push({from:n,to:e})}static getSkippingParser(n){return new class extends jV{createParse(e,l,r){let u=r[0].from,i=r[r.length-1].to;return{parsedPos:u,advance(){let a=Ud;if(a){for(let o of r)a.tempSkipped.push(o);n&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,n]):n)}return this.parsedPos=i,new lr(ti.none,[],[],i-u)},stoppedAt:null,stopAt(){}}}}}isDone(n){n=Math.min(n,this.state.doc.length);let e=this.fragments;return this.treeLen>=n&&e.length&&e[0].from==0&&e[0].to>=n}static get(){return Ud}}function jM(t,n,e){return mf.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}class lw{constructor(n){this.context=n,this.tree=n.tree}apply(n){if(!n.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(n.changes,n.state),l=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,l)||e.takeTree(),new lw(e)}static init(n){let e=Math.min(3e3,n.doc.length),l=y2.create(n.facet(Xh).parser,n,{from:0,to:e});return l.work(20,e)||l.takeTree(),new lw(l)}}Os.state=eu.define({create:lw.init,update(t,n){for(let e of n.effects)if(e.is(Os.setState))return e.value;return n.startState.facet(Xh)!=n.state.facet(Xh)?lw.init(n.state):t.apply(n)}});let OV=t=>{let n=setTimeout(()=>t(),500);return()=>clearTimeout(n)};typeof requestIdleCallback<"u"&&(OV=t=>{let n=-1,e=setTimeout(()=>{n=requestIdleCallback(t,{timeout:500-100})},100);return()=>n<0?clearTimeout(e):cancelIdleCallback(n)});const Cj=typeof navigator<"u"&&(!((Oj=navigator.scheduling)===null||Oj===void 0)&&Oj.isInputPending)?()=>navigator.scheduling.isInputPending():null,qX=Or.fromClass(class{constructor(n){this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(n){let e=this.view.state.field(Os.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:n}=this.view,e=n.field(Os.state);(e.tree!=e.context.tree||!e.context.isDone(n.doc.length))&&(this.working=OV(this.work))}work(n){this.working=null;let e=Date.now();if(this.chunkEndr+1e3,a=u.context.work(()=>Cj&&Cj()||Date.now()>i,r+(s?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(u.context.takeTree(),this.view.dispatch({effects:Os.setState.of(new lw(u.context))})),this.chunkBudget>0&&!(a&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(u.context)}checkAsyncSchedule(n){n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(()=>this.scheduleWork()).catch(e=>bi(this.view.state,e)).then(()=>this.workScheduled--),n.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Xh=dt.define({combine(t){return t.length?t[0]:null},enables:t=>[Os.state,qX,kt.contentAttributes.compute([t],n=>{let e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]});class LX{constructor(n,e=[]){this.language=n,this.support=e,this.extension=[n,e]}}const WX=dt.define(),oP=dt.define({combine:t=>{if(!t.length)return" ";let n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(e=>e!=n[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function j2(t){let n=t.facet(oP);return n.charCodeAt(0)==9?t.tabSize*n.length:n.length}function $1(t,n){let e="",l=t.tabSize,r=t.facet(oP)[0];if(r==" "){for(;n>=l;)e+=" ",n-=l;r=" "}for(let u=0;u=l.from&&r<=l.to?u&&r==n?{text:"",from:n}:(e<0?r-1&&(u+=i-this.countColumn(l,l.search(/\S|$/))),u}countColumn(n,e=n.length){return Ip(n,this.state.tabSize,e)}lineIndent(n,e=1){let{text:l,from:r}=this.lineAt(n,e),u=this.options.overrideIndentation;if(u){let i=u(r);if(i>-1)return i}return this.countColumn(l,l.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const CV=new le;function VX(t,n,e){return AV(n.resolveInner(e).enterUnfinishedNodesBefore(e),e,t)}function zX(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function UX(t){let n=t.type.prop(CV);if(n)return n;let e=t.firstChild,l;if(e&&(l=e.type.prop(le.closedBy))){let r=t.lastChild,u=r&&l.indexOf(r.name)>-1;return i=>JX(i,!0,1,void 0,u&&!zX(i)?r.from:void 0)}return t.parent==null?YX:null}function AV(t,n,e){for(;t;t=t.parent){let l=UX(t);if(l)return l(hP.create(e,n,t))}return null}function YX(){return 0}class hP extends d5{constructor(n,e,l){super(n.state,n.options),this.base=n,this.pos=e,this.node=l}static create(n,e,l){return new hP(n,e,l)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(n){let e=this.state.doc.lineAt(n.from);for(;;){let l=n.resolve(e.from);for(;l.parent&&l.parent.from==l.from;)l=l.parent;if(QX(l,n))break;e=this.state.doc.lineAt(l.from)}return this.lineIndent(e.from)}continue(){let n=this.node.parent;return n?AV(n,this.pos,this.base):0}}function QX(t,n){for(let e=n;e;e=e.parent)if(t==e)return!0;return!1}function GX(t){let n=t.node,e=n.childAfter(n.from),l=n.lastChild;if(!e)return null;let r=t.options.simulateBreak,u=t.state.doc.lineAt(e.from),i=r==null||r<=u.from?u.to:Math.min(u.to,r);for(let s=e.to;;){let a=n.childAfter(s);if(!a||a==l)return null;if(!a.type.isSkipped)return a.from{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let n=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!n.length)return t;let e=t.newDoc,{head:l}=t.newSelection.main,r=e.lineAt(l);if(l>r.from+KX)return t;let u=e.sliceString(r.from,l);if(!n.some(o=>o.test(u)))return t;let{state:i}=t,s=-1,a=[];for(let{head:o}of i.selection.ranges){let h=i.doc.lineAt(o);if(h.from==s)continue;s=h.from;let c=aP(i,h.from);if(c==null)continue;let f=/^\s*/.exec(h.text)[0],d=$1(i,c);f!=d&&a.push({from:h.from,to:h.from+f.length,insert:d})}return a.length?[t,{changes:a,sequential:!0}]:t})}const XX=dt.define(),EV=new le;function FX(t){let n=t.firstChild,e=t.lastChild;return n&&n.toe)continue;if(u&&i.from=n&&a.to>e&&(u=a)}}return u}function ZX(t){let n=t.lastChild;return n&&n.to==t.to&&n.type.isError}function x2(t,n,e){for(let l of t.facet(XX)){let r=l(t,n,e);if(r)return r}return HX(t,n,e)}function RV(t,n){let e=n.mapPos(t.from,1),l=n.mapPos(t.to,-1);return e>=l?void 0:{from:e,to:l}}const p5=ee.define({map:RV}),Dp=ee.define({map:RV});function PV(t){let n=[];for(let{head:e}of t.state.selection.ranges)n.some(l=>l.from<=e&&l.to>=e)||n.push(t.lineBlockAt(e));return n}const If=eu.define({create(){return Tt.none},update(t,n){t=t.map(n.changes);for(let e of n.effects)e.is(p5)&&!bX(t,e.value.from,e.value.to)?t=t.update({add:[xM.range(e.value.from,e.value.to)]}):e.is(Dp)&&(t=t.update({filter:(l,r)=>e.value.from!=l||e.value.to!=r,filterFrom:e.value.from,filterTo:e.value.to}));if(n.selection){let e=!1,{head:l}=n.selection.main;t.between(l,l,(r,u)=>{rl&&(e=!0)}),e&&(t=t.update({filterFrom:l,filterTo:l,filter:(r,u)=>u<=l||r>=l}))}return t},provide:t=>kt.decorations.from(t),toJSON(t,n){let e=[];return t.between(0,n.doc.length,(l,r)=>{e.push(l,r)}),e},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let n=[];for(let e=0;e{(!r||r.from>u)&&(r={from:u,to:i})}),r}function bX(t,n,e){let l=!1;return t.between(n,n,(r,u)=>{r==n&&u==e&&(l=!0)}),l}function IV(t,n){return t.field(If,!1)?n:n.concat(ee.appendConfig.of(DV()))}const nF=t=>{for(let n of PV(t)){let e=x2(t.state,n.from,n.to);if(e)return t.dispatch({effects:IV(t.state,[p5.of(e),_V(t,e)])}),!0}return!1},tF=t=>{if(!t.state.field(If,!1))return!1;let n=[];for(let e of PV(t)){let l=k2(t.state,e.from,e.to);l&&n.push(Dp.of(l),_V(t,l,!1))}return n.length&&t.dispatch({effects:n}),n.length>0};function _V(t,n,e=!0){let l=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return kt.announce.of(`${t.state.phrase(e?"Folded lines":"Unfolded lines")} ${l} ${t.state.phrase("to")} ${r}.`)}const eF=t=>{let{state:n}=t,e=[];for(let l=0;l{let n=t.state.field(If,!1);if(!n||!n.size)return!1;let e=[];return n.between(0,t.state.doc.length,(l,r)=>{e.push(Dp.of({from:l,to:r}))}),t.dispatch({effects:e}),!0},rF=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:nF},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:tF},{key:"Ctrl-Alt-[",run:eF},{key:"Ctrl-Alt-]",run:lF}],uF={placeholderDOM:null,placeholderText:"…"},TV=dt.define({combine(t){return Wo(t,uF)}});function DV(t){let n=[If,oF];return t&&n.push(TV.of(t)),n}const xM=Tt.replace({widget:new class extends Ic{toDOM(t){let{state:n}=t,e=n.facet(TV),l=u=>{let i=t.lineBlockAt(t.posAtDOM(u.target)),s=k2(t.state,i.from,i.to);s&&t.dispatch({effects:Dp.of(s)}),u.preventDefault()};if(e.placeholderDOM)return e.placeholderDOM(t,l);let r=document.createElement("span");return r.textContent=e.placeholderText,r.setAttribute("aria-label",n.phrase("folded code")),r.title=n.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=l,r}}}),iF={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Aj extends Da{constructor(n,e){super(),this.config=n,this.open=e}eq(n){return this.config==n.config&&this.open==n.open}toDOM(n){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=n.state.phrase(this.open?"Fold line":"Unfold line"),e}}function sF(t={}){let n=Object.assign(Object.assign({},iF),t),e=new Aj(n,!0),l=new Aj(n,!1),r=Or.fromClass(class{constructor(i){this.from=i.viewport.from,this.markers=this.buildMarkers(i)}update(i){(i.docChanged||i.viewportChanged||i.startState.facet(Xh)!=i.state.facet(Xh)||i.startState.field(If,!1)!=i.state.field(If,!1)||xr(i.startState)!=xr(i.state)||n.foldingChanged(i))&&(this.markers=this.buildMarkers(i.view))}buildMarkers(i){let s=new Qh;for(let a of i.viewportLineBlocks){let o=k2(i.state,a.from,a.to)?l:x2(i.state,a.from,a.to)?e:null;o&&s.add(a.from,a.from,o)}return s.finish()}}),{domEventHandlers:u}=n;return[r,cX({class:"cm-foldGutter",markers(i){var s;return((s=i.plugin(r))===null||s===void 0?void 0:s.markers)||We.empty},initialSpacer(){return new Aj(n,!1)},domEventHandlers:Object.assign(Object.assign({},u),{click:(i,s,a)=>{if(u.click&&u.click(i,s,a))return!0;let o=k2(i.state,s.from,s.to);if(o)return i.dispatch({effects:Dp.of(o)}),!0;let h=x2(i.state,s.from,s.to);return h?(i.dispatch({effects:p5.of(h)}),!0):!1}})}),DV()]}const oF=kt.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 v5{constructor(n,e){this.specs=n;let l;function r(s){let a=Gh.newName();return(l||(l=Object.create(null)))["."+a]=s,a}const u=typeof e.all=="string"?e.all:e.all?r(e.all):void 0,i=e.scope;this.scope=i instanceof Os?s=>s.prop(fm)==i.data:i?s=>s==i:void 0,this.style=SV(n.map(s=>({tag:s.tag,class:s.class||r(Object.assign({},s,{tag:null}))})),{all:u}).style,this.module=l?new Gh(l):null,this.themeType=e.themeType}static define(n,e){return new v5(n,e||{})}}const sk=dt.define(),MV=dt.define({combine(t){return t.length?[t[0]]:null}});function Ej(t){let n=t.facet(sk);return n.length?n:t.facet(MV)}function aF(t,n){let e=[cF],l;return t instanceof v5&&(t.module&&e.push(kt.styleModule.of(t.module)),l=t.themeType),n!=null&&n.fallback?e.push(MV.of(t)):l?e.push(sk.computeN([kt.darkTheme],r=>r.facet(kt.darkTheme)==(l=="dark")?[t]:[])):e.push(sk.of(t)),e}class hF{constructor(n){this.markCache=Object.create(null),this.tree=xr(n.state),this.decorations=this.buildDeco(n,Ej(n.state))}update(n){let e=xr(n.state),l=Ej(n.state),r=l!=Ej(n.startState);e.length{l.add(i,s,this.markCache[a]||(this.markCache[a]=Tt.mark({class:a})))},r,u);return l.finish()}}const cF=fg.high(Or.fromClass(hF,{decorations:t=>t.decorations})),fF=v5.define([{tag:Jn.meta,color:"#404740"},{tag:Jn.link,textDecoration:"underline"},{tag:Jn.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Jn.emphasis,fontStyle:"italic"},{tag:Jn.strong,fontWeight:"bold"},{tag:Jn.strikethrough,textDecoration:"line-through"},{tag:Jn.keyword,color:"#708"},{tag:[Jn.atom,Jn.bool,Jn.url,Jn.contentSeparator,Jn.labelName],color:"#219"},{tag:[Jn.literal,Jn.inserted],color:"#164"},{tag:[Jn.string,Jn.deleted],color:"#a11"},{tag:[Jn.regexp,Jn.escape,Jn.special(Jn.string)],color:"#e40"},{tag:Jn.definition(Jn.variableName),color:"#00f"},{tag:Jn.local(Jn.variableName),color:"#30a"},{tag:[Jn.typeName,Jn.namespace],color:"#085"},{tag:Jn.className,color:"#167"},{tag:[Jn.special(Jn.variableName),Jn.macroName],color:"#256"},{tag:Jn.definition(Jn.propertyName),color:"#00c"},{tag:Jn.comment,color:"#940"},{tag:Jn.invalid,color:"#f00"}]),gF=kt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),$V=1e4,NV="()[]{}",qV=dt.define({combine(t){return Wo(t,{afterCursor:!0,brackets:NV,maxScanDistance:$V,renderMatch:dF})}}),mF=Tt.mark({class:"cm-matchingBracket"}),wF=Tt.mark({class:"cm-nonmatchingBracket"});function dF(t){let n=[],e=t.matched?mF:wF;return n.push(e.range(t.start.from,t.start.to)),t.end&&n.push(e.range(t.end.from,t.end.to)),n}const pF=eu.define({create(){return Tt.none},update(t,n){if(!n.docChanged&&!n.selection)return t;let e=[],l=n.state.facet(qV);for(let r of n.state.selection.ranges){if(!r.empty)continue;let u=uo(n.state,r.head,-1,l)||r.head>0&&uo(n.state,r.head-1,1,l)||l.afterCursor&&(uo(n.state,r.head,1,l)||r.headkt.decorations.from(t)}),vF=[pF,gF];function yF(t={}){return[qV.of(t),vF]}const jF=new le;function ok(t,n,e){let l=t.prop(n<0?le.openedBy:le.closedBy);if(l)return l;if(t.name.length==1){let r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function ak(t){let n=t.type.prop(jF);return n?n(t.node):t}function uo(t,n,e,l={}){let r=l.maxScanDistance||$V,u=l.brackets||NV,i=xr(t),s=i.resolveInner(n,e);for(let a=s;a;a=a.parent){let o=ok(a.type,e,u);if(o&&a.from0?n>=h.from&&nh.from&&n<=h.to))return xF(t,n,e,a,h,o,u)}}return kF(t,n,e,i,s.type,r,u)}function xF(t,n,e,l,r,u,i){let s=l.parent,a={from:r.from,to:r.to},o=0,h=s==null?void 0:s.cursor();if(h&&(e<0?h.childBefore(l.from):h.childAfter(l.to)))do if(e<0?h.to<=l.from:h.from>=l.to){if(o==0&&u.indexOf(h.type.name)>-1&&h.from0)return null;let o={from:e<0?n-1:n,to:e>0?n+1:n},h=t.doc.iterRange(n,e>0?t.doc.length:0),c=0;for(let f=0;!h.next().done&&f<=u;){let d=h.value;e<0&&(f+=d.length);let C=n+f*e;for(let I=e>0?0:d.length-1,T=e>0?d.length:-1;I!=T;I+=e){let $=i.indexOf(d[I]);if(!($<0||l.resolveInner(C+I,1).type!=r))if($%2==0==e>0)c++;else{if(c==1)return{start:o,end:{from:C+I,to:C+I+1},matched:$>>1==a>>1};c--}}e>0&&(f+=d.length)}return h.done?{start:o,matched:!1}:null}const SF=Object.create(null),kM=[ti.none],SM=[],OF=Object.create(null);for(let[t,n]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"]])OF[t]=CF(SF,n);function Rj(t,n){SM.indexOf(t)>-1||(SM.push(t),console.warn(n))}function CF(t,n){let e=null;for(let u of n.split(".")){let i=t[u]||Jn[u];i?typeof i=="function"?e?e=i(e):Rj(u,`Modifier ${u} used at start of tag`):e?Rj(u,`Tag ${u} used as modifier`):e=i:Rj(u,`Unknown highlighting tag ${u}`)}if(!e)return 0;let l=n.replace(/ /g,"_"),r=ti.define({id:kM.length,name:l,props:[xV({[l]:e})]});return kM.push(r),r.id}const AF=t=>{let{state:n}=t,e=n.doc.lineAt(n.selection.main.from),l=fP(t.state,e.from);return l.line?EF(t):l.block?PF(t):!1};function cP(t,n){return({state:e,dispatch:l})=>{if(e.readOnly)return!1;let r=t(n,e);return r?(l(e.update(r)),!0):!1}}const EF=cP(TF,0),RF=cP(LV,0),PF=cP((t,n)=>LV(t,n,_F(n)),0);function fP(t,n){let e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}const Yd=50;function IF(t,{open:n,close:e},l,r){let u=t.sliceDoc(l-Yd,l),i=t.sliceDoc(r,r+Yd),s=/\s*$/.exec(u)[0].length,a=/^\s*/.exec(i)[0].length,o=u.length-s;if(u.slice(o-n.length,o)==n&&i.slice(a,a+e.length)==e)return{open:{pos:l-s,margin:s&&1},close:{pos:r+a,margin:a&&1}};let h,c;r-l<=2*Yd?h=c=t.sliceDoc(l,r):(h=t.sliceDoc(l,l+Yd),c=t.sliceDoc(r-Yd,r));let f=/^\s*/.exec(h)[0].length,d=/\s*$/.exec(c)[0].length,C=c.length-d-e.length;return h.slice(f,f+n.length)==n&&c.slice(C,C+e.length)==e?{open:{pos:l+f+n.length,margin:/\s/.test(h.charAt(f+n.length))?1:0},close:{pos:r-d-e.length,margin:/\s/.test(c.charAt(C-1))?1:0}}:null}function _F(t){let n=[];for(let e of t.selection.ranges){let l=t.doc.lineAt(e.from),r=e.to<=l.to?l:t.doc.lineAt(e.to),u=n.length-1;u>=0&&n[u].to>l.from?n[u].to=r.to:n.push({from:l.from+/^\s*/.exec(l.text)[0].length,to:r.to})}return n}function LV(t,n,e=n.selection.ranges){let l=e.map(u=>fP(n,u.from).block);if(!l.every(u=>u))return null;let r=e.map((u,i)=>IF(n,l[i],u.from,u.to));if(t!=2&&!r.every(u=>u))return{changes:n.changes(e.map((u,i)=>r[i]?[]:[{from:u.from,insert:l[i].open+" "},{from:u.to,insert:" "+l[i].close}]))};if(t!=1&&r.some(u=>u)){let u=[];for(let i=0,s;ir&&(u==i||i>c.from)){r=c.from;let f=/^\s*/.exec(c.text)[0].length,d=f==c.length,C=c.text.slice(f,f+o.length)==o?f:-1;fu.comment<0&&(!u.empty||u.single))){let u=[];for(let{line:s,token:a,indent:o,empty:h,single:c}of l)(c||!h)&&u.push({from:s.from+o,insert:a+" "});let i=n.changes(u);return{changes:i,selection:n.selection.map(i,1)}}else if(t!=1&&l.some(u=>u.comment>=0)){let u=[];for(let{line:i,comment:s,token:a}of l)if(s>=0){let o=i.from+s,h=o+a.length;i.text[h-i.from]==" "&&h++,u.push({from:o,to:h})}return{changes:u}}return null}const hk=eh.define(),DF=eh.define(),MF=dt.define(),WV=dt.define({combine(t){return Wo(t,{minDepth:100,newGroupDelay:500,joinToEvent:(n,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(n,e)=>(l,r)=>n(l,r)||e(l,r)})}});function $F(t){let n=0;return t.iterChangedRanges((e,l)=>n=l),n}const VV=eu.define({create(){return io.empty},update(t,n){let e=n.state.facet(WV),l=n.annotation(hk);if(l){let a=n.docChanged?Tn.single($F(n.changes)):void 0,o=Bu.fromTransaction(n,a),h=l.side,c=h==0?t.undone:t.done;return o?c=S2(c,c.length,e.minDepth,o):c=YV(c,n.startState.selection),new io(h==0?l.rest:c,h==0?c:l.rest)}let r=n.annotation(DF);if((r=="full"||r=="before")&&(t=t.isolate()),n.annotation(yr.addToHistory)===!1)return n.changes.empty?t:t.addMapping(n.changes.desc);let u=Bu.fromTransaction(n),i=n.annotation(yr.time),s=n.annotation(yr.userEvent);return u?t=t.addChanges(u,i,s,e,n):n.selection&&(t=t.addSelection(n.startState.selection,i,s,e.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(n=>n.toJSON()),undone:t.undone.map(n=>n.toJSON())}},fromJSON(t){return new io(t.done.map(Bu.fromJSON),t.undone.map(Bu.fromJSON))}});function NF(t={}){return[VV,WV.of(t),kt.domEventHandlers({beforeinput(n,e){let l=n.inputType=="historyUndo"?zV:n.inputType=="historyRedo"?ck:null;return l?(n.preventDefault(),l(e)):!1}})]}function y5(t,n){return function({state:e,dispatch:l}){if(!n&&e.readOnly)return!1;let r=e.field(VV,!1);if(!r)return!1;let u=r.pop(t,e,n);return u?(l(u),!0):!1}}const zV=y5(0,!1),ck=y5(1,!1),qF=y5(0,!0),LF=y5(1,!0);class Bu{constructor(n,e,l,r,u){this.changes=n,this.effects=e,this.mapped=l,this.startSelection=r,this.selectionsAfter=u}setSelAfter(n){return new Bu(this.changes,this.effects,this.mapped,this.startSelection,n)}toJSON(){var n,e,l;return{changes:(n=this.changes)===null||n===void 0?void 0:n.toJSON(),mapped:(e=this.mapped)===null||e===void 0?void 0:e.toJSON(),startSelection:(l=this.startSelection)===null||l===void 0?void 0:l.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(n){return new Bu(n.changes&&pr.fromJSON(n.changes),[],n.mapped&&fo.fromJSON(n.mapped),n.startSelection&&Tn.fromJSON(n.startSelection),n.selectionsAfter.map(Tn.fromJSON))}static fromTransaction(n,e){let l=Fi;for(let r of n.startState.facet(MF)){let u=r(n);u.length&&(l=l.concat(u))}return!l.length&&n.changes.empty?null:new Bu(n.changes.invert(n.startState.doc),l,void 0,e||n.startState.selection,Fi)}static selection(n){return new Bu(void 0,Fi,void 0,void 0,n)}}function S2(t,n,e,l){let r=n+1>e+20?n-e-1:0,u=t.slice(r,n);return u.push(l),u}function WF(t,n){let e=[],l=!1;return t.iterChangedRanges((r,u)=>e.push(r,u)),n.iterChangedRanges((r,u,i,s)=>{for(let a=0;a=o&&i<=h&&(l=!0)}}),l}function VF(t,n){return t.ranges.length==n.ranges.length&&t.ranges.filter((e,l)=>e.empty!=n.ranges[l].empty).length===0}function UV(t,n){return t.length?n.length?t.concat(n):t:n}const Fi=[],zF=200;function YV(t,n){if(t.length){let e=t[t.length-1],l=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-zF));return l.length&&l[l.length-1].eq(n)?t:(l.push(n),S2(t,t.length-1,1e9,e.setSelAfter(l)))}else return[Bu.selection([n])]}function UF(t){let n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function Pj(t,n){if(!t.length)return t;let e=t.length,l=Fi;for(;e;){let r=YF(t[e-1],n,l);if(r.changes&&!r.changes.empty||r.effects.length){let u=t.slice(0,e);return u[e-1]=r,u}else n=r.mapped,e--,l=r.selectionsAfter}return l.length?[Bu.selection(l)]:Fi}function YF(t,n,e){let l=UV(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(n)):Fi,e);if(!t.changes)return Bu.selection(l);let r=t.changes.map(n),u=n.mapDesc(t.changes,!0),i=t.mapped?t.mapped.composeDesc(u):u;return new Bu(r,ee.mapEffects(t.effects,n),i,t.startSelection.map(u),l)}const QF=/^(input\.type|delete)($|\.)/;class io{constructor(n,e,l=0,r=void 0){this.done=n,this.undone=e,this.prevTime=l,this.prevUserEvent=r}isolate(){return this.prevTime?new io(this.done,this.undone):this}addChanges(n,e,l,r,u){let i=this.done,s=i[i.length-1];return s&&s.changes&&!s.changes.empty&&n.changes&&(!l||QF.test(l))&&(!s.selectionsAfter.length&&e-this.prevTime0&&e-this.prevTimee.empty?t.moveByChar(e,n):j5(e,n))}function pu(t){return t.textDirectionAt(t.state.selection.main.head)==Cl.LTR}const GV=t=>QV(t,!pu(t)),JV=t=>QV(t,pu(t));function KV(t,n){return Vs(t,e=>e.empty?t.moveByGroup(e,n):j5(e,n))}const JF=t=>KV(t,!pu(t)),KF=t=>KV(t,pu(t));function BF(t,n,e){if(n.type.prop(e))return!0;let l=n.to-n.from;return l&&(l>2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function x5(t,n,e){let l=xr(t).resolveInner(n.head),r=e?le.closedBy:le.openedBy;for(let a=n.head;;){let o=e?l.childAfter(a):l.childBefore(a);if(!o)break;BF(t,o,r)?l=o:a=e?o.to:o.from}let u=l.type.prop(r),i,s;return u&&(i=e?uo(t,l.from,1):uo(t,l.to,-1))&&i.matched?s=e?i.end.to:i.end.from:s=e?l.to:l.from,Tn.cursor(s,e?-1:1)}const XF=t=>Vs(t,n=>x5(t.state,n,!pu(t))),FF=t=>Vs(t,n=>x5(t.state,n,pu(t)));function BV(t,n){return Vs(t,e=>{if(!e.empty)return j5(e,n);let l=t.moveVertically(e,n);return l.head!=e.head?l:t.moveToLineBoundary(e,n)})}const XV=t=>BV(t,!1),FV=t=>BV(t,!0);function HV(t){let n=t.scrollDOM.clientHeighti.empty?t.moveVertically(i,n,e.height):j5(i,n));if(r.eq(l.selection))return!1;let u;if(e.selfScroll){let i=t.coordsAtPos(l.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),a=s.top+e.marginTop,o=s.bottom-e.marginBottom;i&&i.top>a&&i.bottomZV(t,!1),fk=t=>ZV(t,!0);function _c(t,n,e){let l=t.lineBlockAt(n.head),r=t.moveToLineBoundary(n,e);if(r.head==n.head&&r.head!=(e?l.to:l.from)&&(r=t.moveToLineBoundary(n,e,!1)),!e&&r.head==l.from&&l.length){let u=/^\s*/.exec(t.state.sliceDoc(l.from,Math.min(l.from+100,l.to)))[0].length;u&&n.head!=l.from+u&&(r=Tn.cursor(l.from+u))}return r}const HF=t=>Vs(t,n=>_c(t,n,!0)),ZF=t=>Vs(t,n=>_c(t,n,!1)),bF=t=>Vs(t,n=>_c(t,n,!pu(t))),nH=t=>Vs(t,n=>_c(t,n,pu(t))),tH=t=>Vs(t,n=>Tn.cursor(t.lineBlockAt(n.head).from,1)),eH=t=>Vs(t,n=>Tn.cursor(t.lineBlockAt(n.head).to,-1));function lH(t,n,e){let l=!1,r=Gw(t.selection,u=>{let i=uo(t,u.head,-1)||uo(t,u.head,1)||u.head>0&&uo(t,u.head-1,1)||u.headlH(t,n,!1);function cs(t,n){let e=Gw(t.state.selection,l=>{let r=n(l);return Tn.range(l.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return e.eq(t.state.selection)?!1:(t.dispatch(Vo(t.state,e)),!0)}function bV(t,n){return cs(t,e=>t.moveByChar(e,n))}const nz=t=>bV(t,!pu(t)),tz=t=>bV(t,pu(t));function ez(t,n){return cs(t,e=>t.moveByGroup(e,n))}const uH=t=>ez(t,!pu(t)),iH=t=>ez(t,pu(t)),sH=t=>cs(t,n=>x5(t.state,n,!pu(t))),oH=t=>cs(t,n=>x5(t.state,n,pu(t)));function lz(t,n){return cs(t,e=>t.moveVertically(e,n))}const rz=t=>lz(t,!1),uz=t=>lz(t,!0);function iz(t,n){return cs(t,e=>t.moveVertically(e,n,HV(t).height))}const CM=t=>iz(t,!1),AM=t=>iz(t,!0),aH=t=>cs(t,n=>_c(t,n,!0)),hH=t=>cs(t,n=>_c(t,n,!1)),cH=t=>cs(t,n=>_c(t,n,!pu(t))),fH=t=>cs(t,n=>_c(t,n,pu(t))),gH=t=>cs(t,n=>Tn.cursor(t.lineBlockAt(n.head).from)),mH=t=>cs(t,n=>Tn.cursor(t.lineBlockAt(n.head).to)),EM=({state:t,dispatch:n})=>(n(Vo(t,{anchor:0})),!0),RM=({state:t,dispatch:n})=>(n(Vo(t,{anchor:t.doc.length})),!0),PM=({state:t,dispatch:n})=>(n(Vo(t,{anchor:t.selection.main.anchor,head:0})),!0),IM=({state:t,dispatch:n})=>(n(Vo(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),wH=({state:t,dispatch:n})=>(n(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),dH=({state:t,dispatch:n})=>{let e=S5(t).map(({from:l,to:r})=>Tn.range(l,Math.min(r+1,t.doc.length)));return n(t.update({selection:Tn.create(e),userEvent:"select"})),!0},pH=({state:t,dispatch:n})=>{let e=Gw(t.selection,l=>{var r;let u=xr(t).resolveInner(l.head,1);for(;!(u.from=l.to||u.to>l.to&&u.from<=l.from||!(!((r=u.parent)===null||r===void 0)&&r.parent));)u=u.parent;return Tn.range(u.to,u.from)});return n(Vo(t,e)),!0},vH=({state:t,dispatch:n})=>{let e=t.selection,l=null;return e.ranges.length>1?l=Tn.create([e.main]):e.main.empty||(l=Tn.create([Tn.cursor(e.main.head)])),l?(n(Vo(t,l)),!0):!1};function k5(t,n){if(t.state.readOnly)return!1;let e="delete.selection",{state:l}=t,r=l.changeByRange(u=>{let{from:i,to:s}=u;if(i==s){let a=n(i);ai&&(e="delete.forward",a=H0(t,a,!0)),i=Math.min(i,a),s=Math.max(s,a)}else i=H0(t,i,!1),s=H0(t,s,!0);return i==s?{range:u}:{changes:{from:i,to:s},range:Tn.cursor(i)}});return r.changes.empty?!1:(t.dispatch(l.update(r,{scrollIntoView:!0,userEvent:e,effects:e=="delete.selection"?kt.announce.of(l.phrase("Selection deleted")):void 0})),!0)}function H0(t,n,e){if(t instanceof kt)for(let l of t.state.facet(kt.atomicRanges).map(r=>r(t)))l.between(n,n,(r,u)=>{rn&&(n=e?u:r)});return n}const sz=(t,n)=>k5(t,e=>{let{state:l}=t,r=l.doc.lineAt(e),u,i;if(!n&&e>r.from&&esz(t,!1),oz=t=>sz(t,!0),az=(t,n)=>k5(t,e=>{let l=e,{state:r}=t,u=r.doc.lineAt(l),i=r.charCategorizer(l);for(let s=null;;){if(l==(n?u.to:u.from)){l==e&&u.number!=(n?r.doc.lines:1)&&(l+=n?1:-1);break}let a=Ou(u.text,l-u.from,n)+u.from,o=u.text.slice(Math.min(l,a)-u.from,Math.max(l,a)-u.from),h=i(o);if(s!=null&&h!=s)break;(o!=" "||l!=e)&&(s=h),l=a}return l}),hz=t=>az(t,!1),yH=t=>az(t,!0),cz=t=>k5(t,n=>{let e=t.lineBlockAt(n).to;return nk5(t,n=>{let e=t.lineBlockAt(n).from;return n>e?e:Math.max(0,n-1)}),xH=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let e=t.changeByRange(l=>({changes:{from:l.from,to:l.to,insert:Ie.of(["",""])},range:Tn.cursor(l.from)}));return n(t.update(e,{scrollIntoView:!0,userEvent:"input"})),!0},kH=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let e=t.changeByRange(l=>{if(!l.empty||l.from==0||l.from==t.doc.length)return{range:l};let r=l.from,u=t.doc.lineAt(r),i=r==u.from?r-1:Ou(u.text,r-u.from,!1)+u.from,s=r==u.to?r+1:Ou(u.text,r-u.from,!0)+u.from;return{changes:{from:i,to:s,insert:t.doc.slice(r,s).append(t.doc.slice(i,r))},range:Tn.cursor(s)}});return e.changes.empty?!1:(n(t.update(e,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function S5(t){let n=[],e=-1;for(let l of t.selection.ranges){let r=t.doc.lineAt(l.from),u=t.doc.lineAt(l.to);if(!l.empty&&l.to==u.from&&(u=t.doc.lineAt(l.to-1)),e>=r.number){let i=n[n.length-1];i.to=u.to,i.ranges.push(l)}else n.push({from:r.from,to:u.to,ranges:[l]});e=u.number+1}return n}function fz(t,n,e){if(t.readOnly)return!1;let l=[],r=[];for(let u of S5(t)){if(e?u.to==t.doc.length:u.from==0)continue;let i=t.doc.lineAt(e?u.to+1:u.from-1),s=i.length+1;if(e){l.push({from:u.to,to:i.to},{from:u.from,insert:i.text+t.lineBreak});for(let a of u.ranges)r.push(Tn.range(Math.min(t.doc.length,a.anchor+s),Math.min(t.doc.length,a.head+s)))}else{l.push({from:i.from,to:u.from},{from:u.to,insert:t.lineBreak+i.text});for(let a of u.ranges)r.push(Tn.range(a.anchor-s,a.head-s))}}return l.length?(n(t.update({changes:l,scrollIntoView:!0,selection:Tn.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const SH=({state:t,dispatch:n})=>fz(t,n,!1),OH=({state:t,dispatch:n})=>fz(t,n,!0);function gz(t,n,e){if(t.readOnly)return!1;let l=[];for(let r of S5(t))e?l.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):l.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return n(t.update({changes:l,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const CH=({state:t,dispatch:n})=>gz(t,n,!1),AH=({state:t,dispatch:n})=>gz(t,n,!0),EH=t=>{if(t.state.readOnly)return!1;let{state:n}=t,e=n.changes(S5(n).map(({from:r,to:u})=>(r>0?r--:ut.moveVertically(r,!0)).map(e);return t.dispatch({changes:e,selection:l,scrollIntoView:!0,userEvent:"delete.line"}),!0};function RH(t,n){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(n-1,n+1)))return{from:n,to:n};let e=xr(t).resolveInner(n),l=e.childBefore(n),r=e.childAfter(n),u;return l&&r&&l.to<=n&&r.from>=n&&(u=l.type.prop(le.closedBy))&&u.indexOf(r.name)>-1&&t.doc.lineAt(l.to).from==t.doc.lineAt(r.from).from?{from:l.to,to:r.from}:null}const PH=mz(!1),IH=mz(!0);function mz(t){return({state:n,dispatch:e})=>{if(n.readOnly)return!1;let l=n.changeByRange(r=>{let{from:u,to:i}=r,s=n.doc.lineAt(u),a=!t&&u==i&&RH(n,u);t&&(u=i=(i<=s.to?s:n.doc.lineAt(i)).to);let o=new d5(n,{simulateBreak:u,simulateDoubleBreak:!!a}),h=aP(o,u);for(h==null&&(h=/^\s*/.exec(n.doc.lineAt(u).text)[0].length);is.from&&u{let r=[];for(let i=l.from;i<=l.to;){let s=t.doc.lineAt(i);s.number>e&&(l.empty||l.to>s.from)&&(n(s,r,l),e=s.number),i=s.to+1}let u=t.changes(r);return{changes:r,range:Tn.range(u.mapPos(l.anchor,1),u.mapPos(l.head,1))}})}const _H=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let e=Object.create(null),l=new d5(t,{overrideIndentation:u=>{let i=e[u];return i??-1}}),r=gP(t,(u,i,s)=>{let a=aP(l,u.from);if(a==null)return;/\S/.test(u.text)||(a=0);let o=/^\s*/.exec(u.text)[0],h=$1(t,a);(o!=h||s.fromt.readOnly?!1:(n(t.update(gP(t,(e,l)=>{l.push({from:e.from,insert:t.facet(oP)})}),{userEvent:"input.indent"})),!0),DH=({state:t,dispatch:n})=>t.readOnly?!1:(n(t.update(gP(t,(e,l)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let u=Ip(r,t.tabSize),i=0,s=$1(t,Math.max(0,u-j2(t)));for(;i({mac:t.key,run:t.run,shift:t.shift}))),NH=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:XF,shift:sH},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:FF,shift:oH},{key:"Alt-ArrowUp",run:SH},{key:"Shift-Alt-ArrowUp",run:CH},{key:"Alt-ArrowDown",run:OH},{key:"Shift-Alt-ArrowDown",run:AH},{key:"Escape",run:vH},{key:"Mod-Enter",run:IH},{key:"Alt-l",mac:"Ctrl-l",run:dH},{key:"Mod-i",run:pH,preventDefault:!0},{key:"Mod-[",run:DH},{key:"Mod-]",run:TH},{key:"Mod-Alt-\\",run:_H},{key:"Shift-Mod-k",run:EH},{key:"Shift-Mod-\\",run:rH},{key:"Mod-/",run:AF},{key:"Alt-A",run:RF}].concat($H);function nl(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var n=1,e=arguments[1];if(e&&typeof e=="object"&&e.nodeType==null&&!Array.isArray(e)){for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var r=e[l];typeof r=="string"?t.setAttribute(l,r):r!=null&&(t[l]=r)}n++}for(;nt.normalize("NFKD"):t=>t;class rw{constructor(n,e,l=0,r=n.length,u,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(l,r),this.bufferStart=l,this.normalize=u?s=>u(_M(s)):_M,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 Jr(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let n=this.peek();if(n<0)return this.done=!0,this;let e=GR(n),l=this.bufferStart+this.bufferPos;this.bufferPos+=Bi(n);let r=this.normalize(e);for(let u=0,i=l;;u++){let s=r.charCodeAt(u),a=this.match(s,i);if(a)return this.value=a,this;if(u==r.length-1)break;i==l&&uthis.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 n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let l=this.curLineStart+e.index,r=l+e[0].length;if(this.matchPos=O2(this.text,r+(l==r?1:0)),l==this.curLineStart+this.curLine.length&&this.nextLine(),(lthis.value.to)&&(!this.test||this.test(l,r,e)))return this.value={from:l,to:r,match:e},this;n=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=l||r.to<=e){let s=new Cm(e,n.sliceString(e,l));return Ij.set(n,s),s}if(r.from==e&&r.to==l)return r;let{text:u,from:i}=r;return i>e&&(u=n.sliceString(e,i)+u,i=e),r.to=this.to?this.to:this.text.lineAt(n).to}next(){for(;;){let n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){let l=this.flat.from+e.index,r=l+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(l,r,e)))return this.value={from:l,to:r,match:e},this.matchPos=O2(this.text,r+(l==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Cm.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(pz.prototype[Symbol.iterator]=vz.prototype[Symbol.iterator]=function(){return this});function qH(t){try{return new RegExp(t,mP),!0}catch{return!1}}function O2(t,n){if(n>=t.length)return n;let e=t.lineAt(n),l;for(;n=56320&&l<57344;)n++;return n}function mk(t){let n=nl("input",{class:"cm-textfield",name:"line"}),e=nl("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),t.dispatch({effects:C2.of(!1)}),t.focus()):r.keyCode==13&&(r.preventDefault(),l())},onsubmit:r=>{r.preventDefault(),l()}},nl("label",t.state.phrase("Go to line"),": ",n)," ",nl("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function l(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!r)return;let{state:u}=t,i=u.doc.lineAt(u.selection.main.head),[,s,a,o,h]=r,c=o?+o.slice(1):0,f=a?+a:i.number;if(a&&h){let C=f/100;s&&(C=C*(s=="-"?-1:1)+i.number/u.doc.lines),f=Math.round(u.doc.lines*C)}else a&&s&&(f=f*(s=="-"?-1:1)+i.number);let d=u.doc.line(Math.max(1,Math.min(u.doc.lines,f)));t.dispatch({effects:C2.of(!1),selection:Tn.cursor(d.from+Math.max(0,Math.min(c,d.length))),scrollIntoView:!0}),t.focus()}return{dom:e}}const C2=ee.define(),TM=eu.define({create(){return!0},update(t,n){for(let e of n.effects)e.is(C2)&&(t=e.value);return t},provide:t=>M1.from(t,n=>n?mk:null)}),LH=t=>{let n=D1(t,mk);if(!n){let e=[C2.of(!0)];t.state.field(TM,!1)==null&&e.push(ee.appendConfig.of([TM,WH])),t.dispatch({effects:e}),n=D1(t,mk)}return n&&n.dom.querySelector("input").focus(),!0},WH=kt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),VH={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},yz=dt.define({combine(t){return Wo(t,VH,{highlightWordAroundCursor:(n,e)=>n||e,minSelectionLength:Math.min,maxMatches:Math.min})}});function zH(t){let n=[JH,GH];return t&&n.push(yz.of(t)),n}const UH=Tt.mark({class:"cm-selectionMatch"}),YH=Tt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function DM(t,n,e,l){return(e==0||t(n.sliceDoc(e-1,e))!=dl.Word)&&(l==n.doc.length||t(n.sliceDoc(l,l+1))!=dl.Word)}function QH(t,n,e,l){return t(n.sliceDoc(e,e+1))==dl.Word&&t(n.sliceDoc(l-1,l))==dl.Word}const GH=Or.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 n=t.state.facet(yz),{state:e}=t,l=e.selection;if(l.ranges.length>1)return Tt.none;let r=l.main,u,i=null;if(r.empty){if(!n.highlightWordAroundCursor)return Tt.none;let a=e.wordAt(r.head);if(!a)return Tt.none;i=e.charCategorizer(r.head),u=e.sliceDoc(a.from,a.to)}else{let a=r.to-r.from;if(a200)return Tt.none;if(n.wholeWords){if(u=e.sliceDoc(r.from,r.to),i=e.charCategorizer(r.head),!(DM(i,e,r.from,r.to)&&QH(i,e,r.from,r.to)))return Tt.none}else if(u=e.sliceDoc(r.from,r.to).trim(),!u)return Tt.none}let s=[];for(let a of t.visibleRanges){let o=new rw(e.doc,u,a.from,a.to);for(;!o.next().done;){let{from:h,to:c}=o.value;if((!i||DM(i,e,h,c))&&(r.empty&&h<=r.from&&c>=r.to?s.push(YH.range(h,c)):(h>=r.to||c<=r.from)&&s.push(UH.range(h,c)),s.length>n.maxMatches))return Tt.none}}return Tt.set(s)}},{decorations:t=>t.decorations}),JH=kt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),KH=({state:t,dispatch:n})=>{let{selection:e}=t,l=Tn.create(e.ranges.map(r=>t.wordAt(r.head)||Tn.cursor(r.head)),e.mainIndex);return l.eq(e)?!1:(n(t.update({selection:l})),!0)};function BH(t,n){let{main:e,ranges:l}=t.selection,r=t.wordAt(e.head),u=r&&r.from==e.from&&r.to==e.to;for(let i=!1,s=new rw(t.doc,n,l[l.length-1].to);;)if(s.next(),s.done){if(i)return null;s=new rw(t.doc,n,0,Math.max(0,l[l.length-1].from-1)),i=!0}else{if(i&&l.some(a=>a.from==s.value.from))continue;if(u){let a=t.wordAt(s.value.from);if(!a||a.from!=s.value.from||a.to!=s.value.to)continue}return s.value}}const XH=({state:t,dispatch:n})=>{let{ranges:e}=t.selection;if(e.some(u=>u.from===u.to))return KH({state:t,dispatch:n});let l=t.sliceDoc(e[0].from,e[0].to);if(t.selection.ranges.some(u=>t.sliceDoc(u.from,u.to)!=l))return!1;let r=BH(t,l);return r?(n(t.update({selection:t.selection.addRange(Tn.range(r.from,r.to),!1),effects:kt.scrollIntoView(r.to)})),!0):!1},Jw=dt.define({combine(t){return Wo(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:n=>new sZ(n),scrollToMatch:n=>kt.scrollIntoView(n)})}});class jz{constructor(n){this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||qH(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}unquote(n){return this.literal?n:n.replace(/\\([nrt\\])/g,(e,l)=>l=="n"?` +`:l=="r"?"\r":l=="t"?" ":"\\")}eq(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}create(){return this.regexp?new bH(this):new HH(this)}getCursor(n,e=0,l){let r=n.doc?n:Oe.create({doc:n});return l==null&&(l=r.doc.length),this.regexp?sm(this,r,e,l):im(this,r,e,l)}}class xz{constructor(n){this.spec=n}}function im(t,n,e,l){return new rw(n.doc,t.unquoted,e,l,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?FH(n.doc,n.charCategorizer(n.selection.main.head)):void 0)}function FH(t,n){return(e,l,r,u)=>((u>e||u+r.length=e)return null;r.push(l.value)}return r}highlight(n,e,l,r){let u=im(this.spec,n,Math.max(0,e-this.spec.unquoted.length),Math.min(l+this.spec.unquoted.length,n.doc.length));for(;!u.next().done;)r(u.value.from,u.value.to)}}function sm(t,n,e,l){return new pz(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?ZH(n.charCategorizer(n.selection.main.head)):void 0},e,l)}function A2(t,n){return t.slice(Ou(t,n,!1),n)}function E2(t,n){return t.slice(n,Ou(t,n))}function ZH(t){return(n,e,l)=>!l[0].length||(t(A2(l.input,l.index))!=dl.Word||t(E2(l.input,l.index))!=dl.Word)&&(t(E2(l.input,l.index+l[0].length))!=dl.Word||t(A2(l.input,l.index+l[0].length))!=dl.Word)}class bH extends xz{nextMatch(n,e,l){let r=sm(this.spec,n,l,n.doc.length).next();return r.done&&(r=sm(this.spec,n,0,e).next()),r.done?null:r.value}prevMatchInRange(n,e,l){for(let r=1;;r++){let u=Math.max(e,l-r*1e4),i=sm(this.spec,n,u,l),s=null;for(;!i.next().done;)s=i.value;if(s&&(u==e||s.from>u+10))return s;if(u==e)return null}}prevMatch(n,e,l){return this.prevMatchInRange(n,0,e)||this.prevMatchInRange(n,l,n.doc.length)}getReplacement(n){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(e,l)=>l=="$"?"$":l=="&"?n.match[0]:l!="0"&&+l=e)return null;r.push(l.value)}return r}highlight(n,e,l,r){let u=sm(this.spec,n,Math.max(0,e-250),Math.min(l+250,n.doc.length));for(;!u.next().done;)r(u.value.from,u.value.to)}}const N1=ee.define(),wP=ee.define(),Mh=eu.define({create(t){return new _j(wk(t).create(),null)},update(t,n){for(let e of n.effects)e.is(N1)?t=new _j(e.value.create(),t.panel):e.is(wP)&&(t=new _j(t.query,e.value?dP:null));return t},provide:t=>M1.from(t,n=>n.panel)});class _j{constructor(n,e){this.query=n,this.panel=e}}const nZ=Tt.mark({class:"cm-searchMatch"}),tZ=Tt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),eZ=Or.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Mh))}update(t){let n=t.state.field(Mh);(n!=t.startState.field(Mh)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(n))}highlight({query:t,panel:n}){if(!n||!t.spec.valid)return Tt.none;let{view:e}=this,l=new Qh;for(let r=0,u=e.visibleRanges,i=u.length;ru[r+1].from-2*250;)a=u[++r].to;t.highlight(e.state,s,a,(o,h)=>{let c=e.state.selection.ranges.some(f=>f.from==o&&f.to==h);l.add(o,h,c?tZ:nZ)})}return l.finish()}},{decorations:t=>t.decorations});function Mp(t){return n=>{let e=n.state.field(Mh,!1);return e&&e.query.spec.valid?t(n,e):Oz(n)}}const R2=Mp((t,{query:n})=>{let{to:e}=t.state.selection.main,l=n.nextMatch(t.state,e,e);if(!l)return!1;let r=Tn.single(l.from,l.to),u=t.state.facet(Jw);return t.dispatch({selection:r,effects:[pP(t,l),u.scrollToMatch(r.main,t)],userEvent:"select.search"}),Sz(t),!0}),P2=Mp((t,{query:n})=>{let{state:e}=t,{from:l}=e.selection.main,r=n.prevMatch(e,l,l);if(!r)return!1;let u=Tn.single(r.from,r.to),i=t.state.facet(Jw);return t.dispatch({selection:u,effects:[pP(t,r),i.scrollToMatch(u.main,t)],userEvent:"select.search"}),Sz(t),!0}),lZ=Mp((t,{query:n})=>{let e=n.matchAll(t.state,1e3);return!e||!e.length?!1:(t.dispatch({selection:Tn.create(e.map(l=>Tn.range(l.from,l.to))),userEvent:"select.search.matches"}),!0)}),rZ=({state:t,dispatch:n})=>{let e=t.selection;if(e.ranges.length>1||e.main.empty)return!1;let{from:l,to:r}=e.main,u=[],i=0;for(let s=new rw(t.doc,t.sliceDoc(l,r));!s.next().done;){if(u.length>1e3)return!1;s.value.from==l&&(i=u.length),u.push(Tn.range(s.value.from,s.value.to))}return n(t.update({selection:Tn.create(u,i),userEvent:"select.search.matches"})),!0},MM=Mp((t,{query:n})=>{let{state:e}=t,{from:l,to:r}=e.selection.main;if(e.readOnly)return!1;let u=n.nextMatch(e,l,l);if(!u)return!1;let i=[],s,a,o=[];if(u.from==l&&u.to==r&&(a=e.toText(n.getReplacement(u)),i.push({from:u.from,to:u.to,insert:a}),u=n.nextMatch(e,u.from,u.to),o.push(kt.announce.of(e.phrase("replaced match on line $",e.doc.lineAt(l).number)+"."))),u){let h=i.length==0||i[0].from>=u.to?0:u.to-u.from-a.length;s=Tn.single(u.from-h,u.to-h),o.push(pP(t,u)),o.push(e.facet(Jw).scrollToMatch(s.main,t))}return t.dispatch({changes:i,selection:s,effects:o,userEvent:"input.replace"}),!0}),uZ=Mp((t,{query:n})=>{if(t.state.readOnly)return!1;let e=n.matchAll(t.state,1e9).map(r=>{let{from:u,to:i}=r;return{from:u,to:i,insert:n.getReplacement(r)}});if(!e.length)return!1;let l=t.state.phrase("replaced $ matches",e.length)+".";return t.dispatch({changes:e,effects:kt.announce.of(l),userEvent:"input.replace.all"}),!0});function dP(t){return t.state.facet(Jw).createPanel(t)}function wk(t,n){var e,l,r,u,i;let s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;let o=t.facet(Jw);return new jz({search:((e=n==null?void 0:n.literal)!==null&&e!==void 0?e:o.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(l=n==null?void 0:n.caseSensitive)!==null&&l!==void 0?l:o.caseSensitive,literal:(r=n==null?void 0:n.literal)!==null&&r!==void 0?r:o.literal,regexp:(u=n==null?void 0:n.regexp)!==null&&u!==void 0?u:o.regexp,wholeWord:(i=n==null?void 0:n.wholeWord)!==null&&i!==void 0?i:o.wholeWord})}function kz(t){let n=D1(t,dP);return n&&n.dom.querySelector("[main-field]")}function Sz(t){let n=kz(t);n&&n==t.root.activeElement&&n.select()}const Oz=t=>{let n=t.state.field(Mh,!1);if(n&&n.panel){let e=kz(t);if(e&&e!=t.root.activeElement){let l=wk(t.state,n.query.spec);l.valid&&t.dispatch({effects:N1.of(l)}),e.focus(),e.select()}}else t.dispatch({effects:[wP.of(!0),n?N1.of(wk(t.state,n.query.spec)):ee.appendConfig.of(aZ)]});return!0},Cz=t=>{let n=t.state.field(Mh,!1);if(!n||!n.panel)return!1;let e=D1(t,dP);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:wP.of(!1)}),!0},iZ=[{key:"Mod-f",run:Oz,scope:"editor search-panel"},{key:"F3",run:R2,shift:P2,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:R2,shift:P2,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Cz,scope:"editor search-panel"},{key:"Mod-Shift-l",run:rZ},{key:"Alt-g",run:LH},{key:"Mod-d",run:XH,preventDefault:!0}];class sZ{constructor(n){this.view=n;let e=this.query=n.state.field(Mh).query.spec;this.commit=this.commit.bind(this),this.searchField=nl("input",{value:e.search,placeholder:ci(n,"Find"),"aria-label":ci(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=nl("input",{value:e.replace,placeholder:ci(n,"Replace"),"aria-label":ci(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=nl("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=nl("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=nl("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit});function l(r,u,i){return nl("button",{class:"cm-button",name:r,onclick:u,type:"button"},i)}this.dom=nl("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,l("next",()=>R2(n),[ci(n,"next")]),l("prev",()=>P2(n),[ci(n,"previous")]),l("select",()=>lZ(n),[ci(n,"all")]),nl("label",null,[this.caseField,ci(n,"match case")]),nl("label",null,[this.reField,ci(n,"regexp")]),nl("label",null,[this.wordField,ci(n,"by word")]),...n.state.readOnly?[]:[nl("br"),this.replaceField,l("replace",()=>MM(n),[ci(n,"replace")]),l("replaceAll",()=>uZ(n),[ci(n,"replace all")])],nl("button",{name:"close",onclick:()=>Cz(n),"aria-label":ci(n,"close"),type:"button"},["×"])])}commit(){let n=new jz({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:N1.of(n)}))}keydown(n){SB(this.view,n,"search-panel")?n.preventDefault():n.keyCode==13&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?P2:R2)(this.view)):n.keyCode==13&&n.target==this.replaceField&&(n.preventDefault(),MM(this.view))}update(n){for(let e of n.transactions)for(let l of e.effects)l.is(N1)&&!l.value.eq(this.query)&&this.setQuery(l.value)}setQuery(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Jw).top}}function ci(t,n){return t.state.phrase(n)}const Z0=30,b0=/[\s\.,:;?!]/;function pP(t,{from:n,to:e}){let l=t.state.doc.lineAt(n),r=t.state.doc.lineAt(e).to,u=Math.max(l.from,n-Z0),i=Math.min(r,e+Z0),s=t.state.sliceDoc(u,i);if(u!=l.from){for(let a=0;as.length-Z0;a--)if(!b0.test(s[a-1])&&b0.test(s[a])){s=s.slice(0,a);break}}return kt.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${l.number}.`)}const oZ=kt.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"}}),aZ=[Mh,fg.lowest(eZ),oZ];class Az{constructor(n,e,l){this.state=n,this.pos=e,this.explicit=l,this.abortListeners=[]}tokenBefore(n){let e=xr(this.state).resolveInner(this.pos,-1);for(;e&&n.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(n){let e=this.state.doc.lineAt(this.pos),l=Math.max(e.from,this.pos-250),r=e.text.slice(l-e.from,this.pos-e.from),u=r.search(Ez(n,!1));return u<0?null:{from:l+u,to:this.pos,text:r.slice(u)}}get aborted(){return this.abortListeners==null}addEventListener(n,e){n=="abort"&&this.abortListeners&&this.abortListeners.push(e)}}function $M(t){let n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),`[${e?"\\w":""}${n.replace(/[^\w\s]/g,"\\$&")}]`}function hZ(t){let n=Object.create(null),e=Object.create(null);for(let{label:r}of t){n[r[0]]=!0;for(let u=1;utypeof r=="string"?{label:r}:r),[e,l]=n.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:hZ(n);return r=>{let u=r.matchBefore(l);return u||r.explicit?{from:u?u.from:r.pos,options:n,validFor:e}:null}}class NM{constructor(n,e,l,r){this.completion=n,this.source=e,this.match=l,this.score=r}}function $h(t){return t.selection.main.from}function Ez(t,n){var e;let{source:l}=t,r=n&&l[0]!="^",u=l[l.length-1]!="$";return!r&&!u?t:new RegExp(`${r?"^":""}(?:${l})${u?"$":""}`,(e=t.flags)!==null&&e!==void 0?e:t.ignoreCase?"i":"")}const fZ=eh.define();function gZ(t,n,e,l){let{main:r}=t.selection,u=e-r.from,i=l-r.from;return Object.assign(Object.assign({},t.changeByRange(s=>s!=r&&e!=l&&t.sliceDoc(s.from+u,s.from+i)!=t.sliceDoc(e,l)?{range:s}:{changes:{from:s.from+u,to:l==r.from?s.to:s.from+i,insert:n},range:Tn.cursor(s.from+u+n.length)})),{userEvent:"input.complete"})}const qM=new WeakMap;function mZ(t){if(!Array.isArray(t))return t;let n=qM.get(t);return n||qM.set(t,n=cZ(t)),n}const vP=ee.define(),q1=ee.define();class wZ{constructor(n){this.pattern=n,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let e=0;e=48&&ln<=57||ln>=97&&ln<=122?2:ln>=65&&ln<=90?1:0:(B=GR(ln))!=B.toLowerCase()?1:B!=B.toUpperCase()?2:0;(!G||O==1&&T||en==0&&O!=0)&&(e[c]==ln||l[c]==ln&&(f=!0)?i[c++]=G:i.length&&($=!1)),en=O,G+=Bi(ln)}return c==a&&i[0]==0&&$?this.result(-100+(f?-200:0),i,n):d==a&&C==0?[-200-n.length+(I==n.length?0:-100),0,I]:s>-1?[-700-n.length,s,s+this.pattern.length]:d==a?[-200+-700-n.length,C,I]:c==a?this.result(-100+(f?-200:0)+-700+($?0:-1100),i,n):e.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,n)}result(n,e,l){let r=[n-l.length],u=1;for(let i of e){let s=i+(this.astral?Bi(Jr(l,i)):1);u>1&&r[u-1]==i?r[u-1]=s:(r[u++]=i,r[u++]=s)}return r}}const Xu=dt.define({combine(t){return Wo(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:dZ,compareCompletions:(n,e)=>n.label.localeCompare(e.label),interactionDelay:75},{defaultKeymap:(n,e)=>n&&e,closeOnBlur:(n,e)=>n&&e,icons:(n,e)=>n&&e,tooltipClass:(n,e)=>l=>LM(n(l),e(l)),optionClass:(n,e)=>l=>LM(n(l),e(l)),addToOptions:(n,e)=>n.concat(e)})}});function LM(t,n){return t?n?t+" "+n:t:n}function dZ(t,n,e,l,r){let u=t.textDirection==Cl.RTL,i=u,s=!1,a="top",o,h,c=n.left-r.left,f=r.right-n.right,d=l.right-l.left,C=l.bottom-l.top;if(i&&c=C||I>n.top?o=e.bottom-n.top:(a="bottom",o=n.bottom-e.top)}return{style:`${a}: ${o}px; max-width: ${h}px`,class:"cm-completionInfo-"+(s?u?"left-narrow":"right-narrow":i?"left":"right")}}function pZ(t){let n=t.addToOptions.slice();return t.icons&&n.push({render(e){let l=document.createElement("div");return l.classList.add("cm-completionIcon"),e.type&&l.classList.add(...e.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),l.setAttribute("aria-hidden","true"),l},position:20}),n.push({render(e,l,r){let u=document.createElement("span");u.className="cm-completionLabel";let{label:i}=e,s=0;for(let a=1;as&&u.appendChild(document.createTextNode(i.slice(s,o)));let c=u.appendChild(document.createElement("span"));c.appendChild(document.createTextNode(i.slice(o,h))),c.className="cm-completionMatchedText",s=h}return se.position-l.position).map(e=>e.render)}function WM(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){let r=Math.floor(n/e);return{from:r*e,to:(r+1)*e}}let l=Math.floor((t-n)/e);return{from:t-(l+1)*e,to:t-l*e}}class vZ{constructor(n,e,l){this.view=n,this.stateField=e,this.applyCompletion=l,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let r=n.state.field(e),{options:u,selected:i}=r.open,s=n.state.facet(Xu);this.optionContent=pZ(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=WM(u.length,i,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(n.state),this.dom.addEventListener("mousedown",a=>{for(let o=a.target,h;o&&o!=this.dom;o=o.parentNode)if(o.nodeName=="LI"&&(h=/-(\d+)$/.exec(o.id))&&+h[1]{let o=n.state.field(this.stateField,!1);o&&o.tooltip&&n.state.facet(Xu).closeOnBlur&&a.relatedTarget!=n.contentDOM&&n.dispatch({effects:q1.of(null)})}),this.list=this.dom.appendChild(this.createListBox(u,r.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(n){var e,l,r;let u=n.state.field(this.stateField),i=n.startState.field(this.stateField);this.updateTooltipClass(n.state),u!=i&&(this.updateSel(),((e=u.open)===null||e===void 0?void 0:e.disabled)!=((l=i.open)===null||l===void 0?void 0:l.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((r=u.open)===null||r===void 0)&&r.disabled)))}updateTooltipClass(n){let e=this.tooltipClass(n);if(e!=this.currentClass){for(let l of this.currentClass.split(" "))l&&this.dom.classList.remove(l);for(let l of e.split(" "))l&&this.dom.classList.add(l);this.currentClass=e}}positioned(n){this.space=n,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let n=this.view.state.field(this.stateField),e=n.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=WM(e.options.length,e.selected,this.view.state.facet(Xu).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e.options,n.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:l}=e.options[e.selected],{info:r}=l;if(!r)return;let u=typeof r=="string"?document.createTextNode(r):r(l);if(!u)return;"then"in u?u.then(i=>{i&&this.view.state.field(this.stateField,!1)==n&&this.addInfoPane(i,l)}).catch(i=>bi(this.view.state,i,"completion info")):this.addInfoPane(u,l)}}addInfoPane(n,e){this.destroyInfo();let l=this.info=document.createElement("div");if(l.className="cm-tooltip cm-completionInfo",n.nodeType!=null)l.appendChild(n),this.infoDestroy=null;else{let{dom:r,destroy:u}=n;l.appendChild(r),this.infoDestroy=u||null}this.dom.appendChild(l),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(n){let e=null;for(let l=this.list.firstChild,r=this.range.from;l;l=l.nextSibling,r++)l.nodeName!="LI"||!l.id?r--:r==n?l.hasAttribute("aria-selected")||(l.setAttribute("aria-selected","true"),e=l):l.hasAttribute("aria-selected")&&l.removeAttribute("aria-selected");return e&&jZ(this.list,e),e}measureInfo(){let n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;let e=this.dom.getBoundingClientRect(),l=this.info.getBoundingClientRect(),r=n.getBoundingClientRect(),u=this.space;if(!u){let i=this.dom.ownerDocument.defaultView||window;u={left:0,top:0,right:i.innerWidth,bottom:i.innerHeight}}return r.top>Math.min(u.bottom,e.bottom)-10||r.bottoml.from||l.from==0))if(u=f,typeof o!="string"&&o.header)r.appendChild(o.header(o));else{let d=r.appendChild(document.createElement("completion-section"));d.textContent=f}}const h=r.appendChild(document.createElement("li"));h.id=e+"-"+i,h.setAttribute("role","option");let c=this.optionClass(s);c&&(h.className=c);for(let f of this.optionContent){let d=f(s,this.view.state,a);d&&h.appendChild(d)}}return l.from&&r.classList.add("cm-completionListIncompleteTop"),l.tonew vZ(e,t,n)}function jZ(t,n){let e=t.getBoundingClientRect(),l=n.getBoundingClientRect();l.tope.bottom&&(t.scrollTop+=l.bottom-e.bottom)}function VM(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function xZ(t,n){let e=[],l=null,r=a=>{e.push(a);let{section:o}=a.completion;if(o){l||(l=[]);let h=typeof o=="string"?o:o.name;l.some(c=>c.name==h)||l.push(typeof o=="string"?{name:h}:o)}};for(let a of t)if(a.hasResult())if(a.result.filter===!1){let o=a.result.getMatch;for(let h of a.result.options){let c=[1e9-e.length];if(o)for(let f of o(h))c.push(f);r(new NM(h,a.source,c,c[0]))}}else{let o=new wZ(n.sliceDoc(a.from,a.to)),h;for(let c of a.result.options)(h=o.match(c.label))&&r(new NM(c,a.source,h,h[0]+(c.boost||0)))}if(l){let a=Object.create(null),o=0,h=(c,f)=>{var d,C;return((d=c.rank)!==null&&d!==void 0?d:1e9)-((C=f.rank)!==null&&C!==void 0?C:1e9)||(c.nameh.score-o.score||s(o.completion,h.completion)))!i||i.label!=a.completion.label||i.detail!=a.completion.detail||i.type!=null&&a.completion.type!=null&&i.type!=a.completion.type||i.apply!=a.completion.apply?u.push(a):VM(a.completion)>VM(i)&&(u[u.length-1]=a),i=a.completion;return u}class gm{constructor(n,e,l,r,u,i){this.options=n,this.attrs=e,this.tooltip=l,this.timestamp=r,this.selected=u,this.disabled=i}setSelected(n,e){return n==this.selected||n>=this.options.length?this:new gm(this.options,zM(e,n),this.tooltip,this.timestamp,n,this.disabled)}static build(n,e,l,r,u){let i=xZ(n,e);if(!i.length)return r&&n.some(a=>a.state==1)?new gm(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=e.facet(Xu).selectOnOpen?0:-1;if(r&&r.selected!=s&&r.selected!=-1){let a=r.options[r.selected].completion;for(let o=0;oo.hasResult()?Math.min(a,o.from):a,1e8),create:yZ(wi,Iz),above:u.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(n){return new gm(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class I2{constructor(n,e,l){this.active=n,this.id=e,this.open=l}static start(){return new I2(OZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(n){let{state:e}=n,l=e.facet(Xu),u=(l.override||e.languageDataAt("autocomplete",$h(e)).map(mZ)).map(s=>(this.active.find(o=>o.source==s)||new Qu(s,this.active.some(o=>o.state!=0)?1:0)).update(n,l));u.length==this.active.length&&u.every((s,a)=>s==this.active[a])&&(u=this.active);let i=this.open;i&&n.docChanged&&(i=i.map(n.changes)),n.selection||u.some(s=>s.hasResult()&&n.changes.touchesRange(s.from,s.to))||!kZ(u,this.active)?i=gm.build(u,e,this.id,i,l):i&&i.disabled&&!u.some(s=>s.state==1)&&(i=null),!i&&u.every(s=>s.state!=1)&&u.some(s=>s.hasResult())&&(u=u.map(s=>s.hasResult()?new Qu(s.source,0):s));for(let s of n.effects)s.is(Pz)&&(i=i&&i.setSelected(s.value,this.id));return u==this.active&&i==this.open?this:new I2(u,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:SZ}}function kZ(t,n){if(t==n)return!0;for(let e=0,l=0;;){for(;e-1&&(e["aria-activedescendant"]=t+"-"+n),e}const OZ=[];function dk(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Qu{constructor(n,e,l=-1){this.source=n,this.state=e,this.explicitPos=l}hasResult(){return!1}update(n,e){let l=dk(n),r=this;l?r=r.handleUserEvent(n,l,e):n.docChanged?r=r.handleChange(n):n.selection&&r.state!=0&&(r=new Qu(r.source,0));for(let u of n.effects)if(u.is(vP))r=new Qu(r.source,1,u.value?$h(n.state):-1);else if(u.is(q1))r=new Qu(r.source,0);else if(u.is(Rz))for(let i of u.value)i.source==r.source&&(r=i);return r}handleUserEvent(n,e,l){return e=="delete"||!l.activateOnTyping?this.map(n.changes):new Qu(this.source,1)}handleChange(n){return n.changes.touchesRange($h(n.startState))?new Qu(this.source,0):this.map(n.changes)}map(n){return n.empty||this.explicitPos<0?this:new Qu(this.source,this.state,n.mapPos(this.explicitPos))}}class Am extends Qu{constructor(n,e,l,r,u){super(n,2,e),this.result=l,this.from=r,this.to=u}hasResult(){return!0}handleUserEvent(n,e,l){var r;let u=n.changes.mapPos(this.from),i=n.changes.mapPos(this.to,1),s=$h(n.state);if((this.explicitPos<0?s<=u:si||e=="delete"&&$h(n.startState)==this.from)return new Qu(this.source,e=="input"&&l.activateOnTyping?1:0);let a=this.explicitPos<0?-1:n.changes.mapPos(this.explicitPos),o;return CZ(this.result.validFor,n.state,u,i)?new Am(this.source,a,this.result,u,i):this.result.update&&(o=this.result.update(this.result,u,i,new Az(n.state,s,a>=0)))?new Am(this.source,a,o,o.from,(r=o.to)!==null&&r!==void 0?r:$h(n.state)):new Qu(this.source,1,a)}handleChange(n){return n.changes.touchesRange(this.from,this.to)?new Qu(this.source,0):this.map(n.changes)}map(n){return n.empty?this:new Am(this.source,this.explicitPos<0?-1:n.mapPos(this.explicitPos),this.result,n.mapPos(this.from),n.mapPos(this.to,1))}}function CZ(t,n,e,l){if(!t)return!1;let r=n.sliceDoc(e,l);return typeof t=="function"?t(r,e,l,n):Ez(t,!0).test(r)}const Rz=ee.define({map(t,n){return t.map(e=>e.map(n))}}),Pz=ee.define(),wi=eu.define({create(){return I2.start()},update(t,n){return t.update(n)},provide:t=>[eP.from(t,n=>n.tooltip),kt.contentAttributes.from(t,n=>n.attrs)]});function Iz(t,n){const e=n.completion.apply||n.completion.label;let l=t.state.field(wi).active.find(r=>r.source==n.source);return l instanceof Am?(typeof e=="string"?t.dispatch(Object.assign(Object.assign({},gZ(t.state,e,l.from,l.to)),{annotations:fZ.of(n.completion)})):e(t,n.completion,l.from,l.to),!0):!1}function nv(t,n="option"){return e=>{let l=e.state.field(wi,!1);if(!l||!l.open||l.open.disabled||Date.now()-l.open.timestamp-1?l.open.selected+r*(t?1:-1):t?0:i-1;return s<0?s=n=="page"?0:i-1:s>=i&&(s=n=="page"?i-1:0),e.dispatch({effects:Pz.of(s)}),!0}}const AZ=t=>{let n=t.state.field(wi,!1);return t.state.readOnly||!n||!n.open||n.open.selected<0||Date.now()-n.open.timestampt.state.field(wi,!1)?(t.dispatch({effects:vP.of(!0)}),!0):!1,RZ=t=>{let n=t.state.field(wi,!1);return!n||!n.active.some(e=>e.state!=0)?!1:(t.dispatch({effects:q1.of(null)}),!0)};class PZ{constructor(n,e){this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const UM=50,IZ=50,_Z=1e3,TZ=Or.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let n of t.state.field(wi).active)n.state==1&&this.startQuery(n)}update(t){let n=t.state.field(wi);if(!t.selectionSet&&!t.docChanged&&t.startState.field(wi)==n)return;let e=t.transactions.some(l=>(l.selection||l.docChanged)&&!dk(l));for(let l=0;lIZ&&Date.now()-r.time>_Z){for(let u of r.context.abortListeners)try{u()}catch(i){bi(this.view.state,i)}r.context.abortListeners=null,this.running.splice(l--,1)}else r.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=n.active.some(l=>l.state==1&&!this.running.some(r=>r.active.source==l.source))?setTimeout(()=>this.startUpdate(),UM):-1,this.composing!=0)for(let l of t.transactions)dk(l)=="input"?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,n=t.field(wi);for(let e of n.active)e.state==1&&!this.running.some(l=>l.active.source==e.source)&&this.startQuery(e)}startQuery(t){let{state:n}=this.view,e=$h(n),l=new Az(n,e,t.explicitPos==e),r=new PZ(t,l);this.running.push(r),Promise.resolve(t.source(l)).then(u=>{r.context.aborted||(r.done=u||null,this.scheduleAccept())},u=>{this.view.dispatch({effects:q1.of(null)}),bi(this.view.state,u)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),UM))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let n=[],e=this.view.state.facet(Xu);for(let l=0;li.source==r.active.source);if(u&&u.state==1)if(r.done==null){let i=new Qu(r.active.source,0);for(let s of r.updates)i=i.update(s,e);i.state!=1&&n.push(i)}else this.startQuery(u)}n.length&&this.view.dispatch({effects:Rz.of(n)})}},{eventHandlers:{blur(t){let n=this.view.state.field(wi,!1);if(n&&n.tooltip&&this.view.state.facet(Xu).closeOnBlur){let e=n.open&&gV(this.view,n.open.tooltip);(!e||!e.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:q1.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:vP.of(!1)}),20),this.composing=0}}}),DZ=kt.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"},".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"}}}),L1={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},of=ee.define({map(t,n){let e=n.mapPos(t,-1,ku.TrackAfter);return e??void 0}}),yP=new class extends Rf{};yP.startSide=1;yP.endSide=-1;const _z=eu.define({create(){return We.empty},update(t,n){if(n.selection){let e=n.state.doc.lineAt(n.selection.main.head).from,l=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(l,-1)&&(t=We.empty)}t=t.map(n.changes);for(let e of n.effects)e.is(of)&&(t=t.update({add:[yP.range(e.value,e.value+1)]}));return t}});function MZ(){return[NZ,_z]}const Tj="()[]{}<>";function Tz(t){for(let n=0;n{if(($Z?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(l.length>2||l.length==2&&Bi(Jr(l,0))==1||n!=r.from||e!=r.to)return!1;let u=WZ(t.state,l);return u?(t.dispatch(u),!0):!1}),qZ=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let l=Dz(t,t.selection.main.head).brackets||L1.brackets,r=null,u=t.changeByRange(i=>{if(i.empty){let s=VZ(t.doc,i.head);for(let a of l)if(a==s&&O5(t.doc,i.head)==Tz(Jr(a,0)))return{changes:{from:i.head-a.length,to:i.head+a.length},range:Tn.cursor(i.head-a.length)}}return{range:r=i}});return r||n(t.update(u,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},LZ=[{key:"Backspace",run:qZ}];function WZ(t,n){let e=Dz(t,t.selection.main.head),l=e.brackets||L1.brackets;for(let r of l){let u=Tz(Jr(r,0));if(n==r)return u==r?YZ(t,r,l.indexOf(r+r+r)>-1,e):zZ(t,r,u,e.before||L1.before);if(n==u&&Mz(t,t.selection.main.from))return UZ(t,r,u)}return null}function Mz(t,n){let e=!1;return t.field(_z).between(0,t.doc.length,l=>{l==n&&(e=!0)}),e}function O5(t,n){let e=t.sliceString(n,n+2);return e.slice(0,Bi(Jr(e,0)))}function VZ(t,n){let e=t.sliceString(n-2,n);return Bi(Jr(e,0))==e.length?e:e.slice(1)}function zZ(t,n,e,l){let r=null,u=t.changeByRange(i=>{if(!i.empty)return{changes:[{insert:n,from:i.from},{insert:e,from:i.to}],effects:of.of(i.to+n.length),range:Tn.range(i.anchor+n.length,i.head+n.length)};let s=O5(t.doc,i.head);return!s||/\s/.test(s)||l.indexOf(s)>-1?{changes:{insert:n+e,from:i.head},effects:of.of(i.head+n.length),range:Tn.cursor(i.head+n.length)}:{range:r=i}});return r?null:t.update(u,{scrollIntoView:!0,userEvent:"input.type"})}function UZ(t,n,e){let l=null,r=t.changeByRange(u=>u.empty&&O5(t.doc,u.head)==e?{changes:{from:u.head,to:u.head+e.length,insert:e},range:Tn.cursor(u.head+e.length)}:l={range:u});return l?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function YZ(t,n,e,l){let r=l.stringPrefixes||L1.stringPrefixes,u=null,i=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:n,from:s.to}],effects:of.of(s.to+n.length),range:Tn.range(s.anchor+n.length,s.head+n.length)};let a=s.head,o=O5(t.doc,a),h;if(o==n){if(YM(t,a))return{changes:{insert:n+n,from:a},effects:of.of(a+n.length),range:Tn.cursor(a+n.length)};if(Mz(t,a)){let f=e&&t.sliceDoc(a,a+n.length*3)==n+n+n?n+n+n:n;return{changes:{from:a,to:a+f.length,insert:f},range:Tn.cursor(a+f.length)}}}else{if(e&&t.sliceDoc(a-2*n.length,a)==n+n&&(h=QM(t,a-2*n.length,r))>-1&&YM(t,h))return{changes:{insert:n+n+n+n,from:a},effects:of.of(a+n.length),range:Tn.cursor(a+n.length)};if(t.charCategorizer(a)(o)!=dl.Word&&QM(t,a,r)>-1&&!QZ(t,a,n,r))return{changes:{insert:n+n,from:a},effects:of.of(a+n.length),range:Tn.cursor(a+n.length)}}return{range:u=s}});return u?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function YM(t,n){let e=xr(t).resolveInner(n+1);return e.parent&&e.from==n}function QZ(t,n,e,l){let r=xr(t).resolveInner(n,-1),u=l.reduce((i,s)=>Math.max(i,s.length),0);for(let i=0;i<5;i++){let s=t.sliceDoc(r.from,Math.min(r.to,r.from+e.length+u)),a=s.indexOf(e);if(!a||a>-1&&l.indexOf(s.slice(0,a))>-1){let h=r.firstChild;for(;h&&h.from==r.from&&h.to-h.from>e.length+a;){if(t.sliceDoc(h.to-e.length,h.to)==e)return!1;h=h.firstChild}return!0}let o=r.to==n&&r.parent;if(!o)break;r=o}return!1}function QM(t,n,e){let l=t.charCategorizer(n);if(l(t.sliceDoc(n-1,n))!=dl.Word)return n;for(let r of e){let u=n-r.length;if(t.sliceDoc(u,n)==r&&l(t.sliceDoc(u-1,u))!=dl.Word)return u}return-1}function GZ(t={}){return[wi,Xu.of(t),TZ,JZ,DZ]}const $z=[{key:"Ctrl-Space",run:EZ},{key:"Escape",run:RZ},{key:"ArrowDown",run:nv(!0)},{key:"ArrowUp",run:nv(!1)},{key:"PageDown",run:nv(!0,"page")},{key:"PageUp",run:nv(!1,"page")},{key:"Enter",run:AZ}],JZ=fg.highest(w5.computeN([Xu],t=>t.facet(Xu).defaultKeymap?[$z]:[]));class KZ{constructor(n,e,l){this.from=n,this.to=e,this.diagnostic=l}}class lf{constructor(n,e,l){this.diagnostics=n,this.panel=e,this.selected=l}static init(n,e,l){let r=n,u=l.facet(Lz).markerFilter;u&&(r=u(r));let i=Tt.set(r.map(s=>s.from==s.to||s.from==s.to-1&&l.doc.lineAt(s.from).to==s.from?Tt.widget({widget:new eb(s),diagnostic:s}).range(s.from):Tt.mark({attributes:{class:"cm-lintRange cm-lintRange-"+s.severity},diagnostic:s}).range(s.from,s.to)),!0);return new lf(i,e,uw(i))}}function uw(t,n=null,e=0){let l=null;return t.between(e,1e9,(r,u,{spec:i})=>{if(!(n&&i.diagnostic!=n))return l=new KZ(r,u,i.diagnostic),!1}),l}function BZ(t,n){let e=t.startState.doc.lineAt(n.pos);return!!(t.effects.some(l=>l.is(Nz))||t.changes.touchesRange(e.from,e.to))}function XZ(t,n){return t.field(ji,!1)?n:n.concat(ee.appendConfig.of(ub))}const Nz=ee.define(),jP=ee.define(),qz=ee.define(),ji=eu.define({create(){return new lf(Tt.none,null,null)},update(t,n){if(n.docChanged){let e=t.diagnostics.map(n.changes),l=null;if(t.selected){let r=n.changes.mapPos(t.selected.from,1);l=uw(e,t.selected.diagnostic,r)||uw(e,null,r)}t=new lf(e,t.panel,l)}for(let e of n.effects)e.is(Nz)?t=lf.init(e.value,t.panel,n.state):e.is(jP)?t=new lf(t.diagnostics,e.value?C5.open:null,t.selected):e.is(qz)&&(t=new lf(t.diagnostics,t.panel,e.value));return t},provide:t=>[M1.from(t,n=>n.panel),kt.decorations.from(t,n=>n.diagnostics)]}),FZ=Tt.mark({class:"cm-lintRange cm-lintRange-active"});function HZ(t,n,e){let{diagnostics:l}=t.state.field(ji),r=[],u=2e8,i=0;l.between(n-(e<0?1:0),n+(e>0?1:0),(a,o,{spec:h})=>{n>=a&&n<=o&&(a==o||(n>a||e>0)&&(nVz(t,e,!1)))}const bZ=t=>{let n=t.state.field(ji,!1);(!n||!n.panel)&&t.dispatch({effects:XZ(t.state,[jP.of(!0)])});let e=D1(t,C5.open);return e&&e.dom.querySelector(".cm-panel-lint ul").focus(),!0},GM=t=>{let n=t.state.field(ji,!1);return!n||!n.panel?!1:(t.dispatch({effects:jP.of(!1)}),!0)},nb=t=>{let n=t.state.field(ji,!1);if(!n)return!1;let e=t.state.selection.main,l=n.diagnostics.iter(e.to+1);return!l.value&&(l=n.diagnostics.iter(0),!l.value||l.from==e.from&&l.to==e.to)?!1:(t.dispatch({selection:{anchor:l.from,head:l.to},scrollIntoView:!0}),!0)},tb=[{key:"Mod-Shift-m",run:bZ,preventDefault:!0},{key:"F8",run:nb}],Lz=dt.define({combine(t){return Object.assign({sources:t.map(n=>n.source)},Wo(t.map(n=>n.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(n,e)=>n?e?l=>n(l)||e(l):n:e}))}});function Wz(t){let n=[];if(t)n:for(let{name:e}of t){for(let l=0;lu.toLowerCase()==r.toLowerCase())){n.push(r);continue n}}n.push("")}return n}function Vz(t,n,e){var l;let r=e?Wz(n.actions):[];return nl("li",{class:"cm-diagnostic cm-diagnostic-"+n.severity},nl("span",{class:"cm-diagnosticText"},n.renderMessage?n.renderMessage():n.message),(l=n.actions)===null||l===void 0?void 0:l.map((u,i)=>{let s=!1,a=f=>{if(f.preventDefault(),s)return;s=!0;let d=uw(t.state.field(ji).diagnostics,n);d&&u.apply(t,d.from,d.to)},{name:o}=u,h=r[i]?o.indexOf(r[i]):-1,c=h<0?o:[o.slice(0,h),nl("u",o.slice(h,h+1)),o.slice(h+1)];return nl("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${o}${h<0?"":` (access key "${r[i]})"`}.`},c)}),n.source&&nl("div",{class:"cm-diagnosticSource"},n.source))}class eb extends Ic{constructor(n){super(),this.diagnostic=n}eq(n){return n.diagnostic==this.diagnostic}toDOM(){return nl("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class JM{constructor(n,e){this.diagnostic=e,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Vz(n,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class C5{constructor(n){this.view=n,this.items=[];let e=r=>{if(r.keyCode==27)GM(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:u}=this.items[this.selectedIndex],i=Wz(u.actions);for(let s=0;s{for(let u=0;uGM(this.view)},"×")),this.update()}get selectedIndex(){let n=this.view.state.field(ji).selected;if(!n)return-1;for(let e=0;e{let o=-1,h;for(let c=l;cl&&(this.items.splice(l,o-l),r=!0)),e&&h.diagnostic==e.diagnostic?h.dom.hasAttribute("aria-selected")||(h.dom.setAttribute("aria-selected","true"),u=h):h.dom.hasAttribute("aria-selected")&&h.dom.removeAttribute("aria-selected"),l++});l({sel:u.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:i,panel:s})=>{i.tops.bottom&&(this.list.scrollTop+=i.bottom-s.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let n=this.list.firstChild;function e(){let l=n;n=l.nextSibling,l.remove()}for(let l of this.items)if(l.dom.parentNode==this.list){for(;n!=l.dom;)e();n=l.dom.nextSibling}else this.list.insertBefore(l.dom,n);for(;n;)e()}moveSelection(n){if(this.selectedIndex<0)return;let e=this.view.state.field(ji),l=uw(e.diagnostics,this.items[n].diagnostic);l&&this.view.dispatch({selection:{anchor:l.from,head:l.to},scrollIntoView:!0,effects:qz.of(l)})}static open(n){return new C5(n)}}function lb(t,n='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Dj(t){return lb(``,'width="6" height="3"')}const rb=kt.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-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:Dj("#d11")},".cm-lintRange-warning":{backgroundImage:Dj("orange")},".cm-lintRange-info":{backgroundImage:Dj("#999")},".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-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}}}),ub=[ji,kt.decorations.compute([ji],t=>{let{selected:n,panel:e}=t.field(ji);return!n||!e||n.from==n.to?Tt.none:Tt.set([FZ.range(n.from,n.to)])}),oX(HZ,{hideOn:BZ}),rb],ib=(()=>[pX(),jX(),VB(),NF(),sF(),PB(),MB(),Oe.allowMultipleSelections.of(!0),BX(),aF(fF,{fallback:!0}),yF(),MZ(),GZ(),ZB(),tX(),JB(),zH(),w5.of([...LZ,...NH,...iZ,...GF,...rF,...$z,...tb])])();class _2{constructor(n,e,l,r,u,i,s,a,o,h=0,c){this.p=n,this.stack=e,this.state=l,this.reducePos=r,this.pos=u,this.score=i,this.buffer=s,this.bufferBase=a,this.curContext=o,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter((n,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(n,e,l=0){let r=n.parser.context;return new _2(n,[],e,l,l,0,[],0,r?new KM(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}reduce(n){var e;let l=n>>19,r=n&65535,{parser:u}=this.p,i=u.dynamicPrecedence(r);if(i&&(this.score+=i),l==0){this.pushState(u.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((e=this.p.parser.nodeSet.types[r])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=o):this.p.lastBigReductionSizes;)this.stack.pop();this.reduceContext(r,a)}storeNode(n,e,l,r=4,u=!1){if(n==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&i.buffer[s-4]==0&&i.buffer[s-1]>-1){if(e==l)return;if(i.buffer[s-2]>=e){i.buffer[s-2]=l;return}}}if(!u||this.pos==l)this.buffer.push(n,e,l,r);else{let i=this.buffer.length;if(i>0&&this.buffer[i-4]!=0)for(;i>0&&this.buffer[i-2]>l;)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]=n,this.buffer[i+1]=e,this.buffer[i+2]=l,this.buffer[i+3]=r}}shift(n,e,l){let r=this.pos;if(n&131072)this.pushState(n&65535,this.pos);else if(n&262144)this.pos=l,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,l,4);else{let u=n,{parser:i}=this.p;(l>this.pos||e<=i.maxNode)&&(this.pos=l,i.stateFlag(u,1)||(this.reducePos=l)),this.pushState(u,r),this.shiftContext(e,r),e<=i.maxNode&&this.buffer.push(e,r,l,4)}}apply(n,e,l){n&65536?this.reduce(n):this.shift(n,e,l)}useNode(n,e){let l=this.p.reused.length-1;(l<0||this.p.reused[l]!=n)&&(this.p.reused.push(n),l++);let r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(l,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}split(){let n=this,e=n.buffer.length;for(;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;let l=n.buffer.slice(e),r=n.bufferBase+e;for(;n&&r==n.bufferBase;)n=n.parent;return new _2(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,l,r,this.curContext,this.lookAhead,n)}recoverByDelete(n,e){let l=n<=this.p.parser.maxNode;l&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,l?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(n){for(let e=new sb(this);;){let l=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(l==0)return!1;if(!(l&65536))return!0;e.reduce(l)}}recoverByInsert(n){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let r=[];for(let u=0,i;ua&1&&s==i)||r.push(e[u],i)}e=r}let l=[];for(let r=0;r>19,r=e&65535,u=this.stack.length-l*3;if(u<0||n.getGoto(this.stack[u],r,!1)<0){let i=this.findForcedReduction();if(i==null)return!1;e=i}this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:n}=this.p,e=[],l=(r,u)=>{if(!e.includes(r))return e.push(r),n.allActions(r,i=>{if(!(i&393216))if(i&65536){let s=(i>>19)-u;if(s>1){let a=i&65535,o=this.stack.length-s*3;if(o>=0&&n.getGoto(this.stack[o],a,!1)>=0)return s<<19|65536|a}}else{let s=l(i,u+1);if(s!=null)return s}})};return l(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(this.stack.length!=3)return!1;let{parser:n}=this.p;return n.data[n.stateSlot(this.state,1)]==65535&&!n.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class KM{constructor(n,e){this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0}}var BM;(function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth",t[t.MinBigReduction=2e3]="MinBigReduction"})(BM||(BM={}));class sb{constructor(n){this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}reduce(n){let e=n&65535,l=n>>19;l==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(l-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}class T2{constructor(n,e,l){this.stack=n,this.pos=e,this.index=l,this.buffer=n.buffer,this.index==0&&this.maybeNext()}static create(n,e=n.bufferBase+n.buffer.length){return new T2(n,e,e-n.bufferBase)}maybeNext(){let n=this.stack.parent;n!=null&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.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,this.index==0&&this.maybeNext()}fork(){return new T2(this.stack,this.pos,this.index)}}function tv(t,n=Uint16Array){if(typeof t!="string")return t;let e=null;for(let l=0,r=0;l=92&&i--,i>=34&&i--;let a=i-32;if(a>=46&&(a-=46,s=!0),u+=a,s)break;u*=46}e?e[r++]=u:e=new n(u)}return e}class Mv{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const XM=new Mv;class ob{constructor(n,e){this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=XM,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(n,e){let l=this.range,r=this.rangeIndex,u=this.pos+n;for(;ul.to:u>=l.to;){if(r==this.ranges.length-1)return null;let i=this.ranges[++r];u+=i.from-l.to,l=i}return u}clipPos(n){if(n>=this.range.from&&nn)return Math.max(n,e.from);return this.end}peek(n){let e=this.chunkOff+n,l,r;if(e>=0&&e=this.chunk2Pos&&ls.to&&(this.chunk2=this.chunk2.slice(0,s.to-l)),r=this.chunk2.charCodeAt(0)}}return l>=this.token.lookAhead&&(this.token.lookAhead=l+1),r}acceptToken(n,e=0){let l=e?this.resolveOffset(e,-1):this.pos;if(l==null||l=this.chunk2Pos&&this.posthis.range.to?n.slice(0,this.range.to-this.pos):n,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(n=1){for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,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(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=XM,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);let l="";for(let r of this.ranges){if(r.from>=e)break;r.to>n&&(l+=this.input.read(Math.max(r.from,n),Math.min(r.to,e)))}return l}}class Em{constructor(n,e){this.data=n,this.id=e}token(n,e){let{parser:l}=e.p;ab(this.data,n,e,this.id,l.data,l.tokenPrecTable)}}Em.prototype.contextual=Em.prototype.fallback=Em.prototype.extend=!1;Em.prototype.fallback=Em.prototype.extend=!1;function ab(t,n,e,l,r,u){let i=0,s=1<0){let C=t[d];if(a.allows(C)&&(n.token.value==-1||n.token.value==C||hb(C,n.token.value,r,u))){n.acceptToken(C);break}}let h=n.next,c=0,f=t[i+2];if(n.next<0&&f>c&&t[o+f*3-3]==65535&&t[o+f*3-3]==65535){i=t[o+f*3-1];continue n}for(;c>1,C=o+d+(d<<1),I=t[C],T=t[C+1]||65536;if(h=T)c=d+1;else{i=t[C+2],n.advance();continue n}}break}}function FM(t,n,e){for(let l=n,r;(r=t[l])!=65535;l++)if(r==e)return l-n;return-1}function hb(t,n,e,l){let r=FM(e,l,n);return r<0||FM(e,l,t)n)&&!l.type.isError)return e<0?Math.max(0,Math.min(l.to-1,n-25)):Math.min(t.length,Math.max(l.from+1,n+25));if(e<0?l.prevSibling():l.nextSibling())break;if(!l.parent())return e<0?0:t.length}}class cb{constructor(n,e){this.fragments=n,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 n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?ZM(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?ZM(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(n){if(nn)return this.nextStart=i,null;if(u instanceof lr){if(i==n){if(i=Math.max(this.safeFrom,n)&&(this.trees.push(u),this.start.push(i),this.index.push(0))}else this.index[e]++,this.nextStart=i+u.length}}}class fb{constructor(n,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(l=>new Mv)}getActions(n){let e=0,l=null,{parser:r}=n.p,{tokenizers:u}=r,i=r.stateSlot(n.state,3),s=n.curContext?n.curContext.hash:0,a=0;for(let o=0;oc.end+25&&(a=Math.max(c.lookAhead,a)),c.value!=0)){let f=e;if(c.extended>-1&&(e=this.addActions(n,c.extended,c.end,e)),e=this.addActions(n,c.value,c.end,e),!h.extend&&(l=c,e>f))break}}for(;this.actions.length>e;)this.actions.pop();return a&&n.setLookAhead(a),!l&&n.pos==this.stream.end&&(l=new Mv,l.value=n.p.parser.eofTerm,l.start=l.end=n.pos,e=this.addActions(n,l.value,l.end,e)),this.mainToken=l,this.actions}getMainToken(n){if(this.mainToken)return this.mainToken;let e=new Mv,{pos:l,p:r}=n;return e.start=l,e.end=Math.min(l+1,r.stream.end),e.value=l==r.stream.end?r.parser.eofTerm:0,e}updateCachedToken(n,e,l){let r=this.stream.clipPos(l.pos);if(e.token(this.stream.reset(r,n),l),n.value>-1){let{parser:u}=l.p;for(let i=0;i=0&&l.p.parser.dialect.allows(s>>1)){s&1?n.extended=s>>1:n.value=s>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}putAction(n,e,l,r){for(let u=0;un.bufferLength*4?new cb(l,n.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let n=this.stacks,e=this.minStackPos,l=this.stacks=[],r,u;if(this.bigReductionCount>300&&n.length==1){let[i]=n;for(;i.forceReduce()&&i.stack.length&&i.stack[i.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;ie)l.push(s);else{if(this.advanceStack(s,l,n))continue;{r||(r=[],u=[]),r.push(s);let a=this.tokens.getMainToken(s);u.push(a.value,a.end)}}break}}if(!l.length){let i=r&&wb(r);if(i)return this.stackToTree(i);if(this.parser.strict)throw ds&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&r){let i=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,u,l);if(i)return this.stackToTree(i.forceAll())}if(this.recovering){let i=this.recovering==1?1:this.recovering*3;if(l.length>i)for(l.sort((s,a)=>a.score-s.score);l.length>i;)l.pop();l.some(s=>s.reducePos>e)&&this.recovering--}else if(l.length>1){n:for(let i=0;i500&&o.buffer.length>500)if((s.score-o.score||s.buffer.length-o.buffer.length)>0)l.splice(a--,1);else{l.splice(i--,1);continue n}}}l.length>12&&l.splice(12,l.length-12)}this.minStackPos=l[0].pos;for(let i=1;i ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments){let o=n.curContext&&n.curContext.tracker.strict,h=o?n.curContext.hash:0;for(let c=this.fragments.nodeAt(r);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?u.getGoto(n.state,c.type.id):-1;if(f>-1&&c.length&&(!o||(c.prop(le.contextHash)||0)==h))return n.useNode(c,f),ds&&console.log(i+this.stackID(n)+` (via reuse of ${u.getName(c.type.id)})`),!0;if(!(c instanceof lr)||c.children.length==0||c.positions[0]>0)break;let d=c.children[0];if(d instanceof lr&&c.positions[0]==0)c=d;else break}}let s=u.stateSlot(n.state,4);if(s>0)return n.reduce(s),ds&&console.log(i+this.stackID(n)+` (via always-reduce ${u.getName(s&65535)})`),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););let a=this.tokens.getActions(n);for(let o=0;or?e.push(C):l.push(C)}return!1}advanceFully(n,e){let l=n.pos;for(;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>l)return n$(n,e),!0}}runRecovery(n,e,l){let r=null,u=!1;for(let i=0;i ":"";if(s.deadEnd&&(u||(u=!0,s.restart(),ds&&console.log(h+this.stackID(s)+" (restarted)"),this.advanceFully(s,l))))continue;let c=s.split(),f=h;for(let d=0;c.forceReduce()&&d<10&&(ds&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,l));d++)ds&&(f=this.stackID(c)+" -> ");for(let d of s.recoverByInsert(a))ds&&console.log(h+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,l);this.stream.end>s.pos?(o==s.pos&&(o++,a=0),s.recoverByDelete(a,o),ds&&console.log(h+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),n$(s,l)):(!r||r.scoren.topRules[s][1]),r=[];for(let s=0;s=0)u(h,a,s[o++]);else{let c=s[o+-h];for(let f=-h;f>0;f--)u(s[o++],a,c);o++}}}this.nodeSet=new rP(e.map((s,a)=>ti.define({name:a>=this.minRepeatTerm?void 0:s,id:a,props:r[a],top:l.indexOf(a)>-1,error:a==0,skipped:n.skippedNodes&&n.skippedNodes.indexOf(a)>-1}))),n.propSources&&(this.nodeSet=this.nodeSet.extend(...n.propSources)),this.strict=!1,this.bufferLength=pV;let i=tv(n.tokenData);this.context=n.context,this.specializerSpecs=n.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new Em(i,s):s),this.topRules=n.topRules,this.dialects=n.dialects||{},this.dynamicPrecedences=n.dynamicPrecedences||null,this.tokenPrecTable=n.tokenPrec,this.termNames=n.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(n,e,l){let r=new gb(this,n,e,l);for(let u of this.wrappers)r=u(r,n,e,l);return r}getGoto(n,e,l=!1){let r=this.goto;if(e>=r[0])return-1;for(let u=r[e+1];;){let i=r[u++],s=i&1,a=r[u++];if(s&&l)return a;for(let o=u+(i>>1);u0}validAction(n,e){return!!this.allActions(n,l=>l==e?!0:null)}allActions(n,e){let l=this.stateSlot(n,4),r=l?e(l):void 0;for(let u=this.stateSlot(n,1);r==null;u+=3){if(this.data[u]==65535)if(this.data[u+1]==1)u=sa(this.data,u+2);else break;r=e(sa(this.data,u+1))}return r}nextStates(n){let e=[];for(let l=this.stateSlot(n,1);;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=sa(this.data,l+2);else break;if(!(this.data[l+2]&1)){let r=this.data[l+1];e.some((u,i)=>i&1&&u==r)||e.push(this.data[l],r)}}return e}configure(n){let e=Object.assign(Object.create(D2.prototype),this);if(n.props&&(e.nodeSet=this.nodeSet.extend(...n.props)),n.top){let l=this.topRules[n.top];if(!l)throw new RangeError(`Invalid top rule name ${n.top}`);e.top=l}return n.tokenizers&&(e.tokenizers=this.tokenizers.map(l=>{let r=n.tokenizers.find(u=>u.from==l);return r?r.to:l})),n.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((l,r)=>{let u=n.specializers.find(s=>s.from==l.external);if(!u)return l;let i=Object.assign(Object.assign({},l),{external:u.to});return e.specializers[r]=t$(i),i})),n.contextTracker&&(e.context=n.contextTracker),n.dialect&&(e.dialect=this.parseDialect(n.dialect)),n.strict!=null&&(e.strict=n.strict),n.wrap&&(e.wrappers=e.wrappers.concat(n.wrap)),n.bufferLength!=null&&(e.bufferLength=n.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(n){return this.termNames?this.termNames[n]:String(n<=this.maxNode&&this.nodeSet.types[n].name||n)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(n){let e=this.dynamicPrecedences;return e==null?0:e[n]||0}parseDialect(n){let e=Object.keys(this.dialects),l=e.map(()=>!1);if(n)for(let u of n.split(" ")){let i=e.indexOf(u);i>=0&&(l[i]=!0)}let r=null;for(let u=0;ul)&&e.p.parser.stateFlag(e.state,2)&&(!n||n.scoret.external(e,l)<<1|n}return t.get}let $p=()=>new le({deserialize:t=>!0});const zz=$p(),Uz=$p(),Yz=$p(),Qz=$p(),Gz=$p();var Kw=Object.freeze({__proto__:null,coll:zz,prefixColl:Uz,prefixEdge:Yz,sameEdge:Qz,prefixContainer:Gz});const db={__proto__:null,true:136,false:136,nil:138,def:147,defn:147,"defn-":147,defmacro:147,definline:147,defonce:147,deftest:147,defcard:147,ns:155},pb=D2.deserialize({version:14,states:"-zQ]QPOOP!pOPOOOOQO'#C`'#C`OOQO'#Cb'#CbO]QPO'#CcO]QPO'#CeO]QPO'#CgO]QPO'#CiO]QPO'#CkO]OPO'#CtO]OPO'#CvO!uOQO'#C|OOQO'#Dm'#DmQ]QPOOO$hQPO'#CqO$oQPO'#DUO$vQPO'#DXO$}OSO'#DZO%cOPO'#D]O%hOPO'#D`O%mOPO'#DbO%uOWO'#DdO]QPO'#DgO]QPO'#DhO%zQPO'#DjOOQO'#Dq'#DqP&SQPO'#C^POOO)C?e)C?eOOQO,58},58}OOQO,59P,59POOQO,59R,59ROOQO,59T,59TOOQO,59V,59VOOQO,59`,59`OOQO,59b,59bOOQO,59h,59hO'gOPO,59hOOQO-E7k-E7kOOQO'#Cr'#CrO!}QPO'#CsOOQO'#Dv'#DvO'lQPO'#D|O'sQPO'#DuOOQO'#DO'#DOOOQO'#Dz'#DzO'sQPO'#DyOOQO'#DQ'#DQOOQO'#D}'#D}O'lQPO'#D|OOQO'#Dt'#DtO(OQPO,59]O(TQPO,59pOOQO,59p,59pO([QPO,59sOOQO,59s,59sOOQO,59u,59uOOOO,59x,59xOOQO,59y,59yOOQO,5:Q,5:QOOQO,5:T,5:TOOQO,5:V,5:VOOQO,59w,59wOOQO,59z,59zOOQO,59|,59|OOQO,5:O,5:OOOQO,5:R,5:ROOQO,5:S,5:SOOQO,5:U,5:UPOOO,58x,58xOOQO1G/S1G/SOOQO,59_,59_OOQO,59k,59kOOQO,59m,59mOOQO'#Cx'#CxO'sQPO'#CyOOQO'#Dx'#DxO(cQPO,5:aO(jQPO,5:eO(qQPO,5:hOOQO1G.w1G.wOOQO1G/[1G/[OOQO1G/_1G/_OOQO,59e,59eO(xQPO'#CzO*`QPO1G/{O]QPO1G/{OOQO'#Cz'#CzO*gQPO1G0PO*gQPO1G0PO*nQPO7+%gO*uQPO7+%kP&SQPO'#CcP&SQPO'#CeP&SQPO'#CgP&SQPO'#CiP&SQPO'#CkP*|OPO'#DbP&SQPO'#DgP&SQPO'#Dh",stateData:"+[~O!dOSPOSRPQ~OTiOWSOYTO[UO^VO`WOaiObiOd^OiXOkYOoZOw_Oz`O|iO!OaO!TcO!VdO!XeO!fQO!gRO~ORjO~OosOqtO~OT!OOWSOYTO[UO^VO`WOaiObiOd^OiXOkYOoZOw_Oz`O|iO!OaO!TcO!VdO!XeO!fQO!gRO!kvO!o{O~Oc!pP~P!}Ov!UO~P]Oy!WO~P]Od^OoZOz`O!r!YO!t!]O!u!^O~Oz`O~OT!`O~OWSOd^O~O!s!bO~Ow_Oz`O~OTiOW!}OY#OO[#PO^#QO`#ROaiObiOd^OiXOkYOoZOw_Oz`O|iO!OaO!TcO!V#SO!XeO!fQO!gRO~Oo!gO~Oc!pX~P]OT!kOiXOkYO~Oc!qO~Ov!rO~P]Oy!sO~P]Oc!ia~P]Oc!ma~P]Oc!pa~P]OTnXWnXYnX[nX^nX`nXanXbnXc!eXdnXinXknXonXwnXznX|nX!OnX!TnX!VnX!XnX!fnX!gnX~Oc!ii~P]Oc!mi~P]Oc!iq~P]Oc!mq~P]OW!}Od^O~Oa!u!tT!t~",goto:"/]!rPP!sP!vP!v#nP!vP!vP!vP!vPPPPP$j%i%i%mP%mP&n&n&sP&yP'x'x'|'|PP(QPP({P!vP!v)|!v!vP!vP!vP!v!v!v*t!v+nP,fPPP-^PP.j.m.pP.v.m/PP.m/VRkP!kiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#U!jiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UT!ad#S!jiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UQ![aT!ad#STx^w!UfOSTUVWXY]_`fgy!Q!T!V!n!o!p!v!w!y!z!{!|Sw^wU!lz}!la#Tj!}#O#P#Q#R#T#UV!mz}!lQ!w!nR!z!o!fiOSTUVWXY]^_`fgjwy!Q!T!V!p!v!w!y!z!{!|!}#O#P#Q#R#T#UQ!ZaQ!u!nR!x!oT|^wT!P^w!jiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UR!eh!jiOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UQ!XaQ!_bR!eh!kbOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#U!YgOSTUVWXY]^_`fgwy!Q!T!V!n!o!p!v!w!y!z!{!|a#Uj!}#O#P#Q#R#T#U!khOSTUVWXY]^_`fgjwy!Q!T!V!n!o!p!v!w!y!z!{!|!}#O#P#Q#R#T#UQ]Obu]y!T!V!p!v!y!{!|Qy^Q!T_Q!V`Q!p!QQ!v!nQ!y!oQ!{!wR!|!zt[O]^_`y!Q!T!V!n!o!p!v!w!y!z!{!|SlS!}SmT#OSnU#PSoV#QSpW#RQqXQrYU!cfw#TS!dg#UR!fjR!S^R!R^Qz^R!hwQ!nzQ!o}R!t!lQ}^R!iwQ!Q^R!jw",nodeNames:"⚠ LineComment Discard #_ Boolean Symbol Nil Deref @ Quote ' SyntaxQuote ` Unquote ~ UnquoteSplice ~@ Number Keyword ) ( List DefLike Meta Metadata ^ ReaderMetadata #^ VarName Meta DocString \" String StringContent NS Meta Operator Meta ] [ Vector } { Map Character Set # NamespacedMap KeywordPrefix RegExp Var #' ReaderConditional #? SymbolicValue ## AnonymousFunction Meta TaggedLiteral ReaderTag ConstructorCall ConstructorPrefix Program",maxTerm:83,nodeProps:[[Yz,-14,3,8,10,12,14,16,25,27,46,48,51,53,55,61,""],[Uz,-13,7,9,11,13,15,24,26,45,47,49,50,52,56,""],["openedBy",19,"(",31,'"',38,"[",41,"{"],["closedBy",20,")",31,'"',39,"]",42,"}"],[zz,-3,21,40,43,""],[Gz,-7,23,29,35,37,57,58,60,""],[Qz,31,""]],skippedNodes:[0,1,2,3],repeatNodeCount:1,tokenData:"#6x~R![OX$wX^%n^p$wpq%nqr'grs,Tst,Ytu/Yuv'gvw'gwx6Vxy6jyz6}z{'g{|7b|}%n}!O7b!O!P9t!P!Q)v!Q!R!8[!R![!>t![!]!Cp!]!^!J]!^!_'g!_!`'g!`!a'g!a!b'g!b!c!Kr!c!}/Y!}#O!LV#O#P!Lj#P#Q#3w#Q#R#4[#R#S/Y#S#T#4o#T#o/Y#o#p#5S#p#q$w#q#r#5g#r#s#5z#s#y$w#y#z%n#z$f$w$f$g%n$g##l/Y##l#BY$w#BY#BZ%n#BZ$IS$w$IS$I_%n$I_$I|$w$I|$JO%n$JO$JT$w$JT$JU%n$JU$KV$w$KV$KW%n$KW&FU$w&FU&FV%n&FV~$wQ$|SqQOr$ws#O$w#O#P%Y#P~$wQ%_TqQOr$wrs$ws#O$w#O#P%Y#P~$wR%ujqQ!dPOX$wX^%n^p$wpq%nqr$ws|$w|}%n}#O$w#O#P%Y#P#y$w#y#z%n#z$f$w$f$g%n$g#BY$w#BY#BZ%n#BZ$IS$w$IS$I_%n$I_$I|$w$I|$JO%n$JO$JT$w$JT$JU%n$JU$KV$w$KV$KW%n$KW&FU$w&FU&FV%n&FV~$w_'rpqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q!['g![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$wZ*PpqQ!sWTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![)v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$w~,YOo~R,a[!OPqQOr$wst-Vtw$wwx-jx!a$w!a!b-}!b#O$w#O#P%Y#P#Q$w#Q#R.b#R#S.u#S~$wR-^S!XPqQOr$ws#O$w#O#P%Y#P~$wR-qS!TPqQOr$ws#O$w#O#P%Y#P~$wR.US!VPqQOr$ws#O$w#O#P%Y#P~$wR.iSkPqQOr$ws#O$w#O#P%Y#P~$wR.|SRPqQOr$ws#O$w#O#P%Y#P~$w_/epqQ!sW!tSTPOq$wqr'gst)vtu/Yuv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P1i!P!Q'g!Q![/Y![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}/Y!}#O$w#O#P%Y#P#R$w#R#S/Y#S#T$w#T#o/Y#o$g$w$g##l/Y##l~$w_1rpqQ!sWTPOq$wqr)vst)vtu3vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![)v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!}3v!}#O$w#O#P%Y#P#R$w#R#S3v#S#T$w#T#o3v#o$g$w$g##l3v##l~$w_4RpqQ!sW!uSTPOq$wqr)vst)vtu3vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P1i!P!Q)v!Q![3v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!}3v!}#O$w#O#P%Y#P#R$w#R#S3v#S#T$w#T#o3v#o$g$w$g##l3v##l~$wR6^SYPqQOr$ws#O$w#O#P%Y#P~$wV6qSdTqQOr$ws#O$w#O#P%Y#P~$wR7UScPqQOr$ws#O$w#O#P%Y#P~$w_7mqqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P9t!P!Q'g!Q!RHO!R![!&|![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$wZ9}pqQ!sWTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![n!h!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#X)v#X#Y>n#Y#o)v#o$g$w$g##l)v##l~$wZ>wpqQ!sWTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|@{|}$w}!O@{!O!P)v!P!Q)v!Q![CY![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$wZAUpqQ!sWTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![CY![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$wZCerqQ!sWaPTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![CY![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!o)v!o!pEo!p!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$wZEzpqQ!sWaPTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![)v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#o)v#o$g$w$g##l)v##l~$w_H]yqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!PJ|!P!Q!![!Q![!&|![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!g'g!g!h!)t!h!o'g!o!p!0{!p!q!0{!q!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#X'g#X#Y!)t#Y#l'g#l#m!3^#m#o'g#o$g$w$g##l'g##l~$wZKXvqQ!sWaPTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![J|![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!g)v!g!h>n!h!o)v!o!pMo!p!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#X)v#X#Y>n#Y#o)v#o$g$w$g##l)v##l~$wZMztqQ!sWaPTPOq$wqr)vst)vtu)vuv)vvw)vwx)vxz$wz{)v{|)v|}$w}!O)v!O!P)v!P!Q)v!Q![)v![!])v!]!^$w!^!_)v!_!`)v!`!a)v!a!b)v!b!c$w!c!g)v!g!h>n!h!})v!}#O$w#O#P%Y#P#R$w#R#S)v#S#T$w#T#X)v#X#Y>n#Y#o)v#o$g$w$g##l)v##l~$w_!!gpqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!$k![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!$xpqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!$k![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!'ZwqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!PJ|!P!Q!![!Q![!&|![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!g'g!g!h!)t!h!o'g!o!p!0{!p!q!0{!q!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#X'g#X#Y!)t#Y#o'g#o$g$w$g##l'g##l~$w_!*PpqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|!,T|}$w}!O!,T!O!P)v!P!Q'g!Q![!.d![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!,`pqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!.d![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!.qrqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!.d![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!o'g!o!p!0{!p!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!1YpqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q!['g![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#o'g#o$g$w$g##l'g##l~$w_!3irqQ!sW!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!5s![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!i!5s!i!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#Z!5s#Z#o'g#o$g$w$g##l'g##l~$w_!6QrqQ!sWaP!tSTPOq$wqr'gst)vtu'guv'gvw'gwx)vxz$wz{'g{|'g|}$w}!O'g!O!P)v!P!Q'g!Q![!5s![!])v!]!^$w!^!_'g!_!`'g!`!a'g!a!b'g!b!c$w!c!i!5s!i!}'g!}#O$w#O#P%Y#P#R$w#R#S'g#S#T$w#T#Z!5s#Z#o'g#o$g$w$g##l'g##l~$wR!8ceqQaPOr$ws!O$w!O!P!9t!P!Q!=r!Q![!>t![!g$w!g!h!:q!h!o$w!o!p!Z![#O$w#O#P%Y#P~$wR!>bUqQaPOr$ws!Q$w!Q![!>Z![#O$w#O#P%Y#P~$wR!>{_qQaPOr$ws!O$w!O!P!9t!P!Q!=r!Q![!>t![!g$w!g!h!:q!h!o$w!o!p!db[t]||-1}],tokenPrec:466});var p,zn=function(t){var n=typeof t;return n!="object"?n:t?Array.isArray(t)?"array":n:"null"},A5=function(t){return Object.prototype.hasOwnProperty.call(t,Qj)&&t[Qj]||(t[Qj]=++ten)},Np=function(t,n){const e=t.length-n.length;return 0<=e&&t.indexOf(n,e)==e},W1=function(t){return/^[\s\xa0]*$/.test(t)},E5=function(t){const n=[];let e=0;for(const l in t)n[e++]=l;return n},R5=function(t,n){return t!==null&&n in t?t[n]:void 0},pk=function(t){const n=arguments.length;if(n==1&&Array.isArray(arguments[0]))return pk.apply(null,arguments[0]);if(n%2)throw Error("Uneven number of arguments");const e={};for(let l=0;ln?1:t=t||"€"<=t&&"�">=t},xP=function(t){return String(t.charAt(0)).toUpperCase()+String(t.slice(1)).toLowerCase()},rl=function(t,n){t!=null&&this.append.apply(this,arguments)},po=function(){return new P(null,5,[$Q,!0,vd,Be,HI,or,Kun,Rl,_7,Jt],null)},Kz=function(){Qe=!1,Fl=function(){var t=arguments,n=console.log,e=n.apply,l=console;{const r=t.length;if(0>>-15,461845907)},Bw=function(t,n){return t=(t|0)^(n|0),oc(t<<13|t>>>-13,5)+-430675100|0},Xw=function(t,n){return t=(t|0)^n,t=oc(t^t>>>16,-2048144789),t=oc(t^t>>>13,-1028477387),t^t>>>16},bz=function(t){if(255>2)},lh=function(t){return t instanceof S},kP=function(t){var n=t.name;n:for(var e=1,l=0;;)if(e=l)return-1;for(!(0e&&(e+=l,e=0>e?0:e);;)if(ee?l+e:e;;)if(0<=e){if(X.g(m.g?m.g(t,e):m.call(null,t,e),n))return e;--e}else return-1},AP=function(t,n){this.s=t,this.D=n},un=function(t,n,e){this.s=t,this.D=n,this.B=e,this.v=166592766,this.H=139264},z=function(t){return 0t):!1},Gn=function(t,n){return t!=null&&(t.v&512||On===t.Nd)?t.fb(null,n):Qn(xk,t)?N2(t,n):cn.i(t,n,Mu)!==Mu},Xi=function(t,n){return(t!=null?On===t.hc||!t.Oc&&Qn(a$,t):Qn(a$,t))?q2(t,n):t!=null&&rU(t)&&Gn(t,n)?new Ln(n,cn.g(t,n)):null},Zh=function(t,n){if(t===n)return 0;if(t==null)return-1;if(n==null)return 1;if(typeof t=="number"){if(typeof n=="number")return ns(t,n);throw Error(["Cannot compare ",M.h(t)," to ",M.h(n)].join(""))}if(t!=null?t.H&2048||On===t.fc||!t.H&&Qn(x$,t):Qn(x$,t))return Dk(t,n);if(typeof t!="string"&&!vu(t)&&t!==!0&&t!==!1||cr(t)!==cr(n))throw Error(["Cannot compare ",M.h(t)," to ",M.h(n)].join(""));return ns(t,n)},zp=function(t,n){var e=an(t),l=an(n);if(el)t=1;else if(e===0)t=0;else n:for(l=0;;){var r=Zh(m.g(t,l),m.g(n,l));if(r===0&&l+1>n},rN=function(t,n){return t>>>n},$a=function(t){return t-=t>>1&1431655765,t=(t&858993459)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24},uN=function(t){return 0t},Fe=function(t,n){if(mo(n))if(Y1(t)&&Y1(n)&&an(t)!==an(n))t=!1;else n:for(t=E(t),n=E(n);;){if(t==null){t=n==null;break n}if(n!=null&&X.g(j(t),j(n)))t=A(t),n=A(n);else{t=!1;break n}}else t=null;return ol(t)},g=function(t,n,e,l,r){this.B=t,this.first=n,this.$b=e,this.count=l,this.C=r,this.v=65937646,this.H=8192},Zw=function(t){return t!=null?t.v&33554432||On===t.ef?!0:t.v?!1:Qn(d$,t):Qn(d$,t)},bw=function(t){this.B=t,this.v=65937614,this.H=8192},hU=function(t){return t!=null?t.v&134217728||On===t.jf?!0:t.v?!1:Qn(p$,t):Qn(p$,t)},df=function(t){return hU(t)?(t=z1(t))?t:At:En.i(In,At,t)},Na=function(t,n,e,l){this.B=t,this.first=n,this.$b=e,this.C=l,this.v=65929452,this.H=8192},Dn=function(t,n){return n==null?new g(null,t,null,1,null):n!=null&&(n.v&64||On===n.Ac)?new Na(null,t,n,null):new Na(null,t,E(n),null)},kb=function(t,n){if(t.za===n.za)return 0;var e=Xn(t.eb);return x(e&&n.eb)?-1:x(t.eb)?Xn(n.eb)?1:(e=ns(t.eb,n.eb),e===0?ns(t.name,n.name):e):ns(t.name,n.name)},F=function(t,n,e,l){this.eb=t,this.name=n,this.za=e,this.vc=l,this.v=2153775105,this.H=4096},Lk=function(t){return t instanceof F},on=function(t,n){return t===n?!0:t instanceof F&&n instanceof F?t.za===n.za:!1},qe=function(t){if(t!=null&&(t.H&4096||On===t.Ud))return t.yc(null);throw Error(["Doesn't support namespace: ",M.h(t)].join(""))},Wk=function(t){return t instanceof F||t instanceof S},Up=function(t){return t instanceof S&&qe(t)==null},$v=function(t){var n=t instanceof S;return n?(t=qe(t),t=x(t)?!0:t):t=n,ol(t)},Mt=function(t,n,e,l){this.B=t,this.ra=n,this.R=e,this.C=l,this.v=32374988,this.H=1},oN=function(t){return t.ra!=null&&(t.R=t.ra.m?t.ra.m():t.ra.call(null),t.ra=null),t.R},T5=function(t){this.mc=t,this.end=0,this.v=2,this.H=0},ui=function(t){return new T5(Array(t))},$f=function(t,n,e){this.s=t,this.Za=n,this.end=e,this.v=524306,this.H=0},Mc=function(t,n,e,l){this.Va=t,this.Bb=n,this.B=e,this.C=l,this.v=31850732,this.H=1536},al=function(t,n){return Es(t)===0?n:new Mc(t,n,null,null)},qa=function(t,n){return t.add(n)},ql=function(t){return t.Va()},di=function(t){var n=[];for(t=E(t);;)if(t!=null)n.push(j(t)),t=A(t);else return n},nd=function(t,n){if(Y1(n))return an(n);var e=0;for(n=E(n);;)if(n!=null&&et?0:t-1>>>5<<5},L5=function(t,n,e){for(;;){if(n===0)return e;var l=jU(t);l.s[0]=e,e=l,n-=5}},xU=function(t,n){throw Error(["No item ",M.h(t)," in vector of length ",M.h(n)].join(""))},rs=function(t,n){if(n>=qc(t))return t.$a;var e=t.root;for(t=t.shift;;)if(0>>t&31],t=l}else return e.s},MP=function(t,n){return 0<=n&&ne)return new v(null,e,5,y,t,null);n=32;for(var l=new v(null,32,5,y,t.slice(0,32),null).wc(null);;)if(ne||lan(n))throw Error("Index out of bounds");return new bh(t,n,e,l,r)}},Q1=function(t,n){return t===n.$?n:new vo(t,Ae(n.s))},Nj=function(t){return new vo({},Ae(t.s))},qj=function(t){var n=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];return ei(t,0,n,0,t.length),n},OU=function(t,n,e,l){this.A=t,this.shift=n,this.root=e,this.$a=l,this.H=88,this.v=275},Sb=function(t,n,e){if(t.root.$){if(0<=n&&n>>u&31;u=r(u-5,i.s[s]),i.s[s]=u}return i}(t.shift,t.root);t.root=l}return t}if(n===t.A)return t.Cc(null,e);throw Error(["Index ",M.h(n)," out of bounds for TransientVector of length",M.h(t.A)].join(""))}throw Error("assoc! after persistent!")},W5=function(t,n){this.Dc=t,this.Yc=n},yo=function(t,n,e,l){this.B=t,this.ib=n,this.kb=e,this.C=l,this.v=31850700,this.H=0},us=function(t,n,e,l,r){this.B=t,this.count=n,this.ib=e,this.kb=l,this.C=r,this.H=139264,this.v=31858766},CU=function(){this.v=2097152,this.H=0},AU=function(t,n){return ol(we(n)&&!Dc(n)&&an(t)===an(n)?(t!=null?t.v&1048576||On===t.df||!t.v&&Qn(m$,t):Qn(m$,t))?Hw(function(e,l,r){return X.g(cn.i(n,l,FN),r)?!0:zo(!1)},!0,t):Ol(function(e){return X.g(cn.i(n,j(e),FN),Rt(e))},t):null)},yu=function(t,n,e,l){this.D=0,this.Ne=t,this.Ld=n,this.Je=e,this.fe=l},V5=function(t){this.R=t},LP=function(t){this.R=t},Lc=function(t,n){if(n instanceof F)n:{var e=t.length;n=n.za;for(var l=0;;){if(e<=l){t=-1;break n}if(t[l]instanceof F&&n===t[l].za){t=l;break n}l+=2}}else if(typeof n=="string"||typeof n=="number")n:for(e=t.length,l=0;;){if(e<=l){t=-1;break n}if(n===t[l]){t=l;break n}l+=2}else if(n instanceof S)n:for(e=t.length,n=n.Mb,l=0;;){if(e<=l){t=-1;break n}if(t[l]instanceof S&&n===t[l].Mb){t=l;break n}l+=2}else if(n==null)n:for(n=t.length,e=0;;){if(n<=e){t=-1;break n}if(t[e]==null){t=e;break n}e+=2}else n:for(e=t.length,l=0;;){if(e<=l){t=-1;break n}if(X.g(n,t[l])){t=l;break n}l+=2}return t},Ln=function(t,n){this.key=t,this.val=n,this.C=null,this.v=166619935,this.H=0},Oa=function(t){return t!=null?!!(t.v&2048||On===t.gf):!1},uh=function(t,n,e){this.s=t,this.D=n,this.sb=e,this.v=32374990,this.H=0},WP=function(t,n){this.s=t,this.D=0,this.A=n},P=function(t,n,e,l){this.B=t,this.A=n,this.s=e,this.C=l,this.v=16647951,this.H=139268},Ri=function(t,n){return t===n||on(t,n)?!0:X.g(t,n)},Ob=function(t){for(var n=0,e=0;;)if(n=r){if(Ri(e[r],e[i]))return i;i-=2}else return i}(),t[u]=e[r],t[u+1]=e[n+1],n=2+u,r=2+r,u=n);return new P(null,t.length/2,t,null)}return new P(null,e.length/2,e,null)},EU=function(t,n){this.qc={},this.zb=t,this.s=n,this.v=259,this.H=56},Lj=function(t,n){for(var e=He(md),l=0;;)if(ll?e.left:e.right}else return null},Wc=function(t,n){this.aa=t,this.sb=n,this.v=32374988,this.H=0},xe=function(t){return(t=E(t))?new Wc(t,null):null},Nl=function(t){return bu(t)},Vc=function(t,n){this.aa=t,this.sb=n,this.v=32374988,this.H=0},ir=function(t){return(t=E(t))?new Vc(t,null):null},su=function(t){return Ei(t)},zc=function(t,n){var e=vn;for(n=E(n);;)if(n){var l=j(n),r=cn.i(t,l,uL);e=es.g(r,uL)?fn.i(e,l,r):e,n=A(n)}else return Re(e,Wn(t))},Q5=function(t){this.Gc=t},ht=function(t,n,e){this.B=t,this.Yb=n,this.C=e,this.v=15077647,this.H=139268},ih=function(t){for(var n=t.length,e=He(Ke),l=0;lye)return Rn(t,"#");if(Rn(t,e),_7.h(u)===0)E(i)&&Rn(t,function(){var d=Nq.h(u);return x(d)?d:"..."}());else{if(E(i)){var a=j(i);n.i?n.i(a,t,u):n.call(null,a,t,u)}for(var o=A(i),h=_7.h(u)-1;;)if(!o||h!=null&&h===0){E(o)&&h===0&&(Rn(t,l),Rn(t,function(){var d=Nq.h(u);return x(d)?d:"..."}()));break}else{Rn(t,l);var c=j(o);e=t,i=u,n.i?n.i(c,e,i):n.call(null,c,e,i);var f=A(o);e=h-1,o=f,h=e}}return Rn(t,r)}finally{ye=s}},ps=function(t,n){n=E(n);for(var e=null,l=0,r=0;;)if(rjs",t)}return t},dN=function(t,n){return(t!=null?On===t.we||!t.Oc&&Qn(Z2,t):Qn(Z2,t))?b2(t):typeof t=="string"||typeof t=="number"||t instanceof F||t instanceof S?n.h?n.h(t):n.call(null,t):Us.j(z([t]))},pN=function(){},Gk=function(t,n){if(t!=null&&t.ve!=null)t=t.ve(t,n);else{var e=Gk[zn(t??null)];if(e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else if(e=Gk._,e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else throw Un("IEncodeClojure.-js->clj",t)}return t},qU=function(t){var n=et.h(vn);return function(){function e(r){var u=null;if(0=n||n>=2+an(t)?In.g(_n(Dn("",Mn.g(M,E(t)))),""):x(pi.g?pi.g(1,n):pi.call(null,1,n))?new v(null,1,5,y,[t],null):x(pi.g?pi.g(2,n):pi.call(null,2,n))?new v(null,2,5,y,["",t],null):(n-=2,In.g(_n(Dn("",Ba.i(_n(Mn.g(M,E(t))),0,n))),vt.g(t,n)))},QU=function(t,n){return t.indexOf(n)!=-1},pf=function(t,n,e,l,r){this.Lb=t,this.form=n,this.J=e,this.G=l,this.C=r,this.v=2230716170,this.H=139264},$b=function(t,n){return new pf(n,t,null,null,null)},Aa=function(t){return t==null?null:t===","?!0:tsn.test(t)},ry=function(t){return t==null?null:!/[^0-9]/.test(t)},H5=function(t){return t===` `||t===` -`||t==null},Fk=function(t,n){return function e(l){return new Mt(null,function(){for(;;){var r=E(l);if(r){if(re(r)){var u=Ht(r),i=an(u),s=ui(i);return function(){for(var o=0;;)if(oe?(n=e.toString(16),t=Xl(t,z(["Invalid character literal \\u",n,"."]))):t=n,t):x(n.lastIndexOf("o",0)==0)?(--e,3T.getLength())T=T.append("0");else{T=T.toString();break n}return T=Ho(T),x(T)?T:0}();return o=(X.g(o,"-")?-1:1)*(60*function(){var T=Ho(h);return x(T)?T:0}()+function(){var T=Ho(c);return x(T)?T:0}()),new v(null,8,5,y,[t,Jg(1,n,12,"timestamp month field must be in range 1..12"),Jg(1,e,osn(n,wf(t,4)===0&&(wf(t,100)!==0||wf(t,400)===0)),"timestamp day field must be in range 1..last day in month"),Jg(0,f,23,"timestamp hour field must be in range 0..23"),Jg(0,d,59,"timestamp minute field must be in range 0..59"),Jg(0,C,X.g(d,59)?60:59,"timestamp second field must be in range 0..60"),Jg(0,I,999,"timestamp millisecond field must be in range 0..999"),o],null)},Uv=function(t){if(typeof t=="string"){var n=Zb(t);if(x(n)){t=m.i(n,0,null);var e=m.i(n,1,null),l=m.i(n,2,null),r=m.i(n,3,null),u=m.i(n,4,null),i=m.i(n,5,null),s=m.i(n,6,null);n=m.i(n,7,null),n=new Date(Date.UTC(t,e-1,l,r,u,i,s)-6e4*n)}else throw Error(["Unrecognized date/time syntax: ",M.h(t)].join(""));return n}throw Error("Instance literal expects a string for its timestamp.")},bb=function(t){return typeof t=="string"||t instanceof F&&qe(t)==null},eY=function(t){this.val=t},nnn=function(t,n,e){if(Zw(e))return mt(function(){var r=dn.g(U,Mn.g(t,e));return n.h?n.h(r):n.call(null,r)}(),Wn(e));if(Oa(e)){var l=new Ln(function(){var r=bu(e);return t.h?t.h(r):t.call(null,r)}(),function(){var r=Ei(e);return t.h?t.h(r):t.call(null,r)}());return n.h?n.h(l):n.call(null,l)}return he(e)?mt(function(){var r=Qc.h(Mn.g(t,e));return n.h?n.h(r):n.call(null,r)}(),Wn(e)):Dc(e)?(l=En.i(function(r,u){return In.g(r,t.h?t.h(u):t.call(null,u))},e,e),n.h?n.h(l):n.call(null,l)):mg(e)?(l=Dt.g(Wp(e),Mn.g(t,e)),n.h?n.h(l):n.call(null,l)):n.h?n.h(e):n.call(null,e)},tnn=function(t){var n=Ye(new P(null,2,[af,0,j6,!1],null));t=csn(function(r){if(r instanceof S){var u=J5(/^%(.*)/,Zn(r));if(x(u)){if(m.i(u,0,null),u=m.i(u,1,null),oe(u))return n.Ib(null,_e.u(n.gb(null),af,Oo,1)),vln;X.g("&",u)?n.Ib(null,fn.i(n.gb(null),j6,!0)):(u=parseInt(u),n.Ib(null,_e.u(n.gb(null),af,Oo,u)))}}return r},t);var e=J(n),l=gl(e);return e=cn.g(l,af),l=cn.g(l,j6),e=Mn.g(function(r){return $n.h(["%",M.h(r)].join(""))},Nu.g(1,e+1)),e=_n(D.g(e,x(l)?new v(null,2,5,y,[Cn,pln],null):null)),new g(null,xc,new g(null,e,new g(null,t,null,1,null),2,null),3,null)},uv=function(t,n,e,l){n:{l=E(l);for(var r=He(Yn);;)if(l){var u=j(l);r=ar.g(r,he(u)&&X.g(j(u),$3)?new g(null,mS,new g(null,Rt(u),null,1,null),2,null):he(u)&&X.g(j(u),bI)?Rt(u):new g(null,mS,new g(null,Yv.i?Yv.i(t,n,u):Yv.call(null,t,n,u),null,1,null),2,null)),l=A(l)}else{t=E(ul(r));break n}}return t=new g(null,Fen,new g(null,new g(null,Mun,new g(null,Dn(Uin,t),null,1,null),2,null),null,1,null),2,null),x(e)?new g(null,ain,new g(null,e,new g(null,t,null,1,null),2,null),3,null):t},enn=function(t){t=E(t);for(var n=He(Yn);;)if(t){var e=j(t);t=A(t),n=ar.g(ar.g(n,bu(e)),Ei(e))}else return E(ul(n))},AN=function(t,n,e){var l=gl(t),r=cn.g(l,QQ);if(ey(e))return new g(null,Bt,new g(null,e,null,1,null),2,null);if(e instanceof S)return new g(null,Bt,new g(null,function(){var u=Zn(e);if(ey(e))return e;if(Np(u,"#")){var i=cn.g(J(r),e);return x(i)?i:(u=vt.i(u,0,u.length-1),u=ne.h([u,"__"].join("")),u=$n.h([Zn(u),"__auto__"].join("")),ut.u(r,fn,e,u),u)}return u=RQ.h(Iu.h(l)),u=x(u)?u:fs,u.h?u.h(e):u.call(null,e)}(),null,1,null),2,null);if(he(e)&&X.g(j(e),$3))return Rt(e);if(he(e)&&X.g(j(e),bI))throw Error("unquote-splice not in list");if(mg(e)){if(e instanceof _h)return e;if(we(e))return uv(l,n,16<=an(e)?Oin:Fln,enn(e));if(wt(e))return new g(null,Fin,new g(null,uv(l,n,null,e),null,1,null),2,null);if(rh(e))return uv(l,n,wrn,e);if(he(e)||Zw(e))return(t=E(e))?uv(l,n,null,t):U(mS);throw Error("Unknown Collection type")}return e instanceof F||typeof e=="number"||Fz(e)||typeof e=="string"||e==null||PP(e)||e instanceof RegExp?e:new g(null,Bt,new g(null,e,null,1,null),2,null)},Yv=function(t,n,e){var l=AN(t,n,e),r=e!=null?!!(e.v&262144||On===e.wd):!1;return r&&E(Ct.j(Wn(e),Pu.h(t),z([Eu.h(t),Ti.h(t),$i.h(t)])))?new g(null,brn,new g(null,l,new g(null,AN(t,n,Wn(e)),null,1,null),2,null),3,null):l},Qr=function(t,n,e){return pg(t,n,e,null)},pg=function(t,n,e,l){return _m(t,n,e,l,null)},_m=function(t,n,e,l,r){var u=Pi(n),i=u?Ge.g(r,uc(n)):null;throw n=u?fl.g(r,rc(n)):null,Ur.g(e,Nt.j(z([fn.j(new P(null,1,[pl,fln],null),Pu.h(t),n,z([Eu.h(t),i])),l])))},e3=function(t){return x(t)?-1<["\r",` -`," "," ",","].indexOf(t):t},lY=function(t,n){for(var e=new rl;;){var l=e3(n);if(!x(l)){n:switch(n){case'"':case";":case"@":case"^":case"`":case"~":case"(":case")":case"[":case"]":case"{":case"}":case"\\":l=!0;break n;default:l=!1}l=x(l)?l:n==null}if(x(l))return x(n)&&t.Jb(null,n),M.h(e);e=e.append(n),n=t.K(null)}},lnn=function(t,n,e){for(var l=function(){var s=new rl;return s.append(e),s}(),r=n.K(null);;){if(x(function(){var s=e3(r);if(x(s))return s;n:switch(r){case":":case";":case"'":case"@":case"^":case"`":case"~":case"(":case")":case"[":case"]":case"{":case"}":case"\\":case"%":case"#":case'"':s=!0;break n;default:s=!1}return x(s)?s:r==null}())){var u=M.h(l);n.Jb(null,r);var i=HU(u);return x(i)?i:Qr(t,n,["Invalid number: ",u].join(""))}u=function(){var s=l;return s.append(r),s}(),i=n.K(null),l=u,r=i}},rY=function(t,n){return t=Orn.h(t),fw(t,n)},rnn=function(t,n){var e=Pi(n),l=e?n.pc(null):null;e=e?n.oc(null):null;for(var r=n.K(null),u=new rl,i=n.K(null);;){var s=i;if(X.g(null,s))return pg(t,n,["EOF while reading, expected ",M.h(r)," to match ",M.h(r)," at [",M.h(l),",",M.h(e),"]"].join(""),new P(null,3,[Ym,M.h(r),Mm,M.h(r),v1,new P(null,2,[fl,l,Ge,e],null)],null));if(X.g("\\",s)){s=function(){var o=u;return o.append(dx.g?dx.g(u,n):dx.call(null,u,n)),o}();var a=n.K(null);u=s,i=a}else{if(X.g('"',s))return M.h(u);s=function(){var o=u;return o.append(i),o}(),a=n.K(null),u=s,i=a}}},vf=function(t,n,e,l,r){this.ac=t,this.Vb=n,this.J=e,this.G=l,this.C=r,this.v=2230716170,this.H=139264},Nh=function(t){return new vf(t.pc(null),t.oc(null),null,null,null)},uY=function(t){n:for(var n=t.K(null),e=new rl;;){if(H5(n)){M.h(e);break n}var l=t.K(null);e=e.append(n),n=l}return t},n8=function(t){for(;;){var n=t.K(null);if(x(n)){if(!x(e3(n)))return t.Jb(null,n),t}else return null}},iy=function(t,n,e){var l=Yn,r=Pi(n),u=r?n.pc(null):null;r=r?n.oc(null):null;var i=n.K(null);for(t=fn.i(fn.i(t,Fm,e),ha,new P(null,3,[aa,i,fl,u,Ge,r],null)),l=He(l);;){var s=Wt?Wt(t,n):kl.call(null,t,n),a=s;if(a=a==null?null:Wn(a),a=a==null?null:rG.h(a),ig===s)return pg(t,n,["EOF while reading, expected ",M.h(e)," to match ",M.h(i)," at [",M.h(u),",",M.h(r),"]"].join(""),new P(null,3,[Ym,M.h(e),Mm,M.h(i),v1,new P(null,2,[fl,u,Ge,r],null)],null));if(Ef===s)return ul(l);if(x(a)){s=E(s),a=null;for(var o=0,h=0;;)if(h=r?dn.g(Zi,l):dn.g(Ko,l)},gnn=function(t,n){n.K(null);var e=n.K(null);x(e3(e))&&Qr(t,n,"Invalid token: :"),e=lY(n,e);var l=e.charAt(0)===":";if(l){var r=l?vt.g(e,1):e;if(l=Hm.h?Hm.h(r):Hm.call(null,r),e=m.i(l,0,null),l=m.i(l,1,null),x(e)){var u=t8(t,n,r,null);r=$n.h(e),t=e8(t,u,r,n,e,null)}else u=t8(t,n,r,"Use `:auto-resolve` + `:current` to resolve current namespace."),t=e8(t,u,Ra,n,r,"Use `:auto-resolve` + `:current` to resolve current namespace.");return Hl.g(M.h(t),l)}return Hl.h(e)},mnn=function(t){return t instanceof F?Ll([t,!0]):t instanceof S?new P(null,1,[Cu,t],null):typeof t=="string"?new P(null,1,[Cu,t],null):t},wnn=function(t,n){return t instanceof F?Ll([n.h?n.h(t):n.call(null,t),n.h?n.h(!0):n.call(null,!0)]):t instanceof S?Ll([n.h?n.h(Cu):n.call(null,Cu),n.h?n.h(t):n.call(null,t)]):typeof t=="string"?Ll([n.h?n.h(Cu):n.call(null,Cu),n.h?n.h(t):n.call(null,t)]):t},EN=function(t,n,e){var l=Pi(n);if(X.g("#",e))return n.K(null),cnn(t,n);if(X.g(null,e))return ig;if(X.g("@",e))return e=Di.h(t),x(e)?(l=e,n.K(null),e=Wt?Wt(t,n):kl.call(null,t,n),l===!0?new g(null,DG,new g(null,e,null,1,null),2,null):l.h?l.h(e):l.call(null,e)):Qr(t,n,"Deref not allowed. Use the `:deref` option");if(X.g("`",e))return e=Iu.h(t),x(e)?(l=e,n.K(null),e=Wt?Wt(t,n):kl.call(null,t,n),l===!0||we(l)?(l=et.h(vn),l=fn.i(t,QQ,l),Yv(l,n,e)):l.h?l.h(e):l.call(null,e)):Qr(t,n,"Syntax quote not allowed. Use the `:syntax-quote` option");if(X.g('"',e))return rnn(t,n);if(X.g("'",e))return e=Ls.h(t),x(e)?(l=e,n.K(null),e=Wt?Wt(t,n):kl.call(null,t,n),ig===e&&Qr(t,n,"EOF while reading"),l===!0?new g(null,Bt,new g(null,e,null,1,null),2,null):l.h?l.h(e):l.call(null,e)):rY(t,n);if(X.g("(",e))return dn.g(U,iy(t,n,")"));if(X.g(")",e)){var r=Fm.h(t);return es.g(r,e)?(l=l?Nh(n):null,n.K(null),_m(t,n,["Unmatched delimiter: ",M.h(e),x(r)?[", expected: ",M.h(r),function(){var u=ha.h(t);if(x(u)){var i=gl(u);u=cn.g(i,fl);var s=cn.g(i,Ge);return i=cn.g(i,aa),[" to match ",M.h(i)," at ",M.h(new v(null,2,5,y,[u,s],null))].join("")}return null}()].join(""):null].join(""),function(){var u=ha.h(t),i=gl(u);u=cn.g(i,aa);var s=cn.g(i,fl);return i=cn.g(i,Ge),new P(null,3,[Mm,M.h(u),v1,new P(null,2,[fl,s,Ge,i],null),Ym,M.h(r)],null)}(),l)):(n.K(null),Ef)}return X.g(":",e)?gnn(t,n):X.g(";",e)?uY(n):X.g("[",e)?iy(t,n,"]"):X.g("{",e)?fnn(t,n):X.g("\\",e)?(e=n.K(null),px.i?px.i(n,e,null):px.call(null,n,e,null)):X.g("]",e)?(r=Fm.h(t),es.g(r,e)?(l=l?Nh(n):null,n.K(null),_m(t,n,["Unmatched delimiter: ",M.h(e),x(r)?[", expected: ",M.h(r),function(){var u=ha.h(t);if(x(u)){var i=gl(u);u=cn.g(i,fl);var s=cn.g(i,Ge);return i=cn.g(i,aa),[" to match ",M.h(i)," at ",M.h(new v(null,2,5,y,[u,s],null))].join("")}return null}()].join(""):null].join(""),function(){var u=ha.h(t),i=gl(u);u=cn.g(i,aa);var s=cn.g(i,fl);return i=cn.g(i,Ge),new P(null,3,[Mm,M.h(u),v1,new P(null,2,[fl,s,Ge,i],null),Ym,M.h(r)],null)}(),l)):(n.K(null),Ef)):X.g("}",e)?(r=Fm.h(t),es.g(r,e)?(l=l?Nh(n):null,n.K(null),_m(t,n,["Unmatched delimiter: ",M.h(e),x(r)?[", expected: ",M.h(r),function(){var u=ha.h(t);if(x(u)){var i=gl(u);u=cn.g(i,fl);var s=cn.g(i,Ge);return i=cn.g(i,aa),[" to match ",M.h(i)," at ",M.h(new v(null,2,5,y,[u,s],null))].join("")}return null}()].join(""):null].join(""),function(){var u=ha.h(t),i=gl(u);u=cn.g(i,aa);var s=cn.g(i,fl);return i=cn.g(i,Ge),new P(null,3,[Mm,M.h(u),v1,new P(null,2,[fl,s,Ge,i],null),Ym,M.h(r)],null)}(),l)):(n.K(null),Ef)):X.g("^",e)?(n.K(null),e=sy?sy(t,n,!0):kl.call(null,t,n,!0),hl.i(Wt?Wt(t,n):kl.call(null,t,n),Nt,e)):X.g("~",e)?(e=function(){var u=Iu.h(t);return x(u)?(u=Is.h(t),x(u)?u:!0):u}(),x(e)?(l=e,n.K(null),n.jb(null)==="@"?(l=function(){var u=Iu.h(t);return x(u)?(u=Po.h(t),x(u)?u:!0):u}(),x(l)?(n.K(null),e=Wt?Wt(t,n):kl.call(null,t,n),l===!0?new g(null,bI,new g(null,e,null,1,null),2,null):l.h?l.h(e):l.call(null,e)):Qr(t,n,"Syntax unquote splice not allowed. Use the `:syntax-quote` option")):(e=Wt?Wt(t,n):kl.call(null,t,n),l===!0?new g(null,$3,new g(null,e,null,1,null),2,null):l.h?l.h(e):l.call(null,e))):Qr(t,n,"Syntax unquote not allowed. Use the `:syntax-unquote` option")):(e=n.K(null),x(wx.g?wx.g(n,e):wx.call(null,n,e))?lnn(t,n,e):l8(t,n,e))},kl=function(t){switch(arguments.length){case 2:return Wt(arguments[0],arguments[1]);case 3:return sy(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}},Wt=function(t,n){return sy(t,n,null)},sy=function(t,n,e){for(;;){var l=Pi(n),r=function(){var k=n8(n);return x(k)?B1(n):k}();if(x(r)){var u=r,i=l?Nh(n):null,s=Lr.h(t),a=x(s)?Fr.h(J(n.frames)):null,o=x(s)?a.getLength():null,h=x(s)?qb(n,function(k,H,R,_,Z,nn,tn,sn){return function(){return EN(k,H,sn)}}(t,n,e,i,s,a,o,u)):EN(t,n,u);if(n!==h){if(Ef===h)return h;var c=ba.h(t),f=Eo.h(t),d=ls.h(t),C=h!=null?h.v&262144||On===h.wd?!0:h.v?!1:Qn(m$,h):Qn(m$,h),I=x(s)?vt.g(M.h(a),o).trim():null,T=function(){var k=l;return k&&((k=C)&&(k=(k=Xn(f))?k:f.h?f.h(h):f.call(null,h)),x(k)?k:c)}(),$=x(function(){var k=l;return k&&(k=T,x(k)?d:k)}())?Nh(n):null,G=x(T)?fl.h(i):null,b=x(d)?fl.h($):null,en=x(T)?Ge.h(i):null,ln=x(d)?Ge.h($):null,B=x(c)?function(k,H,R,_,Z,nn,tn,sn,hn,mn,wn,pn,yn,An){return function(jn){var Sn=function(){var Pn=new P(null,1,[fu,jn],null);return Pn=x(hn)?fn.i(Pn,Win,function(){var Nn=Ll([Pu.h(k),wn,Eu.h(k),yn]);return x(nn)?fn.j(Nn,Ti.h(k),pn,z([$i.h(k),An])):Nn}()):Pn,x(sn)?fn.i(Pn,function(){var Nn=as.h(k);return x(Nn)?Nn:Lr}(),sn):Pn}();return _.h?_.h(Sn):_.call(null,Sn)}}(t,n,e,c,f,d,C,I,T,$,G,b,en,ln):null,O=x(e)?x(B)?wnn(h,B):mnn(h):h;return x(c)?B.h?B.h(O):B.call(null,O):x(T)?hl.g(O,function(k,H,R,_,Z,nn,tn,sn,hn,mn,wn,pn,yn,An){return function(jn){return jn=fn.i(fn.i(jn,Pu.h(k),wn),Eu.h(k),yn),jn=x(nn)?fn.i(fn.i(jn,Ti.h(k),pn),$i.h(k),An):jn,x(sn)?fn.i(jn,as.h(k),sn):jn}}(t,n,e,c,f,d,C,I,T,$,G,b,en,ln)):O}}else return ig}},cl=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en,ln){this.Ba=t,this.deref=n,this.La=e,this.Ma=l,this.Na=r,this.quote=u,this.ra=i,this.sa=s,this.Ha=a,this.Ia=o,this.Ja=h,this.Aa=c,this.Ea=f,this.Ca=d,this.source=C,this.Ka=I,this.Ga=T,this.Fa=$,this.Da=G,this.J=b,this.G=en,this.C=ln,this.v=2230716170,this.H=139264},dnn=function(t){var n=Ct.j(t,_s,z([Di,Iu,Is,Po,Ls,Ts,tu,os,$s,Pu,Eu,Ti,$i,Lr,as,ba,Eo,ls]));return n=Dc(t)?Dt.g(vn,n):n,new cl(_s.h(t),Di.h(t),Iu.h(t),Is.h(t),Po.h(t),Ls.h(t),Ts.h(t),tu.h(t),os.h(t),$s.h(t),Pu.h(t),Eu.h(t),Ti.h(t),$i.h(t),Lr.h(t),as.h(t),ba.h(t),Eo.h(t),ls.h(t),null,mr(n),null)},gw=function(t,n){if(t!=null&&t.cd!=null)t=t.cd(t,n);else{var e=gw[zn(t??null)];if(e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else if(e=gw._,e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else throw Un("IBox.setVal",t)}return t},F1=function(t){if(t!=null&&t.bc!=null)t=t.bc(t);else{var n=F1[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=F1._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IBox.getVal",t)}return t},da=function(t){if(t!=null&&t.Qe!=null)t=t.ge;else{var n=da[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=da._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IReified.getMethods",t)}return t},l3=function(t,n){this.ge=t,this.Me=n},oy=function(t,n,e){if(t!=null&&t.ke!=null)t=t.ke(t,n,e);else{var l=oy[zn(t??null)];if(l!=null)t=l.i?l.i(t,n,e):l.call(null,t,n,e);else if(l=oy._,l!=null)t=l.i?l.i(t,n,e):l.call(null,t,n,e);else throw Un("SciTypeInstance.-mutate",t)}return t},FP=function(t){this.form=t},ay=function(t){if(t!=null&&t.Re!=null)t=t.stack;else{var n=ay[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=ay._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("Stack.stack",t)}return t},Ci=function(t,n,e,l,r){this.f=t,this.stack=n,this.J=e,this.G=l,this.C=r,this.v=2230716170,this.H=139264},kn=function(t,n){return new Ci(t,n,null,null,null)},w=function(t,n,e){if(t instanceof Ci){var l=t.f;return l.i?l.i(t,n,e):l.call(null,t,n,e)}return t},Tu=function(t){if(t!=null&&t.Ic!=null)t=t.Ic(t);else{var n=Tu[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=Tu._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("HasName.getName",t)}return t},HP=function(t,n){this.Zc=t,this.Kb=n},r3=function(){return J(A0)},ZP=function(t){this.val=t},pnn=function(){var t=J(A0);return new HP(t.Zc,null)},Sh=function(t){return Il(A0,t)},ic=function(t,n){if(t!=null&&t.me!=null)t=t.me(t,n);else{var e=ic[zn(t??null)];if(e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else if(e=ic._,e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else throw Un("IVar.bindRoot",t)}return t},H1=function(t){if(t!=null&&t.Te!=null)t=t.root;else{var n=H1[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=H1._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IVar.getRawRoot",t)}return t},hy=function(t){if(t!=null&&t.oe!=null)t=t.oe(t);else{var n=hy[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=hy._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IVar.isMacro",t)}return t},cy=function(t){if(t!=null&&t.ne!=null)t=t.ne(t);else{var n=cy[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=cy._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IVar.hasRoot",t)}return t},r8=function(t){if(t!=null&&t.pe!=null)t.pe(t,!0);else{var n=r8[zn(t??null)];if(n!=null)n.g?n.g(t,!0):n.call(null,t,!0);else if(n=r8._,n!=null)n.g?n.g(t,!0):n.call(null,t,!0);else throw Un("IVar.setThreadBound",t)}},Wa=function(t){if(t!=null&&t.Dd!=null)t.Dd(t);else{var n=Wa[zn(t??null)];if(n!=null)n.h?n.h(t):n.call(null,t);else if(n=Wa._,n!=null)n.h?n.h(t):n.call(null,t);else throw Un("IVar.unbind",t)}},fy=function(t){if(t!=null&&t.le!=null)t=t.le(t);else{var n=fy[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=fy._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("DynVar.dynamic?",t)}return t},mw=function(t){if(t!=null&&t.Se!=null)t=t.he;else{var n=mw[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=mw._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("CtxVar.needs-ctx?",t)}return t},Uc=function(t){var n=r3();return t=En.i(function(e,l){var r=m.i(l,0,null);if(l=m.i(l,1,null),Xn(fy(r)))throw Error(["Can't dynamically bind non-dynamic var ",M.h(r)].join(""));return r8(r),fn.i(e,r,new ZP(l))},n.Zc,t),Sh(new HP(t,n))},sc=function(){var t=r3().Kb;if(x(t))return WR===t?Il(A0,WR):Sh(t);throw Error("No frame to pop.")},vnn=function(){var t=r3(),n=vn;for(t=E(t.Zc);;)if(t){var e=j(t),l=m.i(e,0,null);e=m.i(e,1,null).bc(null),n=fn.i(n,l,e),t=A(t)}else return n},u3=function(t){var n=J(A0);return x(n)?n.Zc.get(t):null},zl=function(t){throw Error(["Attempting to call unbound fn: ",M.h(t)].join(""))},bP=function(t){this.Ta=t,this.v=1,this.H=0},Tm=function(t){return $v(t)?$n.h(Zn(t)):t},od=function(t,n,e){this.data=t,this.Bd=n,this.name=e,this.v=131072,this.H=4096},ynn=function(t,n,e,l){x(n)&&0",G)].join("")}(),i):Al(l,iv(r,u,c,i,e))}else{var d=lp.h(r);if(x(d)){var C=J(Ne);if(c=function(){var G=new P(null,6,[YQ,i,mrn,i,$rn,t,X8,e,V,Tu(C),K8,x(a)?a:o],null);return d.h?d.h(G):d.call(null,G)}(),x(c)){var I=gl(c);s=cn.g(I,fe),c=cn.g(I,Lr),I=cn.g(I,uin);var T=_e.i(fn.i(fn.i(t,Ar,vn),n2,o),SL,function(G){return G==null?new v(null,1,5,y,[i],null):In.g(G,i)});if(x(c))try{Uc(Ll([Ne,C,Sl,s]));try{var $=J(vJ);$.g?$.g(T,c):$.call(null,T,c)}finally{sc()}}catch(G){throw G instanceof Error?(n=G,ut.j(l,_e,ct,Ct,z([i])),n):G}x(I)||ut.g(l,function(G){var b=cn.g(G,ct);return b=cn.g(b,i),iv(G,u,b,i,e)})}else if($=x(s)?function(){var G=cn.g(h,i);return x(G)?Al(l,iv(r,u,G,i,e)):null}():null,!x($))throw Error(["Could not find namespace: ",M.h(i),"."].join(""))}else throw Error(["Could not find namespace ",M.h(i),"."].join(""))}return n||rI(l,i),null},Kg=function(t,n){return t instanceof S?Dn(t,n):D.g(t,n)},NN=function(t){return t instanceof S||wt(t)&&(Rt(t)==null||Rt(t)instanceof F)},vY=function(t,n,e){var l=Dn(n,e),r=rr.g(Lk,l);n=yl.g(r,ge.h(!0)),l=rr.g(Bp(Lk),l),(r=E(Yc.g(new ht(null,new P(null,7,[JI,null,ho,null,tJ,null,kun,null,K8,null,n2,null,qo,null],null),null),r)))&&el(dn.i(M,"Unsupported option(s) supplied: ",Jo.g(",",r)),e),E(l)||el("Nothing specified to load",e),r=E(l),l=null;for(var u=0,i=0;;)if(ik:k))&&Zr("Can't have fixed arity function with more params than variadic function",n),_e.u(_e.u(fn.j(ln,ML,nn,z([af,Z>O?Z:O])),o6,In,fn.i(R,grn,B)),W,In,H)},new P(null,4,[o6,Yn,W,Yn,Rrn,null,af,-1],null),r),r=qt.g(J(o),l),r=dn.g(Nt,Mn.g(ki,ir(r)));var f=x(h)?Gn(r,a):null,d=rr.g(s,xe(r)),C=qt.g(J(o),In.g(sw(l),ki));l=x(C)?hu(d,br.g(C,d)):null;var I=an(d);r=hu(d,Nu.h(I));var T=x(h)?fn.i(r,a,I):r;l=(x(f)?f:E(l))?function(){var ln=x(h)?I+1:I,B=jr.h(oo.g(function(O){var k=cn.g(C,O);if(x(k)){O=cn.g(T,O);var H=Pt.h(2);return H[0]=k,H[1]=O,H}return null},d));return new v(null,2,5,y,[function(O){for(var k=B.length,H=0,R=Pt.h(ln);;)if(Han(n))throw Error("Malformed member expression, expecting (.member target ...)");return LN(t,n)}if(X.g(qm,e))return Ssn(t,n,rn(n));if(X.g(eJ,e))return ttn(n);if(X.g(Wm,e))return qN(t,n);if(X.g(xc,e))return Ynn(t,n);if(X.g(se,e))return Knn(t,n);if(X.g(xp,e)){e=Rt(n);var l=nu.g(2,e);return n=ni(n),n=L.h(E(D.j(new g(null,Ww,null,1,null),new g(null,e,null,1,null),z([new g(null,bl.g(L.h(E(D.j(new g(null,xc,null,1,null),new g(null,_n(l),null,1,null),z([n])))),l),null,1,null)])))),xn.g?xn.g(t,n):xn.call(null,t,n)}if(X.g(je,e))return T0(t,n,rn(n));if(X.g($I,e))return e=E(n),n=j(e),e=A(e),l=Zn(n),l=mt($n.g(qe(n),vt.i(l,0,l.length-1)),Wn(n)),WN(t,mt(bl.i(Ms,l,e),Wn(n)));if(X.g(Mi,e))return Gnn(t,n);if(X.g(Bt,e))return X.g(2,an(n))||Zr("Wrong number of args (0) passed to quote",n),Rt(n);if(X.g(Ww,e))return Osn(t,n,Rt(n),ni(n));if(X.g(n_,e)){l=E(n),e=j(l);var r=A(l);if(l=j(r),r=A(r),2>an(n))throw Error("Malformed member expression, expecting (.member target ...)");return LN(t,mt(new g(null,Mo,new g(null,l,new g(null,Dn($n.h(vt.g(Zn(e),1)),r),null,1,null),2,null),3,null),Wn(n)))}if(X.g(xs,e))return Hnn(t,n);if(X.g(I3,e))return qN(t,n);if(X.g(T3,e))return Znn(t,n);if(X.g(pd,e))return Wnn(t,n,tr(gs(t),rn(n)));if(X.g(Ms,e))return WN(t,n);if(X.g(wl,e))return m.i(n,0,null),n=m.i(n,1,null),Wf(t,n,!1,null);if(X.g($m,e))return Jnn(t,n);if(X.g(Pa,e))return Xnn(t,n);if(X.g(Sg,e))return Bnn(t,n);if(X.g(Vm,e))return ksn(t,n,rn(n));throw Error(["No matching clause: ",M.h(e)].join(""))},ltn=function(t,n,e,l){var r=x(x(l)?x(e)?ae.h(e):e:l)?new P(null,2,[Xe,Xe.h(e),ae,ae.h(e)],null):null;x(r)&&(sg=r);try{var u=Gen.h(e);x(u)&&Uc(Ll([Sl,u]));try{var i=j(n);if(i instanceof S){var s=cn.g(SJ,i);x(x(s)?KI.h(t):s)&&yY(t,i,new v(null,2,5,y,[s,null],null));var a=x(s)?s:Wf(t,i,!0,null),o=Wn(a),h=x(o)?HA.h(o):o,c=zm.h(o),f=x(c)?c:a;if(x(x(o)?TI.h(o):o)){var d=m.i(f,0,null),C=m.i(f,1,null),I=ur(C),T=X.g(I,""),$=an(C),G=C.slice(0,$-1),b=X.g(1,$)?N5([d,I]):function(){return[my(d,G),I]};try{var en=b()}catch{en=null}var ln=m.i(en,0,null),B=m.i(en,1,null),O=tr(t,rn(n)),k=jr.h(O);if(x(ln)){if(T)return kn(function(Sn,Pn,Nn){return mm(Pn,Nn,ln,k)},null);var H=ln[B];return kn(function(Sn,Pn,Nn){return IN(Pn,Nn,ln,H,k)},null)}return kn(T?function(Sn,Pn,Nn){return Sn=b()[0],mm(Pn,Nn,Sn,k)}:function(Sn,Pn,Nn){Sn=b();var it=Sn[0];return IN(Pn,Nn,it,it[Sn[1]],k)},null)}if(x(function(){var Sn=Xn(h);return Sn&&((Sn=f instanceof S)?x(s)?s:Gn(o5,f):Sn)}()))return etn(t,n,f);try{if(x(aY(f))){var R=function(){var Sn=vr(f);return Sn&&mw(f)}(),_=vr(f)?J(f):f,Z=function(){var Sn=_.afn;return x(Sn)?Sn:_}(),nn=x(R)?dn.F(Z,n,Ar.h(t),t,rn(n)):dn.u(Z,n,Ar.h(t),rn(n));return x(_3.h(t))?nn:x(x(l)?he(nn)&&X.g(je,j(nn)):l)?new FP(nn!=null&&(nn.v&262144||On===nn.wd)?mt(nn,Nt.j(z([e,Wn(nn)]))):nn):function(){var Sn=x(e)&&nn!=null&&(nn.v&262144||On===nn.wd)?mt(nn,Nt.j(z([e,Wn(nn)]))):nn;return xn.i?xn.i(t,Sn,l):xn.call(null,t,Sn,l)}()}var tn=Fn.h(o);if(x(tn))return _=tn,Gu(t,n,_,tr(t,rn(n)),fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])),null);var sn=HA.h(Wn(f));if(x(sn))switch(sn instanceof F?sn.za:null){case"resolve-sym":return bnn(KG.h(Wn(f)),tr(t,rn(n)),fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])));default:return O=tr(t,rn(n)),Gu(t,n,f,O,fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])),null)}else{if(R=function(){var Sn=vr(f);return Sn&&mw(f)}(),x(R))return ntn(n,f,tr(t,rn(n)));var hn=Tun.h(t);return x(x(hn)?hn.h?hn.h(f):hn.call(null,f):hn)?(O=tr(t,rn(n)),Gu(t,n,f,O,fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])),function(Sn,Pn){return J(Pn.get(i))})):(O=tr(t,rn(n)),Gu(t,n,f,O,fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])),vr(f)?function(Sn,Pn,Nn){return J(Nn)}:null))}}catch(Sn){if(Sn instanceof Error){var mn=Sn;return RN(t,mn,function(){var Pn=fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o]));return kn(function(){return null},Pn)}())}throw Sn}}else if(i instanceof F){O=tr(t,rn(n));var wn=an(O);switch(wn){case 1:var pn=m.g(O,0);return kn(function(Sn,Pn,Nn){return i.h(w(pn,Pn,Nn))},null);case 2:var yn=m.g(O,0),An=m.g(O,1);return kn(function(Sn,Pn,Nn){return i.g(w(yn,Pn,Nn),w(An,Pn,Nn))},null);default:return Zr(["Wrong number of args (",M.h(wn),") passed to: ",M.h(i)].join(""),n)}}else{a=xn.g?xn.g(t,i):xn.call(null,t,i),O=tr(t,rn(n));var jn=fn.j(e,V,J(Ne),z([fe,J(Sl)]));return Gu(t,n,a,O,jn,vr(a)?function(Sn,Pn,Nn){return w(J(Nn),Sn,Pn)}:function(Sn,Pn,Nn){return w(Nn,Sn,Pn)})}}catch(Sn){return mn=Sn,RN(t,mn,kn(function(){return null},tI(e,!1)))}finally{x(u)&&sc()}}finally{x(r)&&(sg=null)}},xY=function(t){return 16>=t?Zi:Ko},rtn=function(t,n,e){var l=xY(an(e));return Gu(t,n,l,e,null,null),Gu(t,n,l,e,null,null)},kY=function(t){return!(t instanceof Ci)},utn=function(t,n,e){t=gs(t);var l=Dt.i(Yn,B5,n),r=tr(t,l),u=Ol(kY,r);l=u?X.g(l,r):null,l=u?x(l)?n:function(){var a=xY(an(r));return dn.g(a,r)}():null;var i=u?l:rtn(t,n,r),s=x(e)?xn.g?xn.g(t,e):xn.call(null,t,e):null;return x(s)?kn(function(a,o,h){return a=w(i,o,h),o=w(s,o,h),mt(a,o)},null):i},VN=function(t,n,e,l,r){t=gs(t);var u=x(r)?xn.g?xn.g(t,r):xn.call(null,t,r):null;r=tr(t,l);var i=Ol(kY,r),s=rh(l),a=i&&X.g(s?function(){var h=E(l);return h||Yn}():l,r);n=i?a?oe(l)?s?Ke:Yn:l:n.h?n.h(r):n.call(null,r):null;var o=i?n:Gu(t,l,e,r,null,null);return x(u)?kn(function(h,c,f){return h=w(o,c,f),c=w(u,c,f),mt(h,c)},null):o},itn=function(t,n){if(n=n.val,we(n)){var e=xe(n),l=Mn.g(Zn,e),r=ir(n),u=tr(t,r);return kn(function(i,s,a){return dn.g(cd,yl.g(l,Mn.g(function(o){return w(o,s,a)},u)))},null)}return r=tr(t,n),kn(function(i,s,a){var o=[];return qU(function(h){return o.push(w(h,s,a))},r),o},null)},st=function(t,n,e,l,r){return e=new P(null,3,[V,x(e)?e:K,th,!0,Y,!0],null),r=x(r)?Nt.j(z([e,r])):e,s3(t,n,r,l)},na=function(t,n){return SY(t,n,null,!1)},l1=function(t,n,e){return SY(t,n,e,!0)},SY=function(t,n,e,l){return l=x(l)?l:e===!0,e=new P(null,2,[V,e===!0?K:x(e)?e:K,Y,!0],null),e=x(null)?Nt.j(z([e,null])):e,s3(t,n,e,l)},OY=function(t,n){var e=dn.i(Ea,t,n);return Dn(e,Yc.g(function(l){return e===l},n))},o8=function(t,n){return En.i(function(e,l){var r=m.i(l,0,null);return l=m.i(l,1,null),Gn(t,r)?fn.i(e,l,cn.g(t,r)):e},dn.i(Ct,t,xe(n)),n)},iI=function(t,n){return En.i(function(e,l){var r=zc(l,n);return fn.i(e,r,In.g(cn.i(e,r,Ke),l))},vn,t)},CY=function(t){return ul(Hw(function(n,e,l){return Vu.i(n,l,e)},He(vn),t))},sI=function(t,n,e){if(Zw(e)){var l=dn.g(U,Mn.g(t,e));return n.h?n.h(l):n.call(null,l)}return Oa(e)?(l=new Ln(function(){var r=bu(e);return t.h?t.h(r):t.call(null,r)}(),function(){var r=Ei(e);return t.h?t.h(r):t.call(null,r)}()),n.h?n.h(l):n.call(null,l)):he(e)?(l=Qc.h(Mn.g(t,e)),n.h?n.h(l):n.call(null,l)):Dc(e)?(l=En.i(function(r,u){return In.g(r,t.h?t.h(u):t.call(null,u))},e,e),n.h?n.h(l):n.call(null,l)):mg(e)?(l=Dt.g(Wp(e),Mn.g(t,e)),n.h?n.h(l):n.call(null,l)):n.h?n.h(e):n.call(null,e)},AY=function(t,n){return t2(function(e){return Gn(t,e)?t.h?t.h(e):t.call(null,e):e},n)},stn=function(t,n){var e=an(t)-1;X.g(2,e)||el(["Wrong number of args (",M.h(e),") passed to: clojure.core/for"].join(""),t),wt(n)||el("for requires a vector for its binding",t),Ni(an(n))||el("for requires an even number of forms in binding vector",t)},s0=function(t){return i0(t,null,new P(null,2,[V,K,Y,!0],null))},zN=function(t){var n=Wn(t);if(x(n)){if(x(XG.h(n)))return $n.h(M.h(J(t)));if(t=q.h(n),x(t))return n=V.h(n),x(n)?$n.g(M.h(Tu(n)),M.h(t)):null}return null},otn=function(t,n){var e=J(Qt.h(t)),l=function(){var h=qe(n);return x(h)?$n.h(h):null}(),r=sr(),u=M.h(r),i=cn.g(e,ct),s=cn.g(i,r),a=Ns.h(s),o=function h(c){var f=Zn(c),d=function(){var C=wu.h(s);return x(C)?(C=cn.g(C,c),x(C)?zN(C):null):null}();return x(d)||(d=function(){var C=cn.g(s,c);return x(C)?zN(C):null}(),x(d))||(d=Gn(cn.g(i,Bl),c)&&Xn(function(){var C=s==null?null:qo.h(s);return C=C==null?null:cn.g(C,Bl),C=C==null?null:Rw.h(C),C==null?null:Gn(C,c)}())||Gn(o5,c)?$n.g("clojure.core",f):null,x(d))?d:(d=jnn(t,c),x(d)?d:f.indexOf(".")!=-1?f.lastIndexOf(".",0)!=0&&Np(f,".")?$n.h([M.h(h($n.h(vt.i(f,0,f.length-1)))),"."].join("")):c:$n.g(u,f))};return Xn(l)?o(n):function(){var h=cn.g(e,ct);if(x(cn.g(h,l)))return n;var c=cn.g(a,l);return x(c)?$n.g(M.h(c),Zn(n)):(h=cn.g(Vr.h(cn.g(h,r)),l),x(h)?$n.g(M.h(h),Zn(n)):n)}()},atn=function(){throw Ur.g("EvalReader not allowed when *read-eval* is false.",new P(null,1,[pl,pp],null))},htn=function(t,n){return n=PI.h(n),x(n)?n:(t=Qt.h(t),n=J(t),t=sr(),n=qt.g(n,new v(null,2,5,y,[ct,t],null)),n=Ns.h(n),fn.i(n,Ra,t))},o0=function(t,n,e){var l=eg.h(t),r=qs.h(t),u=vr(r)?J(r):r,i=htn(t,e),s=function(){var a=fn.j(Zsn,eg,l,z([PI,i,Iu,new P(null,1,[RQ,function(o){return otn(t,o)}],null),qs,function(o){var h=x(u)?u.h?u.h(o):u.call(null,o):u;if(x(h)||(h=function(){var f=J(CJ);return f.h?f.h(o):f.call(null,o)}(),x(h))||(h=function(){var f=J(Jc);return f=f.i?f.i(t,vn,o):f.call(null,t,vn,o),f=f==null?null:Wn(f),f==null?null:IQ.h(f)}(),x(h)))return h;var c=J(AJ);return x(c)?function(f){return c.g?c.g(o,f):c.call(null,o,f)}:null},os,x(J(OJ))?function(o){return u8(t,o)}:atn]));return x(e)?Nt.j(z([a,e])):a}();return function(){try{n instanceof KP&&Fr.h(J(n.frames)).clear();var a=Wt(s,n);if(ig===a)var o=cn.g(s,Ro),h=x(o)?o:oL;else h=a;return on(h,oL)?C3:h instanceof S&&Pi(n)?hl.O(h,fn,ae,rc(n),Xe,uc(n)-M.h(h).length):h}catch(c){throw c instanceof Go?(h=c,Ur.i(h.message,fn.j(K1(h),pl,pp,z([sp,"parse",fe,J(Sl)])),h)):c}}()},EY=function(t,n){if(on(C3,n)){if(n=Ro.h(t),x(n)){if(on(vin,n))throw Ur.g("EOF while reading",new P(null,2,[pl,pp,X8,t],null));return n}throw Ur.g("EOF while reading",new P(null,2,[pl,pp,X8,t],null))}return n},ii=function(t){return t.Ic(null)},RY=function(t,n){return i3(Qt.h(t),n,!1,null)},Ii=function(t,n){if(n instanceof u0)return n;if(t=RY(t,n),x(t))return t;throw Error(["No namespace: ",M.h(n)," found"].join(""))},PY=function(t,n){return n=Ii(t,n),n=ii(n),t=qt.g(J(Qt.h(t)),new v(null,3,5,y,[ct,n,Ns],null)),hu(xe(t),Mn.g(function(e){return ai(e,null)},ir(t)))},oI=function(t){return Ct.j(t,Ns,z([Vr,fu,qo,wu]))},a8=function(t,n){return n=Ii(t,n),n=ii(n),t=qt.g(J(Qt.h(t)),new v(null,2,5,y,[ct,n],null)),oI(t)},h8=function(t,n){return n=Ii(t,n),n=ii(n),t=qt.g(J(Qt.h(t)),new v(null,2,5,y,[ct,n],null)),t=oI(t),Dt.g(vn,oo.g(function(e){var l=m.i(e,0,null);return e=m.i(e,1,null),x(Vi.h(Wn(e)))?null:new v(null,2,5,y,[l,e],null)},t))},UN=function(t,n){n=Ii(t,n),n=ii(n);var e=J(Qt.h(t));t=Vr.h(e),n=qt.g(e,new v(null,3,5,y,[ct,n,Vr],null));var l=Io.h(e);return e=D.g(xe(t),xe(n)),t=D.g(ir(t),ir(n)),hu(e,Mn.g(ms.g(ss,function(r){return cn.g(l,r)}),t))},IY=function(t,n){n=Ii(t,n),n=ii(n);var e=J(Qt.h(t));return t=qt.g(e,new v(null,3,5,y,[ct,n,wu],null)),n=qt.g(e,new v(null,2,5,y,[ct,Bl],null)),n=oI(n),Nt.j(z([n,t]))},Qv=function(t){var n=Qt.h(t);return t=cn.g(J(n),ct),t=Yc.g(function(e){return m.i(e,0,null),e=m.i(e,1,null),Vi.h(e)},t),Mn.g(function(e){return i3(n,e,!0,null)},xe(t))},_Y=function(t){return new od(t,null,null)},Yj=function(t){var n=W.h(t),e=N.h(t),l=th.h(t);no.j(z(["-------------------------"]));var r=no.j,u=V.h(t);return u=x(u)?[M.h(ii(u)),"/"].join(""):null,r.call(no,z([[u,M.h(q.h(t))].join("")])),x(n)&&no.j(z([n])),x(l)&&no.j(z(["Macro"])),x(e)?no.j(z([" ",e])):null},TY=function(t,n,e){return AY(hu(t,e),n)},ctn=function(t,n,e,l,r,u,i,s,a,o,h){ut.g(t,function(c){var f=ct.h(c),d=va.j(Nt,z([x(f)?f:TJ,x(f)?null:new P(null,1,[Hv,fn.i(n,fu,xJ)],null),l])),C=Nt.j(z([e,qt.g(c,new v(null,3,5,y,[ct,Hv,Ns],null))])),I=_e.j;return d=_e.F(d,Hv,fn,Ns,C),C=Li(aS,F5(),new P(null,1,[V,K],null)),f=D.g(xe(f),Yhn),f=i0(Wy,et.h(Dt.g(m0(),f)),new P(null,4,[N,"A ref to a sorted set of symbols representing loaded libs",V,K,Vi,!0,Y,!0],null)),I=I.call(_e,d,Bl,fn,aS,C,Wy,z([f])),f=Vr.h(c),f=x(f)?Nt.j(z([f,i])):i,d=Nt.j(z([dp.h(c),h])),C=Nt.j(z([rp.h(c),o])),Xn(c)?new P(null,4,[ct,I,Vr,f,lp,s,B7,a],null):fn.j(c,ct,I,z([Vr,f,lp,s,B7,a,rp,C,ap,ap.h(r),Io,Io.h(r),iO,u,dp,d]))})},YN=function(t){return mr(Dt.i(Ke,ms.g(B5,Mn.h(hY)),t))},ftn=function(){return null},DY=function(t,n){Uc(Ll([Ne,J(Ne)]));try{var e=b5(dg(n));for(n=null;;){var l=o0(t,e,null);if(on(C3,l))return n;n=DJ(t,l)}}finally{sc()}},Qd=function(t){for(var n=[],e=arguments.length,l=0;l=r-l)?NY(t,n,e):l:r:l},wtn=function(t){var n=j(t),e=de.h(n);return n=E($u.g(function(l){return!(X.g(pe.h(l),bf)&&$Y(de.h(l),e))},A(t))),new v(null,2,5,y,[n,E(il.g(an(n)+1,t))],null)},dtn=function(t){var n=j(t),e=de.h(n);return E($u.g(function(l){var r=de.h(l);return!(X.g(pe.h(l),bf)&&(X.g(r,e)||$Y(r,e)))},A(t)))},Gv=function(t,n){Rn(Yt.h(J(J(t))),` -`),ut.u(J(t),fn,xl,null),n=de.h(n);var e=yc.h(n);x(e)&&Rn(Yt.h(J(J(t))),e),e=dn.g(M,ge.g(J(To.h(n))-an(e)," ")),Rn(Yt.h(J(J(t))),e);n:for(Al(Ha.h(n),!0),Al(Do.h(n),!0),t=Ws.h(n);;)if(x(t))Al(Do.h(t),!0),Al(Ha.h(t),!0),t=Ws.h(t);else break n;return null},ptn=function(t){var n=E($u.g(function(e){return!X.g(pe.h(e),bf)},t));return new v(null,2,5,y,[n,E(il.g(an(n),t))],null)},LY=function(t){for(var n=Fr.h(J(J(t)));;){if(ut.u(J(t),fn,Fr,Dt.g(Yn,n)),a0(t,n))return null;var e=Jhn(t,n);if(n!==e)n=e;else return null}},Vf=function(t,n){return ut.u(J(t),fn,Fr,In.g(Fr.h(J(J(t))),n)),a0(t,Fr.h(J(J(t))))?null:LY(t)},zf=function(t){var n=xl.h(J(J(t)));return x(n)?(Rn(Yt.h(J(J(t))),n),ut.u(J(t),fn,xl,null)):null},QN=function(t,n){var e=Lo.i(n,` -`,-1);if(X.g(an(e),1))return n;n=yc.h(j(jc.h(J(J(t)))));var l=j(e);if(X.g(Xy,Za.h(J(J(t))))){var r=Ue.h(J(J(t))),u=r+an(l);ut.u(J(t),fn,Ue,u),Vf(t,new Ki(Hy,l,null,r,u,null,null,null)),LY(t),l=Fr.h(J(J(t))),x(l)&&(vy(t,l,!0),ut.u(J(t),fn,Fr,Yn))}else zf(t),Rn(Yt.h(J(J(t))),l);Rn(Yt.h(J(J(t))),` +`):n},JU=function(t){this.ub=t,this.bb=this.line=1,this.Ab=!0,this.Kb=null,this.Wc=0,this.bd=null},KP=function(t){var n=et.h(new P(null,2,[Fr,new rl,hr,U(0)],null));this.ub=t,this.bb=this.line=1,this.Ab=!0,this.Kb=null,this.Wc=0,this.bd=null,this.frames=n},Pi=function(t){return t!=null?On===t.de:!1},dg=function(t){return new l0(new Z5(t,an(t)))},b5=function(t){return new JU(typeof t=="string"?dg(t):t)},Nb=function(t,n){var e=Fr.h(J(t.frames));try{ut.j(t.frames,Pl,new v(null,1,5,y,[hr],null),In,z([e.getLength()]));var l=n.m?n.m():n.call(null);if(l!=null&&(l.v&131072||On===l.pd))var r=J(t.frames),u=vt.g(M.h(Fr.h(r)),j(hr.h(r))),i=new P(null,1,[Lr,u],null),s=Wn(l),a=mt(l,Nt.j(z([i,Ct.g(s,Lr)])));else a=l;return a}finally{ut.u(t.frames,Pl,new v(null,1,5,y,[hr],null),rn)}},n3=function(t,n,e,l){var r=an(n);return t=x(t)?0:10e?(n=e.toString(16),t=Xl(t,z(["Invalid character literal \\u",n,"."]))):t=n,t):x(n.lastIndexOf("o",0)==0)?(--e,3T.getLength())T=T.append("0");else{T=T.toString();break n}return T=Ho(T),x(T)?T:0}();return o=(X.g(o,"-")?-1:1)*(60*function(){var T=Ho(h);return x(T)?T:0}()+function(){var T=Ho(c);return x(T)?T:0}()),new v(null,8,5,y,[t,Jg(1,n,12,"timestamp month field must be in range 1..12"),Jg(1,e,ssn(n,wf(t,4)===0&&(wf(t,100)!==0||wf(t,400)===0)),"timestamp day field must be in range 1..last day in month"),Jg(0,f,23,"timestamp hour field must be in range 0..23"),Jg(0,d,59,"timestamp minute field must be in range 0..59"),Jg(0,C,X.g(d,59)?60:59,"timestamp second field must be in range 0..60"),Jg(0,I,999,"timestamp millisecond field must be in range 0..999"),o],null)},Uv=function(t){if(typeof t=="string"){var n=Hb(t);if(x(n)){t=m.i(n,0,null);var e=m.i(n,1,null),l=m.i(n,2,null),r=m.i(n,3,null),u=m.i(n,4,null),i=m.i(n,5,null),s=m.i(n,6,null);n=m.i(n,7,null),n=new Date(Date.UTC(t,e-1,l,r,u,i,s)-6e4*n)}else throw Error(["Unrecognized date/time syntax: ",M.h(t)].join(""));return n}throw Error("Instance literal expects a string for its timestamp.")},Zb=function(t){return typeof t=="string"||t instanceof F&&qe(t)==null},tY=function(t){this.val=t},bb=function(t,n,e){if(Zw(e))return mt(function(){var r=dn.g(U,Mn.g(t,e));return n.h?n.h(r):n.call(null,r)}(),Wn(e));if(Oa(e)){var l=new Ln(function(){var r=bu(e);return t.h?t.h(r):t.call(null,r)}(),function(){var r=Ei(e);return t.h?t.h(r):t.call(null,r)}());return n.h?n.h(l):n.call(null,l)}return he(e)?mt(function(){var r=Qc.h(Mn.g(t,e));return n.h?n.h(r):n.call(null,r)}(),Wn(e)):Dc(e)?(l=En.i(function(r,u){return In.g(r,t.h?t.h(u):t.call(null,u))},e,e),n.h?n.h(l):n.call(null,l)):mg(e)?(l=Dt.g(Wp(e),Mn.g(t,e)),n.h?n.h(l):n.call(null,l)):n.h?n.h(e):n.call(null,e)},nnn=function(t){var n=Ye(new P(null,2,[af,0,j6,!1],null));t=hsn(function(r){if(r instanceof S){var u=J5(/^%(.*)/,Zn(r));if(x(u)){if(m.i(u,0,null),u=m.i(u,1,null),oe(u))return n.Ib(null,_e.u(n.gb(null),af,Oo,1)),pln;X.g("&",u)?n.Ib(null,fn.i(n.gb(null),j6,!0)):(u=parseInt(u),n.Ib(null,_e.u(n.gb(null),af,Oo,u)))}}return r},t);var e=J(n),l=gl(e);return e=cn.g(l,af),l=cn.g(l,j6),e=Mn.g(function(r){return $n.h(["%",M.h(r)].join(""))},Nu.g(1,e+1)),e=_n(D.g(e,x(l)?new v(null,2,5,y,[Cn,dln],null):null)),new g(null,xc,new g(null,e,new g(null,t,null,1,null),2,null),3,null)},uv=function(t,n,e,l){n:{l=E(l);for(var r=He(Yn);;)if(l){var u=j(l);r=ar.g(r,he(u)&&X.g(j(u),$3)?new g(null,mS,new g(null,Rt(u),null,1,null),2,null):he(u)&&X.g(j(u),bI)?Rt(u):new g(null,mS,new g(null,Yv.i?Yv.i(t,n,u):Yv.call(null,t,n,u),null,1,null),2,null)),l=A(l)}else{t=E(ul(r));break n}}return t=new g(null,Xen,new g(null,new g(null,Dun,new g(null,Dn(zin,t),null,1,null),2,null),null,1,null),2,null),x(e)?new g(null,oin,new g(null,e,new g(null,t,null,1,null),2,null),3,null):t},tnn=function(t){t=E(t);for(var n=He(Yn);;)if(t){var e=j(t);t=A(t),n=ar.g(ar.g(n,bu(e)),Ei(e))}else return E(ul(n))},CN=function(t,n,e){var l=gl(t),r=cn.g(l,YQ);if(ey(e))return new g(null,Bt,new g(null,e,null,1,null),2,null);if(e instanceof S)return new g(null,Bt,new g(null,function(){var u=Zn(e);if(ey(e))return e;if(Np(u,"#")){var i=cn.g(J(r),e);return x(i)?i:(u=vt.i(u,0,u.length-1),u=ne.h([u,"__"].join("")),u=$n.h([Zn(u),"__auto__"].join("")),ut.u(r,fn,e,u),u)}return u=EQ.h(Iu.h(l)),u=x(u)?u:fs,u.h?u.h(e):u.call(null,e)}(),null,1,null),2,null);if(he(e)&&X.g(j(e),$3))return Rt(e);if(he(e)&&X.g(j(e),bI))throw Error("unquote-splice not in list");if(mg(e)){if(e instanceof _h)return e;if(we(e))return uv(l,n,16<=an(e)?Sin:Xln,tnn(e));if(wt(e))return new g(null,Xin,new g(null,uv(l,n,null,e),null,1,null),2,null);if(rh(e))return uv(l,n,mrn,e);if(he(e)||Zw(e))return(t=E(e))?uv(l,n,null,t):U(mS);throw Error("Unknown Collection type")}return e instanceof F||typeof e=="number"||Xz(e)||typeof e=="string"||e==null||PP(e)||e instanceof RegExp?e:new g(null,Bt,new g(null,e,null,1,null),2,null)},Yv=function(t,n,e){var l=CN(t,n,e),r=e!=null?!!(e.v&262144||On===e.wd):!1;return r&&E(Ct.j(Wn(e),Pu.h(t),z([Eu.h(t),Ti.h(t),$i.h(t)])))?new g(null,Zrn,new g(null,l,new g(null,CN(t,n,Wn(e)),null,1,null),2,null),3,null):l},Qr=function(t,n,e){return pg(t,n,e,null)},pg=function(t,n,e,l){return _m(t,n,e,l,null)},_m=function(t,n,e,l,r){var u=Pi(n),i=u?Ge.g(r,uc(n)):null;throw n=u?fl.g(r,rc(n)):null,Ur.g(e,Nt.j(z([fn.j(new P(null,1,[pl,cln],null),Pu.h(t),n,z([Eu.h(t),i])),l])))},e3=function(t){return x(t)?-1<["\r",` +`," "," ",","].indexOf(t):t},eY=function(t,n){for(var e=new rl;;){var l=e3(n);if(!x(l)){n:switch(n){case'"':case";":case"@":case"^":case"`":case"~":case"(":case")":case"[":case"]":case"{":case"}":case"\\":l=!0;break n;default:l=!1}l=x(l)?l:n==null}if(x(l))return x(n)&&t.Jb(null,n),M.h(e);e=e.append(n),n=t.K(null)}},enn=function(t,n,e){for(var l=function(){var s=new rl;return s.append(e),s}(),r=n.K(null);;){if(x(function(){var s=e3(r);if(x(s))return s;n:switch(r){case":":case";":case"'":case"@":case"^":case"`":case"~":case"(":case")":case"[":case"]":case"{":case"}":case"\\":case"%":case"#":case'"':s=!0;break n;default:s=!1}return x(s)?s:r==null}())){var u=M.h(l);n.Jb(null,r);var i=FU(u);return x(i)?i:Qr(t,n,["Invalid number: ",u].join(""))}u=function(){var s=l;return s.append(r),s}(),i=n.K(null),l=u,r=i}},lY=function(t,n){return t=Srn.h(t),fw(t,n)},lnn=function(t,n){var e=Pi(n),l=e?n.pc(null):null;e=e?n.oc(null):null;for(var r=n.K(null),u=new rl,i=n.K(null);;){var s=i;if(X.g(null,s))return pg(t,n,["EOF while reading, expected ",M.h(r)," to match ",M.h(r)," at [",M.h(l),",",M.h(e),"]"].join(""),new P(null,3,[Ym,M.h(r),Mm,M.h(r),v1,new P(null,2,[fl,l,Ge,e],null)],null));if(X.g("\\",s)){s=function(){var o=u;return o.append(dx.g?dx.g(u,n):dx.call(null,u,n)),o}();var a=n.K(null);u=s,i=a}else{if(X.g('"',s))return M.h(u);s=function(){var o=u;return o.append(i),o}(),a=n.K(null),u=s,i=a}}},vf=function(t,n,e,l,r){this.ac=t,this.Vb=n,this.J=e,this.G=l,this.C=r,this.v=2230716170,this.H=139264},Nh=function(t){return new vf(t.pc(null),t.oc(null),null,null,null)},rY=function(t){n:for(var n=t.K(null),e=new rl;;){if(H5(n)){M.h(e);break n}var l=t.K(null);e=e.append(n),n=l}return t},n8=function(t){for(;;){var n=t.K(null);if(x(n)){if(!x(e3(n)))return t.Jb(null,n),t}else return null}},iy=function(t,n,e){var l=Yn,r=Pi(n),u=r?n.pc(null):null;r=r?n.oc(null):null;var i=n.K(null);for(t=fn.i(fn.i(t,Fm,e),ha,new P(null,3,[aa,i,fl,u,Ge,r],null)),l=He(l);;){var s=Wt?Wt(t,n):kl.call(null,t,n),a=s;if(a=a==null?null:Wn(a),a=a==null?null:lG.h(a),ig===s)return pg(t,n,["EOF while reading, expected ",M.h(e)," to match ",M.h(i)," at [",M.h(u),",",M.h(r),"]"].join(""),new P(null,3,[Ym,M.h(e),Mm,M.h(i),v1,new P(null,2,[fl,u,Ge,r],null)],null));if(Ef===s)return ul(l);if(x(a)){s=E(s),a=null;for(var o=0,h=0;;)if(h=r?dn.g(Zi,l):dn.g(Ko,l)},fnn=function(t,n){n.K(null);var e=n.K(null);x(e3(e))&&Qr(t,n,"Invalid token: :"),e=eY(n,e);var l=e.charAt(0)===":";if(l){var r=l?vt.g(e,1):e;if(l=Hm.h?Hm.h(r):Hm.call(null,r),e=m.i(l,0,null),l=m.i(l,1,null),x(e)){var u=t8(t,n,r,null);r=$n.h(e),t=e8(t,u,r,n,e,null)}else u=t8(t,n,r,"Use `:auto-resolve` + `:current` to resolve current namespace."),t=e8(t,u,Ra,n,r,"Use `:auto-resolve` + `:current` to resolve current namespace.");return Hl.g(M.h(t),l)}return Hl.h(e)},gnn=function(t){return t instanceof F?Ll([t,!0]):t instanceof S?new P(null,1,[Cu,t],null):typeof t=="string"?new P(null,1,[Cu,t],null):t},mnn=function(t,n){return t instanceof F?Ll([n.h?n.h(t):n.call(null,t),n.h?n.h(!0):n.call(null,!0)]):t instanceof S?Ll([n.h?n.h(Cu):n.call(null,Cu),n.h?n.h(t):n.call(null,t)]):typeof t=="string"?Ll([n.h?n.h(Cu):n.call(null,Cu),n.h?n.h(t):n.call(null,t)]):t},AN=function(t,n,e){var l=Pi(n);if(X.g("#",e))return n.K(null),hnn(t,n);if(X.g(null,e))return ig;if(X.g("@",e))return e=Di.h(t),x(e)?(l=e,n.K(null),e=Wt?Wt(t,n):kl.call(null,t,n),l===!0?new g(null,TG,new g(null,e,null,1,null),2,null):l.h?l.h(e):l.call(null,e)):Qr(t,n,"Deref not allowed. Use the `:deref` option");if(X.g("`",e))return e=Iu.h(t),x(e)?(l=e,n.K(null),e=Wt?Wt(t,n):kl.call(null,t,n),l===!0||we(l)?(l=et.h(vn),l=fn.i(t,YQ,l),Yv(l,n,e)):l.h?l.h(e):l.call(null,e)):Qr(t,n,"Syntax quote not allowed. Use the `:syntax-quote` option");if(X.g('"',e))return lnn(t,n);if(X.g("'",e))return e=Ls.h(t),x(e)?(l=e,n.K(null),e=Wt?Wt(t,n):kl.call(null,t,n),ig===e&&Qr(t,n,"EOF while reading"),l===!0?new g(null,Bt,new g(null,e,null,1,null),2,null):l.h?l.h(e):l.call(null,e)):lY(t,n);if(X.g("(",e))return dn.g(U,iy(t,n,")"));if(X.g(")",e)){var r=Fm.h(t);return es.g(r,e)?(l=l?Nh(n):null,n.K(null),_m(t,n,["Unmatched delimiter: ",M.h(e),x(r)?[", expected: ",M.h(r),function(){var u=ha.h(t);if(x(u)){var i=gl(u);u=cn.g(i,fl);var s=cn.g(i,Ge);return i=cn.g(i,aa),[" to match ",M.h(i)," at ",M.h(new v(null,2,5,y,[u,s],null))].join("")}return null}()].join(""):null].join(""),function(){var u=ha.h(t),i=gl(u);u=cn.g(i,aa);var s=cn.g(i,fl);return i=cn.g(i,Ge),new P(null,3,[Mm,M.h(u),v1,new P(null,2,[fl,s,Ge,i],null),Ym,M.h(r)],null)}(),l)):(n.K(null),Ef)}return X.g(":",e)?fnn(t,n):X.g(";",e)?rY(n):X.g("[",e)?iy(t,n,"]"):X.g("{",e)?cnn(t,n):X.g("\\",e)?(e=n.K(null),px.i?px.i(n,e,null):px.call(null,n,e,null)):X.g("]",e)?(r=Fm.h(t),es.g(r,e)?(l=l?Nh(n):null,n.K(null),_m(t,n,["Unmatched delimiter: ",M.h(e),x(r)?[", expected: ",M.h(r),function(){var u=ha.h(t);if(x(u)){var i=gl(u);u=cn.g(i,fl);var s=cn.g(i,Ge);return i=cn.g(i,aa),[" to match ",M.h(i)," at ",M.h(new v(null,2,5,y,[u,s],null))].join("")}return null}()].join(""):null].join(""),function(){var u=ha.h(t),i=gl(u);u=cn.g(i,aa);var s=cn.g(i,fl);return i=cn.g(i,Ge),new P(null,3,[Mm,M.h(u),v1,new P(null,2,[fl,s,Ge,i],null),Ym,M.h(r)],null)}(),l)):(n.K(null),Ef)):X.g("}",e)?(r=Fm.h(t),es.g(r,e)?(l=l?Nh(n):null,n.K(null),_m(t,n,["Unmatched delimiter: ",M.h(e),x(r)?[", expected: ",M.h(r),function(){var u=ha.h(t);if(x(u)){var i=gl(u);u=cn.g(i,fl);var s=cn.g(i,Ge);return i=cn.g(i,aa),[" to match ",M.h(i)," at ",M.h(new v(null,2,5,y,[u,s],null))].join("")}return null}()].join(""):null].join(""),function(){var u=ha.h(t),i=gl(u);u=cn.g(i,aa);var s=cn.g(i,fl);return i=cn.g(i,Ge),new P(null,3,[Mm,M.h(u),v1,new P(null,2,[fl,s,Ge,i],null),Ym,M.h(r)],null)}(),l)):(n.K(null),Ef)):X.g("^",e)?(n.K(null),e=sy?sy(t,n,!0):kl.call(null,t,n,!0),hl.i(Wt?Wt(t,n):kl.call(null,t,n),Nt,e)):X.g("~",e)?(e=function(){var u=Iu.h(t);return x(u)?(u=Is.h(t),x(u)?u:!0):u}(),x(e)?(l=e,n.K(null),n.jb(null)==="@"?(l=function(){var u=Iu.h(t);return x(u)?(u=Po.h(t),x(u)?u:!0):u}(),x(l)?(n.K(null),e=Wt?Wt(t,n):kl.call(null,t,n),l===!0?new g(null,bI,new g(null,e,null,1,null),2,null):l.h?l.h(e):l.call(null,e)):Qr(t,n,"Syntax unquote splice not allowed. Use the `:syntax-quote` option")):(e=Wt?Wt(t,n):kl.call(null,t,n),l===!0?new g(null,$3,new g(null,e,null,1,null),2,null):l.h?l.h(e):l.call(null,e))):Qr(t,n,"Syntax unquote not allowed. Use the `:syntax-unquote` option")):(e=n.K(null),x(wx.g?wx.g(n,e):wx.call(null,n,e))?enn(t,n,e):l8(t,n,e))},kl=function(t){switch(arguments.length){case 2:return Wt(arguments[0],arguments[1]);case 3:return sy(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}},Wt=function(t,n){return sy(t,n,null)},sy=function(t,n,e){for(;;){var l=Pi(n),r=function(){var k=n8(n);return x(k)?B1(n):k}();if(x(r)){var u=r,i=l?Nh(n):null,s=Lr.h(t),a=x(s)?Fr.h(J(n.frames)):null,o=x(s)?a.getLength():null,h=x(s)?Nb(n,function(k,H,R,_,Z,nn,tn,sn){return function(){return AN(k,H,sn)}}(t,n,e,i,s,a,o,u)):AN(t,n,u);if(n!==h){if(Ef===h)return h;var c=ba.h(t),f=Eo.h(t),d=ls.h(t),C=h!=null?h.v&262144||On===h.wd?!0:h.v?!1:Qn(g$,h):Qn(g$,h),I=x(s)?vt.g(M.h(a),o).trim():null,T=function(){var k=l;return k&&((k=C)&&(k=(k=Xn(f))?k:f.h?f.h(h):f.call(null,h)),x(k)?k:c)}(),$=x(function(){var k=l;return k&&(k=T,x(k)?d:k)}())?Nh(n):null,G=x(T)?fl.h(i):null,b=x(d)?fl.h($):null,en=x(T)?Ge.h(i):null,ln=x(d)?Ge.h($):null,B=x(c)?function(k,H,R,_,Z,nn,tn,sn,hn,mn,wn,pn,yn,An){return function(jn){var Sn=function(){var Pn=new P(null,1,[fu,jn],null);return Pn=x(hn)?fn.i(Pn,Lin,function(){var Nn=Ll([Pu.h(k),wn,Eu.h(k),yn]);return x(nn)?fn.j(Nn,Ti.h(k),pn,z([$i.h(k),An])):Nn}()):Pn,x(sn)?fn.i(Pn,function(){var Nn=as.h(k);return x(Nn)?Nn:Lr}(),sn):Pn}();return _.h?_.h(Sn):_.call(null,Sn)}}(t,n,e,c,f,d,C,I,T,$,G,b,en,ln):null,O=x(e)?x(B)?mnn(h,B):gnn(h):h;return x(c)?B.h?B.h(O):B.call(null,O):x(T)?hl.g(O,function(k,H,R,_,Z,nn,tn,sn,hn,mn,wn,pn,yn,An){return function(jn){return jn=fn.i(fn.i(jn,Pu.h(k),wn),Eu.h(k),yn),jn=x(nn)?fn.i(fn.i(jn,Ti.h(k),pn),$i.h(k),An):jn,x(sn)?fn.i(jn,as.h(k),sn):jn}}(t,n,e,c,f,d,C,I,T,$,G,b,en,ln)):O}}else return ig}},cl=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en,ln){this.Ba=t,this.deref=n,this.La=e,this.Ma=l,this.Na=r,this.quote=u,this.ra=i,this.sa=s,this.Ha=a,this.Ia=o,this.Ja=h,this.Aa=c,this.Ea=f,this.Ca=d,this.source=C,this.Ka=I,this.Ga=T,this.Fa=$,this.Da=G,this.J=b,this.G=en,this.C=ln,this.v=2230716170,this.H=139264},wnn=function(t){var n=Ct.j(t,_s,z([Di,Iu,Is,Po,Ls,Ts,tu,os,$s,Pu,Eu,Ti,$i,Lr,as,ba,Eo,ls]));return n=Dc(t)?Dt.g(vn,n):n,new cl(_s.h(t),Di.h(t),Iu.h(t),Is.h(t),Po.h(t),Ls.h(t),Ts.h(t),tu.h(t),os.h(t),$s.h(t),Pu.h(t),Eu.h(t),Ti.h(t),$i.h(t),Lr.h(t),as.h(t),ba.h(t),Eo.h(t),ls.h(t),null,mr(n),null)},gw=function(t,n){if(t!=null&&t.cd!=null)t=t.cd(t,n);else{var e=gw[zn(t??null)];if(e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else if(e=gw._,e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else throw Un("IBox.setVal",t)}return t},F1=function(t){if(t!=null&&t.bc!=null)t=t.bc(t);else{var n=F1[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=F1._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IBox.getVal",t)}return t},da=function(t){if(t!=null&&t.Qe!=null)t=t.ge;else{var n=da[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=da._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IReified.getMethods",t)}return t},l3=function(t,n){this.ge=t,this.Me=n},oy=function(t,n,e){if(t!=null&&t.ke!=null)t=t.ke(t,n,e);else{var l=oy[zn(t??null)];if(l!=null)t=l.i?l.i(t,n,e):l.call(null,t,n,e);else if(l=oy._,l!=null)t=l.i?l.i(t,n,e):l.call(null,t,n,e);else throw Un("SciTypeInstance.-mutate",t)}return t},FP=function(t){this.form=t},ay=function(t){if(t!=null&&t.Re!=null)t=t.stack;else{var n=ay[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=ay._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("Stack.stack",t)}return t},Ci=function(t,n,e,l,r){this.f=t,this.stack=n,this.J=e,this.G=l,this.C=r,this.v=2230716170,this.H=139264},kn=function(t,n){return new Ci(t,n,null,null,null)},w=function(t,n,e){if(t instanceof Ci){var l=t.f;return l.i?l.i(t,n,e):l.call(null,t,n,e)}return t},Tu=function(t){if(t!=null&&t.Ic!=null)t=t.Ic(t);else{var n=Tu[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=Tu._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("HasName.getName",t)}return t},HP=function(t,n){this.Zc=t,this.Kb=n},r3=function(){return J(A0)},ZP=function(t){this.val=t},dnn=function(){var t=J(A0);return new HP(t.Zc,null)},Sh=function(t){return Il(A0,t)},ic=function(t,n){if(t!=null&&t.me!=null)t=t.me(t,n);else{var e=ic[zn(t??null)];if(e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else if(e=ic._,e!=null)t=e.g?e.g(t,n):e.call(null,t,n);else throw Un("IVar.bindRoot",t)}return t},H1=function(t){if(t!=null&&t.Te!=null)t=t.root;else{var n=H1[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=H1._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IVar.getRawRoot",t)}return t},hy=function(t){if(t!=null&&t.oe!=null)t=t.oe(t);else{var n=hy[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=hy._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IVar.isMacro",t)}return t},cy=function(t){if(t!=null&&t.ne!=null)t=t.ne(t);else{var n=cy[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=cy._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("IVar.hasRoot",t)}return t},r8=function(t){if(t!=null&&t.pe!=null)t.pe(t,!0);else{var n=r8[zn(t??null)];if(n!=null)n.g?n.g(t,!0):n.call(null,t,!0);else if(n=r8._,n!=null)n.g?n.g(t,!0):n.call(null,t,!0);else throw Un("IVar.setThreadBound",t)}},Wa=function(t){if(t!=null&&t.Dd!=null)t.Dd(t);else{var n=Wa[zn(t??null)];if(n!=null)n.h?n.h(t):n.call(null,t);else if(n=Wa._,n!=null)n.h?n.h(t):n.call(null,t);else throw Un("IVar.unbind",t)}},fy=function(t){if(t!=null&&t.le!=null)t=t.le(t);else{var n=fy[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=fy._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("DynVar.dynamic?",t)}return t},mw=function(t){if(t!=null&&t.Se!=null)t=t.he;else{var n=mw[zn(t??null)];if(n!=null)t=n.h?n.h(t):n.call(null,t);else if(n=mw._,n!=null)t=n.h?n.h(t):n.call(null,t);else throw Un("CtxVar.needs-ctx?",t)}return t},Uc=function(t){var n=r3();return t=En.i(function(e,l){var r=m.i(l,0,null);if(l=m.i(l,1,null),Xn(fy(r)))throw Error(["Can't dynamically bind non-dynamic var ",M.h(r)].join(""));return r8(r),fn.i(e,r,new ZP(l))},n.Zc,t),Sh(new HP(t,n))},sc=function(){var t=r3().Kb;if(x(t))return WR===t?Il(A0,WR):Sh(t);throw Error("No frame to pop.")},pnn=function(){var t=r3(),n=vn;for(t=E(t.Zc);;)if(t){var e=j(t),l=m.i(e,0,null);e=m.i(e,1,null).bc(null),n=fn.i(n,l,e),t=A(t)}else return n},u3=function(t){var n=J(A0);return x(n)?n.Zc.get(t):null},zl=function(t){throw Error(["Attempting to call unbound fn: ",M.h(t)].join(""))},bP=function(t){this.Ta=t,this.v=1,this.H=0},Tm=function(t){return $v(t)?$n.h(Zn(t)):t},od=function(t,n,e){this.data=t,this.Bd=n,this.name=e,this.v=131072,this.H=4096},vnn=function(t,n,e,l){x(n)&&0",G)].join("")}(),i):Al(l,iv(r,u,c,i,e))}else{var d=lp.h(r);if(x(d)){var C=J(Ne);if(c=function(){var G=new P(null,6,[UQ,i,grn,i,Mrn,t,X8,e,V,Tu(C),K8,x(a)?a:o],null);return d.h?d.h(G):d.call(null,G)}(),x(c)){var I=gl(c);s=cn.g(I,fe),c=cn.g(I,Lr),I=cn.g(I,rin);var T=_e.i(fn.i(fn.i(t,Ar,vn),n2,o),kL,function(G){return G==null?new v(null,1,5,y,[i],null):In.g(G,i)});if(x(c))try{Uc(Ll([Ne,C,Sl,s]));try{var $=J(pJ);$.g?$.g(T,c):$.call(null,T,c)}finally{sc()}}catch(G){throw G instanceof Error?(n=G,ut.j(l,_e,ct,Ct,z([i])),n):G}x(I)||ut.g(l,function(G){var b=cn.g(G,ct);return b=cn.g(b,i),iv(G,u,b,i,e)})}else if($=x(s)?function(){var G=cn.g(h,i);return x(G)?Al(l,iv(r,u,G,i,e)):null}():null,!x($))throw Error(["Could not find namespace: ",M.h(i),"."].join(""))}else throw Error(["Could not find namespace ",M.h(i),"."].join(""))}return n||rI(l,i),null},Kg=function(t,n){return t instanceof S?Dn(t,n):D.g(t,n)},$N=function(t){return t instanceof S||wt(t)&&(Rt(t)==null||Rt(t)instanceof F)},pY=function(t,n,e){var l=Dn(n,e),r=rr.g(Lk,l);n=yl.g(r,ge.h(!0)),l=rr.g(Bp(Lk),l),(r=E(Yc.g(new ht(null,new P(null,7,[JI,null,ho,null,nJ,null,xun,null,K8,null,n2,null,qo,null],null),null),r)))&&el(dn.i(M,"Unsupported option(s) supplied: ",Jo.g(",",r)),e),E(l)||el("Nothing specified to load",e),r=E(l),l=null;for(var u=0,i=0;;)if(ik:k))&&Zr("Can't have fixed arity function with more params than variadic function",n),_e.u(_e.u(fn.j(ln,DL,nn,z([af,Z>O?Z:O])),o6,In,fn.i(R,frn,B)),W,In,H)},new P(null,4,[o6,Yn,W,Yn,Ern,null,af,-1],null),r),r=qt.g(J(o),l),r=dn.g(Nt,Mn.g(ki,ir(r)));var f=x(h)?Gn(r,a):null,d=rr.g(s,xe(r)),C=qt.g(J(o),In.g(sw(l),ki));l=x(C)?hu(d,br.g(C,d)):null;var I=an(d);r=hu(d,Nu.h(I));var T=x(h)?fn.i(r,a,I):r;l=(x(f)?f:E(l))?function(){var ln=x(h)?I+1:I,B=jr.h(oo.g(function(O){var k=cn.g(C,O);if(x(k)){O=cn.g(T,O);var H=Pt.h(2);return H[0]=k,H[1]=O,H}return null},d));return new v(null,2,5,y,[function(O){for(var k=B.length,H=0,R=Pt.h(ln);;)if(Han(n))throw Error("Malformed member expression, expecting (.member target ...)");return qN(t,n)}if(X.g(qm,e))return ksn(t,n,rn(n));if(X.g(tJ,e))return ntn(n);if(X.g(Wm,e))return NN(t,n);if(X.g(xc,e))return Unn(t,n);if(X.g(se,e))return Jnn(t,n);if(X.g(xp,e)){e=Rt(n);var l=nu.g(2,e);return n=ni(n),n=L.h(E(D.j(new g(null,Ww,null,1,null),new g(null,e,null,1,null),z([new g(null,bl.g(L.h(E(D.j(new g(null,xc,null,1,null),new g(null,_n(l),null,1,null),z([n])))),l),null,1,null)])))),xn.g?xn.g(t,n):xn.call(null,t,n)}if(X.g(je,e))return T0(t,n,rn(n));if(X.g($I,e))return e=E(n),n=j(e),e=A(e),l=Zn(n),l=mt($n.g(qe(n),vt.i(l,0,l.length-1)),Wn(n)),LN(t,mt(bl.i(Ms,l,e),Wn(n)));if(X.g(Mi,e))return Qnn(t,n);if(X.g(Bt,e))return X.g(2,an(n))||Zr("Wrong number of args (0) passed to quote",n),Rt(n);if(X.g(Ww,e))return Ssn(t,n,Rt(n),ni(n));if(X.g(n_,e)){l=E(n),e=j(l);var r=A(l);if(l=j(r),r=A(r),2>an(n))throw Error("Malformed member expression, expecting (.member target ...)");return qN(t,mt(new g(null,Mo,new g(null,l,new g(null,Dn($n.h(vt.g(Zn(e),1)),r),null,1,null),2,null),3,null),Wn(n)))}if(X.g(xs,e))return Fnn(t,n);if(X.g(I3,e))return NN(t,n);if(X.g(T3,e))return Hnn(t,n);if(X.g(pd,e))return Lnn(t,n,tr(gs(t),rn(n)));if(X.g(Ms,e))return LN(t,n);if(X.g(wl,e))return m.i(n,0,null),n=m.i(n,1,null),Wf(t,n,!1,null);if(X.g($m,e))return Gnn(t,n);if(X.g(Pa,e))return Bnn(t,n);if(X.g(Sg,e))return Knn(t,n);if(X.g(Vm,e))return xsn(t,n,rn(n));throw Error(["No matching clause: ",M.h(e)].join(""))},etn=function(t,n,e,l){var r=x(x(l)?x(e)?ae.h(e):e:l)?new P(null,2,[Xe,Xe.h(e),ae,ae.h(e)],null):null;x(r)&&(sg=r);try{var u=Qen.h(e);x(u)&&Uc(Ll([Sl,u]));try{var i=j(n);if(i instanceof S){var s=cn.g(kJ,i);x(x(s)?KI.h(t):s)&&vY(t,i,new v(null,2,5,y,[s,null],null));var a=x(s)?s:Wf(t,i,!0,null),o=Wn(a),h=x(o)?HA.h(o):o,c=zm.h(o),f=x(c)?c:a;if(x(x(o)?TI.h(o):o)){var d=m.i(f,0,null),C=m.i(f,1,null),I=ur(C),T=X.g(I,""),$=an(C),G=C.slice(0,$-1),b=X.g(1,$)?N5([d,I]):function(){return[my(d,G),I]};try{var en=b()}catch{en=null}var ln=m.i(en,0,null),B=m.i(en,1,null),O=tr(t,rn(n)),k=jr.h(O);if(x(ln)){if(T)return kn(function(Sn,Pn,Nn){return mm(Pn,Nn,ln,k)},null);var H=ln[B];return kn(function(Sn,Pn,Nn){return PN(Pn,Nn,ln,H,k)},null)}return kn(T?function(Sn,Pn,Nn){return Sn=b()[0],mm(Pn,Nn,Sn,k)}:function(Sn,Pn,Nn){Sn=b();var it=Sn[0];return PN(Pn,Nn,it,it[Sn[1]],k)},null)}if(x(function(){var Sn=Xn(h);return Sn&&((Sn=f instanceof S)?x(s)?s:Gn(o5,f):Sn)}()))return ttn(t,n,f);try{if(x(oY(f))){var R=function(){var Sn=vr(f);return Sn&&mw(f)}(),_=vr(f)?J(f):f,Z=function(){var Sn=_.afn;return x(Sn)?Sn:_}(),nn=x(R)?dn.F(Z,n,Ar.h(t),t,rn(n)):dn.u(Z,n,Ar.h(t),rn(n));return x(_3.h(t))?nn:x(x(l)?he(nn)&&X.g(je,j(nn)):l)?new FP(nn!=null&&(nn.v&262144||On===nn.wd)?mt(nn,Nt.j(z([e,Wn(nn)]))):nn):function(){var Sn=x(e)&&nn!=null&&(nn.v&262144||On===nn.wd)?mt(nn,Nt.j(z([e,Wn(nn)]))):nn;return xn.i?xn.i(t,Sn,l):xn.call(null,t,Sn,l)}()}var tn=Fn.h(o);if(x(tn))return _=tn,Gu(t,n,_,tr(t,rn(n)),fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])),null);var sn=HA.h(Wn(f));if(x(sn))switch(sn instanceof F?sn.za:null){case"resolve-sym":return Znn(JG.h(Wn(f)),tr(t,rn(n)),fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])));default:return O=tr(t,rn(n)),Gu(t,n,f,O,fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])),null)}else{if(R=function(){var Sn=vr(f);return Sn&&mw(f)}(),x(R))return bnn(n,f,tr(t,rn(n)));var hn=_un.h(t);return x(x(hn)?hn.h?hn.h(f):hn.call(null,f):hn)?(O=tr(t,rn(n)),Gu(t,n,f,O,fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])),function(Sn,Pn){return J(Pn.get(i))})):(O=tr(t,rn(n)),Gu(t,n,f,O,fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o])),vr(f)?function(Sn,Pn,Nn){return J(Nn)}:null))}}catch(Sn){if(Sn instanceof Error){var mn=Sn;return EN(t,mn,function(){var Pn=fn.j(e,V,J(Ne),z([fe,J(Sl),Xg,o]));return kn(function(){return null},Pn)}())}throw Sn}}else if(i instanceof F){O=tr(t,rn(n));var wn=an(O);switch(wn){case 1:var pn=m.g(O,0);return kn(function(Sn,Pn,Nn){return i.h(w(pn,Pn,Nn))},null);case 2:var yn=m.g(O,0),An=m.g(O,1);return kn(function(Sn,Pn,Nn){return i.g(w(yn,Pn,Nn),w(An,Pn,Nn))},null);default:return Zr(["Wrong number of args (",M.h(wn),") passed to: ",M.h(i)].join(""),n)}}else{a=xn.g?xn.g(t,i):xn.call(null,t,i),O=tr(t,rn(n));var jn=fn.j(e,V,J(Ne),z([fe,J(Sl)]));return Gu(t,n,a,O,jn,vr(a)?function(Sn,Pn,Nn){return w(J(Nn),Sn,Pn)}:function(Sn,Pn,Nn){return w(Nn,Sn,Pn)})}}catch(Sn){return mn=Sn,EN(t,mn,kn(function(){return null},tI(e,!1)))}finally{x(u)&&sc()}}finally{x(r)&&(sg=null)}},jY=function(t){return 16>=t?Zi:Ko},ltn=function(t,n,e){var l=jY(an(e));return Gu(t,n,l,e,null,null),Gu(t,n,l,e,null,null)},xY=function(t){return!(t instanceof Ci)},rtn=function(t,n,e){t=gs(t);var l=Dt.i(Yn,B5,n),r=tr(t,l),u=Ol(xY,r);l=u?X.g(l,r):null,l=u?x(l)?n:function(){var a=jY(an(r));return dn.g(a,r)}():null;var i=u?l:ltn(t,n,r),s=x(e)?xn.g?xn.g(t,e):xn.call(null,t,e):null;return x(s)?kn(function(a,o,h){return a=w(i,o,h),o=w(s,o,h),mt(a,o)},null):i},WN=function(t,n,e,l,r){t=gs(t);var u=x(r)?xn.g?xn.g(t,r):xn.call(null,t,r):null;r=tr(t,l);var i=Ol(xY,r),s=rh(l),a=i&&X.g(s?function(){var h=E(l);return h||Yn}():l,r);n=i?a?oe(l)?s?Ke:Yn:l:n.h?n.h(r):n.call(null,r):null;var o=i?n:Gu(t,l,e,r,null,null);return x(u)?kn(function(h,c,f){return h=w(o,c,f),c=w(u,c,f),mt(h,c)},null):o},utn=function(t,n){if(n=n.val,we(n)){var e=xe(n),l=Mn.g(Zn,e),r=ir(n),u=tr(t,r);return kn(function(i,s,a){return dn.g(cd,yl.g(l,Mn.g(function(o){return w(o,s,a)},u)))},null)}return r=tr(t,n),kn(function(i,s,a){var o=[];return NU(function(h){return o.push(w(h,s,a))},r),o},null)},st=function(t,n,e,l,r){return e=new P(null,3,[V,x(e)?e:K,th,!0,Y,!0],null),r=x(r)?Nt.j(z([e,r])):e,s3(t,n,r,l)},na=function(t,n){return kY(t,n,null,!1)},l1=function(t,n,e){return kY(t,n,e,!0)},kY=function(t,n,e,l){return l=x(l)?l:e===!0,e=new P(null,2,[V,e===!0?K:x(e)?e:K,Y,!0],null),e=x(null)?Nt.j(z([e,null])):e,s3(t,n,e,l)},SY=function(t,n){var e=dn.i(Ea,t,n);return Dn(e,Yc.g(function(l){return e===l},n))},o8=function(t,n){return En.i(function(e,l){var r=m.i(l,0,null);return l=m.i(l,1,null),Gn(t,r)?fn.i(e,l,cn.g(t,r)):e},dn.i(Ct,t,xe(n)),n)},iI=function(t,n){return En.i(function(e,l){var r=zc(l,n);return fn.i(e,r,In.g(cn.i(e,r,Ke),l))},vn,t)},OY=function(t){return ul(Hw(function(n,e,l){return Vu.i(n,l,e)},He(vn),t))},sI=function(t,n,e){if(Zw(e)){var l=dn.g(U,Mn.g(t,e));return n.h?n.h(l):n.call(null,l)}return Oa(e)?(l=new Ln(function(){var r=bu(e);return t.h?t.h(r):t.call(null,r)}(),function(){var r=Ei(e);return t.h?t.h(r):t.call(null,r)}()),n.h?n.h(l):n.call(null,l)):he(e)?(l=Qc.h(Mn.g(t,e)),n.h?n.h(l):n.call(null,l)):Dc(e)?(l=En.i(function(r,u){return In.g(r,t.h?t.h(u):t.call(null,u))},e,e),n.h?n.h(l):n.call(null,l)):mg(e)?(l=Dt.g(Wp(e),Mn.g(t,e)),n.h?n.h(l):n.call(null,l)):n.h?n.h(e):n.call(null,e)},CY=function(t,n){return t2(function(e){return Gn(t,e)?t.h?t.h(e):t.call(null,e):e},n)},itn=function(t,n){var e=an(t)-1;X.g(2,e)||el(["Wrong number of args (",M.h(e),") passed to: clojure.core/for"].join(""),t),wt(n)||el("for requires a vector for its binding",t),Ni(an(n))||el("for requires an even number of forms in binding vector",t)},s0=function(t){return i0(t,null,new P(null,2,[V,K,Y,!0],null))},VN=function(t){var n=Wn(t);if(x(n)){if(x(BG.h(n)))return $n.h(M.h(J(t)));if(t=q.h(n),x(t))return n=V.h(n),x(n)?$n.g(M.h(Tu(n)),M.h(t)):null}return null},stn=function(t,n){var e=J(Qt.h(t)),l=function(){var h=qe(n);return x(h)?$n.h(h):null}(),r=sr(),u=M.h(r),i=cn.g(e,ct),s=cn.g(i,r),a=Ns.h(s),o=function h(c){var f=Zn(c),d=function(){var C=wu.h(s);return x(C)?(C=cn.g(C,c),x(C)?VN(C):null):null}();return x(d)||(d=function(){var C=cn.g(s,c);return x(C)?VN(C):null}(),x(d))||(d=Gn(cn.g(i,Bl),c)&&Xn(function(){var C=s==null?null:qo.h(s);return C=C==null?null:cn.g(C,Bl),C=C==null?null:Rw.h(C),C==null?null:Gn(C,c)}())||Gn(o5,c)?$n.g("clojure.core",f):null,x(d))?d:(d=ynn(t,c),x(d)?d:f.indexOf(".")!=-1?f.lastIndexOf(".",0)!=0&&Np(f,".")?$n.h([M.h(h($n.h(vt.i(f,0,f.length-1)))),"."].join("")):c:$n.g(u,f))};return Xn(l)?o(n):function(){var h=cn.g(e,ct);if(x(cn.g(h,l)))return n;var c=cn.g(a,l);return x(c)?$n.g(M.h(c),Zn(n)):(h=cn.g(Vr.h(cn.g(h,r)),l),x(h)?$n.g(M.h(h),Zn(n)):n)}()},otn=function(){throw Ur.g("EvalReader not allowed when *read-eval* is false.",new P(null,1,[pl,pp],null))},atn=function(t,n){return n=PI.h(n),x(n)?n:(t=Qt.h(t),n=J(t),t=sr(),n=qt.g(n,new v(null,2,5,y,[ct,t],null)),n=Ns.h(n),fn.i(n,Ra,t))},o0=function(t,n,e){var l=eg.h(t),r=qs.h(t),u=vr(r)?J(r):r,i=atn(t,e),s=function(){var a=fn.j(Hsn,eg,l,z([PI,i,Iu,new P(null,1,[EQ,function(o){return stn(t,o)}],null),qs,function(o){var h=x(u)?u.h?u.h(o):u.call(null,o):u;if(x(h)||(h=function(){var f=J(OJ);return f.h?f.h(o):f.call(null,o)}(),x(h))||(h=function(){var f=J(Jc);return f=f.i?f.i(t,vn,o):f.call(null,t,vn,o),f=f==null?null:Wn(f),f==null?null:PQ.h(f)}(),x(h)))return h;var c=J(CJ);return x(c)?function(f){return c.g?c.g(o,f):c.call(null,o,f)}:null},os,x(J(SJ))?function(o){return u8(t,o)}:otn]));return x(e)?Nt.j(z([a,e])):a}();return function(){try{n instanceof KP&&Fr.h(J(n.frames)).clear();var a=Wt(s,n);if(ig===a)var o=cn.g(s,Ro),h=x(o)?o:sL;else h=a;return on(h,sL)?C3:h instanceof S&&Pi(n)?hl.O(h,fn,ae,rc(n),Xe,uc(n)-M.h(h).length):h}catch(c){throw c instanceof Go?(h=c,Ur.i(h.message,fn.j(K1(h),pl,pp,z([sp,"parse",fe,J(Sl)])),h)):c}}()},AY=function(t,n){if(on(C3,n)){if(n=Ro.h(t),x(n)){if(on(pin,n))throw Ur.g("EOF while reading",new P(null,2,[pl,pp,X8,t],null));return n}throw Ur.g("EOF while reading",new P(null,2,[pl,pp,X8,t],null))}return n},ii=function(t){return t.Ic(null)},EY=function(t,n){return i3(Qt.h(t),n,!1,null)},Ii=function(t,n){if(n instanceof u0)return n;if(t=EY(t,n),x(t))return t;throw Error(["No namespace: ",M.h(n)," found"].join(""))},RY=function(t,n){return n=Ii(t,n),n=ii(n),t=qt.g(J(Qt.h(t)),new v(null,3,5,y,[ct,n,Ns],null)),hu(xe(t),Mn.g(function(e){return ai(e,null)},ir(t)))},oI=function(t){return Ct.j(t,Ns,z([Vr,fu,qo,wu]))},a8=function(t,n){return n=Ii(t,n),n=ii(n),t=qt.g(J(Qt.h(t)),new v(null,2,5,y,[ct,n],null)),oI(t)},h8=function(t,n){return n=Ii(t,n),n=ii(n),t=qt.g(J(Qt.h(t)),new v(null,2,5,y,[ct,n],null)),t=oI(t),Dt.g(vn,oo.g(function(e){var l=m.i(e,0,null);return e=m.i(e,1,null),x(Vi.h(Wn(e)))?null:new v(null,2,5,y,[l,e],null)},t))},zN=function(t,n){n=Ii(t,n),n=ii(n);var e=J(Qt.h(t));t=Vr.h(e),n=qt.g(e,new v(null,3,5,y,[ct,n,Vr],null));var l=Io.h(e);return e=D.g(xe(t),xe(n)),t=D.g(ir(t),ir(n)),hu(e,Mn.g(ms.g(ss,function(r){return cn.g(l,r)}),t))},PY=function(t,n){n=Ii(t,n),n=ii(n);var e=J(Qt.h(t));return t=qt.g(e,new v(null,3,5,y,[ct,n,wu],null)),n=qt.g(e,new v(null,2,5,y,[ct,Bl],null)),n=oI(n),Nt.j(z([n,t]))},Qv=function(t){var n=Qt.h(t);return t=cn.g(J(n),ct),t=Yc.g(function(e){return m.i(e,0,null),e=m.i(e,1,null),Vi.h(e)},t),Mn.g(function(e){return i3(n,e,!0,null)},xe(t))},IY=function(t){return new od(t,null,null)},Yj=function(t){var n=W.h(t),e=N.h(t),l=th.h(t);no.j(z(["-------------------------"]));var r=no.j,u=V.h(t);return u=x(u)?[M.h(ii(u)),"/"].join(""):null,r.call(no,z([[u,M.h(q.h(t))].join("")])),x(n)&&no.j(z([n])),x(l)&&no.j(z(["Macro"])),x(e)?no.j(z([" ",e])):null},_Y=function(t,n,e){return CY(hu(t,e),n)},htn=function(t,n,e,l,r,u,i,s,a,o,h){ut.g(t,function(c){var f=ct.h(c),d=va.j(Nt,z([x(f)?f:_J,x(f)?null:new P(null,1,[Hv,fn.i(n,fu,jJ)],null),l])),C=Nt.j(z([e,qt.g(c,new v(null,3,5,y,[ct,Hv,Ns],null))])),I=_e.j;return d=_e.F(d,Hv,fn,Ns,C),C=Li(aS,F5(),new P(null,1,[V,K],null)),f=D.g(xe(f),Uhn),f=i0(Wy,et.h(Dt.g(m0(),f)),new P(null,4,[N,"A ref to a sorted set of symbols representing loaded libs",V,K,Vi,!0,Y,!0],null)),I=I.call(_e,d,Bl,fn,aS,C,Wy,z([f])),f=Vr.h(c),f=x(f)?Nt.j(z([f,i])):i,d=Nt.j(z([dp.h(c),h])),C=Nt.j(z([rp.h(c),o])),Xn(c)?new P(null,4,[ct,I,Vr,f,lp,s,B7,a],null):fn.j(c,ct,I,z([Vr,f,lp,s,B7,a,rp,C,ap,ap.h(r),Io,Io.h(r),iO,u,dp,d]))})},UN=function(t){return mr(Dt.i(Ke,ms.g(B5,Mn.h(aY)),t))},ctn=function(){return null},TY=function(t,n){Uc(Ll([Ne,J(Ne)]));try{var e=b5(dg(n));for(n=null;;){var l=o0(t,e,null);if(on(C3,l))return n;n=TJ(t,l)}}finally{sc()}},Qd=function(t){for(var n=[],e=arguments.length,l=0;l=r-l)?$Y(t,n,e):l:r:l},mtn=function(t){var n=j(t),e=de.h(n);return n=E($u.g(function(l){return!(X.g(pe.h(l),bf)&&MY(de.h(l),e))},A(t))),new v(null,2,5,y,[n,E(il.g(an(n)+1,t))],null)},wtn=function(t){var n=j(t),e=de.h(n);return E($u.g(function(l){var r=de.h(l);return!(X.g(pe.h(l),bf)&&(X.g(r,e)||MY(r,e)))},A(t)))},Gv=function(t,n){Rn(Yt.h(J(J(t))),` +`),ut.u(J(t),fn,xl,null),n=de.h(n);var e=yc.h(n);x(e)&&Rn(Yt.h(J(J(t))),e),e=dn.g(M,ge.g(J(To.h(n))-an(e)," ")),Rn(Yt.h(J(J(t))),e);n:for(Al(Ha.h(n),!0),Al(Do.h(n),!0),t=Ws.h(n);;)if(x(t))Al(Do.h(t),!0),Al(Ha.h(t),!0),t=Ws.h(t);else break n;return null},dtn=function(t){var n=E($u.g(function(e){return!X.g(pe.h(e),bf)},t));return new v(null,2,5,y,[n,E(il.g(an(n),t))],null)},qY=function(t){for(var n=Fr.h(J(J(t)));;){if(ut.u(J(t),fn,Fr,Dt.g(Yn,n)),a0(t,n))return null;var e=Ghn(t,n);if(n!==e)n=e;else return null}},Vf=function(t,n){return ut.u(J(t),fn,Fr,In.g(Fr.h(J(J(t))),n)),a0(t,Fr.h(J(J(t))))?null:qY(t)},zf=function(t){var n=xl.h(J(J(t)));return x(n)?(Rn(Yt.h(J(J(t))),n),ut.u(J(t),fn,xl,null)):null},YN=function(t,n){var e=Lo.i(n,` +`,-1);if(X.g(an(e),1))return n;n=yc.h(j(jc.h(J(J(t)))));var l=j(e);if(X.g(Xy,Za.h(J(J(t))))){var r=Ue.h(J(J(t))),u=r+an(l);ut.u(J(t),fn,Ue,u),Vf(t,new Ki(Hy,l,null,r,u,null,null,null)),qY(t),l=Fr.h(J(J(t))),x(l)&&(vy(t,l,!0),ut.u(J(t),fn,Fr,Yn))}else zf(t),Rn(Yt.h(J(J(t))),l);Rn(Yt.h(J(J(t))),` `),l=E(A(zs(e))),r=null;for(var i=u=0;;)if(i=Jt:n),Xn(wa)?Zc.call(null,t):x(n)?Rn(Kn,"..."):(x(pt)&&(pt+=1),ff.call(null,t)),n},vtn=function(t){var n=new rl,e=Kn;Kn=new Tc(n);try{var l=Kn,r=Xn(yy(l)),u=Kn;Kn=r?fI(l):l;try{l=wa,wa=!0;try{Jl(t)}finally{wa=l}X.g(0,kr(Kn,Hr))||Rn(Kn,` -`),py()}finally{Kn=u}Zp(M.h(n))}finally{Kn=e}},WY=function(t,n){if(Xn(n.h?n.h(t):n.call(null,t)))throw Error(["Bad argument: ",M.h(t),". It must be one of ",M.h(n)].join(""))},qr=function(){var t=ye;return x(t)?Ot>=ye:t},xu=function(t){WY(t,new ht(null,new P(null,4,[P3,null,Ew,null,N3,null,Fu,null],null),null));var n=Kn;ut.u(J(n),fn,Za,Xy);var e=Ue.h(J(J(n))),l=jc.h(J(J(n)));Vf(n,new Zs(bf,t,l,e,e,null,null,null))},Z1=function(t,n){WY(t,new ht(null,new P(null,2,[wo,null,Ra,null],null),null));var e=Kn,l=jc.h(J(J(e)));if(X.g(Za.h(J(J(e))),Hf)){zf(e);var r=To.h(l);if(x(X.g?X.g(wo,t):X.call(null,wo,t)))t=J(No.h(l));else if(x(X.g?X.g(Ra,t):X.call(null,Ra,t)))t=kr(Yt.h(J(J(e))),Hr);else throw Error(["No matching clause: ",M.h(t)].join(""));Al(r,n+t)}else r=Ue.h(J(J(e))),Vf(e,new ys(RG,l,t,n,r,r,null,null,null))},jy=function(t,n,e){n=typeof n=="string"?wI(n):n,e=ce(e);n:{var l=new rl,r=Xn(t)||t===!0?new Tc(l):t,u=ecn(n)&&Xn(yy(r))?x(yy(r))?r:fI(r):r,i=Kn;Kn=u;try{try{Je(n,e)}finally{r!==u&&Ma(u)}var s=Xn(t)?M.h(l):t===!0?Zp(M.h(l)):null;break n}finally{Kn=i}s=void 0}return s},Su=function(t,n){throw t=[M.h(t),` +`),x(n)&&Rn(Yt.h(J(J(t))),n),l=A(r),r=null,u=0),i=0;else break;return ut.u(J(t),fn,Xy,Hf),ur(e)},cI=function(t,n,e,l,r,u){this.uf=t,this.Nf=n,this.Vf=e,this.Of=l,this.Je=r,this.Qf=u,this.v=1074167808,this.H=0},fI=function(t){var n=h1,e=c1,l=new ru(null,null,et.h(0),et.h(0),et.h(!1),et.h(!1),null,null,null,null,null,null,null),r=et.h,u=et.h(new P(null,4,[M3,n,Hr,0,ae,0,Yt,t],null));return r=r.call(et,Wr([jc,LI,fin,XQ,hrn,Za,Ue,xl,Yt,Uln,Fr],[l,e,l,!0,null,Hf,0,null,new hI(t,n,u,vn),1,Yn])),new cI(t,n,e,l,r,vn)},$r=function(t,n){var e=Kn;if(n=new ru(jc.h(J(J(e))),null,et.h(0),et.h(0),et.h(!1),et.h(!1),t,null,n,null,null,null,null),ut.u(J(e),fn,jc,n),X.g(Za.h(J(J(e))),Hf)){zf(e);var l=_o.h(J(J(e)));x(l)&&(l.h?l.h(Gy):l.call(null,Gy)),x(t)&&Rn(Yt.h(J(J(e))),t),e=kr(Yt.h(J(J(e))),Hr),Al(n.wf,e),Al(n.vf,e)}else l=Ue.h(J(J(e))),t=l+(x(t)?an(t):0),ut.u(J(e),fn,Ue,t),Vf(e,new fa(AQ,n,l,t,null,null,null))},Nr=function(){var t=Kn,n=jc.h(J(J(t))),e=kc.h(n);if(X.g(Za.h(J(J(t))),Hf)){zf(t),x(e)&&Rn(Yt.h(J(J(t))),e);var l=_o.h(J(J(t)));x(l)&&(l.h?l.h(Ey):l.call(null,Ey))}else l=Ue.h(J(J(t))),e=l+(x(e)?an(e):0),ut.u(J(t),fn,Ue,e),Vf(t,new ga($G,n,l,e,null,null,null));ut.u(J(t),fn,jc,Ws.h(n))},yy=function(t){var n=t!=null?t.v&32768||On===t.Ze?!0:t.v?!1:Qn(Cs,t):Qn(Cs,t);return n&&XQ.h(J(J(t)))},Jl=function(t){var n=pt;return x(n)&&(n=Jt,n=x(n)?pt>=Jt:n),Xn(wa)?Zc.call(null,t):x(n)?Rn(Kn,"..."):(x(pt)&&(pt+=1),ff.call(null,t)),n},ptn=function(t){var n=new rl,e=Kn;Kn=new Tc(n);try{var l=Kn,r=Xn(yy(l)),u=Kn;Kn=r?fI(l):l;try{l=wa,wa=!0;try{Jl(t)}finally{wa=l}X.g(0,kr(Kn,Hr))||Rn(Kn,` +`),py()}finally{Kn=u}Zp(M.h(n))}finally{Kn=e}},LY=function(t,n){if(Xn(n.h?n.h(t):n.call(null,t)))throw Error(["Bad argument: ",M.h(t),". It must be one of ",M.h(n)].join(""))},qr=function(){var t=ye;return x(t)?Ot>=ye:t},xu=function(t){LY(t,new ht(null,new P(null,4,[P3,null,Ew,null,N3,null,Fu,null],null),null));var n=Kn;ut.u(J(n),fn,Za,Xy);var e=Ue.h(J(J(n))),l=jc.h(J(J(n)));Vf(n,new Zs(bf,t,l,e,e,null,null,null))},Z1=function(t,n){LY(t,new ht(null,new P(null,2,[wo,null,Ra,null],null),null));var e=Kn,l=jc.h(J(J(e)));if(X.g(Za.h(J(J(e))),Hf)){zf(e);var r=To.h(l);if(x(X.g?X.g(wo,t):X.call(null,wo,t)))t=J(No.h(l));else if(x(X.g?X.g(Ra,t):X.call(null,Ra,t)))t=kr(Yt.h(J(J(e))),Hr);else throw Error(["No matching clause: ",M.h(t)].join(""));Al(r,n+t)}else r=Ue.h(J(J(e))),Vf(e,new ys(EG,l,t,n,r,r,null,null,null))},jy=function(t,n,e){n=typeof n=="string"?wI(n):n,e=ce(e);n:{var l=new rl,r=Xn(t)||t===!0?new Tc(l):t,u=tcn(n)&&Xn(yy(r))?x(yy(r))?r:fI(r):r,i=Kn;Kn=u;try{try{Je(n,e)}finally{r!==u&&Ma(u)}var s=Xn(t)?M.h(l):t===!0?Zp(M.h(l)):null;break n}finally{Kn=i}s=void 0}return s},Su=function(t,n){throw t=[M.h(t),` `,M.h(e2),` `,M.h(dn.g(M,ge.g(n," "))),`^ -`].join(""),Error(t)},Hi=function(t,n,e,l,r,u){this.Jf=t,this.$b=n,this.If=e,this.J=l,this.G=r,this.C=u,this.v=2230716170,this.H=139264},ce=function(t){return t=E(t),new Hi(t,t,0,null,null,null)},ml=function(t){var n=qu.h(t);if(x(n))return new v(null,2,5,y,[j(n),new Hi(Ds.h(t),A(n),Ue.h(t)+1,null,null,null)],null);throw Error("Not enough arguments for format definition")},ww=function(t){var n=ml(t);return t=m.i(n,0,null),n=m.i(n,1,null),t=typeof t=="string"?wI(t):t,new v(null,2,5,y,[t,n],null)},VY=function(t,n){return n>=Ue.h(t)?(n=Ue.h(t)-n,p1.g?p1.g(t,n):p1.call(null,t,n)):new Hi(Ds.h(t),il.g(n,Ds.h(t)),n,null,null,null)},p1=function(t,n){var e=Ue.h(t)+n;return 0>n?VY(t,e):new Hi(Ds.h(t),il.g(n,qu.h(t)),e,null,null,null)},ks=function(t,n,e,l,r,u,i){this.Gf=t,this.Ff=n,this.ob=e,this.offset=l,this.J=r,this.G=u,this.C=i,this.v=2230716170,this.H=139264},ytn=function(t,n){var e=m.i(t,0,null);t=m.i(t,1,null);var l=m.i(t,0,null);return t=m.i(t,1,null),l=Gn(new ht(null,new P(null,2,[at,null,xt,null],null),null),e)?new v(null,2,5,y,[l,n],null):X.g(l,EI)?ml(n):X.g(l,kI)?new v(null,2,5,y,[an(qu.h(n)),n],null):new v(null,2,5,y,[l,n],null),n=m.i(l,0,null),l=m.i(l,1,null),new v(null,2,5,y,[new v(null,2,5,y,[e,new v(null,2,5,y,[n,t],null)],null),l],null)},gI=function(t,n){return n=aI(ytn,n,t),t=m.i(n,0,null),n=m.i(n,1,null),new v(null,2,5,y,[Dt.g(vn,t),n],null)},c8=function(t,n,e){e=ml(e);var l=m.i(e,0,null);if(e=m.i(e,1,null),iu(l))if(X.g(Dh,10))var r=[M.h(l),x(jm)?".":null].join("");else{r=M;var u=r.h;if(x(jm)){var i=cn.g(Khn,Dh);i=x(i)?i:["#",M.h(Dh),"r"].join("")}else i=null;r=[u.call(r,i),M.h(zY(Dh,l))].join("")}else r=null;return t=x(r)?r:t.h?t.h(l):t.call(null,l),l=t.length,r=l+Um.h(n),r=r>=_r.h(n)?r:r+(ri(_r.h(n)-r-1,bs.h(n))+1)*bs.h(n),l=dn.g(M,ge.g(r-l,be.h(n))),x(xt.h(n))?Ce.j(z([[M.h(l),M.h(t)].join("")])):Ce.j(z([[M.h(t),M.h(l)].join("")])),e},xy=function(t,n){return df(j(sh(function(e){return 0e?gu(qh("0")+e):gu(qh("a")+(e-10))},xy(t,n)))},jtn=function(t,n){return df(j(sh(function(e){return new v(null,2,5,y,[E(df(Cr.g(t,e))),E(il.g(t,e))],null)},df(n))))},yh=function(t,n,e){e=ml(e);var l=m.i(e,0,null);if(e=m.i(e,1,null),iu(l)||typeof l=="number"&&!isNaN(l)&&l!==1/0&&parseFloat(l)!==parseInt(l,10)&&X.g(l,Math.floor(l))){var r=0>l,u=zY(t,r?-l:l);t=x(at.h(n))?function(){var i=Mn.g(function(a){return dn.g(M,a)},jtn(ua.h(n),u)),s=ge.g(an(i),ia.h(n));return dn.g(M,A(yl.g(s,i)))}():u,t=r?["-",M.h(t)].join(""):x(xt.h(n))?["+",M.h(t)].join(""):t,t=t.length<_r.h(n)?[M.h(dn.g(M,ge.g(_r.h(n)-t.length,be.h(n)))),M.h(t)].join(""):t,Ce.j(z([t]))}else c8(kg,new P(null,5,[_r,_r.h(n),bs,1,Um,0,be,be.h(n),xt,!0],null),ce(new v(null,1,5,y,[l],null)));return e},GN=function(t){var n=ri(t,100);t=Ji(t,100);var e=0t)var u=m.g(l2,t);else{u=ri(t,10);var i=Ji(t,10);u=[M.h(0e){var l=xy(10,e);e=Yn;for(var r=an(l)-1;;)if(oe(l)){Ce.j(z([dn.g(M,e)]));break}else{var u=j(l);e=X.g(0,u)?e:In.g(e,m.g(m.g(t,r),u-1)),--r,l=A(l)}}else yh(10,new P(null,5,[_r,0,be," ",ia,",",ua,3,at,!0],null),ce(new v(null,1,5,y,[e],null)));return n},xtn=function(t,n){t=ml(n),n=m.i(t,0,null),t=m.i(t,1,null);var e=qh(n);n=e&127,e&=128;var l=cn.g(Hhn,n);return 0n?["Control-",M.h(gu(n+64))].join(""):X.g(n,127)?"Control-?":gu(n)])),t},ktn=function(t,n){var e=ml(n);if(n=m.i(e,0,null),e=m.i(e,1,null),t=UQ.h(t),x(X.g?X.g("o",t):X.call(null,"o",t)))jy(!0,"\\o~3,'0o",z([qh(n)]));else if(x(X.g?X.g("u",t):X.call(null,"u",t)))jy(!0,"\\u~4,'0x",z([qh(n)]));else if(x(X.g?X.g(null,t):X.call(null,null,t)))Rn(Kn,x(X.g?X.g("\b",n):X.call(null,"\b",n))?"\\backspace":x(X.g?X.g(" ",n):X.call(null," ",n))?"\\space":x(X.g?X.g(" ",n):X.call(null," ",n))?"\\tab":x(X.g?X.g(` +`].join(""),Error(t)},Hi=function(t,n,e,l,r,u){this.Jf=t,this.$b=n,this.If=e,this.J=l,this.G=r,this.C=u,this.v=2230716170,this.H=139264},ce=function(t){return t=E(t),new Hi(t,t,0,null,null,null)},ml=function(t){var n=qu.h(t);if(x(n))return new v(null,2,5,y,[j(n),new Hi(Ds.h(t),A(n),Ue.h(t)+1,null,null,null)],null);throw Error("Not enough arguments for format definition")},ww=function(t){var n=ml(t);return t=m.i(n,0,null),n=m.i(n,1,null),t=typeof t=="string"?wI(t):t,new v(null,2,5,y,[t,n],null)},WY=function(t,n){return n>=Ue.h(t)?(n=Ue.h(t)-n,p1.g?p1.g(t,n):p1.call(null,t,n)):new Hi(Ds.h(t),il.g(n,Ds.h(t)),n,null,null,null)},p1=function(t,n){var e=Ue.h(t)+n;return 0>n?WY(t,e):new Hi(Ds.h(t),il.g(n,qu.h(t)),e,null,null,null)},ks=function(t,n,e,l,r,u,i){this.Gf=t,this.Ff=n,this.ob=e,this.offset=l,this.J=r,this.G=u,this.C=i,this.v=2230716170,this.H=139264},vtn=function(t,n){var e=m.i(t,0,null);t=m.i(t,1,null);var l=m.i(t,0,null);return t=m.i(t,1,null),l=Gn(new ht(null,new P(null,2,[at,null,xt,null],null),null),e)?new v(null,2,5,y,[l,n],null):X.g(l,EI)?ml(n):X.g(l,kI)?new v(null,2,5,y,[an(qu.h(n)),n],null):new v(null,2,5,y,[l,n],null),n=m.i(l,0,null),l=m.i(l,1,null),new v(null,2,5,y,[new v(null,2,5,y,[e,new v(null,2,5,y,[n,t],null)],null),l],null)},gI=function(t,n){return n=aI(vtn,n,t),t=m.i(n,0,null),n=m.i(n,1,null),new v(null,2,5,y,[Dt.g(vn,t),n],null)},c8=function(t,n,e){e=ml(e);var l=m.i(e,0,null);if(e=m.i(e,1,null),iu(l))if(X.g(Dh,10))var r=[M.h(l),x(jm)?".":null].join("");else{r=M;var u=r.h;if(x(jm)){var i=cn.g(Jhn,Dh);i=x(i)?i:["#",M.h(Dh),"r"].join("")}else i=null;r=[u.call(r,i),M.h(VY(Dh,l))].join("")}else r=null;return t=x(r)?r:t.h?t.h(l):t.call(null,l),l=t.length,r=l+Um.h(n),r=r>=_r.h(n)?r:r+(ri(_r.h(n)-r-1,bs.h(n))+1)*bs.h(n),l=dn.g(M,ge.g(r-l,be.h(n))),x(xt.h(n))?Ce.j(z([[M.h(l),M.h(t)].join("")])):Ce.j(z([[M.h(t),M.h(l)].join("")])),e},xy=function(t,n){return df(j(sh(function(e){return 0e?gu(qh("0")+e):gu(qh("a")+(e-10))},xy(t,n)))},ytn=function(t,n){return df(j(sh(function(e){return new v(null,2,5,y,[E(df(Cr.g(t,e))),E(il.g(t,e))],null)},df(n))))},yh=function(t,n,e){e=ml(e);var l=m.i(e,0,null);if(e=m.i(e,1,null),iu(l)||typeof l=="number"&&!isNaN(l)&&l!==1/0&&parseFloat(l)!==parseInt(l,10)&&X.g(l,Math.floor(l))){var r=0>l,u=VY(t,r?-l:l);t=x(at.h(n))?function(){var i=Mn.g(function(a){return dn.g(M,a)},ytn(ua.h(n),u)),s=ge.g(an(i),ia.h(n));return dn.g(M,A(yl.g(s,i)))}():u,t=r?["-",M.h(t)].join(""):x(xt.h(n))?["+",M.h(t)].join(""):t,t=t.length<_r.h(n)?[M.h(dn.g(M,ge.g(_r.h(n)-t.length,be.h(n)))),M.h(t)].join(""):t,Ce.j(z([t]))}else c8(kg,new P(null,5,[_r,_r.h(n),bs,1,Um,0,be,be.h(n),xt,!0],null),ce(new v(null,1,5,y,[l],null)));return e},QN=function(t){var n=ri(t,100);t=Ji(t,100);var e=0t)var u=m.g(l2,t);else{u=ri(t,10);var i=Ji(t,10);u=[M.h(0e){var l=xy(10,e);e=Yn;for(var r=an(l)-1;;)if(oe(l)){Ce.j(z([dn.g(M,e)]));break}else{var u=j(l);e=X.g(0,u)?e:In.g(e,m.g(m.g(t,r),u-1)),--r,l=A(l)}}else yh(10,new P(null,5,[_r,0,be," ",ia,",",ua,3,at,!0],null),ce(new v(null,1,5,y,[e],null)));return n},jtn=function(t,n){t=ml(n),n=m.i(t,0,null),t=m.i(t,1,null);var e=qh(n);n=e&127,e&=128;var l=cn.g(Fhn,n);return 0n?["Control-",M.h(gu(n+64))].join(""):X.g(n,127)?"Control-?":gu(n)])),t},xtn=function(t,n){var e=ml(n);if(n=m.i(e,0,null),e=m.i(e,1,null),t=zQ.h(t),x(X.g?X.g("o",t):X.call(null,"o",t)))jy(!0,"\\o~3,'0o",z([qh(n)]));else if(x(X.g?X.g("u",t):X.call(null,"u",t)))jy(!0,"\\u~4,'0x",z([qh(n)]));else if(x(X.g?X.g(null,t):X.call(null,null,t)))Rn(Kn,x(X.g?X.g("\b",n):X.call(null,"\b",n))?"\\backspace":x(X.g?X.g(" ",n):X.call(null," ",n))?"\\space":x(X.g?X.g(" ",n):X.call(null," ",n))?"\\tab":x(X.g?X.g(` `,n):X.call(null,` -`,n))?"\\newline":x(X.g?X.g("\f",n):X.call(null,"\f",n))?"\\formfeed":x(X.g?X.g("\r",n):X.call(null,"\r",n))?"\\return":x(X.g?X.g('"',n):X.call(null,'"',n))?'\\"':x(X.g?X.g("\\",n):X.call(null,"\\",n))?"\\\\":["\\",M.h(n)].join(""));else throw Error(["No matching clause: ",M.h(t)].join(""));return e},Stn=function(t,n){return n=ml(n),t=m.i(n,0,null),n=m.i(n,1,null),Ce.j(z([t])),n},UY=function(t){return t=j(t),X.g(Sf,t)||X.g(E3,t)},ts=function(t,n,e){return Rt(aI(function(l,r){if(UY(r))return new v(null,2,5,y,[null,r],null);r=gI(rt.h(l),r);var u=m.i(r,0,null);r=m.i(r,1,null);var i=MY(u);return u=m.i(i,0,null),i=m.i(i,1,null),u=fn.i(u,Hu,e),new v(null,2,5,y,[null,dn.g(nh.h(l),new v(null,3,5,y,[u,r,i],null))],null)},n,t))},o3=function(t){t=Th(M.h(t));var n=t.indexOf("e"),e=t.indexOf(".");t=0>n?0>e?new v(null,2,5,y,[t,M.h(t.length-1)],null):new v(null,2,5,y,[[vt.i(t,0,e),vt.g(t,e+1)].join(""),M.h(e-1)],null):0>e?new v(null,2,5,y,[vt.i(t,0,n),vt.g(t,n+1)],null):new v(null,2,5,y,[[vt.i(t,0,1),vt.i(t,2,n)].join(""),vt.g(t,n+1)],null),n=m.i(t,0,null),t=m.i(t,1,null);n:if(e=an(n),0e){n="";break n}if(X.g(m.g(n,e),"0"))--e;else{n=vt.i(n,0,e+1);break n}}n:{e=n;var l=an(e);if(0l?2:l:0,x(e)?e=n+e+1:0<=n?(e=n+1,--l,e=e>l?e:l):e=l+n;var u=X.g(e,0)?new v(null,4,5,y,[["0",M.h(t)].join(""),n+1,1,r+1],null):new v(null,4,5,y,[t,n,e,r],null);if(e=m.i(u,0,null),r=m.i(u,1,null),l=m.i(u,2,null),u=m.i(u,3,null),x(l)){if(0>l)return new v(null,3,5,y,["0",0,!1],null);if(u>l){if(n=m.g(e,l),t=vt.i(e,0,l),qh(n)>=qh("5")){n:for(n=an(t)-1,e=n|0;;){if(0>e){n=dn.i(M,"1",ge.g(n+1,"0"));break n}if(X.g("9",t.charAt(e)))--e;else{n=dn.u(M,vt.i(t,0,e),gu(qh(t.charAt(e))+1),ge.g(n-e,"0"));break n}}return t=an(n)>t.length,new v(null,3,5,y,[t?vt.i(n,0,an(n)-1):n,r,t],null)}return new v(null,3,5,y,[t,r,!1],null)}}}return new v(null,3,5,y,[t,n,!1],null)},YY=function(t,n,e){var l=0>n?new v(null,2,5,y,[[M.h(dn.g(M,ge.g(-n-1,"0"))),M.h(t)].join(""),-1],null):new v(null,2,5,y,[t,n],null);t=m.i(l,0,null);var r=m.i(l,1,null);return l=an(t),e=x(e)?r+e+1:r+1,e=ln?n=[".",M.h(e)].join(""):(n+=1,n=[vt.i(e,0,n),".",vt.g(e,n)].join("")),n},Otn=function(t,n){return 0>n?[".",M.h(t)].join(""):[vt.i(t,0,n),".",vt.g(t,n)].join("")},QY=function(t,n){var e=ja.h(t),l=xa.h(t);n=ml(n);var r=m.i(n,0,null);n=m.i(n,1,null);var u=0>r?new v(null,2,5,y,["-",-r],null):new v(null,2,5,y,["+",r],null),i=m.i(u,0,null);u=m.i(u,1,null),u=o3(u);var s=m.i(u,0,null),a=m.i(u,1,null)+Jm.h(t);u=function(){var f=xt.h(t);return x(f)?f:0>r}();var o=Xn(l)&&an(s)-1<=a,h=mI(s,a,l,x(e)?e-(x(u)?1:0):null);if(s=m.i(h,0,null),a=m.i(h,1,null),h=m.i(h,2,null),s=YY(s,x(h)?a+1:a,l),l=x(x(e)?x(l)?1<=l&&X.g(s.charAt(0),"0")&&X.g(s.charAt(1),".")&&s.length>e-(x(u)?1:0):l:e)?vt.g(s,1):s,a=X.g(j(l),"."),x(e)){s=l.length,s=x(u)?s+1:s,a=a&&!(s>=e),o=o&&!(s>=e);var c=a||o?s+1:s;x(function(){var f=c>e;return f&&Ia.h(t)}())?Ce.j(z([dn.g(M,ge.g(e,Ia.h(t)))])):Ce.j(z([[M.h(dn.g(M,ge.g(e-c,be.h(t)))),M.h(x(u)?i:null),a?"0":null,l,o?"0":null].join("")]))}else Ce.j(z([[M.h(x(u)?i:null),a?"0":null,l,o?"0":null].join("")]));return n},GY=function(t,n){n=ml(n);var e=m.i(n,0,null);n=m.i(n,1,null);var l=o3(0>e?-e:e);for(m.i(l,0,null),m.i(l,1,null);;){var r=m.i(l,0,null),u=m.i(l,1,null),i=ja.h(t),s=xa.h(t),a=l5.h(t),o=Jm.h(t),h=function(){var T=x8.h(t);return x(T)?T:"E"}();l=function(){var T=xt.h(t);return x(T)?T:0>e}();var c=0>=o,f=u-(o-1),d=M.h(Math.abs(f));h=[M.h(h),0>f?"-":"+",M.h(x(a)?dn.g(M,ge.g(a-d.length,"0")):null),d].join("");var C=h.length;if(f=an(r),r=[M.h(dn.g(M,ge.g(-o,"0"))),M.h(r),M.h(x(s)?dn.g(M,ge.g(s-(f-1)-(0>o?-o:0),"0")):null)].join(""),f=x(i)?i-C:null,r=mI(r,0,X.g(o,0)?s-1:0o?s-1:null,x(f)?f-(x(l)?1:0):null),f=m.i(r,0,null),m.i(r,1,null),d=m.i(r,2,null),r=Otn(f,o),s=X.g(o,an(f))&&s==null,Xn(d)){if(x(i)){u=r.length+C,u=x(l)?u+1:u;var I=(c=c&&!X.g(u,i))?u+1:u;u=s&&Ii;return T||(T=a,T=x(T)?C-2>a:T),x(T)?Ia.h(t):T}())?Ce.j(z([dn.g(M,ge.g(i,Ia.h(t)))])):Ce.j(z([[M.h(dn.g(M,ge.g(i-I-(u?1:0),be.h(t)))),x(l)?0>e?"-":"+":null,c?"0":null,r,u?"0":null,h].join("")]))}else Ce.j(z([[x(l)?0>e?"-":"+":null,c?"0":null,r,s?"0":null,h].join("")]));break}else l=new v(null,2,5,y,[f,u+1],null)}return n},Ctn=function(t,n,e){var l=ml(n),r=m.i(l,0,null);m.i(l,1,null),l=o3(0>r?-r:r);var u=m.i(l,0,null);l=m.i(l,1,null);var i=ja.h(t),s=xa.h(t),a=l5.h(t);return l=X.g(r,0)?0:l+1,r=x(a)?a+2:4,i=x(i)?i-r:null,x(s)?u=s:(u=an(u),s=7>l?l:7,u=u>s?u:s),l=u-l,0<=l&&l<=u?(t=QY(new P(null,6,[ja,i,xa,l,Jm,0,Ia,Ia.h(t),be,be.h(t),xt,xt.h(t)],null),n),Ce.j(z([dn.g(M,ge.g(r," "))])),t):GY(t,n)},Atn=function(t,n){n=ml(n);var e=m.i(n,0,null);n=m.i(n,1,null);var l=o3(Math.abs(e)),r=m.i(l,0,null),u=m.i(l,1,null),i=xa.h(t),s=Ch.h(t);l=ja.h(t);var a=function(){var h=xt.h(t);return x(h)?h:0>e}(),o=mI(r,u,i,null);return r=m.i(o,0,null),u=m.i(o,1,null),o=m.i(o,2,null),i=YY(r,x(o)?u+1:u,i),s=[M.h(dn.g(M,ge.g(s-i.indexOf("."),"0"))),i].join(""),i=s.length+(x(a)?1:0),Ce.j(z([[x(function(){var h=at.h(t);return x(h)?a:h}())?0>e?"-":"+":null,M.h(dn.g(M,ge.g(l-i,be.h(t)))),x(function(){var h=Xn(at.h(t));return h&&a}())?0>e?"-":"+":null,s].join("")])),n},Etn=function(t,n){var e=DQ.h(t);e=x(e)?new v(null,2,5,y,[e,n],null):ml(n),n=m.i(e,0,null),e=m.i(e,1,null);var l=ou.h(t);return n=0>n||n>=an(l)?j(Yu.h(t)):m.g(l,n),x(n)?ts(n,e,Hu.h(t)):e},Rtn=function(t,n){var e=ml(n);n=m.i(e,0,null),e=m.i(e,1,null);var l=ou.h(t);return n=x(n)?Rt(l):j(l),x(n)?ts(n,e,Hu.h(t)):e},Ptn=function(t,n){var e=ml(n),l=m.i(e,0,null);e=m.i(e,1,null);var r=ou.h(t);return r=x(l)?j(r):null,x(l)?x(r)?ts(r,n,Hu.h(t)):n:e},Itn=function(t,n){var e=x0.h(t),l=j(ou.h(t));l=oe(l)?ww(n):new v(null,2,5,y,[l,n],null),n=m.i(l,0,null),l=m.i(l,1,null),l=ml(l);var r=m.i(l,0,null);l=m.i(l,1,null);var u=0;r=ce(r);for(var i=-1;;){if(Xn(e)&&X.g(Ue.h(r),i)&&1=e:e))||(i=ts(n,r,Hu.h(t)),X.g(Sf,j(i))))return l;u+=1;var s=Ue.h(r);r=i,i=s}},_tn=function(t,n){var e=x0.h(t),l=j(ou.h(t));l=oe(l)?ww(n):new v(null,2,5,y,[l,n],null),n=m.i(l,0,null),l=m.i(l,1,null),l=ml(l);var r=m.i(l,0,null);l=m.i(l,1,null);for(var u=0;;){var i=oe(r)&&(Xn(at.h(jd.h(t)))||0=e:e))||(i=ts(n,ce(j(r)),ce(A(r))),X.g(E3,j(i))))return l;u+=1,r=A(r)}},Ttn=function(t,n){var e=x0.h(t),l=j(ou.h(t)),r=oe(l)?ww(n):new v(null,2,5,y,[l,n],null);n=m.i(r,0,null),l=0,r=m.i(r,1,null);for(var u=-1;;){if(Xn(e)&&X.g(Ue.h(r),u)&&1=e:e)))return r;if(u=ts(n,r,Hu.h(t)),X.g(Sf,j(u)))return Rt(u);l+=1;var i=Ue.h(r);r=u,u=i}},Dtn=function(t,n){var e=x0.h(t),l=j(ou.h(t)),r=oe(l)?ww(n):new v(null,2,5,y,[l,n],null);for(n=m.i(r,0,null),l=0,r=m.i(r,1,null);;){var u=oe(qu.h(r))&&(Xn(at.h(jd.h(t)))||0=e:e)))return r;if(u=qu.h(r),u=x(u)?new v(null,2,5,y,[j(u),new Hi(Ds.h(r),A(u),Ue.h(r)+1,null,null,null)],null):new v(null,2,5,y,[null,r],null),r=m.i(u,0,null),u=m.i(u,1,null),r=ts(n,ce(r),u),X.g(E3,j(r)))return u;r=u,l+=1}},Mtn=function(t,n){if(x(at.h(jd.h(t)))){var e=ou.h(t),l=an(e),r=1G?1:G}();a=En.g(So,Mn.g(an,o));var c=_r.h(t),f=Um.h(t),d=bs.h(t),C=a+h*f;c=C<=c?c:c+d*(1+ri(C-c-1,d));var I=c-a;a=function(){var G=ri(I,h);return f>G?f:G}(),d=I-a*h,a=dn.g(M,ge.g(a,be.h(t))),x(x(l)?kr(Yt.h(J(J(Kn))),Hr)+e+c>s:l)&&Ce.j(z([l])),e=d;for(var T=o,$=function(){var G=at.h(t);return x(G)?G:X.g(an(T),1)&&Xn(xt.h(t))}();E(T);)Ce.j(z([[M.h(Xn($)?j(T):null),M.h(x(function(){var G=$;return x(G)||(G=A(T))?G:xt.h(t)}())?a:null),M.h(0an(rt.h(t))&&Su(jy(null,'Too many parameters for directive "~C": ~D~:* ~[were~;was~:;were~] specified but only ~D~:* ~[are~;is~:;are~] allowed',z([Ft.h(t),an(n),an(rt.h(t))])),Rt(j(n))),Qc.h(Mn.i(function(r,u){var i=j(r);return i==null||Gn(ncn,i)||X.g(Rt(Rt(u)),cr(i))?null:Su(["Parameter ",Zn(j(u)),' has bad type in directive "',M.h(Ft.h(t)),'": ',M.h(cr(i))].join(""),Rt(r))},n,rt.h(t))),Nt.j(z([Dt.g(vn,df(function(){return function r(u){return new Mt(null,function(){for(;;){var i=E(u);if(i){if(re(i)){var s=Ht(i),a=an(s),o=ui(a);n:for(var h=0;;)if(hr?new v(null,2,5,y,[XN(l,e),new v(null,2,5,y,["",e+l.length],null)],null):r===0?Btn(vt.g(l,1),e+1):new v(null,2,5,y,[XN(vt.i(l,0,r),e),new v(null,2,5,y,[vt.g(l,r),r+e],null)],null)},new v(null,2,5,y,[t,0],null))))}finally{e2=n}},Je=function(t,n){return aI(function(e,l){if(UY(l))return new v(null,2,5,y,[null,l],null);l=gI(rt.h(e),l);var r=m.i(l,0,null);l=m.i(l,1,null);var u=MY(r);return r=m.i(u,0,null),u=m.i(u,1,null),r=fn.i(r,Hu,l),new v(null,2,5,y,[null,dn.g(nh.h(e),new v(null,3,5,y,[r,l,u],null))],null)},n,t),null},KY=function(t){var n=j(t);return n=xx.h?xx.h(n):xx.call(null,n),x(x(n)?X.g(2,an(t)):n)?(Rn(Kn,n),Jl(Rt(t)),!0):null},BY=function(t){if(x(qr()))Rn(Kn,"#");else{var n=Ot,e=pt;Ot+=1,pt=0;try{$r("[","]");for(var l=0,r=E(t);;){if(Xn(Jt)||l":"~<(~;~@{~w~^ ~:_~}~;)~:>",O=typeof B=="string"?tl(B):B;return function(k,H,R){return function(){function _(nn){var tn=null;if(0>>0),een=0,len=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};p=rl.prototype;p.dc="";p.set=function(t){this.dc=""+t};p.append=function(t,n,e){if(this.dc+=String(t),n!=null)for(let l=1;l":"_GT_"},bY={_RBRACE_:"}",_COLON_:":",_BANG_:"!",_QMARK_:"?",_BSLASH_:"\\\\",_SLASH_:"/",_PERCENT_:"%",_PLUS_:"+",_SHARP_:"#",_LBRACE_:"{",_BAR_:"|",_LBRACK_:"[",_EQ_:"=",_:"-",_TILDE_:"~",_RBRACK_:"]",_GT_:">",_SINGLEQUOTE_:"'",_CIRCA_:"@",_AMPERSAND_:"&",_DOUBLEQUOTE_:'\\"',_CARET_:"^",_LT_:"<",_STAR_:"*"},Gj=null,Lh=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;r>>16&65535)*l+e*(n>>>16&65535)<<16>>>0)|0},Jj={},Kj=0;p=S.prototype;p.toString=function(){return this.Mb};p.T=function(t,n){return n instanceof S?this.Mb===n.Mb:!1};p.call=function(t){switch(arguments.length-1){case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.h=function(t){return cn.g?cn.g(t,this):cn.call(null,t,this)};p.g=function(t,n){return cn.i?cn.i(t,this,n):cn.call(null,t,this,n)};p.P=function(){return this.sb};p.W=function(t,n){return new S(this.eb,this.name,this.Mb,this.vc,n)};p.U=function(){var t=this.vc;return t??(this.vc=t=kP(this))};p.xc=function(){return this.name};p.yc=function(){return this.eb};p.M=function(t,n){return Rn(n,this.Mb)};var $n=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};$n.h=function(t){for(;;){if(t instanceof S)return t;if(typeof t=="string"){var n=t.indexOf("/");return 1>n?$n.g(null,t):$n.g(t.substring(0,n),t.substring(n+1,t.length))}if(t instanceof Lu)return t.Nb;if(t instanceof F)t=t.za;else throw Error("no conversion to symbol")}};$n.g=function(t,n){var e=t!=null?[M.h(t),"/",M.h(n)].join(""):n;return new S(t,n,e,null,null)};$n.l=2;p=Lu.prototype;p.toString=function(){return["#'",M.h(this.Nb)].join("")};p.gb=function(){return this.val.m?this.val.m():this.val.call(null)};p.P=function(){return this.sb};p.W=function(t,n){return new Lu(this.val,this.Nb,n)};p.T=function(t,n){return n instanceof Lu?(t=this.Nb,n=n.Nb,X.g?X.g(t,n):X.call(null,t,n)):!1};p.U=function(){return kP(this.Nb)};p.Md=On;p.call=function(t){switch(arguments.length-1){case 0:return this.m();case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);case 3:return this.i(arguments[1],arguments[2],arguments[3]);case 4:return this.u(arguments[1],arguments[2],arguments[3],arguments[4]);case 5:return this.F(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);case 6:return this.O(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);case 7:return this.pa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7]);case 8:return this.da(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8]);case 9:return this.qa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9]);case 10:return this.fa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10]);case 11:return this.ga(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11]);case 12:return this.ha(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12]);case 13:return this.ia(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13]);case 14:return this.ja(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14]);case 15:return this.ka(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15]);case 16:return this.la(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16]);case 17:return this.ma(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17]);case 18:return this.na(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18]);case 19:return this.oa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19]);case 20:return this.Pa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19],arguments[20]);case 21:return this.Rb(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19],arguments[20],arguments[21]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.m=function(){var t=this.val.m?this.val.m():this.val.call(null);return t.m?t.m():t.call(null)};p.h=function(t){var n=this.val.m?this.val.m():this.val.call(null);return n.h?n.h(t):n.call(null,t)};p.g=function(t,n){var e=this.val.m?this.val.m():this.val.call(null);return e.g?e.g(t,n):e.call(null,t,n)};p.i=function(t,n,e){var l=this.val.m?this.val.m():this.val.call(null);return l.i?l.i(t,n,e):l.call(null,t,n,e)};p.u=function(t,n,e,l){var r=this.val.m?this.val.m():this.val.call(null);return r.u?r.u(t,n,e,l):r.call(null,t,n,e,l)};p.F=function(t,n,e,l,r){var u=this.val.m?this.val.m():this.val.call(null);return u.F?u.F(t,n,e,l,r):u.call(null,t,n,e,l,r)};p.O=function(t,n,e,l,r,u){var i=this.val.m?this.val.m():this.val.call(null);return i.O?i.O(t,n,e,l,r,u):i.call(null,t,n,e,l,r,u)};p.pa=function(t,n,e,l,r,u,i){var s=this.val.m?this.val.m():this.val.call(null);return s.pa?s.pa(t,n,e,l,r,u,i):s.call(null,t,n,e,l,r,u,i)};p.da=function(t,n,e,l,r,u,i,s){var a=this.val.m?this.val.m():this.val.call(null);return a.da?a.da(t,n,e,l,r,u,i,s):a.call(null,t,n,e,l,r,u,i,s)};p.qa=function(t,n,e,l,r,u,i,s,a){var o=this.val.m?this.val.m():this.val.call(null);return o.qa?o.qa(t,n,e,l,r,u,i,s,a):o.call(null,t,n,e,l,r,u,i,s,a)};p.fa=function(t,n,e,l,r,u,i,s,a,o){var h=this.val.m?this.val.m():this.val.call(null);return h.fa?h.fa(t,n,e,l,r,u,i,s,a,o):h.call(null,t,n,e,l,r,u,i,s,a,o)};p.ga=function(t,n,e,l,r,u,i,s,a,o,h){var c=this.val.m?this.val.m():this.val.call(null);return c.ga?c.ga(t,n,e,l,r,u,i,s,a,o,h):c.call(null,t,n,e,l,r,u,i,s,a,o,h)};p.ha=function(t,n,e,l,r,u,i,s,a,o,h,c){var f=this.val.m?this.val.m():this.val.call(null);return f.ha?f.ha(t,n,e,l,r,u,i,s,a,o,h,c):f.call(null,t,n,e,l,r,u,i,s,a,o,h,c)};p.ia=function(t,n,e,l,r,u,i,s,a,o,h,c,f){var d=this.val.m?this.val.m():this.val.call(null);return d.ia?d.ia(t,n,e,l,r,u,i,s,a,o,h,c,f):d.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f)};p.ja=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d){var C=this.val.m?this.val.m():this.val.call(null);return C.ja?C.ja(t,n,e,l,r,u,i,s,a,o,h,c,f,d):C.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d)};p.ka=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C){var I=this.val.m?this.val.m():this.val.call(null);return I.ka?I.ka(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C):I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C)};p.la=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I){var T=this.val.m?this.val.m():this.val.call(null);return T.la?T.la(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I):T.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I)};p.ma=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T){var $=this.val.m?this.val.m():this.val.call(null);return $.ma?$.ma(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T):$.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T)};p.na=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$){var G=this.val.m?this.val.m():this.val.call(null);return G.na?G.na(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$):G.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$)};p.oa=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G){var b=this.val.m?this.val.m():this.val.call(null);return b.oa?b.oa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G):b.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G)};p.Pa=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b){var en=this.val.m?this.val.m():this.val.call(null);return en.Pa?en.Pa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b):en.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b)};p.Rb=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en){var ln=this.val.m?this.val.m():this.val.call(null);return dn.md?dn.md(ln,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en):dn.call(null,ln,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en)};var X=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;rt?0:t};p.Sb=function(){var t=this.X(null);return 0n)throw Error("Index out of bounds");n:for(;;){if(t==null)throw Error("Index out of bounds");if(n===0){if(E(t)){t=j(t);break n}throw Error("Index out of bounds")}if(CP(t)){t=nt(t,n);break n}if(E(t))t=A(t),--n;else throw Error("Index out of bounds")}return t}if(Qn($2,t))return nt(t,n);throw Error(["nth not supported on this type ",M.h(Hz(cr(t)))].join(""))};m.i=function(t,n,e){if(typeof n!="number")throw Error("Index argument to nth must be a number.");if(t==null)return e;if(t!=null&&(t.v&16||On===t.Od))return t.Qa(null,n,e);if(vu(t))return-1n?e:kb(t,n,e);if(Qn($2,t))return nt(t,n,e);throw Error(["nth not supported on this type ",M.h(Hz(cr(t)))].join(""))};m.l=3;var cn=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};cn.g=function(t,n){return t==null?null:t!=null&&(t.v&256||On===t.ye)?t.ta(null,n):vu(t)?n!=null&&nn};fc.j=function(t,n,e){for(;;)if(t>n)if(A(e))t=n,n=j(e),e=A(e);else return n>j(e);else return!1};fc.o=function(t){var n=j(t),e=A(t);return t=j(e),e=A(e),this.j(n,t,e)};fc.l=2;var gc=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;r=n};gc.j=function(t,n,e){for(;;)if(t>=n)if(A(e))t=n,n=j(e),e=A(e);else return n>=j(e);else return!1};gc.o=function(t){var n=j(t),e=A(t);return t=j(e),e=A(e),this.j(n,t,e)};gc.l=2;var Oo=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;rn?t:n};Oo.j=function(t,n,e){return En.i(Oo,t>n?t:n,e)};Oo.o=function(t){var n=j(t),e=A(t);return t=j(e),e=A(e),this.j(n,t,e)};Oo.l=2;var mc=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;rl:r))e[l]=n.next(),l+=1;else return al(new $f(e,0,l),t.h?t.h(n):t.call(null,n))}else return null},null,null)};$c.prototype.step=function(){if(this.ab!==vc)return!0;for(;;)if(this.ab===vc)if(this.buffer.Fc()){if(this.yd)return!1;if(this.Fd.ea()){if(this.Le)var t=dn.g(this.Fb,Dn(null,this.Fd.next()));else t=this.Fd.next(),t=this.Fb.g?this.Fb.g(null,t):this.Fb.call(null,null,t);ue(t)&&(this.Fb.h?this.Fb.h(null):this.Fb.call(null,null),this.yd=!0)}else this.Fb.h?this.Fb.h(null):this.Fb.call(null,null),this.yd=!0}else this.ab=this.buffer.remove();else return!0};$c.prototype.ea=function(){return this.step()};$c.prototype.next=function(){if(this.ea()){var t=this.ab;return this.ab=vc,t}throw Error("No such element")};$c.prototype.remove=function(){return Error("Unsupported operation")};$c.prototype[Te]=function(){return ie(this)};var L=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;r>>e&31;return e===5?u.s[i]=r:(l=l.s[i],l!=null?(e-=5,n=t.u?t.u(n,e,l,r):t.call(null,n,e,l,r)):n=L5(null,e-5,r),u.s[i]=n),u},oen=function t(n,e,l,r,u){var i=F2(l);if(e===0)i.s[r&31]=u;else{var s=r>>>e&31;e-=5,l=l.s[s],n=t.F?t.F(n,e,l,r,u):t.call(null,n,e,l,r,u),i.s[s]=n}return i},aen=function t(n,e,l){var r=n.A-2>>>e&31;if(5=this.A)return new un(this.$a,0,null);n:for(var t=this.root,n=this.shift;;)if(0this.A-qc(this)){t=this.$a.length;for(var e=Array(t+1),l=0;l>>5>1<n?null:(t=this.start+n,tn||this.end<=this.start+n?kU(n,this.end-this.start):nt(this.Ua,this.start+n)};p.Qa=function(t,n,e){return 0>n||this.end<=this.start+n?e:nt(this.Ua,this.start+n,e)};p.wb=function(t,n,e){if(t=this.start+n,0>n||this.end+1<=t)throw Error(["Index ",M.h(n)," out of bounds [0,",M.h(this.X(null)),"]"].join(""));n=this.B,e=fn.i(this.Ua,t,e);var l=this.start,r=this.end;return t+=1,t=r>t?r:t,Si.F?Si.F(n,e,l,t,null):Si.call(null,n,e,l,t,null)};p.Wa=function(){return this.Ua!=null&&On===this.Ua.kd?SU(this.Ua,this.start,this.end):new Qp(this)};p.P=function(){return this.B};p.X=function(){return this.end-this.start};p.Tb=function(){return this.start===this.end?null:nt(this.Ua,this.end-1)};p.Ub=function(){if(this.start===this.end)throw Error("Can't pop empty vector");var t=this.B,n=this.Ua,e=this.start,l=this.end-1;return Si.F?Si.F(t,n,e,l,null):Si.call(null,t,n,e,l,null)};p.Sb=function(){return this.start!==this.end?new Uo(this,this.end-this.start-1,null):null};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return Re(Yn,this.B)};p.wa=function(t,n){return this.Ua!=null&&On===this.Ua.kd?NP(this.Ua,n,this.start,this.end):Lp(this,n)};p.xa=function(t,n,e){return this.Ua!=null&&On===this.Ua.kd?qP(this.Ua,n,e,this.start,this.end):P5(this,n,e)};p.Oa=function(t,n,e){if(typeof n=="number")return this.wb(null,n,e);throw Error("Subvec's key for assoc must be a number.")};p.fb=function(t,n){return iu(n)?0<=n&&n>>e&31;if(e===5)n=r;else{var i=l.s[u];i!=null?(e-=5,n=t.u?t.u(n,e,i,r):t.call(null,n,e,i,r)):n=L5(n.root.$,e-5,r)}return l.s[u]=n,l},cen=function t(n,e,l){l=Q1(n.root.$,l);var r=n.A-2>>>e&31;if(5this.A-qc(this))this.$a[this.A&31]=n;else{t=new vo(this.root.$,this.$a);var e=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];e[0]=n,this.$a=e,this.A>>>5>1<=qc(this))t=this.$a;else for(var n=this.root,e=n,l=this.shift;;)if(0>>l&31]),l-=5;else{t=e.s;break n}}n=cen(this,this.shift,this.root),n=n??new vo(this.root.$,[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]),5=t)return new P(this.B,this.A-1,e,null);X.g(n,this.s[l])||(e[r]=this.s[l],e[r+1]=this.s[l+1],r+=2),l+=2}}else return this};p.Oa=function(t,n,e){if(t=Lc(this.s,n),t===-1){if(this.An?4:2*(n+1));return ei(this.s,0,e,0,2*n),new xi(t,this.ba,e)};p.Tc=function(t,n,e,l,r){var u=1<<(e>>>n&31);if(!(this.ba&u))return this;var i=$a(this.ba&u-1),s=this.s[2*i],a=this.s[2*i+1];return s==null?(n=a.Tc(t,n+5,e,l,r),n===a?this:n!=null?tc(this,t,2*i+1,n):this.ba===u?null:hN(this,t,u,i)):Ri(l,s)?(r.val=!0,hN(this,t,u,i)):this};p.Rc=function(){return G1?G1(this.s):ow.call(null,this.s)};p.rc=function(t,n){return PU(this.s,t,n)};p.jc=function(t,n,e,l){var r=1<<(n>>>t&31);if(!(this.ba&r))return l;var u=$a(this.ba&r-1);return r=this.s[2*u],u=this.s[2*u+1],r==null?u.jc(t+5,n,e,l):Ri(e,r)?u:l};p.yb=function(t,n,e,l,r,u){var i=1<<(e>>>n&31),s=$a(this.ba&i-1);if(!(this.ba&i)){var a=$a(this.ba);if(2*a>>n&31]=Ao.yb(t,n+5,e,l,r,u),r=l=0;32>l;)this.ba>>>l&1&&(s[l]=this.s[r]!=null?Ao.yb(t,n+5,_l(this.s[r]),this.s[r],this.s[r+1],u):this.s[r+1],r+=2),l+=1;return new ec(t,a+1,s)}return n=Array(2*(a+4)),ei(this.s,0,n,0,2*s),n[2*s]=l,n[2*s+1]=r,ei(this.s,2*s,n,2*(s+1),2*(a-s)),u.val=!0,t=this.Xb(t),t.s=n,t.ba|=i,t}return a=this.s[2*s],i=this.s[2*s+1],a==null?(a=i.yb(t,n+5,e,l,r,u),a===i?this:tc(this,t,2*s+1,a)):Ri(l,a)?r===i?this:tc(this,t,2*s+1,r):(u.val=!0,u=n+5,l=Yk?Yk(t,u,a,i,e,l,r):_U.call(null,t,u,a,i,e,l,r),r=2*s,s=2*s+1,t=this.Xb(t),t.s[r]=null,t.s[s]=l,t)};p.xb=function(t,n,e,l,r){var u=1<<(n>>>t&31),i=$a(this.ba&u-1);if(!(this.ba&u)){var s=$a(this.ba);if(16<=s){for(i=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],i[n>>>t&31]=Ao.xb(t+5,n,e,l,r),l=e=0;32>e;)this.ba>>>e&1&&(i[e]=this.s[l]!=null?Ao.xb(t+5,_l(this.s[l]),this.s[l],this.s[l+1],r):this.s[l+1],l+=2),e+=1;return new ec(null,s+1,i)}return t=Array(2*(s+1)),ei(this.s,0,t,0,2*i),t[2*i]=e,t[2*i+1]=l,ei(this.s,2*i,t,2*(i+1),2*(s-i)),r.val=!0,new xi(null,this.ba|u,t)}var a=this.s[2*i];return u=this.s[2*i+1],a==null?(s=u.xb(t+5,n,e,l,r),s===u?this:new xi(null,this.ba,nc(this.s,2*i+1,s))):Ri(e,a)?l===u?this:new xi(null,this.ba,nc(this.s,2*i+1,l)):(r.val=!0,r=this.ba,s=this.s,t+=5,t=Uk?Uk(t,a,u,n,e,l):_U.call(null,t,a,u,n,e,l),e=2*i,i=2*i+1,l=Ae(s),l[e]=null,l[i]=t,new xi(null,r,l))};p.Qc=function(t,n,e,l){var r=1<<(n>>>t&31);if(!(this.ba&r))return l;var u=$a(this.ba&r-1);return r=this.s[2*u],u=this.s[2*u+1],r==null?u.Qc(t+5,n,e,l):Ri(e,r)?new Ln(r,u):l};p.Sc=function(t,n,e){var l=1<<(n>>>t&31);if(!(this.ba&l))return this;var r=$a(this.ba&l-1),u=this.s[2*r],i=this.s[2*r+1];return u==null?(t=i.Sc(t+5,n,e),t===i?this:t!=null?new xi(null,this.ba,nc(this.s,2*r+1,t)):this.ba===l?null:new xi(null,this.ba^l,zk(this.s,r))):Ri(e,u)?this.ba===l?null:new xi(null,this.ba^l,zk(this.s,r)):this};p.Wa=function(){return new rd(this.s)};var Ao=new xi(null,0,[]);z5.prototype.ea=function(){for(var t=this.s.length;;){if(this.Cb!=null&&this.Cb.ea())return!0;if(this.D>>n&31,i=this.s[u];return i==null?this:(n=i.Tc(t,n+5,e,l,r),n===i?this:n==null?8>=this.A?IU(this,t,u):(t=tc(this,t,u,n),--t.A,t):tc(this,t,u,n))};p.Rc=function(){return Qk?Qk(this.s):VP.call(null,this.s)};p.rc=function(t,n){for(var e=this.s.length,l=0;;)if(l>>t&31];return r!=null?r.jc(t+5,n,e,l):l};p.yb=function(t,n,e,l,r,u){var i=e>>>n&31,s=this.s[i];return s==null?(t=tc(this,t,i,Ao.yb(t,n+5,e,l,r,u)),t.A+=1,t):(n=s.yb(t,n+5,e,l,r,u),n===s?this:tc(this,t,i,n))};p.xb=function(t,n,e,l,r){var u=n>>>t&31,i=this.s[u];return i==null?new ec(null,this.A+1,nc(this.s,u,Ao.xb(t+5,n,e,l,r))):(t=i.xb(t+5,n,e,l,r),t===i?this:new ec(null,this.A,nc(this.s,u,t)))};p.Qc=function(t,n,e,l){var r=this.s[n>>>t&31];return r!=null?r.Qc(t+5,n,e,l):l};p.Sc=function(t,n,e){var l=n>>>t&31,r=this.s[l];return r!=null?(t=r.Sc(t+5,n,e),t===r?this:t==null?8>=this.A?IU(this,null,l):new ec(null,this.A-1,nc(this.s,l,t)):new ec(null,this.A,nc(this.s,l,t))):this};p.Wa=function(){return new z5(this.s)};p=lc.prototype;p.Xb=function(t){if(t===this.$)return this;var n=Array(2*(this.A+1));return ei(this.s,0,n,0,2*this.A),new lc(t,this.Wb,this.A,n)};p.Tc=function(t,n,e,l,r){return n=ud(this.s,this.A,l),n===-1?this:(r.val=!0,this.A===1?null:(t=this.Xb(t),r=t.s,r[n]=r[2*this.A-2],r[n+1]=r[2*this.A-1],r[2*this.A-1]=null,r[2*this.A-2]=null,--t.A,t))};p.Rc=function(){return G1?G1(this.s):ow.call(null,this.s)};p.rc=function(t,n){return PU(this.s,t,n)};p.jc=function(t,n,e,l){return t=ud(this.s,this.A,e),0>t?l:Ri(e,this.s[t])?this.s[t+1]:l};p.yb=function(t,n,e,l,r,u){return e===this.Wb?(n=ud(this.s,this.A,l),n===-1?this.s.length>2*this.A?(n=2*this.A,e=2*this.A+1,t=this.Xb(t),t.s[n]=l,t.s[e]=r,u.val=!0,t.A+=1,t):(e=this.s.length,n=Array(e+2),ei(this.s,0,n,0,e),n[e]=l,n[e+1]=r,u.val=!0,l=this.A+1,t===this.$?(this.s=n,this.A=l,t=this):t=new lc(this.$,this.Wb,l,n),t):this.s[n+1]===r?this:tc(this,t,n+1,r)):new xi(t,1<<(this.Wb>>>n&31),[null,this,null,null]).yb(t,n,e,l,r,u)};p.xb=function(t,n,e,l,r){return n===this.Wb?(t=ud(this.s,this.A,e),t===-1?(t=2*this.A,n=Array(t+2),ei(this.s,0,n,0,t),n[t]=e,n[t+1]=l,r.val=!0,new lc(null,this.Wb,this.A+1,n)):X.g(this.s[t+1],l)?this:new lc(null,this.Wb,this.A,nc(this.s,t+1,l))):new xi(null,1<<(this.Wb>>>t&31),[null,this]).xb(t,n,e,l,r)};p.Qc=function(t,n,e,l){return t=ud(this.s,this.A,e),0>t?l:Ri(e,this.s[t])?new Ln(this.s[t],this.s[t+1]):l};p.Sc=function(t,n,e){return t=ud(this.s,this.A,e),t===-1?this:this.A===1?null:new lc(null,this.Wb,this.A-1,zk(this.s,ri(t,2)))};p.Wa=function(){return new rd(this.s)};p=Ca.prototype;p.toString=function(){return Le(this)};p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.P=function(){return this.B};p.va=function(){if(this.R==null){var t=this.Db,n=this.D+2;return so?so(t,n,null):ow.call(null,t,n,null)}t=this.Db,n=this.D;var e=A(this.R);return so?so(t,n,e):ow.call(null,t,n,e)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return _u(n,this)};p.xa=function(t,n,e){return li(n,e,this)};p.ua=function(){return this.R==null?new Ln(this.Db[this.D],this.Db[this.D+1]):j(this.R)};p.ya=function(){var t=this,n=t.R==null?function(){var e=t.Db,l=t.D+2;return so?so(e,l,null):ow.call(null,e,l,null)}():function(){var e=t.Db,l=t.D,r=A(t.R);return so?so(e,l,r):ow.call(null,e,l,r)}();return n??At};p.S=function(){return this};p.W=function(t,n){return n===this.B?this:new Ca(n,this.Db,this.D,this.R,this.C)};p.Y=function(t,n){return Dn(n,this)};Ca.prototype[Te]=function(){return ie(this)};p=Nf.prototype;p.toString=function(){return Le(this)};p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.P=function(){return this.B};p.va=function(){var t=this.Db,n=this.D,e=A(this.R);return aw?aw(t,n,e):VP.call(null,t,n,e)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return _u(n,this)};p.xa=function(t,n,e){return li(n,e,this)};p.ua=function(){return j(this.R)};p.ya=function(){var t=this.Db,n=this.D,e=A(this.R);return t=aw?aw(t,n,e):VP.call(null,t,n,e),t??At};p.S=function(){return this};p.W=function(t,n){return n===this.B?this:new Nf(n,this.Db,this.D,this.R,this.C)};p.Y=function(t,n){return Dn(n,this)};Nf.prototype[Te]=function(){return ie(this)};U5.prototype.ea=function(){return!this.Ed||this.ie.ea()};U5.prototype.next=function(){return this.Ed?this.ie.next():(this.Ed=!0,new Ln(null,this.Ya))};U5.prototype.remove=function(){return Error("Unsupported operation")};p=Ps.prototype;p.hc=On;p.Qb=function(t,n){return n==null?this.Xa?new Ln(null,this.Ya):null:this.root==null?null:this.root.Qc(0,_l(n),n,null)};p.toString=function(){return Le(this)};p.keys=function(){return ie(xe.h?xe.h(this):xe.call(null,this))};p.entries=function(){return new V5(E(E(this)))};p.values=function(){return ie(ir.h?ir.h(this):ir.call(null,this))};p.has=function(t){return Gn(this,t)};p.get=function(t,n){return this.N(null,t,n)};p.forEach=function(t){for(var n=E(this),e=null,l=0,r=0;;)if(rthis.A?an(A(this))+1:this.A};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return _u(n,this)};p.xa=function(t,n,e){return li(n,e,this)};p.ua=function(){return B2(this.stack)};p.ya=function(){var t=j(this.stack);return t=zP(this.lc?t.right:t.left,A(this.stack),this.lc),t!=null?new jo(null,t,this.lc,this.A-1,null):At};p.S=function(){return this};p.W=function(t,n){return n===this.B?this:new jo(n,this.stack,this.lc,this.A,this.C)};p.Y=function(t,n){return Dn(n,this)};jo.prototype[Te]=function(){return ie(this)};var jI=function t(n,e,l){var r=n.left!=null?function(){var s=n.left;return t.i?t.i(s,e,l):t.call(null,s,e,l)}():l;if(ue(r))return r;var u=function(){var s=n.key,a=n.val;return e.i?e.i(r,s,a):e.call(null,r,s,a)}();if(ue(u))return u;if(n.right!=null){var i=n.right;return t.i?t.i(i,e,u):t.call(null,i,e,u)}return u};p=te.prototype;p.hc=On;p.Qb=function(t,n){switch(n){case 0:return new Ln(0,this.key);case 1:return new Ln(1,this.val);default:return null}};p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.Hd=function(t){return t.Kd(this)};p.Xc=function(){return new _t(this.key,this.val,this.left,this.right)};p.Ob=function(){return this};p.Gd=function(t){return t.Jd(this)};p.replace=function(t,n,e,l){return new te(t,n,e,l)};p.Jd=function(t){return new te(t.key,t.val,this,t.right)};p.Kd=function(t){return new te(t.key,t.val,t.left,this)};p.rc=function(t,n){return jI(this,t,n)};p.ta=function(t,n){return this.Qa(null,n,null)};p.N=function(t,n,e){return this.Qa(null,n,e)};p.V=function(t,n){if(n===0)return this.key;if(n===1)return this.val;throw Error("Index out of bounds")};p.Qa=function(t,n,e){return n===0?this.key:n===1?this.val:e};p.wb=function(t,n,e){return new v(null,2,5,y,[this.key,this.val],null).wb(null,n,e)};p.P=function(){return null};p.X=function(){return 2};p.nd=function(){return this.key};p.od=function(){return this.val};p.Tb=function(){return this.val};p.Ub=function(){return new v(null,1,5,y,[this.key],null)};p.Sb=function(){return new un([this.val,this.key],0,null)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return null};p.wa=function(t,n){return Lp(this,n)};p.xa=function(t,n,e){return P5(this,n,e)};p.Oa=function(t,n,e){return fn.i(new v(null,2,5,y,[this.key,this.val],null),n,e)};p.fb=function(t,n){return n===0||n===1};p.S=function(){return new un([this.key,this.val],0,null)};p.W=function(t,n){return Re(new v(null,2,5,y,[this.key,this.val],null),n)};p.Y=function(t,n){return new v(null,3,5,y,[this.key,this.val,n],null)};p.call=function(t){switch(arguments.length-1){case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.h=function(t){return this.V(null,t)};p.g=function(t,n){return this.Qa(null,t,n)};te.prototype[Te]=function(){return ie(this)};p=_t.prototype;p.hc=On;p.Qb=function(t,n){switch(n){case 0:return new Ln(0,this.key);case 1:return new Ln(1,this.val);default:return null}};p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.Hd=function(t){return new _t(this.key,this.val,this.left,t)};p.Xc=function(){throw Error("red-black tree invariant violation")};p.Ob=function(){return new te(this.key,this.val,this.left,this.right)};p.Gd=function(t){return new _t(this.key,this.val,t,this.right)};p.replace=function(t,n,e,l){return new _t(t,n,e,l)};p.Jd=function(t){return this.left instanceof _t?new _t(this.key,this.val,this.left.Ob(),new te(t.key,t.val,this.right,t.right)):this.right instanceof _t?new _t(this.right.key,this.right.val,new te(this.key,this.val,this.left,this.right.left),new te(t.key,t.val,this.right.right,t.right)):new te(t.key,t.val,this,t.right)};p.Kd=function(t){return this.right instanceof _t?new _t(this.key,this.val,new te(t.key,t.val,t.left,this.left),this.right.Ob()):this.left instanceof _t?new _t(this.left.key,this.left.val,new te(t.key,t.val,t.left,this.left.left),new te(this.key,this.val,this.left.right,this.right)):new te(t.key,t.val,t.left,this)};p.rc=function(t,n){return jI(this,t,n)};p.ta=function(t,n){return this.Qa(null,n,null)};p.N=function(t,n,e){return this.Qa(null,n,e)};p.V=function(t,n){if(n===0)return this.key;if(n===1)return this.val;throw Error("Index out of bounds")};p.Qa=function(t,n,e){return n===0?this.key:n===1?this.val:e};p.wb=function(t,n,e){return new v(null,2,5,y,[this.key,this.val],null).wb(null,n,e)};p.P=function(){return null};p.X=function(){return 2};p.nd=function(){return this.key};p.od=function(){return this.val};p.Tb=function(){return this.val};p.Ub=function(){return new v(null,1,5,y,[this.key],null)};p.Sb=function(){return new un([this.val,this.key],0,null)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return null};p.wa=function(t,n){return Lp(this,n)};p.xa=function(t,n,e){return P5(this,n,e)};p.Oa=function(t,n,e){return fn.i(new v(null,2,5,y,[this.key,this.val],null),n,e)};p.fb=function(t,n){return n===0||n===1};p.S=function(){return new un([this.key,this.val],0,null)};p.W=function(t,n){return Re(new v(null,2,5,y,[this.key,this.val],null),n)};p.Y=function(t,n){return new v(null,3,5,y,[this.key,this.val,n],null)};p.call=function(t){switch(arguments.length-1){case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.h=function(t){return this.V(null,t)};p.g=function(t,n){return this.Qa(null,t,n)};_t.prototype[Te]=function(){return ie(this)};var fen=function t(n,e,l,r,u){if(e==null)return new _t(l,r,null,null);var i=function(){var s=e.key;return n.g?n.g(l,s):n.call(null,l,s)}();return i===0?(u[0]=e,null):0>i?(i=function(){var s=e.left;return t.F?t.F(n,s,l,r,u):t.call(null,n,s,l,r,u)}(),i!=null?e.Gd(i):null):(i=function(){var s=e.right;return t.F?t.F(n,s,l,r,u):t.call(null,n,s,l,r,u)}(),i!=null?e.Hd(i):null)},gen=function t(n,e){if(n==null)return e;if(e==null)return n;if(n instanceof _t){if(e instanceof _t){var l=function(){var r=n.right,u=e.left;return t.g?t.g(r,u):t.call(null,r,u)}();return l instanceof _t?new _t(l.key,l.val,new _t(n.key,n.val,n.left,l.left),new _t(e.key,e.val,l.right,e.right)):new _t(n.key,n.val,n.left,new _t(e.key,e.val,l,e.right))}return new _t(n.key,n.val,n.left,function(){var r=n.right;return t.g?t.g(r,e):t.call(null,r,e)}())}return e instanceof _t?new _t(e.key,e.val,function(){var r=e.left;return t.g?t.g(n,r):t.call(null,n,r)}(),e.right):(l=function(){var r=n.right,u=e.left;return t.g?t.g(r,u):t.call(null,r,u)}(),l instanceof _t?new _t(l.key,l.val,new te(n.key,n.val,n.left,l.left),new te(e.key,e.val,l.right,e.right)):DU(n.key,n.val,n.left,new te(e.key,e.val,l,e.right)))},men=function t(n,e,l,r){if(e!=null){var u=function(){var i=e.key;return n.g?n.g(l,i):n.call(null,l,i)}();return u===0?(r[0]=e,gen(e.left,e.right)):0>u?(u=function(){var i=e.left;return t.u?t.u(n,i,l,r):t.call(null,n,i,l,r)}(),u!=null||r[0]!=null?e.left instanceof te?DU(e.key,e.val,u,e.right):new _t(e.key,e.val,u,e.right):null):(u=function(){var i=e.right;return t.u?t.u(n,i,l,r):t.call(null,n,i,l,r)}(),u!=null||r[0]!=null?e.right instanceof te?Rb(e.key,e.val,e.left,u):new _t(e.key,e.val,e.left,u):null)}return null},wen=function t(n,e,l,r){var u=e.key,i=n.g?n.g(l,u):n.call(null,l,u);return i===0?e.replace(u,r,e.left,e.right):0>i?e.replace(u,e.val,function(){var s=e.left;return t.u?t.u(n,s,l,r):t.call(null,n,s,l,r)}(),e.right):e.replace(u,e.val,e.left,function(){var s=e.right;return t.u?t.u(n,s,l,r):t.call(null,n,s,l,r)}())};p=is.prototype;p.hc=On;p.Qb=function(t,n){return Y5(this,n)};p.forEach=function(t){for(var n=E(this),e=null,l=0,r=0;;)if(rr?(t=In.g(t,l),l=l.left):l=l.right:0(t.h?t.h(e):t.call(null,e))?n:e};Ea.j=function(t,n,e,l){return En.i(function(r,u){return Ea.i(t,r,u)},Ea.i(t,n,e),l)};Ea.o=function(t){var n=j(t),e=A(t);t=j(e);var l=A(e);return e=j(l),l=A(l),this.j(n,t,e,l)};Ea.l=3;var zh=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:for(var e=[],l=arguments.length,r=0;r=this.count)throw Error("-drop-first of empty chunk");return new H2(this.start+this.step,this.step,this.count-1)};G5.prototype.ea=function(){return 0this.end};G5.prototype.next=function(){var t=this.D;return this.D+=this.step,t};p=xo.prototype;p.toString=function(){return Le(this)};p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.Pc=function(){if(this.Va==null){var t=this.X(null);32this.end&&this.step===0)return this.start;throw Error("Index out of bounds")};p.Qa=function(t,n,e){return 0<=n&&nthis.end&&this.step===0?this.start:e};p.Wa=function(){return new G5(this.start,this.end,this.step)};p.P=function(){return this.B};p.va=function(){return 0this.end?new xo(null,this.start+this.step,this.end,this.step,null,null,null):null};p.X=function(){return Math.ceil((this.end-this.start)/this.step)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return Lp(this,n)};p.xa=function(t,n,e){for(t=this.start;;)if(0this.end){if(e=n.g?n.g(e,t):n.call(null,e,t),ue(e))return J(e);t+=this.step}else return e};p.ua=function(){return this.start};p.ya=function(){var t=this.va(null);return t??At};p.S=function(){return this};p.Lc=function(){return this.Pc(),this.Va};p.ec=function(){return this.Pc(),this.Pb==null?At:this.Pb};p.W=function(t,n){return n===this.B?this:new xo(n,this.start,this.end,this.step,this.Va,this.Pb,this.C)};p.Y=function(t,n){return Dn(n,this)};p.Kc=function(){return E(this.ec(null))};xo.prototype[Te]=function(){return ie(this)};p=ko.prototype;p.toString=function(){return Le(this)};p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.Pc=function(){if(this.Va==null){var t=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];n:for(var n=0,e=this.start;;)if(32>n){if(t[n]=e,n+=1,e+=this.step,!(0this.end)){n=this.Va=new $f(t,0,n);break n}}else{n=e;break n}this.Va==null&&(this.Va=new $f(t,0,32),(0this.end)&&(this.Pb=new ko(null,n,this.end,this.step,null,null,null)))}};p.Wa=function(){return new G5(this.start,this.end,this.step)};p.P=function(){return this.B};p.va=function(){return 0this.end?new ko(null,this.start+this.step,this.end,this.step,null,null,null):null};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return _u(n,this)};p.xa=function(t,n,e){for(t=this.start;;)if(0this.end){if(e=n.g?n.g(e,t):n.call(null,e,t),ue(e))return J(e);t+=this.step}else return e};p.ua=function(){return this.start};p.ya=function(){var t=this.va(null);return t??At};p.S=function(){return this};p.Lc=function(){return this.Pc(),this.Va};p.ec=function(){return this.Pc(),this.Pb==null?At:this.Pb};p.W=function(t,n){return n===this.B?this:new ko(n,this.start,this.end,this.step,this.Va,this.Pb,this.C)};p.Y=function(t,n){return Dn(n,this)};p.Kc=function(){return E(this.ec(null))};ko.prototype[Te]=function(){return ie(this)};var Nu=function t(n){switch(arguments.length){case 0:return t.m();case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Nu.m=function(){return Nu.i(0,Number.MAX_VALUE,1)};Nu.h=function(t){return Nu.i(0,t,1)};Nu.g=function(t,n){return Nu.i(t,n,1)};Nu.i=function(t,n,e){return 0e?n>=t?At:iu(t)&&iu(n)&&iu(e)?new xo(null,t,n,e,null,null,null):new ko(null,t,n,e,null,null,null):n===t?At:ge.h(t)};Nu.l=3;var nu=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};nu.h=function(t){return function(n){var e=Ye(-1);return function(){function l(s,a){var o=e.Ib(null,e.gb(null)+1);return Ji(o,t)===0?n.g?n.g(s,a):n.call(null,s,a):s}function r(s){return n.h?n.h(s):n.call(null,s)}function u(){return n.m?n.m():n.call(null)}var i=null;return i=function(s,a){switch(arguments.length){case 0:return u.call(this);case 1:return r.call(this,s);case 2:return l.call(this,s,a)}throw Error("Invalid arity: "+arguments.length)},i.m=u,i.h=r,i.g=l,i}()}};nu.g=function(t,n){return new Mt(null,function(){var e=E(n);return e?Dn(j(e),nu.g(t,il.g(t,e))):null},null,null)};nu.l=2;var np=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};np.h=function(t){return function(n){var e=new id,l=Ye(V8);return function(){function r(a,o){var h=J(l),c=t.h?t.h(o):t.call(null,o);return Il(l,c),on(h,V8)||X.g(c,h)?(e.add(o),a):(h=_n(e.s),e.clear(),a=n.g?n.g(a,h):n.call(null,a,h),ue(a)||e.add(o),a)}function u(a){if(!x(e.Fc())){var o=_n(e.s);e.clear(),a=qp(n.g?n.g(a,o):n.call(null,a,o))}return n.h?n.h(a):n.call(null,a)}function i(){return n.m?n.m():n.call(null)}var s=null;return s=function(a,o){switch(arguments.length){case 0:return i.call(this);case 1:return u.call(this,a);case 2:return r.call(this,a,o)}throw Error("Invalid arity: "+arguments.length)},s.m=i,s.h=u,s.g=r,s}()}};np.g=function(t,n){return new Mt(null,function(){var e=E(n);if(e){var l=j(e),r=t.h?t.h(l):t.call(null,l),u=Dn(l,$u.g(function(i){return X.g(r,t.h?t.h(i):t.call(null,i))},A(e)));return Dn(u,np.g(t,new Mt(null,function(){return il.g(an(u),e)},null,null)))}return null},null,null)};np.l=2;var yf=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};yf.g=function(t,n){return new Mt(null,function(){var e=E(n);return e?yf.i(t,j(e),rn(e)):new g(null,t.m?t.m():t.call(null),null,1,null)},null,null)};yf.i=function(t,n,e){return ue(n)?new g(null,J(n),null,1,null):Dn(n,new Mt(null,function(){var l=E(e);if(l){var r=yf.i,u=j(l);u=t.g?t.g(n,u):t.call(null,n,u),l=r.call(yf,t,u,rn(l))}else l=null;return l},null,null))};yf.l=3;var Xa=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:for(var e=[],l=arguments.length,r=0;ri?1:i),i<=e.length?(i=vt.g(e,i),t.g?t.g(n,i):t.call(null,n,i)):null},null,null))},ven={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},Us=function t(n){for(var e=[],l=arguments.length,r=0;r ",M.h(d)," and ",M.h(j(c)),", and neither is preferred"].join(""));return c}return c},null,J(r)),h=function(){var c;return(c=o==null)&&(c=J(r),c=c.h?c.h(a):c.call(null,a)),x(c)?new v(null,2,5,y,[a,c],null):o}();return x(h)?X.g(J(s),J(l))?(ut.u(i,fn,e,Rt(h)),Rt(h)):(n0(i,r,s,l),t.da?t.da(n,e,l,r,u,i,s,a):t.call(null,n,e,l,r,u,i,s,a)):null};p=qi.prototype;p.call=function(t){switch(arguments.length-1){case 0:return this.m();case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);case 3:return this.i(arguments[1],arguments[2],arguments[3]);case 4:return this.u(arguments[1],arguments[2],arguments[3],arguments[4]);case 5:return this.F(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);case 6:return this.O(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);case 7:return this.pa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7]);case 8:return this.da(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8]);case 9:return this.qa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9]);case 10:return this.fa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10]);case 11:return this.ga(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11]);case 12:return this.ha(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12]);case 13:return this.ia(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13]);case 14:return this.ja(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14]);case 15:return this.ka(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15]);case 16:return this.la(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16]);case 17:return this.ma(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17]);case 18:return this.na(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18]);case 19:return this.oa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19]);case 20:return this.Pa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19],arguments[20]);case 21:return this.Rb(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19],arguments[20],arguments[21]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.m=function(){var t=this.I.m?this.I.m():this.I.call(null),n=this.Ra(null,t);return x(n)||Vl(this.name,t),n.m?n.m():n.call(null)};p.h=function(t){var n=this.I.h?this.I.h(t):this.I.call(null,t),e=this.Ra(null,n);return x(e)||Vl(this.name,n),e.h?e.h(t):e.call(null,t)};p.g=function(t,n){var e=this.I.g?this.I.g(t,n):this.I.call(null,t,n),l=this.Ra(null,e);return x(l)||Vl(this.name,e),l.g?l.g(t,n):l.call(null,t,n)};p.i=function(t,n,e){var l=this.I.i?this.I.i(t,n,e):this.I.call(null,t,n,e),r=this.Ra(null,l);return x(r)||Vl(this.name,l),r.i?r.i(t,n,e):r.call(null,t,n,e)};p.u=function(t,n,e,l){var r=this.I.u?this.I.u(t,n,e,l):this.I.call(null,t,n,e,l),u=this.Ra(null,r);return x(u)||Vl(this.name,r),u.u?u.u(t,n,e,l):u.call(null,t,n,e,l)};p.F=function(t,n,e,l,r){var u=this.I.F?this.I.F(t,n,e,l,r):this.I.call(null,t,n,e,l,r),i=this.Ra(null,u);return x(i)||Vl(this.name,u),i.F?i.F(t,n,e,l,r):i.call(null,t,n,e,l,r)};p.O=function(t,n,e,l,r,u){var i=this.I.O?this.I.O(t,n,e,l,r,u):this.I.call(null,t,n,e,l,r,u),s=this.Ra(null,i);return x(s)||Vl(this.name,i),s.O?s.O(t,n,e,l,r,u):s.call(null,t,n,e,l,r,u)};p.pa=function(t,n,e,l,r,u,i){var s=this.I.pa?this.I.pa(t,n,e,l,r,u,i):this.I.call(null,t,n,e,l,r,u,i),a=this.Ra(null,s);return x(a)||Vl(this.name,s),a.pa?a.pa(t,n,e,l,r,u,i):a.call(null,t,n,e,l,r,u,i)};p.da=function(t,n,e,l,r,u,i,s){var a=this.I.da?this.I.da(t,n,e,l,r,u,i,s):this.I.call(null,t,n,e,l,r,u,i,s),o=this.Ra(null,a);return x(o)||Vl(this.name,a),o.da?o.da(t,n,e,l,r,u,i,s):o.call(null,t,n,e,l,r,u,i,s)};p.qa=function(t,n,e,l,r,u,i,s,a){var o=this.I.qa?this.I.qa(t,n,e,l,r,u,i,s,a):this.I.call(null,t,n,e,l,r,u,i,s,a),h=this.Ra(null,o);return x(h)||Vl(this.name,o),h.qa?h.qa(t,n,e,l,r,u,i,s,a):h.call(null,t,n,e,l,r,u,i,s,a)};p.fa=function(t,n,e,l,r,u,i,s,a,o){var h=this.I.fa?this.I.fa(t,n,e,l,r,u,i,s,a,o):this.I.call(null,t,n,e,l,r,u,i,s,a,o),c=this.Ra(null,h);return x(c)||Vl(this.name,h),c.fa?c.fa(t,n,e,l,r,u,i,s,a,o):c.call(null,t,n,e,l,r,u,i,s,a,o)};p.ga=function(t,n,e,l,r,u,i,s,a,o,h){var c=this.I.ga?this.I.ga(t,n,e,l,r,u,i,s,a,o,h):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h),f=this.Ra(null,c);return x(f)||Vl(this.name,c),f.ga?f.ga(t,n,e,l,r,u,i,s,a,o,h):f.call(null,t,n,e,l,r,u,i,s,a,o,h)};p.ha=function(t,n,e,l,r,u,i,s,a,o,h,c){var f=this.I.ha?this.I.ha(t,n,e,l,r,u,i,s,a,o,h,c):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c),d=this.Ra(null,f);return x(d)||Vl(this.name,f),d.ha?d.ha(t,n,e,l,r,u,i,s,a,o,h,c):d.call(null,t,n,e,l,r,u,i,s,a,o,h,c)};p.ia=function(t,n,e,l,r,u,i,s,a,o,h,c,f){var d=this.I.ia?this.I.ia(t,n,e,l,r,u,i,s,a,o,h,c,f):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f),C=this.Ra(null,d);return x(C)||Vl(this.name,d),C.ia?C.ia(t,n,e,l,r,u,i,s,a,o,h,c,f):C.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f)};p.ja=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d){var C=this.I.ja?this.I.ja(t,n,e,l,r,u,i,s,a,o,h,c,f,d):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d),I=this.Ra(null,C);return x(I)||Vl(this.name,C),I.ja?I.ja(t,n,e,l,r,u,i,s,a,o,h,c,f,d):I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d)};p.ka=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C){var I=this.I.ka?this.I.ka(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C),T=this.Ra(null,I);return x(T)||Vl(this.name,I),T.ka?T.ka(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C):T.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C)};p.la=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I){var T=this.I.la?this.I.la(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I),$=this.Ra(null,T);return x($)||Vl(this.name,T),$.la?$.la(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I):$.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I)};p.ma=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T){var $=this.I.ma?this.I.ma(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T),G=this.Ra(null,$);return x(G)||Vl(this.name,$),G.ma?G.ma(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T):G.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T)};p.na=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$){var G=this.I.na?this.I.na(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$),b=this.Ra(null,G);return x(b)||Vl(this.name,G),b.na?b.na(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$):b.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$)};p.oa=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G){var b=this.I.oa?this.I.oa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G),en=this.Ra(null,b);return x(en)||Vl(this.name,b),en.oa?en.oa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G):en.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G)};p.Pa=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b){var en=this.I.Pa?this.I.Pa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b),ln=this.Ra(null,en);return x(ln)||Vl(this.name,en),ln.Pa?ln.Pa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b):ln.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b)};p.Rb=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en){var ln=dn.j(this.I,t,n,e,l,z([r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en])),B=this.Ra(null,ln);return x(B)||Vl(this.name,ln),dn.j(B,t,n,e,l,z([r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en]))};p.Qd=function(t,n,e){if(x(iQ(e,n,this.Vc)))throw Error(["Preference conflict in multimethod '",M.h(this.name),"': ",M.h(e)," is already preferred to ",M.h(n)].join(""));return ut.g(this.Vc,function(l){return fn.i(l,n,In.g(cn.i(l,n,Ke),e))}),n0(this.sc,this.Zb,this.nc,this.Ec)};p.Sd=function(t,n){return ut.i(this.Zb,Ct,n),n0(this.sc,this.Zb,this.nc,this.Ec),this};p.Pd=function(){return J(this.Zb)};p.Rd=function(){return J(this.Vc)};p.Sa=function(t,n,e){return ut.u(this.Zb,fn,n,e),n0(this.sc,this.Zb,this.nc,this.Ec),this};p.Td=function(){return ut.g(this.Zb,function(){return vn}),ut.g(this.sc,function(){return vn}),ut.g(this.Vc,function(){return vn}),ut.g(this.nc,function(){return null}),this};p.Ra=function(t,n){return X.g(J(this.nc),J(this.Ec))||n0(this.sc,this.Zb,this.nc,this.Ec),t=J(this.sc),t=t.h?t.h(n):t.call(null,n),x(t)?t:jen(this.name,n,this.Ec,this.Zb,this.Vc,this.sc,this.nc,this.Ie)};p.xc=function(){return Mk(this.name)};p.yc=function(){return $k(this.name)};p.U=function(){return A5(this)};p=t0.prototype;p.Zd=On;p.toString=function(){return this.uc};p.T=function(t,n){return(t=n!=null?On===n.Zd:!1)?this.uc===n.uc:t};p.M=function(t,n){return Rn(n,['#uuid "',M.h(this.uc),'"'].join(""))};p.U=function(){return this.C==null&&(this.C=_l(this.uc)),this.C};p.Gb=function(t,n){if(n instanceof t0)return ns(this.uc,n.uc);throw Error(["Cannot compare ",M.h(this)," to ",M.h(n)].join(""))};Go.prototype.__proto__=Error.prototype;Go.prototype.Z=On;Go.prototype.M=function(t,n,e){return Rn(n,"#error {:message "),ot(this.message,n,e),x(this.data)&&(Rn(n,", :data "),ot(this.data,n,e)),x(this.cause)&&(Rn(n,", :cause "),ot(this.cause,n,e)),Rn(n,"}")};Go.prototype.toString=function(){return Le(this)};var Ur=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Ur.g=function(t,n){return Ur.i(t,n,null)};Ur.i=function(t,n,e){return new Go(t,n,e)};Ur.l=3;p=ly.prototype;p.toString=function(){return Le(this)};p.T=function(t,n){return n instanceof ly&&X.g(this.tag,n.tag)&&X.g(this.form,n.form)};p.U=function(){return 31*_l(this.tag)+_l(this.form)};p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"tag":return this.tag;case"form":return this.form;default:return e}};p.M=function(t,n,e){return Rn(n,["#",M.h(this.tag)," "].join("")),ot(this.form,n,e)};var xen="arguments abstract await boolean break byte case catch char class const continue debugger default delete do double else enum export extends final finally float for function goto if implements import in instanceof int interface let long native new package private protected public return short static super switch synchronized this throw throws transient try typeof var void volatile while with yield methods null constructor".split(" "),Fj=null;typeof console<"u"&&Bz();Bz();var sQ=new F(null,"nil","nil",99600501),ken=new S(null,"message","message",1234475525,null),g8=new S(null,"extend-protocol","extend-protocol",306378578,null),m8=new S(null,"assoc-in","assoc-in",-113585743,null),w8=new S(null,"ns-aliases","ns-aliases",-1364180948,null),d8=new S(null,"ident?","ident?",-2061359468,null),Jv=new F(null,"reader-exception","reader-exception",-1938323098),p8=new S(null,"*1","*1",2110258092,null),v8=new S(null,"*2","*2",1728229926,null),xl=new F(null,"trailing-white-space","trailing-white-space",1496006996),y8=new S(null,"*3","*3",105062009,null),ZN=new S(null,"kvs","kvs",-1695980277,null),j8=new S(null,"filterv","filterv",1977739179,null),bN=new S(null,"from","from",-839142725,null),Ff=new F(null,"relative-to","relative-to",-470100051),oQ=new S(null,"*reader-resolver*","*reader-resolver*",309718590,null),Ha=new F(null,"intra-block-nl","intra-block-nl",1808826875),x8=new F(null,"exponentchar","exponentchar",1986664222),fl=new F(null,"row","row",-570139521),k8=new S(null,"*e","*e",329170866,null),lp=new F(null,"load-fn","load-fn",-2121144334),S8=new S(null,"hash-map","hash-map",-439030950,null),O8=new S(null,"vary-meta","vary-meta",-1580067831,null),Sen=new S(null,"pad","pad",1603796986,null),aQ=new F(null,"dotted-access","dotted-access",114961112),nq=new S(null,"apropos","apropos",-1511857537,null),Oen=new S(null,"Error","Error",-1692662047,null),C8=new S(null,"ns-refers","ns-refers",-2030918515,null),tq=new F(null,"reify-fn","reify-fn",-1360983316),Cen=new S("cljs.core","ex-cause","cljs.core/ex-cause",1843478517,null),eq=new S(null,"start-key","start-key",790225477,null),A8=new S(null,"not-any?","not-any?",-2114707554,null),E8=new S(null,"apply","apply",-1334050276,null),ov=new S(null,"default__25377__auto__","default__25377__auto__",-1831844738,null),ky=new S(null,"when-let","when-let",-1383043480,null),dd=new S(null,"cljs.core","cljs.core",770546058,null),Bg=new S(null,"start","start",1285322546,null),Ew=new F(null,"miser","miser",-556060186),R8=new S(null,"->>","->>",-1874332161,null),P8=new S(null,"ifn?","ifn?",-2106461064,null),I8=new S(null,"->Eduction","->Eduction",-188511967,null),lq=new S(null,"farg__25378__auto__","farg__25378__auto__",-541063853,null),hQ=new F(null,"fn-name","fn-name",-766594004),_8=new S(null,"merge","merge",-163787882,null),Ra=new F(null,"current","current",-1088038603),T8=new S(null,"qualified-symbol?","qualified-symbol?",98763807,null),cQ=new S(null,"ns-obj","ns-obj",-635821906,null),Aen=new S(null,"xform*","xform*",264470622,null),D8=new S(null,"letfn","letfn",-480490827,null),rp=new F(null,"js-libs","js-libs",-502933721),fQ=new S(null,"psym","psym",752521989,null),Sy=new S(null,"->","->",-2139605430,null),Een=new S(null,"Inf","Inf",647172781,null),Oy=new F(null,"all","all",892129742),ss=new F(null,"class","class",-2030961996),M8=new S(null,"nil?","nil?",1612038930,null),$8=new S(null,"uri?","uri?",2029475116,null),N8=new S(null,"cat","cat",182721320,null),up=new S(null,"..","..",-300507420,null),Ren=new S(null,"children","children",699969545,null),Pen=new S(null,"read-char*","read-char*",1494526523,null),Gt=new F(null,"default","default",-1987822328),q8=new S(null,"object-array","object-array",206434647,null),L8=new S(null,"nnext","nnext",-2065435598,null),gQ=new S("cljs.core","chunk-first","cljs.core/chunk-first",-1157877305,null),Ien=new F(null,"ex-kind","ex-kind",1581199296),W8=new S(null,"sorted-map-by","sorted-map-by",218894812,null),Mm=new F("edamame","opened-delimiter","edamame/opened-delimiter",-1906008305),V8=new F("cljs.core","none","cljs.core/none",926646439),_en=new S("cljs.reader","read-date","cljs.reader/read-date",1663417238,null),Cy=new S(null,"params*","params*",336153603,null),mQ=new S(null,"sci.impl.records","sci.impl.records",-393424368,null),z8=new S(null,"unreduced","unreduced",780976083,null),U8=new S(null,"add-watch","add-watch",1389887634,null),wQ=new S(null,"-new-dynamic-var","-new-dynamic-var",-1029088918,null),Y8=new S(null,"pop-thread-bindings","pop-thread-bindings",-1312224790,null),rq=new S(null,"end-key","end-key",-1592097336,null),Ten=new S("cljs.analyzer.api","resolve","cljs.analyzer.api/resolve",498213843,null),Q8=new S(null,"unchecked-byte","unchecked-byte",1091664664,null),jf=new S(null,"opts","opts",1795607228,null),G8=new S(null,"remove-all-methods","remove-all-methods",-728267092,null),Den=new S(null,"initch","initch",946908919,null),Men=new S("clojure.repl","source-fn","clojure.repl/source-fn",1877923323,null),J8=new S(null,"uuid?","uuid?",400077689,null),K8=new F(null,"reload","reload",863702807),av=new S("cljs.core","atom","cljs.core/atom",1943839529,null),hv=new S(null,"quoted-ns","quoted-ns",-2054280928,null),B8=new S(null,"first","first",996428481,null),$en=new S("cljs.tools.reader.impl.commons","parse-symbol","cljs.tools.reader.impl.commons/parse-symbol",-903976395,null),De=new F(null,"end-pos","end-pos",-1643883926),X8=new F(null,"opts","opts",155075701),F8=new S(null,"fnil","fnil",-187395162,null),H8=new S(null,"reduced","reduced",-1189224808,null),Eo=new F(null,"location?","location?",425878086),Z8=new S(null,"pop!","pop!",-1253383511,null),b8=new S(null,"unchecked-negate-int","unchecked-negate-int",-825297602,null),Yi=new S(null,"bindings","bindings",-1383038577,null),yc=new F(null,"per-line-prefix","per-line-prefix",846941813),n9=new S(null,"unchecked-add-int","unchecked-add-int",-1821763285,null),t9=new F("edamame.impl.parser","suppress","edamame.impl.parser/suppress",1718484755),dQ=new F(null,"fn-expr","fn-expr",-933027985),Nen=new S("clojure.core","multi-fn-add-method-impl","clojure.core/multi-fn-add-method-impl",-1293834231,null),O3=new S("cljs.core","nil?","cljs.core/nil?",945071861,null),qen=new S("clojure.core","-new-dynamic-var","clojure.core/-new-dynamic-var",-1873937019,null),uq=new S(null,"xs__29507__auto__","xs__29507__auto__",-1887296174,null),Ro=new F(null,"eof","eof",-489063237),e9=new S(null,"defrecord","defrecord",273038109,null),l9=new S(null,"even?","even?",-1827825394,null),r9=new S(null,"neg?","neg?",-1902175577,null),u9=new S(null,"float","float",-91857841,null),Kv=new S(null,"chunk","chunk",449371907,null),pQ=new F(null,"queue","queue",1455835879),vQ=new S("cljs.core","fnil","cljs.core/fnil",479587341,null),Ay=new S(null,"if-let","if-let",1803593690,null),i9=new S(null,"object?","object?",327472310,null),Ey=new F(null,"end","end",-268185958),dm=new S(null,"parent","parent",761652748,null),Len=new S("clojure.core","-new-var","clojure.core/-new-var",363339052,null),iq=new S(null,"iter__29079__auto__","iter__29079__auto__",-374851320,null),yQ=new S(null,"not-native","not-native",-236392494,null),Qt=new F(null,"env","env",-1815813235),jQ=new S(null,"*print-fn*","*print-fn*",138509853,null),Wen=new S("js","Number","js/Number",-508133572,null),sq=new S(null,"args__25017__auto__","args__25017__auto__",-1166418888,null),xQ=new F(null,"deftype-fields","deftype-fields",-222569172),Ven=new F(null,"post","post",269697687),s9=new S(null,"pos?","pos?",-244377722,null),js=new S(null,"tcoll","tcoll",-1341294481,null),Eu=new F(null,"col-key","col-key",-2009675766),xI=new F("sci.impl","type-name","sci.impl/type-name",-1528979388),ea=new S(null,"array","array",-440182315,null),o9=new S(null,"ns-interns","ns-interns",535532824,null),zen=new S(null,"letfn*","letfn*",-110097810,null),Ru=new F(null,"parents","parents",-2027538891),a9=new S(null,"unchecked-dec-int","unchecked-dec-int",1339067442,null),h9=new S(null,"bit-shift-left","bit-shift-left",-1814765981,null),c9=new S(null,"take-last","take-last",-41013151,null),kI=new F(null,"remaining-arg-count","remaining-arg-count",-1216589335),jc=new F(null,"logical-blocks","logical-blocks",-1466339776),Uen=new S(null,"->type-impl","->type-impl",483401048,null),f9=new S(null,"short","short",-725675253,null),g9=new S(null,"atom","atom",1243487874,null),Bv=new S(null,"symbol?","symbol?",1820680511,null),ip=new S(null,"defmacro","defmacro",2054157304,null),m9=new S(null,"tagged-literal","tagged-literal",-896422703,null),Yen=new S(null,"NaN","NaN",666918153,null),Qen=new F(null,"end-col","end-col",-724155879),w9=new S(null,"extends?","extends?",-2012201234,null),d9=new S(null,"bit-set","bit-set",-910710655,null),Gen=new F("clojure.core","eval-file","clojure.core/eval-file",801420726),kQ=new S(null,"protocol-type-impl","protocol-type-impl",561934718,null),sp=new F(null,"phase","phase",575722892),Jen=new F(null,"ready","ready",1086465795),oq=new S(null,"kmap","kmap",-2108296910,null),Xg=new F("sci.impl","f-meta","sci.impl/f-meta",-1735495322),Ry=new S(null,"doc-string?","doc-string?",393166599,null),aq=new S(null,"end-test","end-test",2122505254,null),SQ=new S(null,"IRecord","IRecord",-903221169,null),W=new F(null,"arglists","arglists",1661989754),Py=new S(null,"when-first","when-first",821699168,null),p9=new S("cljs.core","declare","cljs.core/declare",1312638100,null),Ken=new S(null,"writer","writer",1362963291,null),oh=new F(null,"end-column","end-column",1425389514),Ben=new S(null,"xset","xset",-371743149,null),v9=new S(null,"odd?","odd?",-1458588199,null),SI=new S("cljs.core","alter-var-root","cljs.core/alter-var-root",-1342668238,null),y9=new S(null,"split-with","split-with",1853047034,null),xf=new S("cljs.core","when","cljs.core/when",120293186,null),j9=new S(null,"prefer-method","prefer-method",-876100205,null),Po=new F(null,"unquote-splicing","unquote-splicing",1295267556),OQ=new F("sci.impl.analyzer","instance-expr","sci.impl.analyzer/instance-expr",629338719),Xen=new S(null,"var-args","var-args",1341745925,null),OI=new F(null,"copy-enclosed->invocation","copy-enclosed->invocation",-1322388729),Fen=new S("clojure.core","sequence","clojure.core/sequence",1998774218,null),CQ=new F(null,"expr","expr",745722291),x9=new S(null,"bit-or","bit-or",-1144943723,null),AQ=new S(null,"sci.impl.protocols","sci.impl.protocols",-697012432,null),Hen=new S("js","Boolean","js/Boolean",1661145260,null),k9=new S(null,"find","find",2136810983,null),EQ=new F(null,"start-block-t","start-block-t",-373430594),Ui=new S(null,"key","key",124488940,null),S9=new F(null,"loaded-libs","loaded-libs",-1156389652),p0=new F("sci.impl.protocols","reified","sci.impl.protocols/reified",-2019939396),O9=new S(null,"count","count",-514511684,null),Iy=new S(null,"binding","binding",-2114503176,null),Zen=new S("sci.impl.deftype","-create-type","sci.impl.deftype/-create-type",-1020101113,null),ben=new S(null,"IDeref","IDeref",1738423197,null),C9=new S(null,"when-some","when-some",1700415903,null),A9=new S(null,"remove-ns","remove-ns",-1915058781,null),pm=new S(null,"-swap!","-swap!",-535359318,null),RQ=new F(null,"resolve-symbol","resolve-symbol",-319166964),PQ=new S("cljs.core","push-thread-bindings","cljs.core/push-thread-bindings",-703482450,null),oa=new S(null,"number?","number?",-1747282210,null),C3=new F("sci.impl.parser.edamame","eof","sci.impl.parser.edamame/eof",-917261517),Rw=new F(null,"exclude","exclude",-1230250334),E9=new S(null,"unchecked-subtract","unchecked-subtract",-2137458667,null),nln=new S("cljs.core","when-first","cljs.core/when-first",-667185267,null),R9=new S(null,"sort","sort",-1700969851,null),IQ=new F("sci.impl.record","map-constructor","sci.impl.record/map-constructor",1072184780),tln=new S("cljs.core","in-ns","cljs.core/in-ns",1807208747,null),P9=new S(null,"juxt","juxt",671085604,null),bt=new F(null,"bracket-info","bracket-info",-1600092774),eln=new S("cljs.core","when-let","cljs.core/when-let",-2049838349,null),hq=new S(null,"default__25056__auto__","default__25056__auto__",-1779483916,null),si=new F(null,"body","body",-2049205669),CI=new F(null,"special","special",-1125941630),I9=new S(null,"alength","alength",-1268305401,null),_Q=new F(null,"outer-idens","outer-idens",1197381241),_9=new S(null,"with-redefs","with-redefs",-1143728263,null),Za=new F(null,"mode","mode",654403691),T9=new S(null,"nfirst","nfirst",-554736533,null),D9=new S(null,"volatile!","volatile!",919368405,null),ao=new F(null,"closure-bindings","closure-bindings",112932037),lln=new F(null,"fallback-impl","fallback-impl",-1501286995),q=new F(null,"name","name",1843675177),ki=new F(null,"syms","syms",-1575891762),M9=new S(null,"reset-meta!","reset-meta!",1699493291,null),Hj=new S(null,"do-template","do-template",-1578627476,null),$9=new S(null,"map?","map?",-1780568534,null),N9=new S(null,"into","into",1489695498,null),q9=new S(null,"sorted-set","sorted-set",992325424,null),L9=new S(null,"ints","ints",-1761239845,null),W9=new S(null,"contains?","contains?",-1676812576,null),AI=new S(null,"-deref","-deref",-283116853,null),rln=new F(null,"illegal-argument","illegal-argument",-1845493170),Io=new F(null,"class->opts","class->opts",2061906477),Zj=new S(null,"index-of","index-of",1275975485,null),v1=new F("edamame","opened-delimiter-loc","edamame/opened-delimiter-loc",443885208),V9=new S(null,"all-ns","all-ns",1571857784,null),z9=new S(null,"with-bindings","with-bindings",-1197589787,null),Hf=new F(null,"writing","writing",-1486865108),EI=new F(null,"parameter-from-args","parameter-from-args",-758446196),U9=new S(null,"js-keys","js-keys",-1388365203,null),TQ=new F(null,"keywordize-keys","keywordize-keys",1310784252),_o=new F(null,"logical-block-callback","logical-block-callback",1612691194),RI=new S(null,"inst","inst",-2008473268,null),DQ=new F(null,"selector","selector",762528866),uln=new S(null,"struct","struct",325972931,null),PI=new F(null,"auto-resolve","auto-resolve",1851201983),Y9=new S(null,"int?","int?",1799729645,null),iln=new S("cljs.core","next","cljs.core/next",-1291438473,null),sln=new S(null,"cmap","cmap",1947829886,null),Fr=new F(null,"buffer","buffer",617295198),Q9=new S(null,"empty?","empty?",76408555,null),G9=new S(null,"lazy-cat","lazy-cat",-89906116,null),cq=new S(null,"replacement","replacement",-195707312,null),J9=new S(null,"*print-readably*","*print-readably*",-761361221,null),K9=new S(null,"dissoc","dissoc",1039760994,null),oln=new S("cljs.core","refer","cljs.core/refer",269577817,null),bj=new S(null,"replace-first","replace-first",-943534331,null),aln=new F(null,"const","const",1709929842),op=new S(null,"meta","meta",-1154898805,null),Xv=new S(null,"reader","reader",1810192380,null),To=new F(null,"indent","indent",-148200125),y1=new F(null,"descendants","descendants",1824886031),fq=new F("sci.impl.deftype","object","sci.impl.deftype/object",-248099673),B9=new S(null,"str","str",-1564826950,null),hln=new S(null,"type-sym","type-sym",-1942856509,null),MQ=new S(null,"IPrintWithWriter","IPrintWithWriter",-1205316154,null),gq=new S(null,"meth__25395__auto__","meth__25395__auto__",-303057587,null),ls=new F(null,"end-location","end-location",-1199449467),Pw=new F("sci","error","sci/error",-979082803),_y=new F("sci.impl","constructor","sci.impl/constructor",1320345666),$Q=new S(null,"*print-err-fn*","*print-err-fn*",1241679298,null),X9=new S(null,"print-str","print-str",-699700354,null),cln=new S(null,"fn-tail","fn-tail",-178337841,null),fln=new F("edamame","error","edamame/error",882529634),II=new F(null,"val","val",128701612),mq=new S(null,"p__29664__auto__","p__29664__auto__",-214042622,null),tu=new F(null,"var","var",-769682797),Ty=new S(null,"get","get",-971253014,null),Dy=new S(null,"step","step",-1365547645,null),gln=new S(null,"dispatch-fn","dispatch-fn",-1401088155,null),My=new S(null,"ex-cause","ex-cause",95392590,null),yt=new S("cljs.core","let","cljs.core/let",-308701135,null),F9=new S(null,"remove","remove",1509103113,null),H9=new S(null,"isa?","isa?",1358492324,null),NQ=new F(null,"flush-on-newline","flush-on-newline",-151457939),Z9=new S(null,"iterate","iterate",694501410,null),mln=new S(null,"backslash","backslash",-863649243,null),b9=new S(null,"-add-loaded-lib","-add-loaded-lib",368206419,null),qQ=new S(null,"maps","maps",-71029607,null),n6=new S(null,"args__25058__auto__","args__25058__auto__",-1805065117,null),nS=new S(null,"mapv","mapv",-241595241,null),tS=new S(null,"deref","deref",1494944732,null),$y=new S(null,"loop","loop",1244978678,null),A3=new S("cljs.core","assoc","cljs.core/assoc",322326297,null),ap=new F(null,"public-class","public-class",1127293019),t6=new S(null,"map-invert","map-invert",1258886340,null),Is=new F(null,"unquote","unquote",1649741032),wln=new S(null,"docstring?","docstring?",-180217883,null),hp=new S(null,"boolean","boolean",-278886877,null),eS=new S(null,"bytes","bytes",-1478569089,null),lS=new S(null,"vector","vector",-751469611,null),rS=new S(null,"long","long",1469079434,null),Fv=new S(null,"size-or-seq","size-or-seq",-2062823589,null),v0=new F(null,"satisfies","satisfies",-311664218),uS=new S(null,"butlast","butlast",1573039585,null),LQ=new F(null,"max-columns","max-columns",1742323262),iS=new S(null,"delay?","delay?",-1528239209,null),wq=new S("clojure.repl","print-doc","clojure.repl/print-doc",-375546711,null),Qi=new S(null,"tag","tag",350170304,null),WQ=new S(null,"unquote","unquote",-1004694737,null),cv=new F("sci.impl.evaluator","not-found","sci.impl.evaluator/not-found",1684798426),dln=new F(null,"reader-error","reader-error",1610253121),pln=new S(null,"%&","%&",-728707069,null),sS=new S(null,"bit-not","bit-not",1508529851,null),vln=new S(null,"%1","%1",1309450150,null),dq=new S(null,"sym","sym",195671222,null),yln=new S(null,"names","names",-302543131,null),oS=new S(null,"int-array","int-array",459176616,null),lu=new F(null,"both","both",-393648840),VQ=new S(null,"reset-thread-binding-frame-impl","reset-thread-binding-frame-impl",-826674194,null),aS=new S(null,"global-hierarchy","global-hierarchy",-2014004345,null),hS=new S(null,"aget","aget",1491056546,null),jln=new S("sci.impl.protocols","default","sci.impl.protocols/default",-1134880191,null),Ny=new F(null,"symbol","symbol",-1038572696),cS=new S(null,"not-every?","not-every?",-729672558,null),fS=new S(null,"comment","comment",-2122229700,null),xln=new S("js","String","js/String",-2070054036,null),gS=new S("cljs.core","lazy-seq","cljs.core/lazy-seq",627681297,null),kln=new S(null,"branch?","branch?",641208520,null),qy=new S(null,"doseq","doseq",221164135,null),e6=new F(null,"colnum","colnum",2023796854),mS=new S("clojure.core","list","clojure.core/list",-1119203325,null),wS=new S(null,"some->","some->",-1011172200,null),cp=new S("js","Error","js/Error",-1692659266,null),Sln=new S("cljs.core","with-bindings*","cljs.core/with-bindings*",-768558084,null),Pa=new S(null,"throw","throw",595905694,null),dS=new S(null,"seqable?","seqable?",72462495,null),zQ=new F(null,"length","length",588987862),pS=new S(null,"indexed?","indexed?",1234610384,null),vS=new F(null,"when","when",-576417306),Oln=new F("sci.impl.protocols","IPrintWithWriter","sci.impl.protocols/IPrintWithWriter",1832791161),yS=new S(null,"compare-and-set!","compare-and-set!",-1997299382,null),UQ=new F(null,"char-format","char-format",-1016499218),Iw=new F(null,"extend-via-metadata","extend-via-metadata",-427346794),l6=new S(null,"union","union",-511498270,null),jS=new S(null,"zero?","zero?",325758897,null),xS=new S(null,"partition-all","partition-all",-1985005385,null),kS=new S(null,"run!","run!",-2055483725,null),Cln=new S("cljs.core","-add-loaded-lib","cljs.core/-add-loaded-lib",-38500354,null),r6=new S(null,"not-found","not-found",1011451547,null),Aln=new S(null,"specs","specs",-1227865028,null),Eln=new S(null,"retf","retf",73249638,null),SS=new S(null,"rand-int","rand-int",-495012157,null),Ly=new S(null,"rest","rest",398835108,null),Hv=new S(null,"user","user",-1122004413,null),OS=new S(null,"set","set",1945134081,null),Zf=new F(null,"prefix","prefix",-265908465),YQ=new F(null,"namespace","namespace",-377510372),CS=new S(null,"take-nth","take-nth",1378204353,null),AS=new S(null,"drop-while","drop-while",719206685,null),pq=new S(null,"sep","sep",-684005239,null),xc=new S(null,"fn*","fn*",-752876845,null),ES=new S(null,"seq","seq",-177272256,null),RS=new S(null,"fn?","fn?",1820990818,null),_s=new F(null,"dispatch","dispatch",1319337009),qu=new F(null,"rest","rest",-1241696419),Rln=new S("clojure.core","cond","clojure.core/cond",1906951420,null),PS=new S(null,"remove-method","remove-method",72923733,null),QQ=new F(null,"gensyms","gensyms",248713782),E3=new F(null,"colon-up-arrow","colon-up-arrow",244853007),IS=new S(null,"get-method","get-method",185754457,null),_S=new S(null,"update-in","update-in",-1445516941,null),Pln=new F(null,"message","message",-406056002),Iln=new S("cljs.core","LazySeq","cljs.core/LazySeq",1986389673,null),_ln=new F("edamame","read-cond-splicing","edamame/read-cond-splicing",-1992728777),GQ=new S("cljs.core","count","cljs.core/count",-921270233,null),vq=new F(null,"ex","ex",-1413771341),TS=new S(null,"keep","keep",-492807003,null),oi=new S("cljs.core","fn","cljs.core/fn",-1065745098,null),Ts=new F(null,"fn","fn",-1175266204),Wy=new S(null,"*loaded-libs*","*loaded-libs*",1951428860,null),DS=new S(null,"create-ns","create-ns",-782886354,null),Tln=new S("cljs.tools.reader.edn","escape-char","cljs.tools.reader.edn/escape-char",17562632,null),MS=new S(null,"sort-by","sort-by",1317932224,null),Ti=new F(null,"end-row-key","end-row-key",-1126662680),$S=new S(null,"defprotocol","defprotocol",1388695348,null),NS=new S(null,"frequencies","frequencies",1757430425,null),Dln=new S("cljs.core","defonce","cljs.core/defonce",-1291833100,null),qS=new S(null,"into-array","into-array",-1875808354,null),LS=new S(null,"thread-bound?","thread-bound?",2075334115,null),WS=new S(null,"transduce","transduce",-2083619734,null),VS=new S(null,"ancestors","ancestors",864486103,null),yq=new S("cljs.core","chunk-cons","cljs.core/chunk-cons",-250075688,null),Mln=new F(null,"volatile-mutable","volatile-mutable",1731728411),zS=new S(null,"ensure-reduced","ensure-reduced",-1606421005,null),US=new S(null,"re-find","re-find",1143444147,null),af=new F(null,"max-fixed","max-fixed",166770124),JQ=new S("js","Error.","js/Error.",750655924,null),$ln=new S(null,"oldval","oldval",-221475803,null),YS=new S(null,"rand","rand",-1745930995,null),Nln=new S(null,"js*","js*",-1134233646,null),u6=new S(null,"temp__29502__auto__","temp__29502__auto__",573678355,null),kc=new F(null,"suffix","suffix",367373057),jq=new S("cljs.core","println","cljs.core/println",-331834442,null),Vy=new S(null,"smap","smap",-2041991975,null),qln=new F("sci.impl","record","sci.impl/record",-1939193950),xq=new S(null,"m__25384__auto__","m__25384__auto__",536079829,null),QS=new S(null,"gensym","gensym",-1693147401,null),xt=new F(null,"at","at",1476951349),ho=new F(null,"as","as",1148689641),GS=new S(null,"*print-length*","*print-length*",-687693654,null),bf=new F(null,"nl-t","nl-t",-1608382114),JS=new S(null,"js->clj","js->clj",1544462432,null),Lln=new S("cljs.core","and","cljs.core/and",-6692549,null),Wln=new S("cljs.core","reify*","cljs.core/reify*",1256833160,null),R3=new F(null,"read-cond","read-cond",1056899244),Vln=new S("js","Function","js/Function",-749892063,null),KS=new S(null,"unchecked-char","unchecked-char",1662742943,null),BS=new S(null,"unchecked-int","unchecked-int",1672898125,null),zy=new S("cljs.core","int","cljs.core/int",20935062,null),XS=new S(null,"unchecked-multiply-int","unchecked-multiply-int",-788546068,null),Xe=new F(null,"column","column",2078222095),zln=new F(null,"ok","ok",967785236),i6=new S(null,"size__29012__auto__","size__29012__auto__",1669448591,null),FS=new F(null,"or","or",235744169),HS=new S(null,"unchecked-inc","unchecked-inc",-1170131490,null),Uln=new S(null,"number-literal?","number-literal?",843787662,null),ZS=new S(null,"prn-str","prn-str",-145225943,null),s6=new S(null,"rename-keys","rename-keys",355340888,null),Fg=new S(null,"xform","xform",-85179481,null),kq=new S(null,"default__25532__auto__","default__25532__auto__",1964788493,null),Zv=new S(null,"init-val-or-seq","init-val-or-seq",-1168783320,null),Ft=new F(null,"directive","directive",793559132),bS=new S(null,"max-key","max-key",-2132814732,null),KQ=new S(null,"get-thread-binding-frame-impl","get-thread-binding-frame-impl",-701667726,null),fu=new F(null,"obj","obj",981763962),ma=new S(null,"form","form",16469056,null),Yln=new F(null,"buffer-level","buffer-level",928864731),Qln=new S(null,"object","object",-1179821820,null),n7=new S(null,"conj!","conj!",-841007895,null),o6=new F(null,"bodies","bodies",-1295887172),t7=new S(null,"alias","alias",-399220103,null),e7=new S(null,"parents","parents",-387007364,null),r1=new S(null,"value","value",1946509744,null),l7=new S(null,"keyword?","keyword?",1917797069,null),_w=new F(null,"form","form",-1624062471),BQ=new S("cljs.core","or","cljs.core/or",1201033885,null),r7=new S(null,"disj!","disj!",-1383872088,null),Gln=new F("sci.error","realized-beyond-max","sci.error/realized-beyond-max",-1094268187),u7=new S(null,"*print-meta*","*print-meta*",-919406644,null),i7=new S(null,"counted?","counted?",1703071664,null),P3=new F(null,"mandatory","mandatory",542802336),a6=new S("cljs.core","protocol-type-impl","cljs.core/protocol-type-impl",155177701,null),XQ=new S(null,"cljs.core.PersistentQueue.EMPTY","cljs.core.PersistentQueue.EMPTY",399917828,null),Jln=new S(null,"outer","outer",1265345571,null),Kln=new F("sci.impl.evaluator","try-result","sci.impl.evaluator/try-result",-1394897780),FQ=new F(null,"pretty-writer","pretty-writer",-1222834267),s7=new S(null,"descendants","descendants",-829549738,null),kf=new S("cljs.core","defmethod","cljs.core/defmethod",-180785162,null),o7=new S(null,"long-array","long-array",217579190,null),V=new F(null,"ns","ns",441598760),a7=new S(null,"associative?","associative?",-141666771,null),Do=new F(null,"done-nl","done-nl",-381024340),h7=new S(null,"amap","amap",635923055,null),c7=new S(null,"concat","concat",-467652465,null),fv=new F("sci.impl","callstack","sci.impl/callstack",-1621010557),f7=new S(null,"as->","as->",1430690540,null),Lr=new F(null,"source","source",-433931539),Sq=new F("sci.impl.records","object","sci.impl.records/object",-590699738),Uy=new S(null,"for","for",316745208,null),Oq=new S(null,"oldform","oldform",1995222417,null),Yy=new S(null,"condp","condp",1054325175,null),h6=new S(null,"else","else",132154381,null),c6=new F(null,"keyword","keyword",811389747),g7=new S(null,"reduced?","reduced?",1361797384,null),m7=new S(null,"var-get","var-get",-767472097,null),f6=new S(null,"trimr","trimr",-1739157155,null),g6=new S(null,"triml","triml",-286546306,null),Hg=new S(null,"join","join",881669637,null),jh=new S(null,"obj","obj",-1672671807,null),HQ=new S(null,"*file*","*file*",624866474,null),w7=new S(null,"binding-conveyor-fn","binding-conveyor-fn",2076077877,null),d7=new S(null,"re-seq","re-seq",-2105554076,null),p7=new S(null,"bit-xor","bit-xor",-1334295033,null),Bln=new F(null,"id","id",-1388402092),Yu=new F(null,"else","else",-1508377146),Ds=new F(null,"seq","seq",-1817803783),fp=new S(null,"defn","defn",-126010802,null),ZQ=new F(null,"local->mutator","local->mutator",1004070878),Xln=new S("cljs.core","aset","cljs.core/aset",-898215545,null),Sc=new F(null,"set","set",304602554),v7=new S(null,"unchecked-add","unchecked-add",-2030665965,null),y7=new S(null,"memfn","memfn",-881453486,null),Cq=new S(null,"iterys__29004__auto__","iterys__29004__auto__",-1283287258,null),j7=new S(null,"ffirst","ffirst",-694902e3,null),x7=new S(null,"bounded-count","bounded-count",1030640883,null),k7=new S(null,"swap!","swap!",-655677516,null),y0=new F(null,"protocol","protocol",652470118),m6=new S(null,"capitalize","capitalize",-2143275164,null),S7=new S(null,"bound-fn*","bound-fn*",102308621,null),w6=new S(null,"fs__29005__auto__","fs__29005__auto__",440491957,null),O7=new S(null,"prefers","prefers",-374265406,null),Fln=new S("clojure.core","array-map","clojure.core/array-map",-1351833961,null),Aq=new S("cljs.core","chunk","cljs.core/chunk",847936424,null),bs=new F(null,"colinc","colinc",-584873385),C7=new S(null,"empty","empty",-1886564811,null),gv=new S(null,"farg__25373__auto__","farg__25373__auto__",1109963387,null),A7=new S(null,"shorts","shorts",107738238,null),Eq=new S(null,"options","options",1740170016,null),E7=new S(null,"defmethod","defmethod",-579171823,null),Hln=new S(null,"-inner-impl","-inner-impl",-1295431849,null),Cn=new S(null,"&","&",-2144855648,null),R7=new F(null,"deny","deny",1589338523),P7=new S(null,"repeat","repeat",-1821743682,null),Rq=new S(null,"%","%",-950237169,null),I7=new S(null,"*","*",345799209,null),_7=new F(null,"print-length","print-length",1931866356),Pq=new S(null,"child","child",-2030468224,null),Sf=new F(null,"up-arrow","up-arrow",1705310333),gp=new S(null,"+","+",-740910886,null),Mo=new S(null,".",".",1975675962,null),T7=new S(null,"-","-",-471816912,null),mp=new S(null,"/","/",-1371932971,null),_I=new F(null,"keys","keys",1068423698),D7=new S(null,"boolean?","boolean?",1790940868,null),bQ=new S("cljs.core","chunked-seq?","cljs.core/chunked-seq?",-712922369,null),M7=new S(null,"remove-watch","remove-watch",-1105301448,null),$7=new S(null,"multi-fn-add-method-impl","multi-fn-add-method-impl",-523930142,null),Zln=new S(null,"IReset","IReset",-1893729426,null),bln=new S(null,"arr","arr",2115492975,null),nG=new F(null,"right-bracket","right-bracket",951856080),nrn=new S(null,"_","_",-1201019570,null),N7=new S(null,"cond->","cond->",561741875,null),d6=new S(null,"source","source",1206599988,null),gi=new S(null,"b","b",-1172211299,null),$l=new S(null,"a","a",-482876059,null),nf=new S(null,"d","d",-682293345,null),trn=new S("sci.impl.deftype","-inner-impl","sci.impl.deftype/-inner-impl",528349233,null),Ql=new S(null,"body","body",-408674142,null),q7=new S(null,"booleans","booleans",756846088,null),la=new S(null,"c","c",-122660552,null),Bn=new S(null,"f","f",43394975,null),ern=new F(null,"sigs","sigs",-1653119622),lrn=new S(null,"e","e",-1273166571,null),ra=new S(null,"h","h",-1544777029,null),Gd=new S(null,"g","g",-916345864,null),p6=new S(null,"escape","escape",648929575,null),Ze=new S(null,"k","k",-505765866,null),zt=new S(null,"n","n",-2092305744,null),Tr=new S(null,"m","m",-1021758608,null),Of=new S(null,"attr-map?","attr-map?",116307443,null),L7=new S(null,"p","p",1791580836,null),vm=new S(null,"o","o",290524299,null),$m=new S(null,"lazy-seq","lazy-seq",489632906,null),Nm=new S(null,"read","read",-1514377108,null),rrn=new S(null,"r","r",1169147337,null),W7=new S(null,"doubles","doubles",-1517872169,null),urn=new S(null,"t","t",242699008,null),Kt=new S(null,"s","s",-948495851,null),j1=new S(null,"__sci_this","__sci_this",-193704996,null),V7=new S(null,"re-pattern","re-pattern",1047705161,null),mh=new S(null,"v","v",1661996586,null),z7=new S(null,"<=","<=",1244895369,null),gn=new S(null,"x","x",-555367584,null),U7=new S(null,"get-in","get-in",-1965644065,null),Y7=new S(null,"<","<",993667236,null),Iq=new S(null,"yrel","yrel",-1573821256,null),Q7=new S(null,">",">",1085014381,null),G7=new S(null,"=","=",-1501502141,null),J7=new S(null,"macroexpand","macroexpand",1509933344,null),K7=new S(null,"every?","every?",2083724064,null),ws=new F(null,"hierarchy","hierarchy",-1053470341),v6=new S(null,"keywordize-keys","keywordize-keys",-1343651517,null),B7=new F(null,"async-load-fn","async-load-fn",-472170029),tG=new S("cljs.core","alength","cljs.core/alength",-1012804190,null),irn=new F(null,"radix","radix",857016463),X7=new S(null,"==","==",-234118149,null),srn=new F(null,"classes","classes",2037804510),F7=new S(null,"chunk-append","chunk-append",-1447349559,null),H7=new S(null,"double?","double?",-2146564276,null),Z7=new F(null,"first","first",-644103046),b7=new S(null,"*print-level*","*print-level*",-634488505,null),nO=new S(null,"areduce","areduce",-1873477878,null),orn=new F(null,"gen-class","gen-class",-426712454),qm=new S(null,"and","and",668631710,null),tO=new S(null,">=",">=",1016916022,null),y6=new S(null,"temp__29481__auto__","temp__29481__auto__",-35958956,null),mv=new S(null,"z","z",851004344,null),tt=new S(null,"y","y",-117328249,null),Cf=new F(null,"allow","allow",-1857325745),eG=new S(null,"*data-readers*","*data-readers*",1269051058,null),arn=new S(null,"separator","separator",11782402,null),wp=new S("cljs.core","unchecked-inc","cljs.core/unchecked-inc",-501313167,null),Lm=new S(null,"read-string","read-string",-558384455,null),j6=new F(null,"var-args?","var-args?",-1630678710),eO=new S(null,"interleave","interleave",165488106,null),lO=new S(null,"subs","subs",1453849536,null),hrn=new S("cljs.core","binding","cljs.core/binding",2050379843,null),TI=new F("sci.impl.analyzer","static-access","sci.impl.analyzer/static-access",-79014e3),x6=new S(null,"substr","substr",-2116301839,null),crn=new F(null,"sections","sections",-886710106),rO=new S(null,"js-delete","js-delete",170306730,null),uO=new S(null,"sorted?","sorted?",892797714,null),iO=new F(null,"raw-classes","raw-classes",1669916511),sO=new S(null,"partial","partial",1881673272,null),oO=new S(null,"memoize","memoize",2019341169,null),frn=new S("cljs.core","*print-fn*","cljs.core/*print-fn*",1342365176,null),Qy=new S(null,"impls","impls",326516674,null),grn=new F(null,"orig","orig",-1678309870),lG=new S(null,"*out*","*out*",1277591796,null),rG=new F("edamame.impl.parser","cond-splice","edamame.impl.parser/cond-splice",1534599765),mrn=new F(null,"libname","libname",135992497),aO=new S(null,"array?","array?",-1249008197,null),hO=new S(null,"reset!","reset!",527275632,null),Gy=new F(null,"start","start",-355208981),_q=new F("sci.impl.deftype","IPrintWithWriter","sci.impl.deftype/IPrintWithWriter",-1280030107),cO=new S(null,"sorted-set-by","sorted-set-by",899099765,null),Oh=new S(null,"expr","expr",-1908713478,null),wrn=new S("clojure.core","hash-set","clojure.core/hash-set",1229125967,null),fO=new S(null,"ns-resolve","ns-resolve",1788675756,null),gO=new S(null,"*flush-on-newline*","*flush-on-newline*",-737526501,null),dp=new F(null,"ns-aliases","ns-aliases",1290254821),drn=new S("cljs.core","doseq","cljs.core/doseq",-169320766,null),mO=new S(null,"keyword-identical?","keyword-identical?",931555714,null),Y=new F("sci","built-in","sci/built-in",1244659599),prn=new S(null,"prefix-string","prefix-string",-922371041,null),wO=new S(null,"unchecked-subtract-int","unchecked-subtract-int",-1899147615,null),k6=new S(null,"prewalk-replace","prewalk-replace",2117002030,null),vrn=new S(null,"-create-type","-create-type",805234013,null),dO=new S(null,"zipmap","zipmap",-690049687,null),Tq=new S(null,"method-table__24951__auto__","method-table__24951__auto__",-639890219,null),S6=new S(null,"upper-case","upper-case",1427515769,null),yrn=new S("cljs.core","into","cljs.core/into",1879938733,null),pO=new S(null,"nth","nth",1529209554,null),pd=new S(null,"recur","recur",1202958259,null),rf=new S(null,"multifn","multifn",-1904313150,null),uG=new S(null,"clojure.walk","clojure.walk",1625897340,null),jrn=new S(null,"capacity","capacity",1713221261,null),DI=new S(null,"-reset!","-reset!",1965723739,null),xrn=new S("cljs.core","long","cljs.core/long",241154833,null),krn=new S(null,"dispatch-val-y","dispatch-val-y",1016388320,null),vO=new S(null,"inst?","inst?",1614698981,null),Srn=new S(null,"dispatch-val-x","dispatch-val-x",-1545100153,null),Orn=new F("tools.reader","opts","tools.reader/opts",-2121810901),Ir=new S(null,"name","name",-810760592,null),yO=new S(null,"ex-data","ex-data",1331491268,null),jO=new S(null,"print","print",-1354873355,null),Crn=new S(null,"cause","cause",1872432779,null),Arn=new S("cljs.core","unquote","cljs.core/unquote",1013085760,null),Dq=new S(null,"prepost-map?","prepost-map?",869562481,null),Ern=new S(null,"cljs.reader","cljs.reader",1327473948,null),Mq=new S(null,"default__25068__auto__","default__25068__auto__",-31182265,null),$q=new F("sci.impl.analyzer","unresolved","sci.impl.analyzer/unresolved",308754858),MI=new S("cljs.core","loop","cljs.core/loop",-1829423021,null),xO=new S(null,"to-array","to-array",-585705189,null),Jy=new S(null,"defn-","defn-",1097765044,null),os=new F(null,"read-eval","read-eval",1788733932),O6=new F("cljs.core","halt","cljs.core/halt",-1049036715),kO=new S(null,"unchecked-inc-int","unchecked-inc-int",1402783397,null),iG=new S("cljs.core","deref","cljs.core/deref",1901963335,null),C6=new S(null,"c__29011__auto__","c__29011__auto__",-383068259,null),wo=new F(null,"block","block",664686210),SO=new S(null,"refer-clojure","refer-clojure",-1840651329,null),Nq=new S(null,"x__29309__auto__","x__29309__auto__",1160745086,null),Ee=new S(null,"more","more",-418290273,null),OO=new S(null,"not","not",1044554643,null),CO=new S(null,"reduce-kv","reduce-kv",1856296400,null),AO=new S(null,"re-matches","re-matches",-1865705768,null),Tw=new S(null,"when","when",1064114221,null),Rrn=new F(null,"min-var-args","min-var-args",-1883389660),Prn=new S(null,"validator","validator",-325659154,null),Wm=new S(null,"case","case",-1510733573,null),pp=new F("sci.error","parse","sci.error/parse",-264338844),qq=new F(null,"more-marker","more-marker",-14717935),Irn=new S("cljs.core","vreset!","cljs.core/vreset!",-1308835928,null),EO=new S(null,"completing","completing",565832990,null),RO=new S(null,"rand-nth","rand-nth",-1227719931,null),_rn=new S("cljs.core","defmulti","cljs.core/defmulti",723984225,null),PO=new S(null,"alter-var-root","alter-var-root",-1749458519,null),IO=new S(null,"unchecked-double","unchecked-double",-1593778036,null),_O=new S(null,"distinct","distinct",-148347594,null),Trn=new S(null,"ns*","ns*",1840949383,null),vp=new S("cljs.core","meta","cljs.core/meta",-748218346,null),sG=new S("cljs.core","find-ns","cljs.core/find-ns",-486459417,null),pl=new F(null,"type","type",1174270348),Drn=new S("cljs.core","aclone","cljs.core/aclone",-758078968,null),TO=new S(null,"list?","list?",-1494629,null),oG=new S("sci.impl.protocols","type->str","sci.impl.protocols/type->str",1214133319,null),DO=new S(null,"vector?","vector?",-61367869,null),MO=new S(null,"bound?","bound?",767722602,null),$O=new S(null,"list*","list*",765415731,null),Fn=new F("sci.impl","inlined","sci.impl/inlined",-478453593),aG=new F(null,"else-params","else-params",-832171646),x1=new S(null,"next","next",1522830042,null),Lq=new S(null,"farg__25530__auto__","farg__25530__auto__",1804407067,null),Mrn=new F("sci.impl","type","sci.impl/type",1797552241),NO=new F(null,"let","let",-1282412701),qO=new S(null,"Delay","Delay",-956795572,null),LO=new S(null,"not=","not=",1466536204,null),ae=new F(null,"line","line",212345235),WO=new F(null,"mutable","mutable",875778266),$rn=new F(null,"ctx","ctx",-493610118),ng=new F(null,"methods","methods",453930866),VO=new S(null,"seq?","seq?",-1951934719,null),$I=new S(null,"expand-constructor","expand-constructor",-343741576,null),hG=new S(null,"js","js",-886355190,null),j0=new F("sci","macro","sci/macro",-868536151),zO=new S(null,"unchecked-float","unchecked-float",1485658216,null),I3=new S(null,"case*","case*",-1938255072,null),Wq=new S(null,"data","data",1407862150,null),UO=new F(null,"constructor","constructor",-1953928811),Vq=new S(null,"find-doc","find-doc",-1096800949,null),Nrn=new S(null,"ISwap","ISwap",484378193,null),A6=new S(null,"last-index-of","last-index-of",215608200,null),YO=new S(null,"constantly","constantly",-271143939,null),Zg=new F(null,"count","count",2139924085),qrn=new S(null,"km","km",-1276648257,null),NI=new S(null,"rdr","rdr",190007785,null),hf=new F(null,"right","right",-452581833),yi=new S(null,"ks","ks",-754231827,null),_3=new F("sci.impl","macroexpanding","sci.impl/macroexpanding",2113471825),Fu=new F(null,"linear","linear",872268697),cG=new F("sci.impl","inner-fn","sci.impl/inner-fn",1663302998),QO=new S(null,"flush","flush",501820328,null),E6=new S(null,"s__29308__auto__","s__29308__auto__",-239760766,null),GO=new S(null,"nthrest","nthrest",1219890118,null),vd=new F(null,"readably","readably",1129599760),JO=new S(null,"true?","true?",-1600332395,null),KO=new S(null,"var-set","var-set",-1361408121,null),fG=new F(null,"only","only",1907811652),BO=new S(null,"rem","rem",664046770,null),XO=new S(null,"ns-map","ns-map",-434605548,null),gG=new S("cljs.core","pop-thread-bindings","cljs.core/pop-thread-bindings",-1994943347,null),mG=new S("cljs.core","chunk-rest","cljs.core/chunk-rest",-398161143,null),Lrn=new S(null,"rev","rev",1653234197,null),tg=new F(null,"data","data",-232669377),wG=new S(null,"ret","ret",1172308713,null),Wrn=new S(null,"limit","limit",284709164,null),Vrn=new S(null,"clojure.lang.IChunk","clojure.lang.IChunk",195957271,null),FO=new S(null,"make-array","make-array",-1135103906,null),zrn=new S("cljs.core","*print-newline*","cljs.core/*print-newline*",6231625,null),HO=new S(null,"select-keys","select-keys",-708556589,null),ZO=new S(null,"instance?","instance?",1075939923,null),zq=new S(null,"n__29393__auto__","n__29393__auto__",1238790286,null),bO=new S(null,"double","double",-1769548886,null),Urn=new S("sci.impl.namespaces","with-open","sci.impl.namespaces/with-open",-1695932508,null),nC=new S(null,"update","update",-1608859373,null),R6=new S(null,"sets","sets",2041487109,null),Yrn=new F(null,"as-alias","as-alias",82482467),Ky=new S(null,"when-not","when-not",-1223136340,null),wv=new S(null,"p3","p3",-923395030,null),P6=new S(null,"lower-case","lower-case",1428172944,null),xs=new S(null,"ns","ns",2082130287,null),Dw=new F(null,"stack","stack",-793405930),Qrn=new F(null,"pending","pending",-220036727),I6=new S(null,"temp__29520__auto__","temp__29520__auto__",1462319395,null),bg=new S(null,"p1","p1",703771573,null),nm=new S(null,"p2","p2",-1748935128,null),tC=new S(null,"inc","inc",324505433,null),dG=new S(null,"fields","fields",-291534703,null),eC=new S(null,"random-uuid","random-uuid",-1574409597,null),lC=new S(null,"macroexpand-all","macroexpand-all",966103926,null),be=new F(null,"padchar","padchar",2018584530),rC=new S(null,"sequential?","sequential?",1102351463,null),om=new F(null,"strable","strable",1877668047),uC=new S(null,"force","force",-1872478483,null),Ge=new F(null,"col","col",-1959363084),iC=new S(null,"int","int",-100885395,null),sC=new S(null,"nthnext","nthnext",1677356670,null),Vm=new S(null,"or","or",1876275696,null),qI=new F(null,"vararg-idx","vararg-idx",-590991228),oC=new S(null,"assoc!","assoc!",-847603280,null),_6=new S(null,"blank?","blank?",1891979743,null),aC=new S(null,"*print-dup*","*print-dup*",103854877,null),hr=new F(null,"offset","offset",296498311),hC=new S(null,"extend-type","extend-type",1123355921,null),cC=new S(null,"set?","set?",1636014792,null),Uq=new S(null,"set1","set1",-1952562536,null),Yq=new S(null,"set2","set2",1231516531,null),fC=new S(null,"hash-unordered-coll","hash-unordered-coll",-240471618,null),_r=new F(null,"mincol","mincol",1230695445),pG=new S("js","Object","js/Object",61215323,null),Qq=new S(null,"l__29572__auto__","l__29572__auto__",497043064,null),Gq=new S(null,"ps","ps",1932889573,null),T6=new S(null,"c__29040__auto__","c__29040__auto__",-456033258,null),gC=new S(null,"pr","pr",1056937027,null),T3=new S(null,"set!","set!",250714521,null),mC=new S(null,"reductions","reductions",549963952,null),tf=new S(null,"size","size",-1555742762,null),wC=new S(null,"rsubseq","rsubseq",-710070471,null),dC=new S(null,"chunk-next","chunk-next",-547810434,null),vG=new S(null,"*read-eval*","*read-eval*",1122065414,null),pC=new S(null,"subseq","subseq",-1558995241,null),Zo=new S(null,"s1","s1",338671490,null),vC=new S(null,"double-array","double-array",257035726,null),tm=new S(null,"s2","s2",614604262,null),Grn=new F(null,"not-delivered","not-delivered",1599158697),D6=new S(null,"select","select",-1506602266,null),LI=new F(null,"miser-width","miser-width",-1310049437),Jrn=new S(null,"root","root",1191874074,null),yC=new S(null,"vswap!","vswap!",-574070781,null),wr=new S(null,"args","args",-1338879193,null),k1=new S(null,"re","re",1869207729,null),Krn=new S(null,"rf","rf",-651557526,null),jC=new S(null,"every-pred","every-pred",-1346958247,null),xC=new S(null,"pr-str","pr-str",-2066912145,null),kC=new S(null,"requiring-resolve","requiring-resolve",-1888505231,null),SC=new S(null,"ns-imports","ns-imports",1111168888,null),M6=new S(null,"var__30584__auto__","var__30584__auto__",-1534826325,null),Brn=new S(null,"-create-record-type","-create-record-type",-1472918739,null),Xrn=new S(null,"sb","sb",-1249746442,null),dv=new S(null,"sc","sc",-1506412737,null),By=new S(null,"with-local-vars","with-local-vars",837642072,null),OC=new S(null,"unchecked-dec","unchecked-dec",2095823150,null),CC=new S(null,"partition","partition",-1479695018,null),Frn=new S(null,"cljs.core.ISwap","cljs.core.ISwap",2045511362,null),AC=new S(null,"list","list",-1889078086,null),EC=new S(null,"hash-combine","hash-combine",1136881997,null),$6=new S(null,"ends-with?","ends-with?",-346570208,null),pv=new S(null,"arg1","arg1",-1702536411,null),ba=new F(null,"postprocess","postprocess",-1863762881),N6=new S(null,"arg2","arg2",-924884852,null),Jq=new S(null,"arg3","arg3",153709031,null),RC=new S(null,"eval","eval",536963622,null),PC=new S(null,"nat-int?","nat-int?",-1879663400,null),Hrn=new S("cljs.core","seq-to-map-for-destructuring","cljs.core/seq-to-map-for-destructuring",240595294,null),q6=new S(null,"to","to",1832630534,null),L6=new S(null,"superset?","superset?",2074872204,null),Zrn=new S("cljs.tools.reader.edn","read-symbolic-value","cljs.tools.reader.edn/read-symbolic-value",111468855,null),Ms=new S(null,"new","new",-444906321,null),Bl=new S(null,"clojure.core","clojure.core",-189332625,null),brn=new S("cljs.core","with-meta","cljs.core/with-meta",749126446,null),IC=new S(null,"second","second",1195829517,null),nun=new S(null,"lift-ns","lift-ns",602311926,null),Kq=new S(null,"keyword-fn","keyword-fn",1575964852,null),_C=new S(null,"partition-by","partition-by",-1329938249,null),u1=new F(null,"allows-separator","allows-separator",-818967742),yd=new F(null,"list","list",765357683),yp=new S("cljs.core","seq","cljs.core/seq",-1649497689,null),Xy=new F(null,"buffering","buffering",-876713613),Bq=new F(null,"arg1","arg1",951899358),Hu=new F(null,"base-args","base-args",-1268706822),Xq=new F(null,"arg3","arg3",-1486822496),tun=new F(null,"end-row","end-row",-545103581),Fq=new F(null,"arg2","arg2",1729550917),TC=new S(null,"sorted-map","sorted-map",-521216771,null),eun=new S(null,"idxv","idxv",-1163260636,null),DC=new S(null,"peek","peek",1349135202,null),MC=new S(null,"refer","refer",676235974,null),WI=new S("cljs.core","update","cljs.core/update",-908565906,null),yG=new S(null,"vol","vol",1137570949,null),jp=new S("cljs.core","not=","cljs.core/not=",1017572457,null),ua=new F(null,"commainterval","commainterval",-1980061083),$C=new S(null,"unchecked-multiply","unchecked-multiply",-1019161490,null),lun=new S(null,"idxs","idxs",-2145941206,null),jG=new S(null,"goog.string.StringBuffer","goog.string.StringBuffer",-1220229842,null),NC=new S(null,"simple-keyword?","simple-keyword?",-367134735,null),xG=new S(null,"clojure.string","clojure.string",-1415552165,null),Jd=new S(null,"end","end",1372345569,null),qC=new S(null,"extend","extend",-817951763,null),Hq=new S(null,"args__25066__auto__","args__25066__auto__",-394325402,null),kG=new S("cljs.core","constantly","cljs.core/constantly",119002258,null),Zq=new S(null,"quoted-sym","quoted-sym",474507191,null),SG=new S("cljs.core","concat","cljs.core/concat",-1133584918,null),LC=new S(null,"delay","delay",1066306308,null),WC=new S(null,"halt-when","halt-when",-140999689,null),OG=new F("sci.impl.analyzer","method-name","sci.impl.analyzer/method-name",-842600667),run=new S("cljs.core","bound-fn*","cljs.core/bound-fn*",-556238942,null),VC=new S(null,"macroexpand-1","macroexpand-1",659241329,null),zC=new S(null,"merge-with","merge-with",1025434534,null),bq=new S(null,"eof","eof",1151468290,null),uun=new S(null,"new-value","new-value",-1567397401,null),wh=new S(null,"meth__25375__auto__","meth__25375__auto__",2089847902,null),UC=new S(null,"simple-ident?","simple-ident?",194189851,null),YC=new S(null,"chunk-rest","chunk-rest",-1853526420,null),nL=new S(null,"xs","xs",-2004992428,null),QC=new S(null,"byte","byte",-1970660549,null),GC=new S(null,"complement","complement",-913606051,null),Fy=new S(null,"hash","hash",1626749931,null),iun=new S(null,"rsym","rsym",204230332,null),sun=new S(null,"idx2","idx2",195459820,null),JC=new S(null,"keyword","keyword",-1843046022,null),oun=new F(null,"right-margin","right-margin",-810413306),aun=new S(null,"ys","ys",1606115702,null),KC=new S(null,"identical?","identical?",-745864205,null),BC=new S(null,"array-map","array-map",1555038968,null),tL=new S(null,"method-cache__24953__auto__","method-cache__24953__auto__",1061133143,null),XC=new S(null,"with-meta","with-meta",73674707,null),FC=new S(null,"trampoline","trampoline",-71368916,null),Hy=new F(null,"buffer-blob","buffer-blob",-1830112173),HC=new S(null,"bound-fn","bound-fn",125411266,null),hun=new S(null,"function","function",-486723946,null),eL=new F("edamame.impl.parser","fn-literal","edamame.impl.parser/fn-literal",-1835933155),ZC=new S(null,"min","min",2085523049,null),bC=new S(null,"unsigned-bit-shift-right","unsigned-bit-shift-right",-1953076601,null),nA=new S(null,"min-key","min-key",246826648,null),W6=new S(null,"postwalk-replace","postwalk-replace",77744733,null),D3=new F("sci.impl","print-method","sci.impl/print-method",281191566),tA=new S(null,"find-ns","find-ns",-884829568,null),eg=new F(null,"features","features",-1146962336),cun=new S("cljs.core","with-redefs-fn","cljs.core/with-redefs-fn",-1271194088,null),fun=new S(null,"sigs","sigs",-12588095,null),CG=new S(null,"&form","&form",1482799337,null),eA=new S(null,"not-empty","not-empty",2029453590,null),gun=new S(null,"decls","decls",-1311111277,null),lL=new S("cljs.core","assert","cljs.core/assert",1075777968,null),mun=new S(null,"sci.lang.Type","sci.lang.Type",-534180168,null),lA=new S(null,"find-var","find-var",-497901917,null),rA=new S(null,"with-out-str","with-out-str",-140201577,null),Zy=new S(null,"with-open","with-open",172119667,null),wun=new S("cljs.tools.reader.impl.commons","number-literal?","cljs.tools.reader.impl.commons/number-literal?",-1450304800,null),uA=new S(null,"disj","disj",-1076545178,null),rL=new S(null,"default__25064__auto__","default__25064__auto__",790458434,null),Ai=new F(null,"iden->invoke-idx","iden->invoke-idx",-1797627026),iA=new S(null,"distinct?","distinct?",-1684357959,null),zm=new F("sci.impl","fast-path","sci.impl/fast-path",1273254676),sA=new S(null,"unchecked-long","unchecked-long",1306610949,null),VI=new S("cljs.core","first","cljs.core/first",-752535972,null),dun=new S("cljs.core","lift-ns","cljs.core/lift-ns",463499081,null),AG=new S("cljs.core","nth","cljs.core/nth",1961052085,null),Mw=new S(null,"vals","vals",-1886377036,null),zI=new F(null,"rename","rename",1508157613),oA=new S(null,"intern","intern",1664352151,null),pun=new S(null,"-mutate","-mutate",-795549165,null),vun=new S("cljs.core","unchecked-inc-int","cljs.core/unchecked-inc-int",-2007014592,null),aA=new S(null,"qualified-ident?","qualified-ident?",-928894763,null),yun=new F(null,"lines","lines",-700165781),EG=new F(null,"ex-idx","ex-idx",795118805),V6=new S(null,"project","project",-1530041190,null),Cu=new F(null,"tag","tag",-1290361223),RG=new F(null,"indent-t","indent-t",528318969),jun=new S("cljs.core","chunk-buffer","cljs.core/chunk-buffer",14093626,null),hA=new S(null,"loaded-libs","loaded-libs",484141875,null),cA=new S(null,"with-redefs-fn","with-redefs-fn",-595725379,null),fA=new S(null,"dedupe","dedupe",-461856254,null),$s=new F(null,"regex","regex",939488856),gA=new S(null,"record?","record?",-1305224237,null),Oc=new F(null,"var-arg-name","var-arg-name",-1100024887),xun=new S("sci.impl.records","-create-record-type","sci.impl.records/-create-record-type",558578550,null),xp=new S(null,"loop*","loop*",615029416,null),mA=new S(null,"defmulti","defmulti",1936112154,null),kun=new F(null,"verbose","verbose",1694226060),em=new S(null,"method__25061__auto__","method__25061__auto__",852271316,null),lm=new S(null,"then","then",2101129597,null),wA=new S(null,"cycle","cycle",-1944070485,null),Sun=new S(null,"inner","inner",257360312,null),Oun=new F("sci","type","sci/type",1175422389),PG=new S(null,"*assert*","*assert*",1479636474,null),dA=new S(null,"some->>","some->>",-1499987794,null),ft=new F("sci.impl.analyzer","recur","sci.impl.analyzer/recur",2033369355),ro=new S("cljs.core","apply","cljs.core/apply",1757277831,null),uL=new S(null,"quoted","quoted",-537090817,null),pA=new S(null,"var?","var?",230455531,null),jd=new F(null,"right-params","right-params",-1790676237),at=new F(null,"colon","colon",-965200945),by=new S(null,"if-not","if-not",-265415609,null),Ns=new F(null,"aliases","aliases",1346874714),Af=new S(null,"keys","keys",-1586012071,null),iL=new F("cljs.core","not-found","cljs.core/not-found",-1572889185),z6=new S(null,"args__25053__auto__","args__25053__auto__",-1756835926,null),vA=new S(null,"pos-int?","pos-int?",-1205815015,null),Cun=new S("cljs.core","resolve","cljs.core/resolve",1796776582,null),bo=new S(null,"c1","c1",-1521904966,null),yA=new S(null,"simple-symbol?","simple-symbol?",1408454822,null),$o=new F(null,"fixed-arity","fixed-arity",1586445869),dh=new S(null,"c2","c2",78651156,null),vv=new S(null,"c3","c3",468715789,null),UI=new S("cljs.core","when-not","cljs.core/when-not",-556141047,null),Aun=new F(null,"declared","declared",92336021),jA=new S(null,"-write","-write",1999625154,null),xd=new F(null,"vector","vector",1902966158),xA=new S(null,"tagged-literal?","tagged-literal?",1117865390,null),Ar=new F(null,"bindings","bindings",1271397192),kA=new S(null,"vreset!","vreset!",1237177091,null),SA=new S(null,"realized?","realized?",207229341,null),OA=new S(null,"symbol","symbol",601958831,null),Eun=new S(null,"cf","cf",-1173699459,null),CA=new S(null,"clj->js","clj->js",-1880244676,null),U6=new S(null,"trim-newline","trim-newline",656815794,null),AA=new S(null,"fnext","fnext",1424835295,null),EA=new S(null,"rseq","rseq",-1719353554,null),kd=new S(null,"finally","finally",-1065347064,null),Run=new S(null,"parse-symbol","parse-symbol",1608073451,null),nh=new F(null,"func","func",-238706040),sL=new S(null,"msg","msg",254428083,null),RA=new S(null,"vec","vec",982683596,null),Y6=new S(null,"prewalk","prewalk",1337993264,null),oL=new F("edamame.core","eof","edamame.core/eof",1855384188),zu=new F(null,"dynamic","dynamic",704819571),PA=new S(null,"hash-set","hash-set",-1145168432,null),je=new S(null,"do","do",1686842252,null),Pun=new S(null,"f1","f1",-939903380,null),Iun=new S(null,"f2","f2",2036700123,null),_un=new S(null,"f3","f3",-699606726,null),IA=new S(null,"if-some","if-some",1960677609,null),_A=new S(null,"take-while","take-while",2007268328,null),Tun=new F(null,"self-ref?","self-ref?",412808630),TA=new S(null,"push-thread-bindings","push-thread-bindings",1054019843,null),DA=new S(null,"persistent!","persistent!",1286555698,null),YI=new F(null,"invoc-size","invoc-size",2053298058),Dun=new S(null,"seed","seed",1709144854,null),Mun=new S("clojure.core","seq","clojure.core/seq",-1551838743,null),IG=new S(null,"clojure.edn","clojure.edn",-302325352,null),MA=new S(null,"the-ns","the-ns",1016317907,null),Bt=new S(null,"quote","quote",1377916282,null),$un=new F(null,"last","last",1105735132),Nun=new F(null,"preserve","preserve",1276846509),$A=new S(null,"qualified-keyword?","qualified-keyword?",375456001,null),NA=new S(null,"char?","char?",-1072221244,null),_G=new S(null,"*in*","*in*",1130010229,null),am=new S(null,"idx","idx",-1600747296,null),Q6=new S(null,"intersection","intersection",-650544759,null),kp=new S(null,"ex","ex",226760186,null),qun=new S("cljs.core","*ns*","cljs.core/*ns*",1155497085,null),G6=new S(null,"and__30354__auto__","and__30354__auto__",1739023891,null),qA=new S(null,"derive","derive",1727397303,null),Lun=new F(null,"cljs","cljs",1492417629),TG=new S(null,"clojure.template","clojure.template",-1162325089,null),LA=new S(null,"cond->>","cond->>",348844960,null),WA=new S(null,"bit-flip","bit-flip",809639606,null),Di=new F(null,"deref","deref",-145586795),aL=new S(null,"fs","fs",-482394717,null),$w=new S(null,"fn","fn",465265323,null),cf=new S(null,"type","type",-1480165421,null),n5=new S(null,"dotimes","dotimes",-818708397,null),x0=new F(null,"max-iterations","max-iterations",2021275563),J6=new S(null,"subset?","subset?",1551079215,null),VA=new S(null,"map-indexed","map-indexed",-1391025435,null),Wun=new S("clojure.core","deftype","clojure.core/deftype",-1728257017,null),zA=new S(null,"conj","conj",-1127293942,null),aa=new F(null,"char","char",-641587586),Vun=new S("cljs.core","chunk-append","cljs.core/chunk-append",-243671470,null),UA=new S(null,"newline","newline",-864364446,null),YA=new S(null,"cons","cons",755448454,null),QA=new S(null,"neg-int?","neg-int?",-1610409390,null),GA=new S(null,"underive","underive",-242982950,null),zun=new S("clojure.repl","dir-fn","clojure.repl/dir-fn",901908317,null),Uun=new S("cljs.core","ns-name","cljs.core/ns-name",171430027,null),t5=new S(null,"cond","cond",1606708055,null),JA=new S(null,"mod","mod",1510044207,null),hL=new S(null,"keyfn","keyfn",-1874375437,null),cL=new F(null,"proxy-fn","proxy-fn",1116677438),KA=new S(null,"chars","chars",545901210,null),Sp=new S(null,"comp","comp",-1462482139,null),DG=new S("clojure.core","deref","clojure.core/deref",188719157,null),Yun=new F(null,"alt-impl","alt-impl",670969595),BA=new S(null,"inst-ms","inst-ms",-653961375,null),Gi=new S(null,"val","val",1769233139,null),Qun=new S("cljs.core","not","cljs.core/not",100665144,null),wl=new S(null,"var","var",870848730,null),Um=new F(null,"minpad","minpad",323570901),de=new F(null,"logical-block","logical-block",-581022564),XA=new S(null,"dispatch-val","dispatch-val",69061e3,null),MG=new S(null,"seq-exprs","seq-exprs",-637209651,null),Gun=new S(null,"escape-char","escape-char",-2072670949,null),se=new S(null,"if","if",1181717262,null),qn=new S(null,"coll","coll",-1006698606,null),Jun=new S(null,"&env","&env",-919163083,null),FA=new S(null,"drop","drop",2005013138,null),K6=new S(null,"stringify-keys","stringify-keys",1735215919,null),Kun=new S(null,"read-symbolic-value","read-symbolic-value",-100790078,null),HA=new F("sci.impl","op","sci.impl/op",950953978),ZA=new S(null,"keep-indexed","keep-indexed",-2020916352,null),fL=new S(null,"source-fn","source-fn",-1114937984,null),bA=new S(null,"any?","any?",-318999933,null),Uh=new F(null,"string","string",-1989541586),nE=new S(null,"assert","assert",677428501,null),Op=new S("cljs.core","defn","cljs.core/defn",-1606493717,null),$G=new S(null,"uuid","uuid",-504564192,null),Vr=new F(null,"imports","imports",-1249933394),QI=new S(null,"cljs.tools.reader.edn","cljs.tools.reader.edn",-1275821532,null),Bun=new F(null,"dup","dup",556298533),GI=new F("cljs.analyzer","no-resolve","cljs.analyzer/no-resolve",-1872351017),tE=new S(null,"js-obj","js-obj",342383250,null),eE=new S(null,"unchecked-negate","unchecked-negate",-1669067451,null),e5=new S(null,"ex-message","ex-message",-1128293394,null),rm=new S(null,"colls","colls",-397642425,null),Xun=new F(null,"status","status",-1997798413),Fun=new S("cljs.core","ex-info","cljs.core/ex-info",-409744395,null),Hun=new S("js","Array","js/Array",-423508366,null),lE=new S(null,"map-entry?","map-entry?",1140615277,null),yv=new S(null,"iref","iref",-647796531,null),rE=new S(null,"demunge","demunge",-1865491845,null),B6=new S(null,"dir","dir",-919681108,null),uE=new S(null,"LazySeq","LazySeq",1579450882,null),lg=new F(null,"self-ref-idx","self-ref-idx",-1384537812),X6=new S(null,"rename","rename",-1146278156,null),iE=new S(null,"filter","filter",691993593,null),Zun=new S(null,"struct-map","struct-map",-1387540878,null),F6=new S(null,"starts-with?","starts-with?",1014173927,null),NG=new F(null,"end-block-t","end-block-t",1544648735),sE=new S(null,"ex-info","ex-info",-539875240,null),bun=new S(null,"->record-impl","->record-impl",1274709757,null),nin=new S(null,"deftype*","deftype*",962659890,null),oE=new S(null,"unchecked-remainder-int","unchecked-remainder-int",1427188224,null),aE=new S(null,"interpose","interpose",-2078295140,null),hE=new S(null,"bit-and","bit-and",-479352589,null),gL=new S(null,"aseq","aseq",-1865515628,null),cE=new S(null,"aset","aset",900773178,null),H6=new F(null,"stream","stream",1534941648),fE=new S(null,"false?","false?",-1522377573,null),mL=new S(null,"methods__25054__auto__","methods__25054__auto__",-306338654,null),tin=new F(null,"tag-class","tag-class",714967874),ein=new S("cljs.core","ex-message","cljs.core/ex-message",-747602175,null),gE=new S(null,"shuffle","shuffle",-1393023609,null),mE=new S(null,"string?","string?",-1129175764,null),wE=new S(null,"methods","methods",2094462393,null),as=new F(null,"source-key","source-key",-1325875542),dE=new S(null,"doto","doto",1252536074,null),pE=new S(null,"println","println",-733595439,null),JI=new F(null,"use","use",-1846382424),lin=new S(null,"fnspecs","fnspecs",-958581686,null),Z6=new S(null,"trim","trim",-1880116002,null),ha=new F("edamame.impl.parser","opened-delimiter","edamame.impl.parser/opened-delimiter",1199661648),Mi=new S(null,"def","def",597100991,null),Cc=new F(null,"map","map",1371690461),rt=new F(null,"params","params",710516235),wL=new S(null,"args__26130__auto__","args__26130__auto__",1201862833,null),vE=new S(null,"dec","dec",-766002333,null),M3=new F(null,"max","max",61366548),KI=new F(null,"check-permissions","check-permissions",669054317),yE=new S(null,"chunk-cons","chunk-cons",433801405,null),jE=new S(null,"chunked-seq?","chunked-seq?",1044846168,null),qG=new S(null,"-new-var","-new-var",1200468147,null),rin=new S(null,"doc+methods","doc+methods",2036080922,null),uin=new F(null,"handled","handled",1889700151),xE=new S(null,"ns-unalias","ns-unalias",445102632,null),iin=new S("cljs.core","multi-fn-impl","cljs.core/multi-fn-impl",1399453884,null),LG=new F(null,"bindingx","bindingx",679516896),sin=new S(null,"default","default",-347290801,null),N=new F(null,"doc","doc",1913296891),qs=new F(null,"readers","readers",-2118263030),Ls=new F(null,"quote","quote",-262615245),BI=new S(null,"catch","catch",-1616370245,null),dL=new S(null,"cached-hierarchy__24954__auto__","cached-hierarchy__24954__auto__",2049413325,null),b6=new S(null,"apply-template","apply-template",1809601838,null),kE=new S(null,"coll?","coll?",-1874821441,null),XI=new F(null,"path","path",-188191168),oin=new S("cljs.core","cond->","cljs.core/cond->",-113941356,null),WG=new S(null,"newval","newval",717803975,null),SE=new S(null,"reify","reify",1885539699,null),OE=new S(null,"to-array-2d","to-array-2d",-1563270737,null),ain=new S("clojure.core","apply","clojure.core/apply",1654646389,null),FI=new S("cljs.core","alter-meta!","cljs.core/alter-meta!",574694262,null),nx=new S(null,"includes?","includes?",-2049283381,null),VG=new S("cljs.core","->","cljs.core/->",1488366311,null),pL=new S(null,"m__26131__auto__","m__26131__auto__",1461247313,null),vL=new S("sci.impl.records","->record-impl","sci.impl.records/->record-impl",-1005013370,null),yL=new S(null,"start-test","start-test",687547962,null),S1=new F(null,"separator","separator",-1628749125),rg=new S(null,"map","map",-1282745308,null),CE=new S(null,"max","max",1701898075,null),zG=new S(null,"*default-data-reader-fn*","*default-data-reader-fn*",758795499,null),AE=new S(null,"compare","compare",1109853757,null),EE=new S(null,"multi-fn?-impl","multi-fn?-impl",1372639302,null),hin=new S(null,".close",".close",-1017758745,null),RE=new F("sci.impl","fn","sci.impl/fn",1695180073),$3=new S("clojure.core","unquote","clojure.core/unquote",843087510,null),PE=new S(null,"load-string","load-string",-403739145,null),cin=new F(null,"circle","circle",1903212362),IE=new S(null,"range","range",-1014743483,null),_E=new S(null,"use","use",-205850897,null),ya=new S("cljs.core","if-let","cljs.core/if-let",1346583165,null),tx=new S(null,"index","index",108845612,null),um=new S(null,"x__25057__auto__","x__25057__auto__",-141483252,null),Fs=new S(null,"test","test",-2076896892,null),fin=new S(null,"-Inf","-Inf",-2123243689,null),TE=new S(null,"take","take",871646627,null),Ym=new F("edamame","expected-delimiter","edamame/expected-delimiter",93379254),Me=new F(null,"start-pos","start-pos",668789086),me=new F(null,"flags","flags",1775418075),jL=new S(null,"l__29577__auto__","l__29577__auto__",-1213400782,null),xL=new S(null,"meta__25059__auto__","meta__25059__auto__",-2019058713,null),DE=new S(null,"dorun","dorun",560426022,null),Nw=new F(null,"splicing?","splicing?",-428596366),kL=new F(null,"variadic","variadic",882626057),ah=new F(null,"test","test",577538877),N3=new F(null,"fill","fill",883462889),ME=new S(null,"*print-newline*","*print-newline*",1478078956,null),fe=new F(null,"file","file",-1269645878),gin=new F(null,"buffer-block","buffer-block",-10937307),jv=new S("cljs.core","rest","cljs.core/rest",-285075455,null),min=new S(null,"number","number",-1084057331,null),win=new S("sci.impl.deftype","->type-impl","sci.impl.deftype/->type-impl",-2121297742,null),$E=new S(null,"chunk-buffer","chunk-buffer",789680287,null),NE=new S(null,"reversible?","reversible?",314107817,null),qE=new S(null,"ns-publics","ns-publics",903350436,null),ve=new F(null,"generator-fn","generator-fn",811851656),SL=new F(null,"loading","loading",-737050189),din=new S(null,"body-expr","body-expr",-2125506601,null),UG=new S("clojure.core","defrecord","clojure.core/defrecord",581689476,null),Kd=new S(null,"xrel","xrel",-735800081,null),LE=new S(null,"bit-and-not","bit-and-not",-254338837,null),YG=new S("cljs.core","->>","cljs.core/->>",-1207871206,null),pin=new F(null,"resolve-sym","resolve-sym",-1193683260),WE=new S(null,"longs","longs",-1017696020,null),QG=new S(null,"cljs.tools.reader.impl.commons","cljs.tools.reader.impl.commons",1569241026,null),i1=new S(null,"init","init",-234949907,null),ex=new S(null,"split-lines","split-lines",777513935,null),GG=new S(null,"queue","queue",-1198599890,null),vin=new F(null,"eofthrow","eofthrow",-334166531),yin=new S(null,"keyseq","keyseq",-1822150828,null),VE=new S(null,"some","some",-310548046,null),lx=new S(null,"doc","doc",-741138878,null),jin=new S(null,"print-doc","print-doc",528043232,null),zE=new S(null,"declare","declare",654042991,null),No=new F(null,"start-col","start-col",668080143),JG=new F(null,"level","level",1290497552),Qm=new S("cljs.core","type","cljs.core/type",-821761154,null),KG=new F("sci.impl","idx","sci.impl/idx",700902278),xin=new S("cljs.core","cons","cljs.core/cons",96507417,null),BG=new S(null,"clojure.set","clojure.set",-630955632,null),HI=new F(null,"meta","meta",1499536964),OL=new S(null,"m__25055__auto__","m__25055__auto__",-104303537,null),ZI=new S("cljs.core","conj","cljs.core/conj",-460750931,null),kin=new S("edamame.core","read-eval","edamame.core/read-eval",1461005554,null),UE=new S(null,"floats","floats",513591110,null),YE=new S(null,"with-bindings*","with-bindings*",-93186207,null),Sin=new S(null,"zs","zs",-257004521,null),QE=new S(null,"satisfies?","satisfies?",-433227199,null),rx=new S(null,"walk","walk",1673453164,null),Oin=new S("clojure.core","hash-map","clojure.core/hash-map",338908405,null),GE=new S(null,"pop","pop",-94247249,null),Cin=new S(null,"token","token",429068312,null),ja=new F(null,"w","w",354169001),XG=new F("sci","record","sci/record",-778731026),CL=new S(null,"dir-fn","dir-fn",187684626,null),Gm=new F(null,"ancestors","ancestors",-776045424),Ch=new F(null,"n","n",562130025),bv=new S(null,"has-root-impl","has-root-impl",-288948659,null),FG=new S(null,"sci.impl.deftype","sci.impl.deftype",959784924,null),xv=new S(null,"x__25065__auto__","x__25065__auto__",332413977,null),Ain=new S("cljs.core","Delay","cljs.core/Delay",-21574999,null),Zu=new F(null,"def","def",-1043430536),Ein=new S(null,"more-sizes","more-sizes",-763736162,null),JE=new S(null,"seq-to-map-for-destructuring","seq-to-map-for-destructuring",647384515,null),Bd=new S(null,"keyvals","keyvals",-2067234787,null),Rin=new S(null,"defrecord*","defrecord*",-1936366207,null),KE=new S(null,"reduce","reduce",1358839360,null),ux=new S(null,"method__25067__auto__","method__25067__auto__",1988388911,null),BE=new S(null,"dissoc!","dissoc!",333592624,null),ix=new S(null,"postwalk","postwalk",967039904,null),HG=new S(null,"reify*","reify*",1646945123,null),Jm=new F(null,"k","k",-2146297393),Pin=new S("cljs.tools.reader.edn","read-char*","cljs.tools.reader.edn/read-char*",-606185164,null),qw=new F(null,"f","f",-1597136552),Iin=new F(null,"invocation-self-idx","invocation-self-idx",-1258983407),_in=new S("cljs.core","var-get","cljs.core/var-get",-91823622,null),l5=new F(null,"e","e",1381269198),XE=new S(null,"alter-meta!","alter-meta!",1510444945,null),xa=new F(null,"d","d",1972142424),FE=new S(null,"float?","float?",673884616,null),sx=new S(null,"difference","difference",-738334373,null),Tin=new S(null,"read-date","read-date",1874308181,null),Km=new S(null,"replace","replace",853943757,null),HE=new S(null,"mapcat","mapcat",-601348859,null),Ia=new F(null,"overflowchar","overflowchar",-1620088106),ZE=new S(null,"chunk-first","chunk-first",1379046752,null),ZG=new F(null,"min-remaining","min-remaining",962687677),Lw=new S("cljs.core","get","cljs.core/get",-296075407,null),bE=new S(null,"prn","prn",1561684909,null),ia=new F(null,"commachar","commachar",652859327),AL=new S(null,"match","match",-1434376219,null),Ww=new S(null,"let*","let*",1920721458,null),n2=new F(null,"reload-all","reload-all",761570200),EL=new S(null,"v__29677__auto__","v__29677__auto__",-1333437830,null),nR=new S(null,"deftype","deftype",1980826088,null),bG=new S("cljs.core","hash-map","cljs.core/hash-map",303385767,null),tR=new S(null,"doall","doall",988520834,null),ox=new S(null,"or__30317__auto__","or__30317__auto__",470056421,null),Bm=new S(null,"objs","objs",-170194107,null),Pu=new F(null,"row-key","row-key",-1189010712),Sg=new S(null,"try","try",-1273693247,null),bI=new S("clojure.core","unquote-splicing","clojure.core/unquote-splicing",-552003150,null),eR=new S(null,"special-symbol?","special-symbol?",-731144617,null),Din=new S(null,"cljs.core.IDeref","cljs.core.IDeref",-783543206,null),Min=new F(null,"keyword-fn","keyword-fn",-64566675),Ac=new F(null,"recur-target","recur-target",-1909494536),Vw=new F(null,"section","section",-300141526),lR=new S(null,"eduction","eduction",1445227968,null),rR=new S(null,"make-hierarchy","make-hierarchy",-241558556,null),Vi=new F(null,"private","private",-558947994),wu=new F(null,"refers","refers",158076809),s1=new S(null,"comparator","comparator",-509539107,null),nJ=new S(null,"clojure.repl","clojure.repl",570897595,null),ax=new S(null,"meth__25531__auto__","meth__25531__auto__",-948033356,null),$in=new F("sci.impl","required-fn","sci.impl/required-fn",2082701278),Xm=new S(null,"reverse","reverse",752076261,null),tJ=new F(null,"require","require",-468001333),uR=new S(null,"some?","some?",234752293,null),iR=new S(null,"random-sample","random-sample",-914181101,null),uf=new F(null,"pretty","pretty",-1916372486),dr=new S(null,"pred","pred",-727012372,null),RL=new S(null,"prefer-table__24952__auto__","prefer-table__24952__auto__",-1833928743,null),sR=new S(null,"namespace","namespace",1263021155,null),Nin=new S(null,"type->str","type->str",360030041,null),qin=new S(null,"cljs.core.IReset","cljs.core.IReset",348905844,null),r5=new S(null,"let","let",358118826,null),Lin=new S(null,"string","string",-349010059,null),Xd=new S(null,"x__25052__auto__","x__25052__auto__",-657673773,null),Win=new F(null,"loc","loc",-584284901),eJ=new S(null,"import","import",241030818,null),oR=new S(null,"undefined?","undefined?",1356377224,null),qo=new F(null,"refer","refer",-964295553),aR=new S(null,"require","require",1172530194,null),hR=new S(null,"assoc","assoc",2071440380,null),cR=new S(null,"ns-unmap","ns-unmap",1255260993,null),fR=new S(null,"drop-last","drop-last",-1123611530,null),O1=new S(null,"clauses","clauses",-1199594528,null),gR=new S(null,"split-at","split-at",-60953742,null),PL=new S(null,"map-entry","map-entry",329617471,null),Vin=new F(null,"validator","validator",-1966190681),zin=new S(null,"eof-error?","eof-error?",863128689,null),lJ=new S(null,"-reified-methods","-reified-methods",1702712518,null),Ws=new F(null,"parent","parent",-878878779),mR=new S(null,"subvec","subvec",364611032,null),hx=new S(null,"a__29576__auto__","a__29576__auto__",680593664,null),wR=new S(null,"multi-fn-impl","multi-fn-impl",187651105,null),Iu=new F(null,"syntax-quote","syntax-quote",-1233164847),dR=new S(null,"aclone","aclone",722978531,null),Fm=new F("edamame.impl.parser","expected-delimiter","edamame.impl.parser/expected-delimiter",2057965803),ct=new F(null,"namespaces","namespaces",-1444157469),ou=new F(null,"clauses","clauses",1454841241),rJ=new S(null,"toString","toString",-95766347,null),cx=new S(null,"split","split",1041096409,null),u5=new S(null,"defonce","defonce",-1681484013,null),pR=new S(null,"bit-shift-right","bit-shift-right",884046498,null),uJ=new S("cljs.core","pr-str","cljs.core/pr-str",-552799478,null),ug=new S("cljs.core","str","cljs.core/str",-1971828991,null),vR=new S(null,"integer?","integer?",1303791671,null),yR=new S(null,"transient","transient",899115069,null),Yt=new F(null,"base","base",185279322),$i=new F(null,"end-col-key","end-col-key",81813304),jR=new S(null,"identity","identity",-1007039734,null),IL=new S(null,"v__30583__auto__","v__30583__auto__",-651395364,null),_L=new S(null,"from-index","from-index",1882766240,null),Uin=new S("clojure.core","concat","clojure.core/concat",-1236478952,null),xR=new S(null,"last","last",-1548700637,null),Yin=new F(null,"no-test","no-test",-1679482642),iJ=new S(null,"*ns*","*ns*",740153818,null),Qin=new F(null,"character","character",380652989),ym=new S(null,"forms","forms",-608443419,null),kR=new S(null,"PersistentQueue","PersistentQueue",-160870792,null),Cp=new S("cljs.core","<","cljs.core/<",1677496129,null),Gin=new F(null,">>",">>",-277509267),SR=new S(null,"while","while",-1691317983,null),TL=new S(null,"m__25374__auto__","m__25374__auto__",2134041676,null),Jin=new S("cljs.core","=","cljs.core/=",-1891498332,null),Kin=new S(null,"-pr-writer","-pr-writer",-445354136,null),pe=new F(null,"type-tag","type-tag",-1873863267),OR=new S(null,"bit-test","bit-test",543456753,null),fx=new F(null,"namespaced-map","namespaced-map",1235665380),Bin=new S(null,"locking","locking",1542862874,null),Eh=new F(null,"pre","pre",2118456869),Xin=new S(null,"proc","proc",-643106804,null),DL=new S(null,"prob","prob",1133230269,null),ML=new F(null,"min-varargs","min-varargs",1999010596),n_=new S(null,"expand-dot*","expand-dot*",-1946890561,null),sJ=new S(null,"*err*","*err*",2070937226,null),CR=new S(null,"char","char",998943941,null),Fin=new S("clojure.core","vec","clojure.core/vec",146271141,null),oJ=new F("sci.impl","var","sci.impl/var",-2041185552),aJ=new S(null,"Object","Object",61210754,null),gx=new S(null,"ns__30585__auto__","ns__30585__auto__",-1867359978,null),Hin=new F("sci.impl.namespaces","TODO","sci.impl.namespaces/TODO",-1842365958),AR=new S(null,"group-by","group-by",1261391725,null),ER=new S(null,"unchecked-divide-int","unchecked-divide-int",1613116468,null),RR=new S(null,"flatten","flatten",-1441633353,null),Zin=new S("cljs.core","var?","cljs.core/var?",1711182854,null),PR=new S(null,"unchecked-short","unchecked-short",27848057,null),Ue=new F(null,"pos","pos",-864607220),IR=new S(null,"sequence","sequence",-1727628355,null),_R=new S(null,"quot","quot",-1125214196,null),hJ=new S("cljs.core","zipmap","cljs.core/zipmap",-1902130674,null),bin=new F(null,"suppress-namespaces","suppress-namespaces",2130686956),mx=new S(null,"temp__29467__auto__","temp__29467__auto__",1506091070,null),TR=new S(null,"tree-seq","tree-seq",-1800921632,null),DR=new S(null,"*print-namespace-maps*","*print-namespace-maps*",-1759108415,null),$L=new S(null,"a__29571__auto__","a__29571__auto__",1439917511,null),hh=new F(null,"end-line","end-line",1837326455),nsn=new S("cljs.core","-reified-methods","cljs.core/-reified-methods",-1833109469,null),MR=new S(null,"some-fn","some-fn",-490044165,null),$R=new S(null,"ns-name","ns-name",-436814796,null),Ss=new S("cljs.core","get-method","cljs.core/get-method",-487793502,null),NR=new S(null,"munge","munge",-174396700,null),qR=new F(null,"while","while",963117786),Hr=new F(null,"cur","cur",1153190599),i5=new S(null,"resolve","resolve",56086045,null),LR=new S(null,"repeatedly","repeatedly",1199964457,null),s5=new S(null,"in-ns","in-ns",-2089468466,null),th=new F(null,"macro","macro",-867863404),tsn=RegExp("([\\uD800-\\uDBFF])([\\uDC00-\\uDFFF])","g"),Sd=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Sd.h=function(t){var n=new rl;for(t=E(t);;)if(t!=null)n=n.append(M.h(j(t))),t=A(t);else return n.toString()};Sd.g=function(t,n){var e=new rl;for(n=E(n);;)if(n!=null)e.append(M.h(j(n))),n=A(n),n!=null&&e.append(t);else return e.toString()};Sd.l=2;var Lo=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Lo.g=function(t,n){return Lo.i(t,n,0)};Lo.i=function(t,n,e){if(M.h(n)==="/(?:)/")n=$b(t,e);else if(1>e)n=_n(M.h(t).split(n));else n:for(var l=e,r=Yn;;){if(l===1){n=In.g(r,t);break n}var u=Ju(n,t);if(u!=null){var i=t.indexOf(u);u=t.substring(i+an(u)),--l,r=In.g(r,t.substring(0,i)),t=u}else{n=In.g(r,t);break n}}if(e===0&&1t?null:t};q3.i=function(t,n,e){return t=t.indexOf(n,e),0>t?null:t};q3.l=3;var Gc=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Gc.g=function(t,n){return t=t.lastIndexOf(n),0>t?null:t};Gc.i=function(t,n,e){return t=t.lastIndexOf(n,e),0>t?null:t};Gc.l=3;p=pf.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"splicing?":return this.Lb;case"form":return this.form;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.tools.reader.impl.utils.ReaderConditional{",", ","}",e,D.g(new v(null,2,5,y,[new v(null,2,5,y,[Nw,this.Lb],null),new v(null,2,5,y,[_w,this.form],null)],null),this.G))};p.Wa=function(){return new yu(this,2,new v(null,2,5,y,[Nw,_w],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 2+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=-209062840^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.Lb,n.Lb)&&X.g(this.form,n.form)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,2,[Nw,null,_w,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new pf(this.Lb,this.form,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"splicing?":case"form":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(Nw,n):on.call(null,Nw,n))?new pf(e,this.form,this.J,this.G,null):x(on.g?on.g(_w,n):on.call(null,_w,n))?new pf(this.Lb,e,this.J,this.G,null):new pf(this.Lb,this.form,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,2,5,y,[new Ln(Nw,this.Lb),new Ln(_w,this.form)],null),this.G))};p.W=function(t,n){return new pf(this.Lb,this.form,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p.Z=On;p.M=function(t,n,e){return Rn(n,["#?",x(this.Lb)?"@":null].join("")),ot(this.form,n,e)};var esn=/[\s]/;et.h(0);Z5.prototype.K=function(){if(this.je>this.Hc){var t=this.R.charAt(this.Hc);return this.Hc+=1,t}return null};Z5.prototype.jb=function(){return this.je>this.Hc?this.R.charAt(this.Hc):null};l0.prototype.K=function(){var t=this.vbt?'..."':'"',l=n.length;return['"',M.h(n.substring(0,t"});nr.Sa(null,uh,function(){return""});nr.Sa(null,Ca,function(){return""});nr.Sa(null,Na,function(){return""});nr.Sa(null,Mt,function(){return""});nr.Sa(null,sQ,function(){return"nil"});nr.Sa(null,yd,function(t,n){return n3(t,n,"(",")")});nr.Sa(null,Cc,function(t,n){var e=an(n),l=x(t)?0:e;return n=dn.g(D,Cr.g(l,n)),n3(t,n,"{",e>l?"...}":"}")});nr.Sa(null,Sc,function(t,n){return n3(t,n,"#{","}")});nr.Sa(null,xd,function(t,n){return n3(t,n,"[","]")});nr.Sa(null,Gt,function(t,n){return Us.j(z([cr(n)]))});var NL=/^([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?$/,qL=/([-+]?[0-9]+)\/([0-9]+)/,LL=/([-+]?[0-9]+(\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?/,k0=function t(n){for(var e=[],l=arguments.length,r=0;rn?0>e?new v(null,2,5,y,[t,M.h(t.length-1)],null):new v(null,2,5,y,[[vt.i(t,0,e),vt.g(t,e+1)].join(""),M.h(e-1)],null):0>e?new v(null,2,5,y,[vt.i(t,0,n),vt.g(t,n+1)],null):new v(null,2,5,y,[[vt.i(t,0,1),vt.i(t,2,n)].join(""),vt.g(t,n+1)],null),n=m.i(t,0,null),t=m.i(t,1,null);n:if(e=an(n),0e){n="";break n}if(X.g(m.g(n,e),"0"))--e;else{n=vt.i(n,0,e+1);break n}}n:{e=n;var l=an(e);if(0l?2:l:0,x(e)?e=n+e+1:0<=n?(e=n+1,--l,e=e>l?e:l):e=l+n;var u=X.g(e,0)?new v(null,4,5,y,[["0",M.h(t)].join(""),n+1,1,r+1],null):new v(null,4,5,y,[t,n,e,r],null);if(e=m.i(u,0,null),r=m.i(u,1,null),l=m.i(u,2,null),u=m.i(u,3,null),x(l)){if(0>l)return new v(null,3,5,y,["0",0,!1],null);if(u>l){if(n=m.g(e,l),t=vt.i(e,0,l),qh(n)>=qh("5")){n:for(n=an(t)-1,e=n|0;;){if(0>e){n=dn.i(M,"1",ge.g(n+1,"0"));break n}if(X.g("9",t.charAt(e)))--e;else{n=dn.u(M,vt.i(t,0,e),gu(qh(t.charAt(e))+1),ge.g(n-e,"0"));break n}}return t=an(n)>t.length,new v(null,3,5,y,[t?vt.i(n,0,an(n)-1):n,r,t],null)}return new v(null,3,5,y,[t,r,!1],null)}}}return new v(null,3,5,y,[t,n,!1],null)},UY=function(t,n,e){var l=0>n?new v(null,2,5,y,[[M.h(dn.g(M,ge.g(-n-1,"0"))),M.h(t)].join(""),-1],null):new v(null,2,5,y,[t,n],null);t=m.i(l,0,null);var r=m.i(l,1,null);return l=an(t),e=x(e)?r+e+1:r+1,e=ln?n=[".",M.h(e)].join(""):(n+=1,n=[vt.i(e,0,n),".",vt.g(e,n)].join("")),n},Stn=function(t,n){return 0>n?[".",M.h(t)].join(""):[vt.i(t,0,n),".",vt.g(t,n)].join("")},YY=function(t,n){var e=ja.h(t),l=xa.h(t);n=ml(n);var r=m.i(n,0,null);n=m.i(n,1,null);var u=0>r?new v(null,2,5,y,["-",-r],null):new v(null,2,5,y,["+",r],null),i=m.i(u,0,null);u=m.i(u,1,null),u=o3(u);var s=m.i(u,0,null),a=m.i(u,1,null)+Jm.h(t);u=function(){var f=xt.h(t);return x(f)?f:0>r}();var o=Xn(l)&&an(s)-1<=a,h=mI(s,a,l,x(e)?e-(x(u)?1:0):null);if(s=m.i(h,0,null),a=m.i(h,1,null),h=m.i(h,2,null),s=UY(s,x(h)?a+1:a,l),l=x(x(e)?x(l)?1<=l&&X.g(s.charAt(0),"0")&&X.g(s.charAt(1),".")&&s.length>e-(x(u)?1:0):l:e)?vt.g(s,1):s,a=X.g(j(l),"."),x(e)){s=l.length,s=x(u)?s+1:s,a=a&&!(s>=e),o=o&&!(s>=e);var c=a||o?s+1:s;x(function(){var f=c>e;return f&&Ia.h(t)}())?Ce.j(z([dn.g(M,ge.g(e,Ia.h(t)))])):Ce.j(z([[M.h(dn.g(M,ge.g(e-c,be.h(t)))),M.h(x(u)?i:null),a?"0":null,l,o?"0":null].join("")]))}else Ce.j(z([[M.h(x(u)?i:null),a?"0":null,l,o?"0":null].join("")]));return n},QY=function(t,n){n=ml(n);var e=m.i(n,0,null);n=m.i(n,1,null);var l=o3(0>e?-e:e);for(m.i(l,0,null),m.i(l,1,null);;){var r=m.i(l,0,null),u=m.i(l,1,null),i=ja.h(t),s=xa.h(t),a=l5.h(t),o=Jm.h(t),h=function(){var T=x8.h(t);return x(T)?T:"E"}();l=function(){var T=xt.h(t);return x(T)?T:0>e}();var c=0>=o,f=u-(o-1),d=M.h(Math.abs(f));h=[M.h(h),0>f?"-":"+",M.h(x(a)?dn.g(M,ge.g(a-d.length,"0")):null),d].join("");var C=h.length;if(f=an(r),r=[M.h(dn.g(M,ge.g(-o,"0"))),M.h(r),M.h(x(s)?dn.g(M,ge.g(s-(f-1)-(0>o?-o:0),"0")):null)].join(""),f=x(i)?i-C:null,r=mI(r,0,X.g(o,0)?s-1:0o?s-1:null,x(f)?f-(x(l)?1:0):null),f=m.i(r,0,null),m.i(r,1,null),d=m.i(r,2,null),r=Stn(f,o),s=X.g(o,an(f))&&s==null,Xn(d)){if(x(i)){u=r.length+C,u=x(l)?u+1:u;var I=(c=c&&!X.g(u,i))?u+1:u;u=s&&Ii;return T||(T=a,T=x(T)?C-2>a:T),x(T)?Ia.h(t):T}())?Ce.j(z([dn.g(M,ge.g(i,Ia.h(t)))])):Ce.j(z([[M.h(dn.g(M,ge.g(i-I-(u?1:0),be.h(t)))),x(l)?0>e?"-":"+":null,c?"0":null,r,u?"0":null,h].join("")]))}else Ce.j(z([[x(l)?0>e?"-":"+":null,c?"0":null,r,s?"0":null,h].join("")]));break}else l=new v(null,2,5,y,[f,u+1],null)}return n},Otn=function(t,n,e){var l=ml(n),r=m.i(l,0,null);m.i(l,1,null),l=o3(0>r?-r:r);var u=m.i(l,0,null);l=m.i(l,1,null);var i=ja.h(t),s=xa.h(t),a=l5.h(t);return l=X.g(r,0)?0:l+1,r=x(a)?a+2:4,i=x(i)?i-r:null,x(s)?u=s:(u=an(u),s=7>l?l:7,u=u>s?u:s),l=u-l,0<=l&&l<=u?(t=YY(new P(null,6,[ja,i,xa,l,Jm,0,Ia,Ia.h(t),be,be.h(t),xt,xt.h(t)],null),n),Ce.j(z([dn.g(M,ge.g(r," "))])),t):QY(t,n)},Ctn=function(t,n){n=ml(n);var e=m.i(n,0,null);n=m.i(n,1,null);var l=o3(Math.abs(e)),r=m.i(l,0,null),u=m.i(l,1,null),i=xa.h(t),s=Ch.h(t);l=ja.h(t);var a=function(){var h=xt.h(t);return x(h)?h:0>e}(),o=mI(r,u,i,null);return r=m.i(o,0,null),u=m.i(o,1,null),o=m.i(o,2,null),i=UY(r,x(o)?u+1:u,i),s=[M.h(dn.g(M,ge.g(s-i.indexOf("."),"0"))),i].join(""),i=s.length+(x(a)?1:0),Ce.j(z([[x(function(){var h=at.h(t);return x(h)?a:h}())?0>e?"-":"+":null,M.h(dn.g(M,ge.g(l-i,be.h(t)))),x(function(){var h=Xn(at.h(t));return h&&a}())?0>e?"-":"+":null,s].join("")])),n},Atn=function(t,n){var e=TQ.h(t);e=x(e)?new v(null,2,5,y,[e,n],null):ml(n),n=m.i(e,0,null),e=m.i(e,1,null);var l=ou.h(t);return n=0>n||n>=an(l)?j(Yu.h(t)):m.g(l,n),x(n)?ts(n,e,Hu.h(t)):e},Etn=function(t,n){var e=ml(n);n=m.i(e,0,null),e=m.i(e,1,null);var l=ou.h(t);return n=x(n)?Rt(l):j(l),x(n)?ts(n,e,Hu.h(t)):e},Rtn=function(t,n){var e=ml(n),l=m.i(e,0,null);e=m.i(e,1,null);var r=ou.h(t);return r=x(l)?j(r):null,x(l)?x(r)?ts(r,n,Hu.h(t)):n:e},Ptn=function(t,n){var e=x0.h(t),l=j(ou.h(t));l=oe(l)?ww(n):new v(null,2,5,y,[l,n],null),n=m.i(l,0,null),l=m.i(l,1,null),l=ml(l);var r=m.i(l,0,null);l=m.i(l,1,null);var u=0;r=ce(r);for(var i=-1;;){if(Xn(e)&&X.g(Ue.h(r),i)&&1=e:e))||(i=ts(n,r,Hu.h(t)),X.g(Sf,j(i))))return l;u+=1;var s=Ue.h(r);r=i,i=s}},Itn=function(t,n){var e=x0.h(t),l=j(ou.h(t));l=oe(l)?ww(n):new v(null,2,5,y,[l,n],null),n=m.i(l,0,null),l=m.i(l,1,null),l=ml(l);var r=m.i(l,0,null);l=m.i(l,1,null);for(var u=0;;){var i=oe(r)&&(Xn(at.h(jd.h(t)))||0=e:e))||(i=ts(n,ce(j(r)),ce(A(r))),X.g(E3,j(i))))return l;u+=1,r=A(r)}},_tn=function(t,n){var e=x0.h(t),l=j(ou.h(t)),r=oe(l)?ww(n):new v(null,2,5,y,[l,n],null);n=m.i(r,0,null),l=0,r=m.i(r,1,null);for(var u=-1;;){if(Xn(e)&&X.g(Ue.h(r),u)&&1=e:e)))return r;if(u=ts(n,r,Hu.h(t)),X.g(Sf,j(u)))return Rt(u);l+=1;var i=Ue.h(r);r=u,u=i}},Ttn=function(t,n){var e=x0.h(t),l=j(ou.h(t)),r=oe(l)?ww(n):new v(null,2,5,y,[l,n],null);for(n=m.i(r,0,null),l=0,r=m.i(r,1,null);;){var u=oe(qu.h(r))&&(Xn(at.h(jd.h(t)))||0=e:e)))return r;if(u=qu.h(r),u=x(u)?new v(null,2,5,y,[j(u),new Hi(Ds.h(r),A(u),Ue.h(r)+1,null,null,null)],null):new v(null,2,5,y,[null,r],null),r=m.i(u,0,null),u=m.i(u,1,null),r=ts(n,ce(r),u),X.g(E3,j(r)))return u;r=u,l+=1}},Dtn=function(t,n){if(x(at.h(jd.h(t)))){var e=ou.h(t),l=an(e),r=1G?1:G}();a=En.g(So,Mn.g(an,o));var c=_r.h(t),f=Um.h(t),d=bs.h(t),C=a+h*f;c=C<=c?c:c+d*(1+ri(C-c-1,d));var I=c-a;a=function(){var G=ri(I,h);return f>G?f:G}(),d=I-a*h,a=dn.g(M,ge.g(a,be.h(t))),x(x(l)?kr(Yt.h(J(J(Kn))),Hr)+e+c>s:l)&&Ce.j(z([l])),e=d;for(var T=o,$=function(){var G=at.h(t);return x(G)?G:X.g(an(T),1)&&Xn(xt.h(t))}();E(T);)Ce.j(z([[M.h(Xn($)?j(T):null),M.h(x(function(){var G=$;return x(G)||(G=A(T))?G:xt.h(t)}())?a:null),M.h(0an(rt.h(t))&&Su(jy(null,'Too many parameters for directive "~C": ~D~:* ~[were~;was~:;were~] specified but only ~D~:* ~[are~;is~:;are~] allowed',z([Ft.h(t),an(n),an(rt.h(t))])),Rt(j(n))),Qc.h(Mn.i(function(r,u){var i=j(r);return i==null||Gn(bhn,i)||X.g(Rt(Rt(u)),cr(i))?null:Su(["Parameter ",Zn(j(u)),' has bad type in directive "',M.h(Ft.h(t)),'": ',M.h(cr(i))].join(""),Rt(r))},n,rt.h(t))),Nt.j(z([Dt.g(vn,df(function(){return function r(u){return new Mt(null,function(){for(;;){var i=E(u);if(i){if(re(i)){var s=Ht(i),a=an(s),o=ui(a);n:for(var h=0;;)if(hr?new v(null,2,5,y,[BN(l,e),new v(null,2,5,y,["",e+l.length],null)],null):r===0?Ktn(vt.g(l,1),e+1):new v(null,2,5,y,[BN(vt.i(l,0,r),e),new v(null,2,5,y,[vt.g(l,r),r+e],null)],null)},new v(null,2,5,y,[t,0],null))))}finally{e2=n}},Je=function(t,n){return aI(function(e,l){if(zY(l))return new v(null,2,5,y,[null,l],null);l=gI(rt.h(e),l);var r=m.i(l,0,null);l=m.i(l,1,null);var u=DY(r);return r=m.i(u,0,null),u=m.i(u,1,null),r=fn.i(r,Hu,l),new v(null,2,5,y,[null,dn.g(nh.h(e),new v(null,3,5,y,[r,l,u],null))],null)},n,t),null},JY=function(t){var n=j(t);return n=xx.h?xx.h(n):xx.call(null,n),x(x(n)?X.g(2,an(t)):n)?(Rn(Kn,n),Jl(Rt(t)),!0):null},KY=function(t){if(x(qr()))Rn(Kn,"#");else{var n=Ot,e=pt;Ot+=1,pt=0;try{$r("[","]");for(var l=0,r=E(t);;){if(Xn(Jt)||l":"~<(~;~@{~w~^ ~:_~}~;)~:>",O=typeof B=="string"?tl(B):B;return function(k,H,R){return function(){function _(nn){var tn=null;if(0>>0),ten=0,een=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};p=rl.prototype;p.dc="";p.set=function(t){this.dc=""+t};p.append=function(t,n,e){if(this.dc+=String(t),n!=null)for(let l=1;l":"_GT_"},ZY={_RBRACE_:"}",_COLON_:":",_BANG_:"!",_QMARK_:"?",_BSLASH_:"\\\\",_SLASH_:"/",_PERCENT_:"%",_PLUS_:"+",_SHARP_:"#",_LBRACE_:"{",_BAR_:"|",_LBRACK_:"[",_EQ_:"=",_:"-",_TILDE_:"~",_RBRACK_:"]",_GT_:">",_SINGLEQUOTE_:"'",_CIRCA_:"@",_AMPERSAND_:"&",_DOUBLEQUOTE_:'\\"',_CARET_:"^",_LT_:"<",_STAR_:"*"},Gj=null,Lh=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;r>>16&65535)*l+e*(n>>>16&65535)<<16>>>0)|0},Jj={},Kj=0;p=S.prototype;p.toString=function(){return this.Mb};p.T=function(t,n){return n instanceof S?this.Mb===n.Mb:!1};p.call=function(t){switch(arguments.length-1){case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.h=function(t){return cn.g?cn.g(t,this):cn.call(null,t,this)};p.g=function(t,n){return cn.i?cn.i(t,this,n):cn.call(null,t,this,n)};p.P=function(){return this.sb};p.W=function(t,n){return new S(this.eb,this.name,this.Mb,this.vc,n)};p.U=function(){var t=this.vc;return t??(this.vc=t=kP(this))};p.xc=function(){return this.name};p.yc=function(){return this.eb};p.M=function(t,n){return Rn(n,this.Mb)};var $n=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};$n.h=function(t){for(;;){if(t instanceof S)return t;if(typeof t=="string"){var n=t.indexOf("/");return 1>n?$n.g(null,t):$n.g(t.substring(0,n),t.substring(n+1,t.length))}if(t instanceof Lu)return t.Nb;if(t instanceof F)t=t.za;else throw Error("no conversion to symbol")}};$n.g=function(t,n){var e=t!=null?[M.h(t),"/",M.h(n)].join(""):n;return new S(t,n,e,null,null)};$n.l=2;p=Lu.prototype;p.toString=function(){return["#'",M.h(this.Nb)].join("")};p.gb=function(){return this.val.m?this.val.m():this.val.call(null)};p.P=function(){return this.sb};p.W=function(t,n){return new Lu(this.val,this.Nb,n)};p.T=function(t,n){return n instanceof Lu?(t=this.Nb,n=n.Nb,X.g?X.g(t,n):X.call(null,t,n)):!1};p.U=function(){return kP(this.Nb)};p.Md=On;p.call=function(t){switch(arguments.length-1){case 0:return this.m();case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);case 3:return this.i(arguments[1],arguments[2],arguments[3]);case 4:return this.u(arguments[1],arguments[2],arguments[3],arguments[4]);case 5:return this.F(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);case 6:return this.O(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);case 7:return this.pa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7]);case 8:return this.da(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8]);case 9:return this.qa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9]);case 10:return this.fa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10]);case 11:return this.ga(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11]);case 12:return this.ha(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12]);case 13:return this.ia(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13]);case 14:return this.ja(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14]);case 15:return this.ka(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15]);case 16:return this.la(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16]);case 17:return this.ma(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17]);case 18:return this.na(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18]);case 19:return this.oa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19]);case 20:return this.Pa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19],arguments[20]);case 21:return this.Rb(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19],arguments[20],arguments[21]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.m=function(){var t=this.val.m?this.val.m():this.val.call(null);return t.m?t.m():t.call(null)};p.h=function(t){var n=this.val.m?this.val.m():this.val.call(null);return n.h?n.h(t):n.call(null,t)};p.g=function(t,n){var e=this.val.m?this.val.m():this.val.call(null);return e.g?e.g(t,n):e.call(null,t,n)};p.i=function(t,n,e){var l=this.val.m?this.val.m():this.val.call(null);return l.i?l.i(t,n,e):l.call(null,t,n,e)};p.u=function(t,n,e,l){var r=this.val.m?this.val.m():this.val.call(null);return r.u?r.u(t,n,e,l):r.call(null,t,n,e,l)};p.F=function(t,n,e,l,r){var u=this.val.m?this.val.m():this.val.call(null);return u.F?u.F(t,n,e,l,r):u.call(null,t,n,e,l,r)};p.O=function(t,n,e,l,r,u){var i=this.val.m?this.val.m():this.val.call(null);return i.O?i.O(t,n,e,l,r,u):i.call(null,t,n,e,l,r,u)};p.pa=function(t,n,e,l,r,u,i){var s=this.val.m?this.val.m():this.val.call(null);return s.pa?s.pa(t,n,e,l,r,u,i):s.call(null,t,n,e,l,r,u,i)};p.da=function(t,n,e,l,r,u,i,s){var a=this.val.m?this.val.m():this.val.call(null);return a.da?a.da(t,n,e,l,r,u,i,s):a.call(null,t,n,e,l,r,u,i,s)};p.qa=function(t,n,e,l,r,u,i,s,a){var o=this.val.m?this.val.m():this.val.call(null);return o.qa?o.qa(t,n,e,l,r,u,i,s,a):o.call(null,t,n,e,l,r,u,i,s,a)};p.fa=function(t,n,e,l,r,u,i,s,a,o){var h=this.val.m?this.val.m():this.val.call(null);return h.fa?h.fa(t,n,e,l,r,u,i,s,a,o):h.call(null,t,n,e,l,r,u,i,s,a,o)};p.ga=function(t,n,e,l,r,u,i,s,a,o,h){var c=this.val.m?this.val.m():this.val.call(null);return c.ga?c.ga(t,n,e,l,r,u,i,s,a,o,h):c.call(null,t,n,e,l,r,u,i,s,a,o,h)};p.ha=function(t,n,e,l,r,u,i,s,a,o,h,c){var f=this.val.m?this.val.m():this.val.call(null);return f.ha?f.ha(t,n,e,l,r,u,i,s,a,o,h,c):f.call(null,t,n,e,l,r,u,i,s,a,o,h,c)};p.ia=function(t,n,e,l,r,u,i,s,a,o,h,c,f){var d=this.val.m?this.val.m():this.val.call(null);return d.ia?d.ia(t,n,e,l,r,u,i,s,a,o,h,c,f):d.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f)};p.ja=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d){var C=this.val.m?this.val.m():this.val.call(null);return C.ja?C.ja(t,n,e,l,r,u,i,s,a,o,h,c,f,d):C.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d)};p.ka=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C){var I=this.val.m?this.val.m():this.val.call(null);return I.ka?I.ka(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C):I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C)};p.la=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I){var T=this.val.m?this.val.m():this.val.call(null);return T.la?T.la(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I):T.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I)};p.ma=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T){var $=this.val.m?this.val.m():this.val.call(null);return $.ma?$.ma(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T):$.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T)};p.na=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$){var G=this.val.m?this.val.m():this.val.call(null);return G.na?G.na(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$):G.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$)};p.oa=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G){var b=this.val.m?this.val.m():this.val.call(null);return b.oa?b.oa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G):b.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G)};p.Pa=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b){var en=this.val.m?this.val.m():this.val.call(null);return en.Pa?en.Pa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b):en.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b)};p.Rb=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en){var ln=this.val.m?this.val.m():this.val.call(null);return dn.md?dn.md(ln,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en):dn.call(null,ln,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en)};var X=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;rt?0:t};p.Sb=function(){var t=this.X(null);return 0n)throw Error("Index out of bounds");n:for(;;){if(t==null)throw Error("Index out of bounds");if(n===0){if(E(t)){t=j(t);break n}throw Error("Index out of bounds")}if(CP(t)){t=nt(t,n);break n}if(E(t))t=A(t),--n;else throw Error("Index out of bounds")}return t}if(Qn($2,t))return nt(t,n);throw Error(["nth not supported on this type ",M.h(Fz(cr(t)))].join(""))};m.i=function(t,n,e){if(typeof n!="number")throw Error("Index argument to nth must be a number.");if(t==null)return e;if(t!=null&&(t.v&16||On===t.Od))return t.Qa(null,n,e);if(vu(t))return-1n?e:xb(t,n,e);if(Qn($2,t))return nt(t,n,e);throw Error(["nth not supported on this type ",M.h(Fz(cr(t)))].join(""))};m.l=3;var cn=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};cn.g=function(t,n){return t==null?null:t!=null&&(t.v&256||On===t.ye)?t.ta(null,n):vu(t)?n!=null&&nn};fc.j=function(t,n,e){for(;;)if(t>n)if(A(e))t=n,n=j(e),e=A(e);else return n>j(e);else return!1};fc.o=function(t){var n=j(t),e=A(t);return t=j(e),e=A(e),this.j(n,t,e)};fc.l=2;var gc=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;r=n};gc.j=function(t,n,e){for(;;)if(t>=n)if(A(e))t=n,n=j(e),e=A(e);else return n>=j(e);else return!1};gc.o=function(t){var n=j(t),e=A(t);return t=j(e),e=A(e),this.j(n,t,e)};gc.l=2;var Oo=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;rn?t:n};Oo.j=function(t,n,e){return En.i(Oo,t>n?t:n,e)};Oo.o=function(t){var n=j(t),e=A(t);return t=j(e),e=A(e),this.j(n,t,e)};Oo.l=2;var mc=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;rl:r))e[l]=n.next(),l+=1;else return al(new $f(e,0,l),t.h?t.h(n):t.call(null,n))}else return null},null,null)};$c.prototype.step=function(){if(this.ab!==vc)return!0;for(;;)if(this.ab===vc)if(this.buffer.Fc()){if(this.yd)return!1;if(this.Fd.ea()){if(this.Le)var t=dn.g(this.Fb,Dn(null,this.Fd.next()));else t=this.Fd.next(),t=this.Fb.g?this.Fb.g(null,t):this.Fb.call(null,null,t);ue(t)&&(this.Fb.h?this.Fb.h(null):this.Fb.call(null,null),this.yd=!0)}else this.Fb.h?this.Fb.h(null):this.Fb.call(null,null),this.yd=!0}else this.ab=this.buffer.remove();else return!0};$c.prototype.ea=function(){return this.step()};$c.prototype.next=function(){if(this.ea()){var t=this.ab;return this.ab=vc,t}throw Error("No such element")};$c.prototype.remove=function(){return Error("Unsupported operation")};$c.prototype[Te]=function(){return ie(this)};var L=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:for(var e=[],l=arguments.length,r=0;r>>e&31;return e===5?u.s[i]=r:(l=l.s[i],l!=null?(e-=5,n=t.u?t.u(n,e,l,r):t.call(null,n,e,l,r)):n=L5(null,e-5,r),u.s[i]=n),u},sen=function t(n,e,l,r,u){var i=F2(l);if(e===0)i.s[r&31]=u;else{var s=r>>>e&31;e-=5,l=l.s[s],n=t.F?t.F(n,e,l,r,u):t.call(null,n,e,l,r,u),i.s[s]=n}return i},oen=function t(n,e,l){var r=n.A-2>>>e&31;if(5=this.A)return new un(this.$a,0,null);n:for(var t=this.root,n=this.shift;;)if(0this.A-qc(this)){t=this.$a.length;for(var e=Array(t+1),l=0;l>>5>1<n?null:(t=this.start+n,tn||this.end<=this.start+n?xU(n,this.end-this.start):nt(this.Ua,this.start+n)};p.Qa=function(t,n,e){return 0>n||this.end<=this.start+n?e:nt(this.Ua,this.start+n,e)};p.wb=function(t,n,e){if(t=this.start+n,0>n||this.end+1<=t)throw Error(["Index ",M.h(n)," out of bounds [0,",M.h(this.X(null)),"]"].join(""));n=this.B,e=fn.i(this.Ua,t,e);var l=this.start,r=this.end;return t+=1,t=r>t?r:t,Si.F?Si.F(n,e,l,t,null):Si.call(null,n,e,l,t,null)};p.Wa=function(){return this.Ua!=null&&On===this.Ua.kd?kU(this.Ua,this.start,this.end):new Qp(this)};p.P=function(){return this.B};p.X=function(){return this.end-this.start};p.Tb=function(){return this.start===this.end?null:nt(this.Ua,this.end-1)};p.Ub=function(){if(this.start===this.end)throw Error("Can't pop empty vector");var t=this.B,n=this.Ua,e=this.start,l=this.end-1;return Si.F?Si.F(t,n,e,l,null):Si.call(null,t,n,e,l,null)};p.Sb=function(){return this.start!==this.end?new Uo(this,this.end-this.start-1,null):null};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return Re(Yn,this.B)};p.wa=function(t,n){return this.Ua!=null&&On===this.Ua.kd?NP(this.Ua,n,this.start,this.end):Lp(this,n)};p.xa=function(t,n,e){return this.Ua!=null&&On===this.Ua.kd?qP(this.Ua,n,e,this.start,this.end):P5(this,n,e)};p.Oa=function(t,n,e){if(typeof n=="number")return this.wb(null,n,e);throw Error("Subvec's key for assoc must be a number.")};p.fb=function(t,n){return iu(n)?0<=n&&n>>e&31;if(e===5)n=r;else{var i=l.s[u];i!=null?(e-=5,n=t.u?t.u(n,e,i,r):t.call(null,n,e,i,r)):n=L5(n.root.$,e-5,r)}return l.s[u]=n,l},hen=function t(n,e,l){l=Q1(n.root.$,l);var r=n.A-2>>>e&31;if(5this.A-qc(this))this.$a[this.A&31]=n;else{t=new vo(this.root.$,this.$a);var e=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];e[0]=n,this.$a=e,this.A>>>5>1<=qc(this))t=this.$a;else for(var n=this.root,e=n,l=this.shift;;)if(0>>l&31]),l-=5;else{t=e.s;break n}}n=hen(this,this.shift,this.root),n=n??new vo(this.root.$,[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]),5=t)return new P(this.B,this.A-1,e,null);X.g(n,this.s[l])||(e[r]=this.s[l],e[r+1]=this.s[l+1],r+=2),l+=2}}else return this};p.Oa=function(t,n,e){if(t=Lc(this.s,n),t===-1){if(this.An?4:2*(n+1));return ei(this.s,0,e,0,2*n),new xi(t,this.ba,e)};p.Tc=function(t,n,e,l,r){var u=1<<(e>>>n&31);if(!(this.ba&u))return this;var i=$a(this.ba&u-1),s=this.s[2*i],a=this.s[2*i+1];return s==null?(n=a.Tc(t,n+5,e,l,r),n===a?this:n!=null?tc(this,t,2*i+1,n):this.ba===u?null:aN(this,t,u,i)):Ri(l,s)?(r.val=!0,aN(this,t,u,i)):this};p.Rc=function(){return G1?G1(this.s):ow.call(null,this.s)};p.rc=function(t,n){return RU(this.s,t,n)};p.jc=function(t,n,e,l){var r=1<<(n>>>t&31);if(!(this.ba&r))return l;var u=$a(this.ba&r-1);return r=this.s[2*u],u=this.s[2*u+1],r==null?u.jc(t+5,n,e,l):Ri(e,r)?u:l};p.yb=function(t,n,e,l,r,u){var i=1<<(e>>>n&31),s=$a(this.ba&i-1);if(!(this.ba&i)){var a=$a(this.ba);if(2*a>>n&31]=Ao.yb(t,n+5,e,l,r,u),r=l=0;32>l;)this.ba>>>l&1&&(s[l]=this.s[r]!=null?Ao.yb(t,n+5,_l(this.s[r]),this.s[r],this.s[r+1],u):this.s[r+1],r+=2),l+=1;return new ec(t,a+1,s)}return n=Array(2*(a+4)),ei(this.s,0,n,0,2*s),n[2*s]=l,n[2*s+1]=r,ei(this.s,2*s,n,2*(s+1),2*(a-s)),u.val=!0,t=this.Xb(t),t.s=n,t.ba|=i,t}return a=this.s[2*s],i=this.s[2*s+1],a==null?(a=i.yb(t,n+5,e,l,r,u),a===i?this:tc(this,t,2*s+1,a)):Ri(l,a)?r===i?this:tc(this,t,2*s+1,r):(u.val=!0,u=n+5,l=Yk?Yk(t,u,a,i,e,l,r):IU.call(null,t,u,a,i,e,l,r),r=2*s,s=2*s+1,t=this.Xb(t),t.s[r]=null,t.s[s]=l,t)};p.xb=function(t,n,e,l,r){var u=1<<(n>>>t&31),i=$a(this.ba&u-1);if(!(this.ba&u)){var s=$a(this.ba);if(16<=s){for(i=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],i[n>>>t&31]=Ao.xb(t+5,n,e,l,r),l=e=0;32>e;)this.ba>>>e&1&&(i[e]=this.s[l]!=null?Ao.xb(t+5,_l(this.s[l]),this.s[l],this.s[l+1],r):this.s[l+1],l+=2),e+=1;return new ec(null,s+1,i)}return t=Array(2*(s+1)),ei(this.s,0,t,0,2*i),t[2*i]=e,t[2*i+1]=l,ei(this.s,2*i,t,2*(i+1),2*(s-i)),r.val=!0,new xi(null,this.ba|u,t)}var a=this.s[2*i];return u=this.s[2*i+1],a==null?(s=u.xb(t+5,n,e,l,r),s===u?this:new xi(null,this.ba,nc(this.s,2*i+1,s))):Ri(e,a)?l===u?this:new xi(null,this.ba,nc(this.s,2*i+1,l)):(r.val=!0,r=this.ba,s=this.s,t+=5,t=Uk?Uk(t,a,u,n,e,l):IU.call(null,t,a,u,n,e,l),e=2*i,i=2*i+1,l=Ae(s),l[e]=null,l[i]=t,new xi(null,r,l))};p.Qc=function(t,n,e,l){var r=1<<(n>>>t&31);if(!(this.ba&r))return l;var u=$a(this.ba&r-1);return r=this.s[2*u],u=this.s[2*u+1],r==null?u.Qc(t+5,n,e,l):Ri(e,r)?new Ln(r,u):l};p.Sc=function(t,n,e){var l=1<<(n>>>t&31);if(!(this.ba&l))return this;var r=$a(this.ba&l-1),u=this.s[2*r],i=this.s[2*r+1];return u==null?(t=i.Sc(t+5,n,e),t===i?this:t!=null?new xi(null,this.ba,nc(this.s,2*r+1,t)):this.ba===l?null:new xi(null,this.ba^l,zk(this.s,r))):Ri(e,u)?this.ba===l?null:new xi(null,this.ba^l,zk(this.s,r)):this};p.Wa=function(){return new rd(this.s)};var Ao=new xi(null,0,[]);z5.prototype.ea=function(){for(var t=this.s.length;;){if(this.Cb!=null&&this.Cb.ea())return!0;if(this.D>>n&31,i=this.s[u];return i==null?this:(n=i.Tc(t,n+5,e,l,r),n===i?this:n==null?8>=this.A?PU(this,t,u):(t=tc(this,t,u,n),--t.A,t):tc(this,t,u,n))};p.Rc=function(){return Qk?Qk(this.s):VP.call(null,this.s)};p.rc=function(t,n){for(var e=this.s.length,l=0;;)if(l>>t&31];return r!=null?r.jc(t+5,n,e,l):l};p.yb=function(t,n,e,l,r,u){var i=e>>>n&31,s=this.s[i];return s==null?(t=tc(this,t,i,Ao.yb(t,n+5,e,l,r,u)),t.A+=1,t):(n=s.yb(t,n+5,e,l,r,u),n===s?this:tc(this,t,i,n))};p.xb=function(t,n,e,l,r){var u=n>>>t&31,i=this.s[u];return i==null?new ec(null,this.A+1,nc(this.s,u,Ao.xb(t+5,n,e,l,r))):(t=i.xb(t+5,n,e,l,r),t===i?this:new ec(null,this.A,nc(this.s,u,t)))};p.Qc=function(t,n,e,l){var r=this.s[n>>>t&31];return r!=null?r.Qc(t+5,n,e,l):l};p.Sc=function(t,n,e){var l=n>>>t&31,r=this.s[l];return r!=null?(t=r.Sc(t+5,n,e),t===r?this:t==null?8>=this.A?PU(this,null,l):new ec(null,this.A-1,nc(this.s,l,t)):new ec(null,this.A,nc(this.s,l,t))):this};p.Wa=function(){return new z5(this.s)};p=lc.prototype;p.Xb=function(t){if(t===this.$)return this;var n=Array(2*(this.A+1));return ei(this.s,0,n,0,2*this.A),new lc(t,this.Wb,this.A,n)};p.Tc=function(t,n,e,l,r){return n=ud(this.s,this.A,l),n===-1?this:(r.val=!0,this.A===1?null:(t=this.Xb(t),r=t.s,r[n]=r[2*this.A-2],r[n+1]=r[2*this.A-1],r[2*this.A-1]=null,r[2*this.A-2]=null,--t.A,t))};p.Rc=function(){return G1?G1(this.s):ow.call(null,this.s)};p.rc=function(t,n){return RU(this.s,t,n)};p.jc=function(t,n,e,l){return t=ud(this.s,this.A,e),0>t?l:Ri(e,this.s[t])?this.s[t+1]:l};p.yb=function(t,n,e,l,r,u){return e===this.Wb?(n=ud(this.s,this.A,l),n===-1?this.s.length>2*this.A?(n=2*this.A,e=2*this.A+1,t=this.Xb(t),t.s[n]=l,t.s[e]=r,u.val=!0,t.A+=1,t):(e=this.s.length,n=Array(e+2),ei(this.s,0,n,0,e),n[e]=l,n[e+1]=r,u.val=!0,l=this.A+1,t===this.$?(this.s=n,this.A=l,t=this):t=new lc(this.$,this.Wb,l,n),t):this.s[n+1]===r?this:tc(this,t,n+1,r)):new xi(t,1<<(this.Wb>>>n&31),[null,this,null,null]).yb(t,n,e,l,r,u)};p.xb=function(t,n,e,l,r){return n===this.Wb?(t=ud(this.s,this.A,e),t===-1?(t=2*this.A,n=Array(t+2),ei(this.s,0,n,0,t),n[t]=e,n[t+1]=l,r.val=!0,new lc(null,this.Wb,this.A+1,n)):X.g(this.s[t+1],l)?this:new lc(null,this.Wb,this.A,nc(this.s,t+1,l))):new xi(null,1<<(this.Wb>>>t&31),[null,this]).xb(t,n,e,l,r)};p.Qc=function(t,n,e,l){return t=ud(this.s,this.A,e),0>t?l:Ri(e,this.s[t])?new Ln(this.s[t],this.s[t+1]):l};p.Sc=function(t,n,e){return t=ud(this.s,this.A,e),t===-1?this:this.A===1?null:new lc(null,this.Wb,this.A-1,zk(this.s,ri(t,2)))};p.Wa=function(){return new rd(this.s)};p=Ca.prototype;p.toString=function(){return Le(this)};p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.P=function(){return this.B};p.va=function(){if(this.R==null){var t=this.Db,n=this.D+2;return so?so(t,n,null):ow.call(null,t,n,null)}t=this.Db,n=this.D;var e=A(this.R);return so?so(t,n,e):ow.call(null,t,n,e)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return _u(n,this)};p.xa=function(t,n,e){return li(n,e,this)};p.ua=function(){return this.R==null?new Ln(this.Db[this.D],this.Db[this.D+1]):j(this.R)};p.ya=function(){var t=this,n=t.R==null?function(){var e=t.Db,l=t.D+2;return so?so(e,l,null):ow.call(null,e,l,null)}():function(){var e=t.Db,l=t.D,r=A(t.R);return so?so(e,l,r):ow.call(null,e,l,r)}();return n??At};p.S=function(){return this};p.W=function(t,n){return n===this.B?this:new Ca(n,this.Db,this.D,this.R,this.C)};p.Y=function(t,n){return Dn(n,this)};Ca.prototype[Te]=function(){return ie(this)};p=Nf.prototype;p.toString=function(){return Le(this)};p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.P=function(){return this.B};p.va=function(){var t=this.Db,n=this.D,e=A(this.R);return aw?aw(t,n,e):VP.call(null,t,n,e)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return _u(n,this)};p.xa=function(t,n,e){return li(n,e,this)};p.ua=function(){return j(this.R)};p.ya=function(){var t=this.Db,n=this.D,e=A(this.R);return t=aw?aw(t,n,e):VP.call(null,t,n,e),t??At};p.S=function(){return this};p.W=function(t,n){return n===this.B?this:new Nf(n,this.Db,this.D,this.R,this.C)};p.Y=function(t,n){return Dn(n,this)};Nf.prototype[Te]=function(){return ie(this)};U5.prototype.ea=function(){return!this.Ed||this.ie.ea()};U5.prototype.next=function(){return this.Ed?this.ie.next():(this.Ed=!0,new Ln(null,this.Ya))};U5.prototype.remove=function(){return Error("Unsupported operation")};p=Ps.prototype;p.hc=On;p.Qb=function(t,n){return n==null?this.Xa?new Ln(null,this.Ya):null:this.root==null?null:this.root.Qc(0,_l(n),n,null)};p.toString=function(){return Le(this)};p.keys=function(){return ie(xe.h?xe.h(this):xe.call(null,this))};p.entries=function(){return new V5(E(E(this)))};p.values=function(){return ie(ir.h?ir.h(this):ir.call(null,this))};p.has=function(t){return Gn(this,t)};p.get=function(t,n){return this.N(null,t,n)};p.forEach=function(t){for(var n=E(this),e=null,l=0,r=0;;)if(rthis.A?an(A(this))+1:this.A};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return _u(n,this)};p.xa=function(t,n,e){return li(n,e,this)};p.ua=function(){return B2(this.stack)};p.ya=function(){var t=j(this.stack);return t=zP(this.lc?t.right:t.left,A(this.stack),this.lc),t!=null?new jo(null,t,this.lc,this.A-1,null):At};p.S=function(){return this};p.W=function(t,n){return n===this.B?this:new jo(n,this.stack,this.lc,this.A,this.C)};p.Y=function(t,n){return Dn(n,this)};jo.prototype[Te]=function(){return ie(this)};var jI=function t(n,e,l){var r=n.left!=null?function(){var s=n.left;return t.i?t.i(s,e,l):t.call(null,s,e,l)}():l;if(ue(r))return r;var u=function(){var s=n.key,a=n.val;return e.i?e.i(r,s,a):e.call(null,r,s,a)}();if(ue(u))return u;if(n.right!=null){var i=n.right;return t.i?t.i(i,e,u):t.call(null,i,e,u)}return u};p=te.prototype;p.hc=On;p.Qb=function(t,n){switch(n){case 0:return new Ln(0,this.key);case 1:return new Ln(1,this.val);default:return null}};p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.Hd=function(t){return t.Kd(this)};p.Xc=function(){return new _t(this.key,this.val,this.left,this.right)};p.Ob=function(){return this};p.Gd=function(t){return t.Jd(this)};p.replace=function(t,n,e,l){return new te(t,n,e,l)};p.Jd=function(t){return new te(t.key,t.val,this,t.right)};p.Kd=function(t){return new te(t.key,t.val,t.left,this)};p.rc=function(t,n){return jI(this,t,n)};p.ta=function(t,n){return this.Qa(null,n,null)};p.N=function(t,n,e){return this.Qa(null,n,e)};p.V=function(t,n){if(n===0)return this.key;if(n===1)return this.val;throw Error("Index out of bounds")};p.Qa=function(t,n,e){return n===0?this.key:n===1?this.val:e};p.wb=function(t,n,e){return new v(null,2,5,y,[this.key,this.val],null).wb(null,n,e)};p.P=function(){return null};p.X=function(){return 2};p.nd=function(){return this.key};p.od=function(){return this.val};p.Tb=function(){return this.val};p.Ub=function(){return new v(null,1,5,y,[this.key],null)};p.Sb=function(){return new un([this.val,this.key],0,null)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return null};p.wa=function(t,n){return Lp(this,n)};p.xa=function(t,n,e){return P5(this,n,e)};p.Oa=function(t,n,e){return fn.i(new v(null,2,5,y,[this.key,this.val],null),n,e)};p.fb=function(t,n){return n===0||n===1};p.S=function(){return new un([this.key,this.val],0,null)};p.W=function(t,n){return Re(new v(null,2,5,y,[this.key,this.val],null),n)};p.Y=function(t,n){return new v(null,3,5,y,[this.key,this.val,n],null)};p.call=function(t){switch(arguments.length-1){case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.h=function(t){return this.V(null,t)};p.g=function(t,n){return this.Qa(null,t,n)};te.prototype[Te]=function(){return ie(this)};p=_t.prototype;p.hc=On;p.Qb=function(t,n){switch(n){case 0:return new Ln(0,this.key);case 1:return new Ln(1,this.val);default:return null}};p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.Hd=function(t){return new _t(this.key,this.val,this.left,t)};p.Xc=function(){throw Error("red-black tree invariant violation")};p.Ob=function(){return new te(this.key,this.val,this.left,this.right)};p.Gd=function(t){return new _t(this.key,this.val,t,this.right)};p.replace=function(t,n,e,l){return new _t(t,n,e,l)};p.Jd=function(t){return this.left instanceof _t?new _t(this.key,this.val,this.left.Ob(),new te(t.key,t.val,this.right,t.right)):this.right instanceof _t?new _t(this.right.key,this.right.val,new te(this.key,this.val,this.left,this.right.left),new te(t.key,t.val,this.right.right,t.right)):new te(t.key,t.val,this,t.right)};p.Kd=function(t){return this.right instanceof _t?new _t(this.key,this.val,new te(t.key,t.val,t.left,this.left),this.right.Ob()):this.left instanceof _t?new _t(this.left.key,this.left.val,new te(t.key,t.val,t.left,this.left.left),new te(this.key,this.val,this.left.right,this.right)):new te(t.key,t.val,t.left,this)};p.rc=function(t,n){return jI(this,t,n)};p.ta=function(t,n){return this.Qa(null,n,null)};p.N=function(t,n,e){return this.Qa(null,n,e)};p.V=function(t,n){if(n===0)return this.key;if(n===1)return this.val;throw Error("Index out of bounds")};p.Qa=function(t,n,e){return n===0?this.key:n===1?this.val:e};p.wb=function(t,n,e){return new v(null,2,5,y,[this.key,this.val],null).wb(null,n,e)};p.P=function(){return null};p.X=function(){return 2};p.nd=function(){return this.key};p.od=function(){return this.val};p.Tb=function(){return this.val};p.Ub=function(){return new v(null,1,5,y,[this.key],null)};p.Sb=function(){return new un([this.val,this.key],0,null)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return null};p.wa=function(t,n){return Lp(this,n)};p.xa=function(t,n,e){return P5(this,n,e)};p.Oa=function(t,n,e){return fn.i(new v(null,2,5,y,[this.key,this.val],null),n,e)};p.fb=function(t,n){return n===0||n===1};p.S=function(){return new un([this.key,this.val],0,null)};p.W=function(t,n){return Re(new v(null,2,5,y,[this.key,this.val],null),n)};p.Y=function(t,n){return new v(null,3,5,y,[this.key,this.val,n],null)};p.call=function(t){switch(arguments.length-1){case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.h=function(t){return this.V(null,t)};p.g=function(t,n){return this.Qa(null,t,n)};_t.prototype[Te]=function(){return ie(this)};var cen=function t(n,e,l,r,u){if(e==null)return new _t(l,r,null,null);var i=function(){var s=e.key;return n.g?n.g(l,s):n.call(null,l,s)}();return i===0?(u[0]=e,null):0>i?(i=function(){var s=e.left;return t.F?t.F(n,s,l,r,u):t.call(null,n,s,l,r,u)}(),i!=null?e.Gd(i):null):(i=function(){var s=e.right;return t.F?t.F(n,s,l,r,u):t.call(null,n,s,l,r,u)}(),i!=null?e.Hd(i):null)},fen=function t(n,e){if(n==null)return e;if(e==null)return n;if(n instanceof _t){if(e instanceof _t){var l=function(){var r=n.right,u=e.left;return t.g?t.g(r,u):t.call(null,r,u)}();return l instanceof _t?new _t(l.key,l.val,new _t(n.key,n.val,n.left,l.left),new _t(e.key,e.val,l.right,e.right)):new _t(n.key,n.val,n.left,new _t(e.key,e.val,l,e.right))}return new _t(n.key,n.val,n.left,function(){var r=n.right;return t.g?t.g(r,e):t.call(null,r,e)}())}return e instanceof _t?new _t(e.key,e.val,function(){var r=e.left;return t.g?t.g(n,r):t.call(null,n,r)}(),e.right):(l=function(){var r=n.right,u=e.left;return t.g?t.g(r,u):t.call(null,r,u)}(),l instanceof _t?new _t(l.key,l.val,new te(n.key,n.val,n.left,l.left),new te(e.key,e.val,l.right,e.right)):TU(n.key,n.val,n.left,new te(e.key,e.val,l,e.right)))},gen=function t(n,e,l,r){if(e!=null){var u=function(){var i=e.key;return n.g?n.g(l,i):n.call(null,l,i)}();return u===0?(r[0]=e,fen(e.left,e.right)):0>u?(u=function(){var i=e.left;return t.u?t.u(n,i,l,r):t.call(null,n,i,l,r)}(),u!=null||r[0]!=null?e.left instanceof te?TU(e.key,e.val,u,e.right):new _t(e.key,e.val,u,e.right):null):(u=function(){var i=e.right;return t.u?t.u(n,i,l,r):t.call(null,n,i,l,r)}(),u!=null||r[0]!=null?e.right instanceof te?Eb(e.key,e.val,e.left,u):new _t(e.key,e.val,e.left,u):null)}return null},men=function t(n,e,l,r){var u=e.key,i=n.g?n.g(l,u):n.call(null,l,u);return i===0?e.replace(u,r,e.left,e.right):0>i?e.replace(u,e.val,function(){var s=e.left;return t.u?t.u(n,s,l,r):t.call(null,n,s,l,r)}(),e.right):e.replace(u,e.val,e.left,function(){var s=e.right;return t.u?t.u(n,s,l,r):t.call(null,n,s,l,r)}())};p=is.prototype;p.hc=On;p.Qb=function(t,n){return Y5(this,n)};p.forEach=function(t){for(var n=E(this),e=null,l=0,r=0;;)if(rr?(t=In.g(t,l),l=l.left):l=l.right:0(t.h?t.h(e):t.call(null,e))?n:e};Ea.j=function(t,n,e,l){return En.i(function(r,u){return Ea.i(t,r,u)},Ea.i(t,n,e),l)};Ea.o=function(t){var n=j(t),e=A(t);t=j(e);var l=A(e);return e=j(l),l=A(l),this.j(n,t,e,l)};Ea.l=3;var zh=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:for(var e=[],l=arguments.length,r=0;r=this.count)throw Error("-drop-first of empty chunk");return new H2(this.start+this.step,this.step,this.count-1)};G5.prototype.ea=function(){return 0this.end};G5.prototype.next=function(){var t=this.D;return this.D+=this.step,t};p=xo.prototype;p.toString=function(){return Le(this)};p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.Pc=function(){if(this.Va==null){var t=this.X(null);32this.end&&this.step===0)return this.start;throw Error("Index out of bounds")};p.Qa=function(t,n,e){return 0<=n&&nthis.end&&this.step===0?this.start:e};p.Wa=function(){return new G5(this.start,this.end,this.step)};p.P=function(){return this.B};p.va=function(){return 0this.end?new xo(null,this.start+this.step,this.end,this.step,null,null,null):null};p.X=function(){return Math.ceil((this.end-this.start)/this.step)};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return Lp(this,n)};p.xa=function(t,n,e){for(t=this.start;;)if(0this.end){if(e=n.g?n.g(e,t):n.call(null,e,t),ue(e))return J(e);t+=this.step}else return e};p.ua=function(){return this.start};p.ya=function(){var t=this.va(null);return t??At};p.S=function(){return this};p.Lc=function(){return this.Pc(),this.Va};p.ec=function(){return this.Pc(),this.Pb==null?At:this.Pb};p.W=function(t,n){return n===this.B?this:new xo(n,this.start,this.end,this.step,this.Va,this.Pb,this.C)};p.Y=function(t,n){return Dn(n,this)};p.Kc=function(){return E(this.ec(null))};xo.prototype[Te]=function(){return ie(this)};p=ko.prototype;p.toString=function(){return Le(this)};p.indexOf=function(){var t=null;return t=function(n,e){switch(arguments.length){case 1:return Vn(this,n,0);case 2:return Vn(this,n,e)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Vn(this,n,0)},t.g=function(n,e){return Vn(this,n,e)},t}();p.lastIndexOf=function(){function t(e){return bn(this,e,an(this))}var n=null;return n=function(e,l){switch(arguments.length){case 1:return t.call(this,e);case 2:return bn(this,e,l)}throw Error("Invalid arity: "+arguments.length)},n.h=t,n.g=function(e,l){return bn(this,e,l)},n}();p.Pc=function(){if(this.Va==null){var t=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];n:for(var n=0,e=this.start;;)if(32>n){if(t[n]=e,n+=1,e+=this.step,!(0this.end)){n=this.Va=new $f(t,0,n);break n}}else{n=e;break n}this.Va==null&&(this.Va=new $f(t,0,32),(0this.end)&&(this.Pb=new ko(null,n,this.end,this.step,null,null,null)))}};p.Wa=function(){return new G5(this.start,this.end,this.step)};p.P=function(){return this.B};p.va=function(){return 0this.end?new ko(null,this.start+this.step,this.end,this.step,null,null,null):null};p.U=function(){var t=this.C;return t??(this.C=t=Tl(this))};p.T=function(t,n){return Fe(this,n)};p.ca=function(){return At};p.wa=function(t,n){return _u(n,this)};p.xa=function(t,n,e){for(t=this.start;;)if(0this.end){if(e=n.g?n.g(e,t):n.call(null,e,t),ue(e))return J(e);t+=this.step}else return e};p.ua=function(){return this.start};p.ya=function(){var t=this.va(null);return t??At};p.S=function(){return this};p.Lc=function(){return this.Pc(),this.Va};p.ec=function(){return this.Pc(),this.Pb==null?At:this.Pb};p.W=function(t,n){return n===this.B?this:new ko(n,this.start,this.end,this.step,this.Va,this.Pb,this.C)};p.Y=function(t,n){return Dn(n,this)};p.Kc=function(){return E(this.ec(null))};ko.prototype[Te]=function(){return ie(this)};var Nu=function t(n){switch(arguments.length){case 0:return t.m();case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Nu.m=function(){return Nu.i(0,Number.MAX_VALUE,1)};Nu.h=function(t){return Nu.i(0,t,1)};Nu.g=function(t,n){return Nu.i(t,n,1)};Nu.i=function(t,n,e){return 0e?n>=t?At:iu(t)&&iu(n)&&iu(e)?new xo(null,t,n,e,null,null,null):new ko(null,t,n,e,null,null,null):n===t?At:ge.h(t)};Nu.l=3;var nu=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};nu.h=function(t){return function(n){var e=Ye(-1);return function(){function l(s,a){var o=e.Ib(null,e.gb(null)+1);return Ji(o,t)===0?n.g?n.g(s,a):n.call(null,s,a):s}function r(s){return n.h?n.h(s):n.call(null,s)}function u(){return n.m?n.m():n.call(null)}var i=null;return i=function(s,a){switch(arguments.length){case 0:return u.call(this);case 1:return r.call(this,s);case 2:return l.call(this,s,a)}throw Error("Invalid arity: "+arguments.length)},i.m=u,i.h=r,i.g=l,i}()}};nu.g=function(t,n){return new Mt(null,function(){var e=E(n);return e?Dn(j(e),nu.g(t,il.g(t,e))):null},null,null)};nu.l=2;var np=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};np.h=function(t){return function(n){var e=new id,l=Ye(V8);return function(){function r(a,o){var h=J(l),c=t.h?t.h(o):t.call(null,o);return Il(l,c),on(h,V8)||X.g(c,h)?(e.add(o),a):(h=_n(e.s),e.clear(),a=n.g?n.g(a,h):n.call(null,a,h),ue(a)||e.add(o),a)}function u(a){if(!x(e.Fc())){var o=_n(e.s);e.clear(),a=qp(n.g?n.g(a,o):n.call(null,a,o))}return n.h?n.h(a):n.call(null,a)}function i(){return n.m?n.m():n.call(null)}var s=null;return s=function(a,o){switch(arguments.length){case 0:return i.call(this);case 1:return u.call(this,a);case 2:return r.call(this,a,o)}throw Error("Invalid arity: "+arguments.length)},s.m=i,s.h=u,s.g=r,s}()}};np.g=function(t,n){return new Mt(null,function(){var e=E(n);if(e){var l=j(e),r=t.h?t.h(l):t.call(null,l),u=Dn(l,$u.g(function(i){return X.g(r,t.h?t.h(i):t.call(null,i))},A(e)));return Dn(u,np.g(t,new Mt(null,function(){return il.g(an(u),e)},null,null)))}return null},null,null)};np.l=2;var yf=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};yf.g=function(t,n){return new Mt(null,function(){var e=E(n);return e?yf.i(t,j(e),rn(e)):new g(null,t.m?t.m():t.call(null),null,1,null)},null,null)};yf.i=function(t,n,e){return ue(n)?new g(null,J(n),null,1,null):Dn(n,new Mt(null,function(){var l=E(e);if(l){var r=yf.i,u=j(l);u=t.g?t.g(n,u):t.call(null,n,u),l=r.call(yf,t,u,rn(l))}else l=null;return l},null,null))};yf.l=3;var Xa=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:for(var e=[],l=arguments.length,r=0;ri?1:i),i<=e.length?(i=vt.g(e,i),t.g?t.g(n,i):t.call(null,n,i)):null},null,null))},pen={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},Us=function t(n){for(var e=[],l=arguments.length,r=0;r ",M.h(d)," and ",M.h(j(c)),", and neither is preferred"].join(""));return c}return c},null,J(r)),h=function(){var c;return(c=o==null)&&(c=J(r),c=c.h?c.h(a):c.call(null,a)),x(c)?new v(null,2,5,y,[a,c],null):o}();return x(h)?X.g(J(s),J(l))?(ut.u(i,fn,e,Rt(h)),Rt(h)):(n0(i,r,s,l),t.da?t.da(n,e,l,r,u,i,s,a):t.call(null,n,e,l,r,u,i,s,a)):null};p=qi.prototype;p.call=function(t){switch(arguments.length-1){case 0:return this.m();case 1:return this.h(arguments[1]);case 2:return this.g(arguments[1],arguments[2]);case 3:return this.i(arguments[1],arguments[2],arguments[3]);case 4:return this.u(arguments[1],arguments[2],arguments[3],arguments[4]);case 5:return this.F(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);case 6:return this.O(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);case 7:return this.pa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7]);case 8:return this.da(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8]);case 9:return this.qa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9]);case 10:return this.fa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10]);case 11:return this.ga(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11]);case 12:return this.ha(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12]);case 13:return this.ia(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13]);case 14:return this.ja(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14]);case 15:return this.ka(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15]);case 16:return this.la(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16]);case 17:return this.ma(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17]);case 18:return this.na(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18]);case 19:return this.oa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19]);case 20:return this.Pa(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19],arguments[20]);case 21:return this.Rb(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7],arguments[8],arguments[9],arguments[10],arguments[11],arguments[12],arguments[13],arguments[14],arguments[15],arguments[16],arguments[17],arguments[18],arguments[19],arguments[20],arguments[21]);default:throw Error(["Invalid arity: ",M.h(arguments.length-1)].join(""))}};p.apply=function(t,n){return this.call.apply(this,[this].concat(Ae(n)))};p.m=function(){var t=this.I.m?this.I.m():this.I.call(null),n=this.Ra(null,t);return x(n)||Vl(this.name,t),n.m?n.m():n.call(null)};p.h=function(t){var n=this.I.h?this.I.h(t):this.I.call(null,t),e=this.Ra(null,n);return x(e)||Vl(this.name,n),e.h?e.h(t):e.call(null,t)};p.g=function(t,n){var e=this.I.g?this.I.g(t,n):this.I.call(null,t,n),l=this.Ra(null,e);return x(l)||Vl(this.name,e),l.g?l.g(t,n):l.call(null,t,n)};p.i=function(t,n,e){var l=this.I.i?this.I.i(t,n,e):this.I.call(null,t,n,e),r=this.Ra(null,l);return x(r)||Vl(this.name,l),r.i?r.i(t,n,e):r.call(null,t,n,e)};p.u=function(t,n,e,l){var r=this.I.u?this.I.u(t,n,e,l):this.I.call(null,t,n,e,l),u=this.Ra(null,r);return x(u)||Vl(this.name,r),u.u?u.u(t,n,e,l):u.call(null,t,n,e,l)};p.F=function(t,n,e,l,r){var u=this.I.F?this.I.F(t,n,e,l,r):this.I.call(null,t,n,e,l,r),i=this.Ra(null,u);return x(i)||Vl(this.name,u),i.F?i.F(t,n,e,l,r):i.call(null,t,n,e,l,r)};p.O=function(t,n,e,l,r,u){var i=this.I.O?this.I.O(t,n,e,l,r,u):this.I.call(null,t,n,e,l,r,u),s=this.Ra(null,i);return x(s)||Vl(this.name,i),s.O?s.O(t,n,e,l,r,u):s.call(null,t,n,e,l,r,u)};p.pa=function(t,n,e,l,r,u,i){var s=this.I.pa?this.I.pa(t,n,e,l,r,u,i):this.I.call(null,t,n,e,l,r,u,i),a=this.Ra(null,s);return x(a)||Vl(this.name,s),a.pa?a.pa(t,n,e,l,r,u,i):a.call(null,t,n,e,l,r,u,i)};p.da=function(t,n,e,l,r,u,i,s){var a=this.I.da?this.I.da(t,n,e,l,r,u,i,s):this.I.call(null,t,n,e,l,r,u,i,s),o=this.Ra(null,a);return x(o)||Vl(this.name,a),o.da?o.da(t,n,e,l,r,u,i,s):o.call(null,t,n,e,l,r,u,i,s)};p.qa=function(t,n,e,l,r,u,i,s,a){var o=this.I.qa?this.I.qa(t,n,e,l,r,u,i,s,a):this.I.call(null,t,n,e,l,r,u,i,s,a),h=this.Ra(null,o);return x(h)||Vl(this.name,o),h.qa?h.qa(t,n,e,l,r,u,i,s,a):h.call(null,t,n,e,l,r,u,i,s,a)};p.fa=function(t,n,e,l,r,u,i,s,a,o){var h=this.I.fa?this.I.fa(t,n,e,l,r,u,i,s,a,o):this.I.call(null,t,n,e,l,r,u,i,s,a,o),c=this.Ra(null,h);return x(c)||Vl(this.name,h),c.fa?c.fa(t,n,e,l,r,u,i,s,a,o):c.call(null,t,n,e,l,r,u,i,s,a,o)};p.ga=function(t,n,e,l,r,u,i,s,a,o,h){var c=this.I.ga?this.I.ga(t,n,e,l,r,u,i,s,a,o,h):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h),f=this.Ra(null,c);return x(f)||Vl(this.name,c),f.ga?f.ga(t,n,e,l,r,u,i,s,a,o,h):f.call(null,t,n,e,l,r,u,i,s,a,o,h)};p.ha=function(t,n,e,l,r,u,i,s,a,o,h,c){var f=this.I.ha?this.I.ha(t,n,e,l,r,u,i,s,a,o,h,c):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c),d=this.Ra(null,f);return x(d)||Vl(this.name,f),d.ha?d.ha(t,n,e,l,r,u,i,s,a,o,h,c):d.call(null,t,n,e,l,r,u,i,s,a,o,h,c)};p.ia=function(t,n,e,l,r,u,i,s,a,o,h,c,f){var d=this.I.ia?this.I.ia(t,n,e,l,r,u,i,s,a,o,h,c,f):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f),C=this.Ra(null,d);return x(C)||Vl(this.name,d),C.ia?C.ia(t,n,e,l,r,u,i,s,a,o,h,c,f):C.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f)};p.ja=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d){var C=this.I.ja?this.I.ja(t,n,e,l,r,u,i,s,a,o,h,c,f,d):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d),I=this.Ra(null,C);return x(I)||Vl(this.name,C),I.ja?I.ja(t,n,e,l,r,u,i,s,a,o,h,c,f,d):I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d)};p.ka=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C){var I=this.I.ka?this.I.ka(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C),T=this.Ra(null,I);return x(T)||Vl(this.name,I),T.ka?T.ka(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C):T.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C)};p.la=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I){var T=this.I.la?this.I.la(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I),$=this.Ra(null,T);return x($)||Vl(this.name,T),$.la?$.la(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I):$.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I)};p.ma=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T){var $=this.I.ma?this.I.ma(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T),G=this.Ra(null,$);return x(G)||Vl(this.name,$),G.ma?G.ma(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T):G.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T)};p.na=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$){var G=this.I.na?this.I.na(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$),b=this.Ra(null,G);return x(b)||Vl(this.name,G),b.na?b.na(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$):b.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$)};p.oa=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G){var b=this.I.oa?this.I.oa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G),en=this.Ra(null,b);return x(en)||Vl(this.name,b),en.oa?en.oa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G):en.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G)};p.Pa=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b){var en=this.I.Pa?this.I.Pa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b):this.I.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b),ln=this.Ra(null,en);return x(ln)||Vl(this.name,en),ln.Pa?ln.Pa(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b):ln.call(null,t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b)};p.Rb=function(t,n,e,l,r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en){var ln=dn.j(this.I,t,n,e,l,z([r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en])),B=this.Ra(null,ln);return x(B)||Vl(this.name,ln),dn.j(B,t,n,e,l,z([r,u,i,s,a,o,h,c,f,d,C,I,T,$,G,b,en]))};p.Qd=function(t,n,e){if(x(uQ(e,n,this.Vc)))throw Error(["Preference conflict in multimethod '",M.h(this.name),"': ",M.h(e)," is already preferred to ",M.h(n)].join(""));return ut.g(this.Vc,function(l){return fn.i(l,n,In.g(cn.i(l,n,Ke),e))}),n0(this.sc,this.Zb,this.nc,this.Ec)};p.Sd=function(t,n){return ut.i(this.Zb,Ct,n),n0(this.sc,this.Zb,this.nc,this.Ec),this};p.Pd=function(){return J(this.Zb)};p.Rd=function(){return J(this.Vc)};p.Sa=function(t,n,e){return ut.u(this.Zb,fn,n,e),n0(this.sc,this.Zb,this.nc,this.Ec),this};p.Td=function(){return ut.g(this.Zb,function(){return vn}),ut.g(this.sc,function(){return vn}),ut.g(this.Vc,function(){return vn}),ut.g(this.nc,function(){return null}),this};p.Ra=function(t,n){return X.g(J(this.nc),J(this.Ec))||n0(this.sc,this.Zb,this.nc,this.Ec),t=J(this.sc),t=t.h?t.h(n):t.call(null,n),x(t)?t:yen(this.name,n,this.Ec,this.Zb,this.Vc,this.sc,this.nc,this.Ie)};p.xc=function(){return Mk(this.name)};p.yc=function(){return $k(this.name)};p.U=function(){return A5(this)};p=t0.prototype;p.Zd=On;p.toString=function(){return this.uc};p.T=function(t,n){return(t=n!=null?On===n.Zd:!1)?this.uc===n.uc:t};p.M=function(t,n){return Rn(n,['#uuid "',M.h(this.uc),'"'].join(""))};p.U=function(){return this.C==null&&(this.C=_l(this.uc)),this.C};p.Gb=function(t,n){if(n instanceof t0)return ns(this.uc,n.uc);throw Error(["Cannot compare ",M.h(this)," to ",M.h(n)].join(""))};Go.prototype.__proto__=Error.prototype;Go.prototype.Z=On;Go.prototype.M=function(t,n,e){return Rn(n,"#error {:message "),ot(this.message,n,e),x(this.data)&&(Rn(n,", :data "),ot(this.data,n,e)),x(this.cause)&&(Rn(n,", :cause "),ot(this.cause,n,e)),Rn(n,"}")};Go.prototype.toString=function(){return Le(this)};var Ur=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Ur.g=function(t,n){return Ur.i(t,n,null)};Ur.i=function(t,n,e){return new Go(t,n,e)};Ur.l=3;p=ly.prototype;p.toString=function(){return Le(this)};p.T=function(t,n){return n instanceof ly&&X.g(this.tag,n.tag)&&X.g(this.form,n.form)};p.U=function(){return 31*_l(this.tag)+_l(this.form)};p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"tag":return this.tag;case"form":return this.form;default:return e}};p.M=function(t,n,e){return Rn(n,["#",M.h(this.tag)," "].join("")),ot(this.form,n,e)};var jen="arguments abstract await boolean break byte case catch char class const continue debugger default delete do double else enum export extends final finally float for function goto if implements import in instanceof int interface let long native new package private protected public return short static super switch synchronized this throw throws transient try typeof var void volatile while with yield methods null constructor".split(" "),Fj=null;typeof console<"u"&&Kz();Kz();var iQ=new F(null,"nil","nil",99600501),xen=new S(null,"message","message",1234475525,null),g8=new S(null,"extend-protocol","extend-protocol",306378578,null),m8=new S(null,"assoc-in","assoc-in",-113585743,null),w8=new S(null,"ns-aliases","ns-aliases",-1364180948,null),d8=new S(null,"ident?","ident?",-2061359468,null),Jv=new F(null,"reader-exception","reader-exception",-1938323098),p8=new S(null,"*1","*1",2110258092,null),v8=new S(null,"*2","*2",1728229926,null),xl=new F(null,"trailing-white-space","trailing-white-space",1496006996),y8=new S(null,"*3","*3",105062009,null),HN=new S(null,"kvs","kvs",-1695980277,null),j8=new S(null,"filterv","filterv",1977739179,null),ZN=new S(null,"from","from",-839142725,null),Ff=new F(null,"relative-to","relative-to",-470100051),sQ=new S(null,"*reader-resolver*","*reader-resolver*",309718590,null),Ha=new F(null,"intra-block-nl","intra-block-nl",1808826875),x8=new F(null,"exponentchar","exponentchar",1986664222),fl=new F(null,"row","row",-570139521),k8=new S(null,"*e","*e",329170866,null),lp=new F(null,"load-fn","load-fn",-2121144334),S8=new S(null,"hash-map","hash-map",-439030950,null),O8=new S(null,"vary-meta","vary-meta",-1580067831,null),ken=new S(null,"pad","pad",1603796986,null),oQ=new F(null,"dotted-access","dotted-access",114961112),bN=new S(null,"apropos","apropos",-1511857537,null),Sen=new S(null,"Error","Error",-1692662047,null),C8=new S(null,"ns-refers","ns-refers",-2030918515,null),nq=new F(null,"reify-fn","reify-fn",-1360983316),Oen=new S("cljs.core","ex-cause","cljs.core/ex-cause",1843478517,null),tq=new S(null,"start-key","start-key",790225477,null),A8=new S(null,"not-any?","not-any?",-2114707554,null),E8=new S(null,"apply","apply",-1334050276,null),ov=new S(null,"default__25377__auto__","default__25377__auto__",-1831844738,null),ky=new S(null,"when-let","when-let",-1383043480,null),dd=new S(null,"cljs.core","cljs.core",770546058,null),Bg=new S(null,"start","start",1285322546,null),Ew=new F(null,"miser","miser",-556060186),R8=new S(null,"->>","->>",-1874332161,null),P8=new S(null,"ifn?","ifn?",-2106461064,null),I8=new S(null,"->Eduction","->Eduction",-188511967,null),eq=new S(null,"farg__25378__auto__","farg__25378__auto__",-541063853,null),aQ=new F(null,"fn-name","fn-name",-766594004),_8=new S(null,"merge","merge",-163787882,null),Ra=new F(null,"current","current",-1088038603),T8=new S(null,"qualified-symbol?","qualified-symbol?",98763807,null),hQ=new S(null,"ns-obj","ns-obj",-635821906,null),Cen=new S(null,"xform*","xform*",264470622,null),D8=new S(null,"letfn","letfn",-480490827,null),rp=new F(null,"js-libs","js-libs",-502933721),cQ=new S(null,"psym","psym",752521989,null),Sy=new S(null,"->","->",-2139605430,null),Aen=new S(null,"Inf","Inf",647172781,null),Oy=new F(null,"all","all",892129742),ss=new F(null,"class","class",-2030961996),M8=new S(null,"nil?","nil?",1612038930,null),$8=new S(null,"uri?","uri?",2029475116,null),N8=new S(null,"cat","cat",182721320,null),up=new S(null,"..","..",-300507420,null),Een=new S(null,"children","children",699969545,null),Ren=new S(null,"read-char*","read-char*",1494526523,null),Gt=new F(null,"default","default",-1987822328),q8=new S(null,"object-array","object-array",206434647,null),L8=new S(null,"nnext","nnext",-2065435598,null),fQ=new S("cljs.core","chunk-first","cljs.core/chunk-first",-1157877305,null),Pen=new F(null,"ex-kind","ex-kind",1581199296),W8=new S(null,"sorted-map-by","sorted-map-by",218894812,null),Mm=new F("edamame","opened-delimiter","edamame/opened-delimiter",-1906008305),V8=new F("cljs.core","none","cljs.core/none",926646439),Ien=new S("cljs.reader","read-date","cljs.reader/read-date",1663417238,null),Cy=new S(null,"params*","params*",336153603,null),gQ=new S(null,"sci.impl.records","sci.impl.records",-393424368,null),z8=new S(null,"unreduced","unreduced",780976083,null),U8=new S(null,"add-watch","add-watch",1389887634,null),mQ=new S(null,"-new-dynamic-var","-new-dynamic-var",-1029088918,null),Y8=new S(null,"pop-thread-bindings","pop-thread-bindings",-1312224790,null),lq=new S(null,"end-key","end-key",-1592097336,null),_en=new S("cljs.analyzer.api","resolve","cljs.analyzer.api/resolve",498213843,null),Q8=new S(null,"unchecked-byte","unchecked-byte",1091664664,null),jf=new S(null,"opts","opts",1795607228,null),G8=new S(null,"remove-all-methods","remove-all-methods",-728267092,null),Ten=new S(null,"initch","initch",946908919,null),Den=new S("clojure.repl","source-fn","clojure.repl/source-fn",1877923323,null),J8=new S(null,"uuid?","uuid?",400077689,null),K8=new F(null,"reload","reload",863702807),av=new S("cljs.core","atom","cljs.core/atom",1943839529,null),hv=new S(null,"quoted-ns","quoted-ns",-2054280928,null),B8=new S(null,"first","first",996428481,null),Men=new S("cljs.tools.reader.impl.commons","parse-symbol","cljs.tools.reader.impl.commons/parse-symbol",-903976395,null),De=new F(null,"end-pos","end-pos",-1643883926),X8=new F(null,"opts","opts",155075701),F8=new S(null,"fnil","fnil",-187395162,null),H8=new S(null,"reduced","reduced",-1189224808,null),Eo=new F(null,"location?","location?",425878086),Z8=new S(null,"pop!","pop!",-1253383511,null),b8=new S(null,"unchecked-negate-int","unchecked-negate-int",-825297602,null),Yi=new S(null,"bindings","bindings",-1383038577,null),yc=new F(null,"per-line-prefix","per-line-prefix",846941813),n9=new S(null,"unchecked-add-int","unchecked-add-int",-1821763285,null),t9=new F("edamame.impl.parser","suppress","edamame.impl.parser/suppress",1718484755),wQ=new F(null,"fn-expr","fn-expr",-933027985),$en=new S("clojure.core","multi-fn-add-method-impl","clojure.core/multi-fn-add-method-impl",-1293834231,null),O3=new S("cljs.core","nil?","cljs.core/nil?",945071861,null),Nen=new S("clojure.core","-new-dynamic-var","clojure.core/-new-dynamic-var",-1873937019,null),rq=new S(null,"xs__29507__auto__","xs__29507__auto__",-1887296174,null),Ro=new F(null,"eof","eof",-489063237),e9=new S(null,"defrecord","defrecord",273038109,null),l9=new S(null,"even?","even?",-1827825394,null),r9=new S(null,"neg?","neg?",-1902175577,null),u9=new S(null,"float","float",-91857841,null),Kv=new S(null,"chunk","chunk",449371907,null),dQ=new F(null,"queue","queue",1455835879),pQ=new S("cljs.core","fnil","cljs.core/fnil",479587341,null),Ay=new S(null,"if-let","if-let",1803593690,null),i9=new S(null,"object?","object?",327472310,null),Ey=new F(null,"end","end",-268185958),dm=new S(null,"parent","parent",761652748,null),qen=new S("clojure.core","-new-var","clojure.core/-new-var",363339052,null),uq=new S(null,"iter__29079__auto__","iter__29079__auto__",-374851320,null),vQ=new S(null,"not-native","not-native",-236392494,null),Qt=new F(null,"env","env",-1815813235),yQ=new S(null,"*print-fn*","*print-fn*",138509853,null),Len=new S("js","Number","js/Number",-508133572,null),iq=new S(null,"args__25017__auto__","args__25017__auto__",-1166418888,null),jQ=new F(null,"deftype-fields","deftype-fields",-222569172),Wen=new F(null,"post","post",269697687),s9=new S(null,"pos?","pos?",-244377722,null),js=new S(null,"tcoll","tcoll",-1341294481,null),Eu=new F(null,"col-key","col-key",-2009675766),xI=new F("sci.impl","type-name","sci.impl/type-name",-1528979388),ea=new S(null,"array","array",-440182315,null),o9=new S(null,"ns-interns","ns-interns",535532824,null),Ven=new S(null,"letfn*","letfn*",-110097810,null),Ru=new F(null,"parents","parents",-2027538891),a9=new S(null,"unchecked-dec-int","unchecked-dec-int",1339067442,null),h9=new S(null,"bit-shift-left","bit-shift-left",-1814765981,null),c9=new S(null,"take-last","take-last",-41013151,null),kI=new F(null,"remaining-arg-count","remaining-arg-count",-1216589335),jc=new F(null,"logical-blocks","logical-blocks",-1466339776),zen=new S(null,"->type-impl","->type-impl",483401048,null),f9=new S(null,"short","short",-725675253,null),g9=new S(null,"atom","atom",1243487874,null),Bv=new S(null,"symbol?","symbol?",1820680511,null),ip=new S(null,"defmacro","defmacro",2054157304,null),m9=new S(null,"tagged-literal","tagged-literal",-896422703,null),Uen=new S(null,"NaN","NaN",666918153,null),Yen=new F(null,"end-col","end-col",-724155879),w9=new S(null,"extends?","extends?",-2012201234,null),d9=new S(null,"bit-set","bit-set",-910710655,null),Qen=new F("clojure.core","eval-file","clojure.core/eval-file",801420726),xQ=new S(null,"protocol-type-impl","protocol-type-impl",561934718,null),sp=new F(null,"phase","phase",575722892),Gen=new F(null,"ready","ready",1086465795),sq=new S(null,"kmap","kmap",-2108296910,null),Xg=new F("sci.impl","f-meta","sci.impl/f-meta",-1735495322),Ry=new S(null,"doc-string?","doc-string?",393166599,null),oq=new S(null,"end-test","end-test",2122505254,null),kQ=new S(null,"IRecord","IRecord",-903221169,null),W=new F(null,"arglists","arglists",1661989754),Py=new S(null,"when-first","when-first",821699168,null),p9=new S("cljs.core","declare","cljs.core/declare",1312638100,null),Jen=new S(null,"writer","writer",1362963291,null),oh=new F(null,"end-column","end-column",1425389514),Ken=new S(null,"xset","xset",-371743149,null),v9=new S(null,"odd?","odd?",-1458588199,null),SI=new S("cljs.core","alter-var-root","cljs.core/alter-var-root",-1342668238,null),y9=new S(null,"split-with","split-with",1853047034,null),xf=new S("cljs.core","when","cljs.core/when",120293186,null),j9=new S(null,"prefer-method","prefer-method",-876100205,null),Po=new F(null,"unquote-splicing","unquote-splicing",1295267556),SQ=new F("sci.impl.analyzer","instance-expr","sci.impl.analyzer/instance-expr",629338719),Ben=new S(null,"var-args","var-args",1341745925,null),OI=new F(null,"copy-enclosed->invocation","copy-enclosed->invocation",-1322388729),Xen=new S("clojure.core","sequence","clojure.core/sequence",1998774218,null),OQ=new F(null,"expr","expr",745722291),x9=new S(null,"bit-or","bit-or",-1144943723,null),CQ=new S(null,"sci.impl.protocols","sci.impl.protocols",-697012432,null),Fen=new S("js","Boolean","js/Boolean",1661145260,null),k9=new S(null,"find","find",2136810983,null),AQ=new F(null,"start-block-t","start-block-t",-373430594),Ui=new S(null,"key","key",124488940,null),S9=new F(null,"loaded-libs","loaded-libs",-1156389652),p0=new F("sci.impl.protocols","reified","sci.impl.protocols/reified",-2019939396),O9=new S(null,"count","count",-514511684,null),Iy=new S(null,"binding","binding",-2114503176,null),Hen=new S("sci.impl.deftype","-create-type","sci.impl.deftype/-create-type",-1020101113,null),Zen=new S(null,"IDeref","IDeref",1738423197,null),C9=new S(null,"when-some","when-some",1700415903,null),A9=new S(null,"remove-ns","remove-ns",-1915058781,null),pm=new S(null,"-swap!","-swap!",-535359318,null),EQ=new F(null,"resolve-symbol","resolve-symbol",-319166964),RQ=new S("cljs.core","push-thread-bindings","cljs.core/push-thread-bindings",-703482450,null),oa=new S(null,"number?","number?",-1747282210,null),C3=new F("sci.impl.parser.edamame","eof","sci.impl.parser.edamame/eof",-917261517),Rw=new F(null,"exclude","exclude",-1230250334),E9=new S(null,"unchecked-subtract","unchecked-subtract",-2137458667,null),ben=new S("cljs.core","when-first","cljs.core/when-first",-667185267,null),R9=new S(null,"sort","sort",-1700969851,null),PQ=new F("sci.impl.record","map-constructor","sci.impl.record/map-constructor",1072184780),nln=new S("cljs.core","in-ns","cljs.core/in-ns",1807208747,null),P9=new S(null,"juxt","juxt",671085604,null),bt=new F(null,"bracket-info","bracket-info",-1600092774),tln=new S("cljs.core","when-let","cljs.core/when-let",-2049838349,null),aq=new S(null,"default__25056__auto__","default__25056__auto__",-1779483916,null),si=new F(null,"body","body",-2049205669),CI=new F(null,"special","special",-1125941630),I9=new S(null,"alength","alength",-1268305401,null),IQ=new F(null,"outer-idens","outer-idens",1197381241),_9=new S(null,"with-redefs","with-redefs",-1143728263,null),Za=new F(null,"mode","mode",654403691),T9=new S(null,"nfirst","nfirst",-554736533,null),D9=new S(null,"volatile!","volatile!",919368405,null),ao=new F(null,"closure-bindings","closure-bindings",112932037),eln=new F(null,"fallback-impl","fallback-impl",-1501286995),q=new F(null,"name","name",1843675177),ki=new F(null,"syms","syms",-1575891762),M9=new S(null,"reset-meta!","reset-meta!",1699493291,null),Hj=new S(null,"do-template","do-template",-1578627476,null),$9=new S(null,"map?","map?",-1780568534,null),N9=new S(null,"into","into",1489695498,null),q9=new S(null,"sorted-set","sorted-set",992325424,null),L9=new S(null,"ints","ints",-1761239845,null),W9=new S(null,"contains?","contains?",-1676812576,null),AI=new S(null,"-deref","-deref",-283116853,null),lln=new F(null,"illegal-argument","illegal-argument",-1845493170),Io=new F(null,"class->opts","class->opts",2061906477),Zj=new S(null,"index-of","index-of",1275975485,null),v1=new F("edamame","opened-delimiter-loc","edamame/opened-delimiter-loc",443885208),V9=new S(null,"all-ns","all-ns",1571857784,null),z9=new S(null,"with-bindings","with-bindings",-1197589787,null),Hf=new F(null,"writing","writing",-1486865108),EI=new F(null,"parameter-from-args","parameter-from-args",-758446196),U9=new S(null,"js-keys","js-keys",-1388365203,null),_Q=new F(null,"keywordize-keys","keywordize-keys",1310784252),_o=new F(null,"logical-block-callback","logical-block-callback",1612691194),RI=new S(null,"inst","inst",-2008473268,null),TQ=new F(null,"selector","selector",762528866),rln=new S(null,"struct","struct",325972931,null),PI=new F(null,"auto-resolve","auto-resolve",1851201983),Y9=new S(null,"int?","int?",1799729645,null),uln=new S("cljs.core","next","cljs.core/next",-1291438473,null),iln=new S(null,"cmap","cmap",1947829886,null),Fr=new F(null,"buffer","buffer",617295198),Q9=new S(null,"empty?","empty?",76408555,null),G9=new S(null,"lazy-cat","lazy-cat",-89906116,null),hq=new S(null,"replacement","replacement",-195707312,null),J9=new S(null,"*print-readably*","*print-readably*",-761361221,null),K9=new S(null,"dissoc","dissoc",1039760994,null),sln=new S("cljs.core","refer","cljs.core/refer",269577817,null),bj=new S(null,"replace-first","replace-first",-943534331,null),oln=new F(null,"const","const",1709929842),op=new S(null,"meta","meta",-1154898805,null),Xv=new S(null,"reader","reader",1810192380,null),To=new F(null,"indent","indent",-148200125),y1=new F(null,"descendants","descendants",1824886031),cq=new F("sci.impl.deftype","object","sci.impl.deftype/object",-248099673),B9=new S(null,"str","str",-1564826950,null),aln=new S(null,"type-sym","type-sym",-1942856509,null),DQ=new S(null,"IPrintWithWriter","IPrintWithWriter",-1205316154,null),fq=new S(null,"meth__25395__auto__","meth__25395__auto__",-303057587,null),ls=new F(null,"end-location","end-location",-1199449467),Pw=new F("sci","error","sci/error",-979082803),_y=new F("sci.impl","constructor","sci.impl/constructor",1320345666),MQ=new S(null,"*print-err-fn*","*print-err-fn*",1241679298,null),X9=new S(null,"print-str","print-str",-699700354,null),hln=new S(null,"fn-tail","fn-tail",-178337841,null),cln=new F("edamame","error","edamame/error",882529634),II=new F(null,"val","val",128701612),gq=new S(null,"p__29664__auto__","p__29664__auto__",-214042622,null),tu=new F(null,"var","var",-769682797),Ty=new S(null,"get","get",-971253014,null),Dy=new S(null,"step","step",-1365547645,null),fln=new S(null,"dispatch-fn","dispatch-fn",-1401088155,null),My=new S(null,"ex-cause","ex-cause",95392590,null),yt=new S("cljs.core","let","cljs.core/let",-308701135,null),F9=new S(null,"remove","remove",1509103113,null),H9=new S(null,"isa?","isa?",1358492324,null),$Q=new F(null,"flush-on-newline","flush-on-newline",-151457939),Z9=new S(null,"iterate","iterate",694501410,null),gln=new S(null,"backslash","backslash",-863649243,null),b9=new S(null,"-add-loaded-lib","-add-loaded-lib",368206419,null),NQ=new S(null,"maps","maps",-71029607,null),n6=new S(null,"args__25058__auto__","args__25058__auto__",-1805065117,null),nS=new S(null,"mapv","mapv",-241595241,null),tS=new S(null,"deref","deref",1494944732,null),$y=new S(null,"loop","loop",1244978678,null),A3=new S("cljs.core","assoc","cljs.core/assoc",322326297,null),ap=new F(null,"public-class","public-class",1127293019),t6=new S(null,"map-invert","map-invert",1258886340,null),Is=new F(null,"unquote","unquote",1649741032),mln=new S(null,"docstring?","docstring?",-180217883,null),hp=new S(null,"boolean","boolean",-278886877,null),eS=new S(null,"bytes","bytes",-1478569089,null),lS=new S(null,"vector","vector",-751469611,null),rS=new S(null,"long","long",1469079434,null),Fv=new S(null,"size-or-seq","size-or-seq",-2062823589,null),v0=new F(null,"satisfies","satisfies",-311664218),uS=new S(null,"butlast","butlast",1573039585,null),qQ=new F(null,"max-columns","max-columns",1742323262),iS=new S(null,"delay?","delay?",-1528239209,null),mq=new S("clojure.repl","print-doc","clojure.repl/print-doc",-375546711,null),Qi=new S(null,"tag","tag",350170304,null),LQ=new S(null,"unquote","unquote",-1004694737,null),cv=new F("sci.impl.evaluator","not-found","sci.impl.evaluator/not-found",1684798426),wln=new F(null,"reader-error","reader-error",1610253121),dln=new S(null,"%&","%&",-728707069,null),sS=new S(null,"bit-not","bit-not",1508529851,null),pln=new S(null,"%1","%1",1309450150,null),wq=new S(null,"sym","sym",195671222,null),vln=new S(null,"names","names",-302543131,null),oS=new S(null,"int-array","int-array",459176616,null),lu=new F(null,"both","both",-393648840),WQ=new S(null,"reset-thread-binding-frame-impl","reset-thread-binding-frame-impl",-826674194,null),aS=new S(null,"global-hierarchy","global-hierarchy",-2014004345,null),hS=new S(null,"aget","aget",1491056546,null),yln=new S("sci.impl.protocols","default","sci.impl.protocols/default",-1134880191,null),Ny=new F(null,"symbol","symbol",-1038572696),cS=new S(null,"not-every?","not-every?",-729672558,null),fS=new S(null,"comment","comment",-2122229700,null),jln=new S("js","String","js/String",-2070054036,null),gS=new S("cljs.core","lazy-seq","cljs.core/lazy-seq",627681297,null),xln=new S(null,"branch?","branch?",641208520,null),qy=new S(null,"doseq","doseq",221164135,null),e6=new F(null,"colnum","colnum",2023796854),mS=new S("clojure.core","list","clojure.core/list",-1119203325,null),wS=new S(null,"some->","some->",-1011172200,null),cp=new S("js","Error","js/Error",-1692659266,null),kln=new S("cljs.core","with-bindings*","cljs.core/with-bindings*",-768558084,null),Pa=new S(null,"throw","throw",595905694,null),dS=new S(null,"seqable?","seqable?",72462495,null),VQ=new F(null,"length","length",588987862),pS=new S(null,"indexed?","indexed?",1234610384,null),vS=new F(null,"when","when",-576417306),Sln=new F("sci.impl.protocols","IPrintWithWriter","sci.impl.protocols/IPrintWithWriter",1832791161),yS=new S(null,"compare-and-set!","compare-and-set!",-1997299382,null),zQ=new F(null,"char-format","char-format",-1016499218),Iw=new F(null,"extend-via-metadata","extend-via-metadata",-427346794),l6=new S(null,"union","union",-511498270,null),jS=new S(null,"zero?","zero?",325758897,null),xS=new S(null,"partition-all","partition-all",-1985005385,null),kS=new S(null,"run!","run!",-2055483725,null),Oln=new S("cljs.core","-add-loaded-lib","cljs.core/-add-loaded-lib",-38500354,null),r6=new S(null,"not-found","not-found",1011451547,null),Cln=new S(null,"specs","specs",-1227865028,null),Aln=new S(null,"retf","retf",73249638,null),SS=new S(null,"rand-int","rand-int",-495012157,null),Ly=new S(null,"rest","rest",398835108,null),Hv=new S(null,"user","user",-1122004413,null),OS=new S(null,"set","set",1945134081,null),Zf=new F(null,"prefix","prefix",-265908465),UQ=new F(null,"namespace","namespace",-377510372),CS=new S(null,"take-nth","take-nth",1378204353,null),AS=new S(null,"drop-while","drop-while",719206685,null),dq=new S(null,"sep","sep",-684005239,null),xc=new S(null,"fn*","fn*",-752876845,null),ES=new S(null,"seq","seq",-177272256,null),RS=new S(null,"fn?","fn?",1820990818,null),_s=new F(null,"dispatch","dispatch",1319337009),qu=new F(null,"rest","rest",-1241696419),Eln=new S("clojure.core","cond","clojure.core/cond",1906951420,null),PS=new S(null,"remove-method","remove-method",72923733,null),YQ=new F(null,"gensyms","gensyms",248713782),E3=new F(null,"colon-up-arrow","colon-up-arrow",244853007),IS=new S(null,"get-method","get-method",185754457,null),_S=new S(null,"update-in","update-in",-1445516941,null),Rln=new F(null,"message","message",-406056002),Pln=new S("cljs.core","LazySeq","cljs.core/LazySeq",1986389673,null),Iln=new F("edamame","read-cond-splicing","edamame/read-cond-splicing",-1992728777),QQ=new S("cljs.core","count","cljs.core/count",-921270233,null),pq=new F(null,"ex","ex",-1413771341),TS=new S(null,"keep","keep",-492807003,null),oi=new S("cljs.core","fn","cljs.core/fn",-1065745098,null),Ts=new F(null,"fn","fn",-1175266204),Wy=new S(null,"*loaded-libs*","*loaded-libs*",1951428860,null),DS=new S(null,"create-ns","create-ns",-782886354,null),_ln=new S("cljs.tools.reader.edn","escape-char","cljs.tools.reader.edn/escape-char",17562632,null),MS=new S(null,"sort-by","sort-by",1317932224,null),Ti=new F(null,"end-row-key","end-row-key",-1126662680),$S=new S(null,"defprotocol","defprotocol",1388695348,null),NS=new S(null,"frequencies","frequencies",1757430425,null),Tln=new S("cljs.core","defonce","cljs.core/defonce",-1291833100,null),qS=new S(null,"into-array","into-array",-1875808354,null),LS=new S(null,"thread-bound?","thread-bound?",2075334115,null),WS=new S(null,"transduce","transduce",-2083619734,null),VS=new S(null,"ancestors","ancestors",864486103,null),vq=new S("cljs.core","chunk-cons","cljs.core/chunk-cons",-250075688,null),Dln=new F(null,"volatile-mutable","volatile-mutable",1731728411),zS=new S(null,"ensure-reduced","ensure-reduced",-1606421005,null),US=new S(null,"re-find","re-find",1143444147,null),af=new F(null,"max-fixed","max-fixed",166770124),GQ=new S("js","Error.","js/Error.",750655924,null),Mln=new S(null,"oldval","oldval",-221475803,null),YS=new S(null,"rand","rand",-1745930995,null),$ln=new S(null,"js*","js*",-1134233646,null),u6=new S(null,"temp__29502__auto__","temp__29502__auto__",573678355,null),kc=new F(null,"suffix","suffix",367373057),yq=new S("cljs.core","println","cljs.core/println",-331834442,null),Vy=new S(null,"smap","smap",-2041991975,null),Nln=new F("sci.impl","record","sci.impl/record",-1939193950),jq=new S(null,"m__25384__auto__","m__25384__auto__",536079829,null),QS=new S(null,"gensym","gensym",-1693147401,null),xt=new F(null,"at","at",1476951349),ho=new F(null,"as","as",1148689641),GS=new S(null,"*print-length*","*print-length*",-687693654,null),bf=new F(null,"nl-t","nl-t",-1608382114),JS=new S(null,"js->clj","js->clj",1544462432,null),qln=new S("cljs.core","and","cljs.core/and",-6692549,null),Lln=new S("cljs.core","reify*","cljs.core/reify*",1256833160,null),R3=new F(null,"read-cond","read-cond",1056899244),Wln=new S("js","Function","js/Function",-749892063,null),KS=new S(null,"unchecked-char","unchecked-char",1662742943,null),BS=new S(null,"unchecked-int","unchecked-int",1672898125,null),zy=new S("cljs.core","int","cljs.core/int",20935062,null),XS=new S(null,"unchecked-multiply-int","unchecked-multiply-int",-788546068,null),Xe=new F(null,"column","column",2078222095),Vln=new F(null,"ok","ok",967785236),i6=new S(null,"size__29012__auto__","size__29012__auto__",1669448591,null),FS=new F(null,"or","or",235744169),HS=new S(null,"unchecked-inc","unchecked-inc",-1170131490,null),zln=new S(null,"number-literal?","number-literal?",843787662,null),ZS=new S(null,"prn-str","prn-str",-145225943,null),s6=new S(null,"rename-keys","rename-keys",355340888,null),Fg=new S(null,"xform","xform",-85179481,null),xq=new S(null,"default__25532__auto__","default__25532__auto__",1964788493,null),Zv=new S(null,"init-val-or-seq","init-val-or-seq",-1168783320,null),Ft=new F(null,"directive","directive",793559132),bS=new S(null,"max-key","max-key",-2132814732,null),JQ=new S(null,"get-thread-binding-frame-impl","get-thread-binding-frame-impl",-701667726,null),fu=new F(null,"obj","obj",981763962),ma=new S(null,"form","form",16469056,null),Uln=new F(null,"buffer-level","buffer-level",928864731),Yln=new S(null,"object","object",-1179821820,null),n7=new S(null,"conj!","conj!",-841007895,null),o6=new F(null,"bodies","bodies",-1295887172),t7=new S(null,"alias","alias",-399220103,null),e7=new S(null,"parents","parents",-387007364,null),r1=new S(null,"value","value",1946509744,null),l7=new S(null,"keyword?","keyword?",1917797069,null),_w=new F(null,"form","form",-1624062471),KQ=new S("cljs.core","or","cljs.core/or",1201033885,null),r7=new S(null,"disj!","disj!",-1383872088,null),Qln=new F("sci.error","realized-beyond-max","sci.error/realized-beyond-max",-1094268187),u7=new S(null,"*print-meta*","*print-meta*",-919406644,null),i7=new S(null,"counted?","counted?",1703071664,null),P3=new F(null,"mandatory","mandatory",542802336),a6=new S("cljs.core","protocol-type-impl","cljs.core/protocol-type-impl",155177701,null),BQ=new S(null,"cljs.core.PersistentQueue.EMPTY","cljs.core.PersistentQueue.EMPTY",399917828,null),Gln=new S(null,"outer","outer",1265345571,null),Jln=new F("sci.impl.evaluator","try-result","sci.impl.evaluator/try-result",-1394897780),XQ=new F(null,"pretty-writer","pretty-writer",-1222834267),s7=new S(null,"descendants","descendants",-829549738,null),kf=new S("cljs.core","defmethod","cljs.core/defmethod",-180785162,null),o7=new S(null,"long-array","long-array",217579190,null),V=new F(null,"ns","ns",441598760),a7=new S(null,"associative?","associative?",-141666771,null),Do=new F(null,"done-nl","done-nl",-381024340),h7=new S(null,"amap","amap",635923055,null),c7=new S(null,"concat","concat",-467652465,null),fv=new F("sci.impl","callstack","sci.impl/callstack",-1621010557),f7=new S(null,"as->","as->",1430690540,null),Lr=new F(null,"source","source",-433931539),kq=new F("sci.impl.records","object","sci.impl.records/object",-590699738),Uy=new S(null,"for","for",316745208,null),Sq=new S(null,"oldform","oldform",1995222417,null),Yy=new S(null,"condp","condp",1054325175,null),h6=new S(null,"else","else",132154381,null),c6=new F(null,"keyword","keyword",811389747),g7=new S(null,"reduced?","reduced?",1361797384,null),m7=new S(null,"var-get","var-get",-767472097,null),f6=new S(null,"trimr","trimr",-1739157155,null),g6=new S(null,"triml","triml",-286546306,null),Hg=new S(null,"join","join",881669637,null),jh=new S(null,"obj","obj",-1672671807,null),FQ=new S(null,"*file*","*file*",624866474,null),w7=new S(null,"binding-conveyor-fn","binding-conveyor-fn",2076077877,null),d7=new S(null,"re-seq","re-seq",-2105554076,null),p7=new S(null,"bit-xor","bit-xor",-1334295033,null),Kln=new F(null,"id","id",-1388402092),Yu=new F(null,"else","else",-1508377146),Ds=new F(null,"seq","seq",-1817803783),fp=new S(null,"defn","defn",-126010802,null),HQ=new F(null,"local->mutator","local->mutator",1004070878),Bln=new S("cljs.core","aset","cljs.core/aset",-898215545,null),Sc=new F(null,"set","set",304602554),v7=new S(null,"unchecked-add","unchecked-add",-2030665965,null),y7=new S(null,"memfn","memfn",-881453486,null),Oq=new S(null,"iterys__29004__auto__","iterys__29004__auto__",-1283287258,null),j7=new S(null,"ffirst","ffirst",-694902e3,null),x7=new S(null,"bounded-count","bounded-count",1030640883,null),k7=new S(null,"swap!","swap!",-655677516,null),y0=new F(null,"protocol","protocol",652470118),m6=new S(null,"capitalize","capitalize",-2143275164,null),S7=new S(null,"bound-fn*","bound-fn*",102308621,null),w6=new S(null,"fs__29005__auto__","fs__29005__auto__",440491957,null),O7=new S(null,"prefers","prefers",-374265406,null),Xln=new S("clojure.core","array-map","clojure.core/array-map",-1351833961,null),Cq=new S("cljs.core","chunk","cljs.core/chunk",847936424,null),bs=new F(null,"colinc","colinc",-584873385),C7=new S(null,"empty","empty",-1886564811,null),gv=new S(null,"farg__25373__auto__","farg__25373__auto__",1109963387,null),A7=new S(null,"shorts","shorts",107738238,null),Aq=new S(null,"options","options",1740170016,null),E7=new S(null,"defmethod","defmethod",-579171823,null),Fln=new S(null,"-inner-impl","-inner-impl",-1295431849,null),Cn=new S(null,"&","&",-2144855648,null),R7=new F(null,"deny","deny",1589338523),P7=new S(null,"repeat","repeat",-1821743682,null),Eq=new S(null,"%","%",-950237169,null),I7=new S(null,"*","*",345799209,null),_7=new F(null,"print-length","print-length",1931866356),Rq=new S(null,"child","child",-2030468224,null),Sf=new F(null,"up-arrow","up-arrow",1705310333),gp=new S(null,"+","+",-740910886,null),Mo=new S(null,".",".",1975675962,null),T7=new S(null,"-","-",-471816912,null),mp=new S(null,"/","/",-1371932971,null),_I=new F(null,"keys","keys",1068423698),D7=new S(null,"boolean?","boolean?",1790940868,null),ZQ=new S("cljs.core","chunked-seq?","cljs.core/chunked-seq?",-712922369,null),M7=new S(null,"remove-watch","remove-watch",-1105301448,null),$7=new S(null,"multi-fn-add-method-impl","multi-fn-add-method-impl",-523930142,null),Hln=new S(null,"IReset","IReset",-1893729426,null),Zln=new S(null,"arr","arr",2115492975,null),bQ=new F(null,"right-bracket","right-bracket",951856080),bln=new S(null,"_","_",-1201019570,null),N7=new S(null,"cond->","cond->",561741875,null),d6=new S(null,"source","source",1206599988,null),gi=new S(null,"b","b",-1172211299,null),$l=new S(null,"a","a",-482876059,null),nf=new S(null,"d","d",-682293345,null),nrn=new S("sci.impl.deftype","-inner-impl","sci.impl.deftype/-inner-impl",528349233,null),Ql=new S(null,"body","body",-408674142,null),q7=new S(null,"booleans","booleans",756846088,null),la=new S(null,"c","c",-122660552,null),Bn=new S(null,"f","f",43394975,null),trn=new F(null,"sigs","sigs",-1653119622),ern=new S(null,"e","e",-1273166571,null),ra=new S(null,"h","h",-1544777029,null),Gd=new S(null,"g","g",-916345864,null),p6=new S(null,"escape","escape",648929575,null),Ze=new S(null,"k","k",-505765866,null),zt=new S(null,"n","n",-2092305744,null),Tr=new S(null,"m","m",-1021758608,null),Of=new S(null,"attr-map?","attr-map?",116307443,null),L7=new S(null,"p","p",1791580836,null),vm=new S(null,"o","o",290524299,null),$m=new S(null,"lazy-seq","lazy-seq",489632906,null),Nm=new S(null,"read","read",-1514377108,null),lrn=new S(null,"r","r",1169147337,null),W7=new S(null,"doubles","doubles",-1517872169,null),rrn=new S(null,"t","t",242699008,null),Kt=new S(null,"s","s",-948495851,null),j1=new S(null,"__sci_this","__sci_this",-193704996,null),V7=new S(null,"re-pattern","re-pattern",1047705161,null),mh=new S(null,"v","v",1661996586,null),z7=new S(null,"<=","<=",1244895369,null),gn=new S(null,"x","x",-555367584,null),U7=new S(null,"get-in","get-in",-1965644065,null),Y7=new S(null,"<","<",993667236,null),Pq=new S(null,"yrel","yrel",-1573821256,null),Q7=new S(null,">",">",1085014381,null),G7=new S(null,"=","=",-1501502141,null),J7=new S(null,"macroexpand","macroexpand",1509933344,null),K7=new S(null,"every?","every?",2083724064,null),ws=new F(null,"hierarchy","hierarchy",-1053470341),v6=new S(null,"keywordize-keys","keywordize-keys",-1343651517,null),B7=new F(null,"async-load-fn","async-load-fn",-472170029),nG=new S("cljs.core","alength","cljs.core/alength",-1012804190,null),urn=new F(null,"radix","radix",857016463),X7=new S(null,"==","==",-234118149,null),irn=new F(null,"classes","classes",2037804510),F7=new S(null,"chunk-append","chunk-append",-1447349559,null),H7=new S(null,"double?","double?",-2146564276,null),Z7=new F(null,"first","first",-644103046),b7=new S(null,"*print-level*","*print-level*",-634488505,null),nO=new S(null,"areduce","areduce",-1873477878,null),srn=new F(null,"gen-class","gen-class",-426712454),qm=new S(null,"and","and",668631710,null),tO=new S(null,">=",">=",1016916022,null),y6=new S(null,"temp__29481__auto__","temp__29481__auto__",-35958956,null),mv=new S(null,"z","z",851004344,null),tt=new S(null,"y","y",-117328249,null),Cf=new F(null,"allow","allow",-1857325745),tG=new S(null,"*data-readers*","*data-readers*",1269051058,null),orn=new S(null,"separator","separator",11782402,null),wp=new S("cljs.core","unchecked-inc","cljs.core/unchecked-inc",-501313167,null),Lm=new S(null,"read-string","read-string",-558384455,null),j6=new F(null,"var-args?","var-args?",-1630678710),eO=new S(null,"interleave","interleave",165488106,null),lO=new S(null,"subs","subs",1453849536,null),arn=new S("cljs.core","binding","cljs.core/binding",2050379843,null),TI=new F("sci.impl.analyzer","static-access","sci.impl.analyzer/static-access",-79014e3),x6=new S(null,"substr","substr",-2116301839,null),hrn=new F(null,"sections","sections",-886710106),rO=new S(null,"js-delete","js-delete",170306730,null),uO=new S(null,"sorted?","sorted?",892797714,null),iO=new F(null,"raw-classes","raw-classes",1669916511),sO=new S(null,"partial","partial",1881673272,null),oO=new S(null,"memoize","memoize",2019341169,null),crn=new S("cljs.core","*print-fn*","cljs.core/*print-fn*",1342365176,null),Qy=new S(null,"impls","impls",326516674,null),frn=new F(null,"orig","orig",-1678309870),eG=new S(null,"*out*","*out*",1277591796,null),lG=new F("edamame.impl.parser","cond-splice","edamame.impl.parser/cond-splice",1534599765),grn=new F(null,"libname","libname",135992497),aO=new S(null,"array?","array?",-1249008197,null),hO=new S(null,"reset!","reset!",527275632,null),Gy=new F(null,"start","start",-355208981),Iq=new F("sci.impl.deftype","IPrintWithWriter","sci.impl.deftype/IPrintWithWriter",-1280030107),cO=new S(null,"sorted-set-by","sorted-set-by",899099765,null),Oh=new S(null,"expr","expr",-1908713478,null),mrn=new S("clojure.core","hash-set","clojure.core/hash-set",1229125967,null),fO=new S(null,"ns-resolve","ns-resolve",1788675756,null),gO=new S(null,"*flush-on-newline*","*flush-on-newline*",-737526501,null),dp=new F(null,"ns-aliases","ns-aliases",1290254821),wrn=new S("cljs.core","doseq","cljs.core/doseq",-169320766,null),mO=new S(null,"keyword-identical?","keyword-identical?",931555714,null),Y=new F("sci","built-in","sci/built-in",1244659599),drn=new S(null,"prefix-string","prefix-string",-922371041,null),wO=new S(null,"unchecked-subtract-int","unchecked-subtract-int",-1899147615,null),k6=new S(null,"prewalk-replace","prewalk-replace",2117002030,null),prn=new S(null,"-create-type","-create-type",805234013,null),dO=new S(null,"zipmap","zipmap",-690049687,null),_q=new S(null,"method-table__24951__auto__","method-table__24951__auto__",-639890219,null),S6=new S(null,"upper-case","upper-case",1427515769,null),vrn=new S("cljs.core","into","cljs.core/into",1879938733,null),pO=new S(null,"nth","nth",1529209554,null),pd=new S(null,"recur","recur",1202958259,null),rf=new S(null,"multifn","multifn",-1904313150,null),rG=new S(null,"clojure.walk","clojure.walk",1625897340,null),yrn=new S(null,"capacity","capacity",1713221261,null),DI=new S(null,"-reset!","-reset!",1965723739,null),jrn=new S("cljs.core","long","cljs.core/long",241154833,null),xrn=new S(null,"dispatch-val-y","dispatch-val-y",1016388320,null),vO=new S(null,"inst?","inst?",1614698981,null),krn=new S(null,"dispatch-val-x","dispatch-val-x",-1545100153,null),Srn=new F("tools.reader","opts","tools.reader/opts",-2121810901),Ir=new S(null,"name","name",-810760592,null),yO=new S(null,"ex-data","ex-data",1331491268,null),jO=new S(null,"print","print",-1354873355,null),Orn=new S(null,"cause","cause",1872432779,null),Crn=new S("cljs.core","unquote","cljs.core/unquote",1013085760,null),Tq=new S(null,"prepost-map?","prepost-map?",869562481,null),Arn=new S(null,"cljs.reader","cljs.reader",1327473948,null),Dq=new S(null,"default__25068__auto__","default__25068__auto__",-31182265,null),Mq=new F("sci.impl.analyzer","unresolved","sci.impl.analyzer/unresolved",308754858),MI=new S("cljs.core","loop","cljs.core/loop",-1829423021,null),xO=new S(null,"to-array","to-array",-585705189,null),Jy=new S(null,"defn-","defn-",1097765044,null),os=new F(null,"read-eval","read-eval",1788733932),O6=new F("cljs.core","halt","cljs.core/halt",-1049036715),kO=new S(null,"unchecked-inc-int","unchecked-inc-int",1402783397,null),uG=new S("cljs.core","deref","cljs.core/deref",1901963335,null),C6=new S(null,"c__29011__auto__","c__29011__auto__",-383068259,null),wo=new F(null,"block","block",664686210),SO=new S(null,"refer-clojure","refer-clojure",-1840651329,null),$q=new S(null,"x__29309__auto__","x__29309__auto__",1160745086,null),Ee=new S(null,"more","more",-418290273,null),OO=new S(null,"not","not",1044554643,null),CO=new S(null,"reduce-kv","reduce-kv",1856296400,null),AO=new S(null,"re-matches","re-matches",-1865705768,null),Tw=new S(null,"when","when",1064114221,null),Ern=new F(null,"min-var-args","min-var-args",-1883389660),Rrn=new S(null,"validator","validator",-325659154,null),Wm=new S(null,"case","case",-1510733573,null),pp=new F("sci.error","parse","sci.error/parse",-264338844),Nq=new F(null,"more-marker","more-marker",-14717935),Prn=new S("cljs.core","vreset!","cljs.core/vreset!",-1308835928,null),EO=new S(null,"completing","completing",565832990,null),RO=new S(null,"rand-nth","rand-nth",-1227719931,null),Irn=new S("cljs.core","defmulti","cljs.core/defmulti",723984225,null),PO=new S(null,"alter-var-root","alter-var-root",-1749458519,null),IO=new S(null,"unchecked-double","unchecked-double",-1593778036,null),_O=new S(null,"distinct","distinct",-148347594,null),_rn=new S(null,"ns*","ns*",1840949383,null),vp=new S("cljs.core","meta","cljs.core/meta",-748218346,null),iG=new S("cljs.core","find-ns","cljs.core/find-ns",-486459417,null),pl=new F(null,"type","type",1174270348),Trn=new S("cljs.core","aclone","cljs.core/aclone",-758078968,null),TO=new S(null,"list?","list?",-1494629,null),sG=new S("sci.impl.protocols","type->str","sci.impl.protocols/type->str",1214133319,null),DO=new S(null,"vector?","vector?",-61367869,null),MO=new S(null,"bound?","bound?",767722602,null),$O=new S(null,"list*","list*",765415731,null),Fn=new F("sci.impl","inlined","sci.impl/inlined",-478453593),oG=new F(null,"else-params","else-params",-832171646),x1=new S(null,"next","next",1522830042,null),qq=new S(null,"farg__25530__auto__","farg__25530__auto__",1804407067,null),Drn=new F("sci.impl","type","sci.impl/type",1797552241),NO=new F(null,"let","let",-1282412701),qO=new S(null,"Delay","Delay",-956795572,null),LO=new S(null,"not=","not=",1466536204,null),ae=new F(null,"line","line",212345235),WO=new F(null,"mutable","mutable",875778266),Mrn=new F(null,"ctx","ctx",-493610118),ng=new F(null,"methods","methods",453930866),VO=new S(null,"seq?","seq?",-1951934719,null),$I=new S(null,"expand-constructor","expand-constructor",-343741576,null),aG=new S(null,"js","js",-886355190,null),j0=new F("sci","macro","sci/macro",-868536151),zO=new S(null,"unchecked-float","unchecked-float",1485658216,null),I3=new S(null,"case*","case*",-1938255072,null),Lq=new S(null,"data","data",1407862150,null),UO=new F(null,"constructor","constructor",-1953928811),Wq=new S(null,"find-doc","find-doc",-1096800949,null),$rn=new S(null,"ISwap","ISwap",484378193,null),A6=new S(null,"last-index-of","last-index-of",215608200,null),YO=new S(null,"constantly","constantly",-271143939,null),Zg=new F(null,"count","count",2139924085),Nrn=new S(null,"km","km",-1276648257,null),NI=new S(null,"rdr","rdr",190007785,null),hf=new F(null,"right","right",-452581833),yi=new S(null,"ks","ks",-754231827,null),_3=new F("sci.impl","macroexpanding","sci.impl/macroexpanding",2113471825),Fu=new F(null,"linear","linear",872268697),hG=new F("sci.impl","inner-fn","sci.impl/inner-fn",1663302998),QO=new S(null,"flush","flush",501820328,null),E6=new S(null,"s__29308__auto__","s__29308__auto__",-239760766,null),GO=new S(null,"nthrest","nthrest",1219890118,null),vd=new F(null,"readably","readably",1129599760),JO=new S(null,"true?","true?",-1600332395,null),KO=new S(null,"var-set","var-set",-1361408121,null),cG=new F(null,"only","only",1907811652),BO=new S(null,"rem","rem",664046770,null),XO=new S(null,"ns-map","ns-map",-434605548,null),fG=new S("cljs.core","pop-thread-bindings","cljs.core/pop-thread-bindings",-1994943347,null),gG=new S("cljs.core","chunk-rest","cljs.core/chunk-rest",-398161143,null),qrn=new S(null,"rev","rev",1653234197,null),tg=new F(null,"data","data",-232669377),mG=new S(null,"ret","ret",1172308713,null),Lrn=new S(null,"limit","limit",284709164,null),Wrn=new S(null,"clojure.lang.IChunk","clojure.lang.IChunk",195957271,null),FO=new S(null,"make-array","make-array",-1135103906,null),Vrn=new S("cljs.core","*print-newline*","cljs.core/*print-newline*",6231625,null),HO=new S(null,"select-keys","select-keys",-708556589,null),ZO=new S(null,"instance?","instance?",1075939923,null),Vq=new S(null,"n__29393__auto__","n__29393__auto__",1238790286,null),bO=new S(null,"double","double",-1769548886,null),zrn=new S("sci.impl.namespaces","with-open","sci.impl.namespaces/with-open",-1695932508,null),nC=new S(null,"update","update",-1608859373,null),R6=new S(null,"sets","sets",2041487109,null),Urn=new F(null,"as-alias","as-alias",82482467),Ky=new S(null,"when-not","when-not",-1223136340,null),wv=new S(null,"p3","p3",-923395030,null),P6=new S(null,"lower-case","lower-case",1428172944,null),xs=new S(null,"ns","ns",2082130287,null),Dw=new F(null,"stack","stack",-793405930),Yrn=new F(null,"pending","pending",-220036727),I6=new S(null,"temp__29520__auto__","temp__29520__auto__",1462319395,null),bg=new S(null,"p1","p1",703771573,null),nm=new S(null,"p2","p2",-1748935128,null),tC=new S(null,"inc","inc",324505433,null),wG=new S(null,"fields","fields",-291534703,null),eC=new S(null,"random-uuid","random-uuid",-1574409597,null),lC=new S(null,"macroexpand-all","macroexpand-all",966103926,null),be=new F(null,"padchar","padchar",2018584530),rC=new S(null,"sequential?","sequential?",1102351463,null),om=new F(null,"strable","strable",1877668047),uC=new S(null,"force","force",-1872478483,null),Ge=new F(null,"col","col",-1959363084),iC=new S(null,"int","int",-100885395,null),sC=new S(null,"nthnext","nthnext",1677356670,null),Vm=new S(null,"or","or",1876275696,null),qI=new F(null,"vararg-idx","vararg-idx",-590991228),oC=new S(null,"assoc!","assoc!",-847603280,null),_6=new S(null,"blank?","blank?",1891979743,null),aC=new S(null,"*print-dup*","*print-dup*",103854877,null),hr=new F(null,"offset","offset",296498311),hC=new S(null,"extend-type","extend-type",1123355921,null),cC=new S(null,"set?","set?",1636014792,null),zq=new S(null,"set1","set1",-1952562536,null),Uq=new S(null,"set2","set2",1231516531,null),fC=new S(null,"hash-unordered-coll","hash-unordered-coll",-240471618,null),_r=new F(null,"mincol","mincol",1230695445),dG=new S("js","Object","js/Object",61215323,null),Yq=new S(null,"l__29572__auto__","l__29572__auto__",497043064,null),Qq=new S(null,"ps","ps",1932889573,null),T6=new S(null,"c__29040__auto__","c__29040__auto__",-456033258,null),gC=new S(null,"pr","pr",1056937027,null),T3=new S(null,"set!","set!",250714521,null),mC=new S(null,"reductions","reductions",549963952,null),tf=new S(null,"size","size",-1555742762,null),wC=new S(null,"rsubseq","rsubseq",-710070471,null),dC=new S(null,"chunk-next","chunk-next",-547810434,null),pG=new S(null,"*read-eval*","*read-eval*",1122065414,null),pC=new S(null,"subseq","subseq",-1558995241,null),Zo=new S(null,"s1","s1",338671490,null),vC=new S(null,"double-array","double-array",257035726,null),tm=new S(null,"s2","s2",614604262,null),Qrn=new F(null,"not-delivered","not-delivered",1599158697),D6=new S(null,"select","select",-1506602266,null),LI=new F(null,"miser-width","miser-width",-1310049437),Grn=new S(null,"root","root",1191874074,null),yC=new S(null,"vswap!","vswap!",-574070781,null),wr=new S(null,"args","args",-1338879193,null),k1=new S(null,"re","re",1869207729,null),Jrn=new S(null,"rf","rf",-651557526,null),jC=new S(null,"every-pred","every-pred",-1346958247,null),xC=new S(null,"pr-str","pr-str",-2066912145,null),kC=new S(null,"requiring-resolve","requiring-resolve",-1888505231,null),SC=new S(null,"ns-imports","ns-imports",1111168888,null),M6=new S(null,"var__30584__auto__","var__30584__auto__",-1534826325,null),Krn=new S(null,"-create-record-type","-create-record-type",-1472918739,null),Brn=new S(null,"sb","sb",-1249746442,null),dv=new S(null,"sc","sc",-1506412737,null),By=new S(null,"with-local-vars","with-local-vars",837642072,null),OC=new S(null,"unchecked-dec","unchecked-dec",2095823150,null),CC=new S(null,"partition","partition",-1479695018,null),Xrn=new S(null,"cljs.core.ISwap","cljs.core.ISwap",2045511362,null),AC=new S(null,"list","list",-1889078086,null),EC=new S(null,"hash-combine","hash-combine",1136881997,null),$6=new S(null,"ends-with?","ends-with?",-346570208,null),pv=new S(null,"arg1","arg1",-1702536411,null),ba=new F(null,"postprocess","postprocess",-1863762881),N6=new S(null,"arg2","arg2",-924884852,null),Gq=new S(null,"arg3","arg3",153709031,null),RC=new S(null,"eval","eval",536963622,null),PC=new S(null,"nat-int?","nat-int?",-1879663400,null),Frn=new S("cljs.core","seq-to-map-for-destructuring","cljs.core/seq-to-map-for-destructuring",240595294,null),q6=new S(null,"to","to",1832630534,null),L6=new S(null,"superset?","superset?",2074872204,null),Hrn=new S("cljs.tools.reader.edn","read-symbolic-value","cljs.tools.reader.edn/read-symbolic-value",111468855,null),Ms=new S(null,"new","new",-444906321,null),Bl=new S(null,"clojure.core","clojure.core",-189332625,null),Zrn=new S("cljs.core","with-meta","cljs.core/with-meta",749126446,null),IC=new S(null,"second","second",1195829517,null),brn=new S(null,"lift-ns","lift-ns",602311926,null),Jq=new S(null,"keyword-fn","keyword-fn",1575964852,null),_C=new S(null,"partition-by","partition-by",-1329938249,null),u1=new F(null,"allows-separator","allows-separator",-818967742),yd=new F(null,"list","list",765357683),yp=new S("cljs.core","seq","cljs.core/seq",-1649497689,null),Xy=new F(null,"buffering","buffering",-876713613),Kq=new F(null,"arg1","arg1",951899358),Hu=new F(null,"base-args","base-args",-1268706822),Bq=new F(null,"arg3","arg3",-1486822496),nun=new F(null,"end-row","end-row",-545103581),Xq=new F(null,"arg2","arg2",1729550917),TC=new S(null,"sorted-map","sorted-map",-521216771,null),tun=new S(null,"idxv","idxv",-1163260636,null),DC=new S(null,"peek","peek",1349135202,null),MC=new S(null,"refer","refer",676235974,null),WI=new S("cljs.core","update","cljs.core/update",-908565906,null),vG=new S(null,"vol","vol",1137570949,null),jp=new S("cljs.core","not=","cljs.core/not=",1017572457,null),ua=new F(null,"commainterval","commainterval",-1980061083),$C=new S(null,"unchecked-multiply","unchecked-multiply",-1019161490,null),eun=new S(null,"idxs","idxs",-2145941206,null),yG=new S(null,"goog.string.StringBuffer","goog.string.StringBuffer",-1220229842,null),NC=new S(null,"simple-keyword?","simple-keyword?",-367134735,null),jG=new S(null,"clojure.string","clojure.string",-1415552165,null),Jd=new S(null,"end","end",1372345569,null),qC=new S(null,"extend","extend",-817951763,null),Fq=new S(null,"args__25066__auto__","args__25066__auto__",-394325402,null),xG=new S("cljs.core","constantly","cljs.core/constantly",119002258,null),Hq=new S(null,"quoted-sym","quoted-sym",474507191,null),kG=new S("cljs.core","concat","cljs.core/concat",-1133584918,null),LC=new S(null,"delay","delay",1066306308,null),WC=new S(null,"halt-when","halt-when",-140999689,null),SG=new F("sci.impl.analyzer","method-name","sci.impl.analyzer/method-name",-842600667),lun=new S("cljs.core","bound-fn*","cljs.core/bound-fn*",-556238942,null),VC=new S(null,"macroexpand-1","macroexpand-1",659241329,null),zC=new S(null,"merge-with","merge-with",1025434534,null),Zq=new S(null,"eof","eof",1151468290,null),run=new S(null,"new-value","new-value",-1567397401,null),wh=new S(null,"meth__25375__auto__","meth__25375__auto__",2089847902,null),UC=new S(null,"simple-ident?","simple-ident?",194189851,null),YC=new S(null,"chunk-rest","chunk-rest",-1853526420,null),bq=new S(null,"xs","xs",-2004992428,null),QC=new S(null,"byte","byte",-1970660549,null),GC=new S(null,"complement","complement",-913606051,null),Fy=new S(null,"hash","hash",1626749931,null),uun=new S(null,"rsym","rsym",204230332,null),iun=new S(null,"idx2","idx2",195459820,null),JC=new S(null,"keyword","keyword",-1843046022,null),sun=new F(null,"right-margin","right-margin",-810413306),oun=new S(null,"ys","ys",1606115702,null),KC=new S(null,"identical?","identical?",-745864205,null),BC=new S(null,"array-map","array-map",1555038968,null),nL=new S(null,"method-cache__24953__auto__","method-cache__24953__auto__",1061133143,null),XC=new S(null,"with-meta","with-meta",73674707,null),FC=new S(null,"trampoline","trampoline",-71368916,null),Hy=new F(null,"buffer-blob","buffer-blob",-1830112173),HC=new S(null,"bound-fn","bound-fn",125411266,null),aun=new S(null,"function","function",-486723946,null),tL=new F("edamame.impl.parser","fn-literal","edamame.impl.parser/fn-literal",-1835933155),ZC=new S(null,"min","min",2085523049,null),bC=new S(null,"unsigned-bit-shift-right","unsigned-bit-shift-right",-1953076601,null),nA=new S(null,"min-key","min-key",246826648,null),W6=new S(null,"postwalk-replace","postwalk-replace",77744733,null),D3=new F("sci.impl","print-method","sci.impl/print-method",281191566),tA=new S(null,"find-ns","find-ns",-884829568,null),eg=new F(null,"features","features",-1146962336),hun=new S("cljs.core","with-redefs-fn","cljs.core/with-redefs-fn",-1271194088,null),cun=new S(null,"sigs","sigs",-12588095,null),OG=new S(null,"&form","&form",1482799337,null),eA=new S(null,"not-empty","not-empty",2029453590,null),fun=new S(null,"decls","decls",-1311111277,null),eL=new S("cljs.core","assert","cljs.core/assert",1075777968,null),gun=new S(null,"sci.lang.Type","sci.lang.Type",-534180168,null),lA=new S(null,"find-var","find-var",-497901917,null),rA=new S(null,"with-out-str","with-out-str",-140201577,null),Zy=new S(null,"with-open","with-open",172119667,null),mun=new S("cljs.tools.reader.impl.commons","number-literal?","cljs.tools.reader.impl.commons/number-literal?",-1450304800,null),uA=new S(null,"disj","disj",-1076545178,null),lL=new S(null,"default__25064__auto__","default__25064__auto__",790458434,null),Ai=new F(null,"iden->invoke-idx","iden->invoke-idx",-1797627026),iA=new S(null,"distinct?","distinct?",-1684357959,null),zm=new F("sci.impl","fast-path","sci.impl/fast-path",1273254676),sA=new S(null,"unchecked-long","unchecked-long",1306610949,null),VI=new S("cljs.core","first","cljs.core/first",-752535972,null),wun=new S("cljs.core","lift-ns","cljs.core/lift-ns",463499081,null),CG=new S("cljs.core","nth","cljs.core/nth",1961052085,null),Mw=new S(null,"vals","vals",-1886377036,null),zI=new F(null,"rename","rename",1508157613),oA=new S(null,"intern","intern",1664352151,null),dun=new S(null,"-mutate","-mutate",-795549165,null),pun=new S("cljs.core","unchecked-inc-int","cljs.core/unchecked-inc-int",-2007014592,null),aA=new S(null,"qualified-ident?","qualified-ident?",-928894763,null),vun=new F(null,"lines","lines",-700165781),AG=new F(null,"ex-idx","ex-idx",795118805),V6=new S(null,"project","project",-1530041190,null),Cu=new F(null,"tag","tag",-1290361223),EG=new F(null,"indent-t","indent-t",528318969),yun=new S("cljs.core","chunk-buffer","cljs.core/chunk-buffer",14093626,null),hA=new S(null,"loaded-libs","loaded-libs",484141875,null),cA=new S(null,"with-redefs-fn","with-redefs-fn",-595725379,null),fA=new S(null,"dedupe","dedupe",-461856254,null),$s=new F(null,"regex","regex",939488856),gA=new S(null,"record?","record?",-1305224237,null),Oc=new F(null,"var-arg-name","var-arg-name",-1100024887),jun=new S("sci.impl.records","-create-record-type","sci.impl.records/-create-record-type",558578550,null),xp=new S(null,"loop*","loop*",615029416,null),mA=new S(null,"defmulti","defmulti",1936112154,null),xun=new F(null,"verbose","verbose",1694226060),em=new S(null,"method__25061__auto__","method__25061__auto__",852271316,null),lm=new S(null,"then","then",2101129597,null),wA=new S(null,"cycle","cycle",-1944070485,null),kun=new S(null,"inner","inner",257360312,null),Sun=new F("sci","type","sci/type",1175422389),RG=new S(null,"*assert*","*assert*",1479636474,null),dA=new S(null,"some->>","some->>",-1499987794,null),ft=new F("sci.impl.analyzer","recur","sci.impl.analyzer/recur",2033369355),ro=new S("cljs.core","apply","cljs.core/apply",1757277831,null),rL=new S(null,"quoted","quoted",-537090817,null),pA=new S(null,"var?","var?",230455531,null),jd=new F(null,"right-params","right-params",-1790676237),at=new F(null,"colon","colon",-965200945),by=new S(null,"if-not","if-not",-265415609,null),Ns=new F(null,"aliases","aliases",1346874714),Af=new S(null,"keys","keys",-1586012071,null),uL=new F("cljs.core","not-found","cljs.core/not-found",-1572889185),z6=new S(null,"args__25053__auto__","args__25053__auto__",-1756835926,null),vA=new S(null,"pos-int?","pos-int?",-1205815015,null),Oun=new S("cljs.core","resolve","cljs.core/resolve",1796776582,null),bo=new S(null,"c1","c1",-1521904966,null),yA=new S(null,"simple-symbol?","simple-symbol?",1408454822,null),$o=new F(null,"fixed-arity","fixed-arity",1586445869),dh=new S(null,"c2","c2",78651156,null),vv=new S(null,"c3","c3",468715789,null),UI=new S("cljs.core","when-not","cljs.core/when-not",-556141047,null),Cun=new F(null,"declared","declared",92336021),jA=new S(null,"-write","-write",1999625154,null),xd=new F(null,"vector","vector",1902966158),xA=new S(null,"tagged-literal?","tagged-literal?",1117865390,null),Ar=new F(null,"bindings","bindings",1271397192),kA=new S(null,"vreset!","vreset!",1237177091,null),SA=new S(null,"realized?","realized?",207229341,null),OA=new S(null,"symbol","symbol",601958831,null),Aun=new S(null,"cf","cf",-1173699459,null),CA=new S(null,"clj->js","clj->js",-1880244676,null),U6=new S(null,"trim-newline","trim-newline",656815794,null),AA=new S(null,"fnext","fnext",1424835295,null),EA=new S(null,"rseq","rseq",-1719353554,null),kd=new S(null,"finally","finally",-1065347064,null),Eun=new S(null,"parse-symbol","parse-symbol",1608073451,null),nh=new F(null,"func","func",-238706040),iL=new S(null,"msg","msg",254428083,null),RA=new S(null,"vec","vec",982683596,null),Y6=new S(null,"prewalk","prewalk",1337993264,null),sL=new F("edamame.core","eof","edamame.core/eof",1855384188),zu=new F(null,"dynamic","dynamic",704819571),PA=new S(null,"hash-set","hash-set",-1145168432,null),je=new S(null,"do","do",1686842252,null),Run=new S(null,"f1","f1",-939903380,null),Pun=new S(null,"f2","f2",2036700123,null),Iun=new S(null,"f3","f3",-699606726,null),IA=new S(null,"if-some","if-some",1960677609,null),_A=new S(null,"take-while","take-while",2007268328,null),_un=new F(null,"self-ref?","self-ref?",412808630),TA=new S(null,"push-thread-bindings","push-thread-bindings",1054019843,null),DA=new S(null,"persistent!","persistent!",1286555698,null),YI=new F(null,"invoc-size","invoc-size",2053298058),Tun=new S(null,"seed","seed",1709144854,null),Dun=new S("clojure.core","seq","clojure.core/seq",-1551838743,null),PG=new S(null,"clojure.edn","clojure.edn",-302325352,null),MA=new S(null,"the-ns","the-ns",1016317907,null),Bt=new S(null,"quote","quote",1377916282,null),Mun=new F(null,"last","last",1105735132),$un=new F(null,"preserve","preserve",1276846509),$A=new S(null,"qualified-keyword?","qualified-keyword?",375456001,null),NA=new S(null,"char?","char?",-1072221244,null),IG=new S(null,"*in*","*in*",1130010229,null),am=new S(null,"idx","idx",-1600747296,null),Q6=new S(null,"intersection","intersection",-650544759,null),kp=new S(null,"ex","ex",226760186,null),Nun=new S("cljs.core","*ns*","cljs.core/*ns*",1155497085,null),G6=new S(null,"and__30354__auto__","and__30354__auto__",1739023891,null),qA=new S(null,"derive","derive",1727397303,null),qun=new F(null,"cljs","cljs",1492417629),_G=new S(null,"clojure.template","clojure.template",-1162325089,null),LA=new S(null,"cond->>","cond->>",348844960,null),WA=new S(null,"bit-flip","bit-flip",809639606,null),Di=new F(null,"deref","deref",-145586795),oL=new S(null,"fs","fs",-482394717,null),$w=new S(null,"fn","fn",465265323,null),cf=new S(null,"type","type",-1480165421,null),n5=new S(null,"dotimes","dotimes",-818708397,null),x0=new F(null,"max-iterations","max-iterations",2021275563),J6=new S(null,"subset?","subset?",1551079215,null),VA=new S(null,"map-indexed","map-indexed",-1391025435,null),Lun=new S("clojure.core","deftype","clojure.core/deftype",-1728257017,null),zA=new S(null,"conj","conj",-1127293942,null),aa=new F(null,"char","char",-641587586),Wun=new S("cljs.core","chunk-append","cljs.core/chunk-append",-243671470,null),UA=new S(null,"newline","newline",-864364446,null),YA=new S(null,"cons","cons",755448454,null),QA=new S(null,"neg-int?","neg-int?",-1610409390,null),GA=new S(null,"underive","underive",-242982950,null),Vun=new S("clojure.repl","dir-fn","clojure.repl/dir-fn",901908317,null),zun=new S("cljs.core","ns-name","cljs.core/ns-name",171430027,null),t5=new S(null,"cond","cond",1606708055,null),JA=new S(null,"mod","mod",1510044207,null),aL=new S(null,"keyfn","keyfn",-1874375437,null),hL=new F(null,"proxy-fn","proxy-fn",1116677438),KA=new S(null,"chars","chars",545901210,null),Sp=new S(null,"comp","comp",-1462482139,null),TG=new S("clojure.core","deref","clojure.core/deref",188719157,null),Uun=new F(null,"alt-impl","alt-impl",670969595),BA=new S(null,"inst-ms","inst-ms",-653961375,null),Gi=new S(null,"val","val",1769233139,null),Yun=new S("cljs.core","not","cljs.core/not",100665144,null),wl=new S(null,"var","var",870848730,null),Um=new F(null,"minpad","minpad",323570901),de=new F(null,"logical-block","logical-block",-581022564),XA=new S(null,"dispatch-val","dispatch-val",69061e3,null),DG=new S(null,"seq-exprs","seq-exprs",-637209651,null),Qun=new S(null,"escape-char","escape-char",-2072670949,null),se=new S(null,"if","if",1181717262,null),qn=new S(null,"coll","coll",-1006698606,null),Gun=new S(null,"&env","&env",-919163083,null),FA=new S(null,"drop","drop",2005013138,null),K6=new S(null,"stringify-keys","stringify-keys",1735215919,null),Jun=new S(null,"read-symbolic-value","read-symbolic-value",-100790078,null),HA=new F("sci.impl","op","sci.impl/op",950953978),ZA=new S(null,"keep-indexed","keep-indexed",-2020916352,null),cL=new S(null,"source-fn","source-fn",-1114937984,null),bA=new S(null,"any?","any?",-318999933,null),Uh=new F(null,"string","string",-1989541586),nE=new S(null,"assert","assert",677428501,null),Op=new S("cljs.core","defn","cljs.core/defn",-1606493717,null),MG=new S(null,"uuid","uuid",-504564192,null),Vr=new F(null,"imports","imports",-1249933394),QI=new S(null,"cljs.tools.reader.edn","cljs.tools.reader.edn",-1275821532,null),Kun=new F(null,"dup","dup",556298533),GI=new F("cljs.analyzer","no-resolve","cljs.analyzer/no-resolve",-1872351017),tE=new S(null,"js-obj","js-obj",342383250,null),eE=new S(null,"unchecked-negate","unchecked-negate",-1669067451,null),e5=new S(null,"ex-message","ex-message",-1128293394,null),rm=new S(null,"colls","colls",-397642425,null),Bun=new F(null,"status","status",-1997798413),Xun=new S("cljs.core","ex-info","cljs.core/ex-info",-409744395,null),Fun=new S("js","Array","js/Array",-423508366,null),lE=new S(null,"map-entry?","map-entry?",1140615277,null),yv=new S(null,"iref","iref",-647796531,null),rE=new S(null,"demunge","demunge",-1865491845,null),B6=new S(null,"dir","dir",-919681108,null),uE=new S(null,"LazySeq","LazySeq",1579450882,null),lg=new F(null,"self-ref-idx","self-ref-idx",-1384537812),X6=new S(null,"rename","rename",-1146278156,null),iE=new S(null,"filter","filter",691993593,null),Hun=new S(null,"struct-map","struct-map",-1387540878,null),F6=new S(null,"starts-with?","starts-with?",1014173927,null),$G=new F(null,"end-block-t","end-block-t",1544648735),sE=new S(null,"ex-info","ex-info",-539875240,null),Zun=new S(null,"->record-impl","->record-impl",1274709757,null),bun=new S(null,"deftype*","deftype*",962659890,null),oE=new S(null,"unchecked-remainder-int","unchecked-remainder-int",1427188224,null),aE=new S(null,"interpose","interpose",-2078295140,null),hE=new S(null,"bit-and","bit-and",-479352589,null),fL=new S(null,"aseq","aseq",-1865515628,null),cE=new S(null,"aset","aset",900773178,null),H6=new F(null,"stream","stream",1534941648),fE=new S(null,"false?","false?",-1522377573,null),gL=new S(null,"methods__25054__auto__","methods__25054__auto__",-306338654,null),nin=new F(null,"tag-class","tag-class",714967874),tin=new S("cljs.core","ex-message","cljs.core/ex-message",-747602175,null),gE=new S(null,"shuffle","shuffle",-1393023609,null),mE=new S(null,"string?","string?",-1129175764,null),wE=new S(null,"methods","methods",2094462393,null),as=new F(null,"source-key","source-key",-1325875542),dE=new S(null,"doto","doto",1252536074,null),pE=new S(null,"println","println",-733595439,null),JI=new F(null,"use","use",-1846382424),ein=new S(null,"fnspecs","fnspecs",-958581686,null),Z6=new S(null,"trim","trim",-1880116002,null),ha=new F("edamame.impl.parser","opened-delimiter","edamame.impl.parser/opened-delimiter",1199661648),Mi=new S(null,"def","def",597100991,null),Cc=new F(null,"map","map",1371690461),rt=new F(null,"params","params",710516235),mL=new S(null,"args__26130__auto__","args__26130__auto__",1201862833,null),vE=new S(null,"dec","dec",-766002333,null),M3=new F(null,"max","max",61366548),KI=new F(null,"check-permissions","check-permissions",669054317),yE=new S(null,"chunk-cons","chunk-cons",433801405,null),jE=new S(null,"chunked-seq?","chunked-seq?",1044846168,null),NG=new S(null,"-new-var","-new-var",1200468147,null),lin=new S(null,"doc+methods","doc+methods",2036080922,null),rin=new F(null,"handled","handled",1889700151),xE=new S(null,"ns-unalias","ns-unalias",445102632,null),uin=new S("cljs.core","multi-fn-impl","cljs.core/multi-fn-impl",1399453884,null),qG=new F(null,"bindingx","bindingx",679516896),iin=new S(null,"default","default",-347290801,null),N=new F(null,"doc","doc",1913296891),qs=new F(null,"readers","readers",-2118263030),Ls=new F(null,"quote","quote",-262615245),BI=new S(null,"catch","catch",-1616370245,null),wL=new S(null,"cached-hierarchy__24954__auto__","cached-hierarchy__24954__auto__",2049413325,null),b6=new S(null,"apply-template","apply-template",1809601838,null),kE=new S(null,"coll?","coll?",-1874821441,null),XI=new F(null,"path","path",-188191168),sin=new S("cljs.core","cond->","cljs.core/cond->",-113941356,null),LG=new S(null,"newval","newval",717803975,null),SE=new S(null,"reify","reify",1885539699,null),OE=new S(null,"to-array-2d","to-array-2d",-1563270737,null),oin=new S("clojure.core","apply","clojure.core/apply",1654646389,null),FI=new S("cljs.core","alter-meta!","cljs.core/alter-meta!",574694262,null),nx=new S(null,"includes?","includes?",-2049283381,null),WG=new S("cljs.core","->","cljs.core/->",1488366311,null),dL=new S(null,"m__26131__auto__","m__26131__auto__",1461247313,null),pL=new S("sci.impl.records","->record-impl","sci.impl.records/->record-impl",-1005013370,null),vL=new S(null,"start-test","start-test",687547962,null),S1=new F(null,"separator","separator",-1628749125),rg=new S(null,"map","map",-1282745308,null),CE=new S(null,"max","max",1701898075,null),VG=new S(null,"*default-data-reader-fn*","*default-data-reader-fn*",758795499,null),AE=new S(null,"compare","compare",1109853757,null),EE=new S(null,"multi-fn?-impl","multi-fn?-impl",1372639302,null),ain=new S(null,".close",".close",-1017758745,null),RE=new F("sci.impl","fn","sci.impl/fn",1695180073),$3=new S("clojure.core","unquote","clojure.core/unquote",843087510,null),PE=new S(null,"load-string","load-string",-403739145,null),hin=new F(null,"circle","circle",1903212362),IE=new S(null,"range","range",-1014743483,null),_E=new S(null,"use","use",-205850897,null),ya=new S("cljs.core","if-let","cljs.core/if-let",1346583165,null),tx=new S(null,"index","index",108845612,null),um=new S(null,"x__25057__auto__","x__25057__auto__",-141483252,null),Fs=new S(null,"test","test",-2076896892,null),cin=new S(null,"-Inf","-Inf",-2123243689,null),TE=new S(null,"take","take",871646627,null),Ym=new F("edamame","expected-delimiter","edamame/expected-delimiter",93379254),Me=new F(null,"start-pos","start-pos",668789086),me=new F(null,"flags","flags",1775418075),yL=new S(null,"l__29577__auto__","l__29577__auto__",-1213400782,null),jL=new S(null,"meta__25059__auto__","meta__25059__auto__",-2019058713,null),DE=new S(null,"dorun","dorun",560426022,null),Nw=new F(null,"splicing?","splicing?",-428596366),xL=new F(null,"variadic","variadic",882626057),ah=new F(null,"test","test",577538877),N3=new F(null,"fill","fill",883462889),ME=new S(null,"*print-newline*","*print-newline*",1478078956,null),fe=new F(null,"file","file",-1269645878),fin=new F(null,"buffer-block","buffer-block",-10937307),jv=new S("cljs.core","rest","cljs.core/rest",-285075455,null),gin=new S(null,"number","number",-1084057331,null),min=new S("sci.impl.deftype","->type-impl","sci.impl.deftype/->type-impl",-2121297742,null),$E=new S(null,"chunk-buffer","chunk-buffer",789680287,null),NE=new S(null,"reversible?","reversible?",314107817,null),qE=new S(null,"ns-publics","ns-publics",903350436,null),ve=new F(null,"generator-fn","generator-fn",811851656),kL=new F(null,"loading","loading",-737050189),win=new S(null,"body-expr","body-expr",-2125506601,null),zG=new S("clojure.core","defrecord","clojure.core/defrecord",581689476,null),Kd=new S(null,"xrel","xrel",-735800081,null),LE=new S(null,"bit-and-not","bit-and-not",-254338837,null),UG=new S("cljs.core","->>","cljs.core/->>",-1207871206,null),din=new F(null,"resolve-sym","resolve-sym",-1193683260),WE=new S(null,"longs","longs",-1017696020,null),YG=new S(null,"cljs.tools.reader.impl.commons","cljs.tools.reader.impl.commons",1569241026,null),i1=new S(null,"init","init",-234949907,null),ex=new S(null,"split-lines","split-lines",777513935,null),QG=new S(null,"queue","queue",-1198599890,null),pin=new F(null,"eofthrow","eofthrow",-334166531),vin=new S(null,"keyseq","keyseq",-1822150828,null),VE=new S(null,"some","some",-310548046,null),lx=new S(null,"doc","doc",-741138878,null),yin=new S(null,"print-doc","print-doc",528043232,null),zE=new S(null,"declare","declare",654042991,null),No=new F(null,"start-col","start-col",668080143),GG=new F(null,"level","level",1290497552),Qm=new S("cljs.core","type","cljs.core/type",-821761154,null),JG=new F("sci.impl","idx","sci.impl/idx",700902278),jin=new S("cljs.core","cons","cljs.core/cons",96507417,null),KG=new S(null,"clojure.set","clojure.set",-630955632,null),HI=new F(null,"meta","meta",1499536964),SL=new S(null,"m__25055__auto__","m__25055__auto__",-104303537,null),ZI=new S("cljs.core","conj","cljs.core/conj",-460750931,null),xin=new S("edamame.core","read-eval","edamame.core/read-eval",1461005554,null),UE=new S(null,"floats","floats",513591110,null),YE=new S(null,"with-bindings*","with-bindings*",-93186207,null),kin=new S(null,"zs","zs",-257004521,null),QE=new S(null,"satisfies?","satisfies?",-433227199,null),rx=new S(null,"walk","walk",1673453164,null),Sin=new S("clojure.core","hash-map","clojure.core/hash-map",338908405,null),GE=new S(null,"pop","pop",-94247249,null),Oin=new S(null,"token","token",429068312,null),ja=new F(null,"w","w",354169001),BG=new F("sci","record","sci/record",-778731026),OL=new S(null,"dir-fn","dir-fn",187684626,null),Gm=new F(null,"ancestors","ancestors",-776045424),Ch=new F(null,"n","n",562130025),bv=new S(null,"has-root-impl","has-root-impl",-288948659,null),XG=new S(null,"sci.impl.deftype","sci.impl.deftype",959784924,null),xv=new S(null,"x__25065__auto__","x__25065__auto__",332413977,null),Cin=new S("cljs.core","Delay","cljs.core/Delay",-21574999,null),Zu=new F(null,"def","def",-1043430536),Ain=new S(null,"more-sizes","more-sizes",-763736162,null),JE=new S(null,"seq-to-map-for-destructuring","seq-to-map-for-destructuring",647384515,null),Bd=new S(null,"keyvals","keyvals",-2067234787,null),Ein=new S(null,"defrecord*","defrecord*",-1936366207,null),KE=new S(null,"reduce","reduce",1358839360,null),ux=new S(null,"method__25067__auto__","method__25067__auto__",1988388911,null),BE=new S(null,"dissoc!","dissoc!",333592624,null),ix=new S(null,"postwalk","postwalk",967039904,null),FG=new S(null,"reify*","reify*",1646945123,null),Jm=new F(null,"k","k",-2146297393),Rin=new S("cljs.tools.reader.edn","read-char*","cljs.tools.reader.edn/read-char*",-606185164,null),qw=new F(null,"f","f",-1597136552),Pin=new F(null,"invocation-self-idx","invocation-self-idx",-1258983407),Iin=new S("cljs.core","var-get","cljs.core/var-get",-91823622,null),l5=new F(null,"e","e",1381269198),XE=new S(null,"alter-meta!","alter-meta!",1510444945,null),xa=new F(null,"d","d",1972142424),FE=new S(null,"float?","float?",673884616,null),sx=new S(null,"difference","difference",-738334373,null),_in=new S(null,"read-date","read-date",1874308181,null),Km=new S(null,"replace","replace",853943757,null),HE=new S(null,"mapcat","mapcat",-601348859,null),Ia=new F(null,"overflowchar","overflowchar",-1620088106),ZE=new S(null,"chunk-first","chunk-first",1379046752,null),HG=new F(null,"min-remaining","min-remaining",962687677),Lw=new S("cljs.core","get","cljs.core/get",-296075407,null),bE=new S(null,"prn","prn",1561684909,null),ia=new F(null,"commachar","commachar",652859327),CL=new S(null,"match","match",-1434376219,null),Ww=new S(null,"let*","let*",1920721458,null),n2=new F(null,"reload-all","reload-all",761570200),AL=new S(null,"v__29677__auto__","v__29677__auto__",-1333437830,null),nR=new S(null,"deftype","deftype",1980826088,null),ZG=new S("cljs.core","hash-map","cljs.core/hash-map",303385767,null),tR=new S(null,"doall","doall",988520834,null),ox=new S(null,"or__30317__auto__","or__30317__auto__",470056421,null),Bm=new S(null,"objs","objs",-170194107,null),Pu=new F(null,"row-key","row-key",-1189010712),Sg=new S(null,"try","try",-1273693247,null),bI=new S("clojure.core","unquote-splicing","clojure.core/unquote-splicing",-552003150,null),eR=new S(null,"special-symbol?","special-symbol?",-731144617,null),Tin=new S(null,"cljs.core.IDeref","cljs.core.IDeref",-783543206,null),Din=new F(null,"keyword-fn","keyword-fn",-64566675),Ac=new F(null,"recur-target","recur-target",-1909494536),Vw=new F(null,"section","section",-300141526),lR=new S(null,"eduction","eduction",1445227968,null),rR=new S(null,"make-hierarchy","make-hierarchy",-241558556,null),Vi=new F(null,"private","private",-558947994),wu=new F(null,"refers","refers",158076809),s1=new S(null,"comparator","comparator",-509539107,null),bG=new S(null,"clojure.repl","clojure.repl",570897595,null),ax=new S(null,"meth__25531__auto__","meth__25531__auto__",-948033356,null),Min=new F("sci.impl","required-fn","sci.impl/required-fn",2082701278),Xm=new S(null,"reverse","reverse",752076261,null),nJ=new F(null,"require","require",-468001333),uR=new S(null,"some?","some?",234752293,null),iR=new S(null,"random-sample","random-sample",-914181101,null),uf=new F(null,"pretty","pretty",-1916372486),dr=new S(null,"pred","pred",-727012372,null),EL=new S(null,"prefer-table__24952__auto__","prefer-table__24952__auto__",-1833928743,null),sR=new S(null,"namespace","namespace",1263021155,null),$in=new S(null,"type->str","type->str",360030041,null),Nin=new S(null,"cljs.core.IReset","cljs.core.IReset",348905844,null),r5=new S(null,"let","let",358118826,null),qin=new S(null,"string","string",-349010059,null),Xd=new S(null,"x__25052__auto__","x__25052__auto__",-657673773,null),Lin=new F(null,"loc","loc",-584284901),tJ=new S(null,"import","import",241030818,null),oR=new S(null,"undefined?","undefined?",1356377224,null),qo=new F(null,"refer","refer",-964295553),aR=new S(null,"require","require",1172530194,null),hR=new S(null,"assoc","assoc",2071440380,null),cR=new S(null,"ns-unmap","ns-unmap",1255260993,null),fR=new S(null,"drop-last","drop-last",-1123611530,null),O1=new S(null,"clauses","clauses",-1199594528,null),gR=new S(null,"split-at","split-at",-60953742,null),RL=new S(null,"map-entry","map-entry",329617471,null),Win=new F(null,"validator","validator",-1966190681),Vin=new S(null,"eof-error?","eof-error?",863128689,null),eJ=new S(null,"-reified-methods","-reified-methods",1702712518,null),Ws=new F(null,"parent","parent",-878878779),mR=new S(null,"subvec","subvec",364611032,null),hx=new S(null,"a__29576__auto__","a__29576__auto__",680593664,null),wR=new S(null,"multi-fn-impl","multi-fn-impl",187651105,null),Iu=new F(null,"syntax-quote","syntax-quote",-1233164847),dR=new S(null,"aclone","aclone",722978531,null),Fm=new F("edamame.impl.parser","expected-delimiter","edamame.impl.parser/expected-delimiter",2057965803),ct=new F(null,"namespaces","namespaces",-1444157469),ou=new F(null,"clauses","clauses",1454841241),lJ=new S(null,"toString","toString",-95766347,null),cx=new S(null,"split","split",1041096409,null),u5=new S(null,"defonce","defonce",-1681484013,null),pR=new S(null,"bit-shift-right","bit-shift-right",884046498,null),rJ=new S("cljs.core","pr-str","cljs.core/pr-str",-552799478,null),ug=new S("cljs.core","str","cljs.core/str",-1971828991,null),vR=new S(null,"integer?","integer?",1303791671,null),yR=new S(null,"transient","transient",899115069,null),Yt=new F(null,"base","base",185279322),$i=new F(null,"end-col-key","end-col-key",81813304),jR=new S(null,"identity","identity",-1007039734,null),PL=new S(null,"v__30583__auto__","v__30583__auto__",-651395364,null),IL=new S(null,"from-index","from-index",1882766240,null),zin=new S("clojure.core","concat","clojure.core/concat",-1236478952,null),xR=new S(null,"last","last",-1548700637,null),Uin=new F(null,"no-test","no-test",-1679482642),uJ=new S(null,"*ns*","*ns*",740153818,null),Yin=new F(null,"character","character",380652989),ym=new S(null,"forms","forms",-608443419,null),kR=new S(null,"PersistentQueue","PersistentQueue",-160870792,null),Cp=new S("cljs.core","<","cljs.core/<",1677496129,null),Qin=new F(null,">>",">>",-277509267),SR=new S(null,"while","while",-1691317983,null),_L=new S(null,"m__25374__auto__","m__25374__auto__",2134041676,null),Gin=new S("cljs.core","=","cljs.core/=",-1891498332,null),Jin=new S(null,"-pr-writer","-pr-writer",-445354136,null),pe=new F(null,"type-tag","type-tag",-1873863267),OR=new S(null,"bit-test","bit-test",543456753,null),fx=new F(null,"namespaced-map","namespaced-map",1235665380),Kin=new S(null,"locking","locking",1542862874,null),Eh=new F(null,"pre","pre",2118456869),Bin=new S(null,"proc","proc",-643106804,null),TL=new S(null,"prob","prob",1133230269,null),DL=new F(null,"min-varargs","min-varargs",1999010596),n_=new S(null,"expand-dot*","expand-dot*",-1946890561,null),iJ=new S(null,"*err*","*err*",2070937226,null),CR=new S(null,"char","char",998943941,null),Xin=new S("clojure.core","vec","clojure.core/vec",146271141,null),sJ=new F("sci.impl","var","sci.impl/var",-2041185552),oJ=new S(null,"Object","Object",61210754,null),gx=new S(null,"ns__30585__auto__","ns__30585__auto__",-1867359978,null),Fin=new F("sci.impl.namespaces","TODO","sci.impl.namespaces/TODO",-1842365958),AR=new S(null,"group-by","group-by",1261391725,null),ER=new S(null,"unchecked-divide-int","unchecked-divide-int",1613116468,null),RR=new S(null,"flatten","flatten",-1441633353,null),Hin=new S("cljs.core","var?","cljs.core/var?",1711182854,null),PR=new S(null,"unchecked-short","unchecked-short",27848057,null),Ue=new F(null,"pos","pos",-864607220),IR=new S(null,"sequence","sequence",-1727628355,null),_R=new S(null,"quot","quot",-1125214196,null),aJ=new S("cljs.core","zipmap","cljs.core/zipmap",-1902130674,null),Zin=new F(null,"suppress-namespaces","suppress-namespaces",2130686956),mx=new S(null,"temp__29467__auto__","temp__29467__auto__",1506091070,null),TR=new S(null,"tree-seq","tree-seq",-1800921632,null),DR=new S(null,"*print-namespace-maps*","*print-namespace-maps*",-1759108415,null),ML=new S(null,"a__29571__auto__","a__29571__auto__",1439917511,null),hh=new F(null,"end-line","end-line",1837326455),bin=new S("cljs.core","-reified-methods","cljs.core/-reified-methods",-1833109469,null),MR=new S(null,"some-fn","some-fn",-490044165,null),$R=new S(null,"ns-name","ns-name",-436814796,null),Ss=new S("cljs.core","get-method","cljs.core/get-method",-487793502,null),NR=new S(null,"munge","munge",-174396700,null),qR=new F(null,"while","while",963117786),Hr=new F(null,"cur","cur",1153190599),i5=new S(null,"resolve","resolve",56086045,null),LR=new S(null,"repeatedly","repeatedly",1199964457,null),s5=new S(null,"in-ns","in-ns",-2089468466,null),th=new F(null,"macro","macro",-867863404),nsn=RegExp("([\\uD800-\\uDBFF])([\\uDC00-\\uDFFF])","g"),Sd=function t(n){switch(arguments.length){case 1:return t.h(arguments[0]);case 2:return t.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Sd.h=function(t){var n=new rl;for(t=E(t);;)if(t!=null)n=n.append(M.h(j(t))),t=A(t);else return n.toString()};Sd.g=function(t,n){var e=new rl;for(n=E(n);;)if(n!=null)e.append(M.h(j(n))),n=A(n),n!=null&&e.append(t);else return e.toString()};Sd.l=2;var Lo=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Lo.g=function(t,n){return Lo.i(t,n,0)};Lo.i=function(t,n,e){if(M.h(n)==="/(?:)/")n=Mb(t,e);else if(1>e)n=_n(M.h(t).split(n));else n:for(var l=e,r=Yn;;){if(l===1){n=In.g(r,t);break n}var u=Ju(n,t);if(u!=null){var i=t.indexOf(u);u=t.substring(i+an(u)),--l,r=In.g(r,t.substring(0,i)),t=u}else{n=In.g(r,t);break n}}if(e===0&&1t?null:t};q3.i=function(t,n,e){return t=t.indexOf(n,e),0>t?null:t};q3.l=3;var Gc=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Gc.g=function(t,n){return t=t.lastIndexOf(n),0>t?null:t};Gc.i=function(t,n,e){return t=t.lastIndexOf(n,e),0>t?null:t};Gc.l=3;p=pf.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"splicing?":return this.Lb;case"form":return this.form;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.tools.reader.impl.utils.ReaderConditional{",", ","}",e,D.g(new v(null,2,5,y,[new v(null,2,5,y,[Nw,this.Lb],null),new v(null,2,5,y,[_w,this.form],null)],null),this.G))};p.Wa=function(){return new yu(this,2,new v(null,2,5,y,[Nw,_w],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 2+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=-209062840^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.Lb,n.Lb)&&X.g(this.form,n.form)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,2,[Nw,null,_w,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new pf(this.Lb,this.form,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"splicing?":case"form":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(Nw,n):on.call(null,Nw,n))?new pf(e,this.form,this.J,this.G,null):x(on.g?on.g(_w,n):on.call(null,_w,n))?new pf(this.Lb,e,this.J,this.G,null):new pf(this.Lb,this.form,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,2,5,y,[new Ln(Nw,this.Lb),new Ln(_w,this.form)],null),this.G))};p.W=function(t,n){return new pf(this.Lb,this.form,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p.Z=On;p.M=function(t,n,e){return Rn(n,["#?",x(this.Lb)?"@":null].join("")),ot(this.form,n,e)};var tsn=/[\s]/;et.h(0);Z5.prototype.K=function(){if(this.je>this.Hc){var t=this.R.charAt(this.Hc);return this.Hc+=1,t}return null};Z5.prototype.jb=function(){return this.je>this.Hc?this.R.charAt(this.Hc):null};l0.prototype.K=function(){var t=this.vbt?'..."':'"',l=n.length;return['"',M.h(n.substring(0,t"});nr.Sa(null,uh,function(){return""});nr.Sa(null,Ca,function(){return""});nr.Sa(null,Na,function(){return""});nr.Sa(null,Mt,function(){return""});nr.Sa(null,iQ,function(){return"nil"});nr.Sa(null,yd,function(t,n){return n3(t,n,"(",")")});nr.Sa(null,Cc,function(t,n){var e=an(n),l=x(t)?0:e;return n=dn.g(D,Cr.g(l,n)),n3(t,n,"{",e>l?"...}":"}")});nr.Sa(null,Sc,function(t,n){return n3(t,n,"#{","}")});nr.Sa(null,xd,function(t,n){return n3(t,n,"[","]")});nr.Sa(null,Gt,function(t,n){return Us.j(z([cr(n)]))});var $L=/^([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?$/,NL=/([-+]?[0-9]+)\/([0-9]+)/,qL=/([-+]?[0-9]+(\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?/,k0=function t(n){for(var e=[],l=arguments.length,r=0;r",M.h(l)].join(""),t=$n.h(t);var i=$n.h([M.h(e0(sr())),".",M.h(l)].join(""));n=W3(lh,u);var s=fr(r);return u=_i.j(function(a,o){function h(T){return Up(T)?$n.g(I,M.h(T)):T}a=E(a);var c=j(a);a=A(a),a=J1(j,a);var f=function(){var T=Ar.h(e),$=J(Jc);return $.i?$.i(e,T,c):$.call(null,e,T,c)}(),d=function(){if(x(f))return f;var T=X.g(aJ,c)?fq:null;return x(T)?T:X.g(MQ,c)?_q:null}();x(d)||el(["Protocol not found: ",M.h(c)].join(""),o);var C=vr(d)?J(d):d;o=tu.h(C),x(o)&&ch.j(o,_e,z([v0,Co.g(In,Ke),$n.h(M.h(i))])),o=V.h(C);var I=x(o)?M.h(Tu(o)):X.g(fq,C)?"sci.impl.deftype":null;return Mn.g(function(T){var $=m.i(T,0,null);if(T=m.i(T,1,null),on(_q,C)&&X.g(Kin,$))return L.h(E(D.j(new g(null,FI,null,1,null),new g(null,L.h(E(D.g(new g(null,wl,null,1,null),new g(null,l,null,1,null)))),null,1,null),z([new g(null,A3,null,1,null),new g(null,D3,null,1,null),new g(null,L.h(E(D.g(new g(null,oi,null,1,null),new g(null,rn(j(T)),null,1,null)))),null,1,null)]))));T=Mn.g(rn,T);var G=br.g(function(b){var en=j(b);b=rn(b),en=fY(en,b);var ln=rt.h(en);en=si.h(en),b=j(ln),ln=rn(ln),ln=_n(Dn(j1,ln));var B=ne.m(),O=D.g(new v(null,2,5,y,[B,new g(null,trn,new g(null,j1,null,1,null),2,null)],null),_i.j(function(k){return new v(null,2,5,y,[k,new g(null,Ty,new g(null,B,new g(null,new g(null,Bt,new g(null,k,null,1,null),2,null),null,1,null),2,null),3,null)],null)},z([En.i(Du,s,ln)])));return b=D.g(O,new v(null,2,5,y,[b,j1],null)),b=_n(b),L.h(E(D.g(new g(null,ln,null,1,null),new g(null,L.h(E(D.j(new g(null,yt,null,1,null),new g(null,b,null,1,null),z([en])))),null,1,null))))},T);return T=fn.j(e,xQ,s,z([ZQ,hu(s,Mn.g(function(b){return function(en,ln){return oy(en,b,ln)}},s))])),$=L.h(E(D.j(new g(null,kf,null,1,null),new g(null,h($),null,1,null),z([new g(null,i,null,1,null),G])))),G=J(jJ),G.g?G.g(T,$):G.call(null,T,$)},a)},z([n,u])),L.h(E(D.j(new g(null,je,null,1,null),new g(null,L.h(E(D.j(new g(null,p9,null,1,null),new g(null,l,null,1,null),z([new g(null,t,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,Mi,null,1,null),new g(null,mt(l,new P(null,1,[Oun,!0],null)),null,1,null),z([new g(null,L.h(E(D.g(new g(null,Zen,null,1,null),new g(null,new P(null,4,[xI,new g(null,Bt,new g(null,i,null,1,null),2,null),Mrn,i,_y,new g(null,wl,new g(null,t,null,1,null),2,null),oJ,new g(null,wl,new g(null,l,null,1,null),2,null)],null),null,1,null)))),null,1,null)])))),null,1,null),new g(null,L.h(E(D.j(new g(null,Op,null,1,null),new g(null,t,null,1,null),z([new g(null,_n(L.h(E(D.g(new g(null,Cn,null,1,null),new g(null,sq,null,1,null))))),null,1,null),new g(null,L.h(E(D.j(new g(null,win,null,1,null),new g(null,L.h(E(D.g(new g(null,Bt,null,1,null),new g(null,i,null,1,null)))),null,1,null),z([new g(null,i,null,1,null),new g(null,L.h(E(D.g(new g(null,wl,null,1,null),new g(null,l,null,1,null)))),null,1,null),new g(null,L.h(E(D.j(new g(null,hJ,null,1,null),new g(null,new g(null,Bt,new g(null,r,null,1,null),2,null),null,1,null),z([new g(null,sq,null,1,null)])))),null,1,null)])))),null,1,null)])))),null,1,null),u,new g(null,l,null,1,null)]))))};V3.l=5;V3.o=function(t){var n=j(t),e=A(t);t=j(e);var l=A(e);e=j(l);var r=A(l);l=j(r);var u=A(r);return r=j(u),u=A(u),this.j(n,t,e,l,r,u)};var z3=function t(n){switch(arguments.length){case 3:return t.i(arguments[0],arguments[1],arguments[2]);case 4:return t.u(arguments[0],arguments[1],arguments[2],arguments[3]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};z3.i=function(t,n,e){var l=ad(n);return ch.g(vg(t),function(r){return Fa.i(r,l,e)}),null};z3.u=function(t,n,e,l){return t=ad(e),Fa.i(n,t,l)};z3.l=4;var U3=function t(n){switch(arguments.length){case 3:return t.i(arguments[0],arguments[1],arguments[2]);case 4:return t.u(arguments[0],arguments[1],arguments[2],arguments[3]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};U3.i=function(t,n,e){var l=ad(n);return ch.g(vg(t),function(r){return Aw.i(r,l,e)}),null};U3.u=function(t,n,e,l){return t=ad(e),Aw.i(n,t,l)};U3.l=4;var Y3=function t(n){switch(arguments.length){case 3:return t.i(arguments[0],arguments[1],arguments[2]);case 4:return t.u(arguments[0],arguments[1],arguments[2],arguments[3]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Y3.i=function(t,n,e){return t=J(vg(t)),sd(t,ad(n),e)};Y3.u=function(t,n,e,l){return sd(n,ad(e),l)};Y3.l=4;var Q3=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Q3.g=function(t,n){return t=J(vg(t)),WU(t,n)};Q3.i=function(t,n,e){return WU(n,e)};Q3.l=3;var G3=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};G3.g=function(t,n){return t=J(vg(t)),VU(t,n)};G3.i=function(t,n,e){return VU(n,e)};G3.l=3;var J3=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};J3.g=function(t,n){return t=J(vg(t)),JP(t,n)};J3.i=function(t,n,e){return JP(n,e)};J3.l=3;var K3=function t(n){for(var e=[],l=arguments.length,r=0;r",M.h(l)].join(""),t=$n.h(n),n=$n.h(["map",n].join(""));var i=br.g(Hl,r),s=$n.h([M.h(e0(sr())),".",M.h(l)].join("")),a=W3(lh,u),o=fr(r);return r=_i.j(function(h,c){function f(T){return Up(T)?$n.g(I,M.h(T)):T}h=E(h);var d=j(h);h=A(h),h=J1(j,h);var C=function(){var T=Ar.h(e),$=J(Jc);return $.i?$.i(e,T,d):$.call(null,e,T,d)}();C=x(C)?C:X.g(aJ,d)?Sq:null,x(C)||el(["Protocol not found: ",M.h(d)].join(""),c),c=vr(C)?J(C):C,C=tu.h(c),x(C)&&ch.j(C,_e,z([v0,Co.g(In,Ke),lI(s)])),C=V.h(c);var I=x(C)?M.h(Tu(C)):X.g(Sq,c)?"sci.impl.records":null;return Mn.g(function(T){var $=m.i(T,0,null);return T=m.i(T,1,null),T=Mn.g(rn,T),T=br.g(function(G){var b=j(G);G=rn(G),b=fY(b,G);var en=rt.h(b);b=si.h(b);var ln=j(en),B=rn(en);G=Mr(function(k){return X.g(ln,k)},B);var O=x(G)?ne.h("this_"):ln;return en=x(G)?_n(Dn(O,B)):en,B=_i.j(function(k){return new v(null,2,5,y,[k,new g(null,Hl.h(k),new g(null,O,null,1,null),2,null)],null)},z([En.i(Du,o,en)])),G=x(G)?D.g(B,new v(null,2,5,y,[ln,O],null)):B,G=_n(G),L.h(E(D.g(new g(null,en,null,1,null),new g(null,L.h(E(D.j(new g(null,yt,null,1,null),new g(null,G,null,1,null),z([b])))),null,1,null))))},T),L.h(E(D.j(new g(null,kf,null,1,null),new g(null,f($),null,1,null),z([new g(null,s,null,1,null),T]))))},h)},z([a,u])),L.h(E(D.j(new g(null,je,null,1,null),new g(null,L.h(E(D.j(new g(null,p9,null,1,null),new g(null,l,null,1,null),z([new g(null,t,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.g(new g(null,p9,null,1,null),new g(null,n,null,1,null)))),null,1,null),new g(null,L.h(E(D.j(new g(null,Mi,null,1,null),new g(null,mt(l,new P(null,1,[XG,!0],null)),null,1,null),z([new g(null,L.h(E(D.g(new g(null,xun,null,1,null),new g(null,new P(null,5,[xI,new g(null,Bt,new g(null,s,null,1,null),2,null),qln,!0,_y,new g(null,wl,new g(null,t,null,1,null),2,null),oJ,new g(null,wl,new g(null,l,null,1,null),2,null),IQ,new g(null,wl,new g(null,n,null,1,null),2,null)],null),null,1,null)))),null,1,null)])))),null,1,null),new g(null,L.h(E(D.j(new g(null,Op,null,1,null),new g(null,t,null,1,null),z([new g(null,_n(L.h(E(D.g(new g(null,Cn,null,1,null),new g(null,wL,null,1,null))))),null,1,null),new g(null,L.h(E(D.j(new g(null,vL,null,1,null),new g(null,L.h(E(D.g(new g(null,Bt,null,1,null),new g(null,s,null,1,null)))),null,1,null),z([new g(null,s,null,1,null),new g(null,L.h(E(D.g(new g(null,wl,null,1,null),new g(null,l,null,1,null)))),null,1,null),new g(null,L.h(E(D.j(new g(null,hJ,null,1,null),new g(null,i,null,1,null),z([new g(null,wL,null,1,null)])))),null,1,null)])))),null,1,null)])))),null,1,null),new g(null,L.h(E(D.j(new g(null,Op,null,1,null),new g(null,n,null,1,null),z([new g(null,_n(L.h(E(D.h(new g(null,pL,null,1,null))))),null,1,null),new g(null,L.h(E(D.j(new g(null,vL,null,1,null),new g(null,L.h(E(D.g(new g(null,Bt,null,1,null),new g(null,s,null,1,null)))),null,1,null),z([new g(null,s,null,1,null),new g(null,L.h(E(D.g(new g(null,wl,null,1,null),new g(null,l,null,1,null)))),null,1,null),new g(null,pL,null,1,null)])))),null,1,null)])))),null,1,null),r,new g(null,l,null,1,null)]))))};n4.l=5;n4.o=function(t){var n=j(t),e=A(t);t=j(e);var l=A(e);e=j(l);var r=A(l);l=j(r);var u=A(r);return r=j(u),u=A(u),this.j(n,t,e,l,r,u)};var a1={},Ap=function t(n){switch(arguments.length){case 3:return t.i(arguments[0],arguments[1],arguments[2]);case 4:return t.u(arguments[0],arguments[1],arguments[2],arguments[3]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Ap.i=function(t,n,e){return Ap.u(t,n,null,e)};Ap.u=function(t,n,e,l){return Xn(e)||!Gn(e,l)?(n=w(l,t,n),e=J(yJ),t=e.i?e.i(t,n,!1):e.call(null,t,n,!1),t=Rt(t),t instanceof Ci?null:t):null};Ap.l=4;Il(Jc,Ap);var R0=function t(n){for(var e=[],l=arguments.length,r=0;rinvoke-idx":return this.nb;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#sci.impl.analyzer.FnBody{",", ","}",e,D.g(new v(null,6,5,y,[new v(null,2,5,y,[rt,this.ob],null),new v(null,2,5,y,[si,this.body],null),new v(null,2,5,y,[$o,this.mb],null),new v(null,2,5,y,[Oc,this.rb],null),new v(null,2,5,y,[lg,this.pb],null),new v(null,2,5,y,[Ai,this.nb],null)],null),this.G))};p.Wa=function(){return new yu(this,6,new v(null,6,5,y,[rt,si,$o,Oc,lg,Ai],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 6+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=1733662014^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.ob,n.ob)&&X.g(this.body,n.body)&&X.g(this.mb,n.mb)&&X.g(this.rb,n.rb)&&X.g(this.pb,n.pb)&&X.g(this.nb,n.nb)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,6,[Oc,null,rt,null,lg,null,$o,null,Ai,null,si,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new vs(this.ob,this.body,this.mb,this.rb,this.pb,this.nb,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"params":case"body":case"fixed-arity":case"var-arg-name":case"self-ref-idx":case"iden->invoke-idx":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(rt,n):on.call(null,rt,n))?new vs(e,this.body,this.mb,this.rb,this.pb,this.nb,this.J,this.G,null):x(on.g?on.g(si,n):on.call(null,si,n))?new vs(this.ob,e,this.mb,this.rb,this.pb,this.nb,this.J,this.G,null):x(on.g?on.g($o,n):on.call(null,$o,n))?new vs(this.ob,this.body,e,this.rb,this.pb,this.nb,this.J,this.G,null):x(on.g?on.g(Oc,n):on.call(null,Oc,n))?new vs(this.ob,this.body,this.mb,e,this.pb,this.nb,this.J,this.G,null):x(on.g?on.g(lg,n):on.call(null,lg,n))?new vs(this.ob,this.body,this.mb,this.rb,e,this.nb,this.J,this.G,null):x(on.g?on.g(Ai,n):on.call(null,Ai,n))?new vs(this.ob,this.body,this.mb,this.rb,this.pb,e,this.J,this.G,null):new vs(this.ob,this.body,this.mb,this.rb,this.pb,this.nb,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,6,5,y,[new Ln(rt,this.ob),new Ln(si,this.body),new Ln($o,this.mb),new Ln(Oc,this.rb),new Ln(lg,this.pb),new Ln(Ai,this.nb)],null),this.G))};p.W=function(t,n){return new vs(this.ob,this.body,this.mb,this.rb,this.pb,this.nb,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};var Osn=function t(n,e,l,r){if(10",M.h(l)].join(""),t=$n.h(t);var i=$n.h([M.h(e0(sr())),".",M.h(l)].join(""));n=W3(lh,u);var s=fr(r);return u=_i.j(function(a,o){function h(T){return Up(T)?$n.g(I,M.h(T)):T}a=E(a);var c=j(a);a=A(a),a=J1(j,a);var f=function(){var T=Ar.h(e),$=J(Jc);return $.i?$.i(e,T,c):$.call(null,e,T,c)}(),d=function(){if(x(f))return f;var T=X.g(oJ,c)?cq:null;return x(T)?T:X.g(DQ,c)?Iq:null}();x(d)||el(["Protocol not found: ",M.h(c)].join(""),o);var C=vr(d)?J(d):d;o=tu.h(C),x(o)&&ch.j(o,_e,z([v0,Co.g(In,Ke),$n.h(M.h(i))])),o=V.h(C);var I=x(o)?M.h(Tu(o)):X.g(cq,C)?"sci.impl.deftype":null;return Mn.g(function(T){var $=m.i(T,0,null);if(T=m.i(T,1,null),on(Iq,C)&&X.g(Jin,$))return L.h(E(D.j(new g(null,FI,null,1,null),new g(null,L.h(E(D.g(new g(null,wl,null,1,null),new g(null,l,null,1,null)))),null,1,null),z([new g(null,A3,null,1,null),new g(null,D3,null,1,null),new g(null,L.h(E(D.g(new g(null,oi,null,1,null),new g(null,rn(j(T)),null,1,null)))),null,1,null)]))));T=Mn.g(rn,T);var G=br.g(function(b){var en=j(b);b=rn(b),en=cY(en,b);var ln=rt.h(en);en=si.h(en),b=j(ln),ln=rn(ln),ln=_n(Dn(j1,ln));var B=ne.m(),O=D.g(new v(null,2,5,y,[B,new g(null,nrn,new g(null,j1,null,1,null),2,null)],null),_i.j(function(k){return new v(null,2,5,y,[k,new g(null,Ty,new g(null,B,new g(null,new g(null,Bt,new g(null,k,null,1,null),2,null),null,1,null),2,null),3,null)],null)},z([En.i(Du,s,ln)])));return b=D.g(O,new v(null,2,5,y,[b,j1],null)),b=_n(b),L.h(E(D.g(new g(null,ln,null,1,null),new g(null,L.h(E(D.j(new g(null,yt,null,1,null),new g(null,b,null,1,null),z([en])))),null,1,null))))},T);return T=fn.j(e,jQ,s,z([HQ,hu(s,Mn.g(function(b){return function(en,ln){return oy(en,b,ln)}},s))])),$=L.h(E(D.j(new g(null,kf,null,1,null),new g(null,h($),null,1,null),z([new g(null,i,null,1,null),G])))),G=J(yJ),G.g?G.g(T,$):G.call(null,T,$)},a)},z([n,u])),L.h(E(D.j(new g(null,je,null,1,null),new g(null,L.h(E(D.j(new g(null,p9,null,1,null),new g(null,l,null,1,null),z([new g(null,t,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,Mi,null,1,null),new g(null,mt(l,new P(null,1,[Sun,!0],null)),null,1,null),z([new g(null,L.h(E(D.g(new g(null,Hen,null,1,null),new g(null,new P(null,4,[xI,new g(null,Bt,new g(null,i,null,1,null),2,null),Drn,i,_y,new g(null,wl,new g(null,t,null,1,null),2,null),sJ,new g(null,wl,new g(null,l,null,1,null),2,null)],null),null,1,null)))),null,1,null)])))),null,1,null),new g(null,L.h(E(D.j(new g(null,Op,null,1,null),new g(null,t,null,1,null),z([new g(null,_n(L.h(E(D.g(new g(null,Cn,null,1,null),new g(null,iq,null,1,null))))),null,1,null),new g(null,L.h(E(D.j(new g(null,min,null,1,null),new g(null,L.h(E(D.g(new g(null,Bt,null,1,null),new g(null,i,null,1,null)))),null,1,null),z([new g(null,i,null,1,null),new g(null,L.h(E(D.g(new g(null,wl,null,1,null),new g(null,l,null,1,null)))),null,1,null),new g(null,L.h(E(D.j(new g(null,aJ,null,1,null),new g(null,new g(null,Bt,new g(null,r,null,1,null),2,null),null,1,null),z([new g(null,iq,null,1,null)])))),null,1,null)])))),null,1,null)])))),null,1,null),u,new g(null,l,null,1,null)]))))};V3.l=5;V3.o=function(t){var n=j(t),e=A(t);t=j(e);var l=A(e);e=j(l);var r=A(l);l=j(r);var u=A(r);return r=j(u),u=A(u),this.j(n,t,e,l,r,u)};var z3=function t(n){switch(arguments.length){case 3:return t.i(arguments[0],arguments[1],arguments[2]);case 4:return t.u(arguments[0],arguments[1],arguments[2],arguments[3]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};z3.i=function(t,n,e){var l=ad(n);return ch.g(vg(t),function(r){return Fa.i(r,l,e)}),null};z3.u=function(t,n,e,l){return t=ad(e),Fa.i(n,t,l)};z3.l=4;var U3=function t(n){switch(arguments.length){case 3:return t.i(arguments[0],arguments[1],arguments[2]);case 4:return t.u(arguments[0],arguments[1],arguments[2],arguments[3]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};U3.i=function(t,n,e){var l=ad(n);return ch.g(vg(t),function(r){return Aw.i(r,l,e)}),null};U3.u=function(t,n,e,l){return t=ad(e),Aw.i(n,t,l)};U3.l=4;var Y3=function t(n){switch(arguments.length){case 3:return t.i(arguments[0],arguments[1],arguments[2]);case 4:return t.u(arguments[0],arguments[1],arguments[2],arguments[3]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Y3.i=function(t,n,e){return t=J(vg(t)),sd(t,ad(n),e)};Y3.u=function(t,n,e,l){return sd(n,ad(e),l)};Y3.l=4;var Q3=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Q3.g=function(t,n){return t=J(vg(t)),LU(t,n)};Q3.i=function(t,n,e){return LU(n,e)};Q3.l=3;var G3=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};G3.g=function(t,n){return t=J(vg(t)),WU(t,n)};G3.i=function(t,n,e){return WU(n,e)};G3.l=3;var J3=function t(n){switch(arguments.length){case 2:return t.g(arguments[0],arguments[1]);case 3:return t.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};J3.g=function(t,n){return t=J(vg(t)),JP(t,n)};J3.i=function(t,n,e){return JP(n,e)};J3.l=3;var K3=function t(n){for(var e=[],l=arguments.length,r=0;r",M.h(l)].join(""),t=$n.h(n),n=$n.h(["map",n].join(""));var i=br.g(Hl,r),s=$n.h([M.h(e0(sr())),".",M.h(l)].join("")),a=W3(lh,u),o=fr(r);return r=_i.j(function(h,c){function f(T){return Up(T)?$n.g(I,M.h(T)):T}h=E(h);var d=j(h);h=A(h),h=J1(j,h);var C=function(){var T=Ar.h(e),$=J(Jc);return $.i?$.i(e,T,d):$.call(null,e,T,d)}();C=x(C)?C:X.g(oJ,d)?kq:null,x(C)||el(["Protocol not found: ",M.h(d)].join(""),c),c=vr(C)?J(C):C,C=tu.h(c),x(C)&&ch.j(C,_e,z([v0,Co.g(In,Ke),lI(s)])),C=V.h(c);var I=x(C)?M.h(Tu(C)):X.g(kq,c)?"sci.impl.records":null;return Mn.g(function(T){var $=m.i(T,0,null);return T=m.i(T,1,null),T=Mn.g(rn,T),T=br.g(function(G){var b=j(G);G=rn(G),b=cY(b,G);var en=rt.h(b);b=si.h(b);var ln=j(en),B=rn(en);G=Mr(function(k){return X.g(ln,k)},B);var O=x(G)?ne.h("this_"):ln;return en=x(G)?_n(Dn(O,B)):en,B=_i.j(function(k){return new v(null,2,5,y,[k,new g(null,Hl.h(k),new g(null,O,null,1,null),2,null)],null)},z([En.i(Du,o,en)])),G=x(G)?D.g(B,new v(null,2,5,y,[ln,O],null)):B,G=_n(G),L.h(E(D.g(new g(null,en,null,1,null),new g(null,L.h(E(D.j(new g(null,yt,null,1,null),new g(null,G,null,1,null),z([b])))),null,1,null))))},T),L.h(E(D.j(new g(null,kf,null,1,null),new g(null,f($),null,1,null),z([new g(null,s,null,1,null),T]))))},h)},z([a,u])),L.h(E(D.j(new g(null,je,null,1,null),new g(null,L.h(E(D.j(new g(null,p9,null,1,null),new g(null,l,null,1,null),z([new g(null,t,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.g(new g(null,p9,null,1,null),new g(null,n,null,1,null)))),null,1,null),new g(null,L.h(E(D.j(new g(null,Mi,null,1,null),new g(null,mt(l,new P(null,1,[BG,!0],null)),null,1,null),z([new g(null,L.h(E(D.g(new g(null,jun,null,1,null),new g(null,new P(null,5,[xI,new g(null,Bt,new g(null,s,null,1,null),2,null),Nln,!0,_y,new g(null,wl,new g(null,t,null,1,null),2,null),sJ,new g(null,wl,new g(null,l,null,1,null),2,null),PQ,new g(null,wl,new g(null,n,null,1,null),2,null)],null),null,1,null)))),null,1,null)])))),null,1,null),new g(null,L.h(E(D.j(new g(null,Op,null,1,null),new g(null,t,null,1,null),z([new g(null,_n(L.h(E(D.g(new g(null,Cn,null,1,null),new g(null,mL,null,1,null))))),null,1,null),new g(null,L.h(E(D.j(new g(null,pL,null,1,null),new g(null,L.h(E(D.g(new g(null,Bt,null,1,null),new g(null,s,null,1,null)))),null,1,null),z([new g(null,s,null,1,null),new g(null,L.h(E(D.g(new g(null,wl,null,1,null),new g(null,l,null,1,null)))),null,1,null),new g(null,L.h(E(D.j(new g(null,aJ,null,1,null),new g(null,i,null,1,null),z([new g(null,mL,null,1,null)])))),null,1,null)])))),null,1,null)])))),null,1,null),new g(null,L.h(E(D.j(new g(null,Op,null,1,null),new g(null,n,null,1,null),z([new g(null,_n(L.h(E(D.h(new g(null,dL,null,1,null))))),null,1,null),new g(null,L.h(E(D.j(new g(null,pL,null,1,null),new g(null,L.h(E(D.g(new g(null,Bt,null,1,null),new g(null,s,null,1,null)))),null,1,null),z([new g(null,s,null,1,null),new g(null,L.h(E(D.g(new g(null,wl,null,1,null),new g(null,l,null,1,null)))),null,1,null),new g(null,dL,null,1,null)])))),null,1,null)])))),null,1,null),r,new g(null,l,null,1,null)]))))};n4.l=5;n4.o=function(t){var n=j(t),e=A(t);t=j(e);var l=A(e);e=j(l);var r=A(l);l=j(r);var u=A(r);return r=j(u),u=A(u),this.j(n,t,e,l,r,u)};var a1={},Ap=function t(n){switch(arguments.length){case 3:return t.i(arguments[0],arguments[1],arguments[2]);case 4:return t.u(arguments[0],arguments[1],arguments[2],arguments[3]);default:throw Error(["Invalid arity: ",M.h(arguments.length)].join(""))}};Ap.i=function(t,n,e){return Ap.u(t,n,null,e)};Ap.u=function(t,n,e,l){return Xn(e)||!Gn(e,l)?(n=w(l,t,n),e=J(vJ),t=e.i?e.i(t,n,!1):e.call(null,t,n,!1),t=Rt(t),t instanceof Ci?null:t):null};Ap.l=4;Il(Jc,Ap);var R0=function t(n){for(var e=[],l=arguments.length,r=0;rinvoke-idx":return this.nb;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#sci.impl.analyzer.FnBody{",", ","}",e,D.g(new v(null,6,5,y,[new v(null,2,5,y,[rt,this.ob],null),new v(null,2,5,y,[si,this.body],null),new v(null,2,5,y,[$o,this.mb],null),new v(null,2,5,y,[Oc,this.rb],null),new v(null,2,5,y,[lg,this.pb],null),new v(null,2,5,y,[Ai,this.nb],null)],null),this.G))};p.Wa=function(){return new yu(this,6,new v(null,6,5,y,[rt,si,$o,Oc,lg,Ai],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 6+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=1733662014^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.ob,n.ob)&&X.g(this.body,n.body)&&X.g(this.mb,n.mb)&&X.g(this.rb,n.rb)&&X.g(this.pb,n.pb)&&X.g(this.nb,n.nb)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,6,[Oc,null,rt,null,lg,null,$o,null,Ai,null,si,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new vs(this.ob,this.body,this.mb,this.rb,this.pb,this.nb,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"params":case"body":case"fixed-arity":case"var-arg-name":case"self-ref-idx":case"iden->invoke-idx":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(rt,n):on.call(null,rt,n))?new vs(e,this.body,this.mb,this.rb,this.pb,this.nb,this.J,this.G,null):x(on.g?on.g(si,n):on.call(null,si,n))?new vs(this.ob,e,this.mb,this.rb,this.pb,this.nb,this.J,this.G,null):x(on.g?on.g($o,n):on.call(null,$o,n))?new vs(this.ob,this.body,e,this.rb,this.pb,this.nb,this.J,this.G,null):x(on.g?on.g(Oc,n):on.call(null,Oc,n))?new vs(this.ob,this.body,this.mb,e,this.pb,this.nb,this.J,this.G,null):x(on.g?on.g(lg,n):on.call(null,lg,n))?new vs(this.ob,this.body,this.mb,this.rb,e,this.nb,this.J,this.G,null):x(on.g?on.g(Ai,n):on.call(null,Ai,n))?new vs(this.ob,this.body,this.mb,this.rb,this.pb,e,this.J,this.G,null):new vs(this.ob,this.body,this.mb,this.rb,this.pb,this.nb,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,6,5,y,[new Ln(rt,this.ob),new Ln(si,this.body),new Ln($o,this.mb),new Ln(Oc,this.rb),new Ln(lg,this.pb),new Ln(Ai,this.nb)],null),this.G))};p.W=function(t,n){return new vs(this.ob,this.body,this.mb,this.rb,this.pb,this.nb,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};var Ssn=function t(n,e,l,r){if(10TypeName - will be defined, taking positional parameters for the fields`],null)),con=new Q(T$,Q8,new P(null,6,[q,Q8,Fn,T$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),fon=RJ,gon=st(dE,S4,null,null,new P(null,3,[q,dE,W,U(new v(null,3,5,y,[gn,Cn,ym],null)),N,`Evaluates x then calls all of the methods and functions with the + will be defined, taking positional parameters for the fields`],null)),hon=new Q(_$,Q8,new P(null,6,[q,Q8,Fn,_$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),con=EJ,fon=st(dE,S4,null,null,new P(null,3,[q,dE,W,U(new v(null,3,5,y,[gn,Cn,ym],null)),N,`Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments. The forms are evaluated in order. Returns x. - (doto (new js/Map) (.set "a" 1) (.set "b" 2))`],null)),mon=new Q(Hw,CO,new P(null,5,[q,CO,W,U(new v(null,3,5,y,[Bn,i1,qn],null)),N,`Reduces an associative collection. f should be a function of 3 + (doto (new js/Map) (.set "a" 1) (.set "b" 2))`],null)),gon=new Q(Hw,CO,new P(null,5,[q,CO,W,U(new v(null,3,5,y,[Bn,i1,qn],null)),N,`Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, the first key and the first value in coll, then applying f to that result and the 2nd key and value, etc. If coll contains no entries, returns init and f is not called. Note that reduce-kv is supported on vectors, - where the keys will be the ordinals.`,Y,!0,V,K],null),null),won=st(E7,B3,null,null,new P(null,3,[q,E7,W,U(new v(null,4,5,y,[rf,XA,Cn,cln],null)),N,"Creates and installs a new method of multimethod associated with dispatch-value. "],null)),don=new Q(Pl,_S,new P(null,5,[q,_S,W,U(new v(null,3,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn],null),new v(null,4,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn,$l],null),new v(null,5,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn,$l,gi],null),new v(null,6,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn,$l,gi,la],null),new v(null,8,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn,$l,gi,la,Cn,wr],null)),N,`'Updates' a value in a nested associative structure, where ks is a + where the keys will be the ordinals.`,Y,!0,V,K],null),null),mon=st(E7,B3,null,null,new P(null,3,[q,E7,W,U(new v(null,4,5,y,[rf,XA,Cn,hln],null)),N,"Creates and installs a new method of multimethod associated with dispatch-value. "],null)),won=new Q(Pl,_S,new P(null,5,[q,_S,W,U(new v(null,3,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn],null),new v(null,4,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn,$l],null),new v(null,5,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn,$l,gi],null),new v(null,6,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn,$l,gi,la],null),new v(null,8,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),Bn,$l,gi,la,Cn,wr],null)),N,`'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be - created.`,Y,!0,V,K],null),null),pon=new Q(function(t,n,e){return Bk(t,n,e)},j9,new P(null,5,[q,j9,W,U(new v(null,3,5,y,[rf,Srn,krn],null)),N,`Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y - when there is a conflict`,Y,!0,V,K],null),null),von=new Q(z3,qA,new P(null,5,[q,qA,W,U(new v(null,2,5,y,[Qi,dm],null),new v(null,3,5,y,[ra,Qi,dm],null)),N,`Establishes a parent/child relationship between parent and + created.`,Y,!0,V,K],null),null),don=new Q(function(t,n,e){return Bk(t,n,e)},j9,new P(null,5,[q,j9,W,U(new v(null,3,5,y,[rf,krn,xrn],null)),N,`Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y + when there is a conflict`,Y,!0,V,K],null),null),pon=new Q(z3,qA,new P(null,5,[q,qA,W,U(new v(null,2,5,y,[Qi,dm],null),new v(null,3,5,y,[ra,Qi,dm],null)),N,`Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword and child can be either a namespace-qualified symbol or keyword or a class. h must be a hierarchy obtained from make-hierarchy, if not - supplied defaults to, and modifies, the global hierarchy.`,Y,!0,V,K],null),!0),yon=new Q(function(t){return A(j(t))},T9,new P(null,5,[q,T9,W,U(new v(null,1,5,y,[qn],null)),N,"Same as (next (first x))",Y,!0,V,K],null),null),jon=new Q(jw,MS,new P(null,5,[q,MS,W,U(new v(null,2,5,y,[hL,qn],null),new v(null,3,5,y,[hL,Sp,qn],null)),N,`Returns a sorted sequence of the items in coll, where the sort + supplied defaults to, and modifies, the global hierarchy.`,Y,!0,V,K],null),!0),von=new Q(function(t){return A(j(t))},T9,new P(null,5,[q,T9,W,U(new v(null,1,5,y,[qn],null)),N,"Same as (next (first x))",Y,!0,V,K],null),null),yon=new Q(jw,MS,new P(null,5,[q,MS,W,U(new v(null,2,5,y,[aL,qn],null),new v(null,3,5,y,[aL,Sp,qn],null)),N,`Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). Comp can be boolean-valued comparison function, or a -/0/+ valued comparator. - Comp defaults to compare.`,Y,!0,V,K],null),null),xon=new Q(xe,Af,new P(null,5,[q,Af,W,U(new v(null,1,5,y,[rg],null)),N,"Returns a sequence of the map's keys, in the same order as (seq map).",Y,!0,V,K],null),null),kon=new Q(Q3,VS,new P(null,5,[q,VS,W,U(new v(null,1,5,y,[Qi],null),new v(null,2,5,y,[ra,Qi],null)),N,`Returns the immediate and indirect parents of tag, either via a JavaScript type + Comp defaults to compare.`,Y,!0,V,K],null),null),jon=new Q(xe,Af,new P(null,5,[q,Af,W,U(new v(null,1,5,y,[rg],null)),N,"Returns a sequence of the map's keys, in the same order as (seq map).",Y,!0,V,K],null),null),xon=new Q(Q3,VS,new P(null,5,[q,VS,W,U(new v(null,1,5,y,[Qi],null),new v(null,2,5,y,[ra,Qi],null)),N,`Returns the immediate and indirect parents of tag, either via a JavaScript type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied - defaults to the global hierarchy`,Y,!0,V,K],null),!0),Son=new Q(j,B8,new P(null,5,[q,B8,W,U(new v(null,1,5,y,[qn],null)),N,`Returns the first item in the collection. Calls seq on its - argument. If coll is nil, returns nil.`,Y,!0,V,K],null),null),Oon=new Q(zs,uS,new P(null,5,[q,uS,W,U(new v(null,1,5,y,[Kt],null)),N,"Return a seq of all but the last item in coll, in linear time",Y,!0,V,K],null),null),Con=st(qm,Ad,null,null,new P(null,4,[q,qm,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,3,5,y,[gn,Cn,x1],null)),N,`Evaluates exprs one at a time, from left to right. If a form + defaults to the global hierarchy`,Y,!0,V,K],null),!0),kon=new Q(j,B8,new P(null,5,[q,B8,W,U(new v(null,1,5,y,[qn],null)),N,`Returns the first item in the collection. Calls seq on its + argument. If coll is nil, returns nil.`,Y,!0,V,K],null),null),Son=new Q(zs,uS,new P(null,5,[q,uS,W,U(new v(null,1,5,y,[Kt],null)),N,"Return a seq of all but the last item in coll, in linear time",Y,!0,V,K],null),null),Oon=st(qm,Ad,null,null,new P(null,4,[q,qm,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,3,5,y,[gn,Cn,x1],null)),N,`Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that value and doesn't evaluate any of the other expressions, otherwise it returns - the value of the last expr. (and) returns true.`,zm,qm],null)),Aon=st(rA,g4,null,null,new P(null,3,[q,rA,W,U(new v(null,2,5,y,[Cn,Ql],null)),N,`Evaluates exprs in a context in which *print-fn* is bound to .append + the value of the last expr. (and) returns true.`,zm,qm],null)),Con=st(rA,g4,null,null,new P(null,3,[q,rA,W,U(new v(null,2,5,y,[Cn,Ql],null)),N,`Evaluates exprs in a context in which *print-fn* is bound to .append on a fresh StringBuffer. Returns the string created by any nested - printing calls.`],null)),Eon=new Q(np,_C,new P(null,5,[q,_C,W,U(new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,qn],null)),N,`Applies f to each value in coll, splitting it each time f returns a + printing calls.`],null)),Aon=new Q(np,_C,new P(null,5,[q,_C,W,U(new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,qn],null)),N,`Applies f to each value in coll, splitting it each time f returns a new value. Returns a lazy seq of partitions. Returns a stateful - transducer when no collection is provided.`,Y,!0,V,K],null),null),Ron=new Q(function(){return!1},$8,new P(null,5,[q,$8,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true x is a goog.Uri instance.",Y,!0,V,K],null),null),Pon=new Q(Oa,lE,new P(null,5,[q,lE,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x satisfies IMapEntry",Y,!0,V,K],null),null),Ion=new Q(function(t){return t instanceof F&&qe(t)==null},NC,new P(null,5,[q,NC,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a keyword without a namespace",Y,!0,V,K],null),null),_on=new Q(jr,qS,new P(null,5,[q,qS,W,U(new v(null,1,5,y,[gL],null),new v(null,2,5,y,[cf,gL],null)),N,`Returns an array with components set to the values in aseq. Optional type - argument accepted for compatibility with Clojure.`,Y,!0,V,K],null),null),Ton=new Q(IY,C8,new P(null,5,[q,C8,W,null,N,null,Y,!0,V,K],null),!0),Don=new Q(rn,Ly,new P(null,5,[q,Ly,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a possibly empty seq of the items after the first. Calls seq on its - argument.`,Y,!0,V,K],null),null),Mon=st(Wm,lj,null,null,new P(null,4,[q,Wm,W,U(new v(null,3,5,y,[lrn,Cn,O1],null)),N,`Takes an expression, and a set of clauses. + transducer when no collection is provided.`,Y,!0,V,K],null),null),Eon=new Q(function(){return!1},$8,new P(null,5,[q,$8,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true x is a goog.Uri instance.",Y,!0,V,K],null),null),Ron=new Q(Oa,lE,new P(null,5,[q,lE,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x satisfies IMapEntry",Y,!0,V,K],null),null),Pon=new Q(function(t){return t instanceof F&&qe(t)==null},NC,new P(null,5,[q,NC,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a keyword without a namespace",Y,!0,V,K],null),null),Ion=new Q(jr,qS,new P(null,5,[q,qS,W,U(new v(null,1,5,y,[fL],null),new v(null,2,5,y,[cf,fL],null)),N,`Returns an array with components set to the values in aseq. Optional type + argument accepted for compatibility with Clojure.`,Y,!0,V,K],null),null),_on=new Q(PY,C8,new P(null,5,[q,C8,W,null,N,null,Y,!0,V,K],null),!0),Ton=new Q(rn,Ly,new P(null,5,[q,Ly,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a possibly empty seq of the items after the first. Calls seq on its + argument.`,Y,!0,V,K],null),null),Don=st(Wm,lj,null,null,new P(null,4,[q,Wm,W,U(new v(null,3,5,y,[ern,Cn,O1],null)),N,`Takes an expression, and a set of clauses. Each clause can take the form of either: @@ -221,17 +221,17 @@ symbols, keywords, and (ClojureScript) composites thereof. Note that since lists are used to group multiple constants that map to the same expression, a vector can be used to match a list if needed. The - test-constants need not be all of the same type.`,zm,Wm],null)),$on=new Q(E,ES,new P(null,5,[q,ES,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a seq on the collection. If the collection is + test-constants need not be all of the same type.`,zm,Wm],null)),Mon=new Q(E,ES,new P(null,5,[q,ES,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on - Strings.`,Y,!0,V,K],null),null),Non=new Q(V$,kO,new P(null,6,[q,kO,Fn,V$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),qon=new Q(tU,EC,new P(null,5,[q,EC,W,U(new v(null,2,5,y,[Dun,Fy],null)),N,null,Y,!0,V,K],null),null),Lon=new Q(function(t,n,e){return ut.g(Qt.h(t),function(l){return Pl.u(l,new v(null,3,5,y,[ct,ii(Ii(t,n)),Ns],null),Ct,e)}),null},xE,new P(null,5,[q,xE,W,null,N,null,Y,!0,V,K],null),!0),Won=new Q(function(t){return!Ni(t)},v9,new P(null,5,[q,v9,W,U(new v(null,1,5,y,[zt],null)),N,"Returns true if n is odd, throws an exception if n is not an integer",Y,!0,V,K],null),null),Von=new Q(mu,CC,new P(null,5,[q,CC,W,U(new v(null,2,5,y,[zt,qn],null),new v(null,3,5,y,[zt,Dy,qn],null),new v(null,4,5,y,[zt,Dy,Sen,qn],null)),N,`Returns a lazy sequence of lists of n items each, at offsets step + Strings.`,Y,!0,V,K],null),null),$on=new Q(W$,kO,new P(null,6,[q,kO,Fn,W$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),Non=new Q(nU,EC,new P(null,5,[q,EC,W,U(new v(null,2,5,y,[Tun,Fy],null)),N,null,Y,!0,V,K],null),null),qon=new Q(function(t,n,e){return ut.g(Qt.h(t),function(l){return Pl.u(l,new v(null,3,5,y,[ct,ii(Ii(t,n)),Ns],null),Ct,e)}),null},xE,new P(null,5,[q,xE,W,null,N,null,Y,!0,V,K],null),!0),Lon=new Q(function(t){return!Ni(t)},v9,new P(null,5,[q,v9,W,U(new v(null,1,5,y,[zt],null)),N,"Returns true if n is odd, throws an exception if n is not an integer",Y,!0,V,K],null),null),Won=new Q(mu,CC,new P(null,5,[q,CC,W,U(new v(null,2,5,y,[zt,qn],null),new v(null,3,5,y,[zt,Dy,qn],null),new v(null,4,5,y,[zt,Dy,ken,qn],null)),N,`Returns a lazy sequence of lists of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. the partitions do not overlap. If a pad collection is supplied, use its elements as necessary to complete last partition up to n items. In case there are - not enough padding elements, return a partition with less than n items.`,Y,!0,V,K],null),null),zon=new Q(gc,tO,new P(null,6,[q,tO,Fn,gc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`Returns non-nil if nums are in monotonically non-increasing order, - otherwise false.`,Y,!0,V,K],null),null),Uon=new Q(rU,AA,new P(null,5,[q,AA,W,U(new v(null,1,5,y,[qn],null)),N,"Same as (first (next x))",Y,!0,V,K],null),null),Yon=st(Py,R4,null,null,new P(null,3,[q,Py,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`bindings => x xs + not enough padding elements, return a partition with less than n items.`,Y,!0,V,K],null),null),Von=new Q(gc,tO,new P(null,6,[q,tO,Fn,gc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`Returns non-nil if nums are in monotonically non-increasing order, + otherwise false.`,Y,!0,V,K],null),null),zon=new Q(lU,AA,new P(null,5,[q,AA,W,U(new v(null,1,5,y,[qn],null)),N,"Same as (first (next x))",Y,!0,V,K],null),null),Uon=st(Py,R4,null,null,new P(null,3,[q,Py,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`bindings => x xs - Roughly the same as (when (seq xs) (let [x (first xs)] body)) but xs is evaluated only once`],null)),Qon=new Q(Gf,x9,new P(null,6,[q,x9,Fn,Gf,W,U(new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Bitwise or",Y,!0,V,K],null),null),Gon=new Q(Du,uA,new P(null,5,[q,uA,W,U(new v(null,1,5,y,[qn],null),new v(null,2,5,y,[qn,Ze],null),new v(null,4,5,y,[qn,Ze,Cn,yi],null)),N,`disj[oin]. Returns a new set of the same (hashed/sorted) type, that - does not contain key(s).`,Y,!0,V,K],null),null),Jon=new Q(function(t,n){function e(r){r=E(r);for(var u=null,i=0,s=0;;)if(s fieldName-symbol or (instanceMethodName-symbol args*) + the latter (left-to-right) will be the mapping in the result.`,Y,!0,V,K],null),null),can=new Q(function(t){return qk(t)},BA,new P(null,5,[q,BA,W,U(new v(null,1,5,y,[RI],null)),N,"Return the number of milliseconds since January 1, 1970, 00:00:00 GMT",Y,!0,V,K],null),null),fan=new Q(function(){var t=Fl;Fl=J(Rc);try{return GP(null)}finally{Fl=t}},UA,new P(null,5,[q,UA,W,U(Yn,new v(null,1,5,y,[jf],null)),N,"Prints a newline using *print-fn*",Y,!0,V,K],null),null),gan=new Q(Ja,$C,new P(null,6,[q,$C,Fn,Ja,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the product of nums. (*) returns 1.",Y,!0,V,K],null),null),man=st(up,D0,null,null,new P(null,3,[q,up,W,U(new v(null,2,5,y,[gn,ma],null),new v(null,4,5,y,[gn,ma,Cn,Ee],null)),N,`form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on the first argument, followed by the next member on the result, etc. For @@ -279,14 +279,14 @@ (. (. System (getProperties)) (get "os.name")) - but is easier to write, read, and understand.`],null)),dan=new Q(re,jE,new P(null,5,[q,jE,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies IChunkedSeq.",Y,!0,V,K],null),null),pan=new Q(function(t){return t!=null?On===t.Ge?!0:t.Oc?!1:Qn(O$,t):Qn(O$,t)},vO,new P(null,5,[q,vO,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies Inst",Y,!0,V,K],null),null),van=new Q(x3,iR,new P(null,5,[q,iR,W,U(new v(null,1,5,y,[DL],null),new v(null,2,5,y,[DL,qn],null)),N,`Returns items from coll with random probability of prob (0.0 - - 1.0). Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),yan=new Q(fc,Q7,new P(null,6,[q,Q7,Fn,fc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`Returns non-nil if nums are in monotonically decreasing order, - otherwise false.`,Y,!0,V,K],null),null),jan=new Q(an,O9,new P(null,6,[q,O9,Fn,an,W,U(new v(null,1,5,y,[qn],null)),N,`Returns the number of items in the collection. (count nil) returns - 0. Also works on strings, arrays, and Maps`,Y,!0,V,K],null),null),xan=new Q(function(t){return Wk(t)&&qe(t)==null},UC,new P(null,5,[q,UC,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a symbol or keyword without a namespace",Y,!0,V,K],null),null),kan=new Q(ii,$R,new P(null,5,[q,$R,W,U(new v(null,1,5,y,[cQ],null)),N,`Returns the name of the namespace, a Namespace object. - Bootstrap only.`,Y,!0,V,K],null),null),San=EJ,Oan=new Q(ur,xR,new P(null,5,[q,xR,W,U(new v(null,1,5,y,[Kt],null)),N,"Return the last item in coll, in linear time",Y,!0,V,K],null),null),Can=new Q(lN,h9,new P(null,6,[q,h9,Fn,lN,W,U(new v(null,2,5,y,[gn,zt],null)),N,"Bitwise shift left",Y,!0,V,K],null),null),Aan=new Q(Q$,iC,new P(null,6,[q,iC,Fn,Q$,W,U(new v(null,1,5,y,[gn],null)),N,"Coerce to int by stripping decimal places.",Y,!0,V,K],null),null),Ean=st(ip,l4,null,null,new P(null,3,[q,ip,W,U(new v(null,5,5,y,[Ir,Ry,Of,new v(null,1,5,y,[Cy],null),Ql],null),new v(null,6,5,y,[Ir,Ry,Of,U(new v(null,1,5,y,[Cy],null),Ql),gp,Of],null)),N,`Like defn, but the resulting function name is declared as a + but is easier to write, read, and understand.`],null)),wan=new Q(re,jE,new P(null,5,[q,jE,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies IChunkedSeq.",Y,!0,V,K],null),null),dan=new Q(function(t){return t!=null?On===t.Ge?!0:t.Oc?!1:Qn(S$,t):Qn(S$,t)},vO,new P(null,5,[q,vO,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies Inst",Y,!0,V,K],null),null),pan=new Q(x3,iR,new P(null,5,[q,iR,W,U(new v(null,1,5,y,[TL],null),new v(null,2,5,y,[TL,qn],null)),N,`Returns items from coll with random probability of prob (0.0 - + 1.0). Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),van=new Q(fc,Q7,new P(null,6,[q,Q7,Fn,fc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`Returns non-nil if nums are in monotonically decreasing order, + otherwise false.`,Y,!0,V,K],null),null),yan=new Q(an,O9,new P(null,6,[q,O9,Fn,an,W,U(new v(null,1,5,y,[qn],null)),N,`Returns the number of items in the collection. (count nil) returns + 0. Also works on strings, arrays, and Maps`,Y,!0,V,K],null),null),jan=new Q(function(t){return Wk(t)&&qe(t)==null},UC,new P(null,5,[q,UC,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a symbol or keyword without a namespace",Y,!0,V,K],null),null),xan=new Q(ii,$R,new P(null,5,[q,$R,W,U(new v(null,1,5,y,[hQ],null)),N,`Returns the name of the namespace, a Namespace object. + Bootstrap only.`,Y,!0,V,K],null),null),kan=AJ,San=new Q(ur,xR,new P(null,5,[q,xR,W,U(new v(null,1,5,y,[Kt],null)),N,"Return the last item in coll, in linear time",Y,!0,V,K],null),null),Oan=new Q(eN,h9,new P(null,6,[q,h9,Fn,eN,W,U(new v(null,2,5,y,[gn,zt],null)),N,"Bitwise shift left",Y,!0,V,K],null),null),Can=new Q(Y$,iC,new P(null,6,[q,iC,Fn,Y$,W,U(new v(null,1,5,y,[gn],null)),N,"Coerce to int by stripping decimal places.",Y,!0,V,K],null),null),Aan=st(ip,l4,null,null,new P(null,3,[q,ip,W,U(new v(null,5,5,y,[Ir,Ry,Of,new v(null,1,5,y,[Cy],null),Ql],null),new v(null,6,5,y,[Ir,Ry,Of,U(new v(null,1,5,y,[Cy],null),Ql),gp,Of],null)),N,`Like defn, but the resulting function name is declared as a macro and will be used as a macro by the compiler when it is - called.`],null)),Ran=new Q(z$,eE,new P(null,6,[q,eE,Fn,z$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),Pan=new Q(function(t,n,e,l,r,u,i,s){return new qi(t,n,e,l,r,u,i,s)},wR,new P(null,5,[q,wR,W,null,N,null,Y,!0,V,K],null),null),Ian=new Q(Y$,oE,new P(null,6,[q,oE,Fn,Y$,W,U(new v(null,2,5,y,[gn,zt],null)),N,null,Y,!0,V,K],null),null),_an=new Q(R$,QC,new P(null,6,[q,QC,Fn,R$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),Tan=new Q(ar,n7,new P(null,5,[q,n7,W,U(Yn,new v(null,1,5,y,[js],null),new v(null,2,5,y,[js,Gi],null),new v(null,4,5,y,[js,Gi,Cn,Mw],null)),N,`Adds val to the transient collection, and return tcoll. The 'addition' - may happen at different 'places' depending on the concrete type.`,Y,!0,V,K],null),null),Dan=new Q(no,pE,new P(null,5,[q,pE,W,U(new v(null,2,5,y,[Cn,Bm],null)),N,"Same as print followed by (newline)",Y,!0,V,K],null),null),Man=st($S,X3,K,!0,new P(null,3,[q,$S,W,U(new v(null,3,5,y,[fQ,Cn,rin],null)),N,`A protocol is a named set of named methods and their signatures: + called.`],null)),Ean=new Q(V$,eE,new P(null,6,[q,eE,Fn,V$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),Ran=new Q(function(t,n,e,l,r,u,i,s){return new qi(t,n,e,l,r,u,i,s)},wR,new P(null,5,[q,wR,W,null,N,null,Y,!0,V,K],null),null),Pan=new Q(U$,oE,new P(null,6,[q,oE,Fn,U$,W,U(new v(null,2,5,y,[gn,zt],null)),N,null,Y,!0,V,K],null),null),Ian=new Q(E$,QC,new P(null,6,[q,QC,Fn,E$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),_an=new Q(ar,n7,new P(null,5,[q,n7,W,U(Yn,new v(null,1,5,y,[js],null),new v(null,2,5,y,[js,Gi],null),new v(null,4,5,y,[js,Gi,Cn,Mw],null)),N,`Adds val to the transient collection, and return tcoll. The 'addition' + may happen at different 'places' depending on the concrete type.`,Y,!0,V,K],null),null),Tan=new Q(no,pE,new P(null,5,[q,pE,W,U(new v(null,2,5,y,[Cn,Bm],null)),N,"Same as print followed by (newline)",Y,!0,V,K],null),null),Dan=st($S,X3,K,!0,new P(null,3,[q,$S,W,U(new v(null,3,5,y,[cQ,Cn,lin],null)),N,`A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string @@ -324,24 +324,24 @@ (foo [this] 17) (bar-me [this] x) (bar-me [this y] x)))) - => 17`],null)),$an=new Q(function(t){return iu(t)||!1},Y9,new P(null,5,[q,Y9,W,U(new v(null,1,5,y,[gn],null)),N,`Return true if x satisfies integer? or is an instance of goog.math.Integer - or goog.math.Long.`,Y,!0,V,K],null),null),Nan=st(fp,e4,null,null,new P(null,3,[q,fp,W,U(new v(null,6,5,y,[Ir,Ry,Of,new v(null,1,5,y,[Cy],null),Dq,Ql],null),new v(null,6,5,y,[Ir,Ry,Of,U(new v(null,1,5,y,[Cy],null),Dq,Ql),gp,Of],null)),N,`Same as (def name (core/fn [params* ] exprs*)) or (def + => 17`],null)),Man=new Q(function(t){return iu(t)||!1},Y9,new P(null,5,[q,Y9,W,U(new v(null,1,5,y,[gn],null)),N,`Return true if x satisfies integer? or is an instance of goog.math.Integer + or goog.math.Long.`,Y,!0,V,K],null),null),$an=st(fp,e4,null,null,new P(null,3,[q,fp,W,U(new v(null,6,5,y,[Ir,Ry,Of,new v(null,1,5,y,[Cy],null),Tq,Ql],null),new v(null,6,5,y,[Ir,Ry,Of,U(new v(null,1,5,y,[Cy],null),Tq,Ql),gp,Of],null)),N,`Same as (def name (core/fn [params* ] exprs*)) or (def name (core/fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var metadata. prepost-map defines a map with optional keys - :pre and :post that contain collections of pre or post conditions.`],null)),qan=new Q(function(t){return J(J(cn.g(cn.g(ct.h(J(Qt.h(t))),Bl),Wy)))},hA,new P(null,5,[q,hA,W,null,N,null,Y,!0,V,K],null),!0),Lan=new Q(kw,o7,new P(null,6,[q,o7,Fn,kw,W,U(new v(null,1,5,y,[Fv],null),new v(null,2,5,y,[tf,Zv],null)),N,`Creates an array of longs. Does not coerce array, provided for compatibility - with Clojure.`,Y,!0,V,K],null),null),Wan=new Q(Xi,k9,new P(null,5,[q,k9,W,U(new v(null,2,5,y,[qn,Ze],null)),N,"Returns the map entry for key, or nil if key not present.",Y,!0,V,K],null),null),Van=new Q(ir,Mw,new P(null,5,[q,Mw,W,U(new v(null,1,5,y,[rg],null)),N,"Returns a sequence of the map's values, in the same order as (seq map).",Y,!0,V,K],null),null),zan=new Q(r$,M8,new P(null,6,[q,M8,Fn,r$,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is nil, false otherwise.",Y,!0,V,K],null),null),Uan=new Q(function(){return null},QO,new P(null,5,[q,QO,W,U(Yn),N,null,Y,!0,V,K],null),null),Yan=new Q(_l,Fy,new P(null,5,[q,Fy,W,U(new v(null,1,5,y,[vm],null)),N,`Returns the hash code of its argument. Note this is the hash code - consistent with =.`,Y,!0,V,K],null),null),Qan=new Q(s4,gC,new P(null,5,[q,gC,W,U(new v(null,2,5,y,[Cn,Bm],null)),N,`Prints the object(s) using string-print. Prints the + :pre and :post that contain collections of pre or post conditions.`],null)),Nan=new Q(function(t){return J(J(cn.g(cn.g(ct.h(J(Qt.h(t))),Bl),Wy)))},hA,new P(null,5,[q,hA,W,null,N,null,Y,!0,V,K],null),!0),qan=new Q(kw,o7,new P(null,6,[q,o7,Fn,kw,W,U(new v(null,1,5,y,[Fv],null),new v(null,2,5,y,[tf,Zv],null)),N,`Creates an array of longs. Does not coerce array, provided for compatibility + with Clojure.`,Y,!0,V,K],null),null),Lan=new Q(Xi,k9,new P(null,5,[q,k9,W,U(new v(null,2,5,y,[qn,Ze],null)),N,"Returns the map entry for key, or nil if key not present.",Y,!0,V,K],null),null),Wan=new Q(ir,Mw,new P(null,5,[q,Mw,W,U(new v(null,1,5,y,[rg],null)),N,"Returns a sequence of the map's values, in the same order as (seq map).",Y,!0,V,K],null),null),Van=new Q(l$,M8,new P(null,6,[q,M8,Fn,l$,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is nil, false otherwise.",Y,!0,V,K],null),null),zan=new Q(function(){return null},QO,new P(null,5,[q,QO,W,U(Yn),N,null,Y,!0,V,K],null),null),Uan=new Q(_l,Fy,new P(null,5,[q,Fy,W,U(new v(null,1,5,y,[vm],null)),N,`Returns the hash code of its argument. Note this is the hash code + consistent with =.`,Y,!0,V,K],null),null),Yan=new Q(s4,gC,new P(null,5,[q,gC,W,U(new v(null,2,5,y,[Cn,Bm],null)),N,`Prints the object(s) using string-print. Prints the object(s), separated by spaces if there is more than one. By default, pr and prn print in a way that objects can be - read by the reader`,Y,!0,V,K],null),null),Gan=new Q(dc,E9,new P(null,6,[q,E9,Fn,dc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`If no ys are supplied, returns the negation of x, else subtracts - the ys from x and returns the result.`,Y,!0,V,K],null),null),Jan=st(fS,y4,null,null,new P(null,3,[q,fS,W,U(new v(null,2,5,y,[Cn,Ql],null)),N,"Ignores body, yields nil"],null)),Kan=st(_9,Z4,null,null,new P(null,3,[q,_9,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`binding => var-symbol temp-value-expr + read by the reader`,Y,!0,V,K],null),null),Qan=new Q(dc,E9,new P(null,6,[q,E9,Fn,dc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`If no ys are supplied, returns the negation of x, else subtracts + the ys from x and returns the result.`,Y,!0,V,K],null),null),Gan=st(fS,y4,null,null,new P(null,3,[q,fS,W,U(new v(null,2,5,y,[Cn,Ql],null)),N,"Ignores body, yields nil"],null)),Jan=st(_9,Z4,null,null,new P(null,3,[q,_9,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`binding => var-symbol temp-value-expr Temporarily redefines vars while executing the body. The temp-value-exprs will be evaluated and each resulting value will replace in parallel the root value of its var. After the body is executed, the root values of all the vars will be set back to their - old values. Useful for mocking out functions during testing.`],null)),Ban=new Q(function(t,n){return delete t[n]},rO,new P(null,5,[q,rO,W,U(new v(null,2,5,y,[jh,Ui],null)),N,`Delete a property from a JavaScript object. - Returns true upon success, false otherwise.`,Y,!0,V,K],null),null),Xan=new Q(function(t){return typeof t=="number"},FE,new P(null,5,[q,FE,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true for JavaScript numbers, false otherwise.",Y,!0,V,K],null),null),Fan=new Q(Rt,IC,new P(null,5,[q,IC,W,U(new v(null,1,5,y,[qn],null)),N,"Same as (first (next x))",Y,!0,V,K],null),null),Han=st(g8,H3,K,!0,new P(null,3,[q,g8,W,U(new v(null,3,5,y,[L7,Cn,Aln],null)),N,`Useful when you want to provide several implementations of the same + old values. Useful for mocking out functions during testing.`],null)),Kan=new Q(function(t,n){return delete t[n]},rO,new P(null,5,[q,rO,W,U(new v(null,2,5,y,[jh,Ui],null)),N,`Delete a property from a JavaScript object. + Returns true upon success, false otherwise.`,Y,!0,V,K],null),null),Ban=new Q(function(t){return typeof t=="number"},FE,new P(null,5,[q,FE,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true for JavaScript numbers, false otherwise.",Y,!0,V,K],null),null),Xan=new Q(Rt,IC,new P(null,5,[q,IC,W,U(new v(null,1,5,y,[qn],null)),N,"Same as (first (next x))",Y,!0,V,K],null),null),Fan=st(g8,H3,K,!0,new P(null,3,[q,g8,W,U(new v(null,3,5,y,[L7,Cn,Cln],null)),N,`Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and the implementation of that protocol for one or more types. Expands into calls to extend-type: @@ -374,26 +374,26 @@ (bar [x y] ...)) (clojure.core/extend-type nil Protocol (foo [x] ...) - (bar [x y] ...)))`],null)),Zan=new Q(vu,aO,new P(null,5,[q,aO,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is a JavaScript array.",Y,!0,V,K],null),null),ban=new Q(function(t){return Ht(t)},ZE,new P(null,5,[q,ZE,W,U(new v(null,1,5,y,[Kt],null)),N,null,Y,!0,V,K],null),null),nhn=new Q(function(t,n,e){return ut.g(Qt.h(t),function(l){var r=sr();return Kl(l,new v(null,4,5,y,[ct,r,Ns,n],null),e)}),null},t7,new P(null,5,[q,t7,W,null,N,null,Y,!0,V,K],null),!0),thn=new Q(Rn,jA,new P(null,5,[q,jA,W,U(new v(null,2,5,y,[Ken,Kt],null)),N,"Writes s with writer and returns the result.",Y,!0,V,K],null),null),ehn=new Q(Ga,n9,new P(null,6,[q,n9,Fn,Ga,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the sum of nums. (+) returns 0.",Y,!0,V,K],null),null),lhn=new Q(function(t){var n=Vp(t);return n||(t!=null?t.v&1||On===t.af?!0:t.v?!1:Qn(i$,t):Qn(i$,t))},P8,new P(null,5,[q,P8,W,U(new v(null,1,5,y,[Bn],null)),N,"Returns true if f returns true for fn? or satisfies IFn.",Y,!0,V,K],null),null),rhn=st($y,ej,null,null,new P(null,3,[q,$y,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`Evaluates the exprs in a lexical context in which the symbols in + (bar [x y] ...)))`],null)),Han=new Q(vu,aO,new P(null,5,[q,aO,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is a JavaScript array.",Y,!0,V,K],null),null),Zan=new Q(function(t){return Ht(t)},ZE,new P(null,5,[q,ZE,W,U(new v(null,1,5,y,[Kt],null)),N,null,Y,!0,V,K],null),null),ban=new Q(function(t,n,e){return ut.g(Qt.h(t),function(l){var r=sr();return Kl(l,new v(null,4,5,y,[ct,r,Ns,n],null),e)}),null},t7,new P(null,5,[q,t7,W,null,N,null,Y,!0,V,K],null),!0),nhn=new Q(Rn,jA,new P(null,5,[q,jA,W,U(new v(null,2,5,y,[Jen,Kt],null)),N,"Writes s with writer and returns the result.",Y,!0,V,K],null),null),thn=new Q(Ga,n9,new P(null,6,[q,n9,Fn,Ga,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the sum of nums. (+) returns 0.",Y,!0,V,K],null),null),ehn=new Q(function(t){var n=Vp(t);return n||(t!=null?t.v&1||On===t.af?!0:t.v?!1:Qn(u$,t):Qn(u$,t))},P8,new P(null,5,[q,P8,W,U(new v(null,1,5,y,[Bn],null)),N,"Returns true if f returns true for fn? or satisfies IFn.",Y,!0,V,K],null),null),lhn=st($y,ej,null,null,new P(null,3,[q,$y,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts - therein. Acts as a recur target.`],null)),uhn=new Q(Ur,sE,new P(null,5,[q,sE,W,U(new v(null,2,5,y,[sL,Wq],null),new v(null,3,5,y,[sL,Wq,Crn],null)),N,`Create an instance of ExceptionInfo, an Error type that carries a - map of additional data.`,Y,!0,V,K],null),null),ihn=new Q(K2,tC,new P(null,6,[q,tC,Fn,K2,W,U(new v(null,1,5,y,[gn],null)),N,"Returns a number one greater than num.",Y,!0,V,K],null),null),shn=new Q(ac,mp,new P(null,6,[q,mp,Fn,ac,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`If no denominators are supplied, returns 1/numerator, - else returns numerator divided by all of the denominators.`,Y,!0,V,K],null),null),ohn=st(h7,function(t,n,e,l,r,u){return L.h(E(D.j(new g(null,yt,null,1,null),new g(null,_n(L.h(E(D.j(new g(null,hx,null,1,null),new g(null,e,null,1,null),z([new g(null,jL,null,1,null),new g(null,L.h(E(D.g(new g(null,tG,null,1,null),new g(null,hx,null,1,null)))),null,1,null),new g(null,r,null,1,null),new g(null,L.h(E(D.g(new g(null,Drn,null,1,null),new g(null,hx,null,1,null)))),null,1,null)]))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,MI,null,1,null),new g(null,_n(L.h(E(D.g(new g(null,l,null,1,null),new g(null,0,null,1,null))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,se,null,1,null),new g(null,L.h(E(D.j(new g(null,Cp,null,1,null),new g(null,l,null,1,null),z([new g(null,jL,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,je,null,1,null),new g(null,L.h(E(D.j(new g(null,Xln,null,1,null),new g(null,r,null,1,null),z([new g(null,l,null,1,null),new g(null,u,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.g(new g(null,pd,null,1,null),new g(null,L.h(E(D.g(new g(null,wp,null,1,null),new g(null,l,null,1,null)))),null,1,null)))),null,1,null)])))),null,1,null),new g(null,r,null,1,null)])))),null,1,null)])))),null,1,null)]))))},null,null,new P(null,3,[q,h7,W,U(new v(null,4,5,y,[$l,am,wG,Oh],null)),N,`Maps an expression across an array a, using an index named idx, and + therein. Acts as a recur target.`],null)),rhn=new Q(Ur,sE,new P(null,5,[q,sE,W,U(new v(null,2,5,y,[iL,Lq],null),new v(null,3,5,y,[iL,Lq,Orn],null)),N,`Create an instance of ExceptionInfo, an Error type that carries a + map of additional data.`,Y,!0,V,K],null),null),uhn=new Q(K2,tC,new P(null,6,[q,tC,Fn,K2,W,U(new v(null,1,5,y,[gn],null)),N,"Returns a number one greater than num.",Y,!0,V,K],null),null),ihn=new Q(ac,mp,new P(null,6,[q,mp,Fn,ac,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`If no denominators are supplied, returns 1/numerator, + else returns numerator divided by all of the denominators.`,Y,!0,V,K],null),null),shn=st(h7,function(t,n,e,l,r,u){return L.h(E(D.j(new g(null,yt,null,1,null),new g(null,_n(L.h(E(D.j(new g(null,hx,null,1,null),new g(null,e,null,1,null),z([new g(null,yL,null,1,null),new g(null,L.h(E(D.g(new g(null,nG,null,1,null),new g(null,hx,null,1,null)))),null,1,null),new g(null,r,null,1,null),new g(null,L.h(E(D.g(new g(null,Trn,null,1,null),new g(null,hx,null,1,null)))),null,1,null)]))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,MI,null,1,null),new g(null,_n(L.h(E(D.g(new g(null,l,null,1,null),new g(null,0,null,1,null))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,se,null,1,null),new g(null,L.h(E(D.j(new g(null,Cp,null,1,null),new g(null,l,null,1,null),z([new g(null,yL,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,je,null,1,null),new g(null,L.h(E(D.j(new g(null,Bln,null,1,null),new g(null,r,null,1,null),z([new g(null,l,null,1,null),new g(null,u,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.g(new g(null,pd,null,1,null),new g(null,L.h(E(D.g(new g(null,wp,null,1,null),new g(null,l,null,1,null)))),null,1,null)))),null,1,null)])))),null,1,null),new g(null,r,null,1,null)])))),null,1,null)])))),null,1,null)]))))},null,null,new P(null,3,[q,h7,W,U(new v(null,4,5,y,[$l,am,mG,Oh],null)),N,`Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of a, then setting each element of ret to the evaluation of expr, returning the new - array ret.`],null)),ahn=new Q(Ye,D9,new P(null,5,[q,D9,W,U(new v(null,1,5,y,[Gi],null)),N,"Creates and returns a Volatile with an initial value of val.",Y,!0,V,K],null),null),hhn=new Q(mt,XC,new P(null,5,[q,XC,W,U(new v(null,2,5,y,[vm,op],null)),N,`Returns an object of the same type and value as obj, with - map m as its metadata.`,Y,!0,V,K],null),null),chn=new Q(we,$9,new P(null,5,[q,$9,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies IMap",Y,!0,V,K],null),null),fhn=new Q(wt,DO,new P(null,5,[q,DO,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies IVector",Y,!0,V,K],null),null),ghn=st(R8,p4,null,null,new P(null,3,[q,R8,W,U(new v(null,3,5,y,[gn,Cn,ym],null)),N,`Threads the expr through the forms. Inserts x as the + array ret.`],null)),ohn=new Q(Ye,D9,new P(null,5,[q,D9,W,U(new v(null,1,5,y,[Gi],null)),N,"Creates and returns a Volatile with an initial value of val.",Y,!0,V,K],null),null),ahn=new Q(mt,XC,new P(null,5,[q,XC,W,U(new v(null,2,5,y,[vm,op],null)),N,`Returns an object of the same type and value as obj, with + map m as its metadata.`,Y,!0,V,K],null),null),hhn=new Q(we,$9,new P(null,5,[q,$9,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies IMap",Y,!0,V,K],null),null),chn=new Q(wt,DO,new P(null,5,[q,DO,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies IVector",Y,!0,V,K],null),null),fhn=st(R8,p4,null,null,new P(null,3,[q,R8,W,U(new v(null,3,5,y,[gn,Cn,ym],null)),N,`Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the - last item in second form, etc.`],null)),mhn=new Q(ri,_R,new P(null,6,[q,_R,Fn,ri,W,U(new v(null,2,5,y,[zt,nf],null)),N,"quot[ient] of dividing numerator by denominator.",Y,!0,V,K],null),null),whn=new Q(function(){return!0},bA,new P(null,5,[q,bA,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if given any argument.",Y,!0,V,K],null),null),dhn=new Q(Qa,v7,new P(null,6,[q,v7,Fn,Qa,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the sum of nums. (+) returns 0.",Y,!0,V,K],null),null),phn=new Q(bp,qO,new P(null,5,[q,qO,W,null,N,null,Y,!0,V,K],null),null),vhn=new Q(b$,UE,new P(null,6,[q,UE,Fn,b$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),yhn=new Q(f0,AS,new P(null,5,[q,AS,W,U(new v(null,1,5,y,[dr],null),new v(null,2,5,y,[dr,qn],null)),N,`Returns a lazy sequence of the items in coll starting from the + last item in second form, etc.`],null)),ghn=new Q(ri,_R,new P(null,6,[q,_R,Fn,ri,W,U(new v(null,2,5,y,[zt,nf],null)),N,"quot[ient] of dividing numerator by denominator.",Y,!0,V,K],null),null),mhn=new Q(function(){return!0},bA,new P(null,5,[q,bA,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if given any argument.",Y,!0,V,K],null),null),whn=new Q(Qa,v7,new P(null,6,[q,v7,Fn,Qa,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the sum of nums. (+) returns 0.",Y,!0,V,K],null),null),dhn=new Q(bp,qO,new P(null,5,[q,qO,W,null,N,null,Y,!0,V,K],null),null),phn=new Q(Z$,UE,new P(null,6,[q,UE,Fn,Z$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),vhn=new Q(f0,AS,new P(null,5,[q,AS,W,U(new v(null,1,5,y,[dr],null),new v(null,2,5,y,[dr,qn],null)),N,`Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false. Returns a - stateful transducer when no collection is provided.`,Y,!0,V,K],null),null),jhn=new Q(nd,x7,new P(null,5,[q,x7,W,U(new v(null,2,5,y,[zt,qn],null)),N,`If coll is counted? returns its count, else will count at most the first n - elements of coll using its seq`,Y,!0,V,K],null),null),xhn=new Q($u,_A,new P(null,5,[q,_A,W,U(new v(null,1,5,y,[dr],null),new v(null,2,5,y,[dr,qn],null)),N,`Returns a lazy sequence of successive items from coll while + stateful transducer when no collection is provided.`,Y,!0,V,K],null),null),yhn=new Q(nd,x7,new P(null,5,[q,x7,W,U(new v(null,2,5,y,[zt,qn],null)),N,`If coll is counted? returns its count, else will count at most the first n + elements of coll using its seq`,Y,!0,V,K],null),null),jhn=new Q($u,_A,new P(null,5,[q,_A,W,U(new v(null,1,5,y,[dr],null),new v(null,2,5,y,[dr,qn],null)),N,`Returns a lazy sequence of successive items from coll while (pred item) returns logical true. pred must be free of side-effects. - Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),khn=new Q(function(t,n){return ol(Mr(function(e){return ny(e,n)},ng.h(t)))},w9,new P(null,5,[q,w9,W,null,N,null,Y,!0,V,K],null),null),Shn=new Q(Va,R9,new P(null,5,[q,R9,W,U(new v(null,1,5,y,[qn],null),new v(null,2,5,y,[Sp,qn],null)),N,`Returns a sorted sequence of the items in coll. Comp can be + Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),xhn=new Q(function(t,n){return ol(Mr(function(e){return ny(e,n)},ng.h(t)))},w9,new P(null,5,[q,w9,W,null,N,null,Y,!0,V,K],null),null),khn=new Q(Va,R9,new P(null,5,[q,R9,W,U(new v(null,1,5,y,[qn],null),new v(null,2,5,y,[Sp,qn],null)),N,`Returns a sorted sequence of the items in coll. Comp can be boolean-valued comparison function, or a -/0/+ valued comparator. - Comp defaults to compare.`,Y,!0,V,K],null),null),Ohn=new Q(function(t){return t===!1},fE,new P(null,5,[q,fE,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is the value false, false otherwise.",Y,!0,V,K],null),null),Chn=new Q(B5,N8,new P(null,5,[q,N8,W,U(new v(null,1,5,y,[Krn],null)),N,`A transducer which concatenates the contents of each input, which must be a - collection, into the reduction.`,Y,!0,V,K],null),null),Ahn=st(hC,Z3,K,!0,new P(null,3,[q,hC,W,U(new v(null,3,5,y,[hln,Cn,Qy],null)),N,`Extend a type to a series of protocols. Useful when you are + Comp defaults to compare.`,Y,!0,V,K],null),null),Shn=new Q(function(t){return t===!1},fE,new P(null,5,[q,fE,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is the value false, false otherwise.",Y,!0,V,K],null),null),Ohn=new Q(B5,N8,new P(null,5,[q,N8,W,U(new v(null,1,5,y,[Jrn],null)),N,`A transducer which concatenates the contents of each input, which must be a + collection, into the reduction.`,Y,!0,V,K],null),null),Chn=st(hC,Z3,K,!0,new P(null,3,[q,hC,W,U(new v(null,3,5,y,[aln,Cn,Qy],null)),N,`Extend a type to a series of protocols. Useful when you are supplying the definitions explicitly inline. Propagates the type as a type hint on the first argument of all fns. @@ -416,32 +416,32 @@ (-count [c] ...) Foo (bar [x y] ...) - (baz ([x] ...) ([x y] ...) ...)`],null)),Ehn=new Q(w0,Km,new P(null,5,[q,Km,W,U(new v(null,1,5,y,[Vy],null),new v(null,2,5,y,[Vy,qn],null)),N,`Given a map of replacement pairs and a vector/collection, returns a + (baz ([x] ...) ([x y] ...) ...)`],null)),Ahn=new Q(w0,Km,new P(null,5,[q,Km,W,U(new v(null,1,5,y,[Vy],null),new v(null,2,5,y,[Vy,qn],null)),N,`Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a key in smap replaced with the corresponding val in smap. Returns a transducer when no collection - is provided.`,Y,!0,V,K],null),null),Rhn=st(qy,i4,null,null,new P(null,3,[q,qy,W,U(new v(null,3,5,y,[MG,Cn,Ql],null)),N,`Repeatedly executes body (presumably for side-effects) with + is provided.`,Y,!0,V,K],null),null),Ehn=st(qy,i4,null,null,new P(null,3,[q,qy,W,U(new v(null,3,5,y,[DG,Cn,Ql],null)),N,`Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by "for". Does not retain - the head of the sequence. Returns nil.`],null)),Phn=new Q(il,FA,new P(null,5,[q,FA,W,U(mt(new v(null,1,5,y,[zt],null),new P(null,1,[Eh,new v(null,1,5,y,[U(oa,zt)],null)],null)),mt(new v(null,2,5,y,[zt,qn],null),new P(null,1,[Eh,new v(null,1,5,y,[U(oa,zt)],null)],null))),N,`Returns a lazy sequence of all but the first n items in coll. - Returns a stateful transducer when no collection is provided.`,Y,!0,V,K],null),null),Ihn=new Q(Uc,TA,new P(null,5,[q,TA,W,null,N,null,Y,!0,V,K],null),null),_hn=new Q(Xn,OO,new P(null,5,[q,OO,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is logical false, false otherwise.",Y,!0,V,K],null),null),Thn=new Q(oo,TS,new P(null,5,[q,TS,W,U(new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,qn],null)),N,`Returns a lazy sequence of the non-nil results of (f item). Note, + the head of the sequence. Returns nil.`],null)),Rhn=new Q(il,FA,new P(null,5,[q,FA,W,U(mt(new v(null,1,5,y,[zt],null),new P(null,1,[Eh,new v(null,1,5,y,[U(oa,zt)],null)],null)),mt(new v(null,2,5,y,[zt,qn],null),new P(null,1,[Eh,new v(null,1,5,y,[U(oa,zt)],null)],null))),N,`Returns a lazy sequence of all but the first n items in coll. + Returns a stateful transducer when no collection is provided.`,Y,!0,V,K],null),null),Phn=new Q(Uc,TA,new P(null,5,[q,TA,W,null,N,null,Y,!0,V,K],null),null),Ihn=new Q(Xn,OO,new P(null,5,[q,OO,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is logical false, false otherwise.",Y,!0,V,K],null),null),_hn=new Q(oo,TS,new P(null,5,[q,TS,W,U(new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,qn],null)),N,`Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f must be free of - side-effects. Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),Dhn=new Q(Dn,YA,new P(null,5,[q,YA,W,U(new v(null,2,5,y,[gn,qn],null)),N,"Returns a new seq where x is the first element and coll is the rest.",Y,!0,V,K],null),null),Mhn=IJ,$hn=new Q(rN,pR,new P(null,6,[q,pR,Fn,rN,W,U(new v(null,2,5,y,[gn,zt],null)),N,"Bitwise shift right",Y,!0,V,K],null),null),Nhn=new Q(uU,a7,new P(null,5,[q,a7,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if coll implements IAssociative",Y,!0,V,K],null),null),qhn=new Q(hs,Nm,new P(null,5,[q,Nm,W,null,N,null,Y,!0,V,K],null),!0),_J=Li(WQ,null,new P(null,1,[V,K],null));Wa(_J);var Lhn=Wr(uon,[ion,Rc,son,oon,aon,hon,con,fon,gon,mon,won,don,pon,von,yon,jon,CJ,xon,kon,Son,Oon,Con,Aon,Eon,Ron,Pon,Ion,_on,Ton,Don,Mon,$on,Non,qon,Lon,Won,Von,zon,Uon,Yon,Qon,Gon,Jon,Kon,Bon,Xon,Fon,Hon,Zon,bon,nan,tan,ean,lan,ran,uan,ian,san,oan,aan,han,can,fan,gan,man,Ag,wan,dan,pan,van,yan,OJ,jan,xan,kan,San,Oan,Can,Aan,Ean,Ran,Pan,Ian,_an,Tan,Dan,Man,$an,Nan,qan,Lan,Wan,Van,zan,Uan,Yan,Qan,Gan,Jan,Kan,Ban,Xan,Fan,Han,UR,Zan,ban,nhn,thn,ehn,lhn,rhn,uhn,ihn,shn,ohn,ahn,hhn,chn,fhn,ghn,mhn,whn,Hc,dhn,phn,vhn,yhn,jhn,xhn,khn,Shn,Ohn,Chn,Ahn,Bc,Ehn,Rhn,Phn,Ihn,_hn,Thn,Dhn,Mhn,$hn,Nhn,qhn,_J,new Q(function(t,n){var e=J(t_);return e.g?e.g(t,n):e.call(null,t,n)},J7,new P(null,5,[q,J7,W,U(new v(null,1,5,y,[uL],null)),N,`Repeatedly calls macroexpand-1 on form until it no longer + side-effects. Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),Thn=new Q(Dn,YA,new P(null,5,[q,YA,W,U(new v(null,2,5,y,[gn,qn],null)),N,"Returns a new seq where x is the first element and coll is the rest.",Y,!0,V,K],null),null),Dhn=PJ,Mhn=new Q(lN,pR,new P(null,6,[q,pR,Fn,lN,W,U(new v(null,2,5,y,[gn,zt],null)),N,"Bitwise shift right",Y,!0,V,K],null),null),$hn=new Q(rU,a7,new P(null,5,[q,a7,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if coll implements IAssociative",Y,!0,V,K],null),null),Nhn=new Q(hs,Nm,new P(null,5,[q,Nm,W,null,N,null,Y,!0,V,K],null),!0),IJ=Li(LQ,null,new P(null,1,[V,K],null));Wa(IJ);var qhn=Wr(ron,[uon,Rc,ion,son,oon,aon,hon,con,fon,gon,mon,won,don,pon,von,yon,OJ,jon,xon,kon,Son,Oon,Con,Aon,Eon,Ron,Pon,Ion,_on,Ton,Don,Mon,$on,Non,qon,Lon,Won,Von,zon,Uon,Yon,Qon,Gon,Jon,Kon,Bon,Xon,Fon,Hon,Zon,bon,nan,tan,ean,lan,ran,uan,ian,san,oan,aan,han,can,fan,gan,Ag,man,wan,dan,pan,van,SJ,yan,jan,xan,kan,San,Oan,Can,Aan,Ean,Ran,Pan,Ian,_an,Tan,Dan,Man,$an,Nan,qan,Lan,Wan,Van,zan,Uan,Yan,Qan,Gan,Jan,Kan,Ban,Xan,Fan,UR,Han,Zan,ban,nhn,thn,ehn,lhn,rhn,uhn,ihn,shn,ohn,ahn,hhn,chn,fhn,ghn,mhn,Hc,whn,dhn,phn,vhn,yhn,jhn,xhn,khn,Shn,Ohn,Chn,Bc,Ahn,Ehn,Rhn,Phn,Ihn,_hn,Thn,Dhn,Mhn,$hn,Nhn,IJ,new Q(function(t,n){var e=J(t_);return e.g?e.g(t,n):e.call(null,t,n)},J7,new P(null,5,[q,J7,W,U(new v(null,1,5,y,[rL],null)),N,`Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it. Note neither - macroexpand-1 nor macroexpand expand macros in subforms.`,Y,!0,V,K],null),!0),new Q(function(t,n){return i3(Qt.h(t),n,!0,null)},DS,new P(null,5,[q,DS,W,U(new v(null,1,5,y,[dq],null),new v(null,2,5,y,[dq,cQ],null)),N,"Create a new namespace named by the symbol. Bootstrap only.",Y,!0,V,K],null),!0),YR,Kc,st(by,Ep,null,null,new P(null,3,[q,by,W,U(new v(null,2,5,y,[Fs,lm],null),new v(null,3,5,y,[Fs,lm,h6],null)),N,`Evaluates test. If logical false, evaluates and returns then expr, - otherwise else expr, if supplied, else nil.`],null)),new Q(function(t){return t!=null&&(t.H&1024||On===t.We)?t.Kc():E(Xt(t))},dC,new P(null,5,[q,dC,W,U(new v(null,1,5,y,[Kt],null)),N,null,Y,!0,V,K],null),null),new Q(function(t,n){return gw(t,n)},KO,new P(null,5,[q,KO,W,null,N,null,Y,!0,V,K],null),null),new Q(function(t,n){return t^1< key val - Returns a new sorted map with supplied mappings.`,Y,!0,V,K],null),null),na(lJ,function(t){return da(t)}),new Q(D,c7,new P(null,5,[q,c7,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Sin],null)),N,"Returns a lazy seq representing the concatenation of the elements in the supplied colls.",Y,!0,V,K],null),null),new Q(gu,CR,new P(null,6,[q,CR,Fn,gu,W,U(new v(null,1,5,y,[gn],null)),N,"Coerce to char",Y,!0,V,K],null),null),new Q(Wk,d8,new P(null,5,[q,d8,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a symbol or keyword",Y,!0,V,K],null),null),new Q(Lh,FO,new P(null,5,[q,FO,W,U(new v(null,1,5,y,[tf],null),new v(null,2,5,y,[cf,tf],null),new v(null,4,5,y,[cf,tf,Cn,Ein],null)),N,`Construct a JavaScript array of the specified dimensions. Accepts ignored + Returns a new sorted map with supplied mappings.`,Y,!0,V,K],null),null),na(eJ,function(t){return da(t)}),new Q(D,c7,new P(null,5,[q,c7,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,kin],null)),N,"Returns a lazy seq representing the concatenation of the elements in the supplied colls.",Y,!0,V,K],null),null),new Q(gu,CR,new P(null,6,[q,CR,Fn,gu,W,U(new v(null,1,5,y,[gn],null)),N,"Coerce to char",Y,!0,V,K],null),null),new Q(Wk,d8,new P(null,5,[q,d8,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a symbol or keyword",Y,!0,V,K],null),null),new Q(Lh,FO,new P(null,5,[q,FO,W,U(new v(null,1,5,y,[tf],null),new v(null,2,5,y,[cf,tf],null),new v(null,4,5,y,[cf,tf,Cn,Ain],null)),N,`Construct a JavaScript array of the specified dimensions. Accepts ignored type argument for compatibility with Clojure. Note that there is no efficient way to allocate multi-dimensional arrays in JavaScript; as such, this function - will run in polynomial time when called with 3 or more arguments.`,Y,!0,V,K],null),null),new Q(ui,$E,new P(null,5,[q,$E,W,U(new v(null,1,5,y,[jrn],null)),N,null,Y,!0,V,K],null),null),new Q(B2,DC,new P(null,5,[q,DC,W,U(new v(null,1,5,y,[qn],null)),N,`For a list or queue, same as first, for a vector, same as, but much + will run in polynomial time when called with 3 or more arguments.`,Y,!0,V,K],null),null),new Q(ui,$E,new P(null,5,[q,$E,W,U(new v(null,1,5,y,[yrn],null)),N,null,Y,!0,V,K],null),null),new Q(B2,DC,new P(null,5,[q,DC,W,U(new v(null,1,5,y,[qn],null)),N,`For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is empty, returns nil.`,Y,!0,V,K],null),null),new Q(gr,fC,new P(null,5,[q,fC,W,U(new v(null,1,5,y,[qn],null)),N,`Returns the hash code, consistent with =, for an external unordered collection implementing Iterable. For maps, the iterator should return map entries whose hash is computed as (hash-ordered-coll [k v]). - See http://clojure.org/data_structures#hash for full algorithms.`,Y,!0,V,K],null),null),st(Tw,x4,null,null,new P(null,3,[q,Tw,W,U(new v(null,3,5,y,[Fs,Cn,Ql],null)),N,"Evaluates test. If logical true, evaluates body in an implicit do."],null)),new Q(S3,CA,new P(null,5,[q,CA,W,U(new v(null,3,5,y,[gn,Cn,new P(null,3,[_I,new v(null,1,5,y,[Kq],null),FS,new P(null,1,[Kq,Ir],null),ho,Eq],null)],null)),N,`Recursively transforms ClojureScript values to JavaScript. + See http://clojure.org/data_structures#hash for full algorithms.`,Y,!0,V,K],null),null),st(Tw,x4,null,null,new P(null,3,[q,Tw,W,U(new v(null,3,5,y,[Fs,Cn,Ql],null)),N,"Evaluates test. If logical true, evaluates body in an implicit do."],null)),new Q(S3,CA,new P(null,5,[q,CA,W,U(new v(null,3,5,y,[gn,Cn,new P(null,3,[_I,new v(null,1,5,y,[Jq],null),FS,new P(null,1,[Jq,Ir],null),ho,Aq],null)],null)),N,`Recursively transforms ClojureScript values to JavaScript. sets/vectors/lists become Arrays, Keywords and Symbol become Strings, Maps become Objects. Arbitrary keys are encoded to by \`key->js\`. Options is a key-value pair, where the only valid key is @@ -455,7 +455,7 @@ remaining items in other colls are ignored. The transform should accept number-of-colls arguments`,Y,!0,V,K],null),null),new Q(J1,AR,new P(null,5,[q,AR,W,U(new v(null,2,5,y,[Bn,qn],null)),N,`Returns a map of the elements of coll keyed by the result of f on each element. The value at each key will be a vector of the - corresponding elements, in the order they appeared in coll.`,Y,!0,V,K],null),null),new Q(function(t,n){if(typeof n=="string")return pen(t,n);throw new TypeError("re-seq must match against a string.")},d7,new P(null,5,[q,d7,W,U(new v(null,2,5,y,[k1,Kt],null)),N,"Returns a lazy sequence of successive matches of re in s.",Y,!0,V,K],null),null),na(pm,hg),st(C9,P4,null,null,new P(null,3,[q,C9,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`bindings => binding-form test + corresponding elements, in the order they appeared in coll.`,Y,!0,V,K],null),null),new Q(function(t,n){if(typeof n=="string")return den(t,n);throw new TypeError("re-seq must match against a string.")},d7,new P(null,5,[q,d7,W,U(new v(null,2,5,y,[k1,Kt],null)),N,"Returns a lazy sequence of successive matches of re in s.",Y,!0,V,K],null),null),na(pm,hg),st(C9,P4,null,null,new P(null,3,[q,C9,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`bindings => binding-form test When test is not nil, evaluates body with binding-form bound to the value of test`],null)),new Q(pc,wO,new P(null,6,[q,wO,Fn,pc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`If no ys are supplied, returns the negation of x, else subtracts @@ -469,15 +469,15 @@ side-effects. Returns a stateful transducer when no collection is provided.`,Y,!0,V,K],null),null),new Q(cd,tE,new P(null,5,[q,tE,W,U(Yn,new v(null,2,5,y,[Cn,Bd],null)),N,`Create JavaSript object from an even number arguments representing interleaved keys and values.`,Y,!0,V,K],null),null),new Q(Ol,K7,new P(null,5,[q,K7,W,U(new v(null,2,5,y,[dr,qn],null)),N,`Returns true if (pred x) is logical true for every x in coll, else - false.`,Y,!0,V,K],null),null),new Q(ms,Sp,new P(null,5,[q,Sp,W,U(Yn,new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,Gd],null),new v(null,3,5,y,[Bn,Gd,ra],null),new v(null,5,5,y,[Pun,Iun,_un,Cn,aL],null)),N,`Takes a set of functions and returns a fn that is the composition + false.`,Y,!0,V,K],null),null),new Q(ms,Sp,new P(null,5,[q,Sp,W,U(Yn,new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,Gd],null),new v(null,3,5,y,[Bn,Gd,ra],null),new v(null,5,5,y,[Run,Pun,Iun,Cn,oL],null)),N,`Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable number of args, applies the rightmost of fns to the args, the next fn (right-to-left) to the result, etc.`,Y,!0,V,K],null),null),new Q(function(t,n){return t|1<t:!1},QA,new P(null,5,[q,QA,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies int? and is negative.",Y,!0,V,K],null),null),new Q(br,nS,new P(null,5,[q,nS,W,U(new v(null,2,5,y,[Bn,qn],null),new v(null,3,5,y,[Bn,bo,dh],null),new v(null,4,5,y,[Bn,bo,dh,vv],null),new v(null,6,5,y,[Bn,bo,dh,vv,Cn,rm],null)),N,`Returns a vector consisting of the result of applying f to the + that does not contain a mapping for key(s).`,Y,!0,V,K],null),null),new Q(mc,ZC,new P(null,6,[q,ZC,Fn,mc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the least of the nums.",Y,!0,V,K],null),null),new Q(Xz,NA,new P(null,5,[q,NA,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is a JavaScript string of length one.",Y,!0,V,K],null),null),st(Zy,M4,null,null,new P(null,3,[q,Zy,W,null,N,null],null)),new Q(yl,eO,new P(null,5,[q,eO,W,U(Yn,new v(null,1,5,y,[bo],null),new v(null,2,5,y,[bo,dh],null),new v(null,4,5,y,[bo,dh,Cn,rm],null)),N,"Returns a lazy seq of the first item in each coll, then the second etc.",Y,!0,V,K],null),null),st(zE,T4,null,null,new P(null,3,[q,zE,W,U(new v(null,2,5,y,[Cn,vln],null)),N,"defs the supplied var names with no bindings, useful for making forward declarations."],null)),st(By,N4,null,null,new P(null,3,[q,By,W,null,N,null],null)),new Q(function(t){var n=cy(t);return x(n)?n:u3(t)!=null||!1},MO,new P(null,5,[q,MO,W,null,N,null,Y,!0,V,K],null),null),new Q(Qv,V9,new P(null,5,[q,V9,W,null,N,null,Y,!0,V,K],null),!0),new Q(dU,gR,new P(null,5,[q,gR,W,U(new v(null,2,5,y,[zt,qn],null)),N,"Returns a vector of [(take n coll) (drop n coll)]",Y,!0,V,K],null),null),new Q(function(t){return iu(t)?0>t:!1},QA,new P(null,5,[q,QA,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies int? and is negative.",Y,!0,V,K],null),null),new Q(br,nS,new P(null,5,[q,nS,W,U(new v(null,2,5,y,[Bn,qn],null),new v(null,3,5,y,[Bn,bo,dh],null),new v(null,4,5,y,[Bn,bo,dh,vv],null),new v(null,6,5,y,[Bn,bo,dh,vv,Cn,rm],null)),N,`Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function - f should accept number-of-colls arguments.`,Y,!0,V,K],null),null),st(u5,function(t,n,e,l){return L.h(E(D.j(new g(null,yt,null,1,null),new g(null,_n(L.h(E(D.g(new g(null,EL,null,1,null),new g(null,L.h(E(D.g(new g(null,Mi,null,1,null),new g(null,e,null,1,null)))),null,1,null))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,UI,null,1,null),new g(null,L.h(E(D.g(new g(null,bv,null,1,null),new g(null,EL,null,1,null)))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,Mi,null,1,null),new g(null,e,null,1,null),z([new g(null,l,null,1,null)])))),null,1,null)])))),null,1,null)]))))},null,null,new P(null,3,[q,u5,W,U(new v(null,2,5,y,[gn,i1],null)),N,`defs name to have the root value of init iff the named var has no root value, + f should accept number-of-colls arguments.`,Y,!0,V,K],null),null),st(u5,function(t,n,e,l){return L.h(E(D.j(new g(null,yt,null,1,null),new g(null,_n(L.h(E(D.g(new g(null,AL,null,1,null),new g(null,L.h(E(D.g(new g(null,Mi,null,1,null),new g(null,e,null,1,null)))),null,1,null))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,UI,null,1,null),new g(null,L.h(E(D.g(new g(null,bv,null,1,null),new g(null,AL,null,1,null)))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,Mi,null,1,null),new g(null,e,null,1,null),z([new g(null,l,null,1,null)])))),null,1,null)])))),null,1,null)]))))},null,null,new P(null,3,[q,u5,W,U(new v(null,2,5,y,[gn,i1],null)),N,`defs name to have the root value of init iff the named var has no root value, else init is unevaluated`],null)),new Q(function(t,n){return rI(Qt.h(t),n),null},b9,new P(null,5,[q,b9,W,null,N,null,Y,!0,V,K],null),!0),new Q(a4,bE,new P(null,5,[q,bE,W,U(new v(null,2,5,y,[Cn,Bm],null)),N,"Same as pr followed by (newline).",Y,!0,V,K],null),null),new Q(Kf,fR,new P(null,5,[q,fR,W,U(new v(null,1,5,y,[Kt],null),new v(null,2,5,y,[zt,Kt],null)),N,"Return a lazy sequence of all but the last n (default 1) items in coll",Y,!0,V,K],null),null),new Q(Pp,YE,new P(null,5,[q,YE,W,null,N,null,Y,!0,V,K],null),null),new Q(Co,F8,new P(null,5,[q,F8,W,U(new v(null,2,5,y,[Bn,gn],null),new v(null,3,5,y,[Bn,gn,tt],null),new v(null,4,5,y,[Bn,gn,tt,mv],null)),N,`Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third @@ -485,11 +485,11 @@ arguments, not just the one(s) being nil-patched.`,Y,!0,V,K],null),null),st(LA,A4,null,null,new P(null,3,[q,LA,W,U(new v(null,3,5,y,[Oh,Cn,O1],null)),N,`Takes an expression and a set of test/form pairs. Threads expr (via ->>) through each form for which the corresponding test expression is true. Note that, unlike cond branching, cond->> threading does not short circuit - after the first true test expression.`],null)),new Q(sc,Y8,new P(null,5,[q,Y8,W,null,N,null,Y,!0,V,K],null),null),new Q(DN,QE,new P(null,5,[q,QE,W,U(new v(null,2,5,y,[fQ,gn],null)),N,"Returns true if x satisfies the protocol",Y,!0,V,K],null),null),new Q(A,x1,new P(null,5,[q,x1,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a seq of the items after the first. Calls seq on its - argument. If there are no more items, returns nil`,Y,!0,V,K],null),null),new Q(So,gp,new P(null,6,[q,gp,Fn,So,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the sum of nums. (+) returns 0.",Y,!0,V,K],null),null),new Q(function(t,n){Uc(Ll([Ne,J(Ne)]));try{var e=b5(dg(n));for(n=null;;){var l=o0(t,e,null);if(on(C3,l))return n;n=u8(t,l)}}finally{sc()}},PE,new P(null,5,[q,PE,W,null,N,null,Y,!0,V,K],null),!0),new Q(Zn,Ir,new P(null,5,[q,Ir,W,U(new v(null,1,5,y,[gn],null)),N,"Returns the name String of a string, symbol or keyword.",Y,!0,V,K],null),null),new Q(N$,IO,new P(null,6,[q,IO,Fn,N$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),st(ky,E4,null,null,new P(null,3,[q,ky,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`bindings => binding-form test + after the first true test expression.`],null)),new Q(sc,Y8,new P(null,5,[q,Y8,W,null,N,null,Y,!0,V,K],null),null),new Q(TN,QE,new P(null,5,[q,QE,W,U(new v(null,2,5,y,[cQ,gn],null)),N,"Returns true if x satisfies the protocol",Y,!0,V,K],null),null),new Q(A,x1,new P(null,5,[q,x1,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a seq of the items after the first. Calls seq on its + argument. If there are no more items, returns nil`,Y,!0,V,K],null),null),new Q(So,gp,new P(null,6,[q,gp,Fn,So,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the sum of nums. (+) returns 0.",Y,!0,V,K],null),null),new Q(function(t,n){Uc(Ll([Ne,J(Ne)]));try{var e=b5(dg(n));for(n=null;;){var l=o0(t,e,null);if(on(C3,l))return n;n=u8(t,l)}}finally{sc()}},PE,new P(null,5,[q,PE,W,null,N,null,Y,!0,V,K],null),!0),new Q(Zn,Ir,new P(null,5,[q,Ir,W,U(new v(null,1,5,y,[gn],null)),N,"Returns the name String of a string, symbol or keyword.",Y,!0,V,K],null),null),new Q($$,IO,new P(null,6,[q,IO,Fn,$$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),st(ky,E4,null,null,new P(null,3,[q,ky,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test`],null)),new Q(lh,Bv,new P(null,5,[q,Bv,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a Symbol",Y,!0,V,K],null),null),new Q(al,yE,new P(null,5,[q,yE,W,U(new v(null,2,5,y,[Kv,Ly],null)),N,null,Y,!0,V,K],null),null),new Q(c0,r7,new P(null,5,[q,r7,W,U(new v(null,2,5,y,[js,Gi],null),new v(null,4,5,y,[js,Gi,Cn,Mw],null)),N,`disj[oin]. Returns a transient set of the same (hashed/sorted) type, that - does not contain key(s).`,Y,!0,V,K],null),null),new Q(function(t,n){return new X5(t,n)},I8,new P(null,5,[q,I8,W,U(new v(null,2,5,y,[Fg,qn],null)),N,"Positional factory function for cljs.core/Eduction.",Y,!0,V,K],null),null),new Q(UN,SC,new P(null,5,[q,SC,W,U(new v(null,1,5,y,[hv],null)),N,"Returns a map of the import mappings for the namespace.",Y,!0,V,K],null),!0),new Q(function(t){return ty(t)},wE,new P(null,5,[q,wE,W,U(new v(null,1,5,y,[rf],null)),N,"Given a multimethod, returns a map of dispatch values -> dispatch fns",Y,!0,V,K],null),null),new Q(function(t,n){return t.B=n},M9,new P(null,5,[q,M9,W,U(new v(null,2,5,y,[yv,Tr],null)),N,"Atomically resets the metadata for an atom",Y,!0,V,K],null),null),st(nO,function(t,n,e,l,r,u,i){return L.h(E(D.j(new g(null,yt,null,1,null),new g(null,_n(L.h(E(D.j(new g(null,$L,null,1,null),new g(null,e,null,1,null),z([new g(null,Qq,null,1,null),new g(null,L.h(E(D.g(new g(null,tG,null,1,null),new g(null,$L,null,1,null)))),null,1,null)]))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,MI,null,1,null),new g(null,_n(L.h(E(D.j(new g(null,l,null,1,null),new g(null,0,null,1,null),z([new g(null,r,null,1,null),new g(null,u,null,1,null)]))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,se,null,1,null),new g(null,L.h(E(D.j(new g(null,Cp,null,1,null),new g(null,l,null,1,null),z([new g(null,Qq,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,pd,null,1,null),new g(null,L.h(E(D.g(new g(null,vun,null,1,null),new g(null,l,null,1,null)))),null,1,null),z([new g(null,i,null,1,null)])))),null,1,null),new g(null,r,null,1,null)])))),null,1,null)])))),null,1,null)]))))},null,null,new P(null,3,[q,nO,W,U(new v(null,5,5,y,[$l,am,wG,i1,Oh],null)),N,`Reduces an expression across an array a, using an index named idx, + does not contain key(s).`,Y,!0,V,K],null),null),new Q(function(t,n){return new X5(t,n)},I8,new P(null,5,[q,I8,W,U(new v(null,2,5,y,[Fg,qn],null)),N,"Positional factory function for cljs.core/Eduction.",Y,!0,V,K],null),null),new Q(zN,SC,new P(null,5,[q,SC,W,U(new v(null,1,5,y,[hv],null)),N,"Returns a map of the import mappings for the namespace.",Y,!0,V,K],null),!0),new Q(function(t){return ty(t)},wE,new P(null,5,[q,wE,W,U(new v(null,1,5,y,[rf],null)),N,"Given a multimethod, returns a map of dispatch values -> dispatch fns",Y,!0,V,K],null),null),new Q(function(t,n){return t.B=n},M9,new P(null,5,[q,M9,W,U(new v(null,2,5,y,[yv,Tr],null)),N,"Atomically resets the metadata for an atom",Y,!0,V,K],null),null),st(nO,function(t,n,e,l,r,u,i){return L.h(E(D.j(new g(null,yt,null,1,null),new g(null,_n(L.h(E(D.j(new g(null,ML,null,1,null),new g(null,e,null,1,null),z([new g(null,Yq,null,1,null),new g(null,L.h(E(D.g(new g(null,nG,null,1,null),new g(null,ML,null,1,null)))),null,1,null)]))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,MI,null,1,null),new g(null,_n(L.h(E(D.j(new g(null,l,null,1,null),new g(null,0,null,1,null),z([new g(null,r,null,1,null),new g(null,u,null,1,null)]))))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,se,null,1,null),new g(null,L.h(E(D.j(new g(null,Cp,null,1,null),new g(null,l,null,1,null),z([new g(null,Yq,null,1,null)])))),null,1,null),z([new g(null,L.h(E(D.j(new g(null,pd,null,1,null),new g(null,L.h(E(D.g(new g(null,pun,null,1,null),new g(null,l,null,1,null)))),null,1,null),z([new g(null,i,null,1,null)])))),null,1,null),new g(null,r,null,1,null)])))),null,1,null)])))),null,1,null)]))))},null,null,new P(null,3,[q,nO,W,U(new v(null,5,5,y,[$l,am,mG,i1,Oh],null)),N,`Reduces an expression across an array a, using an index named idx, and return value named ret, initialized to init, setting ret to the evaluation of expr at each step, returning ret.`],null)),st(xs,rj,null,null,new P(null,4,[q,xs,W,null,N,null,zm,xs],null)),new Q(Ow,JS,new P(null,5,[q,JS,W,U(new v(null,1,5,y,[gn],null),new v(null,3,5,y,[gn,Cn,jf],null)),N,`Recursively transforms JavaScript arrays into ClojureScript vectors, and JavaScript objects into ClojureScript maps. With @@ -498,7 +498,7 @@ Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1.`],null)),new Q(ev,SS,new P(null,5,[q,SS,W,U(new v(null,1,5,y,[zt],null)),N,"Returns a random integer between 0 (inclusive) and n (exclusive).",Y,!0,V,K],null),null),new Q(Bp,GC,new P(null,5,[q,GC,W,U(new v(null,1,5,y,[Bn],null)),N,`Takes a fn f and returns a fn that takes the same arguments as f, - has the same effects, if any, and returns the opposite truth value.`,Y,!0,V,K],null),null),new Q(Zw,TO,new P(null,5,[q,TO,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x implements IList",Y,!0,V,K],null),null),new Q(Wh,hS,new P(null,6,[q,hS,Fn,Wh,W,U(new v(null,2,5,y,[ea,am],null),new v(null,4,5,y,[ea,am,Cn,lun],null)),N,"Returns the value at the index/indices. Works on JavaScript arrays.",Y,!0,V,K],null),null),new Q(hu,dO,new P(null,5,[q,dO,W,U(new v(null,2,5,y,[Af,Mw],null)),N,"Returns a map with the keys mapped to the corresponding vals.",Y,!0,V,K],null),null),new Q(function(t,n){if($v(n)){var e=$n.h(qe(n));if(n=$n.h(Zn(n)),t=cn.g(ct.h(J(Qt.h(t))),e),x(t))return cn.g(t,n);throw Error(["No such namespace: ",M.h(e)].join(""))}throw Error(["Not a qualified symbol: ",M.h(n)].join(""))},lA,new P(null,5,[q,lA,W,null,N,null,Y,!0,V,K],null),!0),st(Uy,function(t,n,e,l){stn(t,e);var r=function(){function u(s){var a=null;if(0 key val - Returns a new hash map with supplied mappings.`,Y,!0,V,K],null),null),new Q(W$,HS,new P(null,6,[q,HS,Fn,W$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(Ea,bS,new P(null,5,[q,bS,W,U(new v(null,2,5,y,[Ze,gn],null),new v(null,3,5,y,[Ze,gn,tt],null),new v(null,5,5,y,[Ze,gn,tt,Cn,Ee],null)),N,`Returns the x for which (k x), a number, is greatest. + undefined.`,Y,!0,V,K],null),null),new Q(X$,KA,new P(null,6,[q,KA,Fn,X$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(pU,Z9,new P(null,5,[q,Z9,W,U(new v(null,2,5,y,[Bn,gn],null)),N,"Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects",Y,!0,V,K],null),null),new Q(ol,hp,new P(null,6,[q,hp,Fn,ol,W,U(new v(null,1,5,y,[gn],null)),N,"Coerce to boolean",Y,!0,V,K],null),null),new Q(Ko,S8,new P(null,5,[q,S8,W,U(new v(null,2,5,y,[Cn,Bd],null)),N,`keyval => key val + Returns a new hash map with supplied mappings.`,Y,!0,V,K],null),null),new Q(L$,HS,new P(null,6,[q,HS,Fn,L$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(Ea,bS,new P(null,5,[q,bS,W,U(new v(null,2,5,y,[Ze,gn],null),new v(null,3,5,y,[Ze,gn,tt],null),new v(null,5,5,y,[Ze,gn,tt,Cn,Ee],null)),N,`Returns the x for which (k x), a number, is greatest. - If there are multiple such xs, the last one is returned.`,Y,!0,V,K],null),null),new Q(function(t){var n=Wk(t);return n?(t=qe(t),t=x(t)?!0:t):t=n,ol(t)},aA,new P(null,5,[q,aA,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a symbol or keyword with a namespace",Y,!0,V,K],null),null),new Q(fd,BE,new P(null,5,[q,BE,W,U(new v(null,2,5,y,[js,Ui],null),new v(null,4,5,y,[js,Ui,Cn,yi],null)),N,"Returns a transient map that doesn't contain a mapping for key(s).",Y,!0,V,K],null),null),new Q(mg,kE,new P(null,5,[q,kE,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x satisfies ICollection",Y,!0,V,K],null),null),new Q(cU,NE,new P(null,5,[q,NE,W,U(new v(null,1,5,y,[qn],null)),N,"Returns true if coll satisfies? IReversible.",Y,!0,V,K],null),null),new Q(function(t,n,e){return ut.g(Qt.h(t),function(l){var r=Ii(t,n);return r=ii(r),Pl.i(l,new v(null,2,5,y,[ct,r],null),function(u){return Gn(wu.h(u),e)?Ct.j(_e.u(u,wu,Ct,e),u,z([e])):Gn(u,e)?Ct.g(u,e):Gn(Vr.h(l),e)||Gn(Vr.h(u),e)?_e.F(u,Vr,fn,e,null):u})}),null},cR,new P(null,5,[q,cR,W,U(new v(null,2,5,y,[hv,Zq],null)),N,"Removes the mappings for the symbol from the namespace.",Y,!0,V,K],null),!0),new Q(dn,E8,new P(null,5,[q,E8,W,U(new v(null,2,5,y,[Bn,wr],null),new v(null,3,5,y,[Bn,gn,wr],null),new v(null,4,5,y,[Bn,gn,tt,wr],null),new v(null,5,5,y,[Bn,gn,tt,mv,wr],null),new v(null,7,5,y,[Bn,$l,gi,la,nf,Cn,wr],null)),N,"Applies fn f to the argument list formed by prepending intervening arguments to args.",Y,!0,V,K],null),null),a5,new Q(Ba,mR,new P(null,5,[q,mR,W,U(new v(null,2,5,y,[mh,Bg],null),new v(null,3,5,y,[mh,Bg,Jd],null)),N,`Returns a persistent vector of the items in vector from + If there are multiple such xs, the last one is returned.`,Y,!0,V,K],null),null),new Q(function(t){var n=Wk(t);return n?(t=qe(t),t=x(t)?!0:t):t=n,ol(t)},aA,new P(null,5,[q,aA,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a symbol or keyword with a namespace",Y,!0,V,K],null),null),new Q(fd,BE,new P(null,5,[q,BE,W,U(new v(null,2,5,y,[js,Ui],null),new v(null,4,5,y,[js,Ui,Cn,yi],null)),N,"Returns a transient map that doesn't contain a mapping for key(s).",Y,!0,V,K],null),null),new Q(mg,kE,new P(null,5,[q,kE,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x satisfies ICollection",Y,!0,V,K],null),null),new Q(hU,NE,new P(null,5,[q,NE,W,U(new v(null,1,5,y,[qn],null)),N,"Returns true if coll satisfies? IReversible.",Y,!0,V,K],null),null),new Q(function(t,n,e){return ut.g(Qt.h(t),function(l){var r=Ii(t,n);return r=ii(r),Pl.i(l,new v(null,2,5,y,[ct,r],null),function(u){return Gn(wu.h(u),e)?Ct.j(_e.u(u,wu,Ct,e),u,z([e])):Gn(u,e)?Ct.g(u,e):Gn(Vr.h(l),e)||Gn(Vr.h(u),e)?_e.F(u,Vr,fn,e,null):u})}),null},cR,new P(null,5,[q,cR,W,U(new v(null,2,5,y,[hv,Hq],null)),N,"Removes the mappings for the symbol from the namespace.",Y,!0,V,K],null),!0),new Q(dn,E8,new P(null,5,[q,E8,W,U(new v(null,2,5,y,[Bn,wr],null),new v(null,3,5,y,[Bn,gn,wr],null),new v(null,4,5,y,[Bn,gn,tt,wr],null),new v(null,5,5,y,[Bn,gn,tt,mv,wr],null),new v(null,7,5,y,[Bn,$l,gi,la,nf,Cn,wr],null)),N,"Applies fn f to the argument list formed by prepending intervening arguments to args.",Y,!0,V,K],null),null),a5,new Q(Ba,mR,new P(null,5,[q,mR,W,U(new v(null,2,5,y,[mh,Bg],null),new v(null,3,5,y,[mh,Bg,Jd],null)),N,`Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied, defaults to (count vector). This operation is O(1) and very fast, as the resulting vector shares structure with the original and no - trimming is done.`,Y,!0,V,K],null),null),new Q(Y3,H9,new P(null,5,[q,H9,W,U(new v(null,2,5,y,[Pq,dm],null),new v(null,3,5,y,[ra,Pq,dm],null)),N,`Returns true if (= child parent), or child is directly or indirectly derived from + trimming is done.`,Y,!0,V,K],null),null),new Q(Y3,H9,new P(null,5,[q,H9,W,U(new v(null,2,5,y,[Rq,dm],null),new v(null,3,5,y,[ra,Rq,dm],null)),N,`Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a JavaScript type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy`,Y,!0,V,K],null),!0),new Q(function(t,n){return!Ol(t,n)},cS,new P(null,5,[q,cS,W,U(new v(null,2,5,y,[dr,qn],null)),N,`Returns false if (pred x) is logical true for every x in - coll, else true.`,Y,!0,V,K],null),null),new Q(non,My,new P(null,5,[q,My,W,U(new v(null,1,5,y,[kp],null)),N,`Returns exception cause (an Error / ExceptionInfo) if ex is an + coll, else true.`,Y,!0,V,K],null),null),new Q(bsn,My,new P(null,5,[q,My,W,U(new v(null,1,5,y,[kp],null)),N,`Returns exception cause (an Error / ExceptionInfo) if ex is an ExceptionInfo. Otherwise returns nil.`,Y,!0,V,K],null),null),new Q(Lk,l7,new P(null,5,[q,l7,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a Keyword",Y,!0,V,K],null),null),new Q(K1,yO,new P(null,5,[q,yO,W,U(new v(null,1,5,y,[kp],null)),N,`Returns exception data (a map) if ex is an ExceptionInfo. Otherwise returns nil.`,Y,!0,V,K],null),null),Xc,new Q(Zh,AE,new P(null,6,[q,AE,Fn,Zh,W,U(new v(null,2,5,y,[gn,tt],null)),N,`Comparator. Returns a negative number, zero, or a positive number @@ -536,9 +536,9 @@ of applying (the transformed) xf to init and the first item in coll, then applying xf to that result and the 2nd item, etc. If coll contains no items, returns init and f is not called. Note that - certain transforms may inject or skip items.`,Y,!0,V,K],null),null),Fsn,new Q(Nu,IE,new P(null,5,[q,IE,W,U(Yn,new v(null,1,5,y,[Jd],null),new v(null,2,5,y,[Bg,Jd],null),new v(null,3,5,y,[Bg,Jd,Dy],null)),N,`Returns a lazy seq of nums from start (inclusive) to end + certain transforms may inject or skip items.`,Y,!0,V,K],null),null),Xsn,new Q(Nu,IE,new P(null,5,[q,IE,W,U(Yn,new v(null,1,5,y,[Jd],null),new v(null,2,5,y,[Bg,Jd],null),new v(null,3,5,y,[Bg,Jd,Dy],null)),N,`Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, - and end to infinity.`,Y,!0,V,K],null),null),_sn,new Q(function(t){return t!=null?t.v&268435456||On===t.lf?!0:t.v?!1:Qn(y$,t):Qn(y$,t)},uO,new P(null,5,[q,uO,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if coll satisfies ISorted",Y,!0,V,K],null),null),new Q(YP,NS,new P(null,5,[q,NS,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a map from distinct items in coll to the number of times + and end to infinity.`,Y,!0,V,K],null),null),Isn,new Q(function(t){return t!=null?t.v&268435456||On===t.lf?!0:t.v?!1:Qn(v$,t):Qn(v$,t)},uO,new P(null,5,[q,uO,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if coll satisfies ISorted",Y,!0,V,K],null),null),new Q(YP,NS,new P(null,5,[q,NS,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a map from distinct items in coll to the number of times they appear.`,Y,!0,V,K],null),null),new Q(function(t){return(t=E(t))?new td(null,t,null,t,null):At},wA,new P(null,5,[q,wA,W,U(new v(null,1,5,y,[qn],null)),N,"Returns a lazy (infinite!) sequence of repetitions of the items in coll.",Y,!0,V,K],null),null),new Q(Oo,CE,new P(null,6,[q,CE,Fn,Oo,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the greatest of the nums.",Y,!0,V,K],null),null),new Q(Up,yA,new P(null,5,[q,yA,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x is a symbol without a namespace",Y,!0,V,K],null),null),st(SE,w4,K,!0,new P(null,3,[q,SE,W,U(new v(null,2,5,y,[Cn,Qy],null)),N,`reify creates an object implementing a protocol. reify is a macro with the following structure: @@ -577,15 +577,15 @@ (meta ^{:k :v} (reify Object (toString [this] "foo"))) == {:k :v}`],null)),new Q(oe,Q9,new P(null,5,[q,Q9,W,U(new v(null,1,5,y,[qn],null)),N,`Returns true if coll has no items - same as (not (seq coll)). - Please use the idiom (seq x) rather than (not (empty? x))`,Y,!0,V,K],null),null),new Q(Dt,N9,new P(null,5,[q,N9,W,U(Yn,new v(null,1,5,y,[q6],null),new v(null,2,5,y,[q6,bN],null),new v(null,3,5,y,[q6,Fg,bN],null)),N,`Returns a new coll consisting of to-coll with all of the items of + Please use the idiom (seq x) rather than (not (empty? x))`,Y,!0,V,K],null),null),new Q(Dt,N9,new P(null,5,[q,N9,W,U(Yn,new v(null,1,5,y,[q6],null),new v(null,2,5,y,[q6,ZN],null),new v(null,3,5,y,[q6,Fg,ZN],null)),N,`Returns a new coll consisting of to-coll with all of the items of from-coll conjoined. A transducer may be supplied.`,Y,!0,V,K],null),null),new Q(iu,vR,new P(null,5,[q,vR,W,U(new v(null,1,5,y,[zt],null)),N,"Returns true if n is a JavaScript number with no decimal part.",Y,!0,V,K],null),null),new Q(Ya,I7,new P(null,6,[q,I7,Fn,Ya,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,"Returns the product of nums. (*) returns 1.",Y,!0,V,K],null),null),st(dA,_4,null,null,new P(null,3,[q,dA,W,U(new v(null,3,5,y,[Oh,Cn,ym],null)),N,`When expr is not nil, threads it into the first form (via ->>), - and when that result is not nil, through the next etc`],null)),new Q(uN,bC,new P(null,6,[q,bC,Fn,uN,W,U(new v(null,2,5,y,[gn,zt],null)),N,"Bitwise shift right with zero fill",Y,!0,V,K],null),null),new Q(o4,xC,new P(null,5,[q,xC,W,U(new v(null,2,5,y,[Cn,Bm],null)),N,"pr to a string, returning it. Fundamental entrypoint to IPrintWithWriter.",Y,!0,V,K],null),null),st(wS,I4,null,null,new P(null,3,[q,wS,W,U(new v(null,3,5,y,[Oh,Cn,ym],null)),N,`When expr is not nil, threads it into the first form (via ->), + and when that result is not nil, through the next etc`],null)),new Q(rN,bC,new P(null,6,[q,bC,Fn,rN,W,U(new v(null,2,5,y,[gn,zt],null)),N,"Bitwise shift right with zero fill",Y,!0,V,K],null),null),new Q(o4,xC,new P(null,5,[q,xC,W,U(new v(null,2,5,y,[Cn,Bm],null)),N,"pr to a string, returning it. Fundamental entrypoint to IPrintWithWriter.",Y,!0,V,K],null),null),st(wS,I4,null,null,new P(null,3,[q,wS,W,U(new v(null,3,5,y,[Oh,Cn,ym],null)),N,`When expr is not nil, threads it into the first form (via ->), and when that result is not nil, through the next etc`],null)),st(HC,F4,null,null,new P(null,3,[q,HC,W,null,N,null],null)),new Q(ql,Kv,new P(null,5,[q,Kv,W,U(new v(null,1,5,y,[gi],null)),N,null,Y,!0,V,K],null),null),st(t5,O4,null,null,new P(null,3,[q,t5,W,U(new v(null,2,5,y,[Cn,O1],null)),N,`Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates and returns the value of the corresponding expr and doesn't evaluate any of the other tests or exprs. (cond) returns nil.`],null)),new Q(m3,_O,new P(null,5,[q,_O,W,U(Yn,new v(null,1,5,y,[qn],null)),N,`Returns a lazy sequence of the elements of coll with duplicates removed. - Returns a stateful transducer when no collection is provided.`,Y,!0,V,K],null),null),new Q(lU,zS,new P(null,5,[q,zS,W,U(new v(null,1,5,y,[gn],null)),N,"If x is already reduced?, returns it, else returns (reduced x)",Y,!0,V,K],null),null),new Q(Pt,q8,new P(null,6,[q,q8,Fn,Pt,W,U(new v(null,1,5,y,[Fv],null),new v(null,2,5,y,[tf,Zv],null)),N,`Creates an array of objects. Does not coerce array, provided for compatibility - with Clojure.`,Y,!0,V,K],null),null),new Q(Xa,P9,new P(null,5,[q,P9,W,U(new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,Gd],null),new v(null,3,5,y,[Bn,Gd,ra],null),new v(null,5,5,y,[Bn,Gd,ra,Cn,aL],null)),N,`Takes a set of functions and returns a fn that is the juxtaposition + Returns a stateful transducer when no collection is provided.`,Y,!0,V,K],null),null),new Q(eU,zS,new P(null,5,[q,zS,W,U(new v(null,1,5,y,[gn],null)),N,"If x is already reduced?, returns it, else returns (reduced x)",Y,!0,V,K],null),null),new Q(Pt,q8,new P(null,6,[q,q8,Fn,Pt,W,U(new v(null,1,5,y,[Fv],null),new v(null,2,5,y,[tf,Zv],null)),N,`Creates an array of objects. Does not coerce array, provided for compatibility + with Clojure.`,Y,!0,V,K],null),null),new Q(Xa,P9,new P(null,5,[q,P9,W,U(new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,Gd],null),new v(null,3,5,y,[Bn,Gd,ra],null),new v(null,5,5,y,[Bn,Gd,ra,Cn,oL],null)),N,`Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). @@ -601,20 +601,20 @@ therein. See https://clojure.org/reference/special_forms#binding-forms for - more information about destructuring.`],null)),new Q(Jo,aE,new P(null,5,[q,aE,W,U(new v(null,1,5,y,[pq],null),new v(null,2,5,y,[pq,qn],null)),N,`Returns a lazy seq of the elements of coll separated by sep. - Returns a stateful transducer when no collection is provided.`,Y,!0,V,K],null),null),new Q(Ii,MA,new P(null,5,[q,MA,W,null,N,null,Y,!0,V,K],null),!0),new Q(function(t,n){return t instanceof od?n!=null&&On===n.dd?X.g(t,n.type):X.g(t,pl.h(Wn(n))):we(t)?DN(t,n):n instanceof t},ZO,new P(null,5,[q,ZO,W,U(new v(null,2,5,y,[la,gn],null)),N,`Evaluates x and tests if it is an instance of the type + more information about destructuring.`],null)),new Q(Jo,aE,new P(null,5,[q,aE,W,U(new v(null,1,5,y,[dq],null),new v(null,2,5,y,[dq,qn],null)),N,`Returns a lazy seq of the elements of coll separated by sep. + Returns a stateful transducer when no collection is provided.`,Y,!0,V,K],null),null),new Q(Ii,MA,new P(null,5,[q,MA,W,null,N,null,Y,!0,V,K],null),!0),new Q(function(t,n){return t instanceof od?n!=null&&On===n.dd?X.g(t,n.type):X.g(t,pl.h(Wn(n))):we(t)?TN(t,n):n instanceof t},ZO,new P(null,5,[q,ZO,W,U(new v(null,2,5,y,[la,gn],null)),N,`Evaluates x and tests if it is an instance of the type c. Returns true or false`,Y,!0,V,K],null),null),new Q(G3,s7,new P(null,5,[q,s7,W,U(new v(null,1,5,y,[Qi],null),new v(null,2,5,y,[ra,Qi],null)),N,`Returns the immediate and indirect children of tag, through a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy. Note: does not work on JavaScript type inheritance relationships.`,Y,!0,V,K],null),!0),new Q(qt,U7,new P(null,5,[q,U7,W,U(new v(null,2,5,y,[Tr,yi],null),new v(null,3,5,y,[Tr,yi,r6],null)),N,`Returns the value in a nested associative structure, where ks is a sequence of keys. Returns nil if the key is not present, - or the not-found value if supplied.`,Y,!0,V,K],null),null),st($w,t4,null,null,new P(null,3,[q,$w,W,U(new v(null,2,5,y,[Cn,fun],null)),N,`params => positional-params* , or positional-params* & next-param + or the not-found value if supplied.`,Y,!0,V,K],null),null),st($w,t4,null,null,new P(null,3,[q,$w,W,U(new v(null,2,5,y,[Cn,cun],null)),N,`params => positional-params* , or positional-params* & next-param positional-param => binding-form next-param => binding-form name => symbol - Defines a function`],null)),new Q(Wn,op,new P(null,5,[q,op,W,U(new v(null,1,5,y,[vm],null)),N,"Returns the metadata of obj, returns nil if there is no metadata.",Y,!0,V,K],null),null),l1(HG,function(t,n,e,l){return t=fr(e),new l3(l,t)},K),st(e9,n4,K,!0,new P(null,3,[q,e9,W,U(new v(null,4,5,y,[iun,dG,Cn,Qy],null)),N,`(defrecord name [fields*] options* specs*) + Defines a function`],null)),new Q(Wn,op,new P(null,5,[q,op,W,U(new v(null,1,5,y,[vm],null)),N,"Returns the metadata of obj, returns nil if there is no metadata.",Y,!0,V,K],null),null),l1(FG,function(t,n,e,l){return t=fr(e),new l3(l,t)},K),st(e9,n4,K,!0,new P(null,3,[q,e9,W,U(new v(null,4,5,y,[uun,wG,Cn,Qy],null)),N,`(defrecord name [fields*] options* specs*) Currently there are no options. @@ -665,22 +665,22 @@ Given (defrecord TypeName ...), two factory functions will be defined: ->TypeName, taking positional parameters for the fields, - and map->TypeName, taking a map of keywords to field values.`],null)),new Q(su,Gi,new P(null,5,[q,Gi,W,U(new v(null,1,5,y,[PL],null)),N,"Returns the value in the map entry.",Y,!0,V,K],null),null),new Q(m4,Lm,new P(null,5,[q,Lm,W,null,N,null,Y,!0,V,K],null),!0),new Q(Ae,dR,new P(null,6,[q,dR,Fn,Ae,W,U(new v(null,1,5,y,[bln],null)),N,"Returns a javascript array, cloned from the passed in array",Y,!0,V,K],null),null),new Q(Kl,m8,new P(null,5,[q,m8,W,U(new v(null,3,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),mh],null)),N,`Associates a value in a nested associative structure, where ks is a + and map->TypeName, taking a map of keywords to field values.`],null)),new Q(su,Gi,new P(null,5,[q,Gi,W,U(new v(null,1,5,y,[RL],null)),N,"Returns the value in the map entry.",Y,!0,V,K],null),null),new Q(m4,Lm,new P(null,5,[q,Lm,W,null,N,null,Y,!0,V,K],null),!0),new Q(Ae,dR,new P(null,6,[q,dR,Fn,Ae,W,U(new v(null,1,5,y,[Zln],null)),N,"Returns a javascript array, cloned from the passed in array",Y,!0,V,K],null),null),new Q(Kl,m8,new P(null,5,[q,m8,W,U(new v(null,3,5,y,[Tr,new v(null,3,5,y,[Ze,Cn,yi],null),mh],null)),N,`Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and returns a new nested structure. - If any levels do not exist, hash-maps will be created.`,Y,!0,V,K],null),null),new Q(sN,jS,new P(null,6,[q,jS,Fn,sN,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if num is zero, else false",Y,!0,V,K],null),null),new Q(function(t){return He(t)},yR,new P(null,5,[q,yR,W,U(new v(null,1,5,y,[qn],null)),N,"Returns a new, transient version of the collection, in constant time.",Y,!0,V,K],null),null),st(D8,$4,null,null,new P(null,3,[q,D8,W,U(new v(null,3,5,y,[lin,Cn,Ql],null)),N,`fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) + If any levels do not exist, hash-maps will be created.`,Y,!0,V,K],null),null),new Q(iN,jS,new P(null,6,[q,jS,Fn,iN,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if num is zero, else false",Y,!0,V,K],null),null),new Q(function(t){return He(t)},yR,new P(null,5,[q,yR,W,U(new v(null,1,5,y,[qn],null)),N,"Returns a new, transient version of the collection, in constant time.",Y,!0,V,K],null),null),st(D8,$4,null,null,new P(null,3,[q,D8,W,U(new v(null,3,5,y,[ein,Cn,Ql],null)),N,`fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) Takes a vector of function specs and a body, and generates a set of bindings of functions to their names. All of the names are available in all of the definitions of the functions, as well as the body.`],null)),new Q(function(t){return Y2(t)},SA,new P(null,5,[q,SA,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if a value has been produced for a delay or lazy sequence.",Y,!0,V,K],null),null),new Q(bl,$O,new P(null,5,[q,$O,W,U(new v(null,1,5,y,[wr],null),new v(null,2,5,y,[$l,wr],null),new v(null,3,5,y,[$l,gi,wr],null),new v(null,4,5,y,[$l,gi,la,wr],null),new v(null,6,5,y,[$l,gi,la,nf,Cn,Ee],null)),N,`Creates a new list containing the items prepended to the rest, the - last of which will be treated as a sequence.`,Y,!0,V,K],null),null),new Q(a8,o9,new P(null,5,[q,o9,W,U(new v(null,1,5,y,[hv],null)),N,"Returns a map of the intern mappings for the namespace.",Y,!0,V,K],null),!0),new Q(LU,oO,new P(null,5,[q,oO,W,U(new v(null,1,5,y,[Bn],null)),N,`Returns a memoized version of a referentially transparent function. The + last of which will be treated as a sequence.`,Y,!0,V,K],null),null),new Q(a8,o9,new P(null,5,[q,o9,W,U(new v(null,1,5,y,[hv],null)),N,"Returns a map of the intern mappings for the namespace.",Y,!0,V,K],null),!0),new Q(qU,oO,new P(null,5,[q,oO,W,U(new v(null,1,5,y,[Bn],null)),N,`Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache of the mapping from arguments to results and, when calls with the same arguments are repeated often, has - higher performance at the expense of higher memory use.`,Y,!0,V,K],null),null),new Q(w3,pC,new P(null,5,[q,pC,W,U(new v(null,3,5,y,[dv,Fs,Ui],null),new v(null,5,5,y,[dv,yL,eq,aq,rq],null)),N,`sc must be a sorted collection, test(s) one of <, <=, > or + higher performance at the expense of higher memory use.`,Y,!0,V,K],null),null),new Q(w3,pC,new P(null,5,[q,pC,W,U(new v(null,3,5,y,[dv,Fs,Ui],null),new v(null,5,5,y,[dv,vL,tq,oq,lq],null)),N,`sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for - which (test (.. sc comparator (compare ek key)) 0) is true`,Y,!0,V,K],null),null),new Q(dN,iS,new P(null,5,[q,iS,W,U(new v(null,1,5,y,[gn],null)),N,"returns true if x is a Delay created with delay",Y,!0,V,K],null),null),new Q(Uf,EO,new P(null,5,[q,EO,W,U(new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,Eun],null)),N,`Takes a reducing function f of 2 args and returns a fn suitable for + which (test (.. sc comparator (compare ek key)) 0) is true`,Y,!0,V,K],null),null),new Q(wN,iS,new P(null,5,[q,iS,W,U(new v(null,1,5,y,[gn],null)),N,"returns true if x is a Delay created with delay",Y,!0,V,K],null),null),new Q(Uf,EO,new P(null,5,[q,EO,W,U(new v(null,1,5,y,[Bn],null),new v(null,2,5,y,[Bn,Aun],null)),N,`Takes a reducing function f of 2 args and returns a fn suitable for transduce by adding an arity-1 signature that calls cf (default - identity) on the result argument.`,Y,!0,V,K],null),null),new Q(wc,ER,new P(null,6,[q,ER,Fn,wc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`If no denominators are supplied, returns 1/numerator, - else returns numerator divided by all of the denominators.`,Y,!0,V,K],null),null),new Q(function(t){t=di.h?di.h(t):di.call(null,t);const n=Math.random;for(let e=t.length-1;0) through each form for which the corresponding test expression is true. Note that, unlike cond branching, cond-> threading does - not short circuit after the first true test expression.`],null)),new Q(sU,PC,new P(null,5,[q,PC,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies int? and is a natural integer value.",Y,!0,V,K],null),null),new Q(UU,rE,new P(null,5,[q,rE,W,U(new v(null,1,5,y,[Ir],null)),N,null,Y,!0,V,K],null),null),new Q(zU,IS,new P(null,5,[q,IS,W,U(new v(null,2,5,y,[rf,XA],null)),N,`Given a multimethod and a dispatch value, returns the dispatch fn - that would apply to that value, or nil if none apply and no default`,Y,!0,V,K],null),null),zR,new Q(M,B9,new P(null,5,[q,B9,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,3,5,y,[gn,Cn,aun],null)),N,`With no args, returns the empty string. With one arg x, returns + not short circuit after the first true test expression.`],null)),new Q(iU,PC,new P(null,5,[q,PC,W,U(new v(null,1,5,y,[gn],null)),N,"Return true if x satisfies int? and is a natural integer value.",Y,!0,V,K],null),null),new Q(zU,rE,new P(null,5,[q,rE,W,U(new v(null,1,5,y,[Ir],null)),N,null,Y,!0,V,K],null),null),new Q(VU,IS,new P(null,5,[q,IS,W,U(new v(null,2,5,y,[rf,XA],null)),N,`Given a multimethod and a dispatch value, returns the dispatch fn + that would apply to that value, or nil if none apply and no default`,Y,!0,V,K],null),null),zR,new Q(M,B9,new P(null,5,[q,B9,W,U(Yn,new v(null,1,5,y,[gn],null),new v(null,3,5,y,[gn,Cn,oun],null)),N,`With no args, returns the empty string. With one arg x, returns x.toString(). (str nil) returns the empty string. With more than - one arg, returns the concatenation of the str values of the args.`,Y,!0,V,K],null),null),new Q(Wp,C7,new P(null,5,[q,C7,W,U(new v(null,1,5,y,[qn],null)),N,"Returns an empty collection of the same category as coll, or nil",Y,!0,V,K],null),null),new Q(Y1,i7,new P(null,5,[q,i7,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if coll implements count in constant time",Y,!0,V,K],null),null),new Q(rh,cC,new P(null,5,[q,cC,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x satisfies ISet",Y,!0,V,K],null),null),new Q(u$,I9,new P(null,6,[q,I9,Fn,u$,W,U(new v(null,1,5,y,[ea],null)),N,"Returns the length of the array. Works on arrays of all types.",Y,!0,V,K],null),null),new Q(function(t,n){return ul(En.i(function(e,l){return x(t.h?t.h(l):t.call(null,l))?ar.g(e,l):e},He(Yn),n))},j8,new P(null,5,[q,j8,W,U(new v(null,2,5,y,[dr,qn],null)),N,`Returns a vector of the items in coll for which + one arg, returns the concatenation of the str values of the args.`,Y,!0,V,K],null),null),new Q(Wp,C7,new P(null,5,[q,C7,W,U(new v(null,1,5,y,[qn],null)),N,"Returns an empty collection of the same category as coll, or nil",Y,!0,V,K],null),null),new Q(Y1,i7,new P(null,5,[q,i7,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if coll implements count in constant time",Y,!0,V,K],null),null),new Q(rh,cC,new P(null,5,[q,cC,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x satisfies ISet",Y,!0,V,K],null),null),new Q(r$,I9,new P(null,6,[q,I9,Fn,r$,W,U(new v(null,1,5,y,[ea],null)),N,"Returns the length of the array. Works on arrays of all types.",Y,!0,V,K],null),null),new Q(function(t,n){return ul(En.i(function(e,l){return x(t.h?t.h(l):t.call(null,l))?ar.g(e,l):e},He(Yn),n))},j8,new P(null,5,[q,j8,W,U(new v(null,2,5,y,[dr,qn],null)),N,`Returns a vector of the items in coll for which (pred item) returns logical true. pred must be free of side-effects.`,Y,!0,V,K],null),null),new Q(yf,mC,new P(null,5,[q,mC,W,U(new v(null,2,5,y,[Bn,qn],null),new v(null,3,5,y,[Bn,i1,qn],null)),N,`Returns a lazy seq of the intermediate values of the reduction (as - per reduce) of coll by f, starting with init.`,Y,!0,V,K],null),null),new Q(B$,q7,new P(null,6,[q,q7,Fn,B$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(hc,Y7,new P(null,6,[q,Y7,Fn,hc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`Returns non-nil if nums are in monotonically increasing order, - otherwise false.`,Y,!0,V,K],null),null),new Q(zo,H8,new P(null,5,[q,H8,W,U(new v(null,1,5,y,[gn],null)),N,"Wraps x in a way such that a reduce will terminate with the value x",Y,!0,V,K],null),null),new Q(tp,WC,new P(null,5,[q,WC,W,U(new v(null,1,5,y,[dr],null),new v(null,2,5,y,[dr,Eln],null)),N,`Returns a transducer that ends transduction when pred returns true + per reduce) of coll by f, starting with init.`,Y,!0,V,K],null),null),new Q(K$,q7,new P(null,6,[q,q7,Fn,K$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(hc,Y7,new P(null,6,[q,Y7,Fn,hc,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,tt],null),new v(null,4,5,y,[gn,tt,Cn,Ee],null)),N,`Returns non-nil if nums are in monotonically increasing order, + otherwise false.`,Y,!0,V,K],null),null),new Q(zo,H8,new P(null,5,[q,H8,W,U(new v(null,1,5,y,[gn],null)),N,"Wraps x in a way such that a reduce will terminate with the value x",Y,!0,V,K],null),null),new Q(tp,WC,new P(null,5,[q,WC,W,U(new v(null,1,5,y,[dr],null),new v(null,2,5,y,[dr,Aln],null)),N,`Returns a transducer that ends transduction when pred returns true for an input. When retf is supplied it must be a fn of 2 arguments - it will be passed the (completed) result so far and the input that triggered the predicate, and its return value (if it does not throw @@ -792,11 +792,11 @@ is not supplied, the input that triggered the predicate will be returned. If the predicate never returns true the transduction is unaffected.`,Y,!0,V,K],null),null),new Q(qe,sR,new P(null,5,[q,sR,W,U(new v(null,1,5,y,[gn],null)),N,"Returns the namespace String of a symbol or keyword, or nil if not present.",Y,!0,V,K],null),null),new Q(Hl,JC,new P(null,5,[q,JC,W,U(new v(null,1,5,y,[Ir],null),new v(null,2,5,y,[xs,Ir],null)),N,`Returns a Keyword with the given namespace and name. Do not use : - in the keyword strings, it will be added automatically.`,Y,!0,V,K],null),null),new Q(function(t){var n=vnn();return function(){function e(r){var u=null;if(0 or + called, the returned function calls f with args + additional args.`,Y,!0,V,K],null),null),st(z9,B4,null,null,new P(null,3,[q,z9,W,null,N,null],null)),new Q(d3,wC,new P(null,5,[q,wC,W,U(new v(null,3,5,y,[dv,Fs,Ui],null),new v(null,5,5,y,[dv,vL,tq,oq,lq],null)),N,`sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a reverse seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true`,Y,!0,V,K],null),null),new Q(Gn,W9,new P(null,5,[q,W9,W,U(new v(null,2,5,y,[qn,mh],null)),N,`Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like @@ -833,20 +833,20 @@ it will not perform a linear search for a value. See also 'some'.`,Y,!0,V,K],null),null),st(Sy,d4,null,null,new P(null,3,[q,Sy,W,U(new v(null,3,5,y,[gn,Cn,ym],null)),N,`Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the - second item in second form, etc.`],null)),new Q(H$,A7,new P(null,6,[q,A7,Fn,H$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(function(){function t(){return ev(16).toString(16)}var n=(8|3&ev(16)).toString(16);return new t0([M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),"-",M.h(t()),M.h(t()),M.h(t()),M.h(t()),"-4",M.h(t()),M.h(t()),M.h(t()),"-",M.h(n),M.h(t()),M.h(t()),M.h(t()),"-",M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t())].join("").toLowerCase())},eC,new P(null,5,[q,eC,W,U(Yn),N,"Returns a pseudo-randomly generated UUID instance (i.e. type 4).",Y,!0,V,K],null),null),Ysn,st(f7,v4,null,null,new P(null,3,[q,f7,W,U(new v(null,4,5,y,[Oh,Ir,Cn,ym],null)),N,`Binds name to expr, evaluates the first form in the lexical context + second item in second form, etc.`],null)),new Q(F$,A7,new P(null,6,[q,A7,Fn,F$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(function(){function t(){return ev(16).toString(16)}var n=(8|3&ev(16)).toString(16);return new t0([M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),"-",M.h(t()),M.h(t()),M.h(t()),M.h(t()),"-4",M.h(t()),M.h(t()),M.h(t()),"-",M.h(n),M.h(t()),M.h(t()),M.h(t()),"-",M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t()),M.h(t())].join("").toLowerCase())},eC,new P(null,5,[q,eC,W,U(Yn),N,"Returns a pseudo-randomly generated UUID instance (i.e. type 4).",Y,!0,V,K],null),null),Usn,st(f7,v4,null,null,new P(null,3,[q,f7,W,U(new v(null,4,5,y,[Oh,Ir,Cn,ym],null)),N,`Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, repeating for each successive form, returning the result of the last form.`],null)),new Q(Bo,PA,new P(null,5,[q,PA,W,U(Yn,new v(null,2,5,y,[Cn,Af],null)),N,`Returns a new hash set with supplied keys. Any equal keys are handled as if by repeated uses of conj.`,Y,!0,V,K],null),null),new Q(Cr,TE,new P(null,5,[q,TE,W,U(mt(new v(null,1,5,y,[zt],null),new P(null,1,[Eh,new v(null,1,5,y,[U(oa,zt)],null)],null)),mt(new v(null,2,5,y,[zt,qn],null),new P(null,1,[Eh,new v(null,1,5,y,[U(oa,zt)],null)],null))),N,`Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n. Returns a stateful transducer when - no collection is provided.`,Y,!0,V,K],null),null),st(Ay,Yw,null,null,new P(null,3,[q,Ay,W,U(new v(null,2,5,y,[Yi,lm],null),new v(null,5,5,y,[Yi,lm,h6,Cn,Oq],null)),N,`bindings => binding-form test + no collection is provided.`,Y,!0,V,K],null),null),st(Ay,Yw,null,null,new P(null,3,[q,Ay,W,U(new v(null,2,5,y,[Yi,lm],null),new v(null,5,5,y,[Yi,lm,h6,Cn,Sq],null)),N,`bindings => binding-form test If test is true, evaluates then with binding-form bound to the value of - test, if not, yields else`],null)),new Q(function(t,n){var e=J(pJ);return e.g?e.g(t,n):e.call(null,t,n)},VC,new P(null,5,[q,VC,W,U(new v(null,1,5,y,[uL],null)),N,`If form represents a macro form, returns its expansion, - else returns form.`,Y,!0,V,K],null),!0),new Q($U,y9,new P(null,5,[q,y9,W,U(new v(null,2,5,y,[dr,qn],null)),N,"Returns a vector of [(take-while pred coll) (drop-while pred coll)]",Y,!0,V,K],null),null),new Q(G4,MC,new P(null,5,[q,MC,W,null,N,null,Y,!0,V,K],null),!0),new Q(function(t){var n=pnn();return function(){function e(a,o,h){return Sh(n),t.i?t.i(a,o,h):t.call(null,a,o,h)}function l(a,o){return Sh(n),t.g?t.g(a,o):t.call(null,a,o)}function r(a){return Sh(n),t.h?t.h(a):t.call(null,a)}function u(){return Sh(n),t.m?t.m():t.call(null)}var i=null,s=function(){function a(h,c,f,d){var C=null;if(3 binding-form test + (lazy-cat xs ys zs) === (concat (lazy-seq xs) (lazy-seq ys) (lazy-seq zs))`],null)),st(IA,Qw,null,null,new P(null,3,[q,IA,W,U(new v(null,2,5,y,[Yi,lm],null),new v(null,5,5,y,[Yi,lm,h6,Cn,Sq],null)),N,`bindings => binding-form test If test is not nil, evaluates then with binding-form bound to the value of test, if not, yields else`],null)),new Q(vt,lO,new P(null,5,[q,lO,W,U(new v(null,2,5,y,[Kt,Bg],null),new v(null,3,5,y,[Kt,Bg,Jd],null)),N,`Returns the substring of s beginning at start inclusive, and ending - at end (defaults to length of string), exclusive.`,Y,!0,V,K],null),null),AJ,new Q(function(t){var n=Array(an(t)),e=0;for(t=E(t);t!=null;)n[e]=di(j(t)),e+=1,t=A(t);return n},OE,new P(null,5,[q,OE,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a (potentially-ragged) 2-dimensional array + at end (defaults to length of string), exclusive.`,Y,!0,V,K],null),null),CJ,new Q(function(t){var n=Array(an(t)),e=0;for(t=E(t);t!=null;)n[e]=di(j(t)),e+=1,t=A(t);return n},OE,new P(null,5,[q,OE,W,U(new v(null,1,5,y,[qn],null)),N,`Returns a (potentially-ragged) 2-dimensional array containing the contents of coll.`,Y,!0,V,K],null),null),new Q(b4,OA,new P(null,5,[q,OA,W,U(new v(null,1,5,y,[Ir],null),new v(null,2,5,y,[xs,Ir],null)),N,`Returns a Symbol with the given namespace and name. Arity-1 works on strings, keywords, and vars.`,Y,!0,V,K],null),null),new Q(wf,JA,new P(null,5,[q,JA,W,U(new v(null,2,5,y,[zt,nf],null)),N,"Modulus of num and div. Truncates toward negative infinity.",Y,!0,V,K],null),null),st($m,uj,null,null,new P(null,4,[q,$m,W,U(new v(null,2,5,y,[Cn,Ql],null)),N,`Takes a body of expressions that returns an ISeq or nil, and yields a ISeqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent - seq calls.`,zm,$m],null)),new Q(function(t){return typeof t=="number"},oa,new P(null,5,[q,oa,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is a JavaScript number.",Y,!0,V,K],null),null),new Q(ue,g7,new P(null,6,[q,g7,Fn,ue,W,U(new v(null,1,5,y,[rrn],null)),N,"Returns true if x is the result of a call to reduced",Y,!0,V,K],null),null),na(wQ,function(){return Li(ne.m(),null,new P(null,1,[zu,!0],null))}),new Q(Xz,i9,new P(null,5,[q,i9,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x's constructor is Object",Y,!0,V,K],null),null),new Q(In,zA,new P(null,5,[q,zA,W,U(Yn,new v(null,1,5,y,[qn],null),new v(null,2,5,y,[qn,gn],null),new v(null,4,5,y,[qn,gn,Cn,nL],null)),N,`conj[oin]. Returns a new collection with the xs + seq calls.`,zm,$m],null)),new Q(function(t){return typeof t=="number"},oa,new P(null,5,[q,oa,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x is a JavaScript number.",Y,!0,V,K],null),null),new Q(ue,g7,new P(null,6,[q,g7,Fn,ue,W,U(new v(null,1,5,y,[lrn],null)),N,"Returns true if x is the result of a call to reduced",Y,!0,V,K],null),null),na(mQ,function(){return Li(ne.m(),null,new P(null,1,[zu,!0],null))}),new Q(Bz,i9,new P(null,5,[q,i9,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true if x's constructor is Object",Y,!0,V,K],null),null),new Q(In,zA,new P(null,5,[q,zA,W,U(Yn,new v(null,1,5,y,[qn],null),new v(null,2,5,y,[qn,gn],null),new v(null,4,5,y,[qn,gn,Cn,bq],null)),N,`conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). (conj coll) returns coll. (conj) returns []. The 'addition' may happen at different 'places' depending - on the concrete type.`,Y,!0,V,K],null),null),new Q(X$,eS,new P(null,6,[q,eS,Fn,X$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q($$,zO,new P(null,6,[q,zO,Fn,$$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(Mt,uE,new P(null,5,[q,uE,W,null,N,null,Y,!0,V,K],null),null),new Q(function(t,n){return(t&1< key val - Returns a new sorted map with supplied mappings, using the supplied comparator.`,Y,!0,V,K],null),null),new Q(function(t){return typeof t=="number"},H7,new P(null,5,[q,H7,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true for JavaScript numbers, false otherwise.",Y,!0,V,K],null),null),new Q(function(t){return z1(t)},EA,new P(null,5,[q,EA,W,U(new v(null,1,5,y,[Lrn],null)),N,`Returns, in constant time, a seq of the items in rev (which - can be a vector or sorted-map), in reverse order. If rev is empty returns nil`,Y,!0,V,K],null),null),new Q(K$,sA,new P(null,6,[q,sA,Fn,K$,W,U(new v(null,1,5,y,[gn],null)),N,"Coerce to long by stripping decimal places. Identical to `int'.",Y,!0,V,K],null),null),st(Iy,X4,null,null,new P(null,3,[q,Iy,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`binding => var-symbol init-expr + on the concrete type.`,Y,!0,V,K],null),null),new Q(B$,eS,new P(null,6,[q,eS,Fn,B$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(M$,zO,new P(null,6,[q,zO,Fn,M$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(Mt,uE,new P(null,5,[q,uE,W,null,N,null,Y,!0,V,K],null),null),new Q(function(t,n){return(t&1< key val + Returns a new sorted map with supplied mappings, using the supplied comparator.`,Y,!0,V,K],null),null),new Q(function(t){return typeof t=="number"},H7,new P(null,5,[q,H7,W,U(new v(null,1,5,y,[gn],null)),N,"Returns true for JavaScript numbers, false otherwise.",Y,!0,V,K],null),null),new Q(function(t){return z1(t)},EA,new P(null,5,[q,EA,W,U(new v(null,1,5,y,[qrn],null)),N,`Returns, in constant time, a seq of the items in rev (which + can be a vector or sorted-map), in reverse order. If rev is empty returns nil`,Y,!0,V,K],null),null),new Q(J$,sA,new P(null,6,[q,sA,Fn,J$,W,U(new v(null,1,5,y,[gn],null)),N,"Coerce to long by stripping decimal places. Identical to `int'.",Y,!0,V,K],null),null),st(Iy,X4,null,null,new P(null,3,[q,Iy,W,U(new v(null,3,5,y,[Yi,Cn,Ql],null)),N,`binding => var-symbol init-expr Creates new bindings for the (already-existing) vars, with the supplied initial values, executes the exprs in an implicit do, then re-establishes the bindings that existed before. The new bindings are made in parallel (unlike let); all init-exprs are evaluated - before the vars are bound to their new values.`],null)),new Q(_$,bO,new P(null,6,[q,bO,Fn,_$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(q$,OC,new P(null,6,[q,OC,Fn,q$,W,U(new v(null,1,5,y,[gn],null)),N,"Returns a number one less than x, an int.",Y,!0,V,K],null),null),new Q(yU,TR,new P(null,5,[q,TR,W,U(new v(null,3,5,y,[kln,Ren,Jrn],null)),N,`Returns a lazy sequence of the nodes in a tree, via a depth-first walk. + before the vars are bound to their new values.`],null)),new Q(I$,bO,new P(null,6,[q,bO,Fn,I$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(N$,OC,new P(null,6,[q,OC,Fn,N$,W,U(new v(null,1,5,y,[gn],null)),N,"Returns a number one less than x, an int.",Y,!0,V,K],null),null),new Q(vU,TR,new P(null,5,[q,TR,W,U(new v(null,3,5,y,[xln,Een,Grn],null)),N,`Returns a lazy sequence of the nodes in a tree, via a depth-first walk. branch? must be a fn of one arg that returns true if passed a node that can have children (but may not). children must be a fn of one arg that returns a sequence of the children. Will only be called on nodes for which branch? returns true. Root is the root node of the - tree.`,Y,!0,V,K],null),null),new Q(e1,$7,new P(null,5,[q,$7,W,null,N,null,Y,!0,V,K],null),null),new Q(iU,dS,new P(null,5,[q,dS,W,U(new v(null,1,5,y,[Kt],null)),N,"Return true if the seq function is supported for s",Y,!0,V,K],null),null),new Q(u4,k7,new P(null,5,[q,k7,W,U(new v(null,2,5,y,[$l,Bn],null),new v(null,3,5,y,[$l,Bn,gn],null),new v(null,4,5,y,[$l,Bn,gn,tt],null),new v(null,6,5,y,[$l,Bn,gn,tt,Cn,Ee],null)),N,`Atomically swaps the value of atom to be: + tree.`,Y,!0,V,K],null),null),new Q(e1,$7,new P(null,5,[q,$7,W,null,N,null,Y,!0,V,K],null),null),new Q(uU,dS,new P(null,5,[q,dS,W,U(new v(null,1,5,y,[Kt],null)),N,"Return true if the seq function is supported for s",Y,!0,V,K],null),null),new Q(u4,k7,new P(null,5,[q,k7,W,U(new v(null,2,5,y,[$l,Bn],null),new v(null,3,5,y,[$l,Bn,gn],null),new v(null,4,5,y,[$l,Bn,gn,tt],null),new v(null,6,5,y,[$l,Bn,gn,tt,Cn,Ee],null)),N,`Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple times, and thus should be free of side effects. Returns - the value that was swapped in.`,Y,!0,V,K],null),null),st(yC,q4,null,null,new P(null,3,[q,yC,W,U(new v(null,4,5,y,[yG,Bn,Cn,wr],null)),N,`Non-atomically swaps the value of the volatile as if: + the value that was swapped in.`,Y,!0,V,K],null),null),st(yC,q4,null,null,new P(null,3,[q,yC,W,U(new v(null,4,5,y,[vG,Bn,Cn,wr],null)),N,`Non-atomically swaps the value of the volatile as if: (apply f current-value-of-vol args). Returns the value that was swapped in.`],null)),new Q(Zi,BC,new P(null,5,[q,BC,W,U(new v(null,2,5,y,[Cn,Bd],null)),N,`keyval => key val - Returns a new array map with supplied mappings.`,Y,!0,V,K],null),null),na(VQ,Sh),new Q(ep,fA,new P(null,5,[q,fA,W,U(Yn,new v(null,1,5,y,[qn],null)),N,`Returns a lazy sequence removing consecutive duplicates in coll. - Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),new Q(P$,f9,new P(null,6,[q,f9,Fn,P$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(_e,nC,new P(null,5,[q,nC,W,U(new v(null,3,5,y,[Tr,Ze,Bn],null),new v(null,4,5,y,[Tr,Ze,Bn,gn],null),new v(null,5,5,y,[Tr,Ze,Bn,gn,tt],null),new v(null,6,5,y,[Tr,Ze,Bn,gn,tt,mv],null),new v(null,8,5,y,[Tr,Ze,Bn,gn,tt,mv,Cn,Ee],null)),N,`'Updates' a value in an associative structure, where k is a + Returns a new array map with supplied mappings.`,Y,!0,V,K],null),null),na(WQ,Sh),new Q(ep,fA,new P(null,5,[q,fA,W,U(Yn,new v(null,1,5,y,[qn],null)),N,`Returns a lazy sequence removing consecutive duplicates in coll. + Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),new Q(R$,f9,new P(null,6,[q,f9,Fn,R$,W,U(new v(null,1,5,y,[gn],null)),N,null,Y,!0,V,K],null),null),new Q(_e,nC,new P(null,5,[q,nC,W,U(new v(null,3,5,y,[Tr,Ze,Bn],null),new v(null,4,5,y,[Tr,Ze,Bn,gn],null),new v(null,5,5,y,[Tr,Ze,Bn,gn,tt],null),new v(null,6,5,y,[Tr,Ze,Bn,gn,tt,mv],null),new v(null,8,5,y,[Tr,Ze,Bn,gn,tt,mv,Cn,Ee],null)),N,`'Updates' a value in an associative structure, where k is a key and f is a function that will take the old value and any supplied args and return the new value, and returns a new structure. If the key does not exist, nil is passed as the old value.`,Y,!0,V,K],null),null),new Q(rr,iE,new P(null,5,[q,iE,W,U(new v(null,1,5,y,[dr],null),new v(null,2,5,y,[dr,qn],null)),N,`Returns a lazy sequence of the items in coll for which (pred item) returns logical true. pred must be free of side-effects. - Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),new Q(L$,a9,new P(null,6,[q,a9,Fn,L$,W,U(new v(null,1,5,y,[gn],null)),N,"Returns a number one less than x, an int.",Y,!0,V,K],null),null),PJ,new Q(function(t,n){if($v(n)){var e=_a.g(t,n);return x(e)?e:(e=$n.h(qe(n)),Rp.j(t,z([e])),_a.g(t,n))}throw Error(["Not a qualified symbol: ",M.h(n)].join(""))},kC,new P(null,5,[q,kC,W,null,N,null,Y,!0,V,K],null),!0),new Q(Ji,BO,new P(null,6,[q,BO,Fn,Ji,W,U(new v(null,2,5,y,[zt,nf],null)),N,"remainder of dividing numerator by denominator.",Y,!0,V,K],null),null),new Q(sw,GE,new P(null,5,[q,GE,W,U(new v(null,1,5,y,[qn],null)),N,`For a list or queue, returns a new list/queue without the first + Returns a transducer when no collection is provided.`,Y,!0,V,K],null),null),new Q(q$,a9,new P(null,6,[q,a9,Fn,q$,W,U(new v(null,1,5,y,[gn],null)),N,"Returns a number one less than x, an int.",Y,!0,V,K],null),null),RJ,new Q(function(t,n){if($v(n)){var e=_a.g(t,n);return x(e)?e:(e=$n.h(qe(n)),Rp.j(t,z([e])),_a.g(t,n))}throw Error(["Not a qualified symbol: ",M.h(n)].join(""))},kC,new P(null,5,[q,kC,W,null,N,null,Y,!0,V,K],null),!0),new Q(Ji,BO,new P(null,6,[q,BO,Fn,Ji,W,U(new v(null,2,5,y,[zt,nf],null)),N,"remainder of dividing numerator by denominator.",Y,!0,V,K],null),null),new Q(sw,GE,new P(null,5,[q,GE,W,U(new v(null,1,5,y,[qn],null)),N,`For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the last item. - Note - not the same as next/butlast.`,Y,!0,V,K],null),null),new Q(va,zC,new P(null,5,[q,zC,W,U(new v(null,3,5,y,[Bn,Cn,qQ],null)),N,`Returns a map that consists of the rest of the maps conj-ed onto + Note - not the same as next/butlast.`,Y,!0,V,K],null),null),new Q(va,zC,new P(null,5,[q,zC,W,U(new v(null,3,5,y,[Bn,Cn,NQ],null)),N,`Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping(s) from the latter (left-to-right) will be combined with the mapping in - the result by calling (f val-in-result val-in-latter).`,Y,!0,V,K],null),null),new Q(J$,rS,new P(null,6,[q,rS,Fn,J$,W,U(new v(null,1,5,y,[gn],null)),N,"Coerce to long by stripping decimal places. Identical to `int'.",Y,!0,V,K],null),null),st(nE,D4,null,null,new P(null,3,[q,nE,W,U(new v(null,1,5,y,[gn],null),new v(null,2,5,y,[gn,ken],null)),N,`Evaluates expr and throws an exception if it does not evaluate to - logical true.`],null)),new Q(function(t){for(var n=Array(arguments.length),e=0;;)if(e "lmostAay igPay atinLay"`,Y,!0,V,Yl],null),null),new Q(Sd,Hg,new P(null,5,[q,Hg,W,U(new v(null,1,5,y,[qn],null),new v(null,2,5,y,[arn,qn],null)),N,`Returns a string of all elements in coll, as returned by (seq coll), - separated by an optional separator.`,Y,!0,V,Yl],null),null),new Q(function(t){return len(t)},Z6,new P(null,5,[q,Z6,W,U(new v(null,1,5,y,[Kt],null)),N,"Removes whitespace from both ends of string.",Y,!0,V,Yl],null),null),new Q(function(t,n){return t.lastIndexOf(n,0)==0},F6,new P(null,5,[q,F6,W,U(new v(null,2,5,y,[Kt,x6],null)),N,"True if s starts with substr.",Y,!0,V,Yl],null),null),new Q(function(t){return t.replace(/^[\s\xa0]+/,"")},g6,new P(null,5,[q,g6,W,U(new v(null,1,5,y,[Kt],null)),N,"Removes whitespace from the left side of string.",Y,!0,V,Yl],null),null),new Q(function(t,n){for(var e=new rl,l=t.length,r=0;;){if(l===r)return e.toString();var u=t.charAt(r),i=cn.g(n,u);i!=null?e.append(M.h(i)):e.append(u),r+=1}},p6,new P(null,5,[q,p6,W,U(new v(null,2,5,y,[Kt,sln],null)),N,`Return a new string, using cmap to escape each character ch + -> "lmostAay igPay atinLay"`,Y,!0,V,Yl],null),null),new Q(Sd,Hg,new P(null,5,[q,Hg,W,U(new v(null,1,5,y,[qn],null),new v(null,2,5,y,[orn,qn],null)),N,`Returns a string of all elements in coll, as returned by (seq coll), + separated by an optional separator.`,Y,!0,V,Yl],null),null),new Q(function(t){return een(t)},Z6,new P(null,5,[q,Z6,W,U(new v(null,1,5,y,[Kt],null)),N,"Removes whitespace from both ends of string.",Y,!0,V,Yl],null),null),new Q(function(t,n){return t.lastIndexOf(n,0)==0},F6,new P(null,5,[q,F6,W,U(new v(null,2,5,y,[Kt,x6],null)),N,"True if s starts with substr.",Y,!0,V,Yl],null),null),new Q(function(t){return t.replace(/^[\s\xa0]+/,"")},g6,new P(null,5,[q,g6,W,U(new v(null,1,5,y,[Kt],null)),N,"Removes whitespace from the left side of string.",Y,!0,V,Yl],null),null),new Q(function(t,n){for(var e=new rl,l=t.length,r=0;;){if(l===r)return e.toString();var u=t.charAt(r),i=cn.g(n,u);i!=null?e.append(M.h(i)):e.append(u),r+=1}},p6,new P(null,5,[q,p6,W,U(new v(null,2,5,y,[Kt,iln],null)),N,`Return a new string, using cmap to escape each character ch from s as follows: If (cmap ch) is nil, append ch to the new string. - If (cmap ch) is non-nil, append (str (cmap ch)) instead.`,Y,!0,V,Yl],null),null),Yl,new Q(GU,nx,new P(null,5,[q,nx,W,U(new v(null,2,5,y,[Kt,x6],null)),N,"True if s includes substr.",Y,!0,V,Yl],null),null),new Q(function(t){return xP(t)},m6,new P(null,5,[q,m6,W,U(new v(null,1,5,y,[Kt],null)),N,`Converts first character of the string to upper-case, all other - characters to lower-case.`,Y,!0,V,Yl],null),null),new Q(QU,bj,new P(null,5,[q,bj,W,U(new v(null,3,5,y,[Kt,AL,cq],null)),N,`Replaces the first instance of match with replacement in s. + If (cmap ch) is non-nil, append (str (cmap ch)) instead.`,Y,!0,V,Yl],null),null),Yl,new Q(QU,nx,new P(null,5,[q,nx,W,U(new v(null,2,5,y,[Kt,x6],null)),N,"True if s includes substr.",Y,!0,V,Yl],null),null),new Q(function(t){return xP(t)},m6,new P(null,5,[q,m6,W,U(new v(null,1,5,y,[Kt],null)),N,`Converts first character of the string to upper-case, all other + characters to lower-case.`,Y,!0,V,Yl],null),null),new Q(YU,bj,new P(null,5,[q,bj,W,U(new v(null,3,5,y,[Kt,CL,hq],null)),N,`Replaces the first instance of match with replacement in s. match/replacement can be: @@ -1015,10 +1015,10 @@ Example: (clojure.string/replace-first "swap first two words" #"(\\w+)(\\s+)(\\w+)" "$3$2$1") - -> "first swap two words"`,Y,!0,V,Yl],null),null)]),Vhn,ron,Lhn,Wr([V6,t6,D6,L6,Hg,l6,X6,J6,sx,fu,Q6,tx,s6],[new Q(function(t,n){return fr(Mn.g(function(e){return zc(e,n)},t))},V6,new P(null,5,[q,V6,W,U(new v(null,2,5,y,[Kd,yi],null)),N,"Returns a rel of the elements of xrel with only the keys in ks",Y,!0,V,fi],null),null),new Q(CY,t6,new P(null,5,[q,t6,W,U(new v(null,1,5,y,[Tr],null)),N,"Returns the map with the vals mapped to the keys.",Y,!0,V,fi],null),null),new Q(function(t,n){return En.i(function(e,l){return x(t.h?t.h(l):t.call(null,l))?e:Du.g(e,l)},n,n)},D6,new P(null,5,[q,D6,W,U(new v(null,2,5,y,[dr,Ben],null)),N,"Returns a set of the elements for which pred is true",Y,!0,V,fi],null),null),new Q(function(t,n){return an(t)>=an(n)&&Ol(function(e){return Gn(t,e)},n)},L6,new P(null,5,[q,L6,W,U(new v(null,2,5,y,[Uq,Yq],null)),N,"Is set1 a superset of set2?",Y,!0,V,fi],null),null),new Q(r4,Hg,new P(null,5,[q,Hg,W,U(new v(null,2,5,y,[Kd,Iq],null),new v(null,3,5,y,[Kd,Iq,qrn],null)),N,`When passed 2 rels, returns the rel corresponding to the natural + -> "first swap two words"`,Y,!0,V,Yl],null),null)]),Whn,lon,qhn,Wr([V6,t6,D6,L6,Hg,l6,X6,J6,sx,fu,Q6,tx,s6],[new Q(function(t,n){return fr(Mn.g(function(e){return zc(e,n)},t))},V6,new P(null,5,[q,V6,W,U(new v(null,2,5,y,[Kd,yi],null)),N,"Returns a rel of the elements of xrel with only the keys in ks",Y,!0,V,fi],null),null),new Q(OY,t6,new P(null,5,[q,t6,W,U(new v(null,1,5,y,[Tr],null)),N,"Returns the map with the vals mapped to the keys.",Y,!0,V,fi],null),null),new Q(function(t,n){return En.i(function(e,l){return x(t.h?t.h(l):t.call(null,l))?e:Du.g(e,l)},n,n)},D6,new P(null,5,[q,D6,W,U(new v(null,2,5,y,[dr,Ken],null)),N,"Returns a set of the elements for which pred is true",Y,!0,V,fi],null),null),new Q(function(t,n){return an(t)>=an(n)&&Ol(function(e){return Gn(t,e)},n)},L6,new P(null,5,[q,L6,W,U(new v(null,2,5,y,[zq,Uq],null)),N,"Is set1 a superset of set2?",Y,!0,V,fi],null),null),new Q(r4,Hg,new P(null,5,[q,Hg,W,U(new v(null,2,5,y,[Kd,Pq],null),new v(null,3,5,y,[Kd,Pq,Nrn],null)),N,`When passed 2 rels, returns the rel corresponding to the natural join. When passed an additional keymap, joins on the corresponding - keys.`,Y,!0,V,fi],null),null),new Q(Og,l6,new P(null,5,[q,l6,W,U(Yn,new v(null,1,5,y,[Zo],null),new v(null,2,5,y,[Zo,tm],null),new v(null,4,5,y,[Zo,tm,Cn,R6],null)),N,"Return a set that is the union of the input sets",Y,!0,V,fi],null),null),new Q(function(t,n){return fr(Mn.g(function(e){return o8(e,n)},t))},X6,new P(null,5,[q,X6,W,U(new v(null,2,5,y,[Kd,oq],null)),N,"Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap",Y,!0,V,fi],null),null),new Q(function(t,n){return an(t)<=an(n)&&Ol(function(e){return Gn(n,e)},t)},J6,new P(null,5,[q,J6,W,U(new v(null,2,5,y,[Uq,Yq],null)),N,"Is set1 a subset of set2?",Y,!0,V,fi],null),null),new Q(ag,sx,new P(null,5,[q,sx,W,U(new v(null,1,5,y,[Zo],null),new v(null,2,5,y,[Zo,tm],null),new v(null,4,5,y,[Zo,tm,Cn,R6],null)),N,"Return a set that is the first set without elements of the remaining sets",Y,!0,V,fi],null),null),fi,new Q(Ec,Q6,new P(null,5,[q,Q6,W,U(new v(null,1,5,y,[Zo],null),new v(null,2,5,y,[Zo,tm],null),new v(null,4,5,y,[Zo,tm,Cn,R6],null)),N,"Return a set that is the intersection of the input sets",Y,!0,V,fi],null),null),new Q(iI,tx,new P(null,5,[q,tx,W,U(new v(null,2,5,y,[Kd,yi],null)),N,`Returns a map of the distinct values of ks in the xrel mapped to a - set of the maps in xrel with the corresponding values of ks.`,Y,!0,V,fi],null),null),new Q(o8,s6,new P(null,5,[q,s6,W,U(new v(null,2,5,y,[rg,oq],null)),N,"Returns the map with the keys in kmap renamed to the vals in kmap",Y,!0,V,fi],null),null)]),lon,Uhn,eon,new P(null,3,[fu,jx,Nm,new Q(C0,Nm,new P(null,5,[q,Nm,W,U(new v(null,1,5,y,[Xv],null),new v(null,2,5,y,[new P(null,2,[_I,new v(null,1,5,y,[bq],null),ho,jf],null),Xv],null),new v(null,4,5,y,[Xv,zin,bq,jf],null)),N,`Reads the first object from an cljs.tools.reader.reader-types/IPushbackReader. + keys.`,Y,!0,V,fi],null),null),new Q(Og,l6,new P(null,5,[q,l6,W,U(Yn,new v(null,1,5,y,[Zo],null),new v(null,2,5,y,[Zo,tm],null),new v(null,4,5,y,[Zo,tm,Cn,R6],null)),N,"Return a set that is the union of the input sets",Y,!0,V,fi],null),null),new Q(function(t,n){return fr(Mn.g(function(e){return o8(e,n)},t))},X6,new P(null,5,[q,X6,W,U(new v(null,2,5,y,[Kd,sq],null)),N,"Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap",Y,!0,V,fi],null),null),new Q(function(t,n){return an(t)<=an(n)&&Ol(function(e){return Gn(n,e)},t)},J6,new P(null,5,[q,J6,W,U(new v(null,2,5,y,[zq,Uq],null)),N,"Is set1 a subset of set2?",Y,!0,V,fi],null),null),new Q(ag,sx,new P(null,5,[q,sx,W,U(new v(null,1,5,y,[Zo],null),new v(null,2,5,y,[Zo,tm],null),new v(null,4,5,y,[Zo,tm,Cn,R6],null)),N,"Return a set that is the first set without elements of the remaining sets",Y,!0,V,fi],null),null),fi,new Q(Ec,Q6,new P(null,5,[q,Q6,W,U(new v(null,1,5,y,[Zo],null),new v(null,2,5,y,[Zo,tm],null),new v(null,4,5,y,[Zo,tm,Cn,R6],null)),N,"Return a set that is the intersection of the input sets",Y,!0,V,fi],null),null),new Q(iI,tx,new P(null,5,[q,tx,W,U(new v(null,2,5,y,[Kd,yi],null)),N,`Returns a map of the distinct values of ks in the xrel mapped to a + set of the maps in xrel with the corresponding values of ks.`,Y,!0,V,fi],null),null),new Q(o8,s6,new P(null,5,[q,s6,W,U(new v(null,2,5,y,[rg,sq],null)),N,"Returns the map with the keys in kmap renamed to the vals in kmap",Y,!0,V,fi],null),null)]),eon,zhn,ton,new P(null,3,[fu,jx,Nm,new Q(C0,Nm,new P(null,5,[q,Nm,W,U(new v(null,1,5,y,[Xv],null),new v(null,2,5,y,[new P(null,2,[_I,new v(null,1,5,y,[Zq],null),ho,jf],null),Xv],null),new v(null,4,5,y,[Xv,Vin,Zq,jf],null)),N,`Reads the first object from an cljs.tools.reader.reader-types/IPushbackReader. Returns the object read. If EOF, throws if eof-error? is true otherwise returns eof. If no reader is provided, *in* will be used. @@ -1039,13 +1039,12 @@ Reads data in the edn format (subset of Clojure data): http://edn-format.org - opts is a map as per cljs.tools.reader.edn/read`,Y,!0,V,jx],null),null)],null),Whn]),Yhn=xe(TJ),Qhn=new P(null,4,[Oen,new P(null,2,[ss,Error,UO,function(){var t=null;return t=function(n,e,l){switch(arguments.length){case 1:return Error(n);case 2:return Error(n,e);case 3:return Error(n,e,l)}throw Error("Invalid arity: "+arguments.length)},t.h=function(n){return Error(n)},t.g=function(n,e){return Error(n,e)},t.i=function(n,e,l){return Error(n,e,l)},t}()],null),XQ,vI,jG,new P(null,2,[ss,rl,UO,function(t){return new rl(t)}],null),mun,od],null),Ghn=new P(null,1,[dd,Bl],null),DJ=function t(n,e){if(he(e))if(X.g(je,j(e))){var l=Wn(e);l=x(x(l)?ae.h(l):l)?new P(null,2,[Xe,Xe.h(l),ae,ae.h(l)],null):null,x(l)&&(sg=l);try{var r=rn(e);for(e=null;;)if(E(r)){var u=rn(r),i=j(r),s=t.g?t.g(n,i):t.call(null,n,i);r=u,e=s}else return e}finally{x(l)&&(sg=null)}}else{if(r=ne.m(),u=Ye(Ll([r,new P(null,1,[0,new P(null,1,[ki,vn],null)],null)])),n=fn.j(n,Ru,new v(null,2,5,y,[r,0],null),z([ao,u])),e=xn.i(n,e,!0),r=an(qt.g(J(u),new v(null,3,5,y,[r,0,ki],null))),r=Pt.h(r),e instanceof FP)return e=e.bc(null),t.g?t.g(n,e):t.call(null,n,e);try{return w(e,n,r)}catch(a){if(a instanceof Error)return r=a,lt(n,0,r,e);throw a}}else{r=ne.m(),u=Ye(Ll([r,new P(null,1,[0,new P(null,1,[ki,vn],null)],null)])),n=fn.j(n,Ru,new v(null,2,5,y,[r,0],null),z([ao,u])),e=xn.g(n,e),r=an(qt.g(J(u),new v(null,3,5,y,[r,0,ki],null))),r=Pt.h(r);try{return w(e,n,r)}catch(a){if(a instanceof Error)return r=a,lt(n,0,r,e);throw a}}};Il(gJ,DJ);Il(vJ,DY);var Ce=function t(n){for(var e=[],l=arguments.length,r=0;rt?Dm(this,Hr,kr(this,Hr)+an(n)):(Dm(this,Hr,an(n)-t-1),Dm(this,ae,kr(this,ae)+an(rr.g(function(e){return X.g(e,` -`)},n)))),Rn(kr(this,Yt),n);if(x(X.g?X.g(Number,t):X.call(null,Number,t)))return mtn(this,n);throw Error(["No matching clause: ",M.h(t)].join(""))};p=ru.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"parent":return this.parent;case"section":return this.Bf;case"start-col":return this.wf;case"indent":return this.vf;case"done-nl":return this.xf;case"intra-block-nl":return this.yf;case"prefix":return this.prefix;case"per-line-prefix":return this.Af;case"suffix":return this.Cf;case"logical-block-callback":return this.zf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.logical-block{",", ","}",e,D.g(new v(null,10,5,y,[new v(null,2,5,y,[Ws,this.parent],null),new v(null,2,5,y,[Vw,this.Bf],null),new v(null,2,5,y,[No,this.wf],null),new v(null,2,5,y,[To,this.vf],null),new v(null,2,5,y,[Do,this.xf],null),new v(null,2,5,y,[Ha,this.yf],null),new v(null,2,5,y,[Zf,this.prefix],null),new v(null,2,5,y,[yc,this.Af],null),new v(null,2,5,y,[kc,this.Cf],null),new v(null,2,5,y,[_o,this.zf],null)],null),this.G))};p.Wa=function(){return new yu(this,10,new v(null,10,5,y,[Ws,Vw,No,To,Do,Ha,Zf,yc,kc,_o],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 10+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=1977012399^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.parent,n.parent)&&X.g(this.Bf,n.Bf)&&X.g(this.wf,n.wf)&&X.g(this.vf,n.vf)&&X.g(this.xf,n.xf)&&X.g(this.yf,n.yf)&&X.g(this.prefix,n.prefix)&&X.g(this.Af,n.Af)&&X.g(this.Cf,n.Cf)&&X.g(this.zf,n.zf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,10,[kc,null,To,null,Ws,null,Vw,null,Do,null,No,null,Zf,null,yc,null,_o,null,Ha,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"parent":case"section":case"start-col":case"indent":case"done-nl":case"intra-block-nl":case"prefix":case"per-line-prefix":case"suffix":case"logical-block-callback":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(Ws,n):on.call(null,Ws,n))?new ru(e,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(Vw,n):on.call(null,Vw,n))?new ru(this.parent,e,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(No,n):on.call(null,No,n))?new ru(this.parent,this.Bf,e,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(To,n):on.call(null,To,n))?new ru(this.parent,this.Bf,this.wf,e,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(Do,n):on.call(null,Do,n))?new ru(this.parent,this.Bf,this.wf,this.vf,e,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(Ha,n):on.call(null,Ha,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,e,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(Zf,n):on.call(null,Zf,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,e,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(yc,n):on.call(null,yc,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,e,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(kc,n):on.call(null,kc,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,e,this.zf,this.J,this.G,null):x(on.g?on.g(_o,n):on.call(null,_o,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,e,this.J,this.G,null):new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,10,5,y,[new Ln(Ws,this.parent),new Ln(Vw,this.Bf),new Ln(No,this.wf),new Ln(To,this.vf),new Ln(Do,this.xf),new Ln(Ha,this.yf),new Ln(Zf,this.prefix),new Ln(yc,this.Af),new Ln(kc,this.Cf),new Ln(_o,this.zf)],null),this.G))};p.W=function(t,n){return new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=Ki.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"data":return this.data;case"trailing-white-space":return this.Ef;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.buffer-blob{",", ","}",e,D.g(new v(null,5,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[tg,this.data],null),new v(null,2,5,y,[xl,this.Ef],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,5,new v(null,5,5,y,[pe,tg,xl,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 5+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=1809113693^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.data,n.data)&&X.g(this.Ef,n.Ef)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,5,[De,null,xl,null,pe,null,Me,null,tg,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new Ki(this.sf,this.data,this.Ef,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"data":case"trailing-white-space":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new Ki(e,this.data,this.Ef,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(tg,n):on.call(null,tg,n))?new Ki(this.sf,e,this.Ef,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(xl,n):on.call(null,xl,n))?new Ki(this.sf,this.data,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new Ki(this.sf,this.data,this.Ef,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new Ki(this.sf,this.data,this.Ef,this.rf,e,this.J,this.G,null):new Ki(this.sf,this.data,this.Ef,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,5,5,y,[new Ln(pe,this.sf),new Ln(tg,this.data),new Ln(xl,this.Ef),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new Ki(this.sf,this.data,this.Ef,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=Zs.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"type":return this.type;case"logical-block":return this.tf;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.nl-t{",", ","}",e,D.g(new v(null,5,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[pl,this.type],null),new v(null,2,5,y,[de,this.tf],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,5,new v(null,5,5,y,[pe,pl,de,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 5+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=-1640656800^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.type,n.type)&&X.g(this.tf,n.tf)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,5,[De,null,pl,null,de,null,pe,null,Me,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new Zs(this.sf,this.type,this.tf,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"type":case"logical-block":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new Zs(e,this.type,this.tf,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(pl,n):on.call(null,pl,n))?new Zs(this.sf,e,this.tf,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(de,n):on.call(null,de,n))?new Zs(this.sf,this.type,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new Zs(this.sf,this.type,this.tf,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new Zs(this.sf,this.type,this.tf,this.rf,e,this.J,this.G,null):new Zs(this.sf,this.type,this.tf,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,5,5,y,[new Ln(pe,this.sf),new Ln(pl,this.type),new Ln(de,this.tf),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new Zs(this.sf,this.type,this.tf,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=fa.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"logical-block":return this.tf;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.start-block-t{",", ","}",e,D.g(new v(null,4,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[de,this.tf],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,4,new v(null,4,5,y,[pe,de,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 4+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=-414877272^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.tf,n.tf)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,4,[De,null,de,null,pe,null,Me,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new fa(this.sf,this.tf,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"logical-block":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new fa(e,this.tf,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(de,n):on.call(null,de,n))?new fa(this.sf,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new fa(this.sf,this.tf,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new fa(this.sf,this.tf,this.rf,e,this.J,this.G,null):new fa(this.sf,this.tf,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,4,5,y,[new Ln(pe,this.sf),new Ln(de,this.tf),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new fa(this.sf,this.tf,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=ga.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"logical-block":return this.tf;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.end-block-t{",", ","}",e,D.g(new v(null,4,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[de,this.tf],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,4,new v(null,4,5,y,[pe,de,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 4+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=1365867980^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.tf,n.tf)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,4,[De,null,de,null,pe,null,Me,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new ga(this.sf,this.tf,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"logical-block":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new ga(e,this.tf,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(de,n):on.call(null,de,n))?new ga(this.sf,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new ga(this.sf,this.tf,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new ga(this.sf,this.tf,this.rf,e,this.J,this.G,null):new ga(this.sf,this.tf,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,4,5,y,[new Ln(pe,this.sf),new Ln(de,this.tf),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new ga(this.sf,this.tf,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=ys.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"logical-block":return this.tf;case"relative-to":return this.Df;case"offset":return this.offset;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.indent-t{",", ","}",e,D.g(new v(null,6,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[de,this.tf],null),new v(null,2,5,y,[Ff,this.Df],null),new v(null,2,5,y,[hr,this.offset],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,6,new v(null,6,5,y,[pe,de,Ff,hr,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 6+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=-1602780238^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.tf,n.tf)&&X.g(this.Df,n.Df)&&X.g(this.offset,n.offset)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,6,[hr,null,De,null,Ff,null,de,null,pe,null,Me,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new ys(this.sf,this.tf,this.Df,this.offset,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"logical-block":case"relative-to":case"offset":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new ys(e,this.tf,this.Df,this.offset,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(de,n):on.call(null,de,n))?new ys(this.sf,e,this.Df,this.offset,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Ff,n):on.call(null,Ff,n))?new ys(this.sf,this.tf,e,this.offset,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(hr,n):on.call(null,hr,n))?new ys(this.sf,this.tf,this.Df,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new ys(this.sf,this.tf,this.Df,this.offset,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new ys(this.sf,this.tf,this.Df,this.offset,this.rf,e,this.J,this.G,null):new ys(this.sf,this.tf,this.Df,this.offset,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,6,5,y,[new Ln(pe,this.sf),new Ln(de,this.tf),new Ln(Ff,this.Df),new Ln(hr,this.offset),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new ys(this.sf,this.tf,this.Df,this.offset,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};var cg=function(){var t=et.h(vn),n=et.h(vn),e=et.h(vn),l=et.h(vn),r=cn.i(vn,ws,ke.m?ke.m():ke.call(null));return new qi($n.g("cljs.pprint","write-token"),function(u,i){return pe.h(i)},Gt,r,t,n,e,l)}();cg.Sa(null,EQ,function(t,n){var e=_o.h(J(J(t)));return x(e)&&(e.h?e.h(Gy):e.call(null,Gy)),n=de.h(n),e=Zf.h(n),x(e)&&Rn(Yt.h(J(J(t))),e),t=kr(Yt.h(J(J(t))),Hr),Al(No.h(n),t),Al(To.h(n),t)});cg.Sa(null,NG,function(t,n){var e=_o.h(J(J(t)));return x(e)&&(e.h?e.h(Ey):e.call(null,Ey)),n=kc.h(de.h(n)),x(n)?Rn(Yt.h(J(J(t))),n):null});cg.Sa(null,RG,function(t,n){var e=de.h(n),l=To.h(e),r=hr.h(n);if(n=Ff.h(n),x(X.g?X.g(wo,n):X.call(null,wo,n)))t=J(No.h(e));else if(x(X.g?X.g(Ra,n):X.call(null,Ra,n)))t=kr(Yt.h(J(J(t))),Hr);else throw Error(["No matching clause: ",M.h(n)].join(""));return Al(l,r+t)});cg.Sa(null,Hy,function(t,n){return Rn(Yt.h(J(J(t))),tg.h(n))});cg.Sa(null,bf,function(t,n){var e=X.g(pl.h(n),P3);return e||(e=(e=!X.g(pl.h(n),N3))?J(Do.h(de.h(n))):e),x(e)?Gv.g?Gv.g(t,n):Gv.call(null,t,n):(n=xl.h(J(J(t))),x(n)&&Rn(Yt.h(J(J(t))),n)),ut.u(J(t),fn,xl,null)});var M0=function(){var t=et.h(vn),n=et.h(vn),e=et.h(vn),l=et.h(vn),r=cn.i(vn,ws,ke.m?ke.m():ke.call(null));return new qi($n.g("cljs.pprint","emit-nl?"),function(u){return pl.h(u)},Gt,r,t,n,e,l)}();M0.Sa(null,Fu,function(t,n,e){return t=de.h(t),NY(n,t,e)});M0.Sa(null,Ew,function(t,n,e){return t=de.h(t),qY(n,t,e)});M0.Sa(null,N3,function(t,n,e,l){t=de.h(t);var r=J(Ha.h(t));return x(r)?r:(l=!a0(n,l))?l:qY(n,t,e)});M0.Sa(null,P3,function(){return!0});var Jhn=function t(n,e){var l=ptn(e);e=m.i(l,0,null);var r=m.i(l,1,null);if(x(e)&&vy(n,e,!1),x(r)){l=wtn(r),e=m.i(l,0,null),l=m.i(l,1,null);var u=j(r),i=M0.u(u,n,e,dtn(r));return x(i)&&(Gv(n,u),r=A(r)),a0(n,r)?n=r:(r=t.g?t.g(n,e):t.call(null,n,e),X.g(r,e)?(vy(n,e,!1),n=l):n=Dt.g(Yn,D.g(r,l))),n}return null};p=cI.prototype;p.W=function(t,n){return new cI(this.uf,this.Nf,this.Vf,this.Of,this.Je,n)};p.P=function(){return this.Qf};p.gb=function(){return this.Je};p.be=function(t,n){if(t=cr(n),x(X.g?X.g(String,t):X.call(null,String,t))){var e=QN(this,n);n=QU(e,/\s+$/,""),t=vt.g(e,n.length);var l=Za.h(J(J(this)));return X.g(l,Hf)?(zf(this),Rn(Yt.h(J(J(this))),n),ut.u(J(this),fn,xl,t)):(l=Ue.h(J(J(this))),e=l+an(e),ut.u(J(this),fn,Ue,e),Vf(this,new Ki(Hy,n,t,l,e,null,null,null)))}if(x(X.g?X.g(Number,t):X.call(null,Number,t)))return X.g(Za.h(J(J(this))),Hf)?(zf(this),n=Rn(Yt.h(J(J(this))),n)):X.g(n,` -`)?n=QN(this,` -`):(t=Ue.h(J(J(this))),e=t+1,ut.u(J(this),fn,Ue,e),n=gu(n),n=Vf(this,new Ki(Hy,n,null,t,e,null,null,null))),n;throw Error(["No matching clause: ",M.h(t)].join(""))};p.Hf=function(){return this.Mf(null),Ma(Yt.h(J(J(this))))};p.Mf=function(){return X.g(Za.h(J(J(this))),Xy)?(vy(this,Fr.h(J(J(this))),!0),ut.u(J(this),fn,Fr,Yn)):zf(this)};var wa=!0,ff=null,h1=72,c1=40,kv=null,Sv=null,f1=null,jm=null,Dh=10,Ot=0,pt=null,sj=function t(n){for(var e=[],l=arguments.length,r=0;r^W_I`.split(""),[new P(null,5,[Ft,"A",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),bs,new v(null,2,5,y,[1,Number],null),Um,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return c8(kg,t,n)}}],null),new P(null,5,[Ft,"S",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),bs,new v(null,2,5,y,[1,Number],null),Um,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return c8(Us,t,n)}}],null),new P(null,5,[Ft,"D",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return yh(10,t,n)}}],null),new P(null,5,[Ft,"B",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return yh(2,t,n)}}],null),new P(null,5,[Ft,"O",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return yh(8,t,n)}}],null),new P(null,5,[Ft,"X",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return yh(16,t,n)}}],null),new P(null,5,[Ft,"R",rt,new P(null,5,[Yt,new v(null,2,5,y,[null,Number],null),_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(t){return x(j(Yt.h(t)))?function(n,e){return yh(Yt.h(n),n,e)}:x(function(){var n=xt.h(t);return x(n)?at.h(t):n}())?function(n,e){return KN(Xhn,e)}:x(xt.h(t))?function(n,e){return KN(Fhn,e)}:x(at.h(t))?function(n,e){if(n=ml(e),e=m.i(n,0,null),n=m.i(n,1,null),X.g(0,e))Ce.j(z(["zeroth"]));else{var l=xy(1e3,0>e?-e:e);if(an(l)<=an(h5)){var r=Mn.g(GN,Kf.h(l));r=JN(r,1);var u=ur(l);l=ri(u,100),u=Ji(u,100);var i=0u)var o=m.g(QL,u);else{o=ri(u,10);var h=Ji(u,10);o=0e?"minus ":null,oe(r)||oe(l)?oe(r)?l:[r,"th"].join(""):[r,", ",l].join("")].join("")]))}else yh(10,new P(null,5,[_r,0,be," ",ia,",",ua,3,at,!0],null),ce(new v(null,1,5,y,[e],null))),r=Ji(e,100),e=11r,r=Ji(r,10),Ce.j(z([r===1&&e?"st":r===2&&e?"nd":r===3&&e?"rd":"th"]))}return n}:function(n,e){if(e=ml(e),n=m.i(e,0,null),e=m.i(e,1,null),X.g(0,n))Ce.j(z(["zero"]));else{var l=xy(1e3,0>n?-n:n);an(l)<=an(h5)?(l=Mn.g(GN,l),l=JN(l,0),Ce.j(z([[0>n?"minus ":null,l].join("")]))):yh(10,new P(null,5,[_r,0,be," ",ia,",",ua,3,at,!0],null),ce(new v(null,1,5,y,[n],null)))}return e}}],null),new P(null,5,[Ft,"P",rt,vn,me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){n=x(at.h(t))?p1(n,-1):n,t=x(xt.h(t))?new v(null,2,5,y,["y","ies"],null):new v(null,2,5,y,["","s"],null);var e=ml(n);return n=m.i(e,0,null),e=m.i(e,1,null),Ce.j(z([X.g(n,1)?j(t):Rt(t)])),e}}],null),new P(null,5,[Ft,"C",rt,new P(null,1,[UQ,new v(null,2,5,y,[null,String],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(t){return x(at.h(t))?xtn:x(xt.h(t))?ktn:Stn}],null),new P(null,5,[Ft,"F",rt,new P(null,5,[ja,new v(null,2,5,y,[null,Number],null),xa,new v(null,2,5,y,[null,Number],null),Jm,new v(null,2,5,y,[0,Number],null),Ia,new v(null,2,5,y,[null,String],null),be,new v(null,2,5,y,[" ",String],null)],null),me,new ht(null,new P(null,1,[xt,null],null),null),bt,vn,ve,function(){return QY}],null),new P(null,5,[Ft,"E",rt,new P(null,7,[ja,new v(null,2,5,y,[null,Number],null),xa,new v(null,2,5,y,[null,Number],null),l5,new v(null,2,5,y,[null,Number],null),Jm,new v(null,2,5,y,[1,Number],null),Ia,new v(null,2,5,y,[null,String],null),be,new v(null,2,5,y,[" ",String],null),x8,new v(null,2,5,y,[null,String],null)],null),me,new ht(null,new P(null,1,[xt,null],null),null),bt,vn,ve,function(){return GY}],null),new P(null,5,[Ft,"G",rt,new P(null,7,[ja,new v(null,2,5,y,[null,Number],null),xa,new v(null,2,5,y,[null,Number],null),l5,new v(null,2,5,y,[null,Number],null),Jm,new v(null,2,5,y,[1,Number],null),Ia,new v(null,2,5,y,[null,String],null),be,new v(null,2,5,y,[" ",String],null),x8,new v(null,2,5,y,[null,String],null)],null),me,new ht(null,new P(null,1,[xt,null],null),null),bt,vn,ve,function(){return Ctn}],null),new P(null,5,[Ft,"$",rt,new P(null,4,[xa,new v(null,2,5,y,[2,Number],null),Ch,new v(null,2,5,y,[1,Number],null),ja,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return Atn}],null),new P(null,5,[Ft,"%",rt,new P(null,1,[Zg,new v(null,2,5,y,[1,Number],null)],null),me,Ke,bt,vn,ve,function(){return function(t,n){t=Zg.h(t);for(var e=0;e",u1,!0,Yu,Z7],null),ve,function(){return Mtn}],null),new P(null,5,[Ft,">",rt,vn,me,new ht(null,new P(null,1,[at,null],null),null),bt,vn,ve,function(){return null}],null),new P(null,5,[Ft,"^",rt,new P(null,3,[Bq,new v(null,2,5,y,[null,Number],null),Fq,new v(null,2,5,y,[null,Number],null),Xq,new v(null,2,5,y,[null,Number],null)],null),me,new ht(null,new P(null,1,[at,null],null),null),bt,vn,ve,function(){return function(t,n){var e=Bq.h(t),l=Fq.h(t),r=Xq.h(t),u=x(at.h(t))?E3:Sf;return x(x(e)?x(l)?r:l:e)?e<=l&&l<=r?new v(null,2,5,y,[u,n],null):n:x(x(e)?l:e)?X.g(e,l)?new v(null,2,5,y,[u,n],null):n:x(e)?X.g(e,0)?new v(null,2,5,y,[u,n],null):n:(x(at.h(t))?oe(qu.h(Hu.h(t))):oe(qu.h(n)))?new v(null,2,5,y,[u,n],null):n}}],null),new P(null,5,[Ft,"W",rt,vn,me,new ht(null,new P(null,4,[at,null,xt,null,lu,null,uf,null],null),null),bt,vn,ve,function(t){if(x(function(){var e=xt.h(t);return x(e)?e:at.h(t)}())){var n=D.g(x(xt.h(t))?new v(null,4,5,y,[JG,null,zQ,null],null):Yn,x(at.h(t))?new v(null,2,5,y,[uf,!0],null):Yn);return function(e,l){return l=ml(l),e=m.i(l,0,null),l=m.i(l,1,null),x(dn.i(sj,e,n))?new v(null,2,5,y,[Sf,l],null):l}}return function(e,l){return l=ml(l),e=m.i(l,0,null),l=m.i(l,1,null),x(Jl(e))?new v(null,2,5,y,[Sf,l],null):l}}],null),new P(null,5,[Ft,"_",rt,vn,me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return Utn}],null),new P(null,5,[Ft,"I",rt,new P(null,1,[Ch,new v(null,2,5,y,[0,Number],null)],null),me,new ht(null,new P(null,1,[at,null],null),null),bt,vn,ve,function(){return ztn}],null)]),bhn=/^([vV]|#|('.)|([+-]?\d+)|(?=,))/,ncn=new ht(null,new P(null,2,[kI,null,EI,null],null),null),tcn=new P(null,2,[":",at,"@",xt],null),ecn=function t(n){for(;;){if(oe(n))return!1;var e=uf.h(me.h(Zu.h(j(n))));if(x(e)||(e=Mr(t,j(ou.h(rt.h(j(n))))),e=x(e)?e:Mr(t,j(Yu.h(rt.h(j(n)))))),x(e))return!0;n=A(n)}},tl=LU(wI),xx=new P(null,6,[Bt,"'",wl,"#'",DG,"@",$3,"~",iG,"@",Arn,"~"],null);(function(){var t=tl("~<[~;~@{~w~^, ~:_~}~;]~:>");return function(){function n(l){var r=null;if(0");return function(){function n(l){var r=null;if(0");return function(){function n(l){var r=null;if(0");return function(){function n(l){var r=null;if(0");return function(){function n(l){var r=null;if(0");return function(){function r(i){var s=null;if(0"),Z1(wo,-(n.length-2)),xu(Fu);var u=t!=null?t.H&1||On===t.Wf?!0:t.H?!1:Qn(x$,t):Qn(x$,t),i=u&&!Y2(t);Jl(i?Grn:J(t)),Nr()}finally{pt=l,Ot=e}}return null});zr(Xo,null,Zc);zr(Xo,Gt,FY);ff=fh;const wcn=function(t,n){var e=new rl,l=Qe,r=Fl;Qe=!0,Fl=function(u){return e.append(u)};try{vtn(DY(t,n))}finally{Fl=r,Qe=l}return M.h(e)},dcn=function(){var t=gl(vn),n=cn.g(t,eg),e=cn.g(t,ct),l=cn.g(t,dp),r=cn.g(t,rp),u=cn.g(t,Ar),i=cn.g(t,qs),s=cn.g(t,tq),a=cn.g(t,Qt),o=cn.g(t,Vr),h=cn.g(t,Cf),c=cn.g(t,lp),f=cn.g(t,B7),d=cn.g(t,Ns),C=cn.g(t,R7),I=cn.g(t,cL);t=cn.g(t,srn),a=x(a)?a:et.h(vn),o=Nt.j(z([vn,o])),l=Nt.j(z([Ghn,l])),t=Nt.j(z([Qhn,t]));n:for(var T=He(zc(t,new v(null,1,5,y,[Cf],null))),$=t;;){var G=j($);if(x(G)){var b=G;G=m.i(b,0,null),b=m.i(b,1,null),T=Vu.i(T,G,we(b)?b:new P(null,1,[ss,b],null)),$=rn($)}else{T=new P(null,2,[ap,ap.h(t),Io,ul(T)],null);break n}}return ctn(a,u,d,e,T,t,o,c,f,r,l),fn.j(new P(null,5,[Ar,vn,Qt,a,eg,n,qs,i,KI,x(h)?h:C],null),Cf,x(h)?YN(z([h])):null,z([R7,x(C)?YN(z([C])):null,tq,x(s)?s:ftn,cL,I]))};Kw.coll;Kw.prefixColl;Kw.prefixEdge;Kw.prefixContainer;Kw.sameEdge;function pcn(t){return t.parent}function vcn(t){return t.isTop}function ycn(t){return vcn(t.type)}function NJ(t){return t.selection.asSingle().ranges[0]}function Sx(t,n,e){switch(arguments.length){case 1:return xr(t);case 2:return xr(t).resolveInner(n);case 3:return xr(t).resolveInner(n,e)}}function qJ(t,n){const e=Sx(t,n,-1);return Sx(t,n,1),Sx(t,n),e}function r_(t,n){return ycn(t)?n:r_(pcn(t),n.concat(t))}function LJ(t,n){return t.doc.slice(n.from,n.to).toString()}function jcn(t,n){const e=r_(n,[]).filter(l=>t==l.to&&t==n.to);return e[e.length-1]||n}function WJ(t){const n=NJ(t).from,e=qJ(t,n);return jcn(n,e)}let Ox=0;function VJ(t){const n=NJ(t).from,e=r_(qJ(t,n),[]);return e.length===0?WJ(t):e[e.length-1]}function xcn(t){return LJ(t,WJ(t))}function kcn(t){return LJ(t,VJ(t))}let u_=dcn(),Pc="",co="",to=0;function oj(t,n,e){const l=t.state.doc.toString();co=l;const r=l.length;t.dispatch({changes:{from:0,to:r,insert:n},selection:{anchor:e,head:e}})}function i_(t){return t.length>100?` -`+t.substring(0,100)+"..."+t.substring(t.length-2):t}function s_(t,n){try{return wcn(t,n)}catch(e){return console.log(e),` -Error: `+e.message}}function Scn(t){co=t.state.doc.toString(),to=t.state.selection.main.head;const e=co.slice(0,to),l=co.slice(to,co.length);Pc=i_(s_(u_,xcn(t.state)));const r=e+" => "+Pc+" "+l;return oj(t,r,to),t.dispatch({selection:{anchor:to,head:to}}),!0}function Ut(t){Pc.length!=0&&(Pc="",oj(t,co,to))}function Ocn(t){Ox=VJ(t.state).to;const n=t.state.doc.toString();to=t.state.selection.main.head,co=n;const e=co.slice(0,Ox),l=co.slice(Ox,co.length);Pc=i_(s_(u_,kcn(t.state)));const r=e+" => "+Pc+" "+l;return oj(t,r,to),!0}function Ccn(t){const n=t.state.doc.toString();Pc=i_(s_(u_,t.state.doc.text.join(" ")));const e=n+` - => `+Pc;return oj(t,e,to),!0}const Acn=Array.from(Array(58)).map((t,n)=>n+65),GL=Acn.map(t=>String.fromCharCode(t));let QR=[];for(let t=0;tn=>{let{pos:e,unit:l,node:r,state:u,baseIndent:i,textAfter:s}=n;if(t.prop(Rcn)){let a=n.column(r.firstChild.to);return t.name=="List"&&["NS","DefLike","Operator"].includes(r.firstChild.nextSibling.type.name)?a+1:a}else return 0}),RV.add({["Vector Map List"]:HX})]}),languageData:{commentTokens:{line:";;"}}});function Icn(){return new WX(Pcn,[Ecn])}let _cn=Oe.create({doc:"(map inc (range 5))",extensions:[sb,Icn()]});new kt({state:_cn,parent:document.querySelector("#app")}).focus();let Tcn="Alt+Enter = Eval top-level form",Yh="Key bindings:,Shift+Enter = Eval cell,"+Tcn+",Ctrl/Cmd+Enter = Eval at cursor";Yh=Yh.split(",");for(let t=0;t";Yh=Yh.join("");document.getElementById("keymap").innerHTML=Yh; +`)},n)))),Rn(kr(this,Yt),n);if(x(X.g?X.g(Number,t):X.call(null,Number,t)))return gtn(this,n);throw Error(["No matching clause: ",M.h(t)].join(""))};p=ru.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"parent":return this.parent;case"section":return this.Bf;case"start-col":return this.wf;case"indent":return this.vf;case"done-nl":return this.xf;case"intra-block-nl":return this.yf;case"prefix":return this.prefix;case"per-line-prefix":return this.Af;case"suffix":return this.Cf;case"logical-block-callback":return this.zf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.logical-block{",", ","}",e,D.g(new v(null,10,5,y,[new v(null,2,5,y,[Ws,this.parent],null),new v(null,2,5,y,[Vw,this.Bf],null),new v(null,2,5,y,[No,this.wf],null),new v(null,2,5,y,[To,this.vf],null),new v(null,2,5,y,[Do,this.xf],null),new v(null,2,5,y,[Ha,this.yf],null),new v(null,2,5,y,[Zf,this.prefix],null),new v(null,2,5,y,[yc,this.Af],null),new v(null,2,5,y,[kc,this.Cf],null),new v(null,2,5,y,[_o,this.zf],null)],null),this.G))};p.Wa=function(){return new yu(this,10,new v(null,10,5,y,[Ws,Vw,No,To,Do,Ha,Zf,yc,kc,_o],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 10+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=1977012399^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.parent,n.parent)&&X.g(this.Bf,n.Bf)&&X.g(this.wf,n.wf)&&X.g(this.vf,n.vf)&&X.g(this.xf,n.xf)&&X.g(this.yf,n.yf)&&X.g(this.prefix,n.prefix)&&X.g(this.Af,n.Af)&&X.g(this.Cf,n.Cf)&&X.g(this.zf,n.zf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,10,[kc,null,To,null,Ws,null,Vw,null,Do,null,No,null,Zf,null,yc,null,_o,null,Ha,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"parent":case"section":case"start-col":case"indent":case"done-nl":case"intra-block-nl":case"prefix":case"per-line-prefix":case"suffix":case"logical-block-callback":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(Ws,n):on.call(null,Ws,n))?new ru(e,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(Vw,n):on.call(null,Vw,n))?new ru(this.parent,e,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(No,n):on.call(null,No,n))?new ru(this.parent,this.Bf,e,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(To,n):on.call(null,To,n))?new ru(this.parent,this.Bf,this.wf,e,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(Do,n):on.call(null,Do,n))?new ru(this.parent,this.Bf,this.wf,this.vf,e,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(Ha,n):on.call(null,Ha,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,e,this.prefix,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(Zf,n):on.call(null,Zf,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,e,this.Af,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(yc,n):on.call(null,yc,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,e,this.Cf,this.zf,this.J,this.G,null):x(on.g?on.g(kc,n):on.call(null,kc,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,e,this.zf,this.J,this.G,null):x(on.g?on.g(_o,n):on.call(null,_o,n))?new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,e,this.J,this.G,null):new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,10,5,y,[new Ln(Ws,this.parent),new Ln(Vw,this.Bf),new Ln(No,this.wf),new Ln(To,this.vf),new Ln(Do,this.xf),new Ln(Ha,this.yf),new Ln(Zf,this.prefix),new Ln(yc,this.Af),new Ln(kc,this.Cf),new Ln(_o,this.zf)],null),this.G))};p.W=function(t,n){return new ru(this.parent,this.Bf,this.wf,this.vf,this.xf,this.yf,this.prefix,this.Af,this.Cf,this.zf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=Ki.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"data":return this.data;case"trailing-white-space":return this.Ef;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.buffer-blob{",", ","}",e,D.g(new v(null,5,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[tg,this.data],null),new v(null,2,5,y,[xl,this.Ef],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,5,new v(null,5,5,y,[pe,tg,xl,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 5+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=1809113693^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.data,n.data)&&X.g(this.Ef,n.Ef)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,5,[De,null,xl,null,pe,null,Me,null,tg,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new Ki(this.sf,this.data,this.Ef,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"data":case"trailing-white-space":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new Ki(e,this.data,this.Ef,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(tg,n):on.call(null,tg,n))?new Ki(this.sf,e,this.Ef,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(xl,n):on.call(null,xl,n))?new Ki(this.sf,this.data,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new Ki(this.sf,this.data,this.Ef,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new Ki(this.sf,this.data,this.Ef,this.rf,e,this.J,this.G,null):new Ki(this.sf,this.data,this.Ef,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,5,5,y,[new Ln(pe,this.sf),new Ln(tg,this.data),new Ln(xl,this.Ef),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new Ki(this.sf,this.data,this.Ef,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=Zs.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"type":return this.type;case"logical-block":return this.tf;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.nl-t{",", ","}",e,D.g(new v(null,5,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[pl,this.type],null),new v(null,2,5,y,[de,this.tf],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,5,new v(null,5,5,y,[pe,pl,de,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 5+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=-1640656800^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.type,n.type)&&X.g(this.tf,n.tf)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,5,[De,null,pl,null,de,null,pe,null,Me,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new Zs(this.sf,this.type,this.tf,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"type":case"logical-block":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new Zs(e,this.type,this.tf,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(pl,n):on.call(null,pl,n))?new Zs(this.sf,e,this.tf,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(de,n):on.call(null,de,n))?new Zs(this.sf,this.type,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new Zs(this.sf,this.type,this.tf,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new Zs(this.sf,this.type,this.tf,this.rf,e,this.J,this.G,null):new Zs(this.sf,this.type,this.tf,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,5,5,y,[new Ln(pe,this.sf),new Ln(pl,this.type),new Ln(de,this.tf),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new Zs(this.sf,this.type,this.tf,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=fa.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"logical-block":return this.tf;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.start-block-t{",", ","}",e,D.g(new v(null,4,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[de,this.tf],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,4,new v(null,4,5,y,[pe,de,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 4+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=-414877272^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.tf,n.tf)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,4,[De,null,de,null,pe,null,Me,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new fa(this.sf,this.tf,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"logical-block":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new fa(e,this.tf,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(de,n):on.call(null,de,n))?new fa(this.sf,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new fa(this.sf,this.tf,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new fa(this.sf,this.tf,this.rf,e,this.J,this.G,null):new fa(this.sf,this.tf,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,4,5,y,[new Ln(pe,this.sf),new Ln(de,this.tf),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new fa(this.sf,this.tf,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=ga.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"logical-block":return this.tf;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.end-block-t{",", ","}",e,D.g(new v(null,4,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[de,this.tf],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,4,new v(null,4,5,y,[pe,de,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 4+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=1365867980^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.tf,n.tf)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,4,[De,null,de,null,pe,null,Me,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new ga(this.sf,this.tf,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"logical-block":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new ga(e,this.tf,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(de,n):on.call(null,de,n))?new ga(this.sf,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new ga(this.sf,this.tf,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new ga(this.sf,this.tf,this.rf,e,this.J,this.G,null):new ga(this.sf,this.tf,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,4,5,y,[new Ln(pe,this.sf),new Ln(de,this.tf),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new ga(this.sf,this.tf,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};p=ys.prototype;p.ta=function(t,n){return this.N(null,n,null)};p.N=function(t,n,e){switch(n instanceof F?n.za:null){case"type-tag":return this.sf;case"logical-block":return this.tf;case"relative-to":return this.Df;case"offset":return this.offset;case"start-pos":return this.rf;case"end-pos":return this.qf;default:return cn.i(this.G,n,e)}};p.tb=function(t,n,e){return En.i(function(l,r){var u=m.i(r,0,null);return r=m.i(r,1,null),n.i?n.i(l,u,r):n.call(null,l,u,r)},e,this)};p.M=function(t,n,e){return St(n,function(l){return St(n,ot,""," ","",e,l)},"#cljs.pprint.indent-t{",", ","}",e,D.g(new v(null,6,5,y,[new v(null,2,5,y,[pe,this.sf],null),new v(null,2,5,y,[de,this.tf],null),new v(null,2,5,y,[Ff,this.Df],null),new v(null,2,5,y,[hr,this.offset],null),new v(null,2,5,y,[Me,this.rf],null),new v(null,2,5,y,[De,this.qf],null)],null),this.G))};p.Wa=function(){return new yu(this,6,new v(null,6,5,y,[pe,de,Ff,hr,Me,De],null),x(this.G)?vl(this.G):Wu())};p.P=function(){return this.J};p.X=function(){return 6+an(this.G)};p.U=function(){var t=this.C;return t??(this.C=t=-1602780238^gr(this))};p.T=function(t,n){return n!=null&&this.constructor===n.constructor&&X.g(this.sf,n.sf)&&X.g(this.tf,n.tf)&&X.g(this.Df,n.Df)&&X.g(this.offset,n.offset)&&X.g(this.rf,n.rf)&&X.g(this.qf,n.qf)&&X.g(this.G,n.G)};p.Hb=function(t,n){return Gn(new ht(null,new P(null,6,[hr,null,De,null,Ff,null,de,null,pe,null,Me,null],null),null),n)?Ct.g(Re(Dt.g(vn,this),this.J),n):new ys(this.sf,this.tf,this.Df,this.offset,this.rf,this.qf,this.J,mr(Ct.g(this.G,n)),null)};p.fb=function(t,n){switch(n instanceof F?n.za:null){case"type-tag":case"logical-block":case"relative-to":case"offset":case"start-pos":case"end-pos":return!0;default:return Gn(this.G,n)}};p.Oa=function(t,n,e){return x(on.g?on.g(pe,n):on.call(null,pe,n))?new ys(e,this.tf,this.Df,this.offset,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(de,n):on.call(null,de,n))?new ys(this.sf,e,this.Df,this.offset,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Ff,n):on.call(null,Ff,n))?new ys(this.sf,this.tf,e,this.offset,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(hr,n):on.call(null,hr,n))?new ys(this.sf,this.tf,this.Df,e,this.rf,this.qf,this.J,this.G,null):x(on.g?on.g(Me,n):on.call(null,Me,n))?new ys(this.sf,this.tf,this.Df,this.offset,e,this.qf,this.J,this.G,null):x(on.g?on.g(De,n):on.call(null,De,n))?new ys(this.sf,this.tf,this.Df,this.offset,this.rf,e,this.J,this.G,null):new ys(this.sf,this.tf,this.Df,this.offset,this.rf,this.qf,this.J,fn.i(this.G,n,e),null)};p.S=function(){return E(D.g(new v(null,6,5,y,[new Ln(pe,this.sf),new Ln(de,this.tf),new Ln(Ff,this.Df),new Ln(hr,this.offset),new Ln(Me,this.rf),new Ln(De,this.qf)],null),this.G))};p.W=function(t,n){return new ys(this.sf,this.tf,this.Df,this.offset,this.rf,this.qf,n,this.G,this.C)};p.Y=function(t,n){return wt(n)?this.Oa(null,nt(n,0),nt(n,1)):En.i(Zl,this,n)};var cg=function(){var t=et.h(vn),n=et.h(vn),e=et.h(vn),l=et.h(vn),r=cn.i(vn,ws,ke.m?ke.m():ke.call(null));return new qi($n.g("cljs.pprint","write-token"),function(u,i){return pe.h(i)},Gt,r,t,n,e,l)}();cg.Sa(null,AQ,function(t,n){var e=_o.h(J(J(t)));return x(e)&&(e.h?e.h(Gy):e.call(null,Gy)),n=de.h(n),e=Zf.h(n),x(e)&&Rn(Yt.h(J(J(t))),e),t=kr(Yt.h(J(J(t))),Hr),Al(No.h(n),t),Al(To.h(n),t)});cg.Sa(null,$G,function(t,n){var e=_o.h(J(J(t)));return x(e)&&(e.h?e.h(Ey):e.call(null,Ey)),n=kc.h(de.h(n)),x(n)?Rn(Yt.h(J(J(t))),n):null});cg.Sa(null,EG,function(t,n){var e=de.h(n),l=To.h(e),r=hr.h(n);if(n=Ff.h(n),x(X.g?X.g(wo,n):X.call(null,wo,n)))t=J(No.h(e));else if(x(X.g?X.g(Ra,n):X.call(null,Ra,n)))t=kr(Yt.h(J(J(t))),Hr);else throw Error(["No matching clause: ",M.h(n)].join(""));return Al(l,r+t)});cg.Sa(null,Hy,function(t,n){return Rn(Yt.h(J(J(t))),tg.h(n))});cg.Sa(null,bf,function(t,n){var e=X.g(pl.h(n),P3);return e||(e=(e=!X.g(pl.h(n),N3))?J(Do.h(de.h(n))):e),x(e)?Gv.g?Gv.g(t,n):Gv.call(null,t,n):(n=xl.h(J(J(t))),x(n)&&Rn(Yt.h(J(J(t))),n)),ut.u(J(t),fn,xl,null)});var M0=function(){var t=et.h(vn),n=et.h(vn),e=et.h(vn),l=et.h(vn),r=cn.i(vn,ws,ke.m?ke.m():ke.call(null));return new qi($n.g("cljs.pprint","emit-nl?"),function(u){return pl.h(u)},Gt,r,t,n,e,l)}();M0.Sa(null,Fu,function(t,n,e){return t=de.h(t),$Y(n,t,e)});M0.Sa(null,Ew,function(t,n,e){return t=de.h(t),NY(n,t,e)});M0.Sa(null,N3,function(t,n,e,l){t=de.h(t);var r=J(Ha.h(t));return x(r)?r:(l=!a0(n,l))?l:NY(n,t,e)});M0.Sa(null,P3,function(){return!0});var Ghn=function t(n,e){var l=dtn(e);e=m.i(l,0,null);var r=m.i(l,1,null);if(x(e)&&vy(n,e,!1),x(r)){l=mtn(r),e=m.i(l,0,null),l=m.i(l,1,null);var u=j(r),i=M0.u(u,n,e,wtn(r));return x(i)&&(Gv(n,u),r=A(r)),a0(n,r)?n=r:(r=t.g?t.g(n,e):t.call(null,n,e),X.g(r,e)?(vy(n,e,!1),n=l):n=Dt.g(Yn,D.g(r,l))),n}return null};p=cI.prototype;p.W=function(t,n){return new cI(this.uf,this.Nf,this.Vf,this.Of,this.Je,n)};p.P=function(){return this.Qf};p.gb=function(){return this.Je};p.be=function(t,n){if(t=cr(n),x(X.g?X.g(String,t):X.call(null,String,t))){var e=YN(this,n);n=YU(e,/\s+$/,""),t=vt.g(e,n.length);var l=Za.h(J(J(this)));return X.g(l,Hf)?(zf(this),Rn(Yt.h(J(J(this))),n),ut.u(J(this),fn,xl,t)):(l=Ue.h(J(J(this))),e=l+an(e),ut.u(J(this),fn,Ue,e),Vf(this,new Ki(Hy,n,t,l,e,null,null,null)))}if(x(X.g?X.g(Number,t):X.call(null,Number,t)))return X.g(Za.h(J(J(this))),Hf)?(zf(this),n=Rn(Yt.h(J(J(this))),n)):X.g(n,` +`)?n=YN(this,` +`):(t=Ue.h(J(J(this))),e=t+1,ut.u(J(this),fn,Ue,e),n=gu(n),n=Vf(this,new Ki(Hy,n,null,t,e,null,null,null))),n;throw Error(["No matching clause: ",M.h(t)].join(""))};p.Hf=function(){return this.Mf(null),Ma(Yt.h(J(J(this))))};p.Mf=function(){return X.g(Za.h(J(J(this))),Xy)?(vy(this,Fr.h(J(J(this))),!0),ut.u(J(this),fn,Fr,Yn)):zf(this)};var wa=!0,ff=null,h1=72,c1=40,kv=null,Sv=null,f1=null,jm=null,Dh=10,Ot=0,pt=null,sj=function t(n){for(var e=[],l=arguments.length,r=0;r^W_I`.split(""),[new P(null,5,[Ft,"A",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),bs,new v(null,2,5,y,[1,Number],null),Um,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return c8(kg,t,n)}}],null),new P(null,5,[Ft,"S",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),bs,new v(null,2,5,y,[1,Number],null),Um,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return c8(Us,t,n)}}],null),new P(null,5,[Ft,"D",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return yh(10,t,n)}}],null),new P(null,5,[Ft,"B",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return yh(2,t,n)}}],null),new P(null,5,[Ft,"O",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return yh(8,t,n)}}],null),new P(null,5,[Ft,"X",rt,new P(null,4,[_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){return yh(16,t,n)}}],null),new P(null,5,[Ft,"R",rt,new P(null,5,[Yt,new v(null,2,5,y,[null,Number],null),_r,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null),ia,new v(null,2,5,y,[",",String],null),ua,new v(null,2,5,y,[3,Number],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(t){return x(j(Yt.h(t)))?function(n,e){return yh(Yt.h(n),n,e)}:x(function(){var n=xt.h(t);return x(n)?at.h(t):n}())?function(n,e){return JN(Bhn,e)}:x(xt.h(t))?function(n,e){return JN(Xhn,e)}:x(at.h(t))?function(n,e){if(n=ml(e),e=m.i(n,0,null),n=m.i(n,1,null),X.g(0,e))Ce.j(z(["zeroth"]));else{var l=xy(1e3,0>e?-e:e);if(an(l)<=an(h5)){var r=Mn.g(QN,Kf.h(l));r=GN(r,1);var u=ur(l);l=ri(u,100),u=Ji(u,100);var i=0u)var o=m.g(YL,u);else{o=ri(u,10);var h=Ji(u,10);o=0e?"minus ":null,oe(r)||oe(l)?oe(r)?l:[r,"th"].join(""):[r,", ",l].join("")].join("")]))}else yh(10,new P(null,5,[_r,0,be," ",ia,",",ua,3,at,!0],null),ce(new v(null,1,5,y,[e],null))),r=Ji(e,100),e=11r,r=Ji(r,10),Ce.j(z([r===1&&e?"st":r===2&&e?"nd":r===3&&e?"rd":"th"]))}return n}:function(n,e){if(e=ml(e),n=m.i(e,0,null),e=m.i(e,1,null),X.g(0,n))Ce.j(z(["zero"]));else{var l=xy(1e3,0>n?-n:n);an(l)<=an(h5)?(l=Mn.g(QN,l),l=GN(l,0),Ce.j(z([[0>n?"minus ":null,l].join("")]))):yh(10,new P(null,5,[_r,0,be," ",ia,",",ua,3,at,!0],null),ce(new v(null,1,5,y,[n],null)))}return e}}],null),new P(null,5,[Ft,"P",rt,vn,me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return function(t,n){n=x(at.h(t))?p1(n,-1):n,t=x(xt.h(t))?new v(null,2,5,y,["y","ies"],null):new v(null,2,5,y,["","s"],null);var e=ml(n);return n=m.i(e,0,null),e=m.i(e,1,null),Ce.j(z([X.g(n,1)?j(t):Rt(t)])),e}}],null),new P(null,5,[Ft,"C",rt,new P(null,1,[zQ,new v(null,2,5,y,[null,String],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(t){return x(at.h(t))?jtn:x(xt.h(t))?xtn:ktn}],null),new P(null,5,[Ft,"F",rt,new P(null,5,[ja,new v(null,2,5,y,[null,Number],null),xa,new v(null,2,5,y,[null,Number],null),Jm,new v(null,2,5,y,[0,Number],null),Ia,new v(null,2,5,y,[null,String],null),be,new v(null,2,5,y,[" ",String],null)],null),me,new ht(null,new P(null,1,[xt,null],null),null),bt,vn,ve,function(){return YY}],null),new P(null,5,[Ft,"E",rt,new P(null,7,[ja,new v(null,2,5,y,[null,Number],null),xa,new v(null,2,5,y,[null,Number],null),l5,new v(null,2,5,y,[null,Number],null),Jm,new v(null,2,5,y,[1,Number],null),Ia,new v(null,2,5,y,[null,String],null),be,new v(null,2,5,y,[" ",String],null),x8,new v(null,2,5,y,[null,String],null)],null),me,new ht(null,new P(null,1,[xt,null],null),null),bt,vn,ve,function(){return QY}],null),new P(null,5,[Ft,"G",rt,new P(null,7,[ja,new v(null,2,5,y,[null,Number],null),xa,new v(null,2,5,y,[null,Number],null),l5,new v(null,2,5,y,[null,Number],null),Jm,new v(null,2,5,y,[1,Number],null),Ia,new v(null,2,5,y,[null,String],null),be,new v(null,2,5,y,[" ",String],null),x8,new v(null,2,5,y,[null,String],null)],null),me,new ht(null,new P(null,1,[xt,null],null),null),bt,vn,ve,function(){return Otn}],null),new P(null,5,[Ft,"$",rt,new P(null,4,[xa,new v(null,2,5,y,[2,Number],null),Ch,new v(null,2,5,y,[1,Number],null),ja,new v(null,2,5,y,[0,Number],null),be,new v(null,2,5,y,[" ",String],null)],null),me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return Ctn}],null),new P(null,5,[Ft,"%",rt,new P(null,1,[Zg,new v(null,2,5,y,[1,Number],null)],null),me,Ke,bt,vn,ve,function(){return function(t,n){t=Zg.h(t);for(var e=0;e",u1,!0,Yu,Z7],null),ve,function(){return Dtn}],null),new P(null,5,[Ft,">",rt,vn,me,new ht(null,new P(null,1,[at,null],null),null),bt,vn,ve,function(){return null}],null),new P(null,5,[Ft,"^",rt,new P(null,3,[Kq,new v(null,2,5,y,[null,Number],null),Xq,new v(null,2,5,y,[null,Number],null),Bq,new v(null,2,5,y,[null,Number],null)],null),me,new ht(null,new P(null,1,[at,null],null),null),bt,vn,ve,function(){return function(t,n){var e=Kq.h(t),l=Xq.h(t),r=Bq.h(t),u=x(at.h(t))?E3:Sf;return x(x(e)?x(l)?r:l:e)?e<=l&&l<=r?new v(null,2,5,y,[u,n],null):n:x(x(e)?l:e)?X.g(e,l)?new v(null,2,5,y,[u,n],null):n:x(e)?X.g(e,0)?new v(null,2,5,y,[u,n],null):n:(x(at.h(t))?oe(qu.h(Hu.h(t))):oe(qu.h(n)))?new v(null,2,5,y,[u,n],null):n}}],null),new P(null,5,[Ft,"W",rt,vn,me,new ht(null,new P(null,4,[at,null,xt,null,lu,null,uf,null],null),null),bt,vn,ve,function(t){if(x(function(){var e=xt.h(t);return x(e)?e:at.h(t)}())){var n=D.g(x(xt.h(t))?new v(null,4,5,y,[GG,null,VQ,null],null):Yn,x(at.h(t))?new v(null,2,5,y,[uf,!0],null):Yn);return function(e,l){return l=ml(l),e=m.i(l,0,null),l=m.i(l,1,null),x(dn.i(sj,e,n))?new v(null,2,5,y,[Sf,l],null):l}}return function(e,l){return l=ml(l),e=m.i(l,0,null),l=m.i(l,1,null),x(Jl(e))?new v(null,2,5,y,[Sf,l],null):l}}],null),new P(null,5,[Ft,"_",rt,vn,me,new ht(null,new P(null,3,[at,null,xt,null,lu,null],null),null),bt,vn,ve,function(){return ztn}],null),new P(null,5,[Ft,"I",rt,new P(null,1,[Ch,new v(null,2,5,y,[0,Number],null)],null),me,new ht(null,new P(null,1,[at,null],null),null),bt,vn,ve,function(){return Vtn}],null)]),Zhn=/^([vV]|#|('.)|([+-]?\d+)|(?=,))/,bhn=new ht(null,new P(null,2,[kI,null,EI,null],null),null),ncn=new P(null,2,[":",at,"@",xt],null),tcn=function t(n){for(;;){if(oe(n))return!1;var e=uf.h(me.h(Zu.h(j(n))));if(x(e)||(e=Mr(t,j(ou.h(rt.h(j(n))))),e=x(e)?e:Mr(t,j(Yu.h(rt.h(j(n)))))),x(e))return!0;n=A(n)}},tl=qU(wI),xx=new P(null,6,[Bt,"'",wl,"#'",TG,"@",$3,"~",uG,"@",Crn,"~"],null);(function(){var t=tl("~<[~;~@{~w~^, ~:_~}~;]~:>");return function(){function n(l){var r=null;if(0");return function(){function n(l){var r=null;if(0");return function(){function n(l){var r=null;if(0");return function(){function n(l){var r=null;if(0");return function(){function n(l){var r=null;if(0");return function(){function r(i){var s=null;if(0"),Z1(wo,-(n.length-2)),xu(Fu);var u=t!=null?t.H&1||On===t.Wf?!0:t.H?!1:Qn(j$,t):Qn(j$,t),i=u&&!Y2(t);Jl(i?Qrn:J(t)),Nr()}finally{pt=l,Ot=e}}return null});zr(Xo,null,Zc);zr(Xo,Gt,XY);ff=fh;const mcn=function(t,n){var e=new rl,l=Qe,r=Fl;Qe=!0,Fl=function(u){return e.append(u)};try{ptn(TY(t,n))}finally{Fl=r,Qe=l}return M.h(e)},wcn=function(){var t=gl(vn),n=cn.g(t,eg),e=cn.g(t,ct),l=cn.g(t,dp),r=cn.g(t,rp),u=cn.g(t,Ar),i=cn.g(t,qs),s=cn.g(t,nq),a=cn.g(t,Qt),o=cn.g(t,Vr),h=cn.g(t,Cf),c=cn.g(t,lp),f=cn.g(t,B7),d=cn.g(t,Ns),C=cn.g(t,R7),I=cn.g(t,hL);t=cn.g(t,irn),a=x(a)?a:et.h(vn),o=Nt.j(z([vn,o])),l=Nt.j(z([Qhn,l])),t=Nt.j(z([Yhn,t]));n:for(var T=He(zc(t,new v(null,1,5,y,[Cf],null))),$=t;;){var G=j($);if(x(G)){var b=G;G=m.i(b,0,null),b=m.i(b,1,null),T=Vu.i(T,G,we(b)?b:new P(null,1,[ss,b],null)),$=rn($)}else{T=new P(null,2,[ap,ap.h(t),Io,ul(T)],null);break n}}return htn(a,u,d,e,T,t,o,c,f,r,l),fn.j(new P(null,5,[Ar,vn,Qt,a,eg,n,qs,i,KI,x(h)?h:C],null),Cf,x(h)?UN(z([h])):null,z([R7,x(C)?UN(z([C])):null,nq,x(s)?s:ctn,hL,I]))};Kw.coll;Kw.prefixColl;Kw.prefixEdge;Kw.prefixContainer;Kw.sameEdge;function dcn(t){return t.parent}function pcn(t){return t.isTop}function vcn(t){return pcn(t.type)}function $J(t){return t.selection.asSingle().ranges[0]}function Sx(t,n,e){switch(arguments.length){case 1:return xr(t);case 2:return xr(t).resolveInner(n);case 3:return xr(t).resolveInner(n,e)}}function NJ(t,n){const e=Sx(t,n,-1);return Sx(t,n,1),Sx(t,n),e}function r_(t,n){return vcn(t)?n:r_(dcn(t),n.concat(t))}function qJ(t,n){return t.doc.slice(n.from,n.to).toString()}function ycn(t,n){const e=r_(n,[]).filter(l=>t==l.to&&t==n.to);return e[e.length-1]||n}function LJ(t){const n=$J(t).from,e=NJ(t,n);return ycn(n,e)}let Ox=0;function WJ(t){const n=$J(t).from,e=r_(NJ(t,n),[]);return e.length===0?LJ(t):e[e.length-1]}function jcn(t){return qJ(t,LJ(t))}function xcn(t){return qJ(t,WJ(t))}let u_=wcn(),Pc="",co="",to=0;function oj(t,n,e){const l=t.state.doc.toString();co=l;const r=l.length;t.dispatch({changes:{from:0,to:r,insert:n},selection:{anchor:e,head:e}})}function i_(t,n){try{return mcn(t,n)}catch(e){return console.log(e),` +Error: `+e.message}}function kcn(t){co=t.state.doc.toString(),to=t.state.selection.main.head;const e=co.slice(0,to),l=co.slice(to,co.length);Pc=i_(u_,jcn(t.state));const r=e+" => "+Pc+" "+l;return oj(t,r,to),t.dispatch({selection:{anchor:to,head:to}}),!0}function Ut(t){Pc.length!=0&&(Pc="",oj(t,co,to))}function Scn(t){Ox=WJ(t.state).to;const n=t.state.doc.toString();to=t.state.selection.main.head,co=n;const e=co.slice(0,Ox),l=co.slice(Ox,co.length);Pc=i_(u_,xcn(t.state));const r=e+" => "+Pc+" "+l;return oj(t,r,to),!0}function Ocn(t){const n=t.state.doc.toString();Pc=i_(u_,t.state.doc.text.join(" "));const e=n+` + => `+Pc;return oj(t,e,to),!0}const Ccn=Array.from(Array(58)).map((t,n)=>n+65),QL=Ccn.map(t=>String.fromCharCode(t));let QR=[];for(let t=0;tn=>{let{pos:e,unit:l,node:r,state:u,baseIndent:i,textAfter:s}=n;if(t.prop(Ecn)){let a=n.column(r.firstChild.to);return t.name=="List"&&["NS","DefLike","Operator"].includes(r.firstChild.nextSibling.type.name)?a+1:a}else return 0}),EV.add({["Vector Map List"]:FX})]}),languageData:{commentTokens:{line:";;"}}});function Pcn(){return new LX(Rcn,[Acn])}let Icn=Oe.create({doc:"(map inc (range 5))",extensions:[ib,Pcn()]});new kt({state:Icn,parent:document.querySelector("#app")}).focus();let _cn="Alt+Enter = Eval top-level form",Yh="Key bindings:,Shift+Enter = Eval cell,"+_cn+",Ctrl/Cmd+Enter = Eval at cursor";Yh=Yh.split(",");for(let t=0;t";Yh=Yh.join("");document.getElementById("keymap").innerHTML=Yh; diff --git a/dist/index.html b/dist/index.html index 3c5baab..a13585b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ Vite App - + diff --git a/package.json b/package.json index 17c041c..e7cf977 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lang-clojure-eval", - "version": "0.0.13", + "version": "0.0.14", "author": "Bobbi Towers ", "description": "Lezer-based Clojure Codemirror 6 extension with live evaluation", "main": "dist/index.cjs", diff --git a/src/eval-region.js b/src/eval-region.js index 1365517..cee0d10 100644 --- a/src/eval-region.js +++ b/src/eval-region.js @@ -131,13 +131,6 @@ function updateEditor(view, text, pos) { }) } -function splitResult(s) { - if (s.length > 100) { - return "\n" + s.substring(0, 100) + "..." + s.substring(s.length -2) - } - return s -} - function tryEval(ctx, s) { try { return evalString(ctx, s) @@ -153,7 +146,7 @@ function evalAtCursor(view) { posBeforeEval = view.state.selection.main.head const codeBeforeCursor = codeBeforeEval.slice(0, posBeforeEval) const codeAfterCursor = codeBeforeEval.slice(posBeforeEval, codeBeforeEval.length) - evalResult = splitResult(tryEval(ctx, cursorNodeString(view.state))) + evalResult = tryEval(ctx, cursorNodeString(view.state)) const codeWithResult = codeBeforeCursor + " => " + evalResult + " " + codeAfterCursor updateEditor(view, codeWithResult, posBeforeEval) view.dispatch({selection: {anchor: posBeforeEval, head: posBeforeEval}}) @@ -174,7 +167,7 @@ function evalTopLevel(view) { codeBeforeEval = doc const codeBeforeFormEnd = codeBeforeEval.slice(0, posAtFormEnd) const codeAfterFormEnd = codeBeforeEval.slice(posAtFormEnd, codeBeforeEval.length) - evalResult = splitResult(tryEval(ctx, topLevelString(view.state))) + evalResult = tryEval(ctx, topLevelString(view.state)) const codeWithResult = codeBeforeFormEnd + " => " + evalResult + " " + codeAfterFormEnd updateEditor(view, codeWithResult, posBeforeEval) return true @@ -182,7 +175,7 @@ function evalTopLevel(view) { function evalCell(view) { const doc = view.state.doc.toString() - evalResult = splitResult(tryEval(ctx, view.state.doc.text.join(" "))) + evalResult = tryEval(ctx, view.state.doc.text.join(" ")) const codeWithResult = doc + "\n" + " => " + evalResult updateEditor(view, codeWithResult, posBeforeEval) //console.log("evalCell>", evalString(ctx, view.state.doc.text.join(" ")))