Innovenergy_trunk/frontend/node_modules/@babel/plugin-transform-runtime/lib/index.js.map

1 line
18 KiB
Plaintext
Raw Normal View History

{"version":3,"names":["pluginCorejs2","_pluginCorejs2","default","pluginCorejs3","_pluginCorejs3","pluginRegenerator","_pluginRegenerator","pluginsCompat","supportsStaticESM","caller","declare","api","options","dirname","assertVersion","corejs","helpers","useRuntimeHelpers","regenerator","useRuntimeRegenerator","useESModules","version","runtimeVersion","absoluteRuntime","proposals","rawVersion","Boolean","corejsVersion","Number","includes","Error","JSON","stringify","DUAL_MODE_RUNTIME","supportsCJSDefault","hasMinVersion","has","obj","key","Object","prototype","hasOwnProperty","call","esModules","injectCoreJS2","injectCoreJS3","moduleName","HEADER_HELPERS","modulePath","getRuntimePath","createCorejsPlugin","plugin","regeneratorPlugin","_","filename","inherits","createRegeneratorPlugin","undefined","name","method","absoluteImports","useBabelRuntime","ext","pre","file","set","availableHelper","t","arrowFunctionExpression","identifier","isInteropHelper","indexOf","blockHoist","isModule","path","helpersDir","node","sourceType","helperPath","resolveFSPath","addDefaultImport","cache","Map","source","nameHint","isHelper","cacheKey","cached","get","cloneNode","addDefault","importedInterop"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { addDefault, isModule } from \"@babel/helper-module-imports\";\nimport { types as t } from \"@babel/core\";\n\nimport { hasMinVersion } from \"./helpers\";\nimport getRuntimePath, { resolveFSPath } from \"./get-runtime-path\";\nimport type { PluginAPI, PluginObject, CallerMetadata } from \"@babel/core\";\n\nimport _pluginCorejs2 from \"babel-plugin-polyfill-corejs2\";\nimport _pluginCorejs3 from \"babel-plugin-polyfill-corejs3\";\nimport _pluginRegenerator from \"babel-plugin-polyfill-regenerator\";\nconst pluginCorejs2 = (_pluginCorejs2.default ||\n _pluginCorejs2) as typeof _pluginCorejs2.default;\nconst pluginCorejs3 = (_pluginCorejs3.default ||\n _pluginCorejs3) as typeof _pluginCorejs3.default;\nconst pluginRegenerator = (_pluginRegenerator.default ||\n _pluginRegenerator) as typeof _pluginRegenerator.default;\n\nconst pluginsCompat = \"#__secret_key__@babel/runtime__compatibility\";\n\nfunction supportsStaticESM(caller: CallerMetadata | undefined) {\n // @ts-expect-error TS does not narrow down optional chaining\n return !!caller?.supportsStaticESM;\n}\n\nexport interface Options {\n absoluteRuntime?: boolean;\n corejs?: string | number | { version: string | number; proposals?: boolean };\n helpers?: boolean;\n regenerator?: boolean;\n useESModules?: boolean | \"auto\";\n version?: string;\n}\n\ninterface CoreJS2PluginOptions {\n absoluteImports: string | false;\n method: \"usage-pure\";\n [pluginsCompat]: {\n runtimeVersion: string;\n useBabelRuntime: string | false;\n ext: string;\n };\n}\n\ninterface RegeneratorPluginOptions {\n absoluteImports: string | false;\n method: \"usage-pure\";\n [pluginsCompat]: {\n useBabelRuntime: string | false;\n };\n}\n\ninterface CoreJS3PluginOptions {\n absoluteImports: string | false;\n method: \"usage-pure\";\n proposals: boolean;\n version: number;\n [pluginsCompat]: {\n useBabelRuntime: string | false;\n ext: string;\n };\n}\n\nexport default declare((api, options: Options, dirname) => {\n api.assertVersion(7);\n\n const {\n corejs,\n helpers: useRuntimeHelpers = true,\n regenerator: useRuntimeRegenerator = true,\n useESModules = false,\n version: runtimeVersion = \"7.0.0-beta.0\",\n absoluteRuntime = false,\n } = options;\n\n let proposals = false;\n let rawVersion;\n\n if (typeof corejs === \"object\" && corejs !== null) {\n rawVersion = corejs.version;\n proposals = Boolean(corejs.proposals);\n } else {\n rawVersion = corejs;\n }\n\n const corejsVersion = rawVersion ? Number(rawVersion) : false;\n\n if (![false, 2, 3].includes(corejsVersion)) {\n throw new Error(\n `The \\`core-js\\` version must be false, 2 or 3, but got ${JSON.stringify(\n rawVersion,\n )}.`,\n );\n }\n\n if