@kitbag/router 0.5.4 → 0.7.0

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,8 +1,8 @@
1
1
  var Ae = Object.defineProperty;
2
- var Le = (t, e, n) => e in t ? Ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var V = (t, e, n) => (Le(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { inject as lt, computed as H, toValue as mt, toRefs as Be, reactive as It, watch as Ue, onUnmounted as Ft, defineComponent as et, openBlock as Jt, createElementBlock as $e, normalizeClass as Ne, renderSlot as Qt, normalizeProps as Kt, guardReactiveProps as Gt, unref as rt, provide as He, defineAsyncComponent as je, createBlock as Ve, resolveDynamicComponent as Ce, h as ot, ref as qe, markRaw as at } from "vue";
5
- class _e extends Error {
2
+ var Le = (t, e, r) => e in t ? Ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var V = (t, e, r) => (Le(t, typeof e != "symbol" ? e + "" : e, r), r);
4
+ import { inject as ht, computed as H, toValue as mt, toRefs as Be, reactive as Ft, watch as Ue, onUnmounted as Qt, defineComponent as et, openBlock as Kt, createElementBlock as $e, normalizeClass as Ne, renderSlot as Gt, normalizeProps as zt, guardReactiveProps as He, unref as ot, h as at, resolveComponent as je, provide as Ve, mergeProps as Ce, createBlock as _e, resolveDynamicComponent as qe, createCommentVNode as Oe, ref as We, markRaw as st } from "vue";
5
+ class Me extends Error {
6
6
  /**
7
7
  * Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.
8
8
  * @param paramName - The name of the parameter that was duplicated.
@@ -16,131 +16,131 @@ class vt extends Error {
16
16
  super("Router not installed");
17
17
  }
18
18
  }
19
- class Oe extends Error {
19
+ class De extends Error {
20
20
  /**
21
21
  * Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
22
22
  * This detailed error message aids in quickly identifying and resolving mismatches in route usage.
23
23
  * @param routeName - The route name that was incorrectly used.
24
24
  * @param actualRouteName - The expected route name that should have been used.
25
25
  */
26
- constructor(e, n) {
27
- super(`useRoute called with incorrect route. Given ${e}, expected ${n}`);
26
+ constructor(e, r) {
27
+ super(`useRoute called with incorrect route. Given ${e}, expected ${r}`);
28
28
  }
29
29
  }
30
- const zt = Symbol();
30
+ const Yt = Symbol();
31
31
  function wt() {
32
- const t = lt(zt);
32
+ const t = ht(Yt);
33
33
  if (!t)
34
34
  throw new vt();
35
35
  return t;
36
36
  }
37
37
  class z extends Error {
38
38
  }
39
- function F(t) {
39
+ function J(t) {
40
40
  return typeof t != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(t);
41
41
  }
42
- function We(t, e = {}, n = {}) {
43
- const o = wt(), r = H(() => mt(t)), a = H(() => mt(e)), s = H(() => mt(n)), c = H(() => {
44
- if (F(r.value))
45
- return r.value;
42
+ function Te(t, e = {}, r = {}) {
43
+ const o = wt(), n = H(() => mt(t)), s = H(() => mt(e)), a = H(() => mt(r)), c = H(() => {
44
+ if (J(n.value))
45
+ return n.value;
46
46
  try {
47
- return o.resolve(r.value, a.value, s.value);
48
- } catch (m) {
49
- throw m instanceof z && console.error(`Failed to resolve route "${r.value.toString()}" in RouterLink.`, m), m;
47
+ return o.resolve(n.value, s.value, a.value);
48
+ } catch (f) {
49
+ throw f instanceof z && console.error(`Failed to resolve route "${n.value.toString()}" in RouterLink.`, f), f;
50
50
  }
51
- }), i = H(() => o.find(c.value, s.value)), f = H(() => !!i.value && o.route.matches.includes(i.value.matched)), h = H(() => !!i.value && o.route.matched === i.value.matched);
51
+ }), u = H(() => o.find(c.value, a.value)), l = H(() => !!u.value && o.route.matches.includes(u.value.matched)), p = H(() => !!u.value && o.route.matched === u.value.matched);
52
52
  return {
53
- route: i,
53
+ route: u,
54
54
  href: c,
55
- isMatch: f,
56
- isExactMatch: h,
57
- push: (m) => o.push(c.value, {}, { ...s.value, ...m }),
58
- replace: (m) => o.replace(c.value, {}, { ...s.value, ...m })
55
+ isMatch: l,
56
+ isExactMatch: p,
57
+ push: (f) => o.push(c.value, {}, { ...a.value, ...f }),
58
+ replace: (f) => o.replace(c.value, {}, { ...a.value, ...f })
59
59
  };
60
60
  }
61
- const Yt = Symbol();
62
- function Me() {
63
- const t = lt(Yt);
61
+ const Xt = Symbol();
62
+ function Ie() {
63
+ const t = ht(Xt);
64
64
  if (!t)
65
65
  throw new vt();
66
66
  return t;
67
67
  }
68
- function Et(t, e) {
69
- return [t, e].filter((n) => !!n).join(".");
68
+ function Zt(t, e) {
69
+ return [t, e].filter((r) => !!r).join(".");
70
70
  }
71
- const Xt = Symbol("isRouterRouteSymbol");
72
- function De(t) {
73
- return typeof t == "object" && t !== null && Xt in t;
71
+ const te = Symbol("isRouterRouteSymbol");
72
+ function Je(t) {
73
+ return typeof t == "object" && t !== null && te in t;
74
74
  }
75
- function Te(t, e) {
76
- function n(f, h, m) {
77
- if (typeof f == "object") {
78
- const y = {
75
+ function Fe(t, e) {
76
+ function r(l, p, f) {
77
+ if (typeof l == "object") {
78
+ const d = {
79
79
  ...t.params,
80
- ...f
80
+ ...l
81
81
  };
82
- return e(t.key, y, h);
82
+ return e(t.key, d, p);
83
83
  }
84
- const b = {
84
+ const E = {
85
85
  ...t.params,
86
- [f]: h
86
+ [l]: p
87
87
  };
88
- return e(t.key, b, m);
88
+ return e(t.key, E, f);
89
89
  }
90
- const { matched: o, matches: r, key: a, query: s, params: c } = Be(t), i = It({
90
+ const { matched: o, matches: n, key: s, query: a, params: c } = Be(t), u = Ft({
91
91
  matched: o,
92
- matches: r,
93
- query: s,
92
+ matches: n,
93
+ query: a,
94
94
  params: c,
95
- key: a,
96
- update: n,
97
- [Xt]: !0
95
+ key: s,
96
+ update: r,
97
+ [te]: !0
98
98
  });
99
- return new Proxy(i, {
100
- get: (f, h, m) => h === "params" ? new Proxy(t.params, {
101
- set(b, y, k) {
102
- return n(y, k), !0;
99
+ return new Proxy(u, {
100
+ get: (l, p, f) => p === "params" ? new Proxy(t.params, {
101
+ set(E, d, k) {
102
+ return r(d, k), !0;
103
103
  }
104
- }) : Reflect.get(f, h, m)
104
+ }) : Reflect.get(l, p, f)
105
105
  });
106
106
  }
107
- function Ie(t, e, { exact: n } = {}) {
108
- if (!De(t))
107
+ function Qe(t, e, { exact: r } = {}) {
108
+ if (!Je(t))
109
109
  return !1;
110
110
  if (e === void 0)
111
111
  return !0;
112
- const o = Fe(t);
113
- if (n) {
114
- const r = o.at(-1);
115
- return e === r;
112
+ const o = Ke(t);
113
+ if (r) {
114
+ const n = o.at(-1);
115
+ return e === n;
116
116
  }
117
117
  return o.includes(e);
118
118
  }
119
- function Fe(t) {
120
- return t.matches.map((n) => n.name).reduce((n, o) => {
121
- const r = n.pop(), a = o ? [Et(r, o)] : [];
122
- return r ? [
123
- ...n,
124
- r,
125
- ...a
126
- ] : a;
119
+ function Ke(t) {
120
+ return t.matches.map((r) => r.name).reduce((r, o) => {
121
+ const n = r.pop(), s = o ? [Zt(n, o)] : [];
122
+ return n ? [
123
+ ...r,
124
+ n,
125
+ ...s
126
+ ] : s;
127
127
  }, []);
128
128
  }
129
- function Je(t, e) {
130
- const n = wt();
129
+ function Ge(t, e) {
130
+ const r = wt();
131
131
  function o() {
132
132
  if (!t)
133
133
  return;
134
- if (!Ie(n.route, t, e))
135
- throw new Oe(t, n.route.key);
134
+ if (!Qe(r.route, t, e))
135
+ throw new De(t, r.route.key);
136
136
  }
137
- return Ue(n.route, o, { immediate: !0, deep: !0 }), n.route;
137
+ return Ue(r.route, o, { immediate: !0, deep: !0 }), r.route;
138
138
  }
139
- const Zt = Symbol();
140
- function bt() {
141
- return lt(Zt, 0);
139
+ const ee = Symbol();
140
+ function Et() {
141
+ return ht(ee, 0);
142
142
  }
143
- class st {
143
+ class ct {
144
144
  constructor() {
145
145
  V(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
146
146
  V(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
@@ -150,154 +150,154 @@ class st {
150
150
  V(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
151
151
  }
152
152
  }
153
- class jt extends Error {
153
+ class Ht extends Error {
154
154
  }
155
155
  class Z extends Error {
156
- constructor(n) {
156
+ constructor(r) {
157
157
  super("Error occurred during a router push operation.");
158
158
  V(this, "to");
159
- this.to = n;
159
+ this.to = r;
160
160
  }
161
161
  }
162
- class yt extends Error {
163
- constructor(n) {
164
- super(`Routing action rejected: ${n}`);
162
+ class gt extends Error {
163
+ constructor(r) {
164
+ super(`Routing action rejected: ${r}`);
165
165
  V(this, "type");
166
- this.type = n;
166
+ this.type = r;
167
167
  }
168
168
  }
169
169
  function G(t) {
170
170
  return Array.isArray(t) ? t : [t];
171
171
  }
172
- function Qe(t, e) {
173
- const n = new st();
174
- return t.matches.forEach((o, r) => {
175
- o.onBeforeRouteEnter && Pt(t, e, r) && G(o.onBeforeRouteEnter).forEach((a) => n.onBeforeRouteEnter.add(a)), o.onBeforeRouteUpdate && kt(t, e, r) && G(o.onBeforeRouteUpdate).forEach((a) => n.onBeforeRouteUpdate.add(a));
176
- }), e.matches.forEach((o, r) => {
177
- o.onBeforeRouteLeave && St(t, e, r) && G(o.onBeforeRouteLeave).forEach((a) => n.onBeforeRouteLeave.add(a));
178
- }), n;
179
- }
180
- function Ke(t, e) {
181
- const n = new st();
182
- return t.matches.forEach((o, r) => {
183
- o.onAfterRouteEnter && Pt(t, e, r) && G(o.onAfterRouteEnter).forEach((a) => n.onAfterRouteEnter.add(a)), o.onAfterRouteUpdate && kt(t, e, r) && G(o.onAfterRouteUpdate).forEach((a) => n.onAfterRouteUpdate.add(a));
184
- }), e.matches.forEach((o, r) => {
185
- o.onAfterRouteLeave && St(t, e, r) && G(o.onAfterRouteLeave).forEach((a) => n.onAfterRouteLeave.add(a));
186
- }), n;
187
- }
188
- function Ge() {
189
- const t = (s) => {
190
- throw new yt(s);
191
- }, e = (...s) => {
192
- throw new Z(s);
193
- }, n = (s, c, i) => {
194
- if (F(s)) {
195
- const m = c ?? {};
196
- throw new Z([s, { ...m, replace: !0 }]);
172
+ function ze(t, e) {
173
+ const r = new ct();
174
+ return t.matches.forEach((o, n) => {
175
+ o.onBeforeRouteEnter && Pt(t, e, n) && G(o.onBeforeRouteEnter).forEach((s) => r.onBeforeRouteEnter.add(s)), o.onBeforeRouteUpdate && bt(t, e, n) && G(o.onBeforeRouteUpdate).forEach((s) => r.onBeforeRouteUpdate.add(s));
176
+ }), e.matches.forEach((o, n) => {
177
+ o.onBeforeRouteLeave && St(t, e, n) && G(o.onBeforeRouteLeave).forEach((s) => r.onBeforeRouteLeave.add(s));
178
+ }), r;
179
+ }
180
+ function Ye(t, e) {
181
+ const r = new ct();
182
+ return t.matches.forEach((o, n) => {
183
+ o.onAfterRouteEnter && Pt(t, e, n) && G(o.onAfterRouteEnter).forEach((s) => r.onAfterRouteEnter.add(s)), o.onAfterRouteUpdate && bt(t, e, n) && G(o.onAfterRouteUpdate).forEach((s) => r.onAfterRouteUpdate.add(s));
184
+ }), e.matches.forEach((o, n) => {
185
+ o.onAfterRouteLeave && St(t, e, n) && G(o.onAfterRouteLeave).forEach((s) => r.onAfterRouteLeave.add(s));
186
+ }), r;
187
+ }
188
+ function Xe() {
189
+ const t = (a) => {
190
+ throw new gt(a);
191
+ }, e = (...a) => {
192
+ throw new Z(a);
193
+ }, r = (a, c, u) => {
194
+ if (J(a)) {
195
+ const f = c ?? {};
196
+ throw new Z([a, { ...f, replace: !0 }]);
197
197
  }
198
- const f = c, h = i ?? {};
199
- throw new Z([s, f, { ...h, replace: !0 }]);
198
+ const l = c, p = u ?? {};
199
+ throw new Z([a, l, { ...p, replace: !0 }]);
200
200
  }, o = () => {
201
- throw new jt();
201
+ throw new Ht();
202
202
  };
203
- async function r({ to: s, from: c, hooks: i }) {
204
- const { global: f, component: h } = i, m = Qe(s, c), b = [
203
+ async function n({ to: a, from: c, hooks: u }) {
204
+ const { global: l, component: p } = u, f = ze(a, c), E = [
205
+ ...l.onBeforeRouteEnter,
205
206
  ...f.onBeforeRouteEnter,
206
- ...m.onBeforeRouteEnter,
207
+ ...l.onBeforeRouteUpdate,
207
208
  ...f.onBeforeRouteUpdate,
208
- ...m.onBeforeRouteUpdate,
209
- ...h.onBeforeRouteUpdate,
209
+ ...p.onBeforeRouteUpdate,
210
+ ...l.onBeforeRouteLeave,
210
211
  ...f.onBeforeRouteLeave,
211
- ...m.onBeforeRouteLeave,
212
- ...h.onBeforeRouteLeave
212
+ ...p.onBeforeRouteLeave
213
213
  ];
214
214
  try {
215
- const y = b.map((k) => k(s, {
215
+ const d = E.map((k) => k(a, {
216
216
  from: c,
217
217
  reject: t,
218
218
  push: e,
219
- replace: n,
219
+ replace: r,
220
220
  abort: o
221
221
  }));
222
- await Promise.all(y);
223
- } catch (y) {
224
- if (y instanceof Z)
222
+ await Promise.all(d);
223
+ } catch (d) {
224
+ if (d instanceof Z)
225
225
  return {
226
226
  status: "PUSH",
227
- to: y.to
227
+ to: d.to
228
228
  };
229
- if (y instanceof yt)
229
+ if (d instanceof gt)
230
230
  return {
231
231
  status: "REJECT",
232
- type: y.type
232
+ type: d.type
233
233
  };
234
- if (y instanceof jt)
234
+ if (d instanceof Ht)
235
235
  return {
236
236
  status: "ABORT"
237
237
  };
238
- throw y;
238
+ throw d;
239
239
  }
240
240
  return {
241
241
  status: "SUCCESS"
242
242
  };
243
243
  }
244
- async function a({ to: s, from: c, hooks: i }) {
245
- const { global: f, component: h } = i, m = Ke(s, c), b = [
246
- ...h.onAfterRouteLeave,
247
- ...m.onAfterRouteLeave,
244
+ async function s({ to: a, from: c, hooks: u }) {
245
+ const { global: l, component: p } = u, f = Ye(a, c), E = [
246
+ ...p.onAfterRouteLeave,
248
247
  ...f.onAfterRouteLeave,
249
- ...h.onAfterRouteUpdate,
250
- ...m.onAfterRouteUpdate,
248
+ ...l.onAfterRouteLeave,
249
+ ...p.onAfterRouteUpdate,
251
250
  ...f.onAfterRouteUpdate,
252
- ...h.onAfterRouteEnter,
253
- ...m.onAfterRouteEnter,
254
- ...f.onAfterRouteEnter
251
+ ...l.onAfterRouteUpdate,
252
+ ...p.onAfterRouteEnter,
253
+ ...f.onAfterRouteEnter,
254
+ ...l.onAfterRouteEnter
255
255
  ];
256
256
  try {
257
- const y = b.map((k) => k(s, {
257
+ const d = E.map((k) => k(a, {
258
258
  from: c,
259
259
  reject: t,
260
260
  push: e,
261
- replace: n
261
+ replace: r
262
262
  }));
263
- await Promise.all(y);
264
- } catch (y) {
265
- if (y instanceof Z)
263
+ await Promise.all(d);
264
+ } catch (d) {
265
+ if (d instanceof Z)
266
266
  return {
267
267
  status: "PUSH",
268
- to: y.to
268
+ to: d.to
269
269
  };
270
- if (y instanceof yt)
270
+ if (d instanceof gt)
271
271
  return {
272
272
  status: "REJECT",
273
- type: y.type
273
+ type: d.type
274
274
  };
275
- throw y;
275
+ throw d;
276
276
  }
277
277
  return {
278
278
  status: "SUCCESS"
279
279
  };
280
280
  }
281
281
  return {
282
- runBeforeRouteHooks: r,
283
- runAfterRouteHooks: a
282
+ runBeforeRouteHooks: n,
283
+ runAfterRouteHooks: s
284
284
  };
285
285
  }
286
- const Pt = (t, e, n) => {
287
- const o = t.matches, r = (e == null ? void 0 : e.matches) ?? [];
288
- return o.length < n || o[n] !== r[n];
289
- }, St = (t, e, n) => {
290
- const o = t.matches, r = (e == null ? void 0 : e.matches) ?? [];
291
- return o.length < n || o[n] !== r[n];
292
- }, kt = (t, e, n) => t.matches[n] === (e == null ? void 0 : e.matches[n]);
293
- function Vt(t) {
286
+ const Pt = (t, e, r) => {
287
+ const o = t.matches, n = (e == null ? void 0 : e.matches) ?? [];
288
+ return o.length < r || o[r] !== n[r];
289
+ }, St = (t, e, r) => {
290
+ const o = t.matches, n = (e == null ? void 0 : e.matches) ?? [];
291
+ return o.length < r || o[r] !== n[r];
292
+ }, bt = (t, e, r) => t.matches[r] === (e == null ? void 0 : e.matches[r]);
293
+ function jt(t) {
294
294
  switch (t) {
295
295
  case "onBeforeRouteEnter":
296
296
  case "onAfterRouteEnter":
297
297
  return Pt;
298
298
  case "onBeforeRouteUpdate":
299
299
  case "onAfterRouteUpdate":
300
- return kt;
300
+ return bt;
301
301
  case "onBeforeRouteLeave":
302
302
  case "onAfterRouteLeave":
303
303
  return St;
@@ -305,29 +305,29 @@ function Vt(t) {
305
305
  throw new Error(`Switch is not exhaustive for lifecycle: ${t}`);
306
306
  }
307
307
  }
308
- class ze {
308
+ class Ze {
309
309
  constructor() {
310
- V(this, "global", new st());
311
- V(this, "component", new st());
310
+ V(this, "global", new ct());
311
+ V(this, "component", new ct());
312
312
  }
313
- addBeforeRouteHook({ lifecycle: e, timing: n, depth: o, hook: r }) {
314
- const a = Vt(e), s = this[n][e], c = (i, f) => {
315
- if (a(i, f.from, o))
316
- return r(i, f);
313
+ addBeforeRouteHook({ lifecycle: e, timing: r, depth: o, hook: n }) {
314
+ const s = jt(e), a = this[r][e], c = (u, l) => {
315
+ if (s(u, l.from, o))
316
+ return n(u, l);
317
317
  };
318
- return s.add(c), () => s.delete(c);
318
+ return a.add(c), () => a.delete(c);
319
319
  }
320
- addAfterRouteHook({ lifecycle: e, timing: n, depth: o, hook: r }) {
321
- const a = Vt(e), s = this[n][e], c = (i, f) => {
322
- if (a(i, f.from, o))
323
- return r(i, f);
320
+ addAfterRouteHook({ lifecycle: e, timing: r, depth: o, hook: n }) {
321
+ const s = jt(e), a = this[r][e], c = (u, l) => {
322
+ if (s(u, l.from, o))
323
+ return n(u, l);
324
324
  };
325
- return s.add(c), () => s.delete(c);
325
+ return a.add(c), () => a.delete(c);
326
326
  }
327
327
  }
328
- const te = Symbol();
329
- function Ye() {
330
- const t = new ze();
328
+ const re = Symbol();
329
+ function tr() {
330
+ const t = new Ze();
331
331
  return {
332
332
  onBeforeRouteEnter: (c) => t.addBeforeRouteHook({ lifecycle: "onBeforeRouteEnter", hook: c, timing: "global", depth: 0 }),
333
333
  onBeforeRouteUpdate: (c) => t.addBeforeRouteHook({ lifecycle: "onBeforeRouteUpdate", hook: c, timing: "global", depth: 0 }),
@@ -338,25 +338,25 @@ function Ye() {
338
338
  hooks: t
339
339
  };
340
340
  }
341
- function ee() {
342
- const t = lt(te);
341
+ function ne() {
342
+ const t = ht(re);
343
343
  if (!t)
344
344
  throw new vt();
345
345
  return t;
346
346
  }
347
- function ne(t) {
347
+ function oe(t) {
348
348
  return (e) => {
349
- const n = bt(), r = ee().addBeforeRouteHook({ lifecycle: t, hook: e, depth: n, timing: "component" });
350
- return Ft(r), r;
349
+ const r = Et(), n = ne().addBeforeRouteHook({ lifecycle: t, hook: e, depth: r, timing: "component" });
350
+ return Qt(n), n;
351
351
  };
352
352
  }
353
- function xt(t) {
353
+ function kt(t) {
354
354
  return (e) => {
355
- const n = bt(), r = ee().addAfterRouteHook({ lifecycle: t, hook: e, depth: n, timing: "component" });
356
- return Ft(r), r;
355
+ const r = Et(), n = ne().addAfterRouteHook({ lifecycle: t, hook: e, depth: r, timing: "component" });
356
+ return Qt(n), n;
357
357
  };
358
358
  }
359
- const or = ne("onBeforeRouteUpdate"), ar = ne("onBeforeRouteLeave"), sr = xt("onAfterRouteEnter"), cr = xt("onAfterRouteUpdate"), ir = xt("onAfterRouteLeave"), Xe = ["href"], Ze = /* @__PURE__ */ et({
359
+ const nn = oe("onBeforeRouteUpdate"), on = oe("onBeforeRouteLeave"), an = kt("onAfterRouteEnter"), sn = kt("onAfterRouteUpdate"), cn = kt("onAfterRouteLeave"), er = ["href"], rr = /* @__PURE__ */ et({
360
360
  __name: "routerLink",
361
361
  props: {
362
362
  to: { type: [String, Function] },
@@ -364,116 +364,165 @@ const or = ne("onBeforeRouteUpdate"), ar = ne("onBeforeRouteLeave"), sr = xt("on
364
364
  replace: { type: Boolean }
365
365
  },
366
366
  setup(t) {
367
- const e = t, n = wt(), o = H(() => F(e.to) ? e.to : e.to(n.resolve)), r = H(() => {
368
- const { to: m, ...b } = e;
369
- return b;
370
- }), { href: a, isMatch: s, isExactMatch: c } = We(o), i = H(() => ({
371
- "router-link--match": s.value,
367
+ const e = t, r = wt(), o = H(() => J(e.to) ? e.to : e.to(r.resolve)), n = H(() => {
368
+ const { to: f, ...E } = e;
369
+ return E;
370
+ }), { href: s, isMatch: a, isExactMatch: c } = Te(o), u = H(() => ({
371
+ "router-link--match": a.value,
372
372
  "router-link--exact-match": c.value
373
- })), f = H(() => n.isExternal(o.value));
374
- function h(m) {
375
- m.preventDefault(), n.push(a.value, r.value);
373
+ })), l = H(() => r.isExternal(o.value));
374
+ function p(f) {
375
+ f.preventDefault(), r.push(s.value, n.value);
376
376
  }
377
- return (m, b) => (Jt(), $e("a", {
377
+ return (f, E) => (Kt(), $e("a", {
378
378
  href: o.value,
379
- class: Ne(["router-link", i.value]),
380
- onClick: h
379
+ class: Ne(["router-link", u.value]),
380
+ onClick: p
381
381
  }, [
382
- Qt(m.$slots, "default", Kt(Gt({ resolved: o.value, isMatch: rt(s), isExactMatch: rt(c), isExternal: f.value })))
383
- ], 10, Xe));
382
+ Gt(f.$slots, "default", zt(He({ resolved: o.value, isMatch: ot(a), isExactMatch: ot(c), isExternal: l.value })))
383
+ ], 10, er));
384
384
  }
385
385
  });
386
- function re(t) {
387
- return "children" in t;
386
+ function nr(t, e) {
387
+ return et({
388
+ name: "PropsWrapper",
389
+ expose: [],
390
+ setup() {
391
+ const r = e();
392
+ return "then" in r ? () => at(or(t, r)) : () => at(t, r);
393
+ }
394
+ });
388
395
  }
389
- function tn(t) {
390
- return re(t) && !("component" in t) && !("components" in t);
396
+ function or(t, e) {
397
+ return et({
398
+ name: "AsyncPropsWrapper",
399
+ expose: [],
400
+ async setup() {
401
+ const r = await e;
402
+ return () => at(t, r);
403
+ }
404
+ });
391
405
  }
392
- function en(t) {
393
- return typeof t == "object" && t !== null && "component" in t;
406
+ function rt(...t) {
407
+ const e = t.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(sr));
408
+ for (const r of e)
409
+ if (ar(e, r) > 1)
410
+ throw new Me(r);
394
411
  }
395
- function nn(t) {
396
- return typeof t == "object" && t !== null && "components" in t;
412
+ function ar(t, e) {
413
+ return t.filter((r) => e === r).length;
414
+ }
415
+ function sr(t) {
416
+ return t.startsWith("?") ? t.slice(1) : t;
417
+ }
418
+ function cr(t, e) {
419
+ rt(t.params, e.params);
420
+ const r = `${t.path}${e.path}`;
421
+ return {
422
+ path: r,
423
+ params: { ...t.params, ...e.params },
424
+ toString: () => r
425
+ };
426
+ }
427
+ function xt(t) {
428
+ return typeof t == "string" && t.length > 0;
429
+ }
430
+ function ur(t, e) {
431
+ rt(t.params, e.params);
432
+ const r = [t.query, e.query].filter(xt).join("&");
433
+ return {
434
+ query: r,
435
+ params: { ...t.params, ...e.params },
436
+ toString: () => r
437
+ };
438
+ }
439
+ function ir(t) {
440
+ return "host" in t && !!t.host;
441
+ }
442
+ function ae(t) {
443
+ return "parent" in t && !!t.parent;
444
+ }
445
+ function Vt(t) {
446
+ return "component" in t && !!t.component;
447
+ }
448
+ function Ct(t) {
449
+ return "components" in t && !!t.components;
450
+ }
451
+ function se(t, e) {
452
+ return {
453
+ ...e,
454
+ key: Zt(t.key, e.key),
455
+ path: cr(t.path, e.path),
456
+ query: ur(t.query, e.query),
457
+ matches: [...t.matches, e.matched],
458
+ host: t.host,
459
+ depth: t.depth + 1
460
+ };
397
461
  }
398
- const oe = /* @__PURE__ */ et({
462
+ const fr = /* @__PURE__ */ et({
399
463
  __name: "routerView",
400
464
  props: {
401
465
  name: {}
402
466
  },
403
467
  setup(t) {
404
- const { name: e = "default" } = t, n = Je(), o = Me(), r = bt();
405
- He(Zt, r + 1);
468
+ const { name: e = "default" } = t, r = Ge(), o = Ie(), n = Et(), s = je("RouterView", !0);
469
+ Ve(ee, n + 1);
406
470
  const a = H(() => {
407
471
  if (o.value)
408
472
  return o.value.component;
409
- const c = n.matches.at(r);
410
- if (!c)
473
+ const f = r.matches.at(n);
474
+ if (!f)
411
475
  return null;
412
- const f = s(c)[e];
413
- return f ? typeof f == "function" ? je(f) : f : null;
476
+ const E = c(f), d = l(f);
477
+ return E ? d ? nr(E, () => d(r.params)) : E : null;
414
478
  });
415
- function s(c) {
416
- return nn(c) ? c.components : en(c) ? { default: c.component } : {};
479
+ function c(f) {
480
+ return u(f)[e];
417
481
  }
418
- return (c, i) => Qt(c.$slots, "default", Kt(Gt({ route: rt(n), component: a.value, rejection: rt(o) })), () => [
419
- (Jt(), Ve(Ce(a.value)))
420
- ]);
421
- }
422
- });
423
- function ur(t, e) {
424
- return et({
425
- name: "PropsWrapper",
426
- expose: [],
427
- setup() {
428
- const n = e();
429
- return "then" in n ? () => ot(rn(t, n)) : () => ot(t, n);
482
+ function u(f) {
483
+ return Ct(f) ? f.components : Vt(f) ? { default: f.component } : typeof s == "string" ? {} : { default: s };
430
484
  }
431
- });
432
- }
433
- function rn(t, e) {
434
- return et({
435
- name: "AsyncPropsWrapper",
436
- expose: [],
437
- async setup() {
438
- const n = await e;
439
- return () => ot(t, n);
485
+ function l(f) {
486
+ return p(f)[e];
440
487
  }
441
- });
442
- }
443
- const O = "[", D = "]";
444
- function on(t) {
488
+ function p(f) {
489
+ return Ct(f) ? f.props ?? {} : Vt(f) ? { default: f.props } : {};
490
+ }
491
+ return (f, E) => a.value ? Gt(f.$slots, "default", zt(Ce({ key: 0 }, { route: ot(r), component: a.value, rejection: ot(o) })), () => [
492
+ (Kt(), _e(qe(a.value)))
493
+ ]) : Oe("", !0);
494
+ }
495
+ }), O = "[", D = "]";
496
+ function lr(t) {
445
497
  return t !== String && t !== Boolean && t !== Number && t !== Date;
446
498
  }
447
- function an(t) {
448
- return typeof t == "function" && on(t);
499
+ function hr(t) {
500
+ return typeof t == "function" && lr(t);
449
501
  }
450
- function ht(t) {
502
+ function pt(t) {
451
503
  return typeof t == "object" && "get" in t && typeof t.get == "function" && "set" in t && typeof t.set == "function";
452
504
  }
453
- function sn(t) {
454
- return ht(t) && t.defaultValue !== void 0;
455
- }
456
- function fr(t, e) {
457
- return fn(t, e);
505
+ function pr(t) {
506
+ return pt(t) && t.defaultValue !== void 0;
458
507
  }
459
- function At(t) {
460
- return typeof t == "string" && t.length > 0;
508
+ function un(t, e) {
509
+ return gr(t, e);
461
510
  }
462
- function cn(t, e) {
511
+ function dr(t, e) {
463
512
  return t[e] ?? String;
464
513
  }
465
514
  const j = {
466
515
  invalid: (t) => {
467
516
  throw new z(t);
468
517
  }
469
- }, un = {
518
+ }, mr = {
470
519
  get: (t) => t,
471
520
  set: (t, { invalid: e }) => {
472
521
  if (typeof t != "string")
473
522
  throw e();
474
523
  return t;
475
524
  }
476
- }, ae = {
525
+ }, ce = {
477
526
  get: (t, { invalid: e }) => {
478
527
  if (t === "true")
479
528
  return !0;
@@ -486,31 +535,31 @@ const j = {
486
535
  throw e();
487
536
  return t.toString();
488
537
  }
489
- }, se = {
538
+ }, ue = {
490
539
  get: (t, { invalid: e }) => {
491
- const n = Number(t);
492
- if (isNaN(n))
540
+ const r = Number(t);
541
+ if (isNaN(r))
493
542
  throw e();
494
- return n;
543
+ return r;
495
544
  },
496
545
  set: (t, { invalid: e }) => {
497
546
  if (typeof t != "number")
498
547
  throw e();
499
548
  return t.toString();
500
549
  }
501
- }, ce = {
550
+ }, ie = {
502
551
  get: (t, { invalid: e }) => {
503
- const n = new Date(t);
504
- if (isNaN(n.getTime()))
552
+ const r = new Date(t);
553
+ if (isNaN(r.getTime()))
505
554
  throw e();
506
- return n;
555
+ return r;
507
556
  },
508
557
  set: (t, { invalid: e }) => {
509
558
  if (typeof t != "object" || !(t instanceof Date))
510
559
  throw e();
511
560
  return t.toISOString();
512
561
  }
513
- }, ie = {
562
+ }, fe = {
514
563
  get: (t, { invalid: e }) => {
515
564
  try {
516
565
  return JSON.parse(t);
@@ -526,27 +575,27 @@ const j = {
526
575
  }
527
576
  }
528
577
  };
529
- function Lt(t, e, n = !1) {
530
- if (t === void 0 || !At(t)) {
531
- if (sn(e))
578
+ function At(t, e, r = !1) {
579
+ if (t === void 0 || !xt(t)) {
580
+ if (pr(e))
532
581
  return e.defaultValue;
533
- if (n)
582
+ if (r)
534
583
  return;
535
584
  throw new z();
536
585
  }
537
586
  if (e === String)
538
- return un.get(t, j);
587
+ return mr.get(t, j);
539
588
  if (e === Boolean)
540
- return ae.get(t, j);
589
+ return ce.get(t, j);
541
590
  if (e === Number)
542
- return se.get(t, j);
591
+ return ue.get(t, j);
543
592
  if (e === Date)
544
- return ce.get(t, j);
545
- if (e === JSON)
546
593
  return ie.get(t, j);
547
- if (an(e))
594
+ if (e === JSON)
595
+ return fe.get(t, j);
596
+ if (hr(e))
548
597
  return e(t, j);
549
- if (ht(e))
598
+ if (pt(e))
550
599
  return e.get(t, j);
551
600
  if (e instanceof RegExp) {
552
601
  if (e.test(t))
@@ -555,21 +604,21 @@ function Lt(t, e, n = !1) {
555
604
  }
556
605
  return t;
557
606
  }
558
- function Bt(t, e, n = !1) {
607
+ function Lt(t, e, r = !1) {
559
608
  if (t === void 0) {
560
- if (n)
609
+ if (r)
561
610
  return "";
562
611
  throw new z();
563
612
  }
564
613
  if (e === Boolean)
565
- return ae.set(t, j);
614
+ return ce.set(t, j);
566
615
  if (e === Number)
567
- return se.set(t, j);
616
+ return ue.set(t, j);
568
617
  if (e === Date)
569
- return ce.set(t, j);
570
- if (e === JSON)
571
618
  return ie.set(t, j);
572
- if (ht(e))
619
+ if (e === JSON)
620
+ return fe.set(t, j);
621
+ if (pt(e))
573
622
  return e.set(t, j);
574
623
  try {
575
624
  return t.toString();
@@ -577,19 +626,19 @@ function Bt(t, e, n = !1) {
577
626
  throw new z();
578
627
  }
579
628
  }
580
- function fn(t, e) {
581
- return ht(t) ? { ...t, defaultValue: e ?? t.defaultValue } : {
582
- get: (n) => Lt(n, t),
583
- set: (n) => Bt(n, t),
629
+ function gr(t, e) {
630
+ return pt(t) ? { ...t, defaultValue: e ?? t.defaultValue } : {
631
+ get: (r) => At(r, t),
632
+ set: (r) => Lt(r, t),
584
633
  defaultValue: e
585
634
  };
586
635
  }
587
636
  function M() {
588
637
  return M = Object.assign ? Object.assign.bind() : function(t) {
589
638
  for (var e = 1; e < arguments.length; e++) {
590
- var n = arguments[e];
591
- for (var o in n)
592
- Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
639
+ var r = arguments[e];
640
+ for (var o in r)
641
+ Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
593
642
  }
594
643
  return t;
595
644
  }, M.apply(this, arguments);
@@ -603,7 +652,7 @@ var Y = process.env.NODE_ENV !== "production" ? function(t) {
603
652
  } : function(t) {
604
653
  return t;
605
654
  };
606
- function J(t, e) {
655
+ function F(t, e) {
607
656
  if (!t) {
608
657
  typeof console < "u" && console.warn(e);
609
658
  try {
@@ -612,38 +661,38 @@ function J(t, e) {
612
661
  }
613
662
  }
614
663
  }
615
- var ct = "beforeunload", ln = "hashchange", ue = "popstate";
616
- function Ct(t) {
664
+ var ut = "beforeunload", yr = "hashchange", le = "popstate";
665
+ function _t(t) {
617
666
  t === void 0 && (t = {});
618
- var e = t, n = e.window, o = n === void 0 ? document.defaultView : n, r = o.history;
619
- function a() {
620
- var p = o.location, u = p.pathname, l = p.search, R = p.hash, w = r.state || {};
667
+ var e = t, r = e.window, o = r === void 0 ? document.defaultView : r, n = o.history;
668
+ function s() {
669
+ var m = o.location, i = m.pathname, h = m.search, R = m.hash, w = n.state || {};
621
670
  return [w.idx, Y({
622
- pathname: u,
623
- search: l,
671
+ pathname: i,
672
+ search: h,
624
673
  hash: R,
625
674
  state: w.usr || null,
626
675
  key: w.key || "default"
627
676
  })];
628
677
  }
629
- var s = null;
678
+ var a = null;
630
679
  function c() {
631
- if (s)
632
- y.call(s), s = null;
680
+ if (a)
681
+ d.call(a), a = null;
633
682
  else {
634
- var p = L.Pop, u = a(), l = u[0], R = u[1];
635
- if (y.length)
636
- if (l != null) {
637
- var w = h - l;
638
- w && (s = {
639
- action: p,
683
+ var m = L.Pop, i = s(), h = i[0], R = i[1];
684
+ if (d.length)
685
+ if (h != null) {
686
+ var w = p - h;
687
+ w && (a = {
688
+ action: m,
640
689
  location: R,
641
690
  retry: function() {
642
- E(w * -1);
691
+ P(w * -1);
643
692
  }
644
- }, E(w));
693
+ }, P(w));
645
694
  } else
646
- process.env.NODE_ENV !== "production" && J(
695
+ process.env.NODE_ENV !== "production" && F(
647
696
  !1,
648
697
  // TODO: Write up a doc that explains our blocking strategy in
649
698
  // detail and link to it here so people can understand better what
@@ -651,137 +700,137 @@ function Ct(t) {
651
700
  "You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
652
701
  );
653
702
  else
654
- q(p);
703
+ _(m);
655
704
  }
656
705
  }
657
- o.addEventListener(ue, c);
658
- var i = L.Pop, f = a(), h = f[0], m = f[1], b = X(), y = X();
659
- h == null && (h = 0, r.replaceState(M({}, r.state, {
660
- idx: h
706
+ o.addEventListener(le, c);
707
+ var u = L.Pop, l = s(), p = l[0], f = l[1], E = X(), d = X();
708
+ p == null && (p = 0, n.replaceState(M({}, n.state, {
709
+ idx: p
661
710
  }), ""));
662
- function k(p) {
663
- return typeof p == "string" ? p : Q(p);
711
+ function k(m) {
712
+ return typeof m == "string" ? m : Q(m);
664
713
  }
665
- function x(p, u) {
666
- return u === void 0 && (u = null), Y(M({
667
- pathname: m.pathname,
714
+ function x(m, i) {
715
+ return i === void 0 && (i = null), Y(M({
716
+ pathname: f.pathname,
668
717
  hash: "",
669
718
  search: ""
670
- }, typeof p == "string" ? tt(p) : p, {
671
- state: u,
672
- key: ut()
719
+ }, typeof m == "string" ? tt(m) : m, {
720
+ state: i,
721
+ key: ft()
673
722
  }));
674
723
  }
675
- function C(p, u) {
724
+ function C(m, i) {
676
725
  return [{
677
- usr: p.state,
678
- key: p.key,
679
- idx: u
680
- }, k(p)];
681
- }
682
- function B(p, u, l) {
683
- return !y.length || (y.call({
684
- action: p,
685
- location: u,
686
- retry: l
726
+ usr: m.state,
727
+ key: m.key,
728
+ idx: i
729
+ }, k(m)];
730
+ }
731
+ function B(m, i, h) {
732
+ return !d.length || (d.call({
733
+ action: m,
734
+ location: i,
735
+ retry: h
687
736
  }), !1);
688
737
  }
689
- function q(p) {
690
- i = p;
691
- var u = a();
692
- h = u[0], m = u[1], b.call({
693
- action: i,
694
- location: m
738
+ function _(m) {
739
+ u = m;
740
+ var i = s();
741
+ p = i[0], f = i[1], E.call({
742
+ action: u,
743
+ location: f
695
744
  });
696
745
  }
697
- function d(p, u) {
698
- var l = L.Push, R = x(p, u);
746
+ function g(m, i) {
747
+ var h = L.Push, R = x(m, i);
699
748
  function w() {
700
- d(p, u);
749
+ g(m, i);
701
750
  }
702
- if (B(l, R, w)) {
703
- var S = C(R, h + 1), A = S[0], U = S[1];
751
+ if (B(h, R, w)) {
752
+ var b = C(R, p + 1), A = b[0], U = b[1];
704
753
  try {
705
- r.pushState(A, "", U);
754
+ n.pushState(A, "", U);
706
755
  } catch {
707
756
  o.location.assign(U);
708
757
  }
709
- q(l);
758
+ _(h);
710
759
  }
711
760
  }
712
- function g(p, u) {
713
- var l = L.Replace, R = x(p, u);
761
+ function y(m, i) {
762
+ var h = L.Replace, R = x(m, i);
714
763
  function w() {
715
- g(p, u);
764
+ y(m, i);
716
765
  }
717
- if (B(l, R, w)) {
718
- var S = C(R, h), A = S[0], U = S[1];
719
- r.replaceState(A, "", U), q(l);
766
+ if (B(h, R, w)) {
767
+ var b = C(R, p), A = b[0], U = b[1];
768
+ n.replaceState(A, "", U), _(h);
720
769
  }
721
770
  }
722
- function E(p) {
723
- r.go(p);
771
+ function P(m) {
772
+ n.go(m);
724
773
  }
725
- var P = {
774
+ var S = {
726
775
  get action() {
727
- return i;
776
+ return u;
728
777
  },
729
778
  get location() {
730
- return m;
779
+ return f;
731
780
  },
732
781
  createHref: k,
733
- push: d,
734
- replace: g,
735
- go: E,
782
+ push: g,
783
+ replace: y,
784
+ go: P,
736
785
  back: function() {
737
- E(-1);
786
+ P(-1);
738
787
  },
739
788
  forward: function() {
740
- E(1);
789
+ P(1);
741
790
  },
742
- listen: function(u) {
743
- return b.push(u);
791
+ listen: function(i) {
792
+ return E.push(i);
744
793
  },
745
- block: function(u) {
746
- var l = y.push(u);
747
- return y.length === 1 && o.addEventListener(ct, it), function() {
748
- l(), y.length || o.removeEventListener(ct, it);
794
+ block: function(i) {
795
+ var h = d.push(i);
796
+ return d.length === 1 && o.addEventListener(ut, it), function() {
797
+ h(), d.length || o.removeEventListener(ut, it);
749
798
  };
750
799
  }
751
800
  };
752
- return P;
801
+ return S;
753
802
  }
754
- function hn(t) {
803
+ function Rr(t) {
755
804
  t === void 0 && (t = {});
756
- var e = t, n = e.window, o = n === void 0 ? document.defaultView : n, r = o.history;
757
- function a() {
758
- var u = tt(o.location.hash.substr(1)), l = u.pathname, R = l === void 0 ? "/" : l, w = u.search, S = w === void 0 ? "" : w, A = u.hash, U = A === void 0 ? "" : A, $ = r.state || {};
805
+ var e = t, r = e.window, o = r === void 0 ? document.defaultView : r, n = o.history;
806
+ function s() {
807
+ var i = tt(o.location.hash.substr(1)), h = i.pathname, R = h === void 0 ? "/" : h, w = i.search, b = w === void 0 ? "" : w, A = i.hash, U = A === void 0 ? "" : A, $ = n.state || {};
759
808
  return [$.idx, Y({
760
809
  pathname: R,
761
- search: S,
810
+ search: b,
762
811
  hash: U,
763
812
  state: $.usr || null,
764
813
  key: $.key || "default"
765
814
  })];
766
815
  }
767
- var s = null;
816
+ var a = null;
768
817
  function c() {
769
- if (s)
770
- y.call(s), s = null;
818
+ if (a)
819
+ d.call(a), a = null;
771
820
  else {
772
- var u = L.Pop, l = a(), R = l[0], w = l[1];
773
- if (y.length)
821
+ var i = L.Pop, h = s(), R = h[0], w = h[1];
822
+ if (d.length)
774
823
  if (R != null) {
775
- var S = h - R;
776
- S && (s = {
777
- action: u,
824
+ var b = p - R;
825
+ b && (a = {
826
+ action: i,
778
827
  location: w,
779
828
  retry: function() {
780
- P(S * -1);
829
+ S(b * -1);
781
830
  }
782
- }, P(S));
831
+ }, S(b));
783
832
  } else
784
- process.env.NODE_ENV !== "production" && J(
833
+ process.env.NODE_ENV !== "production" && F(
785
834
  !1,
786
835
  // TODO: Write up a doc that explains our blocking strategy in
787
836
  // detail and link to it here so people can understand better
@@ -789,187 +838,187 @@ function hn(t) {
789
838
  "You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
790
839
  );
791
840
  else
792
- d(u);
841
+ g(i);
793
842
  }
794
843
  }
795
- o.addEventListener(ue, c), o.addEventListener(ln, function() {
796
- var u = a(), l = u[1];
797
- Q(l) !== Q(m) && c();
844
+ o.addEventListener(le, c), o.addEventListener(yr, function() {
845
+ var i = s(), h = i[1];
846
+ Q(h) !== Q(f) && c();
798
847
  });
799
- var i = L.Pop, f = a(), h = f[0], m = f[1], b = X(), y = X();
800
- h == null && (h = 0, r.replaceState(M({}, r.state, {
801
- idx: h
848
+ var u = L.Pop, l = s(), p = l[0], f = l[1], E = X(), d = X();
849
+ p == null && (p = 0, n.replaceState(M({}, n.state, {
850
+ idx: p
802
851
  }), ""));
803
852
  function k() {
804
- var u = document.querySelector("base"), l = "";
805
- if (u && u.getAttribute("href")) {
853
+ var i = document.querySelector("base"), h = "";
854
+ if (i && i.getAttribute("href")) {
806
855
  var R = o.location.href, w = R.indexOf("#");
807
- l = w === -1 ? R : R.slice(0, w);
856
+ h = w === -1 ? R : R.slice(0, w);
808
857
  }
809
- return l;
858
+ return h;
810
859
  }
811
- function x(u) {
812
- return k() + "#" + (typeof u == "string" ? u : Q(u));
860
+ function x(i) {
861
+ return k() + "#" + (typeof i == "string" ? i : Q(i));
813
862
  }
814
- function C(u, l) {
815
- return l === void 0 && (l = null), Y(M({
816
- pathname: m.pathname,
863
+ function C(i, h) {
864
+ return h === void 0 && (h = null), Y(M({
865
+ pathname: f.pathname,
817
866
  hash: "",
818
867
  search: ""
819
- }, typeof u == "string" ? tt(u) : u, {
820
- state: l,
821
- key: ut()
868
+ }, typeof i == "string" ? tt(i) : i, {
869
+ state: h,
870
+ key: ft()
822
871
  }));
823
872
  }
824
- function B(u, l) {
873
+ function B(i, h) {
825
874
  return [{
826
- usr: u.state,
827
- key: u.key,
828
- idx: l
829
- }, x(u)];
875
+ usr: i.state,
876
+ key: i.key,
877
+ idx: h
878
+ }, x(i)];
830
879
  }
831
- function q(u, l, R) {
832
- return !y.length || (y.call({
833
- action: u,
834
- location: l,
880
+ function _(i, h, R) {
881
+ return !d.length || (d.call({
882
+ action: i,
883
+ location: h,
835
884
  retry: R
836
885
  }), !1);
837
886
  }
838
- function d(u) {
839
- i = u;
840
- var l = a();
841
- h = l[0], m = l[1], b.call({
842
- action: i,
843
- location: m
887
+ function g(i) {
888
+ u = i;
889
+ var h = s();
890
+ p = h[0], f = h[1], E.call({
891
+ action: u,
892
+ location: f
844
893
  });
845
894
  }
846
- function g(u, l) {
847
- var R = L.Push, w = C(u, l);
848
- function S() {
849
- g(u, l);
895
+ function y(i, h) {
896
+ var R = L.Push, w = C(i, h);
897
+ function b() {
898
+ y(i, h);
850
899
  }
851
- if (process.env.NODE_ENV !== "production" && J(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(u) + ")"), q(R, w, S)) {
852
- var A = B(w, h + 1), U = A[0], $ = A[1];
900
+ if (process.env.NODE_ENV !== "production" && F(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(i) + ")"), _(R, w, b)) {
901
+ var A = B(w, p + 1), U = A[0], $ = A[1];
853
902
  try {
854
- r.pushState(U, "", $);
903
+ n.pushState(U, "", $);
855
904
  } catch {
856
905
  o.location.assign($);
857
906
  }
858
- d(R);
907
+ g(R);
859
908
  }
860
909
  }
861
- function E(u, l) {
862
- var R = L.Replace, w = C(u, l);
863
- function S() {
864
- E(u, l);
910
+ function P(i, h) {
911
+ var R = L.Replace, w = C(i, h);
912
+ function b() {
913
+ P(i, h);
865
914
  }
866
- if (process.env.NODE_ENV !== "production" && J(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(u) + ")"), q(R, w, S)) {
867
- var A = B(w, h), U = A[0], $ = A[1];
868
- r.replaceState(U, "", $), d(R);
915
+ if (process.env.NODE_ENV !== "production" && F(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(i) + ")"), _(R, w, b)) {
916
+ var A = B(w, p), U = A[0], $ = A[1];
917
+ n.replaceState(U, "", $), g(R);
869
918
  }
870
919
  }
871
- function P(u) {
872
- r.go(u);
920
+ function S(i) {
921
+ n.go(i);
873
922
  }
874
- var p = {
923
+ var m = {
875
924
  get action() {
876
- return i;
925
+ return u;
877
926
  },
878
927
  get location() {
879
- return m;
928
+ return f;
880
929
  },
881
930
  createHref: x,
882
- push: g,
883
- replace: E,
884
- go: P,
931
+ push: y,
932
+ replace: P,
933
+ go: S,
885
934
  back: function() {
886
- P(-1);
935
+ S(-1);
887
936
  },
888
937
  forward: function() {
889
- P(1);
938
+ S(1);
890
939
  },
891
- listen: function(l) {
892
- return b.push(l);
940
+ listen: function(h) {
941
+ return E.push(h);
893
942
  },
894
- block: function(l) {
895
- var R = y.push(l);
896
- return y.length === 1 && o.addEventListener(ct, it), function() {
897
- R(), y.length || o.removeEventListener(ct, it);
943
+ block: function(h) {
944
+ var R = d.push(h);
945
+ return d.length === 1 && o.addEventListener(ut, it), function() {
946
+ R(), d.length || o.removeEventListener(ut, it);
898
947
  };
899
948
  }
900
949
  };
901
- return p;
950
+ return m;
902
951
  }
903
952
  function qt(t) {
904
953
  t === void 0 && (t = {});
905
- var e = t, n = e.initialEntries, o = n === void 0 ? ["/"] : n, r = e.initialIndex, a = o.map(function(d) {
906
- var g = Y(M({
954
+ var e = t, r = e.initialEntries, o = r === void 0 ? ["/"] : r, n = e.initialIndex, s = o.map(function(g) {
955
+ var y = Y(M({
907
956
  pathname: "/",
908
957
  search: "",
909
958
  hash: "",
910
959
  state: null,
911
- key: ut()
912
- }, typeof d == "string" ? tt(d) : d));
913
- return process.env.NODE_ENV !== "production" && J(g.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(d) + ")"), g;
914
- }), s = _t(r ?? a.length - 1, 0, a.length - 1), c = L.Pop, i = a[s], f = X(), h = X();
915
- function m(d) {
916
- return typeof d == "string" ? d : Q(d);
917
- }
918
- function b(d, g) {
919
- return g === void 0 && (g = null), Y(M({
920
- pathname: i.pathname,
960
+ key: ft()
961
+ }, typeof g == "string" ? tt(g) : g));
962
+ return process.env.NODE_ENV !== "production" && F(y.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(g) + ")"), y;
963
+ }), a = Ot(n ?? s.length - 1, 0, s.length - 1), c = L.Pop, u = s[a], l = X(), p = X();
964
+ function f(g) {
965
+ return typeof g == "string" ? g : Q(g);
966
+ }
967
+ function E(g, y) {
968
+ return y === void 0 && (y = null), Y(M({
969
+ pathname: u.pathname,
921
970
  search: "",
922
971
  hash: ""
923
- }, typeof d == "string" ? tt(d) : d, {
924
- state: g,
925
- key: ut()
972
+ }, typeof g == "string" ? tt(g) : g, {
973
+ state: y,
974
+ key: ft()
926
975
  }));
927
976
  }
928
- function y(d, g, E) {
929
- return !h.length || (h.call({
930
- action: d,
931
- location: g,
932
- retry: E
977
+ function d(g, y, P) {
978
+ return !p.length || (p.call({
979
+ action: g,
980
+ location: y,
981
+ retry: P
933
982
  }), !1);
934
983
  }
935
- function k(d, g) {
936
- c = d, i = g, f.call({
984
+ function k(g, y) {
985
+ c = g, u = y, l.call({
937
986
  action: c,
938
- location: i
987
+ location: u
939
988
  });
940
989
  }
941
- function x(d, g) {
942
- var E = L.Push, P = b(d, g);
943
- function p() {
944
- x(d, g);
990
+ function x(g, y) {
991
+ var P = L.Push, S = E(g, y);
992
+ function m() {
993
+ x(g, y);
945
994
  }
946
- process.env.NODE_ENV !== "production" && J(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(d) + ")"), y(E, P, p) && (s += 1, a.splice(s, a.length, P), k(E, P));
995
+ process.env.NODE_ENV !== "production" && F(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(g) + ")"), d(P, S, m) && (a += 1, s.splice(a, s.length, S), k(P, S));
947
996
  }
948
- function C(d, g) {
949
- var E = L.Replace, P = b(d, g);
950
- function p() {
951
- C(d, g);
997
+ function C(g, y) {
998
+ var P = L.Replace, S = E(g, y);
999
+ function m() {
1000
+ C(g, y);
952
1001
  }
953
- process.env.NODE_ENV !== "production" && J(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(d) + ")"), y(E, P, p) && (a[s] = P, k(E, P));
1002
+ process.env.NODE_ENV !== "production" && F(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(g) + ")"), d(P, S, m) && (s[a] = S, k(P, S));
954
1003
  }
955
- function B(d) {
956
- var g = _t(s + d, 0, a.length - 1), E = L.Pop, P = a[g];
957
- function p() {
958
- B(d);
1004
+ function B(g) {
1005
+ var y = Ot(a + g, 0, s.length - 1), P = L.Pop, S = s[y];
1006
+ function m() {
1007
+ B(g);
959
1008
  }
960
- y(E, P, p) && (s = g, k(E, P));
1009
+ d(P, S, m) && (a = y, k(P, S));
961
1010
  }
962
- var q = {
1011
+ var _ = {
963
1012
  get index() {
964
- return s;
1013
+ return a;
965
1014
  },
966
1015
  get action() {
967
1016
  return c;
968
1017
  },
969
1018
  get location() {
970
- return i;
1019
+ return u;
971
1020
  },
972
- createHref: m,
1021
+ createHref: f,
973
1022
  push: x,
974
1023
  replace: C,
975
1024
  go: B,
@@ -979,17 +1028,17 @@ function qt(t) {
979
1028
  forward: function() {
980
1029
  B(1);
981
1030
  },
982
- listen: function(g) {
983
- return f.push(g);
1031
+ listen: function(y) {
1032
+ return l.push(y);
984
1033
  },
985
- block: function(g) {
986
- return h.push(g);
1034
+ block: function(y) {
1035
+ return p.push(y);
987
1036
  }
988
1037
  };
989
- return q;
1038
+ return _;
990
1039
  }
991
- function _t(t, e, n) {
992
- return Math.min(Math.max(t, e), n);
1040
+ function Ot(t, e, r) {
1041
+ return Math.min(Math.max(t, e), r);
993
1042
  }
994
1043
  function it(t) {
995
1044
  t.preventDefault(), t.returnValue = "";
@@ -1000,446 +1049,438 @@ function X() {
1000
1049
  get length() {
1001
1050
  return t.length;
1002
1051
  },
1003
- push: function(n) {
1004
- return t.push(n), function() {
1052
+ push: function(r) {
1053
+ return t.push(r), function() {
1005
1054
  t = t.filter(function(o) {
1006
- return o !== n;
1055
+ return o !== r;
1007
1056
  });
1008
1057
  };
1009
1058
  },
1010
- call: function(n) {
1059
+ call: function(r) {
1011
1060
  t.forEach(function(o) {
1012
- return o && o(n);
1061
+ return o && o(r);
1013
1062
  });
1014
1063
  }
1015
1064
  };
1016
1065
  }
1017
- function ut() {
1066
+ function ft() {
1018
1067
  return Math.random().toString(36).substr(2, 8);
1019
1068
  }
1020
1069
  function Q(t) {
1021
- var e = t.pathname, n = e === void 0 ? "/" : e, o = t.search, r = o === void 0 ? "" : o, a = t.hash, s = a === void 0 ? "" : a;
1022
- return r && r !== "?" && (n += r.charAt(0) === "?" ? r : "?" + r), s && s !== "#" && (n += s.charAt(0) === "#" ? s : "#" + s), n;
1070
+ var e = t.pathname, r = e === void 0 ? "/" : e, o = t.search, n = o === void 0 ? "" : o, s = t.hash, a = s === void 0 ? "" : s;
1071
+ return n && n !== "?" && (r += n.charAt(0) === "?" ? n : "?" + n), a && a !== "#" && (r += a.charAt(0) === "#" ? a : "#" + a), r;
1023
1072
  }
1024
1073
  function tt(t) {
1025
1074
  var e = {};
1026
1075
  if (t) {
1027
- var n = t.indexOf("#");
1028
- n >= 0 && (e.hash = t.substr(n), t = t.substr(0, n));
1076
+ var r = t.indexOf("#");
1077
+ r >= 0 && (e.hash = t.substr(r), t = t.substr(0, r));
1029
1078
  var o = t.indexOf("?");
1030
1079
  o >= 0 && (e.search = t.substr(o), t = t.substr(0, o)), t && (e.pathname = t);
1031
1080
  }
1032
1081
  return e;
1033
1082
  }
1034
- function pn(t, e) {
1035
- const n = It({ ...t }), o = (s) => {
1036
- Object.assign(n, { ...s });
1037
- }, r = n, a = Te(r, e);
1083
+ function vr(t, e) {
1084
+ const r = Ft({ ...t }), o = (a) => {
1085
+ Object.assign(r, { ...a });
1086
+ }, n = r, s = Fe(n, e);
1038
1087
  return {
1039
- currentRoute: r,
1040
- routerRoute: a,
1088
+ currentRoute: n,
1089
+ routerRoute: s,
1041
1090
  updateRoute: o
1042
1091
  };
1043
1092
  }
1044
1093
  function K(t) {
1045
- return !t.startsWith("http") ? mn(t) : dn(t);
1094
+ return !t.startsWith("http") ? Er(t) : wr(t);
1046
1095
  }
1047
- function dn(t) {
1048
- const { protocol: e, host: n, pathname: o, search: r, searchParams: a, hash: s } = new URL(t, t);
1096
+ function wr(t) {
1097
+ const { protocol: e, host: r, pathname: o, search: n, searchParams: s, hash: a } = new URL(t, t);
1049
1098
  return {
1050
1099
  protocol: e,
1051
- host: n,
1100
+ host: r,
1052
1101
  pathname: o,
1053
- search: r,
1054
- searchParams: a,
1055
- hash: s
1102
+ search: n,
1103
+ searchParams: s,
1104
+ hash: a
1056
1105
  };
1057
1106
  }
1058
- function mn(t) {
1059
- const { pathname: e, search: n, searchParams: o, hash: r } = new URL(t, "https://localhost");
1107
+ function Er(t) {
1108
+ const { pathname: e, search: r, searchParams: o, hash: n } = new URL(t, "https://localhost");
1060
1109
  return {
1061
1110
  pathname: e,
1062
- search: n,
1111
+ search: r,
1063
1112
  searchParams: o,
1064
- hash: r
1113
+ hash: n
1065
1114
  };
1066
1115
  }
1067
- function yn(t) {
1116
+ function Pr(t) {
1068
1117
  return (e) => {
1069
- const { host: n } = K(e);
1070
- return !(n === void 0 || n === t);
1118
+ const { host: r } = K(e);
1119
+ return !(r === void 0 || r === t);
1071
1120
  };
1072
1121
  }
1073
- function fe() {
1122
+ function he() {
1074
1123
  return typeof window < "u" && typeof window.document < "u";
1075
1124
  }
1076
- function gn({ mode: t, listener: e }) {
1077
- const n = Rn(t), o = (i, f) => {
1078
- if (f != null && f.replace)
1079
- return n.replace(i);
1080
- n.push(i);
1081
- }, r = () => {
1082
- const i = Q(n.location);
1083
- return n.replace(i);
1125
+ function Sr({ mode: t, listener: e }) {
1126
+ const r = br(t), o = (u, l) => {
1127
+ if (l != null && l.replace)
1128
+ return r.replace(u);
1129
+ r.push(u);
1130
+ }, n = () => {
1131
+ const u = Q(r.location);
1132
+ return r.replace(u);
1084
1133
  };
1085
- let a;
1134
+ let s;
1086
1135
  return {
1087
- ...n,
1136
+ ...r,
1088
1137
  update: o,
1089
- refresh: r,
1138
+ refresh: n,
1090
1139
  startListening: () => {
1091
- a == null || a(), a = n.listen(e);
1140
+ s == null || s(), s = r.listen(e);
1092
1141
  },
1093
1142
  stopListening: () => {
1094
- a == null || a();
1143
+ s == null || s();
1095
1144
  }
1096
1145
  };
1097
1146
  }
1098
- function Rn(t = "auto") {
1147
+ function br(t = "auto") {
1099
1148
  switch (t) {
1100
1149
  case "auto":
1101
- return fe() ? Ct() : qt();
1150
+ return he() ? _t() : qt();
1102
1151
  case "browser":
1103
- return Ct();
1152
+ return _t();
1104
1153
  case "memory":
1105
1154
  return qt();
1106
1155
  case "hash":
1107
- return hn();
1156
+ return Rr();
1108
1157
  default:
1109
1158
  const e = t;
1110
1159
  throw new Error(`Switch is not exhaustive for mode: ${e}`);
1111
1160
  }
1112
1161
  }
1113
- function vn(t) {
1114
- return et(() => () => ot("h1", t), {
1162
+ function kr(t) {
1163
+ return et(() => () => at("h1", t), {
1115
1164
  name: t,
1116
1165
  props: []
1117
1166
  });
1118
1167
  }
1119
- function le(t) {
1168
+ function pe(t) {
1120
1169
  const e = new URLSearchParams(t);
1121
1170
  return {
1122
- get: (n) => e.get(n),
1123
- getAll: (n) => e.getAll(n)
1171
+ get: (r) => e.get(r),
1172
+ getAll: (r) => e.getAll(r)
1124
1173
  };
1125
1174
  }
1126
- const Ot = Symbol();
1127
- function wn({
1175
+ const Wt = Symbol();
1176
+ function xr({
1128
1177
  rejections: t
1129
1178
  }) {
1130
- const e = (s) => {
1179
+ const e = (a) => {
1131
1180
  const c = {
1132
1181
  ...t
1133
1182
  };
1134
- return at(c[s] ?? vn(s));
1135
- }, n = (s) => {
1136
- const c = at(e(s)), i = {
1137
- name: s,
1138
- path: "",
1183
+ return st(c[a] ?? kr(a));
1184
+ }, r = (a) => {
1185
+ const c = st(e(a)), u = {
1186
+ name: a,
1139
1187
  component: c,
1140
1188
  meta: {}
1141
1189
  };
1142
1190
  return {
1143
- matched: i,
1144
- matches: [i],
1145
- key: s,
1146
- query: le(""),
1191
+ matched: u,
1192
+ matches: [u],
1193
+ key: a,
1194
+ query: pe(""),
1147
1195
  params: {},
1148
- [Ot]: !0
1196
+ [Wt]: !0
1149
1197
  };
1150
- }, o = (s) => Ot in s, r = (s) => {
1151
- if (!s) {
1152
- a.value = null;
1198
+ }, o = (a) => Wt in a, n = (a) => {
1199
+ if (!a) {
1200
+ s.value = null;
1153
1201
  return;
1154
1202
  }
1155
- const c = e(s);
1156
- a.value = { type: s, component: c };
1157
- }, a = qe(null);
1203
+ const c = e(a);
1204
+ s.value = { type: a, component: c };
1205
+ }, s = We(null);
1158
1206
  return {
1159
- setRejection: r,
1160
- rejection: a,
1161
- getRejectionRoute: n,
1207
+ setRejection: n,
1208
+ rejection: s,
1209
+ getRejectionRoute: r,
1162
1210
  isRejectionRoute: o
1163
1211
  };
1164
1212
  }
1165
- class En extends Error {
1166
- constructor(e) {
1167
- super(`Route disabled: "${e}"`);
1168
- }
1169
- }
1170
- class bn extends Error {
1213
+ class Ar extends Error {
1171
1214
  constructor(e) {
1172
1215
  super(`Route not found: "${e}"`);
1173
1216
  }
1174
1217
  }
1175
- function Ut(t) {
1218
+ function Bt(t) {
1176
1219
  return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1177
1220
  }
1178
- function Pn(t, e) {
1179
- const n = Array.from(t.matchAll(e));
1180
- if (n.length === 0)
1221
+ function Lr(t, e) {
1222
+ const r = Array.from(t.matchAll(e));
1223
+ if (r.length === 0)
1181
1224
  return [t];
1182
1225
  let o = 0;
1183
- const r = n.reduce((s, c) => {
1184
- const i = Ut(t.slice(o, c.index));
1185
- i.length && s.push(i);
1186
- const [f] = c;
1187
- return s.push(f), o = c.index + f.length, s;
1188
- }, []), a = t.slice(o);
1189
- return a && r.push(a), r;
1190
- }
1191
- function Sn(t) {
1192
- const e = he(t.path.toString());
1226
+ const n = r.reduce((a, c) => {
1227
+ const u = Bt(t.slice(o, c.index));
1228
+ u.length && a.push(u);
1229
+ const [l] = c;
1230
+ return a.push(l), o = c.index + l.length, a;
1231
+ }, []), s = t.slice(o);
1232
+ return s && n.push(s), n;
1233
+ }
1234
+ function Br(t) {
1235
+ const e = de(t.path.toString());
1193
1236
  return new RegExp(`^${e}$`, "i");
1194
1237
  }
1195
- function kn(t) {
1238
+ function Ur(t) {
1196
1239
  const e = new URLSearchParams(t.query.toString());
1197
- return Array.from(e.entries()).filter(([, n]) => !Rt(n)).map(([n, o]) => {
1198
- const r = he(o);
1199
- return new RegExp(`${Ut(n)}=${r}(&|$)`, "i");
1240
+ return Array.from(e.entries()).filter(([, r]) => !Rt(r)).map(([r, o]) => {
1241
+ const n = de(o);
1242
+ return new RegExp(`${Bt(r)}=${n}(&|$)`, "i");
1200
1243
  });
1201
1244
  }
1202
- function he(t) {
1203
- return Pn(t, new RegExp(xn, "g")).map((e) => e.startsWith(O) ? pe(e) : Ut(e)).join("");
1245
+ function de(t) {
1246
+ return Lr(t, new RegExp($r, "g")).map((e) => e.startsWith(O) ? me(e) : Bt(e)).join("");
1204
1247
  }
1205
- function pe(t) {
1248
+ function me(t) {
1206
1249
  return [
1207
- An,
1208
- Ln
1209
- ].reduce((e, n) => n(e), t);
1250
+ Nr,
1251
+ Hr
1252
+ ].reduce((e, r) => r(e), t);
1210
1253
  }
1211
- const xn = `\\${O}\\??([\\w-_]+)\\${D}`, $t = `\\${O}\\?([\\w-_]+)\\${D}`, de = `\\${O}([\\w-_]+)\\${D}`;
1212
- function An(t) {
1213
- return t.replace(new RegExp($t, "g"), ".*");
1254
+ const $r = `\\${O}\\??([\\w-_]+)\\${D}`, Ut = `\\${O}\\?([\\w-_]+)\\${D}`, ge = `\\${O}([\\w-_]+)\\${D}`;
1255
+ function Nr(t) {
1256
+ return t.replace(new RegExp(Ut, "g"), ".*");
1214
1257
  }
1215
1258
  function Rt(t) {
1216
- return new RegExp($t, "g").test(t);
1259
+ return new RegExp(Ut, "g").test(t);
1217
1260
  }
1218
- function Ln(t) {
1219
- return t.replace(new RegExp(de, "g"), ".+");
1261
+ function Hr(t) {
1262
+ return t.replace(new RegExp(ge, "g"), ".+");
1220
1263
  }
1221
- function pt(t) {
1222
- const [e] = ft(t, new RegExp($t, "g")), [n] = ft(t, new RegExp(de, "g"));
1223
- return e ?? n;
1264
+ function dt(t) {
1265
+ const [e] = lt(t, new RegExp(Ut, "g")), [r] = lt(t, new RegExp(ge, "g"));
1266
+ return e ?? r;
1224
1267
  }
1225
- function ft(t, e) {
1226
- return Array.from(t.matchAll(e)).flatMap(([, ...o]) => o.map((r) => At(r) ? r : ""));
1268
+ function lt(t, e) {
1269
+ return Array.from(t.matchAll(e)).flatMap(([, ...o]) => o.map((n) => xt(n) ? n : ""));
1227
1270
  }
1228
- function me(t, e, n) {
1229
- const o = ge(e, n), [r] = ft(t, o);
1230
- return r;
1271
+ function ye(t, e, r) {
1272
+ const o = ve(e, r), [n] = lt(t, o);
1273
+ return n;
1231
1274
  }
1232
- function ye(t, e) {
1275
+ function Re(t, e) {
1233
1276
  if (!e)
1234
1277
  return t;
1235
- const { name: n, param: o, value: r } = e, a = ge(t, n);
1236
- return ft(t, a).reduce((c, i) => i === void 0 ? c : c.replace(i, () => Bt(r, o, n.startsWith("?"))), t);
1237
- }
1238
- function ge(t, e) {
1239
- const n = [
1240
- Bn,
1241
- Un,
1242
- pe
1243
- ].reduce((o, r) => r(o, e), t);
1244
- return new RegExp(n, "g");
1245
- }
1246
- function Bn(t, e) {
1278
+ const { name: r, param: o, value: n } = e, s = ve(t, r);
1279
+ return lt(t, s).reduce((c, u) => u === void 0 ? c : c.replace(u, () => Lt(n, o, r.startsWith("?"))), t);
1280
+ }
1281
+ function ve(t, e) {
1282
+ const r = [
1283
+ jr,
1284
+ Vr,
1285
+ me
1286
+ ].reduce((o, n) => n(o, e), t);
1287
+ return new RegExp(r, "g");
1288
+ }
1289
+ function jr(t, e) {
1247
1290
  if (!e.startsWith("?"))
1248
1291
  return t;
1249
- const n = new RegExp(`\\${O}\\${e}\\${D}`, "g");
1250
- return t.replace(n, "(.*)");
1292
+ const r = new RegExp(`\\${O}\\${e}\\${D}`, "g");
1293
+ return t.replace(r, "(.*)");
1251
1294
  }
1252
- function Un(t, e) {
1295
+ function Vr(t, e) {
1253
1296
  if (e.startsWith("?"))
1254
1297
  return t;
1255
- const n = new RegExp(`\\${O}${e}\\${D}`, "g");
1256
- return t.replace(n, "(.+)");
1298
+ const r = new RegExp(`\\${O}${e}\\${D}`, "g");
1299
+ return t.replace(r, "(.+)");
1257
1300
  }
1258
- function Re(t, ...e) {
1259
- return e.reduce((n, o) => {
1301
+ function we(t, ...e) {
1302
+ return e.reduce((r, o) => {
1260
1303
  if (!o)
1261
- return n;
1262
- const r = new URLSearchParams(o).toString();
1263
- return Object.keys(r).length === 0 ? n : n.includes("?") ? `${n}&${r}` : `${n}?${r}`;
1304
+ return r;
1305
+ const n = new URLSearchParams(o).toString();
1306
+ return Object.keys(n).length === 0 ? r : r.includes("?") ? `${r}&${n}` : `${r}?${n}`;
1264
1307
  }, t);
1265
1308
  }
1266
- function $n(t, e = {}) {
1267
- const { params: n = {}, query: o } = e, r = Nn(t.host, n), a = Hn(t.path, n), s = jn(t.query, n);
1268
- return Re(`${r}${a}`, s, o);
1269
- }
1270
- function Nn(t, e) {
1271
- const n = t.toString();
1272
- return Object.entries(t.params).reduce((o, [r, a]) => {
1273
- const s = pt(`${O}${r}${D}`);
1274
- return s ? ye(o, { name: r, param: a, value: e[s] }) : o;
1275
- }, n);
1276
- }
1277
- function Hn(t, e) {
1278
- const n = t.toString();
1279
- return Object.entries(t.params).reduce((o, [r, a]) => {
1280
- const s = pt(`${O}${r}${D}`);
1281
- return s ? ye(o, { name: r, param: a, value: e[s] }) : o;
1282
- }, n);
1283
- }
1284
- function jn(t, e) {
1285
- const n = t.toString();
1286
- if (!n)
1309
+ function Cr(t, e = {}) {
1310
+ const { params: r = {}, query: o } = e, n = _r(t.host, r), s = qr(t.path, r), a = Or(t.query, r);
1311
+ return we(`${n}${s}`, a, o);
1312
+ }
1313
+ function _r(t, e) {
1314
+ const r = t.toString();
1315
+ return Object.entries(t.params).reduce((o, [n, s]) => {
1316
+ const a = dt(`${O}${n}${D}`);
1317
+ return a ? Re(o, { name: n, param: s, value: e[a] }) : o;
1318
+ }, r);
1319
+ }
1320
+ function qr(t, e) {
1321
+ const r = t.toString();
1322
+ return Object.entries(t.params).reduce((o, [n, s]) => {
1323
+ const a = dt(`${O}${n}${D}`);
1324
+ return a ? Re(o, { name: n, param: s, value: e[a] }) : o;
1325
+ }, r);
1326
+ }
1327
+ function Or(t, e) {
1328
+ const r = t.toString();
1329
+ if (!r)
1287
1330
  return {};
1288
- const o = new URLSearchParams(n);
1289
- return Array.from(o.entries()).reduce((r, [a, s]) => {
1290
- const c = pt(s);
1331
+ const o = new URLSearchParams(r);
1332
+ return Array.from(o.entries()).reduce((n, [s, a]) => {
1333
+ const c = dt(a);
1291
1334
  if (!c)
1292
- return { ...r, [a]: s };
1293
- const f = Bt(e[c], t.params[c], Rt(s)), h = e[c] === void 0 && f === "";
1294
- return Rt(s) && h ? r : { ...r, [a]: f };
1335
+ return { ...n, [s]: a };
1336
+ const l = Lt(e[c], t.params[c], Rt(a)), p = e[c] === void 0 && l === "";
1337
+ return Rt(a) && p ? n : { ...n, [s]: l };
1295
1338
  }, {});
1296
1339
  }
1297
- function Vn(t) {
1298
- return (e, n, o) => {
1299
- if (F(e))
1300
- return Re(e, (n ?? {}).query);
1301
- const r = n ?? {}, a = o ?? {}, s = t.find((i) => i.key === e);
1302
- if (!s)
1303
- throw new bn(String(e));
1304
- if (s.matched.disabled)
1305
- throw new En(String(e));
1306
- return $n(s, {
1307
- params: r,
1308
- query: a.query
1340
+ function Wr(t) {
1341
+ return (e, r, o) => {
1342
+ if (J(e))
1343
+ return we(e, (r ?? {}).query);
1344
+ const n = r ?? {}, s = o ?? {}, a = t.find((u) => u.key === e);
1345
+ if (!a)
1346
+ throw new Ar(String(e));
1347
+ return Cr(a, {
1348
+ params: n,
1349
+ query: s.query
1309
1350
  });
1310
1351
  };
1311
1352
  }
1312
- class Cn extends Error {
1353
+ class Mr extends Error {
1313
1354
  constructor() {
1314
1355
  super("initialUrl must be set if window.location is unavailable");
1315
1356
  }
1316
1357
  }
1317
- function qn(t) {
1358
+ function Dr(t) {
1318
1359
  if (t)
1319
1360
  return t;
1320
- if (fe())
1361
+ if (he())
1321
1362
  return window.location.toString();
1322
- throw new Cn();
1363
+ throw new Mr();
1323
1364
  }
1324
- const _n = (t, e) => {
1365
+ const Tr = (t, e) => {
1325
1366
  try {
1326
- ve(t, e);
1367
+ Ee(t, e);
1327
1368
  } catch {
1328
1369
  return !1;
1329
1370
  }
1330
1371
  return !0;
1331
- }, ve = (t, e) => {
1332
- const { pathname: n, search: o } = K(e);
1372
+ }, Ee = (t, e) => {
1373
+ const { pathname: r, search: o } = K(e);
1333
1374
  return {
1334
- ...On(t.path, n),
1335
- ...Wn(t.query, o)
1375
+ ...Ir(t.path, r),
1376
+ ...Jr(t.query, o)
1336
1377
  };
1337
1378
  };
1338
- function On(t, e) {
1339
- const n = {}, o = decodeURIComponent(e);
1340
- for (const [r, a] of Object.entries(t.params)) {
1341
- const s = r.startsWith("?"), c = s ? r.slice(1) : r, i = me(o, t.toString(), r), f = Lt(i, a, s);
1342
- n[c] = f;
1379
+ function Ir(t, e) {
1380
+ const r = {}, o = decodeURIComponent(e);
1381
+ for (const [n, s] of Object.entries(t.params)) {
1382
+ const a = n.startsWith("?"), c = a ? n.slice(1) : n, u = ye(o, t.toString(), n), l = At(u, s, a);
1383
+ r[c] = l;
1343
1384
  }
1344
- return n;
1385
+ return r;
1345
1386
  }
1346
- function Wn(t, e) {
1347
- const n = {}, o = new URLSearchParams(e);
1348
- for (const [r, a] of Object.entries(t.params)) {
1349
- const s = r.startsWith("?"), c = s ? r.slice(1) : r, i = o.get(c) ?? void 0, f = Lt(i, a, s);
1350
- n[c] = f;
1387
+ function Jr(t, e) {
1388
+ const r = {}, o = new URLSearchParams(e);
1389
+ for (const [n, s] of Object.entries(t.params)) {
1390
+ const a = n.startsWith("?"), c = a ? n.slice(1) : n, u = o.get(c) ?? void 0, l = At(u, s, a);
1391
+ r[c] = l;
1351
1392
  }
1352
- return n;
1393
+ return r;
1353
1394
  }
1354
- const Mn = (t) => "name" in t.matched && !!t.matched.name, Dn = (t, e) => {
1355
- const { pathname: n } = K(e);
1356
- return Sn(t).test(n);
1357
- }, Tn = (t, e) => {
1358
- const { search: n } = K(e);
1359
- return kn(t).every((r) => r.test(n));
1395
+ const Fr = (t) => "name" in t.matched && !!t.matched.name, Qr = (t, e) => {
1396
+ const { pathname: r } = K(e);
1397
+ return Br(t).test(r);
1398
+ }, Kr = (t, e) => {
1399
+ const { search: r } = K(e);
1400
+ return Ur(t).every((n) => n.test(r));
1360
1401
  };
1361
- function In(t) {
1362
- const { searchParams: e, pathname: n } = K(t), o = -1, r = 1;
1363
- return (a, s) => {
1364
- const c = Mt(a, e), i = Wt(a, n), f = Mt(s, e), h = Wt(s, n);
1365
- return a.depth > s.depth ? o : a.depth < s.depth ? r : c + i > f + h ? o : c + i < f + h ? r : 0;
1402
+ function Gr(t) {
1403
+ const { searchParams: e, pathname: r } = K(t), o = -1, n = 1;
1404
+ return (s, a) => {
1405
+ const c = Dt(s, e), u = Mt(s, r), l = Dt(a, e), p = Mt(a, r);
1406
+ return s.depth > a.depth ? o : s.depth < a.depth ? n : c + u > l + p ? o : c + u < l + p ? n : 0;
1366
1407
  };
1367
1408
  }
1368
- function Wt(t, e) {
1369
- const n = Object.keys(t.path.params).filter((r) => r.startsWith("?")).map((r) => r), o = n.filter((r) => me(e, t.path.toString(), r) === void 0);
1370
- return n.length - o.length;
1371
- }
1372
1409
  function Mt(t, e) {
1373
- const n = new URLSearchParams(t.query.toString()), o = Array.from(n.keys()), r = o.filter((a) => !e.has(a));
1374
- return o.length - r.length;
1375
- }
1376
- const Fn = [
1377
- Mn,
1378
- Dn,
1379
- Tn,
1380
- _n
1410
+ const r = Object.keys(t.path.params).filter((n) => n.startsWith("?")).map((n) => n), o = r.filter((n) => ye(e, t.path.toString(), n) === void 0);
1411
+ return r.length - o.length;
1412
+ }
1413
+ function Dt(t, e) {
1414
+ const r = new URLSearchParams(t.query.toString()), o = Array.from(r.keys()), n = o.filter((s) => !e.has(s));
1415
+ return o.length - n.length;
1416
+ }
1417
+ const zr = [
1418
+ Fr,
1419
+ Qr,
1420
+ Kr,
1421
+ Tr
1381
1422
  ];
1382
- function gt(t, e) {
1383
- const n = In(e), o = t.filter((i) => Fn.every((f) => f(i, e))).sort(n);
1423
+ function yt(t, e) {
1424
+ const r = Gr(e), o = t.filter((u) => zr.every((l) => l(u, e))).sort(r);
1384
1425
  if (o.length === 0)
1385
1426
  return;
1386
- const [r] = o, { search: a } = K(e), s = le(a), c = ve(r, e);
1427
+ const [n] = o, { search: s } = K(e), a = pe(s), c = Ee(n, e);
1387
1428
  return {
1388
- matched: r.matched,
1389
- matches: r.matches,
1390
- key: r.key,
1391
- query: s,
1429
+ matched: n.matched,
1430
+ matches: n.matches,
1431
+ key: n.key,
1432
+ query: a,
1392
1433
  params: c
1393
1434
  };
1394
1435
  }
1395
- function Nt(t) {
1436
+ function $t(t) {
1396
1437
  return typeof t == "object" && t !== null && !Array.isArray(t);
1397
1438
  }
1398
- function Jn(t) {
1439
+ function Yr(t) {
1399
1440
  return t.every((e) => Array.isArray(e));
1400
1441
  }
1401
- function lr(t, e = {}) {
1402
- const n = Jn(t) ? t.flat() : t, o = Vn(n), r = gn({
1442
+ function fn(t, e = {}) {
1443
+ const r = Yr(t) ? t.flat() : t, o = Wr(r), n = Sr({
1403
1444
  mode: e.historyMode,
1404
1445
  listener: () => {
1405
1446
  const v = Q(location);
1406
1447
  k(v);
1407
1448
  }
1408
- }), { runBeforeRouteHooks: a, runAfterRouteHooks: s } = Ge(), {
1449
+ }), { runBeforeRouteHooks: s, runAfterRouteHooks: a } = Xe(), {
1409
1450
  hooks: c,
1410
- onBeforeRouteEnter: i,
1411
- onAfterRouteUpdate: f,
1412
- onBeforeRouteLeave: h,
1413
- onAfterRouteEnter: m,
1414
- onBeforeRouteUpdate: b,
1415
- onAfterRouteLeave: y
1416
- } = Ye();
1451
+ onBeforeRouteEnter: u,
1452
+ onAfterRouteUpdate: l,
1453
+ onBeforeRouteLeave: p,
1454
+ onAfterRouteEnter: f,
1455
+ onBeforeRouteUpdate: E,
1456
+ onAfterRouteLeave: d
1457
+ } = tr();
1417
1458
  async function k(v, { replace: N } = {}) {
1418
- if (r.stopListening(), S(v))
1419
- return r.update(v, { replace: N });
1420
- const _ = gt(n, v) ?? E("NotFound"), T = { ...p }, I = await a({ to: _, from: T, hooks: c });
1459
+ if (n.stopListening(), b(v))
1460
+ return n.update(v, { replace: N });
1461
+ const q = yt(r, v) ?? P("NotFound"), T = { ...m }, I = await s({ to: q, from: T, hooks: c });
1421
1462
  switch (I.status) {
1422
1463
  case "ABORT":
1423
1464
  return;
1424
1465
  case "PUSH":
1425
- r.update(v, { replace: N }), await x(...I.to);
1466
+ n.update(v, { replace: N }), await x(...I.to);
1426
1467
  return;
1427
1468
  case "REJECT":
1428
- r.update(v, { replace: N }), d(I.type), l(_);
1469
+ n.update(v, { replace: N }), g(I.type), h(q);
1429
1470
  break;
1430
1471
  case "SUCCESS":
1431
- r.update(v, { replace: N }), d(null), l(_);
1472
+ n.update(v, { replace: N }), g(null), h(q);
1432
1473
  break;
1433
1474
  default:
1434
1475
  throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(I)}`);
1435
1476
  }
1436
- const W = await s({ to: _, from: T, hooks: c });
1477
+ const W = await a({ to: q, from: T, hooks: c });
1437
1478
  switch (W.status) {
1438
1479
  case "PUSH":
1439
1480
  await x(...W.to);
1440
1481
  break;
1441
1482
  case "REJECT":
1442
- d(W.type);
1483
+ g(W.type);
1443
1484
  break;
1444
1485
  case "SUCCESS":
1445
1486
  break;
@@ -1447,234 +1488,159 @@ function lr(t, e = {}) {
1447
1488
  const nt = W;
1448
1489
  throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(nt)}`);
1449
1490
  }
1450
- r.startListening();
1491
+ n.startListening();
1451
1492
  }
1452
- const x = (v, N, _) => {
1453
- if (F(v)) {
1493
+ const x = (v, N, q) => {
1494
+ if (J(v)) {
1454
1495
  const nt = { ...N }, xe = o(v, nt);
1455
1496
  return k(xe, { replace: nt.replace });
1456
1497
  }
1457
- const T = { ..._ }, W = o(v, N ?? {}, T);
1498
+ const T = { ...q }, W = o(v, N ?? {}, T);
1458
1499
  return k(W, { replace: T.replace });
1459
- }, C = (v, N, _) => {
1460
- if (F(v)) {
1500
+ }, C = (v, N, q) => {
1501
+ if (J(v)) {
1461
1502
  const W = { ...N, replace: !0 };
1462
1503
  return x(v, W);
1463
1504
  }
1464
- const T = N ?? {}, I = { ..._, replace: !0 };
1505
+ const T = N ?? {}, I = { ...q, replace: !0 };
1465
1506
  return x(v, T, I);
1466
- }, B = (v) => d(v), q = (v, N = {}) => {
1467
- if (!F(v)) {
1468
- const _ = o(v, N);
1469
- return gt(n, _);
1507
+ }, B = (v) => g(v), _ = (v, N = {}) => {
1508
+ if (!J(v)) {
1509
+ const q = o(v, N);
1510
+ return yt(r, q);
1470
1511
  }
1471
- if (!S(v))
1472
- return gt(n, v);
1473
- }, { setRejection: d, rejection: g, getRejectionRoute: E } = wn(e), P = E("NotFound"), { currentRoute: p, routerRoute: u, updateRoute: l } = pn(P, x);
1474
- r.startListening();
1475
- const R = qn(e.initialUrl), { host: w } = K(R), S = yn(w), A = k(R, { replace: !0 });
1512
+ if (!b(v))
1513
+ return yt(r, v);
1514
+ }, { setRejection: g, rejection: y, getRejectionRoute: P } = xr(e), S = P("NotFound"), { currentRoute: m, routerRoute: i, updateRoute: h } = vr(S, x);
1515
+ n.startListening();
1516
+ const R = Dr(e.initialUrl), { host: w } = K(R), b = Pr(w), A = k(R, { replace: !0 });
1476
1517
  function U(v) {
1477
- v.component("RouterView", oe), v.component("RouterLink", Ze), v.provide(Yt, g), v.provide(te, c), v.provide(zt, $);
1518
+ v.component("RouterView", fr), v.component("RouterLink", rr), v.provide(Xt, y), v.provide(re, c), v.provide(Yt, $);
1478
1519
  }
1479
1520
  const $ = {
1480
- route: u,
1521
+ route: i,
1481
1522
  resolve: o,
1482
1523
  push: x,
1483
1524
  replace: C,
1484
1525
  reject: B,
1485
- find: q,
1486
- refresh: r.refresh,
1487
- forward: r.forward,
1488
- back: r.back,
1489
- go: r.go,
1526
+ find: _,
1527
+ refresh: n.refresh,
1528
+ forward: n.forward,
1529
+ back: n.back,
1530
+ go: n.go,
1490
1531
  install: U,
1491
1532
  initialized: A,
1492
- isExternal: S,
1493
- onBeforeRouteEnter: i,
1494
- onAfterRouteUpdate: f,
1495
- onBeforeRouteLeave: h,
1496
- onAfterRouteEnter: m,
1497
- onBeforeRouteUpdate: b,
1498
- onAfterRouteLeave: y
1533
+ isExternal: b,
1534
+ onBeforeRouteEnter: u,
1535
+ onAfterRouteUpdate: l,
1536
+ onBeforeRouteLeave: p,
1537
+ onAfterRouteEnter: f,
1538
+ onBeforeRouteUpdate: E,
1539
+ onAfterRouteLeave: d
1499
1540
  };
1500
1541
  return $;
1501
1542
  }
1502
- function dt(...t) {
1503
- const e = t.flatMap((n) => Array.isArray(n) ? n : Object.keys(n).map(Kn));
1504
- for (const n of e)
1505
- if (Qn(e, n) > 1)
1506
- throw new _e(n);
1507
- }
1508
- function Qn(t, e) {
1509
- return t.filter((n) => e === n).length;
1510
- }
1511
- function Kn(t) {
1512
- return t.startsWith("?") ? t.slice(1) : t;
1513
- }
1514
- function we(t, e) {
1515
- dt(t.params, e.params);
1516
- const n = `${t.path}${e.path}`;
1517
- return {
1518
- path: n,
1519
- params: { ...t.params, ...e.params },
1520
- toString: () => n
1521
- };
1522
- }
1523
- function Ee(t, e) {
1524
- dt(t.params, e.params);
1525
- const n = [t.query, e.query].filter(At).join("&");
1526
- return {
1527
- query: n,
1528
- params: { ...t.params, ...e.params },
1529
- toString: () => n
1530
- };
1531
- }
1532
- function Ht(t, e) {
1533
- const n = new RegExp(`\\${O}(\\??[\\w-_]+)\\${D}`, "g");
1534
- return Array.from(t.matchAll(n)).reduce((r, [a, s]) => {
1535
- const c = pt(a);
1543
+ function Nt(t, e) {
1544
+ const r = new RegExp(`\\${O}(\\??[\\w-_]+)\\${D}`, "g");
1545
+ return Array.from(t.matchAll(r)).reduce((n, [s, a]) => {
1546
+ const c = dt(s);
1536
1547
  if (!c)
1537
- return r;
1538
- const i = cn(e, c);
1539
- return dt([c], r), r[s] = i, r;
1548
+ return n;
1549
+ const u = dr(e, c);
1550
+ return rt([c], n), n[a] = u, n;
1540
1551
  }, {});
1541
1552
  }
1542
- function be(t, e) {
1553
+ function Tt(t, e) {
1543
1554
  return {
1544
- host: t,
1545
- params: Ht(t, e),
1555
+ path: t,
1556
+ params: Nt(t, e),
1546
1557
  toString: () => t
1547
1558
  };
1548
1559
  }
1549
- function Dt(t, e) {
1560
+ function It(t, e) {
1550
1561
  return {
1551
- path: t,
1552
- params: Ht(t, e),
1562
+ query: t,
1563
+ params: Nt(t, e),
1553
1564
  toString: () => t
1554
1565
  };
1555
1566
  }
1556
- function Gn(t) {
1557
- return Nt(t) && typeof t.path == "string";
1558
- }
1559
- function Pe(t) {
1560
- return t === void 0 ? Dt("", {}) : Gn(t) ? t : Dt(t, {});
1561
- }
1562
- function Tt(t, e) {
1567
+ function Pe(t, e) {
1563
1568
  return {
1564
- query: t,
1565
- params: Ht(t, e),
1569
+ host: t,
1570
+ params: Nt(t, e),
1566
1571
  toString: () => t
1567
1572
  };
1568
1573
  }
1569
- function zn(t) {
1570
- return Nt(t) && typeof t.query == "string";
1571
- }
1572
1574
  function Se(t) {
1573
- return t === void 0 ? Tt("", {}) : zn(t) ? t : Tt(t, {});
1574
- }
1575
- function hr(t) {
1576
- const e = t.reduce((n, o) => {
1577
- const r = Yn(o);
1578
- return re(o) && n.push(...o.children.map((a) => ({
1579
- ...a,
1580
- key: Et(r.key, a.key),
1581
- path: we(r.path, a.path),
1582
- query: Ee(r.query, a.query),
1583
- matches: [r.matched, ...a.matches],
1584
- depth: a.depth + 1
1585
- }))), n.push(r), n;
1586
- }, []);
1587
- return ke(e), e;
1575
+ return t === void 0 ? "" : t;
1588
1576
  }
1589
- function Yn(t) {
1590
- const e = Xn(t), n = Pe(t.path), o = Se(t.query), r = at({ meta: {}, ...e });
1591
- return {
1592
- matched: r,
1593
- matches: [r],
1594
- key: t.name ?? "",
1595
- path: n,
1596
- query: o,
1597
- depth: 1,
1598
- disabled: t.disabled ?? !1,
1599
- host: be("", {})
1600
- };
1577
+ function Xr(t) {
1578
+ return $t(t) && typeof t.path == "string";
1601
1579
  }
1602
- function ke(t) {
1603
- t.forEach(({ path: e, query: n, host: o }) => {
1604
- dt(e.params, n.params, o.params);
1605
- });
1580
+ function be(t) {
1581
+ return t === void 0 ? Tt("", {}) : Xr(t) ? t : Tt(t, {});
1606
1582
  }
1607
- function Xn(t) {
1608
- return tn(t) ? { ...t, component: oe } : t;
1583
+ function Zr(t) {
1584
+ return $t(t) && typeof t.query == "string";
1609
1585
  }
1610
- function Zn(t) {
1611
- return Nt(t) && typeof t.host == "string";
1586
+ function ke(t) {
1587
+ return t === void 0 ? It("", {}) : Zr(t) ? t : It(t, {});
1588
+ }
1589
+ function ln(t) {
1590
+ const e = Se(t.name), r = be(t.path), o = ke(t.query), n = st({ meta: {}, ...t }), s = {
1591
+ matched: n,
1592
+ matches: [n],
1593
+ key: e,
1594
+ path: r,
1595
+ query: o,
1596
+ depth: 1,
1597
+ host: Pe("", {})
1598
+ }, a = ae(t) ? se(t.parent, s) : s;
1599
+ return rt(a.path.params, a.query.params), a;
1612
1600
  }
1613
- function tr(t) {
1614
- return Zn(t) ? t : be(t, {});
1601
+ function tn(t) {
1602
+ return $t(t) && typeof t.host == "string";
1615
1603
  }
1616
- function pr(t) {
1617
- const e = t.reduce((n, o) => {
1618
- const r = er(o);
1619
- return o.children && n.push(...o.children.map((a) => ({
1620
- ...a,
1621
- key: Et(r.key, a.key),
1622
- path: we(r.path, a.path),
1623
- query: Ee(r.query, a.query),
1624
- matches: [r.matched, ...a.matches],
1625
- depth: a.depth + 1,
1626
- host: r.host
1627
- }))), n.push(r), n;
1628
- }, []);
1629
- return ke(e), e;
1604
+ function Jt(t) {
1605
+ return tn(t) ? t : Pe(t, {});
1630
1606
  }
1631
- function er(t) {
1632
- const e = Pe(t.path), n = Se(t.query), o = tr(t.host ?? "");
1633
- return {
1634
- matched: at({ meta: {}, ...t, name: t.name ?? "", children: [] }),
1635
- matches: [],
1636
- key: t.name ?? "",
1637
- host: o,
1638
- path: e,
1639
- query: n,
1640
- depth: 1,
1641
- disabled: t.disabled ?? !1
1642
- };
1607
+ function hn(t) {
1608
+ const e = Se(t.name), r = be(t.path), o = ke(t.query), n = ir(t) ? Jt(t.host) : Jt(""), s = st({ meta: {}, ...t }), a = {
1609
+ matched: s,
1610
+ matches: [s],
1611
+ key: e,
1612
+ host: n,
1613
+ path: r,
1614
+ query: o,
1615
+ depth: 1
1616
+ }, c = ae(t) ? se(t.parent, a) : a;
1617
+ return rt(c.path.params, c.query.params, c.host.params), c;
1643
1618
  }
1644
1619
  export {
1645
- _e as DuplicateParamsError,
1646
- Ze as RouterLink,
1620
+ Me as DuplicateParamsError,
1621
+ rr as RouterLink,
1647
1622
  vt as RouterNotInstalledError,
1648
- oe as RouterView,
1649
- Oe as UseRouteInvalidError,
1650
- ur as component,
1651
- pr as createExternalRoutes,
1652
- fn as createParam,
1653
- lr as createRouter,
1654
- hr as createRoutes,
1655
- ht as isParamGetSet,
1656
- an as isParamGetter,
1657
- sn as isParamWithDefault,
1658
- re as isParentRoute,
1659
- tn as isParentRouteWithoutComponent,
1660
- Ie as isRoute,
1661
- en as isRouteWithComponent,
1662
- nn as isRouteWithComponents,
1663
- sr as onAfterRouteEnter,
1664
- cr as onAfterRouteLeave,
1665
- ir as onAfterRouteUpdate,
1666
- or as onBeforeRouteLeave,
1667
- ar as onBeforeRouteUpdate,
1668
- D as paramEnd,
1669
- O as paramStart,
1670
- Dt as path,
1671
- Tt as query,
1672
- zt as routerInjectionKey,
1673
- Yt as routerRejectionKey,
1674
- ke as throwIfDuplicateParamsAreFound,
1675
- We as useLink,
1676
- Me as useRejection,
1677
- Je as useRoute,
1623
+ fr as RouterView,
1624
+ De as UseRouteInvalidError,
1625
+ nr as component,
1626
+ hn as createExternalRoute,
1627
+ gr as createParam,
1628
+ ln as createRoute,
1629
+ fn as createRouter,
1630
+ pr as isParamWithDefault,
1631
+ Qe as isRoute,
1632
+ an as onAfterRouteEnter,
1633
+ sn as onAfterRouteLeave,
1634
+ cn as onAfterRouteUpdate,
1635
+ nn as onBeforeRouteLeave,
1636
+ on as onBeforeRouteUpdate,
1637
+ Tt as path,
1638
+ It as query,
1639
+ Yt as routerInjectionKey,
1640
+ Xt as routerRejectionKey,
1641
+ Te as useLink,
1642
+ Ie as useRejection,
1643
+ Ge as useRoute,
1678
1644
  wt as useRouter,
1679
- fr as withDefault
1645
+ un as withDefault
1680
1646
  };