@das-fed/web 6.4.0-dev.4 → 6.4.0-dev.41

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 (76) hide show
  1. package/esm-map.json +2 -1
  2. package/index-BJaVqwM1.js +7439 -0
  3. package/index-BJaVqwM1.js.gz +0 -0
  4. package/{index-D8XgnluX.js → index-BqdkqUh1.js} +1 -1
  5. package/index-DTXiRF91.js +75 -0
  6. package/index-DTXiRF91.js.gz +0 -0
  7. package/index.js +16 -15
  8. package/package.json +6 -6
  9. package/packages/create-das-web-app/config.js +1 -0
  10. package/packages/create-das-web-app/index.js +48 -802
  11. package/packages/create-das-web-app/index.js.gz +0 -0
  12. package/packages/i18n/config.js +1 -0
  13. package/packages/i18n/index.js +25 -24
  14. package/packages/i18n/index.js.gz +0 -0
  15. package/packages/layout/config.js +1 -0
  16. package/packages/layout/index.js +450 -406
  17. package/packages/layout/index.js.gz +0 -0
  18. package/packages/layout/style.css +2 -2
  19. package/packages/layout/style.css.gz +0 -0
  20. package/packages/main-app-framework/config.js +1 -0
  21. package/packages/main-app-framework/index-D3CMerRp.js +75 -0
  22. package/packages/main-app-framework/index-D3CMerRp.js.gz +0 -0
  23. package/packages/main-app-framework/index-DCoCFFJH.js +6097 -0
  24. package/packages/main-app-framework/index-DCoCFFJH.js.gz +0 -0
  25. package/packages/main-app-framework/{index-BkJc1lDT.js → index-GuLooLSc.js} +1 -1
  26. package/packages/main-app-framework/index.js +1 -1
  27. package/packages/main-app-framework/style.css +1 -1
  28. package/packages/main-app-framework/style.css.gz +0 -0
  29. package/packages/micro-frontend/config.js +1 -0
  30. package/packages/micro-frontend/index.js +180 -163
  31. package/packages/micro-frontend/index.js.gz +0 -0
  32. package/packages/micro-frontend/style.css +1 -1
  33. package/packages/style/config.js +1 -0
  34. package/packages/style/style.css +1 -1
  35. package/packages/style/style.css.gz +0 -0
  36. package/packages/theme/config.js +1 -0
  37. package/packages/theme/index.js.gz +0 -0
  38. package/style.css +2 -2
  39. package/style.css.gz +0 -0
  40. package/types/create-das-web-app/index.d.ts +1 -1
  41. package/types/i18n/index.d.ts +2 -2
  42. package/types/layout/index.d.ts +1 -1
  43. package/types/layout/store/index.d.ts +6 -1
  44. package/types/layout/store/menu.d.ts +2 -0
  45. package/types/layout/store/nav.d.ts +1 -0
  46. package/types/layout/store/tab.d.ts +1 -0
  47. package/types/main-app-framework/business/alarm/use-alarm.d.ts +4 -4
  48. package/types/main-app-framework/business/video-link/api.d.ts +2 -0
  49. package/types/main-app-framework/business/video-link/index.d.ts +3 -3
  50. package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +3 -3
  51. package/types/main-app-framework/components/iframe-page/index.d.ts +3 -0
  52. package/types/main-app-framework/components/index.d.ts +1 -0
  53. package/types/main-app-framework/components/person-set-dialog/index.d.ts +1 -1
  54. package/types/main-app-framework/index.d.ts +1 -1
  55. package/types/main-app-framework/init-config/get-nav-config/api.d.ts +2 -0
  56. package/types/main-app-framework/init-config/get-nav-config/index.d.ts +4 -3
  57. package/types/main-app-framework/init-config/get-system-config/index.d.ts +3 -3
  58. package/types/main-app-framework/init-layout/hooks/nav-slots/use-change-enterprises.d.ts +3 -3
  59. package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +2 -2
  60. package/types/main-app-framework/init-layout/hooks/use-initialization.d.ts +4 -4
  61. package/types/main-app-framework/init-layout/hooks/use-tabs.d.ts +3 -3
  62. package/types/main-app-framework/init-platform/index.d.ts +1 -1
  63. package/types/micro-frontend/store.d.ts +5 -5
  64. package/types/theme/index.d.ts +1 -1
  65. package/index--5iw3PcC.js +0 -7970
  66. package/index--5iw3PcC.js.gz +0 -0
  67. package/index-BSYJheVx.js +0 -68
  68. package/index-BSYJheVx.js.gz +0 -0
  69. package/index-C5zNxpQk.js +0 -70
  70. package/index-C5zNxpQk.js.gz +0 -0
  71. package/packages/main-app-framework/index-C_X3k7z0.js +0 -70
  72. package/packages/main-app-framework/index-C_X3k7z0.js.gz +0 -0
  73. package/packages/main-app-framework/index-D7pfTqeW.js +0 -5917
  74. package/packages/main-app-framework/index-D7pfTqeW.js.gz +0 -0
  75. package/packages/main-app-framework/index-MhsbUVtD.js +0 -68
  76. package/packages/main-app-framework/index-MhsbUVtD.js.gz +0 -0
