@stonecrop/desktop 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4967 @@
1
+ import { defineComponent as q, ref as V, onMounted as Lt, openBlock as x, createElementBlock as A, normalizeClass as co, createElementVNode as T, Fragment as Oe, renderList as Pe, toDisplayString as ce, createCommentVNode as ke, withDirectives as lt, vShow as jt, pushScopeId as lo, popScopeId as uo, inject as Z, computed as B, createBlock as Se, resolveDynamicComponent as Bt, mergeProps as Ut, effectScope as fo, markRaw as Ee, onBeforeMount as wr, shallowRef as _r, toRaw as ut, hasInjectionContext as br, getCurrentInstance as Ht, unref as k, shallowReactive as Er, watch as ue, reactive as be, isRef as We, isReactive as Wt, toRef as yt, nextTick as Fe, getCurrentScope as po, onScopeDispose as ho, h as mo, provide as nt, toRefs as dn, watchEffect as kr, normalizeStyle as ie, renderSlot as me, createVNode as at, withCtx as it, useCssVars as vo, createTextVNode as go, onBeforeUnmount as Sr, resolveComponent as Ir, withKeys as Ye, vModelText as Or } from "vue";
2
+ const Ft = (e) => (lo("data-v-b7fdfbec"), e = e(), uo(), e), Pr = { class: "action-menu-icon" }, xr = /* @__PURE__ */ Ft(() => /* @__PURE__ */ T("svg", {
3
+ class: "leftBar",
4
+ version: "1.1",
5
+ id: "Layer_1",
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
8
+ x: "0px",
9
+ y: "0px",
10
+ viewBox: "0 0 100 100",
11
+ "xml:space": "preserve",
12
+ width: "50",
13
+ height: "50"
14
+ }, [
15
+ /* @__PURE__ */ T("polygon", { points: "54.2,33.4 29.2,58.8 25,54.6 50,29.2 " })
16
+ ], -1)), Cr = /* @__PURE__ */ Ft(() => /* @__PURE__ */ T("svg", {
17
+ class: "rightBar",
18
+ version: "1.1",
19
+ id: "Layer_1",
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
22
+ x: "0px",
23
+ y: "0px",
24
+ viewBox: "0 0 100 100",
25
+ "xml:space": "preserve",
26
+ width: "50",
27
+ height: "50"
28
+ }, [
29
+ /* @__PURE__ */ T("polygon", { points: "70.8,58.8 45.8,33.4 50,29.2 75,54.6 " })
30
+ ], -1)), $r = [
31
+ xr,
32
+ Cr
33
+ ], Nr = /* @__PURE__ */ Ft(() => /* @__PURE__ */ T("div", { style: { "margin-right": "30px" } }, null, -1)), Rr = ["onclick"], Ar = { key: 1 }, Tr = ["onClick"], Dr = { class: "dropdown-container" }, Vr = { class: "dropdown" }, Mr = ["onclick"], Lr = ["href"], jr = { class: "dropdown-item" }, Br = /* @__PURE__ */ q({
34
+ __name: "ActionSet",
35
+ props: {
36
+ elements: {}
37
+ },
38
+ setup(e) {
39
+ const t = e, n = V([]), o = V(!1), r = V(null), s = V(!1), i = V(!1);
40
+ Lt(() => {
41
+ n.value = t.elements, a();
42
+ });
43
+ const a = () => {
44
+ for (let d of n.value)
45
+ d.elementType === "dropdown" && (d.show = !1);
46
+ }, l = () => {
47
+ s.value = !0, r.value = setTimeout(() => {
48
+ s.value && (o.value = !0);
49
+ }, 500);
50
+ }, u = () => {
51
+ s.value = !1, i.value = !1, clearTimeout(r.value), o.value = !1;
52
+ }, c = (d) => {
53
+ const f = !n.value[d].show;
54
+ a(), n.value[d].show = f;
55
+ };
56
+ return (d, f) => (x(), A("div", {
57
+ class: co([{ "open-set": o.value, "hovered-and-closed": i.value }, "action-set collapse"]),
58
+ onMouseover: l,
59
+ onMouseleave: u
60
+ }, [
61
+ T("div", Pr, [
62
+ T("div", {
63
+ id: "chevron",
64
+ onClick: f[0] || (f[0] = (p) => i.value = !i.value)
65
+ }, $r)
66
+ ]),
67
+ Nr,
68
+ (x(!0), A(Oe, null, Pe(n.value, (p, v) => (x(), A("div", {
69
+ class: "action-element",
70
+ key: v
71
+ }, [
72
+ p.elementType == "button" ? (x(), A("button", {
73
+ key: 0,
74
+ onclick: p.action,
75
+ class: "button-default"
76
+ }, ce(p.label), 9, Rr)) : ke("", !0),
77
+ p.elementType == "dropdown" ? (x(), A("div", Ar, [
78
+ T("button", {
79
+ class: "button-default",
80
+ onClick: (m) => c(v)
81
+ }, ce(p.label), 9, Tr),
82
+ lt(T("div", Dr, [
83
+ T("div", Vr, [
84
+ (x(!0), A(Oe, null, Pe(p.actions, (m) => (x(), A("div", {
85
+ key: m.label
86
+ }, [
87
+ m.action != null ? (x(), A("button", {
88
+ key: 0,
89
+ onclick: m.action,
90
+ class: "dropdown-item"
91
+ }, ce(m.label), 9, Mr)) : m.link != null ? (x(), A("a", {
92
+ key: 1,
93
+ href: m.link
94
+ }, [
95
+ T("button", jr, ce(m.label), 1)
96
+ ], 8, Lr)) : ke("", !0)
97
+ ]))), 128))
98
+ ])
99
+ ], 512), [
100
+ [jt, p.show]
101
+ ])
102
+ ])) : ke("", !0)
103
+ ]))), 128))
104
+ ], 34));
105
+ }
106
+ });
107
+ const Gt = (e, t) => {
108
+ const n = e.__vccOpts || e;
109
+ for (const [o, r] of t)
110
+ n[o] = r;
111
+ return n;
112
+ }, Ur = /* @__PURE__ */ Gt(Br, [["__scopeId", "data-v-b7fdfbec"]]), Hr = {};
113
+ function Wr(e, t) {
114
+ return x(), A("dialog");
115
+ }
116
+ const Fr = /* @__PURE__ */ Gt(Hr, [["render", Wr]]), Gr = (e, t) => {
117
+ const n = e.__vccOpts || e;
118
+ for (const [o, r] of t)
119
+ n[o] = r;
120
+ return n;
121
+ };
122
+ var fn;
123
+ const zr = typeof window < "u";
124
+ zr && (fn = window == null ? void 0 : window.navigator) != null && fn.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
125
+ function Qr(e) {
126
+ return e;
127
+ }
128
+ const pn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, hn = "__vueuse_ssr_handlers__";
129
+ pn[hn] = pn[hn] || {};
130
+ var mn;
131
+ (function(e) {
132
+ e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
133
+ })(mn || (mn = {}));
134
+ var qr = Object.defineProperty, vn = Object.getOwnPropertySymbols, Kr = Object.prototype.hasOwnProperty, Jr = Object.prototype.propertyIsEnumerable, gn = (e, t, n) => t in e ? qr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Yr = (e, t) => {
135
+ for (var n in t || (t = {}))
136
+ Kr.call(t, n) && gn(e, n, t[n]);
137
+ if (vn)
138
+ for (var n of vn(t))
139
+ Jr.call(t, n) && gn(e, n, t[n]);
140
+ return e;
141
+ };
142
+ const Xr = {
143
+ easeInSine: [0.12, 0, 0.39, 0],
144
+ easeOutSine: [0.61, 1, 0.88, 1],
145
+ easeInOutSine: [0.37, 0, 0.63, 1],
146
+ easeInQuad: [0.11, 0, 0.5, 0],
147
+ easeOutQuad: [0.5, 1, 0.89, 1],
148
+ easeInOutQuad: [0.45, 0, 0.55, 1],
149
+ easeInCubic: [0.32, 0, 0.67, 0],
150
+ easeOutCubic: [0.33, 1, 0.68, 1],
151
+ easeInOutCubic: [0.65, 0, 0.35, 1],
152
+ easeInQuart: [0.5, 0, 0.75, 0],
153
+ easeOutQuart: [0.25, 1, 0.5, 1],
154
+ easeInOutQuart: [0.76, 0, 0.24, 1],
155
+ easeInQuint: [0.64, 0, 0.78, 0],
156
+ easeOutQuint: [0.22, 1, 0.36, 1],
157
+ easeInOutQuint: [0.83, 0, 0.17, 1],
158
+ easeInExpo: [0.7, 0, 0.84, 0],
159
+ easeOutExpo: [0.16, 1, 0.3, 1],
160
+ easeInOutExpo: [0.87, 0, 0.13, 1],
161
+ easeInCirc: [0.55, 0, 1, 0.45],
162
+ easeOutCirc: [0, 0.55, 0.45, 1],
163
+ easeInOutCirc: [0.85, 0, 0.15, 1],
164
+ easeInBack: [0.36, 0, 0.66, -0.56],
165
+ easeOutBack: [0.34, 1.56, 0.64, 1],
166
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
167
+ };
168
+ Yr({
169
+ linear: Qr
170
+ }, Xr);
171
+ q({
172
+ name: "ADropdown",
173
+ props: {
174
+ modelValue: {
175
+ type: String,
176
+ required: !1,
177
+ default: ""
178
+ },
179
+ label: {
180
+ type: String,
181
+ required: !0
182
+ },
183
+ value: String,
184
+ items: {
185
+ type: Array,
186
+ required: !1,
187
+ default: () => []
188
+ },
189
+ isAsync: {
190
+ type: Boolean,
191
+ required: !1,
192
+ default: !1
193
+ }
194
+ },
195
+ emits: ["update:modelValue", "filterChanged"],
196
+ data() {
197
+ return {
198
+ results: [],
199
+ search: this.modelValue,
200
+ isLoading: !1,
201
+ arrowCounter: 0,
202
+ isOpen: !1
203
+ };
204
+ },
205
+ watch: {
206
+ items: function(e, t) {
207
+ this.isLoading = !1, this.results = e;
208
+ }
209
+ },
210
+ mounted() {
211
+ document.addEventListener("click", this.handleClickOutside), this.filterResults();
212
+ },
213
+ destroyed() {
214
+ document.removeEventListener("click", this.handleClickOutside);
215
+ },
216
+ methods: {
217
+ setResult(e) {
218
+ this.search = e, this.closeResults();
219
+ },
220
+ filterResults() {
221
+ this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1);
222
+ },
223
+ onChange() {
224
+ this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit("filterChanged", this.search)) : this.filterResults();
225
+ },
226
+ handleClickOutside(e) {
227
+ this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0);
228
+ },
229
+ closeResults() {
230
+ this.isOpen = !1, this.items.includes(this.search) || (this.search = ""), this.$emit("update:modelValue", this.search);
231
+ },
232
+ onArrowDown() {
233
+ this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1);
234
+ },
235
+ onArrowUp() {
236
+ this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1);
237
+ },
238
+ onEnter() {
239
+ this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0;
240
+ },
241
+ openWithSearch() {
242
+ this.search = "", this.onChange(), this.$refs.mopInput.focus();
243
+ }
244
+ }
245
+ });
246
+ const Zr = /* @__PURE__ */ q({
247
+ __name: "AForm",
248
+ props: {
249
+ modelValue: {},
250
+ data: {},
251
+ readonly: { type: Boolean }
252
+ },
253
+ emits: ["update:modelValue"],
254
+ setup(e, { emit: t }) {
255
+ const n = e, o = t, r = V(n.data || {}), s = (a) => {
256
+ let l = {};
257
+ for (const [u, c] of Object.entries(a))
258
+ ["component", "fieldtype"].includes(u) || (l[u] = c), u === "rows" && c && c.length === 0 && (l.rows = r.value[a.fieldname]);
259
+ return l;
260
+ }, i = B({
261
+ get: () => n.modelValue.map((a, l) => B({
262
+ get() {
263
+ return a.value;
264
+ },
265
+ set: (u) => {
266
+ n.modelValue[l].value = u, o("update:modelValue", n.modelValue);
267
+ }
268
+ })),
269
+ set: () => {
270
+ }
271
+ });
272
+ return (a, l) => (x(), A("form", null, [
273
+ (x(!0), A(Oe, null, Pe(a.modelValue, (u, c) => (x(), Se(Bt(u.component), Ut({
274
+ key: c,
275
+ schema: u,
276
+ modelValue: i.value[c].value,
277
+ "onUpdate:modelValue": (d) => i.value[c].value = d,
278
+ data: r.value[u.fieldname],
279
+ readonly: a.readonly
280
+ }, s(u)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128))
281
+ ]));
282
+ }
283
+ }), es = /* @__PURE__ */ Gr(Zr, [["__scopeId", "data-v-74d66cf2"]]), yn = {
284
+ date: "##/##/####",
285
+ datetime: "####/##/## ##:##",
286
+ time: "##:##",
287
+ fulltime: "##:##:##",
288
+ phone: "(###) ### - ####",
289
+ card: "#### #### #### ####"
290
+ };
291
+ function ts(e) {
292
+ try {
293
+ return Function(`"use strict";return (${e})`)();
294
+ } catch {
295
+ }
296
+ }
297
+ function ns(e) {
298
+ var t;
299
+ let n = e.value;
300
+ if (n) {
301
+ const o = ts(n);
302
+ if (o) {
303
+ const r = e.instance.locale;
304
+ n = o(r);
305
+ }
306
+ } else {
307
+ const o = (t = e.instance.schema.fieldtype) == null ? void 0 : t.toLowerCase();
308
+ o && yn[o] && (n = yn[o]);
309
+ }
310
+ return n;
311
+ }
312
+ function os(e, t) {
313
+ t || (t = "#");
314
+ let n = e;
315
+ const o = [t, "/", "-", "(", ")", " "];
316
+ for (const r of o)
317
+ n = n.replaceAll(r, "");
318
+ return n;
319
+ }
320
+ function rs(e, t, n) {
321
+ n || (n = "#");
322
+ let o = t;
323
+ for (const r of e) {
324
+ const s = o.indexOf(n);
325
+ if (s !== -1) {
326
+ const i = o.substring(0, s), a = o.substring(s + 1);
327
+ o = i + r + a;
328
+ }
329
+ }
330
+ return o.slice(0, t.length);
331
+ }
332
+ function ss(e, t) {
333
+ const n = ns(t);
334
+ if (!n)
335
+ return;
336
+ const o = "#", r = e.value, s = os(r, o);
337
+ if (s) {
338
+ const i = rs(s, n, o);
339
+ t.instance.maskFilled && (t.instance.maskFilled = !i.includes(o)), e.value = i;
340
+ } else
341
+ e.value = n;
342
+ }
343
+ q({
344
+ name: "ATextInput",
345
+ props: {
346
+ schema: {
347
+ type: Object,
348
+ required: !0
349
+ },
350
+ label: {
351
+ type: String,
352
+ required: !0
353
+ },
354
+ modelValue: {
355
+ type: null
356
+ },
357
+ mask: {
358
+ type: String
359
+ },
360
+ required: {
361
+ type: Boolean
362
+ },
363
+ readonly: {
364
+ type: Boolean
365
+ },
366
+ uuid: {
367
+ type: String
368
+ },
369
+ validation: {
370
+ type: Object,
371
+ default: () => ({ errorMessage: "&nbsp;" })
372
+ }
373
+ },
374
+ setup(e, t) {
375
+ const n = V(!1), o = Z("locale", "");
376
+ return { inputText: B({
377
+ get() {
378
+ return e.modelValue;
379
+ },
380
+ set(r) {
381
+ t.emit("update:modelValue", r);
382
+ }
383
+ }), locale: o, maskFilled: n };
384
+ },
385
+ directives: {
386
+ mask: ss
387
+ }
388
+ });
389
+ function Ot(e) {
390
+ this.message = e || "";
391
+ }
392
+ Ot.prototype = Object.create(Error.prototype, {
393
+ constructor: { value: Ot },
394
+ name: { value: "NotImplemented" },
395
+ stack: {
396
+ get: function() {
397
+ return new Error().stack;
398
+ }
399
+ }
400
+ });
401
+ class je {
402
+ /**
403
+ * @constructor
404
+ * @param {Registry} registry - The immutable registry
405
+ * @param {ReturnType<typeof useDataStore>} store - The mutable Pinia store
406
+ * @param {Schema} [schema] - (optional) The Stonecrop schema
407
+ * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow
408
+ * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions
409
+ * @returns {Stonecrop} The Stonecrop instance
410
+ * @description The Stonecrop constructor initializes a new Stonecrop instance with the given registry, store, schema, workflow, and actions. If a Stonecrop instance has already been created, it returns the existing instance instead of creating a new one.
411
+ * @example
412
+ * const registry = new Registry()
413
+ * const store = useDataStore()
414
+ * const stonecrop = new Stonecrop(registry, store, schema, workflow, actions)
415
+ */
416
+ constructor(t, n, o, r, s) {
417
+ if (this.name = "Stonecrop", je._root)
418
+ return je._root;
419
+ je._root = this, this.registry = t, this.store = n, this.schema = o, this.workflow = r, this.actions = s;
420
+ }
421
+ /**
422
+ * @method setup
423
+ * @param {DoctypeMeta} doctype - The doctype to setup
424
+ * @returns {void}
425
+ * @description Sets up the Stonecrop instance with the given doctype
426
+ * @example
427
+ * const doctype = await registry.getMeta('Task')
428
+ * stonecrop.setup(doctype)
429
+ */
430
+ setup(t) {
431
+ this.getMeta(t), this.getWorkflow(t), this.getActions(t);
432
+ }
433
+ /**
434
+ * @method getMeta
435
+ * @param {DoctypeMeta} doctype - The doctype to get meta for
436
+ * @returns {DoctypeMeta}
437
+ * @see {@link DoctypeMeta}
438
+ * @throws NotImplementedError
439
+ * @description Gets the meta for the given doctype
440
+ * @example
441
+ * const doctype = await registry.getMeta('Task')
442
+ * const meta = stonecrop.getMeta(doctype)
443
+ */
444
+ getMeta(t) {
445
+ return this.registry.getMeta ? this.registry.getMeta(t.doctype) : new Ot(t.doctype);
446
+ }
447
+ /**
448
+ * @method getWorkflow
449
+ * @param {DoctypeMeta} doctype - The doctype to get workflow for
450
+ * @returns {void}
451
+ * @description Gets the workflow for the given doctype
452
+ * @example
453
+ * const doctype = await registry.getMeta('Task')
454
+ * stonecrop.getWorkflow(doctype)
455
+ */
456
+ getWorkflow(t) {
457
+ const n = this.registry.registry[t.slug];
458
+ this.workflow = n.workflow;
459
+ }
460
+ /**
461
+ * @method getActions
462
+ * @param {DoctypeMeta} doctype - The doctype to get actions for
463
+ * @returns {void}
464
+ * @description Gets the actions for the given doctype
465
+ * @example
466
+ * const doctype = await registry.getMeta('Task')
467
+ * stonecrop.getActions(doctype)
468
+ */
469
+ getActions(t) {
470
+ const n = this.registry.registry[t.slug];
471
+ this.actions = n.actions;
472
+ }
473
+ /**
474
+ * @method getRecords
475
+ * @param {DoctypeMeta} doctype - The doctype to get records for
476
+ * @param {RequestInit} [filters] - The filters to apply to the records
477
+ * @returns {Promise<void>}
478
+ * @description Gets the records for the given doctype
479
+ * @example
480
+ * const doctype = await registry.getMeta('Task')
481
+ * await stonecrop.getRecords(doctype)
482
+ * @example
483
+ * const doctype = await registry.getMeta('Task')
484
+ * const filters = JSON.stringify({ status: 'Open' })
485
+ * await stonecrop.getRecords(doctype, { body: filters })
486
+ */
487
+ async getRecords(t, n) {
488
+ this.store.$patch({ records: [] });
489
+ const r = await (await fetch(`/${t.slug}`, n)).json();
490
+ this.store.$patch({ records: r });
491
+ }
492
+ /**
493
+ * @method getRecord
494
+ * @param {DoctypeMeta} doctype - The doctype to get record for
495
+ * @param {string} id - The id of the record to get
496
+ * @returns {Promise<void>}
497
+ * @description Gets the record for the given doctype and id
498
+ * @example
499
+ * const doctype = await registry.getMeta('Task')
500
+ * await stonecrop.getRecord(doctype, 'TASK-00001')
501
+ */
502
+ async getRecord(t, n) {
503
+ this.store.$patch({ record: {} });
504
+ const r = await (await fetch(`/${t.slug}/${n}`)).json();
505
+ this.store.$patch({ record: r });
506
+ }
507
+ /**
508
+ * @method runAction
509
+ * @param {DoctypeMeta} doctype - The doctype to run action for
510
+ * @param {string} action - The action to run
511
+ * @param {string[]} [id] - The id(s) of the record(s) to run action on
512
+ * @returns {void}
513
+ * @description Runs the action for the given doctype and id
514
+ * @example
515
+ * const doctype = await registry.getMeta('Task')
516
+ * stonecrop.runAction(doctype, 'CREATE')
517
+ * @example
518
+ * const doctype = await registry.getMeta('Task')
519
+ * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])
520
+ * @example
521
+ * const doctype = await registry.getMeta('Task')
522
+ * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])
523
+ * @example
524
+ * const doctype = await registry.getMeta('Task')
525
+ * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])
526
+ */
527
+ runAction(t, n, o) {
528
+ const s = this.registry.registry[t.slug].actions.get(n), { initialState: i } = this.workflow;
529
+ this.workflow.transition(i, { type: n }), s.length > 0 && s.forEach((a) => {
530
+ new Function(a)(o);
531
+ });
532
+ }
533
+ }
534
+ var yo = !1;
535
+ function Xe(e, t, n) {
536
+ return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
537
+ }
538
+ function wt(e, t) {
539
+ if (Array.isArray(e)) {
540
+ e.splice(t, 1);
541
+ return;
542
+ }
543
+ delete e[t];
544
+ }
545
+ function as() {
546
+ return wo().__VUE_DEVTOOLS_GLOBAL_HOOK__;
547
+ }
548
+ function wo() {
549
+ return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {};
550
+ }
551
+ const is = typeof Proxy == "function", cs = "devtools-plugin:setup", ls = "plugin:settings:set";
552
+ let $e, Pt;
553
+ function us() {
554
+ var e;
555
+ return $e !== void 0 || (typeof window < "u" && window.performance ? ($e = !0, Pt = window.performance) : typeof global < "u" && (!((e = global.perf_hooks) === null || e === void 0) && e.performance) ? ($e = !0, Pt = global.perf_hooks.performance) : $e = !1), $e;
556
+ }
557
+ function ds() {
558
+ return us() ? Pt.now() : Date.now();
559
+ }
560
+ class fs {
561
+ constructor(t, n) {
562
+ this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
563
+ const o = {};
564
+ if (t.settings)
565
+ for (const i in t.settings) {
566
+ const a = t.settings[i];
567
+ o[i] = a.defaultValue;
568
+ }
569
+ const r = `__vue-devtools-plugin-settings__${t.id}`;
570
+ let s = Object.assign({}, o);
571
+ try {
572
+ const i = localStorage.getItem(r), a = JSON.parse(i);
573
+ Object.assign(s, a);
574
+ } catch {
575
+ }
576
+ this.fallbacks = {
577
+ getSettings() {
578
+ return s;
579
+ },
580
+ setSettings(i) {
581
+ try {
582
+ localStorage.setItem(r, JSON.stringify(i));
583
+ } catch {
584
+ }
585
+ s = i;
586
+ },
587
+ now() {
588
+ return ds();
589
+ }
590
+ }, n && n.on(ls, (i, a) => {
591
+ i === this.plugin.id && this.fallbacks.setSettings(a);
592
+ }), this.proxiedOn = new Proxy({}, {
593
+ get: (i, a) => this.target ? this.target.on[a] : (...l) => {
594
+ this.onQueue.push({
595
+ method: a,
596
+ args: l
597
+ });
598
+ }
599
+ }), this.proxiedTarget = new Proxy({}, {
600
+ get: (i, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...l) => (this.targetQueue.push({
601
+ method: a,
602
+ args: l,
603
+ resolve: () => {
604
+ }
605
+ }), this.fallbacks[a](...l)) : (...l) => new Promise((u) => {
606
+ this.targetQueue.push({
607
+ method: a,
608
+ args: l,
609
+ resolve: u
610
+ });
611
+ })
612
+ });
613
+ }
614
+ async setRealTarget(t) {
615
+ this.target = t;
616
+ for (const n of this.onQueue)
617
+ this.target.on[n.method](...n.args);
618
+ for (const n of this.targetQueue)
619
+ n.resolve(await this.target[n.method](...n.args));
620
+ }
621
+ }
622
+ function zt(e, t) {
623
+ const n = e, o = wo(), r = as(), s = is && n.enableEarlyProxy;
624
+ if (r && (o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
625
+ r.emit(cs, e, t);
626
+ else {
627
+ const i = s ? new fs(n, r) : null;
628
+ (o.__VUE_DEVTOOLS_PLUGINS__ = o.__VUE_DEVTOOLS_PLUGINS__ || []).push({
629
+ pluginDescriptor: n,
630
+ setupFn: t,
631
+ proxy: i
632
+ }), i && t(i.proxiedTarget);
633
+ }
634
+ }
635
+ /*!
636
+ * pinia v2.1.7
637
+ * (c) 2023 Eduardo San Martin Morote
638
+ * @license MIT
639
+ */
640
+ let Le;
641
+ const Ge = (e) => Le = e, _o = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
642
+ /* istanbul ignore next */
643
+ Symbol()
644
+ );
645
+ function xe(e) {
646
+ return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
647
+ }
648
+ var oe;
649
+ (function(e) {
650
+ e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
651
+ })(oe || (oe = {}));
652
+ const dt = typeof window < "u", Be = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && dt, wn = /* @__PURE__ */ (() => 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 })();
653
+ function ps(e, { autoBom: t = !1 } = {}) {
654
+ return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob([String.fromCharCode(65279), e], { type: e.type }) : e;
655
+ }
656
+ function Qt(e, t, n) {
657
+ const o = new XMLHttpRequest();
658
+ o.open("GET", e), o.responseType = "blob", o.onload = function() {
659
+ ko(o.response, t, n);
660
+ }, o.onerror = function() {
661
+ console.error("could not download file");
662
+ }, o.send();
663
+ }
664
+ function bo(e) {
665
+ const t = new XMLHttpRequest();
666
+ t.open("HEAD", e, !1);
667
+ try {
668
+ t.send();
669
+ } catch {
670
+ }
671
+ return t.status >= 200 && t.status <= 299;
672
+ }
673
+ function ot(e) {
674
+ try {
675
+ e.dispatchEvent(new MouseEvent("click"));
676
+ } catch {
677
+ const n = document.createEvent("MouseEvents");
678
+ n.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(n);
679
+ }
680
+ }
681
+ const rt = typeof navigator == "object" ? navigator : { userAgent: "" }, Eo = /* @__PURE__ */ (() => /Macintosh/.test(rt.userAgent) && /AppleWebKit/.test(rt.userAgent) && !/Safari/.test(rt.userAgent))(), ko = dt ? (
682
+ // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
683
+ typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Eo ? hs : (
684
+ // Use msSaveOrOpenBlob as a second approach
685
+ "msSaveOrOpenBlob" in rt ? ms : (
686
+ // Fallback to using FileReader and a popup
687
+ vs
688
+ )
689
+ )
690
+ ) : () => {
691
+ };
692
+ function hs(e, t = "download", n) {
693
+ const o = document.createElement("a");
694
+ o.download = t, o.rel = "noopener", typeof e == "string" ? (o.href = e, o.origin !== location.origin ? bo(o.href) ? Qt(e, t, n) : (o.target = "_blank", ot(o)) : ot(o)) : (o.href = URL.createObjectURL(e), setTimeout(function() {
695
+ URL.revokeObjectURL(o.href);
696
+ }, 4e4), setTimeout(function() {
697
+ ot(o);
698
+ }, 0));
699
+ }
700
+ function ms(e, t = "download", n) {
701
+ if (typeof e == "string")
702
+ if (bo(e))
703
+ Qt(e, t, n);
704
+ else {
705
+ const o = document.createElement("a");
706
+ o.href = e, o.target = "_blank", setTimeout(function() {
707
+ ot(o);
708
+ });
709
+ }
710
+ else
711
+ navigator.msSaveOrOpenBlob(ps(e, n), t);
712
+ }
713
+ function vs(e, t, n, o) {
714
+ if (o = o || open("", "_blank"), o && (o.document.title = o.document.body.innerText = "downloading..."), typeof e == "string")
715
+ return Qt(e, t, n);
716
+ const r = e.type === "application/octet-stream", s = /constructor/i.test(String(wn.HTMLElement)) || "safari" in wn, i = /CriOS\/[\d]+/.test(navigator.userAgent);
717
+ if ((i || r && s || Eo) && typeof FileReader < "u") {
718
+ const a = new FileReader();
719
+ a.onloadend = function() {
720
+ let l = a.result;
721
+ if (typeof l != "string")
722
+ throw o = null, new Error("Wrong reader.result type");
723
+ l = i ? l : l.replace(/^data:[^;]*;/, "data:attachment/file;"), o ? o.location.href = l : location.assign(l), o = null;
724
+ }, a.readAsDataURL(e);
725
+ } else {
726
+ const a = URL.createObjectURL(e);
727
+ o ? o.location.assign(a) : location.href = a, o = null, setTimeout(function() {
728
+ URL.revokeObjectURL(a);
729
+ }, 4e4);
730
+ }
731
+ }
732
+ function H(e, t) {
733
+ const n = "🍍 " + e;
734
+ typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(n, t) : t === "error" ? console.error(n) : t === "warn" ? console.warn(n) : console.log(n);
735
+ }
736
+ function qt(e) {
737
+ return "_a" in e && "install" in e;
738
+ }
739
+ function So() {
740
+ if (!("clipboard" in navigator))
741
+ return H("Your browser doesn't support the Clipboard API", "error"), !0;
742
+ }
743
+ function Io(e) {
744
+ return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (H('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
745
+ }
746
+ async function gs(e) {
747
+ if (!So())
748
+ try {
749
+ await navigator.clipboard.writeText(JSON.stringify(e.state.value)), H("Global state copied to clipboard.");
750
+ } catch (t) {
751
+ if (Io(t))
752
+ return;
753
+ H("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
754
+ }
755
+ }
756
+ async function ys(e) {
757
+ if (!So())
758
+ try {
759
+ Oo(e, JSON.parse(await navigator.clipboard.readText())), H("Global state pasted from clipboard.");
760
+ } catch (t) {
761
+ if (Io(t))
762
+ return;
763
+ H("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
764
+ }
765
+ }
766
+ async function ws(e) {
767
+ try {
768
+ ko(new Blob([JSON.stringify(e.state.value)], {
769
+ type: "text/plain;charset=utf-8"
770
+ }), "pinia-state.json");
771
+ } catch (t) {
772
+ H("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
773
+ }
774
+ }
775
+ let re;
776
+ function _s() {
777
+ re || (re = document.createElement("input"), re.type = "file", re.accept = ".json");
778
+ function e() {
779
+ return new Promise((t, n) => {
780
+ re.onchange = async () => {
781
+ const o = re.files;
782
+ if (!o)
783
+ return t(null);
784
+ const r = o.item(0);
785
+ return t(r ? { text: await r.text(), file: r } : null);
786
+ }, re.oncancel = () => t(null), re.onerror = n, re.click();
787
+ });
788
+ }
789
+ return e;
790
+ }
791
+ async function bs(e) {
792
+ try {
793
+ const n = await _s()();
794
+ if (!n)
795
+ return;
796
+ const { text: o, file: r } = n;
797
+ Oo(e, JSON.parse(o)), H(`Global state imported from "${r.name}".`);
798
+ } catch (t) {
799
+ H("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
800
+ }
801
+ }
802
+ function Oo(e, t) {
803
+ for (const n in t) {
804
+ const o = e.state.value[n];
805
+ o ? Object.assign(o, t[n]) : e.state.value[n] = t[n];
806
+ }
807
+ }
808
+ function te(e) {
809
+ return {
810
+ _custom: {
811
+ display: e
812
+ }
813
+ };
814
+ }
815
+ const Po = "🍍 Pinia (root)", xt = "_root";
816
+ function Es(e) {
817
+ return qt(e) ? {
818
+ id: xt,
819
+ label: Po
820
+ } : {
821
+ id: e.$id,
822
+ label: e.$id
823
+ };
824
+ }
825
+ function ks(e) {
826
+ if (qt(e)) {
827
+ const n = Array.from(e._s.keys()), o = e._s;
828
+ return {
829
+ state: n.map((s) => ({
830
+ editable: !0,
831
+ key: s,
832
+ value: e.state.value[s]
833
+ })),
834
+ getters: n.filter((s) => o.get(s)._getters).map((s) => {
835
+ const i = o.get(s);
836
+ return {
837
+ editable: !1,
838
+ key: s,
839
+ value: i._getters.reduce((a, l) => (a[l] = i[l], a), {})
840
+ };
841
+ })
842
+ };
843
+ }
844
+ const t = {
845
+ state: Object.keys(e.$state).map((n) => ({
846
+ editable: !0,
847
+ key: n,
848
+ value: e.$state[n]
849
+ }))
850
+ };
851
+ return e._getters && e._getters.length && (t.getters = e._getters.map((n) => ({
852
+ editable: !1,
853
+ key: n,
854
+ value: e[n]
855
+ }))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((n) => ({
856
+ editable: !0,
857
+ key: n,
858
+ value: e[n]
859
+ }))), t;
860
+ }
861
+ function Ss(e) {
862
+ return e ? Array.isArray(e) ? e.reduce((t, n) => (t.keys.push(n.key), t.operations.push(n.type), t.oldValue[n.key] = n.oldValue, t.newValue[n.key] = n.newValue, t), {
863
+ oldValue: {},
864
+ keys: [],
865
+ operations: [],
866
+ newValue: {}
867
+ }) : {
868
+ operation: te(e.type),
869
+ key: te(e.key),
870
+ oldValue: e.oldValue,
871
+ newValue: e.newValue
872
+ } : {};
873
+ }
874
+ function Is(e) {
875
+ switch (e) {
876
+ case oe.direct:
877
+ return "mutation";
878
+ case oe.patchFunction:
879
+ return "$patch";
880
+ case oe.patchObject:
881
+ return "$patch";
882
+ default:
883
+ return "unknown";
884
+ }
885
+ }
886
+ let Re = !0;
887
+ const st = [], _e = "pinia:mutations", z = "pinia", { assign: Os } = Object, ct = (e) => "🍍 " + e;
888
+ function Ps(e, t) {
889
+ zt({
890
+ id: "dev.esm.pinia",
891
+ label: "Pinia 🍍",
892
+ logo: "https://pinia.vuejs.org/logo.svg",
893
+ packageName: "pinia",
894
+ homepage: "https://pinia.vuejs.org",
895
+ componentStateTypes: st,
896
+ app: e
897
+ }, (n) => {
898
+ typeof n.now != "function" && H("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."), n.addTimelineLayer({
899
+ id: _e,
900
+ label: "Pinia 🍍",
901
+ color: 15064968
902
+ }), n.addInspector({
903
+ id: z,
904
+ label: "Pinia 🍍",
905
+ icon: "storage",
906
+ treeFilterPlaceholder: "Search stores",
907
+ actions: [
908
+ {
909
+ icon: "content_copy",
910
+ action: () => {
911
+ gs(t);
912
+ },
913
+ tooltip: "Serialize and copy the state"
914
+ },
915
+ {
916
+ icon: "content_paste",
917
+ action: async () => {
918
+ await ys(t), n.sendInspectorTree(z), n.sendInspectorState(z);
919
+ },
920
+ tooltip: "Replace the state with the content of your clipboard"
921
+ },
922
+ {
923
+ icon: "save",
924
+ action: () => {
925
+ ws(t);
926
+ },
927
+ tooltip: "Save the state as a JSON file"
928
+ },
929
+ {
930
+ icon: "folder_open",
931
+ action: async () => {
932
+ await bs(t), n.sendInspectorTree(z), n.sendInspectorState(z);
933
+ },
934
+ tooltip: "Import the state from a JSON file"
935
+ }
936
+ ],
937
+ nodeActions: [
938
+ {
939
+ icon: "restore",
940
+ tooltip: 'Reset the state (with "$reset")',
941
+ action: (o) => {
942
+ const r = t._s.get(o);
943
+ r ? typeof r.$reset != "function" ? H(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`, "warn") : (r.$reset(), H(`Store "${o}" reset.`)) : H(`Cannot reset "${o}" store because it wasn't found.`, "warn");
944
+ }
945
+ }
946
+ ]
947
+ }), n.on.inspectComponent((o, r) => {
948
+ const s = o.componentInstance && o.componentInstance.proxy;
949
+ if (s && s._pStores) {
950
+ const i = o.componentInstance.proxy._pStores;
951
+ Object.values(i).forEach((a) => {
952
+ o.instanceData.state.push({
953
+ type: ct(a.$id),
954
+ key: "state",
955
+ editable: !0,
956
+ value: a._isOptionsAPI ? {
957
+ _custom: {
958
+ value: ut(a.$state),
959
+ actions: [
960
+ {
961
+ icon: "restore",
962
+ tooltip: "Reset the state of this store",
963
+ action: () => a.$reset()
964
+ }
965
+ ]
966
+ }
967
+ } : (
968
+ // NOTE: workaround to unwrap transferred refs
969
+ Object.keys(a.$state).reduce((l, u) => (l[u] = a.$state[u], l), {})
970
+ )
971
+ }), a._getters && a._getters.length && o.instanceData.state.push({
972
+ type: ct(a.$id),
973
+ key: "getters",
974
+ editable: !1,
975
+ value: a._getters.reduce((l, u) => {
976
+ try {
977
+ l[u] = a[u];
978
+ } catch (c) {
979
+ l[u] = c;
980
+ }
981
+ return l;
982
+ }, {})
983
+ });
984
+ });
985
+ }
986
+ }), n.on.getInspectorTree((o) => {
987
+ if (o.app === e && o.inspectorId === z) {
988
+ let r = [t];
989
+ r = r.concat(Array.from(t._s.values())), o.rootNodes = (o.filter ? r.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(o.filter.toLowerCase()) : Po.toLowerCase().includes(o.filter.toLowerCase())) : r).map(Es);
990
+ }
991
+ }), n.on.getInspectorState((o) => {
992
+ if (o.app === e && o.inspectorId === z) {
993
+ const r = o.nodeId === xt ? t : t._s.get(o.nodeId);
994
+ if (!r)
995
+ return;
996
+ r && (o.state = ks(r));
997
+ }
998
+ }), n.on.editInspectorState((o, r) => {
999
+ if (o.app === e && o.inspectorId === z) {
1000
+ const s = o.nodeId === xt ? t : t._s.get(o.nodeId);
1001
+ if (!s)
1002
+ return H(`store "${o.nodeId}" not found`, "error");
1003
+ const { path: i } = o;
1004
+ qt(s) ? i.unshift("state") : (i.length !== 1 || !s._customProperties.has(i[0]) || i[0] in s.$state) && i.unshift("$state"), Re = !1, o.set(s, i, o.state.value), Re = !0;
1005
+ }
1006
+ }), n.on.editComponentState((o) => {
1007
+ if (o.type.startsWith("🍍")) {
1008
+ const r = o.type.replace(/^🍍\s*/, ""), s = t._s.get(r);
1009
+ if (!s)
1010
+ return H(`store "${r}" not found`, "error");
1011
+ const { path: i } = o;
1012
+ if (i[0] !== "state")
1013
+ return H(`Invalid path for store "${r}":
1014
+ ${i}
1015
+ Only state can be modified.`);
1016
+ i[0] = "$state", Re = !1, o.set(s, i, o.state.value), Re = !0;
1017
+ }
1018
+ });
1019
+ });
1020
+ }
1021
+ function xs(e, t) {
1022
+ st.includes(ct(t.$id)) || st.push(ct(t.$id)), zt({
1023
+ id: "dev.esm.pinia",
1024
+ label: "Pinia 🍍",
1025
+ logo: "https://pinia.vuejs.org/logo.svg",
1026
+ packageName: "pinia",
1027
+ homepage: "https://pinia.vuejs.org",
1028
+ componentStateTypes: st,
1029
+ app: e,
1030
+ settings: {
1031
+ logStoreChanges: {
1032
+ label: "Notify about new/deleted stores",
1033
+ type: "boolean",
1034
+ defaultValue: !0
1035
+ }
1036
+ // useEmojis: {
1037
+ // label: 'Use emojis in messages ⚡️',
1038
+ // type: 'boolean',
1039
+ // defaultValue: true,
1040
+ // },
1041
+ }
1042
+ }, (n) => {
1043
+ const o = typeof n.now == "function" ? n.now.bind(n) : Date.now;
1044
+ t.$onAction(({ after: i, onError: a, name: l, args: u }) => {
1045
+ const c = xo++;
1046
+ n.addTimelineEvent({
1047
+ layerId: _e,
1048
+ event: {
1049
+ time: o(),
1050
+ title: "🛫 " + l,
1051
+ subtitle: "start",
1052
+ data: {
1053
+ store: te(t.$id),
1054
+ action: te(l),
1055
+ args: u
1056
+ },
1057
+ groupId: c
1058
+ }
1059
+ }), i((d) => {
1060
+ ve = void 0, n.addTimelineEvent({
1061
+ layerId: _e,
1062
+ event: {
1063
+ time: o(),
1064
+ title: "🛬 " + l,
1065
+ subtitle: "end",
1066
+ data: {
1067
+ store: te(t.$id),
1068
+ action: te(l),
1069
+ args: u,
1070
+ result: d
1071
+ },
1072
+ groupId: c
1073
+ }
1074
+ });
1075
+ }), a((d) => {
1076
+ ve = void 0, n.addTimelineEvent({
1077
+ layerId: _e,
1078
+ event: {
1079
+ time: o(),
1080
+ logType: "error",
1081
+ title: "💥 " + l,
1082
+ subtitle: "end",
1083
+ data: {
1084
+ store: te(t.$id),
1085
+ action: te(l),
1086
+ args: u,
1087
+ error: d
1088
+ },
1089
+ groupId: c
1090
+ }
1091
+ });
1092
+ });
1093
+ }, !0), t._customProperties.forEach((i) => {
1094
+ ue(() => k(t[i]), (a, l) => {
1095
+ n.notifyComponentUpdate(), n.sendInspectorState(z), Re && n.addTimelineEvent({
1096
+ layerId: _e,
1097
+ event: {
1098
+ time: o(),
1099
+ title: "Change",
1100
+ subtitle: i,
1101
+ data: {
1102
+ newValue: a,
1103
+ oldValue: l
1104
+ },
1105
+ groupId: ve
1106
+ }
1107
+ });
1108
+ }, { deep: !0 });
1109
+ }), t.$subscribe(({ events: i, type: a }, l) => {
1110
+ if (n.notifyComponentUpdate(), n.sendInspectorState(z), !Re)
1111
+ return;
1112
+ const u = {
1113
+ time: o(),
1114
+ title: Is(a),
1115
+ data: Os({ store: te(t.$id) }, Ss(i)),
1116
+ groupId: ve
1117
+ };
1118
+ a === oe.patchFunction ? u.subtitle = "⤵️" : a === oe.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
1119
+ _custom: {
1120
+ display: "DebuggerEvent",
1121
+ type: "object",
1122
+ tooltip: "raw DebuggerEvent[]",
1123
+ value: i
1124
+ }
1125
+ }), n.addTimelineEvent({
1126
+ layerId: _e,
1127
+ event: u
1128
+ });
1129
+ }, { detached: !0, flush: "sync" });
1130
+ const r = t._hotUpdate;
1131
+ t._hotUpdate = Ee((i) => {
1132
+ r(i), n.addTimelineEvent({
1133
+ layerId: _e,
1134
+ event: {
1135
+ time: o(),
1136
+ title: "🔥 " + t.$id,
1137
+ subtitle: "HMR update",
1138
+ data: {
1139
+ store: te(t.$id),
1140
+ info: te("HMR update")
1141
+ }
1142
+ }
1143
+ }), n.notifyComponentUpdate(), n.sendInspectorTree(z), n.sendInspectorState(z);
1144
+ });
1145
+ const { $dispose: s } = t;
1146
+ t.$dispose = () => {
1147
+ s(), n.notifyComponentUpdate(), n.sendInspectorTree(z), n.sendInspectorState(z), n.getSettings().logStoreChanges && H(`Disposed "${t.$id}" store 🗑`);
1148
+ }, n.notifyComponentUpdate(), n.sendInspectorTree(z), n.sendInspectorState(z), n.getSettings().logStoreChanges && H(`"${t.$id}" store installed 🆕`);
1149
+ });
1150
+ }
1151
+ let xo = 0, ve;
1152
+ function _n(e, t, n) {
1153
+ const o = t.reduce((r, s) => (r[s] = ut(e)[s], r), {});
1154
+ for (const r in o)
1155
+ e[r] = function() {
1156
+ const s = xo, i = n ? new Proxy(e, {
1157
+ get(...l) {
1158
+ return ve = s, Reflect.get(...l);
1159
+ },
1160
+ set(...l) {
1161
+ return ve = s, Reflect.set(...l);
1162
+ }
1163
+ }) : e;
1164
+ ve = s;
1165
+ const a = o[r].apply(i, arguments);
1166
+ return ve = void 0, a;
1167
+ };
1168
+ }
1169
+ function Cs({ app: e, store: t, options: n }) {
1170
+ if (t.$id.startsWith("__hot:"))
1171
+ return;
1172
+ t._isOptionsAPI = !!n.state, _n(t, Object.keys(n.actions), t._isOptionsAPI);
1173
+ const o = t._hotUpdate;
1174
+ ut(t)._hotUpdate = function(r) {
1175
+ o.apply(this, arguments), _n(t, Object.keys(r._hmrPayload.actions), !!t._isOptionsAPI);
1176
+ }, xs(
1177
+ e,
1178
+ // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
1179
+ t
1180
+ );
1181
+ }
1182
+ function $s() {
1183
+ const e = fo(!0), t = e.run(() => V({}));
1184
+ let n = [], o = [];
1185
+ const r = Ee({
1186
+ install(s) {
1187
+ Ge(r), r._a = s, s.provide(_o, r), s.config.globalProperties.$pinia = r, Be && Ps(s, r), o.forEach((i) => n.push(i)), o = [];
1188
+ },
1189
+ use(s) {
1190
+ return !this._a && !yo ? o.push(s) : n.push(s), this;
1191
+ },
1192
+ _p: n,
1193
+ // it's actually undefined here
1194
+ // @ts-expect-error
1195
+ _a: null,
1196
+ _e: e,
1197
+ _s: /* @__PURE__ */ new Map(),
1198
+ state: t
1199
+ });
1200
+ return Be && typeof Proxy < "u" && r.use(Cs), r;
1201
+ }
1202
+ function Co(e, t) {
1203
+ for (const n in t) {
1204
+ const o = t[n];
1205
+ if (!(n in e))
1206
+ continue;
1207
+ const r = e[n];
1208
+ xe(r) && xe(o) && !We(o) && !Wt(o) ? e[n] = Co(r, o) : e[n] = o;
1209
+ }
1210
+ return e;
1211
+ }
1212
+ const $o = () => {
1213
+ };
1214
+ function bn(e, t, n, o = $o) {
1215
+ e.push(t);
1216
+ const r = () => {
1217
+ const s = e.indexOf(t);
1218
+ s > -1 && (e.splice(s, 1), o());
1219
+ };
1220
+ return !n && po() && ho(r), r;
1221
+ }
1222
+ function Ne(e, ...t) {
1223
+ e.slice().forEach((n) => {
1224
+ n(...t);
1225
+ });
1226
+ }
1227
+ const Ns = (e) => e();
1228
+ function Ct(e, t) {
1229
+ e instanceof Map && t instanceof Map && t.forEach((n, o) => e.set(o, n)), e instanceof Set && t instanceof Set && t.forEach(e.add, e);
1230
+ for (const n in t) {
1231
+ if (!t.hasOwnProperty(n))
1232
+ continue;
1233
+ const o = t[n], r = e[n];
1234
+ xe(r) && xe(o) && e.hasOwnProperty(n) && !We(o) && !Wt(o) ? e[n] = Ct(r, o) : e[n] = o;
1235
+ }
1236
+ return e;
1237
+ }
1238
+ const Rs = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
1239
+ /* istanbul ignore next */
1240
+ Symbol()
1241
+ );
1242
+ function As(e) {
1243
+ return !xe(e) || !e.hasOwnProperty(Rs);
1244
+ }
1245
+ const { assign: X } = Object;
1246
+ function En(e) {
1247
+ return !!(We(e) && e.effect);
1248
+ }
1249
+ function kn(e, t, n, o) {
1250
+ const { state: r, actions: s, getters: i } = t, a = n.state.value[e];
1251
+ let l;
1252
+ function u() {
1253
+ !a && (process.env.NODE_ENV === "production" || !o) && (n.state.value[e] = r ? r() : {});
1254
+ const c = process.env.NODE_ENV !== "production" && o ? (
1255
+ // use ref() to unwrap refs inside state TODO: check if this is still necessary
1256
+ dn(V(r ? r() : {}).value)
1257
+ ) : dn(n.state.value[e]);
1258
+ return X(c, s, Object.keys(i || {}).reduce((d, f) => (process.env.NODE_ENV !== "production" && f in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`), d[f] = Ee(B(() => {
1259
+ Ge(n);
1260
+ const p = n._s.get(e);
1261
+ return i[f].call(p, p);
1262
+ })), d), {}));
1263
+ }
1264
+ return l = $t(e, u, t, n, o, !0), l;
1265
+ }
1266
+ function $t(e, t, n = {}, o, r, s) {
1267
+ let i;
1268
+ const a = X({ actions: {} }, n);
1269
+ if (process.env.NODE_ENV !== "production" && !o._e.active)
1270
+ throw new Error("Pinia destroyed");
1271
+ const l = {
1272
+ deep: !0
1273
+ // flush: 'post',
1274
+ };
1275
+ process.env.NODE_ENV !== "production" && !yo && (l.onTrigger = (E) => {
1276
+ u ? p = E : u == !1 && !S._hotUpdating && (Array.isArray(p) ? p.push(E) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
1277
+ });
1278
+ let u, c, d = [], f = [], p;
1279
+ const v = o.state.value[e];
1280
+ !s && !v && (process.env.NODE_ENV === "production" || !r) && (o.state.value[e] = {});
1281
+ const m = V({});
1282
+ let w;
1283
+ function I(E) {
1284
+ let _;
1285
+ u = c = !1, process.env.NODE_ENV !== "production" && (p = []), typeof E == "function" ? (E(o.state.value[e]), _ = {
1286
+ type: oe.patchFunction,
1287
+ storeId: e,
1288
+ events: p
1289
+ }) : (Ct(o.state.value[e], E), _ = {
1290
+ type: oe.patchObject,
1291
+ payload: E,
1292
+ storeId: e,
1293
+ events: p
1294
+ });
1295
+ const D = w = Symbol();
1296
+ Fe().then(() => {
1297
+ w === D && (u = !0);
1298
+ }), c = !0, Ne(d, _, o.state.value[e]);
1299
+ }
1300
+ const O = s ? function() {
1301
+ const { state: _ } = n, D = _ ? _() : {};
1302
+ this.$patch((U) => {
1303
+ X(U, D);
1304
+ });
1305
+ } : (
1306
+ /* istanbul ignore next */
1307
+ process.env.NODE_ENV !== "production" ? () => {
1308
+ throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
1309
+ } : $o
1310
+ );
1311
+ function M() {
1312
+ i.stop(), d = [], f = [], o._s.delete(e);
1313
+ }
1314
+ function W(E, _) {
1315
+ return function() {
1316
+ Ge(o);
1317
+ const D = Array.from(arguments), U = [], ye = [];
1318
+ function De(G) {
1319
+ U.push(G);
1320
+ }
1321
+ function Ke(G) {
1322
+ ye.push(G);
1323
+ }
1324
+ Ne(f, {
1325
+ args: D,
1326
+ name: E,
1327
+ store: S,
1328
+ after: De,
1329
+ onError: Ke
1330
+ });
1331
+ let ne;
1332
+ try {
1333
+ ne = _.apply(this && this.$id === e ? this : S, D);
1334
+ } catch (G) {
1335
+ throw Ne(ye, G), G;
1336
+ }
1337
+ return ne instanceof Promise ? ne.then((G) => (Ne(U, G), G)).catch((G) => (Ne(ye, G), Promise.reject(G))) : (Ne(U, ne), ne);
1338
+ };
1339
+ }
1340
+ const J = /* @__PURE__ */ Ee({
1341
+ actions: {},
1342
+ getters: {},
1343
+ state: [],
1344
+ hotState: m
1345
+ }), Y = {
1346
+ _p: o,
1347
+ // _s: scope,
1348
+ $id: e,
1349
+ $onAction: bn.bind(null, f),
1350
+ $patch: I,
1351
+ $reset: O,
1352
+ $subscribe(E, _ = {}) {
1353
+ const D = bn(d, E, _.detached, () => U()), U = i.run(() => ue(() => o.state.value[e], (ye) => {
1354
+ (_.flush === "sync" ? c : u) && E({
1355
+ storeId: e,
1356
+ type: oe.direct,
1357
+ events: p
1358
+ }, ye);
1359
+ }, X({}, l, _)));
1360
+ return D;
1361
+ },
1362
+ $dispose: M
1363
+ }, S = be(process.env.NODE_ENV !== "production" || Be ? X(
1364
+ {
1365
+ _hmrPayload: J,
1366
+ _customProperties: Ee(/* @__PURE__ */ new Set())
1367
+ // devtools custom properties
1368
+ },
1369
+ Y
1370
+ // must be added later
1371
+ // setupStore
1372
+ ) : Y);
1373
+ o._s.set(e, S);
1374
+ const ee = (o._a && o._a.runWithContext || Ns)(() => o._e.run(() => (i = fo()).run(t)));
1375
+ for (const E in ee) {
1376
+ const _ = ee[E];
1377
+ if (We(_) && !En(_) || Wt(_))
1378
+ process.env.NODE_ENV !== "production" && r ? Xe(m.value, E, yt(ee, E)) : s || (v && As(_) && (We(_) ? _.value = v[E] : Ct(_, v[E])), o.state.value[e][E] = _), process.env.NODE_ENV !== "production" && J.state.push(E);
1379
+ else if (typeof _ == "function") {
1380
+ const D = process.env.NODE_ENV !== "production" && r ? _ : W(E, _);
1381
+ ee[E] = D, process.env.NODE_ENV !== "production" && (J.actions[E] = _), a.actions[E] = _;
1382
+ } else
1383
+ process.env.NODE_ENV !== "production" && En(_) && (J.getters[E] = s ? (
1384
+ // @ts-expect-error
1385
+ n.getters[E]
1386
+ ) : _, dt && (ee._getters || // @ts-expect-error: same
1387
+ (ee._getters = Ee([]))).push(E));
1388
+ }
1389
+ if (X(S, ee), X(ut(S), ee), Object.defineProperty(S, "$state", {
1390
+ get: () => process.env.NODE_ENV !== "production" && r ? m.value : o.state.value[e],
1391
+ set: (E) => {
1392
+ if (process.env.NODE_ENV !== "production" && r)
1393
+ throw new Error("cannot set hotState");
1394
+ I((_) => {
1395
+ X(_, E);
1396
+ });
1397
+ }
1398
+ }), process.env.NODE_ENV !== "production" && (S._hotUpdate = Ee((E) => {
1399
+ S._hotUpdating = !0, E._hmrPayload.state.forEach((_) => {
1400
+ if (_ in S.$state) {
1401
+ const D = E.$state[_], U = S.$state[_];
1402
+ typeof D == "object" && xe(D) && xe(U) ? Co(D, U) : E.$state[_] = U;
1403
+ }
1404
+ Xe(S, _, yt(E.$state, _));
1405
+ }), Object.keys(S.$state).forEach((_) => {
1406
+ _ in E.$state || wt(S, _);
1407
+ }), u = !1, c = !1, o.state.value[e] = yt(E._hmrPayload, "hotState"), c = !0, Fe().then(() => {
1408
+ u = !0;
1409
+ });
1410
+ for (const _ in E._hmrPayload.actions) {
1411
+ const D = E[_];
1412
+ Xe(S, _, W(_, D));
1413
+ }
1414
+ for (const _ in E._hmrPayload.getters) {
1415
+ const D = E._hmrPayload.getters[_], U = s ? (
1416
+ // special handling of options api
1417
+ B(() => (Ge(o), D.call(S, S)))
1418
+ ) : D;
1419
+ Xe(S, _, U);
1420
+ }
1421
+ Object.keys(S._hmrPayload.getters).forEach((_) => {
1422
+ _ in E._hmrPayload.getters || wt(S, _);
1423
+ }), Object.keys(S._hmrPayload.actions).forEach((_) => {
1424
+ _ in E._hmrPayload.actions || wt(S, _);
1425
+ }), S._hmrPayload = E._hmrPayload, S._getters = E._getters, S._hotUpdating = !1;
1426
+ })), Be) {
1427
+ const E = {
1428
+ writable: !0,
1429
+ configurable: !0,
1430
+ // avoid warning on devtools trying to display this property
1431
+ enumerable: !1
1432
+ };
1433
+ ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((_) => {
1434
+ Object.defineProperty(S, _, X({ value: S[_] }, E));
1435
+ });
1436
+ }
1437
+ return o._p.forEach((E) => {
1438
+ if (Be) {
1439
+ const _ = i.run(() => E({
1440
+ store: S,
1441
+ app: o._a,
1442
+ pinia: o,
1443
+ options: a
1444
+ }));
1445
+ Object.keys(_ || {}).forEach((D) => S._customProperties.add(D)), X(S, _);
1446
+ } else
1447
+ X(S, i.run(() => E({
1448
+ store: S,
1449
+ app: o._a,
1450
+ pinia: o,
1451
+ options: a
1452
+ })));
1453
+ }), process.env.NODE_ENV !== "production" && S.$state && typeof S.$state == "object" && typeof S.$state.constructor == "function" && !S.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
1454
+ state: () => new MyClass()
1455
+ Found in store "${S.$id}".`), v && s && n.hydrate && n.hydrate(S.$state, v), u = !0, c = !0, S;
1456
+ }
1457
+ function Ts(e, t, n) {
1458
+ let o, r;
1459
+ const s = typeof t == "function";
1460
+ if (typeof e == "string")
1461
+ o = e, r = s ? n : t;
1462
+ else if (r = e, o = e.id, process.env.NODE_ENV !== "production" && typeof o != "string")
1463
+ throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
1464
+ function i(a, l) {
1465
+ const u = br();
1466
+ if (a = // in test mode, ignore the argument provided as we can always retrieve a
1467
+ // pinia instance with getActivePinia()
1468
+ (process.env.NODE_ENV === "test" && Le && Le._testing ? null : a) || (u ? Z(_o, null) : null), a && Ge(a), process.env.NODE_ENV !== "production" && !Le)
1469
+ throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
1470
+ See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
1471
+ This will fail in production.`);
1472
+ a = Le, a._s.has(o) || (s ? $t(o, t, r, a) : kn(o, r, a), process.env.NODE_ENV !== "production" && (i._pinia = a));
1473
+ const c = a._s.get(o);
1474
+ if (process.env.NODE_ENV !== "production" && l) {
1475
+ const d = "__hot:" + o, f = s ? $t(d, t, r, a, !0) : kn(d, X({}, r), a, !0);
1476
+ l._hotUpdate(f), delete a.state.value[d], a._s.delete(d);
1477
+ }
1478
+ if (process.env.NODE_ENV !== "production" && dt) {
1479
+ const d = Ht();
1480
+ if (d && d.proxy && // avoid adding stores that are just built for hot module replacement
1481
+ !l) {
1482
+ const f = d.proxy, p = "_pStores" in f ? f._pStores : f._pStores = {};
1483
+ p[o] = c;
1484
+ }
1485
+ }
1486
+ return c;
1487
+ }
1488
+ return i.$id = o, i;
1489
+ }
1490
+ const Ds = Ts("data", () => {
1491
+ const e = V([]), t = V({});
1492
+ return { records: e, record: t };
1493
+ });
1494
+ function No(e) {
1495
+ e || (e = Z("$registry"));
1496
+ const t = Ds(), n = V(new je(e, t)), o = V(!1);
1497
+ return wr(async () => {
1498
+ var r, s;
1499
+ const i = e.router.currentRoute.value, a = (r = i.params.records) == null ? void 0 : r.toString().toLowerCase(), l = (s = i.params.record) == null ? void 0 : s.toString().toLowerCase();
1500
+ if (!a && !l)
1501
+ return;
1502
+ const u = await e.getMeta(a);
1503
+ e.addDoctype(u), n.value.setup(u), a && (l ? await n.value.getRecord(u, l) : await n.value.getRecords(u)), n.value.runAction(u, "LOAD", l ? [l] : void 0), o.value = !0;
1504
+ }), { stonecrop: n, isReady: o };
1505
+ }
1506
+ /*!
1507
+ * vue-router v4.2.5
1508
+ * (c) 2023 Eduardo San Martin Morote
1509
+ * @license MIT
1510
+ */
1511
+ const ae = typeof window < "u";
1512
+ function Vs(e) {
1513
+ return e.__esModule || e[Symbol.toStringTag] === "Module";
1514
+ }
1515
+ const R = Object.assign;
1516
+ function _t(e, t) {
1517
+ const n = {};
1518
+ for (const o in t) {
1519
+ const r = t[o];
1520
+ n[o] = K(r) ? r.map(e) : e(r);
1521
+ }
1522
+ return n;
1523
+ }
1524
+ const Ue = () => {
1525
+ }, K = Array.isArray;
1526
+ function $(e) {
1527
+ const t = Array.from(arguments).slice(1);
1528
+ console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
1529
+ }
1530
+ const Ms = /\/$/, Ls = (e) => e.replace(Ms, "");
1531
+ function bt(e, t, n = "/") {
1532
+ let o, r = {}, s = "", i = "";
1533
+ const a = t.indexOf("#");
1534
+ let l = t.indexOf("?");
1535
+ return a < l && a >= 0 && (l = -1), l > -1 && (o = t.slice(0, l), s = t.slice(l + 1, a > -1 ? a : t.length), r = e(s)), a > -1 && (o = o || t.slice(0, a), i = t.slice(a, t.length)), o = Us(o ?? t, n), {
1536
+ fullPath: o + (s && "?") + s + i,
1537
+ path: o,
1538
+ query: r,
1539
+ hash: i
1540
+ };
1541
+ }
1542
+ function js(e, t) {
1543
+ const n = t.query ? e(t.query) : "";
1544
+ return t.path + (n && "?") + n + (t.hash || "");
1545
+ }
1546
+ function Sn(e, t) {
1547
+ return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
1548
+ }
1549
+ function In(e, t, n) {
1550
+ const o = t.matched.length - 1, r = n.matched.length - 1;
1551
+ return o > -1 && o === r && ge(t.matched[o], n.matched[r]) && Ro(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
1552
+ }
1553
+ function ge(e, t) {
1554
+ return (e.aliasOf || e) === (t.aliasOf || t);
1555
+ }
1556
+ function Ro(e, t) {
1557
+ if (Object.keys(e).length !== Object.keys(t).length)
1558
+ return !1;
1559
+ for (const n in e)
1560
+ if (!Bs(e[n], t[n]))
1561
+ return !1;
1562
+ return !0;
1563
+ }
1564
+ function Bs(e, t) {
1565
+ return K(e) ? On(e, t) : K(t) ? On(t, e) : e === t;
1566
+ }
1567
+ function On(e, t) {
1568
+ return K(t) ? e.length === t.length && e.every((n, o) => n === t[o]) : e.length === 1 && e[0] === t;
1569
+ }
1570
+ function Us(e, t) {
1571
+ if (e.startsWith("/"))
1572
+ return e;
1573
+ if (process.env.NODE_ENV !== "production" && !t.startsWith("/"))
1574
+ return $(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`), e;
1575
+ if (!e)
1576
+ return t;
1577
+ const n = t.split("/"), o = e.split("/"), r = o[o.length - 1];
1578
+ (r === ".." || r === ".") && o.push("");
1579
+ let s = n.length - 1, i, a;
1580
+ for (i = 0; i < o.length; i++)
1581
+ if (a = o[i], a !== ".")
1582
+ if (a === "..")
1583
+ s > 1 && s--;
1584
+ else
1585
+ break;
1586
+ return n.slice(0, s).join("/") + "/" + o.slice(i - (i === o.length ? 1 : 0)).join("/");
1587
+ }
1588
+ var ze;
1589
+ (function(e) {
1590
+ e.pop = "pop", e.push = "push";
1591
+ })(ze || (ze = {}));
1592
+ var He;
1593
+ (function(e) {
1594
+ e.back = "back", e.forward = "forward", e.unknown = "";
1595
+ })(He || (He = {}));
1596
+ function Hs(e) {
1597
+ if (!e)
1598
+ if (ae) {
1599
+ const t = document.querySelector("base");
1600
+ e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
1601
+ } else
1602
+ e = "/";
1603
+ return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), Ls(e);
1604
+ }
1605
+ const Ws = /^[^#]+#/;
1606
+ function Fs(e, t) {
1607
+ return e.replace(Ws, "#") + t;
1608
+ }
1609
+ function Gs(e, t) {
1610
+ const n = document.documentElement.getBoundingClientRect(), o = e.getBoundingClientRect();
1611
+ return {
1612
+ behavior: t.behavior,
1613
+ left: o.left - n.left - (t.left || 0),
1614
+ top: o.top - n.top - (t.top || 0)
1615
+ };
1616
+ }
1617
+ const ft = () => ({
1618
+ left: window.pageXOffset,
1619
+ top: window.pageYOffset
1620
+ });
1621
+ function zs(e) {
1622
+ let t;
1623
+ if ("el" in e) {
1624
+ const n = e.el, o = typeof n == "string" && n.startsWith("#");
1625
+ if (process.env.NODE_ENV !== "production" && typeof e.el == "string" && (!o || !document.getElementById(e.el.slice(1))))
1626
+ try {
1627
+ const s = document.querySelector(e.el);
1628
+ if (o && s) {
1629
+ $(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);
1630
+ return;
1631
+ }
1632
+ } catch {
1633
+ $(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);
1634
+ return;
1635
+ }
1636
+ const r = typeof n == "string" ? o ? document.getElementById(n.slice(1)) : document.querySelector(n) : n;
1637
+ if (!r) {
1638
+ process.env.NODE_ENV !== "production" && $(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);
1639
+ return;
1640
+ }
1641
+ t = Gs(r, e);
1642
+ } else
1643
+ t = e;
1644
+ "scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.pageXOffset, t.top != null ? t.top : window.pageYOffset);
1645
+ }
1646
+ function Pn(e, t) {
1647
+ return (history.state ? history.state.position - t : -1) + e;
1648
+ }
1649
+ const Nt = /* @__PURE__ */ new Map();
1650
+ function Qs(e, t) {
1651
+ Nt.set(e, t);
1652
+ }
1653
+ function qs(e) {
1654
+ const t = Nt.get(e);
1655
+ return Nt.delete(e), t;
1656
+ }
1657
+ let Ks = () => location.protocol + "//" + location.host;
1658
+ function Ao(e, t) {
1659
+ const { pathname: n, search: o, hash: r } = t, s = e.indexOf("#");
1660
+ if (s > -1) {
1661
+ let a = r.includes(e.slice(s)) ? e.slice(s).length : 1, l = r.slice(a);
1662
+ return l[0] !== "/" && (l = "/" + l), Sn(l, "");
1663
+ }
1664
+ return Sn(n, e) + o + r;
1665
+ }
1666
+ function Js(e, t, n, o) {
1667
+ let r = [], s = [], i = null;
1668
+ const a = ({ state: f }) => {
1669
+ const p = Ao(e, location), v = n.value, m = t.value;
1670
+ let w = 0;
1671
+ if (f) {
1672
+ if (n.value = p, t.value = f, i && i === v) {
1673
+ i = null;
1674
+ return;
1675
+ }
1676
+ w = m ? f.position - m.position : 0;
1677
+ } else
1678
+ o(p);
1679
+ r.forEach((I) => {
1680
+ I(n.value, v, {
1681
+ delta: w,
1682
+ type: ze.pop,
1683
+ direction: w ? w > 0 ? He.forward : He.back : He.unknown
1684
+ });
1685
+ });
1686
+ };
1687
+ function l() {
1688
+ i = n.value;
1689
+ }
1690
+ function u(f) {
1691
+ r.push(f);
1692
+ const p = () => {
1693
+ const v = r.indexOf(f);
1694
+ v > -1 && r.splice(v, 1);
1695
+ };
1696
+ return s.push(p), p;
1697
+ }
1698
+ function c() {
1699
+ const { history: f } = window;
1700
+ f.state && f.replaceState(R({}, f.state, { scroll: ft() }), "");
1701
+ }
1702
+ function d() {
1703
+ for (const f of s)
1704
+ f();
1705
+ s = [], window.removeEventListener("popstate", a), window.removeEventListener("beforeunload", c);
1706
+ }
1707
+ return window.addEventListener("popstate", a), window.addEventListener("beforeunload", c, {
1708
+ passive: !0
1709
+ }), {
1710
+ pauseListeners: l,
1711
+ listen: u,
1712
+ destroy: d
1713
+ };
1714
+ }
1715
+ function xn(e, t, n, o = !1, r = !1) {
1716
+ return {
1717
+ back: e,
1718
+ current: t,
1719
+ forward: n,
1720
+ replaced: o,
1721
+ position: window.history.length,
1722
+ scroll: r ? ft() : null
1723
+ };
1724
+ }
1725
+ function Ys(e) {
1726
+ const { history: t, location: n } = window, o = {
1727
+ value: Ao(e, n)
1728
+ }, r = { value: t.state };
1729
+ r.value || s(o.value, {
1730
+ back: null,
1731
+ current: o.value,
1732
+ forward: null,
1733
+ // the length is off by one, we need to decrease it
1734
+ position: t.length - 1,
1735
+ replaced: !0,
1736
+ // don't add a scroll as the user may have an anchor, and we want
1737
+ // scrollBehavior to be triggered without a saved position
1738
+ scroll: null
1739
+ }, !0);
1740
+ function s(l, u, c) {
1741
+ const d = e.indexOf("#"), f = d > -1 ? (n.host && document.querySelector("base") ? e : e.slice(d)) + l : Ks() + e + l;
1742
+ try {
1743
+ t[c ? "replaceState" : "pushState"](u, "", f), r.value = u;
1744
+ } catch (p) {
1745
+ process.env.NODE_ENV !== "production" ? $("Error with push/replace State", p) : console.error(p), n[c ? "replace" : "assign"](f);
1746
+ }
1747
+ }
1748
+ function i(l, u) {
1749
+ const c = R({}, t.state, xn(
1750
+ r.value.back,
1751
+ // keep back and forward entries but override current position
1752
+ l,
1753
+ r.value.forward,
1754
+ !0
1755
+ ), u, { position: r.value.position });
1756
+ s(l, c, !0), o.value = l;
1757
+ }
1758
+ function a(l, u) {
1759
+ const c = R(
1760
+ {},
1761
+ // use current history state to gracefully handle a wrong call to
1762
+ // history.replaceState
1763
+ // https://github.com/vuejs/router/issues/366
1764
+ r.value,
1765
+ t.state,
1766
+ {
1767
+ forward: l,
1768
+ scroll: ft()
1769
+ }
1770
+ );
1771
+ process.env.NODE_ENV !== "production" && !t.state && $(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
1772
+
1773
+ history.replaceState(history.state, '', url)
1774
+
1775
+ You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`), s(c.current, c, !0);
1776
+ const d = R({}, xn(o.value, l, null), { position: c.position + 1 }, u);
1777
+ s(l, d, !1), o.value = l;
1778
+ }
1779
+ return {
1780
+ location: o,
1781
+ state: r,
1782
+ push: a,
1783
+ replace: i
1784
+ };
1785
+ }
1786
+ function Xs(e) {
1787
+ e = Hs(e);
1788
+ const t = Ys(e), n = Js(e, t.state, t.location, t.replace);
1789
+ function o(s, i = !0) {
1790
+ i || n.pauseListeners(), history.go(s);
1791
+ }
1792
+ const r = R({
1793
+ // it's overridden right after
1794
+ location: "",
1795
+ base: e,
1796
+ go: o,
1797
+ createHref: Fs.bind(null, e)
1798
+ }, t, n);
1799
+ return Object.defineProperty(r, "location", {
1800
+ enumerable: !0,
1801
+ get: () => t.location.value
1802
+ }), Object.defineProperty(r, "state", {
1803
+ enumerable: !0,
1804
+ get: () => t.state.value
1805
+ }), r;
1806
+ }
1807
+ function Zs(e) {
1808
+ return typeof e == "string" || e && typeof e == "object";
1809
+ }
1810
+ function To(e) {
1811
+ return typeof e == "string" || typeof e == "symbol";
1812
+ }
1813
+ const pe = {
1814
+ path: "/",
1815
+ name: void 0,
1816
+ params: {},
1817
+ query: {},
1818
+ hash: "",
1819
+ fullPath: "/",
1820
+ matched: [],
1821
+ meta: {},
1822
+ redirectedFrom: void 0
1823
+ }, Rt = Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
1824
+ var Cn;
1825
+ (function(e) {
1826
+ e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
1827
+ })(Cn || (Cn = {}));
1828
+ const ea = {
1829
+ 1({ location: e, currentLocation: t }) {
1830
+ return `No match for
1831
+ ${JSON.stringify(e)}${t ? `
1832
+ while being at
1833
+ ` + JSON.stringify(t) : ""}`;
1834
+ },
1835
+ 2({ from: e, to: t }) {
1836
+ return `Redirected from "${e.fullPath}" to "${na(t)}" via a navigation guard.`;
1837
+ },
1838
+ 4({ from: e, to: t }) {
1839
+ return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`;
1840
+ },
1841
+ 8({ from: e, to: t }) {
1842
+ return `Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`;
1843
+ },
1844
+ 16({ from: e, to: t }) {
1845
+ return `Avoided redundant navigation to current location: "${e.fullPath}".`;
1846
+ }
1847
+ };
1848
+ function Te(e, t) {
1849
+ return process.env.NODE_ENV !== "production" ? R(new Error(ea[e](t)), {
1850
+ type: e,
1851
+ [Rt]: !0
1852
+ }, t) : R(new Error(), {
1853
+ type: e,
1854
+ [Rt]: !0
1855
+ }, t);
1856
+ }
1857
+ function se(e, t) {
1858
+ return e instanceof Error && Rt in e && (t == null || !!(e.type & t));
1859
+ }
1860
+ const ta = ["params", "query", "hash"];
1861
+ function na(e) {
1862
+ if (typeof e == "string")
1863
+ return e;
1864
+ if ("path" in e)
1865
+ return e.path;
1866
+ const t = {};
1867
+ for (const n of ta)
1868
+ n in e && (t[n] = e[n]);
1869
+ return JSON.stringify(t, null, 2);
1870
+ }
1871
+ const $n = "[^/]+?", oa = {
1872
+ sensitive: !1,
1873
+ strict: !1,
1874
+ start: !0,
1875
+ end: !0
1876
+ }, ra = /[.+*?^${}()[\]/\\]/g;
1877
+ function sa(e, t) {
1878
+ const n = R({}, oa, t), o = [];
1879
+ let r = n.start ? "^" : "";
1880
+ const s = [];
1881
+ for (const u of e) {
1882
+ const c = u.length ? [] : [
1883
+ 90
1884
+ /* PathScore.Root */
1885
+ ];
1886
+ n.strict && !u.length && (r += "/");
1887
+ for (let d = 0; d < u.length; d++) {
1888
+ const f = u[d];
1889
+ let p = 40 + (n.sensitive ? 0.25 : 0);
1890
+ if (f.type === 0)
1891
+ d || (r += "/"), r += f.value.replace(ra, "\\$&"), p += 40;
1892
+ else if (f.type === 1) {
1893
+ const { value: v, repeatable: m, optional: w, regexp: I } = f;
1894
+ s.push({
1895
+ name: v,
1896
+ repeatable: m,
1897
+ optional: w
1898
+ });
1899
+ const O = I || $n;
1900
+ if (O !== $n) {
1901
+ p += 10;
1902
+ try {
1903
+ new RegExp(`(${O})`);
1904
+ } catch (W) {
1905
+ throw new Error(`Invalid custom RegExp for param "${v}" (${O}): ` + W.message);
1906
+ }
1907
+ }
1908
+ let M = m ? `((?:${O})(?:/(?:${O}))*)` : `(${O})`;
1909
+ d || (M = // avoid an optional / if there are more segments e.g. /:p?-static
1910
+ // or /:p?-:p2
1911
+ w && u.length < 2 ? `(?:/${M})` : "/" + M), w && (M += "?"), r += M, p += 20, w && (p += -8), m && (p += -20), O === ".*" && (p += -50);
1912
+ }
1913
+ c.push(p);
1914
+ }
1915
+ o.push(c);
1916
+ }
1917
+ if (n.strict && n.end) {
1918
+ const u = o.length - 1;
1919
+ o[u][o[u].length - 1] += 0.7000000000000001;
1920
+ }
1921
+ n.strict || (r += "/?"), n.end ? r += "$" : n.strict && (r += "(?:/|$)");
1922
+ const i = new RegExp(r, n.sensitive ? "" : "i");
1923
+ function a(u) {
1924
+ const c = u.match(i), d = {};
1925
+ if (!c)
1926
+ return null;
1927
+ for (let f = 1; f < c.length; f++) {
1928
+ const p = c[f] || "", v = s[f - 1];
1929
+ d[v.name] = p && v.repeatable ? p.split("/") : p;
1930
+ }
1931
+ return d;
1932
+ }
1933
+ function l(u) {
1934
+ let c = "", d = !1;
1935
+ for (const f of e) {
1936
+ (!d || !c.endsWith("/")) && (c += "/"), d = !1;
1937
+ for (const p of f)
1938
+ if (p.type === 0)
1939
+ c += p.value;
1940
+ else if (p.type === 1) {
1941
+ const { value: v, repeatable: m, optional: w } = p, I = v in u ? u[v] : "";
1942
+ if (K(I) && !m)
1943
+ throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);
1944
+ const O = K(I) ? I.join("/") : I;
1945
+ if (!O)
1946
+ if (w)
1947
+ f.length < 2 && (c.endsWith("/") ? c = c.slice(0, -1) : d = !0);
1948
+ else
1949
+ throw new Error(`Missing required param "${v}"`);
1950
+ c += O;
1951
+ }
1952
+ }
1953
+ return c || "/";
1954
+ }
1955
+ return {
1956
+ re: i,
1957
+ score: o,
1958
+ keys: s,
1959
+ parse: a,
1960
+ stringify: l
1961
+ };
1962
+ }
1963
+ function aa(e, t) {
1964
+ let n = 0;
1965
+ for (; n < e.length && n < t.length; ) {
1966
+ const o = t[n] - e[n];
1967
+ if (o)
1968
+ return o;
1969
+ n++;
1970
+ }
1971
+ return e.length < t.length ? e.length === 1 && e[0] === 40 + 40 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 40 + 40 ? 1 : -1 : 0;
1972
+ }
1973
+ function ia(e, t) {
1974
+ let n = 0;
1975
+ const o = e.score, r = t.score;
1976
+ for (; n < o.length && n < r.length; ) {
1977
+ const s = aa(o[n], r[n]);
1978
+ if (s)
1979
+ return s;
1980
+ n++;
1981
+ }
1982
+ if (Math.abs(r.length - o.length) === 1) {
1983
+ if (Nn(o))
1984
+ return 1;
1985
+ if (Nn(r))
1986
+ return -1;
1987
+ }
1988
+ return r.length - o.length;
1989
+ }
1990
+ function Nn(e) {
1991
+ const t = e[e.length - 1];
1992
+ return e.length > 0 && t[t.length - 1] < 0;
1993
+ }
1994
+ const ca = {
1995
+ type: 0,
1996
+ value: ""
1997
+ }, la = /[a-zA-Z0-9_]/;
1998
+ function ua(e) {
1999
+ if (!e)
2000
+ return [[]];
2001
+ if (e === "/")
2002
+ return [[ca]];
2003
+ if (!e.startsWith("/"))
2004
+ throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
2005
+ function t(p) {
2006
+ throw new Error(`ERR (${n})/"${u}": ${p}`);
2007
+ }
2008
+ let n = 0, o = n;
2009
+ const r = [];
2010
+ let s;
2011
+ function i() {
2012
+ s && r.push(s), s = [];
2013
+ }
2014
+ let a = 0, l, u = "", c = "";
2015
+ function d() {
2016
+ u && (n === 0 ? s.push({
2017
+ type: 0,
2018
+ value: u
2019
+ }) : n === 1 || n === 2 || n === 3 ? (s.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`), s.push({
2020
+ type: 1,
2021
+ value: u,
2022
+ regexp: c,
2023
+ repeatable: l === "*" || l === "+",
2024
+ optional: l === "*" || l === "?"
2025
+ })) : t("Invalid state to consume buffer"), u = "");
2026
+ }
2027
+ function f() {
2028
+ u += l;
2029
+ }
2030
+ for (; a < e.length; ) {
2031
+ if (l = e[a++], l === "\\" && n !== 2) {
2032
+ o = n, n = 4;
2033
+ continue;
2034
+ }
2035
+ switch (n) {
2036
+ case 0:
2037
+ l === "/" ? (u && d(), i()) : l === ":" ? (d(), n = 1) : f();
2038
+ break;
2039
+ case 4:
2040
+ f(), n = o;
2041
+ break;
2042
+ case 1:
2043
+ l === "(" ? n = 2 : la.test(l) ? f() : (d(), n = 0, l !== "*" && l !== "?" && l !== "+" && a--);
2044
+ break;
2045
+ case 2:
2046
+ l === ")" ? c[c.length - 1] == "\\" ? c = c.slice(0, -1) + l : n = 3 : c += l;
2047
+ break;
2048
+ case 3:
2049
+ d(), n = 0, l !== "*" && l !== "?" && l !== "+" && a--, c = "";
2050
+ break;
2051
+ default:
2052
+ t("Unknown state");
2053
+ break;
2054
+ }
2055
+ }
2056
+ return n === 2 && t(`Unfinished custom RegExp for param "${u}"`), d(), i(), r;
2057
+ }
2058
+ function da(e, t, n) {
2059
+ const o = sa(ua(e.path), n);
2060
+ if (process.env.NODE_ENV !== "production") {
2061
+ const s = /* @__PURE__ */ new Set();
2062
+ for (const i of o.keys)
2063
+ s.has(i.name) && $(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`), s.add(i.name);
2064
+ }
2065
+ const r = R(o, {
2066
+ record: e,
2067
+ parent: t,
2068
+ // these needs to be populated by the parent
2069
+ children: [],
2070
+ alias: []
2071
+ });
2072
+ return t && !r.record.aliasOf == !t.record.aliasOf && t.children.push(r), r;
2073
+ }
2074
+ function fa(e, t) {
2075
+ const n = [], o = /* @__PURE__ */ new Map();
2076
+ t = Tn({ strict: !1, end: !0, sensitive: !1 }, t);
2077
+ function r(c) {
2078
+ return o.get(c);
2079
+ }
2080
+ function s(c, d, f) {
2081
+ const p = !f, v = pa(c);
2082
+ process.env.NODE_ENV !== "production" && ga(v, d), v.aliasOf = f && f.record;
2083
+ const m = Tn(t, c), w = [
2084
+ v
2085
+ ];
2086
+ if ("alias" in c) {
2087
+ const M = typeof c.alias == "string" ? [c.alias] : c.alias;
2088
+ for (const W of M)
2089
+ w.push(R({}, v, {
2090
+ // this allows us to hold a copy of the `components` option
2091
+ // so that async components cache is hold on the original record
2092
+ components: f ? f.record.components : v.components,
2093
+ path: W,
2094
+ // we might be the child of an alias
2095
+ aliasOf: f ? f.record : v
2096
+ // the aliases are always of the same kind as the original since they
2097
+ // are defined on the same record
2098
+ }));
2099
+ }
2100
+ let I, O;
2101
+ for (const M of w) {
2102
+ const { path: W } = M;
2103
+ if (d && W[0] !== "/") {
2104
+ const J = d.record.path, Y = J[J.length - 1] === "/" ? "" : "/";
2105
+ M.path = d.record.path + (W && Y + W);
2106
+ }
2107
+ if (process.env.NODE_ENV !== "production" && M.path === "*")
2108
+ throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
2109
+ See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.`);
2110
+ if (I = da(M, d, m), process.env.NODE_ENV !== "production" && d && W[0] === "/" && ya(I, d), f ? (f.alias.push(I), process.env.NODE_ENV !== "production" && va(f, I)) : (O = O || I, O !== I && O.alias.push(I), p && c.name && !An(I) && i(c.name)), v.children) {
2111
+ const J = v.children;
2112
+ for (let Y = 0; Y < J.length; Y++)
2113
+ s(J[Y], I, f && f.children[Y]);
2114
+ }
2115
+ f = f || I, (I.record.components && Object.keys(I.record.components).length || I.record.name || I.record.redirect) && l(I);
2116
+ }
2117
+ return O ? () => {
2118
+ i(O);
2119
+ } : Ue;
2120
+ }
2121
+ function i(c) {
2122
+ if (To(c)) {
2123
+ const d = o.get(c);
2124
+ d && (o.delete(c), n.splice(n.indexOf(d), 1), d.children.forEach(i), d.alias.forEach(i));
2125
+ } else {
2126
+ const d = n.indexOf(c);
2127
+ d > -1 && (n.splice(d, 1), c.record.name && o.delete(c.record.name), c.children.forEach(i), c.alias.forEach(i));
2128
+ }
2129
+ }
2130
+ function a() {
2131
+ return n;
2132
+ }
2133
+ function l(c) {
2134
+ let d = 0;
2135
+ for (; d < n.length && ia(c, n[d]) >= 0 && // Adding children with empty path should still appear before the parent
2136
+ // https://github.com/vuejs/router/issues/1124
2137
+ (c.record.path !== n[d].record.path || !Do(c, n[d])); )
2138
+ d++;
2139
+ n.splice(d, 0, c), c.record.name && !An(c) && o.set(c.record.name, c);
2140
+ }
2141
+ function u(c, d) {
2142
+ let f, p = {}, v, m;
2143
+ if ("name" in c && c.name) {
2144
+ if (f = o.get(c.name), !f)
2145
+ throw Te(1, {
2146
+ location: c
2147
+ });
2148
+ if (process.env.NODE_ENV !== "production") {
2149
+ const O = Object.keys(c.params || {}).filter((M) => !f.keys.find((W) => W.name === M));
2150
+ O.length && $(`Discarded invalid param(s) "${O.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
2151
+ }
2152
+ m = f.record.name, p = R(
2153
+ // paramsFromLocation is a new object
2154
+ Rn(
2155
+ d.params,
2156
+ // only keep params that exist in the resolved location
2157
+ // TODO: only keep optional params coming from a parent record
2158
+ f.keys.filter((O) => !O.optional).map((O) => O.name)
2159
+ ),
2160
+ // discard any existing params in the current location that do not exist here
2161
+ // #1497 this ensures better active/exact matching
2162
+ c.params && Rn(c.params, f.keys.map((O) => O.name))
2163
+ ), v = f.stringify(p);
2164
+ } else if ("path" in c)
2165
+ v = c.path, process.env.NODE_ENV !== "production" && !v.startsWith("/") && $(`The Matcher cannot resolve relative paths but received "${v}". Unless you directly called \`matcher.resolve("${v}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), f = n.find((O) => O.re.test(v)), f && (p = f.parse(v), m = f.record.name);
2166
+ else {
2167
+ if (f = d.name ? o.get(d.name) : n.find((O) => O.re.test(d.path)), !f)
2168
+ throw Te(1, {
2169
+ location: c,
2170
+ currentLocation: d
2171
+ });
2172
+ m = f.record.name, p = R({}, d.params, c.params), v = f.stringify(p);
2173
+ }
2174
+ const w = [];
2175
+ let I = f;
2176
+ for (; I; )
2177
+ w.unshift(I.record), I = I.parent;
2178
+ return {
2179
+ name: m,
2180
+ path: v,
2181
+ params: p,
2182
+ matched: w,
2183
+ meta: ma(w)
2184
+ };
2185
+ }
2186
+ return e.forEach((c) => s(c)), { addRoute: s, resolve: u, removeRoute: i, getRoutes: a, getRecordMatcher: r };
2187
+ }
2188
+ function Rn(e, t) {
2189
+ const n = {};
2190
+ for (const o of t)
2191
+ o in e && (n[o] = e[o]);
2192
+ return n;
2193
+ }
2194
+ function pa(e) {
2195
+ return {
2196
+ path: e.path,
2197
+ redirect: e.redirect,
2198
+ name: e.name,
2199
+ meta: e.meta || {},
2200
+ aliasOf: void 0,
2201
+ beforeEnter: e.beforeEnter,
2202
+ props: ha(e),
2203
+ children: e.children || [],
2204
+ instances: {},
2205
+ leaveGuards: /* @__PURE__ */ new Set(),
2206
+ updateGuards: /* @__PURE__ */ new Set(),
2207
+ enterCallbacks: {},
2208
+ components: "components" in e ? e.components || null : e.component && { default: e.component }
2209
+ };
2210
+ }
2211
+ function ha(e) {
2212
+ const t = {}, n = e.props || !1;
2213
+ if ("component" in e)
2214
+ t.default = n;
2215
+ else
2216
+ for (const o in e.components)
2217
+ t[o] = typeof n == "object" ? n[o] : n;
2218
+ return t;
2219
+ }
2220
+ function An(e) {
2221
+ for (; e; ) {
2222
+ if (e.record.aliasOf)
2223
+ return !0;
2224
+ e = e.parent;
2225
+ }
2226
+ return !1;
2227
+ }
2228
+ function ma(e) {
2229
+ return e.reduce((t, n) => R(t, n.meta), {});
2230
+ }
2231
+ function Tn(e, t) {
2232
+ const n = {};
2233
+ for (const o in e)
2234
+ n[o] = o in t ? t[o] : e[o];
2235
+ return n;
2236
+ }
2237
+ function At(e, t) {
2238
+ return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
2239
+ }
2240
+ function va(e, t) {
2241
+ for (const n of e.keys)
2242
+ if (!n.optional && !t.keys.find(At.bind(null, n)))
2243
+ return $(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
2244
+ for (const n of t.keys)
2245
+ if (!n.optional && !e.keys.find(At.bind(null, n)))
2246
+ return $(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
2247
+ }
2248
+ function ga(e, t) {
2249
+ t && t.record.name && !e.name && !e.path && $(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);
2250
+ }
2251
+ function ya(e, t) {
2252
+ for (const n of t.keys)
2253
+ if (!e.keys.find(At.bind(null, n)))
2254
+ return $(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`);
2255
+ }
2256
+ function Do(e, t) {
2257
+ return t.children.some((n) => n === e || Do(e, n));
2258
+ }
2259
+ const Vo = /#/g, wa = /&/g, _a = /\//g, ba = /=/g, Ea = /\?/g, Mo = /\+/g, ka = /%5B/g, Sa = /%5D/g, Lo = /%5E/g, Ia = /%60/g, jo = /%7B/g, Oa = /%7C/g, Bo = /%7D/g, Pa = /%20/g;
2260
+ function Kt(e) {
2261
+ return encodeURI("" + e).replace(Oa, "|").replace(ka, "[").replace(Sa, "]");
2262
+ }
2263
+ function xa(e) {
2264
+ return Kt(e).replace(jo, "{").replace(Bo, "}").replace(Lo, "^");
2265
+ }
2266
+ function Tt(e) {
2267
+ return Kt(e).replace(Mo, "%2B").replace(Pa, "+").replace(Vo, "%23").replace(wa, "%26").replace(Ia, "`").replace(jo, "{").replace(Bo, "}").replace(Lo, "^");
2268
+ }
2269
+ function Ca(e) {
2270
+ return Tt(e).replace(ba, "%3D");
2271
+ }
2272
+ function $a(e) {
2273
+ return Kt(e).replace(Vo, "%23").replace(Ea, "%3F");
2274
+ }
2275
+ function Na(e) {
2276
+ return e == null ? "" : $a(e).replace(_a, "%2F");
2277
+ }
2278
+ function Qe(e) {
2279
+ try {
2280
+ return decodeURIComponent("" + e);
2281
+ } catch {
2282
+ process.env.NODE_ENV !== "production" && $(`Error decoding "${e}". Using original value`);
2283
+ }
2284
+ return "" + e;
2285
+ }
2286
+ function Ra(e) {
2287
+ const t = {};
2288
+ if (e === "" || e === "?")
2289
+ return t;
2290
+ const o = (e[0] === "?" ? e.slice(1) : e).split("&");
2291
+ for (let r = 0; r < o.length; ++r) {
2292
+ const s = o[r].replace(Mo, " "), i = s.indexOf("="), a = Qe(i < 0 ? s : s.slice(0, i)), l = i < 0 ? null : Qe(s.slice(i + 1));
2293
+ if (a in t) {
2294
+ let u = t[a];
2295
+ K(u) || (u = t[a] = [u]), u.push(l);
2296
+ } else
2297
+ t[a] = l;
2298
+ }
2299
+ return t;
2300
+ }
2301
+ function Dn(e) {
2302
+ let t = "";
2303
+ for (let n in e) {
2304
+ const o = e[n];
2305
+ if (n = Ca(n), o == null) {
2306
+ o !== void 0 && (t += (t.length ? "&" : "") + n);
2307
+ continue;
2308
+ }
2309
+ (K(o) ? o.map((s) => s && Tt(s)) : [o && Tt(o)]).forEach((s) => {
2310
+ s !== void 0 && (t += (t.length ? "&" : "") + n, s != null && (t += "=" + s));
2311
+ });
2312
+ }
2313
+ return t;
2314
+ }
2315
+ function Aa(e) {
2316
+ const t = {};
2317
+ for (const n in e) {
2318
+ const o = e[n];
2319
+ o !== void 0 && (t[n] = K(o) ? o.map((r) => r == null ? null : "" + r) : o == null ? o : "" + o);
2320
+ }
2321
+ return t;
2322
+ }
2323
+ const Ta = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""), Vn = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""), Jt = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), Uo = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""), Dt = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
2324
+ function Ve() {
2325
+ let e = [];
2326
+ function t(o) {
2327
+ return e.push(o), () => {
2328
+ const r = e.indexOf(o);
2329
+ r > -1 && e.splice(r, 1);
2330
+ };
2331
+ }
2332
+ function n() {
2333
+ e = [];
2334
+ }
2335
+ return {
2336
+ add: t,
2337
+ list: () => e.slice(),
2338
+ reset: n
2339
+ };
2340
+ }
2341
+ function he(e, t, n, o, r) {
2342
+ const s = o && // name is defined if record is because of the function overload
2343
+ (o.enterCallbacks[r] = o.enterCallbacks[r] || []);
2344
+ return () => new Promise((i, a) => {
2345
+ const l = (d) => {
2346
+ d === !1 ? a(Te(4, {
2347
+ from: n,
2348
+ to: t
2349
+ })) : d instanceof Error ? a(d) : Zs(d) ? a(Te(2, {
2350
+ from: t,
2351
+ to: d
2352
+ })) : (s && // since enterCallbackArray is truthy, both record and name also are
2353
+ o.enterCallbacks[r] === s && typeof d == "function" && s.push(d), i());
2354
+ }, u = e.call(o && o.instances[r], t, n, process.env.NODE_ENV !== "production" ? Da(l, t, n) : l);
2355
+ let c = Promise.resolve(u);
2356
+ if (e.length < 3 && (c = c.then(l)), process.env.NODE_ENV !== "production" && e.length > 2) {
2357
+ const d = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
2358
+ ${e.toString()}
2359
+ . If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
2360
+ if (typeof u == "object" && "then" in u)
2361
+ c = c.then((f) => l._called ? f : ($(d), Promise.reject(new Error("Invalid navigation guard"))));
2362
+ else if (u !== void 0 && !l._called) {
2363
+ $(d), a(new Error("Invalid navigation guard"));
2364
+ return;
2365
+ }
2366
+ }
2367
+ c.catch((d) => a(d));
2368
+ });
2369
+ }
2370
+ function Da(e, t, n) {
2371
+ let o = 0;
2372
+ return function() {
2373
+ o++ === 1 && $(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`), e._called = !0, o === 1 && e.apply(null, arguments);
2374
+ };
2375
+ }
2376
+ function Et(e, t, n, o) {
2377
+ const r = [];
2378
+ for (const s of e) {
2379
+ process.env.NODE_ENV !== "production" && !s.components && !s.children.length && $(`Record with path "${s.path}" is either missing a "component(s)" or "children" property.`);
2380
+ for (const i in s.components) {
2381
+ let a = s.components[i];
2382
+ if (process.env.NODE_ENV !== "production") {
2383
+ if (!a || typeof a != "object" && typeof a != "function")
2384
+ throw $(`Component "${i}" in record with path "${s.path}" is not a valid component. Received "${String(a)}".`), new Error("Invalid route component");
2385
+ if ("then" in a) {
2386
+ $(`Component "${i}" in record with path "${s.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);
2387
+ const l = a;
2388
+ a = () => l;
2389
+ } else
2390
+ a.__asyncLoader && // warn only once per component
2391
+ !a.__warnedDefineAsync && (a.__warnedDefineAsync = !0, $(`Component "${i}" in record with path "${s.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
2392
+ }
2393
+ if (!(t !== "beforeRouteEnter" && !s.instances[i]))
2394
+ if (Va(a)) {
2395
+ const u = (a.__vccOpts || a)[t];
2396
+ u && r.push(he(u, n, o, s, i));
2397
+ } else {
2398
+ let l = a();
2399
+ process.env.NODE_ENV !== "production" && !("catch" in l) && ($(`Component "${i}" in record with path "${s.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`), l = Promise.resolve(l)), r.push(() => l.then((u) => {
2400
+ if (!u)
2401
+ return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${s.path}"`));
2402
+ const c = Vs(u) ? u.default : u;
2403
+ s.components[i] = c;
2404
+ const f = (c.__vccOpts || c)[t];
2405
+ return f && he(f, n, o, s, i)();
2406
+ }));
2407
+ }
2408
+ }
2409
+ }
2410
+ return r;
2411
+ }
2412
+ function Va(e) {
2413
+ return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
2414
+ }
2415
+ function Mn(e) {
2416
+ const t = Z(Jt), n = Z(Uo), o = B(() => t.resolve(k(e.to))), r = B(() => {
2417
+ const { matched: l } = o.value, { length: u } = l, c = l[u - 1], d = n.matched;
2418
+ if (!c || !d.length)
2419
+ return -1;
2420
+ const f = d.findIndex(ge.bind(null, c));
2421
+ if (f > -1)
2422
+ return f;
2423
+ const p = Ln(l[u - 2]);
2424
+ return (
2425
+ // we are dealing with nested routes
2426
+ u > 1 && // if the parent and matched route have the same path, this link is
2427
+ // referring to the empty child. Or we currently are on a different
2428
+ // child of the same parent
2429
+ Ln(c) === p && // avoid comparing the child with its parent
2430
+ d[d.length - 1].path !== p ? d.findIndex(ge.bind(null, l[u - 2])) : f
2431
+ );
2432
+ }), s = B(() => r.value > -1 && Ba(n.params, o.value.params)), i = B(() => r.value > -1 && r.value === n.matched.length - 1 && Ro(n.params, o.value.params));
2433
+ function a(l = {}) {
2434
+ return ja(l) ? t[k(e.replace) ? "replace" : "push"](
2435
+ k(e.to)
2436
+ // avoid uncaught errors are they are logged anyway
2437
+ ).catch(Ue) : Promise.resolve();
2438
+ }
2439
+ if (process.env.NODE_ENV !== "production" && ae) {
2440
+ const l = Ht();
2441
+ if (l) {
2442
+ const u = {
2443
+ route: o.value,
2444
+ isActive: s.value,
2445
+ isExactActive: i.value
2446
+ };
2447
+ l.__vrl_devtools = l.__vrl_devtools || [], l.__vrl_devtools.push(u), kr(() => {
2448
+ u.route = o.value, u.isActive = s.value, u.isExactActive = i.value;
2449
+ }, { flush: "post" });
2450
+ }
2451
+ }
2452
+ return {
2453
+ route: o,
2454
+ href: B(() => o.value.href),
2455
+ isActive: s,
2456
+ isExactActive: i,
2457
+ navigate: a
2458
+ };
2459
+ }
2460
+ const Ma = /* @__PURE__ */ q({
2461
+ name: "RouterLink",
2462
+ compatConfig: { MODE: 3 },
2463
+ props: {
2464
+ to: {
2465
+ type: [String, Object],
2466
+ required: !0
2467
+ },
2468
+ replace: Boolean,
2469
+ activeClass: String,
2470
+ // inactiveClass: String,
2471
+ exactActiveClass: String,
2472
+ custom: Boolean,
2473
+ ariaCurrentValue: {
2474
+ type: String,
2475
+ default: "page"
2476
+ }
2477
+ },
2478
+ useLink: Mn,
2479
+ setup(e, { slots: t }) {
2480
+ const n = be(Mn(e)), { options: o } = Z(Jt), r = B(() => ({
2481
+ [jn(e.activeClass, o.linkActiveClass, "router-link-active")]: n.isActive,
2482
+ // [getLinkClass(
2483
+ // props.inactiveClass,
2484
+ // options.linkInactiveClass,
2485
+ // 'router-link-inactive'
2486
+ // )]: !link.isExactActive,
2487
+ [jn(e.exactActiveClass, o.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
2488
+ }));
2489
+ return () => {
2490
+ const s = t.default && t.default(n);
2491
+ return e.custom ? s : mo("a", {
2492
+ "aria-current": n.isExactActive ? e.ariaCurrentValue : null,
2493
+ href: n.href,
2494
+ // this would override user added attrs but Vue will still add
2495
+ // the listener, so we end up triggering both
2496
+ onClick: n.navigate,
2497
+ class: r.value
2498
+ }, s);
2499
+ };
2500
+ }
2501
+ }), La = Ma;
2502
+ function ja(e) {
2503
+ if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
2504
+ if (e.currentTarget && e.currentTarget.getAttribute) {
2505
+ const t = e.currentTarget.getAttribute("target");
2506
+ if (/\b_blank\b/i.test(t))
2507
+ return;
2508
+ }
2509
+ return e.preventDefault && e.preventDefault(), !0;
2510
+ }
2511
+ }
2512
+ function Ba(e, t) {
2513
+ for (const n in t) {
2514
+ const o = t[n], r = e[n];
2515
+ if (typeof o == "string") {
2516
+ if (o !== r)
2517
+ return !1;
2518
+ } else if (!K(r) || r.length !== o.length || o.some((s, i) => s !== r[i]))
2519
+ return !1;
2520
+ }
2521
+ return !0;
2522
+ }
2523
+ function Ln(e) {
2524
+ return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
2525
+ }
2526
+ const jn = (e, t, n) => e ?? t ?? n, Ua = /* @__PURE__ */ q({
2527
+ name: "RouterView",
2528
+ // #674 we manually inherit them
2529
+ inheritAttrs: !1,
2530
+ props: {
2531
+ name: {
2532
+ type: String,
2533
+ default: "default"
2534
+ },
2535
+ route: Object
2536
+ },
2537
+ // Better compat for @vue/compat users
2538
+ // https://github.com/vuejs/router/issues/1315
2539
+ compatConfig: { MODE: 3 },
2540
+ setup(e, { attrs: t, slots: n }) {
2541
+ process.env.NODE_ENV !== "production" && Wa();
2542
+ const o = Z(Dt), r = B(() => e.route || o.value), s = Z(Vn, 0), i = B(() => {
2543
+ let u = k(s);
2544
+ const { matched: c } = r.value;
2545
+ let d;
2546
+ for (; (d = c[u]) && !d.components; )
2547
+ u++;
2548
+ return u;
2549
+ }), a = B(() => r.value.matched[i.value]);
2550
+ nt(Vn, B(() => i.value + 1)), nt(Ta, a), nt(Dt, r);
2551
+ const l = V();
2552
+ return ue(() => [l.value, a.value, e.name], ([u, c, d], [f, p, v]) => {
2553
+ c && (c.instances[d] = u, p && p !== c && u && u === f && (c.leaveGuards.size || (c.leaveGuards = p.leaveGuards), c.updateGuards.size || (c.updateGuards = p.updateGuards))), u && c && // if there is no instance but to and from are the same this might be
2554
+ // the first visit
2555
+ (!p || !ge(c, p) || !f) && (c.enterCallbacks[d] || []).forEach((m) => m(u));
2556
+ }, { flush: "post" }), () => {
2557
+ const u = r.value, c = e.name, d = a.value, f = d && d.components[c];
2558
+ if (!f)
2559
+ return Bn(n.default, { Component: f, route: u });
2560
+ const p = d.props[c], v = p ? p === !0 ? u.params : typeof p == "function" ? p(u) : p : null, w = mo(f, R({}, v, t, {
2561
+ onVnodeUnmounted: (I) => {
2562
+ I.component.isUnmounted && (d.instances[c] = null);
2563
+ },
2564
+ ref: l
2565
+ }));
2566
+ if (process.env.NODE_ENV !== "production" && ae && w.ref) {
2567
+ const I = {
2568
+ depth: i.value,
2569
+ name: d.name,
2570
+ path: d.path,
2571
+ meta: d.meta
2572
+ };
2573
+ (K(w.ref) ? w.ref.map((M) => M.i) : [w.ref.i]).forEach((M) => {
2574
+ M.__vrv_devtools = I;
2575
+ });
2576
+ }
2577
+ return (
2578
+ // pass the vnode to the slot as a prop.
2579
+ // h and <component :is="..."> both accept vnodes
2580
+ Bn(n.default, { Component: w, route: u }) || w
2581
+ );
2582
+ };
2583
+ }
2584
+ });
2585
+ function Bn(e, t) {
2586
+ if (!e)
2587
+ return null;
2588
+ const n = e(t);
2589
+ return n.length === 1 ? n[0] : n;
2590
+ }
2591
+ const Ha = Ua;
2592
+ function Wa() {
2593
+ const e = Ht(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
2594
+ if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
2595
+ const o = t === "KeepAlive" ? "keep-alive" : "transition";
2596
+ $(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
2597
+ Use slot props instead:
2598
+
2599
+ <router-view v-slot="{ Component }">
2600
+ <${o}>
2601
+ <component :is="Component" />
2602
+ </${o}>
2603
+ </router-view>`);
2604
+ }
2605
+ }
2606
+ function Me(e, t) {
2607
+ const n = R({}, e, {
2608
+ // remove variables that can contain vue instances
2609
+ matched: e.matched.map((o) => Xa(o, ["instances", "children", "aliasOf"]))
2610
+ });
2611
+ return {
2612
+ _custom: {
2613
+ type: null,
2614
+ readOnly: !0,
2615
+ display: e.fullPath,
2616
+ tooltip: t,
2617
+ value: n
2618
+ }
2619
+ };
2620
+ }
2621
+ function Ze(e) {
2622
+ return {
2623
+ _custom: {
2624
+ display: e
2625
+ }
2626
+ };
2627
+ }
2628
+ let Fa = 0;
2629
+ function Ga(e, t, n) {
2630
+ if (t.__hasDevtools)
2631
+ return;
2632
+ t.__hasDevtools = !0;
2633
+ const o = Fa++;
2634
+ zt({
2635
+ id: "org.vuejs.router" + (o ? "." + o : ""),
2636
+ label: "Vue Router",
2637
+ packageName: "vue-router",
2638
+ homepage: "https://router.vuejs.org",
2639
+ logo: "https://router.vuejs.org/logo.png",
2640
+ componentStateTypes: ["Routing"],
2641
+ app: e
2642
+ }, (r) => {
2643
+ typeof r.now != "function" && console.warn("[Vue Router]: 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.on.inspectComponent((c, d) => {
2644
+ c.instanceData && c.instanceData.state.push({
2645
+ type: "Routing",
2646
+ key: "$route",
2647
+ editable: !1,
2648
+ value: Me(t.currentRoute.value, "Current Route")
2649
+ });
2650
+ }), r.on.visitComponentTree(({ treeNode: c, componentInstance: d }) => {
2651
+ if (d.__vrv_devtools) {
2652
+ const f = d.__vrv_devtools;
2653
+ c.tags.push({
2654
+ label: (f.name ? `${f.name.toString()}: ` : "") + f.path,
2655
+ textColor: 0,
2656
+ tooltip: "This component is rendered by &lt;router-view&gt;",
2657
+ backgroundColor: Ho
2658
+ });
2659
+ }
2660
+ K(d.__vrl_devtools) && (d.__devtoolsApi = r, d.__vrl_devtools.forEach((f) => {
2661
+ let p = Go, v = "";
2662
+ f.isExactActive ? (p = Fo, v = "This is exactly active") : f.isActive && (p = Wo, v = "This link is active"), c.tags.push({
2663
+ label: f.route.path,
2664
+ textColor: 0,
2665
+ tooltip: v,
2666
+ backgroundColor: p
2667
+ });
2668
+ }));
2669
+ }), ue(t.currentRoute, () => {
2670
+ l(), r.notifyComponentUpdate(), r.sendInspectorTree(a), r.sendInspectorState(a);
2671
+ });
2672
+ const s = "router:navigations:" + o;
2673
+ r.addTimelineLayer({
2674
+ id: s,
2675
+ label: `Router${o ? " " + o : ""} Navigations`,
2676
+ color: 4237508
2677
+ }), t.onError((c, d) => {
2678
+ r.addTimelineEvent({
2679
+ layerId: s,
2680
+ event: {
2681
+ title: "Error during Navigation",
2682
+ subtitle: d.fullPath,
2683
+ logType: "error",
2684
+ time: r.now(),
2685
+ data: { error: c },
2686
+ groupId: d.meta.__navigationId
2687
+ }
2688
+ });
2689
+ });
2690
+ let i = 0;
2691
+ t.beforeEach((c, d) => {
2692
+ const f = {
2693
+ guard: Ze("beforeEach"),
2694
+ from: Me(d, "Current Location during this navigation"),
2695
+ to: Me(c, "Target location")
2696
+ };
2697
+ Object.defineProperty(c.meta, "__navigationId", {
2698
+ value: i++
2699
+ }), r.addTimelineEvent({
2700
+ layerId: s,
2701
+ event: {
2702
+ time: r.now(),
2703
+ title: "Start of navigation",
2704
+ subtitle: c.fullPath,
2705
+ data: f,
2706
+ groupId: c.meta.__navigationId
2707
+ }
2708
+ });
2709
+ }), t.afterEach((c, d, f) => {
2710
+ const p = {
2711
+ guard: Ze("afterEach")
2712
+ };
2713
+ f ? (p.failure = {
2714
+ _custom: {
2715
+ type: Error,
2716
+ readOnly: !0,
2717
+ display: f ? f.message : "",
2718
+ tooltip: "Navigation Failure",
2719
+ value: f
2720
+ }
2721
+ }, p.status = Ze("❌")) : p.status = Ze("✅"), p.from = Me(d, "Current Location during this navigation"), p.to = Me(c, "Target location"), r.addTimelineEvent({
2722
+ layerId: s,
2723
+ event: {
2724
+ title: "End of navigation",
2725
+ subtitle: c.fullPath,
2726
+ time: r.now(),
2727
+ data: p,
2728
+ logType: f ? "warning" : "default",
2729
+ groupId: c.meta.__navigationId
2730
+ }
2731
+ });
2732
+ });
2733
+ const a = "router-inspector:" + o;
2734
+ r.addInspector({
2735
+ id: a,
2736
+ label: "Routes" + (o ? " " + o : ""),
2737
+ icon: "book",
2738
+ treeFilterPlaceholder: "Search routes"
2739
+ });
2740
+ function l() {
2741
+ if (!u)
2742
+ return;
2743
+ const c = u;
2744
+ let d = n.getRoutes().filter((f) => !f.parent || // these routes have a parent with no component which will not appear in the view
2745
+ // therefore we still need to include them
2746
+ !f.parent.record.components);
2747
+ d.forEach(qo), c.filter && (d = d.filter((f) => (
2748
+ // save matches state based on the payload
2749
+ Vt(f, c.filter.toLowerCase())
2750
+ ))), d.forEach((f) => Qo(f, t.currentRoute.value)), c.rootNodes = d.map(zo);
2751
+ }
2752
+ let u;
2753
+ r.on.getInspectorTree((c) => {
2754
+ u = c, c.app === e && c.inspectorId === a && l();
2755
+ }), r.on.getInspectorState((c) => {
2756
+ if (c.app === e && c.inspectorId === a) {
2757
+ const f = n.getRoutes().find((p) => p.record.__vd_id === c.nodeId);
2758
+ f && (c.state = {
2759
+ options: Qa(f)
2760
+ });
2761
+ }
2762
+ }), r.sendInspectorTree(a), r.sendInspectorState(a);
2763
+ });
2764
+ }
2765
+ function za(e) {
2766
+ return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : "";
2767
+ }
2768
+ function Qa(e) {
2769
+ const { record: t } = e, n = [
2770
+ { editable: !1, key: "path", value: t.path }
2771
+ ];
2772
+ return t.name != null && n.push({
2773
+ editable: !1,
2774
+ key: "name",
2775
+ value: t.name
2776
+ }), n.push({ editable: !1, key: "regexp", value: e.re }), e.keys.length && n.push({
2777
+ editable: !1,
2778
+ key: "keys",
2779
+ value: {
2780
+ _custom: {
2781
+ type: null,
2782
+ readOnly: !0,
2783
+ display: e.keys.map((o) => `${o.name}${za(o)}`).join(" "),
2784
+ tooltip: "Param keys",
2785
+ value: e.keys
2786
+ }
2787
+ }
2788
+ }), t.redirect != null && n.push({
2789
+ editable: !1,
2790
+ key: "redirect",
2791
+ value: t.redirect
2792
+ }), e.alias.length && n.push({
2793
+ editable: !1,
2794
+ key: "aliases",
2795
+ value: e.alias.map((o) => o.record.path)
2796
+ }), Object.keys(e.record.meta).length && n.push({
2797
+ editable: !1,
2798
+ key: "meta",
2799
+ value: e.record.meta
2800
+ }), n.push({
2801
+ key: "score",
2802
+ editable: !1,
2803
+ value: {
2804
+ _custom: {
2805
+ type: null,
2806
+ readOnly: !0,
2807
+ display: e.score.map((o) => o.join(", ")).join(" | "),
2808
+ tooltip: "Score used to sort routes",
2809
+ value: e.score
2810
+ }
2811
+ }
2812
+ }), n;
2813
+ }
2814
+ const Ho = 15485081, Wo = 2450411, Fo = 8702998, qa = 2282478, Go = 16486972, Ka = 6710886;
2815
+ function zo(e) {
2816
+ const t = [], { record: n } = e;
2817
+ n.name != null && t.push({
2818
+ label: String(n.name),
2819
+ textColor: 0,
2820
+ backgroundColor: qa
2821
+ }), n.aliasOf && t.push({
2822
+ label: "alias",
2823
+ textColor: 0,
2824
+ backgroundColor: Go
2825
+ }), e.__vd_match && t.push({
2826
+ label: "matches",
2827
+ textColor: 0,
2828
+ backgroundColor: Ho
2829
+ }), e.__vd_exactActive && t.push({
2830
+ label: "exact",
2831
+ textColor: 0,
2832
+ backgroundColor: Fo
2833
+ }), e.__vd_active && t.push({
2834
+ label: "active",
2835
+ textColor: 0,
2836
+ backgroundColor: Wo
2837
+ }), n.redirect && t.push({
2838
+ label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects",
2839
+ textColor: 16777215,
2840
+ backgroundColor: Ka
2841
+ });
2842
+ let o = n.__vd_id;
2843
+ return o == null && (o = String(Ja++), n.__vd_id = o), {
2844
+ id: o,
2845
+ label: n.path,
2846
+ tags: t,
2847
+ children: e.children.map(zo)
2848
+ };
2849
+ }
2850
+ let Ja = 0;
2851
+ const Ya = /^\/(.*)\/([a-z]*)$/;
2852
+ function Qo(e, t) {
2853
+ const n = t.matched.length && ge(t.matched[t.matched.length - 1], e.record);
2854
+ e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((o) => ge(o, e.record))), e.children.forEach((o) => Qo(o, t));
2855
+ }
2856
+ function qo(e) {
2857
+ e.__vd_match = !1, e.children.forEach(qo);
2858
+ }
2859
+ function Vt(e, t) {
2860
+ const n = String(e.re).match(Ya);
2861
+ if (e.__vd_match = !1, !n || n.length < 3)
2862
+ return !1;
2863
+ if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t))
2864
+ return e.children.forEach((i) => Vt(i, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
2865
+ const r = e.record.path.toLowerCase(), s = Qe(r);
2866
+ return !t.startsWith("/") && (s.includes(t) || r.includes(t)) || s.startsWith(t) || r.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((i) => Vt(i, t));
2867
+ }
2868
+ function Xa(e, t) {
2869
+ const n = {};
2870
+ for (const o in e)
2871
+ t.includes(o) || (n[o] = e[o]);
2872
+ return n;
2873
+ }
2874
+ function Za(e) {
2875
+ const t = fa(e.routes, e), n = e.parseQuery || Ra, o = e.stringifyQuery || Dn, r = e.history;
2876
+ if (process.env.NODE_ENV !== "production" && !r)
2877
+ throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');
2878
+ const s = Ve(), i = Ve(), a = Ve(), l = _r(pe);
2879
+ let u = pe;
2880
+ ae && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
2881
+ const c = _t.bind(null, (h) => "" + h), d = _t.bind(null, Na), f = (
2882
+ // @ts-expect-error: intentionally avoid the type check
2883
+ _t.bind(null, Qe)
2884
+ );
2885
+ function p(h, y) {
2886
+ let g, b;
2887
+ return To(h) ? (g = t.getRecordMatcher(h), b = y) : b = h, t.addRoute(b, g);
2888
+ }
2889
+ function v(h) {
2890
+ const y = t.getRecordMatcher(h);
2891
+ y ? t.removeRoute(y) : process.env.NODE_ENV !== "production" && $(`Cannot remove non-existent route "${String(h)}"`);
2892
+ }
2893
+ function m() {
2894
+ return t.getRoutes().map((h) => h.record);
2895
+ }
2896
+ function w(h) {
2897
+ return !!t.getRecordMatcher(h);
2898
+ }
2899
+ function I(h, y) {
2900
+ if (y = R({}, y || l.value), typeof h == "string") {
2901
+ const P = bt(n, h, y.path), L = t.resolve({ path: P.path }, y), we = r.createHref(P.fullPath);
2902
+ return process.env.NODE_ENV !== "production" && (we.startsWith("//") ? $(`Location "${h}" resolved to "${we}". A resolved location cannot start with multiple slashes.`) : L.matched.length || $(`No match found for location with path "${h}"`)), R(P, L, {
2903
+ params: f(L.params),
2904
+ hash: Qe(P.hash),
2905
+ redirectedFrom: void 0,
2906
+ href: we
2907
+ });
2908
+ }
2909
+ let g;
2910
+ if ("path" in h)
2911
+ process.env.NODE_ENV !== "production" && "params" in h && !("name" in h) && // @ts-expect-error: the type is never
2912
+ Object.keys(h.params).length && $(`Path "${h.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), g = R({}, h, {
2913
+ path: bt(n, h.path, y.path).path
2914
+ });
2915
+ else {
2916
+ const P = R({}, h.params);
2917
+ for (const L in P)
2918
+ P[L] == null && delete P[L];
2919
+ g = R({}, h, {
2920
+ params: d(P)
2921
+ }), y.params = d(y.params);
2922
+ }
2923
+ const b = t.resolve(g, y), N = h.hash || "";
2924
+ process.env.NODE_ENV !== "production" && N && !N.startsWith("#") && $(`A \`hash\` should always start with the character "#". Replace "${N}" with "#${N}".`), b.params = c(f(b.params));
2925
+ const j = js(o, R({}, h, {
2926
+ hash: xa(N),
2927
+ path: b.path
2928
+ })), C = r.createHref(j);
2929
+ return process.env.NODE_ENV !== "production" && (C.startsWith("//") ? $(`Location "${h}" resolved to "${C}". A resolved location cannot start with multiple slashes.`) : b.matched.length || $(`No match found for location with path "${"path" in h ? h.path : h}"`)), R({
2930
+ fullPath: j,
2931
+ // keep the hash encoded so fullPath is effectively path + encodedQuery +
2932
+ // hash
2933
+ hash: N,
2934
+ query: (
2935
+ // if the user is using a custom query lib like qs, we might have
2936
+ // nested objects, so we keep the query as is, meaning it can contain
2937
+ // numbers at `$route.query`, but at the point, the user will have to
2938
+ // use their own type anyway.
2939
+ // https://github.com/vuejs/router/issues/328#issuecomment-649481567
2940
+ o === Dn ? Aa(h.query) : h.query || {}
2941
+ )
2942
+ }, b, {
2943
+ redirectedFrom: void 0,
2944
+ href: C
2945
+ });
2946
+ }
2947
+ function O(h) {
2948
+ return typeof h == "string" ? bt(n, h, l.value.path) : R({}, h);
2949
+ }
2950
+ function M(h, y) {
2951
+ if (u !== h)
2952
+ return Te(8, {
2953
+ from: y,
2954
+ to: h
2955
+ });
2956
+ }
2957
+ function W(h) {
2958
+ return S(h);
2959
+ }
2960
+ function J(h) {
2961
+ return W(R(O(h), { replace: !0 }));
2962
+ }
2963
+ function Y(h) {
2964
+ const y = h.matched[h.matched.length - 1];
2965
+ if (y && y.redirect) {
2966
+ const { redirect: g } = y;
2967
+ let b = typeof g == "function" ? g(h) : g;
2968
+ if (typeof b == "string" && (b = b.includes("?") || b.includes("#") ? b = O(b) : (
2969
+ // force empty params
2970
+ { path: b }
2971
+ ), b.params = {}), process.env.NODE_ENV !== "production" && !("path" in b) && !("name" in b))
2972
+ throw $(`Invalid redirect found:
2973
+ ${JSON.stringify(b, null, 2)}
2974
+ when navigating to "${h.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
2975
+ return R({
2976
+ query: h.query,
2977
+ hash: h.hash,
2978
+ // avoid transferring params if the redirect has a path
2979
+ params: "path" in b ? {} : h.params
2980
+ }, b);
2981
+ }
2982
+ }
2983
+ function S(h, y) {
2984
+ const g = u = I(h), b = l.value, N = h.state, j = h.force, C = h.replace === !0, P = Y(g);
2985
+ if (P)
2986
+ return S(
2987
+ R(O(P), {
2988
+ state: typeof P == "object" ? R({}, N, P.state) : N,
2989
+ force: j,
2990
+ replace: C
2991
+ }),
2992
+ // keep original redirectedFrom if it exists
2993
+ y || g
2994
+ );
2995
+ const L = g;
2996
+ L.redirectedFrom = y;
2997
+ let we;
2998
+ return !j && In(o, b, g) && (we = Te(16, { to: L, from: b }), un(
2999
+ b,
3000
+ b,
3001
+ // this is a push, the only way for it to be triggered from a
3002
+ // history.listen is with a redirect, which makes it become a push
3003
+ !0,
3004
+ // This cannot be the first navigation because the initial location
3005
+ // cannot be manually navigated to
3006
+ !1
3007
+ )), (we ? Promise.resolve(we) : E(L, b)).catch((Q) => se(Q) ? (
3008
+ // navigation redirects still mark the router as ready
3009
+ se(
3010
+ Q,
3011
+ 2
3012
+ /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
3013
+ ) ? Q : mt(Q)
3014
+ ) : (
3015
+ // reject any unknown error
3016
+ G(Q, L, b)
3017
+ )).then((Q) => {
3018
+ if (Q) {
3019
+ if (se(
3020
+ Q,
3021
+ 2
3022
+ /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
3023
+ ))
3024
+ return process.env.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
3025
+ In(o, I(Q.to), L) && // and we have done it a couple of times
3026
+ y && // @ts-expect-error: added only in dev
3027
+ (y._count = y._count ? (
3028
+ // @ts-expect-error
3029
+ y._count + 1
3030
+ ) : 1) > 30 ? ($(`Detected a possibly infinite redirection in a navigation guard when going from "${b.fullPath}" to "${L.fullPath}". Aborting to avoid a Stack Overflow.
3031
+ Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) : S(
3032
+ // keep options
3033
+ R({
3034
+ // preserve an existing replacement but allow the redirect to override it
3035
+ replace: C
3036
+ }, O(Q.to), {
3037
+ state: typeof Q.to == "object" ? R({}, N, Q.to.state) : N,
3038
+ force: j
3039
+ }),
3040
+ // preserve the original redirectedFrom if any
3041
+ y || L
3042
+ );
3043
+ } else
3044
+ Q = D(L, b, !0, C, N);
3045
+ return _(L, b, Q), Q;
3046
+ });
3047
+ }
3048
+ function ln(h, y) {
3049
+ const g = M(h, y);
3050
+ return g ? Promise.reject(g) : Promise.resolve();
3051
+ }
3052
+ function ee(h) {
3053
+ const y = Je.values().next().value;
3054
+ return y && typeof y.runWithContext == "function" ? y.runWithContext(h) : h();
3055
+ }
3056
+ function E(h, y) {
3057
+ let g;
3058
+ const [b, N, j] = ei(h, y);
3059
+ g = Et(b.reverse(), "beforeRouteLeave", h, y);
3060
+ for (const P of b)
3061
+ P.leaveGuards.forEach((L) => {
3062
+ g.push(he(L, h, y));
3063
+ });
3064
+ const C = ln.bind(null, h, y);
3065
+ return g.push(C), Ce(g).then(() => {
3066
+ g = [];
3067
+ for (const P of s.list())
3068
+ g.push(he(P, h, y));
3069
+ return g.push(C), Ce(g);
3070
+ }).then(() => {
3071
+ g = Et(N, "beforeRouteUpdate", h, y);
3072
+ for (const P of N)
3073
+ P.updateGuards.forEach((L) => {
3074
+ g.push(he(L, h, y));
3075
+ });
3076
+ return g.push(C), Ce(g);
3077
+ }).then(() => {
3078
+ g = [];
3079
+ for (const P of j)
3080
+ if (P.beforeEnter)
3081
+ if (K(P.beforeEnter))
3082
+ for (const L of P.beforeEnter)
3083
+ g.push(he(L, h, y));
3084
+ else
3085
+ g.push(he(P.beforeEnter, h, y));
3086
+ return g.push(C), Ce(g);
3087
+ }).then(() => (h.matched.forEach((P) => P.enterCallbacks = {}), g = Et(j, "beforeRouteEnter", h, y), g.push(C), Ce(g))).then(() => {
3088
+ g = [];
3089
+ for (const P of i.list())
3090
+ g.push(he(P, h, y));
3091
+ return g.push(C), Ce(g);
3092
+ }).catch((P) => se(
3093
+ P,
3094
+ 8
3095
+ /* ErrorTypes.NAVIGATION_CANCELLED */
3096
+ ) ? P : Promise.reject(P));
3097
+ }
3098
+ function _(h, y, g) {
3099
+ a.list().forEach((b) => ee(() => b(h, y, g)));
3100
+ }
3101
+ function D(h, y, g, b, N) {
3102
+ const j = M(h, y);
3103
+ if (j)
3104
+ return j;
3105
+ const C = y === pe, P = ae ? history.state : {};
3106
+ g && (b || C ? r.replace(h.fullPath, R({
3107
+ scroll: C && P && P.scroll
3108
+ }, N)) : r.push(h.fullPath, N)), l.value = h, un(h, y, g, C), mt();
3109
+ }
3110
+ let U;
3111
+ function ye() {
3112
+ U || (U = r.listen((h, y, g) => {
3113
+ const b = I(h), N = Y(b);
3114
+ if (N) {
3115
+ S(R(N, { replace: !0 }), b).catch(Ue);
3116
+ return;
3117
+ }
3118
+ u = b;
3119
+ const j = l.value;
3120
+ ae && Qs(Pn(j.fullPath, g.delta), ft()), E(b, j).catch((C) => se(
3121
+ C,
3122
+ 12
3123
+ /* ErrorTypes.NAVIGATION_CANCELLED */
3124
+ ) ? C : se(
3125
+ C,
3126
+ 2
3127
+ /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
3128
+ ) ? (S(
3129
+ C.to,
3130
+ b
3131
+ // avoid an uncaught rejection, let push call triggerError
3132
+ ).then((P) => {
3133
+ se(
3134
+ P,
3135
+ 20
3136
+ /* ErrorTypes.NAVIGATION_DUPLICATED */
3137
+ ) && !g.delta && g.type === ze.pop && r.go(-1, !1);
3138
+ }).catch(Ue), Promise.reject()) : (g.delta && r.go(-g.delta, !1), G(C, b, j))).then((C) => {
3139
+ C = C || D(
3140
+ // after navigation, all matched components are resolved
3141
+ b,
3142
+ j,
3143
+ !1
3144
+ ), C && (g.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
3145
+ // entry while a different route is displayed
3146
+ !se(
3147
+ C,
3148
+ 8
3149
+ /* ErrorTypes.NAVIGATION_CANCELLED */
3150
+ ) ? r.go(-g.delta, !1) : g.type === ze.pop && se(
3151
+ C,
3152
+ 20
3153
+ /* ErrorTypes.NAVIGATION_DUPLICATED */
3154
+ ) && r.go(-1, !1)), _(b, j, C);
3155
+ }).catch(Ue);
3156
+ }));
3157
+ }
3158
+ let De = Ve(), Ke = Ve(), ne;
3159
+ function G(h, y, g) {
3160
+ mt(h);
3161
+ const b = Ke.list();
3162
+ return b.length ? b.forEach((N) => N(h, y, g)) : (process.env.NODE_ENV !== "production" && $("uncaught error during route navigation:"), console.error(h)), Promise.reject(h);
3163
+ }
3164
+ function gr() {
3165
+ return ne && l.value !== pe ? Promise.resolve() : new Promise((h, y) => {
3166
+ De.add([h, y]);
3167
+ });
3168
+ }
3169
+ function mt(h) {
3170
+ return ne || (ne = !h, ye(), De.list().forEach(([y, g]) => h ? g(h) : y()), De.reset()), h;
3171
+ }
3172
+ function un(h, y, g, b) {
3173
+ const { scrollBehavior: N } = e;
3174
+ if (!ae || !N)
3175
+ return Promise.resolve();
3176
+ const j = !g && qs(Pn(h.fullPath, 0)) || (b || !g) && history.state && history.state.scroll || null;
3177
+ return Fe().then(() => N(h, y, j)).then((C) => C && zs(C)).catch((C) => G(C, h, y));
3178
+ }
3179
+ const vt = (h) => r.go(h);
3180
+ let gt;
3181
+ const Je = /* @__PURE__ */ new Set(), yr = {
3182
+ currentRoute: l,
3183
+ listening: !0,
3184
+ addRoute: p,
3185
+ removeRoute: v,
3186
+ hasRoute: w,
3187
+ getRoutes: m,
3188
+ resolve: I,
3189
+ options: e,
3190
+ push: W,
3191
+ replace: J,
3192
+ go: vt,
3193
+ back: () => vt(-1),
3194
+ forward: () => vt(1),
3195
+ beforeEach: s.add,
3196
+ beforeResolve: i.add,
3197
+ afterEach: a.add,
3198
+ onError: Ke.add,
3199
+ isReady: gr,
3200
+ install(h) {
3201
+ const y = this;
3202
+ h.component("RouterLink", La), h.component("RouterView", Ha), h.config.globalProperties.$router = y, Object.defineProperty(h.config.globalProperties, "$route", {
3203
+ enumerable: !0,
3204
+ get: () => k(l)
3205
+ }), ae && // used for the initial navigation client side to avoid pushing
3206
+ // multiple times when the router is used in multiple apps
3207
+ !gt && l.value === pe && (gt = !0, W(r.location).catch((N) => {
3208
+ process.env.NODE_ENV !== "production" && $("Unexpected error when starting the router:", N);
3209
+ }));
3210
+ const g = {};
3211
+ for (const N in pe)
3212
+ Object.defineProperty(g, N, {
3213
+ get: () => l.value[N],
3214
+ enumerable: !0
3215
+ });
3216
+ h.provide(Jt, y), h.provide(Uo, Er(g)), h.provide(Dt, l);
3217
+ const b = h.unmount;
3218
+ Je.add(h), h.unmount = function() {
3219
+ Je.delete(h), Je.size < 1 && (u = pe, U && U(), U = null, l.value = pe, gt = !1, ne = !1), b();
3220
+ }, process.env.NODE_ENV !== "production" && ae && Ga(h, y, t);
3221
+ }
3222
+ };
3223
+ function Ce(h) {
3224
+ return h.reduce((y, g) => y.then(() => ee(g)), Promise.resolve());
3225
+ }
3226
+ return yr;
3227
+ }
3228
+ function ei(e, t) {
3229
+ const n = [], o = [], r = [], s = Math.max(t.matched.length, e.matched.length);
3230
+ for (let i = 0; i < s; i++) {
3231
+ const a = t.matched[i];
3232
+ a && (e.matched.find((u) => ge(u, a)) ? o.push(a) : n.push(a));
3233
+ const l = e.matched[i];
3234
+ l && (t.matched.find((u) => ge(u, l)) || r.push(l));
3235
+ }
3236
+ return [n, o, r];
3237
+ }
3238
+ Za({
3239
+ history: Xs(),
3240
+ routes: []
3241
+ });
3242
+ function ti(e) {
3243
+ return e && typeof e.then == "function";
3244
+ }
3245
+ Promise.resolve(!1);
3246
+ Promise.resolve(!0);
3247
+ var Ie = Promise.resolve();
3248
+ function Ko(e, t) {
3249
+ return e || (e = 0), new Promise(function(n) {
3250
+ return setTimeout(function() {
3251
+ return n(t);
3252
+ }, e);
3253
+ });
3254
+ }
3255
+ function ni(e, t) {
3256
+ return Math.floor(Math.random() * (t - e + 1) + e);
3257
+ }
3258
+ function Yt() {
3259
+ return Math.random().toString(36).substring(2);
3260
+ }
3261
+ var Un = 0, kt = 0;
3262
+ function pt() {
3263
+ var e = (/* @__PURE__ */ new Date()).getTime();
3264
+ return e === Un ? (kt++, e * 1e3 + kt) : (Un = e, kt = 0, e * 1e3);
3265
+ }
3266
+ var oi = pt, ri = "native";
3267
+ function si(e) {
3268
+ var t = {
3269
+ messagesCallback: null,
3270
+ bc: new BroadcastChannel(e),
3271
+ subFns: []
3272
+ // subscriberFunctions
3273
+ };
3274
+ return t.bc.onmessage = function(n) {
3275
+ t.messagesCallback && t.messagesCallback(n.data);
3276
+ }, t;
3277
+ }
3278
+ function ai(e) {
3279
+ e.bc.close(), e.subFns = [];
3280
+ }
3281
+ function ii(e, t) {
3282
+ try {
3283
+ return e.bc.postMessage(t, !1), Ie;
3284
+ } catch (n) {
3285
+ return Promise.reject(n);
3286
+ }
3287
+ }
3288
+ function ci(e, t) {
3289
+ e.messagesCallback = t;
3290
+ }
3291
+ function li() {
3292
+ if (typeof window > "u")
3293
+ return !1;
3294
+ if (typeof BroadcastChannel == "function") {
3295
+ if (BroadcastChannel._pubkey)
3296
+ throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");
3297
+ return !0;
3298
+ } else
3299
+ return !1;
3300
+ }
3301
+ function ui() {
3302
+ return 150;
3303
+ }
3304
+ var di = {
3305
+ create: si,
3306
+ close: ai,
3307
+ onMessage: ci,
3308
+ postMessage: ii,
3309
+ canBeUsed: li,
3310
+ type: ri,
3311
+ averageResponseTime: ui,
3312
+ microSeconds: oi
3313
+ }, Jo = (
3314
+ /** @class */
3315
+ function() {
3316
+ function e(t) {
3317
+ this.ttl = t, this.map = /* @__PURE__ */ new Map(), this._to = !1;
3318
+ }
3319
+ return e.prototype.has = function(t) {
3320
+ return this.map.has(t);
3321
+ }, e.prototype.add = function(t) {
3322
+ var n = this;
3323
+ this.map.set(t, Yo()), this._to || (this._to = !0, setTimeout(function() {
3324
+ n._to = !1, fi(n);
3325
+ }, 0));
3326
+ }, e.prototype.clear = function() {
3327
+ this.map.clear();
3328
+ }, e;
3329
+ }()
3330
+ );
3331
+ function fi(e) {
3332
+ for (var t = Yo() - e.ttl, n = e.map[Symbol.iterator](); ; ) {
3333
+ var o = n.next().value;
3334
+ if (!o)
3335
+ return;
3336
+ var r = o[0], s = o[1];
3337
+ if (s < t)
3338
+ e.map.delete(r);
3339
+ else
3340
+ return;
3341
+ }
3342
+ }
3343
+ function Yo() {
3344
+ return (/* @__PURE__ */ new Date()).getTime();
3345
+ }
3346
+ function Xt() {
3347
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = JSON.parse(JSON.stringify(e));
3348
+ return typeof t.webWorkerSupport > "u" && (t.webWorkerSupport = !0), t.idb || (t.idb = {}), t.idb.ttl || (t.idb.ttl = 1e3 * 45), t.idb.fallbackInterval || (t.idb.fallbackInterval = 150), e.idb && typeof e.idb.onclose == "function" && (t.idb.onclose = e.idb.onclose), t.localstorage || (t.localstorage = {}), t.localstorage.removeTimeout || (t.localstorage.removeTimeout = 1e3 * 60), e.methods && (t.methods = e.methods), t.node || (t.node = {}), t.node.ttl || (t.node.ttl = 1e3 * 60 * 2), t.node.maxParallelWrites || (t.node.maxParallelWrites = 2048), typeof t.node.useFastPath > "u" && (t.node.useFastPath = !0), t;
3349
+ }
3350
+ var pi = pt, hi = "pubkey.broadcast-channel-0-", le = "messages", ht = {
3351
+ durability: "relaxed"
3352
+ }, mi = "idb";
3353
+ function Xo() {
3354
+ if (typeof indexedDB < "u")
3355
+ return indexedDB;
3356
+ if (typeof window < "u") {
3357
+ if (typeof window.mozIndexedDB < "u")
3358
+ return window.mozIndexedDB;
3359
+ if (typeof window.webkitIndexedDB < "u")
3360
+ return window.webkitIndexedDB;
3361
+ if (typeof window.msIndexedDB < "u")
3362
+ return window.msIndexedDB;
3363
+ }
3364
+ return !1;
3365
+ }
3366
+ function Zt(e) {
3367
+ e.commit && e.commit();
3368
+ }
3369
+ function vi(e) {
3370
+ var t = Xo(), n = hi + e, o = t.open(n);
3371
+ return o.onupgradeneeded = function(r) {
3372
+ var s = r.target.result;
3373
+ s.createObjectStore(le, {
3374
+ keyPath: "id",
3375
+ autoIncrement: !0
3376
+ });
3377
+ }, new Promise(function(r, s) {
3378
+ o.onerror = function(i) {
3379
+ return s(i);
3380
+ }, o.onsuccess = function() {
3381
+ r(o.result);
3382
+ };
3383
+ });
3384
+ }
3385
+ function gi(e, t, n) {
3386
+ var o = (/* @__PURE__ */ new Date()).getTime(), r = {
3387
+ uuid: t,
3388
+ time: o,
3389
+ data: n
3390
+ }, s = e.transaction([le], "readwrite", ht);
3391
+ return new Promise(function(i, a) {
3392
+ s.oncomplete = function() {
3393
+ return i();
3394
+ }, s.onerror = function(u) {
3395
+ return a(u);
3396
+ };
3397
+ var l = s.objectStore(le);
3398
+ l.add(r), Zt(s);
3399
+ });
3400
+ }
3401
+ function yi(e, t) {
3402
+ var n = e.transaction(le, "readonly", ht), o = n.objectStore(le), r = [], s = IDBKeyRange.bound(t + 1, 1 / 0);
3403
+ if (o.getAll) {
3404
+ var i = o.getAll(s);
3405
+ return new Promise(function(l, u) {
3406
+ i.onerror = function(c) {
3407
+ return u(c);
3408
+ }, i.onsuccess = function(c) {
3409
+ l(c.target.result);
3410
+ };
3411
+ });
3412
+ }
3413
+ function a() {
3414
+ try {
3415
+ return s = IDBKeyRange.bound(t + 1, 1 / 0), o.openCursor(s);
3416
+ } catch {
3417
+ return o.openCursor();
3418
+ }
3419
+ }
3420
+ return new Promise(function(l, u) {
3421
+ var c = a();
3422
+ c.onerror = function(d) {
3423
+ return u(d);
3424
+ }, c.onsuccess = function(d) {
3425
+ var f = d.target.result;
3426
+ f ? f.value.id < t + 1 ? f.continue(t + 1) : (r.push(f.value), f.continue()) : (Zt(n), l(r));
3427
+ };
3428
+ });
3429
+ }
3430
+ function wi(e, t) {
3431
+ if (e.closed)
3432
+ return Promise.resolve([]);
3433
+ var n = e.db.transaction(le, "readwrite", ht), o = n.objectStore(le);
3434
+ return Promise.all(t.map(function(r) {
3435
+ var s = o.delete(r);
3436
+ return new Promise(function(i) {
3437
+ s.onsuccess = function() {
3438
+ return i();
3439
+ };
3440
+ });
3441
+ }));
3442
+ }
3443
+ function _i(e, t) {
3444
+ var n = (/* @__PURE__ */ new Date()).getTime() - t, o = e.transaction(le, "readonly", ht), r = o.objectStore(le), s = [];
3445
+ return new Promise(function(i) {
3446
+ r.openCursor().onsuccess = function(a) {
3447
+ var l = a.target.result;
3448
+ if (l) {
3449
+ var u = l.value;
3450
+ u.time < n ? (s.push(u), l.continue()) : (Zt(o), i(s));
3451
+ } else
3452
+ i(s);
3453
+ };
3454
+ });
3455
+ }
3456
+ function bi(e) {
3457
+ return _i(e.db, e.options.idb.ttl).then(function(t) {
3458
+ return wi(e, t.map(function(n) {
3459
+ return n.id;
3460
+ }));
3461
+ });
3462
+ }
3463
+ function Ei(e, t) {
3464
+ return t = Xt(t), vi(e).then(function(n) {
3465
+ var o = {
3466
+ closed: !1,
3467
+ lastCursorId: 0,
3468
+ channelName: e,
3469
+ options: t,
3470
+ uuid: Yt(),
3471
+ /**
3472
+ * emittedMessagesIds
3473
+ * contains all messages that have been emitted before
3474
+ * @type {ObliviousSet}
3475
+ */
3476
+ eMIs: new Jo(t.idb.ttl * 2),
3477
+ // ensures we do not read messages in parallel
3478
+ writeBlockPromise: Ie,
3479
+ messagesCallback: null,
3480
+ readQueuePromises: [],
3481
+ db: n
3482
+ };
3483
+ return n.onclose = function() {
3484
+ o.closed = !0, t.idb.onclose && t.idb.onclose();
3485
+ }, Zo(o), o;
3486
+ });
3487
+ }
3488
+ function Zo(e) {
3489
+ e.closed || er(e).then(function() {
3490
+ return Ko(e.options.idb.fallbackInterval);
3491
+ }).then(function() {
3492
+ return Zo(e);
3493
+ });
3494
+ }
3495
+ function ki(e, t) {
3496
+ return !(e.uuid === t.uuid || t.eMIs.has(e.id) || e.data.time < t.messagesCallbackTime);
3497
+ }
3498
+ function er(e) {
3499
+ return e.closed || !e.messagesCallback ? Ie : yi(e.db, e.lastCursorId).then(function(t) {
3500
+ var n = t.filter(function(o) {
3501
+ return !!o;
3502
+ }).map(function(o) {
3503
+ return o.id > e.lastCursorId && (e.lastCursorId = o.id), o;
3504
+ }).filter(function(o) {
3505
+ return ki(o, e);
3506
+ }).sort(function(o, r) {
3507
+ return o.time - r.time;
3508
+ });
3509
+ return n.forEach(function(o) {
3510
+ e.messagesCallback && (e.eMIs.add(o.id), e.messagesCallback(o.data));
3511
+ }), Ie;
3512
+ });
3513
+ }
3514
+ function Si(e) {
3515
+ e.closed = !0, e.db.close();
3516
+ }
3517
+ function Ii(e, t) {
3518
+ return e.writeBlockPromise = e.writeBlockPromise.then(function() {
3519
+ return gi(e.db, e.uuid, t);
3520
+ }).then(function() {
3521
+ ni(0, 10) === 0 && bi(e);
3522
+ }), e.writeBlockPromise;
3523
+ }
3524
+ function Oi(e, t, n) {
3525
+ e.messagesCallbackTime = n, e.messagesCallback = t, er(e);
3526
+ }
3527
+ function Pi() {
3528
+ return !!Xo();
3529
+ }
3530
+ function xi(e) {
3531
+ return e.idb.fallbackInterval * 2;
3532
+ }
3533
+ var Ci = {
3534
+ create: Ei,
3535
+ close: Si,
3536
+ onMessage: Oi,
3537
+ postMessage: Ii,
3538
+ canBeUsed: Pi,
3539
+ type: mi,
3540
+ averageResponseTime: xi,
3541
+ microSeconds: pi
3542
+ }, $i = pt, Ni = "pubkey.broadcastChannel-", Ri = "localstorage";
3543
+ function tr() {
3544
+ var e;
3545
+ if (typeof window > "u")
3546
+ return null;
3547
+ try {
3548
+ e = window.localStorage, e = window["ie8-eventlistener/storage"] || window.localStorage;
3549
+ } catch {
3550
+ }
3551
+ return e;
3552
+ }
3553
+ function nr(e) {
3554
+ return Ni + e;
3555
+ }
3556
+ function Ai(e, t) {
3557
+ return new Promise(function(n) {
3558
+ Ko().then(function() {
3559
+ var o = nr(e.channelName), r = {
3560
+ token: Yt(),
3561
+ time: (/* @__PURE__ */ new Date()).getTime(),
3562
+ data: t,
3563
+ uuid: e.uuid
3564
+ }, s = JSON.stringify(r);
3565
+ tr().setItem(o, s);
3566
+ var i = document.createEvent("Event");
3567
+ i.initEvent("storage", !0, !0), i.key = o, i.newValue = s, window.dispatchEvent(i), n();
3568
+ });
3569
+ });
3570
+ }
3571
+ function Ti(e, t) {
3572
+ var n = nr(e), o = function(s) {
3573
+ s.key === n && t(JSON.parse(s.newValue));
3574
+ };
3575
+ return window.addEventListener("storage", o), o;
3576
+ }
3577
+ function Di(e) {
3578
+ window.removeEventListener("storage", e);
3579
+ }
3580
+ function Vi(e, t) {
3581
+ if (t = Xt(t), !or())
3582
+ throw new Error("BroadcastChannel: localstorage cannot be used");
3583
+ var n = Yt(), o = new Jo(t.localstorage.removeTimeout), r = {
3584
+ channelName: e,
3585
+ uuid: n,
3586
+ eMIs: o
3587
+ // emittedMessagesIds
3588
+ };
3589
+ return r.listener = Ti(e, function(s) {
3590
+ r.messagesCallback && s.uuid !== n && (!s.token || o.has(s.token) || s.data.time && s.data.time < r.messagesCallbackTime || (o.add(s.token), r.messagesCallback(s.data)));
3591
+ }), r;
3592
+ }
3593
+ function Mi(e) {
3594
+ Di(e.listener);
3595
+ }
3596
+ function Li(e, t, n) {
3597
+ e.messagesCallbackTime = n, e.messagesCallback = t;
3598
+ }
3599
+ function or() {
3600
+ var e = tr();
3601
+ if (!e)
3602
+ return !1;
3603
+ try {
3604
+ var t = "__broadcastchannel_check";
3605
+ e.setItem(t, "works"), e.removeItem(t);
3606
+ } catch {
3607
+ return !1;
3608
+ }
3609
+ return !0;
3610
+ }
3611
+ function ji() {
3612
+ var e = 120, t = navigator.userAgent.toLowerCase();
3613
+ return t.includes("safari") && !t.includes("chrome") ? e * 2 : e;
3614
+ }
3615
+ var Bi = {
3616
+ create: Vi,
3617
+ close: Mi,
3618
+ onMessage: Li,
3619
+ postMessage: Ai,
3620
+ canBeUsed: or,
3621
+ type: Ri,
3622
+ averageResponseTime: ji,
3623
+ microSeconds: $i
3624
+ }, Ui = pt, Hi = "simulate", en = /* @__PURE__ */ new Set();
3625
+ function Wi(e) {
3626
+ var t = {
3627
+ name: e,
3628
+ messagesCallback: null
3629
+ };
3630
+ return en.add(t), t;
3631
+ }
3632
+ function Fi(e) {
3633
+ en.delete(e);
3634
+ }
3635
+ function Gi(e, t) {
3636
+ return new Promise(function(n) {
3637
+ return setTimeout(function() {
3638
+ var o = Array.from(en);
3639
+ o.filter(function(r) {
3640
+ return r.name === e.name;
3641
+ }).filter(function(r) {
3642
+ return r !== e;
3643
+ }).filter(function(r) {
3644
+ return !!r.messagesCallback;
3645
+ }).forEach(function(r) {
3646
+ return r.messagesCallback(t);
3647
+ }), n();
3648
+ }, 5);
3649
+ });
3650
+ }
3651
+ function zi(e, t) {
3652
+ e.messagesCallback = t;
3653
+ }
3654
+ function Qi() {
3655
+ return !0;
3656
+ }
3657
+ function qi() {
3658
+ return 5;
3659
+ }
3660
+ var Ki = {
3661
+ create: Wi,
3662
+ close: Fi,
3663
+ onMessage: zi,
3664
+ postMessage: Gi,
3665
+ canBeUsed: Qi,
3666
+ type: Hi,
3667
+ averageResponseTime: qi,
3668
+ microSeconds: Ui
3669
+ }, Hn = [
3670
+ di,
3671
+ // fastest
3672
+ Ci,
3673
+ Bi
3674
+ ];
3675
+ function Ji(e) {
3676
+ var t = [].concat(e.methods, Hn).filter(Boolean);
3677
+ if (e.type) {
3678
+ if (e.type === "simulate")
3679
+ return Ki;
3680
+ var n = t.find(function(r) {
3681
+ return r.type === e.type;
3682
+ });
3683
+ if (n)
3684
+ return n;
3685
+ throw new Error("method-type " + e.type + " not found");
3686
+ }
3687
+ e.webWorkerSupport || (t = t.filter(function(r) {
3688
+ return r.type !== "idb";
3689
+ }));
3690
+ var o = t.find(function(r) {
3691
+ return r.canBeUsed();
3692
+ });
3693
+ if (o)
3694
+ return o;
3695
+ throw new Error("No usable method found in " + JSON.stringify(Hn.map(function(r) {
3696
+ return r.type;
3697
+ })));
3698
+ }
3699
+ var rr = /* @__PURE__ */ new Set(), Yi = 0, tn = function(t, n) {
3700
+ this.id = Yi++, rr.add(this), this.name = t, this.options = Xt(n), this.method = Ji(this.options), this._iL = !1, this._onML = null, this._addEL = {
3701
+ message: [],
3702
+ internal: []
3703
+ }, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null, Xi(this);
3704
+ };
3705
+ tn._pubkey = !0;
3706
+ tn.prototype = {
3707
+ postMessage: function(t) {
3708
+ if (this.closed)
3709
+ throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed " + /**
3710
+ * In the past when this error appeared, it was really hard to debug.
3711
+ * So now we log the msg together with the error so it at least
3712
+ * gives some clue about where in your application this happens.
3713
+ */
3714
+ JSON.stringify(t));
3715
+ return Wn(this, "message", t);
3716
+ },
3717
+ postInternal: function(t) {
3718
+ return Wn(this, "internal", t);
3719
+ },
3720
+ set onmessage(e) {
3721
+ var t = this.method.microSeconds(), n = {
3722
+ time: t,
3723
+ fn: e
3724
+ };
3725
+ Gn(this, "message", this._onML), e && typeof e == "function" ? (this._onML = n, Fn(this, "message", n)) : this._onML = null;
3726
+ },
3727
+ addEventListener: function(t, n) {
3728
+ var o = this.method.microSeconds(), r = {
3729
+ time: o,
3730
+ fn: n
3731
+ };
3732
+ Fn(this, t, r);
3733
+ },
3734
+ removeEventListener: function(t, n) {
3735
+ var o = this._addEL[t].find(function(r) {
3736
+ return r.fn === n;
3737
+ });
3738
+ Gn(this, t, o);
3739
+ },
3740
+ close: function() {
3741
+ var t = this;
3742
+ if (!this.closed) {
3743
+ rr.delete(this), this.closed = !0;
3744
+ var n = this._prepP ? this._prepP : Ie;
3745
+ return this._onML = null, this._addEL.message = [], n.then(function() {
3746
+ return Promise.all(Array.from(t._uMP));
3747
+ }).then(function() {
3748
+ return Promise.all(t._befC.map(function(o) {
3749
+ return o();
3750
+ }));
3751
+ }).then(function() {
3752
+ return t.method.close(t._state);
3753
+ });
3754
+ }
3755
+ },
3756
+ get type() {
3757
+ return this.method.type;
3758
+ },
3759
+ get isClosed() {
3760
+ return this.closed;
3761
+ }
3762
+ };
3763
+ function Wn(e, t, n) {
3764
+ var o = e.method.microSeconds(), r = {
3765
+ time: o,
3766
+ type: t,
3767
+ data: n
3768
+ }, s = e._prepP ? e._prepP : Ie;
3769
+ return s.then(function() {
3770
+ var i = e.method.postMessage(e._state, r);
3771
+ return e._uMP.add(i), i.catch().then(function() {
3772
+ return e._uMP.delete(i);
3773
+ }), i;
3774
+ });
3775
+ }
3776
+ function Xi(e) {
3777
+ var t = e.method.create(e.name, e.options);
3778
+ ti(t) ? (e._prepP = t, t.then(function(n) {
3779
+ e._state = n;
3780
+ })) : e._state = t;
3781
+ }
3782
+ function sr(e) {
3783
+ return e._addEL.message.length > 0 || e._addEL.internal.length > 0;
3784
+ }
3785
+ function Fn(e, t, n) {
3786
+ e._addEL[t].push(n), Zi(e);
3787
+ }
3788
+ function Gn(e, t, n) {
3789
+ e._addEL[t] = e._addEL[t].filter(function(o) {
3790
+ return o !== n;
3791
+ }), ec(e);
3792
+ }
3793
+ function Zi(e) {
3794
+ if (!e._iL && sr(e)) {
3795
+ var t = function(r) {
3796
+ e._addEL[r.type].forEach(function(s) {
3797
+ var i = 1e5, a = s.time - i;
3798
+ r.time >= a && s.fn(r.data);
3799
+ });
3800
+ }, n = e.method.microSeconds();
3801
+ e._prepP ? e._prepP.then(function() {
3802
+ e._iL = !0, e.method.onMessage(e._state, t, n);
3803
+ }) : (e._iL = !0, e.method.onMessage(e._state, t, n));
3804
+ }
3805
+ }
3806
+ function ec(e) {
3807
+ if (e._iL && !sr(e)) {
3808
+ e._iL = !1;
3809
+ var t = e.method.microSeconds();
3810
+ e.method.onMessage(e._state, null, t);
3811
+ }
3812
+ }
3813
+ class St extends Error {
3814
+ /**
3815
+ * @param {string} message
3816
+ * @param {string[]} keys
3817
+ */
3818
+ constructor(t, n) {
3819
+ super(t), this.name = "DevalueError", this.path = n.join("");
3820
+ }
3821
+ }
3822
+ function zn(e) {
3823
+ return Object(e) !== e;
3824
+ }
3825
+ const tc = /* @__PURE__ */ Object.getOwnPropertyNames(
3826
+ Object.prototype
3827
+ ).sort().join("\0");
3828
+ function nc(e) {
3829
+ const t = Object.getPrototypeOf(e);
3830
+ return t === Object.prototype || t === null || Object.getOwnPropertyNames(t).sort().join("\0") === tc;
3831
+ }
3832
+ function oc(e) {
3833
+ return Object.prototype.toString.call(e).slice(8, -1);
3834
+ }
3835
+ function rc(e) {
3836
+ switch (e) {
3837
+ case '"':
3838
+ return '\\"';
3839
+ case "<":
3840
+ return "\\u003C";
3841
+ case "\\":
3842
+ return "\\\\";
3843
+ case `
3844
+ `:
3845
+ return "\\n";
3846
+ case "\r":
3847
+ return "\\r";
3848
+ case " ":
3849
+ return "\\t";
3850
+ case "\b":
3851
+ return "\\b";
3852
+ case "\f":
3853
+ return "\\f";
3854
+ case "\u2028":
3855
+ return "\\u2028";
3856
+ case "\u2029":
3857
+ return "\\u2029";
3858
+ default:
3859
+ return e < " " ? `\\u${e.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
3860
+ }
3861
+ }
3862
+ function Ae(e) {
3863
+ let t = "", n = 0;
3864
+ const o = e.length;
3865
+ for (let r = 0; r < o; r += 1) {
3866
+ const s = e[r], i = rc(s);
3867
+ i && (t += e.slice(n, r) + i, n = r + 1);
3868
+ }
3869
+ return `"${n === 0 ? e : t + e.slice(n)}"`;
3870
+ }
3871
+ const nn = -1, ar = -2, ir = -3, cr = -4, lr = -5, on = -6;
3872
+ function Qn(e, t) {
3873
+ return sc(JSON.parse(e), t);
3874
+ }
3875
+ function sc(e, t) {
3876
+ if (typeof e == "number")
3877
+ return r(e, !0);
3878
+ if (!Array.isArray(e) || e.length === 0)
3879
+ throw new Error("Invalid input");
3880
+ const n = (
3881
+ /** @type {any[]} */
3882
+ e
3883
+ ), o = Array(n.length);
3884
+ function r(s, i = !1) {
3885
+ if (s === nn)
3886
+ return;
3887
+ if (s === ir)
3888
+ return NaN;
3889
+ if (s === cr)
3890
+ return 1 / 0;
3891
+ if (s === lr)
3892
+ return -1 / 0;
3893
+ if (s === on)
3894
+ return -0;
3895
+ if (i)
3896
+ throw new Error("Invalid input");
3897
+ if (s in o)
3898
+ return o[s];
3899
+ const a = n[s];
3900
+ if (!a || typeof a != "object")
3901
+ o[s] = a;
3902
+ else if (Array.isArray(a))
3903
+ if (typeof a[0] == "string") {
3904
+ const l = a[0], u = t == null ? void 0 : t[l];
3905
+ if (u)
3906
+ return o[s] = u(r(a[1]));
3907
+ switch (l) {
3908
+ case "Date":
3909
+ o[s] = new Date(a[1]);
3910
+ break;
3911
+ case "Set":
3912
+ const c = /* @__PURE__ */ new Set();
3913
+ o[s] = c;
3914
+ for (let p = 1; p < a.length; p += 1)
3915
+ c.add(r(a[p]));
3916
+ break;
3917
+ case "Map":
3918
+ const d = /* @__PURE__ */ new Map();
3919
+ o[s] = d;
3920
+ for (let p = 1; p < a.length; p += 2)
3921
+ d.set(r(a[p]), r(a[p + 1]));
3922
+ break;
3923
+ case "RegExp":
3924
+ o[s] = new RegExp(a[1], a[2]);
3925
+ break;
3926
+ case "Object":
3927
+ o[s] = Object(a[1]);
3928
+ break;
3929
+ case "BigInt":
3930
+ o[s] = BigInt(a[1]);
3931
+ break;
3932
+ case "null":
3933
+ const f = /* @__PURE__ */ Object.create(null);
3934
+ o[s] = f;
3935
+ for (let p = 1; p < a.length; p += 2)
3936
+ f[a[p]] = r(a[p + 1]);
3937
+ break;
3938
+ default:
3939
+ throw new Error(`Unknown type ${l}`);
3940
+ }
3941
+ } else {
3942
+ const l = new Array(a.length);
3943
+ o[s] = l;
3944
+ for (let u = 0; u < a.length; u += 1) {
3945
+ const c = a[u];
3946
+ c !== ar && (l[u] = r(c));
3947
+ }
3948
+ }
3949
+ else {
3950
+ const l = {};
3951
+ o[s] = l;
3952
+ for (const u in a) {
3953
+ const c = a[u];
3954
+ l[u] = r(c);
3955
+ }
3956
+ }
3957
+ return o[s];
3958
+ }
3959
+ return r(0);
3960
+ }
3961
+ function qn(e, t) {
3962
+ const n = [], o = /* @__PURE__ */ new Map(), r = [];
3963
+ for (const u in t)
3964
+ r.push({ key: u, fn: t[u] });
3965
+ const s = [];
3966
+ let i = 0;
3967
+ function a(u) {
3968
+ if (typeof u == "function")
3969
+ throw new St("Cannot stringify a function", s);
3970
+ if (o.has(u))
3971
+ return o.get(u);
3972
+ if (u === void 0)
3973
+ return nn;
3974
+ if (Number.isNaN(u))
3975
+ return ir;
3976
+ if (u === 1 / 0)
3977
+ return cr;
3978
+ if (u === -1 / 0)
3979
+ return lr;
3980
+ if (u === 0 && 1 / u < 0)
3981
+ return on;
3982
+ const c = i++;
3983
+ o.set(u, c);
3984
+ for (const { key: f, fn: p } of r) {
3985
+ const v = p(u);
3986
+ if (v)
3987
+ return n[c] = `["${f}",${a(v)}]`, c;
3988
+ }
3989
+ let d = "";
3990
+ if (zn(u))
3991
+ d = It(u);
3992
+ else
3993
+ switch (oc(u)) {
3994
+ case "Number":
3995
+ case "String":
3996
+ case "Boolean":
3997
+ d = `["Object",${It(u)}]`;
3998
+ break;
3999
+ case "BigInt":
4000
+ d = `["BigInt",${u}]`;
4001
+ break;
4002
+ case "Date":
4003
+ d = `["Date","${u.toISOString()}"]`;
4004
+ break;
4005
+ case "RegExp":
4006
+ const { source: p, flags: v } = u;
4007
+ d = v ? `["RegExp",${Ae(p)},"${v}"]` : `["RegExp",${Ae(p)}]`;
4008
+ break;
4009
+ case "Array":
4010
+ d = "[";
4011
+ for (let m = 0; m < u.length; m += 1)
4012
+ m > 0 && (d += ","), m in u ? (s.push(`[${m}]`), d += a(u[m]), s.pop()) : d += ar;
4013
+ d += "]";
4014
+ break;
4015
+ case "Set":
4016
+ d = '["Set"';
4017
+ for (const m of u)
4018
+ d += `,${a(m)}`;
4019
+ d += "]";
4020
+ break;
4021
+ case "Map":
4022
+ d = '["Map"';
4023
+ for (const [m, w] of u)
4024
+ s.push(
4025
+ `.get(${zn(m) ? It(m) : "..."})`
4026
+ ), d += `,${a(m)},${a(w)}`;
4027
+ d += "]";
4028
+ break;
4029
+ default:
4030
+ if (!nc(u))
4031
+ throw new St(
4032
+ "Cannot stringify arbitrary non-POJOs",
4033
+ s
4034
+ );
4035
+ if (Object.getOwnPropertySymbols(u).length > 0)
4036
+ throw new St(
4037
+ "Cannot stringify POJOs with symbolic keys",
4038
+ s
4039
+ );
4040
+ if (Object.getPrototypeOf(u) === null) {
4041
+ d = '["null"';
4042
+ for (const m in u)
4043
+ s.push(`.${m}`), d += `,${Ae(m)},${a(u[m])}`, s.pop();
4044
+ d += "]";
4045
+ } else {
4046
+ d = "{";
4047
+ let m = !1;
4048
+ for (const w in u)
4049
+ m && (d += ","), m = !0, s.push(`.${w}`), d += `${Ae(w)}:${a(u[w])}`, s.pop();
4050
+ d += "}";
4051
+ }
4052
+ }
4053
+ return n[c] = d, c;
4054
+ }
4055
+ const l = a(e);
4056
+ return l < 0 ? `${l}` : `[${n.join(",")}]`;
4057
+ }
4058
+ function It(e) {
4059
+ const t = typeof e;
4060
+ return t === "string" ? Ae(e) : e instanceof String ? Ae(e.toString()) : e === void 0 ? nn.toString() : e === 0 && 1 / e < 0 ? on.toString() : t === "bigint" ? `["BigInt","${e}"]` : String(e);
4061
+ }
4062
+ function ac(e, t, { initialize: n, type: o }) {
4063
+ let r = `${t.$id}-${e.toString()}`, s = new tn(r, { type: o }), i = !1, a = 0;
4064
+ ue(() => t[e], (c) => {
4065
+ i || (a = Date.now(), s.postMessage({ timestamp: a, state: Qn(qn(c)) })), i = !1;
4066
+ }, { deep: !0 }), s.onmessage = (c) => {
4067
+ if (c === void 0) {
4068
+ s.postMessage({ timestamp: a, state: Qn(qn(t[e])) });
4069
+ return;
4070
+ }
4071
+ c.timestamp <= a || (i = !0, a = c.timestamp, t[e] = c.state);
4072
+ };
4073
+ let l = () => s.postMessage(void 0), u = () => s.close();
4074
+ return n && l(), { sync: l, unshare: u };
4075
+ }
4076
+ var ic = (e, t) => Object.keys(t).includes(e), cc = ({ initialize: e = !0, enable: t = !0, type: n }) => ({ store: o, options: r }) => {
4077
+ var s, i;
4078
+ let a = ((s = r == null ? void 0 : r.share) == null ? void 0 : s.enable) ?? t, l = ((i = r == null ? void 0 : r.share) == null ? void 0 : i.omit) ?? [];
4079
+ !a || Object.keys(o.$state).forEach((u) => {
4080
+ var c;
4081
+ l.includes(u) || !ic(u, o.$state) || ac(u, o, { initialize: ((c = r == null ? void 0 : r.share) == null ? void 0 : c.initialize) ?? e, type: n });
4082
+ });
4083
+ };
4084
+ const lc = $s();
4085
+ lc.use(
4086
+ cc({
4087
+ enable: !0,
4088
+ initialize: !0
4089
+ })
4090
+ );
4091
+ const uc = /* @__PURE__ */ q({
4092
+ __name: "Doctype",
4093
+ setup(e) {
4094
+ const { stonecrop: t, isReady: n } = No(), o = V([]);
4095
+ return ue(n, () => {
4096
+ if (n.value) {
4097
+ let r = t.value.schema.schema.toArray();
4098
+ r.forEach((s, i) => {
4099
+ const l = t.value.store.record[s.fieldname];
4100
+ r[i].value = l;
4101
+ }), o.value = r;
4102
+ }
4103
+ }), (r, s) => k(n) ? (x(), Se(k(es), {
4104
+ key: 0,
4105
+ class: "aform-main",
4106
+ modelValue: o.value,
4107
+ "onUpdate:modelValue": s[0] || (s[0] = (i) => o.value = i)
4108
+ }, null, 8, ["modelValue"])) : ke("", !0);
4109
+ }
4110
+ });
4111
+ var Kn;
4112
+ const ur = typeof window < "u", dc = (e) => typeof e == "string", fc = () => {
4113
+ };
4114
+ ur && (Kn = window == null ? void 0 : window.navigator) != null && Kn.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
4115
+ function dr(e) {
4116
+ return typeof e == "function" ? e() : k(e);
4117
+ }
4118
+ function pc(e) {
4119
+ return e;
4120
+ }
4121
+ function hc(e) {
4122
+ return po() ? (ho(e), !0) : !1;
4123
+ }
4124
+ function Mt(e) {
4125
+ var t;
4126
+ const n = dr(e);
4127
+ return (t = n == null ? void 0 : n.$el) != null ? t : n;
4128
+ }
4129
+ const fr = ur ? window : void 0;
4130
+ function mc(...e) {
4131
+ let t, n, o, r;
4132
+ if (dc(e[0]) || Array.isArray(e[0]) ? ([n, o, r] = e, t = fr) : [t, n, o, r] = e, !t)
4133
+ return fc;
4134
+ Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
4135
+ const s = [], i = () => {
4136
+ s.forEach((c) => c()), s.length = 0;
4137
+ }, a = (c, d, f, p) => (c.addEventListener(d, f, p), () => c.removeEventListener(d, f, p)), l = ue(() => [Mt(t), dr(r)], ([c, d]) => {
4138
+ i(), c && s.push(...n.flatMap((f) => o.map((p) => a(c, f, p, d))));
4139
+ }, { immediate: !0, flush: "post" }), u = () => {
4140
+ l(), i();
4141
+ };
4142
+ return hc(u), u;
4143
+ }
4144
+ const Jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Yn = "__vueuse_ssr_handlers__";
4145
+ Jn[Yn] = Jn[Yn] || {};
4146
+ function vc(e, { window: t = fr, scrollTarget: n } = {}) {
4147
+ const o = V(!1), r = () => {
4148
+ if (!t)
4149
+ return;
4150
+ const s = t.document, i = Mt(e);
4151
+ if (!i)
4152
+ o.value = !1;
4153
+ else {
4154
+ const a = i.getBoundingClientRect();
4155
+ o.value = a.top <= (t.innerHeight || s.documentElement.clientHeight) && a.left <= (t.innerWidth || s.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;
4156
+ }
4157
+ };
4158
+ return ue(() => Mt(e), () => r(), { immediate: !0, flush: "post" }), t && mc(n || t, "scroll", r, {
4159
+ capture: !1,
4160
+ passive: !0
4161
+ }), o;
4162
+ }
4163
+ var Xn;
4164
+ (function(e) {
4165
+ e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
4166
+ })(Xn || (Xn = {}));
4167
+ var gc = Object.defineProperty, Zn = Object.getOwnPropertySymbols, yc = Object.prototype.hasOwnProperty, wc = Object.prototype.propertyIsEnumerable, eo = (e, t, n) => t in e ? gc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _c = (e, t) => {
4168
+ for (var n in t || (t = {}))
4169
+ yc.call(t, n) && eo(e, n, t[n]);
4170
+ if (Zn)
4171
+ for (var n of Zn(t))
4172
+ wc.call(t, n) && eo(e, n, t[n]);
4173
+ return e;
4174
+ };
4175
+ const bc = {
4176
+ easeInSine: [0.12, 0, 0.39, 0],
4177
+ easeOutSine: [0.61, 1, 0.88, 1],
4178
+ easeInOutSine: [0.37, 0, 0.63, 1],
4179
+ easeInQuad: [0.11, 0, 0.5, 0],
4180
+ easeOutQuad: [0.5, 1, 0.89, 1],
4181
+ easeInOutQuad: [0.45, 0, 0.55, 1],
4182
+ easeInCubic: [0.32, 0, 0.67, 0],
4183
+ easeOutCubic: [0.33, 1, 0.68, 1],
4184
+ easeInOutCubic: [0.65, 0, 0.35, 1],
4185
+ easeInQuart: [0.5, 0, 0.75, 0],
4186
+ easeOutQuart: [0.25, 1, 0.5, 1],
4187
+ easeInOutQuart: [0.76, 0, 0.24, 1],
4188
+ easeInQuint: [0.64, 0, 0.78, 0],
4189
+ easeOutQuint: [0.22, 1, 0.36, 1],
4190
+ easeInOutQuint: [0.83, 0, 0.17, 1],
4191
+ easeInExpo: [0.7, 0, 0.84, 0],
4192
+ easeOutExpo: [0.16, 1, 0.3, 1],
4193
+ easeInOutExpo: [0.87, 0, 0.13, 1],
4194
+ easeInCirc: [0.55, 0, 1, 0.45],
4195
+ easeOutCirc: [0, 0.55, 0.45, 1],
4196
+ easeInOutCirc: [0.85, 0, 0.15, 1],
4197
+ easeInBack: [0.36, 0, 0.66, -0.56],
4198
+ easeOutBack: [0.34, 1.56, 0.64, 1],
4199
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
4200
+ };
4201
+ _c({
4202
+ linear: pc
4203
+ }, bc);
4204
+ const de = (e) => {
4205
+ let t = vc(e).value;
4206
+ return t = t && e.offsetHeight > 0, t;
4207
+ }, fe = (e) => e.tabIndex >= 0, to = (e) => {
4208
+ const t = e.target;
4209
+ return rn(t);
4210
+ }, rn = (e) => {
4211
+ var t;
4212
+ let n;
4213
+ if (e instanceof HTMLTableCellElement) {
4214
+ const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
4215
+ if (o) {
4216
+ const r = Array.from(o.children)[e.cellIndex];
4217
+ r && (n = r);
4218
+ }
4219
+ } else if (e instanceof HTMLTableRowElement) {
4220
+ const o = e.previousElementSibling;
4221
+ o && (n = o);
4222
+ }
4223
+ return n && (!fe(n) || !de(n)) ? rn(n) : n;
4224
+ }, Ec = (e) => {
4225
+ var t;
4226
+ const n = e.target;
4227
+ let o;
4228
+ if (n instanceof HTMLTableCellElement) {
4229
+ const r = (t = n.parentElement) == null ? void 0 : t.parentElement;
4230
+ if (r) {
4231
+ const s = r.firstElementChild.children[n.cellIndex];
4232
+ s && (o = s);
4233
+ }
4234
+ } else if (n instanceof HTMLTableRowElement) {
4235
+ const r = n.parentElement;
4236
+ if (r) {
4237
+ const s = r.firstElementChild;
4238
+ s && (o = s);
4239
+ }
4240
+ }
4241
+ return o && (!fe(o) || !de(o)) ? sn(o) : o;
4242
+ }, no = (e) => {
4243
+ const t = e.target;
4244
+ return sn(t);
4245
+ }, sn = (e) => {
4246
+ var t;
4247
+ let n;
4248
+ if (e instanceof HTMLTableCellElement) {
4249
+ const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
4250
+ if (o) {
4251
+ const r = Array.from(o.children)[e.cellIndex];
4252
+ r && (n = r);
4253
+ }
4254
+ } else if (e instanceof HTMLTableRowElement) {
4255
+ const o = e.nextElementSibling;
4256
+ o && (n = o);
4257
+ }
4258
+ return n && (!fe(n) || !de(n)) ? sn(n) : n;
4259
+ }, kc = (e) => {
4260
+ var t;
4261
+ const n = e.target;
4262
+ let o;
4263
+ if (n instanceof HTMLTableCellElement) {
4264
+ const r = (t = n.parentElement) == null ? void 0 : t.parentElement;
4265
+ if (r) {
4266
+ const s = r.lastElementChild.children[n.cellIndex];
4267
+ s && (o = s);
4268
+ }
4269
+ } else if (n instanceof HTMLTableRowElement) {
4270
+ const r = n.parentElement;
4271
+ if (r) {
4272
+ const s = r.lastElementChild;
4273
+ s && (o = s);
4274
+ }
4275
+ }
4276
+ return o && (!fe(o) || !de(o)) ? rn(o) : o;
4277
+ }, oo = (e) => {
4278
+ const t = e.target;
4279
+ return an(t);
4280
+ }, an = (e) => {
4281
+ var t;
4282
+ let n;
4283
+ if (e.previousElementSibling)
4284
+ n = e.previousElementSibling;
4285
+ else {
4286
+ const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
4287
+ n = o == null ? void 0 : o.lastElementChild;
4288
+ }
4289
+ return n && (!fe(n) || !de(n)) ? an(n) : n;
4290
+ }, ro = (e) => {
4291
+ const t = e.target;
4292
+ return cn(t);
4293
+ }, cn = (e) => {
4294
+ var t;
4295
+ let n;
4296
+ if (e.nextElementSibling)
4297
+ n = e.nextElementSibling;
4298
+ else {
4299
+ const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
4300
+ n = o == null ? void 0 : o.firstElementChild;
4301
+ }
4302
+ return n && (!fe(n) || !de(n)) ? cn(n) : n;
4303
+ }, so = (e) => {
4304
+ const t = e.target.parentElement.firstElementChild;
4305
+ return t && (!fe(t) || !de(t)) ? cn(t) : t;
4306
+ }, ao = (e) => {
4307
+ const t = e.target.parentElement.lastElementChild;
4308
+ return t && (!fe(t) || !de(t)) ? an(t) : t;
4309
+ }, et = ["alt", "control", "shift", "meta"], Sc = {
4310
+ ArrowUp: "up",
4311
+ ArrowDown: "down",
4312
+ ArrowLeft: "left",
4313
+ ArrowRight: "right"
4314
+ }, pr = {
4315
+ "keydown.up": (e) => {
4316
+ const t = to(e);
4317
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4318
+ },
4319
+ "keydown.down": (e) => {
4320
+ const t = no(e);
4321
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4322
+ },
4323
+ "keydown.left": (e) => {
4324
+ const t = oo(e);
4325
+ e.preventDefault(), e.stopPropagation(), t && t.focus();
4326
+ },
4327
+ "keydown.right": (e) => {
4328
+ const t = ro(e);
4329
+ e.preventDefault(), e.stopPropagation(), t && t.focus();
4330
+ },
4331
+ "keydown.control.up": (e) => {
4332
+ const t = Ec(e);
4333
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4334
+ },
4335
+ "keydown.control.down": (e) => {
4336
+ const t = kc(e);
4337
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4338
+ },
4339
+ "keydown.control.left": (e) => {
4340
+ const t = so(e);
4341
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4342
+ },
4343
+ "keydown.control.right": (e) => {
4344
+ const t = ao(e);
4345
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4346
+ },
4347
+ "keydown.end": (e) => {
4348
+ const t = ao(e);
4349
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4350
+ },
4351
+ "keydown.enter": (e) => {
4352
+ if (e.target instanceof HTMLTableCellElement) {
4353
+ e.preventDefault(), e.stopPropagation();
4354
+ const t = no(e);
4355
+ t && t.focus();
4356
+ }
4357
+ },
4358
+ "keydown.shift.enter": (e) => {
4359
+ if (e.target instanceof HTMLTableCellElement) {
4360
+ e.preventDefault(), e.stopPropagation();
4361
+ const t = to(e);
4362
+ t && t.focus();
4363
+ }
4364
+ },
4365
+ "keydown.home": (e) => {
4366
+ const t = so(e);
4367
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4368
+ },
4369
+ "keydown.tab": (e) => {
4370
+ const t = ro(e);
4371
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4372
+ },
4373
+ "keydown.shift.tab": (e) => {
4374
+ const t = oo(e);
4375
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
4376
+ }
4377
+ };
4378
+ function hr(e) {
4379
+ const t = (o) => {
4380
+ let r = null;
4381
+ o.parent && (typeof o.parent == "string" ? r = document.querySelector(o.parent) : o.parent instanceof Element ? r = o.parent : r = o.parent.value);
4382
+ let s = [];
4383
+ if (o.selectors)
4384
+ if (typeof o.selectors == "string")
4385
+ s = r ? Array.from(r.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));
4386
+ else if (o.selectors instanceof Element)
4387
+ s.push(o.selectors);
4388
+ else if (Array.isArray(o.selectors.value))
4389
+ for (const i of o.selectors.value)
4390
+ i instanceof Element ? s.push(i) : s.push(i.$el);
4391
+ else
4392
+ s.push(o.selectors.value);
4393
+ else
4394
+ s = Array.from(r.children).filter((i) => fe(i) && de(i));
4395
+ return s;
4396
+ }, n = (o) => (r) => {
4397
+ const s = Sc[r.key] || r.key.toLowerCase();
4398
+ if (et.includes(s))
4399
+ return;
4400
+ const i = o.handlers || pr;
4401
+ for (const a of Object.keys(i)) {
4402
+ const [l, ...u] = a.split(".");
4403
+ if (l === "keydown" && u.includes(s)) {
4404
+ const c = i[a], d = u.filter((p) => et.includes(p)), f = et.some((p) => {
4405
+ const v = p.charAt(0).toUpperCase() + p.slice(1);
4406
+ return r.getModifierState(v);
4407
+ });
4408
+ if (d.length > 0) {
4409
+ if (f) {
4410
+ for (const p of et)
4411
+ if (u.includes(p)) {
4412
+ const v = p.charAt(0).toUpperCase() + p.slice(1);
4413
+ r.getModifierState(v) && c(r);
4414
+ }
4415
+ }
4416
+ } else
4417
+ f || c(r);
4418
+ }
4419
+ }
4420
+ };
4421
+ Lt(() => {
4422
+ for (const o of e) {
4423
+ const r = t(o);
4424
+ for (const s of r)
4425
+ s.addEventListener("keydown", n(o));
4426
+ }
4427
+ }), Sr(() => {
4428
+ for (const o of e) {
4429
+ const r = t(o);
4430
+ for (const s of r)
4431
+ s.removeEventListener("keydown", n(o));
4432
+ }
4433
+ });
4434
+ }
4435
+ const Ic = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Oc = { key: 1 }, Pc = /* @__PURE__ */ q({
4436
+ __name: "ACell",
4437
+ props: {
4438
+ colIndex: {},
4439
+ rowIndex: {},
4440
+ tableid: {},
4441
+ addNavigation: { type: [Boolean, Object], default: !0 },
4442
+ tabIndex: { default: 0 },
4443
+ clickHandler: {}
4444
+ },
4445
+ setup(e) {
4446
+ var t;
4447
+ const n = e, o = Z(n.tableid), r = V(null);
4448
+ let s = V(!1);
4449
+ const i = B(() => {
4450
+ const m = o.cellData(n.colIndex, n.rowIndex);
4451
+ if (o.columns[n.colIndex].format) {
4452
+ const w = o.columns[n.colIndex].format;
4453
+ return typeof w == "function" ? w(m) : typeof w == "string" ? Function(`"use strict";return (${w})`)()(m) : m;
4454
+ } else
4455
+ return m;
4456
+ }), a = (m) => {
4457
+ if (n.clickHandler) {
4458
+ n.clickHandler(m);
4459
+ return;
4460
+ }
4461
+ if (o.columns[n.colIndex].mask, o.columns[n.colIndex].modalComponent) {
4462
+ const w = r.value.getBoundingClientRect();
4463
+ o.modal.visible = !0, o.modal.colIndex = n.colIndex, o.modal.rowIndex = n.rowIndex, o.modal.parent = r.value, o.modal.top = w.top + w.height, o.modal.left = w.left, o.modal.width = u.value, o.modal.component = o.columns[n.colIndex].modalComponent, o.modal.componentProps = o.columns[n.colIndex].modalComponentProps;
4464
+ }
4465
+ };
4466
+ if (n.addNavigation) {
4467
+ let m = {
4468
+ ...pr,
4469
+ "keydown.f2": a,
4470
+ "keydown.alt.up": a,
4471
+ "keydown.alt.down": a,
4472
+ "keydown.alt.left": a,
4473
+ "keydown.alt.right": a
4474
+ };
4475
+ typeof n.addNavigation == "object" && (m = {
4476
+ ...m,
4477
+ ...n.addNavigation
4478
+ }), hr([
4479
+ {
4480
+ selectors: r,
4481
+ handlers: m
4482
+ }
4483
+ ]);
4484
+ }
4485
+ const l = B(() => o.columns[n.colIndex].align || "center"), u = B(() => o.columns[n.colIndex].width || "40ch");
4486
+ let c = "";
4487
+ const d = () => {
4488
+ r.value && (c = r.value.innerText);
4489
+ }, f = () => {
4490
+ r.value && r.value.innerHTML !== c && (c = r.value.innerText, r.value.dispatchEvent(new Event("change")), s.value = !0, o.columns[n.colIndex].format || o.setCellData(n.rowIndex, n.colIndex, c));
4491
+ }, p = (m, w) => w && m === 0 && w > 0 ? `${w}ch` : "inherit", v = {
4492
+ textAlign: l.value,
4493
+ width: u.value,
4494
+ backgroundColor: s.value ? "var(--cell-modified-color)" : "inherit",
4495
+ fontWeight: s.value ? "bold" : "inherit",
4496
+ paddingLeft: p(n.colIndex, (t = o.display[n.rowIndex]) == null ? void 0 : t.indent)
4497
+ };
4498
+ return (m, w) => (x(), A("td", {
4499
+ ref_key: "cell",
4500
+ ref: r,
4501
+ "data-colindex": m.colIndex,
4502
+ "data-rowindex": m.rowIndex,
4503
+ "data-editable": k(o).columns[m.colIndex].edit,
4504
+ contenteditable: k(o).columns[m.colIndex].edit,
4505
+ tabindex: m.tabIndex,
4506
+ spellcheck: !1,
4507
+ style: v,
4508
+ onFocus: d,
4509
+ onPaste: f,
4510
+ onBlur: f,
4511
+ onInput: f,
4512
+ onClick: a,
4513
+ onMousedown: a
4514
+ }, [
4515
+ k(o).columns[m.colIndex].cellComponent ? (x(), Se(Bt(k(o).columns[m.colIndex].cellComponent), Ut({
4516
+ key: 0,
4517
+ value: i.value
4518
+ }, k(o).columns[m.colIndex].cellComponentProps), null, 16, ["value"])) : (x(), A("span", Oc, ce(i.value), 1))
4519
+ ], 40, Ic));
4520
+ }
4521
+ }), qe = (e, t) => {
4522
+ const n = e.__vccOpts || e;
4523
+ for (const [o, r] of t)
4524
+ n[o] = r;
4525
+ return n;
4526
+ }, xc = /* @__PURE__ */ qe(Pc, [["__scopeId", "data-v-07dfe445"]]), Cc = ["tabindex"], $c = {
4527
+ key: 0,
4528
+ tabIndex: -1,
4529
+ class: "list-index"
4530
+ }, Nc = /* @__PURE__ */ q({
4531
+ __name: "ARow",
4532
+ props: {
4533
+ row: {},
4534
+ rowIndex: {},
4535
+ tableid: {},
4536
+ tabIndex: { default: -1 },
4537
+ addNavigation: {}
4538
+ },
4539
+ setup(e) {
4540
+ vo((l) => ({
4541
+ "5b18ee03": k(r)
4542
+ }));
4543
+ const t = e, n = Z(t.tableid), o = V(null), r = n.numberedRowWidth.value, s = () => n.config.view !== "tree" ? "" : n.display[t.rowIndex].isRoot || n.display[t.rowIndex].isParent ? n.display[t.rowIndex].childrenOpen ? "-" : "+" : "", i = () => n.config.view !== "tree" || n.display[t.rowIndex].isRoot || n.display[t.rowIndex].open, a = (l) => {
4544
+ n.toggleRowExpand(l);
4545
+ };
4546
+ return t.addNavigation && hr([
4547
+ {
4548
+ selectors: o,
4549
+ handlers: t.addNavigation
4550
+ }
4551
+ ]), (l, u) => lt((x(), A("tr", {
4552
+ ref_key: "rowEl",
4553
+ ref: o,
4554
+ tabindex: l.tabIndex,
4555
+ class: "table-row"
4556
+ }, [
4557
+ k(n).config.view === "list" ? (x(), A("td", $c, ce(l.rowIndex + 1), 1)) : k(n).config.view === "tree" ? (x(), A("td", {
4558
+ key: 1,
4559
+ tabIndex: -1,
4560
+ class: "tree-index",
4561
+ onClick: u[0] || (u[0] = (c) => a(l.rowIndex))
4562
+ }, ce(s()), 1)) : me(l.$slots, "indexCell", { key: 2 }, void 0, !0),
4563
+ me(l.$slots, "default", {}, void 0, !0)
4564
+ ], 8, Cc)), [
4565
+ [jt, i()]
4566
+ ]);
4567
+ }
4568
+ }), Rc = /* @__PURE__ */ qe(Nc, [["__scopeId", "data-v-4c71a067"]]);
4569
+ let tt;
4570
+ const Ac = new Uint8Array(16);
4571
+ function Tc() {
4572
+ if (!tt && (tt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !tt))
4573
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
4574
+ return tt(Ac);
4575
+ }
4576
+ const F = [];
4577
+ for (let e = 0; e < 256; ++e)
4578
+ F.push((e + 256).toString(16).slice(1));
4579
+ function Dc(e, t = 0) {
4580
+ return F[e[t + 0]] + F[e[t + 1]] + F[e[t + 2]] + F[e[t + 3]] + "-" + F[e[t + 4]] + F[e[t + 5]] + "-" + F[e[t + 6]] + F[e[t + 7]] + "-" + F[e[t + 8]] + F[e[t + 9]] + "-" + F[e[t + 10]] + F[e[t + 11]] + F[e[t + 12]] + F[e[t + 13]] + F[e[t + 14]] + F[e[t + 15]];
4581
+ }
4582
+ const Vc = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), io = {
4583
+ randomUUID: Vc
4584
+ };
4585
+ function mr(e, t, n) {
4586
+ if (io.randomUUID && !t && !e)
4587
+ return io.randomUUID();
4588
+ e = e || {};
4589
+ const o = e.random || (e.rng || Tc)();
4590
+ if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, t) {
4591
+ n = n || 0;
4592
+ for (let r = 0; r < 16; ++r)
4593
+ t[n + r] = o[r];
4594
+ return t;
4595
+ }
4596
+ return Dc(o);
4597
+ }
4598
+ class Mc {
4599
+ constructor(t, n, o, r, s, i) {
4600
+ this.id = t || mr(), this.rows = o, this.columns = be(n), this.config = be(r), this.table = s || be(this.createTableObject()), this.display = this.createDisplayObject(i), this.modal = be({ visible: !1 });
4601
+ }
4602
+ createTableObject() {
4603
+ const t = {};
4604
+ for (const [n, o] of this.columns.entries())
4605
+ for (const [r, s] of this.rows.entries())
4606
+ t[`${n}:${r}`] = s[o.name];
4607
+ return t;
4608
+ }
4609
+ createDisplayObject(t) {
4610
+ const n = [Object.assign({}, { modified: !1 })];
4611
+ if (t && "0:0" in t)
4612
+ return t;
4613
+ const o = /* @__PURE__ */ new Set();
4614
+ for (let r = this.rows.length - 1; r >= 0; r--) {
4615
+ const s = this.rows[r];
4616
+ s.parent && o.add(s.parent), n[r] = {
4617
+ childrenOpen: !1,
4618
+ expanded: !1,
4619
+ indent: s.indent || null,
4620
+ isParent: o.has(r),
4621
+ isRoot: s.parent === null || s.parent === void 0,
4622
+ modified: !1,
4623
+ open: s.parent === null || s.parent === void 0,
4624
+ parent: s.parent
4625
+ };
4626
+ }
4627
+ return be(n);
4628
+ }
4629
+ get zeroColumn() {
4630
+ return ["list", "tree", "list-expansion"].includes(this.config.view);
4631
+ }
4632
+ get numberedRowWidth() {
4633
+ return B(() => String(Math.ceil(this.rows.length / 100) + 1) + "ch");
4634
+ }
4635
+ cellData(t, n) {
4636
+ return this.table[`${t}:${n}`];
4637
+ }
4638
+ setCellData(t, n, o) {
4639
+ this.table[`${n}:${t}`] !== o && (this.display[t].modified = !0), this.table[`${n}:${t}`] = o;
4640
+ const r = this.columns[n];
4641
+ return this.rows[t][r.name] = o, this.table[`${n}:${t}`];
4642
+ }
4643
+ toggleRowExpand(t) {
4644
+ if (this.config.view === "tree") {
4645
+ this.display[t].childrenOpen = !this.display[t].childrenOpen;
4646
+ for (let n = this.rows.length - 1; n >= 0; n--)
4647
+ this.display[n].parent === t && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));
4648
+ } else
4649
+ this.config.view === "list-expansion" && (this.display[t].expanded = !this.display[t].expanded);
4650
+ }
4651
+ }
4652
+ const Lc = { key: 0 }, jc = {
4653
+ class: "atable-header-row",
4654
+ tabindex: "-1"
4655
+ }, Bc = {
4656
+ key: 0,
4657
+ id: "header-index"
4658
+ }, Uc = /* @__PURE__ */ q({
4659
+ __name: "ATableHeader",
4660
+ props: {
4661
+ columns: {},
4662
+ config: {},
4663
+ tableid: {}
4664
+ },
4665
+ setup(e) {
4666
+ vo((r) => ({
4667
+ "12d06943": k(n)
4668
+ }));
4669
+ const t = Z(e.tableid), n = t.numberedRowWidth.value, o = (r) => ({
4670
+ minWidth: r.width || "40ch",
4671
+ textAlign: r.align || "center",
4672
+ width: t.config.fullWidth ? "auto" : null
4673
+ });
4674
+ return (r, s) => r.columns.length ? (x(), A("thead", Lc, [
4675
+ T("tr", jc, [
4676
+ k(t).zeroColumn ? (x(), A("th", Bc)) : ke("", !0),
4677
+ (x(!0), A(Oe, null, Pe(r.columns, (i, a) => (x(), A("th", {
4678
+ key: a,
4679
+ tabindex: "-1",
4680
+ style: ie(o(i))
4681
+ }, [
4682
+ me(r.$slots, "default", {}, () => [
4683
+ go(ce(i.label || String.fromCharCode(a + 97).toUpperCase()), 1)
4684
+ ], !0)
4685
+ ], 4))), 128))
4686
+ ])
4687
+ ])) : ke("", !0);
4688
+ }
4689
+ }), Hc = /* @__PURE__ */ qe(Uc, [["__scopeId", "data-v-16e66636"]]), Wc = /* @__PURE__ */ q({
4690
+ __name: "ATableModal",
4691
+ props: {
4692
+ colIndex: {},
4693
+ rowIndex: {},
4694
+ tableid: {}
4695
+ },
4696
+ setup(e) {
4697
+ Z(e.tableid);
4698
+ const t = (n) => {
4699
+ n.stopPropagation();
4700
+ };
4701
+ return (n, o) => (x(), A("div", {
4702
+ ref: "amodal",
4703
+ class: "amodal",
4704
+ tabindex: "-1",
4705
+ onClick: t,
4706
+ onInput: t
4707
+ }, [
4708
+ me(n.$slots, "default", {}, void 0, !0)
4709
+ ], 544));
4710
+ }
4711
+ }), Fc = /* @__PURE__ */ qe(Wc, [["__scopeId", "data-v-10a48b2a"]]), Gc = /* @__PURE__ */ q({
4712
+ __name: "ATable",
4713
+ props: {
4714
+ id: {},
4715
+ modelValue: {},
4716
+ columns: {},
4717
+ rows: { default: () => [] },
4718
+ config: { default: () => new Object() },
4719
+ tableid: {}
4720
+ },
4721
+ emits: ["update:modelValue"],
4722
+ setup(e, { emit: t }) {
4723
+ const n = e, o = t;
4724
+ let r = n.modelValue ? n.modelValue : n.rows, s = new Mc(n.id, n.columns, r, n.config);
4725
+ nt(s.id, s), ue(
4726
+ () => s.rows,
4727
+ (a, l) => {
4728
+ o("update:modelValue", a);
4729
+ },
4730
+ { deep: !0 }
4731
+ );
4732
+ const i = (a) => {
4733
+ var l;
4734
+ (l = s.modal.parent) != null && l.contains(a.target) || s.modal.visible && (s.modal.visible = !1);
4735
+ };
4736
+ return window.addEventListener("click", i), window.addEventListener("keydown", (a) => {
4737
+ if (a.key === "Escape" && s.modal.visible) {
4738
+ s.modal.visible = !1;
4739
+ const l = s.modal.parent;
4740
+ l && Fe().then(() => {
4741
+ const u = l.dataset.rowindex, c = l.dataset.colindex, d = document.querySelectorAll(`[data-rowindex='${u}'][data-colindex='${c}']`);
4742
+ d && d[0].focus();
4743
+ });
4744
+ }
4745
+ }), (a, l) => (x(), A("table", {
4746
+ class: "atable",
4747
+ style: ie({ width: k(s).config.fullWidth ? "100%" : "auto" })
4748
+ }, [
4749
+ me(a.$slots, "header", { data: k(s) }, () => [
4750
+ at(Hc, {
4751
+ columns: k(s).columns,
4752
+ config: k(s).config,
4753
+ tableid: k(s).id
4754
+ }, null, 8, ["columns", "config", "tableid"])
4755
+ ], !0),
4756
+ T("tbody", null, [
4757
+ me(a.$slots, "body", { data: k(s) }, () => [
4758
+ (x(!0), A(Oe, null, Pe(k(s).rows, (u, c) => (x(), Se(Rc, {
4759
+ key: u.id || k(mr)(),
4760
+ row: u,
4761
+ rowIndex: c,
4762
+ tableid: k(s).id
4763
+ }, {
4764
+ default: it(() => [
4765
+ (x(!0), A(Oe, null, Pe(k(s).columns, (d, f) => (x(), Se(xc, {
4766
+ key: `${f}:${c}`,
4767
+ tableid: k(s).id,
4768
+ col: d,
4769
+ spellcheck: "false",
4770
+ rowIndex: c,
4771
+ colIndex: f + (k(s).zeroColumn ? 0 : -1),
4772
+ component: d.cellComponent,
4773
+ style: ie({
4774
+ textAlign: (d == null ? void 0 : d.align) || "center",
4775
+ minWidth: (d == null ? void 0 : d.width) || "40ch",
4776
+ width: k(s).config.fullWidth ? "auto" : null
4777
+ })
4778
+ }, null, 8, ["tableid", "col", "rowIndex", "colIndex", "component", "style"]))), 128))
4779
+ ]),
4780
+ _: 2
4781
+ }, 1032, ["row", "rowIndex", "tableid"]))), 128))
4782
+ ], !0)
4783
+ ]),
4784
+ me(a.$slots, "footer", { data: k(s) }, void 0, !0),
4785
+ me(a.$slots, "modal", { data: k(s) }, () => [
4786
+ lt(at(Fc, {
4787
+ colIndex: k(s).modal.colIndex,
4788
+ rowIndex: k(s).modal.rowIndex,
4789
+ tableid: k(s).id,
4790
+ style: ie({
4791
+ left: k(s).modal.left + "px",
4792
+ top: k(s).modal.top + "px",
4793
+ maxWidth: k(s).modal.width + "px"
4794
+ })
4795
+ }, {
4796
+ default: it(() => [
4797
+ (x(), Se(Bt(k(s).modal.component), Ut({
4798
+ key: `${k(s).modal.rowIndex}:${k(s).modal.colIndex}`,
4799
+ colIndex: k(s).modal.colIndex,
4800
+ rowIndex: k(s).modal.rowIndex,
4801
+ tableid: k(s).id
4802
+ }, k(s).modal.componentProps), null, 16, ["colIndex", "rowIndex", "tableid"]))
4803
+ ]),
4804
+ _: 1
4805
+ }, 8, ["colIndex", "rowIndex", "tableid", "style"]), [
4806
+ [jt, k(s).modal.visible]
4807
+ ])
4808
+ ], !0)
4809
+ ], 4));
4810
+ }
4811
+ }), zc = /* @__PURE__ */ qe(Gc, [["__scopeId", "data-v-819abcc5"]]), Qc = /* @__PURE__ */ q({
4812
+ __name: "Records",
4813
+ setup(e) {
4814
+ const { stonecrop: t, isReady: n } = No(), o = { view: "list" };
4815
+ return (r, s) => k(n) ? (x(), Se(k(zc), {
4816
+ key: 0,
4817
+ columns: k(t).schema.schema.toArray(),
4818
+ rows: k(t).store.records,
4819
+ config: o
4820
+ }, null, 8, ["columns", "rows"])) : ke("", !0);
4821
+ }
4822
+ }), vr = (e) => (lo("data-v-18bfde6e"), e = e(), uo(), e), qc = { class: "tabs" }, Kc = { tabindex: "0" }, Jc = {
4823
+ version: "1.1",
4824
+ id: "Capa_1",
4825
+ xmlns: "http://www.w3.org/2000/svg",
4826
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
4827
+ x: "0px",
4828
+ y: "0px",
4829
+ viewBox: "0 0 424.098 424.098",
4830
+ style: { "enable-background": "new 0 0 424.098 424.098" },
4831
+ "xml:space": "preserve"
4832
+ }, Yc = /* @__PURE__ */ vr(() => /* @__PURE__ */ T("g", null, [
4833
+ /* @__PURE__ */ T("path", {
4834
+ style: { fill: "#010002" },
4835
+ d: `M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114
4836
+ c-3.284-0.008-6.243-1.992-7.495-5.023c-1.252-3.04-0.553-6.527,1.764-8.852L206.104,24.546c1.853-1.845,4.503-2.666,7.047-2.276
4837
+ c2.414,0.39,4.511,1.845,5.731,3.942l47.43,47.43V58.499c0-4.487,3.633-8.129,8.129-8.129h47.755c4.495,0,8.129,3.642,8.129,8.129
4838
+ v79.156l91.39,91.398c2.325,2.325,3.024,5.828,1.764,8.868c-1.26,3.032-4.227,5.007-7.511,5.007c-0.008,0-0.008,0-0.016,0
4839
+ l-56.64-0.114v150.98C359.32,398.29,355.686,401.923,351.191,401.923z M81.03,385.666h262.033V234.67
4840
+ c0-2.162,0.854-4.235,2.39-5.755c1.528-1.52,3.585-2.374,5.739-2.374c0.008,0,0.008,0,0.016,0l45.105,0.089l-79.855-79.863
4841
+ c-1.528-1.528-2.382-3.593-2.382-5.747V66.628h-31.498v26.645c0,3.284-1.975,6.251-5.015,7.511
4842
+ c-3.032,1.268-6.527,0.569-8.86-1.764l-57.038-57.038l-183.95,183.95l45.203,0.089c4.487,0.008,8.112,3.642,8.112,8.129
4843
+ C81.03,234.149,81.03,385.666,81.03,385.666z`
4844
+ })
4845
+ ], -1)), Xc = [
4846
+ Yc
4847
+ ], Zc = { tabindex: "0" }, el = { style: { width: "11pt" } }, tl = /* @__PURE__ */ vr(() => /* @__PURE__ */ T("g", { transform: "matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)" }, [
4848
+ /* @__PURE__ */ T("path", {
4849
+ d: "M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",
4850
+ style: { fill: "#000000", "fill-opacity": "1", "fill-rule": "nonzero", stroke: "none" },
4851
+ id: "path2"
4852
+ })
4853
+ ], -1)), nl = [
4854
+ tl
4855
+ ], ol = /* @__PURE__ */ q({
4856
+ __name: "SheetNav",
4857
+ props: {
4858
+ breadcrumbs: {}
4859
+ },
4860
+ setup(e) {
4861
+ const t = e, n = V([]), o = V(!0), r = V(!1), s = V(""), i = V(null), a = B(() => o.value ? "unrotated" : "rotated");
4862
+ Lt(() => {
4863
+ n.value = t.breadcrumbs || [];
4864
+ });
4865
+ const l = () => {
4866
+ o.value = !o.value;
4867
+ }, u = async () => {
4868
+ r.value = !r.value, await Fe(() => {
4869
+ i.value.focus();
4870
+ });
4871
+ }, c = (p) => {
4872
+ p.preventDefault(), p.stopPropagation();
4873
+ }, d = async (p) => {
4874
+ p.preventDefault(), p.stopPropagation(), await u();
4875
+ }, f = () => {
4876
+ };
4877
+ return (p, v) => {
4878
+ const m = Ir("router-link");
4879
+ return x(), A("footer", null, [
4880
+ T("ul", qc, [
4881
+ T("li", {
4882
+ class: "hidebreadcrumbs",
4883
+ onClick: l,
4884
+ onKeydown: Ye(l, ["enter"])
4885
+ }, [
4886
+ T("a", Kc, [
4887
+ T("div", {
4888
+ class: co(a.value)
4889
+ }, "×", 2)
4890
+ ])
4891
+ ], 32),
4892
+ T("li", {
4893
+ class: "hometab",
4894
+ onClick: f,
4895
+ onKeydown: Ye(f, ["enter"]),
4896
+ style: ie({ display: o.value ? "block" : "none" })
4897
+ }, [
4898
+ at(m, {
4899
+ to: "/home",
4900
+ tabindex: "0"
4901
+ }, {
4902
+ default: it(() => [
4903
+ (x(), A("svg", Jc, Xc))
4904
+ ]),
4905
+ _: 1
4906
+ })
4907
+ ], 36),
4908
+ T("li", {
4909
+ class: "searchtab",
4910
+ onClick: u,
4911
+ onKeydown: Ye(u, ["enter"]),
4912
+ style: ie({ display: o.value ? "block" : "none" })
4913
+ }, [
4914
+ T("a", Zc, [
4915
+ T("span", {
4916
+ style: ie({ display: r.value ? "none" : "block" })
4917
+ }, [
4918
+ (x(), A("svg", el, nl))
4919
+ ], 4),
4920
+ lt(T("input", {
4921
+ "onUpdate:modelValue": v[0] || (v[0] = (w) => s.value = w),
4922
+ ref_key: "searchinput",
4923
+ ref: i,
4924
+ style: ie({ display: r.value ? "block" : "none" }),
4925
+ onClick: v[1] || (v[1] = (w) => c(w)),
4926
+ onInput: v[2] || (v[2] = (w) => c(w)),
4927
+ onBlur: v[3] || (v[3] = (w) => d(w)),
4928
+ onKeydown: v[4] || (v[4] = Ye((w) => d(w), ["enter"])),
4929
+ type: "text"
4930
+ }, null, 36), [
4931
+ [Or, s.value]
4932
+ ])
4933
+ ])
4934
+ ], 36),
4935
+ (x(!0), A(Oe, null, Pe(n.value, (w, I) => (x(), A("li", {
4936
+ key: I,
4937
+ style: ie({ display: o.value ? "block" : "none" })
4938
+ }, [
4939
+ at(m, {
4940
+ tabindex: "0",
4941
+ to: w.to
4942
+ }, {
4943
+ default: it(() => [
4944
+ go(ce(w.title), 1)
4945
+ ]),
4946
+ _: 2
4947
+ }, 1032, ["to"])
4948
+ ], 4))), 128))
4949
+ ])
4950
+ ]);
4951
+ };
4952
+ }
4953
+ });
4954
+ const rl = /* @__PURE__ */ Gt(ol, [["__scopeId", "data-v-18bfde6e"]]), al = {
4955
+ install: (e) => {
4956
+ e.component("ActionSet", Ur), e.component("CommandPalette", Fr), e.component("Doctype", uc), e.component("Records", Qc), e.component("SheetNav", rl);
4957
+ }
4958
+ };
4959
+ export {
4960
+ Ur as ActionSet,
4961
+ Fr as CommandPalette,
4962
+ uc as Doctype,
4963
+ Qc as Records,
4964
+ rl as SheetNav,
4965
+ al as StonecropDesktop
4966
+ };
4967
+ //# sourceMappingURL=desktop.js.map