@empjs/share 3.13.9-beta.1 → 4.0.0-alpha.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.
Files changed (132) hide show
  1. package/README.md +202 -62
  2. package/dist/171.js +2 -0
  3. package/dist/171.js.map +1 -0
  4. package/dist/227.js +2 -0
  5. package/dist/227.js.map +1 -0
  6. package/dist/607.js +2 -0
  7. package/dist/607.js.map +1 -0
  8. package/dist/68.js +2 -0
  9. package/dist/68.js.map +1 -0
  10. package/dist/adapter/index.d.ts +1 -0
  11. package/dist/{adapter.d.cts → adapter/react.d.ts} +3 -8
  12. package/dist/adapter/vue.d.ts +1 -0
  13. package/dist/adapter.d.ts +1 -14
  14. package/dist/adapter.js +2 -1
  15. package/dist/adapter.js.map +1 -1
  16. package/dist/adapterVue.d.ts +1 -0
  17. package/dist/adapterVue.js +1 -0
  18. package/dist/forceRemote.d.ts +2 -19
  19. package/dist/forceRemote.js +2 -1
  20. package/dist/forceRemote.js.map +1 -1
  21. package/dist/framework/react/config.d.ts +1 -0
  22. package/dist/framework/react/index.d.ts +3 -0
  23. package/dist/framework/react/shared.d.ts +2 -0
  24. package/dist/framework/vue/config.d.ts +1 -0
  25. package/dist/framework/vue/index.d.ts +3 -0
  26. package/dist/framework/vue/shared.d.ts +2 -0
  27. package/dist/helper/config.d.ts +3 -0
  28. package/dist/helper/index.d.ts +6 -0
  29. package/dist/helper/moduleFederation.d.ts +6 -0
  30. package/dist/helper/resolvePackageExport.d.ts +1 -0
  31. package/dist/helper/rspack.d.ts +1 -0
  32. package/dist/index.d.ts +3 -9
  33. package/dist/index.js +2 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/library/full.d.ts +7 -0
  36. package/dist/library/sdk.d.ts +2 -0
  37. package/dist/library/sdkPolyfill.d.ts +3 -0
  38. package/dist/library/wSdk.d.ts +2 -0
  39. package/dist/mfRuntime.d.ts +1 -1
  40. package/dist/mfRuntime.js +1 -1
  41. package/dist/plugins/rspack/index.d.ts +11 -0
  42. package/dist/plugins/rspack/plugin.d.ts +7 -0
  43. package/dist/plugins/rspack/runtimePlugin/forceRemote.d.ts +13 -0
  44. package/dist/plugins/rspack/runtimePlugin/registerRemotes.d.ts +3 -0
  45. package/dist/plugins/rspack/share.d.ts +30 -0
  46. package/dist/{types-BGnQUQ0O.d.cts → plugins/rspack/types.d.ts} +14 -17
  47. package/dist/plugins/rspack/utils.d.ts +2 -0
  48. package/dist/react.d.ts +1 -9
  49. package/dist/react.js +2 -1
  50. package/dist/react.js.map +1 -1
  51. package/dist/rspack.d.ts +2 -15
  52. package/dist/rspack.js +2 -1
  53. package/dist/rspack.js.map +1 -1
  54. package/dist/{runtime.d.cts → runtime/index.d.ts} +4 -7
  55. package/dist/runtime/index.pre.version.d.ts +22 -0
  56. package/dist/runtime/plugins.d.ts +2 -0
  57. package/dist/runtime/sdk-prev.d.ts +30 -0
  58. package/dist/runtime/sdk.d.ts +31 -0
  59. package/dist/runtime.d.ts +2 -23
  60. package/dist/runtime.js +2 -1
  61. package/dist/runtime.js.map +1 -1
  62. package/dist/sdk.d.ts +1 -34
  63. package/dist/sdk.js +2 -1
  64. package/dist/sdk.js.map +1 -1
  65. package/dist/types/index.d.ts +26 -0
  66. package/dist/vue.d.ts +1 -9
  67. package/dist/vue.js +2 -1
  68. package/dist/vue.js.map +1 -1
  69. package/output/adapter/index.d.ts +1 -0
  70. package/output/adapter/react.d.ts +9 -0
  71. package/output/adapter/vue.d.ts +1 -0
  72. package/output/framework/react/config.d.ts +1 -0
  73. package/output/framework/react/index.d.ts +3 -0
  74. package/output/framework/react/shared.d.ts +2 -0
  75. package/output/framework/vue/config.d.ts +1 -0
  76. package/output/framework/vue/index.d.ts +3 -0
  77. package/output/framework/vue/shared.d.ts +2 -0
  78. package/output/helper/config.d.ts +3 -0
  79. package/output/helper/index.d.ts +6 -0
  80. package/output/helper/moduleFederation.d.ts +6 -0
  81. package/output/helper/resolvePackageExport.d.ts +1 -0
  82. package/output/helper/rspack.d.ts +1 -0
  83. package/output/index.d.ts +3 -0
  84. package/output/library/full.d.ts +7 -0
  85. package/output/library/sdk.d.ts +2 -0
  86. package/output/library/sdkPolyfill.d.ts +3 -0
  87. package/output/library/wSdk.d.ts +2 -0
  88. package/output/plugins/rspack/index.d.ts +11 -0
  89. package/output/plugins/rspack/plugin.d.ts +7 -0
  90. package/output/plugins/rspack/runtimePlugin/forceRemote.d.ts +13 -0
  91. package/output/plugins/rspack/runtimePlugin/registerRemotes.d.ts +3 -0
  92. package/output/plugins/rspack/share.d.ts +30 -0
  93. package/{dist/types-BGnQUQ0O.d.ts → output/plugins/rspack/types.d.ts} +14 -17
  94. package/output/plugins/rspack/utils.d.ts +2 -0
  95. package/output/runtime/index.d.ts +20 -0
  96. package/output/runtime/index.pre.version.d.ts +22 -0
  97. package/output/runtime/mfRuntime.d.ts +1 -0
  98. package/output/runtime/plugins.d.ts +2 -0
  99. package/output/runtime/sdk-prev.d.ts +30 -0
  100. package/output/runtime/sdk.d.ts +31 -0
  101. package/output/sdk.d.ts +1 -0
  102. package/output/sdk.js +5 -1
  103. package/output/types/index.d.ts +26 -0
  104. package/package.json +42 -91
  105. package/dist/adapter.cjs +0 -1
  106. package/dist/adapter.cjs.map +0 -1
  107. package/dist/forceRemote.cjs +0 -1
  108. package/dist/forceRemote.cjs.map +0 -1
  109. package/dist/forceRemote.d.cts +0 -19
  110. package/dist/index-DaSrQPN9.d.cts +0 -21
  111. package/dist/index-DaSrQPN9.d.ts +0 -21
  112. package/dist/index.cjs +0 -1
  113. package/dist/index.cjs.map +0 -1
  114. package/dist/index.d.cts +0 -9
  115. package/dist/mfRuntime.cjs +0 -1
  116. package/dist/mfRuntime.cjs.map +0 -1
  117. package/dist/mfRuntime.js.map +0 -1
  118. package/dist/react.cjs +0 -1
  119. package/dist/react.cjs.map +0 -1
  120. package/dist/react.d.cts +0 -9
  121. package/dist/rspack.cjs +0 -1
  122. package/dist/rspack.cjs.map +0 -1
  123. package/dist/rspack.d.cts +0 -15
  124. package/dist/runtime.cjs +0 -1
  125. package/dist/runtime.cjs.map +0 -1
  126. package/dist/sdk.cjs +0 -1
  127. package/dist/sdk.cjs.map +0 -1
  128. package/dist/sdk.d.cts +0 -34
  129. package/dist/vue.cjs +0 -1
  130. package/dist/vue.cjs.map +0 -1
  131. package/dist/vue.d.cts +0 -9
  132. /package/dist/{mfRuntime.d.cts → runtime/mfRuntime.d.ts} +0 -0
