@das-fed/web 6.4.0-test.2.1 → 6.4.0-test.21

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.
Files changed (78) hide show
  1. package/esm-map.json +3 -1
  2. package/{index-DC-9kRIP.js → index-BR2K2L20.js} +1 -1
  3. package/index-CqHbFeJ4.js +81 -0
  4. package/index-CqHbFeJ4.js.gz +0 -0
  5. package/index-pa8JpqiR.js +13340 -0
  6. package/index-pa8JpqiR.js.gz +0 -0
  7. package/index.js +22 -20
  8. package/package.json +8 -6
  9. package/packages/i18n/index.js +172 -31
  10. package/packages/i18n/index.js.gz +0 -0
  11. package/packages/layout/index.js +454 -518
  12. package/packages/layout/index.js.gz +0 -0
  13. package/packages/layout/style.css +2 -2
  14. package/packages/layout/style.css.gz +0 -0
  15. package/packages/main-app-framework/{index-DCVBm-dM.js → index-D-yLFNAt.js} +1 -1
  16. package/packages/main-app-framework/index-PIgnnyL3.js +11956 -0
  17. package/packages/main-app-framework/index-PIgnnyL3.js.gz +0 -0
  18. package/packages/main-app-framework/index-gbopgvrS.js +81 -0
  19. package/packages/main-app-framework/index-gbopgvrS.js.gz +0 -0
  20. package/packages/main-app-framework/index.js +3 -2
  21. package/packages/main-app-framework/style.css +1 -1
  22. package/packages/main-app-framework/style.css.gz +0 -0
  23. package/packages/micro-frontend/index.js +316 -304
  24. package/packages/micro-frontend/index.js.gz +0 -0
  25. package/packages/style/style.css +1 -1
  26. package/packages/style/style.css.gz +0 -0
  27. package/style.css +2 -2
  28. package/style.css.gz +0 -0
  29. package/types/create-das-web-app/index.d.ts +1 -1
  30. package/types/i18n/global.d.ts +583 -0
  31. package/types/i18n/index.d.ts +6 -4
  32. package/types/layout/store/index.d.ts +7 -2
  33. package/types/layout/store/menu.d.ts +2 -0
  34. package/types/layout/store/nav.d.ts +2 -1
  35. package/types/layout/store/tab.d.ts +1 -0
  36. package/types/main-app-framework/business/alarm/use-alarm.d.ts +4 -4
  37. package/types/main-app-framework/business/video-link/index.d.ts +3 -3
  38. package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +3 -3
  39. package/types/main-app-framework/components/person-set-dialog/index.d.ts +1 -1
  40. package/types/main-app-framework/components/person-set-dialog/src/api.d.ts +2 -0
  41. package/types/main-app-framework/components/person-set-dialog/src/components/index.d.ts +2 -0
  42. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/api.d.ts +20 -0
  43. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-builtIn-dialog.d.ts +19 -0
  44. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-notBuiltIn-dialog.d.ts +22 -0
  45. package/types/main-app-framework/constant/index.d.ts +1 -1
  46. package/types/main-app-framework/data-track/api.d.ts +2 -0
  47. package/types/main-app-framework/data-track/index.d.ts +2 -0
  48. package/types/main-app-framework/i18n/index.d.ts +518 -0
  49. package/types/main-app-framework/index.d.ts +2 -1
  50. package/types/main-app-framework/init-config/get-nav-config/api.d.ts +2 -0
  51. package/types/main-app-framework/init-config/get-nav-config/index.d.ts +4 -3
  52. package/types/main-app-framework/init-config/get-project-config/api.d.ts +3 -2
  53. package/types/main-app-framework/init-config/get-system-config/api.d.ts +2 -0
  54. package/types/main-app-framework/init-config/get-system-config/index.d.ts +4 -4
  55. package/types/main-app-framework/init-config/get-tenant-config/api.d.ts +1 -1
  56. package/types/main-app-framework/init-layout/hooks/nav-slots/use-change-enterprises.d.ts +3 -3
  57. package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +2 -2
  58. package/types/main-app-framework/init-layout/hooks/use-initialization.d.ts +5 -4
  59. package/types/main-app-framework/init-layout/hooks/use-tabs.d.ts +3 -3
  60. package/types/main-app-framework/init-platform/index.d.ts +1 -1
  61. package/types/main-app-framework/utils/src/get-portal-url/crypto.d.ts +14 -0
  62. package/types/main-app-framework/utils/src/get-portal-url/encrypt.d.ts +42 -0
  63. package/types/main-app-framework/utils/src/get-portal-url/generate-url.d.ts +4 -0
  64. package/types/main-app-framework/utils/src/get-portal-url/handle-portal-params.d.ts +2 -0
  65. package/types/main-app-framework/utils/src/get-portal-url/index.d.ts +2 -0
  66. package/types/main-app-framework/utils/src/get-portal-url/type.d.ts +16 -0
  67. package/types/main-app-framework/utils/src/set-common-info.d.ts +4 -2
  68. package/types/main-app-framework/utils/src/tools.d.ts +5 -1
  69. package/types/micro-frontend/store.d.ts +5 -5
  70. package/types/theme/index.d.ts +1 -1
  71. package/index-6_iWBDs0.js +0 -7173
  72. package/index-6_iWBDs0.js.gz +0 -0
  73. package/index-C9vVY6r3.js +0 -74
  74. package/index-C9vVY6r3.js.gz +0 -0
  75. package/packages/main-app-framework/index-DHWdFr1t.js +0 -5859
  76. package/packages/main-app-framework/index-DHWdFr1t.js.gz +0 -0
  77. package/packages/main-app-framework/index-DiKwf0Vc.js +0 -74
  78. package/packages/main-app-framework/index-DiKwf0Vc.js.gz +0 -0
@@ -1,54 +1,66 @@
1
1
  import '@das-fed/web/packages/micro-frontend/style.css';
