@das-fed/web 6.4.0-dev.2 → 6.4.0-dev.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 (57) hide show
  1. package/esm-map.json +1 -2
  2. package/{packages/main-app-framework/index-CRT8yHn-.js → index-C9Z5Et6m.js} +1 -1
  3. package/index-CtOlfmIU.js +7088 -0
  4. package/index-CtOlfmIU.js.gz +0 -0
  5. package/{packages/main-app-framework/index-Twj2RXRy.js → index-D6BMoZho.js} +14 -14
  6. package/index-D6BMoZho.js.gz +0 -0
  7. package/index-DNqfV3E9.js +71 -0
  8. package/index-DNqfV3E9.js.gz +0 -0
  9. package/index.js +1 -1
  10. package/package.json +6 -6
  11. package/packages/create-das-web-app/config.js +1 -0
  12. package/packages/create-das-web-app/index.js +48 -807
  13. package/packages/create-das-web-app/index.js.gz +0 -0
  14. package/packages/i18n/config.js +1 -0
  15. package/packages/i18n/index.js.gz +0 -0
  16. package/packages/layout/config.js +1 -0
  17. package/packages/layout/index.js +298 -291
  18. package/packages/layout/index.js.gz +0 -0
  19. package/packages/layout/style.css +2 -2
  20. package/packages/layout/style.css.gz +0 -0
  21. package/packages/main-app-framework/config.js +1 -0
  22. package/{index-CC5hN73H.js → packages/main-app-framework/index-CGRKqP1O.js} +1 -1
  23. package/packages/main-app-framework/index-IzpOTZ0u.js +5779 -0
  24. package/packages/main-app-framework/index-IzpOTZ0u.js.gz +0 -0
  25. package/packages/main-app-framework/index-fj8M6ijq.js +71 -0
  26. package/packages/main-app-framework/index-fj8M6ijq.js.gz +0 -0
  27. package/{index-D4LFa1We.js → packages/main-app-framework/index-t4FWMW__.js} +14 -14
  28. package/packages/main-app-framework/index-t4FWMW__.js.gz +0 -0
  29. package/packages/main-app-framework/index.js +3 -2
  30. package/packages/main-app-framework/style.css +1 -1
  31. package/packages/main-app-framework/style.css.gz +0 -0
  32. package/packages/micro-frontend/config.js +1 -0
  33. package/packages/micro-frontend/index.js +253 -243
  34. package/packages/micro-frontend/index.js.gz +0 -0
  35. package/packages/micro-frontend/style.css +1 -1
  36. package/packages/style/config.js +1 -0
  37. package/packages/style/style.css +1 -1
  38. package/packages/style/style.css.gz +0 -0
  39. package/packages/theme/config.js +1 -0
  40. package/packages/theme/index.js +24 -24
  41. package/packages/theme/index.js.gz +0 -0
  42. package/style.css +2 -2
  43. package/style.css.gz +0 -0
  44. package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +3 -3
  45. package/types/main-app-framework/components/person-set-dialog/index.d.ts +1 -1
  46. package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +2 -2
  47. package/types/micro-frontend/index.d.ts +1 -1
  48. package/index-BqgahaIi.js +0 -11086
  49. package/index-BqgahaIi.js.gz +0 -0
  50. package/index-D4LFa1We.js.gz +0 -0
  51. package/index-DpLK467K.js +0 -70
  52. package/index-DpLK467K.js.gz +0 -0
  53. package/packages/main-app-framework/index-2WWk8ggi.js +0 -9022
  54. package/packages/main-app-framework/index-2WWk8ggi.js.gz +0 -0
  55. package/packages/main-app-framework/index-BqkWKMMe.js +0 -70
  56. package/packages/main-app-framework/index-BqkWKMMe.js.gz +0 -0
  57. package/packages/main-app-framework/index-Twj2RXRy.js.gz +0 -0
