zudoku 0.32.0 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/tailwind.js +6 -0
- package/dist/app/tailwind.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +15 -15
- package/dist/config/validators/InputSidebarSchema.js +10 -1
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +40 -40
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +19 -19
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +3 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +2 -0
- package/dist/lib/components/navigation/SidebarBadge.js +3 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +1 -1
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +3 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -2
- package/dist/lib/plugins/api-catalog/Catalog.js +11 -24
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +1 -0
- package/dist/lib/plugins/api-catalog/index.js +37 -8
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +2 -2
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +0 -11
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +14 -0
- package/dist/lib/{components → ui}/SyntaxHighlight.js +9 -6
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
- package/dist/lib/ui/util.d.ts +2 -0
- package/dist/lib/ui/util.js +3 -0
- package/dist/lib/ui/util.js.map +1 -0
- package/dist/lib/util/MdxComponents.js +1 -1
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.js +4 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-sidebar.js +3 -9
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/lib/{AuthenticationPlugin-_YVa673u.js → AuthenticationPlugin-BlxA4Mbn.js} +4 -4
- package/lib/{AuthenticationPlugin-_YVa673u.js.map → AuthenticationPlugin-BlxA4Mbn.js.map} +1 -1
- package/lib/{CategoryHeading-MYL1u_6K.js → CategoryHeading-DpB47wvk.js} +3 -3
- package/lib/{CategoryHeading-MYL1u_6K.js.map → CategoryHeading-DpB47wvk.js.map} +1 -1
- package/lib/{Markdown-8mv9nhGd.js → Markdown-Cr9sYpR_.js} +4800 -4729
- package/lib/Markdown-Cr9sYpR_.js.map +1 -0
- package/lib/{MdxPage-GM1T5jmO.js → MdxPage-Dt-UEQl8.js} +10 -10
- package/lib/MdxPage-Dt-UEQl8.js.map +1 -0
- package/lib/{OasProvider-IS9wBrb7.js → OasProvider-WVtvHP5H.js} +6 -6
- package/lib/{OasProvider-IS9wBrb7.js.map → OasProvider-WVtvHP5H.js.map} +1 -1
- package/lib/{OperationList-BTmRbbXk.js → OperationList-DhOwupvv.js} +18 -19
- package/lib/{OperationList-BTmRbbXk.js.map → OperationList-DhOwupvv.js.map} +1 -1
- package/lib/Select-D9hI1G-y.js +223 -0
- package/lib/{Select-D9CKL33X.js.map → Select-D9hI1G-y.js.map} +1 -1
- package/lib/{SlotletProvider-D0mFmGJu.js → SlotletProvider-CEfNOA8i.js} +53 -53
- package/lib/{SlotletProvider-D0mFmGJu.js.map → SlotletProvider-CEfNOA8i.js.map} +1 -1
- package/lib/{Spinner-BlzrEEk1.js → Spinner-1KrEmx1V.js} +3 -3
- package/lib/{Spinner-BlzrEEk1.js.map → Spinner-1KrEmx1V.js.map} +1 -1
- package/lib/{SyntaxHighlight-B0L4SC_N.js → SyntaxHighlight-CcnUjERD.js} +445 -445
- package/lib/SyntaxHighlight-CcnUjERD.js.map +1 -0
- package/lib/{chunk-SYFQ2XB5-QijJrSf0.js → chunk-IR6S3I6Y-D_3UmFIn.js} +597 -597
- package/lib/chunk-IR6S3I6Y-D_3UmFIn.js.map +1 -0
- package/lib/{circular-DxaIIlWD.js → circular-v7K6lDDh.js} +1413 -1413
- package/lib/{circular-DxaIIlWD.js.map → circular-v7K6lDDh.js.map} +1 -1
- package/lib/context-DLCwaMXN.js +22 -0
- package/lib/{context-rwLGh-6_.js.map → context-DLCwaMXN.js.map} +1 -1
- package/lib/{createServer-DSQiPwjN.js → createServer-DMf6O2Rz.js} +3669 -3562
- package/lib/createServer-DMf6O2Rz.js.map +1 -0
- package/lib/{hook-C_t2ISLC.js → hook-CWwSAAlH.js} +384 -379
- package/lib/hook-CWwSAAlH.js.map +1 -0
- package/lib/index-Bn6Lc9tq.js +9 -0
- package/lib/index-Bn6Lc9tq.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/{index-Djenk2Hj.js.map → index-CPNSgwSb.js.map} +1 -1
- package/lib/{index-BANyVRgL.js → index-Do_30Hpk.js} +78 -78
- package/lib/index-Do_30Hpk.js.map +1 -0
- package/lib/{index-B7mqiOei.js → index-Du5aNddU.js} +101 -101
- package/lib/index-Du5aNddU.js.map +1 -0
- package/lib/{index-CjJS0l4l.js → index-LNp6rxyU.js} +2 -2
- package/lib/{index-CjJS0l4l.js.map → index-LNp6rxyU.js.map} +1 -1
- package/lib/{index.esm-CrSoEshU.js → index.esm--gIChbWs.js} +3 -3
- package/lib/{index.esm-CrSoEshU.js.map → index.esm--gIChbWs.js.map} +1 -1
- package/lib/{index.esm-9-TF9KQB.js → index.esm-CQHE3GEU.js} +52 -53
- package/lib/{index.esm-9-TF9KQB.js.map → index.esm-CQHE3GEU.js.map} +1 -1
- package/lib/joinUrl-10po2Jdj.js +20 -0
- package/lib/{joinUrl-nLx9pD-Z.js.map → joinUrl-10po2Jdj.js.map} +1 -1
- package/lib/{jsx-runtime-Bdg6XQ1m.js → jsx-runtime-CYK1ROHF.js} +99 -99
- package/lib/{jsx-runtime-Bdg6XQ1m.js.map → jsx-runtime-CYK1ROHF.js.map} +1 -1
- package/lib/{mutation-Cm3O9f3X.js → mutation-B0wxqzSN.js} +26 -26
- package/lib/{mutation-Cm3O9f3X.js.map → mutation-B0wxqzSN.js.map} +1 -1
- package/lib/post-processors/removeExtensions.js +4 -4
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +2 -2
- package/lib/ui/Breadcrumb.js +4 -4
- package/lib/ui/Button.js +2 -2
- package/lib/ui/Callout.js +4 -4
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +521 -543
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +5 -5
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +10 -10
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +10 -0
- package/lib/ui/SyntaxHighlight.js.map +1 -0
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/util.js +6 -0
- package/lib/ui/util.js.map +1 -0
- package/lib/{useExposedProps-Bbf99zic.js → useExposedProps-RIvey2Oy.js} +2 -2
- package/lib/{useExposedProps-Bbf99zic.js.map → useExposedProps-RIvey2Oy.js.map} +1 -1
- package/lib/{useScrollToAnchor-BGEcH3HM.js → useScrollToAnchor-C-sRxs9o.js} +13 -9
- package/lib/useScrollToAnchor-C-sRxs9o.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +18 -18
- package/lib/zudoku.auth-openid.js +255 -295
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +305 -298
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +91 -108
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +6 -6
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-openapi.js +6 -6
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -9
- package/package.json +49 -50
- package/src/app/tailwind.ts +6 -0
- package/src/lib/components/Header.tsx +1 -1
- package/src/lib/components/Layout.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +13 -9
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/SidebarBadge.tsx +4 -1
- package/src/lib/components/navigation/SidebarItem.tsx +1 -0
- package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
- package/src/lib/oas/graphql/index.ts +4 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +31 -94
- package/src/lib/plugins/api-catalog/index.tsx +54 -9
- package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +9 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +1 -1
- package/src/lib/{components → ui}/SyntaxHighlight.tsx +23 -8
- package/src/lib/ui/util.tsx +3 -0
- package/src/lib/util/MdxComponents.tsx +1 -1
- package/dist/lib/components/SyntaxHighlight.d.ts +0 -12
- package/dist/lib/components/SyntaxHighlight.js.map +0 -1
- package/lib/Markdown-8mv9nhGd.js.map +0 -1
- package/lib/MdxPage-GM1T5jmO.js.map +0 -1
- package/lib/Select-D9CKL33X.js +0 -223
- package/lib/SyntaxHighlight-B0L4SC_N.js.map +0 -1
- package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +0 -1
- package/lib/context-rwLGh-6_.js +0 -22
- package/lib/createServer-DSQiPwjN.js.map +0 -1
- package/lib/hook-C_t2ISLC.js.map +0 -1
- package/lib/index-B7mqiOei.js.map +0 -1
- package/lib/index-BANyVRgL.js.map +0 -1
- package/lib/index-Djenk2Hj.js +0 -36
- package/lib/joinUrl-nLx9pD-Z.js +0 -20
- package/lib/useScrollToAnchor-BGEcH3HM.js.map +0 -1
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
var _ = {},
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
var _ = {}, ue;
|
|
3
3
|
function Ae() {
|
|
4
|
-
if (
|
|
5
|
-
|
|
6
|
-
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, n = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, r = Object.prototype.toString,
|
|
7
|
-
const
|
|
4
|
+
if (ue) return _;
|
|
5
|
+
ue = 1, Object.defineProperty(_, "__esModule", { value: !0 }), _.parse = c, _.serialize = s;
|
|
6
|
+
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, n = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, r = Object.prototype.toString, o = /* @__PURE__ */ (() => {
|
|
7
|
+
const d = function() {
|
|
8
8
|
};
|
|
9
|
-
return
|
|
9
|
+
return d.prototype = /* @__PURE__ */ Object.create(null), d;
|
|
10
10
|
})();
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
return
|
|
15
|
-
const
|
|
16
|
-
let
|
|
11
|
+
function c(d, m) {
|
|
12
|
+
const f = new o(), E = d.length;
|
|
13
|
+
if (E < 2)
|
|
14
|
+
return f;
|
|
15
|
+
const g = (m == null ? void 0 : m.decode) || h;
|
|
16
|
+
let v = 0;
|
|
17
17
|
do {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
18
|
+
const y = d.indexOf("=", v);
|
|
19
|
+
if (y === -1)
|
|
20
20
|
break;
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
|
|
21
|
+
const w = d.indexOf(";", v), R = w === -1 ? E : w;
|
|
22
|
+
if (y > R) {
|
|
23
|
+
v = d.lastIndexOf(";", y - 1) + 1;
|
|
24
24
|
continue;
|
|
25
25
|
}
|
|
26
|
-
const x =
|
|
27
|
-
if (
|
|
28
|
-
let
|
|
29
|
-
const D =
|
|
30
|
-
|
|
26
|
+
const x = u(d, v, y), C = l(d, y, x), $ = d.slice(x, C);
|
|
27
|
+
if (f[$] === void 0) {
|
|
28
|
+
let P = u(d, y + 1, R), S = l(d, R, P);
|
|
29
|
+
const D = g(d.slice(P, S));
|
|
30
|
+
f[$] = D;
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
} while (
|
|
34
|
-
return
|
|
32
|
+
v = R + 1;
|
|
33
|
+
} while (v < E);
|
|
34
|
+
return f;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function u(d, m, f) {
|
|
37
37
|
do {
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
return
|
|
41
|
-
} while (++
|
|
42
|
-
return
|
|
38
|
+
const E = d.charCodeAt(m);
|
|
39
|
+
if (E !== 32 && E !== 9)
|
|
40
|
+
return m;
|
|
41
|
+
} while (++m < f);
|
|
42
|
+
return f;
|
|
43
43
|
}
|
|
44
|
-
function l(
|
|
45
|
-
for (;
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
return
|
|
44
|
+
function l(d, m, f) {
|
|
45
|
+
for (; m > f; ) {
|
|
46
|
+
const E = d.charCodeAt(--m);
|
|
47
|
+
if (E !== 32 && E !== 9)
|
|
48
|
+
return m + 1;
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return f;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
const
|
|
54
|
-
if (!e.test(
|
|
55
|
-
throw new TypeError(`argument name is invalid: ${
|
|
56
|
-
const
|
|
57
|
-
if (!t.test(
|
|
58
|
-
throw new TypeError(`argument val is invalid: ${
|
|
59
|
-
let
|
|
60
|
-
if (!
|
|
61
|
-
return
|
|
62
|
-
if (
|
|
63
|
-
if (!Number.isInteger(
|
|
64
|
-
throw new TypeError(`option maxAge is invalid: ${
|
|
65
|
-
|
|
52
|
+
function s(d, m, f) {
|
|
53
|
+
const E = (f == null ? void 0 : f.encode) || encodeURIComponent;
|
|
54
|
+
if (!e.test(d))
|
|
55
|
+
throw new TypeError(`argument name is invalid: ${d}`);
|
|
56
|
+
const g = E(m);
|
|
57
|
+
if (!t.test(g))
|
|
58
|
+
throw new TypeError(`argument val is invalid: ${m}`);
|
|
59
|
+
let v = d + "=" + g;
|
|
60
|
+
if (!f)
|
|
61
|
+
return v;
|
|
62
|
+
if (f.maxAge !== void 0) {
|
|
63
|
+
if (!Number.isInteger(f.maxAge))
|
|
64
|
+
throw new TypeError(`option maxAge is invalid: ${f.maxAge}`);
|
|
65
|
+
v += "; Max-Age=" + f.maxAge;
|
|
66
66
|
}
|
|
67
|
-
if (
|
|
68
|
-
if (!n.test(
|
|
69
|
-
throw new TypeError(`option domain is invalid: ${
|
|
70
|
-
|
|
67
|
+
if (f.domain) {
|
|
68
|
+
if (!n.test(f.domain))
|
|
69
|
+
throw new TypeError(`option domain is invalid: ${f.domain}`);
|
|
70
|
+
v += "; Domain=" + f.domain;
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
73
|
-
if (!a.test(
|
|
74
|
-
throw new TypeError(`option path is invalid: ${
|
|
75
|
-
|
|
72
|
+
if (f.path) {
|
|
73
|
+
if (!a.test(f.path))
|
|
74
|
+
throw new TypeError(`option path is invalid: ${f.path}`);
|
|
75
|
+
v += "; Path=" + f.path;
|
|
76
76
|
}
|
|
77
|
-
if (
|
|
78
|
-
if (!
|
|
79
|
-
throw new TypeError(`option expires is invalid: ${
|
|
80
|
-
|
|
77
|
+
if (f.expires) {
|
|
78
|
+
if (!p(f.expires) || !Number.isFinite(f.expires.valueOf()))
|
|
79
|
+
throw new TypeError(`option expires is invalid: ${f.expires}`);
|
|
80
|
+
v += "; Expires=" + f.expires.toUTCString();
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
83
|
-
switch (typeof
|
|
82
|
+
if (f.httpOnly && (v += "; HttpOnly"), f.secure && (v += "; Secure"), f.partitioned && (v += "; Partitioned"), f.priority)
|
|
83
|
+
switch (typeof f.priority == "string" ? f.priority.toLowerCase() : void 0) {
|
|
84
84
|
case "low":
|
|
85
|
-
|
|
85
|
+
v += "; Priority=Low";
|
|
86
86
|
break;
|
|
87
87
|
case "medium":
|
|
88
|
-
|
|
88
|
+
v += "; Priority=Medium";
|
|
89
89
|
break;
|
|
90
90
|
case "high":
|
|
91
|
-
|
|
91
|
+
v += "; Priority=High";
|
|
92
92
|
break;
|
|
93
93
|
default:
|
|
94
|
-
throw new TypeError(`option priority is invalid: ${
|
|
94
|
+
throw new TypeError(`option priority is invalid: ${f.priority}`);
|
|
95
95
|
}
|
|
96
|
-
if (
|
|
97
|
-
switch (typeof
|
|
96
|
+
if (f.sameSite)
|
|
97
|
+
switch (typeof f.sameSite == "string" ? f.sameSite.toLowerCase() : f.sameSite) {
|
|
98
98
|
case !0:
|
|
99
99
|
case "strict":
|
|
100
|
-
|
|
100
|
+
v += "; SameSite=Strict";
|
|
101
101
|
break;
|
|
102
102
|
case "lax":
|
|
103
|
-
|
|
103
|
+
v += "; SameSite=Lax";
|
|
104
104
|
break;
|
|
105
105
|
case "none":
|
|
106
|
-
|
|
106
|
+
v += "; SameSite=None";
|
|
107
107
|
break;
|
|
108
108
|
default:
|
|
109
|
-
throw new TypeError(`option sameSite is invalid: ${
|
|
109
|
+
throw new TypeError(`option sameSite is invalid: ${f.sameSite}`);
|
|
110
110
|
}
|
|
111
|
-
return
|
|
111
|
+
return v;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
if (
|
|
115
|
-
return
|
|
113
|
+
function h(d) {
|
|
114
|
+
if (d.indexOf("%") === -1)
|
|
115
|
+
return d;
|
|
116
116
|
try {
|
|
117
|
-
return decodeURIComponent(
|
|
117
|
+
return decodeURIComponent(d);
|
|
118
118
|
} catch {
|
|
119
|
-
return
|
|
119
|
+
return d;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
return r.call(
|
|
122
|
+
function p(d) {
|
|
123
|
+
return r.call(d) === "[object Date]";
|
|
124
124
|
}
|
|
125
125
|
return _;
|
|
126
126
|
}
|
|
127
127
|
Ae();
|
|
128
128
|
/**
|
|
129
|
-
* react-router v7.1.
|
|
129
|
+
* react-router v7.1.5
|
|
130
130
|
*
|
|
131
131
|
* Copyright (c) Remix Software Inc.
|
|
132
132
|
*
|
|
@@ -169,67 +169,67 @@ function pe(e, t, n = "/") {
|
|
|
169
169
|
return De(e, t, n, !1);
|
|
170
170
|
}
|
|
171
171
|
function De(e, t, n, a) {
|
|
172
|
-
let r = typeof t == "string" ? Y(t) : t,
|
|
173
|
-
if (
|
|
172
|
+
let r = typeof t == "string" ? Y(t) : t, o = I(r.pathname || "/", n);
|
|
173
|
+
if (o == null)
|
|
174
174
|
return null;
|
|
175
|
-
let
|
|
176
|
-
Ie(
|
|
177
|
-
let
|
|
178
|
-
for (let l = 0;
|
|
179
|
-
let
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
175
|
+
let c = ve(e);
|
|
176
|
+
Ie(c);
|
|
177
|
+
let u = null;
|
|
178
|
+
for (let l = 0; u == null && l < c.length; ++l) {
|
|
179
|
+
let s = ye(o);
|
|
180
|
+
u = ze(
|
|
181
|
+
c[l],
|
|
182
|
+
s,
|
|
183
183
|
a
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
|
-
return
|
|
186
|
+
return u;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
let r = (
|
|
188
|
+
function ve(e, t = [], n = [], a = "") {
|
|
189
|
+
let r = (o, c, u) => {
|
|
190
190
|
let l = {
|
|
191
|
-
relativePath:
|
|
192
|
-
caseSensitive:
|
|
193
|
-
childrenIndex:
|
|
194
|
-
route:
|
|
191
|
+
relativePath: u === void 0 ? o.path || "" : u,
|
|
192
|
+
caseSensitive: o.caseSensitive === !0,
|
|
193
|
+
childrenIndex: c,
|
|
194
|
+
route: o
|
|
195
195
|
};
|
|
196
196
|
l.relativePath.startsWith("/") && (b(
|
|
197
197
|
l.relativePath.startsWith(a),
|
|
198
198
|
`Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
199
199
|
), l.relativePath = l.relativePath.slice(a.length));
|
|
200
|
-
let
|
|
201
|
-
|
|
200
|
+
let s = A([a, l.relativePath]), h = n.concat(l);
|
|
201
|
+
o.children && o.children.length > 0 && (b(
|
|
202
202
|
// Our types know better, but runtime JS may not!
|
|
203
203
|
// @ts-expect-error
|
|
204
|
-
|
|
205
|
-
`Index routes must not have child routes. Please remove all child routes from route path "${
|
|
206
|
-
),
|
|
207
|
-
path:
|
|
208
|
-
score: He(
|
|
209
|
-
routesMeta:
|
|
204
|
+
o.index !== !0,
|
|
205
|
+
`Index routes must not have child routes. Please remove all child routes from route path "${s}".`
|
|
206
|
+
), ve(o.children, t, h, s)), !(o.path == null && !o.index) && t.push({
|
|
207
|
+
path: s,
|
|
208
|
+
score: He(s, o.index),
|
|
209
|
+
routesMeta: h
|
|
210
210
|
});
|
|
211
211
|
};
|
|
212
|
-
return e.forEach((
|
|
213
|
-
var
|
|
214
|
-
if (
|
|
215
|
-
r(
|
|
212
|
+
return e.forEach((o, c) => {
|
|
213
|
+
var u;
|
|
214
|
+
if (o.path === "" || !((u = o.path) != null && u.includes("?")))
|
|
215
|
+
r(o, c);
|
|
216
216
|
else
|
|
217
|
-
for (let l of
|
|
218
|
-
r(
|
|
217
|
+
for (let l of ge(o.path))
|
|
218
|
+
r(o, c, l);
|
|
219
219
|
}), t;
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function ge(e) {
|
|
222
222
|
let t = e.split("/");
|
|
223
223
|
if (t.length === 0) return [];
|
|
224
|
-
let [n, ...a] = t, r = n.endsWith("?"),
|
|
224
|
+
let [n, ...a] = t, r = n.endsWith("?"), o = n.replace(/\?$/, "");
|
|
225
225
|
if (a.length === 0)
|
|
226
|
-
return r ? [
|
|
227
|
-
let
|
|
228
|
-
return
|
|
229
|
-
...
|
|
230
|
-
(l) => l === "" ?
|
|
226
|
+
return r ? [o, ""] : [o];
|
|
227
|
+
let c = ge(a.join("/")), u = [];
|
|
228
|
+
return u.push(
|
|
229
|
+
...c.map(
|
|
230
|
+
(l) => l === "" ? o : [o, l].join("/")
|
|
231
231
|
)
|
|
232
|
-
), r &&
|
|
232
|
+
), r && u.push(...c), u.map(
|
|
233
233
|
(l) => e.startsWith("/") && l === "" ? "/" : l
|
|
234
234
|
);
|
|
235
235
|
}
|
|
@@ -245,7 +245,7 @@ var Oe = /^:[\w-]+$/, Me = 3, Fe = 2, _e = 1, Ue = 10, Be = -2, ce = (e) => e ==
|
|
|
245
245
|
function He(e, t) {
|
|
246
246
|
let n = e.split("/"), a = n.length;
|
|
247
247
|
return n.some(ce) && (a += Be), t && (a += Fe), n.filter((r) => !ce(r)).reduce(
|
|
248
|
-
(r,
|
|
248
|
+
(r, o) => r + (Oe.test(o) ? Me : o === "" ? _e : Ue),
|
|
249
249
|
a
|
|
250
250
|
);
|
|
251
251
|
}
|
|
@@ -263,32 +263,32 @@ function We(e, t) {
|
|
|
263
263
|
);
|
|
264
264
|
}
|
|
265
265
|
function ze(e, t, n = !1) {
|
|
266
|
-
let { routesMeta: a } = e, r = {},
|
|
267
|
-
for (let
|
|
268
|
-
let l = a[
|
|
269
|
-
{ path: l.relativePath, caseSensitive: l.caseSensitive, end:
|
|
270
|
-
|
|
271
|
-
),
|
|
272
|
-
if (!
|
|
266
|
+
let { routesMeta: a } = e, r = {}, o = "/", c = [];
|
|
267
|
+
for (let u = 0; u < a.length; ++u) {
|
|
268
|
+
let l = a[u], s = u === a.length - 1, h = o === "/" ? t : t.slice(o.length) || "/", p = H(
|
|
269
|
+
{ path: l.relativePath, caseSensitive: l.caseSensitive, end: s },
|
|
270
|
+
h
|
|
271
|
+
), d = l.route;
|
|
272
|
+
if (!p && s && n && !a[a.length - 1].route.index && (p = H(
|
|
273
273
|
{
|
|
274
274
|
path: l.relativePath,
|
|
275
275
|
caseSensitive: l.caseSensitive,
|
|
276
276
|
end: !1
|
|
277
277
|
},
|
|
278
|
-
|
|
279
|
-
)), !
|
|
278
|
+
h
|
|
279
|
+
)), !p)
|
|
280
280
|
return null;
|
|
281
|
-
Object.assign(r,
|
|
281
|
+
Object.assign(r, p.params), c.push({
|
|
282
282
|
// TODO: Can this as be avoided?
|
|
283
283
|
params: r,
|
|
284
|
-
pathname: A([
|
|
284
|
+
pathname: A([o, p.pathname]),
|
|
285
285
|
pathnameBase: Ke(
|
|
286
|
-
A([
|
|
286
|
+
A([o, p.pathnameBase])
|
|
287
287
|
),
|
|
288
|
-
route:
|
|
289
|
-
}),
|
|
288
|
+
route: d
|
|
289
|
+
}), p.pathnameBase !== "/" && (o = A([o, p.pathnameBase]));
|
|
290
290
|
}
|
|
291
|
-
return
|
|
291
|
+
return c;
|
|
292
292
|
}
|
|
293
293
|
function H(e, t) {
|
|
294
294
|
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
@@ -298,21 +298,21 @@ function H(e, t) {
|
|
|
298
298
|
e.end
|
|
299
299
|
), r = t.match(n);
|
|
300
300
|
if (!r) return null;
|
|
301
|
-
let
|
|
301
|
+
let o = r[0], c = o.replace(/(.)\/+$/, "$1"), u = r.slice(1);
|
|
302
302
|
return {
|
|
303
303
|
params: a.reduce(
|
|
304
|
-
(
|
|
305
|
-
if (
|
|
306
|
-
let
|
|
307
|
-
|
|
304
|
+
(s, { paramName: h, isOptional: p }, d) => {
|
|
305
|
+
if (h === "*") {
|
|
306
|
+
let f = u[d] || "";
|
|
307
|
+
c = o.slice(0, o.length - f.length).replace(/(.)\/+$/, "$1");
|
|
308
308
|
}
|
|
309
|
-
const
|
|
310
|
-
return
|
|
309
|
+
const m = u[d];
|
|
310
|
+
return p && !m ? s[h] = void 0 : s[h] = (m || "").replace(/%2F/g, "/"), s;
|
|
311
311
|
},
|
|
312
312
|
{}
|
|
313
313
|
),
|
|
314
|
-
pathname:
|
|
315
|
-
pathnameBase:
|
|
314
|
+
pathname: o,
|
|
315
|
+
pathnameBase: c,
|
|
316
316
|
pattern: e
|
|
317
317
|
};
|
|
318
318
|
}
|
|
@@ -323,7 +323,7 @@ function Ve(e, t = !1, n = !0) {
|
|
|
323
323
|
);
|
|
324
324
|
let a = [], r = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
325
325
|
/\/:([\w-]+)(\?)?/g,
|
|
326
|
-
(
|
|
326
|
+
(c, u, l) => (a.push({ paramName: u, isOptional: l != null }), l ? "/?([^\\/]+)?" : "/([^\\/]+)")
|
|
327
327
|
);
|
|
328
328
|
return e.endsWith("*") ? (a.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), a];
|
|
329
329
|
}
|
|
@@ -390,21 +390,21 @@ function ee(e, t, n, a = !1) {
|
|
|
390
390
|
!r.search || !r.search.includes("#"),
|
|
391
391
|
G("#", "search", "hash", r)
|
|
392
392
|
));
|
|
393
|
-
let
|
|
394
|
-
if (
|
|
395
|
-
|
|
393
|
+
let o = e === "" || r.pathname === "", c = o ? "/" : r.pathname, u;
|
|
394
|
+
if (c == null)
|
|
395
|
+
u = n;
|
|
396
396
|
else {
|
|
397
|
-
let
|
|
398
|
-
if (!a &&
|
|
399
|
-
let
|
|
400
|
-
for (;
|
|
401
|
-
|
|
402
|
-
r.pathname =
|
|
397
|
+
let p = t.length - 1;
|
|
398
|
+
if (!a && c.startsWith("..")) {
|
|
399
|
+
let d = c.split("/");
|
|
400
|
+
for (; d[0] === ".."; )
|
|
401
|
+
d.shift(), p -= 1;
|
|
402
|
+
r.pathname = d.join("/");
|
|
403
403
|
}
|
|
404
|
-
|
|
404
|
+
u = p >= 0 ? t[p] : "/";
|
|
405
405
|
}
|
|
406
|
-
let l = je(r,
|
|
407
|
-
return !l.pathname.endsWith("/") && (
|
|
406
|
+
let l = je(r, u), s = c && c !== "/" && c.endsWith("/"), h = (o || c === ".") && n.endsWith("/");
|
|
407
|
+
return !l.pathname.endsWith("/") && (s || h) && (l.pathname += "/"), l;
|
|
408
408
|
}
|
|
409
409
|
var A = (e) => e.join("/").replace(/\/\/+/g, "/"), Ke = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), qe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Ge = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, an = (e, t = 302) => {
|
|
410
410
|
let n = t;
|
|
@@ -429,35 +429,35 @@ var Xe = [
|
|
|
429
429
|
...Ee
|
|
430
430
|
];
|
|
431
431
|
new Set(Xe);
|
|
432
|
-
var O =
|
|
432
|
+
var O = i.createContext(null);
|
|
433
433
|
O.displayName = "DataRouter";
|
|
434
|
-
var F =
|
|
434
|
+
var F = i.createContext(null);
|
|
435
435
|
F.displayName = "DataRouterState";
|
|
436
|
-
var J =
|
|
436
|
+
var J = i.createContext({
|
|
437
437
|
isTransitioning: !1
|
|
438
438
|
});
|
|
439
439
|
J.displayName = "ViewTransition";
|
|
440
|
-
var te =
|
|
440
|
+
var te = i.createContext(
|
|
441
441
|
/* @__PURE__ */ new Map()
|
|
442
442
|
);
|
|
443
443
|
te.displayName = "Fetchers";
|
|
444
|
-
var Qe =
|
|
444
|
+
var Qe = i.createContext(null);
|
|
445
445
|
Qe.displayName = "Await";
|
|
446
|
-
var T =
|
|
446
|
+
var T = i.createContext(
|
|
447
447
|
null
|
|
448
448
|
);
|
|
449
449
|
T.displayName = "Navigation";
|
|
450
|
-
var K =
|
|
450
|
+
var K = i.createContext(
|
|
451
451
|
null
|
|
452
452
|
);
|
|
453
453
|
K.displayName = "Location";
|
|
454
|
-
var k =
|
|
454
|
+
var k = i.createContext({
|
|
455
455
|
outlet: null,
|
|
456
456
|
matches: [],
|
|
457
457
|
isDataRoute: !1
|
|
458
458
|
});
|
|
459
459
|
k.displayName = "Route";
|
|
460
|
-
var ne =
|
|
460
|
+
var ne = i.createContext(null);
|
|
461
461
|
ne.displayName = "RouteError";
|
|
462
462
|
function Ze(e, { relative: t } = {}) {
|
|
463
463
|
b(
|
|
@@ -466,11 +466,11 @@ function Ze(e, { relative: t } = {}) {
|
|
|
466
466
|
// router loaded. We can help them understand how to avoid that.
|
|
467
467
|
"useHref() may be used only in the context of a <Router> component."
|
|
468
468
|
);
|
|
469
|
-
let { basename: n, navigator: a } =
|
|
470
|
-
return n !== "/" && (
|
|
469
|
+
let { basename: n, navigator: a } = i.useContext(T), { hash: r, pathname: o, search: c } = W(e, { relative: t }), u = o;
|
|
470
|
+
return n !== "/" && (u = o === "/" ? n : A([n, o])), a.createHref({ pathname: u, search: c, hash: r });
|
|
471
471
|
}
|
|
472
472
|
function M() {
|
|
473
|
-
return
|
|
473
|
+
return i.useContext(K) != null;
|
|
474
474
|
}
|
|
475
475
|
function N() {
|
|
476
476
|
return b(
|
|
@@ -478,7 +478,7 @@ function N() {
|
|
|
478
478
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
479
479
|
// router loaded. We can help them understand how to avoid that.
|
|
480
480
|
"useLocation() may be used only in the context of a <Router> component."
|
|
481
|
-
),
|
|
481
|
+
), i.useContext(K).location;
|
|
482
482
|
}
|
|
483
483
|
function on(e) {
|
|
484
484
|
b(
|
|
@@ -488,17 +488,17 @@ function on(e) {
|
|
|
488
488
|
"useMatch() may be used only in the context of a <Router> component."
|
|
489
489
|
);
|
|
490
490
|
let { pathname: t } = N();
|
|
491
|
-
return
|
|
491
|
+
return i.useMemo(
|
|
492
492
|
() => H(e, ye(t)),
|
|
493
493
|
[t, e]
|
|
494
494
|
);
|
|
495
495
|
}
|
|
496
496
|
var xe = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
497
497
|
function Re(e) {
|
|
498
|
-
|
|
498
|
+
i.useContext(T).static || i.useLayoutEffect(e);
|
|
499
499
|
}
|
|
500
500
|
function re() {
|
|
501
|
-
let { isDataRoute: e } =
|
|
501
|
+
let { isDataRoute: e } = i.useContext(k);
|
|
502
502
|
return e ? dt() : et();
|
|
503
503
|
}
|
|
504
504
|
function et() {
|
|
@@ -508,49 +508,49 @@ function et() {
|
|
|
508
508
|
// router loaded. We can help them understand how to avoid that.
|
|
509
509
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
510
510
|
);
|
|
511
|
-
let e =
|
|
511
|
+
let e = i.useContext(O), { basename: t, navigator: n } = i.useContext(T), { matches: a } = i.useContext(k), { pathname: r } = N(), o = JSON.stringify(Z(a)), c = i.useRef(!1);
|
|
512
512
|
return Re(() => {
|
|
513
|
-
|
|
514
|
-
}),
|
|
515
|
-
(l,
|
|
516
|
-
if (L(
|
|
513
|
+
c.current = !0;
|
|
514
|
+
}), i.useCallback(
|
|
515
|
+
(l, s = {}) => {
|
|
516
|
+
if (L(c.current, xe), !c.current) return;
|
|
517
517
|
if (typeof l == "number") {
|
|
518
518
|
n.go(l);
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
521
|
-
let
|
|
521
|
+
let h = ee(
|
|
522
522
|
l,
|
|
523
|
-
JSON.parse(
|
|
523
|
+
JSON.parse(o),
|
|
524
524
|
r,
|
|
525
|
-
|
|
525
|
+
s.relative === "path"
|
|
526
526
|
);
|
|
527
|
-
e == null && t !== "/" && (
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
527
|
+
e == null && t !== "/" && (h.pathname = h.pathname === "/" ? t : A([t, h.pathname])), (s.replace ? n.replace : n.push)(
|
|
528
|
+
h,
|
|
529
|
+
s.state,
|
|
530
|
+
s
|
|
531
531
|
);
|
|
532
532
|
},
|
|
533
533
|
[
|
|
534
534
|
t,
|
|
535
535
|
n,
|
|
536
|
-
|
|
536
|
+
o,
|
|
537
537
|
r,
|
|
538
538
|
e
|
|
539
539
|
]
|
|
540
540
|
);
|
|
541
541
|
}
|
|
542
|
-
var tt =
|
|
542
|
+
var tt = i.createContext(null);
|
|
543
543
|
function nt(e) {
|
|
544
|
-
let t =
|
|
545
|
-
return t && /* @__PURE__ */
|
|
544
|
+
let t = i.useContext(k).outlet;
|
|
545
|
+
return t && /* @__PURE__ */ i.createElement(tt.Provider, { value: e }, t);
|
|
546
546
|
}
|
|
547
547
|
function ln() {
|
|
548
|
-
let { matches: e } =
|
|
548
|
+
let { matches: e } = i.useContext(k), t = e[e.length - 1];
|
|
549
549
|
return t ? t.params : {};
|
|
550
550
|
}
|
|
551
551
|
function W(e, { relative: t } = {}) {
|
|
552
|
-
let { matches: n } =
|
|
553
|
-
return
|
|
552
|
+
let { matches: n } = i.useContext(k), { pathname: a } = N(), r = JSON.stringify(Z(n));
|
|
553
|
+
return i.useMemo(
|
|
554
554
|
() => ee(
|
|
555
555
|
e,
|
|
556
556
|
JSON.parse(r),
|
|
@@ -567,60 +567,60 @@ function be(e, t, n, a) {
|
|
|
567
567
|
// router loaded. We can help them understand how to avoid that.
|
|
568
568
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
569
569
|
);
|
|
570
|
-
let { navigator: r } =
|
|
570
|
+
let { navigator: r, static: o } = i.useContext(T), { matches: c } = i.useContext(k), u = c[c.length - 1], l = u ? u.params : {}, s = u ? u.pathname : "/", h = u ? u.pathnameBase : "/", p = u && u.route;
|
|
571
571
|
{
|
|
572
|
-
let
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
!
|
|
576
|
-
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${
|
|
572
|
+
let y = p && p.path || "";
|
|
573
|
+
Pe(
|
|
574
|
+
s,
|
|
575
|
+
!p || y.endsWith("*") || y.endsWith("*?"),
|
|
576
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
577
577
|
|
|
578
|
-
Please change the parent <Route path="${
|
|
578
|
+
Please change the parent <Route path="${y}"> to <Route path="${y === "/" ? "*" : `${y}/*`}">.`
|
|
579
579
|
);
|
|
580
580
|
}
|
|
581
|
-
let
|
|
582
|
-
|
|
583
|
-
let
|
|
584
|
-
if (
|
|
585
|
-
let
|
|
586
|
-
|
|
581
|
+
let d = N(), m;
|
|
582
|
+
m = d;
|
|
583
|
+
let f = m.pathname || "/", E = f;
|
|
584
|
+
if (h !== "/") {
|
|
585
|
+
let y = h.replace(/^\//, "").split("/");
|
|
586
|
+
E = "/" + f.replace(/^\//, "").split("/").slice(y.length).join("/");
|
|
587
587
|
}
|
|
588
|
-
let
|
|
588
|
+
let g = !o && n && n.matches && n.matches.length > 0 ? n.matches : pe(e, { pathname: E });
|
|
589
589
|
return L(
|
|
590
|
-
|
|
591
|
-
`No routes matched location "${
|
|
590
|
+
p || g != null,
|
|
591
|
+
`No routes matched location "${m.pathname}${m.search}${m.hash}" `
|
|
592
592
|
), L(
|
|
593
|
-
|
|
594
|
-
`Matched leaf route at location "${
|
|
593
|
+
g == null || g[g.length - 1].route.element !== void 0 || g[g.length - 1].route.Component !== void 0 || g[g.length - 1].route.lazy !== void 0,
|
|
594
|
+
`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
|
|
595
595
|
), lt(
|
|
596
|
-
|
|
597
|
-
(
|
|
598
|
-
params: Object.assign({},
|
|
596
|
+
g && g.map(
|
|
597
|
+
(y) => Object.assign({}, y, {
|
|
598
|
+
params: Object.assign({}, l, y.params),
|
|
599
599
|
pathname: A([
|
|
600
|
-
|
|
600
|
+
h,
|
|
601
601
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
602
|
-
r.encodeLocation ? r.encodeLocation(
|
|
602
|
+
r.encodeLocation ? r.encodeLocation(y.pathname).pathname : y.pathname
|
|
603
603
|
]),
|
|
604
|
-
pathnameBase:
|
|
605
|
-
|
|
604
|
+
pathnameBase: y.pathnameBase === "/" ? h : A([
|
|
605
|
+
h,
|
|
606
606
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
607
|
-
r.encodeLocation ? r.encodeLocation(
|
|
607
|
+
r.encodeLocation ? r.encodeLocation(y.pathnameBase).pathname : y.pathnameBase
|
|
608
608
|
])
|
|
609
609
|
})
|
|
610
610
|
),
|
|
611
|
-
|
|
611
|
+
c,
|
|
612
612
|
n,
|
|
613
613
|
a
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
616
|
function rt() {
|
|
617
|
-
let e = ft(), t = we(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a },
|
|
617
|
+
let e = ft(), t = we(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a }, o = { padding: "2px 4px", backgroundColor: a }, c = null;
|
|
618
618
|
return console.error(
|
|
619
619
|
"Error handled by React Router default ErrorBoundary:",
|
|
620
620
|
e
|
|
621
|
-
),
|
|
621
|
+
), c = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ i.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ i.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ i.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ i.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ i.createElement("pre", { style: r }, n) : null, c);
|
|
622
622
|
}
|
|
623
|
-
var at = /* @__PURE__ */
|
|
623
|
+
var at = /* @__PURE__ */ i.createElement(rt, null), it = class extends i.Component {
|
|
624
624
|
constructor(e) {
|
|
625
625
|
super(e), this.state = {
|
|
626
626
|
location: e.location,
|
|
@@ -650,7 +650,7 @@ var at = /* @__PURE__ */ o.createElement(rt, null), it = class extends o.Compone
|
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
652
|
render() {
|
|
653
|
-
return this.state.error !== void 0 ? /* @__PURE__ */
|
|
653
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ i.createElement(k.Provider, { value: this.props.routeContext }, /* @__PURE__ */ i.createElement(
|
|
654
654
|
ne.Provider,
|
|
655
655
|
{
|
|
656
656
|
value: this.state.error,
|
|
@@ -660,8 +660,8 @@ var at = /* @__PURE__ */ o.createElement(rt, null), it = class extends o.Compone
|
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
662
|
function ot({ routeContext: e, match: t, children: n }) {
|
|
663
|
-
let a =
|
|
664
|
-
return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */
|
|
663
|
+
let a = i.useContext(O);
|
|
664
|
+
return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ i.createElement(k.Provider, { value: e }, n);
|
|
665
665
|
}
|
|
666
666
|
function lt(e, t = [], n = null, a = null) {
|
|
667
667
|
if (e == null) {
|
|
@@ -674,85 +674,85 @@ function lt(e, t = [], n = null, a = null) {
|
|
|
674
674
|
else
|
|
675
675
|
return null;
|
|
676
676
|
}
|
|
677
|
-
let r = e,
|
|
678
|
-
if (
|
|
677
|
+
let r = e, o = n == null ? void 0 : n.errors;
|
|
678
|
+
if (o != null) {
|
|
679
679
|
let l = r.findIndex(
|
|
680
|
-
(
|
|
680
|
+
(s) => s.route.id && (o == null ? void 0 : o[s.route.id]) !== void 0
|
|
681
681
|
);
|
|
682
682
|
b(
|
|
683
683
|
l >= 0,
|
|
684
684
|
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
685
|
-
|
|
685
|
+
o
|
|
686
686
|
).join(",")}`
|
|
687
687
|
), r = r.slice(
|
|
688
688
|
0,
|
|
689
689
|
Math.min(r.length, l + 1)
|
|
690
690
|
);
|
|
691
691
|
}
|
|
692
|
-
let
|
|
692
|
+
let c = !1, u = -1;
|
|
693
693
|
if (n)
|
|
694
694
|
for (let l = 0; l < r.length; l++) {
|
|
695
|
-
let
|
|
696
|
-
if ((
|
|
697
|
-
let { loaderData:
|
|
698
|
-
if (
|
|
699
|
-
|
|
695
|
+
let s = r[l];
|
|
696
|
+
if ((s.route.HydrateFallback || s.route.hydrateFallbackElement) && (u = l), s.route.id) {
|
|
697
|
+
let { loaderData: h, errors: p } = n, d = s.route.loader && !h.hasOwnProperty(s.route.id) && (!p || p[s.route.id] === void 0);
|
|
698
|
+
if (s.route.lazy || d) {
|
|
699
|
+
c = !0, u >= 0 ? r = r.slice(0, u + 1) : r = [r[0]];
|
|
700
700
|
break;
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
|
-
return r.reduceRight((l,
|
|
705
|
-
let
|
|
706
|
-
n && (
|
|
704
|
+
return r.reduceRight((l, s, h) => {
|
|
705
|
+
let p, d = !1, m = null, f = null;
|
|
706
|
+
n && (p = o && s.route.id ? o[s.route.id] : void 0, m = s.route.errorElement || at, c && (u < 0 && h === 0 ? (Pe(
|
|
707
707
|
"route-fallback",
|
|
708
708
|
!1,
|
|
709
709
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
710
|
-
),
|
|
711
|
-
let
|
|
712
|
-
let
|
|
713
|
-
return
|
|
710
|
+
), d = !0, f = null) : u === h && (d = !0, f = s.route.hydrateFallbackElement || null)));
|
|
711
|
+
let E = t.concat(r.slice(0, h + 1)), g = () => {
|
|
712
|
+
let v;
|
|
713
|
+
return p ? v = m : d ? v = f : s.route.Component ? v = /* @__PURE__ */ i.createElement(s.route.Component, null) : s.route.element ? v = s.route.element : v = l, /* @__PURE__ */ i.createElement(
|
|
714
714
|
ot,
|
|
715
715
|
{
|
|
716
|
-
match:
|
|
716
|
+
match: s,
|
|
717
717
|
routeContext: {
|
|
718
718
|
outlet: l,
|
|
719
|
-
matches:
|
|
719
|
+
matches: E,
|
|
720
720
|
isDataRoute: n != null
|
|
721
721
|
},
|
|
722
|
-
children:
|
|
722
|
+
children: v
|
|
723
723
|
}
|
|
724
724
|
);
|
|
725
725
|
};
|
|
726
|
-
return n && (
|
|
726
|
+
return n && (s.route.ErrorBoundary || s.route.errorElement || h === 0) ? /* @__PURE__ */ i.createElement(
|
|
727
727
|
it,
|
|
728
728
|
{
|
|
729
729
|
location: n.location,
|
|
730
730
|
revalidation: n.revalidation,
|
|
731
|
-
component:
|
|
732
|
-
error:
|
|
733
|
-
children:
|
|
734
|
-
routeContext: { outlet: null, matches:
|
|
731
|
+
component: m,
|
|
732
|
+
error: p,
|
|
733
|
+
children: g(),
|
|
734
|
+
routeContext: { outlet: null, matches: E, isDataRoute: !0 }
|
|
735
735
|
}
|
|
736
|
-
) :
|
|
736
|
+
) : g();
|
|
737
737
|
}, null);
|
|
738
738
|
}
|
|
739
739
|
function ae(e) {
|
|
740
740
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
741
741
|
}
|
|
742
|
-
function
|
|
743
|
-
let t =
|
|
742
|
+
function st(e) {
|
|
743
|
+
let t = i.useContext(O);
|
|
744
744
|
return b(t, ae(e)), t;
|
|
745
745
|
}
|
|
746
746
|
function Ce(e) {
|
|
747
|
-
let t =
|
|
747
|
+
let t = i.useContext(F);
|
|
748
748
|
return b(t, ae(e)), t;
|
|
749
749
|
}
|
|
750
|
-
function
|
|
751
|
-
let t =
|
|
750
|
+
function ut(e) {
|
|
751
|
+
let t = i.useContext(k);
|
|
752
752
|
return b(t, ae(e)), t;
|
|
753
753
|
}
|
|
754
754
|
function ie(e) {
|
|
755
|
-
let t =
|
|
755
|
+
let t = ut(e), n = t.matches[t.matches.length - 1];
|
|
756
756
|
return b(
|
|
757
757
|
n.route.id,
|
|
758
758
|
`${e} can only be used on routes that contain a unique "id"`
|
|
@@ -764,7 +764,7 @@ function ct() {
|
|
|
764
764
|
/* UseRouteId */
|
|
765
765
|
);
|
|
766
766
|
}
|
|
767
|
-
function
|
|
767
|
+
function sn() {
|
|
768
768
|
return Ce(
|
|
769
769
|
"useNavigation"
|
|
770
770
|
/* UseNavigation */
|
|
@@ -772,7 +772,7 @@ function un() {
|
|
|
772
772
|
}
|
|
773
773
|
function ft() {
|
|
774
774
|
var a;
|
|
775
|
-
let e =
|
|
775
|
+
let e = i.useContext(ne), t = Ce(
|
|
776
776
|
"useRouteError"
|
|
777
777
|
/* UseRouteError */
|
|
778
778
|
), n = ie(
|
|
@@ -782,24 +782,24 @@ function ft() {
|
|
|
782
782
|
return e !== void 0 ? e : (a = t.errors) == null ? void 0 : a[n];
|
|
783
783
|
}
|
|
784
784
|
function dt() {
|
|
785
|
-
let { router: e } =
|
|
785
|
+
let { router: e } = st(
|
|
786
786
|
"useNavigate"
|
|
787
787
|
/* UseNavigateStable */
|
|
788
788
|
), t = ie(
|
|
789
789
|
"useNavigate"
|
|
790
790
|
/* UseNavigateStable */
|
|
791
|
-
), n =
|
|
791
|
+
), n = i.useRef(!1);
|
|
792
792
|
return Re(() => {
|
|
793
793
|
n.current = !0;
|
|
794
|
-
}),
|
|
795
|
-
async (r,
|
|
796
|
-
L(n.current, xe), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...
|
|
794
|
+
}), i.useCallback(
|
|
795
|
+
async (r, o = {}) => {
|
|
796
|
+
L(n.current, xe), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...o }));
|
|
797
797
|
},
|
|
798
798
|
[e, t]
|
|
799
799
|
);
|
|
800
800
|
}
|
|
801
801
|
var fe = {};
|
|
802
|
-
function
|
|
802
|
+
function Pe(e, t, n) {
|
|
803
803
|
!t && !fe[e] && (fe[e] = !0, L(!1, n));
|
|
804
804
|
}
|
|
805
805
|
var de = {};
|
|
@@ -817,17 +817,17 @@ var ht = class {
|
|
|
817
817
|
});
|
|
818
818
|
}
|
|
819
819
|
};
|
|
820
|
-
function
|
|
820
|
+
function un({
|
|
821
821
|
router: e,
|
|
822
822
|
flushSync: t
|
|
823
823
|
}) {
|
|
824
|
-
let [n, a] =
|
|
824
|
+
let [n, a] = i.useState(e.state), [r, o] = i.useState(), [c, u] = i.useState({
|
|
825
825
|
isTransitioning: !1
|
|
826
|
-
}), [l,
|
|
827
|
-
(
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
}), R.forEach((
|
|
826
|
+
}), [l, s] = i.useState(), [h, p] = i.useState(), [d, m] = i.useState(), f = i.useRef(/* @__PURE__ */ new Map()), E = i.useCallback(
|
|
827
|
+
(w, { deletedFetchers: R, flushSync: x, viewTransitionOpts: C }) => {
|
|
828
|
+
w.fetchers.forEach((P, S) => {
|
|
829
|
+
P.data !== void 0 && f.current.set(S, P.data);
|
|
830
|
+
}), R.forEach((P) => f.current.delete(P)), he(
|
|
831
831
|
x === !1 || t != null,
|
|
832
832
|
'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
|
|
833
833
|
);
|
|
@@ -836,93 +836,93 @@ function sn({
|
|
|
836
836
|
C == null || $,
|
|
837
837
|
"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
|
|
838
838
|
), !C || !$) {
|
|
839
|
-
t && x ? t(() => a(
|
|
839
|
+
t && x ? t(() => a(w)) : i.startTransition(() => a(w));
|
|
840
840
|
return;
|
|
841
841
|
}
|
|
842
842
|
if (t && x) {
|
|
843
843
|
t(() => {
|
|
844
|
-
|
|
844
|
+
h && (l && l.resolve(), h.skipTransition()), u({
|
|
845
845
|
isTransitioning: !0,
|
|
846
846
|
flushSync: !0,
|
|
847
847
|
currentLocation: C.currentLocation,
|
|
848
848
|
nextLocation: C.nextLocation
|
|
849
849
|
});
|
|
850
850
|
});
|
|
851
|
-
let
|
|
852
|
-
t(() => a(
|
|
851
|
+
let P = e.window.document.startViewTransition(() => {
|
|
852
|
+
t(() => a(w));
|
|
853
853
|
});
|
|
854
|
-
|
|
854
|
+
P.finished.finally(() => {
|
|
855
855
|
t(() => {
|
|
856
|
-
|
|
856
|
+
s(void 0), p(void 0), o(void 0), u({ isTransitioning: !1 });
|
|
857
857
|
});
|
|
858
|
-
}), t(() =>
|
|
858
|
+
}), t(() => p(P));
|
|
859
859
|
return;
|
|
860
860
|
}
|
|
861
|
-
|
|
862
|
-
state:
|
|
861
|
+
h ? (l && l.resolve(), h.skipTransition(), m({
|
|
862
|
+
state: w,
|
|
863
863
|
currentLocation: C.currentLocation,
|
|
864
864
|
nextLocation: C.nextLocation
|
|
865
|
-
})) : (
|
|
865
|
+
})) : (o(w), u({
|
|
866
866
|
isTransitioning: !0,
|
|
867
867
|
flushSync: !1,
|
|
868
868
|
currentLocation: C.currentLocation,
|
|
869
869
|
nextLocation: C.nextLocation
|
|
870
870
|
}));
|
|
871
871
|
},
|
|
872
|
-
[e.window, t,
|
|
872
|
+
[e.window, t, h, l]
|
|
873
873
|
);
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
}, [
|
|
874
|
+
i.useLayoutEffect(() => e.subscribe(E), [e, E]), i.useEffect(() => {
|
|
875
|
+
c.isTransitioning && !c.flushSync && s(new ht());
|
|
876
|
+
}, [c]), i.useEffect(() => {
|
|
877
877
|
if (l && r && e.window) {
|
|
878
|
-
let
|
|
879
|
-
|
|
878
|
+
let w = r, R = l.promise, x = e.window.document.startViewTransition(async () => {
|
|
879
|
+
i.startTransition(() => a(w)), await R;
|
|
880
880
|
});
|
|
881
881
|
x.finished.finally(() => {
|
|
882
|
-
|
|
883
|
-
}),
|
|
882
|
+
s(void 0), p(void 0), o(void 0), u({ isTransitioning: !1 });
|
|
883
|
+
}), p(x);
|
|
884
884
|
}
|
|
885
|
-
}, [r, l, e.window]),
|
|
885
|
+
}, [r, l, e.window]), i.useEffect(() => {
|
|
886
886
|
l && r && n.location.key === r.location.key && l.resolve();
|
|
887
|
-
}, [l,
|
|
888
|
-
!
|
|
887
|
+
}, [l, h, n.location, r]), i.useEffect(() => {
|
|
888
|
+
!c.isTransitioning && d && (o(d.state), u({
|
|
889
889
|
isTransitioning: !0,
|
|
890
890
|
flushSync: !1,
|
|
891
|
-
currentLocation:
|
|
892
|
-
nextLocation:
|
|
893
|
-
}),
|
|
894
|
-
}, [
|
|
895
|
-
let
|
|
891
|
+
currentLocation: d.currentLocation,
|
|
892
|
+
nextLocation: d.nextLocation
|
|
893
|
+
}), m(void 0));
|
|
894
|
+
}, [c.isTransitioning, d]);
|
|
895
|
+
let g = i.useMemo(() => ({
|
|
896
896
|
createHref: e.createHref,
|
|
897
897
|
encodeLocation: e.encodeLocation,
|
|
898
|
-
go: (
|
|
899
|
-
push: (
|
|
898
|
+
go: (w) => e.navigate(w),
|
|
899
|
+
push: (w, R, x) => e.navigate(w, {
|
|
900
900
|
state: R,
|
|
901
901
|
preventScrollReset: x == null ? void 0 : x.preventScrollReset
|
|
902
902
|
}),
|
|
903
|
-
replace: (
|
|
903
|
+
replace: (w, R, x) => e.navigate(w, {
|
|
904
904
|
replace: !0,
|
|
905
905
|
state: R,
|
|
906
906
|
preventScrollReset: x == null ? void 0 : x.preventScrollReset
|
|
907
907
|
})
|
|
908
|
-
}), [e]),
|
|
908
|
+
}), [e]), v = e.basename || "/", y = i.useMemo(
|
|
909
909
|
() => ({
|
|
910
910
|
router: e,
|
|
911
|
-
navigator:
|
|
911
|
+
navigator: g,
|
|
912
912
|
static: !1,
|
|
913
|
-
basename:
|
|
913
|
+
basename: v
|
|
914
914
|
}),
|
|
915
|
-
[e,
|
|
915
|
+
[e, g, v]
|
|
916
916
|
);
|
|
917
|
-
return /* @__PURE__ */
|
|
918
|
-
|
|
917
|
+
return /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(O.Provider, { value: y }, /* @__PURE__ */ i.createElement(F.Provider, { value: n }, /* @__PURE__ */ i.createElement(te.Provider, { value: f.current }, /* @__PURE__ */ i.createElement(J.Provider, { value: c }, /* @__PURE__ */ i.createElement(
|
|
918
|
+
Se,
|
|
919
919
|
{
|
|
920
|
-
basename:
|
|
920
|
+
basename: v,
|
|
921
921
|
location: n.location,
|
|
922
922
|
navigationType: n.historyAction,
|
|
923
|
-
navigator:
|
|
923
|
+
navigator: g
|
|
924
924
|
},
|
|
925
|
-
/* @__PURE__ */
|
|
925
|
+
/* @__PURE__ */ i.createElement(
|
|
926
926
|
mt,
|
|
927
927
|
{
|
|
928
928
|
routes: e.routes,
|
|
@@ -932,7 +932,7 @@ function sn({
|
|
|
932
932
|
)
|
|
933
933
|
))))), null);
|
|
934
934
|
}
|
|
935
|
-
var mt =
|
|
935
|
+
var mt = i.memo(pt);
|
|
936
936
|
function pt({
|
|
937
937
|
routes: e,
|
|
938
938
|
future: t,
|
|
@@ -952,78 +952,78 @@ function cn({
|
|
|
952
952
|
// the router loaded. We can help them understand how to avoid that.
|
|
953
953
|
"<Navigate> may be used only in the context of a <Router> component."
|
|
954
954
|
);
|
|
955
|
-
let { static: r } =
|
|
955
|
+
let { static: r } = i.useContext(T);
|
|
956
956
|
L(
|
|
957
957
|
!r,
|
|
958
958
|
"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change."
|
|
959
959
|
);
|
|
960
|
-
let { matches:
|
|
960
|
+
let { matches: o } = i.useContext(k), { pathname: c } = N(), u = re(), l = ee(
|
|
961
961
|
e,
|
|
962
|
-
Z(
|
|
963
|
-
|
|
962
|
+
Z(o),
|
|
963
|
+
c,
|
|
964
964
|
a === "path"
|
|
965
|
-
),
|
|
966
|
-
return
|
|
967
|
-
|
|
968
|
-
}, [
|
|
965
|
+
), s = JSON.stringify(l);
|
|
966
|
+
return i.useEffect(() => {
|
|
967
|
+
u(JSON.parse(s), { replace: t, state: n, relative: a });
|
|
968
|
+
}, [u, s, a, t, n]), null;
|
|
969
969
|
}
|
|
970
970
|
function fn(e) {
|
|
971
971
|
return nt(e.context);
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function Se({
|
|
974
974
|
basename: e = "/",
|
|
975
975
|
children: t = null,
|
|
976
976
|
location: n,
|
|
977
977
|
navigationType: a = "POP",
|
|
978
978
|
navigator: r,
|
|
979
|
-
static:
|
|
979
|
+
static: o = !1
|
|
980
980
|
}) {
|
|
981
981
|
b(
|
|
982
982
|
!M(),
|
|
983
983
|
"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
|
|
984
984
|
);
|
|
985
|
-
let
|
|
985
|
+
let c = e.replace(/^\/*/, "/"), u = i.useMemo(
|
|
986
986
|
() => ({
|
|
987
|
-
basename:
|
|
987
|
+
basename: c,
|
|
988
988
|
navigator: r,
|
|
989
|
-
static:
|
|
989
|
+
static: o,
|
|
990
990
|
future: {}
|
|
991
991
|
}),
|
|
992
|
-
[
|
|
992
|
+
[c, r, o]
|
|
993
993
|
);
|
|
994
994
|
typeof n == "string" && (n = Y(n));
|
|
995
995
|
let {
|
|
996
996
|
pathname: l = "/",
|
|
997
|
-
search:
|
|
998
|
-
hash:
|
|
999
|
-
state:
|
|
1000
|
-
key:
|
|
1001
|
-
} = n,
|
|
1002
|
-
let
|
|
1003
|
-
return
|
|
997
|
+
search: s = "",
|
|
998
|
+
hash: h = "",
|
|
999
|
+
state: p = null,
|
|
1000
|
+
key: d = "default"
|
|
1001
|
+
} = n, m = i.useMemo(() => {
|
|
1002
|
+
let f = I(l, c);
|
|
1003
|
+
return f == null ? null : {
|
|
1004
1004
|
location: {
|
|
1005
|
-
pathname:
|
|
1006
|
-
search:
|
|
1007
|
-
hash:
|
|
1008
|
-
state:
|
|
1009
|
-
key:
|
|
1005
|
+
pathname: f,
|
|
1006
|
+
search: s,
|
|
1007
|
+
hash: h,
|
|
1008
|
+
state: p,
|
|
1009
|
+
key: d
|
|
1010
1010
|
},
|
|
1011
1011
|
navigationType: a
|
|
1012
1012
|
};
|
|
1013
|
-
}, [
|
|
1013
|
+
}, [c, l, s, h, p, d, a]);
|
|
1014
1014
|
return L(
|
|
1015
|
-
|
|
1016
|
-
`<Router basename="${
|
|
1017
|
-
),
|
|
1015
|
+
m != null,
|
|
1016
|
+
`<Router basename="${c}"> is not able to match the URL "${l}${s}${h}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
1017
|
+
), m == null ? null : /* @__PURE__ */ i.createElement(T.Provider, { value: u }, /* @__PURE__ */ i.createElement(K.Provider, { children: t, value: m }));
|
|
1018
1018
|
}
|
|
1019
1019
|
var V = "get", j = "application/x-www-form-urlencoded";
|
|
1020
1020
|
function q(e) {
|
|
1021
1021
|
return e != null && typeof e.tagName == "string";
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function vt(e) {
|
|
1024
1024
|
return q(e) && e.tagName.toLowerCase() === "button";
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function gt(e) {
|
|
1027
1027
|
return q(e) && e.tagName.toLowerCase() === "form";
|
|
1028
1028
|
}
|
|
1029
1029
|
function yt(e) {
|
|
@@ -1050,8 +1050,8 @@ function Q(e = "") {
|
|
|
1050
1050
|
function xt(e, t) {
|
|
1051
1051
|
let n = Q(e);
|
|
1052
1052
|
return t && t.forEach((a, r) => {
|
|
1053
|
-
n.has(r) || t.getAll(r).forEach((
|
|
1054
|
-
n.append(r,
|
|
1053
|
+
n.has(r) || t.getAll(r).forEach((o) => {
|
|
1054
|
+
n.append(r, o);
|
|
1055
1055
|
});
|
|
1056
1056
|
}), n;
|
|
1057
1057
|
}
|
|
@@ -1081,38 +1081,38 @@ function X(e) {
|
|
|
1081
1081
|
), null) : e;
|
|
1082
1082
|
}
|
|
1083
1083
|
function Ct(e, t) {
|
|
1084
|
-
let n, a, r,
|
|
1085
|
-
if (
|
|
1086
|
-
let
|
|
1087
|
-
a =
|
|
1088
|
-
} else if (
|
|
1089
|
-
let
|
|
1090
|
-
if (
|
|
1084
|
+
let n, a, r, o, c;
|
|
1085
|
+
if (gt(e)) {
|
|
1086
|
+
let u = e.getAttribute("action");
|
|
1087
|
+
a = u ? I(u, t) : null, n = e.getAttribute("method") || V, r = X(e.getAttribute("enctype")) || j, o = new FormData(e);
|
|
1088
|
+
} else if (vt(e) || yt(e) && (e.type === "submit" || e.type === "image")) {
|
|
1089
|
+
let u = e.form;
|
|
1090
|
+
if (u == null)
|
|
1091
1091
|
throw new Error(
|
|
1092
1092
|
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1093
1093
|
);
|
|
1094
|
-
let l = e.getAttribute("formaction") ||
|
|
1095
|
-
if (a = l ? I(l, t) : null, n = e.getAttribute("formmethod") ||
|
|
1096
|
-
let { name:
|
|
1097
|
-
if (
|
|
1098
|
-
let
|
|
1099
|
-
|
|
1100
|
-
} else
|
|
1094
|
+
let l = e.getAttribute("formaction") || u.getAttribute("action");
|
|
1095
|
+
if (a = l ? I(l, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || V, r = X(e.getAttribute("formenctype")) || X(u.getAttribute("enctype")) || j, o = new FormData(u, e), !Rt()) {
|
|
1096
|
+
let { name: s, type: h, value: p } = e;
|
|
1097
|
+
if (h === "image") {
|
|
1098
|
+
let d = s ? `${s}.` : "";
|
|
1099
|
+
o.append(`${d}x`, "0"), o.append(`${d}y`, "0");
|
|
1100
|
+
} else s && o.append(s, p);
|
|
1101
1101
|
}
|
|
1102
1102
|
} else {
|
|
1103
1103
|
if (q(e))
|
|
1104
1104
|
throw new Error(
|
|
1105
1105
|
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
1106
1106
|
);
|
|
1107
|
-
n = V, a = null, r = j,
|
|
1107
|
+
n = V, a = null, r = j, c = e;
|
|
1108
1108
|
}
|
|
1109
|
-
return
|
|
1109
|
+
return o && r === "text/plain" && (c = o, o = void 0), { action: a, method: n.toLowerCase(), encType: r, formData: o, body: c };
|
|
1110
1110
|
}
|
|
1111
1111
|
function oe(e, t) {
|
|
1112
1112
|
if (e === !1 || e === null || typeof e > "u")
|
|
1113
1113
|
throw new Error(t);
|
|
1114
1114
|
}
|
|
1115
|
-
async function
|
|
1115
|
+
async function Pt(e, t) {
|
|
1116
1116
|
if (e.id in t)
|
|
1117
1117
|
return t[e.id];
|
|
1118
1118
|
try {
|
|
@@ -1129,58 +1129,58 @@ async function St(e, t) {
|
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function St(e) {
|
|
1133
1133
|
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
1134
1134
|
}
|
|
1135
1135
|
async function Lt(e, t, n) {
|
|
1136
1136
|
let a = await Promise.all(
|
|
1137
1137
|
e.map(async (r) => {
|
|
1138
|
-
let
|
|
1139
|
-
if (
|
|
1140
|
-
let
|
|
1141
|
-
return
|
|
1138
|
+
let o = t.routes[r.route.id];
|
|
1139
|
+
if (o) {
|
|
1140
|
+
let c = await Pt(o, n);
|
|
1141
|
+
return c.links ? c.links() : [];
|
|
1142
1142
|
}
|
|
1143
1143
|
return [];
|
|
1144
1144
|
})
|
|
1145
1145
|
);
|
|
1146
1146
|
return Nt(
|
|
1147
|
-
a.flat(1).filter(
|
|
1147
|
+
a.flat(1).filter(St).filter((r) => r.rel === "stylesheet" || r.rel === "preload").map(
|
|
1148
1148
|
(r) => r.rel === "stylesheet" ? { ...r, rel: "prefetch", as: "style" } : { ...r, rel: "prefetch" }
|
|
1149
1149
|
)
|
|
1150
1150
|
);
|
|
1151
1151
|
}
|
|
1152
|
-
function me(e, t, n, a, r,
|
|
1153
|
-
let
|
|
1154
|
-
var
|
|
1152
|
+
function me(e, t, n, a, r, o) {
|
|
1153
|
+
let c = (l, s) => n[s] ? l.route.id !== n[s].route.id : !0, u = (l, s) => {
|
|
1154
|
+
var h;
|
|
1155
1155
|
return (
|
|
1156
1156
|
// param change, /users/123 -> /users/456
|
|
1157
|
-
n[
|
|
1157
|
+
n[s].pathname !== l.pathname || // splat param changed, which is not present in match.path
|
|
1158
1158
|
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
1159
|
-
((
|
|
1159
|
+
((h = n[s].route.path) == null ? void 0 : h.endsWith("*")) && n[s].params["*"] !== l.params["*"]
|
|
1160
1160
|
);
|
|
1161
1161
|
};
|
|
1162
|
-
return
|
|
1163
|
-
(l,
|
|
1164
|
-
) :
|
|
1165
|
-
var
|
|
1166
|
-
let
|
|
1167
|
-
if (!
|
|
1162
|
+
return o === "assets" ? t.filter(
|
|
1163
|
+
(l, s) => c(l, s) || u(l, s)
|
|
1164
|
+
) : o === "data" ? t.filter((l, s) => {
|
|
1165
|
+
var p;
|
|
1166
|
+
let h = a.routes[l.route.id];
|
|
1167
|
+
if (!h || !h.hasLoader)
|
|
1168
1168
|
return !1;
|
|
1169
|
-
if (
|
|
1169
|
+
if (c(l, s) || u(l, s))
|
|
1170
1170
|
return !0;
|
|
1171
1171
|
if (l.route.shouldRevalidate) {
|
|
1172
|
-
let
|
|
1172
|
+
let d = l.route.shouldRevalidate({
|
|
1173
1173
|
currentUrl: new URL(
|
|
1174
1174
|
r.pathname + r.search + r.hash,
|
|
1175
1175
|
window.origin
|
|
1176
1176
|
),
|
|
1177
|
-
currentParams: ((
|
|
1177
|
+
currentParams: ((p = n[0]) == null ? void 0 : p.params) || {},
|
|
1178
1178
|
nextUrl: new URL(e, window.origin),
|
|
1179
1179
|
nextParams: l.params,
|
|
1180
1180
|
defaultShouldRevalidate: !0
|
|
1181
1181
|
});
|
|
1182
|
-
if (typeof
|
|
1183
|
-
return
|
|
1182
|
+
if (typeof d == "boolean")
|
|
1183
|
+
return d;
|
|
1184
1184
|
}
|
|
1185
1185
|
return !0;
|
|
1186
1186
|
}) : [];
|
|
@@ -1207,8 +1207,8 @@ function Tt(e) {
|
|
|
1207
1207
|
function Nt(e, t) {
|
|
1208
1208
|
let n = /* @__PURE__ */ new Set();
|
|
1209
1209
|
return new Set(t), e.reduce((a, r) => {
|
|
1210
|
-
let
|
|
1211
|
-
return n.has(
|
|
1210
|
+
let o = JSON.stringify(Tt(r));
|
|
1211
|
+
return n.has(o) || (n.add(o), a.push({ key: o, link: r })), a;
|
|
1212
1212
|
}, []);
|
|
1213
1213
|
}
|
|
1214
1214
|
function At(e) {
|
|
@@ -1221,67 +1221,67 @@ function At(e) {
|
|
|
1221
1221
|
return t.pathname === "/" ? t.pathname = "_root.data" : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
|
|
1222
1222
|
}
|
|
1223
1223
|
function Dt() {
|
|
1224
|
-
let e =
|
|
1224
|
+
let e = i.useContext(O);
|
|
1225
1225
|
return oe(
|
|
1226
1226
|
e,
|
|
1227
1227
|
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1228
1228
|
), e;
|
|
1229
1229
|
}
|
|
1230
1230
|
function It() {
|
|
1231
|
-
let e =
|
|
1231
|
+
let e = i.useContext(F);
|
|
1232
1232
|
return oe(
|
|
1233
1233
|
e,
|
|
1234
1234
|
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1235
1235
|
), e;
|
|
1236
1236
|
}
|
|
1237
|
-
var le =
|
|
1237
|
+
var le = i.createContext(void 0);
|
|
1238
1238
|
le.displayName = "FrameworkContext";
|
|
1239
1239
|
function Le() {
|
|
1240
|
-
let e =
|
|
1240
|
+
let e = i.useContext(le);
|
|
1241
1241
|
return oe(
|
|
1242
1242
|
e,
|
|
1243
1243
|
"You must render this element inside a <HydratedRouter> element"
|
|
1244
1244
|
), e;
|
|
1245
1245
|
}
|
|
1246
1246
|
function Ot(e, t) {
|
|
1247
|
-
let n =
|
|
1248
|
-
|
|
1249
|
-
if (e === "render" &&
|
|
1250
|
-
let
|
|
1251
|
-
|
|
1252
|
-
|
|
1247
|
+
let n = i.useContext(le), [a, r] = i.useState(!1), [o, c] = i.useState(!1), { onFocus: u, onBlur: l, onMouseEnter: s, onMouseLeave: h, onTouchStart: p } = t, d = i.useRef(null);
|
|
1248
|
+
i.useEffect(() => {
|
|
1249
|
+
if (e === "render" && c(!0), e === "viewport") {
|
|
1250
|
+
let E = (v) => {
|
|
1251
|
+
v.forEach((y) => {
|
|
1252
|
+
c(y.isIntersecting);
|
|
1253
1253
|
});
|
|
1254
|
-
},
|
|
1255
|
-
return
|
|
1256
|
-
|
|
1254
|
+
}, g = new IntersectionObserver(E, { threshold: 0.5 });
|
|
1255
|
+
return d.current && g.observe(d.current), () => {
|
|
1256
|
+
g.disconnect();
|
|
1257
1257
|
};
|
|
1258
1258
|
}
|
|
1259
|
-
}, [e]),
|
|
1259
|
+
}, [e]), i.useEffect(() => {
|
|
1260
1260
|
if (a) {
|
|
1261
|
-
let
|
|
1262
|
-
|
|
1261
|
+
let E = setTimeout(() => {
|
|
1262
|
+
c(!0);
|
|
1263
1263
|
}, 100);
|
|
1264
1264
|
return () => {
|
|
1265
|
-
clearTimeout(
|
|
1265
|
+
clearTimeout(E);
|
|
1266
1266
|
};
|
|
1267
1267
|
}
|
|
1268
1268
|
}, [a]);
|
|
1269
|
-
let
|
|
1269
|
+
let m = () => {
|
|
1270
1270
|
r(!0);
|
|
1271
|
-
},
|
|
1272
|
-
r(!1),
|
|
1271
|
+
}, f = () => {
|
|
1272
|
+
r(!1), c(!1);
|
|
1273
1273
|
};
|
|
1274
|
-
return n ? e !== "intent" ? [
|
|
1275
|
-
|
|
1276
|
-
|
|
1274
|
+
return n ? e !== "intent" ? [o, d, {}] : [
|
|
1275
|
+
o,
|
|
1276
|
+
d,
|
|
1277
1277
|
{
|
|
1278
|
-
onFocus: U(
|
|
1279
|
-
onBlur: U(l,
|
|
1280
|
-
onMouseEnter: U(
|
|
1281
|
-
onMouseLeave: U(
|
|
1282
|
-
onTouchStart: U(
|
|
1278
|
+
onFocus: U(u, m),
|
|
1279
|
+
onBlur: U(l, f),
|
|
1280
|
+
onMouseEnter: U(s, m),
|
|
1281
|
+
onMouseLeave: U(h, f),
|
|
1282
|
+
onTouchStart: U(p, m)
|
|
1283
1283
|
}
|
|
1284
|
-
] : [!1,
|
|
1284
|
+
] : [!1, d, {}];
|
|
1285
1285
|
}
|
|
1286
1286
|
function U(e, t) {
|
|
1287
1287
|
return (n) => {
|
|
@@ -1292,22 +1292,22 @@ function Mt({
|
|
|
1292
1292
|
page: e,
|
|
1293
1293
|
...t
|
|
1294
1294
|
}) {
|
|
1295
|
-
let { router: n } = Dt(), a =
|
|
1295
|
+
let { router: n } = Dt(), a = i.useMemo(
|
|
1296
1296
|
() => pe(n.routes, e, n.basename),
|
|
1297
1297
|
[n.routes, e, n.basename]
|
|
1298
1298
|
);
|
|
1299
|
-
return a ? /* @__PURE__ */
|
|
1299
|
+
return a ? /* @__PURE__ */ i.createElement(_t, { page: e, matches: a, ...t }) : null;
|
|
1300
1300
|
}
|
|
1301
1301
|
function Ft(e) {
|
|
1302
|
-
let { manifest: t, routeModules: n } = Le(), [a, r] =
|
|
1303
|
-
return
|
|
1304
|
-
let
|
|
1302
|
+
let { manifest: t, routeModules: n } = Le(), [a, r] = i.useState([]);
|
|
1303
|
+
return i.useEffect(() => {
|
|
1304
|
+
let o = !1;
|
|
1305
1305
|
return Lt(e, t, n).then(
|
|
1306
|
-
(
|
|
1307
|
-
|
|
1306
|
+
(c) => {
|
|
1307
|
+
o || r(c);
|
|
1308
1308
|
}
|
|
1309
1309
|
), () => {
|
|
1310
|
-
|
|
1310
|
+
o = !0;
|
|
1311
1311
|
};
|
|
1312
1312
|
}, [e, t, n]), a;
|
|
1313
1313
|
}
|
|
@@ -1316,57 +1316,57 @@ function _t({
|
|
|
1316
1316
|
matches: t,
|
|
1317
1317
|
...n
|
|
1318
1318
|
}) {
|
|
1319
|
-
let a = N(), { manifest: r, routeModules:
|
|
1319
|
+
let a = N(), { manifest: r, routeModules: o } = Le(), { loaderData: c, matches: u } = It(), l = i.useMemo(
|
|
1320
1320
|
() => me(
|
|
1321
1321
|
e,
|
|
1322
1322
|
t,
|
|
1323
|
-
|
|
1323
|
+
u,
|
|
1324
1324
|
r,
|
|
1325
1325
|
a,
|
|
1326
1326
|
"data"
|
|
1327
1327
|
),
|
|
1328
|
-
[e, t,
|
|
1329
|
-
),
|
|
1328
|
+
[e, t, u, r, a]
|
|
1329
|
+
), s = i.useMemo(
|
|
1330
1330
|
() => me(
|
|
1331
1331
|
e,
|
|
1332
1332
|
t,
|
|
1333
|
-
|
|
1333
|
+
u,
|
|
1334
1334
|
r,
|
|
1335
1335
|
a,
|
|
1336
1336
|
"assets"
|
|
1337
1337
|
),
|
|
1338
|
-
[e, t,
|
|
1339
|
-
),
|
|
1338
|
+
[e, t, u, r, a]
|
|
1339
|
+
), h = i.useMemo(() => {
|
|
1340
1340
|
if (e === a.pathname + a.search + a.hash)
|
|
1341
1341
|
return [];
|
|
1342
|
-
let
|
|
1343
|
-
if (t.forEach((
|
|
1344
|
-
var
|
|
1345
|
-
let
|
|
1346
|
-
!
|
|
1347
|
-
}),
|
|
1342
|
+
let m = /* @__PURE__ */ new Set(), f = !1;
|
|
1343
|
+
if (t.forEach((g) => {
|
|
1344
|
+
var y;
|
|
1345
|
+
let v = r.routes[g.route.id];
|
|
1346
|
+
!v || !v.hasLoader || (!l.some((w) => w.route.id === g.route.id) && g.route.id in c && ((y = o[g.route.id]) != null && y.shouldRevalidate) || v.hasClientLoader ? f = !0 : m.add(g.route.id));
|
|
1347
|
+
}), m.size === 0)
|
|
1348
1348
|
return [];
|
|
1349
|
-
let
|
|
1350
|
-
return
|
|
1349
|
+
let E = At(e);
|
|
1350
|
+
return f && m.size > 0 && E.searchParams.set(
|
|
1351
1351
|
"_routes",
|
|
1352
|
-
t.filter((
|
|
1353
|
-
), [
|
|
1352
|
+
t.filter((g) => m.has(g.route.id)).map((g) => g.route.id).join(",")
|
|
1353
|
+
), [E.pathname + E.search];
|
|
1354
1354
|
}, [
|
|
1355
|
-
|
|
1355
|
+
c,
|
|
1356
1356
|
a,
|
|
1357
1357
|
r,
|
|
1358
1358
|
l,
|
|
1359
1359
|
t,
|
|
1360
1360
|
e,
|
|
1361
|
-
|
|
1362
|
-
]),
|
|
1363
|
-
() => kt(
|
|
1364
|
-
[
|
|
1365
|
-
),
|
|
1366
|
-
return /* @__PURE__ */
|
|
1361
|
+
o
|
|
1362
|
+
]), p = i.useMemo(
|
|
1363
|
+
() => kt(s, r),
|
|
1364
|
+
[s, r]
|
|
1365
|
+
), d = Ft(s);
|
|
1366
|
+
return /* @__PURE__ */ i.createElement(i.Fragment, null, h.map((m) => /* @__PURE__ */ i.createElement("link", { key: m, rel: "prefetch", as: "fetch", href: m, ...n })), p.map((m) => /* @__PURE__ */ i.createElement("link", { key: m, rel: "modulepreload", href: m, ...n })), d.map(({ key: m, link: f }) => (
|
|
1367
1367
|
// these don't spread `linkProps` because they are full link descriptors
|
|
1368
1368
|
// already with their own props
|
|
1369
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ i.createElement("link", { key: m, ...f })
|
|
1370
1370
|
)));
|
|
1371
1371
|
}
|
|
1372
1372
|
function Ut(...e) {
|
|
@@ -1378,153 +1378,153 @@ function Ut(...e) {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
var ke = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1380
1380
|
try {
|
|
1381
|
-
ke && (window.__reactRouterVersion = "7.1.
|
|
1381
|
+
ke && (window.__reactRouterVersion = "7.1.5");
|
|
1382
1382
|
} catch {
|
|
1383
1383
|
}
|
|
1384
|
-
var $e = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Te =
|
|
1384
|
+
var $e = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Te = i.forwardRef(
|
|
1385
1385
|
function({
|
|
1386
1386
|
onClick: t,
|
|
1387
1387
|
discover: n = "render",
|
|
1388
1388
|
prefetch: a = "none",
|
|
1389
1389
|
relative: r,
|
|
1390
|
-
reloadDocument:
|
|
1391
|
-
replace:
|
|
1392
|
-
state:
|
|
1390
|
+
reloadDocument: o,
|
|
1391
|
+
replace: c,
|
|
1392
|
+
state: u,
|
|
1393
1393
|
target: l,
|
|
1394
|
-
to:
|
|
1395
|
-
preventScrollReset:
|
|
1396
|
-
viewTransition:
|
|
1397
|
-
...
|
|
1398
|
-
},
|
|
1399
|
-
let { basename:
|
|
1400
|
-
if (typeof
|
|
1394
|
+
to: s,
|
|
1395
|
+
preventScrollReset: h,
|
|
1396
|
+
viewTransition: p,
|
|
1397
|
+
...d
|
|
1398
|
+
}, m) {
|
|
1399
|
+
let { basename: f } = i.useContext(T), E = typeof s == "string" && $e.test(s), g, v = !1;
|
|
1400
|
+
if (typeof s == "string" && E && (g = s, ke))
|
|
1401
1401
|
try {
|
|
1402
|
-
let
|
|
1403
|
-
D.origin ===
|
|
1402
|
+
let S = new URL(window.location.href), D = s.startsWith("//") ? new URL(S.protocol + s) : new URL(s), se = I(D.pathname, f);
|
|
1403
|
+
D.origin === S.origin && se != null ? s = se + D.search + D.hash : v = !0;
|
|
1404
1404
|
} catch {
|
|
1405
1405
|
L(
|
|
1406
1406
|
!1,
|
|
1407
|
-
`<Link to="${
|
|
1407
|
+
`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1408
1408
|
);
|
|
1409
1409
|
}
|
|
1410
|
-
let
|
|
1410
|
+
let y = Ze(s, { relative: r }), [w, R, x] = Ot(
|
|
1411
1411
|
a,
|
|
1412
|
-
|
|
1413
|
-
), C = zt(
|
|
1414
|
-
replace:
|
|
1415
|
-
state:
|
|
1412
|
+
d
|
|
1413
|
+
), C = zt(s, {
|
|
1414
|
+
replace: c,
|
|
1415
|
+
state: u,
|
|
1416
1416
|
target: l,
|
|
1417
|
-
preventScrollReset:
|
|
1417
|
+
preventScrollReset: h,
|
|
1418
1418
|
relative: r,
|
|
1419
|
-
viewTransition:
|
|
1419
|
+
viewTransition: p
|
|
1420
1420
|
});
|
|
1421
|
-
function $(
|
|
1422
|
-
t && t(
|
|
1421
|
+
function $(S) {
|
|
1422
|
+
t && t(S), S.defaultPrevented || C(S);
|
|
1423
1423
|
}
|
|
1424
|
-
let
|
|
1424
|
+
let P = (
|
|
1425
1425
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1426
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ i.createElement(
|
|
1427
1427
|
"a",
|
|
1428
1428
|
{
|
|
1429
|
-
...
|
|
1429
|
+
...d,
|
|
1430
1430
|
...x,
|
|
1431
|
-
href:
|
|
1432
|
-
onClick:
|
|
1433
|
-
ref: Ut(
|
|
1431
|
+
href: g || y,
|
|
1432
|
+
onClick: v || o ? t : $,
|
|
1433
|
+
ref: Ut(m, R),
|
|
1434
1434
|
target: l,
|
|
1435
|
-
"data-discover": !
|
|
1435
|
+
"data-discover": !E && n === "render" ? "true" : void 0
|
|
1436
1436
|
}
|
|
1437
1437
|
)
|
|
1438
1438
|
);
|
|
1439
|
-
return
|
|
1439
|
+
return w && !E ? /* @__PURE__ */ i.createElement(i.Fragment, null, P, /* @__PURE__ */ i.createElement(Mt, { page: y })) : P;
|
|
1440
1440
|
}
|
|
1441
1441
|
);
|
|
1442
1442
|
Te.displayName = "Link";
|
|
1443
|
-
var Bt =
|
|
1443
|
+
var Bt = i.forwardRef(
|
|
1444
1444
|
function({
|
|
1445
1445
|
"aria-current": t = "page",
|
|
1446
1446
|
caseSensitive: n = !1,
|
|
1447
1447
|
className: a = "",
|
|
1448
1448
|
end: r = !1,
|
|
1449
|
-
style:
|
|
1450
|
-
to:
|
|
1451
|
-
viewTransition:
|
|
1449
|
+
style: o,
|
|
1450
|
+
to: c,
|
|
1451
|
+
viewTransition: u,
|
|
1452
1452
|
children: l,
|
|
1453
|
-
...
|
|
1454
|
-
},
|
|
1455
|
-
let
|
|
1453
|
+
...s
|
|
1454
|
+
}, h) {
|
|
1455
|
+
let p = W(c, { relative: s.relative }), d = N(), m = i.useContext(F), { navigator: f, basename: E } = i.useContext(T), g = m != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1456
1456
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1457
|
-
Kt(
|
|
1458
|
-
n || (
|
|
1459
|
-
const R =
|
|
1460
|
-
let x =
|
|
1457
|
+
Kt(p) && u === !0, v = f.encodeLocation ? f.encodeLocation(p).pathname : p.pathname, y = d.pathname, w = m && m.navigation && m.navigation.location ? m.navigation.location.pathname : null;
|
|
1458
|
+
n || (y = y.toLowerCase(), w = w ? w.toLowerCase() : null, v = v.toLowerCase()), w && E && (w = I(w, E) || w);
|
|
1459
|
+
const R = v !== "/" && v.endsWith("/") ? v.length - 1 : v.length;
|
|
1460
|
+
let x = y === v || !r && y.startsWith(v) && y.charAt(R) === "/", C = w != null && (w === v || !r && w.startsWith(v) && w.charAt(v.length) === "/"), $ = {
|
|
1461
1461
|
isActive: x,
|
|
1462
1462
|
isPending: C,
|
|
1463
|
-
isTransitioning:
|
|
1464
|
-
},
|
|
1465
|
-
typeof a == "function" ?
|
|
1463
|
+
isTransitioning: g
|
|
1464
|
+
}, P = x ? t : void 0, S;
|
|
1465
|
+
typeof a == "function" ? S = a($) : S = [
|
|
1466
1466
|
a,
|
|
1467
1467
|
x ? "active" : null,
|
|
1468
1468
|
C ? "pending" : null,
|
|
1469
|
-
|
|
1469
|
+
g ? "transitioning" : null
|
|
1470
1470
|
].filter(Boolean).join(" ");
|
|
1471
|
-
let D = typeof
|
|
1472
|
-
return /* @__PURE__ */
|
|
1471
|
+
let D = typeof o == "function" ? o($) : o;
|
|
1472
|
+
return /* @__PURE__ */ i.createElement(
|
|
1473
1473
|
Te,
|
|
1474
1474
|
{
|
|
1475
|
-
...
|
|
1476
|
-
"aria-current":
|
|
1477
|
-
className:
|
|
1478
|
-
ref:
|
|
1475
|
+
...s,
|
|
1476
|
+
"aria-current": P,
|
|
1477
|
+
className: S,
|
|
1478
|
+
ref: h,
|
|
1479
1479
|
style: D,
|
|
1480
|
-
to:
|
|
1481
|
-
viewTransition:
|
|
1480
|
+
to: c,
|
|
1481
|
+
viewTransition: u
|
|
1482
1482
|
},
|
|
1483
1483
|
typeof l == "function" ? l($) : l
|
|
1484
1484
|
);
|
|
1485
1485
|
}
|
|
1486
1486
|
);
|
|
1487
1487
|
Bt.displayName = "NavLink";
|
|
1488
|
-
var Ht =
|
|
1488
|
+
var Ht = i.forwardRef(
|
|
1489
1489
|
({
|
|
1490
1490
|
discover: e = "render",
|
|
1491
1491
|
fetcherKey: t,
|
|
1492
1492
|
navigate: n,
|
|
1493
1493
|
reloadDocument: a,
|
|
1494
1494
|
replace: r,
|
|
1495
|
-
state:
|
|
1496
|
-
method:
|
|
1497
|
-
action:
|
|
1495
|
+
state: o,
|
|
1496
|
+
method: c = V,
|
|
1497
|
+
action: u,
|
|
1498
1498
|
onSubmit: l,
|
|
1499
|
-
relative:
|
|
1500
|
-
preventScrollReset:
|
|
1501
|
-
viewTransition:
|
|
1502
|
-
...
|
|
1503
|
-
},
|
|
1504
|
-
let
|
|
1505
|
-
if (l && l(
|
|
1506
|
-
|
|
1507
|
-
let R =
|
|
1508
|
-
|
|
1499
|
+
relative: s,
|
|
1500
|
+
preventScrollReset: h,
|
|
1501
|
+
viewTransition: p,
|
|
1502
|
+
...d
|
|
1503
|
+
}, m) => {
|
|
1504
|
+
let f = Yt(), E = Jt(u, { relative: s }), g = c.toLowerCase() === "get" ? "get" : "post", v = typeof u == "string" && $e.test(u), y = (w) => {
|
|
1505
|
+
if (l && l(w), w.defaultPrevented) return;
|
|
1506
|
+
w.preventDefault();
|
|
1507
|
+
let R = w.nativeEvent.submitter, x = (R == null ? void 0 : R.getAttribute("formmethod")) || c;
|
|
1508
|
+
f(R || w.currentTarget, {
|
|
1509
1509
|
fetcherKey: t,
|
|
1510
1510
|
method: x,
|
|
1511
1511
|
navigate: n,
|
|
1512
1512
|
replace: r,
|
|
1513
|
-
state:
|
|
1514
|
-
relative:
|
|
1515
|
-
preventScrollReset:
|
|
1516
|
-
viewTransition:
|
|
1513
|
+
state: o,
|
|
1514
|
+
relative: s,
|
|
1515
|
+
preventScrollReset: h,
|
|
1516
|
+
viewTransition: p
|
|
1517
1517
|
});
|
|
1518
1518
|
};
|
|
1519
|
-
return /* @__PURE__ */
|
|
1519
|
+
return /* @__PURE__ */ i.createElement(
|
|
1520
1520
|
"form",
|
|
1521
1521
|
{
|
|
1522
|
-
ref:
|
|
1523
|
-
method:
|
|
1524
|
-
action:
|
|
1525
|
-
onSubmit: a ? l :
|
|
1526
|
-
...
|
|
1527
|
-
"data-discover": !
|
|
1522
|
+
ref: m,
|
|
1523
|
+
method: g,
|
|
1524
|
+
action: E,
|
|
1525
|
+
onSubmit: a ? l : y,
|
|
1526
|
+
...d,
|
|
1527
|
+
"data-discover": !v && e === "render" ? "true" : void 0
|
|
1528
1528
|
}
|
|
1529
1529
|
);
|
|
1530
1530
|
}
|
|
@@ -1534,7 +1534,7 @@ function Wt(e) {
|
|
|
1534
1534
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1535
1535
|
}
|
|
1536
1536
|
function Ne(e) {
|
|
1537
|
-
let t =
|
|
1537
|
+
let t = i.useContext(O);
|
|
1538
1538
|
return b(t, Wt(e)), t;
|
|
1539
1539
|
}
|
|
1540
1540
|
function zt(e, {
|
|
@@ -1542,35 +1542,35 @@ function zt(e, {
|
|
|
1542
1542
|
replace: n,
|
|
1543
1543
|
state: a,
|
|
1544
1544
|
preventScrollReset: r,
|
|
1545
|
-
relative:
|
|
1546
|
-
viewTransition:
|
|
1545
|
+
relative: o,
|
|
1546
|
+
viewTransition: c
|
|
1547
1547
|
} = {}) {
|
|
1548
|
-
let
|
|
1549
|
-
return
|
|
1550
|
-
(
|
|
1551
|
-
if (Et(
|
|
1552
|
-
|
|
1553
|
-
let
|
|
1554
|
-
|
|
1555
|
-
replace:
|
|
1548
|
+
let u = re(), l = N(), s = W(e, { relative: o });
|
|
1549
|
+
return i.useCallback(
|
|
1550
|
+
(h) => {
|
|
1551
|
+
if (Et(h, t)) {
|
|
1552
|
+
h.preventDefault();
|
|
1553
|
+
let p = n !== void 0 ? n : B(l) === B(s);
|
|
1554
|
+
u(e, {
|
|
1555
|
+
replace: p,
|
|
1556
1556
|
state: a,
|
|
1557
1557
|
preventScrollReset: r,
|
|
1558
|
-
relative:
|
|
1559
|
-
viewTransition:
|
|
1558
|
+
relative: o,
|
|
1559
|
+
viewTransition: c
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
1562
1562
|
},
|
|
1563
1563
|
[
|
|
1564
1564
|
l,
|
|
1565
|
-
c,
|
|
1566
1565
|
u,
|
|
1566
|
+
s,
|
|
1567
1567
|
n,
|
|
1568
1568
|
a,
|
|
1569
1569
|
t,
|
|
1570
1570
|
e,
|
|
1571
1571
|
r,
|
|
1572
|
-
|
|
1573
|
-
|
|
1572
|
+
o,
|
|
1573
|
+
c
|
|
1574
1574
|
]
|
|
1575
1575
|
);
|
|
1576
1576
|
}
|
|
@@ -1579,7 +1579,7 @@ function dn(e) {
|
|
|
1579
1579
|
typeof URLSearchParams < "u",
|
|
1580
1580
|
"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params."
|
|
1581
1581
|
);
|
|
1582
|
-
let t =
|
|
1582
|
+
let t = i.useRef(Q(e)), n = i.useRef(!1), a = N(), r = i.useMemo(
|
|
1583
1583
|
() => (
|
|
1584
1584
|
// Only merge in the defaults if we haven't yet called setSearchParams.
|
|
1585
1585
|
// Once we call that we want those to take precedence, otherwise you can't
|
|
@@ -1590,46 +1590,46 @@ function dn(e) {
|
|
|
1590
1590
|
)
|
|
1591
1591
|
),
|
|
1592
1592
|
[a.search]
|
|
1593
|
-
),
|
|
1594
|
-
(
|
|
1595
|
-
const
|
|
1596
|
-
typeof
|
|
1593
|
+
), o = re(), c = i.useCallback(
|
|
1594
|
+
(u, l) => {
|
|
1595
|
+
const s = Q(
|
|
1596
|
+
typeof u == "function" ? u(r) : u
|
|
1597
1597
|
);
|
|
1598
|
-
n.current = !0,
|
|
1598
|
+
n.current = !0, o("?" + s, l);
|
|
1599
1599
|
},
|
|
1600
|
-
[
|
|
1600
|
+
[o, r]
|
|
1601
1601
|
);
|
|
1602
|
-
return [r,
|
|
1602
|
+
return [r, c];
|
|
1603
1603
|
}
|
|
1604
1604
|
var Vt = 0, jt = () => `__${String(++Vt)}__`;
|
|
1605
1605
|
function Yt() {
|
|
1606
1606
|
let { router: e } = Ne(
|
|
1607
1607
|
"useSubmit"
|
|
1608
1608
|
/* UseSubmit */
|
|
1609
|
-
), { basename: t } =
|
|
1610
|
-
return
|
|
1609
|
+
), { basename: t } = i.useContext(T), n = ct();
|
|
1610
|
+
return i.useCallback(
|
|
1611
1611
|
async (a, r = {}) => {
|
|
1612
|
-
let { action:
|
|
1612
|
+
let { action: o, method: c, encType: u, formData: l, body: s } = Ct(
|
|
1613
1613
|
a,
|
|
1614
1614
|
t
|
|
1615
1615
|
);
|
|
1616
1616
|
if (r.navigate === !1) {
|
|
1617
|
-
let
|
|
1618
|
-
await e.fetch(
|
|
1617
|
+
let h = r.fetcherKey || jt();
|
|
1618
|
+
await e.fetch(h, n, r.action || o, {
|
|
1619
1619
|
preventScrollReset: r.preventScrollReset,
|
|
1620
1620
|
formData: l,
|
|
1621
|
-
body:
|
|
1622
|
-
formMethod: r.method ||
|
|
1623
|
-
formEncType: r.encType ||
|
|
1621
|
+
body: s,
|
|
1622
|
+
formMethod: r.method || c,
|
|
1623
|
+
formEncType: r.encType || u,
|
|
1624
1624
|
flushSync: r.flushSync
|
|
1625
1625
|
});
|
|
1626
1626
|
} else
|
|
1627
|
-
await e.navigate(r.action ||
|
|
1627
|
+
await e.navigate(r.action || o, {
|
|
1628
1628
|
preventScrollReset: r.preventScrollReset,
|
|
1629
1629
|
formData: l,
|
|
1630
|
-
body:
|
|
1631
|
-
formMethod: r.method ||
|
|
1632
|
-
formEncType: r.encType ||
|
|
1630
|
+
body: s,
|
|
1631
|
+
formMethod: r.method || c,
|
|
1632
|
+
formEncType: r.encType || u,
|
|
1633
1633
|
replace: r.replace,
|
|
1634
1634
|
state: r.state,
|
|
1635
1635
|
fromRouteId: n,
|
|
@@ -1641,22 +1641,22 @@ function Yt() {
|
|
|
1641
1641
|
);
|
|
1642
1642
|
}
|
|
1643
1643
|
function Jt(e, { relative: t } = {}) {
|
|
1644
|
-
let { basename: n } =
|
|
1644
|
+
let { basename: n } = i.useContext(T), a = i.useContext(k);
|
|
1645
1645
|
b(a, "useFormAction must be used inside a RouteContext");
|
|
1646
|
-
let [r] = a.matches.slice(-1),
|
|
1646
|
+
let [r] = a.matches.slice(-1), o = { ...W(e || ".", { relative: t }) }, c = N();
|
|
1647
1647
|
if (e == null) {
|
|
1648
|
-
|
|
1649
|
-
let
|
|
1650
|
-
if (l.some((
|
|
1651
|
-
|
|
1652
|
-
let
|
|
1653
|
-
|
|
1648
|
+
o.search = c.search;
|
|
1649
|
+
let u = new URLSearchParams(o.search), l = u.getAll("index");
|
|
1650
|
+
if (l.some((h) => h === "")) {
|
|
1651
|
+
u.delete("index"), l.filter((p) => p).forEach((p) => u.append("index", p));
|
|
1652
|
+
let h = u.toString();
|
|
1653
|
+
o.search = h ? `?${h}` : "";
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
|
-
return (!e || e === ".") && r.route.index && (
|
|
1656
|
+
return (!e || e === ".") && r.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (o.pathname = o.pathname === "/" ? n : A([n, o.pathname])), B(o);
|
|
1657
1657
|
}
|
|
1658
1658
|
function Kt(e, t = {}) {
|
|
1659
|
-
let n =
|
|
1659
|
+
let n = i.useContext(J);
|
|
1660
1660
|
b(
|
|
1661
1661
|
n != null,
|
|
1662
1662
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
@@ -1667,8 +1667,8 @@ function Kt(e, t = {}) {
|
|
|
1667
1667
|
), r = W(e, { relative: t.relative });
|
|
1668
1668
|
if (!n.isTransitioning)
|
|
1669
1669
|
return !1;
|
|
1670
|
-
let
|
|
1671
|
-
return H(r.pathname,
|
|
1670
|
+
let o = I(n.currentLocation.pathname, a) || n.currentLocation.pathname, c = I(n.nextLocation.pathname, a) || n.nextLocation.pathname;
|
|
1671
|
+
return H(r.pathname, c) != null || H(r.pathname, o) != null;
|
|
1672
1672
|
}
|
|
1673
1673
|
function hn({
|
|
1674
1674
|
context: e,
|
|
@@ -1686,39 +1686,39 @@ function hn({
|
|
|
1686
1686
|
static: !0,
|
|
1687
1687
|
staticContext: e,
|
|
1688
1688
|
basename: e.basename || "/"
|
|
1689
|
-
},
|
|
1689
|
+
}, o = /* @__PURE__ */ new Map(), c = "";
|
|
1690
1690
|
if (n !== !1) {
|
|
1691
1691
|
let l = {
|
|
1692
1692
|
loaderData: e.loaderData,
|
|
1693
1693
|
actionData: e.actionData,
|
|
1694
1694
|
errors: Gt(e.errors)
|
|
1695
1695
|
};
|
|
1696
|
-
|
|
1696
|
+
c = `window.__staticRouterHydrationData = JSON.parse(${rn(JSON.stringify(JSON.stringify(l)))});`;
|
|
1697
1697
|
}
|
|
1698
|
-
let { state:
|
|
1699
|
-
return /* @__PURE__ */
|
|
1700
|
-
|
|
1698
|
+
let { state: u } = r.router;
|
|
1699
|
+
return /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(O.Provider, { value: r }, /* @__PURE__ */ i.createElement(F.Provider, { value: u }, /* @__PURE__ */ i.createElement(te.Provider, { value: o }, /* @__PURE__ */ i.createElement(J.Provider, { value: { isTransitioning: !1 } }, /* @__PURE__ */ i.createElement(
|
|
1700
|
+
Se,
|
|
1701
1701
|
{
|
|
1702
1702
|
basename: r.basename,
|
|
1703
|
-
location:
|
|
1704
|
-
navigationType:
|
|
1703
|
+
location: u.location,
|
|
1704
|
+
navigationType: u.historyAction,
|
|
1705
1705
|
navigator: r.navigator,
|
|
1706
1706
|
static: r.static
|
|
1707
1707
|
},
|
|
1708
|
-
/* @__PURE__ */
|
|
1708
|
+
/* @__PURE__ */ i.createElement(
|
|
1709
1709
|
qt,
|
|
1710
1710
|
{
|
|
1711
1711
|
routes: t.routes,
|
|
1712
1712
|
future: t.future,
|
|
1713
|
-
state:
|
|
1713
|
+
state: u
|
|
1714
1714
|
}
|
|
1715
1715
|
)
|
|
1716
|
-
))))),
|
|
1716
|
+
))))), c ? /* @__PURE__ */ i.createElement(
|
|
1717
1717
|
"script",
|
|
1718
1718
|
{
|
|
1719
1719
|
suppressHydrationWarning: !0,
|
|
1720
1720
|
nonce: a,
|
|
1721
|
-
dangerouslySetInnerHTML: { __html:
|
|
1721
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
1722
1722
|
}
|
|
1723
1723
|
) : null);
|
|
1724
1724
|
}
|
|
@@ -1803,19 +1803,19 @@ export {
|
|
|
1803
1803
|
Te as L,
|
|
1804
1804
|
cn as N,
|
|
1805
1805
|
fn as O,
|
|
1806
|
-
|
|
1806
|
+
un as R,
|
|
1807
1807
|
hn as S,
|
|
1808
1808
|
re as a,
|
|
1809
1809
|
dn as b,
|
|
1810
1810
|
ln as c,
|
|
1811
|
-
|
|
1812
|
-
|
|
1811
|
+
on as d,
|
|
1812
|
+
Ze as e,
|
|
1813
1813
|
Bt as f,
|
|
1814
1814
|
ft as g,
|
|
1815
|
-
|
|
1815
|
+
sn as h,
|
|
1816
1816
|
we as i,
|
|
1817
1817
|
H as m,
|
|
1818
1818
|
an as r,
|
|
1819
1819
|
N as u
|
|
1820
1820
|
};
|
|
1821
|
-
//# sourceMappingURL=chunk-
|
|
1821
|
+
//# sourceMappingURL=chunk-IR6S3I6Y-D_3UmFIn.js.map
|