@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.
Files changed (48) hide show
  1. package/dist/{Button-BgSe1MyE.js → Button-HlUfDiMM.js} +3 -3
  2. package/dist/{CircularProgress-DgKnRiq7.js → CircularProgress-DZ8YZ0Dt.js} +345 -310
  3. package/dist/{Close-Cv_QwhIN.js → Close-TS8H1lQg.js} +1 -1
  4. package/dist/{DefaultPropsProvider-BurgXZzw.js → DefaultPropsProvider-B_x1hwuY.js} +2 -2
  5. package/dist/{DialogQR-DoM8ZHBM.js → DialogQR-ByOert0g.js} +4 -4
  6. package/dist/{FileSaver.min-DhePf63e.js → FileSaver.min-CDwyANUI.js} +57 -57
  7. package/dist/{FlashWifi-slUpI7sB.js → FlashWifi-CNanHNye.js} +1 -1
  8. package/dist/{Portal-MiwrHMB_.js → Portal-BdRLJx1y.js} +140 -133
  9. package/dist/assets/SidePanel.css +1 -1
  10. package/dist/assets/SvgLayer.css +1 -1
  11. package/dist/assets/Widget.css +1 -1
  12. package/dist/{browser-HW-wgeM2.js → browser-DWbgwj89.js} +421 -451
  13. package/dist/components/AlertPara/AlertPara.js +1 -1
  14. package/dist/components/Application/Application.js +724 -689
  15. package/dist/components/BusyButton/BusyButton.d.ts +4 -4
  16. package/dist/components/BusyButton/BusyButton.js +1 -1
  17. package/dist/components/Button/Button.js +2 -2
  18. package/dist/components/ConnectionStatus/ConnectionStatus.js +3 -3
  19. package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
  20. package/dist/components/Feedback/Feedback.js +4 -4
  21. package/dist/components/Feedback/Rating.js +1 -1
  22. package/dist/components/Help/Help.js +5 -5
  23. package/dist/components/LangSelect/LangSelect.js +1 -1
  24. package/dist/components/Motd/Motd.js +1 -1
  25. package/dist/components/PieScore/PieScore.js +9609 -6092
  26. package/dist/components/QRCode/DialogQR.js +4 -4
  27. package/dist/components/QRCode/QRCode.js +2 -2
  28. package/dist/components/SidePanel/SidePanel.d.ts +2 -1
  29. package/dist/components/SidePanel/SidePanel.js +91 -73
  30. package/dist/components/Webcam/Webcam.js +3 -3
  31. package/dist/components/WorkflowLayout/Widget.js +1460 -1438
  32. package/dist/{createSvgIcon-BM4dw4Lw.js → createSvgIcon-DjQWJ3wn.js} +2 -2
  33. package/dist/{createTheme-DV959X3d.js → createTheme-DnBeI7Zz.js} +752 -749
  34. package/dist/hooks/peer.js +1 -1
  35. package/dist/{index-SOhdqzHq.js → index-B_zFkp-8.js} +2 -2
  36. package/dist/react-CiLnfHJp.js +140 -0
  37. package/dist/services/peer2peer/Incoming.js +1 -1
  38. package/dist/services/peer2peer/Outgoing.js +1 -1
  39. package/dist/services/peer2peer/Peer2Peer.js +538 -541
  40. package/dist/services/peer2peer/PeerConnection.js +1 -1
  41. package/dist/state/webrtcState.js +1 -1
  42. package/dist/style/theme.js +1 -1
  43. package/dist/util/Observer.js +1 -1
  44. package/dist/util/zip.js +1 -1
  45. package/dist/vanilla-OLGM3aAq.js +439 -0
  46. package/package.json +3 -3
  47. package/dist/react-B9NW8BS7.js +0 -112
  48. package/dist/vanilla-BJxibF1U.js +0 -404
