signalk-backup 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +7 -5
- package/public/assets/AppPanel-DIJpLQjX.js +3 -0
- package/public/assets/AppPanel-DIJpLQjX.js.map +1 -0
- package/public/assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_mf_2_backup__mf_owner__1-Du7wMbis.js +1 -0
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__mf_owner__1__loadShare__react__loadShare__.js-h6Wc3FqT.js +1 -0
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-BVtcTS_R.js +2 -0
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-BVtcTS_R.js.map +1 -0
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-DXBr3ZZh.js +1 -0
- package/public/assets/dist-DWxKLhdH.js +5 -0
- package/public/assets/dist-DWxKLhdH.js.map +1 -0
- package/public/assets/hostInit-kjS4q64P.js +1 -0
- package/public/assets/jsx-dev-runtime-DqDQgAbA.js +2 -0
- package/public/assets/jsx-dev-runtime-DqDQgAbA.js.map +1 -0
- package/public/assets/remote-BW4TuO4P.js +2 -0
- package/public/assets/remote-BW4TuO4P.js.map +1 -0
- package/public/assets/remote-BvRk9kiK.js +0 -0
- package/public/assets/{rolldown-runtime-Bh1tDfsg.js → rolldown-runtime-CbXtAM7H.js} +1 -1
- package/public/assets/virtualExposes-vcMKMvCt.js +2 -0
- package/public/assets/virtualExposes-vcMKMvCt.js.map +1 -0
- package/public/assets/vite-preload-helper-Fl0ucuR7.js +1 -0
- package/public/index.html +12 -14
- package/public/remoteEntry.js +1 -1
- package/public/remoteEntry.js.map +1 -1
- package/public/assets/App-jHrc2yzu.js +0 -3
- package/public/assets/App-jHrc2yzu.js.map +0 -1
- package/public/assets/AppPanel-D0iGGeiX.js +0 -2
- package/public/assets/AppPanel-D0iGGeiX.js.map +0 -1
- package/public/assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_mf_2_backup-B9dkCYcU.js +0 -1
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__loadShare__react__loadShare__.mjs-CRDWkJnD.js +0 -1
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__loadShare__react_mf_1_jsx_mf_2_dev_mf_2_runtime__loadShare__-CZEusA_v.js +0 -1
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__loadShare__react_mf_1_jsx_mf_2_dev_mf_2_runtime__loadShare__.mjs-C5oceaDt.js +0 -2
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__loadShare__react_mf_1_jsx_mf_2_dev_mf_2_runtime__loadShare__.mjs-C5oceaDt.js.map +0 -1
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__-Dh2Je4Q8.js +0 -1
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-BJsP72ov.js +0 -2
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-BJsP72ov.js.map +0 -1
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__loadShare__react_mf_2_dom__loadShare__.mjs-COVU9tAo.js +0 -1
- package/public/assets/_virtual_mf___mfe_internal__signalk_mf_2_backup__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-F9Hr43sq.js +0 -1
- package/public/assets/dist-Cr3RQpe1.js +0 -5
- package/public/assets/dist-Cr3RQpe1.js.map +0 -1
- package/public/assets/hostInit-CBfbRWDG.js +0 -1
- package/public/assets/index-BvOjez90.js +0 -2
- package/public/assets/index-BvOjez90.js.map +0 -1
- package/public/assets/jsx-dev-runtime-BvApC5zd.js +0 -1
- package/public/assets/jsx-runtime-4HRoLdzw.js +0 -1
- package/public/assets/main-BZOfKcLT.js +0 -2
- package/public/assets/main-BZOfKcLT.js.map +0 -1
- package/public/assets/preload-helper-DCSm9-xi.js +0 -1
- package/public/assets/virtualExposes-E_ORVUj7.js +0 -2
- package/public/assets/virtualExposes-E_ORVUj7.js.map +0 -1
- package/public/mf-entry-bootstrap-0.js +0 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"sDAGA,IAAM,EAAkB,mBAClB,EAAsB,CAC3B,GAAI,IACJ,OAAQ,IACR,MAAO,GACR,EACM,EAAmB,EACvB,EAAoB,IAAK,UACzB,EAAoB,QAAS,KAC7B,EAAoB,OAAQ,IAC9B,EAEE,EAAiB,EAAoB,IAAM,EAAoB,GAC/D,EAAiB,EAAoB,QAAU,EAAoB,OACnE,EAAiB,EAAoB,OAAS,EAAoB,MAYpE,IAAI,EAAoC,SAAS,EAAmB,CAanE,MATA,GAAkB,EAAkB,QAAa,GAAK,UAItD,EAAkB,EAAkB,WAAgB,GAAK,aAIzD,EAAkB,EAAkB,OAAY,GAAK,SAC9C,CACR,EAAE,CAAC,CAAC,ECvCJ,SAAS,GAAe,CACvB,QACD,CACA,SAAS,GAAmB,CAC3B,OAAO,OAAO,UAAc,KAAe,WAAW,UAAY,aACnE,CACA,SAAS,GAAiB,CACzB,GAAI,CACH,GAAI,EAAa,GAAK,OAAO,aAAc,MAAO,EAAQ,aAAa,QAAQ,CAAe,CAC/F,MAAgB,CACf,MAAO,EACR,CACA,MAAO,EACR,CACA,SAAS,GAAc,CAGtB,OAFI,OAAO,QAAY,QAA0C,iBAA4B,KAAoB,iBAC7G,OAAO,iBAAqB,KAAuB,iBAA0B,GAC1E,EAAe,CACvB,CClBA,IAAMA,EAAe,yBAiCf,EAA0B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,GAA4B,EAAQ,KAAM,EAAQ,OAAO,EACpE,EAAoB,CACzB,GAAG,EACH,GAAI,EAAQ,IAAM,EACnB,EAGC,OAFI,GAIJ,EAAS,YAAY,CAAiB,EACtC,EAAyB,GAAqB,EACvC,IALP,GAAqB,GAAe,CAAiB,EAC9C,GAMT,CAiCA,GAA+B,EAAgB","names":["LOG_CATEGORY","getBuilderId"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"sources":["../../node_modules/@module-federation/sdk/dist/constant.js","../../node_modules/@module-federation/sdk/dist/env.js","../../node_modules/@module-federation/sdk/dist/utils.js","../../node_modules/@module-federation/sdk/dist/generateSnapshotFromManifest.js","../../node_modules/@module-federation/sdk/dist/logger.js","../../node_modules/@module-federation/sdk/dist/dom.js","../../node_modules/@module-federation/error-codes/dist/getShortErrorMsg.mjs","../../node_modules/@module-federation/error-codes/dist/browser.mjs","../../node_modules/@module-federation/runtime-core/dist/utils/logger.js","../../node_modules/@module-federation/runtime-core/dist/utils/tool.js","../../node_modules/@module-federation/runtime-core/dist/global.js","../../node_modules/@module-federation/runtime-core/dist/utils/semver/constants.js","../../node_modules/@module-federation/runtime-core/dist/utils/semver/utils.js","../../node_modules/@module-federation/runtime-core/dist/utils/semver/parser.js","../../node_modules/@module-federation/runtime-core/dist/utils/semver/compare.js","../../node_modules/@module-federation/runtime-core/dist/utils/semver/index.js","../../node_modules/@module-federation/runtime-core/dist/constant.js","../../node_modules/@module-federation/runtime-core/dist/utils/share.js","../../node_modules/@module-federation/runtime-core/dist/utils/manifest.js","../../node_modules/@module-federation/error-codes/dist/error-codes.mjs","../../node_modules/@module-federation/error-codes/dist/desc.mjs","../../node_modules/@module-federation/runtime-core/dist/utils/load.js","../../node_modules/@module-federation/runtime-core/dist/utils/env.js","../../node_modules/@module-federation/runtime-core/dist/utils/plugin.js","../../node_modules/@module-federation/runtime-core/dist/utils/context.js","../../node_modules/@module-federation/runtime-core/dist/utils/preload.js","../../node_modules/@module-federation/runtime-core/dist/helpers.js","../../node_modules/@module-federation/runtime-core/dist/module/index.js","../../node_modules/@module-federation/runtime-core/dist/utils/hooks/pluginSystem.js","../../node_modules/@module-federation/runtime-core/dist/utils/hooks/syncHook.js","../../node_modules/@module-federation/runtime-core/dist/utils/hooks/asyncHook.js","../../node_modules/@module-federation/runtime-core/dist/utils/hooks/syncWaterfallHook.js","../../node_modules/@module-federation/runtime-core/dist/utils/hooks/asyncWaterfallHooks.js","../../node_modules/@module-federation/runtime-core/dist/remote/disabled.js","../../node_modules/@module-federation/runtime-core/dist/plugins/snapshot/index.js","../../node_modules/@module-federation/runtime-core/dist/plugins/generate-preload-assets.js","../../node_modules/@module-federation/runtime-core/dist/plugins/snapshot/SnapshotHandler.js","../../node_modules/@module-federation/runtime-core/dist/plugins/snapshot/disabled.js","../../node_modules/@module-federation/runtime-core/dist/shared/index.js","../../node_modules/@module-federation/runtime-core/dist/shared/disabled.js","../../node_modules/@module-federation/runtime-core/dist/remote/index.js","../../node_modules/@module-federation/runtime-core/dist/core.js","../../node_modules/@module-federation/runtime-core/dist/index.js","../../node_modules/@module-federation/runtime/dist/utils.js","../../node_modules/@module-federation/runtime/dist/index.js"],"sourcesContent":["//#region src/constant.ts\nconst FederationModuleManifest = \"federation-manifest.json\";\nconst MANIFEST_EXT = \".json\";\nconst BROWSER_LOG_KEY = \"FEDERATION_DEBUG\";\nconst NameTransformSymbol = {\n\tAT: \"@\",\n\tHYPHEN: \"-\",\n\tSLASH: \"/\"\n};\nconst NameTransformMap = {\n\t[NameTransformSymbol.AT]: \"scope_\",\n\t[NameTransformSymbol.HYPHEN]: \"_\",\n\t[NameTransformSymbol.SLASH]: \"__\"\n};\nconst EncodedNameTransformMap = {\n\t[NameTransformMap[NameTransformSymbol.AT]]: NameTransformSymbol.AT,\n\t[NameTransformMap[NameTransformSymbol.HYPHEN]]: NameTransformSymbol.HYPHEN,\n\t[NameTransformMap[NameTransformSymbol.SLASH]]: NameTransformSymbol.SLASH\n};\nconst SEPARATOR = \":\";\nconst ManifestFileName = \"mf-manifest.json\";\nconst StatsFileName = \"mf-stats.json\";\nconst MFModuleType = {\n\tNPM: \"npm\",\n\tAPP: \"app\"\n};\nconst MODULE_DEVTOOL_IDENTIFIER = \"__MF_DEVTOOLS_MODULE_INFO__\";\nconst ENCODE_NAME_PREFIX = \"ENCODE_NAME_PREFIX\";\nconst TEMP_DIR = \".federation\";\nlet TreeShakingStatus = /* @__PURE__ */ function(TreeShakingStatus) {\n\t/**\n\t* Not handled by deploy server, needs to infer by the real runtime period.\n\t*/\n\tTreeShakingStatus[TreeShakingStatus[\"UNKNOWN\"] = 1] = \"UNKNOWN\";\n\t/**\n\t* It means the shared has been calculated , runtime should take this shared as first choice.\n\t*/\n\tTreeShakingStatus[TreeShakingStatus[\"CALCULATED\"] = 2] = \"CALCULATED\";\n\t/**\n\t* It means the shared has been calculated, and marked as no used\n\t*/\n\tTreeShakingStatus[TreeShakingStatus[\"NO_USE\"] = 0] = \"NO_USE\";\n\treturn TreeShakingStatus;\n}({});\n\n//#endregion\nexport { BROWSER_LOG_KEY, ENCODE_NAME_PREFIX, EncodedNameTransformMap, FederationModuleManifest, MANIFEST_EXT, MFModuleType, MODULE_DEVTOOL_IDENTIFIER, ManifestFileName, NameTransformMap, NameTransformSymbol, SEPARATOR, StatsFileName, TEMP_DIR, TreeShakingStatus };\n//# sourceMappingURL=constant.js.map","import { BROWSER_LOG_KEY } from \"./constant.js\";\n\n//#region src/env.ts\nconst isBrowserEnvValue = typeof ENV_TARGET !== \"undefined\" ? ENV_TARGET === \"web\" : typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\nfunction isBrowserEnv() {\n\treturn isBrowserEnvValue;\n}\nfunction isReactNativeEnv() {\n\treturn typeof navigator !== \"undefined\" && navigator?.product === \"ReactNative\";\n}\nfunction isBrowserDebug() {\n\ttry {\n\t\tif (isBrowserEnv() && window.localStorage) return Boolean(localStorage.getItem(BROWSER_LOG_KEY));\n\t} catch (error) {\n\t\treturn false;\n\t}\n\treturn false;\n}\nfunction isDebugMode() {\n\tif (typeof process !== \"undefined\" && process.env && process.env[\"FEDERATION_DEBUG\"]) return Boolean(process.env[\"FEDERATION_DEBUG\"]);\n\tif (typeof FEDERATION_DEBUG !== \"undefined\" && Boolean(FEDERATION_DEBUG)) return true;\n\treturn isBrowserDebug();\n}\nconst getProcessEnv = function() {\n\treturn typeof process !== \"undefined\" && process.env ? process.env : {};\n};\n\n//#endregion\nexport { getProcessEnv, isBrowserEnv, isBrowserEnvValue, isDebugMode, isReactNativeEnv };\n//# sourceMappingURL=env.js.map","import { EncodedNameTransformMap, MANIFEST_EXT, NameTransformMap, NameTransformSymbol, SEPARATOR } from \"./constant.js\";\nimport { getProcessEnv, isBrowserEnv, isReactNativeEnv } from \"./env.js\";\n\n//#region src/utils.ts\nconst LOG_CATEGORY = \"[ Federation Runtime ]\";\nconst parseEntry = (str, devVerOrUrl, separator = SEPARATOR) => {\n\tconst strSplit = str.split(separator);\n\tconst devVersionOrUrl = getProcessEnv()[\"NODE_ENV\"] === \"development\" && devVerOrUrl;\n\tconst defaultVersion = \"*\";\n\tconst isEntry = (s) => s.startsWith(\"http\") || s.includes(MANIFEST_EXT);\n\tif (strSplit.length >= 2) {\n\t\tlet [name, ...versionOrEntryArr] = strSplit;\n\t\tif (str.startsWith(separator)) {\n\t\t\tname = strSplit.slice(0, 2).join(separator);\n\t\t\tversionOrEntryArr = [devVersionOrUrl || strSplit.slice(2).join(separator)];\n\t\t}\n\t\tlet versionOrEntry = devVersionOrUrl || versionOrEntryArr.join(separator);\n\t\tif (isEntry(versionOrEntry)) return {\n\t\t\tname,\n\t\t\tentry: versionOrEntry\n\t\t};\n\t\telse return {\n\t\t\tname,\n\t\t\tversion: versionOrEntry || defaultVersion\n\t\t};\n\t} else if (strSplit.length === 1) {\n\t\tconst [name] = strSplit;\n\t\tif (devVersionOrUrl && isEntry(devVersionOrUrl)) return {\n\t\t\tname,\n\t\t\tentry: devVersionOrUrl\n\t\t};\n\t\treturn {\n\t\t\tname,\n\t\t\tversion: devVersionOrUrl || defaultVersion\n\t\t};\n\t} else throw `Invalid entry value: ${str}`;\n};\nconst composeKeyWithSeparator = function(...args) {\n\tif (!args.length) return \"\";\n\treturn args.reduce((sum, cur) => {\n\t\tif (!cur) return sum;\n\t\tif (!sum) return cur;\n\t\treturn `${sum}${SEPARATOR}${cur}`;\n\t}, \"\");\n};\nconst encodeName = function(name, prefix = \"\", withExt = false) {\n\ttry {\n\t\tconst ext = withExt ? \".js\" : \"\";\n\t\treturn `${prefix}${name.replace(new RegExp(`${NameTransformSymbol.AT}`, \"g\"), NameTransformMap[NameTransformSymbol.AT]).replace(new RegExp(`${NameTransformSymbol.HYPHEN}`, \"g\"), NameTransformMap[NameTransformSymbol.HYPHEN]).replace(new RegExp(`${NameTransformSymbol.SLASH}`, \"g\"), NameTransformMap[NameTransformSymbol.SLASH])}${ext}`;\n\t} catch (err) {\n\t\tthrow err;\n\t}\n};\nconst decodeName = function(name, prefix, withExt) {\n\ttry {\n\t\tlet decodedName = name;\n\t\tif (prefix) {\n\t\t\tif (!decodedName.startsWith(prefix)) return decodedName;\n\t\t\tdecodedName = decodedName.replace(new RegExp(prefix, \"g\"), \"\");\n\t\t}\n\t\tdecodedName = decodedName.replace(new RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`, \"g\"), EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`, \"g\"), EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`, \"g\"), EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]);\n\t\tif (withExt) decodedName = decodedName.replace(\".js\", \"\");\n\t\treturn decodedName;\n\t} catch (err) {\n\t\tthrow err;\n\t}\n};\nconst generateExposeFilename = (exposeName, withExt) => {\n\tif (!exposeName) return \"\";\n\tlet expose = exposeName;\n\tif (expose === \".\") expose = \"default_export\";\n\tif (expose.startsWith(\"./\")) expose = expose.replace(\"./\", \"\");\n\treturn encodeName(expose, \"__federation_expose_\", withExt);\n};\nconst generateShareFilename = (pkgName, withExt) => {\n\tif (!pkgName) return \"\";\n\treturn encodeName(pkgName, \"__federation_shared_\", withExt);\n};\nfunction getResourceUrl(module, sourceUrl) {\n\tif (\"getPublicPath\" in module) {\n\t\tlet publicPath;\n\t\tif (!module.getPublicPath.startsWith(\"function\")) publicPath = new Function(module.getPublicPath)();\n\t\telse publicPath = new Function(\"return \" + module.getPublicPath)()();\n\t\treturn `${publicPath}${sourceUrl}`;\n\t} else if (\"publicPath\" in module) {\n\t\tif (!isBrowserEnv() && !isReactNativeEnv() && \"ssrPublicPath\" in module && typeof module.ssrPublicPath === \"string\") return `${module.ssrPublicPath}${sourceUrl}`;\n\t\treturn `${module.publicPath}${sourceUrl}`;\n\t} else {\n\t\tconsole.warn(\"Cannot get resource URL. If in debug mode, please ignore.\", module, sourceUrl);\n\t\treturn \"\";\n\t}\n}\nconst assert = (condition, msg) => {\n\tif (!condition) error(msg);\n};\nconst error = (msg) => {\n\tthrow new Error(`${LOG_CATEGORY}: ${msg}`);\n};\nconst warn = (msg) => {\n\tconsole.warn(`${LOG_CATEGORY}: ${msg}`);\n};\nfunction safeToString(info) {\n\ttry {\n\t\treturn JSON.stringify(info, null, 2);\n\t} catch (e) {\n\t\treturn \"\";\n\t}\n}\nconst VERSION_PATTERN_REGEXP = /^([\\d^=v<>~]|[*xX]$)/;\nfunction isRequiredVersion(str) {\n\treturn VERSION_PATTERN_REGEXP.test(str);\n}\n\n//#endregion\nexport { assert, composeKeyWithSeparator, decodeName, encodeName, error, generateExposeFilename, generateShareFilename, getResourceUrl, isRequiredVersion, parseEntry, safeToString, warn };\n//# sourceMappingURL=utils.js.map","import { MANIFEST_EXT, ManifestFileName, StatsFileName } from \"./constant.js\";\n\n//#region src/generateSnapshotFromManifest.ts\nconst simpleJoinRemoteEntry = (rPath, rName) => {\n\tif (!rPath) return rName;\n\tconst transformPath = (str) => {\n\t\tif (str === \".\") return \"\";\n\t\tif (str.startsWith(\"./\")) return str.replace(\"./\", \"\");\n\t\tif (str.startsWith(\"/\")) {\n\t\t\tconst strWithoutSlash = str.slice(1);\n\t\t\tif (strWithoutSlash.endsWith(\"/\")) return strWithoutSlash.slice(0, -1);\n\t\t\treturn strWithoutSlash;\n\t\t}\n\t\treturn str;\n\t};\n\tconst transformedPath = transformPath(rPath);\n\tif (!transformedPath) return rName;\n\tif (transformedPath.endsWith(\"/\")) return `${transformedPath}${rName}`;\n\treturn `${transformedPath}/${rName}`;\n};\nfunction inferAutoPublicPath(url) {\n\treturn url.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n}\nfunction generateSnapshotFromManifest(manifest, options = {}) {\n\tconst { remotes = {}, overrides = {}, version } = options;\n\tlet remoteSnapshot;\n\tconst getPublicPath = () => {\n\t\tif (\"publicPath\" in manifest.metaData) {\n\t\t\tif ((manifest.metaData.publicPath === \"auto\" || manifest.metaData.publicPath === \"\") && version) return inferAutoPublicPath(version);\n\t\t\treturn manifest.metaData.publicPath;\n\t\t} else return manifest.metaData.getPublicPath;\n\t};\n\tconst overridesKeys = Object.keys(overrides);\n\tlet remotesInfo = {};\n\tif (!Object.keys(remotes).length) remotesInfo = manifest.remotes?.reduce((res, next) => {\n\t\tlet matchedVersion;\n\t\tconst name = next.federationContainerName;\n\t\tif (overridesKeys.includes(name)) matchedVersion = overrides[name];\n\t\telse if (\"version\" in next) matchedVersion = next.version;\n\t\telse matchedVersion = next.entry;\n\t\tres[name] = { matchedVersion };\n\t\treturn res;\n\t}, {}) || {};\n\tObject.keys(remotes).forEach((key) => remotesInfo[key] = { matchedVersion: overridesKeys.includes(key) ? overrides[key] : remotes[key] });\n\tconst { remoteEntry: { path: remoteEntryPath, name: remoteEntryName, type: remoteEntryType }, types: remoteTypes = {\n\t\tpath: \"\",\n\t\tname: \"\",\n\t\tzip: \"\",\n\t\tapi: \"\"\n\t}, buildInfo: { buildVersion }, globalName, ssrRemoteEntry } = manifest.metaData;\n\tconst { exposes } = manifest;\n\tlet basicRemoteSnapshot = {\n\t\tversion: version ? version : \"\",\n\t\tbuildVersion,\n\t\tglobalName,\n\t\tremoteEntry: simpleJoinRemoteEntry(remoteEntryPath, remoteEntryName),\n\t\tremoteEntryType,\n\t\tremoteTypes: simpleJoinRemoteEntry(remoteTypes.path, remoteTypes.name),\n\t\tremoteTypesZip: remoteTypes.zip || \"\",\n\t\tremoteTypesAPI: remoteTypes.api || \"\",\n\t\tremotesInfo,\n\t\tshared: manifest?.shared.map((item) => ({\n\t\t\tassets: item.assets,\n\t\t\tsharedName: item.name,\n\t\t\tversion: item.version,\n\t\t\tusedExports: item.referenceExports || []\n\t\t})),\n\t\tmodules: exposes?.map((expose) => ({\n\t\t\tmoduleName: expose.name,\n\t\t\tmodulePath: expose.path,\n\t\t\tassets: expose.assets\n\t\t}))\n\t};\n\tif (\"publicPath\" in manifest.metaData) {\n\t\tremoteSnapshot = {\n\t\t\t...basicRemoteSnapshot,\n\t\t\tpublicPath: getPublicPath()\n\t\t};\n\t\tif (typeof manifest.metaData.ssrPublicPath === \"string\") remoteSnapshot.ssrPublicPath = manifest.metaData.ssrPublicPath;\n\t} else remoteSnapshot = {\n\t\t...basicRemoteSnapshot,\n\t\tgetPublicPath: getPublicPath()\n\t};\n\tif (ssrRemoteEntry) {\n\t\tconst fullSSRRemoteEntry = simpleJoinRemoteEntry(ssrRemoteEntry.path, ssrRemoteEntry.name);\n\t\tremoteSnapshot.ssrRemoteEntry = fullSSRRemoteEntry;\n\t\tremoteSnapshot.ssrRemoteEntryType = ssrRemoteEntry.type || \"commonjs-module\";\n\t}\n\treturn remoteSnapshot;\n}\nfunction isManifestProvider(moduleInfo) {\n\tif (\"remoteEntry\" in moduleInfo && moduleInfo.remoteEntry.includes(MANIFEST_EXT)) return true;\n\telse return false;\n}\nfunction getManifestFileName(manifestOptions) {\n\tif (!manifestOptions) return {\n\t\tstatsFileName: StatsFileName,\n\t\tmanifestFileName: ManifestFileName\n\t};\n\tlet filePath = typeof manifestOptions === \"boolean\" ? \"\" : manifestOptions.filePath || \"\";\n\tlet fileName = typeof manifestOptions === \"boolean\" ? \"\" : manifestOptions.fileName || \"\";\n\tconst JSON_EXT = \".json\";\n\tconst addExt = (name) => {\n\t\tif (name.endsWith(JSON_EXT)) return name;\n\t\treturn `${name}${JSON_EXT}`;\n\t};\n\tconst insertSuffix = (name, suffix) => {\n\t\treturn name.replace(JSON_EXT, `${suffix}${JSON_EXT}`);\n\t};\n\tconst manifestFileName = fileName ? addExt(fileName) : ManifestFileName;\n\treturn {\n\t\tstatsFileName: simpleJoinRemoteEntry(filePath, fileName ? insertSuffix(manifestFileName, \"-stats\") : StatsFileName),\n\t\tmanifestFileName: simpleJoinRemoteEntry(filePath, manifestFileName)\n\t};\n}\n\n//#endregion\nexport { generateSnapshotFromManifest, getManifestFileName, inferAutoPublicPath, isManifestProvider, simpleJoinRemoteEntry };\n//# sourceMappingURL=generateSnapshotFromManifest.js.map","import { isDebugMode } from \"./env.js\";\n\n//#region src/logger.ts\nconst PREFIX = \"[ Module Federation ]\";\nconst DEFAULT_DELEGATE = console;\nconst LOGGER_STACK_SKIP_TOKENS = [\n\t\"logger.ts\",\n\t\"logger.js\",\n\t\"captureStackTrace\",\n\t\"Logger.emit\",\n\t\"Logger.log\",\n\t\"Logger.info\",\n\t\"Logger.warn\",\n\t\"Logger.error\",\n\t\"Logger.debug\"\n];\nfunction captureStackTrace() {\n\ttry {\n\t\tconst stack = (/* @__PURE__ */ new Error()).stack;\n\t\tif (!stack) return;\n\t\tconst [, ...rawLines] = stack.split(\"\\n\");\n\t\tconst filtered = rawLines.filter((line) => !LOGGER_STACK_SKIP_TOKENS.some((token) => line.includes(token)));\n\t\tif (!filtered.length) return;\n\t\treturn `Stack trace:\\n${filtered.slice(0, 5).join(\"\\n\")}`;\n\t} catch {\n\t\treturn;\n\t}\n}\nvar Logger = class {\n\tconstructor(prefix, delegate = DEFAULT_DELEGATE) {\n\t\tthis.prefix = prefix;\n\t\tthis.delegate = delegate ?? DEFAULT_DELEGATE;\n\t}\n\tsetPrefix(prefix) {\n\t\tthis.prefix = prefix;\n\t}\n\tsetDelegate(delegate) {\n\t\tthis.delegate = delegate ?? DEFAULT_DELEGATE;\n\t}\n\temit(method, args) {\n\t\tconst delegate = this.delegate;\n\t\tconst stackTrace = isDebugMode() ? captureStackTrace() : void 0;\n\t\tconst enrichedArgs = stackTrace ? [...args, stackTrace] : args;\n\t\tconst order = (() => {\n\t\t\tswitch (method) {\n\t\t\t\tcase \"log\": return [\"log\", \"info\"];\n\t\t\t\tcase \"info\": return [\"info\", \"log\"];\n\t\t\t\tcase \"warn\": return [\n\t\t\t\t\t\"warn\",\n\t\t\t\t\t\"info\",\n\t\t\t\t\t\"log\"\n\t\t\t\t];\n\t\t\t\tcase \"error\": return [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t\"warn\",\n\t\t\t\t\t\"log\"\n\t\t\t\t];\n\t\t\t\tdefault: return [\"debug\", \"log\"];\n\t\t\t}\n\t\t})();\n\t\tfor (const candidate of order) {\n\t\t\tconst handler = delegate[candidate];\n\t\t\tif (typeof handler === \"function\") {\n\t\t\t\thandler.call(delegate, this.prefix, ...enrichedArgs);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tfor (const candidate of order) {\n\t\t\tconst handler = DEFAULT_DELEGATE[candidate];\n\t\t\tif (typeof handler === \"function\") {\n\t\t\t\thandler.call(DEFAULT_DELEGATE, this.prefix, ...enrichedArgs);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\tlog(...args) {\n\t\tthis.emit(\"log\", args);\n\t}\n\twarn(...args) {\n\t\tthis.emit(\"warn\", args);\n\t}\n\terror(...args) {\n\t\tthis.emit(\"error\", args);\n\t}\n\tsuccess(...args) {\n\t\tthis.emit(\"info\", args);\n\t}\n\tinfo(...args) {\n\t\tthis.emit(\"info\", args);\n\t}\n\tready(...args) {\n\t\tthis.emit(\"info\", args);\n\t}\n\tdebug(...args) {\n\t\tif (isDebugMode()) this.emit(\"debug\", args);\n\t}\n};\nfunction createLogger(prefix) {\n\treturn new Logger(prefix);\n}\nfunction createInfrastructureLogger(prefix) {\n\tconst infrastructureLogger = new Logger(prefix);\n\tObject.defineProperty(infrastructureLogger, \"__mf_infrastructure_logger__\", {\n\t\tvalue: true,\n\t\tenumerable: false,\n\t\tconfigurable: false\n\t});\n\treturn infrastructureLogger;\n}\nfunction bindLoggerToCompiler(loggerInstance, compiler, name) {\n\tif (!loggerInstance.__mf_infrastructure_logger__) return;\n\tif (!compiler?.getInfrastructureLogger) return;\n\ttry {\n\t\tconst infrastructureLogger = compiler.getInfrastructureLogger(name);\n\t\tif (infrastructureLogger && typeof infrastructureLogger === \"object\" && (typeof infrastructureLogger.log === \"function\" || typeof infrastructureLogger.info === \"function\" || typeof infrastructureLogger.warn === \"function\" || typeof infrastructureLogger.error === \"function\")) loggerInstance.setDelegate(infrastructureLogger);\n\t} catch {\n\t\tloggerInstance.setDelegate(void 0);\n\t}\n}\nconst logger = createLogger(PREFIX);\nconst infrastructureLogger = createInfrastructureLogger(PREFIX);\n\n//#endregion\nexport { bindLoggerToCompiler, createInfrastructureLogger, createLogger, infrastructureLogger, logger };\n//# sourceMappingURL=logger.js.map","import { warn } from \"./utils.js\";\n\n//#region src/dom.ts\nasync function safeWrapper(callback, disableWarn) {\n\ttry {\n\t\treturn await callback();\n\t} catch (e) {\n\t\t!disableWarn && warn(e);\n\t\treturn;\n\t}\n}\nfunction isStaticResourcesEqual(url1, url2) {\n\tconst REG_EXP = /^(https?:)?\\/\\//i;\n\treturn url1.replace(REG_EXP, \"\").replace(/\\/$/, \"\") === url2.replace(REG_EXP, \"\").replace(/\\/$/, \"\");\n}\nfunction createScript(info) {\n\tlet script = null;\n\tlet needAttach = true;\n\tlet timeout = 2e4;\n\tlet timeoutId;\n\tconst scripts = document.getElementsByTagName(\"script\");\n\tfor (let i = 0; i < scripts.length; i++) {\n\t\tconst s = scripts[i];\n\t\tconst scriptSrc = s.getAttribute(\"src\");\n\t\tif (scriptSrc && isStaticResourcesEqual(scriptSrc, info.url)) {\n\t\t\tscript = s;\n\t\t\tneedAttach = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!script) {\n\t\tconst attrs = info.attrs;\n\t\tscript = document.createElement(\"script\");\n\t\tscript.type = attrs?.[\"type\"] === \"module\" ? \"module\" : \"text/javascript\";\n\t\tlet createScriptRes = void 0;\n\t\tif (info.createScriptHook) {\n\t\t\tcreateScriptRes = info.createScriptHook(info.url, info.attrs);\n\t\t\tif (createScriptRes instanceof HTMLScriptElement) script = createScriptRes;\n\t\t\telse if (typeof createScriptRes === \"object\") {\n\t\t\t\tif (\"script\" in createScriptRes && createScriptRes.script) script = createScriptRes.script;\n\t\t\t\tif (\"timeout\" in createScriptRes && createScriptRes.timeout) timeout = createScriptRes.timeout;\n\t\t\t}\n\t\t}\n\t\tif (!script.src) script.src = info.url;\n\t\tif (attrs && !createScriptRes) Object.keys(attrs).forEach((name) => {\n\t\t\tif (script) {\n\t\t\t\tif (name === \"async\" || name === \"defer\") script[name] = attrs[name];\n\t\t\t\telse if (!script.getAttribute(name)) script.setAttribute(name, attrs[name]);\n\t\t\t}\n\t\t});\n\t}\n\tlet executionError = null;\n\tconst executionErrorHandler = typeof window !== \"undefined\" ? (evt) => {\n\t\tif (evt.filename && isStaticResourcesEqual(evt.filename, info.url)) {\n\t\t\tconst err = /* @__PURE__ */ new Error(`ScriptExecutionError: Script \"${info.url}\" loaded but threw a runtime error during execution: ${evt.message} (${evt.filename}:${evt.lineno}:${evt.colno})`);\n\t\t\terr.name = \"ScriptExecutionError\";\n\t\t\texecutionError = err;\n\t\t}\n\t} : null;\n\tif (executionErrorHandler) window.addEventListener(\"error\", executionErrorHandler);\n\tconst onScriptComplete = async (prev, event) => {\n\t\tclearTimeout(timeoutId);\n\t\tif (executionErrorHandler) window.removeEventListener(\"error\", executionErrorHandler);\n\t\tconst onScriptCompleteCallback = () => {\n\t\t\tif (event?.type === \"error\") {\n\t\t\t\tconst networkError = /* @__PURE__ */ new Error(event?.isTimeout ? `ScriptNetworkError: Script \"${info.url}\" timed out.` : `ScriptNetworkError: Failed to load script \"${info.url}\" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);\n\t\t\t\tnetworkError.name = \"ScriptNetworkError\";\n\t\t\t\tinfo?.onErrorCallback && info?.onErrorCallback(networkError);\n\t\t\t} else if (executionError) info?.onErrorCallback && info?.onErrorCallback(executionError);\n\t\t\telse info?.cb && info?.cb();\n\t\t};\n\t\tif (script) {\n\t\t\tscript.onerror = null;\n\t\t\tscript.onload = null;\n\t\t\tsafeWrapper(() => {\n\t\t\t\tconst { needDeleteScript = true } = info;\n\t\t\t\tif (needDeleteScript) script?.parentNode && script.parentNode.removeChild(script);\n\t\t\t});\n\t\t\tif (prev && typeof prev === \"function\") {\n\t\t\t\tconst result = prev(event);\n\t\t\t\tif (result instanceof Promise) {\n\t\t\t\t\tconst res = await result;\n\t\t\t\t\tonScriptCompleteCallback();\n\t\t\t\t\treturn res;\n\t\t\t\t}\n\t\t\t\tonScriptCompleteCallback();\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tonScriptCompleteCallback();\n\t};\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\ttimeoutId = setTimeout(() => {\n\t\tonScriptComplete(null, {\n\t\t\ttype: \"error\",\n\t\t\tisTimeout: true\n\t\t});\n\t}, timeout);\n\treturn {\n\t\tscript,\n\t\tneedAttach\n\t};\n}\nfunction createLink(info) {\n\tlet link = null;\n\tlet needAttach = true;\n\tlet timeout = 2e4;\n\tlet timeoutId;\n\tconst links = document.getElementsByTagName(\"link\");\n\tfor (let i = 0; i < links.length; i++) {\n\t\tconst l = links[i];\n\t\tconst linkHref = l.getAttribute(\"href\");\n\t\tconst linkRel = l.getAttribute(\"rel\");\n\t\tif (linkHref && isStaticResourcesEqual(linkHref, info.url) && linkRel === info.attrs[\"rel\"]) {\n\t\t\tlink = l;\n\t\t\tneedAttach = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!link) {\n\t\tlink = document.createElement(\"link\");\n\t\tlink.setAttribute(\"href\", info.url);\n\t\tlet createLinkRes = void 0;\n\t\tlet shouldApplyAttrs = true;\n\t\tconst attrs = info.attrs;\n\t\tif (info.createLinkHook) {\n\t\t\tcreateLinkRes = info.createLinkHook(info.url, attrs);\n\t\t\tif (createLinkRes instanceof HTMLLinkElement) {\n\t\t\t\tlink = createLinkRes;\n\t\t\t\tshouldApplyAttrs = false;\n\t\t\t} else if (typeof createLinkRes === \"object\") {\n\t\t\t\tif (\"link\" in createLinkRes && createLinkRes.link) {\n\t\t\t\t\tlink = createLinkRes.link;\n\t\t\t\t\tshouldApplyAttrs = false;\n\t\t\t\t}\n\t\t\t\tif (\"timeout\" in createLinkRes && createLinkRes.timeout) timeout = createLinkRes.timeout;\n\t\t\t}\n\t\t}\n\t\tif (attrs && shouldApplyAttrs) Object.keys(attrs).forEach((name) => {\n\t\t\tif (link && !link.getAttribute(name)) link.setAttribute(name, attrs[name]);\n\t\t});\n\t}\n\tif (!needAttach) {\n\t\tPromise.resolve().then(() => {\n\t\t\tinfo?.cb && info?.cb();\n\t\t});\n\t\treturn {\n\t\t\tlink,\n\t\t\tneedAttach\n\t\t};\n\t}\n\tconst onLinkComplete = (prev, event) => {\n\t\tif (timeoutId) clearTimeout(timeoutId);\n\t\tconst onLinkCompleteCallback = () => {\n\t\t\tif (event?.type === \"error\") {\n\t\t\t\tconst linkError = /* @__PURE__ */ new Error(event?.isTimeout ? `LinkNetworkError: Link \"${info.url}\" timed out.` : `LinkNetworkError: Failed to load link \"${info.url}\" - the URL is unreachable or the server returned an error.`);\n\t\t\t\tlinkError.name = \"LinkNetworkError\";\n\t\t\t\tinfo?.onErrorCallback && info?.onErrorCallback(linkError);\n\t\t\t} else info?.cb && info?.cb();\n\t\t};\n\t\tif (link) {\n\t\t\tlink.onerror = null;\n\t\t\tlink.onload = null;\n\t\t\tsafeWrapper(() => {\n\t\t\t\tconst { needDeleteLink = true } = info;\n\t\t\t\tif (needDeleteLink) link?.parentNode && link.parentNode.removeChild(link);\n\t\t\t});\n\t\t\tif (prev) {\n\t\t\t\tconst res = prev(event);\n\t\t\t\tonLinkCompleteCallback();\n\t\t\t\treturn res;\n\t\t\t}\n\t\t}\n\t\tonLinkCompleteCallback();\n\t};\n\tlink.onerror = onLinkComplete.bind(null, link.onerror);\n\tlink.onload = onLinkComplete.bind(null, link.onload);\n\ttimeoutId = setTimeout(() => {\n\t\tonLinkComplete(null, {\n\t\t\ttype: \"error\",\n\t\t\tisTimeout: true\n\t\t});\n\t}, timeout);\n\treturn {\n\t\tlink,\n\t\tneedAttach\n\t};\n}\nfunction loadScript(url, info) {\n\tconst { attrs = {}, createScriptHook } = info;\n\treturn new Promise((resolve, reject) => {\n\t\tconst { script, needAttach } = createScript({\n\t\t\turl,\n\t\t\tcb: resolve,\n\t\t\tonErrorCallback: reject,\n\t\t\tattrs: {\n\t\t\t\tfetchpriority: \"high\",\n\t\t\t\t...attrs\n\t\t\t},\n\t\t\tcreateScriptHook,\n\t\t\tneedDeleteScript: true\n\t\t});\n\t\tneedAttach && document.head.appendChild(script);\n\t});\n}\n\n//#endregion\nexport { createLink, createScript, isStaticResourcesEqual, loadScript, safeWrapper };\n//# sourceMappingURL=dom.js.map","//#region src/getShortErrorMsg.ts\nconst getDocsUrl = (errorCode) => {\n\treturn `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${errorCode.split(\"-\")[0].toLowerCase()}#${errorCode.toLowerCase()}`;\n};\nconst getShortErrorMsg = (errorCode, errorDescMap, args, originalErrorMsg) => {\n\tconst msg = [`${[errorDescMap[errorCode]]} #${errorCode}`];\n\targs && msg.push(`args: ${JSON.stringify(args)}`);\n\tmsg.push(getDocsUrl(errorCode));\n\toriginalErrorMsg && msg.push(`Original Error Message:\\n ${originalErrorMsg}`);\n\treturn msg.join(\"\\n\");\n};\n\n//#endregion\nexport { getShortErrorMsg };\n//# sourceMappingURL=getShortErrorMsg.mjs.map","import { getShortErrorMsg } from \"./getShortErrorMsg.mjs\";\n\n//#region src/browser.ts\nfunction logAndReport(code, descMap, args, logger, originalErrorMsg, context) {\n\treturn logger(getShortErrorMsg(code, descMap, args, originalErrorMsg));\n}\n\n//#endregion\nexport { logAndReport };\n//# sourceMappingURL=browser.mjs.map","import { createLogger } from \"@module-federation/sdk\";\nimport { logAndReport } from \"@module-federation/error-codes/browser\";\n\n//#region src/utils/logger.ts\nconst LOG_CATEGORY = \"[ Federation Runtime ]\";\nconst logger = createLogger(LOG_CATEGORY);\nfunction assert(condition, msgOrCode, descMap, args, context) {\n\tif (!condition) if (descMap !== void 0) error(msgOrCode, descMap, args, void 0, context);\n\telse error(msgOrCode);\n}\nfunction error(msgOrCode, descMap, args, originalErrorMsg, context) {\n\tif (descMap !== void 0) return logAndReport(msgOrCode, descMap, args ?? {}, (msg) => {\n\t\tthrow new Error(`${LOG_CATEGORY}: ${msg}`);\n\t}, originalErrorMsg, context);\n\tconst msg = msgOrCode;\n\tif (msg instanceof Error) {\n\t\tif (!msg.message.startsWith(LOG_CATEGORY)) msg.message = `${LOG_CATEGORY}: ${msg.message}`;\n\t\tthrow msg;\n\t}\n\tthrow new Error(`${LOG_CATEGORY}: ${msg}`);\n}\nfunction warn$1(msg) {\n\tif (msg instanceof Error) {\n\t\tif (!msg.message.startsWith(LOG_CATEGORY)) msg.message = `${LOG_CATEGORY}: ${msg.message}`;\n\t\tlogger.warn(msg);\n\t} else logger.warn(msg);\n}\n\n//#endregion\nexport { assert, error, logger, warn$1 as warn };\n//# sourceMappingURL=logger.js.map","import { warn as warn$1 } from \"./logger.js\";\nimport { isBrowserEnvValue, isReactNativeEnv } from \"@module-federation/sdk\";\n\n//#region src/utils/tool.ts\nfunction addUniqueItem(arr, item) {\n\tif (arr.findIndex((name) => name === item) === -1) arr.push(item);\n\treturn arr;\n}\nfunction getFMId(remoteInfo) {\n\tif (\"version\" in remoteInfo && remoteInfo.version) return `${remoteInfo.name}:${remoteInfo.version}`;\n\telse if (\"entry\" in remoteInfo && remoteInfo.entry) return `${remoteInfo.name}:${remoteInfo.entry}`;\n\telse return `${remoteInfo.name}`;\n}\nfunction isRemoteInfoWithEntry(remote) {\n\treturn typeof remote.entry !== \"undefined\";\n}\nfunction isPureRemoteEntry(remote) {\n\treturn !remote.entry.includes(\".json\");\n}\nasync function safeWrapper(callback, disableWarn) {\n\ttry {\n\t\treturn await callback();\n\t} catch (e) {\n\t\t!disableWarn && warn$1(e);\n\t\treturn;\n\t}\n}\nfunction isObject(val) {\n\treturn val && typeof val === \"object\";\n}\nconst objectToString = Object.prototype.toString;\nfunction isPlainObject(val) {\n\treturn objectToString.call(val) === \"[object Object]\";\n}\nfunction isStaticResourcesEqual(url1, url2) {\n\tconst REG_EXP = /^(https?:)?\\/\\//i;\n\treturn url1.replace(REG_EXP, \"\").replace(/\\/$/, \"\") === url2.replace(REG_EXP, \"\").replace(/\\/$/, \"\");\n}\nfunction arrayOptions(options) {\n\treturn Array.isArray(options) ? options : [options];\n}\nfunction getRemoteEntryInfoFromSnapshot(snapshot) {\n\tconst defaultRemoteEntryInfo = {\n\t\turl: \"\",\n\t\ttype: \"global\",\n\t\tglobalName: \"\"\n\t};\n\tif (isBrowserEnvValue || isReactNativeEnv() || !(\"ssrRemoteEntry\" in snapshot)) return \"remoteEntry\" in snapshot ? {\n\t\turl: snapshot.remoteEntry,\n\t\ttype: snapshot.remoteEntryType,\n\t\tglobalName: snapshot.globalName\n\t} : defaultRemoteEntryInfo;\n\tif (\"ssrRemoteEntry\" in snapshot) return {\n\t\turl: snapshot.ssrRemoteEntry || defaultRemoteEntryInfo.url,\n\t\ttype: snapshot.ssrRemoteEntryType || defaultRemoteEntryInfo.type,\n\t\tglobalName: snapshot.globalName\n\t};\n\treturn defaultRemoteEntryInfo;\n}\nconst processModuleAlias = (name, subPath) => {\n\tlet moduleName;\n\tif (name.endsWith(\"/\")) moduleName = name.slice(0, -1);\n\telse moduleName = name;\n\tif (subPath.startsWith(\".\")) subPath = subPath.slice(1);\n\tmoduleName = moduleName + subPath;\n\treturn moduleName;\n};\n\n//#endregion\nexport { addUniqueItem, arrayOptions, getFMId, getRemoteEntryInfoFromSnapshot, isObject, isPlainObject, isPureRemoteEntry, isRemoteInfoWithEntry, isStaticResourcesEqual, objectToString, processModuleAlias, safeWrapper };\n//# sourceMappingURL=tool.js.map","import { error, warn as warn$1 } from \"./utils/logger.js\";\nimport { getFMId } from \"./utils/tool.js\";\nimport { isDebugMode } from \"@module-federation/sdk\";\n\n//#region src/global.ts\nconst CurrentGlobal = typeof globalThis === \"object\" ? globalThis : window;\nconst nativeGlobal = (() => {\n\ttry {\n\t\treturn document.defaultView;\n\t} catch {\n\t\treturn CurrentGlobal;\n\t}\n})();\nconst Global = nativeGlobal;\nfunction definePropertyGlobalVal(target, key, val) {\n\tObject.defineProperty(target, key, {\n\t\tvalue: val,\n\t\tconfigurable: false,\n\t\twritable: true\n\t});\n}\nfunction includeOwnProperty(target, key) {\n\treturn Object.hasOwnProperty.call(target, key);\n}\nif (!includeOwnProperty(CurrentGlobal, \"__GLOBAL_LOADING_REMOTE_ENTRY__\")) definePropertyGlobalVal(CurrentGlobal, \"__GLOBAL_LOADING_REMOTE_ENTRY__\", {});\nconst globalLoading = CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;\nfunction setGlobalDefaultVal(target) {\n\tif (includeOwnProperty(target, \"__VMOK__\") && !includeOwnProperty(target, \"__FEDERATION__\")) definePropertyGlobalVal(target, \"__FEDERATION__\", target.__VMOK__);\n\tif (!includeOwnProperty(target, \"__FEDERATION__\")) {\n\t\tdefinePropertyGlobalVal(target, \"__FEDERATION__\", {\n\t\t\t__GLOBAL_PLUGIN__: [],\n\t\t\t__INSTANCES__: [],\n\t\t\tmoduleInfo: {},\n\t\t\t__SHARE__: {},\n\t\t\t__MANIFEST_LOADING__: {},\n\t\t\t__PRELOADED_MAP__: /* @__PURE__ */ new Map()\n\t\t});\n\t\tdefinePropertyGlobalVal(target, \"__VMOK__\", target.__FEDERATION__);\n\t}\n\ttarget.__FEDERATION__.__GLOBAL_PLUGIN__ ??= [];\n\ttarget.__FEDERATION__.__INSTANCES__ ??= [];\n\ttarget.__FEDERATION__.moduleInfo ??= {};\n\ttarget.__FEDERATION__.__SHARE__ ??= {};\n\ttarget.__FEDERATION__.__MANIFEST_LOADING__ ??= {};\n\ttarget.__FEDERATION__.__PRELOADED_MAP__ ??= /* @__PURE__ */ new Map();\n}\nsetGlobalDefaultVal(CurrentGlobal);\nsetGlobalDefaultVal(nativeGlobal);\nfunction resetFederationGlobalInfo() {\n\tCurrentGlobal.__FEDERATION__.__GLOBAL_PLUGIN__ = [];\n\tCurrentGlobal.__FEDERATION__.__INSTANCES__ = [];\n\tCurrentGlobal.__FEDERATION__.moduleInfo = {};\n\tCurrentGlobal.__FEDERATION__.__SHARE__ = {};\n\tCurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__ = {};\n\tObject.keys(globalLoading).forEach((key) => {\n\t\tdelete globalLoading[key];\n\t});\n}\nfunction setGlobalFederationInstance(FederationInstance) {\n\tCurrentGlobal.__FEDERATION__.__INSTANCES__.push(FederationInstance);\n}\nfunction getGlobalFederationConstructor() {\n\treturn CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__;\n}\nfunction setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {\n\tif (isDebug) {\n\t\tCurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;\n\t\tCurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = \"2.8.2\";\n\t}\n}\nfunction getInfoWithoutType(target, key) {\n\tif (typeof key === \"string\") if (target[key]) return {\n\t\tvalue: target[key],\n\t\tkey\n\t};\n\telse {\n\t\tconst targetKeys = Object.keys(target);\n\t\tfor (const targetKey of targetKeys) {\n\t\t\tconst [targetTypeOrName, _] = targetKey.split(\":\");\n\t\t\tconst nKey = `${targetTypeOrName}:${key}`;\n\t\t\tconst typeWithKeyRes = target[nKey];\n\t\t\tif (typeWithKeyRes) return {\n\t\t\t\tvalue: typeWithKeyRes,\n\t\t\t\tkey: nKey\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tvalue: void 0,\n\t\t\tkey\n\t\t};\n\t}\n\telse error(`getInfoWithoutType: \"key\" must be a string, got ${typeof key} (${JSON.stringify(key)}).`);\n}\nconst getGlobalSnapshot = () => nativeGlobal.__FEDERATION__.moduleInfo;\nconst getTargetSnapshotInfoByModuleInfo = (moduleInfo, snapshot) => {\n\tconst getModuleInfo = getInfoWithoutType(snapshot, getFMId(moduleInfo)).value;\n\tif (getModuleInfo && !getModuleInfo.version && \"version\" in moduleInfo && moduleInfo[\"version\"]) getModuleInfo.version = moduleInfo[\"version\"];\n\tif (getModuleInfo) return getModuleInfo;\n\tif (\"version\" in moduleInfo && moduleInfo[\"version\"]) {\n\t\tconst { version, ...resModuleInfo } = moduleInfo;\n\t\tconst moduleKeyWithoutVersion = getFMId(resModuleInfo);\n\t\tconst getModuleInfoWithoutVersion = getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo, moduleKeyWithoutVersion).value;\n\t\tif (getModuleInfoWithoutVersion?.version === version) return getModuleInfoWithoutVersion;\n\t}\n};\nconst getGlobalSnapshotInfoByModuleInfo = (moduleInfo) => getTargetSnapshotInfoByModuleInfo(moduleInfo, nativeGlobal.__FEDERATION__.moduleInfo);\nconst setGlobalSnapshotInfoByModuleInfo = (remoteInfo, moduleDetailInfo) => {\n\tconst moduleKey = getFMId(remoteInfo);\n\tnativeGlobal.__FEDERATION__.moduleInfo[moduleKey] = moduleDetailInfo;\n\treturn nativeGlobal.__FEDERATION__.moduleInfo;\n};\nconst addGlobalSnapshot = (moduleInfos) => {\n\tnativeGlobal.__FEDERATION__.moduleInfo = {\n\t\t...nativeGlobal.__FEDERATION__.moduleInfo,\n\t\t...moduleInfos\n\t};\n\treturn () => {\n\t\tconst keys = Object.keys(moduleInfos);\n\t\tfor (const key of keys) delete nativeGlobal.__FEDERATION__.moduleInfo[key];\n\t};\n};\nconst getRemoteEntryExports = (name, globalName) => {\n\tconst remoteEntryKey = globalName || `__FEDERATION_${name}:custom__`;\n\treturn {\n\t\tremoteEntryKey,\n\t\tentryExports: CurrentGlobal[remoteEntryKey]\n\t};\n};\nconst registerGlobalPlugins = (plugins) => {\n\tconst { __GLOBAL_PLUGIN__ } = nativeGlobal.__FEDERATION__;\n\tplugins.forEach((plugin) => {\n\t\tif (__GLOBAL_PLUGIN__.findIndex((p) => p.name === plugin.name) === -1) __GLOBAL_PLUGIN__.push(plugin);\n\t\telse warn$1(`The plugin ${plugin.name} has been registered.`);\n\t});\n};\nconst getGlobalHostPlugins = () => nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__;\nconst getPreloaded = (id) => CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.get(id);\nconst setPreloaded = (id) => CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.set(id, true);\n\n//#endregion\nexport { CurrentGlobal, Global, addGlobalSnapshot, getGlobalFederationConstructor, getGlobalHostPlugins, getGlobalSnapshot, getGlobalSnapshotInfoByModuleInfo, getInfoWithoutType, getPreloaded, getRemoteEntryExports, getTargetSnapshotInfoByModuleInfo, globalLoading, nativeGlobal, registerGlobalPlugins, resetFederationGlobalInfo, setGlobalFederationConstructor, setGlobalFederationInstance, setGlobalSnapshotInfoByModuleInfo, setPreloaded };\n//# sourceMappingURL=global.js.map","//#region src/utils/semver/constants.ts\nconst buildIdentifier = \"[0-9A-Za-z-]+\";\nconst build = `(?:\\\\+(${buildIdentifier}(?:\\\\.${buildIdentifier})*))`;\nconst numericIdentifier = \"0|[1-9]\\\\d*\";\nconst numericIdentifierLoose = \"[0-9]+\";\nconst nonNumericIdentifier = \"\\\\d*[a-zA-Z-][a-zA-Z0-9-]*\";\nconst preReleaseIdentifierLoose = `(?:${numericIdentifierLoose}|${nonNumericIdentifier})`;\nconst preReleaseLoose = `(?:-?(${preReleaseIdentifierLoose}(?:\\\\.${preReleaseIdentifierLoose})*))`;\nconst preReleaseIdentifier = `(?:${numericIdentifier}|${nonNumericIdentifier})`;\nconst preRelease = `(?:-(${preReleaseIdentifier}(?:\\\\.${preReleaseIdentifier})*))`;\nconst xRangeIdentifier = `${numericIdentifier}|x|X|\\\\*`;\nconst xRangePlain = `[v=\\\\s]*(${xRangeIdentifier})(?:\\\\.(${xRangeIdentifier})(?:\\\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`;\nconst hyphenRange = `^\\\\s*(${xRangePlain})\\\\s+-\\\\s+(${xRangePlain})\\\\s*$`;\nconst loosePlain = `[v=\\\\s]*${`(${numericIdentifierLoose})\\\\.(${numericIdentifierLoose})\\\\.(${numericIdentifierLoose})`}${preReleaseLoose}?${build}?`;\nconst gtlt = \"((?:<|>)?=?)\";\nconst comparatorTrim = `(\\\\s*)${gtlt}\\\\s*(${loosePlain}|${xRangePlain})`;\nconst loneTilde = \"(?:~>?)\";\nconst tildeTrim = `(\\\\s*)${loneTilde}\\\\s+`;\nconst loneCaret = \"(?:\\\\^)\";\nconst caretTrim = `(\\\\s*)${loneCaret}\\\\s+`;\nconst star = \"(<|>)?=?\\\\s*\\\\*\";\nconst caret = `^${loneCaret}${xRangePlain}$`;\nconst fullPlain = `v?${`(${numericIdentifier})\\\\.(${numericIdentifier})\\\\.(${numericIdentifier})`}${preRelease}?${build}?`;\nconst tilde = `^${loneTilde}${xRangePlain}$`;\nconst xRange = `^${gtlt}\\\\s*${xRangePlain}$`;\nconst comparator = `^${gtlt}\\\\s*(${fullPlain})$|^$`;\nconst gte0 = \"^\\\\s*>=\\\\s*0.0.0\\\\s*$\";\n\n//#endregion\nexport { caret, caretTrim, comparator, comparatorTrim, gte0, hyphenRange, star, tilde, tildeTrim, xRange };\n//# sourceMappingURL=constants.js.map","import { comparator } from \"./constants.js\";\n\n//#region src/utils/semver/utils.ts\nfunction parseRegex(source) {\n\treturn new RegExp(source);\n}\nfunction isXVersion(version) {\n\treturn !version || version.toLowerCase() === \"x\" || version === \"*\";\n}\nfunction pipe(...fns) {\n\treturn (x) => fns.reduce((v, f) => f(v), x);\n}\nfunction extractComparator(comparatorString) {\n\treturn comparatorString.match(parseRegex(comparator));\n}\nfunction combineVersion(major, minor, patch, preRelease) {\n\tconst mainVersion = `${major}.${minor}.${patch}`;\n\tif (preRelease) return `${mainVersion}-${preRelease}`;\n\treturn mainVersion;\n}\n\n//#endregion\nexport { combineVersion, extractComparator, isXVersion, parseRegex, pipe };\n//# sourceMappingURL=utils.js.map","import { caret, caretTrim, comparatorTrim, gte0, hyphenRange, star, tilde, tildeTrim, xRange } from \"./constants.js\";\nimport { isXVersion, parseRegex } from \"./utils.js\";\n\n//#region src/utils/semver/parser.ts\nfunction parseHyphen(range) {\n\treturn range.replace(parseRegex(hyphenRange), (_range, from, fromMajor, fromMinor, fromPatch, _fromPreRelease, _fromBuild, to, toMajor, toMinor, toPatch, toPreRelease) => {\n\t\tif (isXVersion(fromMajor)) from = \"\";\n\t\telse if (isXVersion(fromMinor)) from = `>=${fromMajor}.0.0`;\n\t\telse if (isXVersion(fromPatch)) from = `>=${fromMajor}.${fromMinor}.0`;\n\t\telse from = `>=${from}`;\n\t\tif (isXVersion(toMajor)) to = \"\";\n\t\telse if (isXVersion(toMinor)) to = `<${Number(toMajor) + 1}.0.0-0`;\n\t\telse if (isXVersion(toPatch)) to = `<${toMajor}.${Number(toMinor) + 1}.0-0`;\n\t\telse if (toPreRelease) to = `<=${toMajor}.${toMinor}.${toPatch}-${toPreRelease}`;\n\t\telse to = `<=${to}`;\n\t\treturn `${from} ${to}`.trim();\n\t});\n}\nfunction parseComparatorTrim(range) {\n\treturn range.replace(parseRegex(comparatorTrim), \"$1$2$3\");\n}\nfunction parseTildeTrim(range) {\n\treturn range.replace(parseRegex(tildeTrim), \"$1~\");\n}\nfunction parseCaretTrim(range) {\n\treturn range.replace(parseRegex(caretTrim), \"$1^\");\n}\nfunction parseCarets(range) {\n\treturn range.trim().split(/\\s+/).map((rangeVersion) => rangeVersion.replace(parseRegex(caret), (_, major, minor, patch, preRelease) => {\n\t\tif (isXVersion(major)) return \"\";\n\t\telse if (isXVersion(minor)) return `>=${major}.0.0 <${Number(major) + 1}.0.0-0`;\n\t\telse if (isXVersion(patch)) if (major === \"0\") return `>=${major}.${minor}.0 <${major}.${Number(minor) + 1}.0-0`;\n\t\telse return `>=${major}.${minor}.0 <${Number(major) + 1}.0.0-0`;\n\t\telse if (preRelease) if (major === \"0\") if (minor === \"0\") return `>=${major}.${minor}.${patch}-${preRelease} <${major}.${minor}.${Number(patch) + 1}-0`;\n\t\telse return `>=${major}.${minor}.${patch}-${preRelease} <${major}.${Number(minor) + 1}.0-0`;\n\t\telse return `>=${major}.${minor}.${patch}-${preRelease} <${Number(major) + 1}.0.0-0`;\n\t\telse {\n\t\t\tif (major === \"0\") if (minor === \"0\") return `>=${major}.${minor}.${patch} <${major}.${minor}.${Number(patch) + 1}-0`;\n\t\t\telse return `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0`;\n\t\t\treturn `>=${major}.${minor}.${patch} <${Number(major) + 1}.0.0-0`;\n\t\t}\n\t})).join(\" \");\n}\nfunction parseTildes(range) {\n\treturn range.trim().split(/\\s+/).map((rangeVersion) => rangeVersion.replace(parseRegex(tilde), (_, major, minor, patch, preRelease) => {\n\t\tif (isXVersion(major)) return \"\";\n\t\telse if (isXVersion(minor)) return `>=${major}.0.0 <${Number(major) + 1}.0.0-0`;\n\t\telse if (isXVersion(patch)) return `>=${major}.${minor}.0 <${major}.${Number(minor) + 1}.0-0`;\n\t\telse if (preRelease) return `>=${major}.${minor}.${patch}-${preRelease} <${major}.${Number(minor) + 1}.0-0`;\n\t\treturn `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0`;\n\t})).join(\" \");\n}\nfunction parseXRanges(range) {\n\treturn range.split(/\\s+/).map((rangeVersion) => rangeVersion.trim().replace(parseRegex(xRange), (ret, gtlt, major, minor, patch, preRelease) => {\n\t\tconst isXMajor = isXVersion(major);\n\t\tconst isXMinor = isXMajor || isXVersion(minor);\n\t\tconst isXPatch = isXMinor || isXVersion(patch);\n\t\tif (gtlt === \"=\" && isXPatch) gtlt = \"\";\n\t\tpreRelease = \"\";\n\t\tif (isXMajor) if (gtlt === \">\" || gtlt === \"<\") return \"<0.0.0-0\";\n\t\telse return \"*\";\n\t\telse if (gtlt && isXPatch) {\n\t\t\tif (isXMinor) minor = 0;\n\t\t\tpatch = 0;\n\t\t\tif (gtlt === \">\") {\n\t\t\t\tgtlt = \">=\";\n\t\t\t\tif (isXMinor) {\n\t\t\t\t\tmajor = Number(major) + 1;\n\t\t\t\t\tminor = 0;\n\t\t\t\t\tpatch = 0;\n\t\t\t\t} else {\n\t\t\t\t\tminor = Number(minor) + 1;\n\t\t\t\t\tpatch = 0;\n\t\t\t\t}\n\t\t\t} else if (gtlt === \"<=\") {\n\t\t\t\tgtlt = \"<\";\n\t\t\t\tif (isXMinor) major = Number(major) + 1;\n\t\t\t\telse minor = Number(minor) + 1;\n\t\t\t}\n\t\t\tif (gtlt === \"<\") preRelease = \"-0\";\n\t\t\treturn `${gtlt + major}.${minor}.${patch}${preRelease}`;\n\t\t} else if (isXMinor) return `>=${major}.0.0${preRelease} <${Number(major) + 1}.0.0-0`;\n\t\telse if (isXPatch) return `>=${major}.${minor}.0${preRelease} <${major}.${Number(minor) + 1}.0-0`;\n\t\treturn ret;\n\t})).join(\" \");\n}\nfunction parseStar(range) {\n\treturn range.trim().replace(parseRegex(star), \"\");\n}\nfunction parseGTE0(comparatorString) {\n\treturn comparatorString.trim().replace(parseRegex(gte0), \"\");\n}\n\n//#endregion\nexport { parseCaretTrim, parseCarets, parseComparatorTrim, parseGTE0, parseHyphen, parseStar, parseTildeTrim, parseTildes, parseXRanges };\n//# sourceMappingURL=parser.js.map","//#region src/utils/semver/compare.ts\nfunction compareAtom(rangeAtom, versionAtom) {\n\trangeAtom = Number(rangeAtom) || rangeAtom;\n\tversionAtom = Number(versionAtom) || versionAtom;\n\tif (rangeAtom > versionAtom) return 1;\n\tif (rangeAtom === versionAtom) return 0;\n\treturn -1;\n}\nfunction comparePreRelease(rangeAtom, versionAtom) {\n\tconst { preRelease: rangePreRelease } = rangeAtom;\n\tconst { preRelease: versionPreRelease } = versionAtom;\n\tif (rangePreRelease === void 0 && Boolean(versionPreRelease)) return 1;\n\tif (Boolean(rangePreRelease) && versionPreRelease === void 0) return -1;\n\tif (rangePreRelease === void 0 && versionPreRelease === void 0) return 0;\n\tfor (let i = 0, n = rangePreRelease.length; i <= n; i++) {\n\t\tconst rangeElement = rangePreRelease[i];\n\t\tconst versionElement = versionPreRelease[i];\n\t\tif (rangeElement === versionElement) continue;\n\t\tif (rangeElement === void 0 && versionElement === void 0) return 0;\n\t\tif (!rangeElement) return 1;\n\t\tif (!versionElement) return -1;\n\t\treturn compareAtom(rangeElement, versionElement);\n\t}\n\treturn 0;\n}\nfunction compareVersion(rangeAtom, versionAtom) {\n\treturn compareAtom(rangeAtom.major, versionAtom.major) || compareAtom(rangeAtom.minor, versionAtom.minor) || compareAtom(rangeAtom.patch, versionAtom.patch) || comparePreRelease(rangeAtom, versionAtom);\n}\nfunction eq(rangeAtom, versionAtom) {\n\treturn rangeAtom.version === versionAtom.version;\n}\nfunction compare(rangeAtom, versionAtom) {\n\tswitch (rangeAtom.operator) {\n\t\tcase \"\":\n\t\tcase \"=\": return eq(rangeAtom, versionAtom);\n\t\tcase \">\": return compareVersion(rangeAtom, versionAtom) < 0;\n\t\tcase \">=\": return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) < 0;\n\t\tcase \"<\": return compareVersion(rangeAtom, versionAtom) > 0;\n\t\tcase \"<=\": return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) > 0;\n\t\tcase void 0: return true;\n\t\tdefault: return false;\n\t}\n}\n\n//#endregion\nexport { compare };\n//# sourceMappingURL=compare.js.map","import { combineVersion, extractComparator, pipe } from \"./utils.js\";\nimport { parseCaretTrim, parseCarets, parseComparatorTrim, parseGTE0, parseHyphen, parseStar, parseTildeTrim, parseTildes, parseXRanges } from \"./parser.js\";\nimport { compare } from \"./compare.js\";\n\n//#region src/utils/semver/index.ts\nfunction parseComparatorString(range) {\n\treturn pipe(parseCarets, parseTildes, parseXRanges, parseStar)(range);\n}\nfunction parseRange(range) {\n\treturn pipe(parseHyphen, parseComparatorTrim, parseTildeTrim, parseCaretTrim)(range.trim()).split(/\\s+/).join(\" \");\n}\nfunction satisfy(version, range) {\n\tif (!version) return false;\n\tconst extractedVersion = extractComparator(version);\n\tif (!extractedVersion) return false;\n\tconst [, versionOperator, , versionMajor, versionMinor, versionPatch, versionPreRelease] = extractedVersion;\n\tconst versionAtom = {\n\t\toperator: versionOperator,\n\t\tversion: combineVersion(versionMajor, versionMinor, versionPatch, versionPreRelease),\n\t\tmajor: versionMajor,\n\t\tminor: versionMinor,\n\t\tpatch: versionPatch,\n\t\tpreRelease: versionPreRelease?.split(\".\")\n\t};\n\tconst orRanges = range.split(\"||\");\n\tfor (const orRange of orRanges) {\n\t\tconst trimmedOrRange = orRange.trim();\n\t\tif (!trimmedOrRange) return true;\n\t\tif (trimmedOrRange === \"*\" || trimmedOrRange === \"x\") return true;\n\t\ttry {\n\t\t\tconst parsedSubRange = parseRange(trimmedOrRange);\n\t\t\tif (!parsedSubRange.trim()) return true;\n\t\t\tconst parsedComparatorString = parsedSubRange.split(\" \").map((rangeVersion) => parseComparatorString(rangeVersion)).join(\" \");\n\t\t\tif (!parsedComparatorString.trim()) return true;\n\t\t\tconst comparators = parsedComparatorString.split(/\\s+/).map((comparator) => parseGTE0(comparator)).filter(Boolean);\n\t\t\tif (comparators.length === 0) continue;\n\t\t\tlet subRangeSatisfied = true;\n\t\t\tfor (const comparator of comparators) {\n\t\t\t\tconst extractedComparator = extractComparator(comparator);\n\t\t\t\tif (!extractedComparator) {\n\t\t\t\t\tsubRangeSatisfied = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst [, rangeOperator, , rangeMajor, rangeMinor, rangePatch, rangePreRelease] = extractedComparator;\n\t\t\t\tif (!compare({\n\t\t\t\t\toperator: rangeOperator,\n\t\t\t\t\tversion: combineVersion(rangeMajor, rangeMinor, rangePatch, rangePreRelease),\n\t\t\t\t\tmajor: rangeMajor,\n\t\t\t\t\tminor: rangeMinor,\n\t\t\t\t\tpatch: rangePatch,\n\t\t\t\t\tpreRelease: rangePreRelease?.split(\".\")\n\t\t\t\t}, versionAtom)) {\n\t\t\t\t\tsubRangeSatisfied = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (subRangeSatisfied) return true;\n\t\t} catch (e) {\n\t\t\tconsole.error(`[semver] Error processing range part \"${trimmedOrRange}\":`, e);\n\t\t\tcontinue;\n\t\t}\n\t}\n\treturn false;\n}\n\n//#endregion\nexport { satisfy };\n//# sourceMappingURL=index.js.map","//#region src/constant.ts\nconst DEFAULT_SCOPE = \"default\";\nconst DEFAULT_REMOTE_TYPE = \"global\";\n\n//#endregion\nexport { DEFAULT_REMOTE_TYPE, DEFAULT_SCOPE };\n//# sourceMappingURL=constant.js.map","import { error, warn as warn$1 } from \"./logger.js\";\nimport { addUniqueItem, arrayOptions } from \"./tool.js\";\nimport { Global } from \"../global.js\";\nimport { DEFAULT_SCOPE } from \"../constant.js\";\nimport { satisfy } from \"./semver/index.js\";\nimport { TreeShakingStatus } from \"@module-federation/sdk\";\n\n//#region src/utils/share.ts\nfunction formatShare(shareArgs, from, name, shareStrategy) {\n\tlet get;\n\tif (\"get\" in shareArgs) get = shareArgs.get;\n\telse if (\"lib\" in shareArgs) get = () => Promise.resolve(shareArgs.lib);\n\telse get = () => Promise.resolve(() => {\n\t\terror(`Cannot get shared \"${name}\" from \"${from}\": neither \"get\" nor \"lib\" is provided in the share config.`);\n\t});\n\tif (shareArgs.shareConfig?.eager && shareArgs.treeShaking?.mode) error(`Invalid shared config for \"${name}\" from \"${from}\": cannot use both \"eager: true\" and \"treeShaking.mode\" simultaneously. Choose one strategy.`);\n\treturn {\n\t\tdeps: [],\n\t\tuseIn: [],\n\t\tfrom,\n\t\tloading: null,\n\t\t...shareArgs,\n\t\tshareConfig: {\n\t\t\trequiredVersion: `^${shareArgs.version}`,\n\t\t\tsingleton: false,\n\t\t\teager: false,\n\t\t\tstrictVersion: false,\n\t\t\t...shareArgs.shareConfig\n\t\t},\n\t\tget,\n\t\tloaded: shareArgs?.loaded || \"lib\" in shareArgs ? true : void 0,\n\t\tversion: shareArgs.version ?? \"0\",\n\t\tscope: Array.isArray(shareArgs.scope) ? shareArgs.scope : [shareArgs.scope ?? \"default\"],\n\t\tstrategy: (shareArgs.strategy ?? shareStrategy) || \"version-first\",\n\t\ttreeShaking: shareArgs.treeShaking ? {\n\t\t\t...shareArgs.treeShaking,\n\t\t\tmode: shareArgs.treeShaking.mode ?? \"server-calc\",\n\t\t\tstatus: shareArgs.treeShaking.status ?? TreeShakingStatus.UNKNOWN,\n\t\t\tuseIn: []\n\t\t} : void 0\n\t};\n}\nfunction formatShareConfigs(prevOptions, newOptions) {\n\tconst shareArgs = newOptions.shared || {};\n\tconst from = newOptions.name;\n\tconst newShareInfos = Object.keys(shareArgs).reduce((res, pkgName) => {\n\t\tconst arrayShareArgs = arrayOptions(shareArgs[pkgName]);\n\t\tres[pkgName] = res[pkgName] || [];\n\t\tarrayShareArgs.forEach((shareConfig) => {\n\t\t\tres[pkgName].push(formatShare(shareConfig, from, pkgName, newOptions.shareStrategy));\n\t\t});\n\t\treturn res;\n\t}, {});\n\tconst allShareInfos = { ...prevOptions.shared };\n\tObject.keys(newShareInfos).forEach((shareKey) => {\n\t\tif (!allShareInfos[shareKey]) allShareInfos[shareKey] = newShareInfos[shareKey];\n\t\telse newShareInfos[shareKey].forEach((newUserSharedOptions) => {\n\t\t\tif (!allShareInfos[shareKey].find((sharedVal) => sharedVal.version === newUserSharedOptions.version)) allShareInfos[shareKey].push(newUserSharedOptions);\n\t\t});\n\t});\n\treturn {\n\t\tallShareInfos,\n\t\tnewShareInfos\n\t};\n}\nfunction shouldUseTreeShaking(treeShaking, usedExports) {\n\tif (!treeShaking) return false;\n\tconst { status, mode } = treeShaking;\n\tif (status === TreeShakingStatus.NO_USE) return false;\n\tif (status === TreeShakingStatus.CALCULATED) return true;\n\tif (mode === \"runtime-infer\") {\n\t\tif (!usedExports) return true;\n\t\treturn isMatchUsedExports(treeShaking, usedExports);\n\t}\n\treturn false;\n}\n/**\n* compare version a and b, return true if a is less than b\n*/\nfunction versionLt(a, b) {\n\tconst transformInvalidVersion = (version) => {\n\t\tif (!Number.isNaN(Number(version))) {\n\t\t\tconst splitArr = version.split(\".\");\n\t\t\tlet validVersion = version;\n\t\t\tfor (let i = 0; i < 3 - splitArr.length; i++) validVersion += \".0\";\n\t\t\treturn validVersion;\n\t\t}\n\t\treturn version;\n\t};\n\tif (satisfy(transformInvalidVersion(a), `<=${transformInvalidVersion(b)}`)) return true;\n\telse return false;\n}\nconst findVersion = (shareVersionMap, cb) => {\n\tconst callback = cb || function(prev, cur) {\n\t\treturn versionLt(prev, cur);\n\t};\n\treturn Object.keys(shareVersionMap).reduce((prev, cur) => {\n\t\tif (!prev) return cur;\n\t\tif (callback(prev, cur)) return cur;\n\t\tif (prev === \"0\") return cur;\n\t\treturn prev;\n\t}, 0);\n};\nconst isLoaded = (shared) => {\n\treturn Boolean(shared.loaded) || typeof shared.lib === \"function\";\n};\nconst isLoading = (shared) => {\n\treturn Boolean(shared.loading);\n};\nconst isMatchUsedExports = (treeShaking, usedExports) => {\n\tif (!treeShaking || !usedExports) return false;\n\tconst { usedExports: treeShakingUsedExports } = treeShaking;\n\tif (!treeShakingUsedExports) return false;\n\tif (usedExports.every((e) => treeShakingUsedExports.includes(e))) return true;\n\treturn false;\n};\nfunction findSingletonVersionOrderByVersion(shareScopeMap, scope, pkgName, treeShaking) {\n\tconst versions = shareScopeMap[scope][pkgName];\n\tlet version = \"\";\n\tlet useTreesShaking = shouldUseTreeShaking(treeShaking);\n\tconst callback = function(prev, cur) {\n\t\tif (useTreesShaking) {\n\t\t\tif (!versions[prev].treeShaking) return true;\n\t\t\tif (!versions[cur].treeShaking) return false;\n\t\t\treturn !isLoaded(versions[prev].treeShaking) && versionLt(prev, cur);\n\t\t}\n\t\treturn !isLoaded(versions[prev]) && versionLt(prev, cur);\n\t};\n\tif (useTreesShaking) {\n\t\tversion = findVersion(shareScopeMap[scope][pkgName], callback);\n\t\tif (version) return {\n\t\t\tversion,\n\t\t\tuseTreesShaking\n\t\t};\n\t\tuseTreesShaking = false;\n\t}\n\treturn {\n\t\tversion: findVersion(shareScopeMap[scope][pkgName], callback),\n\t\tuseTreesShaking\n\t};\n}\nconst isLoadingOrLoaded = (shared) => {\n\treturn isLoaded(shared) || isLoading(shared);\n};\nfunction findSingletonVersionOrderByLoaded(shareScopeMap, scope, pkgName, treeShaking) {\n\tconst versions = shareScopeMap[scope][pkgName];\n\tlet version = \"\";\n\tlet useTreesShaking = shouldUseTreeShaking(treeShaking);\n\tconst callback = function(prev, cur) {\n\t\tif (useTreesShaking) {\n\t\t\tif (!versions[prev].treeShaking) return true;\n\t\t\tif (!versions[cur].treeShaking) return false;\n\t\t\tif (isLoadingOrLoaded(versions[cur].treeShaking)) if (isLoadingOrLoaded(versions[prev].treeShaking)) return Boolean(versionLt(prev, cur));\n\t\t\telse return true;\n\t\t\tif (isLoadingOrLoaded(versions[prev].treeShaking)) return false;\n\t\t}\n\t\tif (isLoadingOrLoaded(versions[cur])) if (isLoadingOrLoaded(versions[prev])) return Boolean(versionLt(prev, cur));\n\t\telse return true;\n\t\tif (isLoadingOrLoaded(versions[prev])) return false;\n\t\treturn versionLt(prev, cur);\n\t};\n\tif (useTreesShaking) {\n\t\tversion = findVersion(shareScopeMap[scope][pkgName], callback);\n\t\tif (version) return {\n\t\t\tversion,\n\t\t\tuseTreesShaking\n\t\t};\n\t\tuseTreesShaking = false;\n\t}\n\treturn {\n\t\tversion: findVersion(shareScopeMap[scope][pkgName], callback),\n\t\tuseTreesShaking\n\t};\n}\nfunction getFindShareFunction(strategy) {\n\tif (strategy === \"loaded-first\") return findSingletonVersionOrderByLoaded;\n\treturn findSingletonVersionOrderByVersion;\n}\nfunction getRegisteredShare(localShareScopeMap, pkgName, shareInfo, resolveShare) {\n\tif (!localShareScopeMap) return;\n\tconst { shareConfig, scope = DEFAULT_SCOPE, strategy, treeShaking } = shareInfo;\n\tconst scopes = Array.isArray(scope) ? scope : [scope];\n\tfor (const sc of scopes) if (shareConfig && localShareScopeMap[sc] && localShareScopeMap[sc][pkgName]) {\n\t\tconst { requiredVersion } = shareConfig;\n\t\tconst { version: maxOrSingletonVersion, useTreesShaking } = getFindShareFunction(strategy)(localShareScopeMap, sc, pkgName, treeShaking);\n\t\tconst defaultResolver = () => {\n\t\t\tconst shared = localShareScopeMap[sc][pkgName][maxOrSingletonVersion];\n\t\t\tif (shareConfig.singleton) {\n\t\t\t\tif (typeof requiredVersion === \"string\" && !satisfy(maxOrSingletonVersion, requiredVersion)) {\n\t\t\t\t\tconst msg = `Version ${maxOrSingletonVersion} from ${maxOrSingletonVersion && shared.from} of shared singleton module ${pkgName} does not satisfy the requirement of ${shareInfo.from} which needs ${requiredVersion})`;\n\t\t\t\t\tif (shareConfig.strictVersion) error(msg);\n\t\t\t\t\telse warn$1(msg);\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tshared,\n\t\t\t\t\tuseTreesShaking\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tif (requiredVersion === false || requiredVersion === \"*\") return {\n\t\t\t\t\tshared,\n\t\t\t\t\tuseTreesShaking\n\t\t\t\t};\n\t\t\t\tif (satisfy(maxOrSingletonVersion, requiredVersion)) return {\n\t\t\t\t\tshared,\n\t\t\t\t\tuseTreesShaking\n\t\t\t\t};\n\t\t\t\tconst _usedTreeShaking = shouldUseTreeShaking(treeShaking);\n\t\t\t\tif (_usedTreeShaking) for (const [versionKey, versionValue] of Object.entries(localShareScopeMap[sc][pkgName])) {\n\t\t\t\t\tif (!shouldUseTreeShaking(versionValue.treeShaking, treeShaking?.usedExports)) continue;\n\t\t\t\t\tif (satisfy(versionKey, requiredVersion)) return {\n\t\t\t\t\t\tshared: versionValue,\n\t\t\t\t\t\tuseTreesShaking: _usedTreeShaking\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tfor (const [versionKey, versionValue] of Object.entries(localShareScopeMap[sc][pkgName])) if (satisfy(versionKey, requiredVersion)) return {\n\t\t\t\t\tshared: versionValue,\n\t\t\t\t\tuseTreesShaking: false\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tconst params = {\n\t\t\tshareScopeMap: localShareScopeMap,\n\t\t\tscope: sc,\n\t\t\tpkgName,\n\t\t\tversion: maxOrSingletonVersion,\n\t\t\tGlobalFederation: Global.__FEDERATION__,\n\t\t\tshareInfo,\n\t\t\tresolver: defaultResolver\n\t\t};\n\t\treturn (resolveShare.emit(params) || params).resolver();\n\t}\n}\nfunction getGlobalShareScope() {\n\treturn Global.__FEDERATION__.__SHARE__;\n}\nfunction getTargetSharedOptions(options) {\n\tconst { pkgName, extraOptions, shareInfos } = options;\n\tconst defaultResolver = (sharedOptions) => {\n\t\tif (!sharedOptions) return;\n\t\tconst shareVersionMap = {};\n\t\tsharedOptions.forEach((shared) => {\n\t\t\tshareVersionMap[shared.version] = shared;\n\t\t});\n\t\tconst callback = function(prev, cur) {\n\t\t\treturn !isLoaded(shareVersionMap[prev]) && versionLt(prev, cur);\n\t\t};\n\t\treturn shareVersionMap[findVersion(shareVersionMap, callback)];\n\t};\n\tconst resolver = extraOptions?.resolver ?? defaultResolver;\n\tconst isPlainObject = (val) => {\n\t\treturn val !== null && typeof val === \"object\" && !Array.isArray(val);\n\t};\n\tconst merge = (...sources) => {\n\t\tconst out = {};\n\t\tfor (const src of sources) {\n\t\t\tif (!src) continue;\n\t\t\tfor (const [key, value] of Object.entries(src)) {\n\t\t\t\tconst prev = out[key];\n\t\t\t\tif (isPlainObject(prev) && isPlainObject(value)) out[key] = merge(prev, value);\n\t\t\t\telse if (value !== void 0) out[key] = value;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t};\n\treturn merge(resolver(shareInfos[pkgName]), extraOptions?.customShareInfo);\n}\nconst addUseIn = (shared, from) => {\n\tif (!shared.useIn) shared.useIn = [];\n\taddUniqueItem(shared.useIn, from);\n};\nfunction directShare(shared, useTreesShaking) {\n\tif (useTreesShaking && shared.treeShaking) return shared.treeShaking;\n\treturn shared;\n}\n\n//#endregion\nexport { addUseIn, directShare, formatShareConfigs, getGlobalShareScope, getRegisteredShare, getTargetSharedOptions, shouldUseTreeShaking };\n//# sourceMappingURL=share.js.map","//#region src/utils/manifest.ts\nfunction composeRemoteRequestId(remoteName, expose) {\n\tif (!expose || expose === \".\") return remoteName;\n\treturn `${remoteName}/${expose.replace(/^\\.\\//, \"\")}`;\n}\nfunction matchRemoteWithNameAndExpose(remotes, id) {\n\tfor (const remote of remotes) {\n\t\tconst isNameMatched = id.startsWith(remote.name);\n\t\tlet expose = id.replace(remote.name, \"\");\n\t\tif (isNameMatched) {\n\t\t\tif (expose.startsWith(\"/\")) {\n\t\t\t\tconst pkgNameOrAlias = remote.name;\n\t\t\t\texpose = `.${expose}`;\n\t\t\t\treturn {\n\t\t\t\t\tpkgNameOrAlias,\n\t\t\t\t\texpose,\n\t\t\t\t\tremote\n\t\t\t\t};\n\t\t\t} else if (expose === \"\") return {\n\t\t\t\tpkgNameOrAlias: remote.name,\n\t\t\t\texpose: \".\",\n\t\t\t\tremote\n\t\t\t};\n\t\t}\n\t\tconst isAliasMatched = remote.alias && id.startsWith(remote.alias);\n\t\tlet exposeWithAlias = remote.alias && id.replace(remote.alias, \"\");\n\t\tif (remote.alias && isAliasMatched) {\n\t\t\tif (exposeWithAlias && exposeWithAlias.startsWith(\"/\")) {\n\t\t\t\tconst pkgNameOrAlias = remote.alias;\n\t\t\t\texposeWithAlias = `.${exposeWithAlias}`;\n\t\t\t\treturn {\n\t\t\t\t\tpkgNameOrAlias,\n\t\t\t\t\texpose: exposeWithAlias,\n\t\t\t\t\tremote\n\t\t\t\t};\n\t\t\t} else if (exposeWithAlias === \"\") return {\n\t\t\t\tpkgNameOrAlias: remote.alias,\n\t\t\t\texpose: \".\",\n\t\t\t\tremote\n\t\t\t};\n\t\t}\n\t}\n}\nfunction matchRemote(remotes, nameOrAlias) {\n\tfor (const remote of remotes) {\n\t\tif (nameOrAlias === remote.name) return remote;\n\t\tif (remote.alias && nameOrAlias === remote.alias) return remote;\n\t}\n}\n\n//#endregion\nexport { composeRemoteRequestId, matchRemote, matchRemoteWithNameAndExpose };\n//# sourceMappingURL=manifest.js.map","//#region src/error-codes.ts\nconst RUNTIME_001 = \"RUNTIME-001\";\nconst RUNTIME_002 = \"RUNTIME-002\";\nconst RUNTIME_003 = \"RUNTIME-003\";\nconst RUNTIME_004 = \"RUNTIME-004\";\nconst RUNTIME_005 = \"RUNTIME-005\";\nconst RUNTIME_006 = \"RUNTIME-006\";\nconst RUNTIME_007 = \"RUNTIME-007\";\nconst RUNTIME_008 = \"RUNTIME-008\";\nconst RUNTIME_009 = \"RUNTIME-009\";\nconst RUNTIME_010 = \"RUNTIME-010\";\nconst RUNTIME_011 = \"RUNTIME-011\";\nconst RUNTIME_012 = \"RUNTIME-012\";\nconst RUNTIME_013 = \"RUNTIME-013\";\nconst RUNTIME_014 = \"RUNTIME-014\";\nconst RUNTIME_015 = \"RUNTIME-015\";\nconst TYPE_001 = \"TYPE-001\";\nconst BUILD_001 = \"BUILD-001\";\nconst BUILD_002 = \"BUILD-002\";\n\n//#endregion\nexport { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, RUNTIME_012, RUNTIME_013, RUNTIME_014, RUNTIME_015, TYPE_001 };\n//# sourceMappingURL=error-codes.mjs.map","import { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, RUNTIME_012, RUNTIME_013, RUNTIME_014, RUNTIME_015, TYPE_001 } from \"./error-codes.mjs\";\n\n//#region src/desc.ts\nconst runtimeDescMap = {\n\t[RUNTIME_001]: \"Failed to get remoteEntry exports.\",\n\t[RUNTIME_002]: \"The remote entry interface does not contain \\\"init\\\"\",\n\t[RUNTIME_003]: \"Failed to get manifest.\",\n\t[RUNTIME_004]: \"Failed to locate remote.\",\n\t[RUNTIME_005]: \"Invalid loadShareSync function call from bundler runtime\",\n\t[RUNTIME_006]: \"Invalid loadShareSync function call from runtime\",\n\t[RUNTIME_007]: \"Failed to get remote snapshot.\",\n\t[RUNTIME_008]: \"Failed to load script resources.\",\n\t[RUNTIME_009]: \"Please call createInstance first.\",\n\t[RUNTIME_010]: \"The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use \\\"createInstance\\\" api.\",\n\t[RUNTIME_011]: \"The remoteEntry URL is missing from the remote snapshot.\",\n\t[RUNTIME_012]: \"The getter for the shared module is not a function. This may be caused by setting \\\"shared.import: false\\\" without the host providing the corresponding lib.\",\n\t[RUNTIME_013]: \"The manifest is not a valid Module Federation manifest.\",\n\t[RUNTIME_014]: \"The remote does not expose the requested module.\",\n\t[RUNTIME_015]: \"Remote container initialization failed.\"\n};\nconst typeDescMap = { [TYPE_001]: \"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.\" };\nconst buildDescMap = {\n\t[BUILD_001]: \"Failed to find expose module.\",\n\t[BUILD_002]: \"PublicPath is required in prod mode.\"\n};\nconst errorDescMap = {\n\t...runtimeDescMap,\n\t...typeDescMap,\n\t...buildDescMap\n};\n\n//#endregion\nexport { buildDescMap, errorDescMap, runtimeDescMap, typeDescMap };\n//# sourceMappingURL=desc.mjs.map","import { error } from \"./logger.js\";\nimport { getRemoteEntryExports, globalLoading } from \"../global.js\";\nimport { DEFAULT_REMOTE_TYPE, DEFAULT_SCOPE } from \"../constant.js\";\nimport { composeKeyWithSeparator, isBrowserEnvValue, loadScript, loadScriptNode } from \"@module-federation/sdk\";\nimport { RUNTIME_001, RUNTIME_008, runtimeDescMap } from \"@module-federation/error-codes\";\n\n//#region src/utils/load.ts\nconst importCallback = \".then(callbacks[0]).catch(callbacks[1])\";\nconst esmRemoteEntryLoadErrorMessages = [\n\t\"Failed to fetch dynamically imported module\",\n\t\"Importing a module script failed\",\n\t\"error loading dynamically imported module\"\n];\nfunction isEsmRemoteEntryLoadError(err) {\n\tif (!(err instanceof TypeError)) return false;\n\treturn esmRemoteEntryLoadErrorMessages.some((loadErrorMessage) => err.message.includes(loadErrorMessage));\n}\nfunction isEsmRemoteType(type) {\n\treturn type === \"esm\" || type === \"module\";\n}\nasync function loadEsmEntry({ entry, remoteEntryExports, name, getEntryUrl }) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst rejectEntry = (loadError) => {\n\t\t\tif (isEsmRemoteEntryLoadError(loadError)) {\n\t\t\t\tconst originalMsg = loadError instanceof Error ? loadError.message : String(loadError);\n\t\t\t\ttry {\n\t\t\t\t\terror(RUNTIME_008, runtimeDescMap, {\n\t\t\t\t\t\tremoteName: name,\n\t\t\t\t\t\tresourceUrl: url\n\t\t\t\t\t}, originalMsg);\n\t\t\t\t} catch (runtimeError) {\n\t\t\t\t\treject(runtimeError);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\treject(loadError);\n\t\t};\n\t\tconst url = getEntryUrl ? getEntryUrl(entry) : entry;\n\t\ttry {\n\t\t\tif (!remoteEntryExports) if (typeof FEDERATION_ALLOW_NEW_FUNCTION !== \"undefined\") new Function(\"callbacks\", `import(\"${url}\")${importCallback}`)([resolve, rejectEntry]);\n\t\t\telse import(\n\t\t\t\t/* webpackIgnore: true */\n\t\t\t\t/* @vite-ignore */\n\t\t\t\turl\n).then(resolve).catch(rejectEntry);\n\t\t\telse resolve(remoteEntryExports);\n\t\t} catch (e) {\n\t\t\terror(`Failed to load ESM entry from \"${url}\". ${e instanceof Error ? e.message : String(e)}`);\n\t\t}\n\t});\n}\nasync function loadSystemJsEntry({ entry, remoteEntryExports }) {\n\treturn new Promise((resolve, reject) => {\n\t\ttry {\n\t\t\tif (!remoteEntryExports) if (typeof __system_context__ === \"undefined\") System.import(entry).then(resolve).catch(reject);\n\t\t\telse new Function(\"callbacks\", `System.import(\"${entry}\")${importCallback}`)([resolve, reject]);\n\t\t\telse resolve(remoteEntryExports);\n\t\t} catch (e) {\n\t\t\terror(`Failed to load SystemJS entry from \"${entry}\". ${e instanceof Error ? e.message : String(e)}`);\n\t\t}\n\t});\n}\nfunction handleRemoteEntryLoaded(name, globalName, entry) {\n\tconst { remoteEntryKey, entryExports } = getRemoteEntryExports(name, globalName);\n\tif (!entryExports) error(RUNTIME_001, runtimeDescMap, {\n\t\tremoteName: name,\n\t\tremoteEntryUrl: entry,\n\t\tremoteEntryKey\n\t});\n\treturn entryExports;\n}\nasync function loadEntryScript({ name, globalName, entry, remoteInfo, loaderHook, getEntryUrl, resourceContext }) {\n\tconst { entryExports: remoteEntryExports } = getRemoteEntryExports(name, globalName);\n\tif (remoteEntryExports) return remoteEntryExports;\n\tconst url = getEntryUrl ? getEntryUrl(entry) : entry;\n\treturn loadScript(url, {\n\t\tattrs: {},\n\t\tcreateScriptHook: (url, attrs) => {\n\t\t\tconst res = loaderHook.lifecycle.createScript.emit({\n\t\t\t\turl,\n\t\t\t\tattrs,\n\t\t\t\tremoteInfo,\n\t\t\t\tresourceContext: resourceContext ? {\n\t\t\t\t\t...resourceContext,\n\t\t\t\t\turl\n\t\t\t\t} : void 0\n\t\t\t});\n\t\t\tif (!res) return;\n\t\t\tif (res instanceof HTMLScriptElement) return res;\n\t\t\tif (\"script\" in res || \"timeout\" in res) return res;\n\t\t}\n\t}).then(() => {\n\t\treturn handleRemoteEntryLoaded(name, globalName, entry);\n\t}, (loadError) => {\n\t\tconst originalMsg = loadError instanceof Error ? loadError.message : String(loadError);\n\t\terror(RUNTIME_008, runtimeDescMap, {\n\t\t\tremoteName: name,\n\t\t\tresourceUrl: url\n\t\t}, originalMsg);\n\t});\n}\nasync function loadEntryDom({ remoteInfo, remoteEntryExports, loaderHook, getEntryUrl, resourceContext }) {\n\tconst { entry, entryGlobalName: globalName, name, type } = remoteInfo;\n\tif (isEsmRemoteType(type)) return loadEsmEntry({\n\t\tentry,\n\t\tremoteEntryExports,\n\t\tname,\n\t\tgetEntryUrl\n\t});\n\tif (type === \"system\") return loadSystemJsEntry({\n\t\tentry,\n\t\tremoteEntryExports\n\t});\n\treturn loadEntryScript({\n\t\tentry,\n\t\tglobalName,\n\t\tname,\n\t\tremoteInfo,\n\t\tloaderHook,\n\t\tgetEntryUrl,\n\t\tresourceContext\n\t});\n}\nasync function loadEntryNode({ remoteInfo, loaderHook, resourceContext }) {\n\tconst { entry, entryGlobalName: globalName, name, type } = remoteInfo;\n\tconst { entryExports: remoteEntryExports } = getRemoteEntryExports(name, globalName);\n\tif (remoteEntryExports) return remoteEntryExports;\n\treturn loadScriptNode(entry, {\n\t\tattrs: {\n\t\t\tname,\n\t\t\tglobalName,\n\t\t\ttype\n\t\t},\n\t\tloaderHook: { createScriptHook: (url, attrs = {}) => {\n\t\t\tconst res = loaderHook.lifecycle.createScript.emit({\n\t\t\t\turl,\n\t\t\t\tattrs,\n\t\t\t\tremoteInfo,\n\t\t\t\tresourceContext: resourceContext ? {\n\t\t\t\t\t...resourceContext,\n\t\t\t\t\turl\n\t\t\t\t} : void 0\n\t\t\t});\n\t\t\tif (!res) return;\n\t\t\tif (\"url\" in res) return res;\n\t\t} }\n\t}).then(() => {\n\t\treturn handleRemoteEntryLoaded(name, globalName, entry);\n\t}).catch((e) => {\n\t\terror(`Failed to load Node.js entry for remote \"${name}\" from \"${entry}\". ${e instanceof Error ? e.message : String(e)}`);\n\t});\n}\nfunction getRemoteEntryUniqueKey(remoteInfo) {\n\tconst { entry, name } = remoteInfo;\n\treturn composeKeyWithSeparator(name, entry);\n}\nasync function getRemoteEntry(params) {\n\tconst { origin, remoteEntryExports, remoteInfo, getEntryUrl, resourceContext, _inErrorHandling = false } = params;\n\tconst uniqueKey = getRemoteEntryUniqueKey(remoteInfo);\n\tif (remoteEntryExports) return remoteEntryExports;\n\tif (!globalLoading[uniqueKey]) {\n\t\tconst loadEntryHook = origin.remoteHandler.hooks.lifecycle.loadEntry;\n\t\tconst loaderHook = origin.loaderHook;\n\t\tglobalLoading[uniqueKey] = loadEntryHook.emit({\n\t\t\torigin,\n\t\t\tloaderHook,\n\t\t\tremoteInfo,\n\t\t\tremoteEntryExports\n\t\t}).then((res) => {\n\t\t\tif (res) return res;\n\t\t\treturn (typeof ENV_TARGET !== \"undefined\" ? ENV_TARGET === \"web\" : isBrowserEnvValue) ? loadEntryDom({\n\t\t\t\tremoteInfo,\n\t\t\t\tremoteEntryExports,\n\t\t\t\tloaderHook,\n\t\t\t\tgetEntryUrl,\n\t\t\t\tresourceContext\n\t\t\t}) : loadEntryNode({\n\t\t\t\tremoteInfo,\n\t\t\t\tloaderHook,\n\t\t\t\tresourceContext\n\t\t\t});\n\t\t}).then(async (res) => {\n\t\t\tawait origin.loaderHook.lifecycle.afterLoadEntry.emit({\n\t\t\t\torigin,\n\t\t\t\tremoteInfo,\n\t\t\t\tremoteEntryExports: res\n\t\t\t});\n\t\t\treturn res;\n\t\t}).catch(async (err) => {\n\t\t\tconst uniqueKey = getRemoteEntryUniqueKey(remoteInfo);\n\t\t\tconst isScriptExecutionError = err instanceof Error && err.message.includes(\"ScriptExecutionError\");\n\t\t\tif (err instanceof Error && err.message.includes(RUNTIME_008) && !isScriptExecutionError && !_inErrorHandling) {\n\t\t\t\tconst wrappedGetRemoteEntry = (params) => {\n\t\t\t\t\treturn getRemoteEntry({\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\t_inErrorHandling: true\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\tconst RemoteEntryExports = await origin.loaderHook.lifecycle.loadEntryError.emit({\n\t\t\t\t\tgetRemoteEntry: wrappedGetRemoteEntry,\n\t\t\t\t\torigin,\n\t\t\t\t\tremoteInfo,\n\t\t\t\t\tremoteEntryExports,\n\t\t\t\t\tglobalLoading,\n\t\t\t\t\tuniqueKey\n\t\t\t\t});\n\t\t\t\tif (RemoteEntryExports) {\n\t\t\t\t\tawait origin.loaderHook.lifecycle.afterLoadEntry.emit({\n\t\t\t\t\t\torigin,\n\t\t\t\t\t\tremoteInfo,\n\t\t\t\t\t\tremoteEntryExports: RemoteEntryExports,\n\t\t\t\t\t\trecovered: true\n\t\t\t\t\t});\n\t\t\t\t\treturn RemoteEntryExports;\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait origin.loaderHook.lifecycle.afterLoadEntry.emit({\n\t\t\t\torigin,\n\t\t\t\tremoteInfo,\n\t\t\t\terror: err\n\t\t\t});\n\t\t\tthrow err;\n\t\t});\n\t}\n\treturn globalLoading[uniqueKey];\n}\nfunction getRemoteInfo(remote) {\n\treturn {\n\t\t...remote,\n\t\tentry: \"entry\" in remote ? remote.entry : \"\",\n\t\ttype: remote.type || DEFAULT_REMOTE_TYPE,\n\t\tentryGlobalName: remote.entryGlobalName || remote.name,\n\t\tshareScope: remote.shareScope || DEFAULT_SCOPE\n\t};\n}\n\n//#endregion\nexport { getRemoteEntry, getRemoteEntryUniqueKey, getRemoteInfo, isEsmRemoteType };\n//# sourceMappingURL=load.js.map","import \"@module-federation/sdk\";\n\n//#region src/utils/env.ts\nfunction getBuilderId() {\n\treturn typeof FEDERATION_BUILD_IDENTIFIER !== \"undefined\" ? FEDERATION_BUILD_IDENTIFIER : \"\";\n}\n\n//#endregion\nexport { getBuilderId };\n//# sourceMappingURL=env.js.map","import { getGlobalHostPlugins } from \"../global.js\";\n\n//#region src/utils/plugin.ts\nfunction registerPlugins(plugins, instance) {\n\tconst globalPlugins = getGlobalHostPlugins();\n\tconst hookInstances = [\n\t\tinstance.hooks,\n\t\tinstance.remoteHandler.hooks,\n\t\tinstance.sharedHandler.hooks,\n\t\tinstance.snapshotHandler.hooks,\n\t\tinstance.loaderHook,\n\t\tinstance.bridgeHook\n\t];\n\tif (globalPlugins.length > 0) globalPlugins.forEach((plugin) => {\n\t\tif (plugins?.find((item) => item.name !== plugin.name)) plugins.push(plugin);\n\t});\n\tif (plugins && plugins.length > 0) plugins.forEach((plugin) => {\n\t\thookInstances.forEach((hookInstance) => {\n\t\t\thookInstance.applyPlugin(plugin, instance);\n\t\t});\n\t});\n\treturn plugins;\n}\n\n//#endregion\nexport { registerPlugins };\n//# sourceMappingURL=plugin.js.map","//#region src/utils/context.ts\nfunction remoteToEntry(r) {\n\treturn {\n\t\tname: r.name,\n\t\talias: r.alias,\n\t\tentry: \"entry\" in r ? r.entry : void 0,\n\t\tversion: \"version\" in r ? r.version : void 0,\n\t\ttype: r.type,\n\t\tentryGlobalName: r.entryGlobalName,\n\t\tshareScope: r.shareScope\n\t};\n}\n/**\n* Build a partial MFContext from runtime Options.\n* Used to enrich diagnostic entries with host context at error sites.\n*/\nfunction optionsToMFContext(options) {\n\tconst shared = {};\n\tfor (const [pkgName, versions] of Object.entries(options.shared)) {\n\t\tconst first = versions[0];\n\t\tif (first) shared[pkgName] = {\n\t\t\tversion: first.version,\n\t\t\tsingleton: first.shareConfig?.singleton,\n\t\t\trequiredVersion: first.shareConfig?.requiredVersion === false ? false : first.shareConfig?.requiredVersion,\n\t\t\teager: first.eager,\n\t\t\tstrictVersion: first.shareConfig?.strictVersion\n\t\t};\n\t}\n\treturn {\n\t\tproject: {\n\t\t\tname: options.name,\n\t\t\tmfRole: options.remotes?.length > 0 ? \"host\" : \"unknown\"\n\t\t},\n\t\tmfConfig: {\n\t\t\tname: options.name,\n\t\t\tremotes: options.remotes?.map(remoteToEntry) ?? [],\n\t\t\tshared\n\t\t}\n\t};\n}\n\n//#endregion\nexport { optionsToMFContext };\n//# sourceMappingURL=context.js.map","import { assert } from \"./logger.js\";\nimport { matchRemote } from \"./manifest.js\";\nimport { getRemoteEntry, isEsmRemoteType } from \"./load.js\";\nimport { createLink, createScript, safeToString } from \"@module-federation/sdk\";\n\n//#region src/utils/preload.ts\nfunction defaultPreloadArgs(preloadConfig) {\n\treturn {\n\t\tresourceCategory: \"sync\",\n\t\tshare: true,\n\t\tdepsRemote: true,\n\t\t...preloadConfig\n\t};\n}\nfunction formatPreloadArgs(remotes, preloadArgs) {\n\treturn preloadArgs.map((args) => {\n\t\tconst remoteInfo = matchRemote(remotes, args.nameOrAlias);\n\t\tassert(remoteInfo, `Unable to preload ${args.nameOrAlias} as it is not included in ${!remoteInfo && safeToString({\n\t\t\tremoteInfo,\n\t\t\tremotes\n\t\t})}`);\n\t\treturn {\n\t\t\tremote: remoteInfo,\n\t\t\tpreloadConfig: defaultPreloadArgs(args)\n\t\t};\n\t});\n}\nfunction normalizePreloadExposes(exposes) {\n\tif (!exposes) return [];\n\treturn exposes.map((expose) => {\n\t\tif (expose === \".\") return expose;\n\t\tif (expose.startsWith(\"./\")) return expose.replace(\"./\", \"\");\n\t\treturn expose;\n\t});\n}\nfunction isTimeoutError(error) {\n\tif (!(error instanceof Error)) return false;\n\treturn error.message.includes(\"timed out\") || error.name.includes(\"Timeout\");\n}\nfunction createAssetResult(context, url, status, error) {\n\treturn {\n\t\turl,\n\t\tstatus,\n\t\tresourceType: context.resourceType,\n\t\tinitiator: context.initiator,\n\t\tid: context.id,\n\t\terror\n\t};\n}\nasync function waitForRemoteEntryPreload(host, remoteInfo, entryRemoteInfo, context) {\n\tconst cachedRemote = host.moduleCache.get(entryRemoteInfo.name);\n\tconst url = entryRemoteInfo.entry;\n\tif (cachedRemote?.remoteEntryExports) return createAssetResult(context, url, \"cached\");\n\ttry {\n\t\tif (!await getRemoteEntry({\n\t\t\torigin: host,\n\t\t\tremoteInfo: entryRemoteInfo,\n\t\t\tremoteEntryExports: cachedRemote?.remoteEntryExports,\n\t\t\tresourceContext: {\n\t\t\t\t...context,\n\t\t\t\turl\n\t\t\t}\n\t\t})) throw new Error(`Failed to load remoteEntry \"${url}\".`);\n\t\treturn createAssetResult(context, url, \"success\");\n\t} catch (error) {\n\t\treturn createAssetResult(context, url, isTimeoutError(error) ? \"timeout\" : \"error\", error);\n\t}\n}\nfunction waitForLinkPreload({ host, remoteInfo, url, attrs, context, needDeleteLink }) {\n\treturn new Promise((resolve) => {\n\t\tconst { link, needAttach } = createLink({\n\t\t\turl,\n\t\t\tcb: () => {\n\t\t\t\tresolve(createAssetResult(context, url, needAttach ? \"success\" : \"cached\"));\n\t\t\t},\n\t\t\tonErrorCallback: (error) => {\n\t\t\t\tresolve(createAssetResult(context, url, isTimeoutError(error) ? \"timeout\" : \"error\", error));\n\t\t\t},\n\t\t\tattrs,\n\t\t\tcreateLinkHook: (hookUrl, hookAttrs) => {\n\t\t\t\tconst res = host.loaderHook.lifecycle.createLink.emit({\n\t\t\t\t\turl: hookUrl,\n\t\t\t\t\tattrs: hookAttrs,\n\t\t\t\t\tremoteInfo,\n\t\t\t\t\tresourceContext: {\n\t\t\t\t\t\t...context,\n\t\t\t\t\t\turl: hookUrl\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (res instanceof HTMLLinkElement) return res;\n\t\t\t\treturn res;\n\t\t\t},\n\t\t\tneedDeleteLink\n\t\t});\n\t\tneedAttach && document.head.appendChild(link);\n\t});\n}\nfunction waitForScriptPreload({ host, remoteInfo, url, attrs, context }) {\n\treturn new Promise((resolve) => {\n\t\tconst { script, needAttach } = createScript({\n\t\t\turl,\n\t\t\tcb: () => {\n\t\t\t\tresolve(createAssetResult(context, url, needAttach ? \"success\" : \"cached\"));\n\t\t\t},\n\t\t\tonErrorCallback: (error) => {\n\t\t\t\tresolve(createAssetResult(context, url, isTimeoutError(error) ? \"timeout\" : \"error\", error));\n\t\t\t},\n\t\t\tattrs,\n\t\t\tcreateScriptHook: (hookUrl, hookAttrs) => {\n\t\t\t\tconst res = host.loaderHook.lifecycle.createScript.emit({\n\t\t\t\t\turl: hookUrl,\n\t\t\t\t\tattrs: hookAttrs,\n\t\t\t\t\tremoteInfo,\n\t\t\t\t\tresourceContext: {\n\t\t\t\t\t\t...context,\n\t\t\t\t\t\turl: hookUrl\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (res instanceof HTMLScriptElement) return res;\n\t\t\t\treturn res;\n\t\t\t},\n\t\t\tneedDeleteScript: true\n\t\t});\n\t\tneedAttach && document.head.appendChild(script);\n\t});\n}\nfunction createResourceContext(baseContext, resourceType) {\n\treturn {\n\t\t...baseContext,\n\t\tresourceType\n\t};\n}\nfunction preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseContext = {\n\tinitiator: \"preloadRemote\",\n\tid: remoteInfo.name\n}) {\n\tconst { cssAssets, jsAssetsWithoutEntry, entryAssets } = assets;\n\tconst results = [];\n\tif (host.options.inBrowser) {\n\t\tentryAssets.forEach((asset) => {\n\t\t\tconst { moduleInfo: entryRemoteInfo } = asset;\n\t\t\tresults.push(waitForRemoteEntryPreload(host, remoteInfo, entryRemoteInfo, createResourceContext(baseContext, \"remoteEntry\")));\n\t\t});\n\t\tif (useLinkPreload) {\n\t\t\tconst defaultAttrs = {\n\t\t\t\trel: \"preload\",\n\t\t\t\tas: \"style\"\n\t\t\t};\n\t\t\tcssAssets.forEach((cssUrl) => {\n\t\t\t\tresults.push(waitForLinkPreload({\n\t\t\t\t\thost,\n\t\t\t\t\tremoteInfo,\n\t\t\t\t\turl: cssUrl,\n\t\t\t\t\tattrs: defaultAttrs,\n\t\t\t\t\tcontext: createResourceContext(baseContext, \"css\")\n\t\t\t\t}));\n\t\t\t});\n\t\t} else {\n\t\t\tconst defaultAttrs = {\n\t\t\t\trel: \"stylesheet\",\n\t\t\t\ttype: \"text/css\"\n\t\t\t};\n\t\t\tcssAssets.forEach((cssUrl) => {\n\t\t\t\tresults.push(waitForLinkPreload({\n\t\t\t\t\thost,\n\t\t\t\t\tremoteInfo,\n\t\t\t\t\turl: cssUrl,\n\t\t\t\t\tattrs: defaultAttrs,\n\t\t\t\t\tneedDeleteLink: false,\n\t\t\t\t\tcontext: createResourceContext(baseContext, \"css\")\n\t\t\t\t}));\n\t\t\t});\n\t\t}\n\t\tlet preloadJsAsset = waitForScriptPreload;\n\t\tlet defaultAttrs = {\n\t\t\tfetchpriority: \"high\",\n\t\t\ttype: \"text/javascript\"\n\t\t};\n\t\tif (useLinkPreload) {\n\t\t\tpreloadJsAsset = waitForLinkPreload;\n\t\t\tdefaultAttrs = {\n\t\t\t\trel: \"preload\",\n\t\t\t\tas: \"script\"\n\t\t\t};\n\t\t} else if (isEsmRemoteType(remoteInfo.type)) {\n\t\t\tpreloadJsAsset = waitForLinkPreload;\n\t\t\tdefaultAttrs = {\n\t\t\t\trel: \"modulepreload\",\n\t\t\t\tfetchpriority: \"high\"\n\t\t\t};\n\t\t}\n\t\tjsAssetsWithoutEntry.forEach((jsUrl) => {\n\t\t\tresults.push(preloadJsAsset({\n\t\t\t\thost,\n\t\t\t\tremoteInfo,\n\t\t\t\turl: jsUrl,\n\t\t\t\tattrs: defaultAttrs,\n\t\t\t\tcontext: createResourceContext(baseContext, \"js\")\n\t\t\t}));\n\t\t});\n\t}\n\treturn Promise.all(results);\n}\n\n//#endregion\nexport { defaultPreloadArgs, formatPreloadArgs, normalizePreloadExposes, preloadAssets };\n//# sourceMappingURL=preload.js.map","import { Global, addGlobalSnapshot, getGlobalFederationConstructor, getGlobalHostPlugins, getGlobalSnapshot, getGlobalSnapshotInfoByModuleInfo, getInfoWithoutType, getPreloaded, getRemoteEntryExports, getTargetSnapshotInfoByModuleInfo, nativeGlobal, registerGlobalPlugins, resetFederationGlobalInfo, setGlobalFederationConstructor, setGlobalFederationInstance, setGlobalSnapshotInfoByModuleInfo, setPreloaded } from \"./global.js\";\nimport { getGlobalShareScope, getRegisteredShare } from \"./utils/share.js\";\nimport { matchRemoteWithNameAndExpose } from \"./utils/manifest.js\";\nimport { getRemoteInfo } from \"./utils/load.js\";\nimport \"./utils/index.js\";\nimport { preloadAssets } from \"./utils/preload.js\";\n\n//#region src/helpers.ts\nconst ShareUtils = {\n\tgetRegisteredShare,\n\tgetGlobalShareScope\n};\nconst GlobalUtils = {\n\tGlobal,\n\tnativeGlobal,\n\tresetFederationGlobalInfo,\n\tsetGlobalFederationInstance,\n\tgetGlobalFederationConstructor,\n\tsetGlobalFederationConstructor,\n\tgetInfoWithoutType,\n\tgetGlobalSnapshot,\n\tgetTargetSnapshotInfoByModuleInfo,\n\tgetGlobalSnapshotInfoByModuleInfo,\n\tsetGlobalSnapshotInfoByModuleInfo,\n\taddGlobalSnapshot,\n\tgetRemoteEntryExports,\n\tregisterGlobalPlugins,\n\tgetGlobalHostPlugins,\n\tgetPreloaded,\n\tsetPreloaded\n};\nvar helpers_default = {\n\tglobal: GlobalUtils,\n\tshare: ShareUtils,\n\tutils: {\n\t\tmatchRemoteWithNameAndExpose,\n\t\tpreloadAssets,\n\t\tgetRemoteInfo\n\t}\n};\n\n//#endregion\nexport { helpers_default as default };\n//# sourceMappingURL=helpers.js.map","import { assert, error } from \"../utils/logger.js\";\nimport { processModuleAlias } from \"../utils/tool.js\";\nimport { composeRemoteRequestId } from \"../utils/manifest.js\";\nimport { getRemoteEntry } from \"../utils/load.js\";\nimport { optionsToMFContext } from \"../utils/context.js\";\nimport \"../utils/index.js\";\nimport { safeToString } from \"@module-federation/sdk\";\nimport { RUNTIME_002, RUNTIME_014, RUNTIME_015, runtimeDescMap } from \"@module-federation/error-codes\";\n\n//#region src/module/index.ts\nfunction getAvailableExposeNames(remoteSnapshot) {\n\tif (!remoteSnapshot || !(\"modules\" in remoteSnapshot) || !Array.isArray(remoteSnapshot.modules)) return;\n\tconst exposes = remoteSnapshot.modules.map((module) => module.moduleName).filter(Boolean);\n\treturn exposes.length ? exposes.join(\",\") : void 0;\n}\nfunction createRemoteEntryInitOptions(remoteInfo, hostShareScopeMap, rawInitScope) {\n\tconst localShareScopeMap = hostShareScopeMap;\n\tconst shareScopeKeys = Array.isArray(remoteInfo.shareScope) ? remoteInfo.shareScope : [remoteInfo.shareScope];\n\tif (!shareScopeKeys.length) shareScopeKeys.push(\"default\");\n\tshareScopeKeys.forEach((shareScopeKey) => {\n\t\tif (!localShareScopeMap[shareScopeKey]) localShareScopeMap[shareScopeKey] = {};\n\t});\n\tconst remoteEntryInitOptions = {\n\t\tversion: remoteInfo.version || \"\",\n\t\tshareScopeKeys: Array.isArray(remoteInfo.shareScope) ? shareScopeKeys : remoteInfo.shareScope || \"default\"\n\t};\n\tObject.defineProperty(remoteEntryInitOptions, \"shareScopeMap\", {\n\t\tvalue: localShareScopeMap,\n\t\tenumerable: false\n\t});\n\treturn {\n\t\tremoteEntryInitOptions,\n\t\tshareScope: localShareScopeMap[shareScopeKeys[0]],\n\t\tinitScope: rawInitScope ?? []\n\t};\n}\nvar Module$1 = class {\n\tconstructor({ remoteInfo, host }) {\n\t\tthis.inited = false;\n\t\tthis.initing = false;\n\t\tthis.lib = void 0;\n\t\tthis.remoteInfo = remoteInfo;\n\t\tthis.host = host;\n\t}\n\tasync getEntry(expose) {\n\t\tif (this.remoteEntryExports) return this.remoteEntryExports;\n\t\tconst remoteEntryExports = await getRemoteEntry({\n\t\t\torigin: this.host,\n\t\t\tremoteInfo: this.remoteInfo,\n\t\t\tremoteEntryExports: this.remoteEntryExports,\n\t\t\tresourceContext: {\n\t\t\t\tinitiator: \"loadRemote\",\n\t\t\t\tid: composeRemoteRequestId(this.remoteInfo.name, expose),\n\t\t\t\tresourceType: \"remoteEntry\"\n\t\t\t}\n\t\t});\n\t\tassert(remoteEntryExports, `remoteEntryExports is undefined \\n ${safeToString(this.remoteInfo)}`);\n\t\tthis.remoteEntryExports = remoteEntryExports;\n\t\treturn this.remoteEntryExports;\n\t}\n\tasync init(id, remoteSnapshot, rawInitScope, expose) {\n\t\tconst remoteEntryExports = await this.getEntry(expose);\n\t\tif (this.inited) {\n\t\t\tawait this.host.loaderHook.lifecycle.afterInitRemote.emit({\n\t\t\t\tid,\n\t\t\t\tremoteInfo: this.remoteInfo,\n\t\t\t\tremoteSnapshot,\n\t\t\t\tremoteEntryExports,\n\t\t\t\tcached: true,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t\treturn remoteEntryExports;\n\t\t}\n\t\tif (this.initPromise) {\n\t\t\ttry {\n\t\t\t\tawait this.initPromise;\n\t\t\t\tawait this.host.loaderHook.lifecycle.afterInitRemote.emit({\n\t\t\t\t\tid,\n\t\t\t\t\tremoteInfo: this.remoteInfo,\n\t\t\t\t\tremoteSnapshot,\n\t\t\t\t\tremoteEntryExports,\n\t\t\t\t\tcached: true,\n\t\t\t\t\torigin: this.host\n\t\t\t\t});\n\t\t\t} catch (initError) {\n\t\t\t\tawait this.host.loaderHook.lifecycle.afterInitRemote.emit({\n\t\t\t\t\tid,\n\t\t\t\t\tremoteInfo: this.remoteInfo,\n\t\t\t\t\tremoteSnapshot,\n\t\t\t\t\tremoteEntryExports,\n\t\t\t\t\terror: initError,\n\t\t\t\t\tcached: true,\n\t\t\t\t\torigin: this.host\n\t\t\t\t});\n\t\t\t\tthrow initError;\n\t\t\t}\n\t\t\treturn remoteEntryExports;\n\t\t}\n\t\tthis.initing = true;\n\t\tthis.initPromise = (async () => {\n\t\t\tawait this.host.loaderHook.lifecycle.beforeInitRemote.emit({\n\t\t\t\tid,\n\t\t\t\tremoteInfo: this.remoteInfo,\n\t\t\t\tremoteSnapshot,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t\tconst { remoteEntryInitOptions, shareScope, initScope } = createRemoteEntryInitOptions(this.remoteInfo, this.host.shareScopeMap, rawInitScope);\n\t\t\tconst initContainerOptions = await this.host.hooks.lifecycle.beforeInitContainer.emit({\n\t\t\t\tshareScope,\n\t\t\t\tremoteEntryInitOptions,\n\t\t\t\tinitScope,\n\t\t\t\tremoteInfo: this.remoteInfo,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t\tif (typeof remoteEntryExports?.init === \"undefined\") error(RUNTIME_002, runtimeDescMap, {\n\t\t\t\thostName: this.host.name,\n\t\t\t\tremoteName: this.remoteInfo.name,\n\t\t\t\tremoteEntryUrl: this.remoteInfo.entry,\n\t\t\t\tremoteEntryKey: this.remoteInfo.entryGlobalName\n\t\t\t}, void 0, optionsToMFContext(this.host.options));\n\t\t\ttry {\n\t\t\t\tawait remoteEntryExports.init(initContainerOptions.shareScope, initContainerOptions.initScope, initContainerOptions.remoteEntryInitOptions);\n\t\t\t} catch (initError) {\n\t\t\t\terror(RUNTIME_015, runtimeDescMap, {\n\t\t\t\t\thostName: this.host.name,\n\t\t\t\t\tremoteName: this.remoteInfo.name,\n\t\t\t\t\tremoteEntryUrl: this.remoteInfo.entry,\n\t\t\t\t\tremoteEntryKey: this.remoteInfo.entryGlobalName,\n\t\t\t\t\tshareScope: this.remoteInfo.shareScope\n\t\t\t\t}, `${initError}`, optionsToMFContext(this.host.options));\n\t\t\t}\n\t\t\tawait this.host.hooks.lifecycle.initContainer.emit({\n\t\t\t\t...initContainerOptions,\n\t\t\t\tid,\n\t\t\t\tremoteSnapshot,\n\t\t\t\tremoteEntryExports\n\t\t\t});\n\t\t\tthis.inited = true;\n\t\t})();\n\t\ttry {\n\t\t\tawait this.initPromise;\n\t\t\tawait this.host.loaderHook.lifecycle.afterInitRemote.emit({\n\t\t\t\tid,\n\t\t\t\tremoteInfo: this.remoteInfo,\n\t\t\t\tremoteSnapshot,\n\t\t\t\tremoteEntryExports,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t} catch (initError) {\n\t\t\tawait this.host.loaderHook.lifecycle.afterInitRemote.emit({\n\t\t\t\tid,\n\t\t\t\tremoteInfo: this.remoteInfo,\n\t\t\t\tremoteSnapshot,\n\t\t\t\tremoteEntryExports,\n\t\t\t\terror: initError,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t\tthrow initError;\n\t\t} finally {\n\t\t\tthis.initing = false;\n\t\t\tthis.initPromise = void 0;\n\t\t}\n\t\treturn remoteEntryExports;\n\t}\n\tasync get(id, expose, options, remoteSnapshot) {\n\t\tconst { loadFactory = true } = options || { loadFactory: true };\n\t\tconst remoteEntryExports = await this.init(id, remoteSnapshot, void 0, expose);\n\t\tthis.lib = remoteEntryExports;\n\t\tawait this.host.loaderHook.lifecycle.beforeGetExpose.emit({\n\t\t\tid,\n\t\t\texpose,\n\t\t\tmoduleInfo: this.remoteInfo,\n\t\t\tremoteEntryExports,\n\t\t\torigin: this.host\n\t\t});\n\t\tlet moduleFactory;\n\t\ttry {\n\t\t\tconst hookModuleFactory = await this.host.loaderHook.lifecycle.getModuleFactory.emit({\n\t\t\t\tremoteEntryExports,\n\t\t\t\texpose,\n\t\t\t\tmoduleInfo: this.remoteInfo\n\t\t\t});\n\t\t\tmoduleFactory = typeof hookModuleFactory === \"function\" ? hookModuleFactory : void 0;\n\t\t\tif (!moduleFactory) moduleFactory = await remoteEntryExports.get(expose);\n\t\t\tif (!moduleFactory) error(RUNTIME_014, runtimeDescMap, {\n\t\t\t\thostName: this.host.name,\n\t\t\t\tremoteName: this.remoteInfo.name,\n\t\t\t\tremoteEntryUrl: this.remoteInfo.entry,\n\t\t\t\texpose,\n\t\t\t\trequestId: id,\n\t\t\t\tavailableExposes: getAvailableExposeNames(remoteSnapshot)\n\t\t\t}, void 0, optionsToMFContext(this.host.options));\n\t\t\tawait this.host.loaderHook.lifecycle.afterGetExpose.emit({\n\t\t\t\tid,\n\t\t\t\texpose,\n\t\t\t\tmoduleInfo: this.remoteInfo,\n\t\t\t\tremoteEntryExports,\n\t\t\t\tmoduleFactory,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t} catch (getExposeError) {\n\t\t\tawait this.host.loaderHook.lifecycle.afterGetExpose.emit({\n\t\t\t\tid,\n\t\t\t\texpose,\n\t\t\t\tmoduleInfo: this.remoteInfo,\n\t\t\t\tremoteEntryExports,\n\t\t\t\terror: getExposeError,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t\tthrow getExposeError;\n\t\t}\n\t\tconst symbolName = processModuleAlias(this.remoteInfo.name, expose);\n\t\tconst wrapModuleFactory = this.wraperFactory(moduleFactory, symbolName);\n\t\tif (!loadFactory) return wrapModuleFactory;\n\t\tawait this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({\n\t\t\tid,\n\t\t\texpose,\n\t\t\tmoduleInfo: this.remoteInfo,\n\t\t\tloadFactory,\n\t\t\torigin: this.host\n\t\t});\n\t\ttry {\n\t\t\tconst exposeContent = await wrapModuleFactory();\n\t\t\tawait this.host.loaderHook.lifecycle.afterExecuteFactory.emit({\n\t\t\t\tid,\n\t\t\t\texpose,\n\t\t\t\tmoduleInfo: this.remoteInfo,\n\t\t\t\tloadFactory,\n\t\t\t\texposeModule: exposeContent,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t\treturn exposeContent;\n\t\t} catch (executeFactoryError) {\n\t\t\tawait this.host.loaderHook.lifecycle.afterExecuteFactory.emit({\n\t\t\t\tid,\n\t\t\t\texpose,\n\t\t\t\tmoduleInfo: this.remoteInfo,\n\t\t\t\tloadFactory,\n\t\t\t\terror: executeFactoryError,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t\tthrow executeFactoryError;\n\t\t}\n\t}\n\twraperFactory(moduleFactory, id) {\n\t\tfunction defineModuleId(res, id) {\n\t\t\tif (res && typeof res === \"object\" && Object.isExtensible(res) && !Object.getOwnPropertyDescriptor(res, Symbol.for(\"mf_module_id\"))) Object.defineProperty(res, Symbol.for(\"mf_module_id\"), {\n\t\t\t\tvalue: id,\n\t\t\t\tenumerable: false\n\t\t\t});\n\t\t}\n\t\treturn () => {\n\t\t\tconst res = moduleFactory();\n\t\t\tif (res instanceof Promise) return res.then((asyncRes) => {\n\t\t\t\tdefineModuleId(asyncRes, id);\n\t\t\t\treturn asyncRes;\n\t\t\t});\n\t\t\tdefineModuleId(res, id);\n\t\t\treturn res;\n\t\t};\n\t}\n};\n\n//#endregion\nexport { Module$1 as Module };\n//# sourceMappingURL=index.js.map","import { assert } from \"../logger.js\";\nimport { isPlainObject } from \"../tool.js\";\nimport \"../index.js\";\n\n//#region src/utils/hooks/pluginSystem.ts\nvar PluginSystem = class {\n\tconstructor(lifecycle) {\n\t\tthis.registerPlugins = {};\n\t\tthis.lifecycle = lifecycle;\n\t\tthis.lifecycleKeys = Object.keys(lifecycle);\n\t}\n\tapplyPlugin(plugin, instance) {\n\t\tassert(isPlainObject(plugin), \"Plugin configuration is invalid.\");\n\t\tconst pluginName = plugin.name;\n\t\tassert(pluginName, \"A name must be provided by the plugin.\");\n\t\tif (!this.registerPlugins[pluginName]) {\n\t\t\tthis.registerPlugins[pluginName] = plugin;\n\t\t\tplugin.apply?.(instance);\n\t\t\tObject.keys(this.lifecycle).forEach((key) => {\n\t\t\t\tconst pluginLife = plugin[key];\n\t\t\t\tif (pluginLife) this.lifecycle[key].on(pluginLife);\n\t\t\t});\n\t\t}\n\t}\n\tremovePlugin(pluginName) {\n\t\tassert(pluginName, \"A name is required.\");\n\t\tconst plugin = this.registerPlugins[pluginName];\n\t\tassert(plugin, `The plugin \"${pluginName}\" is not registered.`);\n\t\tObject.keys(plugin).forEach((key) => {\n\t\t\tif (key !== \"name\") this.lifecycle[key].remove(plugin[key]);\n\t\t});\n\t}\n};\n\n//#endregion\nexport { PluginSystem };\n//# sourceMappingURL=pluginSystem.js.map","//#region src/utils/hooks/syncHook.ts\nvar SyncHook = class {\n\tconstructor(type) {\n\t\tthis.type = \"\";\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tif (type) this.type = type;\n\t}\n\ton(fn) {\n\t\tif (typeof fn === \"function\") this.listeners.add(fn);\n\t}\n\tonce(fn) {\n\t\tconst self = this;\n\t\tthis.on(function wrapper(...args) {\n\t\t\tself.remove(wrapper);\n\t\t\treturn fn.apply(null, args);\n\t\t});\n\t}\n\temit(...data) {\n\t\tlet result;\n\t\tif (this.listeners.size > 0) this.listeners.forEach((fn) => {\n\t\t\tconst nextResult = fn(...data);\n\t\t\tif (nextResult !== void 0) result = nextResult;\n\t\t});\n\t\treturn result;\n\t}\n\tremove(fn) {\n\t\tthis.listeners.delete(fn);\n\t}\n\tremoveAll() {\n\t\tthis.listeners.clear();\n\t}\n};\n\n//#endregion\nexport { SyncHook };\n//# sourceMappingURL=syncHook.js.map","import { SyncHook } from \"./syncHook.js\";\n\n//#region src/utils/hooks/asyncHook.ts\nvar AsyncHook = class extends SyncHook {\n\temit(...data) {\n\t\tlet result;\n\t\tconst ls = Array.from(this.listeners);\n\t\tif (ls.length > 0) {\n\t\t\tlet i = 0;\n\t\t\tconst call = (prev) => {\n\t\t\t\tif (prev === false) return false;\n\t\t\t\telse if (i < ls.length) return Promise.resolve(ls[i++].apply(null, data)).then((result) => {\n\t\t\t\t\tif (result === void 0 || data.length === 1 && result === data[0]) return call(prev);\n\t\t\t\t\treturn call(result);\n\t\t\t\t});\n\t\t\t\telse return prev;\n\t\t\t};\n\t\t\tresult = call();\n\t\t}\n\t\treturn Promise.resolve(result);\n\t}\n};\n\n//#endregion\nexport { AsyncHook };\n//# sourceMappingURL=asyncHook.js.map","import { error, warn } from \"../logger.js\";\nimport { isObject } from \"../tool.js\";\nimport { SyncHook } from \"./syncHook.js\";\n\n//#region src/utils/hooks/syncWaterfallHook.ts\nfunction checkReturnData(originalData, returnedData) {\n\tif (!isObject(returnedData)) return false;\n\tif (originalData !== returnedData) {\n\t\tfor (const key in originalData) if (!(key in returnedData)) return false;\n\t}\n\treturn true;\n}\nvar SyncWaterfallHook = class extends SyncHook {\n\tconstructor(type) {\n\t\tsuper();\n\t\tthis.onerror = error;\n\t\tthis.type = type;\n\t}\n\temit(data) {\n\t\tif (!isObject(data)) error(`The data for the \"${this.type}\" hook should be an object.`);\n\t\tfor (const fn of this.listeners) try {\n\t\t\tconst tempData = fn(data);\n\t\t\tif (tempData === void 0) continue;\n\t\t\tif (checkReturnData(data, tempData)) data = tempData;\n\t\t\telse {\n\t\t\t\tthis.onerror(`A plugin returned an unacceptable value for the \"${this.type}\" type.`);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\twarn(e);\n\t\t\tthis.onerror(e);\n\t\t}\n\t\treturn data;\n\t}\n};\n\n//#endregion\nexport { SyncWaterfallHook, checkReturnData };\n//# sourceMappingURL=syncWaterfallHook.js.map","import { error, warn } from \"../logger.js\";\nimport { isObject } from \"../tool.js\";\nimport { SyncHook } from \"./syncHook.js\";\nimport { checkReturnData } from \"./syncWaterfallHook.js\";\n\n//#region src/utils/hooks/asyncWaterfallHooks.ts\nvar AsyncWaterfallHook = class extends SyncHook {\n\tconstructor(type) {\n\t\tsuper();\n\t\tthis.onerror = error;\n\t\tthis.type = type;\n\t}\n\temit(data) {\n\t\tif (!isObject(data)) error(`The response data for the \"${this.type}\" hook must be an object.`);\n\t\tconst ls = Array.from(this.listeners);\n\t\tif (ls.length > 0) {\n\t\t\tlet i = 0;\n\t\t\tconst processError = (e) => {\n\t\t\t\twarn(e);\n\t\t\t\tthis.onerror(e);\n\t\t\t\treturn data;\n\t\t\t};\n\t\t\tconst call = (prevData) => {\n\t\t\t\tif (prevData !== void 0 && checkReturnData(data, prevData)) data = prevData;\n\t\t\t\telse if (prevData !== void 0) {\n\t\t\t\t\tthis.onerror(`A plugin returned an incorrect value for the \"${this.type}\" type.`);\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\tif (i < ls.length) try {\n\t\t\t\t\treturn Promise.resolve(ls[i++](data)).then(call, processError);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn processError(e);\n\t\t\t\t}\n\t\t\t\treturn data;\n\t\t\t};\n\t\t\treturn Promise.resolve(call(data));\n\t\t}\n\t\treturn Promise.resolve(data);\n\t}\n};\n\n//#endregion\nexport { AsyncWaterfallHook };\n//# sourceMappingURL=asyncWaterfallHooks.js.map","import { PluginSystem } from \"../utils/hooks/pluginSystem.js\";\nimport \"../utils/hooks/index.js\";\n\n//#region src/remote/disabled.ts\nconst REMOTE_DISABLED_MESSAGE = \"Remote loading is disabled by experiments.optimization.disableRemote.\";\nvar UnavailableRemoteModule = class {\n\tconstructor() {\n\t\tthrow new Error(REMOTE_DISABLED_MESSAGE);\n\t}\n};\nvar DisabledRemoteHandler = class {\n\tconstructor() {\n\t\tthis.hooks = new PluginSystem({});\n\t}\n\tformatAndRegisterRemote() {\n\t\treturn [];\n\t}\n\tloadRemote() {\n\t\tthrow new Error(REMOTE_DISABLED_MESSAGE);\n\t}\n\tpreloadRemote() {\n\t\tthrow new Error(REMOTE_DISABLED_MESSAGE);\n\t}\n\tregisterRemotes() {\n\t\tthrow new Error(REMOTE_DISABLED_MESSAGE);\n\t}\n\tgetRemoteModuleAndOptions() {\n\t\tthrow new Error(REMOTE_DISABLED_MESSAGE);\n\t}\n\tinitRawContainer() {\n\t\tthrow new Error(REMOTE_DISABLED_MESSAGE);\n\t}\n};\n\n//#endregion\nexport { DisabledRemoteHandler, UnavailableRemoteModule };\n//# sourceMappingURL=disabled.js.map","import { error } from \"../../utils/logger.js\";\nimport { getRemoteEntryInfoFromSnapshot, isPureRemoteEntry, isRemoteInfoWithEntry } from \"../../utils/tool.js\";\nimport { composeRemoteRequestId } from \"../../utils/manifest.js\";\nimport \"../../utils/index.js\";\nimport { preloadAssets } from \"../../utils/preload.js\";\nimport { getResourceUrl, isBrowserEnvValue } from \"@module-federation/sdk\";\nimport { RUNTIME_011, runtimeDescMap } from \"@module-federation/error-codes\";\n\n//#region src/plugins/snapshot/index.ts\nfunction assignRemoteInfo(remoteInfo, remoteSnapshot) {\n\tconst remoteEntryInfo = getRemoteEntryInfoFromSnapshot(remoteSnapshot);\n\tif (!remoteEntryInfo.url) error(RUNTIME_011, runtimeDescMap, { remoteName: remoteInfo.name });\n\tlet entryUrl = getResourceUrl(remoteSnapshot, remoteEntryInfo.url);\n\tif (!isBrowserEnvValue && !entryUrl.startsWith(\"http\")) entryUrl = `https:${entryUrl}`;\n\tremoteInfo.type = remoteEntryInfo.type;\n\tremoteInfo.entryGlobalName = remoteEntryInfo.globalName;\n\tremoteInfo.entry = entryUrl;\n\tremoteInfo.version = remoteSnapshot.version;\n\tremoteInfo.buildVersion = remoteSnapshot.buildVersion;\n}\nfunction snapshotPlugin() {\n\treturn {\n\t\tname: \"snapshot-plugin\",\n\t\tasync afterResolve(args) {\n\t\t\tconst { remote, pkgNameOrAlias, expose, origin, remoteInfo, id } = args;\n\t\t\tif (!isRemoteInfoWithEntry(remote) || !isPureRemoteEntry(remote)) {\n\t\t\t\tconst { remoteSnapshot, globalSnapshot } = await origin.snapshotHandler.loadRemoteSnapshotInfo({\n\t\t\t\t\tmoduleInfo: remote,\n\t\t\t\t\tid: composeRemoteRequestId(remote.name, expose)\n\t\t\t\t});\n\t\t\t\tassignRemoteInfo(remoteInfo, remoteSnapshot);\n\t\t\t\tconst preloadOptions = {\n\t\t\t\t\tremote,\n\t\t\t\t\tpreloadConfig: {\n\t\t\t\t\t\tnameOrAlias: pkgNameOrAlias,\n\t\t\t\t\t\texposes: [expose],\n\t\t\t\t\t\tresourceCategory: \"sync\",\n\t\t\t\t\t\tshare: false,\n\t\t\t\t\t\tdepsRemote: false\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst assets = await origin.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({\n\t\t\t\t\torigin,\n\t\t\t\t\tpreloadOptions,\n\t\t\t\t\tremoteInfo,\n\t\t\t\t\tremote,\n\t\t\t\t\tremoteSnapshot,\n\t\t\t\t\tglobalSnapshot\n\t\t\t\t});\n\t\t\t\tif (assets) preloadAssets(remoteInfo, origin, assets, false, {\n\t\t\t\t\tinitiator: \"loadRemote\",\n\t\t\t\t\tid\n\t\t\t\t}).catch(() => void 0);\n\t\t\t\treturn {\n\t\t\t\t\t...args,\n\t\t\t\t\tremoteSnapshot\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn args;\n\t\t}\n\t};\n}\n\n//#endregion\nexport { assignRemoteInfo, snapshotPlugin };\n//# sourceMappingURL=index.js.map","import { arrayOptions, getFMId, getRemoteEntryInfoFromSnapshot, isPureRemoteEntry, isRemoteInfoWithEntry } from \"../utils/tool.js\";\nimport { getInfoWithoutType, getPreloaded, setPreloaded } from \"../global.js\";\nimport { getRegisteredShare } from \"../utils/share.js\";\nimport \"../utils/index.js\";\nimport { defaultPreloadArgs, normalizePreloadExposes } from \"../utils/preload.js\";\nimport { assignRemoteInfo } from \"./snapshot/index.js\";\nimport { getResourceUrl, isBrowserEnvValue, isManifestProvider } from \"@module-federation/sdk\";\n\n//#region src/plugins/generate-preload-assets.ts\nfunction splitId(id) {\n\tconst splitInfo = id.split(\":\");\n\tif (splitInfo.length === 1) return {\n\t\tname: splitInfo[0],\n\t\tversion: void 0\n\t};\n\telse if (splitInfo.length === 2) return {\n\t\tname: splitInfo[0],\n\t\tversion: splitInfo[1]\n\t};\n\telse return {\n\t\tname: splitInfo[1],\n\t\tversion: splitInfo[2]\n\t};\n}\nfunction traverseModuleInfo(globalSnapshot, remoteInfo, traverse, isRoot, memo = {}, remoteSnapshot) {\n\tconst { value: snapshotValue } = getInfoWithoutType(globalSnapshot, getFMId(remoteInfo));\n\tconst effectiveRemoteSnapshot = remoteSnapshot || snapshotValue;\n\tif (effectiveRemoteSnapshot && !isManifestProvider(effectiveRemoteSnapshot)) {\n\t\ttraverse(effectiveRemoteSnapshot, remoteInfo, isRoot);\n\t\tif (effectiveRemoteSnapshot.remotesInfo) {\n\t\t\tconst remoteKeys = Object.keys(effectiveRemoteSnapshot.remotesInfo);\n\t\t\tfor (const key of remoteKeys) {\n\t\t\t\tif (memo[key]) continue;\n\t\t\t\tmemo[key] = true;\n\t\t\t\tconst subRemoteInfo = splitId(key);\n\t\t\t\tconst remoteValue = effectiveRemoteSnapshot.remotesInfo[key];\n\t\t\t\ttraverseModuleInfo(globalSnapshot, {\n\t\t\t\t\tname: subRemoteInfo.name,\n\t\t\t\t\tversion: remoteValue.matchedVersion\n\t\t\t\t}, traverse, false, memo, void 0);\n\t\t\t}\n\t\t}\n\t}\n}\nconst isExisted = (type, url) => {\n\treturn document.querySelector(`${type}[${type === \"link\" ? \"href\" : \"src\"}=\"${url}\"]`);\n};\nfunction generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, remoteSnapshot) {\n\tconst cssAssets = [];\n\tconst jsAssets = [];\n\tconst entryAssets = [];\n\tconst loadedSharedJsAssets = /* @__PURE__ */ new Set();\n\tconst loadedSharedCssAssets = /* @__PURE__ */ new Set();\n\tconst { options } = origin;\n\tconst { preloadConfig: rootPreloadConfig } = preloadOptions;\n\tconst { depsRemote } = rootPreloadConfig;\n\ttraverseModuleInfo(globalSnapshot, remote, (moduleInfoSnapshot, remoteInfo, isRoot) => {\n\t\tlet preloadConfig;\n\t\tif (isRoot) preloadConfig = rootPreloadConfig;\n\t\telse if (Array.isArray(depsRemote)) {\n\t\t\tconst findPreloadConfig = depsRemote.find((remoteConfig) => {\n\t\t\t\tif (remoteConfig.nameOrAlias === remoteInfo.name || remoteConfig.nameOrAlias === remoteInfo.alias) return true;\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\tif (!findPreloadConfig) return;\n\t\t\tpreloadConfig = defaultPreloadArgs(findPreloadConfig);\n\t\t} else if (depsRemote === true) preloadConfig = rootPreloadConfig;\n\t\telse return;\n\t\tconst remoteEntryUrl = getResourceUrl(moduleInfoSnapshot, getRemoteEntryInfoFromSnapshot(moduleInfoSnapshot).url);\n\t\tif (remoteEntryUrl) entryAssets.push({\n\t\t\tname: remoteInfo.name,\n\t\t\tmoduleInfo: {\n\t\t\t\tname: remoteInfo.name,\n\t\t\t\tentry: remoteEntryUrl,\n\t\t\t\ttype: \"remoteEntryType\" in moduleInfoSnapshot ? moduleInfoSnapshot.remoteEntryType : \"global\",\n\t\t\t\tentryGlobalName: \"globalName\" in moduleInfoSnapshot ? moduleInfoSnapshot.globalName : remoteInfo.name,\n\t\t\t\tshareScope: \"\",\n\t\t\t\tversion: \"version\" in moduleInfoSnapshot ? moduleInfoSnapshot.version : void 0\n\t\t\t},\n\t\t\turl: remoteEntryUrl\n\t\t});\n\t\tlet moduleAssetsInfo = \"modules\" in moduleInfoSnapshot ? moduleInfoSnapshot.modules : [];\n\t\tconst normalizedPreloadExposes = normalizePreloadExposes(preloadConfig.exposes);\n\t\tif (normalizedPreloadExposes.length && \"modules\" in moduleInfoSnapshot) moduleAssetsInfo = moduleInfoSnapshot?.modules?.reduce((assets, moduleAssetInfo) => {\n\t\t\tif (normalizedPreloadExposes?.indexOf(moduleAssetInfo.moduleName) !== -1) assets.push(moduleAssetInfo);\n\t\t\treturn assets;\n\t\t}, []);\n\t\tfunction handleAssets(assets) {\n\t\t\tconst assetsRes = assets.map((asset) => getResourceUrl(moduleInfoSnapshot, asset));\n\t\t\tif (preloadConfig.filter) return assetsRes.filter(preloadConfig.filter);\n\t\t\treturn assetsRes;\n\t\t}\n\t\tif (moduleAssetsInfo) {\n\t\t\tconst assetsLength = moduleAssetsInfo.length;\n\t\t\tfor (let index = 0; index < assetsLength; index++) {\n\t\t\t\tconst assetsInfo = moduleAssetsInfo[index];\n\t\t\t\tconst exposeFullPath = `${remoteInfo.name}/${assetsInfo.moduleName}`;\n\t\t\t\torigin.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({\n\t\t\t\t\tid: assetsInfo.moduleName === \".\" ? remoteInfo.name : exposeFullPath,\n\t\t\t\t\tname: remoteInfo.name,\n\t\t\t\t\tremoteSnapshot: moduleInfoSnapshot,\n\t\t\t\t\tpreloadConfig,\n\t\t\t\t\tremote: remoteInfo,\n\t\t\t\t\torigin\n\t\t\t\t});\n\t\t\t\tif (getPreloaded(exposeFullPath)) continue;\n\t\t\t\tif (preloadConfig.resourceCategory === \"all\") {\n\t\t\t\t\tcssAssets.push(...handleAssets(assetsInfo.assets.css.async));\n\t\t\t\t\tcssAssets.push(...handleAssets(assetsInfo.assets.css.sync));\n\t\t\t\t\tjsAssets.push(...handleAssets(assetsInfo.assets.js.async));\n\t\t\t\t\tjsAssets.push(...handleAssets(assetsInfo.assets.js.sync));\n\t\t\t\t} else if (preloadConfig.resourceCategory === \"sync\") {\n\t\t\t\t\tcssAssets.push(...handleAssets(assetsInfo.assets.css.sync));\n\t\t\t\t\tjsAssets.push(...handleAssets(assetsInfo.assets.js.sync));\n\t\t\t\t}\n\t\t\t\tsetPreloaded(exposeFullPath);\n\t\t\t}\n\t\t}\n\t}, true, {}, remoteSnapshot);\n\tif (remoteSnapshot.shared && remoteSnapshot.shared.length > 0) {\n\t\tconst collectSharedAssets = (shareInfo, snapshotShared) => {\n\t\t\tconst { shared: registeredShared } = getRegisteredShare(origin.shareScopeMap, snapshotShared.sharedName, shareInfo, origin.sharedHandler.hooks.lifecycle.resolveShare) || {};\n\t\t\tif (registeredShared && typeof registeredShared.lib === \"function\") {\n\t\t\t\tsnapshotShared.assets.js.sync.forEach((asset) => {\n\t\t\t\t\tloadedSharedJsAssets.add(asset);\n\t\t\t\t});\n\t\t\t\tsnapshotShared.assets.css.sync.forEach((asset) => {\n\t\t\t\t\tloadedSharedCssAssets.add(asset);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\tremoteSnapshot.shared.forEach((shared) => {\n\t\t\tconst shareInfos = options.shared?.[shared.sharedName];\n\t\t\tif (!shareInfos) return;\n\t\t\tconst sharedOptions = shared.version ? shareInfos.find((s) => s.version === shared.version) : shareInfos;\n\t\t\tif (!sharedOptions) return;\n\t\t\tarrayOptions(sharedOptions).forEach((s) => {\n\t\t\t\tcollectSharedAssets(s, shared);\n\t\t\t});\n\t\t});\n\t}\n\tconst needPreloadJsAssets = jsAssets.filter((asset) => !loadedSharedJsAssets.has(asset) && !isExisted(\"script\", asset));\n\treturn {\n\t\tcssAssets: cssAssets.filter((asset) => !loadedSharedCssAssets.has(asset) && !isExisted(\"link\", asset)),\n\t\tjsAssetsWithoutEntry: needPreloadJsAssets,\n\t\tentryAssets: entryAssets.filter((entry) => !isExisted(\"script\", entry.url))\n\t};\n}\nconst generatePreloadAssetsPlugin = function() {\n\treturn {\n\t\tname: \"generate-preload-assets-plugin\",\n\t\tasync generatePreloadAssets(args) {\n\t\t\tconst { origin, preloadOptions, remoteInfo, remote, globalSnapshot, remoteSnapshot } = args;\n\t\t\tif (!isBrowserEnvValue) return {\n\t\t\t\tcssAssets: [],\n\t\t\t\tjsAssetsWithoutEntry: [],\n\t\t\t\tentryAssets: []\n\t\t\t};\n\t\t\tif (isRemoteInfoWithEntry(remote) && isPureRemoteEntry(remote)) return {\n\t\t\t\tcssAssets: [],\n\t\t\t\tjsAssetsWithoutEntry: [],\n\t\t\t\tentryAssets: [{\n\t\t\t\t\tname: remote.name,\n\t\t\t\t\turl: remote.entry,\n\t\t\t\t\tmoduleInfo: {\n\t\t\t\t\t\tname: remoteInfo.name,\n\t\t\t\t\t\tentry: remote.entry,\n\t\t\t\t\t\ttype: remoteInfo.type || \"global\",\n\t\t\t\t\t\tentryGlobalName: \"\",\n\t\t\t\t\t\tshareScope: \"\"\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t};\n\t\t\tassignRemoteInfo(remoteInfo, remoteSnapshot);\n\t\t\treturn generatePreloadAssets(origin, preloadOptions, remoteInfo, globalSnapshot, remoteSnapshot);\n\t\t}\n\t};\n};\n\n//#endregion\nexport { generatePreloadAssetsPlugin };\n//# sourceMappingURL=generate-preload-assets.js.map","import { error } from \"../../utils/logger.js\";\nimport { isRemoteInfoWithEntry } from \"../../utils/tool.js\";\nimport { Global, addGlobalSnapshot, getGlobalSnapshot, getGlobalSnapshotInfoByModuleInfo, getInfoWithoutType, setGlobalSnapshotInfoByModuleInfo } from \"../../global.js\";\nimport { getRemoteInfo } from \"../../utils/load.js\";\nimport { optionsToMFContext } from \"../../utils/context.js\";\nimport \"../../utils/index.js\";\nimport { AsyncHook } from \"../../utils/hooks/asyncHook.js\";\nimport { AsyncWaterfallHook } from \"../../utils/hooks/asyncWaterfallHooks.js\";\nimport { PluginSystem } from \"../../utils/hooks/pluginSystem.js\";\nimport \"../../utils/hooks/index.js\";\nimport { generateSnapshotFromManifest, isBrowserEnvValue, isManifestProvider } from \"@module-federation/sdk\";\nimport { RUNTIME_003, RUNTIME_007, RUNTIME_013, runtimeDescMap } from \"@module-federation/error-codes\";\n\n//#region src/plugins/snapshot/SnapshotHandler.ts\nfunction getGlobalRemoteInfo(moduleInfo, origin) {\n\tconst hostGlobalSnapshot = getGlobalSnapshotInfoByModuleInfo({\n\t\tname: origin.name,\n\t\tversion: origin.options.version\n\t});\n\tconst globalRemoteInfo = hostGlobalSnapshot && \"remotesInfo\" in hostGlobalSnapshot && hostGlobalSnapshot.remotesInfo && getInfoWithoutType(hostGlobalSnapshot.remotesInfo, moduleInfo.name).value;\n\tif (globalRemoteInfo && globalRemoteInfo.matchedVersion) return {\n\t\thostGlobalSnapshot,\n\t\tglobalSnapshot: getGlobalSnapshot(),\n\t\tremoteSnapshot: getGlobalSnapshotInfoByModuleInfo({\n\t\t\tname: moduleInfo.name,\n\t\t\tversion: globalRemoteInfo.matchedVersion\n\t\t})\n\t};\n\treturn {\n\t\thostGlobalSnapshot: void 0,\n\t\tglobalSnapshot: getGlobalSnapshot(),\n\t\tremoteSnapshot: getGlobalSnapshotInfoByModuleInfo({\n\t\t\tname: moduleInfo.name,\n\t\t\tversion: \"version\" in moduleInfo ? moduleInfo.version : void 0\n\t\t})\n\t};\n}\nvar SnapshotHandler = class {\n\tconstructor(HostInstance) {\n\t\tthis.loadingHostSnapshot = null;\n\t\tthis.manifestCache = /* @__PURE__ */ new Map();\n\t\tthis.hooks = new PluginSystem({\n\t\t\tbeforeLoadRemoteSnapshot: new AsyncHook(\"beforeLoadRemoteSnapshot\"),\n\t\t\tloadSnapshot: new AsyncWaterfallHook(\"loadGlobalSnapshot\"),\n\t\t\tloadRemoteSnapshot: new AsyncWaterfallHook(\"loadRemoteSnapshot\"),\n\t\t\tafterLoadSnapshot: new AsyncWaterfallHook(\"afterLoadSnapshot\")\n\t\t});\n\t\tthis.manifestLoading = Global.__FEDERATION__.__MANIFEST_LOADING__;\n\t\tthis.HostInstance = HostInstance;\n\t\tthis.loaderHook = HostInstance.loaderHook;\n\t}\n\tasync loadRemoteSnapshotInfo({ moduleInfo, id, initiator = \"loadRemote\" }) {\n\t\tconst { options } = this.HostInstance;\n\t\tawait this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({\n\t\t\toptions,\n\t\t\tmoduleInfo,\n\t\t\torigin: this.HostInstance\n\t\t});\n\t\tlet hostSnapshot = getGlobalSnapshotInfoByModuleInfo({\n\t\t\tname: this.HostInstance.options.name,\n\t\t\tversion: this.HostInstance.options.version\n\t\t});\n\t\tif (!hostSnapshot) {\n\t\t\thostSnapshot = {\n\t\t\t\tversion: this.HostInstance.options.version || \"\",\n\t\t\t\tremoteEntry: \"\",\n\t\t\t\tremotesInfo: {}\n\t\t\t};\n\t\t\taddGlobalSnapshot({ [this.HostInstance.options.name]: hostSnapshot });\n\t\t}\n\t\tif (hostSnapshot && \"remotesInfo\" in hostSnapshot && !getInfoWithoutType(hostSnapshot.remotesInfo, moduleInfo.name).value) {\n\t\t\tif (\"version\" in moduleInfo || \"entry\" in moduleInfo) hostSnapshot.remotesInfo = {\n\t\t\t\t...hostSnapshot?.remotesInfo,\n\t\t\t\t[moduleInfo.name]: { matchedVersion: \"version\" in moduleInfo ? moduleInfo.version : moduleInfo.entry }\n\t\t\t};\n\t\t}\n\t\tconst { hostGlobalSnapshot, remoteSnapshot, globalSnapshot } = this.getGlobalRemoteInfo(moduleInfo);\n\t\tconst { remoteSnapshot: globalRemoteSnapshot, globalSnapshot: globalSnapshotRes } = await this.hooks.lifecycle.loadSnapshot.emit({\n\t\t\toptions,\n\t\t\tmoduleInfo,\n\t\t\thostGlobalSnapshot,\n\t\t\tremoteSnapshot,\n\t\t\tglobalSnapshot\n\t\t});\n\t\tlet mSnapshot;\n\t\tlet gSnapshot;\n\t\tif (globalRemoteSnapshot) if (isManifestProvider(globalRemoteSnapshot)) {\n\t\t\tconst remoteEntry = isBrowserEnvValue ? globalRemoteSnapshot.remoteEntry : globalRemoteSnapshot.ssrRemoteEntry || globalRemoteSnapshot.remoteEntry || \"\";\n\t\t\tconst moduleSnapshot = await this.loadManifestSnapshot(remoteEntry, moduleInfo, {}, {\n\t\t\t\tinitiator,\n\t\t\t\tid: id || moduleInfo.name\n\t\t\t});\n\t\t\tconst globalSnapshotRes = setGlobalSnapshotInfoByModuleInfo({\n\t\t\t\t...moduleInfo,\n\t\t\t\tentry: remoteEntry\n\t\t\t}, moduleSnapshot);\n\t\t\tmSnapshot = moduleSnapshot;\n\t\t\tgSnapshot = globalSnapshotRes;\n\t\t} else {\n\t\t\tconst { remoteSnapshot: remoteSnapshotRes } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({\n\t\t\t\toptions: this.HostInstance.options,\n\t\t\t\tmoduleInfo,\n\t\t\t\tremoteSnapshot: globalRemoteSnapshot,\n\t\t\t\tfrom: \"global\"\n\t\t\t});\n\t\t\tmSnapshot = remoteSnapshotRes;\n\t\t\tgSnapshot = globalSnapshotRes;\n\t\t}\n\t\telse if (isRemoteInfoWithEntry(moduleInfo)) {\n\t\t\tconst moduleSnapshot = await this.loadManifestSnapshot(moduleInfo.entry, moduleInfo, {}, {\n\t\t\t\tinitiator,\n\t\t\t\tid: id || moduleInfo.name\n\t\t\t});\n\t\t\tconst globalSnapshotRes = setGlobalSnapshotInfoByModuleInfo(moduleInfo, moduleSnapshot);\n\t\t\tmSnapshot = moduleSnapshot;\n\t\t\tgSnapshot = globalSnapshotRes;\n\t\t} else error(RUNTIME_007, runtimeDescMap, {\n\t\t\tremoteName: moduleInfo.name,\n\t\t\tremoteVersion: moduleInfo.version,\n\t\t\thostName: this.HostInstance.options.name,\n\t\t\tglobalSnapshot: JSON.stringify(globalSnapshotRes)\n\t\t}, void 0, optionsToMFContext(this.HostInstance.options));\n\t\tawait this.hooks.lifecycle.afterLoadSnapshot.emit({\n\t\t\tid,\n\t\t\thost: this.HostInstance,\n\t\t\toptions,\n\t\t\tmoduleInfo,\n\t\t\tremoteSnapshot: mSnapshot\n\t\t});\n\t\treturn {\n\t\t\tremoteSnapshot: mSnapshot,\n\t\t\tglobalSnapshot: gSnapshot\n\t\t};\n\t}\n\tgetGlobalRemoteInfo(moduleInfo) {\n\t\treturn getGlobalRemoteInfo(moduleInfo, this.HostInstance);\n\t}\n\tasync getManifestJson(manifestUrl, moduleInfo, extraOptions, resourceOptions) {\n\t\tconst getManifest = async () => {\n\t\t\tconst remoteInfo = getRemoteInfo(moduleInfo);\n\t\t\tlet manifestJson = this.manifestCache.get(manifestUrl);\n\t\t\tif (manifestJson) return manifestJson;\n\t\t\ttry {\n\t\t\t\tlet res = await this.loaderHook.lifecycle.fetch.emit(manifestUrl, {}, remoteInfo, resourceOptions ? {\n\t\t\t\t\t...resourceOptions,\n\t\t\t\t\turl: manifestUrl,\n\t\t\t\t\tresourceType: \"manifest\"\n\t\t\t\t} : void 0);\n\t\t\t\tif (!res || !(res instanceof Response)) res = await fetch(manifestUrl, {});\n\t\t\t\tmanifestJson = await res.json();\n\t\t\t} catch (err) {\n\t\t\t\tmanifestJson = await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({\n\t\t\t\t\tid: manifestUrl,\n\t\t\t\t\terror: err,\n\t\t\t\t\tfrom: \"runtime\",\n\t\t\t\t\tlifecycle: \"afterResolve\",\n\t\t\t\t\tremote: remoteInfo,\n\t\t\t\t\torigin: this.HostInstance\n\t\t\t\t});\n\t\t\t\tif (!manifestJson) {\n\t\t\t\t\tdelete this.manifestLoading[manifestUrl];\n\t\t\t\t\terror(RUNTIME_003, runtimeDescMap, {\n\t\t\t\t\t\tmanifestUrl,\n\t\t\t\t\t\tmoduleName: moduleInfo.name,\n\t\t\t\t\t\thostName: this.HostInstance.options.name\n\t\t\t\t\t}, `${err}`, optionsToMFContext(this.HostInstance.options));\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst missingRequiredFields = [\n\t\t\t\t!manifestJson.metaData && \"metaData\",\n\t\t\t\t!manifestJson.exposes && \"exposes\",\n\t\t\t\t!manifestJson.shared && \"shared\"\n\t\t\t].filter(Boolean);\n\t\t\tif (missingRequiredFields.length > 0) await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({\n\t\t\t\tid: manifestUrl,\n\t\t\t\terror: /* @__PURE__ */ new Error(`\"${manifestUrl}\" is not a valid federation manifest for remote \"${moduleInfo.name}\". Missing required fields: ${missingRequiredFields.join(\", \")}.`),\n\t\t\t\tfrom: \"runtime\",\n\t\t\t\tlifecycle: \"afterResolve\",\n\t\t\t\tremote: remoteInfo,\n\t\t\t\torigin: this.HostInstance\n\t\t\t});\n\t\t\tif (missingRequiredFields.length > 0) error(RUNTIME_013, runtimeDescMap, {\n\t\t\t\tmanifestUrl,\n\t\t\t\tmoduleName: moduleInfo.name,\n\t\t\t\thostName: this.HostInstance.options.name,\n\t\t\t\tmissingFields: missingRequiredFields.join(\",\")\n\t\t\t}, void 0, optionsToMFContext(this.HostInstance.options));\n\t\t\tthis.manifestCache.set(manifestUrl, manifestJson);\n\t\t\treturn manifestJson;\n\t\t};\n\t\treturn getManifest();\n\t}\n\tasync loadManifestSnapshot(manifestUrl, moduleInfo, extraOptions, resourceOptions) {\n\t\tconst asyncLoadProcess = async () => {\n\t\t\tconst manifestJson = await this.getManifestJson(manifestUrl, moduleInfo, extraOptions, resourceOptions);\n\t\t\tconst remoteSnapshot = generateSnapshotFromManifest(manifestJson, { version: manifestUrl });\n\t\t\tconst { remoteSnapshot: remoteSnapshotRes } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({\n\t\t\t\toptions: this.HostInstance.options,\n\t\t\t\tmoduleInfo,\n\t\t\t\tmanifestJson,\n\t\t\t\tremoteSnapshot,\n\t\t\t\tmanifestUrl,\n\t\t\t\tfrom: \"manifest\"\n\t\t\t});\n\t\t\treturn remoteSnapshotRes;\n\t\t};\n\t\tif (!this.manifestLoading[manifestUrl]) this.manifestLoading[manifestUrl] = asyncLoadProcess().then((res) => res);\n\t\treturn this.manifestLoading[manifestUrl];\n\t}\n};\n\n//#endregion\nexport { SnapshotHandler, getGlobalRemoteInfo };\n//# sourceMappingURL=SnapshotHandler.js.map","import { PluginSystem } from \"../../utils/hooks/pluginSystem.js\";\nimport \"../../utils/hooks/index.js\";\n\n//#region src/plugins/snapshot/disabled.ts\nvar DisabledSnapshotHandler = class {\n\tconstructor() {\n\t\tthis.hooks = new PluginSystem({});\n\t}\n};\n\n//#endregion\nexport { DisabledSnapshotHandler };\n//# sourceMappingURL=disabled.js.map","import { assert, error, warn } from \"../utils/logger.js\";\nimport { DEFAULT_SCOPE } from \"../constant.js\";\nimport { addUseIn, directShare, formatShareConfigs, getGlobalShareScope, getRegisteredShare, getTargetSharedOptions, shouldUseTreeShaking } from \"../utils/share.js\";\nimport { optionsToMFContext } from \"../utils/context.js\";\nimport \"../utils/index.js\";\nimport { SyncHook } from \"../utils/hooks/syncHook.js\";\nimport { AsyncHook } from \"../utils/hooks/asyncHook.js\";\nimport { SyncWaterfallHook } from \"../utils/hooks/syncWaterfallHook.js\";\nimport { AsyncWaterfallHook } from \"../utils/hooks/asyncWaterfallHooks.js\";\nimport { PluginSystem } from \"../utils/hooks/pluginSystem.js\";\nimport \"../utils/hooks/index.js\";\nimport { RUNTIME_005, RUNTIME_006, runtimeDescMap } from \"@module-federation/error-codes\";\n\n//#region src/shared/index.ts\nvar SharedHandler = class {\n\tconstructor(host) {\n\t\tthis.hooks = new PluginSystem({\n\t\t\tbeforeRegisterShare: new SyncWaterfallHook(\"beforeRegisterShare\"),\n\t\t\tafterResolve: new AsyncWaterfallHook(\"afterResolve\"),\n\t\t\tbeforeLoadShare: new AsyncWaterfallHook(\"beforeLoadShare\"),\n\t\t\tloadShare: new AsyncHook(),\n\t\t\tafterLoadShare: new SyncHook(\"afterLoadShare\"),\n\t\t\terrorLoadShare: new SyncHook(\"errorLoadShare\"),\n\t\t\tresolveShare: new SyncWaterfallHook(\"resolveShare\"),\n\t\t\tinitContainerShareScopeMap: new SyncWaterfallHook(\"initContainerShareScopeMap\")\n\t\t});\n\t\tthis.host = host;\n\t\tthis.shareScopeMap = {};\n\t\tthis.initTokens = {};\n\t\tthis._setGlobalShareScopeMap(host.options);\n\t}\n\temitAfterLoadShare({ lifecycle, pkgName, shareInfo, selectedShared }) {\n\t\ttry {\n\t\t\tthis.hooks.lifecycle.afterLoadShare.emit({\n\t\t\t\tpkgName,\n\t\t\t\tshareInfo,\n\t\t\t\tselectedShared,\n\t\t\t\tshared: this.host.options.shared,\n\t\t\t\tshareScopeMap: this.shareScopeMap,\n\t\t\t\tlifecycle,\n\t\t\t\torigin: this.host\n\t\t\t});\n\t\t} catch (error) {\n\t\t\twarn(error);\n\t\t}\n\t}\n\temitErrorLoadShare({ lifecycle, pkgName, shareInfo, error, recovered }) {\n\t\ttry {\n\t\t\tthis.hooks.lifecycle.errorLoadShare.emit({\n\t\t\t\tpkgName,\n\t\t\t\tshareInfo,\n\t\t\t\tshared: this.host.options.shared,\n\t\t\t\tshareScopeMap: this.shareScopeMap,\n\t\t\t\tlifecycle,\n\t\t\t\torigin: this.host,\n\t\t\t\terror,\n\t\t\t\trecovered\n\t\t\t});\n\t\t} catch (hookError) {\n\t\t\twarn(hookError);\n\t\t}\n\t}\n\tregisterShared(globalOptions, userOptions) {\n\t\tconst { newShareInfos, allShareInfos } = formatShareConfigs(globalOptions, userOptions);\n\t\tObject.keys(newShareInfos).forEach((sharedKey) => {\n\t\t\tnewShareInfos[sharedKey].forEach((sharedVal) => {\n\t\t\t\tsharedVal.scope.forEach((sc) => {\n\t\t\t\t\tthis.hooks.lifecycle.beforeRegisterShare.emit({\n\t\t\t\t\t\torigin: this.host,\n\t\t\t\t\t\tpkgName: sharedKey,\n\t\t\t\t\t\tshared: sharedVal\n\t\t\t\t\t});\n\t\t\t\t\tif (!this.shareScopeMap[sc]?.[sharedKey]) this.setShared({\n\t\t\t\t\t\tpkgName: sharedKey,\n\t\t\t\t\t\tlib: sharedVal.lib,\n\t\t\t\t\t\tget: sharedVal.get,\n\t\t\t\t\t\tloaded: sharedVal.loaded || Boolean(sharedVal.lib),\n\t\t\t\t\t\tshared: sharedVal,\n\t\t\t\t\t\tfrom: userOptions.name\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\treturn {\n\t\t\tnewShareInfos,\n\t\t\tallShareInfos\n\t\t};\n\t}\n\tasync loadShare(pkgName, extraOptions) {\n\t\tconst { host } = this;\n\t\tconst shareOptions = getTargetSharedOptions({\n\t\t\tpkgName,\n\t\t\textraOptions,\n\t\t\tshareInfos: host.options.shared\n\t\t});\n\t\tlet shareOptionsRes = shareOptions;\n\t\ttry {\n\t\t\tif (shareOptions?.scope) await Promise.all(shareOptions.scope.map(async (shareScope) => {\n\t\t\t\tawait Promise.all(this.initializeSharing(shareScope, { strategy: shareOptions.strategy }));\n\t\t\t}));\n\t\t\tshareOptionsRes = (await this.hooks.lifecycle.beforeLoadShare.emit({\n\t\t\t\tpkgName,\n\t\t\t\tshareInfo: shareOptions,\n\t\t\t\tshared: host.options.shared,\n\t\t\t\torigin: host\n\t\t\t})).shareInfo;\n\t\t\tassert(shareOptionsRes, `Cannot find shared \"${pkgName}\" in host \"${host.options.name}\". Ensure the shared config for \"${pkgName}\" is declared in the federation plugin options and the host has been initialized before loading shares.`);\n\t\t\tconst resolvedShareOptions = shareOptionsRes;\n\t\t\tconst { shared: registeredShared, useTreesShaking } = getRegisteredShare(this.shareScopeMap, pkgName, shareOptionsRes, this.hooks.lifecycle.resolveShare) || {};\n\t\t\tif (registeredShared) {\n\t\t\t\tconst targetShared = directShare(registeredShared, useTreesShaking);\n\t\t\t\tif (targetShared.lib) {\n\t\t\t\t\taddUseIn(targetShared, host.options.name);\n\t\t\t\t\tthis.emitAfterLoadShare({\n\t\t\t\t\t\tlifecycle: \"loadShare\",\n\t\t\t\t\t\tpkgName,\n\t\t\t\t\t\tshareInfo: resolvedShareOptions,\n\t\t\t\t\t\tselectedShared: registeredShared\n\t\t\t\t\t});\n\t\t\t\t\treturn targetShared.lib;\n\t\t\t\t} else if (targetShared.loading && !targetShared.loaded) {\n\t\t\t\t\tconst factory = await targetShared.loading;\n\t\t\t\t\ttargetShared.loaded = true;\n\t\t\t\t\tif (!targetShared.lib) targetShared.lib = factory;\n\t\t\t\t\taddUseIn(targetShared, host.options.name);\n\t\t\t\t\tthis.emitAfterLoadShare({\n\t\t\t\t\t\tlifecycle: \"loadShare\",\n\t\t\t\t\t\tpkgName,\n\t\t\t\t\t\tshareInfo: resolvedShareOptions,\n\t\t\t\t\t\tselectedShared: registeredShared\n\t\t\t\t\t});\n\t\t\t\t\treturn factory;\n\t\t\t\t} else {\n\t\t\t\t\tconst asyncLoadProcess = async () => {\n\t\t\t\t\t\tconst factory = await targetShared.get();\n\t\t\t\t\t\taddUseIn(targetShared, host.options.name);\n\t\t\t\t\t\ttargetShared.loaded = true;\n\t\t\t\t\t\ttargetShared.lib = factory;\n\t\t\t\t\t\treturn factory;\n\t\t\t\t\t};\n\t\t\t\t\tconst loading = asyncLoadProcess();\n\t\t\t\t\tthis.setShared({\n\t\t\t\t\t\tpkgName,\n\t\t\t\t\t\tloaded: false,\n\t\t\t\t\t\tshared: registeredShared,\n\t\t\t\t\t\tfrom: host.options.name,\n\t\t\t\t\t\tlib: null,\n\t\t\t\t\t\tloading,\n\t\t\t\t\t\ttreeShaking: useTreesShaking ? targetShared : void 0\n\t\t\t\t\t});\n\t\t\t\t\tconst factory = await loading;\n\t\t\t\t\tthis.emitAfterLoadShare({\n\t\t\t\t\t\tlifecycle: \"loadShare\",\n\t\t\t\t\t\tpkgName,\n\t\t\t\t\t\tshareInfo: resolvedShareOptions,\n\t\t\t\t\t\tselectedShared: registeredShared\n\t\t\t\t\t});\n\t\t\t\t\treturn factory;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (extraOptions?.customShareInfo) {\n\t\t\t\t\tthis.emitErrorLoadShare({\n\t\t\t\t\t\tlifecycle: \"loadShare\",\n\t\t\t\t\t\tpkgName,\n\t\t\t\t\t\tshareInfo: resolvedShareOptions,\n\t\t\t\t\t\trecovered: true\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst _useTreeShaking = shouldUseTreeShaking(resolvedShareOptions.treeShaking);\n\t\t\t\tconst targetShared = directShare(resolvedShareOptions, _useTreeShaking);\n\t\t\t\tconst asyncLoadProcess = async () => {\n\t\t\t\t\tconst factory = await targetShared.get();\n\t\t\t\t\ttargetShared.lib = factory;\n\t\t\t\t\ttargetShared.loaded = true;\n\t\t\t\t\taddUseIn(targetShared, host.options.name);\n\t\t\t\t\tconst { shared: gShared, useTreesShaking: gUseTreeShaking } = getRegisteredShare(this.shareScopeMap, pkgName, resolvedShareOptions, this.hooks.lifecycle.resolveShare) || {};\n\t\t\t\t\tif (gShared) {\n\t\t\t\t\t\tconst targetGShared = directShare(gShared, gUseTreeShaking);\n\t\t\t\t\t\ttargetGShared.lib = factory;\n\t\t\t\t\t\ttargetGShared.loaded = true;\n\t\t\t\t\t\tgShared.from = resolvedShareOptions.from;\n\t\t\t\t\t}\n\t\t\t\t\treturn factory;\n\t\t\t\t};\n\t\t\t\tconst loading = asyncLoadProcess();\n\t\t\t\tthis.setShared({\n\t\t\t\t\tpkgName,\n\t\t\t\t\tloaded: false,\n\t\t\t\t\tshared: resolvedShareOptions,\n\t\t\t\t\tfrom: host.options.name,\n\t\t\t\t\tlib: null,\n\t\t\t\t\tloading,\n\t\t\t\t\ttreeShaking: _useTreeShaking ? targetShared : void 0\n\t\t\t\t});\n\t\t\t\tconst factory = await loading;\n\t\t\t\tthis.emitAfterLoadShare({\n\t\t\t\t\tlifecycle: \"loadShare\",\n\t\t\t\t\tpkgName,\n\t\t\t\t\tshareInfo: resolvedShareOptions,\n\t\t\t\t\tselectedShared: resolvedShareOptions\n\t\t\t\t});\n\t\t\t\treturn factory;\n\t\t\t}\n\t\t} catch (shareError) {\n\t\t\tthis.emitErrorLoadShare({\n\t\t\t\tlifecycle: \"loadShare\",\n\t\t\t\tpkgName,\n\t\t\t\tshareInfo: shareOptionsRes,\n\t\t\t\terror: shareError\n\t\t\t});\n\t\t\tthrow shareError;\n\t\t}\n\t}\n\t/**\n\t* This function initializes the sharing sequence (executed only once per share scope).\n\t* It accepts one argument, the name of the share scope.\n\t* If the share scope does not exist, it creates one.\n\t*/\n\tinitializeSharing(shareScopeName = DEFAULT_SCOPE, extraOptions) {\n\t\tconst { host } = this;\n\t\tconst from = extraOptions?.from;\n\t\tconst strategy = extraOptions?.strategy;\n\t\tlet initScope = extraOptions?.initScope;\n\t\tconst promises = [];\n\t\tif (from !== \"build\") {\n\t\t\tconst { initTokens } = this;\n\t\t\tif (!initScope) initScope = [];\n\t\t\tlet initToken = initTokens[shareScopeName];\n\t\t\tif (!initToken) initToken = initTokens[shareScopeName] = { from: this.host.name };\n\t\t\tif (initScope.indexOf(initToken) >= 0) return promises;\n\t\t\tinitScope.push(initToken);\n\t\t}\n\t\tconst shareScope = this.shareScopeMap;\n\t\tconst hostName = host.options.name;\n\t\tif (!shareScope[shareScopeName]) shareScope[shareScopeName] = {};\n\t\tconst scope = shareScope[shareScopeName];\n\t\tconst register = (name, shared) => {\n\t\t\tconst { version, eager } = shared;\n\t\t\tscope[name] = scope[name] || {};\n\t\t\tconst versions = scope[name];\n\t\t\tconst activeVersion = versions[version] && directShare(versions[version]);\n\t\t\tconst activeVersionEager = Boolean(activeVersion && (\"eager\" in activeVersion && activeVersion.eager || \"shareConfig\" in activeVersion && activeVersion.shareConfig?.eager));\n\t\t\tif (!activeVersion || activeVersion.strategy !== \"loaded-first\" && !activeVersion.loaded && (Boolean(!eager) !== !activeVersionEager ? eager : hostName > versions[version].from)) versions[version] = shared;\n\t\t};\n\t\tconst initRemoteModule = async (key) => {\n\t\t\tconst { module } = await host.remoteHandler.getRemoteModuleAndOptions({ id: key });\n\t\t\tlet remoteEntryExports = void 0;\n\t\t\ttry {\n\t\t\t\tremoteEntryExports = await module.getEntry();\n\t\t\t} catch (error) {\n\t\t\t\tremoteEntryExports = await host.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({\n\t\t\t\t\tid: key,\n\t\t\t\t\terror,\n\t\t\t\t\tfrom: \"runtime\",\n\t\t\t\t\tlifecycle: \"beforeLoadShare\",\n\t\t\t\t\tremote: module.remoteInfo,\n\t\t\t\t\torigin: host\n\t\t\t\t});\n\t\t\t\tif (!remoteEntryExports) return;\n\t\t\t} finally {\n\t\t\t\tif (remoteEntryExports?.init && !module.initing) {\n\t\t\t\t\tmodule.remoteEntryExports = remoteEntryExports;\n\t\t\t\t\tawait module.init(void 0, void 0, initScope);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tObject.keys(host.options.shared).forEach((shareName) => {\n\t\t\thost.options.shared[shareName].forEach((shared) => {\n\t\t\t\tif (shared.scope.includes(shareScopeName)) register(shareName, shared);\n\t\t\t});\n\t\t});\n\t\tif (host.options.shareStrategy === \"version-first\" || strategy === \"version-first\") host.options.remotes.forEach((remote) => {\n\t\t\tif (remote.shareScope === shareScopeName) promises.push(initRemoteModule(remote.name));\n\t\t});\n\t\treturn promises;\n\t}\n\tloadShareSync(pkgName, extraOptions) {\n\t\tconst { host } = this;\n\t\tconst shareOptions = getTargetSharedOptions({\n\t\t\tpkgName,\n\t\t\textraOptions,\n\t\t\tshareInfos: host.options.shared\n\t\t});\n\t\ttry {\n\t\t\tif (shareOptions?.scope) shareOptions.scope.forEach((shareScope) => {\n\t\t\t\tthis.initializeSharing(shareScope, { strategy: shareOptions.strategy });\n\t\t\t});\n\t\t\tconst { shared: registeredShared } = getRegisteredShare(this.shareScopeMap, pkgName, shareOptions, this.hooks.lifecycle.resolveShare) || {};\n\t\t\tif (registeredShared) {\n\t\t\t\tif (typeof registeredShared.lib === \"function\") {\n\t\t\t\t\taddUseIn(registeredShared, host.options.name);\n\t\t\t\t\tif (!registeredShared.loaded) {\n\t\t\t\t\t\tregisteredShared.loaded = true;\n\t\t\t\t\t\tif (registeredShared.from === host.options.name) shareOptions.loaded = true;\n\t\t\t\t\t}\n\t\t\t\t\tthis.emitAfterLoadShare({\n\t\t\t\t\t\tlifecycle: \"loadShareSync\",\n\t\t\t\t\t\tpkgName,\n\t\t\t\t\t\tshareInfo: shareOptions,\n\t\t\t\t\t\tselectedShared: registeredShared\n\t\t\t\t\t});\n\t\t\t\t\treturn registeredShared.lib;\n\t\t\t\t}\n\t\t\t\tif (typeof registeredShared.get === \"function\") {\n\t\t\t\t\tconst module = registeredShared.get();\n\t\t\t\t\tif (!(module instanceof Promise)) {\n\t\t\t\t\t\taddUseIn(registeredShared, host.options.name);\n\t\t\t\t\t\tthis.setShared({\n\t\t\t\t\t\t\tpkgName,\n\t\t\t\t\t\t\tloaded: true,\n\t\t\t\t\t\t\tfrom: host.options.name,\n\t\t\t\t\t\t\tlib: module,\n\t\t\t\t\t\t\tshared: registeredShared\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.emitAfterLoadShare({\n\t\t\t\t\t\t\tlifecycle: \"loadShareSync\",\n\t\t\t\t\t\t\tpkgName,\n\t\t\t\t\t\t\tshareInfo: shareOptions,\n\t\t\t\t\t\t\tselectedShared: registeredShared\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn module;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shareOptions.lib) {\n\t\t\t\tif (!shareOptions.loaded) shareOptions.loaded = true;\n\t\t\t\tthis.emitAfterLoadShare({\n\t\t\t\t\tlifecycle: \"loadShareSync\",\n\t\t\t\t\tpkgName,\n\t\t\t\t\tshareInfo: shareOptions,\n\t\t\t\t\tselectedShared: shareOptions\n\t\t\t\t});\n\t\t\t\treturn shareOptions.lib;\n\t\t\t}\n\t\t\tif (shareOptions.get) {\n\t\t\t\tconst module = shareOptions.get();\n\t\t\t\tif (module instanceof Promise) error(extraOptions?.from === \"build\" ? RUNTIME_005 : RUNTIME_006, runtimeDescMap, {\n\t\t\t\t\thostName: host.options.name,\n\t\t\t\t\tsharedPkgName: pkgName\n\t\t\t\t}, void 0, optionsToMFContext(host.options));\n\t\t\t\tshareOptions.lib = module;\n\t\t\t\tthis.setShared({\n\t\t\t\t\tpkgName,\n\t\t\t\t\tloaded: true,\n\t\t\t\t\tfrom: host.options.name,\n\t\t\t\t\tlib: shareOptions.lib,\n\t\t\t\t\tshared: shareOptions\n\t\t\t\t});\n\t\t\t\tthis.emitAfterLoadShare({\n\t\t\t\t\tlifecycle: \"loadShareSync\",\n\t\t\t\t\tpkgName,\n\t\t\t\t\tshareInfo: shareOptions,\n\t\t\t\t\tselectedShared: shareOptions\n\t\t\t\t});\n\t\t\t\treturn shareOptions.lib;\n\t\t\t}\n\t\t\terror(RUNTIME_006, runtimeDescMap, {\n\t\t\t\thostName: host.options.name,\n\t\t\t\tsharedPkgName: pkgName\n\t\t\t}, void 0, optionsToMFContext(host.options));\n\t\t} catch (shareError) {\n\t\t\tthis.emitErrorLoadShare({\n\t\t\t\tlifecycle: \"loadShareSync\",\n\t\t\t\tpkgName,\n\t\t\t\tshareInfo: shareOptions,\n\t\t\t\terror: shareError\n\t\t\t});\n\t\t\tthrow shareError;\n\t\t}\n\t}\n\tinitShareScopeMap(scopeName, shareScope, extraOptions = {}) {\n\t\tconst { host } = this;\n\t\tthis.shareScopeMap[scopeName] = shareScope;\n\t\tthis.hooks.lifecycle.initContainerShareScopeMap.emit({\n\t\t\tshareScope,\n\t\t\toptions: host.options,\n\t\t\torigin: host,\n\t\t\tscopeName,\n\t\t\thostShareScopeMap: extraOptions.hostShareScopeMap\n\t\t});\n\t}\n\tsetShared({ pkgName, shared, from, lib, loading, loaded, get, treeShaking }) {\n\t\tconst { version, scope = \"default\", ...shareInfo } = shared;\n\t\tconst scopes = Array.isArray(scope) ? scope : [scope];\n\t\tconst mergeAttrs = (shared) => {\n\t\t\tconst merge = (s, key, val) => {\n\t\t\t\tif (val && !s[key]) s[key] = val;\n\t\t\t};\n\t\t\tconst targetShared = treeShaking ? shared.treeShaking : shared;\n\t\t\tmerge(targetShared, \"loaded\", loaded);\n\t\t\tmerge(targetShared, \"loading\", loading);\n\t\t\tmerge(targetShared, \"get\", get);\n\t\t};\n\t\tscopes.forEach((sc) => {\n\t\t\tif (!this.shareScopeMap[sc]) this.shareScopeMap[sc] = {};\n\t\t\tif (!this.shareScopeMap[sc][pkgName]) this.shareScopeMap[sc][pkgName] = {};\n\t\t\tif (!this.shareScopeMap[sc][pkgName][version]) this.shareScopeMap[sc][pkgName][version] = {\n\t\t\t\tversion,\n\t\t\t\tscope: [sc],\n\t\t\t\t...shareInfo,\n\t\t\t\tlib\n\t\t\t};\n\t\t\tconst registeredShared = this.shareScopeMap[sc][pkgName][version];\n\t\t\tmergeAttrs(registeredShared);\n\t\t\tif (from && registeredShared.from !== from) registeredShared.from = from;\n\t\t});\n\t}\n\t_setGlobalShareScopeMap(hostOptions) {\n\t\tconst globalShareScopeMap = getGlobalShareScope();\n\t\tconst identifier = hostOptions.id || hostOptions.name;\n\t\tif (identifier && !globalShareScopeMap[identifier]) globalShareScopeMap[identifier] = this.shareScopeMap;\n\t}\n};\n\n//#endregion\nexport { SharedHandler };\n//# sourceMappingURL=index.js.map","import { AsyncWaterfallHook } from \"../utils/hooks/asyncWaterfallHooks.js\";\nimport { PluginSystem } from \"../utils/hooks/pluginSystem.js\";\nimport \"../utils/hooks/index.js\";\n\n//#region src/shared/disabled.ts\nvar DisabledSharedHandler = class {\n\tconstructor() {\n\t\tthis.shareScopeMap = {};\n\t\tthis.hooks = new PluginSystem({ afterResolve: new AsyncWaterfallHook(\"afterResolve\") });\n\t}\n\tregisterShared() {\n\t\treturn {\n\t\t\tnewShareInfos: {},\n\t\t\tallShareInfos: {}\n\t\t};\n\t}\n\tloadShare() {\n\t\tthrow new Error(\"Shared dependency loading is disabled by experiments.optimization.disableShared.\");\n\t}\n\tloadShareSync() {\n\t\tthrow new Error(\"Shared dependency loading is disabled by experiments.optimization.disableShared.\");\n\t}\n\tinitializeSharing() {\n\t\treturn [];\n\t}\n\tinitShareScopeMap(scopeName, shareScope) {\n\t\tthis.shareScopeMap[scopeName] = shareScope;\n\t}\n};\n\n//#endregion\nexport { DisabledSharedHandler };\n//# sourceMappingURL=disabled.js.map","import { assert, error, logger } from \"../utils/logger.js\";\nimport { getFMId } from \"../utils/tool.js\";\nimport { CurrentGlobal, Global, getInfoWithoutType, globalLoading } from \"../global.js\";\nimport { DEFAULT_REMOTE_TYPE, DEFAULT_SCOPE } from \"../constant.js\";\nimport { getGlobalShareScope } from \"../utils/share.js\";\nimport { composeRemoteRequestId, matchRemoteWithNameAndExpose } from \"../utils/manifest.js\";\nimport { getRemoteEntryUniqueKey, getRemoteInfo } from \"../utils/load.js\";\nimport { optionsToMFContext } from \"../utils/context.js\";\nimport \"../utils/index.js\";\nimport { formatPreloadArgs, preloadAssets } from \"../utils/preload.js\";\nimport { Module as Module$1 } from \"../module/index.js\";\nimport { SyncHook } from \"../utils/hooks/syncHook.js\";\nimport { AsyncHook } from \"../utils/hooks/asyncHook.js\";\nimport { SyncWaterfallHook } from \"../utils/hooks/syncWaterfallHook.js\";\nimport { AsyncWaterfallHook } from \"../utils/hooks/asyncWaterfallHooks.js\";\nimport { PluginSystem } from \"../utils/hooks/pluginSystem.js\";\nimport \"../utils/hooks/index.js\";\nimport { getGlobalRemoteInfo } from \"../plugins/snapshot/SnapshotHandler.js\";\nimport { composeKeyWithSeparator, isBrowserEnvValue, warn } from \"@module-federation/sdk\";\nimport { RUNTIME_004, runtimeDescMap } from \"@module-federation/error-codes\";\n\n//#region src/remote/index.ts\nvar RemoteHandler = class {\n\tconstructor(host) {\n\t\tthis.hooks = new PluginSystem({\n\t\t\tbeforeRegisterRemote: new SyncWaterfallHook(\"beforeRegisterRemote\"),\n\t\t\tregisterRemote: new SyncWaterfallHook(\"registerRemote\"),\n\t\t\tbeforeRequest: new AsyncWaterfallHook(\"beforeRequest\"),\n\t\t\tafterMatchRemote: new AsyncHook(\"afterMatchRemote\"),\n\t\t\tonLoad: new AsyncHook(\"onLoad\"),\n\t\t\tafterLoadRemote: new AsyncHook(\"afterLoadRemote\"),\n\t\t\thandlePreloadModule: new SyncHook(\"handlePreloadModule\"),\n\t\t\terrorLoadRemote: new AsyncHook(\"errorLoadRemote\"),\n\t\t\tbeforePreloadRemote: new AsyncHook(\"beforePreloadRemote\"),\n\t\t\tgeneratePreloadAssets: new AsyncHook(\"generatePreloadAssets\"),\n\t\t\tafterPreloadRemote: new AsyncHook(\"afterPreloadRemote\"),\n\t\t\tloadEntry: new AsyncHook()\n\t\t});\n\t\tthis.host = host;\n\t\tthis.idToRemoteMap = {};\n\t}\n\tformatAndRegisterRemote(globalOptions, userOptions) {\n\t\treturn (userOptions.remotes || []).reduce((res, remote) => {\n\t\t\tthis.registerRemote(remote, res, { force: false });\n\t\t\treturn res;\n\t\t}, globalOptions.remotes);\n\t}\n\tsetIdToRemoteMap(id, remoteMatchInfo) {\n\t\tconst { remote, expose } = remoteMatchInfo;\n\t\tconst { name, alias } = remote;\n\t\tthis.idToRemoteMap[id] = {\n\t\t\tname: remote.name,\n\t\t\texpose\n\t\t};\n\t\tif (alias && id.startsWith(name)) {\n\t\t\tconst idWithAlias = id.replace(name, alias);\n\t\t\tthis.idToRemoteMap[idWithAlias] = {\n\t\t\t\tname: remote.name,\n\t\t\t\texpose\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tif (alias && id.startsWith(alias)) {\n\t\t\tconst idWithName = id.replace(alias, name);\n\t\t\tthis.idToRemoteMap[idWithName] = {\n\t\t\t\tname: remote.name,\n\t\t\t\texpose\n\t\t\t};\n\t\t}\n\t}\n\tasync loadRemote(id, options) {\n\t\tconst { host } = this;\n\t\tconst startMatchInfo = matchRemoteWithNameAndExpose(host.options.remotes, id);\n\t\tlet completeRequestId = id;\n\t\tlet completeExpose = startMatchInfo?.expose;\n\t\tlet completeRemote = startMatchInfo ? getRemoteInfo(startMatchInfo.remote) : void 0;\n\t\tlet afterLoadRemoteArgs;\n\t\ttry {\n\t\t\tconst { loadFactory = true } = options || { loadFactory: true };\n\t\t\tconst { module, moduleOptions, remoteMatchInfo } = await this.getRemoteModuleAndOptions({ id });\n\t\t\tconst { pkgNameOrAlias, remote, expose, id: idRes, remoteSnapshot } = remoteMatchInfo;\n\t\t\tcompleteRequestId = idRes;\n\t\t\tcompleteExpose = expose;\n\t\t\tcompleteRemote = getRemoteInfo(remote);\n\t\t\tconst moduleOrFactory = await module.get(idRes, expose, options, remoteSnapshot);\n\t\t\tconst moduleWrapper = await this.hooks.lifecycle.onLoad.emit({\n\t\t\t\tid: idRes,\n\t\t\t\tpkgNameOrAlias,\n\t\t\t\texpose,\n\t\t\t\texposeModule: loadFactory ? moduleOrFactory : void 0,\n\t\t\t\texposeModuleFactory: loadFactory ? void 0 : moduleOrFactory,\n\t\t\t\tremote,\n\t\t\t\toptions: moduleOptions,\n\t\t\t\tmoduleInstance: module,\n\t\t\t\torigin: host\n\t\t\t});\n\t\t\tthis.setIdToRemoteMap(id, remoteMatchInfo);\n\t\t\tafterLoadRemoteArgs = {\n\t\t\t\tid: completeRequestId,\n\t\t\t\texpose: completeExpose,\n\t\t\t\tremote: completeRemote,\n\t\t\t\toptions,\n\t\t\t\torigin: host\n\t\t\t};\n\t\t\tif (typeof moduleWrapper === \"function\") return moduleWrapper;\n\t\t\treturn moduleOrFactory;\n\t\t} catch (error) {\n\t\t\tconst { from = \"runtime\" } = options || { from: \"runtime\" };\n\t\t\tlet failOver;\n\t\t\ttry {\n\t\t\t\tfailOver = await this.hooks.lifecycle.errorLoadRemote.emit({\n\t\t\t\t\tid,\n\t\t\t\t\terror,\n\t\t\t\t\tfrom,\n\t\t\t\t\tlifecycle: \"onLoad\",\n\t\t\t\t\texpose: completeExpose,\n\t\t\t\t\tremote: completeRemote,\n\t\t\t\t\torigin: host\n\t\t\t\t});\n\t\t\t} catch (hookError) {\n\t\t\t\tafterLoadRemoteArgs = {\n\t\t\t\t\tid: completeRequestId,\n\t\t\t\t\texpose: completeExpose,\n\t\t\t\t\tremote: completeRemote,\n\t\t\t\t\toptions,\n\t\t\t\t\terror: hookError,\n\t\t\t\t\torigin: host\n\t\t\t\t};\n\t\t\t\tthrow hookError;\n\t\t\t}\n\t\t\tif (!failOver) {\n\t\t\t\tafterLoadRemoteArgs = {\n\t\t\t\t\tid: completeRequestId,\n\t\t\t\t\texpose: completeExpose,\n\t\t\t\t\tremote: completeRemote,\n\t\t\t\t\toptions,\n\t\t\t\t\terror,\n\t\t\t\t\torigin: host\n\t\t\t\t};\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tafterLoadRemoteArgs = {\n\t\t\t\tid: completeRequestId,\n\t\t\t\texpose: completeExpose,\n\t\t\t\tremote: completeRemote,\n\t\t\t\toptions,\n\t\t\t\terror,\n\t\t\t\torigin: host,\n\t\t\t\trecovered: true\n\t\t\t};\n\t\t\treturn failOver;\n\t\t} finally {\n\t\t\tif (afterLoadRemoteArgs) await this.hooks.lifecycle.afterLoadRemote.emit(afterLoadRemoteArgs);\n\t\t}\n\t}\n\tasync preloadRemote(preloadOptions) {\n\t\tconst { host } = this;\n\t\tconst preloadResults = [];\n\t\tawait this.hooks.lifecycle.beforePreloadRemote.emit({\n\t\t\tpreloadOps: preloadOptions,\n\t\t\toptions: host.options,\n\t\t\torigin: host\n\t\t});\n\t\tconst preloadOps = formatPreloadArgs(host.options.remotes, preloadOptions);\n\t\tconst createPreloadAssetOps = (ops) => {\n\t\t\tconst { preloadConfig, remote } = ops;\n\t\t\tconst exposes = preloadConfig.exposes || [];\n\t\t\tif (!exposes.length) return [{\n\t\t\t\tops,\n\t\t\t\tid: `${remote.name}/*`\n\t\t\t}];\n\t\t\treturn exposes.map((expose) => ({\n\t\t\t\tops: {\n\t\t\t\t\t...ops,\n\t\t\t\t\tpreloadConfig: {\n\t\t\t\t\t\t...preloadConfig,\n\t\t\t\t\t\texposes: [expose]\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tid: composeRemoteRequestId(remote.name, expose)\n\t\t\t}));\n\t\t};\n\t\tlet preloadError;\n\t\tawait Promise.all(preloadOps.flatMap(createPreloadAssetOps).map(async (assetOps) => {\n\t\t\tconst { ops, id: preloadId } = assetOps;\n\t\t\tconst { remote, preloadConfig } = ops;\n\t\t\tconst remoteInfo = getRemoteInfo(remote);\n\t\t\ttry {\n\t\t\t\tconst { globalSnapshot, remoteSnapshot } = await host.snapshotHandler.loadRemoteSnapshotInfo({\n\t\t\t\t\tmoduleInfo: remote,\n\t\t\t\t\tid: preloadId,\n\t\t\t\t\tinitiator: \"preloadRemote\"\n\t\t\t\t});\n\t\t\t\tconst assets = await this.hooks.lifecycle.generatePreloadAssets.emit({\n\t\t\t\t\torigin: host,\n\t\t\t\t\tpreloadOptions: ops,\n\t\t\t\t\tremote,\n\t\t\t\t\tremoteInfo,\n\t\t\t\t\tglobalSnapshot,\n\t\t\t\t\tremoteSnapshot\n\t\t\t\t});\n\t\t\t\tif (!assets) return;\n\t\t\t\tconst results = await preloadAssets(remoteInfo, host, assets, true, {\n\t\t\t\t\tinitiator: \"preloadRemote\",\n\t\t\t\t\tid: preloadId\n\t\t\t\t});\n\t\t\t\tpreloadResults.push({\n\t\t\t\t\tremote,\n\t\t\t\t\tremoteInfo,\n\t\t\t\t\tpreloadConfig,\n\t\t\t\t\tid: preloadId,\n\t\t\t\t\tresults\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tpreloadResults.push({\n\t\t\t\t\tremote,\n\t\t\t\t\tremoteInfo,\n\t\t\t\t\tpreloadConfig,\n\t\t\t\t\tid: preloadId,\n\t\t\t\t\tresults: [{\n\t\t\t\t\t\turl: remoteInfo.entry,\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\tresourceType: /\\.json(?:$|[?#])/i.test(remoteInfo.entry) ? \"manifest\" : \"remoteEntry\",\n\t\t\t\t\t\tinitiator: \"preloadRemote\",\n\t\t\t\t\t\tid: preloadId,\n\t\t\t\t\t\terror\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t}\n\t\t}));\n\t\tconst failedResults = preloadResults.flatMap((preloadResult) => preloadResult.results.filter((result) => result.status === \"error\" || result.status === \"timeout\"));\n\t\tif (failedResults.length > 0) {\n\t\t\tpreloadError = /* @__PURE__ */ new Error(`preloadRemote failed to load ${failedResults.length} resource(s).`);\n\t\t\tObject.assign(preloadError, {\n\t\t\t\tresults: preloadResults,\n\t\t\t\tfailedResults\n\t\t\t});\n\t\t}\n\t\tawait this.hooks.lifecycle.afterPreloadRemote.emit({\n\t\t\tpreloadOps: preloadOptions,\n\t\t\toptions: host.options,\n\t\t\torigin: host,\n\t\t\tresults: preloadResults,\n\t\t\terror: preloadError\n\t\t});\n\t\tif (preloadError) throw preloadError;\n\t}\n\tregisterRemotes(remotes, options) {\n\t\tconst { host } = this;\n\t\tremotes.forEach((remote) => {\n\t\t\tthis.registerRemote(remote, host.options.remotes, { force: options?.force });\n\t\t});\n\t}\n\tinitRawContainer(name, url, container) {\n\t\tconst { host } = this;\n\t\tconst module = new Module$1({\n\t\t\thost,\n\t\t\tremoteInfo: getRemoteInfo({\n\t\t\t\tname,\n\t\t\t\tentry: url\n\t\t\t})\n\t\t});\n\t\tmodule.remoteEntryExports = container;\n\t\thost.moduleCache.set(name, module);\n\t\treturn module;\n\t}\n\tasync getRemoteModuleAndOptions(options) {\n\t\tconst { host } = this;\n\t\tconst { id } = options;\n\t\tlet loadRemoteArgs;\n\t\ttry {\n\t\t\tloadRemoteArgs = await this.hooks.lifecycle.beforeRequest.emit({\n\t\t\t\tid,\n\t\t\t\toptions: host.options,\n\t\t\t\torigin: host\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tloadRemoteArgs = await this.hooks.lifecycle.errorLoadRemote.emit({\n\t\t\t\tid,\n\t\t\t\toptions: host.options,\n\t\t\t\torigin: host,\n\t\t\t\tfrom: \"runtime\",\n\t\t\t\terror,\n\t\t\t\tlifecycle: \"beforeRequest\"\n\t\t\t});\n\t\t\tif (!loadRemoteArgs) throw error;\n\t\t}\n\t\tconst { id: idRes } = loadRemoteArgs;\n\t\tconst remoteSplitInfo = matchRemoteWithNameAndExpose(host.options.remotes, idRes);\n\t\tif (!remoteSplitInfo) try {\n\t\t\terror(RUNTIME_004, runtimeDescMap, {\n\t\t\t\thostName: host.options.name,\n\t\t\t\trequestId: idRes\n\t\t\t}, void 0, optionsToMFContext(host.options));\n\t\t} catch (matchError) {\n\t\t\tawait this.hooks.lifecycle.afterMatchRemote.emit({\n\t\t\t\tid: idRes,\n\t\t\t\toptions: host.options,\n\t\t\t\terror: matchError,\n\t\t\t\torigin: host\n\t\t\t});\n\t\t\tthrow matchError;\n\t\t}\n\t\tconst { remote: rawRemote } = remoteSplitInfo;\n\t\tconst remoteInfo = getRemoteInfo(rawRemote);\n\t\tawait this.hooks.lifecycle.afterMatchRemote.emit({\n\t\t\tid: idRes,\n\t\t\t...remoteSplitInfo,\n\t\t\toptions: host.options,\n\t\t\tremoteInfo,\n\t\t\torigin: host\n\t\t});\n\t\tconst matchInfo = await host.sharedHandler.hooks.lifecycle.afterResolve.emit({\n\t\t\tid: idRes,\n\t\t\t...remoteSplitInfo,\n\t\t\toptions: host.options,\n\t\t\torigin: host,\n\t\t\tremoteInfo\n\t\t});\n\t\tconst { remote, expose } = matchInfo;\n\t\tassert(remote && expose, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${idRes}.`);\n\t\tlet module = host.moduleCache.get(remote.name);\n\t\tconst moduleOptions = {\n\t\t\thost,\n\t\t\tremoteInfo\n\t\t};\n\t\tif (!module) {\n\t\t\tmodule = new Module$1(moduleOptions);\n\t\t\thost.moduleCache.set(remote.name, module);\n\t\t}\n\t\treturn {\n\t\t\tmodule,\n\t\t\tmoduleOptions,\n\t\t\tremoteMatchInfo: matchInfo\n\t\t};\n\t}\n\tregisterRemote(remote, targetRemotes, options) {\n\t\tconst { host } = this;\n\t\tconst normalizeRemote = () => {\n\t\t\tif (remote.alias) {\n\t\t\t\tconst findEqual = targetRemotes.find((item) => remote.alias && (item.name.startsWith(remote.alias) || item.alias?.startsWith(remote.alias)));\n\t\t\t\tassert(!findEqual, `The alias ${remote.alias} of remote ${remote.name} is not allowed to be the prefix of ${findEqual && findEqual.name} name or alias`);\n\t\t\t}\n\t\t\tif (\"entry\" in remote) {\n\t\t\t\tif (isBrowserEnvValue && typeof window !== \"undefined\" && !remote.entry.startsWith(\"http\")) remote.entry = new URL(remote.entry, window.location.origin).href;\n\t\t\t}\n\t\t\tif (!remote.shareScope) remote.shareScope = DEFAULT_SCOPE;\n\t\t\tif (!remote.type) remote.type = DEFAULT_REMOTE_TYPE;\n\t\t};\n\t\tthis.hooks.lifecycle.beforeRegisterRemote.emit({\n\t\t\tremote,\n\t\t\torigin: host\n\t\t});\n\t\tconst registeredRemote = targetRemotes.find((item) => item.name === remote.name);\n\t\tif (!registeredRemote) {\n\t\t\tnormalizeRemote();\n\t\t\ttargetRemotes.push(remote);\n\t\t\tthis.hooks.lifecycle.registerRemote.emit({\n\t\t\t\tremote,\n\t\t\t\torigin: host\n\t\t\t});\n\t\t} else {\n\t\t\tconst messages = [`The remote \"${remote.name}\" is already registered.`, \"Please note that overriding it may cause unexpected errors.\"];\n\t\t\tif (options?.force) {\n\t\t\t\tthis.removeRemote(registeredRemote);\n\t\t\t\tnormalizeRemote();\n\t\t\t\ttargetRemotes.push(remote);\n\t\t\t\tthis.hooks.lifecycle.registerRemote.emit({\n\t\t\t\t\tremote,\n\t\t\t\t\torigin: host\n\t\t\t\t});\n\t\t\t\twarn(messages.join(\" \"));\n\t\t\t}\n\t\t}\n\t}\n\tremoveRemote(remote) {\n\t\ttry {\n\t\t\tconst { host } = this;\n\t\t\tconst { name } = remote;\n\t\t\tconst remoteIndex = host.options.remotes.findIndex((item) => item.name === name);\n\t\t\tif (remoteIndex !== -1) host.options.remotes.splice(remoteIndex, 1);\n\t\t\tconst globalSnapshotKey = getInfoWithoutType(CurrentGlobal.__FEDERATION__.moduleInfo, getFMId(remote)).key;\n\t\t\tdelete CurrentGlobal.__FEDERATION__.moduleInfo[globalSnapshotKey];\n\t\t\tif (\"entry\" in remote) {\n\t\t\t\thost.snapshotHandler.manifestCache.delete(remote.entry);\n\t\t\t\tdelete Global.__FEDERATION__.__MANIFEST_LOADING__[remote.entry];\n\t\t\t}\n\t\t\tconst { hostGlobalSnapshot } = getGlobalRemoteInfo(remote, host);\n\t\t\tif (hostGlobalSnapshot) {\n\t\t\t\tconst remoteKey = hostGlobalSnapshot && \"remotesInfo\" in hostGlobalSnapshot && hostGlobalSnapshot.remotesInfo && getInfoWithoutType(hostGlobalSnapshot.remotesInfo, remote.name).key;\n\t\t\t\tif (remoteKey) delete hostGlobalSnapshot.remotesInfo[remoteKey];\n\t\t\t}\n\t\t\tconst loadedModule = host.moduleCache.get(remote.name);\n\t\t\tif (loadedModule) {\n\t\t\t\tconst remoteInfo = loadedModule.remoteInfo;\n\t\t\t\tconst key = remoteInfo.entryGlobalName;\n\t\t\t\tif (CurrentGlobal[key]) if (Object.getOwnPropertyDescriptor(CurrentGlobal, key)?.configurable) delete CurrentGlobal[key];\n\t\t\t\telse CurrentGlobal[key] = void 0;\n\t\t\t\tconst remoteEntryUniqueKey = getRemoteEntryUniqueKey(loadedModule.remoteInfo);\n\t\t\t\tif (globalLoading[remoteEntryUniqueKey]) delete globalLoading[remoteEntryUniqueKey];\n\t\t\t\tlet remoteInsId = remoteInfo.buildVersion ? composeKeyWithSeparator(remoteInfo.name, remoteInfo.buildVersion) : remoteInfo.name;\n\t\t\t\tconst remoteInsIndex = CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex((ins) => {\n\t\t\t\t\tif (remoteInfo.buildVersion) return ins.options.id === remoteInsId;\n\t\t\t\t\telse return ins.name === remoteInsId;\n\t\t\t\t});\n\t\t\t\tif (remoteInsIndex !== -1) {\n\t\t\t\t\tconst remoteIns = CurrentGlobal.__FEDERATION__.__INSTANCES__[remoteInsIndex];\n\t\t\t\t\tremoteInsId = remoteIns.options.id || remoteInsId;\n\t\t\t\t\tconst globalShareScopeMap = getGlobalShareScope();\n\t\t\t\t\tlet isAllSharedNotUsed = true;\n\t\t\t\t\tconst needDeleteKeys = [];\n\t\t\t\t\tObject.keys(globalShareScopeMap).forEach((instId) => {\n\t\t\t\t\t\tconst shareScopeMap = globalShareScopeMap[instId];\n\t\t\t\t\t\tshareScopeMap && Object.keys(shareScopeMap).forEach((shareScope) => {\n\t\t\t\t\t\t\tconst shareScopeVal = shareScopeMap[shareScope];\n\t\t\t\t\t\t\tshareScopeVal && Object.keys(shareScopeVal).forEach((shareName) => {\n\t\t\t\t\t\t\t\tconst sharedPkgs = shareScopeVal[shareName];\n\t\t\t\t\t\t\t\tsharedPkgs && Object.keys(sharedPkgs).forEach((shareVersion) => {\n\t\t\t\t\t\t\t\t\tconst shared = sharedPkgs[shareVersion];\n\t\t\t\t\t\t\t\t\tif (shared && typeof shared === \"object\" && shared.from === remoteInfo.name) if (shared.loaded || shared.loading) {\n\t\t\t\t\t\t\t\t\t\tshared.useIn = shared.useIn.filter((usedHostName) => usedHostName !== remoteInfo.name);\n\t\t\t\t\t\t\t\t\t\tif (shared.useIn.length) isAllSharedNotUsed = false;\n\t\t\t\t\t\t\t\t\t\telse needDeleteKeys.push([\n\t\t\t\t\t\t\t\t\t\t\tinstId,\n\t\t\t\t\t\t\t\t\t\t\tshareScope,\n\t\t\t\t\t\t\t\t\t\t\tshareName,\n\t\t\t\t\t\t\t\t\t\t\tshareVersion\n\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t} else needDeleteKeys.push([\n\t\t\t\t\t\t\t\t\t\tinstId,\n\t\t\t\t\t\t\t\t\t\tshareScope,\n\t\t\t\t\t\t\t\t\t\tshareName,\n\t\t\t\t\t\t\t\t\t\tshareVersion\n\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tif (isAllSharedNotUsed) {\n\t\t\t\t\t\tremoteIns.shareScopeMap = {};\n\t\t\t\t\t\tdelete globalShareScopeMap[remoteInsId];\n\t\t\t\t\t}\n\t\t\t\t\tneedDeleteKeys.forEach(([insId, shareScope, shareName, shareVersion]) => {\n\t\t\t\t\t\tdelete globalShareScopeMap[insId]?.[shareScope]?.[shareName]?.[shareVersion];\n\t\t\t\t\t});\n\t\t\t\t\tCurrentGlobal.__FEDERATION__.__INSTANCES__.splice(remoteInsIndex, 1);\n\t\t\t\t}\n\t\t\t\thost.moduleCache.delete(remote.name);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tlogger.error(`removeRemote failed: ${err instanceof Error ? err.message : String(err)}`);\n\t\t}\n\t}\n};\n\n//#endregion\nexport { RemoteHandler };\n//# sourceMappingURL=index.js.map","import { error } from \"./utils/logger.js\";\nimport { DEFAULT_SCOPE } from \"./constant.js\";\nimport { formatShareConfigs } from \"./utils/share.js\";\nimport { getBuilderId } from \"./utils/env.js\";\nimport { registerPlugins } from \"./utils/plugin.js\";\nimport \"./utils/index.js\";\nimport { SyncHook } from \"./utils/hooks/syncHook.js\";\nimport { AsyncHook } from \"./utils/hooks/asyncHook.js\";\nimport { SyncWaterfallHook } from \"./utils/hooks/syncWaterfallHook.js\";\nimport { AsyncWaterfallHook } from \"./utils/hooks/asyncWaterfallHooks.js\";\nimport { PluginSystem } from \"./utils/hooks/pluginSystem.js\";\nimport \"./utils/hooks/index.js\";\nimport { DisabledRemoteHandler } from \"./remote/disabled.js\";\nimport { snapshotPlugin } from \"./plugins/snapshot/index.js\";\nimport { generatePreloadAssetsPlugin } from \"./plugins/generate-preload-assets.js\";\nimport { SnapshotHandler } from \"./plugins/snapshot/SnapshotHandler.js\";\nimport { DisabledSnapshotHandler } from \"./plugins/snapshot/disabled.js\";\nimport { SharedHandler } from \"./shared/index.js\";\nimport { DisabledSharedHandler } from \"./shared/disabled.js\";\nimport { RemoteHandler } from \"./remote/index.js\";\nimport { isBrowserEnvValue } from \"@module-federation/sdk\";\nimport { RUNTIME_010, getShortErrorMsg, runtimeDescMap } from \"@module-federation/error-codes\";\n\n//#region src/core.ts\nconst USE_SNAPSHOT = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN === \"boolean\" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : true;\nconst USE_REMOTE = typeof FEDERATION_OPTIMIZE_NO_REMOTE === \"boolean\" ? !FEDERATION_OPTIMIZE_NO_REMOTE : true;\nconst USE_SHARED = typeof FEDERATION_OPTIMIZE_NO_SHARED === \"boolean\" ? !FEDERATION_OPTIMIZE_NO_SHARED : true;\nvar ModuleFederation = class {\n\tconstructor(userOptions) {\n\t\tthis.hooks = new PluginSystem({\n\t\t\tbeforeInit: new SyncWaterfallHook(\"beforeInit\"),\n\t\t\tinit: new SyncHook(),\n\t\t\tbeforeInitContainer: new AsyncWaterfallHook(\"beforeInitContainer\"),\n\t\t\tinitContainer: new AsyncWaterfallHook(\"initContainer\")\n\t\t});\n\t\tthis.version = \"2.8.2\";\n\t\tthis.moduleCache = /* @__PURE__ */ new Map();\n\t\tthis.loaderHook = new PluginSystem({\n\t\t\tgetModuleInfo: new SyncHook(),\n\t\t\tcreateScript: new SyncHook(),\n\t\t\tcreateLink: new SyncHook(),\n\t\t\tfetch: new AsyncHook(),\n\t\t\tloadEntryError: new AsyncHook(),\n\t\t\tafterLoadEntry: new AsyncHook(\"afterLoadEntry\"),\n\t\t\tbeforeInitRemote: new AsyncHook(\"beforeInitRemote\"),\n\t\t\tafterInitRemote: new AsyncHook(\"afterInitRemote\"),\n\t\t\tbeforeGetExpose: new AsyncHook(\"beforeGetExpose\"),\n\t\t\tafterGetExpose: new AsyncHook(\"afterGetExpose\"),\n\t\t\tbeforeExecuteFactory: new AsyncHook(\"beforeExecuteFactory\"),\n\t\t\tafterExecuteFactory: new AsyncHook(\"afterExecuteFactory\"),\n\t\t\tgetModuleFactory: new AsyncHook()\n\t\t});\n\t\tthis.bridgeHook = new PluginSystem({\n\t\t\tbeforeBridgeRender: new SyncHook(),\n\t\t\tafterBridgeRender: new SyncHook(),\n\t\t\tbeforeBridgeDestroy: new SyncHook(),\n\t\t\tafterBridgeDestroy: new SyncHook()\n\t\t});\n\t\tconst plugins = USE_REMOTE && USE_SNAPSHOT ? [snapshotPlugin(), generatePreloadAssetsPlugin()] : [];\n\t\tconst defaultOptions = {\n\t\t\tid: getBuilderId(),\n\t\t\tname: userOptions.name,\n\t\t\tplugins,\n\t\t\tremotes: [],\n\t\t\tshared: {},\n\t\t\tinBrowser: isBrowserEnvValue\n\t\t};\n\t\tthis.name = userOptions.name;\n\t\tthis.options = defaultOptions;\n\t\tthis.snapshotHandler = USE_REMOTE ? new SnapshotHandler(this) : new DisabledSnapshotHandler();\n\t\tthis.sharedHandler = USE_SHARED ? new SharedHandler(this) : new DisabledSharedHandler();\n\t\tthis.remoteHandler = USE_REMOTE ? new RemoteHandler(this) : new DisabledRemoteHandler();\n\t\tthis.shareScopeMap = this.sharedHandler.shareScopeMap;\n\t\tthis.registerPlugins([...defaultOptions.plugins, ...userOptions.plugins || []]);\n\t\tthis.options = this.formatOptions(defaultOptions, userOptions);\n\t}\n\tinitOptions(userOptions) {\n\t\tif (userOptions.name && userOptions.name !== this.options.name) error(getShortErrorMsg(RUNTIME_010, runtimeDescMap));\n\t\tthis.registerPlugins(userOptions.plugins);\n\t\tconst options = this.formatOptions(this.options, userOptions);\n\t\tthis.options = options;\n\t\treturn options;\n\t}\n\tasync loadShare(pkgName, extraOptions) {\n\t\treturn this.sharedHandler.loadShare(pkgName, extraOptions);\n\t}\n\tloadShareSync(pkgName, extraOptions) {\n\t\treturn this.sharedHandler.loadShareSync(pkgName, extraOptions);\n\t}\n\tinitializeSharing(shareScopeName = DEFAULT_SCOPE, extraOptions) {\n\t\treturn this.sharedHandler.initializeSharing(shareScopeName, extraOptions);\n\t}\n\tinitRawContainer(name, url, container) {\n\t\treturn this.remoteHandler.initRawContainer(name, url, container);\n\t}\n\tasync loadRemote(id, options) {\n\t\treturn this.remoteHandler.loadRemote(id, options);\n\t}\n\tasync preloadRemote(preloadOptions) {\n\t\treturn this.remoteHandler.preloadRemote(preloadOptions);\n\t}\n\tinitShareScopeMap(scopeName, shareScope, extraOptions = {}) {\n\t\tthis.sharedHandler.initShareScopeMap(scopeName, shareScope, extraOptions);\n\t}\n\tformatOptions(globalOptions, userOptions) {\n\t\tconst shared = USE_SHARED ? formatShareConfigs(globalOptions, userOptions).allShareInfos : {};\n\t\tconst { userOptions: userOptionsRes, options: globalOptionsRes } = this.hooks.lifecycle.beforeInit.emit({\n\t\t\torigin: this,\n\t\t\tuserOptions,\n\t\t\toptions: globalOptions,\n\t\t\tshareInfo: shared\n\t\t});\n\t\tconst remotes = this.remoteHandler.formatAndRegisterRemote(globalOptionsRes, userOptionsRes);\n\t\tconst { allShareInfos } = this.sharedHandler.registerShared(globalOptionsRes, userOptionsRes);\n\t\tconst plugins = [...globalOptionsRes.plugins];\n\t\tif (userOptionsRes.plugins) userOptionsRes.plugins.forEach((plugin) => {\n\t\t\tif (!plugins.includes(plugin)) plugins.push(plugin);\n\t\t});\n\t\tconst optionsRes = {\n\t\t\t...globalOptions,\n\t\t\t...userOptions,\n\t\t\tplugins,\n\t\t\tremotes,\n\t\t\tshared: allShareInfos,\n\t\t\tid: userOptionsRes.id || globalOptions.id\n\t\t};\n\t\tthis.hooks.lifecycle.init.emit({\n\t\t\torigin: this,\n\t\t\toptions: optionsRes\n\t\t});\n\t\treturn optionsRes;\n\t}\n\tregisterPlugins(plugins) {\n\t\tconst pluginRes = registerPlugins(plugins, this);\n\t\tthis.options.plugins = this.options.plugins.reduce((res, plugin) => {\n\t\t\tif (!plugin) return res;\n\t\t\tif (res && !res.find((item) => item.name === plugin.name)) res.push(plugin);\n\t\t\treturn res;\n\t\t}, pluginRes || []);\n\t}\n\tregisterRemotes(remotes, options) {\n\t\treturn this.remoteHandler.registerRemotes(remotes, options);\n\t}\n\tregisterShared(shared) {\n\t\tthis.sharedHandler.registerShared(this.options, {\n\t\t\t...this.options,\n\t\t\tshared\n\t\t});\n\t}\n};\n\n//#endregion\nexport { ModuleFederation };\n//# sourceMappingURL=core.js.map","import { assert, error } from \"./utils/logger.js\";\nimport { isStaticResourcesEqual, safeWrapper } from \"./utils/tool.js\";\nimport { CurrentGlobal, Global, addGlobalSnapshot, getGlobalFederationConstructor, getGlobalSnapshot, getInfoWithoutType, registerGlobalPlugins, resetFederationGlobalInfo, setGlobalFederationConstructor, setGlobalFederationInstance } from \"./global.js\";\nimport { satisfy } from \"./utils/semver/index.js\";\nimport { getRegisteredShare } from \"./utils/share.js\";\nimport { matchRemoteWithNameAndExpose } from \"./utils/manifest.js\";\nimport { getRemoteEntry, getRemoteInfo } from \"./utils/load.js\";\nimport \"./utils/index.js\";\nimport helpers_default from \"./helpers.js\";\nimport { Module as Module$2 } from \"./module/index.js\";\nimport { UnavailableRemoteModule } from \"./remote/disabled.js\";\nimport { ModuleFederation } from \"./core.js\";\nimport { type_exports } from \"./type/index.js\";\nimport { loadScript, loadScriptNode } from \"@module-federation/sdk\";\n\n//#region src/index.ts\nconst helpers = helpers_default;\nconst Module = typeof FEDERATION_OPTIMIZE_NO_REMOTE === \"boolean\" && FEDERATION_OPTIMIZE_NO_REMOTE ? UnavailableRemoteModule : Module$2;\n\n//#endregion\nexport { CurrentGlobal, Global, Module, ModuleFederation, addGlobalSnapshot, assert, error, getGlobalFederationConstructor, getGlobalSnapshot, getInfoWithoutType, getRegisteredShare, getRemoteEntry, getRemoteInfo, helpers, isStaticResourcesEqual, loadScript, loadScriptNode, matchRemoteWithNameAndExpose, registerGlobalPlugins, resetFederationGlobalInfo, safeWrapper, satisfy, setGlobalFederationConstructor, setGlobalFederationInstance, type_exports as types };\n//# sourceMappingURL=index.js.map","import { CurrentGlobal } from \"@module-federation/runtime-core\";\n\n//#region src/utils.ts\nfunction getBuilderId() {\n\treturn typeof FEDERATION_BUILD_IDENTIFIER !== \"undefined\" ? FEDERATION_BUILD_IDENTIFIER : \"\";\n}\nfunction getGlobalFederationInstance(name, version) {\n\tconst buildId = getBuilderId();\n\treturn CurrentGlobal.__FEDERATION__.__INSTANCES__.find((GMInstance) => {\n\t\tif (buildId && GMInstance.options.id === buildId) return true;\n\t\tif (GMInstance.options.name === name && !GMInstance.options.version && !version) return true;\n\t\tif (GMInstance.options.name === name && version && GMInstance.options.version === version) return true;\n\t\treturn false;\n\t});\n}\n\n//#endregion\nexport { getGlobalFederationInstance };\n//# sourceMappingURL=utils.js.map","import { getGlobalFederationInstance } from \"./utils.js\";\nimport { CurrentGlobal, Module, ModuleFederation, assert, getGlobalFederationConstructor, getRemoteEntry, getRemoteInfo, loadScript, loadScriptNode, registerGlobalPlugins, setGlobalFederationConstructor, setGlobalFederationInstance } from \"@module-federation/runtime-core\";\nimport { RUNTIME_009, runtimeDescMap } from \"@module-federation/error-codes\";\n\n//#region src/index.ts\nfunction createInstance(options) {\n\tconst instance = new ((getGlobalFederationConstructor()) || ModuleFederation)({\n\t\tid: `${options.name}@${options.version || Date.now()}`,\n\t\t...options\n\t});\n\tsetGlobalFederationInstance(instance);\n\treturn instance;\n}\nlet FederationInstance = null;\nfunction init(options) {\n\tconst instance = getGlobalFederationInstance(options.name, options.version);\n\tconst normalizedOptions = {\n\t\t...options,\n\t\tid: options.id || \"\"\n\t};\n\tif (!instance) {\n\t\tFederationInstance = createInstance(normalizedOptions);\n\t\treturn FederationInstance;\n\t} else {\n\t\tinstance.initOptions(normalizedOptions);\n\t\tif (!FederationInstance) FederationInstance = instance;\n\t\treturn instance;\n\t}\n}\nfunction loadRemote(...args) {\n\tassert(FederationInstance, RUNTIME_009, runtimeDescMap);\n\treturn FederationInstance.loadRemote.apply(FederationInstance, args);\n}\nfunction loadShare(...args) {\n\tassert(FederationInstance, RUNTIME_009, runtimeDescMap);\n\treturn FederationInstance.loadShare.apply(FederationInstance, args);\n}\nfunction loadShareSync(...args) {\n\tassert(FederationInstance, RUNTIME_009, runtimeDescMap);\n\treturn FederationInstance.loadShareSync.apply(FederationInstance, args);\n}\nfunction preloadRemote(...args) {\n\tassert(FederationInstance, RUNTIME_009, runtimeDescMap);\n\treturn FederationInstance.preloadRemote.apply(FederationInstance, args);\n}\nfunction registerRemotes(...args) {\n\tassert(FederationInstance, RUNTIME_009, runtimeDescMap);\n\treturn FederationInstance.registerRemotes.apply(FederationInstance, args);\n}\nfunction registerPlugins(...args) {\n\tassert(FederationInstance, RUNTIME_009, runtimeDescMap);\n\treturn FederationInstance.registerPlugins.apply(FederationInstance, args);\n}\nfunction getInstance(finder) {\n\tif (!finder) return FederationInstance;\n\treturn CurrentGlobal.__FEDERATION__.__INSTANCES__.find(finder) || null;\n}\nfunction registerShared(...args) {\n\tassert(FederationInstance, RUNTIME_009, runtimeDescMap);\n\treturn FederationInstance.registerShared.apply(FederationInstance, args);\n}\nsetGlobalFederationConstructor(ModuleFederation);\n\n//#endregion\nexport { Module, ModuleFederation, createInstance, getInstance, getRemoteEntry, getRemoteInfo, init, loadRemote, loadScript, loadScriptNode, loadShare, loadShareSync, preloadRemote, registerGlobalPlugins, registerPlugins, registerRemotes, registerShared };\n//# sourceMappingURL=index.js.map"],"file":"dist-DWxKLhdH.js"}
|