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