@@ -1,14 +1,14 @@
1
- import { jsx as A } from "react/jsx-runtime";
2
- import { ThemeProvider as Ae } from "@emotion/react";
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-B9NW8BS7.js";
9
+ import { P as Ve } from "../../react-CiLnfHJp.js";
10
10
  /**
11
- * react-router v7.13.0
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 T(e, t) {
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 te({
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 G(e) {
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 ge(e, t, n = "/") {
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 i = typeof t == "string" ? G(t) : t, a = M(i.pathname || "/", n);
55
- if (a == null)
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 = ye(e);
57
+ let l = Re(e);
58
58
  Je(l);
59
- let s = null;
60
- for (let u = 0; s == null && u < l.length; ++u) {
61
- let f = rt(a);
62
- s = tt(
63
- l[u],
64
- f,
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 s;
68
+ return u;
69
69
  }
70
- function ye(e, t = [], n = [], r = "", i = !1) {
71
- let a = (l, s, u = i, f) => {
72
- let d = {
73
- relativePath: f === void 0 ? l.path || "" : f,
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: s,
75
+ childrenIndex: u,
76
76
  route: l
77
77
  };
78
- if (d.relativePath.startsWith("/")) {
79
- if (!d.relativePath.startsWith(r) && u)
78
+ if (f.relativePath.startsWith("/")) {
79
+ if (!f.relativePath.startsWith(r) && c)
80
80
  return;
81
81
  C(
82
- d.relativePath.startsWith(r),
83
- `Absolute route path "${d.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
- ), d.relativePath = d.relativePath.slice(r.length);
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 c = D([r, d.relativePath]), h = n.concat(d);
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 "${c}".`
92
- ), ye(
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
- c,
97
- u
96
+ s,
97
+ c
98
98
  )), !(l.path == null && !l.index) && t.push({
99
- path: c,
100
- score: Ze(c, l.index),
99
+ path: s,
100
+ score: Ze(s, l.index),
101
101
  routesMeta: h
102
102
  });
103
103
  };
104
- return e.forEach((l, s) => {
105
- var u;
106
- if (l.path === "" || !((u = l.path) != null && u.includes("?")))
107
- a(l, s);
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 f of Re(l.path))
110
- a(l, s, !0, f);
109
+ for (let d of Ee(l.path))
110
+ i(l, u, !0, d);
111
111
  }), t;
112
112
  }
113
- function Re(e) {
113
+ function Ee(e) {
114
114
  let t = e.split("/");
115
115
  if (t.length === 0) return [];
116
- let [n, ...r] = t, i = n.endsWith("?"), a = n.replace(/\?$/, "");
116
+ let [n, ...r] = t, a = n.endsWith("?"), i = n.replace(/\?$/, "");
117
117
  if (r.length === 0)
118
- return i ? [a, ""] : [a];
119
- let l = Re(r.join("/")), s = [];
120
- return s.push(
118
+ return a ? [i, ""] : [i];
119
+ let l = Ee(r.join("/")), u = [];
120
+ return u.push(
121
121
  ...l.map(
122
- (u) => u === "" ? a : [a, u].join("/")
122
+ (c) => c === "" ? i : [i, c].join("/")
123
123
  )
124
- ), i && s.push(...l), s.map(
125
- (u) => e.startsWith("/") && u === "" ? "/" : u
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, ue = (e) => e === "*";
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(ue) && (r += Qe), t && (r += Ge), n.filter((i) => !ue(i)).reduce(
140
- (i, a) => i + (Ye.test(a) ? Ke : a === "" ? qe : Xe),
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, i) => r === t[i]) ? (
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, i = {}, a = "/", l = [];
159
- for (let s = 0; s < r.length; ++s) {
160
- let u = r[s], f = s === r.length - 1, d = a === "/" ? t : t.slice(a.length) || "/", c = K(
161
- { path: u.relativePath, caseSensitive: u.caseSensitive, end: f },
162
- d
163
- ), h = u.route;
164
- if (!c && f && n && !r[r.length - 1].route.index && (c = K(
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: u.relativePath,
167
- caseSensitive: u.caseSensitive,
166
+ path: c.relativePath,
167
+ caseSensitive: c.caseSensitive,
168
168
  end: !1
169
169
  },
170
- d
171
- )), !c)
170
+ f
171
+ )), !s)
172
172
  return null;
173
- Object.assign(i, c.params), l.push({
173
+ Object.assign(a, s.params), l.push({
174
174
  // TODO: Can this as be avoided?
175
- params: i,
176
- pathname: D([a, c.pathname]),
175
+ params: a,
176
+ pathname: N([i, s.pathname]),
177
177
  pathnameBase: lt(
178
- D([a, c.pathnameBase])
178
+ N([i, s.pathnameBase])
179
179
  ),
180
180
  route: h
181
- }), c.pathnameBase !== "/" && (a = D([a, c.pathnameBase]));
181
+ }), s.pathnameBase !== "/" && (i = N([i, s.pathnameBase]));
182
182
  }
183
183
  return l;
184
184
  }
185
- function K(e, t) {
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
- ), i = t.match(n);
192
- if (!i) return null;
193
- let a = i[0], l = a.replace(/(.)\/+$/, "$1"), s = i.slice(1);
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
- (f, { paramName: d, isOptional: c }, h) => {
197
- if (d === "*") {
198
- let y = s[h] || "";
199
- l = a.slice(0, a.length - y.length).replace(/(.)\/+$/, "$1");
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 = s[h];
202
- return c && !m ? f[d] = void 0 : f[d] = (m || "").replace(/%2F/g, "/"), f;
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: a,
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
- T(
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 = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
216
+ let r = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
217
217
  /\/:([\w-]+)(\?)?/g,
218
- (l, s, u) => (r.push({ paramName: s, isOptional: u != null }), u ? "/?([^\\/]+)?" : "/([^\\/]+)")
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: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
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 T(
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 M(e, t) {
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: i = ""
245
- } = typeof e == "string" ? G(e) : e, a;
246
- return n ? (n = n.replace(/\/\/+/g, "/"), n.startsWith("/") ? a = ce(n.substring(1), "/") : a = ce(n, t)) : a = t, {
247
- pathname: a,
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(i)
255
+ hash: ut(a)
250
256
  };
251
257
  }
252
- function ce(e, t) {
258
+ function fe(e, t) {
253
259
  let n = t.replace(/\/+$/, "").split("/");
254
- return e.split("/").forEach((i) => {
255
- i === ".." ? n.length > 1 && n.pop() : i !== "." && n.push(i);
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 Q(e, t, n, r) {
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 Ee(e, t, n, r = !1) {
275
- let i;
276
- typeof e == "string" ? i = G(e) : (i = { ...e }, C(
277
- !i.pathname || !i.pathname.includes("?"),
278
- Q("?", "pathname", "search", i)
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
- !i.pathname || !i.pathname.includes("#"),
281
- Q("#", "pathname", "hash", i)
286
+ !a.pathname || !a.pathname.includes("#"),
287
+ Z("#", "pathname", "hash", a)
282
288
  ), C(
283
- !i.search || !i.search.includes("#"),
284
- Q("#", "search", "hash", i)
289
+ !a.search || !a.search.includes("#"),
290
+ Z("#", "search", "hash", a)
285
291
  ));
286
- let a = e === "" || i.pathname === "", l = a ? "/" : i.pathname, s;
292
+ let i = e === "" || a.pathname === "", l = i ? "/" : a.pathname, u;
287
293
  if (l == null)
288
- s = n;
294
+ u = n;
289
295
  else {
290
- let c = t.length - 1;
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(), c -= 1;
295
- i.pathname = h.join("/");
300
+ h.shift(), s -= 1;
301
+ a.pathname = h.join("/");
296
302
  }
297
- s = c >= 0 ? t[c] : "/";
303
+ u = s >= 0 ? t[s] : "/";
298
304
  }
299
- let u = it(i, s), f = l && l !== "/" && l.endsWith("/"), d = (a || l === ".") && n.endsWith("/");
300
- return !u.pathname.endsWith("/") && (f || d) && (u.pathname += "/"), u;
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 D = (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 {
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, i = !1;
328
+ let r = n, a = !1;
323
329
  if (Ce)
324
330
  try {
325
- let a = new URL(window.location.href), l = n.startsWith("//") ? new URL(a.protocol + n) : new URL(n), s = M(l.pathname, t);
326
- l.origin === a.origin && s != null ? n = s + l.search + l.hash : i = !0;
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
- T(
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: i,
341
+ isExternal: a,
336
342
  to: n
337
343
  };
338
344
  }
339
345
  Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
340
- var Pe = [
346
+ var Se = [
341
347
  "POST",
342
348
  "PUT",
343
349
  "PATCH",
344
350
  "DELETE"
345
351
  ];
346
352
  new Set(
347
- Pe
353
+ Se
348
354
  );
349
355
  var dt = [
350
356
  "GET",
351
- ...Pe
357
+ ...Se
352
358
  ];
353
359
  new Set(dt);
354
- var F = o.createContext(null);
355
- F.displayName = "DataRouter";
356
- var B = o.createContext(null);
357
- B.displayName = "DataRouterState";
358
- var Le = o.createContext(!1);
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(Le);
366
+ return o.useContext(Pe);
361
367
  }
362
- var ne = o.createContext({
368
+ var ae = o.createContext({
363
369
  isTransitioning: !1
364
370
  });
365
- ne.displayName = "ViewTransition";
366
- var Se = o.createContext(
371
+ ae.displayName = "ViewTransition";
372
+ var Le = o.createContext(
367
373
  /* @__PURE__ */ new Map()
368
374
  );
369
- Se.displayName = "Fetchers";
375
+ Le.displayName = "Fetchers";
370
376
  var mt = o.createContext(null);
371
377
  mt.displayName = "Await";
