@module-federation/bridge-vue3 2.0.1 → 2.1.0
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/CHANGELOG.md +10 -0
- package/dist/index.cjs +8 -8
- package/dist/index.js +1814 -1942
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,134 +1,131 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { defineComponent, ref, useAttrs, watch, onMounted, onBeforeUnmount, createVNode, mergeProps, defineAsyncComponent, h } from "vue";
|
|
3
|
-
import * as
|
|
4
|
-
import { useRoute } from "vue-router";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
1
|
+
import * as Mt from "vue";
|
|
2
|
+
import { defineComponent as Ct, ref as Ee, useAttrs as Dt, watch as Ft, onMounted as Ht, onBeforeUnmount as Gt, createVNode as Ut, mergeProps as xt, defineAsyncComponent as Bt, h as Vt } from "vue";
|
|
3
|
+
import * as ae from "vue-router";
|
|
4
|
+
import { useRoute as Ke } from "vue-router";
|
|
5
|
+
const Wt = ".json", jt = "FEDERATION_DEBUG", Kt = ":";
|
|
6
|
+
let $e = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e[e.UNKNOWN = 1] = "UNKNOWN", e[e.CALCULATED = 2] = "CALCULATED", e[e.NO_USE = 0] = "NO_USE", e;
|
|
8
|
+
}({});
|
|
9
|
+
function F() {
|
|
7
10
|
return typeof window < "u" && typeof window.document < "u";
|
|
8
11
|
}
|
|
9
|
-
function
|
|
12
|
+
function qe() {
|
|
10
13
|
return typeof navigator < "u" && (navigator == null ? void 0 : navigator.product) === "ReactNative";
|
|
11
14
|
}
|
|
12
|
-
function
|
|
15
|
+
function qt() {
|
|
13
16
|
try {
|
|
14
|
-
if (
|
|
15
|
-
return !!localStorage.getItem(BROWSER_LOG_KEY);
|
|
17
|
+
if (F() && window.localStorage) return !!localStorage.getItem(jt);
|
|
16
18
|
} catch {
|
|
17
19
|
return !1;
|
|
18
20
|
}
|
|
19
21
|
return !1;
|
|
20
22
|
}
|
|
21
|
-
function
|
|
22
|
-
return typeof process < "u" && process.env && process.env.FEDERATION_DEBUG ? !!process.env.FEDERATION_DEBUG : typeof FEDERATION_DEBUG < "u" && FEDERATION_DEBUG ? !0 :
|
|
23
|
-
}
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
},
|
|
27
|
-
if ("getPublicPath" in
|
|
28
|
-
let
|
|
29
|
-
return
|
|
30
|
-
} else return "publicPath" in
|
|
31
|
-
},
|
|
32
|
-
console.warn(`${
|
|
23
|
+
function we() {
|
|
24
|
+
return typeof process < "u" && process.env && process.env.FEDERATION_DEBUG ? !!process.env.FEDERATION_DEBUG : typeof FEDERATION_DEBUG < "u" && FEDERATION_DEBUG ? !0 : qt();
|
|
25
|
+
}
|
|
26
|
+
const zt = "[ Federation Runtime ]", ze = function(...e) {
|
|
27
|
+
return e.length ? e.reduce((t, r) => r ? t ? `${t}${Kt}${r}` : r : t, "") : "";
|
|
28
|
+
}, Ie = (e, t) => {
|
|
29
|
+
if ("getPublicPath" in e) {
|
|
30
|
+
let r;
|
|
31
|
+
return e.getPublicPath.startsWith("function") ? r = new Function("return " + e.getPublicPath)()() : r = new Function(e.getPublicPath)(), `${r}${t}`;
|
|
32
|
+
} else return "publicPath" in e ? !F() && !qe() && "ssrPublicPath" in e && typeof e.ssrPublicPath == "string" ? `${e.ssrPublicPath}${t}` : `${e.publicPath}${t}` : (console.warn("Cannot get resource URL. If in debug mode, please ignore.", e, t), "");
|
|
33
|
+
}, Je = (e) => {
|
|
34
|
+
console.warn(`${zt}: ${e}`);
|
|
33
35
|
};
|
|
34
|
-
function
|
|
36
|
+
function Xe(e) {
|
|
35
37
|
try {
|
|
36
|
-
return JSON.stringify(
|
|
38
|
+
return JSON.stringify(e, null, 2);
|
|
37
39
|
} catch {
|
|
38
40
|
return "";
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
|
-
const
|
|
42
|
-
if (!
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return s.
|
|
49
|
-
if (s.startsWith("/")) {
|
|
50
|
-
const i = s.slice(1);
|
|
51
|
-
return i.endsWith("/") ? i.slice(0, -1) : i;
|
|
43
|
+
const ne = (e, t) => {
|
|
44
|
+
if (!e) return t;
|
|
45
|
+
const n = ((o) => {
|
|
46
|
+
if (o === ".") return "";
|
|
47
|
+
if (o.startsWith("./")) return o.replace("./", "");
|
|
48
|
+
if (o.startsWith("/")) {
|
|
49
|
+
const s = o.slice(1);
|
|
50
|
+
return s.endsWith("/") ? s.slice(0, -1) : s;
|
|
52
51
|
}
|
|
53
|
-
return
|
|
54
|
-
})(
|
|
55
|
-
return
|
|
52
|
+
return o;
|
|
53
|
+
})(e);
|
|
54
|
+
return n ? n.endsWith("/") ? `${n}${t}` : `${n}/${t}` : t;
|
|
56
55
|
};
|
|
57
|
-
function
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
function
|
|
61
|
-
var
|
|
62
|
-
const { remotes:
|
|
63
|
-
let
|
|
64
|
-
const
|
|
65
|
-
let
|
|
66
|
-
Object.keys(
|
|
67
|
-
let
|
|
68
|
-
const
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
let
|
|
78
|
-
version:
|
|
79
|
-
buildVersion:
|
|
80
|
-
globalName:
|
|
81
|
-
remoteEntry:
|
|
82
|
-
remoteEntryType:
|
|
83
|
-
remoteTypes:
|
|
84
|
-
remoteTypesZip:
|
|
85
|
-
remoteTypesAPI:
|
|
86
|
-
remotesInfo:
|
|
87
|
-
shared:
|
|
88
|
-
assets:
|
|
89
|
-
sharedName:
|
|
90
|
-
version:
|
|
91
|
-
|
|
92
|
-
usedExports: I.referenceExports || []
|
|
56
|
+
function Jt(e) {
|
|
57
|
+
return e.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
58
|
+
}
|
|
59
|
+
function Xt(e, t = {}) {
|
|
60
|
+
var g, b, w;
|
|
61
|
+
const { remotes: r = {}, overrides: n = {}, version: o } = t;
|
|
62
|
+
let s;
|
|
63
|
+
const i = () => "publicPath" in e.metaData ? (e.metaData.publicPath === "auto" || e.metaData.publicPath === "") && o ? Jt(o) : e.metaData.publicPath : e.metaData.getPublicPath, a = Object.keys(n);
|
|
64
|
+
let c = {};
|
|
65
|
+
Object.keys(r).length || (c = ((g = e.remotes) == null ? void 0 : g.reduce((_, S) => {
|
|
66
|
+
let R;
|
|
67
|
+
const $ = S.federationContainerName;
|
|
68
|
+
return a.includes($) ? R = n[$] : "version" in S ? R = S.version : R = S.entry, _[$] = { matchedVersion: R }, _;
|
|
69
|
+
}, {})) || {}), Object.keys(r).forEach((_) => c[_] = { matchedVersion: a.includes(_) ? n[_] : r[_] });
|
|
70
|
+
const { remoteEntry: { path: l, name: f, type: d }, types: u = {
|
|
71
|
+
path: "",
|
|
72
|
+
name: "",
|
|
73
|
+
zip: "",
|
|
74
|
+
api: ""
|
|
75
|
+
}, buildInfo: { buildVersion: h }, globalName: p, ssrRemoteEntry: y } = e.metaData, { exposes: E } = e;
|
|
76
|
+
let m = {
|
|
77
|
+
version: o || "",
|
|
78
|
+
buildVersion: h,
|
|
79
|
+
globalName: p,
|
|
80
|
+
remoteEntry: ne(l, f),
|
|
81
|
+
remoteEntryType: d,
|
|
82
|
+
remoteTypes: ne(u.path, u.name),
|
|
83
|
+
remoteTypesZip: u.zip || "",
|
|
84
|
+
remoteTypesAPI: u.api || "",
|
|
85
|
+
remotesInfo: c,
|
|
86
|
+
shared: e == null ? void 0 : e.shared.map((_) => ({
|
|
87
|
+
assets: _.assets,
|
|
88
|
+
sharedName: _.name,
|
|
89
|
+
version: _.version,
|
|
90
|
+
usedExports: _.referenceExports || []
|
|
93
91
|
})),
|
|
94
|
-
modules: E == null ? void 0 : E.map((
|
|
95
|
-
moduleName:
|
|
96
|
-
modulePath:
|
|
97
|
-
assets:
|
|
92
|
+
modules: E == null ? void 0 : E.map((_) => ({
|
|
93
|
+
moduleName: _.name,
|
|
94
|
+
modulePath: _.path,
|
|
95
|
+
assets: _.assets
|
|
98
96
|
}))
|
|
99
97
|
};
|
|
100
|
-
if ((
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
...
|
|
104
|
-
prefetchInterface:
|
|
98
|
+
if ((b = e.metaData) != null && b.prefetchInterface) {
|
|
99
|
+
const _ = e.metaData.prefetchInterface;
|
|
100
|
+
m = {
|
|
101
|
+
...m,
|
|
102
|
+
prefetchInterface: _
|
|
105
103
|
};
|
|
106
104
|
}
|
|
107
|
-
if ((
|
|
108
|
-
const { path:
|
|
109
|
-
|
|
110
|
-
...
|
|
111
|
-
prefetchEntry:
|
|
112
|
-
prefetchEntryType:
|
|
105
|
+
if ((w = e.metaData) != null && w.prefetchEntry) {
|
|
106
|
+
const { path: _, name: S, type: R } = e.metaData.prefetchEntry;
|
|
107
|
+
m = {
|
|
108
|
+
...m,
|
|
109
|
+
prefetchEntry: ne(_, S),
|
|
110
|
+
prefetchEntryType: R
|
|
113
111
|
};
|
|
114
112
|
}
|
|
115
|
-
if ("publicPath" in
|
|
116
|
-
...
|
|
117
|
-
publicPath:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
i.ssrRemoteEntry = I, i.ssrRemoteEntryType = b.type || "commonjs-module";
|
|
113
|
+
if ("publicPath" in e.metaData ? (s = {
|
|
114
|
+
...m,
|
|
115
|
+
publicPath: i()
|
|
116
|
+
}, typeof e.metaData.ssrPublicPath == "string" && (s.ssrPublicPath = e.metaData.ssrPublicPath)) : s = {
|
|
117
|
+
...m,
|
|
118
|
+
getPublicPath: i()
|
|
119
|
+
}, y) {
|
|
120
|
+
const _ = ne(y.path, y.name);
|
|
121
|
+
s.ssrRemoteEntry = _, s.ssrRemoteEntryType = y.type || "commonjs-module";
|
|
125
122
|
}
|
|
126
|
-
return
|
|
123
|
+
return s;
|
|
127
124
|
}
|
|
128
|
-
function
|
|
129
|
-
return !!("remoteEntry" in
|
|
125
|
+
function Ye(e) {
|
|
126
|
+
return !!("remoteEntry" in e && e.remoteEntry.includes(Wt));
|
|
130
127
|
}
|
|
131
|
-
const
|
|
128
|
+
const Yt = "[ Module Federation ]", J = console, Zt = [
|
|
132
129
|
"logger.ts",
|
|
133
130
|
"logger.js",
|
|
134
131
|
"captureStackTrace",
|
|
@@ -139,1248 +136,1180 @@ const PREFIX = "[ Module Federation ]", DEFAULT_DELEGATE = console, LOGGER_STACK
|
|
|
139
136
|
"Logger.error",
|
|
140
137
|
"Logger.debug"
|
|
141
138
|
];
|
|
142
|
-
function
|
|
139
|
+
function Qt() {
|
|
143
140
|
try {
|
|
144
|
-
const
|
|
145
|
-
if (!
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
${n.slice(0, 5).join(`
|
|
141
|
+
const e = (/* @__PURE__ */ new Error()).stack;
|
|
142
|
+
if (!e) return;
|
|
143
|
+
const [, ...t] = e.split(`
|
|
144
|
+
`), r = t.filter((n) => !Zt.some((o) => n.includes(o)));
|
|
145
|
+
return r.length ? `Stack trace:
|
|
146
|
+
${r.slice(0, 5).join(`
|
|
151
147
|
`)}` : void 0;
|
|
152
148
|
} catch {
|
|
153
149
|
return;
|
|
154
150
|
}
|
|
155
151
|
}
|
|
156
|
-
class
|
|
157
|
-
constructor(
|
|
158
|
-
this.prefix =
|
|
152
|
+
var Ze = class {
|
|
153
|
+
constructor(e, t = J) {
|
|
154
|
+
this.prefix = e, this.delegate = t ?? J;
|
|
159
155
|
}
|
|
160
|
-
setPrefix(
|
|
161
|
-
this.prefix =
|
|
156
|
+
setPrefix(e) {
|
|
157
|
+
this.prefix = e;
|
|
162
158
|
}
|
|
163
|
-
setDelegate(
|
|
164
|
-
this.delegate =
|
|
159
|
+
setDelegate(e) {
|
|
160
|
+
this.delegate = e ?? J;
|
|
165
161
|
}
|
|
166
|
-
emit(
|
|
167
|
-
const
|
|
168
|
-
switch (
|
|
162
|
+
emit(e, t) {
|
|
163
|
+
const r = this.delegate, n = we() ? Qt() : void 0, o = n ? [...t, n] : t, s = (() => {
|
|
164
|
+
switch (e) {
|
|
169
165
|
case "log":
|
|
170
166
|
return ["log", "info"];
|
|
171
167
|
case "info":
|
|
172
168
|
return ["info", "log"];
|
|
173
169
|
case "warn":
|
|
174
|
-
return [
|
|
170
|
+
return [
|
|
171
|
+
"warn",
|
|
172
|
+
"info",
|
|
173
|
+
"log"
|
|
174
|
+
];
|
|
175
175
|
case "error":
|
|
176
|
-
return [
|
|
177
|
-
|
|
176
|
+
return [
|
|
177
|
+
"error",
|
|
178
|
+
"warn",
|
|
179
|
+
"log"
|
|
180
|
+
];
|
|
178
181
|
default:
|
|
179
182
|
return ["debug", "log"];
|
|
180
183
|
}
|
|
181
184
|
})();
|
|
182
|
-
for (const
|
|
183
|
-
const
|
|
184
|
-
if (typeof
|
|
185
|
-
|
|
185
|
+
for (const i of s) {
|
|
186
|
+
const a = r[i];
|
|
187
|
+
if (typeof a == "function") {
|
|
188
|
+
a.call(r, this.prefix, ...o);
|
|
186
189
|
return;
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
|
-
for (const
|
|
190
|
-
const
|
|
191
|
-
if (typeof
|
|
192
|
-
|
|
192
|
+
for (const i of s) {
|
|
193
|
+
const a = J[i];
|
|
194
|
+
if (typeof a == "function") {
|
|
195
|
+
a.call(J, this.prefix, ...o);
|
|
193
196
|
return;
|
|
194
197
|
}
|
|
195
198
|
}
|
|
196
199
|
}
|
|
197
|
-
log(...
|
|
198
|
-
this.emit("log",
|
|
200
|
+
log(...e) {
|
|
201
|
+
this.emit("log", e);
|
|
199
202
|
}
|
|
200
|
-
warn(...
|
|
201
|
-
this.emit("warn",
|
|
203
|
+
warn(...e) {
|
|
204
|
+
this.emit("warn", e);
|
|
202
205
|
}
|
|
203
|
-
error(...
|
|
204
|
-
this.emit("error",
|
|
206
|
+
error(...e) {
|
|
207
|
+
this.emit("error", e);
|
|
205
208
|
}
|
|
206
|
-
success(...
|
|
207
|
-
this.emit("info",
|
|
209
|
+
success(...e) {
|
|
210
|
+
this.emit("info", e);
|
|
208
211
|
}
|
|
209
|
-
info(...
|
|
210
|
-
this.emit("info",
|
|
212
|
+
info(...e) {
|
|
213
|
+
this.emit("info", e);
|
|
211
214
|
}
|
|
212
|
-
ready(...
|
|
213
|
-
this.emit("info",
|
|
215
|
+
ready(...e) {
|
|
216
|
+
this.emit("info", e);
|
|
214
217
|
}
|
|
215
|
-
debug(...
|
|
216
|
-
|
|
218
|
+
debug(...e) {
|
|
219
|
+
we() && this.emit("debug", e);
|
|
217
220
|
}
|
|
221
|
+
};
|
|
222
|
+
function Qe(e) {
|
|
223
|
+
return new Ze(e);
|
|
218
224
|
}
|
|
219
|
-
function
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
function createInfrastructureLogger(r) {
|
|
223
|
-
const t = new Logger(r);
|
|
225
|
+
function er(e) {
|
|
226
|
+
const t = new Ze(e);
|
|
224
227
|
return Object.defineProperty(t, "__mf_infrastructure_logger__", {
|
|
225
228
|
value: !0,
|
|
226
229
|
enumerable: !1,
|
|
227
230
|
configurable: !1
|
|
228
231
|
}), t;
|
|
229
232
|
}
|
|
230
|
-
|
|
231
|
-
async function
|
|
233
|
+
er(Yt);
|
|
234
|
+
async function et(e, t) {
|
|
232
235
|
try {
|
|
233
|
-
return await
|
|
234
|
-
} catch (
|
|
235
|
-
|
|
236
|
+
return await e();
|
|
237
|
+
} catch (r) {
|
|
238
|
+
Je(r);
|
|
236
239
|
return;
|
|
237
240
|
}
|
|
238
241
|
}
|
|
239
|
-
function
|
|
240
|
-
const
|
|
241
|
-
return
|
|
242
|
+
function tt(e, t) {
|
|
243
|
+
const r = /^(https?:)?\/\//i;
|
|
244
|
+
return e.replace(r, "").replace(/\/$/, "") === t.replace(r, "").replace(/\/$/, "");
|
|
242
245
|
}
|
|
243
|
-
function
|
|
244
|
-
let t = null,
|
|
245
|
-
const
|
|
246
|
-
for (let
|
|
247
|
-
const
|
|
248
|
-
if (l &&
|
|
249
|
-
t =
|
|
246
|
+
function rt(e) {
|
|
247
|
+
let t = null, r = !0, n = 2e4, o;
|
|
248
|
+
const s = document.getElementsByTagName("script");
|
|
249
|
+
for (let a = 0; a < s.length; a++) {
|
|
250
|
+
const c = s[a], l = c.getAttribute("src");
|
|
251
|
+
if (l && tt(l, e.url)) {
|
|
252
|
+
t = c, r = !1;
|
|
250
253
|
break;
|
|
251
254
|
}
|
|
252
255
|
}
|
|
253
256
|
if (!t) {
|
|
254
|
-
const
|
|
255
|
-
t = document.createElement("script"), t.type = (
|
|
256
|
-
let
|
|
257
|
-
|
|
258
|
-
t && (l === "async" || l === "defer" ? t[l] =
|
|
257
|
+
const a = e.attrs;
|
|
258
|
+
t = document.createElement("script"), t.type = (a == null ? void 0 : a.type) === "module" ? "module" : "text/javascript";
|
|
259
|
+
let c;
|
|
260
|
+
e.createScriptHook && (c = e.createScriptHook(e.url, e.attrs), c instanceof HTMLScriptElement ? t = c : typeof c == "object" && ("script" in c && c.script && (t = c.script), "timeout" in c && c.timeout && (n = c.timeout))), t.src || (t.src = e.url), a && !c && Object.keys(a).forEach((l) => {
|
|
261
|
+
t && (l === "async" || l === "defer" ? t[l] = a[l] : t.getAttribute(l) || t.setAttribute(l, a[l]));
|
|
259
262
|
});
|
|
260
263
|
}
|
|
261
|
-
const
|
|
262
|
-
clearTimeout(
|
|
264
|
+
const i = async (a, c) => {
|
|
265
|
+
clearTimeout(o);
|
|
263
266
|
const l = () => {
|
|
264
|
-
(
|
|
267
|
+
(c == null ? void 0 : c.type) === "error" ? e != null && e.onErrorCallback && (e == null || e.onErrorCallback(c)) : e != null && e.cb && (e == null || e.cb());
|
|
265
268
|
};
|
|
266
|
-
if (t && (t.onerror = null, t.onload = null,
|
|
267
|
-
const { needDeleteScript:
|
|
268
|
-
|
|
269
|
-
}),
|
|
270
|
-
const
|
|
271
|
-
if (
|
|
272
|
-
const
|
|
273
|
-
return l(),
|
|
269
|
+
if (t && (t.onerror = null, t.onload = null, et(() => {
|
|
270
|
+
const { needDeleteScript: f = !0 } = e;
|
|
271
|
+
f && t != null && t.parentNode && t.parentNode.removeChild(t);
|
|
272
|
+
}), a && typeof a == "function")) {
|
|
273
|
+
const f = a(c);
|
|
274
|
+
if (f instanceof Promise) {
|
|
275
|
+
const d = await f;
|
|
276
|
+
return l(), d;
|
|
274
277
|
}
|
|
275
|
-
return l(),
|
|
278
|
+
return l(), f;
|
|
276
279
|
}
|
|
277
280
|
l();
|
|
278
281
|
};
|
|
279
|
-
return t.onerror =
|
|
280
|
-
|
|
281
|
-
},
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
282
|
+
return t.onerror = i.bind(null, t.onerror), t.onload = i.bind(null, t.onload), o = setTimeout(() => {
|
|
283
|
+
i(null, /* @__PURE__ */ new Error(`Remote script "${e.url}" time-outed.`));
|
|
284
|
+
}, n), {
|
|
285
|
+
script: t,
|
|
286
|
+
needAttach: r
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
function ge(e) {
|
|
290
|
+
let t = null, r = !0;
|
|
291
|
+
const n = document.getElementsByTagName("link");
|
|
292
|
+
for (let s = 0; s < n.length; s++) {
|
|
293
|
+
const i = n[s], a = i.getAttribute("href"), c = i.getAttribute("rel");
|
|
294
|
+
if (a && tt(a, e.url) && c === e.attrs.rel) {
|
|
295
|
+
t = i, r = !1;
|
|
290
296
|
break;
|
|
291
297
|
}
|
|
292
298
|
}
|
|
293
299
|
if (!t) {
|
|
294
|
-
t = document.createElement("link"), t.setAttribute("href",
|
|
295
|
-
let
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
t && !t.getAttribute(
|
|
300
|
+
t = document.createElement("link"), t.setAttribute("href", e.url);
|
|
301
|
+
let s;
|
|
302
|
+
const i = e.attrs;
|
|
303
|
+
e.createLinkHook && (s = e.createLinkHook(e.url, i), s instanceof HTMLLinkElement && (t = s)), i && !s && Object.keys(i).forEach((a) => {
|
|
304
|
+
t && !t.getAttribute(a) && t.setAttribute(a, i[a]);
|
|
299
305
|
});
|
|
300
306
|
}
|
|
301
|
-
const
|
|
302
|
-
const
|
|
303
|
-
(
|
|
307
|
+
const o = (s, i) => {
|
|
308
|
+
const a = () => {
|
|
309
|
+
(i == null ? void 0 : i.type) === "error" ? e != null && e.onErrorCallback && (e == null || e.onErrorCallback(i)) : e != null && e.cb && (e == null || e.cb());
|
|
304
310
|
};
|
|
305
|
-
if (t && (t.onerror = null, t.onload = null,
|
|
306
|
-
const { needDeleteLink:
|
|
307
|
-
|
|
308
|
-
}),
|
|
309
|
-
const
|
|
310
|
-
return
|
|
311
|
+
if (t && (t.onerror = null, t.onload = null, et(() => {
|
|
312
|
+
const { needDeleteLink: c = !0 } = e;
|
|
313
|
+
c && t != null && t.parentNode && t.parentNode.removeChild(t);
|
|
314
|
+
}), s)) {
|
|
315
|
+
const c = s(i);
|
|
316
|
+
return a(), c;
|
|
311
317
|
}
|
|
312
|
-
|
|
318
|
+
a();
|
|
313
319
|
};
|
|
314
|
-
return t.onerror =
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
return t.onerror = o.bind(null, t.onerror), t.onload = o.bind(null, t.onload), {
|
|
321
|
+
link: t,
|
|
322
|
+
needAttach: r
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
function tr(e, t) {
|
|
326
|
+
const { attrs: r = {}, createScriptHook: n } = t;
|
|
327
|
+
return new Promise((o, s) => {
|
|
328
|
+
const { script: i, needAttach: a } = rt({
|
|
329
|
+
url: e,
|
|
330
|
+
cb: o,
|
|
331
|
+
onErrorCallback: s,
|
|
323
332
|
attrs: {
|
|
324
333
|
fetchpriority: "high",
|
|
325
|
-
...
|
|
334
|
+
...r
|
|
326
335
|
},
|
|
327
|
-
createScriptHook:
|
|
336
|
+
createScriptHook: n,
|
|
328
337
|
needDeleteScript: !0
|
|
329
338
|
});
|
|
330
|
-
|
|
339
|
+
a && document.head.appendChild(i);
|
|
331
340
|
});
|
|
332
341
|
}
|
|
333
|
-
const
|
|
334
|
-
function
|
|
335
|
-
if (!
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
const n = new Function("name", "return import(name)")(r).then((o) => o).catch((o) => {
|
|
340
|
-
throw console.error(`Error importing module ${r}:`, o), sdkImportCache.delete(r), o;
|
|
342
|
+
const oe = /* @__PURE__ */ new Map();
|
|
343
|
+
function B(e) {
|
|
344
|
+
if (!e) throw new Error("import specifier is required");
|
|
345
|
+
if (oe.has(e)) return oe.get(e);
|
|
346
|
+
const t = new Function("name", "return import(name)")(e).then((r) => r).catch((r) => {
|
|
347
|
+
throw console.error(`Error importing module ${e}:`, r), oe.delete(e), r;
|
|
341
348
|
});
|
|
342
|
-
return
|
|
343
|
-
}
|
|
344
|
-
const
|
|
345
|
-
const
|
|
346
|
-
return
|
|
347
|
-
},
|
|
348
|
-
const
|
|
349
|
-
return !
|
|
350
|
-
},
|
|
351
|
-
if (
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
let
|
|
349
|
+
return oe.set(e, t), t;
|
|
350
|
+
}
|
|
351
|
+
const nt = async () => {
|
|
352
|
+
const e = await B("node-fetch");
|
|
353
|
+
return e.default || e;
|
|
354
|
+
}, rr = async (e, t, r) => {
|
|
355
|
+
const o = await ((s, i) => r.lifecycle.fetch.emit(s, i))(e, t || {});
|
|
356
|
+
return !o || !(o instanceof Response) ? (typeof fetch > "u" ? await nt() : fetch)(e, t || {}) : o;
|
|
357
|
+
}, nr = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t, r, n) => {
|
|
358
|
+
if (n != null && n.createScriptHook) {
|
|
359
|
+
const a = n.createScriptHook(e);
|
|
360
|
+
a && typeof a == "object" && "url" in a && (e = a.url);
|
|
361
|
+
}
|
|
362
|
+
let o;
|
|
356
363
|
try {
|
|
357
|
-
|
|
358
|
-
} catch (
|
|
359
|
-
console.error("Error constructing URL:",
|
|
364
|
+
o = new URL(e);
|
|
365
|
+
} catch (a) {
|
|
366
|
+
console.error("Error constructing URL:", a), t(/* @__PURE__ */ new Error(`Invalid URL: ${a}`));
|
|
360
367
|
return;
|
|
361
368
|
}
|
|
362
|
-
const
|
|
363
|
-
var
|
|
369
|
+
const s = async () => n != null && n.fetch ? (a, c) => rr(a, c, n) : typeof fetch > "u" ? nt() : fetch, i = async (a, c) => {
|
|
370
|
+
var l;
|
|
364
371
|
try {
|
|
365
|
-
const
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
372
|
+
const d = await (await a(c.href)).text(), [u, h] = await Promise.all([B("path"), B("vm")]), p = {
|
|
373
|
+
exports: {},
|
|
374
|
+
module: { exports: {} }
|
|
375
|
+
}, y = c.pathname.split("/").slice(0, -1).join("/"), E = u.basename(c.pathname), m = new h.Script(`(function(exports, module, require, __dirname, __filename) {${d}
|
|
369
376
|
})`, {
|
|
370
|
-
filename,
|
|
371
|
-
importModuleDynamically: (
|
|
372
|
-
//@ts-ignore
|
|
373
|
-
((r = vm.constants) == null ? void 0 : r.USE_MAIN_CONTEXT_DEFAULT_LOADER) ?? importNodeModule
|
|
374
|
-
)
|
|
377
|
+
filename: E,
|
|
378
|
+
importModuleDynamically: ((l = h.constants) == null ? void 0 : l.USE_MAIN_CONTEXT_DEFAULT_LOADER) ?? B
|
|
375
379
|
});
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
380
|
+
let g;
|
|
381
|
+
g = (await B("node:module")).createRequire(c.protocol === "file:" || c.protocol === "node:" ? c.href : u.join(process.cwd(), "__mf_require_base__.js")), m.runInThisContext()(p.exports, p.module, g, y, E);
|
|
382
|
+
const b = p.module.exports || p.exports;
|
|
383
|
+
if (r && b && r.globalName) {
|
|
384
|
+
t(void 0, b[r.globalName] || b);
|
|
381
385
|
return;
|
|
382
386
|
}
|
|
383
|
-
|
|
384
|
-
} catch (
|
|
385
|
-
|
|
387
|
+
t(void 0, b);
|
|
388
|
+
} catch (f) {
|
|
389
|
+
t(f instanceof Error ? f : /* @__PURE__ */ new Error(`Script execution error: ${f}`));
|
|
386
390
|
}
|
|
387
391
|
};
|
|
388
|
-
|
|
389
|
-
if ((
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
cb(r);
|
|
392
|
+
s().then(async (a) => {
|
|
393
|
+
if ((r == null ? void 0 : r.type) === "esm" || (r == null ? void 0 : r.type) === "module") return Ne(o.href, {
|
|
394
|
+
fetch: a,
|
|
395
|
+
vm: await B("vm")
|
|
396
|
+
}).then(async (c) => {
|
|
397
|
+
await c.evaluate(), t(void 0, c.namespace);
|
|
398
|
+
}).catch((c) => {
|
|
399
|
+
t(c instanceof Error ? c : /* @__PURE__ */ new Error(`Script execution error: ${c}`));
|
|
400
|
+
});
|
|
401
|
+
i(a, o);
|
|
402
|
+
}).catch((a) => {
|
|
403
|
+
t(a);
|
|
401
404
|
});
|
|
402
|
-
} : (
|
|
403
|
-
t(new Error("createScriptNode is disabled in non-Node.js environment"));
|
|
404
|
-
},
|
|
405
|
-
|
|
406
|
-
var
|
|
407
|
-
if (
|
|
408
|
-
o(s);
|
|
405
|
+
} : (e, t, r, n) => {
|
|
406
|
+
t(/* @__PURE__ */ new Error("createScriptNode is disabled in non-Node.js environment"));
|
|
407
|
+
}, or = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t) => new Promise((r, n) => {
|
|
408
|
+
nr(e, (o, s) => {
|
|
409
|
+
var i, a;
|
|
410
|
+
if (o) n(o);
|
|
409
411
|
else {
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
+
const c = ((i = t == null ? void 0 : t.attrs) == null ? void 0 : i.globalName) || `__FEDERATION_${(a = t == null ? void 0 : t.attrs) == null ? void 0 : a.name}:custom__`;
|
|
413
|
+
r(globalThis[c] = s);
|
|
412
414
|
}
|
|
413
415
|
}, t.attrs, t.loaderHook);
|
|
414
|
-
}) : (
|
|
416
|
+
}) : (e, t) => {
|
|
415
417
|
throw new Error("loadScriptNode is disabled in non-Node.js environment");
|
|
416
|
-
},
|
|
417
|
-
async function
|
|
418
|
-
if (
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
});
|
|
427
|
-
return esmModuleCache.set(r, a), await a.link(async (c) => {
|
|
428
|
-
const u = new URL(c, r).href;
|
|
429
|
-
return await loadModule(u, t);
|
|
430
|
-
}), a;
|
|
431
|
-
}
|
|
432
|
-
const LoggerInstance = createLogger("[ Module Federation Bridge Vue3 ]"), RUNTIME_001 = "RUNTIME-001", RUNTIME_002 = "RUNTIME-002", RUNTIME_003 = "RUNTIME-003", RUNTIME_004 = "RUNTIME-004", RUNTIME_005 = "RUNTIME-005", RUNTIME_006 = "RUNTIME-006", RUNTIME_007 = "RUNTIME-007", RUNTIME_008 = "RUNTIME-008", RUNTIME_009 = "RUNTIME-009", getDocsUrl = (r) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${r.split("-")[0].toLowerCase()}#${r.toLowerCase()}`, getShortErrorMsg = (r, t, n, o) => {
|
|
433
|
-
const s = [`${[t[r]]} #${r}`];
|
|
434
|
-
return n && s.push(`args: ${JSON.stringify(n)}`), s.push(getDocsUrl(r)), o && s.push(`Original Error Message:
|
|
435
|
-
${o}`), s.join(`
|
|
436
|
-
`);
|
|
437
|
-
}, runtimeDescMap = {
|
|
438
|
-
[RUNTIME_001]: "Failed to get remoteEntry exports.",
|
|
439
|
-
[RUNTIME_002]: 'The remote entry interface does not contain "init"',
|
|
440
|
-
[RUNTIME_003]: "Failed to get manifest.",
|
|
441
|
-
[RUNTIME_004]: "Failed to locate remote.",
|
|
442
|
-
[RUNTIME_005]: "Invalid loadShareSync function call from bundler runtime",
|
|
443
|
-
[RUNTIME_006]: "Invalid loadShareSync function call from runtime",
|
|
444
|
-
[RUNTIME_007]: "Failed to get remote snapshot.",
|
|
445
|
-
[RUNTIME_008]: "Failed to load script resources.",
|
|
446
|
-
[RUNTIME_009]: "Please call createInstance first."
|
|
447
|
-
}, LOG_CATEGORY = "[ Federation Runtime ]", logger = createLogger(LOG_CATEGORY);
|
|
448
|
-
function assert(r, t) {
|
|
449
|
-
r || error(t);
|
|
418
|
+
}, _e = /* @__PURE__ */ new Map();
|
|
419
|
+
async function Ne(e, t) {
|
|
420
|
+
if (_e.has(e)) return _e.get(e);
|
|
421
|
+
const { fetch: r, vm: n } = t, o = await (await r(e)).text(), s = new n.SourceTextModule(o, { importModuleDynamically: async (i, a) => {
|
|
422
|
+
const c = new URL(i, e).href;
|
|
423
|
+
return Ne(c, t);
|
|
424
|
+
} });
|
|
425
|
+
return _e.set(e, s), await s.link(async (i) => {
|
|
426
|
+
const a = new URL(i, e).href;
|
|
427
|
+
return await Ne(a, t);
|
|
428
|
+
}), s;
|
|
450
429
|
}
|
|
451
|
-
|
|
452
|
-
|
|
430
|
+
const C = Qe("[ Module Federation Bridge Vue3 ]"), W = "[ Federation Runtime ]", Te = Qe(W);
|
|
431
|
+
function T(e, t) {
|
|
432
|
+
e || k(t);
|
|
453
433
|
}
|
|
454
|
-
function
|
|
455
|
-
|
|
434
|
+
function k(e) {
|
|
435
|
+
throw e instanceof Error ? (e.message.startsWith(W) || (e.message = `${W}: ${e.message}`), e) : new Error(`${W}: ${e}`);
|
|
456
436
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
437
|
+
function ke(e) {
|
|
438
|
+
e instanceof Error && (e.message.startsWith(W) || (e.message = `${W}: ${e.message}`)), Te.warn(e);
|
|
459
439
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
440
|
+
function sr(e, t) {
|
|
441
|
+
return e.findIndex((r) => r === t) === -1 && e.push(t), e;
|
|
462
442
|
}
|
|
463
|
-
function
|
|
464
|
-
return
|
|
443
|
+
function Z(e) {
|
|
444
|
+
return "version" in e && e.version ? `${e.name}:${e.version}` : "entry" in e && e.entry ? `${e.name}:${e.entry}` : `${e.name}`;
|
|
465
445
|
}
|
|
466
|
-
function
|
|
467
|
-
return
|
|
446
|
+
function Oe(e) {
|
|
447
|
+
return typeof e.entry < "u";
|
|
468
448
|
}
|
|
469
|
-
function
|
|
470
|
-
return
|
|
449
|
+
function ot(e) {
|
|
450
|
+
return !e.entry.includes(".json");
|
|
471
451
|
}
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
return objectToString.call(r) === "[object Object]";
|
|
452
|
+
function Le(e) {
|
|
453
|
+
return e && typeof e == "object";
|
|
475
454
|
}
|
|
476
|
-
|
|
477
|
-
|
|
455
|
+
const ir = Object.prototype.toString;
|
|
456
|
+
function ar(e) {
|
|
457
|
+
return ir.call(e) === "[object Object]";
|
|
478
458
|
}
|
|
479
|
-
function
|
|
459
|
+
function st(e) {
|
|
460
|
+
return Array.isArray(e) ? e : [e];
|
|
461
|
+
}
|
|
462
|
+
function it(e) {
|
|
480
463
|
const t = {
|
|
481
464
|
url: "",
|
|
482
465
|
type: "global",
|
|
483
466
|
globalName: ""
|
|
484
467
|
};
|
|
485
|
-
return
|
|
486
|
-
url:
|
|
487
|
-
type:
|
|
488
|
-
globalName:
|
|
489
|
-
} : t : "ssrRemoteEntry" in
|
|
490
|
-
url:
|
|
491
|
-
type:
|
|
492
|
-
globalName:
|
|
468
|
+
return F() || qe() || !("ssrRemoteEntry" in e) ? "remoteEntry" in e ? {
|
|
469
|
+
url: e.remoteEntry,
|
|
470
|
+
type: e.remoteEntryType,
|
|
471
|
+
globalName: e.globalName
|
|
472
|
+
} : t : "ssrRemoteEntry" in e ? {
|
|
473
|
+
url: e.ssrRemoteEntry || t.url,
|
|
474
|
+
type: e.ssrRemoteEntryType || t.type,
|
|
475
|
+
globalName: e.globalName
|
|
493
476
|
} : t;
|
|
494
477
|
}
|
|
495
|
-
const
|
|
496
|
-
let
|
|
497
|
-
return
|
|
498
|
-
},
|
|
478
|
+
const cr = (e, t) => {
|
|
479
|
+
let r;
|
|
480
|
+
return e.endsWith("/") ? r = e.slice(0, -1) : r = e, t.startsWith(".") && (t = t.slice(1)), r = r + t, r;
|
|
481
|
+
}, I = typeof globalThis == "object" ? globalThis : window, P = (() => {
|
|
499
482
|
try {
|
|
500
483
|
return document.defaultView;
|
|
501
484
|
} catch {
|
|
502
|
-
return
|
|
485
|
+
return I;
|
|
503
486
|
}
|
|
504
|
-
})(),
|
|
505
|
-
function
|
|
506
|
-
Object.defineProperty(
|
|
507
|
-
value:
|
|
487
|
+
})(), Q = P;
|
|
488
|
+
function ce(e, t, r) {
|
|
489
|
+
Object.defineProperty(e, t, {
|
|
490
|
+
value: r,
|
|
508
491
|
configurable: !1,
|
|
509
492
|
writable: !0
|
|
510
493
|
});
|
|
511
494
|
}
|
|
512
|
-
function
|
|
513
|
-
return Object.hasOwnProperty.call(
|
|
495
|
+
function le(e, t) {
|
|
496
|
+
return Object.hasOwnProperty.call(e, t);
|
|
514
497
|
}
|
|
515
|
-
|
|
516
|
-
const
|
|
517
|
-
function
|
|
518
|
-
var t, n, o, s, i
|
|
519
|
-
|
|
498
|
+
le(I, "__GLOBAL_LOADING_REMOTE_ENTRY__") || ce(I, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
|
|
499
|
+
const V = I.__GLOBAL_LOADING_REMOTE_ENTRY__;
|
|
500
|
+
function at(e) {
|
|
501
|
+
var t, r, n, o, s, i;
|
|
502
|
+
le(e, "__VMOK__") && !le(e, "__FEDERATION__") && ce(e, "__FEDERATION__", e.__VMOK__), le(e, "__FEDERATION__") || (ce(e, "__FEDERATION__", {
|
|
520
503
|
__GLOBAL_PLUGIN__: [],
|
|
521
504
|
__INSTANCES__: [],
|
|
522
505
|
moduleInfo: {},
|
|
523
506
|
__SHARE__: {},
|
|
524
507
|
__MANIFEST_LOADING__: {},
|
|
525
508
|
__PRELOADED_MAP__: /* @__PURE__ */ new Map()
|
|
526
|
-
}),
|
|
509
|
+
}), ce(e, "__VMOK__", e.__FEDERATION__)), (t = e.__FEDERATION__).__GLOBAL_PLUGIN__ ?? (t.__GLOBAL_PLUGIN__ = []), (r = e.__FEDERATION__).__INSTANCES__ ?? (r.__INSTANCES__ = []), (n = e.__FEDERATION__).moduleInfo ?? (n.moduleInfo = {}), (o = e.__FEDERATION__).__SHARE__ ?? (o.__SHARE__ = {}), (s = e.__FEDERATION__).__MANIFEST_LOADING__ ?? (s.__MANIFEST_LOADING__ = {}), (i = e.__FEDERATION__).__PRELOADED_MAP__ ?? (i.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
|
|
527
510
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
function
|
|
531
|
-
t && (
|
|
511
|
+
at(I);
|
|
512
|
+
at(P);
|
|
513
|
+
function lr(e, t = we()) {
|
|
514
|
+
t && (I.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, I.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.1.0");
|
|
532
515
|
}
|
|
533
|
-
function
|
|
516
|
+
function q(e, t) {
|
|
534
517
|
if (typeof t == "string") {
|
|
535
|
-
if (
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
};
|
|
518
|
+
if (e[t]) return {
|
|
519
|
+
value: e[t],
|
|
520
|
+
key: t
|
|
521
|
+
};
|
|
540
522
|
{
|
|
541
|
-
const
|
|
542
|
-
for (const
|
|
543
|
-
const [
|
|
544
|
-
if (
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
};
|
|
523
|
+
const r = Object.keys(e);
|
|
524
|
+
for (const n of r) {
|
|
525
|
+
const [o, s] = n.split(":"), i = `${o}:${t}`, a = e[i];
|
|
526
|
+
if (a) return {
|
|
527
|
+
value: a,
|
|
528
|
+
key: i
|
|
529
|
+
};
|
|
549
530
|
}
|
|
550
531
|
return {
|
|
551
532
|
value: void 0,
|
|
552
533
|
key: t
|
|
553
534
|
};
|
|
554
535
|
}
|
|
555
|
-
} else
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
-
if (
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
},
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
}, addGlobalSnapshot = (r) => (nativeGlobal.__FEDERATION__.moduleInfo = {
|
|
571
|
-
...nativeGlobal.__FEDERATION__.moduleInfo,
|
|
572
|
-
...r
|
|
536
|
+
} else throw new Error("key must be string");
|
|
537
|
+
}
|
|
538
|
+
const He = () => P.__FEDERATION__.moduleInfo, ur = (e, t) => {
|
|
539
|
+
const r = q(t, Z(e)).value;
|
|
540
|
+
if (r && !r.version && "version" in e && e.version && (r.version = e.version), r) return r;
|
|
541
|
+
if ("version" in e && e.version) {
|
|
542
|
+
const { version: n, ...o } = e, s = Z(o), i = q(P.__FEDERATION__.moduleInfo, s).value;
|
|
543
|
+
if ((i == null ? void 0 : i.version) === n) return i;
|
|
544
|
+
}
|
|
545
|
+
}, ue = (e) => ur(e, P.__FEDERATION__.moduleInfo), Ge = (e, t) => {
|
|
546
|
+
const r = Z(e);
|
|
547
|
+
return P.__FEDERATION__.moduleInfo[r] = t, P.__FEDERATION__.moduleInfo;
|
|
548
|
+
}, fr = (e) => (P.__FEDERATION__.moduleInfo = {
|
|
549
|
+
...P.__FEDERATION__.moduleInfo,
|
|
550
|
+
...e
|
|
573
551
|
}, () => {
|
|
574
|
-
const t = Object.keys(
|
|
575
|
-
for (const
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
const n = t || `__FEDERATION_${r}:custom__`, o = CurrentGlobal[n];
|
|
552
|
+
const t = Object.keys(e);
|
|
553
|
+
for (const r of t) delete P.__FEDERATION__.moduleInfo[r];
|
|
554
|
+
}), Me = (e, t) => {
|
|
555
|
+
const r = t || `__FEDERATION_${e}:custom__`;
|
|
579
556
|
return {
|
|
580
|
-
remoteEntryKey:
|
|
581
|
-
entryExports:
|
|
557
|
+
remoteEntryKey: r,
|
|
558
|
+
entryExports: I[r]
|
|
582
559
|
};
|
|
583
|
-
},
|
|
584
|
-
function
|
|
585
|
-
return new RegExp(
|
|
560
|
+
}, hr = () => P.__FEDERATION__.__GLOBAL_PLUGIN__, dr = (e) => I.__FEDERATION__.__PRELOADED_MAP__.get(e), pr = (e) => I.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), Ue = "[0-9A-Za-z-]+", Ce = `(?:\\+(${Ue}(?:\\.${Ue})*))`, Y = "0|[1-9]\\d*", fe = "[0-9]+", ct = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", xe = `(?:${fe}|${ct})`, mr = `(?:-?(${xe}(?:\\.${xe})*))`, Be = `(?:${Y}|${ct})`, lt = `(?:-(${Be}(?:\\.${Be})*))`, be = `${Y}|x|X|\\*`, z = `[v=\\s]*(${be})(?:\\.(${be})(?:\\.(${be})(?:${lt})?${Ce}?)?)?`, yr = `^\\s*(${z})\\s+-\\s+(${z})\\s*$`, Er = `[v=\\s]*${`(${fe})\\.(${fe})\\.(${fe})`}${mr}?${Ce}?`, De = "((?:<|>)?=?)", gr = `(\\s*)${De}\\s*(${Er}|${z})`, ut = "(?:~>?)", _r = `(\\s*)${ut}\\s+`, ft = "(?:\\^)", br = `(\\s*)${ft}\\s+`, Rr = "(<|>)?=?\\s*\\*", Sr = `^${ft}${z}$`, $r = `v?${`(${Y})\\.(${Y})\\.(${Y})`}${lt}?${Ce}?`, wr = `^${ut}${z}$`, Ir = `^${De}\\s*${z}$`, Nr = `^${De}\\s*(${$r})$|^$`, Tr = "^\\s*>=\\s*0.0.0\\s*$";
|
|
561
|
+
function M(e) {
|
|
562
|
+
return new RegExp(e);
|
|
586
563
|
}
|
|
587
|
-
function
|
|
588
|
-
return !
|
|
564
|
+
function N(e) {
|
|
565
|
+
return !e || e.toLowerCase() === "x" || e === "*";
|
|
589
566
|
}
|
|
590
|
-
function
|
|
591
|
-
return (t) =>
|
|
567
|
+
function ht(...e) {
|
|
568
|
+
return (t) => e.reduce((r, n) => n(r), t);
|
|
592
569
|
}
|
|
593
|
-
function
|
|
594
|
-
return
|
|
570
|
+
function Ve(e) {
|
|
571
|
+
return e.match(M(Nr));
|
|
595
572
|
}
|
|
596
|
-
function
|
|
597
|
-
const
|
|
598
|
-
return
|
|
573
|
+
function We(e, t, r, n) {
|
|
574
|
+
const o = `${e}.${t}.${r}`;
|
|
575
|
+
return n ? `${o}-${n}` : o;
|
|
599
576
|
}
|
|
600
|
-
function
|
|
601
|
-
return
|
|
577
|
+
function Ar(e) {
|
|
578
|
+
return e.replace(M(yr), (t, r, n, o, s, i, a, c, l, f, d, u) => (N(n) ? r = "" : N(o) ? r = `>=${n}.0.0` : N(s) ? r = `>=${n}.${o}.0` : r = `>=${r}`, N(l) ? c = "" : N(f) ? c = `<${Number(l) + 1}.0.0-0` : N(d) ? c = `<${l}.${Number(f) + 1}.0-0` : u ? c = `<=${l}.${f}.${d}-${u}` : c = `<=${c}`, `${r} ${c}`.trim()));
|
|
602
579
|
}
|
|
603
|
-
function
|
|
604
|
-
return
|
|
580
|
+
function vr(e) {
|
|
581
|
+
return e.replace(M(gr), "$1$2$3");
|
|
605
582
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
583
|
+
function Pr(e) {
|
|
584
|
+
return e.replace(M(_r), "$1~");
|
|
608
585
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
586
|
+
function kr(e) {
|
|
587
|
+
return e.replace(M(br), "$1^");
|
|
611
588
|
}
|
|
612
|
-
function
|
|
613
|
-
return
|
|
589
|
+
function Or(e) {
|
|
590
|
+
return e.trim().split(/\s+/).map((t) => t.replace(M(Sr), (r, n, o, s, i) => N(n) ? "" : N(o) ? `>=${n}.0.0 <${Number(n) + 1}.0.0-0` : N(s) ? n === "0" ? `>=${n}.${o}.0 <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.0 <${Number(n) + 1}.0.0-0` : i ? n === "0" ? o === "0" ? `>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s) + 1}-0` : `>=${n}.${o}.${s}-${i} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s}-${i} <${Number(n) + 1}.0.0-0` : n === "0" ? o === "0" ? `>=${n}.${o}.${s} <${n}.${o}.${Number(s) + 1}-0` : `>=${n}.${o}.${s} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s} <${Number(n) + 1}.0.0-0`)).join(" ");
|
|
614
591
|
}
|
|
615
|
-
function
|
|
616
|
-
return
|
|
592
|
+
function Lr(e) {
|
|
593
|
+
return e.trim().split(/\s+/).map((t) => t.replace(M(wr), (r, n, o, s, i) => N(n) ? "" : N(o) ? `>=${n}.0.0 <${Number(n) + 1}.0.0-0` : N(s) ? `>=${n}.${o}.0 <${n}.${Number(o) + 1}.0-0` : i ? `>=${n}.${o}.${s}-${i} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s} <${n}.${Number(o) + 1}.0-0`)).join(" ");
|
|
617
594
|
}
|
|
618
|
-
function
|
|
619
|
-
return
|
|
620
|
-
const
|
|
621
|
-
return
|
|
595
|
+
function Mr(e) {
|
|
596
|
+
return e.split(/\s+/).map((t) => t.trim().replace(M(Ir), (r, n, o, s, i, a) => {
|
|
597
|
+
const c = N(o), l = c || N(s), f = l || N(i);
|
|
598
|
+
return n === "=" && f && (n = ""), a = "", c ? n === ">" || n === "<" ? "<0.0.0-0" : "*" : n && f ? (l && (s = 0), i = 0, n === ">" ? (n = ">=", l ? (o = Number(o) + 1, s = 0, i = 0) : (s = Number(s) + 1, i = 0)) : n === "<=" && (n = "<", l ? o = Number(o) + 1 : s = Number(s) + 1), n === "<" && (a = "-0"), `${n + o}.${s}.${i}${a}`) : l ? `>=${o}.0.0${a} <${Number(o) + 1}.0.0-0` : f ? `>=${o}.${s}.0${a} <${o}.${Number(s) + 1}.0-0` : r;
|
|
622
599
|
})).join(" ");
|
|
623
600
|
}
|
|
624
|
-
function
|
|
625
|
-
return
|
|
601
|
+
function Cr(e) {
|
|
602
|
+
return e.trim().replace(M(Rr), "");
|
|
626
603
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
604
|
+
function Dr(e) {
|
|
605
|
+
return e.trim().replace(M(Tr), "");
|
|
629
606
|
}
|
|
630
|
-
function
|
|
631
|
-
return
|
|
607
|
+
function he(e, t) {
|
|
608
|
+
return e = Number(e) || e, t = Number(t) || t, e > t ? 1 : e === t ? 0 : -1;
|
|
632
609
|
}
|
|
633
|
-
function
|
|
634
|
-
const { preRelease:
|
|
635
|
-
if (
|
|
636
|
-
|
|
637
|
-
if (
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
const a = n[s], c = o[s];
|
|
643
|
-
if (a !== c)
|
|
644
|
-
return a === void 0 && c === void 0 ? 0 : a ? c ? compareAtom(a, c) : -1 : 1;
|
|
610
|
+
function Fr(e, t) {
|
|
611
|
+
const { preRelease: r } = e, { preRelease: n } = t;
|
|
612
|
+
if (r === void 0 && n) return 1;
|
|
613
|
+
if (r && n === void 0) return -1;
|
|
614
|
+
if (r === void 0 && n === void 0) return 0;
|
|
615
|
+
for (let o = 0, s = r.length; o <= s; o++) {
|
|
616
|
+
const i = r[o], a = n[o];
|
|
617
|
+
if (i !== a)
|
|
618
|
+
return i === void 0 && a === void 0 ? 0 : i ? a ? he(i, a) : -1 : 1;
|
|
645
619
|
}
|
|
646
620
|
return 0;
|
|
647
621
|
}
|
|
648
|
-
function
|
|
649
|
-
return
|
|
622
|
+
function se(e, t) {
|
|
623
|
+
return he(e.major, t.major) || he(e.minor, t.minor) || he(e.patch, t.patch) || Fr(e, t);
|
|
650
624
|
}
|
|
651
|
-
function
|
|
652
|
-
return
|
|
625
|
+
function Re(e, t) {
|
|
626
|
+
return e.version === t.version;
|
|
653
627
|
}
|
|
654
|
-
function
|
|
655
|
-
switch (
|
|
628
|
+
function Hr(e, t) {
|
|
629
|
+
switch (e.operator) {
|
|
656
630
|
case "":
|
|
657
631
|
case "=":
|
|
658
|
-
return
|
|
632
|
+
return Re(e, t);
|
|
659
633
|
case ">":
|
|
660
|
-
return
|
|
634
|
+
return se(e, t) < 0;
|
|
661
635
|
case ">=":
|
|
662
|
-
return
|
|
636
|
+
return Re(e, t) || se(e, t) < 0;
|
|
663
637
|
case "<":
|
|
664
|
-
return
|
|
638
|
+
return se(e, t) > 0;
|
|
665
639
|
case "<=":
|
|
666
|
-
return
|
|
640
|
+
return Re(e, t) || se(e, t) > 0;
|
|
667
641
|
case void 0:
|
|
668
642
|
return !0;
|
|
669
643
|
default:
|
|
670
644
|
return !1;
|
|
671
645
|
}
|
|
672
646
|
}
|
|
673
|
-
function
|
|
674
|
-
return
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
parseTildes,
|
|
691
|
-
parseXRanges,
|
|
692
|
-
parseStar
|
|
693
|
-
)(r);
|
|
694
|
-
}
|
|
695
|
-
function parseRange(r) {
|
|
696
|
-
return pipe(
|
|
697
|
-
// handle hyphenRange
|
|
698
|
-
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
|
699
|
-
parseHyphen,
|
|
700
|
-
// handle trim comparator
|
|
701
|
-
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
|
702
|
-
parseComparatorTrim,
|
|
703
|
-
// handle trim tilde
|
|
704
|
-
// `~ 1.2.3` => `~1.2.3`
|
|
705
|
-
parseTildeTrim,
|
|
706
|
-
// handle trim caret
|
|
707
|
-
// `^ 1.2.3` => `^1.2.3`
|
|
708
|
-
parseCaretTrim
|
|
709
|
-
)(r.trim()).split(/\s+/).join(" ");
|
|
710
|
-
}
|
|
711
|
-
function satisfy(r, t) {
|
|
712
|
-
if (!r)
|
|
713
|
-
return !1;
|
|
714
|
-
const n = extractComparator(r);
|
|
715
|
-
if (!n)
|
|
716
|
-
return !1;
|
|
717
|
-
const [, o, , s, i, a, c] = n, u = {
|
|
718
|
-
operator: o,
|
|
719
|
-
version: combineVersion(s, i, a, c),
|
|
720
|
-
// exclude build atom
|
|
721
|
-
major: s,
|
|
722
|
-
minor: i,
|
|
723
|
-
patch: a,
|
|
724
|
-
preRelease: c == null ? void 0 : c.split(".")
|
|
647
|
+
function Gr(e) {
|
|
648
|
+
return ht(Or, Lr, Mr, Cr)(e);
|
|
649
|
+
}
|
|
650
|
+
function Ur(e) {
|
|
651
|
+
return ht(Ar, vr, Pr, kr)(e.trim()).split(/\s+/).join(" ");
|
|
652
|
+
}
|
|
653
|
+
function X(e, t) {
|
|
654
|
+
if (!e) return !1;
|
|
655
|
+
const r = Ve(e);
|
|
656
|
+
if (!r) return !1;
|
|
657
|
+
const [, n, , o, s, i, a] = r, c = {
|
|
658
|
+
operator: n,
|
|
659
|
+
version: We(o, s, i, a),
|
|
660
|
+
major: o,
|
|
661
|
+
minor: s,
|
|
662
|
+
patch: i,
|
|
663
|
+
preRelease: a == null ? void 0 : a.split(".")
|
|
725
664
|
}, l = t.split("||");
|
|
726
|
-
for (const
|
|
727
|
-
const
|
|
728
|
-
if (!
|
|
729
|
-
return !0;
|
|
665
|
+
for (const f of l) {
|
|
666
|
+
const d = f.trim();
|
|
667
|
+
if (!d || d === "*" || d === "x") return !0;
|
|
730
668
|
try {
|
|
731
|
-
const
|
|
732
|
-
if (!
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
const R = extractComparator(E);
|
|
743
|
-
if (!R) {
|
|
744
|
-
b = !1;
|
|
669
|
+
const u = Ur(d);
|
|
670
|
+
if (!u.trim()) return !0;
|
|
671
|
+
const h = u.split(" ").map((E) => Gr(E)).join(" ");
|
|
672
|
+
if (!h.trim()) return !0;
|
|
673
|
+
const p = h.split(/\s+/).map((E) => Dr(E)).filter(Boolean);
|
|
674
|
+
if (p.length === 0) continue;
|
|
675
|
+
let y = !0;
|
|
676
|
+
for (const E of p) {
|
|
677
|
+
const m = Ve(E);
|
|
678
|
+
if (!m) {
|
|
679
|
+
y = !1;
|
|
745
680
|
break;
|
|
746
681
|
}
|
|
747
|
-
const [,
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
682
|
+
const [, g, , b, w, _, S] = m;
|
|
683
|
+
if (!Hr({
|
|
684
|
+
operator: g,
|
|
685
|
+
version: We(b, w, _, S),
|
|
686
|
+
major: b,
|
|
687
|
+
minor: w,
|
|
688
|
+
patch: _,
|
|
689
|
+
preRelease: S == null ? void 0 : S.split(".")
|
|
690
|
+
}, c)) {
|
|
691
|
+
y = !1;
|
|
757
692
|
break;
|
|
758
693
|
}
|
|
759
694
|
}
|
|
760
|
-
if (
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
console.error(`[semver] Error processing range part "${y}":`, p);
|
|
695
|
+
if (y) return !0;
|
|
696
|
+
} catch (u) {
|
|
697
|
+
console.error(`[semver] Error processing range part "${d}":`, u);
|
|
764
698
|
continue;
|
|
765
699
|
}
|
|
766
700
|
}
|
|
767
701
|
return !1;
|
|
768
702
|
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
703
|
+
const re = "default", dt = "global";
|
|
704
|
+
function xr(e, t, r, n) {
|
|
705
|
+
var s, i;
|
|
706
|
+
let o;
|
|
707
|
+
if ("get" in e ? o = e.get : "lib" in e ? o = () => Promise.resolve(e.lib) : o = () => Promise.resolve(() => {
|
|
708
|
+
throw new Error(`Can not get shared '${r}'!`);
|
|
709
|
+
}), (s = e.shareConfig) != null && s.eager && ((i = e.treeShaking) != null && i.mode)) throw new Error('Can not set "eager:true" and "treeShaking" at the same time!');
|
|
776
710
|
return {
|
|
777
711
|
deps: [],
|
|
778
712
|
useIn: [],
|
|
779
713
|
from: t,
|
|
780
714
|
loading: null,
|
|
781
|
-
...
|
|
715
|
+
...e,
|
|
782
716
|
shareConfig: {
|
|
783
|
-
requiredVersion: `^${
|
|
717
|
+
requiredVersion: `^${e.version}`,
|
|
784
718
|
singleton: !1,
|
|
785
719
|
eager: !1,
|
|
786
720
|
strictVersion: !1,
|
|
787
|
-
...
|
|
721
|
+
...e.shareConfig
|
|
788
722
|
},
|
|
789
|
-
get:
|
|
790
|
-
loaded:
|
|
791
|
-
version:
|
|
792
|
-
scope: Array.isArray(
|
|
793
|
-
strategy: (
|
|
794
|
-
treeShaking:
|
|
795
|
-
...
|
|
796
|
-
mode:
|
|
797
|
-
status:
|
|
723
|
+
get: o,
|
|
724
|
+
loaded: e != null && e.loaded || "lib" in e ? !0 : void 0,
|
|
725
|
+
version: e.version ?? "0",
|
|
726
|
+
scope: Array.isArray(e.scope) ? e.scope : [e.scope ?? "default"],
|
|
727
|
+
strategy: (e.strategy ?? n) || "version-first",
|
|
728
|
+
treeShaking: e.treeShaking ? {
|
|
729
|
+
...e.treeShaking,
|
|
730
|
+
mode: e.treeShaking.mode ?? "server-calc",
|
|
731
|
+
status: e.treeShaking.status ?? $e.UNKNOWN,
|
|
798
732
|
useIn: []
|
|
799
733
|
} : void 0
|
|
800
734
|
};
|
|
801
735
|
}
|
|
802
|
-
function
|
|
803
|
-
const
|
|
804
|
-
const
|
|
805
|
-
return a
|
|
806
|
-
a
|
|
807
|
-
}),
|
|
808
|
-
}, {}),
|
|
809
|
-
|
|
736
|
+
function pt(e, t) {
|
|
737
|
+
const r = t.shared || {}, n = t.name, o = Object.keys(r).reduce((i, a) => {
|
|
738
|
+
const c = st(r[a]);
|
|
739
|
+
return i[a] = i[a] || [], c.forEach((l) => {
|
|
740
|
+
i[a].push(xr(l, n, a, t.shareStrategy));
|
|
741
|
+
}), i;
|
|
742
|
+
}, {}), s = { ...e.shared };
|
|
743
|
+
return Object.keys(o).forEach((i) => {
|
|
744
|
+
s[i] ? o[i].forEach((a) => {
|
|
745
|
+
s[i].find((c) => c.version === a.version) || s[i].push(a);
|
|
746
|
+
}) : s[i] = o[i];
|
|
747
|
+
}), {
|
|
748
|
+
allShareInfos: s,
|
|
749
|
+
newShareInfos: o
|
|
810
750
|
};
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
}
|
|
817
|
-
function
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
const n = (o) => {
|
|
825
|
-
if (!Number.isNaN(Number(o))) {
|
|
826
|
-
const i = o.split(".");
|
|
827
|
-
let a = o;
|
|
828
|
-
for (let c = 0; c < 3 - i.length; c++)
|
|
829
|
-
a += ".0";
|
|
830
|
-
return a;
|
|
751
|
+
}
|
|
752
|
+
function ee(e, t) {
|
|
753
|
+
if (!e) return !1;
|
|
754
|
+
const { status: r, mode: n } = e;
|
|
755
|
+
return r === $e.NO_USE ? !1 : r === $e.CALCULATED ? !0 : n === "runtime-infer" ? t ? Vr(e, t) : !0 : !1;
|
|
756
|
+
}
|
|
757
|
+
function G(e, t) {
|
|
758
|
+
const r = (n) => {
|
|
759
|
+
if (!Number.isNaN(Number(n))) {
|
|
760
|
+
const o = n.split(".");
|
|
761
|
+
let s = n;
|
|
762
|
+
for (let i = 0; i < 3 - o.length; i++) s += ".0";
|
|
763
|
+
return s;
|
|
831
764
|
}
|
|
832
|
-
return
|
|
765
|
+
return n;
|
|
833
766
|
};
|
|
834
|
-
return !!
|
|
767
|
+
return !!X(r(e), `<=${r(t)}`);
|
|
835
768
|
}
|
|
836
|
-
const
|
|
837
|
-
const
|
|
838
|
-
return
|
|
769
|
+
const te = (e, t) => {
|
|
770
|
+
const r = t || function(n, o) {
|
|
771
|
+
return G(n, o);
|
|
839
772
|
};
|
|
840
|
-
return Object.keys(
|
|
841
|
-
},
|
|
842
|
-
if (!
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
return n ? !!t.every((o) => n.includes(o)) : !1;
|
|
773
|
+
return Object.keys(e).reduce((n, o) => !n || r(n, o) || n === "0" ? o : n, 0);
|
|
774
|
+
}, pe = (e) => !!e.loaded || typeof e.lib == "function", Br = (e) => !!e.loading, Vr = (e, t) => {
|
|
775
|
+
if (!e || !t) return !1;
|
|
776
|
+
const { usedExports: r } = e;
|
|
777
|
+
return r ? !!t.every((n) => r.includes(n)) : !1;
|
|
846
778
|
};
|
|
847
|
-
function
|
|
848
|
-
const
|
|
849
|
-
let
|
|
850
|
-
const
|
|
851
|
-
return
|
|
779
|
+
function Wr(e, t, r, n) {
|
|
780
|
+
const o = e[t][r];
|
|
781
|
+
let s = "", i = ee(n);
|
|
782
|
+
const a = function(c, l) {
|
|
783
|
+
return i ? o[c].treeShaking ? o[l].treeShaking ? !pe(o[c].treeShaking) && G(c, l) : !1 : !0 : !pe(o[c]) && G(c, l);
|
|
852
784
|
};
|
|
853
|
-
if (
|
|
854
|
-
if (
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
a = !1;
|
|
785
|
+
if (i) {
|
|
786
|
+
if (s = te(e[t][r], a), s) return {
|
|
787
|
+
version: s,
|
|
788
|
+
useTreesShaking: i
|
|
789
|
+
};
|
|
790
|
+
i = !1;
|
|
860
791
|
}
|
|
861
792
|
return {
|
|
862
|
-
version:
|
|
863
|
-
useTreesShaking:
|
|
793
|
+
version: te(e[t][r], a),
|
|
794
|
+
useTreesShaking: i
|
|
864
795
|
};
|
|
865
796
|
}
|
|
866
|
-
const
|
|
867
|
-
function
|
|
868
|
-
const
|
|
869
|
-
let
|
|
870
|
-
const
|
|
871
|
-
if (
|
|
872
|
-
if (!
|
|
873
|
-
|
|
874
|
-
if (
|
|
875
|
-
|
|
876
|
-
if (isLoadingOrLoaded(s[l].treeShaking))
|
|
877
|
-
return isLoadingOrLoaded(s[u].treeShaking) ? !!versionLt(u, l) : !0;
|
|
878
|
-
if (isLoadingOrLoaded(s[u].treeShaking))
|
|
879
|
-
return !1;
|
|
797
|
+
const U = (e) => pe(e) || Br(e);
|
|
798
|
+
function jr(e, t, r, n) {
|
|
799
|
+
const o = e[t][r];
|
|
800
|
+
let s = "", i = ee(n);
|
|
801
|
+
const a = function(c, l) {
|
|
802
|
+
if (i) {
|
|
803
|
+
if (!o[c].treeShaking) return !0;
|
|
804
|
+
if (!o[l].treeShaking) return !1;
|
|
805
|
+
if (U(o[l].treeShaking)) return U(o[c].treeShaking) ? !!G(c, l) : !0;
|
|
806
|
+
if (U(o[c].treeShaking)) return !1;
|
|
880
807
|
}
|
|
881
|
-
return
|
|
808
|
+
return U(o[l]) ? U(o[c]) ? !!G(c, l) : !0 : U(o[c]) ? !1 : G(c, l);
|
|
882
809
|
};
|
|
883
|
-
if (
|
|
884
|
-
if (
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
a = !1;
|
|
810
|
+
if (i) {
|
|
811
|
+
if (s = te(e[t][r], a), s) return {
|
|
812
|
+
version: s,
|
|
813
|
+
useTreesShaking: i
|
|
814
|
+
};
|
|
815
|
+
i = !1;
|
|
890
816
|
}
|
|
891
817
|
return {
|
|
892
|
-
version:
|
|
893
|
-
useTreesShaking:
|
|
818
|
+
version: te(e[t][r], a),
|
|
819
|
+
useTreesShaking: i
|
|
894
820
|
};
|
|
895
821
|
}
|
|
896
|
-
function
|
|
897
|
-
return
|
|
898
|
-
}
|
|
899
|
-
function
|
|
900
|
-
if (!
|
|
901
|
-
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
const S = shouldUseTreeShaking(c);
|
|
928
|
-
if (S) {
|
|
929
|
-
for (const [_, T] of Object.entries(r[l][t]))
|
|
930
|
-
if (shouldUseTreeShaking(T.treeShaking, c == null ? void 0 : c.usedExports) && satisfy(_, d))
|
|
931
|
-
return {
|
|
932
|
-
shared: T,
|
|
933
|
-
useTreesShaking: S
|
|
934
|
-
};
|
|
935
|
-
}
|
|
936
|
-
for (const [_, T] of Object.entries(r[l][t]))
|
|
937
|
-
if (satisfy(_, d))
|
|
822
|
+
function Kr(e) {
|
|
823
|
+
return e === "loaded-first" ? jr : Wr;
|
|
824
|
+
}
|
|
825
|
+
function de(e, t, r, n) {
|
|
826
|
+
if (!e) return;
|
|
827
|
+
const { shareConfig: o, scope: s = re, strategy: i, treeShaking: a } = r, c = Array.isArray(s) ? s : [s];
|
|
828
|
+
for (const l of c) if (o && e[l] && e[l][t]) {
|
|
829
|
+
const { requiredVersion: f } = o, { version: d, useTreesShaking: u } = Kr(i)(e, l, t, a), h = () => {
|
|
830
|
+
const y = e[l][t][d];
|
|
831
|
+
if (o.singleton) {
|
|
832
|
+
if (typeof f == "string" && !X(d, f)) {
|
|
833
|
+
const E = `Version ${d} from ${d && y.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${f})`;
|
|
834
|
+
o.strictVersion ? k(E) : ke(E);
|
|
835
|
+
}
|
|
836
|
+
return {
|
|
837
|
+
shared: y,
|
|
838
|
+
useTreesShaking: u
|
|
839
|
+
};
|
|
840
|
+
} else {
|
|
841
|
+
if (f === !1 || f === "*") return {
|
|
842
|
+
shared: y,
|
|
843
|
+
useTreesShaking: u
|
|
844
|
+
};
|
|
845
|
+
if (X(d, f)) return {
|
|
846
|
+
shared: y,
|
|
847
|
+
useTreesShaking: u
|
|
848
|
+
};
|
|
849
|
+
const E = ee(a);
|
|
850
|
+
if (E) {
|
|
851
|
+
for (const [m, g] of Object.entries(e[l][t]))
|
|
852
|
+
if (ee(g.treeShaking, a == null ? void 0 : a.usedExports) && X(m, f))
|
|
938
853
|
return {
|
|
939
|
-
shared:
|
|
940
|
-
useTreesShaking:
|
|
854
|
+
shared: g,
|
|
855
|
+
useTreesShaking: E
|
|
941
856
|
};
|
|
942
857
|
}
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
858
|
+
for (const [m, g] of Object.entries(e[l][t])) if (X(m, f)) return {
|
|
859
|
+
shared: g,
|
|
860
|
+
useTreesShaking: !1
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
}, p = {
|
|
864
|
+
shareScopeMap: e,
|
|
865
|
+
scope: l,
|
|
866
|
+
pkgName: t,
|
|
867
|
+
version: d,
|
|
868
|
+
GlobalFederation: Q.__FEDERATION__,
|
|
869
|
+
shareInfo: r,
|
|
870
|
+
resolver: h
|
|
871
|
+
};
|
|
872
|
+
return (n.emit(p) || p).resolver();
|
|
873
|
+
}
|
|
954
874
|
}
|
|
955
|
-
function
|
|
956
|
-
return
|
|
875
|
+
function mt() {
|
|
876
|
+
return Q.__FEDERATION__.__SHARE__;
|
|
957
877
|
}
|
|
958
|
-
function
|
|
959
|
-
const { pkgName: t, extraOptions:
|
|
960
|
-
if (!
|
|
961
|
-
return;
|
|
878
|
+
function je(e) {
|
|
879
|
+
const { pkgName: t, extraOptions: r, shareInfos: n } = e, o = (c) => {
|
|
880
|
+
if (!c) return;
|
|
962
881
|
const l = {};
|
|
963
|
-
|
|
964
|
-
l[
|
|
965
|
-
})
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
!isLoaded(l[p]) && versionLt(p, m)
|
|
970
|
-
);
|
|
971
|
-
});
|
|
972
|
-
return l[y];
|
|
973
|
-
}, i = (n == null ? void 0 : n.resolver) ?? s, a = (u) => u !== null && typeof u == "object" && !Array.isArray(u), c = (...u) => {
|
|
882
|
+
return c.forEach((d) => {
|
|
883
|
+
l[d.version] = d;
|
|
884
|
+
}), l[te(l, function(d, u) {
|
|
885
|
+
return !pe(l[d]) && G(d, u);
|
|
886
|
+
})];
|
|
887
|
+
}, s = (r == null ? void 0 : r.resolver) ?? o, i = (c) => c !== null && typeof c == "object" && !Array.isArray(c), a = (...c) => {
|
|
974
888
|
const l = {};
|
|
975
|
-
for (const
|
|
976
|
-
if (
|
|
977
|
-
for (const [
|
|
978
|
-
const
|
|
979
|
-
|
|
889
|
+
for (const f of c)
|
|
890
|
+
if (f)
|
|
891
|
+
for (const [d, u] of Object.entries(f)) {
|
|
892
|
+
const h = l[d];
|
|
893
|
+
i(h) && i(u) ? l[d] = a(h, u) : u !== void 0 && (l[d] = u);
|
|
980
894
|
}
|
|
981
895
|
return l;
|
|
982
896
|
};
|
|
983
|
-
return
|
|
897
|
+
return a(s(n[t]), r == null ? void 0 : r.customShareInfo);
|
|
984
898
|
}
|
|
985
|
-
const
|
|
986
|
-
|
|
899
|
+
const x = (e, t) => {
|
|
900
|
+
e.useIn || (e.useIn = []), sr(e.useIn, t);
|
|
987
901
|
};
|
|
988
|
-
function
|
|
989
|
-
return t &&
|
|
990
|
-
}
|
|
991
|
-
function
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
if (s.startsWith("/")) {
|
|
1003
|
-
const c = n.name;
|
|
1004
|
-
return s = `.${s}`, {
|
|
1005
|
-
pkgNameOrAlias: c,
|
|
1006
|
-
expose: s,
|
|
1007
|
-
remote: n
|
|
1008
|
-
};
|
|
1009
|
-
} else if (s === "")
|
|
1010
|
-
return {
|
|
1011
|
-
pkgNameOrAlias: n.name,
|
|
1012
|
-
expose: ".",
|
|
1013
|
-
remote: n
|
|
902
|
+
function ie(e, t) {
|
|
903
|
+
return t && e.treeShaking ? e.treeShaking : e;
|
|
904
|
+
}
|
|
905
|
+
function qr(e, t) {
|
|
906
|
+
for (const r of e) {
|
|
907
|
+
const n = t.startsWith(r.name);
|
|
908
|
+
let o = t.replace(r.name, "");
|
|
909
|
+
if (n) {
|
|
910
|
+
if (o.startsWith("/")) {
|
|
911
|
+
const a = r.name;
|
|
912
|
+
return o = `.${o}`, {
|
|
913
|
+
pkgNameOrAlias: a,
|
|
914
|
+
expose: o,
|
|
915
|
+
remote: r
|
|
1014
916
|
};
|
|
917
|
+
} else if (o === "") return {
|
|
918
|
+
pkgNameOrAlias: r.name,
|
|
919
|
+
expose: ".",
|
|
920
|
+
remote: r
|
|
921
|
+
};
|
|
1015
922
|
}
|
|
1016
|
-
const
|
|
1017
|
-
let
|
|
1018
|
-
if (
|
|
1019
|
-
if (
|
|
1020
|
-
const
|
|
1021
|
-
return
|
|
1022
|
-
pkgNameOrAlias:
|
|
1023
|
-
expose:
|
|
1024
|
-
remote:
|
|
1025
|
-
};
|
|
1026
|
-
} else if (a === "")
|
|
1027
|
-
return {
|
|
1028
|
-
pkgNameOrAlias: n.alias,
|
|
1029
|
-
expose: ".",
|
|
1030
|
-
remote: n
|
|
923
|
+
const s = r.alias && t.startsWith(r.alias);
|
|
924
|
+
let i = r.alias && t.replace(r.alias, "");
|
|
925
|
+
if (r.alias && s) {
|
|
926
|
+
if (i && i.startsWith("/")) {
|
|
927
|
+
const a = r.alias;
|
|
928
|
+
return i = `.${i}`, {
|
|
929
|
+
pkgNameOrAlias: a,
|
|
930
|
+
expose: i,
|
|
931
|
+
remote: r
|
|
1031
932
|
};
|
|
933
|
+
} else if (i === "") return {
|
|
934
|
+
pkgNameOrAlias: r.alias,
|
|
935
|
+
expose: ".",
|
|
936
|
+
remote: r
|
|
937
|
+
};
|
|
1032
938
|
}
|
|
1033
939
|
}
|
|
1034
940
|
}
|
|
1035
|
-
function
|
|
1036
|
-
for (const
|
|
1037
|
-
if (t ===
|
|
1038
|
-
return n;
|
|
1039
|
-
}
|
|
1040
|
-
function registerPlugins(r, t) {
|
|
1041
|
-
const n = getGlobalHostPlugins(), o = [
|
|
1042
|
-
t.hooks,
|
|
1043
|
-
t.remoteHandler.hooks,
|
|
1044
|
-
t.sharedHandler.hooks,
|
|
1045
|
-
t.snapshotHandler.hooks,
|
|
1046
|
-
t.loaderHook,
|
|
1047
|
-
t.bridgeHook
|
|
1048
|
-
];
|
|
1049
|
-
return n.length > 0 && n.forEach((s) => {
|
|
1050
|
-
r != null && r.find((i) => i.name !== s.name) && r.push(s);
|
|
1051
|
-
}), r && r.length > 0 && r.forEach((s) => {
|
|
1052
|
-
o.forEach((i) => {
|
|
1053
|
-
i.applyPlugin(s, t);
|
|
1054
|
-
});
|
|
1055
|
-
}), r;
|
|
941
|
+
function zr(e, t) {
|
|
942
|
+
for (const r of e)
|
|
943
|
+
if (t === r.name || r.alias && t === r.alias) return r;
|
|
1056
944
|
}
|
|
1057
|
-
const
|
|
1058
|
-
|
|
1059
|
-
return
|
|
945
|
+
const yt = "RUNTIME-001", Et = "RUNTIME-002", gt = "RUNTIME-003", _t = "RUNTIME-004", bt = "RUNTIME-005", Ae = "RUNTIME-006", Rt = "RUNTIME-007", Fe = "RUNTIME-008", Jr = "RUNTIME-009", St = "RUNTIME-010", Xr = (e) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`, D = (e, t, r, n) => {
|
|
946
|
+
const o = [`${[t[e]]} #${e}`];
|
|
947
|
+
return r && o.push(`args: ${JSON.stringify(r)}`), o.push(Xr(e)), n && o.push(`Original Error Message:
|
|
948
|
+
${n}`), o.join(`
|
|
949
|
+
`);
|
|
950
|
+
}, L = {
|
|
951
|
+
[yt]: "Failed to get remoteEntry exports.",
|
|
952
|
+
[Et]: 'The remote entry interface does not contain "init"',
|
|
953
|
+
[gt]: "Failed to get manifest.",
|
|
954
|
+
[_t]: "Failed to locate remote.",
|
|
955
|
+
[bt]: "Invalid loadShareSync function call from bundler runtime",
|
|
956
|
+
[Ae]: "Invalid loadShareSync function call from runtime",
|
|
957
|
+
[Rt]: "Failed to get remote snapshot.",
|
|
958
|
+
[Fe]: "Failed to load script resources.",
|
|
959
|
+
[Jr]: "Please call createInstance first.",
|
|
960
|
+
[St]: 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.'
|
|
961
|
+
};
|
|
962
|
+
({
|
|
963
|
+
...L
|
|
964
|
+
});
|
|
965
|
+
const $t = ".then(callbacks[0]).catch(callbacks[1])";
|
|
966
|
+
async function Yr({ entry: e, remoteEntryExports: t }) {
|
|
967
|
+
return new Promise((r, n) => {
|
|
1060
968
|
try {
|
|
1061
|
-
t ?
|
|
1062
|
-
n,
|
|
1063
|
-
o
|
|
1064
|
-
]) : import(
|
|
969
|
+
t ? r(t) : typeof FEDERATION_ALLOW_NEW_FUNCTION < "u" ? new Function("callbacks", `import("${e}")${$t}`)([r, n]) : import(
|
|
1065
970
|
/* webpackIgnore: true */
|
|
1066
971
|
/* @vite-ignore */
|
|
1067
|
-
|
|
1068
|
-
).then(
|
|
1069
|
-
} catch (
|
|
1070
|
-
o
|
|
972
|
+
e
|
|
973
|
+
).then(r).catch(n);
|
|
974
|
+
} catch (o) {
|
|
975
|
+
n(o);
|
|
1071
976
|
}
|
|
1072
977
|
});
|
|
1073
978
|
}
|
|
1074
|
-
async function
|
|
1075
|
-
return new Promise((
|
|
979
|
+
async function Zr({ entry: e, remoteEntryExports: t }) {
|
|
980
|
+
return new Promise((r, n) => {
|
|
1076
981
|
try {
|
|
1077
|
-
t ?
|
|
1078
|
-
} catch (
|
|
1079
|
-
o
|
|
982
|
+
t ? r(t) : typeof __system_context__ > "u" ? System.import(e).then(r).catch(n) : new Function("callbacks", `System.import("${e}")${$t}`)([r, n]);
|
|
983
|
+
} catch (o) {
|
|
984
|
+
n(o);
|
|
1080
985
|
}
|
|
1081
986
|
});
|
|
1082
987
|
}
|
|
1083
|
-
function
|
|
1084
|
-
const { remoteEntryKey:
|
|
1085
|
-
return
|
|
1086
|
-
remoteName:
|
|
1087
|
-
remoteEntryUrl:
|
|
1088
|
-
remoteEntryKey:
|
|
1089
|
-
})),
|
|
1090
|
-
}
|
|
1091
|
-
async function
|
|
1092
|
-
const { entryExports:
|
|
1093
|
-
|
|
1094
|
-
return i;
|
|
1095
|
-
const a = s ? s(n) : n;
|
|
1096
|
-
return loadScript(a, {
|
|
988
|
+
function wt(e, t, r) {
|
|
989
|
+
const { remoteEntryKey: n, entryExports: o } = Me(e, t);
|
|
990
|
+
return T(o, D(yt, L, {
|
|
991
|
+
remoteName: e,
|
|
992
|
+
remoteEntryUrl: r,
|
|
993
|
+
remoteEntryKey: n
|
|
994
|
+
})), o;
|
|
995
|
+
}
|
|
996
|
+
async function Qr({ name: e, globalName: t, entry: r, loaderHook: n, getEntryUrl: o }) {
|
|
997
|
+
const { entryExports: s } = Me(e, t);
|
|
998
|
+
return s || tr(o ? o(r) : r, {
|
|
1097
999
|
attrs: {},
|
|
1098
|
-
createScriptHook: (
|
|
1099
|
-
const
|
|
1100
|
-
|
|
1101
|
-
|
|
1000
|
+
createScriptHook: (i, a) => {
|
|
1001
|
+
const c = n.lifecycle.createScript.emit({
|
|
1002
|
+
url: i,
|
|
1003
|
+
attrs: a
|
|
1004
|
+
});
|
|
1005
|
+
if (c && (c instanceof HTMLScriptElement || "script" in c || "timeout" in c))
|
|
1006
|
+
return c;
|
|
1102
1007
|
}
|
|
1103
|
-
}).then(() =>
|
|
1104
|
-
throw
|
|
1105
|
-
remoteName:
|
|
1106
|
-
resourceUrl:
|
|
1107
|
-
})),
|
|
1008
|
+
}).then(() => wt(e, t, r)).catch((i) => {
|
|
1009
|
+
throw T(void 0, D(Fe, L, {
|
|
1010
|
+
remoteName: e,
|
|
1011
|
+
resourceUrl: r
|
|
1012
|
+
})), i;
|
|
1108
1013
|
});
|
|
1109
1014
|
}
|
|
1110
|
-
async function
|
|
1111
|
-
const { entry:
|
|
1112
|
-
switch (
|
|
1015
|
+
async function en({ remoteInfo: e, remoteEntryExports: t, loaderHook: r, getEntryUrl: n }) {
|
|
1016
|
+
const { entry: o, entryGlobalName: s, name: i, type: a } = e;
|
|
1017
|
+
switch (a) {
|
|
1113
1018
|
case "esm":
|
|
1114
1019
|
case "module":
|
|
1115
|
-
return
|
|
1020
|
+
return Yr({
|
|
1021
|
+
entry: o,
|
|
1022
|
+
remoteEntryExports: t
|
|
1023
|
+
});
|
|
1116
1024
|
case "system":
|
|
1117
|
-
return
|
|
1025
|
+
return Zr({
|
|
1026
|
+
entry: o,
|
|
1027
|
+
remoteEntryExports: t
|
|
1028
|
+
});
|
|
1118
1029
|
default:
|
|
1119
|
-
return
|
|
1120
|
-
entry:
|
|
1121
|
-
globalName:
|
|
1122
|
-
name:
|
|
1123
|
-
loaderHook:
|
|
1124
|
-
getEntryUrl:
|
|
1030
|
+
return Qr({
|
|
1031
|
+
entry: o,
|
|
1032
|
+
globalName: s,
|
|
1033
|
+
name: i,
|
|
1034
|
+
loaderHook: r,
|
|
1035
|
+
getEntryUrl: n
|
|
1125
1036
|
});
|
|
1126
1037
|
}
|
|
1127
1038
|
}
|
|
1128
|
-
async function
|
|
1129
|
-
const { entry:
|
|
1130
|
-
return
|
|
1131
|
-
attrs: {
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1039
|
+
async function tn({ remoteInfo: e, loaderHook: t }) {
|
|
1040
|
+
const { entry: r, entryGlobalName: n, name: o, type: s } = e, { entryExports: i } = Me(o, n);
|
|
1041
|
+
return i || or(r, {
|
|
1042
|
+
attrs: {
|
|
1043
|
+
name: o,
|
|
1044
|
+
globalName: n,
|
|
1045
|
+
type: s
|
|
1046
|
+
},
|
|
1047
|
+
loaderHook: { createScriptHook: (a, c = {}) => {
|
|
1048
|
+
const l = t.lifecycle.createScript.emit({
|
|
1049
|
+
url: a,
|
|
1050
|
+
attrs: c
|
|
1051
|
+
});
|
|
1052
|
+
if (l && "url" in l)
|
|
1053
|
+
return l;
|
|
1054
|
+
} }
|
|
1055
|
+
}).then(() => wt(o, n, r)).catch((a) => {
|
|
1056
|
+
throw a;
|
|
1141
1057
|
});
|
|
1142
1058
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const { entry: t, name:
|
|
1145
|
-
return
|
|
1146
|
-
}
|
|
1147
|
-
async function
|
|
1148
|
-
const { origin: t, remoteEntryExports:
|
|
1149
|
-
if (
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1059
|
+
function ve(e) {
|
|
1060
|
+
const { entry: t, name: r } = e;
|
|
1061
|
+
return ze(r, t);
|
|
1062
|
+
}
|
|
1063
|
+
async function me(e) {
|
|
1064
|
+
const { origin: t, remoteEntryExports: r, remoteInfo: n, getEntryUrl: o, _inErrorHandling: s = !1 } = e, i = ve(n);
|
|
1065
|
+
if (r) return r;
|
|
1066
|
+
if (!V[i]) {
|
|
1067
|
+
const a = t.remoteHandler.hooks.lifecycle.loadEntry, c = t.loaderHook;
|
|
1068
|
+
V[i] = a.emit({
|
|
1069
|
+
loaderHook: c,
|
|
1070
|
+
remoteInfo: n,
|
|
1071
|
+
remoteEntryExports: r
|
|
1072
|
+
}).then((l) => l || ((typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : F()) ? en({
|
|
1073
|
+
remoteInfo: n,
|
|
1074
|
+
remoteEntryExports: r,
|
|
1075
|
+
loaderHook: c,
|
|
1076
|
+
getEntryUrl: o
|
|
1077
|
+
}) : tn({
|
|
1078
|
+
remoteInfo: n,
|
|
1079
|
+
loaderHook: c
|
|
1080
|
+
}))).catch(async (l) => {
|
|
1081
|
+
const f = ve(n);
|
|
1082
|
+
if (l instanceof Error && l.message.includes(Fe) && !s) {
|
|
1083
|
+
const d = (h) => me({
|
|
1084
|
+
...h,
|
|
1085
|
+
_inErrorHandling: !0
|
|
1086
|
+
}), u = await t.loaderHook.lifecycle.loadEntryError.emit({
|
|
1087
|
+
getRemoteEntry: d,
|
|
1167
1088
|
origin: t,
|
|
1168
|
-
remoteInfo:
|
|
1169
|
-
remoteEntryExports:
|
|
1170
|
-
globalLoading,
|
|
1171
|
-
uniqueKey:
|
|
1089
|
+
remoteInfo: n,
|
|
1090
|
+
remoteEntryExports: r,
|
|
1091
|
+
globalLoading: V,
|
|
1092
|
+
uniqueKey: f
|
|
1172
1093
|
});
|
|
1173
|
-
if (
|
|
1174
|
-
return m;
|
|
1094
|
+
if (u) return u;
|
|
1175
1095
|
}
|
|
1176
1096
|
throw l;
|
|
1177
1097
|
});
|
|
1178
1098
|
}
|
|
1179
|
-
return
|
|
1099
|
+
return V[i];
|
|
1180
1100
|
}
|
|
1181
|
-
function
|
|
1101
|
+
function Pe(e) {
|
|
1182
1102
|
return {
|
|
1183
|
-
...
|
|
1184
|
-
entry: "entry" in
|
|
1185
|
-
type:
|
|
1186
|
-
entryGlobalName:
|
|
1187
|
-
shareScope:
|
|
1103
|
+
...e,
|
|
1104
|
+
entry: "entry" in e ? e.entry : "",
|
|
1105
|
+
type: e.type || dt,
|
|
1106
|
+
entryGlobalName: e.entryGlobalName || e.name,
|
|
1107
|
+
shareScope: e.shareScope || re
|
|
1188
1108
|
};
|
|
1189
1109
|
}
|
|
1190
|
-
function
|
|
1110
|
+
function rn() {
|
|
1111
|
+
return typeof FEDERATION_BUILD_IDENTIFIER < "u" ? FEDERATION_BUILD_IDENTIFIER : "";
|
|
1112
|
+
}
|
|
1113
|
+
function nn(e, t) {
|
|
1114
|
+
const r = hr(), n = [
|
|
1115
|
+
t.hooks,
|
|
1116
|
+
t.remoteHandler.hooks,
|
|
1117
|
+
t.sharedHandler.hooks,
|
|
1118
|
+
t.snapshotHandler.hooks,
|
|
1119
|
+
t.loaderHook,
|
|
1120
|
+
t.bridgeHook
|
|
1121
|
+
];
|
|
1122
|
+
return r.length > 0 && r.forEach((o) => {
|
|
1123
|
+
e != null && e.find((s) => s.name !== o.name) && e.push(o);
|
|
1124
|
+
}), e && e.length > 0 && e.forEach((o) => {
|
|
1125
|
+
n.forEach((s) => {
|
|
1126
|
+
s.applyPlugin(o, t);
|
|
1127
|
+
});
|
|
1128
|
+
}), e;
|
|
1129
|
+
}
|
|
1130
|
+
function It(e) {
|
|
1191
1131
|
return {
|
|
1192
1132
|
resourceCategory: "sync",
|
|
1193
1133
|
share: !0,
|
|
1194
1134
|
depsRemote: !0,
|
|
1195
1135
|
prefetchInterface: !1,
|
|
1196
|
-
...
|
|
1136
|
+
...e
|
|
1197
1137
|
};
|
|
1198
1138
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return t.map((
|
|
1201
|
-
const
|
|
1202
|
-
return
|
|
1203
|
-
remoteInfo:
|
|
1204
|
-
remotes:
|
|
1139
|
+
function on(e, t) {
|
|
1140
|
+
return t.map((r) => {
|
|
1141
|
+
const n = zr(e, r.nameOrAlias);
|
|
1142
|
+
return T(n, `Unable to preload ${r.nameOrAlias} as it is not included in ${!n && Xe({
|
|
1143
|
+
remoteInfo: n,
|
|
1144
|
+
remotes: e
|
|
1205
1145
|
})}`), {
|
|
1206
|
-
remote:
|
|
1207
|
-
preloadConfig:
|
|
1146
|
+
remote: n,
|
|
1147
|
+
preloadConfig: It(r)
|
|
1208
1148
|
};
|
|
1209
1149
|
});
|
|
1210
1150
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return
|
|
1151
|
+
function sn(e) {
|
|
1152
|
+
return e ? e.map((t) => t === "." ? t : t.startsWith("./") ? t.replace("./", "") : t) : [];
|
|
1213
1153
|
}
|
|
1214
|
-
function
|
|
1215
|
-
const { cssAssets:
|
|
1154
|
+
function Nt(e, t, r, n = !0) {
|
|
1155
|
+
const { cssAssets: o, jsAssetsWithoutEntry: s, entryAssets: i } = r;
|
|
1216
1156
|
if (t.options.inBrowser) {
|
|
1217
|
-
if (
|
|
1218
|
-
const { moduleInfo:
|
|
1219
|
-
|
|
1157
|
+
if (i.forEach((a) => {
|
|
1158
|
+
const { moduleInfo: c } = a, l = t.moduleCache.get(e.name);
|
|
1159
|
+
me(l ? {
|
|
1220
1160
|
origin: t,
|
|
1221
|
-
remoteInfo:
|
|
1161
|
+
remoteInfo: c,
|
|
1222
1162
|
remoteEntryExports: l.remoteEntryExports
|
|
1223
1163
|
} : {
|
|
1224
1164
|
origin: t,
|
|
1225
|
-
remoteInfo:
|
|
1165
|
+
remoteInfo: c,
|
|
1226
1166
|
remoteEntryExports: void 0
|
|
1227
1167
|
});
|
|
1228
|
-
}),
|
|
1229
|
-
const
|
|
1168
|
+
}), n) {
|
|
1169
|
+
const a = {
|
|
1230
1170
|
rel: "preload",
|
|
1231
1171
|
as: "style"
|
|
1232
1172
|
};
|
|
1233
|
-
|
|
1234
|
-
const { link: l, needAttach:
|
|
1235
|
-
url:
|
|
1173
|
+
o.forEach((c) => {
|
|
1174
|
+
const { link: l, needAttach: f } = ge({
|
|
1175
|
+
url: c,
|
|
1236
1176
|
cb: () => {
|
|
1237
1177
|
},
|
|
1238
|
-
attrs:
|
|
1239
|
-
createLinkHook: (
|
|
1240
|
-
const
|
|
1241
|
-
url:
|
|
1242
|
-
attrs:
|
|
1178
|
+
attrs: a,
|
|
1179
|
+
createLinkHook: (d, u) => {
|
|
1180
|
+
const h = t.loaderHook.lifecycle.createLink.emit({
|
|
1181
|
+
url: d,
|
|
1182
|
+
attrs: u
|
|
1243
1183
|
});
|
|
1244
|
-
if (
|
|
1245
|
-
return m;
|
|
1184
|
+
if (h instanceof HTMLLinkElement) return h;
|
|
1246
1185
|
}
|
|
1247
1186
|
});
|
|
1248
|
-
|
|
1187
|
+
f && document.head.appendChild(l);
|
|
1249
1188
|
});
|
|
1250
1189
|
} else {
|
|
1251
|
-
const
|
|
1190
|
+
const a = {
|
|
1252
1191
|
rel: "stylesheet",
|
|
1253
1192
|
type: "text/css"
|
|
1254
1193
|
};
|
|
1255
|
-
|
|
1256
|
-
const { link: l, needAttach:
|
|
1257
|
-
url:
|
|
1194
|
+
o.forEach((c) => {
|
|
1195
|
+
const { link: l, needAttach: f } = ge({
|
|
1196
|
+
url: c,
|
|
1258
1197
|
cb: () => {
|
|
1259
1198
|
},
|
|
1260
|
-
attrs:
|
|
1261
|
-
createLinkHook: (
|
|
1262
|
-
const
|
|
1263
|
-
url:
|
|
1264
|
-
attrs:
|
|
1199
|
+
attrs: a,
|
|
1200
|
+
createLinkHook: (d, u) => {
|
|
1201
|
+
const h = t.loaderHook.lifecycle.createLink.emit({
|
|
1202
|
+
url: d,
|
|
1203
|
+
attrs: u
|
|
1265
1204
|
});
|
|
1266
|
-
if (
|
|
1267
|
-
return m;
|
|
1205
|
+
if (h instanceof HTMLLinkElement) return h;
|
|
1268
1206
|
},
|
|
1269
1207
|
needDeleteLink: !1
|
|
1270
1208
|
});
|
|
1271
|
-
|
|
1209
|
+
f && document.head.appendChild(l);
|
|
1272
1210
|
});
|
|
1273
1211
|
}
|
|
1274
|
-
if (
|
|
1275
|
-
const
|
|
1212
|
+
if (n) {
|
|
1213
|
+
const a = {
|
|
1276
1214
|
rel: "preload",
|
|
1277
1215
|
as: "script"
|
|
1278
1216
|
};
|
|
1279
|
-
|
|
1280
|
-
const { link: l, needAttach:
|
|
1281
|
-
url:
|
|
1217
|
+
s.forEach((c) => {
|
|
1218
|
+
const { link: l, needAttach: f } = ge({
|
|
1219
|
+
url: c,
|
|
1282
1220
|
cb: () => {
|
|
1283
1221
|
},
|
|
1284
|
-
attrs:
|
|
1285
|
-
createLinkHook: (
|
|
1286
|
-
const
|
|
1287
|
-
url:
|
|
1288
|
-
attrs:
|
|
1222
|
+
attrs: a,
|
|
1223
|
+
createLinkHook: (d, u) => {
|
|
1224
|
+
const h = t.loaderHook.lifecycle.createLink.emit({
|
|
1225
|
+
url: d,
|
|
1226
|
+
attrs: u
|
|
1289
1227
|
});
|
|
1290
|
-
if (
|
|
1291
|
-
return m;
|
|
1228
|
+
if (h instanceof HTMLLinkElement) return h;
|
|
1292
1229
|
}
|
|
1293
1230
|
});
|
|
1294
|
-
|
|
1231
|
+
f && document.head.appendChild(l);
|
|
1295
1232
|
});
|
|
1296
1233
|
} else {
|
|
1297
|
-
const
|
|
1234
|
+
const a = {
|
|
1298
1235
|
fetchpriority: "high",
|
|
1299
|
-
type: (
|
|
1236
|
+
type: (e == null ? void 0 : e.type) === "module" ? "module" : "text/javascript"
|
|
1300
1237
|
};
|
|
1301
|
-
|
|
1302
|
-
const { script: l, needAttach:
|
|
1303
|
-
url:
|
|
1238
|
+
s.forEach((c) => {
|
|
1239
|
+
const { script: l, needAttach: f } = rt({
|
|
1240
|
+
url: c,
|
|
1304
1241
|
cb: () => {
|
|
1305
1242
|
},
|
|
1306
|
-
attrs:
|
|
1307
|
-
createScriptHook: (
|
|
1308
|
-
const
|
|
1309
|
-
url:
|
|
1310
|
-
attrs:
|
|
1243
|
+
attrs: a,
|
|
1244
|
+
createScriptHook: (d, u) => {
|
|
1245
|
+
const h = t.loaderHook.lifecycle.createScript.emit({
|
|
1246
|
+
url: d,
|
|
1247
|
+
attrs: u
|
|
1311
1248
|
});
|
|
1312
|
-
if (
|
|
1313
|
-
return m;
|
|
1249
|
+
if (h instanceof HTMLScriptElement) return h;
|
|
1314
1250
|
},
|
|
1315
1251
|
needDeleteScript: !0
|
|
1316
1252
|
});
|
|
1317
|
-
|
|
1253
|
+
f && document.head.appendChild(l);
|
|
1318
1254
|
});
|
|
1319
1255
|
}
|
|
1320
1256
|
}
|
|
1321
1257
|
}
|
|
1322
|
-
function
|
|
1323
|
-
const n = t, o = Array.isArray(
|
|
1324
|
-
o.length || o.push("default"), o.forEach((
|
|
1325
|
-
n[
|
|
1258
|
+
function an(e, t, r) {
|
|
1259
|
+
const n = t, o = Array.isArray(e.shareScope) ? e.shareScope : [e.shareScope];
|
|
1260
|
+
o.length || o.push("default"), o.forEach((i) => {
|
|
1261
|
+
n[i] || (n[i] = {});
|
|
1326
1262
|
});
|
|
1327
1263
|
const s = {
|
|
1328
|
-
version:
|
|
1329
|
-
shareScopeKeys: Array.isArray(
|
|
1264
|
+
version: e.version || "",
|
|
1265
|
+
shareScopeKeys: Array.isArray(e.shareScope) ? o : e.shareScope || "default"
|
|
1330
1266
|
};
|
|
1331
|
-
Object.defineProperty(s, "shareScopeMap", {
|
|
1267
|
+
return Object.defineProperty(s, "shareScopeMap", {
|
|
1332
1268
|
value: n,
|
|
1333
|
-
// remoteEntryInitOptions will be traversed and assigned during container init, ,so this attribute is not allowed to be traversed
|
|
1334
1269
|
enumerable: !1
|
|
1335
|
-
})
|
|
1336
|
-
const i = n[o[0]];
|
|
1337
|
-
return {
|
|
1270
|
+
}), {
|
|
1338
1271
|
remoteEntryInitOptions: s,
|
|
1339
|
-
shareScope:
|
|
1340
|
-
initScope: []
|
|
1272
|
+
shareScope: n[o[0]],
|
|
1273
|
+
initScope: r ?? []
|
|
1341
1274
|
};
|
|
1342
1275
|
}
|
|
1343
|
-
class
|
|
1344
|
-
constructor({ remoteInfo:
|
|
1345
|
-
this.inited = !1, this.initing = !1, this.lib = void 0, this.remoteInfo =
|
|
1276
|
+
var Tt = class {
|
|
1277
|
+
constructor({ remoteInfo: e, host: t }) {
|
|
1278
|
+
this.inited = !1, this.initing = !1, this.lib = void 0, this.remoteInfo = e, this.host = t;
|
|
1346
1279
|
}
|
|
1347
1280
|
async getEntry() {
|
|
1348
|
-
if (this.remoteEntryExports)
|
|
1349
|
-
|
|
1350
|
-
const t = await getRemoteEntry({
|
|
1281
|
+
if (this.remoteEntryExports) return this.remoteEntryExports;
|
|
1282
|
+
const e = await me({
|
|
1351
1283
|
origin: this.host,
|
|
1352
1284
|
remoteInfo: this.remoteInfo,
|
|
1353
1285
|
remoteEntryExports: this.remoteEntryExports
|
|
1354
1286
|
});
|
|
1355
|
-
return
|
|
1356
|
-
${
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
if (this.inited)
|
|
1362
|
-
return o;
|
|
1287
|
+
return T(e, `remoteEntryExports is undefined
|
|
1288
|
+
${Xe(this.remoteInfo)}`), this.remoteEntryExports = e, this.remoteEntryExports;
|
|
1289
|
+
}
|
|
1290
|
+
async init(e, t, r) {
|
|
1291
|
+
const n = await this.getEntry();
|
|
1292
|
+
if (this.inited) return n;
|
|
1363
1293
|
if (this.initPromise)
|
|
1364
|
-
return await this.initPromise,
|
|
1294
|
+
return await this.initPromise, n;
|
|
1365
1295
|
this.initing = !0, this.initPromise = (async () => {
|
|
1366
|
-
const { remoteEntryInitOptions:
|
|
1367
|
-
shareScope:
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
initScope: a,
|
|
1296
|
+
const { remoteEntryInitOptions: o, shareScope: s, initScope: i } = an(this.remoteInfo, this.host.shareScopeMap, r), a = await this.host.hooks.lifecycle.beforeInitContainer.emit({
|
|
1297
|
+
shareScope: s,
|
|
1298
|
+
remoteEntryInitOptions: o,
|
|
1299
|
+
initScope: i,
|
|
1371
1300
|
remoteInfo: this.remoteInfo,
|
|
1372
1301
|
origin: this.host
|
|
1373
1302
|
});
|
|
1374
|
-
typeof (
|
|
1303
|
+
typeof (n == null ? void 0 : n.init) > "u" && k(D(Et, L, {
|
|
1375
1304
|
hostName: this.host.name,
|
|
1376
1305
|
remoteName: this.remoteInfo.name,
|
|
1377
1306
|
remoteEntryUrl: this.remoteInfo.entry,
|
|
1378
1307
|
remoteEntryKey: this.remoteInfo.entryGlobalName
|
|
1379
|
-
})), await
|
|
1380
|
-
...
|
|
1381
|
-
id:
|
|
1382
|
-
remoteSnapshot:
|
|
1383
|
-
remoteEntryExports:
|
|
1308
|
+
})), await n.init(a.shareScope, a.initScope, a.remoteEntryInitOptions), await this.host.hooks.lifecycle.initContainer.emit({
|
|
1309
|
+
...a,
|
|
1310
|
+
id: e,
|
|
1311
|
+
remoteSnapshot: t,
|
|
1312
|
+
remoteEntryExports: n
|
|
1384
1313
|
}), this.inited = !0;
|
|
1385
1314
|
})();
|
|
1386
1315
|
try {
|
|
@@ -1388,198 +1317,186 @@ class Module {
|
|
|
1388
1317
|
} finally {
|
|
1389
1318
|
this.initing = !1, this.initPromise = void 0;
|
|
1390
1319
|
}
|
|
1391
|
-
return
|
|
1320
|
+
return n;
|
|
1392
1321
|
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
expose: n,
|
|
1322
|
+
async get(e, t, r, n) {
|
|
1323
|
+
const { loadFactory: o = !0 } = r || { loadFactory: !0 }, s = await this.init(e, n);
|
|
1324
|
+
this.lib = s;
|
|
1325
|
+
let i;
|
|
1326
|
+
i = await this.host.loaderHook.lifecycle.getModuleFactory.emit({
|
|
1327
|
+
remoteEntryExports: s,
|
|
1328
|
+
expose: t,
|
|
1401
1329
|
moduleInfo: this.remoteInfo
|
|
1402
|
-
}),
|
|
1403
|
-
const
|
|
1404
|
-
return
|
|
1405
|
-
}
|
|
1406
|
-
wraperFactory(
|
|
1407
|
-
function
|
|
1408
|
-
|
|
1409
|
-
value:
|
|
1330
|
+
}), i || (i = await s.get(t)), T(i, `${Z(this.remoteInfo)} remote don't export ${t}.`);
|
|
1331
|
+
const a = cr(this.remoteInfo.name, t), c = this.wraperFactory(i, a);
|
|
1332
|
+
return o ? await c() : c;
|
|
1333
|
+
}
|
|
1334
|
+
wraperFactory(e, t) {
|
|
1335
|
+
function r(n, o) {
|
|
1336
|
+
n && typeof n == "object" && Object.isExtensible(n) && !Object.getOwnPropertyDescriptor(n, Symbol.for("mf_module_id")) && Object.defineProperty(n, Symbol.for("mf_module_id"), {
|
|
1337
|
+
value: o,
|
|
1410
1338
|
enumerable: !1
|
|
1411
1339
|
});
|
|
1412
1340
|
}
|
|
1413
|
-
return
|
|
1414
|
-
const
|
|
1415
|
-
return
|
|
1341
|
+
return e instanceof Promise ? async () => {
|
|
1342
|
+
const n = await e();
|
|
1343
|
+
return r(n, t), n;
|
|
1416
1344
|
} : () => {
|
|
1417
|
-
const
|
|
1418
|
-
return
|
|
1345
|
+
const n = e();
|
|
1346
|
+
return r(n, t), n;
|
|
1419
1347
|
};
|
|
1420
1348
|
}
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
this.type = "", this.listeners = /* @__PURE__ */ new Set(), t && (this.type = t);
|
|
1349
|
+
}, A = class {
|
|
1350
|
+
constructor(e) {
|
|
1351
|
+
this.type = "", this.listeners = /* @__PURE__ */ new Set(), e && (this.type = e);
|
|
1425
1352
|
}
|
|
1426
|
-
on(
|
|
1427
|
-
typeof
|
|
1353
|
+
on(e) {
|
|
1354
|
+
typeof e == "function" && this.listeners.add(e);
|
|
1428
1355
|
}
|
|
1429
|
-
once(
|
|
1430
|
-
const
|
|
1431
|
-
this.on(function
|
|
1432
|
-
return
|
|
1356
|
+
once(e) {
|
|
1357
|
+
const t = this;
|
|
1358
|
+
this.on(function r(...n) {
|
|
1359
|
+
return t.remove(r), e.apply(null, n);
|
|
1433
1360
|
});
|
|
1434
1361
|
}
|
|
1435
|
-
emit(...
|
|
1436
|
-
let
|
|
1437
|
-
return this.listeners.size > 0 && this.listeners.forEach((
|
|
1438
|
-
|
|
1439
|
-
}),
|
|
1362
|
+
emit(...e) {
|
|
1363
|
+
let t;
|
|
1364
|
+
return this.listeners.size > 0 && this.listeners.forEach((r) => {
|
|
1365
|
+
t = r(...e);
|
|
1366
|
+
}), t;
|
|
1440
1367
|
}
|
|
1441
|
-
remove(
|
|
1442
|
-
this.listeners.delete(
|
|
1368
|
+
remove(e) {
|
|
1369
|
+
this.listeners.delete(e);
|
|
1443
1370
|
}
|
|
1444
1371
|
removeAll() {
|
|
1445
1372
|
this.listeners.clear();
|
|
1446
1373
|
}
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
n = i();
|
|
1374
|
+
}, v = class extends A {
|
|
1375
|
+
emit(...e) {
|
|
1376
|
+
let t;
|
|
1377
|
+
const r = Array.from(this.listeners);
|
|
1378
|
+
if (r.length > 0) {
|
|
1379
|
+
let n = 0;
|
|
1380
|
+
const o = (s) => s === !1 ? !1 : n < r.length ? Promise.resolve(r[n++].apply(null, e)).then(o) : s;
|
|
1381
|
+
t = o();
|
|
1456
1382
|
}
|
|
1457
|
-
return Promise.resolve(
|
|
1383
|
+
return Promise.resolve(t);
|
|
1458
1384
|
}
|
|
1459
|
-
}
|
|
1460
|
-
function
|
|
1461
|
-
if (!
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
for (const n in r)
|
|
1465
|
-
if (!(n in t))
|
|
1466
|
-
return !1;
|
|
1385
|
+
};
|
|
1386
|
+
function At(e, t) {
|
|
1387
|
+
if (!Le(t)) return !1;
|
|
1388
|
+
if (e !== t) {
|
|
1389
|
+
for (const r in e) if (!(r in t)) return !1;
|
|
1467
1390
|
}
|
|
1468
1391
|
return !0;
|
|
1469
1392
|
}
|
|
1470
|
-
class
|
|
1471
|
-
constructor(
|
|
1472
|
-
super(), this.onerror =
|
|
1473
|
-
}
|
|
1474
|
-
emit(
|
|
1475
|
-
|
|
1476
|
-
for (const
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);
|
|
1483
|
-
break;
|
|
1484
|
-
}
|
|
1485
|
-
} catch (o) {
|
|
1486
|
-
warn(o), this.onerror(o);
|
|
1393
|
+
var j = class extends A {
|
|
1394
|
+
constructor(e) {
|
|
1395
|
+
super(), this.onerror = k, this.type = e;
|
|
1396
|
+
}
|
|
1397
|
+
emit(e) {
|
|
1398
|
+
Le(e) || k(`The data for the "${this.type}" hook should be an object.`);
|
|
1399
|
+
for (const t of this.listeners) try {
|
|
1400
|
+
const r = t(e);
|
|
1401
|
+
if (At(e, r)) e = r;
|
|
1402
|
+
else {
|
|
1403
|
+
this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);
|
|
1404
|
+
break;
|
|
1487
1405
|
}
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
return
|
|
1406
|
+
} catch (r) {
|
|
1407
|
+
ke(r), this.onerror(r);
|
|
1408
|
+
}
|
|
1409
|
+
return e;
|
|
1410
|
+
}
|
|
1411
|
+
}, H = class extends A {
|
|
1412
|
+
constructor(e) {
|
|
1413
|
+
super(), this.onerror = k, this.type = e;
|
|
1414
|
+
}
|
|
1415
|
+
emit(e) {
|
|
1416
|
+
Le(e) || k(`The response data for the "${this.type}" hook must be an object.`);
|
|
1417
|
+
const t = Array.from(this.listeners);
|
|
1418
|
+
if (t.length > 0) {
|
|
1419
|
+
let r = 0;
|
|
1420
|
+
const n = (s) => (ke(s), this.onerror(s), e), o = (s) => {
|
|
1421
|
+
if (At(e, s)) {
|
|
1422
|
+
if (e = s, r < t.length) try {
|
|
1423
|
+
return Promise.resolve(t[r++](e)).then(o, n);
|
|
1424
|
+
} catch (i) {
|
|
1425
|
+
return n(i);
|
|
1426
|
+
}
|
|
1427
|
+
} else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);
|
|
1428
|
+
return e;
|
|
1511
1429
|
};
|
|
1512
|
-
return Promise.resolve(
|
|
1430
|
+
return Promise.resolve(o(e));
|
|
1513
1431
|
}
|
|
1514
|
-
return Promise.resolve(
|
|
1432
|
+
return Promise.resolve(e);
|
|
1515
1433
|
}
|
|
1516
|
-
}
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
this.registerPlugins = {}, this.lifecycle = t, this.lifecycleKeys = Object.keys(t);
|
|
1434
|
+
}, K = class {
|
|
1435
|
+
constructor(e) {
|
|
1436
|
+
this.registerPlugins = {}, this.lifecycle = e, this.lifecycleKeys = Object.keys(e);
|
|
1520
1437
|
}
|
|
1521
|
-
applyPlugin(
|
|
1522
|
-
var
|
|
1523
|
-
|
|
1524
|
-
const
|
|
1525
|
-
|
|
1526
|
-
const
|
|
1527
|
-
|
|
1438
|
+
applyPlugin(e, t) {
|
|
1439
|
+
var n;
|
|
1440
|
+
T(ar(e), "Plugin configuration is invalid.");
|
|
1441
|
+
const r = e.name;
|
|
1442
|
+
T(r, "A name must be provided by the plugin."), this.registerPlugins[r] || (this.registerPlugins[r] = e, (n = e.apply) == null || n.call(e, t), Object.keys(this.lifecycle).forEach((o) => {
|
|
1443
|
+
const s = e[o];
|
|
1444
|
+
s && this.lifecycle[o].on(s);
|
|
1528
1445
|
}));
|
|
1529
1446
|
}
|
|
1530
|
-
removePlugin(
|
|
1531
|
-
|
|
1532
|
-
const
|
|
1533
|
-
|
|
1534
|
-
|
|
1447
|
+
removePlugin(e) {
|
|
1448
|
+
T(e, "A name is required.");
|
|
1449
|
+
const t = this.registerPlugins[e];
|
|
1450
|
+
T(t, `The plugin "${e}" is not registered.`), Object.keys(t).forEach((r) => {
|
|
1451
|
+
r !== "name" && this.lifecycle[r].remove(t[r]);
|
|
1535
1452
|
});
|
|
1536
1453
|
}
|
|
1454
|
+
};
|
|
1455
|
+
function vt(e, t) {
|
|
1456
|
+
const r = it(t);
|
|
1457
|
+
r.url || k(`The attribute remoteEntry of ${e.name} must not be undefined.`);
|
|
1458
|
+
let n = Ie(t, r.url);
|
|
1459
|
+
!F() && !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;
|
|
1537
1460
|
}
|
|
1538
|
-
function
|
|
1539
|
-
const n = getRemoteEntryInfoFromSnapshot(t);
|
|
1540
|
-
n.url || error(`The attribute remoteEntry of ${r.name} must not be undefined.`);
|
|
1541
|
-
let o = getResourceUrl(t, n.url);
|
|
1542
|
-
!isBrowserEnv() && !o.startsWith("http") && (o = `https:${o}`), r.type = n.type, r.entryGlobalName = n.globalName, r.entry = o, r.version = t.version, r.buildVersion = t.buildVersion;
|
|
1543
|
-
}
|
|
1544
|
-
function snapshotPlugin() {
|
|
1461
|
+
function cn() {
|
|
1545
1462
|
return {
|
|
1546
1463
|
name: "snapshot-plugin",
|
|
1547
|
-
async afterResolve(
|
|
1548
|
-
const { remote: t, pkgNameOrAlias:
|
|
1549
|
-
if (!
|
|
1550
|
-
const { remoteSnapshot:
|
|
1464
|
+
async afterResolve(e) {
|
|
1465
|
+
const { remote: t, pkgNameOrAlias: r, expose: n, origin: o, remoteInfo: s, id: i } = e;
|
|
1466
|
+
if (!Oe(t) || !ot(t)) {
|
|
1467
|
+
const { remoteSnapshot: a, globalSnapshot: c } = await o.snapshotHandler.loadRemoteSnapshotInfo({
|
|
1551
1468
|
moduleInfo: t,
|
|
1552
|
-
id:
|
|
1469
|
+
id: i
|
|
1553
1470
|
});
|
|
1554
|
-
|
|
1471
|
+
vt(s, a);
|
|
1555
1472
|
const l = {
|
|
1556
1473
|
remote: t,
|
|
1557
1474
|
preloadConfig: {
|
|
1558
|
-
nameOrAlias:
|
|
1559
|
-
exposes: [
|
|
1475
|
+
nameOrAlias: r,
|
|
1476
|
+
exposes: [n],
|
|
1560
1477
|
resourceCategory: "sync",
|
|
1561
1478
|
share: !1,
|
|
1562
1479
|
depsRemote: !1
|
|
1563
1480
|
}
|
|
1564
|
-
},
|
|
1565
|
-
origin:
|
|
1481
|
+
}, f = await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({
|
|
1482
|
+
origin: o,
|
|
1566
1483
|
preloadOptions: l,
|
|
1567
|
-
remoteInfo:
|
|
1484
|
+
remoteInfo: s,
|
|
1568
1485
|
remote: t,
|
|
1569
|
-
remoteSnapshot:
|
|
1570
|
-
globalSnapshot:
|
|
1486
|
+
remoteSnapshot: a,
|
|
1487
|
+
globalSnapshot: c
|
|
1571
1488
|
});
|
|
1572
|
-
return
|
|
1573
|
-
...
|
|
1574
|
-
remoteSnapshot:
|
|
1489
|
+
return f && Nt(s, o, f, !1), {
|
|
1490
|
+
...e,
|
|
1491
|
+
remoteSnapshot: a
|
|
1575
1492
|
};
|
|
1576
1493
|
}
|
|
1577
|
-
return
|
|
1494
|
+
return e;
|
|
1578
1495
|
}
|
|
1579
1496
|
};
|
|
1580
1497
|
}
|
|
1581
|
-
function
|
|
1582
|
-
const t =
|
|
1498
|
+
function ln(e) {
|
|
1499
|
+
const t = e.split(":");
|
|
1583
1500
|
return t.length === 1 ? {
|
|
1584
1501
|
name: t[0],
|
|
1585
1502
|
version: void 0
|
|
@@ -1591,124 +1508,114 @@ function splitId(r) {
|
|
|
1591
1508
|
version: t[2]
|
|
1592
1509
|
};
|
|
1593
1510
|
}
|
|
1594
|
-
function
|
|
1595
|
-
const
|
|
1596
|
-
if (
|
|
1597
|
-
const
|
|
1598
|
-
for (const
|
|
1599
|
-
if (
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
}, n, !1, s, void 0);
|
|
1511
|
+
function Pt(e, t, r, n, o = {}, s) {
|
|
1512
|
+
const { value: i } = q(e, Z(t)), a = s || i;
|
|
1513
|
+
if (a && !Ye(a) && (r(a, t, n), a.remotesInfo)) {
|
|
1514
|
+
const c = Object.keys(a.remotesInfo);
|
|
1515
|
+
for (const l of c) {
|
|
1516
|
+
if (o[l]) continue;
|
|
1517
|
+
o[l] = !0;
|
|
1518
|
+
const f = ln(l), d = a.remotesInfo[l];
|
|
1519
|
+
Pt(e, {
|
|
1520
|
+
name: f.name,
|
|
1521
|
+
version: d.matchedVersion
|
|
1522
|
+
}, r, !1, o, void 0);
|
|
1607
1523
|
}
|
|
1608
1524
|
}
|
|
1609
1525
|
}
|
|
1610
|
-
const
|
|
1611
|
-
function
|
|
1612
|
-
const
|
|
1613
|
-
if (
|
|
1614
|
-
var
|
|
1615
|
-
let
|
|
1616
|
-
if (
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
return;
|
|
1627
|
-
const T = getResourceUrl(E, getRemoteEntryInfoFromSnapshot(E).url);
|
|
1628
|
-
T && c.push({
|
|
1629
|
-
name: R.name,
|
|
1526
|
+
const Se = (e, t) => document.querySelector(`${e}[${e === "link" ? "href" : "src"}="${t}"]`);
|
|
1527
|
+
function un(e, t, r, n, o) {
|
|
1528
|
+
const s = [], i = [], a = [], c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), { options: f } = e, { preloadConfig: d } = t, { depsRemote: u } = d;
|
|
1529
|
+
if (Pt(n, r, (p, y, E) => {
|
|
1530
|
+
var S;
|
|
1531
|
+
let m;
|
|
1532
|
+
if (E) m = d;
|
|
1533
|
+
else if (Array.isArray(u)) {
|
|
1534
|
+
const R = u.find(($) => $.nameOrAlias === y.name || $.nameOrAlias === y.alias);
|
|
1535
|
+
if (!R) return;
|
|
1536
|
+
m = It(R);
|
|
1537
|
+
} else if (u === !0) m = d;
|
|
1538
|
+
else return;
|
|
1539
|
+
const g = Ie(p, it(p).url);
|
|
1540
|
+
g && a.push({
|
|
1541
|
+
name: y.name,
|
|
1630
1542
|
moduleInfo: {
|
|
1631
|
-
name:
|
|
1632
|
-
entry:
|
|
1633
|
-
type: "remoteEntryType" in
|
|
1634
|
-
entryGlobalName: "globalName" in
|
|
1543
|
+
name: y.name,
|
|
1544
|
+
entry: g,
|
|
1545
|
+
type: "remoteEntryType" in p ? p.remoteEntryType : "global",
|
|
1546
|
+
entryGlobalName: "globalName" in p ? p.globalName : y.name,
|
|
1635
1547
|
shareScope: "",
|
|
1636
|
-
version: "version" in
|
|
1548
|
+
version: "version" in p ? p.version : void 0
|
|
1637
1549
|
},
|
|
1638
|
-
url:
|
|
1550
|
+
url: g
|
|
1639
1551
|
});
|
|
1640
|
-
let
|
|
1641
|
-
const w =
|
|
1642
|
-
w.length && "modules" in
|
|
1643
|
-
function
|
|
1644
|
-
const $ =
|
|
1645
|
-
return
|
|
1552
|
+
let b = "modules" in p ? p.modules : [];
|
|
1553
|
+
const w = sn(m.exposes);
|
|
1554
|
+
w.length && "modules" in p && (b = (S = p == null ? void 0 : p.modules) == null ? void 0 : S.reduce((R, $) => ((w == null ? void 0 : w.indexOf($.moduleName)) !== -1 && R.push($), R), []));
|
|
1555
|
+
function _(R) {
|
|
1556
|
+
const $ = R.map((O) => Ie(p, O));
|
|
1557
|
+
return m.filter ? $.filter(m.filter) : $;
|
|
1646
1558
|
}
|
|
1647
|
-
if (
|
|
1648
|
-
const
|
|
1649
|
-
for (let $ = 0; $ <
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1652
|
-
id:
|
|
1653
|
-
name:
|
|
1654
|
-
remoteSnapshot:
|
|
1655
|
-
preloadConfig:
|
|
1656
|
-
remote:
|
|
1657
|
-
origin:
|
|
1658
|
-
}), !
|
|
1559
|
+
if (b) {
|
|
1560
|
+
const R = b.length;
|
|
1561
|
+
for (let $ = 0; $ < R; $++) {
|
|
1562
|
+
const O = b[$], ye = `${y.name}/${O.moduleName}`;
|
|
1563
|
+
e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({
|
|
1564
|
+
id: O.moduleName === "." ? y.name : ye,
|
|
1565
|
+
name: y.name,
|
|
1566
|
+
remoteSnapshot: p,
|
|
1567
|
+
preloadConfig: m,
|
|
1568
|
+
remote: y,
|
|
1569
|
+
origin: e
|
|
1570
|
+
}), !dr(ye) && (m.resourceCategory === "all" ? (s.push(..._(O.assets.css.async)), s.push(..._(O.assets.css.sync)), i.push(..._(O.assets.js.async)), i.push(..._(O.assets.js.sync))) : (m.resourceCategory = "sync") && (s.push(..._(O.assets.css.sync)), i.push(..._(O.assets.js.sync))), pr(ye));
|
|
1659
1571
|
}
|
|
1660
1572
|
}
|
|
1661
|
-
}, !0, {},
|
|
1662
|
-
const
|
|
1663
|
-
const { shared:
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
}),
|
|
1667
|
-
l.add(
|
|
1573
|
+
}, !0, {}, o), o.shared && o.shared.length > 0) {
|
|
1574
|
+
const p = (y, E) => {
|
|
1575
|
+
const { shared: m } = de(e.shareScopeMap, E.sharedName, y, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
|
|
1576
|
+
m && typeof m.lib == "function" && (E.assets.js.sync.forEach((g) => {
|
|
1577
|
+
c.add(g);
|
|
1578
|
+
}), E.assets.css.sync.forEach((g) => {
|
|
1579
|
+
l.add(g);
|
|
1668
1580
|
}));
|
|
1669
1581
|
};
|
|
1670
|
-
|
|
1671
|
-
var
|
|
1672
|
-
const
|
|
1673
|
-
if (!
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
return;
|
|
1678
|
-
arrayOptions(_).forEach((w) => {
|
|
1679
|
-
E(w, R);
|
|
1582
|
+
o.shared.forEach((y) => {
|
|
1583
|
+
var g;
|
|
1584
|
+
const E = (g = f.shared) == null ? void 0 : g[y.sharedName];
|
|
1585
|
+
if (!E) return;
|
|
1586
|
+
const m = y.version ? E.find((b) => b.version === y.version) : E;
|
|
1587
|
+
m && st(m).forEach((b) => {
|
|
1588
|
+
p(b, y);
|
|
1680
1589
|
});
|
|
1681
1590
|
});
|
|
1682
1591
|
}
|
|
1683
|
-
const
|
|
1592
|
+
const h = i.filter((p) => !c.has(p) && !Se("script", p));
|
|
1684
1593
|
return {
|
|
1685
|
-
cssAssets:
|
|
1686
|
-
jsAssetsWithoutEntry:
|
|
1687
|
-
entryAssets:
|
|
1594
|
+
cssAssets: s.filter((p) => !l.has(p) && !Se("link", p)),
|
|
1595
|
+
jsAssetsWithoutEntry: h,
|
|
1596
|
+
entryAssets: a.filter((p) => !Se("script", p.url))
|
|
1688
1597
|
};
|
|
1689
1598
|
}
|
|
1690
|
-
const
|
|
1599
|
+
const fn = function() {
|
|
1691
1600
|
return {
|
|
1692
1601
|
name: "generate-preload-assets-plugin",
|
|
1693
|
-
async generatePreloadAssets(
|
|
1694
|
-
const { origin: t, preloadOptions:
|
|
1695
|
-
return
|
|
1602
|
+
async generatePreloadAssets(e) {
|
|
1603
|
+
const { origin: t, preloadOptions: r, remoteInfo: n, remote: o, globalSnapshot: s, remoteSnapshot: i } = e;
|
|
1604
|
+
return F() ? Oe(o) && ot(o) ? {
|
|
1696
1605
|
cssAssets: [],
|
|
1697
1606
|
jsAssetsWithoutEntry: [],
|
|
1698
|
-
entryAssets: [
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
shareScope: ""
|
|
1708
|
-
}
|
|
1607
|
+
entryAssets: [{
|
|
1608
|
+
name: o.name,
|
|
1609
|
+
url: o.entry,
|
|
1610
|
+
moduleInfo: {
|
|
1611
|
+
name: n.name,
|
|
1612
|
+
entry: o.entry,
|
|
1613
|
+
type: n.type || "global",
|
|
1614
|
+
entryGlobalName: "",
|
|
1615
|
+
shareScope: ""
|
|
1709
1616
|
}
|
|
1710
|
-
]
|
|
1711
|
-
} : (
|
|
1617
|
+
}]
|
|
1618
|
+
} : (vt(n, i), un(t, r, n, s, i)) : {
|
|
1712
1619
|
cssAssets: [],
|
|
1713
1620
|
jsAssetsWithoutEntry: [],
|
|
1714
1621
|
entryAssets: []
|
|
@@ -1716,829 +1623,794 @@ const generatePreloadAssetsPlugin = function() {
|
|
|
1716
1623
|
}
|
|
1717
1624
|
};
|
|
1718
1625
|
};
|
|
1719
|
-
function
|
|
1720
|
-
const
|
|
1626
|
+
function kt(e, t) {
|
|
1627
|
+
const r = ue({
|
|
1721
1628
|
name: t.name,
|
|
1722
1629
|
version: t.options.version
|
|
1723
|
-
}),
|
|
1724
|
-
return
|
|
1725
|
-
hostGlobalSnapshot:
|
|
1726
|
-
globalSnapshot:
|
|
1727
|
-
remoteSnapshot:
|
|
1728
|
-
name:
|
|
1729
|
-
version:
|
|
1630
|
+
}), n = r && "remotesInfo" in r && r.remotesInfo && q(r.remotesInfo, e.name).value;
|
|
1631
|
+
return n && n.matchedVersion ? {
|
|
1632
|
+
hostGlobalSnapshot: r,
|
|
1633
|
+
globalSnapshot: He(),
|
|
1634
|
+
remoteSnapshot: ue({
|
|
1635
|
+
name: e.name,
|
|
1636
|
+
version: n.matchedVersion
|
|
1730
1637
|
})
|
|
1731
1638
|
} : {
|
|
1732
1639
|
hostGlobalSnapshot: void 0,
|
|
1733
|
-
globalSnapshot:
|
|
1734
|
-
remoteSnapshot:
|
|
1735
|
-
name:
|
|
1736
|
-
version: "version" in
|
|
1640
|
+
globalSnapshot: He(),
|
|
1641
|
+
remoteSnapshot: ue({
|
|
1642
|
+
name: e.name,
|
|
1643
|
+
version: "version" in e ? e.version : void 0
|
|
1737
1644
|
})
|
|
1738
1645
|
};
|
|
1739
1646
|
}
|
|
1740
|
-
class
|
|
1741
|
-
constructor(
|
|
1742
|
-
this.loadingHostSnapshot = null, this.manifestCache = /* @__PURE__ */ new Map(), this.hooks = new
|
|
1743
|
-
beforeLoadRemoteSnapshot: new
|
|
1744
|
-
loadSnapshot: new
|
|
1745
|
-
loadRemoteSnapshot: new
|
|
1746
|
-
afterLoadSnapshot: new
|
|
1747
|
-
}), this.manifestLoading =
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
const { options: s } = this.HostInstance;
|
|
1647
|
+
var hn = class {
|
|
1648
|
+
constructor(e) {
|
|
1649
|
+
this.loadingHostSnapshot = null, this.manifestCache = /* @__PURE__ */ new Map(), this.hooks = new K({
|
|
1650
|
+
beforeLoadRemoteSnapshot: new v("beforeLoadRemoteSnapshot"),
|
|
1651
|
+
loadSnapshot: new H("loadGlobalSnapshot"),
|
|
1652
|
+
loadRemoteSnapshot: new H("loadRemoteSnapshot"),
|
|
1653
|
+
afterLoadSnapshot: new H("afterLoadSnapshot")
|
|
1654
|
+
}), this.manifestLoading = Q.__FEDERATION__.__MANIFEST_LOADING__, this.HostInstance = e, this.loaderHook = e.loaderHook;
|
|
1655
|
+
}
|
|
1656
|
+
async loadRemoteSnapshotInfo({ moduleInfo: e, id: t, expose: r }) {
|
|
1657
|
+
const { options: n } = this.HostInstance;
|
|
1752
1658
|
await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({
|
|
1753
|
-
options:
|
|
1754
|
-
moduleInfo:
|
|
1659
|
+
options: n,
|
|
1660
|
+
moduleInfo: e
|
|
1755
1661
|
});
|
|
1756
|
-
let
|
|
1662
|
+
let o = ue({
|
|
1757
1663
|
name: this.HostInstance.options.name,
|
|
1758
1664
|
version: this.HostInstance.options.version
|
|
1759
1665
|
});
|
|
1760
|
-
|
|
1666
|
+
o || (o = {
|
|
1761
1667
|
version: this.HostInstance.options.version || "",
|
|
1762
1668
|
remoteEntry: "",
|
|
1763
1669
|
remotesInfo: {}
|
|
1764
|
-
},
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
...i == null ? void 0 : i.remotesInfo,
|
|
1768
|
-
[t.name]: {
|
|
1769
|
-
matchedVersion: "version" in t ? t.version : t.entry
|
|
1770
|
-
}
|
|
1670
|
+
}, fr({ [this.HostInstance.options.name]: o })), o && "remotesInfo" in o && !q(o.remotesInfo, e.name).value && ("version" in e || "entry" in e) && (o.remotesInfo = {
|
|
1671
|
+
...o == null ? void 0 : o.remotesInfo,
|
|
1672
|
+
[e.name]: { matchedVersion: "version" in e ? e.version : e.entry }
|
|
1771
1673
|
});
|
|
1772
|
-
const { hostGlobalSnapshot:
|
|
1773
|
-
options:
|
|
1774
|
-
moduleInfo:
|
|
1775
|
-
hostGlobalSnapshot:
|
|
1776
|
-
remoteSnapshot:
|
|
1777
|
-
globalSnapshot:
|
|
1674
|
+
const { hostGlobalSnapshot: s, remoteSnapshot: i, globalSnapshot: a } = this.getGlobalRemoteInfo(e), { remoteSnapshot: c, globalSnapshot: l } = await this.hooks.lifecycle.loadSnapshot.emit({
|
|
1675
|
+
options: n,
|
|
1676
|
+
moduleInfo: e,
|
|
1677
|
+
hostGlobalSnapshot: s,
|
|
1678
|
+
remoteSnapshot: i,
|
|
1679
|
+
globalSnapshot: a
|
|
1778
1680
|
});
|
|
1779
|
-
let
|
|
1780
|
-
if (
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
y = g, p = b;
|
|
1789
|
-
} else {
|
|
1790
|
-
const { remoteSnapshot: m } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
|
|
1791
|
-
options: this.HostInstance.options,
|
|
1792
|
-
moduleInfo: t,
|
|
1793
|
-
remoteSnapshot: l,
|
|
1794
|
-
from: "global"
|
|
1795
|
-
});
|
|
1796
|
-
y = m, p = d;
|
|
1797
|
-
}
|
|
1798
|
-
else if (isRemoteInfoWithEntry(t)) {
|
|
1799
|
-
const m = await this.getManifestJson(t.entry, t, {}), g = setGlobalSnapshotInfoByModuleInfo(t, m), { remoteSnapshot: b } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
|
|
1681
|
+
let f, d;
|
|
1682
|
+
if (c) if (Ye(c)) {
|
|
1683
|
+
const u = F() ? c.remoteEntry : c.ssrRemoteEntry || c.remoteEntry || "", h = await this.getManifestJson(u, e, {}), p = Ge({
|
|
1684
|
+
...e,
|
|
1685
|
+
entry: u
|
|
1686
|
+
}, h);
|
|
1687
|
+
f = h, d = p;
|
|
1688
|
+
} else {
|
|
1689
|
+
const { remoteSnapshot: u } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
|
|
1800
1690
|
options: this.HostInstance.options,
|
|
1801
|
-
moduleInfo:
|
|
1802
|
-
remoteSnapshot:
|
|
1691
|
+
moduleInfo: e,
|
|
1692
|
+
remoteSnapshot: c,
|
|
1803
1693
|
from: "global"
|
|
1804
1694
|
});
|
|
1805
|
-
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1695
|
+
f = u, d = l;
|
|
1696
|
+
}
|
|
1697
|
+
else if (Oe(e)) {
|
|
1698
|
+
const u = await this.getManifestJson(e.entry, e, {}), h = Ge(e, u), { remoteSnapshot: p } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
|
|
1699
|
+
options: this.HostInstance.options,
|
|
1700
|
+
moduleInfo: e,
|
|
1701
|
+
remoteSnapshot: u,
|
|
1702
|
+
from: "global"
|
|
1703
|
+
});
|
|
1704
|
+
f = p, d = h;
|
|
1705
|
+
} else k(D(Rt, L, {
|
|
1706
|
+
hostName: e.name,
|
|
1707
|
+
hostVersion: e.version,
|
|
1708
|
+
globalSnapshot: JSON.stringify(l)
|
|
1709
|
+
}));
|
|
1812
1710
|
return await this.hooks.lifecycle.afterLoadSnapshot.emit({
|
|
1813
|
-
id:
|
|
1711
|
+
id: t,
|
|
1814
1712
|
host: this.HostInstance,
|
|
1815
|
-
options:
|
|
1816
|
-
moduleInfo:
|
|
1817
|
-
remoteSnapshot:
|
|
1713
|
+
options: n,
|
|
1714
|
+
moduleInfo: e,
|
|
1715
|
+
remoteSnapshot: f
|
|
1818
1716
|
}), {
|
|
1819
|
-
remoteSnapshot:
|
|
1820
|
-
globalSnapshot:
|
|
1717
|
+
remoteSnapshot: f,
|
|
1718
|
+
globalSnapshot: d
|
|
1821
1719
|
};
|
|
1822
1720
|
}
|
|
1823
|
-
getGlobalRemoteInfo(
|
|
1824
|
-
return
|
|
1721
|
+
getGlobalRemoteInfo(e) {
|
|
1722
|
+
return kt(e, this.HostInstance);
|
|
1825
1723
|
}
|
|
1826
|
-
async getManifestJson(
|
|
1827
|
-
const
|
|
1828
|
-
let
|
|
1829
|
-
if (
|
|
1830
|
-
return a;
|
|
1724
|
+
async getManifestJson(e, t, r) {
|
|
1725
|
+
const n = async () => {
|
|
1726
|
+
let s = this.manifestCache.get(e);
|
|
1727
|
+
if (s) return s;
|
|
1831
1728
|
try {
|
|
1832
|
-
let
|
|
1833
|
-
(!
|
|
1834
|
-
} catch (
|
|
1835
|
-
|
|
1836
|
-
id:
|
|
1837
|
-
error:
|
|
1729
|
+
let i = await this.loaderHook.lifecycle.fetch.emit(e, {});
|
|
1730
|
+
(!i || !(i instanceof Response)) && (i = await fetch(e, {})), s = await i.json();
|
|
1731
|
+
} catch (i) {
|
|
1732
|
+
s = await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
|
|
1733
|
+
id: e,
|
|
1734
|
+
error: i,
|
|
1838
1735
|
from: "runtime",
|
|
1839
1736
|
lifecycle: "afterResolve",
|
|
1840
1737
|
origin: this.HostInstance
|
|
1841
|
-
}),
|
|
1842
|
-
manifestUrl:
|
|
1843
|
-
moduleName:
|
|
1738
|
+
}), s || (delete this.manifestLoading[e], k(D(gt, L, {
|
|
1739
|
+
manifestUrl: e,
|
|
1740
|
+
moduleName: t.name,
|
|
1844
1741
|
hostName: this.HostInstance.options.name
|
|
1845
|
-
}, `${
|
|
1742
|
+
}, `${i}`)));
|
|
1846
1743
|
}
|
|
1847
|
-
return
|
|
1848
|
-
},
|
|
1849
|
-
const
|
|
1850
|
-
version: t
|
|
1851
|
-
}), { remoteSnapshot: u } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
|
|
1744
|
+
return T(s.metaData && s.exposes && s.shared, `${e} is not a federation manifest`), this.manifestCache.set(e, s), s;
|
|
1745
|
+
}, o = async () => {
|
|
1746
|
+
const s = await n(), i = Xt(s, { version: e }), { remoteSnapshot: a } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
|
|
1852
1747
|
options: this.HostInstance.options,
|
|
1853
|
-
moduleInfo:
|
|
1854
|
-
manifestJson:
|
|
1855
|
-
remoteSnapshot:
|
|
1856
|
-
manifestUrl:
|
|
1748
|
+
moduleInfo: t,
|
|
1749
|
+
manifestJson: s,
|
|
1750
|
+
remoteSnapshot: i,
|
|
1751
|
+
manifestUrl: e,
|
|
1857
1752
|
from: "manifest"
|
|
1858
1753
|
});
|
|
1859
|
-
return
|
|
1754
|
+
return a;
|
|
1860
1755
|
};
|
|
1861
|
-
return this.manifestLoading[
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
return Object.keys(o).forEach((a) => {
|
|
1881
|
-
o[a].forEach((u) => {
|
|
1882
|
-
u.scope.forEach((l) => {
|
|
1883
|
-
var y;
|
|
1756
|
+
return this.manifestLoading[e] || (this.manifestLoading[e] = o().then((s) => s)), this.manifestLoading[e];
|
|
1757
|
+
}
|
|
1758
|
+
}, dn = class {
|
|
1759
|
+
constructor(e) {
|
|
1760
|
+
this.hooks = new K({
|
|
1761
|
+
beforeRegisterShare: new j("beforeRegisterShare"),
|
|
1762
|
+
afterResolve: new H("afterResolve"),
|
|
1763
|
+
beforeLoadShare: new H("beforeLoadShare"),
|
|
1764
|
+
loadShare: new v(),
|
|
1765
|
+
resolveShare: new j("resolveShare"),
|
|
1766
|
+
initContainerShareScopeMap: new j("initContainerShareScopeMap")
|
|
1767
|
+
}), this.host = e, this.shareScopeMap = {}, this.initTokens = {}, this._setGlobalShareScopeMap(e.options);
|
|
1768
|
+
}
|
|
1769
|
+
registerShared(e, t) {
|
|
1770
|
+
const { newShareInfos: r, allShareInfos: n } = pt(e, t);
|
|
1771
|
+
return Object.keys(r).forEach((o) => {
|
|
1772
|
+
r[o].forEach((s) => {
|
|
1773
|
+
s.scope.forEach((i) => {
|
|
1774
|
+
var a;
|
|
1884
1775
|
this.hooks.lifecycle.beforeRegisterShare.emit({
|
|
1885
1776
|
origin: this.host,
|
|
1886
|
-
pkgName:
|
|
1887
|
-
shared:
|
|
1888
|
-
}), (
|
|
1889
|
-
pkgName:
|
|
1890
|
-
lib:
|
|
1891
|
-
get:
|
|
1892
|
-
loaded:
|
|
1893
|
-
shared:
|
|
1894
|
-
from:
|
|
1777
|
+
pkgName: o,
|
|
1778
|
+
shared: s
|
|
1779
|
+
}), (a = this.shareScopeMap[i]) != null && a[o] || this.setShared({
|
|
1780
|
+
pkgName: o,
|
|
1781
|
+
lib: s.lib,
|
|
1782
|
+
get: s.get,
|
|
1783
|
+
loaded: s.loaded || !!s.lib,
|
|
1784
|
+
shared: s,
|
|
1785
|
+
from: t.name
|
|
1895
1786
|
});
|
|
1896
1787
|
});
|
|
1897
1788
|
});
|
|
1898
1789
|
}), {
|
|
1899
|
-
newShareInfos:
|
|
1900
|
-
allShareInfos:
|
|
1790
|
+
newShareInfos: r,
|
|
1791
|
+
allShareInfos: n
|
|
1901
1792
|
};
|
|
1902
1793
|
}
|
|
1903
|
-
async loadShare(
|
|
1904
|
-
const { host:
|
|
1905
|
-
pkgName:
|
|
1906
|
-
extraOptions:
|
|
1907
|
-
shareInfos:
|
|
1794
|
+
async loadShare(e, t) {
|
|
1795
|
+
const { host: r } = this, n = je({
|
|
1796
|
+
pkgName: e,
|
|
1797
|
+
extraOptions: t,
|
|
1798
|
+
shareInfos: r.options.shared
|
|
1908
1799
|
});
|
|
1909
|
-
|
|
1910
|
-
await Promise.all(this.initializeSharing(
|
|
1911
|
-
strategy: s.strategy
|
|
1912
|
-
}));
|
|
1800
|
+
n != null && n.scope && await Promise.all(n.scope.map(async (a) => {
|
|
1801
|
+
await Promise.all(this.initializeSharing(a, { strategy: n.strategy }));
|
|
1913
1802
|
}));
|
|
1914
|
-
const
|
|
1915
|
-
pkgName:
|
|
1916
|
-
shareInfo:
|
|
1917
|
-
shared:
|
|
1918
|
-
origin:
|
|
1919
|
-
})
|
|
1920
|
-
|
|
1921
|
-
const { shared:
|
|
1922
|
-
if (
|
|
1923
|
-
const
|
|
1924
|
-
if (
|
|
1925
|
-
return
|
|
1926
|
-
if (
|
|
1927
|
-
const
|
|
1928
|
-
return
|
|
1803
|
+
const { shareInfo: o } = await this.hooks.lifecycle.beforeLoadShare.emit({
|
|
1804
|
+
pkgName: e,
|
|
1805
|
+
shareInfo: n,
|
|
1806
|
+
shared: r.options.shared,
|
|
1807
|
+
origin: r
|
|
1808
|
+
});
|
|
1809
|
+
T(o, `Cannot find ${e} Share in the ${r.options.name}. Please ensure that the ${e} Share parameters have been injected`);
|
|
1810
|
+
const { shared: s, useTreesShaking: i } = de(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
|
|
1811
|
+
if (s) {
|
|
1812
|
+
const a = ie(s, i);
|
|
1813
|
+
if (a.lib)
|
|
1814
|
+
return x(a, r.options.name), a.lib;
|
|
1815
|
+
if (a.loading && !a.loaded) {
|
|
1816
|
+
const c = await a.loading;
|
|
1817
|
+
return a.loaded = !0, a.lib || (a.lib = c), x(a, r.options.name), c;
|
|
1929
1818
|
} else {
|
|
1930
|
-
const
|
|
1931
|
-
const
|
|
1932
|
-
return
|
|
1819
|
+
const l = (async () => {
|
|
1820
|
+
const f = await a.get();
|
|
1821
|
+
return x(a, r.options.name), a.loaded = !0, a.lib = f, f;
|
|
1933
1822
|
})();
|
|
1934
1823
|
return this.setShared({
|
|
1935
|
-
pkgName:
|
|
1824
|
+
pkgName: e,
|
|
1936
1825
|
loaded: !1,
|
|
1937
|
-
shared:
|
|
1938
|
-
from:
|
|
1826
|
+
shared: s,
|
|
1827
|
+
from: r.options.name,
|
|
1939
1828
|
lib: null,
|
|
1940
|
-
loading:
|
|
1941
|
-
treeShaking:
|
|
1942
|
-
}),
|
|
1829
|
+
loading: l,
|
|
1830
|
+
treeShaking: i ? a : void 0
|
|
1831
|
+
}), l;
|
|
1943
1832
|
}
|
|
1944
1833
|
} else {
|
|
1945
|
-
if (
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
E.lib = m, E.loaded = !0, g.from = a.from;
|
|
1834
|
+
if (t != null && t.customShareInfo) return !1;
|
|
1835
|
+
const a = ee(o.treeShaking), c = ie(o, a), f = (async () => {
|
|
1836
|
+
const d = await c.get();
|
|
1837
|
+
c.lib = d, c.loaded = !0, x(c, r.options.name);
|
|
1838
|
+
const { shared: u, useTreesShaking: h } = de(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
|
|
1839
|
+
if (u) {
|
|
1840
|
+
const p = ie(u, h);
|
|
1841
|
+
p.lib = d, p.loaded = !0, u.from = o.from;
|
|
1954
1842
|
}
|
|
1955
|
-
return
|
|
1843
|
+
return d;
|
|
1956
1844
|
})();
|
|
1957
1845
|
return this.setShared({
|
|
1958
|
-
pkgName:
|
|
1846
|
+
pkgName: e,
|
|
1959
1847
|
loaded: !1,
|
|
1960
|
-
shared:
|
|
1961
|
-
from:
|
|
1848
|
+
shared: o,
|
|
1849
|
+
from: r.options.name,
|
|
1962
1850
|
lib: null,
|
|
1963
|
-
loading:
|
|
1964
|
-
treeShaking:
|
|
1965
|
-
}),
|
|
1851
|
+
loading: f,
|
|
1852
|
+
treeShaking: a ? c : void 0
|
|
1853
|
+
}), f;
|
|
1966
1854
|
}
|
|
1967
1855
|
}
|
|
1968
1856
|
/**
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
return c;
|
|
1984
|
-
a.push(g);
|
|
1857
|
+
* This function initializes the sharing sequence (executed only once per share scope).
|
|
1858
|
+
* It accepts one argument, the name of the share scope.
|
|
1859
|
+
* If the share scope does not exist, it creates one.
|
|
1860
|
+
*/
|
|
1861
|
+
initializeSharing(e = re, t) {
|
|
1862
|
+
const { host: r } = this, n = t == null ? void 0 : t.from, o = t == null ? void 0 : t.strategy;
|
|
1863
|
+
let s = t == null ? void 0 : t.initScope;
|
|
1864
|
+
const i = [];
|
|
1865
|
+
if (n !== "build") {
|
|
1866
|
+
const { initTokens: u } = this;
|
|
1867
|
+
s || (s = []);
|
|
1868
|
+
let h = u[e];
|
|
1869
|
+
if (h || (h = u[e] = { from: this.host.name }), s.indexOf(h) >= 0) return i;
|
|
1870
|
+
s.push(h);
|
|
1985
1871
|
}
|
|
1986
|
-
const
|
|
1987
|
-
|
|
1988
|
-
const
|
|
1989
|
-
var
|
|
1990
|
-
const { version:
|
|
1991
|
-
|
|
1992
|
-
const
|
|
1993
|
-
(!
|
|
1994
|
-
},
|
|
1995
|
-
const { module:
|
|
1996
|
-
|
|
1997
|
-
});
|
|
1998
|
-
let b;
|
|
1872
|
+
const a = this.shareScopeMap, c = r.options.name;
|
|
1873
|
+
a[e] || (a[e] = {});
|
|
1874
|
+
const l = a[e], f = (u, h) => {
|
|
1875
|
+
var b;
|
|
1876
|
+
const { version: p, eager: y } = h;
|
|
1877
|
+
l[u] = l[u] || {};
|
|
1878
|
+
const E = l[u], m = E[p] && ie(E[p]), g = !!(m && ("eager" in m && m.eager || "shareConfig" in m && ((b = m.shareConfig) != null && b.eager)));
|
|
1879
|
+
(!m || m.strategy !== "loaded-first" && !m.loaded && (!y != !g ? y : c > E[p].from)) && (E[p] = h);
|
|
1880
|
+
}, d = async (u) => {
|
|
1881
|
+
const { module: h } = await r.remoteHandler.getRemoteModuleAndOptions({ id: u });
|
|
1882
|
+
let p;
|
|
1999
1883
|
try {
|
|
2000
|
-
|
|
2001
|
-
} catch (
|
|
2002
|
-
|
|
2003
|
-
id:
|
|
2004
|
-
error:
|
|
1884
|
+
p = await h.getEntry();
|
|
1885
|
+
} catch (y) {
|
|
1886
|
+
p = await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
|
|
1887
|
+
id: u,
|
|
1888
|
+
error: y,
|
|
2005
1889
|
from: "runtime",
|
|
2006
1890
|
lifecycle: "beforeLoadShare",
|
|
2007
|
-
origin:
|
|
1891
|
+
origin: r
|
|
2008
1892
|
});
|
|
2009
1893
|
} finally {
|
|
2010
|
-
|
|
1894
|
+
p != null && p.init && !h.initing && (h.remoteEntryExports = p, await h.init(void 0, void 0, s));
|
|
2011
1895
|
}
|
|
2012
1896
|
};
|
|
2013
|
-
return Object.keys(
|
|
2014
|
-
|
|
2015
|
-
|
|
1897
|
+
return Object.keys(r.options.shared).forEach((u) => {
|
|
1898
|
+
r.options.shared[u].forEach((h) => {
|
|
1899
|
+
h.scope.includes(e) && f(u, h);
|
|
2016
1900
|
});
|
|
2017
|
-
}), (
|
|
2018
|
-
|
|
2019
|
-
}),
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
const { host: o } = this, s = getTargetSharedOptions({
|
|
2027
|
-
pkgName: t,
|
|
2028
|
-
extraOptions: n,
|
|
2029
|
-
shareInfos: o.options.shared
|
|
1901
|
+
}), (r.options.shareStrategy === "version-first" || o === "version-first") && r.options.remotes.forEach((u) => {
|
|
1902
|
+
u.shareScope === e && i.push(d(u.name));
|
|
1903
|
+
}), i;
|
|
1904
|
+
}
|
|
1905
|
+
loadShareSync(e, t) {
|
|
1906
|
+
const { host: r } = this, n = je({
|
|
1907
|
+
pkgName: e,
|
|
1908
|
+
extraOptions: t,
|
|
1909
|
+
shareInfos: r.options.shared
|
|
2030
1910
|
});
|
|
2031
|
-
|
|
2032
|
-
this.initializeSharing(
|
|
1911
|
+
n != null && n.scope && n.scope.forEach((i) => {
|
|
1912
|
+
this.initializeSharing(i, { strategy: n.strategy });
|
|
2033
1913
|
});
|
|
2034
|
-
const { shared:
|
|
2035
|
-
if (
|
|
2036
|
-
if (typeof
|
|
2037
|
-
return
|
|
2038
|
-
if (typeof
|
|
2039
|
-
const
|
|
2040
|
-
if (!(
|
|
2041
|
-
return
|
|
2042
|
-
pkgName:
|
|
1914
|
+
const { shared: o, useTreesShaking: s } = de(this.shareScopeMap, e, n, this.hooks.lifecycle.resolveShare) || {};
|
|
1915
|
+
if (o) {
|
|
1916
|
+
if (typeof o.lib == "function")
|
|
1917
|
+
return x(o, r.options.name), o.loaded || (o.loaded = !0, o.from === r.options.name && (n.loaded = !0)), o.lib;
|
|
1918
|
+
if (typeof o.get == "function") {
|
|
1919
|
+
const i = o.get();
|
|
1920
|
+
if (!(i instanceof Promise))
|
|
1921
|
+
return x(o, r.options.name), this.setShared({
|
|
1922
|
+
pkgName: e,
|
|
2043
1923
|
loaded: !0,
|
|
2044
|
-
from:
|
|
2045
|
-
lib:
|
|
2046
|
-
shared:
|
|
2047
|
-
}),
|
|
1924
|
+
from: r.options.name,
|
|
1925
|
+
lib: i,
|
|
1926
|
+
shared: o
|
|
1927
|
+
}), i;
|
|
2048
1928
|
}
|
|
2049
1929
|
}
|
|
2050
|
-
if (
|
|
2051
|
-
return
|
|
2052
|
-
if (
|
|
2053
|
-
const
|
|
2054
|
-
if (
|
|
2055
|
-
const
|
|
2056
|
-
throw new Error(
|
|
2057
|
-
hostName:
|
|
2058
|
-
sharedPkgName:
|
|
1930
|
+
if (n.lib)
|
|
1931
|
+
return n.loaded || (n.loaded = !0), n.lib;
|
|
1932
|
+
if (n.get) {
|
|
1933
|
+
const i = n.get();
|
|
1934
|
+
if (i instanceof Promise) {
|
|
1935
|
+
const a = (t == null ? void 0 : t.from) === "build" ? bt : Ae;
|
|
1936
|
+
throw new Error(D(a, L, {
|
|
1937
|
+
hostName: r.options.name,
|
|
1938
|
+
sharedPkgName: e
|
|
2059
1939
|
}));
|
|
2060
1940
|
}
|
|
2061
|
-
return
|
|
2062
|
-
pkgName:
|
|
1941
|
+
return n.lib = i, this.setShared({
|
|
1942
|
+
pkgName: e,
|
|
2063
1943
|
loaded: !0,
|
|
2064
|
-
from:
|
|
2065
|
-
lib:
|
|
2066
|
-
shared:
|
|
2067
|
-
}),
|
|
1944
|
+
from: r.options.name,
|
|
1945
|
+
lib: n.lib,
|
|
1946
|
+
shared: n
|
|
1947
|
+
}), n.lib;
|
|
2068
1948
|
}
|
|
2069
|
-
throw new Error(
|
|
2070
|
-
hostName:
|
|
2071
|
-
sharedPkgName:
|
|
1949
|
+
throw new Error(D(Ae, L, {
|
|
1950
|
+
hostName: r.options.name,
|
|
1951
|
+
sharedPkgName: e
|
|
2072
1952
|
}));
|
|
2073
1953
|
}
|
|
2074
|
-
initShareScopeMap(
|
|
2075
|
-
const { host:
|
|
2076
|
-
this.shareScopeMap[
|
|
2077
|
-
shareScope:
|
|
2078
|
-
options:
|
|
2079
|
-
origin:
|
|
2080
|
-
scopeName:
|
|
2081
|
-
hostShareScopeMap:
|
|
1954
|
+
initShareScopeMap(e, t, r = {}) {
|
|
1955
|
+
const { host: n } = this;
|
|
1956
|
+
this.shareScopeMap[e] = t, this.hooks.lifecycle.initContainerShareScopeMap.emit({
|
|
1957
|
+
shareScope: t,
|
|
1958
|
+
options: n.options,
|
|
1959
|
+
origin: n,
|
|
1960
|
+
scopeName: e,
|
|
1961
|
+
hostShareScopeMap: r.hostShareScopeMap
|
|
2082
1962
|
});
|
|
2083
1963
|
}
|
|
2084
|
-
setShared({ pkgName:
|
|
2085
|
-
const { version:
|
|
2086
|
-
const
|
|
2087
|
-
|
|
2088
|
-
},
|
|
2089
|
-
|
|
1964
|
+
setShared({ pkgName: e, shared: t, from: r, lib: n, loading: o, loaded: s, get: i, treeShaking: a }) {
|
|
1965
|
+
const { version: c, scope: l = "default", ...f } = t, d = Array.isArray(l) ? l : [l], u = (h) => {
|
|
1966
|
+
const p = (E, m, g) => {
|
|
1967
|
+
g && !E[m] && (E[m] = g);
|
|
1968
|
+
}, y = a ? h.treeShaking : h;
|
|
1969
|
+
p(y, "loaded", s), p(y, "loading", o), p(y, "get", i);
|
|
2090
1970
|
};
|
|
2091
|
-
|
|
2092
|
-
this.shareScopeMap[
|
|
2093
|
-
version:
|
|
2094
|
-
scope: [
|
|
2095
|
-
...
|
|
2096
|
-
lib:
|
|
1971
|
+
d.forEach((h) => {
|
|
1972
|
+
this.shareScopeMap[h] || (this.shareScopeMap[h] = {}), this.shareScopeMap[h][e] || (this.shareScopeMap[h][e] = {}), this.shareScopeMap[h][e][c] || (this.shareScopeMap[h][e][c] = {
|
|
1973
|
+
version: c,
|
|
1974
|
+
scope: [h],
|
|
1975
|
+
...f,
|
|
1976
|
+
lib: n
|
|
2097
1977
|
});
|
|
2098
|
-
const
|
|
2099
|
-
|
|
1978
|
+
const p = this.shareScopeMap[h][e][c];
|
|
1979
|
+
u(p), r && p.from !== r && (p.from = r);
|
|
2100
1980
|
});
|
|
2101
1981
|
}
|
|
2102
|
-
_setGlobalShareScopeMap(
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
const
|
|
2131
|
-
this.idToRemoteMap[
|
|
1982
|
+
_setGlobalShareScopeMap(e) {
|
|
1983
|
+
const t = mt(), r = e.id || e.name;
|
|
1984
|
+
r && !t[r] && (t[r] = this.shareScopeMap);
|
|
1985
|
+
}
|
|
1986
|
+
}, pn = class {
|
|
1987
|
+
constructor(e) {
|
|
1988
|
+
this.hooks = new K({
|
|
1989
|
+
beforeRegisterRemote: new j("beforeRegisterRemote"),
|
|
1990
|
+
registerRemote: new j("registerRemote"),
|
|
1991
|
+
beforeRequest: new H("beforeRequest"),
|
|
1992
|
+
onLoad: new v("onLoad"),
|
|
1993
|
+
handlePreloadModule: new A("handlePreloadModule"),
|
|
1994
|
+
errorLoadRemote: new v("errorLoadRemote"),
|
|
1995
|
+
beforePreloadRemote: new v("beforePreloadRemote"),
|
|
1996
|
+
generatePreloadAssets: new v("generatePreloadAssets"),
|
|
1997
|
+
afterPreloadRemote: new v(),
|
|
1998
|
+
loadEntry: new v()
|
|
1999
|
+
}), this.host = e, this.idToRemoteMap = {};
|
|
2000
|
+
}
|
|
2001
|
+
formatAndRegisterRemote(e, t) {
|
|
2002
|
+
return (t.remotes || []).reduce((r, n) => (this.registerRemote(n, r, { force: !1 }), r), e.remotes);
|
|
2003
|
+
}
|
|
2004
|
+
setIdToRemoteMap(e, t) {
|
|
2005
|
+
const { remote: r, expose: n } = t, { name: o, alias: s } = r;
|
|
2006
|
+
if (this.idToRemoteMap[e] = {
|
|
2007
|
+
name: r.name,
|
|
2008
|
+
expose: n
|
|
2009
|
+
}, s && e.startsWith(o)) {
|
|
2010
|
+
const i = e.replace(o, s);
|
|
2011
|
+
this.idToRemoteMap[i] = {
|
|
2012
|
+
name: r.name,
|
|
2013
|
+
expose: n
|
|
2014
|
+
};
|
|
2132
2015
|
return;
|
|
2133
2016
|
}
|
|
2134
|
-
if (
|
|
2135
|
-
const
|
|
2136
|
-
this.idToRemoteMap[
|
|
2017
|
+
if (s && e.startsWith(s)) {
|
|
2018
|
+
const i = e.replace(s, o);
|
|
2019
|
+
this.idToRemoteMap[i] = {
|
|
2020
|
+
name: r.name,
|
|
2021
|
+
expose: n
|
|
2022
|
+
};
|
|
2137
2023
|
}
|
|
2138
2024
|
}
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
async loadRemote(t, n) {
|
|
2142
|
-
const { host: o } = this;
|
|
2025
|
+
async loadRemote(e, t) {
|
|
2026
|
+
const { host: r } = this;
|
|
2143
2027
|
try {
|
|
2144
|
-
const { loadFactory:
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
remote: l,
|
|
2155
|
-
options: a,
|
|
2156
|
-
moduleInstance: i,
|
|
2157
|
-
origin: o
|
|
2028
|
+
const { loadFactory: n = !0 } = t || { loadFactory: !0 }, { module: o, moduleOptions: s, remoteMatchInfo: i } = await this.getRemoteModuleAndOptions({ id: e }), { pkgNameOrAlias: a, remote: c, expose: l, id: f, remoteSnapshot: d } = i, u = await o.get(f, l, t, d), h = await this.hooks.lifecycle.onLoad.emit({
|
|
2029
|
+
id: f,
|
|
2030
|
+
pkgNameOrAlias: a,
|
|
2031
|
+
expose: l,
|
|
2032
|
+
exposeModule: n ? u : void 0,
|
|
2033
|
+
exposeModuleFactory: n ? void 0 : u,
|
|
2034
|
+
remote: c,
|
|
2035
|
+
options: s,
|
|
2036
|
+
moduleInstance: o,
|
|
2037
|
+
origin: r
|
|
2158
2038
|
});
|
|
2159
|
-
return this.setIdToRemoteMap(
|
|
2160
|
-
} catch (
|
|
2161
|
-
const { from:
|
|
2162
|
-
id:
|
|
2163
|
-
error:
|
|
2164
|
-
from:
|
|
2039
|
+
return this.setIdToRemoteMap(e, i), typeof h == "function" ? h : u;
|
|
2040
|
+
} catch (n) {
|
|
2041
|
+
const { from: o = "runtime" } = t || { from: "runtime" }, s = await this.hooks.lifecycle.errorLoadRemote.emit({
|
|
2042
|
+
id: e,
|
|
2043
|
+
error: n,
|
|
2044
|
+
from: o,
|
|
2165
2045
|
lifecycle: "onLoad",
|
|
2166
|
-
origin:
|
|
2046
|
+
origin: r
|
|
2167
2047
|
});
|
|
2168
|
-
if (!
|
|
2169
|
-
|
|
2170
|
-
return a;
|
|
2048
|
+
if (!s) throw n;
|
|
2049
|
+
return s;
|
|
2171
2050
|
}
|
|
2172
2051
|
}
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
const { host: n } = this;
|
|
2052
|
+
async preloadRemote(e) {
|
|
2053
|
+
const { host: t } = this;
|
|
2176
2054
|
await this.hooks.lifecycle.beforePreloadRemote.emit({
|
|
2177
|
-
preloadOps:
|
|
2178
|
-
options:
|
|
2179
|
-
origin:
|
|
2055
|
+
preloadOps: e,
|
|
2056
|
+
options: t.options,
|
|
2057
|
+
origin: t
|
|
2180
2058
|
});
|
|
2181
|
-
const
|
|
2182
|
-
await Promise.all(
|
|
2183
|
-
const { remote:
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
globalSnapshot: c,
|
|
2191
|
-
remoteSnapshot: u
|
|
2059
|
+
const r = on(t.options.remotes, e);
|
|
2060
|
+
await Promise.all(r.map(async (n) => {
|
|
2061
|
+
const { remote: o } = n, s = Pe(o), { globalSnapshot: i, remoteSnapshot: a } = await t.snapshotHandler.loadRemoteSnapshotInfo({ moduleInfo: o }), c = await this.hooks.lifecycle.generatePreloadAssets.emit({
|
|
2062
|
+
origin: t,
|
|
2063
|
+
preloadOptions: n,
|
|
2064
|
+
remote: o,
|
|
2065
|
+
remoteInfo: s,
|
|
2066
|
+
globalSnapshot: i,
|
|
2067
|
+
remoteSnapshot: a
|
|
2192
2068
|
});
|
|
2193
|
-
|
|
2069
|
+
c && Nt(s, t, c);
|
|
2194
2070
|
}));
|
|
2195
2071
|
}
|
|
2196
|
-
registerRemotes(
|
|
2197
|
-
const { host:
|
|
2198
|
-
|
|
2199
|
-
this.registerRemote(
|
|
2200
|
-
force: n == null ? void 0 : n.force
|
|
2201
|
-
});
|
|
2072
|
+
registerRemotes(e, t) {
|
|
2073
|
+
const { host: r } = this;
|
|
2074
|
+
e.forEach((n) => {
|
|
2075
|
+
this.registerRemote(n, r.options.remotes, { force: t == null ? void 0 : t.force });
|
|
2202
2076
|
});
|
|
2203
2077
|
}
|
|
2204
|
-
async getRemoteModuleAndOptions(
|
|
2205
|
-
const { host:
|
|
2206
|
-
let
|
|
2078
|
+
async getRemoteModuleAndOptions(e) {
|
|
2079
|
+
const { host: t } = this, { id: r } = e;
|
|
2080
|
+
let n;
|
|
2207
2081
|
try {
|
|
2208
|
-
|
|
2209
|
-
id:
|
|
2210
|
-
options:
|
|
2211
|
-
origin:
|
|
2082
|
+
n = await this.hooks.lifecycle.beforeRequest.emit({
|
|
2083
|
+
id: r,
|
|
2084
|
+
options: t.options,
|
|
2085
|
+
origin: t
|
|
2212
2086
|
});
|
|
2213
|
-
} catch (
|
|
2214
|
-
if (
|
|
2215
|
-
id:
|
|
2216
|
-
options:
|
|
2217
|
-
origin:
|
|
2087
|
+
} catch (h) {
|
|
2088
|
+
if (n = await this.hooks.lifecycle.errorLoadRemote.emit({
|
|
2089
|
+
id: r,
|
|
2090
|
+
options: t.options,
|
|
2091
|
+
origin: t,
|
|
2218
2092
|
from: "runtime",
|
|
2219
|
-
error:
|
|
2093
|
+
error: h,
|
|
2220
2094
|
lifecycle: "beforeRequest"
|
|
2221
|
-
}), !
|
|
2222
|
-
throw g;
|
|
2095
|
+
}), !n) throw h;
|
|
2223
2096
|
}
|
|
2224
|
-
const { id:
|
|
2225
|
-
|
|
2226
|
-
hostName:
|
|
2227
|
-
requestId:
|
|
2097
|
+
const { id: o } = n, s = qr(t.options.remotes, o);
|
|
2098
|
+
T(s, D(_t, L, {
|
|
2099
|
+
hostName: t.options.name,
|
|
2100
|
+
requestId: o
|
|
2228
2101
|
}));
|
|
2229
|
-
const { remote:
|
|
2230
|
-
id:
|
|
2231
|
-
...
|
|
2232
|
-
options:
|
|
2233
|
-
origin:
|
|
2234
|
-
remoteInfo:
|
|
2235
|
-
}), { remote:
|
|
2236
|
-
|
|
2237
|
-
let
|
|
2238
|
-
const
|
|
2239
|
-
host:
|
|
2240
|
-
remoteInfo:
|
|
2102
|
+
const { remote: i } = s, a = Pe(i), c = await t.sharedHandler.hooks.lifecycle.afterResolve.emit({
|
|
2103
|
+
id: o,
|
|
2104
|
+
...s,
|
|
2105
|
+
options: t.options,
|
|
2106
|
+
origin: t,
|
|
2107
|
+
remoteInfo: a
|
|
2108
|
+
}), { remote: l, expose: f } = c;
|
|
2109
|
+
T(l && f, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);
|
|
2110
|
+
let d = t.moduleCache.get(l.name);
|
|
2111
|
+
const u = {
|
|
2112
|
+
host: t,
|
|
2113
|
+
remoteInfo: a
|
|
2241
2114
|
};
|
|
2242
|
-
return
|
|
2243
|
-
module:
|
|
2244
|
-
moduleOptions:
|
|
2245
|
-
remoteMatchInfo:
|
|
2115
|
+
return d || (d = new Tt(u), t.moduleCache.set(l.name, d)), {
|
|
2116
|
+
module: d,
|
|
2117
|
+
moduleOptions: u,
|
|
2118
|
+
remoteMatchInfo: c
|
|
2246
2119
|
};
|
|
2247
2120
|
}
|
|
2248
|
-
registerRemote(
|
|
2249
|
-
const { host:
|
|
2250
|
-
if (
|
|
2251
|
-
const
|
|
2252
|
-
var
|
|
2253
|
-
return
|
|
2121
|
+
registerRemote(e, t, r) {
|
|
2122
|
+
const { host: n } = this, o = () => {
|
|
2123
|
+
if (e.alias) {
|
|
2124
|
+
const i = t.find((a) => {
|
|
2125
|
+
var c;
|
|
2126
|
+
return e.alias && (a.name.startsWith(e.alias) || ((c = a.alias) == null ? void 0 : c.startsWith(e.alias)));
|
|
2254
2127
|
});
|
|
2255
|
-
|
|
2128
|
+
T(!i, `The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i && i.name} name or alias`);
|
|
2256
2129
|
}
|
|
2257
|
-
"entry" in
|
|
2130
|
+
"entry" in e && F() && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope || (e.shareScope = re), e.type || (e.type = dt);
|
|
2258
2131
|
};
|
|
2259
|
-
this.hooks.lifecycle.beforeRegisterRemote.emit({
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2132
|
+
this.hooks.lifecycle.beforeRegisterRemote.emit({
|
|
2133
|
+
remote: e,
|
|
2134
|
+
origin: n
|
|
2135
|
+
});
|
|
2136
|
+
const s = t.find((i) => i.name === e.name);
|
|
2137
|
+
if (!s)
|
|
2138
|
+
o(), t.push(e), this.hooks.lifecycle.registerRemote.emit({
|
|
2139
|
+
remote: e,
|
|
2140
|
+
origin: n
|
|
2141
|
+
});
|
|
2263
2142
|
else {
|
|
2264
|
-
const
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2143
|
+
const i = [`The remote "${e.name}" is already registered.`, "Please note that overriding it may cause unexpected errors."];
|
|
2144
|
+
r != null && r.force && (this.removeRemote(s), o(), t.push(e), this.hooks.lifecycle.registerRemote.emit({
|
|
2145
|
+
remote: e,
|
|
2146
|
+
origin: n
|
|
2147
|
+
}), Je(i.join(" ")));
|
|
2269
2148
|
}
|
|
2270
2149
|
}
|
|
2271
|
-
removeRemote(
|
|
2272
|
-
var
|
|
2150
|
+
removeRemote(e) {
|
|
2151
|
+
var t;
|
|
2273
2152
|
try {
|
|
2274
|
-
const { host:
|
|
2275
|
-
|
|
2276
|
-
const
|
|
2277
|
-
if (
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2280
|
-
const
|
|
2281
|
-
|
|
2282
|
-
let
|
|
2283
|
-
const
|
|
2284
|
-
if (
|
|
2285
|
-
const
|
|
2286
|
-
|
|
2287
|
-
const
|
|
2288
|
-
let
|
|
2289
|
-
const
|
|
2290
|
-
Object.keys(
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2293
|
-
const
|
|
2294
|
-
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
])) :
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2153
|
+
const { host: r } = this, { name: n } = e, o = r.options.remotes.findIndex((i) => i.name === n);
|
|
2154
|
+
o !== -1 && r.options.remotes.splice(o, 1);
|
|
2155
|
+
const s = r.moduleCache.get(e.name);
|
|
2156
|
+
if (s) {
|
|
2157
|
+
const i = s.remoteInfo, a = i.entryGlobalName;
|
|
2158
|
+
I[a] && ((t = Object.getOwnPropertyDescriptor(I, a)) != null && t.configurable ? delete I[a] : I[a] = void 0);
|
|
2159
|
+
const c = ve(s.remoteInfo);
|
|
2160
|
+
V[c] && delete V[c], r.snapshotHandler.manifestCache.delete(i.entry);
|
|
2161
|
+
let l = i.buildVersion ? ze(i.name, i.buildVersion) : i.name;
|
|
2162
|
+
const f = I.__FEDERATION__.__INSTANCES__.findIndex((u) => i.buildVersion ? u.options.id === l : u.name === l);
|
|
2163
|
+
if (f !== -1) {
|
|
2164
|
+
const u = I.__FEDERATION__.__INSTANCES__[f];
|
|
2165
|
+
l = u.options.id || l;
|
|
2166
|
+
const h = mt();
|
|
2167
|
+
let p = !0;
|
|
2168
|
+
const y = [];
|
|
2169
|
+
Object.keys(h).forEach((E) => {
|
|
2170
|
+
const m = h[E];
|
|
2171
|
+
m && Object.keys(m).forEach((g) => {
|
|
2172
|
+
const b = m[g];
|
|
2173
|
+
b && Object.keys(b).forEach((w) => {
|
|
2174
|
+
const _ = b[w];
|
|
2175
|
+
_ && Object.keys(_).forEach((S) => {
|
|
2176
|
+
const R = _[S];
|
|
2177
|
+
R && typeof R == "object" && R.from === i.name && (R.loaded || R.loading ? (R.useIn = R.useIn.filter(($) => $ !== i.name), R.useIn.length ? p = !1 : y.push([
|
|
2178
|
+
E,
|
|
2179
|
+
g,
|
|
2180
|
+
w,
|
|
2181
|
+
S
|
|
2182
|
+
])) : y.push([
|
|
2183
|
+
E,
|
|
2184
|
+
g,
|
|
2185
|
+
w,
|
|
2186
|
+
S
|
|
2308
2187
|
]));
|
|
2309
2188
|
});
|
|
2310
2189
|
});
|
|
2311
2190
|
});
|
|
2312
|
-
}),
|
|
2313
|
-
var
|
|
2314
|
-
(
|
|
2315
|
-
}),
|
|
2191
|
+
}), p && (u.shareScopeMap = {}, delete h[l]), y.forEach(([E, m, g, b]) => {
|
|
2192
|
+
var w, _, S;
|
|
2193
|
+
(S = (_ = (w = h[E]) == null ? void 0 : w[m]) == null ? void 0 : _[g]) == null || delete S[b];
|
|
2194
|
+
}), I.__FEDERATION__.__INSTANCES__.splice(f, 1);
|
|
2316
2195
|
}
|
|
2317
|
-
const { hostGlobalSnapshot:
|
|
2318
|
-
if (
|
|
2319
|
-
const
|
|
2320
|
-
|
|
2196
|
+
const { hostGlobalSnapshot: d } = kt(e, r);
|
|
2197
|
+
if (d) {
|
|
2198
|
+
const u = d && "remotesInfo" in d && d.remotesInfo && q(d.remotesInfo, e.name).key;
|
|
2199
|
+
u && (delete d.remotesInfo[u], Q.__FEDERATION__.__MANIFEST_LOADING__[u] && delete Q.__FEDERATION__.__MANIFEST_LOADING__[u]);
|
|
2321
2200
|
}
|
|
2322
|
-
|
|
2201
|
+
r.moduleCache.delete(e.name);
|
|
2323
2202
|
}
|
|
2324
|
-
} catch (
|
|
2325
|
-
|
|
2203
|
+
} catch (r) {
|
|
2204
|
+
Te.log("removeRemote fail: ", r);
|
|
2326
2205
|
}
|
|
2327
2206
|
}
|
|
2328
|
-
}
|
|
2329
|
-
const
|
|
2330
|
-
class
|
|
2331
|
-
constructor(
|
|
2332
|
-
this.hooks = new
|
|
2333
|
-
beforeInit: new
|
|
2334
|
-
init: new
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
afterBridgeRender: new SyncHook(),
|
|
2350
|
-
beforeBridgeDestroy: new SyncHook(),
|
|
2351
|
-
afterBridgeDestroy: new SyncHook()
|
|
2207
|
+
};
|
|
2208
|
+
const mn = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN == "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : !0;
|
|
2209
|
+
var yn = class {
|
|
2210
|
+
constructor(e) {
|
|
2211
|
+
this.hooks = new K({
|
|
2212
|
+
beforeInit: new j("beforeInit"),
|
|
2213
|
+
init: new A(),
|
|
2214
|
+
beforeInitContainer: new H("beforeInitContainer"),
|
|
2215
|
+
initContainer: new H("initContainer")
|
|
2216
|
+
}), this.version = "2.1.0", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new K({
|
|
2217
|
+
getModuleInfo: new A(),
|
|
2218
|
+
createScript: new A(),
|
|
2219
|
+
createLink: new A(),
|
|
2220
|
+
fetch: new v(),
|
|
2221
|
+
loadEntryError: new v(),
|
|
2222
|
+
getModuleFactory: new v()
|
|
2223
|
+
}), this.bridgeHook = new K({
|
|
2224
|
+
beforeBridgeRender: new A(),
|
|
2225
|
+
afterBridgeRender: new A(),
|
|
2226
|
+
beforeBridgeDestroy: new A(),
|
|
2227
|
+
afterBridgeDestroy: new A()
|
|
2352
2228
|
});
|
|
2353
|
-
const
|
|
2354
|
-
id:
|
|
2355
|
-
name:
|
|
2356
|
-
plugins:
|
|
2229
|
+
const t = mn ? [cn(), fn()] : [], r = {
|
|
2230
|
+
id: rn(),
|
|
2231
|
+
name: e.name,
|
|
2232
|
+
plugins: t,
|
|
2357
2233
|
remotes: [],
|
|
2358
2234
|
shared: {},
|
|
2359
|
-
inBrowser:
|
|
2235
|
+
inBrowser: F()
|
|
2360
2236
|
};
|
|
2361
|
-
this.name =
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
return this.
|
|
2370
|
-
}
|
|
2371
|
-
|
|
2372
|
-
return this.sharedHandler.
|
|
2373
|
-
}
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
async
|
|
2391
|
-
return this.remoteHandler.
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
this.sharedHandler.initShareScopeMap(t, n, o);
|
|
2399
|
-
}
|
|
2400
|
-
formatOptions(t, n) {
|
|
2401
|
-
const { allShareInfos: o } = formatShareConfigs(t, n), { userOptions: s, options: i } = this.hooks.lifecycle.beforeInit.emit({
|
|
2237
|
+
this.name = e.name, this.options = r, this.snapshotHandler = new hn(this), this.sharedHandler = new dn(this), this.remoteHandler = new pn(this), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([...r.plugins, ...e.plugins || []]), this.options = this.formatOptions(r, e);
|
|
2238
|
+
}
|
|
2239
|
+
initOptions(e) {
|
|
2240
|
+
e.name && e.name !== this.options.name && k(D(St, L)), this.registerPlugins(e.plugins);
|
|
2241
|
+
const t = this.formatOptions(this.options, e);
|
|
2242
|
+
return this.options = t, t;
|
|
2243
|
+
}
|
|
2244
|
+
async loadShare(e, t) {
|
|
2245
|
+
return this.sharedHandler.loadShare(e, t);
|
|
2246
|
+
}
|
|
2247
|
+
loadShareSync(e, t) {
|
|
2248
|
+
return this.sharedHandler.loadShareSync(e, t);
|
|
2249
|
+
}
|
|
2250
|
+
initializeSharing(e = re, t) {
|
|
2251
|
+
return this.sharedHandler.initializeSharing(e, t);
|
|
2252
|
+
}
|
|
2253
|
+
initRawContainer(e, t, r) {
|
|
2254
|
+
const n = Pe({
|
|
2255
|
+
name: e,
|
|
2256
|
+
entry: t
|
|
2257
|
+
}), o = new Tt({
|
|
2258
|
+
host: this,
|
|
2259
|
+
remoteInfo: n
|
|
2260
|
+
});
|
|
2261
|
+
return o.remoteEntryExports = r, this.moduleCache.set(e, o), o;
|
|
2262
|
+
}
|
|
2263
|
+
async loadRemote(e, t) {
|
|
2264
|
+
return this.remoteHandler.loadRemote(e, t);
|
|
2265
|
+
}
|
|
2266
|
+
async preloadRemote(e) {
|
|
2267
|
+
return this.remoteHandler.preloadRemote(e);
|
|
2268
|
+
}
|
|
2269
|
+
initShareScopeMap(e, t, r = {}) {
|
|
2270
|
+
this.sharedHandler.initShareScopeMap(e, t, r);
|
|
2271
|
+
}
|
|
2272
|
+
formatOptions(e, t) {
|
|
2273
|
+
const { allShareInfos: r } = pt(e, t), { userOptions: n, options: o } = this.hooks.lifecycle.beforeInit.emit({
|
|
2402
2274
|
origin: this,
|
|
2403
|
-
userOptions:
|
|
2404
|
-
options:
|
|
2405
|
-
shareInfo:
|
|
2406
|
-
}),
|
|
2407
|
-
|
|
2408
|
-
|
|
2275
|
+
userOptions: t,
|
|
2276
|
+
options: e,
|
|
2277
|
+
shareInfo: r
|
|
2278
|
+
}), s = this.remoteHandler.formatAndRegisterRemote(o, n), { allShareInfos: i } = this.sharedHandler.registerShared(o, n), a = [...o.plugins];
|
|
2279
|
+
n.plugins && n.plugins.forEach((l) => {
|
|
2280
|
+
a.includes(l) || a.push(l);
|
|
2409
2281
|
});
|
|
2410
|
-
const
|
|
2282
|
+
const c = {
|
|
2283
|
+
...e,
|
|
2411
2284
|
...t,
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
shared: c
|
|
2285
|
+
plugins: a,
|
|
2286
|
+
remotes: s,
|
|
2287
|
+
shared: i
|
|
2416
2288
|
};
|
|
2417
2289
|
return this.hooks.lifecycle.init.emit({
|
|
2418
2290
|
origin: this,
|
|
2419
|
-
options:
|
|
2420
|
-
}),
|
|
2291
|
+
options: c
|
|
2292
|
+
}), c;
|
|
2421
2293
|
}
|
|
2422
|
-
registerPlugins(
|
|
2423
|
-
const
|
|
2424
|
-
this.options.plugins = this.options.plugins.reduce((
|
|
2294
|
+
registerPlugins(e) {
|
|
2295
|
+
const t = nn(e, this);
|
|
2296
|
+
this.options.plugins = this.options.plugins.reduce((r, n) => (n && r && !r.find((o) => o.name === n.name) && r.push(n), r), t || []);
|
|
2425
2297
|
}
|
|
2426
|
-
registerRemotes(
|
|
2427
|
-
return this.remoteHandler.registerRemotes(
|
|
2298
|
+
registerRemotes(e, t) {
|
|
2299
|
+
return this.remoteHandler.registerRemotes(e, t);
|
|
2428
2300
|
}
|
|
2429
|
-
registerShared(
|
|
2301
|
+
registerShared(e) {
|
|
2430
2302
|
this.sharedHandler.registerShared(this.options, {
|
|
2431
2303
|
...this.options,
|
|
2432
|
-
shared:
|
|
2304
|
+
shared: e
|
|
2433
2305
|
});
|
|
2434
2306
|
}
|
|
2435
|
-
}
|
|
2436
|
-
let
|
|
2437
|
-
function
|
|
2438
|
-
return
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
|
-
function
|
|
2442
|
-
return
|
|
2443
|
-
const
|
|
2444
|
-
...
|
|
2445
|
-
path: t +
|
|
2307
|
+
};
|
|
2308
|
+
let En = null;
|
|
2309
|
+
function Ot() {
|
|
2310
|
+
return En;
|
|
2311
|
+
}
|
|
2312
|
+
lr(yn);
|
|
2313
|
+
function Lt(e, t) {
|
|
2314
|
+
return e.map((r) => {
|
|
2315
|
+
const n = {
|
|
2316
|
+
...r,
|
|
2317
|
+
path: t + r.path
|
|
2446
2318
|
};
|
|
2447
|
-
return
|
|
2448
|
-
|
|
2319
|
+
return r.children && r.children.length > 0 && (n.children = Lt(
|
|
2320
|
+
r.children,
|
|
2449
2321
|
t
|
|
2450
|
-
)),
|
|
2322
|
+
)), n;
|
|
2451
2323
|
});
|
|
2452
2324
|
}
|
|
2453
|
-
function
|
|
2454
|
-
const { router: t, basename:
|
|
2455
|
-
(
|
|
2456
|
-
),
|
|
2457
|
-
|
|
2458
|
-
|
|
2325
|
+
function gn(e) {
|
|
2326
|
+
const { router: t, basename: r, memoryRoute: n, hashRoute: o } = e, s = t.getRoutes().sort(
|
|
2327
|
+
(u, h) => u.path.split("/").filter((p) => p).length - h.path.split("/").filter((p) => p).length
|
|
2328
|
+
), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
|
|
2329
|
+
s.forEach((u) => {
|
|
2330
|
+
i.set(u.path, u);
|
|
2459
2331
|
});
|
|
2460
|
-
const
|
|
2461
|
-
if (!
|
|
2462
|
-
return
|
|
2463
|
-
for (let
|
|
2464
|
-
const
|
|
2465
|
-
if (
|
|
2466
|
-
const
|
|
2467
|
-
...
|
|
2468
|
-
path:
|
|
2332
|
+
const c = (u, h) => `${u}/${h}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/", l = (u, h = "") => {
|
|
2333
|
+
if (!u.children || u.children.length === 0)
|
|
2334
|
+
return u;
|
|
2335
|
+
for (let p = 0; p < u.children.length; p++) {
|
|
2336
|
+
const y = u.children[p], E = c(h, y.path), m = i.get(E);
|
|
2337
|
+
if (m && !a.has(m)) {
|
|
2338
|
+
const g = {
|
|
2339
|
+
...m,
|
|
2340
|
+
path: y.path
|
|
2469
2341
|
// Keep the original relative path from static route
|
|
2470
2342
|
};
|
|
2471
|
-
|
|
2343
|
+
u.children[p] = g, a.add(m), l(g, E);
|
|
2472
2344
|
}
|
|
2473
2345
|
}
|
|
2474
|
-
return
|
|
2346
|
+
return u;
|
|
2475
2347
|
};
|
|
2476
|
-
let
|
|
2477
|
-
for (const
|
|
2478
|
-
if (!
|
|
2479
|
-
const
|
|
2480
|
-
|
|
2348
|
+
let f = [];
|
|
2349
|
+
for (const u of s)
|
|
2350
|
+
if (!a.has(u)) {
|
|
2351
|
+
const h = l(u, u.path);
|
|
2352
|
+
a.add(u), f.push(h);
|
|
2481
2353
|
}
|
|
2482
|
-
let
|
|
2483
|
-
return
|
|
2484
|
-
history:
|
|
2485
|
-
routes:
|
|
2354
|
+
let d;
|
|
2355
|
+
return n ? d = ae.createMemoryHistory(r) : o ? (d = ae.createWebHashHistory(), r && (f = Lt(f, r))) : d = ae.createWebHistory(r), {
|
|
2356
|
+
history: d,
|
|
2357
|
+
routes: f
|
|
2486
2358
|
};
|
|
2487
2359
|
}
|
|
2488
|
-
function
|
|
2489
|
-
const t = /* @__PURE__ */ new Map(),
|
|
2360
|
+
function wn(e) {
|
|
2361
|
+
const t = /* @__PURE__ */ new Map(), r = Ot();
|
|
2490
2362
|
return () => ({
|
|
2491
|
-
__APP_VERSION__: "2.0
|
|
2492
|
-
async render(
|
|
2493
|
-
var
|
|
2494
|
-
|
|
2363
|
+
__APP_VERSION__: "2.1.0",
|
|
2364
|
+
async render(n) {
|
|
2365
|
+
var p, y, E;
|
|
2366
|
+
C.debug("createBridgeComponent render Info", n);
|
|
2495
2367
|
const {
|
|
2496
|
-
moduleName:
|
|
2497
|
-
dom:
|
|
2498
|
-
basename:
|
|
2499
|
-
memoryRoute:
|
|
2500
|
-
hashRoute:
|
|
2368
|
+
moduleName: o,
|
|
2369
|
+
dom: s,
|
|
2370
|
+
basename: i,
|
|
2371
|
+
memoryRoute: a,
|
|
2372
|
+
hashRoute: c,
|
|
2501
2373
|
...l
|
|
2502
|
-
} =
|
|
2503
|
-
t.set(
|
|
2504
|
-
const
|
|
2505
|
-
app:
|
|
2506
|
-
basename:
|
|
2507
|
-
memoryRoute:
|
|
2508
|
-
hashRoute:
|
|
2374
|
+
} = n, f = Mt.createApp(e.rootComponent, l);
|
|
2375
|
+
t.set(s, f);
|
|
2376
|
+
const d = await ((E = (y = (p = r == null ? void 0 : r.bridgeHook) == null ? void 0 : p.lifecycle) == null ? void 0 : y.beforeBridgeRender) == null ? void 0 : E.emit(n)), u = d && typeof d == "object" && (d != null && d.extraProps) ? d == null ? void 0 : d.extraProps : {}, h = e.appOptions({
|
|
2377
|
+
app: f,
|
|
2378
|
+
basename: i,
|
|
2379
|
+
memoryRoute: a,
|
|
2380
|
+
hashRoute: c,
|
|
2509
2381
|
...l,
|
|
2510
|
-
...
|
|
2382
|
+
...u
|
|
2511
2383
|
});
|
|
2512
|
-
if (
|
|
2513
|
-
const { history:
|
|
2514
|
-
router:
|
|
2515
|
-
basename:
|
|
2516
|
-
memoryRoute:
|
|
2517
|
-
hashRoute:
|
|
2518
|
-
}),
|
|
2519
|
-
...
|
|
2520
|
-
history:
|
|
2521
|
-
routes:
|
|
2384
|
+
if (h != null && h.router) {
|
|
2385
|
+
const { history: m, routes: g } = gn({
|
|
2386
|
+
router: h.router,
|
|
2387
|
+
basename: n.basename,
|
|
2388
|
+
memoryRoute: n.memoryRoute,
|
|
2389
|
+
hashRoute: n.hashRoute
|
|
2390
|
+
}), b = ae.createRouter({
|
|
2391
|
+
...h.router.options,
|
|
2392
|
+
history: m,
|
|
2393
|
+
routes: g
|
|
2522
2394
|
});
|
|
2523
|
-
|
|
2524
|
-
moduleName:
|
|
2525
|
-
router:
|
|
2526
|
-
}),
|
|
2395
|
+
C.debug("createBridgeComponent render router info>>>", {
|
|
2396
|
+
moduleName: o,
|
|
2397
|
+
router: b
|
|
2398
|
+
}), a && await b.push(a.entryPath), f.use(b);
|
|
2527
2399
|
}
|
|
2528
|
-
|
|
2400
|
+
f.mount(s);
|
|
2529
2401
|
},
|
|
2530
|
-
destroy(
|
|
2531
|
-
|
|
2532
|
-
const
|
|
2533
|
-
|
|
2402
|
+
destroy(n) {
|
|
2403
|
+
C.debug("createBridgeComponent destroy Info", n);
|
|
2404
|
+
const o = t.get(n == null ? void 0 : n.dom);
|
|
2405
|
+
o == null || o.unmount();
|
|
2534
2406
|
}
|
|
2535
2407
|
});
|
|
2536
2408
|
}
|
|
2537
|
-
function
|
|
2538
|
-
const
|
|
2539
|
-
window.dispatchEvent(
|
|
2409
|
+
function _n() {
|
|
2410
|
+
const e = new PopStateEvent("popstate", { state: window.history.state });
|
|
2411
|
+
window.dispatchEvent(e);
|
|
2540
2412
|
}
|
|
2541
|
-
const
|
|
2413
|
+
const bn = /* @__PURE__ */ Ct({
|
|
2542
2414
|
name: "RemoteApp",
|
|
2543
2415
|
props: {
|
|
2544
2416
|
moduleName: String,
|
|
@@ -2549,76 +2421,76 @@ const RemoteApp = /* @__PURE__ */ defineComponent({
|
|
|
2549
2421
|
rootAttrs: Object
|
|
2550
2422
|
},
|
|
2551
2423
|
inheritAttrs: !1,
|
|
2552
|
-
setup(
|
|
2553
|
-
const t =
|
|
2554
|
-
var
|
|
2555
|
-
const l = (
|
|
2556
|
-
|
|
2557
|
-
let
|
|
2558
|
-
...
|
|
2559
|
-
moduleName:
|
|
2424
|
+
setup(e) {
|
|
2425
|
+
const t = Ee(null), r = Ee(null), n = Ee(""), o = Ke(), s = Ot(), i = Dt(), a = async () => {
|
|
2426
|
+
var u, h, p, y;
|
|
2427
|
+
const l = (u = e.providerInfo) == null ? void 0 : u.call(e);
|
|
2428
|
+
r.value = l;
|
|
2429
|
+
let f = {
|
|
2430
|
+
...i,
|
|
2431
|
+
moduleName: e.moduleName,
|
|
2560
2432
|
dom: t.value,
|
|
2561
|
-
basename:
|
|
2562
|
-
memoryRoute:
|
|
2563
|
-
hashRoute:
|
|
2433
|
+
basename: e.basename,
|
|
2434
|
+
memoryRoute: e.memoryRoute,
|
|
2435
|
+
hashRoute: e.hashRoute
|
|
2564
2436
|
};
|
|
2565
|
-
|
|
2566
|
-
const
|
|
2567
|
-
|
|
2568
|
-
...
|
|
2569
|
-
...
|
|
2570
|
-
}, l.render(
|
|
2571
|
-
},
|
|
2572
|
-
l !==
|
|
2573
|
-
...
|
|
2574
|
-
pathname:
|
|
2575
|
-
}),
|
|
2437
|
+
C.debug("createRemoteAppComponent LazyComponent render >>>", f);
|
|
2438
|
+
const d = await ((y = (p = (h = s == null ? void 0 : s.bridgeHook) == null ? void 0 : h.lifecycle) == null ? void 0 : p.beforeBridgeRender) == null ? void 0 : y.emit(f)) || {};
|
|
2439
|
+
f = {
|
|
2440
|
+
...f,
|
|
2441
|
+
...d.extraProps
|
|
2442
|
+
}, l.render(f);
|
|
2443
|
+
}, c = Ft(() => o == null ? void 0 : o.path, (l) => {
|
|
2444
|
+
l !== o.path && a(), n.value !== "" && n.value !== l && (C.debug("createRemoteAppComponent dispatchPopstateEnv >>>", {
|
|
2445
|
+
...e,
|
|
2446
|
+
pathname: o.path
|
|
2447
|
+
}), _n()), n.value = l;
|
|
2576
2448
|
});
|
|
2577
|
-
return
|
|
2578
|
-
|
|
2579
|
-
}),
|
|
2449
|
+
return Ht(() => {
|
|
2450
|
+
a();
|
|
2451
|
+
}), Gt(() => {
|
|
2580
2452
|
var l;
|
|
2581
|
-
|
|
2582
|
-
...
|
|
2583
|
-
}),
|
|
2453
|
+
C.debug("createRemoteAppComponent LazyComponent destroy >>>", {
|
|
2454
|
+
...e
|
|
2455
|
+
}), c(), (l = r.value) == null || l.destroy({
|
|
2584
2456
|
dom: t.value
|
|
2585
2457
|
});
|
|
2586
|
-
}), () =>
|
|
2458
|
+
}), () => Ut("div", xt(e.rootAttrs || {}, {
|
|
2587
2459
|
ref: t
|
|
2588
2460
|
}), null);
|
|
2589
2461
|
}
|
|
2590
2462
|
});
|
|
2591
|
-
function
|
|
2592
|
-
return
|
|
2593
|
-
__APP_VERSION__: "2.0
|
|
2594
|
-
...
|
|
2463
|
+
function Rn(e) {
|
|
2464
|
+
return Bt({
|
|
2465
|
+
__APP_VERSION__: "2.1.0",
|
|
2466
|
+
...e.asyncComponentOptions,
|
|
2595
2467
|
//@ts-ignore
|
|
2596
2468
|
loader: async () => {
|
|
2597
|
-
var
|
|
2598
|
-
const t =
|
|
2599
|
-
let
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2602
|
-
const
|
|
2603
|
-
|
|
2469
|
+
var c, l;
|
|
2470
|
+
const t = Ke();
|
|
2471
|
+
let r = "/";
|
|
2472
|
+
const n = (l = (c = t == null ? void 0 : t.matched) == null ? void 0 : c[0]) == null ? void 0 : l.path;
|
|
2473
|
+
n && (n.endsWith("/:pathMatch(.*)*") ? r = n.replace("/:pathMatch(.*)*", "") : r = t.matched[0].path);
|
|
2474
|
+
const o = (e == null ? void 0 : e.export) || "default";
|
|
2475
|
+
C.debug(
|
|
2604
2476
|
"createRemoteAppComponent LazyComponent create >>>",
|
|
2605
2477
|
{
|
|
2606
|
-
basename:
|
|
2607
|
-
info:
|
|
2478
|
+
basename: r,
|
|
2479
|
+
info: e
|
|
2608
2480
|
}
|
|
2609
2481
|
);
|
|
2610
|
-
const
|
|
2611
|
-
if (
|
|
2482
|
+
const s = await e.loader(), i = s && s[Symbol.for("mf_module_id")], a = s[o];
|
|
2483
|
+
if (C.debug(
|
|
2612
2484
|
"createRemoteAppComponent LazyComponent loadRemote info >>>",
|
|
2613
|
-
{ moduleName:
|
|
2614
|
-
),
|
|
2485
|
+
{ moduleName: i, module: s, exportName: o, basename: r, route: t }
|
|
2486
|
+
), o in s && typeof a == "function")
|
|
2615
2487
|
return {
|
|
2616
2488
|
render() {
|
|
2617
|
-
return
|
|
2618
|
-
moduleName:
|
|
2619
|
-
providerInfo:
|
|
2620
|
-
basename:
|
|
2621
|
-
rootAttrs:
|
|
2489
|
+
return Vt(bn, {
|
|
2490
|
+
moduleName: i,
|
|
2491
|
+
providerInfo: a,
|
|
2492
|
+
basename: r,
|
|
2493
|
+
rootAttrs: e.rootAttrs
|
|
2622
2494
|
});
|
|
2623
2495
|
}
|
|
2624
2496
|
};
|
|
@@ -2626,13 +2498,13 @@ function createRemoteAppComponent(r) {
|
|
|
2626
2498
|
}
|
|
2627
2499
|
});
|
|
2628
2500
|
}
|
|
2629
|
-
function
|
|
2630
|
-
return
|
|
2501
|
+
function In(e) {
|
|
2502
|
+
return C.warn(
|
|
2631
2503
|
"createRemoteAppComponent is deprecated, please use createRemoteAppComponent instead!"
|
|
2632
|
-
),
|
|
2504
|
+
), Rn(e);
|
|
2633
2505
|
}
|
|
2634
2506
|
export {
|
|
2635
|
-
createBridgeComponent,
|
|
2636
|
-
createRemoteAppComponent,
|
|
2637
|
-
createRemoteComponent
|
|
2507
|
+
wn as createBridgeComponent,
|
|
2508
|
+
Rn as createRemoteAppComponent,
|
|
2509
|
+
In as createRemoteComponent
|
|
2638
2510
|
};
|