@kitbag/router 0.20.2 → 0.20.3

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.
@@ -1,14 +1,14 @@
1
1
  var Vr = Object.defineProperty;
2
2
  var Zr = (t, e, r) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var T = (t, e, r) => Zr(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { inject as it, markRaw as Ut, reactive as _t, defineAsyncComponent as Or, watch as nt, onUnmounted as qt, computed as Z, ref as Pt, toValue as $, toRefs as jr, defineComponent as vt, createElementBlock as $r, openBlock as Oe, normalizeClass as Hr, renderSlot as je, normalizeProps as $e, guardReactiveProps as _r, unref as X, h as dt, getCurrentInstance as qr, provide as Ir, createCommentVNode as Dr, mergeProps as Jr, createBlock as Fr, resolveDynamicComponent as Tr } from "vue";
4
+ import { inject as it, markRaw as Ut, reactive as Ht, defineAsyncComponent as Or, watch as nt, onUnmounted as qt, computed as Z, ref as Pt, toValue as $, toRefs as jr, defineComponent as vt, createElementBlock as $r, openBlock as Oe, normalizeClass as _r, renderSlot as je, normalizeProps as $e, guardReactiveProps as Hr, unref as X, h as dt, getCurrentInstance as qr, onServerPrefetch as Ir, provide as Dr, createCommentVNode as Jr, mergeProps as Fr, createBlock as Tr, resolveDynamicComponent as Mr } from "vue";
5
5
  function M(t) {
6
6
  return typeof t != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(t);
7
7
  }
8
- function He(t) {
8
+ function _e(t) {
9
9
  return M(t) ? t : `/${t}`;
10
10
  }
11
- class Mr extends Error {
11
+ class Wr extends Error {
12
12
  /**
13
13
  * Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.
14
14
  * @param paramName - The name of the parameter that was duplicated.
@@ -17,7 +17,7 @@ class Mr extends Error {
17
17
  super(`Invalid Param "${e}": Router does not support multiple params by the same name. All param names must be unique.`);
18
18
  }
19
19
  }
20
- class Wr extends Error {
20
+ class Gr extends Error {
21
21
  constructor(e) {
22
22
  super(`Child property on meta for ${e} conflicts with the parent meta.`);
23
23
  }
@@ -27,7 +27,7 @@ class Et extends Error {
27
27
  super("Router not installed");
28
28
  }
29
29
  }
30
- class Gr extends Error {
30
+ class zr extends Error {
31
31
  /**
32
32
  * Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
33
33
  * This detailed error message aids in quickly identifying and resolving mismatches in route usage.
@@ -38,9 +38,9 @@ class Gr extends Error {
38
38
  super(`useRoute called with incorrect route. Given ${e}, expected ${r}`);
39
39
  }
40
40
  }
41
- const _e = Symbol();
41
+ const He = Symbol();
42
42
  function It() {
43
- const t = it(_e);
43
+ const t = it(He);
44
44
  if (!t)
45
45
  throw new Et();
46
46
  return t;
@@ -55,16 +55,16 @@ function bt(...t) {
55
55
  const e = t.flatMap((r) => Array.isArray(r) ? r : Object.keys(r));
56
56
  for (const r of e)
57
57
  if (qe(e, r) > 1)
58
- throw new Mr(r);
58
+ throw new Wr(r);
59
59
  }
60
60
  class z extends Error {
61
61
  }
62
62
  const At = "[", Dt = "]";
63
- function zr(t) {
63
+ function Qr(t) {
64
64
  return t !== String && t !== Boolean && t !== Number && t !== Date;
65
65
  }
66
- function Qr(t) {
67
- return typeof t == "function" && zr(t);
66
+ function Kr(t) {
67
+ return typeof t == "function" && Qr(t);
68
68
  }
69
69
  function Jt(t) {
70
70
  return typeof t == "object" && "get" in t && typeof t.get == "function" && "set" in t && typeof t.set == "function";
@@ -72,20 +72,20 @@ function Jt(t) {
72
72
  function Ie(t) {
73
73
  return typeof t == "string" || typeof t == "number" || typeof t == "boolean";
74
74
  }
75
- function Kr(t, e) {
75
+ function Yr(t, e) {
76
76
  return Jt(t) ? { ...t, defaultValue: e ?? t.defaultValue } : {
77
77
  get: (r) => ot(r, t),
78
78
  set: (r) => at(r, t),
79
79
  defaultValue: e
80
80
  };
81
81
  }
82
- function Yr(t) {
82
+ function Xr(t) {
83
83
  return Jt(t) && t.defaultValue !== void 0;
84
84
  }
85
- function Ho(t, e) {
86
- return Kr(t, e);
85
+ function Io(t, e) {
86
+ return Yr(t, e);
87
87
  }
88
- function Xr(t) {
88
+ function tn(t) {
89
89
  return t !== void 0;
90
90
  }
91
91
  function mt(t) {
@@ -95,7 +95,7 @@ function W(t) {
95
95
  return typeof t == "string" && t.length > 0;
96
96
  }
97
97
  let w = null;
98
- async function tn() {
98
+ async function en() {
99
99
  const {
100
100
  ZodSchema: t,
101
101
  ZodString: e,
@@ -139,15 +139,15 @@ async function tn() {
139
139
  ZodFunction: c
140
140
  };
141
141
  }
142
- function en(t) {
142
+ function rn(t) {
143
143
  return Object.values(t).some((e) => Object.values(e.host.params).some((r) => Gt(r)) || Object.values(e.path.params).some((r) => Gt(r)) || Object.values(e.query.params).some((r) => Gt(r)));
144
144
  }
145
145
  function Gt(t) {
146
146
  return mt(t) && "parse" in t && typeof t.parse == "function" && "~standard" in t && mt(t["~standard"]) && "vendor" in t["~standard"] && t["~standard"].vendor === "zod";
147
147
  }
148
- async function rn() {
148
+ async function nn() {
149
149
  try {
150
- w = await tn();
150
+ w = await en();
151
151
  } catch {
152
152
  throw new Error("Failed to initialize Zod");
153
153
  }
@@ -173,9 +173,9 @@ function Je(t) {
173
173
  }
174
174
  };
175
175
  }
176
- const nn = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
176
+ const on = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
177
177
  function ct(t, e) {
178
- if (typeof e == "string" && nn.test(e)) {
178
+ if (typeof e == "string" && on.test(e)) {
179
179
  const r = new Date(e);
180
180
  return isNaN(r.getTime()) ? e : r;
181
181
  }
@@ -301,11 +301,11 @@ function N(t, e) {
301
301
  throw new Error("Validation failed");
302
302
  return r.value;
303
303
  }
304
- function on(t) {
304
+ function an(t) {
305
305
  return mt(t) && "type" in t && typeof t.type == "string" && "~standard" in t && mt(t["~standard"]) && "vendor" in t["~standard"] && t["~standard"].vendor === "valibot";
306
306
  }
307
307
  function Fe(t) {
308
- return on(t);
308
+ return an(t);
309
309
  }
310
310
  function Te(t) {
311
311
  return {
@@ -325,9 +325,9 @@ function Te(t) {
325
325
  }
326
326
  };
327
327
  }
328
- const an = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
328
+ const sn = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
329
329
  function ut(t, e) {
330
- if (typeof e == "string" && an.test(e)) {
330
+ if (typeof e == "string" && sn.test(e)) {
331
331
  const r = new Date(e);
332
332
  return isNaN(r.getTime()) ? e : r;
333
333
  }
@@ -431,7 +431,7 @@ function te(t, e) {
431
431
  throw new Error("Function schemas are not supported");
432
432
  return JSON.stringify(N(e, t));
433
433
  }
434
- function sn(t, e) {
434
+ function cn(t, e) {
435
435
  return t[e] ?? String;
436
436
  }
437
437
  const V = {
@@ -498,7 +498,7 @@ const V = {
498
498
  }
499
499
  }
500
500
  };
501
- function cn(t, e) {
501
+ function un(t, e) {
502
502
  switch (typeof e) {
503
503
  case "string":
504
504
  return Me.get(t, V) === e;
@@ -512,7 +512,7 @@ function cn(t, e) {
512
512
  }
513
513
  function ot(t, e, r = !1) {
514
514
  if (t === void 0 || !W(t)) {
515
- if (Yr(e))
515
+ if (Xr(e))
516
516
  return e.defaultValue;
517
517
  if (r)
518
518
  return;
@@ -528,7 +528,7 @@ function ot(t, e, r = !1) {
528
528
  return We.get(t, V);
529
529
  if (e === JSON)
530
530
  return Ge.get(t, V);
531
- if (Qr(e))
531
+ if (Kr(e))
532
532
  return e(t, V);
533
533
  if (Jt(e))
534
534
  return e.get(t, V);
@@ -538,13 +538,13 @@ function ot(t, e, r = !1) {
538
538
  throw new z();
539
539
  }
540
540
  if (Ie(e)) {
541
- if (cn(t, e))
541
+ if (un(t, e))
542
542
  return e;
543
543
  throw new z();
544
544
  }
545
545
  return De(e) ? Je(e).get(t, V) : Fe(e) ? Te(e).get(t, V) : t;
546
546
  }
547
- function un(t, e, r = !1) {
547
+ function fn(t, e, r = !1) {
548
548
  try {
549
549
  return ot(t, e, r);
550
550
  } catch (n) {
@@ -553,7 +553,7 @@ function un(t, e, r = !1) {
553
553
  throw n;
554
554
  }
555
555
  }
556
- function fn(t, e, r = !1) {
556
+ function ln(t, e, r = !1) {
557
557
  try {
558
558
  return at(t, e, r);
559
559
  } catch (n) {
@@ -596,7 +596,7 @@ function at(t, e, r = !1) {
596
596
  function se(t) {
597
597
  return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
598
598
  }
599
- function ln(t, e) {
599
+ function pn(t, e) {
600
600
  const r = Array.from(t.matchAll(e));
601
601
  if (r.length === 0)
602
602
  return [t];
@@ -609,11 +609,11 @@ function ln(t, e) {
609
609
  }, []), a = t.slice(n);
610
610
  return a && o.push(a), o;
611
611
  }
612
- function pn(t) {
612
+ function dn(t) {
613
613
  const e = ze(t.path.value);
614
614
  return new RegExp(`^${e}$`, "i");
615
615
  }
616
- function dn(t) {
616
+ function hn(t) {
617
617
  const e = new URLSearchParams(t.query.value);
618
618
  return Array.from(e.entries()).filter(([, r]) => !ce(r)).map(([r, n]) => {
619
619
  const o = ze(n);
@@ -621,22 +621,22 @@ function dn(t) {
621
621
  });
622
622
  }
623
623
  function ze(t) {
624
- return ln(t, new RegExp(Ft, "g")).map((e) => e.startsWith(At) ? Qe(e) : se(e)).join("");
624
+ return pn(t, new RegExp(Ft, "g")).map((e) => e.startsWith(At) ? Qe(e) : se(e)).join("");
625
625
  }
626
626
  function Qe(t) {
627
627
  return t.replace(new RegExp(Ft, "g"), ".+");
628
628
  }
629
- function hn(t, e) {
629
+ function yn(t, e) {
630
630
  const r = Ke(e);
631
631
  return t.replace(r, "(.*)");
632
632
  }
633
633
  function ie(t, e) {
634
- return mn(e).test(t.value);
634
+ return gn(e).test(t.value);
635
635
  }
636
636
  function ce(t) {
637
- return new RegExp(yn, "g").test(t);
637
+ return new RegExp(mn, "g").test(t);
638
638
  }
639
- const Ft = `\\${At}\\??([\\w-_]+)\\${Dt}`, yn = `\\${At}\\?([\\w-_]+)\\${Dt}`;
639
+ const Ft = `\\${At}\\??([\\w-_]+)\\${Dt}`, mn = `\\${At}\\?([\\w-_]+)\\${Dt}`;
640
640
  function ue(t) {
641
641
  const [e] = Ye(t, new RegExp(Ft, "g"));
642
642
  return e;
@@ -644,31 +644,31 @@ function ue(t) {
644
644
  function Ke(t) {
645
645
  return new RegExp(`\\${At}\\??${t}\\${Dt}`, "g");
646
646
  }
647
- function mn(t) {
647
+ function gn(t) {
648
648
  return new RegExp(`\\${At}\\?${t}\\${Dt}`, "g");
649
649
  }
650
650
  function Ye(t, e) {
651
651
  return Array.from(t.matchAll(e)).flatMap(([, ...n]) => n.map((o) => W(o) ? o : ""));
652
652
  }
653
- function gn(t = "", e = {}) {
653
+ function Rn(t = "", e = {}) {
654
654
  return W(t) ? Array.from(t.matchAll(new RegExp(Ft, "g"))).reduce((n, [o, a]) => {
655
655
  const s = ue(o);
656
656
  if (!s)
657
657
  return n;
658
- const p = sn(e, s);
658
+ const p = cn(e, s);
659
659
  return bt([s], n), n[a] = p, n;
660
660
  }, {}) : {};
661
661
  }
662
- function Rn(t) {
662
+ function wn(t) {
663
663
  return mt(t) && typeof t.value == "string";
664
664
  }
665
665
  function tt(t) {
666
- return t === void 0 ? Q() : Rn(t) ? t : Q(t, {});
666
+ return t === void 0 ? Q() : wn(t) ? t : Q(t, {});
667
667
  }
668
668
  function Q(t, e) {
669
669
  return {
670
670
  value: t ?? "",
671
- params: gn(t, e)
671
+ params: Rn(t, e)
672
672
  };
673
673
  }
674
674
  function Xe(t, e) {
@@ -676,23 +676,23 @@ function Xe(t, e) {
676
676
  const r = `${t.value}${e.value}`;
677
677
  return Q(r, { ...t.params, ...e.params });
678
678
  }
679
- function wn(t, e) {
680
- return Xe(t, e);
681
- }
682
679
  function vn(t, e) {
683
- return En(t, e), { ...t, ...e };
680
+ return Xe(t, e);
684
681
  }
685
682
  function En(t, e) {
683
+ return bn(t, e), { ...t, ...e };
684
+ }
685
+ function bn(t, e) {
686
686
  const r = Object.keys(t).find((n) => n in e && typeof e[n] != typeof t[n]);
687
687
  if (r)
688
- throw new Wr(r);
688
+ throw new Gr(r);
689
689
  }
690
- function bn(t, e) {
690
+ function Sn(t, e) {
691
691
  bt(t.params, e.params);
692
692
  const r = [t.value, e.value].filter(W).join("&");
693
693
  return Q(r, { ...t.params, ...e.params });
694
694
  }
695
- function Sn(t, e) {
695
+ function Pn(t, e) {
696
696
  return bt(t, e), { ...t, ...e };
697
697
  }
698
698
  function tr(t) {
@@ -714,10 +714,10 @@ function nr(t, e) {
714
714
  return {
715
715
  ...e,
716
716
  path: Xe(t.path, e.path),
717
- query: bn(t.query, e.query),
718
- meta: vn(t.meta, e.meta),
719
- state: Sn(t.state, e.state),
720
- hash: wn(t.hash, e.hash),
717
+ query: Sn(t.query, e.query),
718
+ meta: En(t.meta, e.meta),
719
+ state: Pn(t.state, e.state),
720
+ hash: vn(t.hash, e.hash),
721
721
  matches: [...t.matches, e.matched],
722
722
  host: t.host,
723
723
  depth: t.depth + 1
@@ -759,9 +759,9 @@ function pe() {
759
759
  let t = 0;
760
760
  return () => (++t).toString();
761
761
  }
762
- const Pn = pe()();
763
- function An(t) {
764
- return t === Pn;
762
+ const An = pe()();
763
+ function kn(t) {
764
+ return t === An;
765
765
  }
766
766
  const de = pe();
767
767
  function or(t) {
@@ -791,12 +791,12 @@ const Vt = { template: "<div>This is component</div>" }, he = gt({
791
791
  parent: he,
792
792
  name: "parentA.childA",
793
793
  path: "/childA/[?paramB]"
794
- }), kn = gt({
794
+ }), xn = gt({
795
795
  parent: he,
796
796
  name: "parentA.childB",
797
797
  path: "/childB/[paramD]",
798
798
  component: Vt
799
- }), xn = gt({
799
+ }), Nn = gt({
800
800
  parent: ar,
801
801
  name: "parentA.childA.grandChildA",
802
802
  path: "/[paramC]",
@@ -811,7 +811,7 @@ gt({
811
811
  path: "/",
812
812
  component: Vt
813
813
  });
814
- const Nn = "lazy", Ln = {
814
+ const Ln = "lazy", Un = {
815
815
  components: !0,
816
816
  props: !1
817
817
  };
@@ -823,8 +823,8 @@ function sr({ routerPrefetch: t, routePrefetch: e, linkPrefetch: r }, n) {
823
823
  o,
824
824
  a,
825
825
  s,
826
- Ln[n],
827
- Nn
826
+ Un[n],
827
+ Ln
828
828
  ].reduce((h, u) => Lt(h) ? h : h === !0 && Lt(u) ? u : h === !0 && !Lt(u) ? h : h === void 0 ? u : h, void 0);
829
829
  return Lt(p) ? p : !1;
830
830
  }
@@ -890,8 +890,8 @@ function ur() {
890
890
  };
891
891
  }
892
892
  const fr = Symbol();
893
- function Un() {
894
- const { setVueApp: t, runWithContext: e } = ur(), r = _t(/* @__PURE__ */ new Map()), { push: n, replace: o, reject: a } = cr(), s = (v, i, f) => i.matches.filter((c) => sr({ ...f, routePrefetch: c.prefetch }, "props") === v).flatMap((c) => S(c)).reduce((c, { id: l, name: E, props: A }) => {
893
+ function Bn() {
894
+ const { setVueApp: t, runWithContext: e } = ur(), r = Ht(/* @__PURE__ */ new Map()), { push: n, replace: o, reject: a } = cr(), s = (v, i, f) => i.matches.filter((c) => sr({ ...f, routePrefetch: c.prefetch }, "props") === v).flatMap((c) => S(c)).reduce((c, { id: l, name: E, props: A }) => {
895
895
  if (!A)
896
896
  return c;
897
897
  const P = L(l, E, i), g = e(() => be(() => A(i, {
@@ -999,14 +999,14 @@ function lr() {
999
999
  throw new Et();
1000
1000
  return t;
1001
1001
  }
1002
- const Bn = Or(() => new Promise((t) => {
1002
+ const Cn = Or(() => new Promise((t) => {
1003
1003
  t({ default: { template: "foo" } });
1004
1004
  }));
1005
1005
  function Se(t) {
1006
- return t.name === Bn.name && "__asyncLoader" in t;
1006
+ return t.name === Cn.name && "__asyncLoader" in t;
1007
1007
  }
1008
1008
  const pr = Symbol("visibilityObserver");
1009
- function Cn(t) {
1009
+ function Vn(t) {
1010
1010
  const e = it(pr);
1011
1011
  if (!e)
1012
1012
  throw new Et();
@@ -1025,8 +1025,8 @@ function Pe(t, e, r) {
1025
1025
  t.value && t.value.removeEventListener(e, r);
1026
1026
  });
1027
1027
  }
1028
- function Vn(t) {
1029
- const e = /* @__PURE__ */ new Map(), r = Pt(), { getPrefetchProps: n, setPrefetchProps: o } = lr(), { isElementVisible: a } = Cn(r), s = () => {
1028
+ function Zn(t) {
1029
+ const e = /* @__PURE__ */ new Map(), r = Pt(), { getPrefetchProps: n, setPrefetchProps: o } = lr(), { isElementVisible: a } = Vn(r), s = () => {
1030
1030
  const u = Array.from(e.values()).reduce((m, R) => (Object.assign(m, R), m), {});
1031
1031
  o(u);
1032
1032
  };
@@ -1041,14 +1041,14 @@ function Vn(t) {
1041
1041
  u && h("intent", u, m);
1042
1042
  }
1043
1043
  function h(u, m, R) {
1044
- Zn(u, m, R), e.has(u) || e.set(u, n(u, m, R));
1044
+ On(u, m, R), e.has(u) || e.set(u, n(u, m, R));
1045
1045
  }
1046
1046
  return {
1047
1047
  element: r,
1048
1048
  commit: s
1049
1049
  };
1050
1050
  }
1051
- function Zn(t, e, r) {
1051
+ function On(t, e, r) {
1052
1052
  e.matches.forEach((n) => {
1053
1053
  sr({
1054
1054
  ...r,
@@ -1059,10 +1059,10 @@ function Zn(t, e, r) {
1059
1059
  });
1060
1060
  }
1061
1061
  const dr = Symbol("isRouterRouteSymbol");
1062
- function On(t) {
1062
+ function jn(t) {
1063
1063
  return typeof t == "object" && t !== null && dr in t;
1064
1064
  }
1065
- function jn(t, e) {
1065
+ function $n(t, e) {
1066
1066
  function r(i, f, c) {
1067
1067
  if (typeof i == "object") {
1068
1068
  const E = {
@@ -1129,7 +1129,7 @@ function jn(t, e) {
1129
1129
  r({}, { state: i });
1130
1130
  }
1131
1131
  });
1132
- return _t({
1132
+ return Ht({
1133
1133
  id: s,
1134
1134
  matched: p,
1135
1135
  matches: h,
@@ -1144,7 +1144,7 @@ function jn(t, e) {
1144
1144
  });
1145
1145
  }
1146
1146
  function ee(t, e, { exact: r } = {}) {
1147
- return On(t) ? e === void 0 ? !0 : r ? t.matched.name === e : t.matches.map((n) => n.name).includes(e) : !1;
1147
+ return jn(t) ? e === void 0 ? !0 : r ? t.matched.name === e : t.matches.map((n) => n.name).includes(e) : !1;
1148
1148
  }
1149
1149
  function ye(...t) {
1150
1150
  const e = new URLSearchParams();
@@ -1155,7 +1155,7 @@ function ye(...t) {
1155
1155
  }
1156
1156
  return e;
1157
1157
  }
1158
- function $n(t, e = {}, r = {}) {
1158
+ function _n(t, e = {}, r = {}) {
1159
1159
  const n = It(), o = Z(() => {
1160
1160
  const i = $(t);
1161
1161
  return typeof i != "string" ? i : M(i) ? n.find(i, $(r)) : n.resolve(i, $(e), $(r));
@@ -1172,13 +1172,13 @@ function $n(t, e = {}, r = {}) {
1172
1172
  })), p = Z(() => {
1173
1173
  var i;
1174
1174
  return n.route.id === ((i = o.value) == null ? void 0 : i.id);
1175
- }), h = Z(() => ee(n.route) && Xr(o.value) && n.route.href.startsWith(o.value.href)), u = Z(() => {
1175
+ }), h = Z(() => ee(n.route) && tn(o.value) && n.route.href.startsWith(o.value.href)), u = Z(() => {
1176
1176
  var i;
1177
1177
  return n.route.href === ((i = o.value) == null ? void 0 : i.href);
1178
1178
  }), m = Z(() => !!a.value && n.isExternal(a.value)), R = Z(() => {
1179
1179
  const i = $(t);
1180
1180
  return typeof i != "string" || M(i) ? $(e) : $(r);
1181
- }), { element: L, commit: S } = Vn(() => ({
1181
+ }), { element: L, commit: S } = Zn(() => ({
1182
1182
  route: o.value,
1183
1183
  routerPrefetch: n.prefetch,
1184
1184
  linkPrefetch: R.value.prefetch
@@ -1205,8 +1205,10 @@ function $n(t, e = {}, r = {}) {
1205
1205
  replace: (i) => U({ ...i, replace: !0 })
1206
1206
  };
1207
1207
  }
1208
- const Hn = ["href"], _n = /* @__PURE__ */ vt({
1209
- __name: "routerLink",
1208
+ const Hn = ["href"], qn = {
1209
+ name: "RouterLink"
1210
+ }, In = /* @__PURE__ */ vt({
1211
+ ...qn,
1210
1212
  props: {
1211
1213
  to: {},
1212
1214
  prefetch: { type: [Boolean, String, Object], default: void 0 },
@@ -1219,7 +1221,7 @@ const Hn = ["href"], _n = /* @__PURE__ */ vt({
1219
1221
  const e = t, r = It(), n = Z(() => U(e.to)), o = Z(() => v(e.to)), a = Z(() => {
1220
1222
  const { to: f, ...c } = e;
1221
1223
  return c;
1222
- }), { element: s, isMatch: p, isExactMatch: h, isActive: u, isExactActive: m, isExternal: R, push: L } = $n(() => typeof e.to == "function" ? e.to(r.resolve) : e.to, a), S = Z(() => ({
1224
+ }), { element: s, isMatch: p, isExactMatch: h, isActive: u, isExactActive: m, isExternal: R, push: L } = _n(() => typeof e.to == "function" ? e.to(r.resolve) : e.to, a), S = Z(() => ({
1223
1225
  "router-link--match": p.value,
1224
1226
  "router-link--exact-match": h.value,
1225
1227
  "router-link--active": u.value,
@@ -1246,14 +1248,14 @@ const Hn = ["href"], _n = /* @__PURE__ */ vt({
1246
1248
  ref_key: "element",
1247
1249
  ref: s,
1248
1250
  href: o.value,
1249
- class: Hr(["router-link", S.value]),
1251
+ class: _r(["router-link", S.value]),
1250
1252
  onClick: i
1251
1253
  }, [
1252
- je(f.$slots, "default", $e(_r({ route: n.value, isMatch: X(p), isExactMatch: X(h), isActive: X(u), isExactActive: X(m), isExternal: X(R) })))
1254
+ je(f.$slots, "default", $e(Hr({ route: n.value, isMatch: X(p), isExactMatch: X(h), isActive: X(u), isExactActive: X(m), isExternal: X(R) })))
1253
1255
  ], 10, Hn));
1254
1256
  }
1255
1257
  }), hr = Symbol();
1256
- function qn() {
1258
+ function Dn() {
1257
1259
  const t = it(hr);
1258
1260
  if (!t)
1259
1261
  throw new Et();
@@ -1265,7 +1267,7 @@ function yr(t, e) {
1265
1267
  if (!t)
1266
1268
  return;
1267
1269
  if (!ee(r.route, t, e))
1268
- throw new Gr(t, r.route.name);
1270
+ throw new zr(t, r.route.name);
1269
1271
  }
1270
1272
  return nt(r.route, n, { immediate: !0, deep: !0 }), r.route;
1271
1273
  }
@@ -1273,7 +1275,7 @@ const mr = Symbol();
1273
1275
  function me() {
1274
1276
  return it(mr, 0);
1275
1277
  }
1276
- function In(t, e, r) {
1278
+ function Jn(t, e, r) {
1277
1279
  return vt({
1278
1280
  name: "PropsWrapper",
1279
1281
  expose: [],
@@ -1281,19 +1283,19 @@ function In(t, e, r) {
1281
1283
  const n = qr(), o = lr(), a = yr();
1282
1284
  return () => {
1283
1285
  const s = o.getProps(t.id, e, a);
1284
- return s instanceof Error ? "" : ne(s) ? n != null && n.suspense ? dt(Jn, { component: r, props: s }) : dt(Dn, { component: r, props: s }) : dt(r, s);
1286
+ return s instanceof Error ? "" : ne(s) ? n != null && n.suspense ? dt(Tn, { component: r, props: s }) : dt(Fn, { component: r, props: s }) : dt(r, s);
1285
1287
  };
1286
1288
  }
1287
1289
  });
1288
1290
  }
1289
- const Dn = vt((t) => {
1291
+ const Fn = vt((t) => {
1290
1292
  const e = Pt();
1291
1293
  return nt(() => t.props, async (r) => {
1292
1294
  e.value = await r;
1293
1295
  }, { immediate: !0, deep: !0 }), () => e.value instanceof Error ? "" : e.value ? dt(t.component, e.value) : "";
1294
1296
  }, {
1295
1297
  props: ["component", "props"]
1296
- }), Jn = vt(async (t) => {
1298
+ }), Tn = vt(async (t) => {
1297
1299
  const e = Pt();
1298
1300
  return e.value = await t.props, nt(() => e.value, async (r) => {
1299
1301
  e.value = await r;
@@ -1301,51 +1303,57 @@ const Dn = vt((t) => {
1301
1303
  }, {
1302
1304
  props: ["component", "props"]
1303
1305
  }), gr = Symbol();
1304
- function Fn() {
1306
+ function Mn() {
1305
1307
  const t = /* @__PURE__ */ new Map();
1306
1308
  return {
1307
1309
  getRouteComponents: (r) => {
1308
1310
  const n = t.get(r.id);
1309
1311
  if (n)
1310
1312
  return n;
1311
- const o = Tn(r);
1313
+ const o = Wn(r);
1312
1314
  return t.set(r.id, o), o;
1313
1315
  }
1314
1316
  };
1315
1317
  }
1316
- function Tn(t) {
1318
+ function Wn(t) {
1317
1319
  return rr(t) ? Ae(t, t.components) : er(t) ? Ae(t, { default: t.component }) : { default: Rr };
1318
1320
  }
1319
1321
  function Ae(t, e) {
1320
1322
  return Object.fromEntries(
1321
- Object.entries(e).map(([r, n]) => [r, In(t, r, n)])
1323
+ Object.entries(e).map(([r, n]) => [r, Jn(t, r, n)])
1322
1324
  );
1323
1325
  }
1324
- function Mn() {
1326
+ function Gn() {
1325
1327
  const t = it(gr);
1326
1328
  if (!t)
1327
1329
  throw new Et();
1328
1330
  return t;
1329
1331
  }
1330
- const Rr = /* @__PURE__ */ vt({
1331
- __name: "routerView",
1332
+ const zn = {
1333
+ name: "RouterView"
1334
+ }, Rr = /* @__PURE__ */ vt({
1335
+ ...zn,
1332
1336
  props: {
1333
1337
  name: { default: "default" }
1334
1338
  },
1335
1339
  setup(t) {
1336
- const e = yr(), { started: r } = It(), n = qn(), o = me(), { getRouteComponents: a } = Mn();
1337
- Ir(mr, o + 1);
1340
+ const e = yr(), r = It(), n = Dn(), o = me();
1341
+ Ir(async () => {
1342
+ await r.start();
1343
+ });
1344
+ const { getRouteComponents: a } = Gn();
1345
+ Dr(mr, o + 1);
1338
1346
  const s = Z(() => {
1339
- if (!r.value)
1347
+ if (!r.started.value)
1340
1348
  return null;
1341
1349
  if (n.value)
1342
1350
  return n.value.component;
1343
1351
  const p = e.matches.at(o);
1344
1352
  return p ? a(p)[t.name] : null;
1345
1353
  });
1346
- return (p, h) => s.value ? je(p.$slots, "default", $e(Jr({ key: 0 }, { route: X(e), component: s.value, rejection: X(n) })), () => [
1347
- (Oe(), Fr(Tr(s.value)))
1348
- ]) : Dr("", !0);
1354
+ return (p, h) => s.value ? je(p.$slots, "default", $e(Fr({ key: 0 }, { route: X(e), component: s.value, rejection: X(n) })), () => [
1355
+ (Oe(), Tr(Mr(s.value)))
1356
+ ]) : Jr("", !0);
1349
1357
  }
1350
1358
  });
1351
1359
  class st {
@@ -1385,7 +1393,7 @@ function ke(t) {
1385
1393
  throw new Error(`Switch is not exhaustive for lifecycle: ${t}`);
1386
1394
  }
1387
1395
  }
1388
- function Wn(t, e) {
1396
+ function Qn(t, e) {
1389
1397
  const r = new st();
1390
1398
  return t.matches.forEach((n, o) => {
1391
1399
  n.onBeforeRouteEnter && kt(t, e, o) && ht(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Nt(t, e, o) && ht(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
@@ -1393,7 +1401,7 @@ function Wn(t, e) {
1393
1401
  n.onBeforeRouteLeave && xt(t, e, o) && ht(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
1394
1402
  }), r;
1395
1403
  }
1396
- function Gn(t, e) {
1404
+ function Kn(t, e) {
1397
1405
  const r = new st();
1398
1406
  return t.matches.forEach((n, o) => {
1399
1407
  n.onAfterRouteEnter && kt(t, e, o) && ht(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Nt(t, e, o) && ht(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
@@ -1401,7 +1409,7 @@ function Gn(t, e) {
1401
1409
  n.onAfterRouteLeave && xt(t, e, o) && ht(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
1402
1410
  }), r;
1403
1411
  }
1404
- function zn(t, e, r) {
1412
+ function Yn(t, e, r) {
1405
1413
  const n = new st();
1406
1414
  return t.matches.forEach((o, a) => {
1407
1415
  kt(t, e, a) && r.onBeforeRouteEnter.forEach((s) => n.onBeforeRouteEnter.add(s)), Nt(t, e, a) && r.onBeforeRouteUpdate.forEach((s) => n.onBeforeRouteUpdate.add(s));
@@ -1409,7 +1417,7 @@ function zn(t, e, r) {
1409
1417
  xt(t, e, a) && r.onBeforeRouteLeave.forEach((s) => n.onBeforeRouteLeave.add(s));
1410
1418
  }), n;
1411
1419
  }
1412
- function Qn(t, e, r) {
1420
+ function Xn(t, e, r) {
1413
1421
  const n = new st();
1414
1422
  return t.matches.forEach((o, a) => {
1415
1423
  kt(t, e, a) && r.onAfterRouteEnter.forEach((s) => n.onAfterRouteEnter.add(s)), Nt(t, e, a) && r.onAfterRouteUpdate.forEach((s) => n.onAfterRouteUpdate.add(s));
@@ -1418,13 +1426,13 @@ function Qn(t, e, r) {
1418
1426
  }), n;
1419
1427
  }
1420
1428
  const wr = Symbol();
1421
- function Kn() {
1429
+ function to() {
1422
1430
  const { setVueApp: t, runWithContext: e } = ur(), r = {
1423
1431
  global: new st(),
1424
1432
  component: new st()
1425
1433
  }, { reject: n, push: o, replace: a, abort: s } = cr(), p = (c) => (r.global.onBeforeRouteEnter.add(c), () => r.global.onBeforeRouteEnter.delete(c)), h = (c) => (r.global.onBeforeRouteUpdate.add(c), () => r.global.onBeforeRouteUpdate.delete(c)), u = (c) => (r.global.onBeforeRouteLeave.add(c), () => r.global.onBeforeRouteLeave.delete(c)), m = (c) => (r.global.onAfterRouteEnter.add(c), () => r.global.onAfterRouteEnter.delete(c)), R = (c) => (r.global.onAfterRouteUpdate.add(c), () => r.global.onAfterRouteUpdate.delete(c)), L = (c) => (r.global.onAfterRouteLeave.add(c), () => r.global.onAfterRouteLeave.delete(c));
1426
1434
  async function S({ to: c, from: l }) {
1427
- const { global: E, component: A } = r, P = Wn(c, l), g = zn(c, l, E), d = [
1435
+ const { global: E, component: A } = r, P = Qn(c, l), g = Yn(c, l, E), d = [
1428
1436
  ...g.onBeforeRouteEnter,
1429
1437
  ...P.onBeforeRouteEnter,
1430
1438
  ...g.onBeforeRouteUpdate,
@@ -1453,7 +1461,7 @@ function Kn() {
1453
1461
  };
1454
1462
  }
1455
1463
  async function U({ to: c, from: l }) {
1456
- const { global: E, component: A } = r, P = Gn(c, l), g = Qn(c, l, E), d = [
1464
+ const { global: E, component: A } = r, P = Kn(c, l), g = Xn(c, l, E), d = [
1457
1465
  ...A.onAfterRouteLeave,
1458
1466
  ...P.onAfterRouteLeave,
1459
1467
  ...g.onAfterRouteLeave,
@@ -1528,7 +1536,7 @@ function br(t) {
1528
1536
  return qt(o), o;
1529
1537
  };
1530
1538
  }
1531
- const _o = Er("onBeforeRouteLeave"), qo = Er("onBeforeRouteUpdate"), Io = br("onAfterRouteLeave"), Do = br("onAfterRouteUpdate");
1539
+ const Do = Er("onBeforeRouteLeave"), Jo = Er("onBeforeRouteUpdate"), Fo = br("onAfterRouteLeave"), To = br("onAfterRouteUpdate");
1532
1540
  function Y() {
1533
1541
  return Y = Object.assign ? Object.assign.bind() : function(t) {
1534
1542
  for (var e = 1; e < arguments.length; e++) {
@@ -1556,7 +1564,7 @@ function et(t, e) {
1556
1564
  }
1557
1565
  }
1558
1566
  }
1559
- var Ot = "beforeunload", Yn = "hashchange", Sr = "popstate";
1567
+ var Ot = "beforeunload", eo = "hashchange", Sr = "popstate";
1560
1568
  function xe(t) {
1561
1569
  t === void 0 && (t = {});
1562
1570
  var e = t, r = e.window, n = r === void 0 ? document.defaultView : r, o = n.history;
@@ -1644,11 +1652,11 @@ function xe(t) {
1644
1652
  l(g, d);
1645
1653
  }
1646
1654
  if (f(y, k, x)) {
1647
- var C = i(k, m + 1), O = C[0], H = C[1];
1655
+ var C = i(k, m + 1), O = C[0], _ = C[1];
1648
1656
  try {
1649
- o.pushState(O, "", H);
1657
+ o.pushState(O, "", _);
1650
1658
  } catch {
1651
- n.location.assign(H);
1659
+ n.location.assign(_);
1652
1660
  }
1653
1661
  c(y);
1654
1662
  }
@@ -1659,8 +1667,8 @@ function xe(t) {
1659
1667
  E(g, d);
1660
1668
  }
1661
1669
  if (f(y, k, x)) {
1662
- var C = i(k, m), O = C[0], H = C[1];
1663
- o.replaceState(O, "", H), c(y);
1670
+ var C = i(k, m), O = C[0], _ = C[1];
1671
+ o.replaceState(O, "", _), c(y);
1664
1672
  }
1665
1673
  }
1666
1674
  function A(g) {
@@ -1695,17 +1703,17 @@ function xe(t) {
1695
1703
  };
1696
1704
  return P;
1697
1705
  }
1698
- function Xn(t) {
1706
+ function ro(t) {
1699
1707
  t === void 0 && (t = {});
1700
1708
  var e = t, r = e.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1701
1709
  function a() {
1702
- var d = St(n.location.hash.substr(1)), y = d.pathname, k = y === void 0 ? "/" : y, x = d.search, C = x === void 0 ? "" : x, O = d.hash, H = O === void 0 ? "" : O, _ = o.state || {};
1703
- return [_.idx, Rt({
1710
+ var d = St(n.location.hash.substr(1)), y = d.pathname, k = y === void 0 ? "/" : y, x = d.search, C = x === void 0 ? "" : x, O = d.hash, _ = O === void 0 ? "" : O, H = o.state || {};
1711
+ return [H.idx, Rt({
1704
1712
  pathname: k,
1705
1713
  search: C,
1706
- hash: H,
1707
- state: _.usr || null,
1708
- key: _.key || "default"
1714
+ hash: _,
1715
+ state: H.usr || null,
1716
+ key: H.key || "default"
1709
1717
  })];
1710
1718
  }
1711
1719
  var s = null;
@@ -1736,7 +1744,7 @@ function Xn(t) {
1736
1744
  l(d);
1737
1745
  }
1738
1746
  }
1739
- n.addEventListener(Sr, p), n.addEventListener(Yn, function() {
1747
+ n.addEventListener(Sr, p), n.addEventListener(eo, function() {
1740
1748
  var d = a(), y = d[1];
1741
1749
  rt(y) !== rt(R) && p();
1742
1750
  });
@@ -1793,11 +1801,11 @@ function Xn(t) {
1793
1801
  E(d, y);
1794
1802
  }
1795
1803
  if (process.env.NODE_ENV !== "production" && et(x.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(d) + ")"), c(k, x, C)) {
1796
- var O = f(x, m + 1), H = O[0], _ = O[1];
1804
+ var O = f(x, m + 1), _ = O[0], H = O[1];
1797
1805
  try {
1798
- o.pushState(H, "", _);
1806
+ o.pushState(_, "", H);
1799
1807
  } catch {
1800
- n.location.assign(_);
1808
+ n.location.assign(H);
1801
1809
  }
1802
1810
  l(k);
1803
1811
  }
@@ -1808,8 +1816,8 @@ function Xn(t) {
1808
1816
  A(d, y);
1809
1817
  }
1810
1818
  if (process.env.NODE_ENV !== "production" && et(x.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(d) + ")"), c(k, x, C)) {
1811
- var O = f(x, m), H = O[0], _ = O[1];
1812
- o.replaceState(H, "", _), l(k);
1819
+ var O = f(x, m), _ = O[0], H = O[1];
1820
+ o.replaceState(_, "", H), l(k);
1813
1821
  }
1814
1822
  }
1815
1823
  function P(d) {
@@ -1976,13 +1984,13 @@ function St(t) {
1976
1984
  return e;
1977
1985
  }
1978
1986
  const Pr = Symbol();
1979
- function to(t, e) {
1980
- const r = _t({ ...t }), n = (s) => {
1987
+ function no(t, e) {
1988
+ const r = Ht({ ...t }), n = (s) => {
1981
1989
  Object.assign(r, {
1982
1990
  [Pr]: !1,
1983
1991
  ...s
1984
1992
  });
1985
- }, o = r, a = jn(o, e);
1993
+ }, o = r, a = $n(o, e);
1986
1994
  return {
1987
1995
  currentRoute: o,
1988
1996
  routerRoute: a,
@@ -1990,9 +1998,9 @@ function to(t, e) {
1990
1998
  };
1991
1999
  }
1992
2000
  function I(t) {
1993
- return !t.startsWith("http") ? ro(t) : eo(t);
2001
+ return !t.startsWith("http") ? ao(t) : oo(t);
1994
2002
  }
1995
- function eo(t) {
2003
+ function oo(t) {
1996
2004
  const { protocol: e, host: r, pathname: n, search: o, searchParams: a, hash: s } = new URL(t, t);
1997
2005
  return {
1998
2006
  protocol: e,
@@ -2003,7 +2011,7 @@ function eo(t) {
2003
2011
  hash: s
2004
2012
  };
2005
2013
  }
2006
- function ro(t) {
2014
+ function ao(t) {
2007
2015
  const { pathname: e, search: r, searchParams: n, hash: o } = new URL(t, "https://localhost");
2008
2016
  return {
2009
2017
  pathname: e,
@@ -2012,14 +2020,14 @@ function ro(t) {
2012
2020
  hash: o
2013
2021
  };
2014
2022
  }
2015
- function no(t) {
2023
+ function so(t) {
2016
2024
  return (e) => {
2017
2025
  const { host: r } = I(e);
2018
2026
  return !(r === void 0 || r === t);
2019
2027
  };
2020
2028
  }
2021
- function oo({ mode: t, listener: e }) {
2022
- const r = ao(t), n = (h, u) => {
2029
+ function io({ mode: t, listener: e }) {
2030
+ const r = co(t), n = (h, u) => {
2023
2031
  if (u != null && u.replace) {
2024
2032
  r.replace(h, u.state);
2025
2033
  return;
@@ -2042,7 +2050,7 @@ function oo({ mode: t, listener: e }) {
2042
2050
  }
2043
2051
  };
2044
2052
  }
2045
- function ao(t = "auto") {
2053
+ function co(t = "auto") {
2046
2054
  switch (t) {
2047
2055
  case "auto":
2048
2056
  return fe() ? xe() : Ne();
@@ -2051,20 +2059,20 @@ function ao(t = "auto") {
2051
2059
  case "memory":
2052
2060
  return Ne();
2053
2061
  case "hash":
2054
- return Xn();
2062
+ return ro();
2055
2063
  default:
2056
2064
  const e = t;
2057
2065
  throw new Error(`Switch is not exhaustive for mode: ${e}`);
2058
2066
  }
2059
2067
  }
2060
- function so(t) {
2068
+ function uo(t) {
2061
2069
  return vt(() => () => dt("h1", t), {
2062
2070
  name: t,
2063
2071
  props: []
2064
2072
  });
2065
2073
  }
2066
- function io(t) {
2067
- const e = (a) => Ut(t[a] ?? so(a)), r = (a) => {
2074
+ function fo(t) {
2075
+ const e = (a) => Ut(t[a] ?? uo(a)), r = (a) => {
2068
2076
  const s = Ut(e(a)), p = {
2069
2077
  id: de(),
2070
2078
  component: s,
@@ -2097,54 +2105,54 @@ function io(t) {
2097
2105
  getRejectionRoute: r
2098
2106
  };
2099
2107
  }
2100
- class co extends Error {
2108
+ class lo extends Error {
2101
2109
  constructor() {
2102
2110
  super("initialUrl must be set if window.location is unavailable");
2103
2111
  }
2104
2112
  }
2105
- function uo(t) {
2113
+ function po(t) {
2106
2114
  if (t)
2107
2115
  return t;
2108
2116
  if (fe())
2109
2117
  return window.location.toString();
2110
- throw new co();
2118
+ throw new lo();
2111
2119
  }
2112
2120
  function Ar(t) {
2113
2121
  return !!t && typeof t == "object";
2114
2122
  }
2115
- const Ht = !0;
2116
- function fo(t, e, r) {
2123
+ const _t = !0;
2124
+ function ho(t, e, r) {
2117
2125
  if (Ar(t) && e in t) {
2118
2126
  const n = t[e];
2119
- return typeof n == "string" ? ot(n, r, Ht) : n;
2127
+ return typeof n == "string" ? ot(n, r, _t) : n;
2120
2128
  }
2121
- return ot(void 0, r, Ht);
2129
+ return ot(void 0, r, _t);
2122
2130
  }
2123
2131
  function kr(t, e) {
2124
2132
  const r = {};
2125
2133
  for (const [n, o] of Object.entries(t)) {
2126
- const a = fo(e, n, o);
2134
+ const a = ho(e, n, o);
2127
2135
  r[n] = a;
2128
2136
  }
2129
2137
  return r;
2130
2138
  }
2131
- function lo(t, e, r) {
2139
+ function yo(t, e, r) {
2132
2140
  if (Ar(t) && e in t) {
2133
2141
  const n = t[e];
2134
- return at(n, r, Ht);
2142
+ return at(n, r, _t);
2135
2143
  }
2136
- return at(void 0, r, Ht);
2144
+ return at(void 0, r, _t);
2137
2145
  }
2138
2146
  const Ue = (t, e) => {
2139
2147
  const r = {};
2140
2148
  for (const [n, o] of Object.entries(t)) {
2141
- const a = lo(e, n, o);
2149
+ const a = yo(e, n, o);
2142
2150
  r[n] = a;
2143
2151
  }
2144
2152
  return r;
2145
2153
  };
2146
- function po() {
2147
- const t = _t(/* @__PURE__ */ new Map()), e = fe() ? s() : null, r = (p) => {
2154
+ function mo() {
2155
+ const t = Ht(/* @__PURE__ */ new Map()), e = fe() ? s() : null, r = (p) => {
2148
2156
  t.set(p, !1), e == null || e.observe(p);
2149
2157
  }, n = (p) => {
2150
2158
  t.delete(p), e == null || e.unobserve(p);
@@ -2165,13 +2173,13 @@ function po() {
2165
2173
  isElementVisible: a
2166
2174
  };
2167
2175
  }
2168
- class ho extends Error {
2176
+ class go extends Error {
2169
2177
  constructor(e) {
2170
2178
  super(`Route not found: "${e}"`);
2171
2179
  }
2172
2180
  }
2173
2181
  function xr(t, e, r) {
2174
- const n = hn(e.value, r), o = Qe(n), [a] = Ye(t, new RegExp(o, "g"));
2182
+ const n = yn(e.value, r), o = Qe(n), [a] = Ye(t, new RegExp(o, "g"));
2175
2183
  return a;
2176
2184
  }
2177
2185
  function Nr(t, e, r, n) {
@@ -2182,20 +2190,20 @@ function Lr({ protocol: t, host: e, pathname: r, search: n, searchParams: o, has
2182
2190
  const s = new URL("https://localhost");
2183
2191
  t && (s.protocol = t), e && (s.host = e), r && (s.pathname = r), o ? s.search = new URLSearchParams(o).toString() : n && (s.search = n), a && (s.hash = a);
2184
2192
  const p = s.toString().replace(/^https:\/\/localhost\/*/, "/");
2185
- return He(p);
2193
+ return _e(p);
2186
2194
  }
2187
- function yo(t, e = {}) {
2188
- const { params: r = {}, query: n } = e, o = go(t.query, r), a = ye(o, n), s = Be(t.path, r), p = t.hash.value ? Be(t.hash, r) : e.hash, h = mo(t.host, r), { protocol: u, host: m } = I(h);
2195
+ function Ro(t, e = {}) {
2196
+ const { params: r = {}, query: n } = e, o = vo(t.query, r), a = ye(o, n), s = Be(t.path, r), p = t.hash.value ? Be(t.hash, r) : e.hash, h = wo(t.host, r), { protocol: u, host: m } = I(h);
2189
2197
  return Lr({ protocol: u, host: m, pathname: s, searchParams: a, hash: p });
2190
2198
  }
2191
- function mo(t, e) {
2199
+ function wo(t, e) {
2192
2200
  const r = t.value && !t.value.startsWith("http") ? `https://${t.value}` : t.value;
2193
2201
  return Object.keys(t.params).reduce((n, o) => Nr(n, t, o, e[o]), r);
2194
2202
  }
2195
2203
  function Be(t, e) {
2196
2204
  return Object.keys(t.params).reduce((r, n) => Nr(r, t, n, e[n]), t.value);
2197
2205
  }
2198
- function go(t, e) {
2206
+ function vo(t, e) {
2199
2207
  const r = new URLSearchParams(t.value);
2200
2208
  if (!t.value)
2201
2209
  return r;
@@ -2208,7 +2216,7 @@ function go(t, e) {
2208
2216
  }
2209
2217
  return r;
2210
2218
  }
2211
- const Ro = (t, e) => {
2219
+ const Eo = (t, e) => {
2212
2220
  try {
2213
2221
  ge(t, e);
2214
2222
  } catch {
@@ -2220,7 +2228,7 @@ const Ro = (t, e) => {
2220
2228
  return {
2221
2229
  ...Qt(t.host, `${r}//${n}`),
2222
2230
  ...Qt(t.path, o),
2223
- ...wo(t.query, a),
2231
+ ...bo(t.query, a),
2224
2232
  ...Qt(t.hash, s)
2225
2233
  };
2226
2234
  };
@@ -2232,7 +2240,7 @@ function Qt(t, e) {
2232
2240
  }
2233
2241
  return r;
2234
2242
  }
2235
- function wo(t, e) {
2243
+ function bo(t, e) {
2236
2244
  const r = {}, n = new URLSearchParams(t.value), o = new URLSearchParams(e);
2237
2245
  for (const [a, s] of Array.from(n.entries())) {
2238
2246
  const p = ue(s);
@@ -2243,8 +2251,8 @@ function wo(t, e) {
2243
2251
  }
2244
2252
  return r;
2245
2253
  }
2246
- function vo(t, e = {}, r = {}) {
2247
- const n = yo(t, {
2254
+ function So(t, e = {}, r = {}) {
2255
+ const n = Ro(t, {
2248
2256
  params: e,
2249
2257
  query: r.query,
2250
2258
  hash: r.hash
@@ -2261,17 +2269,17 @@ function vo(t, e = {}, r = {}) {
2261
2269
  href: n
2262
2270
  };
2263
2271
  }
2264
- const Eo = (t) => "name" in t.matched && !!t.matched.name, bo = (t, e) => {
2272
+ const Po = (t) => "name" in t.matched && !!t.matched.name, Ao = (t, e) => {
2265
2273
  const { pathname: r } = I(e);
2266
- return pn(t).test(r);
2267
- }, So = (t, e) => {
2274
+ return dn(t).test(r);
2275
+ }, ko = (t, e) => {
2268
2276
  const { search: r } = I(e);
2269
- return dn(t).every((o) => o.test(r));
2277
+ return hn(t).every((o) => o.test(r));
2270
2278
  }, re = (t, e) => {
2271
2279
  const { hash: r } = I(e), { value: n } = t.hash;
2272
2280
  return W(n) ? `#${n.replace(/^#*/, "")}`.toLowerCase() === r.toLowerCase() : !0;
2273
2281
  };
2274
- function Po(t) {
2282
+ function xo(t) {
2275
2283
  const { searchParams: e, pathname: r } = I(t), n = -1, o = 1;
2276
2284
  return (a, s) => {
2277
2285
  const p = Ve(a, e), h = Ce(a, r), u = Ve(s, e), m = Ce(s, r);
@@ -2286,19 +2294,19 @@ function Ve(t, e) {
2286
2294
  const r = new URLSearchParams(e), n = new URLSearchParams(t.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
2287
2295
  return o.length - a.length;
2288
2296
  }
2289
- const Ao = [
2290
- Eo,
2291
- bo,
2292
- So,
2297
+ const No = [
2298
+ Po,
2299
+ Ao,
2300
+ ko,
2293
2301
  re,
2294
- Ro
2302
+ Eo
2295
2303
  ];
2296
- function ko(t, e) {
2297
- const r = Po(e);
2298
- return t.filter((n) => Ao.every((o) => o(n, e))).sort(r);
2304
+ function Lo(t, e) {
2305
+ const r = xo(e);
2306
+ return t.filter((n) => No.every((o) => o(n, e))).sort(r);
2299
2307
  }
2300
- function xo(t, e, r) {
2301
- const n = ko(t, e);
2308
+ function Uo(t, e, r) {
2309
+ const n = Lo(t, e);
2302
2310
  if (!n.length)
2303
2311
  return;
2304
2312
  const [o] = n, { searchParams: a, hash: s } = I(e);
@@ -2311,7 +2319,7 @@ function xo(t, e, r) {
2311
2319
  params: ge(o, e),
2312
2320
  state: kr(o.state, r),
2313
2321
  hash: s,
2314
- href: He(e)
2322
+ href: _e(e)
2315
2323
  };
2316
2324
  }
2317
2325
  function Ze(t, e) {
@@ -2324,7 +2332,7 @@ function Ze(t, e) {
2324
2332
  hash: W(n.hash) ? n.hash : r.hash
2325
2333
  });
2326
2334
  }
2327
- function No(t, e) {
2335
+ function Bo(t, e) {
2328
2336
  return W(e) ? t.map((r) => {
2329
2337
  const n = `${e}${r.path.value}`;
2330
2338
  return {
@@ -2333,7 +2341,7 @@ function No(t, e) {
2333
2341
  };
2334
2342
  }) : t;
2335
2343
  }
2336
- class Lo extends Error {
2344
+ class Co extends Error {
2337
2345
  /**
2338
2346
  * Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
2339
2347
  * @param name - The name of the name that was duplicated.
@@ -2342,20 +2350,20 @@ class Lo extends Error {
2342
2350
  super(`Invalid Name "${e}": Router does not support multiple routes with the same name. All name names must be unique.`);
2343
2351
  }
2344
2352
  }
2345
- function Uo(t) {
2353
+ function Vo(t) {
2346
2354
  const e = t.map(({ name: r }) => r);
2347
2355
  for (const r of e)
2348
2356
  if (qe(e, r) > 1)
2349
- throw new Lo(r);
2357
+ throw new Co(r);
2350
2358
  }
2351
- function Bo(t, e = [], r) {
2359
+ function Zo(t, e = [], r) {
2352
2360
  const n = [
2353
2361
  ...t,
2354
2362
  ...e.map((o) => o.routes)
2355
2363
  ].flat();
2356
- return Uo(n), No(n, r);
2364
+ return Vo(n), Bo(n, r);
2357
2365
  }
2358
- function Co(t = {}, e = []) {
2366
+ function Oo(t = {}, e = []) {
2359
2367
  const r = new st();
2360
2368
  return ft("onBeforeRouteEnter", t, e).forEach((n) => r.onBeforeRouteEnter.add(n)), ft("onBeforeRouteUpdate", t, e).forEach((n) => r.onBeforeRouteUpdate.add(n)), ft("onBeforeRouteLeave", t, e).forEach((n) => r.onBeforeRouteLeave.add(n)), ft("onAfterRouteEnter", t, e).forEach((n) => r.onAfterRouteEnter.add(n)), ft("onAfterRouteUpdate", t, e).forEach((n) => r.onAfterRouteUpdate.add(n)), ft("onAfterRouteLeave", t, e).forEach((n) => r.onAfterRouteLeave.add(n)), r;
2361
2369
  }
@@ -2365,10 +2373,10 @@ function ft(t, e, r) {
2365
2373
  ...r.map((o) => o[t])
2366
2374
  ].flat().filter((o) => o !== void 0);
2367
2375
  }
2368
- function Jo(t, e, r = []) {
2369
- const n = Bo(t, r, e == null ? void 0 : e.base), o = Kn();
2370
- o.addGlobalRouteHooks(Co(e, r));
2371
- const a = pe(), s = Un(), p = Fn(), h = po(), u = oo({
2376
+ function Mo(t, e, r = []) {
2377
+ const n = Zo(t, r, e == null ? void 0 : e.base), o = to();
2378
+ o.addGlobalRouteHooks(Oo(e, r));
2379
+ const a = pe(), s = Bn(), p = Mn(), h = mo(), u = io({
2372
2380
  mode: e == null ? void 0 : e.historyMode,
2373
2381
  listener: ({ location: b }) => {
2374
2382
  const B = rt(b);
@@ -2376,7 +2384,7 @@ function Jo(t, e, r = []) {
2376
2384
  }
2377
2385
  });
2378
2386
  function m(b, B = {}) {
2379
- return xo(n, b, B.state);
2387
+ return Uo(n, b, B.state);
2380
2388
  }
2381
2389
  async function R(b, B = {}) {
2382
2390
  const G = a();
@@ -2440,8 +2448,8 @@ function Jo(t, e, r = []) {
2440
2448
  const L = (b, B = {}, G = {}) => {
2441
2449
  const D = n.find((q) => q.name === b);
2442
2450
  if (!D)
2443
- throw new ho(String(b));
2444
- return vo(D, B, G);
2451
+ throw new go(String(b));
2452
+ return So(D, B, G);
2445
2453
  }, S = (b, B, G) => {
2446
2454
  if (M(b)) {
2447
2455
  const F = { ...B }, J = Ze(b, {
@@ -2472,25 +2480,25 @@ function Jo(t, e, r = []) {
2472
2480
  return S(b, D);
2473
2481
  }, v = (b) => {
2474
2482
  i(b);
2475
- }, { setRejection: i, rejection: f, getRejectionRoute: c } = io({
2483
+ }, { setRejection: i, rejection: f, getRejectionRoute: c } = fo({
2476
2484
  ...r.reduce((b, B) => ({ ...b, ...B.rejections }), {}),
2477
2485
  ...e == null ? void 0 : e.rejections
2478
- }), l = c("NotFound"), { currentRoute: E, routerRoute: A, updateRoute: P } = to(l, S), g = uo(e == null ? void 0 : e.initialUrl), d = u.location.state, { host: y } = I(g), k = no(y);
2486
+ }), l = c("NotFound"), { currentRoute: E, routerRoute: A, updateRoute: P } = no(l, S), g = po(e == null ? void 0 : e.initialUrl), d = u.location.state, { host: y } = I(g), k = so(y);
2479
2487
  let x = !1;
2480
- const C = Pt(!1), { promise: O, resolve: H } = Promise.withResolvers();
2481
- async function _() {
2488
+ const C = Pt(!1), { promise: O, resolve: _ } = Promise.withResolvers();
2489
+ async function H() {
2482
2490
  if (x)
2483
2491
  return O;
2484
- x = !0, en(n) && await rn(), await R(g, { replace: !0, state: d }), u.startListening(), H(), C.value = !0;
2492
+ x = !0, rn(n) && await nn(), await R(g, { replace: !0, state: d }), u.startListening(), _(), C.value = !0;
2485
2493
  }
2486
2494
  function Re() {
2487
2495
  u.stopListening();
2488
2496
  }
2489
2497
  function Ur(b) {
2490
- return An(b) ? null : { ...E };
2498
+ return kn(b) ? null : { ...E };
2491
2499
  }
2492
2500
  function Br(b) {
2493
- o.setVueApp(b), s.setVueApp(b), b.component("RouterView", Rr), b.component("RouterLink", _n), b.provide(hr, f), b.provide(wr, o), b.provide(fr, s), b.provide(gr, p), b.provide(pr, h), b.provide(_e, we), _();
2501
+ o.setVueApp(b), s.setVueApp(b), b.component("RouterView", Rr), b.component("RouterLink", In), b.provide(hr, f), b.provide(wr, o), b.provide(fr, s), b.provide(gr, p), b.provide(pr, h), b.provide(He, we), H();
2494
2502
  }
2495
2503
  const we = {
2496
2504
  route: A,
@@ -2512,24 +2520,24 @@ function Jo(t, e, r = []) {
2512
2520
  onAfterRouteUpdate: o.onAfterRouteUpdate,
2513
2521
  onAfterRouteLeave: o.onAfterRouteLeave,
2514
2522
  prefetch: e == null ? void 0 : e.prefetch,
2515
- start: _,
2523
+ start: H,
2516
2524
  started: C,
2517
2525
  stop: Re
2518
2526
  };
2519
2527
  return we;
2520
2528
  }
2521
- function Fo(t) {
2529
+ function Wo(t) {
2522
2530
  return {
2523
2531
  routes: t.routes ?? [],
2524
2532
  rejections: t.rejections ?? {},
2525
2533
  ...t
2526
2534
  };
2527
2535
  }
2528
- function Vo(t) {
2536
+ function jo(t) {
2529
2537
  return {
2530
2538
  get: (e, { invalid: r }) => {
2531
2539
  for (const n of t) {
2532
- const o = un(e, n);
2540
+ const o = fn(e, n);
2533
2541
  if (o !== void 0)
2534
2542
  return o;
2535
2543
  }
@@ -2537,7 +2545,7 @@ function Vo(t) {
2537
2545
  },
2538
2546
  set: (e, { invalid: r }) => {
2539
2547
  for (const n of t) {
2540
- const o = fn(e, n);
2548
+ const o = ln(e, n);
2541
2549
  if (o !== void 0)
2542
2550
  return o;
2543
2551
  }
@@ -2545,11 +2553,11 @@ function Vo(t) {
2545
2553
  }
2546
2554
  };
2547
2555
  }
2548
- const Zo = {
2556
+ const $o = {
2549
2557
  separator: ","
2550
2558
  };
2551
- function To(t, e = {}) {
2552
- const { separator: r } = { ...Zo, ...e }, n = Vo(t);
2559
+ function Go(t, e = {}) {
2560
+ const { separator: r } = { ...$o, ...e }, n = jo(t);
2553
2561
  return {
2554
2562
  get: (o, a) => o.split(r).map((s) => n.get(s, a)),
2555
2563
  set: (o, a) => {
@@ -2559,11 +2567,11 @@ function To(t, e = {}) {
2559
2567
  }
2560
2568
  };
2561
2569
  }
2562
- const Oo = {
2570
+ const _o = {
2563
2571
  separator: ","
2564
2572
  };
2565
- function Mo(t, e = {}) {
2566
- const { separator: r } = { ...Oo, ...e };
2573
+ function zo(t, e = {}) {
2574
+ const { separator: r } = { ..._o, ...e };
2567
2575
  return {
2568
2576
  get: (n) => {
2569
2577
  const o = n.split(r);
@@ -2578,8 +2586,8 @@ function Mo(t, e = {}) {
2578
2586
  }
2579
2587
  };
2580
2588
  }
2581
- const Wo = Q, Go = Q, zo = Q;
2582
- function Qo(t) {
2589
+ const Qo = Q, Ko = Q, Yo = Q;
2590
+ function Xo(t) {
2583
2591
  const e = de(), r = or(t.name), n = tt(t.path), o = tt(t.query), a = tt(t.hash), s = t.meta ?? {}, p = tt(t.host), h = Ut({ id: e, meta: {}, state: {}, ...t }), u = {
2584
2592
  id: e,
2585
2593
  matched: h,
@@ -2596,33 +2604,33 @@ function Qo(t) {
2596
2604
  return bt(m.path.params, m.query.params, m.host.params, m.hash.params), m;
2597
2605
  }
2598
2606
  export {
2599
- Mr as DuplicateParamsError,
2600
- Wr as MetaPropertyConflict,
2601
- _n as RouterLink,
2607
+ Wr as DuplicateParamsError,
2608
+ Gr as MetaPropertyConflict,
2609
+ In as RouterLink,
2602
2610
  Et as RouterNotInstalledError,
2603
2611
  Rr as RouterView,
2604
- Gr as UseRouteInvalidError,
2605
- To as arrayOf,
2606
- He as asUrl,
2607
- Qo as createExternalRoute,
2608
- Kr as createParam,
2612
+ zr as UseRouteInvalidError,
2613
+ Go as arrayOf,
2614
+ _e as asUrl,
2615
+ Xo as createExternalRoute,
2616
+ Yr as createParam,
2609
2617
  gt as createRoute,
2610
- Jo as createRouter,
2611
- Fo as createRouterPlugin,
2612
- Go as host,
2618
+ Mo as createRouter,
2619
+ Wo as createRouterPlugin,
2620
+ Ko as host,
2613
2621
  ee as isRoute,
2614
2622
  M as isUrl,
2615
- Io as onAfterRouteLeave,
2616
- Do as onAfterRouteUpdate,
2617
- _o as onBeforeRouteLeave,
2618
- qo as onBeforeRouteUpdate,
2619
- Wo as path,
2620
- zo as query,
2621
- Mo as tupleOf,
2622
- Vo as unionOf,
2623
- $n as useLink,
2623
+ Fo as onAfterRouteLeave,
2624
+ To as onAfterRouteUpdate,
2625
+ Do as onBeforeRouteLeave,
2626
+ Jo as onBeforeRouteUpdate,
2627
+ Qo as path,
2628
+ Yo as query,
2629
+ zo as tupleOf,
2630
+ jo as unionOf,
2631
+ _n as useLink,
2624
2632
  yr as useRoute,
2625
2633
  It as useRouter,
2626
- Ho as withDefault,
2634
+ Io as withDefault,
2627
2635
  Q as withParams
2628
2636
  };