2
- import { ref as w, watch as M, reactive as O, getCurrentScope as oe, onScopeDispose as ce, unref as I, getCurrentInstance as le, onMounted as ue, nextTick as Z, defineComponent as x, computed as D, openBlock as E, createElementBlock as N, Fragment as $, renderList as de, withDirectives as pe, createBlock as ee, vShow as me, createCommentVNode as fe, mergeProps as ve, withCtx as C, renderSlot as V, createVNode as F, onActivated as Ae } from "vue";
3
- import { DasWebLayout as he, DasWebNav as we, DasWebMenu as ge, DasWebTabs as ye } from "@das-fed/web/packages/layout/index";
4
- const z = w("/das-micro-app"), f = w([]), k = w(!1), R = w([]), T = w(!0);
5
- let A = null, h = null, L = null;
6
- const b = (e, t, n) => {
7
- var c, a, i, s;
8
- const r = f.value.find((o) => o.name === e);
9
- if (r) {
10
- if (r.entry.startsWith("/") || r.entry.match(location.origin)) {
11
- (a = (c = r.dom) == null ? void 0 : c.contentWindow) == null || a.postMessage({ type: t, data: n });
12
- return;
13
- }
14
- (s = (i = r.dom) == null ? void 0 : i.contentWindow) == null || s.postMessage({ type: t, data: n }, r.entry);
15
- }
16
- }, q = (e, t) => {
17
- var r;
18
- const { origin: n } = new URL(location.href);
19
- (r = window.top) == null || r.postMessage({ type: e, data: t }, n);
20
- }, Me = () => {
2
+ import { ref as w, watch as M, reactive as T, getCurrentScope as ue, onScopeDispose as de, unref as I, getCurrentInstance as pe, onMounted as me, nextTick as ne, defineComponent as x, computed as N, openBlock as E, createElementBlock as D, Fragment as z, renderList as fe, withDirectives as ve, createBlock as se, vShow as he, createCommentVNode as Ae, mergeProps as we, withCtx as C, renderSlot as V, createVNode as O, onActivated as ge } from "vue";
3
+ import { DasWebLayout as ye, DasWebNav as Me, DasWebMenu as Le, DasWebTabs as _e } from "@das-fed/web/packages/layout/index";
4
+ const W = w("/das-micro-app"), f = w([]), k = w(!1), F = w([]), R = w(!0);
5
+ let v = null, h = null, _ = null;
6
+ const be = (e) => new Promise((t) => {
7
+ const n = () => {
8
+ if (v != null && v[e]) return t();
9
+ setTimeout(() => n(), 50);
10
+ };
11
+ n();
12
+ }), b = (e, t, n, s) => {
13
+ var i;
14
+ const { awaitListener: c = !1 } = s || {}, { origin: a } = new URL(location.href);
15
+ c ? be(t).then(() => {
16
+ var r;
17
+ (r = window.self) == null || r.postMessage({ type: t, data: n }, a);
18
+ }) : (i = window.self) == null || i.postMessage({ type: t, data: n }, a);
19
+ }, Ie = (e) => new Promise((t) => {
20
+ const n = () => {
21
+ if (h != null && h[e]) return t();
22
+ setTimeout(() => n(), 50);
23
+ };
24
+ n();
25
+ }), q = (e, t, n) => {
26
+ var a;
27
+ const { awaitListener: s = !1 } = n || {}, { origin: c } = new URL(location.href);
28
+ s ? Ie(e).then(() => {
29
+ var i;
30
+ (i = window.self) == null || i.postMessage({ type: e, data: t }, c);
31
+ }) : (a = window.self) == null || a.postMessage({ type: e, data: t }, c);
32
+ }, Ee = () => {
21
33
  h || (h || (h = {}), window.addEventListener(
22
34
  "message",
23
35
  (e) => {
24
36
  const { type: t, source: n } = e.data || {};
25
37
  if (n !== "react-devtools-content-script" && h[t])
26
- for (const r in h[t])
27
- h[t][r](e.data);
38
+ for (const s in h[t])
39
+ h[t][s](e.data);
28
40
  },
29
41
  !1
30
42
  ));
31
- }, _e = () => {
32
- A || (A || (A = {}), window.addEventListener(
43
+ }, Se = () => {
44
+ v || (v || (v = {}), window.addEventListener(
33
45
  "message",
34
46
  (e) => {
35
47
  const { type: t } = e.data || {};
36
- if (A[t])
37
- for (const n in A[t])
38
- A[t][n](e.data);
48
+ if (v[t])
49
+ for (const n in v[t])
50
+ v[t][n](e.data);
39
51
  },
40
52
  !1
41
53
  ));
42
- }, Le = (e, t) => {
43
- _e();
54
+ }, Pe = (e, t) => {
55
+ Se();
44
56
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
45
- return A[e] || (A[e] = {}), A[e][n] = t, {
57
+ return v[e] || (v[e] = {}), v[e][n] = t, {
46
58
  remove: () => {
47
- A[e] && A[e][n] && delete A[e][n];
59
+ v[e] && v[e][n] && delete v[e][n];
48
60
  }
49
61
  };
50
- }, be = (e, t) => {
51
- Me();
62
+ }, Te = (e, t) => {
63
+ Ee();
52
64
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
53
65
  return h[e] || (h[e] = {}), h[e][n] = t, {
54
66
  remove: () => {
@@ -58,7 +70,7 @@ const b = (e, t, n) => {
58
70
  }, Q = async (e) => {
59
71
  await Promise.all(
60
72
  f.value.filter((t) => t.loaded).map((t) => new Promise(async (n) => {
61
- t.dom || await new Promise((r) => M(() => t.dom, r)), setTimeout(() => {
73
+ t.dom || await new Promise((s) => M(() => t.dom, s)), setTimeout(() => {
62
74
  b(t.name, "sessionStorage", e), n(!0);
63
75
  }, 0);
64
76
  }))
@@ -66,14 +78,14 @@ const b = (e, t, n) => {
66
78
  }, d = {
67
79
  loadMicroApp: (e) => {
68
80
  k.value = !0;
69
- const t = f.value.find((i) => i.name === e), n = f.value.find((i) => i.actived), r = !!t, c = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
70
- if (!r) {
81
+ const t = f.value.find((i) => i.name === e), n = f.value.find((i) => i.actived), s = !!t, c = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
82
+ if (!s) {
71
83
  n && (n.actived = !1);
72
84
  return;
73
85
  }
74
86
  if (t.isFirstActived = !0, c) {
75
87
  t.src = t.entry;
76
- const i = f.value.find((s) => s.actived);
88
+ const i = f.value.find((r) => r.actived);
77
89
  i && (i.actived = !1), t.loaded = !0, t.actived = !0;
78
90
  return;
79
91
  }
@@ -107,8 +119,8 @@ const b = (e, t, n) => {
107
119
  });
108
120
  },
109
121
  setMicroAppRoute: async (e, t, n) => {
110
- const r = f.value.find((s) => s.name === t);
111
- if (!r || !r.loaded || !r.actived || (r.dom || await new Promise((s) => M(() => r.dom, s)), !r.actived)) return r;
122
+ const s = f.value.find((r) => r.name === t);
123
+ if (!s || !s.loaded || !s.actived || (s.dom || await new Promise((r) => M(() => s.dom, r)), !s.actived)) return s;
112
124
  const c = n.path || n, a = n.query || {}, i = n.params || {};
113
125
  return e.push({
114
126
  path: `/${t}${c}`,
@@ -116,18 +128,18 @@ const b = (e, t, n) => {
116
128
  // @ts-ignore
117
129
  params: i
118
130
  }), setTimeout(() => {
119
- const { isFirstActived: s } = r;
131
+ const { isFirstActived: r } = s;
120
132
  b(t, "router", {
121
- cmd: s ? "replace" : "push",
133
+ cmd: r ? "replace" : "push",
122
134
  route: n,
123
135
  microAppName: t
124
- }), s && (r.isFirstActived = !1);
125
- }, 0), r;
136
+ }), r && (s.isFirstActived = !1);
137
+ }, 0), s;
126
138
  },
127
139
  sendMessageToMicroApp: b,
128
140
  sendMessageToMainApp: q,
129
- addEventListenerFromMainApp: Le,
130
- addEventListenerFromMicroApp: be,
141
+ addEventListenerFromMainApp: Pe,
142
+ addEventListenerFromMicroApp: Te,
131
143
  setMainAppOverlay: (e, t) => {
132
144
  q("bodyOverlay", { visible: e, style: t });
133
145
  },
@@ -146,39 +158,40 @@ const b = (e, t, n) => {
146
158
  },
147
159
  addMicroAppLifeCycleListener: (e, t) => {
148
160
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
149
- L || (L = {});
150
- const r = () => {
151
- L[n] && delete L[n];
161
+ _ || (_ = {});
162
+ const s = () => {
163
+ _[n] && delete _[n];
152
164
  };
153
- return L[n] = {
165
+ return _[n] = {
154
166
  type: e,
155
167
  handler: async (c) => await t(c),
156
- remove: r
157
- }, { remove: r };
168
+ remove: s
169
+ }, { remove: s };
158
170
  },
159
171
  triggerMicroAppLifeCycleListener: (e, t, n) => {
160
172
  var a;
161
- const r = L, { autoRemove: c = !1 } = n || {};
162
- for (const i in r) {
163
- const s = r[i];
164
- s.type === e && ((a = s == null ? void 0 : s.handler) == null || a.call(s, t).then(() => {
165
- c && s.remove();
173
+ const s = _, { autoRemove: c = !1 } = n || {};
174
+ for (const i in s) {
175
+ const r = s[i];
176
+ r.type === e && ((a = r == null ? void 0 : r.handler) == null || a.call(r, t).then(() => {
177
+ c && r.remove();
166
178
  }));
167
179
  }
168
180
  },
169
181
  reloadMicroAppRoute: async (e, t) => {
170
- const n = f.value.find((r) => r.name === e);
171
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => M(() => n.dom, r)), b(e, "route", { cmd: "reload", path: t })));
182
+ const n = f.value.find((s) => s.name === e);
183
+ n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "reload", path: t })));
172
184
  },
173
185
  unloadMicroAppRoute: async (e, t) => {
174
- const n = f.value.find((r) => r.name === e);
175
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => M(() => n.dom, r)), b(e, "route", { cmd: "unload", path: t })));
186
+ const n = f.value.find((s) => s.name === e);
187
+ n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "unload", path: t })));
176
188
  },