@@ -1,817 +1,58 @@
1
- import { effectScope as re, ref as H, markRaw as B, toRaw as A, watch as oe, unref as se, createApp as ie } from "vue";
2
- import { initTheme as ae } from "@das-fed/web/packages/theme/index";
3
- import { initI18n as ce } from "@das-fed/web/packages/i18n/index";
4
- import { DasWebLayout as le } from "@das-fed/web/packages/layout/index";
5
- import { createRouter as ue, createWebHistory as fe } from "vue-router";
6
- const de = {
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 ge = !1;
16
- function he() {
17
- return J().__VUE_DEVTOOLS_GLOBAL_HOOK__;
18
- }
19
- function J() {
20
- return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
21
- }
22
- const pe = typeof Proxy == "function", me = "devtools-plugin:setup", _e = "plugin:settings:set";
23
- let v, R;
24
- function ye() {
25
- var e;
26
- return v !== void 0 || (typeof window < "u" && window.performance ? (v = !0, R = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (v = !0, R = globalThis.perf_hooks.performance) : v = !1), v;
27
- }
28
- function be() {
29
- return ye() ? R.now() : Date.now();
30
- }
31
- class Se {
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 be();
60
- }
61
- }, r && r.on(_e, (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 z(e, t) {
94
- const r = e, n = J(), o = he(), s = pe && r.enableEarlyProxy;
95
- if (o && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
96
- o.emit(me, e, t);
97
- else {
98
- const i = s ? new Se(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.2.0
108
- * (c) 2024 Eduardo San Martin Morote
109
- * @license MIT
110
- */
111
- const ve = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
112
- /* istanbul ignore next */
113
- Symbol()
114
- );
115
- var S;
116
- (function(e) {
117
- e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
118
- })(S || (S = {}));
119
- const W = typeof window < "u", U = 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 we(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 L(e, t, r) {
124
- const n = new XMLHttpRequest();
125
- n.open("GET", e), n.responseType = "blob", n.onload = function() {
126
- K(n.response, t, r);
127
- }, n.onerror = function() {
128
- }, n.send();
129
- }
130
- function Q(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 I(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 E = typeof navigator == "object" ? navigator : { userAgent: "" }, Y = /Macintosh/.test(E.userAgent) && /AppleWebKit/.test(E.userAgent) && !/Safari/.test(E.userAgent), K = W ? (
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 && !Y ? Oe : (
150
- // Use msSaveOrOpenBlob as a second approach
151
- "msSaveOrOpenBlob" in E ? Ie : (
152
- // Fallback to using FileReader and a popup
153
- Ee
154
- )
155
- )
156
- ) : () => {
157
- };
158
- function Oe(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 ? Q(n.href) ? L(e, t, r) : (n.target = "_blank", I(n)) : I(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
161
- URL.revokeObjectURL(n.href);
162
- }, 4e4), setTimeout(function() {
163
- I(n);
164
- }, 0));
165
- }
166
- function Ie(e, t = "download", r) {
167
- if (typeof e == "string")
168
- if (Q(e))
169
- L(e, t, r);
170
- else {
171
- const n = document.createElement("a");
172
- n.href = e, n.target = "_blank", setTimeout(function() {
173
- I(n);
174
- });
175
- }
176
- else
177
- navigator.msSaveOrOpenBlob(we(e, r), t);
178
- }
179
- function Ee(e, t, r, n) {
180
- if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
181
- return L(e, t, r);
182
- const o = e.type === "application/octet-stream", s = /constructor/i.test(String(U.HTMLElement)) || "safari" in U, i = /CriOS\/[\d]+/.test(navigator.userAgent);
183
- if ((i || o && s || Y) && 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 j(e) {
203
- return "_a" in e && "install" in e;
204
- }
205
- function q() {
206
- if (!("clipboard" in navigator))
207
- return u("Your browser doesn't support the Clipboard API", "error"), !0;
208
- }
209
- function X(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 Te(e) {
213
- if (!q())
214
- try {
215
- await navigator.clipboard.writeText(JSON.stringify(e.state.value)), u("Global state copied to clipboard.");
216
- } catch (t) {
217
- if (X(t))
218
- return;
219
- u("Failed to serialize the state. Check the console for more details.", "error");
220
- }
221
- }
222
- async function $e(e) {
223
- if (!q())
224
- try {
225
- Z(e, JSON.parse(await navigator.clipboard.readText())), u("Global state pasted from clipboard.");
226
- } catch (t) {
227
- if (X(t))
228
- return;
229
- u("Failed to deserialize the state from clipboard. Check the console for more details.", "error");
230
- }
231
- }
232
- async function Ae(e) {
233
- try {
234
- K(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 m;
242
- function Pe() {
243
- m || (m = document.createElement("input"), m.type = "file", m.accept = ".json");
244
- function e() {
245
- return new Promise((t, r) => {
246
- m.onchange = async () => {
247
- const n = m.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
- }, m.oncancel = () => t(null), m.onerror = r, m.click();
253
- });
254
- }
255
- return e;
256
- }
257
- async function ke(e) {
258
- try {
259
- const r = await Pe()();
260
- if (!r)
261
- return;
262
- const { text: n, file: o } = r;
263
- Z(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 Z(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 ee = "🍍 Pinia (root)", T = "_root";
282
- function Re(e) {
283
- return j(e) ? {
284
- id: T,
285
- label: ee
286
- } : {
287
- id: e.$id,
288
- label: e.$id
289
- };
290
- }
291
- function Ne(e) {
292
- if (j(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 Le(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 je(e) {
341
- switch (e) {
342
- case S.direct:
343
- return "mutation";
344
- case S.patchFunction:
345
- return "$patch";
346
- case S.patchObject:
347
- return "$patch";
348
- default:
349
- return "unknown";
350
- }
351
- }
352
- let w = !0;
353
- const $ = [], b = "pinia:mutations", f = "pinia", { assign: xe } = Object, P = (e) => "🍍 " + e;
354
- function De(e, t) {
355
- z({
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: $,
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: b,
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
- Te(t);
378
- },
379
- tooltip: "Serialize and copy the state"
380
- },
381
- {
382
- icon: "content_paste",
383
- action: async () => {
384
- await $e(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
- Ae(t);
392
- },
393
- tooltip: "Save the state as a JSON file"
394
- },
395
- {
396
- icon: "folder_open",
397
- action: async () => {
398
- await ke(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: P(a.$id),
420
- key: "state",
421
- editable: !0,
422
- value: a._isOptionsAPI ? {
423
- _custom: {
424
- value: A(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: P(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()) : ee.toLowerCase().includes(n.filter.toLowerCase())) : o).map(Re);
456
- }
457
- }), globalThis.$pinia = t, r.on.getInspectorState((n) => {
458
- if (n.app === e && n.inspectorId === f) {
459
- const o = n.nodeId === T ? t : t._s.get(n.nodeId);
460
- if (!o)
461
- return;
462
- o && (n.nodeId !== T && (globalThis.$store = A(o)), n.state = Ne(o));
463
- }
464
- }), r.on.editInspectorState((n, o) => {
465
- if (n.app === e && n.inspectorId === f) {
466
- const s = n.nodeId === T ? t : t._s.get(n.nodeId);
467
- if (!s)
468
- return u(`store "${n.nodeId}" not found`, "error");
469
- const { path: i } = n;
470
- j(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 Ve(e, t) {
488
- $.includes(P(t.$id)) || $.push(P(t.$id)), z({
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: $,
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 = te++;
512
- r.addTimelineEvent({
513
- layerId: b,
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
- _ = void 0, r.addTimelineEvent({
527
- layerId: b,
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
- _ = void 0, r.addTimelineEvent({
543
- layerId: b,
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
- oe(() => se(t[i]), (a, c) => {
561
- r.notifyComponentUpdate(), r.sendInspectorState(f), w && r.addTimelineEvent({
562
- layerId: b,
563
- event: {
564
- time: n(),
565
- title: "Change",
566
- subtitle: i,
567
- data: {
568
- newValue: a,
569
- oldValue: c
570
- },
571
- groupId: _
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: je(a),
581
- data: xe({ store: g(t.$id) }, Le(i)),
582
- groupId: _
583
- };
584
- a === S.patchFunction ? l.subtitle = "⤵️" : a === S.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: b,
593
- event: l
594
- });
595
- }, { detached: !0, flush: "sync" });
596
- const o = t._hotUpdate;
597
- t._hotUpdate = B((i) => {
598
- o(i), r.addTimelineEvent({
599
- layerId: b,
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 te = 0, _;
618
- function C(e, t, r) {
619
- const n = t.reduce((o, s) => (o[s] = A(e)[s], o), {});
620
- for (const o in n)
621
- e[o] = function() {
622
- const s = te, i = r ? new Proxy(e, {
623
- get(...c) {
624
- return _ = s, Reflect.get(...c);
625
- },
626
- set(...c) {
627
- return _ = s, Reflect.set(...c);
628
- }
629
- }) : e;
630
- _ = s;
631
- const a = n[o].apply(i, arguments);
632
- return _ = void 0, a;
633
- };
634
- }
635
- function Ue({ app: e, store: t, options: r }) {
636
- if (!t.$id.startsWith("__hot:")) {
637
- if (t._isOptionsAPI = !!r.state, !t._p._testing) {
638
- C(t, Object.keys(r.actions), t._isOptionsAPI);
639
- const n = t._hotUpdate;
640
- A(t)._hotUpdate = function(o) {
641
- n.apply(this, arguments), C(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
642
- };
643
- }
644
- Ve(
645
- e,
646
- // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
647
- t
648
- );
649
- }
650
- }
651
- function Ce() {
652
- const e = re(!0), t = e.run(() => H({}));
653
- let r = [], n = [];
654
- const o = B({
655
- install(s) {
656
- o._a = s, s.provide(ve, o), s.config.globalProperties.$pinia = o, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W && De(s, o), n.forEach((i) => r.push(i)), n = [];
657
- },
658
- use(s) {
659
- return !this._a && !ge ? n.push(s) : r.push(s), this;
660
- },
661
- _p: r,
662
- // it's actually undefined here
663
- // @ts-expect-error
664
- _a: null,
665
- _e: e,
666
- _s: /* @__PURE__ */ new Map(),
667
- state: t
668
- });
669
- return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof Proxy < "u" && o.use(Ue), o;
670
- }
671
- process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
672
- /* istanbul ignore next */
673
- Symbol()
674
- );
675
- function Me(e) {
676
- return typeof e == "object" && e !== null;
677
- }
678
- function M(e, t) {
679
- return e = Me(e) ? e : /* @__PURE__ */ Object.create(null), new Proxy(e, {
680
- get(r, n, o) {
681
- return n === "key" ? Reflect.get(r, n, o) : Reflect.get(r, n, o) || Reflect.get(t, n, o);
682
- }
683
- });
684
- }
685
- function Ge(e, t) {
686
- return t.reduce((r, n) => r == null ? void 0 : r[n], e);
687
- }
688
- function Fe(e, t, r) {
689
- return t.slice(0, -1).reduce((n, o) => /^(__proto__)$/.test(o) ? {} : n[o] = n[o] || {}, e)[t[t.length - 1]] = r, e;
690
- }
691
- function He(e, t) {
692
- return t.reduce((r, n) => {
693
- const o = n.split(".");
694
- return Fe(r, o, Ge(e, o));
695
- }, {});
696
- }
697
- function Be(e, t) {
698
- return (r) => {
699
- var n;
700
- try {
701
- const {
702
- storage: o = localStorage,
703
- beforeRestore: s = void 0,
704
- afterRestore: i = void 0,
705
- serializer: a = {
706
- serialize: JSON.stringify,
707
- deserialize: JSON.parse
708
- },
709
- key: c = t.$id,
710
- paths: l = null,
711
- debug: d = !1
712
- } = r;
713
- return {
714
- storage: o,
715
- beforeRestore: s,
716
- afterRestore: i,
717
- serializer: a,
718
- key: ((n = e.key) != null ? n : (h) => h)(typeof c == "string" ? c : c(t.$id)),
719
- paths: l,
720
- debug: d
721
- };
722
- } catch {
723
- return r.debug, null;
724
- }
725
- };
726
- }
727
- function G(e, { storage: t, serializer: r, key: n, debug: o }) {
728
- try {
729
- const s = t == null ? void 0 : t.getItem(n);
730
- s && e.$patch(r == null ? void 0 : r.deserialize(s));
731
- } catch {
732
- }
733
- }
734
- function F(e, { storage: t, serializer: r, key: n, paths: o, debug: s }) {
735
- try {
736
- const i = Array.isArray(o) ? He(e, o) : e;
737
- t.setItem(n, r.serialize(i));
738
- } catch {
739
- }
740
- }
741
- function Je(e = {}) {
742
- return (t) => {
743
- const { auto: r = !1 } = e, {
744
- options: { persist: n = r },
745
- store: o,
746
- pinia: s
747
- } = t;
748
- if (!n)
749
- return;
750
- if (!(o.$id in s.state.value)) {
751
- const a = s._s.get(o.$id.replace("__hot:", ""));
752
- a && Promise.resolve().then(() => a.$persist());
753
- return;
754
- }
755
- const i = (Array.isArray(n) ? n.map((a) => M(a, e)) : [M(n, e)]).map(Be(e, o)).filter(Boolean);
756
- o.$persist = () => {
757
- i.forEach((a) => {
758
- F(o.$state, a);
759
- });
760
- }, o.$hydrate = ({ runHooks: a = !0 } = {}) => {
761
- i.forEach((c) => {
762
- const { beforeRestore: l, afterRestore: d } = c;
763
- a && (l == null || l(t)), G(o, c), a && (d == null || d(t));
764
- });
765
- }, i.forEach((a) => {
766
- const { beforeRestore: c, afterRestore: l } = a;
767
- c == null || c(t), G(o, a), l == null || l(t), o.$subscribe(
768
- (d, h) => {
769
- F(h, a);
770
- },
771
- {
772
- detached: !0
773
- }
774
- );
775
- });
776
- };
777
- }
778
- var ze = Je();
779
- const N = Ce();
780
- N.use(ze);
781
- const We = (e) => {
782
- var l, d, h, x, D;
783
- 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) || {};
784
- let n = Object.assign(((h = e == null ? void 0 : e.router) == null ? void 0 : h.glob) || {});
785
- const o = Object.values(n).filter((y) => !!y).flat().sort((y, O) => (y.index ?? 0) - (O.index ?? 0)), s = [];
786
- (x = e == null ? void 0 : e.microApps) == null || x.map((y) => {
787
- var V;
788
- const O = Object.values(((V = y.router) == null ? void 0 : V.glob) || {}).filter((p) => !!p).flat().sort((p, ne) => (p.index ?? 0) - (ne.index ?? 0));
789
- s.push(
790
- ...O.map((p) => ({ ...p, path: `/${y.microAppName}${p.path}` }))
791
- ), s.push(
792
- ...O.map((p) => ({ path: p.path, redirect: `/${y.microAppName}${p.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
+ }))
793
34
  );
794
35
  });
795
- const i = ((D = e == null ? void 0 : e.router) == null ? void 0 : D.routers) || [], a = [
796
- ...k(o, e),
797
- ...k(i, e),
798
- ...k(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)
799
40
  ];
800
- return { router: ue({ history: fe(t), routes: a, ...r }) };
801
- }, k = (e, t) => e.map((r) => {
802
- const n = r.meta || {};
803
- return n.keepAlive = n.keepAlive ?? (t == null ? void 0 : t.keepAlive) ?? !0, { ...r, meta: n };
804
- }), Ze = (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) => {
805
46
  e || (e = {});
806
- const t = H(!0);
807
- Promise.all([ae(e), ce(e)]).then(() => {
808
- t.value = !1;
47
+ const a = x(!0);
48
+ Promise.all([P(e), W(e)]).then(() => {
49
+ a.value = !1;
809
50
  });
810
- const { container: r, component: n, props: o } = (e == null ? void 0 : e.root) || {}, s = ie(n || le, o);
811
- s.use(de, e), s.use(N);
812
- const { router: i } = We(e);
813
- return s.use(i), s.mount(r || "#app"), { app: s, router: i, loading: t, store: N };
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 };
814
55
  };
815
56
  export {
816
- Ze as createDasWebApp
57
+ w as createDasWebApp
817
58
  };