372
- var S = o.createContext(
378
+ var T = o.createContext(
373
379
  null
374
380
  );
375
- S.displayName = "Navigation";
376
- var q = o.createContext(
381
+ T.displayName = "Navigation";
382
+ var X = o.createContext(
377
383
  null
378
384
  );
379
- q.displayName = "Location";
380
- var N = o.createContext({
385
+ X.displayName = "Location";
386
+ var O = o.createContext({
381
387
  outlet: null,
382
388
  matches: [],
383
389
  isDataRoute: !1
384
390
  });
385
- N.displayName = "Route";
386
- var re = o.createContext(null);
387
- re.displayName = "RouteError";
388
- var $e = "REACT_ROUTER_ERROR", pt = "REDIRECT", vt = "ROUTE_ERROR_RESPONSE";
389
- function gt(e) {
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}:${vt}:{`
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
- H(),
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(S), { hash: i, pathname: a, search: l } = j(e, { relative: t }), s = a;
421
- return n !== "/" && (s = a === "/" ? n : D([n, a])), r.createHref({ pathname: s, search: l, hash: i });
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 H() {
424
- return o.useContext(q) != null;
429
+ function V() {
430
+ return o.useContext(X) != null;
425
431
  }
426
- function _() {
432
+ function A() {
427
433
  return C(
428
- H(),
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(q).location;
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(S).static || o.useLayoutEffect(e);
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
- H(),
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(F), { basename: t, navigator: n } = o.useContext(S), { matches: r } = o.useContext(N), { pathname: i } = _(), a = JSON.stringify(we(r)), l = o.useRef(!1);
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
- (u, f = {}) => {
454
- if (T(l.current, ke), !l.current) return;
455
- if (typeof u == "number") {
456
- n.go(u);
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 d = Ee(
460
- u,
461
- JSON.parse(a),
462
- i,
463
- f.relative === "path"
465
+ let f = re(
466
+ c,
467
+ JSON.parse(i),
468
+ a,
469
+ d.relative === "path"
464
470
  );
465
- e == null && t !== "/" && (d.pathname = d.pathname === "/" ? t : D([t, d.pathname])), (f.replace ? n.replace : n.push)(
466
- d,
467
- f.state,
468
- f
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 j(e, { relative: t } = {}) {
482
- let { matches: n } = o.useContext(N), { pathname: r } = _(), i = JSON.stringify(we(n));
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
- () => Ee(
490
+ () => re(
485
491
  e,
486
- JSON.parse(i),
492
+ JSON.parse(a),
487
493
  r,
488
494
  t === "path"
489
495
  ),
490
- [e, i, r, t]
496
+ [e, a, r, t]
491
497
  );
492
498
  }
493
- function xt(e, t, n, r, i) {
499
+ function xt(e, t, n) {
494
500
  C(
495
- H(),
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: a } = o.useContext(S), { matches: l } = o.useContext(N), s = l[l.length - 1], u = s ? s.params : {}, f = s ? s.pathname : "/", d = s ? s.pathnameBase : "/", c = s && s.route;
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 = c && c.path || "";
503
- De(
504
- f,
505
- !c || p.endsWith("*") || p.endsWith("*?"),
506
- `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (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.
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 h = _(), m;
512
- m = h;
513
- let y = m.pathname || "/", v = y;
514
- if (d !== "/") {
515
- let p = d.replace(/^\//, "").split("/");
516
- v = "/" + y.replace(/^\//, "").split("/").slice(p.length).join("/");
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 g = ge(e, { pathname: v });
519
- return T(
520
- c || g != null,
521
- `No routes matched location "${m.pathname}${m.search}${m.hash}" `
522
- ), T(
523
- 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,
524
- `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.`
525
- ), St(
526
- g && g.map(
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({}, u, p.params),
529
- pathname: D([
530
- d,
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
- a.encodeLocation ? a.encodeLocation(
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 === "/" ? d : D([
540
- d,
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
- a.encodeLocation ? a.encodeLocation(
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
- l,
552
- n,
553
- r,
554
- i
557
+ a,
558
+ n
555
559
  );
556
560
  }
557
561
  function Ct() {
558
- let e = Dt(), 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)", i = { padding: "0.5rem", backgroundColor: r }, a = { padding: "2px 4px", backgroundColor: r }, l = null;
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: a }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ o.createElement("code", { style: a }, "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: i }, n) : null, l);
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), Oe = class extends o.Component {
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(N.Provider, { value: this.props.routeContext }, /* @__PURE__ */ o.createElement(
599
- re.Provider,
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(Pt, { error: e }, t) : t;
609
+ return this.context ? /* @__PURE__ */ o.createElement(St, { error: e }, t) : t;
606
610
  }
607
611
  };
608
- Oe.contextType = Le;
609
- var Z = /* @__PURE__ */ new WeakMap();
610
- function Pt({
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(S);
618
+ let { basename: n } = o.useContext(T);
615
619
  if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
616
- let r = gt(t.digest);
620
+ let r = vt(t.digest);
617
621
  if (r) {
618
- let i = Z.get(t);
619
- if (i) throw i;
620
- let a = be(r.location, n);
621
- if (Ce && !Z.get(t))
622
- if (a.isExternal || r.reloadDocument)
623
- window.location.href = a.absoluteURL || a.to;
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(a.to, {
630
+ () => window.__reactRouterDataRouter.navigate(i.to, {
627
631
  replace: r.replace
628
632
  })
629
633
  );
630
- throw Z.set(t, l), l;
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=${a.absoluteURL || a.to}`
640
+ content: `0;url=${i.absoluteURL || i.to}`
637
641
  }
638
642
  );
639
643
  }
640
644
  }
641
645
  return e;
642
646
  }
643
- function Lt({ routeContext: e, match: t, children: n }) {
644
- let r = o.useContext(F);
645
- return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ o.createElement(N.Provider, { value: e }, n);
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 St(e, t = [], n = null, r = null, i = null) {
651
+ function Lt(e, t = [], n) {
652
+ let r = n == null ? void 0 : n.state;
648
653
  if (e == null) {
649
- if (!n)
654
+ if (!r)
650
655
  return null;
651
- if (n.errors)
652
- e = n.matches;
653
- else if (t.length === 0 && !n.initialized && n.matches.length > 0)
654
- e = n.matches;
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, l = n == null ? void 0 : n.errors;
659
- if (l != null) {
660
- let d = a.findIndex(
661
- (c) => c.route.id && (l == null ? void 0 : l[c.route.id]) !== void 0
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
- d >= 0,
669
+ f >= 0,
665
670
  `Could not find a matching route for errors on route IDs: ${Object.keys(
666
- l
671
+ i
667
672
  ).join(",")}`
668
673
  ), a = a.slice(
669
674
  0,
670
- Math.min(a.length, d + 1)
675
+ Math.min(a.length, f + 1)
671
676
  );
672
677
  }
673
- let s = !1, u = -1;
674
- if (n)
675
- for (let d = 0; d < a.length; d++) {
676
- let c = a[d];
677
- if ((c.route.HydrateFallback || c.route.hydrateFallbackElement) && (u = d), c.route.id) {
678
- let { loaderData: h, errors: m } = n, y = c.route.loader && !h.hasOwnProperty(c.route.id) && (!m || m[c.route.id] === void 0);
679
- if (c.route.lazy || y) {
680
- s = !0, u >= 0 ? a = a.slice(0, u + 1) : a = [a[0]];
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
- let f = n && r ? (d, c) => {
691
+ }
692
+ let c = n == null ? void 0 : n.onError, d = r && c ? (f, s) => {
686
693
  var h, m;
687
- r(d, {
688
- location: n.location,
689
- params: ((m = (h = n.matches) == null ? void 0 : h[0]) == null ? void 0 : m.params) ?? {},
690
- unstable_pattern: xe(n.matches),
691
- errorInfo: c
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
- (d, c, h) => {
696
- let m, y = !1, v = null, g = null;
697
- n && (m = l && c.route.id ? l[c.route.id] : void 0, v = c.route.errorElement || bt, s && (u < 0 && h === 0 ? (De(
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
- ), y = !0, g = null) : u === h && (y = !0, g = c.route.hydrateFallbackElement || null)));
702
- let R = t.concat(a.slice(0, h + 1)), p = () => {
703
- let w;
704
- return m ? w = v : y ? w = g : c.route.Component ? w = /* @__PURE__ */ o.createElement(c.route.Component, null) : c.route.element ? w = c.route.element : w = d, /* @__PURE__ */ o.createElement(
705
- Lt,
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: c,
714
+ match: s,
708
715
  routeContext: {
709
- outlet: d,
710
- matches: R,
711
- isDataRoute: n != null
716
+ outlet: f,
717
+ matches: y,
718
+ isDataRoute: r != null
712
719
  },
713
- children: w
720
+ children: R
714
721
  }
715
722
  );
716
723
  };
717
- return n && (c.route.ErrorBoundary || c.route.errorElement || h === 0) ? /* @__PURE__ */ o.createElement(
718
- Oe,
724
+ return r && (s.route.ErrorBoundary || s.route.errorElement || h === 0) ? /* @__PURE__ */ o.createElement(
725
+ De,
719
726
  {
720
- location: n.location,
721
- revalidation: n.revalidation,
722
- component: v,
727
+ location: r.location,
728
+ revalidation: r.revalidation,
729
+ component: g,
723
730
  error: m,
724
- children: p(),
725
- routeContext: { outlet: null, matches: R, isDataRoute: !0 },
726
- onError: f
731
+ children: w(),
732
+ routeContext: { outlet: null, matches: y, isDataRoute: !0 },
733
+ onError: d
727
734
  }
728
- ) : p();
735
+ ) : w();
729
736
  },
730
737
  null
731
738
  );
732
739
  }
733
- function ae(e) {
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(F);
738
- return C(t, ae(e)), 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(B);
742
- return C(t, ae(e)), 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(N);
746
- return C(t, ae(e)), t;
752
+ let t = o.useContext(O);
753
+ return C(t, oe(e)), t;
747
754
  }
748
- function ie(e) {
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 Ot() {
756
- return ie(
762
+ function Dt() {
763
+ return le(
757
764
  "useRouteId"
758
765
  /* UseRouteId */
759
766
  );
760
767
  }
761
- function Dt() {
768
+ function Mt() {
762
769
  var r;
763
- let e = o.useContext(re), t = kt(
770
+ let e = o.useContext(ie), t = kt(
764
771
  "useRouteError"
765
772
  /* UseRouteError */
766
- ), n = ie(
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 Mt() {
779
+ function Nt() {
773
780
  let { router: e } = $t(
774
781
  "useNavigate"
775
782
  /* UseNavigateStable */
776
- ), t = ie(
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 (i, a = {}) => {
784
- T(n.current, ke), n.current && (typeof i == "number" ? await e.navigate(i) : await e.navigate(i, { fromRouteId: t, ...a }));
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 he(e, t) {
795
- !e && !de[t] && (de[t] = !0, console.warn(t));
797
+ function Me(e, t, n) {
798
+ !t && !de[e] && (de[e] = !0, I(!1, n));
796
799
  }
797
- var Nt = "useOptimistic", me = o[Nt], It = () => {
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 Ft(e) {
800
- return me ? me(e) : [e, It];
806
+ function Ot(e) {
807
+ return pe ? pe(e) : [e, Ft];
801
808
  }
802
- var _t = class {
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 At({
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 [a, l] = o.useState(e.state), [s, u] = Ft(a), [f, d] = o.useState(), [c, h] = o.useState({
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, y] = o.useState(), [v, g] = o.useState(), [R, p] = o.useState(), w = o.useRef(/* @__PURE__ */ new Map()), $ = o.useCallback(
823
- (E, { deletedFetchers: P, newErrors: x, flushSync: U, viewTransitionOpts: I }) => {
824
- x && n && Object.values(x).forEach(
825
- (k) => {
826
- var V;
827
- return n(k, {
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: ((V = E.matches[0]) == null ? void 0 : V.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((k, V) => {
834
- k.data !== void 0 && w.current.set(V, k.data);
835
- }), P.forEach((k) => w.current.delete(k)), he(
836
- U === !1 || t != null,
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 se = e.window != null && e.window.document != null && typeof e.window.document.startViewTransition == "function";
840
- if (he(
841
- I == null || se,
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
- ), !I || !se) {
844
- t && U ? t(() => l(E)) : r === !1 ? l(E) : o.startTransition(() => {
845
- r === !0 && u((k) => pe(k, E)), l(E);
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 && U) {
856
+ if (t && _) {
850
857
  t(() => {
851
- v && (m == null || m.resolve(), v.skipTransition()), h({
858
+ g && (m == null || m.resolve(), g.skipTransition()), h({
852
859
  isTransitioning: !0,
853
860
  flushSync: !0,
854
- currentLocation: I.currentLocation,
855
- nextLocation: I.nextLocation
861
+ currentLocation: M.currentLocation,
862
+ nextLocation: M.nextLocation
856
863
  });
857
864
  });
858
- let k = e.window.document.startViewTransition(() => {
865
+ let P = e.window.document.startViewTransition(() => {
859
866
  t(() => l(E));
860
867
  });
861
- k.finished.finally(() => {
868
+ P.finished.finally(() => {
862
869
  t(() => {
863
- y(void 0), g(void 0), d(void 0), h({ isTransitioning: !1 });
870
+ v(void 0), p(void 0), f(void 0), h({ isTransitioning: !1 });
864
871
  });
865
- }), t(() => g(k));
872
+ }), t(() => p(P));
866
873
  return;
867
874
  }
868
- v ? (m == null || m.resolve(), v.skipTransition(), p({
875
+ g ? (m == null || m.resolve(), g.skipTransition(), w({
869
876
  state: E,
870
- currentLocation: I.currentLocation,
871
- nextLocation: I.nextLocation
872
- })) : (d(E), h({
877
+ currentLocation: M.currentLocation,
878
+ nextLocation: M.nextLocation
879
+ })) : (f(E), h({
873
880
  isTransitioning: !0,
874
881
  flushSync: !1,
875
- currentLocation: I.currentLocation,
876
- nextLocation: I.nextLocation
882
+ currentLocation: M.currentLocation,
883
+ nextLocation: M.nextLocation
877
884
  }));
878
885
  },
879
886
  [
880
887
  e.window,
881
888
  t,
882
- v,
889
+ g,
883
890
  m,
884
891
  r,
885
- u,
892
+ c,
886
893
  n
887
894
  ]
888
895
  );
889
- o.useLayoutEffect(() => e.subscribe($), [e, $]), o.useEffect(() => {
890
- c.isTransitioning && !c.flushSync && y(new _t());
891
- }, [c]), o.useEffect(() => {
892
- if (m && f && e.window) {
893
- let E = f, P = m.promise, x = e.window.document.startViewTransition(async () => {
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 && u((U) => pe(U, E)), l(E);
896
- }), await P;
902
+ r === !0 && c((_) => ge(_, E)), l(E);
903
+ }), await $;
897
904
  });
898
- x.finished.finally(() => {
899
- y(void 0), g(void 0), d(void 0), h({ isTransitioning: !1 });
900
- }), g(x);
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
- f,
910
+ d,
904
911
  m,
905
912
  e.window,
906
913
  r,
907
- u
914
+ c
908
915
  ]), o.useEffect(() => {
909
- m && f && s.location.key === f.location.key && m.resolve();
910
- }, [m, v, s.location, f]), o.useEffect(() => {
911
- !c.isTransitioning && R && (d(R.state), h({
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: R.currentLocation,
915
- nextLocation: R.nextLocation
916
- }), p(void 0));
917
- }, [c.isTransitioning, R]);
918
- let b = o.useMemo(() => ({
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, P, x) => e.navigate(E, {
923
- state: P,
924
- preventScrollReset: x == null ? void 0 : x.preventScrollReset
929
+ push: (E, $, b) => e.navigate(E, {
930
+ state: $,
931
+ preventScrollReset: b == null ? void 0 : b.preventScrollReset
925
932
  }),
926
- replace: (E, P, x) => e.navigate(E, {
933
+ replace: (E, $, b) => e.navigate(E, {
927
934
  replace: !0,
928
- state: P,
929
- preventScrollReset: x == null ? void 0 : x.preventScrollReset
935
+ state: $,
936
+ preventScrollReset: b == null ? void 0 : b.preventScrollReset
930
937
  })
931
- }), [e]), L = e.basename || "/", O = o.useMemo(
938
+ }), [e]), S = e.basename || "/", D = o.useMemo(
932
939
  () => ({
933
940
  router: e,
934
- navigator: b,
941
+ navigator: x,
935
942
  static: !1,
936
- basename: L,
943
+ basename: S,
937
944
  onError: n
938
945
  }),
939
- [e, b, L, n]
946
+ [e, x, S, n]
940
947
  );
941
- return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(F.Provider, { value: O }, /* @__PURE__ */ o.createElement(B.Provider, { value: s }, /* @__PURE__ */ o.createElement(Se.Provider, { value: w.current }, /* @__PURE__ */ o.createElement(ne.Provider, { value: c }, /* @__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: L,
945
- location: s.location,
946
- navigationType: s.historyAction,
947
- navigator: b,
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: s,
962
+ state: u,
963
+ isStatic: !1,
956
964
  onError: n
957
965
  }
958
966
  )
959
967
  ))))), null);
960
968
  }
961
- function pe(e, t) {
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
- onError: r
988
+ isStatic: r,
989
+ onError: a
981
990
  }) {
982
- return xt(e, void 0, n, r, t);
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: i,
990
- static: a = !1,
998
+ navigator: a,
999
+ static: i = !1,
991
1000
  unstable_useTransitions: l
992
1001
  }) {
993
1002
  C(
994
- !H(),
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 s = e.replace(/^\/*/, "/"), u = o.useMemo(
1006
+ let u = e.replace(/^\/*/, "/"), c = o.useMemo(
998
1007
  () => ({
999
- basename: s,
1000
- navigator: i,
1001
- static: a,
1008
+ basename: u,
1009
+ navigator: a,
1010
+ static: i,
1002
1011
  unstable_useTransitions: l,
1003
1012
  future: {}
1004
1013
  }),
1005
- [s, i, a, l]
1014
+ [u, a, i, l]
1006
1015
  );
1007
- typeof n == "string" && (n = G(n));
1016
+ typeof n == "string" && (n = q(n));
1008
1017
  let {
1009
- pathname: f = "/",
1010
- search: d = "",
1011
- hash: c = "",
1018
+ pathname: d = "/",
1019
+ search: f = "",
1020
+ hash: s = "",
1012
1021
  state: h = null,
1013
- key: m = "default"
1014
- } = n, y = o.useMemo(() => {
1015
- let v = M(f, s);
1016
- return v == null ? null : {
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: v,
1019
- search: d,
1020
- hash: c,
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
- }, [s, f, d, c, h, m, r]);
1027
- return T(
1028
- y != null,
1029
- `<Router basename="${s}"> is not able to match the URL "${f}${d}${c}" because it does not start with the basename, so the <Router> won't render anything.`
1030
- ), y == null ? null : /* @__PURE__ */ o.createElement(S.Provider, { value: u }, /* @__PURE__ */ o.createElement(q.Provider, { children: t, value: y }));
1031
- }
1032
- var J = "get", Y = "application/x-www-form-urlencoded";
1033
- function X(e) {
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 X(e) && e.tagName.toLowerCase() === "button";
1057
+ return Q(e) && e.tagName.toLowerCase() === "button";
1038
1058
  }
1039
1059
  function jt(e) {
1040
- return X(e) && e.tagName.toLowerCase() === "form";
1060
+ return Q(e) && e.tagName.toLowerCase() === "form";
1041
1061
  }
1042
1062
  function Vt(e) {
1043
- return X(e) && e.tagName.toLowerCase() === "input";
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 z = null;
1073
+ var J = null;
1054
1074
  function Yt() {
1055
- if (z === null)
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
- ), z = !1;
1081
+ ), J = !1;
1062
1082
  } catch {
1063
- z = !0;
1083
+ J = !0;
1064
1084
  }
1065
- return z;
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 ee(e) {
1073
- return e != null && !Kt.has(e) ? (T(
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 "${Y}"`
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, i, a, l;
1099
+ let n, r, a, i, l;
1080
1100
  if (jt(e)) {
1081
- let s = e.getAttribute("action");
1082
- r = s ? M(s, t) : null, n = e.getAttribute("method") || J, i = ee(e.getAttribute("enctype")) || Y, a = new FormData(e);
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 s = e.form;
1085
- if (s == null)
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 u = e.getAttribute("formaction") || s.getAttribute("action");
1090
- if (r = u ? M(u, t) : null, n = e.getAttribute("formmethod") || s.getAttribute("method") || J, i = ee(e.getAttribute("formenctype")) || ee(s.getAttribute("enctype")) || Y, a = new FormData(s, e), !Yt()) {
1091
- let { name: f, type: d, value: c } = e;
1092
- if (d === "image") {
1093
- let h = f ? `${f}.` : "";
1094
- a.append(`${h}x`, "0"), a.append(`${h}y`, "0");
1095
- } else f && a.append(f, c);
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 (X(e))
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 = J, r = null, i = Y, l = e;
1122
+ n = Y, r = null, a = K, l = e;
1103
1123
  }
1104
- return a && i === "text/plain" && (l = a, a = void 0), { action: r, method: n.toLowerCase(), encType: i, formData: a, body: l };
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 oe(e, t) {
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 i = typeof e == "string" ? new URL(
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 ? i.pathname.endsWith("/") ? i.pathname = `${i.pathname}_.${r}` : i.pathname = `${i.pathname}.${r}` : i.pathname === "/" ? i.pathname = `_root.${r}` : t && M(i.pathname, t) === "/" ? i.pathname = `${t.replace(/\/$/, "")}/_root.${r}` : i.pathname = `${i.pathname.replace(/\/$/, "")}.${r}`, i;
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 (i) => {
1143
- let a = t.routes[i.route.id];
1144
- if (a) {
1145
- let l = await Xt(a, n);
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((i) => i.rel === "stylesheet" || i.rel === "preload").map(
1153
- (i) => i.rel === "stylesheet" ? { ...i, rel: "prefetch", as: "style" } : { ...i, rel: "prefetch" }
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, i, a) {
1158
- let l = (u, f) => n[f] ? u.route.id !== n[f].route.id : !0, s = (u, f) => {
1159
- var d;
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[f].pathname !== u.pathname || // splat param changed, which is not present in match.path
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
- ((d = n[f].route.path) == null ? void 0 : d.endsWith("*")) && n[f].params["*"] !== u.params["*"]
1184
+ ((f = n[d].route.path) == null ? void 0 : f.endsWith("*")) && n[d].params["*"] !== c.params["*"]
1165
1185
  );
1166
1186
  };
1167
- return a === "assets" ? t.filter(
1168
- (u, f) => l(u, f) || s(u, f)
1169
- ) : a === "data" ? t.filter((u, f) => {
1170
- var c;
1171
- let d = r.routes[u.route.id];
1172
- if (!d || !d.hasLoader)
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(u, f) || s(u, f))
1194
+ if (l(c, d) || u(c, d))
1175
1195
  return !0;
1176
- if (u.route.shouldRevalidate) {
1177
- let h = u.route.shouldRevalidate({
1196
+ if (c.route.shouldRevalidate) {
1197
+ let h = c.route.shouldRevalidate({
1178
1198
  currentUrl: new URL(
1179
- i.pathname + i.search + i.hash,
1199
+ a.pathname + a.search + a.hash,
1180
1200
  window.origin
1181
1201
  ),
1182
- currentParams: ((c = n[0]) == null ? void 0 : c.params) || {},
1202
+ currentParams: ((s = n[0]) == null ? void 0 : s.params) || {},
1183
1203
  nextUrl: new URL(e, window.origin),
1184
- nextParams: u.params,
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 i = t.routes[r.route.id];
1197
- if (!i) return [];
1198
- let a = [i.module];
1199
- return i.clientActionModule && (a = a.concat(i.clientActionModule)), i.clientLoaderModule && (a = a.concat(i.clientLoaderModule)), n && i.hydrateFallbackModule && (a = a.concat(i.hydrateFallbackModule)), i.imports && (a = a.concat(i.imports)), a;
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, i) => {
1215
- let a = JSON.stringify(nn(i));
1216
- return n.has(a) || (n.add(a), r.push({ key: a, link: i })), r;
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 Me() {
1220
- let e = o.useContext(F);
1221
- return oe(
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(B);
1228
- return oe(
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 le = o.createContext(void 0);
1234
- le.displayName = "FrameworkContext";
1235
- function Ne() {
1236
- let e = o.useContext(le);
1237
- return oe(
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(le), [r, i] = o.useState(!1), [a, l] = o.useState(!1), { onFocus: s, onBlur: u, onMouseEnter: f, onMouseLeave: d, onTouchStart: c } = t, h = o.useRef(null);
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 v = (R) => {
1247
- R.forEach((p) => {
1248
- l(p.isIntersecting);
1266
+ let g = (y) => {
1267
+ y.forEach((w) => {
1268
+ l(w.isIntersecting);
1249
1269
  });
1250
- }, g = new IntersectionObserver(v, { threshold: 0.5 });
1251
- return h.current && g.observe(h.current), () => {
1252
- g.disconnect();
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 v = setTimeout(() => {
1277
+ let g = setTimeout(() => {
1258
1278
  l(!0);
1259
1279
  }, 100);
1260
1280
  return () => {
1261
- clearTimeout(v);
1281
+ clearTimeout(g);
1262
1282
  };
1263
1283
  }
1264
1284
  }, [r]);
1265
1285
  let m = () => {
1266
- i(!0);
1267
- }, y = () => {
1268
- i(!1), l(!1);
1286
+ a(!0);
1287
+ }, v = () => {
1288
+ a(!1), l(!1);
1269
1289
  };
1270
- return n ? e !== "intent" ? [a, h, {}] : [
1271
- a,
1290
+ return n ? e !== "intent" ? [i, h, {}] : [
1291
+ i,
1272
1292
  h,
1273
1293
  {
1274
- onFocus: W(s, m),
1275
- onBlur: W(u, y),
1276
- onMouseEnter: W(f, m),
1277
- onMouseLeave: W(d, y),
1278
- onTouchStart: W(c, m)
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 W(e, t) {
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 } = Me(), r = o.useMemo(
1289
- () => ge(n.routes, e, n.basename),
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 } = Ne(), [r, i] = o.useState([]);
1315
+ let { manifest: t, routeModules: n } = Ie(), [r, a] = o.useState([]);
1296
1316
  return o.useEffect(() => {
1297
- let a = !1;
1317
+ let i = !1;
1298
1318
  return Zt(e, t, n).then(
1299
1319
  (l) => {
1300
- a || i(l);
1320
+ i || a(l);
1301
1321
  }
1302
1322
  ), () => {
1303
- a = !0;
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 = _(), { future: i, manifest: a, routeModules: l } = Ne(), { basename: s } = Me(), { loaderData: u, matches: f } = an(), d = o.useMemo(
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
- f,
1317
- a,
1336
+ d,
1337
+ i,
1318
1338
  r,
1319
1339
  "data"
1320
1340
  ),
1321
- [e, t, f, a, r]
1322
- ), c = o.useMemo(
1341
+ [e, t, d, i, r]
1342
+ ), s = o.useMemo(
1323
1343
  () => ve(
1324
1344
  e,
1325
1345
  t,
1326
- f,
1327
- a,
1346
+ d,
1347
+ i,
1328
1348
  r,
1329
1349
  "assets"
1330
1350
  ),
1331
- [e, t, f, a, r]
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 v = /* @__PURE__ */ new Set(), g = !1;
1336
- if (t.forEach((p) => {
1337
- var $;
1338
- let w = a.routes[p.route.id];
1339
- !w || !w.hasLoader || (!d.some((b) => b.route.id === p.route.id) && p.route.id in u && (($ = l[p.route.id]) != null && $.shouldRevalidate) || w.hasClientLoader ? g = !0 : v.add(p.route.id));
1340
- }), v.size === 0)
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 R = qt(
1362
+ let y = qt(
1343
1363
  e,
1344
- s,
1345
- i.unstable_trailingSlashAwareDataRequests,
1364
+ u,
1365
+ a.unstable_trailingSlashAwareDataRequests,
1346
1366
  "data"
1347
1367
  );
1348
- return g && v.size > 0 && R.searchParams.set(
1368
+ return p && g.size > 0 && y.searchParams.set(
1349
1369
  "_routes",
1350
- t.filter((p) => v.has(p.route.id)).map((p) => p.route.id).join(",")
1351
- ), [R.pathname + R.search];
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
- a,
1358
- d,
1377
+ i,
1378
+ f,
1359
1379
  t,
1360
1380
  e,
1361
1381
  l
1362
1382
  ]), m = o.useMemo(
1363
- () => en(c, a),
1364
- [c, a]
1365
- ), y = sn(c);
1366
- return /* @__PURE__ */ o.createElement(o.Fragment, null, h.map((v) => /* @__PURE__ */ o.createElement("link", { key: v, rel: "prefetch", as: "fetch", href: v, ...n })), m.map((v) => /* @__PURE__ */ o.createElement("link", { key: v, rel: "modulepreload", href: v, ...n })), y.map(({ key: v, link: g }) => (
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: v,
1392
+ key: g,
1373
1393
  nonce: n.nonce,
1374
- ...g,
1375
- crossOrigin: g.crossOrigin ?? n.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.0");
1410
+ "7.13.2");
1391
1411
  } catch {
1392
1412
  }
1393
- var Ie = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Fe = o.forwardRef(
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: i,
1399
- reloadDocument: a,
1418
+ relative: a,
1419
+ reloadDocument: i,
1400
1420
  replace: l,
1401
- state: s,
1402
- target: u,
1421
+ unstable_mask: u,
1422
+ state: c,
1423
+ target: d,
1403
1424
  to: f,
1404
- preventScrollReset: d,
1405
- viewTransition: c,
1406
- unstable_defaultShouldRevalidate: h,
1407
- ...m
1408
- }, y) {
1409
- let { basename: v, unstable_useTransitions: g } = o.useContext(S), R = typeof f == "string" && Ie.test(f), p = be(f, v);
1410
- f = p.to;
1411
- let w = Rt(f, { relative: i }), [$, b, L] = on(
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
- m
1414
- ), O = pn(f, {
1444
+ v
1445
+ ), _ = pn(f, {
1415
1446
  replace: l,
1416
- state: s,
1417
- target: u,
1418
- preventScrollReset: d,
1419
- relative: i,
1420
- viewTransition: c,
1421
- unstable_defaultShouldRevalidate: h,
1422
- unstable_useTransitions: g
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 E(x) {
1425
- t && t(x), x.defaultPrevented || O(x);
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
- ...m,
1433
- ...L,
1434
- href: p.absoluteURL || w,
1435
- onClick: p.isExternal || a ? t : E,
1436
- ref: cn(y, b),
1437
- target: u,
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 $ && !R ? /* @__PURE__ */ o.createElement(o.Fragment, null, P, /* @__PURE__ */ o.createElement(ln, { page: w })) : P;
1474
+ return E && !R ? /* @__PURE__ */ o.createElement(o.Fragment, null, P, /* @__PURE__ */ o.createElement(ln, { page: x })) : P;
1443
1475
  }
1444
1476
  );
1445
- Fe.displayName = "Link";
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: i = !1,
1452
- style: a,
1483
+ end: a = !1,
1484
+ style: i,
1453
1485
  to: l,
1454
- viewTransition: s,
1455
- children: u,
1456
- ...f
1457
- }, d) {
1458
- let c = j(l, { relative: f.relative }), h = _(), m = o.useContext(B), { navigator: y, basename: v } = o.useContext(S), g = m != null && // Conditional usage is OK here because the usage of a data router is static
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
- wn(c) && s === !0, R = y.encodeLocation ? y.encodeLocation(c).pathname : c.pathname, p = h.pathname, w = m && m.navigation && m.navigation.location ? m.navigation.location.pathname : null;
1461
- n || (p = p.toLowerCase(), w = w ? w.toLowerCase() : null, R = R.toLowerCase()), w && v && (w = M(w, v) || w);
1462
- const $ = R !== "/" && R.endsWith("/") ? R.length - 1 : R.length;
1463
- let b = p === R || !i && p.startsWith(R) && p.charAt($) === "/", L = w != null && (w === R || !i && w.startsWith(R) && w.charAt(R.length) === "/"), O = {
1464
- isActive: b,
1465
- isPending: L,
1466
- isTransitioning: g
1467
- }, E = b ? t : void 0, P;
1468
- typeof r == "function" ? P = r(O) : P = [
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
- b ? "active" : null,
1471
- L ? "pending" : null,
1472
- g ? "transitioning" : null
1502
+ x ? "active" : null,
1503
+ S ? "pending" : null,
1504
+ p ? "transitioning" : null
1473
1505
  ].filter(Boolean).join(" ");
1474
- let x = typeof a == "function" ? a(O) : a;
1506
+ let b = typeof i == "function" ? i(D) : i;
1475
1507
  return /* @__PURE__ */ o.createElement(
1476
- Fe,
1508
+ Oe,
1477
1509
  {
1478
- ...f,
1510
+ ...d,
1479
1511
  "aria-current": E,
1480
- className: P,
1481
- ref: d,
1482
- style: x,
1512
+ className: $,
1513
+ ref: f,
1514
+ style: b,
1483
1515
  to: l,
1484
- viewTransition: s
1516
+ viewTransition: u
1485
1517
  },
1486
- typeof u == "function" ? u(O) : u
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: i,
1498
- state: a,
1499
- method: l = J,
1500
- action: s,
1501
- onSubmit: u,
1502
- relative: f,
1503
- preventScrollReset: d,
1504
- viewTransition: c,
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
- }, y) => {
1508
- let { unstable_useTransitions: v } = o.useContext(S), g = yn(), R = Rn(s, { relative: f }), p = l.toLowerCase() === "get" ? "get" : "post", w = typeof s == "string" && Ie.test(s), $ = (b) => {
1509
- if (u && u(b), b.defaultPrevented) return;
1510
- b.preventDefault();
1511
- let L = b.nativeEvent.submitter, O = (L == null ? void 0 : L.getAttribute("formmethod")) || l, E = () => g(L || b.currentTarget, {
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: O,
1545
+ method: D,
1514
1546
  navigate: n,
1515
- replace: i,
1516
- state: a,
1517
- relative: f,
1518
- preventScrollReset: d,
1519
- viewTransition: c,
1547
+ replace: a,
1548
+ state: i,
1549
+ relative: d,
1550
+ preventScrollReset: f,
1551
+ viewTransition: s,
1520
1552
  unstable_defaultShouldRevalidate: h
1521
1553
  });
1522
- v && n !== !1 ? o.startTransition(() => E()) : E();
1554
+ g && n !== !1 ? o.startTransition(() => E()) : E();
1523
1555
  };
1524
1556
  return /* @__PURE__ */ o.createElement(
1525
1557
  "form",
1526
1558
  {
1527
- ref: y,
1528
- method: p,
1529
- action: R,
1530
- onSubmit: r ? u : $,
1559
+ ref: v,
1560
+ method: w,
1561
+ action: y,
1562
+ onSubmit: r ? c : L,
1531
1563
  ...m,
1532
- "data-discover": !w && e === "render" ? "true" : void 0
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 _e(e) {
1542
- let t = o.useContext(F);
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
- state: r,
1580
+ unstable_mask: r,
1581
+ state: a,
1549
1582
  preventScrollReset: i,
1550
- relative: a,
1551
- viewTransition: l,
1552
- unstable_defaultShouldRevalidate: s,
1553
- unstable_useTransitions: u
1583
+ relative: l,
1584
+ viewTransition: u,
1585
+ unstable_defaultShouldRevalidate: c,
1586
+ unstable_useTransitions: d
1554
1587
  } = {}) {
1555
- let f = wt(), d = _(), c = j(e, { relative: a });
1588
+ let f = Et(), s = A(), h = z(e, { relative: l });
1556
1589
  return o.useCallback(
1557
- (h) => {
1558
- if (Jt(h, t)) {
1559
- h.preventDefault();
1560
- let m = n !== void 0 ? n : te(d) === te(c), y = () => f(e, {
1561
- replace: m,
1562
- state: r,
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: a,
1565
- viewTransition: l,
1566
- unstable_defaultShouldRevalidate: s
1598
+ relative: l,
1599
+ viewTransition: u,
1600
+ unstable_defaultShouldRevalidate: c
1567
1601
  });
1568
- u ? o.startTransition(() => y()) : y();
1602
+ d ? o.startTransition(() => g()) : g();
1569
1603
  }
1570
1604
  },
1571
1605
  [
1572
- d,
1606
+ s,
1573
1607
  f,
1574
- c,
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
- s,
1583
- u
1616
+ u,
1617
+ c,
1618
+ d
1584
1619
  ]
1585
1620
  );
1586
1621
  }
1587
- var vn = 0, gn = () => `__${String(++vn)}__`;
1622
+ var gn = 0, vn = () => `__${String(++gn)}__`;
1588
1623
  function yn() {
1589
- let { router: e } = _e(
1624
+ let { router: e } = Ae(
1590
1625
  "useSubmit"
1591
1626
  /* UseSubmit */
1592
- ), { basename: t } = o.useContext(S), n = Ot(), r = e.fetch, i = e.navigate;
1627
+ ), { basename: t } = o.useContext(T), n = Dt(), r = e.fetch, a = e.navigate;
1593
1628
  return o.useCallback(
1594
- async (a, l = {}) => {
1595
- let { action: s, method: u, encType: f, formData: d, body: c } = Gt(
1596
- a,
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 || gn();
1601
- await r(h, n, l.action || s, {
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: d,
1605
- body: c,
1606
- formMethod: l.method || u,
1607
- formEncType: l.encType || f,
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 i(l.action || s, {
1646
+ await a(l.action || u, {
1612
1647
  unstable_defaultShouldRevalidate: l.unstable_defaultShouldRevalidate,
1613
1648
  preventScrollReset: l.preventScrollReset,
1614
- formData: d,
1615
- body: c,
1616
- formMethod: l.method || u,
1617
- formEncType: l.encType || f,
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, i, t, n]
1660
+ [r, a, t, n]
1626
1661
  );
1627
1662
  }
1628
1663
  function Rn(e, { relative: t } = {}) {
1629
- let { basename: n } = o.useContext(S), r = o.useContext(N);
1664
+ let { basename: n } = o.useContext(T), r = o.useContext(O);
1630
1665
  C(r, "useFormAction must be used inside a RouteContext");
1631
- let [i] = r.matches.slice(-1), a = { ...j(e || ".", { relative: t }) }, l = _();
1666
+ let [a] = r.matches.slice(-1), i = { ...z(e || ".", { relative: t }) }, l = A();
1632
1667
  if (e == null) {
1633
- a.search = l.search;
1634
- let s = new URLSearchParams(a.search), u = s.getAll("index");
1635
- if (u.some((d) => d === "")) {
1636
- s.delete("index"), u.filter((c) => c).forEach((c) => s.append("index", c));
1637
- let d = s.toString();
1638
- a.search = d ? `?${d}` : "";
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 === ".") && i.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (a.pathname = a.pathname === "/" ? n : D([n, a.pathname])), te(a);
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 wn(e, { relative: t } = {}) {
1644
- let n = o.useContext(ne);
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 } = _e(
1684
+ let { basename: r } = Ae(
1650
1685
  "useViewTransitionState"
1651
1686
  /* useViewTransitionState */
1652
- ), i = j(e, { relative: t });
1687
+ ), a = z(e, { relative: t });
1653
1688
  if (!n.isTransitioning)
1654
1689
  return !1;
1655
- let a = M(n.currentLocation.pathname, r) || n.currentLocation.pathname, l = M(n.nextLocation.pathname, r) || n.nextLocation.pathname;
1656
- return K(i.pathname, l) != null || K(i.pathname, a) != null;
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.0
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 En(e) {
1669
- return /* @__PURE__ */ o.createElement(At, { flushSync: He.flushSync, ...e });
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__ */ A(Ue, { injectFirst: !0, children: /* @__PURE__ */ A(Ae, { theme: e, children: /* @__PURE__ */ A(Ve, { store: t, children: /* @__PURE__ */ A(
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__ */ A(
1710
+ fallback: /* @__PURE__ */ W(
1676
1711
  je,
1677
1712
  {
1678
1713
  loading: !0,
1679
1714
  message: "..."
1680
1715
  }
1681
1716
  ),
1682
- children: /* @__PURE__ */ A(En, { router: n })
1717
+ children: /* @__PURE__ */ W(wn, { router: n })
1683
1718
  }
1684
1719
  ) }) }) });
1685
1720
  }