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AAQ,iBAAmB,iBAC3B,QAAQ,qBAAuB,qBAC/B,QAAQ,kBAAoB","file":"/npm/module-from-string@3.3.1/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/module-from-string@3.3.1/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: \"Module\" } });\nconst module$1 = require(\"module\");\nconst vm = require(\"vm\");\nconst nanoid = require(\"nanoid\");\nconst path = require(\"path\");\nconst url = require(\"url\");\nconst esbuild = require(\"esbuild\");\nconst async = require(\"nanoid/async\");\nconst _interopDefaultLegacy = (e) => e && typeof e === \"object\" && \"default\" in e ? e : { default: e };\nconst vm__default = /* @__PURE__ */ _interopDefaultLegacy(vm);\nconst isInESModuleScope = () => {\n  try {\n    return module === void 0;\n  } catch {\n    return true;\n  }\n};\nconst isVMModuleAvailable = () => vm__default.default.Module !== void 0;\nconst FILE_URL_PROTOCOL = \"file:\";\nconst isFileURL = (value) => value.startsWith(FILE_URL_PROTOCOL);\nconst ensureFileURL = (value) => isFileURL(value) ? value : url.pathToFileURL(value).toString();\nconst ensurePath = (value) => isFileURL(value) ? url.fileURLToPath(value) : value;\nconst internalFunctionNames = [\n  \"getCallerDirname\",\n  \"requireFromString\",\n  \"importFromStringSync\",\n  \"importFromString\",\n  \"processTicksAndRejections\"\n];\nconst getCallerDirname = () => {\n  var _a;\n  const __prepareStackTrace = Error.prepareStackTrace;\n  Error.prepareStackTrace = (_err, stackTraces) => stackTraces;\n  const callSites = new Error().stack.filter((callSite) => {\n    const functionName = callSite.getFunctionName();\n    return functionName === null || !internalFunctionNames.includes(functionName);\n  });\n  Error.prepareStackTrace = __prepareStackTrace;\n  const caller = callSites[0];\n  const callerFilename = (_a = caller.getFileName()) != null ? _a : process.argv[1];\n  return path.dirname(ensurePath(callerFilename));\n};\nconst ensureTrailingSeparator = (dirname2) => {\n  const separator = isFileURL(dirname2) ? \"/\" : path.sep;\n  return dirname2.endsWith(separator) ? dirname2 : `${dirname2}${separator}`;\n};\nconst getModuleFilename = (dirname2, filename) => {\n  if (isInESModuleScope()) {\n    if (isFileURL(filename)) {\n      return filename;\n    } else {\n      const validatedDirname = ensureTrailingSeparator(dirname2);\n      return new url.URL(filename, ensureFileURL(validatedDirname)).toString();\n    }\n  } else {\n    return path.resolve(ensurePath(dirname2), ensurePath(filename));\n  }\n};\nconst forEachPropertyKey = (context, callbackfn) => {\n  Object.getOwnPropertyNames(context).forEach(callbackfn);\n  Object.getOwnPropertySymbols(context).forEach(callbackfn);\n};\nconst shallowMergeContext = (target, source) => {\n  forEachPropertyKey(source, (propertyKey) => {\n    Object.defineProperty(target, propertyKey, {\n      ...Object.getOwnPropertyDescriptor(source, propertyKey)\n    });\n  });\n  return target;\n};\nconst __GLOBAL__ = global;\nconst getCurrentGlobal = () => {\n  const currentGlobal = shallowMergeContext({}, __GLOBAL__);\n  delete currentGlobal.global;\n  delete currentGlobal.globalThis;\n  return currentGlobal;\n};\nconst createGlobalObject = (globals, useCurrentGlobal) => {\n  const globalObject = useCurrentGlobal ? getCurrentGlobal() : Object.defineProperty({}, Symbol.toStringTag, {\n    ...Object.getOwnPropertyDescriptor(__GLOBAL__, Symbol.toStringTag)\n  });\n  forEachPropertyKey(globals, (propertyKey) => {\n    if (propertyKey in __GLOBAL__) {\n      Object.defineProperty(globalObject, propertyKey, {\n        ...Object.getOwnPropertyDescriptor(__GLOBAL__, propertyKey),\n        value: globals[propertyKey]\n      });\n    } else {\n      Object.defineProperty(globalObject, propertyKey, {\n        ...Object.getOwnPropertyDescriptor(globals, propertyKey)\n      });\n    }\n  });\n  return globalObject;\n};\nconst createContextObject = (moduleContext, globalObject) => {\n  const contextObject = shallowMergeContext(moduleContext, globalObject);\n  if (!(\"global\" in contextObject)) {\n    contextObject.global = contextObject;\n  }\n  return contextObject;\n};\nconst resolveModuleSpecifier = (specifier, dirname2) => {\n  if (isFileURL(specifier)) {\n    return specifier;\n  }\n  return specifier.startsWith(\".\") || path.isAbsolute(specifier) ? path.resolve(ensurePath(dirname2), specifier) : specifier;\n};\nconst requireFromString = (code, {\n  filename = `${nanoid.nanoid()}.js`,\n  dirname = getCallerDirname(),\n  globals = {},\n  useCurrentGlobal = false\n} = {}) => {\n  var _a;\n  const moduleFilename = ensurePath(getModuleFilename(dirname, filename));\n  const mainModule = isInESModuleScope() ? void 0 : require.main;\n  const contextModule = new module$1.Module(moduleFilename, mainModule);\n  contextModule.require = module$1.createRequire(moduleFilename);\n  contextModule.filename = moduleFilename;\n  contextModule.paths = (_a = mainModule == null ? void 0 : mainModule.paths) != null ? _a : [];\n  const globalObject = createGlobalObject(globals, useCurrentGlobal);\n  const contextObject = createContextObject(\n    {\n      exports: contextModule.exports,\n      require: contextModule.require,\n      module: contextModule,\n      __filename: contextModule.filename,\n      __dirname: contextModule.path\n    },\n    globalObject\n  );\n  vm.runInNewContext(code, contextObject, {\n    filename: moduleFilename,\n    // @ts-expect-error: experimental\n    async importModuleDynamically(specifier) {\n      return await import(resolveModuleSpecifier(specifier, contextModule.path));\n    }\n  });\n  contextModule.loaded = true;\n  return contextModule.exports;\n};\nconst createRequireFromString = (options) => (code, additionalOptions) => requireFromString(code, {\n  ...options,\n  ...additionalOptions\n});\nconst USE_STRICT = '\"use strict\";';\nconst IMPORT_META_URL_SHIM = 'var import_meta_url = require(\"url\").pathToFileURL(__filename).toString();';\nconst IMPORT_META_RESOLVE_SHIM = `function import_meta_resolve() {\n  throw new Error(\n    \\`'import.meta.resolve' is not supported\nUse asynchronous function 'importFromString' and enable '--experimental-vm-modules' CLI option.\nOr use 'transformOptions' to include a polyfill. See https://github.com/evanw/esbuild/issues/1492#issuecomment-893144483 as an example.\\`\n  );\n}`;\nconst getCommonJS = (transformOptions) => {\n  var _a;\n  return {\n    ...transformOptions,\n    banner: `${USE_STRICT}\n${IMPORT_META_URL_SHIM}\n${IMPORT_META_RESOLVE_SHIM}\n${(_a = transformOptions == null ? void 0 : transformOptions.banner) != null ? _a : \"\"}`,\n    define: {\n      \"import.meta.url\": \"import_meta_url\",\n      \"import.meta.resolve\": \"import_meta_resolve\",\n      ...transformOptions == null ? void 0 : transformOptions.define\n    },\n    format: \"cjs\"\n  };\n};\nconst ERR_REQUIRE_ESM = \"ERR_REQUIRE_ESM\";\nconst IMPORTS = \"__INTERNAL_IMPORTS_FROM_STRING\";\nconst importFromString = async (code, { transformOptions, ...options } = {}) => {\n  if (!isVMModuleAvailable()) {\n    const { code: transformedCode2 } = await esbuild.transform(code, getCommonJS(transformOptions));\n    try {\n      return requireFromString(transformedCode2, options);\n    } catch (error) {\n      if (error != null && error.code === ERR_REQUIRE_ESM) {\n        throw new Error(\n          `'import' statement of ES modules is not supported\nEnable '--experimental-vm-modules' CLI option or replace it with dynamic 'import()' expression.`\n        );\n      }\n      throw error;\n    }\n  }\n  let transformedCode;\n  if (transformOptions !== void 0) {\n    ({ code: transformedCode } = await esbuild.transform(code, {\n      format: \"esm\",\n      ...transformOptions\n    }));\n  }\n  const {\n    filename = `${await async.nanoid()}.js`,\n    dirname = getCallerDirname(),\n    globals = {},\n    useCurrentGlobal = false\n  } = options;\n  const moduleFilename = getModuleFilename(dirname, filename);\n  const moduleFileURLString = ensureFileURL(moduleFilename);\n  const globalObject = createGlobalObject(globals, useCurrentGlobal);\n  const contextObject = createContextObject(\n    {\n      __dirname: ensurePath(dirname),\n      __filename: ensurePath(moduleFilename)\n    },\n    globalObject\n  );\n  contextObject[IMPORTS] = {};\n  const context = vm.createContext(contextObject);\n  const vmModule = new vm__default.default.SourceTextModule(transformedCode != null ? transformedCode : code, {\n    identifier: moduleFileURLString,\n    context,\n    initializeImportMeta(meta) {\n      meta.url = moduleFileURLString;\n    },\n    // @ts-expect-error: wrong type definition\n    async importModuleDynamically(specifier) {\n      return await import(resolveModuleSpecifier(specifier, dirname));\n    }\n  });\n  const linker = async (specifier) => {\n    const resolvedSpecifier = resolveModuleSpecifier(specifier, dirname);\n    const targetModule = await import(resolvedSpecifier);\n    context[IMPORTS][specifier] = targetModule;\n    const stringifiedSpecifier = JSON.stringify(specifier);\n    const exportedNames = Object.keys(targetModule);\n    const targetModuleContent = `${exportedNames.includes(\"default\") ? `export default ${IMPORTS}[${stringifiedSpecifier}].default;\n` : \"\"}export const { ${exportedNames.filter((exportedName) => exportedName !== \"default\").join(\", \")} } = ${IMPORTS}[${stringifiedSpecifier}];`;\n    return new vm__default.default.SourceTextModule(targetModuleContent, {\n      identifier: resolvedSpecifier,\n      context\n    });\n  };\n  await vmModule.link(linker);\n  await vmModule.evaluate();\n  return vmModule.namespace;\n};\nconst createImportFromString = (options) => async (code, additionalOptions) => await importFromString(code, {\n  ...options,\n  ...additionalOptions\n});\nconst importFromStringSync = (code, { transformOptions, ...options } = {}) => {\n  const { code: transformedCode } = esbuild.transformSync(code, getCommonJS(transformOptions));\n  try {\n    return requireFromString(transformedCode, options);\n  } catch (error) {\n    if (error != null && error.code === ERR_REQUIRE_ESM) {\n      throw new Error(\n        `'import' statement of ES modules is not supported\nUse asynchronous function 'importFromString' instead or replace it with dynamic 'import()' expression.`\n      );\n    }\n    throw error;\n  }\n};\nconst createImportFromStringSync = (options) => (code, additionalOptions) => importFromStringSync(code, {\n  ...options,\n  ...additionalOptions\n});\nexports.createImportFromString = createImportFromString;\nexports.createImportFromStringSync = createImportFromStringSync;\nexports.createRequireFromString = createRequireFromString;\nexports.importFromString = importFromString;\nexports.importFromStringSync = importFromStringSync;\nexports.requireFromString = requireFromString;\n"]}