@empjs/share 3.13.4 → 3.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forceRemote.cjs +2 -0
- package/dist/forceRemote.cjs.map +1 -0
- package/dist/forceRemote.d.cts +7 -0
- package/dist/forceRemote.d.ts +7 -0
- package/dist/forceRemote.js +2 -0
- package/dist/forceRemote.js.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.cjs.map +1 -1
- package/dist/rspack.d.cts +4 -110
- package/dist/rspack.d.ts +4 -110
- package/dist/rspack.js +2 -2
- package/dist/rspack.js.map +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +1 -1
- package/dist/runtime.js.map +1 -1
- package/dist/types-BGnQUQ0O.d.cts +157 -0
- package/dist/types-BGnQUQ0O.d.ts +157 -0
- package/output/sdk.js +1 -1
- package/package.json +14 -4
- package/output/wSdk.js +0 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { ModuleFederationPlugin } from '@empjs/module-federation-rspack';
|
|
2
|
+
|
|
3
|
+
type ModuleFederationPluginOptions = ConstructorParameters<typeof ModuleFederationPlugin>[0];
|
|
4
|
+
type EMPSHARERuntimeOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* 兼容 emp2.0 shareLib 配置
|
|
7
|
+
*/
|
|
8
|
+
shareLib?: {
|
|
9
|
+
[key: string]: string | string[] | {
|
|
10
|
+
entry: string;
|
|
11
|
+
global: string;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* UI框架 全局命名
|
|
17
|
+
*/
|
|
18
|
+
frameworkGlobal?: string;
|
|
19
|
+
/**
|
|
20
|
+
* MFRuntime 远程地址
|
|
21
|
+
*/
|
|
22
|
+
runtimeLib?: string | 'useFrameworkLib';
|
|
23
|
+
runtime?: runtimeLibType;
|
|
24
|
+
/**
|
|
25
|
+
* MFRuntime 全局命名
|
|
26
|
+
*/
|
|
27
|
+
runtimeGlobal?: string;
|
|
28
|
+
setExternals?: (o: any, frameworkGlobal: string, runtimeGlobal?: string) => void;
|
|
29
|
+
injectGlobalValToHtml?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 快捷设置 external 默认为 react
|
|
32
|
+
*/
|
|
33
|
+
framework?: 'react' | 'vue2' | 'vue' | frameworkOptions;
|
|
34
|
+
/**
|
|
35
|
+
* UI框架 远程地址 统一规范 或者 dev prod 分离都支持
|
|
36
|
+
*/
|
|
37
|
+
frameworkLib?: frameworLibType;
|
|
38
|
+
};
|
|
39
|
+
type runtimeLibType = {
|
|
40
|
+
/**
|
|
41
|
+
* MFRuntime 地址
|
|
42
|
+
*/
|
|
43
|
+
lib: string;
|
|
44
|
+
/**
|
|
45
|
+
* MFRuntime 全局命名
|
|
46
|
+
*/
|
|
47
|
+
global?: string;
|
|
48
|
+
};
|
|
49
|
+
type frameworLibType = string | {
|
|
50
|
+
dev: string;
|
|
51
|
+
prod: string;
|
|
52
|
+
};
|
|
53
|
+
type frameworkOptions = {
|
|
54
|
+
/**
|
|
55
|
+
* 框架名称
|
|
56
|
+
*/
|
|
57
|
+
name?: 'react' | 'vue' | 'none';
|
|
58
|
+
/**
|
|
59
|
+
* 框架版本
|
|
60
|
+
*/
|
|
61
|
+
version?: number;
|
|
62
|
+
/**
|
|
63
|
+
* 框架入口 默认 runtime
|
|
64
|
+
*/
|
|
65
|
+
entry?: string;
|
|
66
|
+
/**
|
|
67
|
+
* umd lib name
|
|
68
|
+
* 与 frameworkGlobal 相同 可以只设置一个
|
|
69
|
+
*/
|
|
70
|
+
global: string;
|
|
71
|
+
/**
|
|
72
|
+
* UI框架 远程地址 统一规范 或者 dev prod 分离都支持
|
|
73
|
+
* 与 frameworkLib 相同 可以只设置一个
|
|
74
|
+
*/
|
|
75
|
+
lib?: frameworLibType;
|
|
76
|
+
/**
|
|
77
|
+
* UI框架 全量导入 支持多个js导入
|
|
78
|
+
*/
|
|
79
|
+
libs?: string[];
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* runtime beforeRegisterRemote 收到的 remote 对象结构(与 @module-federation/runtime Remote 兼容)
|
|
83
|
+
*/
|
|
84
|
+
type RemoteInfoForForce = {
|
|
85
|
+
/** 唯一标识,如 @nova/bigolive-common,用于匹配 forceRemotes key(优先于 name) */
|
|
86
|
+
alias?: string;
|
|
87
|
+
/** 占位名,如 $1,可能重名;插件会为占位名生成唯一 name */
|
|
88
|
+
name?: string;
|
|
89
|
+
/** 入口地址(与 url、manifest 三选一) */
|
|
90
|
+
entry?: string;
|
|
91
|
+
url?: string;
|
|
92
|
+
manifest?: string;
|
|
93
|
+
/** 版本(可选);若缺失则从 entry/url/manifest 中解析 */
|
|
94
|
+
version?: string;
|
|
95
|
+
externalType?: string;
|
|
96
|
+
shareScope?: string;
|
|
97
|
+
type?: string;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* 单项配置:仅替换 URL 中 `key@oldVer` 的版本部分
|
|
101
|
+
* @example "17.0.0"
|
|
102
|
+
*/
|
|
103
|
+
type ForceRemoteVersion = string;
|
|
104
|
+
/**
|
|
105
|
+
* 单项配置:显式指定仅替换版本(与 string 等价,便于扩展)
|
|
106
|
+
* @example { version: "17.0.0" }
|
|
107
|
+
*/
|
|
108
|
+
type ForceRemoteVersionOption = {
|
|
109
|
+
version: string;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* 单项配置:整入口替换(key 匹配 remote 的 alias 或 name 时生效,直接替换该 remote 的 entry/url/manifest)
|
|
113
|
+
* 匹配时优先用 alias(唯一标识,如 @nova/bigolive-common),避免 name 为 $1 等占位符导致重名
|
|
114
|
+
* @example { entry: "https://cdn.example.com/app1.js" }
|
|
115
|
+
*/
|
|
116
|
+
type ForceRemoteEntryOption = {
|
|
117
|
+
entry: string;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* forceRemotes 每项:版本替换 或 整入口替换
|
|
121
|
+
* - string / { version }:对所有 remote 的 entry/url/manifest 中 `key@xxx` 做版本替换
|
|
122
|
+
* - { entry }:key 为 remote 的 alias(优先)或 name 时,对该 remote 做整入口替换
|
|
123
|
+
*/
|
|
124
|
+
type ForceRemoteItem = ForceRemoteVersion | ForceRemoteVersionOption | ForceRemoteEntryOption;
|
|
125
|
+
type ForceRemoteOptions = Record<string, ForceRemoteItem>;
|
|
126
|
+
type EMPPluginShareType = ModuleFederationPluginOptions & {
|
|
127
|
+
empRuntime?: EMPSHARERuntimeOptions;
|
|
128
|
+
forceRemotes?: ForceRemoteOptions;
|
|
129
|
+
};
|
|
130
|
+
type ExternalsItemType = {
|
|
131
|
+
/**
|
|
132
|
+
* 模块名
|
|
133
|
+
* @example react-dom
|
|
134
|
+
*/
|
|
135
|
+
module?: string;
|
|
136
|
+
/**
|
|
137
|
+
* 全局变量
|
|
138
|
+
* @example ReactDom
|
|
139
|
+
*/
|
|
140
|
+
global?: string;
|
|
141
|
+
/**
|
|
142
|
+
* 入口地址
|
|
143
|
+
* 不填则可以通过 emp-config 里的 html.files.js[url] 传入合并后的请求
|
|
144
|
+
* 如 http://...?react&react-dom&react-router&mobx
|
|
145
|
+
* @example http://
|
|
146
|
+
*/
|
|
147
|
+
entry?: string;
|
|
148
|
+
/**
|
|
149
|
+
* 类型入口
|
|
150
|
+
* @default js
|
|
151
|
+
* @enum js | css
|
|
152
|
+
* @example css
|
|
153
|
+
*/
|
|
154
|
+
type?: string;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type { EMPPluginShareType as E, ForceRemoteVersion as F, ModuleFederationPluginOptions as M, RemoteInfoForForce as R, EMPSHARERuntimeOptions as a, frameworkOptions as b, ForceRemoteVersionOption as c, ForceRemoteEntryOption as d, ForceRemoteItem as e, frameworLibType as f, ForceRemoteOptions as g, ExternalsItemType as h, runtimeLibType as r };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { ModuleFederationPlugin } from '@empjs/module-federation-rspack';
|
|
2
|
+
|
|
3
|
+
type ModuleFederationPluginOptions = ConstructorParameters<typeof ModuleFederationPlugin>[0];
|
|
4
|
+
type EMPSHARERuntimeOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* 兼容 emp2.0 shareLib 配置
|
|
7
|
+
*/
|
|
8
|
+
shareLib?: {
|
|
9
|
+
[key: string]: string | string[] | {
|
|
10
|
+
entry: string;
|
|
11
|
+
global: string;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* UI框架 全局命名
|
|
17
|
+
*/
|
|
18
|
+
frameworkGlobal?: string;
|
|
19
|
+
/**
|
|
20
|
+
* MFRuntime 远程地址
|
|
21
|
+
*/
|
|
22
|
+
runtimeLib?: string | 'useFrameworkLib';
|
|
23
|
+
runtime?: runtimeLibType;
|
|
24
|
+
/**
|
|
25
|
+
* MFRuntime 全局命名
|
|
26
|
+
*/
|
|
27
|
+
runtimeGlobal?: string;
|
|
28
|
+
setExternals?: (o: any, frameworkGlobal: string, runtimeGlobal?: string) => void;
|
|
29
|
+
injectGlobalValToHtml?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 快捷设置 external 默认为 react
|
|
32
|
+
*/
|
|
33
|
+
framework?: 'react' | 'vue2' | 'vue' | frameworkOptions;
|
|
34
|
+
/**
|
|
35
|
+
* UI框架 远程地址 统一规范 或者 dev prod 分离都支持
|
|
36
|
+
*/
|
|
37
|
+
frameworkLib?: frameworLibType;
|
|
38
|
+
};
|
|
39
|
+
type runtimeLibType = {
|
|
40
|
+
/**
|
|
41
|
+
* MFRuntime 地址
|
|
42
|
+
*/
|
|
43
|
+
lib: string;
|
|
44
|
+
/**
|
|
45
|
+
* MFRuntime 全局命名
|
|
46
|
+
*/
|
|
47
|
+
global?: string;
|
|
48
|
+
};
|
|
49
|
+
type frameworLibType = string | {
|
|
50
|
+
dev: string;
|
|
51
|
+
prod: string;
|
|
52
|
+
};
|
|
53
|
+
type frameworkOptions = {
|
|
54
|
+
/**
|
|
55
|
+
* 框架名称
|
|
56
|
+
*/
|
|
57
|
+
name?: 'react' | 'vue' | 'none';
|
|
58
|
+
/**
|
|
59
|
+
* 框架版本
|
|
60
|
+
*/
|
|
61
|
+
version?: number;
|
|
62
|
+
/**
|
|
63
|
+
* 框架入口 默认 runtime
|
|
64
|
+
*/
|
|
65
|
+
entry?: string;
|
|
66
|
+
/**
|
|
67
|
+
* umd lib name
|
|
68
|
+
* 与 frameworkGlobal 相同 可以只设置一个
|
|
69
|
+
*/
|
|
70
|
+
global: string;
|
|
71
|
+
/**
|
|
72
|
+
* UI框架 远程地址 统一规范 或者 dev prod 分离都支持
|
|
73
|
+
* 与 frameworkLib 相同 可以只设置一个
|
|
74
|
+
*/
|
|
75
|
+
lib?: frameworLibType;
|
|
76
|
+
/**
|
|
77
|
+
* UI框架 全量导入 支持多个js导入
|
|
78
|
+
*/
|
|
79
|
+
libs?: string[];
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* runtime beforeRegisterRemote 收到的 remote 对象结构(与 @module-federation/runtime Remote 兼容)
|
|
83
|
+
*/
|
|
84
|
+
type RemoteInfoForForce = {
|
|
85
|
+
/** 唯一标识,如 @nova/bigolive-common,用于匹配 forceRemotes key(优先于 name) */
|
|
86
|
+
alias?: string;
|
|
87
|
+
/** 占位名,如 $1,可能重名;插件会为占位名生成唯一 name */
|
|
88
|
+
name?: string;
|
|
89
|
+
/** 入口地址(与 url、manifest 三选一) */
|
|
90
|
+
entry?: string;
|
|
91
|
+
url?: string;
|
|
92
|
+
manifest?: string;
|
|
93
|
+
/** 版本(可选);若缺失则从 entry/url/manifest 中解析 */
|
|
94
|
+
version?: string;
|
|
95
|
+
externalType?: string;
|
|
96
|
+
shareScope?: string;
|
|
97
|
+
type?: string;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* 单项配置:仅替换 URL 中 `key@oldVer` 的版本部分
|
|
101
|
+
* @example "17.0.0"
|
|
102
|
+
*/
|
|
103
|
+
type ForceRemoteVersion = string;
|
|
104
|
+
/**
|
|
105
|
+
* 单项配置:显式指定仅替换版本(与 string 等价,便于扩展)
|
|
106
|
+
* @example { version: "17.0.0" }
|
|
107
|
+
*/
|
|
108
|
+
type ForceRemoteVersionOption = {
|
|
109
|
+
version: string;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* 单项配置:整入口替换(key 匹配 remote 的 alias 或 name 时生效,直接替换该 remote 的 entry/url/manifest)
|
|
113
|
+
* 匹配时优先用 alias(唯一标识,如 @nova/bigolive-common),避免 name 为 $1 等占位符导致重名
|
|
114
|
+
* @example { entry: "https://cdn.example.com/app1.js" }
|
|
115
|
+
*/
|
|
116
|
+
type ForceRemoteEntryOption = {
|
|
117
|
+
entry: string;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* forceRemotes 每项:版本替换 或 整入口替换
|
|
121
|
+
* - string / { version }:对所有 remote 的 entry/url/manifest 中 `key@xxx` 做版本替换
|
|
122
|
+
* - { entry }:key 为 remote 的 alias(优先)或 name 时,对该 remote 做整入口替换
|
|
123
|
+
*/
|
|
124
|
+
type ForceRemoteItem = ForceRemoteVersion | ForceRemoteVersionOption | ForceRemoteEntryOption;
|
|
125
|
+
type ForceRemoteOptions = Record<string, ForceRemoteItem>;
|
|
126
|
+
type EMPPluginShareType = ModuleFederationPluginOptions & {
|
|
127
|
+
empRuntime?: EMPSHARERuntimeOptions;
|
|
128
|
+
forceRemotes?: ForceRemoteOptions;
|
|
129
|
+
};
|
|
130
|
+
type ExternalsItemType = {
|
|
131
|
+
/**
|
|
132
|
+
* 模块名
|
|
133
|
+
* @example react-dom
|
|
134
|
+
*/
|
|
135
|
+
module?: string;
|
|
136
|
+
/**
|
|
137
|
+
* 全局变量
|
|
138
|
+
* @example ReactDom
|
|
139
|
+
*/
|
|
140
|
+
global?: string;
|
|
141
|
+
/**
|
|
142
|
+
* 入口地址
|
|
143
|
+
* 不填则可以通过 emp-config 里的 html.files.js[url] 传入合并后的请求
|
|
144
|
+
* 如 http://...?react&react-dom&react-router&mobx
|
|
145
|
+
* @example http://
|
|
146
|
+
*/
|
|
147
|
+
entry?: string;
|
|
148
|
+
/**
|
|
149
|
+
* 类型入口
|
|
150
|
+
* @default js
|
|
151
|
+
* @enum js | css
|
|
152
|
+
* @example css
|
|
153
|
+
*/
|
|
154
|
+
type?: string;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type { EMPPluginShareType as E, ForceRemoteVersion as F, ModuleFederationPluginOptions as M, RemoteInfoForForce as R, EMPSHARERuntimeOptions as a, frameworkOptions as b, ForceRemoteVersionOption as c, ForceRemoteEntryOption as d, ForceRemoteItem as e, frameworLibType as f, ForceRemoteOptions as g, ExternalsItemType as h, runtimeLibType as r };
|
package/output/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var EMP_SHARE_RUNTIME=function(exports){"use strict";var Rt=Object.defineProperty,mr=Object.defineProperties,yr=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,bt=(e,t,r)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))St.call(t,r)&&bt(e,r,t[r]);if(_e)for(var r of _e(t))It.call(t,r)&&bt(e,r,t[r]);return e},L=(e,t)=>mr(e,yr(t)),Ge=(e,t)=>{var r={};for(var n in e)St.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&_e)for(var n of _e(e))t.indexOf(n)<0&&It.call(e,n)&&(r[n]=e[n]);return r},$t=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},E=(e,t,r)=>new Promise((n,o)=>{var i=e=>{try{l(r.next(e))}catch(e){o(e)}},s=e=>{try{l(r.throw(e))}catch(e){o(e)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,s);l((r=r.apply(e,t)).next())}),gt={};$t(gt,{Module:()=>se,ModuleFederation:()=>J,createInstance:()=>pr,getInstance:()=>co,getRemoteEntry:()=>oe,getRemoteInfo:()=>me,init:()=>to,loadRemote:()=>ro,loadScript:()=>Z,loadScriptNode:()=>Q,loadShare:()=>no,loadShareSync:()=>oo,preloadRemote:()=>so,registerGlobalPlugins:()=>Yt,registerPlugins:()=>ao,registerRemotes:()=>io,registerShared:()=>lo});var Je={};$t(Je,{BROWSER_LOG_KEY:()=>Nt,ENCODE_NAME_PREFIX:()=>br,EncodedNameTransformMap:()=>ge,FederationModuleManifest:()=>_r,MANIFEST_EXT:()=>We,MFModuleType:()=>Er,MFPrefetchCommon:()=>Sr,MODULE_DEVTOOL_IDENTIFIER:()=>gr,ManifestFileName:()=>je,NameTransformMap:()=>H,NameTransformSymbol:()=>A,SEPARATOR:()=>Ke,StatsFileName:()=>Ve,TEMP_DIR:()=>Rr,assert:()=>Lr,bindLoggerToCompiler:()=>Cr,composeKeyWithSeparator:()=>Se,containerPlugin:()=>Ir,containerReferencePlugin:()=>$r,createInfrastructureLogger:()=>Mt,createLink:()=>ue,createLogger:()=>Te,createModuleFederationConfig:()=>Vr,createScript:()=>we,createScriptNode:()=>Ft,decodeName:()=>Pr,encodeName:()=>qe,error:()=>At,generateExposeFilename:()=>Or,generateShareFilename:()=>Mr,generateSnapshotFromManifest:()=>ze,getManifestFileName:()=>Dr,getProcessEnv:()=>Tt,getResourceUrl:()=>le,inferAutoPublicPath:()=>Pt,infrastructureLogger:()=>Gr,isBrowserEnv:()=>j,isDebugMode:()=>ce,isManifestProvider:()=>Ne,isReactNativeEnv:()=>Re,isRequiredVersion:()=>vr,isStaticResourcesEqual:()=>Ye,loadScript:()=>Z,loadScriptNode:()=>Q,logger:()=>xr,moduleFederationPlugin:()=>Nr,normalizeOptions:()=>jr,parseEntry:()=>Ar,safeToString:()=>$e,safeWrapper:()=>Xe,sharePlugin:()=>Tr,simpleJoinRemoteEntry:()=>X,warn:()=>Ie});var _r="federation-manifest.json",We=".json",Nt="FEDERATION_DEBUG",A={AT:"@",HYPHEN:"-",SLASH:"/"},H={[A.AT]:"scope_",[A.HYPHEN]:"_",[A.SLASH]:"__"},ge={[H[A.AT]]:A.AT,[H[A.HYPHEN]]:A.HYPHEN,[H[A.SLASH]]:A.SLASH},Ke=":",je="mf-manifest.json",Ve="mf-stats.json",Er={NPM:"npm",APP:"app"},gr="__MF_DEVTOOLS_MODULE_INFO__",br="ENCODE_NAME_PREFIX",Rr=".federation",Sr={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"},Ir=Object.freeze({__proto__:null}),$r=Object.freeze({__proto__:null}),Nr=Object.freeze({__proto__:null}),Tr=Object.freeze({__proto__:null});function j(){return"undefined"!=typeof window&&void 0!==window.document}function Re(){return"undefined"!=typeof navigator&&"ReactNative"===(null==navigator?void 0:navigator.product)}function wr(){try{if(j()&&window.localStorage)return!!localStorage.getItem(Nt)}catch(e){return!1}return!1}function ce(){return"undefined"!=typeof process&&process.env,wr()}var Tt=function(){return"undefined"!=typeof process&&process.env?process.env:{}},wt="[ Federation Runtime ]",Ar=(e,t,r=Ke)=>{let n=e.split(r),o="development"===Tt().NODE_ENV&&t,i=e=>e.startsWith("http")||e.includes(We);if(n.length>=2){let[t,...s]=n;e.startsWith(r)&&(t=n.slice(0,2).join(r),s=[o||n.slice(2).join(r)]);let l=o||s.join(r);return i(l)?{name:t,entry:l}:{name:t,version:l||"*"}}if(1===n.length){let[e]=n;return o&&i(o)?{name:e,entry:o}:{name:e,version:o||"*"}}throw`Invalid entry value: ${e}`},Se=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}${Ke}${t}`:t:e,""):""},qe=function(e,t="",r=!1){try{let n=r?".js":"";return`${t}${e.replace(new RegExp(`${A.AT}`,"g"),H[A.AT]).replace(new RegExp(`${A.HYPHEN}`,"g"),H[A.HYPHEN]).replace(new RegExp(`${A.SLASH}`,"g"),H[A.SLASH])}${n}`}catch(e){throw e}},Pr=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(new RegExp(t,"g"),"")}return n=n.replace(new RegExp(`${H[A.AT]}`,"g"),ge[H[A.AT]]).replace(new RegExp(`${H[A.SLASH]}`,"g"),ge[H[A.SLASH]]).replace(new RegExp(`${H[A.HYPHEN]}`,"g"),ge[H[A.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(e){throw e}},Or=(e,t)=>{if(!e)return"";let r=e;return"."===r&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),qe(r,"__federation_expose_",t)},Mr=(e,t)=>e?qe(e,"__federation_shared_",t):"",le=(e,t)=>{if("getPublicPath"in e){let r;return r=e.getPublicPath.startsWith("function")?new Function("return "+e.getPublicPath)()():new Function(e.getPublicPath)(),`${r}${t}`}return"publicPath"in e?j()||Re()||!("ssrPublicPath"in e)?`${e.publicPath}${t}`:`${e.ssrPublicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},Lr=(e,t)=>{e||At(t)},At=e=>{throw new Error(`${wt}: ${e}`)},Ie=e=>{console.warn(`${wt}: ${e}`)};function $e(e){try{return JSON.stringify(e,null,2)}catch(e){return""}}var Fr=/^([\d^=v<>~]|[*xX]$)/;function vr(e){return Fr.test(e)}var X=(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 Pt(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function ze(e,t={}){var r,n,o;let i,{remotes:s={},overrides:l={},version:a}=t,u=()=>"publicPath"in e.metaData?"auto"===e.metaData.publicPath&&a?Pt(a):e.metaData.publicPath:e.metaData.getPublicPath,c=Object.keys(l),h={};Object.keys(s).length||(h=(null==(r=e.remotes)?void 0:r.reduce((e,t)=>{let r,n=t.federationContainerName;return r=c.includes(n)?l[n]:"version"in t?t.version:t.entry,e[n]={matchedVersion:r},e},{}))||{}),Object.keys(s).forEach(e=>h[e]={matchedVersion:c.includes(e)?l[e]:s[e]});let{remoteEntry:{path:f,name:m,type:d},types:p={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:y},globalName:E,ssrRemoteEntry:_}=e.metaData,{exposes:g}=e,b={version:a||"",buildVersion:y,globalName:E,remoteEntry:X(f,m),remoteEntryType:d,remoteTypes:X(p.path,p.name),remoteTypesZip:p.zip||"",remoteTypesAPI:p.api||"",remotesInfo:h,shared:null==e?void 0:e.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version})),modules:null==g?void 0:g.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(null!=(n=e.metaData)&&n.prefetchInterface){let t=e.metaData.prefetchInterface;b=L(S({},b),{prefetchInterface:t})}if(null!=(o=e.metaData)&&o.prefetchEntry){let{path:t,name:r,type:n}=e.metaData.prefetchEntry;b=L(S({},b),{prefetchEntry:X(t,r),prefetchEntryType:n})}if(i="publicPath"in e.metaData?L(S({},b),{publicPath:u(),ssrPublicPath:e.metaData.ssrPublicPath}):L(S({},b),{getPublicPath:u()}),_){let e=X(_.path,_.name);i.ssrRemoteEntry=e,i.ssrRemoteEntryType=_.type||"commonjs-module"}return i}function Ne(e){return!(!("remoteEntry"in e)||!e.remoteEntry.includes(We))}function Dr(e){if(!e)return{statsFileName:Ve,manifestFileName:je};let t="boolean"==typeof e?"":e.filePath||"",r="boolean"==typeof e?"":e.fileName||"",n=".json",o=r?(s=r).endsWith(n)?s:`${s}${n}`:je,i=r?((e,t)=>e.replace(n,`${t}${n}`))(o,"-stats"):Ve;var s;return{statsFileName:X(t,i),manifestFileName:X(t,o)}}var Ot="[ Module Federation ]",ie=console,kr=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Hr(){try{let e=(new Error).stack;if(!e)return;let[,...t]=e.split("\n"),r=t.filter(e=>!kr.some(t=>e.includes(t)));return r.length?`Stack trace:\n${r.slice(0,5).join("\n")}`:void 0}catch(e){return}}var be=class{constructor(e,t=ie){this.prefix=e,this.delegate=null!=t?t:ie}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=null!=e?e:ie}emit(e,t){let r=this.delegate,n=ce()?Hr():void 0,o=n?[...t,n]: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,...o)}for(let e of i){let t=ie[e];if("function"==typeof t)return void t.call(ie,this.prefix,...o)}}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){ce()&&this.emit("debug",e)}};function Te(e){return new be(e)}function Mt(e){let t=new be(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function Cr(e,t,r){if(e.__mf_infrastructure_logger__&&null!=t&&t.getInfrastructureLogger)try{let n=t.getInfrastructureLogger(r);n&&"object"==typeof n&&("function"==typeof n.log||"function"==typeof n.info||"function"==typeof n.warn||"function"==typeof n.error)&&e.setDelegate(n)}catch(t){e.setDelegate(void 0)}}var xr=Te(Ot),Gr=Mt(Ot);function Xe(e,t){return E(this,null,function*(){try{return yield e()}catch(e){return void(!t&&Ie(e))}})}function Ye(e,t){let r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function we(e){let t,r=null,n=!0,o=2e4,i=document.getElementsByTagName("script");for(let t=0;t<i.length;t++){let o=i[t],s=o.getAttribute("src");if(s&&Ye(s,e.url)){r=o,n=!1;break}}if(!r){let t,n=e.attrs;r=document.createElement("script"),r.type="module"===(null==n?void 0:n.type)?"module":"text/javascript",e.createScriptHook&&(t=e.createScriptHook(e.url,e.attrs),t instanceof HTMLScriptElement?r=t:"object"==typeof t&&("script"in t&&t.script&&(r=t.script),"timeout"in t&&t.timeout&&(o=t.timeout))),r.src||(r.src=e.url),n&&!t&&Object.keys(n).forEach(e=>{r&&("async"===e||"defer"===e?r[e]=n[e]:r.getAttribute(e)||r.setAttribute(e,n[e]))})}let s=(n,o)=>E(null,null,function*(){clearTimeout(t);let i=()=>{"error"===(null==o?void 0:o.type)?null!=e&&e.onErrorCallback&&(null==e||e.onErrorCallback(o)):null!=e&&e.cb&&(null==e||e.cb())};if(r&&(r.onerror=null,r.onload=null,Xe(()=>{let{needDeleteScript:t=!0}=e;t&&null!=r&&r.parentNode&&r.parentNode.removeChild(r)}),n&&"function"==typeof n)){let e=n(o);if(e instanceof Promise){let t=yield e;return i(),t}return i(),e}i()});return r.onerror=s.bind(null,r.onerror),r.onload=s.bind(null,r.onload),t=setTimeout(()=>{s(null,new Error(`Remote script "${e.url}" time-outed.`))},o),{script:r,needAttach:n}}function ue(e){let t=null,r=!0,n=document.getElementsByTagName("link");for(let o=0;o<n.length;o++){let i=n[o],s=i.getAttribute("href"),l=i.getAttribute("rel");if(s&&Ye(s,e.url)&&l===e.attrs.rel){t=i,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let r,n=e.attrs;e.createLinkHook&&(r=e.createLinkHook(e.url,n),r instanceof HTMLLinkElement&&(t=r)),n&&!r&&Object.keys(n).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,n[e])})}let o=(r,n)=>{let o=()=>{"error"===(null==n?void 0:n.type)?null!=e&&e.onErrorCallback&&(null==e||e.onErrorCallback(n)):null!=e&&e.cb&&(null==e||e.cb())};if(t&&(t.onerror=null,t.onload=null,Xe(()=>{let{needDeleteLink:r=!0}=e;r&&null!=t&&t.parentNode&&t.parentNode.removeChild(t)}),r)){let e=r(n);return o(),e}o()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function Z(e,t){let{attrs:r={},createScriptHook:n}=t;return new Promise((t,o)=>{let{script:i,needAttach:s}=we({url:e,cb:t,onErrorCallback:o,attrs:S({fetchpriority:"high"},r),createScriptHook:n,needDeleteScript:!0});s&&document.head.appendChild(i)})}var Ee=new Map;function ae(e){if(!e)throw new Error("import specifier is required");if(Ee.has(e))return Ee.get(e);let t=new Function("name","return import(name)")(e).then(e=>e).catch(t=>{throw console.error(`Error importing module ${e}:`,t),Ee.delete(e),t});return Ee.set(e,t),t}var Lt=()=>E(null,null,function*(){let e=yield ae("node-fetch");return e.default||e}),Ur=(e,t,r)=>E(null,null,function*(){let n=yield(o=e,i=t||{},r.lifecycle.fetch.emit(o,i));var o,i;return n&&n instanceof Response?n:("undefined"==typeof fetch?yield Lt():fetch)(e,t||{})}),Ft="undefined"==typeof ENV_TARGET||"web"!==ENV_TARGET?(url,cb,attrs,loaderHook)=>{if(null!=loaderHook&&loaderHook.createScriptHook){let e=loaderHook.createScriptHook(url);e&&"object"==typeof e&&"url"in e&&(url=e.url)}let urlObj;try{urlObj=new URL(url)}catch(e){return console.error("Error constructing URL:",e),void cb(new Error(`Invalid URL: ${e}`))}let getFetch=()=>E(null,null,function*(){return null!=loaderHook&&loaderHook.fetch?(e,t)=>Ur(e,t,loaderHook):"undefined"==typeof fetch?Lt():fetch}),handleScriptFetch=(f,urlObj)=>E(null,null,function*(){var t,e;try{let res=yield f(urlObj.href),data=yield res.text(),[path,vm]=yield Promise.all([ae("path"),ae("vm")]),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) {${data}\n})`,{filename:filename,importModuleDynamically:null!=(e=null==(t=vm.constants)?void 0:t.USE_MAIN_CONTEXT_DEFAULT_LOADER)?e:ae});script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename);let exportedInterface=scriptContext.module.exports||scriptContext.exports;if(attrs&&exportedInterface&&attrs.globalName){let e=exportedInterface[attrs.globalName]||exportedInterface;return void cb(void 0,e)}cb(void 0,exportedInterface)}catch(e){cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))}});getFetch().then(e=>E(null,null,function*(){if("esm"===(null==attrs?void 0:attrs.type)||"module"===(null==attrs?void 0:attrs.type))return Be(urlObj.href,{fetch:e,vm:yield ae("vm")}).then(e=>E(null,null,function*(){yield e.evaluate(),cb(void 0,e.namespace)})).catch(e=>{cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))});handleScriptFetch(e,urlObj)})).catch(e=>{cb(e)})}:(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},Q="undefined"==typeof ENV_TARGET||"web"!==ENV_TARGET?(e,t)=>new Promise((r,n)=>{Ft(e,(e,o)=>{var i,s;if(e)n(e);else{let e=(null==(i=null==t?void 0:t.attrs)?void 0:i.globalName)||`__FEDERATION_${null==(s=null==t?void 0:t.attrs)?void 0:s.name}:custom__`,n=globalThis[e]=o;r(n)}},t.attrs,t.loaderHook)}):(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")},Ue=new Map;function Be(e,t){return E(this,null,function*(){if(Ue.has(e))return Ue.get(e);let{fetch:r,vm:n}=t,o=yield(yield r(e)).text(),i=new n.SourceTextModule(o,{importModuleDynamically:(r,n)=>E(null,null,function*(){return Be(new URL(r,e).href,t)})});return Ue.set(e,i),yield i.link(r=>E(null,null,function*(){let n=new URL(r,e).href;return yield Be(n,t)})),i})}function jr(e,t,r){return function(n){if(!1===n)return!1;if(void 0===n)return!!e&&t;if(!0===n)return t;if(n&&"object"==typeof n)return S(S({},t),n);throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}var Vr=e=>e,Ze="RUNTIME-001",Qe="RUNTIME-002",et="RUNTIME-003",tt="RUNTIME-004",rt="RUNTIME-005",Ae="RUNTIME-006",nt="RUNTIME-007",Pe="RUNTIME-008",q="RUNTIME-009",Br="TYPE-001",Wr="BUILD-001",Kr="BUILD-002",qr=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}/${e}`,F=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(qr(e)),n&&o.push(`Original Error Message:\n ${n}`),o.join("\n")},M={[Ze]:"Failed to get remoteEntry exports.",[Qe]:'The remote entry interface does not contain "init"',[et]:"Failed to get manifest.",[tt]:"Failed to locate remote.",[rt]:"Invalid loadShareSync function call from bundler runtime",[Ae]:"Invalid loadShareSync function call from runtime",[nt]:"Failed to get remote snapshot.",[Pe]:"Failed to load script resources.",[q]:"Please call createInstance first."},zr={[Br]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Xr={[Wr]:"Failed to find expose module.",[Kr]:"PublicPath is required in prod mode."};S(S(S({},M),zr),Xr);var te="[ Federation Runtime ]",at=Te(te);function P(e,t){e||W(t)}function W(e){throw e instanceof Error?(e.message.startsWith(te)||(e.message=`${te}: ${e.message}`),e):new Error(`${te}: ${e}`)}function Ce(e){e instanceof Error&&(e.message.startsWith(te)||(e.message=`${te}: ${e.message}`)),at.warn(e)}function vt(e,t){return-1===e.findIndex(e=>e===t)&&e.push(t),e}function de(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function dt(e){return void 0!==e.entry}function Vt(e){return!e.entry.includes(".json")}function ht(e){return e&&"object"==typeof e}var Yr=Object.prototype.toString;function Jr(e){return"[object Object]"===Yr.call(e)}function Bt(e){return Array.isArray(e)?e:[e]}function Wt(e){let t={url:"",type:"global",globalName:""};return j()||Re()?"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 Zr=(e,t)=>{let r;return r=e.endsWith("/")?e.slice(0,-1):e,t.startsWith(".")&&(t=t.slice(1)),r+=t,r},O="object"==typeof globalThis?globalThis:window,G=(()=>{try{return document.defaultView}catch(e){return O}})(),he=G;function Me(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function Le(e,t){return Object.hasOwnProperty.call(e,t)}Le(O,"__GLOBAL_LOADING_REMOTE_ENTRY__")||Me(O,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});var ee=O.__GLOBAL_LOADING_REMOTE_ENTRY__;function Kt(e){var t,r,n,o,i,s;Le(e,"__VMOK__")&&!Le(e,"__FEDERATION__")&&Me(e,"__FEDERATION__",e.__VMOK__),Le(e,"__FEDERATION__")||(Me(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),Me(e,"__VMOK__",e.__FEDERATION__)),null!=(t=e.__FEDERATION__).__GLOBAL_PLUGIN__||(t.__GLOBAL_PLUGIN__=[]),null!=(r=e.__FEDERATION__).__INSTANCES__||(r.__INSTANCES__=[]),null!=(n=e.__FEDERATION__).moduleInfo||(n.moduleInfo={}),null!=(o=e.__FEDERATION__).__SHARE__||(o.__SHARE__={}),null!=(i=e.__FEDERATION__).__MANIFEST_LOADING__||(i.__MANIFEST_LOADING__={}),null!=(s=e.__FEDERATION__).__PRELOADED_MAP__||(s.__PRELOADED_MAP__=new Map)}function qt(e){O.__FEDERATION__.__INSTANCES__.push(e)}function zt(){return O.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Xt(e,t=ce()){t&&(O.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,O.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.22.0")}function re(e,t){if("string"==typeof t){if(e[t])return{value:e[t],key:t};{let r=Object.keys(e);for(let n of r){let[r,o]=n.split(":"),i=`${r}:${t}`,s=e[i];if(s)return{value:s,key:i}}return{value:void 0,key:t}}}throw new Error("key must be string")}Kt(O),Kt(G);var Dt=()=>G.__FEDERATION__.moduleInfo,Qr=(e,t)=>{let r=re(t,de(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 t=e,{version:r}=t,n=de(Ge(t,["version"])),o=re(G.__FEDERATION__.moduleInfo,n).value;if((null==o?void 0:o.version)===r)return o}},Fe=e=>Qr(e,G.__FEDERATION__.moduleInfo),kt=(e,t)=>{let r=de(e);return G.__FEDERATION__.moduleInfo[r]=t,G.__FEDERATION__.moduleInfo},en=e=>(G.__FEDERATION__.moduleInfo=S(S({},G.__FEDERATION__.moduleInfo),e),()=>{let t=Object.keys(e);for(let e of t)delete G.__FEDERATION__.moduleInfo[e]}),pt=(e,t)=>{let r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:O[r]}},Yt=e=>{let{__GLOBAL_PLUGIN__:t}=G.__FEDERATION__;e.forEach(e=>{-1===t.findIndex(t=>t.name===e.name)?t.push(e):Ce(`The plugin ${e.name} has been registered.`)})},tn=()=>G.__FEDERATION__.__GLOBAL_PLUGIN__,rn=e=>O.__FEDERATION__.__PRELOADED_MAP__.get(e),nn=e=>O.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),ye="default",Jt="global",Ht="[0-9A-Za-z-]+",mt=`(?:\\+(${Ht}(?:\\.${Ht})*))`,fe="0|[1-9]\\d*",ve="[0-9]+",Zt="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Ct=`(?:${ve}|${Zt})`,on=`(?:-?(${Ct}(?:\\.${Ct})*))`,xt=`(?:${fe}|${Zt})`,Qt=`(?:-(${xt}(?:\\.${xt})*))`,ot=`${fe}|x|X|\\*`,ne=`[v=\\s]*(${ot})(?:\\.(${ot})(?:\\.(${ot})(?:${Qt})?${mt}?)?)?`,sn=`^\\s*(${ne})\\s+-\\s+(${ne})\\s*$`,an=`(${ve})\\.(${ve})\\.(${ve})`,cn=`[v=\\s]*${an}${on}?${mt}?`,yt="((?:<|>)?=?)",ln=`(\\s*)${yt}\\s*(${cn}|${ne})`,er="(?:~>?)",un=`(\\s*)${er}\\s+`,tr="(?:\\^)",fn=`(\\s*)${tr}\\s+`,dn="(<|>)?=?\\s*\\*",hn=`^${tr}${ne}$`,pn=`(${fe})\\.(${fe})\\.(${fe})`,mn=`v?${pn}${Qt}?${mt}?`,yn=`^${er}${ne}$`,_n=`^${yt}\\s*${ne}$`,En=`^${yt}\\s*(${mn})$|^$`,gn="^\\s*>=\\s*0.0.0\\s*$";function K(e){return new RegExp(e)}function D(e){return!e||"x"===e.toLowerCase()||"*"===e}function rr(...e){return t=>e.reduce((e,t)=>t(e),t)}function Gt(e){return e.match(K(En))}function Ut(e,t,r,n){let o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}function bn(e){return e.replace(K(sn),(e,t,r,n,o,i,s,l,a,u,c,h)=>`${t=D(r)?"":D(n)?`>=${r}.0.0`:D(o)?`>=${r}.${n}.0`:`>=${t}`} ${l=D(a)?"":D(u)?`<${Number(a)+1}.0.0-0`:D(c)?`<${a}.${Number(u)+1}.0-0`:h?`<=${a}.${u}.${c}-${h}`:`<=${l}`}`.trim())}function Rn(e){return e.replace(K(ln),"$1$2$3")}function Sn(e){return e.replace(K(un),"$1~")}function In(e){return e.replace(K(fn),"$1^")}function $n(e){return e.trim().split(/\s+/).map(e=>e.replace(K(hn),(e,t,r,n,o)=>D(t)?"":D(r)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:D(n)?"0"===t?`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.0 <${Number(t)+1}.0.0-0`:o?"0"===t?"0"===r?`>=${t}.${r}.${n}-${o} <${t}.${r}.${Number(n)+1}-0`:`>=${t}.${r}.${n}-${o} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n}-${o} <${Number(t)+1}.0.0-0`:"0"===t?"0"===r?`>=${t}.${r}.${n} <${t}.${r}.${Number(n)+1}-0`:`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n} <${Number(t)+1}.0.0-0`)).join(" ")}function Nn(e){return e.trim().split(/\s+/).map(e=>e.replace(K(yn),(e,t,r,n,o)=>D(t)?"":D(r)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:D(n)?`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`:o?`>=${t}.${r}.${n}-${o} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`)).join(" ")}function Tn(e){return e.split(/\s+/).map(e=>e.trim().replace(K(_n),(e,t,r,n,o,i)=>{let s=D(r),l=s||D(n),a=l||D(o);return"="===t&&a&&(t=""),i="",s?">"===t||"<"===t?"<0.0.0-0":"*":t&&a?(l&&(n=0),o=0,">"===t?(t=">=",l?(r=Number(r)+1,n=0,o=0):(n=Number(n)+1,o=0)):"<="===t&&(t="<",l?r=Number(r)+1:n=Number(n)+1),"<"===t&&(i="-0"),`${t+r}.${n}.${o}${i}`):l?`>=${r}.0.0${i} <${Number(r)+1}.0.0-0`:a?`>=${r}.${n}.0${i} <${r}.${Number(n)+1}.0-0`:e})).join(" ")}function wn(e){return e.trim().replace(K(dn),"")}function An(e){return e.trim().replace(K(gn),"")}function De(e,t){return(e=Number(e)||e)>(t=Number(t)||t)?1:e===t?0:-1}function Pn(e,t){let{preRelease:r}=e,{preRelease:n}=t;if(void 0===r&&n)return 1;if(r&&void 0===n)return-1;if(void 0===r&&void 0===n)return 0;for(let e=0,t=r.length;e<=t;e++){let t=r[e],o=n[e];if(t!==o)return void 0===t&&void 0===o?0:t?o?De(t,o):-1:1}return 0}function Oe(e,t){return De(e.major,t.major)||De(e.minor,t.minor)||De(e.patch,t.patch)||Pn(e,t)}function st(e,t){return e.version===t.version}function On(e,t){switch(e.operator){case"":case"=":return st(e,t);case">":return Oe(e,t)<0;case">=":return st(e,t)||Oe(e,t)<0;case"<":return Oe(e,t)>0;case"<=":return st(e,t)||Oe(e,t)>0;case void 0:return!0;default:return!1}}function Mn(e){return rr($n,Nn,Tn,wn)(e)}function Ln(e){return rr(bn,Rn,Sn,In)(e.trim()).split(/\s+/).join(" ")}function ke(e,t){if(!e)return!1;let r=Gt(e);if(!r)return!1;let[,n,,o,i,s,l]=r,a={operator:n,version:Ut(o,i,s,l),major:o,minor:i,patch:s,preRelease:null==l?void 0:l.split(".")},u=t.split("||");for(let e of u){let t=e.trim();if(!t||"*"===t||"x"===t)return!0;try{let e=Ln(t);if(!e.trim())return!0;let r=e.split(" ").map(e=>Mn(e)).join(" ");if(!r.trim())return!0;let n=r.split(/\s+/).map(e=>An(e)).filter(Boolean);if(0===n.length)continue;let o=!0;for(let e of n){let t=Gt(e);if(!t){o=!1;break}let[,r,,n,i,s,l]=t;if(!On({operator:r,version:Ut(n,i,s,l),major:n,minor:i,patch:s,preRelease:null==l?void 0:l.split(".")},a)){o=!1;break}}if(o)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}function Fn(e,t,r,n){var o,i,s;let l;return l="get"in e?e.get:"lib"in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)}),L(S({deps:[],useIn:[],from:t,loading:null},e),{shareConfig:S({requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1},e.shareConfig),get:l,loaded:!!(null!=e&&e.loaded||"lib"in e)||void 0,version:null!=(o=e.version)?o:"0",scope:Array.isArray(e.scope)?e.scope:[null!=(i=e.scope)?i:"default"],strategy:(null!=(s=e.strategy)?s:n)||"version-first"})}function nr(e,t){let r=t.shared||{},n=t.name,o=Object.keys(r).reduce((e,o)=>{let i=Bt(r[o]);return e[o]=e[o]||[],i.forEach(r=>{e[o].push(Fn(r,n,o,t.shareStrategy))}),e},{}),i=S({},e.shared);return Object.keys(o).forEach(e=>{i[e]?o[e].forEach(t=>{i[e].find(e=>e.version===t.version)||i[e].push(t)}):i[e]=o[e]}),{shared:i,shareInfos:o}}function pe(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!!ke(r(e),`<=${r(t)}`)}var _t=(e,t)=>{let r=t||function(e,t){return pe(e,t)};return Object.keys(e).reduce((e,t)=>!e||r(e,t)||"0"===e?t:e,0)},Et=e=>!!e.loaded||"function"==typeof e.lib,vn=e=>!!e.loading;function Dn(e,t,r){let n=e[t][r];return _t(e[t][r],function(e,t){return!Et(n[e])&&pe(e,t)})}function kn(e,t,r){let n=e[t][r];return _t(e[t][r],function(e,t){let r=e=>Et(e)||vn(e);return r(n[t])?!r(n[e])||!!pe(e,t):!r(n[e])&&pe(e,t)})}function Hn(e){return"loaded-first"===e?kn:Dn}function He(e,t,r,n){if(!e)return;let{shareConfig:o,scope:i=ye,strategy:s}=r,l=Array.isArray(i)?i:[i];for(let i of l)if(o&&e[i]&&e[i][t]){let{requiredVersion:l}=o,a=Hn(s)(e,i,t),u=()=>{if(o.singleton){if("string"==typeof l&&!ke(a,l)){let n=`Version ${a} from ${a&&e[i][t][a].from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${l})`;o.strictVersion?W(n):Ce(n)}return e[i][t][a]}if(!1===l||"*"===l||ke(a,l))return e[i][t][a];for(let[r,n]of Object.entries(e[i][t]))if(ke(r,l))return n},c={shareScopeMap:e,scope:i,pkgName:t,version:a,GlobalFederation:he.__FEDERATION__,resolver:u};return(n.emit(c)||c).resolver()}}function or(){return he.__FEDERATION__.__SHARE__}function jt(e){var t;let{pkgName:r,extraOptions:n,shareInfos:o}=e,i=null!=(t=null==n?void 0:n.resolver)?t:e=>{if(!e)return;let t={};e.forEach(e=>{t[e.version]=e});let r=_t(t,function(e,r){return!Et(t[e])&&pe(e,r)});return t[r]};return Object.assign({},i(o[r]),null==n?void 0:n.customShareInfo)}function Cn(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}function xn(e,t){for(let r of e){let e=t.startsWith(r.name),n=t.replace(r.name,"");if(e){if(n.startsWith("/")){return n=`.${n}`,{pkgNameOrAlias:r.name,expose:n,remote:r}}if(""===n)return{pkgNameOrAlias:r.name,expose:".",remote:r}}let o=r.alias&&t.startsWith(r.alias),i=r.alias&&t.replace(r.alias,"");if(r.alias&&o){if(i&&i.startsWith("/")){return i=`.${i}`,{pkgNameOrAlias:r.alias,expose:i,remote:r}}if(""===i)return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Gn(e,t){for(let r of e)if(t===r.name||r.alias&&t===r.alias)return r}function Un(e,t){let r=tn(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(t=>{null!=e&&e.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{n.forEach(r=>{r.applyPlugin(e,t)})}),e}var sr=".then(callbacks[0]).catch(callbacks[1])";function jn(e){return E(this,arguments,function*({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):new Function("callbacks",`import("${e}")${sr}`)([r,n])}catch(e){n(e)}})})}function Vn(e){return E(this,arguments,function*({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):"undefined"==typeof __system_context__?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${sr}`)([r,n])}catch(e){n(e)}})})}function ir(e,t,r){let{remoteEntryKey:n,entryExports:o}=pt(e,t);return P(o,F(Ze,M,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n})),o}function Bn(e){return E(this,arguments,function*({name:e,globalName:t,entry:r,loaderHook:n,getEntryUrl:o}){let{entryExports:i}=pt(e,t);return i||Z(o?o(r):r,{attrs:{},createScriptHook:(e,t)=>{let r=n.lifecycle.createScript.emit({url:e,attrs:t});if(r&&(r instanceof HTMLScriptElement||"script"in r||"timeout"in r))return r}}).then(()=>ir(e,t,r)).catch(t=>{throw P(void 0,F(Pe,M,{remoteName:e,resourceUrl:r})),t})})}function Wn(e){return E(this,arguments,function*({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){let{entry:o,entryGlobalName:i,name:s,type:l}=e;switch(l){case"esm":case"module":return jn({entry:o,remoteEntryExports:t});case"system":return Vn({entry:o,remoteEntryExports:t});default:return Bn({entry:o,globalName:i,name:s,loaderHook:r,getEntryUrl:n})}})}function Kn(e){return E(this,arguments,function*({remoteInfo:e,loaderHook:t}){let{entry:r,entryGlobalName:n,name:o,type:i}=e,{entryExports:s}=pt(o,n);return s||Q(r,{attrs:{name:o,globalName:n,type:i},loaderHook:{createScriptHook:(e,r={})=>{let n=t.lifecycle.createScript.emit({url:e,attrs:r});if(n&&"url"in n)return n}}}).then(()=>ir(o,n,r)).catch(e=>{throw e})})}function ct(e){let{entry:t,name:r}=e;return Se(r,t)}function oe(e){return E(this,null,function*(){let{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:i=!1}=e,s=ct(n);if(r)return r;if(!ee[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;ee[s]=e.emit({loaderHook:l,remoteInfo:n,remoteEntryExports:r}).then(e=>e||(("undefined"!=typeof ENV_TARGET?"web"===ENV_TARGET:j())?Wn({remoteInfo:n,remoteEntryExports:r,loaderHook:l,getEntryUrl:o}):Kn({remoteInfo:n,loaderHook:l}))).catch(e=>E(null,null,function*(){let o=ct(n);if(e instanceof Error&&e.message.includes(Pe)&&!i){let e=e=>oe(L(S({},e),{_inErrorHandling:!0})),i=yield t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:ee,uniqueKey:o});if(i)return i}throw e}))}return ee[s]})}function me(e){return L(S({},e),{entry:"entry"in e?e.entry:"",type:e.type||Jt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||ye})}function ar(e){return S({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},e)}function qn(e,t){return t.map(t=>{let r=Gn(e,t.nameOrAlias);return P(r,`Unable to preload ${t.nameOrAlias} as it is not included in ${!r&&$e({remoteInfo:r,remotes:e})}`),{remote:r,preloadConfig:ar(t)}})}function zn(e){return e?e.map(e=>"."===e?e:e.startsWith("./")?e.replace("./",""):e):[]}function cr(e,t,r,n=!0){let{cssAssets:o,jsAssetsWithoutEntry:i,entryAssets:s}=r;if(t.options.inBrowser){if(s.forEach(r=>{let{moduleInfo:n}=r,o=t.moduleCache.get(e.name);oe(o?{origin:t,remoteInfo:n,remoteEntryExports:o.remoteEntryExports}:{origin:t,remoteInfo:n,remoteEntryExports:void 0})}),n){let e={rel:"preload",as:"style"};o.forEach(r=>{let{link:n,needAttach:o}=ue({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n}});o&&document.head.appendChild(n)})}else{let e={rel:"stylesheet",type:"text/css"};o.forEach(r=>{let{link:n,needAttach:o}=ue({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n},needDeleteLink:!1});o&&document.head.appendChild(n)})}if(n){let e={rel:"preload",as:"script"};i.forEach(r=>{let{link:n,needAttach:o}=ue({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n}});o&&document.head.appendChild(n)})}else{let r={fetchpriority:"high",type:"module"===(null==e?void 0:e.type)?"module":"text/javascript"};i.forEach(e=>{let{script:n,needAttach:o}=we({url:e,cb:()=>{},attrs:r,createScriptHook:(e,r)=>{let n=t.loaderHook.lifecycle.createScript.emit({url:e,attrs:r});if(n instanceof HTMLScriptElement)return n},needDeleteScript:!0});o&&document.head.appendChild(n)})}}}var se=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}getEntry(){return E(this,null,function*(){if(this.remoteEntryExports)return this.remoteEntryExports;let e;return e=yield oe({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports}),P(e,`remoteEntryExports is undefined \n ${$e(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports})}get(e,t,r,n){return E(this,null,function*(){let o,{loadFactory:i=!0}=r||{loadFactory:!0},s=yield this.getEntry();if(!this.inited){let t=this.host.shareScopeMap,r=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];r.length||r.push("default"),r.forEach(e=>{t[e]||(t[e]={})});let o=t[r[0]],i=[],l={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?r:this.remoteInfo.shareScope||"default"};Object.defineProperty(l,"shareScopeMap",{value:t,enumerable:!1});let a=yield this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:o,remoteEntryInitOptions:l,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});void 0===(null==s?void 0:s.init)&&W(F(Qe,M,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),yield s.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),yield this.host.hooks.lifecycle.initContainer.emit(L(S({},a),{id:e,remoteSnapshot:n,remoteEntryExports:s}))}this.lib=s,this.inited=!0,o=yield this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),o||(o=yield s.get(t)),P(o,`${de(this.remoteInfo)} remote don't export ${t}.`);let l=Zr(this.remoteInfo.name,t),a=this.wraperFactory(o,l);return i?yield a():a})}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 e instanceof Promise?()=>E(null,null,function*(){let n=yield e();return r(n,t),n}):()=>{let n=e();return r(n,t),n}}},k=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(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},C=class extends k{emit(...e){let t,r=Array.from(this.listeners);if(r.length>0){let n=0,o=t=>!1!==t&&(n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):t);t=o()}return Promise.resolve(t)}};function lr(e,t){if(!ht(t))return!1;if(e!==t)for(let r in e)if(!(r in t))return!1;return!0}var Y=class extends k{constructor(e){super(),this.onerror=W,this.type=e}emit(e){ht(e)||W(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let r=t(e);if(!lr(e,r)){this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}e=r}catch(e){Ce(e),this.onerror(e)}return e}},B=class extends k{constructor(e){super(),this.onerror=W,this.type=e}emit(e){ht(e)||W(`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,n=t=>(Ce(t),this.onerror(t),e),o=i=>{if(lr(e,i)){if(e=i,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(e){return n(e)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(o(e))}return Promise.resolve(e)}},z=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){var r;P(Jr(e),"Plugin configuration is invalid.");let n=e.name;P(n,"A name must be provided by the plugin."),this.registerPlugins[n]||(this.registerPlugins[n]=e,null==(r=e.apply)||r.call(e,t),Object.keys(this.lifecycle).forEach(t=>{let r=e[t];r&&this.lifecycle[t].on(r)}))}removePlugin(e){P(e,"A name is required.");let t=this.registerPlugins[e];P(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{"name"!==e&&this.lifecycle[e].remove(t[e])})}};function ur(e,t){let r=Wt(t);r.url||W(`The attribute remoteEntry of ${e.name} must not be undefined.`);let n=le(t,r.url);!j()&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function Xn(){return{name:"snapshot-plugin",afterResolve(e){return E(this,null,function*(){let{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:i,id:s}=e;if(!dt(t)||!Vt(t)){let{remoteSnapshot:l,globalSnapshot:a}=yield o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:s});ur(i,l);let u={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},c=yield o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:u,remoteInfo:i,remote:t,remoteSnapshot:l,globalSnapshot:a});return c&&cr(i,o,c,!1),L(S({},e),{remoteSnapshot:l})}return e})}}}function Yn(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]}}function fr(e,t,r,n,o={},i){let s=de(t),{value:l}=re(e,s),a=i||l;if(a&&!Ne(a)&&(r(a,t,n),a.remotesInfo)){let t=Object.keys(a.remotesInfo);for(let n of t){if(o[n])continue;o[n]=!0;let t=Yn(n),i=a.remotesInfo[n];fr(e,{name:t.name,version:i.matchedVersion},r,!1,o,void 0)}}}var it=(e,t)=>document.querySelector(`${e}[${"link"===e?"href":"src"}="${t}"]`);function Jn(e,t,r,n,o){let i=[],s=[],l=[],a=new Set,u=new Set,{options:c}=e,{preloadConfig:h}=t,{depsRemote:f}=h;if(fr(n,r,(t,r,n)=>{var o;let a;if(n)a=h;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===r.name||e.nameOrAlias===r.alias);if(!e)return;a=ar(e)}else{if(!0!==f)return;a=h}let u=le(t,Wt(t).url);u&&l.push({name:r.name,moduleInfo:{name:r.name,entry:u,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:u});let c="modules"in t?t.modules:[],m=zn(a.exposes);function d(e){let r=e.map(e=>le(t,e));return a.filter?r.filter(a.filter):r}if(m.length&&"modules"in t&&(c=null==(o=null==t?void 0:t.modules)?void 0:o.reduce((e,t)=>(-1!==(null==m?void 0:m.indexOf(t.moduleName))&&e.push(t),e),[])),c){let n=c.length;for(let o=0;o<n;o++){let n=c[o],l=`${r.name}/${n.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:"."===n.moduleName?r.name:l,name:r.name,remoteSnapshot:t,preloadConfig:a,remote:r,origin:e}),!rn(l)&&("all"===a.resourceCategory?(i.push(...d(n.assets.css.async)),i.push(...d(n.assets.css.sync)),s.push(...d(n.assets.js.async)),s.push(...d(n.assets.js.sync))):(a.resourceCategory="sync")&&(i.push(...d(n.assets.css.sync)),s.push(...d(n.assets.js.sync))),nn(l))}}},!0,{},o),o.shared&&o.shared.length>0){let t=(t,r)=>{let n=He(e.shareScopeMap,r.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare);n&&"function"==typeof n.lib&&(r.assets.js.sync.forEach(e=>{a.add(e)}),r.assets.css.sync.forEach(e=>{u.add(e)}))};o.shared.forEach(e=>{var r;let n=null==(r=c.shared)?void 0:r[e.sharedName];if(!n)return;let o=e.version?n.find(t=>t.version===e.version):n;o&&Bt(o).forEach(r=>{t(r,e)})})}let m=s.filter(e=>!a.has(e)&&!it("script",e));return{cssAssets:i.filter(e=>!u.has(e)&&!it("link",e)),jsAssetsWithoutEntry:m,entryAssets:l.filter(e=>!it("script",e.url))}}var Zn=function(){return{name:"generate-preload-assets-plugin",generatePreloadAssets(e){return E(this,null,function*(){let{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:i,remoteSnapshot:s}=e;return j()?dt(o)&&Vt(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(ur(n,s),Jn(t,r,n,i,s)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}})}}};function dr(e,t){let r=Fe({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&re(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:Dt(),remoteSnapshot:Fe({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Dt(),remoteSnapshot:Fe({name:e.name,version:"version"in e?e.version:void 0})}}var lt=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new z({beforeLoadRemoteSnapshot:new C("beforeLoadRemoteSnapshot"),loadSnapshot:new B("loadGlobalSnapshot"),loadRemoteSnapshot:new B("loadRemoteSnapshot"),afterLoadSnapshot:new B("afterLoadSnapshot")}),this.manifestLoading=he.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}loadRemoteSnapshotInfo(e){return E(this,arguments,function*({moduleInfo:e,id:t,expose:r}){let{options:n}=this.HostInstance;yield this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=Fe({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},en({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!re(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo=L(S({},null==o?void 0:o.remotesInfo),{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));let i,s,{hostGlobalSnapshot:l,remoteSnapshot:a,globalSnapshot:u}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:h}=yield this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:l,remoteSnapshot:a,globalSnapshot:u});if(c)if(Ne(c)){let t=j()?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",r=yield this.getManifestJson(t,e,{});i=r,s=kt(L(S({},e),{entry:t}),r)}else{let{remoteSnapshot:t}=yield this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});i=t,s=h}else if(dt(e)){let t=yield this.getManifestJson(e.entry,e,{}),r=kt(e,t),{remoteSnapshot:n}=yield this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:t,from:"global"});i=n,s=r}else W(F(nt,M,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(h)}));return yield this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:i}),{remoteSnapshot:i,globalSnapshot:s}})}getGlobalRemoteInfo(e){return dr(e,this.HostInstance)}getManifestJson(e,t,r){return E(this,null,function*(){let r=()=>E(this,null,function*(){let r=this.manifestCache.get(e);if(r)return r;try{let t=yield this.loaderHook.lifecycle.fetch.emit(e,{});(!t||!(t instanceof Response))&&(t=yield fetch(e,{})),r=yield t.json()}catch(n){r=yield this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),r||(delete this.manifestLoading[e],W(F(et,M,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${n}`)))}return P(r.metaData&&r.exposes&&r.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,r),r});return this.manifestLoading[e]||(this.manifestLoading[e]=(()=>E(this,null,function*(){let n=yield r(),o=ze(n,{version:e}),{remoteSnapshot:i}=yield this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:n,remoteSnapshot:o,manifestUrl:e,from:"manifest"});return i}))().then(e=>e)),this.manifestLoading[e]})}},ut=class{constructor(e){this.hooks=new z({afterResolve:new B("afterResolve"),beforeLoadShare:new B("beforeLoadShare"),loadShare:new C,resolveShare:new Y("resolveShare"),initContainerShareScopeMap:new Y("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){let{shareInfos:r,shared:n}=nr(e,t);return Object.keys(r).forEach(e=>{r[e].forEach(r=>{r.scope.forEach(n=>{var o;(null==(o=this.shareScopeMap[n])?void 0:o[e])||this.setShared({pkgName:e,lib:r.lib,get:r.get,loaded:r.loaded||!!r.lib,shared:r,from:t.name})})})}),{shareInfos:r,shared:n}}loadShare(e,t){return E(this,null,function*(){let{host:r}=this,n=jt({pkgName:e,extraOptions:t,shareInfos:r.options.shared});null!=n&&n.scope&&(yield Promise.all(n.scope.map(e=>E(this,null,function*(){yield Promise.all(this.initializeSharing(e,{strategy:n.strategy}))}))));let o=yield this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r}),{shareInfo:i}=o;P(i,`Cannot find ${e} Share in the ${r.options.name}. Please ensure that the ${e} Share parameters have been injected`);let s=He(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare),l=e=>{e.useIn||(e.useIn=[]),vt(e.useIn,r.options.name)};if(s&&s.lib)return l(s),s.lib;if(s&&s.loading&&!s.loaded){let e=yield s.loading;return s.loaded=!0,s.lib||(s.lib=e),l(s),e}if(s){let t=E(this,null,function*(){let e=yield s.get();return l(s),s.loaded=!0,s.lib=e,e});return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:t}),t}{if(null!=t&&t.customShareInfo)return!1;let n=E(this,null,function*(){let t=yield i.get();i.lib=t,i.loaded=!0,l(i);let r=He(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare);return r&&(r.lib=t,r.loaded=!0,r.from=i.from),t});return this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:n}),n}})}initializeSharing(e=ye,t){let{host:r}=this,n=null==t?void 0:t.from,o=null==t?void 0:t.strategy,i=null==t?void 0:t.initScope,s=[];if("build"!==n){let{initTokens:t}=this;i||(i=[]);let r=t[e];if(r||(r=t[e]={from:this.host.name}),i.indexOf(r)>=0)return s;i.push(r)}let l=this.shareScopeMap,a=r.options.name;l[e]||(l[e]={});let u=l[e],c=t=>E(this,null,function*(){let{module:n}=yield r.remoteHandler.getRemoteModuleAndOptions({id:t});if(n.getEntry){let o;try{o=yield n.getEntry()}catch(e){o=yield r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:t,error:e,from:"runtime",lifecycle:"beforeLoadShare",origin:r})}n.inited||(yield(t=>t&&t.init&&t.init(l[e],i))(o),n.inited=!0)}});return Object.keys(r.options.shared).forEach(t=>{r.options.shared[t].forEach(r=>{r.scope.includes(e)&&((e,t)=>{var r;let{version:n,eager:o}=t;u[e]=u[e]||{};let i=u[e],s=i[n],l=!(!s||!(s.eager||null!=(r=s.shareConfig)&&r.eager));(!s||"loaded-first"!==s.strategy&&!s.loaded&&(!o!=!l?o:a>s.from))&&(i[n]=t)})(t,r)})}),("version-first"===r.options.shareStrategy||"version-first"===o)&&r.options.remotes.forEach(t=>{t.shareScope===e&&s.push(c(t.name))}),s}loadShareSync(e,t){let{host:r}=this,n=jt({pkgName:e,extraOptions:t,shareInfos:r.options.shared});null!=n&&n.scope&&n.scope.forEach(e=>{this.initializeSharing(e,{strategy:n.strategy})});let o=He(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare),i=e=>{e.useIn||(e.useIn=[]),vt(e.useIn,r.options.name)};if(o){if("function"==typeof o.lib)return i(o),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if("function"==typeof o.get){let t=o.get();if(!(t instanceof Promise))return i(o),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:t,shared:o}),t}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){let o=n.get();if(o instanceof Promise){let n="build"===(null==t?void 0:t.from)?rt:Ae;throw new Error(F(n,M,{hostName:r.options.name,sharedPkgName:e}))}return n.lib=o,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}throw new Error(F(Ae,M,{hostName:r.options.name,sharedPkgName:e}))}initShareScopeMap(e,t,r={}){let{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:i,get:s}){let l=t,{version:a,scope:u="default"}=l,c=Ge(l,["version","scope"]);(Array.isArray(u)?u:[u]).forEach(t=>{if(this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),!this.shareScopeMap[t][e][a])return this.shareScopeMap[t][e][a]=L(S({version:a,scope:[t]},c),{lib:n,loaded:i,loading:o}),void(s&&(this.shareScopeMap[t][e][a].get=s));let l=this.shareScopeMap[t][e][a];o&&!l.loading&&(l.loading=o),i&&!l.loaded&&(l.loaded=i),r&&l.from!==r&&(l.from=r)})}_setGlobalShareScopeMap(e){let t=or(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},ft=class{constructor(e){this.hooks=new z({beforeRegisterRemote:new Y("beforeRegisterRemote"),registerRemote:new Y("registerRemote"),beforeRequest:new B("beforeRequest"),onLoad:new C("onLoad"),handlePreloadModule:new k("handlePreloadModule"),errorLoadRemote:new C("errorLoadRemote"),beforePreloadRemote:new C("beforePreloadRemote"),generatePreloadAssets:new C("generatePreloadAssets"),afterPreloadRemote:new C,loadEntry:new C}),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:n}=t,{name:o,alias:i}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},i&&e.startsWith(o)){let t=e.replace(o,i);return void(this.idToRemoteMap[t]={name:r.name,expose:n})}if(i&&e.startsWith(i)){let t=e.replace(i,o);this.idToRemoteMap[t]={name:r.name,expose:n}}}loadRemote(e,t){return E(this,null,function*(){let{host:r}=this;try{let{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:i,remoteMatchInfo:s}=yield this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:l,remote:a,expose:u,id:c,remoteSnapshot:h}=s,f=yield o.get(c,u,t,h),m=yield this.hooks.lifecycle.onLoad.emit({id:c,pkgNameOrAlias:l,expose:u,exposeModule:n?f:void 0,exposeModuleFactory:n?void 0:f,remote:a,options:i,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,s),"function"==typeof m?m:f}catch(n){let{from:o="runtime"}=t||{from:"runtime"},i=yield this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!i)throw n;return i}})}preloadRemote(e){return E(this,null,function*(){let{host:t}=this;yield this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=qn(t.options.remotes,e);yield Promise.all(r.map(e=>E(this,null,function*(){let{remote:r}=e,n=me(r),{globalSnapshot:o,remoteSnapshot:i}=yield t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:r}),s=yield this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:e,remote:r,remoteInfo:n,globalSnapshot:o,remoteSnapshot:i});s&&cr(n,t,s)})))})}registerRemotes(e,t){let{host:r}=this;e.forEach(e=>{this.registerRemote(e,r.options.remotes,{force:null==t?void 0:t.force})})}getRemoteModuleAndOptions(e){return E(this,null,function*(){let t,{host:r}=this,{id:n}=e;try{t=yield this.hooks.lifecycle.beforeRequest.emit({id:n,options:r.options,origin:r})}catch(e){if(t=yield this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:r.options,origin:r,from:"runtime",error:e,lifecycle:"beforeRequest"}),!t)throw e}let{id:o}=t,i=xn(r.options.remotes,o);P(i,F(tt,M,{hostName:r.options.name,requestId:o}));let{remote:s}=i,l=me(s),a=yield r.sharedHandler.hooks.lifecycle.afterResolve.emit(L(S({id:o},i),{options:r.options,origin:r,remoteInfo:l})),{remote:u,expose:c}=a;P(u&&c,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let h=r.moduleCache.get(u.name),f={host:r,remoteInfo:l};return h||(h=new se(f),r.moduleCache.set(u.name,h)),{module:h,moduleOptions:f,remoteMatchInfo:a}})}registerRemote(e,t,r){let{host:n}=this,o=()=>{if(e.alias){let r=t.find(t=>{var r;return e.alias&&(t.name.startsWith(e.alias)||(null==(r=t.alias)?void 0:r.startsWith(e.alias)))});P(!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&&j()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=ye),e.type||(e.type=Jt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});let i=t.find(t=>t.name===e.name);if(i){let s=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];null!=r&&r.force&&(this.removeRemote(i),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),Ie(s.join(" ")))}else o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n})}removeRemote(e){var t;try{let{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(e=>e.name===n);-1!==o&&r.options.remotes.splice(o,1);let i=r.moduleCache.get(e.name);if(i){let n=i.remoteInfo,o=n.entryGlobalName;O[o]&&(null!=(t=Object.getOwnPropertyDescriptor(O,o))&&t.configurable?delete O[o]:O[o]=void 0);let s=ct(i.remoteInfo);ee[s]&&delete ee[s],r.snapshotHandler.manifestCache.delete(n.entry);let l=n.buildVersion?Se(n.name,n.buildVersion):n.name,a=O.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===l:e.name===l);if(-1!==a){let e=O.__FEDERATION__.__INSTANCES__[a];l=e.options.id||l;let t=or(),r=!0,o=[];Object.keys(t).forEach(e=>{let i=t[e];i&&Object.keys(i).forEach(t=>{let s=i[t];s&&Object.keys(s).forEach(i=>{let l=s[i];l&&Object.keys(l).forEach(s=>{let a=l[s];a&&"object"==typeof a&&a.from===n.name&&(a.loaded||a.loading?(a.useIn=a.useIn.filter(e=>e!==n.name),a.useIn.length?r=!1:o.push([e,t,i,s])):o.push([e,t,i,s]))})})})}),r&&(e.shareScopeMap={},delete t[l]),o.forEach(([e,r,n,o])=>{var i,s,l;null==(l=null==(s=null==(i=t[e])?void 0:i[r])?void 0:s[n])||delete l[o]}),O.__FEDERATION__.__INSTANCES__.splice(a,1)}let{hostGlobalSnapshot:u}=dr(e,r);if(u){let t=u&&"remotesInfo"in u&&u.remotesInfo&&re(u.remotesInfo,e.name).key;t&&(delete u.remotesInfo[t],he.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete he.__FEDERATION__.__MANIFEST_LOADING__[t])}r.moduleCache.delete(e.name)}}catch(e){at.log("removeRemote fail: ",e)}}},Qn="boolean"!=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,J=class{constructor(e){this.hooks=new z({beforeInit:new Y("beforeInit"),init:new k,beforeInitContainer:new B("beforeInitContainer"),initContainer:new B("initContainer")}),this.version="0.22.0",this.moduleCache=new Map,this.loaderHook=new z({getModuleInfo:new k,createScript:new k,createLink:new k,fetch:new C,loadEntryError:new C,getModuleFactory:new C}),this.bridgeHook=new z({beforeBridgeRender:new k,afterBridgeRender:new k,beforeBridgeDestroy:new k,afterBridgeDestroy:new k});let t=Qn?[Xn(),Zn()]:[],r={id:Cn(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:j()};this.name=e.name,this.options=r,this.snapshotHandler=new lt(this),this.sharedHandler=new ut(this),this.remoteHandler=new ft(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}loadShare(e,t){return E(this,null,function*(){return this.sharedHandler.loadShare(e,t)})}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ye,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){let n=me({name:e,entry:t}),o=new se({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}loadRemote(e,t){return E(this,null,function*(){return this.remoteHandler.loadRemote(e,t)})}preloadRemote(e){return E(this,null,function*(){return this.remoteHandler.preloadRemote(e)})}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){let{shared:r}=nr(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),i=this.remoteHandler.formatAndRegisterRemote(o,n),{shared:s}=this.sharedHandler.registerShared(o,n),l=[...o.plugins];n.plugins&&n.plugins.forEach(e=>{l.includes(e)||l.push(e)});let a=L(S(S({},e),t),{plugins:l,remotes:i,shared:s});return this.hooks.lifecycle.init.emit({origin:this,options:a}),a}registerPlugins(e){let t=Un(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,L(S({},this.options),{shared:e}))}};function eo(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}function hr(e,t){let r=eo();return O.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}function pr(e){let t=new(zt()||J)(e);return qt(t),t}var $=null;function to(e){let t=hr(e.name,e.version);return t?(t.initOptions(e),$||($=t),t):$=pr(e)}function ro(...e){return P($,F(q,M)),$.loadRemote.apply($,e)}function no(...e){return P($,F(q,M)),$.loadShare.apply($,e)}function oo(...e){return P($,F(q,M)),$.loadShareSync.apply($,e)}function so(...e){return P($,F(q,M)),$.preloadRemote.apply($,e)}function io(...e){return P($,F(q,M)),$.registerRemotes.apply($,e)}function ao(...e){return P($,F(q,M)),$.registerPlugins.apply($,e)}function co(){return $}function lo(...e){return P($,F(q,M)),$.registerShared.apply($,e)}return Xt(J),exports.MFRuntime=gt,exports.MFSDK=Je,exports}({});
|
|
1
|
+
var EMP_SHARE_RUNTIME=function(exports){"use strict";var Rt=Object.defineProperty,yr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,bt=(e,t,r)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))St.call(t,r)&&bt(e,r,t[r]);if(_e)for(var r of _e(t))It.call(t,r)&&bt(e,r,t[r]);return e},L=(e,t)=>yr(e,_r(t)),Ve=(e,t)=>{var r={};for(var n in e)St.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&_e)for(var n of _e(e))t.indexOf(n)<0&&It.call(e,n)&&(r[n]=e[n]);return r},Nt=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},_=(e,t,r)=>new Promise((n,o)=>{var i=e=>{try{l(r.next(e))}catch(e){o(e)}},s=e=>{try{l(r.throw(e))}catch(e){o(e)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,s);l((r=r.apply(e,t)).next())}),$t="EMP_SHARE_RUNTIME",Ge={};Nt(Ge,{Module:()=>se,ModuleFederation:()=>J,createInstance:()=>mr,getInstance:()=>lo,getRemoteEntry:()=>oe,getRemoteInfo:()=>me,init:()=>ro,loadRemote:()=>no,loadScript:()=>Z,loadScriptNode:()=>Q,loadShare:()=>oo,loadShareSync:()=>so,preloadRemote:()=>io,registerGlobalPlugins:()=>Jt,registerPlugins:()=>co,registerRemotes:()=>ao,registerShared:()=>uo});var Ae={};Nt(Ae,{BROWSER_LOG_KEY:()=>Tt,ENCODE_NAME_PREFIX:()=>Rr,EncodedNameTransformMap:()=>ge,FederationModuleManifest:()=>Er,MANIFEST_EXT:()=>qe,MFModuleType:()=>gr,MFPrefetchCommon:()=>Ir,MODULE_DEVTOOL_IDENTIFIER:()=>br,ManifestFileName:()=>Be,NameTransformMap:()=>H,NameTransformSymbol:()=>A,SEPARATOR:()=>ze,StatsFileName:()=>We,TEMP_DIR:()=>Sr,assert:()=>Fr,bindLoggerToCompiler:()=>xr,composeKeyWithSeparator:()=>Se,containerPlugin:()=>Nr,containerReferencePlugin:()=>$r,createInfrastructureLogger:()=>Lt,createLink:()=>ue,createLogger:()=>Te,createModuleFederationConfig:()=>Br,createScript:()=>we,createScriptNode:()=>vt,decodeName:()=>Or,encodeName:()=>Xe,error:()=>Pt,generateExposeFilename:()=>Mr,generateShareFilename:()=>Lr,generateSnapshotFromManifest:()=>Ye,getManifestFileName:()=>kr,getProcessEnv:()=>wt,getResourceUrl:()=>le,inferAutoPublicPath:()=>Ot,infrastructureLogger:()=>Ur,isBrowserEnv:()=>V,isDebugMode:()=>ce,isManifestProvider:()=>$e,isReactNativeEnv:()=>Re,isRequiredVersion:()=>Dr,isStaticResourcesEqual:()=>Ze,loadScript:()=>Z,loadScriptNode:()=>Q,logger:()=>Gr,moduleFederationPlugin:()=>Tr,normalizeOptions:()=>jr,parseEntry:()=>Pr,safeToString:()=>Ne,safeWrapper:()=>Je,sharePlugin:()=>wr,simpleJoinRemoteEntry:()=>X,warn:()=>Ie});var Er="federation-manifest.json",qe=".json",Tt="FEDERATION_DEBUG",A={AT:"@",HYPHEN:"-",SLASH:"/"},H={[A.AT]:"scope_",[A.HYPHEN]:"_",[A.SLASH]:"__"},ge={[H[A.AT]]:A.AT,[H[A.HYPHEN]]:A.HYPHEN,[H[A.SLASH]]:A.SLASH},ze=":",Be="mf-manifest.json",We="mf-stats.json",gr={NPM:"npm",APP:"app"},br="__MF_DEVTOOLS_MODULE_INFO__",Rr="ENCODE_NAME_PREFIX",Sr=".federation",Ir={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"},Nr=Object.freeze({__proto__:null}),$r=Object.freeze({__proto__:null}),Tr=Object.freeze({__proto__:null}),wr=Object.freeze({__proto__:null});function V(){return"undefined"!=typeof window&&void 0!==window.document}function Re(){return"undefined"!=typeof navigator&&"ReactNative"===(null==navigator?void 0:navigator.product)}function Ar(){try{if(V()&&window.localStorage)return!!localStorage.getItem(Tt)}catch(e){return!1}return!1}function ce(){return"undefined"!=typeof process&&process.env,Ar()}var wt=function(){return"undefined"!=typeof process&&process.env?process.env:{}},At="[ Federation Runtime ]",Pr=(e,t,r=ze)=>{let n=e.split(r),o="development"===wt().NODE_ENV&&t,i=e=>e.startsWith("http")||e.includes(qe);if(n.length>=2){let[t,...s]=n;e.startsWith(r)&&(t=n.slice(0,2).join(r),s=[o||n.slice(2).join(r)]);let l=o||s.join(r);return i(l)?{name:t,entry:l}:{name:t,version:l||"*"}}if(1===n.length){let[e]=n;return o&&i(o)?{name:e,entry:o}:{name:e,version:o||"*"}}throw`Invalid entry value: ${e}`},Se=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}${ze}${t}`:t:e,""):""},Xe=function(e,t="",r=!1){try{let n=r?".js":"";return`${t}${e.replace(new RegExp(`${A.AT}`,"g"),H[A.AT]).replace(new RegExp(`${A.HYPHEN}`,"g"),H[A.HYPHEN]).replace(new RegExp(`${A.SLASH}`,"g"),H[A.SLASH])}${n}`}catch(e){throw e}},Or=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(new RegExp(t,"g"),"")}return n=n.replace(new RegExp(`${H[A.AT]}`,"g"),ge[H[A.AT]]).replace(new RegExp(`${H[A.SLASH]}`,"g"),ge[H[A.SLASH]]).replace(new RegExp(`${H[A.HYPHEN]}`,"g"),ge[H[A.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(e){throw e}},Mr=(e,t)=>{if(!e)return"";let r=e;return"."===r&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),Xe(r,"__federation_expose_",t)},Lr=(e,t)=>e?Xe(e,"__federation_shared_",t):"",le=(e,t)=>{if("getPublicPath"in e){let r;return r=e.getPublicPath.startsWith("function")?new Function("return "+e.getPublicPath)()():new Function(e.getPublicPath)(),`${r}${t}`}return"publicPath"in e?V()||Re()||!("ssrPublicPath"in e)?`${e.publicPath}${t}`:`${e.ssrPublicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},Fr=(e,t)=>{e||Pt(t)},Pt=e=>{throw new Error(`${At}: ${e}`)},Ie=e=>{console.warn(`${At}: ${e}`)};function Ne(e){try{return JSON.stringify(e,null,2)}catch(e){return""}}var vr=/^([\d^=v<>~]|[*xX]$)/;function Dr(e){return vr.test(e)}var X=(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 Ot(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Ye(e,t={}){var r,n,o;let i,{remotes:s={},overrides:l={},version:a}=t,u=()=>"publicPath"in e.metaData?"auto"===e.metaData.publicPath&&a?Ot(a):e.metaData.publicPath:e.metaData.getPublicPath,c=Object.keys(l),h={};Object.keys(s).length||(h=(null==(r=e.remotes)?void 0:r.reduce((e,t)=>{let r,n=t.federationContainerName;return r=c.includes(n)?l[n]:"version"in t?t.version:t.entry,e[n]={matchedVersion:r},e},{}))||{}),Object.keys(s).forEach(e=>h[e]={matchedVersion:c.includes(e)?l[e]:s[e]});let{remoteEntry:{path:f,name:m,type:d},types:p={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:y},globalName:_,ssrRemoteEntry:g}=e.metaData,{exposes:E}=e,S={version:a||"",buildVersion:y,globalName:_,remoteEntry:X(f,m),remoteEntryType:d,remoteTypes:X(p.path,p.name),remoteTypesZip:p.zip||"",remoteTypesAPI:p.api||"",remotesInfo:h,shared:null==e?void 0:e.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version})),modules:null==E?void 0:E.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(null!=(n=e.metaData)&&n.prefetchInterface){let t=e.metaData.prefetchInterface;S=L(b({},S),{prefetchInterface:t})}if(null!=(o=e.metaData)&&o.prefetchEntry){let{path:t,name:r,type:n}=e.metaData.prefetchEntry;S=L(b({},S),{prefetchEntry:X(t,r),prefetchEntryType:n})}if(i="publicPath"in e.metaData?L(b({},S),{publicPath:u(),ssrPublicPath:e.metaData.ssrPublicPath}):L(b({},S),{getPublicPath:u()}),g){let e=X(g.path,g.name);i.ssrRemoteEntry=e,i.ssrRemoteEntryType=g.type||"commonjs-module"}return i}function $e(e){return!(!("remoteEntry"in e)||!e.remoteEntry.includes(qe))}function kr(e){if(!e)return{statsFileName:We,manifestFileName:Be};let t="boolean"==typeof e?"":e.filePath||"",r="boolean"==typeof e?"":e.fileName||"",n=".json",o=r?(s=r).endsWith(n)?s:`${s}${n}`:Be,i=r?((e,t)=>e.replace(n,`${t}${n}`))(o,"-stats"):We;var s;return{statsFileName:X(t,i),manifestFileName:X(t,o)}}var Mt="[ Module Federation ]",ie=console,Hr=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Cr(){try{let e=(new Error).stack;if(!e)return;let[,...t]=e.split("\n"),r=t.filter(e=>!Hr.some(t=>e.includes(t)));return r.length?`Stack trace:\n${r.slice(0,5).join("\n")}`:void 0}catch(e){return}}var be=class{constructor(e,t=ie){this.prefix=e,this.delegate=null!=t?t:ie}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=null!=e?e:ie}emit(e,t){let r=this.delegate,n=ce()?Cr():void 0,o=n?[...t,n]: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,...o)}for(let e of i){let t=ie[e];if("function"==typeof t)return void t.call(ie,this.prefix,...o)}}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){ce()&&this.emit("debug",e)}};function Te(e){return new be(e)}function Lt(e){let t=new be(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function xr(e,t,r){if(e.__mf_infrastructure_logger__&&null!=t&&t.getInfrastructureLogger)try{let n=t.getInfrastructureLogger(r);n&&"object"==typeof n&&("function"==typeof n.log||"function"==typeof n.info||"function"==typeof n.warn||"function"==typeof n.error)&&e.setDelegate(n)}catch(t){e.setDelegate(void 0)}}var Gr=Te(Mt),Ur=Lt(Mt);function Je(e,t){return _(this,null,function*(){try{return yield e()}catch(e){return void(!t&&Ie(e))}})}function Ze(e,t){let r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function we(e){let t,r=null,n=!0,o=2e4,i=document.getElementsByTagName("script");for(let t=0;t<i.length;t++){let o=i[t],s=o.getAttribute("src");if(s&&Ze(s,e.url)){r=o,n=!1;break}}if(!r){let t,n=e.attrs;r=document.createElement("script"),r.type="module"===(null==n?void 0:n.type)?"module":"text/javascript",e.createScriptHook&&(t=e.createScriptHook(e.url,e.attrs),t instanceof HTMLScriptElement?r=t:"object"==typeof t&&("script"in t&&t.script&&(r=t.script),"timeout"in t&&t.timeout&&(o=t.timeout))),r.src||(r.src=e.url),n&&!t&&Object.keys(n).forEach(e=>{r&&("async"===e||"defer"===e?r[e]=n[e]:r.getAttribute(e)||r.setAttribute(e,n[e]))})}let s=(n,o)=>_(null,null,function*(){clearTimeout(t);let i=()=>{"error"===(null==o?void 0:o.type)?null!=e&&e.onErrorCallback&&(null==e||e.onErrorCallback(o)):null!=e&&e.cb&&(null==e||e.cb())};if(r&&(r.onerror=null,r.onload=null,Je(()=>{let{needDeleteScript:t=!0}=e;t&&null!=r&&r.parentNode&&r.parentNode.removeChild(r)}),n&&"function"==typeof n)){let e=n(o);if(e instanceof Promise){let t=yield e;return i(),t}return i(),e}i()});return r.onerror=s.bind(null,r.onerror),r.onload=s.bind(null,r.onload),t=setTimeout(()=>{s(null,new Error(`Remote script "${e.url}" time-outed.`))},o),{script:r,needAttach:n}}function ue(e){let t=null,r=!0,n=document.getElementsByTagName("link");for(let o=0;o<n.length;o++){let i=n[o],s=i.getAttribute("href"),l=i.getAttribute("rel");if(s&&Ze(s,e.url)&&l===e.attrs.rel){t=i,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let r,n=e.attrs;e.createLinkHook&&(r=e.createLinkHook(e.url,n),r instanceof HTMLLinkElement&&(t=r)),n&&!r&&Object.keys(n).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,n[e])})}let o=(r,n)=>{let o=()=>{"error"===(null==n?void 0:n.type)?null!=e&&e.onErrorCallback&&(null==e||e.onErrorCallback(n)):null!=e&&e.cb&&(null==e||e.cb())};if(t&&(t.onerror=null,t.onload=null,Je(()=>{let{needDeleteLink:r=!0}=e;r&&null!=t&&t.parentNode&&t.parentNode.removeChild(t)}),r)){let e=r(n);return o(),e}o()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function Z(e,t){let{attrs:r={},createScriptHook:n}=t;return new Promise((t,o)=>{let{script:i,needAttach:s}=we({url:e,cb:t,onErrorCallback:o,attrs:b({fetchpriority:"high"},r),createScriptHook:n,needDeleteScript:!0});s&&document.head.appendChild(i)})}var Ee=new Map;function ae(e){if(!e)throw new Error("import specifier is required");if(Ee.has(e))return Ee.get(e);let t=new Function("name","return import(name)")(e).then(e=>e).catch(t=>{throw console.error(`Error importing module ${e}:`,t),Ee.delete(e),t});return Ee.set(e,t),t}var Ft=()=>_(null,null,function*(){let e=yield ae("node-fetch");return e.default||e}),Vr=(e,t,r)=>_(null,null,function*(){let n=yield(o=e,i=t||{},r.lifecycle.fetch.emit(o,i));var o,i;return n&&n instanceof Response?n:("undefined"==typeof fetch?yield Ft():fetch)(e,t||{})}),vt="undefined"==typeof ENV_TARGET||"web"!==ENV_TARGET?(url,cb,attrs,loaderHook)=>{if(null!=loaderHook&&loaderHook.createScriptHook){let e=loaderHook.createScriptHook(url);e&&"object"==typeof e&&"url"in e&&(url=e.url)}let urlObj;try{urlObj=new URL(url)}catch(e){return console.error("Error constructing URL:",e),void cb(new Error(`Invalid URL: ${e}`))}let getFetch=()=>_(null,null,function*(){return null!=loaderHook&&loaderHook.fetch?(e,t)=>Vr(e,t,loaderHook):"undefined"==typeof fetch?Ft():fetch}),handleScriptFetch=(f,urlObj)=>_(null,null,function*(){var t,e;try{let res=yield f(urlObj.href),data=yield res.text(),[path,vm]=yield Promise.all([ae("path"),ae("vm")]),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) {${data}\n})`,{filename:filename,importModuleDynamically:null!=(e=null==(t=vm.constants)?void 0:t.USE_MAIN_CONTEXT_DEFAULT_LOADER)?e:ae});script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename);let exportedInterface=scriptContext.module.exports||scriptContext.exports;if(attrs&&exportedInterface&&attrs.globalName){let e=exportedInterface[attrs.globalName]||exportedInterface;return void cb(void 0,e)}cb(void 0,exportedInterface)}catch(e){cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))}});getFetch().then(e=>_(null,null,function*(){if("esm"===(null==attrs?void 0:attrs.type)||"module"===(null==attrs?void 0:attrs.type))return Ke(urlObj.href,{fetch:e,vm:yield ae("vm")}).then(e=>_(null,null,function*(){yield e.evaluate(),cb(void 0,e.namespace)})).catch(e=>{cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))});handleScriptFetch(e,urlObj)})).catch(e=>{cb(e)})}:(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},Q="undefined"==typeof ENV_TARGET||"web"!==ENV_TARGET?(e,t)=>new Promise((r,n)=>{vt(e,(e,o)=>{var i,s;if(e)n(e);else{let e=(null==(i=null==t?void 0:t.attrs)?void 0:i.globalName)||`__FEDERATION_${null==(s=null==t?void 0:t.attrs)?void 0:s.name}:custom__`,n=globalThis[e]=o;r(n)}},t.attrs,t.loaderHook)}):(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")},je=new Map;function Ke(e,t){return _(this,null,function*(){if(je.has(e))return je.get(e);let{fetch:r,vm:n}=t,o=yield(yield r(e)).text(),i=new n.SourceTextModule(o,{importModuleDynamically:(r,n)=>_(null,null,function*(){return Ke(new URL(r,e).href,t)})});return je.set(e,i),yield i.link(r=>_(null,null,function*(){let n=new URL(r,e).href;return yield Ke(n,t)})),i})}function jr(e,t,r){return function(n){if(!1===n)return!1;if(void 0===n)return!!e&&t;if(!0===n)return t;if(n&&"object"==typeof n)return b(b({},t),n);throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}var Br=e=>e,Qe="RUNTIME-001",et="RUNTIME-002",tt="RUNTIME-003",rt="RUNTIME-004",nt="RUNTIME-005",Pe="RUNTIME-006",ot="RUNTIME-007",Oe="RUNTIME-008",q="RUNTIME-009",Wr="TYPE-001",Kr="BUILD-001",qr="BUILD-002",zr=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}/${e}`,F=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(zr(e)),n&&o.push(`Original Error Message:\n ${n}`),o.join("\n")},M={[Qe]:"Failed to get remoteEntry exports.",[et]:'The remote entry interface does not contain "init"',[tt]:"Failed to get manifest.",[rt]:"Failed to locate remote.",[nt]:"Invalid loadShareSync function call from bundler runtime",[Pe]:"Invalid loadShareSync function call from runtime",[ot]:"Failed to get remote snapshot.",[Oe]:"Failed to load script resources.",[q]:"Please call createInstance first."},Xr={[Wr]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Yr={[Kr]:"Failed to find expose module.",[qr]:"PublicPath is required in prod mode."};b(b(b({},M),Xr),Yr);var te="[ Federation Runtime ]",ct=Te(te);function P(e,t){e||W(t)}function W(e){throw e instanceof Error?(e.message.startsWith(te)||(e.message=`${te}: ${e.message}`),e):new Error(`${te}: ${e}`)}function xe(e){e instanceof Error&&(e.message.startsWith(te)||(e.message=`${te}: ${e.message}`)),ct.warn(e)}function Dt(e,t){return-1===e.findIndex(e=>e===t)&&e.push(t),e}function de(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ht(e){return void 0!==e.entry}function Bt(e){return!e.entry.includes(".json")}function pt(e){return e&&"object"==typeof e}var Jr=Object.prototype.toString;function Zr(e){return"[object Object]"===Jr.call(e)}function Wt(e){return Array.isArray(e)?e:[e]}function Kt(e){let t={url:"",type:"global",globalName:""};return V()||Re()||!("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 Qr=(e,t)=>{let r;return r=e.endsWith("/")?e.slice(0,-1):e,t.startsWith(".")&&(t=t.slice(1)),r+=t,r},O="object"==typeof globalThis?globalThis:window,G=(()=>{try{return document.defaultView}catch(e){return O}})(),he=G;function Le(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function Fe(e,t){return Object.hasOwnProperty.call(e,t)}Fe(O,"__GLOBAL_LOADING_REMOTE_ENTRY__")||Le(O,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});var ee=O.__GLOBAL_LOADING_REMOTE_ENTRY__;function qt(e){var t,r,n,o,i,s;Fe(e,"__VMOK__")&&!Fe(e,"__FEDERATION__")&&Le(e,"__FEDERATION__",e.__VMOK__),Fe(e,"__FEDERATION__")||(Le(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),Le(e,"__VMOK__",e.__FEDERATION__)),null!=(t=e.__FEDERATION__).__GLOBAL_PLUGIN__||(t.__GLOBAL_PLUGIN__=[]),null!=(r=e.__FEDERATION__).__INSTANCES__||(r.__INSTANCES__=[]),null!=(n=e.__FEDERATION__).moduleInfo||(n.moduleInfo={}),null!=(o=e.__FEDERATION__).__SHARE__||(o.__SHARE__={}),null!=(i=e.__FEDERATION__).__MANIFEST_LOADING__||(i.__MANIFEST_LOADING__={}),null!=(s=e.__FEDERATION__).__PRELOADED_MAP__||(s.__PRELOADED_MAP__=new Map)}function zt(e){O.__FEDERATION__.__INSTANCES__.push(e)}function Xt(){return O.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Yt(e,t=ce()){t&&(O.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,O.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.23.0")}function re(e,t){if("string"==typeof t){if(e[t])return{value:e[t],key:t};{let r=Object.keys(e);for(let n of r){let[r,o]=n.split(":"),i=`${r}:${t}`,s=e[i];if(s)return{value:s,key:i}}return{value:void 0,key:t}}}throw new Error("key must be string")}qt(O),qt(G);var kt=()=>G.__FEDERATION__.moduleInfo,en=(e,t)=>{let r=re(t,de(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 t=e,{version:r}=t,n=de(Ve(t,["version"])),o=re(G.__FEDERATION__.moduleInfo,n).value;if((null==o?void 0:o.version)===r)return o}},ve=e=>en(e,G.__FEDERATION__.moduleInfo),Ht=(e,t)=>{let r=de(e);return G.__FEDERATION__.moduleInfo[r]=t,G.__FEDERATION__.moduleInfo},tn=e=>(G.__FEDERATION__.moduleInfo=b(b({},G.__FEDERATION__.moduleInfo),e),()=>{let t=Object.keys(e);for(let e of t)delete G.__FEDERATION__.moduleInfo[e]}),mt=(e,t)=>{let r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:O[r]}},Jt=e=>{let{__GLOBAL_PLUGIN__:t}=G.__FEDERATION__;e.forEach(e=>{-1===t.findIndex(t=>t.name===e.name)?t.push(e):xe(`The plugin ${e.name} has been registered.`)})},rn=()=>G.__FEDERATION__.__GLOBAL_PLUGIN__,nn=e=>O.__FEDERATION__.__PRELOADED_MAP__.get(e),on=e=>O.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),ye="default",Zt="global",Ct="[0-9A-Za-z-]+",yt=`(?:\\+(${Ct}(?:\\.${Ct})*))`,fe="0|[1-9]\\d*",De="[0-9]+",Qt="\\d*[a-zA-Z-][a-zA-Z0-9-]*",xt=`(?:${De}|${Qt})`,sn=`(?:-?(${xt}(?:\\.${xt})*))`,Gt=`(?:${fe}|${Qt})`,er=`(?:-(${Gt}(?:\\.${Gt})*))`,st=`${fe}|x|X|\\*`,ne=`[v=\\s]*(${st})(?:\\.(${st})(?:\\.(${st})(?:${er})?${yt}?)?)?`,an=`^\\s*(${ne})\\s+-\\s+(${ne})\\s*$`,cn=`(${De})\\.(${De})\\.(${De})`,ln=`[v=\\s]*${cn}${sn}?${yt}?`,_t="((?:<|>)?=?)",un=`(\\s*)${_t}\\s*(${ln}|${ne})`,tr="(?:~>?)",fn=`(\\s*)${tr}\\s+`,rr="(?:\\^)",dn=`(\\s*)${rr}\\s+`,hn="(<|>)?=?\\s*\\*",pn=`^${rr}${ne}$`,mn=`(${fe})\\.(${fe})\\.(${fe})`,yn=`v?${mn}${er}?${yt}?`,_n=`^${tr}${ne}$`,En=`^${_t}\\s*${ne}$`,gn=`^${_t}\\s*(${yn})$|^$`,bn="^\\s*>=\\s*0.0.0\\s*$";function K(e){return new RegExp(e)}function D(e){return!e||"x"===e.toLowerCase()||"*"===e}function nr(...e){return t=>e.reduce((e,t)=>t(e),t)}function Ut(e){return e.match(K(gn))}function Vt(e,t,r,n){let o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}function Rn(e){return e.replace(K(an),(e,t,r,n,o,i,s,l,a,u,c,h)=>`${t=D(r)?"":D(n)?`>=${r}.0.0`:D(o)?`>=${r}.${n}.0`:`>=${t}`} ${l=D(a)?"":D(u)?`<${Number(a)+1}.0.0-0`:D(c)?`<${a}.${Number(u)+1}.0-0`:h?`<=${a}.${u}.${c}-${h}`:`<=${l}`}`.trim())}function Sn(e){return e.replace(K(un),"$1$2$3")}function In(e){return e.replace(K(fn),"$1~")}function Nn(e){return e.replace(K(dn),"$1^")}function $n(e){return e.trim().split(/\s+/).map(e=>e.replace(K(pn),(e,t,r,n,o)=>D(t)?"":D(r)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:D(n)?"0"===t?`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.0 <${Number(t)+1}.0.0-0`:o?"0"===t?"0"===r?`>=${t}.${r}.${n}-${o} <${t}.${r}.${Number(n)+1}-0`:`>=${t}.${r}.${n}-${o} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n}-${o} <${Number(t)+1}.0.0-0`:"0"===t?"0"===r?`>=${t}.${r}.${n} <${t}.${r}.${Number(n)+1}-0`:`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n} <${Number(t)+1}.0.0-0`)).join(" ")}function Tn(e){return e.trim().split(/\s+/).map(e=>e.replace(K(_n),(e,t,r,n,o)=>D(t)?"":D(r)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:D(n)?`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`:o?`>=${t}.${r}.${n}-${o} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`)).join(" ")}function wn(e){return e.split(/\s+/).map(e=>e.trim().replace(K(En),(e,t,r,n,o,i)=>{let s=D(r),l=s||D(n),a=l||D(o);return"="===t&&a&&(t=""),i="",s?">"===t||"<"===t?"<0.0.0-0":"*":t&&a?(l&&(n=0),o=0,">"===t?(t=">=",l?(r=Number(r)+1,n=0,o=0):(n=Number(n)+1,o=0)):"<="===t&&(t="<",l?r=Number(r)+1:n=Number(n)+1),"<"===t&&(i="-0"),`${t+r}.${n}.${o}${i}`):l?`>=${r}.0.0${i} <${Number(r)+1}.0.0-0`:a?`>=${r}.${n}.0${i} <${r}.${Number(n)+1}.0-0`:e})).join(" ")}function An(e){return e.trim().replace(K(hn),"")}function Pn(e){return e.trim().replace(K(bn),"")}function ke(e,t){return(e=Number(e)||e)>(t=Number(t)||t)?1:e===t?0:-1}function On(e,t){let{preRelease:r}=e,{preRelease:n}=t;if(void 0===r&&n)return 1;if(r&&void 0===n)return-1;if(void 0===r&&void 0===n)return 0;for(let e=0,t=r.length;e<=t;e++){let t=r[e],o=n[e];if(t!==o)return void 0===t&&void 0===o?0:t?o?ke(t,o):-1:1}return 0}function Me(e,t){return ke(e.major,t.major)||ke(e.minor,t.minor)||ke(e.patch,t.patch)||On(e,t)}function it(e,t){return e.version===t.version}function Mn(e,t){switch(e.operator){case"":case"=":return it(e,t);case">":return Me(e,t)<0;case">=":return it(e,t)||Me(e,t)<0;case"<":return Me(e,t)>0;case"<=":return it(e,t)||Me(e,t)>0;case void 0:return!0;default:return!1}}function Ln(e){return nr($n,Tn,wn,An)(e)}function Fn(e){return nr(Rn,Sn,In,Nn)(e.trim()).split(/\s+/).join(" ")}function He(e,t){if(!e)return!1;let r=Ut(e);if(!r)return!1;let[,n,,o,i,s,l]=r,a={operator:n,version:Vt(o,i,s,l),major:o,minor:i,patch:s,preRelease:null==l?void 0:l.split(".")},u=t.split("||");for(let e of u){let t=e.trim();if(!t||"*"===t||"x"===t)return!0;try{let e=Fn(t);if(!e.trim())return!0;let r=e.split(" ").map(e=>Ln(e)).join(" ");if(!r.trim())return!0;let n=r.split(/\s+/).map(e=>Pn(e)).filter(Boolean);if(0===n.length)continue;let o=!0;for(let e of n){let t=Ut(e);if(!t){o=!1;break}let[,r,,n,i,s,l]=t;if(!Mn({operator:r,version:Vt(n,i,s,l),major:n,minor:i,patch:s,preRelease:null==l?void 0:l.split(".")},a)){o=!1;break}}if(o)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}function vn(e,t,r,n){var o,i,s;let l;return l="get"in e?e.get:"lib"in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)}),L(b({deps:[],useIn:[],from:t,loading:null},e),{shareConfig:b({requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1},e.shareConfig),get:l,loaded:!!(null!=e&&e.loaded||"lib"in e)||void 0,version:null!=(o=e.version)?o:"0",scope:Array.isArray(e.scope)?e.scope:[null!=(i=e.scope)?i:"default"],strategy:(null!=(s=e.strategy)?s:n)||"version-first"})}function or(e,t){let r=t.shared||{},n=t.name,o=Object.keys(r).reduce((e,o)=>{let i=Wt(r[o]);return e[o]=e[o]||[],i.forEach(r=>{e[o].push(vn(r,n,o,t.shareStrategy))}),e},{}),i=b({},e.shared);return Object.keys(o).forEach(e=>{i[e]?o[e].forEach(t=>{i[e].find(e=>e.version===t.version)||i[e].push(t)}):i[e]=o[e]}),{shared:i,shareInfos:o}}function pe(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!!He(r(e),`<=${r(t)}`)}var Et=(e,t)=>{let r=t||function(e,t){return pe(e,t)};return Object.keys(e).reduce((e,t)=>!e||r(e,t)||"0"===e?t:e,0)},gt=e=>!!e.loaded||"function"==typeof e.lib,Dn=e=>!!e.loading;function kn(e,t,r){let n=e[t][r];return Et(e[t][r],function(e,t){return!gt(n[e])&&pe(e,t)})}function Hn(e,t,r){let n=e[t][r];return Et(e[t][r],function(e,t){let r=e=>gt(e)||Dn(e);return r(n[t])?!r(n[e])||!!pe(e,t):!r(n[e])&&pe(e,t)})}function Cn(e){return"loaded-first"===e?Hn:kn}function Ce(e,t,r,n){if(!e)return;let{shareConfig:o,scope:i=ye,strategy:s}=r,l=Array.isArray(i)?i:[i];for(let i of l)if(o&&e[i]&&e[i][t]){let{requiredVersion:l}=o,a=Cn(s)(e,i,t),u=()=>{if(o.singleton){if("string"==typeof l&&!He(a,l)){let n=`Version ${a} from ${a&&e[i][t][a].from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${l})`;o.strictVersion?W(n):xe(n)}return e[i][t][a]}if(!1===l||"*"===l||He(a,l))return e[i][t][a];for(let[r,n]of Object.entries(e[i][t]))if(He(r,l))return n},c={shareScopeMap:e,scope:i,pkgName:t,version:a,GlobalFederation:he.__FEDERATION__,resolver:u};return(n.emit(c)||c).resolver()}}function sr(){return he.__FEDERATION__.__SHARE__}function jt(e){var t;let{pkgName:r,extraOptions:n,shareInfos:o}=e,i=null!=(t=null==n?void 0:n.resolver)?t:e=>{if(!e)return;let t={};e.forEach(e=>{t[e.version]=e});let r=Et(t,function(e,r){return!gt(t[e])&&pe(e,r)});return t[r]};return Object.assign({},i(o[r]),null==n?void 0:n.customShareInfo)}function xn(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}function Gn(e,t){for(let r of e){let e=t.startsWith(r.name),n=t.replace(r.name,"");if(e){if(n.startsWith("/")){return n=`.${n}`,{pkgNameOrAlias:r.name,expose:n,remote:r}}if(""===n)return{pkgNameOrAlias:r.name,expose:".",remote:r}}let o=r.alias&&t.startsWith(r.alias),i=r.alias&&t.replace(r.alias,"");if(r.alias&&o){if(i&&i.startsWith("/")){return i=`.${i}`,{pkgNameOrAlias:r.alias,expose:i,remote:r}}if(""===i)return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Un(e,t){for(let r of e)if(t===r.name||r.alias&&t===r.alias)return r}function Vn(e,t){let r=rn(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(t=>{null!=e&&e.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{n.forEach(r=>{r.applyPlugin(e,t)})}),e}var ir=".then(callbacks[0]).catch(callbacks[1])";function jn(e){return _(this,arguments,function*({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):new Function("callbacks",`import("${e}")${ir}`)([r,n])}catch(e){n(e)}})})}function Bn(e){return _(this,arguments,function*({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):"undefined"==typeof __system_context__?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${ir}`)([r,n])}catch(e){n(e)}})})}function ar(e,t,r){let{remoteEntryKey:n,entryExports:o}=mt(e,t);return P(o,F(Qe,M,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n})),o}function Wn(e){return _(this,arguments,function*({name:e,globalName:t,entry:r,loaderHook:n,getEntryUrl:o}){let{entryExports:i}=mt(e,t);return i||Z(o?o(r):r,{attrs:{},createScriptHook:(e,t)=>{let r=n.lifecycle.createScript.emit({url:e,attrs:t});if(r&&(r instanceof HTMLScriptElement||"script"in r||"timeout"in r))return r}}).then(()=>ar(e,t,r)).catch(t=>{throw P(void 0,F(Oe,M,{remoteName:e,resourceUrl:r})),t})})}function Kn(e){return _(this,arguments,function*({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){let{entry:o,entryGlobalName:i,name:s,type:l}=e;switch(l){case"esm":case"module":return jn({entry:o,remoteEntryExports:t});case"system":return Bn({entry:o,remoteEntryExports:t});default:return Wn({entry:o,globalName:i,name:s,loaderHook:r,getEntryUrl:n})}})}function qn(e){return _(this,arguments,function*({remoteInfo:e,loaderHook:t}){let{entry:r,entryGlobalName:n,name:o,type:i}=e,{entryExports:s}=mt(o,n);return s||Q(r,{attrs:{name:o,globalName:n,type:i},loaderHook:{createScriptHook:(e,r={})=>{let n=t.lifecycle.createScript.emit({url:e,attrs:r});if(n&&"url"in n)return n}}}).then(()=>ar(o,n,r)).catch(e=>{throw e})})}function lt(e){let{entry:t,name:r}=e;return Se(r,t)}function oe(e){return _(this,null,function*(){let{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:i=!1}=e,s=lt(n);if(r)return r;if(!ee[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;ee[s]=e.emit({loaderHook:l,remoteInfo:n,remoteEntryExports:r}).then(e=>e||(("undefined"!=typeof ENV_TARGET?"web"===ENV_TARGET:V())?Kn({remoteInfo:n,remoteEntryExports:r,loaderHook:l,getEntryUrl:o}):qn({remoteInfo:n,loaderHook:l}))).catch(e=>_(null,null,function*(){let o=lt(n);if(e instanceof Error&&e.message.includes(Oe)&&!i){let e=e=>oe(L(b({},e),{_inErrorHandling:!0})),i=yield t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:ee,uniqueKey:o});if(i)return i}throw e}))}return ee[s]})}function me(e){return L(b({},e),{entry:"entry"in e?e.entry:"",type:e.type||Zt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||ye})}function cr(e){return b({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},e)}function zn(e,t){return t.map(t=>{let r=Un(e,t.nameOrAlias);return P(r,`Unable to preload ${t.nameOrAlias} as it is not included in ${!r&&Ne({remoteInfo:r,remotes:e})}`),{remote:r,preloadConfig:cr(t)}})}function Xn(e){return e?e.map(e=>"."===e?e:e.startsWith("./")?e.replace("./",""):e):[]}function lr(e,t,r,n=!0){let{cssAssets:o,jsAssetsWithoutEntry:i,entryAssets:s}=r;if(t.options.inBrowser){if(s.forEach(r=>{let{moduleInfo:n}=r,o=t.moduleCache.get(e.name);oe(o?{origin:t,remoteInfo:n,remoteEntryExports:o.remoteEntryExports}:{origin:t,remoteInfo:n,remoteEntryExports:void 0})}),n){let e={rel:"preload",as:"style"};o.forEach(r=>{let{link:n,needAttach:o}=ue({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n}});o&&document.head.appendChild(n)})}else{let e={rel:"stylesheet",type:"text/css"};o.forEach(r=>{let{link:n,needAttach:o}=ue({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n},needDeleteLink:!1});o&&document.head.appendChild(n)})}if(n){let e={rel:"preload",as:"script"};i.forEach(r=>{let{link:n,needAttach:o}=ue({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n}});o&&document.head.appendChild(n)})}else{let r={fetchpriority:"high",type:"module"===(null==e?void 0:e.type)?"module":"text/javascript"};i.forEach(e=>{let{script:n,needAttach:o}=we({url:e,cb:()=>{},attrs:r,createScriptHook:(e,r)=>{let n=t.loaderHook.lifecycle.createScript.emit({url:e,attrs:r});if(n instanceof HTMLScriptElement)return n},needDeleteScript:!0});o&&document.head.appendChild(n)})}}}var se=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}getEntry(){return _(this,null,function*(){if(this.remoteEntryExports)return this.remoteEntryExports;let e=yield oe({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports});return P(e,`remoteEntryExports is undefined \n ${Ne(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports})}init(e,t){return _(this,null,function*(){let r=yield this.getEntry();if(!this.inited){let n=this.host.shareScopeMap,o=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];o.length||o.push("default"),o.forEach(e=>{n[e]||(n[e]={})});let i=n[o[0]],s=[],l={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?o:this.remoteInfo.shareScope||"default"};Object.defineProperty(l,"shareScopeMap",{value:n,enumerable:!1});let a=yield this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:l,initScope:s,remoteInfo:this.remoteInfo,origin:this.host});void 0===(null==r?void 0:r.init)&&W(F(et,M,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),yield r.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),yield this.host.hooks.lifecycle.initContainer.emit(L(b({},a),{id:e,remoteSnapshot:t,remoteEntryExports:r}))}return r})}get(e,t,r,n){return _(this,null,function*(){let o,{loadFactory:i=!0}=r||{loadFactory:!0},s=yield this.init(e,n);this.lib=s,this.inited=!0,o=yield this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),o||(o=yield s.get(t)),P(o,`${de(this.remoteInfo)} remote don't export ${t}.`);let l=Qr(this.remoteInfo.name,t),a=this.wraperFactory(o,l);return i?yield a():a})}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 e instanceof Promise?()=>_(null,null,function*(){let n=yield e();return r(n,t),n}):()=>{let n=e();return r(n,t),n}}},k=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(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},C=class extends k{emit(...e){let t,r=Array.from(this.listeners);if(r.length>0){let n=0,o=t=>!1!==t&&(n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):t);t=o()}return Promise.resolve(t)}};function ur(e,t){if(!pt(t))return!1;if(e!==t)for(let r in e)if(!(r in t))return!1;return!0}var Y=class extends k{constructor(e){super(),this.onerror=W,this.type=e}emit(e){pt(e)||W(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let r=t(e);if(!ur(e,r)){this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}e=r}catch(e){xe(e),this.onerror(e)}return e}},B=class extends k{constructor(e){super(),this.onerror=W,this.type=e}emit(e){pt(e)||W(`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,n=t=>(xe(t),this.onerror(t),e),o=i=>{if(ur(e,i)){if(e=i,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(e){return n(e)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(o(e))}return Promise.resolve(e)}},z=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){var r;P(Zr(e),"Plugin configuration is invalid.");let n=e.name;P(n,"A name must be provided by the plugin."),this.registerPlugins[n]||(this.registerPlugins[n]=e,null==(r=e.apply)||r.call(e,t),Object.keys(this.lifecycle).forEach(t=>{let r=e[t];r&&this.lifecycle[t].on(r)}))}removePlugin(e){P(e,"A name is required.");let t=this.registerPlugins[e];P(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{"name"!==e&&this.lifecycle[e].remove(t[e])})}};function fr(e,t){let r=Kt(t);r.url||W(`The attribute remoteEntry of ${e.name} must not be undefined.`);let n=le(t,r.url);!V()&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function Yn(){return{name:"snapshot-plugin",afterResolve(e){return _(this,null,function*(){let{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:i,id:s}=e;if(!ht(t)||!Bt(t)){let{remoteSnapshot:l,globalSnapshot:a}=yield o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:s});fr(i,l);let u={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},c=yield o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:u,remoteInfo:i,remote:t,remoteSnapshot:l,globalSnapshot:a});return c&&lr(i,o,c,!1),L(b({},e),{remoteSnapshot:l})}return e})}}}function Jn(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]}}function dr(e,t,r,n,o={},i){let s=de(t),{value:l}=re(e,s),a=i||l;if(a&&!$e(a)&&(r(a,t,n),a.remotesInfo)){let t=Object.keys(a.remotesInfo);for(let n of t){if(o[n])continue;o[n]=!0;let t=Jn(n),i=a.remotesInfo[n];dr(e,{name:t.name,version:i.matchedVersion},r,!1,o,void 0)}}}var at=(e,t)=>document.querySelector(`${e}[${"link"===e?"href":"src"}="${t}"]`);function Zn(e,t,r,n,o){let i=[],s=[],l=[],a=new Set,u=new Set,{options:c}=e,{preloadConfig:h}=t,{depsRemote:f}=h;if(dr(n,r,(t,r,n)=>{var o;let a;if(n)a=h;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===r.name||e.nameOrAlias===r.alias);if(!e)return;a=cr(e)}else{if(!0!==f)return;a=h}let u=le(t,Kt(t).url);u&&l.push({name:r.name,moduleInfo:{name:r.name,entry:u,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:u});let c="modules"in t?t.modules:[],m=Xn(a.exposes);function d(e){let r=e.map(e=>le(t,e));return a.filter?r.filter(a.filter):r}if(m.length&&"modules"in t&&(c=null==(o=null==t?void 0:t.modules)?void 0:o.reduce((e,t)=>(-1!==(null==m?void 0:m.indexOf(t.moduleName))&&e.push(t),e),[])),c){let n=c.length;for(let o=0;o<n;o++){let n=c[o],l=`${r.name}/${n.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:"."===n.moduleName?r.name:l,name:r.name,remoteSnapshot:t,preloadConfig:a,remote:r,origin:e}),!nn(l)&&("all"===a.resourceCategory?(i.push(...d(n.assets.css.async)),i.push(...d(n.assets.css.sync)),s.push(...d(n.assets.js.async)),s.push(...d(n.assets.js.sync))):(a.resourceCategory="sync")&&(i.push(...d(n.assets.css.sync)),s.push(...d(n.assets.js.sync))),on(l))}}},!0,{},o),o.shared&&o.shared.length>0){let t=(t,r)=>{let n=Ce(e.shareScopeMap,r.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare);n&&"function"==typeof n.lib&&(r.assets.js.sync.forEach(e=>{a.add(e)}),r.assets.css.sync.forEach(e=>{u.add(e)}))};o.shared.forEach(e=>{var r;let n=null==(r=c.shared)?void 0:r[e.sharedName];if(!n)return;let o=e.version?n.find(t=>t.version===e.version):n;o&&Wt(o).forEach(r=>{t(r,e)})})}let m=s.filter(e=>!a.has(e)&&!at("script",e));return{cssAssets:i.filter(e=>!u.has(e)&&!at("link",e)),jsAssetsWithoutEntry:m,entryAssets:l.filter(e=>!at("script",e.url))}}var Qn=function(){return{name:"generate-preload-assets-plugin",generatePreloadAssets(e){return _(this,null,function*(){let{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:i,remoteSnapshot:s}=e;return V()?ht(o)&&Bt(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(fr(n,s),Zn(t,r,n,i,s)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}})}}};function hr(e,t){let r=ve({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&re(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:kt(),remoteSnapshot:ve({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:kt(),remoteSnapshot:ve({name:e.name,version:"version"in e?e.version:void 0})}}var ut=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new z({beforeLoadRemoteSnapshot:new C("beforeLoadRemoteSnapshot"),loadSnapshot:new B("loadGlobalSnapshot"),loadRemoteSnapshot:new B("loadRemoteSnapshot"),afterLoadSnapshot:new B("afterLoadSnapshot")}),this.manifestLoading=he.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}loadRemoteSnapshotInfo(e){return _(this,arguments,function*({moduleInfo:e,id:t,expose:r}){let{options:n}=this.HostInstance;yield this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=ve({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},tn({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!re(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo=L(b({},null==o?void 0:o.remotesInfo),{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));let i,s,{hostGlobalSnapshot:l,remoteSnapshot:a,globalSnapshot:u}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:h}=yield this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:l,remoteSnapshot:a,globalSnapshot:u});if(c)if($e(c)){let t=V()?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",r=yield this.getManifestJson(t,e,{});i=r,s=Ht(L(b({},e),{entry:t}),r)}else{let{remoteSnapshot:t}=yield this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});i=t,s=h}else if(ht(e)){let t=yield this.getManifestJson(e.entry,e,{}),r=Ht(e,t),{remoteSnapshot:n}=yield this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:t,from:"global"});i=n,s=r}else W(F(ot,M,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(h)}));return yield this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:i}),{remoteSnapshot:i,globalSnapshot:s}})}getGlobalRemoteInfo(e){return hr(e,this.HostInstance)}getManifestJson(e,t,r){return _(this,null,function*(){let r=()=>_(this,null,function*(){let r=this.manifestCache.get(e);if(r)return r;try{let t=yield this.loaderHook.lifecycle.fetch.emit(e,{});(!t||!(t instanceof Response))&&(t=yield fetch(e,{})),r=yield t.json()}catch(n){r=yield this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),r||(delete this.manifestLoading[e],W(F(tt,M,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${n}`)))}return P(r.metaData&&r.exposes&&r.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,r),r});return this.manifestLoading[e]||(this.manifestLoading[e]=(()=>_(this,null,function*(){let n=yield r(),o=Ye(n,{version:e}),{remoteSnapshot:i}=yield this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:n,remoteSnapshot:o,manifestUrl:e,from:"manifest"});return i}))().then(e=>e)),this.manifestLoading[e]})}},ft=class{constructor(e){this.hooks=new z({afterResolve:new B("afterResolve"),beforeLoadShare:new B("beforeLoadShare"),loadShare:new C,resolveShare:new Y("resolveShare"),initContainerShareScopeMap:new Y("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){let{shareInfos:r,shared:n}=or(e,t);return Object.keys(r).forEach(e=>{r[e].forEach(r=>{r.scope.forEach(n=>{var o;(null==(o=this.shareScopeMap[n])?void 0:o[e])||this.setShared({pkgName:e,lib:r.lib,get:r.get,loaded:r.loaded||!!r.lib,shared:r,from:t.name})})})}),{shareInfos:r,shared:n}}loadShare(e,t){return _(this,null,function*(){let{host:r}=this,n=jt({pkgName:e,extraOptions:t,shareInfos:r.options.shared});null!=n&&n.scope&&(yield Promise.all(n.scope.map(e=>_(this,null,function*(){yield Promise.all(this.initializeSharing(e,{strategy:n.strategy}))}))));let o=yield this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r}),{shareInfo:i}=o;P(i,`Cannot find ${e} Share in the ${r.options.name}. Please ensure that the ${e} Share parameters have been injected`);let s=Ce(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare),l=e=>{e.useIn||(e.useIn=[]),Dt(e.useIn,r.options.name)};if(s&&s.lib)return l(s),s.lib;if(s&&s.loading&&!s.loaded){let e=yield s.loading;return s.loaded=!0,s.lib||(s.lib=e),l(s),e}if(s){let t=_(this,null,function*(){let e=yield s.get();return l(s),s.loaded=!0,s.lib=e,e});return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:t}),t}{if(null!=t&&t.customShareInfo)return!1;let n=_(this,null,function*(){let t=yield i.get();i.lib=t,i.loaded=!0,l(i);let r=Ce(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare);return r&&(r.lib=t,r.loaded=!0,r.from=i.from),t});return this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:n}),n}})}initializeSharing(e=ye,t){let{host:r}=this,n=null==t?void 0:t.from,o=null==t?void 0:t.strategy,i=null==t?void 0:t.initScope,s=[];if("build"!==n){let{initTokens:t}=this;i||(i=[]);let r=t[e];if(r||(r=t[e]={from:this.host.name}),i.indexOf(r)>=0)return s;i.push(r)}let l=this.shareScopeMap,a=r.options.name;l[e]||(l[e]={});let u=l[e],c=e=>_(this,null,function*(){let{module:t}=yield r.remoteHandler.getRemoteModuleAndOptions({id:e});yield t.init()});return Object.keys(r.options.shared).forEach(t=>{r.options.shared[t].forEach(r=>{r.scope.includes(e)&&((e,t)=>{var r;let{version:n,eager:o}=t;u[e]=u[e]||{};let i=u[e],s=i[n],l=!(!s||!(s.eager||null!=(r=s.shareConfig)&&r.eager));(!s||"loaded-first"!==s.strategy&&!s.loaded&&(!o!=!l?o:a>s.from))&&(i[n]=t)})(t,r)})}),("version-first"===r.options.shareStrategy||"version-first"===o)&&r.options.remotes.forEach(t=>{t.shareScope===e&&s.push(c(t.name))}),s}loadShareSync(e,t){let{host:r}=this,n=jt({pkgName:e,extraOptions:t,shareInfos:r.options.shared});null!=n&&n.scope&&n.scope.forEach(e=>{this.initializeSharing(e,{strategy:n.strategy})});let o=Ce(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare),i=e=>{e.useIn||(e.useIn=[]),Dt(e.useIn,r.options.name)};if(o){if("function"==typeof o.lib)return i(o),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if("function"==typeof o.get){let t=o.get();if(!(t instanceof Promise))return i(o),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:t,shared:o}),t}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){let o=n.get();if(o instanceof Promise){let n="build"===(null==t?void 0:t.from)?nt:Pe;throw new Error(F(n,M,{hostName:r.options.name,sharedPkgName:e}))}return n.lib=o,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}throw new Error(F(Pe,M,{hostName:r.options.name,sharedPkgName:e}))}initShareScopeMap(e,t,r={}){let{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:i,get:s}){let l=t,{version:a,scope:u="default"}=l,c=Ve(l,["version","scope"]);(Array.isArray(u)?u:[u]).forEach(t=>{if(this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),!this.shareScopeMap[t][e][a])return this.shareScopeMap[t][e][a]=L(b({version:a,scope:[t]},c),{lib:n,loaded:i,loading:o}),void(s&&(this.shareScopeMap[t][e][a].get=s));let l=this.shareScopeMap[t][e][a];o&&!l.loading&&(l.loading=o),i&&!l.loaded&&(l.loaded=i),r&&l.from!==r&&(l.from=r)})}_setGlobalShareScopeMap(e){let t=sr(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},dt=class{constructor(e){this.hooks=new z({beforeRegisterRemote:new Y("beforeRegisterRemote"),registerRemote:new Y("registerRemote"),beforeRequest:new B("beforeRequest"),onLoad:new C("onLoad"),handlePreloadModule:new k("handlePreloadModule"),errorLoadRemote:new C("errorLoadRemote"),beforePreloadRemote:new C("beforePreloadRemote"),generatePreloadAssets:new C("generatePreloadAssets"),afterPreloadRemote:new C,loadEntry:new C}),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:n}=t,{name:o,alias:i}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},i&&e.startsWith(o)){let t=e.replace(o,i);return void(this.idToRemoteMap[t]={name:r.name,expose:n})}if(i&&e.startsWith(i)){let t=e.replace(i,o);this.idToRemoteMap[t]={name:r.name,expose:n}}}loadRemote(e,t){return _(this,null,function*(){let{host:r}=this;try{let{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:i,remoteMatchInfo:s}=yield this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:l,remote:a,expose:u,id:c,remoteSnapshot:h}=s,f=yield o.get(c,u,t,h),m=yield this.hooks.lifecycle.onLoad.emit({id:c,pkgNameOrAlias:l,expose:u,exposeModule:n?f:void 0,exposeModuleFactory:n?void 0:f,remote:a,options:i,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,s),"function"==typeof m?m:f}catch(n){let{from:o="runtime"}=t||{from:"runtime"},i=yield this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!i)throw n;return i}})}preloadRemote(e){return _(this,null,function*(){let{host:t}=this;yield this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=zn(t.options.remotes,e);yield Promise.all(r.map(e=>_(this,null,function*(){let{remote:r}=e,n=me(r),{globalSnapshot:o,remoteSnapshot:i}=yield t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:r}),s=yield this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:e,remote:r,remoteInfo:n,globalSnapshot:o,remoteSnapshot:i});s&&lr(n,t,s)})))})}registerRemotes(e,t){let{host:r}=this;e.forEach(e=>{this.registerRemote(e,r.options.remotes,{force:null==t?void 0:t.force})})}getRemoteModuleAndOptions(e){return _(this,null,function*(){let t,{host:r}=this,{id:n}=e;try{t=yield this.hooks.lifecycle.beforeRequest.emit({id:n,options:r.options,origin:r})}catch(e){if(t=yield this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:r.options,origin:r,from:"runtime",error:e,lifecycle:"beforeRequest"}),!t)throw e}let{id:o}=t,i=Gn(r.options.remotes,o);P(i,F(rt,M,{hostName:r.options.name,requestId:o}));let{remote:s}=i,l=me(s),a=yield r.sharedHandler.hooks.lifecycle.afterResolve.emit(L(b({id:o},i),{options:r.options,origin:r,remoteInfo:l})),{remote:u,expose:c}=a;P(u&&c,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let h=r.moduleCache.get(u.name),f={host:r,remoteInfo:l};return h||(h=new se(f),r.moduleCache.set(u.name,h)),{module:h,moduleOptions:f,remoteMatchInfo:a}})}registerRemote(e,t,r){let{host:n}=this,o=()=>{if(e.alias){let r=t.find(t=>{var r;return e.alias&&(t.name.startsWith(e.alias)||(null==(r=t.alias)?void 0:r.startsWith(e.alias)))});P(!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&&V()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=ye),e.type||(e.type=Zt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});let i=t.find(t=>t.name===e.name);if(i){let s=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];null!=r&&r.force&&(this.removeRemote(i),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),Ie(s.join(" ")))}else o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n})}removeRemote(e){var t;try{let{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(e=>e.name===n);-1!==o&&r.options.remotes.splice(o,1);let i=r.moduleCache.get(e.name);if(i){let n=i.remoteInfo,o=n.entryGlobalName;O[o]&&(null!=(t=Object.getOwnPropertyDescriptor(O,o))&&t.configurable?delete O[o]:O[o]=void 0);let s=lt(i.remoteInfo);ee[s]&&delete ee[s],r.snapshotHandler.manifestCache.delete(n.entry);let l=n.buildVersion?Se(n.name,n.buildVersion):n.name,a=O.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===l:e.name===l);if(-1!==a){let e=O.__FEDERATION__.__INSTANCES__[a];l=e.options.id||l;let t=sr(),r=!0,o=[];Object.keys(t).forEach(e=>{let i=t[e];i&&Object.keys(i).forEach(t=>{let s=i[t];s&&Object.keys(s).forEach(i=>{let l=s[i];l&&Object.keys(l).forEach(s=>{let a=l[s];a&&"object"==typeof a&&a.from===n.name&&(a.loaded||a.loading?(a.useIn=a.useIn.filter(e=>e!==n.name),a.useIn.length?r=!1:o.push([e,t,i,s])):o.push([e,t,i,s]))})})})}),r&&(e.shareScopeMap={},delete t[l]),o.forEach(([e,r,n,o])=>{var i,s,l;null==(l=null==(s=null==(i=t[e])?void 0:i[r])?void 0:s[n])||delete l[o]}),O.__FEDERATION__.__INSTANCES__.splice(a,1)}let{hostGlobalSnapshot:u}=hr(e,r);if(u){let t=u&&"remotesInfo"in u&&u.remotesInfo&&re(u.remotesInfo,e.name).key;t&&(delete u.remotesInfo[t],he.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete he.__FEDERATION__.__MANIFEST_LOADING__[t])}r.moduleCache.delete(e.name)}}catch(e){ct.log("removeRemote fail: ",e)}}},eo="boolean"!=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,J=class{constructor(e){this.hooks=new z({beforeInit:new Y("beforeInit"),init:new k,beforeInitContainer:new B("beforeInitContainer"),initContainer:new B("initContainer")}),this.version="0.23.0",this.moduleCache=new Map,this.loaderHook=new z({getModuleInfo:new k,createScript:new k,createLink:new k,fetch:new C,loadEntryError:new C,getModuleFactory:new C}),this.bridgeHook=new z({beforeBridgeRender:new k,afterBridgeRender:new k,beforeBridgeDestroy:new k,afterBridgeDestroy:new k});let t=eo?[Yn(),Qn()]:[],r={id:xn(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:V()};this.name=e.name,this.options=r,this.snapshotHandler=new ut(this),this.sharedHandler=new ft(this),this.remoteHandler=new dt(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}loadShare(e,t){return _(this,null,function*(){return this.sharedHandler.loadShare(e,t)})}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ye,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){let n=me({name:e,entry:t}),o=new se({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}loadRemote(e,t){return _(this,null,function*(){return this.remoteHandler.loadRemote(e,t)})}preloadRemote(e){return _(this,null,function*(){return this.remoteHandler.preloadRemote(e)})}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){let{shared:r}=or(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),i=this.remoteHandler.formatAndRegisterRemote(o,n),{shared:s}=this.sharedHandler.registerShared(o,n),l=[...o.plugins];n.plugins&&n.plugins.forEach(e=>{l.includes(e)||l.push(e)});let a=L(b(b({},e),t),{plugins:l,remotes:i,shared:s});return this.hooks.lifecycle.init.emit({origin:this,options:a}),a}registerPlugins(e){let t=Vn(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,L(b({},this.options),{shared:e}))}};function to(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}function pr(e,t){let r=to();return O.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}function mr(e){let t=new(Xt()||J)(e);return zt(t),t}var $=null;function ro(e){let t=pr(e.name,e.version);return t?(t.initOptions(e),$||($=t),t):$=mr(e)}function no(...e){return P($,F(q,M)),$.loadRemote.apply($,e)}function oo(...e){return P($,F(q,M)),$.loadShare.apply($,e)}function so(...e){return P($,F(q,M)),$.loadShareSync.apply($,e)}function io(...e){return P($,F(q,M)),$.preloadRemote.apply($,e)}function ao(...e){return P($,F(q,M)),$.registerRemotes.apply($,e)}function co(...e){return P($,F(q,M)),$.registerPlugins.apply($,e)}function lo(){return $}function uo(...e){return P($,F(q,M)),$.registerShared.apply($,e)}return Yt(J),window[$t]={MFRuntime:Ge,MFSDK:Ae},exports.MFRuntime=Ge,exports.MFSDK=Ae,exports}({});
|