@module-federation/bridge-vue3 2.9.3 → 2.9.5

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