177
189
  setMainAppLayoutVisible: (e) => {
178
190
  q("layoutVisible", { visible: e });
179
191
  }
180
- }, u = O({
192
+ }, l = T({
181
193
  visible: !1,
194
+ theme: "default",
182
195
  logo: "",
183
196
  items: [],
184
197
  projects: [],
@@ -188,53 +201,56 @@ const b = (e, t, n) => {
188
201
  // activeItem: '',
189
202
  // activeProject: {},
190
203
  eventListeners: {}
191
- }), Ie = {
204
+ }), j = {
192
205
  show: () => {
193
- u.visible = !0;
206
+ l.visible = !0;
194
207
  },
195
208
  hide: () => {
196
- u.visible = !1;
209
+ l.visible = !1;
197
210
  },
198
211
  setLogo: (e) => {
199
- u.logo = e;
212
+ l.logo = e;
213
+ },
214
+ setTheme: (e) => {
215
+ l.theme = e;
200
216
  },
201
217
  setItems: (e) => {
202
- u.visible || (u.visible = !0), u.items = e;
218
+ l.visible || (l.visible = !0), l.items = e;
203
219
  },
204
- getItems: () => u.items,
220
+ getItems: () => l.items,
205
221
  removeItem: (e) => {
206
- const t = u.items.filter((n) => n.value !== e);
207
- u.items = t;
222
+ const t = l.items.filter((n) => n.value !== e);
223
+ l.items = t;
208
224
  },
209
225
  appendItem: (e) => {
210
- u.visible || (u.visible = !0), !u.items.find((n) => n.value == e.value) && u.items.push(e);
226
+ l.visible || (l.visible = !0), !l.items.find((n) => n.value == e.value) && l.items.push(e);
211
227
  },
212
228
  setActiveItem: (e) => {
213
- u.activeItem = e;
229
+ l.activeItem = e;
214
230
  },
215
231
  setConfig: (e) => {
216
- u.config = e;
232
+ l.config = e;
217
233
  },
218
234
  setProjects: (e) => {
219
- u.projects = e;
235
+ l.projects = e;
220
236
  },
221
237
  setProjectConfig: (e) => {
222
- u.projectConfig = e;
238
+ l.projectConfig = e;
223
239
  },
224
240
  setActiveProject: (e) => {
225
- u.activeProject = e;
241
+ l.activeProject = e;
226
242
  },
227
243
  setUserInfo: (e) => {
228
- u.userInfo = e;
244
+ l.userInfo = e;
229
245
  },
230
246
  setSearchConfig: (e) => {
231
- u.searchConfig = e;
247
+ l.searchConfig = e;
232
248
  },
233
249
  triggerEventListener: (e, t, n) => {
234
250
  var i;
235
- const r = u.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
236
- for (const s in r) {
237
- const o = r[s];
251
+ const s = l.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
252
+ for (const r in s) {
253
+ const o = s[r];
238
254
  o.type === e && a.push(
239
255
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
240
256
  c && o.remove();
@@ -244,10 +260,10 @@ const b = (e, t, n) => {
244
260
  return Promise.all(a).then(() => !0).catch(() => !1);
245
261
  },
246
262
  addEventListener: (e, t) => {
247
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
248
- u.eventListeners[n] && delete u.eventListeners[n];
263
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
264
+ l.eventListeners[n] && delete l.eventListeners[n];
249
265
  };
250
- return u.eventListeners[n] = {
266
+ return l.eventListeners[n] = {
251
267
  type: e,
252
268
  handler: async (c) => {
253
269
  try {
@@ -256,30 +272,38 @@ const b = (e, t, n) => {
256
272
  throw a;
257
273
  }
258
274
  },
259
- remove: r
275
+ remove: s
260
276
  }, {
261
- remove: r
277
+ remove: s
262
278
  };
263
279
  }
264
- }, y = O({
280
+ }, g = T({
281
+ theme: "default",
265
282
  items: [],
283
+ collapse: !1,
266
284
  eventListeners: {}
267
- }), Ee = {
285
+ }), H = {
268
286
  setItems: (e) => {
269
- y.items = e;
287
+ g.items = e;
288
+ },
289
+ getItems: () => g.items,
290
+ setTheme: (e) => {
291
+ g.theme = e;
270
292
  },
271
- getItems: () => y.items,
272
293
  setActiveItem: (e) => {
273
- y.activeItem = e;
294
+ g.activeItem = e;
295
+ },
296
+ setCollapse: (e) => {
297
+ g.collapse = e;
274
298
  },
275
299
  setPopupClassName: (e) => {
276
- y.popupClassName = e;
300
+ g.popupClassName = e;
277
301
  },
278
302
  triggerEventListener: (e, t, n) => {
279
303
  var i;
280
- const r = y.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
281
- for (const s in r) {
282
- const o = r[s];
304
+ const s = g.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
305
+ for (const r in s) {
306
+ const o = s[r];
283
307
  o.type === e && a.push(
284
308
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
285
309
  c && o.remove();
@@ -289,10 +313,10 @@ const b = (e, t, n) => {
289
313
  return Promise.all(a).then(() => !0).catch(() => !1);
290
314
  },
291
315
  addEventListener: (e, t) => {
292
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
293
- y.eventListeners[n] && delete y.eventListeners[n];
316
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
317
+ g.eventListeners[n] && delete g.eventListeners[n];
294
318
  };
295
- return y.eventListeners[n] = {
319
+ return g.eventListeners[n] = {
296
320
  type: e,
297
321
  handler: async (c) => {
298
322
  try {
@@ -301,35 +325,39 @@ const b = (e, t, n) => {
301
325
  throw a;
302
326
  }
303
327
  },
304
- remove: r
328
+ remove: s
305
329
  }, {
306
- remove: r
330
+ remove: s
307
331
  };
308
332
  }
309
- }, v = O({
333
+ }, A = T({
334
+ theme: "default",
310
335
  items: [],
311
336
  eventListeners: {}
312
- }), Se = {
337
+ }), U = {
313
338
  setItems: (e) => {
314
- v.items = e;
339
+ A.items = e;
340
+ },
341
+ getItems: () => A.items,
342
+ setTheme: (e) => {
343
+ A.theme = e;
315
344
  },
316
- getItems: () => v.items,
317
345
  removeItem: (e) => {
318
- const t = v.items.filter((n) => n.value !== e);
319
- v.items = t;
346
+ const t = A.items.filter((n) => n.value !== e);
347
+ A.items = t;
320
348
  },
321
349
  appendItem: (e) => {
322
- const t = v.items.findIndex((n) => n.value == e.value);
323
- t !== -1 ? v.items.splice(t, 1, e) : v.items.push(e);
350
+ const t = A.items.findIndex((n) => n.value == e.value);
351
+ t !== -1 ? A.items.splice(t, 1, e) : A.items.push(e);
324
352
  },
325
353
  setActiveItem: (e) => {
326
- v.activeItem = e;
354
+ A.activeItem = e;
327
355
  },
328
356
  triggerEventListener: (e, t, n) => {
329
357
  var i;
330
- const r = v.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
331
- for (const s in r) {
332
- const o = r[s];
358
+ const s = A.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
359
+ for (const r in s) {
360
+ const o = s[r];
333
361
  o.type === e && a.push(
334
362
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
335
363
  c && o.remove();
@@ -339,10 +367,10 @@ const b = (e, t, n) => {
339
367
  return Promise.all(a).then(() => !0).catch(() => !1);
340
368
  },
341
369
  addEventListener: (e, t) => {
342
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
343
- v.eventListeners[n] && delete v.eventListeners[n];
370
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
371
+ A.eventListeners[n] && delete A.eventListeners[n];
344
372
  };
345
- return v.eventListeners[n] = {
373
+ return A.eventListeners[n] = {
346
374
  type: e,
347
375
  handler: async (c) => {
348
376
  try {
@@ -351,19 +379,19 @@ const b = (e, t, n) => {
351
379
  throw a;
352
380
  }
353
381
  },
354
- remove: r
382
+ remove: s
355
383
  }, {
356
- remove: r
384
+ remove: s
357
385
  };
358
386
  }
359
- }, P = O({
387
+ }, P = T({
360
388
  eventListeners: {}
361
- }), Pe = {
389
+ }), Ce = {
362
390
  triggerEventListener: (e, t, n) => {
363
391
  var i;
364
- const r = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
365
- for (const s in r) {
366
- const o = r[s];
392
+ const s = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
393
+ for (const r in s) {
394
+ const o = s[r];
367
395
  o.type === e && a.push(
368
396
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
369
397
  c && o.remove();
@@ -373,7 +401,7 @@ const b = (e, t, n) => {
373
401
  return Promise.all(a).then(() => !0).catch(() => !1);
374
402
  },
375
403
  addEventListener: (e, t) => {
376
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
404
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
377
405
  P.eventListeners[n] && delete P.eventListeners[n];
378
406
  };
379
407
  return P.eventListeners[n] = {
@@ -385,81 +413,84 @@ const b = (e, t, n) => {
385
413
  throw a;
386
414
  }
387
415
  },
388
- remove: r
416
+ remove: s
389
417
  }, {
390
- remove: r
418
+ remove: s
391
419
  };
392
420
  }
393
- }, W = O({
421
+ }, B = T({
394
422
  visible: !1,
395
423
  style: {}
396
424
  }), Oe = {
397
425
  set: (e, t) => {
398
- W.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (W.style = t);
426
+ B.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (B.style = t);
399
427
  }
400
- }, Ce = {
401
- nav: u,
402
- menu: y,
403
- tab: v,
404
- overlay: W,
428
+ }, Fe = {
429
+ nav: l,
430
+ menu: g,
431
+ tab: A,
432
+ overlay: B,
405
433
  iframeView: P,
406
434
  visible: w(!0)
407
- }, j = {
408
- nav: Ie,
409
- menu: Ee,
410
- tab: Se,
435
+ }, G = {
436
+ nav: j,
437
+ menu: H,
438
+ tab: U,
411
439
  overlay: Oe,
412
- iframeView: Pe,
413
- setVisible: (e) => Ce.visible.value = e
414
- }, te = (e, t) => {
440
+ iframeView: Ce,
441
+ setVisible: (e) => Fe.visible.value = e,
442
+ setTheme: (e) => {
443
+ j.setTheme(e), H.setTheme(e), U.setTheme(e);
444
+ }
445
+ }, re = (e, t) => {
415
446
  const n = e.__vccOpts || e;
416
- for (const [r, c] of t)
417
- n[r] = c;
447
+ for (const [s, c] of t)
448
+ n[s] = c;
418
449
  return n;
419
450
  };
420
- var H;
421
- const B = typeof window < "u", Fe = (e) => typeof e == "string", Re = () => {
451
+ var J;
452
+ const $ = typeof window < "u", Re = (e) => typeof e == "string", Ne = () => {
422
453
  };
423
- B && ((H = window == null ? void 0 : window.navigator) != null && H.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
424
- function ne(e) {
454
+ $ && ((J = window == null ? void 0 : window.navigator) != null && J.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
455
+ function ae(e) {
425
456
  return typeof e == "function" ? e() : I(e);
426
457
  }
427
- function Te(e) {
458
+ function De(e) {
428
459
  return e;
429
460
  }
430
- function re(e) {
431
- return oe() ? (ce(e), !0) : !1;
461
+ function ie(e) {
462
+ return ue() ? (de(e), !0) : !1;
432
463
  }
433
- function De(e, t = !0) {
434
- le() ? ue(e) : t ? e() : Z(e);
464
+ function ke(e, t = !0) {
465
+ pe() ? me(e) : t ? e() : ne(e);
435
466
  }
436
- function se(e) {
467
+ function oe(e) {
437
468
  var t;
438
- const n = ne(e);
469
+ const n = ae(e);
439
470
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
440
471
  }
441
- const Ne = B ? window : void 0, ke = B ? window.document : void 0;
442
- function xe(...e) {
443
- let t, n, r, c;
444
- if (Fe(e[0]) || Array.isArray(e[0]) ? ([n, r, c] = e, t = Ne) : [t, n, r, c] = e, !t)
445
- return Re;
446
- Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
472
+ const xe = $ ? window : void 0, Ve = $ ? window.document : void 0;
473
+ function qe(...e) {
474
+ let t, n, s, c;
475
+ if (Re(e[0]) || Array.isArray(e[0]) ? ([n, s, c] = e, t = xe) : [t, n, s, c] = e, !t)
476
+ return Ne;
477
+ Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
447
478
  const a = [], i = () => {
448
- a.forEach((l) => l()), a.length = 0;
449
- }, s = (l, g, m, _) => (l.addEventListener(g, m, _), () => l.removeEventListener(g, m, _)), o = M(() => [se(t), ne(c)], ([l, g]) => {
450
- i(), l && a.push(...n.flatMap((m) => r.map((_) => s(l, m, _, g))));
479
+ a.forEach((u) => u()), a.length = 0;
480
+ }, r = (u, y, m, L) => (u.addEventListener(y, m, L), () => u.removeEventListener(y, m, L)), o = M(() => [oe(t), ae(c)], ([u, y]) => {
481
+ i(), u && a.push(...n.flatMap((m) => s.map((L) => r(u, m, L, y))));
451
482
  }, { immediate: !0, flush: "post" }), p = () => {
452
483
  o(), i();
453
484
  };
454
- return re(p), p;
485
+ return ie(p), p;
455
486
  }
456
- function Ve(e, t = !1) {
457
- const n = w(), r = () => n.value = !!e();
458
- return r(), De(r, t), n;
487
+ function Qe(e, t = !1) {
488
+ const n = w(), s = () => n.value = !!e();
489
+ return s(), ke(s, t), n;
459
490
  }
460
- const U = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, G = "__vueuse_ssr_handlers__";
461
- U[G] = U[G] || {};
462
- const J = [
491
+ const K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, X = "__vueuse_ssr_handlers__";
492
+ K[X] = K[X] || {};
493
+ const Y = [
463
494
  [
464
495
  "requestFullscreen",
465
496
  "exitFullscreen",
@@ -501,54 +532,54 @@ const J = [
501
532
  "MSFullscreenError"
502
533
  ]
503
534
  ];
504
- function qe(e, t = {}) {
505
- const { document: n = ke, autoExit: r = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
506
- let i = J[0];
507
- const s = Ve(() => {
535
+ function Be(e, t = {}) {
536
+ const { document: n = Ve, autoExit: s = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
537
+ let i = Y[0];
538
+ const r = Qe(() => {
508
539
  if (n) {
509
- for (const S of J)
540
+ for (const S of Y)
510
541
  if (S[1] in n)
511
542
  return i = S, !0;
512
543
  } else
513
544
  return !1;
514
545
  return !1;
515
- }), [o, p, l, , g] = i;
546
+ }), [o, p, u, , y] = i;
516
547
  async function m() {
517
- s.value && (n != null && n[l] && await n[p](), a.value = !1);
548
+ r.value && (n != null && n[u] && await n[p](), a.value = !1);
518
549
  }
519
- async function _() {
520
- if (!s.value)
550
+ async function L() {
551
+ if (!r.value)
521
552
  return;
522
553
  await m();
523
- const S = se(c);
554
+ const S = oe(c);
524
555
  S && (await S[o](), a.value = !0);
525
556
  }
526
- async function ie() {
527
- a.value ? await m() : await _();
557
+ async function le() {
558
+ a.value ? await m() : await L();
528
559
  }
529
- return n && xe(n, g, () => {
530
- a.value = !!(n != null && n[l]);
531
- }, !1), r && re(m), {
532
- isSupported: s,
560
+ return n && qe(n, y, () => {
561
+ a.value = !!(n != null && n[u]);
562
+ }, !1), s && ie(m), {
563
+ isSupported: r,
533
564
  isFullscreen: a,
534
- enter: _,
565
+ enter: L,
535
566
  exit: m,
536
- toggle: ie
567
+ toggle: le
537
568
  };
538
569
  }
539
- var K;
570
+ var Z;
540
571
  (function(e) {
541
572
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
542
- })(K || (K = {}));
543
- var Qe = Object.defineProperty, X = Object.getOwnPropertySymbols, We = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, Y = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, $e = (e, t) => {
573
+ })(Z || (Z = {}));
574
+ var $e = Object.defineProperty, ee = Object.getOwnPropertySymbols, ze = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, te = (e, t, n) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, je = (e, t) => {
544
575
  for (var n in t || (t = {}))
545
- We.call(t, n) && Y(e, n, t[n]);
546
- if (X)
547
- for (var n of X(t))
548
- Be.call(t, n) && Y(e, n, t[n]);
576
+ ze.call(t, n) && te(e, n, t[n]);
577
+ if (ee)
578
+ for (var n of ee(t))
579
+ We.call(t, n) && te(e, n, t[n]);
549
580
  return e;
550
581
  };
551
- const ze = {
582
+ const He = {
552
583
  easeInSine: [0.12, 0, 0.39, 0],
553
584
  easeOutSine: [0.61, 1, 0.88, 1],
554
585
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -574,10 +605,10 @@ const ze = {
574
605
  easeOutBack: [0.34, 1.56, 0.64, 1],
575
606
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
576
607
  };
577
- $e({
578
- linear: Te
579
- }, ze);
580
- const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
608
+ je({
609
+ linear: De
610
+ }, He);
611
+ const Ue = ["src", "entry", "name"], Ge = /* @__PURE__ */ x({
581
612
  __name: "das-micro-app",
582
613
  props: {
583
614
  src: {},
@@ -586,27 +617,27 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
586
617
  },
587
618
  emits: ["onLoaded", "onActivated", "onDeactivated"],
588
619
  setup(e, { emit: t }) {
589
- const n = e, r = t, c = (s) => {
590
- r("onLoaded", s);
591
- }, a = D(() => n.actived);
592
- return M(() => a.value, (s) => {
593
- s && r("onActivated"), s || r("onDeactivated");
594
- }), (s, o) => (E(), N("iframe", {
620
+ const n = e, s = t, c = (r) => {
621
+ s("onLoaded", r);
622
+ }, a = N(() => n.actived);
623
+ return M(() => a.value, (r) => {
624
+ r && s("onActivated"), r || s("onDeactivated");
625
+ }), (r, o) => (E(), D("iframe", {
595
626
  class: "das-micro-app",
596
627
  src: n.src,
597
628
  entry: n.src,
598
629
  name: n.name,
599
630
  frameborder: "0",
600
631
  onLoad: c
601
- }, null, 40, je));
632
+ }, null, 40, Ue));
602
633
  }
603
- }), Ue = /* @__PURE__ */ te(He, [["__scopeId", "data-v-8ae871f6"]]), Ge = /* @__PURE__ */ x({
634
+ }), Je = /* @__PURE__ */ re(Ge, [["__scopeId", "data-v-8ae871f6"]]), Ke = /* @__PURE__ */ x({
604
635
  __name: "das-micro-apps",
605
636
  setup(e) {
606
637
  const t = w(null), n = async (a, i) => {
607
- const s = f.value.find((m) => m.name === i);
608
- if (!s) return;
609
- s.dom = a.target, await Z(), await new Promise((m) => setTimeout(m, 50));
638
+ const r = f.value.find((m) => m.name === i);
639
+ if (!r) return;
640
+ r.dom = a.target, await ne(), await new Promise((m) => setTimeout(m, 50));
610
641
  const o = () => {
611
642
  const m = t.value.getBoundingClientRect() || {};
612
643
  return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
@@ -614,63 +645,45 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
614
645
  d.sendMessageToMicroApp(i, "onLoaded", {
615
646
  href: location.href,
616
647
  microAppContainerRect: o(),
617
- entry: s.entry,
618
- name: s.name
648
+ entry: r.entry,
649
+ name: r.name
619
650
  });
620
- const { dom: p, ...l } = s;
621
- d.triggerMicroAppLifeCycleListener("onLoaded", l), new ResizeObserver(() => {
651
+ const { dom: p, ...u } = r;
652
+ d.triggerMicroAppLifeCycleListener("onLoaded", u), new ResizeObserver(() => {
622
653
  d.sendMessageToMicroApp(i, "resize", o());
623
654
  }).observe(t.value), d.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
624
- }, r = (a, i) => {
625
- const s = f.value.find((l) => l.name === i);
626
- if (!s) return;
627
- const { dom: o, ...p } = s;
655
+ }, s = (a, i) => {
656
+ const r = f.value.find((u) => u.name === i);
657
+ if (!r) return;
658
+ const { dom: o, ...p } = r;
628
659
  d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", p);
629
660
  }, c = (a, i) => {
630
- const s = f.value.find((l) => l.name === i);
631
- if (!s) return;
632
- const { dom: o, ...p } = s;
661
+ const r = f.value.find((u) => u.name === i);
662
+ if (!r) return;
663
+ const { dom: o, ...p } = r;
633
664
  d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
634
665
  };
635
- return (a, i) => (E(), N(
636
- "div",
637
- {
638
- ref_key: "containerRef",
639
- ref: t,
640
- class: "das-micro-app-container"
641
- },
642
- [
643
- (E(!0), N(
644
- $,
645
- null,
646
- de(I(f), (s) => (E(), N(
647
- $,
648
- null,
649
- [
650
- s.loaded ? pe((E(), ee(Ue, {
651
- key: 0,
652
- src: s.src || "",
653
- name: s.name,
654
- actived: s.actived,
655
- onOnLoaded: (o) => n(o, s.name),
656
- onOnActivated: (o) => r(o, s.name),
657
- onOnDeactivated: (o) => c(o, s.name)
658
- }, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
659
- [me, s.actived]
660
- ]) : fe("v-if", !0)
661
- ],
662
- 64
663
- /* STABLE_FRAGMENT */
664
- ))),
665
- 256
666
- /* UNKEYED_FRAGMENT */
667
- ))
668
- ],
669
- 512
670
- /* NEED_PATCH */
671
- ));
666
+ return (a, i) => (E(), D("div", {
667
+ ref_key: "containerRef",
668
+ ref: t,
669
+ class: "das-micro-app-container"
670
+ }, [
671
+ (E(!0), D(z, null, fe(I(f), (r) => (E(), D(z, null, [
672
+ r.loaded ? ve((E(), se(Je, {
673
+ key: 0,
674
+ src: r.src || "",
675
+ name: r.name,
676
+ actived: r.actived,
677
+ onOnLoaded: (o) => n(o, r.name),
678
+ onOnActivated: (o) => s(o, r.name),
679
+ onOnDeactivated: (o) => c(o, r.name)
680
+ }, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
681
+ [he, r.actived]
682
+ ]) : Ae("", !0)
683
+ ], 64))), 256))
684
+ ], 512));
672
685
  }
673
- }), Je = /* @__PURE__ */ te(Ge, [["__scopeId", "data-v-3abdb1e9"]]), Ze = /* @__PURE__ */ x({
686
+ }), Xe = /* @__PURE__ */ re(Ke, [["__scopeId", "data-v-3abdb1e9"]]), tt = /* @__PURE__ */ x({
674
687
  __name: "das-main-app-layout",
675
688
  props: {
676
689
  transitionConfig: { default: () => {
@@ -684,93 +697,92 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
684
697
  } }
685
698
  },
686
699
  setup(e) {
687
- const t = e, n = D(() => !k.value), r = D(() => ({
700
+ const t = e, n = N(() => !k.value), s = N(() => ({
688
701
  "enter-active-class": "animate__animated animate__fadeInLeft",
689
702
  ...t.transitionConfig
690
- })), c = D(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
691
- return (a, i) => (E(), ee(I(he), ve({
692
- "transition-config": r.value,
703
+ })), c = N(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
704
+ return (a, i) => (E(), se(I(ye), we({
705
+ "transition-config": s.value,
693
706
  "router-view-visible": n.value
694
707
  }, c.value), {
695
708
  header: C(() => [
696
709
  V(a.$slots, "header", {}, () => [
697
- F(I(we))
710
+ O(I(Me))
698
711
  ])
699
712
  ]),
700
713
  aside: C(() => [
701
714
  V(a.$slots, "aside", {}, () => [
702
- F(I(ge), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
715
+ O(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
703
716
  ])
704
717
  ]),
705
718
  tab: C(() => [
706
719
  V(a.$slots, "tab", {}, () => [
707
- F(I(ye), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
720
+ O(I(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
708
721
  ])
709
722
  ]),
710
723
  default: C(() => [
711
- F(Je)
724
+ O(Xe)
712
725
  ]),
713
726
  _: 3
714
- /* FORWARDED */
715
727
  }, 16, ["transition-config", "router-view-visible"]));
716
728
  }
717
- }), ae = /* @__PURE__ */ x({
729
+ }), ce = /* @__PURE__ */ x({
718
730
  __name: "das-micro-app-ghost",
719
731
  setup(e) {
720
- return Ae(() => {
732
+ return ge(() => {
721
733
  setTimeout(() => {
722
734
  document.documentElement.checkVisibility() && history.back();
723
735
  }, 300);
724
736
  }), (t, n) => null;
725
737
  }
726
- }), Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, et = (e, t) => {
738
+ }), Ye = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, nt = (e, t) => {
727
739
  if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
728
- window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (z.value = e.microAppRouterPrefix), f.value = (e.microApps || []).filter((c) => !!c.name).map((c) => ({ ...c, entry: Ke(c.entry || c.name) })), t == null || t.addRoute({
740
+ window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (W.value = e.microAppRouterPrefix), f.value = (e.microApps || []).filter((c) => !!c.name).map((c) => ({ ...c, entry: Ye(c.entry || c.name) })), t == null || t.addRoute({
729
741
  name: "das-micro-app",
730
- path: `${z.value}/:pathMatch(.*)*`,
731
- component: ae,
742
+ path: `${W.value}/:pathMatch(.*)*`,
743
+ component: ce,
732
744
  meta: { isMicroApp: !0, keepAlive: !0 }
733
745
  }), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
734
746
  const { visible: a, style: i } = c.data;
735
- j.overlay.set(a, i);
747
+ G.overlay.set(a, i);
736
748
  }), d.addEventListenerFromMicroApp("layoutVisible", (c) => {
737
749
  const { visible: a } = c.data;
738
- j.setVisible(a);
750
+ G.setVisible(a);
739
751
  }), d.addEventListenerFromMicroApp("route", (c) => {
740
- const { name: a, cmd: i, path: s } = c.data;
741
- i === "reload" && d.reloadMicroAppRoute(a, s), i === "unload" && d.unloadMicroAppRoute(a, s);
752
+ const { name: a, cmd: i, path: r } = c.data;
753
+ i === "reload" && d.reloadMicroAppRoute(a, r), i === "unload" && d.unloadMicroAppRoute(a, r);
742
754
  });
743
- const { enter: n, exit: r } = qe();
755
+ const { enter: n, exit: s } = Be();
744
756
  d.addEventListenerFromMicroApp("fullscreen", (c) => {
745
757
  const a = c.data;
746
- a && n(), a || r();
758
+ a && n(), a || s();
747
759
  }), d.addEventListenerFromMicroApp("location", (c) => {
748
760
  const { cmd: a, isAutoCloseApp: i } = c.data || {};
749
761
  a === "reload" && (i !== void 0 && (window.__isAutoCloseApp = i), location.reload());
750
762
  });
751
- }, tt = (e, t) => {
763
+ }, st = (e, t) => {
752
764
  if (!(e != null && e.microAppName)) return;
753
765
  window.config.microAppName = e.microAppName, window.self !== window.top && e.microAppName && (window.__IN_DAS_MICRO_APP = !0);
754
766
  const n = "das-micro-app-ghost";
755
767
  t == null || t.addRoute({
756
768
  name: n,
757
769
  path: `/${n}/:pathMatch(.*)*`,
758
- component: ae,
770
+ component: ce,
759
771
  meta: { isMicroApp: !0, keepAlive: !0 }
760
772
  });
761
- const r = w(!1), c = w(!1), a = w("");
773
+ const s = w(!1), c = w(!1), a = w("");
762
774
  M(
763
775
  () => t.currentRoute.value,
764
776
  (i) => {
765
- if (r.value) {
766
- r.value = !1;
777
+ if (s.value) {
778
+ s.value = !1;
767
779
  return;
768
780
  }
769
781
  if (c.value) {
770
782
  c.value = !1;
771
783
  return;
772
784
  }
773
- const { path: s, query: o, params: p, meta: l } = i;
785
+ const { path: r, query: o, params: p, meta: u } = i;
774
786
  if (a.value.includes(i.path)) {
775
787
  a.value = "";
776
788
  return;
@@ -778,45 +790,45 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
778
790
  d.sendMessageToMainApp("router", {
779
791
  cmd: "push",
780
792
  route: {
781
- path: s,
793
+ path: r,
782
794
  query: { ...o, microAppName: e.microAppName },
783
795
  params: p,
784
- meta: l
796
+ meta: u
785
797
  }
786
798
  });
787
799
  }
788
800
  ), d.addEventListenerFromMainApp("router", async (i) => {
789
- var l;
790
- const { cmd: s, route: o, microAppName: p = "" } = i.data;
791
- a.value = ("/" + p + o.path).replace(/\/\//g, "/"), (l = t == null ? void 0 : t[s]) == null || l.call(t, o);
801
+ var u;
802
+ const { cmd: r, route: o, microAppName: p = "" } = i.data;
803
+ a.value = ("/" + p + o.path).replace(/\/\//g, "/"), (u = t == null ? void 0 : t[r]) == null || u.call(t, o);
792
804
  }), d.addEventListenerFromMainApp("onLoaded", (i) => {
793
- const { href: s, microAppContainerRect: o } = i.data;
794
- window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF = s, window.__DAS_MICRO_APP_CONTAINER_RECT = o;
805
+ const { href: r, microAppContainerRect: o } = i.data;
806
+ window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF = r, window.__DAS_MICRO_APP_CONTAINER_RECT = o;
795
807
  }), d.addEventListenerFromMainApp("onDeactivated", (i) => {
796
- const { name: s = "", path: o, params: p = {}, query: l = {} } = t.currentRoute.value;
808
+ const { name: r = "", path: o, params: p = {}, query: u = {} } = t.currentRoute.value;
797
809
  c.value = !0, t == null || t.push({
798
810
  name: n,
799
- query: { microAppName: e.microAppName, fromQuery: JSON.stringify(l), fromPath: o },
811
+ query: { microAppName: e.microAppName, fromQuery: JSON.stringify(u), fromPath: o },
800
812
  params: p
801
813
  });
802
814
  }), d.addEventListenerFromMainApp("onActivated", (i) => {
803
- const { name: s = "", params: o = {}, query: p = {} } = t.currentRoute.value, { fromPath: l = "", fromQuery: g = "{}" } = p || {};
804
- r.value = !0, t == null || t.push({ path: l, query: JSON.parse(g), params: o });
815
+ const { name: r = "", params: o = {}, query: p = {} } = t.currentRoute.value, { fromPath: u = "", fromQuery: y = "{}" } = p || {};
816
+ s.value = !0, t == null || t.push({ path: u, query: JSON.parse(y), params: o });
805
817
  }), d.addEventListenerFromMainApp("sessionStorage", (i) => {
806
- const { cmd: s, key: o, value: p } = i.data;
807
- s === "setItem" && window.sessionStorage.setItem(o, p), s === "getItem" && window.sessionStorage.getItem(o), s === "removeItem" && window.sessionStorage.removeItem(o), s === "clear" && window.sessionStorage.clear();
818
+ const { cmd: r, key: o, value: p } = i.data;
819
+ r === "setItem" && window.sessionStorage.setItem(o, p), r === "getItem" && window.sessionStorage.getItem(o), r === "removeItem" && window.sessionStorage.removeItem(o), r === "clear" && window.sessionStorage.clear();
808
820
  }), d.addEventListenerFromMainApp("route", (i) => {
809
- const { cmd: s, path: o } = i.data;
810
- s === "reload" && (R.value.push(o), T.value = !1, setTimeout(() => {
811
- T.value = !0, R.value = [];
812
- }, 300)), s === "unload" && (R.value.push(o), T.value = !1, setTimeout(() => {
813
- T.value = !0, R.value = [];
821
+ const { cmd: r, path: o } = i.data;
822
+ r === "reload" && (F.value.push(o), R.value = !1, setTimeout(() => {
823
+ R.value = !0, F.value = [];
824
+ }, 300)), r === "unload" && (F.value.push(o), R.value = !1, setTimeout(() => {
825
+ R.value = !0, F.value = [];
814
826
  }, 100));
815
827
  });
816
828
  };
817
829
  export {
818
- Ze as DasMainAppLayout,
819
- et as initMainApp,
820
- tt as initMicroApp,
830
+ tt as DasMainAppLayout,
831
+ nt as initMainApp,
832
+ st as initMicroApp,
821
833
  d as microFrontend
822
834
  };