"use strict";var m=Object.defineProperty;var s=(r,e)=>m(r,"name",{value:e,configurable:!0});var a=require("../../register-CHVGxKtC.cjs");require("../../get-pipe-path-D4YM6rQt.cjs");var t=require("../../register-BOkp8V6j.cjs");require("../../require-CjvaJWEr.cjs");var n=require("../../node-features-CQLdkVE6.cjs");require("node:module"),require("node:worker_threads"),require("node:url"),require("node:fs"),require("node:fs/promises"),require("../../index-D9F1FXzN.cjs"),require("node:path"),require("esbuild"),require("node:crypto"),require("node:os"),require("../../temporary-directory-B83uKxJF.cjs"),require("../../client-D3mGB526.cjs"),require("node:net"),require("module"),require("fs"),require("os"),require("path"),require("node:util"),require("../../index-BWFBUo6r.cjs");const c=s((r,e)=>{if(!e||typeof e=="object"&&!e.parentURL)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");const i=typeof e=="string",u=i?e:e.parentURL,q=Date.now().toString(),o=t.register({namespace:q});return!n.isFeatureSupported(n.esmLoadReadFile)&&!t.isBarePackageNamePattern.test(r)&&t.cjsExtensionPattern.test(r)?Promise.resolve(o.require(r,u)):a.register({namespace:q,...i?{}:e}).import(r,u)},"tsImport");exports.register=a.register,exports.tsImport=c;
