@compass-labs/api-sdk 2.2.108-rc.0 → 2.2.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/lib/config.js.map +1 -1
  4. package/dist/commonjs/models/components/creditswaprequest.d.ts +8 -3
  5. package/dist/commonjs/models/components/creditswaprequest.d.ts.map +1 -1
  6. package/dist/commonjs/models/components/creditswaprequest.js +2 -1
  7. package/dist/commonjs/models/components/creditswaprequest.js.map +1 -1
  8. package/dist/commonjs/models/components/creditswapresponse.d.ts +6 -6
  9. package/dist/commonjs/models/components/creditswapresponse.js +1 -1
  10. package/dist/commonjs/models/components/perpetualtradingopportunity.d.ts +4 -0
  11. package/dist/commonjs/models/components/perpetualtradingopportunity.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/perpetualtradingopportunity.js +2 -0
  13. package/dist/commonjs/models/components/perpetualtradingopportunity.js.map +1 -1
  14. package/dist/esm/lib/config.d.ts +2 -2
  15. package/dist/esm/lib/config.js +2 -2
  16. package/dist/esm/lib/config.js.map +1 -1
  17. package/dist/esm/models/components/creditswaprequest.d.ts +8 -3
  18. package/dist/esm/models/components/creditswaprequest.d.ts.map +1 -1
  19. package/dist/esm/models/components/creditswaprequest.js +2 -1
  20. package/dist/esm/models/components/creditswaprequest.js.map +1 -1
  21. package/dist/esm/models/components/creditswapresponse.d.ts +6 -6
  22. package/dist/esm/models/components/creditswapresponse.js +1 -1
  23. package/dist/esm/models/components/perpetualtradingopportunity.d.ts +4 -0
  24. package/dist/esm/models/components/perpetualtradingopportunity.d.ts.map +1 -1
  25. package/dist/esm/models/components/perpetualtradingopportunity.js +2 -0
  26. package/dist/esm/models/components/perpetualtradingopportunity.js.map +1 -1
  27. package/docs/models/components/creditswaprequest.md +12 -11
  28. package/docs/models/components/creditswaprequestpricing.md +1 -1
  29. package/docs/models/components/creditswapresponse.md +7 -7
  30. package/docs/models/components/creditswapresponseswapprovider.md +1 -1
  31. package/docs/models/components/perpetualtradingopportunity.md +14 -12
  32. package/examples/node_modules/tsx/dist/cjs/api/index.cjs +2 -1
  33. package/examples/node_modules/tsx/dist/cjs/api/index.d.cts +3 -3
  34. package/examples/node_modules/tsx/dist/cjs/api/index.d.mts +3 -3
  35. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +2 -1
  36. package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -1
  37. package/examples/node_modules/tsx/dist/cli.mjs +28 -28
  38. package/examples/node_modules/tsx/dist/client-XItNFmsq.cjs +1 -0
  39. package/examples/node_modules/tsx/dist/esm/api/index.cjs +2 -1
  40. package/examples/node_modules/tsx/dist/esm/api/index.d.cts +5 -3
  41. package/examples/node_modules/tsx/dist/esm/api/index.d.mts +5 -3
  42. package/examples/node_modules/tsx/dist/esm/api/index.mjs +2 -1
  43. package/examples/node_modules/tsx/dist/esm/index.mjs +2 -1
  44. package/examples/node_modules/tsx/dist/index-Bqjv9TxC.mjs +1 -0
  45. package/examples/node_modules/tsx/dist/index-DE3OBZuV.mjs +14 -0
  46. package/examples/node_modules/tsx/dist/{lexer-DgIbo0BU.cjs → lexer-CGfpMDSb.cjs} +2 -2
  47. package/examples/node_modules/tsx/dist/{lexer-DQCqS3nf.mjs → lexer-CanA6ArK.mjs} +2 -2
  48. package/examples/node_modules/tsx/dist/loader.mjs +2 -1
  49. package/examples/node_modules/tsx/dist/package-Dj0mHsMt.mjs +1 -0
  50. package/examples/node_modules/tsx/dist/preflight.cjs +1 -1
  51. package/examples/node_modules/tsx/dist/register-B1c7OH6V.cjs +23 -0
  52. package/examples/node_modules/tsx/dist/register-nyXW-TH3.mjs +2 -0
  53. package/examples/node_modules/tsx/dist/repl.mjs +4 -3
  54. package/examples/node_modules/tsx/dist/require-CBjy4Foe.mjs +10 -0
  55. package/examples/node_modules/tsx/dist/require-CVaYn9z3.cjs +1 -0
  56. package/examples/node_modules/tsx/dist/temporary-directory-Du7LpLp9.mjs +1 -0
  57. package/examples/node_modules/tsx/package.json +4 -1
  58. package/examples/package-lock.json +3 -3
  59. package/openapi_prepped_for_speakeasy.json +17 -5
  60. package/package.json +1 -1
  61. package/src/lib/config.ts +2 -2
  62. package/src/models/components/creditswaprequest.ts +9 -3
  63. package/src/models/components/creditswapresponse.ts +6 -6
  64. package/src/models/components/perpetualtradingopportunity.ts +6 -0
  65. package/examples/node_modules/tsx/dist/cjs/index.mjs +0 -1
  66. package/examples/node_modules/tsx/dist/cli.cjs +0 -54
  67. package/examples/node_modules/tsx/dist/client-D3mGB526.cjs +0 -1
  68. package/examples/node_modules/tsx/dist/client-D_mPDF5S.mjs +0 -1
  69. package/examples/node_modules/tsx/dist/esm/index.cjs +0 -1
  70. package/examples/node_modules/tsx/dist/get-pipe-path-D4YM6rQt.cjs +0 -1
  71. package/examples/node_modules/tsx/dist/get-pipe-path-_tAJyU_v.mjs +0 -1
  72. package/examples/node_modules/tsx/dist/index-BWFBUo6r.cjs +0 -1
  73. package/examples/node_modules/tsx/dist/index-D1vYaNWZ.cjs +0 -14
  74. package/examples/node_modules/tsx/dist/index-DCefr8NP.mjs +0 -14
  75. package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +0 -1
  76. package/examples/node_modules/tsx/dist/loader.cjs +0 -1
  77. package/examples/node_modules/tsx/dist/node-features-CEjg7cMX.cjs +0 -1
  78. package/examples/node_modules/tsx/dist/node-features-JeyyvQz6.mjs +0 -1
  79. package/examples/node_modules/tsx/dist/package-B1lIY_Tn.cjs +0 -1
  80. package/examples/node_modules/tsx/dist/package-BL7Whz21.mjs +0 -1
  81. package/examples/node_modules/tsx/dist/patch-repl.mjs +0 -1
  82. package/examples/node_modules/tsx/dist/preflight.mjs +0 -1
  83. package/examples/node_modules/tsx/dist/register-DHgpdRjs.mjs +0 -10
  84. package/examples/node_modules/tsx/dist/register-DjPW2kSr.cjs +0 -2
  85. package/examples/node_modules/tsx/dist/register-OY9cqBEN.cjs +0 -10
  86. package/examples/node_modules/tsx/dist/register-SoqaU4rg.mjs +0 -2
  87. package/examples/node_modules/tsx/dist/repl.cjs +0 -3
  88. package/examples/node_modules/tsx/dist/require-Blr_8TcJ.cjs +0 -1
  89. package/examples/node_modules/tsx/dist/require-Cuv-0BLU.mjs +0 -1
  90. package/examples/node_modules/tsx/dist/suppress-warnings.mjs +0 -1
  91. package/examples/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +0 -1
  92. package/examples/node_modules/tsx/dist/temporary-directory-BDDVQOvU.mjs +0 -1
  93. package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +0 -5