@@ -1,812 +1,58 @@
1
- import { effectScope as oe, ref as B, markRaw as J, toRaw as L, watch as se, unref as ie, createApp as ae } from "vue";
2
- import { initTheme as ce } from "@das-fed/web/packages/theme/index";
3
- import { initI18n as le } from "@das-fed/web/packages/i18n/index";
4
- import { DasWebLayout as ue } from "@das-fed/web/packages/layout/index";
5
- import { createRouter as fe, createWebHistory as de } from "vue-router";
6
- const ge = {
7
- install: (e, t) => {
8
- var n;
9
- const r = (n = t == null ? void 0 : t.plugins) == null ? void 0 : n.glob;
10
- r && Object.values(r).sort((o, s) => (o.index ?? 0) - (s.index ?? 0)).filter((o) => o ? !!(o.default && o.default.install || o.install) : !1).forEach((o) => {
11
- o.default && o.default.install && e.use(o.default, t), o.install && e.use(o, t);
1
+ import { ref as x, createApp as O } from "vue";
2
+ import { initTheme as P } from "@das-fed/web/packages/theme/index";
3
+ import { initI18n as W } from "@das-fed/web/packages/i18n/index";
4
+ import { DasWebLayout as $ } from "@das-fed/web/packages/layout/index";
5
+ import { createPinia as j } from "pinia";
6
+ import k from "pinia-plugin-persistedstate";
7
+ import { createRouter as y, createWebHistory as D } from "vue-router";
8
+ const N = {
9
+ install: (e, a) => {
10
+ var l;
11
+ const c = (l = a == null ? void 0 : a.plugins) == null ? void 0 : l.glob;
12
+ c && Object.values(c).sort((t, u) => (t.index ?? 0) - (u.index ?? 0)).filter((t) => t ? !!(t.default && t.default.install || t.install) : !1).forEach((t) => {
13
+ t.default && t.default.install && e.use(t.default, a), t.install && e.use(t, a);
12
14
  });
13
15
  }
14
- };
15
- var he = !1;
16
- function pe() {
17
- return z().__VUE_DEVTOOLS_GLOBAL_HOOK__;
18
- }
19
- function z() {
20
- return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
21
- }
22
- const me = typeof Proxy == "function", _e = "devtools-plugin:setup", ye = "plugin:settings:set";
23
- let v, P;
24
- function be() {
25
- var e;
26
- return v !== void 0 || (typeof window < "u" && window.performance ? (v = !0, P = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (v = !0, P = globalThis.perf_hooks.performance) : v = !1), v;
27
- }
28
- function Se() {
29
- return be() ? P.now() : Date.now();
30
- }
31
- class ve {
32
- constructor(t, r) {
33
- this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = r;
34
- const n = {};
35
- if (t.settings)
36
- for (const i in t.settings) {
37
- const a = t.settings[i];
38
- n[i] = a.defaultValue;
39
- }
40
- const o = `__vue-devtools-plugin-settings__${t.id}`;
41
- let s = Object.assign({}, n);
42
- try {
43
- const i = localStorage.getItem(o), a = JSON.parse(i);
44
- Object.assign(s, a);
45
- } catch {
46
- }
47
- this.fallbacks = {
48
- getSettings() {
49
- return s;
50
- },
51
- setSettings(i) {
52
- try {
53
- localStorage.setItem(o, JSON.stringify(i));
54
- } catch {
55
- }
56
- s = i;
57
- },
58
- now() {
59
- return Se();
60
- }
61
- }, r && r.on(ye, (i, a) => {
62
- i === this.plugin.id && this.fallbacks.setSettings(a);
63
- }), this.proxiedOn = new Proxy({}, {
64
- get: (i, a) => this.target ? this.target.on[a] : (...c) => {
65
- this.onQueue.push({
66
- method: a,
67
- args: c
68
- });
69
- }
70
- }), this.proxiedTarget = new Proxy({}, {
71
- get: (i, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...c) => (this.targetQueue.push({
72
- method: a,
73
- args: c,
74
- resolve: () => {
75
- }
76
- }), this.fallbacks[a](...c)) : (...c) => new Promise((l) => {
77
- this.targetQueue.push({
78
- method: a,
79
- args: c,
80
- resolve: l
81
- });
82
- })
83
- });
84
- }
85
- async setRealTarget(t) {
86
- this.target = t;
87
- for (const r of this.onQueue)
88
- this.target.on[r.method](...r.args);
89
- for (const r of this.targetQueue)
90
- r.resolve(await this.target[r.method](...r.args));
91
- }
92
- }
93
- function W(e, t) {
94
- const r = e, n = z(), o = pe(), s = me && r.enableEarlyProxy;
95
- if (o && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
96
- o.emit(_e, e, t);
97
- else {
98
- const i = s ? new ve(r, o) : null;
99
- (n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
100
- pluginDescriptor: r,
101
- setupFn: t,
102
- proxy: i
103
- }), i && t(i.proxiedTarget);
104
- }
105
- }
106
- /*!
107
- * pinia v2.1.7
108
- * (c) 2023 Eduardo San Martin Morote
109
- * @license MIT
110
- */
111
- const we = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
112
- /* istanbul ignore next */
113
- Symbol()
114
- );
115
- var y;
116
- (function(e) {
117
- e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
118
- })(y || (y = {}));
119
- const Q = typeof window < "u", U = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Q, C = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
120
- function Oe(e, { autoBom: t = !1 } = {}) {
121
- return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
122
- }
123
- function j(e, t, r) {
124
- const n = new XMLHttpRequest();
125
- n.open("GET", e), n.responseType = "blob", n.onload = function() {
126
- q(n.response, t, r);
127
- }, n.onerror = function() {
128
- }, n.send();
129
- }
130
- function Y(e) {
131
- const t = new XMLHttpRequest();
132
- t.open("HEAD", e, !1);
133
- try {
134
- t.send();
135
- } catch {
136
- }
137
- return t.status >= 200 && t.status <= 299;
138
- }
139
- function O(e) {
140
- try {
141
- e.dispatchEvent(new MouseEvent("click"));
142
- } catch {
143
- const r = document.createEvent("MouseEvents");
144
- r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(r);
145
- }
146
- }
147
- const I = typeof navigator == "object" ? navigator : { userAgent: "" }, K = /Macintosh/.test(I.userAgent) && /AppleWebKit/.test(I.userAgent) && !/Safari/.test(I.userAgent), q = Q ? (
148
- // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
149
- typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !K ? Ie : (
150
- // Use msSaveOrOpenBlob as a second approach
151
- "msSaveOrOpenBlob" in I ? Ee : (
152
- // Fallback to using FileReader and a popup
153
- Te
154
- )
155
- )
156
- ) : () => {
157
- };
158
- function Ie(e, t = "download", r) {
159
- const n = document.createElement("a");
160
- n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Y(n.href) ? j(e, t, r) : (n.target = "_blank", O(n)) : O(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
161
- URL.revokeObjectURL(n.href);
162
- }, 4e4), setTimeout(function() {
163
- O(n);
164
- }, 0));
165
- }
166
- function Ee(e, t = "download", r) {
167
- if (typeof e == "string")
168
- if (Y(e))
169
- j(e, t, r);
170
- else {
171
- const n = document.createElement("a");
172
- n.href = e, n.target = "_blank", setTimeout(function() {
173
- O(n);
174
- });
175
- }
176
- else
177
- navigator.msSaveOrOpenBlob(Oe(e, r), t);
178
- }
179
- function Te(e, t, r, n) {
180
- if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
181
- return j(e, t, r);
182
- const o = e.type === "application/octet-stream", s = /constructor/i.test(String(C.HTMLElement)) || "safari" in C, i = /CriOS\/[\d]+/.test(navigator.userAgent);
183
- if ((i || o && s || K) && typeof FileReader < "u") {
184
- const a = new FileReader();
185
- a.onloadend = function() {
186
- let c = a.result;
187
- if (typeof c != "string")
188
- throw n = null, new Error("Wrong reader.result type");
189
- c = i ? c : c.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = c : location.assign(c), n = null;
190
- }, a.readAsDataURL(e);
191
- } else {
192
- const a = URL.createObjectURL(e);
193
- n ? n.location.assign(a) : location.href = a, n = null, setTimeout(function() {
194
- URL.revokeObjectURL(a);
195
- }, 4e4);
196
- }
197
- }
198
- function u(e, t) {
199
- const r = "🍍 " + e;
200
- typeof __VUE_DEVTOOLS_TOAST__ == "function" && __VUE_DEVTOOLS_TOAST__(r, t);
201
- }
202
- function x(e) {
203
- return "_a" in e && "install" in e;
204
- }
205
- function X() {
206
- if (!("clipboard" in navigator))
207
- return u("Your browser doesn't support the Clipboard API", "error"), !0;
208
- }
209
- function Z(e) {
210
- return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (u('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
211
- }
212
- async function $e(e) {
213
- if (!X())
214
- try {
215
- await navigator.clipboard.writeText(JSON.stringify(e.state.value)), u("Global state copied to clipboard.");
216
- } catch (t) {
217
- if (Z(t))
218
- return;
219
- u("Failed to serialize the state. Check the console for more details.", "error");
220
- }
221
- }
222
- async function Ae(e) {
223
- if (!X())
224
- try {
225
- ee(e, JSON.parse(await navigator.clipboard.readText())), u("Global state pasted from clipboard.");
226
- } catch (t) {
227
- if (Z(t))
228
- return;
229
- u("Failed to deserialize the state from clipboard. Check the console for more details.", "error");
230
- }
231
- }
232
- async function Pe(e) {
233
- try {
234
- q(new Blob([JSON.stringify(e.state.value)], {
235
- type: "text/plain;charset=utf-8"
236
- }), "pinia-state.json");
237
- } catch {
238
- u("Failed to export the state as JSON. Check the console for more details.", "error");
239
- }
240
- }
241
- let p;
242
- function ke() {
243
- p || (p = document.createElement("input"), p.type = "file", p.accept = ".json");
244
- function e() {
245
- return new Promise((t, r) => {
246
- p.onchange = async () => {
247
- const n = p.files;
248
- if (!n)
249
- return t(null);
250
- const o = n.item(0);
251
- return t(o ? { text: await o.text(), file: o } : null);
252
- }, p.oncancel = () => t(null), p.onerror = r, p.click();
253
- });
254
- }
255
- return e;
256
- }
257
- async function Re(e) {
258
- try {
259
- const r = await ke()();
260
- if (!r)
261
- return;
262
- const { text: n, file: o } = r;
263
- ee(e, JSON.parse(n)), u(`Global state imported from "${o.name}".`);
264
- } catch {
265
- u("Failed to import the state from JSON. Check the console for more details.", "error");
266
- }
267
- }
268
- function ee(e, t) {
269
- for (const r in t) {
270
- const n = e.state.value[r];
271
- n ? Object.assign(n, t[r]) : e.state.value[r] = t[r];
272
- }
273
- }
274
- function g(e) {
275
- return {
276
- _custom: {
277
- display: e
278
- }
279
- };
280
- }
281
- const te = "🍍 Pinia (root)", k = "_root";
282
- function Le(e) {
283
- return x(e) ? {
284
- id: k,
285
- label: te
286
- } : {
287
- id: e.$id,
288
- label: e.$id
289
- };
290
- }
291
- function je(e) {
292
- if (x(e)) {
293
- const r = Array.from(e._s.keys()), n = e._s;
294
- return {
295
- state: r.map((s) => ({
296
- editable: !0,
297
- key: s,
298
- value: e.state.value[s]
299
- })),
300
- getters: r.filter((s) => n.get(s)._getters).map((s) => {
301
- const i = n.get(s);
302
- return {
303
- editable: !1,
304
- key: s,
305
- value: i._getters.reduce((a, c) => (a[c] = i[c], a), {})
306
- };
307
- })
308
- };
309
- }
310
- const t = {
311
- state: Object.keys(e.$state).map((r) => ({
312
- editable: !0,
313
- key: r,
314
- value: e.$state[r]
315
- }))
316
- };
317
- return e._getters && e._getters.length && (t.getters = e._getters.map((r) => ({
318
- editable: !1,
319
- key: r,
320
- value: e[r]
321
- }))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((r) => ({
322
- editable: !0,
323
- key: r,
324
- value: e[r]
325
- }))), t;
326
- }
327
- function xe(e) {
328
- return e ? Array.isArray(e) ? e.reduce((t, r) => (t.keys.push(r.key), t.operations.push(r.type), t.oldValue[r.key] = r.oldValue, t.newValue[r.key] = r.newValue, t), {
329
- oldValue: {},
330
- keys: [],
331
- operations: [],
332
- newValue: {}
333
- }) : {
334
- operation: g(e.type),
335
- key: g(e.key),
336
- oldValue: e.oldValue,
337
- newValue: e.newValue
338
- } : {};
339
- }
340
- function Ne(e) {
341
- switch (e) {
342
- case y.direct:
343
- return "mutation";
344
- case y.patchFunction:
345
- return "$patch";
346
- case y.patchObject:
347
- return "$patch";
348
- default:
349
- return "unknown";
350
- }
351
- }
352
- let w = !0;
353
- const E = [], _ = "pinia:mutations", f = "pinia", { assign: De } = Object, T = (e) => "🍍 " + e;
354
- function Ve(e, t) {
355
- W({
356
- id: "dev.esm.pinia",
357
- label: "Pinia 🍍",
358
- logo: "https://pinia.vuejs.org/logo.svg",
359
- packageName: "pinia",
360
- homepage: "https://pinia.vuejs.org",
361
- componentStateTypes: E,
362
- app: e
363
- }, (r) => {
364
- typeof r.now != "function" && u("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), r.addTimelineLayer({
365
- id: _,
366
- label: "Pinia 🍍",
367
- color: 15064968
368
- }), r.addInspector({
369
- id: f,
370
- label: "Pinia 🍍",
371
- icon: "storage",
372
- treeFilterPlaceholder: "Search stores",
373
- actions: [
374
- {
375
- icon: "content_copy",
376
- action: () => {
377
- $e(t);
378
- },
379
- tooltip: "Serialize and copy the state"
380
- },
381
- {
382
- icon: "content_paste",
383
- action: async () => {
384
- await Ae(t), r.sendInspectorTree(f), r.sendInspectorState(f);
385
- },
386
- tooltip: "Replace the state with the content of your clipboard"
387
- },
388
- {
389
- icon: "save",
390
- action: () => {
391
- Pe(t);
392
- },
393
- tooltip: "Save the state as a JSON file"
394
- },
395
- {
396
- icon: "folder_open",
397
- action: async () => {
398
- await Re(t), r.sendInspectorTree(f), r.sendInspectorState(f);
399
- },
400
- tooltip: "Import the state from a JSON file"
401
- }
402
- ],
403
- nodeActions: [
404
- {
405
- icon: "restore",
406
- tooltip: 'Reset the state (with "$reset")',
407
- action: (n) => {
408
- const o = t._s.get(n);
409
- o ? typeof o.$reset != "function" ? u(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (o.$reset(), u(`Store "${n}" reset.`)) : u(`Cannot reset "${n}" store because it wasn't found.`, "warn");
410
- }
411
- }
412
- ]
413
- }), r.on.inspectComponent((n, o) => {
414
- const s = n.componentInstance && n.componentInstance.proxy;
415
- if (s && s._pStores) {
416
- const i = n.componentInstance.proxy._pStores;
417
- Object.values(i).forEach((a) => {
418
- n.instanceData.state.push({
419
- type: T(a.$id),
420
- key: "state",
421
- editable: !0,
422
- value: a._isOptionsAPI ? {
423
- _custom: {
424
- value: L(a.$state),
425
- actions: [
426
- {
427
- icon: "restore",
428
- tooltip: "Reset the state of this store",
429
- action: () => a.$reset()
430
- }
431
- ]
432
- }
433
- } : (
434
- // NOTE: workaround to unwrap transferred refs
435
- Object.keys(a.$state).reduce((c, l) => (c[l] = a.$state[l], c), {})
436
- )
437
- }), a._getters && a._getters.length && n.instanceData.state.push({
438
- type: T(a.$id),
439
- key: "getters",
440
- editable: !1,
441
- value: a._getters.reduce((c, l) => {
442
- try {
443
- c[l] = a[l];
444
- } catch (d) {
445
- c[l] = d;
446
- }
447
- return c;
448
- }, {})
449
- });
450
- });
451
- }
452
- }), r.on.getInspectorTree((n) => {
453
- if (n.app === e && n.inspectorId === f) {
454
- let o = [t];
455
- o = o.concat(Array.from(t._s.values())), n.rootNodes = (n.filter ? o.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(n.filter.toLowerCase()) : te.toLowerCase().includes(n.filter.toLowerCase())) : o).map(Le);
456
- }
457
- }), r.on.getInspectorState((n) => {
458
- if (n.app === e && n.inspectorId === f) {
459
- const o = n.nodeId === k ? t : t._s.get(n.nodeId);
460
- if (!o)
461
- return;
462
- o && (n.state = je(o));
463
- }
464
- }), r.on.editInspectorState((n, o) => {
465
- if (n.app === e && n.inspectorId === f) {
466
- const s = n.nodeId === k ? t : t._s.get(n.nodeId);
467
- if (!s)
468
- return u(`store "${n.nodeId}" not found`, "error");
469
- const { path: i } = n;
470
- x(s) ? i.unshift("state") : (i.length !== 1 || !s._customProperties.has(i[0]) || i[0] in s.$state) && i.unshift("$state"), w = !1, n.set(s, i, n.state.value), w = !0;
471
- }
472
- }), r.on.editComponentState((n) => {
473
- if (n.type.startsWith("🍍")) {
474
- const o = n.type.replace(/^🍍\s*/, ""), s = t._s.get(o);
475
- if (!s)
476
- return u(`store "${o}" not found`, "error");
477
- const { path: i } = n;
478
- if (i[0] !== "state")
479
- return u(`Invalid path for store "${o}":
480
- ${i}
481
- Only state can be modified.`);
482
- i[0] = "$state", w = !1, n.set(s, i, n.state.value), w = !0;
483
- }
484
- });
485
- });
486
- }
487
- function Ue(e, t) {
488
- E.includes(T(t.$id)) || E.push(T(t.$id)), W({
489
- id: "dev.esm.pinia",
490
- label: "Pinia 🍍",
491
- logo: "https://pinia.vuejs.org/logo.svg",
492
- packageName: "pinia",
493
- homepage: "https://pinia.vuejs.org",
494
- componentStateTypes: E,
495
- app: e,
496
- settings: {
497
- logStoreChanges: {
498
- label: "Notify about new/deleted stores",
499
- type: "boolean",
500
- defaultValue: !0
501
- }
502
- // useEmojis: {
503
- // label: 'Use emojis in messages ⚡️',
504
- // type: 'boolean',
505
- // defaultValue: true,
506
- // },
507
- }
508
- }, (r) => {
509
- const n = typeof r.now == "function" ? r.now.bind(r) : Date.now;
510
- t.$onAction(({ after: i, onError: a, name: c, args: l }) => {
511
- const d = ne++;
512
- r.addTimelineEvent({
513
- layerId: _,
514
- event: {
515
- time: n(),
516
- title: "🛫 " + c,
517
- subtitle: "start",
518
- data: {
519
- store: g(t.$id),
520
- action: g(c),
521
- args: l
522
- },
523
- groupId: d
524
- }
525
- }), i((h) => {
526
- m = void 0, r.addTimelineEvent({
527
- layerId: _,
528
- event: {
529
- time: n(),
530
- title: "🛬 " + c,
531
- subtitle: "end",
532
- data: {
533
- store: g(t.$id),
534
- action: g(c),
535
- args: l,
536
- result: h
537
- },
538
- groupId: d
539
- }
540
- });
541
- }), a((h) => {
542
- m = void 0, r.addTimelineEvent({
543
- layerId: _,
544
- event: {
545
- time: n(),
546
- logType: "error",
547
- title: "💥 " + c,
548
- subtitle: "end",
549
- data: {
550
- store: g(t.$id),
551
- action: g(c),
552
- args: l,
553
- error: h
554
- },
555
- groupId: d
556
- }
557
- });
558
- });
559
- }, !0), t._customProperties.forEach((i) => {
560
- se(() => ie(t[i]), (a, c) => {
561
- r.notifyComponentUpdate(), r.sendInspectorState(f), w && r.addTimelineEvent({
562
- layerId: _,
563
- event: {
564
- time: n(),
565
- title: "Change",
566
- subtitle: i,
567
- data: {
568
- newValue: a,
569
- oldValue: c
570
- },
571
- groupId: m
572
- }
573
- });
574
- }, { deep: !0 });
575
- }), t.$subscribe(({ events: i, type: a }, c) => {
576
- if (r.notifyComponentUpdate(), r.sendInspectorState(f), !w)
577
- return;
578
- const l = {
579
- time: n(),
580
- title: Ne(a),
581
- data: De({ store: g(t.$id) }, xe(i)),
582
- groupId: m
583
- };
584
- a === y.patchFunction ? l.subtitle = "⤵️" : a === y.patchObject ? l.subtitle = "🧩" : i && !Array.isArray(i) && (l.subtitle = i.type), i && (l.data["rawEvent(s)"] = {
585
- _custom: {
586
- display: "DebuggerEvent",
587
- type: "object",
588
- tooltip: "raw DebuggerEvent[]",
589
- value: i
590
- }
591
- }), r.addTimelineEvent({
592
- layerId: _,
593
- event: l
594
- });
595
- }, { detached: !0, flush: "sync" });
596
- const o = t._hotUpdate;
597
- t._hotUpdate = J((i) => {
598
- o(i), r.addTimelineEvent({
599
- layerId: _,
600
- event: {
601
- time: n(),
602
- title: "🔥 " + t.$id,
603
- subtitle: "HMR update",
604
- data: {
605
- store: g(t.$id),
606
- info: g("HMR update")
607
- }
608
- }
609
- }), r.notifyComponentUpdate(), r.sendInspectorTree(f), r.sendInspectorState(f);
610
- });
611
- const { $dispose: s } = t;
612
- t.$dispose = () => {
613
- s(), r.notifyComponentUpdate(), r.sendInspectorTree(f), r.sendInspectorState(f), r.getSettings().logStoreChanges && u(`Disposed "${t.$id}" store 🗑`);
614
- }, r.notifyComponentUpdate(), r.sendInspectorTree(f), r.sendInspectorState(f), r.getSettings().logStoreChanges && u(`"${t.$id}" store installed 🆕`);
615
- });
616
- }
617
- let ne = 0, m;
618
- function M(e, t, r) {
619
- const n = t.reduce((o, s) => (o[s] = L(e)[s], o), {});
620
- for (const o in n)
621
- e[o] = function() {
622
- const s = ne, i = r ? new Proxy(e, {
623
- get(...c) {
624
- return m = s, Reflect.get(...c);
625
- },
626
- set(...c) {
627
- return m = s, Reflect.set(...c);
628
- }
629
- }) : e;
630
- m = s;
631
- const a = n[o].apply(i, arguments);
632
- return m = void 0, a;
633
- };
634
- }
635
- function Ce({ app: e, store: t, options: r }) {
636
- if (t.$id.startsWith("__hot:"))
637
- return;
638
- t._isOptionsAPI = !!r.state, M(t, Object.keys(r.actions), t._isOptionsAPI);
639
- const n = t._hotUpdate;
640
- L(t)._hotUpdate = function(o) {
641
- n.apply(this, arguments), M(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
642
- }, Ue(
643
- e,
644
- // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
645
- t
646
- );
647
- }
648
- function Me() {
649
- const e = oe(!0), t = e.run(() => B({}));
650
- let r = [], n = [];
651
- const o = J({
652
- install(s) {
653
- o._a = s, s.provide(we, o), s.config.globalProperties.$pinia = o, U && Ve(s, o), n.forEach((i) => r.push(i)), n = [];
654
- },
655
- use(s) {
656
- return !this._a && !he ? n.push(s) : r.push(s), this;
657
- },
658
- _p: r,
659
- // it's actually undefined here
660
- // @ts-expect-error
661
- _a: null,
662
- _e: e,
663
- _s: /* @__PURE__ */ new Map(),
664
- state: t
665
- });
666
- return U && typeof Proxy < "u" && o.use(Ce), o;
667
- }
668
- process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
669
- /* istanbul ignore next */
670
- Symbol()
671
- );
672
- function Ge(e) {
673
- return typeof e == "object" && e !== null;
674
- }
675
- function G(e, t) {
676
- return e = Ge(e) ? e : /* @__PURE__ */ Object.create(null), new Proxy(e, {
677
- get(r, n, o) {
678
- return n === "key" ? Reflect.get(r, n, o) : Reflect.get(r, n, o) || Reflect.get(t, n, o);
679
- }
680
- });
681
- }
682
- function Fe(e, t) {
683
- return t.reduce((r, n) => r == null ? void 0 : r[n], e);
684
- }
685
- function He(e, t, r) {
686
- return t.slice(0, -1).reduce((n, o) => /^(__proto__)$/.test(o) ? {} : n[o] = n[o] || {}, e)[t[t.length - 1]] = r, e;
687
- }
688
- function Be(e, t) {
689
- return t.reduce((r, n) => {
690
- const o = n.split(".");
691
- return He(r, o, Fe(e, o));
692
- }, {});
693
- }
694
- function Je(e, t) {
695
- return (r) => {
696
- var n;
697
- try {
698
- const {
699
- storage: o = localStorage,
700
- beforeRestore: s = void 0,
701
- afterRestore: i = void 0,
702
- serializer: a = {
703
- serialize: JSON.stringify,
704
- deserialize: JSON.parse
705
- },
706
- key: c = t.$id,
707
- paths: l = null,
708
- debug: d = !1
709
- } = r;
710
- return {
711
- storage: o,
712
- beforeRestore: s,
713
- afterRestore: i,
714
- serializer: a,
715
- key: ((n = e.key) != null ? n : (h) => h)(typeof c == "string" ? c : c(t.$id)),
716
- paths: l,
717
- debug: d
718
- };
719
- } catch {
720
- return r.debug, null;
721
- }
722
- };
723
- }
724
- function F(e, { storage: t, serializer: r, key: n, debug: o }) {
725
- try {
726
- const s = t == null ? void 0 : t.getItem(n);
727
- s && e.$patch(r == null ? void 0 : r.deserialize(s));
728
- } catch {
729
- }
730
- }
731
- function H(e, { storage: t, serializer: r, key: n, paths: o, debug: s }) {
732
- try {
733
- const i = Array.isArray(o) ? Be(e, o) : e;
734
- t.setItem(n, r.serialize(i));
735
- } catch {
736
- }
737
- }
738
- function ze(e = {}) {
739
- return (t) => {
740
- const { auto: r = !1 } = e, {
741
- options: { persist: n = r },
742
- store: o,
743
- pinia: s
744
- } = t;
745
- if (!n)
746
- return;
747
- if (!(o.$id in s.state.value)) {
748
- const a = s._s.get(o.$id.replace("__hot:", ""));
749
- a && Promise.resolve().then(() => a.$persist());
750
- return;
751
- }
752
- const i = (Array.isArray(n) ? n.map((a) => G(a, e)) : [G(n, e)]).map(Je(e, o)).filter(Boolean);
753
- o.$persist = () => {
754
- i.forEach((a) => {
755
- H(o.$state, a);
756
- });
757
- }, o.$hydrate = ({ runHooks: a = !0 } = {}) => {
758
- i.forEach((c) => {
759
- const { beforeRestore: l, afterRestore: d } = c;
760
- a && (l == null || l(t)), F(o, c), a && (d == null || d(t));
761
- });
762
- }, i.forEach((a) => {
763
- const { beforeRestore: c, afterRestore: l } = a;
764
- c == null || c(t), F(o, a), l == null || l(t), o.$subscribe(
765
- (d, h) => {
766
- H(h, a);
767
- },
768
- {
769
- detached: !0
770
- }
771
- );
772
- });
773
- };
774
- }
775
- var We = ze();
776
- const R = Me();
777
- R.use(We);
778
- const Qe = (e) => {
779
- var l, d, h, N, D;
780
- const t = ((l = e == null ? void 0 : e.router) == null ? void 0 : l.routerBase) ?? "/", r = ((d = e == null ? void 0 : e.router) == null ? void 0 : d.options) || {};
781
- let n = Object.assign(((h = e == null ? void 0 : e.router) == null ? void 0 : h.glob) || {});
782
- const o = Object.values(n).filter((b) => !!b).flat().sort((b, $) => (b.index ?? 0) - ($.index ?? 0)), s = [];
783
- (N = e == null ? void 0 : e.microApps) == null || N.map((b) => {
784
- var V;
785
- const $ = Object.values(((V = b.router) == null ? void 0 : V.glob) || {}).filter((S) => !!S).flat().sort((S, re) => (S.index ?? 0) - (re.index ?? 0));
786
- s.push(
787
- ...$.map((S) => ({ ...S, path: `/${b.microAppName}${S.path}` }))
16
+ }, d = j();
17
+ d.use(k);
18
+ const B = (e) => {
19
+ var i, h, b, A, g;
20
+ const a = ((i = e == null ? void 0 : e.router) == null ? void 0 : i.routerBase) ?? "/", c = ((h = e == null ? void 0 : e.router) == null ? void 0 : h.options) || {};
21
+ let l = Object.assign(((b = e == null ? void 0 : e.router) == null ? void 0 : b.glob) || {});
22
+ const t = Object.values(l).filter((f) => !!f).flat().sort((f, m) => (f.index ?? 0) - (m.index ?? 0)), u = [];
23
+ (A = e == null ? void 0 : e.microApps) == null || A.map((f) => {
24
+ var p;
25
+ const m = Object.values(((p = f.router) == null ? void 0 : p.glob) || {}).filter((r) => !!r).flat().sort((r, v) => (r.index ?? 0) - (v.index ?? 0));
26
+ u.push(
27
+ ...m.map((r) => ({ ...r, path: `/${f.microAppName}${r.path}` }))
28
+ ), u.push(
29
+ ...m.filter((r) => !!r.path).filter((r) => r.path !== "").filter((r) => r.path !== "/").filter((r) => !r.path.startsWith(`/${r.microAppName}`)).map((r) => ({
30
+ path: r.path,
31
+ redirect: `/${f.microAppName}${r.path}`,
32
+ meta: { ...r.meta || {}, isMicroAppRouteRedirect: !0 }
33
+ }))
788
34
  );
789
35
  });
790
- const i = ((D = e == null ? void 0 : e.router) == null ? void 0 : D.routers) || [], a = [
791
- ...A(o, e),
792
- ...A(i, e),
793
- ...A(s, e)
36
+ const s = ((g = e == null ? void 0 : e.router) == null ? void 0 : g.routers) || [], R = [
37
+ ...n(t, e),
38
+ ...n(s, e),
39
+ ...n(u, e)
794
40
  ];
795
- return { router: fe({ history: de(t), routes: a, ...r }) };
796
- }, A = (e, t) => e.map((r) => {
797
- const n = r.meta || {};
798
- return n.keepAlive = n.keepAlive ?? (t == null ? void 0 : t.keepAlive) ?? !0, { ...r, meta: n };
799
- }), et = (e) => {
41
+ return { router: y({ history: D(a), routes: R, ...c }) };
42
+ }, n = (e, a) => e.map((c) => {
43
+ const l = c.meta || {};
44
+ return l.keepAlive = l.keepAlive ?? (a == null ? void 0 : a.keepAlive) ?? !0, { ...c, meta: l };
45
+ }), w = (e) => {
800
46
  e || (e = {});
801
- const t = B(!0);
802
- Promise.all([ce(e), le(e)]).then(() => {
803
- t.value = !1;
47
+ const a = x(!0);
48
+ Promise.all([P(e), W(e)]).then(() => {
49
+ a.value = !1;
804
50
  });
805
- const { container: r, component: n, props: o } = (e == null ? void 0 : e.root) || {}, s = ae(n || ue, o);
806
- s.use(ge, e), s.use(R);
807
- const { router: i } = Qe(e);
808
- return s.use(i), s.mount(r || "#app"), { app: s, router: i, loading: t, store: R };
51
+ const { container: c, component: l, props: t } = (e == null ? void 0 : e.root) || {}, u = O(l || $, t);
52
+ u.use(N, e), u.use(d);
53
+ const { router: s } = B(e);
54
+ return u.use(s), u.mount(c || "#app"), { app: u, router: s, loading: a, store: d };
809
55
  };
810
56
  export {
811
- et as createDasWebApp
57
+ w as createDasWebApp
812
58
  };