@module-federation/bridge-vue3 2.6.0 → 2.8.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/dist/index.js CHANGED
@@ -1,47 +1,47 @@
1
- import * as jt from "vue";
2
- import { defineComponent as qt, ref as V, useAttrs as Kt, watch as zt, onMounted as Jt, onActivated as Xt, nextTick as Yt, onDeactivated as Zt, onBeforeUnmount as Qt, createVNode as er, mergeProps as tr, defineAsyncComponent as rr, h as or } from "vue";
3
- import * as ue from "vue-router";
4
- import { useRoute as Ze } from "vue-router";
5
- const nr = ".json", sr = "FEDERATION_DEBUG", ir = ":";
6
- let ve = /* @__PURE__ */ function(e) {
1
+ import * as Zt from "vue";
2
+ import { defineComponent as Xt, ref as V, useAttrs as Yt, watch as Qt, onMounted as er, onActivated as tr, nextTick as rr, onDeactivated as or, onBeforeUnmount as nr, createVNode as sr, mergeProps as ir, defineAsyncComponent as ar, h as cr } from "vue";
3
+ import * as fe from "vue-router";
4
+ import { useRoute as rt } from "vue-router";
5
+ const lr = ".json", ur = "FEDERATION_DEBUG", hr = ":";
6
+ let Ne = /* @__PURE__ */ function(e) {
7
7
  return e[e.UNKNOWN = 1] = "UNKNOWN", e[e.CALCULATED = 2] = "CALCULATED", e[e.NO_USE = 0] = "NO_USE", e;
8
8
  }({});
9
- const D = typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : typeof window < "u" && typeof window.document < "u";
10
- function Qe() {
11
- return D;
9
+ const G = typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : typeof window < "u" && typeof window.document < "u";
10
+ function ot() {
11
+ return G;
12
12
  }
13
- function et() {
13
+ function nt() {
14
14
  return typeof navigator < "u" && (navigator == null ? void 0 : navigator.product) === "ReactNative";
15
15
  }
16
- function ar() {
16
+ function fr() {
17
17
  try {
18
- if (Qe() && window.localStorage) return !!localStorage.getItem(sr);
18
+ if (ot() && window.localStorage) return !!localStorage.getItem(ur);
19
19
  } catch {
20
20
  return !1;
21
21
  }
22
22
  return !1;
23
23
  }
24
- function Te() {
25
- return typeof process < "u" && process.env && process.env.FEDERATION_DEBUG ? !!process.env.FEDERATION_DEBUG : typeof FEDERATION_DEBUG < "u" && FEDERATION_DEBUG ? !0 : ar();
24
+ function Ae() {
25
+ return typeof process < "u" && process.env && process.env.FEDERATION_DEBUG ? !!process.env.FEDERATION_DEBUG : typeof FEDERATION_DEBUG < "u" && FEDERATION_DEBUG ? !0 : fr();
26
26
  }
27
- const cr = "[ Federation Runtime ]", tt = function(...e) {
28
- return e.length ? e.reduce((t, r) => r ? t ? `${t}${ir}${r}` : r : t, "") : "";
29
- }, Ne = (e, t) => {
27
+ const dr = "[ Federation Runtime ]", st = function(...e) {
28
+ return e.length ? e.reduce((t, r) => r ? t ? `${t}${hr}${r}` : r : t, "") : "";
29
+ }, Me = (e, t) => {
30
30
  if ("getPublicPath" in e) {
31
31
  let r;
32
32
  return e.getPublicPath.startsWith("function") ? r = new Function("return " + e.getPublicPath)()() : r = new Function(e.getPublicPath)(), `${r}${t}`;
33
- } else return "publicPath" in e ? !Qe() && !et() && "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), "");
34
- }, rt = (e) => {
35
- console.warn(`${cr}: ${e}`);
33
+ } else return "publicPath" in e ? !ot() && !nt() && "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), "");
34
+ }, it = (e) => {
35
+ console.warn(`${dr}: ${e}`);
36
36
  };
37
- function ot(e) {
37
+ function at(e) {
38
38
  try {
39
39
  return JSON.stringify(e, null, 2);
40
40
  } catch {
41
41
  return "";
42
42
  }
43
43
  }
44
- const Re = (e, t) => {
44
+ const be = (e, t) => {
45
45
  if (!e) return t;
46
46
  const o = ((n) => {
47
47
  if (n === ".") return "";
@@ -54,36 +54,36 @@ const Re = (e, t) => {
54
54
  })(e);
55
55
  return o ? o.endsWith("/") ? `${o}${t}` : `${o}/${t}` : t;
56
56
  };
57
- function lr(e) {
57
+ function mr(e) {
58
58
  return e.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
59
59
  }
60
- function ur(e, t = {}) {
61
- var _;
60
+ function pr(e, t = {}) {
61
+ var R;
62
62
  const { remotes: r = {}, overrides: o = {}, version: n } = t;
63
63
  let s;
64
- const a = () => "publicPath" in e.metaData ? (e.metaData.publicPath === "auto" || e.metaData.publicPath === "") && n ? lr(n) : e.metaData.publicPath : e.metaData.getPublicPath, c = Object.keys(o);
65
- let i = {};
66
- Object.keys(r).length || (i = ((_ = e.remotes) == null ? void 0 : _.reduce((g, R) => {
67
- let b;
68
- const $ = R.federationContainerName;
69
- return c.includes($) ? b = o[$] : "version" in R ? b = R.version : b = R.entry, g[$] = { matchedVersion: b }, g;
70
- }, {})) || {}), Object.keys(r).forEach((g) => i[g] = { matchedVersion: c.includes(g) ? o[g] : r[g] });
71
- const { remoteEntry: { path: l, name: u, type: f }, types: m = {
64
+ const i = () => "publicPath" in e.metaData ? (e.metaData.publicPath === "auto" || e.metaData.publicPath === "") && n ? mr(n) : e.metaData.publicPath : e.metaData.getPublicPath, c = Object.keys(o);
65
+ let a = {};
66
+ Object.keys(r).length || (a = ((R = e.remotes) == null ? void 0 : R.reduce((g, _) => {
67
+ let S;
68
+ const I = _.federationContainerName;
69
+ return c.includes(I) ? S = o[I] : "version" in _ ? S = _.version : S = _.entry, g[I] = { matchedVersion: S }, g;
70
+ }, {})) || {}), Object.keys(r).forEach((g) => a[g] = { matchedVersion: c.includes(g) ? o[g] : r[g] });
71
+ const { remoteEntry: { path: l, name: u, type: h }, types: m = {
72
72
  path: "",
73
73
  name: "",
74
74
  zip: "",
75
75
  api: ""
76
- }, buildInfo: { buildVersion: h }, globalName: d, ssrRemoteEntry: p } = e.metaData, { exposes: E } = e;
76
+ }, buildInfo: { buildVersion: f }, globalName: d, ssrRemoteEntry: p } = e.metaData, { exposes: E } = e;
77
77
  let y = {
78
78
  version: n || "",
79
- buildVersion: h,
79
+ buildVersion: f,
80
80
  globalName: d,
81
- remoteEntry: Re(l, u),
82
- remoteEntryType: f,
83
- remoteTypes: Re(m.path, m.name),
81
+ remoteEntry: be(l, u),
82
+ remoteEntryType: h,
83
+ remoteTypes: be(m.path, m.name),
84
84
  remoteTypesZip: m.zip || "",
85
85
  remoteTypesAPI: m.api || "",
86
- remotesInfo: i,
86
+ remotesInfo: a,
87
87
  shared: e == null ? void 0 : e.shared.map((g) => ({
88
88
  assets: g.assets,
89
89
  sharedName: g.name,
@@ -98,20 +98,20 @@ function ur(e, t = {}) {
98
98
  };
99
99
  if ("publicPath" in e.metaData ? (s = {
100
100
  ...y,
101
- publicPath: a()
101
+ publicPath: i()
102
102
  }, typeof e.metaData.ssrPublicPath == "string" && (s.ssrPublicPath = e.metaData.ssrPublicPath)) : s = {
103
103
  ...y,
104
- getPublicPath: a()
104
+ getPublicPath: i()
105
105
  }, p) {
106
- const g = Re(p.path, p.name);
106
+ const g = be(p.path, p.name);
107
107
  s.ssrRemoteEntry = g, s.ssrRemoteEntryType = p.type || "commonjs-module";
108
108
  }
109
109
  return s;
110
110
  }
111
- function nt(e) {
112
- return !!("remoteEntry" in e && e.remoteEntry.includes(nr));
111
+ function ct(e) {
112
+ return !!("remoteEntry" in e && e.remoteEntry.includes(lr));
113
113
  }
114
- const fr = "[ Module Federation ]", Z = console, hr = [
114
+ const yr = "[ Module Federation ]", Q = console, Er = [
115
115
  "logger.ts",
116
116
  "logger.js",
117
117
  "captureStackTrace",
@@ -122,12 +122,12 @@ const fr = "[ Module Federation ]", Z = console, hr = [
122
122
  "Logger.error",
123
123
  "Logger.debug"
124
124
  ];
125
- function dr() {
125
+ function gr() {
126
126
  try {
127
127
  const e = (/* @__PURE__ */ new Error()).stack;
128
128
  if (!e) return;
129
129
  const [, ...t] = e.split(`
130
- `), r = t.filter((o) => !hr.some((n) => o.includes(n)));
130
+ `), r = t.filter((o) => !Er.some((n) => o.includes(n)));
131
131
  return r.length ? `Stack trace:
132
132
  ${r.slice(0, 5).join(`
133
133
  `)}` : void 0;
@@ -135,18 +135,18 @@ ${r.slice(0, 5).join(`
135
135
  return;
136
136
  }
137
137
  }
138
- var st = class {
139
- constructor(e, t = Z) {
140
- this.prefix = e, this.delegate = t ?? Z;
138
+ var lt = class {
139
+ constructor(e, t = Q) {
140
+ this.prefix = e, this.delegate = t ?? Q;
141
141
  }
142
142
  setPrefix(e) {
143
143
  this.prefix = e;
144
144
  }
145
145
  setDelegate(e) {
146
- this.delegate = e ?? Z;
146
+ this.delegate = e ?? Q;
147
147
  }
148
148
  emit(e, t) {
149
- const r = this.delegate, o = Te() ? dr() : void 0, n = o ? [...t, o] : t, s = (() => {
149
+ const r = this.delegate, o = Ae() ? gr() : void 0, n = o ? [...t, o] : t, s = (() => {
150
150
  switch (e) {
151
151
  case "log":
152
152
  return ["log", "info"];
@@ -168,17 +168,17 @@ var st = class {
168
168
  return ["debug", "log"];
169
169
  }
170
170
  })();
171
- for (const a of s) {
172
- const c = r[a];
171
+ for (const i of s) {
172
+ const c = r[i];
173
173
  if (typeof c == "function") {
174
174
  c.call(r, this.prefix, ...n);
175
175
  return;
176
176
  }
177
177
  }
178
- for (const a of s) {
179
- const c = Z[a];
178
+ for (const i of s) {
179
+ const c = Q[i];
180
180
  if (typeof c == "function") {
181
- c.call(Z, this.prefix, ...n);
181
+ c.call(Q, this.prefix, ...n);
182
182
  return;
183
183
  }
184
184
  }
@@ -202,39 +202,39 @@ var st = class {
202
202
  this.emit("info", e);
203
203
  }
204
204
  debug(...e) {
205
- Te() && this.emit("debug", e);
205
+ Ae() && this.emit("debug", e);
206
206
  }
207
207
  };
208
- function it(e) {
209
- return new st(e);
208
+ function ut(e) {
209
+ return new lt(e);
210
210
  }
211
- function mr(e) {
212
- const t = new st(e);
211
+ function Rr(e) {
212
+ const t = new lt(e);
213
213
  return Object.defineProperty(t, "__mf_infrastructure_logger__", {
214
214
  value: !0,
215
215
  enumerable: !1,
216
216
  configurable: !1
217
217
  }), t;
218
218
  }
219
- mr(fr);
220
- async function at(e, t) {
219
+ Rr(yr);
220
+ async function ht(e, t) {
221
221
  try {
222
222
  return await e();
223
223
  } catch (r) {
224
- rt(r);
224
+ it(r);
225
225
  return;
226
226
  }
227
227
  }
228
- function Ae(e, t) {
228
+ function Pe(e, t) {
229
229
  const r = /^(https?:)?\/\//i;
230
230
  return e.replace(r, "").replace(/\/$/, "") === t.replace(r, "").replace(/\/$/, "");
231
231
  }
232
- function ct(e) {
232
+ function ft(e) {
233
233
  let t = null, r = !0, o = 2e4, n;
234
234
  const s = document.getElementsByTagName("script");
235
235
  for (let l = 0; l < s.length; l++) {
236
- const u = s[l], f = u.getAttribute("src");
237
- if (f && Ae(f, e.url)) {
236
+ const u = s[l], h = u.getAttribute("src");
237
+ if (h && Pe(h, e.url)) {
238
238
  t = u, r = !1;
239
239
  break;
240
240
  }
@@ -243,41 +243,41 @@ function ct(e) {
243
243
  const l = e.attrs;
244
244
  t = document.createElement("script"), t.type = (l == null ? void 0 : l.type) === "module" ? "module" : "text/javascript";
245
245
  let u;
246
- e.createScriptHook && (u = e.createScriptHook(e.url, e.attrs), u instanceof HTMLScriptElement ? t = u : typeof u == "object" && ("script" in u && u.script && (t = u.script), "timeout" in u && u.timeout && (o = u.timeout))), t.src || (t.src = e.url), l && !u && Object.keys(l).forEach((f) => {
247
- t && (f === "async" || f === "defer" ? t[f] = l[f] : t.getAttribute(f) || t.setAttribute(f, l[f]));
246
+ e.createScriptHook && (u = e.createScriptHook(e.url, e.attrs), u instanceof HTMLScriptElement ? t = u : typeof u == "object" && ("script" in u && u.script && (t = u.script), "timeout" in u && u.timeout && (o = u.timeout))), t.src || (t.src = e.url), l && !u && Object.keys(l).forEach((h) => {
247
+ t && (h === "async" || h === "defer" ? t[h] = l[h] : t.getAttribute(h) || t.setAttribute(h, l[h]));
248
248
  });
249
249
  }
250
- let a = null;
250
+ let i = null;
251
251
  const c = typeof window < "u" ? (l) => {
252
- if (l.filename && Ae(l.filename, e.url)) {
252
+ if (l.filename && Pe(l.filename, e.url)) {
253
253
  const u = /* @__PURE__ */ new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);
254
- u.name = "ScriptExecutionError", a = u;
254
+ u.name = "ScriptExecutionError", i = u;
255
255
  }
256
256
  } : null;
257
257
  c && window.addEventListener("error", c);
258
- const i = async (l, u) => {
258
+ const a = async (l, u) => {
259
259
  clearTimeout(n), c && window.removeEventListener("error", c);
260
- const f = () => {
260
+ const h = () => {
261
261
  if ((u == null ? void 0 : u.type) === "error") {
262
262
  const m = /* @__PURE__ */ new Error(u != null && u.isTimeout ? `ScriptNetworkError: Script "${e.url}" timed out.` : `ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);
263
263
  m.name = "ScriptNetworkError", e != null && e.onErrorCallback && (e == null || e.onErrorCallback(m));
264
- } else a ? e != null && e.onErrorCallback && (e == null || e.onErrorCallback(a)) : e != null && e.cb && (e == null || e.cb());
264
+ } else i ? e != null && e.onErrorCallback && (e == null || e.onErrorCallback(i)) : e != null && e.cb && (e == null || e.cb());
265
265
  };
266
- if (t && (t.onerror = null, t.onload = null, at(() => {
266
+ if (t && (t.onerror = null, t.onload = null, ht(() => {
267
267
  const { needDeleteScript: m = !0 } = e;
268
268
  m && t != null && t.parentNode && t.parentNode.removeChild(t);
269
269
  }), l && typeof l == "function")) {
270
270
  const m = l(u);
271
271
  if (m instanceof Promise) {
272
- const h = await m;
273
- return f(), h;
272
+ const f = await m;
273
+ return h(), f;
274
274
  }
275
- return f(), m;
275
+ return h(), m;
276
276
  }
277
- f();
277
+ h();
278
278
  };
279
- return t.onerror = i.bind(null, t.onerror), t.onload = i.bind(null, t.onload), n = setTimeout(() => {
280
- i(null, {
279
+ return t.onerror = a.bind(null, t.onerror), t.onload = a.bind(null, t.onload), n = setTimeout(() => {
280
+ a(null, {
281
281
  type: "error",
282
282
  isTimeout: !0
283
283
  });
@@ -286,21 +286,21 @@ function ct(e) {
286
286
  needAttach: r
287
287
  };
288
288
  }
289
- function pr(e) {
289
+ function _r(e) {
290
290
  let t = null, r = !0, o = 2e4, n;
291
291
  const s = document.getElementsByTagName("link");
292
292
  for (let c = 0; c < s.length; c++) {
293
- const i = s[c], l = i.getAttribute("href"), u = i.getAttribute("rel");
294
- if (l && Ae(l, e.url) && u === e.attrs.rel) {
295
- t = i, r = !1;
293
+ const a = s[c], l = a.getAttribute("href"), u = a.getAttribute("rel");
294
+ if (l && Pe(l, e.url) && u === e.attrs.rel) {
295
+ t = a, r = !1;
296
296
  break;
297
297
  }
298
298
  }
299
299
  if (!t) {
300
300
  t = document.createElement("link"), t.setAttribute("href", e.url);
301
- let c, i = !0;
301
+ let c, a = !0;
302
302
  const l = e.attrs;
303
- e.createLinkHook && (c = e.createLinkHook(e.url, l), c instanceof HTMLLinkElement ? (t = c, i = !1) : typeof c == "object" && ("link" in c && c.link && (t = c.link, i = !1), "timeout" in c && c.timeout && (o = c.timeout))), l && i && Object.keys(l).forEach((u) => {
303
+ e.createLinkHook && (c = e.createLinkHook(e.url, l), c instanceof HTMLLinkElement ? (t = c, a = !1) : typeof c == "object" && ("link" in c && c.link && (t = c.link, a = !1), "timeout" in c && c.timeout && (o = c.timeout))), l && a && Object.keys(l).forEach((u) => {
304
304
  t && !t.getAttribute(u) && t.setAttribute(u, l[u]);
305
305
  });
306
306
  }
@@ -311,25 +311,25 @@ function pr(e) {
311
311
  link: t,
312
312
  needAttach: r
313
313
  };
314
- const a = (c, i) => {
314
+ const i = (c, a) => {
315
315
  n && clearTimeout(n);
316
316
  const l = () => {
317
- if ((i == null ? void 0 : i.type) === "error") {
318
- const u = /* @__PURE__ */ new Error(i != null && i.isTimeout ? `LinkNetworkError: Link "${e.url}" timed out.` : `LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);
317
+ if ((a == null ? void 0 : a.type) === "error") {
318
+ const u = /* @__PURE__ */ new Error(a != null && a.isTimeout ? `LinkNetworkError: Link "${e.url}" timed out.` : `LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);
319
319
  u.name = "LinkNetworkError", e != null && e.onErrorCallback && (e == null || e.onErrorCallback(u));
320
320
  } else e != null && e.cb && (e == null || e.cb());
321
321
  };
322
- if (t && (t.onerror = null, t.onload = null, at(() => {
322
+ if (t && (t.onerror = null, t.onload = null, ht(() => {
323
323
  const { needDeleteLink: u = !0 } = e;
324
324
  u && t != null && t.parentNode && t.parentNode.removeChild(t);
325
325
  }), c)) {
326
- const u = c(i);
326
+ const u = c(a);
327
327
  return l(), u;
328
328
  }
329
329
  l();
330
330
  };
331
- return t.onerror = a.bind(null, t.onerror), t.onload = a.bind(null, t.onload), n = setTimeout(() => {
332
- a(null, {
331
+ return t.onerror = i.bind(null, t.onerror), t.onload = i.bind(null, t.onload), n = setTimeout(() => {
332
+ i(null, {
333
333
  type: "error",
334
334
  isTimeout: !0
335
335
  });
@@ -338,10 +338,10 @@ function pr(e) {
338
338
  needAttach: r
339
339
  };
340
340
  }
341
- function yr(e, t) {
341
+ function Sr(e, t) {
342
342
  const { attrs: r = {}, createScriptHook: o } = t;
343
343
  return new Promise((n, s) => {
344
- const { script: a, needAttach: c } = ct({
344
+ const { script: i, needAttach: c } = ft({
345
345
  url: e,
346
346
  cb: n,
347
347
  onErrorCallback: s,
@@ -352,25 +352,22 @@ function yr(e, t) {
352
352
  createScriptHook: o,
353
353
  needDeleteScript: !0
354
354
  });
355
- c && document.head.appendChild(a);
355
+ c && document.head.appendChild(i);
356
356
  });
357
357
  }
358
- const ae = /* @__PURE__ */ new Map();
359
- function q(e) {
358
+ const le = /* @__PURE__ */ new Map();
359
+ function x(e) {
360
360
  if (!e) throw new Error("import specifier is required");
361
- if (ae.has(e)) return ae.get(e);
361
+ if (le.has(e)) return le.get(e);
362
362
  const t = new Function("name", "return import(name)")(e).then((r) => r).catch((r) => {
363
- throw console.error(`Error importing module ${e}:`, r), ae.delete(e), r;
363
+ throw console.error(`Error importing module ${e}:`, r), le.delete(e), r;
364
364
  });
365
- return ae.set(e, t), t;
366
- }
367
- const lt = async () => {
368
- const e = await q("node-fetch");
369
- return e.default || e;
370
- }, Er = async (e, t, r) => {
371
- const n = await ((s, a) => r.lifecycle.fetch.emit(s, a))(e, t || {});
372
- return !n || !(n instanceof Response) ? (typeof fetch > "u" ? await lt() : fetch)(e, t || {}) : n;
373
- }, gr = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t, r, o) => {
365
+ return le.set(e, t), t;
366
+ }
367
+ const br = async (e, t, r) => {
368
+ const n = await ((s, i) => r.lifecycle.fetch.emit(s, i))(e, t || {});
369
+ return !n || !(n instanceof Response) ? fetch(e, t || {}) : n;
370
+ }, wr = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t, r, o) => {
374
371
  if (o != null && o.createScriptHook) {
375
372
  const c = o.createScriptHook(e);
376
373
  c && typeof c == "object" && "url" in c && (e = c.url);
@@ -382,19 +379,19 @@ const lt = async () => {
382
379
  console.error("Error constructing URL:", c), t(/* @__PURE__ */ new Error(`Invalid URL: ${c}`));
383
380
  return;
384
381
  }
385
- const s = async () => o != null && o.fetch ? (c, i) => Er(c, i, o) : typeof fetch > "u" ? lt() : fetch, a = async (c, i) => {
382
+ const s = async () => o != null && o.fetch ? (c, a) => br(c, a, o) : fetch, i = async (c, a) => {
386
383
  var l;
387
384
  try {
388
- const f = await (await c(i.href)).text(), [m, h] = await Promise.all([q("path"), q("vm")]), d = {
385
+ const h = await (await c(a.href)).text(), [m, f] = await Promise.all([x("path"), x("vm")]), d = {
389
386
  exports: {},
390
387
  module: { exports: {} }
391
- }, p = i.pathname.split("/").slice(0, -1).join("/"), E = m.basename(i.pathname), y = new h.Script(`(function(exports, module, require, __dirname, __filename) {${f}
388
+ }, p = a.pathname.split("/").slice(0, -1).join("/"), E = m.basename(a.pathname), y = new f.Script(`(function(exports, module, require, __dirname, __filename) {${h}
392
389
  })`, {
393
390
  filename: E,
394
- importModuleDynamically: ((l = h.constants) == null ? void 0 : l.USE_MAIN_CONTEXT_DEFAULT_LOADER) ?? q
391
+ importModuleDynamically: ((l = f.constants) == null ? void 0 : l.USE_MAIN_CONTEXT_DEFAULT_LOADER) ?? x
395
392
  });
396
- let _;
397
- _ = (await q("node:module")).createRequire(i.protocol === "file:" || i.protocol === "node:" ? i.href : m.join(process.cwd(), "__mf_require_base__.js")), y.runInThisContext()(d.exports, d.module, _, p, E);
393
+ let R;
394
+ R = (await x("node:module")).createRequire(a.protocol === "file:" || a.protocol === "node:" ? a.href : m.join(process.cwd(), "__mf_require_base__.js")), y.runInThisContext()(d.exports, d.module, R, p, E);
398
395
  const g = d.module.exports || d.exports;
399
396
  if (r && g && r.globalName) {
400
397
  t(void 0, g[r.globalName] || g);
@@ -406,95 +403,136 @@ const lt = async () => {
406
403
  }
407
404
  };
408
405
  s().then(async (c) => {
409
- if ((r == null ? void 0 : r.type) === "esm" || (r == null ? void 0 : r.type) === "module") return ke(n.href, {
406
+ if ((r == null ? void 0 : r.type) === "esm" || (r == null ? void 0 : r.type) === "module") return pt(n.href, {
410
407
  fetch: c,
411
- vm: await q("vm")
412
- }).then(async (i) => {
413
- await i.evaluate(), t(void 0, i.namespace);
414
- }).catch((i) => {
415
- t(i instanceof Error ? i : /* @__PURE__ */ new Error(`Script execution error: ${i}`));
408
+ vm: await x("vm")
409
+ }).then(async (a) => {
410
+ await a.evaluate(), t(void 0, a.namespace);
411
+ }).catch((a) => {
412
+ t(a instanceof Error ? a : /* @__PURE__ */ new Error(`Script execution error: ${a}`));
416
413
  });
417
- a(c, n);
414
+ i(c, n);
418
415
  }).catch((c) => {
419
416
  t(c);
420
417
  });
421
418
  } : (e, t, r, o) => {
422
419
  t(/* @__PURE__ */ new Error("createScriptNode is disabled in non-Node.js environment"));
423
- }, _r = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t) => new Promise((r, o) => {
424
- gr(e, (n, s) => {
425
- var a, c;
420
+ }, Ir = typeof ENV_TARGET > "u" || ENV_TARGET !== "web" ? (e, t) => new Promise((r, o) => {
421
+ wr(e, (n, s) => {
422
+ var i, c;
426
423
  if (n) o(n);
427
424
  else {
428
- const i = ((a = t == null ? void 0 : t.attrs) == null ? void 0 : a.globalName) || `__FEDERATION_${(c = t == null ? void 0 : t.attrs) == null ? void 0 : c.name}:custom__`;
429
- r(globalThis[i] = s);
425
+ const a = ((i = t == null ? void 0 : t.attrs) == null ? void 0 : i.globalName) || `__FEDERATION_${(c = t == null ? void 0 : t.attrs) == null ? void 0 : c.name}:custom__`;
426
+ r(globalThis[a] = s);
430
427
  }
431
428
  }, t.attrs, t.loaderHook);
432
429
  }) : (e, t) => {
433
430
  throw new Error("loadScriptNode is disabled in non-Node.js environment");
434
- }, be = /* @__PURE__ */ new Map();
435
- async function ke(e, t) {
436
- if (be.has(e)) return be.get(e);
437
- const { fetch: r, vm: o } = t, n = await (await r(e)).text(), s = new o.SourceTextModule(n, { importModuleDynamically: async (a, c) => {
438
- const i = new URL(a, e).href;
439
- return ke(i, t);
440
- } });
441
- return be.set(e, s), await s.link(async (a) => {
442
- const c = new URL(a, e).href;
443
- return await ke(c, t);
444
- }), s;
445
- }
446
- const C = it("[ Module Federation Bridge Vue3 ]"), Rr = (e) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`, ut = (e, t, r, o) => {
431
+ }, Z = /* @__PURE__ */ new Map(), dt = (e) => e.startsWith("http:") || e.startsWith("https:"), mt = (e) => !e.startsWith("./") && !e.startsWith("../") && !e.startsWith("/") && !e.includes(":");
432
+ function $r(e) {
433
+ const t = new URL(e), r = encodeURIComponent(t.protocol.slice(0, -1)), o = encodeURIComponent(t.host), n = t.pathname.split("/").map((i) => encodeURIComponent(i)).join("/"), s = encodeURIComponent(`${t.search}${t.hash}`);
434
+ return `/${r}/${o}${n}${s ? `/${s}` : ""}`;
435
+ }
436
+ function Tr(e, t) {
437
+ const r = t.endsWith("/") ? t : `${t}/`;
438
+ return new URL(`__module_federation_remote__${$r(e)}`, r).href;
439
+ }
440
+ async function vr(e) {
441
+ return e.startsWith("node:") ? !0 : mt(e) ? (await x("node:module")).builtinModules.includes(e) : !1;
442
+ }
443
+ function Nr(e) {
444
+ const t = e && (typeof e == "object" || typeof e == "function") ? e : { default: e }, r = { ...t };
445
+ return Object.prototype.hasOwnProperty.call(r, "default") || (r.default = t), r;
446
+ }
447
+ async function Ar(e, t, r) {
448
+ if (typeof r.SyntheticModule != "function") throw new Error("vm.SyntheticModule is required to load Node.js built-in modules in ESM remote entries.");
449
+ const o = Nr(t), n = Object.keys(o), s = new r.SyntheticModule(n, function() {
450
+ for (const c of n) this.setExport(c, o[c]);
451
+ }, { identifier: e });
452
+ return Z.set(e, s), await s.link(async () => {
453
+ throw new Error(`Node.js built-in module "${e}" should not request child modules.`);
454
+ }), await s.evaluate(), s;
455
+ }
456
+ async function Mr(e, t) {
457
+ const r = `node-builtin:${e}`;
458
+ return Z.has(r) ? Z.get(r) : Ar(r, await x(e), t);
459
+ }
460
+ async function We(e, t, r) {
461
+ if (await vr(e)) return Mr(e, r.vm);
462
+ if (mt(e)) throw new Error(`Unsupported ESM module specifier "${e}". Only relative or absolute http(s) remote modules and Node.js built-in modules are supported.`);
463
+ const o = new URL(e, t).href;
464
+ if (!dt(o)) throw new Error(`Unsupported ESM module specifier "${e}" resolved to "${o}". Only http(s) remote modules and Node.js built-in modules are supported.`);
465
+ return pt(o, r);
466
+ }
467
+ async function Pr(e) {
468
+ if (e.status === "linked" && await e.evaluate(), e.status === "errored") throw e.error;
469
+ return e;
470
+ }
471
+ async function pt(e, t) {
472
+ if (Z.has(e)) return Z.get(e);
473
+ const { fetch: r, vm: o } = t;
474
+ if (!dt(e)) throw new Error(`Unsupported ESM module URL "${e}". Only http(s) remote modules and Node.js built-in modules are supported.`);
475
+ const n = await (await r(e)).text(), s = (await x("node:url")).pathToFileURL(process.cwd()).href, i = new o.SourceTextModule(n, {
476
+ identifier: e,
477
+ initializeImportMeta: (c) => {
478
+ c.url = Tr(e, s);
479
+ },
480
+ importModuleDynamically: async (c) => Pr(await We(c, e, t))
481
+ });
482
+ return Z.set(e, i), await i.link(async (c) => We(c, e, t)), i;
483
+ }
484
+ const C = ut("[ Module Federation Bridge Vue3 ]"), kr = (e) => `View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`, yt = (e, t, r, o) => {
447
485
  const n = [`${[t[e]]} #${e}`];
448
- return r && n.push(`args: ${JSON.stringify(r)}`), n.push(Rr(e)), o && n.push(`Original Error Message:
486
+ return r && n.push(`args: ${JSON.stringify(r)}`), n.push(kr(e)), o && n.push(`Original Error Message:
449
487
  ${o}`), n.join(`
450
488
  `);
451
489
  };
452
- function br(e, t, r, o, n, s) {
453
- return o(ut(e, t, r, n));
490
+ function Or(e, t, r, o, n, s) {
491
+ return o(yt(e, t, r, n));
454
492
  }
455
- const x = "[ Federation Runtime ]", Pe = it(x);
456
- function O(e, t, r, o, n) {
493
+ const U = "[ Federation Runtime ]", ke = ut(U);
494
+ function L(e, t, r, o, n) {
457
495
  e || w(t);
458
496
  }
459
497
  function w(e, t, r, o, n) {
460
- if (t !== void 0) return br(e, t, r ?? {}, (a) => {
461
- throw new Error(`${x}: ${a}`);
498
+ if (t !== void 0) return Or(e, t, r ?? {}, (i) => {
499
+ throw new Error(`${U}: ${i}`);
462
500
  }, o);
463
501
  const s = e;
464
- throw s instanceof Error ? (s.message.startsWith(x) || (s.message = `${x}: ${s.message}`), s) : new Error(`${x}: ${s}`);
502
+ throw s instanceof Error ? (s.message.startsWith(U) || (s.message = `${U}: ${s.message}`), s) : new Error(`${U}: ${s}`);
465
503
  }
466
- function re(e) {
467
- e instanceof Error && (e.message.startsWith(x) || (e.message = `${x}: ${e.message}`)), Pe.warn(e);
504
+ function ne(e) {
505
+ e instanceof Error && (e.message.startsWith(U) || (e.message = `${U}: ${e.message}`)), ke.warn(e);
468
506
  }
469
- function Sr(e, t) {
507
+ function Lr(e, t) {
470
508
  return e.findIndex((r) => r === t) === -1 && e.push(t), e;
471
509
  }
472
- function oe(e) {
510
+ function se(e) {
473
511
  return "version" in e && e.version ? `${e.name}:${e.version}` : "entry" in e && e.entry ? `${e.name}:${e.entry}` : `${e.name}`;
474
512
  }
475
- function Oe(e) {
513
+ function Ce(e) {
476
514
  return typeof e.entry < "u";
477
515
  }
478
- function ft(e) {
516
+ function Et(e) {
479
517
  return !e.entry.includes(".json");
480
518
  }
481
- function Ce(e) {
519
+ function Fe(e) {
482
520
  return e && typeof e == "object";
483
521
  }
484
- const wr = Object.prototype.toString;
485
- function $r(e) {
486
- return wr.call(e) === "[object Object]";
522
+ const Cr = Object.prototype.toString;
523
+ function Fr(e) {
524
+ return Cr.call(e) === "[object Object]";
487
525
  }
488
- function ht(e) {
526
+ function gt(e) {
489
527
  return Array.isArray(e) ? e : [e];
490
528
  }
491
- function dt(e) {
529
+ function Rt(e) {
492
530
  const t = {
493
531
  url: "",
494
532
  type: "global",
495
533
  globalName: ""
496
534
  };
497
- return D || et() || !("ssrRemoteEntry" in e) ? "remoteEntry" in e ? {
535
+ return G || nt() || !("ssrRemoteEntry" in e) ? "remoteEntry" in e ? {
498
536
  url: e.remoteEntry,
499
537
  type: e.remoteEntryType,
500
538
  globalName: e.globalName
@@ -504,45 +542,45 @@ function dt(e) {
504
542
  globalName: e.globalName
505
543
  } : t;
506
544
  }
507
- const Ir = (e, t) => {
545
+ const Hr = (e, t) => {
508
546
  let r;
509
547
  return e.endsWith("/") ? r = e.slice(0, -1) : r = e, t.startsWith(".") && (t = t.slice(1)), r = r + t, r;
510
- }, T = typeof globalThis == "object" ? globalThis : window, L = (() => {
548
+ }, v = typeof globalThis == "object" ? globalThis : window, k = (() => {
511
549
  try {
512
550
  return document.defaultView;
513
551
  } catch {
514
- return T;
552
+ return v;
515
553
  }
516
- })(), ge = L;
517
- function fe(e, t, r) {
554
+ })(), _e = k;
555
+ function de(e, t, r) {
518
556
  Object.defineProperty(e, t, {
519
557
  value: r,
520
558
  configurable: !1,
521
559
  writable: !0
522
560
  });
523
561
  }
524
- function he(e, t) {
562
+ function me(e, t) {
525
563
  return Object.hasOwnProperty.call(e, t);
526
564
  }
527
- he(T, "__GLOBAL_LOADING_REMOTE_ENTRY__") || fe(T, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
528
- const K = T.__GLOBAL_LOADING_REMOTE_ENTRY__;
529
- function mt(e) {
530
- var t, r, o, n, s, a;
531
- he(e, "__VMOK__") && !he(e, "__FEDERATION__") && fe(e, "__FEDERATION__", e.__VMOK__), he(e, "__FEDERATION__") || (fe(e, "__FEDERATION__", {
565
+ me(v, "__GLOBAL_LOADING_REMOTE_ENTRY__") || de(v, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
566
+ const J = v.__GLOBAL_LOADING_REMOTE_ENTRY__;
567
+ function _t(e) {
568
+ var t, r, o, n, s, i;
569
+ me(e, "__VMOK__") && !me(e, "__FEDERATION__") && de(e, "__FEDERATION__", e.__VMOK__), me(e, "__FEDERATION__") || (de(e, "__FEDERATION__", {
532
570
  __GLOBAL_PLUGIN__: [],
533
571
  __INSTANCES__: [],
534
572
  moduleInfo: {},
535
573
  __SHARE__: {},
536
574
  __MANIFEST_LOADING__: {},
537
575
  __PRELOADED_MAP__: /* @__PURE__ */ new Map()
538
- }), fe(e, "__VMOK__", e.__FEDERATION__)), (t = e.__FEDERATION__).__GLOBAL_PLUGIN__ ?? (t.__GLOBAL_PLUGIN__ = []), (r = e.__FEDERATION__).__INSTANCES__ ?? (r.__INSTANCES__ = []), (o = e.__FEDERATION__).moduleInfo ?? (o.moduleInfo = {}), (n = e.__FEDERATION__).__SHARE__ ?? (n.__SHARE__ = {}), (s = e.__FEDERATION__).__MANIFEST_LOADING__ ?? (s.__MANIFEST_LOADING__ = {}), (a = e.__FEDERATION__).__PRELOADED_MAP__ ?? (a.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
576
+ }), de(e, "__VMOK__", e.__FEDERATION__)), (t = e.__FEDERATION__).__GLOBAL_PLUGIN__ ?? (t.__GLOBAL_PLUGIN__ = []), (r = e.__FEDERATION__).__INSTANCES__ ?? (r.__INSTANCES__ = []), (o = e.__FEDERATION__).moduleInfo ?? (o.moduleInfo = {}), (n = e.__FEDERATION__).__SHARE__ ?? (n.__SHARE__ = {}), (s = e.__FEDERATION__).__MANIFEST_LOADING__ ?? (s.__MANIFEST_LOADING__ = {}), (i = e.__FEDERATION__).__PRELOADED_MAP__ ?? (i.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
539
577
  }
540
- mt(T);
541
- mt(L);
542
- function vr(e, t = Te()) {
543
- t && (T.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, T.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.6.0");
578
+ _t(v);
579
+ _t(k);
580
+ function Dr(e, t = Ae()) {
581
+ t && (v.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, v.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.8.0");
544
582
  }
545
- function B(e, t) {
583
+ function W(e, t) {
546
584
  if (typeof t == "string") {
547
585
  if (e[t]) return {
548
586
  value: e[t],
@@ -551,10 +589,10 @@ function B(e, t) {
551
589
  {
552
590
  const r = Object.keys(e);
553
591
  for (const o of r) {
554
- const [n, s] = o.split(":"), a = `${n}:${t}`, c = e[a];
592
+ const [n, s] = o.split(":"), i = `${n}:${t}`, c = e[i];
555
593
  if (c) return {
556
594
  value: c,
557
- key: a
595
+ key: i
558
596
  };
559
597
  }
560
598
  return {
@@ -564,178 +602,178 @@ function B(e, t) {
564
602
  }
565
603
  } else w(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`);
566
604
  }
567
- const Ve = () => L.__FEDERATION__.moduleInfo, Tr = (e, t) => {
568
- const r = B(t, oe(e)).value;
605
+ const Ve = () => k.__FEDERATION__.moduleInfo, xr = (e, t) => {
606
+ const r = W(t, se(e)).value;
569
607
  if (r && !r.version && "version" in e && e.version && (r.version = e.version), r) return r;
570
608
  if ("version" in e && e.version) {
571
- const { version: o, ...n } = e, s = oe(n), a = B(L.__FEDERATION__.moduleInfo, s).value;
572
- if ((a == null ? void 0 : a.version) === o) return a;
573
- }
574
- }, de = (e) => Tr(e, L.__FEDERATION__.moduleInfo), We = (e, t) => {
575
- const r = oe(e);
576
- return L.__FEDERATION__.moduleInfo[r] = t, L.__FEDERATION__.moduleInfo;
577
- }, Nr = (e) => (L.__FEDERATION__.moduleInfo = {
578
- ...L.__FEDERATION__.moduleInfo,
609
+ const { version: o, ...n } = e, s = se(n), i = W(k.__FEDERATION__.moduleInfo, s).value;
610
+ if ((i == null ? void 0 : i.version) === o) return i;
611
+ }
612
+ }, pe = (e) => xr(e, k.__FEDERATION__.moduleInfo), qe = (e, t) => {
613
+ const r = se(e);
614
+ return k.__FEDERATION__.moduleInfo[r] = t, k.__FEDERATION__.moduleInfo;
615
+ }, Gr = (e) => (k.__FEDERATION__.moduleInfo = {
616
+ ...k.__FEDERATION__.moduleInfo,
579
617
  ...e
580
618
  }, () => {
581
619
  const t = Object.keys(e);
582
- for (const r of t) delete L.__FEDERATION__.moduleInfo[r];
583
- }), Fe = (e, t) => {
620
+ for (const r of t) delete k.__FEDERATION__.moduleInfo[r];
621
+ }), He = (e, t) => {
584
622
  const r = t || `__FEDERATION_${e}:custom__`;
585
623
  return {
586
624
  remoteEntryKey: r,
587
- entryExports: T[r]
625
+ entryExports: v[r]
588
626
  };
589
- }, Ar = () => L.__FEDERATION__.__GLOBAL_PLUGIN__, kr = (e) => T.__FEDERATION__.__PRELOADED_MAP__.get(e), Pr = (e) => T.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), je = "[0-9A-Za-z-]+", He = `(?:\\+(${je}(?:\\.${je})*))`, te = "0|[1-9]\\d*", me = "[0-9]+", pt = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", qe = `(?:${me}|${pt})`, Lr = `(?:-?(${qe}(?:\\.${qe})*))`, Ke = `(?:${te}|${pt})`, yt = `(?:-(${Ke}(?:\\.${Ke})*))`, Se = `${te}|x|X|\\*`, Y = `[v=\\s]*(${Se})(?:\\.(${Se})(?:\\.(${Se})(?:${yt})?${He}?)?)?`, Mr = `^\\s*(${Y})\\s+-\\s+(${Y})\\s*$`, Or = `[v=\\s]*${`(${me})\\.(${me})\\.(${me})`}${Lr}?${He}?`, De = "((?:<|>)?=?)", Cr = `(\\s*)${De}\\s*(${Or}|${Y})`, Et = "(?:~>?)", Fr = `(\\s*)${Et}\\s+`, gt = "(?:\\^)", Hr = `(\\s*)${gt}\\s+`, Dr = "(<|>)?=?\\s*\\*", xr = `^${gt}${Y}$`, Gr = `v?${`(${te})\\.(${te})\\.(${te})`}${yt}?${He}?`, Ur = `^${Et}${Y}$`, Br = `^${De}\\s*${Y}$`, Vr = `^${De}\\s*(${Gr})$|^$`, Wr = "^\\s*>=\\s*0.0.0\\s*$";
590
- function M(e) {
627
+ }, Ur = () => k.__FEDERATION__.__GLOBAL_PLUGIN__, Br = (e) => v.__FEDERATION__.__PRELOADED_MAP__.get(e), jr = (e) => v.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), ze = "[0-9A-Za-z-]+", De = `(?:\\+(${ze}(?:\\.${ze})*))`, oe = "0|[1-9]\\d*", ye = "[0-9]+", St = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", Ke = `(?:${ye}|${St})`, Wr = `(?:-?(${Ke}(?:\\.${Ke})*))`, Je = `(?:${oe}|${St})`, bt = `(?:-(${Je}(?:\\.${Je})*))`, we = `${oe}|x|X|\\*`, Y = `[v=\\s]*(${we})(?:\\.(${we})(?:\\.(${we})(?:${bt})?${De}?)?)?`, Vr = `^\\s*(${Y})\\s+-\\s+(${Y})\\s*$`, qr = `[v=\\s]*${`(${ye})\\.(${ye})\\.(${ye})`}${Wr}?${De}?`, xe = "((?:<|>)?=?)", zr = `(\\s*)${xe}\\s*(${qr}|${Y})`, wt = "(?:~>?)", Kr = `(\\s*)${wt}\\s+`, It = "(?:\\^)", Jr = `(\\s*)${It}\\s+`, Zr = "(<|>)?=?\\s*\\*", Xr = `^${It}${Y}$`, Yr = `v?${`(${oe})\\.(${oe})\\.(${oe})`}${bt}?${De}?`, Qr = `^${wt}${Y}$`, eo = `^${xe}\\s*${Y}$`, to = `^${xe}\\s*(${Yr})$|^$`, ro = "^\\s*>=\\s*0.0.0\\s*$";
628
+ function O(e) {
591
629
  return new RegExp(e);
592
630
  }
593
631
  function N(e) {
594
632
  return !e || e.toLowerCase() === "x" || e === "*";
595
633
  }
596
- function _t(...e) {
634
+ function $t(...e) {
597
635
  return (t) => e.reduce((r, o) => o(r), t);
598
636
  }
599
- function ze(e) {
600
- return e.match(M(Vr));
637
+ function Ze(e) {
638
+ return e.match(O(to));
601
639
  }
602
- function Je(e, t, r, o) {
640
+ function Xe(e, t, r, o) {
603
641
  const n = `${e}.${t}.${r}`;
604
642
  return o ? `${n}-${o}` : n;
605
643
  }
606
- function jr(e) {
607
- return e.replace(M(Mr), (t, r, o, n, s, a, c, i, l, u, f, m) => (N(o) ? r = "" : N(n) ? r = `>=${o}.0.0` : N(s) ? r = `>=${o}.${n}.0` : r = `>=${r}`, N(l) ? i = "" : N(u) ? i = `<${Number(l) + 1}.0.0-0` : N(f) ? i = `<${l}.${Number(u) + 1}.0-0` : m ? i = `<=${l}.${u}.${f}-${m}` : i = `<=${i}`, `${r} ${i}`.trim()));
644
+ function oo(e) {
645
+ return e.replace(O(Vr), (t, r, o, n, s, i, c, a, l, u, h, m) => (N(o) ? r = "" : N(n) ? r = `>=${o}.0.0` : N(s) ? r = `>=${o}.${n}.0` : r = `>=${r}`, N(l) ? a = "" : N(u) ? a = `<${Number(l) + 1}.0.0-0` : N(h) ? a = `<${l}.${Number(u) + 1}.0-0` : m ? a = `<=${l}.${u}.${h}-${m}` : a = `<=${a}`, `${r} ${a}`.trim()));
608
646
  }
609
- function qr(e) {
610
- return e.replace(M(Cr), "$1$2$3");
647
+ function no(e) {
648
+ return e.replace(O(zr), "$1$2$3");
611
649
  }
612
- function Kr(e) {
613
- return e.replace(M(Fr), "$1~");
650
+ function so(e) {
651
+ return e.replace(O(Kr), "$1~");
614
652
  }
615
- function zr(e) {
616
- return e.replace(M(Hr), "$1^");
653
+ function io(e) {
654
+ return e.replace(O(Jr), "$1^");
617
655
  }
618
- function Jr(e) {
619
- return e.trim().split(/\s+/).map((t) => t.replace(M(xr), (r, o, n, s, a) => N(o) ? "" : N(n) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : N(s) ? o === "0" ? `>=${o}.${n}.0 <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.0 <${Number(o) + 1}.0.0-0` : a ? o === "0" ? n === "0" ? `>=${o}.${n}.${s}-${a} <${o}.${n}.${Number(s) + 1}-0` : `>=${o}.${n}.${s}-${a} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s}-${a} <${Number(o) + 1}.0.0-0` : o === "0" ? n === "0" ? `>=${o}.${n}.${s} <${o}.${n}.${Number(s) + 1}-0` : `>=${o}.${n}.${s} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s} <${Number(o) + 1}.0.0-0`)).join(" ");
656
+ function ao(e) {
657
+ return e.trim().split(/\s+/).map((t) => t.replace(O(Xr), (r, o, n, s, i) => N(o) ? "" : N(n) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : N(s) ? o === "0" ? `>=${o}.${n}.0 <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.0 <${Number(o) + 1}.0.0-0` : i ? o === "0" ? n === "0" ? `>=${o}.${n}.${s}-${i} <${o}.${n}.${Number(s) + 1}-0` : `>=${o}.${n}.${s}-${i} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s}-${i} <${Number(o) + 1}.0.0-0` : o === "0" ? n === "0" ? `>=${o}.${n}.${s} <${o}.${n}.${Number(s) + 1}-0` : `>=${o}.${n}.${s} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s} <${Number(o) + 1}.0.0-0`)).join(" ");
620
658
  }
621
- function Xr(e) {
622
- return e.trim().split(/\s+/).map((t) => t.replace(M(Ur), (r, o, n, s, a) => N(o) ? "" : N(n) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : N(s) ? `>=${o}.${n}.0 <${o}.${Number(n) + 1}.0-0` : a ? `>=${o}.${n}.${s}-${a} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s} <${o}.${Number(n) + 1}.0-0`)).join(" ");
659
+ function co(e) {
660
+ return e.trim().split(/\s+/).map((t) => t.replace(O(Qr), (r, o, n, s, i) => N(o) ? "" : N(n) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : N(s) ? `>=${o}.${n}.0 <${o}.${Number(n) + 1}.0-0` : i ? `>=${o}.${n}.${s}-${i} <${o}.${Number(n) + 1}.0-0` : `>=${o}.${n}.${s} <${o}.${Number(n) + 1}.0-0`)).join(" ");
623
661
  }
624
- function Yr(e) {
625
- return e.split(/\s+/).map((t) => t.trim().replace(M(Br), (r, o, n, s, a, c) => {
626
- const i = N(n), l = i || N(s), u = l || N(a);
627
- return o === "=" && u && (o = ""), c = "", i ? o === ">" || o === "<" ? "<0.0.0-0" : "*" : o && u ? (l && (s = 0), a = 0, o === ">" ? (o = ">=", l ? (n = Number(n) + 1, s = 0, a = 0) : (s = Number(s) + 1, a = 0)) : o === "<=" && (o = "<", l ? n = Number(n) + 1 : s = Number(s) + 1), o === "<" && (c = "-0"), `${o + n}.${s}.${a}${c}`) : l ? `>=${n}.0.0${c} <${Number(n) + 1}.0.0-0` : u ? `>=${n}.${s}.0${c} <${n}.${Number(s) + 1}.0-0` : r;
662
+ function lo(e) {
663
+ return e.split(/\s+/).map((t) => t.trim().replace(O(eo), (r, o, n, s, i, c) => {
664
+ const a = N(n), l = a || N(s), u = l || N(i);
665
+ return o === "=" && u && (o = ""), c = "", a ? o === ">" || o === "<" ? "<0.0.0-0" : "*" : o && u ? (l && (s = 0), i = 0, o === ">" ? (o = ">=", l ? (n = Number(n) + 1, s = 0, i = 0) : (s = Number(s) + 1, i = 0)) : o === "<=" && (o = "<", l ? n = Number(n) + 1 : s = Number(s) + 1), o === "<" && (c = "-0"), `${o + n}.${s}.${i}${c}`) : l ? `>=${n}.0.0${c} <${Number(n) + 1}.0.0-0` : u ? `>=${n}.${s}.0${c} <${n}.${Number(s) + 1}.0-0` : r;
628
666
  })).join(" ");
629
667
  }
630
- function Zr(e) {
631
- return e.trim().replace(M(Dr), "");
668
+ function uo(e) {
669
+ return e.trim().replace(O(Zr), "");
632
670
  }
633
- function Qr(e) {
634
- return e.trim().replace(M(Wr), "");
671
+ function ho(e) {
672
+ return e.trim().replace(O(ro), "");
635
673
  }
636
- function pe(e, t) {
674
+ function Ee(e, t) {
637
675
  return e = Number(e) || e, t = Number(t) || t, e > t ? 1 : e === t ? 0 : -1;
638
676
  }
639
- function eo(e, t) {
677
+ function fo(e, t) {
640
678
  const { preRelease: r } = e, { preRelease: o } = t;
641
679
  if (r === void 0 && o) return 1;
642
680
  if (r && o === void 0) return -1;
643
681
  if (r === void 0 && o === void 0) return 0;
644
682
  for (let n = 0, s = r.length; n <= s; n++) {
645
- const a = r[n], c = o[n];
646
- if (a !== c)
647
- return a === void 0 && c === void 0 ? 0 : a ? c ? pe(a, c) : -1 : 1;
683
+ const i = r[n], c = o[n];
684
+ if (i !== c)
685
+ return i === void 0 && c === void 0 ? 0 : i ? c ? Ee(i, c) : -1 : 1;
648
686
  }
649
687
  return 0;
650
688
  }
651
- function ce(e, t) {
652
- return pe(e.major, t.major) || pe(e.minor, t.minor) || pe(e.patch, t.patch) || eo(e, t);
689
+ function ue(e, t) {
690
+ return Ee(e.major, t.major) || Ee(e.minor, t.minor) || Ee(e.patch, t.patch) || fo(e, t);
653
691
  }
654
- function we(e, t) {
692
+ function Ie(e, t) {
655
693
  return e.version === t.version;
656
694
  }
657
- function to(e, t) {
695
+ function mo(e, t) {
658
696
  switch (e.operator) {
659
697
  case "":
660
698
  case "=":
661
- return we(e, t);
699
+ return Ie(e, t);
662
700
  case ">":
663
- return ce(e, t) < 0;
701
+ return ue(e, t) < 0;
664
702
  case ">=":
665
- return we(e, t) || ce(e, t) < 0;
703
+ return Ie(e, t) || ue(e, t) < 0;
666
704
  case "<":
667
- return ce(e, t) > 0;
705
+ return ue(e, t) > 0;
668
706
  case "<=":
669
- return we(e, t) || ce(e, t) > 0;
707
+ return Ie(e, t) || ue(e, t) > 0;
670
708
  case void 0:
671
709
  return !0;
672
710
  default:
673
711
  return !1;
674
712
  }
675
713
  }
676
- function ro(e) {
677
- return _t(Jr, Xr, Yr, Zr)(e);
714
+ function po(e) {
715
+ return $t(ao, co, lo, uo)(e);
678
716
  }
679
- function oo(e) {
680
- return _t(jr, qr, Kr, zr)(e.trim()).split(/\s+/).join(" ");
717
+ function yo(e) {
718
+ return $t(oo, no, so, io)(e.trim()).split(/\s+/).join(" ");
681
719
  }
682
- function ee(e, t) {
720
+ function re(e, t) {
683
721
  if (!e) return !1;
684
- const r = ze(e);
722
+ const r = Ze(e);
685
723
  if (!r) return !1;
686
- const [, o, , n, s, a, c] = r, i = {
724
+ const [, o, , n, s, i, c] = r, a = {
687
725
  operator: o,
688
- version: Je(n, s, a, c),
726
+ version: Xe(n, s, i, c),
689
727
  major: n,
690
728
  minor: s,
691
- patch: a,
729
+ patch: i,
692
730
  preRelease: c == null ? void 0 : c.split(".")
693
731
  }, l = t.split("||");
694
732
  for (const u of l) {
695
- const f = u.trim();
696
- if (!f || f === "*" || f === "x") return !0;
733
+ const h = u.trim();
734
+ if (!h || h === "*" || h === "x") return !0;
697
735
  try {
698
- const m = oo(f);
736
+ const m = yo(h);
699
737
  if (!m.trim()) return !0;
700
- const h = m.split(" ").map((E) => ro(E)).join(" ");
701
- if (!h.trim()) return !0;
702
- const d = h.split(/\s+/).map((E) => Qr(E)).filter(Boolean);
738
+ const f = m.split(" ").map((E) => po(E)).join(" ");
739
+ if (!f.trim()) return !0;
740
+ const d = f.split(/\s+/).map((E) => ho(E)).filter(Boolean);
703
741
  if (d.length === 0) continue;
704
742
  let p = !0;
705
743
  for (const E of d) {
706
- const y = ze(E);
744
+ const y = Ze(E);
707
745
  if (!y) {
708
746
  p = !1;
709
747
  break;
710
748
  }
711
- const [, _, , g, R, b, $] = y;
712
- if (!to({
713
- operator: _,
714
- version: Je(g, R, b, $),
749
+ const [, R, , g, _, S, I] = y;
750
+ if (!mo({
751
+ operator: R,
752
+ version: Xe(g, _, S, I),
715
753
  major: g,
716
- minor: R,
717
- patch: b,
718
- preRelease: $ == null ? void 0 : $.split(".")
719
- }, i)) {
754
+ minor: _,
755
+ patch: S,
756
+ preRelease: I == null ? void 0 : I.split(".")
757
+ }, a)) {
720
758
  p = !1;
721
759
  break;
722
760
  }
723
761
  }
724
762
  if (p) return !0;
725
763
  } catch (m) {
726
- console.error(`[semver] Error processing range part "${f}":`, m);
764
+ console.error(`[semver] Error processing range part "${h}":`, m);
727
765
  continue;
728
766
  }
729
767
  }
730
768
  return !1;
731
769
  }
732
- const ie = "default", Rt = "global";
733
- function no(e, t, r, o) {
734
- var s, a;
770
+ const ce = "default", Tt = "global";
771
+ function Eo(e, t, r, o) {
772
+ var s, i;
735
773
  let n;
736
774
  return "get" in e ? n = e.get : "lib" in e ? n = () => Promise.resolve(e.lib) : n = () => Promise.resolve(() => {
737
775
  w(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`);
738
- }), (s = e.shareConfig) != null && s.eager && ((a = e.treeShaking) != null && a.mode) && w(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`), {
776
+ }), (s = e.shareConfig) != null && s.eager && ((i = e.treeShaking) != null && i.mode) && w(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`), {
739
777
  deps: [],
740
778
  useIn: [],
741
779
  from: t,
@@ -756,110 +794,110 @@ function no(e, t, r, o) {
756
794
  treeShaking: e.treeShaking ? {
757
795
  ...e.treeShaking,
758
796
  mode: e.treeShaking.mode ?? "server-calc",
759
- status: e.treeShaking.status ?? ve.UNKNOWN,
797
+ status: e.treeShaking.status ?? Ne.UNKNOWN,
760
798
  useIn: []
761
799
  } : void 0
762
800
  };
763
801
  }
764
- function bt(e, t) {
765
- const r = t.shared || {}, o = t.name, n = Object.keys(r).reduce((a, c) => {
766
- const i = ht(r[c]);
767
- return a[c] = a[c] || [], i.forEach((l) => {
768
- a[c].push(no(l, o, c, t.shareStrategy));
769
- }), a;
802
+ function vt(e, t) {
803
+ const r = t.shared || {}, o = t.name, n = Object.keys(r).reduce((i, c) => {
804
+ const a = gt(r[c]);
805
+ return i[c] = i[c] || [], a.forEach((l) => {
806
+ i[c].push(Eo(l, o, c, t.shareStrategy));
807
+ }), i;
770
808
  }, {}), s = { ...e.shared };
771
- return Object.keys(n).forEach((a) => {
772
- s[a] ? n[a].forEach((c) => {
773
- s[a].find((i) => i.version === c.version) || s[a].push(c);
774
- }) : s[a] = n[a];
809
+ return Object.keys(n).forEach((i) => {
810
+ s[i] ? n[i].forEach((c) => {
811
+ s[i].find((a) => a.version === c.version) || s[i].push(c);
812
+ }) : s[i] = n[i];
775
813
  }), {
776
814
  allShareInfos: s,
777
815
  newShareInfos: n
778
816
  };
779
817
  }
780
- function ne(e, t) {
818
+ function ie(e, t) {
781
819
  if (!e) return !1;
782
820
  const { status: r, mode: o } = e;
783
- return r === ve.NO_USE ? !1 : r === ve.CALCULATED ? !0 : o === "runtime-infer" ? t ? io(e, t) : !0 : !1;
821
+ return r === Ne.NO_USE ? !1 : r === Ne.CALCULATED ? !0 : o === "runtime-infer" ? t ? Ro(e, t) : !0 : !1;
784
822
  }
785
- function G(e, t) {
823
+ function B(e, t) {
786
824
  const r = (o) => {
787
825
  if (!Number.isNaN(Number(o))) {
788
826
  const n = o.split(".");
789
827
  let s = o;
790
- for (let a = 0; a < 3 - n.length; a++) s += ".0";
828
+ for (let i = 0; i < 3 - n.length; i++) s += ".0";
791
829
  return s;
792
830
  }
793
831
  return o;
794
832
  };
795
- return !!ee(r(e), `<=${r(t)}`);
833
+ return !!re(r(e), `<=${r(t)}`);
796
834
  }
797
- const se = (e, t) => {
835
+ const ae = (e, t) => {
798
836
  const r = t || function(o, n) {
799
- return G(o, n);
837
+ return B(o, n);
800
838
  };
801
839
  return Object.keys(e).reduce((o, n) => !o || r(o, n) || o === "0" ? n : o, 0);
802
- }, Ee = (e) => !!e.loaded || typeof e.lib == "function", so = (e) => !!e.loading, io = (e, t) => {
840
+ }, Re = (e) => !!e.loaded || typeof e.lib == "function", go = (e) => !!e.loading, Ro = (e, t) => {
803
841
  if (!e || !t) return !1;
804
842
  const { usedExports: r } = e;
805
843
  return r ? !!t.every((o) => r.includes(o)) : !1;
806
844
  };
807
- function ao(e, t, r, o) {
845
+ function _o(e, t, r, o) {
808
846
  const n = e[t][r];
809
- let s = "", a = ne(o);
810
- const c = function(i, l) {
811
- return a ? n[i].treeShaking ? n[l].treeShaking ? !Ee(n[i].treeShaking) && G(i, l) : !1 : !0 : !Ee(n[i]) && G(i, l);
847
+ let s = "", i = ie(o);
848
+ const c = function(a, l) {
849
+ return i ? n[a].treeShaking ? n[l].treeShaking ? !Re(n[a].treeShaking) && B(a, l) : !1 : !0 : !Re(n[a]) && B(a, l);
812
850
  };
813
- if (a) {
814
- if (s = se(e[t][r], c), s) return {
851
+ if (i) {
852
+ if (s = ae(e[t][r], c), s) return {
815
853
  version: s,
816
- useTreesShaking: a
854
+ useTreesShaking: i
817
855
  };
818
- a = !1;
856
+ i = !1;
819
857
  }
820
858
  return {
821
- version: se(e[t][r], c),
822
- useTreesShaking: a
859
+ version: ae(e[t][r], c),
860
+ useTreesShaking: i
823
861
  };
824
862
  }
825
- const W = (e) => Ee(e) || so(e);
826
- function co(e, t, r, o) {
863
+ const q = (e) => Re(e) || go(e);
864
+ function So(e, t, r, o) {
827
865
  const n = e[t][r];
828
- let s = "", a = ne(o);
829
- const c = function(i, l) {
830
- if (a) {
831
- if (!n[i].treeShaking) return !0;
866
+ let s = "", i = ie(o);
867
+ const c = function(a, l) {
868
+ if (i) {
869
+ if (!n[a].treeShaking) return !0;
832
870
  if (!n[l].treeShaking) return !1;
833
- if (W(n[l].treeShaking)) return W(n[i].treeShaking) ? !!G(i, l) : !0;
834
- if (W(n[i].treeShaking)) return !1;
871
+ if (q(n[l].treeShaking)) return q(n[a].treeShaking) ? !!B(a, l) : !0;
872
+ if (q(n[a].treeShaking)) return !1;
835
873
  }
836
- return W(n[l]) ? W(n[i]) ? !!G(i, l) : !0 : W(n[i]) ? !1 : G(i, l);
874
+ return q(n[l]) ? q(n[a]) ? !!B(a, l) : !0 : q(n[a]) ? !1 : B(a, l);
837
875
  };
838
- if (a) {
839
- if (s = se(e[t][r], c), s) return {
876
+ if (i) {
877
+ if (s = ae(e[t][r], c), s) return {
840
878
  version: s,
841
- useTreesShaking: a
879
+ useTreesShaking: i
842
880
  };
843
- a = !1;
881
+ i = !1;
844
882
  }
845
883
  return {
846
- version: se(e[t][r], c),
847
- useTreesShaking: a
884
+ version: ae(e[t][r], c),
885
+ useTreesShaking: i
848
886
  };
849
887
  }
850
- function lo(e) {
851
- return e === "loaded-first" ? co : ao;
888
+ function bo(e) {
889
+ return e === "loaded-first" ? So : _o;
852
890
  }
853
- function ye(e, t, r, o) {
891
+ function ge(e, t, r, o) {
854
892
  if (!e) return;
855
- const { shareConfig: n, scope: s = ie, strategy: a, treeShaking: c } = r, i = Array.isArray(s) ? s : [s];
856
- for (const l of i) if (n && e[l] && e[l][t]) {
857
- const { requiredVersion: u } = n, { version: f, useTreesShaking: m } = lo(a)(e, l, t, c), h = () => {
858
- const p = e[l][t][f];
893
+ const { shareConfig: n, scope: s = ce, strategy: i, treeShaking: c } = r, a = Array.isArray(s) ? s : [s];
894
+ for (const l of a) if (n && e[l] && e[l][t]) {
895
+ const { requiredVersion: u } = n, { version: h, useTreesShaking: m } = bo(i)(e, l, t, c), f = () => {
896
+ const p = e[l][t][h];
859
897
  if (n.singleton) {
860
- if (typeof u == "string" && !ee(f, u)) {
861
- const E = `Version ${f} from ${f && p.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;
862
- n.strictVersion ? w(E) : re(E);
898
+ if (typeof u == "string" && !re(h, u)) {
899
+ const E = `Version ${h} from ${h && p.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;
900
+ n.strictVersion ? w(E) : ne(E);
863
901
  }
864
902
  return {
865
903
  shared: p,
@@ -870,21 +908,21 @@ function ye(e, t, r, o) {
870
908
  shared: p,
871
909
  useTreesShaking: m
872
910
  };
873
- if (ee(f, u)) return {
911
+ if (re(h, u)) return {
874
912
  shared: p,
875
913
  useTreesShaking: m
876
914
  };
877
- const E = ne(c);
915
+ const E = ie(c);
878
916
  if (E) {
879
- for (const [y, _] of Object.entries(e[l][t]))
880
- if (ne(_.treeShaking, c == null ? void 0 : c.usedExports) && ee(y, u))
917
+ for (const [y, R] of Object.entries(e[l][t]))
918
+ if (ie(R.treeShaking, c == null ? void 0 : c.usedExports) && re(y, u))
881
919
  return {
882
- shared: _,
920
+ shared: R,
883
921
  useTreesShaking: E
884
922
  };
885
923
  }
886
- for (const [y, _] of Object.entries(e[l][t])) if (ee(y, u)) return {
887
- shared: _,
924
+ for (const [y, R] of Object.entries(e[l][t])) if (re(y, u)) return {
925
+ shared: R,
888
926
  useTreesShaking: !1
889
927
  };
890
928
  }
@@ -892,48 +930,48 @@ function ye(e, t, r, o) {
892
930
  shareScopeMap: e,
893
931
  scope: l,
894
932
  pkgName: t,
895
- version: f,
896
- GlobalFederation: ge.__FEDERATION__,
933
+ version: h,
934
+ GlobalFederation: _e.__FEDERATION__,
897
935
  shareInfo: r,
898
- resolver: h
936
+ resolver: f
899
937
  };
900
938
  return (o.emit(d) || d).resolver();
901
939
  }
902
940
  }
903
- function St() {
904
- return ge.__FEDERATION__.__SHARE__;
941
+ function Nt() {
942
+ return _e.__FEDERATION__.__SHARE__;
905
943
  }
906
- function Xe(e) {
907
- const { pkgName: t, extraOptions: r, shareInfos: o } = e, n = (i) => {
908
- if (!i) return;
944
+ function Ye(e) {
945
+ const { pkgName: t, extraOptions: r, shareInfos: o } = e, n = (a) => {
946
+ if (!a) return;
909
947
  const l = {};
910
- return i.forEach((f) => {
911
- l[f.version] = f;
912
- }), l[se(l, function(f, m) {
913
- return !Ee(l[f]) && G(f, m);
948
+ return a.forEach((h) => {
949
+ l[h.version] = h;
950
+ }), l[ae(l, function(h, m) {
951
+ return !Re(l[h]) && B(h, m);
914
952
  })];
915
- }, s = (r == null ? void 0 : r.resolver) ?? n, a = (i) => i !== null && typeof i == "object" && !Array.isArray(i), c = (...i) => {
953
+ }, s = (r == null ? void 0 : r.resolver) ?? n, i = (a) => a !== null && typeof a == "object" && !Array.isArray(a), c = (...a) => {
916
954
  const l = {};
917
- for (const u of i)
955
+ for (const u of a)
918
956
  if (u)
919
- for (const [f, m] of Object.entries(u)) {
920
- const h = l[f];
921
- a(h) && a(m) ? l[f] = c(h, m) : m !== void 0 && (l[f] = m);
957
+ for (const [h, m] of Object.entries(u)) {
958
+ const f = l[h];
959
+ i(f) && i(m) ? l[h] = c(f, m) : m !== void 0 && (l[h] = m);
922
960
  }
923
961
  return l;
924
962
  };
925
963
  return c(s(o[t]), r == null ? void 0 : r.customShareInfo);
926
964
  }
927
- const j = (e, t) => {
928
- e.useIn || (e.useIn = []), Sr(e.useIn, t);
965
+ const z = (e, t) => {
966
+ e.useIn || (e.useIn = []), Lr(e.useIn, t);
929
967
  };
930
- function le(e, t) {
968
+ function he(e, t) {
931
969
  return t && e.treeShaking ? e.treeShaking : e;
932
970
  }
933
- function xe(e, t) {
971
+ function Ge(e, t) {
934
972
  return !t || t === "." ? e : `${e}/${t.replace(/^\.\//, "")}`;
935
973
  }
936
- function Ye(e, t) {
974
+ function Qe(e, t) {
937
975
  for (const r of e) {
938
976
  const o = t.startsWith(r.name);
939
977
  let n = t.replace(r.name, "");
@@ -952,16 +990,16 @@ function Ye(e, t) {
952
990
  };
953
991
  }
954
992
  const s = r.alias && t.startsWith(r.alias);
955
- let a = r.alias && t.replace(r.alias, "");
993
+ let i = r.alias && t.replace(r.alias, "");
956
994
  if (r.alias && s) {
957
- if (a && a.startsWith("/")) {
995
+ if (i && i.startsWith("/")) {
958
996
  const c = r.alias;
959
- return a = `.${a}`, {
997
+ return i = `.${i}`, {
960
998
  pkgNameOrAlias: c,
961
- expose: a,
999
+ expose: i,
962
1000
  remote: r
963
1001
  };
964
- } else if (a === "") return {
1002
+ } else if (i === "") return {
965
1003
  pkgNameOrAlias: r.alias,
966
1004
  expose: ".",
967
1005
  remote: r
@@ -969,35 +1007,35 @@ function Ye(e, t) {
969
1007
  }
970
1008
  }
971
1009
  }
972
- function uo(e, t) {
1010
+ function wo(e, t) {
973
1011
  for (const r of e)
974
1012
  if (t === r.name || r.alias && t === r.alias) return r;
975
1013
  }
976
- const wt = "RUNTIME-001", $t = "RUNTIME-002", It = "RUNTIME-003", vt = "RUNTIME-004", Tt = "RUNTIME-005", Le = "RUNTIME-006", Nt = "RUNTIME-007", Ge = "RUNTIME-008", fo = "RUNTIME-009", At = "RUNTIME-010", kt = "RUNTIME-011", ho = "RUNTIME-012", Pt = "RUNTIME-013", Lt = "RUNTIME-014", Mt = "RUNTIME-015", k = {
977
- [wt]: "Failed to get remoteEntry exports.",
978
- [$t]: 'The remote entry interface does not contain "init"',
979
- [It]: "Failed to get manifest.",
980
- [vt]: "Failed to locate remote.",
981
- [Tt]: "Invalid loadShareSync function call from bundler runtime",
982
- [Le]: "Invalid loadShareSync function call from runtime",
983
- [Nt]: "Failed to get remote snapshot.",
984
- [Ge]: "Failed to load script resources.",
985
- [fo]: "Please call createInstance first.",
986
- [At]: 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',
987
- [kt]: "The remoteEntry URL is missing from the remote snapshot.",
988
- [ho]: 'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.',
989
- [Pt]: "The manifest is not a valid Module Federation manifest.",
990
- [Lt]: "The remote does not expose the requested module.",
991
- [Mt]: "Remote container initialization failed."
1014
+ const At = "RUNTIME-001", Mt = "RUNTIME-002", Pt = "RUNTIME-003", kt = "RUNTIME-004", Ot = "RUNTIME-005", Oe = "RUNTIME-006", Lt = "RUNTIME-007", Ue = "RUNTIME-008", Io = "RUNTIME-009", Ct = "RUNTIME-010", Ft = "RUNTIME-011", $o = "RUNTIME-012", Ht = "RUNTIME-013", Dt = "RUNTIME-014", xt = "RUNTIME-015", M = {
1015
+ [At]: "Failed to get remoteEntry exports.",
1016
+ [Mt]: 'The remote entry interface does not contain "init"',
1017
+ [Pt]: "Failed to get manifest.",
1018
+ [kt]: "Failed to locate remote.",
1019
+ [Ot]: "Invalid loadShareSync function call from bundler runtime",
1020
+ [Oe]: "Invalid loadShareSync function call from runtime",
1021
+ [Lt]: "Failed to get remote snapshot.",
1022
+ [Ue]: "Failed to load script resources.",
1023
+ [Io]: "Please call createInstance first.",
1024
+ [Ct]: 'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',
1025
+ [Ft]: "The remoteEntry URL is missing from the remote snapshot.",
1026
+ [$o]: 'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.',
1027
+ [Ht]: "The manifest is not a valid Module Federation manifest.",
1028
+ [Dt]: "The remote does not expose the requested module.",
1029
+ [xt]: "Remote container initialization failed."
992
1030
  };
993
1031
  ({
994
- ...k
1032
+ ...M
995
1033
  });
996
- const Ot = ".then(callbacks[0]).catch(callbacks[1])";
997
- async function mo({ entry: e, remoteEntryExports: t }) {
1034
+ const Gt = ".then(callbacks[0]).catch(callbacks[1])";
1035
+ async function To({ entry: e, remoteEntryExports: t }) {
998
1036
  return new Promise((r, o) => {
999
1037
  try {
1000
- t ? r(t) : typeof FEDERATION_ALLOW_NEW_FUNCTION < "u" ? new Function("callbacks", `import("${e}")${Ot}`)([r, o]) : import(
1038
+ t ? r(t) : typeof FEDERATION_ALLOW_NEW_FUNCTION < "u" ? new Function("callbacks", `import("${e}")${Gt}`)([r, o]) : import(
1001
1039
  /* webpackIgnore: true */
1002
1040
  /* @vite-ignore */
1003
1041
  e
@@ -1007,68 +1045,68 @@ async function mo({ entry: e, remoteEntryExports: t }) {
1007
1045
  }
1008
1046
  });
1009
1047
  }
1010
- async function po({ entry: e, remoteEntryExports: t }) {
1048
+ async function vo({ entry: e, remoteEntryExports: t }) {
1011
1049
  return new Promise((r, o) => {
1012
1050
  try {
1013
- t ? r(t) : typeof __system_context__ > "u" ? System.import(e).then(r).catch(o) : new Function("callbacks", `System.import("${e}")${Ot}`)([r, o]);
1051
+ t ? r(t) : typeof __system_context__ > "u" ? System.import(e).then(r).catch(o) : new Function("callbacks", `System.import("${e}")${Gt}`)([r, o]);
1014
1052
  } catch (n) {
1015
1053
  w(`Failed to load SystemJS entry from "${e}". ${n instanceof Error ? n.message : String(n)}`);
1016
1054
  }
1017
1055
  });
1018
1056
  }
1019
- function Ct(e, t, r) {
1020
- const { remoteEntryKey: o, entryExports: n } = Fe(e, t);
1021
- return n || w(wt, k, {
1057
+ function Ut(e, t, r) {
1058
+ const { remoteEntryKey: o, entryExports: n } = He(e, t);
1059
+ return n || w(At, M, {
1022
1060
  remoteName: e,
1023
1061
  remoteEntryUrl: r,
1024
1062
  remoteEntryKey: o
1025
1063
  }), n;
1026
1064
  }
1027
- async function yo({ name: e, globalName: t, entry: r, remoteInfo: o, loaderHook: n, getEntryUrl: s, resourceContext: a }) {
1028
- const { entryExports: c } = Fe(e, t);
1065
+ async function No({ name: e, globalName: t, entry: r, remoteInfo: o, loaderHook: n, getEntryUrl: s, resourceContext: i }) {
1066
+ const { entryExports: c } = He(e, t);
1029
1067
  if (c) return c;
1030
- const i = s ? s(r) : r;
1031
- return yr(i, {
1068
+ const a = s ? s(r) : r;
1069
+ return Sr(a, {
1032
1070
  attrs: {},
1033
1071
  createScriptHook: (l, u) => {
1034
- const f = n.lifecycle.createScript.emit({
1072
+ const h = n.lifecycle.createScript.emit({
1035
1073
  url: l,
1036
1074
  attrs: u,
1037
1075
  remoteInfo: o,
1038
- resourceContext: a ? {
1039
- ...a,
1076
+ resourceContext: i ? {
1077
+ ...i,
1040
1078
  url: l
1041
1079
  } : void 0
1042
1080
  });
1043
- if (f && (f instanceof HTMLScriptElement || "script" in f || "timeout" in f))
1044
- return f;
1081
+ if (h && (h instanceof HTMLScriptElement || "script" in h || "timeout" in h))
1082
+ return h;
1045
1083
  }
1046
- }).then(() => Ct(e, t, r), (l) => {
1084
+ }).then(() => Ut(e, t, r), (l) => {
1047
1085
  const u = l instanceof Error ? l.message : String(l);
1048
- w(Ge, k, {
1086
+ w(Ue, M, {
1049
1087
  remoteName: e,
1050
- resourceUrl: i
1088
+ resourceUrl: a
1051
1089
  }, u);
1052
1090
  });
1053
1091
  }
1054
- async function Eo({ remoteInfo: e, remoteEntryExports: t, loaderHook: r, getEntryUrl: o, resourceContext: n }) {
1055
- const { entry: s, entryGlobalName: a, name: c, type: i } = e;
1056
- switch (i) {
1092
+ async function Ao({ remoteInfo: e, remoteEntryExports: t, loaderHook: r, getEntryUrl: o, resourceContext: n }) {
1093
+ const { entry: s, entryGlobalName: i, name: c, type: a } = e;
1094
+ switch (a) {
1057
1095
  case "esm":
1058
1096
  case "module":
1059
- return mo({
1097
+ return To({
1060
1098
  entry: s,
1061
1099
  remoteEntryExports: t
1062
1100
  });
1063
1101
  case "system":
1064
- return po({
1102
+ return vo({
1065
1103
  entry: s,
1066
1104
  remoteEntryExports: t
1067
1105
  });
1068
1106
  default:
1069
- return yo({
1107
+ return No({
1070
1108
  entry: s,
1071
- globalName: a,
1109
+ globalName: i,
1072
1110
  name: c,
1073
1111
  remoteInfo: e,
1074
1112
  loaderHook: r,
@@ -1077,52 +1115,52 @@ async function Eo({ remoteInfo: e, remoteEntryExports: t, loaderHook: r, getEntr
1077
1115
  });
1078
1116
  }
1079
1117
  }
1080
- async function go({ remoteInfo: e, loaderHook: t, resourceContext: r }) {
1081
- const { entry: o, entryGlobalName: n, name: s, type: a } = e, { entryExports: c } = Fe(s, n);
1082
- return c || _r(o, {
1118
+ async function Mo({ remoteInfo: e, loaderHook: t, resourceContext: r }) {
1119
+ const { entry: o, entryGlobalName: n, name: s, type: i } = e, { entryExports: c } = He(s, n);
1120
+ return c || Ir(o, {
1083
1121
  attrs: {
1084
1122
  name: s,
1085
1123
  globalName: n,
1086
- type: a
1124
+ type: i
1087
1125
  },
1088
- loaderHook: { createScriptHook: (i, l = {}) => {
1126
+ loaderHook: { createScriptHook: (a, l = {}) => {
1089
1127
  const u = t.lifecycle.createScript.emit({
1090
- url: i,
1128
+ url: a,
1091
1129
  attrs: l,
1092
1130
  remoteInfo: e,
1093
1131
  resourceContext: r ? {
1094
1132
  ...r,
1095
- url: i
1133
+ url: a
1096
1134
  } : void 0
1097
1135
  });
1098
1136
  if (u && "url" in u)
1099
1137
  return u;
1100
1138
  } }
1101
- }).then(() => Ct(s, n, o)).catch((i) => {
1102
- w(`Failed to load Node.js entry for remote "${s}" from "${o}". ${i instanceof Error ? i.message : String(i)}`);
1139
+ }).then(() => Ut(s, n, o)).catch((a) => {
1140
+ w(`Failed to load Node.js entry for remote "${s}" from "${o}". ${a instanceof Error ? a.message : String(a)}`);
1103
1141
  });
1104
1142
  }
1105
- function Me(e) {
1143
+ function Le(e) {
1106
1144
  const { entry: t, name: r } = e;
1107
- return tt(r, t);
1145
+ return st(r, t);
1108
1146
  }
1109
- async function Ue(e) {
1110
- const { origin: t, remoteEntryExports: r, remoteInfo: o, getEntryUrl: n, resourceContext: s, _inErrorHandling: a = !1 } = e, c = Me(o);
1147
+ async function Be(e) {
1148
+ const { origin: t, remoteEntryExports: r, remoteInfo: o, getEntryUrl: n, resourceContext: s, _inErrorHandling: i = !1 } = e, c = Le(o);
1111
1149
  if (r) return r;
1112
- if (!K[c]) {
1113
- const i = t.remoteHandler.hooks.lifecycle.loadEntry, l = t.loaderHook;
1114
- K[c] = i.emit({
1150
+ if (!J[c]) {
1151
+ const a = t.remoteHandler.hooks.lifecycle.loadEntry, l = t.loaderHook;
1152
+ J[c] = a.emit({
1115
1153
  origin: t,
1116
1154
  loaderHook: l,
1117
1155
  remoteInfo: o,
1118
1156
  remoteEntryExports: r
1119
- }).then((u) => u || ((typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : D) ? Eo({
1157
+ }).then((u) => u || ((typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : G) ? Ao({
1120
1158
  remoteInfo: o,
1121
1159
  remoteEntryExports: r,
1122
1160
  loaderHook: l,
1123
1161
  getEntryUrl: n,
1124
1162
  resourceContext: s
1125
- }) : go({
1163
+ }) : Mo({
1126
1164
  remoteInfo: o,
1127
1165
  loaderHook: l,
1128
1166
  resourceContext: s
@@ -1131,18 +1169,18 @@ async function Ue(e) {
1131
1169
  remoteInfo: o,
1132
1170
  remoteEntryExports: u
1133
1171
  }), u)).catch(async (u) => {
1134
- const f = Me(o), m = u instanceof Error && u.message.includes("ScriptExecutionError");
1135
- if (u instanceof Error && u.message.includes(Ge) && !m && !a) {
1136
- const h = (p) => Ue({
1172
+ const h = Le(o), m = u instanceof Error && u.message.includes("ScriptExecutionError");
1173
+ if (u instanceof Error && u.message.includes(Ue) && !m && !i) {
1174
+ const f = (p) => Be({
1137
1175
  ...p,
1138
1176
  _inErrorHandling: !0
1139
1177
  }), d = await t.loaderHook.lifecycle.loadEntryError.emit({
1140
- getRemoteEntry: h,
1178
+ getRemoteEntry: f,
1141
1179
  origin: t,
1142
1180
  remoteInfo: o,
1143
1181
  remoteEntryExports: r,
1144
- globalLoading: K,
1145
- uniqueKey: f
1182
+ globalLoading: J,
1183
+ uniqueKey: h
1146
1184
  });
1147
1185
  if (d)
1148
1186
  return await t.loaderHook.lifecycle.afterLoadEntry.emit({
@@ -1159,22 +1197,22 @@ async function Ue(e) {
1159
1197
  }), u;
1160
1198
  });
1161
1199
  }
1162
- return K[c];
1200
+ return J[c];
1163
1201
  }
1164
- function z(e) {
1202
+ function K(e) {
1165
1203
  return {
1166
1204
  ...e,
1167
1205
  entry: "entry" in e ? e.entry : "",
1168
- type: e.type || Rt,
1206
+ type: e.type || Tt,
1169
1207
  entryGlobalName: e.entryGlobalName || e.name,
1170
- shareScope: e.shareScope || ie
1208
+ shareScope: e.shareScope || ce
1171
1209
  };
1172
1210
  }
1173
- function _o() {
1211
+ function Po() {
1174
1212
  return typeof FEDERATION_BUILD_IDENTIFIER < "u" ? FEDERATION_BUILD_IDENTIFIER : "";
1175
1213
  }
1176
- function Ro(e, t) {
1177
- const r = Ar(), o = [
1214
+ function ko(e, t) {
1215
+ const r = Ur(), o = [
1178
1216
  t.hooks,
1179
1217
  t.remoteHandler.hooks,
1180
1218
  t.sharedHandler.hooks,
@@ -1190,7 +1228,7 @@ function Ro(e, t) {
1190
1228
  });
1191
1229
  }), e;
1192
1230
  }
1193
- function bo(e) {
1231
+ function Oo(e) {
1194
1232
  return {
1195
1233
  name: e.name,
1196
1234
  alias: e.alias,
@@ -1202,11 +1240,11 @@ function bo(e) {
1202
1240
  };
1203
1241
  }
1204
1242
  function F(e) {
1205
- var r, o, n, s, a, c;
1243
+ var r, o, n, s, i, c;
1206
1244
  const t = {};
1207
- for (const [i, l] of Object.entries(e.shared)) {
1245
+ for (const [a, l] of Object.entries(e.shared)) {
1208
1246
  const u = l[0];
1209
- u && (t[i] = {
1247
+ u && (t[a] = {
1210
1248
  version: u.version,
1211
1249
  singleton: (r = u.shareConfig) == null ? void 0 : r.singleton,
1212
1250
  requiredVersion: ((o = u.shareConfig) == null ? void 0 : o.requiredVersion) === !1 ? !1 : (n = u.shareConfig) == null ? void 0 : n.requiredVersion,
@@ -1217,16 +1255,16 @@ function F(e) {
1217
1255
  return {
1218
1256
  project: {
1219
1257
  name: e.name,
1220
- mfRole: ((a = e.remotes) == null ? void 0 : a.length) > 0 ? "host" : "unknown"
1258
+ mfRole: ((i = e.remotes) == null ? void 0 : i.length) > 0 ? "host" : "unknown"
1221
1259
  },
1222
1260
  mfConfig: {
1223
1261
  name: e.name,
1224
- remotes: ((c = e.remotes) == null ? void 0 : c.map(bo)) ?? [],
1262
+ remotes: ((c = e.remotes) == null ? void 0 : c.map(Oo)) ?? [],
1225
1263
  shared: t
1226
1264
  }
1227
1265
  };
1228
1266
  }
1229
- function Ft(e) {
1267
+ function Bt(e) {
1230
1268
  return {
1231
1269
  resourceCategory: "sync",
1232
1270
  share: !0,
@@ -1234,25 +1272,25 @@ function Ft(e) {
1234
1272
  ...e
1235
1273
  };
1236
1274
  }
1237
- function So(e, t) {
1275
+ function Lo(e, t) {
1238
1276
  return t.map((r) => {
1239
- const o = uo(e, r.nameOrAlias);
1240
- return O(o, `Unable to preload ${r.nameOrAlias} as it is not included in ${!o && ot({
1277
+ const o = wo(e, r.nameOrAlias);
1278
+ return L(o, `Unable to preload ${r.nameOrAlias} as it is not included in ${!o && at({
1241
1279
  remoteInfo: o,
1242
1280
  remotes: e
1243
1281
  })}`), {
1244
1282
  remote: o,
1245
- preloadConfig: Ft(r)
1283
+ preloadConfig: Bt(r)
1246
1284
  };
1247
1285
  });
1248
1286
  }
1249
- function wo(e) {
1287
+ function Co(e) {
1250
1288
  return e ? e.map((t) => t === "." ? t : t.startsWith("./") ? t.replace("./", "") : t) : [];
1251
1289
  }
1252
- function Be(e) {
1290
+ function je(e) {
1253
1291
  return e instanceof Error ? e.message.includes("timed out") || e.name.includes("Timeout") : !1;
1254
1292
  }
1255
- function U(e, t, r, o) {
1293
+ function j(e, t, r, o) {
1256
1294
  return {
1257
1295
  url: t,
1258
1296
  status: r,
@@ -1262,11 +1300,11 @@ function U(e, t, r, o) {
1262
1300
  error: o
1263
1301
  };
1264
1302
  }
1265
- async function $o(e, t, r, o) {
1303
+ async function Fo(e, t, r, o) {
1266
1304
  const n = e.moduleCache.get(r.name), s = r.entry;
1267
- if (n != null && n.remoteEntryExports) return U(o, s, "cached");
1305
+ if (n != null && n.remoteEntryExports) return j(o, s, "cached");
1268
1306
  try {
1269
- if (!await Ue({
1307
+ if (!await Be({
1270
1308
  origin: e,
1271
1309
  remoteInfo: r,
1272
1310
  remoteEntryExports: n == null ? void 0 : n.remoteEntryExports,
@@ -1275,24 +1313,24 @@ async function $o(e, t, r, o) {
1275
1313
  url: s
1276
1314
  }
1277
1315
  })) throw new Error(`Failed to load remoteEntry "${s}".`);
1278
- return U(o, s, "success");
1279
- } catch (a) {
1280
- return U(o, s, Be(a) ? "timeout" : "error", a);
1316
+ return j(o, s, "success");
1317
+ } catch (i) {
1318
+ return j(o, s, je(i) ? "timeout" : "error", i);
1281
1319
  }
1282
1320
  }
1283
1321
  function $e({ host: e, remoteInfo: t, url: r, attrs: o, context: n, needDeleteLink: s }) {
1284
- return new Promise((a) => {
1285
- const { link: c, needAttach: i } = pr({
1322
+ return new Promise((i) => {
1323
+ const { link: c, needAttach: a } = _r({
1286
1324
  url: r,
1287
1325
  cb: () => {
1288
- a(U(n, r, i ? "success" : "cached"));
1326
+ i(j(n, r, a ? "success" : "cached"));
1289
1327
  },
1290
1328
  onErrorCallback: (l) => {
1291
- a(U(n, r, Be(l) ? "timeout" : "error", l));
1329
+ i(j(n, r, je(l) ? "timeout" : "error", l));
1292
1330
  },
1293
1331
  attrs: o,
1294
1332
  createLinkHook: (l, u) => {
1295
- const f = e.loaderHook.lifecycle.createLink.emit({
1333
+ const h = e.loaderHook.lifecycle.createLink.emit({
1296
1334
  url: l,
1297
1335
  attrs: u,
1298
1336
  remoteInfo: t,
@@ -1301,68 +1339,68 @@ function $e({ host: e, remoteInfo: t, url: r, attrs: o, context: n, needDeleteLi
1301
1339
  url: l
1302
1340
  }
1303
1341
  });
1304
- return f instanceof HTMLLinkElement, f;
1342
+ return h instanceof HTMLLinkElement, h;
1305
1343
  },
1306
1344
  needDeleteLink: s
1307
1345
  });
1308
- i && document.head.appendChild(c);
1346
+ a && document.head.appendChild(c);
1309
1347
  });
1310
1348
  }
1311
- function Io({ host: e, remoteInfo: t, url: r, attrs: o, context: n }) {
1349
+ function Ho({ host: e, remoteInfo: t, url: r, attrs: o, context: n }) {
1312
1350
  return new Promise((s) => {
1313
- const { script: a, needAttach: c } = ct({
1351
+ const { script: i, needAttach: c } = ft({
1314
1352
  url: r,
1315
1353
  cb: () => {
1316
- s(U(n, r, c ? "success" : "cached"));
1354
+ s(j(n, r, c ? "success" : "cached"));
1317
1355
  },
1318
- onErrorCallback: (i) => {
1319
- s(U(n, r, Be(i) ? "timeout" : "error", i));
1356
+ onErrorCallback: (a) => {
1357
+ s(j(n, r, je(a) ? "timeout" : "error", a));
1320
1358
  },
1321
1359
  attrs: o,
1322
- createScriptHook: (i, l) => {
1360
+ createScriptHook: (a, l) => {
1323
1361
  const u = e.loaderHook.lifecycle.createScript.emit({
1324
- url: i,
1362
+ url: a,
1325
1363
  attrs: l,
1326
1364
  remoteInfo: t,
1327
1365
  resourceContext: {
1328
1366
  ...n,
1329
- url: i
1367
+ url: a
1330
1368
  }
1331
1369
  });
1332
1370
  return u instanceof HTMLScriptElement, u;
1333
1371
  },
1334
1372
  needDeleteScript: !0
1335
1373
  });
1336
- c && document.head.appendChild(a);
1374
+ c && document.head.appendChild(i);
1337
1375
  });
1338
1376
  }
1339
- function Q(e, t) {
1377
+ function ee(e, t) {
1340
1378
  return {
1341
1379
  ...e,
1342
1380
  resourceType: t
1343
1381
  };
1344
1382
  }
1345
- function Ht(e, t, r, o = !0, n = {
1383
+ function jt(e, t, r, o = !0, n = {
1346
1384
  initiator: "preloadRemote",
1347
1385
  id: e.name
1348
1386
  }) {
1349
- const { cssAssets: s, jsAssetsWithoutEntry: a, entryAssets: c } = r, i = [];
1387
+ const { cssAssets: s, jsAssetsWithoutEntry: i, entryAssets: c } = r, a = [];
1350
1388
  if (t.options.inBrowser) {
1351
1389
  if (c.forEach((l) => {
1352
1390
  const { moduleInfo: u } = l;
1353
- i.push($o(t, e, u, Q(n, "remoteEntry")));
1391
+ a.push(Fo(t, e, u, ee(n, "remoteEntry")));
1354
1392
  }), o) {
1355
1393
  const l = {
1356
1394
  rel: "preload",
1357
1395
  as: "style"
1358
1396
  };
1359
1397
  s.forEach((u) => {
1360
- i.push($e({
1398
+ a.push($e({
1361
1399
  host: t,
1362
1400
  remoteInfo: e,
1363
1401
  url: u,
1364
1402
  attrs: l,
1365
- context: Q(n, "css")
1403
+ context: ee(n, "css")
1366
1404
  }));
1367
1405
  });
1368
1406
  } else {
@@ -1371,13 +1409,13 @@ function Ht(e, t, r, o = !0, n = {
1371
1409
  type: "text/css"
1372
1410
  };
1373
1411
  s.forEach((u) => {
1374
- i.push($e({
1412
+ a.push($e({
1375
1413
  host: t,
1376
1414
  remoteInfo: e,
1377
1415
  url: u,
1378
1416
  attrs: l,
1379
1417
  needDeleteLink: !1,
1380
- context: Q(n, "css")
1418
+ context: ee(n, "css")
1381
1419
  }));
1382
1420
  });
1383
1421
  }
@@ -1386,13 +1424,13 @@ function Ht(e, t, r, o = !0, n = {
1386
1424
  rel: "preload",
1387
1425
  as: "script"
1388
1426
  };
1389
- a.forEach((u) => {
1390
- i.push($e({
1427
+ i.forEach((u) => {
1428
+ a.push($e({
1391
1429
  host: t,
1392
1430
  remoteInfo: e,
1393
1431
  url: u,
1394
1432
  attrs: l,
1395
- context: Q(n, "js")
1433
+ context: ee(n, "js")
1396
1434
  }));
1397
1435
  });
1398
1436
  } else {
@@ -1400,28 +1438,28 @@ function Ht(e, t, r, o = !0, n = {
1400
1438
  fetchpriority: "high",
1401
1439
  type: (e == null ? void 0 : e.type) === "module" ? "module" : "text/javascript"
1402
1440
  };
1403
- a.forEach((u) => {
1404
- i.push(Io({
1441
+ i.forEach((u) => {
1442
+ a.push(Ho({
1405
1443
  host: t,
1406
1444
  remoteInfo: e,
1407
1445
  url: u,
1408
1446
  attrs: l,
1409
- context: Q(n, "js")
1447
+ context: ee(n, "js")
1410
1448
  }));
1411
1449
  });
1412
1450
  }
1413
1451
  }
1414
- return Promise.all(i);
1452
+ return Promise.all(a);
1415
1453
  }
1416
- function vo(e) {
1454
+ function Do(e) {
1417
1455
  if (!e || !("modules" in e) || !Array.isArray(e.modules)) return;
1418
1456
  const t = e.modules.map((r) => r.moduleName).filter(Boolean);
1419
1457
  return t.length ? t.join(",") : void 0;
1420
1458
  }
1421
- function To(e, t, r) {
1459
+ function xo(e, t, r) {
1422
1460
  const o = t, n = Array.isArray(e.shareScope) ? e.shareScope : [e.shareScope];
1423
- n.length || n.push("default"), n.forEach((a) => {
1424
- o[a] || (o[a] = {});
1461
+ n.length || n.push("default"), n.forEach((i) => {
1462
+ o[i] || (o[i] = {});
1425
1463
  });
1426
1464
  const s = {
1427
1465
  version: e.version || "",
@@ -1436,24 +1474,24 @@ function To(e, t, r) {
1436
1474
  initScope: r ?? []
1437
1475
  };
1438
1476
  }
1439
- var Dt = class {
1477
+ var et = class {
1440
1478
  constructor({ remoteInfo: e, host: t }) {
1441
1479
  this.inited = !1, this.initing = !1, this.lib = void 0, this.remoteInfo = e, this.host = t;
1442
1480
  }
1443
1481
  async getEntry(e) {
1444
1482
  if (this.remoteEntryExports) return this.remoteEntryExports;
1445
- const t = await Ue({
1483
+ const t = await Be({
1446
1484
  origin: this.host,
1447
1485
  remoteInfo: this.remoteInfo,
1448
1486
  remoteEntryExports: this.remoteEntryExports,
1449
1487
  resourceContext: {
1450
1488
  initiator: "loadRemote",
1451
- id: xe(this.remoteInfo.name, e),
1489
+ id: Ge(this.remoteInfo.name, e),
1452
1490
  resourceType: "remoteEntry"
1453
1491
  }
1454
1492
  });
1455
- return O(t, `remoteEntryExports is undefined
1456
- ${ot(this.remoteInfo)}`), this.remoteEntryExports = t, this.remoteEntryExports;
1493
+ return L(t, `remoteEntryExports is undefined
1494
+ ${at(this.remoteInfo)}`), this.remoteEntryExports = t, this.remoteEntryExports;
1457
1495
  }
1458
1496
  async init(e, t, r, o) {
1459
1497
  const n = await this.getEntry(o);
@@ -1496,23 +1534,23 @@ var Dt = class {
1496
1534
  remoteSnapshot: t,
1497
1535
  origin: this.host
1498
1536
  });
1499
- const { remoteEntryInitOptions: s, shareScope: a, initScope: c } = To(this.remoteInfo, this.host.shareScopeMap, r), i = await this.host.hooks.lifecycle.beforeInitContainer.emit({
1500
- shareScope: a,
1537
+ const { remoteEntryInitOptions: s, shareScope: i, initScope: c } = xo(this.remoteInfo, this.host.shareScopeMap, r), a = await this.host.hooks.lifecycle.beforeInitContainer.emit({
1538
+ shareScope: i,
1501
1539
  remoteEntryInitOptions: s,
1502
1540
  initScope: c,
1503
1541
  remoteInfo: this.remoteInfo,
1504
1542
  origin: this.host
1505
1543
  });
1506
- typeof (n == null ? void 0 : n.init) > "u" && w($t, k, {
1544
+ typeof (n == null ? void 0 : n.init) > "u" && w(Mt, M, {
1507
1545
  hostName: this.host.name,
1508
1546
  remoteName: this.remoteInfo.name,
1509
1547
  remoteEntryUrl: this.remoteInfo.entry,
1510
1548
  remoteEntryKey: this.remoteInfo.entryGlobalName
1511
1549
  }, void 0, F(this.host.options));
1512
1550
  try {
1513
- await n.init(i.shareScope, i.initScope, i.remoteEntryInitOptions);
1551
+ await n.init(a.shareScope, a.initScope, a.remoteEntryInitOptions);
1514
1552
  } catch (l) {
1515
- w(Mt, k, {
1553
+ w(xt, M, {
1516
1554
  hostName: this.host.name,
1517
1555
  remoteName: this.remoteInfo.name,
1518
1556
  remoteEntryUrl: this.remoteInfo.entry,
@@ -1521,7 +1559,7 @@ var Dt = class {
1521
1559
  }, `${l}`, F(this.host.options));
1522
1560
  }
1523
1561
  await this.host.hooks.lifecycle.initContainer.emit({
1524
- ...i,
1562
+ ...a,
1525
1563
  id: e,
1526
1564
  remoteSnapshot: t,
1527
1565
  remoteEntryExports: n
@@ -1558,26 +1596,26 @@ var Dt = class {
1558
1596
  remoteEntryExports: s,
1559
1597
  origin: this.host
1560
1598
  });
1561
- let a;
1599
+ let i;
1562
1600
  try {
1563
1601
  const l = await this.host.loaderHook.lifecycle.getModuleFactory.emit({
1564
1602
  remoteEntryExports: s,
1565
1603
  expose: t,
1566
1604
  moduleInfo: this.remoteInfo
1567
1605
  });
1568
- a = typeof l == "function" ? l : void 0, a || (a = await s.get(t)), a || w(Lt, k, {
1606
+ i = typeof l == "function" ? l : void 0, i || (i = await s.get(t)), i || w(Dt, M, {
1569
1607
  hostName: this.host.name,
1570
1608
  remoteName: this.remoteInfo.name,
1571
1609
  remoteEntryUrl: this.remoteInfo.entry,
1572
1610
  expose: t,
1573
1611
  requestId: e,
1574
- availableExposes: vo(o)
1612
+ availableExposes: Do(o)
1575
1613
  }, void 0, F(this.host.options)), await this.host.loaderHook.lifecycle.afterGetExpose.emit({
1576
1614
  id: e,
1577
1615
  expose: t,
1578
1616
  moduleInfo: this.remoteInfo,
1579
1617
  remoteEntryExports: s,
1580
- moduleFactory: a,
1618
+ moduleFactory: i,
1581
1619
  origin: this.host
1582
1620
  });
1583
1621
  } catch (l) {
@@ -1590,8 +1628,8 @@ var Dt = class {
1590
1628
  origin: this.host
1591
1629
  }), l;
1592
1630
  }
1593
- const c = Ir(this.remoteInfo.name, t), i = this.wraperFactory(a, c);
1594
- if (!n) return i;
1631
+ const c = Hr(this.remoteInfo.name, t), a = this.wraperFactory(i, c);
1632
+ if (!n) return a;
1595
1633
  await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({
1596
1634
  id: e,
1597
1635
  expose: t,
@@ -1600,7 +1638,7 @@ var Dt = class {
1600
1638
  origin: this.host
1601
1639
  });
1602
1640
  try {
1603
- const l = await i();
1641
+ const l = await a();
1604
1642
  return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({
1605
1643
  id: e,
1606
1644
  expose: t,
@@ -1632,6 +1670,26 @@ var Dt = class {
1632
1670
  return o instanceof Promise ? o.then((n) => (r(n, t), n)) : (r(o, t), o);
1633
1671
  };
1634
1672
  }
1673
+ }, H = class {
1674
+ constructor(e) {
1675
+ this.registerPlugins = {}, this.lifecycle = e, this.lifecycleKeys = Object.keys(e);
1676
+ }
1677
+ applyPlugin(e, t) {
1678
+ var o;
1679
+ L(Fr(e), "Plugin configuration is invalid.");
1680
+ const r = e.name;
1681
+ L(r, "A name must be provided by the plugin."), this.registerPlugins[r] || (this.registerPlugins[r] = e, (o = e.apply) == null || o.call(e, t), Object.keys(this.lifecycle).forEach((n) => {
1682
+ const s = e[n];
1683
+ s && this.lifecycle[n].on(s);
1684
+ }));
1685
+ }
1686
+ removePlugin(e) {
1687
+ L(e, "A name is required.");
1688
+ const t = this.registerPlugins[e];
1689
+ L(t, `The plugin "${e}" is not registered.`), Object.keys(t).forEach((r) => {
1690
+ r !== "name" && this.lifecycle[r].remove(t[r]);
1691
+ });
1692
+ }
1635
1693
  }, A = class {
1636
1694
  constructor(e) {
1637
1695
  this.type = "", this.listeners = /* @__PURE__ */ new Set(), e && (this.type = e);
@@ -1658,61 +1716,61 @@ var Dt = class {
1658
1716
  removeAll() {
1659
1717
  this.listeners.clear();
1660
1718
  }
1661
- }, v = class extends A {
1719
+ }, T = class extends A {
1662
1720
  emit(...e) {
1663
1721
  let t;
1664
1722
  const r = Array.from(this.listeners);
1665
1723
  if (r.length > 0) {
1666
1724
  let o = 0;
1667
- const n = (s) => s === !1 ? !1 : o < r.length ? Promise.resolve(r[o++].apply(null, e)).then((a) => a === void 0 || e.length === 1 && a === e[0] ? n(s) : n(a)) : s;
1725
+ const n = (s) => s === !1 ? !1 : o < r.length ? Promise.resolve(r[o++].apply(null, e)).then((i) => i === void 0 || e.length === 1 && i === e[0] ? n(s) : n(i)) : s;
1668
1726
  t = n();
1669
1727
  }
1670
1728
  return Promise.resolve(t);
1671
1729
  }
1672
1730
  };
1673
- function xt(e, t) {
1674
- if (!Ce(t)) return !1;
1731
+ function Wt(e, t) {
1732
+ if (!Fe(t)) return !1;
1675
1733
  if (e !== t) {
1676
1734
  for (const r in e) if (!(r in t)) return !1;
1677
1735
  }
1678
1736
  return !0;
1679
1737
  }
1680
- var J = class extends A {
1738
+ var X = class extends A {
1681
1739
  constructor(e) {
1682
1740
  super(), this.onerror = w, this.type = e;
1683
1741
  }
1684
1742
  emit(e) {
1685
- Ce(e) || w(`The data for the "${this.type}" hook should be an object.`);
1743
+ Fe(e) || w(`The data for the "${this.type}" hook should be an object.`);
1686
1744
  for (const t of this.listeners) try {
1687
1745
  const r = t(e);
1688
1746
  if (r === void 0) continue;
1689
- if (xt(e, r)) e = r;
1747
+ if (Wt(e, r)) e = r;
1690
1748
  else {
1691
1749
  this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);
1692
1750
  break;
1693
1751
  }
1694
1752
  } catch (r) {
1695
- re(r), this.onerror(r);
1753
+ ne(r), this.onerror(r);
1696
1754
  }
1697
1755
  return e;
1698
1756
  }
1699
- }, H = class extends A {
1757
+ }, D = class extends A {
1700
1758
  constructor(e) {
1701
1759
  super(), this.onerror = w, this.type = e;
1702
1760
  }
1703
1761
  emit(e) {
1704
- Ce(e) || w(`The response data for the "${this.type}" hook must be an object.`);
1762
+ Fe(e) || w(`The response data for the "${this.type}" hook must be an object.`);
1705
1763
  const t = Array.from(this.listeners);
1706
1764
  if (t.length > 0) {
1707
1765
  let r = 0;
1708
- const o = (s) => (re(s), this.onerror(s), e), n = (s) => {
1709
- if (s !== void 0 && xt(e, s)) e = s;
1766
+ const o = (s) => (ne(s), this.onerror(s), e), n = (s) => {
1767
+ if (s !== void 0 && Wt(e, s)) e = s;
1710
1768
  else if (s !== void 0)
1711
1769
  return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`), e;
1712
1770
  if (r < t.length) try {
1713
1771
  return Promise.resolve(t[r++](e)).then(n, o);
1714
- } catch (a) {
1715
- return o(a);
1772
+ } catch (i) {
1773
+ return o(i);
1716
1774
  }
1717
1775
  return e;
1718
1776
  };
@@ -1720,44 +1778,48 @@ var J = class extends A {
1720
1778
  }
1721
1779
  return Promise.resolve(e);
1722
1780
  }
1723
- }, X = class {
1724
- constructor(e) {
1725
- this.registerPlugins = {}, this.lifecycle = e, this.lifecycleKeys = Object.keys(e);
1781
+ };
1782
+ const te = "Remote loading is disabled by experiments.optimization.disableRemote.";
1783
+ var Go = class {
1784
+ constructor() {
1785
+ this.hooks = new H({});
1726
1786
  }
1727
- applyPlugin(e, t) {
1728
- var o;
1729
- O($r(e), "Plugin configuration is invalid.");
1730
- const r = e.name;
1731
- O(r, "A name must be provided by the plugin."), this.registerPlugins[r] || (this.registerPlugins[r] = e, (o = e.apply) == null || o.call(e, t), Object.keys(this.lifecycle).forEach((n) => {
1732
- const s = e[n];
1733
- s && this.lifecycle[n].on(s);
1734
- }));
1787
+ formatAndRegisterRemote() {
1788
+ return [];
1735
1789
  }
1736
- removePlugin(e) {
1737
- O(e, "A name is required.");
1738
- const t = this.registerPlugins[e];
1739
- O(t, `The plugin "${e}" is not registered.`), Object.keys(t).forEach((r) => {
1740
- r !== "name" && this.lifecycle[r].remove(t[r]);
1741
- });
1790
+ loadRemote() {
1791
+ throw new Error(te);
1792
+ }
1793
+ preloadRemote() {
1794
+ throw new Error(te);
1795
+ }
1796
+ registerRemotes() {
1797
+ throw new Error(te);
1798
+ }
1799
+ getRemoteModuleAndOptions() {
1800
+ throw new Error(te);
1801
+ }
1802
+ initRawContainer() {
1803
+ throw new Error(te);
1742
1804
  }
1743
1805
  };
1744
- function Gt(e, t) {
1745
- const r = dt(t);
1746
- r.url || w(kt, k, { remoteName: e.name });
1747
- let o = Ne(t, r.url);
1748
- !D && !o.startsWith("http") && (o = `https:${o}`), e.type = r.type, e.entryGlobalName = r.globalName, e.entry = o, e.version = t.version, e.buildVersion = t.buildVersion;
1806
+ function Vt(e, t) {
1807
+ const r = Rt(t);
1808
+ r.url || w(Ft, M, { remoteName: e.name });
1809
+ let o = Me(t, r.url);
1810
+ !G && !o.startsWith("http") && (o = `https:${o}`), e.type = r.type, e.entryGlobalName = r.globalName, e.entry = o, e.version = t.version, e.buildVersion = t.buildVersion;
1749
1811
  }
1750
- function No() {
1812
+ function Uo() {
1751
1813
  return {
1752
1814
  name: "snapshot-plugin",
1753
1815
  async afterResolve(e) {
1754
- const { remote: t, pkgNameOrAlias: r, expose: o, origin: n, remoteInfo: s, id: a } = e;
1755
- if (!Oe(t) || !ft(t)) {
1756
- const { remoteSnapshot: c, globalSnapshot: i } = await n.snapshotHandler.loadRemoteSnapshotInfo({
1816
+ const { remote: t, pkgNameOrAlias: r, expose: o, origin: n, remoteInfo: s, id: i } = e;
1817
+ if (!Ce(t) || !Et(t)) {
1818
+ const { remoteSnapshot: c, globalSnapshot: a } = await n.snapshotHandler.loadRemoteSnapshotInfo({
1757
1819
  moduleInfo: t,
1758
- id: xe(t.name, o)
1820
+ id: Ge(t.name, o)
1759
1821
  });
1760
- Gt(s, c);
1822
+ Vt(s, c);
1761
1823
  const l = {
1762
1824
  remote: t,
1763
1825
  preloadConfig: {
@@ -1773,11 +1835,11 @@ function No() {
1773
1835
  remoteInfo: s,
1774
1836
  remote: t,
1775
1837
  remoteSnapshot: c,
1776
- globalSnapshot: i
1838
+ globalSnapshot: a
1777
1839
  });
1778
- return u && Ht(s, n, u, !1, {
1840
+ return u && jt(s, n, u, !1, {
1779
1841
  initiator: "loadRemote",
1780
- id: a
1842
+ id: i
1781
1843
  }).catch(() => {
1782
1844
  }), {
1783
1845
  ...e,
@@ -1788,7 +1850,7 @@ function No() {
1788
1850
  }
1789
1851
  };
1790
1852
  }
1791
- function Ao(e) {
1853
+ function Bo(e) {
1792
1854
  const t = e.split(":");
1793
1855
  return t.length === 1 ? {
1794
1856
  name: t[0],
@@ -1801,100 +1863,100 @@ function Ao(e) {
1801
1863
  version: t[2]
1802
1864
  };
1803
1865
  }
1804
- function Ut(e, t, r, o, n = {}, s) {
1805
- const { value: a } = B(e, oe(t)), c = s || a;
1806
- if (c && !nt(c) && (r(c, t, o), c.remotesInfo)) {
1807
- const i = Object.keys(c.remotesInfo);
1808
- for (const l of i) {
1866
+ function qt(e, t, r, o, n = {}, s) {
1867
+ const { value: i } = W(e, se(t)), c = s || i;
1868
+ if (c && !ct(c) && (r(c, t, o), c.remotesInfo)) {
1869
+ const a = Object.keys(c.remotesInfo);
1870
+ for (const l of a) {
1809
1871
  if (n[l]) continue;
1810
1872
  n[l] = !0;
1811
- const u = Ao(l), f = c.remotesInfo[l];
1812
- Ut(e, {
1873
+ const u = Bo(l), h = c.remotesInfo[l];
1874
+ qt(e, {
1813
1875
  name: u.name,
1814
- version: f.matchedVersion
1876
+ version: h.matchedVersion
1815
1877
  }, r, !1, n, void 0);
1816
1878
  }
1817
1879
  }
1818
1880
  }
1819
- const Ie = (e, t) => document.querySelector(`${e}[${e === "link" ? "href" : "src"}="${t}"]`);
1820
- function ko(e, t, r, o, n) {
1821
- const s = [], a = [], c = [], i = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), { options: u } = e, { preloadConfig: f } = t, { depsRemote: m } = f;
1822
- if (Ut(o, r, (d, p, E) => {
1823
- var $;
1881
+ const Te = (e, t) => document.querySelector(`${e}[${e === "link" ? "href" : "src"}="${t}"]`);
1882
+ function jo(e, t, r, o, n) {
1883
+ const s = [], i = [], c = [], a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), { options: u } = e, { preloadConfig: h } = t, { depsRemote: m } = h;
1884
+ if (qt(o, r, (d, p, E) => {
1885
+ var I;
1824
1886
  let y;
1825
- if (E) y = f;
1887
+ if (E) y = h;
1826
1888
  else if (Array.isArray(m)) {
1827
- const S = m.find((I) => I.nameOrAlias === p.name || I.nameOrAlias === p.alias);
1828
- if (!S) return;
1829
- y = Ft(S);
1830
- } else if (m === !0) y = f;
1889
+ const b = m.find(($) => $.nameOrAlias === p.name || $.nameOrAlias === p.alias);
1890
+ if (!b) return;
1891
+ y = Bt(b);
1892
+ } else if (m === !0) y = h;
1831
1893
  else return;
1832
- const _ = Ne(d, dt(d).url);
1833
- _ && c.push({
1894
+ const R = Me(d, Rt(d).url);
1895
+ R && c.push({
1834
1896
  name: p.name,
1835
1897
  moduleInfo: {
1836
1898
  name: p.name,
1837
- entry: _,
1899
+ entry: R,
1838
1900
  type: "remoteEntryType" in d ? d.remoteEntryType : "global",
1839
1901
  entryGlobalName: "globalName" in d ? d.globalName : p.name,
1840
1902
  shareScope: "",
1841
1903
  version: "version" in d ? d.version : void 0
1842
1904
  },
1843
- url: _
1905
+ url: R
1844
1906
  });
1845
1907
  let g = "modules" in d ? d.modules : [];
1846
- const R = wo(y.exposes);
1847
- R.length && "modules" in d && (g = ($ = d == null ? void 0 : d.modules) == null ? void 0 : $.reduce((S, I) => ((R == null ? void 0 : R.indexOf(I.moduleName)) !== -1 && S.push(I), S), []));
1848
- function b(S) {
1849
- const I = S.map((P) => Ne(d, P));
1850
- return y.filter ? I.filter(y.filter) : I;
1908
+ const _ = Co(y.exposes);
1909
+ _.length && "modules" in d && (g = (I = d == null ? void 0 : d.modules) == null ? void 0 : I.reduce((b, $) => ((_ == null ? void 0 : _.indexOf($.moduleName)) !== -1 && b.push($), b), []));
1910
+ function S(b) {
1911
+ const $ = b.map((P) => Me(d, P));
1912
+ return y.filter ? $.filter(y.filter) : $;
1851
1913
  }
1852
1914
  if (g) {
1853
- const S = g.length;
1854
- for (let I = 0; I < S; I++) {
1855
- const P = g[I], _e = `${p.name}/${P.moduleName}`;
1915
+ const b = g.length;
1916
+ for (let $ = 0; $ < b; $++) {
1917
+ const P = g[$], Se = `${p.name}/${P.moduleName}`;
1856
1918
  e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({
1857
- id: P.moduleName === "." ? p.name : _e,
1919
+ id: P.moduleName === "." ? p.name : Se,
1858
1920
  name: p.name,
1859
1921
  remoteSnapshot: d,
1860
1922
  preloadConfig: y,
1861
1923
  remote: p,
1862
1924
  origin: e
1863
- }), !kr(_e) && (y.resourceCategory === "all" ? (s.push(...b(P.assets.css.async)), s.push(...b(P.assets.css.sync)), a.push(...b(P.assets.js.async)), a.push(...b(P.assets.js.sync))) : y.resourceCategory === "sync" && (s.push(...b(P.assets.css.sync)), a.push(...b(P.assets.js.sync))), Pr(_e));
1925
+ }), !Br(Se) && (y.resourceCategory === "all" ? (s.push(...S(P.assets.css.async)), s.push(...S(P.assets.css.sync)), i.push(...S(P.assets.js.async)), i.push(...S(P.assets.js.sync))) : y.resourceCategory === "sync" && (s.push(...S(P.assets.css.sync)), i.push(...S(P.assets.js.sync))), jr(Se));
1864
1926
  }
1865
1927
  }
1866
1928
  }, !0, {}, n), n.shared && n.shared.length > 0) {
1867
1929
  const d = (p, E) => {
1868
- const { shared: y } = ye(e.shareScopeMap, E.sharedName, p, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
1869
- y && typeof y.lib == "function" && (E.assets.js.sync.forEach((_) => {
1870
- i.add(_);
1871
- }), E.assets.css.sync.forEach((_) => {
1872
- l.add(_);
1930
+ const { shared: y } = ge(e.shareScopeMap, E.sharedName, p, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
1931
+ y && typeof y.lib == "function" && (E.assets.js.sync.forEach((R) => {
1932
+ a.add(R);
1933
+ }), E.assets.css.sync.forEach((R) => {
1934
+ l.add(R);
1873
1935
  }));
1874
1936
  };
1875
1937
  n.shared.forEach((p) => {
1876
- var _;
1877
- const E = (_ = u.shared) == null ? void 0 : _[p.sharedName];
1938
+ var R;
1939
+ const E = (R = u.shared) == null ? void 0 : R[p.sharedName];
1878
1940
  if (!E) return;
1879
1941
  const y = p.version ? E.find((g) => g.version === p.version) : E;
1880
- y && ht(y).forEach((g) => {
1942
+ y && gt(y).forEach((g) => {
1881
1943
  d(g, p);
1882
1944
  });
1883
1945
  });
1884
1946
  }
1885
- const h = a.filter((d) => !i.has(d) && !Ie("script", d));
1947
+ const f = i.filter((d) => !a.has(d) && !Te("script", d));
1886
1948
  return {
1887
- cssAssets: s.filter((d) => !l.has(d) && !Ie("link", d)),
1888
- jsAssetsWithoutEntry: h,
1889
- entryAssets: c.filter((d) => !Ie("script", d.url))
1949
+ cssAssets: s.filter((d) => !l.has(d) && !Te("link", d)),
1950
+ jsAssetsWithoutEntry: f,
1951
+ entryAssets: c.filter((d) => !Te("script", d.url))
1890
1952
  };
1891
1953
  }
1892
- const Po = function() {
1954
+ const Wo = function() {
1893
1955
  return {
1894
1956
  name: "generate-preload-assets-plugin",
1895
1957
  async generatePreloadAssets(e) {
1896
- const { origin: t, preloadOptions: r, remoteInfo: o, remote: n, globalSnapshot: s, remoteSnapshot: a } = e;
1897
- return D ? Oe(n) && ft(n) ? {
1958
+ const { origin: t, preloadOptions: r, remoteInfo: o, remote: n, globalSnapshot: s, remoteSnapshot: i } = e;
1959
+ return G ? Ce(n) && Et(n) ? {
1898
1960
  cssAssets: [],
1899
1961
  jsAssetsWithoutEntry: [],
1900
1962
  entryAssets: [{
@@ -1908,7 +1970,7 @@ const Po = function() {
1908
1970
  shareScope: ""
1909
1971
  }
1910
1972
  }]
1911
- } : (Gt(o, a), ko(t, r, o, s, a)) : {
1973
+ } : (Vt(o, i), jo(t, r, o, s, i)) : {
1912
1974
  cssAssets: [],
1913
1975
  jsAssetsWithoutEntry: [],
1914
1976
  entryAssets: []
@@ -1916,35 +1978,35 @@ const Po = function() {
1916
1978
  }
1917
1979
  };
1918
1980
  };
1919
- function Bt(e, t) {
1920
- const r = de({
1981
+ function zt(e, t) {
1982
+ const r = pe({
1921
1983
  name: t.name,
1922
1984
  version: t.options.version
1923
- }), o = r && "remotesInfo" in r && r.remotesInfo && B(r.remotesInfo, e.name).value;
1985
+ }), o = r && "remotesInfo" in r && r.remotesInfo && W(r.remotesInfo, e.name).value;
1924
1986
  return o && o.matchedVersion ? {
1925
1987
  hostGlobalSnapshot: r,
1926
1988
  globalSnapshot: Ve(),
1927
- remoteSnapshot: de({
1989
+ remoteSnapshot: pe({
1928
1990
  name: e.name,
1929
1991
  version: o.matchedVersion
1930
1992
  })
1931
1993
  } : {
1932
1994
  hostGlobalSnapshot: void 0,
1933
1995
  globalSnapshot: Ve(),
1934
- remoteSnapshot: de({
1996
+ remoteSnapshot: pe({
1935
1997
  name: e.name,
1936
1998
  version: "version" in e ? e.version : void 0
1937
1999
  })
1938
2000
  };
1939
2001
  }
1940
- var Lo = class {
2002
+ var Vo = class {
1941
2003
  constructor(e) {
1942
- this.loadingHostSnapshot = null, this.manifestCache = /* @__PURE__ */ new Map(), this.hooks = new X({
1943
- beforeLoadRemoteSnapshot: new v("beforeLoadRemoteSnapshot"),
1944
- loadSnapshot: new H("loadGlobalSnapshot"),
1945
- loadRemoteSnapshot: new H("loadRemoteSnapshot"),
1946
- afterLoadSnapshot: new H("afterLoadSnapshot")
1947
- }), this.manifestLoading = ge.__FEDERATION__.__MANIFEST_LOADING__, this.HostInstance = e, this.loaderHook = e.loaderHook;
2004
+ this.loadingHostSnapshot = null, this.manifestCache = /* @__PURE__ */ new Map(), this.hooks = new H({
2005
+ beforeLoadRemoteSnapshot: new T("beforeLoadRemoteSnapshot"),
2006
+ loadSnapshot: new D("loadGlobalSnapshot"),
2007
+ loadRemoteSnapshot: new D("loadRemoteSnapshot"),
2008
+ afterLoadSnapshot: new D("afterLoadSnapshot")
2009
+ }), this.manifestLoading = _e.__FEDERATION__.__MANIFEST_LOADING__, this.HostInstance = e, this.loaderHook = e.loaderHook;
1948
2010
  }
1949
2011
  async loadRemoteSnapshotInfo({ moduleInfo: e, id: t, initiator: r = "loadRemote" }) {
1950
2012
  const { options: o } = this.HostInstance;
@@ -1953,7 +2015,7 @@ var Lo = class {
1953
2015
  moduleInfo: e,
1954
2016
  origin: this.HostInstance
1955
2017
  });
1956
- let n = de({
2018
+ let n = pe({
1957
2019
  name: this.HostInstance.options.name,
1958
2020
  version: this.HostInstance.options.version
1959
2021
  });
@@ -1961,43 +2023,43 @@ var Lo = class {
1961
2023
  version: this.HostInstance.options.version || "",
1962
2024
  remoteEntry: "",
1963
2025
  remotesInfo: {}
1964
- }, Nr({ [this.HostInstance.options.name]: n })), n && "remotesInfo" in n && !B(n.remotesInfo, e.name).value && ("version" in e || "entry" in e) && (n.remotesInfo = {
2026
+ }, Gr({ [this.HostInstance.options.name]: n })), n && "remotesInfo" in n && !W(n.remotesInfo, e.name).value && ("version" in e || "entry" in e) && (n.remotesInfo = {
1965
2027
  ...n == null ? void 0 : n.remotesInfo,
1966
2028
  [e.name]: { matchedVersion: "version" in e ? e.version : e.entry }
1967
2029
  });
1968
- const { hostGlobalSnapshot: s, remoteSnapshot: a, globalSnapshot: c } = this.getGlobalRemoteInfo(e), { remoteSnapshot: i, globalSnapshot: l } = await this.hooks.lifecycle.loadSnapshot.emit({
2030
+ const { hostGlobalSnapshot: s, remoteSnapshot: i, globalSnapshot: c } = this.getGlobalRemoteInfo(e), { remoteSnapshot: a, globalSnapshot: l } = await this.hooks.lifecycle.loadSnapshot.emit({
1969
2031
  options: o,
1970
2032
  moduleInfo: e,
1971
2033
  hostGlobalSnapshot: s,
1972
- remoteSnapshot: a,
2034
+ remoteSnapshot: i,
1973
2035
  globalSnapshot: c
1974
2036
  });
1975
- let u, f;
1976
- if (i) if (nt(i)) {
1977
- const m = D ? i.remoteEntry : i.ssrRemoteEntry || i.remoteEntry || "", h = await this.loadManifestSnapshot(m, e, {}, {
2037
+ let u, h;
2038
+ if (a) if (ct(a)) {
2039
+ const m = G ? a.remoteEntry : a.ssrRemoteEntry || a.remoteEntry || "", f = await this.loadManifestSnapshot(m, e, {}, {
1978
2040
  initiator: r,
1979
2041
  id: t || e.name
1980
- }), d = We({
2042
+ }), d = qe({
1981
2043
  ...e,
1982
2044
  entry: m
1983
- }, h);
1984
- u = h, f = d;
2045
+ }, f);
2046
+ u = f, h = d;
1985
2047
  } else {
1986
2048
  const { remoteSnapshot: m } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1987
2049
  options: this.HostInstance.options,
1988
2050
  moduleInfo: e,
1989
- remoteSnapshot: i,
2051
+ remoteSnapshot: a,
1990
2052
  from: "global"
1991
2053
  });
1992
- u = m, f = l;
2054
+ u = m, h = l;
1993
2055
  }
1994
- else if (Oe(e)) {
2056
+ else if (Ce(e)) {
1995
2057
  const m = await this.loadManifestSnapshot(e.entry, e, {}, {
1996
2058
  initiator: r,
1997
2059
  id: t || e.name
1998
- }), h = We(e, m);
1999
- u = m, f = h;
2000
- } else w(Nt, k, {
2060
+ }), f = qe(e, m);
2061
+ u = m, h = f;
2062
+ } else w(Lt, M, {
2001
2063
  remoteName: e.name,
2002
2064
  remoteVersion: e.version,
2003
2065
  hostName: this.HostInstance.options.name,
@@ -2011,42 +2073,42 @@ var Lo = class {
2011
2073
  remoteSnapshot: u
2012
2074
  }), {
2013
2075
  remoteSnapshot: u,
2014
- globalSnapshot: f
2076
+ globalSnapshot: h
2015
2077
  };
2016
2078
  }
2017
2079
  getGlobalRemoteInfo(e) {
2018
- return Bt(e, this.HostInstance);
2080
+ return zt(e, this.HostInstance);
2019
2081
  }
2020
2082
  async getManifestJson(e, t, r, o) {
2021
2083
  return (async () => {
2022
- const s = z(t);
2023
- let a = this.manifestCache.get(e);
2024
- if (a) return a;
2084
+ const s = K(t);
2085
+ let i = this.manifestCache.get(e);
2086
+ if (i) return i;
2025
2087
  try {
2026
- let i = await this.loaderHook.lifecycle.fetch.emit(e, {}, s, o ? {
2088
+ let a = await this.loaderHook.lifecycle.fetch.emit(e, {}, s, o ? {
2027
2089
  ...o,
2028
2090
  url: e,
2029
2091
  resourceType: "manifest"
2030
2092
  } : void 0);
2031
- (!i || !(i instanceof Response)) && (i = await fetch(e, {})), a = await i.json();
2032
- } catch (i) {
2033
- a = await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
2093
+ (!a || !(a instanceof Response)) && (a = await fetch(e, {})), i = await a.json();
2094
+ } catch (a) {
2095
+ i = await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
2034
2096
  id: e,
2035
- error: i,
2097
+ error: a,
2036
2098
  from: "runtime",
2037
2099
  lifecycle: "afterResolve",
2038
2100
  remote: s,
2039
2101
  origin: this.HostInstance
2040
- }), a || (delete this.manifestLoading[e], w(It, k, {
2102
+ }), i || (delete this.manifestLoading[e], w(Pt, M, {
2041
2103
  manifestUrl: e,
2042
2104
  moduleName: t.name,
2043
2105
  hostName: this.HostInstance.options.name
2044
- }, `${i}`, F(this.HostInstance.options)));
2106
+ }, `${a}`, F(this.HostInstance.options)));
2045
2107
  }
2046
2108
  const c = [
2047
- !a.metaData && "metaData",
2048
- !a.exposes && "exposes",
2049
- !a.shared && "shared"
2109
+ !i.metaData && "metaData",
2110
+ !i.exposes && "exposes",
2111
+ !i.shared && "shared"
2050
2112
  ].filter(Boolean);
2051
2113
  return c.length > 0 && await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
2052
2114
  id: e,
@@ -2055,21 +2117,21 @@ var Lo = class {
2055
2117
  lifecycle: "afterResolve",
2056
2118
  remote: s,
2057
2119
  origin: this.HostInstance
2058
- }), c.length > 0 && w(Pt, k, {
2120
+ }), c.length > 0 && w(Ht, M, {
2059
2121
  manifestUrl: e,
2060
2122
  moduleName: t.name,
2061
2123
  hostName: this.HostInstance.options.name,
2062
2124
  missingFields: c.join(",")
2063
- }, void 0, F(this.HostInstance.options)), this.manifestCache.set(e, a), a;
2125
+ }, void 0, F(this.HostInstance.options)), this.manifestCache.set(e, i), i;
2064
2126
  })();
2065
2127
  }
2066
2128
  async loadManifestSnapshot(e, t, r, o) {
2067
2129
  const n = async () => {
2068
- const s = await this.getManifestJson(e, t, r, o), a = ur(s, { version: e }), { remoteSnapshot: c } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
2130
+ const s = await this.getManifestJson(e, t, r, o), i = pr(s, { version: e }), { remoteSnapshot: c } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
2069
2131
  options: this.HostInstance.options,
2070
2132
  moduleInfo: t,
2071
2133
  manifestJson: s,
2072
- remoteSnapshot: a,
2134
+ remoteSnapshot: i,
2073
2135
  manifestUrl: e,
2074
2136
  from: "manifest"
2075
2137
  });
@@ -2077,17 +2139,21 @@ var Lo = class {
2077
2139
  };
2078
2140
  return this.manifestLoading[e] || (this.manifestLoading[e] = n().then((s) => s)), this.manifestLoading[e];
2079
2141
  }
2080
- }, Mo = class {
2142
+ }, qo = class {
2143
+ constructor() {
2144
+ this.hooks = new H({});
2145
+ }
2146
+ }, zo = class {
2081
2147
  constructor(e) {
2082
- this.hooks = new X({
2083
- beforeRegisterShare: new J("beforeRegisterShare"),
2084
- afterResolve: new H("afterResolve"),
2085
- beforeLoadShare: new H("beforeLoadShare"),
2086
- loadShare: new v(),
2148
+ this.hooks = new H({
2149
+ beforeRegisterShare: new X("beforeRegisterShare"),
2150
+ afterResolve: new D("afterResolve"),
2151
+ beforeLoadShare: new D("beforeLoadShare"),
2152
+ loadShare: new T(),
2087
2153
  afterLoadShare: new A("afterLoadShare"),
2088
2154
  errorLoadShare: new A("errorLoadShare"),
2089
- resolveShare: new J("resolveShare"),
2090
- initContainerShareScopeMap: new J("initContainerShareScopeMap")
2155
+ resolveShare: new X("resolveShare"),
2156
+ initContainerShareScopeMap: new X("initContainerShareScopeMap")
2091
2157
  }), this.host = e, this.shareScopeMap = {}, this.initTokens = {}, this._setGlobalShareScopeMap(e.options);
2092
2158
  }
2093
2159
  emitAfterLoadShare({ lifecycle: e, pkgName: t, shareInfo: r, selectedShared: o }) {
@@ -2102,7 +2168,7 @@ var Lo = class {
2102
2168
  origin: this.host
2103
2169
  });
2104
2170
  } catch (n) {
2105
- re(n);
2171
+ ne(n);
2106
2172
  }
2107
2173
  }
2108
2174
  emitErrorLoadShare({ lifecycle: e, pkgName: t, shareInfo: r, error: o, recovered: n }) {
@@ -2118,20 +2184,20 @@ var Lo = class {
2118
2184
  recovered: n
2119
2185
  });
2120
2186
  } catch (s) {
2121
- re(s);
2187
+ ne(s);
2122
2188
  }
2123
2189
  }
2124
2190
  registerShared(e, t) {
2125
- const { newShareInfos: r, allShareInfos: o } = bt(e, t);
2191
+ const { newShareInfos: r, allShareInfos: o } = vt(e, t);
2126
2192
  return Object.keys(r).forEach((n) => {
2127
2193
  r[n].forEach((s) => {
2128
- s.scope.forEach((a) => {
2194
+ s.scope.forEach((i) => {
2129
2195
  var c;
2130
2196
  this.hooks.lifecycle.beforeRegisterShare.emit({
2131
2197
  origin: this.host,
2132
2198
  pkgName: n,
2133
2199
  shared: s
2134
- }), (c = this.shareScopeMap[a]) != null && c[n] || this.setShared({
2200
+ }), (c = this.shareScopeMap[i]) != null && c[n] || this.setShared({
2135
2201
  pkgName: n,
2136
2202
  lib: s.lib,
2137
2203
  get: s.get,
@@ -2147,60 +2213,60 @@ var Lo = class {
2147
2213
  };
2148
2214
  }
2149
2215
  async loadShare(e, t) {
2150
- const { host: r } = this, o = Xe({
2216
+ const { host: r } = this, o = Ye({
2151
2217
  pkgName: e,
2152
2218
  extraOptions: t,
2153
2219
  shareInfos: r.options.shared
2154
2220
  });
2155
2221
  let n = o;
2156
2222
  try {
2157
- o != null && o.scope && await Promise.all(o.scope.map(async (i) => {
2158
- await Promise.all(this.initializeSharing(i, { strategy: o.strategy }));
2223
+ o != null && o.scope && await Promise.all(o.scope.map(async (a) => {
2224
+ await Promise.all(this.initializeSharing(a, { strategy: o.strategy }));
2159
2225
  })), n = (await this.hooks.lifecycle.beforeLoadShare.emit({
2160
2226
  pkgName: e,
2161
2227
  shareInfo: o,
2162
2228
  shared: r.options.shared,
2163
2229
  origin: r
2164
- })).shareInfo, O(n, `Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);
2165
- const s = n, { shared: a, useTreesShaking: c } = ye(this.shareScopeMap, e, n, this.hooks.lifecycle.resolveShare) || {};
2166
- if (a) {
2167
- const i = le(a, c);
2168
- if (i.lib)
2169
- return j(i, r.options.name), this.emitAfterLoadShare({
2230
+ })).shareInfo, L(n, `Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);
2231
+ const s = n, { shared: i, useTreesShaking: c } = ge(this.shareScopeMap, e, n, this.hooks.lifecycle.resolveShare) || {};
2232
+ if (i) {
2233
+ const a = he(i, c);
2234
+ if (a.lib)
2235
+ return z(a, r.options.name), this.emitAfterLoadShare({
2170
2236
  lifecycle: "loadShare",
2171
2237
  pkgName: e,
2172
2238
  shareInfo: s,
2173
- selectedShared: a
2174
- }), i.lib;
2175
- if (i.loading && !i.loaded) {
2176
- const l = await i.loading;
2177
- return i.loaded = !0, i.lib || (i.lib = l), j(i, r.options.name), this.emitAfterLoadShare({
2239
+ selectedShared: i
2240
+ }), a.lib;
2241
+ if (a.loading && !a.loaded) {
2242
+ const l = await a.loading;
2243
+ return a.loaded = !0, a.lib || (a.lib = l), z(a, r.options.name), this.emitAfterLoadShare({
2178
2244
  lifecycle: "loadShare",
2179
2245
  pkgName: e,
2180
2246
  shareInfo: s,
2181
- selectedShared: a
2247
+ selectedShared: i
2182
2248
  }), l;
2183
2249
  } else {
2184
2250
  const u = (async () => {
2185
- const m = await i.get();
2186
- return j(i, r.options.name), i.loaded = !0, i.lib = m, m;
2251
+ const m = await a.get();
2252
+ return z(a, r.options.name), a.loaded = !0, a.lib = m, m;
2187
2253
  })();
2188
2254
  this.setShared({
2189
2255
  pkgName: e,
2190
2256
  loaded: !1,
2191
- shared: a,
2257
+ shared: i,
2192
2258
  from: r.options.name,
2193
2259
  lib: null,
2194
2260
  loading: u,
2195
- treeShaking: c ? i : void 0
2261
+ treeShaking: c ? a : void 0
2196
2262
  });
2197
- const f = await u;
2263
+ const h = await u;
2198
2264
  return this.emitAfterLoadShare({
2199
2265
  lifecycle: "loadShare",
2200
2266
  pkgName: e,
2201
2267
  shareInfo: s,
2202
- selectedShared: a
2203
- }), f;
2268
+ selectedShared: i
2269
+ }), h;
2204
2270
  }
2205
2271
  } else {
2206
2272
  if (t != null && t.customShareInfo)
@@ -2210,15 +2276,15 @@ var Lo = class {
2210
2276
  shareInfo: s,
2211
2277
  recovered: !0
2212
2278
  }), !1;
2213
- const i = ne(s.treeShaking), l = le(s, i), f = (async () => {
2214
- const h = await l.get();
2215
- l.lib = h, l.loaded = !0, j(l, r.options.name);
2216
- const { shared: d, useTreesShaking: p } = ye(this.shareScopeMap, e, s, this.hooks.lifecycle.resolveShare) || {};
2279
+ const a = ie(s.treeShaking), l = he(s, a), h = (async () => {
2280
+ const f = await l.get();
2281
+ l.lib = f, l.loaded = !0, z(l, r.options.name);
2282
+ const { shared: d, useTreesShaking: p } = ge(this.shareScopeMap, e, s, this.hooks.lifecycle.resolveShare) || {};
2217
2283
  if (d) {
2218
- const E = le(d, p);
2219
- E.lib = h, E.loaded = !0, d.from = s.from;
2284
+ const E = he(d, p);
2285
+ E.lib = f, E.loaded = !0, d.from = s.from;
2220
2286
  }
2221
- return h;
2287
+ return f;
2222
2288
  })();
2223
2289
  this.setShared({
2224
2290
  pkgName: e,
@@ -2226,10 +2292,10 @@ var Lo = class {
2226
2292
  shared: s,
2227
2293
  from: r.options.name,
2228
2294
  lib: null,
2229
- loading: f,
2230
- treeShaking: i ? l : void 0
2295
+ loading: h,
2296
+ treeShaking: a ? l : void 0
2231
2297
  });
2232
- const m = await f;
2298
+ const m = await h;
2233
2299
  return this.emitAfterLoadShare({
2234
2300
  lifecycle: "loadShare",
2235
2301
  pkgName: e,
@@ -2251,53 +2317,53 @@ var Lo = class {
2251
2317
  * It accepts one argument, the name of the share scope.
2252
2318
  * If the share scope does not exist, it creates one.
2253
2319
  */
2254
- initializeSharing(e = ie, t) {
2320
+ initializeSharing(e = ce, t) {
2255
2321
  const { host: r } = this, o = t == null ? void 0 : t.from, n = t == null ? void 0 : t.strategy;
2256
2322
  let s = t == null ? void 0 : t.initScope;
2257
- const a = [];
2323
+ const i = [];
2258
2324
  if (o !== "build") {
2259
2325
  const { initTokens: m } = this;
2260
2326
  s || (s = []);
2261
- let h = m[e];
2262
- if (h || (h = m[e] = { from: this.host.name }), s.indexOf(h) >= 0) return a;
2263
- s.push(h);
2327
+ let f = m[e];
2328
+ if (f || (f = m[e] = { from: this.host.name }), s.indexOf(f) >= 0) return i;
2329
+ s.push(f);
2264
2330
  }
2265
- const c = this.shareScopeMap, i = r.options.name;
2331
+ const c = this.shareScopeMap, a = r.options.name;
2266
2332
  c[e] || (c[e] = {});
2267
- const l = c[e], u = (m, h) => {
2333
+ const l = c[e], u = (m, f) => {
2268
2334
  var g;
2269
- const { version: d, eager: p } = h;
2335
+ const { version: d, eager: p } = f;
2270
2336
  l[m] = l[m] || {};
2271
- const E = l[m], y = E[d] && le(E[d]), _ = !!(y && ("eager" in y && y.eager || "shareConfig" in y && ((g = y.shareConfig) != null && g.eager)));
2272
- (!y || y.strategy !== "loaded-first" && !y.loaded && (!p != !_ ? p : i > E[d].from)) && (E[d] = h);
2273
- }, f = async (m) => {
2274
- const { module: h } = await r.remoteHandler.getRemoteModuleAndOptions({ id: m });
2337
+ const E = l[m], y = E[d] && he(E[d]), R = !!(y && ("eager" in y && y.eager || "shareConfig" in y && ((g = y.shareConfig) != null && g.eager)));
2338
+ (!y || y.strategy !== "loaded-first" && !y.loaded && (!p != !R ? p : a > E[d].from)) && (E[d] = f);
2339
+ }, h = async (m) => {
2340
+ const { module: f } = await r.remoteHandler.getRemoteModuleAndOptions({ id: m });
2275
2341
  let d;
2276
2342
  try {
2277
- d = await h.getEntry();
2343
+ d = await f.getEntry();
2278
2344
  } catch (p) {
2279
2345
  if (d = await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
2280
2346
  id: m,
2281
2347
  error: p,
2282
2348
  from: "runtime",
2283
2349
  lifecycle: "beforeLoadShare",
2284
- remote: h.remoteInfo,
2350
+ remote: f.remoteInfo,
2285
2351
  origin: r
2286
2352
  }), !d) return;
2287
2353
  } finally {
2288
- d != null && d.init && !h.initing && (h.remoteEntryExports = d, await h.init(void 0, void 0, s));
2354
+ d != null && d.init && !f.initing && (f.remoteEntryExports = d, await f.init(void 0, void 0, s));
2289
2355
  }
2290
2356
  };
2291
2357
  return Object.keys(r.options.shared).forEach((m) => {
2292
- r.options.shared[m].forEach((h) => {
2293
- h.scope.includes(e) && u(m, h);
2358
+ r.options.shared[m].forEach((f) => {
2359
+ f.scope.includes(e) && u(m, f);
2294
2360
  });
2295
2361
  }), (r.options.shareStrategy === "version-first" || n === "version-first") && r.options.remotes.forEach((m) => {
2296
- m.shareScope === e && a.push(f(m.name));
2297
- }), a;
2362
+ m.shareScope === e && i.push(h(m.name));
2363
+ }), i;
2298
2364
  }
2299
2365
  loadShareSync(e, t) {
2300
- const { host: r } = this, o = Xe({
2366
+ const { host: r } = this, o = Ye({
2301
2367
  pkgName: e,
2302
2368
  extraOptions: t,
2303
2369
  shareInfos: r.options.shared
@@ -2306,10 +2372,10 @@ var Lo = class {
2306
2372
  o != null && o.scope && o.scope.forEach((s) => {
2307
2373
  this.initializeSharing(s, { strategy: o.strategy });
2308
2374
  });
2309
- const { shared: n } = ye(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
2375
+ const { shared: n } = ge(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
2310
2376
  if (n) {
2311
2377
  if (typeof n.lib == "function")
2312
- return j(n, r.options.name), n.loaded || (n.loaded = !0, n.from === r.options.name && (o.loaded = !0)), this.emitAfterLoadShare({
2378
+ return z(n, r.options.name), n.loaded || (n.loaded = !0, n.from === r.options.name && (o.loaded = !0)), this.emitAfterLoadShare({
2313
2379
  lifecycle: "loadShareSync",
2314
2380
  pkgName: e,
2315
2381
  shareInfo: o,
@@ -2318,7 +2384,7 @@ var Lo = class {
2318
2384
  if (typeof n.get == "function") {
2319
2385
  const s = n.get();
2320
2386
  if (!(s instanceof Promise))
2321
- return j(n, r.options.name), this.setShared({
2387
+ return z(n, r.options.name), this.setShared({
2322
2388
  pkgName: e,
2323
2389
  loaded: !0,
2324
2390
  from: r.options.name,
@@ -2341,7 +2407,7 @@ var Lo = class {
2341
2407
  }), o.lib;
2342
2408
  if (o.get) {
2343
2409
  const s = o.get();
2344
- return s instanceof Promise && w((t == null ? void 0 : t.from) === "build" ? Tt : Le, k, {
2410
+ return s instanceof Promise && w((t == null ? void 0 : t.from) === "build" ? Ot : Oe, M, {
2345
2411
  hostName: r.options.name,
2346
2412
  sharedPkgName: e
2347
2413
  }, void 0, F(r.options)), o.lib = s, this.setShared({
@@ -2357,7 +2423,7 @@ var Lo = class {
2357
2423
  selectedShared: o
2358
2424
  }), o.lib;
2359
2425
  }
2360
- w(Le, k, {
2426
+ w(Oe, M, {
2361
2427
  hostName: r.options.name,
2362
2428
  sharedPkgName: e
2363
2429
  }, void 0, F(r.options));
@@ -2380,43 +2446,65 @@ var Lo = class {
2380
2446
  hostShareScopeMap: r.hostShareScopeMap
2381
2447
  });
2382
2448
  }
2383
- setShared({ pkgName: e, shared: t, from: r, lib: o, loading: n, loaded: s, get: a, treeShaking: c }) {
2384
- const { version: i, scope: l = "default", ...u } = t, f = Array.isArray(l) ? l : [l], m = (h) => {
2385
- const d = (E, y, _) => {
2386
- _ && !E[y] && (E[y] = _);
2387
- }, p = c ? h.treeShaking : h;
2388
- d(p, "loaded", s), d(p, "loading", n), d(p, "get", a);
2449
+ setShared({ pkgName: e, shared: t, from: r, lib: o, loading: n, loaded: s, get: i, treeShaking: c }) {
2450
+ const { version: a, scope: l = "default", ...u } = t, h = Array.isArray(l) ? l : [l], m = (f) => {
2451
+ const d = (E, y, R) => {
2452
+ R && !E[y] && (E[y] = R);
2453
+ }, p = c ? f.treeShaking : f;
2454
+ d(p, "loaded", s), d(p, "loading", n), d(p, "get", i);
2389
2455
  };
2390
- f.forEach((h) => {
2391
- this.shareScopeMap[h] || (this.shareScopeMap[h] = {}), this.shareScopeMap[h][e] || (this.shareScopeMap[h][e] = {}), this.shareScopeMap[h][e][i] || (this.shareScopeMap[h][e][i] = {
2392
- version: i,
2393
- scope: [h],
2456
+ h.forEach((f) => {
2457
+ this.shareScopeMap[f] || (this.shareScopeMap[f] = {}), this.shareScopeMap[f][e] || (this.shareScopeMap[f][e] = {}), this.shareScopeMap[f][e][a] || (this.shareScopeMap[f][e][a] = {
2458
+ version: a,
2459
+ scope: [f],
2394
2460
  ...u,
2395
2461
  lib: o
2396
2462
  });
2397
- const d = this.shareScopeMap[h][e][i];
2463
+ const d = this.shareScopeMap[f][e][a];
2398
2464
  m(d), r && d.from !== r && (d.from = r);
2399
2465
  });
2400
2466
  }
2401
2467
  _setGlobalShareScopeMap(e) {
2402
- const t = St(), r = e.id || e.name;
2468
+ const t = Nt(), r = e.id || e.name;
2403
2469
  r && !t[r] && (t[r] = this.shareScopeMap);
2404
2470
  }
2405
- }, Oo = class {
2471
+ }, Ko = class {
2472
+ constructor() {
2473
+ this.shareScopeMap = {}, this.hooks = new H({ afterResolve: new D("afterResolve") });
2474
+ }
2475
+ registerShared() {
2476
+ return {
2477
+ newShareInfos: {},
2478
+ allShareInfos: {}
2479
+ };
2480
+ }
2481
+ loadShare() {
2482
+ throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.");
2483
+ }
2484
+ loadShareSync() {
2485
+ throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.");
2486
+ }
2487
+ initializeSharing() {
2488
+ return [];
2489
+ }
2490
+ initShareScopeMap(e, t) {
2491
+ this.shareScopeMap[e] = t;
2492
+ }
2493
+ }, Jo = class {
2406
2494
  constructor(e) {
2407
- this.hooks = new X({
2408
- beforeRegisterRemote: new J("beforeRegisterRemote"),
2409
- registerRemote: new J("registerRemote"),
2410
- beforeRequest: new H("beforeRequest"),
2411
- afterMatchRemote: new v("afterMatchRemote"),
2412
- onLoad: new v("onLoad"),
2413
- afterLoadRemote: new v("afterLoadRemote"),
2495
+ this.hooks = new H({
2496
+ beforeRegisterRemote: new X("beforeRegisterRemote"),
2497
+ registerRemote: new X("registerRemote"),
2498
+ beforeRequest: new D("beforeRequest"),
2499
+ afterMatchRemote: new T("afterMatchRemote"),
2500
+ onLoad: new T("onLoad"),
2501
+ afterLoadRemote: new T("afterLoadRemote"),
2414
2502
  handlePreloadModule: new A("handlePreloadModule"),
2415
- errorLoadRemote: new v("errorLoadRemote"),
2416
- beforePreloadRemote: new v("beforePreloadRemote"),
2417
- generatePreloadAssets: new v("generatePreloadAssets"),
2418
- afterPreloadRemote: new v("afterPreloadRemote"),
2419
- loadEntry: new v()
2503
+ errorLoadRemote: new T("errorLoadRemote"),
2504
+ beforePreloadRemote: new T("beforePreloadRemote"),
2505
+ generatePreloadAssets: new T("generatePreloadAssets"),
2506
+ afterPreloadRemote: new T("afterPreloadRemote"),
2507
+ loadEntry: new T()
2420
2508
  }), this.host = e, this.idToRemoteMap = {};
2421
2509
  }
2422
2510
  formatAndRegisterRemote(e, t) {
@@ -2428,83 +2516,83 @@ var Lo = class {
2428
2516
  name: r.name,
2429
2517
  expose: o
2430
2518
  }, s && e.startsWith(n)) {
2431
- const a = e.replace(n, s);
2432
- this.idToRemoteMap[a] = {
2519
+ const i = e.replace(n, s);
2520
+ this.idToRemoteMap[i] = {
2433
2521
  name: r.name,
2434
2522
  expose: o
2435
2523
  };
2436
2524
  return;
2437
2525
  }
2438
2526
  if (s && e.startsWith(s)) {
2439
- const a = e.replace(s, n);
2440
- this.idToRemoteMap[a] = {
2527
+ const i = e.replace(s, n);
2528
+ this.idToRemoteMap[i] = {
2441
2529
  name: r.name,
2442
2530
  expose: o
2443
2531
  };
2444
2532
  }
2445
2533
  }
2446
2534
  async loadRemote(e, t) {
2447
- const { host: r } = this, o = Ye(r.options.remotes, e);
2448
- let n = e, s = o == null ? void 0 : o.expose, a = o ? z(o.remote) : void 0, c;
2535
+ const { host: r } = this, o = Qe(r.options.remotes, e);
2536
+ let n = e, s = o == null ? void 0 : o.expose, i = o ? K(o.remote) : void 0, c;
2449
2537
  try {
2450
- const { loadFactory: i = !0 } = t || { loadFactory: !0 }, { module: l, moduleOptions: u, remoteMatchInfo: f } = await this.getRemoteModuleAndOptions({ id: e }), { pkgNameOrAlias: m, remote: h, expose: d, id: p, remoteSnapshot: E } = f;
2451
- n = p, s = d, a = z(h);
2452
- const y = await l.get(p, d, t, E), _ = await this.hooks.lifecycle.onLoad.emit({
2538
+ const { loadFactory: a = !0 } = t || { loadFactory: !0 }, { module: l, moduleOptions: u, remoteMatchInfo: h } = await this.getRemoteModuleAndOptions({ id: e }), { pkgNameOrAlias: m, remote: f, expose: d, id: p, remoteSnapshot: E } = h;
2539
+ n = p, s = d, i = K(f);
2540
+ const y = await l.get(p, d, t, E), R = await this.hooks.lifecycle.onLoad.emit({
2453
2541
  id: p,
2454
2542
  pkgNameOrAlias: m,
2455
2543
  expose: d,
2456
- exposeModule: i ? y : void 0,
2457
- exposeModuleFactory: i ? void 0 : y,
2458
- remote: h,
2544
+ exposeModule: a ? y : void 0,
2545
+ exposeModuleFactory: a ? void 0 : y,
2546
+ remote: f,
2459
2547
  options: u,
2460
2548
  moduleInstance: l,
2461
2549
  origin: r
2462
2550
  });
2463
- return this.setIdToRemoteMap(e, f), c = {
2551
+ return this.setIdToRemoteMap(e, h), c = {
2464
2552
  id: n,
2465
2553
  expose: s,
2466
- remote: a,
2554
+ remote: i,
2467
2555
  options: t,
2468
2556
  origin: r
2469
- }, typeof _ == "function" ? _ : y;
2470
- } catch (i) {
2557
+ }, typeof R == "function" ? R : y;
2558
+ } catch (a) {
2471
2559
  const { from: l = "runtime" } = t || { from: "runtime" };
2472
2560
  let u;
2473
2561
  try {
2474
2562
  u = await this.hooks.lifecycle.errorLoadRemote.emit({
2475
2563
  id: e,
2476
- error: i,
2564
+ error: a,
2477
2565
  from: l,
2478
2566
  lifecycle: "onLoad",
2479
2567
  expose: s,
2480
- remote: a,
2568
+ remote: i,
2481
2569
  origin: r
2482
2570
  });
2483
- } catch (f) {
2571
+ } catch (h) {
2484
2572
  throw c = {
2485
2573
  id: n,
2486
2574
  expose: s,
2487
- remote: a,
2575
+ remote: i,
2488
2576
  options: t,
2489
- error: f,
2577
+ error: h,
2490
2578
  origin: r
2491
- }, f;
2579
+ }, h;
2492
2580
  }
2493
2581
  if (!u)
2494
2582
  throw c = {
2495
2583
  id: n,
2496
2584
  expose: s,
2497
- remote: a,
2585
+ remote: i,
2498
2586
  options: t,
2499
- error: i,
2587
+ error: a,
2500
2588
  origin: r
2501
- }, i;
2589
+ }, a;
2502
2590
  return c = {
2503
2591
  id: n,
2504
2592
  expose: s,
2505
- remote: a,
2593
+ remote: i,
2506
2594
  options: t,
2507
- error: i,
2595
+ error: a,
2508
2596
  origin: r,
2509
2597
  recovered: !0
2510
2598
  }, u;
@@ -2519,17 +2607,17 @@ var Lo = class {
2519
2607
  options: t.options,
2520
2608
  origin: t
2521
2609
  });
2522
- const o = So(t.options.remotes, e), n = (c) => {
2523
- const { preloadConfig: i, remote: l } = c, u = i.exposes || [];
2524
- return u.length ? u.map((f) => ({
2610
+ const o = Lo(t.options.remotes, e), n = (c) => {
2611
+ const { preloadConfig: a, remote: l } = c, u = a.exposes || [];
2612
+ return u.length ? u.map((h) => ({
2525
2613
  ops: {
2526
2614
  ...c,
2527
2615
  preloadConfig: {
2528
- ...i,
2529
- exposes: [f]
2616
+ ...a,
2617
+ exposes: [h]
2530
2618
  }
2531
2619
  },
2532
- id: xe(l.name, f)
2620
+ id: Ge(l.name, h)
2533
2621
  })) : [{
2534
2622
  ops: c,
2535
2623
  id: `${l.name}/*`
@@ -2537,37 +2625,37 @@ var Lo = class {
2537
2625
  };
2538
2626
  let s;
2539
2627
  await Promise.all(o.flatMap(n).map(async (c) => {
2540
- const { ops: i, id: l } = c, { remote: u, preloadConfig: f } = i, m = z(u);
2628
+ const { ops: a, id: l } = c, { remote: u, preloadConfig: h } = a, m = K(u);
2541
2629
  try {
2542
- const { globalSnapshot: h, remoteSnapshot: d } = await t.snapshotHandler.loadRemoteSnapshotInfo({
2630
+ const { globalSnapshot: f, remoteSnapshot: d } = await t.snapshotHandler.loadRemoteSnapshotInfo({
2543
2631
  moduleInfo: u,
2544
2632
  id: l,
2545
2633
  initiator: "preloadRemote"
2546
2634
  }), p = await this.hooks.lifecycle.generatePreloadAssets.emit({
2547
2635
  origin: t,
2548
- preloadOptions: i,
2636
+ preloadOptions: a,
2549
2637
  remote: u,
2550
2638
  remoteInfo: m,
2551
- globalSnapshot: h,
2639
+ globalSnapshot: f,
2552
2640
  remoteSnapshot: d
2553
2641
  });
2554
2642
  if (!p) return;
2555
- const E = await Ht(m, t, p, !0, {
2643
+ const E = await jt(m, t, p, !0, {
2556
2644
  initiator: "preloadRemote",
2557
2645
  id: l
2558
2646
  });
2559
2647
  r.push({
2560
2648
  remote: u,
2561
2649
  remoteInfo: m,
2562
- preloadConfig: f,
2650
+ preloadConfig: h,
2563
2651
  id: l,
2564
2652
  results: E
2565
2653
  });
2566
- } catch (h) {
2654
+ } catch (f) {
2567
2655
  r.push({
2568
2656
  remote: u,
2569
2657
  remoteInfo: m,
2570
- preloadConfig: f,
2658
+ preloadConfig: h,
2571
2659
  id: l,
2572
2660
  results: [{
2573
2661
  url: m.entry,
@@ -2575,15 +2663,15 @@ var Lo = class {
2575
2663
  resourceType: /\.json(?:$|[?#])/i.test(m.entry) ? "manifest" : "remoteEntry",
2576
2664
  initiator: "preloadRemote",
2577
2665
  id: l,
2578
- error: h
2666
+ error: f
2579
2667
  }]
2580
2668
  });
2581
2669
  }
2582
2670
  }));
2583
- const a = r.flatMap((c) => c.results.filter((i) => i.status === "error" || i.status === "timeout"));
2584
- if (a.length > 0 && (s = /* @__PURE__ */ new Error(`preloadRemote failed to load ${a.length} resource(s).`), Object.assign(s, {
2671
+ const i = r.flatMap((c) => c.results.filter((a) => a.status === "error" || a.status === "timeout"));
2672
+ if (i.length > 0 && (s = /* @__PURE__ */ new Error(`preloadRemote failed to load ${i.length} resource(s).`), Object.assign(s, {
2585
2673
  results: r,
2586
- failedResults: a
2674
+ failedResults: i
2587
2675
  })), await this.hooks.lifecycle.afterPreloadRemote.emit({
2588
2676
  preloadOps: e,
2589
2677
  options: t.options,
@@ -2598,6 +2686,16 @@ var Lo = class {
2598
2686
  this.registerRemote(o, r.options.remotes, { force: t == null ? void 0 : t.force });
2599
2687
  });
2600
2688
  }
2689
+ initRawContainer(e, t, r) {
2690
+ const { host: o } = this, n = new et({
2691
+ host: o,
2692
+ remoteInfo: K({
2693
+ name: e,
2694
+ entry: t
2695
+ })
2696
+ });
2697
+ return n.remoteEntryExports = r, o.moduleCache.set(e, n), n;
2698
+ }
2601
2699
  async getRemoteModuleAndOptions(e) {
2602
2700
  const { host: t } = this, { id: r } = e;
2603
2701
  let o;
@@ -2607,31 +2705,31 @@ var Lo = class {
2607
2705
  options: t.options,
2608
2706
  origin: t
2609
2707
  });
2610
- } catch (h) {
2708
+ } catch (f) {
2611
2709
  if (o = await this.hooks.lifecycle.errorLoadRemote.emit({
2612
2710
  id: r,
2613
2711
  options: t.options,
2614
2712
  origin: t,
2615
2713
  from: "runtime",
2616
- error: h,
2714
+ error: f,
2617
2715
  lifecycle: "beforeRequest"
2618
- }), !o) throw h;
2716
+ }), !o) throw f;
2619
2717
  }
2620
- const { id: n } = o, s = Ye(t.options.remotes, n);
2718
+ const { id: n } = o, s = Qe(t.options.remotes, n);
2621
2719
  if (!s) try {
2622
- w(vt, k, {
2720
+ w(kt, M, {
2623
2721
  hostName: t.options.name,
2624
2722
  requestId: n
2625
2723
  }, void 0, F(t.options));
2626
- } catch (h) {
2724
+ } catch (f) {
2627
2725
  throw await this.hooks.lifecycle.afterMatchRemote.emit({
2628
2726
  id: n,
2629
2727
  options: t.options,
2630
- error: h,
2728
+ error: f,
2631
2729
  origin: t
2632
- }), h;
2730
+ }), f;
2633
2731
  }
2634
- const { remote: a } = s, c = z(a);
2732
+ const { remote: i } = s, c = K(i);
2635
2733
  await this.hooks.lifecycle.afterMatchRemote.emit({
2636
2734
  id: n,
2637
2735
  ...s,
@@ -2639,154 +2737,154 @@ var Lo = class {
2639
2737
  remoteInfo: c,
2640
2738
  origin: t
2641
2739
  });
2642
- const i = await t.sharedHandler.hooks.lifecycle.afterResolve.emit({
2740
+ const a = await t.sharedHandler.hooks.lifecycle.afterResolve.emit({
2643
2741
  id: n,
2644
2742
  ...s,
2645
2743
  options: t.options,
2646
2744
  origin: t,
2647
2745
  remoteInfo: c
2648
- }), { remote: l, expose: u } = i;
2649
- O(l && u, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${n}.`);
2650
- let f = t.moduleCache.get(l.name);
2746
+ }), { remote: l, expose: u } = a;
2747
+ L(l && u, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${n}.`);
2748
+ let h = t.moduleCache.get(l.name);
2651
2749
  const m = {
2652
2750
  host: t,
2653
2751
  remoteInfo: c
2654
2752
  };
2655
- return f || (f = new Dt(m), t.moduleCache.set(l.name, f)), {
2656
- module: f,
2753
+ return h || (h = new et(m), t.moduleCache.set(l.name, h)), {
2754
+ module: h,
2657
2755
  moduleOptions: m,
2658
- remoteMatchInfo: i
2756
+ remoteMatchInfo: a
2659
2757
  };
2660
2758
  }
2661
2759
  registerRemote(e, t, r) {
2662
2760
  const { host: o } = this, n = () => {
2663
2761
  if (e.alias) {
2664
- const a = t.find((c) => {
2665
- var i;
2666
- return e.alias && (c.name.startsWith(e.alias) || ((i = c.alias) == null ? void 0 : i.startsWith(e.alias)));
2762
+ const i = t.find((c) => {
2763
+ var a;
2764
+ return e.alias && (c.name.startsWith(e.alias) || ((a = c.alias) == null ? void 0 : a.startsWith(e.alias)));
2667
2765
  });
2668
- O(!a, `The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${a && a.name} name or alias`);
2766
+ L(!i, `The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i && i.name} name or alias`);
2669
2767
  }
2670
- "entry" in e && D && typeof window < "u" && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope || (e.shareScope = ie), e.type || (e.type = Rt);
2768
+ "entry" in e && G && typeof window < "u" && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope || (e.shareScope = ce), e.type || (e.type = Tt);
2671
2769
  };
2672
2770
  this.hooks.lifecycle.beforeRegisterRemote.emit({
2673
2771
  remote: e,
2674
2772
  origin: o
2675
2773
  });
2676
- const s = t.find((a) => a.name === e.name);
2774
+ const s = t.find((i) => i.name === e.name);
2677
2775
  if (!s)
2678
2776
  n(), t.push(e), this.hooks.lifecycle.registerRemote.emit({
2679
2777
  remote: e,
2680
2778
  origin: o
2681
2779
  });
2682
2780
  else {
2683
- const a = [`The remote "${e.name}" is already registered.`, "Please note that overriding it may cause unexpected errors."];
2781
+ const i = [`The remote "${e.name}" is already registered.`, "Please note that overriding it may cause unexpected errors."];
2684
2782
  r != null && r.force && (this.removeRemote(s), n(), t.push(e), this.hooks.lifecycle.registerRemote.emit({
2685
2783
  remote: e,
2686
2784
  origin: o
2687
- }), rt(a.join(" ")));
2785
+ }), it(i.join(" ")));
2688
2786
  }
2689
2787
  }
2690
2788
  removeRemote(e) {
2691
2789
  var t;
2692
2790
  try {
2693
- const { host: r } = this, { name: o } = e, n = r.options.remotes.findIndex((i) => i.name === o);
2791
+ const { host: r } = this, { name: o } = e, n = r.options.remotes.findIndex((a) => a.name === o);
2694
2792
  n !== -1 && r.options.remotes.splice(n, 1);
2695
- const s = B(T.__FEDERATION__.moduleInfo, oe(e)).key;
2696
- delete T.__FEDERATION__.moduleInfo[s], "entry" in e && (r.snapshotHandler.manifestCache.delete(e.entry), delete ge.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);
2697
- const { hostGlobalSnapshot: a } = Bt(e, r);
2698
- if (a) {
2699
- const i = a && "remotesInfo" in a && a.remotesInfo && B(a.remotesInfo, e.name).key;
2700
- i && delete a.remotesInfo[i];
2793
+ const s = W(v.__FEDERATION__.moduleInfo, se(e)).key;
2794
+ delete v.__FEDERATION__.moduleInfo[s], "entry" in e && (r.snapshotHandler.manifestCache.delete(e.entry), delete _e.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);
2795
+ const { hostGlobalSnapshot: i } = zt(e, r);
2796
+ if (i) {
2797
+ const a = i && "remotesInfo" in i && i.remotesInfo && W(i.remotesInfo, e.name).key;
2798
+ a && delete i.remotesInfo[a];
2701
2799
  }
2702
2800
  const c = r.moduleCache.get(e.name);
2703
2801
  if (c) {
2704
- const i = c.remoteInfo, l = i.entryGlobalName;
2705
- T[l] && ((t = Object.getOwnPropertyDescriptor(T, l)) != null && t.configurable ? delete T[l] : T[l] = void 0);
2706
- const u = Me(c.remoteInfo);
2707
- K[u] && delete K[u];
2708
- let f = i.buildVersion ? tt(i.name, i.buildVersion) : i.name;
2709
- const m = T.__FEDERATION__.__INSTANCES__.findIndex((h) => i.buildVersion ? h.options.id === f : h.name === f);
2802
+ const a = c.remoteInfo, l = a.entryGlobalName;
2803
+ v[l] && ((t = Object.getOwnPropertyDescriptor(v, l)) != null && t.configurable ? delete v[l] : v[l] = void 0);
2804
+ const u = Le(c.remoteInfo);
2805
+ J[u] && delete J[u];
2806
+ let h = a.buildVersion ? st(a.name, a.buildVersion) : a.name;
2807
+ const m = v.__FEDERATION__.__INSTANCES__.findIndex((f) => a.buildVersion ? f.options.id === h : f.name === h);
2710
2808
  if (m !== -1) {
2711
- const h = T.__FEDERATION__.__INSTANCES__[m];
2712
- f = h.options.id || f;
2713
- const d = St();
2809
+ const f = v.__FEDERATION__.__INSTANCES__[m];
2810
+ h = f.options.id || h;
2811
+ const d = Nt();
2714
2812
  let p = !0;
2715
2813
  const E = [];
2716
2814
  Object.keys(d).forEach((y) => {
2717
- const _ = d[y];
2718
- _ && Object.keys(_).forEach((g) => {
2719
- const R = _[g];
2720
- R && Object.keys(R).forEach((b) => {
2721
- const $ = R[b];
2722
- $ && Object.keys($).forEach((S) => {
2723
- const I = $[S];
2724
- I && typeof I == "object" && I.from === i.name && (I.loaded || I.loading ? (I.useIn = I.useIn.filter((P) => P !== i.name), I.useIn.length ? p = !1 : E.push([
2815
+ const R = d[y];
2816
+ R && Object.keys(R).forEach((g) => {
2817
+ const _ = R[g];
2818
+ _ && Object.keys(_).forEach((S) => {
2819
+ const I = _[S];
2820
+ I && Object.keys(I).forEach((b) => {
2821
+ const $ = I[b];
2822
+ $ && typeof $ == "object" && $.from === a.name && ($.loaded || $.loading ? ($.useIn = $.useIn.filter((P) => P !== a.name), $.useIn.length ? p = !1 : E.push([
2725
2823
  y,
2726
2824
  g,
2727
- b,
2728
- S
2825
+ S,
2826
+ b
2729
2827
  ])) : E.push([
2730
2828
  y,
2731
2829
  g,
2732
- b,
2733
- S
2830
+ S,
2831
+ b
2734
2832
  ]));
2735
2833
  });
2736
2834
  });
2737
2835
  });
2738
- }), p && (h.shareScopeMap = {}, delete d[f]), E.forEach(([y, _, g, R]) => {
2739
- var b, $, S;
2740
- (S = ($ = (b = d[y]) == null ? void 0 : b[_]) == null ? void 0 : $[g]) == null || delete S[R];
2741
- }), T.__FEDERATION__.__INSTANCES__.splice(m, 1);
2836
+ }), p && (f.shareScopeMap = {}, delete d[h]), E.forEach(([y, R, g, _]) => {
2837
+ var S, I, b;
2838
+ (b = (I = (S = d[y]) == null ? void 0 : S[R]) == null ? void 0 : I[g]) == null || delete b[_];
2839
+ }), v.__FEDERATION__.__INSTANCES__.splice(m, 1);
2742
2840
  }
2743
2841
  r.moduleCache.delete(e.name);
2744
2842
  }
2745
2843
  } catch (r) {
2746
- Pe.error(`removeRemote failed: ${r instanceof Error ? r.message : String(r)}`);
2844
+ ke.error(`removeRemote failed: ${r instanceof Error ? r.message : String(r)}`);
2747
2845
  }
2748
2846
  }
2749
2847
  };
2750
- const Co = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN == "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : !0;
2751
- var Fo = class {
2848
+ const Zo = typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN == "boolean" ? !FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN : !0, ve = typeof FEDERATION_OPTIMIZE_NO_REMOTE == "boolean" ? !FEDERATION_OPTIMIZE_NO_REMOTE : !0, tt = typeof FEDERATION_OPTIMIZE_NO_SHARED == "boolean" ? !FEDERATION_OPTIMIZE_NO_SHARED : !0;
2849
+ var Xo = class {
2752
2850
  constructor(e) {
2753
- this.hooks = new X({
2754
- beforeInit: new J("beforeInit"),
2851
+ this.hooks = new H({
2852
+ beforeInit: new X("beforeInit"),
2755
2853
  init: new A(),
2756
- beforeInitContainer: new H("beforeInitContainer"),
2757
- initContainer: new H("initContainer")
2758
- }), this.version = "2.6.0", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new X({
2854
+ beforeInitContainer: new D("beforeInitContainer"),
2855
+ initContainer: new D("initContainer")
2856
+ }), this.version = "2.8.0", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new H({
2759
2857
  getModuleInfo: new A(),
2760
2858
  createScript: new A(),
2761
2859
  createLink: new A(),
2762
- fetch: new v(),
2763
- loadEntryError: new v(),
2764
- afterLoadEntry: new v("afterLoadEntry"),
2765
- beforeInitRemote: new v("beforeInitRemote"),
2766
- afterInitRemote: new v("afterInitRemote"),
2767
- beforeGetExpose: new v("beforeGetExpose"),
2768
- afterGetExpose: new v("afterGetExpose"),
2769
- beforeExecuteFactory: new v("beforeExecuteFactory"),
2770
- afterExecuteFactory: new v("afterExecuteFactory"),
2771
- getModuleFactory: new v()
2772
- }), this.bridgeHook = new X({
2860
+ fetch: new T(),
2861
+ loadEntryError: new T(),
2862
+ afterLoadEntry: new T("afterLoadEntry"),
2863
+ beforeInitRemote: new T("beforeInitRemote"),
2864
+ afterInitRemote: new T("afterInitRemote"),
2865
+ beforeGetExpose: new T("beforeGetExpose"),
2866
+ afterGetExpose: new T("afterGetExpose"),
2867
+ beforeExecuteFactory: new T("beforeExecuteFactory"),
2868
+ afterExecuteFactory: new T("afterExecuteFactory"),
2869
+ getModuleFactory: new T()
2870
+ }), this.bridgeHook = new H({
2773
2871
  beforeBridgeRender: new A(),
2774
2872
  afterBridgeRender: new A(),
2775
2873
  beforeBridgeDestroy: new A(),
2776
2874
  afterBridgeDestroy: new A()
2777
2875
  });
2778
- const t = Co ? [No(), Po()] : [], r = {
2779
- id: _o(),
2876
+ const t = ve && Zo ? [Uo(), Wo()] : [], r = {
2877
+ id: Po(),
2780
2878
  name: e.name,
2781
2879
  plugins: t,
2782
2880
  remotes: [],
2783
2881
  shared: {},
2784
- inBrowser: D
2882
+ inBrowser: G
2785
2883
  };
2786
- this.name = e.name, this.options = r, this.snapshotHandler = new Lo(this), this.sharedHandler = new Mo(this), this.remoteHandler = new Oo(this), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([...r.plugins, ...e.plugins || []]), this.options = this.formatOptions(r, e);
2884
+ this.name = e.name, this.options = r, this.snapshotHandler = ve ? new Vo(this) : new qo(), this.sharedHandler = tt ? new zo(this) : new Ko(), this.remoteHandler = ve ? new Jo(this) : new Go(), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([...r.plugins, ...e.plugins || []]), this.options = this.formatOptions(r, e);
2787
2885
  }
2788
2886
  initOptions(e) {
2789
- e.name && e.name !== this.options.name && w(ut(At, k)), this.registerPlugins(e.plugins);
2887
+ e.name && e.name !== this.options.name && w(yt(Ct, M)), this.registerPlugins(e.plugins);
2790
2888
  const t = this.formatOptions(this.options, e);
2791
2889
  return this.options = t, t;
2792
2890
  }
@@ -2796,18 +2894,11 @@ var Fo = class {
2796
2894
  loadShareSync(e, t) {
2797
2895
  return this.sharedHandler.loadShareSync(e, t);
2798
2896
  }
2799
- initializeSharing(e = ie, t) {
2897
+ initializeSharing(e = ce, t) {
2800
2898
  return this.sharedHandler.initializeSharing(e, t);
2801
2899
  }
2802
2900
  initRawContainer(e, t, r) {
2803
- const o = z({
2804
- name: e,
2805
- entry: t
2806
- }), n = new Dt({
2807
- host: this,
2808
- remoteInfo: o
2809
- });
2810
- return n.remoteEntryExports = r, this.moduleCache.set(e, n), n;
2901
+ return this.remoteHandler.initRawContainer(e, t, r);
2811
2902
  }
2812
2903
  async loadRemote(e, t) {
2813
2904
  return this.remoteHandler.loadRemote(e, t);
@@ -2819,30 +2910,30 @@ var Fo = class {
2819
2910
  this.sharedHandler.initShareScopeMap(e, t, r);
2820
2911
  }
2821
2912
  formatOptions(e, t) {
2822
- const { allShareInfos: r } = bt(e, t), { userOptions: o, options: n } = this.hooks.lifecycle.beforeInit.emit({
2913
+ const r = tt ? vt(e, t).allShareInfos : {}, { userOptions: o, options: n } = this.hooks.lifecycle.beforeInit.emit({
2823
2914
  origin: this,
2824
2915
  userOptions: t,
2825
2916
  options: e,
2826
2917
  shareInfo: r
2827
- }), s = this.remoteHandler.formatAndRegisterRemote(n, o), { allShareInfos: a } = this.sharedHandler.registerShared(n, o), c = [...n.plugins];
2918
+ }), s = this.remoteHandler.formatAndRegisterRemote(n, o), { allShareInfos: i } = this.sharedHandler.registerShared(n, o), c = [...n.plugins];
2828
2919
  o.plugins && o.plugins.forEach((l) => {
2829
2920
  c.includes(l) || c.push(l);
2830
2921
  });
2831
- const i = {
2922
+ const a = {
2832
2923
  ...e,
2833
2924
  ...t,
2834
2925
  plugins: c,
2835
2926
  remotes: s,
2836
- shared: a,
2927
+ shared: i,
2837
2928
  id: o.id || e.id
2838
2929
  };
2839
2930
  return this.hooks.lifecycle.init.emit({
2840
2931
  origin: this,
2841
- options: i
2842
- }), i;
2932
+ options: a
2933
+ }), a;
2843
2934
  }
2844
2935
  registerPlugins(e) {
2845
- const t = Ro(e, this);
2936
+ const t = ko(e, this);
2846
2937
  this.options.plugins = this.options.plugins.reduce((r, o) => (o && r && !r.find((n) => n.name === o.name) && r.push(o), r), t || []);
2847
2938
  }
2848
2939
  registerRemotes(e, t) {
@@ -2855,12 +2946,12 @@ var Fo = class {
2855
2946
  });
2856
2947
  }
2857
2948
  };
2858
- let Ho = null;
2859
- function Vt(e) {
2860
- return Ho;
2949
+ let Yo = null;
2950
+ function Kt(e) {
2951
+ return Yo;
2861
2952
  }
2862
- vr(Fo);
2863
- function Wt(e, t) {
2953
+ Dr(Xo);
2954
+ function Jt(e, t) {
2864
2955
  const r = (o) => {
2865
2956
  if (!o.startsWith("/")) return o;
2866
2957
  const n = o.length > 1 && o.endsWith("/"), s = `${t}/${o}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/";
@@ -2874,109 +2965,109 @@ function Wt(e, t) {
2874
2965
  return typeof o.redirect == "string" ? n.redirect = r(o.redirect) : o.redirect && typeof o.redirect == "object" && "path" in o.redirect && typeof o.redirect.path == "string" && (n.redirect = {
2875
2966
  ...o.redirect,
2876
2967
  path: r(o.redirect.path)
2877
- }), o.children && o.children.length > 0 && (n.children = Wt(
2968
+ }), o.children && o.children.length > 0 && (n.children = Jt(
2878
2969
  o.children,
2879
2970
  t
2880
2971
  )), n;
2881
2972
  });
2882
2973
  }
2883
- function Do(e) {
2974
+ function Qo(e) {
2884
2975
  const t = e.replace(/\/+$/, ""), r = (s) => s.startsWith("/") && s !== t && !s.startsWith(t + "/"), o = (s) => `${t}${s}`.replace(/\/+/g, "/"), n = (s) => typeof s == "string" ? r(s) ? o(s) : s : "path" in s && typeof s.path == "string" && r(s.path) ? { ...s, path: o(s.path) } : s;
2885
2976
  return (s) => {
2886
- const a = s.push.bind(s), c = s.replace.bind(s), i = s.resolve.bind(s);
2887
- s.push = (l) => a(n(l)), s.replace = (l) => c(n(l)), s.resolve = (l, ...u) => i(n(l), ...u);
2977
+ const i = s.push.bind(s), c = s.replace.bind(s), a = s.resolve.bind(s);
2978
+ s.push = (l) => i(n(l)), s.replace = (l) => c(n(l)), s.resolve = (l, ...u) => a(n(l), ...u);
2888
2979
  };
2889
2980
  }
2890
- function xo(e) {
2981
+ function en(e) {
2891
2982
  const { router: t, basename: r, memoryRoute: o, hashRoute: n } = e, s = t.getRoutes().sort(
2892
- (h, d) => h.path.split("/").filter((p) => p).length - d.path.split("/").filter((p) => p).length
2893
- ), a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
2894
- s.forEach((h) => {
2895
- const d = a.get(h.path) || [];
2896
- d.push(h), a.set(h.path, d);
2983
+ (f, d) => f.path.split("/").filter((p) => p).length - d.path.split("/").filter((p) => p).length
2984
+ ), i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
2985
+ s.forEach((f) => {
2986
+ const d = i.get(f.path) || [];
2987
+ d.push(f), i.set(f.path, d);
2897
2988
  });
2898
- const i = (h, d) => `${h}/${d}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/", l = (h, d = "") => {
2899
- if (!h.children || h.children.length === 0)
2900
- return h;
2901
- for (let p = 0; p < h.children.length; p++) {
2902
- const E = h.children[p], y = i(d, E.path), g = (a.get(y) || []).find(
2903
- (R) => !c.has(R) && R !== h && (E.name == null || R.name === E.name)
2989
+ const a = (f, d) => `${f}/${d}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/", l = (f, d = "") => {
2990
+ if (!f.children || f.children.length === 0)
2991
+ return f;
2992
+ for (let p = 0; p < f.children.length; p++) {
2993
+ const E = f.children[p], y = a(d, E.path), g = (i.get(y) || []).find(
2994
+ (_) => !c.has(_) && _ !== f && (E.name == null || _.name === E.name)
2904
2995
  );
2905
2996
  if (g) {
2906
- const R = {
2997
+ const _ = {
2907
2998
  ...g,
2908
2999
  path: E.path
2909
3000
  // Keep the original relative path from static route
2910
3001
  };
2911
- h.children[p] = R, c.add(g), l(R, y);
3002
+ f.children[p] = _, c.add(g), l(_, y);
2912
3003
  }
2913
3004
  }
2914
- return h;
3005
+ return f;
2915
3006
  };
2916
3007
  let u = [];
2917
- for (const h of s)
2918
- if (!c.has(h)) {
2919
- const d = l(h, h.path);
2920
- c.add(h), u.push(d);
3008
+ for (const f of s)
3009
+ if (!c.has(f)) {
3010
+ const d = l(f, f.path);
3011
+ c.add(f), u.push(d);
2921
3012
  }
2922
- let f, m;
2923
- return o ? f = ue.createMemoryHistory(r) : n ? (f = ue.createWebHashHistory(), r && (u = Wt(u, r), m = Do(r))) : f = ue.createWebHistory(r), { history: f, routes: u, patchRouter: m };
3013
+ let h, m;
3014
+ return o ? h = fe.createMemoryHistory(r) : n ? (h = fe.createWebHashHistory(), r && (u = Jt(u, r), m = Qo(r))) : h = fe.createWebHistory(r), { history: h, routes: u, patchRouter: m };
2924
3015
  }
2925
- function jo(e) {
2926
- const t = /* @__PURE__ */ new Map(), r = Vt();
3016
+ function an(e) {
3017
+ const t = /* @__PURE__ */ new Map(), r = Kt();
2927
3018
  return () => ({
2928
- __APP_VERSION__: "2.6.0",
3019
+ __APP_VERSION__: "2.8.0",
2929
3020
  async render(o) {
2930
- var d, p, E, y, _, g;
3021
+ var d, p, E, y, R, g;
2931
3022
  C.debug("createBridgeComponent render Info", o);
2932
3023
  const {
2933
3024
  moduleName: n,
2934
3025
  dom: s,
2935
- basename: a,
3026
+ basename: i,
2936
3027
  memoryRoute: c,
2937
- hashRoute: i,
3028
+ hashRoute: a,
2938
3029
  ...l
2939
- } = o, u = jt.createApp(e.rootComponent, l);
3030
+ } = o, u = Zt.createApp(e.rootComponent, l);
2940
3031
  t.set(s, u);
2941
- const f = await ((E = (p = (d = r == null ? void 0 : r.bridgeHook) == null ? void 0 : d.lifecycle) == null ? void 0 : p.beforeBridgeRender) == null ? void 0 : E.emit(o)), m = f && typeof f == "object" && (f != null && f.extraProps) ? f == null ? void 0 : f.extraProps : {}, h = e.appOptions({
3032
+ const h = await ((E = (p = (d = r == null ? void 0 : r.bridgeHook) == null ? void 0 : d.lifecycle) == null ? void 0 : p.beforeBridgeRender) == null ? void 0 : E.emit(o)), m = h && typeof h == "object" && (h != null && h.extraProps) ? h == null ? void 0 : h.extraProps : {}, f = e.appOptions({
2942
3033
  app: u,
2943
- basename: a,
3034
+ basename: i,
2944
3035
  memoryRoute: c,
2945
- hashRoute: i,
3036
+ hashRoute: a,
2946
3037
  ...l,
2947
3038
  ...m
2948
3039
  });
2949
- if (h != null && h.router) {
2950
- const { history: R, routes: b, patchRouter: $ } = xo({
2951
- router: h.router,
3040
+ if (f != null && f.router) {
3041
+ const { history: _, routes: S, patchRouter: I } = en({
3042
+ router: f.router,
2952
3043
  basename: o.basename,
2953
3044
  memoryRoute: o.memoryRoute,
2954
3045
  hashRoute: o.hashRoute
2955
- }), S = ue.createRouter({
2956
- ...h.router.options,
2957
- history: R,
2958
- routes: b
3046
+ }), b = fe.createRouter({
3047
+ ...f.router.options,
3048
+ history: _,
3049
+ routes: S
2959
3050
  });
2960
- $ && $(S), h.afterRouterCreate && h.afterRouterCreate(S), C.debug("createBridgeComponent render router info>>>", {
3051
+ I && I(b), f.afterRouterCreate && f.afterRouterCreate(b), C.debug("createBridgeComponent render router info>>>", {
2961
3052
  moduleName: n,
2962
- router: S
2963
- }), c && await S.push(c.entryPath), u.use(S);
3053
+ router: b
3054
+ }), c && await b.push(c.entryPath), u.use(b);
2964
3055
  }
2965
- u.mount(s), (g = (_ = (y = r == null ? void 0 : r.bridgeHook) == null ? void 0 : y.lifecycle) == null ? void 0 : _.afterBridgeRender) == null || g.emit(o);
3056
+ u.mount(s), (g = (R = (y = r == null ? void 0 : r.bridgeHook) == null ? void 0 : y.lifecycle) == null ? void 0 : R.afterBridgeRender) == null || g.emit(o);
2966
3057
  },
2967
3058
  destroy(o) {
2968
- var s, a, c, i, l, u;
3059
+ var s, i, c, a, l, u;
2969
3060
  C.debug("createBridgeComponent destroy Info", o);
2970
3061
  const n = t.get(o == null ? void 0 : o.dom);
2971
- (c = (a = (s = r == null ? void 0 : r.bridgeHook) == null ? void 0 : s.lifecycle) == null ? void 0 : a.beforeBridgeDestroy) == null || c.emit(o), n == null || n.unmount(), (u = (l = (i = r == null ? void 0 : r.bridgeHook) == null ? void 0 : i.lifecycle) == null ? void 0 : l.afterBridgeDestroy) == null || u.emit(o);
3062
+ (c = (i = (s = r == null ? void 0 : r.bridgeHook) == null ? void 0 : s.lifecycle) == null ? void 0 : i.beforeBridgeDestroy) == null || c.emit(o), n == null || n.unmount(), (u = (l = (a = r == null ? void 0 : r.bridgeHook) == null ? void 0 : a.lifecycle) == null ? void 0 : l.afterBridgeDestroy) == null || u.emit(o);
2972
3063
  }
2973
3064
  });
2974
3065
  }
2975
- function Go() {
3066
+ function tn() {
2976
3067
  const e = new PopStateEvent("popstate", { state: window.history.state });
2977
3068
  window.dispatchEvent(e);
2978
3069
  }
2979
- const Uo = /* @__PURE__ */ qt({
3070
+ const rn = /* @__PURE__ */ Xt({
2980
3071
  name: "RemoteApp",
2981
3072
  props: {
2982
3073
  moduleName: String,
@@ -2988,14 +3079,14 @@ const Uo = /* @__PURE__ */ qt({
2988
3079
  },
2989
3080
  inheritAttrs: !1,
2990
3081
  setup(e) {
2991
- const t = V(null), r = V(null), o = V(""), n = V(!1), s = V(!1), a = V(!1), c = Ze(), i = Vt(), l = Kt(), u = () => ({
3082
+ const t = V(null), r = V(null), o = V(""), n = V(!1), s = V(!1), i = V(!1), c = rt(), a = Kt(), l = Yt(), u = () => ({
2992
3083
  name: e.moduleName,
2993
3084
  dom: t.value,
2994
3085
  basename: e.basename,
2995
3086
  memoryRoute: e.memoryRoute,
2996
3087
  hashRoute: e.hashRoute
2997
- }), f = async () => {
2998
- var y, _, g, R, b, $, S;
3088
+ }), h = async () => {
3089
+ var y, R, g, _, S, I, b;
2999
3090
  if (!t.value || n.value)
3000
3091
  return;
3001
3092
  const d = (y = e.providerInfo) == null ? void 0 : y.call(e);
@@ -3009,13 +3100,13 @@ const Uo = /* @__PURE__ */ qt({
3009
3100
  hashRoute: e.hashRoute
3010
3101
  };
3011
3102
  C.debug("createRemoteAppComponent LazyComponent render >>>", p);
3012
- const E = await ((R = (g = (_ = i == null ? void 0 : i.bridgeHook) == null ? void 0 : _.lifecycle) == null ? void 0 : g.beforeBridgeRender) == null ? void 0 : R.emit(p)) || {};
3103
+ const E = await ((_ = (g = (R = a == null ? void 0 : a.bridgeHook) == null ? void 0 : R.lifecycle) == null ? void 0 : g.beforeBridgeRender) == null ? void 0 : _.emit(p)) || {};
3013
3104
  p = {
3014
3105
  ...p,
3015
3106
  ...E.extraProps
3016
- }, d.render(p), n.value = !0, (S = ($ = (b = i == null ? void 0 : i.bridgeHook) == null ? void 0 : b.lifecycle) == null ? void 0 : $.afterBridgeRender) == null || S.emit(p);
3107
+ }, d.render(p), n.value = !0, (b = (I = (S = a == null ? void 0 : a.bridgeHook) == null ? void 0 : S.lifecycle) == null ? void 0 : I.afterBridgeRender) == null || b.emit(p);
3017
3108
  }, m = () => {
3018
- var E, y, _, g, R, b;
3109
+ var E, y, R, g, _, S;
3019
3110
  const d = r.value;
3020
3111
  if (!d || !n.value)
3021
3112
  return;
@@ -3023,38 +3114,39 @@ const Uo = /* @__PURE__ */ qt({
3023
3114
  ...e
3024
3115
  });
3025
3116
  const p = u();
3026
- (_ = (y = (E = i == null ? void 0 : i.bridgeHook) == null ? void 0 : E.lifecycle) == null ? void 0 : y.beforeBridgeDestroy) == null || _.emit(p), d.destroy({
3117
+ (R = (y = (E = a == null ? void 0 : a.bridgeHook) == null ? void 0 : E.lifecycle) == null ? void 0 : y.beforeBridgeDestroy) == null || R.emit(p), d.destroy({
3027
3118
  dom: t.value
3028
- }), r.value = null, n.value = !1, (b = (R = (g = i == null ? void 0 : i.bridgeHook) == null ? void 0 : g.lifecycle) == null ? void 0 : R.afterBridgeDestroy) == null || b.emit(p);
3029
- }, h = zt(() => c == null ? void 0 : c.path, (d) => {
3119
+ }), r.value = null, n.value = !1, (S = (_ = (g = a == null ? void 0 : a.bridgeHook) == null ? void 0 : g.lifecycle) == null ? void 0 : _.afterBridgeDestroy) == null || S.emit(p);
3120
+ }, f = Qt(() => c == null ? void 0 : c.path, (d) => {
3030
3121
  s.value && o.value !== "" && o.value !== d && (C.debug("createRemoteAppComponent dispatchPopstateEnv >>>", {
3031
3122
  ...e,
3032
3123
  pathname: c.path
3033
- }), Go()), o.value = d;
3124
+ }), tn()), o.value = d;
3034
3125
  });
3035
- return Jt(() => {
3036
- s.value = !0, f();
3037
- }), Xt(async () => {
3038
- s.value = !0, a.value && (a.value = !1, await Yt(), f());
3039
- }), Zt(() => {
3040
- s.value = !1, a.value = !0, m();
3041
- }), Qt(() => {
3042
- h(), m();
3043
- }), () => er("div", tr(e.rootAttrs || {}, {
3126
+ return er(() => {
3127
+ s.value = !0, h();
3128
+ }), tr(async () => {
3129
+ s.value = !0, i.value && (i.value = !1, await rr(), h());
3130
+ }), or(() => {
3131
+ s.value = !1, i.value = !0, m();
3132
+ }), nr(() => {
3133
+ f(), m();
3134
+ }), () => sr("div", ir(e.rootAttrs || {}, {
3044
3135
  ref: t
3045
3136
  }), null);
3046
3137
  }
3047
3138
  });
3048
- function Bo(e) {
3049
- return rr({
3050
- __APP_VERSION__: "2.6.0",
3139
+ function on(e) {
3140
+ return ar({
3141
+ // @ts-ignore
3142
+ __APP_VERSION__: "2.8.0",
3051
3143
  ...e.asyncComponentOptions,
3052
3144
  //@ts-ignore
3053
3145
  loader: async () => {
3054
- var i, l;
3055
- const t = Ze();
3146
+ var a, l;
3147
+ const t = rt();
3056
3148
  let r = "/";
3057
- const o = (l = (i = t == null ? void 0 : t.matched) == null ? void 0 : i[0]) == null ? void 0 : l.path;
3149
+ const o = (l = (a = t == null ? void 0 : t.matched) == null ? void 0 : a[0]) == null ? void 0 : l.path;
3058
3150
  o && (o.endsWith("/:pathMatch(.*)*") ? r = o.replace("/:pathMatch(.*)*", "") : r = t.matched[0].path);
3059
3151
  const n = (e == null ? void 0 : e.export) || "default";
3060
3152
  C.debug(
@@ -3064,15 +3156,15 @@ function Bo(e) {
3064
3156
  info: e
3065
3157
  }
3066
3158
  );
3067
- const s = await e.loader(), a = s && s[Symbol.for("mf_module_id")], c = s[n];
3159
+ const s = await e.loader(), i = s && s[Symbol.for("mf_module_id")], c = s[n];
3068
3160
  if (C.debug(
3069
3161
  "createRemoteAppComponent LazyComponent loadRemote info >>>",
3070
- { moduleName: a, module: s, exportName: n, basename: r, route: t }
3162
+ { moduleName: i, module: s, exportName: n, basename: r, route: t }
3071
3163
  ), n in s && typeof c == "function")
3072
3164
  return {
3073
3165
  render() {
3074
- return or(Uo, {
3075
- moduleName: a,
3166
+ return cr(rn, {
3167
+ moduleName: i,
3076
3168
  providerInfo: c,
3077
3169
  basename: r,
3078
3170
  rootAttrs: e.rootAttrs,
@@ -3085,13 +3177,13 @@ function Bo(e) {
3085
3177
  }
3086
3178
  });
3087
3179
  }
3088
- function qo(e) {
3180
+ function cn(e) {
3089
3181
  return C.warn(
3090
3182
  "createRemoteComponent is deprecated, please use createRemoteAppComponent instead!"
3091
- ), Bo(e);
3183
+ ), on(e);
3092
3184
  }
3093
3185
  export {
3094
- jo as createBridgeComponent,
3095
- Bo as createRemoteAppComponent,
3096
- qo as createRemoteComponent
3186
+ an as createBridgeComponent,
3187
+ on as createRemoteAppComponent,
3188
+ cn as createRemoteComponent
3097
3189
  };