@kitbag/router 0.18.2 → 0.20.0

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