@kitbag/router 0.15.3 → 0.16.1

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