@genai-fi/base 4.3.7 → 4.3.9
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/{Button-BgSe1MyE.js → Button-HlUfDiMM.js} +3 -3
- package/dist/{CircularProgress-DgKnRiq7.js → CircularProgress-DZ8YZ0Dt.js} +345 -310
- package/dist/{Close-Cv_QwhIN.js → Close-TS8H1lQg.js} +1 -1
- package/dist/{DefaultPropsProvider-BurgXZzw.js → DefaultPropsProvider-B_x1hwuY.js} +2 -2
- package/dist/{DialogQR-DoM8ZHBM.js → DialogQR-ByOert0g.js} +4 -4
- package/dist/{FileSaver.min-DhePf63e.js → FileSaver.min-CDwyANUI.js} +57 -57
- package/dist/{FlashWifi-slUpI7sB.js → FlashWifi-CNanHNye.js} +1 -1
- package/dist/{Portal-MiwrHMB_.js → Portal-BdRLJx1y.js} +140 -133
- package/dist/assets/SidePanel.css +1 -1
- package/dist/assets/SvgLayer.css +1 -1
- package/dist/assets/Widget.css +1 -1
- package/dist/{browser-HW-wgeM2.js → browser-DWbgwj89.js} +421 -451
- package/dist/components/AlertPara/AlertPara.js +1 -1
- package/dist/components/Application/Application.js +724 -689
- package/dist/components/BusyButton/BusyButton.d.ts +4 -4
- package/dist/components/BusyButton/BusyButton.js +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/ConnectionStatus/ConnectionStatus.js +3 -3
- package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
- package/dist/components/Feedback/Feedback.js +4 -4
- package/dist/components/Feedback/Rating.js +1 -1
- package/dist/components/Help/Help.js +5 -5
- package/dist/components/LangSelect/LangSelect.js +1 -1
- package/dist/components/Motd/Motd.js +1 -1
- package/dist/components/PieScore/PieScore.js +9609 -6092
- package/dist/components/QRCode/DialogQR.js +4 -4
- package/dist/components/QRCode/QRCode.js +2 -2
- package/dist/components/SidePanel/SidePanel.d.ts +2 -1
- package/dist/components/SidePanel/SidePanel.js +91 -73
- package/dist/components/Webcam/Webcam.js +3 -3
- package/dist/components/WorkflowLayout/Widget.js +1460 -1438
- package/dist/{createSvgIcon-BM4dw4Lw.js → createSvgIcon-DjQWJ3wn.js} +2 -2
- package/dist/{createTheme-DV959X3d.js → createTheme-DnBeI7Zz.js} +752 -749
- package/dist/hooks/peer.js +1 -1
- package/dist/{index-SOhdqzHq.js → index-B_zFkp-8.js} +2 -2
- package/dist/react-CiLnfHJp.js +140 -0
- package/dist/services/peer2peer/Incoming.js +1 -1
- package/dist/services/peer2peer/Outgoing.js +1 -1
- package/dist/services/peer2peer/Peer2Peer.js +538 -541
- package/dist/services/peer2peer/PeerConnection.js +1 -1
- package/dist/state/webrtcState.js +1 -1
- package/dist/style/theme.js +1 -1
- package/dist/util/Observer.js +1 -1
- package/dist/util/zip.js +1 -1
- package/dist/vanilla-OLGM3aAq.js +439 -0
- package/package.json +3 -3
- package/dist/react-B9NW8BS7.js +0 -112
- package/dist/vanilla-BJxibF1U.js +0 -404
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ThemeProvider as
|
|
1
|
+
import { jsx as W } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider as _e } from "@emotion/react";
|
|
3
3
|
import { StyledEngineProvider as Ue } from "@mui/material";
|
|
4
4
|
import { theme as We } from "../../style/theme.js";
|
|
5
5
|
import * as o from "react";
|
|
6
6
|
import { Suspense as Be } from "react";
|
|
7
7
|
import * as He from "react-dom";
|
|
8
8
|
import je from "../Loading/Loading.js";
|
|
9
|
-
import { P as Ve } from "../../react-
|
|
9
|
+
import { P as Ve } from "../../react-CiLnfHJp.js";
|
|
10
10
|
/**
|
|
11
|
-
* react-router v7.13.
|
|
11
|
+
* react-router v7.13.2
|
|
12
12
|
*
|
|
13
13
|
* Copyright (c) Remix Software Inc.
|
|
14
14
|
*
|
|
@@ -21,7 +21,7 @@ function C(e, t) {
|
|
|
21
21
|
if (e === !1 || e === null || typeof e > "u")
|
|
22
22
|
throw new Error(t);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function I(e, t) {
|
|
25
25
|
if (!e) {
|
|
26
26
|
typeof console < "u" && console.warn(t);
|
|
27
27
|
try {
|
|
@@ -30,14 +30,14 @@ function T(e, t) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ne({
|
|
34
34
|
pathname: e = "/",
|
|
35
35
|
search: t = "",
|
|
36
36
|
hash: n = ""
|
|
37
37
|
}) {
|
|
38
38
|
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function q(e) {
|
|
41
41
|
let t = {};
|
|
42
42
|
if (e) {
|
|
43
43
|
let n = e.indexOf("#");
|
|
@@ -47,82 +47,82 @@ function G(e) {
|
|
|
47
47
|
}
|
|
48
48
|
return t;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function ye(e, t, n = "/") {
|
|
51
51
|
return ze(e, t, n, !1);
|
|
52
52
|
}
|
|
53
53
|
function ze(e, t, n, r) {
|
|
54
|
-
let
|
|
55
|
-
if (
|
|
54
|
+
let a = typeof t == "string" ? q(t) : t, i = F(a.pathname || "/", n);
|
|
55
|
+
if (i == null)
|
|
56
56
|
return null;
|
|
57
|
-
let l =
|
|
57
|
+
let l = Re(e);
|
|
58
58
|
Je(l);
|
|
59
|
-
let
|
|
60
|
-
for (let
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
l[
|
|
64
|
-
|
|
59
|
+
let u = null;
|
|
60
|
+
for (let c = 0; u == null && c < l.length; ++c) {
|
|
61
|
+
let d = rt(i);
|
|
62
|
+
u = tt(
|
|
63
|
+
l[c],
|
|
64
|
+
d,
|
|
65
65
|
r
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
|
-
return
|
|
68
|
+
return u;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
let
|
|
72
|
-
let
|
|
73
|
-
relativePath:
|
|
70
|
+
function Re(e, t = [], n = [], r = "", a = !1) {
|
|
71
|
+
let i = (l, u, c = a, d) => {
|
|
72
|
+
let f = {
|
|
73
|
+
relativePath: d === void 0 ? l.path || "" : d,
|
|
74
74
|
caseSensitive: l.caseSensitive === !0,
|
|
75
|
-
childrenIndex:
|
|
75
|
+
childrenIndex: u,
|
|
76
76
|
route: l
|
|
77
77
|
};
|
|
78
|
-
if (
|
|
79
|
-
if (!
|
|
78
|
+
if (f.relativePath.startsWith("/")) {
|
|
79
|
+
if (!f.relativePath.startsWith(r) && c)
|
|
80
80
|
return;
|
|
81
81
|
C(
|
|
82
|
-
|
|
83
|
-
`Absolute route path "${
|
|
84
|
-
),
|
|
82
|
+
f.relativePath.startsWith(r),
|
|
83
|
+
`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
84
|
+
), f.relativePath = f.relativePath.slice(r.length);
|
|
85
85
|
}
|
|
86
|
-
let
|
|
86
|
+
let s = N([r, f.relativePath]), h = n.concat(f);
|
|
87
87
|
l.children && l.children.length > 0 && (C(
|
|
88
88
|
// Our types know better, but runtime JS may not!
|
|
89
89
|
// @ts-expect-error
|
|
90
90
|
l.index !== !0,
|
|
91
|
-
`Index routes must not have child routes. Please remove all child routes from route path "${
|
|
92
|
-
),
|
|
91
|
+
`Index routes must not have child routes. Please remove all child routes from route path "${s}".`
|
|
92
|
+
), Re(
|
|
93
93
|
l.children,
|
|
94
94
|
t,
|
|
95
95
|
h,
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
s,
|
|
97
|
+
c
|
|
98
98
|
)), !(l.path == null && !l.index) && t.push({
|
|
99
|
-
path:
|
|
100
|
-
score: Ze(
|
|
99
|
+
path: s,
|
|
100
|
+
score: Ze(s, l.index),
|
|
101
101
|
routesMeta: h
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
return e.forEach((l,
|
|
105
|
-
var
|
|
106
|
-
if (l.path === "" || !((
|
|
107
|
-
|
|
104
|
+
return e.forEach((l, u) => {
|
|
105
|
+
var c;
|
|
106
|
+
if (l.path === "" || !((c = l.path) != null && c.includes("?")))
|
|
107
|
+
i(l, u);
|
|
108
108
|
else
|
|
109
|
-
for (let
|
|
110
|
-
|
|
109
|
+
for (let d of Ee(l.path))
|
|
110
|
+
i(l, u, !0, d);
|
|
111
111
|
}), t;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function Ee(e) {
|
|
114
114
|
let t = e.split("/");
|
|
115
115
|
if (t.length === 0) return [];
|
|
116
|
-
let [n, ...r] = t,
|
|
116
|
+
let [n, ...r] = t, a = n.endsWith("?"), i = n.replace(/\?$/, "");
|
|
117
117
|
if (r.length === 0)
|
|
118
|
-
return
|
|
119
|
-
let l =
|
|
120
|
-
return
|
|
118
|
+
return a ? [i, ""] : [i];
|
|
119
|
+
let l = Ee(r.join("/")), u = [];
|
|
120
|
+
return u.push(
|
|
121
121
|
...l.map(
|
|
122
|
-
(
|
|
122
|
+
(c) => c === "" ? i : [i, c].join("/")
|
|
123
123
|
)
|
|
124
|
-
),
|
|
125
|
-
(
|
|
124
|
+
), a && u.push(...l), u.map(
|
|
125
|
+
(c) => e.startsWith("/") && c === "" ? "/" : c
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
128
|
function Je(e) {
|
|
@@ -133,16 +133,16 @@ function Je(e) {
|
|
|
133
133
|
)
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
|
-
var Ye = /^:[\w-]+$/, Ke = 3, Ge = 2, qe = 1, Xe = 10, Qe = -2,
|
|
136
|
+
var Ye = /^:[\w-]+$/, Ke = 3, Ge = 2, qe = 1, Xe = 10, Qe = -2, ce = (e) => e === "*";
|
|
137
137
|
function Ze(e, t) {
|
|
138
138
|
let n = e.split("/"), r = n.length;
|
|
139
|
-
return n.some(
|
|
140
|
-
(
|
|
139
|
+
return n.some(ce) && (r += Qe), t && (r += Ge), n.filter((a) => !ce(a)).reduce(
|
|
140
|
+
(a, i) => a + (Ye.test(i) ? Ke : i === "" ? qe : Xe),
|
|
141
141
|
r
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
144
|
function et(e, t) {
|
|
145
|
-
return e.length === t.length && e.slice(0, -1).every((r,
|
|
145
|
+
return e.length === t.length && e.slice(0, -1).every((r, a) => r === t[a]) ? (
|
|
146
146
|
// If two routes are siblings, we should try to match the earlier sibling
|
|
147
147
|
// first. This allows people to have fine-grained control over the matching
|
|
148
148
|
// behavior by simply putting routes with identical paths in the order they
|
|
@@ -155,81 +155,87 @@ function et(e, t) {
|
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
157
|
function tt(e, t, n = !1) {
|
|
158
|
-
let { routesMeta: r } = e,
|
|
159
|
-
for (let
|
|
160
|
-
let
|
|
161
|
-
{ path:
|
|
162
|
-
|
|
163
|
-
), h =
|
|
164
|
-
if (!
|
|
158
|
+
let { routesMeta: r } = e, a = {}, i = "/", l = [];
|
|
159
|
+
for (let u = 0; u < r.length; ++u) {
|
|
160
|
+
let c = r[u], d = u === r.length - 1, f = i === "/" ? t : t.slice(i.length) || "/", s = G(
|
|
161
|
+
{ path: c.relativePath, caseSensitive: c.caseSensitive, end: d },
|
|
162
|
+
f
|
|
163
|
+
), h = c.route;
|
|
164
|
+
if (!s && d && n && !r[r.length - 1].route.index && (s = G(
|
|
165
165
|
{
|
|
166
|
-
path:
|
|
167
|
-
caseSensitive:
|
|
166
|
+
path: c.relativePath,
|
|
167
|
+
caseSensitive: c.caseSensitive,
|
|
168
168
|
end: !1
|
|
169
169
|
},
|
|
170
|
-
|
|
171
|
-
)), !
|
|
170
|
+
f
|
|
171
|
+
)), !s)
|
|
172
172
|
return null;
|
|
173
|
-
Object.assign(
|
|
173
|
+
Object.assign(a, s.params), l.push({
|
|
174
174
|
// TODO: Can this as be avoided?
|
|
175
|
-
params:
|
|
176
|
-
pathname:
|
|
175
|
+
params: a,
|
|
176
|
+
pathname: N([i, s.pathname]),
|
|
177
177
|
pathnameBase: lt(
|
|
178
|
-
|
|
178
|
+
N([i, s.pathnameBase])
|
|
179
179
|
),
|
|
180
180
|
route: h
|
|
181
|
-
}),
|
|
181
|
+
}), s.pathnameBase !== "/" && (i = N([i, s.pathnameBase]));
|
|
182
182
|
}
|
|
183
183
|
return l;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function G(e, t) {
|
|
186
186
|
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
187
187
|
let [n, r] = nt(
|
|
188
188
|
e.path,
|
|
189
189
|
e.caseSensitive,
|
|
190
190
|
e.end
|
|
191
|
-
),
|
|
192
|
-
if (!
|
|
193
|
-
let
|
|
191
|
+
), a = t.match(n);
|
|
192
|
+
if (!a) return null;
|
|
193
|
+
let i = a[0], l = i.replace(/(.)\/+$/, "$1"), u = a.slice(1);
|
|
194
194
|
return {
|
|
195
195
|
params: r.reduce(
|
|
196
|
-
(
|
|
197
|
-
if (
|
|
198
|
-
let
|
|
199
|
-
l =
|
|
196
|
+
(d, { paramName: f, isOptional: s }, h) => {
|
|
197
|
+
if (f === "*") {
|
|
198
|
+
let v = u[h] || "";
|
|
199
|
+
l = i.slice(0, i.length - v.length).replace(/(.)\/+$/, "$1");
|
|
200
200
|
}
|
|
201
|
-
const m =
|
|
202
|
-
return
|
|
201
|
+
const m = u[h];
|
|
202
|
+
return s && !m ? d[f] = void 0 : d[f] = (m || "").replace(/%2F/g, "/"), d;
|
|
203
203
|
},
|
|
204
204
|
{}
|
|
205
205
|
),
|
|
206
|
-
pathname:
|
|
206
|
+
pathname: i,
|
|
207
207
|
pathnameBase: l,
|
|
208
208
|
pattern: e
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
211
|
function nt(e, t = !1, n = !0) {
|
|
212
|
-
|
|
212
|
+
I(
|
|
213
213
|
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
214
214
|
`Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
|
|
215
215
|
);
|
|
216
|
-
let r = [],
|
|
216
|
+
let r = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
217
217
|
/\/:([\w-]+)(\?)?/g,
|
|
218
|
-
(l,
|
|
218
|
+
(l, u, c, d, f) => {
|
|
219
|
+
if (r.push({ paramName: u, isOptional: c != null }), c) {
|
|
220
|
+
let s = f.charAt(d + l.length);
|
|
221
|
+
return s && s !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
|
|
222
|
+
}
|
|
223
|
+
return "/([^\\/]+)";
|
|
224
|
+
}
|
|
219
225
|
).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
220
|
-
return e.endsWith("*") ? (r.push({ paramName: "*" }),
|
|
226
|
+
return e.endsWith("*") ? (r.push({ paramName: "*" }), a += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? a += "\\/*$" : e !== "" && e !== "/" && (a += "(?:(?=\\/|$))"), [new RegExp(a, t ? void 0 : "i"), r];
|
|
221
227
|
}
|
|
222
228
|
function rt(e) {
|
|
223
229
|
try {
|
|
224
230
|
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
225
231
|
} catch (t) {
|
|
226
|
-
return
|
|
232
|
+
return I(
|
|
227
233
|
!1,
|
|
228
234
|
`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
|
|
229
235
|
), e;
|
|
230
236
|
}
|
|
231
237
|
}
|
|
232
|
-
function
|
|
238
|
+
function F(e, t) {
|
|
233
239
|
if (t === "/") return e;
|
|
234
240
|
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
235
241
|
return null;
|
|
@@ -241,21 +247,21 @@ function it(e, t = "/") {
|
|
|
241
247
|
let {
|
|
242
248
|
pathname: n,
|
|
243
249
|
search: r = "",
|
|
244
|
-
hash:
|
|
245
|
-
} = typeof e == "string" ?
|
|
246
|
-
return n ? (n = n.replace(/\/\/+/g, "/"), n.startsWith("/") ?
|
|
247
|
-
pathname:
|
|
250
|
+
hash: a = ""
|
|
251
|
+
} = typeof e == "string" ? q(e) : e, i;
|
|
252
|
+
return n ? (n = n.replace(/\/\/+/g, "/"), n.startsWith("/") ? i = fe(n.substring(1), "/") : i = fe(n, t)) : i = t, {
|
|
253
|
+
pathname: i,
|
|
248
254
|
search: st(r),
|
|
249
|
-
hash: ut(
|
|
255
|
+
hash: ut(a)
|
|
250
256
|
};
|
|
251
257
|
}
|
|
252
|
-
function
|
|
258
|
+
function fe(e, t) {
|
|
253
259
|
let n = t.replace(/\/+$/, "").split("/");
|
|
254
|
-
return e.split("/").forEach((
|
|
255
|
-
|
|
260
|
+
return e.split("/").forEach((a) => {
|
|
261
|
+
a === ".." ? n.length > 1 && n.pop() : a !== "." && n.push(a);
|
|
256
262
|
}), n.length > 1 ? n.join("/") : "/";
|
|
257
263
|
}
|
|
258
|
-
function
|
|
264
|
+
function Z(e, t, n, r) {
|
|
259
265
|
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
|
|
260
266
|
r
|
|
261
267
|
)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
@@ -271,35 +277,35 @@ function we(e) {
|
|
|
271
277
|
(n, r) => r === t.length - 1 ? n.pathname : n.pathnameBase
|
|
272
278
|
);
|
|
273
279
|
}
|
|
274
|
-
function
|
|
275
|
-
let
|
|
276
|
-
typeof e == "string" ?
|
|
277
|
-
!
|
|
278
|
-
|
|
280
|
+
function re(e, t, n, r = !1) {
|
|
281
|
+
let a;
|
|
282
|
+
typeof e == "string" ? a = q(e) : (a = { ...e }, C(
|
|
283
|
+
!a.pathname || !a.pathname.includes("?"),
|
|
284
|
+
Z("?", "pathname", "search", a)
|
|
279
285
|
), C(
|
|
280
|
-
!
|
|
281
|
-
|
|
286
|
+
!a.pathname || !a.pathname.includes("#"),
|
|
287
|
+
Z("#", "pathname", "hash", a)
|
|
282
288
|
), C(
|
|
283
|
-
!
|
|
284
|
-
|
|
289
|
+
!a.search || !a.search.includes("#"),
|
|
290
|
+
Z("#", "search", "hash", a)
|
|
285
291
|
));
|
|
286
|
-
let
|
|
292
|
+
let i = e === "" || a.pathname === "", l = i ? "/" : a.pathname, u;
|
|
287
293
|
if (l == null)
|
|
288
|
-
|
|
294
|
+
u = n;
|
|
289
295
|
else {
|
|
290
|
-
let
|
|
296
|
+
let s = t.length - 1;
|
|
291
297
|
if (!r && l.startsWith("..")) {
|
|
292
298
|
let h = l.split("/");
|
|
293
299
|
for (; h[0] === ".."; )
|
|
294
|
-
h.shift(),
|
|
295
|
-
|
|
300
|
+
h.shift(), s -= 1;
|
|
301
|
+
a.pathname = h.join("/");
|
|
296
302
|
}
|
|
297
|
-
|
|
303
|
+
u = s >= 0 ? t[s] : "/";
|
|
298
304
|
}
|
|
299
|
-
let
|
|
300
|
-
return !
|
|
305
|
+
let c = it(a, u), d = l && l !== "/" && l.endsWith("/"), f = (i || l === ".") && n.endsWith("/");
|
|
306
|
+
return !c.pathname.endsWith("/") && (d || f) && (c.pathname += "/"), c;
|
|
301
307
|
}
|
|
302
|
-
var
|
|
308
|
+
var N = (e) => e.join("/").replace(/\/\/+/g, "/"), lt = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), st = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, ut = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ct = class {
|
|
303
309
|
constructor(e, t, n, r = !1) {
|
|
304
310
|
this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
|
|
305
311
|
}
|
|
@@ -319,74 +325,74 @@ function be(e, t) {
|
|
|
319
325
|
isExternal: !1,
|
|
320
326
|
to: n
|
|
321
327
|
};
|
|
322
|
-
let r = n,
|
|
328
|
+
let r = n, a = !1;
|
|
323
329
|
if (Ce)
|
|
324
330
|
try {
|
|
325
|
-
let
|
|
326
|
-
l.origin ===
|
|
331
|
+
let i = new URL(window.location.href), l = n.startsWith("//") ? new URL(i.protocol + n) : new URL(n), u = F(l.pathname, t);
|
|
332
|
+
l.origin === i.origin && u != null ? n = u + l.search + l.hash : a = !0;
|
|
327
333
|
} catch {
|
|
328
|
-
|
|
334
|
+
I(
|
|
329
335
|
!1,
|
|
330
336
|
`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
331
337
|
);
|
|
332
338
|
}
|
|
333
339
|
return {
|
|
334
340
|
absoluteURL: r,
|
|
335
|
-
isExternal:
|
|
341
|
+
isExternal: a,
|
|
336
342
|
to: n
|
|
337
343
|
};
|
|
338
344
|
}
|
|
339
345
|
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
340
|
-
var
|
|
346
|
+
var Se = [
|
|
341
347
|
"POST",
|
|
342
348
|
"PUT",
|
|
343
349
|
"PATCH",
|
|
344
350
|
"DELETE"
|
|
345
351
|
];
|
|
346
352
|
new Set(
|
|
347
|
-
|
|
353
|
+
Se
|
|
348
354
|
);
|
|
349
355
|
var dt = [
|
|
350
356
|
"GET",
|
|
351
|
-
...
|
|
357
|
+
...Se
|
|
352
358
|
];
|
|
353
359
|
new Set(dt);
|
|
354
|
-
var
|
|
355
|
-
|
|
356
|
-
var
|
|
357
|
-
|
|
358
|
-
var
|
|
360
|
+
var U = o.createContext(null);
|
|
361
|
+
U.displayName = "DataRouter";
|
|
362
|
+
var j = o.createContext(null);
|
|
363
|
+
j.displayName = "DataRouterState";
|
|
364
|
+
var Pe = o.createContext(!1);
|
|
359
365
|
function ht() {
|
|
360
|
-
return o.useContext(
|
|
366
|
+
return o.useContext(Pe);
|
|
361
367
|
}
|
|
362
|
-
var
|
|
368
|
+
var ae = o.createContext({
|
|
363
369
|
isTransitioning: !1
|
|
364
370
|
});
|
|
365
|
-
|
|
366
|
-
var
|
|
371
|
+
ae.displayName = "ViewTransition";
|
|
372
|
+
var Le = o.createContext(
|
|
367
373
|
/* @__PURE__ */ new Map()
|
|
368
374
|
);
|
|
369
|
-
|
|
375
|
+
Le.displayName = "Fetchers";
|
|
370
376
|
var mt = o.createContext(null);
|
|
371
377
|
mt.displayName = "Await";
|
|
372
|
-
var
|
|
378
|
+
var T = o.createContext(
|
|
373
379
|
null
|
|
374
380
|
);
|
|
375
|
-
|
|
376
|
-
var
|
|
381
|
+
T.displayName = "Navigation";
|
|
382
|
+
var X = o.createContext(
|
|
377
383
|
null
|
|
378
384
|
);
|
|
379
|
-
|
|
380
|
-
var
|
|
385
|
+
X.displayName = "Location";
|
|
386
|
+
var O = o.createContext({
|
|
381
387
|
outlet: null,
|
|
382
388
|
matches: [],
|
|
383
389
|
isDataRoute: !1
|
|
384
390
|
});
|
|
385
|
-
|
|
386
|
-
var
|
|
387
|
-
|
|
388
|
-
var $e = "REACT_ROUTER_ERROR", pt = "REDIRECT",
|
|
389
|
-
function
|
|
391
|
+
O.displayName = "Route";
|
|
392
|
+
var ie = o.createContext(null);
|
|
393
|
+
ie.displayName = "RouteError";
|
|
394
|
+
var $e = "REACT_ROUTER_ERROR", pt = "REDIRECT", gt = "ROUTE_ERROR_RESPONSE";
|
|
395
|
+
function vt(e) {
|
|
390
396
|
if (e.startsWith(`${$e}:${pt}:{`))
|
|
391
397
|
try {
|
|
392
398
|
let t = JSON.parse(e.slice(28));
|
|
@@ -397,7 +403,7 @@ function gt(e) {
|
|
|
397
403
|
}
|
|
398
404
|
function yt(e) {
|
|
399
405
|
if (e.startsWith(
|
|
400
|
-
`${$e}:${
|
|
406
|
+
`${$e}:${gt}:{`
|
|
401
407
|
))
|
|
402
408
|
try {
|
|
403
409
|
let t = JSON.parse(e.slice(40));
|
|
@@ -412,156 +418,154 @@ function yt(e) {
|
|
|
412
418
|
}
|
|
413
419
|
function Rt(e, { relative: t } = {}) {
|
|
414
420
|
C(
|
|
415
|
-
|
|
421
|
+
V(),
|
|
416
422
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
417
423
|
// router loaded. We can help them understand how to avoid that.
|
|
418
424
|
"useHref() may be used only in the context of a <Router> component."
|
|
419
425
|
);
|
|
420
|
-
let { basename: n, navigator: r } = o.useContext(
|
|
421
|
-
return n !== "/" && (
|
|
426
|
+
let { basename: n, navigator: r } = o.useContext(T), { hash: a, pathname: i, search: l } = z(e, { relative: t }), u = i;
|
|
427
|
+
return n !== "/" && (u = i === "/" ? n : N([n, i])), r.createHref({ pathname: u, search: l, hash: a });
|
|
422
428
|
}
|
|
423
|
-
function
|
|
424
|
-
return o.useContext(
|
|
429
|
+
function V() {
|
|
430
|
+
return o.useContext(X) != null;
|
|
425
431
|
}
|
|
426
|
-
function
|
|
432
|
+
function A() {
|
|
427
433
|
return C(
|
|
428
|
-
|
|
434
|
+
V(),
|
|
429
435
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
430
436
|
// router loaded. We can help them understand how to avoid that.
|
|
431
437
|
"useLocation() may be used only in the context of a <Router> component."
|
|
432
|
-
), o.useContext(
|
|
438
|
+
), o.useContext(X).location;
|
|
433
439
|
}
|
|
434
440
|
var ke = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
435
441
|
function Te(e) {
|
|
436
|
-
o.useContext(
|
|
437
|
-
}
|
|
438
|
-
function wt() {
|
|
439
|
-
let { isDataRoute: e } = o.useContext(N);
|
|
440
|
-
return e ? Mt() : Et();
|
|
442
|
+
o.useContext(T).static || o.useLayoutEffect(e);
|
|
441
443
|
}
|
|
442
444
|
function Et() {
|
|
445
|
+
let { isDataRoute: e } = o.useContext(O);
|
|
446
|
+
return e ? Nt() : wt();
|
|
447
|
+
}
|
|
448
|
+
function wt() {
|
|
443
449
|
C(
|
|
444
|
-
|
|
450
|
+
V(),
|
|
445
451
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
446
452
|
// router loaded. We can help them understand how to avoid that.
|
|
447
453
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
448
454
|
);
|
|
449
|
-
let e = o.useContext(
|
|
455
|
+
let e = o.useContext(U), { basename: t, navigator: n } = o.useContext(T), { matches: r } = o.useContext(O), { pathname: a } = A(), i = JSON.stringify(we(r)), l = o.useRef(!1);
|
|
450
456
|
return Te(() => {
|
|
451
457
|
l.current = !0;
|
|
452
458
|
}), o.useCallback(
|
|
453
|
-
(
|
|
454
|
-
if (
|
|
455
|
-
if (typeof
|
|
456
|
-
n.go(
|
|
459
|
+
(c, d = {}) => {
|
|
460
|
+
if (I(l.current, ke), !l.current) return;
|
|
461
|
+
if (typeof c == "number") {
|
|
462
|
+
n.go(c);
|
|
457
463
|
return;
|
|
458
464
|
}
|
|
459
|
-
let
|
|
460
|
-
|
|
461
|
-
JSON.parse(
|
|
462
|
-
|
|
463
|
-
|
|
465
|
+
let f = re(
|
|
466
|
+
c,
|
|
467
|
+
JSON.parse(i),
|
|
468
|
+
a,
|
|
469
|
+
d.relative === "path"
|
|
464
470
|
);
|
|
465
|
-
e == null && t !== "/" && (
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
471
|
+
e == null && t !== "/" && (f.pathname = f.pathname === "/" ? t : N([t, f.pathname])), (d.replace ? n.replace : n.push)(
|
|
472
|
+
f,
|
|
473
|
+
d.state,
|
|
474
|
+
d
|
|
469
475
|
);
|
|
470
476
|
},
|
|
471
477
|
[
|
|
472
478
|
t,
|
|
473
479
|
n,
|
|
474
|
-
a,
|
|
475
480
|
i,
|
|
481
|
+
a,
|
|
476
482
|
e
|
|
477
483
|
]
|
|
478
484
|
);
|
|
479
485
|
}
|
|
480
486
|
o.createContext(null);
|
|
481
|
-
function
|
|
482
|
-
let { matches: n } = o.useContext(
|
|
487
|
+
function z(e, { relative: t } = {}) {
|
|
488
|
+
let { matches: n } = o.useContext(O), { pathname: r } = A(), a = JSON.stringify(we(n));
|
|
483
489
|
return o.useMemo(
|
|
484
|
-
() =>
|
|
490
|
+
() => re(
|
|
485
491
|
e,
|
|
486
|
-
JSON.parse(
|
|
492
|
+
JSON.parse(a),
|
|
487
493
|
r,
|
|
488
494
|
t === "path"
|
|
489
495
|
),
|
|
490
|
-
[e,
|
|
496
|
+
[e, a, r, t]
|
|
491
497
|
);
|
|
492
498
|
}
|
|
493
|
-
function xt(e, t, n
|
|
499
|
+
function xt(e, t, n) {
|
|
494
500
|
C(
|
|
495
|
-
|
|
501
|
+
V(),
|
|
496
502
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
497
503
|
// router loaded. We can help them understand how to avoid that.
|
|
498
504
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
499
505
|
);
|
|
500
|
-
let { navigator:
|
|
506
|
+
let { navigator: r } = o.useContext(T), { matches: a } = o.useContext(O), i = a[a.length - 1], l = i ? i.params : {}, u = i ? i.pathname : "/", c = i ? i.pathnameBase : "/", d = i && i.route;
|
|
501
507
|
{
|
|
502
|
-
let p =
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
!
|
|
506
|
-
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${
|
|
508
|
+
let p = d && d.path || "";
|
|
509
|
+
Me(
|
|
510
|
+
u,
|
|
511
|
+
!d || p.endsWith("*") || p.endsWith("*?"),
|
|
512
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${p}">) 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.
|
|
507
513
|
|
|
508
514
|
Please change the parent <Route path="${p}"> to <Route path="${p === "/" ? "*" : `${p}/*`}">.`
|
|
509
515
|
);
|
|
510
516
|
}
|
|
511
|
-
let
|
|
512
|
-
|
|
513
|
-
let
|
|
514
|
-
if (
|
|
515
|
-
let p =
|
|
516
|
-
|
|
517
|
+
let f = A(), s;
|
|
518
|
+
s = f;
|
|
519
|
+
let h = s.pathname || "/", m = h;
|
|
520
|
+
if (c !== "/") {
|
|
521
|
+
let p = c.replace(/^\//, "").split("/");
|
|
522
|
+
m = "/" + h.replace(/^\//, "").split("/").slice(p.length).join("/");
|
|
517
523
|
}
|
|
518
|
-
let
|
|
519
|
-
return
|
|
520
|
-
|
|
521
|
-
`No routes matched location "${
|
|
522
|
-
),
|
|
523
|
-
|
|
524
|
-
`Matched leaf route at location "${
|
|
525
|
-
),
|
|
526
|
-
|
|
524
|
+
let v = ye(e, { pathname: m });
|
|
525
|
+
return I(
|
|
526
|
+
d || v != null,
|
|
527
|
+
`No routes matched location "${s.pathname}${s.search}${s.hash}" `
|
|
528
|
+
), I(
|
|
529
|
+
v == null || v[v.length - 1].route.element !== void 0 || v[v.length - 1].route.Component !== void 0 || v[v.length - 1].route.lazy !== void 0,
|
|
530
|
+
`Matched leaf route at location "${s.pathname}${s.search}${s.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.`
|
|
531
|
+
), Lt(
|
|
532
|
+
v && v.map(
|
|
527
533
|
(p) => Object.assign({}, p, {
|
|
528
|
-
params: Object.assign({},
|
|
529
|
-
pathname:
|
|
530
|
-
|
|
534
|
+
params: Object.assign({}, l, p.params),
|
|
535
|
+
pathname: N([
|
|
536
|
+
c,
|
|
531
537
|
// Re-encode pathnames that were decoded inside matchRoutes.
|
|
532
|
-
// Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
|
|
538
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
533
539
|
// `new URL()` internally and we need to prevent it from treating
|
|
534
540
|
// them as separators
|
|
535
|
-
|
|
536
|
-
p.pathname.replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
541
|
+
r.encodeLocation ? r.encodeLocation(
|
|
542
|
+
p.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
537
543
|
).pathname : p.pathname
|
|
538
544
|
]),
|
|
539
|
-
pathnameBase: p.pathnameBase === "/" ?
|
|
540
|
-
|
|
545
|
+
pathnameBase: p.pathnameBase === "/" ? c : N([
|
|
546
|
+
c,
|
|
541
547
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
542
|
-
// Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
|
|
548
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
543
549
|
// `new URL()` internally and we need to prevent it from treating
|
|
544
550
|
// them as separators
|
|
545
|
-
|
|
546
|
-
p.pathnameBase.replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
551
|
+
r.encodeLocation ? r.encodeLocation(
|
|
552
|
+
p.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
547
553
|
).pathname : p.pathnameBase
|
|
548
554
|
])
|
|
549
555
|
})
|
|
550
556
|
),
|
|
551
|
-
|
|
552
|
-
n
|
|
553
|
-
r,
|
|
554
|
-
i
|
|
557
|
+
a,
|
|
558
|
+
n
|
|
555
559
|
);
|
|
556
560
|
}
|
|
557
561
|
function Ct() {
|
|
558
|
-
let e =
|
|
562
|
+
let e = Mt(), t = ft(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, r = "rgba(200,200,200, 0.5)", a = { padding: "0.5rem", backgroundColor: r }, i = { padding: "2px 4px", backgroundColor: r }, l = null;
|
|
559
563
|
return console.error(
|
|
560
564
|
"Error handled by React Router default ErrorBoundary:",
|
|
561
565
|
e
|
|
562
|
-
), l = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ o.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ o.createElement("code", { style:
|
|
566
|
+
), l = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ o.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ o.createElement("code", { style: i }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ o.createElement("code", { style: i }, "errorElement"), " prop on your route.")), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ o.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ o.createElement("pre", { style: a }, n) : null, l);
|
|
563
567
|
}
|
|
564
|
-
var bt = /* @__PURE__ */ o.createElement(Ct, null),
|
|
568
|
+
var bt = /* @__PURE__ */ o.createElement(Ct, null), De = class extends o.Component {
|
|
565
569
|
constructor(e) {
|
|
566
570
|
super(e), this.state = {
|
|
567
571
|
location: e.location,
|
|
@@ -595,211 +599,214 @@ var bt = /* @__PURE__ */ o.createElement(Ct, null), Oe = class extends o.Compone
|
|
|
595
599
|
const n = yt(e.digest);
|
|
596
600
|
n && (e = n);
|
|
597
601
|
}
|
|
598
|
-
let t = e !== void 0 ? /* @__PURE__ */ o.createElement(
|
|
599
|
-
|
|
602
|
+
let t = e !== void 0 ? /* @__PURE__ */ o.createElement(O.Provider, { value: this.props.routeContext }, /* @__PURE__ */ o.createElement(
|
|
603
|
+
ie.Provider,
|
|
600
604
|
{
|
|
601
605
|
value: e,
|
|
602
606
|
children: this.props.component
|
|
603
607
|
}
|
|
604
608
|
)) : this.props.children;
|
|
605
|
-
return this.context ? /* @__PURE__ */ o.createElement(
|
|
609
|
+
return this.context ? /* @__PURE__ */ o.createElement(St, { error: e }, t) : t;
|
|
606
610
|
}
|
|
607
611
|
};
|
|
608
|
-
|
|
609
|
-
var
|
|
610
|
-
function
|
|
612
|
+
De.contextType = Pe;
|
|
613
|
+
var ee = /* @__PURE__ */ new WeakMap();
|
|
614
|
+
function St({
|
|
611
615
|
children: e,
|
|
612
616
|
error: t
|
|
613
617
|
}) {
|
|
614
|
-
let { basename: n } = o.useContext(
|
|
618
|
+
let { basename: n } = o.useContext(T);
|
|
615
619
|
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
616
|
-
let r =
|
|
620
|
+
let r = vt(t.digest);
|
|
617
621
|
if (r) {
|
|
618
|
-
let
|
|
619
|
-
if (
|
|
620
|
-
let
|
|
621
|
-
if (Ce && !
|
|
622
|
-
if (
|
|
623
|
-
window.location.href =
|
|
622
|
+
let a = ee.get(t);
|
|
623
|
+
if (a) throw a;
|
|
624
|
+
let i = be(r.location, n);
|
|
625
|
+
if (Ce && !ee.get(t))
|
|
626
|
+
if (i.isExternal || r.reloadDocument)
|
|
627
|
+
window.location.href = i.absoluteURL || i.to;
|
|
624
628
|
else {
|
|
625
629
|
const l = Promise.resolve().then(
|
|
626
|
-
() => window.__reactRouterDataRouter.navigate(
|
|
630
|
+
() => window.__reactRouterDataRouter.navigate(i.to, {
|
|
627
631
|
replace: r.replace
|
|
628
632
|
})
|
|
629
633
|
);
|
|
630
|
-
throw
|
|
634
|
+
throw ee.set(t, l), l;
|
|
631
635
|
}
|
|
632
636
|
return /* @__PURE__ */ o.createElement(
|
|
633
637
|
"meta",
|
|
634
638
|
{
|
|
635
639
|
httpEquiv: "refresh",
|
|
636
|
-
content: `0;url=${
|
|
640
|
+
content: `0;url=${i.absoluteURL || i.to}`
|
|
637
641
|
}
|
|
638
642
|
);
|
|
639
643
|
}
|
|
640
644
|
}
|
|
641
645
|
return e;
|
|
642
646
|
}
|
|
643
|
-
function
|
|
644
|
-
let r = o.useContext(
|
|
645
|
-
return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ o.createElement(
|
|
647
|
+
function Pt({ routeContext: e, match: t, children: n }) {
|
|
648
|
+
let r = o.useContext(U);
|
|
649
|
+
return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ o.createElement(O.Provider, { value: e }, n);
|
|
646
650
|
}
|
|
647
|
-
function
|
|
651
|
+
function Lt(e, t = [], n) {
|
|
652
|
+
let r = n == null ? void 0 : n.state;
|
|
648
653
|
if (e == null) {
|
|
649
|
-
if (!
|
|
654
|
+
if (!r)
|
|
650
655
|
return null;
|
|
651
|
-
if (
|
|
652
|
-
e =
|
|
653
|
-
else if (t.length === 0 && !
|
|
654
|
-
e =
|
|
656
|
+
if (r.errors)
|
|
657
|
+
e = r.matches;
|
|
658
|
+
else if (t.length === 0 && !r.initialized && r.matches.length > 0)
|
|
659
|
+
e = r.matches;
|
|
655
660
|
else
|
|
656
661
|
return null;
|
|
657
662
|
}
|
|
658
|
-
let a = e,
|
|
659
|
-
if (
|
|
660
|
-
let
|
|
661
|
-
(
|
|
663
|
+
let a = e, i = r == null ? void 0 : r.errors;
|
|
664
|
+
if (i != null) {
|
|
665
|
+
let f = a.findIndex(
|
|
666
|
+
(s) => s.route.id && (i == null ? void 0 : i[s.route.id]) !== void 0
|
|
662
667
|
);
|
|
663
668
|
C(
|
|
664
|
-
|
|
669
|
+
f >= 0,
|
|
665
670
|
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
666
|
-
|
|
671
|
+
i
|
|
667
672
|
).join(",")}`
|
|
668
673
|
), a = a.slice(
|
|
669
674
|
0,
|
|
670
|
-
Math.min(a.length,
|
|
675
|
+
Math.min(a.length, f + 1)
|
|
671
676
|
);
|
|
672
677
|
}
|
|
673
|
-
let
|
|
674
|
-
if (n)
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
678
|
+
let l = !1, u = -1;
|
|
679
|
+
if (n && r) {
|
|
680
|
+
l = r.renderFallback;
|
|
681
|
+
for (let f = 0; f < a.length; f++) {
|
|
682
|
+
let s = a[f];
|
|
683
|
+
if ((s.route.HydrateFallback || s.route.hydrateFallbackElement) && (u = f), s.route.id) {
|
|
684
|
+
let { loaderData: h, errors: m } = r, v = s.route.loader && !h.hasOwnProperty(s.route.id) && (!m || m[s.route.id] === void 0);
|
|
685
|
+
if (s.route.lazy || v) {
|
|
686
|
+
n.isStatic && (l = !0), u >= 0 ? a = a.slice(0, u + 1) : a = [a[0]];
|
|
681
687
|
break;
|
|
682
688
|
}
|
|
683
689
|
}
|
|
684
690
|
}
|
|
685
|
-
|
|
691
|
+
}
|
|
692
|
+
let c = n == null ? void 0 : n.onError, d = r && c ? (f, s) => {
|
|
686
693
|
var h, m;
|
|
687
|
-
|
|
688
|
-
location:
|
|
689
|
-
params: ((m = (h =
|
|
690
|
-
unstable_pattern: xe(
|
|
691
|
-
errorInfo:
|
|
694
|
+
c(f, {
|
|
695
|
+
location: r.location,
|
|
696
|
+
params: ((m = (h = r.matches) == null ? void 0 : h[0]) == null ? void 0 : m.params) ?? {},
|
|
697
|
+
unstable_pattern: xe(r.matches),
|
|
698
|
+
errorInfo: s
|
|
692
699
|
});
|
|
693
700
|
} : void 0;
|
|
694
701
|
return a.reduceRight(
|
|
695
|
-
(
|
|
696
|
-
let m,
|
|
697
|
-
|
|
702
|
+
(f, s, h) => {
|
|
703
|
+
let m, v = !1, g = null, p = null;
|
|
704
|
+
r && (m = i && s.route.id ? i[s.route.id] : void 0, g = s.route.errorElement || bt, l && (u < 0 && h === 0 ? (Me(
|
|
698
705
|
"route-fallback",
|
|
699
706
|
!1,
|
|
700
707
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
701
|
-
),
|
|
702
|
-
let
|
|
703
|
-
let
|
|
704
|
-
return m ?
|
|
705
|
-
|
|
708
|
+
), v = !0, p = null) : u === h && (v = !0, p = s.route.hydrateFallbackElement || null)));
|
|
709
|
+
let y = t.concat(a.slice(0, h + 1)), w = () => {
|
|
710
|
+
let R;
|
|
711
|
+
return m ? R = g : v ? R = p : s.route.Component ? R = /* @__PURE__ */ o.createElement(s.route.Component, null) : s.route.element ? R = s.route.element : R = f, /* @__PURE__ */ o.createElement(
|
|
712
|
+
Pt,
|
|
706
713
|
{
|
|
707
|
-
match:
|
|
714
|
+
match: s,
|
|
708
715
|
routeContext: {
|
|
709
|
-
outlet:
|
|
710
|
-
matches:
|
|
711
|
-
isDataRoute:
|
|
716
|
+
outlet: f,
|
|
717
|
+
matches: y,
|
|
718
|
+
isDataRoute: r != null
|
|
712
719
|
},
|
|
713
|
-
children:
|
|
720
|
+
children: R
|
|
714
721
|
}
|
|
715
722
|
);
|
|
716
723
|
};
|
|
717
|
-
return
|
|
718
|
-
|
|
724
|
+
return r && (s.route.ErrorBoundary || s.route.errorElement || h === 0) ? /* @__PURE__ */ o.createElement(
|
|
725
|
+
De,
|
|
719
726
|
{
|
|
720
|
-
location:
|
|
721
|
-
revalidation:
|
|
722
|
-
component:
|
|
727
|
+
location: r.location,
|
|
728
|
+
revalidation: r.revalidation,
|
|
729
|
+
component: g,
|
|
723
730
|
error: m,
|
|
724
|
-
children:
|
|
725
|
-
routeContext: { outlet: null, matches:
|
|
726
|
-
onError:
|
|
731
|
+
children: w(),
|
|
732
|
+
routeContext: { outlet: null, matches: y, isDataRoute: !0 },
|
|
733
|
+
onError: d
|
|
727
734
|
}
|
|
728
|
-
) :
|
|
735
|
+
) : w();
|
|
729
736
|
},
|
|
730
737
|
null
|
|
731
738
|
);
|
|
732
739
|
}
|
|
733
|
-
function
|
|
740
|
+
function oe(e) {
|
|
734
741
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
735
742
|
}
|
|
736
743
|
function $t(e) {
|
|
737
|
-
let t = o.useContext(
|
|
738
|
-
return C(t,
|
|
744
|
+
let t = o.useContext(U);
|
|
745
|
+
return C(t, oe(e)), t;
|
|
739
746
|
}
|
|
740
747
|
function kt(e) {
|
|
741
|
-
let t = o.useContext(
|
|
742
|
-
return C(t,
|
|
748
|
+
let t = o.useContext(j);
|
|
749
|
+
return C(t, oe(e)), t;
|
|
743
750
|
}
|
|
744
751
|
function Tt(e) {
|
|
745
|
-
let t = o.useContext(
|
|
746
|
-
return C(t,
|
|
752
|
+
let t = o.useContext(O);
|
|
753
|
+
return C(t, oe(e)), t;
|
|
747
754
|
}
|
|
748
|
-
function
|
|
755
|
+
function le(e) {
|
|
749
756
|
let t = Tt(e), n = t.matches[t.matches.length - 1];
|
|
750
757
|
return C(
|
|
751
758
|
n.route.id,
|
|
752
759
|
`${e} can only be used on routes that contain a unique "id"`
|
|
753
760
|
), n.route.id;
|
|
754
761
|
}
|
|
755
|
-
function
|
|
756
|
-
return
|
|
762
|
+
function Dt() {
|
|
763
|
+
return le(
|
|
757
764
|
"useRouteId"
|
|
758
765
|
/* UseRouteId */
|
|
759
766
|
);
|
|
760
767
|
}
|
|
761
|
-
function
|
|
768
|
+
function Mt() {
|
|
762
769
|
var r;
|
|
763
|
-
let e = o.useContext(
|
|
770
|
+
let e = o.useContext(ie), t = kt(
|
|
764
771
|
"useRouteError"
|
|
765
772
|
/* UseRouteError */
|
|
766
|
-
), n =
|
|
773
|
+
), n = le(
|
|
767
774
|
"useRouteError"
|
|
768
775
|
/* UseRouteError */
|
|
769
776
|
);
|
|
770
777
|
return e !== void 0 ? e : (r = t.errors) == null ? void 0 : r[n];
|
|
771
778
|
}
|
|
772
|
-
function
|
|
779
|
+
function Nt() {
|
|
773
780
|
let { router: e } = $t(
|
|
774
781
|
"useNavigate"
|
|
775
782
|
/* UseNavigateStable */
|
|
776
|
-
), t =
|
|
783
|
+
), t = le(
|
|
777
784
|
"useNavigate"
|
|
778
785
|
/* UseNavigateStable */
|
|
779
786
|
), n = o.useRef(!1);
|
|
780
787
|
return Te(() => {
|
|
781
788
|
n.current = !0;
|
|
782
789
|
}), o.useCallback(
|
|
783
|
-
async (
|
|
784
|
-
|
|
790
|
+
async (a, i = {}) => {
|
|
791
|
+
I(n.current, ke), n.current && (typeof a == "number" ? await e.navigate(a) : await e.navigate(a, { fromRouteId: t, ...i }));
|
|
785
792
|
},
|
|
786
793
|
[e, t]
|
|
787
794
|
);
|
|
788
795
|
}
|
|
789
|
-
var fe = {};
|
|
790
|
-
function De(e, t, n) {
|
|
791
|
-
!t && !fe[e] && (fe[e] = !0, T(!1, n));
|
|
792
|
-
}
|
|
793
796
|
var de = {};
|
|
794
|
-
function
|
|
795
|
-
!
|
|
797
|
+
function Me(e, t, n) {
|
|
798
|
+
!t && !de[e] && (de[e] = !0, I(!1, n));
|
|
796
799
|
}
|
|
797
|
-
var
|
|
800
|
+
var he = {};
|
|
801
|
+
function me(e, t) {
|
|
802
|
+
!e && !he[t] && (he[t] = !0, console.warn(t));
|
|
803
|
+
}
|
|
804
|
+
var It = "useOptimistic", pe = o[It], Ft = () => {
|
|
798
805
|
};
|
|
799
|
-
function
|
|
800
|
-
return
|
|
806
|
+
function Ot(e) {
|
|
807
|
+
return pe ? pe(e) : [e, Ft];
|
|
801
808
|
}
|
|
802
|
-
var
|
|
809
|
+
var At = class {
|
|
803
810
|
constructor() {
|
|
804
811
|
this.status = "pending", this.promise = new Promise((e, t) => {
|
|
805
812
|
this.resolve = (n) => {
|
|
@@ -810,141 +817,141 @@ var _t = class {
|
|
|
810
817
|
});
|
|
811
818
|
}
|
|
812
819
|
};
|
|
813
|
-
function
|
|
820
|
+
function _t({
|
|
814
821
|
router: e,
|
|
815
822
|
flushSync: t,
|
|
816
823
|
onError: n,
|
|
817
824
|
unstable_useTransitions: r
|
|
818
825
|
}) {
|
|
819
826
|
r = ht() || r;
|
|
820
|
-
let [
|
|
827
|
+
let [i, l] = o.useState(e.state), [u, c] = Ot(i), [d, f] = o.useState(), [s, h] = o.useState({
|
|
821
828
|
isTransitioning: !1
|
|
822
|
-
}), [m,
|
|
823
|
-
(E, { deletedFetchers:
|
|
824
|
-
|
|
825
|
-
(
|
|
826
|
-
var
|
|
827
|
-
return n(
|
|
829
|
+
}), [m, v] = o.useState(), [g, p] = o.useState(), [y, w] = o.useState(), R = o.useRef(/* @__PURE__ */ new Map()), L = o.useCallback(
|
|
830
|
+
(E, { deletedFetchers: $, newErrors: b, flushSync: _, viewTransitionOpts: M }) => {
|
|
831
|
+
b && n && Object.values(b).forEach(
|
|
832
|
+
(P) => {
|
|
833
|
+
var k;
|
|
834
|
+
return n(P, {
|
|
828
835
|
location: E.location,
|
|
829
|
-
params: ((
|
|
836
|
+
params: ((k = E.matches[0]) == null ? void 0 : k.params) ?? {},
|
|
830
837
|
unstable_pattern: xe(E.matches)
|
|
831
838
|
});
|
|
832
839
|
}
|
|
833
|
-
), E.fetchers.forEach((
|
|
834
|
-
|
|
835
|
-
}),
|
|
836
|
-
|
|
840
|
+
), E.fetchers.forEach((P, k) => {
|
|
841
|
+
P.data !== void 0 && R.current.set(k, P.data);
|
|
842
|
+
}), $.forEach((P) => R.current.delete(P)), me(
|
|
843
|
+
_ === !1 || t != null,
|
|
837
844
|
'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.'
|
|
838
845
|
);
|
|
839
|
-
let
|
|
840
|
-
if (
|
|
841
|
-
|
|
846
|
+
let B = e.window != null && e.window.document != null && typeof e.window.document.startViewTransition == "function";
|
|
847
|
+
if (me(
|
|
848
|
+
M == null || B,
|
|
842
849
|
"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."
|
|
843
|
-
), !
|
|
844
|
-
t &&
|
|
845
|
-
r === !0 &&
|
|
850
|
+
), !M || !B) {
|
|
851
|
+
t && _ ? t(() => l(E)) : r === !1 ? l(E) : o.startTransition(() => {
|
|
852
|
+
r === !0 && c((P) => ge(P, E)), l(E);
|
|
846
853
|
});
|
|
847
854
|
return;
|
|
848
855
|
}
|
|
849
|
-
if (t &&
|
|
856
|
+
if (t && _) {
|
|
850
857
|
t(() => {
|
|
851
|
-
|
|
858
|
+
g && (m == null || m.resolve(), g.skipTransition()), h({
|
|
852
859
|
isTransitioning: !0,
|
|
853
860
|
flushSync: !0,
|
|
854
|
-
currentLocation:
|
|
855
|
-
nextLocation:
|
|
861
|
+
currentLocation: M.currentLocation,
|
|
862
|
+
nextLocation: M.nextLocation
|
|
856
863
|
});
|
|
857
864
|
});
|
|
858
|
-
let
|
|
865
|
+
let P = e.window.document.startViewTransition(() => {
|
|
859
866
|
t(() => l(E));
|
|
860
867
|
});
|
|
861
|
-
|
|
868
|
+
P.finished.finally(() => {
|
|
862
869
|
t(() => {
|
|
863
|
-
|
|
870
|
+
v(void 0), p(void 0), f(void 0), h({ isTransitioning: !1 });
|
|
864
871
|
});
|
|
865
|
-
}), t(() =>
|
|
872
|
+
}), t(() => p(P));
|
|
866
873
|
return;
|
|
867
874
|
}
|
|
868
|
-
|
|
875
|
+
g ? (m == null || m.resolve(), g.skipTransition(), w({
|
|
869
876
|
state: E,
|
|
870
|
-
currentLocation:
|
|
871
|
-
nextLocation:
|
|
872
|
-
})) : (
|
|
877
|
+
currentLocation: M.currentLocation,
|
|
878
|
+
nextLocation: M.nextLocation
|
|
879
|
+
})) : (f(E), h({
|
|
873
880
|
isTransitioning: !0,
|
|
874
881
|
flushSync: !1,
|
|
875
|
-
currentLocation:
|
|
876
|
-
nextLocation:
|
|
882
|
+
currentLocation: M.currentLocation,
|
|
883
|
+
nextLocation: M.nextLocation
|
|
877
884
|
}));
|
|
878
885
|
},
|
|
879
886
|
[
|
|
880
887
|
e.window,
|
|
881
888
|
t,
|
|
882
|
-
|
|
889
|
+
g,
|
|
883
890
|
m,
|
|
884
891
|
r,
|
|
885
|
-
|
|
892
|
+
c,
|
|
886
893
|
n
|
|
887
894
|
]
|
|
888
895
|
);
|
|
889
|
-
o.useLayoutEffect(() => e.subscribe(
|
|
890
|
-
|
|
891
|
-
}, [
|
|
892
|
-
if (m &&
|
|
893
|
-
let E =
|
|
896
|
+
o.useLayoutEffect(() => e.subscribe(L), [e, L]), o.useEffect(() => {
|
|
897
|
+
s.isTransitioning && !s.flushSync && v(new At());
|
|
898
|
+
}, [s]), o.useEffect(() => {
|
|
899
|
+
if (m && d && e.window) {
|
|
900
|
+
let E = d, $ = m.promise, b = e.window.document.startViewTransition(async () => {
|
|
894
901
|
r === !1 ? l(E) : o.startTransition(() => {
|
|
895
|
-
r === !0 &&
|
|
896
|
-
}), await
|
|
902
|
+
r === !0 && c((_) => ge(_, E)), l(E);
|
|
903
|
+
}), await $;
|
|
897
904
|
});
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
}),
|
|
905
|
+
b.finished.finally(() => {
|
|
906
|
+
v(void 0), p(void 0), f(void 0), h({ isTransitioning: !1 });
|
|
907
|
+
}), p(b);
|
|
901
908
|
}
|
|
902
909
|
}, [
|
|
903
|
-
|
|
910
|
+
d,
|
|
904
911
|
m,
|
|
905
912
|
e.window,
|
|
906
913
|
r,
|
|
907
|
-
|
|
914
|
+
c
|
|
908
915
|
]), o.useEffect(() => {
|
|
909
|
-
m &&
|
|
910
|
-
}, [m,
|
|
911
|
-
!
|
|
916
|
+
m && d && u.location.key === d.location.key && m.resolve();
|
|
917
|
+
}, [m, g, u.location, d]), o.useEffect(() => {
|
|
918
|
+
!s.isTransitioning && y && (f(y.state), h({
|
|
912
919
|
isTransitioning: !0,
|
|
913
920
|
flushSync: !1,
|
|
914
|
-
currentLocation:
|
|
915
|
-
nextLocation:
|
|
916
|
-
}),
|
|
917
|
-
}, [
|
|
918
|
-
let
|
|
921
|
+
currentLocation: y.currentLocation,
|
|
922
|
+
nextLocation: y.nextLocation
|
|
923
|
+
}), w(void 0));
|
|
924
|
+
}, [s.isTransitioning, y]);
|
|
925
|
+
let x = o.useMemo(() => ({
|
|
919
926
|
createHref: e.createHref,
|
|
920
927
|
encodeLocation: e.encodeLocation,
|
|
921
928
|
go: (E) => e.navigate(E),
|
|
922
|
-
push: (E,
|
|
923
|
-
state:
|
|
924
|
-
preventScrollReset:
|
|
929
|
+
push: (E, $, b) => e.navigate(E, {
|
|
930
|
+
state: $,
|
|
931
|
+
preventScrollReset: b == null ? void 0 : b.preventScrollReset
|
|
925
932
|
}),
|
|
926
|
-
replace: (E,
|
|
933
|
+
replace: (E, $, b) => e.navigate(E, {
|
|
927
934
|
replace: !0,
|
|
928
|
-
state:
|
|
929
|
-
preventScrollReset:
|
|
935
|
+
state: $,
|
|
936
|
+
preventScrollReset: b == null ? void 0 : b.preventScrollReset
|
|
930
937
|
})
|
|
931
|
-
}), [e]),
|
|
938
|
+
}), [e]), S = e.basename || "/", D = o.useMemo(
|
|
932
939
|
() => ({
|
|
933
940
|
router: e,
|
|
934
|
-
navigator:
|
|
941
|
+
navigator: x,
|
|
935
942
|
static: !1,
|
|
936
|
-
basename:
|
|
943
|
+
basename: S,
|
|
937
944
|
onError: n
|
|
938
945
|
}),
|
|
939
|
-
[e,
|
|
946
|
+
[e, x, S, n]
|
|
940
947
|
);
|
|
941
|
-
return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(
|
|
948
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(U.Provider, { value: D }, /* @__PURE__ */ o.createElement(j.Provider, { value: u }, /* @__PURE__ */ o.createElement(Le.Provider, { value: R.current }, /* @__PURE__ */ o.createElement(ae.Provider, { value: s }, /* @__PURE__ */ o.createElement(
|
|
942
949
|
Bt,
|
|
943
950
|
{
|
|
944
|
-
basename:
|
|
945
|
-
location:
|
|
946
|
-
navigationType:
|
|
947
|
-
navigator:
|
|
951
|
+
basename: S,
|
|
952
|
+
location: u.location,
|
|
953
|
+
navigationType: u.historyAction,
|
|
954
|
+
navigator: x,
|
|
948
955
|
unstable_useTransitions: r
|
|
949
956
|
},
|
|
950
957
|
/* @__PURE__ */ o.createElement(
|
|
@@ -952,13 +959,14 @@ function At({
|
|
|
952
959
|
{
|
|
953
960
|
routes: e.routes,
|
|
954
961
|
future: e.future,
|
|
955
|
-
state:
|
|
962
|
+
state: u,
|
|
963
|
+
isStatic: !1,
|
|
956
964
|
onError: n
|
|
957
965
|
}
|
|
958
966
|
)
|
|
959
967
|
))))), null);
|
|
960
968
|
}
|
|
961
|
-
function
|
|
969
|
+
function ge(e, t) {
|
|
962
970
|
return {
|
|
963
971
|
// Don't surface "current location specific" stuff mid-navigation
|
|
964
972
|
// (historyAction, location, matches, loaderData, errors, initialized,
|
|
@@ -977,70 +985,82 @@ function Wt({
|
|
|
977
985
|
routes: e,
|
|
978
986
|
future: t,
|
|
979
987
|
state: n,
|
|
980
|
-
|
|
988
|
+
isStatic: r,
|
|
989
|
+
onError: a
|
|
981
990
|
}) {
|
|
982
|
-
return xt(e, void 0, n, r,
|
|
991
|
+
return xt(e, void 0, { state: n, isStatic: r, onError: a });
|
|
983
992
|
}
|
|
984
993
|
function Bt({
|
|
985
994
|
basename: e = "/",
|
|
986
995
|
children: t = null,
|
|
987
996
|
location: n,
|
|
988
997
|
navigationType: r = "POP",
|
|
989
|
-
navigator:
|
|
990
|
-
static:
|
|
998
|
+
navigator: a,
|
|
999
|
+
static: i = !1,
|
|
991
1000
|
unstable_useTransitions: l
|
|
992
1001
|
}) {
|
|
993
1002
|
C(
|
|
994
|
-
!
|
|
1003
|
+
!V(),
|
|
995
1004
|
"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
|
|
996
1005
|
);
|
|
997
|
-
let
|
|
1006
|
+
let u = e.replace(/^\/*/, "/"), c = o.useMemo(
|
|
998
1007
|
() => ({
|
|
999
|
-
basename:
|
|
1000
|
-
navigator:
|
|
1001
|
-
static:
|
|
1008
|
+
basename: u,
|
|
1009
|
+
navigator: a,
|
|
1010
|
+
static: i,
|
|
1002
1011
|
unstable_useTransitions: l,
|
|
1003
1012
|
future: {}
|
|
1004
1013
|
}),
|
|
1005
|
-
[
|
|
1014
|
+
[u, a, i, l]
|
|
1006
1015
|
);
|
|
1007
|
-
typeof n == "string" && (n =
|
|
1016
|
+
typeof n == "string" && (n = q(n));
|
|
1008
1017
|
let {
|
|
1009
|
-
pathname:
|
|
1010
|
-
search:
|
|
1011
|
-
hash:
|
|
1018
|
+
pathname: d = "/",
|
|
1019
|
+
search: f = "",
|
|
1020
|
+
hash: s = "",
|
|
1012
1021
|
state: h = null,
|
|
1013
|
-
key: m = "default"
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1022
|
+
key: m = "default",
|
|
1023
|
+
unstable_mask: v
|
|
1024
|
+
} = n, g = o.useMemo(() => {
|
|
1025
|
+
let p = F(d, u);
|
|
1026
|
+
return p == null ? null : {
|
|
1017
1027
|
location: {
|
|
1018
|
-
pathname:
|
|
1019
|
-
search:
|
|
1020
|
-
hash:
|
|
1028
|
+
pathname: p,
|
|
1029
|
+
search: f,
|
|
1030
|
+
hash: s,
|
|
1021
1031
|
state: h,
|
|
1022
|
-
key: m
|
|
1032
|
+
key: m,
|
|
1033
|
+
unstable_mask: v
|
|
1023
1034
|
},
|
|
1024
1035
|
navigationType: r
|
|
1025
1036
|
};
|
|
1026
|
-
}, [
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1037
|
+
}, [
|
|
1038
|
+
u,
|
|
1039
|
+
d,
|
|
1040
|
+
f,
|
|
1041
|
+
s,
|
|
1042
|
+
h,
|
|
1043
|
+
m,
|
|
1044
|
+
r,
|
|
1045
|
+
v
|
|
1046
|
+
]);
|
|
1047
|
+
return I(
|
|
1048
|
+
g != null,
|
|
1049
|
+
`<Router basename="${u}"> is not able to match the URL "${d}${f}${s}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
1050
|
+
), g == null ? null : /* @__PURE__ */ o.createElement(T.Provider, { value: c }, /* @__PURE__ */ o.createElement(X.Provider, { children: t, value: g }));
|
|
1051
|
+
}
|
|
1052
|
+
var Y = "get", K = "application/x-www-form-urlencoded";
|
|
1053
|
+
function Q(e) {
|
|
1034
1054
|
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
1035
1055
|
}
|
|
1036
1056
|
function Ht(e) {
|
|
1037
|
-
return
|
|
1057
|
+
return Q(e) && e.tagName.toLowerCase() === "button";
|
|
1038
1058
|
}
|
|
1039
1059
|
function jt(e) {
|
|
1040
|
-
return
|
|
1060
|
+
return Q(e) && e.tagName.toLowerCase() === "form";
|
|
1041
1061
|
}
|
|
1042
1062
|
function Vt(e) {
|
|
1043
|
-
return
|
|
1063
|
+
return Q(e) && e.tagName.toLowerCase() === "input";
|
|
1044
1064
|
}
|
|
1045
1065
|
function zt(e) {
|
|
1046
1066
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
@@ -1050,72 +1070,72 @@ function Jt(e, t) {
|
|
|
1050
1070
|
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
1051
1071
|
!zt(e);
|
|
1052
1072
|
}
|
|
1053
|
-
var
|
|
1073
|
+
var J = null;
|
|
1054
1074
|
function Yt() {
|
|
1055
|
-
if (
|
|
1075
|
+
if (J === null)
|
|
1056
1076
|
try {
|
|
1057
1077
|
new FormData(
|
|
1058
1078
|
document.createElement("form"),
|
|
1059
1079
|
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
1060
1080
|
0
|
|
1061
|
-
),
|
|
1081
|
+
), J = !1;
|
|
1062
1082
|
} catch {
|
|
1063
|
-
|
|
1083
|
+
J = !0;
|
|
1064
1084
|
}
|
|
1065
|
-
return
|
|
1085
|
+
return J;
|
|
1066
1086
|
}
|
|
1067
1087
|
var Kt = /* @__PURE__ */ new Set([
|
|
1068
1088
|
"application/x-www-form-urlencoded",
|
|
1069
1089
|
"multipart/form-data",
|
|
1070
1090
|
"text/plain"
|
|
1071
1091
|
]);
|
|
1072
|
-
function
|
|
1073
|
-
return e != null && !Kt.has(e) ? (
|
|
1092
|
+
function te(e) {
|
|
1093
|
+
return e != null && !Kt.has(e) ? (I(
|
|
1074
1094
|
!1,
|
|
1075
|
-
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${
|
|
1095
|
+
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${K}"`
|
|
1076
1096
|
), null) : e;
|
|
1077
1097
|
}
|
|
1078
1098
|
function Gt(e, t) {
|
|
1079
|
-
let n, r,
|
|
1099
|
+
let n, r, a, i, l;
|
|
1080
1100
|
if (jt(e)) {
|
|
1081
|
-
let
|
|
1082
|
-
r =
|
|
1101
|
+
let u = e.getAttribute("action");
|
|
1102
|
+
r = u ? F(u, t) : null, n = e.getAttribute("method") || Y, a = te(e.getAttribute("enctype")) || K, i = new FormData(e);
|
|
1083
1103
|
} else if (Ht(e) || Vt(e) && (e.type === "submit" || e.type === "image")) {
|
|
1084
|
-
let
|
|
1085
|
-
if (
|
|
1104
|
+
let u = e.form;
|
|
1105
|
+
if (u == null)
|
|
1086
1106
|
throw new Error(
|
|
1087
1107
|
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1088
1108
|
);
|
|
1089
|
-
let
|
|
1090
|
-
if (r =
|
|
1091
|
-
let { name:
|
|
1092
|
-
if (
|
|
1093
|
-
let h =
|
|
1094
|
-
|
|
1095
|
-
} else
|
|
1109
|
+
let c = e.getAttribute("formaction") || u.getAttribute("action");
|
|
1110
|
+
if (r = c ? F(c, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || Y, a = te(e.getAttribute("formenctype")) || te(u.getAttribute("enctype")) || K, i = new FormData(u, e), !Yt()) {
|
|
1111
|
+
let { name: d, type: f, value: s } = e;
|
|
1112
|
+
if (f === "image") {
|
|
1113
|
+
let h = d ? `${d}.` : "";
|
|
1114
|
+
i.append(`${h}x`, "0"), i.append(`${h}y`, "0");
|
|
1115
|
+
} else d && i.append(d, s);
|
|
1096
1116
|
}
|
|
1097
1117
|
} else {
|
|
1098
|
-
if (
|
|
1118
|
+
if (Q(e))
|
|
1099
1119
|
throw new Error(
|
|
1100
1120
|
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
1101
1121
|
);
|
|
1102
|
-
n =
|
|
1122
|
+
n = Y, r = null, a = K, l = e;
|
|
1103
1123
|
}
|
|
1104
|
-
return
|
|
1124
|
+
return i && a === "text/plain" && (l = i, i = void 0), { action: r, method: n.toLowerCase(), encType: a, formData: i, body: l };
|
|
1105
1125
|
}
|
|
1106
1126
|
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
1107
|
-
function
|
|
1127
|
+
function se(e, t) {
|
|
1108
1128
|
if (e === !1 || e === null || typeof e > "u")
|
|
1109
1129
|
throw new Error(t);
|
|
1110
1130
|
}
|
|
1111
1131
|
function qt(e, t, n, r) {
|
|
1112
|
-
let
|
|
1132
|
+
let a = typeof e == "string" ? new URL(
|
|
1113
1133
|
e,
|
|
1114
1134
|
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
1115
1135
|
// don't assume window is available
|
|
1116
1136
|
typeof window > "u" ? "server://singlefetch/" : window.location.origin
|
|
1117
1137
|
) : e;
|
|
1118
|
-
return n ?
|
|
1138
|
+
return n ? a.pathname.endsWith("/") ? a.pathname = `${a.pathname}_.${r}` : a.pathname = `${a.pathname}.${r}` : a.pathname === "/" ? a.pathname = `_root.${r}` : t && F(a.pathname, t) === "/" ? a.pathname = `${t.replace(/\/$/, "")}/_root.${r}` : a.pathname = `${a.pathname.replace(/\/$/, "")}.${r}`, a;
|
|
1119
1139
|
}
|
|
1120
1140
|
async function Xt(e, t) {
|
|
1121
1141
|
if (e.id in t)
|
|
@@ -1139,49 +1159,49 @@ function Qt(e) {
|
|
|
1139
1159
|
}
|
|
1140
1160
|
async function Zt(e, t, n) {
|
|
1141
1161
|
let r = await Promise.all(
|
|
1142
|
-
e.map(async (
|
|
1143
|
-
let
|
|
1144
|
-
if (
|
|
1145
|
-
let l = await Xt(
|
|
1162
|
+
e.map(async (a) => {
|
|
1163
|
+
let i = t.routes[a.route.id];
|
|
1164
|
+
if (i) {
|
|
1165
|
+
let l = await Xt(i, n);
|
|
1146
1166
|
return l.links ? l.links() : [];
|
|
1147
1167
|
}
|
|
1148
1168
|
return [];
|
|
1149
1169
|
})
|
|
1150
1170
|
);
|
|
1151
1171
|
return rn(
|
|
1152
|
-
r.flat(1).filter(Qt).filter((
|
|
1153
|
-
(
|
|
1172
|
+
r.flat(1).filter(Qt).filter((a) => a.rel === "stylesheet" || a.rel === "preload").map(
|
|
1173
|
+
(a) => a.rel === "stylesheet" ? { ...a, rel: "prefetch", as: "style" } : { ...a, rel: "prefetch" }
|
|
1154
1174
|
)
|
|
1155
1175
|
);
|
|
1156
1176
|
}
|
|
1157
|
-
function ve(e, t, n, r,
|
|
1158
|
-
let l = (
|
|
1159
|
-
var
|
|
1177
|
+
function ve(e, t, n, r, a, i) {
|
|
1178
|
+
let l = (c, d) => n[d] ? c.route.id !== n[d].route.id : !0, u = (c, d) => {
|
|
1179
|
+
var f;
|
|
1160
1180
|
return (
|
|
1161
1181
|
// param change, /users/123 -> /users/456
|
|
1162
|
-
n[
|
|
1182
|
+
n[d].pathname !== c.pathname || // splat param changed, which is not present in match.path
|
|
1163
1183
|
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
1164
|
-
((
|
|
1184
|
+
((f = n[d].route.path) == null ? void 0 : f.endsWith("*")) && n[d].params["*"] !== c.params["*"]
|
|
1165
1185
|
);
|
|
1166
1186
|
};
|
|
1167
|
-
return
|
|
1168
|
-
(
|
|
1169
|
-
) :
|
|
1170
|
-
var
|
|
1171
|
-
let
|
|
1172
|
-
if (!
|
|
1187
|
+
return i === "assets" ? t.filter(
|
|
1188
|
+
(c, d) => l(c, d) || u(c, d)
|
|
1189
|
+
) : i === "data" ? t.filter((c, d) => {
|
|
1190
|
+
var s;
|
|
1191
|
+
let f = r.routes[c.route.id];
|
|
1192
|
+
if (!f || !f.hasLoader)
|
|
1173
1193
|
return !1;
|
|
1174
|
-
if (l(
|
|
1194
|
+
if (l(c, d) || u(c, d))
|
|
1175
1195
|
return !0;
|
|
1176
|
-
if (
|
|
1177
|
-
let h =
|
|
1196
|
+
if (c.route.shouldRevalidate) {
|
|
1197
|
+
let h = c.route.shouldRevalidate({
|
|
1178
1198
|
currentUrl: new URL(
|
|
1179
|
-
|
|
1199
|
+
a.pathname + a.search + a.hash,
|
|
1180
1200
|
window.origin
|
|
1181
1201
|
),
|
|
1182
|
-
currentParams: ((
|
|
1202
|
+
currentParams: ((s = n[0]) == null ? void 0 : s.params) || {},
|
|
1183
1203
|
nextUrl: new URL(e, window.origin),
|
|
1184
|
-
nextParams:
|
|
1204
|
+
nextParams: c.params,
|
|
1185
1205
|
defaultShouldRevalidate: !0
|
|
1186
1206
|
});
|
|
1187
1207
|
if (typeof h == "boolean")
|
|
@@ -1193,10 +1213,10 @@ function ve(e, t, n, r, i, a) {
|
|
|
1193
1213
|
function en(e, t, { includeHydrateFallback: n } = {}) {
|
|
1194
1214
|
return tn(
|
|
1195
1215
|
e.map((r) => {
|
|
1196
|
-
let
|
|
1197
|
-
if (!
|
|
1198
|
-
let
|
|
1199
|
-
return
|
|
1216
|
+
let a = t.routes[r.route.id];
|
|
1217
|
+
if (!a) return [];
|
|
1218
|
+
let i = [a.module];
|
|
1219
|
+
return a.clientActionModule && (i = i.concat(a.clientActionModule)), a.clientLoaderModule && (i = i.concat(a.clientLoaderModule)), n && a.hydrateFallbackModule && (i = i.concat(a.hydrateFallbackModule)), a.imports && (i = i.concat(a.imports)), i;
|
|
1200
1220
|
}).flat(1)
|
|
1201
1221
|
);
|
|
1202
1222
|
}
|
|
@@ -1211,96 +1231,96 @@ function nn(e) {
|
|
|
1211
1231
|
}
|
|
1212
1232
|
function rn(e, t) {
|
|
1213
1233
|
let n = /* @__PURE__ */ new Set();
|
|
1214
|
-
return new Set(t), e.reduce((r,
|
|
1215
|
-
let
|
|
1216
|
-
return n.has(
|
|
1234
|
+
return new Set(t), e.reduce((r, a) => {
|
|
1235
|
+
let i = JSON.stringify(nn(a));
|
|
1236
|
+
return n.has(i) || (n.add(i), r.push({ key: i, link: a })), r;
|
|
1217
1237
|
}, []);
|
|
1218
1238
|
}
|
|
1219
|
-
function
|
|
1220
|
-
let e = o.useContext(
|
|
1221
|
-
return
|
|
1239
|
+
function Ne() {
|
|
1240
|
+
let e = o.useContext(U);
|
|
1241
|
+
return se(
|
|
1222
1242
|
e,
|
|
1223
1243
|
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1224
1244
|
), e;
|
|
1225
1245
|
}
|
|
1226
1246
|
function an() {
|
|
1227
|
-
let e = o.useContext(
|
|
1228
|
-
return
|
|
1247
|
+
let e = o.useContext(j);
|
|
1248
|
+
return se(
|
|
1229
1249
|
e,
|
|
1230
1250
|
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1231
1251
|
), e;
|
|
1232
1252
|
}
|
|
1233
|
-
var
|
|
1234
|
-
|
|
1235
|
-
function
|
|
1236
|
-
let e = o.useContext(
|
|
1237
|
-
return
|
|
1253
|
+
var ue = o.createContext(void 0);
|
|
1254
|
+
ue.displayName = "FrameworkContext";
|
|
1255
|
+
function Ie() {
|
|
1256
|
+
let e = o.useContext(ue);
|
|
1257
|
+
return se(
|
|
1238
1258
|
e,
|
|
1239
1259
|
"You must render this element inside a <HydratedRouter> element"
|
|
1240
1260
|
), e;
|
|
1241
1261
|
}
|
|
1242
1262
|
function on(e, t) {
|
|
1243
|
-
let n = o.useContext(
|
|
1263
|
+
let n = o.useContext(ue), [r, a] = o.useState(!1), [i, l] = o.useState(!1), { onFocus: u, onBlur: c, onMouseEnter: d, onMouseLeave: f, onTouchStart: s } = t, h = o.useRef(null);
|
|
1244
1264
|
o.useEffect(() => {
|
|
1245
1265
|
if (e === "render" && l(!0), e === "viewport") {
|
|
1246
|
-
let
|
|
1247
|
-
|
|
1248
|
-
l(
|
|
1266
|
+
let g = (y) => {
|
|
1267
|
+
y.forEach((w) => {
|
|
1268
|
+
l(w.isIntersecting);
|
|
1249
1269
|
});
|
|
1250
|
-
},
|
|
1251
|
-
return h.current &&
|
|
1252
|
-
|
|
1270
|
+
}, p = new IntersectionObserver(g, { threshold: 0.5 });
|
|
1271
|
+
return h.current && p.observe(h.current), () => {
|
|
1272
|
+
p.disconnect();
|
|
1253
1273
|
};
|
|
1254
1274
|
}
|
|
1255
1275
|
}, [e]), o.useEffect(() => {
|
|
1256
1276
|
if (r) {
|
|
1257
|
-
let
|
|
1277
|
+
let g = setTimeout(() => {
|
|
1258
1278
|
l(!0);
|
|
1259
1279
|
}, 100);
|
|
1260
1280
|
return () => {
|
|
1261
|
-
clearTimeout(
|
|
1281
|
+
clearTimeout(g);
|
|
1262
1282
|
};
|
|
1263
1283
|
}
|
|
1264
1284
|
}, [r]);
|
|
1265
1285
|
let m = () => {
|
|
1266
|
-
|
|
1267
|
-
},
|
|
1268
|
-
|
|
1286
|
+
a(!0);
|
|
1287
|
+
}, v = () => {
|
|
1288
|
+
a(!1), l(!1);
|
|
1269
1289
|
};
|
|
1270
|
-
return n ? e !== "intent" ? [
|
|
1271
|
-
|
|
1290
|
+
return n ? e !== "intent" ? [i, h, {}] : [
|
|
1291
|
+
i,
|
|
1272
1292
|
h,
|
|
1273
1293
|
{
|
|
1274
|
-
onFocus:
|
|
1275
|
-
onBlur:
|
|
1276
|
-
onMouseEnter:
|
|
1277
|
-
onMouseLeave:
|
|
1278
|
-
onTouchStart:
|
|
1294
|
+
onFocus: H(u, m),
|
|
1295
|
+
onBlur: H(c, v),
|
|
1296
|
+
onMouseEnter: H(d, m),
|
|
1297
|
+
onMouseLeave: H(f, v),
|
|
1298
|
+
onTouchStart: H(s, m)
|
|
1279
1299
|
}
|
|
1280
1300
|
] : [!1, h, {}];
|
|
1281
1301
|
}
|
|
1282
|
-
function
|
|
1302
|
+
function H(e, t) {
|
|
1283
1303
|
return (n) => {
|
|
1284
1304
|
e && e(n), n.defaultPrevented || t(n);
|
|
1285
1305
|
};
|
|
1286
1306
|
}
|
|
1287
1307
|
function ln({ page: e, ...t }) {
|
|
1288
|
-
let { router: n } =
|
|
1289
|
-
() =>
|
|
1308
|
+
let { router: n } = Ne(), r = o.useMemo(
|
|
1309
|
+
() => ye(n.routes, e, n.basename),
|
|
1290
1310
|
[n.routes, e, n.basename]
|
|
1291
1311
|
);
|
|
1292
1312
|
return r ? /* @__PURE__ */ o.createElement(un, { page: e, matches: r, ...t }) : null;
|
|
1293
1313
|
}
|
|
1294
1314
|
function sn(e) {
|
|
1295
|
-
let { manifest: t, routeModules: n } =
|
|
1315
|
+
let { manifest: t, routeModules: n } = Ie(), [r, a] = o.useState([]);
|
|
1296
1316
|
return o.useEffect(() => {
|
|
1297
|
-
let
|
|
1317
|
+
let i = !1;
|
|
1298
1318
|
return Zt(e, t, n).then(
|
|
1299
1319
|
(l) => {
|
|
1300
|
-
|
|
1320
|
+
i || a(l);
|
|
1301
1321
|
}
|
|
1302
1322
|
), () => {
|
|
1303
|
-
|
|
1323
|
+
i = !0;
|
|
1304
1324
|
};
|
|
1305
1325
|
}, [e, t, n]), r;
|
|
1306
1326
|
}
|
|
@@ -1309,70 +1329,70 @@ function un({
|
|
|
1309
1329
|
matches: t,
|
|
1310
1330
|
...n
|
|
1311
1331
|
}) {
|
|
1312
|
-
let r =
|
|
1332
|
+
let r = A(), { future: a, manifest: i, routeModules: l } = Ie(), { basename: u } = Ne(), { loaderData: c, matches: d } = an(), f = o.useMemo(
|
|
1313
1333
|
() => ve(
|
|
1314
1334
|
e,
|
|
1315
1335
|
t,
|
|
1316
|
-
|
|
1317
|
-
|
|
1336
|
+
d,
|
|
1337
|
+
i,
|
|
1318
1338
|
r,
|
|
1319
1339
|
"data"
|
|
1320
1340
|
),
|
|
1321
|
-
[e, t,
|
|
1322
|
-
),
|
|
1341
|
+
[e, t, d, i, r]
|
|
1342
|
+
), s = o.useMemo(
|
|
1323
1343
|
() => ve(
|
|
1324
1344
|
e,
|
|
1325
1345
|
t,
|
|
1326
|
-
|
|
1327
|
-
|
|
1346
|
+
d,
|
|
1347
|
+
i,
|
|
1328
1348
|
r,
|
|
1329
1349
|
"assets"
|
|
1330
1350
|
),
|
|
1331
|
-
[e, t,
|
|
1351
|
+
[e, t, d, i, r]
|
|
1332
1352
|
), h = o.useMemo(() => {
|
|
1333
1353
|
if (e === r.pathname + r.search + r.hash)
|
|
1334
1354
|
return [];
|
|
1335
|
-
let
|
|
1336
|
-
if (t.forEach((
|
|
1337
|
-
var
|
|
1338
|
-
let
|
|
1339
|
-
!
|
|
1340
|
-
}),
|
|
1355
|
+
let g = /* @__PURE__ */ new Set(), p = !1;
|
|
1356
|
+
if (t.forEach((w) => {
|
|
1357
|
+
var L;
|
|
1358
|
+
let R = i.routes[w.route.id];
|
|
1359
|
+
!R || !R.hasLoader || (!f.some((x) => x.route.id === w.route.id) && w.route.id in c && ((L = l[w.route.id]) != null && L.shouldRevalidate) || R.hasClientLoader ? p = !0 : g.add(w.route.id));
|
|
1360
|
+
}), g.size === 0)
|
|
1341
1361
|
return [];
|
|
1342
|
-
let
|
|
1362
|
+
let y = qt(
|
|
1343
1363
|
e,
|
|
1344
|
-
|
|
1345
|
-
|
|
1364
|
+
u,
|
|
1365
|
+
a.unstable_trailingSlashAwareDataRequests,
|
|
1346
1366
|
"data"
|
|
1347
1367
|
);
|
|
1348
|
-
return
|
|
1368
|
+
return p && g.size > 0 && y.searchParams.set(
|
|
1349
1369
|
"_routes",
|
|
1350
|
-
t.filter((
|
|
1351
|
-
), [
|
|
1370
|
+
t.filter((w) => g.has(w.route.id)).map((w) => w.route.id).join(",")
|
|
1371
|
+
), [y.pathname + y.search];
|
|
1352
1372
|
}, [
|
|
1353
|
-
s,
|
|
1354
|
-
i.unstable_trailingSlashAwareDataRequests,
|
|
1355
1373
|
u,
|
|
1374
|
+
a.unstable_trailingSlashAwareDataRequests,
|
|
1375
|
+
c,
|
|
1356
1376
|
r,
|
|
1357
|
-
|
|
1358
|
-
|
|
1377
|
+
i,
|
|
1378
|
+
f,
|
|
1359
1379
|
t,
|
|
1360
1380
|
e,
|
|
1361
1381
|
l
|
|
1362
1382
|
]), m = o.useMemo(
|
|
1363
|
-
() => en(
|
|
1364
|
-
[
|
|
1365
|
-
),
|
|
1366
|
-
return /* @__PURE__ */ o.createElement(o.Fragment, null, h.map((
|
|
1383
|
+
() => en(s, i),
|
|
1384
|
+
[s, i]
|
|
1385
|
+
), v = sn(s);
|
|
1386
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, h.map((g) => /* @__PURE__ */ o.createElement("link", { key: g, rel: "prefetch", as: "fetch", href: g, ...n })), m.map((g) => /* @__PURE__ */ o.createElement("link", { key: g, rel: "modulepreload", href: g, ...n })), v.map(({ key: g, link: p }) => (
|
|
1367
1387
|
// these don't spread `linkProps` because they are full link descriptors
|
|
1368
1388
|
// already with their own props
|
|
1369
1389
|
/* @__PURE__ */ o.createElement(
|
|
1370
1390
|
"link",
|
|
1371
1391
|
{
|
|
1372
|
-
key:
|
|
1392
|
+
key: g,
|
|
1373
1393
|
nonce: n.nonce,
|
|
1374
|
-
...
|
|
1375
|
-
crossOrigin:
|
|
1394
|
+
...p,
|
|
1395
|
+
crossOrigin: p.crossOrigin ?? n.crossOrigin
|
|
1376
1396
|
}
|
|
1377
1397
|
)
|
|
1378
1398
|
)));
|
|
@@ -1387,103 +1407,115 @@ function cn(...e) {
|
|
|
1387
1407
|
var fn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1388
1408
|
try {
|
|
1389
1409
|
fn && (window.__reactRouterVersion = // @ts-expect-error
|
|
1390
|
-
"7.13.
|
|
1410
|
+
"7.13.2");
|
|
1391
1411
|
} catch {
|
|
1392
1412
|
}
|
|
1393
|
-
var
|
|
1413
|
+
var Fe = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Oe = o.forwardRef(
|
|
1394
1414
|
function({
|
|
1395
1415
|
onClick: t,
|
|
1396
1416
|
discover: n = "render",
|
|
1397
1417
|
prefetch: r = "none",
|
|
1398
|
-
relative:
|
|
1399
|
-
reloadDocument:
|
|
1418
|
+
relative: a,
|
|
1419
|
+
reloadDocument: i,
|
|
1400
1420
|
replace: l,
|
|
1401
|
-
|
|
1402
|
-
|
|
1421
|
+
unstable_mask: u,
|
|
1422
|
+
state: c,
|
|
1423
|
+
target: d,
|
|
1403
1424
|
to: f,
|
|
1404
|
-
preventScrollReset:
|
|
1405
|
-
viewTransition:
|
|
1406
|
-
unstable_defaultShouldRevalidate:
|
|
1407
|
-
...
|
|
1408
|
-
},
|
|
1409
|
-
let { basename:
|
|
1410
|
-
f =
|
|
1411
|
-
let
|
|
1425
|
+
preventScrollReset: s,
|
|
1426
|
+
viewTransition: h,
|
|
1427
|
+
unstable_defaultShouldRevalidate: m,
|
|
1428
|
+
...v
|
|
1429
|
+
}, g) {
|
|
1430
|
+
let { basename: p, navigator: y, unstable_useTransitions: w } = o.useContext(T), R = typeof f == "string" && Fe.test(f), L = be(f, p);
|
|
1431
|
+
f = L.to;
|
|
1432
|
+
let x = Rt(f, { relative: a }), S = A(), D = null;
|
|
1433
|
+
if (u) {
|
|
1434
|
+
let k = re(
|
|
1435
|
+
u,
|
|
1436
|
+
[],
|
|
1437
|
+
S.unstable_mask ? S.unstable_mask.pathname : "/",
|
|
1438
|
+
!0
|
|
1439
|
+
);
|
|
1440
|
+
p !== "/" && (k.pathname = k.pathname === "/" ? p : N([p, k.pathname])), D = y.createHref(k);
|
|
1441
|
+
}
|
|
1442
|
+
let [E, $, b] = on(
|
|
1412
1443
|
r,
|
|
1413
|
-
|
|
1414
|
-
),
|
|
1444
|
+
v
|
|
1445
|
+
), _ = pn(f, {
|
|
1415
1446
|
replace: l,
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1447
|
+
unstable_mask: u,
|
|
1448
|
+
state: c,
|
|
1449
|
+
target: d,
|
|
1450
|
+
preventScrollReset: s,
|
|
1451
|
+
relative: a,
|
|
1452
|
+
viewTransition: h,
|
|
1453
|
+
unstable_defaultShouldRevalidate: m,
|
|
1454
|
+
unstable_useTransitions: w
|
|
1423
1455
|
});
|
|
1424
|
-
function
|
|
1425
|
-
t && t(
|
|
1456
|
+
function M(k) {
|
|
1457
|
+
t && t(k), k.defaultPrevented || _(k);
|
|
1426
1458
|
}
|
|
1427
|
-
let P = (
|
|
1459
|
+
let B = !(L.isExternal || i), P = (
|
|
1428
1460
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1429
1461
|
/* @__PURE__ */ o.createElement(
|
|
1430
1462
|
"a",
|
|
1431
1463
|
{
|
|
1432
|
-
...
|
|
1433
|
-
...
|
|
1434
|
-
href:
|
|
1435
|
-
onClick:
|
|
1436
|
-
ref: cn(
|
|
1437
|
-
target:
|
|
1464
|
+
...v,
|
|
1465
|
+
...b,
|
|
1466
|
+
href: (B ? D : void 0) || L.absoluteURL || x,
|
|
1467
|
+
onClick: B ? M : t,
|
|
1468
|
+
ref: cn(g, $),
|
|
1469
|
+
target: d,
|
|
1438
1470
|
"data-discover": !R && n === "render" ? "true" : void 0
|
|
1439
1471
|
}
|
|
1440
1472
|
)
|
|
1441
1473
|
);
|
|
1442
|
-
return
|
|
1474
|
+
return E && !R ? /* @__PURE__ */ o.createElement(o.Fragment, null, P, /* @__PURE__ */ o.createElement(ln, { page: x })) : P;
|
|
1443
1475
|
}
|
|
1444
1476
|
);
|
|
1445
|
-
|
|
1477
|
+
Oe.displayName = "Link";
|
|
1446
1478
|
var dn = o.forwardRef(
|
|
1447
1479
|
function({
|
|
1448
1480
|
"aria-current": t = "page",
|
|
1449
1481
|
caseSensitive: n = !1,
|
|
1450
1482
|
className: r = "",
|
|
1451
|
-
end:
|
|
1452
|
-
style:
|
|
1483
|
+
end: a = !1,
|
|
1484
|
+
style: i,
|
|
1453
1485
|
to: l,
|
|
1454
|
-
viewTransition:
|
|
1455
|
-
children:
|
|
1456
|
-
...
|
|
1457
|
-
},
|
|
1458
|
-
let
|
|
1486
|
+
viewTransition: u,
|
|
1487
|
+
children: c,
|
|
1488
|
+
...d
|
|
1489
|
+
}, f) {
|
|
1490
|
+
let s = z(l, { relative: d.relative }), h = A(), m = o.useContext(j), { navigator: v, basename: g } = o.useContext(T), p = m != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1459
1491
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1460
|
-
|
|
1461
|
-
n || (
|
|
1462
|
-
const
|
|
1463
|
-
let
|
|
1464
|
-
isActive:
|
|
1465
|
-
isPending:
|
|
1466
|
-
isTransitioning:
|
|
1467
|
-
}, E =
|
|
1468
|
-
typeof r == "function" ?
|
|
1492
|
+
En(s) && u === !0, y = v.encodeLocation ? v.encodeLocation(s).pathname : s.pathname, w = h.pathname, R = m && m.navigation && m.navigation.location ? m.navigation.location.pathname : null;
|
|
1493
|
+
n || (w = w.toLowerCase(), R = R ? R.toLowerCase() : null, y = y.toLowerCase()), R && g && (R = F(R, g) || R);
|
|
1494
|
+
const L = y !== "/" && y.endsWith("/") ? y.length - 1 : y.length;
|
|
1495
|
+
let x = w === y || !a && w.startsWith(y) && w.charAt(L) === "/", S = R != null && (R === y || !a && R.startsWith(y) && R.charAt(y.length) === "/"), D = {
|
|
1496
|
+
isActive: x,
|
|
1497
|
+
isPending: S,
|
|
1498
|
+
isTransitioning: p
|
|
1499
|
+
}, E = x ? t : void 0, $;
|
|
1500
|
+
typeof r == "function" ? $ = r(D) : $ = [
|
|
1469
1501
|
r,
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1502
|
+
x ? "active" : null,
|
|
1503
|
+
S ? "pending" : null,
|
|
1504
|
+
p ? "transitioning" : null
|
|
1473
1505
|
].filter(Boolean).join(" ");
|
|
1474
|
-
let
|
|
1506
|
+
let b = typeof i == "function" ? i(D) : i;
|
|
1475
1507
|
return /* @__PURE__ */ o.createElement(
|
|
1476
|
-
|
|
1508
|
+
Oe,
|
|
1477
1509
|
{
|
|
1478
|
-
...
|
|
1510
|
+
...d,
|
|
1479
1511
|
"aria-current": E,
|
|
1480
|
-
className:
|
|
1481
|
-
ref:
|
|
1482
|
-
style:
|
|
1512
|
+
className: $,
|
|
1513
|
+
ref: f,
|
|
1514
|
+
style: b,
|
|
1483
1515
|
to: l,
|
|
1484
|
-
viewTransition:
|
|
1516
|
+
viewTransition: u
|
|
1485
1517
|
},
|
|
1486
|
-
typeof
|
|
1518
|
+
typeof c == "function" ? c(D) : c
|
|
1487
1519
|
);
|
|
1488
1520
|
}
|
|
1489
1521
|
);
|
|
@@ -1494,42 +1526,42 @@ var hn = o.forwardRef(
|
|
|
1494
1526
|
fetcherKey: t,
|
|
1495
1527
|
navigate: n,
|
|
1496
1528
|
reloadDocument: r,
|
|
1497
|
-
replace:
|
|
1498
|
-
state:
|
|
1499
|
-
method: l =
|
|
1500
|
-
action:
|
|
1501
|
-
onSubmit:
|
|
1502
|
-
relative:
|
|
1503
|
-
preventScrollReset:
|
|
1504
|
-
viewTransition:
|
|
1529
|
+
replace: a,
|
|
1530
|
+
state: i,
|
|
1531
|
+
method: l = Y,
|
|
1532
|
+
action: u,
|
|
1533
|
+
onSubmit: c,
|
|
1534
|
+
relative: d,
|
|
1535
|
+
preventScrollReset: f,
|
|
1536
|
+
viewTransition: s,
|
|
1505
1537
|
unstable_defaultShouldRevalidate: h,
|
|
1506
1538
|
...m
|
|
1507
|
-
},
|
|
1508
|
-
let { unstable_useTransitions:
|
|
1509
|
-
if (
|
|
1510
|
-
|
|
1511
|
-
let
|
|
1539
|
+
}, v) => {
|
|
1540
|
+
let { unstable_useTransitions: g } = o.useContext(T), p = yn(), y = Rn(u, { relative: d }), w = l.toLowerCase() === "get" ? "get" : "post", R = typeof u == "string" && Fe.test(u), L = (x) => {
|
|
1541
|
+
if (c && c(x), x.defaultPrevented) return;
|
|
1542
|
+
x.preventDefault();
|
|
1543
|
+
let S = x.nativeEvent.submitter, D = (S == null ? void 0 : S.getAttribute("formmethod")) || l, E = () => p(S || x.currentTarget, {
|
|
1512
1544
|
fetcherKey: t,
|
|
1513
|
-
method:
|
|
1545
|
+
method: D,
|
|
1514
1546
|
navigate: n,
|
|
1515
|
-
replace:
|
|
1516
|
-
state:
|
|
1517
|
-
relative:
|
|
1518
|
-
preventScrollReset:
|
|
1519
|
-
viewTransition:
|
|
1547
|
+
replace: a,
|
|
1548
|
+
state: i,
|
|
1549
|
+
relative: d,
|
|
1550
|
+
preventScrollReset: f,
|
|
1551
|
+
viewTransition: s,
|
|
1520
1552
|
unstable_defaultShouldRevalidate: h
|
|
1521
1553
|
});
|
|
1522
|
-
|
|
1554
|
+
g && n !== !1 ? o.startTransition(() => E()) : E();
|
|
1523
1555
|
};
|
|
1524
1556
|
return /* @__PURE__ */ o.createElement(
|
|
1525
1557
|
"form",
|
|
1526
1558
|
{
|
|
1527
|
-
ref:
|
|
1528
|
-
method:
|
|
1529
|
-
action:
|
|
1530
|
-
onSubmit: r ?
|
|
1559
|
+
ref: v,
|
|
1560
|
+
method: w,
|
|
1561
|
+
action: y,
|
|
1562
|
+
onSubmit: r ? c : L,
|
|
1531
1563
|
...m,
|
|
1532
|
-
"data-discover": !
|
|
1564
|
+
"data-discover": !R && e === "render" ? "true" : void 0
|
|
1533
1565
|
}
|
|
1534
1566
|
);
|
|
1535
1567
|
}
|
|
@@ -1538,83 +1570,86 @@ hn.displayName = "Form";
|
|
|
1538
1570
|
function mn(e) {
|
|
1539
1571
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1540
1572
|
}
|
|
1541
|
-
function
|
|
1542
|
-
let t = o.useContext(
|
|
1573
|
+
function Ae(e) {
|
|
1574
|
+
let t = o.useContext(U);
|
|
1543
1575
|
return C(t, mn(e)), t;
|
|
1544
1576
|
}
|
|
1545
1577
|
function pn(e, {
|
|
1546
1578
|
target: t,
|
|
1547
1579
|
replace: n,
|
|
1548
|
-
|
|
1580
|
+
unstable_mask: r,
|
|
1581
|
+
state: a,
|
|
1549
1582
|
preventScrollReset: i,
|
|
1550
|
-
relative:
|
|
1551
|
-
viewTransition:
|
|
1552
|
-
unstable_defaultShouldRevalidate:
|
|
1553
|
-
unstable_useTransitions:
|
|
1583
|
+
relative: l,
|
|
1584
|
+
viewTransition: u,
|
|
1585
|
+
unstable_defaultShouldRevalidate: c,
|
|
1586
|
+
unstable_useTransitions: d
|
|
1554
1587
|
} = {}) {
|
|
1555
|
-
let f =
|
|
1588
|
+
let f = Et(), s = A(), h = z(e, { relative: l });
|
|
1556
1589
|
return o.useCallback(
|
|
1557
|
-
(
|
|
1558
|
-
if (Jt(
|
|
1559
|
-
|
|
1560
|
-
let
|
|
1561
|
-
replace:
|
|
1562
|
-
|
|
1590
|
+
(m) => {
|
|
1591
|
+
if (Jt(m, t)) {
|
|
1592
|
+
m.preventDefault();
|
|
1593
|
+
let v = n !== void 0 ? n : ne(s) === ne(h), g = () => f(e, {
|
|
1594
|
+
replace: v,
|
|
1595
|
+
unstable_mask: r,
|
|
1596
|
+
state: a,
|
|
1563
1597
|
preventScrollReset: i,
|
|
1564
|
-
relative:
|
|
1565
|
-
viewTransition:
|
|
1566
|
-
unstable_defaultShouldRevalidate:
|
|
1598
|
+
relative: l,
|
|
1599
|
+
viewTransition: u,
|
|
1600
|
+
unstable_defaultShouldRevalidate: c
|
|
1567
1601
|
});
|
|
1568
|
-
|
|
1602
|
+
d ? o.startTransition(() => g()) : g();
|
|
1569
1603
|
}
|
|
1570
1604
|
},
|
|
1571
1605
|
[
|
|
1572
|
-
|
|
1606
|
+
s,
|
|
1573
1607
|
f,
|
|
1574
|
-
|
|
1608
|
+
h,
|
|
1575
1609
|
n,
|
|
1576
1610
|
r,
|
|
1611
|
+
a,
|
|
1577
1612
|
t,
|
|
1578
1613
|
e,
|
|
1579
1614
|
i,
|
|
1580
|
-
a,
|
|
1581
1615
|
l,
|
|
1582
|
-
|
|
1583
|
-
|
|
1616
|
+
u,
|
|
1617
|
+
c,
|
|
1618
|
+
d
|
|
1584
1619
|
]
|
|
1585
1620
|
);
|
|
1586
1621
|
}
|
|
1587
|
-
var
|
|
1622
|
+
var gn = 0, vn = () => `__${String(++gn)}__`;
|
|
1588
1623
|
function yn() {
|
|
1589
|
-
let { router: e } =
|
|
1624
|
+
let { router: e } = Ae(
|
|
1590
1625
|
"useSubmit"
|
|
1591
1626
|
/* UseSubmit */
|
|
1592
|
-
), { basename: t } = o.useContext(
|
|
1627
|
+
), { basename: t } = o.useContext(T), n = Dt(), r = e.fetch, a = e.navigate;
|
|
1593
1628
|
return o.useCallback(
|
|
1594
|
-
async (
|
|
1595
|
-
let { action:
|
|
1596
|
-
|
|
1629
|
+
async (i, l = {}) => {
|
|
1630
|
+
let { action: u, method: c, encType: d, formData: f, body: s } = Gt(
|
|
1631
|
+
i,
|
|
1597
1632
|
t
|
|
1598
1633
|
);
|
|
1599
1634
|
if (l.navigate === !1) {
|
|
1600
|
-
let h = l.fetcherKey ||
|
|
1601
|
-
await r(h, n, l.action ||
|
|
1635
|
+
let h = l.fetcherKey || vn();
|
|
1636
|
+
await r(h, n, l.action || u, {
|
|
1602
1637
|
unstable_defaultShouldRevalidate: l.unstable_defaultShouldRevalidate,
|
|
1603
1638
|
preventScrollReset: l.preventScrollReset,
|
|
1604
|
-
formData:
|
|
1605
|
-
body:
|
|
1606
|
-
formMethod: l.method ||
|
|
1607
|
-
formEncType: l.encType ||
|
|
1639
|
+
formData: f,
|
|
1640
|
+
body: s,
|
|
1641
|
+
formMethod: l.method || c,
|
|
1642
|
+
formEncType: l.encType || d,
|
|
1608
1643
|
flushSync: l.flushSync
|
|
1609
1644
|
});
|
|
1610
1645
|
} else
|
|
1611
|
-
await
|
|
1646
|
+
await a(l.action || u, {
|
|
1612
1647
|
unstable_defaultShouldRevalidate: l.unstable_defaultShouldRevalidate,
|
|
1613
1648
|
preventScrollReset: l.preventScrollReset,
|
|
1614
|
-
formData:
|
|
1615
|
-
body:
|
|
1616
|
-
formMethod: l.method ||
|
|
1617
|
-
formEncType: l.encType ||
|
|
1649
|
+
formData: f,
|
|
1650
|
+
body: s,
|
|
1651
|
+
formMethod: l.method || c,
|
|
1652
|
+
formEncType: l.encType || d,
|
|
1618
1653
|
replace: l.replace,
|
|
1619
1654
|
state: l.state,
|
|
1620
1655
|
fromRouteId: n,
|
|
@@ -1622,41 +1657,41 @@ function yn() {
|
|
|
1622
1657
|
viewTransition: l.viewTransition
|
|
1623
1658
|
});
|
|
1624
1659
|
},
|
|
1625
|
-
[r,
|
|
1660
|
+
[r, a, t, n]
|
|
1626
1661
|
);
|
|
1627
1662
|
}
|
|
1628
1663
|
function Rn(e, { relative: t } = {}) {
|
|
1629
|
-
let { basename: n } = o.useContext(
|
|
1664
|
+
let { basename: n } = o.useContext(T), r = o.useContext(O);
|
|
1630
1665
|
C(r, "useFormAction must be used inside a RouteContext");
|
|
1631
|
-
let [
|
|
1666
|
+
let [a] = r.matches.slice(-1), i = { ...z(e || ".", { relative: t }) }, l = A();
|
|
1632
1667
|
if (e == null) {
|
|
1633
|
-
|
|
1634
|
-
let
|
|
1635
|
-
if (
|
|
1636
|
-
|
|
1637
|
-
let
|
|
1638
|
-
|
|
1668
|
+
i.search = l.search;
|
|
1669
|
+
let u = new URLSearchParams(i.search), c = u.getAll("index");
|
|
1670
|
+
if (c.some((f) => f === "")) {
|
|
1671
|
+
u.delete("index"), c.filter((s) => s).forEach((s) => u.append("index", s));
|
|
1672
|
+
let f = u.toString();
|
|
1673
|
+
i.search = f ? `?${f}` : "";
|
|
1639
1674
|
}
|
|
1640
1675
|
}
|
|
1641
|
-
return (!e || e === ".") &&
|
|
1676
|
+
return (!e || e === ".") && a.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (i.pathname = i.pathname === "/" ? n : N([n, i.pathname])), ne(i);
|
|
1642
1677
|
}
|
|
1643
|
-
function
|
|
1644
|
-
let n = o.useContext(
|
|
1678
|
+
function En(e, { relative: t } = {}) {
|
|
1679
|
+
let n = o.useContext(ae);
|
|
1645
1680
|
C(
|
|
1646
1681
|
n != null,
|
|
1647
1682
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1648
1683
|
);
|
|
1649
|
-
let { basename: r } =
|
|
1684
|
+
let { basename: r } = Ae(
|
|
1650
1685
|
"useViewTransitionState"
|
|
1651
1686
|
/* useViewTransitionState */
|
|
1652
|
-
),
|
|
1687
|
+
), a = z(e, { relative: t });
|
|
1653
1688
|
if (!n.isTransitioning)
|
|
1654
1689
|
return !1;
|
|
1655
|
-
let
|
|
1656
|
-
return
|
|
1690
|
+
let i = F(n.currentLocation.pathname, r) || n.currentLocation.pathname, l = F(n.nextLocation.pathname, r) || n.nextLocation.pathname;
|
|
1691
|
+
return G(a.pathname, l) != null || G(a.pathname, i) != null;
|
|
1657
1692
|
}
|
|
1658
1693
|
/**
|
|
1659
|
-
* react-router v7.13.
|
|
1694
|
+
* react-router v7.13.2
|
|
1660
1695
|
*
|
|
1661
1696
|
* Copyright (c) Remix Software Inc.
|
|
1662
1697
|
*
|
|
@@ -1665,21 +1700,21 @@ function wn(e, { relative: t } = {}) {
|
|
|
1665
1700
|
*
|
|
1666
1701
|
* @license MIT
|
|
1667
1702
|
*/
|
|
1668
|
-
function
|
|
1669
|
-
return /* @__PURE__ */ o.createElement(
|
|
1703
|
+
function wn(e) {
|
|
1704
|
+
return /* @__PURE__ */ o.createElement(_t, { flushSync: He.flushSync, ...e });
|
|
1670
1705
|
}
|
|
1671
1706
|
function kn({ theme: e = We, store: t, router: n }) {
|
|
1672
|
-
return /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ W(Ue, { injectFirst: !0, children: /* @__PURE__ */ W(_e, { theme: e, children: /* @__PURE__ */ W(Ve, { store: t, children: /* @__PURE__ */ W(
|
|
1673
1708
|
Be,
|
|
1674
1709
|
{
|
|
1675
|
-
fallback: /* @__PURE__ */
|
|
1710
|
+
fallback: /* @__PURE__ */ W(
|
|
1676
1711
|
je,
|
|
1677
1712
|
{
|
|
1678
1713
|
loading: !0,
|
|
1679
1714
|
message: "..."
|
|
1680
1715
|
}
|
|
1681
1716
|
),
|
|
1682
|
-
children: /* @__PURE__ */
|
|
1717
|
+
children: /* @__PURE__ */ W(wn, { router: n })
|
|
1683
1718
|
}
|
|
1684
1719
|
) }) }) });
|
|
1685
1720
|
}
|