site/node_modules/tsx/dist/index-DeKCL_WS.mjs

17 lines
64 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
var Pt=Object.defineProperty;var u=(n,e)=>Pt(n,"name",{value:e,configurable:!0});import{pathToFileURL as Tt}from"node:url";import{version as Se,transformSync as Zt,transform as $t}from"esbuild";import Vt from"node:crypto";import v from"node:fs";import Z from"node:path";import Wt from"node:os";import{t as zt}from"./temporary-directory-CwHp0_NW.mjs";const Je=u(n=>Vt.createHash("sha1").update(n).digest("hex"),"sha1"),Re=44,eA=59,Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xe=new Uint8Array(64),ve=new Uint8Array(128);for(let n=0;n<Ue.length;n++){const e=Ue.charCodeAt(n);xe[n]=e,ve[e]=n}const de=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(n){return Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString()}}:{decode(n){let e="";for(let A=0;A<n.length;A++)e+=String.fromCharCode(n[A]);return e}};function tA(n){const e=new Int32Array(5),A=[];let i=0;do{const s=AA(n,i),a=[];let c=!0,C=0;e[0]=0;for(let Q=i;Q<s;Q++){let g;Q=$(n,Q,e,0);const f=e[0];f<C&&(c=!1),C=f,Fe(n,Q,s)?(Q=$(n,Q,e,1),Q=$(n,Q,e,2),Q=$(n,Q,e,3),Fe(n,Q,s)?(Q=$(n,Q,e,4),g=[f,e[1],e[2],e[3],e[4]]):g=[f,e[1],e[2],e[3]]):g=[f],a.push(g)}c||rA(a),A.push(a),i=s+1}while(i<=n.length);return A}u(tA,"decode");function AA(n,e){const A=n.indexOf(";",e);return A===-1?n.length:A}u(AA,"indexOf");function $(n,e,A,i){let s=0,a=0,c=0;do{const Q=n.charCodeAt(e++);c=ve[Q],s|=(c&31)<<a,a+=5}while(c&32);const C=s&1;return s>>>=1,C&&(s=-2147483648|-s),A[i]+=s,e}u($,"decodeInteger");function Fe(n,e,A){return e>=A?!1:n.charCodeAt(e)!==Re}u(Fe,"hasMoreVlq");function rA(n){n.sort(iA)}u(rA,"sort");function iA(n,e){return n[0]-e[0]}u(iA,"sortComparator$1");function Me(n){const e=new Int32Array(5),A=1024*16,i=A-36,s=new Uint8Array(A),a=s.subarray(0,i);let c=0,C="";for(let Q=0;Q<n.length;Q++){const g=n[Q];if(Q>0&&(c===A&&(C+=de.decode(s),c=0),s[c++]=eA),g.length!==0){e[0]=0;for(let f=0;f<g.length;f++){const r=g[f];c>i&&(C+=de.decode(a),s.copyWithin(0,i,c),c-=i),f>0&&(s[c++]=Re),c=V(s,c,e,r,0),r.length!==1&&(c=V(s,c,e,r,1),c=V(s,c,e,r,2),c=V(s,c,e,r,3),r.length!==4&&(c=V(s,c,e,r,4)))}}}return C+de.decode(s.subarray(0,c))}u(Me,"encode");function V(n,e,A,i,s){const a=i[s];let c=a-A[s];A[s]=a,c=c<0?-c<<1|1:c<<1;do{let C=c&31;c>>>=5,c>0&&(C|=32),n[e++]=xe[C]}while(c>0);return e}u(V,"encodeInteger");class ae{static{u(this,"BitSet")}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 te{static{u(this,"Chunk")}constructor(e,A,i){this.start=e,this.end=A,this.original=i,this.intro="",this.outro="",this.content=i,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 te(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.start<e&&e<this.end}eachNext(e){let A=this;for(;A;)e(A),A=A.next}eachPrevious(e){let A=this;for(;A;)e(A),A=A.previous}edit(e,A,i){return this.content=e,i||(this.intro="",this.outro=""),this.storeName=A,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){const A=e-this.start,i=this.original.slice(0,A),s=this.original.slice(A);this.original=i;const a=new te(e,this.end,s);return a.outro=this.outro,this.outro="",this.end=e,this.edited?(a.edit("",!1),this.content=""):this.content=i,a.next=this.next,a.next&&(a.next.previous=a),a.previous=this,this.next=a,a}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const A=this.content.replace(e,"");if(A.length)return A!==this.content&&(this.split(this.start+A.length).edit("",void 0,!0),this.edited&&this.edit(A,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.int
`),A=e.filter(a=>/^\t+/.test(a)),i=e.filter(a=>/^ {2,}/.test(a));if(A.length===0&&i.length===0)return null;if(A.length>=i.length)return" ";const s=i.reduce((a,c)=>{const C=/^ +/.exec(c)[0].length;return Math.min(C,a)},1/0);return new Array(s+1).join(" ")}u(aA,"guessIndent");function cA(n,e){const A=n.split(/[/\\]/),i=e.split(/[/\\]/);for(A.pop();A[0]===i[0];)A.shift(),i.shift();if(A.length){let s=A.length;for(;s--;)A[s]=".."}return A.concat(i).join("/")}u(cA,"getRelativePath");const hA=Object.prototype.toString;function lA(n){return hA.call(n)==="[object Object]"}u(lA,"isObject");function Ge(n){const e=n.split(`
`),A=[];for(let i=0,s=0;i<e.length;i++)A.push(s),s+=e[i].length+1;return u(function(s){let a=0,c=A.length;for(;a<c;){const g=a+c>>1;s<A[g]?c=g:a=g+1}const C=a-1,Q=s-A[C];return{line:C,column:Q}},"locate")}u(Ge,"getLocator");const uA=/\w/;class fA{static{u(this,"Mappings")}constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,A,i,s){if(A.length){const a=A.length-1;let c=A.indexOf(`
`,0),C=-1;for(;c>=0&&a>c;){const g=[this.generatedCodeColumn,e,i.line,i.column];s>=0&&g.push(s),this.rawSegments.push(g),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,C=c,c=A.indexOf(`
`,c+1)}const Q=[this.generatedCodeColumn,e,i.line,i.column];s>=0&&Q.push(s),this.rawSegments.push(Q),this.advance(A.slice(C+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(A));this.pending=null}addUneditedChunk(e,A,i,s,a){let c=A.start,C=!0,Q=!1;for(;c<A.end;){if(this.hires||C||a.has(c)){const g=[this.generatedCodeColumn,e,s.line,s.column];this.hires==="boundary"?uA.test(i[c])?Q||(this.rawSegments.push(g),Q=!0):(this.rawSegments.push(g),Q=!1):this.rawSegments.push(g)}i[c]===`
`?(s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,C=!0):(s.column+=1,this.generatedCodeColumn+=1,C=!1),c+=1}this.pending=null}advance(e){if(!e)return;const A=e.split(`
`);if(A.length>1){for(let i=0;i<A.length-1;i++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=A[A.length-1].length}}const W=`
`,q={insertLeft:!1,insertRight:!1,storeName:!1};class Ke{static{u(this,"MagicString")}constructor(e,A={}){const i=new te(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:A.filename},indentExclusionRanges:{writable:!0,value:A.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new ae},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:A.ignoreList}}),this.byStart[0]=i,this.byEnd[e.length]=i}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,A){if(typeof A!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.appendLeft(A):this.intro+=A,this}appendRight(e,A){if(typeof A!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.appendRight(A):this.outro+=A,this}clone(){const e=new Ke(this.original,{filename:this.filename});let A=this.firstChunk,i=e.firstChunk=e.lastSearchedChunk=A.clone();for(;A;){e.byStart[i.start]=i,e.byEnd[i.end]=i;const s=A.next,a=s&&s.clone();a&&(i.next=a,a.previous=i,i=a),A=s}return e.lastChunk=i,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new ae(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const A=0,i=Object.keys(this.storedNames),s=new fA(e.hires),a=Ge(this.original);return this.intro&&s.advance(this.intro),this.firstChunk.eachNext(c=>{const C=a(c.start);c.intro.length&&s.advance(c.intro),c.edited?s.addEdit(A,c.content,C,c.storeName?i.indexOf(c.original):-1):s.addUneditedChunk(A,c,this.original,C,this.sourcemapLocations),c.outro.length&&s.advance(c.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?cA(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:i,mappings:s.raw,x_google_ignoreList:this.ignoreList?[A]:void 0}}generateMap(e){return new oA(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=aA(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,A){const i=/^[^\r\n]/gm;if(lA(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(f=>{for(let r=f[0];r<f[1];r+=1)s[r]=!0});let a=A.indentStart!==!1;const c=u(g=>a?`${e}${g}`:(a=!0,g),"replacer");this.intro=this.intro.replace(i,c);let C=0,Q=this.firstChunk;for(;Q;){const g=Q.end;if(Q.edited)s[C]||(Q.content=Q.content.replace(i,c),Q.content.length&&(a=Q.content[Q.content.length-1]===`
`));else for(C=Q.start;C<g;){if(!s[C]){const f=this.original[C];f===`
`?a=!0:f!=="\r"&&a&&(a=!1,C===Q.start||(this._splitChunk(Q,C),Q=Q.next),Q.prependRight(e))}C+=1}C=Q.end,Q=Q.next}return this.outro=this.outro.replace(i,c),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,A){return q.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),q.insertLeft=!0),this.appendLeft(e,A)}insertRight(e,A){return q.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),q.insertRight=!0),this.prependRight(e,A)}move(e,A,i){if(i>=e&&i<=A)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(A),this._split(i);const s=this.byStart[e],a=this.byEnd[A],c=s.previous,C=a.next,Q=this.byStart[i];if(!Q&&a===this.lastChunk)return this;const g=Q?Q.previous:this.lastChunk;return c&&(c.next=C),C&&(C.previous=c),g&&(g.next=s),Q&&(Q.previous=a),s.previous||(this.firstChunk=a.next),a.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=g,a.next=Q||null,g||(this.firstChunk=s),Q||(this.lastChunk=a),this}overwrite(e,A,i,s){return s=s||{},this.update(e,A,i,{...s,overwrite:!s.contentOnly})}update(e,A,i,s){if(typeof i!="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&&(q.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),q.storeName=!0),s={storeName:!0});const a=s!==void 0?s.storeName:!1,c=s!==void 0?s.overwrite:!1;if(a){const g=this.original.slice(e,A);Object.defineProperty(this.storedNames,g,{writable:!0,value:!0,enumerable:!0})}const C=this.byStart[e],Q=this.byEnd[A];if(C){let g=C;for(;g!==Q;){if(g.next!==this.byStart[g.end])throw new Error("Cannot overwrite across a split point");g=g.next,g.edit("",!1)}C.edit(i,a,!c)}else{const g=new te(e,A,"").edit(i,a);Q.next=g,g.previous=Q}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 i=this.byEnd[e];return i?i.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 i=this.byStart[e];return i?i.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 i=this.byStart[e];for(;i;)i.intro="",i.outro="",i.edit(""),i=A>i.end?this.byStart[i.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 i=this.byStart[e];for(;i;)i.reset(),i=A>i.end?this.byStart[i.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(W);if(e!==-1)return this.outro.substr(e+1);let A=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(e=i.outro.lastIndexOf(W),e!==-1)return i.outro.substr(e+1)+A;A=i.outro+A}if(i.content.length>0){if(e=i.content.lastIndexOf(W),e!==
`).length}:${w.e()-n.lastIndexOf(`
`,w.e()-1)}`),{idx:w.e()});const a=[],c=[];for(;w.ri();){const Q=w.is(),g=w.ie(),f=w.it(),r=w.ai(),m=w.id(),K=w.ss(),p=w.se();let S;w.ip()&&(S=C(n.slice(m===-1?Q-1:Q,m===-1?g+1:g))),a.push({n:S,t:f,s:Q,e:g,ss:K,se:p,d:m,a:r})}for(;w.re();){const Q=w.es(),g=w.ee(),f=w.els(),r=w.ele(),m=n.slice(Q,g),K=m[0],p=f<0?void 0:n.slice(f,r),S=p?p[0]:"";c.push({s:Q,e:g,ls:f,le:r,n:K==='"'||K==="'"?C(m):m,ln:S==='"'||S==="'"?C(p):p})}function C(Q){try{return(0,eval)(Q)}catch{}}return u(C,"k"),[a,c,!!w.f(),!!w.ms()]}u(He,"parse$1");function gA(n,e){const A=n.length;let i=0;for(;i<A;){const s=n.charCodeAt(i);e[i++]=(255&s)<<8|s>>>8}}u(gA,"Q");function CA(n,e){const A=n.length;let i=0;for(;i<A;)e[i]=n.charCodeAt(i++)}u(CA,"B");let w;const Oe=WebAssembly.compile((we="AGFzbQEAAAABKwhgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gA39/fwADMTAAAQECAgICAgICAgICAgICAgICAgIAAwMDBAQAAAUAAAAAAAMDAwAGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUHA8gALfwBBwPIACwd6FQZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAml0AAgCYWkACQJpZAAKAmlwAAsCZXMADAJlZQANA2VscwAOA2VsZQAPAnJpABACcmUAEQFmABICbXMAEwVwYXJzZQAUC19faG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cNDAJAIAJBAnRBACgCqApqQXxqKAIAIgMoAgQNACADQQAoApwKQQJqNgIEC0EAIAJBf2o7AZYKIAMgAUEEajYCDAwMCwJAQQAoApwKIgEvAQBBKUcNAEEAKALwCSIDRQ0AIAMoAgQgAUcNAEEAQQAoAvQJIgM2AvAJAkAgA0UNACADQQA2AiAMAQtBAEEANgLgCQtBAEEALwGYCiIDQQFqOwGYCkEAKAKkCiADQQN0aiIDQQZBAkEALQCsChs2AgAgAyABNgIEQQBBADoArAoMCwtBAC8BmAoiAUUNB0EAIAFBf2oiATsBmApBACgCpAogAUH//wNxQQN0aigCAEEERg0EDAoLQScQGgwJC0EiEBoMCAsgAkEvRw0HAkACQCABLwEEIgFBKkYNACABQS9HDQEQGAwKC0EBEBkMCQsCQAJAAkACQEEAKAKcCiIBLwEAIgMQG0UNAAJAAkAgA0FVag4EAAkBAwkLIAFBfmovAQBBK0YNAwwICyABQX5qLwEAQS1GDQIMBwsgA0EpRw0BQQAoAqQKQQAvAZgKIgJBA3RqKAIEEBxFDQIMBgsgAUF+ai8BAEFQakH//wNxQQpPDQULQQAvAZgKIQILAkACQCACQf//A3EiAkUNACADQeYARw0AQQAoAqQKIAJBf2pBA3RqIgQoAgBBAUcNACABQX5qLwEAQe8ARw0BIAQoAgRBlghBAxAdRQ0BDAULIANB/QBHDQBBACgCpAogAkEDdGoiAigCBBAeDQQgAigCAEEGRg0ECyABEB8NAyADRQ0DIANBL0ZBAC0AoApBAEdxDQ
`;case 114:return"\r";case 120:return String.fromCharCode(pe(2));case 117:return function(){const e=y.charCodeAt(k);let A;return e===123?(++k,A=pe(y.indexOf("}",k)-k),++k,A>1114111&&M()):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:y.charCodeAt(k)===10&&++k;case 10:return"";case 56:case 57:M();default:if(n>=48&&n<=55){let e=y.substr(k-1,3).match(/^[0-7]+/)[0],A=parseInt(e,8);return A>255&&(e=e.slice(0,-1),A=parseInt(e,8)),k+=e.length-1,n=y.charCodeAt(k),e==="0"&&n!==56&&n!==57||M(),String.fromCharCode(A)}return je(n)?"":String.fromCharCode(n)}}u(dA,"k");function pe(n){const e=k;let A=0,i=0;for(let s=0;s<n;++s,++k){let a,c=y.charCodeAt(k);if(c!==95){if(c>=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;i=c,A=16*A+a}else i!==95&&s!==0||M(),i=c}return i!==95&&k-e===n||M(),A}u(pe,"l");function je(n){return n===13||n===10}u(je,"u");function M(){throw Object.assign(Error(`Parse error ${qe}:${y.slice(0,k).split(`
`).length}:${k-y.lastIndexOf(`
`,k-1)}`),{idx:k})}u(M,"o");let Xe=!1;Oe.then(()=>{Xe=!0});const Pe=u((n,e)=>Xe?He(n,e):BA(n,e),"parseEsm"),wA=u(n=>{if(!n.includes("import")&&!n.includes("export"))return!1;try{return Pe(n)[3]}catch{return!0}},"isESM"),Te="2",kA=(n=>{const e="default";return n[e]&&typeof n[e]=="object"&&"__esModule"in n[e]?n[e]:n}).toString(),IA=`.then(${kA})`,be=u((n,e,A)=>{if(A){if(!e.includes("import("))return}else if(!e.includes("import"))return;const s=Pe(e,n)[0].filter(Q=>Q.d>-1);if(s.length===0)return;const a=new Ke(e);for(const Q of s)a.appendRight(Q.se,IA);const c=a.toString(),C=a.generateMap({source:n,includeContent:!1,hires:"boundary"});return{code:c,map:C}},"transformDynamicImport"),Ze=u(n=>{try{const e=v.readFileSync(n,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),$e=u(()=>{},"noop"),Ve=u(()=>Math.floor(Date.now()/1e8),"getTime");class pA extends Map{static{u(this,"FileCache")}cacheDirectory=zt;oldCacheDirectory=Z.join(Wt.tmpdir(),"tsx");cacheFiles;constructor(){super(),v.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=v.readdirSync(this.cacheDirectory).map(e=>{const[A,i]=e.split("-");return{time:Number(A),key:i,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){const A=super.get(e);if(A)return A;const i=this.cacheFiles.find(c=>c.key===e);if(!i)return;const s=Z.join(this.cacheDirectory,i.fileName),a=Ze(s);if(!a){v.promises.unlink(s).then(()=>{const c=this.cacheFiles.indexOf(i);this.cacheFiles.splice(c,1)},()=>{});return}return super.set(e,a),a}set(e,A){if(super.set(e,A),A){const i=Ve();v.promises.writeFile(Z.join(this.cacheDirectory,`${i}-${e}`),JSON.stringify(A)).catch($e)}return this}expireDiskCache(){const e=Ve();for(const A of this.cacheFiles)e-A.time>7&&v.promises.unlink(Z.join(this.cacheDirectory,A.fileName)).catch($e)}async removeOldCacheDirectory(){try{await v.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in v.promises?await v.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await v.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var ne=process.env.TSX_DISABLE_CACHE?new Map:new pA;const bA=/^[\w+.-]+:\/\//,mA=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,KA=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function DA(n){return bA.test(n)}u(DA,"isAbsoluteUrl");function LA(n){return n.startsWith("//")}u(LA,"isSchemeRelativeUrl");function We(n){return n.startsWith("/")}u(We,"isAbsolutePath");function yA(n){return n.startsWith("file:")}u(yA,"isFileUrl");function ze(n){return/^[.?#]/.test(n)}u(ze,"isRelative");function se(n){const e=mA.exec(n);return et(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}u(se,"parseAbsoluteUrl");function NA(n){const e=KA.exec(n),A=e[2];return et("file:","",e[1]||"","",We(A)?A:"/"+A,e[3]||"",e[4]||"")}u(NA,"parseFileUrl");function et(n,e,A,i,s,a,c){return{scheme:n,user:e,host:A,port:i,path:s,query:a,hash:c,type:7}}u(et,"makeUrl");function tt(n){if(LA(n)){const A=se("http:"+n);return A.scheme="",A.type=6,A}if(We(n)){const A=se("http://foo.com"+n);return A.scheme="",A.host="",A.type=5,A}if(yA(n))return NA(n);if(DA(n))return se(n);const e=se("http://foo.com/"+n);return e.scheme="",e.host="",e.type=n?n.startsWith("?")?3:n.startsWith("#")?2:4:1,e}u(tt,"parseUrl");function SA(n){if(n.endsWith("/.."))return n;const e=n.lastIndexOf("/");return n.slice(0,e+1)}u(SA,"stripPathFilename");function JA(n,e){At(e,e.type),n.path==="/"?n.path=e.path:n.path=SA(e.path)+n.path}u(JA,"mergePaths");function At(n,e){const A=e<=4,i=n.path.split("/");let s=1,a=0,c=!1;for(let Q=1;Q<i.length;Q++){const g=i[Q];if(!g){c=!0;continue}if(c=!1,g!=="."){if(g===".."){a?(c=!0,a--,s--):A&&(i[s++]=g);continue}i[s++]=g,a++}}let C="";for(let Q=1;Q<s;Q++)C+="/"+i[Q];(!C||c&&!C.endsWith("/.."))&&(C+="/"),n.path=C}u(At,"normalizePath");function RA(n,e){if(!n&&!e)return"";const A=tt(n);let i=A.type;if(e&&i!==7){const a=tt(e),c=a.type;switch(i){case 1:A.hash=a.hash;case 2:A.query=a.query;case 3:case 4:JA(A,a);case 5:A.user=a.user,A.host=a.host,A.port=a.port;case 6:A.scheme=a.sche
Did you specify these with the most recent transformation maps first?`);let s=Ct(i,e,"",0);for(let a=A.length-1;a>=0;a--)s=Qt(A[a],[s]);return s}u(ur,"buildSourceMapTree");function Ct(n,e,A,i){const{resolvedSources:s,sourcesContent:a,ignoreList:c}=n,C=i+1,Q=s.map((g,f)=>{const r={importer:A,depth:C,source:g||"",content:void 0,ignore:void 0},m=e(r.source,r),{source:K,content:p,ignore:S}=r;if(m)return Ct(new nt(m,K),e,K,C);const x=p!==void 0?p:a?a[f]:null,H=S!==void 0?S:c?c.includes(f):!1;return cr(K,x,H)});return Qt(n,Q)}u(Ct,"build");class fr{static{u(this,"SourceMap")}constructor(e,A){const i=A.decodedMappings?ct(e):tr(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,A.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function Et(n,e,A){const i={excludeContent:!!A,decodedMappings:!1},s=ur(n,e);return new fr(hr(s),i)}u(Et,"remapping");const Qr=u((n,e,A)=>{const i=[],s={code:e};for(const a of A){const c=a(n,s.code);c&&(Object.assign(s,c),i.unshift(c.map))}return{...s,map:Et(i,()=>null)}},"applyTransformersSync"),gr=u(async(n,e,A)=>{const i=[],s={code:e};for(const a of A){const c=await a(n,s.code);c&&(Object.assign(s,c),i.unshift(c.map))}return{...s,map:Et(i,()=>null)}},"applyTransformers"),Cr=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),Bt={...Cr,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE,minifyWhitespace:!0,keepNames:!0},dt=u(n=>{const e=n.sourcefile;if(e){const A=Z.extname(e.split("?")[0]);A?A===".cts"||A===".mts"?n.sourcefile=`${e.slice(0,-3)}ts`:A===".mjs"&&(n.sourcefile=`${e.slice(0,-3)}js`):n.sourcefile+=".js"}return A=>(A.map&&(n.sourcefile!==e&&(A.map=A.map.replace(JSON.stringify(n.sourcefile),JSON.stringify(e))),A.map=JSON.parse(A.map)),A)},"patchOptions"),wt=u(n=>{throw n.name="TransformError",delete n.errors,delete n.warnings,n},"formatEsbuildError"),Er=u((n,e,A)=>{const[i,s]=e.split("?"),a={};i.endsWith(".cjs")||i.endsWith(".cts")||(a["import.meta.url"]=JSON.stringify(Tt(i)+(s?`?${s}`:"")));const c={...Bt,format:"cjs",sourcefile:i,define:a,banner:"(()=>{",footer:"})()",platform:"node",...A},C=Je([n,JSON.stringify(c),Se,Te].join("-"));let Q=ne.get(C);return Q||(Q=Qr(e,n,[(g,f)=>{const r=dt(c);let m;try{m=Zt(f,c)}catch(K){throw wt(K)}return r(m)},(g,f)=>be(g,f,!0)]),ne.set(C,Q)),Q},"transformSync"),Br=u(async(n,e,A)=>{const i={...Bt,format:"esm",sourcefile:e,...A},s=Je([n,JSON.stringify(i),Se,Te].join("-"));let a=ne.get(s);return a||(a=await gr(e,n,[async(c,C)=>{const Q=dt(i);let g;try{g=await $t(C,i)}catch(f){throw wt(f)}return Q(g)},(c,C)=>be(c,C,!0)]),ne.set(s,a)),a},"transform");export{Er as a,be as b,wA as i,Ze as r,Br as t};