@kitbag/router 0.18.1 → 0.19.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 Ar = Object.defineProperty;
2
- var kr = (e, t, r) => t in e ? Ar(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var M = (e, t, r) => kr(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { inject as ce, markRaw as xe, reactive as $e, defineAsyncComponent as xr, watch as ne, onUnmounted as _e, computed as Z, ref as He, toValue as $, toRefs as Lr, defineComponent as ge, createElementBlock as Ur, openBlock as xt, normalizeClass as Br, renderSlot as Lt, normalizeProps as Ut, guardReactiveProps as Cr, unref as ve, h as le, getCurrentInstance as Nr, provide as Vr, createCommentVNode as Zr, mergeProps as jr, createBlock as $r, resolveDynamicComponent as _r } from "vue";
5
- function T(e) {
1
+ var Sr = Object.defineProperty;
2
+ var Ar = (e, t, r) => t in e ? Sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var T = (e, t, r) => Ar(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { inject as ae, markRaw as Ae, reactive as Ve, defineAsyncComponent as kr, watch as te, onUnmounted as Ze, computed as Z, ref as je, toValue as $, toRefs as xr, defineComponent as me, createElementBlock as Ur, openBlock as kt, normalizeClass as Lr, renderSlot as xt, normalizeProps as Ut, guardReactiveProps as Br, unref as Re, h as ue, getCurrentInstance as Cr, provide as Nr, createCommentVNode as Vr, mergeProps as Zr, createBlock as jr, resolveDynamicComponent as Or } from "vue";
5
+ function M(e) {
6
6
  return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
7
7
  }
8
- function Bt(e) {
9
- return T(e) ? e : `/${e}`;
8
+ function Lt(e) {
9
+ return M(e) ? e : `/${e}`;
10
10
  }
11
- class Hr extends Error {
11
+ class $r 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 Hr 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 Or extends Error {
20
+ class Hr 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 Re extends Error {
25
+ class ye extends Error {
26
26
  constructor() {
27
27
  super("Router not installed");
28
28
  }
29
29
  }
30
- class qr extends Error {
30
+ class _r 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,64 +38,61 @@ class qr extends Error {
38
38
  super(`useRoute called with incorrect route. Given ${t}, expected ${r}`);
39
39
  }
40
40
  }
41
- const Ct = Symbol();
42
- function ze() {
43
- const e = ce(Ct);
41
+ const Bt = Symbol();
42
+ function Ge() {
43
+ const e = ae(Bt);
44
44
  if (!e)
45
- throw new Re();
45
+ throw new ye();
46
46
  return e;
47
47
  }
48
- function he(e) {
48
+ function fe(e) {
49
49
  return Array.isArray(e) ? e : [e];
50
50
  }
51
- function Nt(e, t) {
51
+ function Ct(e, t) {
52
52
  return e.filter((r) => t === r).length;
53
53
  }
54
- function we(...e) {
55
- const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(Ir));
54
+ function ge(...e) {
55
+ const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r));
56
56
  for (const r of t)
57
- if (Nt(t, r) > 1)
58
- throw new Hr(r);
59
- }
60
- function Ir(e) {
61
- return e.startsWith("?") ? e.slice(1) : e;
57
+ if (Ct(t, r) > 1)
58
+ throw new $r(r);
62
59
  }
63
60
  class G extends Error {
64
61
  }
65
- const z = "[", X = "]";
66
- function Dr(e) {
62
+ const ve = "[", Oe = "]";
63
+ function qr(e) {
67
64
  return e !== String && e !== Boolean && e !== Number && e !== Date;
68
65
  }
69
- function Fr(e) {
70
- return typeof e == "function" && Dr(e);
66
+ function Ir(e) {
67
+ return typeof e == "function" && qr(e);
71
68
  }
72
- function Oe(e) {
69
+ function $e(e) {
73
70
  return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
74
71
  }
75
- function Vt(e) {
72
+ function Nt(e) {
76
73
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
77
74
  }
78
- function Mr(e, t) {
79
- return Oe(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
80
- get: (r) => oe(r, e),
81
- set: (r) => ae(r, e),
75
+ function Dr(e, t) {
76
+ return $e(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
77
+ get: (r) => re(r, e),
78
+ set: (r) => ne(r, e),
82
79
  defaultValue: t
83
80
  };
84
81
  }
85
- function Tr(e) {
86
- return Oe(e) && e.defaultValue !== void 0;
82
+ function Fr(e) {
83
+ return $e(e) && e.defaultValue !== void 0;
87
84
  }
88
- function Lo(e, t) {
89
- return Mr(e, t);
85
+ function ko(e, t) {
86
+ return Dr(e, t);
90
87
  }
91
- function Zt(e) {
88
+ function Vt(e) {
92
89
  return typeof e == "object" && e !== null && !Array.isArray(e);
93
90
  }
94
91
  function J(e) {
95
92
  return typeof e == "string" && e.length > 0;
96
93
  }
97
94
  let v = null;
98
- async function Jr() {
95
+ async function Tr() {
99
96
  const {
100
97
  ZodSchema: e,
101
98
  ZodString: t,
@@ -104,18 +101,18 @@ async function Jr() {
104
101
  ZodNumber: o,
105
102
  ZodLiteral: a,
106
103
  ZodObject: s,
107
- ZodEnum: f,
104
+ ZodEnum: l,
108
105
  ZodNativeEnum: p,
109
- ZodArray: l,
110
- ZodTuple: h,
106
+ ZodArray: c,
107
+ ZodTuple: y,
111
108
  ZodUnion: b,
112
- ZodDiscriminatedUnion: x,
113
- ZodRecord: k,
114
- ZodMap: g,
115
- ZodSet: d,
116
- ZodIntersection: c,
117
- ZodPromise: u,
118
- ZodFunction: P
109
+ ZodDiscriminatedUnion: L,
110
+ ZodRecord: S,
111
+ ZodMap: w,
112
+ ZodSet: m,
113
+ ZodIntersection: h,
114
+ ZodPromise: R,
115
+ ZodFunction: f
119
116
  } = await import("zod");
120
117
  return {
121
118
  ZodSchema: e,
@@ -125,63 +122,63 @@ async function Jr() {
125
122
  ZodNumber: o,
126
123
  ZodLiteral: a,
127
124
  ZodObject: s,
128
- ZodEnum: f,
125
+ ZodEnum: l,
129
126
  ZodNativeEnum: p,
130
- ZodArray: l,
131
- ZodTuple: h,
127
+ ZodArray: c,
128
+ ZodTuple: y,
132
129
  ZodUnion: b,
133
- ZodDiscriminatedUnion: x,
134
- ZodRecord: k,
135
- ZodMap: g,
136
- ZodSet: d,
137
- ZodIntersection: c,
138
- ZodPromise: u,
139
- ZodFunction: P
130
+ ZodDiscriminatedUnion: L,
131
+ ZodRecord: S,
132
+ ZodMap: w,
133
+ ZodSet: m,
134
+ ZodIntersection: h,
135
+ ZodPromise: R,
136
+ ZodFunction: f
140
137
  };
141
138
  }
142
- function Wr(e) {
143
- return Object.values(e).some((t) => Object.values(t.host.params).some((r) => Fe(r)) || Object.values(t.path.params).some((r) => Fe(r)) || Object.values(t.query.params).some((r) => Fe(r)));
139
+ function Mr(e) {
140
+ return Object.values(e).some((t) => Object.values(t.host.params).some((r) => De(r)) || Object.values(t.path.params).some((r) => De(r)) || Object.values(t.query.params).some((r) => De(r)));
144
141
  }
145
- function Fe(e) {
142
+ function De(e) {
146
143
  return typeof e == "object" && "parse" in e && typeof e.parse == "function";
147
144
  }
148
- async function Gr() {
145
+ async function Jr() {
149
146
  try {
150
- v = await Jr();
147
+ v = await Tr();
151
148
  } catch {
152
149
  throw new Error("Failed to initialize Zod");
153
150
  }
154
151
  }
155
- function jt(e) {
152
+ function Zt(e) {
156
153
  return v ? e instanceof v.ZodSchema : !1;
157
154
  }
158
- function $t(e) {
155
+ function jt(e) {
159
156
  return {
160
157
  get: (t, { invalid: r }) => {
161
158
  try {
162
- return Je(t, e);
159
+ return Me(t, e);
163
160
  } catch {
164
161
  throw r();
165
162
  }
166
163
  },
167
164
  set: (t, { invalid: r }) => {
168
165
  try {
169
- return We(t, e);
166
+ return Je(t, e);
170
167
  } catch {
171
168
  throw r();
172
169
  }
173
170
  }
174
171
  };
175
172
  }
176
- const Qr = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
177
- function ie(e, t) {
178
- if (typeof t == "string" && Qr.test(t)) {
173
+ const Wr = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
174
+ function se(e, t) {
175
+ if (typeof t == "string" && Wr.test(t)) {
179
176
  const r = new Date(t);
180
177
  return isNaN(r.getTime()) ? t : r;
181
178
  }
182
179
  return t;
183
180
  }
184
- function fe(e) {
181
+ function ie(e) {
185
182
  for (const t of e)
186
183
  try {
187
184
  return t();
@@ -190,10 +187,10 @@ function fe(e) {
190
187
  }
191
188
  throw new Error("All functions failed");
192
189
  }
193
- function Le(e, t) {
190
+ function ke(e, t) {
194
191
  return v != null && v.ZodString && e instanceof v.ZodString ? 1 : v != null && v.ZodString && t instanceof v.ZodString ? -1 : 0;
195
192
  }
196
- function Je(e, t) {
193
+ function Me(e, t) {
197
194
  if (!v)
198
195
  throw new Error("Zod is not initialized");
199
196
  if (t instanceof v.ZodString)
@@ -205,36 +202,36 @@ function Je(e, t) {
205
202
  if (t instanceof v.ZodNumber)
206
203
  return t.parse(Number(e));
207
204
  if (t instanceof v.ZodLiteral)
208
- return fe([
205
+ return ie([
209
206
  () => t.parse(Number(e)),
210
207
  () => t.parse(!!e),
211
208
  () => t.parse(e)
212
209
  ]);
213
210
  if (t instanceof v.ZodObject)
214
- return t.parse(JSON.parse(e, ie));
211
+ return t.parse(JSON.parse(e, se));
215
212
  if (t instanceof v.ZodEnum)
216
213
  return t.parse(e);
217
214
  if (t instanceof v.ZodNativeEnum)
218
- return fe([
215
+ return ie([
219
216
  () => t.parse(Number(e)),
220
217
  () => t.parse(e)
221
218
  ]);
222
219
  if (t instanceof v.ZodArray || t instanceof v.ZodTuple)
223
- return t.parse(JSON.parse(e, ie));
220
+ return t.parse(JSON.parse(e, se));
224
221
  if (t instanceof v.ZodUnion) {
225
- const r = Array.from(t._def.options).sort(Le).map((n) => () => Je(e, n));
226
- return fe(r);
222
+ const r = Array.from(t._def.options).sort(ke).map((n) => () => Me(e, n));
223
+ return ie(r);
227
224
  }
228
225
  if (t instanceof v.ZodDiscriminatedUnion) {
229
- const r = Array.from(t.options).sort(Le).map((n) => () => Je(e, n));
230
- return fe(r);
226
+ const r = Array.from(t.options).sort(ke).map((n) => () => Me(e, n));
227
+ return ie(r);
231
228
  }
232
229
  if (t instanceof v.ZodRecord)
233
- return t.parse(JSON.parse(e, ie));
230
+ return t.parse(JSON.parse(e, se));
234
231
  if (t instanceof v.ZodMap)
235
- return t.parse(new Map(JSON.parse(e, ie)));
232
+ return t.parse(new Map(JSON.parse(e, se)));
236
233
  if (t instanceof v.ZodSet)
237
- return t.parse(new Set(JSON.parse(e, ie)));
234
+ return t.parse(new Set(JSON.parse(e, se)));
238
235
  if (t instanceof v.ZodIntersection)
239
236
  throw new Error("Intersection schemas are not supported");
240
237
  if (t instanceof v.ZodPromise)
@@ -243,7 +240,7 @@ function Je(e, t) {
243
240
  throw new Error("Function schemas are not supported");
244
241
  return t.parse(e);
245
242
  }
246
- function We(e, t) {
243
+ function Je(e, t) {
247
244
  if (!v)
248
245
  throw new Error("Zod is not initialized");
249
246
  if (t instanceof v.ZodString)
@@ -265,12 +262,12 @@ function We(e, t) {
265
262
  if (t instanceof v.ZodArray || t instanceof v.ZodTuple)
266
263
  return JSON.stringify(t.parse(e));
267
264
  if (t instanceof v.ZodUnion) {
268
- const r = Array.from(t._def.options).sort(Le).map((n) => () => We(e, n));
269
- return fe(r);
265
+ const r = Array.from(t._def.options).sort(ke).map((n) => () => Je(e, n));
266
+ return ie(r);
270
267
  }
271
268
  if (t instanceof v.ZodDiscriminatedUnion) {
272
- const r = Array.from(t.options).sort(Le).map((n) => () => We(e, n));
273
- return fe(r);
269
+ const r = Array.from(t.options).sort(ke).map((n) => () => Je(e, n));
270
+ return ie(r);
274
271
  }
275
272
  if (t instanceof v.ZodRecord)
276
273
  return JSON.stringify(t.parse(e));
@@ -290,21 +287,21 @@ function We(e, t) {
290
287
  throw new Error("Function schemas are not supported");
291
288
  return JSON.stringify(t.parse(e));
292
289
  }
293
- function zr(e, t) {
294
- return e[t] ?? e[`?${t}`] ?? String;
290
+ function Gr(e, t) {
291
+ return e[t] ?? String;
295
292
  }
296
293
  const N = {
297
294
  invalid: (e) => {
298
295
  throw new G(e);
299
296
  }
300
- }, _t = {
297
+ }, Ot = {
301
298
  get: (e) => e,
302
299
  set: (e, { invalid: t }) => {
303
300
  if (typeof e != "string")
304
301
  throw t();
305
302
  return e;
306
303
  }
307
- }, Ke = {
304
+ }, ze = {
308
305
  get: (e, { invalid: t }) => {
309
306
  if (e === "true")
310
307
  return !0;
@@ -317,7 +314,7 @@ const N = {
317
314
  throw t();
318
315
  return e.toString();
319
316
  }
320
- }, Ye = {
317
+ }, Qe = {
321
318
  get: (e, { invalid: t }) => {
322
319
  const r = Number(e);
323
320
  if (isNaN(r))
@@ -329,7 +326,7 @@ const N = {
329
326
  throw t();
330
327
  return e.toString();
331
328
  }
332
- }, Ht = {
329
+ }, $t = {
333
330
  get: (e, { invalid: t }) => {
334
331
  const r = new Date(e);
335
332
  if (isNaN(r.getTime()))
@@ -341,7 +338,7 @@ const N = {
341
338
  throw t();
342
339
  return e.toISOString();
343
340
  }
344
- }, Ot = {
341
+ }, Ht = {
345
342
  get: (e, { invalid: t }) => {
346
343
  try {
347
344
  return JSON.parse(e);
@@ -357,232 +354,233 @@ const N = {
357
354
  }
358
355
  }
359
356
  };
360
- function Kr(e, t) {
357
+ function zr(e, t) {
361
358
  switch (typeof t) {
362
359
  case "string":
363
- return _t.get(e, N) === t;
360
+ return Ot.get(e, N) === t;
364
361
  case "number":
365
- return Ye.get(e, N) === t;
362
+ return Qe.get(e, N) === t;
366
363
  case "boolean":
367
- return Ke.get(e, N) === t;
364
+ return ze.get(e, N) === t;
368
365
  default:
369
366
  return !1;
370
367
  }
371
368
  }
372
- function oe(e, t, r = !1) {
369
+ function re(e, t, r = !1) {
373
370
  if (e === void 0 || !J(e)) {
374
- if (Tr(t))
371
+ if (Fr(t))
375
372
  return t.defaultValue;
376
373
  if (r)
377
374
  return;
378
375
  throw new G();
379
376
  }
380
377
  if (t === String)
381
- return _t.get(e, N);
378
+ return Ot.get(e, N);
382
379
  if (t === Boolean)
383
- return Ke.get(e, N);
380
+ return ze.get(e, N);
384
381
  if (t === Number)
385
- return Ye.get(e, N);
382
+ return Qe.get(e, N);
386
383
  if (t === Date)
387
- return Ht.get(e, N);
384
+ return $t.get(e, N);
388
385
  if (t === JSON)
389
- return Ot.get(e, N);
390
- if (Fr(t))
386
+ return Ht.get(e, N);
387
+ if (Ir(t))
391
388
  return t(e, N);
392
- if (Oe(t))
389
+ if ($e(t))
393
390
  return t.get(e, N);
394
391
  if (t instanceof RegExp) {
395
392
  if (t.test(e))
396
393
  return e;
397
394
  throw new G();
398
395
  }
399
- if (Vt(t)) {
400
- if (Kr(e, t))
396
+ if (Nt(t)) {
397
+ if (zr(e, t))
401
398
  return t;
402
399
  throw new G();
403
400
  }
404
- return jt(t) ? $t(t).get(e, N) : e;
401
+ return Zt(t) ? jt(t).get(e, N) : e;
405
402
  }
406
- function Yr(e, t, r = !1) {
403
+ function Qr(e, t, r = !1) {
407
404
  try {
408
- return oe(e, t, r);
405
+ return re(e, t, r);
409
406
  } catch (n) {
410
407
  if (n instanceof G)
411
408
  return;
412
409
  throw n;
413
410
  }
414
411
  }
415
- function Xr(e, t, r = !1) {
412
+ function Kr(e, t, r = !1) {
416
413
  try {
417
- return ae(e, t, r);
414
+ return ne(e, t, r);
418
415
  } catch (n) {
419
416
  if (n instanceof G)
420
417
  return;
421
418
  throw n;
422
419
  }
423
420
  }
424
- function ae(e, t, r = !1) {
421
+ function ne(e, t, r = !1) {
425
422
  if (e === void 0) {
426
423
  if (r)
427
424
  return "";
428
425
  throw new G();
429
426
  }
430
427
  if (t === Boolean)
431
- return Ke.set(e, N);
428
+ return ze.set(e, N);
432
429
  if (t === Number)
433
- return Ye.set(e, N);
430
+ return Qe.set(e, N);
434
431
  if (t === Date)
435
- return Ht.set(e, N);
432
+ return $t.set(e, N);
436
433
  if (t === JSON)
437
- return Ot.set(e, N);
438
- if (Oe(t))
434
+ return Ht.set(e, N);
435
+ if ($e(t))
439
436
  return t.set(e, N);
440
- if (Vt(t)) {
437
+ if (Nt(t)) {
441
438
  if (t !== e)
442
439
  throw new G();
443
440
  return e.toString();
444
441
  }
445
- if (jt(t))
446
- return $t(t).set(e, N);
442
+ if (Zt(t))
443
+ return jt(t).set(e, N);
447
444
  try {
448
445
  return e.toString();
449
446
  } catch {
450
447
  throw new G();
451
448
  }
452
449
  }
453
- function Xe(e) {
450
+ function Ke(e) {
454
451
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
455
452
  }
456
- function en(e, t) {
453
+ function Yr(e, t) {
457
454
  const r = Array.from(e.matchAll(t));
458
455
  if (r.length === 0)
459
456
  return [e];
460
457
  let n = 0;
461
- const o = r.reduce((s, f) => {
462
- const p = Xe(e.slice(n, f.index));
458
+ const o = r.reduce((s, l) => {
459
+ const p = Ke(e.slice(n, l.index));
463
460
  p.length && s.push(p);
464
- const [l] = f;
465
- return s.push(l), n = f.index + l.length, s;
461
+ const [c] = l;
462
+ return s.push(c), n = l.index + c.length, s;
466
463
  }, []), a = e.slice(n);
467
464
  return a && o.push(a), o;
468
465
  }
469
- function tn(e) {
470
- const t = qt(e.path.value);
466
+ function Xr(e) {
467
+ const t = _t(e.path.value);
471
468
  return new RegExp(`^${t}$`, "i");
472
469
  }
473
- function rn(e) {
470
+ function en(e) {
474
471
  const t = new URLSearchParams(e.query.value);
475
- return Array.from(t.entries()).filter(([, r]) => !tt(r)).map(([r, n]) => {
476
- const o = qt(n);
477
- return new RegExp(`${Xe(r)}=${o}(&|$)`, "i");
472
+ return Array.from(t.entries()).filter(([, r]) => !Xe(r)).map(([r, n]) => {
473
+ const o = _t(n);
474
+ return new RegExp(`${Ke(r)}=${o}(&|$)`, "i");
478
475
  });
479
476
  }
477
+ function _t(e) {
478
+ return Yr(e, new RegExp(He, "g")).map((t) => t.startsWith(ve) ? qt(t) : Ke(t)).join("");
479
+ }
480
480
  function qt(e) {
481
- return en(e, new RegExp(nn, "g")).map((t) => t.startsWith(z) ? It(t) : Xe(t)).join("");
481
+ return e.replace(new RegExp(He, "g"), ".+");
482
482
  }
483
- function It(e) {
484
- return [
485
- on,
486
- an
487
- ].reduce((t, r) => r(t), e);
483
+ function tn(e, t) {
484
+ const r = It(t);
485
+ return e.replace(r, "(.*)");
488
486
  }
489
- const nn = `\\${z}\\??([\\w-_]+)\\${X}`, et = `\\${z}\\?([\\w-_]+)\\${X}`, Dt = `\\${z}([\\w-_]+)\\${X}`;
490
- function on(e) {
491
- return e.replace(new RegExp(et, "g"), ".*");
487
+ function Ye(e, t) {
488
+ return nn(t).test(e.value);
492
489
  }
493
- function tt(e) {
494
- return new RegExp(et, "g").test(e);
490
+ function Xe(e) {
491
+ return new RegExp(rn, "g").test(e);
495
492
  }
496
- function an(e) {
497
- return e.replace(new RegExp(Dt, "g"), ".+");
493
+ const He = `\\${ve}\\??([\\w-_]+)\\${Oe}`, rn = `\\${ve}\\?([\\w-_]+)\\${Oe}`;
494
+ function et(e) {
495
+ const [t] = Dt(e, new RegExp(He, "g"));
496
+ return t;
497
+ }
498
+ function It(e) {
499
+ return new RegExp(`\\${ve}\\??${e}\\${Oe}`, "g");
498
500
  }
499
- function Pe(e) {
500
- const [t] = Ue(e, new RegExp(et, "g")), [r] = Ue(e, new RegExp(Dt, "g"));
501
- return t ?? r;
501
+ function nn(e) {
502
+ return new RegExp(`\\${ve}\\?${e}\\${Oe}`, "g");
502
503
  }
503
- function Ue(e, t) {
504
+ function Dt(e, t) {
504
505
  return Array.from(e.matchAll(t)).flatMap(([, ...n]) => n.map((o) => J(o) ? o : ""));
505
506
  }
506
- function sn(e = "", t = {}) {
507
- if (!J(e))
508
- return {};
509
- const r = new RegExp(`\\${z}(\\??[\\w-_]+)\\${X}`, "g");
510
- return Array.from(e.matchAll(r)).reduce((o, [a, s]) => {
511
- const f = Pe(a);
512
- if (!f)
513
- return o;
514
- const p = zr(t, f);
515
- return we([f], o), o[s] = p, o;
516
- }, {});
517
- }
518
- function cn(e) {
519
- return Zt(e) && typeof e.value == "string";
507
+ function on(e = "", t = {}) {
508
+ return J(e) ? Array.from(e.matchAll(new RegExp(He, "g"))).reduce((n, [o, a]) => {
509
+ const s = et(o);
510
+ if (!s)
511
+ return n;
512
+ const l = Gr(t, s);
513
+ return ge([s], n), n[a] = l, n;
514
+ }, {}) : {};
520
515
  }
521
- function ee(e) {
522
- return e === void 0 ? Q() : cn(e) ? e : Q(e, {});
516
+ function an(e) {
517
+ return Vt(e) && typeof e.value == "string";
518
+ }
519
+ function Y(e) {
520
+ return e === void 0 ? z() : an(e) ? e : z(e, {});
523
521
  }
524
- function Q(e, t) {
522
+ function z(e, t) {
525
523
  return {
526
524
  value: e ?? "",
527
- params: sn(e, t)
525
+ params: on(e, t)
528
526
  };
529
527
  }
530
528
  function Ft(e, t) {
531
- we(e.params, t.params);
529
+ ge(e.params, t.params);
532
530
  const r = `${e.value}${t.value}`;
533
- return Q(r, { ...e.params, ...t.params });
531
+ return z(r, { ...e.params, ...t.params });
534
532
  }
535
- function un(e, t) {
533
+ function sn(e, t) {
536
534
  return Ft(e, t);
537
535
  }
538
- function fn(e, t) {
539
- return ln(e, t), { ...e, ...t };
536
+ function cn(e, t) {
537
+ return un(e, t), { ...e, ...t };
540
538
  }
541
- function ln(e, t) {
539
+ function un(e, t) {
542
540
  const r = Object.keys(e).find((n) => n in t && typeof t[n] != typeof e[n]);
543
541
  if (r)
544
- throw new Or(r);
542
+ throw new Hr(r);
545
543
  }
546
- function hn(e, t) {
547
- we(e.params, t.params);
544
+ function fn(e, t) {
545
+ ge(e.params, t.params);
548
546
  const r = [e.value, t.value].filter(J).join("&");
549
- return Q(r, { ...e.params, ...t.params });
547
+ return z(r, { ...e.params, ...t.params });
550
548
  }
551
- function pn(e, t) {
552
- return we(e, t), { ...e, ...t };
549
+ function ln(e, t) {
550
+ return ge(e, t), { ...e, ...t };
553
551
  }
554
- function Mt(e) {
552
+ function Tt(e) {
555
553
  return "parent" in e && !!e.parent;
556
554
  }
557
- function Tt(e) {
555
+ function Mt(e) {
558
556
  return "component" in e && !!e.component;
559
557
  }
560
- function ht(e) {
558
+ function lt(e) {
561
559
  return "props" in e && typeof e.props == "function";
562
560
  }
563
561
  function Jt(e) {
564
562
  return "components" in e && !!e.components;
565
563
  }
566
- function pt(e) {
564
+ function ht(e) {
567
565
  return "props" in e && typeof e.props == "object";
568
566
  }
569
567
  function Wt(e, t) {
570
568
  return {
571
569
  ...t,
572
570
  path: Ft(e.path, t.path),
573
- query: hn(e.query, t.query),
574
- meta: fn(e.meta, t.meta),
575
- state: pn(e.state, t.state),
576
- hash: un(e.hash, t.hash),
571
+ query: fn(e.query, t.query),
572
+ meta: cn(e.meta, t.meta),
573
+ state: ln(e.state, t.state),
574
+ hash: sn(e.hash, t.hash),
577
575
  matches: [...e.matches, t.matched],
578
576
  host: e.host,
579
577
  depth: e.depth + 1
580
578
  };
581
579
  }
582
- function rt() {
580
+ function tt() {
583
581
  return typeof window < "u" && typeof window.document < "u";
584
582
  }
585
- function nt(e) {
583
+ function rt(e) {
586
584
  const t = new URLSearchParams(e);
587
585
  return {
588
586
  get: (...r) => t.get(...r),
@@ -611,115 +609,115 @@ function nt(e) {
611
609
  [Symbol.iterator]: () => t[Symbol.iterator]()
612
610
  };
613
611
  }
614
- function ot() {
612
+ function nt() {
615
613
  let e = 0;
616
614
  return () => (++e).toString();
617
615
  }
618
- const dn = ot()();
619
- function mn(e) {
620
- return e === dn;
616
+ const hn = nt()();
617
+ function pn(e) {
618
+ return e === hn;
621
619
  }
622
- const at = ot();
620
+ const ot = nt();
623
621
  function Gt(e) {
624
622
  return e === void 0 ? "" : e;
625
623
  }
626
- function de(e, t) {
627
- const r = at(), n = Gt(e.name), o = ee(e.path), a = ee(e.query), s = ee(e.hash), f = e.meta ?? {}, p = e.state ?? {}, l = xe({ id: r, meta: f, state: p, ...e, props: t }), h = {
624
+ function he(e, t) {
625
+ const r = ot(), n = Gt(e.name), o = Y(e.path), a = Y(e.query), s = Y(e.hash), l = e.meta ?? {}, p = e.state ?? {}, c = Ae({ id: r, meta: l, state: p, ...e, props: t }), y = {
628
626
  id: r,
629
- matched: l,
630
- matches: [l],
627
+ matched: c,
628
+ matches: [c],
631
629
  name: n,
632
630
  path: o,
633
631
  query: a,
634
632
  hash: s,
635
- meta: f,
633
+ meta: l,
636
634
  state: p,
637
635
  depth: 1,
638
- host: Q(),
636
+ host: z(),
639
637
  prefetch: e.prefetch
640
- }, b = Mt(e) ? Wt(e.parent, h) : h;
641
- return we(b.path.params, b.query.params, b.hash.params), b;
638
+ }, b = Tt(e) ? Wt(e.parent, y) : y;
639
+ return ge(b.path.params, b.query.params, b.hash.params), b;
642
640
  }
643
- const Be = { template: "<div>This is component</div>" }, st = de({
641
+ const xe = { template: "<div>This is component</div>" }, at = he({
644
642
  name: "parentA",
645
643
  path: "/parentA/[paramA]"
646
- }), Qt = de({
647
- parent: st,
644
+ }), zt = he({
645
+ parent: at,
648
646
  name: "parentA.childA",
649
647
  path: "/childA/[?paramB]"
650
- }), yn = de({
651
- parent: st,
648
+ }), dn = he({
649
+ parent: at,
652
650
  name: "parentA.childB",
653
651
  path: "/childB/[paramD]",
654
- component: Be
655
- }), gn = de({
656
- parent: Qt,
652
+ component: xe
653
+ }), mn = he({
654
+ parent: zt,
657
655
  name: "parentA.childA.grandChildA",
658
656
  path: "/[paramC]",
659
- component: Be
657
+ component: xe
660
658
  });
661
- de({
659
+ he({
662
660
  name: "parentB",
663
661
  path: "/parentB",
664
- component: Be
665
- }), de({
662
+ component: xe
663
+ }), he({
666
664
  name: "parentC",
667
665
  path: "/",
668
- component: Be
666
+ component: xe
669
667
  });
670
- const Rn = "lazy", wn = {
668
+ const yn = "lazy", gn = {
671
669
  components: !0,
672
670
  props: !1
673
671
  };
674
- function ke(e) {
672
+ function Se(e) {
675
673
  return ["eager", "lazy", "intent"].includes(e);
676
674
  }
677
- function zt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
678
- const o = Me(r, n), a = Me(t, n), s = Me(e, n), f = [
675
+ function Qt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
676
+ const o = Fe(r, n), a = Fe(t, n), s = Fe(e, n), l = [
679
677
  o,
680
678
  a,
681
679
  s,
682
- wn[n],
683
- Rn
684
- ].reduce((p, l) => ke(p) ? p : p === !0 && ke(l) ? l : p === !0 && !ke(l) ? p : p === void 0 ? l : p, void 0);
685
- return ke(f) ? f : !1;
680
+ gn[n],
681
+ yn
682
+ ].reduce((p, c) => Se(p) ? p : p === !0 && Se(c) ? c : p === !0 && !Se(c) ? p : p === void 0 ? c : p, void 0);
683
+ return Se(l) ? l : !1;
686
684
  }
687
- function Me(e, t) {
688
- return Zt(e) ? e[t] : e;
685
+ function Fe(e, t) {
686
+ return Vt(e) ? e[t] : e;
689
687
  }
690
688
  class Kt extends Error {
691
689
  constructor() {
692
690
  super("Uncaught CallbackContextAbortError");
693
- M(this, "response");
691
+ T(this, "response");
694
692
  this.response = { status: "ABORT" };
695
693
  }
696
694
  }
697
- class pe extends Error {
695
+ class le extends Error {
698
696
  constructor(r) {
699
697
  super("Uncaught CallbackContextPushError");
700
- M(this, "response");
698
+ T(this, "response");
701
699
  this.response = { status: "PUSH", to: r };
702
700
  }
703
701
  }
704
- class Ce extends Error {
702
+ class Ue extends Error {
705
703
  constructor(r) {
706
704
  super("Uncaught CallbackContextRejectionError");
707
- M(this, "response");
705
+ T(this, "response");
708
706
  this.response = { status: "REJECT", type: r };
709
707
  }
710
708
  }
711
709
  function Yt() {
712
710
  return { reject: (o) => {
713
- throw new Ce(o);
711
+ throw new Ue(o);
714
712
  }, push: (...o) => {
715
- throw new pe(o);
713
+ throw new le(o);
716
714
  }, replace: (o, a, s) => {
717
- if (T(o)) {
718
- const l = a ?? {};
719
- throw new pe([o, { ...l, replace: !0 }]);
715
+ if (M(o)) {
716
+ const c = a ?? {};
717
+ throw new le([o, { ...c, replace: !0 }]);
720
718
  }
721
- const f = a, p = s ?? {};
722
- throw new pe([o, f, { ...p, replace: !0 }]);
719
+ const l = a, p = s ?? {};
720
+ throw new le([o, l, { ...p, replace: !0 }]);
723
721
  }, abort: () => {
724
722
  throw new Kt();
725
723
  } };
@@ -727,233 +725,240 @@ function Yt() {
727
725
  function Xt(e) {
728
726
  return typeof e == "object" && e !== null && "then" in e;
729
727
  }
730
- function Ge(e, t) {
731
- return t ? t.runWithContext(e) : e();
732
- }
733
- function dt(e, t) {
728
+ function pt(e) {
734
729
  try {
735
- const r = Ge(e, t);
736
- return Xt(r) ? r.catch((n) => n) : r;
737
- } catch (r) {
738
- return r;
730
+ const t = e();
731
+ return Xt(t) ? t.catch((r) => r) : t;
732
+ } catch (t) {
733
+ return t;
739
734
  }
740
735
  }
741
- const er = Symbol();
742
- function vn() {
736
+ function er() {
743
737
  let e = null;
744
- const t = $e(/* @__PURE__ */ new Map()), { push: r, replace: n, reject: o } = Yt(), a = (d, c, u) => c.matches.filter((P) => zt({ ...u, routePrefetch: P.prefetch }, "props") === d).flatMap((P) => k(P)).reduce((P, { id: m, name: R, props: S }) => {
745
- if (!S)
746
- return P;
747
- const A = x(m, R, c), y = dt(() => S(c, {
748
- push: r,
749
- replace: n,
750
- reject: o,
751
- parent: h(c, !0)
752
- }), e);
753
- return P[A] = y, P;
754
- }, {}), s = (d) => {
755
- Object.entries(d).forEach(([c, u]) => {
756
- t.set(c, u);
738
+ function t(n) {
739
+ e = n;
740
+ }
741
+ function r(n) {
742
+ return e ? e.runWithContext(n) : n();
743
+ }
744
+ return {
745
+ setVueApp: t,
746
+ runWithContext: r
747
+ };
748
+ }
749
+ const tr = Symbol();
750
+ function Rn() {
751
+ const { setVueApp: e, runWithContext: t } = er(), r = Ve(/* @__PURE__ */ new Map()), { push: n, replace: o, reject: a } = Yt(), s = (m, h, R) => h.matches.filter((f) => Qt({ ...R, routePrefetch: f.prefetch }, "props") === m).flatMap((f) => S(f)).reduce((f, { id: i, name: E, props: k }) => {
752
+ if (!k)
753
+ return f;
754
+ const A = L(i, E, h), g = t(() => pt(() => k(h, {
755
+ push: n,
756
+ replace: o,
757
+ reject: a,
758
+ parent: y(h, !0)
759
+ })));
760
+ return f[A] = g, f;
761
+ }, {}), l = (m) => {
762
+ Object.entries(m).forEach(([h, R]) => {
763
+ r.set(h, R);
757
764
  });
758
- }, f = async (d) => {
759
- const c = d.matches.flatMap(k), u = [], P = [];
760
- for (const { id: m, name: R, props: S } of c) {
761
- if (!S)
765
+ }, p = async (m) => {
766
+ const h = m.matches.flatMap(S), R = [], f = [];
767
+ for (const { id: i, name: E, props: k } of h) {
768
+ if (!k)
762
769
  continue;
763
- const A = x(m, R, d);
764
- if (u.push(A), !t.has(A)) {
765
- const y = dt(() => S(d, {
766
- push: r,
767
- replace: n,
768
- reject: o,
769
- parent: h(d)
770
- }), e);
771
- t.set(A, y);
770
+ const A = L(i, E, m);
771
+ if (R.push(A), !r.has(A)) {
772
+ const g = t(() => pt(() => k(m, {
773
+ push: n,
774
+ replace: o,
775
+ reject: a,
776
+ parent: y(m)
777
+ })));
778
+ r.set(A, g);
772
779
  }
773
- P.push((async () => {
774
- const y = await t.get(A);
775
- if (y instanceof Error)
776
- throw y;
780
+ f.push((async () => {
781
+ const g = await r.get(A);
782
+ if (g instanceof Error)
783
+ throw g;
777
784
  })());
778
785
  }
779
- g(u);
786
+ w(R);
780
787
  try {
781
- return await Promise.all(P), { status: "SUCCESS" };
782
- } catch (m) {
783
- if (m instanceof pe || m instanceof Ce)
784
- return m.response;
785
- throw m;
788
+ return await Promise.all(f), { status: "SUCCESS" };
789
+ } catch (i) {
790
+ if (i instanceof le || i instanceof Ue)
791
+ return i.response;
792
+ throw i;
786
793
  }
787
- }, p = (d, c, u) => {
788
- const P = x(d, c, u);
789
- return t.get(P);
790
- }, l = (d) => {
791
- e = d;
794
+ }, c = (m, h, R) => {
795
+ const f = L(m, h, R);
796
+ return r.get(f);
792
797
  };
793
- function h(d, c = !1) {
794
- const u = d.matches.at(-2);
795
- if (u)
796
- return ht(u) ? {
797
- name: u.name ?? "",
798
+ function y(m, h = !1) {
799
+ const R = m.matches.at(-2);
800
+ if (R)
801
+ return lt(R) ? {
802
+ name: R.name ?? "",
798
803
  get props() {
799
- return b(u, "default", d, c);
804
+ return b(R, "default", m, h);
800
805
  }
801
- } : pt(u) ? {
802
- name: u.name ?? "",
806
+ } : ht(R) ? {
807
+ name: R.name ?? "",
803
808
  props: new Proxy({}, {
804
- get(P, m) {
805
- return typeof m != "string" ? Reflect.get(P, m) : b(u, m, d, c);
809
+ get(f, i) {
810
+ return typeof i != "string" ? Reflect.get(f, i) : b(R, i, m, h);
806
811
  }
807
812
  })
808
813
  } : {
809
- name: u.name ?? "",
814
+ name: R.name ?? "",
810
815
  props: void 0
811
816
  };
812
817
  }
813
- function b(d, c, u, P = !1) {
814
- const m = p(d.id, c, u);
815
- if (P && !m) {
816
- const R = d.name ?? "unknown", S = u.name || "unknown";
818
+ function b(m, h, R, f = !1) {
819
+ const i = c(m.id, h, R);
820
+ if (f && !i) {
821
+ const E = m.name ?? "unknown", k = R.name || "unknown";
817
822
  console.warn(`
818
- Unable to access parent props "${c}" from route "${R}" while prefetching props for route "${S}".
823
+ Unable to access parent props "${h}" from route "${E}" while prefetching props for route "${k}".
819
824
  This may occur if the parent route's props were not also prefetched.
820
825
  `);
821
826
  }
822
- return m;
827
+ return i;
823
828
  }
824
- function x(d, c, u) {
825
- return [d, c, u.id, JSON.stringify(u.params)].join("-");
829
+ function L(m, h, R) {
830
+ return [m, h, R.id, JSON.stringify(R.params)].join("-");
826
831
  }
827
- function k(d) {
828
- return ht(d) ? [
832
+ function S(m) {
833
+ return lt(m) ? [
829
834
  {
830
- id: d.id,
835
+ id: m.id,
831
836
  name: "default",
832
- props: d.props
837
+ props: m.props
833
838
  }
834
- ] : pt(d) ? Object.entries(d.props).map(([c, u]) => ({ id: d.id, name: c, props: u })) : [];
839
+ ] : ht(m) ? Object.entries(m.props).map(([h, R]) => ({ id: m.id, name: h, props: R })) : [];
835
840
  }
836
- function g(d) {
837
- for (const c of t.keys())
838
- d.includes(c) || t.delete(c);
841
+ function w(m) {
842
+ for (const h of r.keys())
843
+ m.includes(h) || r.delete(h);
839
844
  }
840
845
  return {
841
- getPrefetchProps: a,
842
- setPrefetchProps: s,
843
- getProps: p,
844
- setProps: f,
845
- setVueApp: l
846
+ getPrefetchProps: s,
847
+ setPrefetchProps: l,
848
+ getProps: c,
849
+ setProps: p,
850
+ setVueApp: e
846
851
  };
847
852
  }
848
- function tr() {
849
- const e = ce(er);
853
+ function rr() {
854
+ const e = ae(tr);
850
855
  if (!e)
851
- throw new Re();
856
+ throw new ye();
852
857
  return e;
853
858
  }
854
- const En = xr(() => new Promise((e) => {
859
+ const wn = kr(() => new Promise((e) => {
855
860
  e({ default: { template: "foo" } });
856
861
  }));
857
- function mt(e) {
858
- return e.name === En.name && "__asyncLoader" in e;
862
+ function dt(e) {
863
+ return e.name === wn.name && "__asyncLoader" in e;
859
864
  }
860
- const rr = Symbol("visibilityObserver");
861
- function Pn(e) {
862
- const t = ce(rr);
865
+ const nr = Symbol("visibilityObserver");
866
+ function vn(e) {
867
+ const t = ae(nr);
863
868
  if (!t)
864
- throw new Re();
865
- return ne(e, (n, o) => {
869
+ throw new ye();
870
+ return te(e, (n, o) => {
866
871
  n && t.observe(n), o && t.unobserve(o);
867
- }, { immediate: !0 }), _e(() => {
872
+ }, { immediate: !0 }), Ze(() => {
868
873
  e.value && t.unobserve(e.value);
869
874
  }), {
870
875
  isElementVisible: Z(() => e.value ? t.isElementVisible(e.value) : !1)
871
876
  };
872
877
  }
873
- function yt(e, t, r) {
874
- ne(e, (n, o) => {
878
+ function mt(e, t, r) {
879
+ te(e, (n, o) => {
875
880
  n && n.addEventListener(t, r), o && o.removeEventListener(t, r);
876
- }, { immediate: !0 }), _e(() => {
881
+ }, { immediate: !0 }), Ze(() => {
877
882
  e.value && e.value.removeEventListener(t, r);
878
883
  });
879
884
  }
880
- function bn(e) {
881
- const t = /* @__PURE__ */ new Map(), r = He(), { getPrefetchProps: n, setPrefetchProps: o } = tr(), { isElementVisible: a } = Pn(r), s = () => {
882
- const l = Array.from(t.values()).reduce((h, b) => (Object.assign(h, b), h), {});
883
- o(l);
885
+ function En(e) {
886
+ const t = /* @__PURE__ */ new Map(), r = je(), { getPrefetchProps: n, setPrefetchProps: o } = rr(), { isElementVisible: a } = vn(r), s = () => {
887
+ const c = Array.from(t.values()).reduce((y, b) => (Object.assign(y, b), y), {});
888
+ o(c);
884
889
  };
885
- ne(() => $(e), ({ route: l, ...h }) => {
886
- t.clear(), l && p("eager", l, h);
887
- }, { immediate: !0 }), ne(a, (l) => {
888
- const { route: h, ...b } = $(e);
889
- !h || !l || p("lazy", h, b);
890
- }, { immediate: !0 }), yt(r, "focusin", f), yt(r, "mouseover", f);
891
- function f() {
892
- const { route: l, ...h } = $(e);
893
- l && p("intent", l, h);
894
- }
895
- function p(l, h, b) {
896
- Sn(l, h, b), t.has(l) || t.set(l, n(l, h, b));
890
+ te(() => $(e), ({ route: c, ...y }) => {
891
+ t.clear(), c && p("eager", c, y);
892
+ }, { immediate: !0 }), te(a, (c) => {
893
+ const { route: y, ...b } = $(e);
894
+ !y || !c || p("lazy", y, b);
895
+ }, { immediate: !0 }), mt(r, "focusin", l), mt(r, "mouseover", l);
896
+ function l() {
897
+ const { route: c, ...y } = $(e);
898
+ c && p("intent", c, y);
899
+ }
900
+ function p(c, y, b) {
901
+ bn(c, y, b), t.has(c) || t.set(c, n(c, y, b));
897
902
  }
898
903
  return {
899
904
  element: r,
900
905
  commit: s
901
906
  };
902
907
  }
903
- function Sn(e, t, r) {
908
+ function bn(e, t, r) {
904
909
  t.matches.forEach((n) => {
905
- zt({
910
+ Qt({
906
911
  ...r,
907
912
  routePrefetch: n.prefetch
908
- }, "components") === e && (Tt(n) && mt(n.component) && n.component.__asyncLoader(), Jt(n) && Object.values(n.components).forEach((a) => {
909
- mt(a) && a.__asyncLoader();
913
+ }, "components") === e && (Mt(n) && dt(n.component) && n.component.__asyncLoader(), Jt(n) && Object.values(n.components).forEach((a) => {
914
+ dt(a) && a.__asyncLoader();
910
915
  }));
911
916
  });
912
917
  }
913
- const nr = Symbol("isRouterRouteSymbol");
914
- function An(e) {
915
- return typeof e == "object" && e !== null && nr in e;
918
+ const or = Symbol("isRouterRouteSymbol");
919
+ function Pn(e) {
920
+ return typeof e == "object" && e !== null && or in e;
916
921
  }
917
- function kn(e, t) {
918
- function r(c, u, P) {
919
- if (typeof c == "object") {
920
- const R = {
922
+ function Sn(e, t) {
923
+ function r(h, R, f) {
924
+ if (typeof h == "object") {
925
+ const E = {
921
926
  ...e.params,
922
- ...c
927
+ ...h
923
928
  };
924
- return t(e.name, R, u);
929
+ return t(e.name, E, R);
925
930
  }
926
- const m = {
931
+ const i = {
927
932
  ...e.params,
928
- [c]: u
933
+ [h]: R
929
934
  };
930
- return t(e.name, m, P);
931
- }
932
- const n = (...c) => {
933
- const u = new URLSearchParams(e.query);
934
- u.set(...c), r({}, { query: u });
935
- }, o = (...c) => {
936
- const u = new URLSearchParams(e.query);
937
- u.append(...c), r({}, { query: u });
938
- }, a = (...c) => {
939
- const u = new URLSearchParams(e.query);
940
- u.delete(...c), r({}, { query: u });
941
- }, { id: s, matched: f, matches: p, name: l, hash: h, href: b } = Lr(e), x = Z({
935
+ return t(e.name, i, f);
936
+ }
937
+ const n = (...h) => {
938
+ const R = new URLSearchParams(e.query);
939
+ R.set(...h), r({}, { query: R });
940
+ }, o = (...h) => {
941
+ const R = new URLSearchParams(e.query);
942
+ R.append(...h), r({}, { query: R });
943
+ }, a = (...h) => {
944
+ const R = new URLSearchParams(e.query);
945
+ R.delete(...h), r({}, { query: R });
946
+ }, { id: s, matched: l, matches: p, name: c, hash: y, href: b } = xr(e), L = Z({
942
947
  get() {
943
948
  return new Proxy(e.params, {
944
- set(c, u, P) {
945
- return r(u, P), !0;
949
+ set(h, R, f) {
950
+ return r(R, f), !0;
946
951
  }
947
952
  });
948
953
  },
949
- set(c) {
950
- r(c);
954
+ set(h) {
955
+ r(h);
951
956
  }
952
- }), k = Z({
957
+ }), S = Z({
953
958
  get() {
954
959
  return new Proxy(e.query, {
955
- get(c, u, P) {
956
- switch (u) {
960
+ get(h, R, f) {
961
+ switch (R) {
957
962
  case "append":
958
963
  return o;
959
964
  case "set":
@@ -961,44 +966,44 @@ function kn(e, t) {
961
966
  case "delete":
962
967
  return a;
963
968
  default:
964
- return Reflect.get(c, u, P);
969
+ return Reflect.get(h, R, f);
965
970
  }
966
971
  }
967
972
  });
968
973
  },
969
- set(c) {
970
- r({}, { query: c });
974
+ set(h) {
975
+ r({}, { query: h });
971
976
  }
972
- }), g = Z({
977
+ }), w = Z({
973
978
  get() {
974
979
  return new Proxy(e.state, {
975
- set(c, u, P) {
976
- return r({}, { state: { ...e.state, [u]: P } }), !0;
980
+ set(h, R, f) {
981
+ return r({}, { state: { ...e.state, [R]: f } }), !0;
977
982
  }
978
983
  });
979
984
  },
980
- set(c) {
981
- r({}, { state: c });
985
+ set(h) {
986
+ r({}, { state: h });
982
987
  }
983
988
  });
984
- return $e({
989
+ return Ve({
985
990
  id: s,
986
- matched: f,
991
+ matched: l,
987
992
  matches: p,
988
- state: g,
989
- query: k,
990
- hash: h,
991
- params: x,
992
- name: l,
993
+ state: w,
994
+ query: S,
995
+ hash: y,
996
+ params: L,
997
+ name: c,
993
998
  href: b,
994
999
  update: r,
995
- [nr]: !0
1000
+ [or]: !0
996
1001
  });
997
1002
  }
998
- function or(e, t, { exact: r } = {}) {
999
- return An(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
1003
+ function ar(e, t, { exact: r } = {}) {
1004
+ return Pn(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
1000
1005
  }
1001
- function ct(...e) {
1006
+ function st(...e) {
1002
1007
  const t = new URLSearchParams();
1003
1008
  for (const r of e) {
1004
1009
  const n = new URLSearchParams(r);
@@ -1007,52 +1012,52 @@ function ct(...e) {
1007
1012
  }
1008
1013
  return t;
1009
1014
  }
1010
- function xn(e, t = {}, r = {}) {
1011
- const n = ze(), o = Z(() => {
1012
- const g = $(e);
1013
- return typeof g != "string" ? g : T(g) ? n.find(g, $(r)) : n.resolve(g, $(t), $(r));
1015
+ function An(e, t = {}, r = {}) {
1016
+ const n = Ge(), o = Z(() => {
1017
+ const w = $(e);
1018
+ return typeof w != "string" ? w : M(w) ? n.find(w, $(r)) : n.resolve(w, $(t), $(r));
1014
1019
  }), a = Z(() => {
1015
1020
  if (o.value)
1016
1021
  return o.value.href;
1017
- const g = $(e);
1018
- if (T(g))
1019
- return g;
1022
+ const w = $(e);
1023
+ if (M(w))
1024
+ return w;
1020
1025
  console.error(new Error("Failed to resolve route in RouterLink."));
1021
- }), s = Z(() => or(n.route) && n.route.matches.some((g) => {
1022
- var d;
1023
- return g.id === ((d = o.value) == null ? void 0 : d.id);
1024
- })), f = Z(() => {
1025
- var g;
1026
- return n.route.id === ((g = o.value) == null ? void 0 : g.id);
1027
- }), p = Z(() => !!a.value && n.isExternal(a.value)), l = Z(() => {
1028
- const g = $(e);
1029
- return typeof g != "string" || T(g) ? $(t) : $(r);
1030
- }), { element: h, commit: b } = bn(() => ({
1026
+ }), s = Z(() => ar(n.route) && n.route.matches.some((w) => {
1027
+ var m;
1028
+ return w.id === ((m = o.value) == null ? void 0 : m.id);
1029
+ })), l = Z(() => {
1030
+ var w;
1031
+ return n.route.id === ((w = o.value) == null ? void 0 : w.id);
1032
+ }), p = Z(() => !!a.value && n.isExternal(a.value)), c = Z(() => {
1033
+ const w = $(e);
1034
+ return typeof w != "string" || M(w) ? $(t) : $(r);
1035
+ }), { element: y, commit: b } = En(() => ({
1031
1036
  route: o.value,
1032
1037
  routerPrefetch: n.prefetch,
1033
- linkPrefetch: l.value.prefetch
1034
- })), x = (g) => {
1038
+ linkPrefetch: c.value.prefetch
1039
+ })), L = (w) => {
1035
1040
  b();
1036
- const d = {
1037
- replace: (g == null ? void 0 : g.replace) ?? l.value.replace,
1038
- query: ct(l.value.query, g == null ? void 0 : g.query),
1039
- hash: (g == null ? void 0 : g.hash) ?? l.value.hash,
1040
- state: { ...l.value.state, ...g == null ? void 0 : g.state }
1041
- }, c = $(e);
1042
- return T(c) || typeof c == "object" ? n.push(c, d) : n.push(c, $(t), d);
1041
+ const m = {
1042
+ replace: (w == null ? void 0 : w.replace) ?? c.value.replace,
1043
+ query: st(c.value.query, w == null ? void 0 : w.query),
1044
+ hash: (w == null ? void 0 : w.hash) ?? c.value.hash,
1045
+ state: { ...c.value.state, ...w == null ? void 0 : w.state }
1046
+ }, h = $(e);
1047
+ return M(h) || typeof h == "object" ? n.push(h, m) : n.push(h, $(t), m);
1043
1048
  };
1044
1049
  return {
1045
- element: h,
1050
+ element: y,
1046
1051
  route: o,
1047
1052
  href: a,
1048
1053
  isMatch: s,
1049
- isExactMatch: f,
1054
+ isExactMatch: l,
1050
1055
  isExternal: p,
1051
- push: x,
1052
- replace: (g) => x({ ...g, replace: !0 })
1056
+ push: L,
1057
+ replace: (w) => L({ ...w, replace: !0 })
1053
1058
  };
1054
1059
  }
1055
- const Ln = ["href"], Un = /* @__PURE__ */ ge({
1060
+ const kn = ["href"], xn = /* @__PURE__ */ me({
1056
1061
  __name: "routerLink",
1057
1062
  props: {
1058
1063
  to: {},
@@ -1063,333 +1068,334 @@ const Ln = ["href"], Un = /* @__PURE__ */ ge({
1063
1068
  state: {}
1064
1069
  },
1065
1070
  setup(e) {
1066
- const t = e, r = ze(), n = Z(() => x(t.to)), o = Z(() => k(t.to)), a = Z(() => {
1067
- const { to: d, ...c } = t;
1068
- return c;
1069
- }), { element: s, isMatch: f, isExactMatch: p, isExternal: l, push: h } = xn(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), b = Z(() => ({
1070
- "router-link--match": f.value,
1071
+ const t = e, r = Ge(), n = Z(() => L(t.to)), o = Z(() => S(t.to)), a = Z(() => {
1072
+ const { to: m, ...h } = t;
1073
+ return h;
1074
+ }), { element: s, isMatch: l, isExactMatch: p, isExternal: c, push: y } = An(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), b = Z(() => ({
1075
+ "router-link--match": l.value,
1071
1076
  "router-link--exact-match": p.value
1072
1077
  }));
1073
- function x(d) {
1074
- if (typeof d == "function") {
1075
- const c = d(r.resolve);
1076
- return x(c);
1078
+ function L(m) {
1079
+ if (typeof m == "function") {
1080
+ const h = m(r.resolve);
1081
+ return L(h);
1077
1082
  }
1078
- return T(d) ? r.find(d) : d;
1083
+ return M(m) ? r.find(m) : m;
1079
1084
  }
1080
- function k(d) {
1081
- if (typeof d == "function") {
1082
- const c = d(r.resolve);
1083
- return k(c);
1085
+ function S(m) {
1086
+ if (typeof m == "function") {
1087
+ const h = m(r.resolve);
1088
+ return S(h);
1084
1089
  }
1085
- return T(d) ? d : d == null ? void 0 : d.href;
1090
+ return M(m) ? m : m == null ? void 0 : m.href;
1086
1091
  }
1087
- function g(d) {
1088
- d.preventDefault(), h();
1092
+ function w(m) {
1093
+ m.preventDefault(), y();
1089
1094
  }
1090
- return (d, c) => (xt(), Ur("a", {
1095
+ return (m, h) => (kt(), Ur("a", {
1091
1096
  ref_key: "element",
1092
1097
  ref: s,
1093
1098
  href: o.value,
1094
- class: Br(["router-link", b.value]),
1095
- onClick: g
1099
+ class: Lr(["router-link", b.value]),
1100
+ onClick: w
1096
1101
  }, [
1097
- Lt(d.$slots, "default", Ut(Cr({ route: n.value, isMatch: ve(f), isExactMatch: ve(p), isExternal: ve(l) })))
1098
- ], 10, Ln));
1102
+ xt(m.$slots, "default", Ut(Br({ route: n.value, isMatch: Re(l), isExactMatch: Re(p), isExternal: Re(c) })))
1103
+ ], 10, kn));
1099
1104
  }
1100
- }), ar = Symbol();
1101
- function Bn() {
1102
- const e = ce(ar);
1105
+ }), sr = Symbol();
1106
+ function Un() {
1107
+ const e = ae(sr);
1103
1108
  if (!e)
1104
- throw new Re();
1109
+ throw new ye();
1105
1110
  return e;
1106
1111
  }
1107
- function sr(e, t) {
1108
- const r = ze();
1112
+ function cr(e, t) {
1113
+ const r = Ge();
1109
1114
  function n() {
1110
1115
  if (!e)
1111
1116
  return;
1112
- if (!or(r.route, e, t))
1113
- throw new qr(e, r.route.name);
1117
+ if (!ar(r.route, e, t))
1118
+ throw new _r(e, r.route.name);
1114
1119
  }
1115
- return ne(r.route, n, { immediate: !0, deep: !0 }), r.route;
1120
+ return te(r.route, n, { immediate: !0, deep: !0 }), r.route;
1116
1121
  }
1117
- const cr = Symbol();
1118
- function it() {
1119
- return ce(cr, 0);
1122
+ const ir = Symbol();
1123
+ function ct() {
1124
+ return ae(ir, 0);
1120
1125
  }
1121
- function Cn(e, t, r) {
1122
- return ge({
1126
+ function Ln(e, t, r) {
1127
+ return me({
1123
1128
  name: "PropsWrapper",
1124
1129
  expose: [],
1125
1130
  setup() {
1126
- const n = Nr(), o = tr(), a = sr();
1131
+ const n = Cr(), o = rr(), a = cr();
1127
1132
  return () => {
1128
1133
  const s = o.getProps(e.id, t, a);
1129
- return s instanceof Error ? "" : Xt(s) ? n != null && n.suspense ? le(Vn, { component: r, props: s }) : le(Nn, { component: r, props: s }) : le(r, s);
1134
+ return s instanceof Error ? "" : Xt(s) ? n != null && n.suspense ? ue(Cn, { component: r, props: s }) : ue(Bn, { component: r, props: s }) : ue(r, s);
1130
1135
  };
1131
1136
  }
1132
1137
  });
1133
1138
  }
1134
- const Nn = ge((e) => {
1135
- const t = He();
1136
- return ne(() => e.props, async (r) => {
1139
+ const Bn = me((e) => {
1140
+ const t = je();
1141
+ return te(() => e.props, async (r) => {
1137
1142
  t.value = await r;
1138
- }, { immediate: !0, deep: !0 }), () => t.value instanceof Error ? "" : t.value ? le(e.component, t.value) : "";
1143
+ }, { immediate: !0, deep: !0 }), () => t.value instanceof Error ? "" : t.value ? ue(e.component, t.value) : "";
1139
1144
  }, {
1140
1145
  props: ["component", "props"]
1141
- }), Vn = ge(async (e) => {
1142
- const t = He();
1143
- return t.value = await e.props, ne(() => t.value, async (r) => {
1146
+ }), Cn = me(async (e) => {
1147
+ const t = je();
1148
+ return t.value = await e.props, te(() => t.value, async (r) => {
1144
1149
  t.value = await r;
1145
- }, { deep: !0 }), () => t.value instanceof Error ? "" : t.value ? le(e.component, t.value) : "";
1150
+ }, { deep: !0 }), () => t.value instanceof Error ? "" : t.value ? ue(e.component, t.value) : "";
1146
1151
  }, {
1147
1152
  props: ["component", "props"]
1148
- }), ir = Symbol();
1149
- function Zn() {
1153
+ }), ur = Symbol();
1154
+ function Nn() {
1150
1155
  const e = /* @__PURE__ */ new Map();
1151
1156
  return {
1152
1157
  getRouteComponents: (r) => {
1153
1158
  const n = e.get(r.id);
1154
1159
  if (n)
1155
1160
  return n;
1156
- const o = jn(r);
1161
+ const o = Vn(r);
1157
1162
  return e.set(r.id, o), o;
1158
1163
  }
1159
1164
  };
1160
1165
  }
1161
- function jn(e) {
1162
- return Jt(e) ? gt(e, e.components) : Tt(e) ? gt(e, { default: e.component }) : { default: ur };
1166
+ function Vn(e) {
1167
+ return Jt(e) ? yt(e, e.components) : Mt(e) ? yt(e, { default: e.component }) : { default: fr };
1163
1168
  }
1164
- function gt(e, t) {
1169
+ function yt(e, t) {
1165
1170
  return Object.fromEntries(
1166
- Object.entries(t).map(([r, n]) => [r, Cn(e, r, n)])
1171
+ Object.entries(t).map(([r, n]) => [r, Ln(e, r, n)])
1167
1172
  );
1168
1173
  }
1169
- function $n() {
1170
- const e = ce(ir);
1174
+ function Zn() {
1175
+ const e = ae(ur);
1171
1176
  if (!e)
1172
- throw new Re();
1177
+ throw new ye();
1173
1178
  return e;
1174
1179
  }
1175
- const ur = /* @__PURE__ */ ge({
1180
+ const fr = /* @__PURE__ */ me({
1176
1181
  __name: "routerView",
1177
1182
  props: {
1178
1183
  name: { default: "default" }
1179
1184
  },
1180
1185
  setup(e) {
1181
- const t = sr(), r = Bn(), n = it(), { getRouteComponents: o } = $n();
1182
- Vr(cr, n + 1);
1186
+ const t = cr(), r = Un(), n = ct(), { getRouteComponents: o } = Zn();
1187
+ Nr(ir, n + 1);
1183
1188
  const a = Z(() => {
1184
1189
  if (r.value)
1185
1190
  return r.value.component;
1186
1191
  const s = t.matches.at(n);
1187
1192
  return s ? o(s)[e.name] : null;
1188
1193
  });
1189
- return (s, f) => a.value ? Lt(s.$slots, "default", Ut(jr({ key: 0 }, { route: ve(t), component: a.value, rejection: ve(r) })), () => [
1190
- (xt(), $r(_r(a.value)))
1191
- ]) : Zr("", !0);
1194
+ return (s, l) => a.value ? xt(s.$slots, "default", Ut(Zr({ key: 0 }, { route: Re(t), component: a.value, rejection: Re(r) })), () => [
1195
+ (kt(), jr(Or(a.value)))
1196
+ ]) : Vr("", !0);
1192
1197
  }
1193
1198
  });
1194
- class se {
1199
+ class oe {
1195
1200
  constructor() {
1196
- M(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
1197
- M(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
1198
- M(this, "onBeforeRouteLeave", /* @__PURE__ */ new Set());
1199
- M(this, "onAfterRouteEnter", /* @__PURE__ */ new Set());
1200
- M(this, "onAfterRouteUpdate", /* @__PURE__ */ new Set());
1201
- M(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
1201
+ T(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
1202
+ T(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
1203
+ T(this, "onBeforeRouteLeave", /* @__PURE__ */ new Set());
1204
+ T(this, "onAfterRouteEnter", /* @__PURE__ */ new Set());
1205
+ T(this, "onAfterRouteUpdate", /* @__PURE__ */ new Set());
1206
+ T(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
1202
1207
  }
1203
1208
  }
1204
- const be = (e, t, r) => {
1209
+ const Ee = (e, t, r) => {
1205
1210
  var a, s;
1206
1211
  const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1207
1212
  return ((a = n.at(r)) == null ? void 0 : a.id) !== ((s = o.at(r)) == null ? void 0 : s.id);
1208
- }, Se = (e, t, r) => {
1213
+ }, be = (e, t, r) => {
1209
1214
  var a, s;
1210
1215
  const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1211
1216
  return ((a = n.at(r)) == null ? void 0 : a.id) !== ((s = o.at(r)) == null ? void 0 : s.id);
1212
- }, Ae = (e, t, r) => {
1217
+ }, Pe = (e, t, r) => {
1213
1218
  var n, o;
1214
1219
  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);
1215
1220
  };
1216
- function Rt(e) {
1221
+ function gt(e) {
1217
1222
  switch (e) {
1218
1223
  case "onBeforeRouteEnter":
1219
1224
  case "onAfterRouteEnter":
1220
- return be;
1225
+ return Ee;
1221
1226
  case "onBeforeRouteUpdate":
1222
1227
  case "onAfterRouteUpdate":
1223
- return Ae;
1228
+ return Pe;
1224
1229
  case "onBeforeRouteLeave":
1225
1230
  case "onAfterRouteLeave":
1226
- return Se;
1231
+ return be;
1227
1232
  default:
1228
1233
  throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
1229
1234
  }
1230
1235
  }
1231
- function _n(e, t) {
1232
- const r = new se();
1236
+ function jn(e, t) {
1237
+ const r = new oe();
1233
1238
  return e.matches.forEach((n, o) => {
1234
- n.onBeforeRouteEnter && be(e, t, o) && he(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Ae(e, t, o) && he(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
1239
+ n.onBeforeRouteEnter && Ee(e, t, o) && fe(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Pe(e, t, o) && fe(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
1235
1240
  }), t == null || t.matches.forEach((n, o) => {
1236
- n.onBeforeRouteLeave && Se(e, t, o) && he(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
1241
+ n.onBeforeRouteLeave && be(e, t, o) && fe(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
1237
1242
  }), r;
1238
1243
  }
1239
- function Hn(e, t) {
1240
- const r = new se();
1244
+ function On(e, t) {
1245
+ const r = new oe();
1241
1246
  return e.matches.forEach((n, o) => {
1242
- n.onAfterRouteEnter && be(e, t, o) && he(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Ae(e, t, o) && he(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
1247
+ n.onAfterRouteEnter && Ee(e, t, o) && fe(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Pe(e, t, o) && fe(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
1243
1248
  }), t == null || t.matches.forEach((n, o) => {
1244
- n.onAfterRouteLeave && Se(e, t, o) && he(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
1249
+ n.onAfterRouteLeave && be(e, t, o) && fe(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
1245
1250
  }), r;
1246
1251
  }
1247
- function On(e, t, r) {
1248
- const n = new se();
1252
+ function $n(e, t, r) {
1253
+ const n = new oe();
1249
1254
  return e.matches.forEach((o, a) => {
1250
- be(e, t, a) && r.onBeforeRouteEnter.forEach((s) => n.onBeforeRouteEnter.add(s)), Ae(e, t, a) && r.onBeforeRouteUpdate.forEach((s) => n.onBeforeRouteUpdate.add(s));
1255
+ Ee(e, t, a) && r.onBeforeRouteEnter.forEach((s) => n.onBeforeRouteEnter.add(s)), Pe(e, t, a) && r.onBeforeRouteUpdate.forEach((s) => n.onBeforeRouteUpdate.add(s));
1251
1256
  }), t == null || t.matches.forEach((o, a) => {
1252
- Se(e, t, a) && r.onBeforeRouteLeave.forEach((s) => n.onBeforeRouteLeave.add(s));
1257
+ be(e, t, a) && r.onBeforeRouteLeave.forEach((s) => n.onBeforeRouteLeave.add(s));
1253
1258
  }), n;
1254
1259
  }
1255
- function qn(e, t, r) {
1256
- const n = new se();
1260
+ function Hn(e, t, r) {
1261
+ const n = new oe();
1257
1262
  return e.matches.forEach((o, a) => {
1258
- be(e, t, a) && r.onAfterRouteEnter.forEach((s) => n.onAfterRouteEnter.add(s)), Ae(e, t, a) && r.onAfterRouteUpdate.forEach((s) => n.onAfterRouteUpdate.add(s));
1263
+ Ee(e, t, a) && r.onAfterRouteEnter.forEach((s) => n.onAfterRouteEnter.add(s)), Pe(e, t, a) && r.onAfterRouteUpdate.forEach((s) => n.onAfterRouteUpdate.add(s));
1259
1264
  }), t == null || t.matches.forEach((o, a) => {
1260
- Se(e, t, a) && r.onAfterRouteLeave.forEach((s) => n.onAfterRouteLeave.add(s));
1265
+ be(e, t, a) && r.onAfterRouteLeave.forEach((s) => n.onAfterRouteLeave.add(s));
1261
1266
  }), n;
1262
1267
  }
1263
- const fr = Symbol();
1264
- function In() {
1265
- const e = {
1266
- global: new se(),
1267
- component: new se()
1268
- }, { reject: t, push: r, replace: n, abort: o } = Yt(), a = (c) => (e.global.onBeforeRouteEnter.add(c), () => e.global.onBeforeRouteEnter.delete(c)), s = (c) => (e.global.onBeforeRouteUpdate.add(c), () => e.global.onBeforeRouteUpdate.delete(c)), f = (c) => (e.global.onBeforeRouteLeave.add(c), () => e.global.onBeforeRouteLeave.delete(c)), p = (c) => (e.global.onAfterRouteEnter.add(c), () => e.global.onAfterRouteEnter.delete(c)), l = (c) => (e.global.onAfterRouteUpdate.add(c), () => e.global.onAfterRouteUpdate.delete(c)), h = (c) => (e.global.onAfterRouteLeave.add(c), () => e.global.onAfterRouteLeave.delete(c));
1269
- async function b({ to: c, from: u, app: P }) {
1270
- const { global: m, component: R } = e, S = _n(c, u), A = On(c, u, m), y = [
1268
+ const lr = Symbol();
1269
+ function _n() {
1270
+ const { setVueApp: e, runWithContext: t } = er(), r = {
1271
+ global: new oe(),
1272
+ component: new oe()
1273
+ }, { reject: n, push: o, replace: a, abort: s } = Yt(), l = (f) => (r.global.onBeforeRouteEnter.add(f), () => r.global.onBeforeRouteEnter.delete(f)), p = (f) => (r.global.onBeforeRouteUpdate.add(f), () => r.global.onBeforeRouteUpdate.delete(f)), c = (f) => (r.global.onBeforeRouteLeave.add(f), () => r.global.onBeforeRouteLeave.delete(f)), y = (f) => (r.global.onAfterRouteEnter.add(f), () => r.global.onAfterRouteEnter.delete(f)), b = (f) => (r.global.onAfterRouteUpdate.add(f), () => r.global.onAfterRouteUpdate.delete(f)), L = (f) => (r.global.onAfterRouteLeave.add(f), () => r.global.onAfterRouteLeave.delete(f));
1274
+ async function S({ to: f, from: i }) {
1275
+ const { global: E, component: k } = r, A = jn(f, i), g = $n(f, i, E), u = [
1276
+ ...g.onBeforeRouteEnter,
1271
1277
  ...A.onBeforeRouteEnter,
1272
- ...S.onBeforeRouteEnter,
1278
+ ...g.onBeforeRouteUpdate,
1273
1279
  ...A.onBeforeRouteUpdate,
1274
- ...S.onBeforeRouteUpdate,
1275
- ...R.onBeforeRouteUpdate,
1280
+ ...k.onBeforeRouteUpdate,
1281
+ ...g.onBeforeRouteLeave,
1276
1282
  ...A.onBeforeRouteLeave,
1277
- ...S.onBeforeRouteLeave,
1278
- ...R.onBeforeRouteLeave
1283
+ ...k.onBeforeRouteLeave
1279
1284
  ];
1280
1285
  try {
1281
- const i = y.map((w) => Ge(() => w(c, {
1282
- from: u,
1283
- reject: t,
1284
- push: r,
1285
- replace: n,
1286
- abort: o
1287
- }), P));
1288
- await Promise.all(i);
1289
- } catch (i) {
1290
- if (i instanceof pe || i instanceof Ce || i instanceof Kt)
1291
- return i.response;
1292
- throw i;
1286
+ const d = u.map((x) => t(() => x(f, {
1287
+ from: i,
1288
+ reject: n,
1289
+ push: o,
1290
+ replace: a,
1291
+ abort: s
1292
+ })));
1293
+ await Promise.all(d);
1294
+ } catch (d) {
1295
+ if (d instanceof le || d instanceof Ue || d instanceof Kt)
1296
+ return d.response;
1297
+ throw d;
1293
1298
  }
1294
1299
  return {
1295
1300
  status: "SUCCESS"
1296
1301
  };
1297
1302
  }
1298
- async function x({ to: c, from: u, app: P }) {
1299
- const { global: m, component: R } = e, S = Hn(c, u), A = qn(c, u, m), y = [
1300
- ...R.onAfterRouteLeave,
1301
- ...S.onAfterRouteLeave,
1303
+ async function w({ to: f, from: i }) {
1304
+ const { global: E, component: k } = r, A = On(f, i), g = Hn(f, i, E), u = [
1305
+ ...k.onAfterRouteLeave,
1302
1306
  ...A.onAfterRouteLeave,
1303
- ...R.onAfterRouteUpdate,
1304
- ...S.onAfterRouteUpdate,
1307
+ ...g.onAfterRouteLeave,
1308
+ ...k.onAfterRouteUpdate,
1305
1309
  ...A.onAfterRouteUpdate,
1306
- ...R.onAfterRouteEnter,
1307
- ...S.onAfterRouteEnter,
1308
- ...A.onAfterRouteEnter
1310
+ ...g.onAfterRouteUpdate,
1311
+ ...k.onAfterRouteEnter,
1312
+ ...A.onAfterRouteEnter,
1313
+ ...g.onAfterRouteEnter
1309
1314
  ];
1310
1315
  try {
1311
- const i = y.map((w) => Ge(() => w(c, {
1312
- from: u,
1313
- reject: t,
1314
- push: r,
1315
- replace: n
1316
- }), P));
1317
- await Promise.all(i);
1318
- } catch (i) {
1319
- if (i instanceof pe || i instanceof Ce)
1320
- return i.response;
1321
- throw i;
1316
+ const d = u.map((x) => t(() => x(f, {
1317
+ from: i,
1318
+ reject: n,
1319
+ push: o,
1320
+ replace: a
1321
+ })));
1322
+ await Promise.all(d);
1323
+ } catch (d) {
1324
+ if (d instanceof le || d instanceof Ue)
1325
+ return d.response;
1326
+ throw d;
1322
1327
  }
1323
1328
  return {
1324
1329
  status: "SUCCESS"
1325
1330
  };
1326
1331
  }
1327
1332
  return {
1328
- runBeforeRouteHooks: b,
1329
- runAfterRouteHooks: x,
1330
- addComponentBeforeRouteHook: ({ lifecycle: c, depth: u, hook: P }) => {
1331
- const m = Rt(c), R = e.component[c], S = (A, y) => {
1332
- if (m(A, y.from, u))
1333
- return P(A, y);
1333
+ runBeforeRouteHooks: S,
1334
+ runAfterRouteHooks: w,
1335
+ addComponentBeforeRouteHook: ({ lifecycle: f, depth: i, hook: E }) => {
1336
+ const k = gt(f), A = r.component[f], g = (u, d) => {
1337
+ if (k(u, d.from, i))
1338
+ return E(u, d);
1334
1339
  };
1335
- return R.add(S), () => R.delete(S);
1340
+ return A.add(g), () => A.delete(g);
1336
1341
  },
1337
- addComponentAfterRouteHook: ({ lifecycle: c, depth: u, hook: P }) => {
1338
- const m = Rt(c), R = e.component[c], S = (A, y) => {
1339
- if (m(A, y.from, u))
1340
- return P(A, y);
1342
+ addComponentAfterRouteHook: ({ lifecycle: f, depth: i, hook: E }) => {
1343
+ const k = gt(f), A = r.component[f], g = (u, d) => {
1344
+ if (k(u, d.from, i))
1345
+ return E(u, d);
1341
1346
  };
1342
- return R.add(S), () => R.delete(S);
1347
+ return A.add(g), () => A.delete(g);
1343
1348
  },
1344
- addGlobalRouteHooks: (c) => {
1345
- c.onBeforeRouteEnter.forEach((u) => a(u)), c.onBeforeRouteUpdate.forEach((u) => s(u)), c.onBeforeRouteLeave.forEach((u) => f(u)), c.onAfterRouteEnter.forEach((u) => p(u)), c.onAfterRouteUpdate.forEach((u) => l(u)), c.onAfterRouteLeave.forEach((u) => h(u));
1349
+ addGlobalRouteHooks: (f) => {
1350
+ f.onBeforeRouteEnter.forEach((i) => l(i)), f.onBeforeRouteUpdate.forEach((i) => p(i)), f.onBeforeRouteLeave.forEach((i) => c(i)), f.onAfterRouteEnter.forEach((i) => y(i)), f.onAfterRouteUpdate.forEach((i) => b(i)), f.onAfterRouteLeave.forEach((i) => L(i));
1346
1351
  },
1347
- onBeforeRouteEnter: a,
1348
- onBeforeRouteUpdate: s,
1349
- onBeforeRouteLeave: f,
1350
- onAfterRouteEnter: p,
1351
- onAfterRouteUpdate: l,
1352
- onAfterRouteLeave: h
1352
+ onBeforeRouteEnter: l,
1353
+ onBeforeRouteUpdate: p,
1354
+ onBeforeRouteLeave: c,
1355
+ onAfterRouteEnter: y,
1356
+ onAfterRouteUpdate: b,
1357
+ onAfterRouteLeave: L,
1358
+ setVueApp: e
1353
1359
  };
1354
1360
  }
1355
- function lr() {
1356
- const e = ce(fr);
1361
+ function hr() {
1362
+ const e = ae(lr);
1357
1363
  if (!e)
1358
- throw new Re();
1364
+ throw new ye();
1359
1365
  return e;
1360
1366
  }
1361
- function hr(e) {
1367
+ function pr(e) {
1362
1368
  return (t) => {
1363
- const r = it(), o = lr().addComponentBeforeRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1364
- return _e(o), o;
1369
+ const r = ct(), o = hr().addComponentBeforeRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1370
+ return Ze(o), o;
1365
1371
  };
1366
1372
  }
1367
- function pr(e) {
1373
+ function dr(e) {
1368
1374
  return (t) => {
1369
- const r = it(), o = lr().addComponentAfterRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1370
- return _e(o), o;
1375
+ const r = ct(), o = hr().addComponentAfterRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1376
+ return Ze(o), o;
1371
1377
  };
1372
1378
  }
1373
- const Uo = hr("onBeforeRouteLeave"), Bo = hr("onBeforeRouteUpdate"), Co = pr("onAfterRouteLeave"), No = pr("onAfterRouteUpdate");
1374
- function Y() {
1375
- return Y = Object.assign ? Object.assign.bind() : function(e) {
1379
+ const xo = pr("onBeforeRouteLeave"), Uo = pr("onBeforeRouteUpdate"), Lo = dr("onAfterRouteLeave"), Bo = dr("onAfterRouteUpdate");
1380
+ function K() {
1381
+ return K = Object.assign ? Object.assign.bind() : function(e) {
1376
1382
  for (var t = 1; t < arguments.length; t++) {
1377
1383
  var r = arguments[t];
1378
1384
  for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
1379
1385
  }
1380
1386
  return e;
1381
- }, Y.apply(null, arguments);
1387
+ }, K.apply(null, arguments);
1382
1388
  }
1383
1389
  var j;
1384
1390
  (function(e) {
1385
1391
  e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
1386
1392
  })(j || (j = {}));
1387
- var me = process.env.NODE_ENV !== "production" ? function(e) {
1393
+ var pe = process.env.NODE_ENV !== "production" ? function(e) {
1388
1394
  return Object.freeze(e);
1389
1395
  } : function(e) {
1390
1396
  return e;
1391
1397
  };
1392
- function te(e, t) {
1398
+ function X(e, t) {
1393
1399
  if (!e) {
1394
1400
  typeof console < "u" && console.warn(t);
1395
1401
  try {
@@ -1398,38 +1404,38 @@ function te(e, t) {
1398
1404
  }
1399
1405
  }
1400
1406
  }
1401
- var Ne = "beforeunload", Dn = "hashchange", dr = "popstate";
1402
- function wt(e) {
1407
+ var Le = "beforeunload", qn = "hashchange", mr = "popstate";
1408
+ function Rt(e) {
1403
1409
  e === void 0 && (e = {});
1404
1410
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1405
1411
  function a() {
1406
- var y = n.location, i = y.pathname, w = y.search, L = y.hash, U = o.state || {};
1407
- return [U.idx, me({
1408
- pathname: i,
1409
- search: w,
1410
- hash: L,
1412
+ var g = n.location, u = g.pathname, d = g.search, x = g.hash, U = o.state || {};
1413
+ return [U.idx, pe({
1414
+ pathname: u,
1415
+ search: d,
1416
+ hash: x,
1411
1417
  state: U.usr || null,
1412
1418
  key: U.key || "default"
1413
1419
  })];
1414
1420
  }
1415
1421
  var s = null;
1416
- function f() {
1422
+ function l() {
1417
1423
  if (s)
1418
- k.call(s), s = null;
1424
+ S.call(s), s = null;
1419
1425
  else {
1420
- var y = j.Pop, i = a(), w = i[0], L = i[1];
1421
- if (k.length)
1422
- if (w != null) {
1423
- var U = h - w;
1426
+ var g = j.Pop, u = a(), d = u[0], x = u[1];
1427
+ if (S.length)
1428
+ if (d != null) {
1429
+ var U = y - d;
1424
1430
  U && (s = {
1425
- action: y,
1426
- location: L,
1431
+ action: g,
1432
+ location: x,
1427
1433
  retry: function() {
1428
- S(U * -1);
1434
+ k(U * -1);
1429
1435
  }
1430
- }, S(U));
1436
+ }, k(U));
1431
1437
  } else
1432
- process.env.NODE_ENV !== "production" && te(
1438
+ process.env.NODE_ENV !== "production" && X(
1433
1439
  !1,
1434
1440
  // TODO: Write up a doc that explains our blocking strategy in
1435
1441
  // detail and link to it here so people can understand better what
@@ -1437,76 +1443,76 @@ function wt(e) {
1437
1443
  "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."
1438
1444
  );
1439
1445
  else
1440
- P(y);
1446
+ f(g);
1441
1447
  }
1442
1448
  }
1443
- n.addEventListener(dr, f);
1444
- var p = j.Pop, l = a(), h = l[0], b = l[1], x = ye(), k = ye();
1445
- h == null && (h = 0, o.replaceState(Y({}, o.state, {
1446
- idx: h
1449
+ n.addEventListener(mr, l);
1450
+ var p = j.Pop, c = a(), y = c[0], b = c[1], L = de(), S = de();
1451
+ y == null && (y = 0, o.replaceState(K({}, o.state, {
1452
+ idx: y
1447
1453
  }), ""));
1448
- function g(y) {
1449
- return typeof y == "string" ? y : re(y);
1454
+ function w(g) {
1455
+ return typeof g == "string" ? g : ee(g);
1450
1456
  }
1451
- function d(y, i) {
1452
- return i === void 0 && (i = null), me(Y({
1457
+ function m(g, u) {
1458
+ return u === void 0 && (u = null), pe(K({
1453
1459
  pathname: b.pathname,
1454
1460
  hash: "",
1455
1461
  search: ""
1456
- }, typeof y == "string" ? Ee(y) : y, {
1457
- state: i,
1458
- key: Ze()
1462
+ }, typeof g == "string" ? we(g) : g, {
1463
+ state: u,
1464
+ key: Ce()
1459
1465
  }));
1460
1466
  }
1461
- function c(y, i) {
1467
+ function h(g, u) {
1462
1468
  return [{
1463
- usr: y.state,
1464
- key: y.key,
1465
- idx: i
1466
- }, g(y)];
1467
- }
1468
- function u(y, i, w) {
1469
- return !k.length || (k.call({
1470
- action: y,
1471
- location: i,
1472
- retry: w
1469
+ usr: g.state,
1470
+ key: g.key,
1471
+ idx: u
1472
+ }, w(g)];
1473
+ }
1474
+ function R(g, u, d) {
1475
+ return !S.length || (S.call({
1476
+ action: g,
1477
+ location: u,
1478
+ retry: d
1473
1479
  }), !1);
1474
1480
  }
1475
- function P(y) {
1476
- p = y;
1477
- var i = a();
1478
- h = i[0], b = i[1], x.call({
1481
+ function f(g) {
1482
+ p = g;
1483
+ var u = a();
1484
+ y = u[0], b = u[1], L.call({
1479
1485
  action: p,
1480
1486
  location: b
1481
1487
  });
1482
1488
  }
1483
- function m(y, i) {
1484
- var w = j.Push, L = d(y, i);
1489
+ function i(g, u) {
1490
+ var d = j.Push, x = m(g, u);
1485
1491
  function U() {
1486
- m(y, i);
1492
+ i(g, u);
1487
1493
  }
1488
- if (u(w, L, U)) {
1489
- var C = c(L, h + 1), V = C[0], _ = C[1];
1494
+ if (R(d, x, U)) {
1495
+ var C = h(x, y + 1), V = C[0], O = C[1];
1490
1496
  try {
1491
- o.pushState(V, "", _);
1497
+ o.pushState(V, "", O);
1492
1498
  } catch {
1493
- n.location.assign(_);
1499
+ n.location.assign(O);
1494
1500
  }
1495
- P(w);
1501
+ f(d);
1496
1502
  }
1497
1503
  }
1498
- function R(y, i) {
1499
- var w = j.Replace, L = d(y, i);
1504
+ function E(g, u) {
1505
+ var d = j.Replace, x = m(g, u);
1500
1506
  function U() {
1501
- R(y, i);
1507
+ E(g, u);
1502
1508
  }
1503
- if (u(w, L, U)) {
1504
- var C = c(L, h), V = C[0], _ = C[1];
1505
- o.replaceState(V, "", _), P(w);
1509
+ if (R(d, x, U)) {
1510
+ var C = h(x, y), V = C[0], O = C[1];
1511
+ o.replaceState(V, "", O), f(d);
1506
1512
  }
1507
1513
  }
1508
- function S(y) {
1509
- o.go(y);
1514
+ function k(g) {
1515
+ o.go(g);
1510
1516
  }
1511
1517
  var A = {
1512
1518
  get action() {
@@ -1515,59 +1521,59 @@ function wt(e) {
1515
1521
  get location() {
1516
1522
  return b;
1517
1523
  },
1518
- createHref: g,
1519
- push: m,
1520
- replace: R,
1521
- go: S,
1524
+ createHref: w,
1525
+ push: i,
1526
+ replace: E,
1527
+ go: k,
1522
1528
  back: function() {
1523
- S(-1);
1529
+ k(-1);
1524
1530
  },
1525
1531
  forward: function() {
1526
- S(1);
1532
+ k(1);
1527
1533
  },
1528
- listen: function(i) {
1529
- return x.push(i);
1534
+ listen: function(u) {
1535
+ return L.push(u);
1530
1536
  },
1531
- block: function(i) {
1532
- var w = k.push(i);
1533
- return k.length === 1 && n.addEventListener(Ne, Ve), function() {
1534
- w(), k.length || n.removeEventListener(Ne, Ve);
1537
+ block: function(u) {
1538
+ var d = S.push(u);
1539
+ return S.length === 1 && n.addEventListener(Le, Be), function() {
1540
+ d(), S.length || n.removeEventListener(Le, Be);
1535
1541
  };
1536
1542
  }
1537
1543
  };
1538
1544
  return A;
1539
1545
  }
1540
- function Fn(e) {
1546
+ function In(e) {
1541
1547
  e === void 0 && (e = {});
1542
1548
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1543
1549
  function a() {
1544
- var i = Ee(n.location.hash.substr(1)), w = i.pathname, L = w === void 0 ? "/" : w, U = i.search, C = U === void 0 ? "" : U, V = i.hash, _ = V === void 0 ? "" : V, H = o.state || {};
1545
- return [H.idx, me({
1546
- pathname: L,
1550
+ var u = we(n.location.hash.substr(1)), d = u.pathname, x = d === void 0 ? "/" : d, U = u.search, C = U === void 0 ? "" : U, V = u.hash, O = V === void 0 ? "" : V, q = o.state || {};
1551
+ return [q.idx, pe({
1552
+ pathname: x,
1547
1553
  search: C,
1548
- hash: _,
1549
- state: H.usr || null,
1550
- key: H.key || "default"
1554
+ hash: O,
1555
+ state: q.usr || null,
1556
+ key: q.key || "default"
1551
1557
  })];
1552
1558
  }
1553
1559
  var s = null;
1554
- function f() {
1560
+ function l() {
1555
1561
  if (s)
1556
- k.call(s), s = null;
1562
+ S.call(s), s = null;
1557
1563
  else {
1558
- var i = j.Pop, w = a(), L = w[0], U = w[1];
1559
- if (k.length)
1560
- if (L != null) {
1561
- var C = h - L;
1564
+ var u = j.Pop, d = a(), x = d[0], U = d[1];
1565
+ if (S.length)
1566
+ if (x != null) {
1567
+ var C = y - x;
1562
1568
  C && (s = {
1563
- action: i,
1569
+ action: u,
1564
1570
  location: U,
1565
1571
  retry: function() {
1566
1572
  A(C * -1);
1567
1573
  }
1568
1574
  }, A(C));
1569
1575
  } else
1570
- process.env.NODE_ENV !== "production" && te(
1576
+ process.env.NODE_ENV !== "production" && X(
1571
1577
  !1,
1572
1578
  // TODO: Write up a doc that explains our blocking strategy in
1573
1579
  // detail and link to it here so people can understand better
@@ -1575,98 +1581,98 @@ function Fn(e) {
1575
1581
  "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."
1576
1582
  );
1577
1583
  else
1578
- m(i);
1584
+ i(u);
1579
1585
  }
1580
1586
  }
1581
- n.addEventListener(dr, f), n.addEventListener(Dn, function() {
1582
- var i = a(), w = i[1];
1583
- re(w) !== re(b) && f();
1587
+ n.addEventListener(mr, l), n.addEventListener(qn, function() {
1588
+ var u = a(), d = u[1];
1589
+ ee(d) !== ee(b) && l();
1584
1590
  });
1585
- var p = j.Pop, l = a(), h = l[0], b = l[1], x = ye(), k = ye();
1586
- h == null && (h = 0, o.replaceState(Y({}, o.state, {
1587
- idx: h
1591
+ var p = j.Pop, c = a(), y = c[0], b = c[1], L = de(), S = de();
1592
+ y == null && (y = 0, o.replaceState(K({}, o.state, {
1593
+ idx: y
1588
1594
  }), ""));
1589
- function g() {
1590
- var i = document.querySelector("base"), w = "";
1591
- if (i && i.getAttribute("href")) {
1592
- var L = n.location.href, U = L.indexOf("#");
1593
- w = U === -1 ? L : L.slice(0, U);
1595
+ function w() {
1596
+ var u = document.querySelector("base"), d = "";
1597
+ if (u && u.getAttribute("href")) {
1598
+ var x = n.location.href, U = x.indexOf("#");
1599
+ d = U === -1 ? x : x.slice(0, U);
1594
1600
  }
1595
- return w;
1601
+ return d;
1596
1602
  }
1597
- function d(i) {
1598
- return g() + "#" + (typeof i == "string" ? i : re(i));
1603
+ function m(u) {
1604
+ return w() + "#" + (typeof u == "string" ? u : ee(u));
1599
1605
  }
1600
- function c(i, w) {
1601
- return w === void 0 && (w = null), me(Y({
1606
+ function h(u, d) {
1607
+ return d === void 0 && (d = null), pe(K({
1602
1608
  pathname: b.pathname,
1603
1609
  hash: "",
1604
1610
  search: ""
1605
- }, typeof i == "string" ? Ee(i) : i, {
1606
- state: w,
1607
- key: Ze()
1611
+ }, typeof u == "string" ? we(u) : u, {
1612
+ state: d,
1613
+ key: Ce()
1608
1614
  }));
1609
1615
  }
1610
- function u(i, w) {
1616
+ function R(u, d) {
1611
1617
  return [{
1612
- usr: i.state,
1613
- key: i.key,
1614
- idx: w
1615
- }, d(i)];
1616
- }
1617
- function P(i, w, L) {
1618
- return !k.length || (k.call({
1619
- action: i,
1620
- location: w,
1621
- retry: L
1618
+ usr: u.state,
1619
+ key: u.key,
1620
+ idx: d
1621
+ }, m(u)];
1622
+ }
1623
+ function f(u, d, x) {
1624
+ return !S.length || (S.call({
1625
+ action: u,
1626
+ location: d,
1627
+ retry: x
1622
1628
  }), !1);
1623
1629
  }
1624
- function m(i) {
1625
- p = i;
1626
- var w = a();
1627
- h = w[0], b = w[1], x.call({
1630
+ function i(u) {
1631
+ p = u;
1632
+ var d = a();
1633
+ y = d[0], b = d[1], L.call({
1628
1634
  action: p,
1629
1635
  location: b
1630
1636
  });
1631
1637
  }
1632
- function R(i, w) {
1633
- var L = j.Push, U = c(i, w);
1638
+ function E(u, d) {
1639
+ var x = j.Push, U = h(u, d);
1634
1640
  function C() {
1635
- R(i, w);
1641
+ E(u, d);
1636
1642
  }
1637
- if (process.env.NODE_ENV !== "production" && te(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(i) + ")"), P(L, U, C)) {
1638
- var V = u(U, h + 1), _ = V[0], H = V[1];
1643
+ if (process.env.NODE_ENV !== "production" && X(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(u) + ")"), f(x, U, C)) {
1644
+ var V = R(U, y + 1), O = V[0], q = V[1];
1639
1645
  try {
1640
- o.pushState(_, "", H);
1646
+ o.pushState(O, "", q);
1641
1647
  } catch {
1642
- n.location.assign(H);
1648
+ n.location.assign(q);
1643
1649
  }
1644
- m(L);
1650
+ i(x);
1645
1651
  }
1646
1652
  }
1647
- function S(i, w) {
1648
- var L = j.Replace, U = c(i, w);
1653
+ function k(u, d) {
1654
+ var x = j.Replace, U = h(u, d);
1649
1655
  function C() {
1650
- S(i, w);
1656
+ k(u, d);
1651
1657
  }
1652
- if (process.env.NODE_ENV !== "production" && te(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(i) + ")"), P(L, U, C)) {
1653
- var V = u(U, h), _ = V[0], H = V[1];
1654
- o.replaceState(_, "", H), m(L);
1658
+ if (process.env.NODE_ENV !== "production" && X(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(u) + ")"), f(x, U, C)) {
1659
+ var V = R(U, y), O = V[0], q = V[1];
1660
+ o.replaceState(O, "", q), i(x);
1655
1661
  }
1656
1662
  }
1657
- function A(i) {
1658
- o.go(i);
1663
+ function A(u) {
1664
+ o.go(u);
1659
1665
  }
1660
- var y = {
1666
+ var g = {
1661
1667
  get action() {
1662
1668
  return p;
1663
1669
  },
1664
1670
  get location() {
1665
1671
  return b;
1666
1672
  },
1667
- createHref: d,
1668
- push: R,
1669
- replace: S,
1673
+ createHref: m,
1674
+ push: E,
1675
+ replace: k,
1670
1676
  go: A,
1671
1677
  back: function() {
1672
1678
  A(-1);
@@ -1674,113 +1680,113 @@ function Fn(e) {
1674
1680
  forward: function() {
1675
1681
  A(1);
1676
1682
  },
1677
- listen: function(w) {
1678
- return x.push(w);
1683
+ listen: function(d) {
1684
+ return L.push(d);
1679
1685
  },
1680
- block: function(w) {
1681
- var L = k.push(w);
1682
- return k.length === 1 && n.addEventListener(Ne, Ve), function() {
1683
- L(), k.length || n.removeEventListener(Ne, Ve);
1686
+ block: function(d) {
1687
+ var x = S.push(d);
1688
+ return S.length === 1 && n.addEventListener(Le, Be), function() {
1689
+ x(), S.length || n.removeEventListener(Le, Be);
1684
1690
  };
1685
1691
  }
1686
1692
  };
1687
- return y;
1693
+ return g;
1688
1694
  }
1689
- function vt(e) {
1695
+ function wt(e) {
1690
1696
  e === void 0 && (e = {});
1691
- var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(m) {
1692
- var R = me(Y({
1697
+ var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(i) {
1698
+ var E = pe(K({
1693
1699
  pathname: "/",
1694
1700
  search: "",
1695
1701
  hash: "",
1696
1702
  state: null,
1697
- key: Ze()
1698
- }, typeof m == "string" ? Ee(m) : m));
1699
- return process.env.NODE_ENV !== "production" && te(R.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(m) + ")"), R;
1700
- }), s = Et(o ?? a.length - 1, 0, a.length - 1), f = j.Pop, p = a[s], l = ye(), h = ye();
1701
- function b(m) {
1702
- return typeof m == "string" ? m : re(m);
1703
- }
1704
- function x(m, R) {
1705
- return R === void 0 && (R = null), me(Y({
1703
+ key: Ce()
1704
+ }, typeof i == "string" ? we(i) : i));
1705
+ return process.env.NODE_ENV !== "production" && X(E.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(i) + ")"), E;
1706
+ }), s = vt(o ?? a.length - 1, 0, a.length - 1), l = j.Pop, p = a[s], c = de(), y = de();
1707
+ function b(i) {
1708
+ return typeof i == "string" ? i : ee(i);
1709
+ }
1710
+ function L(i, E) {
1711
+ return E === void 0 && (E = null), pe(K({
1706
1712
  pathname: p.pathname,
1707
1713
  search: "",
1708
1714
  hash: ""
1709
- }, typeof m == "string" ? Ee(m) : m, {
1710
- state: R,
1711
- key: Ze()
1715
+ }, typeof i == "string" ? we(i) : i, {
1716
+ state: E,
1717
+ key: Ce()
1712
1718
  }));
1713
1719
  }
1714
- function k(m, R, S) {
1715
- return !h.length || (h.call({
1716
- action: m,
1717
- location: R,
1718
- retry: S
1720
+ function S(i, E, k) {
1721
+ return !y.length || (y.call({
1722
+ action: i,
1723
+ location: E,
1724
+ retry: k
1719
1725
  }), !1);
1720
1726
  }
1721
- function g(m, R) {
1722
- f = m, p = R, l.call({
1723
- action: f,
1727
+ function w(i, E) {
1728
+ l = i, p = E, c.call({
1729
+ action: l,
1724
1730
  location: p
1725
1731
  });
1726
1732
  }
1727
- function d(m, R) {
1728
- var S = j.Push, A = x(m, R);
1729
- function y() {
1730
- d(m, R);
1733
+ function m(i, E) {
1734
+ var k = j.Push, A = L(i, E);
1735
+ function g() {
1736
+ m(i, E);
1731
1737
  }
1732
- process.env.NODE_ENV !== "production" && te(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(m) + ")"), k(S, A, y) && (s += 1, a.splice(s, a.length, A), g(S, A));
1738
+ process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(i) + ")"), S(k, A, g) && (s += 1, a.splice(s, a.length, A), w(k, A));
1733
1739
  }
1734
- function c(m, R) {
1735
- var S = j.Replace, A = x(m, R);
1736
- function y() {
1737
- c(m, R);
1740
+ function h(i, E) {
1741
+ var k = j.Replace, A = L(i, E);
1742
+ function g() {
1743
+ h(i, E);
1738
1744
  }
1739
- process.env.NODE_ENV !== "production" && te(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(m) + ")"), k(S, A, y) && (a[s] = A, g(S, A));
1745
+ process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(i) + ")"), S(k, A, g) && (a[s] = A, w(k, A));
1740
1746
  }
1741
- function u(m) {
1742
- var R = Et(s + m, 0, a.length - 1), S = j.Pop, A = a[R];
1743
- function y() {
1744
- u(m);
1747
+ function R(i) {
1748
+ var E = vt(s + i, 0, a.length - 1), k = j.Pop, A = a[E];
1749
+ function g() {
1750
+ R(i);
1745
1751
  }
1746
- k(S, A, y) && (s = R, g(S, A));
1752
+ S(k, A, g) && (s = E, w(k, A));
1747
1753
  }
1748
- var P = {
1754
+ var f = {
1749
1755
  get index() {
1750
1756
  return s;
1751
1757
  },
1752
1758
  get action() {
1753
- return f;
1759
+ return l;
1754
1760
  },
1755
1761
  get location() {
1756
1762
  return p;
1757
1763
  },
1758
1764
  createHref: b,
1759
- push: d,
1760
- replace: c,
1761
- go: u,
1765
+ push: m,
1766
+ replace: h,
1767
+ go: R,
1762
1768
  back: function() {
1763
- u(-1);
1769
+ R(-1);
1764
1770
  },
1765
1771
  forward: function() {
1766
- u(1);
1772
+ R(1);
1767
1773
  },
1768
- listen: function(R) {
1769
- return l.push(R);
1774
+ listen: function(E) {
1775
+ return c.push(E);
1770
1776
  },
1771
- block: function(R) {
1772
- return h.push(R);
1777
+ block: function(E) {
1778
+ return y.push(E);
1773
1779
  }
1774
1780
  };
1775
- return P;
1781
+ return f;
1776
1782
  }
1777
- function Et(e, t, r) {
1783
+ function vt(e, t, r) {
1778
1784
  return Math.min(Math.max(e, t), r);
1779
1785
  }
1780
- function Ve(e) {
1786
+ function Be(e) {
1781
1787
  e.preventDefault(), e.returnValue = "";
1782
1788
  }
1783
- function ye() {
1789
+ function de() {
1784
1790
  var e = [];
1785
1791
  return {
1786
1792
  get length() {
@@ -1800,14 +1806,14 @@ function ye() {
1800
1806
  }
1801
1807
  };
1802
1808
  }
1803
- function Ze() {
1809
+ function Ce() {
1804
1810
  return Math.random().toString(36).substr(2, 8);
1805
1811
  }
1806
- function re(e) {
1812
+ function ee(e) {
1807
1813
  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;
1808
1814
  return o && o !== "?" && (r += o.charAt(0) === "?" ? o : "?" + o), s && s !== "#" && (r += s.charAt(0) === "#" ? s : "#" + s), r;
1809
1815
  }
1810
- function Ee(e) {
1816
+ function we(e) {
1811
1817
  var t = {};
1812
1818
  if (e) {
1813
1819
  var r = e.indexOf("#");
@@ -1817,24 +1823,24 @@ function Ee(e) {
1817
1823
  }
1818
1824
  return t;
1819
1825
  }
1820
- const mr = Symbol();
1821
- function Mn(e, t) {
1822
- const r = $e({ ...e }), n = (s) => {
1826
+ const yr = Symbol();
1827
+ function Dn(e, t) {
1828
+ const r = Ve({ ...e }), n = (s) => {
1823
1829
  Object.assign(r, {
1824
- [mr]: !1,
1830
+ [yr]: !1,
1825
1831
  ...s
1826
1832
  });
1827
- }, o = r, a = kn(o, t);
1833
+ }, o = r, a = Sn(o, t);
1828
1834
  return {
1829
1835
  currentRoute: o,
1830
1836
  routerRoute: a,
1831
1837
  updateRoute: n
1832
1838
  };
1833
1839
  }
1834
- function q(e) {
1835
- return !e.startsWith("http") ? Jn(e) : Tn(e);
1840
+ function _(e) {
1841
+ return !e.startsWith("http") ? Tn(e) : Fn(e);
1836
1842
  }
1837
- function Tn(e) {
1843
+ function Fn(e) {
1838
1844
  const { protocol: t, host: r, pathname: n, search: o, searchParams: a, hash: s } = new URL(e, e);
1839
1845
  return {
1840
1846
  protocol: t,
@@ -1845,7 +1851,7 @@ function Tn(e) {
1845
1851
  hash: s
1846
1852
  };
1847
1853
  }
1848
- function Jn(e) {
1854
+ function Tn(e) {
1849
1855
  const { pathname: t, search: r, searchParams: n, hash: o } = new URL(e, "https://localhost");
1850
1856
  return {
1851
1857
  pathname: t,
@@ -1854,21 +1860,21 @@ function Jn(e) {
1854
1860
  hash: o
1855
1861
  };
1856
1862
  }
1857
- function Wn(e) {
1863
+ function Mn(e) {
1858
1864
  return (t) => {
1859
- const { host: r } = q(t);
1865
+ const { host: r } = _(t);
1860
1866
  return !(r === void 0 || r === e);
1861
1867
  };
1862
1868
  }
1863
- function Gn({ mode: e, listener: t }) {
1864
- const r = Qn(e), n = (p, l) => {
1865
- if (l != null && l.replace) {
1866
- r.replace(p, l.state);
1869
+ function Jn({ mode: e, listener: t }) {
1870
+ const r = Wn(e), n = (p, c) => {
1871
+ if (c != null && c.replace) {
1872
+ r.replace(p, c.state);
1867
1873
  return;
1868
1874
  }
1869
- r.push(p, l == null ? void 0 : l.state);
1875
+ r.push(p, c == null ? void 0 : c.state);
1870
1876
  }, o = () => {
1871
- const p = re(r.location);
1877
+ const p = ee(r.location);
1872
1878
  r.replace(p);
1873
1879
  };
1874
1880
  let a;
@@ -1884,46 +1890,46 @@ function Gn({ mode: e, listener: t }) {
1884
1890
  }
1885
1891
  };
1886
1892
  }
1887
- function Qn(e = "auto") {
1893
+ function Wn(e = "auto") {
1888
1894
  switch (e) {
1889
1895
  case "auto":
1890
- return rt() ? wt() : vt();
1896
+ return tt() ? Rt() : wt();
1891
1897
  case "browser":
1892
- return wt();
1898
+ return Rt();
1893
1899
  case "memory":
1894
- return vt();
1900
+ return wt();
1895
1901
  case "hash":
1896
- return Fn();
1902
+ return In();
1897
1903
  default:
1898
1904
  const t = e;
1899
1905
  throw new Error(`Switch is not exhaustive for mode: ${t}`);
1900
1906
  }
1901
1907
  }
1902
- function zn(e) {
1903
- return ge(() => () => le("h1", e), {
1908
+ function Gn(e) {
1909
+ return me(() => () => ue("h1", e), {
1904
1910
  name: e,
1905
1911
  props: []
1906
1912
  });
1907
1913
  }
1908
- function Kn(e) {
1909
- const t = (a) => xe(e[a] ?? zn(a)), r = (a) => {
1910
- const s = xe(t(a)), f = {
1911
- id: at(),
1914
+ function zn(e) {
1915
+ const t = (a) => Ae(e[a] ?? Gn(a)), r = (a) => {
1916
+ const s = Ae(t(a)), l = {
1917
+ id: ot(),
1912
1918
  component: s,
1913
1919
  meta: {},
1914
1920
  state: {}
1915
1921
  };
1916
1922
  return {
1917
- id: f.id,
1918
- matched: f,
1919
- matches: [f],
1923
+ id: l.id,
1924
+ matched: l,
1925
+ matches: [l],
1920
1926
  name: a,
1921
- query: nt(""),
1927
+ query: rt(""),
1922
1928
  params: {},
1923
1929
  state: {},
1924
1930
  href: "/",
1925
1931
  hash: "",
1926
- [mr]: !0
1932
+ [yr]: !0
1927
1933
  };
1928
1934
  }, n = (a) => {
1929
1935
  if (!a) {
@@ -1932,70 +1938,70 @@ function Kn(e) {
1932
1938
  }
1933
1939
  const s = t(a);
1934
1940
  o.value = { type: a, component: s };
1935
- }, o = He(null);
1941
+ }, o = je(null);
1936
1942
  return {
1937
1943
  setRejection: n,
1938
1944
  rejection: o,
1939
1945
  getRejectionRoute: r
1940
1946
  };
1941
1947
  }
1942
- class Yn extends Error {
1948
+ class Qn extends Error {
1943
1949
  constructor() {
1944
1950
  super("initialUrl must be set if window.location is unavailable");
1945
1951
  }
1946
1952
  }
1947
- function Xn(e) {
1953
+ function Kn(e) {
1948
1954
  if (e)
1949
1955
  return e;
1950
- if (rt())
1956
+ if (tt())
1951
1957
  return window.location.toString();
1952
- throw new Yn();
1958
+ throw new Qn();
1953
1959
  }
1954
- function yr(e) {
1960
+ function gr(e) {
1955
1961
  return !!e && typeof e == "object";
1956
1962
  }
1957
- const je = !0;
1958
- function eo(e, t, r) {
1959
- if (yr(e) && t in e) {
1963
+ const Ne = !0;
1964
+ function Yn(e, t, r) {
1965
+ if (gr(e) && t in e) {
1960
1966
  const n = e[t];
1961
- return typeof n == "string" ? oe(n, r, je) : n;
1967
+ return typeof n == "string" ? re(n, r, Ne) : n;
1962
1968
  }
1963
- return oe(void 0, r, je);
1969
+ return re(void 0, r, Ne);
1964
1970
  }
1965
- function gr(e, t) {
1971
+ function Rr(e, t) {
1966
1972
  const r = {};
1967
1973
  for (const [n, o] of Object.entries(e)) {
1968
- const a = eo(t, n, o);
1974
+ const a = Yn(t, n, o);
1969
1975
  r[n] = a;
1970
1976
  }
1971
1977
  return r;
1972
1978
  }
1973
- function to(e, t, r) {
1974
- if (yr(e) && t in e) {
1979
+ function Xn(e, t, r) {
1980
+ if (gr(e) && t in e) {
1975
1981
  const n = e[t];
1976
- return ae(n, r, je);
1982
+ return ne(n, r, Ne);
1977
1983
  }
1978
- return ae(void 0, r, je);
1984
+ return ne(void 0, r, Ne);
1979
1985
  }
1980
- const Pt = (e, t) => {
1986
+ const Et = (e, t) => {
1981
1987
  const r = {};
1982
1988
  for (const [n, o] of Object.entries(e)) {
1983
- const a = to(t, n, o);
1989
+ const a = Xn(t, n, o);
1984
1990
  r[n] = a;
1985
1991
  }
1986
1992
  return r;
1987
1993
  };
1988
- function ro() {
1989
- const e = $e(/* @__PURE__ */ new Map()), t = rt() ? s() : null, r = (f) => {
1990
- e.set(f, !1), t == null || t.observe(f);
1991
- }, n = (f) => {
1992
- e.delete(f), t == null || t.unobserve(f);
1994
+ function eo() {
1995
+ const e = Ve(/* @__PURE__ */ new Map()), t = tt() ? s() : null, r = (l) => {
1996
+ e.set(l, !1), t == null || t.observe(l);
1997
+ }, n = (l) => {
1998
+ e.delete(l), t == null || t.unobserve(l);
1993
1999
  }, o = () => {
1994
2000
  t == null || t.disconnect();
1995
- }, a = (f) => e.get(f) ?? !1;
2001
+ }, a = (l) => e.get(l) ?? !1;
1996
2002
  function s() {
1997
- return new IntersectionObserver((f) => {
1998
- f.forEach((p) => {
2003
+ return new IntersectionObserver((l) => {
2004
+ l.forEach((p) => {
1999
2005
  e.set(p.target, p.isIntersecting);
2000
2006
  });
2001
2007
  });
@@ -2007,203 +2013,175 @@ function ro() {
2007
2013
  isElementVisible: a
2008
2014
  };
2009
2015
  }
2010
- class no extends Error {
2016
+ class to extends Error {
2011
2017
  constructor(t) {
2012
2018
  super(`Route not found: "${t}"`);
2013
2019
  }
2014
2020
  }
2015
- function Rr(e, t, r) {
2016
- const n = vr(t, r), [o] = Ue(e, n);
2017
- return o;
2018
- }
2019
- function wr(e, t) {
2020
- if (!t)
2021
- return e;
2022
- const { name: r, param: n, value: o } = t, a = vr(e, r);
2023
- return Ue(e, a).reduce((f, p) => p === void 0 ? f : f.replace(p, () => ae(o, n, r.startsWith("?"))), e);
2024
- }
2025
- function vr(e, t) {
2026
- const r = [
2027
- oo,
2028
- ao,
2029
- It
2030
- ].reduce((n, o) => o(n, t), e);
2031
- return new RegExp(r, "g");
2032
- }
2033
- function oo(e, t) {
2034
- if (!t.startsWith("?"))
2035
- return e;
2036
- const r = new RegExp(`\\${z}\\${t}\\${X}`, "g");
2037
- return e.replace(r, "(.*)");
2021
+ function wr(e, t, r) {
2022
+ const n = tn(t.value, r), o = qt(n), [a] = Dt(e, new RegExp(o, "g"));
2023
+ return a;
2038
2024
  }
2039
- function ao(e, t) {
2040
- if (t.startsWith("?"))
2041
- return e;
2042
- const r = new RegExp(`\\${z}${t}\\${X}`, "g");
2043
- return e.replace(r, "(.+)");
2025
+ function vr(e, t, r, n) {
2026
+ const o = Ye(t, r), a = ne(n, t.params[r], o);
2027
+ return e.replace(It(r), a);
2044
2028
  }
2045
2029
  function Er({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
2046
2030
  const s = new URL("https://localhost");
2047
2031
  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);
2048
- const f = s.toString().replace(/^https:\/\/localhost\/*/, "/");
2049
- return Bt(f);
2032
+ const l = s.toString().replace(/^https:\/\/localhost\/*/, "/");
2033
+ return Lt(l);
2050
2034
  }
2051
- function so(e, t = {}) {
2052
- const { params: r = {}, query: n } = t, o = io(e.query, r), a = ct(o, n), s = bt(e.path, r), f = e.hash.value ? bt(e.hash, r) : t.hash, p = co(e.host, r), { protocol: l, host: h } = q(p);
2053
- return Er({ protocol: l, host: h, pathname: s, searchParams: a, hash: f });
2035
+ function ro(e, t = {}) {
2036
+ const { params: r = {}, query: n } = t, o = oo(e.query, r), a = st(o, n), s = bt(e.path, r), l = e.hash.value ? bt(e.hash, r) : t.hash, p = no(e.host, r), { protocol: c, host: y } = _(p);
2037
+ return Er({ protocol: c, host: y, pathname: s, searchParams: a, hash: l });
2054
2038
  }
2055
- function co(e, t) {
2039
+ function no(e, t) {
2056
2040
  const r = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
2057
- return Object.entries(e.params).reduce((n, [o, a]) => {
2058
- const s = Pe(`${z}${o}${X}`);
2059
- return s ? wr(n, { name: o, param: a, value: t[s] }) : n;
2060
- }, r);
2041
+ return Object.keys(e.params).reduce((n, o) => vr(n, e, o, t[o]), r);
2061
2042
  }
2062
2043
  function bt(e, t) {
2063
- return Object.entries(e.params).reduce((r, [n, o]) => {
2064
- const a = Pe(`${z}${n}${X}`);
2065
- return a ? wr(r, { name: n, param: o, value: t[a] }) : r;
2066
- }, e.value);
2044
+ return Object.keys(e.params).reduce((r, n) => vr(r, e, n, t[n]), e.value);
2067
2045
  }
2068
- function io(e, t) {
2046
+ function oo(e, t) {
2069
2047
  const r = new URLSearchParams(e.value);
2070
2048
  if (!e.value)
2071
2049
  return r;
2072
2050
  for (const [n, o] of Array.from(r.entries())) {
2073
- const a = Pe(o);
2051
+ const a = et(o);
2074
2052
  if (!a)
2075
2053
  continue;
2076
- const f = tt(o), p = f ? `?${a}` : a, l = ae(t[a], e.params[p], f), h = t[a] === void 0 && l === "";
2077
- f && h ? r.delete(n, o) : r.set(n, l);
2054
+ const l = Xe(o), p = ne(t[a], e.params[a], l), c = t[a] === void 0 && p === "";
2055
+ l && c ? r.delete(n, o) : r.set(n, p);
2078
2056
  }
2079
2057
  return r;
2080
2058
  }
2081
- const uo = (e, t) => {
2059
+ const ao = (e, t) => {
2082
2060
  try {
2083
- ut(e, t);
2061
+ it(e, t);
2084
2062
  } catch {
2085
2063
  return !1;
2086
2064
  }
2087
2065
  return !0;
2088
- }, ut = (e, t) => {
2089
- const { protocol: r, host: n, pathname: o, search: a, hash: s } = q(t);
2066
+ }, it = (e, t) => {
2067
+ const { protocol: r, host: n, pathname: o, search: a, hash: s } = _(t);
2090
2068
  return {
2091
2069
  ...Te(e.host, `${r}//${n}`),
2092
2070
  ...Te(e.path, o),
2093
- ...fo(e.query, a),
2071
+ ...so(e.query, a),
2094
2072
  ...Te(e.hash, s)
2095
2073
  };
2096
2074
  };
2097
2075
  function Te(e, t) {
2098
2076
  const r = {}, n = decodeURIComponent(t);
2099
2077
  for (const [o, a] of Object.entries(e.params)) {
2100
- const s = o.startsWith("?"), f = s ? o.slice(1) : o, p = Rr(n, e.value, o), l = oe(p, a, s);
2101
- r[f] = l;
2078
+ const s = wr(n, e, o), l = Ye(e, o), p = re(s, a, l);
2079
+ r[o] = p;
2102
2080
  }
2103
2081
  return r;
2104
2082
  }
2105
- function fo(e, t) {
2083
+ function so(e, t) {
2106
2084
  const r = {}, n = new URLSearchParams(e.value), o = new URLSearchParams(t);
2107
2085
  for (const [a, s] of Array.from(n.entries())) {
2108
- const f = Pe(s);
2109
- if (!f)
2086
+ const l = et(s);
2087
+ if (!l)
2110
2088
  continue;
2111
- const l = tt(s), h = l ? `?${f}` : f, b = o.get(a) ?? void 0, x = oe(b, e.params[h], l);
2112
- r[f] = x;
2089
+ const c = Xe(s), y = o.get(a) ?? void 0, b = re(y, e.params[l], c);
2090
+ r[l] = b;
2113
2091
  }
2114
2092
  return r;
2115
2093
  }
2116
- function lo(e, t = {}, r = {}) {
2117
- const n = so(e, {
2094
+ function co(e, t = {}, r = {}) {
2095
+ const n = ro(e, {
2118
2096
  params: t,
2119
2097
  query: r.query,
2120
2098
  hash: r.hash
2121
- }), { search: o, hash: a } = q(n);
2099
+ }), { search: o, hash: a } = _(n);
2122
2100
  return {
2123
2101
  id: e.id,
2124
2102
  matched: e.matched,
2125
2103
  matches: e.matches,
2126
2104
  name: e.name,
2127
- query: nt(o),
2128
- params: ut(e, n),
2129
- state: gr(e.state, r.state),
2105
+ query: rt(o),
2106
+ params: it(e, n),
2107
+ state: Rr(e.state, r.state),
2130
2108
  hash: a,
2131
2109
  href: n
2132
2110
  };
2133
2111
  }
2134
- const ho = (e) => "name" in e.matched && !!e.matched.name, po = (e, t) => {
2135
- const { pathname: r } = q(t);
2136
- return tn(e).test(r);
2137
- }, mo = (e, t) => {
2138
- const { search: r } = q(t);
2139
- return rn(e).every((o) => o.test(r));
2140
- }, Qe = (e, t) => {
2141
- const { hash: r } = q(t), { value: n } = e.hash;
2112
+ const io = (e) => "name" in e.matched && !!e.matched.name, uo = (e, t) => {
2113
+ const { pathname: r } = _(t);
2114
+ return Xr(e).test(r);
2115
+ }, fo = (e, t) => {
2116
+ const { search: r } = _(t);
2117
+ return en(e).every((o) => o.test(r));
2118
+ }, We = (e, t) => {
2119
+ const { hash: r } = _(t), { value: n } = e.hash;
2142
2120
  return J(n) ? `#${n.replace(/^#*/, "")}`.toLowerCase() === r.toLowerCase() : !0;
2143
2121
  };
2144
- function yo(e) {
2145
- const { searchParams: t, pathname: r } = q(e), n = -1, o = 1;
2122
+ function lo(e) {
2123
+ const { searchParams: t, pathname: r } = _(e), n = -1, o = 1;
2146
2124
  return (a, s) => {
2147
- const f = At(a, t), p = St(a, r), l = At(s, t), h = St(s, r);
2148
- return a.depth > s.depth ? n : a.depth < s.depth ? o : f + p > l + h ? n : f + p < l + h ? o : Qe(a, e) ? n : Qe(s, e) ? o : 0;
2125
+ const l = St(a, t), p = Pt(a, r), c = St(s, t), y = Pt(s, r);
2126
+ return a.depth > s.depth ? n : a.depth < s.depth ? o : l + p > c + y ? n : l + p < c + y ? o : We(a, e) ? n : We(s, e) ? o : 0;
2149
2127
  };
2150
2128
  }
2151
- function St(e, t) {
2152
- const r = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), n = r.filter((o) => Rr(t, e.path.value, o) === void 0);
2129
+ function Pt(e, t) {
2130
+ const r = Object.keys(e.path.params).filter((o) => Ye(e.path, o)).map((o) => o), n = r.filter((o) => wr(t, e.path, o) === void 0);
2153
2131
  return r.length - n.length;
2154
2132
  }
2155
- function At(e, t) {
2133
+ function St(e, t) {
2156
2134
  const r = new URLSearchParams(t), n = new URLSearchParams(e.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
2157
2135
  return o.length - a.length;
2158
2136
  }
2159
- const go = [
2160
- ho,
2161
- po,
2162
- mo,
2163
- Qe,
2164
- uo
2137
+ const ho = [
2138
+ io,
2139
+ uo,
2140
+ fo,
2141
+ We,
2142
+ ao
2165
2143
  ];
2166
- function Ro(e, t) {
2167
- const r = yo(t);
2168
- return e.filter((n) => go.every((o) => o(n, t))).sort(r);
2144
+ function po(e, t) {
2145
+ const r = lo(t);
2146
+ return e.filter((n) => ho.every((o) => o(n, t))).sort(r);
2169
2147
  }
2170
- function wo(e, t, r) {
2171
- const n = Ro(e, t);
2148
+ function mo(e, t, r) {
2149
+ const n = po(e, t);
2172
2150
  if (!n.length)
2173
2151
  return;
2174
- const [o] = n, { searchParams: a, hash: s } = q(t);
2152
+ const [o] = n, { searchParams: a, hash: s } = _(t);
2175
2153
  return {
2176
2154
  id: o.id,
2177
2155
  matched: o.matched,
2178
2156
  matches: o.matches,
2179
2157
  name: o.name,
2180
- query: nt(a),
2181
- params: ut(o, t),
2182
- state: gr(o.state, r),
2158
+ query: rt(a),
2159
+ params: it(o, t),
2160
+ state: Rr(o.state, r),
2183
2161
  hash: s,
2184
- href: Bt(t)
2162
+ href: Lt(t)
2185
2163
  };
2186
2164
  }
2187
- function kt(e, t) {
2188
- 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);
2165
+ function At(e, t) {
2166
+ 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);
2189
2167
  return Er({
2190
2168
  protocol: J(n.protocol) ? n.protocol : r.protocol,
2191
2169
  host: J(n.host) ? n.host : r.host,
2192
2170
  pathname: J(n.pathname) ? n.pathname : r.pathname,
2193
- searchParams: ct(a, o),
2171
+ searchParams: st(a, o),
2194
2172
  hash: J(n.hash) ? n.hash : r.hash
2195
2173
  });
2196
2174
  }
2197
- function vo(e, t) {
2175
+ function yo(e, t) {
2198
2176
  return J(t) ? e.map((r) => {
2199
2177
  const n = `${t}${r.path.value}`;
2200
2178
  return {
2201
2179
  ...r,
2202
- path: Q(n, r.path.params)
2180
+ path: z(n, r.path.params)
2203
2181
  };
2204
2182
  }) : e;
2205
2183
  }
2206
- class Eo extends Error {
2184
+ class go extends Error {
2207
2185
  /**
2208
2186
  * Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
2209
2187
  * @param name - The name of the name that was duplicated.
@@ -2212,93 +2190,92 @@ class Eo extends Error {
2212
2190
  super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
2213
2191
  }
2214
2192
  }
2215
- function Po(e) {
2193
+ function Ro(e) {
2216
2194
  const t = e.map(({ name: r }) => r);
2217
2195
  for (const r of t)
2218
- if (Nt(t, r) > 1)
2219
- throw new Eo(r);
2196
+ if (Ct(t, r) > 1)
2197
+ throw new go(r);
2220
2198
  }
2221
- function bo(e, t = [], r) {
2199
+ function wo(e, t = [], r) {
2222
2200
  const n = [
2223
2201
  ...e,
2224
2202
  ...t.map((o) => o.routes)
2225
2203
  ].flat();
2226
- return Po(n), vo(n, r);
2204
+ return Ro(n), yo(n, r);
2227
2205
  }
2228
- function So(e = {}, t = []) {
2229
- const r = new se();
2230
- return ue("onBeforeRouteEnter", e, t).forEach((n) => r.onBeforeRouteEnter.add(n)), ue("onBeforeRouteUpdate", e, t).forEach((n) => r.onBeforeRouteUpdate.add(n)), ue("onBeforeRouteLeave", e, t).forEach((n) => r.onBeforeRouteLeave.add(n)), ue("onAfterRouteEnter", e, t).forEach((n) => r.onAfterRouteEnter.add(n)), ue("onAfterRouteUpdate", e, t).forEach((n) => r.onAfterRouteUpdate.add(n)), ue("onAfterRouteLeave", e, t).forEach((n) => r.onAfterRouteLeave.add(n)), r;
2206
+ function vo(e = {}, t = []) {
2207
+ const r = new oe();
2208
+ return ce("onBeforeRouteEnter", e, t).forEach((n) => r.onBeforeRouteEnter.add(n)), ce("onBeforeRouteUpdate", e, t).forEach((n) => r.onBeforeRouteUpdate.add(n)), ce("onBeforeRouteLeave", e, t).forEach((n) => r.onBeforeRouteLeave.add(n)), ce("onAfterRouteEnter", e, t).forEach((n) => r.onAfterRouteEnter.add(n)), ce("onAfterRouteUpdate", e, t).forEach((n) => r.onAfterRouteUpdate.add(n)), ce("onAfterRouteLeave", e, t).forEach((n) => r.onAfterRouteLeave.add(n)), r;
2231
2209
  }
2232
- function ue(e, t, r) {
2210
+ function ce(e, t, r) {
2233
2211
  return [
2234
2212
  t[e],
2235
2213
  ...r.map((o) => o[e])
2236
2214
  ].flat().filter((o) => o !== void 0);
2237
2215
  }
2238
- function Vo(e, t, r = []) {
2239
- let n = null;
2240
- const o = bo(e, r, t == null ? void 0 : t.base), a = In();
2241
- a.addGlobalRouteHooks(So(t, r));
2242
- const s = ot(), f = vn(), p = Zn(), l = ro(), h = Gn({
2216
+ function Co(e, t, r = []) {
2217
+ const n = wo(e, r, t == null ? void 0 : t.base), o = _n();
2218
+ o.addGlobalRouteHooks(vo(t, r));
2219
+ const a = nt(), s = Rn(), l = Nn(), p = eo(), c = Jn({
2243
2220
  mode: t == null ? void 0 : t.historyMode,
2244
- listener: ({ location: E }) => {
2245
- const B = re(E);
2246
- x(B, { state: E.state, replace: !0 });
2221
+ listener: ({ location: P }) => {
2222
+ const B = ee(P);
2223
+ b(B, { state: P.state, replace: !0 });
2247
2224
  }
2248
2225
  });
2249
- function b(E, B = {}) {
2250
- return wo(o, E, B.state);
2226
+ function y(P, B = {}) {
2227
+ return mo(n, P, B.state);
2251
2228
  }
2252
- async function x(E, B = {}) {
2253
- const W = s();
2254
- if (h.stopListening(), U(E)) {
2255
- h.update(E, B);
2229
+ async function b(P, B = {}) {
2230
+ const W = a();
2231
+ if (c.stopListening(), x(P)) {
2232
+ c.update(P, B);
2256
2233
  return;
2257
2234
  }
2258
- const I = b(E, B) ?? m("NotFound"), O = Pr(W), K = await a.runBeforeRouteHooks({ to: I, from: O, app: n });
2259
- switch (K.status) {
2235
+ const I = y(P, B) ?? f("NotFound"), H = ut(W), Q = await o.runBeforeRouteHooks({ to: I, from: H });
2236
+ switch (Q.status) {
2260
2237
  // On abort do nothing
2261
2238
  case "ABORT":
2262
2239
  return;
2263
2240
  // On push update the history, and push new route, and return
2264
2241
  case "PUSH":
2265
- h.update(E, B), await g(...K.to);
2242
+ c.update(P, B), await S(...Q.to);
2266
2243
  return;
2267
2244
  // On reject update the history, the route, and set the rejection type
2268
2245
  case "REJECT":
2269
- h.update(E, B), u(K.type);
2246
+ c.update(P, B), h(Q.type);
2270
2247
  break;
2271
2248
  // On success update history, set the route, and clear the rejection
2272
2249
  case "SUCCESS":
2273
- h.update(E, B), u(null);
2250
+ c.update(P, B), h(null);
2274
2251
  break;
2275
2252
  default:
2276
- throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(K)}`);
2253
+ throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(Q)}`);
2277
2254
  }
2278
- const qe = W;
2279
- f.setProps(I).then((D) => {
2280
- if (qe === W)
2255
+ const _e = W;
2256
+ s.setProps(I).then((D) => {
2257
+ if (_e === W)
2281
2258
  switch (D.status) {
2282
2259
  case "SUCCESS":
2283
2260
  break;
2284
2261
  case "PUSH":
2285
- g(...D.to);
2262
+ S(...D.to);
2286
2263
  break;
2287
2264
  case "REJECT":
2288
- u(D.type);
2265
+ h(D.type);
2289
2266
  break;
2290
2267
  default:
2291
- const Ie = D;
2292
- throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(Ie)}`);
2268
+ const qe = D;
2269
+ throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(qe)}`);
2293
2270
  }
2294
- }), y(I);
2295
- const F = await a.runAfterRouteHooks({ to: I, from: O, app: n });
2271
+ }), A(I);
2272
+ const F = await o.runAfterRouteHooks({ to: I, from: H });
2296
2273
  switch (F.status) {
2297
2274
  case "PUSH":
2298
- await g(...F.to);
2275
+ await S(...F.to);
2299
2276
  break;
2300
2277
  case "REJECT":
2301
- u(F.type);
2278
+ h(F.type);
2302
2279
  break;
2303
2280
  case "SUCCESS":
2304
2281
  break;
@@ -2306,100 +2283,100 @@ function Vo(e, t, r = []) {
2306
2283
  const D = F;
2307
2284
  throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(D)}`);
2308
2285
  }
2309
- h.startListening();
2286
+ c.startListening();
2310
2287
  }
2311
- const k = (E, B = {}, W = {}) => {
2312
- const I = o.find((O) => O.name === E);
2288
+ const L = (P, B = {}, W = {}) => {
2289
+ const I = n.find((H) => H.name === P);
2313
2290
  if (!I)
2314
- throw new no(String(E));
2315
- return lo(I, B, W);
2316
- }, g = (E, B, W) => {
2317
- if (T(E)) {
2318
- const F = { ...B }, D = kt(E, {
2291
+ throw new to(String(P));
2292
+ return co(I, B, W);
2293
+ }, S = (P, B, W) => {
2294
+ if (M(P)) {
2295
+ const F = { ...B }, D = At(P, {
2319
2296
  searchParams: F.query,
2320
2297
  hash: F.hash
2321
2298
  });
2322
- return x(D, F);
2299
+ return b(D, F);
2323
2300
  }
2324
- if (typeof E == "string") {
2325
- const { replace: F, ...D } = { ...W }, Ie = { ...B }, De = k(E, Ie, D), Sr = Pt({ ...De.matched.state }, { ...De.state, ...D.state });
2326
- return x(De.href, { replace: F, state: Sr });
2301
+ if (typeof P == "string") {
2302
+ const { replace: F, ...D } = { ...W }, qe = { ...B }, Ie = L(P, qe, D), Pr = Et({ ...Ie.matched.state }, { ...Ie.state, ...D.state });
2303
+ return b(Ie.href, { replace: F, state: Pr });
2327
2304
  }
2328
- const { replace: I, ...O } = { ...B }, K = Pt({ ...E.matched.state }, { ...E.state, ...O.state }), qe = kt(E.href, {
2329
- searchParams: O.query,
2330
- hash: O.hash
2305
+ const { replace: I, ...H } = { ...B }, Q = Et({ ...P.matched.state }, { ...P.state, ...H.state }), _e = At(P.href, {
2306
+ searchParams: H.query,
2307
+ hash: H.hash
2331
2308
  });
2332
- return x(qe, { replace: I, state: K });
2333
- }, d = (E, B, W) => {
2334
- if (T(E)) {
2335
- const O = { ...B, replace: !0 };
2336
- return g(E, O);
2309
+ return b(_e, { replace: I, state: Q });
2310
+ }, w = (P, B, W) => {
2311
+ if (M(P)) {
2312
+ const H = { ...B, replace: !0 };
2313
+ return S(P, H);
2337
2314
  }
2338
- if (typeof E == "string") {
2339
- const O = { ...W, replace: !0 }, K = { ...B };
2340
- return g(E, K, O);
2315
+ if (typeof P == "string") {
2316
+ const H = { ...W, replace: !0 }, Q = { ...B };
2317
+ return S(P, Q, H);
2341
2318
  }
2342
2319
  const I = { ...B, replace: !0 };
2343
- return g(E, I);
2344
- }, c = (E) => {
2345
- u(E);
2346
- }, { setRejection: u, rejection: P, getRejectionRoute: m } = Kn({
2347
- ...r.reduce((E, B) => ({ ...E, ...B.rejections }), {}),
2320
+ return S(P, I);
2321
+ }, m = (P) => {
2322
+ h(P);
2323
+ }, { setRejection: h, rejection: R, getRejectionRoute: f } = zn({
2324
+ ...r.reduce((P, B) => ({ ...P, ...B.rejections }), {}),
2348
2325
  ...t == null ? void 0 : t.rejections
2349
- }), R = m("NotFound"), { currentRoute: S, routerRoute: A, updateRoute: y } = Mn(R, g), i = Xn(t == null ? void 0 : t.initialUrl), w = h.location.state, { host: L } = q(i), U = Wn(L);
2350
- let C = !1;
2351
- const { promise: V, resolve: _ } = Promise.withResolvers();
2352
- async function H() {
2353
- if (C)
2354
- return V;
2355
- Wr(o) && await Gr(), C = !0, await x(i, { replace: !0, state: w }), h.startListening(), _();
2356
- }
2357
- function ft() {
2358
- h.stopListening();
2359
- }
2360
- function Pr(E) {
2361
- return mn(E) ? null : { ...S };
2362
- }
2363
- function br(E) {
2364
- n = E, f.setVueApp(E), E.component("RouterView", ur), E.component("RouterLink", Un), E.provide(ar, P), E.provide(fr, a), E.provide(er, f), E.provide(ir, p), E.provide(rr, l), E.provide(Ct, lt), H();
2365
- }
2366
- const lt = {
2367
- route: A,
2368
- resolve: k,
2369
- find: b,
2370
- push: g,
2371
- replace: d,
2372
- reject: c,
2373
- refresh: h.refresh,
2374
- forward: h.forward,
2375
- back: h.back,
2376
- go: h.go,
2326
+ }), i = f("NotFound"), { currentRoute: E, routerRoute: k, updateRoute: A } = Dn(i, S), g = Kn(t == null ? void 0 : t.initialUrl), u = c.location.state, { host: d } = _(g), x = Mn(d);
2327
+ let U = !1;
2328
+ const { promise: C, resolve: V } = Promise.withResolvers();
2329
+ async function O() {
2330
+ if (U)
2331
+ return C;
2332
+ Mr(n) && await Jr(), U = !0, await b(g, { replace: !0, state: u }), c.startListening(), V();
2333
+ }
2334
+ function q() {
2335
+ c.stopListening();
2336
+ }
2337
+ function ut(P) {
2338
+ return pn(P) ? null : { ...E };
2339
+ }
2340
+ function br(P) {
2341
+ o.setVueApp(P), s.setVueApp(P), P.component("RouterView", fr), P.component("RouterLink", xn), P.provide(sr, R), P.provide(lr, o), P.provide(tr, s), P.provide(ur, l), P.provide(nr, p), P.provide(Bt, ft), O();
2342
+ }
2343
+ const ft = {
2344
+ route: k,
2345
+ resolve: L,
2346
+ find: y,
2347
+ push: S,
2348
+ replace: w,
2349
+ reject: m,
2350
+ refresh: c.refresh,
2351
+ forward: c.forward,
2352
+ back: c.back,
2353
+ go: c.go,
2377
2354
  install: br,
2378
- isExternal: U,
2379
- onBeforeRouteEnter: a.onBeforeRouteEnter,
2380
- onBeforeRouteUpdate: a.onBeforeRouteUpdate,
2381
- onBeforeRouteLeave: a.onBeforeRouteLeave,
2382
- onAfterRouteEnter: a.onAfterRouteEnter,
2383
- onAfterRouteUpdate: a.onAfterRouteUpdate,
2384
- onAfterRouteLeave: a.onAfterRouteLeave,
2355
+ isExternal: x,
2356
+ onBeforeRouteEnter: o.onBeforeRouteEnter,
2357
+ onBeforeRouteUpdate: o.onBeforeRouteUpdate,
2358
+ onBeforeRouteLeave: o.onBeforeRouteLeave,
2359
+ onAfterRouteEnter: o.onAfterRouteEnter,
2360
+ onAfterRouteUpdate: o.onAfterRouteUpdate,
2361
+ onAfterRouteLeave: o.onAfterRouteLeave,
2385
2362
  prefetch: t == null ? void 0 : t.prefetch,
2386
- start: H,
2387
- stop: ft
2363
+ start: O,
2364
+ stop: q
2388
2365
  };
2389
- return lt;
2366
+ return ft;
2390
2367
  }
2391
- function Zo(e) {
2368
+ function No(e) {
2392
2369
  return {
2393
2370
  routes: e.routes ?? [],
2394
2371
  rejections: e.rejections ?? {},
2395
2372
  ...e
2396
2373
  };
2397
2374
  }
2398
- function Ao(...e) {
2375
+ function Eo(e) {
2399
2376
  return {
2400
2377
  get: (t, { invalid: r }) => {
2401
2378
  for (const n of e) {
2402
- const o = Yr(t, n);
2379
+ const o = Qr(t, n);
2403
2380
  if (o !== void 0)
2404
2381
  return o;
2405
2382
  }
@@ -2407,7 +2384,7 @@ function Ao(...e) {
2407
2384
  },
2408
2385
  set: (t, { invalid: r }) => {
2409
2386
  for (const n of e) {
2410
- const o = Xr(t, n);
2387
+ const o = Kr(t, n);
2411
2388
  if (o !== void 0)
2412
2389
  return o;
2413
2390
  }
@@ -2415,77 +2392,84 @@ function Ao(...e) {
2415
2392
  }
2416
2393
  };
2417
2394
  }
2418
- function jo(...e) {
2419
- const t = Ao(...e);
2395
+ const bo = {
2396
+ separator: ","
2397
+ };
2398
+ function Vo(e, t = {}) {
2399
+ const { separator: r } = { ...bo, ...t }, n = Eo(e);
2420
2400
  return {
2421
- get: (r, n) => r.split(",").map((o) => t.get(o, n)),
2422
- set: (r, n) => {
2423
- if (!Array.isArray(r))
2424
- throw n.invalid("Expected an array");
2425
- return r.map((o) => t.set(o, n)).join(",");
2401
+ get: (o, a) => o.split(r).map((s) => n.get(s, a)),
2402
+ set: (o, a) => {
2403
+ if (!Array.isArray(o))
2404
+ throw a.invalid("Expected an array");
2405
+ return o.map((s) => n.set(s, a)).join(r);
2426
2406
  }
2427
2407
  };
2428
2408
  }
2429
- function $o(...e) {
2409
+ const Po = {
2410
+ separator: ","
2411
+ };
2412
+ function Zo(e, t = {}) {
2413
+ const { separator: r } = { ...Po, ...t };
2430
2414
  return {
2431
- get: (t) => {
2432
- const r = t.split(",");
2433
- return e.map((n, o) => oe(r.at(o), n));
2415
+ get: (n) => {
2416
+ const o = n.split(r);
2417
+ return e.map((a, s) => re(o.at(s), a));
2434
2418
  },
2435
- set: (t, { invalid: r }) => {
2436
- if (!Array.isArray(t))
2437
- throw r("Expected a tuple");
2438
- if (t.length !== e.length)
2439
- throw r(`Expected tuple with ${e.length} values but received ${t.length} values`);
2440
- return e.map((n, o) => ae(t.at(o), n)).join(",");
2419
+ set: (n, { invalid: o }) => {
2420
+ if (!Array.isArray(n))
2421
+ throw o("Expected a tuple");
2422
+ if (n.length !== e.length)
2423
+ throw o(`Expected tuple with ${e.length} values but received ${n.length} values`);
2424
+ return e.map((a, s) => ne(n.at(s), a)).join(r);
2441
2425
  }
2442
2426
  };
2443
2427
  }
2444
- const _o = Q, Ho = Q, Oo = Q;
2445
- function qo(e) {
2446
- const t = at(), r = Gt(e.name), n = ee(e.path), o = ee(e.query), a = ee(e.hash), s = e.meta ?? {}, f = ee(e.host), p = xe({ id: t, meta: {}, state: {}, ...e }), l = {
2428
+ const jo = z, Oo = z, $o = z;
2429
+ function Ho(e) {
2430
+ const t = ot(), r = Gt(e.name), n = Y(e.path), o = Y(e.query), a = Y(e.hash), s = e.meta ?? {}, l = Y(e.host), p = Ae({ id: t, meta: {}, state: {}, ...e }), c = {
2447
2431
  id: t,
2448
2432
  matched: p,
2449
2433
  matches: [p],
2450
2434
  name: r,
2451
- host: f,
2435
+ host: l,
2452
2436
  path: n,
2453
2437
  query: o,
2454
2438
  hash: a,
2455
2439
  meta: s,
2456
2440
  depth: 1,
2457
2441
  state: {}
2458
- }, h = Mt(e) ? Wt(e.parent, l) : l;
2459
- return we(h.path.params, h.query.params, h.host.params, h.hash.params), h;
2442
+ }, y = Tt(e) ? Wt(e.parent, c) : c;
2443
+ return ge(y.path.params, y.query.params, y.host.params, y.hash.params), y;
2460
2444
  }
2461
2445
  export {
2462
- Hr as DuplicateParamsError,
2463
- Or as MetaPropertyConflict,
2464
- Un as RouterLink,
2465
- Re as RouterNotInstalledError,
2466
- ur as RouterView,
2467
- qr as UseRouteInvalidError,
2468
- jo as arrayOf,
2469
- Bt as asUrl,
2470
- qo as createExternalRoute,
2471
- Mr as createParam,
2472
- de as createRoute,
2473
- Vo as createRouter,
2474
- Zo as createRouterPlugin,
2475
- Ho as host,
2476
- or as isRoute,
2477
- T as isUrl,
2478
- Co as onAfterRouteLeave,
2479
- No as onAfterRouteUpdate,
2480
- Uo as onBeforeRouteLeave,
2481
- Bo as onBeforeRouteUpdate,
2482
- _o as path,
2483
- Oo as query,
2484
- $o as tupleOf,
2485
- Ao as unionOf,
2486
- xn as useLink,
2487
- sr as useRoute,
2488
- ze as useRouter,
2489
- Lo as withDefault,
2490
- Q as withParams
2446
+ $r as DuplicateParamsError,
2447
+ Hr as MetaPropertyConflict,
2448
+ xn as RouterLink,
2449
+ ye as RouterNotInstalledError,
2450
+ fr as RouterView,
2451
+ _r as UseRouteInvalidError,
2452
+ Vo as arrayOf,
2453
+ Lt as asUrl,
2454
+ Ho as createExternalRoute,
2455
+ Dr as createParam,
2456
+ he as createRoute,
2457
+ Co as createRouter,
2458
+ No as createRouterPlugin,
2459
+ Oo as host,
2460
+ ar as isRoute,
2461
+ M as isUrl,
2462
+ Lo as onAfterRouteLeave,
2463
+ Bo as onAfterRouteUpdate,
2464
+ xo as onBeforeRouteLeave,
2465
+ Uo as onBeforeRouteUpdate,
2466
+ jo as path,
2467
+ $o as query,
2468
+ Zo as tupleOf,
2469
+ Eo as unionOf,
2470
+ An as useLink,
2471
+ cr as useRoute,
2472
+ Ge as useRouter,
2473
+ ko as withDefault,
2474
+ z as withParams
2491
2475
  };