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