@stonecrop/stonecrop 0.2.35 → 0.2.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stonecrop.js CHANGED
@@ -1,12 +1,12 @@
1
- var pr = Object.defineProperty;
2
- var mr = (e, t, n) => t in e ? pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var V = (e, t, n) => mr(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { effectScope as gn, ref as oe, markRaw as ue, toRaw as Fe, watch as Te, unref as le, hasInjectionContext as gr, inject as de, getCurrentInstance as Et, reactive as vn, isRef as Ie, isReactive as bt, toRef as Ye, nextTick as it, computed as z, getCurrentScope as vr, onScopeDispose as yr, toRefs as xt, onBeforeMount as _r, shallowRef as Er, shallowReactive as br, defineComponent as yn, h as _n, provide as Xe, watchEffect as wr } from "vue";
5
- function at(e) {
1
+ var vr = Object.defineProperty;
2
+ var yr = (e, t, n) => t in e ? vr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var x = (e, t, n) => yr(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { effectScope as _n, ref as oe, markRaw as le, toRaw as Ce, watch as Me, unref as fe, hasInjectionContext as _r, inject as pe, getCurrentInstance as bt, reactive as En, isRef as Ae, isReactive as wt, toRef as Xe, nextTick as ct, computed as z, getCurrentScope as Er, onScopeDispose as br, toRefs as jt, onBeforeMount as wr, shallowRef as Sr, shallowReactive as Or, defineComponent as bn, h as wn, provide as Ze, watchEffect as Nr } from "vue";
5
+ function ut(e) {
6
6
  this.message = e || "";
7
7
  }
8
- at.prototype = Object.create(Error.prototype, {
9
- constructor: { value: at },
8
+ ut.prototype = Object.create(Error.prototype, {
9
+ constructor: { value: ut },
10
10
  name: { value: "NotImplemented" },
11
11
  stack: {
12
12
  get: function() {
@@ -14,7 +14,7 @@ at.prototype = Object.create(Error.prototype, {
14
14
  }
15
15
  }
16
16
  });
17
- const _e = class _e {
17
+ const we = class we {
18
18
  /**
19
19
  * @constructor
20
20
  * @param {Registry} registry - The immutable registry
@@ -36,7 +36,7 @@ const _e = class _e {
36
36
  * @example
37
37
  * 'Stonecrop'
38
38
  */
39
- V(this, "name", "Stonecrop");
39
+ x(this, "name", "Stonecrop");
40
40
  /**
41
41
  * @property {Registry} registry
42
42
  * @description The registry is an immutable collection of doctypes
@@ -55,7 +55,7 @@ const _e = class _e {
55
55
  * @see {@link Registry}
56
56
  * @see {@link DoctypeMeta}
57
57
  */
58
- V(this, "registry");
58
+ x(this, "registry");
59
59
  /**
60
60
  * @property {Schema} schema - The Stonecrop schema
61
61
  * @description The schema is a subset of the registry
@@ -72,25 +72,25 @@ const _e = class _e {
72
72
  * @see {@link DoctypeMeta}
73
73
  * @see {@link DoctypeMeta.schema}
74
74
  */
75
- V(this, "schema");
75
+ x(this, "schema");
76
76
  /**
77
77
  * @property {ImmutableDoctype['workflow']} workflow
78
78
  * @description The workflow is a subset of the registry
79
79
  */
80
- V(this, "workflow");
80
+ x(this, "workflow");
81
81
  /**
82
82
  * @property {ImmutableDoctype['actions']} actions
83
83
  * @description The actions are a subset of the registry
84
84
  */
85
- V(this, "actions");
85
+ x(this, "actions");
86
86
  /**
87
87
  * @property {ReturnType<typeof useDataStore>} store
88
88
  * @description The Pinia store that manages the mutable records
89
89
  */
90
- V(this, "store");
91
- if (_e._root)
92
- return _e._root;
93
- _e._root = this, this.registry = t, this.store = n, this.schema = r, this.workflow = o, this.actions = s;
90
+ x(this, "store");
91
+ if (we._root)
92
+ return we._root;
93
+ we._root = this, this.registry = t, this.store = n, this.schema = r, this.workflow = o, this.actions = s;
94
94
  }
95
95
  /**
96
96
  * @method setup
@@ -116,7 +116,7 @@ const _e = class _e {
116
116
  * const meta = stonecrop.getMeta(doctype)
117
117
  */
118
118
  getMeta(t) {
119
- return this.registry.getMeta ? this.registry.getMeta(t.doctype) : new at(t.doctype);
119
+ return this.registry.getMeta ? this.registry.getMeta(t.doctype) : new ut(t.doctype);
120
120
  }
121
121
  /**
122
122
  * @method getWorkflow
@@ -209,35 +209,35 @@ const _e = class _e {
209
209
  * @property {Stonecrop} _root
210
210
  * @description The root Stonecrop instance
211
211
  */
212
- V(_e, "_root");
213
- let ct = _e;
214
- var En = !1;
215
- function Ve(e, t, n) {
212
+ x(we, "_root");
213
+ let lt = we;
214
+ var Sn = !1;
215
+ function je(e, t, n) {
216
216
  return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
217
217
  }
218
- function Ze(e, t) {
218
+ function et(e, t) {
219
219
  if (Array.isArray(e)) {
220
220
  e.splice(t, 1);
221
221
  return;
222
222
  }
223
223
  delete e[t];
224
224
  }
225
- function Sr() {
226
- return bn().__VUE_DEVTOOLS_GLOBAL_HOOK__;
225
+ function kr() {
226
+ return On().__VUE_DEVTOOLS_GLOBAL_HOOK__;
227
227
  }
228
- function bn() {
229
- return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {};
228
+ function On() {
229
+ return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
230
230
  }
231
- const Or = typeof Proxy == "function", kr = "devtools-plugin:setup", Nr = "plugin:settings:set";
232
- let me, ut;
233
- function Pr() {
231
+ const Pr = typeof Proxy == "function", $r = "devtools-plugin:setup", Rr = "plugin:settings:set";
232
+ let ye, ft;
233
+ function Ir() {
234
234
  var e;
235
- return me !== void 0 || (typeof window < "u" && window.performance ? (me = !0, ut = window.performance) : typeof global < "u" && (!((e = global.perf_hooks) === null || e === void 0) && e.performance) ? (me = !0, ut = global.perf_hooks.performance) : me = !1), me;
235
+ return ye !== void 0 || (typeof window < "u" && window.performance ? (ye = !0, ft = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ye = !0, ft = globalThis.perf_hooks.performance) : ye = !1), ye;
236
236
  }
237
- function $r() {
238
- return Pr() ? ut.now() : Date.now();
237
+ function Cr() {
238
+ return Ir() ? ft.now() : Date.now();
239
239
  }
240
- class Rr {
240
+ class Ar {
241
241
  constructor(t, n) {
242
242
  this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
243
243
  const r = {};
@@ -265,9 +265,9 @@ class Rr {
265
265
  s = i;
266
266
  },
267
267
  now() {
268
- return $r();
268
+ return Cr();
269
269
  }
270
- }, n && n.on(Nr, (i, a) => {
270
+ }, n && n.on(Rr, (i, a) => {
271
271
  i === this.plugin.id && this.fallbacks.setSettings(a);
272
272
  }), this.proxiedOn = new Proxy({}, {
273
273
  get: (i, a) => this.target ? this.target.on[a] : (...c) => {
@@ -299,12 +299,12 @@ class Rr {
299
299
  n.resolve(await this.target[n.method](...n.args));
300
300
  }
301
301
  }
302
- function wt(e, t) {
303
- const n = e, r = bn(), o = Sr(), s = Or && n.enableEarlyProxy;
302
+ function St(e, t) {
303
+ const n = e, r = On(), o = kr(), s = Pr && n.enableEarlyProxy;
304
304
  if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
305
- o.emit(kr, e, t);
305
+ o.emit($r, e, t);
306
306
  else {
307
- const i = s ? new Rr(n, o) : null;
307
+ const i = s ? new Ar(n, o) : null;
308
308
  (r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
309
309
  pluginDescriptor: n,
310
310
  setupFn: t,
@@ -313,35 +313,35 @@ function wt(e, t) {
313
313
  }
314
314
  }
315
315
  /*!
316
- * pinia v2.1.7
317
- * (c) 2023 Eduardo San Martin Morote
316
+ * pinia v2.2.2
317
+ * (c) 2024 Eduardo San Martin Morote
318
318
  * @license MIT
319
319
  */
320
- let Ne;
321
- const Ce = (e) => Ne = e, wn = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
320
+ let $e;
321
+ const Te = (e) => $e = e, Nn = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
322
322
  /* istanbul ignore next */
323
323
  Symbol()
324
324
  );
325
- function he(e) {
325
+ function me(e) {
326
326
  return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
327
327
  }
328
- var Q;
328
+ var K;
329
329
  (function(e) {
330
330
  e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
331
- })(Q || (Q = {}));
332
- const Ge = typeof window < "u", Pe = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Ge, jt = 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 };
333
- function Ir(e, { autoBom: t = !1 } = {}) {
331
+ })(K || (K = {}));
332
+ const de = typeof window < "u", Lt = 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 };
333
+ function Tr(e, { autoBom: t = !1 } = {}) {
334
334
  return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
335
335
  }
336
- function St(e, t, n) {
336
+ function Ot(e, t, n) {
337
337
  const r = new XMLHttpRequest();
338
338
  r.open("GET", e), r.responseType = "blob", r.onload = function() {
339
- kn(r.response, t, n);
339
+ $n(r.response, t, n);
340
340
  }, r.onerror = function() {
341
341
  console.error("could not download file");
342
342
  }, r.send();
343
343
  }
344
- function Sn(e) {
344
+ function kn(e) {
345
345
  const t = new XMLHttpRequest();
346
346
  t.open("HEAD", e, !1);
347
347
  try {
@@ -350,7 +350,7 @@ function Sn(e) {
350
350
  }
351
351
  return t.status >= 200 && t.status <= 299;
352
352
  }
353
- function je(e) {
353
+ function Be(e) {
354
354
  try {
355
355
  e.dispatchEvent(new MouseEvent("click"));
356
356
  } catch {
@@ -358,43 +358,43 @@ function je(e) {
358
358
  n.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(n);
359
359
  }
360
360
  }
361
- const Le = typeof navigator == "object" ? navigator : { userAgent: "" }, On = /Macintosh/.test(Le.userAgent) && /AppleWebKit/.test(Le.userAgent) && !/Safari/.test(Le.userAgent), kn = Ge ? (
361
+ const Ue = typeof navigator == "object" ? navigator : { userAgent: "" }, Pn = /Macintosh/.test(Ue.userAgent) && /AppleWebKit/.test(Ue.userAgent) && !/Safari/.test(Ue.userAgent), $n = de ? (
362
362
  // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
363
- typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !On ? Cr : (
363
+ typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Pn ? Dr : (
364
364
  // Use msSaveOrOpenBlob as a second approach
365
- "msSaveOrOpenBlob" in Le ? Ar : (
365
+ "msSaveOrOpenBlob" in Ue ? Mr : (
366
366
  // Fallback to using FileReader and a popup
367
- Tr
367
+ Vr
368
368
  )
369
369
  )
370
370
  ) : () => {
371
371
  };
372
- function Cr(e, t = "download", n) {
372
+ function Dr(e, t = "download", n) {
373
373
  const r = document.createElement("a");
374
- r.download = t, r.rel = "noopener", typeof e == "string" ? (r.href = e, r.origin !== location.origin ? Sn(r.href) ? St(e, t, n) : (r.target = "_blank", je(r)) : je(r)) : (r.href = URL.createObjectURL(e), setTimeout(function() {
374
+ r.download = t, r.rel = "noopener", typeof e == "string" ? (r.href = e, r.origin !== location.origin ? kn(r.href) ? Ot(e, t, n) : (r.target = "_blank", Be(r)) : Be(r)) : (r.href = URL.createObjectURL(e), setTimeout(function() {
375
375
  URL.revokeObjectURL(r.href);
376
376
  }, 4e4), setTimeout(function() {
377
- je(r);
377
+ Be(r);
378
378
  }, 0));
379
379
  }
380
- function Ar(e, t = "download", n) {
380
+ function Mr(e, t = "download", n) {
381
381
  if (typeof e == "string")
382
- if (Sn(e))
383
- St(e, t, n);
382
+ if (kn(e))
383
+ Ot(e, t, n);
384
384
  else {
385
385
  const r = document.createElement("a");
386
386
  r.href = e, r.target = "_blank", setTimeout(function() {
387
- je(r);
387
+ Be(r);
388
388
  });
389
389
  }
390
390
  else
391
- navigator.msSaveOrOpenBlob(Ir(e, n), t);
391
+ navigator.msSaveOrOpenBlob(Tr(e, n), t);
392
392
  }
393
- function Tr(e, t, n, r) {
393
+ function Vr(e, t, n, r) {
394
394
  if (r = r || open("", "_blank"), r && (r.document.title = r.document.body.innerText = "downloading..."), typeof e == "string")
395
- return St(e, t, n);
396
- const o = e.type === "application/octet-stream", s = /constructor/i.test(String(jt.HTMLElement)) || "safari" in jt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
397
- if ((i || o && s || On) && typeof FileReader < "u") {
395
+ return Ot(e, t, n);
396
+ const o = e.type === "application/octet-stream", s = /constructor/i.test(String(Lt.HTMLElement)) || "safari" in Lt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
397
+ if ((i || o && s || Pn) && typeof FileReader < "u") {
398
398
  const a = new FileReader();
399
399
  a.onloadend = function() {
400
400
  let c = a.result;
@@ -409,51 +409,51 @@ function Tr(e, t, n, r) {
409
409
  }, 4e4);
410
410
  }
411
411
  }
412
- function x(e, t) {
412
+ function j(e, t) {
413
413
  const n = "🍍 " + e;
414
414
  typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(n, t) : t === "error" ? console.error(n) : t === "warn" ? console.warn(n) : console.log(n);
415
415
  }
416
- function Ot(e) {
416
+ function Nt(e) {
417
417
  return "_a" in e && "install" in e;
418
418
  }
419
- function Nn() {
419
+ function Rn() {
420
420
  if (!("clipboard" in navigator))
421
- return x("Your browser doesn't support the Clipboard API", "error"), !0;
421
+ return j("Your browser doesn't support the Clipboard API", "error"), !0;
422
422
  }
423
- function Pn(e) {
424
- return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (x('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
423
+ function In(e) {
424
+ return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (j('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
425
425
  }
426
- async function Dr(e) {
427
- if (!Nn())
426
+ async function xr(e) {
427
+ if (!Rn())
428
428
  try {
429
- await navigator.clipboard.writeText(JSON.stringify(e.state.value)), x("Global state copied to clipboard.");
429
+ await navigator.clipboard.writeText(JSON.stringify(e.state.value)), j("Global state copied to clipboard.");
430
430
  } catch (t) {
431
- if (Pn(t))
431
+ if (In(t))
432
432
  return;
433
- x("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
433
+ j("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
434
434
  }
435
435
  }
436
- async function Mr(e) {
437
- if (!Nn())
436
+ async function jr(e) {
437
+ if (!Rn())
438
438
  try {
439
- $n(e, JSON.parse(await navigator.clipboard.readText())), x("Global state pasted from clipboard.");
439
+ Cn(e, JSON.parse(await navigator.clipboard.readText())), j("Global state pasted from clipboard.");
440
440
  } catch (t) {
441
- if (Pn(t))
441
+ if (In(t))
442
442
  return;
443
- x("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
443
+ j("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
444
444
  }
445
445
  }
446
- async function Vr(e) {
446
+ async function Lr(e) {
447
447
  try {
448
- kn(new Blob([JSON.stringify(e.state.value)], {
448
+ $n(new Blob([JSON.stringify(e.state.value)], {
449
449
  type: "text/plain;charset=utf-8"
450
450
  }), "pinia-state.json");
451
451
  } catch (t) {
452
- x("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
452
+ j("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
453
453
  }
454
454
  }
455
455
  let Y;
456
- function xr() {
456
+ function Br() {
457
457
  Y || (Y = document.createElement("input"), Y.type = "file", Y.accept = ".json");
458
458
  function e() {
459
459
  return new Promise((t, n) => {
@@ -468,18 +468,18 @@ function xr() {
468
468
  }
469
469
  return e;
470
470
  }
471
- async function jr(e) {
471
+ async function Ur(e) {
472
472
  try {
473
- const n = await xr()();
473
+ const n = await Br()();
474
474
  if (!n)
475
475
  return;
476
476
  const { text: r, file: o } = n;
477
- $n(e, JSON.parse(r)), x(`Global state imported from "${o.name}".`);
477
+ Cn(e, JSON.parse(r)), j(`Global state imported from "${o.name}".`);
478
478
  } catch (t) {
479
- x("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
479
+ j("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
480
480
  }
481
481
  }
482
- function $n(e, t) {
482
+ function Cn(e, t) {
483
483
  for (const n in t) {
484
484
  const r = e.state.value[n];
485
485
  r ? Object.assign(r, t[n]) : e.state.value[n] = t[n];
@@ -492,18 +492,18 @@ function J(e) {
492
492
  }
493
493
  };
494
494
  }
495
- const Rn = "🍍 Pinia (root)", lt = "_root";
496
- function Lr(e) {
497
- return Ot(e) ? {
498
- id: lt,
499
- label: Rn
495
+ const An = "🍍 Pinia (root)", Fe = "_root";
496
+ function Fr(e) {
497
+ return Nt(e) ? {
498
+ id: Fe,
499
+ label: An
500
500
  } : {
501
501
  id: e.$id,
502
502
  label: e.$id
503
503
  };
504
504
  }
505
- function Br(e) {
506
- if (Ot(e)) {
505
+ function Hr(e) {
506
+ if (Nt(e)) {
507
507
  const n = Array.from(e._s.keys()), r = e._s;
508
508
  return {
509
509
  state: n.map((s) => ({
@@ -538,7 +538,7 @@ function Br(e) {
538
538
  value: e[n]
539
539
  }))), t;
540
540
  }
541
- function Ur(e) {
541
+ function Gr(e) {
542
542
  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), {
543
543
  oldValue: {},
544
544
  keys: [],
@@ -551,36 +551,36 @@ function Ur(e) {
551
551
  newValue: e.newValue
552
552
  } : {};
553
553
  }
554
- function Hr(e) {
554
+ function Wr(e) {
555
555
  switch (e) {
556
- case Q.direct:
556
+ case K.direct:
557
557
  return "mutation";
558
- case Q.patchFunction:
558
+ case K.patchFunction:
559
559
  return "$patch";
560
- case Q.patchObject:
560
+ case K.patchObject:
561
561
  return "$patch";
562
562
  default:
563
563
  return "unknown";
564
564
  }
565
565
  }
566
- let ve = !0;
567
- const Be = [], ce = "pinia:mutations", B = "pinia", { assign: Fr } = Object, Ue = (e) => "🍍 " + e;
568
- function Gr(e, t) {
569
- wt({
566
+ let Ee = !0;
567
+ const He = [], ue = "pinia:mutations", L = "pinia", { assign: zr } = Object, Ge = (e) => "🍍 " + e;
568
+ function qr(e, t) {
569
+ St({
570
570
  id: "dev.esm.pinia",
571
571
  label: "Pinia 🍍",
572
572
  logo: "https://pinia.vuejs.org/logo.svg",
573
573
  packageName: "pinia",
574
574
  homepage: "https://pinia.vuejs.org",
575
- componentStateTypes: Be,
575
+ componentStateTypes: He,
576
576
  app: e
577
577
  }, (n) => {
578
- typeof n.now != "function" && x("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({
579
- id: ce,
578
+ typeof n.now != "function" && j("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({
579
+ id: ue,
580
580
  label: "Pinia 🍍",
581
581
  color: 15064968
582
582
  }), n.addInspector({
583
- id: B,
583
+ id: L,
584
584
  label: "Pinia 🍍",
585
585
  icon: "storage",
586
586
  treeFilterPlaceholder: "Search stores",
@@ -588,28 +588,28 @@ function Gr(e, t) {
588
588
  {
589
589
  icon: "content_copy",
590
590
  action: () => {
591
- Dr(t);
591
+ xr(t);
592
592
  },
593
593
  tooltip: "Serialize and copy the state"
594
594
  },
595
595
  {
596
596
  icon: "content_paste",
597
597
  action: async () => {
598
- await Mr(t), n.sendInspectorTree(B), n.sendInspectorState(B);
598
+ await jr(t), n.sendInspectorTree(L), n.sendInspectorState(L);
599
599
  },
600
600
  tooltip: "Replace the state with the content of your clipboard"
601
601
  },
602
602
  {
603
603
  icon: "save",
604
604
  action: () => {
605
- Vr(t);
605
+ Lr(t);
606
606
  },
607
607
  tooltip: "Save the state as a JSON file"
608
608
  },
609
609
  {
610
610
  icon: "folder_open",
611
611
  action: async () => {
612
- await jr(t), n.sendInspectorTree(B), n.sendInspectorState(B);
612
+ await Ur(t), n.sendInspectorTree(L), n.sendInspectorState(L);
613
613
  },
614
614
  tooltip: "Import the state from a JSON file"
615
615
  }
@@ -620,7 +620,7 @@ function Gr(e, t) {
620
620
  tooltip: 'Reset the state (with "$reset")',
621
621
  action: (r) => {
622
622
  const o = t._s.get(r);
623
- o ? typeof o.$reset != "function" ? x(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`, "warn") : (o.$reset(), x(`Store "${r}" reset.`)) : x(`Cannot reset "${r}" store because it wasn't found.`, "warn");
623
+ o ? typeof o.$reset != "function" ? j(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`, "warn") : (o.$reset(), j(`Store "${r}" reset.`)) : j(`Cannot reset "${r}" store because it wasn't found.`, "warn");
624
624
  }
625
625
  }
626
626
  ]
@@ -630,12 +630,12 @@ function Gr(e, t) {
630
630
  const i = r.componentInstance.proxy._pStores;
631
631
  Object.values(i).forEach((a) => {
632
632
  r.instanceData.state.push({
633
- type: Ue(a.$id),
633
+ type: Ge(a.$id),
634
634
  key: "state",
635
635
  editable: !0,
636
636
  value: a._isOptionsAPI ? {
637
637
  _custom: {
638
- value: Fe(a.$state),
638
+ value: Ce(a.$state),
639
639
  actions: [
640
640
  {
641
641
  icon: "restore",
@@ -649,7 +649,7 @@ function Gr(e, t) {
649
649
  Object.keys(a.$state).reduce((c, u) => (c[u] = a.$state[u], c), {})
650
650
  )
651
651
  }), a._getters && a._getters.length && r.instanceData.state.push({
652
- type: Ue(a.$id),
652
+ type: Ge(a.$id),
653
653
  key: "getters",
654
654
  editable: !1,
655
655
  value: a._getters.reduce((c, u) => {
@@ -664,48 +664,48 @@ function Gr(e, t) {
664
664
  });
665
665
  }
666
666
  }), n.on.getInspectorTree((r) => {
667
- if (r.app === e && r.inspectorId === B) {
667
+ if (r.app === e && r.inspectorId === L) {
668
668
  let o = [t];
669
- o = o.concat(Array.from(t._s.values())), r.rootNodes = (r.filter ? o.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(r.filter.toLowerCase()) : Rn.toLowerCase().includes(r.filter.toLowerCase())) : o).map(Lr);
669
+ o = o.concat(Array.from(t._s.values())), r.rootNodes = (r.filter ? o.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(r.filter.toLowerCase()) : An.toLowerCase().includes(r.filter.toLowerCase())) : o).map(Fr);
670
670
  }
671
- }), n.on.getInspectorState((r) => {
672
- if (r.app === e && r.inspectorId === B) {
673
- const o = r.nodeId === lt ? t : t._s.get(r.nodeId);
671
+ }), globalThis.$pinia = t, n.on.getInspectorState((r) => {
672
+ if (r.app === e && r.inspectorId === L) {
673
+ const o = r.nodeId === Fe ? t : t._s.get(r.nodeId);
674
674
  if (!o)
675
675
  return;
676
- o && (r.state = Br(o));
676
+ o && (r.nodeId !== Fe && (globalThis.$store = Ce(o)), r.state = Hr(o));
677
677
  }
678
678
  }), n.on.editInspectorState((r, o) => {
679
- if (r.app === e && r.inspectorId === B) {
680
- const s = r.nodeId === lt ? t : t._s.get(r.nodeId);
679
+ if (r.app === e && r.inspectorId === L) {
680
+ const s = r.nodeId === Fe ? t : t._s.get(r.nodeId);
681
681
  if (!s)
682
- return x(`store "${r.nodeId}" not found`, "error");
682
+ return j(`store "${r.nodeId}" not found`, "error");
683
683
  const { path: i } = r;
684
- Ot(s) ? i.unshift("state") : (i.length !== 1 || !s._customProperties.has(i[0]) || i[0] in s.$state) && i.unshift("$state"), ve = !1, r.set(s, i, r.state.value), ve = !0;
684
+ Nt(s) ? i.unshift("state") : (i.length !== 1 || !s._customProperties.has(i[0]) || i[0] in s.$state) && i.unshift("$state"), Ee = !1, r.set(s, i, r.state.value), Ee = !0;
685
685
  }
686
686
  }), n.on.editComponentState((r) => {
687
687
  if (r.type.startsWith("🍍")) {
688
688
  const o = r.type.replace(/^🍍\s*/, ""), s = t._s.get(o);
689
689
  if (!s)
690
- return x(`store "${o}" not found`, "error");
690
+ return j(`store "${o}" not found`, "error");
691
691
  const { path: i } = r;
692
692
  if (i[0] !== "state")
693
- return x(`Invalid path for store "${o}":
693
+ return j(`Invalid path for store "${o}":
694
694
  ${i}
695
695
  Only state can be modified.`);
696
- i[0] = "$state", ve = !1, r.set(s, i, r.state.value), ve = !0;
696
+ i[0] = "$state", Ee = !1, r.set(s, i, r.state.value), Ee = !0;
697
697
  }
698
698
  });
699
699
  });
700
700
  }
701
- function Wr(e, t) {
702
- Be.includes(Ue(t.$id)) || Be.push(Ue(t.$id)), wt({
701
+ function Jr(e, t) {
702
+ He.includes(Ge(t.$id)) || He.push(Ge(t.$id)), St({
703
703
  id: "dev.esm.pinia",
704
704
  label: "Pinia 🍍",
705
705
  logo: "https://pinia.vuejs.org/logo.svg",
706
706
  packageName: "pinia",
707
707
  homepage: "https://pinia.vuejs.org",
708
- componentStateTypes: Be,
708
+ componentStateTypes: He,
709
709
  app: e,
710
710
  settings: {
711
711
  logStoreChanges: {
@@ -722,9 +722,9 @@ function Wr(e, t) {
722
722
  }, (n) => {
723
723
  const r = typeof n.now == "function" ? n.now.bind(n) : Date.now;
724
724
  t.$onAction(({ after: i, onError: a, name: c, args: u }) => {
725
- const f = In++;
725
+ const f = Tn++;
726
726
  n.addTimelineEvent({
727
- layerId: ce,
727
+ layerId: ue,
728
728
  event: {
729
729
  time: r(),
730
730
  title: "🛫 " + c,
@@ -738,7 +738,7 @@ function Wr(e, t) {
738
738
  }
739
739
  }), i((l) => {
740
740
  re = void 0, n.addTimelineEvent({
741
- layerId: ce,
741
+ layerId: ue,
742
742
  event: {
743
743
  time: r(),
744
744
  title: "🛬 " + c,
@@ -754,7 +754,7 @@ function Wr(e, t) {
754
754
  });
755
755
  }), a((l) => {
756
756
  re = void 0, n.addTimelineEvent({
757
- layerId: ce,
757
+ layerId: ue,
758
758
  event: {
759
759
  time: r(),
760
760
  logType: "error",
@@ -771,9 +771,9 @@ function Wr(e, t) {
771
771
  });
772
772
  });
773
773
  }, !0), t._customProperties.forEach((i) => {
774
- Te(() => le(t[i]), (a, c) => {
775
- n.notifyComponentUpdate(), n.sendInspectorState(B), ve && n.addTimelineEvent({
776
- layerId: ce,
774
+ Me(() => fe(t[i]), (a, c) => {
775
+ n.notifyComponentUpdate(), n.sendInspectorState(L), Ee && n.addTimelineEvent({
776
+ layerId: ue,
777
777
  event: {
778
778
  time: r(),
779
779
  title: "Change",
@@ -787,15 +787,15 @@ function Wr(e, t) {
787
787
  });
788
788
  }, { deep: !0 });
789
789
  }), t.$subscribe(({ events: i, type: a }, c) => {
790
- if (n.notifyComponentUpdate(), n.sendInspectorState(B), !ve)
790
+ if (n.notifyComponentUpdate(), n.sendInspectorState(L), !Ee)
791
791
  return;
792
792
  const u = {
793
793
  time: r(),
794
- title: Hr(a),
795
- data: Fr({ store: J(t.$id) }, Ur(i)),
794
+ title: Wr(a),
795
+ data: zr({ store: J(t.$id) }, Gr(i)),
796
796
  groupId: re
797
797
  };
798
- a === Q.patchFunction ? u.subtitle = "⤵️" : a === Q.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
798
+ a === K.patchFunction ? u.subtitle = "⤵️" : a === K.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
799
799
  _custom: {
800
800
  display: "DebuggerEvent",
801
801
  type: "object",
@@ -803,14 +803,14 @@ function Wr(e, t) {
803
803
  value: i
804
804
  }
805
805
  }), n.addTimelineEvent({
806
- layerId: ce,
806
+ layerId: ue,
807
807
  event: u
808
808
  });
809
809
  }, { detached: !0, flush: "sync" });
810
810
  const o = t._hotUpdate;
811
- t._hotUpdate = ue((i) => {
811
+ t._hotUpdate = le((i) => {
812
812
  o(i), n.addTimelineEvent({
813
- layerId: ce,
813
+ layerId: ue,
814
814
  event: {
815
815
  time: r(),
816
816
  title: "🔥 " + t.$id,
@@ -820,20 +820,20 @@ function Wr(e, t) {
820
820
  info: J("HMR update")
821
821
  }
822
822
  }
823
- }), n.notifyComponentUpdate(), n.sendInspectorTree(B), n.sendInspectorState(B);
823
+ }), n.notifyComponentUpdate(), n.sendInspectorTree(L), n.sendInspectorState(L);
824
824
  });
825
825
  const { $dispose: s } = t;
826
826
  t.$dispose = () => {
827
- s(), n.notifyComponentUpdate(), n.sendInspectorTree(B), n.sendInspectorState(B), n.getSettings().logStoreChanges && x(`Disposed "${t.$id}" store 🗑`);
828
- }, n.notifyComponentUpdate(), n.sendInspectorTree(B), n.sendInspectorState(B), n.getSettings().logStoreChanges && x(`"${t.$id}" store installed 🆕`);
827
+ s(), n.notifyComponentUpdate(), n.sendInspectorTree(L), n.sendInspectorState(L), n.getSettings().logStoreChanges && j(`Disposed "${t.$id}" store 🗑`);
828
+ }, n.notifyComponentUpdate(), n.sendInspectorTree(L), n.sendInspectorState(L), n.getSettings().logStoreChanges && j(`"${t.$id}" store installed 🆕`);
829
829
  });
830
830
  }
831
- let In = 0, re;
832
- function Lt(e, t, n) {
833
- const r = t.reduce((o, s) => (o[s] = Fe(e)[s], o), {});
831
+ let Tn = 0, re;
832
+ function Bt(e, t, n) {
833
+ const r = t.reduce((o, s) => (o[s] = Ce(e)[s], o), {});
834
834
  for (const o in r)
835
835
  e[o] = function() {
836
- const s = In, i = n ? new Proxy(e, {
836
+ const s = Tn, i = n ? new Proxy(e, {
837
837
  get(...c) {
838
838
  return re = s, Reflect.get(...c);
839
839
  },
@@ -846,28 +846,31 @@ function Lt(e, t, n) {
846
846
  return re = void 0, a;
847
847
  };
848
848
  }
849
- function zr({ app: e, store: t, options: n }) {
850
- if (t.$id.startsWith("__hot:"))
851
- return;
852
- t._isOptionsAPI = !!n.state, Lt(t, Object.keys(n.actions), t._isOptionsAPI);
853
- const r = t._hotUpdate;
854
- Fe(t)._hotUpdate = function(o) {
855
- r.apply(this, arguments), Lt(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
856
- }, Wr(
857
- e,
858
- // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
859
- t
860
- );
849
+ function Kr({ app: e, store: t, options: n }) {
850
+ if (!t.$id.startsWith("__hot:")) {
851
+ if (t._isOptionsAPI = !!n.state, !t._p._testing) {
852
+ Bt(t, Object.keys(n.actions), t._isOptionsAPI);
853
+ const r = t._hotUpdate;
854
+ Ce(t)._hotUpdate = function(o) {
855
+ r.apply(this, arguments), Bt(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
856
+ };
857
+ }
858
+ Jr(
859
+ e,
860
+ // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
861
+ t
862
+ );
863
+ }
861
864
  }
862
- function qr() {
863
- const e = gn(!0), t = e.run(() => oe({}));
865
+ function Qr() {
866
+ const e = _n(!0), t = e.run(() => oe({}));
864
867
  let n = [], r = [];
865
- const o = ue({
868
+ const o = le({
866
869
  install(s) {
867
- Ce(o), o._a = s, s.provide(wn, o), s.config.globalProperties.$pinia = o, Pe && Gr(s, o), r.forEach((i) => n.push(i)), r = [];
870
+ Te(o), o._a = s, s.provide(Nn, o), s.config.globalProperties.$pinia = o, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && de && qr(s, o), r.forEach((i) => n.push(i)), r = [];
868
871
  },
869
872
  use(s) {
870
- return !this._a && !En ? r.push(s) : n.push(s), this;
873
+ return !this._a && !Sn ? r.push(s) : n.push(s), this;
871
874
  },
872
875
  _p: n,
873
876
  // it's actually undefined here
@@ -877,173 +880,172 @@ function qr() {
877
880
  _s: /* @__PURE__ */ new Map(),
878
881
  state: t
879
882
  });
880
- return Pe && typeof Proxy < "u" && o.use(zr), o;
883
+ return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof Proxy < "u" && o.use(Kr), o;
881
884
  }
882
- function Cn(e, t) {
885
+ function Dn(e, t) {
883
886
  for (const n in t) {
884
887
  const r = t[n];
885
888
  if (!(n in e))
886
889
  continue;
887
890
  const o = e[n];
888
- he(o) && he(r) && !Ie(r) && !bt(r) ? e[n] = Cn(o, r) : e[n] = r;
891
+ me(o) && me(r) && !Ae(r) && !wt(r) ? e[n] = Dn(o, r) : e[n] = r;
889
892
  }
890
893
  return e;
891
894
  }
892
- const An = () => {
895
+ const Mn = () => {
893
896
  };
894
- function Bt(e, t, n, r = An) {
897
+ function Ut(e, t, n, r = Mn) {
895
898
  e.push(t);
896
899
  const o = () => {
897
900
  const s = e.indexOf(t);
898
901
  s > -1 && (e.splice(s, 1), r());
899
902
  };
900
- return !n && vr() && yr(o), o;
903
+ return !n && Er() && br(o), o;
901
904
  }
902
- function ge(e, ...t) {
905
+ function _e(e, ...t) {
903
906
  e.slice().forEach((n) => {
904
907
  n(...t);
905
908
  });
906
909
  }
907
- const Jr = (e) => e();
908
- function ft(e, t) {
909
- e instanceof Map && t instanceof Map && t.forEach((n, r) => e.set(r, n)), e instanceof Set && t instanceof Set && t.forEach(e.add, e);
910
+ const Yr = (e) => e(), Ft = Symbol(), tt = Symbol();
911
+ function dt(e, t) {
912
+ e instanceof Map && t instanceof Map ? t.forEach((n, r) => e.set(r, n)) : e instanceof Set && t instanceof Set && t.forEach(e.add, e);
910
913
  for (const n in t) {
911
914
  if (!t.hasOwnProperty(n))
912
915
  continue;
913
916
  const r = t[n], o = e[n];
914
- he(o) && he(r) && e.hasOwnProperty(n) && !Ie(r) && !bt(r) ? e[n] = ft(o, r) : e[n] = r;
917
+ me(o) && me(r) && e.hasOwnProperty(n) && !Ae(r) && !wt(r) ? e[n] = dt(o, r) : e[n] = r;
915
918
  }
916
919
  return e;
917
920
  }
918
- const Kr = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
921
+ const Xr = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
919
922
  /* istanbul ignore next */
920
923
  Symbol()
921
924
  );
922
- function Qr(e) {
923
- return !he(e) || !e.hasOwnProperty(Kr);
925
+ function Zr(e) {
926
+ return !me(e) || !e.hasOwnProperty(Xr);
924
927
  }
925
928
  const { assign: W } = Object;
926
- function Ut(e) {
927
- return !!(Ie(e) && e.effect);
929
+ function Ht(e) {
930
+ return !!(Ae(e) && e.effect);
928
931
  }
929
- function Ht(e, t, n, r) {
932
+ function Gt(e, t, n, r) {
930
933
  const { state: o, actions: s, getters: i } = t, a = n.state.value[e];
931
934
  let c;
932
935
  function u() {
933
936
  !a && (process.env.NODE_ENV === "production" || !r) && (n.state.value[e] = o ? o() : {});
934
937
  const f = process.env.NODE_ENV !== "production" && r ? (
935
938
  // use ref() to unwrap refs inside state TODO: check if this is still necessary
936
- xt(oe(o ? o() : {}).value)
937
- ) : xt(n.state.value[e]);
938
- return W(f, s, Object.keys(i || {}).reduce((l, d) => (process.env.NODE_ENV !== "production" && d in f && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${e}".`), l[d] = ue(z(() => {
939
- Ce(n);
939
+ jt(oe(o ? o() : {}).value)
940
+ ) : jt(n.state.value[e]);
941
+ return W(f, s, Object.keys(i || {}).reduce((l, d) => (process.env.NODE_ENV !== "production" && d in f && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${e}".`), l[d] = le(z(() => {
942
+ Te(n);
940
943
  const p = n._s.get(e);
941
944
  return i[d].call(p, p);
942
945
  })), l), {}));
943
946
  }
944
- return c = dt(e, u, t, n, r, !0), c;
947
+ return c = ht(e, u, t, n, r, !0), c;
945
948
  }
946
- function dt(e, t, n = {}, r, o, s) {
949
+ function ht(e, t, n = {}, r, o, s) {
947
950
  let i;
948
951
  const a = W({ actions: {} }, n);
949
952
  if (process.env.NODE_ENV !== "production" && !r._e.active)
950
953
  throw new Error("Pinia destroyed");
951
- const c = {
952
- deep: !0
953
- // flush: 'post',
954
- };
955
- process.env.NODE_ENV !== "production" && !En && (c.onTrigger = (E) => {
956
- u ? p = E : u == !1 && !w._hotUpdating && (Array.isArray(p) ? p.push(E) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
954
+ const c = { deep: !0 };
955
+ process.env.NODE_ENV !== "production" && !Sn && (c.onTrigger = (y) => {
956
+ u ? p = y : u == !1 && !w._hotUpdating && (Array.isArray(p) ? p.push(y) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
957
957
  });
958
958
  let u, f, l = [], d = [], p;
959
959
  const b = r.state.value[e];
960
960
  !s && !b && (process.env.NODE_ENV === "production" || !o) && (r.state.value[e] = {});
961
- const v = oe({});
962
- let S;
963
- function C(E) {
964
- let y;
965
- u = f = !1, process.env.NODE_ENV !== "production" && (p = []), typeof E == "function" ? (E(r.state.value[e]), y = {
966
- type: Q.patchFunction,
961
+ const S = oe({});
962
+ let E;
963
+ function R(y) {
964
+ let v;
965
+ u = f = !1, process.env.NODE_ENV !== "production" && (p = []), typeof y == "function" ? (y(r.state.value[e]), v = {
966
+ type: K.patchFunction,
967
967
  storeId: e,
968
968
  events: p
969
- }) : (ft(r.state.value[e], E), y = {
970
- type: Q.patchObject,
971
- payload: E,
969
+ }) : (dt(r.state.value[e], y), v = {
970
+ type: K.patchObject,
971
+ payload: y,
972
972
  storeId: e,
973
973
  events: p
974
974
  });
975
- const A = S = Symbol();
976
- it().then(() => {
977
- S === A && (u = !0);
978
- }), f = !0, ge(l, y, r.state.value[e]);
979
- }
980
- const N = s ? function() {
981
- const { state: y } = n, A = y ? y() : {};
982
- this.$patch((M) => {
983
- W(M, A);
975
+ const A = E = Symbol();
976
+ ct().then(() => {
977
+ E === A && (u = !0);
978
+ }), f = !0, _e(l, v, r.state.value[e]);
979
+ }
980
+ const k = s ? function() {
981
+ const { state: v } = n, A = v ? v() : {};
982
+ this.$patch((V) => {
983
+ W(V, A);
984
984
  });
985
985
  } : (
986
986
  /* istanbul ignore next */
987
987
  process.env.NODE_ENV !== "production" ? () => {
988
988
  throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
989
- } : An
989
+ } : Mn
990
990
  );
991
991
  function P() {
992
992
  i.stop(), l = [], d = [], r._s.delete(e);
993
993
  }
994
- function j(E, y) {
995
- return function() {
996
- Ce(r);
997
- const A = Array.from(arguments), M = [], ie = [];
998
- function Se(L) {
999
- M.push(L);
994
+ const M = (y, v = "") => {
995
+ if (Ft in y)
996
+ return y[tt] = v, y;
997
+ const A = function() {
998
+ Te(r);
999
+ const V = Array.from(arguments), ie = [], ae = [];
1000
+ function Ve(F) {
1001
+ ie.push(F);
1000
1002
  }
1001
- function De(L) {
1002
- ie.push(L);
1003
+ function ge(F) {
1004
+ ae.push(F);
1003
1005
  }
1004
- ge(d, {
1005
- args: A,
1006
- name: E,
1006
+ _e(d, {
1007
+ args: V,
1008
+ name: A[tt],
1007
1009
  store: w,
1008
- after: Se,
1009
- onError: De
1010
+ after: Ve,
1011
+ onError: ge
1010
1012
  });
1011
- let K;
1013
+ let Q;
1012
1014
  try {
1013
- K = y.apply(this && this.$id === e ? this : w, A);
1014
- } catch (L) {
1015
- throw ge(ie, L), L;
1015
+ Q = y.apply(this && this.$id === e ? this : w, V);
1016
+ } catch (F) {
1017
+ throw _e(ae, F), F;
1016
1018
  }
1017
- return K instanceof Promise ? K.then((L) => (ge(M, L), L)).catch((L) => (ge(ie, L), Promise.reject(L))) : (ge(M, K), K);
1019
+ return Q instanceof Promise ? Q.then((F) => (_e(ie, F), F)).catch((F) => (_e(ae, F), Promise.reject(F))) : (_e(ie, Q), Q);
1018
1020
  };
1019
- }
1020
- const U = /* @__PURE__ */ ue({
1021
+ return A[Ft] = !0, A[tt] = v, A;
1022
+ }, B = /* @__PURE__ */ le({
1021
1023
  actions: {},
1022
1024
  getters: {},
1023
1025
  state: [],
1024
- hotState: v
1026
+ hotState: S
1025
1027
  }), q = {
1026
1028
  _p: r,
1027
1029
  // _s: scope,
1028
1030
  $id: e,
1029
- $onAction: Bt.bind(null, d),
1030
- $patch: C,
1031
- $reset: N,
1032
- $subscribe(E, y = {}) {
1033
- const A = Bt(l, E, y.detached, () => M()), M = i.run(() => Te(() => r.state.value[e], (ie) => {
1034
- (y.flush === "sync" ? f : u) && E({
1031
+ $onAction: Ut.bind(null, d),
1032
+ $patch: R,
1033
+ $reset: k,
1034
+ $subscribe(y, v = {}) {
1035
+ const A = Ut(l, y, v.detached, () => V()), V = i.run(() => Me(() => r.state.value[e], (ie) => {
1036
+ (v.flush === "sync" ? f : u) && y({
1035
1037
  storeId: e,
1036
- type: Q.direct,
1038
+ type: K.direct,
1037
1039
  events: p
1038
1040
  }, ie);
1039
- }, W({}, c, y)));
1041
+ }, W({}, c, v)));
1040
1042
  return A;
1041
1043
  },
1042
1044
  $dispose: P
1043
- }, w = vn(process.env.NODE_ENV !== "production" || Pe ? W(
1045
+ }, w = En(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && de ? W(
1044
1046
  {
1045
- _hmrPayload: U,
1046
- _customProperties: ue(/* @__PURE__ */ new Set())
1047
+ _hmrPayload: B,
1048
+ _customProperties: le(/* @__PURE__ */ new Set())
1047
1049
  // devtools custom properties
1048
1050
  },
1049
1051
  q
@@ -1051,79 +1053,79 @@ function dt(e, t, n = {}, r, o, s) {
1051
1053
  // setupStore
1052
1054
  ) : q);
1053
1055
  r._s.set(e, w);
1054
- const G = (r._a && r._a.runWithContext || Jr)(() => r._e.run(() => (i = gn()).run(t)));
1055
- for (const E in G) {
1056
- const y = G[E];
1057
- if (Ie(y) && !Ut(y) || bt(y))
1058
- process.env.NODE_ENV !== "production" && o ? Ve(v.value, E, Ye(G, E)) : s || (b && Qr(y) && (Ie(y) ? y.value = b[E] : ft(y, b[E])), r.state.value[e][E] = y), process.env.NODE_ENV !== "production" && U.state.push(E);
1059
- else if (typeof y == "function") {
1060
- const A = process.env.NODE_ENV !== "production" && o ? y : j(E, y);
1061
- G[E] = A, process.env.NODE_ENV !== "production" && (U.actions[E] = y), a.actions[E] = y;
1062
- } else process.env.NODE_ENV !== "production" && Ut(y) && (U.getters[E] = s ? (
1056
+ const G = (r._a && r._a.runWithContext || Yr)(() => r._e.run(() => (i = _n()).run(() => t({ action: M }))));
1057
+ for (const y in G) {
1058
+ const v = G[y];
1059
+ if (Ae(v) && !Ht(v) || wt(v))
1060
+ process.env.NODE_ENV !== "production" && o ? je(S.value, y, Xe(G, y)) : s || (b && Zr(v) && (Ae(v) ? v.value = b[y] : dt(v, b[y])), r.state.value[e][y] = v), process.env.NODE_ENV !== "production" && B.state.push(y);
1061
+ else if (typeof v == "function") {
1062
+ const A = process.env.NODE_ENV !== "production" && o ? v : M(v, y);
1063
+ G[y] = A, process.env.NODE_ENV !== "production" && (B.actions[y] = v), a.actions[y] = v;
1064
+ } else process.env.NODE_ENV !== "production" && Ht(v) && (B.getters[y] = s ? (
1063
1065
  // @ts-expect-error
1064
- n.getters[E]
1065
- ) : y, Ge && (G._getters || // @ts-expect-error: same
1066
- (G._getters = ue([]))).push(E));
1066
+ n.getters[y]
1067
+ ) : v, de && (G._getters || // @ts-expect-error: same
1068
+ (G._getters = le([]))).push(y));
1067
1069
  }
1068
- if (W(w, G), W(Fe(w), G), Object.defineProperty(w, "$state", {
1069
- get: () => process.env.NODE_ENV !== "production" && o ? v.value : r.state.value[e],
1070
- set: (E) => {
1070
+ if (W(w, G), W(Ce(w), G), Object.defineProperty(w, "$state", {
1071
+ get: () => process.env.NODE_ENV !== "production" && o ? S.value : r.state.value[e],
1072
+ set: (y) => {
1071
1073
  if (process.env.NODE_ENV !== "production" && o)
1072
1074
  throw new Error("cannot set hotState");
1073
- C((y) => {
1074
- W(y, E);
1075
+ R((v) => {
1076
+ W(v, y);
1075
1077
  });
1076
1078
  }
1077
- }), process.env.NODE_ENV !== "production" && (w._hotUpdate = ue((E) => {
1078
- w._hotUpdating = !0, E._hmrPayload.state.forEach((y) => {
1079
- if (y in w.$state) {
1080
- const A = E.$state[y], M = w.$state[y];
1081
- typeof A == "object" && he(A) && he(M) ? Cn(A, M) : E.$state[y] = M;
1079
+ }), process.env.NODE_ENV !== "production" && (w._hotUpdate = le((y) => {
1080
+ w._hotUpdating = !0, y._hmrPayload.state.forEach((v) => {
1081
+ if (v in w.$state) {
1082
+ const A = y.$state[v], V = w.$state[v];
1083
+ typeof A == "object" && me(A) && me(V) ? Dn(A, V) : y.$state[v] = V;
1082
1084
  }
1083
- Ve(w, y, Ye(E.$state, y));
1084
- }), Object.keys(w.$state).forEach((y) => {
1085
- y in E.$state || Ze(w, y);
1086
- }), u = !1, f = !1, r.state.value[e] = Ye(E._hmrPayload, "hotState"), f = !0, it().then(() => {
1085
+ je(w, v, Xe(y.$state, v));
1086
+ }), Object.keys(w.$state).forEach((v) => {
1087
+ v in y.$state || et(w, v);
1088
+ }), u = !1, f = !1, r.state.value[e] = Xe(y._hmrPayload, "hotState"), f = !0, ct().then(() => {
1087
1089
  u = !0;
1088
1090
  });
1089
- for (const y in E._hmrPayload.actions) {
1090
- const A = E[y];
1091
- Ve(w, y, j(y, A));
1091
+ for (const v in y._hmrPayload.actions) {
1092
+ const A = y[v];
1093
+ je(w, v, M(A, v));
1092
1094
  }
1093
- for (const y in E._hmrPayload.getters) {
1094
- const A = E._hmrPayload.getters[y], M = s ? (
1095
+ for (const v in y._hmrPayload.getters) {
1096
+ const A = y._hmrPayload.getters[v], V = s ? (
1095
1097
  // special handling of options api
1096
- z(() => (Ce(r), A.call(w, w)))
1098
+ z(() => (Te(r), A.call(w, w)))
1097
1099
  ) : A;
1098
- Ve(w, y, M);
1100
+ je(w, v, V);
1099
1101
  }
1100
- Object.keys(w._hmrPayload.getters).forEach((y) => {
1101
- y in E._hmrPayload.getters || Ze(w, y);
1102
- }), Object.keys(w._hmrPayload.actions).forEach((y) => {
1103
- y in E._hmrPayload.actions || Ze(w, y);
1104
- }), w._hmrPayload = E._hmrPayload, w._getters = E._getters, w._hotUpdating = !1;
1105
- })), Pe) {
1106
- const E = {
1102
+ Object.keys(w._hmrPayload.getters).forEach((v) => {
1103
+ v in y._hmrPayload.getters || et(w, v);
1104
+ }), Object.keys(w._hmrPayload.actions).forEach((v) => {
1105
+ v in y._hmrPayload.actions || et(w, v);
1106
+ }), w._hmrPayload = y._hmrPayload, w._getters = y._getters, w._hotUpdating = !1;
1107
+ })), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && de) {
1108
+ const y = {
1107
1109
  writable: !0,
1108
1110
  configurable: !0,
1109
1111
  // avoid warning on devtools trying to display this property
1110
1112
  enumerable: !1
1111
1113
  };
1112
- ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((y) => {
1113
- Object.defineProperty(w, y, W({ value: w[y] }, E));
1114
+ ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((v) => {
1115
+ Object.defineProperty(w, v, W({ value: w[v] }, y));
1114
1116
  });
1115
1117
  }
1116
- return r._p.forEach((E) => {
1117
- if (Pe) {
1118
- const y = i.run(() => E({
1118
+ return r._p.forEach((y) => {
1119
+ if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && de) {
1120
+ const v = i.run(() => y({
1119
1121
  store: w,
1120
1122
  app: r._a,
1121
1123
  pinia: r,
1122
1124
  options: a
1123
1125
  }));
1124
- Object.keys(y || {}).forEach((A) => w._customProperties.add(A)), W(w, y);
1126
+ Object.keys(v || {}).forEach((A) => w._customProperties.add(A)), W(w, v);
1125
1127
  } else
1126
- W(w, i.run(() => E({
1128
+ W(w, i.run(() => y({
1127
1129
  store: w,
1128
1130
  app: r._a,
1129
1131
  pinia: r,
@@ -1133,26 +1135,27 @@ function dt(e, t, n = {}, r, o, s) {
1133
1135
  state: () => new MyClass()
1134
1136
  Found in store "${w.$id}".`), b && s && n.hydrate && n.hydrate(w.$state, b), u = !0, f = !0, w;
1135
1137
  }
1136
- function Yr(e, t, n) {
1138
+ // @__NO_SIDE_EFFECTS__
1139
+ function eo(e, t, n) {
1137
1140
  let r, o;
1138
1141
  const s = typeof t == "function";
1139
1142
  r = e, o = s ? n : t;
1140
1143
  function i(a, c) {
1141
- const u = gr();
1144
+ const u = _r();
1142
1145
  if (a = // in test mode, ignore the argument provided as we can always retrieve a
1143
1146
  // pinia instance with getActivePinia()
1144
- (process.env.NODE_ENV === "test" && Ne && Ne._testing ? null : a) || (u ? de(wn, null) : null), a && Ce(a), process.env.NODE_ENV !== "production" && !Ne)
1147
+ (process.env.NODE_ENV === "test" && $e && $e._testing ? null : a) || (u ? pe(Nn, null) : null), a && Te(a), process.env.NODE_ENV !== "production" && !$e)
1145
1148
  throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
1146
1149
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
1147
1150
  This will fail in production.`);
1148
- a = Ne, a._s.has(r) || (s ? dt(r, t, o, a) : Ht(r, o, a), process.env.NODE_ENV !== "production" && (i._pinia = a));
1151
+ a = $e, a._s.has(r) || (s ? ht(r, t, o, a) : Gt(r, o, a), process.env.NODE_ENV !== "production" && (i._pinia = a));
1149
1152
  const f = a._s.get(r);
1150
1153
  if (process.env.NODE_ENV !== "production" && c) {
1151
- const l = "__hot:" + r, d = s ? dt(l, t, o, a, !0) : Ht(l, W({}, o), a, !0);
1154
+ const l = "__hot:" + r, d = s ? ht(l, t, o, a, !0) : Gt(l, W({}, o), a, !0);
1152
1155
  c._hotUpdate(d), delete a.state.value[l], a._s.delete(l);
1153
1156
  }
1154
- if (process.env.NODE_ENV !== "production" && Ge) {
1155
- const l = Et();
1157
+ if (process.env.NODE_ENV !== "production" && de) {
1158
+ const l = bt();
1156
1159
  if (l && l.proxy && // avoid adding stores that are just built for hot module replacement
1157
1160
  !c) {
1158
1161
  const d = l.proxy, p = "_pStores" in d ? d._pStores : d._pStores = {};
@@ -1163,14 +1166,14 @@ This will fail in production.`);
1163
1166
  }
1164
1167
  return i.$id = r, i;
1165
1168
  }
1166
- const Xr = Yr("data", () => {
1169
+ const to = /* @__PURE__ */ eo("data", () => {
1167
1170
  const e = oe([]), t = oe({});
1168
1171
  return { records: e, record: t };
1169
1172
  });
1170
- function Ai(e) {
1171
- e || (e = de("$registry"));
1172
- const t = Xr(), n = oe(new ct(e, t)), r = oe(!1);
1173
- return _r(async () => {
1173
+ function Ti(e) {
1174
+ e || (e = pe("$registry"));
1175
+ const t = to(), n = oe(new lt(e, t)), r = oe(!1);
1176
+ return wr(async () => {
1174
1177
  var c, u;
1175
1178
  const o = e.router.currentRoute.value, s = (c = o.params.records) == null ? void 0 : c.toString().toLowerCase(), i = (u = o.params.record) == null ? void 0 : u.toString().toLowerCase();
1176
1179
  if (!s && !i)
@@ -1179,15 +1182,15 @@ function Ai(e) {
1179
1182
  e.addDoctype(a), n.value.setup(a), s && (i ? await n.value.getRecord(a, i) : await n.value.getRecords(a)), n.value.runAction(a, "LOAD", i ? [i] : void 0), r.value = !0;
1180
1183
  }), { stonecrop: n, isReady: r };
1181
1184
  }
1182
- class Ti {
1185
+ class Di {
1183
1186
  constructor(t, n, r, o, s) {
1184
- V(this, "doctype");
1185
- V(this, "schema");
1186
- V(this, "workflow");
1187
- V(this, "actions");
1187
+ x(this, "doctype");
1188
+ x(this, "schema");
1189
+ x(this, "workflow");
1190
+ x(this, "actions");
1188
1191
  // TODO: allow different components for different views; probably
1189
1192
  // should be defined in the schema instead?
1190
- V(this, "component");
1193
+ x(this, "component");
1191
1194
  this.doctype = t, this.schema = n, this.workflow = r, this.actions = o, this.component = s;
1192
1195
  }
1193
1196
  get slug() {
@@ -1197,15 +1200,15 @@ class Ti {
1197
1200
  return this.doctype;
1198
1201
  }
1199
1202
  }
1200
- const Ee = class Ee {
1203
+ const Se = class Se {
1201
1204
  constructor(t, n) {
1202
- V(this, "name");
1203
- V(this, "router");
1204
- V(this, "registry");
1205
- V(this, "getMeta");
1206
- if (Ee._root)
1207
- return Ee._root;
1208
- Ee._root = this, this.name = "Registry", this.router = t, this.registry = {}, this.getMeta = n;
1205
+ x(this, "name");
1206
+ x(this, "router");
1207
+ x(this, "registry");
1208
+ x(this, "getMeta");
1209
+ if (Se._root)
1210
+ return Se._root;
1211
+ Se._root = this, this.name = "Registry", this.router = t, this.registry = {}, this.getMeta = n;
1209
1212
  }
1210
1213
  addDoctype(t) {
1211
1214
  t.doctype in Object.keys(this.registry) || (this.registry[t.slug] = t), this.router.hasRoute(t.doctype) || this.router.addRoute({
@@ -1215,52 +1218,57 @@ const Ee = class Ee {
1215
1218
  });
1216
1219
  }
1217
1220
  };
1218
- V(Ee, "_root");
1219
- let ht = Ee;
1221
+ x(Se, "_root");
1222
+ let pt = Se;
1220
1223
  /*!
1221
- * vue-router v4.4.0
1224
+ * vue-router v4.4.5
1222
1225
  * (c) 2024 Eduardo San Martin Morote
1223
1226
  * @license MIT
1224
1227
  */
1225
1228
  const Z = typeof document < "u";
1226
- function Zr(e) {
1227
- return e.__esModule || e[Symbol.toStringTag] === "Module";
1229
+ function Vn(e) {
1230
+ return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
1228
1231
  }
1229
- const I = Object.assign;
1230
- function et(e, t) {
1232
+ function no(e) {
1233
+ return e.__esModule || e[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
1234
+ // add the Module string tag
1235
+ e.default && Vn(e.default);
1236
+ }
1237
+ const C = Object.assign;
1238
+ function nt(e, t) {
1231
1239
  const n = {};
1232
1240
  for (const r in t) {
1233
1241
  const o = t[r];
1234
- n[r] = F(o) ? o.map(e) : e(o);
1242
+ n[r] = H(o) ? o.map(e) : e(o);
1235
1243
  }
1236
1244
  return n;
1237
1245
  }
1238
- const $e = () => {
1239
- }, F = Array.isArray;
1246
+ const Re = () => {
1247
+ }, H = Array.isArray;
1240
1248
  function O(e) {
1241
1249
  const t = Array.from(arguments).slice(1);
1242
1250
  console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
1243
1251
  }
1244
- const Tn = /#/g, eo = /&/g, to = /\//g, no = /=/g, ro = /\?/g, Dn = /\+/g, oo = /%5B/g, so = /%5D/g, Mn = /%5E/g, io = /%60/g, Vn = /%7B/g, ao = /%7C/g, xn = /%7D/g, co = /%20/g;
1252
+ const xn = /#/g, ro = /&/g, oo = /\//g, so = /=/g, io = /\?/g, jn = /\+/g, ao = /%5B/g, co = /%5D/g, Ln = /%5E/g, uo = /%60/g, Bn = /%7B/g, lo = /%7C/g, Un = /%7D/g, fo = /%20/g;
1245
1253
  function kt(e) {
1246
- return encodeURI("" + e).replace(ao, "|").replace(oo, "[").replace(so, "]");
1254
+ return encodeURI("" + e).replace(lo, "|").replace(ao, "[").replace(co, "]");
1247
1255
  }
1248
- function uo(e) {
1249
- return kt(e).replace(Vn, "{").replace(xn, "}").replace(Mn, "^");
1256
+ function ho(e) {
1257
+ return kt(e).replace(Bn, "{").replace(Un, "}").replace(Ln, "^");
1250
1258
  }
1251
- function pt(e) {
1252
- return kt(e).replace(Dn, "%2B").replace(co, "+").replace(Tn, "%23").replace(eo, "%26").replace(io, "`").replace(Vn, "{").replace(xn, "}").replace(Mn, "^");
1259
+ function mt(e) {
1260
+ return kt(e).replace(jn, "%2B").replace(fo, "+").replace(xn, "%23").replace(ro, "%26").replace(uo, "`").replace(Bn, "{").replace(Un, "}").replace(Ln, "^");
1253
1261
  }
1254
- function lo(e) {
1255
- return pt(e).replace(no, "%3D");
1262
+ function po(e) {
1263
+ return mt(e).replace(so, "%3D");
1256
1264
  }
1257
- function fo(e) {
1258
- return kt(e).replace(Tn, "%23").replace(ro, "%3F");
1265
+ function mo(e) {
1266
+ return kt(e).replace(xn, "%23").replace(io, "%3F");
1259
1267
  }
1260
- function ho(e) {
1261
- return e == null ? "" : fo(e).replace(to, "%2F");
1268
+ function go(e) {
1269
+ return e == null ? "" : mo(e).replace(oo, "%2F");
1262
1270
  }
1263
- function be(e) {
1271
+ function Oe(e) {
1264
1272
  try {
1265
1273
  return decodeURIComponent("" + e);
1266
1274
  } catch {
@@ -1268,47 +1276,47 @@ function be(e) {
1268
1276
  }
1269
1277
  return "" + e;
1270
1278
  }
1271
- const po = /\/$/, mo = (e) => e.replace(po, "");
1272
- function tt(e, t, n = "/") {
1279
+ const vo = /\/$/, yo = (e) => e.replace(vo, "");
1280
+ function rt(e, t, n = "/") {
1273
1281
  let r, o = {}, s = "", i = "";
1274
1282
  const a = t.indexOf("#");
1275
1283
  let c = t.indexOf("?");
1276
- return a < c && a >= 0 && (c = -1), c > -1 && (r = t.slice(0, c), s = t.slice(c + 1, a > -1 ? a : t.length), o = e(s)), a > -1 && (r = r || t.slice(0, a), i = t.slice(a, t.length)), r = yo(r ?? t, n), {
1284
+ return a < c && a >= 0 && (c = -1), c > -1 && (r = t.slice(0, c), s = t.slice(c + 1, a > -1 ? a : t.length), o = e(s)), a > -1 && (r = r || t.slice(0, a), i = t.slice(a, t.length)), r = bo(r ?? t, n), {
1277
1285
  fullPath: r + (s && "?") + s + i,
1278
1286
  path: r,
1279
1287
  query: o,
1280
- hash: be(i)
1288
+ hash: Oe(i)
1281
1289
  };
1282
1290
  }
1283
- function go(e, t) {
1291
+ function _o(e, t) {
1284
1292
  const n = t.query ? e(t.query) : "";
1285
1293
  return t.path + (n && "?") + n + (t.hash || "");
1286
1294
  }
1287
- function Ft(e, t) {
1295
+ function Wt(e, t) {
1288
1296
  return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
1289
1297
  }
1290
- function Gt(e, t, n) {
1298
+ function zt(e, t, n) {
1291
1299
  const r = t.matched.length - 1, o = n.matched.length - 1;
1292
- return r > -1 && r === o && se(t.matched[r], n.matched[o]) && jn(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
1300
+ return r > -1 && r === o && se(t.matched[r], n.matched[o]) && Fn(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
1293
1301
  }
1294
1302
  function se(e, t) {
1295
1303
  return (e.aliasOf || e) === (t.aliasOf || t);
1296
1304
  }
1297
- function jn(e, t) {
1305
+ function Fn(e, t) {
1298
1306
  if (Object.keys(e).length !== Object.keys(t).length)
1299
1307
  return !1;
1300
1308
  for (const n in e)
1301
- if (!vo(e[n], t[n]))
1309
+ if (!Eo(e[n], t[n]))
1302
1310
  return !1;
1303
1311
  return !0;
1304
1312
  }
1305
- function vo(e, t) {
1306
- return F(e) ? Wt(e, t) : F(t) ? Wt(t, e) : e === t;
1313
+ function Eo(e, t) {
1314
+ return H(e) ? qt(e, t) : H(t) ? qt(t, e) : e === t;
1307
1315
  }
1308
- function Wt(e, t) {
1309
- return F(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
1316
+ function qt(e, t) {
1317
+ return H(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
1310
1318
  }
1311
- function yo(e, t) {
1319
+ function bo(e, t) {
1312
1320
  if (e.startsWith("/"))
1313
1321
  return e;
1314
1322
  if (process.env.NODE_ENV !== "production" && !t.startsWith("/"))
@@ -1338,28 +1346,28 @@ const te = {
1338
1346
  meta: {},
1339
1347
  redirectedFrom: void 0
1340
1348
  };
1341
- var Ae;
1349
+ var De;
1342
1350
  (function(e) {
1343
1351
  e.pop = "pop", e.push = "push";
1344
- })(Ae || (Ae = {}));
1345
- var Re;
1352
+ })(De || (De = {}));
1353
+ var Ie;
1346
1354
  (function(e) {
1347
1355
  e.back = "back", e.forward = "forward", e.unknown = "";
1348
- })(Re || (Re = {}));
1349
- function _o(e) {
1356
+ })(Ie || (Ie = {}));
1357
+ function wo(e) {
1350
1358
  if (!e)
1351
1359
  if (Z) {
1352
1360
  const t = document.querySelector("base");
1353
1361
  e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
1354
1362
  } else
1355
1363
  e = "/";
1356
- return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), mo(e);
1364
+ return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), yo(e);
1357
1365
  }
1358
- const Eo = /^[^#]+#/;
1359
- function bo(e, t) {
1360
- return e.replace(Eo, "#") + t;
1366
+ const So = /^[^#]+#/;
1367
+ function Oo(e, t) {
1368
+ return e.replace(So, "#") + t;
1361
1369
  }
1362
- function wo(e, t) {
1370
+ function No(e, t) {
1363
1371
  const n = document.documentElement.getBoundingClientRect(), r = e.getBoundingClientRect();
1364
1372
  return {
1365
1373
  behavior: t.behavior,
@@ -1367,11 +1375,11 @@ function wo(e, t) {
1367
1375
  top: r.top - n.top - (t.top || 0)
1368
1376
  };
1369
1377
  }
1370
- const We = () => ({
1378
+ const ze = () => ({
1371
1379
  left: window.scrollX,
1372
1380
  top: window.scrollY
1373
1381
  });
1374
- function So(e) {
1382
+ function ko(e) {
1375
1383
  let t;
1376
1384
  if ("el" in e) {
1377
1385
  const n = e.el, r = typeof n == "string" && n.startsWith("#");
@@ -1391,49 +1399,49 @@ function So(e) {
1391
1399
  process.env.NODE_ENV !== "production" && O(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);
1392
1400
  return;
1393
1401
  }
1394
- t = wo(o, e);
1402
+ t = No(o, e);
1395
1403
  } else
1396
1404
  t = e;
1397
1405
  "scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.scrollX, t.top != null ? t.top : window.scrollY);
1398
1406
  }
1399
- function zt(e, t) {
1407
+ function Jt(e, t) {
1400
1408
  return (history.state ? history.state.position - t : -1) + e;
1401
1409
  }
1402
- const mt = /* @__PURE__ */ new Map();
1403
- function Oo(e, t) {
1404
- mt.set(e, t);
1410
+ const gt = /* @__PURE__ */ new Map();
1411
+ function Po(e, t) {
1412
+ gt.set(e, t);
1405
1413
  }
1406
- function ko(e) {
1407
- const t = mt.get(e);
1408
- return mt.delete(e), t;
1414
+ function $o(e) {
1415
+ const t = gt.get(e);
1416
+ return gt.delete(e), t;
1409
1417
  }
1410
- let No = () => location.protocol + "//" + location.host;
1411
- function Ln(e, t) {
1418
+ let Ro = () => location.protocol + "//" + location.host;
1419
+ function Hn(e, t) {
1412
1420
  const { pathname: n, search: r, hash: o } = t, s = e.indexOf("#");
1413
1421
  if (s > -1) {
1414
1422
  let a = o.includes(e.slice(s)) ? e.slice(s).length : 1, c = o.slice(a);
1415
- return c[0] !== "/" && (c = "/" + c), Ft(c, "");
1423
+ return c[0] !== "/" && (c = "/" + c), Wt(c, "");
1416
1424
  }
1417
- return Ft(n, e) + r + o;
1425
+ return Wt(n, e) + r + o;
1418
1426
  }
1419
- function Po(e, t, n, r) {
1427
+ function Io(e, t, n, r) {
1420
1428
  let o = [], s = [], i = null;
1421
1429
  const a = ({ state: d }) => {
1422
- const p = Ln(e, location), b = n.value, v = t.value;
1423
- let S = 0;
1430
+ const p = Hn(e, location), b = n.value, S = t.value;
1431
+ let E = 0;
1424
1432
  if (d) {
1425
1433
  if (n.value = p, t.value = d, i && i === b) {
1426
1434
  i = null;
1427
1435
  return;
1428
1436
  }
1429
- S = v ? d.position - v.position : 0;
1437
+ E = S ? d.position - S.position : 0;
1430
1438
  } else
1431
1439
  r(p);
1432
- o.forEach((C) => {
1433
- C(n.value, b, {
1434
- delta: S,
1435
- type: Ae.pop,
1436
- direction: S ? S > 0 ? Re.forward : Re.back : Re.unknown
1440
+ o.forEach((R) => {
1441
+ R(n.value, b, {
1442
+ delta: E,
1443
+ type: De.pop,
1444
+ direction: E ? E > 0 ? Ie.forward : Ie.back : Ie.unknown
1437
1445
  });
1438
1446
  });
1439
1447
  };
@@ -1450,7 +1458,7 @@ function Po(e, t, n, r) {
1450
1458
  }
1451
1459
  function f() {
1452
1460
  const { history: d } = window;
1453
- d.state && d.replaceState(I({}, d.state, { scroll: We() }), "");
1461
+ d.state && d.replaceState(C({}, d.state, { scroll: ze() }), "");
1454
1462
  }
1455
1463
  function l() {
1456
1464
  for (const d of s)
@@ -1465,19 +1473,19 @@ function Po(e, t, n, r) {
1465
1473
  destroy: l
1466
1474
  };
1467
1475
  }
1468
- function qt(e, t, n, r = !1, o = !1) {
1476
+ function Kt(e, t, n, r = !1, o = !1) {
1469
1477
  return {
1470
1478
  back: e,
1471
1479
  current: t,
1472
1480
  forward: n,
1473
1481
  replaced: r,
1474
1482
  position: window.history.length,
1475
- scroll: o ? We() : null
1483
+ scroll: o ? ze() : null
1476
1484
  };
1477
1485
  }
1478
- function $o(e) {
1486
+ function Co(e) {
1479
1487
  const { history: t, location: n } = window, r = {
1480
- value: Ln(e, n)
1488
+ value: Hn(e, n)
1481
1489
  }, o = { value: t.state };
1482
1490
  o.value || s(r.value, {
1483
1491
  back: null,
@@ -1491,7 +1499,7 @@ function $o(e) {
1491
1499
  scroll: null
1492
1500
  }, !0);
1493
1501
  function s(c, u, f) {
1494
- const l = e.indexOf("#"), d = l > -1 ? (n.host && document.querySelector("base") ? e : e.slice(l)) + c : No() + e + c;
1502
+ const l = e.indexOf("#"), d = l > -1 ? (n.host && document.querySelector("base") ? e : e.slice(l)) + c : Ro() + e + c;
1495
1503
  try {
1496
1504
  t[f ? "replaceState" : "pushState"](u, "", d), o.value = u;
1497
1505
  } catch (p) {
@@ -1499,7 +1507,7 @@ function $o(e) {
1499
1507
  }
1500
1508
  }
1501
1509
  function i(c, u) {
1502
- const f = I({}, t.state, qt(
1510
+ const f = C({}, t.state, Kt(
1503
1511
  o.value.back,
1504
1512
  // keep back and forward entries but override current position
1505
1513
  c,
@@ -1509,7 +1517,7 @@ function $o(e) {
1509
1517
  s(c, f, !0), r.value = c;
1510
1518
  }
1511
1519
  function a(c, u) {
1512
- const f = I(
1520
+ const f = C(
1513
1521
  {},
1514
1522
  // use current history state to gracefully handle a wrong call to
1515
1523
  // history.replaceState
@@ -1518,15 +1526,15 @@ function $o(e) {
1518
1526
  t.state,
1519
1527
  {
1520
1528
  forward: c,
1521
- scroll: We()
1529
+ scroll: ze()
1522
1530
  }
1523
1531
  );
1524
1532
  process.env.NODE_ENV !== "production" && !t.state && O(`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:
1525
1533
 
1526
1534
  history.replaceState(history.state, '', url)
1527
1535
 
1528
- You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`), s(f.current, f, !0);
1529
- const l = I({}, qt(r.value, c, null), { position: f.position + 1 }, u);
1536
+ You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`), s(f.current, f, !0);
1537
+ const l = C({}, Kt(r.value, c, null), { position: f.position + 1 }, u);
1530
1538
  s(c, l, !1), r.value = c;
1531
1539
  }
1532
1540
  return {
@@ -1536,18 +1544,18 @@ You can find more information at https://next.router.vuejs.org/guide/migration/#
1536
1544
  replace: i
1537
1545
  };
1538
1546
  }
1539
- function Ro(e) {
1540
- e = _o(e);
1541
- const t = $o(e), n = Po(e, t.state, t.location, t.replace);
1547
+ function Ao(e) {
1548
+ e = wo(e);
1549
+ const t = Co(e), n = Io(e, t.state, t.location, t.replace);
1542
1550
  function r(s, i = !0) {
1543
1551
  i || n.pauseListeners(), history.go(s);
1544
1552
  }
1545
- const o = I({
1553
+ const o = C({
1546
1554
  // it's overridden right after
1547
1555
  location: "",
1548
1556
  base: e,
1549
1557
  go: r,
1550
- createHref: bo.bind(null, e)
1558
+ createHref: Oo.bind(null, e)
1551
1559
  }, t, n);
1552
1560
  return Object.defineProperty(o, "location", {
1553
1561
  enumerable: !0,
@@ -1557,18 +1565,18 @@ function Ro(e) {
1557
1565
  get: () => t.state.value
1558
1566
  }), o;
1559
1567
  }
1560
- function He(e) {
1568
+ function We(e) {
1561
1569
  return typeof e == "string" || e && typeof e == "object";
1562
1570
  }
1563
- function Bn(e) {
1571
+ function Gn(e) {
1564
1572
  return typeof e == "string" || typeof e == "symbol";
1565
1573
  }
1566
- const gt = Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
1567
- var Jt;
1574
+ const vt = Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
1575
+ var Qt;
1568
1576
  (function(e) {
1569
1577
  e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
1570
- })(Jt || (Jt = {}));
1571
- const Io = {
1578
+ })(Qt || (Qt = {}));
1579
+ const To = {
1572
1580
  1({ location: e, currentLocation: t }) {
1573
1581
  return `No match for
1574
1582
  ${JSON.stringify(e)}${t ? `
@@ -1576,7 +1584,7 @@ while being at
1576
1584
  ` + JSON.stringify(t) : ""}`;
1577
1585
  },
1578
1586
  2({ from: e, to: t }) {
1579
- return `Redirected from "${e.fullPath}" to "${Ao(t)}" via a navigation guard.`;
1587
+ return `Redirected from "${e.fullPath}" to "${Mo(t)}" via a navigation guard.`;
1580
1588
  },
1581
1589
  4({ from: e, to: t }) {
1582
1590
  return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`;
@@ -1588,37 +1596,37 @@ while being at
1588
1596
  return `Avoided redundant navigation to current location: "${e.fullPath}".`;
1589
1597
  }
1590
1598
  };
1591
- function we(e, t) {
1592
- return process.env.NODE_ENV !== "production" ? I(new Error(Io[e](t)), {
1599
+ function Ne(e, t) {
1600
+ return process.env.NODE_ENV !== "production" ? C(new Error(To[e](t)), {
1593
1601
  type: e,
1594
- [gt]: !0
1595
- }, t) : I(new Error(), {
1602
+ [vt]: !0
1603
+ }, t) : C(new Error(), {
1596
1604
  type: e,
1597
- [gt]: !0
1605
+ [vt]: !0
1598
1606
  }, t);
1599
1607
  }
1600
1608
  function X(e, t) {
1601
- return e instanceof Error && gt in e && (t == null || !!(e.type & t));
1609
+ return e instanceof Error && vt in e && (t == null || !!(e.type & t));
1602
1610
  }
1603
- const Co = ["params", "query", "hash"];
1604
- function Ao(e) {
1611
+ const Do = ["params", "query", "hash"];
1612
+ function Mo(e) {
1605
1613
  if (typeof e == "string")
1606
1614
  return e;
1607
1615
  if (e.path != null)
1608
1616
  return e.path;
1609
1617
  const t = {};
1610
- for (const n of Co)
1618
+ for (const n of Do)
1611
1619
  n in e && (t[n] = e[n]);
1612
1620
  return JSON.stringify(t, null, 2);
1613
1621
  }
1614
- const Kt = "[^/]+?", To = {
1622
+ const Yt = "[^/]+?", Vo = {
1615
1623
  sensitive: !1,
1616
1624
  strict: !1,
1617
1625
  start: !0,
1618
1626
  end: !0
1619
- }, Do = /[.+*?^${}()[\]/\\]/g;
1620
- function Mo(e, t) {
1621
- const n = I({}, To, t), r = [];
1627
+ }, xo = /[.+*?^${}()[\]/\\]/g;
1628
+ function jo(e, t) {
1629
+ const n = C({}, Vo, t), r = [];
1622
1630
  let o = n.start ? "^" : "";
1623
1631
  const s = [];
1624
1632
  for (const u of e) {
@@ -1631,27 +1639,27 @@ function Mo(e, t) {
1631
1639
  const d = u[l];
1632
1640
  let p = 40 + (n.sensitive ? 0.25 : 0);
1633
1641
  if (d.type === 0)
1634
- l || (o += "/"), o += d.value.replace(Do, "\\$&"), p += 40;
1642
+ l || (o += "/"), o += d.value.replace(xo, "\\$&"), p += 40;
1635
1643
  else if (d.type === 1) {
1636
- const { value: b, repeatable: v, optional: S, regexp: C } = d;
1644
+ const { value: b, repeatable: S, optional: E, regexp: R } = d;
1637
1645
  s.push({
1638
1646
  name: b,
1639
- repeatable: v,
1640
- optional: S
1647
+ repeatable: S,
1648
+ optional: E
1641
1649
  });
1642
- const N = C || Kt;
1643
- if (N !== Kt) {
1650
+ const k = R || Yt;
1651
+ if (k !== Yt) {
1644
1652
  p += 10;
1645
1653
  try {
1646
- new RegExp(`(${N})`);
1647
- } catch (j) {
1648
- throw new Error(`Invalid custom RegExp for param "${b}" (${N}): ` + j.message);
1654
+ new RegExp(`(${k})`);
1655
+ } catch (M) {
1656
+ throw new Error(`Invalid custom RegExp for param "${b}" (${k}): ` + M.message);
1649
1657
  }
1650
1658
  }
1651
- let P = v ? `((?:${N})(?:/(?:${N}))*)` : `(${N})`;
1659
+ let P = S ? `((?:${k})(?:/(?:${k}))*)` : `(${k})`;
1652
1660
  l || (P = // avoid an optional / if there are more segments e.g. /:p?-static
1653
1661
  // or /:p?-:p2
1654
- S && u.length < 2 ? `(?:/${P})` : "/" + P), S && (P += "?"), o += P, p += 20, S && (p += -8), v && (p += -20), N === ".*" && (p += -50);
1662
+ E && u.length < 2 ? `(?:/${P})` : "/" + P), E && (P += "?"), o += P, p += 20, E && (p += -8), S && (p += -20), k === ".*" && (p += -50);
1655
1663
  }
1656
1664
  f.push(p);
1657
1665
  }
@@ -1681,16 +1689,16 @@ function Mo(e, t) {
1681
1689
  if (p.type === 0)
1682
1690
  f += p.value;
1683
1691
  else if (p.type === 1) {
1684
- const { value: b, repeatable: v, optional: S } = p, C = b in u ? u[b] : "";
1685
- if (F(C) && !v)
1692
+ const { value: b, repeatable: S, optional: E } = p, R = b in u ? u[b] : "";
1693
+ if (H(R) && !S)
1686
1694
  throw new Error(`Provided param "${b}" is an array but it is not repeatable (* or + modifiers)`);
1687
- const N = F(C) ? C.join("/") : C;
1688
- if (!N)
1689
- if (S)
1695
+ const k = H(R) ? R.join("/") : R;
1696
+ if (!k)
1697
+ if (E)
1690
1698
  d.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : l = !0);
1691
1699
  else
1692
1700
  throw new Error(`Missing required param "${b}"`);
1693
- f += N;
1701
+ f += k;
1694
1702
  }
1695
1703
  }
1696
1704
  return f || "/";
@@ -1703,7 +1711,7 @@ function Mo(e, t) {
1703
1711
  stringify: c
1704
1712
  };
1705
1713
  }
1706
- function Vo(e, t) {
1714
+ function Lo(e, t) {
1707
1715
  let n = 0;
1708
1716
  for (; n < e.length && n < t.length; ) {
1709
1717
  const r = t[n] - e[n];
@@ -1713,36 +1721,36 @@ function Vo(e, t) {
1713
1721
  }
1714
1722
  return e.length < t.length ? e.length === 1 && e[0] === 80 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 80 ? 1 : -1 : 0;
1715
1723
  }
1716
- function Un(e, t) {
1724
+ function Wn(e, t) {
1717
1725
  let n = 0;
1718
1726
  const r = e.score, o = t.score;
1719
1727
  for (; n < r.length && n < o.length; ) {
1720
- const s = Vo(r[n], o[n]);
1728
+ const s = Lo(r[n], o[n]);
1721
1729
  if (s)
1722
1730
  return s;
1723
1731
  n++;
1724
1732
  }
1725
1733
  if (Math.abs(o.length - r.length) === 1) {
1726
- if (Qt(r))
1734
+ if (Xt(r))
1727
1735
  return 1;
1728
- if (Qt(o))
1736
+ if (Xt(o))
1729
1737
  return -1;
1730
1738
  }
1731
1739
  return o.length - r.length;
1732
1740
  }
1733
- function Qt(e) {
1741
+ function Xt(e) {
1734
1742
  const t = e[e.length - 1];
1735
1743
  return e.length > 0 && t[t.length - 1] < 0;
1736
1744
  }
1737
- const xo = {
1745
+ const Bo = {
1738
1746
  type: 0,
1739
1747
  value: ""
1740
- }, jo = /[a-zA-Z0-9_]/;
1741
- function Lo(e) {
1748
+ }, Uo = /[a-zA-Z0-9_]/;
1749
+ function Fo(e) {
1742
1750
  if (!e)
1743
1751
  return [[]];
1744
1752
  if (e === "/")
1745
- return [[xo]];
1753
+ return [[Bo]];
1746
1754
  if (!e.startsWith("/"))
1747
1755
  throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
1748
1756
  function t(p) {
@@ -1783,7 +1791,7 @@ function Lo(e) {
1783
1791
  d(), n = r;
1784
1792
  break;
1785
1793
  case 1:
1786
- c === "(" ? n = 2 : jo.test(c) ? d() : (l(), n = 0, c !== "*" && c !== "?" && c !== "+" && a--);
1794
+ c === "(" ? n = 2 : Uo.test(c) ? d() : (l(), n = 0, c !== "*" && c !== "?" && c !== "+" && a--);
1787
1795
  break;
1788
1796
  case 2:
1789
1797
  c === ")" ? f[f.length - 1] == "\\" ? f = f.slice(0, -1) + c : n = 3 : f += c;
@@ -1798,14 +1806,14 @@ function Lo(e) {
1798
1806
  }
1799
1807
  return n === 2 && t(`Unfinished custom RegExp for param "${u}"`), l(), i(), o;
1800
1808
  }
1801
- function Bo(e, t, n) {
1802
- const r = Mo(Lo(e.path), n);
1809
+ function Ho(e, t, n) {
1810
+ const r = jo(Fo(e.path), n);
1803
1811
  if (process.env.NODE_ENV !== "production") {
1804
1812
  const s = /* @__PURE__ */ new Set();
1805
1813
  for (const i of r.keys)
1806
1814
  s.has(i.name) && O(`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);
1807
1815
  }
1808
- const o = I(r, {
1816
+ const o = C(r, {
1809
1817
  record: e,
1810
1818
  parent: t,
1811
1819
  // these needs to be populated by the parent
@@ -1814,55 +1822,57 @@ function Bo(e, t, n) {
1814
1822
  });
1815
1823
  return t && !o.record.aliasOf == !t.record.aliasOf && t.children.push(o), o;
1816
1824
  }
1817
- function Uo(e, t) {
1825
+ function Go(e, t) {
1818
1826
  const n = [], r = /* @__PURE__ */ new Map();
1819
- t = Zt({ strict: !1, end: !0, sensitive: !1 }, t);
1827
+ t = nn({ strict: !1, end: !0, sensitive: !1 }, t);
1820
1828
  function o(l) {
1821
1829
  return r.get(l);
1822
1830
  }
1823
1831
  function s(l, d, p) {
1824
- const b = !p, v = Ho(l);
1825
- process.env.NODE_ENV !== "production" && zo(v, d), v.aliasOf = p && p.record;
1826
- const S = Zt(t, l), C = [
1827
- v
1828
- ];
1832
+ const b = !p, S = en(l);
1833
+ process.env.NODE_ENV !== "production" && Jo(S, d), S.aliasOf = p && p.record;
1834
+ const E = nn(t, l), R = [S];
1829
1835
  if ("alias" in l) {
1830
- const j = typeof l.alias == "string" ? [l.alias] : l.alias;
1831
- for (const U of j)
1832
- C.push(I({}, v, {
1833
- // this allows us to hold a copy of the `components` option
1834
- // so that async components cache is hold on the original record
1835
- components: p ? p.record.components : v.components,
1836
- path: U,
1837
- // we might be the child of an alias
1838
- aliasOf: p ? p.record : v
1839
- // the aliases are always of the same kind as the original since they
1840
- // are defined on the same record
1841
- }));
1836
+ const M = typeof l.alias == "string" ? [l.alias] : l.alias;
1837
+ for (const B of M)
1838
+ R.push(
1839
+ // we need to normalize again to ensure the `mods` property
1840
+ // being non enumerable
1841
+ en(C({}, S, {
1842
+ // this allows us to hold a copy of the `components` option
1843
+ // so that async components cache is hold on the original record
1844
+ components: p ? p.record.components : S.components,
1845
+ path: B,
1846
+ // we might be the child of an alias
1847
+ aliasOf: p ? p.record : S
1848
+ // the aliases are always of the same kind as the original since they
1849
+ // are defined on the same record
1850
+ }))
1851
+ );
1842
1852
  }
1843
- let N, P;
1844
- for (const j of C) {
1845
- const { path: U } = j;
1846
- if (d && U[0] !== "/") {
1853
+ let k, P;
1854
+ for (const M of R) {
1855
+ const { path: B } = M;
1856
+ if (d && B[0] !== "/") {
1847
1857
  const q = d.record.path, w = q[q.length - 1] === "/" ? "" : "/";
1848
- j.path = d.record.path + (U && w + U);
1858
+ M.path = d.record.path + (B && w + B);
1849
1859
  }
1850
- if (process.env.NODE_ENV !== "production" && j.path === "*")
1860
+ if (process.env.NODE_ENV !== "production" && M.path === "*")
1851
1861
  throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
1852
- See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.`);
1853
- if (N = Bo(j, d, S), process.env.NODE_ENV !== "production" && d && U[0] === "/" && qo(N, d), p ? (p.alias.push(N), process.env.NODE_ENV !== "production" && Wo(p, N)) : (P = P || N, P !== N && P.alias.push(N), b && l.name && !Xt(N) && i(l.name)), Hn(N) && c(N), v.children) {
1854
- const q = v.children;
1862
+ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
1863
+ if (k = Ho(M, d, E), process.env.NODE_ENV !== "production" && d && B[0] === "/" && Ko(k, d), p ? (p.alias.push(k), process.env.NODE_ENV !== "production" && qo(p, k)) : (P = P || k, P !== k && P.alias.push(k), b && l.name && !tn(k) && i(l.name)), zn(k) && c(k), S.children) {
1864
+ const q = S.children;
1855
1865
  for (let w = 0; w < q.length; w++)
1856
- s(q[w], N, p && p.children[w]);
1866
+ s(q[w], k, p && p.children[w]);
1857
1867
  }
1858
- p = p || N;
1868
+ p = p || k;
1859
1869
  }
1860
1870
  return P ? () => {
1861
1871
  i(P);
1862
- } : $e;
1872
+ } : Re;
1863
1873
  }
1864
1874
  function i(l) {
1865
- if (Bn(l)) {
1875
+ if (Gn(l)) {
1866
1876
  const d = r.get(l);
1867
1877
  d && (r.delete(l), n.splice(n.indexOf(d), 1), d.children.forEach(i), d.alias.forEach(i));
1868
1878
  } else {
@@ -1874,23 +1884,23 @@ See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch
1874
1884
  return n;
1875
1885
  }
1876
1886
  function c(l) {
1877
- const d = Jo(l, n);
1878
- n.splice(d, 0, l), l.record.name && !Xt(l) && r.set(l.record.name, l);
1887
+ const d = Qo(l, n);
1888
+ n.splice(d, 0, l), l.record.name && !tn(l) && r.set(l.record.name, l);
1879
1889
  }
1880
1890
  function u(l, d) {
1881
- let p, b = {}, v, S;
1891
+ let p, b = {}, S, E;
1882
1892
  if ("name" in l && l.name) {
1883
1893
  if (p = r.get(l.name), !p)
1884
- throw we(1, {
1894
+ throw Ne(1, {
1885
1895
  location: l
1886
1896
  });
1887
1897
  if (process.env.NODE_ENV !== "production") {
1888
- const P = Object.keys(l.params || {}).filter((j) => !p.keys.find((U) => U.name === j));
1898
+ const P = Object.keys(l.params || {}).filter((M) => !p.keys.find((B) => B.name === M));
1889
1899
  P.length && O(`Discarded invalid param(s) "${P.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
1890
1900
  }
1891
- S = p.record.name, b = I(
1901
+ E = p.record.name, b = C(
1892
1902
  // paramsFromLocation is a new object
1893
- Yt(
1903
+ Zt(
1894
1904
  d.params,
1895
1905
  // only keep params that exist in the resolved location
1896
1906
  // only keep optional params coming from a parent record
@@ -1898,28 +1908,28 @@ See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch
1898
1908
  ),
1899
1909
  // discard any existing params in the current location that do not exist here
1900
1910
  // #1497 this ensures better active/exact matching
1901
- l.params && Yt(l.params, p.keys.map((P) => P.name))
1902
- ), v = p.stringify(b);
1911
+ l.params && Zt(l.params, p.keys.map((P) => P.name))
1912
+ ), S = p.stringify(b);
1903
1913
  } else if (l.path != null)
1904
- v = l.path, process.env.NODE_ENV !== "production" && !v.startsWith("/") && O(`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.`), p = n.find((P) => P.re.test(v)), p && (b = p.parse(v), S = p.record.name);
1914
+ S = l.path, process.env.NODE_ENV !== "production" && !S.startsWith("/") && O(`The Matcher cannot resolve relative paths but received "${S}". Unless you directly called \`matcher.resolve("${S}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), p = n.find((P) => P.re.test(S)), p && (b = p.parse(S), E = p.record.name);
1905
1915
  else {
1906
1916
  if (p = d.name ? r.get(d.name) : n.find((P) => P.re.test(d.path)), !p)
1907
- throw we(1, {
1917
+ throw Ne(1, {
1908
1918
  location: l,
1909
1919
  currentLocation: d
1910
1920
  });
1911
- S = p.record.name, b = I({}, d.params, l.params), v = p.stringify(b);
1921
+ E = p.record.name, b = C({}, d.params, l.params), S = p.stringify(b);
1912
1922
  }
1913
- const C = [];
1914
- let N = p;
1915
- for (; N; )
1916
- C.unshift(N.record), N = N.parent;
1923
+ const R = [];
1924
+ let k = p;
1925
+ for (; k; )
1926
+ R.unshift(k.record), k = k.parent;
1917
1927
  return {
1918
- name: S,
1919
- path: v,
1928
+ name: E,
1929
+ path: S,
1920
1930
  params: b,
1921
- matched: C,
1922
- meta: Go(C)
1931
+ matched: R,
1932
+ meta: zo(R)
1923
1933
  };
1924
1934
  }
1925
1935
  e.forEach((l) => s(l));
@@ -1935,30 +1945,35 @@ See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch
1935
1945
  getRecordMatcher: o
1936
1946
  };
1937
1947
  }
1938
- function Yt(e, t) {
1948
+ function Zt(e, t) {
1939
1949
  const n = {};
1940
1950
  for (const r of t)
1941
1951
  r in e && (n[r] = e[r]);
1942
1952
  return n;
1943
1953
  }
1944
- function Ho(e) {
1945
- return {
1954
+ function en(e) {
1955
+ const t = {
1946
1956
  path: e.path,
1947
1957
  redirect: e.redirect,
1948
1958
  name: e.name,
1949
1959
  meta: e.meta || {},
1950
- aliasOf: void 0,
1960
+ aliasOf: e.aliasOf,
1951
1961
  beforeEnter: e.beforeEnter,
1952
- props: Fo(e),
1962
+ props: Wo(e),
1953
1963
  children: e.children || [],
1954
1964
  instances: {},
1955
1965
  leaveGuards: /* @__PURE__ */ new Set(),
1956
1966
  updateGuards: /* @__PURE__ */ new Set(),
1957
1967
  enterCallbacks: {},
1968
+ // must be declared afterwards
1969
+ // mods: {},
1958
1970
  components: "components" in e ? e.components || null : e.component && { default: e.component }
1959
1971
  };
1972
+ return Object.defineProperty(t, "mods", {
1973
+ value: {}
1974
+ }), t;
1960
1975
  }
1961
- function Fo(e) {
1976
+ function Wo(e) {
1962
1977
  const t = {}, n = e.props || !1;
1963
1978
  if ("component" in e)
1964
1979
  t.default = n;
@@ -1967,7 +1982,7 @@ function Fo(e) {
1967
1982
  t[r] = typeof n == "object" ? n[r] : n;
1968
1983
  return t;
1969
1984
  }
1970
- function Xt(e) {
1985
+ function tn(e) {
1971
1986
  for (; e; ) {
1972
1987
  if (e.record.aliasOf)
1973
1988
  return !0;
@@ -1975,91 +1990,91 @@ function Xt(e) {
1975
1990
  }
1976
1991
  return !1;
1977
1992
  }
1978
- function Go(e) {
1979
- return e.reduce((t, n) => I(t, n.meta), {});
1993
+ function zo(e) {
1994
+ return e.reduce((t, n) => C(t, n.meta), {});
1980
1995
  }
1981
- function Zt(e, t) {
1996
+ function nn(e, t) {
1982
1997
  const n = {};
1983
1998
  for (const r in e)
1984
1999
  n[r] = r in t ? t[r] : e[r];
1985
2000
  return n;
1986
2001
  }
1987
- function vt(e, t) {
2002
+ function yt(e, t) {
1988
2003
  return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
1989
2004
  }
1990
- function Wo(e, t) {
2005
+ function qo(e, t) {
1991
2006
  for (const n of e.keys)
1992
- if (!n.optional && !t.keys.find(vt.bind(null, n)))
2007
+ if (!n.optional && !t.keys.find(yt.bind(null, n)))
1993
2008
  return O(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
1994
2009
  for (const n of t.keys)
1995
- if (!n.optional && !e.keys.find(vt.bind(null, n)))
2010
+ if (!n.optional && !e.keys.find(yt.bind(null, n)))
1996
2011
  return O(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
1997
2012
  }
1998
- function zo(e, t) {
2013
+ function Jo(e, t) {
1999
2014
  t && t.record.name && !e.name && !e.path && O(`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.`);
2000
2015
  }
2001
- function qo(e, t) {
2016
+ function Ko(e, t) {
2002
2017
  for (const n of t.keys)
2003
- if (!e.keys.find(vt.bind(null, n)))
2018
+ if (!e.keys.find(yt.bind(null, n)))
2004
2019
  return O(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`);
2005
2020
  }
2006
- function Jo(e, t) {
2021
+ function Qo(e, t) {
2007
2022
  let n = 0, r = t.length;
2008
2023
  for (; n !== r; ) {
2009
2024
  const s = n + r >> 1;
2010
- Un(e, t[s]) < 0 ? r = s : n = s + 1;
2025
+ Wn(e, t[s]) < 0 ? r = s : n = s + 1;
2011
2026
  }
2012
- const o = Ko(e);
2027
+ const o = Yo(e);
2013
2028
  return o && (r = t.lastIndexOf(o, r - 1), process.env.NODE_ENV !== "production" && r < 0 && O(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)), r;
2014
2029
  }
2015
- function Ko(e) {
2030
+ function Yo(e) {
2016
2031
  let t = e;
2017
2032
  for (; t = t.parent; )
2018
- if (Hn(t) && Un(e, t) === 0)
2033
+ if (zn(t) && Wn(e, t) === 0)
2019
2034
  return t;
2020
2035
  }
2021
- function Hn({ record: e }) {
2036
+ function zn({ record: e }) {
2022
2037
  return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
2023
2038
  }
2024
- function Qo(e) {
2039
+ function Xo(e) {
2025
2040
  const t = {};
2026
2041
  if (e === "" || e === "?")
2027
2042
  return t;
2028
2043
  const r = (e[0] === "?" ? e.slice(1) : e).split("&");
2029
2044
  for (let o = 0; o < r.length; ++o) {
2030
- const s = r[o].replace(Dn, " "), i = s.indexOf("="), a = be(i < 0 ? s : s.slice(0, i)), c = i < 0 ? null : be(s.slice(i + 1));
2045
+ const s = r[o].replace(jn, " "), i = s.indexOf("="), a = Oe(i < 0 ? s : s.slice(0, i)), c = i < 0 ? null : Oe(s.slice(i + 1));
2031
2046
  if (a in t) {
2032
2047
  let u = t[a];
2033
- F(u) || (u = t[a] = [u]), u.push(c);
2048
+ H(u) || (u = t[a] = [u]), u.push(c);
2034
2049
  } else
2035
2050
  t[a] = c;
2036
2051
  }
2037
2052
  return t;
2038
2053
  }
2039
- function en(e) {
2054
+ function rn(e) {
2040
2055
  let t = "";
2041
2056
  for (let n in e) {
2042
2057
  const r = e[n];
2043
- if (n = lo(n), r == null) {
2058
+ if (n = po(n), r == null) {
2044
2059
  r !== void 0 && (t += (t.length ? "&" : "") + n);
2045
2060
  continue;
2046
2061
  }
2047
- (F(r) ? r.map((s) => s && pt(s)) : [r && pt(r)]).forEach((s) => {
2062
+ (H(r) ? r.map((s) => s && mt(s)) : [r && mt(r)]).forEach((s) => {
2048
2063
  s !== void 0 && (t += (t.length ? "&" : "") + n, s != null && (t += "=" + s));
2049
2064
  });
2050
2065
  }
2051
2066
  return t;
2052
2067
  }
2053
- function Yo(e) {
2068
+ function Zo(e) {
2054
2069
  const t = {};
2055
2070
  for (const n in e) {
2056
2071
  const r = e[n];
2057
- r !== void 0 && (t[n] = F(r) ? r.map((o) => o == null ? null : "" + o) : r == null ? r : "" + r);
2072
+ r !== void 0 && (t[n] = H(r) ? r.map((o) => o == null ? null : "" + o) : r == null ? r : "" + r);
2058
2073
  }
2059
2074
  return t;
2060
2075
  }
2061
- const Xo = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""), tn = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""), Nt = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), Fn = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""), yt = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
2062
- function Oe() {
2076
+ const es = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""), on = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""), Pt = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), qn = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""), _t = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
2077
+ function ke() {
2063
2078
  let e = [];
2064
2079
  function t(r) {
2065
2080
  return e.push(r), () => {
@@ -2081,15 +2096,15 @@ function ne(e, t, n, r, o, s = (i) => i()) {
2081
2096
  (r.enterCallbacks[o] = r.enterCallbacks[o] || []);
2082
2097
  return () => new Promise((a, c) => {
2083
2098
  const u = (d) => {
2084
- d === !1 ? c(we(4, {
2099
+ d === !1 ? c(Ne(4, {
2085
2100
  from: n,
2086
2101
  to: t
2087
- })) : d instanceof Error ? c(d) : He(d) ? c(we(2, {
2102
+ })) : d instanceof Error ? c(d) : We(d) ? c(Ne(2, {
2088
2103
  from: t,
2089
2104
  to: d
2090
2105
  })) : (i && // since enterCallbackArray is truthy, both record and name also are
2091
2106
  r.enterCallbacks[o] === i && typeof d == "function" && i.push(d), a());
2092
- }, f = s(() => e.call(r && r.instances[o], t, n, process.env.NODE_ENV !== "production" ? Zo(u, t, n) : u));
2107
+ }, f = s(() => e.call(r && r.instances[o], t, n, process.env.NODE_ENV !== "production" ? ts(u, t, n) : u));
2093
2108
  let l = Promise.resolve(f);
2094
2109
  if (e.length < 3 && (l = l.then(u)), process.env.NODE_ENV !== "production" && e.length > 2) {
2095
2110
  const d = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
@@ -2105,13 +2120,13 @@ ${e.toString()}
2105
2120
  l.catch((d) => c(d));
2106
2121
  });
2107
2122
  }
2108
- function Zo(e, t, n) {
2123
+ function ts(e, t, n) {
2109
2124
  let r = 0;
2110
2125
  return function() {
2111
2126
  r++ === 1 && O(`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, r === 1 && e.apply(null, arguments);
2112
2127
  };
2113
2128
  }
2114
- function nt(e, t, n, r, o = (s) => s()) {
2129
+ function ot(e, t, n, r, o = (s) => s()) {
2115
2130
  const s = [];
2116
2131
  for (const i of e) {
2117
2132
  process.env.NODE_ENV !== "production" && !i.components && !i.children.length && O(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);
@@ -2128,16 +2143,16 @@ function nt(e, t, n, r, o = (s) => s()) {
2128
2143
  !c.__warnedDefineAsync && (c.__warnedDefineAsync = !0, O(`Component "${a}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
2129
2144
  }
2130
2145
  if (!(t !== "beforeRouteEnter" && !i.instances[a]))
2131
- if (es(c)) {
2146
+ if (Vn(c)) {
2132
2147
  const f = (c.__vccOpts || c)[t];
2133
2148
  f && s.push(ne(f, n, r, i, a, o));
2134
2149
  } else {
2135
2150
  let u = c();
2136
2151
  process.env.NODE_ENV !== "production" && !("catch" in u) && (O(`Component "${a}" in record with path "${i.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.`), u = Promise.resolve(u)), s.push(() => u.then((f) => {
2137
2152
  if (!f)
2138
- return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));
2139
- const l = Zr(f) ? f.default : f;
2140
- i.components[a] = l;
2153
+ throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);
2154
+ const l = no(f) ? f.default : f;
2155
+ i.mods[a] = f, i.components[a] = l;
2141
2156
  const p = (l.__vccOpts || l)[t];
2142
2157
  return p && ne(p, n, r, i, a, o)();
2143
2158
  }));
@@ -2146,15 +2161,12 @@ function nt(e, t, n, r, o = (s) => s()) {
2146
2161
  }
2147
2162
  return s;
2148
2163
  }
2149
- function es(e) {
2150
- return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
2151
- }
2152
- function nn(e) {
2153
- const t = de(Nt), n = de(Fn);
2164
+ function sn(e) {
2165
+ const t = pe(Pt), n = pe(qn);
2154
2166
  let r = !1, o = null;
2155
2167
  const s = z(() => {
2156
- const f = le(e.to);
2157
- return process.env.NODE_ENV !== "production" && (!r || f !== o) && (He(f) || (r ? O(`Invalid value for prop "to" in useLink()
2168
+ const f = fe(e.to);
2169
+ return process.env.NODE_ENV !== "production" && (!r || f !== o) && (We(f) || (r ? O(`Invalid value for prop "to" in useLink()
2158
2170
  - to:`, f, `
2159
2171
  - previous to:`, o, `
2160
2172
  - props:`, e) : O(`Invalid value for prop "to" in useLink()
@@ -2167,24 +2179,24 @@ function nn(e) {
2167
2179
  const b = p.findIndex(se.bind(null, d));
2168
2180
  if (b > -1)
2169
2181
  return b;
2170
- const v = rn(f[l - 2]);
2182
+ const S = an(f[l - 2]);
2171
2183
  return (
2172
2184
  // we are dealing with nested routes
2173
2185
  l > 1 && // if the parent and matched route have the same path, this link is
2174
2186
  // referring to the empty child. Or we currently are on a different
2175
2187
  // child of the same parent
2176
- rn(d) === v && // avoid comparing the child with its parent
2177
- p[p.length - 1].path !== v ? p.findIndex(se.bind(null, f[l - 2])) : b
2188
+ an(d) === S && // avoid comparing the child with its parent
2189
+ p[p.length - 1].path !== S ? p.findIndex(se.bind(null, f[l - 2])) : b
2178
2190
  );
2179
- }), a = z(() => i.value > -1 && os(n.params, s.value.params)), c = z(() => i.value > -1 && i.value === n.matched.length - 1 && jn(n.params, s.value.params));
2191
+ }), a = z(() => i.value > -1 && ss(n.params, s.value.params)), c = z(() => i.value > -1 && i.value === n.matched.length - 1 && Fn(n.params, s.value.params));
2180
2192
  function u(f = {}) {
2181
- return rs(f) ? t[le(e.replace) ? "replace" : "push"](
2182
- le(e.to)
2193
+ return os(f) ? t[fe(e.replace) ? "replace" : "push"](
2194
+ fe(e.to)
2183
2195
  // avoid uncaught errors are they are logged anyway
2184
- ).catch($e) : Promise.resolve();
2196
+ ).catch(Re) : Promise.resolve();
2185
2197
  }
2186
2198
  if (process.env.NODE_ENV !== "production" && Z) {
2187
- const f = Et();
2199
+ const f = bt();
2188
2200
  if (f) {
2189
2201
  const l = {
2190
2202
  route: s.value,
@@ -2192,8 +2204,8 @@ function nn(e) {
2192
2204
  isExactActive: c.value,
2193
2205
  error: null
2194
2206
  };
2195
- f.__vrl_devtools = f.__vrl_devtools || [], f.__vrl_devtools.push(l), wr(() => {
2196
- l.route = s.value, l.isActive = a.value, l.isExactActive = c.value, l.error = He(le(e.to)) ? null : 'Invalid "to" value';
2207
+ f.__vrl_devtools = f.__vrl_devtools || [], f.__vrl_devtools.push(l), Nr(() => {
2208
+ l.route = s.value, l.isActive = a.value, l.isExactActive = c.value, l.error = We(fe(e.to)) ? null : 'Invalid "to" value';
2197
2209
  }, { flush: "post" });
2198
2210
  }
2199
2211
  }
@@ -2205,7 +2217,7 @@ function nn(e) {
2205
2217
  navigate: u
2206
2218
  };
2207
2219
  }
2208
- const ts = /* @__PURE__ */ yn({
2220
+ const ns = /* @__PURE__ */ bn({
2209
2221
  name: "RouterLink",
2210
2222
  compatConfig: { MODE: 3 },
2211
2223
  props: {
@@ -2223,20 +2235,20 @@ const ts = /* @__PURE__ */ yn({
2223
2235
  default: "page"
2224
2236
  }
2225
2237
  },
2226
- useLink: nn,
2238
+ useLink: sn,
2227
2239
  setup(e, { slots: t }) {
2228
- const n = vn(nn(e)), { options: r } = de(Nt), o = z(() => ({
2229
- [on(e.activeClass, r.linkActiveClass, "router-link-active")]: n.isActive,
2240
+ const n = En(sn(e)), { options: r } = pe(Pt), o = z(() => ({
2241
+ [cn(e.activeClass, r.linkActiveClass, "router-link-active")]: n.isActive,
2230
2242
  // [getLinkClass(
2231
2243
  // props.inactiveClass,
2232
2244
  // options.linkInactiveClass,
2233
2245
  // 'router-link-inactive'
2234
2246
  // )]: !link.isExactActive,
2235
- [on(e.exactActiveClass, r.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
2247
+ [cn(e.exactActiveClass, r.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
2236
2248
  }));
2237
2249
  return () => {
2238
2250
  const s = t.default && t.default(n);
2239
- return e.custom ? s : _n("a", {
2251
+ return e.custom ? s : wn("a", {
2240
2252
  "aria-current": n.isExactActive ? e.ariaCurrentValue : null,
2241
2253
  href: n.href,
2242
2254
  // this would override user added attrs but Vue will still add
@@ -2246,8 +2258,8 @@ const ts = /* @__PURE__ */ yn({
2246
2258
  }, s);
2247
2259
  };
2248
2260
  }
2249
- }), ns = ts;
2250
- function rs(e) {
2261
+ }), rs = ns;
2262
+ function os(e) {
2251
2263
  if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
2252
2264
  if (e.currentTarget && e.currentTarget.getAttribute) {
2253
2265
  const t = e.currentTarget.getAttribute("target");
@@ -2257,21 +2269,21 @@ function rs(e) {
2257
2269
  return e.preventDefault && e.preventDefault(), !0;
2258
2270
  }
2259
2271
  }
2260
- function os(e, t) {
2272
+ function ss(e, t) {
2261
2273
  for (const n in t) {
2262
2274
  const r = t[n], o = e[n];
2263
2275
  if (typeof r == "string") {
2264
2276
  if (r !== o)
2265
2277
  return !1;
2266
- } else if (!F(o) || o.length !== r.length || r.some((s, i) => s !== o[i]))
2278
+ } else if (!H(o) || o.length !== r.length || r.some((s, i) => s !== o[i]))
2267
2279
  return !1;
2268
2280
  }
2269
2281
  return !0;
2270
2282
  }
2271
- function rn(e) {
2283
+ function an(e) {
2272
2284
  return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
2273
2285
  }
2274
- const on = (e, t, n) => e ?? t ?? n, ss = /* @__PURE__ */ yn({
2286
+ const cn = (e, t, n) => e ?? t ?? n, is = /* @__PURE__ */ bn({
2275
2287
  name: "RouterView",
2276
2288
  // #674 we manually inherit them
2277
2289
  inheritAttrs: !1,
@@ -2286,59 +2298,59 @@ const on = (e, t, n) => e ?? t ?? n, ss = /* @__PURE__ */ yn({
2286
2298
  // https://github.com/vuejs/router/issues/1315
2287
2299
  compatConfig: { MODE: 3 },
2288
2300
  setup(e, { attrs: t, slots: n }) {
2289
- process.env.NODE_ENV !== "production" && as();
2290
- const r = de(yt), o = z(() => e.route || r.value), s = de(tn, 0), i = z(() => {
2291
- let u = le(s);
2301
+ process.env.NODE_ENV !== "production" && cs();
2302
+ const r = pe(_t), o = z(() => e.route || r.value), s = pe(on, 0), i = z(() => {
2303
+ let u = fe(s);
2292
2304
  const { matched: f } = o.value;
2293
2305
  let l;
2294
2306
  for (; (l = f[u]) && !l.components; )
2295
2307
  u++;
2296
2308
  return u;
2297
2309
  }), a = z(() => o.value.matched[i.value]);
2298
- Xe(tn, z(() => i.value + 1)), Xe(Xo, a), Xe(yt, o);
2310
+ Ze(on, z(() => i.value + 1)), Ze(es, a), Ze(_t, o);
2299
2311
  const c = oe();
2300
- return Te(() => [c.value, a.value, e.name], ([u, f, l], [d, p, b]) => {
2312
+ return Me(() => [c.value, a.value, e.name], ([u, f, l], [d, p, b]) => {
2301
2313
  f && (f.instances[l] = u, p && p !== f && u && u === d && (f.leaveGuards.size || (f.leaveGuards = p.leaveGuards), f.updateGuards.size || (f.updateGuards = p.updateGuards))), u && f && // if there is no instance but to and from are the same this might be
2302
2314
  // the first visit
2303
- (!p || !se(f, p) || !d) && (f.enterCallbacks[l] || []).forEach((v) => v(u));
2315
+ (!p || !se(f, p) || !d) && (f.enterCallbacks[l] || []).forEach((S) => S(u));
2304
2316
  }, { flush: "post" }), () => {
2305
2317
  const u = o.value, f = e.name, l = a.value, d = l && l.components[f];
2306
2318
  if (!d)
2307
- return sn(n.default, { Component: d, route: u });
2308
- const p = l.props[f], b = p ? p === !0 ? u.params : typeof p == "function" ? p(u) : p : null, S = _n(d, I({}, b, t, {
2309
- onVnodeUnmounted: (C) => {
2310
- C.component.isUnmounted && (l.instances[f] = null);
2319
+ return un(n.default, { Component: d, route: u });
2320
+ const p = l.props[f], b = p ? p === !0 ? u.params : typeof p == "function" ? p(u) : p : null, E = wn(d, C({}, b, t, {
2321
+ onVnodeUnmounted: (R) => {
2322
+ R.component.isUnmounted && (l.instances[f] = null);
2311
2323
  },
2312
2324
  ref: c
2313
2325
  }));
2314
- if (process.env.NODE_ENV !== "production" && Z && S.ref) {
2315
- const C = {
2326
+ if (process.env.NODE_ENV !== "production" && Z && E.ref) {
2327
+ const R = {
2316
2328
  depth: i.value,
2317
2329
  name: l.name,
2318
2330
  path: l.path,
2319
2331
  meta: l.meta
2320
2332
  };
2321
- (F(S.ref) ? S.ref.map((P) => P.i) : [S.ref.i]).forEach((P) => {
2322
- P.__vrv_devtools = C;
2333
+ (H(E.ref) ? E.ref.map((P) => P.i) : [E.ref.i]).forEach((P) => {
2334
+ P.__vrv_devtools = R;
2323
2335
  });
2324
2336
  }
2325
2337
  return (
2326
2338
  // pass the vnode to the slot as a prop.
2327
2339
  // h and <component :is="..."> both accept vnodes
2328
- sn(n.default, { Component: S, route: u }) || S
2340
+ un(n.default, { Component: E, route: u }) || E
2329
2341
  );
2330
2342
  };
2331
2343
  }
2332
2344
  });
2333
- function sn(e, t) {
2345
+ function un(e, t) {
2334
2346
  if (!e)
2335
2347
  return null;
2336
2348
  const n = e(t);
2337
2349
  return n.length === 1 ? n[0] : n;
2338
2350
  }
2339
- const is = ss;
2340
- function as() {
2341
- const e = Et(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
2351
+ const as = is;
2352
+ function cs() {
2353
+ const e = bt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
2342
2354
  if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
2343
2355
  const r = t === "KeepAlive" ? "keep-alive" : "transition";
2344
2356
  O(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
@@ -2351,10 +2363,10 @@ Use slot props instead:
2351
2363
  </router-view>`);
2352
2364
  }
2353
2365
  }
2354
- function ke(e, t) {
2355
- const n = I({}, e, {
2366
+ function Pe(e, t) {
2367
+ const n = C({}, e, {
2356
2368
  // remove variables that can contain vue instances
2357
- matched: e.matched.map((r) => ys(r, ["instances", "children", "aliasOf"]))
2369
+ matched: e.matched.map((r) => _s(r, ["instances", "children", "aliasOf"]))
2358
2370
  });
2359
2371
  return {
2360
2372
  _custom: {
@@ -2366,20 +2378,20 @@ function ke(e, t) {
2366
2378
  }
2367
2379
  };
2368
2380
  }
2369
- function xe(e) {
2381
+ function Le(e) {
2370
2382
  return {
2371
2383
  _custom: {
2372
2384
  display: e
2373
2385
  }
2374
2386
  };
2375
2387
  }
2376
- let cs = 0;
2377
- function us(e, t, n) {
2388
+ let us = 0;
2389
+ function ls(e, t, n) {
2378
2390
  if (t.__hasDevtools)
2379
2391
  return;
2380
2392
  t.__hasDevtools = !0;
2381
- const r = cs++;
2382
- wt({
2393
+ const r = us++;
2394
+ St({
2383
2395
  id: "org.vuejs.router" + (r ? "." + r : ""),
2384
2396
  label: "Vue Router",
2385
2397
  packageName: "vue-router",
@@ -2393,7 +2405,7 @@ function us(e, t, n) {
2393
2405
  type: "Routing",
2394
2406
  key: "$route",
2395
2407
  editable: !1,
2396
- value: ke(t.currentRoute.value, "Current Route")
2408
+ value: Pe(t.currentRoute.value, "Current Route")
2397
2409
  });
2398
2410
  }), o.on.visitComponentTree(({ treeNode: f, componentInstance: l }) => {
2399
2411
  if (l.__vrv_devtools) {
@@ -2402,19 +2414,19 @@ function us(e, t, n) {
2402
2414
  label: (d.name ? `${d.name.toString()}: ` : "") + d.path,
2403
2415
  textColor: 0,
2404
2416
  tooltip: "This component is rendered by &lt;router-view&gt;",
2405
- backgroundColor: Gn
2417
+ backgroundColor: Jn
2406
2418
  });
2407
2419
  }
2408
- F(l.__vrl_devtools) && (l.__devtoolsApi = o, l.__vrl_devtools.forEach((d) => {
2409
- let p = d.route.path, b = qn, v = "", S = 0;
2410
- d.error ? (p = d.error, b = ps, S = ms) : d.isExactActive ? (b = zn, v = "This is exactly active") : d.isActive && (b = Wn, v = "This link is active"), f.tags.push({
2420
+ H(l.__vrl_devtools) && (l.__devtoolsApi = o, l.__vrl_devtools.forEach((d) => {
2421
+ let p = d.route.path, b = Yn, S = "", E = 0;
2422
+ d.error ? (p = d.error, b = ms, E = gs) : d.isExactActive ? (b = Qn, S = "This is exactly active") : d.isActive && (b = Kn, S = "This link is active"), f.tags.push({
2411
2423
  label: p,
2412
- textColor: S,
2413
- tooltip: v,
2424
+ textColor: E,
2425
+ tooltip: S,
2414
2426
  backgroundColor: b
2415
2427
  });
2416
2428
  }));
2417
- }), Te(t.currentRoute, () => {
2429
+ }), Me(t.currentRoute, () => {
2418
2430
  c(), o.notifyComponentUpdate(), o.sendInspectorTree(a), o.sendInspectorState(a);
2419
2431
  });
2420
2432
  const s = "router:navigations:" + r;
@@ -2438,9 +2450,9 @@ function us(e, t, n) {
2438
2450
  let i = 0;
2439
2451
  t.beforeEach((f, l) => {
2440
2452
  const d = {
2441
- guard: xe("beforeEach"),
2442
- from: ke(l, "Current Location during this navigation"),
2443
- to: ke(f, "Target location")
2453
+ guard: Le("beforeEach"),
2454
+ from: Pe(l, "Current Location during this navigation"),
2455
+ to: Pe(f, "Target location")
2444
2456
  };
2445
2457
  Object.defineProperty(f.meta, "__navigationId", {
2446
2458
  value: i++
@@ -2456,7 +2468,7 @@ function us(e, t, n) {
2456
2468
  });
2457
2469
  }), t.afterEach((f, l, d) => {
2458
2470
  const p = {
2459
- guard: xe("afterEach")
2471
+ guard: Le("afterEach")
2460
2472
  };
2461
2473
  d ? (p.failure = {
2462
2474
  _custom: {
@@ -2466,7 +2478,7 @@ function us(e, t, n) {
2466
2478
  tooltip: "Navigation Failure",
2467
2479
  value: d
2468
2480
  }
2469
- }, p.status = xe("❌")) : p.status = xe("✅"), p.from = ke(l, "Current Location during this navigation"), p.to = ke(f, "Target location"), o.addTimelineEvent({
2481
+ }, p.status = Le("❌")) : p.status = Le("✅"), p.from = Pe(l, "Current Location during this navigation"), p.to = Pe(f, "Target location"), o.addTimelineEvent({
2470
2482
  layerId: s,
2471
2483
  event: {
2472
2484
  title: "End of navigation",
@@ -2492,10 +2504,10 @@ function us(e, t, n) {
2492
2504
  let l = n.getRoutes().filter((d) => !d.parent || // these routes have a parent with no component which will not appear in the view
2493
2505
  // therefore we still need to include them
2494
2506
  !d.parent.record.components);
2495
- l.forEach(Qn), f.filter && (l = l.filter((d) => (
2507
+ l.forEach(er), f.filter && (l = l.filter((d) => (
2496
2508
  // save matches state based on the payload
2497
- _t(d, f.filter.toLowerCase())
2498
- ))), l.forEach((d) => Kn(d, t.currentRoute.value)), f.rootNodes = l.map(Jn);
2509
+ Et(d, f.filter.toLowerCase())
2510
+ ))), l.forEach((d) => Zn(d, t.currentRoute.value)), f.rootNodes = l.map(Xn);
2499
2511
  }
2500
2512
  let u;
2501
2513
  o.on.getInspectorTree((f) => {
@@ -2504,16 +2516,16 @@ function us(e, t, n) {
2504
2516
  if (f.app === e && f.inspectorId === a) {
2505
2517
  const d = n.getRoutes().find((p) => p.record.__vd_id === f.nodeId);
2506
2518
  d && (f.state = {
2507
- options: fs(d)
2519
+ options: ds(d)
2508
2520
  });
2509
2521
  }
2510
2522
  }), o.sendInspectorTree(a), o.sendInspectorState(a);
2511
2523
  });
2512
2524
  }
2513
- function ls(e) {
2525
+ function fs(e) {
2514
2526
  return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : "";
2515
2527
  }
2516
- function fs(e) {
2528
+ function ds(e) {
2517
2529
  const { record: t } = e, n = [
2518
2530
  { editable: !1, key: "path", value: t.path }
2519
2531
  ];
@@ -2528,7 +2540,7 @@ function fs(e) {
2528
2540
  _custom: {
2529
2541
  type: null,
2530
2542
  readOnly: !0,
2531
- display: e.keys.map((r) => `${r.name}${ls(r)}`).join(" "),
2543
+ display: e.keys.map((r) => `${r.name}${fs(r)}`).join(" "),
2532
2544
  tooltip: "Param keys",
2533
2545
  value: e.keys
2534
2546
  }
@@ -2559,171 +2571,171 @@ function fs(e) {
2559
2571
  }
2560
2572
  }), n;
2561
2573
  }
2562
- const Gn = 15485081, Wn = 2450411, zn = 8702998, ds = 2282478, qn = 16486972, hs = 6710886, ps = 16704226, ms = 12131356;
2563
- function Jn(e) {
2574
+ const Jn = 15485081, Kn = 2450411, Qn = 8702998, hs = 2282478, Yn = 16486972, ps = 6710886, ms = 16704226, gs = 12131356;
2575
+ function Xn(e) {
2564
2576
  const t = [], { record: n } = e;
2565
2577
  n.name != null && t.push({
2566
2578
  label: String(n.name),
2567
2579
  textColor: 0,
2568
- backgroundColor: ds
2580
+ backgroundColor: hs
2569
2581
  }), n.aliasOf && t.push({
2570
2582
  label: "alias",
2571
2583
  textColor: 0,
2572
- backgroundColor: qn
2584
+ backgroundColor: Yn
2573
2585
  }), e.__vd_match && t.push({
2574
2586
  label: "matches",
2575
2587
  textColor: 0,
2576
- backgroundColor: Gn
2588
+ backgroundColor: Jn
2577
2589
  }), e.__vd_exactActive && t.push({
2578
2590
  label: "exact",
2579
2591
  textColor: 0,
2580
- backgroundColor: zn
2592
+ backgroundColor: Qn
2581
2593
  }), e.__vd_active && t.push({
2582
2594
  label: "active",
2583
2595
  textColor: 0,
2584
- backgroundColor: Wn
2596
+ backgroundColor: Kn
2585
2597
  }), n.redirect && t.push({
2586
2598
  label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects",
2587
2599
  textColor: 16777215,
2588
- backgroundColor: hs
2600
+ backgroundColor: ps
2589
2601
  });
2590
2602
  let r = n.__vd_id;
2591
- return r == null && (r = String(gs++), n.__vd_id = r), {
2603
+ return r == null && (r = String(vs++), n.__vd_id = r), {
2592
2604
  id: r,
2593
2605
  label: n.path,
2594
2606
  tags: t,
2595
- children: e.children.map(Jn)
2607
+ children: e.children.map(Xn)
2596
2608
  };
2597
2609
  }
2598
- let gs = 0;
2599
- const vs = /^\/(.*)\/([a-z]*)$/;
2600
- function Kn(e, t) {
2610
+ let vs = 0;
2611
+ const ys = /^\/(.*)\/([a-z]*)$/;
2612
+ function Zn(e, t) {
2601
2613
  const n = t.matched.length && se(t.matched[t.matched.length - 1], e.record);
2602
- e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => se(r, e.record))), e.children.forEach((r) => Kn(r, t));
2614
+ e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => se(r, e.record))), e.children.forEach((r) => Zn(r, t));
2603
2615
  }
2604
- function Qn(e) {
2605
- e.__vd_match = !1, e.children.forEach(Qn);
2616
+ function er(e) {
2617
+ e.__vd_match = !1, e.children.forEach(er);
2606
2618
  }
2607
- function _t(e, t) {
2608
- const n = String(e.re).match(vs);
2619
+ function Et(e, t) {
2620
+ const n = String(e.re).match(ys);
2609
2621
  if (e.__vd_match = !1, !n || n.length < 3)
2610
2622
  return !1;
2611
2623
  if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t))
2612
- return e.children.forEach((i) => _t(i, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
2613
- const o = e.record.path.toLowerCase(), s = be(o);
2614
- return !t.startsWith("/") && (s.includes(t) || o.includes(t)) || s.startsWith(t) || o.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((i) => _t(i, t));
2624
+ return e.children.forEach((i) => Et(i, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
2625
+ const o = e.record.path.toLowerCase(), s = Oe(o);
2626
+ return !t.startsWith("/") && (s.includes(t) || o.includes(t)) || s.startsWith(t) || o.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((i) => Et(i, t));
2615
2627
  }
2616
- function ys(e, t) {
2628
+ function _s(e, t) {
2617
2629
  const n = {};
2618
2630
  for (const r in e)
2619
2631
  t.includes(r) || (n[r] = e[r]);
2620
2632
  return n;
2621
2633
  }
2622
- function _s(e) {
2623
- const t = Uo(e.routes, e), n = e.parseQuery || Qo, r = e.stringifyQuery || en, o = e.history;
2634
+ function Es(e) {
2635
+ const t = Go(e.routes, e), n = e.parseQuery || Xo, r = e.stringifyQuery || rn, o = e.history;
2624
2636
  if (process.env.NODE_ENV !== "production" && !o)
2625
- throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');
2626
- const s = Oe(), i = Oe(), a = Oe(), c = Er(te);
2637
+ throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
2638
+ const s = ke(), i = ke(), a = ke(), c = Sr(te);
2627
2639
  let u = te;
2628
2640
  Z && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
2629
- const f = et.bind(null, (h) => "" + h), l = et.bind(null, ho), d = (
2641
+ const f = nt.bind(null, (h) => "" + h), l = nt.bind(null, go), d = (
2630
2642
  // @ts-expect-error: intentionally avoid the type check
2631
- et.bind(null, be)
2643
+ nt.bind(null, Oe)
2632
2644
  );
2633
2645
  function p(h, g) {
2634
2646
  let m, _;
2635
- return Bn(h) ? (m = t.getRecordMatcher(h), process.env.NODE_ENV !== "production" && !m && O(`Parent route "${String(h)}" not found when adding child route`, g), _ = g) : _ = h, t.addRoute(_, m);
2647
+ return Gn(h) ? (m = t.getRecordMatcher(h), process.env.NODE_ENV !== "production" && !m && O(`Parent route "${String(h)}" not found when adding child route`, g), _ = g) : _ = h, t.addRoute(_, m);
2636
2648
  }
2637
2649
  function b(h) {
2638
2650
  const g = t.getRecordMatcher(h);
2639
2651
  g ? t.removeRoute(g) : process.env.NODE_ENV !== "production" && O(`Cannot remove non-existent route "${String(h)}"`);
2640
2652
  }
2641
- function v() {
2653
+ function S() {
2642
2654
  return t.getRoutes().map((h) => h.record);
2643
2655
  }
2644
- function S(h) {
2656
+ function E(h) {
2645
2657
  return !!t.getRecordMatcher(h);
2646
2658
  }
2647
- function C(h, g) {
2648
- if (g = I({}, g || c.value), typeof h == "string") {
2649
- const k = tt(n, h, g.path), T = t.resolve({ path: k.path }, g), ae = o.createHref(k.fullPath);
2650
- return process.env.NODE_ENV !== "production" && (ae.startsWith("//") ? O(`Location "${h}" resolved to "${ae}". A resolved location cannot start with multiple slashes.`) : T.matched.length || O(`No match found for location with path "${h}"`)), I(k, T, {
2659
+ function R(h, g) {
2660
+ if (g = C({}, g || c.value), typeof h == "string") {
2661
+ const N = rt(n, h, g.path), T = t.resolve({ path: N.path }, g), ce = o.createHref(N.fullPath);
2662
+ return process.env.NODE_ENV !== "production" && (ce.startsWith("//") ? O(`Location "${h}" resolved to "${ce}". A resolved location cannot start with multiple slashes.`) : T.matched.length || O(`No match found for location with path "${h}"`)), C(N, T, {
2651
2663
  params: d(T.params),
2652
- hash: be(k.hash),
2664
+ hash: Oe(N.hash),
2653
2665
  redirectedFrom: void 0,
2654
- href: ae
2666
+ href: ce
2655
2667
  });
2656
2668
  }
2657
- if (process.env.NODE_ENV !== "production" && !He(h))
2669
+ if (process.env.NODE_ENV !== "production" && !We(h))
2658
2670
  return O(`router.resolve() was passed an invalid location. This will fail in production.
2659
- - Location:`, h), C({});
2671
+ - Location:`, h), R({});
2660
2672
  let m;
2661
2673
  if (h.path != null)
2662
2674
  process.env.NODE_ENV !== "production" && "params" in h && !("name" in h) && // @ts-expect-error: the type is never
2663
- Object.keys(h.params).length && O(`Path "${h.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), m = I({}, h, {
2664
- path: tt(n, h.path, g.path).path
2675
+ Object.keys(h.params).length && O(`Path "${h.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), m = C({}, h, {
2676
+ path: rt(n, h.path, g.path).path
2665
2677
  });
2666
2678
  else {
2667
- const k = I({}, h.params);
2668
- for (const T in k)
2669
- k[T] == null && delete k[T];
2670
- m = I({}, h, {
2671
- params: l(k)
2679
+ const N = C({}, h.params);
2680
+ for (const T in N)
2681
+ N[T] == null && delete N[T];
2682
+ m = C({}, h, {
2683
+ params: l(N)
2672
2684
  }), g.params = l(g.params);
2673
2685
  }
2674
- const _ = t.resolve(m, g), R = h.hash || "";
2675
- process.env.NODE_ENV !== "production" && R && !R.startsWith("#") && O(`A \`hash\` should always start with the character "#". Replace "${R}" with "#${R}".`), _.params = f(d(_.params));
2676
- const D = go(r, I({}, h, {
2677
- hash: uo(R),
2686
+ const _ = t.resolve(m, g), I = h.hash || "";
2687
+ process.env.NODE_ENV !== "production" && I && !I.startsWith("#") && O(`A \`hash\` should always start with the character "#". Replace "${I}" with "#${I}".`), _.params = f(d(_.params));
2688
+ const D = _o(r, C({}, h, {
2689
+ hash: ho(I),
2678
2690
  path: _.path
2679
2691
  })), $ = o.createHref(D);
2680
- return process.env.NODE_ENV !== "production" && ($.startsWith("//") ? O(`Location "${h}" resolved to "${$}". A resolved location cannot start with multiple slashes.`) : _.matched.length || O(`No match found for location with path "${h.path != null ? h.path : h}"`)), I({
2692
+ return process.env.NODE_ENV !== "production" && ($.startsWith("//") ? O(`Location "${h}" resolved to "${$}". A resolved location cannot start with multiple slashes.`) : _.matched.length || O(`No match found for location with path "${h.path != null ? h.path : h}"`)), C({
2681
2693
  fullPath: D,
2682
2694
  // keep the hash encoded so fullPath is effectively path + encodedQuery +
2683
2695
  // hash
2684
- hash: R,
2696
+ hash: I,
2685
2697
  query: (
2686
2698
  // if the user is using a custom query lib like qs, we might have
2687
2699
  // nested objects, so we keep the query as is, meaning it can contain
2688
2700
  // numbers at `$route.query`, but at the point, the user will have to
2689
2701
  // use their own type anyway.
2690
2702
  // https://github.com/vuejs/router/issues/328#issuecomment-649481567
2691
- r === en ? Yo(h.query) : h.query || {}
2703
+ r === rn ? Zo(h.query) : h.query || {}
2692
2704
  )
2693
2705
  }, _, {
2694
2706
  redirectedFrom: void 0,
2695
2707
  href: $
2696
2708
  });
2697
2709
  }
2698
- function N(h) {
2699
- return typeof h == "string" ? tt(n, h, c.value.path) : I({}, h);
2710
+ function k(h) {
2711
+ return typeof h == "string" ? rt(n, h, c.value.path) : C({}, h);
2700
2712
  }
2701
2713
  function P(h, g) {
2702
2714
  if (u !== h)
2703
- return we(8, {
2715
+ return Ne(8, {
2704
2716
  from: g,
2705
2717
  to: h
2706
2718
  });
2707
2719
  }
2708
- function j(h) {
2720
+ function M(h) {
2709
2721
  return w(h);
2710
2722
  }
2711
- function U(h) {
2712
- return j(I(N(h), { replace: !0 }));
2723
+ function B(h) {
2724
+ return M(C(k(h), { replace: !0 }));
2713
2725
  }
2714
2726
  function q(h) {
2715
2727
  const g = h.matched[h.matched.length - 1];
2716
2728
  if (g && g.redirect) {
2717
2729
  const { redirect: m } = g;
2718
2730
  let _ = typeof m == "function" ? m(h) : m;
2719
- if (typeof _ == "string" && (_ = _.includes("?") || _.includes("#") ? _ = N(_) : (
2731
+ if (typeof _ == "string" && (_ = _.includes("?") || _.includes("#") ? _ = k(_) : (
2720
2732
  // force empty params
2721
2733
  { path: _ }
2722
2734
  ), _.params = {}), process.env.NODE_ENV !== "production" && _.path == null && !("name" in _))
2723
2735
  throw O(`Invalid redirect found:
2724
2736
  ${JSON.stringify(_, null, 2)}
2725
2737
  when navigating to "${h.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
2726
- return I({
2738
+ return C({
2727
2739
  query: h.query,
2728
2740
  hash: h.hash,
2729
2741
  // avoid transferring params if the redirect has a path
@@ -2732,11 +2744,11 @@ ${JSON.stringify(_, null, 2)}
2732
2744
  }
2733
2745
  }
2734
2746
  function w(h, g) {
2735
- const m = u = C(h), _ = c.value, R = h.state, D = h.force, $ = h.replace === !0, k = q(m);
2736
- if (k)
2747
+ const m = u = R(h), _ = c.value, I = h.state, D = h.force, $ = h.replace === !0, N = q(m);
2748
+ if (N)
2737
2749
  return w(
2738
- I(N(k), {
2739
- state: typeof k == "object" ? I({}, R, k.state) : R,
2750
+ C(k(N), {
2751
+ state: typeof N == "object" ? C({}, I, N.state) : I,
2740
2752
  force: D,
2741
2753
  replace: $
2742
2754
  }),
@@ -2745,8 +2757,8 @@ ${JSON.stringify(_, null, 2)}
2745
2757
  );
2746
2758
  const T = m;
2747
2759
  T.redirectedFrom = g;
2748
- let ae;
2749
- return !D && Gt(r, _, m) && (ae = we(16, { to: T, from: _ }), Mt(
2760
+ let ce;
2761
+ return !D && zt(r, _, m) && (ce = Ne(16, { to: T, from: _ }), Vt(
2750
2762
  _,
2751
2763
  _,
2752
2764
  // this is a push, the only way for it to be triggered from a
@@ -2755,25 +2767,25 @@ ${JSON.stringify(_, null, 2)}
2755
2767
  // This cannot be the first navigation because the initial location
2756
2768
  // cannot be manually navigated to
2757
2769
  !1
2758
- )), (ae ? Promise.resolve(ae) : E(T, _)).catch((H) => X(H) ? (
2770
+ )), (ce ? Promise.resolve(ce) : y(T, _)).catch((U) => X(U) ? (
2759
2771
  // navigation redirects still mark the router as ready
2760
2772
  X(
2761
- H,
2773
+ U,
2762
2774
  2
2763
2775
  /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
2764
- ) ? H : Je(H)
2776
+ ) ? U : Ke(U)
2765
2777
  ) : (
2766
2778
  // reject any unknown error
2767
- L(H, T, _)
2768
- )).then((H) => {
2769
- if (H) {
2779
+ Q(U, T, _)
2780
+ )).then((U) => {
2781
+ if (U) {
2770
2782
  if (X(
2771
- H,
2783
+ U,
2772
2784
  2
2773
2785
  /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
2774
2786
  ))
2775
2787
  return process.env.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
2776
- Gt(r, C(H.to), T) && // and we have done it a couple of times
2788
+ zt(r, R(U.to), T) && // and we have done it a couple of times
2777
2789
  g && // @ts-expect-error: added only in dev
2778
2790
  (g._count = g._count ? (
2779
2791
  // @ts-expect-error
@@ -2781,96 +2793,96 @@ ${JSON.stringify(_, null, 2)}
2781
2793
  ) : 1) > 30 ? (O(`Detected a possibly infinite redirection in a navigation guard when going from "${_.fullPath}" to "${T.fullPath}". Aborting to avoid a Stack Overflow.
2782
2794
  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"))) : w(
2783
2795
  // keep options
2784
- I({
2796
+ C({
2785
2797
  // preserve an existing replacement but allow the redirect to override it
2786
2798
  replace: $
2787
- }, N(H.to), {
2788
- state: typeof H.to == "object" ? I({}, R, H.to.state) : R,
2799
+ }, k(U.to), {
2800
+ state: typeof U.to == "object" ? C({}, I, U.to.state) : I,
2789
2801
  force: D
2790
2802
  }),
2791
2803
  // preserve the original redirectedFrom if any
2792
2804
  g || T
2793
2805
  );
2794
2806
  } else
2795
- H = A(T, _, !0, $, R);
2796
- return y(T, _, H), H;
2807
+ U = A(T, _, !0, $, I);
2808
+ return v(T, _, U), U;
2797
2809
  });
2798
2810
  }
2799
- function Dt(h, g) {
2811
+ function Mt(h, g) {
2800
2812
  const m = P(h, g);
2801
2813
  return m ? Promise.reject(m) : Promise.resolve();
2802
2814
  }
2803
2815
  function G(h) {
2804
- const g = Me.values().next().value;
2816
+ const g = xe.values().next().value;
2805
2817
  return g && typeof g.runWithContext == "function" ? g.runWithContext(h) : h();
2806
2818
  }
2807
- function E(h, g) {
2819
+ function y(h, g) {
2808
2820
  let m;
2809
- const [_, R, D] = Es(h, g);
2810
- m = nt(_.reverse(), "beforeRouteLeave", h, g);
2811
- for (const k of _)
2812
- k.leaveGuards.forEach((T) => {
2821
+ const [_, I, D] = bs(h, g);
2822
+ m = ot(_.reverse(), "beforeRouteLeave", h, g);
2823
+ for (const N of _)
2824
+ N.leaveGuards.forEach((T) => {
2813
2825
  m.push(ne(T, h, g));
2814
2826
  });
2815
- const $ = Dt.bind(null, h, g);
2816
- return m.push($), pe(m).then(() => {
2827
+ const $ = Mt.bind(null, h, g);
2828
+ return m.push($), ve(m).then(() => {
2817
2829
  m = [];
2818
- for (const k of s.list())
2819
- m.push(ne(k, h, g));
2820
- return m.push($), pe(m);
2830
+ for (const N of s.list())
2831
+ m.push(ne(N, h, g));
2832
+ return m.push($), ve(m);
2821
2833
  }).then(() => {
2822
- m = nt(R, "beforeRouteUpdate", h, g);
2823
- for (const k of R)
2824
- k.updateGuards.forEach((T) => {
2834
+ m = ot(I, "beforeRouteUpdate", h, g);
2835
+ for (const N of I)
2836
+ N.updateGuards.forEach((T) => {
2825
2837
  m.push(ne(T, h, g));
2826
2838
  });
2827
- return m.push($), pe(m);
2839
+ return m.push($), ve(m);
2828
2840
  }).then(() => {
2829
2841
  m = [];
2830
- for (const k of D)
2831
- if (k.beforeEnter)
2832
- if (F(k.beforeEnter))
2833
- for (const T of k.beforeEnter)
2842
+ for (const N of D)
2843
+ if (N.beforeEnter)
2844
+ if (H(N.beforeEnter))
2845
+ for (const T of N.beforeEnter)
2834
2846
  m.push(ne(T, h, g));
2835
2847
  else
2836
- m.push(ne(k.beforeEnter, h, g));
2837
- return m.push($), pe(m);
2838
- }).then(() => (h.matched.forEach((k) => k.enterCallbacks = {}), m = nt(D, "beforeRouteEnter", h, g, G), m.push($), pe(m))).then(() => {
2848
+ m.push(ne(N.beforeEnter, h, g));
2849
+ return m.push($), ve(m);
2850
+ }).then(() => (h.matched.forEach((N) => N.enterCallbacks = {}), m = ot(D, "beforeRouteEnter", h, g, G), m.push($), ve(m))).then(() => {
2839
2851
  m = [];
2840
- for (const k of i.list())
2841
- m.push(ne(k, h, g));
2842
- return m.push($), pe(m);
2843
- }).catch((k) => X(
2844
- k,
2852
+ for (const N of i.list())
2853
+ m.push(ne(N, h, g));
2854
+ return m.push($), ve(m);
2855
+ }).catch((N) => X(
2856
+ N,
2845
2857
  8
2846
2858
  /* ErrorTypes.NAVIGATION_CANCELLED */
2847
- ) ? k : Promise.reject(k));
2859
+ ) ? N : Promise.reject(N));
2848
2860
  }
2849
- function y(h, g, m) {
2861
+ function v(h, g, m) {
2850
2862
  a.list().forEach((_) => G(() => _(h, g, m)));
2851
2863
  }
2852
- function A(h, g, m, _, R) {
2864
+ function A(h, g, m, _, I) {
2853
2865
  const D = P(h, g);
2854
2866
  if (D)
2855
2867
  return D;
2856
- const $ = g === te, k = Z ? history.state : {};
2857
- m && (_ || $ ? o.replace(h.fullPath, I({
2858
- scroll: $ && k && k.scroll
2859
- }, R)) : o.push(h.fullPath, R)), c.value = h, Mt(h, g, m, $), Je();
2868
+ const $ = g === te, N = Z ? history.state : {};
2869
+ m && (_ || $ ? o.replace(h.fullPath, C({
2870
+ scroll: $ && N && N.scroll
2871
+ }, I)) : o.push(h.fullPath, I)), c.value = h, Vt(h, g, m, $), Ke();
2860
2872
  }
2861
- let M;
2873
+ let V;
2862
2874
  function ie() {
2863
- M || (M = o.listen((h, g, m) => {
2864
- if (!Vt.listening)
2875
+ V || (V = o.listen((h, g, m) => {
2876
+ if (!xt.listening)
2865
2877
  return;
2866
- const _ = C(h), R = q(_);
2867
- if (R) {
2868
- w(I(R, { replace: !0 }), _).catch($e);
2878
+ const _ = R(h), I = q(_);
2879
+ if (I) {
2880
+ w(C(I, { replace: !0 }), _).catch(Re);
2869
2881
  return;
2870
2882
  }
2871
2883
  u = _;
2872
2884
  const D = c.value;
2873
- Z && Oo(zt(D.fullPath, m.delta), We()), E(_, D).catch(($) => X(
2885
+ Z && Po(Jt(D.fullPath, m.delta), ze()), y(_, D).catch(($) => X(
2874
2886
  $,
2875
2887
  12
2876
2888
  /* ErrorTypes.NAVIGATION_CANCELLED */
@@ -2882,13 +2894,13 @@ ${JSON.stringify(_, null, 2)}
2882
2894
  $.to,
2883
2895
  _
2884
2896
  // avoid an uncaught rejection, let push call triggerError
2885
- ).then((k) => {
2897
+ ).then((N) => {
2886
2898
  X(
2887
- k,
2899
+ N,
2888
2900
  20
2889
2901
  /* ErrorTypes.NAVIGATION_DUPLICATED */
2890
- ) && !m.delta && m.type === Ae.pop && o.go(-1, !1);
2891
- }).catch($e), Promise.reject()) : (m.delta && o.go(-m.delta, !1), L($, _, D))).then(($) => {
2902
+ ) && !m.delta && m.type === De.pop && o.go(-1, !1);
2903
+ }).catch(Re), Promise.reject()) : (m.delta && o.go(-m.delta, !1), Q($, _, D))).then(($) => {
2892
2904
  $ = $ || A(
2893
2905
  // after navigation, all matched components are resolved
2894
2906
  _,
@@ -2900,86 +2912,86 @@ ${JSON.stringify(_, null, 2)}
2900
2912
  $,
2901
2913
  8
2902
2914
  /* ErrorTypes.NAVIGATION_CANCELLED */
2903
- ) ? o.go(-m.delta, !1) : m.type === Ae.pop && X(
2915
+ ) ? o.go(-m.delta, !1) : m.type === De.pop && X(
2904
2916
  $,
2905
2917
  20
2906
2918
  /* ErrorTypes.NAVIGATION_DUPLICATED */
2907
- ) && o.go(-1, !1)), y(_, D, $);
2908
- }).catch($e);
2919
+ ) && o.go(-1, !1)), v(_, D, $);
2920
+ }).catch(Re);
2909
2921
  }));
2910
2922
  }
2911
- let Se = Oe(), De = Oe(), K;
2912
- function L(h, g, m) {
2913
- Je(h);
2914
- const _ = De.list();
2915
- return _.length ? _.forEach((R) => R(h, g, m)) : (process.env.NODE_ENV !== "production" && O("uncaught error during route navigation:"), console.error(h)), Promise.reject(h);
2923
+ let ae = ke(), Ve = ke(), ge;
2924
+ function Q(h, g, m) {
2925
+ Ke(h);
2926
+ const _ = Ve.list();
2927
+ return _.length ? _.forEach((I) => I(h, g, m)) : (process.env.NODE_ENV !== "production" && O("uncaught error during route navigation:"), console.error(h)), Promise.reject(h);
2916
2928
  }
2917
- function hr() {
2918
- return K && c.value !== te ? Promise.resolve() : new Promise((h, g) => {
2919
- Se.add([h, g]);
2929
+ function F() {
2930
+ return ge && c.value !== te ? Promise.resolve() : new Promise((h, g) => {
2931
+ ae.add([h, g]);
2920
2932
  });
2921
2933
  }
2922
- function Je(h) {
2923
- return K || (K = !h, ie(), Se.list().forEach(([g, m]) => h ? m(h) : g()), Se.reset()), h;
2934
+ function Ke(h) {
2935
+ return ge || (ge = !h, ie(), ae.list().forEach(([g, m]) => h ? m(h) : g()), ae.reset()), h;
2924
2936
  }
2925
- function Mt(h, g, m, _) {
2926
- const { scrollBehavior: R } = e;
2927
- if (!Z || !R)
2937
+ function Vt(h, g, m, _) {
2938
+ const { scrollBehavior: I } = e;
2939
+ if (!Z || !I)
2928
2940
  return Promise.resolve();
2929
- const D = !m && ko(zt(h.fullPath, 0)) || (_ || !m) && history.state && history.state.scroll || null;
2930
- return it().then(() => R(h, g, D)).then(($) => $ && So($)).catch(($) => L($, h, g));
2941
+ const D = !m && $o(Jt(h.fullPath, 0)) || (_ || !m) && history.state && history.state.scroll || null;
2942
+ return ct().then(() => I(h, g, D)).then(($) => $ && ko($)).catch(($) => Q($, h, g));
2931
2943
  }
2932
- const Ke = (h) => o.go(h);
2933
- let Qe;
2934
- const Me = /* @__PURE__ */ new Set(), Vt = {
2944
+ const Qe = (h) => o.go(h);
2945
+ let Ye;
2946
+ const xe = /* @__PURE__ */ new Set(), xt = {
2935
2947
  currentRoute: c,
2936
2948
  listening: !0,
2937
2949
  addRoute: p,
2938
2950
  removeRoute: b,
2939
2951
  clearRoutes: t.clearRoutes,
2940
- hasRoute: S,
2941
- getRoutes: v,
2942
- resolve: C,
2952
+ hasRoute: E,
2953
+ getRoutes: S,
2954
+ resolve: R,
2943
2955
  options: e,
2944
- push: j,
2945
- replace: U,
2946
- go: Ke,
2947
- back: () => Ke(-1),
2948
- forward: () => Ke(1),
2956
+ push: M,
2957
+ replace: B,
2958
+ go: Qe,
2959
+ back: () => Qe(-1),
2960
+ forward: () => Qe(1),
2949
2961
  beforeEach: s.add,
2950
2962
  beforeResolve: i.add,
2951
2963
  afterEach: a.add,
2952
- onError: De.add,
2953
- isReady: hr,
2964
+ onError: Ve.add,
2965
+ isReady: F,
2954
2966
  install(h) {
2955
2967
  const g = this;
2956
- h.component("RouterLink", ns), h.component("RouterView", is), h.config.globalProperties.$router = g, Object.defineProperty(h.config.globalProperties, "$route", {
2968
+ h.component("RouterLink", rs), h.component("RouterView", as), h.config.globalProperties.$router = g, Object.defineProperty(h.config.globalProperties, "$route", {
2957
2969
  enumerable: !0,
2958
- get: () => le(c)
2970
+ get: () => fe(c)
2959
2971
  }), Z && // used for the initial navigation client side to avoid pushing
2960
2972
  // multiple times when the router is used in multiple apps
2961
- !Qe && c.value === te && (Qe = !0, j(o.location).catch((R) => {
2962
- process.env.NODE_ENV !== "production" && O("Unexpected error when starting the router:", R);
2973
+ !Ye && c.value === te && (Ye = !0, M(o.location).catch((I) => {
2974
+ process.env.NODE_ENV !== "production" && O("Unexpected error when starting the router:", I);
2963
2975
  }));
2964
2976
  const m = {};
2965
- for (const R in te)
2966
- Object.defineProperty(m, R, {
2967
- get: () => c.value[R],
2977
+ for (const I in te)
2978
+ Object.defineProperty(m, I, {
2979
+ get: () => c.value[I],
2968
2980
  enumerable: !0
2969
2981
  });
2970
- h.provide(Nt, g), h.provide(Fn, br(m)), h.provide(yt, c);
2982
+ h.provide(Pt, g), h.provide(qn, Or(m)), h.provide(_t, c);
2971
2983
  const _ = h.unmount;
2972
- Me.add(h), h.unmount = function() {
2973
- Me.delete(h), Me.size < 1 && (u = te, M && M(), M = null, c.value = te, Qe = !1, K = !1), _();
2974
- }, process.env.NODE_ENV !== "production" && Z && us(h, g, t);
2984
+ xe.add(h), h.unmount = function() {
2985
+ xe.delete(h), xe.size < 1 && (u = te, V && V(), V = null, c.value = te, Ye = !1, ge = !1), _();
2986
+ }, process.env.NODE_ENV !== "production" && Z && ls(h, g, t);
2975
2987
  }
2976
2988
  };
2977
- function pe(h) {
2989
+ function ve(h) {
2978
2990
  return h.reduce((g, m) => g.then(() => G(m)), Promise.resolve());
2979
2991
  }
2980
- return Vt;
2992
+ return xt;
2981
2993
  }
2982
- function Es(e, t) {
2994
+ function bs(e, t) {
2983
2995
  const n = [], r = [], o = [], s = Math.max(t.matched.length, e.matched.length);
2984
2996
  for (let i = 0; i < s; i++) {
2985
2997
  const a = t.matched[i];
@@ -2989,36 +3001,36 @@ function Es(e, t) {
2989
3001
  }
2990
3002
  return [n, r, o];
2991
3003
  }
2992
- const bs = _s({
2993
- history: Ro(),
3004
+ const ws = Es({
3005
+ history: Ao(),
2994
3006
  routes: []
2995
3007
  });
2996
- function ws(e) {
3008
+ function Ss(e) {
2997
3009
  return e && typeof e.then == "function";
2998
3010
  }
2999
3011
  Promise.resolve(!1);
3000
3012
  Promise.resolve(!0);
3001
- var fe = Promise.resolve();
3002
- function Yn(e, t) {
3013
+ var he = Promise.resolve();
3014
+ function tr(e, t) {
3003
3015
  return e || (e = 0), new Promise(function(n) {
3004
3016
  return setTimeout(function() {
3005
3017
  return n(t);
3006
3018
  }, e);
3007
3019
  });
3008
3020
  }
3009
- function Ss(e, t) {
3021
+ function Os(e, t) {
3010
3022
  return Math.floor(Math.random() * (t - e + 1) + e);
3011
3023
  }
3012
- function Pt() {
3024
+ function $t() {
3013
3025
  return Math.random().toString(36).substring(2);
3014
3026
  }
3015
- var an = 0, rt = 0;
3016
- function ze() {
3027
+ var ln = 0, st = 0;
3028
+ function qe() {
3017
3029
  var e = (/* @__PURE__ */ new Date()).getTime();
3018
- return e === an ? (rt++, e * 1e3 + rt) : (an = e, rt = 0, e * 1e3);
3030
+ return e === ln ? (st++, e * 1e3 + st) : (ln = e, st = 0, e * 1e3);
3019
3031
  }
3020
- var Os = ze, ks = "native";
3021
- function Ns(e) {
3032
+ var Ns = qe, ks = "native";
3033
+ function Ps(e) {
3022
3034
  var t = {
3023
3035
  messagesCallback: null,
3024
3036
  bc: new BroadcastChannel(e),
@@ -3029,20 +3041,20 @@ function Ns(e) {
3029
3041
  t.messagesCallback && t.messagesCallback(n.data);
3030
3042
  }, t;
3031
3043
  }
3032
- function Ps(e) {
3044
+ function $s(e) {
3033
3045
  e.bc.close(), e.subFns = [];
3034
3046
  }
3035
- function $s(e, t) {
3047
+ function Rs(e, t) {
3036
3048
  try {
3037
- return e.bc.postMessage(t, !1), fe;
3049
+ return e.bc.postMessage(t, !1), he;
3038
3050
  } catch (n) {
3039
3051
  return Promise.reject(n);
3040
3052
  }
3041
3053
  }
3042
- function Rs(e, t) {
3054
+ function Is(e, t) {
3043
3055
  e.messagesCallback = t;
3044
3056
  }
3045
- function Is() {
3057
+ function Cs() {
3046
3058
  if (typeof window > "u")
3047
3059
  return !1;
3048
3060
  if (typeof BroadcastChannel == "function") {
@@ -3052,19 +3064,19 @@ function Is() {
3052
3064
  } else
3053
3065
  return !1;
3054
3066
  }
3055
- function Cs() {
3067
+ function As() {
3056
3068
  return 150;
3057
3069
  }
3058
- var As = {
3059
- create: Ns,
3060
- close: Ps,
3061
- onMessage: Rs,
3062
- postMessage: $s,
3063
- canBeUsed: Is,
3070
+ var Ts = {
3071
+ create: Ps,
3072
+ close: $s,
3073
+ onMessage: Is,
3074
+ postMessage: Rs,
3075
+ canBeUsed: Cs,
3064
3076
  type: ks,
3065
- averageResponseTime: Cs,
3066
- microSeconds: Os
3067
- }, Xn = (
3077
+ averageResponseTime: As,
3078
+ microSeconds: Ns
3079
+ }, nr = (
3068
3080
  /** @class */
3069
3081
  function() {
3070
3082
  function e(t) {
@@ -3074,16 +3086,16 @@ var As = {
3074
3086
  return this.map.has(t);
3075
3087
  }, e.prototype.add = function(t) {
3076
3088
  var n = this;
3077
- this.map.set(t, Zn()), this._to || (this._to = !0, setTimeout(function() {
3078
- n._to = !1, Ts(n);
3089
+ this.map.set(t, rr()), this._to || (this._to = !0, setTimeout(function() {
3090
+ n._to = !1, Ds(n);
3079
3091
  }, 0));
3080
3092
  }, e.prototype.clear = function() {
3081
3093
  this.map.clear();
3082
3094
  }, e;
3083
3095
  }()
3084
3096
  );
3085
- function Ts(e) {
3086
- for (var t = Zn() - e.ttl, n = e.map[Symbol.iterator](); ; ) {
3097
+ function Ds(e) {
3098
+ for (var t = rr() - e.ttl, n = e.map[Symbol.iterator](); ; ) {
3087
3099
  var r = n.next().value;
3088
3100
  if (!r)
3089
3101
  return;
@@ -3094,17 +3106,17 @@ function Ts(e) {
3094
3106
  return;
3095
3107
  }
3096
3108
  }
3097
- function Zn() {
3109
+ function rr() {
3098
3110
  return (/* @__PURE__ */ new Date()).getTime();
3099
3111
  }
3100
- function $t() {
3112
+ function Rt() {
3101
3113
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = JSON.parse(JSON.stringify(e));
3102
3114
  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;
3103
3115
  }
3104
- var Ds = ze, Ms = "pubkey.broadcast-channel-0-", ee = "messages", qe = {
3116
+ var Ms = qe, Vs = "pubkey.broadcast-channel-0-", ee = "messages", Je = {
3105
3117
  durability: "relaxed"
3106
- }, Vs = "idb";
3107
- function er() {
3118
+ }, xs = "idb";
3119
+ function or() {
3108
3120
  if (typeof indexedDB < "u") return indexedDB;
3109
3121
  if (typeof window < "u") {
3110
3122
  if (typeof window.mozIndexedDB < "u") return window.mozIndexedDB;
@@ -3113,11 +3125,11 @@ function er() {
3113
3125
  }
3114
3126
  return !1;
3115
3127
  }
3116
- function Rt(e) {
3128
+ function It(e) {
3117
3129
  e.commit && e.commit();
3118
3130
  }
3119
- function xs(e) {
3120
- var t = er(), n = Ms + e, r = t.open(n);
3131
+ function js(e) {
3132
+ var t = or(), n = Vs + e, r = t.open(n);
3121
3133
  return r.onupgradeneeded = function(o) {
3122
3134
  var s = o.target.result;
3123
3135
  s.createObjectStore(ee, {
@@ -3132,12 +3144,12 @@ function xs(e) {
3132
3144
  };
3133
3145
  });
3134
3146
  }
3135
- function js(e, t, n) {
3147
+ function Ls(e, t, n) {
3136
3148
  var r = (/* @__PURE__ */ new Date()).getTime(), o = {
3137
3149
  uuid: t,
3138
3150
  time: r,
3139
3151
  data: n
3140
- }, s = e.transaction([ee], "readwrite", qe);
3152
+ }, s = e.transaction([ee], "readwrite", Je);
3141
3153
  return new Promise(function(i, a) {
3142
3154
  s.oncomplete = function() {
3143
3155
  return i();
@@ -3145,11 +3157,11 @@ function js(e, t, n) {
3145
3157
  return a(u);
3146
3158
  };
3147
3159
  var c = s.objectStore(ee);
3148
- c.add(o), Rt(s);
3160
+ c.add(o), It(s);
3149
3161
  });
3150
3162
  }
3151
- function Ls(e, t) {
3152
- var n = e.transaction(ee, "readonly", qe), r = n.objectStore(ee), o = [], s = IDBKeyRange.bound(t + 1, 1 / 0);
3163
+ function Bs(e, t) {
3164
+ var n = e.transaction(ee, "readonly", Je), r = n.objectStore(ee), o = [], s = IDBKeyRange.bound(t + 1, 1 / 0);
3153
3165
  if (r.getAll) {
3154
3166
  var i = r.getAll(s);
3155
3167
  return new Promise(function(c, u) {
@@ -3173,14 +3185,14 @@ function Ls(e, t) {
3173
3185
  return u(l);
3174
3186
  }, f.onsuccess = function(l) {
3175
3187
  var d = l.target.result;
3176
- d ? d.value.id < t + 1 ? d.continue(t + 1) : (o.push(d.value), d.continue()) : (Rt(n), c(o));
3188
+ d ? d.value.id < t + 1 ? d.continue(t + 1) : (o.push(d.value), d.continue()) : (It(n), c(o));
3177
3189
  };
3178
3190
  });
3179
3191
  }
3180
- function Bs(e, t) {
3192
+ function Us(e, t) {
3181
3193
  if (e.closed)
3182
3194
  return Promise.resolve([]);
3183
- var n = e.db.transaction(ee, "readwrite", qe), r = n.objectStore(ee);
3195
+ var n = e.db.transaction(ee, "readwrite", Je), r = n.objectStore(ee);
3184
3196
  return Promise.all(t.map(function(o) {
3185
3197
  var s = r.delete(o);
3186
3198
  return new Promise(function(i) {
@@ -3190,107 +3202,107 @@ function Bs(e, t) {
3190
3202
  });
3191
3203
  }));
3192
3204
  }
3193
- function Us(e, t) {
3194
- var n = (/* @__PURE__ */ new Date()).getTime() - t, r = e.transaction(ee, "readonly", qe), o = r.objectStore(ee), s = [];
3205
+ function Fs(e, t) {
3206
+ var n = (/* @__PURE__ */ new Date()).getTime() - t, r = e.transaction(ee, "readonly", Je), o = r.objectStore(ee), s = [];
3195
3207
  return new Promise(function(i) {
3196
3208
  o.openCursor().onsuccess = function(a) {
3197
3209
  var c = a.target.result;
3198
3210
  if (c) {
3199
3211
  var u = c.value;
3200
- u.time < n ? (s.push(u), c.continue()) : (Rt(r), i(s));
3212
+ u.time < n ? (s.push(u), c.continue()) : (It(r), i(s));
3201
3213
  } else
3202
3214
  i(s);
3203
3215
  };
3204
3216
  });
3205
3217
  }
3206
3218
  function Hs(e) {
3207
- return Us(e.db, e.options.idb.ttl).then(function(t) {
3208
- return Bs(e, t.map(function(n) {
3219
+ return Fs(e.db, e.options.idb.ttl).then(function(t) {
3220
+ return Us(e, t.map(function(n) {
3209
3221
  return n.id;
3210
3222
  }));
3211
3223
  });
3212
3224
  }
3213
- function Fs(e, t) {
3214
- return t = $t(t), xs(e).then(function(n) {
3225
+ function Gs(e, t) {
3226
+ return t = Rt(t), js(e).then(function(n) {
3215
3227
  var r = {
3216
3228
  closed: !1,
3217
3229
  lastCursorId: 0,
3218
3230
  channelName: e,
3219
3231
  options: t,
3220
- uuid: Pt(),
3232
+ uuid: $t(),
3221
3233
  /**
3222
3234
  * emittedMessagesIds
3223
3235
  * contains all messages that have been emitted before
3224
3236
  * @type {ObliviousSet}
3225
3237
  */
3226
- eMIs: new Xn(t.idb.ttl * 2),
3238
+ eMIs: new nr(t.idb.ttl * 2),
3227
3239
  // ensures we do not read messages in parallel
3228
- writeBlockPromise: fe,
3240
+ writeBlockPromise: he,
3229
3241
  messagesCallback: null,
3230
3242
  readQueuePromises: [],
3231
3243
  db: n
3232
3244
  };
3233
3245
  return n.onclose = function() {
3234
3246
  r.closed = !0, t.idb.onclose && t.idb.onclose();
3235
- }, tr(r), r;
3247
+ }, sr(r), r;
3236
3248
  });
3237
3249
  }
3238
- function tr(e) {
3239
- e.closed || nr(e).then(function() {
3240
- return Yn(e.options.idb.fallbackInterval);
3250
+ function sr(e) {
3251
+ e.closed || ir(e).then(function() {
3252
+ return tr(e.options.idb.fallbackInterval);
3241
3253
  }).then(function() {
3242
- return tr(e);
3254
+ return sr(e);
3243
3255
  });
3244
3256
  }
3245
- function Gs(e, t) {
3257
+ function Ws(e, t) {
3246
3258
  return !(e.uuid === t.uuid || t.eMIs.has(e.id) || e.data.time < t.messagesCallbackTime);
3247
3259
  }
3248
- function nr(e) {
3249
- return e.closed || !e.messagesCallback ? fe : Ls(e.db, e.lastCursorId).then(function(t) {
3260
+ function ir(e) {
3261
+ return e.closed || !e.messagesCallback ? he : Bs(e.db, e.lastCursorId).then(function(t) {
3250
3262
  var n = t.filter(function(r) {
3251
3263
  return !!r;
3252
3264
  }).map(function(r) {
3253
3265
  return r.id > e.lastCursorId && (e.lastCursorId = r.id), r;
3254
3266
  }).filter(function(r) {
3255
- return Gs(r, e);
3267
+ return Ws(r, e);
3256
3268
  }).sort(function(r, o) {
3257
3269
  return r.time - o.time;
3258
3270
  });
3259
3271
  return n.forEach(function(r) {
3260
3272
  e.messagesCallback && (e.eMIs.add(r.id), e.messagesCallback(r.data));
3261
- }), fe;
3273
+ }), he;
3262
3274
  });
3263
3275
  }
3264
- function Ws(e) {
3276
+ function zs(e) {
3265
3277
  e.closed = !0, e.db.close();
3266
3278
  }
3267
- function zs(e, t) {
3279
+ function qs(e, t) {
3268
3280
  return e.writeBlockPromise = e.writeBlockPromise.then(function() {
3269
- return js(e.db, e.uuid, t);
3281
+ return Ls(e.db, e.uuid, t);
3270
3282
  }).then(function() {
3271
- Ss(0, 10) === 0 && Hs(e);
3283
+ Os(0, 10) === 0 && Hs(e);
3272
3284
  }), e.writeBlockPromise;
3273
3285
  }
3274
- function qs(e, t, n) {
3275
- e.messagesCallbackTime = n, e.messagesCallback = t, nr(e);
3286
+ function Js(e, t, n) {
3287
+ e.messagesCallbackTime = n, e.messagesCallback = t, ir(e);
3276
3288
  }
3277
- function Js() {
3278
- return !!er();
3289
+ function Ks() {
3290
+ return !!or();
3279
3291
  }
3280
- function Ks(e) {
3292
+ function Qs(e) {
3281
3293
  return e.idb.fallbackInterval * 2;
3282
3294
  }
3283
- var Qs = {
3284
- create: Fs,
3285
- close: Ws,
3286
- onMessage: qs,
3287
- postMessage: zs,
3288
- canBeUsed: Js,
3289
- type: Vs,
3290
- averageResponseTime: Ks,
3291
- microSeconds: Ds
3292
- }, Ys = ze, Xs = "pubkey.broadcastChannel-", Zs = "localstorage";
3293
- function rr() {
3295
+ var Ys = {
3296
+ create: Gs,
3297
+ close: zs,
3298
+ onMessage: Js,
3299
+ postMessage: qs,
3300
+ canBeUsed: Ks,
3301
+ type: xs,
3302
+ averageResponseTime: Qs,
3303
+ microSeconds: Ms
3304
+ }, Xs = qe, Zs = "pubkey.broadcastChannel-", ei = "localstorage";
3305
+ function ar() {
3294
3306
  var e;
3295
3307
  if (typeof window > "u") return null;
3296
3308
  try {
@@ -3299,54 +3311,54 @@ function rr() {
3299
3311
  }
3300
3312
  return e;
3301
3313
  }
3302
- function or(e) {
3303
- return Xs + e;
3314
+ function cr(e) {
3315
+ return Zs + e;
3304
3316
  }
3305
- function ei(e, t) {
3317
+ function ti(e, t) {
3306
3318
  return new Promise(function(n) {
3307
- Yn().then(function() {
3308
- var r = or(e.channelName), o = {
3309
- token: Pt(),
3319
+ tr().then(function() {
3320
+ var r = cr(e.channelName), o = {
3321
+ token: $t(),
3310
3322
  time: (/* @__PURE__ */ new Date()).getTime(),
3311
3323
  data: t,
3312
3324
  uuid: e.uuid
3313
3325
  }, s = JSON.stringify(o);
3314
- rr().setItem(r, s);
3326
+ ar().setItem(r, s);
3315
3327
  var i = document.createEvent("Event");
3316
3328
  i.initEvent("storage", !0, !0), i.key = r, i.newValue = s, window.dispatchEvent(i), n();
3317
3329
  });
3318
3330
  });
3319
3331
  }
3320
- function ti(e, t) {
3321
- var n = or(e), r = function(s) {
3332
+ function ni(e, t) {
3333
+ var n = cr(e), r = function(s) {
3322
3334
  s.key === n && t(JSON.parse(s.newValue));
3323
3335
  };
3324
3336
  return window.addEventListener("storage", r), r;
3325
3337
  }
3326
- function ni(e) {
3338
+ function ri(e) {
3327
3339
  window.removeEventListener("storage", e);
3328
3340
  }
3329
- function ri(e, t) {
3330
- if (t = $t(t), !sr())
3341
+ function oi(e, t) {
3342
+ if (t = Rt(t), !ur())
3331
3343
  throw new Error("BroadcastChannel: localstorage cannot be used");
3332
- var n = Pt(), r = new Xn(t.localstorage.removeTimeout), o = {
3344
+ var n = $t(), r = new nr(t.localstorage.removeTimeout), o = {
3333
3345
  channelName: e,
3334
3346
  uuid: n,
3335
3347
  eMIs: r
3336
3348
  // emittedMessagesIds
3337
3349
  };
3338
- return o.listener = ti(e, function(s) {
3350
+ return o.listener = ni(e, function(s) {
3339
3351
  o.messagesCallback && s.uuid !== n && (!s.token || r.has(s.token) || s.data.time && s.data.time < o.messagesCallbackTime || (r.add(s.token), o.messagesCallback(s.data)));
3340
3352
  }), o;
3341
3353
  }
3342
- function oi(e) {
3343
- ni(e.listener);
3354
+ function si(e) {
3355
+ ri(e.listener);
3344
3356
  }
3345
- function si(e, t, n) {
3357
+ function ii(e, t, n) {
3346
3358
  e.messagesCallbackTime = n, e.messagesCallback = t;
3347
3359
  }
3348
- function sr() {
3349
- var e = rr();
3360
+ function ur() {
3361
+ var e = ar();
3350
3362
  if (!e) return !1;
3351
3363
  try {
3352
3364
  var t = "__broadcastchannel_check";
@@ -3356,34 +3368,34 @@ function sr() {
3356
3368
  }
3357
3369
  return !0;
3358
3370
  }
3359
- function ii() {
3371
+ function ai() {
3360
3372
  var e = 120, t = navigator.userAgent.toLowerCase();
3361
3373
  return t.includes("safari") && !t.includes("chrome") ? e * 2 : e;
3362
3374
  }
3363
- var ai = {
3364
- create: ri,
3365
- close: oi,
3366
- onMessage: si,
3367
- postMessage: ei,
3368
- canBeUsed: sr,
3369
- type: Zs,
3370
- averageResponseTime: ii,
3371
- microSeconds: Ys
3372
- }, ci = ze, ui = "simulate", It = /* @__PURE__ */ new Set();
3373
- function li(e) {
3375
+ var ci = {
3376
+ create: oi,
3377
+ close: si,
3378
+ onMessage: ii,
3379
+ postMessage: ti,
3380
+ canBeUsed: ur,
3381
+ type: ei,
3382
+ averageResponseTime: ai,
3383
+ microSeconds: Xs
3384
+ }, ui = qe, li = "simulate", Ct = /* @__PURE__ */ new Set();
3385
+ function fi(e) {
3374
3386
  var t = {
3375
3387
  name: e,
3376
3388
  messagesCallback: null
3377
3389
  };
3378
- return It.add(t), t;
3390
+ return Ct.add(t), t;
3379
3391
  }
3380
- function fi(e) {
3381
- It.delete(e);
3392
+ function di(e) {
3393
+ Ct.delete(e);
3382
3394
  }
3383
- function di(e, t) {
3395
+ function hi(e, t) {
3384
3396
  return new Promise(function(n) {
3385
3397
  return setTimeout(function() {
3386
- var r = Array.from(It);
3398
+ var r = Array.from(Ct);
3387
3399
  r.filter(function(o) {
3388
3400
  return o.name === e.name;
3389
3401
  }).filter(function(o) {
@@ -3396,35 +3408,35 @@ function di(e, t) {
3396
3408
  }, 5);
3397
3409
  });
3398
3410
  }
3399
- function hi(e, t) {
3411
+ function pi(e, t) {
3400
3412
  e.messagesCallback = t;
3401
3413
  }
3402
- function pi() {
3414
+ function mi() {
3403
3415
  return !0;
3404
3416
  }
3405
- function mi() {
3417
+ function gi() {
3406
3418
  return 5;
3407
3419
  }
3408
- var gi = {
3409
- create: li,
3410
- close: fi,
3411
- onMessage: hi,
3412
- postMessage: di,
3413
- canBeUsed: pi,
3414
- type: ui,
3415
- averageResponseTime: mi,
3416
- microSeconds: ci
3417
- }, cn = [
3418
- As,
3420
+ var vi = {
3421
+ create: fi,
3422
+ close: di,
3423
+ onMessage: pi,
3424
+ postMessage: hi,
3425
+ canBeUsed: mi,
3426
+ type: li,
3427
+ averageResponseTime: gi,
3428
+ microSeconds: ui
3429
+ }, fn = [
3430
+ Ts,
3419
3431
  // fastest
3420
- Qs,
3421
- ai
3432
+ Ys,
3433
+ ci
3422
3434
  ];
3423
- function vi(e) {
3424
- var t = [].concat(e.methods, cn).filter(Boolean);
3435
+ function yi(e) {
3436
+ var t = [].concat(e.methods, fn).filter(Boolean);
3425
3437
  if (e.type) {
3426
3438
  if (e.type === "simulate")
3427
- return gi;
3439
+ return vi;
3428
3440
  var n = t.find(function(o) {
3429
3441
  return o.type === e.type;
3430
3442
  });
@@ -3438,19 +3450,19 @@ function vi(e) {
3438
3450
  return o.canBeUsed();
3439
3451
  });
3440
3452
  if (r) return r;
3441
- throw new Error("No usable method found in " + JSON.stringify(cn.map(function(o) {
3453
+ throw new Error("No usable method found in " + JSON.stringify(fn.map(function(o) {
3442
3454
  return o.type;
3443
3455
  })));
3444
3456
  }
3445
- var ir = /* @__PURE__ */ new Set(), yi = 0, Ct = function(t, n) {
3446
- this.id = yi++, ir.add(this), this.name = t, un && (n = un), this.options = $t(n), this.method = vi(this.options), this._iL = !1, this._onML = null, this._addEL = {
3457
+ var lr = /* @__PURE__ */ new Set(), _i = 0, At = function(t, n) {
3458
+ this.id = _i++, lr.add(this), this.name = t, dn && (n = dn), this.options = Rt(n), this.method = yi(this.options), this._iL = !1, this._onML = null, this._addEL = {
3447
3459
  message: [],
3448
3460
  internal: []
3449
- }, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null, _i(this);
3461
+ }, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null, Ei(this);
3450
3462
  };
3451
- Ct._pubkey = !0;
3452
- var un;
3453
- Ct.prototype = {
3463
+ At._pubkey = !0;
3464
+ var dn;
3465
+ At.prototype = {
3454
3466
  postMessage: function(t) {
3455
3467
  if (this.closed)
3456
3468
  throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed " + /**
@@ -3459,36 +3471,36 @@ Ct.prototype = {
3459
3471
  * gives some clue about where in your application this happens.
3460
3472
  */
3461
3473
  JSON.stringify(t));
3462
- return ln(this, "message", t);
3474
+ return hn(this, "message", t);
3463
3475
  },
3464
3476
  postInternal: function(t) {
3465
- return ln(this, "internal", t);
3477
+ return hn(this, "internal", t);
3466
3478
  },
3467
3479
  set onmessage(e) {
3468
3480
  var t = this.method.microSeconds(), n = {
3469
3481
  time: t,
3470
3482
  fn: e
3471
3483
  };
3472
- dn(this, "message", this._onML), e && typeof e == "function" ? (this._onML = n, fn(this, "message", n)) : this._onML = null;
3484
+ mn(this, "message", this._onML), e && typeof e == "function" ? (this._onML = n, pn(this, "message", n)) : this._onML = null;
3473
3485
  },
3474
3486
  addEventListener: function(t, n) {
3475
3487
  var r = this.method.microSeconds(), o = {
3476
3488
  time: r,
3477
3489
  fn: n
3478
3490
  };
3479
- fn(this, t, o);
3491
+ pn(this, t, o);
3480
3492
  },
3481
3493
  removeEventListener: function(t, n) {
3482
3494
  var r = this._addEL[t].find(function(o) {
3483
3495
  return o.fn === n;
3484
3496
  });
3485
- dn(this, t, r);
3497
+ mn(this, t, r);
3486
3498
  },
3487
3499
  close: function() {
3488
3500
  var t = this;
3489
3501
  if (!this.closed) {
3490
- ir.delete(this), this.closed = !0;
3491
- var n = this._prepP ? this._prepP : fe;
3502
+ lr.delete(this), this.closed = !0;
3503
+ var n = this._prepP ? this._prepP : he;
3492
3504
  return this._onML = null, this._addEL.message = [], n.then(function() {
3493
3505
  return Promise.all(Array.from(t._uMP));
3494
3506
  }).then(function() {
@@ -3507,12 +3519,12 @@ Ct.prototype = {
3507
3519
  return this.closed;
3508
3520
  }
3509
3521
  };
3510
- function ln(e, t, n) {
3522
+ function hn(e, t, n) {
3511
3523
  var r = e.method.microSeconds(), o = {
3512
3524
  time: r,
3513
3525
  type: t,
3514
3526
  data: n
3515
- }, s = e._prepP ? e._prepP : fe;
3527
+ }, s = e._prepP ? e._prepP : he;
3516
3528
  return s.then(function() {
3517
3529
  var i = e.method.postMessage(e._state, o);
3518
3530
  return e._uMP.add(i), i.catch().then(function() {
@@ -3520,25 +3532,25 @@ function ln(e, t, n) {
3520
3532
  }), i;
3521
3533
  });
3522
3534
  }
3523
- function _i(e) {
3535
+ function Ei(e) {
3524
3536
  var t = e.method.create(e.name, e.options);
3525
- ws(t) ? (e._prepP = t, t.then(function(n) {
3537
+ Ss(t) ? (e._prepP = t, t.then(function(n) {
3526
3538
  e._state = n;
3527
3539
  })) : e._state = t;
3528
3540
  }
3529
- function ar(e) {
3541
+ function fr(e) {
3530
3542
  return e._addEL.message.length > 0 || e._addEL.internal.length > 0;
3531
3543
  }
3532
- function fn(e, t, n) {
3533
- e._addEL[t].push(n), Ei(e);
3544
+ function pn(e, t, n) {
3545
+ e._addEL[t].push(n), bi(e);
3534
3546
  }
3535
- function dn(e, t, n) {
3547
+ function mn(e, t, n) {
3536
3548
  e._addEL[t] = e._addEL[t].filter(function(r) {
3537
3549
  return r !== n;
3538
- }), bi(e);
3550
+ }), wi(e);
3539
3551
  }
3540
- function Ei(e) {
3541
- if (!e._iL && ar(e)) {
3552
+ function bi(e) {
3553
+ if (!e._iL && fr(e)) {
3542
3554
  var t = function(o) {
3543
3555
  e._addEL[o.type].forEach(function(s) {
3544
3556
  var i = 1e5, a = s.time - i;
@@ -3550,14 +3562,14 @@ function Ei(e) {
3550
3562
  }) : (e._iL = !0, e.method.onMessage(e._state, t, n));
3551
3563
  }
3552
3564
  }
3553
- function bi(e) {
3554
- if (e._iL && !ar(e)) {
3565
+ function wi(e) {
3566
+ if (e._iL && !fr(e)) {
3555
3567
  e._iL = !1;
3556
3568
  var t = e.method.microSeconds();
3557
3569
  e.method.onMessage(e._state, null, t);
3558
3570
  }
3559
3571
  }
3560
- class ot extends Error {
3572
+ class it extends Error {
3561
3573
  /**
3562
3574
  * @param {string} message
3563
3575
  * @param {string[]} keys
@@ -3566,17 +3578,17 @@ class ot extends Error {
3566
3578
  super(t), this.name = "DevalueError", this.path = n.join("");
3567
3579
  }
3568
3580
  }
3569
- function hn(e) {
3581
+ function gn(e) {
3570
3582
  return Object(e) !== e;
3571
3583
  }
3572
- const wi = /* @__PURE__ */ Object.getOwnPropertyNames(
3584
+ const Si = /* @__PURE__ */ Object.getOwnPropertyNames(
3573
3585
  Object.prototype
3574
3586
  ).sort().join("\0");
3575
- function Si(e) {
3587
+ function Oi(e) {
3576
3588
  const t = Object.getPrototypeOf(e);
3577
- return t === Object.prototype || t === null || Object.getOwnPropertyNames(t).sort().join("\0") === wi;
3589
+ return t === Object.prototype || t === null || Object.getOwnPropertyNames(t).sort().join("\0") === Si;
3578
3590
  }
3579
- function Oi(e) {
3591
+ function Ni(e) {
3580
3592
  return Object.prototype.toString.call(e).slice(8, -1);
3581
3593
  }
3582
3594
  function ki(e) {
@@ -3606,7 +3618,7 @@ function ki(e) {
3606
3618
  return e < " " ? `\\u${e.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
3607
3619
  }
3608
3620
  }
3609
- function ye(e) {
3621
+ function be(e) {
3610
3622
  let t = "", n = 0;
3611
3623
  const r = e.length;
3612
3624
  for (let o = 0; o < r; o += 1) {
@@ -3615,11 +3627,11 @@ function ye(e) {
3615
3627
  }
3616
3628
  return `"${n === 0 ? e : t + e.slice(n)}"`;
3617
3629
  }
3618
- const At = -1, cr = -2, ur = -3, lr = -4, fr = -5, Tt = -6;
3619
- function pn(e, t) {
3620
- return Ni(JSON.parse(e));
3630
+ const Tt = -1, dr = -2, hr = -3, pr = -4, mr = -5, Dt = -6;
3631
+ function vn(e, t) {
3632
+ return Pi(JSON.parse(e));
3621
3633
  }
3622
- function Ni(e, t) {
3634
+ function Pi(e, t) {
3623
3635
  if (typeof e == "number") return o(e, !0);
3624
3636
  if (!Array.isArray(e) || e.length === 0)
3625
3637
  throw new Error("Invalid input");
@@ -3628,11 +3640,11 @@ function Ni(e, t) {
3628
3640
  e
3629
3641
  ), r = Array(n.length);
3630
3642
  function o(s, i = !1) {
3631
- if (s === At) return;
3632
- if (s === ur) return NaN;
3633
- if (s === lr) return 1 / 0;
3634
- if (s === fr) return -1 / 0;
3635
- if (s === Tt) return -0;
3643
+ if (s === Tt) return;
3644
+ if (s === hr) return NaN;
3645
+ if (s === pr) return 1 / 0;
3646
+ if (s === mr) return -1 / 0;
3647
+ if (s === Dt) return -0;
3636
3648
  if (i) throw new Error("Invalid input");
3637
3649
  if (s in r) return r[s];
3638
3650
  const a = n[s];
@@ -3680,7 +3692,7 @@ function Ni(e, t) {
3680
3692
  r[s] = c;
3681
3693
  for (let u = 0; u < a.length; u += 1) {
3682
3694
  const f = a[u];
3683
- f !== cr && (c[u] = o(f));
3695
+ f !== dr && (c[u] = o(f));
3684
3696
  }
3685
3697
  }
3686
3698
  else {
@@ -3695,7 +3707,7 @@ function Ni(e, t) {
3695
3707
  }
3696
3708
  return o(0);
3697
3709
  }
3698
- function mn(e, t) {
3710
+ function yn(e, t) {
3699
3711
  const n = [], r = /* @__PURE__ */ new Map(), o = [];
3700
3712
  for (const u in t)
3701
3713
  o.push({ key: u, fn: t[u] });
@@ -3703,13 +3715,13 @@ function mn(e, t) {
3703
3715
  let i = 0;
3704
3716
  function a(u) {
3705
3717
  if (typeof u == "function")
3706
- throw new ot("Cannot stringify a function", s);
3718
+ throw new it("Cannot stringify a function", s);
3707
3719
  if (r.has(u)) return r.get(u);
3708
- if (u === void 0) return At;
3709
- if (Number.isNaN(u)) return ur;
3710
- if (u === 1 / 0) return lr;
3711
- if (u === -1 / 0) return fr;
3712
- if (u === 0 && 1 / u < 0) return Tt;
3720
+ if (u === void 0) return Tt;
3721
+ if (Number.isNaN(u)) return hr;
3722
+ if (u === 1 / 0) return pr;
3723
+ if (u === -1 / 0) return mr;
3724
+ if (u === 0 && 1 / u < 0) return Dt;
3713
3725
  const f = i++;
3714
3726
  r.set(u, f);
3715
3727
  for (const { key: d, fn: p } of o) {
@@ -3718,66 +3730,66 @@ function mn(e, t) {
3718
3730
  return n[f] = `["${d}",${a(b)}]`, f;
3719
3731
  }
3720
3732
  let l = "";
3721
- if (hn(u))
3722
- l = st(u);
3733
+ if (gn(u))
3734
+ l = at(u);
3723
3735
  else
3724
- switch (Oi(u)) {
3736
+ switch (Ni(u)) {
3725
3737
  case "Number":
3726
3738
  case "String":
3727
3739
  case "Boolean":
3728
- l = `["Object",${st(u)}]`;
3740
+ l = `["Object",${at(u)}]`;
3729
3741
  break;
3730
3742
  case "BigInt":
3731
3743
  l = `["BigInt",${u}]`;
3732
3744
  break;
3733
3745
  case "Date":
3734
- l = `["Date","${u.toISOString()}"]`;
3746
+ l = `["Date","${!isNaN(u.getDate()) ? u.toISOString() : ""}"]`;
3735
3747
  break;
3736
3748
  case "RegExp":
3737
- const { source: p, flags: b } = u;
3738
- l = b ? `["RegExp",${ye(p)},"${b}"]` : `["RegExp",${ye(p)}]`;
3749
+ const { source: b, flags: S } = u;
3750
+ l = S ? `["RegExp",${be(b)},"${S}"]` : `["RegExp",${be(b)}]`;
3739
3751
  break;
3740
3752
  case "Array":
3741
3753
  l = "[";
3742
- for (let v = 0; v < u.length; v += 1)
3743
- v > 0 && (l += ","), v in u ? (s.push(`[${v}]`), l += a(u[v]), s.pop()) : l += cr;
3754
+ for (let E = 0; E < u.length; E += 1)
3755
+ E > 0 && (l += ","), E in u ? (s.push(`[${E}]`), l += a(u[E]), s.pop()) : l += dr;
3744
3756
  l += "]";
3745
3757
  break;
3746
3758
  case "Set":
3747
3759
  l = '["Set"';
3748
- for (const v of u)
3749
- l += `,${a(v)}`;
3760
+ for (const E of u)
3761
+ l += `,${a(E)}`;
3750
3762
  l += "]";
3751
3763
  break;
3752
3764
  case "Map":
3753
3765
  l = '["Map"';
3754
- for (const [v, S] of u)
3766
+ for (const [E, R] of u)
3755
3767
  s.push(
3756
- `.get(${hn(v) ? st(v) : "..."})`
3757
- ), l += `,${a(v)},${a(S)}`;
3768
+ `.get(${gn(E) ? at(E) : "..."})`
3769
+ ), l += `,${a(E)},${a(R)}`, s.pop();
3758
3770
  l += "]";
3759
3771
  break;
3760
3772
  default:
3761
- if (!Si(u))
3762
- throw new ot(
3773
+ if (!Oi(u))
3774
+ throw new it(
3763
3775
  "Cannot stringify arbitrary non-POJOs",
3764
3776
  s
3765
3777
  );
3766
3778
  if (Object.getOwnPropertySymbols(u).length > 0)
3767
- throw new ot(
3779
+ throw new it(
3768
3780
  "Cannot stringify POJOs with symbolic keys",
3769
3781
  s
3770
3782
  );
3771
3783
  if (Object.getPrototypeOf(u) === null) {
3772
3784
  l = '["null"';
3773
- for (const v in u)
3774
- s.push(`.${v}`), l += `,${ye(v)},${a(u[v])}`, s.pop();
3785
+ for (const E in u)
3786
+ s.push(`.${E}`), l += `,${be(E)},${a(u[E])}`, s.pop();
3775
3787
  l += "]";
3776
3788
  } else {
3777
3789
  l = "{";
3778
- let v = !1;
3779
- for (const S in u)
3780
- v && (l += ","), v = !0, s.push(`.${S}`), l += `${ye(S)}:${a(u[S])}`, s.pop();
3790
+ let E = !1;
3791
+ for (const R in u)
3792
+ E && (l += ","), E = !0, s.push(`.${R}`), l += `${be(R)}:${a(u[R])}`, s.pop();
3781
3793
  l += "}";
3782
3794
  }
3783
3795
  }
@@ -3786,17 +3798,17 @@ function mn(e, t) {
3786
3798
  const c = a(e);
3787
3799
  return c < 0 ? `${c}` : `[${n.join(",")}]`;
3788
3800
  }
3789
- function st(e) {
3801
+ function at(e) {
3790
3802
  const t = typeof e;
3791
- return t === "string" ? ye(e) : e instanceof String ? ye(e.toString()) : e === void 0 ? At.toString() : e === 0 && 1 / e < 0 ? Tt.toString() : t === "bigint" ? `["BigInt","${e}"]` : String(e);
3803
+ return t === "string" ? be(e) : e instanceof String ? be(e.toString()) : e === void 0 ? Tt.toString() : e === 0 && 1 / e < 0 ? Dt.toString() : t === "bigint" ? `["BigInt","${e}"]` : String(e);
3792
3804
  }
3793
- function Pi(e, t, { initialize: n, type: r }) {
3794
- let o = `${t.$id}-${e.toString()}`, s = new Ct(o, { type: r }), i = !1, a = 0;
3795
- Te(() => t[e], (f) => {
3796
- i || (a = Date.now(), s.postMessage({ timestamp: a, state: pn(mn(f)) })), i = !1;
3805
+ function $i(e, t, { initialize: n, type: r }) {
3806
+ let o = `${t.$id}-${e.toString()}`, s = new At(o, { type: r }), i = !1, a = 0;
3807
+ Me(() => t[e], (f) => {
3808
+ i || (a = Date.now(), s.postMessage({ timestamp: a, state: vn(yn(f)) })), i = !1;
3797
3809
  }, { deep: !0 }), s.onmessage = (f) => {
3798
3810
  if (f === void 0) {
3799
- s.postMessage({ timestamp: a, state: pn(mn(t[e])) });
3811
+ s.postMessage({ timestamp: a, state: vn(yn(t[e])) });
3800
3812
  return;
3801
3813
  }
3802
3814
  f.timestamp <= a || (i = !0, a = f.timestamp, t[e] = f.state);
@@ -3804,33 +3816,33 @@ function Pi(e, t, { initialize: n, type: r }) {
3804
3816
  let c = () => s.postMessage(void 0), u = () => s.close();
3805
3817
  return n && c(), { sync: c, unshare: u };
3806
3818
  }
3807
- var $i = (e, t) => Object.keys(t).includes(e), Ri = ({ initialize: e = !0, enable: t = !0, type: n }) => ({ store: r, options: o }) => {
3819
+ var Ri = (e, t) => Object.keys(t).includes(e), Ii = ({ initialize: e = !0, enable: t = !0, type: n }) => ({ store: r, options: o }) => {
3808
3820
  var a, c;
3809
3821
  let s = ((a = o == null ? void 0 : o.share) == null ? void 0 : a.enable) ?? t, i = ((c = o == null ? void 0 : o.share) == null ? void 0 : c.omit) ?? [];
3810
3822
  !s || Object.keys(r.$state).forEach((u) => {
3811
3823
  var f;
3812
- i.includes(u) || !$i(u, r.$state) || Pi(u, r, { initialize: ((f = o == null ? void 0 : o.share) == null ? void 0 : f.initialize) ?? e, type: n });
3824
+ i.includes(u) || !Ri(u, r.$state) || $i(u, r, { initialize: ((f = o == null ? void 0 : o.share) == null ? void 0 : f.initialize) ?? e, type: n });
3813
3825
  });
3814
3826
  };
3815
- const dr = qr();
3816
- dr.use(
3817
- Ri({
3827
+ const gr = Qr();
3828
+ gr.use(
3829
+ Ii({
3818
3830
  enable: !0,
3819
3831
  initialize: !0
3820
3832
  })
3821
3833
  );
3822
- const Di = {
3834
+ const Mi = {
3823
3835
  install: (e, t) => {
3824
- const n = (t == null ? void 0 : t.router) || bs, r = new ht(n, t == null ? void 0 : t.getMeta);
3825
- if (e.use(n), e.use(dr), e.provide("$registry", r), t != null && t.components)
3836
+ const n = (t == null ? void 0 : t.router) || ws, r = new pt(n, t == null ? void 0 : t.getMeta);
3837
+ if (e.use(n), e.use(gr), e.provide("$registry", r), t != null && t.components)
3826
3838
  for (const [o, s] of Object.entries(t.components))
3827
3839
  e.component(o, s);
3828
3840
  }
3829
3841
  };
3830
3842
  export {
3831
- Ti as DoctypeMeta,
3832
- ht as Registry,
3833
- Di as Stonecrop,
3834
- Ai as useStonecrop
3843
+ Di as DoctypeMeta,
3844
+ pt as Registry,
3845
+ Mi as Stonecrop,
3846
+ Ti as useStonecrop
3835
3847
  };
3836
3848
  //# sourceMappingURL=stonecrop.js.map