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