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