@genai-fi/base 4.0.2 → 4.0.3

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