@@ -0,0 +1,22 @@
1
+ import type { EMPShareRuntimeType, EmpRuntimeOptions, InitOptionsType, LoadRemoteType } from '../types';
2
+ type EmpInitOptionsType = Partial<InitOptionsType>;
3
+ export declare class EMPRuntime {
4
+ libs: EMPShareRuntimeType;
5
+ initOptions: InitOptionsType;
6
+ options: EmpRuntimeOptions;
7
+ shareGlobalName: string;
8
+ private isInit;
9
+ constructor(op?: EMPShareRuntimeType);
10
+ /**
11
+ * 实例化 adapter libs
12
+ */
13
+ setup(o?: EMPShareRuntimeType | string): void;
14
+ init(options?: EmpInitOptionsType): void;
15
+ load<T = any>(...args: LoadRemoteType): Promise<T>;
16
+ register: typeof import("@module-federation/runtime").registerRemotes;
17
+ preload: typeof import("@module-federation/runtime").preloadRemote;
18
+ loadShare: typeof import("@module-federation/runtime").loadShare;
19
+ preloadRemote: typeof import("@module-federation/runtime").preloadRemote;
20
+ }
21
+ declare const _default: EMPRuntime;
22
+ export default _default;
@@ -0,0 +1 @@
1
+ export * from '@module-federation/runtime';
@@ -0,0 +1,2 @@
1
+ import type { FederationRuntimePlugin } from '../types';
2
+ export declare const catchErrorNextPlugin: (showLog?: boolean) => FederationRuntimePlugin;
@@ -0,0 +1,30 @@
1
+ import * as mfRuntime from '@module-federation/runtime';
2
+ export declare const getInstance: typeof mfRuntime.getInstance;
3
+ export declare const createInstance: typeof mfRuntime.createInstance;
4
+ export declare const init: typeof mfRuntime.init;
5
+ export declare const registerShared: typeof mfRuntime.registerShared;
6
+ export declare const registerRemotes: typeof mfRuntime.registerRemotes;
7
+ export declare const registerPlugins: typeof mfRuntime.registerPlugins;
8
+ export declare const loadRemote: typeof mfRuntime.loadRemote;
9
+ export declare const preloadRemote: typeof mfRuntime.preloadRemote;
10
+ export declare const loadShare: typeof mfRuntime.loadShare;
11
+ export declare const getReactShare: () => {
12
+ react: {
13
+ lib: () => any;
14
+ version: any;
15
+ scope: any;
16
+ shareConfig: {
17
+ singleton: boolean;
18
+ requiredVersion: string;
19
+ };
20
+ };
21
+ 'react-dom': {
22
+ lib: () => any;
23
+ version: any;
24
+ scope: any;
25
+ shareConfig: {
26
+ singleton: boolean;
27
+ requiredVersion: string;
28
+ };
29
+ };
30
+ };
@@ -0,0 +1,31 @@
1
+ import * as mfRuntime from '@module-federation/runtime';
2
+ declare const getInstance: () => ReturnType<typeof mfRuntime.getInstance>;
3
+ export { getInstance };
4
+ export declare const createInstance: typeof mfRuntime.createInstance;
5
+ export declare const init: typeof mfRuntime.init;
6
+ export declare const registerShared: typeof mfRuntime.registerShared;
7
+ export declare const registerRemotes: typeof mfRuntime.registerRemotes;
8
+ export declare const registerPlugins: typeof mfRuntime.registerPlugins;
9
+ export declare const loadRemote: typeof mfRuntime.loadRemote;
10
+ export declare const preloadRemote: typeof mfRuntime.preloadRemote;
11
+ export declare const loadShare: typeof mfRuntime.loadShare;
12
+ export declare const getReactShare: () => {
13
+ react: {
14
+ lib: () => any;
15
+ version: any;
16
+ scope: any;
17
+ shareConfig: {
18
+ singleton: boolean;
19
+ requiredVersion: string;
20
+ };
21
+ };
22
+ 'react-dom': {
23
+ lib: () => any;
24
+ version: any;
25
+ scope: any;
26
+ shareConfig: {
27
+ singleton: boolean;
28
+ requiredVersion: string;
29
+ };
30
+ };
31
+ };
@@ -0,0 +1 @@
1
+ export * from './library/sdk'
package/output/sdk.js CHANGED
@@ -1 +1,5 @@
1
- function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){asyncGeneratorStep(a,r,o,i,c,"next",e)}function c(e){asyncGeneratorStep(a,r,o,i,c,"throw",e)}i(void 0)})}}function _call_super(e,t,n){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,n||[],_get_prototype_of(e).constructor):t.apply(e,n))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _create_class(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _object_without_properties(e,t){if(null==e)return{};var n,r,o=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _object_without_properties_loose(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_array(e){return _array_with_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}var EMP_SHARE_RUNTIME=function(exports){"use strict";var ir=Object.defineProperty,pt=function(e,t){for(var n in t)ir(e,n,{get:t[n],enumerable:!0})},mt="EMP_SHARE_RUNTIME",De={};pt(De,{Module:function(){return te},ModuleFederation:function(){return q},createInstance:function(){return sr},getInstance:function(){return Zn},getRemoteEntry:function(){return ee},getRemoteInfo:function(){return fe},init:function(){return Wn},loadRemote:function(){return Kn},loadScript:function(){return z},loadScriptNode:function(){return X},loadShare:function(){return qn},loadShareSync:function(){return zn},preloadRemote:function(){return Xn},registerGlobalPlugins:function(){return Ut},registerPlugins:function(){return Jn},registerRemotes:function(){return Yn},registerShared:function(){return Qn}});var Ie={},_obj,_obj1;pt(Ie,{BROWSER_LOG_KEY:function(){return yt},ENCODE_NAME_PREFIX:function(){return ur},EncodedNameTransformMap:function(){return pe},FederationModuleManifest:function(){return ar},MANIFEST_EXT:function(){return Ue},MFModuleType:function(){return cr},MFPrefetchCommon:function(){return dr},MODULE_DEVTOOL_IDENTIFIER:function(){return lr},ManifestFileName:function(){return He},NameTransformMap:function(){return v},NameTransformSymbol:function(){return I},SEPARATOR:function(){return Ve},StatsFileName:function(){return Ce},TEMP_DIR:function(){return fr},assert:function(){return Sr},bindLoggerToCompiler:function(){return Or},composeKeyWithSeparator:function(){return _e},containerPlugin:function(){return hr},containerReferencePlugin:function(){return pr},createInfrastructureLogger:function(){return St},createLink:function(){return ie},createLogger:function(){return Re},createModuleFederationConfig:function(){return Lr},createScript:function(){return Se},createScriptNode:function(){return Nt},decodeName:function(){return gr},encodeName:function(){return je},error:function(){return gt},generateExposeFilename:function(){return br},generateShareFilename:function(){return Rr},generateSnapshotFromManifest:function(){return Be},getManifestFileName:function(){return $r},getProcessEnv:function(){return _t},getResourceUrl:function(){return se},inferAutoPublicPath:function(){return bt},infrastructureLogger:function(){return Pr},isBrowserEnv:function(){return x},isDebugMode:function(){return oe},isManifestProvider:function(){return be},isReactNativeEnv:function(){return ye},isRequiredVersion:function(){return Nr},isStaticResourcesEqual:function(){return Ke},loadScript:function(){return z},loadScriptNode:function(){return X},logger:function(){return Ar},moduleFederationPlugin:function(){return mr},normalizeOptions:function(){return vr},parseEntry:function(){return Er},safeToString:function(){return ge},safeWrapper:function(){return We},sharePlugin:function(){return yr},simpleJoinRemoteEntry:function(){return W},warn:function(){return Ee}});var ar="federation-manifest.json",Ue=".json",yt="FEDERATION_DEBUG",I={AT:"@",HYPHEN:"-",SLASH:"/"},v=(_obj={},_define_property(_obj,I.AT,"scope_"),_define_property(_obj,I.HYPHEN,"_"),_define_property(_obj,I.SLASH,"__"),_obj),pe=(_obj1={},_define_property(_obj1,v[I.AT],I.AT),_define_property(_obj1,v[I.HYPHEN],I.HYPHEN),_define_property(_obj1,v[I.SLASH],I.SLASH),_obj1),Ve=":",He="mf-manifest.json",Ce="mf-stats.json",cr={NPM:"npm",APP:"app"},lr="__MF_DEVTOOLS_MODULE_INFO__",ur="ENCODE_NAME_PREFIX",fr=".federation",dr={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"},hr=Object.freeze({__proto__:null}),pr=Object.freeze({__proto__:null}),mr=Object.freeze({__proto__:null}),yr=Object.freeze({__proto__:null});function x(){return("undefined"==typeof window?"undefined":_type_of(window))<"u"&&_type_of(window.document)<"u"}function ye(){var e;return("undefined"==typeof navigator?"undefined":_type_of(navigator))<"u"&&"ReactNative"===(null===(e=navigator)||void 0===e?void 0:e.product)}function _r(){try{if(x()&&window.localStorage)return!!localStorage.getItem(yt)}catch(e){return!1}return!1}function oe(){return("undefined"==typeof process?"undefined":_type_of(process))<"u"&&process.env,_r()}var _t=function(){return("undefined"==typeof process?"undefined":_type_of(process))<"u"&&process.env?process.env:{}},Et="[ Federation Runtime ]",Er=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ve,r=e.split(n),o="development"===_t().NODE_ENV&&t,a=function(e){return e.startsWith("http")||e.includes(Ue)};if(r.length>=2){var i=_to_array(r),c=i[0],s=i.slice(1);e.startsWith(n)&&(c=r.slice(0,2).join(n),s=[o||r.slice(2).join(n)]);var u=o||s.join(n);return a(u)?{name:c,entry:u}:{name:c,version:u||"*"}}if(1===r.length){var l=_sliced_to_array(r,1)[0];return o&&a(o)?{name:l,entry:o}:{name:l,version:o||"*"}}throw"Invalid entry value: ".concat(e)},_e=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length?t.reduce(function(e,t){return t?e?"".concat(e).concat(Ve).concat(t):t:e},""):""},je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{var r=n?".js":"";return"".concat(t).concat(e.replace(new RegExp("".concat(I.AT),"g"),v[I.AT]).replace(new RegExp("".concat(I.HYPHEN),"g"),v[I.HYPHEN]).replace(new RegExp("".concat(I.SLASH),"g"),v[I.SLASH])).concat(r)}catch(e){throw e}},gr=function(e,t,n){try{var r=e;if(t){if(!r.startsWith(t))return r;r=r.replace(new RegExp(t,"g"),"")}return r=r.replace(new RegExp("".concat(v[I.AT]),"g"),pe[v[I.AT]]).replace(new RegExp("".concat(v[I.SLASH]),"g"),pe[v[I.SLASH]]).replace(new RegExp("".concat(v[I.HYPHEN]),"g"),pe[v[I.HYPHEN]]),n&&(r=r.replace(".js","")),r}catch(e){throw e}},br=function(e,t){if(!e)return"";var n=e;return"."===n&&(n="default_export"),n.startsWith("./")&&(n=n.replace("./","")),je(n,"__federation_expose_",t)},Rr=function(e,t){return e?je(e,"__federation_shared_",t):""},se=function(e,t){var n;return"getPublicPath"in e?(n=e.getPublicPath.startsWith("function")?new Function("return "+e.getPublicPath)()():new Function(e.getPublicPath)(),"".concat(n).concat(t)):"publicPath"in e?x()||ye()||!("ssrPublicPath"in e)?"".concat(e.publicPath).concat(t):"".concat(e.ssrPublicPath).concat(t):(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},Sr=function(e,t){e||gt(t)},gt=function(e){throw new Error("".concat(Et,": ").concat(e))},Ee=function(e){console.warn("".concat(Et,": ").concat(e))};function ge(e){try{return JSON.stringify(e,null,2)}catch(e){return""}}var Ir=/^([\d^=v<>~]|[*xX]$)/;function Nr(e){return Ir.test(e)}var W=function(e,t){if(!e)return t;var n=function(e){if("."===e)return"";if(e.startsWith("./"))return e.replace("./","");if(e.startsWith("/")){var t=e.slice(1);return t.endsWith("/")?t.slice(0,-1):t}return e}(e);return n?n.endsWith("/")?"".concat(n).concat(t):"".concat(n,"/").concat(t):t};function bt(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Be(e){var t,n,r,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=a.remotes,c=void 0===i?{}:i,s=a.overrides,u=void 0===s?{}:s,l=a.version,f=function(){return"publicPath"in e.metaData?"auto"===e.metaData.publicPath&&l?bt(l):e.metaData.publicPath:e.metaData.getPublicPath},_=Object.keys(u),p={};Object.keys(c).length||(p=(null===(t=e.remotes)||void 0===t?void 0:t.reduce(function(e,t){var n,r=t.federationContainerName;return n=_.includes(r)?u[r]:"version"in t?t.version:t.entry,e[r]={matchedVersion:n},e},{}))||{}),Object.keys(c).forEach(function(e){return p[e]={matchedVersion:_.includes(e)?u[e]:c[e]}});var h=e.metaData,d=h.remoteEntry,m=d.path,y=d.name,v=d.type,g=h.types,b=void 0===g?{path:"",name:"",zip:"",api:""}:g,E=h.buildInfo.buildVersion,S=h.globalName,I=h.ssrRemoteEntry,N=e.exposes,w={version:l||"",buildVersion:E,globalName:S,remoteEntry:W(m,y),remoteEntryType:v,remoteTypes:W(b.path,b.name),remoteTypesZip:b.zip||"",remoteTypesAPI:b.api||"",remotesInfo:p,shared:null==e?void 0:e.shared.map(function(e){return{assets:e.assets,sharedName:e.name,version:e.version}}),modules:null==N?void 0:N.map(function(e){return{moduleName:e.name,modulePath:e.path,assets:e.assets}})};if(null===(n=e.metaData)||void 0===n?void 0:n.prefetchInterface){var R=e.metaData.prefetchInterface;w=_object_spread_props(_object_spread({},w),{prefetchInterface:R})}if(null===(r=e.metaData)||void 0===r?void 0:r.prefetchEntry){var A=e.metaData.prefetchEntry,O=A.path,k=A.name,j=A.type;w=_object_spread_props(_object_spread({},w),{prefetchEntry:W(O,k),prefetchEntryType:j})}if(o="publicPath"in e.metaData?_object_spread_props(_object_spread({},w),{publicPath:f(),ssrPublicPath:e.metaData.ssrPublicPath}):_object_spread_props(_object_spread({},w),{getPublicPath:f()}),I){var T=W(I.path,I.name);o.ssrRemoteEntry=T,o.ssrRemoteEntryType=I.type||"commonjs-module"}return o}function be(e){return!(!("remoteEntry"in e)||!e.remoteEntry.includes(Ue))}function $r(e){if(!e)return{statsFileName:Ce,manifestFileName:He};var t,n="boolean"==typeof e?"":e.filePath||"",r="boolean"==typeof e?"":e.fileName||"",o=".json",a=r?(t=r).endsWith(o)?t:"".concat(t).concat(o):He,i=r?function(e,t){return e.replace(o,"".concat(t).concat(o))}(a,"-stats"):Ce;return{statsFileName:W(n,i),manifestFileName:W(n,a)}}var Rt="[ Module Federation ]",re=console,Tr=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function wr(){try{var e=(new Error).stack;if(!e)return;var t=_to_array(e.split("\n")).slice(1).filter(function(e){return!Tr.some(function(t){return e.includes(t)})});return t.length?"Stack trace:\n".concat(t.slice(0,5).join("\n")):void 0}catch(e){return}}var me=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re;_class_call_check(this,e),this.prefix=t,this.delegate=null!=n?n:re}return _create_class(e,[{key:"setPrefix",value:function(e){this.prefix=e}},{key:"setDelegate",value:function(e){this.delegate=null!=e?e:re}},{key:"emit",value:function(e,t){var n=this.delegate,r=oe()?wr():void 0,o=r?_to_consumable_array(t).concat([r]):t,a=function(){switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}}(),i=!0,c=!1,s=void 0;try{for(var u,l=a[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var f,_=n[u.value];if("function"==typeof _)return void(f=_).call.apply(f,[n,this.prefix].concat(_to_consumable_array(o)))}}catch(e){c=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(c)throw s}}var p=!0,h=!1,d=void 0;try{for(var m,y=a[Symbol.iterator]();!(p=(m=y.next()).done);p=!0){var v,g=m.value,b=re[g];if("function"==typeof b)return void(v=b).call.apply(v,[re,this.prefix].concat(_to_consumable_array(o)))}}catch(e){h=!0,d=e}finally{try{p||null==y.return||y.return()}finally{if(h)throw d}}}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("log",t)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("warn",t)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("error",t)}},{key:"success",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("info",t)}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("info",t)}},{key:"ready",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("info",t)}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];oe()&&this.emit("debug",t)}}]),e}();function Re(e){return new me(e)}function St(e){var t=new me(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function Or(e,t,n){if(e.__mf_infrastructure_logger__&&(null==t?void 0:t.getInfrastructureLogger))try{var r=t.getInfrastructureLogger(n);r&&"object"==(void 0===r?"undefined":_type_of(r))&&("function"==typeof r.log||"function"==typeof r.info||"function"==typeof r.warn||"function"==typeof r.error)&&e.setDelegate(r)}catch(t){e.setDelegate(void 0)}}var Ar=Re(Rt),Pr=St(Rt);function We(e,t){return _async_to_generator(function(){var n;return _ts_generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e()];case 1:return[2,r.sent()];case 2:return n=r.sent(),!t&&Ee(n),[2];case 3:return[2]}})})()}function Ke(e,t){var n=/^(https?:)?\/\//i;return e.replace(n,"").replace(/\/$/,"")===t.replace(n,"").replace(/\/$/,"")}function Se(e){for(var t,n=null,r=!0,o=2e4,a=document.getElementsByTagName("script"),i=0;i<a.length;i++){var c=a[i],s=c.getAttribute("src");if(s&&Ke(s,e.url)){n=c,r=!1;break}}if(!n){var u,l=e.attrs;(n=document.createElement("script")).type="module"===(null==l?void 0:l.type)?"module":"text/javascript",e.createScriptHook&&(_instanceof(u=e.createScriptHook(e.url,e.attrs),HTMLScriptElement)?n=u:"object"==(void 0===u?"undefined":_type_of(u))&&("script"in u&&u.script&&(n=u.script),"timeout"in u&&u.timeout&&(o=u.timeout))),n.src||(n.src=e.url),l&&!u&&Object.keys(l).forEach(function(e){n&&("async"===e||"defer"===e?n[e]=l[e]:n.getAttribute(e)||n.setAttribute(e,l[e]))})}var f=function(r,o){return _async_to_generator(function(){var a,i,c;return _ts_generator(this,function(s){switch(s.label){case 0:return clearTimeout(t),a=function(){"error"===(null==o?void 0:o.type)?(null==e?void 0:e.onErrorCallback)&&(null==e||e.onErrorCallback(o)):(null==e?void 0:e.cb)&&(null==e||e.cb())},n&&(n.onerror=null,n.onload=null,We(function(){var t=e.needDeleteScript;(void 0===t||t)&&(null==n?void 0:n.parentNode)&&n.parentNode.removeChild(n)}),r&&"function"==typeof r)?_instanceof(i=r(o),Promise)?[4,i]:[3,2]:[3,3];case 1:return c=s.sent(),[2,(a(),c)];case 2:return[2,(a(),i)];case 3:return a(),[2]}})})()};return n.onerror=f.bind(null,n.onerror),n.onload=f.bind(null,n.onload),t=setTimeout(function(){f(null,new Error('Remote script "'.concat(e.url,'" time-outed.')))},o),{script:n,needAttach:r}}function ie(e){for(var t=null,n=!0,r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var a=r[o],i=a.getAttribute("href"),c=a.getAttribute("rel");if(i&&Ke(i,e.url)&&c===e.attrs.rel){t=a,n=!1;break}}if(!t){(t=document.createElement("link")).setAttribute("href",e.url);var s,u=e.attrs;e.createLinkHook&&(_instanceof(s=e.createLinkHook(e.url,u),HTMLLinkElement)&&(t=s)),u&&!s&&Object.keys(u).forEach(function(e){t&&!t.getAttribute(e)&&t.setAttribute(e,u[e])})}var l=function(n,r){var o=function(){"error"===(null==r?void 0:r.type)?(null==e?void 0:e.onErrorCallback)&&(null==e||e.onErrorCallback(r)):(null==e?void 0:e.cb)&&(null==e||e.cb())};if(t&&(t.onerror=null,t.onload=null,We(function(){var n=e.needDeleteLink;(void 0===n||n)&&(null==t?void 0:t.parentNode)&&t.parentNode.removeChild(t)}),n)){var a=n(r);return o(),a}o()};return t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),{link:t,needAttach:n}}function z(e,t){var n=t.attrs,r=void 0===n?{}:n,o=t.createScriptHook;return new Promise(function(t,n){var a=Se({url:e,cb:t,onErrorCallback:n,attrs:_object_spread({fetchpriority:"high"},r),createScriptHook:o,needDeleteScript:!0}),i=a.script;a.needAttach&&document.head.appendChild(i)})}var he=new Map;function ne(e){if(!e)throw new Error("import specifier is required");if(he.has(e))return he.get(e);var t=new Function("name","return import(name)")(e).then(function(e){return e}).catch(function(t){throw console.error("Error importing module ".concat(e,":"),t),he.delete(e),t});return he.set(e,t),t}var It=function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,ne("node-fetch")];case 1:return[2,(e=t.sent()).default||e]}})})()},Mr=function(e,t,n){return _async_to_generator(function(){var r,o,a;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,(c=e,s=t||{},n.lifecycle.fetch.emit(c,s))];case 1:return(r=i.sent())&&_instanceof(r,Response)?[3,5]:("undefined"==typeof fetch?"undefined":_type_of(fetch))>"u"?[4,It()]:[3,3];case 2:return a=i.sent(),[3,4];case 3:a=fetch,i.label=4;case 4:return o=a(e,t||{}),[3,6];case 5:o=r,i.label=6;case 6:return[2,o]}var c,s})})()},Nt=("undefined"==typeof ENV_TARGET?"undefined":_type_of(ENV_TARGET))>"u"||"web"!==ENV_TARGET?function(url,cb,attrs,loaderHook){if(null==loaderHook?void 0:loaderHook.createScriptHook){var _$t=loaderHook.createScriptHook(url);_$t&&"object"==(void 0===_$t?"undefined":_type_of(_$t))&&"url"in _$t&&(url=_$t.url)}var urlObj;try{urlObj=new URL(url)}catch(e){return console.error("Error constructing URL:",e),void cb(new Error("Invalid URL: ".concat(e)))}var getFetch=function(){return _async_to_generator(function(){return _ts_generator(this,function(e){return[2,(null==loaderHook?void 0:loaderHook.fetch)?function(e,t){return Mr(e,t,loaderHook)}:("undefined"==typeof fetch?"undefined":_type_of(fetch))>"u"?It():fetch]})})()},handleScriptFetch=function(f,urlObj){return _async_to_generator(function(){var _vm_constants,_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER,res,data,_ref,path,vm,scriptContext,urlDirname,filename,script,exportedInterface,_$t,t;return _ts_generator(this,function(_state){switch(_state.label){case 0:return _state.trys.push([0,4,,5]),[4,f(urlObj.href)];case 1:return res=_state.sent(),[4,res.text()];case 2:return data=_state.sent(),[4,Promise.all([ne("path"),ne("vm")])];case 3:return _ref=_sliced_to_array.apply(void 0,[_state.sent(),2]),path=_ref[0],vm=_ref[1],scriptContext={exports:{},module:{exports:{}}},urlDirname=urlObj.pathname.split("/").slice(0,-1).join("/"),filename=path.basename(urlObj.pathname),script=new vm.Script("(function(exports, module, require, __dirname, __filename) {".concat(data,"\n})"),{filename:filename,importModuleDynamically:null!==(_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER=null===(_vm_constants=vm.constants)||void 0===_vm_constants?void 0:_vm_constants.USE_MAIN_CONTEXT_DEFAULT_LOADER)&&void 0!==_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER?_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER:ne}),script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename),exportedInterface=scriptContext.module.exports||scriptContext.exports,attrs&&exportedInterface&&attrs.globalName?(_$t=exportedInterface[attrs.globalName]||exportedInterface,cb(void 0,_$t),[2]):(cb(void 0,exportedInterface),[3,5]);case 4:return t=_state.sent(),cb(_instanceof(t,Error)?t:new Error("Script execution error: ".concat(t))),[3,5];case 5:return[2]}})})()};getFetch().then(function(e){return _async_to_generator(function(){var t,n;return _ts_generator(this,function(r){switch(r.label){case 0:return"esm"!==(null==attrs?void 0:attrs.type)&&"module"!==(null==attrs?void 0:attrs.type)?[3,2]:(t=[urlObj.href],n={fetch:e},[4,ne("vm")]);case 1:return[2,Ge.apply(void 0,t.concat([(n.vm=r.sent(),n)])).then(function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:return[4,e.evaluate()];case 1:return t.sent(),cb(void 0,e.namespace),[2]}})})()}).catch(function(e){cb(_instanceof(e,Error)?e:new Error("Script execution error: ".concat(e)))})];case 2:return handleScriptFetch(e,urlObj),[2]}})})()}).catch(function(e){cb(e)})}:function(e,t,n,r){t(new Error("createScriptNode is disabled in non-Node.js environment"))},X=("undefined"==typeof ENV_TARGET?"undefined":_type_of(ENV_TARGET))>"u"||"web"!==ENV_TARGET?function(e,t){return new Promise(function(n,r){Nt(e,function(e,o){if(e)r(e);else{var a,i,c=(null==t||null===(a=t.attrs)||void 0===a?void 0:a.globalName)||"__FEDERATION_".concat(null==t||null===(i=t.attrs)||void 0===i?void 0:i.name,":custom__"),s=globalThis[c]=o;n(s)}},t.attrs,t.loaderHook)})}:function(e,t){throw new Error("loadScriptNode is disabled in non-Node.js environment")},xe=new Map;function Ge(e,t){return _async_to_generator(function(){var n,r,o,a;return _ts_generator(this,function(i){switch(i.label){case 0:return xe.has(e)?[2,xe.get(e)]:(n=t.fetch,r=t.vm,[4,n(e)]);case 1:return[4,i.sent().text()];case 2:return o=i.sent(),a=new r.SourceTextModule(o,{importModuleDynamically:function(n,r){return _async_to_generator(function(){return _ts_generator(this,function(r){return[2,Ge(new URL(n,e).href,t)]})})()}}),xe.set(e,a),[4,a.link(function(n){return _async_to_generator(function(){return _ts_generator(this,function(r){switch(r.label){case 0:return[4,Ge(new URL(n,e).href,t)];case 1:return[2,r.sent()]}})})()})];case 3:return[2,(i.sent(),a)]}})})()}function vr(e,t,n){return function(r){if(!1===r)return!1;if((void 0===r?"undefined":_type_of(r))>"u")return!!e&&t;if(!0===r)return t;if(r&&"object"==(void 0===r?"undefined":_type_of(r)))return _object_spread({},t,r);throw new Error("Unexpected type for `".concat(n,"`, expect boolean/undefined/object, got: ").concat(void 0===r?"undefined":_type_of(r)))}}var Lr=function(e){return e},_obj2,qe="RUNTIME-001",ze="RUNTIME-002",Xe="RUNTIME-003",Ye="RUNTIME-004",Je="RUNTIME-005",Ne="RUNTIME-006",Ze="RUNTIME-007",$e="RUNTIME-008",j="RUNTIME-009",xr=function(e){return"View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/".concat(e.split("-")[0].toLowerCase(),"/").concat(e)},A=function(e,t,n,r){var o=["".concat([t[e]]," #").concat(e)];return n&&o.push("args: ".concat(JSON.stringify(n))),o.push(xr(e)),r&&o.push("Original Error Message:\n ".concat(r)),o.join("\n")},w=(_obj2={},_define_property(_obj2,qe,"Failed to get remoteEntry exports."),_define_property(_obj2,ze,'The remote entry interface does not contain "init"'),_define_property(_obj2,Xe,"Failed to get manifest."),_define_property(_obj2,Ye,"Failed to locate remote."),_define_property(_obj2,Je,"Invalid loadShareSync function call from bundler runtime"),_define_property(_obj2,Ne,"Invalid loadShareSync function call from runtime"),_define_property(_obj2,Ze,"Failed to get remote snapshot."),_define_property(_obj2,$e,"Failed to load script resources."),_define_property(_obj2,j,"Please call createInstance first."),_obj2),J="[ Federation Runtime ]",rt=Re(J);function N(e,t){e||G(t)}function G(e){throw _instanceof(e,Error)?(e.message.startsWith(J)||(e.message="".concat(J,": ").concat(e.message)),e):new Error("".concat(J,": ").concat(e))}function Fe(e){_instanceof(e,Error)&&(e.message.startsWith(J)||(e.message="".concat(J,": ").concat(e.message))),rt.warn(e)}function $t(e,t){return-1===e.findIndex(function(e){return e===t})&&e.push(t),e}function ce(e){return"version"in e&&e.version?"".concat(e.name,":").concat(e.version):"entry"in e&&e.entry?"".concat(e.name,":").concat(e.entry):"".concat(e.name)}function at(e){return _type_of(e.entry)<"u"}function Ft(e){return!e.entry.includes(".json")}function ct(e){return e&&"object"==(void 0===e?"undefined":_type_of(e))}var Gr=Object.prototype.toString;function Ur(e){return"[object Object]"===Gr.call(e)}function Dt(e){return Array.isArray(e)?e:[e]}function kt(e){var t={url:"",type:"global",globalName:""};return x()||ye()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}var Vr=function(e,t){var n;return n=e.endsWith("/")?e.slice(0,-1):e,t.startsWith(".")&&(t=t.slice(1)),n+=t},$="object"==("undefined"==typeof globalThis?"undefined":_type_of(globalThis))?globalThis:window,D=function(){try{return document.defaultView}catch(e){return $}}(),le=D;function we(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function Oe(e,t){return Object.hasOwnProperty.call(e,t)}Oe($,"__GLOBAL_LOADING_REMOTE_ENTRY__")||we($,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});var Y=$.__GLOBAL_LOADING_REMOTE_ENTRY__;function xt(e){var t,n,r,o,a,i,c,s,u,l,f,_;Oe(e,"__VMOK__")&&!Oe(e,"__FEDERATION__")&&we(e,"__FEDERATION__",e.__VMOK__),Oe(e,"__FEDERATION__")||(we(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),we(e,"__VMOK__",e.__FEDERATION__)),null!==(c=(t=e.__FEDERATION__).__GLOBAL_PLUGIN__)&&void 0!==c||(t.__GLOBAL_PLUGIN__=[]),null!==(s=(n=e.__FEDERATION__).__INSTANCES__)&&void 0!==s||(n.__INSTANCES__=[]),null!==(u=(r=e.__FEDERATION__).moduleInfo)&&void 0!==u||(r.moduleInfo={}),null!==(l=(o=e.__FEDERATION__).__SHARE__)&&void 0!==l||(o.__SHARE__={}),null!==(f=(a=e.__FEDERATION__).__MANIFEST_LOADING__)&&void 0!==f||(a.__MANIFEST_LOADING__={}),null!==(_=(i=e.__FEDERATION__).__PRELOADED_MAP__)&&void 0!==_||(i.__PRELOADED_MAP__=new Map)}function Ht(e){$.__FEDERATION__.__INSTANCES__.push(e)}function Ct(){return $.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Gt(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:oe())&&($.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,$.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.23.0")}function Z(e,t){if("string"==typeof t){if(e[t])return{value:e[t],key:t};var n=Object.keys(e),r=!0,o=!1,a=void 0;try{for(var i,c=n[Symbol.iterator]();!(r=(i=c.next()).done);r=!0){var s=_sliced_to_array(i.value.split(":"),2),u=s[0],l=(s[1],"".concat(u,":").concat(t)),f=e[l];if(f)return{value:f,key:l}}}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return{value:void 0,key:t}}throw new Error("key must be string")}xt($),xt(D);var Tt=function(){return D.__FEDERATION__.moduleInfo},jr=function(e,t){var n=Z(t,ce(e)).value;if(n&&!n.version&&"version"in e&&e.version&&(n.version=e.version),n)return n;if("version"in e&&e.version){var r=e.version,o=ce(_object_without_properties(e,["version"])),a=Z(D.__FEDERATION__.moduleInfo,o).value;if((null==a?void 0:a.version)===r)return a}},Ae=function(e){return jr(e,D.__FEDERATION__.moduleInfo)},wt=function(e,t){var n=ce(e);return D.__FEDERATION__.moduleInfo[n]=t,D.__FEDERATION__.moduleInfo},Br=function(e){return D.__FEDERATION__.moduleInfo=_object_spread({},D.__FEDERATION__.moduleInfo,e),function(){var t=Object.keys(e),n=!0,r=!1,o=void 0;try{for(var a,i=t[Symbol.iterator]();!(n=(a=i.next()).done);n=!0){var c=a.value;delete D.__FEDERATION__.moduleInfo[c]}}catch(e){r=!0,o=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}}},lt=function(e,t){var n=t||"__FEDERATION_".concat(e,":custom__");return{remoteEntryKey:n,entryExports:$[n]}},Ut=function(e){var t=D.__FEDERATION__.__GLOBAL_PLUGIN__;e.forEach(function(e){-1===t.findIndex(function(t){return t.name===e.name})?t.push(e):Fe("The plugin ".concat(e.name," has been registered."))})},Wr=function(){return D.__FEDERATION__.__GLOBAL_PLUGIN__},Kr=function(e){return $.__FEDERATION__.__PRELOADED_MAP__.get(e)},qr=function(e){return $.__FEDERATION__.__PRELOADED_MAP__.set(e,!0)},de="default",Vt="global",Ot="[0-9A-Za-z-]+",ut="(?:\\+(".concat(Ot,"(?:\\.").concat(Ot,")*))"),ae="0|[1-9]\\d*",Pe="[0-9]+",jt="\\d*[a-zA-Z-][a-zA-Z0-9-]*",At="(?:".concat(Pe,"|").concat(jt,")"),zr="(?:-?(".concat(At,"(?:\\.").concat(At,")*))"),Pt="(?:".concat(ae,"|").concat(jt,")"),Bt="(?:-(".concat(Pt,"(?:\\.").concat(Pt,")*))"),Qe="".concat(ae,"|x|X|\\*"),Q="[v=\\s]*(".concat(Qe,")(?:\\.(").concat(Qe,")(?:\\.(").concat(Qe,")(?:").concat(Bt,")?").concat(ut,"?)?)?"),Xr="^\\s*(".concat(Q,")\\s+-\\s+(").concat(Q,")\\s*$"),Yr="(".concat(Pe,")\\.(").concat(Pe,")\\.(").concat(Pe,")"),Jr="[v=\\s]*".concat(Yr).concat(zr,"?").concat(ut,"?"),ft="((?:<|>)?=?)",Zr="(\\s*)".concat(ft,"\\s*(").concat(Jr,"|").concat(Q,")"),Wt="(?:~>?)",Qr="(\\s*)".concat(Wt,"\\s+"),Kt="(?:\\^)",en="(\\s*)".concat(Kt,"\\s+"),tn="(<|>)?=?\\s*\\*",rn="^".concat(Kt).concat(Q,"$"),nn="(".concat(ae,")\\.(").concat(ae,")\\.(").concat(ae,")"),on="v?".concat(nn).concat(Bt,"?").concat(ut,"?"),sn="^".concat(Wt).concat(Q,"$"),an="^".concat(ft,"\\s*").concat(Q,"$"),cn="^".concat(ft,"\\s*(").concat(on,")$|^$"),ln="^\\s*>=\\s*0.0.0\\s*$";function U(e){return new RegExp(e)}function P(e){return!e||"x"===e.toLowerCase()||"*"===e}function qt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce(function(e,t){return t(e)},e)}}function Mt(e){return e.match(U(cn))}function vt(e,t,n,r){var o="".concat(e,".").concat(t,".").concat(n);return r?"".concat(o,"-").concat(r):o}function un(e){return e.replace(U(Xr),function(e,t,n,r,o,a,i,c,s,u,l,f){return t=P(n)?"":P(r)?">=".concat(n,".0.0"):P(o)?">=".concat(n,".").concat(r,".0"):">=".concat(t),c=P(s)?"":P(u)?"<".concat(Number(s)+1,".0.0-0"):P(l)?"<".concat(s,".").concat(Number(u)+1,".0-0"):f?"<=".concat(s,".").concat(u,".").concat(l,"-").concat(f):"<=".concat(c),"".concat(t," ").concat(c).trim()})}function fn(e){return e.replace(U(Zr),"$1$2$3")}function dn(e){return e.replace(U(Qr),"$1~")}function hn(e){return e.replace(U(en),"$1^")}function pn(e){return e.trim().split(/\s+/).map(function(e){return e.replace(U(rn),function(e,t,n,r,o){return P(t)?"":P(n)?">=".concat(t,".0.0 <").concat(Number(t)+1,".0.0-0"):P(r)?"0"===t?">=".concat(t,".").concat(n,".0 <").concat(t,".").concat(Number(n)+1,".0-0"):">=".concat(t,".").concat(n,".0 <").concat(Number(t)+1,".0.0-0"):o?"0"===t?"0"===n?">=".concat(t,".").concat(n,".").concat(r,"-").concat(o," <").concat(t,".").concat(n,".").concat(Number(r)+1,"-0"):">=".concat(t,".").concat(n,".").concat(r,"-").concat(o," <").concat(t,".").concat(Number(n)+1,".0-0"):">=".concat(t,".").concat(n,".").concat(r,"-").concat(o," <").concat(Number(t)+1,".0.0-0"):"0"===t?"0"===n?">=".concat(t,".").concat(n,".").concat(r," <").concat(t,".").concat(n,".").concat(Number(r)+1,"-0"):">=".concat(t,".").concat(n,".").concat(r," <").concat(t,".").concat(Number(n)+1,".0-0"):">=".concat(t,".").concat(n,".").concat(r," <").concat(Number(t)+1,".0.0-0")})}).join(" ")}function mn(e){return e.trim().split(/\s+/).map(function(e){return e.replace(U(sn),function(e,t,n,r,o){return P(t)?"":P(n)?">=".concat(t,".0.0 <").concat(Number(t)+1,".0.0-0"):P(r)?">=".concat(t,".").concat(n,".0 <").concat(t,".").concat(Number(n)+1,".0-0"):o?">=".concat(t,".").concat(n,".").concat(r,"-").concat(o," <").concat(t,".").concat(Number(n)+1,".0-0"):">=".concat(t,".").concat(n,".").concat(r," <").concat(t,".").concat(Number(n)+1,".0-0")})}).join(" ")}function yn(e){return e.split(/\s+/).map(function(e){return e.trim().replace(U(an),function(e,t,n,r,o,a){var i=P(n),c=i||P(r),s=c||P(o);return"="===t&&s&&(t=""),a="",i?">"===t||"<"===t?"<0.0.0-0":"*":t&&s?(c&&(r=0),o=0,">"===t?(t=">=",c?(n=Number(n)+1,r=0,o=0):(r=Number(r)+1,o=0)):"<="===t&&(t="<",c?n=Number(n)+1:r=Number(r)+1),"<"===t&&(a="-0"),"".concat(t+n,".").concat(r,".").concat(o).concat(a)):c?">=".concat(n,".0.0").concat(a," <").concat(Number(n)+1,".0.0-0"):s?">=".concat(n,".").concat(r,".0").concat(a," <").concat(n,".").concat(Number(r)+1,".0-0"):e})}).join(" ")}function _n(e){return e.trim().replace(U(tn),"")}function En(e){return e.trim().replace(U(ln),"")}function Me(e,t){return(e=Number(e)||e)>(t=Number(t)||t)?1:e===t?0:-1}function gn(e,t){var n=e.preRelease,r=t.preRelease;if(void 0===n&&r)return 1;if(n&&void 0===r)return-1;if(void 0===n&&void 0===r)return 0;for(var o=0,a=n.length;o<=a;o++){var i=n[o],c=r[o];if(i!==c)return void 0===i&&void 0===c?0:i?c?Me(i,c):-1:1}return 0}function Te(e,t){return Me(e.major,t.major)||Me(e.minor,t.minor)||Me(e.patch,t.patch)||gn(e,t)}function et(e,t){return e.version===t.version}function bn(e,t){switch(e.operator){case"":case"=":return et(e,t);case">":return Te(e,t)<0;case">=":return et(e,t)||Te(e,t)<0;case"<":return Te(e,t)>0;case"<=":return et(e,t)||Te(e,t)>0;case void 0:return!0;default:return!1}}function Rn(e){return qt(pn,mn,yn,_n)(e)}function Sn(e){return qt(un,fn,dn,hn)(e.trim()).split(/\s+/).join(" ")}function ve(e,t){if(!e)return!1;var n=Mt(e);if(!n)return!1;var r=_sliced_to_array(n,7),o=r[1],a=r[3],i=r[4],c=r[5],s=r[6],u={operator:o,version:vt(a,i,c,s),major:a,minor:i,patch:c,preRelease:null==s?void 0:s.split(".")},l=t.split("||"),f=!0,_=!1,p=void 0;try{for(var h,d=l[Symbol.iterator]();!(f=(h=d.next()).done);f=!0){var m=h.value.trim();if(!m||"*"===m||"x"===m)return!0;try{var y=Sn(m);if(!y.trim())return!0;var v=y.split(" ").map(function(e){return Rn(e)}).join(" ");if(!v.trim())return!0;var g=v.split(/\s+/).map(function(e){return En(e)}).filter(Boolean);if(0===g.length)continue;var b=!0,E=!0,S=!1,I=void 0;try{for(var N,w=g[Symbol.iterator]();!(E=(N=w.next()).done);E=!0){var R=Mt(N.value);if(!R){b=!1;break}var A=_sliced_to_array(R,7),O=A[1],k=A[3],j=A[4],T=A[5],P=A[6];if(!bn({operator:O,version:vt(k,j,T,P),major:k,minor:j,patch:T,preRelease:null==P?void 0:P.split(".")},u)){b=!1;break}}}catch(e){S=!0,I=e}finally{try{E||null==w.return||w.return()}finally{if(S)throw I}}if(b)return!0}catch(e){console.error('[semver] Error processing range part "'.concat(m,'":'),e);continue}}}catch(e){_=!0,p=e}finally{try{f||null==d.return||d.return()}finally{if(_)throw p}}return!1}function In(e,t,n,r){var o,a,i,c;return o="get"in e?e.get:"lib"in e?function(){return Promise.resolve(e.lib)}:function(){return Promise.resolve(function(){throw new Error("Can not get shared '".concat(n,"'!"))})},_object_spread_props(_object_spread({deps:[],useIn:[],from:t,loading:null},e),{shareConfig:_object_spread({requiredVersion:"^".concat(e.version),singleton:!1,eager:!1,strictVersion:!1},e.shareConfig),get:o,loaded:!(!(null==e?void 0:e.loaded)&&!("lib"in e))||void 0,version:null!==(a=e.version)&&void 0!==a?a:"0",scope:Array.isArray(e.scope)?e.scope:[null!==(i=e.scope)&&void 0!==i?i:"default"],strategy:(null!==(c=e.strategy)&&void 0!==c?c:r)||"version-first"})}function zt(e,t){var n=t.shared||{},r=t.name,o=Object.keys(n).reduce(function(e,o){var a=Dt(n[o]);return e[o]=e[o]||[],a.forEach(function(n){e[o].push(In(n,r,o,t.shareStrategy))}),e},{}),a=_object_spread({},e.shared);return Object.keys(o).forEach(function(e){a[e]?o[e].forEach(function(t){a[e].find(function(e){return e.version===t.version})||a[e].push(t)}):a[e]=o[e]}),{shared:a,shareInfos:o}}function ue(e,t){var n=function(e){if(!Number.isNaN(Number(e))){for(var t=e.split("."),n=e,r=0;r<3-t.length;r++)n+=".0";return n}return e};return!!ve(n(e),"<=".concat(n(t)))}var dt=function(e,t){var n=t||function(e,t){return ue(e,t)};return Object.keys(e).reduce(function(e,t){return!e||n(e,t)||"0"===e?t:e},0)},ht=function(e){return!!e.loaded||"function"==typeof e.lib},Nn=function(e){return!!e.loading};function $n(e,t,n){var r=e[t][n];return dt(e[t][n],function(e,t){return!ht(r[e])&&ue(e,t)})}function Tn(e,t,n){var r=e[t][n];return dt(e[t][n],function(e,t){var n=function(e){return ht(e)||Nn(e)};return n(r[t])?!n(r[e])||!!ue(e,t):!n(r[e])&&ue(e,t)})}function wn(e){return"loaded-first"===e?Tn:$n}function Le(e,t,n,r){if(e){var o=n.shareConfig,a=n.scope,i=void 0===a?de:a,c=n.strategy,s=Array.isArray(i)?i:[i],u=!0,l=!1,f=void 0;try{for(var _,p=function(){var a=_.value;if(o&&e[a]&&e[a][t]){var i=o.requiredVersion,s=wn(c)(e,a,t),u={shareScopeMap:e,scope:a,pkgName:t,version:s,GlobalFederation:le.__FEDERATION__,resolver:function(){if(o.singleton){if("string"==typeof i&&!ve(s,i)){var r="Version ".concat(s," from ").concat(s&&e[a][t][s].from," of shared singleton module ").concat(t," does not satisfy the requirement of ").concat(n.from," which needs ").concat(i,")");o.strictVersion?G(r):Fe(r)}return e[a][t][s]}if(!1===i||"*"===i||ve(s,i))return e[a][t][s];var c=!0,u=!1,l=void 0;try{for(var f,_=Object.entries(e[a][t])[Symbol.iterator]();!(c=(f=_.next()).done);c=!0){var p=_sliced_to_array(f.value,2),h=p[0],d=p[1];if(ve(h,i))return d}}catch(e){u=!0,l=e}finally{try{c||null==_.return||_.return()}finally{if(u)throw l}}}};return{v:(r.emit(u)||u).resolver()}}},h=s[Symbol.iterator]();!(u=(_=h.next()).done);u=!0){var d=p();if("object"===_type_of(d))return d.v}}catch(e){l=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(l)throw f}}}}function Xt(){return le.__FEDERATION__.__SHARE__}function Lt(e){var t,n=e.pkgName,r=e.extraOptions,o=e.shareInfos,a=null!==(t=null==r?void 0:r.resolver)&&void 0!==t?t:function(e){if(e){var t={};e.forEach(function(e){t[e.version]=e});var n=dt(t,function(e,n){return!ht(t[e])&&ue(e,n)});return t[n]}};return Object.assign({},a(o[n]),null==r?void 0:r.customShareInfo)}function On(){return("undefined"==typeof FEDERATION_BUILD_IDENTIFIER?"undefined":_type_of(FEDERATION_BUILD_IDENTIFIER))<"u"?FEDERATION_BUILD_IDENTIFIER:""}function An(e,t){var n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(n=(a=i.next()).done);n=!0){var c=a.value,s=t.startsWith(c.name),u=t.replace(c.name,"");if(s){if(u.startsWith("/"))return{pkgNameOrAlias:c.name,expose:u=".".concat(u),remote:c};if(""===u)return{pkgNameOrAlias:c.name,expose:".",remote:c}}var l=c.alias&&t.startsWith(c.alias),f=c.alias&&t.replace(c.alias,"");if(c.alias&&l){if(f&&f.startsWith("/"))return{pkgNameOrAlias:c.alias,expose:f=".".concat(f),remote:c};if(""===f)return{pkgNameOrAlias:c.alias,expose:".",remote:c}}}}catch(e){r=!0,o=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}}function Pn(e,t){var n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(n=(a=i.next()).done);n=!0){var c=a.value;if(t===c.name||c.alias&&t===c.alias)return c}}catch(e){r=!0,o=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}}function Mn(e,t){var n=Wr(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(function(t){(null==e?void 0:e.find(function(e){return e.name!==t.name}))&&e.push(t)}),e&&e.length>0&&e.forEach(function(e){r.forEach(function(n){n.applyPlugin(e,t)})}),e}var Yt=".then(callbacks[0]).catch(callbacks[1])";function vn(e){return _async_to_generator(function(e){var t,n;return _ts_generator(this,function(r){return t=e.entry,n=e.remoteEntryExports,[2,new Promise(function(e,r){try{n?e(n):new Function("callbacks",'import("'.concat(t,'")').concat(Yt))([e,r])}catch(e){r(e)}})]})}).apply(this,arguments)}function Ln(e){return _async_to_generator(function(e){var t,n;return _ts_generator(this,function(r){return t=e.entry,n=e.remoteEntryExports,[2,new Promise(function(e,r){try{n?e(n):("undefined"==typeof __system_context__?"undefined":_type_of(__system_context__))>"u"?System.import(t).then(e).catch(r):new Function("callbacks",'System.import("'.concat(t,'")').concat(Yt))([e,r])}catch(e){r(e)}})]})}).apply(this,arguments)}function Jt(e,t,n){var r=lt(e,t),o=r.remoteEntryKey,a=r.entryExports;return N(a,A(qe,w,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:o})),a}function Fn(e){return _async_to_generator(function(e){var t,n,r,o,a,i,c;return _ts_generator(this,function(s){return t=e.name,n=e.globalName,r=e.entry,o=e.loaderHook,a=e.getEntryUrl,i=lt(t,n),(c=i.entryExports)?[2,c]:[2,z(a?a(r):r,{attrs:{},createScriptHook:function(e,t){var n=o.lifecycle.createScript.emit({url:e,attrs:t});if(n&&(_instanceof(n,HTMLScriptElement)||"script"in n||"timeout"in n))return n}}).then(function(){return Jt(t,n,r)}).catch(function(e){throw N(void 0,A($e,w,{remoteName:t,resourceUrl:r})),e})]})}).apply(this,arguments)}function Dn(e){return _async_to_generator(function(e){var t,n,r,o,a,i,c;return _ts_generator(this,function(s){switch(t=e.remoteInfo,n=e.remoteEntryExports,r=e.loaderHook,o=e.getEntryUrl,a=t.entry,i=t.entryGlobalName,c=t.name,t.type){case"esm":case"module":return[2,vn({entry:a,remoteEntryExports:n})];case"system":return[2,Ln({entry:a,remoteEntryExports:n})];default:return[2,Fn({entry:a,globalName:i,name:c,loaderHook:r,getEntryUrl:o})]}return[2]})}).apply(this,arguments)}function kn(e){return _async_to_generator(function(e){var t,n,r,o,a,i,c;return _ts_generator(this,function(s){return t=e.remoteInfo,n=e.loaderHook,r=t.entry,o=t.entryGlobalName,a=t.name,i=t.type,c=lt(a,o),[2,c.entryExports||X(r,{attrs:{name:a,globalName:o,type:i},loaderHook:{createScriptHook:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.lifecycle.createScript.emit({url:e,attrs:t});if(r&&"url"in r)return r}}}).then(function(){return Jt(a,o,r)}).catch(function(e){throw e})]})}).apply(this,arguments)}function nt(e){var t=e.entry,n=e.name;return _e(n,t)}function ee(e){return _async_to_generator(function(){var t,n,r,o,a,i,c,s,u;return _ts_generator(this,function(l){return t=e.origin,n=e.remoteEntryExports,r=e.remoteInfo,o=e.getEntryUrl,a=e._inErrorHandling,i=void 0!==a&&a,c=nt(r),n?[2,n]:(Y[c]||(s=t.remoteHandler.hooks.lifecycle.loadEntry,u=t.loaderHook,Y[c]=s.emit({loaderHook:u,remoteInfo:r,remoteEntryExports:n}).then(function(e){return e||((("undefined"==typeof ENV_TARGET?"undefined":_type_of(ENV_TARGET))<"u"?"web"===ENV_TARGET:x())?Dn({remoteInfo:r,remoteEntryExports:n,loaderHook:u,getEntryUrl:o}):kn({remoteInfo:r,loaderHook:u}))}).catch(function(e){return _async_to_generator(function(){var o,a,c;return _ts_generator(this,function(s){switch(s.label){case 0:return o=nt(r),_instanceof(e,Error)&&e.message.includes($e)&&!i?(a=function(e){return ee(_object_spread_props(_object_spread({},e),{_inErrorHandling:!0}))},[4,t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:a,origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:Y,uniqueKey:o})]):[3,2];case 1:if(c=s.sent())return[2,c];s.label=2;case 2:throw e}})})()})),[2,Y[c]])})})()}function fe(e){return _object_spread_props(_object_spread({},e),{entry:"entry"in e?e.entry:"",type:e.type||Vt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||de})}function Zt(e){return _object_spread({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},e)}function xn(e,t){return t.map(function(t){var n=Pn(e,t.nameOrAlias);return N(n,"Unable to preload ".concat(t.nameOrAlias," as it is not included in ").concat(!n&&ge({remoteInfo:n,remotes:e}))),{remote:n,preloadConfig:Zt(t)}})}function Hn(e){return e?e.map(function(e){return"."===e?e:e.startsWith("./")?e.replace("./",""):e}):[]}function Qt(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=n.cssAssets,a=n.jsAssetsWithoutEntry,i=n.entryAssets;if(t.options.inBrowser){if(i.forEach(function(n){var r=n.moduleInfo,o=t.moduleCache.get(e.name);ee(o?{origin:t,remoteInfo:r,remoteEntryExports:o.remoteEntryExports}:{origin:t,remoteInfo:r,remoteEntryExports:void 0})}),r){var c={rel:"preload",as:"style"};o.forEach(function(e){var n=ie({url:e,cb:function(){},attrs:c,createLinkHook:function(e,n){var r=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:n});if(_instanceof(r,HTMLLinkElement))return r}}),r=n.link;n.needAttach&&document.head.appendChild(r)})}else{var s={rel:"stylesheet",type:"text/css"};o.forEach(function(e){var n=ie({url:e,cb:function(){},attrs:s,createLinkHook:function(e,n){var r=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:n});if(_instanceof(r,HTMLLinkElement))return r},needDeleteLink:!1}),r=n.link;n.needAttach&&document.head.appendChild(r)})}if(r){var u={rel:"preload",as:"script"};a.forEach(function(e){var n=ie({url:e,cb:function(){},attrs:u,createLinkHook:function(e,n){var r=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:n});if(_instanceof(r,HTMLLinkElement))return r}}),r=n.link;n.needAttach&&document.head.appendChild(r)})}else{var l={fetchpriority:"high",type:"module"===(null==e?void 0:e.type)?"module":"text/javascript"};a.forEach(function(e){var n=Se({url:e,cb:function(){},attrs:l,createScriptHook:function(e,n){var r=t.loaderHook.lifecycle.createScript.emit({url:e,attrs:n});if(_instanceof(r,HTMLScriptElement))return r},needDeleteScript:!0}),r=n.script;n.needAttach&&document.head.appendChild(r)})}}}var te=function(){function e(t){var n=t.remoteInfo,r=t.host;_class_call_check(this,e),this.inited=!1,this.lib=void 0,this.remoteInfo=n,this.host=r}return _create_class(e,[{key:"getEntry",value:function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return this.remoteEntryExports?[2,this.remoteEntryExports]:[4,ee({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports})];case 1:return[2,(N(e=t.sent(),"remoteEntryExports is undefined \n ".concat(ge(this.remoteInfo))),this.remoteEntryExports=e,this.remoteEntryExports)]}})}).call(this)}},{key:"init",value:function(e,t){return _async_to_generator(function(){var n,r,o,a,i,c,s;return _ts_generator(this,function(u){switch(u.label){case 0:return[4,this.getEntry()];case 1:return n=u.sent(),this.inited?[3,5]:(r=this.host.shareScopeMap,(o=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope]).length||o.push("default"),o.forEach(function(e){r[e]||(r[e]={})}),a=r[o[0]],i=[],c={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?o:this.remoteInfo.shareScope||"default"},Object.defineProperty(c,"shareScopeMap",{value:r,enumerable:!1}),[4,this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:c,initScope:i,remoteInfo:this.remoteInfo,origin:this.host})]);case 2:return s=u.sent(),_type_of(null==n?void 0:n.init)>"u"&&G(A(ze,w,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),[4,n.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)];case 3:return u.sent(),[4,this.host.hooks.lifecycle.initContainer.emit(_object_spread_props(_object_spread({},s),{id:e,remoteSnapshot:t,remoteEntryExports:n}))];case 4:u.sent(),u.label=5;case 5:return[2,n]}})}).call(this)}},{key:"get",value:function(e,t,n,r){return _async_to_generator(function(){var o,a,i,c,s,u,l;return _ts_generator(this,function(f){switch(f.label){case 0:return o=(n||{loadFactory:!0}).loadFactory,a=void 0===o||o,[4,this.init(e,r)];case 1:return i=f.sent(),this.lib=i,this.inited=!0,[4,this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:i,expose:t,moduleInfo:this.remoteInfo})];case 2:return c=f.sent(),c?[3,4]:[4,i.get(t)];case 3:c=f.sent(),f.label=4;case 4:return N(c,"".concat(ce(this.remoteInfo)," remote don't export ").concat(t,".")),s=Vr(this.remoteInfo.name,t),u=this.wraperFactory(c,s),a?[4,u()]:[3,6];case 5:return l=f.sent(),[3,7];case 6:l=u,f.label=7;case 7:return[2,l]}})}).call(this)}},{key:"wraperFactory",value:function(e,t){function n(e,t){e&&"object"==(void 0===e?"undefined":_type_of(e))&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for("mf_module_id"))&&Object.defineProperty(e,Symbol.for("mf_module_id"),{value:t,enumerable:!1})}return _instanceof(e,Promise)?function(){return _async_to_generator(function(){var r;return _ts_generator(this,function(o){switch(o.label){case 0:return[4,e()];case 1:return[2,(n(r=o.sent(),t),r)]}})})()}:function(){var r=e();return n(r,t),r}}}]),e}(),M=function(){function e(t){_class_call_check(this,e),this.type="",this.listeners=new Set,t&&(this.type=t)}return _create_class(e,[{key:"on",value:function(e){"function"==typeof e&&this.listeners.add(e)}},{key:"once",value:function(e){var t=this;this.on(function n(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t.remove(n),e.apply(null,o)})}},{key:"emit",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;return this.listeners.size>0&&this.listeners.forEach(function(e){r=e.apply(void 0,_to_consumable_array(t))}),r}},{key:"remove",value:function(e){this.listeners.delete(e)}},{key:"removeAll",value:function(){this.listeners.clear()}}]),e}(),L=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"emit",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=Array.from(this.listeners);if(o.length>0){var a=0,i=function(e){return!1!==e&&(a<o.length?Promise.resolve(o[a++].apply(null,t)).then(i):e)};r=i()}return Promise.resolve(r)}}]),t}(M);function er(e,t){if(!ct(t))return!1;if(e!==t)for(var n in e)if(!(n in t))return!1;return!0}var K=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t)).onerror=G,n.type=e,n}return _inherits(t,e),_create_class(t,[{key:"emit",value:function(e){ct(e)||G('The data for the "'.concat(this.type,'" hook should be an object.'));var t=!0,n=!1,r=void 0;try{for(var o,a=this.listeners[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;try{var c=i(e);if(!er(e,c)){this.onerror('A plugin returned an unacceptable value for the "'.concat(this.type,'" type.'));break}e=c}catch(e){Fe(e),this.onerror(e)}}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}return e}}]),t}(M),C=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t)).onerror=G,n.type=e,n}return _inherits(t,e),_create_class(t,[{key:"emit",value:function(e){var t=this;ct(e)||G('The response data for the "'.concat(this.type,'" hook must be an object.'));var n=Array.from(this.listeners);if(n.length>0){var r=0,o=function(n){return Fe(n),t.onerror(n),e},a=function(i){if(er(e,i)){if(e=i,r<n.length)try{return Promise.resolve(n[r++](e)).then(a,o)}catch(e){return o(e)}}else t.onerror('A plugin returned an incorrect value for the "'.concat(t.type,'" type.'));return e};return Promise.resolve(a(e))}return Promise.resolve(e)}}]),t}(M),B=function(){function e(t){_class_call_check(this,e),this.registerPlugins={},this.lifecycle=t,this.lifecycleKeys=Object.keys(t)}return _create_class(e,[{key:"applyPlugin",value:function(e,t){var n,r=this;N(Ur(e),"Plugin configuration is invalid.");var o=e.name;N(o,"A name must be provided by the plugin."),this.registerPlugins[o]||(this.registerPlugins[o]=e,null===(n=e.apply)||void 0===n||n.call(e,t),Object.keys(this.lifecycle).forEach(function(t){var n=e[t];n&&r.lifecycle[t].on(n)}))}},{key:"removePlugin",value:function(e){var t=this;N(e,"A name is required.");var n=this.registerPlugins[e];N(n,'The plugin "'.concat(e,'" is not registered.')),Object.keys(n).forEach(function(e){"name"!==e&&t.lifecycle[e].remove(n[e])})}}]),e}();function tr(e,t){var n=kt(t);n.url||G("The attribute remoteEntry of ".concat(e.name," must not be undefined."));var r=se(t,n.url);!x()&&!r.startsWith("http")&&(r="https:".concat(r)),e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Cn(){return{name:"snapshot-plugin",afterResolve:function(e){return _async_to_generator(function(){var t,n,r,o,a,i,c,s,u,l,f;return _ts_generator(this,function(_){switch(_.label){case 0:return t=e.remote,n=e.pkgNameOrAlias,r=e.expose,o=e.origin,a=e.remoteInfo,i=e.id,at(t)&&Ft(t)?[3,3]:[4,o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i})];case 1:return c=_.sent(),s=c.remoteSnapshot,u=c.globalSnapshot,tr(a,s),l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:"sync",share:!1,depsRemote:!1}},[4,o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:u})];case 2:return[2,((f=_.sent())&&Qt(a,o,f,!1),_object_spread_props(_object_spread({},e),{remoteSnapshot:s}))];case 3:return[2,e]}})})()}}}function Gn(e){var t=e.split(":");return 1===t.length?{name:t[0],version:void 0}:2===t.length?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function rr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5?arguments[5]:void 0,i=Z(e,ce(t)).value,c=a||i;if(c&&!be(c)&&(n(c,t,r),c.remotesInfo)){var s=Object.keys(c.remotesInfo),u=!0,l=!1,f=void 0;try{for(var _,p=s[Symbol.iterator]();!(u=(_=p.next()).done);u=!0){var h=_.value;if(!o[h]){o[h]=!0;var d=Gn(h),m=c.remotesInfo[h];rr(e,{name:d.name,version:m.matchedVersion},n,!1,o,void 0)}}}catch(e){l=!0,f=e}finally{try{u||null==p.return||p.return()}finally{if(l)throw f}}}}var tt=function(e,t){return document.querySelector("".concat(e,"[").concat("link"===e?"href":"src",'="').concat(t,'"]'))};function Un(e,t,n,r,o){var a=[],i=[],c=[],s=new Set,u=new Set,l=e.options,f=t.preloadConfig,_=f.depsRemote;if(rr(r,n,function(t,n,r){var o,s,u=function(e){var n=e.map(function(e){return se(t,e)});return s.filter?n.filter(s.filter):n};if(r)s=f;else if(Array.isArray(_)){var l=_.find(function(e){return e.nameOrAlias===n.name||e.nameOrAlias===n.alias});if(!l)return;s=Zt(l)}else{if(!0!==_)return;s=f}var p=se(t,kt(t).url);p&&c.push({name:n.name,moduleInfo:{name:n.name,entry:p,type:"remoteEntryType"in t?t.remoteEntryType:"global",entryGlobalName:"globalName"in t?t.globalName:n.name,shareScope:"",version:"version"in t?t.version:void 0},url:p});var h="modules"in t?t.modules:[],d=Hn(s.exposes);if(d.length&&"modules"in t&&(h=null==t||null===(o=t.modules)||void 0===o?void 0:o.reduce(function(e,t){return-1!==(null==d?void 0:d.indexOf(t.moduleName))&&e.push(t),e},[])),h)for(var m=h.length,y=0;y<m;y++){var v,g,b,E,S,I,N=h[y],w="".concat(n.name,"/").concat(N.moduleName);e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:"."===N.moduleName?n.name:w,name:n.name,remoteSnapshot:t,preloadConfig:s,remote:n,origin:e}),!Kr(w)&&("all"===s.resourceCategory?((v=a).push.apply(v,_to_consumable_array(u(N.assets.css.async))),(g=a).push.apply(g,_to_consumable_array(u(N.assets.css.sync))),(b=i).push.apply(b,_to_consumable_array(u(N.assets.js.async))),(E=i).push.apply(E,_to_consumable_array(u(N.assets.js.sync)))):(s.resourceCategory="sync")&&((S=a).push.apply(S,_to_consumable_array(u(N.assets.css.sync))),(I=i).push.apply(I,_to_consumable_array(u(N.assets.js.sync)))),qr(w))}},!0,{},o),o.shared&&o.shared.length>0){o.shared.forEach(function(t){var n,r=null===(n=l.shared)||void 0===n?void 0:n[t.sharedName];if(r){var o=t.version?r.find(function(e){return e.version===t.version}):r;o&&Dt(o).forEach(function(n){!function(t,n){var r=Le(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare);r&&"function"==typeof r.lib&&(n.assets.js.sync.forEach(function(e){s.add(e)}),n.assets.css.sync.forEach(function(e){u.add(e)}))}(n,t)})}})}var p=i.filter(function(e){return!s.has(e)&&!tt("script",e)});return{cssAssets:a.filter(function(e){return!u.has(e)&&!tt("link",e)}),jsAssetsWithoutEntry:p,entryAssets:c.filter(function(e){return!tt("script",e.url)})}}var Vn=function(){return{name:"generate-preload-assets-plugin",generatePreloadAssets:function(e){return _async_to_generator(function(){var t,n,r,o,a,i;return _ts_generator(this,function(c){return t=e.origin,n=e.preloadOptions,r=e.remoteInfo,o=e.remote,a=e.globalSnapshot,i=e.remoteSnapshot,[2,x()?at(o)&&Ft(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:r.name,entry:o.entry,type:r.type||"global",entryGlobalName:"",shareScope:""}}]}:(tr(r,i),Un(t,n,r,a,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}]})})()}}};function nr(e,t){var n=Ae({name:t.name,version:t.options.version}),r=n&&"remotesInfo"in n&&n.remotesInfo&&Z(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:Tt(),remoteSnapshot:Ae({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Tt(),remoteSnapshot:Ae({name:e.name,version:"version"in e?e.version:void 0})}}var ot=function(){function e(t){_class_call_check(this,e),this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new B({beforeLoadRemoteSnapshot:new L("beforeLoadRemoteSnapshot"),loadSnapshot:new C("loadGlobalSnapshot"),loadRemoteSnapshot:new C("loadRemoteSnapshot"),afterLoadSnapshot:new C("afterLoadSnapshot")}),this.manifestLoading=le.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=t,this.loaderHook=t.loaderHook}return _create_class(e,[{key:"loadRemoteSnapshotInfo",value:function(e){return _async_to_generator(function(e){var t,n,r,o,a,i,c,s,u,l,f,_,p,h,d,m,y,v,g,b,E,S,I;return _ts_generator(this,function(N){switch(N.label){case 0:return t=e.moduleInfo,n=e.id,e.expose,r=this.HostInstance,o=r.options,[4,this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:t})];case 1:return N.sent(),(a=Ae({name:this.HostInstance.options.name,version:this.HostInstance.options.version}))||(a={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},Br(_define_property({},this.HostInstance.options.name,a))),a&&"remotesInfo"in a&&!Z(a.remotesInfo,t.name).value&&("version"in t||"entry"in t)&&(a.remotesInfo=_object_spread_props(_object_spread({},null==a?void 0:a.remotesInfo),_define_property({},t.name,{matchedVersion:"version"in t?t.version:t.entry}))),i=this.getGlobalRemoteInfo(t),c=i.hostGlobalSnapshot,s=i.remoteSnapshot,u=i.globalSnapshot,[4,this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:t,hostGlobalSnapshot:c,remoteSnapshot:s,globalSnapshot:u})];case 2:return l=N.sent(),f=l.remoteSnapshot,_=l.globalSnapshot,f?be(f)?(d=x()?f.remoteEntry:f.ssrRemoteEntry||f.remoteEntry||"",[4,this.getManifestJson(d,t,{})]):[3,4]:[3,7];case 3:return m=N.sent(),y=wt(_object_spread_props(_object_spread({},t),{entry:d}),m),p=m,h=y,[3,6];case 4:return[4,this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,remoteSnapshot:f,from:"global"})];case 5:v=N.sent(),g=v.remoteSnapshot,p=g,h=_,N.label=6;case 6:return[3,11];case 7:return at(t)?[4,this.getManifestJson(t.entry,t,{})]:[3,10];case 8:return b=N.sent(),E=wt(t,b),[4,this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,remoteSnapshot:b,from:"global"})];case 9:return S=N.sent(),I=S.remoteSnapshot,p=I,h=E,[3,11];case 10:G(A(Ze,w,{hostName:t.name,hostVersion:t.version,globalSnapshot:JSON.stringify(_)})),N.label=11;case 11:return[4,this.hooks.lifecycle.afterLoadSnapshot.emit({id:n,host:this.HostInstance,options:o,moduleInfo:t,remoteSnapshot:p})];case 12:return[2,(N.sent(),{remoteSnapshot:p,globalSnapshot:h})]}})}).apply(this,arguments)}},{key:"getGlobalRemoteInfo",value:function(e){return nr(e,this.HostInstance)}},{key:"getManifestJson",value:function(e,t,n){return _async_to_generator(function(){var n,r,o;return _ts_generator(this,function(a){return n=this,r=function(){return _async_to_generator(function(){var n,r,o;return _ts_generator(this,function(a){switch(a.label){case 0:if(n=this.manifestCache.get(e))return[2,n];a.label=1;case 1:return a.trys.push([1,6,,8]),[4,this.loaderHook.lifecycle.fetch.emit(e,{})];case 2:return r=a.sent(),!r||!_instanceof(r,Response)?[4,fetch(e,{})]:[3,4];case 3:r=a.sent(),a.label=4;case 4:return[4,r.json()];case 5:return n=a.sent(),[3,8];case 6:return o=a.sent(),[4,this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:o,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance})];case 7:return(n=a.sent())||(delete this.manifestLoading[e],G(A(Xe,w,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},"".concat(o)))),[3,8];case 8:return[2,(N(n.metaData&&n.exposes&&n.shared,"".concat(e," is not a federation manifest")),this.manifestCache.set(e,n),n)]}})}).call(n)},o=function(){return _async_to_generator(function(){var n,o,a;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,r()];case 1:return n=i.sent(),o=Be(n,{version:e}),[4,this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:n,remoteSnapshot:o,manifestUrl:e,from:"manifest"})];case 2:return a=i.sent(),[2,a.remoteSnapshot]}})}).call(n)},[2,(this.manifestLoading[e]||(this.manifestLoading[e]=o().then(function(e){return e})),this.manifestLoading[e])]})}).call(this)}}]),e}(),st=function(){function e(t){_class_call_check(this,e),this.hooks=new B({afterResolve:new C("afterResolve"),beforeLoadShare:new C("beforeLoadShare"),loadShare:new L,resolveShare:new K("resolveShare"),initContainerShareScopeMap:new K("initContainerShareScopeMap")}),this.host=t,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(t.options)}return _create_class(e,[{key:"registerShared",value:function(e,t){var n=this,r=zt(e,t),o=r.shareInfos,a=r.shared;return Object.keys(o).forEach(function(e){o[e].forEach(function(r){r.scope.forEach(function(o){var a;(null===(a=n.shareScopeMap[o])||void 0===a?void 0:a[e])||n.setShared({pkgName:e,lib:r.lib,get:r.get,loaded:r.loaded||!!r.lib,shared:r,from:t.name})})})}),{shareInfos:o,shared:a}}},{key:"loadShare",value:function(e,t){return _async_to_generator(function(){var n,r,o,a,i,c,s,u,l,f;return _ts_generator(this,function(_){switch(_.label){case 0:return n=this,r=this.host,o=Lt({pkgName:e,extraOptions:t,shareInfos:r.options.shared}),(null==o?void 0:o.scope)?[4,Promise.all(o.scope.map(function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:return[4,Promise.all(this.initializeSharing(e,{strategy:o.strategy}))];case 1:return t.sent(),[2]}})}).call(n)}))]:[3,2];case 1:_.sent(),_.label=2;case 2:return[4,this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:r.options.shared,origin:r})];case 3:return a=_.sent(),N(i=a.shareInfo,"Cannot find ".concat(e," Share in the ").concat(r.options.name,". Please ensure that the ").concat(e," Share parameters have been injected")),c=Le(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare),s=function(e){e.useIn||(e.useIn=[]),$t(e.useIn,r.options.name)},c&&c.lib?[2,(s(c),c.lib)]:c&&c.loading&&!c.loaded?[4,c.loading]:[3,5];case 4:return u=_.sent(),[2,(c.loaded=!0,c.lib||(c.lib=u),s(c),u)];case 5:return c?(l=_async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,c.get()];case 1:return e=t.sent(),[2,(s(c),c.loaded=!0,c.lib=e,e)]}})})(),[2,(this.setShared({pkgName:e,loaded:!1,shared:c,from:r.options.name,lib:null,loading:l}),l)]):(null==t?void 0:t.customShareInfo)?[2,!1]:(f=_async_to_generator(function(){var t,n;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,i.get()];case 1:return t=r.sent(),i.lib=t,i.loaded=!0,s(i),[2,((n=Le(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare))&&(n.lib=t,n.loaded=!0,n.from=i.from),t)]}})}).call(n),[2,(this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:f}),f)]);case 6:return[2]}})}).call(this)}},{key:"initializeSharing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de,t=arguments.length>1?arguments[1]:void 0,n=this.host,r=null==t?void 0:t.from,o=null==t?void 0:t.strategy,a=null==t?void 0:t.initScope,i=[];if("build"!==r){var c=this.initTokens;a||(a=[]);var s=c[e];if(s||(s=c[e]={from:this.host.name}),a.indexOf(s)>=0)return i;a.push(s)}var u=this.shareScopeMap,l=n.options.name;u[e]||(u[e]={});var f=u[e];return Object.keys(n.options.shared).forEach(function(t){n.options.shared[t].forEach(function(n){n.scope.includes(e)&&function(e,t){var n,r=t.version,o=t.eager;f[e]=f[e]||{};var a=f[e],i=a[r],c=!(!i||!i.eager&&!(null===(n=i.shareConfig)||void 0===n?void 0:n.eager));(!i||"loaded-first"!==i.strategy&&!i.loaded&&(!o!=!c?o:l>i.from))&&(a[r]=t)}(t,n)})}),("version-first"===n.options.shareStrategy||"version-first"===o)&&n.options.remotes.forEach(function(t){t.shareScope===e&&i.push(function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:return[4,n.remoteHandler.getRemoteModuleAndOptions({id:e})];case 1:return[4,t.sent().module.init()];case 2:return t.sent(),[2]}})})()}(t.name))}),i}},{key:"loadShareSync",value:function(e,t){var n=this,r=this.host,o=Lt({pkgName:e,extraOptions:t,shareInfos:r.options.shared});(null==o?void 0:o.scope)&&o.scope.forEach(function(e){n.initializeSharing(e,{strategy:o.strategy})});var a=Le(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),i=function(e){e.useIn||(e.useIn=[]),$t(e.useIn,r.options.name)};if(a){if("function"==typeof a.lib)return i(a),a.loaded||(a.loaded=!0,a.from===r.options.name&&(o.loaded=!0)),a.lib;if("function"==typeof a.get){var c=a.get();if(!_instanceof(c,Promise))return i(a),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:c,shared:a}),c}}if(o.lib)return o.loaded||(o.loaded=!0),o.lib;if(o.get){var s=o.get();if(_instanceof(s,Promise)){var u="build"===(null==t?void 0:t.from)?Je:Ne;throw new Error(A(u,w,{hostName:r.options.name,sharedPkgName:e}))}return o.lib=s,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:o.lib,shared:o}),o.lib}throw new Error(A(Ne,w,{hostName:r.options.name,sharedPkgName:e}))}},{key:"initShareScopeMap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.host;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}},{key:"setShared",value:function(e){var t=this,n=e.pkgName,r=e.shared,o=e.from,a=e.lib,i=e.loading,c=e.loaded,s=e.get,u=r.version,l=r.scope,f=void 0===l?"default":l,_=_object_without_properties(r,["version","scope"]);(Array.isArray(f)?f:[f]).forEach(function(e){if(t.shareScopeMap[e]||(t.shareScopeMap[e]={}),t.shareScopeMap[e][n]||(t.shareScopeMap[e][n]={}),!t.shareScopeMap[e][n][u])return t.shareScopeMap[e][n][u]=_object_spread_props(_object_spread({version:u,scope:[e]},_),{lib:a,loaded:c,loading:i}),void(s&&(t.shareScopeMap[e][n][u].get=s));var r=t.shareScopeMap[e][n][u];i&&!r.loading&&(r.loading=i),c&&!r.loaded&&(r.loaded=c),o&&r.from!==o&&(r.from=o)})}},{key:"_setGlobalShareScopeMap",value:function(e){var t=Xt(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}}]),e}(),it=function(){function e(t){_class_call_check(this,e),this.hooks=new B({beforeRegisterRemote:new K("beforeRegisterRemote"),registerRemote:new K("registerRemote"),beforeRequest:new C("beforeRequest"),onLoad:new L("onLoad"),handlePreloadModule:new M("handlePreloadModule"),errorLoadRemote:new L("errorLoadRemote"),beforePreloadRemote:new L("beforePreloadRemote"),generatePreloadAssets:new L("generatePreloadAssets"),afterPreloadRemote:new L,loadEntry:new L}),this.host=t,this.idToRemoteMap={}}return _create_class(e,[{key:"formatAndRegisterRemote",value:function(e,t){var n=this;return(t.remotes||[]).reduce(function(e,t){return n.registerRemote(t,e,{force:!1}),e},e.remotes)}},{key:"setIdToRemoteMap",value:function(e,t){var n=t.remote,r=t.expose,o=n.name,a=n.alias;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(o)){var i=e.replace(o,a);this.idToRemoteMap[i]={name:n.name,expose:r}}else if(a&&e.startsWith(a)){var c=e.replace(a,o);this.idToRemoteMap[c]={name:n.name,expose:r}}}},{key:"loadRemote",value:function(e,t){return _async_to_generator(function(){var n,r,o,a,i,c,s,u,l,f,_,p,h,d,m,y,v,g;return _ts_generator(this,function(b){switch(b.label){case 0:n=this.host,b.label=1;case 1:return b.trys.push([1,5,,7]),r=(t||{loadFactory:!0}).loadFactory,o=void 0===r||r,[4,this.getRemoteModuleAndOptions({id:e})];case 2:return a=b.sent(),i=a.module,c=a.moduleOptions,s=a.remoteMatchInfo,u=s.pkgNameOrAlias,l=s.remote,f=s.expose,_=s.id,p=s.remoteSnapshot,[4,i.get(_,f,t,p)];case 3:return h=b.sent(),[4,this.hooks.lifecycle.onLoad.emit({id:_,pkgNameOrAlias:u,expose:f,exposeModule:o?h:void 0,exposeModuleFactory:o?void 0:h,remote:l,options:c,moduleInstance:i,origin:n})];case 4:return d=b.sent(),[2,(this.setIdToRemoteMap(e,s),"function"==typeof d?d:h)];case 5:return m=b.sent(),y=(t||{from:"runtime"}).from,v=void 0===y?"runtime":y,[4,this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:m,from:v,lifecycle:"onLoad",origin:n})];case 6:if(!(g=b.sent()))throw m;return[2,g];case 7:return[2]}})}).call(this)}},{key:"preloadRemote",value:function(e){return _async_to_generator(function(){var t,n,r;return _ts_generator(this,function(o){switch(o.label){case 0:return t=this,n=this.host,[4,this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:n.options,origin:n})];case 1:return o.sent(),r=xn(n.options.remotes,e),[4,Promise.all(r.map(function(e){return _async_to_generator(function(){var t,r,o,a,i,c;return _ts_generator(this,function(s){switch(s.label){case 0:return t=e.remote,r=fe(t),[4,n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t})];case 1:return o=s.sent(),a=o.globalSnapshot,i=o.remoteSnapshot,[4,this.hooks.lifecycle.generatePreloadAssets.emit({origin:n,preloadOptions:e,remote:t,remoteInfo:r,globalSnapshot:a,remoteSnapshot:i})];case 2:return(c=s.sent())&&Qt(r,n,c),[2]}})}).call(t)}))];case 2:return o.sent(),[2]}})}).call(this)}},{key:"registerRemotes",value:function(e,t){var n=this,r=this.host;e.forEach(function(e){n.registerRemote(e,r.options.remotes,{force:null==t?void 0:t.force})})}},{key:"getRemoteModuleAndOptions",value:function(e){return _async_to_generator(function(){var t,n,r,o,a,i,c,s,u,l,f,_,p;return _ts_generator(this,function(h){switch(h.label){case 0:t=this.host,n=e.id,h.label=1;case 1:return h.trys.push([1,3,,5]),[4,this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})];case 2:return r=h.sent(),[3,5];case 3:return o=h.sent(),[4,this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:"runtime",error:o,lifecycle:"beforeRequest"})];case 4:if(!(r=h.sent()))throw o;return[3,5];case 5:return a=r.id,N(i=An(t.options.remotes,a),A(Ye,w,{hostName:t.options.name,requestId:a})),c=i.remote,s=fe(c),[4,t.sharedHandler.hooks.lifecycle.afterResolve.emit(_object_spread_props(_object_spread({id:a},i),{options:t.options,origin:t,remoteInfo:s}))];case 6:return u=h.sent(),l=u.remote,f=u.expose,N(l&&f,"The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ".concat(a,".")),_=t.moduleCache.get(l.name),p={host:t,remoteInfo:s},[2,(_||(_=new te(p),t.moduleCache.set(l.name,_)),{module:_,moduleOptions:p,remoteMatchInfo:u})]}})}).call(this)}},{key:"registerRemote",value:function(e,t,n){var r=this.host,o=function(){if(e.alias){var n=t.find(function(t){var n;return e.alias&&(t.name.startsWith(e.alias)||(null===(n=t.alias)||void 0===n?void 0:n.startsWith(e.alias)))});N(!n,"The alias ".concat(e.alias," of remote ").concat(e.name," is not allowed to be the prefix of ").concat(n&&n.name," name or alias"))}"entry"in e&&x()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=de),e.type||(e.type=Vt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});var a=t.find(function(t){return t.name===e.name});if(a){var i=['The remote "'.concat(e.name,'" is already registered.'),"Please note that overriding it may cause unexpected errors."];(null==n?void 0:n.force)&&(this.removeRemote(a),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),Ee(i.join(" ")))}else o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r})}},{key:"removeRemote",value:function(e){try{var t=this.host,n=e.name,r=t.options.remotes.findIndex(function(e){return e.name===n});-1!==r&&t.options.remotes.splice(r,1);var o=t.moduleCache.get(e.name);if(o){var a,i=o.remoteInfo,c=i.entryGlobalName;$[c]&&((null===(a=Object.getOwnPropertyDescriptor($,c))||void 0===a?void 0:a.configurable)?delete $[c]:$[c]=void 0);var s=nt(o.remoteInfo);Y[s]&&delete Y[s],t.snapshotHandler.manifestCache.delete(i.entry);var u=i.buildVersion?_e(i.name,i.buildVersion):i.name,l=$.__FEDERATION__.__INSTANCES__.findIndex(function(e){return i.buildVersion?e.options.id===u:e.name===u});if(-1!==l){var f=$.__FEDERATION__.__INSTANCES__[l];u=f.options.id||u;var _=Xt(),p=!0,h=[];Object.keys(_).forEach(function(e){var t=_[e];t&&Object.keys(t).forEach(function(n){var r=t[n];r&&Object.keys(r).forEach(function(t){var o=r[t];o&&Object.keys(o).forEach(function(r){var a=o[r];a&&"object"==(void 0===a?"undefined":_type_of(a))&&a.from===i.name&&(a.loaded||a.loading?(a.useIn=a.useIn.filter(function(e){return e!==i.name}),a.useIn.length?p=!1:h.push([e,n,t,r])):h.push([e,n,t,r]))})})})}),p&&(f.shareScopeMap={},delete _[u]),h.forEach(function(e){var t,n,r,o=_sliced_to_array(e,4),a=o[0],i=o[1],c=o[2],s=o[3];null===(r=_[a])||void 0===r||(null===(n=r[i])||void 0===n||(null===(t=n[c])||void 0===t||delete t[s]))}),$.__FEDERATION__.__INSTANCES__.splice(l,1)}var d=nr(e,t).hostGlobalSnapshot;if(d){var m=d&&"remotesInfo"in d&&d.remotesInfo&&Z(d.remotesInfo,e.name).key;m&&(delete d.remotesInfo[m],le.__FEDERATION__.__MANIFEST_LOADING__[m]&&delete le.__FEDERATION__.__MANIFEST_LOADING__[m])}t.moduleCache.delete(e.name)}}catch(e){rt.log("removeRemote fail: ",e)}}}]),e}(),jn="boolean"!=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,q=function(){function e(t){_class_call_check(this,e),this.hooks=new B({beforeInit:new K("beforeInit"),init:new M,beforeInitContainer:new C("beforeInitContainer"),initContainer:new C("initContainer")}),this.version="0.23.0",this.moduleCache=new Map,this.loaderHook=new B({getModuleInfo:new M,createScript:new M,createLink:new M,fetch:new L,loadEntryError:new L,getModuleFactory:new L}),this.bridgeHook=new B({beforeBridgeRender:new M,afterBridgeRender:new M,beforeBridgeDestroy:new M,afterBridgeDestroy:new M});var n=jn?[Cn(),Vn()]:[],r={id:On(),name:t.name,plugins:n,remotes:[],shared:{},inBrowser:x()};this.name=t.name,this.options=r,this.snapshotHandler=new ot(this),this.sharedHandler=new st(this),this.remoteHandler=new it(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins(_to_consumable_array(r.plugins).concat(_to_consumable_array(t.plugins||[]))),this.options=this.formatOptions(r,t)}return _create_class(e,[{key:"initOptions",value:function(e){this.registerPlugins(e.plugins);var t=this.formatOptions(this.options,e);return this.options=t,t}},{key:"loadShare",value:function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(n){return[2,this.sharedHandler.loadShare(e,t)]})}).call(this)}},{key:"loadShareSync",value:function(e,t){return this.sharedHandler.loadShareSync(e,t)}},{key:"initializeSharing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de,t=arguments.length>1?arguments[1]:void 0;return this.sharedHandler.initializeSharing(e,t)}},{key:"initRawContainer",value:function(e,t,n){var r=fe({name:e,entry:t}),o=new te({host:this,remoteInfo:r});return o.remoteEntryExports=n,this.moduleCache.set(e,o),o}},{key:"loadRemote",value:function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(n){return[2,this.remoteHandler.loadRemote(e,t)]})}).call(this)}},{key:"preloadRemote",value:function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){return[2,this.remoteHandler.preloadRemote(e)]})}).call(this)}},{key:"initShareScopeMap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.sharedHandler.initShareScopeMap(e,t,n)}},{key:"formatOptions",value:function(e,t){var n=zt(e,t).shared,r=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),o=r.userOptions,a=r.options,i=this.remoteHandler.formatAndRegisterRemote(a,o),c=this.sharedHandler.registerShared(a,o).shared,s=_to_consumable_array(a.plugins);o.plugins&&o.plugins.forEach(function(e){s.includes(e)||s.push(e)});var u=_object_spread_props(_object_spread({},e,t),{plugins:s,remotes:i,shared:c});return this.hooks.lifecycle.init.emit({origin:this,options:u}),u}},{key:"registerPlugins",value:function(e){var t=Mn(e,this);this.options.plugins=this.options.plugins.reduce(function(e,t){return t&&e&&!e.find(function(e){return e.name===t.name})&&e.push(t),e},t||[])}},{key:"registerRemotes",value:function(e,t){return this.remoteHandler.registerRemotes(e,t)}},{key:"registerShared",value:function(e){this.sharedHandler.registerShared(this.options,_object_spread_props(_object_spread({},this.options),{shared:e}))}}]),e}();function Bn(){return("undefined"==typeof FEDERATION_BUILD_IDENTIFIER?"undefined":_type_of(FEDERATION_BUILD_IDENTIFIER))<"u"?FEDERATION_BUILD_IDENTIFIER:""}function or(e,t){var n=Bn();return $.__FEDERATION__.__INSTANCES__.find(function(r){return!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t)})}function sr(e){var t=new(Ct()||q)(e);return Ht(t),t}var R=null;function Wn(e){var t=or(e.name,e.version);return t?(t.initOptions(e),R||(R=t),t):R=sr(e)}function Kn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.loadRemote.apply(R,t)}function qn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.loadShare.apply(R,t)}function zn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.loadShareSync.apply(R,t)}function Xn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.preloadRemote.apply(R,t)}function Yn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.registerRemotes.apply(R,t)}function Jn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.registerPlugins.apply(R,t)}function Zn(){return R}function Qn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.registerShared.apply(R,t)}return Gt(q),window[mt]={MFRuntime:De,MFSDK:Ie},exports.MFRuntime=De,exports.MFSDK=Ie,exports}({});
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.EMP_SHARE_RUNTIME=t():e.EMP_SHARE_RUNTIME=t()}(self,()=>(()=>{"use strict";var e,t={};t.d=(e,r,o)=>{var n=(r,o)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,[o]:r[n]})};n(r,"get"),n(o,"value")},t.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};t.r(r),t.d(r,{MFRuntime:()=>o,MFSDK:()=>n});var o={};t.r(o),t.d(o,{Module:()=>t2,ModuleFederation:()=>rf,createInstance:()=>ru,getInstance:()=>rb,getRemoteEntry:()=>tV,getRemoteInfo:()=>tW,init:()=>rd,loadRemote:()=>rp,loadScript:()=>tf,loadScriptNode:()=>tg,loadShare:()=>ry,loadShareSync:()=>rg,preloadRemote:()=>rE,registerGlobalPlugins:()=>ee,registerPlugins:()=>rS,registerRemotes:()=>r_,registerShared:()=>rI});var n={};t.r(n),t.d(n,{BROWSER_LOG_KEY:()=>a,ENCODE_NAME_PREFIX:()=>d,EncodedNameTransformMap:()=>c,FederationModuleManifest:()=>i,MANIFEST_EXT:()=>".json",MFModuleType:()=>u,MODULE_DEVTOOL_IDENTIFIER:()=>m,ManifestFileName:()=>h,NameTransformMap:()=>l,NameTransformSymbol:()=>s,SEPARATOR:()=>":",StatsFileName:()=>f,TEMP_DIR:()=>p,TreeShakingStatus:()=>y,assert:()=>tt,bindLoggerToCompiler:()=>T,composeKeyWithSeparator:()=>e9,consumeSharedPlugin:()=>rA,containerPlugin:()=>rR,containerReferencePlugin:()=>rw,createInfrastructureLogger:()=>v,createLink:()=>th,createLogger:()=>w,createModuleFederationConfig:()=>rP,createScript:()=>tc,createScriptNode:()=>ty,decodeName:()=>e6,encodeName:()=>e3,error:()=>tr,generateExposeFilename:()=>e7,generateShareFilename:()=>e8,generateSnapshotFromManifest:()=>rr,getManifestFileName:()=>rn,getProcessEnv:()=>b,getResourceUrl:()=>te,inferAutoPublicPath:()=>rt,infrastructureLogger:()=>k,isBrowserEnv:()=>E,isBrowserEnvValue:()=>g,isDebugMode:()=>S,isManifestProvider:()=>ro,isReactNativeEnv:()=>_,isRequiredVersion:()=>ta,isStaticResourcesEqual:()=>tl,loadScript:()=>tf,loadScriptNode:()=>tg,logger:()=>A,moduleFederationPlugin:()=>rv,normalizeOptions:()=>rO,parseEntry:()=>e5,provideSharedPlugin:()=>rk,safeToString:()=>tn,safeWrapper:()=>ts,sharePlugin:()=>rT,simpleJoinRemoteEntry:()=>re,warn:()=>to});let i="federation-manifest.json",a="FEDERATION_DEBUG",s={AT:"@",HYPHEN:"-",SLASH:"/"},l={[s.AT]:"scope_",[s.HYPHEN]:"_",[s.SLASH]:"__"},c={[l[s.AT]]:s.AT,[l[s.HYPHEN]]:s.HYPHEN,[l[s.SLASH]]:s.SLASH},h="mf-manifest.json",f="mf-stats.json",u={NPM:"npm",APP:"app"},m="__MF_DEVTOOLS_MODULE_INFO__",d="ENCODE_NAME_PREFIX",p=".federation",y=((e={})[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e),g="u">typeof ENV_TARGET?"web"===ENV_TARGET:"u">typeof window&&void 0!==window.document;function E(){return g}function _(){return"u">typeof navigator&&navigator?.product==="ReactNative"}function S(){"u">typeof process&&process.env;try{if(g&&window.localStorage)return!!localStorage.getItem(a)}catch(e){}return!1}let b=function(){return"u">typeof process&&process.env?process.env:{}},I="[ Module Federation ]",$=console,N=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];var R=class{constructor(e,t=$){this.prefix=e,this.delegate=t??$}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??$}emit(e,t){let r=this.delegate,o=S()?function(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split("\n"),r=t.filter(e=>!N.some(t=>e.includes(t)));if(!r.length)return;return`Stack trace:
2
+ ${r.slice(0,5).join("\n")}`}catch{return}}():void 0,n=o?[...t,o]:t,i=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}})();for(let e of i){let t=r[e];if("function"==typeof t)return void t.call(r,this.prefix,...n)}for(let e of i){let t=$[e];if("function"==typeof t)return void t.call($,this.prefix,...n)}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){S()&&this.emit("debug",e)}};function w(e){return new R(e)}function v(e){let t=new R(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function T(e,t,r){if(e.__mf_infrastructure_logger__&&t?.getInfrastructureLogger)try{let o=t.getInfrastructureLogger(r);o&&"object"==typeof o&&("function"==typeof o.log||"function"==typeof o.info||"function"==typeof o.warn||"function"==typeof o.error)&&e.setDelegate(o)}catch{e.setDelegate(void 0)}}let A=w(I),k=v(I),O=(e,t,r,o)=>{let n=[`${[t[e]]} #${e}`];return r&&n.push(`args: ${JSON.stringify(r)}`),n.push(`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`),o&&n.push(`Original Error Message:
3
+ ${o}`),n.join("\n")},P="[ Federation Runtime ]",L=w(P);function M(e,t,r,o,n){e||(void 0!==r?x(t,r,o,void 0,n):x(t))}function x(e,t,r,o,n){if(void 0!==t){var i=O(e,t,r??{},o);throw Error(`${P}: ${i}`)}if(e instanceof Error)throw e.message.startsWith(P)||(e.message=`${P}: ${e.message}`),e;throw Error(`${P}: ${e}`)}function H(e){e instanceof Error&&(e.message.startsWith(P)||(e.message=`${P}: ${e.message}`)),L.warn(e)}function F(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function D(e){return void 0!==e.entry}function j(e){return!e.entry.includes(".json")}function C(e){return e&&"object"==typeof e}let U=Object.prototype.toString;function G(e){return Array.isArray(e)?e:[e]}function V(e){let t={url:"",type:"global",globalName:""};return g||_()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}let W="object"==typeof globalThis?globalThis:window,B=(()=>{try{return document.defaultView}catch{return W}})();function q(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function z(e,t){return Object.hasOwnProperty.call(e,t)}z(W,"__GLOBAL_LOADING_REMOTE_ENTRY__")||q(W,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});let K=W.__GLOBAL_LOADING_REMOTE_ENTRY__;function Y(e){z(e,"__VMOK__")&&!z(e,"__FEDERATION__")&&q(e,"__FEDERATION__",e.__VMOK__),z(e,"__FEDERATION__")||(q(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),q(e,"__VMOK__",e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}function J(e,t){if("string"==typeof t)if(e[t])return{value:e[t],key:t};else{for(let r of Object.keys(e)){let[o,n]=r.split(":"),i=`${o}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}x(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}Y(W),Y(B);let X=e=>((e,t)=>{let r=J(t,F(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){let{version:t,...r}=e,o=F(r),n=J(B.__FEDERATION__.moduleInfo,o).value;if(n?.version===t)return n}})(e,B.__FEDERATION__.moduleInfo),Z=(e,t)=>{let r=F(e);return B.__FEDERATION__.moduleInfo[r]=t,B.__FEDERATION__.moduleInfo},Q=(e,t)=>{let r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:W[r]}},ee=e=>{let{__GLOBAL_PLUGIN__:t}=B.__FEDERATION__;e.forEach(e=>{-1===t.findIndex(t=>t.name===e.name)?t.push(e):H(`The plugin ${e.name} has been registered.`)})},et=e=>W.__FEDERATION__.__PRELOADED_MAP__.get(e),er=e=>W.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),eo="[0-9A-Za-z-]+",en=`(?:\\+(${eo}(?:\\.${eo})*))`,ei="0|[1-9]\\d*",ea="[0-9]+",es="\\d*[a-zA-Z-][a-zA-Z0-9-]*",el=`(?:${ea}|${es})`,ec=`(?:-?(${el}(?:\\.${el})*))`,eh=`(?:${ei}|${es})`,ef=`(?:-(${eh}(?:\\.${eh})*))`,eu=`${ei}|x|X|\\*`,em=`[v=\\s]*(${eu})(?:\\.(${eu})(?:\\.(${eu})(?:${ef})?${en}?)?)?`,ed=`^\\s*(${em})\\s+-\\s+(${em})\\s*$`,ep=`[v=\\s]*${`(${ea})\\.(${ea})\\.(${ea})`}${ec}?${en}?`,ey="((?:<|>)?=?)",eg=`(\\s*)${ey}\\s*(${ep}|${em})`,eE="(?:~>?)",e_=`(\\s*)${eE}\\s+`,eS="(?:\\^)",eb=`(\\s*)${eS}\\s+`,eI=`^${eS}${em}$`,e$=`v?${`(${ei})\\.(${ei})\\.(${ei})`}${ef}?${en}?`,eN=`^${eE}${em}$`,eR=`^${ey}\\s*${em}$`,ew=`^${ey}\\s*(${e$})$|^$`;function ev(e){return new RegExp(e)}function eT(e){return!e||"x"===e.toLowerCase()||"*"===e}function eA(...e){return t=>e.reduce((e,t)=>t(e),t)}function ek(e){return e.match(ev(ew))}function eO(e,t,r,o){let n=`${e}.${t}.${r}`;return o?`${n}-${o}`:n}function eP(e){return e.replace(ev(ed),(e,t,r,o,n,i,a,s,l,c,h,f)=>(t=eT(r)?"":eT(o)?`>=${r}.0.0`:eT(n)?`>=${r}.${o}.0`:`>=${t}`,s=eT(l)?"":eT(c)?`<${Number(l)+1}.0.0-0`:eT(h)?`<${l}.${Number(c)+1}.0-0`:f?`<=${l}.${c}.${h}-${f}`:`<=${s}`,`${t} ${s}`.trim()))}function eL(e){return e.replace(ev(eg),"$1$2$3")}function eM(e){return e.replace(ev(e_),"$1~")}function ex(e){return e.replace(ev(eb),"$1^")}function eH(e){return e.trim().split(/\s+/).map(e=>e.replace(ev(eI),(e,t,r,o,n)=>{if(eT(t))return"";if(eT(r))return`>=${t}.0.0 <${Number(t)+1}.0.0-0`;if(eT(o))if("0"===t)return`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`;else return`>=${t}.${r}.0 <${Number(t)+1}.0.0-0`;if(n)if("0"!==t)return`>=${t}.${r}.${o}-${n} <${Number(t)+1}.0.0-0`;else if("0"===r)return`>=${t}.${r}.${o}-${n} <${t}.${r}.${Number(o)+1}-0`;else return`>=${t}.${r}.${o}-${n} <${t}.${Number(r)+1}.0-0`;if("0"===t)if("0"===r)return`>=${t}.${r}.${o} <${t}.${r}.${Number(o)+1}-0`;else return`>=${t}.${r}.${o} <${t}.${Number(r)+1}.0-0`;return`>=${t}.${r}.${o} <${Number(t)+1}.0.0-0`})).join(" ")}function eF(e){return e.trim().split(/\s+/).map(e=>e.replace(ev(eN),(e,t,r,o,n)=>eT(t)?"":eT(r)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:eT(o)?`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`:n?`>=${t}.${r}.${o}-${n} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${o} <${t}.${Number(r)+1}.0-0`)).join(" ")}function eD(e){return e.split(/\s+/).map(e=>e.trim().replace(ev(eR),(e,t,r,o,n,i)=>{let a=eT(r),s=a||eT(o),l=s||eT(n);if("="===t&&l&&(t=""),i="",a)if(">"===t||"<"===t)return"<0.0.0-0";else return"*";return t&&l?(s&&(o=0),n=0,">"===t?(t=">=",s?(r=Number(r)+1,o=0):o=Number(o)+1,n=0):"<="===t&&(t="<",s?r=Number(r)+1:o=Number(o)+1),"<"===t&&(i="-0"),`${t+r}.${o}.${n}${i}`):s?`>=${r}.0.0${i} <${Number(r)+1}.0.0-0`:l?`>=${r}.${o}.0${i} <${r}.${Number(o)+1}.0-0`:e})).join(" ")}function ej(e){return e.trim().replace(ev("(<|>)?=?\\s*\\*"),"")}function eC(e,t){return(e=Number(e)||e)>(t=Number(t)||t)?1:e===t?0:-1}function eU(e,t){return eC(e.major,t.major)||eC(e.minor,t.minor)||eC(e.patch,t.patch)||function(e,t){let{preRelease:r}=e,{preRelease:o}=t;if(void 0===r&&o)return 1;if(r&&void 0===o)return -1;if(void 0===r&&void 0===o)return 0;for(let e=0,t=r.length;e<=t;e++){let t=r[e],n=o[e];if(t!==n){if(void 0===t&&void 0===n)return 0;if(!t)return 1;if(!n)return -1;return eC(t,n)}}return 0}(e,t)}function eG(e,t){return e.version===t.version}function eV(e,t){if(!e)return!1;let r=ek(e);if(!r)return!1;let[,o,,n,i,a,s]=r,l={operator:o,version:eO(n,i,a,s),major:n,minor:i,patch:a,preRelease:s?.split(".")};for(let e of t.split("||")){let t=e.trim();if(!t||"*"===t||"x"===t)return!0;try{let e=eA(eP,eL,eM,ex)(t.trim()).split(/\s+/).join(" ");if(!e.trim())return!0;let r=e.split(" ").map(e=>eA(eH,eF,eD,ej)(e)).join(" ");if(!r.trim())return!0;let o=r.split(/\s+/).map(e=>e.trim().replace(ev("^\\s*>=\\s*0.0.0\\s*$"),"")).filter(Boolean);if(0===o.length)continue;let n=!0;for(let e of o){let t=ek(e);if(!t){n=!1;break}let[,r,,o,i,a,s]=t;if(!function(e,t){switch(e.operator){case"":case"=":return eG(e,t);case">":return 0>eU(e,t);case">=":return eG(e,t)||0>eU(e,t);case"<":return eU(e,t)>0;case"<=":return eG(e,t)||eU(e,t)>0;case void 0:return!0;default:return!1}}({operator:r,version:eO(o,i,a,s),major:o,minor:i,patch:a,preRelease:s?.split(".")},l)){n=!1;break}}if(n)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}let eW="default";function eB(e,t){let r=t.shared||{},o=t.name,n=Object.keys(r).reduce((e,n)=>{let i=G(r[n]);return e[n]=e[n]||[],i.forEach(r=>{var i;let a;e[n].push((i=t.shareStrategy,a="get"in r?r.get:"lib"in r?()=>Promise.resolve(r.lib):()=>Promise.resolve(()=>{x(`Cannot get shared "${n}" from "${o}": neither "get" nor "lib" is provided in the share config.`)}),r.shareConfig?.eager&&r.treeShaking?.mode&&x(`Invalid shared config for "${n}" from "${o}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:o,loading:null,...r,shareConfig:{requiredVersion:`^${r.version}`,singleton:!1,eager:!1,strictVersion:!1,...r.shareConfig},get:a,loaded:!!r?.loaded||"lib"in r||void 0,version:r.version??"0",scope:Array.isArray(r.scope)?r.scope:[r.scope??"default"],strategy:(r.strategy??i)||"version-first",treeShaking:r.treeShaking?{...r.treeShaking,mode:r.treeShaking.mode??"server-calc",status:r.treeShaking.status??y.UNKNOWN,useIn:[]}:void 0}))}),e},{}),i={...e.shared};return Object.keys(n).forEach(e=>{i[e]?n[e].forEach(t=>{i[e].find(e=>e.version===t.version)||i[e].push(t)}):i[e]=n[e]}),{allShareInfos:i,newShareInfos:n}}function eq(e,t){if(!e)return!1;let{status:r,mode:o}=e;return r!==y.NO_USE&&(r===y.CALCULATED||"runtime-infer"===o&&(!t||eJ(e,t)))}function ez(e,t){let r=e=>{if(!Number.isNaN(Number(e))){let t=e.split("."),r=e;for(let e=0;e<3-t.length;e++)r+=".0";return r}return e};return!!eV(r(e),`<=${r(t)}`)}let eK=(e,t)=>{let r=t||function(e,t){return ez(e,t)};return Object.keys(e).reduce((e,t)=>!e||r(e,t)||"0"===e?t:e,0)},eY=e=>!!e.loaded||"function"==typeof e.lib,eJ=(e,t)=>{if(!e||!t)return!1;let{usedExports:r}=e;return!!r&&!!t.every(e=>r.includes(e))},eX=e=>eY(e)||!!e.loading;function eZ(e,t,r,o){if(!e)return;let{shareConfig:n,scope:i=eW,strategy:a,treeShaking:s}=r;for(let l of Array.isArray(i)?i:[i])if(n&&e[l]&&e[l][t]){let{requiredVersion:i}=n,{version:c,useTreesShaking:h}=("loaded-first"===a?function(e,t,r,o){let n=e[t][r],i="",a=eq(o),s=function(e,t){if(a){if(!n[e].treeShaking)return!0;if(!n[t].treeShaking)return!1;if(eX(n[t].treeShaking))if(eX(n[e].treeShaking))return!!ez(e,t);else return!0;if(eX(n[e].treeShaking))return!1}if(eX(n[t]))if(eX(n[e]))return!!ez(e,t);else return!0;return!eX(n[e])&&ez(e,t)};if(a){if(i=eK(e[t][r],s))return{version:i,useTreesShaking:a};a=!1}return{version:eK(e[t][r],s),useTreesShaking:a}}:function(e,t,r,o){let n=e[t][r],i="",a=eq(o),s=function(e,t){return a?!n[e].treeShaking||!!n[t].treeShaking&&!eY(n[e].treeShaking)&&ez(e,t):!eY(n[e])&&ez(e,t)};if(a){if(i=eK(e[t][r],s))return{version:i,useTreesShaking:a};a=!1}return{version:eK(e[t][r],s),useTreesShaking:a}})(e,l,t,s),f=()=>{let o=e[l][t][c];if(n.singleton){if("string"==typeof i&&!eV(c,i)){let e=`Version ${c} from ${c&&o.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${i})`;n.strictVersion?x(e):H(e)}return{shared:o,useTreesShaking:h}}{if(!1===i||"*"===i||eV(c,i))return{shared:o,useTreesShaking:h};let r=eq(s);if(r){for(let[o,n]of Object.entries(e[l][t]))if(eq(n.treeShaking,s?.usedExports)&&eV(o,i))return{shared:n,useTreesShaking:r}}for(let[r,o]of Object.entries(e[l][t]))if(eV(r,i))return{shared:o,useTreesShaking:!1}}},u={shareScopeMap:e,scope:l,pkgName:t,version:c,GlobalFederation:B.__FEDERATION__,shareInfo:r,resolver:f};return(o.emit(u)||u).resolver()}}function eQ(){return B.__FEDERATION__.__SHARE__}function e0(e){let{pkgName:t,extraOptions:r,shareInfos:o}=e,n=r?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[eK(t,function(e,r){return!eY(t[e])&&ez(e,r)})]}),i=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),a=(...e)=>{let t={};for(let r of e)if(r)for(let[e,o]of Object.entries(r)){let r=t[e];i(r)&&i(o)?t[e]=a(r,o):void 0!==o&&(t[e]=o)}return t};return a(n(o[t]),r?.customShareInfo)}let e1=(e,t)=>{var r;e.useIn||(e.useIn=[]),r=e.useIn,-1===r.findIndex(e=>e===t)&&r.push(t)};function e2(e,t){return t&&e.treeShaking?e.treeShaking:e}let e4="[ Federation Runtime ]",e5=(e,t,r=":")=>{let o=e.split(r),n="development"===b().NODE_ENV&&t,i=e=>e.startsWith("http")||e.includes(".json");if(o.length>=2){let[t,...a]=o;e.startsWith(r)&&(t=o.slice(0,2).join(r),a=[n||o.slice(2).join(r)]);let s=n||a.join(r);return i(s)?{name:t,entry:s}:{name:t,version:s||"*"}}if(1===o.length){let[e]=o;return n&&i(n)?{name:e,entry:n}:{name:e,version:n||"*"}}throw`Invalid entry value: ${e}`},e9=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,""):""},e3=function(e,t="",r=!1){try{return`${t}${e.replace(RegExp(`${s.AT}`,"g"),l[s.AT]).replace(RegExp(`${s.HYPHEN}`,"g"),l[s.HYPHEN]).replace(RegExp(`${s.SLASH}`,"g"),l[s.SLASH])}${r?".js":""}`}catch(e){throw e}},e6=function(e,t,r){try{let o=e;if(t){if(!o.startsWith(t))return o;o=o.replace(RegExp(t,"g"),"")}return o=o.replace(RegExp(`${l[s.AT]}`,"g"),c[l[s.AT]]).replace(RegExp(`${l[s.SLASH]}`,"g"),c[l[s.SLASH]]).replace(RegExp(`${l[s.HYPHEN]}`,"g"),c[l[s.HYPHEN]]),r&&(o=o.replace(".js","")),o}catch(e){throw e}},e7=(e,t)=>{if(!e)return"";let r=e;return"."===r&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),e3(r,"__federation_expose_",t)},e8=(e,t)=>e?e3(e,"__federation_shared_",t):"",te=(e,t)=>{if("getPublicPath"in e){let r;return r=e.getPublicPath.startsWith("function")?Function("return "+e.getPublicPath)()():Function(e.getPublicPath)(),`${r}${t}`}return"publicPath"in e?!g&&!_()&&"ssrPublicPath"in e&&"string"==typeof e.ssrPublicPath?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},tt=(e,t)=>{e||tr(t)},tr=e=>{throw Error(`${e4}: ${e}`)},to=e=>{console.warn(`${e4}: ${e}`)};function tn(e){try{return JSON.stringify(e,null,2)}catch(e){return""}}let ti=/^([\d^=v<>~]|[*xX]$)/;function ta(e){return ti.test(e)}async function ts(e,t){try{return await e()}catch(e){t||to(e);return}}function tl(e,t){let r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function tc(e){let t,r=null,o=!0,n=2e4,i=document.getElementsByTagName("script");for(let t=0;t<i.length;t++){let n=i[t],a=n.getAttribute("src");if(a&&tl(a,e.url)){r=n,o=!1;break}}if(!r){let t,o=e.attrs;(r=document.createElement("script")).type=o?.type==="module"?"module":"text/javascript",e.createScriptHook&&((t=e.createScriptHook(e.url,e.attrs))instanceof HTMLScriptElement?r=t:"object"==typeof t&&("script"in t&&t.script&&(r=t.script),"timeout"in t&&t.timeout&&(n=t.timeout))),r.src||(r.src=e.url),o&&!t&&Object.keys(o).forEach(e=>{r&&("async"===e||"defer"===e?r[e]=o[e]:r.getAttribute(e)||r.setAttribute(e,o[e]))})}let a=null,s="u">typeof window?t=>{if(t.filename&&tl(t.filename,e.url)){let r=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);r.name="ScriptExecutionError",a=r}}:null;s&&window.addEventListener("error",s);let l=async(o,n)=>{clearTimeout(t),s&&window.removeEventListener("error",s);let i=()=>{if(n?.type==="error"){let t=Error(n?.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);t.name="ScriptNetworkError",e?.onErrorCallback&&e?.onErrorCallback(t)}else a?e?.onErrorCallback&&e?.onErrorCallback(a):e?.cb&&e?.cb()};if(r&&(r.onerror=null,r.onload=null,ts(()=>{let{needDeleteScript:t=!0}=e;t&&r?.parentNode&&r.parentNode.removeChild(r)}),o&&"function"==typeof o)){let e=o(n);if(e instanceof Promise){let t=await e;return i(),t}return i(),e}i()};return r.onerror=l.bind(null,r.onerror),r.onload=l.bind(null,r.onload),t=setTimeout(()=>{l(null,{type:"error",isTimeout:!0})},n),{script:r,needAttach:o}}function th(e){let t,r=null,o=!0,n=2e4,i=document.getElementsByTagName("link");for(let t=0;t<i.length;t++){let n=i[t],a=n.getAttribute("href"),s=n.getAttribute("rel");if(a&&tl(a,e.url)&&s===e.attrs.rel){r=n,o=!1;break}}if(!r){let t;(r=document.createElement("link")).setAttribute("href",e.url);let o=!0,i=e.attrs;e.createLinkHook&&((t=e.createLinkHook(e.url,i))instanceof HTMLLinkElement?(r=t,o=!1):"object"==typeof t&&("link"in t&&t.link&&(r=t.link,o=!1),"timeout"in t&&t.timeout&&(n=t.timeout))),i&&o&&Object.keys(i).forEach(e=>{r&&!r.getAttribute(e)&&r.setAttribute(e,i[e])})}if(!o)return Promise.resolve().then(()=>{e?.cb&&e?.cb()}),{link:r,needAttach:o};let a=(o,n)=>{t&&clearTimeout(t);let i=()=>{if(n?.type==="error"){let t=Error(n?.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name="LinkNetworkError",e?.onErrorCallback&&e?.onErrorCallback(t)}else e?.cb&&e?.cb()};if(r&&(r.onerror=null,r.onload=null,ts(()=>{let{needDeleteLink:t=!0}=e;t&&r?.parentNode&&r.parentNode.removeChild(r)}),o)){let e=o(n);return i(),e}i()};return r.onerror=a.bind(null,r.onerror),r.onload=a.bind(null,r.onload),t=setTimeout(()=>{a(null,{type:"error",isTimeout:!0})},n),{link:r,needAttach:o}}function tf(e,t){let{attrs:r={},createScriptHook:o}=t;return new Promise((t,n)=>{let{script:i,needAttach:a}=tc({url:e,cb:t,onErrorCallback:n,attrs:{fetchpriority:"high",...r},createScriptHook:o,needDeleteScript:!0});a&&document.head.appendChild(i)})}let tu=new Map;function tm(e){if(!e)throw Error("import specifier is required");if(tu.has(e))return tu.get(e);let t=Function("name","return import(name)")(e).then(e=>e).catch(t=>{throw console.error(`Error importing module ${e}:`,t),tu.delete(e),t});return tu.set(e,t),t}let td=async()=>{let e=await tm("node-fetch");return e.default||e},tp=async(e,t,r)=>{let o,n=await (o=t||{},r.lifecycle.fetch.emit(e,o));return n&&n instanceof Response?n:("u"<typeof fetch?await td():fetch)(e,t||{})},ty="u"<typeof ENV_TARGET||"web"!==ENV_TARGET?(e,t,r,o)=>{let n;if(o?.createScriptHook){let t=o.createScriptHook(e);t&&"object"==typeof t&&"url"in t&&(e=t.url)}try{n=new URL(e)}catch(e){console.error("Error constructing URL:",e),t(Error(`Invalid URL: ${e}`));return}let i=async(e,o)=>{try{let n,i=await e(o.href),a=await i.text(),[s,l]=await Promise.all([tm("path"),tm("vm")]),c={},h={exports:{}},f=o.pathname.split("/").slice(0,-1).join("/"),u=s.basename(o.pathname),m=new l.Script(`(function(exports, module, require, __dirname, __filename) {${a}
4
+ })`,{filename:u,importModuleDynamically:l.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER??tm});n=(await tm("node:module")).createRequire("file:"===o.protocol||"node:"===o.protocol?o.href:s.join(process.cwd(),"__mf_require_base__.js")),m.runInThisContext()(c,h,n,f,u);let d=h.exports||c;if(r&&d&&r.globalName)return void t(void 0,d[r.globalName]||d);t(void 0,d)}catch(e){t(e instanceof Error?e:Error(`Script execution error: ${e}`))}};(async()=>o?.fetch?(e,t)=>tp(e,t,o):"u"<typeof fetch?td():fetch)().then(async e=>{if(r?.type==="esm"||r?.type==="module")return t_(n.href,{fetch:e,vm:await tm("vm")}).then(async e=>{await e.evaluate(),t(void 0,e.namespace)}).catch(e=>{t(e instanceof Error?e:Error(`Script execution error: ${e}`))});i(e,n)}).catch(e=>{t(e)})}:(e,t,r,o)=>{t(Error("createScriptNode is disabled in non-Node.js environment"))},tg="u"<typeof ENV_TARGET||"web"!==ENV_TARGET?(e,t)=>new Promise((r,o)=>{ty(e,(e,n)=>{if(e)o(e);else{let e=t?.attrs?.globalName||`__FEDERATION_${t?.attrs?.name}:custom__`;r(globalThis[e]=n)}},t.attrs,t.loaderHook)}):(e,t)=>{throw Error("loadScriptNode is disabled in non-Node.js environment")},tE=new Map;async function t_(e,t){if(tE.has(e))return tE.get(e);let{fetch:r,vm:o}=t,n=await (await r(e)).text(),i=new o.SourceTextModule(n,{importModuleDynamically:async(r,o)=>t_(new URL(r,e).href,t)});return tE.set(e,i),await i.link(async r=>{let o=new URL(r,e).href;return await t_(o,t)}),i}let tS="RUNTIME-001",tb="RUNTIME-002",tI="RUNTIME-003",t$="RUNTIME-004",tN="RUNTIME-005",tR="RUNTIME-006",tw="RUNTIME-007",tv="RUNTIME-008",tT="RUNTIME-009",tA="RUNTIME-010",tk="RUNTIME-011",tO="RUNTIME-013",tP="RUNTIME-014",tL="RUNTIME-015",tM={[tS]:"Failed to get remoteEntry exports.",[tb]:'The remote entry interface does not contain "init"',[tI]:"Failed to get manifest.",[t$]:"Failed to locate remote.",[tN]:"Invalid loadShareSync function call from bundler runtime",[tR]:"Invalid loadShareSync function call from runtime",[tw]:"Failed to get remote snapshot.",[tv]:"Failed to load script resources.",[tT]:"Please call createInstance first.",[tA]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[tk]:"The remoteEntry URL is missing from the remote snapshot.","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.',[tO]:"The manifest is not a valid Module Federation manifest.",[tP]:"The remote does not expose the requested module.",[tL]:"Remote container initialization failed."};({...tM,"TYPE-001":"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.","BUILD-001":"Failed to find expose module.","BUILD-002":"PublicPath is required in prod mode."});let tx=".then(callbacks[0]).catch(callbacks[1])";async function tH({entry:e,remoteEntryExports:t}){return new Promise((r,o)=>{try{t?r(t):Function("callbacks",`import("${e}")${tx}`)([r,o])}catch(t){x(`Failed to load ESM entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}async function tF({entry:e,remoteEntryExports:t}){return new Promise((r,o)=>{try{t?r(t):Function("callbacks",`System.import("${e}")${tx}`)([r,o])}catch(t){x(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function tD(e,t,r){let{remoteEntryKey:o,entryExports:n}=Q(e,t);return n||x(tS,tM,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:o}),n}async function tj({name:e,globalName:t,entry:r,remoteInfo:o,loaderHook:n,getEntryUrl:i,resourceContext:a}){let{entryExports:s}=Q(e,t);if(s)return s;let l=i?i(r):r;return tf(l,{attrs:{},createScriptHook:(e,t)=>{let r=n.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:o,resourceContext:a?{...a,url:e}:void 0});if(r&&(r instanceof HTMLScriptElement||"script"in r||"timeout"in r))return r}}).then(()=>tD(e,t,r),t=>{x(tv,tM,{remoteName:e,resourceUrl:l},t instanceof Error?t.message:String(t))})}async function tC({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:o,resourceContext:n}){let{entry:i,entryGlobalName:a,name:s,type:l}=e;switch(l){case"esm":case"module":return tH({entry:i,remoteEntryExports:t});case"system":return tF({entry:i,remoteEntryExports:t});default:return tj({entry:i,globalName:a,name:s,remoteInfo:e,loaderHook:r,getEntryUrl:o,resourceContext:n})}}async function tU({remoteInfo:e,loaderHook:t,resourceContext:r}){let{entry:o,entryGlobalName:n,name:i,type:a}=e,{entryExports:s}=Q(i,n);return s||tg(o,{attrs:{name:i,globalName:n,type:a},loaderHook:{createScriptHook:(o,n={})=>{let i=t.lifecycle.createScript.emit({url:o,attrs:n,remoteInfo:e,resourceContext:r?{...r,url:o}:void 0});if(i&&"url"in i)return i}}}).then(()=>tD(i,n,o)).catch(e=>{x(`Failed to load Node.js entry for remote "${i}" from "${o}". ${e instanceof Error?e.message:String(e)}`)})}function tG(e){let{entry:t,name:r}=e;return e9(r,t)}async function tV(e){let{origin:t,remoteEntryExports:r,remoteInfo:o,getEntryUrl:n,resourceContext:i,_inErrorHandling:a=!1}=e,s=tG(o);if(r)return r;if(!K[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;K[s]=e.emit({origin:t,loaderHook:l,remoteInfo:o,remoteEntryExports:r}).then(e=>e||(("u">typeof ENV_TARGET?"web"===ENV_TARGET:g)?tC({remoteInfo:o,remoteEntryExports:r,loaderHook:l,getEntryUrl:n,resourceContext:i}):tU({remoteInfo:o,loaderHook:l,resourceContext:i}))).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:e}),e)).catch(async e=>{let n=tG(o),i=e instanceof Error&&e.message.includes("ScriptExecutionError");if(e instanceof Error&&e.message.includes(tv)&&!i&&!a){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>tV({...e,_inErrorHandling:!0}),origin:t,remoteInfo:o,remoteEntryExports:r,globalLoading:K,uniqueKey:n});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,error:e}),e})}return K[s]}function tW(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||"global",entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||eW}}function tB(e,t){return t&&"."!==t?`${e}/${t.replace(/^\.\//,"")}`:e}function tq(e,t){for(let r of e){let e=t.startsWith(r.name),o=t.replace(r.name,"");if(e){if(o.startsWith("/"))return{pkgNameOrAlias:r.name,expose:o=`.${o}`,remote:r};else if(""===o)return{pkgNameOrAlias:r.name,expose:".",remote:r}}let n=r.alias&&t.startsWith(r.alias),i=r.alias&&t.replace(r.alias,"");if(r.alias&&n){if(i&&i.startsWith("/"))return{pkgNameOrAlias:r.alias,expose:i=`.${i}`,remote:r};else if(""===i)return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function tz(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,...e}}function tK(e){return e instanceof Error&&(e.message.includes("timed out")||e.name.includes("Timeout"))}function tY(e,t,r,o){return{url:t,status:r,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:o}}async function tJ(e,t,r,o){let n=e.moduleCache.get(r.name),i=r.entry;if(n?.remoteEntryExports)return tY(o,i,"cached");try{if(!await tV({origin:e,remoteInfo:r,remoteEntryExports:n?.remoteEntryExports,resourceContext:{...o,url:i}}))throw Error(`Failed to load remoteEntry "${i}".`);return tY(o,i,"success")}catch(e){return tY(o,i,tK(e)?"timeout":"error",e)}}function tX({host:e,remoteInfo:t,url:r,attrs:o,context:n,needDeleteLink:i}){return new Promise(a=>{let{link:s,needAttach:l}=th({url:r,cb:()=>{a(tY(n,r,l?"success":"cached"))},onErrorCallback:e=>{a(tY(n,r,tK(e)?"timeout":"error",e))},attrs:o,createLinkHook:(r,o)=>{let i=e.loaderHook.lifecycle.createLink.emit({url:r,attrs:o,remoteInfo:t,resourceContext:{...n,url:r}});return i instanceof HTMLLinkElement,i},needDeleteLink:i});l&&document.head.appendChild(s)})}function tZ(e,t){return{...e,resourceType:t}}function tQ(e,t,r,o=!0,n={initiator:"preloadRemote",id:e.name}){let{cssAssets:i,jsAssetsWithoutEntry:a,entryAssets:s}=r,l=[];if(t.options.inBrowser){if(s.forEach(r=>{let{moduleInfo:o}=r;l.push(tJ(t,e,o,tZ(n,"remoteEntry")))}),o){let r={rel:"preload",as:"style"};i.forEach(o=>{l.push(tX({host:t,remoteInfo:e,url:o,attrs:r,context:tZ(n,"css")}))})}else{let r={rel:"stylesheet",type:"text/css"};i.forEach(o=>{l.push(tX({host:t,remoteInfo:e,url:o,attrs:r,needDeleteLink:!1,context:tZ(n,"css")}))})}if(o){let r={rel:"preload",as:"script"};a.forEach(o=>{l.push(tX({host:t,remoteInfo:e,url:o,attrs:r,context:tZ(n,"js")}))})}else{let r={fetchpriority:"high",type:e?.type==="module"?"module":"text/javascript"};a.forEach(o=>{l.push(function({host:e,remoteInfo:t,url:r,attrs:o,context:n}){return new Promise(i=>{let{script:a,needAttach:s}=tc({url:r,cb:()=>{i(tY(n,r,s?"success":"cached"))},onErrorCallback:e=>{i(tY(n,r,tK(e)?"timeout":"error",e))},attrs:o,createScriptHook:(r,o)=>{let i=e.loaderHook.lifecycle.createScript.emit({url:r,attrs:o,remoteInfo:t,resourceContext:{...n,url:r}});return i instanceof HTMLScriptElement,i},needDeleteScript:!0});s&&document.head.appendChild(a)})}({host:t,remoteInfo:e,url:o,attrs:r,context:tZ(n,"js")}))})}}return Promise.all(l)}function t0(e){return{name:e.name,alias:e.alias,entry:"entry"in e?e.entry:void 0,version:"version"in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function t1(e){let t={};for(let[r,o]of Object.entries(e.shared)){let e=o[0];e&&(t[r]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion!==!1&&e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?"host":"unknown"},mfConfig:{name:e.name,remotes:e.remotes?.map(t0)??[],shared:t}}}var t2=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await tV({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:"loadRemote",id:tB(this.remoteInfo.name,e),resourceType:"remoteEntry"}});return M(t,`remoteEntryExports is undefined
5
+ ${tn(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,r,o){let n=await this.getEntry(o);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,cached:!0,origin:this.host}),n;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,cached:!0,origin:this.host})}catch(r){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,error:r,cached:!0,origin:this.host}),r}return n}this.initing=!0,this.initPromise=(async()=>{var o,i;let a,s;await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:l,shareScope:c,initScope:h}=(o=this.remoteInfo,i=this.host.shareScopeMap,(a=Array.isArray(o.shareScope)?o.shareScope:[o.shareScope]).length||a.push("default"),a.forEach(e=>{i[e]||(i[e]={})}),Object.defineProperty(s={version:o.version||"",shareScopeKeys:Array.isArray(o.shareScope)?a:o.shareScope||"default"},"shareScopeMap",{value:i,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:i[a[0]],initScope:r??[]}),f=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:c,remoteEntryInitOptions:l,initScope:h,remoteInfo:this.remoteInfo,origin:this.host});void 0===n?.init&&x(tb,tM,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,t1(this.host.options));try{await n.init(f.shareScope,f.initScope,f.remoteEntryInitOptions)}catch(e){x(tL,tM,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,t1(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...f,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,origin:this.host})}catch(r){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,error:r,origin:this.host}),r}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,o){var n,i;let a,s,{loadFactory:l=!0}=r||{loadFactory:!0},c=await this.init(e,o,void 0,t);this.lib=c,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:c,origin:this.host});try{let r=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:c,expose:t,moduleInfo:this.remoteInfo});(a="function"==typeof r?r:void 0)||(a=await c.get(t)),a||x(tP,tM,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:function(e){if(!e||!("modules"in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(","):void 0}(o)},void 0,t1(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:c,moduleFactory:a,origin:this.host})}catch(r){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:c,error:r,origin:this.host}),r}let h=(n=this.remoteInfo.name,i=t,s=n.endsWith("/")?n.slice(0,-1):n,i.startsWith(".")&&(i=i.slice(1)),s+=i),f=this.wraperFactory(a,h);if(!l)return f;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:l,origin:this.host});try{let r=await f();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:l,exposeModule:r,origin:this.host}),r}catch(r){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:l,error:r,origin:this.host}),r}}wraperFactory(e,t){function r(e,t){e&&"object"==typeof e&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for("mf_module_id"))&&Object.defineProperty(e,Symbol.for("mf_module_id"),{value:t,enumerable:!1})}return()=>{let o=e();return o instanceof Promise?o.then(e=>(r(e,t),e)):(r(o,t),o)}}},t4=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){"function"==typeof e&&this.listeners.add(e)}once(e){let t=this;this.on(function r(...o){return t.remove(r),e.apply(null,o)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{let o=r(...e);void 0!==o&&(t=o)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},t5=class extends t4{emit(...e){let t,r=Array.from(this.listeners);if(r.length>0){let o=0,n=t=>!1!==t&&(o<r.length?Promise.resolve(r[o++].apply(null,e)).then(r=>void 0===r||1===e.length&&r===e[0]?n(t):n(r)):t);t=n()}return Promise.resolve(t)}};function t9(e,t){if(!C(t))return!1;if(e!==t){for(let r in e)if(!(r in t))return!1}return!0}var t3=class extends t4{constructor(e){super(),this.onerror=x,this.type=e}emit(e){for(let t of(C(e)||x(`The data for the "${this.type}" hook should be an object.`),this.listeners))try{let r=t(e);if(void 0===r)continue;if(t9(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){H(e),this.onerror(e)}return e}},t6=class extends t4{constructor(e){super(),this.onerror=x,this.type=e}emit(e){C(e)||x(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let r=0,o=t=>(H(t),this.onerror(t),e),n=i=>{if(void 0!==i&&t9(e,i))e=i;else if(void 0!==i)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(r<t.length)try{return Promise.resolve(t[r++](e)).then(n,o)}catch(e){return o(e)}return e};return Promise.resolve(n(e))}return Promise.resolve(e)}},t7=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){M("[object Object]"===U.call(e),"Plugin configuration is invalid.");let r=e.name;M(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(t=>{let r=e[t];r&&this.lifecycle[t].on(r)}))}removePlugin(e){M(e,"A name is required.");let t=this.registerPlugins[e];M(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{"name"!==e&&this.lifecycle[e].remove(t[e])})}};function t8(e,t){let r=V(t);r.url||x(tk,tM,{remoteName:e.name});let o=te(t,r.url);g||o.startsWith("http")||(o=`https:${o}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=o,e.version=t.version,e.buildVersion=t.buildVersion}let re=(e,t)=>{if(!e)return t;let r=(e=>{if("."===e)return"";if(e.startsWith("./"))return e.replace("./","");if(e.startsWith("/")){let t=e.slice(1);return t.endsWith("/")?t.slice(0,-1):t}return e})(e);return r?r.endsWith("/")?`${r}${t}`:`${r}/${t}`:t};function rt(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function rr(e,t={}){let r,{remotes:o={},overrides:n={},version:i}=t,a=()=>"publicPath"in e.metaData?("auto"===e.metaData.publicPath||""===e.metaData.publicPath)&&i?rt(i):e.metaData.publicPath:e.metaData.getPublicPath,s=Object.keys(n),l={};Object.keys(o).length||(l=e.remotes?.reduce((e,t)=>{let r,o=t.federationContainerName;return r=s.includes(o)?n[o]:"version"in t?t.version:t.entry,e[o]={matchedVersion:r},e},{})||{}),Object.keys(o).forEach(e=>l[e]={matchedVersion:s.includes(e)?n[e]:o[e]});let{remoteEntry:{path:c,name:h,type:f},types:u={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:m},globalName:d,ssrRemoteEntry:p}=e.metaData,{exposes:y}=e,g={version:i||"",buildVersion:m,globalName:d,remoteEntry:re(c,h),remoteEntryType:f,remoteTypes:re(u.path,u.name),remoteTypesZip:u.zip||"",remoteTypesAPI:u.api||"",remotesInfo:l,shared:e?.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:y?.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if("publicPath"in e.metaData?(r={...g,publicPath:a()},"string"==typeof e.metaData.ssrPublicPath&&(r.ssrPublicPath=e.metaData.ssrPublicPath)):r={...g,getPublicPath:a()},p){let e=re(p.path,p.name);r.ssrRemoteEntry=e,r.ssrRemoteEntryType=p.type||"commonjs-module"}return r}function ro(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(".json"))}function rn(e){if(!e)return{statsFileName:f,manifestFileName:h};let t="boolean"==typeof e?"":e.filePath||"",r="boolean"==typeof e?"":e.fileName||"",o=".json",n=r?r.endsWith(o)?r:`${r}${o}`:h;return{statsFileName:re(t,r?n.replace(o,`-stats${o}`):f),manifestFileName:re(t,n)}}let ri=(e,t)=>document.querySelector(`${e}[${"link"===e?"href":"src"}="${t}"]`);function ra(e,t){let r=X({name:t.name,version:t.options.version}),o=r&&"remotesInfo"in r&&r.remotesInfo&&J(r.remotesInfo,e.name).value;return o&&o.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:B.__FEDERATION__.moduleInfo,remoteSnapshot:X({name:e.name,version:o.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:B.__FEDERATION__.moduleInfo,remoteSnapshot:X({name:e.name,version:"version"in e?e.version:void 0})}}var rs=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new t7({beforeLoadRemoteSnapshot:new t5("beforeLoadRemoteSnapshot"),loadSnapshot:new t6("loadGlobalSnapshot"),loadRemoteSnapshot:new t6("loadRemoteSnapshot"),afterLoadSnapshot:new t6("afterLoadSnapshot")}),this.manifestLoading=B.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:r="loadRemote"}){let o,n,{options:i}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:i,moduleInfo:e,origin:this.HostInstance});let a=X({name:this.HostInstance.options.name,version:this.HostInstance.options.version});if(!a){var s;a={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},s={[this.HostInstance.options.name]:a},B.__FEDERATION__.moduleInfo={...B.__FEDERATION__.moduleInfo,...s}}a&&"remotesInfo"in a&&!J(a.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(a.remotesInfo={...a?.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});let{hostGlobalSnapshot:l,remoteSnapshot:c,globalSnapshot:h}=this.getGlobalRemoteInfo(e),{remoteSnapshot:f,globalSnapshot:u}=await this.hooks.lifecycle.loadSnapshot.emit({options:i,moduleInfo:e,hostGlobalSnapshot:l,remoteSnapshot:c,globalSnapshot:h});if(f)if(ro(f)){let i=g?f.remoteEntry:f.ssrRemoteEntry||f.remoteEntry||"",a=await this.loadManifestSnapshot(i,e,{},{initiator:r,id:t||e.name}),s=Z({...e,entry:i},a);o=a,n=s}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:f,from:"global"});o=t,n=u}else if(D(e)){let i=await this.loadManifestSnapshot(e.entry,e,{},{initiator:r,id:t||e.name}),a=Z(e,i);o=i,n=a}else x(tw,tM,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(u)},void 0,t1(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:i,moduleInfo:e,remoteSnapshot:o}),{remoteSnapshot:o,globalSnapshot:n}}getGlobalRemoteInfo(e){return ra(e,this.HostInstance)}async getManifestJson(e,t,r,o){return(async()=>{let r=tW(t),n=this.manifestCache.get(e);if(n)return n;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},r,o?{...o,url:e,resourceType:"manifest"}:void 0);t&&t instanceof Response||(t=await fetch(e,{})),n=await t.json()}catch(o){(n=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:o,from:"runtime",lifecycle:"afterResolve",remote:r,origin:this.HostInstance}))||(delete this.manifestLoading[e],x(tI,tM,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${o}`,t1(this.HostInstance.options)))}let i=[!n.metaData&&"metaData",!n.exposes&&"exposes",!n.shared&&"shared"].filter(Boolean);return i.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${i.join(", ")}.`),from:"runtime",lifecycle:"afterResolve",remote:r,origin:this.HostInstance}),i.length>0&&x(tO,tM,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:i.join(",")},void 0,t1(this.HostInstance.options)),this.manifestCache.set(e,n),n})()}async loadManifestSnapshot(e,t,r,o){let n=async()=>{let n=await this.getManifestJson(e,t,r,o),i=rr(n,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:n,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=n().then(e=>e)),this.manifestLoading[e]}},rl=class{constructor(e){this.hooks=new t7({beforeRegisterShare:new t3("beforeRegisterShare"),afterResolve:new t6("afterResolve"),beforeLoadShare:new t6("beforeLoadShare"),loadShare:new t5,afterLoadShare:new t4("afterLoadShare"),errorLoadShare:new t4("errorLoadShare"),resolveShare:new t3("resolveShare"),initContainerShareScopeMap:new t3("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:r,selectedShared:o}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:r,selectedShared:o,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){H(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:r,error:o,recovered:n}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:o,recovered:n})}catch(e){H(e)}}registerShared(e,t){let{newShareInfos:r,allShareInfos:o}=eB(e,t);return Object.keys(r).forEach(e=>{r[e].forEach(r=>{r.scope.forEach(o=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:r}),this.shareScopeMap[o]?.[e]||this.setShared({pkgName:e,lib:r.lib,get:r.get,loaded:r.loaded||!!r.lib,shared:r,from:t.name})})})}),{newShareInfos:r,allShareInfos:o}}async loadShare(e,t){let{host:r}=this,o=e0({pkgName:e,extraOptions:t,shareInfos:r.options.shared}),n=o;try{o?.scope&&await Promise.all(o.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:o.strategy}))})),n=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:r.options.shared,origin:r})).shareInfo,M(n,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let i=n,{shared:a,useTreesShaking:s}=eZ(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(a){let t=e2(a,s);if(t.lib)return e1(t,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:i,selectedShared:a}),t.lib;if(t.loading&&!t.loaded){let o=await t.loading;return t.loaded=!0,t.lib||(t.lib=o),e1(t,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:i,selectedShared:a}),o}{let o=(async()=>{let e=await t.get();return e1(t,r.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:a,from:r.options.name,lib:null,loading:o,treeShaking:s?t:void 0});let n=await o;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:i,selectedShared:a}),n}}{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:i,recovered:!0}),!1;let o=eq(i.treeShaking),n=e2(i,o),a=(async()=>{let t=await n.get();n.lib=t,n.loaded=!0,e1(n,r.options.name);let{shared:o,useTreesShaking:a}=eZ(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let e=e2(o,a);e.lib=t,e.loaded=!0,o.from=i.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:a,treeShaking:o?n:void 0});let s=await a;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:i,selectedShared:i}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:n,error:t}),t}}initializeSharing(e=eW,t){let{host:r}=this,o=t?.from,n=t?.strategy,i=t?.initScope,a=[];if("build"!==o){let{initTokens:t}=this;i||(i=[]);let r=t[e];if(r||(r=t[e]={from:this.host.name}),i.indexOf(r)>=0)return a;i.push(r)}let s=this.shareScopeMap,l=r.options.name;s[e]||(s[e]={});let c=s[e],h=async e=>{let t,{module:o}=await r.remoteHandler.getRemoteModuleAndOptions({id:e});try{t=await o.getEntry()}catch(n){if(!(t=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:"runtime",lifecycle:"beforeLoadShare",remote:o.remoteInfo,origin:r})))return}finally{t?.init&&!o.initing&&(o.remoteEntryExports=t,await o.init(void 0,void 0,i))}};return Object.keys(r.options.shared).forEach(t=>{r.options.shared[t].forEach(r=>{r.scope.includes(e)&&((e,t)=>{let{version:r,eager:o}=t;c[e]=c[e]||{};let n=c[e],i=n[r]&&e2(n[r]),a=!!(i&&("eager"in i&&i.eager||"shareConfig"in i&&i.shareConfig?.eager));(!i||"loaded-first"!==i.strategy&&!i.loaded&&(!o!=!a?o:l>n[r].from))&&(n[r]=t)})(t,r)})}),("version-first"===r.options.shareStrategy||"version-first"===n)&&r.options.remotes.forEach(t=>{t.shareScope===e&&a.push(h(t.name))}),a}loadShareSync(e,t){let{host:r}=this,o=e0({pkgName:e,extraOptions:t,shareInfos:r.options.shared});try{o?.scope&&o.scope.forEach(e=>{this.initializeSharing(e,{strategy:o.strategy})});let{shared:n}=eZ(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(n){if("function"==typeof n.lib)return e1(n,r.options.name),n.loaded||(n.loaded=!0,n.from===r.options.name&&(o.loaded=!0)),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:n}),n.lib;if("function"==typeof n.get){let t=n.get();if(!(t instanceof Promise))return e1(n,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:t,shared:n}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:n}),t}}if(o.lib)return o.loaded||(o.loaded=!0),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o}),o.lib;if(o.get){let n=o.get();return n instanceof Promise&&x(t?.from==="build"?tN:tR,tM,{hostName:r.options.name,sharedPkgName:e},void 0,t1(r.options)),o.lib=n,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:o.lib,shared:o}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o}),o.lib}x(tR,tM,{hostName:r.options.name,sharedPkgName:e},void 0,t1(r.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,error:t}),t}}initShareScopeMap(e,t,r={}){let{host:o}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:o.options,origin:o,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:o,loading:n,loaded:i,get:a,treeShaking:s}){let{version:l,scope:c="default",...h}=t;(Array.isArray(c)?c:[c]).forEach(t=>{let c,f;this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][l]||(this.shareScopeMap[t][e][l]={version:l,scope:[t],...h,lib:o});let u=this.shareScopeMap[t][e][l];(c=(e,t,r)=>{r&&!e[t]&&(e[t]=r)})(f=s?u.treeShaking:u,"loaded",i),c(f,"loading",n),c(f,"get",a),r&&u.from!==r&&(u.from=r)})}_setGlobalShareScopeMap(e){let t=eQ(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},rc=class{constructor(e){this.hooks=new t7({beforeRegisterRemote:new t3("beforeRegisterRemote"),registerRemote:new t3("registerRemote"),beforeRequest:new t6("beforeRequest"),afterMatchRemote:new t5("afterMatchRemote"),onLoad:new t5("onLoad"),afterLoadRemote:new t5("afterLoadRemote"),handlePreloadModule:new t4("handlePreloadModule"),errorLoadRemote:new t5("errorLoadRemote"),beforePreloadRemote:new t5("beforePreloadRemote"),generatePreloadAssets:new t5("generatePreloadAssets"),afterPreloadRemote:new t5("afterPreloadRemote"),loadEntry:new t5}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:r,expose:o}=t,{name:n,alias:i}=r;if(this.idToRemoteMap[e]={name:r.name,expose:o},i&&e.startsWith(n)){let t=e.replace(n,i);this.idToRemoteMap[t]={name:r.name,expose:o};return}if(i&&e.startsWith(i)){let t=e.replace(i,n);this.idToRemoteMap[t]={name:r.name,expose:o}}}async loadRemote(e,t){let r,{host:o}=this,n=tq(o.options.remotes,e),i=e,a=n?.expose,s=n?tW(n.remote):void 0;try{let{loadFactory:n=!0}=t||{loadFactory:!0},{module:l,moduleOptions:c,remoteMatchInfo:h}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:f,remote:u,expose:m,id:d,remoteSnapshot:p}=h;i=d,a=m,s=tW(u);let y=await l.get(d,m,t,p),g=await this.hooks.lifecycle.onLoad.emit({id:d,pkgNameOrAlias:f,expose:m,exposeModule:n?y:void 0,exposeModuleFactory:n?void 0:y,remote:u,options:c,moduleInstance:l,origin:o});if(this.setIdToRemoteMap(e,h),r={id:i,expose:a,remote:s,options:t,origin:o},"function"==typeof g)return g;return y}catch(c){let n,{from:l="runtime"}=t||{from:"runtime"};try{n=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:l,lifecycle:"onLoad",expose:a,remote:s,origin:o})}catch(e){throw r={id:i,expose:a,remote:s,options:t,error:e,origin:o},e}if(!n)throw r={id:i,expose:a,remote:s,options:t,error:c,origin:o},c;return r={id:i,expose:a,remote:s,options:t,error:c,origin:o,recovered:!0},n}finally{r&&await this.hooks.lifecycle.afterLoadRemote.emit(r)}}async preloadRemote(e){var t;let r,{host:o}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:o.options,origin:o});let i=(t=o.options.remotes,e.map(e=>{let r=function(e,t){for(let r of e)if(t===r.name||r.alias&&t===r.alias)return r}(t,e.nameOrAlias);return M(r,`Unable to preload ${e.nameOrAlias} as it is not included in ${!r&&tn({remoteInfo:r,remotes:t})}`),{remote:r,preloadConfig:tz(e)}}));await Promise.all(i.flatMap(e=>{let{preloadConfig:t,remote:r}=e,o=t.exposes||[];return o.length?o.map(o=>({ops:{...e,preloadConfig:{...t,exposes:[o]}},id:tB(r.name,o)})):[{ops:e,id:`${r.name}/*`}]}).map(async e=>{let{ops:t,id:r}=e,{remote:i,preloadConfig:a}=t,s=tW(i);try{let{globalSnapshot:e,remoteSnapshot:l}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:i,id:r,initiator:"preloadRemote"}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:t,remote:i,remoteInfo:s,globalSnapshot:e,remoteSnapshot:l});if(!c)return;let h=await tQ(s,o,c,!0,{initiator:"preloadRemote",id:r});n.push({remote:i,remoteInfo:s,preloadConfig:a,id:r,results:h})}catch(e){n.push({remote:i,remoteInfo:s,preloadConfig:a,id:r,results:[{url:s.entry,status:"error",resourceType:/\.json(?:$|[?#])/i.test(s.entry)?"manifest":"remoteEntry",initiator:"preloadRemote",id:r,error:e}]})}}));let a=n.flatMap(e=>e.results.filter(e=>"error"===e.status||"timeout"===e.status));if(a.length>0&&Object.assign(r=Error(`preloadRemote failed to load ${a.length} resource(s).`),{results:n,failedResults:a}),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:o.options,origin:o,results:n,error:r}),r)throw r}registerRemotes(e,t){let{host:r}=this;e.forEach(e=>{this.registerRemote(e,r.options.remotes,{force:t?.force})})}async getRemoteModuleAndOptions(e){let t,{host:r}=this,{id:o}=e;try{t=await this.hooks.lifecycle.beforeRequest.emit({id:o,options:r.options,origin:r})}catch(e){if(!(t=await this.hooks.lifecycle.errorLoadRemote.emit({id:o,options:r.options,origin:r,from:"runtime",error:e,lifecycle:"beforeRequest"})))throw e}let{id:n}=t,i=tq(r.options.remotes,n);if(!i)try{x(t$,tM,{hostName:r.options.name,requestId:n},void 0,t1(r.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:n,options:r.options,error:e,origin:r}),e}let{remote:a}=i,s=tW(a);await this.hooks.lifecycle.afterMatchRemote.emit({id:n,...i,options:r.options,remoteInfo:s,origin:r});let l=await r.sharedHandler.hooks.lifecycle.afterResolve.emit({id:n,...i,options:r.options,origin:r,remoteInfo:s}),{remote:c,expose:h}=l;M(c&&h,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${n}.`);let f=r.moduleCache.get(c.name),u={host:r,remoteInfo:s};return f||(f=new t2(u),r.moduleCache.set(c.name,f)),{module:f,moduleOptions:u,remoteMatchInfo:l}}registerRemote(e,t,r){let{host:o}=this,n=()=>{if(e.alias){let r=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));M(!r,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${r&&r.name} name or alias`)}"entry"in e&&g&&"u">typeof window&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=eW),e.type||(e.type="global")};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});let i=t.find(t=>t.name===e.name);if(i){let a=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r?.force&&(this.removeRemote(i),n(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),to(a.join(" ")))}else n(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o})}removeRemote(e){try{let{host:t}=this,{name:r}=e,o=t.options.remotes.findIndex(e=>e.name===r);-1!==o&&t.options.remotes.splice(o,1);let n=t.moduleCache.get(e.name);if(n){let r=n.remoteInfo,o=r.entryGlobalName;W[o]&&(Object.getOwnPropertyDescriptor(W,o)?.configurable?delete W[o]:W[o]=void 0);let i=tG(n.remoteInfo);K[i]&&delete K[i],t.snapshotHandler.manifestCache.delete(r.entry);let a=r.buildVersion?e9(r.name,r.buildVersion):r.name,s=W.__FEDERATION__.__INSTANCES__.findIndex(e=>r.buildVersion?e.options.id===a:e.name===a);if(-1!==s){let e=W.__FEDERATION__.__INSTANCES__[s];a=e.options.id||a;let t=eQ(),o=!0,n=[];Object.keys(t).forEach(e=>{let i=t[e];i&&Object.keys(i).forEach(t=>{let a=i[t];a&&Object.keys(a).forEach(i=>{let s=a[i];s&&Object.keys(s).forEach(a=>{let l=s[a];l&&"object"==typeof l&&l.from===r.name&&(l.loaded||l.loading?(l.useIn=l.useIn.filter(e=>e!==r.name),l.useIn.length?o=!1:n.push([e,t,i,a])):n.push([e,t,i,a]))})})})}),o&&(e.shareScopeMap={},delete t[a]),n.forEach(([e,r,o,n])=>{delete t[e]?.[r]?.[o]?.[n]}),W.__FEDERATION__.__INSTANCES__.splice(s,1)}let{hostGlobalSnapshot:l}=ra(e,t);if(l){let t=l&&"remotesInfo"in l&&l.remotesInfo&&J(l.remotesInfo,e.name).key;t&&(delete l.remotesInfo[t],B.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete B.__FEDERATION__.__MANIFEST_LOADING__[t])}t.moduleCache.delete(e.name)}}catch(e){L.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}};let rh="boolean"!=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN;var rf=class{constructor(e){this.hooks=new t7({beforeInit:new t3("beforeInit"),init:new t4,beforeInitContainer:new t6("beforeInitContainer"),initContainer:new t6("initContainer")}),this.version="2.5.1",this.moduleCache=new Map,this.loaderHook=new t7({getModuleInfo:new t4,createScript:new t4,createLink:new t4,fetch:new t5,loadEntryError:new t5,afterLoadEntry:new t5("afterLoadEntry"),beforeInitRemote:new t5("beforeInitRemote"),afterInitRemote:new t5("afterInitRemote"),beforeGetExpose:new t5("beforeGetExpose"),afterGetExpose:new t5("afterGetExpose"),beforeExecuteFactory:new t5("beforeExecuteFactory"),afterExecuteFactory:new t5("afterExecuteFactory"),getModuleFactory:new t5}),this.bridgeHook=new t7({beforeBridgeRender:new t4,afterBridgeRender:new t4,beforeBridgeDestroy:new t4,afterBridgeDestroy:new t4});const t=rh?[{name:"snapshot-plugin",async afterResolve(e){let{remote:t,pkgNameOrAlias:r,expose:o,origin:n,remoteInfo:i,id:a}=e;if(!D(t)||!j(t)){let{remoteSnapshot:s,globalSnapshot:l}=await n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:tB(t.name,o)});t8(i,s);let c=await n.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:n,preloadOptions:{remote:t,preloadConfig:{nameOrAlias:r,exposes:[o],resourceCategory:"sync",share:!1,depsRemote:!1}},remoteInfo:i,remote:t,remoteSnapshot:s,globalSnapshot:l});return c&&tQ(i,n,c,!1,{initiator:"loadRemote",id:a}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}},{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){let{origin:t,preloadOptions:r,remoteInfo:o,remote:n,globalSnapshot:i,remoteSnapshot:a}=e;return g?D(n)&&j(n)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:n.name,url:n.entry,moduleInfo:{name:o.name,entry:n.entry,type:o.type||"global",entryGlobalName:"",shareScope:""}}]}:(t8(o,a),function(e,t,r,o,n){let i=[],a=[],s=[],l=new Set,c=new Set,{options:h}=e,{preloadConfig:f}=t,{depsRemote:u}=f;!function e(t,r,o,n,i={},a){let{value:s}=J(t,F(r)),l=a||s;if(l&&!ro(l)&&(o(l,r,n),l.remotesInfo))for(let r of Object.keys(l.remotesInfo)){if(i[r])continue;i[r]=!0;let n=function(e){let t=e.split(":");return 1===t.length?{name:t[0],version:void 0}:2===t.length?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}(r),a=l.remotesInfo[r];e(t,{name:n.name,version:a.matchedVersion},o,!1,i,void 0)}}(o,r,(t,r,o)=>{var n;let l;if(o)l=f;else if(Array.isArray(u)){let e=u.find(e=>e.nameOrAlias===r.name||e.nameOrAlias===r.alias);if(!e)return;l=tz(e)}else{if(!0!==u)return;l=f}let c=te(t,V(t).url);c&&s.push({name:r.name,moduleInfo:{name:r.name,entry:c,type:"remoteEntryType"in t?t.remoteEntryType:"global",entryGlobalName:"globalName"in t?t.globalName:r.name,shareScope:"",version:"version"in t?t.version:void 0},url:c});let h="modules"in t?t.modules:[],m=(n=l.exposes)?n.map(e=>"."===e?e:e.startsWith("./")?e.replace("./",""):e):[];function d(e){let r=e.map(e=>te(t,e));return l.filter?r.filter(l.filter):r}if(m.length&&"modules"in t&&(h=t?.modules?.reduce((e,t)=>(m?.indexOf(t.moduleName)!==-1&&e.push(t),e),[])),h){let o=h.length;for(let n=0;n<o;n++){let o=h[n],s=`${r.name}/${o.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:"."===o.moduleName?r.name:s,name:r.name,remoteSnapshot:t,preloadConfig:l,remote:r,origin:e}),et(s)||("all"===l.resourceCategory?(i.push(...d(o.assets.css.async)),i.push(...d(o.assets.css.sync)),a.push(...d(o.assets.js.async)),a.push(...d(o.assets.js.sync))):"sync"===l.resourceCategory&&(i.push(...d(o.assets.css.sync)),a.push(...d(o.assets.js.sync))),er(s))}}},!0,{},n),n.shared&&n.shared.length>0&&n.shared.forEach(t=>{let r=h.shared?.[t.sharedName];if(!r)return;let o=t.version?r.find(e=>e.version===t.version):r;o&&G(o).forEach(r=>{((t,r)=>{let{shared:o}=eZ(e.shareScopeMap,r.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};o&&"function"==typeof o.lib&&(r.assets.js.sync.forEach(e=>{l.add(e)}),r.assets.css.sync.forEach(e=>{c.add(e)}))})(r,t)})});let m=a.filter(e=>!l.has(e)&&!ri("script",e));return{cssAssets:i.filter(e=>!c.has(e)&&!ri("link",e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!ri("script",e.url))}}(t,r,o,i,a)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}]:[],r={id:"u">typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:"",name:e.name,plugins:t,remotes:[],shared:{},inBrowser:g};this.name=e.name,this.options=r,this.snapshotHandler=new rs(this),this.sharedHandler=new rl(this),this.remoteHandler=new rc(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&x(O(tA,tM)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=eW,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){let o=new t2({host:this,remoteInfo:tW({name:e,entry:t})});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){let{allShareInfos:r}=eB(e,t),{userOptions:o,options:n}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),i=this.remoteHandler.formatAndRegisterRemote(n,o),{allShareInfos:a}=this.sharedHandler.registerShared(n,o),s=[...n.plugins];o.plugins&&o.plugins.forEach(e=>{s.includes(e)||s.push(e)});let l={...e,...t,plugins:s,remotes:i,shared:a,id:o.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:l}),l}registerPlugins(e){var t;let r,o,n=(t=this,r=B.__FEDERATION__.__GLOBAL_PLUGIN__,o=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook],r.length>0&&r.forEach(t=>{e?.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{o.forEach(r=>{r.applyPlugin(e,t)})}),e);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),n||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};function ru(e){let t=new(W.__FEDERATION__.__DEBUG_CONSTRUCTOR__||rf)({id:`${e.name}@${e.version||Date.now()}`,...e});return W.__FEDERATION__.__INSTANCES__.push(t),t}let rm=null;function rd(e){var t,r;let o,n=(t=e.name,r=e.version,o="u">typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:"",W.__FEDERATION__.__INSTANCES__.find(e=>!!o&&e.options.id===o||e.options.name===t&&!e.options.version&&!r||e.options.name===t&&!!r&&e.options.version===r)),i={...e,id:e.id||""};return n?(n.initOptions(i),rm||(rm=n),n):rm=ru(i)}function rp(...e){return M(rm,tT,tM),rm.loadRemote.apply(rm,e)}function ry(...e){return M(rm,tT,tM),rm.loadShare.apply(rm,e)}function rg(...e){return M(rm,tT,tM),rm.loadShareSync.apply(rm,e)}function rE(...e){return M(rm,tT,tM),rm.preloadRemote.apply(rm,e)}function r_(...e){return M(rm,tT,tM),rm.registerRemotes.apply(rm,e)}function rS(...e){return M(rm,tT,tM),rm.registerPlugins.apply(rm,e)}function rb(e){return e?W.__FEDERATION__.__INSTANCES__.find(e)||null:rm}function rI(...e){return M(rm,tT,tM),rm.registerShared.apply(rm,e)}!function(e,t=S()){t&&(W.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,W.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.5.1")}(rf);var r$=Object.defineProperty,rN=(e,t)=>{let r={};for(var o in e)r$(r,o,{get:e[o],enumerable:!0});return t||r$(r,Symbol.toStringTag,{value:"Module"}),r},rR=rN({}),rw=rN({}),rv=rN({}),rT=rN({}),rA=rN({}),rk=rN({});function rO(e,t,r){return function(o){if(!1===o)return!1;if(void 0===o)if(e)return t;else return!1;if(!0===o)return t;if(o&&"object"==typeof o)return{...t,...o};throw Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof o}`)}}let rP=e=>e;return window.EMP_SHARE_RUNTIME={MFRuntime:o,MFSDK:n},r})());
@@ -0,0 +1,26 @@
1
+ export type { FederationRuntimePlugin } from '../helper/moduleFederation';
2
+ import type { MFRuntime, MFSDK } from '../helper/moduleFederation';
3
+ export type Override<What, With> = Omit<What, keyof With> & With;
4
+ export type EMPShareRuntimeType = {
5
+ MFRuntime: Required<typeof MFRuntime>;
6
+ MFSDK: Required<typeof MFSDK>;
7
+ };
8
+ export type EMPShareRuntimeAdapterReactType = {
9
+ React?: any;
10
+ ReactDOM?: any;
11
+ createRoot?: any;
12
+ hydrateRoot?: any;
13
+ scope: string;
14
+ };
15
+ export type EMPShareRuntimeAdapterVueType = {
16
+ Vue?: any;
17
+ VueRouter?: any;
18
+ Pinia?: any;
19
+ scope: string;
20
+ };
21
+ export type InitOptionsType = Parameters<typeof MFRuntime.init>[0];
22
+ export type LoadRemoteType = Parameters<typeof MFRuntime.loadRemote>;
23
+ export type FrameworkType = 'react' | 'vue' | 'vue2' | 'angular';
24
+ export type EmpRuntimeOptions = {
25
+ showLog?: boolean;
26
+ };