"use strict";var o=require("../../register-DUq1clC8.cjs"),i=require("node:url");require("node:module"),require("node:worker_threads");const c=(s,r,t)=>{const n=r.startsWith("file://")?r:i.pathToFileURL(r),e=new URL(s,n);return e.searchParams.set("tsx-namespace",t),e.toString()},p=(s,r)=>{if(!r||typeof r=="object"&&!r.parentURL)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");const t=typeof r=="string",n=t?r:r.parentURL,e=Date.now().toString(),a=c(s,n,e);return o.register({namespace:e,onImport:t?void 0:r.onImport}),import(a)};exports.register=o.register,exports.tsImport=p;
