@kitbag/router 0.20.1 → 0.20.3

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