"use strict";var ge=Object.defineProperty;var l=(e,r)=>ge(e,"name",{value:r,configurable:!0});var T=require("node:module"),he=require("node:worker_threads"),y=require("./node-features-CQLdkVE6.cjs"),n=require("./register-BOkp8V6j.cjs"),g=require("node:url"),ye=require("node:fs"),Pe=require("node:fs/promises"),h=require("./index-D9F1FXzN.cjs"),D=require("./client-D3mGB526.cjs"),S=require("node:path"),L=typeof document<"u"?document.currentScript:null;const F={active:!0,parsedTsconfig:void 0},V=l(e=>{const r={active:!0,namespace:e?.namespace,onImport:e?.onImport,parsedTsconfig:void 0,port:e?.port,tsconfig:e?.tsconfig};return e?.tsconfig!==!1&&(r.parsedTsconfig=n.loadTsconfig(e?.tsconfig??process.env.TSX_TSCONFIG_PATH)),r},"createData"),Re=l(async e=>{if(!e)throw new Error(`tsx must be loaded with --import instead of --loader The --loader flag was deprecated in Node v20.6.0 and v18.19.0`);Object.assign(F,V(e)),e.port&&e.port.on("message",r=>{r==="deactivate"&&(F.active=!1,e.port.postMessage({type:"deactivated"}))})},"initialize"),Ue=l(()=>(F.parsedTsconfig=n.loadTsconfig(process.env.TSX_TSCONFIG_PATH),"process.setSourceMapsEnabled(true);"),"globalPreload"),Se=l(e=>{const{pathname:r}=new URL(e),t=S.extname(r);if(t===".mts"||t===".mjs")return"module";if(t===".cts"||t===".cjs")return"commonjs";if(t===".js"||n.tsExtensions.includes(t))return n.getPackageType(e)},"getFormatFromFileUrl"),Ee=l(e=>{const{pathname:r}=new URL(e),t=S.extname(r);if(t===".mts"||t===".mjs")return"module";if(t===".cts"||t===".cjs")return"commonjs";if(t===".js"||n.tsExtensions.includes(t))return n.getPackageTypeSync(e)},"getFormatFromFileUrlSync"),U="tsx-namespace=",W="tsx-commonjs-export-preparse",K=`${W}=1`,j="tsx-commonjs-virtual-query",I=new Map,B=l((e,r)=>e.slice(1).split("&").filter(t=>t&&r.every(s=>!t.startsWith(s))).join("&"),"getQueryWithoutParameters"),J=l((e,r)=>{const t=B(e,r);return t?`?${t}`:""},"getSearchWithoutParameters"),ve=l(e=>e.replaceAll(/\/\*[\s\S]*?\*\/|\/\/[^\n\r]*/g,""),"stripComments"),Te=l(e=>{const r=ve(e);if(/^\s*export\s*\*/.test(r))return"named";if(/^\s*import\s*\*\s*as\s+[\w$]+/.test(r))return"namespace";const t=r.match(/\{([^}]*)\}/)?.[1];if(t)return t.split(",").some(s=>{const o=s.trim().split(/\s+as\s+/)[0];return!!(o&&o!=="default")})?"named":void 0},"getCommonJsImportBinding"),Le=l((e,r,t)=>{const s=I.get(e);if(!s)return!1;try{const[o]=h.parseEsm(s);return o.some(a=>{if(a.d!==-1||a.n!==r)return!1;const m=Te(s.slice(a.ss,a.s));return m==="named"||t&&m==="namespace"})}catch{return!1}},"parentImportsCommonJsExports"),E=l(e=>{const r=e.indexOf(U);if(r===-1)return;const t=e[r-1];if(t!=="?"&&t!=="&")return;const s=r+U.length,o=e.indexOf("&",s);return o===-1?e.slice(s):e.slice(s,o)},"getNamespace"),Y=y.isFeatureSupported(y.importAttributes)?"importAttributes":"importAssertions",Z=l(e=>e==="commonjs"||e==="commonjs-typescript","isCommonJsFormat"),k=l(e=>e==="module-typescript"||e==="typescript","isModuleTypeScriptFormat"),we=y.isFeatureSupported(y.esmLoadReadFile),Fe=[`${j}=`],M=[`${W}=`,`${j}=`],v=l((e,r)=>r.parsedTsconfig&&n.je(r.parsedTsconfig,e)?r.parsedTsconfig.config:void 0,"getTsconfigRaw"),je=l(e=>{if(!e.searchParams.has(j))return;const{pathname:r}=e,t=r.toLowerCase().lastIndexOf("%3f");if(t===-1)return;const s=new URL(e);return s.pathname=r.slice(0,t),s.search="",g.fileURLToPath(s)},"getFilePathFromVirtualQuery"),Q=l(e=>{const r=e.startsWith(n.fileUrlPrefix)?new URL(e):void 0,t=r?g.fileURLToPath(r):e,s=r&&je(r),o=s||t,a=r&&s?g.pathToFileURL(o).toString()+J(r.search,Fe):e;return{fileUrl:r,filePath:o,loadUrl:a}},"getFileLoadContext"),ee=l((e,r)=>{if(!r?.search)return e;const t=J(r.search,M);return t?g.pathToFileURL(e).toString()+t:e},"getTransformPath"),te=l((e,r,t)=>{const s=[...r?B(r.search,[U,...M]).split("&").filter(Boolean):[],...t?[`namespace=${encodeURIComponent(t)}`]:[]].join("&");return s?`${e}?${s}`:e},"getFilePathWithQuery"),Ie=new TextDecoder,re=l(e=>typeof e=="string"?e:Ie.decode(e),"decodeSource"),_e=l((e,r)=>{const t=new URL(r),s=r.startsWith(n.fileUrlPrefix)?Q(r).filePath:void 0;t.searchParams.delete("tsx-namespace"),t.searchParams.delete(W),t.searchParams.delete(j),s&&(t.pathname=new URL(g.pathToFileURL(s)).pathname);const o=t.toString();return e.port&&e.port.postMessage({type:"load",url:o}),e.onImport?.(o),o},"notifyLoad"),se=l((e,r)=>{if(!e.active)return!1;const t=E(r);if(e.namespace&&e.namespace!==t)return!1;const s=_e(e,r);return D.parent.send&&D.parent.send({type:"dependency",path:s}),!0},"prepareLoad"),oe=l((e,r)=>{if(!n.isJsonPattern.test(e))return r;const t=r[Y];return t?.type?r:{...r,[Y]:{...t,type:"json"}}},"prepareJsonAttributes"),H=l(({conditions:e})=>e?.includes("require")===!0&&!e.includes("import"),"isCommonJsRequireContext$1"),Ce=l(e=>{const r=l(async(t,s,o)=>{if(!se(e,t))return o(t,s);const a=E(t),{fileUrl:m,filePath:c,loadUrl:i}=Q(t),u=oe(i,s),d=await o(i,u);n.logEsm(3,"loaded by next loader",{url:t,loadUrl:i,loaded:d});const P=m?.searchParams.has(W)===!0,R=d.format,w=m?new URL(g.pathToFileURL(c)):void 0;if(w&&m&&(w.search=J(m.search,M)),Z(R)&&m&&d.responseURL?.startsWith("file:")&&!c.endsWith(".cjs")){const f=await Pe.readFile(g.pathToFileURL(c),"utf8"),b=h.isESM(f);if(R==="commonjs-typescript"||!c.endsWith(".js")||b){if(!we){if(P&&b&&n.implicitTsExtensionsPattern.test(c)){const $=await h.transform(f,c,{define:{"import.meta.url":JSON.stringify(w.toString())},tsconfigRaw:v(c,e)});return I.set(t,$.code),{format:"module",source:n.inlineSourceMap($)}}return d}if(!a&&!P&&!c.endsWith(".cts"))return d;const z=!!(a||P||J(m.search,M)),X=h.transformSync(f,ee(c,m),{cjsBanner:z?`require = require("node:module").createRequire(${JSON.stringify(g.pathToFileURL(c).toString())});`:void 0,tsconfigRaw:v(c,e)});if(d.format="commonjs",d.source=n.inlineSourceMap(X),z){const $=te(c,m,a);d.responseURL=`data:text/javascript,${encodeURIComponent(X.code)}?filePath=${encodeURIComponent($)}`}return n.logEsm(3,"returning CJS export annotation",d),d}}if(!d.source)return d;const p=re(d.source),C=R==="json"&&!H(s);if(R==="commonjs-typescript"){const f=h.transformSync(p,c,{tsconfigRaw:v(c,e)});return{...d,format:"commonjs",source:n.inlineSourceMap(f)}}if(C||k(R)||n.tsExtensionsPattern.test(t)){const f=await h.transform(p,c,{tsconfigRaw:v(c,e)});return I.set(t,f.code),{format:"module",source:n.inlineSourceMap(f)}}if(d.format==="module"){const f=h.transformDynamicImport(c,p);f?(d.source=n.inlineSourceMap(f),I.set(t,f.code)):I.set(t,p)}return d},"load2");return n.debugEnabled?async(t,s,o)=>{n.logEsm(2,"load",{url:t,context:s});const a=await r(t,s,o);return n.logEsm(1,"loaded",{url:t,result:a}),a}:r},"createLoad"),be=l(e=>{const r=l((t,s,o)=>{if(H(s)&&n.isGlobalCjsLoaderActive()||!se(e,t))return o(t,s);const a=E(t),{fileUrl:m,filePath:c,loadUrl:i}=Q(t),u=oe(i,s),d=o(i,u);n.logEsm(3,"loaded by next loader",{url:t,loadUrl:i,loaded:d});const P=d.format;if(Z(P)&&y.isFeatureSupported(y.esmLoadReadFile)&&d.responseURL?.startsWith("file:")&&!c.endsWith(".cjs")){const p=ye.readFileSync(g.pathToFileURL(c),"utf8");if(P==="commonjs-typescript"||!c.endsWith(".js")||h.isESM(p)){const C=h.transformSync(p,ee(c,m),{tsconfigRaw:v(c,e)}),f=!a&&n.isGlobalCjsLoaderActive(),b=te(c,m,a);return d.format="commonjs",d.shouldBeReloadedByCJSLoader=f,d.source=n.inlineSourceMap(C),f||(d.responseURL=`data:text/javascript,${encodeURIComponent(C.code)}?filePath=${encodeURIComponent(b)}`),n.logEsm(3,"returning CJS export annotation",d),d}}if(!d.source)return d;const R=re(d.source),w=P==="json"&&!H(s);if(P==="commonjs-typescript"){const p=h.transformSync(R,c,{tsconfigRaw:v(c,e)});return{...d,format:"commonjs",shouldBeReloadedByCJSLoader:!1,source:n.inlineSourceMap(p)}}if(w||k(P)||n.tsExtensionsPattern.test(t)){const p=h.transformEsmSync(R,c,{tsconfigRaw:v(c,e)});return{format:"module",source:n.inlineSourceMap(p)}}if(d.format==="module"){const p=h.transformDynamicImport(c,R);p&&(d.source=n.inlineSourceMap(p))}return d},"load2");return n.debugEnabled?(t,s,o)=>{n.logEsm(2,"loadSync",{url:t,context:s});const a=r(t,s,o);return n.logEsm(1,"loadedSync",{url:t,result:a}),a}:r},"createLoadSync"),$e=Ce(F),We=y.isFeatureSupported(y.esmLoadReadFile),Je=/^(?:[a-z][\d+.a-z-]*:\/\/|data:|file:|node:)/i,ne=l(e=>!n.isFilePath(e)&&!Je.test(e),"isTsconfigPathAliasSpecifier"),O=l(e=>{if(e.url)return e.url;const r=e.message.match(/^Cannot find module '([^']+)'/);if(r){const[,s]=r;return s}const t=e.message.match(/^Cannot find package '([^']+)'/);if(t){const[,s]=t;if(!S.isAbsolute(s))return;const o=g.pathToFileURL(s);if(o.pathname.endsWith("/")&&(o.pathname+="package.json"),o.pathname.endsWith("/package.json")){const a=h.readJsonFile(o);if(a?.main)return new URL(a.main,o).toString()}else return o.toString()}},"getMissingPathFromNotFound"),q=l(e=>e==="ERR_MODULE_NOT_FOUND"||e==="MODULE_NOT_FOUND","isModuleNotFound"),ae=l(e=>e.conditions.includes("require")&&!e.conditions.includes("import"),"isCommonJsRequireContext"),N=l(async(e,r,t,s)=>{const o=n.mapTsExtensions(e);if(n.logEsm(3,"resolveExtensions",{url:e,context:r,throwError:s,tryPaths:o}),!o)return;let a;for(const m of o)try{return await t(m,r)}catch(c){const{code:i}=c;if(!q(i)&&i!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw c;a=c}if(s)throw a},"resolveExtensions"),_=l((e,r,t,s)=>{const o=n.mapTsExtensions(e);if(n.logEsm(3,"resolveExtensionsSync",{url:e,context:r,throwError:s,tryPaths:o}),!o)return;let a;for(const m of o)try{return t(m,r)}catch(c){const{code:i}=c;if(!q(i)&&i!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw c;a=c}if(s)throw a},"resolveExtensionsSync"),Me=l(async(e,r,t,s)=>{const o=s.parsedTsconfig?.config.compilerOptions?.allowJs??!1;if(n.logEsm(3,"resolveBase",{specifier:e,context:r,specifierStartsWithFileUrl:e.startsWith(n.fileUrlPrefix),isRelativePath:n.isRelativePath(e),tsExtensionsPattern:n.tsExtensionsPattern.test(r.parentURL),allowJs:o}),(e.startsWith(n.fileUrlPrefix)||n.isRelativePath(e))&&(n.tsExtensionsPattern.test(r.parentURL)||o)){const a=await N(e,r,t);if(n.logEsm(3,"resolveBase resolved",{specifier:e,context:r,resolved:a}),a)return a}try{return await t(e,r)}catch(a){if(n.logEsm(3,"resolveBase error",{specifier:e,context:r,error:a}),a instanceof Error){const m=a;if(q(m.code)){const c=O(m);if(c){const i=await N(c,r,t);if(i)return i}}}throw a}},"resolveBase"),x=l((e,r,t,s)=>{const o=s.parsedTsconfig?.config.compilerOptions?.allowJs??!1;if(n.logEsm(3,"resolveBaseSync",{specifier:e,context:r,specifierStartsWithFileUrl:e.startsWith(n.fileUrlPrefix),isRelativePath:n.isRelativePath(e),tsExtensionsPattern:n.tsExtensionsPattern.test(r.parentURL),allowJs:o}),(e.startsWith(n.fileUrlPrefix)||n.isRelativePath(e))&&(n.tsExtensionsPattern.test(r.parentURL)||o)){const a=_(e,r,t);if(n.logEsm(3,"resolveBaseSync resolved",{specifier:e,context:r,resolved:a}),a)return a}try{return t(e,r)}catch(a){if(n.logEsm(3,"resolveBaseSync error",{specifier:e,context:r,error:a}),a instanceof Error){const m=a;if(q(m.code)){const c=O(m);if(c){const i=_(c,r,t);if(i)return i}}}throw a}},"resolveBaseSync"),ie=l(async(e,r,t,s)=>{if(n.logEsm(3,"resolveDirectory",{specifier:e,context:r,isDirectory:n.isDirectoryPattern.test(e)}),(e==="."||e===".."||e.endsWith("/.."))&&(e+="/"),n.isDirectoryPattern.test(e)){const o=new URL(e,r.parentURL);return o.pathname=S.join(o.pathname,"index"),await N(o.toString(),r,t,!0)}try{return await Me(e,r,t,s)}catch(o){if(o instanceof Error){n.logEsm(3,"resolveDirectory error",{specifier:e,context:r,error:o});const a=o;if(a.code==="ERR_UNSUPPORTED_DIR_IMPORT"){const m=O(a);if(m)try{return await N(`${m}/index`,r,t,!0)}catch(c){const i=c,{message:u}=i;throw i.message=i.message.replace(`${"/index".replace("/",S.sep)}'`,"'"),i.stack=i.stack.replace(u,i.message),i}}}throw o}},"resolveDirectory"),ce=l((e,r,t,s)=>{if(n.logEsm(3,"resolveDirectorySync",{specifier:e,context:r,isDirectory:n.isDirectoryPattern.test(e)}),(e==="."||e===".."||e.endsWith("/.."))&&(e+="/"),n.isDirectoryPattern.test(e)){const o=ae(r);if(o&&!n.isFilePath(e))return x(e,r,t,s);const a=new URL(e,r.parentURL);return a.pathname=S.join(a.pathname,"index"),o?_(g.fileURLToPath(a),r,t,!1)??x(e,r,t,s):_(a.toString(),r,t,!0)}try{return x(e,r,t,s)}catch(o){if(o instanceof Error){n.logEsm(3,"resolveDirectorySync error",{specifier:e,context:r,error:o});const a=o;if(a.code==="ERR_UNSUPPORTED_DIR_IMPORT"){const m=O(a);if(m)try{return _(`${m}/index`,r,t,!0)}catch(c){const i=c,{message:u}=i;throw i.message=i.message.replace(`${"/index".replace("/",S.sep)}'`,"'"),i.stack=i.stack.replace(u,i.message),i}}}throw o}},"resolveDirectorySync"),Oe=l(async(e,r,t,s)=>{const o=ne(e);if(n.logEsm(3,"resolveTsPaths",{specifier:e,context:r,tsconfigPathAliasSpecifier:o,tsconfig:s.parsedTsconfig,fromNodeModules:r.parentURL?.includes("/node_modules/")}),o&&s.parsedTsconfig&&!r.parentURL?.includes("/node_modules/")){const a=n.wt(s.parsedTsconfig,e);n.logEsm(3,"resolveTsPaths",{possiblePaths:a});for(const m of a)try{return await ie(g.pathToFileURL(m).toString(),r,t,s)}catch{}}return ie(e,r,t,s)},"resolveTsPaths"),qe=l((e,r,t,s)=>{const o=ne(e);if(n.logEsm(3,"resolveTsPathsSync",{specifier:e,context:r,tsconfigPathAliasSpecifier:o,tsconfig:s.parsedTsconfig,fromNodeModules:r.parentURL?.includes("/node_modules/")}),o&&s.parsedTsconfig&&!r.parentURL?.includes("/node_modules/")){const a=n.wt(s.parsedTsconfig,e);n.logEsm(3,"resolveTsPathsSync",{possiblePaths:a});for(const m of a)try{return ce(g.pathToFileURL(m).toString(),r,t,s)}catch{}}return ce(e,r,t,s)},"resolveTsPathsSync"),A="tsx://",G=l((e,r)=>`${e}${e.includes("?")?"&":"?"}${r}`,"addQuery"),le=l((e,r,t)=>{if(r!=="commonjs"||!e.startsWith(n.fileUrlPrefix)||!n.implicitTsExtensionsPattern.test(e))return e;const s=new URL(e),o=[B(s.search,[U]),...t?[`namespace=${encodeURIComponent(t)}`]:[]].filter(Boolean).join("&");return o?(s.pathname+=`%3F${o}`,s.searchParams.set(j,"1"),s.toString()):e},"preserveCommonJsQueryIdentity"),Ne=l(e=>{const r=l(async(t,s,o)=>{if(!e.active||t.startsWith("node:"))return o(t,s);let a=E(t)??(s.parentURL&&E(s.parentURL));if(e.namespace){let d;if(t.startsWith(A)){try{d=JSON.parse(t.slice(A.length))}catch{}d?.namespace&&(a=d.namespace)}if(e.namespace!==a)return o(t,s);d&&(t=d.specifier,s.parentURL=d.parentURL)}const[m,c]=t.split("?"),i=await Oe(m,s,o,e);if(n.logEsm(2,"nextResolve",{resolved:i}),i.format==="builtin")return i;(!i.format||i.format==="commonjs-typescript"||i.format==="module-typescript")&&i.url.startsWith(n.fileUrlPrefix)&&(i.format=await Se(i.url),n.logEsm(2,"getFormatFromFileUrl",{resolved:i,format:i.format})),c&&(i.url+=`?${c}`);const u=s.parentURL&&i.format==="commonjs"&&n.implicitTsExtensionsPattern.test(i.url)&&(s.parentURL.includes(K)||Le(s.parentURL,t,We));return a&&!i.url.includes(U)&&(i.url=G(i.url,`${U}${a}`)),u&&(i.url=G(i.url,K)),(a||u)&&(i.url=le(i.url,i.format,a)),i},"resolve2");return n.debugEnabled?async(t,s,o)=>{n.logEsm(2,"resolve",{specifier:t,context:s});const a=await r(t,s,o);return n.logEsm(1,"resolved",{specifier:t,context:s,result:a}),a}:r},"createResolve"),Ae=l(e=>{const r=l((t,s,o)=>{if(!e.active||t.startsWith("node:")||ae(s)&&n.isGlobalCjsLoaderActive())return o(t,s);let a=E(t)??(s.parentURL&&E(s.parentURL));if(e.namespace){let u;if(t.startsWith(A)){try{u=JSON.parse(t.slice(A.length))}catch{}u?.namespace&&(a=u.namespace)}if(e.namespace!==a)return o(t,s);u&&(t=u.specifier,s.parentURL=u.parentURL)}const[m,c]=t.split("?"),i=qe(m,s,o,e);return n.logEsm(2,"nextResolve",{resolved:i}),i.format==="builtin"||((!i.format||i.format==="commonjs-typescript"||i.format==="module-typescript")&&i.url.startsWith(n.fileUrlPrefix)&&(i.format=Ee(i.url),n.logEsm(2,"getFormatFromFileUrlSync",{resolved:i,format:i.format})),c&&(i.url+=`?${c}`),a&&!i.url.includes(U)&&(i.url=G(i.url,`${U}${a}`)),i.url=le(i.url,i.format,a)),i},"resolve2");return n.debugEnabled?(t,s,o)=>{n.logEsm(2,"resolveSync",{specifier:t,context:s});const a=r(t,s,o);return n.logEsm(1,"resolvedSync",{specifier:t,context:s,result:a}),a}:r},"createResolveSync"),Be=Ne(F),me=l(e=>(r,t)=>{if(!t)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");const s=t.startsWith(n.fileUrlPrefix)?t:g.pathToFileURL(t).toString();return import(`tsx://${JSON.stringify({specifier:r,parentURL:s,namespace:e})}`)},"createScopedImport");let de=!1;const Qe=l(e=>{const r=[];for(let t=0;t[...(process.env.NODE_OPTIONS??"").matchAll(/(?:^|\s)--import(?:=|\s+)(\S+)/g)].map(([,e])=>e),"collectNodeOptionsImportSpecifiers"),ue=[new URL("loader.mjs",typeof document>"u"?require("url").pathToFileURL(__filename).href:L&&L.src||new URL("register-CKju0f8h.cjs",document.baseURI).href).toString(),new URL("esm/index.mjs",typeof document>"u"?require("url").pathToFileURL(__filename).href:L&&L.src||new URL("register-CKju0f8h.cjs",document.baseURI).href).toString()],xe=new Set(["tsx","tsx/esm",...ue,...ue.map(e=>decodeURI(new URL(e).pathname))]),Ge=l(e=>xe.has(e),"isTsxImport"),fe=l(e=>/\.(?:[cm]?ts|tsx)(?:[?#].*)?$/.test(e),"isTypeScriptImport"),ze=l(()=>{const e=Qe(process.execArgv),r=e.findIndex(Ge);return r>0&&e.slice(0,r).some(fe)},"hasCliTypeScriptPreload"),Xe=He().some(fe)||ze(),pe=typeof T.registerHooks=="function"&&y.isFeatureSupported(y.moduleRegisterHooksCjsReload)&&!Xe,De=l(e=>{if(!T.register&&!pe)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(!de){const{_resolveFilename:c}=T;T._resolveFilename=(i,...u)=>c(n.interopCjsExports(i),...u),de=!0}const{sourceMapsEnabled:r}=process;if(process.setSourceMapsEnabled(!0),pe){const c=V({namespace:e?.namespace,onImport:e?.onImport,tsconfig:e?.tsconfig}),i=T.registerHooks({load:be(c),resolve:Ae(c)}),u=l(async()=>{c.active=!1,i.deregister(),r===!1&&process.setSourceMapsEnabled(!1)},"unregister2");return e?.namespace&&(u.import=me(e.namespace),u.unregister=u),u}const{port1:t,port2:s}=new he.MessageChannel;T.register(`./esm/index.mjs?${Date.now()}`,{parentURL:typeof document>"u"?require("url").pathToFileURL(__filename).href:L&&L.src||new URL("register-CKju0f8h.cjs",document.baseURI).href,data:{port:s,namespace:e?.namespace,tsconfig:e?.tsconfig},transferList:[s]});const o=e?.onImport,a=o&&(c=>{c.type==="load"&&o(c.url)});a&&(t.on("message",a),t.unref());const m=l(()=>(r===!1&&process.setSourceMapsEnabled(!1),a&&t.off("message",a),t.postMessage("deactivate"),new Promise(c=>{const i=l(u=>{u.type==="deactivated"&&(c(),t.off("message",i))},"onDeactivated");t.on("message",i)})),"unregister");return e?.namespace&&(m.import=me(e.namespace),m.unregister=m),m},"register");exports.globalPreload=Ue,exports.initialize=Re,exports.load=$e,exports.register=De,exports.resolve=Be;