@kitbag/router 0.14.1 → 0.15.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,14 +1,14 @@
1
- var fr = Object.defineProperty;
2
- var lr = (e, t, r) => t in e ? fr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var I = (e, t, r) => lr(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { inject as ae, toRefs as hr, computed as N, reactive as xe, defineComponent as se, h as Z, ref as $e, markRaw as ye, watch as ge, defineAsyncComponent as pr, toValue as $, openBlock as yt, createElementBlock as dr, normalizeClass as mr, renderSlot as gt, normalizeProps as vt, guardReactiveProps as yr, unref as ue, getCurrentInstance as gr, resolveComponent as vr, provide as Rr, mergeProps as wr, createBlock as Pr, resolveDynamicComponent as Er, createCommentVNode as br, onUnmounted as Rt } from "vue";
5
- function O(e) {
1
+ var dr = Object.defineProperty;
2
+ var mr = (e, t, r) => t in e ? dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var O = (e, t, r) => mr(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { inject as ae, toRefs as yr, computed as N, reactive as xe, defineComponent as se, h as Z, ref as _e, markRaw as ge, watch as ie, onUnmounted as Le, defineAsyncComponent as gr, toValue as j, openBlock as wt, createElementBlock as vr, normalizeClass as Rr, renderSlot as Pt, normalizeProps as Et, guardReactiveProps as wr, unref as ue, getCurrentInstance as Pr, resolveComponent as Er, provide as br, mergeProps as Sr, createBlock as kr, resolveDynamicComponent as Ar, createCommentVNode as xr } from "vue";
5
+ function T(e) {
6
6
  return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
7
7
  }
8
- function wt(e) {
9
- return O(e) ? e : `/${e}`;
8
+ function bt(e) {
9
+ return T(e) ? e : `/${e}`;
10
10
  }
11
- class Sr extends Error {
11
+ class Lr 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,17 +17,17 @@ class Sr extends Error {
17
17
  super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`);
18
18
  }
19
19
  }
20
- class kr extends Error {
20
+ class Ur extends Error {
21
21
  constructor(t) {
22
22
  super(`Child property on meta for ${t} conflicts with the parent meta.`);
23
23
  }
24
24
  }
25
- class pe extends Error {
25
+ class de extends Error {
26
26
  constructor() {
27
27
  super("Router not installed");
28
28
  }
29
29
  }
30
- class Ar extends Error {
30
+ class Cr 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,17 +38,17 @@ class Ar extends Error {
38
38
  super(`useRoute called with incorrect route. Given ${t}, expected ${r}`);
39
39
  }
40
40
  }
41
- const Pt = Symbol();
42
- function qe() {
43
- const e = ae(Pt);
41
+ const St = Symbol();
42
+ function Me() {
43
+ const e = ae(St);
44
44
  if (!e)
45
- throw new pe();
45
+ throw new de();
46
46
  return e;
47
47
  }
48
- function de(e) {
48
+ function me(e) {
49
49
  return typeof e == "object" && e !== null && !Array.isArray(e);
50
50
  }
51
- function xr(e) {
51
+ function Br(e) {
52
52
  return e.every((t) => Array.isArray(t));
53
53
  }
54
54
  function F(e) {
@@ -59,111 +59,111 @@ function ve(e) {
59
59
  value: F(e) ? e.replace(/^#*/, "") : void 0
60
60
  };
61
61
  }
62
- function Ur(e, t) {
62
+ function Nr(e, t) {
63
63
  return ve(`${e.value ?? ""}${t.value ?? ""}`);
64
64
  }
65
- function Lr(e, t) {
66
- return Cr(e, t), { ...e, ...t };
65
+ function Vr(e, t) {
66
+ return Hr(e, t), { ...e, ...t };
67
67
  }
68
- function Cr(e, t) {
68
+ function Hr(e, t) {
69
69
  const r = Object.keys(e).find((n) => n in t && typeof t[n] != typeof e[n]);
70
70
  if (r)
71
- throw new kr(r);
71
+ throw new Ur(r);
72
72
  }
73
73
  function ee(e) {
74
74
  return Array.isArray(e) ? e : [e];
75
75
  }
76
- function Et(e, t) {
76
+ function kt(e, t) {
77
77
  return e.filter((r) => t === r).length;
78
78
  }
79
79
  function ce(...e) {
80
- const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(Br));
80
+ const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(jr));
81
81
  for (const r of t)
82
- if (Et(t, r) > 1)
83
- throw new Sr(r);
82
+ if (kt(t, r) > 1)
83
+ throw new Lr(r);
84
84
  }
85
- function Br(e) {
85
+ function jr(e) {
86
86
  return e.startsWith("?") ? e.slice(1) : e;
87
87
  }
88
- function Nr(e, t) {
88
+ function $r(e, t) {
89
89
  return ce(e.params, t.params), {
90
90
  value: `${e.value}${t.value}`,
91
91
  params: { ...e.params, ...t.params }
92
92
  };
93
93
  }
94
- function Vr(e, t) {
94
+ function qr(e, t) {
95
95
  return ce(e.params, t.params), {
96
96
  value: [e.value, t.value].filter(F).join("&"),
97
97
  params: { ...e.params, ...t.params }
98
98
  };
99
99
  }
100
- function Hr(e, t) {
100
+ function _r(e, t) {
101
101
  return ce(e, t), { ...e, ...t };
102
102
  }
103
- function jr(e) {
103
+ function Mr(e) {
104
104
  return "host" in e && !!e.host;
105
105
  }
106
- function bt(e) {
106
+ function At(e) {
107
107
  return "parent" in e && !!e.parent;
108
108
  }
109
- function _e(e) {
109
+ function We(e) {
110
110
  return "component" in e && !!e.component;
111
111
  }
112
- function Me(e) {
112
+ function De(e) {
113
113
  return "components" in e && !!e.components;
114
114
  }
115
- function $r(e) {
115
+ function Wr(e) {
116
116
  return "state" in e && !!e.state;
117
117
  }
118
- function St(e, t) {
118
+ function xt(e, t) {
119
119
  return {
120
120
  ...t,
121
- path: Nr(e.path, t.path),
122
- query: Vr(e.query, t.query),
123
- meta: Lr(e.meta, t.meta),
124
- state: Hr(e.state, t.state),
125
- hash: Ur(e.hash, t.hash),
121
+ path: $r(e.path, t.path),
122
+ query: qr(e.query, t.query),
123
+ meta: Vr(e.meta, t.meta),
124
+ state: _r(e.state, t.state),
125
+ hash: Nr(e.hash, t.hash),
126
126
  matches: [...e.matches, t.matched],
127
127
  host: e.host,
128
128
  depth: e.depth + 1
129
129
  };
130
130
  }
131
- function We() {
131
+ function Ie() {
132
132
  return typeof window < "u" && typeof window.document < "u";
133
133
  }
134
- class ie extends Error {
134
+ class fe extends Error {
135
135
  }
136
136
  const J = "[", K = "]";
137
- function qr(e) {
137
+ function Dr(e) {
138
138
  return e !== String && e !== Boolean && e !== Number && e !== Date;
139
139
  }
140
- function _r(e) {
141
- return typeof e == "function" && qr(e);
140
+ function Ir(e) {
141
+ return typeof e == "function" && Dr(e);
142
142
  }
143
143
  function Ue(e) {
144
144
  return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
145
145
  }
146
- function Mr(e) {
146
+ function Or(e) {
147
147
  return Ue(e) && e.defaultValue !== void 0;
148
148
  }
149
- function fo(e, t) {
150
- return Tr(e, t);
149
+ function po(e, t) {
150
+ return Jr(e, t);
151
151
  }
152
- function Wr(e, t) {
152
+ function Tr(e, t) {
153
153
  return e[t] ?? String;
154
154
  }
155
155
  const q = {
156
156
  invalid: (e) => {
157
- throw new ie(e);
157
+ throw new fe(e);
158
158
  }
159
- }, Dr = {
159
+ }, Fr = {
160
160
  get: (e) => e,
161
161
  set: (e, { invalid: t }) => {
162
162
  if (typeof e != "string")
163
163
  throw t();
164
164
  return e;
165
165
  }
166
- }, kt = {
166
+ }, Lt = {
167
167
  get: (e, { invalid: t }) => {
168
168
  if (e === "true")
169
169
  return !0;
@@ -176,7 +176,7 @@ const q = {
176
176
  throw t();
177
177
  return e.toString();
178
178
  }
179
- }, At = {
179
+ }, Ut = {
180
180
  get: (e, { invalid: t }) => {
181
181
  const r = Number(e);
182
182
  if (isNaN(r))
@@ -188,7 +188,7 @@ const q = {
188
188
  throw t();
189
189
  return e.toString();
190
190
  }
191
- }, xt = {
191
+ }, Ct = {
192
192
  get: (e, { invalid: t }) => {
193
193
  const r = new Date(e);
194
194
  if (isNaN(r.getTime()))
@@ -200,7 +200,7 @@ const q = {
200
200
  throw t();
201
201
  return e.toISOString();
202
202
  }
203
- }, Ut = {
203
+ }, Bt = {
204
204
  get: (e, { invalid: t }) => {
205
205
  try {
206
206
  return JSON.parse(e);
@@ -216,61 +216,61 @@ const q = {
216
216
  }
217
217
  }
218
218
  };
219
- function fe(e, t, r = !1) {
219
+ function le(e, t, r = !1) {
220
220
  if (e === void 0 || !F(e)) {
221
- if (Mr(t))
221
+ if (Or(t))
222
222
  return t.defaultValue;
223
223
  if (r)
224
224
  return;
225
- throw new ie();
225
+ throw new fe();
226
226
  }
227
227
  if (t === String)
228
- return Dr.get(e, q);
228
+ return Fr.get(e, q);
229
229
  if (t === Boolean)
230
- return kt.get(e, q);
230
+ return Lt.get(e, q);
231
231
  if (t === Number)
232
- return At.get(e, q);
232
+ return Ut.get(e, q);
233
233
  if (t === Date)
234
- return xt.get(e, q);
234
+ return Ct.get(e, q);
235
235
  if (t === JSON)
236
- return Ut.get(e, q);
237
- if (_r(t))
236
+ return Bt.get(e, q);
237
+ if (Ir(t))
238
238
  return t(e, q);
239
239
  if (Ue(t))
240
240
  return t.get(e, q);
241
241
  if (t instanceof RegExp) {
242
242
  if (t.test(e))
243
243
  return e;
244
- throw new ie();
244
+ throw new fe();
245
245
  }
246
246
  return e;
247
247
  }
248
- function le(e, t, r = !1) {
248
+ function he(e, t, r = !1) {
249
249
  if (e === void 0) {
250
250
  if (r)
251
251
  return "";
252
- throw new ie();
252
+ throw new fe();
253
253
  }
254
254
  if (t === Boolean)
255
- return kt.set(e, q);
255
+ return Lt.set(e, q);
256
256
  if (t === Number)
257
- return At.set(e, q);
257
+ return Ut.set(e, q);
258
258
  if (t === Date)
259
- return xt.set(e, q);
259
+ return Ct.set(e, q);
260
260
  if (t === JSON)
261
- return Ut.set(e, q);
261
+ return Bt.set(e, q);
262
262
  if (Ue(t))
263
263
  return t.set(e, q);
264
264
  try {
265
265
  return e.toString();
266
266
  } catch {
267
- throw new ie();
267
+ throw new fe();
268
268
  }
269
269
  }
270
- function Tr(e, t) {
270
+ function Jr(e, t) {
271
271
  return Ue(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
272
- get: (r) => fe(r, e),
273
- set: (r) => le(r, e),
272
+ get: (r) => le(r, e),
273
+ set: (r) => he(r, e),
274
274
  defaultValue: t
275
275
  };
276
276
  }
@@ -278,10 +278,11 @@ function G() {
278
278
  return G = Object.assign ? Object.assign.bind() : function(e) {
279
279
  for (var t = 1; t < arguments.length; t++) {
280
280
  var r = arguments[t];
281
- for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
281
+ for (var n in r)
282
+ Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
282
283
  }
283
284
  return e;
284
- }, G.apply(null, arguments);
285
+ }, G.apply(this, arguments);
285
286
  }
286
287
  var V;
287
288
  (function(e) {
@@ -301,36 +302,36 @@ function Y(e, t) {
301
302
  }
302
303
  }
303
304
  }
304
- var Re = "beforeunload", Ir = "hashchange", Lt = "popstate";
305
- function at(e) {
305
+ var Re = "beforeunload", Qr = "hashchange", Nt = "popstate";
306
+ function ct(e) {
306
307
  e === void 0 && (e = {});
307
308
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
308
309
  function a() {
309
- var g = n.location, l = g.pathname, y = g.search, S = g.hash, k = o.state || {};
310
- return [k.idx, re({
310
+ var g = n.location, l = g.pathname, y = g.search, S = g.hash, A = o.state || {};
311
+ return [A.idx, re({
311
312
  pathname: l,
312
313
  search: y,
313
314
  hash: S,
314
- state: k.usr || null,
315
- key: k.key || "default"
315
+ state: A.usr || null,
316
+ key: A.key || "default"
316
317
  })];
317
318
  }
318
319
  var s = null;
319
320
  function c() {
320
321
  if (s)
321
- p.call(s), s = null;
322
+ d.call(s), s = null;
322
323
  else {
323
324
  var g = V.Pop, l = a(), y = l[0], S = l[1];
324
- if (p.length)
325
+ if (d.length)
325
326
  if (y != null) {
326
- var k = f - y;
327
- k && (s = {
327
+ var A = f - y;
328
+ A && (s = {
328
329
  action: g,
329
330
  location: S,
330
331
  retry: function() {
331
- x(k * -1);
332
+ x(A * -1);
332
333
  }
333
- }, x(k));
334
+ }, x(A));
334
335
  } else
335
336
  process.env.NODE_ENV !== "production" && Y(
336
337
  !1,
@@ -340,23 +341,23 @@ function at(e) {
340
341
  "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."
341
342
  );
342
343
  else
343
- A(g);
344
+ k(g);
344
345
  }
345
346
  }
346
- n.addEventListener(Lt, c);
347
- var i = V.Pop, u = a(), f = u[0], d = u[1], P = ne(), p = ne();
347
+ n.addEventListener(Nt, c);
348
+ var i = V.Pop, u = a(), f = u[0], h = u[1], P = ne(), d = ne();
348
349
  f == null && (f = 0, o.replaceState(G({}, o.state, {
349
350
  idx: f
350
351
  }), ""));
351
- function h(g) {
352
+ function p(g) {
352
353
  return typeof g == "string" ? g : X(g);
353
354
  }
354
355
  function v(g, l) {
355
356
  return l === void 0 && (l = null), re(G({
356
- pathname: d.pathname,
357
+ pathname: h.pathname,
357
358
  hash: "",
358
359
  search: ""
359
- }, typeof g == "string" ? he(g) : g, {
360
+ }, typeof g == "string" ? pe(g) : g, {
360
361
  state: l,
361
362
  key: Pe()
362
363
  }));
@@ -366,59 +367,59 @@ function at(e) {
366
367
  usr: g.state,
367
368
  key: g.key,
368
369
  idx: l
369
- }, h(g)];
370
+ }, p(g)];
370
371
  }
371
372
  function E(g, l, y) {
372
- return !p.length || (p.call({
373
+ return !d.length || (d.call({
373
374
  action: g,
374
375
  location: l,
375
376
  retry: y
376
377
  }), !1);
377
378
  }
378
- function A(g) {
379
+ function k(g) {
379
380
  i = g;
380
381
  var l = a();
381
- f = l[0], d = l[1], P.call({
382
+ f = l[0], h = l[1], P.call({
382
383
  action: i,
383
- location: d
384
+ location: h
384
385
  });
385
386
  }
386
387
  function m(g, l) {
387
388
  var y = V.Push, S = v(g, l);
388
- function k() {
389
+ function A() {
389
390
  m(g, l);
390
391
  }
391
- if (E(y, S, k)) {
392
+ if (E(y, S, A)) {
392
393
  var C = R(S, f + 1), B = C[0], H = C[1];
393
394
  try {
394
395
  o.pushState(B, "", H);
395
396
  } catch {
396
397
  n.location.assign(H);
397
398
  }
398
- A(y);
399
+ k(y);
399
400
  }
400
401
  }
401
402
  function w(g, l) {
402
403
  var y = V.Replace, S = v(g, l);
403
- function k() {
404
+ function A() {
404
405
  w(g, l);
405
406
  }
406
- if (E(y, S, k)) {
407
+ if (E(y, S, A)) {
407
408
  var C = R(S, f), B = C[0], H = C[1];
408
- o.replaceState(B, "", H), A(y);
409
+ o.replaceState(B, "", H), k(y);
409
410
  }
410
411
  }
411
412
  function x(g) {
412
413
  o.go(g);
413
414
  }
414
- var U = {
415
+ var L = {
415
416
  get action() {
416
417
  return i;
417
418
  },
418
419
  get location() {
419
- return d;
420
+ return h;
420
421
  },
421
- createHref: h,
422
+ createHref: p,
422
423
  push: m,
423
424
  replace: w,
424
425
  go: x,
@@ -432,19 +433,19 @@ function at(e) {
432
433
  return P.push(l);
433
434
  },
434
435
  block: function(l) {
435
- var y = p.push(l);
436
- return p.length === 1 && n.addEventListener(Re, we), function() {
437
- y(), p.length || n.removeEventListener(Re, we);
436
+ var y = d.push(l);
437
+ return d.length === 1 && n.addEventListener(Re, we), function() {
438
+ y(), d.length || n.removeEventListener(Re, we);
438
439
  };
439
440
  }
440
441
  };
441
- return U;
442
+ return L;
442
443
  }
443
- function Or(e) {
444
+ function zr(e) {
444
445
  e === void 0 && (e = {});
445
446
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
446
447
  function a() {
447
- var l = he(n.location.hash.substr(1)), y = l.pathname, S = y === void 0 ? "/" : y, k = l.search, C = k === void 0 ? "" : k, B = l.hash, H = B === void 0 ? "" : B, M = o.state || {};
448
+ var l = pe(n.location.hash.substr(1)), y = l.pathname, S = y === void 0 ? "/" : y, A = l.search, C = A === void 0 ? "" : A, B = l.hash, H = B === void 0 ? "" : B, M = o.state || {};
448
449
  return [M.idx, re({
449
450
  pathname: S,
450
451
  search: C,
@@ -456,19 +457,19 @@ function Or(e) {
456
457
  var s = null;
457
458
  function c() {
458
459
  if (s)
459
- p.call(s), s = null;
460
+ d.call(s), s = null;
460
461
  else {
461
- var l = V.Pop, y = a(), S = y[0], k = y[1];
462
- if (p.length)
462
+ var l = V.Pop, y = a(), S = y[0], A = y[1];
463
+ if (d.length)
463
464
  if (S != null) {
464
465
  var C = f - S;
465
466
  C && (s = {
466
467
  action: l,
467
- location: k,
468
+ location: A,
468
469
  retry: function() {
469
- U(C * -1);
470
+ L(C * -1);
470
471
  }
471
- }, U(C));
472
+ }, L(C));
472
473
  } else
473
474
  process.env.NODE_ENV !== "production" && Y(
474
475
  !1,
@@ -481,31 +482,31 @@ function Or(e) {
481
482
  m(l);
482
483
  }
483
484
  }
484
- n.addEventListener(Lt, c), n.addEventListener(Ir, function() {
485
+ n.addEventListener(Nt, c), n.addEventListener(Qr, function() {
485
486
  var l = a(), y = l[1];
486
- X(y) !== X(d) && c();
487
+ X(y) !== X(h) && c();
487
488
  });
488
- var i = V.Pop, u = a(), f = u[0], d = u[1], P = ne(), p = ne();
489
+ var i = V.Pop, u = a(), f = u[0], h = u[1], P = ne(), d = ne();
489
490
  f == null && (f = 0, o.replaceState(G({}, o.state, {
490
491
  idx: f
491
492
  }), ""));
492
- function h() {
493
+ function p() {
493
494
  var l = document.querySelector("base"), y = "";
494
495
  if (l && l.getAttribute("href")) {
495
- var S = n.location.href, k = S.indexOf("#");
496
- y = k === -1 ? S : S.slice(0, k);
496
+ var S = n.location.href, A = S.indexOf("#");
497
+ y = A === -1 ? S : S.slice(0, A);
497
498
  }
498
499
  return y;
499
500
  }
500
501
  function v(l) {
501
- return h() + "#" + (typeof l == "string" ? l : X(l));
502
+ return p() + "#" + (typeof l == "string" ? l : X(l));
502
503
  }
503
504
  function R(l, y) {
504
505
  return y === void 0 && (y = null), re(G({
505
- pathname: d.pathname,
506
+ pathname: h.pathname,
506
507
  hash: "",
507
508
  search: ""
508
- }, typeof l == "string" ? he(l) : l, {
509
+ }, typeof l == "string" ? pe(l) : l, {
509
510
  state: y,
510
511
  key: Pe()
511
512
  }));
@@ -517,8 +518,8 @@ function Or(e) {
517
518
  idx: y
518
519
  }, v(l)];
519
520
  }
520
- function A(l, y, S) {
521
- return !p.length || (p.call({
521
+ function k(l, y, S) {
522
+ return !d.length || (d.call({
522
523
  action: l,
523
524
  location: y,
524
525
  retry: S
@@ -527,18 +528,18 @@ function Or(e) {
527
528
  function m(l) {
528
529
  i = l;
529
530
  var y = a();
530
- f = y[0], d = y[1], P.call({
531
+ f = y[0], h = y[1], P.call({
531
532
  action: i,
532
- location: d
533
+ location: h
533
534
  });
534
535
  }
535
536
  function w(l, y) {
536
- var S = V.Push, k = R(l, y);
537
+ var S = V.Push, A = R(l, y);
537
538
  function C() {
538
539
  w(l, y);
539
540
  }
540
- if (process.env.NODE_ENV !== "production" && Y(k.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(l) + ")"), A(S, k, C)) {
541
- var B = E(k, f + 1), H = B[0], M = B[1];
541
+ if (process.env.NODE_ENV !== "production" && Y(A.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(l) + ")"), k(S, A, C)) {
542
+ var B = E(A, f + 1), H = B[0], M = B[1];
542
543
  try {
543
544
  o.pushState(H, "", M);
544
545
  } catch {
@@ -548,16 +549,16 @@ function Or(e) {
548
549
  }
549
550
  }
550
551
  function x(l, y) {
551
- var S = V.Replace, k = R(l, y);
552
+ var S = V.Replace, A = R(l, y);
552
553
  function C() {
553
554
  x(l, y);
554
555
  }
555
- if (process.env.NODE_ENV !== "production" && Y(k.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(l) + ")"), A(S, k, C)) {
556
- var B = E(k, f), H = B[0], M = B[1];
556
+ if (process.env.NODE_ENV !== "production" && Y(A.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(l) + ")"), k(S, A, C)) {
557
+ var B = E(A, f), H = B[0], M = B[1];
557
558
  o.replaceState(H, "", M), m(S);
558
559
  }
559
560
  }
560
- function U(l) {
561
+ function L(l) {
561
562
  o.go(l);
562
563
  }
563
564
  var g = {
@@ -565,31 +566,31 @@ function Or(e) {
565
566
  return i;
566
567
  },
567
568
  get location() {
568
- return d;
569
+ return h;
569
570
  },
570
571
  createHref: v,
571
572
  push: w,
572
573
  replace: x,
573
- go: U,
574
+ go: L,
574
575
  back: function() {
575
- U(-1);
576
+ L(-1);
576
577
  },
577
578
  forward: function() {
578
- U(1);
579
+ L(1);
579
580
  },
580
581
  listen: function(y) {
581
582
  return P.push(y);
582
583
  },
583
584
  block: function(y) {
584
- var S = p.push(y);
585
- return p.length === 1 && n.addEventListener(Re, we), function() {
586
- S(), p.length || n.removeEventListener(Re, we);
585
+ var S = d.push(y);
586
+ return d.length === 1 && n.addEventListener(Re, we), function() {
587
+ S(), d.length || n.removeEventListener(Re, we);
587
588
  };
588
589
  }
589
590
  };
590
591
  return g;
591
592
  }
592
- function st(e) {
593
+ function ut(e) {
593
594
  e === void 0 && (e = {});
594
595
  var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(m) {
595
596
  var w = re(G({
@@ -598,10 +599,10 @@ function st(e) {
598
599
  hash: "",
599
600
  state: null,
600
601
  key: Pe()
601
- }, typeof m == "string" ? he(m) : m));
602
+ }, typeof m == "string" ? pe(m) : m));
602
603
  return process.env.NODE_ENV !== "production" && Y(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(m) + ")"), w;
603
- }), s = ct(o ?? a.length - 1, 0, a.length - 1), c = V.Pop, i = a[s], u = ne(), f = ne();
604
- function d(m) {
604
+ }), s = it(o ?? a.length - 1, 0, a.length - 1), c = V.Pop, i = a[s], u = ne(), f = ne();
605
+ function h(m) {
605
606
  return typeof m == "string" ? m : X(m);
606
607
  }
607
608
  function P(m, w) {
@@ -609,46 +610,46 @@ function st(e) {
609
610
  pathname: i.pathname,
610
611
  search: "",
611
612
  hash: ""
612
- }, typeof m == "string" ? he(m) : m, {
613
+ }, typeof m == "string" ? pe(m) : m, {
613
614
  state: w,
614
615
  key: Pe()
615
616
  }));
616
617
  }
617
- function p(m, w, x) {
618
+ function d(m, w, x) {
618
619
  return !f.length || (f.call({
619
620
  action: m,
620
621
  location: w,
621
622
  retry: x
622
623
  }), !1);
623
624
  }
624
- function h(m, w) {
625
+ function p(m, w) {
625
626
  c = m, i = w, u.call({
626
627
  action: c,
627
628
  location: i
628
629
  });
629
630
  }
630
631
  function v(m, w) {
631
- var x = V.Push, U = P(m, w);
632
+ var x = V.Push, L = P(m, w);
632
633
  function g() {
633
634
  v(m, w);
634
635
  }
635
- process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(m) + ")"), p(x, U, g) && (s += 1, a.splice(s, a.length, U), h(x, U));
636
+ process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(m) + ")"), d(x, L, g) && (s += 1, a.splice(s, a.length, L), p(x, L));
636
637
  }
637
638
  function R(m, w) {
638
- var x = V.Replace, U = P(m, w);
639
+ var x = V.Replace, L = P(m, w);
639
640
  function g() {
640
641
  R(m, w);
641
642
  }
642
- process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(m) + ")"), p(x, U, g) && (a[s] = U, h(x, U));
643
+ process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(m) + ")"), d(x, L, g) && (a[s] = L, p(x, L));
643
644
  }
644
645
  function E(m) {
645
- var w = ct(s + m, 0, a.length - 1), x = V.Pop, U = a[w];
646
+ var w = it(s + m, 0, a.length - 1), x = V.Pop, L = a[w];
646
647
  function g() {
647
648
  E(m);
648
649
  }
649
- p(x, U, g) && (s = w, h(x, U));
650
+ d(x, L, g) && (s = w, p(x, L));
650
651
  }
651
- var A = {
652
+ var k = {
652
653
  get index() {
653
654
  return s;
654
655
  },
@@ -658,7 +659,7 @@ function st(e) {
658
659
  get location() {
659
660
  return i;
660
661
  },
661
- createHref: d,
662
+ createHref: h,
662
663
  push: v,
663
664
  replace: R,
664
665
  go: E,
@@ -675,9 +676,9 @@ function st(e) {
675
676
  return f.push(w);
676
677
  }
677
678
  };
678
- return A;
679
+ return k;
679
680
  }
680
- function ct(e, t, r) {
681
+ function it(e, t, r) {
681
682
  return Math.min(Math.max(e, t), r);
682
683
  }
683
684
  function we(e) {
@@ -710,7 +711,7 @@ function X(e) {
710
711
  var t = e.pathname, r = t === void 0 ? "/" : t, n = e.search, o = n === void 0 ? "" : n, a = e.hash, s = a === void 0 ? "" : a;
711
712
  return o && o !== "?" && (r += o.charAt(0) === "?" ? o : "?" + o), s && s !== "#" && (r += s.charAt(0) === "#" ? s : "#" + s), r;
712
713
  }
713
- function he(e) {
714
+ function pe(e) {
714
715
  var t = {};
715
716
  if (e) {
716
717
  var r = e.indexOf("#");
@@ -720,19 +721,19 @@ function he(e) {
720
721
  }
721
722
  return t;
722
723
  }
723
- const Ct = Symbol();
724
- function Fr() {
725
- const e = ae(Ct);
724
+ const Vt = Symbol();
725
+ function Gr() {
726
+ const e = ae(Vt);
726
727
  if (!e)
727
- throw new pe();
728
+ throw new de();
728
729
  return e;
729
730
  }
730
- const Bt = Symbol("isRouterRouteSymbol");
731
- function Jr(e) {
732
- return typeof e == "object" && e !== null && Bt in e;
731
+ const Ht = Symbol("isRouterRouteSymbol");
732
+ function Kr(e) {
733
+ return typeof e == "object" && e !== null && Ht in e;
733
734
  }
734
- function Qr(e, t) {
735
- function r(R, E, A) {
735
+ function Yr(e, t) {
736
+ function r(R, E, k) {
736
737
  if (typeof R == "object") {
737
738
  const w = {
738
739
  ...e.params,
@@ -744,7 +745,7 @@ function Qr(e, t) {
744
745
  ...e.params,
745
746
  [R]: E
746
747
  };
747
- return t(e.name, m, A);
748
+ return t(e.name, m, k);
748
749
  }
749
750
  const n = (...R) => {
750
751
  const E = new URLSearchParams(e.query);
@@ -755,21 +756,21 @@ function Qr(e, t) {
755
756
  }, a = (...R) => {
756
757
  const E = new URLSearchParams(e.query);
757
758
  E.delete(...R), r({}, { query: E });
758
- }, { id: s, matched: c, matches: i, name: u, hash: f, href: d } = hr(e), P = N({
759
+ }, { id: s, matched: c, matches: i, name: u, hash: f, href: h } = yr(e), P = N({
759
760
  get() {
760
761
  return new Proxy(e.params, {
761
- set(R, E, A) {
762
- return r(E, A), !0;
762
+ set(R, E, k) {
763
+ return r(E, k), !0;
763
764
  }
764
765
  });
765
766
  },
766
767
  set(R) {
767
768
  r(R);
768
769
  }
769
- }), p = N({
770
+ }), d = N({
770
771
  get() {
771
772
  return new Proxy(e.query, {
772
- get(R, E, A) {
773
+ get(R, E, k) {
773
774
  switch (E) {
774
775
  case "append":
775
776
  return o;
@@ -778,7 +779,7 @@ function Qr(e, t) {
778
779
  case "delete":
779
780
  return a;
780
781
  default:
781
- return Reflect.get(R, E, A);
782
+ return Reflect.get(R, E, k);
782
783
  }
783
784
  }
784
785
  });
@@ -786,11 +787,11 @@ function Qr(e, t) {
786
787
  set(R) {
787
788
  r({}, { query: R });
788
789
  }
789
- }), h = N({
790
+ }), p = N({
790
791
  get() {
791
792
  return new Proxy(e.state, {
792
- set(R, E, A) {
793
- return r({}, { state: { ...e.state, [E]: A } }), !0;
793
+ set(R, E, k) {
794
+ return r({}, { state: { ...e.state, [E]: k } }), !0;
794
795
  }
795
796
  });
796
797
  },
@@ -802,24 +803,24 @@ function Qr(e, t) {
802
803
  id: s,
803
804
  matched: c,
804
805
  matches: i,
805
- state: h,
806
- query: p,
806
+ state: p,
807
+ query: d,
807
808
  hash: f,
808
809
  params: P,
809
810
  name: u,
810
- href: d,
811
+ href: h,
811
812
  update: r,
812
- [Bt]: !0
813
+ [Ht]: !0
813
814
  });
814
815
  }
815
- const Nt = Symbol();
816
- function zr(e, t) {
816
+ const jt = Symbol();
817
+ function Xr(e, t) {
817
818
  const r = xe({ ...e }), n = (s) => {
818
819
  Object.assign(r, {
819
- [Nt]: !1,
820
+ [jt]: !1,
820
821
  ...s
821
822
  });
822
- }, o = r, a = Qr(o, t);
823
+ }, o = r, a = Yr(o, t);
823
824
  return {
824
825
  currentRoute: o,
825
826
  routerRoute: a,
@@ -827,9 +828,9 @@ function zr(e, t) {
827
828
  };
828
829
  }
829
830
  function _(e) {
830
- return !e.startsWith("http") ? Kr(e) : Gr(e);
831
+ return !e.startsWith("http") ? en(e) : Zr(e);
831
832
  }
832
- function Gr(e) {
833
+ function Zr(e) {
833
834
  const { protocol: t, host: r, pathname: n, search: o, searchParams: a, hash: s } = new URL(e, e);
834
835
  return {
835
836
  protocol: t,
@@ -840,7 +841,7 @@ function Gr(e) {
840
841
  hash: s
841
842
  };
842
843
  }
843
- function Kr(e) {
844
+ function en(e) {
844
845
  const { pathname: t, search: r, searchParams: n, hash: o } = new URL(e, "https://localhost");
845
846
  return {
846
847
  pathname: t,
@@ -849,14 +850,14 @@ function Kr(e) {
849
850
  hash: o
850
851
  };
851
852
  }
852
- function Yr(e) {
853
+ function tn(e) {
853
854
  return (t) => {
854
855
  const { host: r } = _(t);
855
856
  return !(r === void 0 || r === e);
856
857
  };
857
858
  }
858
- function Xr({ mode: e, listener: t }) {
859
- const r = Zr(e), n = (i, u) => {
859
+ function rn({ mode: e, listener: t }) {
860
+ const r = nn(e), n = (i, u) => {
860
861
  if (u != null && u.replace) {
861
862
  r.replace(i, u.state);
862
863
  return;
@@ -879,16 +880,16 @@ function Xr({ mode: e, listener: t }) {
879
880
  }
880
881
  };
881
882
  }
882
- function Zr(e = "auto") {
883
+ function nn(e = "auto") {
883
884
  switch (e) {
884
885
  case "auto":
885
- return We() ? at() : st();
886
+ return Ie() ? ct() : ut();
886
887
  case "browser":
887
- return at();
888
+ return ct();
888
889
  case "memory":
889
- return st();
890
+ return ut();
890
891
  case "hash":
891
- return Or();
892
+ return zr();
892
893
  default:
893
894
  const t = e;
894
895
  throw new Error(`Switch is not exhaustive for mode: ${t}`);
@@ -896,122 +897,122 @@ function Zr(e = "auto") {
896
897
  }
897
898
  class Ee {
898
899
  constructor() {
899
- I(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
900
- I(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
901
- I(this, "onBeforeRouteLeave", /* @__PURE__ */ new Set());
902
- I(this, "onAfterRouteEnter", /* @__PURE__ */ new Set());
903
- I(this, "onAfterRouteUpdate", /* @__PURE__ */ new Set());
904
- I(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
900
+ O(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
901
+ O(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
902
+ O(this, "onBeforeRouteLeave", /* @__PURE__ */ new Set());
903
+ O(this, "onAfterRouteEnter", /* @__PURE__ */ new Set());
904
+ O(this, "onAfterRouteUpdate", /* @__PURE__ */ new Set());
905
+ O(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
905
906
  }
906
907
  }
907
- class Vt extends Error {
908
+ class $t extends Error {
908
909
  constructor() {
909
910
  super("Uncaught CallbackContextAbortError");
910
- I(this, "response");
911
+ O(this, "response");
911
912
  this.response = { status: "ABORT" };
912
913
  }
913
914
  }
914
915
  class te extends Error {
915
916
  constructor(r) {
916
917
  super("Uncaught CallbackContextPushError");
917
- I(this, "response");
918
+ O(this, "response");
918
919
  this.response = { status: "PUSH", to: r };
919
920
  }
920
921
  }
921
922
  class be extends Error {
922
923
  constructor(r) {
923
924
  super("Uncaught CallbackContextRejectionError");
924
- I(this, "response");
925
+ O(this, "response");
925
926
  this.response = { status: "REJECT", type: r };
926
927
  }
927
928
  }
928
- function en(e, t) {
929
+ function on(e, t) {
929
930
  const r = new Ee();
930
931
  return e.matches.forEach((n, o) => {
931
- n.onBeforeRouteEnter && De(e, t, o) && ee(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Ie(e, t, o) && ee(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
932
+ n.onBeforeRouteEnter && Oe(e, t, o) && ee(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Fe(e, t, o) && ee(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
932
933
  }), t.matches.forEach((n, o) => {
933
934
  n.onBeforeRouteLeave && Te(e, t, o) && ee(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
934
935
  }), r;
935
936
  }
936
- function tn(e, t) {
937
+ function an(e, t) {
937
938
  const r = new Ee();
938
939
  return e.matches.forEach((n, o) => {
939
- n.onAfterRouteEnter && De(e, t, o) && ee(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Ie(e, t, o) && ee(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
940
+ n.onAfterRouteEnter && Oe(e, t, o) && ee(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Fe(e, t, o) && ee(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
940
941
  }), t.matches.forEach((n, o) => {
941
942
  n.onAfterRouteLeave && Te(e, t, o) && ee(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
942
943
  }), r;
943
944
  }
944
- function Ht() {
945
+ function qt() {
945
946
  return { reject: (o) => {
946
947
  throw new be(o);
947
948
  }, push: (...o) => {
948
949
  throw new te(o);
949
950
  }, replace: (o, a, s) => {
950
- if (O(o)) {
951
+ if (T(o)) {
951
952
  const u = a ?? {};
952
953
  throw new te([o, { ...u, replace: !0 }]);
953
954
  }
954
955
  const c = a, i = s ?? {};
955
956
  throw new te([o, c, { ...i, replace: !0 }]);
956
957
  }, abort: () => {
957
- throw new Vt();
958
+ throw new $t();
958
959
  } };
959
960
  }
960
- function rn() {
961
- const { reject: e, push: t, replace: r, abort: n } = Ht();
961
+ function sn() {
962
+ const { reject: e, push: t, replace: r, abort: n } = qt();
962
963
  async function o({ to: s, from: c, hooks: i }) {
963
- const { global: u, component: f } = i, d = en(s, c), P = [
964
+ const { global: u, component: f } = i, h = on(s, c), P = [
964
965
  ...u.onBeforeRouteEnter,
965
- ...d.onBeforeRouteEnter,
966
+ ...h.onBeforeRouteEnter,
966
967
  ...u.onBeforeRouteUpdate,
967
- ...d.onBeforeRouteUpdate,
968
+ ...h.onBeforeRouteUpdate,
968
969
  ...f.onBeforeRouteUpdate,
969
970
  ...u.onBeforeRouteLeave,
970
- ...d.onBeforeRouteLeave,
971
+ ...h.onBeforeRouteLeave,
971
972
  ...f.onBeforeRouteLeave
972
973
  ];
973
974
  try {
974
- const p = P.map((h) => h(s, {
975
+ const d = P.map((p) => p(s, {
975
976
  from: c,
976
977
  reject: e,
977
978
  push: t,
978
979
  replace: r,
979
980
  abort: n
980
981
  }));
981
- await Promise.all(p);
982
- } catch (p) {
983
- if (p instanceof te || p instanceof be || p instanceof Vt)
984
- return p.response;
985
- throw p;
982
+ await Promise.all(d);
983
+ } catch (d) {
984
+ if (d instanceof te || d instanceof be || d instanceof $t)
985
+ return d.response;
986
+ throw d;
986
987
  }
987
988
  return {
988
989
  status: "SUCCESS"
989
990
  };
990
991
  }
991
992
  async function a({ to: s, from: c, hooks: i }) {
992
- const { global: u, component: f } = i, d = tn(s, c), P = [
993
+ const { global: u, component: f } = i, h = an(s, c), P = [
993
994
  ...f.onAfterRouteLeave,
994
- ...d.onAfterRouteLeave,
995
+ ...h.onAfterRouteLeave,
995
996
  ...u.onAfterRouteLeave,
996
997
  ...f.onAfterRouteUpdate,
997
- ...d.onAfterRouteUpdate,
998
+ ...h.onAfterRouteUpdate,
998
999
  ...u.onAfterRouteUpdate,
999
1000
  ...f.onAfterRouteEnter,
1000
- ...d.onAfterRouteEnter,
1001
+ ...h.onAfterRouteEnter,
1001
1002
  ...u.onAfterRouteEnter
1002
1003
  ];
1003
1004
  try {
1004
- const p = P.map((h) => h(s, {
1005
+ const d = P.map((p) => p(s, {
1005
1006
  from: c,
1006
1007
  reject: e,
1007
1008
  push: t,
1008
1009
  replace: r
1009
1010
  }));
1010
- await Promise.all(p);
1011
- } catch (p) {
1012
- if (p instanceof te || p instanceof be)
1013
- return p.response;
1014
- throw p;
1011
+ await Promise.all(d);
1012
+ } catch (d) {
1013
+ if (d instanceof te || d instanceof be)
1014
+ return d.response;
1015
+ throw d;
1015
1016
  }
1016
1017
  return {
1017
1018
  status: "SUCCESS"
@@ -1022,7 +1023,7 @@ function rn() {
1022
1023
  runAfterRouteHooks: a
1023
1024
  };
1024
1025
  }
1025
- const De = (e, t, r) => {
1026
+ const Oe = (e, t, r) => {
1026
1027
  var a;
1027
1028
  const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1028
1029
  return n.length < r || n[r].id !== ((a = o[r]) == null ? void 0 : a.id);
@@ -1030,18 +1031,18 @@ const De = (e, t, r) => {
1030
1031
  var a;
1031
1032
  const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1032
1033
  return n.length < r || n[r].id !== ((a = o[r]) == null ? void 0 : a.id);
1033
- }, Ie = (e, t, r) => {
1034
+ }, Fe = (e, t, r) => {
1034
1035
  var n;
1035
1036
  return e.matches[r].id === ((n = t == null ? void 0 : t.matches[r]) == null ? void 0 : n.id);
1036
1037
  };
1037
- function ut(e) {
1038
+ function ft(e) {
1038
1039
  switch (e) {
1039
1040
  case "onBeforeRouteEnter":
1040
1041
  case "onAfterRouteEnter":
1041
- return De;
1042
+ return Oe;
1042
1043
  case "onBeforeRouteUpdate":
1043
1044
  case "onAfterRouteUpdate":
1044
- return Ie;
1045
+ return Fe;
1045
1046
  case "onBeforeRouteLeave":
1046
1047
  case "onAfterRouteLeave":
1047
1048
  return Te;
@@ -1049,30 +1050,30 @@ function ut(e) {
1049
1050
  throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
1050
1051
  }
1051
1052
  }
1052
- function nn() {
1053
+ function cn() {
1053
1054
  const e = {
1054
1055
  global: new Ee(),
1055
1056
  component: new Ee()
1056
1057
  };
1057
1058
  function t({ lifecycle: n, timing: o, depth: a, hook: s }) {
1058
- const c = ut(n), i = e[o][n], u = (f, d) => {
1059
- if (c(f, d.from, a))
1060
- return s(f, d);
1059
+ const c = ft(n), i = e[o][n], u = (f, h) => {
1060
+ if (c(f, h.from, a))
1061
+ return s(f, h);
1061
1062
  };
1062
1063
  return i.add(u), () => i.delete(u);
1063
1064
  }
1064
1065
  function r({ lifecycle: n, timing: o, depth: a, hook: s }) {
1065
- const c = ut(n), i = e[o][n], u = (f, d) => {
1066
- if (c(f, d.from, a))
1067
- return s(f, d);
1066
+ const c = ft(n), i = e[o][n], u = (f, h) => {
1067
+ if (c(f, h.from, a))
1068
+ return s(f, h);
1068
1069
  };
1069
1070
  return i.add(u), () => i.delete(u);
1070
1071
  }
1071
1072
  return { ...e, addBeforeRouteHook: t, addAfterRouteHook: r };
1072
1073
  }
1073
- const jt = Symbol();
1074
- function on() {
1075
- const e = nn();
1074
+ const _t = Symbol();
1075
+ function un() {
1076
+ const e = cn();
1076
1077
  return {
1077
1078
  onBeforeRouteEnter: (c) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteEnter", hook: c, timing: "global", depth: 0 }),
1078
1079
  onBeforeRouteUpdate: (c) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteUpdate", hook: c, timing: "global", depth: 0 }),
@@ -1083,13 +1084,13 @@ function on() {
1083
1084
  hooks: e
1084
1085
  };
1085
1086
  }
1086
- function an(e) {
1087
+ function fn(e) {
1087
1088
  return se(() => () => Z("h1", e), {
1088
1089
  name: e,
1089
1090
  props: []
1090
1091
  });
1091
1092
  }
1092
- function Oe(e) {
1093
+ function Je(e) {
1093
1094
  const t = new URLSearchParams(e);
1094
1095
  return {
1095
1096
  get: (...r) => t.get(...r),
@@ -1118,22 +1119,22 @@ function Oe(e) {
1118
1119
  [Symbol.iterator]: () => t[Symbol.iterator]()
1119
1120
  };
1120
1121
  }
1121
- function $t() {
1122
+ function Mt() {
1122
1123
  let e = 0;
1123
1124
  return () => (++e).toString();
1124
1125
  }
1125
- const Fe = $t();
1126
- function sn({
1126
+ const Qe = Mt();
1127
+ function ln({
1127
1128
  rejections: e
1128
1129
  }) {
1129
1130
  const t = (a) => {
1130
1131
  const s = {
1131
1132
  ...e
1132
1133
  };
1133
- return ye(s[a] ?? an(a));
1134
+ return ge(s[a] ?? fn(a));
1134
1135
  }, r = (a) => {
1135
- const s = ye(t(a)), c = {
1136
- id: Fe(),
1136
+ const s = ge(t(a)), c = {
1137
+ id: Qe(),
1137
1138
  component: s,
1138
1139
  meta: {},
1139
1140
  state: {}
@@ -1143,12 +1144,12 @@ function sn({
1143
1144
  matched: c,
1144
1145
  matches: [c],
1145
1146
  name: a,
1146
- query: Oe(""),
1147
+ query: Je(""),
1147
1148
  params: {},
1148
1149
  state: {},
1149
1150
  href: "/",
1150
1151
  hash: "",
1151
- [Nt]: !0
1152
+ [jt]: !0
1152
1153
  };
1153
1154
  }, n = (a) => {
1154
1155
  if (!a) {
@@ -1157,138 +1158,138 @@ function sn({
1157
1158
  }
1158
1159
  const s = t(a);
1159
1160
  o.value = { type: a, component: s };
1160
- }, o = $e(null);
1161
+ }, o = _e(null);
1161
1162
  return {
1162
1163
  setRejection: n,
1163
1164
  rejection: o,
1164
1165
  getRejectionRoute: r
1165
1166
  };
1166
1167
  }
1167
- class cn extends Error {
1168
+ class hn extends Error {
1168
1169
  constructor() {
1169
1170
  super("initialUrl must be set if window.location is unavailable");
1170
1171
  }
1171
1172
  }
1172
- function un(e) {
1173
+ function pn(e) {
1173
1174
  if (e)
1174
1175
  return e;
1175
- if (We())
1176
+ if (Ie())
1176
1177
  return window.location.toString();
1177
- throw new cn();
1178
+ throw new hn();
1178
1179
  }
1179
- function Je(e) {
1180
+ function ze(e) {
1180
1181
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1181
1182
  }
1182
- function fn(e, t) {
1183
+ function dn(e, t) {
1183
1184
  const r = Array.from(e.matchAll(t));
1184
1185
  if (r.length === 0)
1185
1186
  return [e];
1186
1187
  let n = 0;
1187
1188
  const o = r.reduce((s, c) => {
1188
- const i = Je(e.slice(n, c.index));
1189
+ const i = ze(e.slice(n, c.index));
1189
1190
  i.length && s.push(i);
1190
1191
  const [u] = c;
1191
1192
  return s.push(u), n = c.index + u.length, s;
1192
1193
  }, []), a = e.slice(n);
1193
1194
  return a && o.push(a), o;
1194
1195
  }
1195
- function ln(e) {
1196
- const t = qt(e.path.value);
1196
+ function mn(e) {
1197
+ const t = Wt(e.path.value);
1197
1198
  return new RegExp(`^${t}$`, "i");
1198
1199
  }
1199
- function hn(e) {
1200
+ function yn(e) {
1200
1201
  const t = new URLSearchParams(e.query.value);
1201
- return Array.from(t.entries()).filter(([, r]) => !Ve(r)).map(([r, n]) => {
1202
- const o = qt(n);
1203
- return new RegExp(`${Je(r)}=${o}(&|$)`, "i");
1202
+ return Array.from(t.entries()).filter(([, r]) => !je(r)).map(([r, n]) => {
1203
+ const o = Wt(n);
1204
+ return new RegExp(`${ze(r)}=${o}(&|$)`, "i");
1204
1205
  });
1205
1206
  }
1206
- function qt(e) {
1207
- return fn(e, new RegExp(pn, "g")).map((t) => t.startsWith(J) ? _t(t) : Je(t)).join("");
1207
+ function Wt(e) {
1208
+ return dn(e, new RegExp(gn, "g")).map((t) => t.startsWith(J) ? Dt(t) : ze(t)).join("");
1208
1209
  }
1209
- function _t(e) {
1210
+ function Dt(e) {
1210
1211
  return [
1211
- dn,
1212
- mn
1212
+ vn,
1213
+ Rn
1213
1214
  ].reduce((t, r) => r(t), e);
1214
1215
  }
1215
- const pn = `\\${J}\\??([\\w-_]+)\\${K}`, Qe = `\\${J}\\?([\\w-_]+)\\${K}`, Mt = `\\${J}([\\w-_]+)\\${K}`;
1216
- function dn(e) {
1217
- return e.replace(new RegExp(Qe, "g"), ".*");
1216
+ const gn = `\\${J}\\??([\\w-_]+)\\${K}`, Ge = `\\${J}\\?([\\w-_]+)\\${K}`, It = `\\${J}([\\w-_]+)\\${K}`;
1217
+ function vn(e) {
1218
+ return e.replace(new RegExp(Ge, "g"), ".*");
1218
1219
  }
1219
- function Ve(e) {
1220
- return new RegExp(Qe, "g").test(e);
1220
+ function je(e) {
1221
+ return new RegExp(Ge, "g").test(e);
1221
1222
  }
1222
- function mn(e) {
1223
- return e.replace(new RegExp(Mt, "g"), ".+");
1223
+ function Rn(e) {
1224
+ return e.replace(new RegExp(It, "g"), ".+");
1224
1225
  }
1225
- function Le(e) {
1226
- const [t] = Se(e, new RegExp(Qe, "g")), [r] = Se(e, new RegExp(Mt, "g"));
1226
+ function Ce(e) {
1227
+ const [t] = Se(e, new RegExp(Ge, "g")), [r] = Se(e, new RegExp(It, "g"));
1227
1228
  return t ?? r;
1228
1229
  }
1229
1230
  function Se(e, t) {
1230
1231
  return Array.from(e.matchAll(t)).flatMap(([, ...n]) => n.map((o) => F(o) ? o : ""));
1231
1232
  }
1232
- function ze(e, t) {
1233
+ function Ke(e, t) {
1233
1234
  const r = new RegExp(`\\${J}(\\??[\\w-_]+)\\${K}`, "g");
1234
1235
  return Array.from(e.matchAll(r)).reduce((o, [a, s]) => {
1235
- const c = Le(a);
1236
+ const c = Ce(a);
1236
1237
  if (!c)
1237
1238
  return o;
1238
- const i = Wr(t, c);
1239
+ const i = Tr(t, c);
1239
1240
  return ce([c], o), o[s] = i, o;
1240
1241
  }, {});
1241
1242
  }
1242
- function He(e, t) {
1243
+ function $e(e, t) {
1243
1244
  return {
1244
1245
  value: e,
1245
- params: ze(e, t)
1246
+ params: Ke(e, t)
1246
1247
  };
1247
1248
  }
1248
- function yn(e, t) {
1249
+ function wn(e, t) {
1249
1250
  return F(t) ? e.map((r) => {
1250
1251
  const n = `${t}${r.path.value}`;
1251
1252
  return {
1252
1253
  ...r,
1253
- path: He(n, r.path.params)
1254
+ path: $e(n, r.path.params)
1254
1255
  };
1255
1256
  }) : e;
1256
1257
  }
1257
- function Wt(e) {
1258
+ function Ot(e) {
1258
1259
  return !!e && typeof e == "object";
1259
1260
  }
1260
1261
  const ke = !0;
1261
- function gn(e, t, r) {
1262
- if (Wt(e) && t in e) {
1262
+ function Pn(e, t, r) {
1263
+ if (Ot(e) && t in e) {
1263
1264
  const n = e[t];
1264
- return typeof n == "string" ? fe(n, r, ke) : n;
1265
+ return typeof n == "string" ? le(n, r, ke) : n;
1265
1266
  }
1266
- return fe(void 0, r, ke);
1267
+ return le(void 0, r, ke);
1267
1268
  }
1268
- function Dt(e, t) {
1269
+ function Tt(e, t) {
1269
1270
  const r = {};
1270
1271
  for (const [n, o] of Object.entries(e)) {
1271
- const a = gn(t, n, o);
1272
+ const a = Pn(t, n, o);
1272
1273
  r[n] = a;
1273
1274
  }
1274
1275
  return r;
1275
1276
  }
1276
- function vn(e, t, r) {
1277
- if (Wt(e) && t in e) {
1277
+ function En(e, t, r) {
1278
+ if (Ot(e) && t in e) {
1278
1279
  const n = e[t];
1279
- return le(n, r, ke);
1280
+ return he(n, r, ke);
1280
1281
  }
1281
- return le(void 0, r, ke);
1282
+ return he(void 0, r, ke);
1282
1283
  }
1283
- const Rn = (e, t) => {
1284
+ const lt = (e, t) => {
1284
1285
  const r = {};
1285
1286
  for (const [n, o] of Object.entries(e)) {
1286
- const a = vn(t, n, o);
1287
+ const a = En(t, n, o);
1287
1288
  r[n] = a;
1288
1289
  }
1289
1290
  return r;
1290
1291
  };
1291
- class wn extends Error {
1292
+ class bn extends Error {
1292
1293
  /**
1293
1294
  * Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
1294
1295
  * @param name - The name of the name that was duplicated.
@@ -1297,14 +1298,14 @@ class wn extends Error {
1297
1298
  super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
1298
1299
  }
1299
1300
  }
1300
- function Pn(e) {
1301
+ function Sn(e) {
1301
1302
  const t = e.map(({ name: r }) => r);
1302
1303
  for (const r of t)
1303
- if (Et(t, r) > 1)
1304
- throw new wn(r);
1304
+ if (kt(t, r) > 1)
1305
+ throw new bn(r);
1305
1306
  }
1306
- function En() {
1307
- const e = xe(/* @__PURE__ */ new Map()), t = We() ? s() : null, r = (c) => {
1307
+ function kn() {
1308
+ const e = xe(/* @__PURE__ */ new Map()), t = Ie() ? s() : null, r = (c) => {
1308
1309
  e.set(c, !1), t == null || t.observe(c);
1309
1310
  }, n = (c) => {
1310
1311
  e.delete(c), t == null || t.unobserve(c);
@@ -1325,59 +1326,61 @@ function En() {
1325
1326
  isElementVisible: a
1326
1327
  };
1327
1328
  }
1328
- const Tt = Symbol("visibilityObserver");
1329
- function bn(e) {
1330
- const t = ae(Tt);
1329
+ const Ft = Symbol("visibilityObserver");
1330
+ function An(e) {
1331
+ const t = ae(Ft);
1331
1332
  if (!t)
1332
- throw new pe();
1333
- return ge(e, (n, o) => {
1333
+ throw new de();
1334
+ return ie(e, (n, o) => {
1334
1335
  n && t.observe(n), o && t.unobserve(o);
1335
- }, { immediate: !0 }), {
1336
+ }, { immediate: !0 }), Le(() => {
1337
+ e.value && t.unobserve(e.value);
1338
+ }), {
1336
1339
  isElementVisible: N(() => e.value ? t.isElementVisible(e.value) : !1)
1337
1340
  };
1338
1341
  }
1339
- class Sn extends Error {
1342
+ class xn extends Error {
1340
1343
  constructor(t) {
1341
1344
  super(`Route not found: "${t}"`);
1342
1345
  }
1343
1346
  }
1344
- function It(e, t, r) {
1345
- const n = Ft(t, r), [o] = Se(e, n);
1347
+ function Jt(e, t, r) {
1348
+ const n = zt(t, r), [o] = Se(e, n);
1346
1349
  return o;
1347
1350
  }
1348
- function Ot(e, t) {
1351
+ function Qt(e, t) {
1349
1352
  if (!t)
1350
1353
  return e;
1351
- const { name: r, param: n, value: o } = t, a = Ft(e, r);
1352
- return Se(e, a).reduce((c, i) => i === void 0 ? c : c.replace(i, () => le(o, n, r.startsWith("?"))), e);
1354
+ const { name: r, param: n, value: o } = t, a = zt(e, r);
1355
+ return Se(e, a).reduce((c, i) => i === void 0 ? c : c.replace(i, () => he(o, n, r.startsWith("?"))), e);
1353
1356
  }
1354
- function Ft(e, t) {
1357
+ function zt(e, t) {
1355
1358
  const r = [
1356
- kn,
1357
- An,
1358
- _t
1359
+ Ln,
1360
+ Un,
1361
+ Dt
1359
1362
  ].reduce((n, o) => o(n, t), e);
1360
1363
  return new RegExp(r, "g");
1361
1364
  }
1362
- function kn(e, t) {
1365
+ function Ln(e, t) {
1363
1366
  if (!t.startsWith("?"))
1364
1367
  return e;
1365
1368
  const r = new RegExp(`\\${J}\\${t}\\${K}`, "g");
1366
1369
  return e.replace(r, "(.*)");
1367
1370
  }
1368
- function An(e, t) {
1371
+ function Un(e, t) {
1369
1372
  if (t.startsWith("?"))
1370
1373
  return e;
1371
1374
  const r = new RegExp(`\\${J}${t}\\${K}`, "g");
1372
1375
  return e.replace(r, "(.+)");
1373
1376
  }
1374
- function Jt({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
1377
+ function Gt({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
1375
1378
  const s = new URL("https://localhost");
1376
1379
  e && (s.protocol = e), t && (s.host = t), r && (s.pathname = r), o ? s.search = new URLSearchParams(o).toString() : n && (s.search = n), a && (s.hash = a);
1377
1380
  const c = s.toString().replace(/^https:\/\/localhost\/*/, "/");
1378
- return wt(c);
1381
+ return bt(c);
1379
1382
  }
1380
- function Ge(...e) {
1383
+ function Ye(...e) {
1381
1384
  const t = new URLSearchParams();
1382
1385
  for (const r of e) {
1383
1386
  const n = new URLSearchParams(r);
@@ -1386,68 +1389,68 @@ function Ge(...e) {
1386
1389
  }
1387
1390
  return t;
1388
1391
  }
1389
- function xn(e, t = {}) {
1390
- const { params: r = {}, query: n } = t, o = Cn(e.query, r), a = Ge(o, n), s = Ln(e.path, r), c = ve(e.hash.value ?? t.hash).value, i = Un(e.host, r), { protocol: u, host: f } = _(i);
1391
- return Jt({ protocol: u, host: f, pathname: s, searchParams: a, hash: c });
1392
+ function Cn(e, t = {}) {
1393
+ const { params: r = {}, query: n } = t, o = Vn(e.query, r), a = Ye(o, n), s = Nn(e.path, r), c = ve(e.hash.value ?? t.hash).value, i = Bn(e.host, r), { protocol: u, host: f } = _(i);
1394
+ return Gt({ protocol: u, host: f, pathname: s, searchParams: a, hash: c });
1392
1395
  }
1393
- function Un(e, t) {
1396
+ function Bn(e, t) {
1394
1397
  const r = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
1395
1398
  return Object.entries(e.params).reduce((n, [o, a]) => {
1396
- const s = Le(`${J}${o}${K}`);
1397
- return s ? Ot(n, { name: o, param: a, value: t[s] }) : n;
1399
+ const s = Ce(`${J}${o}${K}`);
1400
+ return s ? Qt(n, { name: o, param: a, value: t[s] }) : n;
1398
1401
  }, r);
1399
1402
  }
1400
- function Ln(e, t) {
1403
+ function Nn(e, t) {
1401
1404
  return Object.entries(e.params).reduce((r, [n, o]) => {
1402
- const a = Le(`${J}${n}${K}`);
1403
- return a ? Ot(r, { name: n, param: o, value: t[a] }) : r;
1405
+ const a = Ce(`${J}${n}${K}`);
1406
+ return a ? Qt(r, { name: n, param: o, value: t[a] }) : r;
1404
1407
  }, e.value);
1405
1408
  }
1406
- function Cn(e, t) {
1409
+ function Vn(e, t) {
1407
1410
  const r = new URLSearchParams(e.value);
1408
1411
  if (!e.value)
1409
1412
  return r;
1410
1413
  for (const [n, o] of Array.from(r.entries())) {
1411
- const a = Le(o);
1414
+ const a = Ce(o);
1412
1415
  if (!a)
1413
1416
  continue;
1414
- const c = le(t[a], e.params[a], Ve(o)), i = t[a] === void 0 && c === "";
1415
- Ve(o) && i ? r.delete(n, o) : r.set(n, c);
1417
+ const c = he(t[a], e.params[a], je(o)), i = t[a] === void 0 && c === "";
1418
+ je(o) && i ? r.delete(n, o) : r.set(n, c);
1416
1419
  }
1417
1420
  return r;
1418
1421
  }
1419
- const Bn = (e, t) => {
1422
+ const Hn = (e, t) => {
1420
1423
  try {
1421
- Ke(e, t);
1424
+ Xe(e, t);
1422
1425
  } catch {
1423
1426
  return !1;
1424
1427
  }
1425
1428
  return !0;
1426
- }, Ke = (e, t) => {
1429
+ }, Xe = (e, t) => {
1427
1430
  const { pathname: r, search: n } = _(t);
1428
1431
  return {
1429
- ...Nn(e.path, r),
1430
- ...Vn(e.query, n)
1432
+ ...jn(e.path, r),
1433
+ ...$n(e.query, n)
1431
1434
  };
1432
1435
  };
1433
- function Nn(e, t) {
1436
+ function jn(e, t) {
1434
1437
  const r = {}, n = decodeURIComponent(t);
1435
1438
  for (const [o, a] of Object.entries(e.params)) {
1436
- const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = It(n, e.value, o), u = fe(i, a, s);
1439
+ const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = Jt(n, e.value, o), u = le(i, a, s);
1437
1440
  r[c] = u;
1438
1441
  }
1439
1442
  return r;
1440
1443
  }
1441
- function Vn(e, t) {
1444
+ function $n(e, t) {
1442
1445
  const r = {}, n = new URLSearchParams(t);
1443
1446
  for (const [o, a] of Object.entries(e.params)) {
1444
- const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = n.get(c) ?? void 0, u = fe(i, a, s);
1447
+ const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = n.get(c) ?? void 0, u = le(i, a, s);
1445
1448
  r[c] = u;
1446
1449
  }
1447
1450
  return r;
1448
1451
  }
1449
- function Hn(e, t = {}, r = {}) {
1450
- const n = xn(e, {
1452
+ function qn(e, t = {}, r = {}) {
1453
+ const n = Cn(e, {
1451
1454
  params: t,
1452
1455
  query: r.query,
1453
1456
  hash: r.hash
@@ -1457,51 +1460,51 @@ function Hn(e, t = {}, r = {}) {
1457
1460
  matched: e.matched,
1458
1461
  matches: e.matches,
1459
1462
  name: e.name,
1460
- query: Oe(o),
1461
- params: Ke(e, n),
1462
- state: Dt(e.state, r.state),
1463
+ query: Je(o),
1464
+ params: Xe(e, n),
1465
+ state: Tt(e.state, r.state),
1463
1466
  hash: a,
1464
1467
  href: n
1465
1468
  };
1466
1469
  }
1467
- const jn = (e) => "name" in e.matched && !!e.matched.name, $n = (e, t) => {
1470
+ const _n = (e) => "name" in e.matched && !!e.matched.name, Mn = (e, t) => {
1468
1471
  const { pathname: r } = _(t);
1469
- return ln(e).test(r);
1470
- }, qn = (e, t) => {
1472
+ return mn(e).test(r);
1473
+ }, Wn = (e, t) => {
1471
1474
  const { search: r } = _(t);
1472
- return hn(e).every((o) => o.test(r));
1473
- }, je = (e, t) => {
1475
+ return yn(e).every((o) => o.test(r));
1476
+ }, qe = (e, t) => {
1474
1477
  const { hash: r } = _(t), { value: n } = e.hash;
1475
1478
  return n === void 0 || `#${n.toLowerCase()}` === r.toLowerCase();
1476
1479
  };
1477
- function _n(e) {
1480
+ function Dn(e) {
1478
1481
  const { searchParams: t, pathname: r } = _(e), n = -1, o = 1;
1479
1482
  return (a, s) => {
1480
- const c = ft(a, t), i = it(a, r), u = ft(s, t), f = it(s, r);
1481
- return a.depth > s.depth ? n : a.depth < s.depth ? o : c + i > u + f ? n : c + i < u + f ? o : je(a, e) ? n : je(s, e) ? o : 0;
1483
+ const c = pt(a, t), i = ht(a, r), u = pt(s, t), f = ht(s, r);
1484
+ return a.depth > s.depth ? n : a.depth < s.depth ? o : c + i > u + f ? n : c + i < u + f ? o : qe(a, e) ? n : qe(s, e) ? o : 0;
1482
1485
  };
1483
1486
  }
1484
- function it(e, t) {
1485
- const r = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), n = r.filter((o) => It(t, e.path.value, o) === void 0);
1487
+ function ht(e, t) {
1488
+ const r = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), n = r.filter((o) => Jt(t, e.path.value, o) === void 0);
1486
1489
  return r.length - n.length;
1487
1490
  }
1488
- function ft(e, t) {
1491
+ function pt(e, t) {
1489
1492
  const r = new URLSearchParams(t), n = new URLSearchParams(e.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
1490
1493
  return o.length - a.length;
1491
1494
  }
1492
- const Mn = [
1493
- jn,
1494
- $n,
1495
- qn,
1496
- je,
1497
- Bn
1495
+ const In = [
1496
+ _n,
1497
+ Mn,
1498
+ Wn,
1499
+ qe,
1500
+ Hn
1498
1501
  ];
1499
- function Wn(e, t) {
1500
- const r = _n(t);
1501
- return e.filter((n) => Mn.every((o) => o(n, t))).sort(r);
1502
+ function On(e, t) {
1503
+ const r = Dn(t);
1504
+ return e.filter((n) => In.every((o) => o(n, t))).sort(r);
1502
1505
  }
1503
- function Dn(e, t, r) {
1504
- const n = Wn(e, t);
1506
+ function Tn(e, t, r) {
1507
+ const n = On(e, t);
1505
1508
  if (!n.length)
1506
1509
  return;
1507
1510
  const [o] = n, { searchParams: a, hash: s } = _(t);
@@ -1510,207 +1513,210 @@ function Dn(e, t, r) {
1510
1513
  matched: o.matched,
1511
1514
  matches: o.matches,
1512
1515
  name: o.name,
1513
- query: Oe(a),
1514
- params: Ke(o, t),
1515
- state: Dt(o.state, r),
1516
+ query: Je(a),
1517
+ params: Xe(o, t),
1518
+ state: Tt(o.state, r),
1516
1519
  hash: s,
1517
- href: wt(t)
1520
+ href: bt(t)
1518
1521
  };
1519
1522
  }
1520
- function lt(e, t) {
1523
+ function dt(e, t) {
1521
1524
  const r = typeof e == "string" ? _(e) : e, n = typeof t == "string" ? _(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
1522
- return Jt({
1525
+ return Gt({
1523
1526
  protocol: F(n.protocol) ? n.protocol : r.protocol,
1524
1527
  host: F(n.host) ? n.host : r.host,
1525
1528
  pathname: F(n.pathname) ? n.pathname : r.pathname,
1526
- searchParams: Ge(a, o),
1529
+ searchParams: Ye(a, o),
1527
1530
  hash: F(n.hash) ? n.hash : r.hash
1528
1531
  });
1529
1532
  }
1530
- function lo(e, t) {
1531
- const r = xr(e) ? e.flat() : e, n = yn(r, t == null ? void 0 : t.base);
1532
- Pn(n);
1533
- const o = $t(), a = Gn(), s = En(), c = Xr({
1533
+ function mo(e, t) {
1534
+ const r = Br(e) ? e.flat() : e, n = wn(r, t == null ? void 0 : t.base);
1535
+ Sn(n);
1536
+ const o = Mt(), a = Xn(), s = kn(), c = rn({
1534
1537
  mode: t == null ? void 0 : t.historyMode,
1535
1538
  listener: ({ location: b }) => {
1536
- const L = X(b);
1537
- A(L, { state: b.state, replace: !0 });
1539
+ const U = X(b);
1540
+ k(U, { state: b.state, replace: !0 });
1538
1541
  }
1539
- }), { runBeforeRouteHooks: i, runAfterRouteHooks: u } = rn(), {
1542
+ }), { runBeforeRouteHooks: i, runAfterRouteHooks: u } = sn(), {
1540
1543
  hooks: f,
1541
- onBeforeRouteEnter: d,
1544
+ onBeforeRouteEnter: h,
1542
1545
  onAfterRouteUpdate: P,
1543
- onBeforeRouteLeave: p,
1544
- onAfterRouteEnter: h,
1546
+ onBeforeRouteLeave: d,
1547
+ onAfterRouteEnter: p,
1545
1548
  onBeforeRouteUpdate: v,
1546
1549
  onAfterRouteLeave: R
1547
- } = on();
1548
- function E(b, L = {}) {
1549
- return Dn(n, b, L);
1550
+ } = un();
1551
+ function E(b, U = {}) {
1552
+ return Tn(n, b, U.state);
1550
1553
  }
1551
- async function A(b, L = {}) {
1554
+ async function k(b, U = {}) {
1552
1555
  const Q = o();
1553
- if (c.stopListening(), tt(b)) {
1554
- c.update(b, L);
1556
+ if (c.stopListening(), nt(b)) {
1557
+ c.update(b, U);
1555
1558
  return;
1556
1559
  }
1557
- const W = E(b, L) ?? y("NotFound"), j = { ...k }, z = await i({ to: W, from: j, hooks: f });
1560
+ const W = E(b, U) ?? y("NotFound"), $ = { ...A }, z = await i({ to: W, from: $, hooks: f });
1558
1561
  switch (z.status) {
1559
1562
  // On abort do nothing
1560
1563
  case "ABORT":
1561
1564
  return;
1562
1565
  // On push update the history, and push new route, and return
1563
1566
  case "PUSH":
1564
- c.update(b, L), await w(...z.to);
1567
+ c.update(b, U), await w(...z.to);
1565
1568
  return;
1566
1569
  // On reject update the history, the route, and set the rejection type
1567
1570
  case "REJECT":
1568
- c.update(b, L), g(z.type);
1571
+ c.update(b, U), g(z.type);
1569
1572
  break;
1570
1573
  // On success update history, set the route, and clear the rejection
1571
1574
  case "SUCCESS":
1572
- c.update(b, L), g(null);
1575
+ c.update(b, U), g(null);
1573
1576
  break;
1574
1577
  default:
1575
1578
  throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(z)}`);
1576
1579
  }
1577
- const Ce = Q;
1578
- a.setProps(W).then((T) => {
1579
- if (Ce === Q)
1580
- switch (T.status) {
1580
+ const Be = Q;
1581
+ a.setProps(W).then((D) => {
1582
+ if (Be === Q)
1583
+ switch (D.status) {
1581
1584
  case "SUCCESS":
1582
1585
  break;
1583
1586
  case "PUSH":
1584
- w(...T.to);
1587
+ w(...D.to);
1585
1588
  break;
1586
1589
  case "REJECT":
1587
- g(T.type);
1590
+ g(D.type);
1588
1591
  break;
1589
1592
  default:
1590
- const Be = T;
1591
- throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(Be)}`);
1593
+ const Ne = D;
1594
+ throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(Ne)}`);
1592
1595
  }
1593
1596
  }), B(W);
1594
- const D = await u({ to: W, from: j, hooks: f });
1595
- switch (D.status) {
1597
+ const I = await u({ to: W, from: $, hooks: f });
1598
+ switch (I.status) {
1596
1599
  case "PUSH":
1597
- await w(...D.to);
1600
+ await w(...I.to);
1598
1601
  break;
1599
1602
  case "REJECT":
1600
- g(D.type);
1603
+ g(I.type);
1601
1604
  break;
1602
1605
  case "SUCCESS":
1603
1606
  break;
1604
1607
  default:
1605
- const T = D;
1606
- throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(T)}`);
1608
+ const D = I;
1609
+ throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(D)}`);
1607
1610
  }
1608
1611
  c.startListening();
1609
1612
  }
1610
- const m = (b, L = {}, Q = {}) => {
1611
- const W = n.find((j) => j.name === b);
1613
+ const m = (b, U = {}, Q = {}) => {
1614
+ const W = n.find(($) => $.name === b);
1612
1615
  if (!W)
1613
- throw new Sn(String(b));
1614
- return Hn(W, L, Q);
1615
- }, w = (b, L, Q) => {
1616
- if (O(b)) {
1617
- const D = { ...L }, T = lt(b, {
1618
- searchParams: D.query,
1619
- hash: D.hash
1616
+ throw new xn(String(b));
1617
+ return qn(W, U, Q);
1618
+ }, w = (b, U, Q) => {
1619
+ if (T(b)) {
1620
+ const I = { ...U }, D = dt(b, {
1621
+ searchParams: I.query,
1622
+ hash: I.hash
1620
1623
  });
1621
- return A(T, D);
1624
+ return k(D, I);
1622
1625
  }
1623
1626
  if (typeof b == "string") {
1624
- const D = { ...Q }, T = { ...L }, Be = m(b, T, D), { replace: ur, state: ir } = D;
1625
- return w(Be, { replace: ur, state: ir });
1627
+ const { replace: I, ...D } = { ...Q }, Ne = { ...U }, Ve = m(b, Ne, D), pr = lt({ ...Ve.matched.state }, { ...Ve.state, ...D.state });
1628
+ return k(Ve.href, { replace: I, state: pr });
1626
1629
  }
1627
- const { replace: W, ...j } = { ...L }, z = Rn({ ...b.matched.state }, { ...b.state, ...j.state }), Ce = lt(b.href, {
1628
- searchParams: j.query,
1629
- hash: j.hash
1630
+ const { replace: W, ...$ } = { ...U }, z = lt({ ...b.matched.state }, { ...b.state, ...$.state }), Be = dt(b.href, {
1631
+ searchParams: $.query,
1632
+ hash: $.hash
1630
1633
  });
1631
- return A(Ce, { replace: W, state: z });
1632
- }, x = (b, L, Q) => {
1633
- if (O(b)) {
1634
- const j = { ...L, replace: !0 };
1635
- return w(b, j);
1634
+ return k(Be, { replace: W, state: z });
1635
+ }, x = (b, U, Q) => {
1636
+ if (T(b)) {
1637
+ const $ = { ...U, replace: !0 };
1638
+ return w(b, $);
1636
1639
  }
1637
1640
  if (typeof b == "string") {
1638
- const j = { ...Q, replace: !0 }, z = { ...L };
1639
- return w(b, z, j);
1641
+ const $ = { ...Q, replace: !0 }, z = { ...U };
1642
+ return w(b, z, $);
1640
1643
  }
1641
- const W = { ...L, replace: !0 };
1644
+ const W = { ...U, replace: !0 };
1642
1645
  return w(b, W);
1643
- }, U = (b) => {
1646
+ }, L = (b) => {
1644
1647
  g(b);
1645
- }, { setRejection: g, rejection: l, getRejectionRoute: y } = sn(t ?? {}), S = y("NotFound"), { currentRoute: k, routerRoute: C, updateRoute: B } = zr(S, w);
1648
+ }, { setRejection: g, rejection: l, getRejectionRoute: y } = ln(t ?? {}), S = y("NotFound"), { currentRoute: A, routerRoute: C, updateRoute: B } = Xr(S, w);
1646
1649
  c.startListening();
1647
- const H = un(t == null ? void 0 : t.initialUrl), M = c.location.state, { host: et } = _(H), tt = Yr(et);
1648
- let rt = !1;
1649
- async function nt() {
1650
- rt || (await A(H, { replace: !0, state: M }), rt = !0);
1651
- }
1652
- function cr(b) {
1653
- b.component("RouterView", so), b.component("RouterLink", to), b.provide(Ct, l), b.provide(jt, f), b.provide(tr, a), b.provide(Tt, s), b.provide(Pt, ot), nt();
1654
- }
1655
- const ot = {
1650
+ const H = pn(t == null ? void 0 : t.initialUrl), M = c.location.state, { host: rt } = _(H), nt = tn(rt);
1651
+ let ot = !1;
1652
+ const { promise: fr, resolve: lr } = Promise.withResolvers();
1653
+ async function at() {
1654
+ if (ot)
1655
+ return fr;
1656
+ ot = !0, await k(H, { replace: !0, state: M }), lr();
1657
+ }
1658
+ function hr(b) {
1659
+ b.component("RouterView", io), b.component("RouterLink", oo), b.provide(Vt, l), b.provide(_t, f), b.provide(or, a), b.provide(Ft, s), b.provide(St, st), at();
1660
+ }
1661
+ const st = {
1656
1662
  route: C,
1657
1663
  resolve: m,
1658
1664
  find: E,
1659
1665
  push: w,
1660
1666
  replace: x,
1661
- reject: U,
1667
+ reject: L,
1662
1668
  refresh: c.refresh,
1663
1669
  forward: c.forward,
1664
1670
  back: c.back,
1665
1671
  go: c.go,
1666
- install: cr,
1667
- isExternal: tt,
1668
- onBeforeRouteEnter: d,
1672
+ install: hr,
1673
+ isExternal: nt,
1674
+ onBeforeRouteEnter: h,
1669
1675
  onAfterRouteUpdate: P,
1670
- onBeforeRouteLeave: p,
1671
- onAfterRouteEnter: h,
1676
+ onBeforeRouteLeave: d,
1677
+ onAfterRouteEnter: p,
1672
1678
  onBeforeRouteUpdate: v,
1673
1679
  onAfterRouteLeave: R,
1674
1680
  prefetch: t == null ? void 0 : t.prefetch,
1675
- start: nt
1681
+ start: at
1676
1682
  };
1677
- return ot;
1683
+ return st;
1678
1684
  }
1679
- function ht(e, t) {
1685
+ function mt(e, t) {
1680
1686
  return {
1681
1687
  value: e,
1682
- params: ze(e, t)
1688
+ params: Ke(e, t)
1683
1689
  };
1684
1690
  }
1685
- function Qt(e, t) {
1691
+ function Kt(e, t) {
1686
1692
  return {
1687
1693
  value: e,
1688
- params: ze(e, t)
1694
+ params: Ke(e, t)
1689
1695
  };
1690
1696
  }
1691
- function Tn(e) {
1692
- return de(e) && typeof e.hash == "string";
1697
+ function Fn(e) {
1698
+ return me(e) && typeof e.hash == "string";
1693
1699
  }
1694
- function zt(e) {
1695
- return e === void 0 ? ve() : Tn(e) ? e : ve(e);
1700
+ function Yt(e) {
1701
+ return e === void 0 ? ve() : Fn(e) ? e : ve(e);
1696
1702
  }
1697
- function Gt(e) {
1703
+ function Xt(e) {
1698
1704
  return e === void 0 ? "" : e;
1699
1705
  }
1700
- function In(e) {
1701
- return de(e) && typeof e.value == "string";
1706
+ function Jn(e) {
1707
+ return me(e) && typeof e.value == "string";
1702
1708
  }
1703
- function Kt(e) {
1704
- return e === void 0 ? He("", {}) : In(e) ? e : He(e, {});
1709
+ function Zt(e) {
1710
+ return e === void 0 ? $e("", {}) : Jn(e) ? e : $e(e, {});
1705
1711
  }
1706
- function On(e) {
1707
- return de(e) && typeof e.value == "string";
1712
+ function Qn(e) {
1713
+ return me(e) && typeof e.value == "string";
1708
1714
  }
1709
- function Yt(e) {
1710
- return e === void 0 ? ht("", {}) : On(e) ? e : ht(e, {});
1715
+ function er(e) {
1716
+ return e === void 0 ? mt("", {}) : Qn(e) ? e : mt(e, {});
1711
1717
  }
1712
1718
  function oe(e) {
1713
- const t = Fe(), r = Gt(e.name), n = Kt(e.path), o = Yt(e.query), a = zt(e.hash), s = e.meta ?? {}, c = $r(e) ? e.state : {}, i = ye({ id: t, meta: {}, state: {}, ...e }), u = {
1719
+ const t = Qe(), r = Xt(e.name), n = Zt(e.path), o = er(e.query), a = Yt(e.hash), s = e.meta ?? {}, c = Wr(e) ? e.state : {}, i = ge({ id: t, meta: {}, state: {}, ...e }), u = {
1714
1720
  id: t,
1715
1721
  matched: i,
1716
1722
  matches: [i],
@@ -1721,25 +1727,25 @@ function oe(e) {
1721
1727
  meta: s,
1722
1728
  state: c,
1723
1729
  depth: 1,
1724
- host: Qt("", {}),
1730
+ host: Kt("", {}),
1725
1731
  prefetch: e.prefetch
1726
- }, f = bt(e) ? St(e.parent, u) : u;
1732
+ }, f = At(e) ? xt(e.parent, u) : u;
1727
1733
  return ce(f.path.params, f.query.params), f;
1728
1734
  }
1729
- const Ae = { template: "<div>This is component</div>" }, Ye = oe({
1735
+ const Ae = { template: "<div>This is component</div>" }, Ze = oe({
1730
1736
  name: "parentA",
1731
1737
  path: "/parentA/[paramA]"
1732
- }), Xt = oe({
1733
- parent: Ye,
1738
+ }), tr = oe({
1739
+ parent: Ze,
1734
1740
  name: "parentA.childA",
1735
1741
  path: "/[?paramB]"
1736
- }), Fn = oe({
1737
- parent: Ye,
1742
+ }), zn = oe({
1743
+ parent: Ze,
1738
1744
  name: "parentA.childB",
1739
1745
  path: "/[paramD]",
1740
1746
  component: Ae
1741
- }), Jn = oe({
1742
- parent: Xt,
1747
+ }), Gn = oe({
1748
+ parent: tr,
1743
1749
  name: "parentA.childA.grandChildA",
1744
1750
  path: "/[paramC]",
1745
1751
  component: Ae
@@ -1753,99 +1759,99 @@ oe({
1753
1759
  path: "/",
1754
1760
  component: Ae
1755
1761
  });
1756
- const Qn = "lazy", zn = {
1762
+ const Kn = "lazy", Yn = {
1757
1763
  components: !0,
1758
1764
  props: !1
1759
1765
  };
1760
- function me(e) {
1761
- return ["eager", "lazy"].includes(e);
1766
+ function ye(e) {
1767
+ return ["eager", "lazy", "intent"].includes(e);
1762
1768
  }
1763
- function Zt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
1764
- const o = Ne(r, n), a = Ne(t, n), s = Ne(e, n), c = [
1769
+ function rr({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
1770
+ const o = He(r, n), a = He(t, n), s = He(e, n), c = [
1765
1771
  o,
1766
1772
  a,
1767
1773
  s,
1768
- zn[n],
1769
- Qn
1770
- ].reduce((i, u) => me(i) ? i : i === !0 && me(u) ? u : i === !0 && !me(u) ? i : i === void 0 ? u : i, void 0);
1771
- return me(c) ? c : !1;
1774
+ Yn[n],
1775
+ Kn
1776
+ ].reduce((i, u) => ye(i) ? i : i === !0 && ye(u) ? u : i === !0 && !ye(u) ? i : i === void 0 ? u : i, void 0);
1777
+ return ye(c) ? c : !1;
1772
1778
  }
1773
- function Ne(e, t) {
1774
- return de(e) ? e[t] : e;
1779
+ function He(e, t) {
1780
+ return me(e) ? e[t] : e;
1775
1781
  }
1776
- function er(e) {
1782
+ function nr(e) {
1777
1783
  return typeof e == "object" && e !== null && "then" in e;
1778
1784
  }
1779
- function pt(e) {
1785
+ function yt(e) {
1780
1786
  try {
1781
1787
  const t = e();
1782
- return er(t) ? t.catch((r) => r) : t;
1788
+ return nr(t) ? t.catch((r) => r) : t;
1783
1789
  } catch (t) {
1784
1790
  return t;
1785
1791
  }
1786
1792
  }
1787
- const tr = Symbol();
1788
- function Gn() {
1789
- const e = xe(/* @__PURE__ */ new Map()), { push: t, replace: r, reject: n } = Ht(), o = (d, P, p) => P.matches.filter((h) => Zt({ ...p, routePrefetch: h.prefetch }, "props") === d).flatMap((h) => u(h)).reduce((h, { id: v, name: R, props: E }) => {
1793
+ const or = Symbol();
1794
+ function Xn() {
1795
+ const e = xe(/* @__PURE__ */ new Map()), { push: t, replace: r, reject: n } = qt(), o = (h, P, d) => P.matches.filter((p) => rr({ ...d, routePrefetch: p.prefetch }, "props") === h).flatMap((p) => u(p)).reduce((p, { id: v, name: R, props: E }) => {
1790
1796
  if (!E)
1791
- return h;
1792
- const A = i(v, R, P), m = pt(() => E(P, {
1797
+ return p;
1798
+ const k = i(v, R, P), m = yt(() => E(P, {
1793
1799
  push: t,
1794
1800
  replace: r,
1795
1801
  reject: n
1796
1802
  }));
1797
- return h[A] = m, h;
1798
- }, {}), a = (d) => {
1799
- Object.entries(d).forEach(([P, p]) => {
1800
- e.set(P, p);
1803
+ return p[k] = m, p;
1804
+ }, {}), a = (h) => {
1805
+ Object.entries(h).forEach(([P, d]) => {
1806
+ e.set(P, d);
1801
1807
  });
1802
- }, s = async (d) => {
1803
- const P = d.matches.flatMap(u), p = [], h = [];
1808
+ }, s = async (h) => {
1809
+ const P = h.matches.flatMap(u), d = [], p = [];
1804
1810
  for (const { id: v, name: R, props: E } of P) {
1805
1811
  if (!E)
1806
1812
  continue;
1807
- const A = i(v, R, d);
1808
- if (p.push(A), !e.has(A)) {
1809
- const m = pt(() => E(d, {
1813
+ const k = i(v, R, h);
1814
+ if (d.push(k), !e.has(k)) {
1815
+ const m = yt(() => E(h, {
1810
1816
  push: t,
1811
1817
  replace: r,
1812
1818
  reject: n
1813
1819
  }));
1814
- e.set(A, m);
1820
+ e.set(k, m);
1815
1821
  }
1816
- h.push((async () => {
1817
- const m = await e.get(A);
1822
+ p.push((async () => {
1823
+ const m = await e.get(k);
1818
1824
  if (m instanceof Error)
1819
1825
  throw m;
1820
1826
  })());
1821
1827
  }
1822
- f(p);
1828
+ f(d);
1823
1829
  try {
1824
- return await Promise.all(h), { status: "SUCCESS" };
1830
+ return await Promise.all(p), { status: "SUCCESS" };
1825
1831
  } catch (v) {
1826
1832
  if (v instanceof te || v instanceof be)
1827
1833
  return v.response;
1828
1834
  throw v;
1829
1835
  }
1830
- }, c = (d, P, p) => {
1831
- const h = i(d, P, p);
1832
- return e.get(h);
1836
+ }, c = (h, P, d) => {
1837
+ const p = i(h, P, d);
1838
+ return e.get(p);
1833
1839
  };
1834
- function i(d, P, p) {
1835
- return [d, P, p.id, JSON.stringify(p.params)].join("-");
1840
+ function i(h, P, d) {
1841
+ return [h, P, d.id, JSON.stringify(d.params)].join("-");
1836
1842
  }
1837
- function u(d) {
1838
- return Me(d) ? Object.entries(d.props ?? {}).map(([P, p]) => ({ id: d.id, name: P, props: p })) : _e(d) ? [
1843
+ function u(h) {
1844
+ return De(h) ? Object.entries(h.props ?? {}).map(([P, d]) => ({ id: h.id, name: P, props: d })) : We(h) ? [
1839
1845
  {
1840
- id: d.id,
1846
+ id: h.id,
1841
1847
  name: "default",
1842
- props: d.props
1848
+ props: h.props
1843
1849
  }
1844
1850
  ] : [];
1845
1851
  }
1846
- function f(d) {
1852
+ function f(h) {
1847
1853
  for (const P in e.keys())
1848
- d.includes(P) || e.delete(P);
1854
+ h.includes(P) || e.delete(P);
1849
1855
  }
1850
1856
  return {
1851
1857
  getPrefetchProps: o,
@@ -1854,83 +1860,94 @@ function Gn() {
1854
1860
  setProps: s
1855
1861
  };
1856
1862
  }
1857
- function rr() {
1858
- const e = ae(tr);
1863
+ function ar() {
1864
+ const e = ae(or);
1859
1865
  if (!e)
1860
- throw new pe();
1866
+ throw new de();
1861
1867
  return e;
1862
1868
  }
1863
- const Kn = pr(() => new Promise((e) => {
1869
+ const Zn = gr(() => new Promise((e) => {
1864
1870
  e({ default: { template: "foo" } });
1865
1871
  }));
1866
- function dt(e) {
1867
- return e.name === Kn.name && "__asyncLoader" in e;
1872
+ function gt(e) {
1873
+ return e.name === Zn.name && "__asyncLoader" in e;
1874
+ }
1875
+ function vt(e, t, r) {
1876
+ ie(e, (n, o) => {
1877
+ n && n.addEventListener(t, r), o && o.removeEventListener(t, r);
1878
+ }, { immediate: !0 }), Le(() => {
1879
+ e.value && e.value.removeEventListener(t, r);
1880
+ });
1868
1881
  }
1869
- function Yn(e) {
1870
- const t = /* @__PURE__ */ new Map(), r = $e(), { getPrefetchProps: n, setPrefetchProps: o } = rr(), { isElementVisible: a } = bn(r), s = () => {
1871
- const i = Array.from(t.values()).reduce((u, f) => (Object.assign(u, f), u), {});
1872
- o(i);
1882
+ function eo(e) {
1883
+ const t = /* @__PURE__ */ new Map(), r = _e(), { getPrefetchProps: n, setPrefetchProps: o } = ar(), { isElementVisible: a } = An(r), s = () => {
1884
+ const u = Array.from(t.values()).reduce((f, h) => (Object.assign(f, h), f), {});
1885
+ o(u);
1873
1886
  };
1874
- ge(() => $(e), ({ route: i, ...u }) => {
1875
- t.clear(), i && c("eager", i, u);
1876
- }, { immediate: !0 }), ge(a, (i) => {
1877
- const { route: u, ...f } = $(e);
1878
- !u || !i || c("lazy", u, f);
1879
- }, { immediate: !0 });
1880
- function c(i, u, f) {
1881
- Xn(i, u, f), t.has(i) || t.set(i, n(i, u, f));
1887
+ ie(() => j(e), ({ route: u, ...f }) => {
1888
+ t.clear(), u && i("eager", u, f);
1889
+ }, { immediate: !0 }), ie(a, (u) => {
1890
+ const { route: f, ...h } = j(e);
1891
+ !f || !u || i("lazy", f, h);
1892
+ }, { immediate: !0 }), vt(r, "focusin", c), vt(r, "mouseover", c);
1893
+ function c() {
1894
+ const { route: u, ...f } = j(e);
1895
+ u && i("intent", u, f);
1896
+ }
1897
+ function i(u, f, h) {
1898
+ to(u, f, h), t.has(u) || t.set(u, n(u, f, h));
1882
1899
  }
1883
1900
  return {
1884
1901
  element: r,
1885
1902
  commit: s
1886
1903
  };
1887
1904
  }
1888
- function Xn(e, t, r) {
1905
+ function to(e, t, r) {
1889
1906
  t.matches.forEach((n) => {
1890
- Zt({
1907
+ rr({
1891
1908
  ...r,
1892
1909
  routePrefetch: n.prefetch
1893
- }, "components") === e && (_e(n) && dt(n.component) && n.component.__asyncLoader(), Me(n) && Object.values(n.components).forEach((a) => {
1894
- dt(a) && a.__asyncLoader();
1910
+ }, "components") === e && (We(n) && gt(n.component) && n.component.__asyncLoader(), De(n) && Object.values(n.components).forEach((a) => {
1911
+ gt(a) && a.__asyncLoader();
1895
1912
  }));
1896
1913
  });
1897
1914
  }
1898
- function nr(e, t, { exact: r } = {}) {
1899
- return Jr(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
1915
+ function sr(e, t, { exact: r } = {}) {
1916
+ return Kr(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
1900
1917
  }
1901
- function Zn(e, t = {}, r = {}) {
1902
- const n = qe(), o = N(() => {
1903
- const h = $(e);
1904
- return typeof h != "string" ? h : O(h) ? n.find(h, $(r)) : n.resolve(h, $(t), $(r));
1918
+ function ro(e, t = {}, r = {}) {
1919
+ const n = Me(), o = N(() => {
1920
+ const p = j(e);
1921
+ return typeof p != "string" ? p : T(p) ? n.find(p, j(r)) : n.resolve(p, j(t), j(r));
1905
1922
  }), a = N(() => {
1906
1923
  if (o.value)
1907
1924
  return o.value.href;
1908
- const h = $(e);
1909
- if (O(h))
1910
- return h;
1925
+ const p = j(e);
1926
+ if (T(p))
1927
+ return p;
1911
1928
  console.error(new Error("Failed to resolve route in RouterLink."));
1912
- }), s = N(() => nr(n.route) && n.route.matches.some((h) => {
1929
+ }), s = N(() => sr(n.route) && n.route.matches.some((p) => {
1913
1930
  var v;
1914
- return h.id === ((v = o.value) == null ? void 0 : v.id);
1931
+ return p.id === ((v = o.value) == null ? void 0 : v.id);
1915
1932
  })), c = N(() => {
1916
- var h;
1917
- return n.route.id === ((h = o.value) == null ? void 0 : h.id);
1933
+ var p;
1934
+ return n.route.id === ((p = o.value) == null ? void 0 : p.id);
1918
1935
  }), i = N(() => !!a.value && n.isExternal(a.value)), u = N(() => {
1919
- const h = $(e);
1920
- return typeof h != "string" || O(h) ? $(t) : $(r);
1921
- }), { element: f, commit: d } = Yn(() => ({
1936
+ const p = j(e);
1937
+ return typeof p != "string" || T(p) ? j(t) : j(r);
1938
+ }), { element: f, commit: h } = eo(() => ({
1922
1939
  route: o.value,
1923
1940
  routerPrefetch: n.prefetch,
1924
1941
  linkPrefetch: u.value.prefetch
1925
- })), P = (h) => {
1926
- d();
1942
+ })), P = (p) => {
1943
+ h();
1927
1944
  const v = {
1928
- replace: (h == null ? void 0 : h.replace) ?? u.value.replace,
1929
- query: Ge(u.value.query, h == null ? void 0 : h.query),
1930
- hash: (h == null ? void 0 : h.hash) ?? u.value.hash,
1931
- state: { ...u.value.state, ...h == null ? void 0 : h.state }
1932
- }, R = $(e);
1933
- return O(R) || typeof R == "object" ? n.push(R, v) : n.push(R, $(t), v);
1945
+ replace: (p == null ? void 0 : p.replace) ?? u.value.replace,
1946
+ query: Ye(u.value.query, p == null ? void 0 : p.query),
1947
+ hash: (p == null ? void 0 : p.hash) ?? u.value.hash,
1948
+ state: { ...u.value.state, ...p == null ? void 0 : p.state }
1949
+ }, R = j(e);
1950
+ return T(R) || typeof R == "object" ? n.push(R, v) : n.push(R, j(t), v);
1934
1951
  };
1935
1952
  return {
1936
1953
  element: f,
@@ -1940,10 +1957,10 @@ function Zn(e, t = {}, r = {}) {
1940
1957
  isExactMatch: c,
1941
1958
  isExternal: i,
1942
1959
  push: P,
1943
- replace: (h) => P({ ...h, replace: !0 })
1960
+ replace: (p) => P({ ...p, replace: !0 })
1944
1961
  };
1945
1962
  }
1946
- const eo = ["href"], to = /* @__PURE__ */ se({
1963
+ const no = ["href"], oo = /* @__PURE__ */ se({
1947
1964
  __name: "routerLink",
1948
1965
  props: {
1949
1966
  to: {},
@@ -1954,10 +1971,10 @@ const eo = ["href"], to = /* @__PURE__ */ se({
1954
1971
  state: {}
1955
1972
  },
1956
1973
  setup(e) {
1957
- const t = e, r = qe(), n = N(() => P(t.to)), o = N(() => p(t.to)), a = N(() => {
1974
+ const t = e, r = Me(), n = N(() => P(t.to)), o = N(() => d(t.to)), a = N(() => {
1958
1975
  const { to: v, ...R } = t;
1959
1976
  return R;
1960
- }), { element: s, isMatch: c, isExactMatch: i, isExternal: u, push: f } = Zn(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), d = N(() => ({
1977
+ }), { element: s, isMatch: c, isExactMatch: i, isExternal: u, push: f } = ro(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), h = N(() => ({
1961
1978
  "router-link--match": c.value,
1962
1979
  "router-link--exact-match": i.value
1963
1980
  }));
@@ -1966,64 +1983,64 @@ const eo = ["href"], to = /* @__PURE__ */ se({
1966
1983
  const R = v(r.resolve);
1967
1984
  return P(R);
1968
1985
  }
1969
- return O(v) ? r.find(v) : v;
1986
+ return T(v) ? r.find(v) : v;
1970
1987
  }
1971
- function p(v) {
1988
+ function d(v) {
1972
1989
  if (typeof v == "function") {
1973
1990
  const R = v(r.resolve);
1974
- return p(R);
1991
+ return d(R);
1975
1992
  }
1976
- return O(v) ? v : v == null ? void 0 : v.href;
1993
+ return T(v) ? v : v == null ? void 0 : v.href;
1977
1994
  }
1978
- function h(v) {
1995
+ function p(v) {
1979
1996
  v.preventDefault(), f();
1980
1997
  }
1981
- return (v, R) => (yt(), dr("a", {
1998
+ return (v, R) => (wt(), vr("a", {
1982
1999
  ref_key: "element",
1983
2000
  ref: s,
1984
2001
  href: o.value,
1985
- class: mr(["router-link", d.value]),
1986
- onClick: h
2002
+ class: Rr(["router-link", h.value]),
2003
+ onClick: p
1987
2004
  }, [
1988
- gt(v.$slots, "default", vt(yr({ route: n.value, isMatch: ue(c), isExactMatch: ue(i), isExternal: ue(u) })))
1989
- ], 10, eo));
2005
+ Pt(v.$slots, "default", Et(wr({ route: n.value, isMatch: ue(c), isExactMatch: ue(i), isExternal: ue(u) })))
2006
+ ], 10, no));
1990
2007
  }
1991
2008
  });
1992
- function ro(e, t) {
1993
- const r = qe();
2009
+ function ao(e, t) {
2010
+ const r = Me();
1994
2011
  function n() {
1995
2012
  if (!e)
1996
2013
  return;
1997
- if (!nr(r.route, e, t))
1998
- throw new Ar(e, r.route.name);
2014
+ if (!sr(r.route, e, t))
2015
+ throw new Cr(e, r.route.name);
1999
2016
  }
2000
- return ge(r.route, n, { immediate: !0, deep: !0 }), r.route;
2017
+ return ie(r.route, n, { immediate: !0, deep: !0 }), r.route;
2001
2018
  }
2002
- const or = Symbol();
2003
- function Xe() {
2004
- return ae(or, 0);
2019
+ const cr = Symbol();
2020
+ function et() {
2021
+ return ae(cr, 0);
2005
2022
  }
2006
- function no(e, t) {
2023
+ function so(e, t) {
2007
2024
  return se({
2008
2025
  name: "PropsWrapper",
2009
2026
  expose: [],
2010
2027
  setup() {
2011
- const r = t(), n = gr();
2012
- return () => r instanceof Error ? "" : er(r) ? n != null && n.suspense ? Z(ao(e, r)) : Z(oo(e, r)) : Z(e, r);
2028
+ const r = t(), n = Pr();
2029
+ return () => r instanceof Error ? "" : nr(r) ? n != null && n.suspense ? Z(uo(e, r)) : Z(co(e, r)) : Z(e, r);
2013
2030
  }
2014
2031
  });
2015
2032
  }
2016
- function oo(e, t) {
2033
+ function co(e, t) {
2017
2034
  return se({
2018
2035
  name: "AsyncPropsWrapper",
2019
2036
  expose: [],
2020
2037
  setup() {
2021
- const r = $e();
2038
+ const r = _e();
2022
2039
  return (async () => r.value = await t)(), () => r.value instanceof Error ? "" : r.value ? Z(e, r.value) : "";
2023
2040
  }
2024
2041
  });
2025
2042
  }
2026
- function ao(e, t) {
2043
+ function uo(e, t) {
2027
2044
  return se({
2028
2045
  name: "SuspenseAsyncPropsWrapper",
2029
2046
  expose: [],
@@ -2033,61 +2050,61 @@ function ao(e, t) {
2033
2050
  }
2034
2051
  });
2035
2052
  }
2036
- const so = /* @__PURE__ */ se({
2053
+ const io = /* @__PURE__ */ se({
2037
2054
  __name: "routerView",
2038
2055
  props: {
2039
2056
  name: { default: "default" }
2040
2057
  },
2041
2058
  setup(e) {
2042
- const t = ro(), r = Fr(), n = Xe(), { getProps: o } = rr(), a = vr("RouterView", !0);
2043
- Rr(or, n + 1);
2059
+ const t = ao(), r = Gr(), n = et(), { getProps: o } = ar(), a = Er("RouterView", !0);
2060
+ br(cr, n + 1);
2044
2061
  const s = N(() => {
2045
2062
  if (r.value)
2046
2063
  return r.value.component;
2047
2064
  const u = t.matches.at(n);
2048
2065
  if (!u)
2049
2066
  return null;
2050
- const f = c(u), d = o(u.id, e.name, t);
2051
- return f ? d ? no(f, () => d) : f : null;
2067
+ const f = c(u), h = o(u.id, e.name, t);
2068
+ return f ? h ? so(f, () => h) : f : null;
2052
2069
  });
2053
2070
  function c(u) {
2054
2071
  return i(u)[e.name];
2055
2072
  }
2056
2073
  function i(u) {
2057
- return Me(u) ? u.components : _e(u) ? { default: u.component } : typeof a == "string" ? {} : { default: a };
2074
+ return De(u) ? u.components : We(u) ? { default: u.component } : typeof a == "string" ? {} : { default: a };
2058
2075
  }
2059
- return (u, f) => s.value ? gt(u.$slots, "default", vt(wr({ key: 0 }, { route: ue(t), component: s.value, rejection: ue(r) })), () => [
2060
- (yt(), Pr(Er(s.value)))
2061
- ]) : br("", !0);
2076
+ return (u, f) => s.value ? Pt(u.$slots, "default", Et(Sr({ key: 0 }, { route: ue(t), component: s.value, rejection: ue(r) })), () => [
2077
+ (wt(), kr(Ar(s.value)))
2078
+ ]) : xr("", !0);
2062
2079
  }
2063
2080
  });
2064
- function ar() {
2065
- const e = ae(jt);
2081
+ function ur() {
2082
+ const e = ae(_t);
2066
2083
  if (!e)
2067
- throw new pe();
2084
+ throw new de();
2068
2085
  return e;
2069
2086
  }
2070
- function sr(e) {
2087
+ function ir(e) {
2071
2088
  return (t) => {
2072
- const r = Xe(), o = ar().addBeforeRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
2073
- return Rt(o), o;
2089
+ const r = et(), o = ur().addBeforeRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
2090
+ return Le(o), o;
2074
2091
  };
2075
2092
  }
2076
- function Ze(e) {
2093
+ function tt(e) {
2077
2094
  return (t) => {
2078
- const r = Xe(), o = ar().addAfterRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
2079
- return Rt(o), o;
2095
+ const r = et(), o = ur().addAfterRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
2096
+ return Le(o), o;
2080
2097
  };
2081
2098
  }
2082
- const ho = sr("onBeforeRouteUpdate"), po = sr("onBeforeRouteLeave"), mo = Ze("onAfterRouteEnter"), yo = Ze("onAfterRouteUpdate"), go = Ze("onAfterRouteLeave");
2083
- function co(e) {
2084
- return de(e) && typeof e.value == "string";
2099
+ const yo = ir("onBeforeRouteUpdate"), go = ir("onBeforeRouteLeave"), vo = tt("onAfterRouteEnter"), Ro = tt("onAfterRouteUpdate"), wo = tt("onAfterRouteLeave");
2100
+ function fo(e) {
2101
+ return me(e) && typeof e.value == "string";
2085
2102
  }
2086
- function mt(e) {
2087
- return co(e) ? e : Qt(e, {});
2103
+ function Rt(e) {
2104
+ return fo(e) ? e : Kt(e, {});
2088
2105
  }
2089
- function vo(e) {
2090
- const t = Fe(), r = Gt(e.name), n = Kt(e.path), o = Yt(e.query), a = zt(e.hash), s = e.meta ?? {}, c = jr(e) ? mt(e.host) : mt(""), i = ye({ id: t, meta: {}, state: {}, ...e }), u = {
2106
+ function Po(e) {
2107
+ const t = Qe(), r = Xt(e.name), n = Zt(e.path), o = er(e.query), a = Yt(e.hash), s = e.meta ?? {}, c = Mr(e) ? Rt(e.host) : Rt(""), i = ge({ id: t, meta: {}, state: {}, ...e }), u = {
2091
2108
  id: t,
2092
2109
  matched: i,
2093
2110
  matches: [i],
@@ -2099,32 +2116,32 @@ function vo(e) {
2099
2116
  meta: s,
2100
2117
  depth: 1,
2101
2118
  state: {}
2102
- }, f = bt(e) ? St(e.parent, u) : u;
2119
+ }, f = At(e) ? xt(e.parent, u) : u;
2103
2120
  return ce(f.path.params, f.query.params, f.host.params), f;
2104
2121
  }
2105
2122
  export {
2106
- Sr as DuplicateParamsError,
2107
- kr as MetaPropertyConflict,
2108
- to as RouterLink,
2109
- pe as RouterNotInstalledError,
2110
- so as RouterView,
2111
- Ar as UseRouteInvalidError,
2112
- wt as asUrl,
2113
- vo as createExternalRoute,
2114
- Tr as createParam,
2123
+ Lr as DuplicateParamsError,
2124
+ Ur as MetaPropertyConflict,
2125
+ oo as RouterLink,
2126
+ de as RouterNotInstalledError,
2127
+ io as RouterView,
2128
+ Cr as UseRouteInvalidError,
2129
+ bt as asUrl,
2130
+ Po as createExternalRoute,
2131
+ Jr as createParam,
2115
2132
  oe as createRoute,
2116
- lo as createRouter,
2117
- nr as isRoute,
2118
- O as isUrl,
2119
- mo as onAfterRouteEnter,
2120
- yo as onAfterRouteLeave,
2121
- go as onAfterRouteUpdate,
2122
- ho as onBeforeRouteLeave,
2123
- po as onBeforeRouteUpdate,
2124
- He as path,
2125
- ht as query,
2126
- Zn as useLink,
2127
- ro as useRoute,
2128
- qe as useRouter,
2129
- fo as withDefault
2133
+ mo as createRouter,
2134
+ sr as isRoute,
2135
+ T as isUrl,
2136
+ vo as onAfterRouteEnter,
2137
+ Ro as onAfterRouteLeave,
2138
+ wo as onAfterRouteUpdate,
2139
+ yo as onBeforeRouteLeave,
2140
+ go as onBeforeRouteUpdate,
2141
+ $e as path,
2142
+ mt as query,
2143
+ ro as useLink,
2144
+ ao as useRoute,
2145
+ Me as useRouter,
2146
+ po as withDefault
2130
2147
  };