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