/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@tsyeyuanfeng/metro-bundler@0.20.9/src/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var _extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e};const Config=require("./Config"),Logger=require("./Logger"),TransformCaching=require("./lib/TransformCaching"),blacklist=require("./blacklist"),debug=require("debug"),invariant=require("fbjs/lib/invariant");var _require=require("./Bundler/source-map");const fromRawMappings=_require.fromRawMappings,compactMapping=_require.compactMapping;function assertPublicBundleOptions(e){invariant("object"==typeof e&&null!=e,"bundle options must be an object"),invariant(void 0===e.dev||"boolean"==typeof e.dev,"bundle options field `dev` must be a boolean");const r=e.entryFile;return invariant("string"==typeof r,"bundle options must contain a string field `entryFile`"),invariant(void 0===e.generateSourceMaps||"boolean"==typeof e.generateSourceMaps,"bundle options field `generateSourceMaps` must be a boolean"),invariant(void 0===e.inlineSourceMap||"boolean"==typeof e.inlineSourceMap,"bundle options field `inlineSourceMap` must be a boolean"),invariant(void 0===e.minify||"boolean"==typeof e.minify,"bundle options field `minify` must be a boolean"),invariant(void 0===e.platform||"string"==typeof e.platform,"bundle options field `platform` must be a string"),invariant(void 0===e.runModule||"boolean"==typeof e.runModule,"bundle options field `runModule` must be a boolean"),invariant(void 0===e.sourceMapUrl||"string"==typeof e.sourceMapUrl,"bundle options field `sourceMapUrl` must be a boolean"),_extends({entryFile:r},e)}function enableDebug(){var e="Metro:*",r=debug.load();r&&(e+=","+r),debug.enable(e)}function createServer(e){e.verbose&&enableDebug(),invariant(null!=e.assetRegistryPath,"createServer() requires assetRegistryPath");return new(require("./Server"))(toServerOptions(e))}function createNonPersistentServer(e){return createServer(e)}function toServerOptions(e){return{assetExts:e.assetExts,assetRegistryPath:e.assetRegistryPath,blacklistRE:e.blacklistRE,cacheVersion:e.cacheVersion,enableBabelRCLookup:e.enableBabelRCLookup,extraNodeModules:e.extraNodeModules,getPolyfills:e.getPolyfills,getTransformOptions:e.getTransformOptions,globalTransformCache:e.globalTransformCache,hasteImpl:e.hasteImpl,maxWorkers:e.maxWorkers,moduleFormat:e.moduleFormat,platforms:e.platforms,polyfillModuleNames:e.polyfillModuleNames,postProcessModules:e.postProcessModules,postMinifyProcess:e.postMinifyProcess,postProcessBundleSourcemap:e.postProcessBundleSourcemap,projectRoots:e.projectRoots,providesModuleNodeModules:e.providesModuleNodeModules,reporter:e.reporter,resetCache:e.resetCache,runBeforeMainModule:e.runBeforeMainModule,silent:e.silent,sourceExts:e.sourceExts,transformCache:e.transformCache||TransformCaching.useTempDir(),transformModulePath:e.transformModulePath,useDeltaBundler:e.useDeltaBundler,watch:"boolean"==typeof e.watch?e.watch:!!e.nonPersistent,workerPath:e.workerPath}}exports.createBlacklist=blacklist,exports.sourceMaps={fromRawMappings:fromRawMappings,compactMapping:compactMapping},exports.createServer=createServer,exports.Config=Config,exports.Logger=Logger,exports.TransformCaching=TransformCaching,exports.buildBundle=function(e,r){var o=createNonPersistentServer(e);const t=require("./Server");return o.buildBundle(_extends({},t.DEFAULT_BUNDLE_OPTIONS,assertPublicBundleOptions(r))).then((e=>(o.end(),e)))},exports.getOrderedDependencyPaths=function(e,r){var o=createNonPersistentServer(e);return o.getOrderedDependencyPaths(r).then((function(e){return o.end(),e}))};
//# sourceMappingURL=/sm/04ce74c59a467cd38f3b218064d7157bddae8a96019d8936cf4575478bf76ae3.map