@@ -0,0 +1,23 @@
1
+ "use strict";var Mr=Object.defineProperty;var l=(t,e)=>Mr(t,"name",{value:e,configurable:!0});var K=require("node:module"),C=require("node:path"),le=require("node:url"),V=require("node:fs"),Fr=require("fs"),Br=require("os"),Wr=require("path"),Ne=require("esbuild"),Jr=require("node:crypto"),Vr=require("node:os"),ut=require("./client-XItNFmsq.cjs"),zr=require("node:util");const Ft=l(t=>t!==null&&typeof t=="object","A"),ue=l((t,e)=>Object.assign(new Error(`[${t}]: ${e}`),{code:t}),"a$1"),Bt="ERR_INVALID_PACKAGE_CONFIG",ft="ERR_INVALID_PACKAGE_TARGET",Gr="ERR_PACKAGE_PATH_NOT_EXPORTED",Kr=/^\d+$/,Qr=/^(\.{1,2}|node_modules)$/i,Hr=/\/|\\/;var Wt=(t=>(t.Export="exports",t.Import="imports",t))(Wt||{});const ht=l((t,e,n,r,o)=>{if(e==null)return[];if(typeof e=="string"){const[a,...c]=e.split(Hr);if(a===".."||c.some(p=>Qr.test(p)))throw ue(ft,`Invalid "${t}" target "${e}" defined in the package config`);return[o?e.replace(/\*/g,o):e]}if(Array.isArray(e))return e.flatMap(a=>ht(t,a,n,r,o));if(Ft(e)){for(const a of Object.keys(e)){if(Kr.test(a))throw ue(Bt,"Cannot contain numeric property keys");if(a==="default"||r.includes(a))return ht(t,e[a],n,r,o)}return[]}throw ue(ft,`Invalid "${t}" target "${e}"`)},"f$1"),ye="*",qr=l((t,e)=>{const n=t.indexOf(ye),r=e.indexOf(ye);return n===r?e.length>t.length:r>n},"m");function Xr(t,e){if(!e.includes(ye)&&t.hasOwnProperty(e))return[e];let n,r;for(const o of Object.keys(t))if(o.includes(ye)){const[a,c,p]=o.split(ye);if(p===void 0&&e.startsWith(a)&&e.endsWith(c)){const d=e.slice(a.length,-c.length||void 0);d&&(!n||qr(n,o))&&(n=o,r=d)}}return[n,r]}l(Xr,"d");const Yr=l(t=>Object.keys(t).reduce((e,n)=>{const r=n===""||n[0]!==".";if(e===void 0||e===r)return r;throw ue(Bt,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),Zr=/^\w+:/,es=l((t,e,n)=>{if(!t)throw new Error('"exports" is required');e=e===""?".":`./${e}`,(typeof t=="string"||Array.isArray(t)||Ft(t)&&Yr(t))&&(t={".":t});const[r,o]=Xr(t,e),a=ht(Wt.Export,t[r],e,n,o);if(a.length===0)throw ue(Gr,e==="."?'No "exports" main defined':`Package subpath '${e}' is not defined by "exports"`);for(const c of a)if(!c.startsWith("./")&&!Zr.test(c))throw ue(ft,`Invalid "exports" target "${c}" defined in the package config`);return a},"v");var ts=Object.defineProperty,w=l((t,e)=>ts(t,"name",{value:e,configurable:!0}),"i$1");function J(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}l(J,"x"),w(J,"slash");const ns=w((t,e)=>{const n=`readFileSync:${e}`;let r=t?.get(n);return r===void 0&&(r=V.readFileSync(e,"utf8"),t?.set(n,r)),r},"readFile"),q=w((t,e)=>{const n=`tryStat:${e}`;let r=t?.get(n);if(r===void 0){try{r=V.statSync(e)}catch{r=null}t?.set(n,r)}return r??void 0},"tryStat"),ve=w((t,e,n)=>{for(;;){const r=C.posix.join(t,e);if(q(n,r))return r;const o=C.dirname(t);if(o===t)return;t=o}},"findUp");function Jt(t,e=!1){const n=t.length;let r=0,o="",a=0,c=16,p=0,d=0,h=0,f=0,i=0;function S(k,v){let N=0,T=0;for(;N<k;){let j=t.charCodeAt(r);if(j>=48&&j<=57)T=T*16+j-48;else if(j>=65&&j<=70)T=T*16+j-65+10;else if(j>=97&&j<=102)T=T*16+j-97+10;else break;r++,N++}return N<k&&(T=-1),T}l(S,"A"),w(S,"scanHexDigits");function x(k){r=k,o="",a=0,c=16,i=0}l(x,"O"),w(x,"setPosition");function O(){let k=r;if(t.charCodeAt(r)===48)r++;else for(r++;r<t.length&&se(t.charCodeAt(r));)r++;if(r<t.length&&t.charCodeAt(r)===46)if(r++,r<t.length&&se(t.charCodeAt(r)))for(r++;r<t.length&&se(t.charCodeAt(r));)r++;else return i=3,t.substring(k,r);let v=r;if(r<t.length&&(t.charCodeAt(r)===69||t.charCodeAt(r)===101))if(r++,(r<t.length&&t.charCodeAt(r)===43||t.charCodeAt(r)===45)&&r++,r<t.length&&se(t.charCodeAt(r))){for(r++;r<t.length&&se(t.charCodeAt(r));)r++;v=r}else i=3;return t.substring(k,v)}l(O,"h"),w(O,"scanNumber");function _(){let k="",v=r;for(;;){if(r>=n){k+=t.substring(v,r),i=2;break}const N=t.charCodeAt(r);if(N===34){k+=t.substring(v,r),r++;break}if(N===92){if(k+=t.substring(v,r),r++,r>=n){i=2;break}switch(t.charCodeAt(r++)){case 34:k+='"';break;case 92:k+="\\";break;case 47:k+="/";break;case 98:k+="\b";break;case 102:k+="\f";break;case 110:k+=`
2
+ `;break;case 114:k+="\r";break;case 116:k+=" ";break;case 117:const T=S(4);T>=0?k+=String.fromCharCode(T):i=4;break;default:i=5}v=r;continue}if(N>=0&&N<=31)if(fe(N)){k+=t.substring(v,r),i=2;break}else i=6;r++}return k}l(_,"D"),w(_,"scanString");function y(){if(o="",i=0,a=r,d=p,f=h,r>=n)return a=n,c=17;let k=t.charCodeAt(r);if(De(k)){do r++,o+=String.fromCharCode(k),k=t.charCodeAt(r);while(De(k));return c=15}if(fe(k))return r++,o+=String.fromCharCode(k),k===13&&t.charCodeAt(r)===10&&(r++,o+=`
3
+ `),p++,h=r,c=14;switch(k){case 123:return r++,c=1;case 125:return r++,c=2;case 91:return r++,c=3;case 93:return r++,c=4;case 58:return r++,c=6;case 44:return r++,c=5;case 34:return r++,o=_(),c=10;case 47:const v=r-1;if(t.charCodeAt(r+1)===47){for(r+=2;r<n&&!fe(t.charCodeAt(r));)r++;return o=t.substring(v,r),c=12}if(t.charCodeAt(r+1)===42){r+=2;const N=n-1;let T=!1;for(;r<N;){const j=t.charCodeAt(r);if(j===42&&t.charCodeAt(r+1)===47){r+=2,T=!0;break}r++,fe(j)&&(j===13&&t.charCodeAt(r)===10&&r++,p++,h=r)}return T||(r++,i=1),o=t.substring(v,r),c=13}return o+=String.fromCharCode(k),r++,c=16;case 45:if(o+=String.fromCharCode(k),r++,r===n||!se(t.charCodeAt(r)))return c=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=O(),c=11;default:for(;r<n&&E(k);)r++,k=t.charCodeAt(r);if(a!==r){switch(o=t.substring(a,r),o){case"true":return c=8;case"false":return c=9;case"null":return c=7}return c=16}return o+=String.fromCharCode(k),r++,c=16}}l(y,"c"),w(y,"scanNext");function E(k){if(De(k)||fe(k))return!1;switch(k){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}l(E,"p"),w(E,"isUnknownContentCharacter");function R(){let k;do k=y();while(k>=12&&k<=15);return k}return l(R,"b"),w(R,"scanNextNonTrivia"),{setPosition:x,getPosition:w(()=>r,"getPosition"),scan:e?R:y,getToken:w(()=>c,"getToken"),getTokenValue:w(()=>o,"getTokenValue"),getTokenOffset:w(()=>a,"getTokenOffset"),getTokenLength:w(()=>r-a,"getTokenLength"),getTokenStartLine:w(()=>d,"getTokenStartLine"),getTokenStartCharacter:w(()=>a-f,"getTokenStartCharacter"),getTokenError:w(()=>i,"getTokenError")}}l(Jt,"Ne"),w(Jt,"createScanner");function De(t){return t===32||t===9}l(De,"X"),w(De,"isWhiteSpace");function fe(t){return t===10||t===13}l(fe,"P"),w(fe,"isLineBreak");function se(t){return t>=48&&t<=57}l(se,"S"),w(se,"isDigit");var Vt;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(Vt||(Vt={})),new Array(20).fill(0).map((t,e)=>" ".repeat(e));const he=200;new Array(he).fill(0).map((t,e)=>`
4
+ `+" ".repeat(e)),new Array(he).fill(0).map((t,e)=>"\r"+" ".repeat(e)),new Array(he).fill(0).map((t,e)=>`\r
5
+ `+" ".repeat(e)),new Array(he).fill(0).map((t,e)=>`
6
+ `+" ".repeat(e)),new Array(he).fill(0).map((t,e)=>"\r"+" ".repeat(e)),new Array(he).fill(0).map((t,e)=>`\r
7
+ `+" ".repeat(e));var Ue;(function(t){t.DEFAULT={allowTrailingComma:!1}})(Ue||(Ue={}));function zt(t,e=[],n=Ue.DEFAULT){let r=null,o=[];const a=[];function c(p){Array.isArray(o)?o.push(p):r!==null&&(o[r]=p)}return l(c,"l"),w(c,"onValue"),Gt(t,{onObjectBegin:w(()=>{const p={};c(p),a.push(o),o=p,r=null},"onObjectBegin"),onObjectProperty:w(p=>{r=p},"onObjectProperty"),onObjectEnd:w(()=>{o=a.pop()},"onObjectEnd"),onArrayBegin:w(()=>{const p=[];c(p),a.push(o),o=p,r=null},"onArrayBegin"),onArrayEnd:w(()=>{o=a.pop()},"onArrayEnd"),onLiteralValue:c,onError:w((p,d,h)=>{e.push({error:p,offset:d,length:h})},"onError")},n),o[0]}l(zt,"Re"),w(zt,"parse$1");function Gt(t,e,n=Ue.DEFAULT){const r=Jt(t,!1),o=[];let a=0;function c(L){return L?()=>a===0&&L(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}l(c,"l"),w(c,"toNoArgVisit");function p(L){return L?F=>a===0&&L(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}l(p,"g"),w(p,"toOneArgVisit");function d(L){return L?F=>a===0&&L(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}l(d,"m"),w(d,"toOneArgVisitWithPath");function h(L){return L?()=>{a>0?a++:L(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(a=1)}:()=>!0}l(h,"k"),w(h,"toBeginVisit");function f(L){return L?()=>{a>0&&a--,a===0&&L(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}l(f,"w"),w(f,"toEndVisit");const i=h(e.onObjectBegin),S=d(e.onObjectProperty),x=f(e.onObjectEnd),O=h(e.onArrayBegin),_=f(e.onArrayEnd),y=d(e.onLiteralValue),E=p(e.onSeparator),R=c(e.onComment),k=p(e.onError),v=n&&n.disallowComments,N=n&&n.allowTrailingComma;function T(){for(;;){const L=r.scan();switch(r.getTokenError()){case 4:j(14);break;case 5:j(15);break;case 3:j(13);break;case 1:v||j(11);break;case 2:j(12);break;case 6:j(16);break}switch(L){case 12:case 13:v?j(10):R();break;case 16:j(1);break;case 15:case 14:break;default:return L}}}l(T,"v"),w(T,"scanNext");function j(L,F=[],Ie=[]){if(k(L),F.length+Ie.length>0){let X=r.getToken();for(;X!==17;){if(F.indexOf(X)!==-1){T();break}else if(Ie.indexOf(X)!==-1)break;X=T()}}}l(j,"d"),w(j,"handleError");function Q(L){const F=r.getTokenValue();return L?y(F):(S(F),o.push(F)),T(),!0}l(Q,"L"),w(Q,"parseString");function z(){switch(r.getToken()){case 11:const L=r.getTokenValue();let F=Number(L);isNaN(F)&&(j(2),F=0),y(F);break;case 7:y(null);break;case 8:y(!0);break;case 9:y(!1);break;default:return!1}return T(),!0}l(z,"B"),w(z,"parseLiteral");function G(){return r.getToken()!==10?(j(3,[],[2,5]),!1):(Q(!1),r.getToken()===6?(E(":"),T(),Z()||j(4,[],[2,5])):j(5,[],[2,5]),o.pop(),!0)}l(G,"$"),w(G,"parseProperty");function Y(){i(),T();let L=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(L||j(4,[],[]),E(","),T(),r.getToken()===2&&N)break}else L&&j(6,[],[]);G()||j(4,[],[2,5]),L=!0}return x(),r.getToken()!==2?j(7,[2],[]):T(),!0}l(Y,"N"),w(Y,"parseObject");function W(){O(),T();let L=!0,F=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(F||j(4,[],[]),E(","),T(),r.getToken()===4&&N)break}else F&&j(6,[],[]);L?(o.push(0),L=!1):o[o.length-1]++,Z()||j(4,[],[4,5]),F=!0}return _(),L||o.pop(),r.getToken()!==4?j(8,[4],[]):T(),!0}l(W,"$e"),w(W,"parseArray");function Z(){switch(r.getToken()){case 3:return W();case 1:return Y();case 10:return Q(!0);default:return z()}}return l(Z,"H"),w(Z,"parseValue"),T(),r.getToken()===17?n.allowEmptyContent?!0:(j(4,[],[]),!1):Z()?(r.getToken()!==17&&j(9,[],[]),!0):(j(4,[],[]),!1)}l(Gt,"Pe"),w(Gt,"visit");var Kt;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(Kt||(Kt={}));var Qt;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(Qt||(Qt={}));const rs=zt;var Ht;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(Ht||(Ht={}));const dt=w((t,e)=>rs(ns(e,t)),"readJsonc"),qt=w(()=>{const{findPnpApi:t}=K;return t&&t(process.cwd())},"getPnpApi"),ss="detectTypeScriptVersion:",is=w((t,e)=>{const n=`${ss}${t}`,r=e?.get(n);if(r!==void 0)return r??void 0;let o;const a=qt();if(a)try{o=a.resolveRequest("typescript/package.json",t)??void 0}catch{}o??=ve(C.resolve(t),C.join("node_modules","typescript","package.json"),e);let c;if(o)try{const p=dt(o,e);typeof p?.version=="string"&&(c=p.version)}catch{}return e?.set(n,c??null),c},"detectTypeScriptVersion"),ie="package.json",Me="tsconfig.json",os=w((t,e,n)=>{const r=K.createRequire(C.join(n,"tsconfig.json"));if(t!==e)try{return r.resolve(t)}catch{}try{return r.resolve(e)}catch{}try{return r.resolve(`${e}/${ie}`)}catch{}},"resolvePackageEntryWithNode"),pt=w((t,e,n,r)=>{const o=`resolveFromPackageJsonPath:${t}:${e}:${n}`;if(r?.has(o))return r.get(o)||!1;const a=dt(t,r);if(!a)return;let c=e||Me;if(!n&&a.exports)try{const[p]=es(a.exports,e,["require","types"]);c=p}catch{return r?.set(o,""),!1}else!e&&a.tsconfig&&(c=a.tsconfig);return c=C.join(t,"..",c),r?.set(o,c),c},"resolveFromPackageJsonPath"),as=w((t,e,n)=>{const r=`resolveExtendsPath:${t}:${e}`;if(n?.has(r))return n.get(r)||void 0;const o=cs(t,e,n);return n?.set(r,o||""),o},"resolveExtendsPath"),cs=w((t,e,n)=>{let r=t;if(t===".."&&(r=C.join(r,Me)),t[0]==="."&&(r=C.resolve(e,r)),C.isAbsolute(r)){const y=q(n,r);if(y){if(y.isFile())return r}else if(!r.endsWith(".json")){const E=`${r}.json`;if(q(n,E))return E}return}const[o,...a]=t.split("/"),c=o[0]==="@"?`${o}/${a.shift()}`:o,p=a.join("/"),d=qt();if(d){const{resolveRequest:y}=d;try{if(c===t){const E=y(C.join(c,ie),e);if(E){const R=pt(E,p,!1,n);if(R&&q(n,R))return R}}else{let E;try{E=y(t,e,{extensions:[".json"]})}catch{E=y(C.join(t,Me),e)}if(E)return E}}catch{}}const h=os(t,c,e);let f;if(h){if(C.basename(h)!==ie&&h.endsWith(".json"))return h;f=C.basename(h)===ie?h:ve(C.dirname(h),ie,n)}const i=f&&C.dirname(f)||ve(C.resolve(e),C.join("node_modules",c),n);if(!i||!q(n,i)?.isDirectory())return;const S=C.join(i,ie);if(q(n,S)){const y=pt(S,p,!1,n);if(y===!1)return;if(y&&q(n,y)?.isFile())return y}const x=C.join(i,p),O=x.endsWith(".json");if(!O){const y=`${x}.json`;if(q(n,y))return y}const _=q(n,x);if(_){if(_.isDirectory()){const y=C.join(x,ie);if(q(n,y)){const R=pt(y,"",!0,n);if(R&&q(n,R))return R}const E=C.join(x,Me);if(q(n,E))return E}else if(O)return x}},"resolveExtendsPathUncached"),gt=Symbol("implicitBaseUrl"),te="${configDir}",mt=/^\.{1,2}(\/.*)?$/,Fe=w(t=>{const e=J(t);return mt.test(e)?e:`./${e}`},"normalizeRelativePath"),ls=w(t=>{const e={...t};if(e.strict){const n=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const r of n)e[r]===void 0&&(e[r]=!0)}if(e.composite&&(e.declaration??=!0,e.incremental??=!0),e.target){let n=e.target.toLowerCase();n==="es2015"&&(n="es6"),e.target=n,n==="esnext"&&(e.module??="es6",e.useDefineForClassFields??=!0),(n==="es6"||n==="es2016"||n==="es2017"||n==="es2018"||n==="es2019"||n==="es2020"||n==="es2021"||n==="es2022"||n==="es2023"||n==="es2024"||n==="es2025")&&(e.module??="es6"),(n==="es2022"||n==="es2023"||n==="es2024"||n==="es2025")&&(e.useDefineForClassFields??=!0)}if(e.module){let n=e.module.toLowerCase();if(n==="es2015"&&(n="es6"),e.module=n,(n==="es6"||n==="es2020"||n==="es2022"||n==="esnext"||n==="none"||n==="system"||n==="umd"||n==="amd")&&(e.moduleResolution??="classic"),n==="system"&&(e.allowSyntheticDefaultImports??=!0),(n==="node16"||n==="node18"||n==="node20"||n==="nodenext"||n==="preserve")&&(e.esModuleInterop??=!0,e.allowSyntheticDefaultImports??=!0),(n==="node16"||n==="node18"||n==="node20"||n==="nodenext")&&(e.moduleDetection??="force"),(n==="node16"||n==="node18")&&(e.target??="es2022",e.moduleResolution??="node16"),n==="node20"&&(e.target??="es2023",e.moduleResolution??="node16",e.resolveJsonModule??=!0),n==="nodenext"&&(e.target??="esnext",e.moduleResolution??="nodenext",e.resolveJsonModule??=!0),n==="node16"||n==="node18"||n==="node20"||n==="nodenext"){const r=e.target;(r==="es3"||r==="es2022"||r==="es2023"||r==="es2024"||r==="esnext")&&(e.useDefineForClassFields??=!0)}n==="preserve"&&(e.moduleResolution??="bundler")}if(e.moduleResolution){let n=e.moduleResolution.toLowerCase();n==="node"&&(n="node10"),e.moduleResolution=n,(n==="node16"||n==="nodenext"||n==="bundler")&&(e.resolvePackageJsonExports??=!0,e.resolvePackageJsonImports??=!0),n==="bundler"&&(e.allowSyntheticDefaultImports??=!0,e.resolveJsonModule??=!0)}for(const n of["jsx","moduleDetection","importsNotUsedAsValues","newLine"])e[n]&&(e[n]=e[n].toLowerCase());return e.esModuleInterop&&(e.allowSyntheticDefaultImports??=!0),e.verbatimModuleSyntax&&(e.isolatedModules??=!0,e.preserveConstEnums??=!0),e.isolatedModules&&(e.preserveConstEnums??=!0),e.rewriteRelativeImportExtensions&&(e.allowImportingTsExtensions??=!0),e.lib&&(e.lib=e.lib.map(n=>n.toLowerCase())),e.checkJs&&(e.allowJs??=!0),e},"normalizeCompilerOptions"),us=w((t,e)=>{!e.has("target")&&!fs(t.module)&&(t.target="es3")},"applyV4Defaults"),fs=w(t=>t==="node16"||t==="node18"||t==="node20"||t==="nodenext","moduleDictatesTarget$1"),hs=w((t,e)=>{!e.has("target")&&!ds(t.module)&&(t.target="es5")},"applyV5Defaults"),ds=w(t=>t==="node16"||t==="node18"||t==="node20"||t==="nodenext","moduleDictatesTarget"),ps=w((t,e)=>{e.has("strict")||(t.strict=!0),e.has("target")||(t.target="es2025"),e.has("module")||(t.module="es2022"),e.has("moduleResolution")||(t.moduleResolution="bundler"),e.has("rootDir")||(t.rootDir="."),e.has("types")||(t.types=[]),e.has("noUncheckedSideEffectImports")||(t.noUncheckedSideEffectImports=!0),e.has("libReplacement")||(t.libReplacement=!1)},"applyV6Defaults"),gs=[[4,us],[5,hs],[6,ps]],ms=w(t=>{const e=/^v?(\d+)/.exec(t);return e?Number(e[1]):void 0},"parseMajor"),bs=w((t,e)=>{const n=ms(e);if(n===void 0)return;const r=new Set(Object.keys(t));for(const[o,a]of gs)o<=n&&a(t,r)},"applyVersionDefaults"),bt=w((t,e)=>Fe(C.relative(t,e)),"pathRelative"),Xt=["files","include","exclude"],Yt=w((t,e,n)=>{const r=C.join(e,n),o=C.relative(t,r);return J(o)||"./"},"resolveAndRelativize"),ws=w((t,e,n)=>{const r=C.relative(t,e);if(!r)return n;const o=n.startsWith("./")?n.slice(2):n;return J(`${r}/${o}`)},"prefixPattern"),Zt=["outDir","declarationDir"],Be=w((t,e)=>{if(t.startsWith(te))return J(C.join(e,t.slice(te.length)))},"interpolateConfigDir"),ks=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],ys=w((t,e={})=>{if(t.length===0)throw new Error("Chain must not be empty");const{typescriptVersion:n}=e,r=new Map(t.map(i=>[i.path,i])),o=new Map,a=w(i=>{const S=o.get(i);if(S)return S;const x=r.get(i);if(!x)throw new Error(`Config not found in chain: ${i}`);const O=x.config,_=C.dirname(i);let y={...O,...O.compilerOptions&&{compilerOptions:{...O.compilerOptions}},...O.watchOptions&&{watchOptions:{...O.watchOptions}}};if(delete y.extends,y.compilerOptions?.paths&&!y.compilerOptions.baseUrl&&(y.compilerOptions[gt]=_),O.extends){const E=Array.isArray(O.extends)?O.extends:[O.extends];for(const R of E.toReversed()){const k=a(R),v=C.dirname(R),{references:N,...T}=k;if(T.compilerOptions){const Q={...T.compilerOptions};for(const z of["baseUrl","outDir","declarationDir","rootDir"]){const G=Q[z];G&&!G.startsWith(te)&&(Q[z]=Yt(_,v,G))}for(const z of["rootDirs","typeRoots"]){const G=Q[z];G&&(Q[z]=G.map(Y=>Y.startsWith(te)?Y:Yt(_,v,Y)))}T.compilerOptions=Q}for(const Q of Xt){const z=T[Q];z&&(T[Q]=z.map(G=>G.startsWith(te)?G:ws(_,v,G)))}const j={...T,...y,compilerOptions:{...T.compilerOptions,...y.compilerOptions}};T.watchOptions&&(j.watchOptions={...T.watchOptions,...y.watchOptions}),y=j}}if(y.compilerOptions){const{compilerOptions:E}=y,R=["baseUrl","rootDir"];for(const k of R){const v=E[k];if(v&&!v.startsWith(te)){const N=C.resolve(_,v),T=bt(_,N);E[k]=T}}for(const k of Zt){let v=E[k];v&&(Array.isArray(y.exclude)||(y.exclude=Zt.map(N=>E[N]).filter(Boolean)),v.startsWith(te)||(v=Fe(v)),E[k]=v)}}else y.compilerOptions={};if(y.include&&(y.include=y.include.map(J)),y.files&&(y.files=y.files.map(E=>E.startsWith(te)?E:Fe(E))),y.watchOptions){const{watchOptions:E}=y;for(const R of["excludeDirectories","excludeFiles"])E[R]&&(E[R]=E[R].map(k=>J(C.resolve(_,k))));for(const R of["watchFile","watchDirectory","fallbackPolling"])if(E[R]){const k=E;k[R]=E[R].toLowerCase()}}return o.set(i,y),y},"resolveEntry"),c=t[0],p=a(c.path),d=C.dirname(c.path),h={...p,compilerOptions:p.compilerOptions?{...p.compilerOptions}:{}},{compilerOptions:f}=h;if(f){for(const i of ks){const S=f[i];if(S){const x=Be(S,d);f[i]=x?bt(d,x):S}}for(const i of["rootDirs","typeRoots"]){const S=f[i];S&&(f[i]=S.map(x=>{const O=Be(x,d);return O?bt(d,O):Fe(x)}))}if(f.paths){const i={};for(const[S,x]of Object.entries(f.paths))i[S]=x.map(O=>Be(O,d)??O);f.paths=i}n&&bs(f,n),h.compilerOptions=ls(f)}for(const i of Xt){const S=h[i];S&&(h[i]=S.map(x=>Be(x,d)??x))}return{path:c.path,config:h,sources:t.map(i=>i.path)}},"resolveExtendsChain"),vs=w((t,e={})=>{const{cache:n=new Map}=e,r=C.resolve(t),o=[],a=new Set,c=w((p,d)=>{const h=J(p);if(a.has(h))return;a.add(h);let f;try{f=dt(p,n)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${p}`)}if(typeof f!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${p}`);const i=C.dirname(p);if(f.extends){const S=Array.isArray(f.extends),x=(S?f.extends:[f.extends]).map(_=>{const y=as(_,i,n);if(!y)throw new Error(`File '${_}' not found.`);const E=J(y);if(d.has(E)||E===h)throw new Error(`Circularity detected while resolving configuration: ${E}`);return E});f.extends=S?x:x[0],o.push({path:h,config:f});const O=new Set(d);O.add(h);for(const _ of[...x].reverse())c(_,O)}else o.push({path:h,config:f})},"collect");return c(r,new Set),o},"getExtendsChain"),wt=w((t,e={})=>{const{cache:n=new Map,typescriptVersion:r="auto"}=e,o=vs(t,{cache:n});let a;return r==="auto"?a=is(C.dirname(o[0].path),n):r!==!1&&(a=r),ys(o,{typescriptVersion:a})},"readTsconfig");var Cs=Object.defineProperty,We=w((t,e)=>Cs(t,"name",{value:e,configurable:!0}),"s");const en=We(t=>{let e="";for(let n=0;n<t.length;n+=1){const r=t[n],o=r.toUpperCase();e+=r===o?r.toLowerCase():o}return e},"invertCase"),kt=new Map,tn=We((t,e)=>{const n=Wr.join(t,`.is-fs-case-sensitive-test-${process.pid}`);try{return e.writeFileSync(n,""),!e.existsSync(en(n))}finally{try{e.unlinkSync(n)}catch{}}},"checkDirectoryCaseWithWrite"),xs=We((t,e,n)=>{try{return tn(t,n)}catch(r){if(e===void 0)return tn(Br.tmpdir(),n);throw r}},"checkDirectoryCaseWithFallback"),Ss=We((t,e=Fr,n=!0)=>{const r=t??process.cwd();if(n&&kt.has(r))return kt.get(r);let o;const a=en(r);return a!==r&&e.existsSync(r)?o=!e.existsSync(a):o=xs(r,t,e),n&&kt.set(r,o),o},"isFsCaseSensitive"),{join:nn}=C.posix,yt={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Es=w(t=>{const e=[...yt.ts],n=[...yt.cts],r=[...yt.mts];return t?.allowJs&&(e.push(".js",".jsx"),n.push(".cjs"),r.push(".mjs")),[...e,...n,...r]},"getSupportedExtensions"),Os=w(t=>{const e=[];if(!t)return e;const{outDir:n,declarationDir:r}=t;return n&&e.push(n),r&&e.push(r),e},"getDefaultExcludeSpec"),rn=w(t=>t.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),As=["node_modules","bower_components","jspm_packages"],vt=`(?!(${As.join("|")})(/|$))`,_s=/(?:^|\/)[^.*?]+$/,sn="**/*",Je="[^/]",Ct="[^./]",on=process.platform==="win32",Ts=w(({config:t,path:e},n)=>{if("extends"in t)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or readTsconfig to resolve it.");if(!C.isAbsolute(e))throw new Error("The tsconfig path must be absolute");on&&(e=J(e));const r=C.dirname(e),{files:o,include:a,exclude:c,compilerOptions:p}=t,d=w(_=>C.isAbsolute(_)?_:nn(r,_),"resolvePattern"),h=o?new Set(o.map(d)):void 0,f=Es(p),i=n?"":"i",S=(c||Os(p)).map(_=>{const y=d(_),E=rn(y).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${Je}*`).replaceAll(String.raw`\?`,Je);return new RegExp(`^${E}($|/)`,i)}),x=o||a?a:[sn],O=x?x.map(_=>{let y=d(_);_s.test(y)&&(y=nn(y,sn));const E=rn(y).replaceAll(String.raw`/\*\*`,`(/${vt}${Ct}${Je}*)*?`).replaceAll(/(\/)?\\\*/g,(R,k)=>{const v=String.raw`(${Ct}|(\.(?!min\.js$))?)*`;return k?`/${vt}${Ct}${v}`:v}).replaceAll(/(\/)?\\\?/g,(R,k)=>{const v=Je;return k?`/${vt}${v}`:v});return new RegExp(`^${E}$`,i)}):void 0;return{filesSet:h,extensions:f,excludePatterns:S,includePatterns:O}},"compilePatterns"),an=new WeakMap,xt=w((t,e)=>{if(!C.isAbsolute(e))return!1;on&&(e=J(e));let n=an.get(t);n||(n=Ts(t,Ss()),an.set(t,n));const{filesSet:r,extensions:o,excludePatterns:a,includePatterns:c}=n;return r?.has(e)?!0:!o.some(p=>e.endsWith(p))||a.some(p=>p.test(e))?!1:!!(c&&c.some(p=>p.test(e)))},"isFileIncluded"),cn=w((t,e,n,r)=>{const o=C.resolve(t);let a=J(t);for(;;){const c=ve(a,e,n);if(!c)return;const p=C.resolve(c),d=wt(p,{cache:n,typescriptVersion:r});if(xt(d,o))return d;const h=C.dirname(c),f=C.dirname(h);if(f===h)return;a=f}},"findConfigApplicable"),js=w((t=process.cwd(),e={})=>{const{configName:n="tsconfig.json",cache:r=new Map,includes:o=!1}=e;if(!o){const a=C.resolve(t);return C.basename(a)===n&&q(r,a)?.isFile()?J(a):ve(J(t),n,r)}return cn(t,n,r,!1)?.path},"findTsconfig"),Ls=w((t=process.cwd(),e={})=>{const{configName:n="tsconfig.json",cache:r=new Map,includes:o=!1,typescriptVersion:a="auto"}=e;if(!o){const c=js(t,{configName:n,cache:r});return c?wt(c,{cache:r,typescriptVersion:a}):void 0}return cn(t,n,r,a)},"getTsconfig"),Rs=/\*/g,ln=w((t,e)=>{const n=t.match(Rs);if(n&&n.length>1)throw new Error(e)},"assertStarCount"),$s=w(t=>{if(t.includes("*")){const[e,n]=t.split("*");return{prefix:e,suffix:n}}return t},"parsePattern"),Is=w(({prefix:t,suffix:e},n)=>n.startsWith(t)&&n.endsWith(e),"isPatternMatch"),Ps=w((t,e,n)=>Object.entries(t).map(([r,o])=>(ln(r,`Pattern '${r}' can have at most one '*' character.`),{pattern:$s(r),substitutions:o.map(a=>{if(ln(a,`Substitution '${a}' in pattern '${r}' can have at most one '*' character.`),!e&&!mt.test(a)&&!C.isAbsolute(a))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return C.resolve(n,a)})})),"parsePaths"),Ns=w(t=>{const{compilerOptions:e}=t.config;if(!e)return null;const{baseUrl:n,paths:r}=e;if(!n&&!r)return null;const o=gt in e&&e[gt],a=C.resolve(C.dirname(t.path),n||o||"."),c=r?Ps(r,n,a):[],p=new Map,d=[];for(const h of c)typeof h.pattern=="string"?p.set(h.pattern,h.substitutions):d.push(h);return{exactEntries:p,patternEntries:d,resolvedBaseUrl:a,baseUrl:n}},"compilePaths"),un=new WeakMap,fn=w((t,e)=>{let n=un.get(t);if(n===void 0&&(n=Ns(t),un.set(t,n)),!n)return[];if(mt.test(e))return[];const{exactEntries:r,patternEntries:o,resolvedBaseUrl:a,baseUrl:c}=n,p=r.get(e);if(p)return p.map(J);let d,h=-1;for(const i of o)Is(i.pattern,e)&&i.pattern.prefix.length>h&&(h=i.pattern.prefix.length,d=i);if(!d)return c?[J(C.join(a,e))]:[];const f=e.slice(d.pattern.prefix.length,e.length-d.pattern.suffix.length);return d.substitutions.map(i=>J(i.replace("*",f)))},"resolvePathAlias"),hn=l(t=>{if(t)return wt(t);try{return Ls()??void 0}catch{}},"loadTsconfig"),St=l(t=>Array.from(t).length>0?`?${t.toString()}`:"","urlSearchParamsStringify"),Et=l(t=>t[0]==="."&&(t[1]==="/"||t[1]==="."||t[2]==="/"),"isRelativePath"),de=l(t=>Et(t)||C.isAbsolute(t),"isFilePath"),Ce="file://",Ds=[".ts",".tsx",".jsx",".mts",".cts"],dn=/\.([cm]?ts|[tj]sx)(?:$|[?#])/,Us=/\.(?:ts|tsx|jsx)(?:$|[?#])/,Ms=/[/\\].+\.(?:cts|cjs)(?:$|[?#])/,Fs=/\.json(?:$|[?#])/,Ve=/\/(?:$|[?#])/,Bs=/^(?:@[^/]+\/)?[^/\\]+$/,pn=`${C.sep}node_modules${C.sep}`,Ot=l(t=>t?.split(C.sep).includes("node_modules")??!1,"isDependencyPath"),xe=Symbol.for("tsx:global-cjs-loader-count"),Se=globalThis,Ws=l(()=>(Se[xe]??0)>0,"isGlobalCjsLoaderActive"),Js=l(()=>(Se[xe]=(Se[xe]??0)+1,()=>{Se[xe]=Math.max((Se[xe]??1)-1,0)}),"activateGlobalCjsLoader"),gn=l(t=>Jr.createHash("sha1").update(t).digest("hex"),"sha1");let U,ze,At,Ee=2<<19;const mn=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(t,e){const n=t.length;let r=0;for(;r<n;)e[r]=t.charCodeAt(r++)}:function(t,e){const n=t.length;let r=0;for(;r<n;){const o=t.charCodeAt(r);e[r++]=(255&o)<<8|o>>>8}},Vs="xportmportlassforetaourceromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileifcatcfinallels";let M,bn,$;function zs(t,e="@"){M=t,bn=e;const n=2*M.length+(2<<18);if(n>Ee||!U){for(;n>Ee;)Ee*=2;ze=new ArrayBuffer(Ee),mn(Vs,new Uint16Array(ze,16,110)),U=(function(c,p,d){var h=new c.Int8Array(d),f=new c.Int16Array(d),i=new c.Int32Array(d),S=new c.Uint8Array(d),x=1040;function O(){var s=0,u=0,m=0,g=0,b=0,A=0,I=0;I=x,x=x+10240|0,h[804]=1,h[803]=0,f[399]=0,f[400]=0,i[69]=i[2],h[805]=0,i[68]=0,h[802]=0,i[70]=I+2048,i[71]=I,h[806]=0,s=(i[3]|0)+-2|0,i[72]=s,u=s+(i[66]<<1)|0,i[73]=u;e:for(;;){if(m=s+2|0,i[72]=m,s>>>0>=u>>>0){g=18;break}t:do switch(f[m>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if((f[400]|0)==0&&we(m)|0&&(W(s+4|0,16,10)|0)==0&&(_(),(h[804]|0)==0)){g=9;break e}else g=17;break}case 105:{we(m)|0&&(W(s+4|0,26,10)|0)==0&&y(),g=17;break}case 59:{g=17;break}case 47:switch(f[s+4>>1]|0){case 47:{st();break t}case 42:{Y(1);break t}default:{g=16;break e}}default:{g=16;break e}}while(!1);(g|0)==17&&(g=0,i[69]=i[72]),s=i[72]|0,u=i[73]|0}(g|0)==9?(s=i[72]|0,i[69]=s,g=19):(g|0)==16?(h[804]=0,i[72]=s,g=19):(g|0)==18&&(h[802]|0?s=0:(s=m,g=19));do if((g|0)==19){e:for(;;){if(u=s+2|0,i[72]=u,s>>>0>=(i[73]|0)>>>0){g=92;break}t:do switch(f[u>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{(f[400]|0)==0&&we(u)|0&&(W(s+4|0,16,10)|0)==0&&_(),g=91;break}case 105:{we(u)|0&&(W(s+4|0,26,10)|0)==0&&y(),g=91;break}case 99:{we(u)|0&&(W(s+4|0,36,8)|0)==0&&ce(f[s+12>>1]|0)|0&&(h[806]=1),g=91;break}case 40:{m=i[70]|0,s=f[400]|0,g=s&65535,i[m+(g<<3)>>2]=1,u=i[69]|0,f[400]=s+1<<16>>16,i[m+(g<<3)+4>>2]=u,g=91;break}case 41:{if(u=f[400]|0,!(u<<16>>16)){g=36;break e}m=u+-1<<16>>16,f[400]=m,g=f[399]|0,u=g&65535,g<<16>>16!=0&&(i[(i[70]|0)+((m&65535)<<3)>>2]|0)==5&&(u=i[(i[71]|0)+(u+-1<<2)>>2]|0,m=u+4|0,i[m>>2]|0||(i[m>>2]=(i[69]|0)+2),i[u+12>>2]=s+4,f[399]=g+-1<<16>>16),g=91;break}case 123:{g=i[69]|0,m=i[63]|0,s=g;do if((f[g>>1]|0)==41&(m|0)!=0&&(i[m+4>>2]|0)==(g|0))if(u=i[64]|0,i[63]=u,u){i[u+32>>2]=0;break}else{i[59]=0;break}while(!1);m=i[70]|0,u=f[400]|0,g=u&65535,i[m+(g<<3)>>2]=(h[806]|0)==0?2:6,f[400]=u+1<<16>>16,i[m+(g<<3)+4>>2]=s,h[806]=0,g=91;break}case 125:{if(s=f[400]|0,!(s<<16>>16)){g=49;break e}m=i[70]|0,g=s+-1<<16>>16,f[400]=g,(i[m+((g&65535)<<3)>>2]|0)==4&&k(),g=91;break}case 39:{T(39),g=91;break}case 34:{T(34),g=91;break}case 47:switch(f[s+4>>1]|0){case 47:{st();break t}case 42:{Y(1);break t}default:{s=i[69]|0,u=f[s>>1]|0;n:do if(!(L(u)|0))u<<16>>16==41?(m=f[400]|0,yr(i[(i[70]|0)+((m&65535)<<3)+4>>2]|0)|0||(g=65)):g=64;else switch(u<<16>>16){case 46:if(((f[s+-2>>1]|0)+-48&65535)<10){g=64;break n}else break n;case 43:if((f[s+-2>>1]|0)==43){g=64;break n}else break n;case 45:if((f[s+-2>>1]|0)==45){g=64;break n}else break n;default:break n}while(!1);(g|0)==64&&(m=f[400]|0,g=65);n:do if((g|0)==65){if(g=0,m<<16>>16!=0&&(b=i[70]|0,A=(m&65535)+-1|0,u<<16>>16==102?(i[b+(A<<3)>>2]|0)==1:0)){if((f[s+-2>>1]|0)==111&&B(i[b+(A<<3)+4>>2]|0,44,3)|0)break}else g=69;if((g|0)==69&&u<<16>>16==125&&(g=i[70]|0,m=m&65535,G(i[g+(m<<3)+4>>2]|0)|0||(i[g+(m<<3)>>2]|0)==6))break;if(!(R(s)|0)){switch(u<<16>>16){case 0:break n;case 47:{if(h[805]|0)break n;break}}if(g=i[65]|0,g|0&&s>>>0>=(i[g>>2]|0)>>>0&&s>>>0<=(i[g+4>>2]|0)>>>0){z(),h[805]=0,g=91;break t}m=i[3]|0;do{if(s>>>0<=m>>>0)break;s=s+-2|0,i[69]=s,u=f[s>>1]|0}while(!(rt(u)|0));if(Pe(u)|0){do{if(s>>>0<=m>>>0)break;s=s+-2|0,i[69]=s}while(Pe(f[s>>1]|0)|0);if(wr(s)|0){z(),h[805]=0,g=91;break t}}h[805]=1,g=91;break t}}while(!1);z(),h[805]=0,g=91;break t}}case 96:{m=i[70]|0,u=f[400]|0,g=u&65535,i[m+(g<<3)+4>>2]=i[69],f[400]=u+1<<16>>16,i[m+(g<<3)>>2]=3,k(),g=91;break}default:g=91}while(!1);(g|0)==91&&(g=0,i[69]=i[72]),s=i[72]|0}if((g|0)==36){H(),s=0;break}else if((g|0)==49){H(),s=0;break}else if((g|0)==92){s=(h[802]|0)==0?(f[399]|f[400])<<16>>16==0:0;break}}while(!1);return x=I,s|0}l(O,"b2");function _(){var s=0,u=0,m=0,g=0,b=0,A=0,I=0,re=0,ot=0,at=0,ct=0,lt=0,P=0,D=0;re=i[72]|0,ot=i[65]|0,D=re+12|0,i[72]=D,m=v(1)|0,s=i[72]|0,(s|0)==(D|0)&&!(Z(m)|0)||(P=3);e:do if((P|0)==3){t:do switch(m<<16>>16){case 123:{for(i[72]=s+2,s=v(1)|0,u=i[72]|0;;){if(ke(s)|0?(T(s),s=(i[72]|0)+2|0,i[72]=s):(ee(s)|0,s=i[72]|0),v(1)|0,s=j(u,s)|0,s<<16>>16==44&&(i[72]=(i[72]|0)+2,s=v(1)|0),s<<16>>16==125){P=15;break}if(D=u,u=i[72]|0,(u|0)==(D|0)){P=12;break}if(u>>>0>(i[73]|0)>>>0){P=14;break}}if((P|0)==12){H();break e}else if((P|0)==14){H();break e}else if((P|0)==15){h[803]=1,i[72]=(i[72]|0)+2;break t}break}case 42:{i[72]=s+2,v(1)|0,D=i[72]|0,j(D,D)|0;break}default:{switch(h[804]=0,m<<16>>16){case 100:{switch(re=s+14|0,i[72]=re,(v(1)|0)<<16>>16){case 97:{u=i[72]|0,(W(u+2|0,72,8)|0)==0&&(b=u+10|0,Pe(f[b>>1]|0)|0)&&(i[72]=b,v(0)|0,P=22);break}case 102:{P=22;break}case 99:{u=i[72]|0,(W(u+2|0,36,8)|0)==0&&(g=u+10|0,D=f[g>>1]|0,ce(D)|0|D<<16>>16==123)&&(i[72]=g,A=v(1)|0,A<<16>>16!=123)&&(lt=A,P=31);break}}n:do if((P|0)==22&&(I=i[72]|0,(W(I+2|0,80,14)|0)==0)){if(m=I+16|0,u=f[m>>1]|0,!(ce(u)|0))switch(u<<16>>16){case 40:case 42:break;default:break n}i[72]=m,u=v(1)|0,u<<16>>16==42&&(i[72]=(i[72]|0)+2,u=v(1)|0),u<<16>>16!=40&&(lt=u,P=31)}while(!1);if((P|0)==31&&(at=i[72]|0,ee(lt)|0,ct=i[72]|0,ct>>>0>at>>>0)){X(s,re,at,ct),i[72]=(i[72]|0)+-2;break e}X(s,re,0,0),i[72]=s+12;break e}case 97:{i[72]=s+10,v(0)|0,s=i[72]|0,P=35;break}case 102:{P=35;break}case 99:{if((W(s+2|0,36,8)|0)==0&&(u=s+10|0,rt(f[u>>1]|0)|0)){i[72]=u,D=v(1)|0,P=i[72]|0,ee(D)|0,D=i[72]|0,X(P,D,P,D),i[72]=(i[72]|0)+-2;break e}s=s+4|0,i[72]=s;break}case 108:case 118:break;default:break e}if((P|0)==35){i[72]=s+16,s=v(1)|0,s<<16>>16==42&&(i[72]=(i[72]|0)+2,s=v(1)|0),P=i[72]|0,ee(s)|0,D=i[72]|0,X(P,D,P,D),i[72]=(i[72]|0)+-2;break e}i[72]=s+6,h[804]=0,m=v(1)|0,s=i[72]|0,m=(ee(m)|0|32)<<16>>16==123,g=i[72]|0,m&&(i[72]=g+2,D=v(1)|0,s=i[72]|0,ee(D)|0);n:for(;u=i[72]|0,(u|0)!=(s|0);){if(X(s,u,s,u),u=v(1)|0,m)switch(u<<16>>16){case 93:case 125:break e}if(s=i[72]|0,u<<16>>16!=44){P=51;break}switch(i[72]=s+2,u=v(1)|0,s=i[72]|0,u<<16>>16){case 91:case 123:{P=51;break n}}ee(u)|0}if((P|0)==51&&(i[72]=s+-2),!m)break e;i[72]=g+-2;break e}}while(!1);if(D=(v(1)|0)<<16>>16==102,s=i[72]|0,D&&(W(s+2|0,66,6)|0)==0)for(i[72]=s+8,E(re,v(1)|0,0),s=(ot|0)==0?240:ot+16|0;;){if(s=i[s>>2]|0,!s)break e;i[s+12>>2]=0,i[s+8>>2]=0,s=s+16|0}i[72]=s+-2}while(!1)}l(_,"k3");function y(){var s=0,u=0,m=0,g=0,b=0,A=0,I=0;b=i[72]|0,m=b+12|0,i[72]=m,g=v(1)|0,u=i[72]|0;e:do if(g<<16>>16!=46)g<<16>>16==115&u>>>0>m>>>0?(W(u+2|0,56,10)|0)==0&&(s=u+12|0,ce(f[s>>1]|0)|0)?A=14:(u=6,m=0,A=46):(s=g,m=0,A=15);else switch(i[72]=u+2,(v(1)|0)<<16>>16){case 109:{if(s=i[72]|0,W(s+2|0,50,6)|0||(u=i[69]|0,!(it(u)|0)&&(f[u>>1]|0)==46))break e;N(b,b,s+8|0,2);break e}case 115:{if(s=i[72]|0,W(s+2|0,56,10)|0||(u=i[69]|0,!(it(u)|0)&&(f[u>>1]|0)==46))break e;s=s+12|0,A=14;break e}default:break e}while(!1);(A|0)==14&&(i[72]=s,s=v(1)|0,m=1,A=15);e:do if((A|0)==15)switch(s<<16>>16){case 40:{if(u=i[70]|0,I=f[400]|0,g=I&65535,i[u+(g<<3)>>2]=5,s=i[72]|0,f[400]=I+1<<16>>16,i[u+(g<<3)+4>>2]=s,(f[i[69]>>1]|0)==46)break e;switch(i[72]=s+2,u=v(1)|0,N(b,i[72]|0,0,s),m?(s=i[63]|0,i[s+28>>2]=5):s=i[63]|0,b=i[71]|0,I=f[399]|0,f[399]=I+1<<16>>16,i[b+((I&65535)<<2)>>2]=s,u<<16>>16){case 39:{T(39);break}case 34:{T(34);break}default:{i[72]=(i[72]|0)+-2;break e}}switch(s=(i[72]|0)+2|0,i[72]=s,(v(1)|0)<<16>>16){case 44:{i[72]=(i[72]|0)+2,v(1)|0,b=i[63]|0,i[b+4>>2]=s,I=i[72]|0,i[b+16>>2]=I,h[b+24>>0]=1,i[72]=I+-2;break e}case 41:{f[400]=(f[400]|0)+-1<<16>>16,I=i[63]|0,i[I+4>>2]=s,i[I+12>>2]=(i[72]|0)+2,h[I+24>>0]=1,f[399]=(f[399]|0)+-1<<16>>16;break e}default:{i[72]=(i[72]|0)+-2;break e}}}case 123:{if(m){u=12,m=1,A=46;break e}if(s=i[72]|0,f[400]|0){i[72]=s+-2;break e}for(;!(s>>>0>=(i[73]|0)>>>0);){if(s=v(1)|0,ke(s)|0)T(s);else if(s<<16>>16==125){A=36;break}s=(i[72]|0)+2|0,i[72]=s}if((A|0)==36&&(i[72]=(i[72]|0)+2),I=(v(1)|0)<<16>>16==102,s=i[72]|0,I&&W(s+2|0,66,6)|0){H();break e}if(i[72]=s+8,s=v(1)|0,ke(s)|0){E(b,s,0);break e}else{H();break e}}default:{if(m){u=12,m=1,A=46;break e}switch(s<<16>>16){case 42:case 39:case 34:{m=0,A=48;break e}default:{u=6,m=0,A=46;break e}}}}while(!1);(A|0)==46&&(s=i[72]|0,(s|0)==(b+(u<<1)|0)?i[72]=s+-2:A=48);do if((A|0)==48){if(f[400]|0){i[72]=(i[72]|0)+-2;break}for(s=i[73]|0,u=i[72]|0;;){if(u>>>0>=s>>>0){A=55;break}if(g=f[u>>1]|0,ke(g)|0){A=53;break}I=u+2|0,i[72]=I,u=I}if((A|0)==53){E(b,g,m);break}else if((A|0)==55){H();break}}while(!1)}l(y,"l3");function E(s,u,m){s=s|0,u=u|0,m=m|0;var g=0,b=0;switch(g=(i[72]|0)+2|0,u<<16>>16){case 39:{T(39),b=5;break}case 34:{T(34),b=5;break}default:H()}do if((b|0)==5){if(N(s,g,i[72]|0,1),m&&(i[(i[63]|0)+28>>2]=4),i[72]=(i[72]|0)+2,u=v(0)|0,m=u<<16>>16==97,m?(g=i[72]|0,W(g+2|0,94,10)|0&&(b=13)):(g=i[72]|0,u<<16>>16==119&&(f[g+2>>1]|0)==105&&(f[g+4>>1]|0)==116&&(f[g+6>>1]|0)==104||(b=13)),(b|0)==13){i[72]=g+-2;break}if(i[72]=g+((m?6:4)<<1),(v(1)|0)<<16>>16!=123){i[72]=g;break}m=i[72]|0,u=m;e:for(;;){switch(i[72]=u+2,u=v(1)|0,u<<16>>16){case 39:{T(39),i[72]=(i[72]|0)+2,u=v(1)|0;break}case 34:{T(34),i[72]=(i[72]|0)+2,u=v(1)|0;break}default:u=ee(u)|0}if(u<<16>>16!=58){b=22;break}switch(i[72]=(i[72]|0)+2,(v(1)|0)<<16>>16){case 39:{T(39);break}case 34:{T(34);break}default:{b=26;break e}}switch(i[72]=(i[72]|0)+2,(v(1)|0)<<16>>16){case 125:{b=31;break e}case 44:break;default:{b=30;break e}}if(i[72]=(i[72]|0)+2,(v(1)|0)<<16>>16==125){b=31;break}u=i[72]|0}if((b|0)==22){i[72]=g;break}else if((b|0)==26){i[72]=g;break}else if((b|0)==30){i[72]=g;break}else if((b|0)==31){b=i[63]|0,i[b+16>>2]=m,i[b+12>>2]=(i[72]|0)+2;break}}while(!1)}l(E,"u3");function R(s){s=s|0;e:do switch(f[s>>1]|0){case 100:switch(f[s+-2>>1]|0){case 105:{s=B(s+-4|0,104,2)|0;break e}case 108:{s=B(s+-4|0,108,3)|0;break e}default:{s=0;break e}}case 101:switch(f[s+-2>>1]|0){case 115:switch(f[s+-4>>1]|0){case 108:{s=be(s+-6|0,101)|0;break e}case 97:{s=be(s+-6|0,99)|0;break e}default:{s=0;break e}}case 116:{s=B(s+-4|0,114,4)|0;break e}case 117:{s=B(s+-4|0,122,6)|0;break e}default:{s=0;break e}}case 102:{if((f[s+-2>>1]|0)==111&&(f[s+-4>>1]|0)==101)switch(f[s+-6>>1]|0){case 99:{s=B(s+-8|0,134,6)|0;break e}case 112:{s=B(s+-8|0,146,2)|0;break e}default:{s=0;break e}}else s=0;break}case 107:{s=B(s+-2|0,150,4)|0;break}case 110:{s=s+-2|0,be(s,105)|0?s=1:s=B(s,158,5)|0;break}case 111:{s=be(s+-2|0,100)|0;break}case 114:{s=B(s+-2|0,168,7)|0;break}case 116:{s=B(s+-2|0,182,4)|0;break}case 119:switch(f[s+-2>>1]|0){case 101:{s=be(s+-4|0,110)|0;break e}case 111:{s=B(s+-4|0,190,3)|0;break e}default:{s=0;break e}}default:s=0}while(!1);return s|0}l(R,"o2");function k(){var s=0,u=0,m=0,g=0;u=i[73]|0,m=i[72]|0;e:for(;;){if(s=m+2|0,m>>>0>=u>>>0){u=10;break}switch(f[s>>1]|0){case 96:{u=7;break e}case 36:{if((f[m+4>>1]|0)==123){u=6;break e}break}case 92:{s=m+4|0;break}}m=s}(u|0)==6?(s=m+4|0,i[72]=s,u=i[70]|0,g=f[400]|0,m=g&65535,i[u+(m<<3)>>2]=4,f[400]=g+1<<16>>16,i[u+(m<<3)+4>>2]=s):(u|0)==7?(i[72]=s,m=i[70]|0,g=(f[400]|0)+-1<<16>>16,f[400]=g,(i[m+((g&65535)<<3)>>2]|0)!=3&&H()):(u|0)==10&&(i[72]=s,H())}l(k,"h2");function v(s){s=s|0;var u=0,m=0,g=0;m=i[72]|0;e:do{u=f[m>>1]|0;t:do if(u<<16>>16!=47)if(s){if(ce(u)|0)break;break e}else{if(Pe(u)|0)break;break e}else switch(f[m+2>>1]|0){case 47:{st();break t}case 42:{Y(s);break t}default:{u=47;break e}}while(!1);g=i[72]|0,m=g+2|0,i[72]=m}while(g>>>0<(i[73]|0)>>>0);return u|0}l(v,"w2");function N(s,u,m,g){s=s|0,u=u|0,m=m|0,g=g|0;var b=0,A=0;A=i[67]|0,i[67]=A+36,b=i[63]|0,i[((b|0)==0?236:b+32|0)>>2]=A,i[64]=b,i[63]=A,i[A+8>>2]=s,(g|0)==2?(s=3,b=m):(b=(g|0)==1,s=b?1:2,b=b?m+2|0:0),i[A+12>>2]=b,i[A+28>>2]=s,i[A>>2]=u,i[A+4>>2]=m,i[A+16>>2]=0,i[A+20>>2]=g,u=(g|0)==1,h[A+24>>0]=u&1,i[A+32>>2]=0,u|(g|0)==2&&(h[803]=1)}l(N,"d2");function T(s){s=s|0;var u=0,m=0,g=0,b=0;for(b=i[73]|0,u=i[72]|0;;){if(g=u+2|0,u>>>0>=b>>>0){u=9;break}if(m=f[g>>1]|0,m<<16>>16==s<<16>>16){u=10;break}if(m<<16>>16==92)m=u+4|0,(f[m>>1]|0)==13?(u=u+6|0,u=(f[u>>1]|0)==10?u:m):u=m;else if(Mt(m)|0){u=9;break}else u=g}(u|0)==9?(i[72]=g,H()):(u|0)==10&&(i[72]=g)}l(T,"v");function j(s,u){s=s|0,u=u|0;var m=0,g=0,b=0,A=0;return m=i[72]|0,g=f[m>>1]|0,A=(s|0)==(u|0),b=A?0:s,A=A?0:u,g<<16>>16==97&&(i[72]=m+4,m=v(1)|0,s=i[72]|0,ke(m)|0?(T(m),u=(i[72]|0)+2|0,i[72]=u):(ee(m)|0,u=i[72]|0),g=v(1)|0,m=i[72]|0),(m|0)!=(s|0)&&X(s,u,b,A),g|0}l(j,"A");function Q(){var s=0,u=0,m=0;m=i[73]|0,u=i[72]|0;e:for(;;){if(s=u+2|0,u>>>0>=m>>>0){u=6;break}switch(f[s>>1]|0){case 13:case 10:{u=6;break e}case 93:{u=7;break e}case 92:{s=u+4|0;break}}u=s}return(u|0)==6?(i[72]=s,H(),s=0):(u|0)==7&&(i[72]=s,s=93),s|0}l(Q,"C");function z(){var s=0,u=0,m=0;e:for(;;){if(s=i[72]|0,u=s+2|0,i[72]=u,s>>>0>=(i[73]|0)>>>0){m=7;break}switch(f[u>>1]|0){case 13:case 10:{m=7;break e}case 47:break e;case 91:{Q()|0;break}case 92:{i[72]=s+4;break}}}(m|0)==7&&H()}l(z,"g");function G(s){switch(s=s|0,f[s>>1]|0){case 62:{s=(f[s+-2>>1]|0)==61;break}case 41:case 59:{s=1;break}case 104:{s=B(s+-2|0,210,4)|0;break}case 121:{s=B(s+-2|0,218,6)|0;break}case 101:{s=B(s+-2|0,230,3)|0;break}default:s=0}return s|0}l(G,"p");function Y(s){s=s|0;var u=0,m=0,g=0,b=0,A=0;for(b=(i[72]|0)+2|0,i[72]=b,m=i[73]|0;u=b+2|0,!(b>>>0>=m>>>0||(g=f[u>>1]|0,!s&&Mt(g)|0));){if(g<<16>>16==42&&(f[b+4>>1]|0)==47){A=8;break}b=u}(A|0)==8&&(i[72]=u,u=b+4|0),i[72]=u}l(Y,"y");function W(s,u,m){s=s|0,u=u|0,m=m|0;var g=0,b=0;e:do if(!m)s=0;else{for(;g=h[s>>0]|0,b=h[u>>0]|0,g<<24>>24==b<<24>>24;)if(m=m+-1|0,m)s=s+1|0,u=u+1|0;else{s=0;break e}s=(g&255)-(b&255)|0}while(!1);return s|0}l(W,"m");function Z(s){s=s|0;e:do switch(s<<16>>16){case 38:case 37:case 33:{s=1;break}default:if((s&-8)<<16>>16==40|(s+-58&65535)<6)s=1;else{switch(s<<16>>16){case 91:case 93:case 94:{s=1;break e}}s=(s+-123&65535)<4}}while(!1);return s|0}l(Z,"I");function L(s){s=s|0;e:do switch(s<<16>>16){case 38:case 37:case 33:break;default:if(!((s+-58&65535)<6|(s+-40&65535)<7&s<<16>>16!=41)){switch(s<<16>>16){case 91:case 94:break e}return s<<16>>16!=125&(s+-123&65535)<4|0}}while(!1);return 1}l(L,"U");function F(s){s=s|0;var u=0;u=f[s>>1]|0;e:do if((u+-9&65535)>=5){switch(u<<16>>16){case 160:case 32:{u=1;break e}}if(Z(u)|0)return u<<16>>16!=46|(it(s)|0)|0;u=0}else u=1;while(!1);return u|0}l(F,"x");function Ie(s){s=s|0;var u=0,m=0,g=0,b=0;return m=x,x=x+16|0,g=m,i[g>>2]=0,i[66]=s,u=i[3]|0,b=u+(s<<1)|0,s=b+2|0,f[b>>1]=0,i[g>>2]=s,i[67]=s,i[59]=0,i[63]=0,i[61]=0,i[60]=0,i[65]=0,i[62]=0,x=m,u|0}l(Ie,"S");function X(s,u,m,g){s=s|0,u=u|0,m=m|0,g=g|0;var b=0,A=0;b=i[67]|0,i[67]=b+20,A=i[65]|0,i[((A|0)==0?240:A+16|0)>>2]=b,i[65]=b,i[b>>2]=s,i[b+4>>2]=u,i[b+8>>2]=m,i[b+12>>2]=g,i[b+16>>2]=0,h[803]=1}l(X,"O");function B(s,u,m){s=s|0,u=u|0,m=m|0;var g=0,b=0;return g=s+(0-m<<1)|0,b=g+2|0,s=i[3]|0,b>>>0>=s>>>0&&(W(b,u,m<<1)|0)==0?(b|0)==(s|0)?s=1:s=F(g)|0:s=0,s|0}l(B,"$");function wr(s){switch(s=s|0,f[s>>1]|0){case 107:{s=B(s+-2|0,150,4)|0;break}case 101:{(f[s+-2>>1]|0)==117?s=B(s+-4|0,122,6)|0:s=0;break}default:s=0}return s|0}l(wr,"j");function be(s,u){s=s|0,u=u|0;var m=0;return m=i[3]|0,m>>>0<=s>>>0&&(f[s>>1]|0)==u<<16>>16?(m|0)==(s|0)?m=1:m=rt(f[s+-2>>1]|0)|0:m=0,m|0}l(be,"B");function rt(s){s=s|0;e:do if((s+-9&65535)<5)s=1;else{switch(s<<16>>16){case 32:case 160:{s=1;break e}}s=s<<16>>16!=46&(Z(s)|0)}while(!1);return s|0}l(rt,"E");function st(){var s=0,u=0,m=0;s=i[73]|0,m=i[72]|0;e:for(;u=m+2|0,!(m>>>0>=s>>>0);)switch(f[u>>1]|0){case 13:case 10:break e;default:m=u}i[72]=u}l(st,"P");function ee(s){for(s=s|0;!(ce(s)|0||Z(s)|0);)if(s=(i[72]|0)+2|0,i[72]=s,s=f[s>>1]|0,!(s<<16>>16)){s=0;break}return s|0}l(ee,"q");function kr(){var s=0;switch(s=i[(i[61]|0)+20>>2]|0,s|0){case 1:{s=-1;break}case 2:{s=-2;break}default:s=s-(i[3]|0)>>1}return s|0}l(kr,"z");function yr(s){return s=s|0,!(B(s,196,5)|0)&&!(B(s,44,3)|0)?s=B(s,206,2)|0:s=1,s|0}l(yr,"D");function Pe(s){switch(s=s|0,s<<16>>16){case 160:case 32:case 12:case 11:case 9:{s=1;break}default:s=0}return s|0}l(Pe,"F");function it(s){return s=s|0,(f[s>>1]|0)==46&&(f[s+-2>>1]|0)==46?s=(f[s+-4>>1]|0)==46:s=0,s|0}l(it,"G");function we(s){return s=s|0,(i[3]|0)==(s|0)?s=1:s=F(s+-2|0)|0,s|0}l(we,"H");function vr(){var s=0;return s=i[(i[62]|0)+12>>2]|0,s?s=s-(i[3]|0)>>1:s=-1,s|0}l(vr,"J");function Cr(){var s=0;return s=i[(i[61]|0)+12>>2]|0,s?s=s-(i[3]|0)>>1:s=-1,s|0}l(Cr,"K");function xr(){var s=0;return s=i[(i[62]|0)+8>>2]|0,s?s=s-(i[3]|0)>>1:s=-1,s|0}l(xr,"L");function Sr(){var s=0;return s=i[(i[61]|0)+16>>2]|0,s?s=s-(i[3]|0)>>1:s=-1,s|0}l(Sr,"M");function Er(){var s=0;return s=i[(i[61]|0)+4>>2]|0,s?s=s-(i[3]|0)>>1:s=-1,s|0}l(Er,"N");function Or(){var s=0;return s=i[61]|0,s=i[((s|0)==0?236:s+32|0)>>2]|0,i[61]=s,(s|0)!=0|0}l(Or,"Q");function Ar(){var s=0;return s=i[62]|0,s=i[((s|0)==0?240:s+16|0)>>2]|0,i[62]=s,(s|0)!=0|0}l(Ar,"R");function H(){h[802]=1,i[68]=(i[72]|0)-(i[3]|0)>>1,i[72]=(i[73]|0)+2}l(H,"T");function ce(s){return s=s|0,(s|128)<<16>>16==160|(s+-9&65535)<5|0}l(ce,"V");function ke(s){return s=s|0,s<<16>>16==39|s<<16>>16==34|0}l(ke,"W");function _r(){return(i[(i[61]|0)+8>>2]|0)-(i[3]|0)>>1|0}l(_r,"X");function Tr(){return(i[(i[62]|0)+4>>2]|0)-(i[3]|0)>>1|0}l(Tr,"Y");function Mt(s){return s=s|0,s<<16>>16==13|s<<16>>16==10|0}l(Mt,"Z");function jr(){return(i[i[61]>>2]|0)-(i[3]|0)>>1|0}l(jr,"_");function Lr(){return(i[i[62]>>2]|0)-(i[3]|0)>>1|0}l(Lr,"ee");function Rr(){return S[(i[61]|0)+24>>0]|0|0}l(Rr,"ae");function $r(s){s=s|0,i[3]=s}l($r,"re");function Ir(){return i[(i[61]|0)+28>>2]|0}l(Ir,"ie");function Pr(){return(h[803]|0)!=0|0}l(Pr,"se");function Nr(){return(h[804]|0)!=0|0}l(Nr,"fe");function Dr(){return i[68]|0}l(Dr,"te");function Ur(s){return s=s|0,x=s+992+15&-16,992}return l(Ur,"ce"),{su:Ur,ai:Sr,e:Dr,ee:Tr,ele:vr,els:xr,es:Lr,f:Nr,id:kr,ie:Er,ip:Rr,is:jr,it:Ir,ms:Pr,p:O,re:Ar,ri:Or,sa:Ie,se:Cr,ses:$r,ss:_r}})(typeof self<"u"?self:global,{},ze),At=U.su(Ee-(2<<17))}const r=M.length+1;U.ses(At),U.sa(r-1),mn(M,new Uint16Array(ze,At,r)),U.p()||($=U.e(),ne());const o=[],a=[];for(;U.ri();){const c=U.is(),p=U.ie(),d=U.ai(),h=U.id(),f=U.ss(),i=U.se(),S=U.it();let x;U.ip()&&(x=_t(h===-1?c:c+1,M.charCodeAt(h===-1?c-1:c))),o.push({t:S,n:x,s:c,e:p,ss:f,se:i,d:h,a:d})}for(;U.re();){const c=U.es(),p=U.ee(),d=U.els(),h=U.ele(),f=M.charCodeAt(c),i=d>=0?M.charCodeAt(d):-1;a.push({s:c,e:p,ls:d,le:h,n:f===34||f===39?_t(c+1,f):M.slice(c,p),ln:d<0?void 0:i===34||i===39?_t(d+1,i):M.slice(d,h)})}return[o,a,!!U.f(),!!U.ms()]}l(zs,"parse");function _t(t,e){$=t;let n="",r=$;for(;;){$>=M.length&&ne();const o=M.charCodeAt($);if(o===e)break;o===92?(n+=M.slice(r,$),n+=Gs(),r=$):(o===8232||o===8233||wn(o)&&ne(),++$)}return n+=M.slice(r,$++),n}l(_t,"b");function Gs(){let t=M.charCodeAt(++$);switch(++$,t){case 110:return`
8
+ `;case 114:return"\r";case 120:return String.fromCharCode(Tt(2));case 117:return(function(){const e=M.charCodeAt($);let n;return e===123?(++$,n=Tt(M.indexOf("}",$)-$),++$,n>1114111&&ne()):n=Tt(4),n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n)))})();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:M.charCodeAt($)===10&&++$;case 10:return"";case 56:case 57:ne();default:if(t>=48&&t<=55){let e=M.substr($-1,3).match(/^[0-7]+/)[0],n=parseInt(e,8);return n>255&&(e=e.slice(0,-1),n=parseInt(e,8)),$+=e.length-1,t=M.charCodeAt($),e==="0"&&t!==56&&t!==57||ne(),String.fromCharCode(n)}return wn(t)?"":String.fromCharCode(t)}}l(Gs,"k");function Tt(t){const e=$;let n=0,r=0;for(let o=0;o<t;++o,++$){let a,c=M.charCodeAt($);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;r=c,n=16*n+a}else r!==95&&o!==0||ne(),r=c}return r!==95&&$-e===t||ne(),n}l(Tt,"l");function wn(t){return t===13||t===10}l(wn,"u");function ne(){throw Object.assign(Error(`Parse error ${bn}:${M.slice(0,$).split(`
9
+ `).length}:${$-M.lastIndexOf(`
10
+ `,$-1)}`),{idx:$})}l(ne,"o");let jt;typeof WebAssembly<"u"&&(async()=>{const{parse:t,init:e}=await Promise.resolve().then(function(){return require("./lexer-CGfpMDSb.cjs")});await e,jt=t})();const Lt=l((t,e)=>jt?jt(t,e):zs(t,e),"parseEsm"),kn=l(t=>{if(!t.includes("import")&&!t.includes("export"))return!1;try{return Lt(t)[3]}catch{return!0}},"isESM"),yn=l((t,e)=>{const n=t[0]-e[0];if(n===0){const r=t[1]-e[1];return r===0?t[2]>=e[2]:r>0}return n>0},"isVersionGreaterOrEqual"),Ks=process.versions.node.split(".").map(Number),Rt=l((t,e=Ks)=>{for(let n=0;n<t.length;n+=1){const r=t[n];if(n===t.length-1||e[0]===r[0])return yn(e,r)}return!1},"isFeatureSupported"),Qs=[[22,22,3],[24,11,1],[25,1,0],[26,0,0]],Hs=[[18,19,0],[20,10,0],[21,0,0]],qs=[[20,11,0],[21,3,0]],Xs=[[20,11,0],[21,2,0]],Ys=[[20,19,0],[22,12,0],[23,0,0]];var Zs=44,ei=59,vn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cn=new Uint8Array(64),ti=new Uint8Array(128);for(let t=0;t<vn.length;t++){const e=vn.charCodeAt(t);Cn[t]=e,ti[e]=t}function Oe(t,e,n){let r=e-n;r=r<0?-r<<1|1:r<<1;do{let o=r&31;r>>>=5,r>0&&(o|=32),t.write(Cn[o])}while(r>0);return e}l(Oe,"encodeInteger$1");var xn=1024*16,Sn=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}},ni=class{static{l(this,"StringWriter")}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(xn)}write(t){const{buffer:e}=this;e[this.pos++]=t,this.pos===xn&&(this.out+=Sn.decode(e),this.pos=0)}flush(){const{buffer:t,out:e,pos:n}=this;return n>0?e+Sn.decode(t.subarray(0,n)):e}};function ri(t){const e=new ni;let n=0,r=0,o=0,a=0;for(let c=0;c<t.length;c++){const p=t[c];if(c>0&&e.write(ei),p.length===0)continue;let d=0;for(let h=0;h<p.length;h++){const f=p[h];h>0&&e.write(Zs),d=Oe(e,f[0],d),f.length!==1&&(n=Oe(e,f[1],n),r=Oe(e,f[2],r),o=Oe(e,f[3],o),f.length!==4&&(a=Oe(e,f[4],a)))}}return e.flush()}l(ri,"encode$1");class nt{static{l(this,"BitSet")}constructor(e){this.bits=e instanceof nt?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class $e{static{l(this,"Chunk")}constructor(e,n,r){this.start=e,this.end=n,this.original=r,this.intro="",this.outro="",this.content=r,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 $e(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 n=this;for(;n;)e(n),n=n.next}eachPrevious(e){let n=this;for(;n;)e(n),n=n.previous}edit(e,n,r){return this.content=e,r||(this.intro="",this.outro=""),this.storeName=n,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 n=e-this.start,r=this.original.slice(0,n),o=this.original.slice(n);this.original=r;const a=new $e(e,this.end,o);return a.outro=this.outro,this.outro="",this.end=e,this.edited?(a.edit("",!1),this.content=""):this.content=r,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 n=this.content.replace(e,"");if(n.length)return n!==this.content&&(this.split(this.start+n.length).edit("",void 0,!0),this.edited&&this.edit(n,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.intro.replace(e,""),this.intro.length)return!0;const n=this.content.replace(e,"");if(n.length){if(n!==this.content){const r=this.split(this.end-n.length);this.edited&&r.edit(n,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}}function si(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}l(si,"getBtoa");const ii=si();let oi=class{static{l(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=ri(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+ii(this.toString())}};function ai(t){const e=t.split(`
11
+ `),n=e.filter(a=>/^\t+/.test(a)),r=e.filter(a=>/^ {2,}/.test(a));if(n.length===0&&r.length===0)return null;if(n.length>=r.length)return" ";const o=r.reduce((a,c)=>{const p=/^ +/.exec(c)[0].length;return Math.min(p,a)},1/0);return new Array(o+1).join(" ")}l(ai,"guessIndent");function ci(t,e){const n=t.split(/[/\\]/),r=e.split(/[/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length){let o=n.length;for(;o--;)n[o]=".."}return n.concat(r).join("/")}l(ci,"getRelativePath");const li=Object.prototype.toString;function ui(t){return li.call(t)==="[object Object]"}l(ui,"isObject");function En(t){const e=t.split(`
12
+ `),n=[];for(let r=0,o=0;r<e.length;r++)n.push(o),o+=e[r].length+1;return l(function(o){let a=0,c=n.length;for(;a<c;){const h=a+c>>1;o<n[h]?c=h:a=h+1}const p=a-1,d=o-n[p];return{line:p,column:d}},"locate")}l(En,"getLocator");const fi=/\w/;class hi{static{l(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,n,r,o){if(n.length){const a=n.length-1;let c=n.indexOf(`
13
+ `,0),p=-1;for(;c>=0&&a>c;){const h=[this.generatedCodeColumn,e,r.line,r.column];o>=0&&h.push(o),this.rawSegments.push(h),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,p=c,c=n.indexOf(`
14
+ `,c+1)}const d=[this.generatedCodeColumn,e,r.line,r.column];o>=0&&d.push(o),this.rawSegments.push(d),this.advance(n.slice(p+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null}addUneditedChunk(e,n,r,o,a){let c=n.start,p=!0,d=!1;for(;c<n.end;){if(r[c]===`
15
+ `)o.line+=1,o.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,p=!0,d=!1;else{if(this.hires||p||a.has(c)){const h=[this.generatedCodeColumn,e,o.line,o.column];this.hires==="boundary"?fi.test(r[c])?d||(this.rawSegments.push(h),d=!0):(this.rawSegments.push(h),d=!1):this.rawSegments.push(h)}o.column+=1,this.generatedCodeColumn+=1,p=!1}c+=1}this.pending=null}advance(e){if(!e)return;const n=e.split(`
16
+ `);if(n.length>1){for(let r=0;r<n.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=n[n.length-1].length}}const Ae=`
17
+ `,pe={insertLeft:!1,insertRight:!1,storeName:!1};class Ut{static{l(this,"MagicString")}constructor(e,n={}){const r=new $e(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:r},lastChunk:{writable:!0,value:r},lastSearchedChunk:{writable:!0,value:r},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:n.filename},indentExclusionRanges:{writable:!0,value:n.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new nt},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:n.ignoreList},offset:{writable:!0,value:n.offset||0}}),this.byStart[0]=r,this.byEnd[e.length]=r}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,n){if(e=e+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const r=this.byEnd[e];return r?r.appendLeft(n):this.intro+=n,this}appendRight(e,n){if(e=e+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const r=this.byStart[e];return r?r.appendRight(n):this.outro+=n,this}clone(){const e=new Ut(this.original,{filename:this.filename,offset:this.offset});let n=this.firstChunk,r=e.firstChunk=e.lastSearchedChunk=n.clone();for(;n;){e.byStart[r.start]=r,e.byEnd[r.end]=r;const o=n.next,a=o&&o.clone();a&&(r.next=a,a.previous=r,r=a),n=o}return e.lastChunk=r,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new nt(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const n=0,r=Object.keys(this.storedNames),o=new hi(e.hires),a=En(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(c=>{const p=a(c.start);c.intro.length&&o.advance(c.intro),c.edited?o.addEdit(n,c.content,p,c.storeName?r.indexOf(c.original):-1):o.addUneditedChunk(n,c,this.original,p,this.sourcemapLocations),c.outro.length&&o.advance(c.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?ci(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:r,mappings:o.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(e){return new oi(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=ai(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,n){const r=/^[^\r\n]/gm;if(ui(e)&&(n=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;n=n||{};const o={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(f=>{for(let i=f[0];i<f[1];i+=1)o[i]=!0});let a=n.indentStart!==!1;const c=l(h=>a?`${e}${h}`:(a=!0,h),"replacer");this.intro=this.intro.replace(r,c);let p=0,d=this.firstChunk;for(;d;){const h=d.end;if(d.edited)o[p]||(d.content=d.content.replace(r,c),d.content.length&&(a=d.content[d.content.length-1]===`
18
+ `));else for(p=d.start;p<h;){if(!o[p]){const f=this.original[p];f===`
19
+ `?a=!0:f!=="\r"&&a&&(a=!1,p===d.start||(this._splitChunk(d,p),d=d.next),d.prependRight(e))}p+=1}p=d.end,d=d.next}return this.outro=this.outro.replace(r,c),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,n){return pe.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),pe.insertLeft=!0),this.appendLeft(e,n)}insertRight(e,n){return pe.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),pe.insertRight=!0),this.prependRight(e,n)}move(e,n,r){if(e=e+this.offset,n=n+this.offset,r=r+this.offset,r>=e&&r<=n)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(n),this._split(r);const o=this.byStart[e],a=this.byEnd[n],c=o.previous,p=a.next,d=this.byStart[r];if(!d&&a===this.lastChunk)return this;const h=d?d.previous:this.lastChunk;return c&&(c.next=p),p&&(p.previous=c),h&&(h.next=o),d&&(d.previous=a),o.previous||(this.firstChunk=a.next),a.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=h,a.next=d||null,h||(this.firstChunk=o),d||(this.lastChunk=a),this}overwrite(e,n,r,o){return o=o||{},this.update(e,n,r,{...o,overwrite:!o.contentOnly})}update(e,n,r,o){if(e=e+this.offset,n=n+this.offset,typeof r!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(n>this.original.length)throw new Error("end is out of bounds");if(e===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(n),o===!0&&(pe.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),pe.storeName=!0),o={storeName:!0});const a=o!==void 0?o.storeName:!1,c=o!==void 0?o.overwrite:!1;if(a){const h=this.original.slice(e,n);Object.defineProperty(this.storedNames,h,{writable:!0,value:!0,enumerable:!0})}const p=this.byStart[e],d=this.byEnd[n];if(p){let h=p;for(;h!==d;){if(h.next!==this.byStart[h.end])throw new Error("Cannot overwrite across a split point");h=h.next,h.edit("",!1)}p.edit(r,a,!c)}else{const h=new $e(e,n,"").edit(r,a);d.next=h,h.previous=d}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,n){if(e=e+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const r=this.byEnd[e];return r?r.prependLeft(n):this.intro=n+this.intro,this}prependRight(e,n){if(e=e+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const r=this.byStart[e];return r?r.prependRight(n):this.outro=n+this.outro,this}remove(e,n){if(e=e+this.offset,n=n+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let r=this.byStart[e];for(;r;)r.intro="",r.outro="",r.edit(""),r=n>r.end?this.byStart[r.end]:null;return this}reset(e,n){if(e=e+this.offset,n=n+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let r=this.byStart[e];for(;r;)r.reset(),r=n>r.end?this.byStart[r.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(Ae);if(e!==-1)return this.outro.substr(e+1);let n=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(e=r.outro.lastIndexOf(Ae),e!==-1)return r.outro.substr(e+1)+n;n=r.outro+n}if(r.content.length>0){if(e=r.content.lastIndexOf(Ae),e!==-1)return r.content.substr(e+1)+n;n=r.content+n}if(r.intro.length>0){if(e=r.intro.lastIndexOf(Ae),e!==-1)return r.intro.substr(e+1)+n;n=r.intro+n}}while(r=r.previous);return e=this.intro.lastIndexOf(Ae),e!==-1?this.intro.substr(e+1)+n:this.intro+n}slice(e=0,n=this.original.length-this.offset){if(e=e+this.offset,n=n+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}let r="",o=this.firstChunk;for(;o&&(o.start>e||o.end<=e);){if(o.start<n&&o.end>=n)return r;o=o.next}if(o&&o.edited&&o.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const a=o;for(;o;){o.intro&&(a!==o||o.start===e)&&(r+=o.intro);const c=o.start<n&&o.end>=n;if(c&&o.edited&&o.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);const p=a===o?e-o.start:0,d=c?o.content.length+n-o.end:o.content.length;if(r+=o.content.slice(p,d),o.outro&&(!c||o.end===n)&&(r+=o.outro),c)break;o=o.next}return r}snip(e,n){const r=this.clone();return r.remove(0,e),r.remove(n,r.original.length),r}_split(e){if(this.byStart[e]||this.byEnd[e])return;let n=this.lastSearchedChunk,r=n;const o=e>n.end;for(;n;){if(n.contains(e))return this._splitChunk(n,e);if(n=o?this.byStart[n.end]:this.byEnd[n.start],n===r)return;r=n}}_splitChunk(e,n){if(e.edited&&e.content.length){const o=En(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${e.original}")`)}const r=e.split(n);return this.byEnd[n]=e,this.byStart[n]=r,this.byEnd[r.end]=r,e===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,n=this.firstChunk;for(;n;)e+=n.toString(),n=n.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,n=0;do n+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const n=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return!0;let r=this.lastChunk;do{const o=r.end,a=r.trimEnd(n);if(r.end!==o&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),a)return!0;r=r.previous}while(r);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const n=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return!0;let r=this.firstChunk;do{const o=r.end,a=r.trimStart(n);if(r.end!==o&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),a)return!0;r=r.next}while(r);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,n){function r(a,c){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(p,d)=>d==="$"?"$":d==="&"?a[0]:+d<a.length?a[+d]:`$${d}`):n(...a,a.index,c,a.groups)}l(r,"getReplacement");function o(a,c){let p;const d=[];for(;p=a.exec(c);)d.push(p);return d}if(l(o,"matchAll"),e.global)o(e,this.original).forEach(c=>{if(c.index!=null){const p=r(c,this.original);p!==c[0]&&this.overwrite(c.index,c.index+c[0].length,p)}});else{const a=this.original.match(e);if(a&&a.index!=null){const c=r(a,this.original);c!==a[0]&&this.overwrite(a.index,a.index+a[0].length,c)}}return this}_replaceString(e,n){const{original:r}=this,o=r.indexOf(e);return o!==-1&&this.overwrite(o,o+e.length,n),this}replace(e,n){return typeof e=="string"?this._replaceString(e,n):this._replaceRegexp(e,n)}_replaceAllString(e,n){const{original:r}=this,o=e.length;for(let a=r.indexOf(e);a!==-1;a=r.indexOf(e,a+o))r.slice(a,a+o)!==n&&this.overwrite(a,a+o,n);return this}replaceAll(e,n){if(typeof e=="string")return this._replaceAllString(e,n);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,n)}}const On="2",di=(t=>{const e="default";return t[e]&&typeof t[e]=="object"&&"__esModule"in t[e]?t[e]:t}).toString(),pi=`.then(${di})`,Ge=l((t,e,n)=>{if(n){if(!e.includes("import("))return}else if(!e.includes("import"))return;const o=Lt(e,t)[0].filter(d=>d.d>-1);if(o.length===0)return;const a=new Ut(e);for(const d of o)a.appendRight(d.se,pi);const c=a.toString(),p=a.generateMap({source:t,includeContent:!1,hires:"boundary"});return{code:c,map:p}},"transformDynamicImport"),An=l(t=>{try{const e=V.readFileSync(t,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),Ke=l(()=>{},"noop"),$t=l(()=>Math.floor(Date.now()/1e8),"getTime"),gi=/^(\d+)-[^-]+$/,_n=7,mi=64;class bi extends Map{static{l(this,"FileCache")}cacheDirectory;oldCacheDirectory;initialized=!1;constructor(e=ut.tmpdir,n=C.join(Vr.tmpdir(),"tsx")){super(),this.cacheDirectory=e,this.oldCacheDirectory=n}initialize(){this.initialized||(V.mkdirSync(this.cacheDirectory,{recursive:!0}),this.initialized=!0,setImmediate(()=>{this.expireDiskCache().catch(Ke),this.removeOldCacheDirectory().catch(Ke)}).unref())}get(e){const n=super.get(e);if(n)return n;const r=$t();for(let o=0;o<=_n;o+=1){const a=An(C.join(this.cacheDirectory,`${r-o}-${e}`));if(a)return super.set(e,a),a}}set(e,n){if(super.set(e,n),n){const o=`${$t()}-${e}`;this.initialize(),V.promises.writeFile(C.join(this.cacheDirectory,o),JSON.stringify(n)).catch(Ke)}return this}async expireDiskCache(){this.initialize();const e=$t(),n=await V.promises.opendir(this.cacheDirectory),r=[];let o=0;for await(const a of n){const c=gi.exec(a.name);if(c){const p=Number(c[1]);Number.isSafeInteger(p)&&e-p>_n&&r.push(V.promises.unlink(C.join(this.cacheDirectory,a.name)).catch(Ke))}o+=1,o===mi&&(await Promise.all(r),r.length=0,o=0)}await Promise.all(r)}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 Qe=process.env.TSX_DISABLE_CACHE?new Map:new bi;const Tn=44,wi=59,jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ln=new Uint8Array(64),Rn=new Uint8Array(128);for(let t=0;t<jn.length;t++){const e=jn.charCodeAt(t);Ln[t]=e,Rn[e]=t}const It=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}};function ki(t){const e=new Int32Array(5),n=[];let r=0;do{const o=yi(t,r),a=[];let c=!0,p=0;e[0]=0;for(let d=r;d<o;d++){let h;d=_e(t,d,e,0);const f=e[0];f<p&&(c=!1),p=f,$n(t,d,o)?(d=_e(t,d,e,1),d=_e(t,d,e,2),d=_e(t,d,e,3),$n(t,d,o)?(d=_e(t,d,e,4),h=[f,e[1],e[2],e[3],e[4]]):h=[f,e[1],e[2],e[3]]):h=[f],a.push(h)}c||vi(a),n.push(a),r=o+1}while(r<=t.length);return n}l(ki,"decode");function yi(t,e){const n=t.indexOf(";",e);return n===-1?t.length:n}l(yi,"indexOf");function _e(t,e,n,r){let o=0,a=0,c=0;do{const d=t.charCodeAt(e++);c=Rn[d],o|=(c&31)<<a,a+=5}while(c&32);const p=o&1;return o>>>=1,p&&(o=-2147483648|-o),n[r]+=o,e}l(_e,"decodeInteger");function $n(t,e,n){return e>=n?!1:t.charCodeAt(e)!==Tn}l($n,"hasMoreVlq");function vi(t){t.sort(Ci)}l(vi,"sort");function Ci(t,e){return t[0]-e[0]}l(Ci,"sortComparator$1");function xi(t){const e=new Int32Array(5),n=1024*16,r=n-36,o=new Uint8Array(n),a=o.subarray(0,r);let c=0,p="";for(let d=0;d<t.length;d++){const h=t[d];if(d>0&&(c===n&&(p+=It.decode(o),c=0),o[c++]=wi),h.length!==0){e[0]=0;for(let f=0;f<h.length;f++){const i=h[f];c>r&&(p+=It.decode(a),o.copyWithin(0,r,c),c-=r),f>0&&(o[c++]=Tn),c=Te(o,c,e,i,0),i.length!==1&&(c=Te(o,c,e,i,1),c=Te(o,c,e,i,2),c=Te(o,c,e,i,3),i.length!==4&&(c=Te(o,c,e,i,4)))}}}return p+It.decode(o.subarray(0,c))}l(xi,"encode");function Te(t,e,n,r,o){const a=r[o];let c=a-n[o];n[o]=a,c=c<0?-c<<1|1:c<<1;do{let p=c&31;c>>>=5,c>0&&(p|=32),t[e++]=Ln[p]}while(c>0);return e}l(Te,"encodeInteger");const Si=/^[\w+.-]+:\/\//,Ei=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Oi=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function Ai(t){return Si.test(t)}l(Ai,"isAbsoluteUrl");function _i(t){return t.startsWith("//")}l(_i,"isSchemeRelativeUrl");function In(t){return t.startsWith("/")}l(In,"isAbsolutePath");function Ti(t){return t.startsWith("file:")}l(Ti,"isFileUrl");function Pn(t){return/^[.?#]/.test(t)}l(Pn,"isRelative");function He(t){const e=Ei.exec(t);return Nn(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}l(He,"parseAbsoluteUrl");function ji(t){const e=Oi.exec(t),n=e[2];return Nn("file:","",e[1]||"","",In(n)?n:"/"+n,e[3]||"",e[4]||"")}l(ji,"parseFileUrl");function Nn(t,e,n,r,o,a,c){return{scheme:t,user:e,host:n,port:r,path:o,query:a,hash:c,type:7}}l(Nn,"makeUrl");function Dn(t){if(_i(t)){const n=He("http:"+t);return n.scheme="",n.type=6,n}if(In(t)){const n=He("http://foo.com"+t);return n.scheme="",n.host="",n.type=5,n}if(Ti(t))return ji(t);if(Ai(t))return He(t);const e=He("http://foo.com/"+t);return e.scheme="",e.host="",e.type=t?t.startsWith("?")?3:t.startsWith("#")?2:4:1,e}l(Dn,"parseUrl");function Li(t){if(t.endsWith("/.."))return t;const e=t.lastIndexOf("/");return t.slice(0,e+1)}l(Li,"stripPathFilename");function Ri(t,e){Un(e,e.type),t.path==="/"?t.path=e.path:t.path=Li(e.path)+t.path}l(Ri,"mergePaths");function Un(t,e){const n=e<=4,r=t.path.split("/");let o=1,a=0,c=!1;for(let d=1;d<r.length;d++){const h=r[d];if(!h){c=!0;continue}if(c=!1,h!=="."){if(h===".."){a?(c=!0,a--,o--):n&&(r[o++]=h);continue}r[o++]=h,a++}}let p="";for(let d=1;d<o;d++)p+="/"+r[d];(!p||c&&!p.endsWith("/.."))&&(p+="/"),t.path=p}l(Un,"normalizePath");function $i(t,e){if(!t&&!e)return"";const n=Dn(t);let r=n.type;if(e&&r!==7){const a=Dn(e),c=a.type;switch(r){case 1:n.hash=a.hash;case 2:n.query=a.query;case 3:case 4:Ri(n,a);case 5:n.user=a.user,n.host=a.host,n.port=a.port;case 6:n.scheme=a.scheme}c>r&&(r=c)}Un(n,r);const o=n.query+n.hash;switch(r){case 2:case 3:return o;case 4:{const a=n.path.slice(1);return a?Pn(e||t)&&!Pn(a)?"./"+a+o:a+o:o||"."}case 5:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}l($i,"resolve$1");function Mn(t,e){return e&&!e.endsWith("/")&&(e+="/"),$i(t,e)}l(Mn,"resolve");function Ii(t){if(!t)return"";const e=t.lastIndexOf("/");return t.slice(0,e+1)}l(Ii,"stripFilename");const oe=0;function Pi(t,e){const n=Fn(t,0);if(n===t.length)return t;e||(t=t.slice());for(let r=n;r<t.length;r=Fn(t,r+1))t[r]=Di(t[r],e);return t}l(Pi,"maybeSort");function Fn(t,e){for(let n=e;n<t.length;n++)if(!Ni(t[n]))return n;return t.length}l(Fn,"nextUnsortedSegmentLine");function Ni(t){for(let e=1;e<t.length;e++)if(t[e][oe]<t[e-1][oe])return!1;return!0}l(Ni,"isSorted");function Di(t,e){return e||(t=t.slice()),t.sort(Ui)}l(Di,"sortSegments");function Ui(t,e){return t[oe]-e[oe]}l(Ui,"sortComparator");let qe=!1;function Mi(t,e,n,r){for(;n<=r;){const o=n+(r-n>>1),a=t[o][oe]-e;if(a===0)return qe=!0,o;a<0?n=o+1:r=o-1}return qe=!1,n-1}l(Mi,"binarySearch");function Fi(t,e,n){for(let r=n-1;r>=0&&t[r][oe]===e;n=r--);return n}l(Fi,"lowerBound");function Bi(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}l(Bi,"memoizedState");function Wi(t,e,n,r){const{lastKey:o,lastNeedle:a,lastIndex:c}=n;let p=0,d=t.length-1;if(r===o){if(e===a)return qe=c!==-1&&t[c][oe]===e,c;e>=a?p=c===-1?0:c:d=c}return n.lastKey=r,n.lastNeedle=e,n.lastIndex=Mi(t,e,p,d)}l(Wi,"memoizedBinarySearch");class Bn{static{l(this,"TraceMap")}constructor(e,n){const r=typeof e=="string";if(!r&&e._decodedMemo)return e;const o=r?JSON.parse(e):e,{version:a,file:c,names:p,sourceRoot:d,sources:h,sourcesContent:f}=o;this.version=a,this.file=c,this.names=p||[],this.sourceRoot=d,this.sources=h,this.sourcesContent=f,this.ignoreList=o.ignoreList||o.x_google_ignoreList||void 0;const i=Mn(d||"",Ii(n));this.resolvedSources=h.map(x=>Mn(x||"",i));const{mappings:S}=o;typeof S=="string"?(this._encoded=S,this._decoded=void 0):(this._encoded=void 0,this._decoded=Pi(S,r)),this._decodedMemo=Bi(),this._bySources=void 0,this._bySourceMemos=void 0}}function Zo(t){return t}l(Zo,"cast$2");function Wn(t){var e;return(e=t)._decoded||(e._decoded=ki(t._encoded))}l(Wn,"decodedMappings");function Ji(t,e,n){const r=Wn(t);if(e>=r.length)return null;const o=r[e],a=Vi(o,t._decodedMemo,e,n);return a===-1?null:o[a]}l(Ji,"traceSegment");function Vi(t,e,n,r,o){let a=Wi(t,r,e,n);return qe&&(a=Fi(t,r,a)),a===-1||a===t.length?-1:a}l(Vi,"traceSegmentInternal");class Pt{static{l(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}}function ea(t){return t}l(ea,"cast$1");function Jn(t,e){return t._indexes[e]}l(Jn,"get");function je(t,e){const n=Jn(t,e);if(n!==void 0)return n;const{array:r,_indexes:o}=t,a=r.push(e);return o[e]=a-1}l(je,"put");function zi(t,e){const n=Jn(t,e);if(n===void 0)return;const{array:r,_indexes:o}=t;for(let a=n+1;a<r.length;a++){const c=r[a];r[a-1]=c,o[c]--}o[e]=void 0,r.pop()}l(zi,"remove");const Gi=0,Ki=1,Qi=2,Hi=3,qi=4,Vn=-1;class Xi{static{l(this,"GenMapping")}constructor({file:e,sourceRoot:n}={}){this._names=new Pt,this._sources=new Pt,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=n,this._ignoreList=new Pt}}function ta(t){return t}l(ta,"cast");const Yi=l((t,e,n,r,o,a,c,p)=>no(!0,t,e,n,r,o,a,c),"maybeAddSegment");function Zi(t,e,n){const{_sources:r,_sourcesContent:o}=t,a=je(r,e);o[a]=n}l(Zi,"setSourceContent");function eo(t,e,n=!0){const{_sources:r,_sourcesContent:o,_ignoreList:a}=t,c=je(r,e);c===o.length&&(o[c]=null),n?je(a,c):zi(a,c)}l(eo,"setIgnore");function zn(t){const{_mappings:e,_sources:n,_sourcesContent:r,_names:o,_ignoreList:a}=t;return io(e),{version:3,file:t.file||void 0,names:o.array,sourceRoot:t.sourceRoot||void 0,sources:n.array,sourcesContent:r,mappings:e,ignoreList:a.array}}l(zn,"toDecodedMap");function to(t){const e=zn(t);return Object.assign(Object.assign({},e),{mappings:xi(e.mappings)})}l(to,"toEncodedMap");function no(t,e,n,r,o,a,c,p,d){const{_mappings:h,_sources:f,_sourcesContent:i,_names:S}=e,x=ro(h,n),O=so(x,r);if(!o)return oo(x,O)?void 0:Gn(x,O,[r]);const _=je(f,o),y=p?je(S,p):Vn;if(_===i.length&&(i[_]=null),!ao(x,O,_,a,c,y))return Gn(x,O,p?[r,_,a,c,y]:[r,_,a,c])}l(no,"addSegmentInternal");function ro(t,e){for(let n=t.length;n<=e;n++)t[n]=[];return t[e]}l(ro,"getLine");function so(t,e){let n=t.length;for(let r=n-1;r>=0;n=r--){const o=t[r];if(e>=o[Gi])break}return n}l(so,"getColumnIndex");function Gn(t,e,n){for(let r=t.length;r>e;r--)t[r]=t[r-1];t[e]=n}l(Gn,"insert");function io(t){const{length:e}=t;let n=e;for(let r=n-1;r>=0&&!(t[r].length>0);n=r,r--);n<e&&(t.length=n)}l(io,"removeEmptyFinalLines");function oo(t,e){return e===0?!0:t[e-1].length===1}l(oo,"skipSourceless");function ao(t,e,n,r,o,a){if(e===0)return!1;const c=t[e-1];return c.length===1?!1:n===c[Ki]&&r===c[Qi]&&o===c[Hi]&&a===(c.length===5?c[qi]:Vn)}l(ao,"skipSource");const Kn=Qn("",-1,-1,"",null,!1),co=[];function Qn(t,e,n,r,o,a){return{source:t,line:e,column:n,name:r,content:o,ignore:a}}l(Qn,"SegmentObject");function Hn(t,e,n,r,o){return{map:t,sources:e,source:n,content:r,ignore:o}}l(Hn,"Source");function qn(t,e){return Hn(t,e,"",null,!1)}l(qn,"MapSource");function lo(t,e,n){return Hn(null,co,t,e,n)}l(lo,"OriginalSource");function uo(t){const e=new Xi({file:t.map.file}),{sources:n,map:r}=t,o=r.names,a=Wn(r);for(let c=0;c<a.length;c++){const p=a[c];for(let d=0;d<p.length;d++){const h=p[d],f=h[0];let i=Kn;if(h.length!==1){const R=n[h[1]];if(i=Xn(R,h[2],h[3],h.length===5?o[h[4]]:""),i==null)continue}const{column:S,line:x,name:O,content:_,source:y,ignore:E}=i;Yi(e,c,f,y,x,S,O),y&&_!=null&&Zi(e,y,_),E&&eo(e,y,!0)}}return e}l(uo,"traceMappings");function Xn(t,e,n,r){if(!t.map)return Qn(t.source,e,n,r,t.content,t.ignore);const o=Ji(t.map,e,n);return o==null?null:o.length===1?Kn:Xn(t.sources[o[1]],o[2],o[3],o.length===5?t.map.names[o[4]]:r)}l(Xn,"originalPositionFor");function fo(t){return Array.isArray(t)?t:[t]}l(fo,"asArray");function ho(t,e){const n=fo(t).map(a=>new Bn(a,"")),r=n.pop();for(let a=0;a<n.length;a++)if(n[a].sources.length>1)throw new Error(`Transformation map ${a} must have exactly one source file.
20
+ Did you specify these with the most recent transformation maps first?`);let o=Yn(r,e,"",0);for(let a=n.length-1;a>=0;a--)o=qn(n[a],[o]);return o}l(ho,"buildSourceMapTree");function Yn(t,e,n,r){const{resolvedSources:o,sourcesContent:a,ignoreList:c}=t,p=r+1,d=o.map((h,f)=>{const i={importer:n,depth:p,source:h||"",content:void 0,ignore:void 0},S=e(i.source,i),{source:x}=i;if(S)return Yn(new Bn(S,x),e,x,p);const O=a?a[f]:null,_=c?c.includes(f):!1;return lo(x,O,_)});return qn(t,d)}l(Yn,"build");class po{static{l(this,"SourceMap")}constructor(e,n){const r=n.decodedMappings?zn(e):to(e);this.version=r.version,this.file=r.file,this.mappings=r.mappings,this.names=r.names,this.ignoreList=r.ignoreList,this.sourceRoot=r.sourceRoot,this.sources=r.sources,n.excludeContent||(this.sourcesContent=r.sourcesContent)}toString(){return JSON.stringify(this)}}function go(t,e,n){const r={excludeContent:!1,decodedMappings:!1},o=ho(t,e);return new po(uo(o),r)}l(go,"remapping");const Zn=l((t,e,n)=>{const r=[],o={code:e};for(const a of n){const c=a(t,o.code);c&&(Object.assign(o,c),r.unshift(c.map))}return{...o,map:go(r,()=>null)}},"applyTransformersSync"),mo=l(t=>{const e=[];let n=!1,r=!0;for(let o=0;o<t.length;o+=1){let a=t[o];if(a==="\\"&&n){if(o+1===t.length)return e;o+=1,a=t[o]}else if(a===" "&&!n){r=!0;continue}else if(a==='"'){n=!n;continue}r?(e.push(a),r=!1):e[e.length-1]+=a}return e},"tokenizeNodeOptionsEnv"),er=l((t,e,n)=>{for(let r=0;r<e.length;r+=1){const o=e[r];if(o.length<=1||o[0]!=="-")continue;const a=o[1]==="-"?o.indexOf("="):-1;let c=a===-1?o:o.slice(0,a);c.includes("_",2)&&(c=c.slice(0,2)+c.slice(2).replaceAll("_","-"));for(const p of t.forms){const[d,h]=p;if(c!==d||(h===3||h===5)&&a===-1)continue;const f=h===4||h===5,i=h>=3?0:h;let S=f?p[2]:"";i===0&&!f&&(a===-1?(r+=1,S=e[r]??"",S[0]==="\\"&&S[1]==="-"&&(S=S.slice(1))):S=o.slice(a+1)),n=t.fold(S,n,i);break}}return n},"scanSource"),bo=l(t=>{let e=t.init();const n=process.env.NODE_OPTIONS;return n&&(e=er(t,mo(n),e)),e=er(t,process.execArgv,e),e},"getOptionValue"),wo=l((t,e,n)=>n===1,"setByEffect"),ko=l((t,e)=>({forms:e,init:l(()=>t,"init"),fold:wo}),"booleanFlag"),yo=ko(!1,[["--inspect-brk-node",1],["--inspect-brk",1],["--inspect-wait",1],["--inspect",1],["--no-inspect",2]]),vo=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),Co=bo(yo),tr={...vo,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE||Co,minifyWhitespace:!0,keepNames:!0},nr=l(t=>{const e=t.sourcefile;if(e){const n=C.extname(e.split("?")[0]);n?n===".cts"||n===".mts"?t.sourcefile=`${e.slice(0,-3)}ts`:n===".mjs"&&(t.sourcefile=`${e.slice(0,-3)}js`):t.sourcefile+=".js"}return n=>(n.map&&(t.sourcefile!==e&&(n.map=n.map.replace(JSON.stringify(t.sourcefile),JSON.stringify(e))),n.map=JSON.parse(n.map)),n)},"patchOptions"),rr=l(t=>{throw t.name="TransformError",delete t.errors,delete t.warnings,t},"formatEsbuildError"),xo=l((t,e)=>({...Rt(Xs)?{dirname:C.dirname(t),filename:t}:{},url:e}),"getImportMeta"),So=l((t,e)=>{if(!t.includes("import"))return!1;try{return Lt(t,e)[0].some(n=>n.d===-2)}catch{return!0}},"hasImportMeta"),sr=l((t,e,n)=>{let r,o,a;if(e.startsWith("file://")){r=e;const i=new URL(e);o=le.fileURLToPath(i)}else[o,a]=e.split("?"),r=le.pathToFileURL(o)+(a?`?${a}`:"");const{cjsBanner:c,...p}=n??{},d={...tr,format:"cjs",sourcefile:o,banner:`__filename=${JSON.stringify(o)};(()=>{${c??""}`,footer:"})()",platform:"node",...p};d.format==="cjs"&&!o.endsWith(".cjs")&&!o.endsWith(".cts")&&So(t,o)&&(d.define={...d.define,"import.meta":JSON.stringify(xo(o,r))});const h=gn([t,r,JSON.stringify(d),Ne.version,On].join("-"));let f=Qe.get(h);return f||(f=Zn(e,t,[(i,S)=>{const x=nr(d);let O;try{O=Ne.transformSync(S,d)}catch(_){throw rr(_)}return x(O)},(i,S)=>Ge(i,S,!0)]),Qe.set(h,f)),f},"transformSync"),Eo=l((t,e,n)=>{const r={...tr,format:"esm",sourcefile:e,...n},o=gn([t,JSON.stringify(r),Ne.version,On].join("-"));let a=Qe.get(o);return a||(a=Zn(e,t,[(c,p)=>{const d=nr(r);let h;try{h=Ne.transformSync(p,r)}catch(f){throw rr(f)}return d(h)},(c,p)=>Ge(c,p,!0)]),Qe.set(o,a)),a},"transformEsmSync"),Oo=`
21
+ //# sourceMappingURL=data:application/json;base64,`,ir=l(()=>process.sourceMapsEnabled??!0,"shouldApplySourceMap"),Nt=l(({code:t,map:e})=>t+Oo+Buffer.from(JSON.stringify(e),"utf8").toString("base64"),"inlineSourceMap");let ae=!0;const ge=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Le=0;if(ge.process&&ge.process.env&&ge.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:n,TERM:r,COLORTERM:o}=ge.process.env;e||n||t==="0"?ae=!1:t==="1"||t==="2"||t==="3"?ae=!0:r==="dumb"?ae=!1:"CI"in ge.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(a=>a in ge.process.env)?ae=!0:ae=process.stdout.isTTY,ae&&(process.platform==="win32"||o&&(o==="truecolor"||o==="24bit")?Le=3:r&&(r.endsWith("-256color")||r.endsWith("256"))?Le=2:Le=1)}let Xe={enabled:ae,supportLevel:Le};function Ye(t,e,n=1){const r=`\x1B[${t}m`,o=`\x1B[${e}m`,a=new RegExp(`\\x1b\\[${e}m`,"g");return c=>Xe.enabled&&Xe.supportLevel>=n?r+(""+c).replace(a,r)+o:""+c}l(Ye,"kolorist");const Ao=Ye(30,39),_o=Ye(44,49),To=Ye(100,49),jo=Ye(103,49),Ze=Number(process.env.TSX_DEBUG);Ze&&(Xe.enabled=!0,Xe.supportLevel=3);const or=l(t=>(e,...n)=>{if(!Ze||e>Ze)return;const r=`${To(` tsx P${process.pid} `)} ${t}`,o=n.map(a=>typeof a=="string"?a:zr.inspect(a,{colors:!0})).join(" ");V.writeSync(1,`${r} ${o}
22
+ `)},"createLog"),me=or(jo(Ao(" CJS "))),Lo=or(_o(" ESM ")),et=new Map,Ro=l(t=>{if(et.has(t))return et.get(t);if(!V.existsSync(t)){et.set(t,void 0);return}const e=V.readFileSync(t,"utf8");try{const n=JSON.parse(e);return et.set(t,n),n}catch{throw new Error(`Error parsing: ${t}`)}},"readPackageJsonSync"),ar=l(t=>{let e=new URL("package.json",t);for(;!e.pathname.endsWith("/node_modules/package.json");){const n=le.fileURLToPath(e),r=Ro(n);if(r)return r;const o=e;if(e=new URL("../package.json",e),e.pathname===o.pathname)break}},"findPackageJsonSync"),$o=l(t=>ar(t)?.type??"commonjs","getPackageTypeSync"),Io=l(t=>ar(t)?.type,"getNearestPackageTypeSync"),Po=[".cts",".mts",".ts",".tsx",".jsx"],No=[".js",".cjs",".mjs"],cr=[".ts",".tsx",".jsx"],lr="module.exports",Do='Top-level await is currently not supported with the "cjs" output format',ur=l(t=>{const e=C.extname(t);return e===".mjs"||e===".mts"||(e===".js"||e===".ts")&&Io(le.pathToFileURL(t).toString())!=="commonjs"},"isRequireEsmCandidate"),Dt=l((t,e,n,r)=>{const o=Object.getOwnPropertyDescriptor(t,e);o?.set?t[e]=n:(!o||o.configurable)&&Object.defineProperty(t,e,{value:n,enumerable:o?.enumerable||r?.enumerable,writable:r?.writable??(o?o.writable:!0),configurable:r?.configurable??(o?o.configurable:!0)})},"safeSet"),Uo=l((t,e,n,r)=>{const o=e[".js"],a=process.features.require_module??Rt(Ys),c=l((p,d)=>{if(t.enabled===!1)return o(p,d);const[h,f]=d.split("?");if((new URLSearchParams(f).get("namespace")??void 0)!==r)return o(p,d);me(2,"load",{filePath:d}),p.id?.startsWith("data:text/javascript,")&&(p.path=C.dirname(h)),ut.parent?.send&&ut.parent.send({type:"dependency",path:h});const S=Po.some(k=>h.endsWith(k)),x=No.some(k=>h.endsWith(k));if(!S&&!x)return o(p,h);let O=V.readFileSync(h,"utf8");const _=x&&!h.endsWith(".cjs")&&!h.endsWith(".cts")&&kn(O),y=(S||_)&&n&&xt(n,h)?n.config:void 0;if(h.endsWith(".cjs")){const k=Ge(d,O);k&&(O=ir()?Nt(k):k.code)}else if(S||_)try{const k=sr(O,d,{tsconfigRaw:y});O=ir()?Nt(k):k.code}catch(k){throw ur(h)&&k instanceof Error&&k.name==="TransformError"&&k.message.includes(Do)&&Object.assign(k,{code:a?"ERR_REQUIRE_ASYNC_MODULE":"ERR_REQUIRE_ESM"}),k}me(1,"loaded",{filePath:h}),p._compile(O,h),f&&K._cache[h]===p&&(K._cache[d]=p,delete K._cache[h]);const{exports:E}=p;(a&&E&&(typeof E=="object"||typeof E=="function")?Object.getOwnPropertyDescriptor(E,lr):void 0)?.get&&ur(h)&&(p.exports=E[lr])},"transformer");Dt(e,".js",c);for(const p of cr)Dt(e,p,c,{enumerable:!r,writable:!0,configurable:!0});return Dt(e,".mjs",c,{writable:!0,configurable:!0}),()=>{e[".js"]===c&&(e[".js"]=o);for(const p of[...cr,".mjs"])e[p]===c&&delete e[p]}},"createExtensions"),Mo=l(t=>e=>{if((e==="."||e===".."||e.endsWith("/.."))&&(e+="/"),Ve.test(e)){let n=C.join(e,"index");e.startsWith("./")&&(n=`./${n}`);try{return t(n)}catch{}}try{return t(e)}catch(n){const r=n;if(r.code==="MODULE_NOT_FOUND")try{return t(`${e}${C.sep}index`)}catch{}throw r}},"createImplicitResolver"),fr=l(t=>{if(!t.startsWith("data:text/javascript,"))return;const e=t.indexOf("?");if(e===-1)return;const r=new URLSearchParams(t.slice(e+1)).get("filePath");if(r)return r},"getOriginalFilePath"),hr=l(t=>{const e=fr(t);return e&&(K._cache[e]=K._cache[t],delete K._cache[t],t=e),t},"interopCjsExports"),dr=[".js",".json"],pr=[".ts",".tsx",".jsx"],Fo=new Set([".json",".node"]),Bo=[...pr,...dr],Wo=[...dr,...pr],Re=Object.create(null);Re[".js"]=[".ts",".tsx",".js",".jsx"],Re[".jsx"]=[".tsx",".ts",".jsx",".js"],Re[".cjs"]=[".cts"],Re[".mjs"]=[".mts"];const Jo=new Set([".ts",".tsx",".mts",".cts"]),gr=l((t,e=!1)=>{const n=t.indexOf("?"),r=n===-1?t:t.slice(0,n),o=n===-1?"":t.slice(n);if(!e&&!de(r)&&!r.startsWith(Ce))return;const a=C.extname(r);if(Jo.has(a))return;const c=Re[a];if(c){const d=r.slice(0,-a.length);return c.map(h=>d+h+o)}return Fo.has(a)?void 0:(!(t.startsWith(Ce)||de(r))||r.includes(pn)||r.includes("/node_modules/")?Wo:Bo).map(d=>r+d+o)},"getExtensionResolution"),Vo=l((t,e)=>{let n;return C.isAbsolute(t)?n=t:Et(t)&&e&&(n=C.resolve(e,t)),n!==void 0&&!V.existsSync(n)},"candidateDoesntExist"),tt=l((t,e,n,r)=>{if(me(3,"resolveTsFilename",{request:e,isDirectory:Ve.test(e)}),Ve.test(e))return;const o=gr(e,r);if(o){for(const a of o)if(!Vo(a,n))try{return t(a)}catch(c){const{code:p}=c;if(p!=="MODULE_NOT_FOUND"&&p!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw c}}},"resolveTsFilename"),zo=l((t,e,n,r)=>o=>{if(me(3,"resolveTsFilename",{request:o,resolveTsExtensions:n,isFilePath:de(o)}),n&&de(o)){const a=tt(t,o,e,r);if(a)return a}try{return t(o)}catch(a){const c=a;if(n&&c.code==="MODULE_NOT_FOUND"){if(c.path){const d=c.message.match(/^Cannot find module '([^']+)'$/);if(d){const f=d[1],i=tt(t,f,e,r);if(i)return i}const h=c.message.match(/^Cannot find module '([^']+)'. Please verify that the package.json has a valid "main" entry$/);if(h){const f=h[1],i=tt(t,f,e,r);if(i)return i}}const p=tt(t,o,e,r);if(p)return p}throw c}},"createTsExtensionResolver"),mr="at cjsPreparseModuleExports (node:internal",Go=l(t=>{const e=t.stack.split(`
23
+ `).slice(1);return e[1].includes(mr)||e[2].includes(mr)},"isFromCjsLexer"),Ko=l((t,e)=>{const n=t.split("?"),r=new URLSearchParams(n[1]);if(e?.filename){const o=fr(e.filename);let a;if(o){const d=o.split("?"),h=d[0];a=d[1];const i=new URLSearchParams(a).get("namespace");e.filename=h,e.path=C.dirname(h),e.paths=K._nodeModulePaths(e.path),i||(K._cache[h]=e)}a||(a=e.filename.split("?")[1]);const p=new URLSearchParams(a).get("namespace");p&&r.append("namespace",p)}return[n[0],r,(o,a)=>(C.isAbsolute(o)&&!o.endsWith(".json")&&!o.endsWith(".node")&&!(a===0&&Go(new Error))&&(o+=St(r)),o)]},"preserveQuery"),Qo=l((t,e,n,r)=>{if(t.startsWith(Ce)&&(t=le.fileURLToPath(t)),r&&!de(t)&&!Ot(e?.filename)){const o=fn(r,t);for(const a of o)try{return n(a)}catch{}}return n(t)},"resolveTsPaths"),Ho=l((t,e,n,r)=>(o,a,...c)=>{if(t.enabled===!1)return e(o,a,...c);o=hr(o);const[p,d,h]=Ko(o,a);if((d.get("namespace")??void 0)!==r)return e(o,a,...c);me(2,"resolve",{request:o,parent:a?.filename??a,restOfArgs:c});let f=l(_=>e(_,a,...c),"nextResolveSimple");const i=Ot(a?.filename),S=!!(r||a?.filename&&dn.test(a.filename)),x=!!(S||n?.config.compilerOptions?.allowJs&&!i);f=zo(f,a?.path??void 0,x,S),f=Mo(f);const O=h(Qo(p,a,f,n),c.length);return me(1,"resolved",{request:o,parent:a?.filename??a,resolved:O}),O},"createResolveFilename"),br=l((t,e)=>{if(!e)throw new Error("The current file path (__filename or import.meta.url) must be provided in the second argument of tsx.require()");return t.startsWith(".")?((typeof e=="string"&&e.startsWith(Ce)||e instanceof URL)&&(e=le.fileURLToPath(e)),C.resolve(C.dirname(e),t)):t},"resolveContext"),qo=l(t=>{const{sourceMapsEnabled:e}=process,n={enabled:!0},r=hn(process.env.TSX_TSCONFIG_PATH);process.setSourceMapsEnabled(!0);const o=K._resolveFilename,a=Ho(n,o,r,t?.namespace);K._resolveFilename=a;const c=Uo(n,K._extensions,r,t?.namespace),p=t?.namespace?void 0:Js(),d=l(()=>{e===!1&&process.setSourceMapsEnabled(!1),n.enabled=!1,K._resolveFilename===a&&(K._resolveFilename=o),c(),p?.()},"unregister");if(t?.namespace){const h=l((i,S)=>{const x=br(i,S),[O,_]=x.split("?"),y=new URLSearchParams(_);return t.namespace&&!O.startsWith("node:")&&y.set("namespace",t.namespace),require(O+St(y))},"scopedRequire");d.require=h;const f=l((i,S,x)=>{const O=br(i,S),[_,y]=O.split("?"),E=new URLSearchParams(y);return t.namespace&&!_.startsWith("node:")&&E.set("namespace",t.namespace),a(_+St(E),module,!1,x)},"scopedResolve");d.resolve=f,d.unregister=d}return d},"register");exports.cjsExtensionPattern=Ms,exports.debugEnabled=Ze,exports.esmLoadReadFile=qs,exports.fileUrlPrefix=Ce,exports.getExtensionResolution=gr,exports.getPackageTypeSync=$o,exports.implicitTsExtensionsPattern=Us,exports.importAttributes=Hs,exports.inlineSourceMap=Nt,exports.interopCjsExports=hr,exports.isBarePackageNamePattern=Bs,exports.isDependencyPath=Ot,exports.isDirectoryPattern=Ve,exports.isESM=kn,exports.isFeatureSupported=Rt,exports.isFilePath=de,exports.isGlobalCjsLoaderActive=Ws,exports.isJsonPattern=Fs,exports.isRelativePath=Et,exports.je=xt,exports.loadTsconfig=hn,exports.logEsm=Lo,exports.moduleRegisterHooksCjsReload=Qs,exports.nodeModulesPath=pn,exports.readJsonFile=An,exports.register=qo,exports.transformDynamicImport=Ge,exports.transformEsmSync=Eo,exports.transformSync=sr,exports.tsExtensions=Ds,exports.tsExtensionsPattern=dn,exports.wt=fn;
@@ -0,0 +1,2 @@
1
+ var Kt=Object.defineProperty;var i=(t,r)=>Kt(t,"name",{value:r,configurable:!0});import Dt from"node:crypto";import j from"node:module";import{MessageChannel as Yt}from"node:worker_threads";import{i as F,e as k,b as Zt,m as kt}from"./temporary-directory-Du7LpLp9.mjs";import{l as ht,a as gt,g as te,b as ee,d as B,e as u,f as tt,h as v,j as A,p as yt,k as y,m as re,n as se,o as et,q,s as Pt,w as St,u as Ut,v as Q,x as W,y as vt,z as ne}from"./require-CBjy4Foe.mjs";import{pathToFileURL as S,fileURLToPath as w}from"node:url";import{readFileSync as oe,existsSync as ae}from"node:fs";import{readFile as ie}from"node:fs/promises";import{p as ce,i as Rt,a as H,b as me,c as wt,t as It,r as rt}from"./index-DE3OBZuV.mjs";import U from"node:path";const de=i(()=>({active:!0,parsedTsconfig:void 0}),"createDefaultData"),Tt=i(t=>{const r={active:!0,namespace:t?.namespace,onImport:t?.onImport,parsedTsconfig:void 0,port:t?.port,tsconfig:t?.tsconfig};return t?.tsconfig!==!1&&(r.parsedTsconfig=ht(t?.tsconfig??process.env.TSX_TSCONFIG_PATH)),r},"createData"),le=i(t=>async r=>{if(!r)throw new Error(`tsx must be loaded with --import instead of --loader
2
+ The --loader flag was deprecated in Node v20.6.0 and v18.19.0`);Object.assign(t,Tt(r)),r.port&&r.port.on("message",e=>{e==="deactivate"&&(t.active=!1,r.port.postMessage({type:"deactivated"}))})},"createInitialize"),ue=i(t=>()=>(t.parsedTsconfig=ht(process.env.TSX_TSCONFIG_PATH),"process.setSourceMapsEnabled(true);"),"createGlobalPreload"),fe=i(t=>{const{pathname:r}=new URL(t),e=U.extname(r);if(e===".mts"||e===".mjs")return"module";if(e===".cts"||e===".cjs")return"commonjs";if(e===".js"||gt.includes(e))return ee(t)},"getFormatFromFileUrl"),pe=i(t=>{const{pathname:r}=new URL(t),e=U.extname(r);if(e===".mts"||e===".mjs")return"module";if(e===".cts"||e===".cjs")return"commonjs";if(e===".js"||gt.includes(e))return te(t)},"getFormatFromFileUrlSync"),st="tsx-namespace",I=`${st}=`,O="tsx-commonjs-export-preparse",he=`${O}=1`,E="tsx-commonjs-virtual-query",$=new Map,ge=/^data:/i,T=i(t=>ge.test(t),"isDataUrl"),nt=i((t,r)=>t.slice(1).split("&").filter(e=>e&&r.every(s=>!e.startsWith(s))).join("&"),"getQueryWithoutParameters"),G=i((t,r)=>{const e=nt(t,r);return e?`?${e}`:""},"getSearchWithoutParameters"),ye=i(t=>t.replaceAll(/\/\*[\s\S]*?\*\/|\/\/[^\n\r]*/g,""),"stripComments"),Pe=i(t=>{const r=ye(t);if(/^\s*export\s*\*/.test(r))return"named";if(/^\s*import\s*\*\s*as\s+[\w$]+/.test(r))return"namespace";const e=r.match(/\{([^}]*)\}/)?.[1];if(e)return e.split(",").some(s=>{const n=s.trim().split(/\s+as\s+/)[0];return!!(n&&n!=="default")})?"named":void 0},"getCommonJsImportBinding"),Se=i((t,r,e)=>{const s=$.get(t);if(!s)return!1;try{const[n]=ce(s);return n.some(o=>{if(o.d!==-1||o.n!==r)return!1;const c=Pe(s.slice(o.ss,o.s));return c==="named"||e&&c==="namespace"})}catch{return!1}},"parentImportsCommonJsExports"),R=i(t=>{const r=t.indexOf("?"),e=t.indexOf("#");if(T(t)){if(e===-1)return;const s=t.slice(e+1),n=s.lastIndexOf("&"),o=s.slice(n+1);return o.startsWith(I)?o.slice(I.length):void 0}if(!(r===-1||e!==-1&&e<r))return new URLSearchParams(t.slice(r,e===-1?void 0:e)).get(st)??void 0},"getNamespace"),Lt=F(Zt)?"importAttributes":"importAssertions",jt=i(t=>t==="commonjs"||t==="commonjs-typescript","isCommonJsFormat"),Et=i(t=>t==="module-typescript"||t==="typescript","isModuleTypeScriptFormat"),Ue=F(k),ve=[`${E}=`],x=[`${O}=`,`${E}=`],L=i((t,r)=>r.parsedTsconfig&&se(r.parsedTsconfig,t)?r.parsedTsconfig.config:void 0,"getTsconfigRaw"),ot=i((t,r)=>{const e=r?`${t}?namespace=${encodeURIComponent(r)}`:S(t).toString();return`require = require("node:module").createRequire(${JSON.stringify(e)});`},"getCjsRequireBanner"),Re=i(t=>{if(!t.searchParams.has(E))return;const{pathname:r}=t,e=r.toLowerCase().lastIndexOf("%3f");if(e===-1)return;const s=new URL(t);return s.pathname=r.slice(0,e),s.search="",w(s)},"getFilePathFromVirtualQuery"),at=i(t=>{const r=t.startsWith(y)?new URL(t):void 0,e=r?w(r):t,s=r&&Re(r),n=s||e,o=r&&s?S(n).toString()+G(r.search,ve):t;return{fileUrl:r,filePath:n,loadUrl:o}},"getFileLoadContext"),Ft=i((t,r)=>{if(!r?.search)return t;const e=G(r.search,x);return e?S(t).toString()+e:t},"getTransformPath"),Wt=i((t,r,e)=>{const s=[...r?nt(r.search,[I,...x]).split("&").filter(Boolean):[],...e?[`namespace=${encodeURIComponent(e)}`]:[]].join("&");return s?`${t}?${s}`:t},"getFilePathWithQuery"),we=new TextDecoder,Ot=i(t=>typeof t=="string"?t:we.decode(t),"decodeSource"),Ie=i((t,r)=>{const e=new URL(r),s=r.startsWith(y)?at(r).filePath:void 0;if(T(r)){if(t.namespace){const o=`${I}${t.namespace}`;e.hash===`#${o}`?e.hash="":e.hash.endsWith(`&${o}`)&&(e.hash=e.hash.slice(0,-o.length-1))}}else e.searchParams.delete("tsx-namespace"),e.searchParams.delete(O),e.searchParams.delete(E);s&&(e.pathname=new URL(S(s)).pathname);const n=e.toString();return t.port&&t.port.postMessage({type:"load",url:n}),t.onImport?.(n),n},"notifyLoad"),$t=i((t,r)=>{if(!t.active)return!1;const e=R(r);if(t.namespace!==e)return!1;const s=Ie(t,r);return yt.send&&yt.send({type:"dependency",path:s}),!0},"prepareLoad"),Ct=i((t,r)=>{if(!re.test(t))return r;const e=r[Lt];return e?.type?r:{...r,[Lt]:{...e,type:"json"}}},"prepareJsonAttributes"),it=i(({conditions:t})=>t?.includes("require")===!0&&!t.includes("import"),"isCommonJsRequireContext$1"),Te=i(t=>{const r=i(async(e,s,n)=>{if(!$t(t,e))return n(e,s);const o=R(e),{fileUrl:c,filePath:a,loadUrl:l}=at(e),f=Ct(l,s),d=await n(l,f);u(3,"loaded by next loader",{url:e,loadUrl:l,loaded:d});const h=c?.searchParams.has(O)===!0,m=d.format,g=c?new URL(S(a)):void 0;if(g&&c&&(g.search=G(c.search,x)),jt(m)&&c&&d.responseURL?.startsWith("file:")&&!a.endsWith(".cjs")){const P=await ie(S(a),"utf8"),M=Rt(P);if(m==="commonjs-typescript"||!a.endsWith(".js")||M){if(!Ue){if(h&&M&&et.test(a)){const _=await It(P,a,{define:{"import.meta.url":JSON.stringify(g.toString())},tsconfigRaw:L(a,t)});return $.set(e,_.code),{format:"module",source:v(_)}}return d}if(!o&&!h&&!a.endsWith(".cts"))return d;const ft=!!(o||h||G(c.search,x)),pt=H(P,Ft(a,c),{cjsBanner:ft?ot(a,o):void 0,tsconfigRaw:L(a,t)});if(d.format="commonjs",d.source=v(pt),ft){const _=Wt(a,c,o);d.responseURL=`data:text/javascript,${encodeURIComponent(pt.code)}?filePath=${encodeURIComponent(_)}`}return u(3,"returning CJS export annotation",d),d}}if(!d.source)return d;const p=Ot(d.source),N=m==="json"&&!it(s);if(m==="commonjs-typescript"){const P=H(p,a,{tsconfigRaw:L(a,t)});return{...d,format:"commonjs",source:v(P)}}if(N||Et(m)||A.test(e)){const P=await It(p,a,{tsconfigRaw:L(a,t)});return $.set(e,P.code),{format:"module",source:v(P)}}if(d.format==="module"){const P=wt(a,p);P?(d.source=v(P),$.set(e,P.code)):$.set(e,p)}return d},"load");return B?async(e,s,n)=>{u(2,"load",{url:e,context:s});const o=await r(e,s,n);return u(1,"loaded",{url:e,result:o}),o}:r},"createLoad"),Le=i(t=>{const r=i((e,s,n)=>{if(it(s)&&tt()||!$t(t,e))return n(e,s);const o=R(e),{fileUrl:c,filePath:a,loadUrl:l}=at(e),f=Ct(l,s),d=n(l,f);u(3,"loaded by next loader",{url:e,loadUrl:l,loaded:d});const h=d.format;if(jt(h)&&F(k)&&d.responseURL?.startsWith("file:")&&!a.endsWith(".cjs")){const p=oe(S(a),"utf8");if(h==="commonjs-typescript"||!a.endsWith(".js")||Rt(p)){const N=!o&&tt(),P=H(p,Ft(a,c),{cjsBanner:o?ot(a,o):void 0,tsconfigRaw:L(a,t)}),M=Wt(a,c,o);return d.format="commonjs",d.shouldBeReloadedByCJSLoader=N,d.source=v(P),N||(d.responseURL=`data:text/javascript,${encodeURIComponent(P.code)}?filePath=${encodeURIComponent(M)}`),u(3,"returning CJS export annotation",d),d}}if(!d.source)return d;const m=Ot(d.source),g=h==="json"&&!it(s);if(h==="commonjs-typescript"){const p=H(m,a,{cjsBanner:o?ot(a,o):void 0,tsconfigRaw:L(a,t)});return{...d,format:"commonjs",shouldBeReloadedByCJSLoader:!1,source:v(p)}}if(g||Et(h)||A.test(e)){const p=me(m,a,{tsconfigRaw:L(a,t)});return{format:"module",source:v(p)}}if(d.format==="module"){const p=wt(a,m);p&&(d.source=v(p))}return d},"load");return B?(e,s,n)=>{u(2,"loadSync",{url:e,context:s});const o=r(e,s,n);return u(1,"loadedSync",{url:e,result:o}),o}:r},"createLoadSync"),je=i(t=>{if(q(t)||t.startsWith("#")||t.includes(":"))return!1;const r=t.split("/"),e=r[0]?.startsWith("@")?2:1;return r.length>e&&r.slice(0,e).every(Boolean)},"isBarePackageSubpath"),Ee=i(t=>{const r=t.lastIndexOf(Pt);if(r===-1)return;const s=t.slice(r+Pt.length).split(U.sep),n=s[0]?.startsWith("@")?2:1;if(!(s.length<=n||!s[n-1]))return U.join(t.slice(0,r),"node_modules",...s.slice(0,n))},"getPackageDirectory"),bt=i((t,r)=>{if(!je(t)||!r.startsWith(y))return;const e=w(r),s=Ee(e);if(!s)return;const o=rt(U.join(s,"package.json"))?.exports;if(o!=null)return{kind:"root-exports"};const c=rt(U.join(e,"package.json"));return typeof c?.main!="string"||!c.main?{kind:"legacy-directory"}:{kind:"legacy-directory",mainUrl:S(U.resolve(e,c.main)).toString()}},"getPackageSubpathDirectoryInfo"),Fe=F(k),Jt=/^(?:[a-z][\d+.a-z-]*:\/\/|data:|file:|node:)/i,Nt=i(t=>!q(t)&&!Jt.test(t),"isTsconfigPathAliasSpecifier"),z=i(t=>{if(t.url)return t.url;const r=t.message.match(/^Cannot find module '([^']+)'/);if(r){const[,s]=r;return s}const e=t.message.match(/^Cannot find package '([^']+)'/);if(e){const[,s]=e;if(!U.isAbsolute(s))return;const n=S(s);if(n.pathname.endsWith("/")&&(n.pathname+="package.json"),n.pathname.endsWith("/package.json")){const o=rt(n);if(o?.main)return new URL(o.main,n).toString()}else return n.toString()}},"getMissingPathFromNotFound"),C=i(t=>t==="ERR_MODULE_NOT_FOUND"||t==="MODULE_NOT_FOUND","isModuleNotFound"),X=i(t=>t instanceof Error&&(C(t.code)||t.code==="ERR_UNSUPPORTED_DIR_IMPORT"),"isDirectoryEntryMiss"),V=i(t=>t.conditions.includes("require")&&!t.conditions.includes("import"),"isCommonJsRequireContext"),ct=i(t=>{const r=t.indexOf("?"),e=t.indexOf("#");return r===-1?e:e===-1?r:Math.min(r,e)},"getUrlMetadataIndex"),Mt=i((t,r)=>r||!q(t)&&!Jt.test(t)?t.indexOf("?"):ct(t),"getSpecifierMetadataIndex"),_t=i(t=>{if(t?.startsWith(y))return w(new URL(t))},"getParentFilePath"),We=i(t=>{if(!t)return!1;const r=_t(t);if(r)return A.test(r);const e=ct(t);return A.test(e===-1?t:t.slice(0,e))},"isTypeScriptParent"),b=i(t=>{const r=_t(t);return r!==void 0&&Ut(r)},"isParentDependency"),Bt=i(t=>U.extname(new URL(t).pathname)===".js"&&Ut(w(t)),"isImplicitJavaScriptDependency"),At=i((t,r)=>We(t)||r&&!b(t),"resolvesTsExtensions"),Oe=i((t,r)=>{const e=ct(t),s=e===-1?t:t.slice(0,e);try{if(s.startsWith(y))return w(s);if(U.isAbsolute(s))return s;if(W(s)&&r?.startsWith(y))return w(new URL(s,r))}catch{}},"getProbeFilePath"),qt=i((t,r)=>{const e=Oe(t,r);return e!==void 0&&!ae(e)},"candidateDoesntExist"),K=i(async(t,r,e,s)=>{const n=vt(t);if(u(3,"resolveExtensions",{url:t,context:r,throwError:s,tryPaths:n}),!n)return;let o;for(const c of n)if(!qt(c,r.parentURL))try{return await e(c,r)}catch(a){const{code:l}=a;if(!C(l)&&l!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw a;o=a}if(s){if(o===void 0)return e(n[0],r);throw o}},"resolveExtensions"),J=i((t,r,e,s)=>{const n=vt(t);if(u(3,"resolveExtensionsSync",{url:t,context:r,throwError:s,tryPaths:n}),!n)return;let o;for(const c of n)if(!qt(c,r.parentURL))try{return e(c,r)}catch(a){const{code:l}=a;if(!C(l)&&l!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw a;o=a}if(s){if(o===void 0)return e(n[0],r);throw o}},"resolveExtensionsSync"),$e=i(async(t,r,e,s)=>{const n=s.parsedTsconfig?.config.compilerOptions?.allowJs??!1,o=At(r.parentURL,n);if(u(3,"resolveBase",{specifier:t,context:r,specifierStartsWithFileUrl:t.startsWith(y),isRelativePath:W(t),resolveTsExtensions:o,allowJs:n}),(t.startsWith(y)||W(t))&&o){const c=await K(t,r,e,void 0);if(u(3,"resolveBase resolved",{specifier:t,context:r,resolved:c}),c)return c}try{return await e(t,r)}catch(c){if(u(3,"resolveBase error",{specifier:t,context:r,error:c}),c instanceof Error){const a=c;if(C(a.code)){const l=z(a);if(l){const f=await K(l,r,e,void 0);if(f)return f}}}throw c}},"resolveBase"),mt=i((t,r,e,s)=>{const n=s.parsedTsconfig?.config.compilerOptions?.allowJs??!1,o=At(r.parentURL,n);if(u(3,"resolveBaseSync",{specifier:t,context:r,specifierStartsWithFileUrl:t.startsWith(y),isRelativePath:W(t),resolveTsExtensions:o,allowJs:n}),(t.startsWith(y)||W(t))&&o){const c=J(t,r,e,void 0);if(u(3,"resolveBaseSync resolved",{specifier:t,context:r,resolved:c}),c)return c}try{return e(t,r)}catch(c){if(u(3,"resolveBaseSync error",{specifier:t,context:r,error:c}),c instanceof Error){const a=c;if(C(a.code)){const l=z(a);if(l){const f=J(l,r,e,void 0);if(f)return f}}}throw c}},"resolveBaseSync"),dt=i(async(t,r,e,s)=>{if(u(3,"resolveDirectory",{specifier:t,context:r,isDirectory:Q.test(t)}),(t==="."||t===".."||t.endsWith("/.."))&&(t+="/"),Q.test(t)){const n=new URL(t,r.parentURL);return n.pathname=U.join(n.pathname,"index"),await K(n.toString(),r,e,!0)}try{return await $e(t,r,e,s)}catch(n){if(n instanceof Error){u(3,"resolveDirectory error",{specifier:t,context:r,error:n});const o=n;if(o.code==="ERR_UNSUPPORTED_DIR_IMPORT"){const c=z(o);if(c){if(t.startsWith("#"))throw n;const a=bt(t,c);if(a?.kind==="root-exports")throw n;if(a?.mainUrl){try{return await e(a.mainUrl,r)}catch(d){if(!X(d))throw d}try{return await dt(a.mainUrl,r,e,s)}catch(d){if(!X(d))throw d}}const l=`${c}/index`,f=await K(l,r,e);if(f)return f}}}throw n}},"resolveDirectory"),lt=i((t,r,e,s)=>{if(u(3,"resolveDirectorySync",{specifier:t,context:r,isDirectory:Q.test(t)}),(t==="."||t===".."||t.endsWith("/.."))&&(t+="/"),Q.test(t)){const n=V(r);if(n&&!q(t))return mt(t,r,e,s);const o=new URL(t,r.parentURL);return o.pathname=U.join(o.pathname,"index"),n?J(w(o),r,e,!1)??mt(t,r,e,s):J(o.toString(),r,e,!0)}try{return mt(t,r,e,s)}catch(n){if(n instanceof Error){u(3,"resolveDirectorySync error",{specifier:t,context:r,error:n});const o=n;if(o.code==="ERR_UNSUPPORTED_DIR_IMPORT"){const c=z(o);if(c){if(t.startsWith("#"))throw n;const a=bt(t,c);if(a?.kind==="root-exports")throw n;if(a?.mainUrl){try{return e(a.mainUrl,r)}catch(d){if(!X(d))throw d}try{return lt(a.mainUrl,r,e,s)}catch(d){if(!X(d))throw d}}const l=`${c}/index`,f=J(l,r,e);if(f)return f}}}throw n}},"resolveDirectorySync"),Ce=i(async(t,r,e,s)=>{const n=Nt(t);if(u(3,"resolveTsPaths",{specifier:t,context:r,tsconfigPathAliasSpecifier:n,tsconfig:s.parsedTsconfig,fromNodeModules:b(r.parentURL)}),n&&s.parsedTsconfig&&!b(r.parentURL)){const o=St(s.parsedTsconfig,t);u(3,"resolveTsPaths",{possiblePaths:o});for(const c of o)try{return await dt(S(c).toString(),r,e,s)}catch{}}return dt(t,r,e,s)},"resolveTsPaths"),be=i((t,r,e,s)=>{const n=Nt(t);if(u(3,"resolveTsPathsSync",{specifier:t,context:r,tsconfigPathAliasSpecifier:n,tsconfig:s.parsedTsconfig,fromNodeModules:b(r.parentURL)}),n&&s.parsedTsconfig&&!b(r.parentURL)){const o=St(s.parsedTsconfig,t);u(3,"resolveTsPathsSync",{possiblePaths:o});for(const c of o)try{return lt(S(c).toString(),r,e,s)}catch{}}return lt(t,r,e,s)},"resolveTsPathsSync"),D="tsx://",ut=i((t,r)=>{const e=t.indexOf("#"),s=e===-1?t:t.slice(0,e),n=e===-1?"":t.slice(e);return`${s}${s.includes("?")?"&":"?"}${r}${n}`},"addQuery"),Y=i((t,r)=>T(t)?`${t}${t.includes("#")?"&":"#"}${I}${r}`:ut(t,`${I}${r}`),"addNamespace"),Qt=i((t,r)=>{const e=r.indexOf("#"),s=r[0]==="?"?r.slice(1,e===-1?void 0:e):"",n=e===-1?"":r.slice(e),o=t.indexOf("#"),c=o===-1?t:t.slice(0,o),a=o===-1?"":t.slice(o),l=s?ut(c,s):c;return new URL(`${l}${n||a}`).toString()},"mergeUrlMetadata"),Z=i((t,r)=>{if(r===void 0)return t;const e=new URL(t);if(e.searchParams.has(E))return t;const s=e.pathname.toLowerCase().lastIndexOf("%3f");if(s===-1)return t;const n=e.pathname.slice(s+3);if(n.includes("/"))return t;const o=new URLSearchParams(n.replaceAll("%25","%"));return o.get("namespace")!==r?t:(o.delete("namespace"),o.set(st,r),e.pathname=e.pathname.slice(0,s),e.search=o.toString(),e.toString())},"restoreCjsBridgeNamespace"),Ht=i((t,r,e)=>{if(r!=="commonjs"||!t.startsWith(y)||!et.test(t))return t;const s=new URL(t),n=[nt(s.search,[I]),...e?[`namespace=${encodeURIComponent(e)}`]:[]].filter(Boolean).join("&");return n?(s.pathname+=`%3F${n}`,s.searchParams.set(E,"1"),s.toString()):t},"preserveCommonJsQueryIdentity"),Je=i(t=>{const r=i(async(e,s,n)=>{if(!t.active||e.startsWith("node:"))return n(e,s);e.startsWith(y)&&(e=Z(e,t.namespace));const{parentURL:o}=s;o?.startsWith(y)&&(s.parentURL=Z(o,t.namespace));const c=s.parentURL&&R(s.parentURL);let a=T(e)?c:R(e)??c;if(t.namespace){let p;if(e.startsWith(D)){try{p=JSON.parse(e.slice(D.length))}catch{}p?.namespace&&(a=p.namespace)}if(t.namespace!==a)return n(e,s);p&&(e=p.specifier,s.parentURL=p.parentURL)}if(T(e)){const p=await n(e,s);return t.namespace?{...p,url:Y(p.url,t.namespace)}:p}const l=Mt(e,V(s)),f=l===-1?e:e.slice(0,l),d=l===-1?"":e.slice(l),h=await Ce(f,s,n,t);if(u(2,"nextResolve",{resolved:h}),h.format==="builtin"||h.url.startsWith("node:"))return h;const m={...h};m.url.startsWith(y)&&(m.format==="module-typescript"?m.format="module":m.format==="commonjs-typescript"?m.format="commonjs":!m.format&&!Bt(m.url)&&(m.format=await fe(m.url),u(2,"getFormatFromFileUrl",{resolved:m,format:m.format}))),d&&(m.url=Qt(m.url,d));const g=s.parentURL&&m.format==="commonjs"&&et.test(m.url)&&(new URL(s.parentURL).searchParams.has(O)||Se(s.parentURL,e,Fe));return a&&R(m.url)===void 0&&(m.url=Y(m.url,a)),g&&(m.url=ut(m.url,he)),(a||g)&&(m.url=Ht(m.url,m.format,a)),m},"resolve");return B?async(e,s,n)=>{u(2,"resolve",{specifier:e,context:s});const o=await r(e,s,n);return u(1,"resolved",{specifier:e,context:s,result:o}),o}:r},"createResolve"),Ne=i(t=>{const r=i((e,s,n)=>{if(!t.active||e.startsWith("node:")||V(s)&&tt())return n(e,s);e.startsWith(y)&&(e=Z(e,t.namespace));const{parentURL:o}=s;o?.startsWith(y)&&(s.parentURL=Z(o,t.namespace));const c=s.parentURL&&R(s.parentURL);let a=T(e)?c:R(e)??c;if(t.namespace){let g;if(e.startsWith(D)){try{g=JSON.parse(e.slice(D.length))}catch{}g?.namespace&&(a=g.namespace)}if(t.namespace!==a)return n(e,s);g&&(e=g.specifier,s.parentURL=g.parentURL)}if(T(e)){const g=n(e,s);return t.namespace?{...g,url:Y(g.url,t.namespace)}:g}const l=Mt(e,V(s)),f=l===-1?e:e.slice(0,l),d=l===-1?"":e.slice(l),h=be(f,s,n,t);if(u(2,"nextResolve",{resolved:h}),h.format==="builtin"||h.url.startsWith("node:"))return h;const m={...h};return m.url.startsWith(y)&&(m.format==="module-typescript"?m.format="module":m.format==="commonjs-typescript"?m.format="commonjs":!m.format&&!Bt(m.url)&&(m.format=pe(m.url),u(2,"getFormatFromFileUrlSync",{resolved:m,format:m.format}))),d&&(m.url=Qt(m.url,d)),a&&R(m.url)===void 0&&(m.url=Y(m.url,a)),m.url=Ht(m.url,m.format,a),m},"resolve");return B?(e,s,n)=>{u(2,"resolveSync",{specifier:e,context:s});const o=r(e,s,n);return u(1,"resolvedSync",{specifier:e,context:s,result:o}),o}:r},"createResolveSync"),Gt=i(t=>(r,e)=>{if(!e)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");const s=e.startsWith(y)?e:S(e).toString();return import(`tsx://${JSON.stringify({specifier:r,parentURL:s,namespace:t})}`)},"createScopedImport");let xt=!1;const Me=i(t=>{const r=[];for(let e=0;e<t.length;e+=1){const s=t[e];if(s==="--import"){const n=t[e+1];n&&r.push(n),e+=1}else s.startsWith("--import=")&&r.push(s.slice(9))}return r},"collectImportSpecifiers"),_e=i(()=>[...(process.env.NODE_OPTIONS??"").matchAll(/(?:^|\s)--import(?:=|\s+)(\S+)/g)].map(([,t])=>t),"collectNodeOptionsImportSpecifiers"),zt=[new URL("loader.mjs",import.meta.url).toString(),new URL("esm/index.mjs",import.meta.url).toString()],Be=new Set(["tsx","tsx/esm",...zt,...zt.map(t=>decodeURI(new URL(t).pathname))]),Ae=i(t=>Be.has(t),"isTsxImport"),Xt=i(t=>/\.(?:[cm]?ts|tsx)(?:[?#].*)?$/.test(t),"isTypeScriptImport"),qe=i(()=>{const t=Me(process.execArgv),r=t.findIndex(Ae);return r>0&&t.slice(0,r).some(Xt)},"hasCliTypeScriptPreload"),Qe=_e().some(Xt)||qe(),Vt=typeof j.registerHooks=="function"&&F(kt)&&!Qe,He=i(t=>{if(!j.register&&!Vt)throw new Error(`This version of Node.js (${process.version}) does not support module.register(). Please upgrade to Node v18.19 or v20.6 and above.`);if(!xt){const{_resolveFilename:a}=j;j._resolveFilename=(l,...f)=>a(ne(l),...f),xt=!0}const{sourceMapsEnabled:r}=process;if(process.setSourceMapsEnabled(!0),Vt){const a=Tt({namespace:t?.namespace,onImport:t?.onImport,tsconfig:t?.tsconfig}),l=j.registerHooks({load:Le(a),resolve:Ne(a)}),f=i((async()=>{a.active=!1,l.deregister(),r===!1&&process.setSourceMapsEnabled(!1)}),"unregister2");return t?.namespace&&(f.import=Gt(t.namespace),f.unregister=f),f}const{port1:e,port2:s}=new Yt;j.register(`./esm/index.mjs?${Dt.randomUUID()}`,{parentURL:import.meta.url,data:{port:s,namespace:t?.namespace,tsconfig:t?.tsconfig},transferList:[s]});const n=t?.onImport,o=n&&(a=>{a.type==="load"&&n(a.url)});o&&(e.on("message",o),e.unref());const c=i(()=>(r===!1&&process.setSourceMapsEnabled(!1),o&&e.off("message",o),e.postMessage("deactivate"),new Promise(a=>{const l=i(f=>{f.type==="deactivated"&&(a(),e.off("message",l))},"onDeactivated");e.on("message",l)})),"unregister");return t?.namespace&&(c.import=Gt(t.namespace),c.unregister=c),c},"register");export{le as a,Te as b,ue as c,Je as d,de as e,He as r};
@@ -1,3 +1,4 @@
1
- var p=Object.defineProperty;var t=(o,r)=>p(o,"name",{value:r,configurable:!0});import a from"node:repl";import{v as l}from"./package-BL7Whz21.mjs";import{t as c}from"./index-DCefr8NP.mjs";import"node:path";import"node:url";import"esbuild";import"node:crypto";import"./node-features-JeyyvQz6.mjs";import"node:fs";import"node:os";import"./temporary-directory-BDDVQOvU.mjs";console.log(`Welcome to tsx v${l} (Node.js ${process.version}).
2
- Type ".help" for more information.`);const s=a.start(),{eval:f}=s,v=t(async function(o,r,e,i){const m=await c(o,e,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(n=>(console.log(n.message),{code:`
3
- `}));return f.call(this,m.code,r,e,i)},"preEval");s.eval=v;
1
+ #!/usr/bin/env node
2
+ var m=Object.defineProperty;var t=(o,r)=>m(o,"name",{value:r,configurable:!0});import p from"node:repl";import{v as l}from"./package-Dj0mHsMt.mjs";import{t as c}from"./index-DE3OBZuV.mjs";import"node:path";import"node:url";import"esbuild";import"node:crypto";import"./temporary-directory-Du7LpLp9.mjs";import"node:os";import"node:fs";console.log(`Welcome to tsx v${l} (Node.js ${process.version}).
3
+ Type ".help" for more information.`);const s=p.start(),{eval:f}=s,v=t(async function(o,r,e,i){const n=await c(o,e,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(a=>(console.log(a.message),{code:`
4
+ `}));return f.call(this,n.code,r,e,i)},"preEval");s.eval=v;
@@ -0,0 +1,10 @@
1
+ var Tt=Object.defineProperty;var u=(e,t)=>Tt(e,"name",{value:t,configurable:!0});import{createRequire as St}from"node:module";const K=St(import.meta.url);import P from"node:module";import h from"node:path";import{fileURLToPath as se,pathToFileURL as Ot}from"node:url";import F,{writeSync as At,existsSync as Pt}from"node:fs";import $t from"fs";import _t from"os";import Dt from"path";import{i as Rt,c as Lt,a as Ut}from"./index-DE3OBZuV.mjs";import Ft from"node:net";import{g as It,b as Nt,a as Bt,c as Wt,d as Mt,o as Fe}from"./index-Bqjv9TxC.mjs";import{inspect as Jt}from"node:util";import{i as Vt,r as Qt}from"./temporary-directory-Du7LpLp9.mjs";const Ie=u(e=>e!==null&&typeof e=="object","A"),W=u((e,t)=>Object.assign(new Error(`[${e}]: ${t}`),{code:e}),"a"),Ne="ERR_INVALID_PACKAGE_CONFIG",ge="ERR_INVALID_PACKAGE_TARGET",Gt="ERR_PACKAGE_PATH_NOT_EXPORTED",Kt=/^\d+$/,zt=/^(\.{1,2}|node_modules)$/i,Ht=/\/|\\/;var Be=(e=>(e.Export="exports",e.Import="imports",e))(Be||{});const ye=u((e,t,r,n,s)=>{if(t==null)return[];if(typeof t=="string"){const[o,...a]=t.split(Ht);if(o===".."||a.some(i=>zt.test(i)))throw W(ge,`Invalid "${e}" target "${t}" defined in the package config`);return[s?t.replace(/\*/g,s):t]}if(Array.isArray(t))return t.flatMap(o=>ye(e,o,r,n,s));if(Ie(t)){for(const o of Object.keys(t)){if(Kt.test(o))throw W(Ne,"Cannot contain numeric property keys");if(o==="default"||n.includes(o))return ye(e,t[o],r,n,s)}return[]}throw W(ge,`Invalid "${e}" target "${t}"`)},"f"),z="*",Xt=u((e,t)=>{const r=e.indexOf(z),n=t.indexOf(z);return r===n?t.length>e.length:n>r},"m");function Yt(e,t){if(!t.includes(z)&&e.hasOwnProperty(t))return[t];let r,n;for(const s of Object.keys(e))if(s.includes(z)){const[o,a,i]=s.split(z);if(i===void 0&&t.startsWith(o)&&t.endsWith(a)){const m=t.slice(o.length,-a.length||void 0);m&&(!r||Xt(r,s))&&(r=s,n=m)}}return[r,n]}u(Yt,"d");const Zt=u(e=>Object.keys(e).reduce((t,r)=>{const n=r===""||r[0]!==".";if(t===void 0||t===n)return n;throw W(Ne,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),qt=/^\w+:/,en=u((e,t,r)=>{if(!e)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof e=="string"||Array.isArray(e)||Ie(e)&&Zt(e))&&(e={".":e});const[n,s]=Yt(e,t),o=ye(Be.Export,e[n],t,r,s);if(o.length===0)throw W(Gt,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const a of o)if(!a.startsWith("./")&&!qt.test(a))throw W(ge,`Invalid "exports" target "${a}" defined in the package config`);return o},"v");var tn=Object.defineProperty,c=u((e,t)=>tn(e,"name",{value:t,configurable:!0}),"i");function A(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}u(A,"x"),c(A,"slash");const nn=c((e,t)=>{const r=`readFileSync:${t}`;let n=e?.get(r);return n===void 0&&(n=F.readFileSync(t,"utf8"),e?.set(r,n)),n},"readFile"),_=c((e,t)=>{const r=`tryStat:${t}`;let n=e?.get(r);if(n===void 0){try{n=F.statSync(t)}catch{n=null}e?.set(r,n)}return n??void 0},"tryStat"),H=c((e,t,r)=>{for(;;){const n=h.posix.join(e,t);if(_(r,n))return n;const s=h.dirname(e);if(s===e)return;e=s}},"findUp");function We(e,t=!1){const r=e.length;let n=0,s="",o=0,a=16,i=0,m=0,f=0,y=0,p=0;function v(l,C){let S=0,x=0;for(;S<l;){let w=e.charCodeAt(n);if(w>=48&&w<=57)x=x*16+w-48;else if(w>=65&&w<=70)x=x*16+w-65+10;else if(w>=97&&w<=102)x=x*16+w-97+10;else break;n++,S++}return S<l&&(x=-1),x}u(v,"A"),c(v,"scanHexDigits");function b(l){n=l,s="",o=0,a=16,p=0}u(b,"O"),c(b,"setPosition");function k(){let l=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&I(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&I(e.charCodeAt(n)))for(n++;n<e.length&&I(e.charCodeAt(n));)n++;else return p=3,e.substring(l,n);let C=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&I(e.charCodeAt(n))){for(n++;n<e.length&&I(e.charCodeAt(n));)n++;C=n}else p=3;return e.substring(l,C)}u(k,"h"),c(k,"scanNumber");function E(){let l="",C=n;for(;;){if(n>=r){l+=e.substring(C,n),p=2;break}const S=e.charCodeAt(n);if(S===34){l+=e.substring(C,n),n++;break}if(S===92){if(l+=e.substring(C,n),n++,n>=r){p=2;break}switch(e.charCodeAt(n++)){case 34:l+='"';break;case 92:l+="\\";break;case 47:l+="/";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=`
2
+ `;break;case 114:l+="\r";break;case 116:l+=" ";break;case 117:const x=v(4);x>=0?l+=String.fromCharCode(x):p=4;break;default:p=5}C=n;continue}if(S>=0&&S<=31)if(M(S)){l+=e.substring(C,n),p=2;break}else p=6;n++}return l}u(E,"D"),c(E,"scanString");function d(){if(s="",p=0,o=n,m=i,y=f,n>=r)return o=r,a=17;let l=e.charCodeAt(n);if(oe(l)){do n++,s+=String.fromCharCode(l),l=e.charCodeAt(n);while(oe(l));return a=15}if(M(l))return n++,s+=String.fromCharCode(l),l===13&&e.charCodeAt(n)===10&&(n++,s+=`
3
+ `),i++,f=n,a=14;switch(l){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,s=E(),a=10;case 47:const C=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<r&&!M(e.charCodeAt(n));)n++;return s=e.substring(C,n),a=12}if(e.charCodeAt(n+1)===42){n+=2;const S=r-1;let x=!1;for(;n<S;){const w=e.charCodeAt(n);if(w===42&&e.charCodeAt(n+1)===47){n+=2,x=!0;break}n++,M(w)&&(w===13&&e.charCodeAt(n)===10&&n++,i++,f=n)}return x||(n++,p=1),s=e.substring(C,n),a=13}return s+=String.fromCharCode(l),n++,a=16;case 45:if(s+=String.fromCharCode(l),n++,n===r||!I(e.charCodeAt(n)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=k(),a=11;default:for(;n<r&&g(l);)n++,l=e.charCodeAt(n);if(o!==n){switch(s=e.substring(o,n),s){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return s+=String.fromCharCode(l),n++,a=16}}u(d,"c"),c(d,"scanNext");function g(l){if(oe(l)||M(l))return!1;switch(l){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}u(g,"p"),c(g,"isUnknownContentCharacter");function T(){let l;do l=d();while(l>=12&&l<=15);return l}return u(T,"b"),c(T,"scanNextNonTrivia"),{setPosition:b,getPosition:c(()=>n,"getPosition"),scan:t?T:d,getToken:c(()=>a,"getToken"),getTokenValue:c(()=>s,"getTokenValue"),getTokenOffset:c(()=>o,"getTokenOffset"),getTokenLength:c(()=>n-o,"getTokenLength"),getTokenStartLine:c(()=>m,"getTokenStartLine"),getTokenStartCharacter:c(()=>o-y,"getTokenStartCharacter"),getTokenError:c(()=>p,"getTokenError")}}u(We,"Ne"),c(We,"createScanner");function oe(e){return e===32||e===9}u(oe,"X"),c(oe,"isWhiteSpace");function M(e){return e===10||e===13}u(M,"P"),c(M,"isLineBreak");function I(e){return e>=48&&e<=57}u(I,"S"),c(I,"isDigit");var Me;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Me||(Me={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));const J=200;new Array(J).fill(0).map((e,t)=>`
4
+ `+" ".repeat(t)),new Array(J).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(J).fill(0).map((e,t)=>`\r
5
+ `+" ".repeat(t)),new Array(J).fill(0).map((e,t)=>`
6
+ `+" ".repeat(t)),new Array(J).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(J).fill(0).map((e,t)=>`\r
7
+ `+" ".repeat(t));var ae;(function(e){e.DEFAULT={allowTrailingComma:!1}})(ae||(ae={}));function Je(e,t=[],r=ae.DEFAULT){let n=null,s=[];const o=[];function a(i){Array.isArray(s)?s.push(i):n!==null&&(s[n]=i)}return u(a,"l"),c(a,"onValue"),Ve(e,{onObjectBegin:c(()=>{const i={};a(i),o.push(s),s=i,n=null},"onObjectBegin"),onObjectProperty:c(i=>{n=i},"onObjectProperty"),onObjectEnd:c(()=>{s=o.pop()},"onObjectEnd"),onArrayBegin:c(()=>{const i=[];a(i),o.push(s),s=i,n=null},"onArrayBegin"),onArrayEnd:c(()=>{s=o.pop()},"onArrayEnd"),onLiteralValue:a,onError:c((i,m,f)=>{t.push({error:i,offset:m,length:f})},"onError")},r),s[0]}u(Je,"Re"),c(Je,"parse$1");function Ve(e,t,r=ae.DEFAULT){const n=We(e,!1),s=[];let o=0;function a(j){return j?()=>o===0&&j(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}u(a,"l"),c(a,"toNoArgVisit");function i(j){return j?O=>o===0&&j(O,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}u(i,"g"),c(i,"toOneArgVisit");function m(j){return j?O=>o===0&&j(O,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>s.slice()):()=>!0}u(m,"m"),c(m,"toOneArgVisitWithPath");function f(j){return j?()=>{o>0?o++:j(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>s.slice())===!1&&(o=1)}:()=>!0}u(f,"k"),c(f,"toBeginVisit");function y(j){return j?()=>{o>0&&o--,o===0&&j(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}u(y,"w"),c(y,"toEndVisit");const p=f(t.onObjectBegin),v=m(t.onObjectProperty),b=y(t.onObjectEnd),k=f(t.onArrayBegin),E=y(t.onArrayEnd),d=m(t.onLiteralValue),g=i(t.onSeparator),T=a(t.onComment),l=i(t.onError),C=r&&r.disallowComments,S=r&&r.allowTrailingComma;function x(){for(;;){const j=n.scan();switch(n.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:C||w(11);break;case 2:w(12);break;case 6:w(16);break}switch(j){case 12:case 13:C?w(10):T();break;case 16:w(1);break;case 15:case 14:break;default:return j}}}u(x,"v"),c(x,"scanNext");function w(j,O=[],Ue=[]){if(l(j),O.length+Ue.length>0){let re=n.getToken();for(;re!==17;){if(O.indexOf(re)!==-1){x();break}else if(Ue.indexOf(re)!==-1)break;re=x()}}}u(w,"d"),c(w,"handleError");function D(j){const O=n.getTokenValue();return j?d(O):(v(O),s.push(O)),x(),!0}u(D,"L"),c(D,"parseString");function R(){switch(n.getToken()){case 11:const j=n.getTokenValue();let O=Number(j);isNaN(O)&&(w(2),O=0),d(O);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return x(),!0}u(R,"B"),c(R,"parseLiteral");function $(){return n.getToken()!==10?(w(3,[],[2,5]),!1):(D(!1),n.getToken()===6?(g(":"),x(),ne()||w(4,[],[2,5])):w(5,[],[2,5]),s.pop(),!0)}u($,"$"),c($,"parseProperty");function B(){p(),x();let j=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(j||w(4,[],[]),g(","),x(),n.getToken()===2&&S)break}else j&&w(6,[],[]);$()||w(4,[],[2,5]),j=!0}return b(),n.getToken()!==2?w(7,[2],[]):x(),!0}u(B,"N"),c(B,"parseObject");function Le(){k(),x();let j=!0,O=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(O||w(4,[],[]),g(","),x(),n.getToken()===4&&S)break}else O&&w(6,[],[]);j?(s.push(0),j=!1):s[s.length-1]++,ne()||w(4,[],[4,5]),O=!0}return E(),j||s.pop(),n.getToken()!==4?w(8,[4],[]):x(),!0}u(Le,"$e"),c(Le,"parseArray");function ne(){switch(n.getToken()){case 3:return Le();case 1:return B();case 10:return D(!0);default:return R()}}return u(ne,"H"),c(ne,"parseValue"),x(),n.getToken()===17?r.allowEmptyContent?!0:(w(4,[],[]),!1):ne()?(n.getToken()!==17&&w(9,[],[]),!0):(w(4,[],[]),!1)}u(Ve,"Pe"),c(Ve,"visit");var Qe;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Qe||(Qe={}));var Ge;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Ge||(Ge={}));const rn=Je;var Ke;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Ke||(Ke={}));const ke=c((e,t)=>rn(nn(t,e)),"readJsonc"),ze=c(()=>{const{findPnpApi:e}=P;return e&&e(process.cwd())},"getPnpApi"),sn="detectTypeScriptVersion:",on=c((e,t)=>{const r=`${sn}${e}`,n=t?.get(r);if(n!==void 0)return n??void 0;let s;const o=ze();if(o)try{s=o.resolveRequest("typescript/package.json",e)??void 0}catch{}s??=H(h.resolve(e),h.join("node_modules","typescript","package.json"),t);let a;if(s)try{const i=ke(s,t);typeof i?.version=="string"&&(a=i.version)}catch{}return t?.set(r,a??null),a},"detectTypeScriptVersion"),N="package.json",ie="tsconfig.json",an=c((e,t,r)=>{const n=P.createRequire(h.join(r,"tsconfig.json"));if(e!==t)try{return n.resolve(e)}catch{}try{return n.resolve(t)}catch{}try{return n.resolve(`${t}/${N}`)}catch{}},"resolvePackageEntryWithNode"),be=c((e,t,r,n)=>{const s=`resolveFromPackageJsonPath:${e}:${t}:${r}`;if(n?.has(s))return n.get(s)||!1;const o=ke(e,n);if(!o)return;let a=t||ie;if(!r&&o.exports)try{const[i]=en(o.exports,t,["require","types"]);a=i}catch{return n?.set(s,""),!1}else!t&&o.tsconfig&&(a=o.tsconfig);return a=h.join(e,"..",a),n?.set(s,a),a},"resolveFromPackageJsonPath"),cn=c((e,t,r)=>{const n=`resolveExtendsPath:${e}:${t}`;if(r?.has(n))return r.get(n)||void 0;const s=ln(e,t,r);return r?.set(n,s||""),s},"resolveExtendsPath"),ln=c((e,t,r)=>{let n=e;if(e===".."&&(n=h.join(n,ie)),e[0]==="."&&(n=h.resolve(t,n)),h.isAbsolute(n)){const d=_(r,n);if(d){if(d.isFile())return n}else if(!n.endsWith(".json")){const g=`${n}.json`;if(_(r,g))return g}return}const[s,...o]=e.split("/"),a=s[0]==="@"?`${s}/${o.shift()}`:s,i=o.join("/"),m=ze();if(m){const{resolveRequest:d}=m;try{if(a===e){const g=d(h.join(a,N),t);if(g){const T=be(g,i,!1,r);if(T&&_(r,T))return T}}else{let g;try{g=d(e,t,{extensions:[".json"]})}catch{g=d(h.join(e,ie),t)}if(g)return g}}catch{}}const f=an(e,a,t);let y;if(f){if(h.basename(f)!==N&&f.endsWith(".json"))return f;y=h.basename(f)===N?f:H(h.dirname(f),N,r)}const p=y&&h.dirname(y)||H(h.resolve(t),h.join("node_modules",a),r);if(!p||!_(r,p)?.isDirectory())return;const v=h.join(p,N);if(_(r,v)){const d=be(v,i,!1,r);if(d===!1)return;if(d&&_(r,d)?.isFile())return d}const b=h.join(p,i),k=b.endsWith(".json");if(!k){const d=`${b}.json`;if(_(r,d))return d}const E=_(r,b);if(E){if(E.isDirectory()){const d=h.join(b,N);if(_(r,d)){const T=be(d,"",!0,r);if(T&&_(r,T))return T}const g=h.join(b,ie);if(_(r,g))return g}else if(k)return b}},"resolveExtendsPathUncached"),we=Symbol("implicitBaseUrl"),L="${configDir}",xe=/^\.{1,2}(\/.*)?$/,ce=c(e=>{const t=A(e);return xe.test(t)?t:`./${t}`},"normalizeRelativePath"),un=c(e=>{const t={...e};if(t.strict){const r=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const n of r)t[n]===void 0&&(t[n]=!0)}if(t.composite&&(t.declaration??=!0,t.incremental??=!0),t.target){let r=t.target.toLowerCase();r==="es2015"&&(r="es6"),t.target=r,r==="esnext"&&(t.module??="es6",t.useDefineForClassFields??=!0),(r==="es6"||r==="es2016"||r==="es2017"||r==="es2018"||r==="es2019"||r==="es2020"||r==="es2021"||r==="es2022"||r==="es2023"||r==="es2024"||r==="es2025")&&(t.module??="es6"),(r==="es2022"||r==="es2023"||r==="es2024"||r==="es2025")&&(t.useDefineForClassFields??=!0)}if(t.module){let r=t.module.toLowerCase();if(r==="es2015"&&(r="es6"),t.module=r,(r==="es6"||r==="es2020"||r==="es2022"||r==="esnext"||r==="none"||r==="system"||r==="umd"||r==="amd")&&(t.moduleResolution??="classic"),r==="system"&&(t.allowSyntheticDefaultImports??=!0),(r==="node16"||r==="node18"||r==="node20"||r==="nodenext"||r==="preserve")&&(t.esModuleInterop??=!0,t.allowSyntheticDefaultImports??=!0),(r==="node16"||r==="node18"||r==="node20"||r==="nodenext")&&(t.moduleDetection??="force"),(r==="node16"||r==="node18")&&(t.target??="es2022",t.moduleResolution??="node16"),r==="node20"&&(t.target??="es2023",t.moduleResolution??="node16",t.resolveJsonModule??=!0),r==="nodenext"&&(t.target??="esnext",t.moduleResolution??="nodenext",t.resolveJsonModule??=!0),r==="node16"||r==="node18"||r==="node20"||r==="nodenext"){const n=t.target;(n==="es3"||n==="es2022"||n==="es2023"||n==="es2024"||n==="esnext")&&(t.useDefineForClassFields??=!0)}r==="preserve"&&(t.moduleResolution??="bundler")}if(t.moduleResolution){let r=t.moduleResolution.toLowerCase();r==="node"&&(r="node10"),t.moduleResolution=r,(r==="node16"||r==="nodenext"||r==="bundler")&&(t.resolvePackageJsonExports??=!0,t.resolvePackageJsonImports??=!0),r==="bundler"&&(t.allowSyntheticDefaultImports??=!0,t.resolveJsonModule??=!0)}for(const r of["jsx","moduleDetection","importsNotUsedAsValues","newLine"])t[r]&&(t[r]=t[r].toLowerCase());return t.esModuleInterop&&(t.allowSyntheticDefaultImports??=!0),t.verbatimModuleSyntax&&(t.isolatedModules??=!0,t.preserveConstEnums??=!0),t.isolatedModules&&(t.preserveConstEnums??=!0),t.rewriteRelativeImportExtensions&&(t.allowImportingTsExtensions??=!0),t.lib&&(t.lib=t.lib.map(r=>r.toLowerCase())),t.checkJs&&(t.allowJs??=!0),t},"normalizeCompilerOptions"),fn=c((e,t)=>{!t.has("target")&&!pn(e.module)&&(e.target="es3")},"applyV4Defaults"),pn=c(e=>e==="node16"||e==="node18"||e==="node20"||e==="nodenext","moduleDictatesTarget$1"),dn=c((e,t)=>{!t.has("target")&&!mn(e.module)&&(e.target="es5")},"applyV5Defaults"),mn=c(e=>e==="node16"||e==="node18"||e==="node20"||e==="nodenext","moduleDictatesTarget"),hn=c((e,t)=>{t.has("strict")||(e.strict=!0),t.has("target")||(e.target="es2025"),t.has("module")||(e.module="es2022"),t.has("moduleResolution")||(e.moduleResolution="bundler"),t.has("rootDir")||(e.rootDir="."),t.has("types")||(e.types=[]),t.has("noUncheckedSideEffectImports")||(e.noUncheckedSideEffectImports=!0),t.has("libReplacement")||(e.libReplacement=!1)},"applyV6Defaults"),gn=[[4,fn],[5,dn],[6,hn]],yn=c(e=>{const t=/^v?(\d+)/.exec(e);return t?Number(t[1]):void 0},"parseMajor"),kn=c((e,t)=>{const r=yn(t);if(r===void 0)return;const n=new Set(Object.keys(e));for(const[s,o]of gn)s<=r&&o(e,n)},"applyVersionDefaults"),ve=c((e,t)=>ce(h.relative(e,t)),"pathRelative"),He=["files","include","exclude"],Xe=c((e,t,r)=>{const n=h.join(t,r),s=h.relative(e,n);return A(s)||"./"},"resolveAndRelativize"),bn=c((e,t,r)=>{const n=h.relative(e,t);if(!n)return r;const s=r.startsWith("./")?r.slice(2):r;return A(`${n}/${s}`)},"prefixPattern"),Ye=["outDir","declarationDir"],le=c((e,t)=>{if(e.startsWith(L))return A(h.join(t,e.slice(L.length)))},"interpolateConfigDir"),wn=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],xn=c((e,t={})=>{if(e.length===0)throw new Error("Chain must not be empty");const{typescriptVersion:r}=t,n=new Map(e.map(p=>[p.path,p])),s=new Map,o=c(p=>{const v=s.get(p);if(v)return v;const b=n.get(p);if(!b)throw new Error(`Config not found in chain: ${p}`);const k=b.config,E=h.dirname(p);let d={...k,...k.compilerOptions&&{compilerOptions:{...k.compilerOptions}},...k.watchOptions&&{watchOptions:{...k.watchOptions}}};if(delete d.extends,d.compilerOptions?.paths&&!d.compilerOptions.baseUrl&&(d.compilerOptions[we]=E),k.extends){const g=Array.isArray(k.extends)?k.extends:[k.extends];for(const T of g.toReversed()){const l=o(T),C=h.dirname(T),{references:S,...x}=l;if(x.compilerOptions){const D={...x.compilerOptions};for(const R of["baseUrl","outDir","declarationDir","rootDir"]){const $=D[R];$&&!$.startsWith(L)&&(D[R]=Xe(E,C,$))}for(const R of["rootDirs","typeRoots"]){const $=D[R];$&&(D[R]=$.map(B=>B.startsWith(L)?B:Xe(E,C,B)))}x.compilerOptions=D}for(const D of He){const R=x[D];R&&(x[D]=R.map($=>$.startsWith(L)?$:bn(E,C,$)))}const w={...x,...d,compilerOptions:{...x.compilerOptions,...d.compilerOptions}};x.watchOptions&&(w.watchOptions={...x.watchOptions,...d.watchOptions}),d=w}}if(d.compilerOptions){const{compilerOptions:g}=d,T=["baseUrl","rootDir"];for(const l of T){const C=g[l];if(C&&!C.startsWith(L)){const S=h.resolve(E,C),x=ve(E,S);g[l]=x}}for(const l of Ye){let C=g[l];C&&(Array.isArray(d.exclude)||(d.exclude=Ye.map(S=>g[S]).filter(Boolean)),C.startsWith(L)||(C=ce(C)),g[l]=C)}}else d.compilerOptions={};if(d.include&&(d.include=d.include.map(A)),d.files&&(d.files=d.files.map(g=>g.startsWith(L)?g:ce(g))),d.watchOptions){const{watchOptions:g}=d;for(const T of["excludeDirectories","excludeFiles"])g[T]&&(g[T]=g[T].map(l=>A(h.resolve(E,l))));for(const T of["watchFile","watchDirectory","fallbackPolling"])if(g[T]){const l=g;l[T]=g[T].toLowerCase()}}return s.set(p,d),d},"resolveEntry"),a=e[0],i=o(a.path),m=h.dirname(a.path),f={...i,compilerOptions:i.compilerOptions?{...i.compilerOptions}:{}},{compilerOptions:y}=f;if(y){for(const p of wn){const v=y[p];if(v){const b=le(v,m);y[p]=b?ve(m,b):v}}for(const p of["rootDirs","typeRoots"]){const v=y[p];v&&(y[p]=v.map(b=>{const k=le(b,m);return k?ve(m,k):ce(b)}))}if(y.paths){const p={};for(const[v,b]of Object.entries(y.paths))p[v]=b.map(k=>le(k,m)??k);y.paths=p}r&&kn(y,r),f.compilerOptions=un(y)}for(const p of He){const v=f[p];v&&(f[p]=v.map(b=>le(b,m)??b))}return{path:a.path,config:f,sources:e.map(p=>p.path)}},"resolveExtendsChain"),vn=c((e,t={})=>{const{cache:r=new Map}=t,n=h.resolve(e),s=[],o=new Set,a=c((i,m)=>{const f=A(i);if(o.has(f))return;o.add(f);let y;try{y=ke(i,r)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${i}`)}if(typeof y!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${i}`);const p=h.dirname(i);if(y.extends){const v=Array.isArray(y.extends),b=(v?y.extends:[y.extends]).map(E=>{const d=cn(E,p,r);if(!d)throw new Error(`File '${E}' not found.`);const g=A(d);if(m.has(g)||g===f)throw new Error(`Circularity detected while resolving configuration: ${g}`);return g});y.extends=v?b:b[0],s.push({path:f,config:y});const k=new Set(m);k.add(f);for(const E of[...b].reverse())a(E,k)}else s.push({path:f,config:y})},"collect");return a(n,new Set),s},"getExtendsChain"),Ee=c((e,t={})=>{const{cache:r=new Map,typescriptVersion:n="auto"}=t,s=vn(e,{cache:r});let o;return n==="auto"?o=on(h.dirname(s[0].path),r):n!==!1&&(o=n),xn(s,{typescriptVersion:o})},"readTsconfig");var En=Object.defineProperty,ue=c((e,t)=>En(e,"name",{value:t,configurable:!0}),"s");const Ze=ue(e=>{let t="";for(let r=0;r<e.length;r+=1){const n=e[r],s=n.toUpperCase();t+=n===s?n.toLowerCase():s}return t},"invertCase"),Ce=new Map,qe=ue((e,t)=>{const r=Dt.join(e,`.is-fs-case-sensitive-test-${process.pid}`);try{return t.writeFileSync(r,""),!t.existsSync(Ze(r))}finally{try{t.unlinkSync(r)}catch{}}},"checkDirectoryCaseWithWrite"),Cn=ue((e,t,r)=>{try{return qe(e,r)}catch(n){if(t===void 0)return qe(_t.tmpdir(),r);throw n}},"checkDirectoryCaseWithFallback"),jn=ue((e,t=$t,r=!0)=>{const n=e??process.cwd();if(r&&Ce.has(n))return Ce.get(n);let s;const o=Ze(n);return o!==n&&t.existsSync(n)?s=!t.existsSync(o):s=Cn(n,e,t),r&&Ce.set(n,s),s},"isFsCaseSensitive"),{join:et}=h.posix,je={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Tn=c(e=>{const t=[...je.ts],r=[...je.cts],n=[...je.mts];return e?.allowJs&&(t.push(".js",".jsx"),r.push(".cjs"),n.push(".mjs")),[...t,...r,...n]},"getSupportedExtensions"),Sn=c(e=>{const t=[];if(!e)return t;const{outDir:r,declarationDir:n}=e;return r&&t.push(r),n&&t.push(n),t},"getDefaultExcludeSpec"),tt=c(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),On=["node_modules","bower_components","jspm_packages"],Te=`(?!(${On.join("|")})(/|$))`,An=/(?:^|\/)[^.*?]+$/,nt="**/*",fe="[^/]",Se="[^./]",rt=process.platform==="win32",Pn=c(({config:e,path:t},r)=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or readTsconfig to resolve it.");if(!h.isAbsolute(t))throw new Error("The tsconfig path must be absolute");rt&&(t=A(t));const n=h.dirname(t),{files:s,include:o,exclude:a,compilerOptions:i}=e,m=c(E=>h.isAbsolute(E)?E:et(n,E),"resolvePattern"),f=s?new Set(s.map(m)):void 0,y=Tn(i),p=r?"":"i",v=(a||Sn(i)).map(E=>{const d=m(E),g=tt(d).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${fe}*`).replaceAll(String.raw`\?`,fe);return new RegExp(`^${g}($|/)`,p)}),b=s||o?o:[nt],k=b?b.map(E=>{let d=m(E);An.test(d)&&(d=et(d,nt));const g=tt(d).replaceAll(String.raw`/\*\*`,`(/${Te}${Se}${fe}*)*?`).replaceAll(/(\/)?\\\*/g,(T,l)=>{const C=String.raw`(${Se}|(\.(?!min\.js$))?)*`;return l?`/${Te}${Se}${C}`:C}).replaceAll(/(\/)?\\\?/g,(T,l)=>{const C=fe;return l?`/${Te}${C}`:C});return new RegExp(`^${g}$`,p)}):void 0;return{filesSet:f,extensions:y,excludePatterns:v,includePatterns:k}},"compilePatterns"),st=new WeakMap,Oe=c((e,t)=>{if(!h.isAbsolute(t))return!1;rt&&(t=A(t));let r=st.get(e);r||(r=Pn(e,jn()),st.set(e,r));const{filesSet:n,extensions:s,excludePatterns:o,includePatterns:a}=r;return n?.has(t)?!0:!s.some(i=>t.endsWith(i))||o.some(i=>i.test(t))?!1:!!(a&&a.some(i=>i.test(t)))},"isFileIncluded"),ot=c((e,t,r,n)=>{const s=h.resolve(e);let o=A(e);for(;;){const a=H(o,t,r);if(!a)return;const i=h.resolve(a),m=Ee(i,{cache:r,typescriptVersion:n});if(Oe(m,s))return m;const f=h.dirname(a),y=h.dirname(f);if(y===f)return;o=y}},"findConfigApplicable"),$n=c((e=process.cwd(),t={})=>{const{configName:r="tsconfig.json",cache:n=new Map,includes:s=!1}=t;if(!s){const o=h.resolve(e);return h.basename(o)===r&&_(n,o)?.isFile()?A(o):H(A(e),r,n)}return ot(e,r,n,!1)?.path},"findTsconfig"),_n=c((e=process.cwd(),t={})=>{const{configName:r="tsconfig.json",cache:n=new Map,includes:s=!1,typescriptVersion:o="auto"}=t;if(!s){const a=$n(e,{configName:r,cache:n});return a?Ee(a,{cache:n,typescriptVersion:o}):void 0}return ot(e,r,n,o)},"getTsconfig"),Dn=/\*/g,at=c((e,t)=>{const r=e.match(Dn);if(r&&r.length>1)throw new Error(t)},"assertStarCount"),Rn=c(e=>{if(e.includes("*")){const[t,r]=e.split("*");return{prefix:t,suffix:r}}return e},"parsePattern"),Ln=c(({prefix:e,suffix:t},r)=>r.startsWith(e)&&r.endsWith(t),"isPatternMatch"),Un=c((e,t,r)=>Object.entries(e).map(([n,s])=>(at(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:Rn(n),substitutions:s.map(o=>{if(at(o,`Substitution '${o}' in pattern '${n}' can have at most one '*' character.`),!t&&!xe.test(o)&&!h.isAbsolute(o))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return h.resolve(r,o)})})),"parsePaths"),Fn=c(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:r,paths:n}=t;if(!r&&!n)return null;const s=we in t&&t[we],o=h.resolve(h.dirname(e.path),r||s||"."),a=n?Un(n,r,o):[],i=new Map,m=[];for(const f of a)typeof f.pattern=="string"?i.set(f.pattern,f.substitutions):m.push(f);return{exactEntries:i,patternEntries:m,resolvedBaseUrl:o,baseUrl:r}},"compilePaths"),it=new WeakMap,ct=c((e,t)=>{let r=it.get(e);if(r===void 0&&(r=Fn(e),it.set(e,r)),!r)return[];if(xe.test(t))return[];const{exactEntries:n,patternEntries:s,resolvedBaseUrl:o,baseUrl:a}=r,i=n.get(t);if(i)return i.map(A);let m,f=-1;for(const p of s)Ln(p.pattern,t)&&p.pattern.prefix.length>f&&(f=p.pattern.prefix.length,m=p);if(!m)return a?[A(h.join(o,t))]:[];const y=t.slice(m.pattern.prefix.length,t.length-m.pattern.suffix.length);return m.substitutions.map(p=>A(p.replace("*",y)))},"resolvePathAlias"),lt=u(e=>{if(e)return Ee(e);try{return _n()??void 0}catch{}},"loadTsconfig"),Ae=u(e=>Array.from(e).length>0?`?${e.toString()}`:"","urlSearchParamsStringify"),Pe=u(e=>e[0]==="."&&(e[1]==="/"||e[1]==="."||e[2]==="/"),"isRelativePath"),V=u(e=>Pe(e)||h.isAbsolute(e),"isFilePath"),X="file://",In=[".ts",".tsx",".jsx",".mts",".cts"],ut=/\.([cm]?ts|[tj]sx)(?:$|[?#])/,Nn=/\.(?:ts|tsx|jsx)(?:$|[?#])/,Bn=/[/\\].+\.(?:cts|cjs)(?:$|[?#])/,Wn=/\.json(?:$|[?#])/,pe=/\/(?:$|[?#])/,Mn=/^(?:@[^/]+\/)?[^/\\]+$/,ft=`${h.sep}node_modules${h.sep}`,$e=u(e=>e?.split(h.sep).includes("node_modules")??!1,"isDependencyPath"),Y=Symbol.for("tsx:global-cjs-loader-count"),Z=globalThis,Jn=u(()=>(Z[Y]??0)>0,"isGlobalCjsLoaderActive"),Vn=u(()=>(Z[Y]=(Z[Y]??0)+1,()=>{Z[Y]=Math.max((Z[Y]??1)-1,0)}),"activateGlobalCjsLoader"),Qn=`
8
+ //# sourceMappingURL=data:application/json;base64,`,pt=u(()=>process.sourceMapsEnabled??!0,"shouldApplySourceMap"),_e=u(({code:e,map:t})=>e+Qn+Buffer.from(JSON.stringify(t),"utf8").toString("base64"),"inlineSourceMap");let de=[];const Gn=u(()=>new Promise(e=>{const t=It(process.ppid),r=Ft.createConnection(t,()=>{e(u(s=>{const o=Buffer.from(JSON.stringify(s)),a=Buffer.alloc(4);a.writeInt32BE(o.length,0),r.write(Buffer.concat([a,o]))},"sendToParent"))});r.on("error",()=>{e()}),r.unref()}),"connectToServer"),q={send:u(e=>{de.push(e)},"send")},Kn=Gn();Kn.then(e=>{if(e)for(const t of de)e(t);de=[],q.send=e},()=>{de=[],q.send=void 0});const me=Number(process.env.TSX_DEBUG);me&&(Fe.enabled=!0,Fe.supportLevel=3);const dt=u(e=>(t,...r)=>{if(!me||t>me)return;const n=`${Mt(` tsx P${process.pid} `)} ${e}`,s=r.map(o=>typeof o=="string"?o:Jt(o,{colors:!0})).join(" ");At(1,`${n} ${s}
9
+ `)},"createLog"),Q=dt(Nt(Bt(" CJS "))),zn=dt(Wt(" ESM ")),U=new Map,Hn=u(async e=>{if(U.has(e))return U.get(e);if(!await F.promises.access(e).then(()=>!0,()=>!1)){U.set(e,void 0);return}const r=await F.promises.readFile(e,"utf8");try{const n=JSON.parse(r);return U.set(e,n),n}catch{throw new Error(`Error parsing: ${e}`)}},"readPackageJson"),Xn=u(e=>{if(U.has(e))return U.get(e);if(!F.existsSync(e)){U.set(e,void 0);return}const t=F.readFileSync(e,"utf8");try{const r=JSON.parse(t);return U.set(e,r),r}catch{throw new Error(`Error parsing: ${e}`)}},"readPackageJsonSync"),Yn=u(async e=>{let t=new URL("package.json",e);for(;!t.pathname.endsWith("/node_modules/package.json");){const r=se(t),n=await Hn(r);if(n)return n;const s=t;if(t=new URL("../package.json",t),t.pathname===s.pathname)break}},"findPackageJson"),mt=u(e=>{let t=new URL("package.json",e);for(;!t.pathname.endsWith("/node_modules/package.json");){const r=se(t),n=Xn(r);if(n)return n;const s=t;if(t=new URL("../package.json",t),t.pathname===s.pathname)break}},"findPackageJsonSync"),Zn=u(async e=>(await Yn(e))?.type??"commonjs","getPackageType"),qn=u(e=>mt(e)?.type??"commonjs","getPackageTypeSync"),er=u(e=>mt(e)?.type,"getNearestPackageTypeSync"),tr=[".cts",".mts",".ts",".tsx",".jsx"],nr=[".js",".cjs",".mjs"],ht=[".ts",".tsx",".jsx"],gt="module.exports",rr='Top-level await is currently not supported with the "cjs" output format',yt=u(e=>{const t=h.extname(e);return t===".mjs"||t===".mts"||(t===".js"||t===".ts")&&er(Ot(e).toString())!=="commonjs"},"isRequireEsmCandidate"),De=u((e,t,r,n)=>{const s=Object.getOwnPropertyDescriptor(e,t);s?.set?e[t]=r:(!s||s.configurable)&&Object.defineProperty(e,t,{value:r,enumerable:s?.enumerable||n?.enumerable,writable:n?.writable??(s?s.writable:!0),configurable:n?.configurable??(s?s.configurable:!0)})},"safeSet"),sr=u((e,t,r,n)=>{const s=t[".js"],o=process.features.require_module??Vt(Qt),a=u((i,m)=>{if(e.enabled===!1)return s(i,m);const[f,y]=m.split("?");if((new URLSearchParams(y).get("namespace")??void 0)!==n)return s(i,m);Q(2,"load",{filePath:m}),i.id?.startsWith("data:text/javascript,")&&(i.path=h.dirname(f)),q?.send&&q.send({type:"dependency",path:f});const v=tr.some(l=>f.endsWith(l)),b=nr.some(l=>f.endsWith(l));if(!v&&!b)return s(i,f);let k=F.readFileSync(f,"utf8");const E=b&&!f.endsWith(".cjs")&&!f.endsWith(".cts")&&Rt(k),d=(v||E)&&r&&Oe(r,f)?r.config:void 0;if(f.endsWith(".cjs")){const l=Lt(m,k);l&&(k=pt()?_e(l):l.code)}else if(v||E)try{const l=Ut(k,m,{tsconfigRaw:d});k=pt()?_e(l):l.code}catch(l){throw yt(f)&&l instanceof Error&&l.name==="TransformError"&&l.message.includes(rr)&&Object.assign(l,{code:o?"ERR_REQUIRE_ASYNC_MODULE":"ERR_REQUIRE_ESM"}),l}Q(1,"loaded",{filePath:f}),i._compile(k,f),y&&P._cache[f]===i&&(P._cache[m]=i,delete P._cache[f]);const{exports:g}=i;(o&&g&&(typeof g=="object"||typeof g=="function")?Object.getOwnPropertyDescriptor(g,gt):void 0)?.get&&yt(f)&&(i.exports=g[gt])},"transformer");De(t,".js",a);for(const i of ht)De(t,i,a,{enumerable:!n,writable:!0,configurable:!0});return De(t,".mjs",a,{writable:!0,configurable:!0}),()=>{t[".js"]===a&&(t[".js"]=s);for(const i of[...ht,".mjs"])t[i]===a&&delete t[i]}},"createExtensions"),or=u(e=>t=>{if((t==="."||t===".."||t.endsWith("/.."))&&(t+="/"),pe.test(t)){let r=h.join(t,"index");t.startsWith("./")&&(r=`./${r}`);try{return e(r)}catch{}}try{return e(t)}catch(r){const n=r;if(n.code==="MODULE_NOT_FOUND")try{return e(`${t}${h.sep}index`)}catch{}throw n}},"createImplicitResolver"),kt=u(e=>{if(!e.startsWith("data:text/javascript,"))return;const t=e.indexOf("?");if(t===-1)return;const n=new URLSearchParams(e.slice(t+1)).get("filePath");if(n)return n},"getOriginalFilePath"),bt=u(e=>{const t=kt(e);return t&&(P._cache[t]=P._cache[e],delete P._cache[e],e=t),e},"interopCjsExports"),wt=[".js",".json"],xt=[".ts",".tsx",".jsx"],ar=new Set([".json",".node"]),ir=[...xt,...wt],cr=[...wt,...xt],ee=Object.create(null);ee[".js"]=[".ts",".tsx",".js",".jsx"],ee[".jsx"]=[".tsx",".ts",".jsx",".js"],ee[".cjs"]=[".cts"],ee[".mjs"]=[".mts"];const lr=new Set([".ts",".tsx",".mts",".cts"]),vt=u((e,t=!1)=>{const r=e.indexOf("?"),n=r===-1?e:e.slice(0,r),s=r===-1?"":e.slice(r);if(!t&&!V(n)&&!n.startsWith(X))return;const o=h.extname(n);if(lr.has(o))return;const a=ee[o];if(a){const m=n.slice(0,-o.length);return a.map(f=>m+f+s)}return ar.has(o)?void 0:(!(e.startsWith(X)||V(n))||n.includes(ft)||n.includes("/node_modules/")?cr:ir).map(m=>n+m+s)},"getExtensionResolution"),ur=u((e,t)=>{let r;return h.isAbsolute(e)?r=e:Pe(e)&&t&&(r=h.resolve(t,e)),r!==void 0&&!Pt(r)},"candidateDoesntExist"),he=u((e,t,r,n)=>{if(Q(3,"resolveTsFilename",{request:t,isDirectory:pe.test(t)}),pe.test(t))return;const s=vt(t,n);if(s){for(const o of s)if(!ur(o,r))try{return e(o)}catch(a){const{code:i}=a;if(i!=="MODULE_NOT_FOUND"&&i!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw a}}},"resolveTsFilename"),fr=u((e,t,r,n)=>s=>{if(Q(3,"resolveTsFilename",{request:s,resolveTsExtensions:r,isFilePath:V(s)}),r&&V(s)){const o=he(e,s,t,n);if(o)return o}try{return e(s)}catch(o){const a=o;if(r&&a.code==="MODULE_NOT_FOUND"){if(a.path){const m=a.message.match(/^Cannot find module '([^']+)'$/);if(m){const y=m[1],p=he(e,y,t,n);if(p)return p}const f=a.message.match(/^Cannot find module '([^']+)'. Please verify that the package.json has a valid "main" entry$/);if(f){const y=f[1],p=he(e,y,t,n);if(p)return p}}const i=he(e,s,t,n);if(i)return i}throw a}},"createTsExtensionResolver"),Et="at cjsPreparseModuleExports (node:internal",pr=u(e=>{const t=e.stack.split(`
10
+ `).slice(1);return t[1].includes(Et)||t[2].includes(Et)},"isFromCjsLexer"),dr=u((e,t)=>{const r=e.split("?"),n=new URLSearchParams(r[1]);if(t?.filename){const s=kt(t.filename);let o;if(s){const m=s.split("?"),f=m[0];o=m[1];const p=new URLSearchParams(o).get("namespace");t.filename=f,t.path=h.dirname(f),t.paths=P._nodeModulePaths(t.path),p||(P._cache[f]=t)}o||(o=t.filename.split("?")[1]);const i=new URLSearchParams(o).get("namespace");i&&n.append("namespace",i)}return[r[0],n,(s,o)=>(h.isAbsolute(s)&&!s.endsWith(".json")&&!s.endsWith(".node")&&!(o===0&&pr(new Error))&&(s+=Ae(n)),s)]},"preserveQuery"),mr=u((e,t,r,n)=>{if(e.startsWith(X)&&(e=se(e)),n&&!V(e)&&!$e(t?.filename)){const s=ct(n,e);for(const o of s)try{return r(o)}catch{}}return r(e)},"resolveTsPaths"),hr=u((e,t,r,n)=>(s,o,...a)=>{if(e.enabled===!1)return t(s,o,...a);s=bt(s);const[i,m,f]=dr(s,o);if((m.get("namespace")??void 0)!==n)return t(s,o,...a);Q(2,"resolve",{request:s,parent:o?.filename??o,restOfArgs:a});let y=u(E=>t(E,o,...a),"nextResolveSimple");const p=$e(o?.filename),v=!!(n||o?.filename&&ut.test(o.filename)),b=!!(v||r?.config.compilerOptions?.allowJs&&!p);y=fr(y,o?.path??void 0,b,v),y=or(y);const k=f(mr(i,o,y,r),a.length);return Q(1,"resolved",{request:s,parent:o?.filename??o,resolved:k}),k},"createResolveFilename"),Ct=u((e,t)=>{if(!t)throw new Error("The current file path (__filename or import.meta.url) must be provided in the second argument of tsx.require()");return e.startsWith(".")?((typeof t=="string"&&t.startsWith(X)||t instanceof URL)&&(t=se(t)),h.resolve(h.dirname(t),e)):e},"resolveContext"),Re=u(e=>{const{sourceMapsEnabled:t}=process,r={enabled:!0},n=lt(process.env.TSX_TSCONFIG_PATH);process.setSourceMapsEnabled(!0);const s=P._resolveFilename,o=hr(r,s,n,e?.namespace);P._resolveFilename=o;const a=sr(r,P._extensions,n,e?.namespace),i=e?.namespace?void 0:Vn(),m=u(()=>{t===!1&&process.setSourceMapsEnabled(!1),r.enabled=!1,P._resolveFilename===o&&(P._resolveFilename=s),a(),i?.()},"unregister");if(e?.namespace){const f=u((p,v)=>{const b=Ct(p,v),[k,E]=b.split("?"),d=new URLSearchParams(E);return e.namespace&&!k.startsWith("node:")&&d.set("namespace",e.namespace),K(k+Ae(d))},"scopedRequire");m.require=f;const y=u((p,v,b)=>{const k=Ct(p,v),[E,d]=k.split("?"),g=new URLSearchParams(d);return e.namespace&&!E.startsWith("node:")&&g.set("namespace",e.namespace),o(E+Ae(g),module,!1,b)},"scopedResolve");m.resolve=y,m.unregister=m}return m},"register");let G;const te=u((e,t)=>(G||(G=Re({namespace:Date.now().toString()})),G.require(e,t)),"tsxRequire"),jt=u((e,t,r)=>(G||(G=Re({namespace:Date.now().toString()})),G.resolve(e,t,r)),"resolve");jt.paths=K.resolve.paths,te.resolve=jt,te.main=K.main,te.extensions=K.extensions,te.cache=K.cache;export{In as a,Zn as b,Bn as c,me as d,zn as e,Jn as f,qn as g,_e as h,Mn as i,ut as j,X as k,lt as l,Wn as m,Oe as n,Nn as o,q as p,V as q,Re as r,ft as s,te as t,$e as u,pe as v,ct as w,Pe as x,vt as y,bt as z};
@@ -0,0 +1 @@
1
+ "use strict";var u=Object.defineProperty;var s=(r,t)=>u(r,"name",{value:t,configurable:!0});var n=require("./register-B1c7OH6V.cjs");let e;const i=s((r,t)=>(e||(e=n.register({namespace:Date.now().toString()})),e.require(r,t)),"tsxRequire"),a=s((r,t,o)=>(e||(e=n.register({namespace:Date.now().toString()})),e.resolve(r,t,o)),"resolve");a.paths=require.resolve.paths,i.resolve=a,i.main=require.main,i.extensions=require.extensions,i.cache=require.cache,exports.tsxRequire=i;
@@ -0,0 +1 @@
1
+ var c=Object.defineProperty;var r=(s,t)=>c(s,"name",{value:t,configurable:!0});import m from"node:path";import n from"node:os";const i=r((s,t)=>{const e=s[0]-t[0];if(e===0){const o=s[1]-t[1];return o===0?s[2]>=t[2]:o>0}return e>0},"isVersionGreaterOrEqual"),u=process.versions.node.split(".").map(Number),p=r((s,t=u)=>{for(let e=0;e<s.length;e+=1){const o=s[e];if(e===s.length-1||t[0]===o[0])return i(t,o)}return!1},"isFeatureSupported"),d=[[18,19,0],[20,6,0]],f=[[22,22,3],[24,11,1],[25,1,0],[26,0,0]],l=[[18,19,0],[20,10,0],[21,0,0]],g=[[21,0,0]],R=[[20,11,0],[21,3,0]],b=[[20,11,0],[21,2,0]],h=[[20,19,0],[22,12,0],[23,0,0]],{geteuid:a}=process,j=a?a():n.userInfo().username,q=m.join(n.tmpdir(),`tsx-${j}`);export{d as a,l as b,b as c,g as d,R as e,p as i,f as m,h as r,q as t};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsx",
3
- "version": "4.23.13",
3
+ "version": "4.23.15",
4
4
  "description": "TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files",
5
5
  "keywords": [
6
6
  "cli",
@@ -54,6 +54,9 @@
54
54
  "./preflight": "./dist/preflight.cjs",
55
55
  "./repl": "./dist/repl.mjs"
56
56
  },
57
+ "imports": {
58
+ "#cjs-loader": "./dist/cjs/index.cjs"
59
+ },
57
60
  "homepage": "https://tsx.hirok.io",
58
61
  "engines": {
59
62
  "node": ">=18.0.0"
@@ -558,9 +558,9 @@
558
558
  }
559
559
  },
560
560
  "node_modules/tsx": {
561
- "version": "4.23.13",
562
- "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.13.tgz",
563
- "integrity": "sha512-BL5MGkRln6aDYhb0xbQlEAGw743BaZYWdbWtdJOBriYJboKgUUYCadFp2/FpBBZquBC/ezNBn7wMMPx7FDZUDw==",
561
+ "version": "4.23.15",
562
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.15.tgz",
563
+ "integrity": "sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw==",
564
564
  "dev": true,
565
565
  "license": "MIT",
566
566
  "dependencies": {
@@ -14041,6 +14041,12 @@
14041
14041
  "description": "Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Gas-sponsored builds always execute at market rate.",
14042
14042
  "example": false
14043
14043
  },
14044
+ "preview": {
14045
+ "type": "boolean",
14046
+ "title": "Preview",
14047
+ "description": "If true, build a display ESTIMATE: no firm RFQ quote is ever requested (quote_expires_at stays null). NOTE that this guarantees only that no firm quote was spent \u2014 it does not guarantee an absent payload: under 'auto' when the firm provider does not cover or cannot currently price the pair, and always under pricing=market, the call falls through to the aggregator and returns a signable market build (an unsigned transaction, or EIP-712 typed data when gas_sponsorship=true), without requiring the account to hold token_in yet. How the estimate is priced follows `pricing`: on a firm-covered pair whose size the firm provider's live price levels can serve, 'auto' and 'firm' price it from those levels (indicative, transaction stays null \u2014 re-call with preview=false for the signable build); otherwise it comes from the market build above (pricing='firm' instead refuses with a typed error). Set it on every call made while a user is exploring parameters, and leave it false only for the build they actually intend to sign \u2014 firm quotes are single-use maker commitments, and requesting them for displays that are never executed degrades the pricing this API is offered.",
14048
+ "example": false
14049
+ },
14044
14050
  "pricing": {
14045
14051
  "type": "string",
14046
14052
  "enum": [
@@ -14049,7 +14055,7 @@
14049
14055
  "market"
14050
14056
  ],
14051
14057
  "title": "Pricing",
14052
- "description": "Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).",
14058
+ "description": "Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing \u2014 previews included: a preview the firm provider's live price levels cannot price returns the same typed error rather than market numbers. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).",
14053
14059
  "example": "auto"
14054
14060
  }
14055
14061
  },
@@ -14085,7 +14091,7 @@
14085
14091
  "type": "null"
14086
14092
  }
14087
14093
  ],
14088
- "description": "Unsigned transaction for direct execution. Present when gas_sponsorship=false."
14094
+ "description": "Unsigned transaction for direct execution. Present when gas_sponsorship=false \u2014 except firm-priced previews (preview=true responses reporting swap_provider='firm'), which carry the estimate only: the firm quote is fetched at execution time, so there is no payload to sign yet. A preview whose response reports swap_provider='market' does carry this signable payload."
14089
14095
  },
14090
14096
  "eip_712": {
14091
14097
  "anyOf": [
@@ -14102,7 +14108,7 @@
14102
14108
  "type": "string",
14103
14109
  "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
14104
14110
  "title": "Estimated Amount Out",
14105
- "description": "Estimated amount of output token received from the swap. Exact on firm builds (a firm quote fills at this amount or reverts). On market builds it is a quote-time estimate, and `slippage` sets how far below it the transaction's enforced minimum output sits."
14111
+ "description": "Estimated amount of output token received from the swap. Exact on executable firm builds (a firm quote fills at this amount or reverts). On market builds it is a quote-time estimate, and `slippage` sets how far below it the transaction's enforced minimum output sits. On preview=true responses reporting 'firm' it is INDICATIVE \u2014 computed from the firm provider's live price levels without spending a quote."
14106
14112
  },
14107
14113
  "swap_provider": {
14108
14114
  "type": "string",
@@ -14111,7 +14117,7 @@
14111
14117
  "firm"
14112
14118
  ],
14113
14119
  "title": "Swap Provider",
14114
- "description": "Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.",
14120
+ "description": "Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. On preview=true responses 'firm' means the estimate is INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quote at signing time. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.",
14115
14121
  "example": "market"
14116
14122
  },
14117
14123
  "quote_expires_at": {
@@ -14125,7 +14131,7 @@
14125
14131
  }
14126
14132
  ],
14127
14133
  "title": "Quote Expires At",
14128
- "description": "Deadline of the firm swap quote. Sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Null on market builds."
14134
+ "description": "Deadline of the firm swap quote. Sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Null on market builds and on every preview (a preview never holds a firm quote)."
14129
14135
  }
14130
14136
  },
14131
14137
  "type": "object",
@@ -22558,6 +22564,11 @@
22558
22564
  "title": "Oracle Price",
22559
22565
  "description": "Oracle reference price"
22560
22566
  },
22567
+ "prev_day_price": {
22568
+ "type": "string",
22569
+ "title": "Prev Day Price",
22570
+ "description": "Price 24 hours ago, for computing 24h price change (0 for newly listed markets)"
22571
+ },
22561
22572
  "open_interest": {
22562
22573
  "type": "string",
22563
22574
  "title": "Open Interest",
@@ -22591,6 +22602,7 @@
22591
22602
  "category",
22592
22603
  "mark_price",
22593
22604
  "oracle_price",
22605
+ "prev_day_price",
22594
22606
  "open_interest",
22595
22607
  "volume_24h",
22596
22608
  "funding_rate",