"use strict";var Xt=require("node:url"),re=require("esbuild"),jt=require("node:crypto"),x=require("node:fs"),T=require("node:path"),Pt=require("node:os"),Tt=require("./temporary-directory-B83uKxJF.cjs");const Je=i=>jt.createHash("sha1").update(i).digest("hex"),Re=44,$t=59,ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xe=new Uint8Array(64),Fe=new Uint8Array(128);for(let i=0;i>>=1,g&&(s=-2147483648|-s),A[n]+=s,e}function Ge(i,e,A){return e>=A?!1:i.charCodeAt(e)!==Re}function Vt(i){i.sort(zt)}function zt(i,e){return i[0]-e[0]}function Ue(i){const e=new Int32Array(5),A=1024*16,n=A-36,s=new Uint8Array(A),a=s.subarray(0,n);let c=0,g="";for(let u=0;u0&&(c===A&&(g+=de.decode(s),c=0),s[c++]=$t),f.length!==0){e[0]=0;for(let l=0;ln&&(g+=de.decode(a),s.copyWithin(0,n,c),c-=n),l>0&&(s[c++]=Re),c=W(s,c,e,r,0),r.length!==1&&(c=W(s,c,e,r,1),c=W(s,c,e,r,2),c=W(s,c,e,r,3),r.length!==4&&(c=W(s,c,e,r,4)))}}}return g+de.decode(s.subarray(0,c))}function W(i,e,A,n,s){const a=n[s];let c=a-A[s];A[s]=a,c=c<0?-c<<1|1:c<<1;do{let g=c&31;c>>>=5,c>0&&(g|=32),i[e++]=xe[g]}while(c>0);return e}class ae{constructor(e){this.bits=e instanceof ae?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class ee{constructor(e,A,n){this.start=e,this.end=A,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new ee(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.startglobalThis.btoa(unescape(encodeURIComponent(i))):typeof Buffer=="function"?i=>Buffer.from(i,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const tA=eA();let AA=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Ue(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+tA(this.toString())}};function rA(i){const e=i.split(` `),A=e.filter(a=>/^\t+/.test(a)),n=e.filter(a=>/^ {2,}/.test(a));if(A.length===0&&n.length===0)return null;if(A.length>=n.length)return" ";const s=n.reduce((a,c)=>{const g=/^ +/.exec(c)[0].length;return Math.min(g,a)},1/0);return new Array(s+1).join(" ")}function nA(i,e){const A=i.split(/[/\\]/),n=e.split(/[/\\]/);for(A.pop();A[0]===n[0];)A.shift(),n.shift();if(A.length){let s=A.length;for(;s--;)A[s]=".."}return A.concat(n).join("/")}const iA=Object.prototype.toString;function sA(i){return iA.call(i)==="[object Object]"}function Me(i){const e=i.split(` `),A=[];for(let n=0,s=0;n>1;s=0&&a>c;){const f=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&f.push(s),this.rawSegments.push(f),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,g=c,c=A.indexOf(` `,c+1)}const u=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&u.push(s),this.rawSegments.push(u),this.advance(A.slice(g+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(A));this.pending=null}addUneditedChunk(e,A,n,s,a){let c=A.start,g=!0,u=!1;for(;c1){for(let n=0;n{const g=a(c.start);c.intro.length&&s.advance(c.intro),c.edited?s.addEdit(A,c.content,g,c.storeName?n.indexOf(c.original):-1):s.addUneditedChunk(A,c,this.original,g,this.sourcemapLocations),c.outro.length&&s.advance(c.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?nA(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:n,mappings:s.raw,x_google_ignoreList:this.ignoreList?[A]:void 0}}generateMap(e){return new AA(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=rA(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,A){const n=/^[^\r\n]/gm;if(sA(e)&&(A=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;A=A||{};const s={};A.exclude&&(typeof A.exclude[0]=="number"?[A.exclude]:A.exclude).forEach(l=>{for(let r=l[0];ra?`${e}${f}`:(a=!0,f);this.intro=this.intro.replace(n,c);let g=0,u=this.firstChunk;for(;u;){const f=u.end;if(u.edited)s[g]||(u.content=u.content.replace(n,c),u.content.length&&(a=u.content[u.content.length-1]===` `));else for(g=u.start;g=e&&n<=A)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(A),this._split(n);const s=this.byStart[e],a=this.byEnd[A],c=s.previous,g=a.next,u=this.byStart[n];if(!u&&a===this.lastChunk)return this;const f=u?u.previous:this.lastChunk;return c&&(c.next=g),g&&(g.previous=c),f&&(f.next=s),u&&(u.previous=a),s.previous||(this.firstChunk=a.next),a.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=f,a.next=u||null,f||(this.firstChunk=s),u||(this.lastChunk=a),this}overwrite(e,A,n,s){return s=s||{},this.update(e,A,n,{...s,overwrite:!s.contentOnly})}update(e,A,n,s){if(typeof n!="string")throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;A<0;)A+=this.original.length;if(A>this.original.length)throw new Error("end is out of bounds");if(e===A)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(A),s===!0&&(_.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),_.storeName=!0),s={storeName:!0});const a=s!==void 0?s.storeName:!1,c=s!==void 0?s.overwrite:!1;if(a){const f=this.original.slice(e,A);Object.defineProperty(this.storedNames,f,{writable:!0,value:!0,enumerable:!0})}const g=this.byStart[e],u=this.byEnd[A];if(g){let f=g;for(;f!==u;){if(f.next!==this.byStart[f.end])throw new Error("Cannot overwrite across a split point");f=f.next,f.edit("",!1)}g.edit(n,a,!c)}else{const f=new ee(e,A,"").edit(n,a);u.next=f,f.previous=u}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,A){if(typeof A!="string")throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.prependLeft(A):this.intro=A+this.intro,this}prependRight(e,A){if(typeof A!="string")throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.prependRight(A):this.outro=A+this.outro,this}remove(e,A){for(;e<0;)e+=this.original.length;for(;A<0;)A+=this.original.length;if(e===A)return this;if(e<0||A>this.original.length)throw new Error("Character is out of bounds");if(e>A)throw new Error("end must be greater than start");this._split(e),this._split(A);let n=this.byStart[e];for(;n;)n.intro="",n.outro="",n.edit(""),n=A>n.end?this.byStart[n.end]:null;return this}reset(e,A){for(;e<0;)e+=this.original.length;for(;A<0;)A+=this.original.length;if(e===A)return this;if(e<0||A>this.original.length)throw new Error("Character is out of bounds");if(e>A)throw new Error("end must be greater than start");this._split(e),this._split(A);let n=this.byStart[e];for(;n;)n.reset(),n=A>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(Z);if(e!==-1)return this.outro.substr(e+1);let A=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(e=n.outro.lastIndexOf(Z),e!==-1)return n.outro.substr(e+1)+A;A=n.outro+A}if(n.content.length>0){if(e=n.content.lastIndexOf(Z),e!==-1)return n.content.substr(e+1)+A;A=n.content+A}if(n.intro.length>0){if(e=n.intro.lastIndexOf(Z),e!==-1)return n.intro.substr(e+1)+A;A=n.intro+A}}while(n=n.previous);return e=this.intro.lastIndexOf(Z),e!==-1?this.intro.substr(e+1)+A:this.intro+A}slice(e=0,A=this.original.length){for(;e<0;)e+=this.original.length;for(;A<0;)A+=this.original.length;let n="",s=this.firstChunk;for(;s&&(s.start>e||s.end<=e);){if(s.start=A)return n;s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const a=s;for(;s;){s.intro&&(a!==s||s.start===e)&&(n+=s.intro);const c=s.start=A;if(c&&s.edited&&s.end!==A)throw new Error(`Cannot use replaced character ${A} as slice end anchor.`);const g=a===s?e-s.start:0,u=c?s.content.length+A-s.end:s.content.length;if(n+=s.content.slice(g,u),s.outro&&(!c||s.end===A)&&(n+=s.outro),c)break;s=s.next}return n}snip(e,A){const n=this.clone();return n.remove(0,e),n.remove(A,n.original.length),n}_split(e){if(this.byStart[e]||this.byEnd[e])return;let A=this.lastSearchedChunk;const n=e>A.end;for(;A;){if(A.contains(e))return this._splitChunk(A,e);A=n?this.byStart[A.end]:this.byEnd[A.start]}}_splitChunk(e,A){if(e.edited&&e.content.length){const s=Me(this.original)(A);throw new Error(`Cannot split a chunk that has already been edited (${s.line}:${s.column} \u2013 "${e.original}")`)}const n=e.split(A);return this.byEnd[A]=e,this.byStart[A]=n,this.byEnd[n.end]=n,e===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,A=this.firstChunk;for(;A;)e+=A.toString(),A=A.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,A=0;do A+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return A}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const A=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(A,""),this.outro.length)return!0;let n=this.lastChunk;do{const s=n.end,a=n.trimEnd(A);if(n.end!==s&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),a)return!0;n=n.previous}while(n);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const A=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(A,""),this.intro.length)return!0;let n=this.firstChunk;do{const s=n.end,a=n.trimStart(A);if(n.end!==s&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),a)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,A){function n(a,c){return typeof A=="string"?A.replace(/\$(\$|&|\d+)/g,(g,u)=>u==="$"?"$":u==="&"?a[0]:+u{if(c.index!=null){const g=n(c,this.original);g!==c[0]&&this.overwrite(c.index,c.index+c[0].length,g)}});else{const a=this.original.match(e);if(a&&a.index!=null){const c=n(a,this.original);c!==a[0]&&this.overwrite(a.index,a.index+a[0].length,c)}}return this}_replaceString(e,A){const{original:n}=this,s=n.indexOf(e);return s!==-1&&this.overwrite(s,s+e.length,A),this}replace(e,A){return typeof e=="string"?this._replaceString(e,A):this._replaceRegexp(e,A)}_replaceAllString(e,A){const{original:n}=this,s=e.length;for(let a=n.indexOf(e);a!==-1;a=n.indexOf(e,a+s))n.slice(a,a+s)!==A&&this.overwrite(a,a+s,A);return this}replaceAll(e,A){if(typeof e=="string")return this._replaceAllString(e,A);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,A)}}var Ye;(function(i){i[i.Static=1]="Static",i[i.Dynamic=2]="Dynamic",i[i.ImportMeta=3]="ImportMeta",i[i.StaticSourcePhase=4]="StaticSourcePhase",i[i.DynamicSourcePhase=5]="DynamicSourcePhase"})(Ye||(Ye={}));const cA=new Uint8Array(new Uint16Array([1]).buffer)[0]===1;function qe(i,e="@"){if(!d)return Oe.then(()=>qe(i));const A=i.length+1,n=(d.__heap_base.value||d.__heap_base)+4*A-d.memory.buffer.byteLength;n>0&&d.memory.grow(Math.ceil(n/65536));const s=d.sa(A-1);if((cA?hA:QA)(i,new Uint16Array(d.memory.buffer,s,A)),!d.parse())throw Object.assign(new Error(`Parse error ${e}:${i.slice(0,d.e()).split(` `).length}:${d.e()-i.lastIndexOf(` `,d.e()-1)}`),{idx:d.e()});const a=[],c=[];for(;d.ri();){const u=d.is(),f=d.ie(),l=d.it(),r=d.ai(),D=d.id(),y=d.ss(),k=d.se();let S;d.ip()&&(S=g(i.slice(D===-1?u-1:u,D===-1?f+1:f))),a.push({n:S,t:l,s:u,e:f,ss:y,se:k,d:D,a:r})}for(;d.re();){const u=d.es(),f=d.ee(),l=d.els(),r=d.ele(),D=i.slice(u,f),y=D[0],k=l<0?void 0:i.slice(l,r),S=k?k[0]:"";c.push({s:u,e:f,ls:l,le:r,n:y==='"'||y==="'"?g(D):D,ln:S==='"'||S==="'"?g(k):k})}function g(u){try{return(0,eval)(u)}catch{}}return[a,c,!!d.f(),!!d.ms()]}function QA(i,e){const A=i.length;let n=0;for(;n>>8}}function hA(i,e){const A=i.length;let n=0;for(;ni.charCodeAt(0)))).then(WebAssembly.instantiate).then(({exports:i})=>{d=i});var we;let m,ne,Ie,V=2<<19;const _e=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(i,e){const A=i.length;let n=0;for(;n>>8}},lA="xportmportlassetaourceromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileforifcatcfinallels";let K,He,w;function uA(i,e="@"){K=i,He=e;const A=2*K.length+(2<<18);if(A>V||!m){for(;A>V;)V*=2;ne=new ArrayBuffer(V),_e(lA,new Uint16Array(ne,16,110)),m=function(c,g,u){var f=new c.Int8Array(u),l=new c.Int16Array(u),r=new c.Int32Array(u),D=new c.Uint8Array(u),y=new c.Uint16Array(u),k=1040;function S(){var t=0,o=0,h=0,Q=0,C=0,B=0,I=0;I=k,k=k+10240|0,f[804]=1,f[803]=0,l[399]=0,l[400]=0,r[69]=r[2],f[805]=0,r[68]=0,f[802]=0,r[70]=I+2048,r[71]=I,f[806]=0,t=(r[3]|0)+-2|0,r[72]=t,o=t+(r[66]<<1)|0,r[73]=o;e:for(;;){if(h=t+2|0,r[72]=h,t>>>0>=o>>>0){Q=18;break}t:do switch(l[h>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(!(l[400]|0)&&j(h)|0&&!(L(t+4|0,16,10)|0)&&(v(),(f[804]|0)==0)){Q=9;break e}else Q=17;break}case 105:{j(h)|0&&!(L(t+4|0,26,10)|0)&&Y(),Q=17;break}case 59:{Q=17;break}case 47:switch(l[t+4>>1]|0){case 47:{ue();break t}case 42:{he(1);break t}default:{Q=16;break e}}default:{Q=16;break e}}while(!1);(Q|0)==17&&(Q=0,r[69]=r[72]),t=r[72]|0,o=r[73]|0}(Q|0)==9?(t=r[72]|0,r[69]=t,Q=19):(Q|0)==16?(f[804]=0,r[72]=t,Q=19):(Q|0)==18&&(f[802]|0?t=0:(t=h,Q=19));do if((Q|0)==19){e:for(;;){if(o=t+2|0,r[72]=o,t>>>0>=(r[73]|0)>>>0){Q=92;break}t:do switch(l[o>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{!(l[400]|0)&&j(o)|0&&!(L(t+4|0,16,10)|0)&&v(),Q=91;break}case 105:{j(o)|0&&!(L(t+4|0,26,10)|0)&&Y(),Q=91;break}case 99:{j(o)|0&&!(L(t+4|0,36,8)|0)&&O(l[t+12>>1]|0)|0&&(f[806]=1),Q=91;break}case 40:{h=r[70]|0,t=l[400]|0,Q=t&65535,r[h+(Q<<3)>>2]=1,o=r[69]|0,l[400]=t+1<<16>>16,r[h+(Q<<3)+4>>2]=o,Q=91;break}case 41:{if(o=l[400]|0,!(o<<16>>16)){Q=36;break e}h=o+-1<<16>>16,l[400]=h,Q=l[399]|0,o=Q&65535,Q<<16>>16&&(r[(r[70]|0)+((h&65535)<<3)>>2]|0)==5&&(o=r[(r[71]|0)+(o+-1<<2)>>2]|0,h=o+4|0,r[h>>2]|0||(r[h>>2]=(r[69]|0)+2),r[o+12>>2]=t+4,l[399]=Q+-1<<16>>16),Q=91;break}case 123:{Q=r[69]|0,h=r[63]|0,t=Q;do if((l[Q>>1]|0)==41&(h|0)!=0&&(r[h+4>>2]|0)==(Q|0))if(o=r[64]|0,r[63]=o,o){r[o+32>>2]=0;break}else{r[59]=0;break}while(!1);h=r[70]|0,o=l[400]|0,Q=o&65535,r[h+(Q<<3)>>2]=f[806]|0?6:2,l[400]=o+1<<16>>16,r[h+(Q<<3)+4>>2]=t,f[806]=0,Q=91;break}case 125:{if(t=l[400]|0,!(t<<16>>16)){Q=49;break e}h=r[70]|0,Q=t+-1<<16>>16,l[400]=Q,(r[h+((Q&65535)<<3)>>2]|0)==4&&ye(),Q=91;break}case 39:{J(39),Q=91;break}case 34:{J(34),Q=91;break}case 47:switch(l[t+4>>1]|0){case 47:{ue();break t}case 42:{he(1);break t}default:{t=r[69]|0,o=l[t>>1]|0;A:do if(!(pt(o)|0))o<<16>>16==41?(h=l[400]|0,Ne(r[(r[70]|0)+((h&65535)<<3)+4>>2]|0)|0||(Q=65)):Q=64;else switch(o<<16>>16){case 46:if(((l[t+-2>>1]|0)+-48&65535)<10){Q=64;break A}else break A;case 43:if((l[t+-2>>1]|0)==43){Q=64;break A}else break A;case 45:if((l[t+-2>>1]|0)==45){Q=64;break A}else break A;default:break A}while(!1);(Q|0)==64&&(h=l[400]|0,Q=65);A:do if((Q|0)==65){if(Q=0,h<<16>>16&&(C=r[70]|0,B=(h&65535)+-1|0,o<<16>>16==102?(r[C+(B<<3)>>2]|0)==1:0)){if((l[t+-2>>1]|0)==111&&Ne(r[C+(B<<3)+4>>2]|0)|0)break}else Q=69;if((Q|0)==69&&o<<16>>16==125&&(Q=r[70]|0,h=h&65535,kt(r[Q+(h<<3)+4>>2]|0)|0||(r[Q+(h<<3)>>2]|0)==6))break;if(!(wt(t)|0)){switch(o<<16>>16){case 0:break A;case 47:{if(f[805]|0)break A;break}default:}if(Q=r[65]|0,Q|0&&t>>>0>=(r[Q>>2]|0)>>>0&&t>>>0<=(r[Q+4>>2]|0)>>>0){Qe(),f[805]=0,Q=91;break t}h=r[3]|0;do{if(t>>>0<=h>>>0)break;t=t+-2|0,r[69]=t,o=l[t>>1]|0}while(!(le(o)|0));if(Ae(o)|0){do{if(t>>>0<=h>>>0)break;t=t+-2|0,r[69]=t}while(Ae(l[t>>1]|0)|0);if(mt(t)|0){Qe(),f[805]=0,Q=91;break t}}f[805]=1,Q=91;break t}}while(!1);Qe(),f[805]=0,Q=91;break t}}case 96:{h=r[70]|0,o=l[400]|0,Q=o&65535,r[h+(Q<<3)+4>>2]=r[69],l[400]=o+1<<16>>16,r[h+(Q<<3)>>2]=3,ye(),Q=91;break}default:Q=91}while(!1);(Q|0)==91&&(Q=0,r[69]=r[72]),t=r[72]|0}if((Q|0)==36){R(),t=0;break}else if((Q|0)==49){R(),t=0;break}else if((Q|0)==92){t=f[802]|0?0:(l[399]|l[400])<<16>>16==0;break}}while(!1);return k=I,t|0}function v(){var t=0,o=0,h=0,Q=0,C=0,B=0,I=0,U=0,ge=0,Ce=0,Be=0,Ee=0,p=0,b=0;U=r[72]|0,ge=r[65]|0,b=U+12|0,r[72]=b,h=E(1)|0,t=r[72]|0,(t|0)==(b|0)&&!(te(h)|0)||(p=3);e:do if((p|0)==3){t:do switch(h<<16>>16){case 123:{for(r[72]=t+2,t=E(1)|0,o=r[72]|0;;){if(P(t)|0?(J(t),t=(r[72]|0)+2|0,r[72]=t):(F(t)|0,t=r[72]|0),E(1)|0,t=Ke(o,t)|0,t<<16>>16==44&&(r[72]=(r[72]|0)+2,t=E(1)|0),t<<16>>16==125){p=15;break}if(b=o,o=r[72]|0,(o|0)==(b|0)){p=12;break}if(o>>>0>(r[73]|0)>>>0){p=14;break}}if((p|0)==12){R();break e}else if((p|0)==14){R();break e}else if((p|0)==15){f[803]=1,r[72]=(r[72]|0)+2;break t}break}case 42:{r[72]=t+2,E(1)|0,b=r[72]|0,Ke(b,b)|0;break}default:{switch(f[804]=0,h<<16>>16){case 100:{switch(U=t+14|0,r[72]=U,(E(1)|0)<<16>>16){case 97:{o=r[72]|0,!(L(o+2|0,66,8)|0)&&(C=o+10|0,Ae(l[C>>1]|0)|0)&&(r[72]=C,E(0)|0,p=22);break}case 102:{p=22;break}case 99:{o=r[72]|0,!(L(o+2|0,36,8)|0)&&(Q=o+10|0,b=l[Q>>1]|0,O(b)|0|b<<16>>16==123)&&(r[72]=Q,B=E(1)|0,B<<16>>16!=123)&&(Ee=B,p=31);break}default:}A:do if((p|0)==22&&(I=r[72]|0,(L(I+2|0,74,14)|0)==0)){if(h=I+16|0,o=l[h>>1]|0,!(O(o)|0))switch(o<<16>>16){case 40:case 42:break;default:break A}r[72]=h,o=E(1)|0,o<<16>>16==42&&(r[72]=(r[72]|0)+2,o=E(1)|0),o<<16>>16!=40&&(Ee=o,p=31)}while(!1);if((p|0)==31&&(Ce=r[72]|0,F(Ee)|0,Be=r[72]|0,Be>>>0>Ce>>>0)){q(t,U,Ce,Be),r[72]=(r[72]|0)+-2;break e}q(t,U,0,0),r[72]=t+12;break e}case 97:{r[72]=t+10,E(0)|0,t=r[72]|0,p=35;break}case 102:{p=35;break}case 99:{if(!(L(t+2|0,36,8)|0)&&(o=t+10|0,le(l[o>>1]|0)|0)){r[72]=o,b=E(1)|0,p=r[72]|0,F(b)|0,b=r[72]|0,q(p,b,p,b),r[72]=(r[72]|0)+-2;break e}t=t+4|0,r[72]=t;break}case 108:case 118:break;default:break e}if((p|0)==35){r[72]=t+16,t=E(1)|0,t<<16>>16==42&&(r[72]=(r[72]|0)+2,t=E(1)|0),p=r[72]|0,F(t)|0,b=r[72]|0,q(p,b,p,b),r[72]=(r[72]|0)+-2;break e}r[72]=t+6,f[804]=0,h=E(1)|0,t=r[72]|0,h=(F(h)|0|32)<<16>>16==123,Q=r[72]|0,h&&(r[72]=Q+2,b=E(1)|0,t=r[72]|0,F(b)|0);A:for(;o=r[72]|0,(o|0)!=(t|0);){if(q(t,o,t,o),o=E(1)|0,h)switch(o<<16>>16){case 93:case 125:break e;default:}if(t=r[72]|0,o<<16>>16!=44){p=51;break}switch(r[72]=t+2,o=E(1)|0,t=r[72]|0,o<<16>>16){case 91:case 123:{p=51;break A}default:}F(o)|0}if((p|0)==51&&(r[72]=t+-2),!h)break e;r[72]=Q+-2;break e}}while(!1);if(b=(E(1)|0)<<16>>16==102,t=r[72]|0,b&&!(L(t+2|0,60,6)|0))for(r[72]=t+8,H(U,E(1)|0,0),t=ge|0?ge+16|0:240;;){if(t=r[t>>2]|0,!t)break e;r[t+12>>2]=0,r[t+8>>2]=0,t=t+16|0}r[72]=t+-2}while(!1)}function Y(){var t=0,o=0,h=0,Q=0,C=0,B=0,I=0;C=r[72]|0,h=C+12|0,r[72]=h,Q=E(1)|0,o=r[72]|0;e:do if(Q<<16>>16!=46)Q<<16>>16==115&o>>>0>h>>>0?!(L(o+2|0,50,10)|0)&&(t=o+12|0,O(l[t>>1]|0)|0)?B=14:(o=6,h=0,B=46):(t=Q,h=0,B=15);else switch(r[72]=o+2,(E(1)|0)<<16>>16){case 109:{if(t=r[72]|0,L(t+2|0,44,6)|0||(o=r[69]|0,!(fe(o)|0)&&(l[o>>1]|0)==46))break e;ce(C,C,t+8|0,2);break e}case 115:{if(t=r[72]|0,L(t+2|0,50,10)|0||(o=r[69]|0,!(fe(o)|0)&&(l[o>>1]|0)==46))break e;t=t+12|0,B=14;break e}default:break e}while(!1);(B|0)==14&&(r[72]=t,t=E(1)|0,h=1,B=15);e:do if((B|0)==15)switch(t<<16>>16){case 40:{if(o=r[70]|0,I=l[400]|0,Q=I&65535,r[o+(Q<<3)>>2]=5,t=r[72]|0,l[400]=I+1<<16>>16,r[o+(Q<<3)+4>>2]=t,(l[r[69]>>1]|0)==46)break e;switch(r[72]=t+2,o=E(1)|0,ce(C,r[72]|0,0,t),h?(t=r[63]|0,r[t+28>>2]=5):t=r[63]|0,C=r[71]|0,I=l[399]|0,l[399]=I+1<<16>>16,r[C+((I&65535)<<2)>>2]=t,o<<16>>16){case 39:{J(39);break}case 34:{J(34);break}default:{r[72]=(r[72]|0)+-2;break e}}switch(t=(r[72]|0)+2|0,r[72]=t,(E(1)|0)<<16>>16){case 44:{r[72]=(r[72]|0)+2,E(1)|0,C=r[63]|0,r[C+4>>2]=t,I=r[72]|0,r[C+16>>2]=I,f[C+24>>0]=1,r[72]=I+-2;break e}case 41:{l[400]=(l[400]|0)+-1<<16>>16,I=r[63]|0,r[I+4>>2]=t,r[I+12>>2]=(r[72]|0)+2,f[I+24>>0]=1,l[399]=(l[399]|0)+-1<<16>>16;break e}default:{r[72]=(r[72]|0)+-2;break e}}}case 123:{if(h){o=12,h=1,B=46;break e}if(t=r[72]|0,l[400]|0){r[72]=t+-2;break e}for(;!(t>>>0>=(r[73]|0)>>>0);){if(t=E(1)|0,P(t)|0)J(t);else if(t<<16>>16==125){B=36;break}t=(r[72]|0)+2|0,r[72]=t}if((B|0)==36&&(r[72]=(r[72]|0)+2),I=(E(1)|0)<<16>>16==102,t=r[72]|0,I&&L(t+2|0,60,6)|0){R();break e}if(r[72]=t+8,t=E(1)|0,P(t)|0){H(C,t,0);break e}else{R();break e}}default:{if(h){o=12,h=1,B=46;break e}switch(t<<16>>16){case 42:case 39:case 34:{h=0,B=48;break e}default:{o=6,h=0,B=46;break e}}}}while(!1);(B|0)==46&&(t=r[72]|0,(t|0)==(C+(o<<1)|0)?r[72]=t+-2:B=48);do if((B|0)==48){if(l[400]|0){r[72]=(r[72]|0)+-2;break}for(t=r[73]|0,o=r[72]|0;;){if(o>>>0>=t>>>0){B=55;break}if(Q=l[o>>1]|0,P(Q)|0){B=53;break}I=o+2|0,r[72]=I,o=I}if((B|0)==53){H(C,Q,h);break}else if((B|0)==55){R();break}}while(!1)}function H(t,o,h){t=t|0,o=o|0,h=h|0;var Q=0,C=0;switch(Q=(r[72]|0)+2|0,o<<16>>16){case 39:{J(39),C=5;break}case 34:{J(34),C=5;break}default:R()}do if((C|0)==5){if(ce(t,Q,r[72]|0,1),h&&(r[(r[63]|0)+28>>2]=4),r[72]=(r[72]|0)+2,o=E(0)|0,h=o<<16>>16==97,h?(Q=r[72]|0,L(Q+2|0,88,10)|0&&(C=13)):(Q=r[72]|0,o<<16>>16==119&&(l[Q+2>>1]|0)==105&&(l[Q+4>>1]|0)==116&&(l[Q+6>>1]|0)==104||(C=13)),(C|0)==13){r[72]=Q+-2;break}if(r[72]=Q+((h?6:4)<<1),(E(1)|0)<<16>>16!=123){r[72]=Q;break}h=r[72]|0,o=h;e:for(;;){switch(r[72]=o+2,o=E(1)|0,o<<16>>16){case 39:{J(39),r[72]=(r[72]|0)+2,o=E(1)|0;break}case 34:{J(34),r[72]=(r[72]|0)+2,o=E(1)|0;break}default:o=F(o)|0}if(o<<16>>16!=58){C=22;break}switch(r[72]=(r[72]|0)+2,(E(1)|0)<<16>>16){case 39:{J(39);break}case 34:{J(34);break}default:{C=26;break e}}switch(r[72]=(r[72]|0)+2,(E(1)|0)<<16>>16){case 125:{C=31;break e}case 44:break;default:{C=30;break e}}if(r[72]=(r[72]|0)+2,(E(1)|0)<<16>>16==125){C=31;break}o=r[72]|0}if((C|0)==22){r[72]=Q;break}else if((C|0)==26){r[72]=Q;break}else if((C|0)==30){r[72]=Q;break}else if((C|0)==31){C=r[63]|0,r[C+16>>2]=h,r[C+12>>2]=(r[72]|0)+2;break}}while(!1)}function wt(t){t=t|0;e:do switch(l[t>>1]|0){case 100:switch(l[t+-2>>1]|0){case 105:{t=N(t+-4|0,98,2)|0;break e}case 108:{t=N(t+-4|0,102,3)|0;break e}default:{t=0;break e}}case 101:switch(l[t+-2>>1]|0){case 115:switch(l[t+-4>>1]|0){case 108:{t=X(t+-6|0,101)|0;break e}case 97:{t=X(t+-6|0,99)|0;break e}default:{t=0;break e}}case 116:{t=N(t+-4|0,108,4)|0;break e}case 117:{t=N(t+-4|0,116,6)|0;break e}default:{t=0;break e}}case 102:{if((l[t+-2>>1]|0)==111&&(l[t+-4>>1]|0)==101)switch(l[t+-6>>1]|0){case 99:{t=N(t+-8|0,128,6)|0;break e}case 112:{t=N(t+-8|0,140,2)|0;break e}default:{t=0;break e}}else t=0;break}case 107:{t=N(t+-2|0,144,4)|0;break}case 110:{t=t+-2|0,X(t,105)|0?t=1:t=N(t,152,5)|0;break}case 111:{t=X(t+-2|0,100)|0;break}case 114:{t=N(t+-2|0,162,7)|0;break}case 116:{t=N(t+-2|0,176,4)|0;break}case 119:switch(l[t+-2>>1]|0){case 101:{t=X(t+-4|0,110)|0;break e}case 111:{t=N(t+-4|0,184,3)|0;break e}default:{t=0;break e}}default:t=0}while(!1);return t|0}function ye(){var t=0,o=0,h=0,Q=0;o=r[73]|0,h=r[72]|0;e:for(;;){if(t=h+2|0,h>>>0>=o>>>0){o=10;break}switch(l[t>>1]|0){case 96:{o=7;break e}case 36:{if((l[h+4>>1]|0)==123){o=6;break e}break}case 92:{t=h+4|0;break}default:}h=t}(o|0)==6?(t=h+4|0,r[72]=t,o=r[70]|0,Q=l[400]|0,h=Q&65535,r[o+(h<<3)>>2]=4,l[400]=Q+1<<16>>16,r[o+(h<<3)+4>>2]=t):(o|0)==7?(r[72]=t,h=r[70]|0,Q=(l[400]|0)+-1<<16>>16,l[400]=Q,(r[h+((Q&65535)<<3)>>2]|0)!=3&&R()):(o|0)==10&&(r[72]=t,R())}function E(t){t=t|0;var o=0,h=0,Q=0;h=r[72]|0;e:do{o=l[h>>1]|0;t:do if(o<<16>>16!=47)if(t){if(O(o)|0)break;break e}else{if(Ae(o)|0)break;break e}else switch(l[h+2>>1]|0){case 47:{ue();break t}case 42:{he(t);break t}default:{o=47;break e}}while(!1);Q=r[72]|0,h=Q+2|0,r[72]=h}while(Q>>>0<(r[73]|0)>>>0);return o|0}function ce(t,o,h,Q){t=t|0,o=o|0,h=h|0,Q=Q|0;var C=0,B=0;B=r[67]|0,r[67]=B+36,C=r[63]|0,r[(C|0?C+32|0:236)>>2]=B,r[64]=C,r[63]=B,r[B+8>>2]=t,(Q|0)==2?(t=3,C=h):(C=(Q|0)==1,t=C?1:2,C=C?h+2|0:0),r[B+12>>2]=C,r[B+28>>2]=t,r[B>>2]=o,r[B+4>>2]=h,r[B+16>>2]=0,r[B+20>>2]=Q,o=(Q|0)==1,f[B+24>>0]=o&1,r[B+32>>2]=0,o|(Q|0)==2&&(f[803]=1)}function J(t){t=t|0;var o=0,h=0,Q=0,C=0;for(C=r[73]|0,o=r[72]|0;;){if(Q=o+2|0,o>>>0>=C>>>0){o=9;break}if(h=l[Q>>1]|0,h<<16>>16==t<<16>>16){o=10;break}if(h<<16>>16==92)h=o+4|0,(l[h>>1]|0)==13?(o=o+6|0,o=(l[o>>1]|0)==10?o:h):o=h;else if(Le(h)|0){o=9;break}else o=Q}(o|0)==9?(r[72]=Q,R()):(o|0)==10&&(r[72]=Q)}function Ke(t,o){t=t|0,o=o|0;var h=0,Q=0,C=0,B=0;return h=r[72]|0,Q=l[h>>1]|0,B=(t|0)==(o|0),C=B?0:t,B=B?0:o,Q<<16>>16==97&&(r[72]=h+4,h=E(1)|0,t=r[72]|0,P(h)|0?(J(h),o=(r[72]|0)+2|0,r[72]=o):(F(h)|0,o=r[72]|0),Q=E(1)|0,h=r[72]|0),(h|0)!=(t|0)&&q(t,o,C,B),Q|0}function It(){var t=0,o=0,h=0;h=r[73]|0,o=r[72]|0;e:for(;;){if(t=o+2|0,o>>>0>=h>>>0){o=6;break}switch(l[t>>1]|0){case 13:case 10:{o=6;break e}case 93:{o=7;break e}case 92:{t=o+4|0;break}default:}o=t}return(o|0)==6?(r[72]=t,R(),t=0):(o|0)==7&&(r[72]=t,t=93),t|0}function Qe(){var t=0,o=0,h=0;e:for(;;){if(t=r[72]|0,o=t+2|0,r[72]=o,t>>>0>=(r[73]|0)>>>0){h=7;break}switch(l[o>>1]|0){case 13:case 10:{h=7;break e}case 47:break e;case 91:{It()|0;break}case 92:{r[72]=t+4;break}default:}}(h|0)==7&&R()}function kt(t){switch(t=t|0,l[t>>1]|0){case 62:{t=(l[t+-2>>1]|0)==61;break}case 41:case 59:{t=1;break}case 104:{t=N(t+-2|0,210,4)|0;break}case 121:{t=N(t+-2|0,218,6)|0;break}case 101:{t=N(t+-2|0,230,3)|0;break}default:t=0}return t|0}function he(t){t=t|0;var o=0,h=0,Q=0,C=0,B=0;for(C=(r[72]|0)+2|0,r[72]=C,h=r[73]|0;o=C+2|0,!(C>>>0>=h>>>0||(Q=l[o>>1]|0,!t&&Le(Q)|0));){if(Q<<16>>16==42&&(l[C+4>>1]|0)==47){B=8;break}C=o}(B|0)==8&&(r[72]=o,o=C+4|0),r[72]=o}function L(t,o,h){t=t|0,o=o|0,h=h|0;var Q=0,C=0;e:do if(!h)t=0;else{for(;Q=f[t>>0]|0,C=f[o>>0]|0,Q<<24>>24==C<<24>>24;)if(h=h+-1|0,h)t=t+1|0,o=o+1|0;else{t=0;break e}t=(Q&255)-(C&255)|0}while(!1);return t|0}function te(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:{t=1;break}default:if((t&-8)<<16>>16==40|(t+-58&65535)<6)t=1;else{switch(t<<16>>16){case 91:case 93:case 94:{t=1;break e}default:}t=(t+-123&65535)<4}}while(!1);return t|0}function pt(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:break;default:if(!((t+-58&65535)<6|(t+-40&65535)<7&t<<16>>16!=41)){switch(t<<16>>16){case 91:case 94:break e;default:}return t<<16>>16!=125&(t+-123&65535)<4|0}}while(!1);return 1}function Se(t){t=t|0;var o=0;o=l[t>>1]|0;e:do if((o+-9&65535)>=5){switch(o<<16>>16){case 160:case 32:{o=1;break e}default:}if(te(o)|0)return o<<16>>16!=46|(fe(t)|0)|0;o=0}else o=1;while(!1);return o|0}function bt(t){t=t|0;var o=0,h=0,Q=0,C=0;return h=k,k=k+16|0,Q=h,r[Q>>2]=0,r[66]=t,o=r[3]|0,C=o+(t<<1)|0,t=C+2|0,l[C>>1]=0,r[Q>>2]=t,r[67]=t,r[59]=0,r[63]=0,r[61]=0,r[60]=0,r[65]=0,r[62]=0,k=h,o|0}function q(t,o,h,Q){t=t|0,o=o|0,h=h|0,Q=Q|0;var C=0,B=0;C=r[67]|0,r[67]=C+20,B=r[65]|0,r[(B|0?B+16|0:240)>>2]=C,r[65]=C,r[C>>2]=t,r[C+4>>2]=o,r[C+8>>2]=h,r[C+12>>2]=Q,r[C+16>>2]=0,f[803]=1}function N(t,o,h){t=t|0,o=o|0,h=h|0;var Q=0,C=0;return Q=t+(0-h<<1)|0,C=Q+2|0,t=r[3]|0,C>>>0>=t>>>0&&!(L(C,o,h<<1)|0)?(C|0)==(t|0)?t=1:t=Se(Q)|0:t=0,t|0}function mt(t){switch(t=t|0,l[t>>1]|0){case 107:{t=N(t+-2|0,144,4)|0;break}case 101:{(l[t+-2>>1]|0)==117?t=N(t+-4|0,116,6)|0:t=0;break}default:t=0}return t|0}function X(t,o){t=t|0,o=o|0;var h=0;return h=r[3]|0,h>>>0<=t>>>0&&(l[t>>1]|0)==o<<16>>16?(h|0)==(t|0)?h=1:h=le(l[t+-2>>1]|0)|0:h=0,h|0}function le(t){t=t|0;e:do if((t+-9&65535)<5)t=1;else{switch(t<<16>>16){case 32:case 160:{t=1;break e}default:}t=t<<16>>16!=46&(te(t)|0)}while(!1);return t|0}function ue(){var t=0,o=0,h=0;t=r[73]|0,h=r[72]|0;e:for(;o=h+2|0,!(h>>>0>=t>>>0);)switch(l[o>>1]|0){case 13:case 10:break e;default:h=o}r[72]=o}function F(t){for(t=t|0;!(O(t)|0||te(t)|0);)if(t=(r[72]|0)+2|0,r[72]=t,t=l[t>>1]|0,!(t<<16>>16)){t=0;break}return t|0}function Dt(){var t=0;switch(t=r[(r[61]|0)+20>>2]|0,t|0){case 1:{t=-1;break}case 2:{t=-2;break}default:t=t-(r[3]|0)>>1}return t|0}function Ne(t){return t=t|0,!(N(t,190,5)|0)&&!(N(t,200,3)|0)?t=N(t,206,2)|0:t=1,t|0}function Ae(t){switch(t=t|0,t<<16>>16){case 160:case 32:case 12:case 11:case 9:{t=1;break}default:t=0}return t|0}function fe(t){return t=t|0,(l[t>>1]|0)==46&&(l[t+-2>>1]|0)==46?t=(l[t+-4>>1]|0)==46:t=0,t|0}function j(t){return t=t|0,(r[3]|0)==(t|0)?t=1:t=Se(t+-2|0)|0,t|0}function yt(){var t=0;return t=r[(r[62]|0)+12>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}function Kt(){var t=0;return t=r[(r[61]|0)+12>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}function St(){var t=0;return t=r[(r[62]|0)+8>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}function Nt(){var t=0;return t=r[(r[61]|0)+16>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}function Lt(){var t=0;return t=r[(r[61]|0)+4>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}function Jt(){var t=0;return t=r[61]|0,t=r[(t|0?t+32|0:236)>>2]|0,r[61]=t,(t|0)!=0|0}function Rt(){var t=0;return t=r[62]|0,t=r[(t|0?t+16|0:240)>>2]|0,r[62]=t,(t|0)!=0|0}function R(){f[802]=1,r[68]=(r[72]|0)-(r[3]|0)>>1,r[72]=(r[73]|0)+2}function O(t){return t=t|0,(t|128)<<16>>16==160|(t+-9&65535)<5|0}function P(t){return t=t|0,t<<16>>16==39|t<<16>>16==34|0}function vt(){return(r[(r[61]|0)+8>>2]|0)-(r[3]|0)>>1|0}function xt(){return(r[(r[62]|0)+4>>2]|0)-(r[3]|0)>>1|0}function Le(t){return t=t|0,t<<16>>16==13|t<<16>>16==10|0}function Ft(){return(r[r[61]>>2]|0)-(r[3]|0)>>1|0}function Gt(){return(r[r[62]>>2]|0)-(r[3]|0)>>1|0}function Ut(){return D[(r[61]|0)+24>>0]|0|0}function Mt(t){t=t|0,r[3]=t}function Yt(){return r[(r[61]|0)+28>>2]|0}function qt(){return(f[803]|0)!=0|0}function Ot(){return(f[804]|0)!=0|0}function _t(){return r[68]|0}function Ht(t){return t=t|0,k=t+992+15&-16,992}return{su:Ht,ai:Nt,e:_t,ee:xt,ele:yt,els:St,es:Gt,f:Ot,id:Dt,ie:Lt,ip:Ut,is:Ft,it:Yt,ms:qt,p:S,re:Rt,ri:Jt,sa:bt,se:Kt,ses:Mt,ss:vt}}(typeof self<"u"?self:global,{},ne),Ie=m.su(V-(2<<17))}const n=K.length+1;m.ses(Ie),m.sa(n-1),_e(K,new Uint16Array(ne,Ie,n)),m.p()||(w=m.e(),G());const s=[],a=[];for(;m.ri();){const c=m.is(),g=m.ie(),u=m.ai(),f=m.id(),l=m.ss(),r=m.se(),D=m.it();let y;m.ip()&&(y=ke(f===-1?c:c+1,K.charCodeAt(f===-1?c-1:c))),s.push({t:D,n:y,s:c,e:g,ss:l,se:r,d:f,a:u})}for(;m.re();){const c=m.es(),g=m.ee(),u=m.els(),f=m.ele(),l=K.charCodeAt(c),r=u>=0?K.charCodeAt(u):-1;a.push({s:c,e:g,ls:u,le:f,n:l===34||l===39?ke(c+1,l):K.slice(c,g),ln:u<0?void 0:r===34||r===39?ke(u+1,r):K.slice(u,f)})}return[s,a,!!m.f(),!!m.ms()]}function ke(i,e){w=i;let A="",n=w;for(;;){w>=K.length&&G();const s=K.charCodeAt(w);if(s===e)break;s===92?(A+=K.slice(n,w),A+=fA(),n=w):(s===8232||s===8233||Xe(s)&&G(),++w)}return A+=K.slice(n,w++),A}function fA(){let i=K.charCodeAt(++w);switch(++w,i){case 110:return` `;case 114:return"\r";case 120:return String.fromCharCode(pe(2));case 117:return function(){const e=K.charCodeAt(w);let A;return e===123?(++w,A=pe(K.indexOf("}",w)-w),++w,A>1114111&&G()):A=pe(4),A<=65535?String.fromCharCode(A):(A-=65536,String.fromCharCode(55296+(A>>10),56320+(1023&A)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:K.charCodeAt(w)===10&&++w;case 10:return"";case 56:case 57:G();default:if(i>=48&&i<=55){let e=K.substr(w-1,3).match(/^[0-7]+/)[0],A=parseInt(e,8);return A>255&&(e=e.slice(0,-1),A=parseInt(e,8)),w+=e.length-1,i=K.charCodeAt(w),e==="0"&&i!==56&&i!==57||G(),String.fromCharCode(A)}return Xe(i)?"":String.fromCharCode(i)}}function pe(i){const e=w;let A=0,n=0;for(let s=0;s=97)a=c-97+10;else if(c>=65)a=c-65+10;else{if(!(c>=48&&c<=57))break;a=c-48}if(a>=16)break;n=c,A=16*A+a}else n!==95&&s!==0||G(),n=c}return n!==95&&w-e===i||G(),A}function Xe(i){return i===13||i===10}function G(){throw Object.assign(Error(`Parse error ${He}:${K.slice(0,w).split(` `).length}:${w-K.lastIndexOf(` `,w-1)}`),{idx:w})}let je=!1;Oe.then(()=>{je=!0});const Pe=(i,e)=>je?qe(i,e):uA(i,e),Te="2",gA=(i=>{const e="default",A=Object.keys(i);return A.length===1&&A[0]===e&&i[e]&&typeof i[e]=="object"&&"__esModule"in i[e]?i[e]:i}).toString(),CA=`.then(${gA})`,be=(i,e,A)=>{if(A){if(!e.includes("import("))return}else if(!e.includes("import"))return;const s=Pe(e,i)[0].filter(u=>u.d>-1);if(s.length===0)return;const a=new De(e);for(const u of s)a.appendRight(u.se,CA);const c=a.toString(),g=a.generateMap({source:i,includeContent:!1,hires:"boundary"});return{code:c,map:g}},BA=i=>{try{const e=x.readFileSync(i,"utf8");return JSON.parse(e)}catch{}},$e=()=>{},We=()=>Math.floor(Date.now()/1e8);class EA extends Map{cacheDirectory=Tt.tmpdir;oldCacheDirectory=T.join(Pt.tmpdir(),"tsx");cacheFiles;constructor(){super(),x.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=x.readdirSync(this.cacheDirectory).map(e=>{const[A,n]=e.split("-");return{time:Number(A),key:n,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){const A=super.get(e);if(A)return A;const n=this.cacheFiles.find(c=>c.key===e);if(!n)return;const s=T.join(this.cacheDirectory,n.fileName),a=BA(s);if(!a){x.promises.unlink(s).then(()=>{const c=this.cacheFiles.indexOf(n);this.cacheFiles.splice(c,1)},()=>{});return}return super.set(e,a),a}set(e,A){if(super.set(e,A),A){const n=We();x.promises.writeFile(T.join(this.cacheDirectory,`${n}-${e}`),JSON.stringify(A)).catch($e)}return this}expireDiskCache(){const e=We();for(const A of this.cacheFiles)e-A.time>7&&x.promises.unlink(T.join(this.cacheDirectory,A.fileName)).catch($e)}async removeOldCacheDirectory(){try{await x.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in x.promises?await x.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await x.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var ie=process.env.TSX_DISABLE_CACHE?new Map:new EA;const dA=/^[\w+.-]+:\/\//,wA=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,IA=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function kA(i){return dA.test(i)}function pA(i){return i.startsWith("//")}function Ze(i){return i.startsWith("/")}function bA(i){return i.startsWith("file:")}function Ve(i){return/^[.?#]/.test(i)}function se(i){const e=wA.exec(i);return ze(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}function mA(i){const e=IA.exec(i),A=e[2];return ze("file:","",e[1]||"","",Ze(A)?A:"/"+A,e[3]||"",e[4]||"")}function ze(i,e,A,n,s,a,c){return{scheme:i,user:e,host:A,port:n,path:s,query:a,hash:c,type:7}}function et(i){if(pA(i)){const A=se("http:"+i);return A.scheme="",A.type=6,A}if(Ze(i)){const A=se("http://foo.com"+i);return A.scheme="",A.host="",A.type=5,A}if(bA(i))return mA(i);if(kA(i))return se(i);const e=se("http://foo.com/"+i);return e.scheme="",e.host="",e.type=i?i.startsWith("?")?3:i.startsWith("#")?2:4:1,e}function DA(i){if(i.endsWith("/.."))return i;const e=i.lastIndexOf("/");return i.slice(0,e+1)}function yA(i,e){tt(e,e.type),i.path==="/"?i.path=e.path:i.path=DA(e.path)+i.path}function tt(i,e){const A=e<=4,n=i.path.split("/");let s=1,a=0,c=!1;for(let u=1;un&&(n=c)}tt(A,n);const s=A.query+A.hash;switch(n){case 2:case 3:return s;case 4:{const a=A.path.slice(1);return a?Ve(e||i)&&!Ve(a)?"./"+a+s:a+s:s||"."}case 5:return A.path+s;default:return A.scheme+"//"+A.user+A.host+A.port+A.path+s}}function At(i,e){return e&&!e.endsWith("/")&&(e+="/"),KA(i,e)}function SA(i){if(!i)return"";const e=i.lastIndexOf("/");return i.slice(0,e+1)}const M=0;function NA(i,e){const A=rt(i,0);if(A===i.length)return i;e||(i=i.slice());for(let n=A;n>1),a=i[s][M]-e;if(a===0)return oe=!0,s;a<0?A=s+1:n=s-1}return oe=!1,A-1}function xA(i,e,A){for(let n=A-1;n>=0&&i[n][M]===e;A=n--);return A}function FA(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function GA(i,e,A,n){const{lastKey:s,lastNeedle:a,lastIndex:c}=A;let g=0,u=i.length-1;if(n===s){if(e===a)return oe=c!==-1&&i[c][M]===e,c;e>=a?g=c===-1?0:c:u=c}return A.lastKey=n,A.lastNeedle=e,A.lastIndex=vA(i,e,g,u)}class nt{constructor(e,A){const n=typeof e=="string";if(!n&&e._decodedMemo)return e;const s=n?JSON.parse(e):e,{version:a,file:c,names:g,sourceRoot:u,sources:f,sourcesContent:l}=s;this.version=a,this.file=c,this.names=g||[],this.sourceRoot=u,this.sources=f,this.sourcesContent=l,this.ignoreList=s.ignoreList||s.x_google_ignoreList||void 0;const r=At(u||"",SA(A));this.resolvedSources=f.map(y=>At(y||"",r));const{mappings:D}=s;typeof D=="string"?(this._encoded=D,this._decoded=void 0):(this._encoded=void 0,this._decoded=NA(D,n)),this._decodedMemo=FA(),this._bySources=void 0,this._bySourceMemos=void 0}}function gr(i){return i}function it(i){var e;return(e=i)._decoded||(e._decoded=Wt(i._encoded))}function UA(i,e,A){const n=it(i);if(e>=n.length)return null;const s=n[e],a=MA(s,i._decodedMemo,e,A);return a===-1?null:s[a]}function MA(i,e,A,n,s){let a=GA(i,n,e,A);return oe&&(a=xA(i,n,a)),a===-1||a===i.length?-1:a}class me{constructor(){this._indexes={__proto__:null},this.array=[]}}function Cr(i){return i}function st(i,e){return i._indexes[e]}function z(i,e){const A=st(i,e);if(A!==void 0)return A;const{array:n,_indexes:s}=i,a=n.push(e);return s[e]=a-1}function YA(i,e){const A=st(i,e);if(A===void 0)return;const{array:n,_indexes:s}=i;for(let a=A+1;aZA(!0,i,e,A,n,s,a,c);function TA(i,e,A){const{_sources:n,_sourcesContent:s}=i,a=z(n,e);s[a]=A}function $A(i,e,A=!0){const{_sources:n,_sourcesContent:s,_ignoreList:a}=i,c=z(n,e);c===s.length&&(s[c]=null),A?z(a,c):YA(a,c)}function at(i){const{_mappings:e,_sources:A,_sourcesContent:n,_names:s,_ignoreList:a}=i;return er(e),{version:3,file:i.file||void 0,names:s.array,sourceRoot:i.sourceRoot||void 0,sources:A.array,sourcesContent:n,mappings:e,ignoreList:a.array}}function WA(i){const e=at(i);return Object.assign(Object.assign({},e),{mappings:Ue(e.mappings)})}function ZA(i,e,A,n,s,a,c,g,u){const{_mappings:f,_sources:l,_sourcesContent:r,_names:D}=e,y=VA(f,A),k=zA(y,n);if(!s)return tr(y,k)?void 0:ct(y,k,[n]);const S=z(l,s),v=g?z(D,g):ot;if(S===r.length&&(r[S]=null),!Ar(y,k,S,a,c,v))return ct(y,k,g?[n,S,a,c,v]:[n,S,a,c])}function VA(i,e){for(let A=i.length;A<=e;A++)i[A]=[];return i[e]}function zA(i,e){let A=i.length;for(let n=A-1;n>=0;A=n--){const s=i[n];if(e>=s[qA])break}return A}function ct(i,e,A){for(let n=i.length;n>e;n--)i[n]=i[n-1];i[e]=A}function er(i){const{length:e}=i;let A=e;for(let n=A-1;n>=0&&!(i[n].length>0);A=n,n--);Anew nt(a,"")),n=A.pop();for(let a=0;a1)throw new Error(`Transformation map ${a} must have exactly one source file. Did you specify these with the most recent transformation maps first?`);let s=gt(n,e,"",0);for(let a=A.length-1;a>=0;a--)s=ut(A[a],[s]);return s}function gt(i,e,A,n){const{resolvedSources:s,sourcesContent:a,ignoreList:c}=i,g=n+1,u=s.map((f,l)=>{const r={importer:A,depth:g,source:f||"",content:void 0,ignore:void 0},D=e(r.source,r),{source:y,content:k,ignore:S}=r;if(D)return gt(new nt(D,y),e,y,g);const v=k!==void 0?k:a?a[l]:null,Y=S!==void 0?S:c?c.includes(l):!1;return nr(y,v,Y)});return ut(i,u)}class ar{constructor(e,A){const n=A.decodedMappings?at(e):WA(e);this.version=n.version,this.file=n.file,this.mappings=n.mappings,this.names=n.names,this.ignoreList=n.ignoreList,this.sourceRoot=n.sourceRoot,this.sources=n.sources,A.excludeContent||(this.sourcesContent=n.sourcesContent)}toString(){return JSON.stringify(this)}}function Ct(i,e,A){const n={excludeContent:!!A,decodedMappings:!1},s=or(i,e);return new ar(ir(s),n)}const cr=(i,e,A)=>{const n=[],s={code:e};for(const a of A){const c=a(i,s.code);c&&(Object.assign(s,c),n.unshift(c.map))}return{...s,map:Ct(n,()=>null)}},Qr=async(i,e,A)=>{const n=[],s={code:e};for(const a of A){const c=await a(i,s.code);c&&(Object.assign(s,c),n.unshift(c.map))}return{...s,map:Ct(n,()=>null)}},hr=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),Bt={...hr,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE,minifyWhitespace:!0,keepNames:!0},Et=i=>{const e=i.sourcefile;if(e){const A=T.extname(e.split("?")[0]);A?A===".cts"||A===".mts"?i.sourcefile=`${e.slice(0,-3)}ts`:A===".mjs"&&(i.sourcefile=`${e.slice(0,-3)}js`):i.sourcefile+=".js"}return A=>(A.map&&(i.sourcefile!==e&&(A.map=A.map.replace(JSON.stringify(i.sourcefile),JSON.stringify(e))),A.map=JSON.parse(A.map)),A)},dt=i=>{throw i.name="TransformError",delete i.errors,delete i.warnings,i},lr=(i,e,A)=>{const n={};e.endsWith(".cjs")||e.endsWith(".cts")||(n["import.meta.url"]=JSON.stringify(Xt.pathToFileURL(e)));const s={...Bt,format:"cjs",sourcefile:e,define:n,banner:"(()=>{",footer:"})()",...A},a=Je([i,JSON.stringify(s),re.version,Te].join("-"));let c=ie.get(a);return c||(c=cr(e,i,[(g,u)=>{const f=Et(s);let l;try{l=re.transformSync(u,s)}catch(r){throw dt(r)}return f(l)},(g,u)=>be(g,u,!0)]),ie.set(a,c)),c},ur=async(i,e,A)=>{const n={...Bt,format:"esm",sourcefile:e,...A},s=Je([i,JSON.stringify(n),re.version,Te].join("-"));let a=ie.get(s);return a||(a=await Qr(e,i,[async(c,g)=>{const u=Et(n);let f;try{f=await re.transform(g,n)}catch(l){throw dt(l)}return u(f)},(c,g)=>be(c,g,!0)]),ie.set(s,a)),a};exports.parseEsm=Pe,exports.transform=ur,exports.transformDynamicImport=be,exports.transformSync=lr;