@eliseubatista99/react-scaffold-core 0.1.0

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 (56) hide show
  1. package/README.md +21 -0
  2. package/dist/components/drawer/drawer.d.ts +15 -0
  3. package/dist/components/drawer/drawer.hook.d.ts +12 -0
  4. package/dist/components/drawer/index.d.ts +1 -0
  5. package/dist/components/drawer/stories/drawer.stories.d.ts +20 -0
  6. package/dist/components/drawer/stories/setup.d.ts +2 -0
  7. package/dist/components/index.d.ts +4 -0
  8. package/dist/components/modal/index.d.ts +1 -0
  9. package/dist/components/modal/modal.d.ts +9 -0
  10. package/dist/components/modal/stories/modal.stories.d.ts +16 -0
  11. package/dist/components/modal/stories/setup.d.ts +2 -0
  12. package/dist/components/toast/index.d.ts +1 -0
  13. package/dist/components/toast/stories/setup.d.ts +2 -0
  14. package/dist/components/toast/stories/toast.stories.d.ts +17 -0
  15. package/dist/components/toast/toast.d.ts +8 -0
  16. package/dist/components/typography/index.d.ts +1 -0
  17. package/dist/components/typography/stories/typography.stories.d.ts +21 -0
  18. package/dist/components/typography/typography.d.ts +7 -0
  19. package/dist/helpers/index.d.ts +2 -0
  20. package/dist/helpers/scrollHelper/index.d.ts +1 -0
  21. package/dist/helpers/scrollHelper/scrollHelper.d.ts +5 -0
  22. package/dist/helpers/scrollHelper/stories/scrollHelper.stories.d.ts +13 -0
  23. package/dist/helpers/scrollHelper/stories/setup.d.ts +1 -0
  24. package/dist/helpers/text/index.d.ts +1 -0
  25. package/dist/helpers/text/stories/setup.d.ts +5 -0
  26. package/dist/helpers/text/stories/textHelper.stories.d.ts +16 -0
  27. package/dist/helpers/text/textHelper.d.ts +4 -0
  28. package/dist/hooks/index.d.ts +3 -0
  29. package/dist/hooks/useDidMount/index.d.ts +1 -0
  30. package/dist/hooks/useDidMount/useDidMount.d.ts +1 -0
  31. package/dist/hooks/useFetch/index.d.ts +1 -0
  32. package/dist/hooks/useFetch/stories/setup.d.ts +5 -0
  33. package/dist/hooks/useFetch/stories/useFetch.stories.d.ts +16 -0
  34. package/dist/hooks/useFetch/useFetch.d.ts +3 -0
  35. package/dist/hooks/useResponsive/index.d.ts +1 -0
  36. package/dist/hooks/useResponsive/stories/setup.d.ts +1 -0
  37. package/dist/hooks/useResponsive/stories/useResponsive.stories.d.ts +13 -0
  38. package/dist/hooks/useResponsive/useResponsive.d.ts +4 -0
  39. package/dist/index.cjs.js +33 -0
  40. package/dist/index.d.ts +4 -0
  41. package/dist/index.es.js +2344 -0
  42. package/dist/providers/feedback/feedbackContext.d.ts +8 -0
  43. package/dist/providers/feedback/feedbackProvider.d.ts +5 -0
  44. package/dist/providers/feedback/index.d.ts +2 -0
  45. package/dist/providers/feedback/stories/feedback.stories.d.ts +13 -0
  46. package/dist/providers/feedback/stories/setup.d.ts +4 -0
  47. package/dist/providers/feedback/useFeedback.d.ts +6 -0
  48. package/dist/providers/index.d.ts +2 -0
  49. package/dist/providers/navigation/index.d.ts +2 -0
  50. package/dist/providers/navigation/navigationContext.d.ts +8 -0
  51. package/dist/providers/navigation/navigationProvider.d.ts +10 -0
  52. package/dist/providers/navigation/stories/navigation.stories.d.ts +18 -0
  53. package/dist/providers/navigation/stories/setup.d.ts +5 -0
  54. package/dist/providers/navigation/useNavigation.d.ts +7 -0
  55. package/dist/vite.svg +1 -0
  56. package/package.json +57 -0
@@ -0,0 +1,2344 @@
1
+ import * as c from "react";
2
+ import E, { useContext as je, useEffect as st } from "react";
3
+ var re = { exports: {} }, q = {};
4
+ /**
5
+ * @license React
6
+ * react-jsx-runtime.production.js
7
+ *
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ var Ie;
14
+ function ut() {
15
+ if (Ie) return q;
16
+ Ie = 1;
17
+ var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
18
+ function r(a, n, o) {
19
+ var i = null;
20
+ if (o !== void 0 && (i = "" + o), n.key !== void 0 && (i = "" + n.key), "key" in n) {
21
+ o = {};
22
+ for (var u in n)
23
+ u !== "key" && (o[u] = n[u]);
24
+ } else o = n;
25
+ return n = o.ref, {
26
+ $$typeof: e,
27
+ type: a,
28
+ key: i,
29
+ ref: n !== void 0 ? n : null,
30
+ props: o
31
+ };
32
+ }
33
+ return q.Fragment = t, q.jsx = r, q.jsxs = r, q;
34
+ }
35
+ var G = {};
36
+ /**
37
+ * @license React
38
+ * react-jsx-runtime.development.js
39
+ *
40
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
41
+ *
42
+ * This source code is licensed under the MIT license found in the
43
+ * LICENSE file in the root directory of this source tree.
44
+ */
45
+ var Le;
46
+ function ct() {
47
+ return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
48
+ function e(m) {
49
+ if (m == null) return null;
50
+ if (typeof m == "function")
51
+ return m.$$typeof === A ? null : m.displayName || m.name || null;
52
+ if (typeof m == "string") return m;
53
+ switch (m) {
54
+ case g:
55
+ return "Fragment";
56
+ case f:
57
+ return "Profiler";
58
+ case w:
59
+ return "StrictMode";
60
+ case T:
61
+ return "Suspense";
62
+ case U:
63
+ return "SuspenseList";
64
+ case $:
65
+ return "Activity";
66
+ }
67
+ if (typeof m == "object")
68
+ switch (typeof m.tag == "number" && console.error(
69
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
+ ), m.$$typeof) {
71
+ case p:
72
+ return "Portal";
73
+ case R:
74
+ return (m.displayName || "Context") + ".Provider";
75
+ case b:
76
+ return (m._context.displayName || "Context") + ".Consumer";
77
+ case k:
78
+ var x = m.render;
79
+ return m = m.displayName, m || (m = x.displayName || x.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
80
+ case O:
81
+ return x = m.displayName || null, x !== null ? x : e(m.type) || "Memo";
82
+ case _:
83
+ x = m._payload, m = m._init;
84
+ try {
85
+ return e(m(x));
86
+ } catch {
87
+ }
88
+ }
89
+ return null;
90
+ }
91
+ function t(m) {
92
+ return "" + m;
93
+ }
94
+ function r(m) {
95
+ try {
96
+ t(m);
97
+ var x = !1;
98
+ } catch {
99
+ x = !0;
100
+ }
101
+ if (x) {
102
+ x = console;
103
+ var C = x.error, I = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
104
+ return C.call(
105
+ x,
106
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
+ I
108
+ ), t(m);
109
+ }
110
+ }
111
+ function a(m) {
112
+ if (m === g) return "<>";
113
+ if (typeof m == "object" && m !== null && m.$$typeof === _)
114
+ return "<...>";
115
+ try {
116
+ var x = e(m);
117
+ return x ? "<" + x + ">" : "<...>";
118
+ } catch {
119
+ return "<...>";
120
+ }
121
+ }
122
+ function n() {
123
+ var m = V.A;
124
+ return m === null ? null : m.getOwner();
125
+ }
126
+ function o() {
127
+ return Error("react-stack-top-frame");
128
+ }
129
+ function i(m) {
130
+ if (Ee.call(m, "key")) {
131
+ var x = Object.getOwnPropertyDescriptor(m, "key").get;
132
+ if (x && x.isReactWarning) return !1;
133
+ }
134
+ return m.key !== void 0;
135
+ }
136
+ function u(m, x) {
137
+ function C() {
138
+ Ce || (Ce = !0, console.error(
139
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
+ x
141
+ ));
142
+ }
143
+ C.isReactWarning = !0, Object.defineProperty(m, "key", {
144
+ get: C,
145
+ configurable: !0
146
+ });
147
+ }
148
+ function l() {
149
+ var m = e(this.type);
150
+ return Se[m] || (Se[m] = !0, console.error(
151
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
+ )), m = this.props.ref, m !== void 0 ? m : null;
153
+ }
154
+ function s(m, x, C, I, B, D, ce, fe) {
155
+ return C = D.ref, m = {
156
+ $$typeof: v,
157
+ type: m,
158
+ key: x,
159
+ props: D,
160
+ _owner: B
161
+ }, (C !== void 0 ? C : null) !== null ? Object.defineProperty(m, "ref", {
162
+ enumerable: !1,
163
+ get: l
164
+ }) : Object.defineProperty(m, "ref", { enumerable: !1, value: null }), m._store = {}, Object.defineProperty(m._store, "validated", {
165
+ configurable: !1,
166
+ enumerable: !1,
167
+ writable: !0,
168
+ value: 0
169
+ }), Object.defineProperty(m, "_debugInfo", {
170
+ configurable: !1,
171
+ enumerable: !1,
172
+ writable: !0,
173
+ value: null
174
+ }), Object.defineProperty(m, "_debugStack", {
175
+ configurable: !1,
176
+ enumerable: !1,
177
+ writable: !0,
178
+ value: ce
179
+ }), Object.defineProperty(m, "_debugTask", {
180
+ configurable: !1,
181
+ enumerable: !1,
182
+ writable: !0,
183
+ value: fe
184
+ }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
185
+ }
186
+ function h(m, x, C, I, B, D, ce, fe) {
187
+ var L = x.children;
188
+ if (L !== void 0)
189
+ if (I)
190
+ if (it(L)) {
191
+ for (I = 0; I < L.length; I++)
192
+ y(L[I]);
193
+ Object.freeze && Object.freeze(L);
194
+ } else
195
+ console.error(
196
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
+ );
198
+ else y(L);
199
+ if (Ee.call(x, "key")) {
200
+ L = e(m);
201
+ var z = Object.keys(x).filter(function(lt) {
202
+ return lt !== "key";
203
+ });
204
+ I = 0 < z.length ? "{key: someKey, " + z.join(": ..., ") + ": ...}" : "{key: someKey}", Te[L + I] || (z = 0 < z.length ? "{" + z.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ `A props object containing a "key" prop is being spread into JSX:
206
+ let props = %s;
207
+ <%s {...props} />
208
+ React keys must be passed directly to JSX without using spread:
209
+ let props = %s;
210
+ <%s key={someKey} {...props} />`,
211
+ I,
212
+ L,
213
+ z,
214
+ L
215
+ ), Te[L + I] = !0);
216
+ }
217
+ if (L = null, C !== void 0 && (r(C), L = "" + C), i(x) && (r(x.key), L = "" + x.key), "key" in x) {
218
+ C = {};
219
+ for (var de in x)
220
+ de !== "key" && (C[de] = x[de]);
221
+ } else C = x;
222
+ return L && u(
223
+ C,
224
+ typeof m == "function" ? m.displayName || m.name || "Unknown" : m
225
+ ), s(
226
+ m,
227
+ L,
228
+ D,
229
+ B,
230
+ n(),
231
+ C,
232
+ ce,
233
+ fe
234
+ );
235
+ }
236
+ function y(m) {
237
+ typeof m == "object" && m !== null && m.$$typeof === v && m._store && (m._store.validated = 1);
238
+ }
239
+ var d = E, v = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), R = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), $ = Symbol.for("react.activity"), A = Symbol.for("react.client.reference"), V = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ee = Object.prototype.hasOwnProperty, it = Array.isArray, ue = console.createTask ? console.createTask : function() {
240
+ return null;
241
+ };
242
+ d = {
243
+ "react-stack-bottom-frame": function(m) {
244
+ return m();
245
+ }
246
+ };
247
+ var Ce, Se = {}, ke = d["react-stack-bottom-frame"].bind(
248
+ d,
249
+ o
250
+ )(), Pe = ue(a(o)), Te = {};
251
+ G.Fragment = g, G.jsx = function(m, x, C, I, B) {
252
+ var D = 1e4 > V.recentlyCreatedOwnerStacks++;
253
+ return h(
254
+ m,
255
+ x,
256
+ C,
257
+ !1,
258
+ I,
259
+ B,
260
+ D ? Error("react-stack-top-frame") : ke,
261
+ D ? ue(a(m)) : Pe
262
+ );
263
+ }, G.jsxs = function(m, x, C, I, B) {
264
+ var D = 1e4 > V.recentlyCreatedOwnerStacks++;
265
+ return h(
266
+ m,
267
+ x,
268
+ C,
269
+ !0,
270
+ I,
271
+ B,
272
+ D ? Error("react-stack-top-frame") : ke,
273
+ D ? ue(a(m)) : Pe
274
+ );
275
+ };
276
+ }()), G;
277
+ }
278
+ var $e;
279
+ function ft() {
280
+ return $e || ($e = 1, process.env.NODE_ENV === "production" ? re.exports = ut() : re.exports = ct()), re.exports;
281
+ }
282
+ var P = ft(), K = {}, Oe;
283
+ function dt() {
284
+ if (Oe) return K;
285
+ Oe = 1, Object.defineProperty(K, "__esModule", { value: !0 }), K.parse = i, K.serialize = s;
286
+ const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, r = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, n = Object.prototype.toString, o = /* @__PURE__ */ (() => {
287
+ const d = function() {
288
+ };
289
+ return d.prototype = /* @__PURE__ */ Object.create(null), d;
290
+ })();
291
+ function i(d, v) {
292
+ const p = new o(), g = d.length;
293
+ if (g < 2)
294
+ return p;
295
+ const w = v?.decode || h;
296
+ let f = 0;
297
+ do {
298
+ const b = d.indexOf("=", f);
299
+ if (b === -1)
300
+ break;
301
+ const R = d.indexOf(";", f), k = R === -1 ? g : R;
302
+ if (b > k) {
303
+ f = d.lastIndexOf(";", b - 1) + 1;
304
+ continue;
305
+ }
306
+ const T = u(d, f, b), U = l(d, b, T), O = d.slice(T, U);
307
+ if (p[O] === void 0) {
308
+ let _ = u(d, b + 1, k), $ = l(d, k, _);
309
+ const A = w(d.slice(_, $));
310
+ p[O] = A;
311
+ }
312
+ f = k + 1;
313
+ } while (f < g);
314
+ return p;
315
+ }
316
+ function u(d, v, p) {
317
+ do {
318
+ const g = d.charCodeAt(v);
319
+ if (g !== 32 && g !== 9)
320
+ return v;
321
+ } while (++v < p);
322
+ return p;
323
+ }
324
+ function l(d, v, p) {
325
+ for (; v > p; ) {
326
+ const g = d.charCodeAt(--v);
327
+ if (g !== 32 && g !== 9)
328
+ return v + 1;
329
+ }
330
+ return p;
331
+ }
332
+ function s(d, v, p) {
333
+ const g = p?.encode || encodeURIComponent;
334
+ if (!e.test(d))
335
+ throw new TypeError(`argument name is invalid: ${d}`);
336
+ const w = g(v);
337
+ if (!t.test(w))
338
+ throw new TypeError(`argument val is invalid: ${v}`);
339
+ let f = d + "=" + w;
340
+ if (!p)
341
+ return f;
342
+ if (p.maxAge !== void 0) {
343
+ if (!Number.isInteger(p.maxAge))
344
+ throw new TypeError(`option maxAge is invalid: ${p.maxAge}`);
345
+ f += "; Max-Age=" + p.maxAge;
346
+ }
347
+ if (p.domain) {
348
+ if (!r.test(p.domain))
349
+ throw new TypeError(`option domain is invalid: ${p.domain}`);
350
+ f += "; Domain=" + p.domain;
351
+ }
352
+ if (p.path) {
353
+ if (!a.test(p.path))
354
+ throw new TypeError(`option path is invalid: ${p.path}`);
355
+ f += "; Path=" + p.path;
356
+ }
357
+ if (p.expires) {
358
+ if (!y(p.expires) || !Number.isFinite(p.expires.valueOf()))
359
+ throw new TypeError(`option expires is invalid: ${p.expires}`);
360
+ f += "; Expires=" + p.expires.toUTCString();
361
+ }
362
+ if (p.httpOnly && (f += "; HttpOnly"), p.secure && (f += "; Secure"), p.partitioned && (f += "; Partitioned"), p.priority)
363
+ switch (typeof p.priority == "string" ? p.priority.toLowerCase() : void 0) {
364
+ case "low":
365
+ f += "; Priority=Low";
366
+ break;
367
+ case "medium":
368
+ f += "; Priority=Medium";
369
+ break;
370
+ case "high":
371
+ f += "; Priority=High";
372
+ break;
373
+ default:
374
+ throw new TypeError(`option priority is invalid: ${p.priority}`);
375
+ }
376
+ if (p.sameSite)
377
+ switch (typeof p.sameSite == "string" ? p.sameSite.toLowerCase() : p.sameSite) {
378
+ case !0:
379
+ case "strict":
380
+ f += "; SameSite=Strict";
381
+ break;
382
+ case "lax":
383
+ f += "; SameSite=Lax";
384
+ break;
385
+ case "none":
386
+ f += "; SameSite=None";
387
+ break;
388
+ default:
389
+ throw new TypeError(`option sameSite is invalid: ${p.sameSite}`);
390
+ }
391
+ return f;
392
+ }
393
+ function h(d) {
394
+ if (d.indexOf("%") === -1)
395
+ return d;
396
+ try {
397
+ return decodeURIComponent(d);
398
+ } catch {
399
+ return d;
400
+ }
401
+ }
402
+ function y(d) {
403
+ return n.call(d) === "[object Date]";
404
+ }
405
+ return K;
406
+ }
407
+ dt();
408
+ /**
409
+ * react-router v7.6.3
410
+ *
411
+ * Copyright (c) Remix Software Inc.
412
+ *
413
+ * This source code is licensed under the MIT license found in the
414
+ * LICENSE.md file in the root directory of this source tree.
415
+ *
416
+ * @license MIT
417
+ */
418
+ var _e = "popstate";
419
+ function ht(e = {}) {
420
+ function t(a, n) {
421
+ let { pathname: o, search: i, hash: u } = a.location;
422
+ return pe(
423
+ "",
424
+ { pathname: o, search: i, hash: u },
425
+ // state defaults to `null` because `window.history.state` does
426
+ n.state && n.state.usr || null,
427
+ n.state && n.state.key || "default"
428
+ );
429
+ }
430
+ function r(a, n) {
431
+ return typeof n == "string" ? n : Z(n);
432
+ }
433
+ return pt(
434
+ t,
435
+ r,
436
+ null,
437
+ e
438
+ );
439
+ }
440
+ function S(e, t) {
441
+ if (e === !1 || e === null || typeof e > "u")
442
+ throw new Error(t);
443
+ }
444
+ function N(e, t) {
445
+ if (!e) {
446
+ typeof console < "u" && console.warn(t);
447
+ try {
448
+ throw new Error(t);
449
+ } catch {
450
+ }
451
+ }
452
+ }
453
+ function mt() {
454
+ return Math.random().toString(36).substring(2, 10);
455
+ }
456
+ function Ae(e, t) {
457
+ return {
458
+ usr: e.state,
459
+ key: e.key,
460
+ idx: t
461
+ };
462
+ }
463
+ function pe(e, t, r = null, a) {
464
+ return {
465
+ pathname: typeof e == "string" ? e : e.pathname,
466
+ search: "",
467
+ hash: "",
468
+ ...typeof t == "string" ? Y(t) : t,
469
+ state: r,
470
+ // TODO: This could be cleaned up. push/replace should probably just take
471
+ // full Locations now and avoid the need to run through this flow at all
472
+ // But that's a pretty big refactor to the current test suite so going to
473
+ // keep as is for the time being and just let any incoming keys take precedence
474
+ key: t && t.key || a || mt()
475
+ };
476
+ }
477
+ function Z({
478
+ pathname: e = "/",
479
+ search: t = "",
480
+ hash: r = ""
481
+ }) {
482
+ return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
483
+ }
484
+ function Y(e) {
485
+ let t = {};
486
+ if (e) {
487
+ let r = e.indexOf("#");
488
+ r >= 0 && (t.hash = e.substring(r), e = e.substring(0, r));
489
+ let a = e.indexOf("?");
490
+ a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
491
+ }
492
+ return t;
493
+ }
494
+ function pt(e, t, r, a = {}) {
495
+ let { window: n = document.defaultView, v5Compat: o = !1 } = a, i = n.history, u = "POP", l = null, s = h();
496
+ s == null && (s = 0, i.replaceState({ ...i.state, idx: s }, ""));
497
+ function h() {
498
+ return (i.state || { idx: null }).idx;
499
+ }
500
+ function y() {
501
+ u = "POP";
502
+ let w = h(), f = w == null ? null : w - s;
503
+ s = w, l && l({ action: u, location: g.location, delta: f });
504
+ }
505
+ function d(w, f) {
506
+ u = "PUSH";
507
+ let b = pe(g.location, w, f);
508
+ s = h() + 1;
509
+ let R = Ae(b, s), k = g.createHref(b);
510
+ try {
511
+ i.pushState(R, "", k);
512
+ } catch (T) {
513
+ if (T instanceof DOMException && T.name === "DataCloneError")
514
+ throw T;
515
+ n.location.assign(k);
516
+ }
517
+ o && l && l({ action: u, location: g.location, delta: 1 });
518
+ }
519
+ function v(w, f) {
520
+ u = "REPLACE";
521
+ let b = pe(g.location, w, f);
522
+ s = h();
523
+ let R = Ae(b, s), k = g.createHref(b);
524
+ i.replaceState(R, "", k), o && l && l({ action: u, location: g.location, delta: 0 });
525
+ }
526
+ function p(w) {
527
+ return yt(w);
528
+ }
529
+ let g = {
530
+ get action() {
531
+ return u;
532
+ },
533
+ get location() {
534
+ return e(n, i);
535
+ },
536
+ listen(w) {
537
+ if (l)
538
+ throw new Error("A history only accepts one active listener");
539
+ return n.addEventListener(_e, y), l = w, () => {
540
+ n.removeEventListener(_e, y), l = null;
541
+ };
542
+ },
543
+ createHref(w) {
544
+ return t(n, w);
545
+ },
546
+ createURL: p,
547
+ encodeLocation(w) {
548
+ let f = p(w);
549
+ return {
550
+ pathname: f.pathname,
551
+ search: f.search,
552
+ hash: f.hash
553
+ };
554
+ },
555
+ push: d,
556
+ replace: v,
557
+ go(w) {
558
+ return i.go(w);
559
+ }
560
+ };
561
+ return g;
562
+ }
563
+ function yt(e, t = !1) {
564
+ let r = "http://localhost";
565
+ typeof window < "u" && (r = window.location.origin !== "null" ? window.location.origin : window.location.href), S(r, "No window.location.(origin|href) available to create URL");
566
+ let a = typeof e == "string" ? e : Z(e);
567
+ return a = a.replace(/ $/, "%20"), !t && a.startsWith("//") && (a = r + a), new URL(a, r);
568
+ }
569
+ function He(e, t, r = "/") {
570
+ return gt(e, t, r, !1);
571
+ }
572
+ function gt(e, t, r, a) {
573
+ let n = typeof t == "string" ? Y(t) : t, o = H(n.pathname || "/", r);
574
+ if (o == null)
575
+ return null;
576
+ let i = Me(e);
577
+ vt(i);
578
+ let u = null;
579
+ for (let l = 0; u == null && l < i.length; ++l) {
580
+ let s = It(o);
581
+ u = Pt(
582
+ i[l],
583
+ s,
584
+ a
585
+ );
586
+ }
587
+ return u;
588
+ }
589
+ function Me(e, t = [], r = [], a = "") {
590
+ let n = (o, i, u) => {
591
+ let l = {
592
+ relativePath: u === void 0 ? o.path || "" : u,
593
+ caseSensitive: o.caseSensitive === !0,
594
+ childrenIndex: i,
595
+ route: o
596
+ };
597
+ l.relativePath.startsWith("/") && (S(
598
+ l.relativePath.startsWith(a),
599
+ `Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
600
+ ), l.relativePath = l.relativePath.slice(a.length));
601
+ let s = j([a, l.relativePath]), h = r.concat(l);
602
+ o.children && o.children.length > 0 && (S(
603
+ // Our types know better, but runtime JS may not!
604
+ // @ts-expect-error
605
+ o.index !== !0,
606
+ `Index routes must not have child routes. Please remove all child routes from route path "${s}".`
607
+ ), Me(o.children, t, h, s)), !(o.path == null && !o.index) && t.push({
608
+ path: s,
609
+ score: St(s, o.index),
610
+ routesMeta: h
611
+ });
612
+ };
613
+ return e.forEach((o, i) => {
614
+ if (o.path === "" || !o.path?.includes("?"))
615
+ n(o, i);
616
+ else
617
+ for (let u of Ue(o.path))
618
+ n(o, i, u);
619
+ }), t;
620
+ }
621
+ function Ue(e) {
622
+ let t = e.split("/");
623
+ if (t.length === 0) return [];
624
+ let [r, ...a] = t, n = r.endsWith("?"), o = r.replace(/\?$/, "");
625
+ if (a.length === 0)
626
+ return n ? [o, ""] : [o];
627
+ let i = Ue(a.join("/")), u = [];
628
+ return u.push(
629
+ ...i.map(
630
+ (l) => l === "" ? o : [o, l].join("/")
631
+ )
632
+ ), n && u.push(...i), u.map(
633
+ (l) => e.startsWith("/") && l === "" ? "/" : l
634
+ );
635
+ }
636
+ function vt(e) {
637
+ e.sort(
638
+ (t, r) => t.score !== r.score ? r.score - t.score : kt(
639
+ t.routesMeta.map((a) => a.childrenIndex),
640
+ r.routesMeta.map((a) => a.childrenIndex)
641
+ )
642
+ );
643
+ }
644
+ var wt = /^:[\w-]+$/, xt = 3, bt = 2, Rt = 1, Et = 10, Ct = -2, De = (e) => e === "*";
645
+ function St(e, t) {
646
+ let r = e.split("/"), a = r.length;
647
+ return r.some(De) && (a += Ct), t && (a += bt), r.filter((n) => !De(n)).reduce(
648
+ (n, o) => n + (wt.test(o) ? xt : o === "" ? Rt : Et),
649
+ a
650
+ );
651
+ }
652
+ function kt(e, t) {
653
+ return e.length === t.length && e.slice(0, -1).every((a, n) => a === t[n]) ? (
654
+ // If two routes are siblings, we should try to match the earlier sibling
655
+ // first. This allows people to have fine-grained control over the matching
656
+ // behavior by simply putting routes with identical paths in the order they
657
+ // want them tried.
658
+ e[e.length - 1] - t[t.length - 1]
659
+ ) : (
660
+ // Otherwise, it doesn't really make sense to rank non-siblings by index,
661
+ // so they sort equally.
662
+ 0
663
+ );
664
+ }
665
+ function Pt(e, t, r = !1) {
666
+ let { routesMeta: a } = e, n = {}, o = "/", i = [];
667
+ for (let u = 0; u < a.length; ++u) {
668
+ let l = a[u], s = u === a.length - 1, h = o === "/" ? t : t.slice(o.length) || "/", y = ie(
669
+ { path: l.relativePath, caseSensitive: l.caseSensitive, end: s },
670
+ h
671
+ ), d = l.route;
672
+ if (!y && s && r && !a[a.length - 1].route.index && (y = ie(
673
+ {
674
+ path: l.relativePath,
675
+ caseSensitive: l.caseSensitive,
676
+ end: !1
677
+ },
678
+ h
679
+ )), !y)
680
+ return null;
681
+ Object.assign(n, y.params), i.push({
682
+ // TODO: Can this as be avoided?
683
+ params: n,
684
+ pathname: j([o, y.pathname]),
685
+ pathnameBase: _t(
686
+ j([o, y.pathnameBase])
687
+ ),
688
+ route: d
689
+ }), y.pathnameBase !== "/" && (o = j([o, y.pathnameBase]));
690
+ }
691
+ return i;
692
+ }
693
+ function ie(e, t) {
694
+ typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
695
+ let [r, a] = Tt(
696
+ e.path,
697
+ e.caseSensitive,
698
+ e.end
699
+ ), n = t.match(r);
700
+ if (!n) return null;
701
+ let o = n[0], i = o.replace(/(.)\/+$/, "$1"), u = n.slice(1);
702
+ return {
703
+ params: a.reduce(
704
+ (s, { paramName: h, isOptional: y }, d) => {
705
+ if (h === "*") {
706
+ let p = u[d] || "";
707
+ i = o.slice(0, o.length - p.length).replace(/(.)\/+$/, "$1");
708
+ }
709
+ const v = u[d];
710
+ return y && !v ? s[h] = void 0 : s[h] = (v || "").replace(/%2F/g, "/"), s;
711
+ },
712
+ {}
713
+ ),
714
+ pathname: o,
715
+ pathnameBase: i,
716
+ pattern: e
717
+ };
718
+ }
719
+ function Tt(e, t = !1, r = !0) {
720
+ N(
721
+ e === "*" || !e.endsWith("*") || e.endsWith("/*"),
722
+ `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(/\*$/, "/*")}".`
723
+ );
724
+ let a = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
725
+ /\/:([\w-]+)(\?)?/g,
726
+ (i, u, l) => (a.push({ paramName: u, isOptional: l != null }), l ? "/?([^\\/]+)?" : "/([^\\/]+)")
727
+ );
728
+ return e.endsWith("*") ? (a.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), a];
729
+ }
730
+ function It(e) {
731
+ try {
732
+ return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
733
+ } catch (t) {
734
+ return N(
735
+ !1,
736
+ `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}).`
737
+ ), e;
738
+ }
739
+ }
740
+ function H(e, t) {
741
+ if (t === "/") return e;
742
+ if (!e.toLowerCase().startsWith(t.toLowerCase()))
743
+ return null;
744
+ let r = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(r);
745
+ return a && a !== "/" ? null : e.slice(r) || "/";
746
+ }
747
+ function Lt(e, t = "/") {
748
+ let {
749
+ pathname: r,
750
+ search: a = "",
751
+ hash: n = ""
752
+ } = typeof e == "string" ? Y(e) : e;
753
+ return {
754
+ pathname: r ? r.startsWith("/") ? r : $t(r, t) : t,
755
+ search: At(a),
756
+ hash: Dt(n)
757
+ };
758
+ }
759
+ function $t(e, t) {
760
+ let r = t.replace(/\/+$/, "").split("/");
761
+ return e.split("/").forEach((n) => {
762
+ n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
763
+ }), r.length > 1 ? r.join("/") : "/";
764
+ }
765
+ function he(e, t, r, a) {
766
+ return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
767
+ a
768
+ )}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
769
+ }
770
+ function Ot(e) {
771
+ return e.filter(
772
+ (t, r) => r === 0 || t.route.path && t.route.path.length > 0
773
+ );
774
+ }
775
+ function Be(e) {
776
+ let t = Ot(e);
777
+ return t.map(
778
+ (r, a) => a === t.length - 1 ? r.pathname : r.pathnameBase
779
+ );
780
+ }
781
+ function We(e, t, r, a = !1) {
782
+ let n;
783
+ typeof e == "string" ? n = Y(e) : (n = { ...e }, S(
784
+ !n.pathname || !n.pathname.includes("?"),
785
+ he("?", "pathname", "search", n)
786
+ ), S(
787
+ !n.pathname || !n.pathname.includes("#"),
788
+ he("#", "pathname", "hash", n)
789
+ ), S(
790
+ !n.search || !n.search.includes("#"),
791
+ he("#", "search", "hash", n)
792
+ ));
793
+ let o = e === "" || n.pathname === "", i = o ? "/" : n.pathname, u;
794
+ if (i == null)
795
+ u = r;
796
+ else {
797
+ let y = t.length - 1;
798
+ if (!a && i.startsWith("..")) {
799
+ let d = i.split("/");
800
+ for (; d[0] === ".."; )
801
+ d.shift(), y -= 1;
802
+ n.pathname = d.join("/");
803
+ }
804
+ u = y >= 0 ? t[y] : "/";
805
+ }
806
+ let l = Lt(n, u), s = i && i !== "/" && i.endsWith("/"), h = (o || i === ".") && r.endsWith("/");
807
+ return !l.pathname.endsWith("/") && (s || h) && (l.pathname += "/"), l;
808
+ }
809
+ var j = (e) => e.join("/").replace(/\/\/+/g, "/"), _t = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), At = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Dt = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
810
+ function Nt(e) {
811
+ return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
812
+ }
813
+ var Ve = [
814
+ "POST",
815
+ "PUT",
816
+ "PATCH",
817
+ "DELETE"
818
+ ];
819
+ new Set(
820
+ Ve
821
+ );
822
+ var Ft = [
823
+ "GET",
824
+ ...Ve
825
+ ];
826
+ new Set(Ft);
827
+ var J = c.createContext(null);
828
+ J.displayName = "DataRouter";
829
+ var le = c.createContext(null);
830
+ le.displayName = "DataRouterState";
831
+ var ze = c.createContext({
832
+ isTransitioning: !1
833
+ });
834
+ ze.displayName = "ViewTransition";
835
+ var jt = c.createContext(
836
+ /* @__PURE__ */ new Map()
837
+ );
838
+ jt.displayName = "Fetchers";
839
+ var Ht = c.createContext(null);
840
+ Ht.displayName = "Await";
841
+ var F = c.createContext(
842
+ null
843
+ );
844
+ F.displayName = "Navigation";
845
+ var Q = c.createContext(
846
+ null
847
+ );
848
+ Q.displayName = "Location";
849
+ var M = c.createContext({
850
+ outlet: null,
851
+ matches: [],
852
+ isDataRoute: !1
853
+ });
854
+ M.displayName = "Route";
855
+ var ge = c.createContext(null);
856
+ ge.displayName = "RouteError";
857
+ function Mt(e, { relative: t } = {}) {
858
+ S(
859
+ ee(),
860
+ // TODO: This error is probably because they somehow have 2 versions of the
861
+ // router loaded. We can help them understand how to avoid that.
862
+ "useHref() may be used only in the context of a <Router> component."
863
+ );
864
+ let { basename: r, navigator: a } = c.useContext(F), { hash: n, pathname: o, search: i } = te(e, { relative: t }), u = o;
865
+ return r !== "/" && (u = o === "/" ? r : j([r, o])), a.createHref({ pathname: u, search: i, hash: n });
866
+ }
867
+ function ee() {
868
+ return c.useContext(Q) != null;
869
+ }
870
+ function W() {
871
+ return S(
872
+ ee(),
873
+ // TODO: This error is probably because they somehow have 2 versions of the
874
+ // router loaded. We can help them understand how to avoid that.
875
+ "useLocation() may be used only in the context of a <Router> component."
876
+ ), c.useContext(Q).location;
877
+ }
878
+ var Ye = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
879
+ function Je(e) {
880
+ c.useContext(F).static || c.useLayoutEffect(e);
881
+ }
882
+ function qe() {
883
+ let { isDataRoute: e } = c.useContext(M);
884
+ return e ? Qt() : Ut();
885
+ }
886
+ function Ut() {
887
+ S(
888
+ ee(),
889
+ // TODO: This error is probably because they somehow have 2 versions of the
890
+ // router loaded. We can help them understand how to avoid that.
891
+ "useNavigate() may be used only in the context of a <Router> component."
892
+ );
893
+ let e = c.useContext(J), { basename: t, navigator: r } = c.useContext(F), { matches: a } = c.useContext(M), { pathname: n } = W(), o = JSON.stringify(Be(a)), i = c.useRef(!1);
894
+ return Je(() => {
895
+ i.current = !0;
896
+ }), c.useCallback(
897
+ (l, s = {}) => {
898
+ if (N(i.current, Ye), !i.current) return;
899
+ if (typeof l == "number") {
900
+ r.go(l);
901
+ return;
902
+ }
903
+ let h = We(
904
+ l,
905
+ JSON.parse(o),
906
+ n,
907
+ s.relative === "path"
908
+ );
909
+ e == null && t !== "/" && (h.pathname = h.pathname === "/" ? t : j([t, h.pathname])), (s.replace ? r.replace : r.push)(
910
+ h,
911
+ s.state,
912
+ s
913
+ );
914
+ },
915
+ [
916
+ t,
917
+ r,
918
+ o,
919
+ n,
920
+ e
921
+ ]
922
+ );
923
+ }
924
+ c.createContext(null);
925
+ function te(e, { relative: t } = {}) {
926
+ let { matches: r } = c.useContext(M), { pathname: a } = W(), n = JSON.stringify(Be(r));
927
+ return c.useMemo(
928
+ () => We(
929
+ e,
930
+ JSON.parse(n),
931
+ a,
932
+ t === "path"
933
+ ),
934
+ [e, n, a, t]
935
+ );
936
+ }
937
+ function Bt(e, t) {
938
+ return Ge(e, t);
939
+ }
940
+ function Ge(e, t, r, a) {
941
+ S(
942
+ ee(),
943
+ // TODO: This error is probably because they somehow have 2 versions of the
944
+ // router loaded. We can help them understand how to avoid that.
945
+ "useRoutes() may be used only in the context of a <Router> component."
946
+ );
947
+ let { navigator: n } = c.useContext(F), { matches: o } = c.useContext(M), i = o[o.length - 1], u = i ? i.params : {}, l = i ? i.pathname : "/", s = i ? i.pathnameBase : "/", h = i && i.route;
948
+ {
949
+ let f = h && h.path || "";
950
+ Ke(
951
+ l,
952
+ !h || f.endsWith("*") || f.endsWith("*?"),
953
+ `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${f}">) 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.
954
+
955
+ Please change the parent <Route path="${f}"> to <Route path="${f === "/" ? "*" : `${f}/*`}">.`
956
+ );
957
+ }
958
+ let y = W(), d;
959
+ if (t) {
960
+ let f = typeof t == "string" ? Y(t) : t;
961
+ S(
962
+ s === "/" || f.pathname?.startsWith(s),
963
+ `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${f.pathname}" was given in the \`location\` prop.`
964
+ ), d = f;
965
+ } else
966
+ d = y;
967
+ let v = d.pathname || "/", p = v;
968
+ if (s !== "/") {
969
+ let f = s.replace(/^\//, "").split("/");
970
+ p = "/" + v.replace(/^\//, "").split("/").slice(f.length).join("/");
971
+ }
972
+ let g = He(e, { pathname: p });
973
+ N(
974
+ h || g != null,
975
+ `No routes matched location "${d.pathname}${d.search}${d.hash}" `
976
+ ), N(
977
+ 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,
978
+ `Matched leaf route at location "${d.pathname}${d.search}${d.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.`
979
+ );
980
+ let w = Jt(
981
+ g && g.map(
982
+ (f) => Object.assign({}, f, {
983
+ params: Object.assign({}, u, f.params),
984
+ pathname: j([
985
+ s,
986
+ // Re-encode pathnames that were decoded inside matchRoutes
987
+ n.encodeLocation ? n.encodeLocation(f.pathname).pathname : f.pathname
988
+ ]),
989
+ pathnameBase: f.pathnameBase === "/" ? s : j([
990
+ s,
991
+ // Re-encode pathnames that were decoded inside matchRoutes
992
+ n.encodeLocation ? n.encodeLocation(f.pathnameBase).pathname : f.pathnameBase
993
+ ])
994
+ })
995
+ ),
996
+ o,
997
+ r,
998
+ a
999
+ );
1000
+ return t && w ? /* @__PURE__ */ c.createElement(
1001
+ Q.Provider,
1002
+ {
1003
+ value: {
1004
+ location: {
1005
+ pathname: "/",
1006
+ search: "",
1007
+ hash: "",
1008
+ state: null,
1009
+ key: "default",
1010
+ ...d
1011
+ },
1012
+ navigationType: "POP"
1013
+ /* Pop */
1014
+ }
1015
+ },
1016
+ w
1017
+ ) : w;
1018
+ }
1019
+ function Wt() {
1020
+ let e = Zt(), t = Nt(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", n = { padding: "0.5rem", backgroundColor: a }, o = { padding: "2px 4px", backgroundColor: a }, i = null;
1021
+ return console.error(
1022
+ "Error handled by React Router default ErrorBoundary:",
1023
+ e
1024
+ ), i = /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ c.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ c.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ c.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ c.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ c.createElement("pre", { style: n }, r) : null, i);
1025
+ }
1026
+ var Vt = /* @__PURE__ */ c.createElement(Wt, null), zt = class extends c.Component {
1027
+ constructor(e) {
1028
+ super(e), this.state = {
1029
+ location: e.location,
1030
+ revalidation: e.revalidation,
1031
+ error: e.error
1032
+ };
1033
+ }
1034
+ static getDerivedStateFromError(e) {
1035
+ return { error: e };
1036
+ }
1037
+ static getDerivedStateFromProps(e, t) {
1038
+ return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
1039
+ error: e.error,
1040
+ location: e.location,
1041
+ revalidation: e.revalidation
1042
+ } : {
1043
+ error: e.error !== void 0 ? e.error : t.error,
1044
+ location: t.location,
1045
+ revalidation: e.revalidation || t.revalidation
1046
+ };
1047
+ }
1048
+ componentDidCatch(e, t) {
1049
+ console.error(
1050
+ "React Router caught the following error during render",
1051
+ e,
1052
+ t
1053
+ );
1054
+ }
1055
+ render() {
1056
+ return this.state.error !== void 0 ? /* @__PURE__ */ c.createElement(M.Provider, { value: this.props.routeContext }, /* @__PURE__ */ c.createElement(
1057
+ ge.Provider,
1058
+ {
1059
+ value: this.state.error,
1060
+ children: this.props.component
1061
+ }
1062
+ )) : this.props.children;
1063
+ }
1064
+ };
1065
+ function Yt({ routeContext: e, match: t, children: r }) {
1066
+ let a = c.useContext(J);
1067
+ return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ c.createElement(M.Provider, { value: e }, r);
1068
+ }
1069
+ function Jt(e, t = [], r = null, a = null) {
1070
+ if (e == null) {
1071
+ if (!r)
1072
+ return null;
1073
+ if (r.errors)
1074
+ e = r.matches;
1075
+ else if (t.length === 0 && !r.initialized && r.matches.length > 0)
1076
+ e = r.matches;
1077
+ else
1078
+ return null;
1079
+ }
1080
+ let n = e, o = r?.errors;
1081
+ if (o != null) {
1082
+ let l = n.findIndex(
1083
+ (s) => s.route.id && o?.[s.route.id] !== void 0
1084
+ );
1085
+ S(
1086
+ l >= 0,
1087
+ `Could not find a matching route for errors on route IDs: ${Object.keys(
1088
+ o
1089
+ ).join(",")}`
1090
+ ), n = n.slice(
1091
+ 0,
1092
+ Math.min(n.length, l + 1)
1093
+ );
1094
+ }
1095
+ let i = !1, u = -1;
1096
+ if (r)
1097
+ for (let l = 0; l < n.length; l++) {
1098
+ let s = n[l];
1099
+ if ((s.route.HydrateFallback || s.route.hydrateFallbackElement) && (u = l), s.route.id) {
1100
+ let { loaderData: h, errors: y } = r, d = s.route.loader && !h.hasOwnProperty(s.route.id) && (!y || y[s.route.id] === void 0);
1101
+ if (s.route.lazy || d) {
1102
+ i = !0, u >= 0 ? n = n.slice(0, u + 1) : n = [n[0]];
1103
+ break;
1104
+ }
1105
+ }
1106
+ }
1107
+ return n.reduceRight((l, s, h) => {
1108
+ let y, d = !1, v = null, p = null;
1109
+ r && (y = o && s.route.id ? o[s.route.id] : void 0, v = s.route.errorElement || Vt, i && (u < 0 && h === 0 ? (Ke(
1110
+ "route-fallback",
1111
+ !1,
1112
+ "No `HydrateFallback` element provided to render during initial hydration"
1113
+ ), d = !0, p = null) : u === h && (d = !0, p = s.route.hydrateFallbackElement || null)));
1114
+ let g = t.concat(n.slice(0, h + 1)), w = () => {
1115
+ let f;
1116
+ return y ? f = v : d ? f = p : s.route.Component ? f = /* @__PURE__ */ c.createElement(s.route.Component, null) : s.route.element ? f = s.route.element : f = l, /* @__PURE__ */ c.createElement(
1117
+ Yt,
1118
+ {
1119
+ match: s,
1120
+ routeContext: {
1121
+ outlet: l,
1122
+ matches: g,
1123
+ isDataRoute: r != null
1124
+ },
1125
+ children: f
1126
+ }
1127
+ );
1128
+ };
1129
+ return r && (s.route.ErrorBoundary || s.route.errorElement || h === 0) ? /* @__PURE__ */ c.createElement(
1130
+ zt,
1131
+ {
1132
+ location: r.location,
1133
+ revalidation: r.revalidation,
1134
+ component: v,
1135
+ error: y,
1136
+ children: w(),
1137
+ routeContext: { outlet: null, matches: g, isDataRoute: !0 }
1138
+ }
1139
+ ) : w();
1140
+ }, null);
1141
+ }
1142
+ function ve(e) {
1143
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1144
+ }
1145
+ function qt(e) {
1146
+ let t = c.useContext(J);
1147
+ return S(t, ve(e)), t;
1148
+ }
1149
+ function Gt(e) {
1150
+ let t = c.useContext(le);
1151
+ return S(t, ve(e)), t;
1152
+ }
1153
+ function Kt(e) {
1154
+ let t = c.useContext(M);
1155
+ return S(t, ve(e)), t;
1156
+ }
1157
+ function we(e) {
1158
+ let t = Kt(e), r = t.matches[t.matches.length - 1];
1159
+ return S(
1160
+ r.route.id,
1161
+ `${e} can only be used on routes that contain a unique "id"`
1162
+ ), r.route.id;
1163
+ }
1164
+ function Xt() {
1165
+ return we(
1166
+ "useRouteId"
1167
+ /* UseRouteId */
1168
+ );
1169
+ }
1170
+ function Zt() {
1171
+ let e = c.useContext(ge), t = Gt(
1172
+ "useRouteError"
1173
+ /* UseRouteError */
1174
+ ), r = we(
1175
+ "useRouteError"
1176
+ /* UseRouteError */
1177
+ );
1178
+ return e !== void 0 ? e : t.errors?.[r];
1179
+ }
1180
+ function Qt() {
1181
+ let { router: e } = qt(
1182
+ "useNavigate"
1183
+ /* UseNavigateStable */
1184
+ ), t = we(
1185
+ "useNavigate"
1186
+ /* UseNavigateStable */
1187
+ ), r = c.useRef(!1);
1188
+ return Je(() => {
1189
+ r.current = !0;
1190
+ }), c.useCallback(
1191
+ async (n, o = {}) => {
1192
+ N(r.current, Ye), r.current && (typeof n == "number" ? e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...o }));
1193
+ },
1194
+ [e, t]
1195
+ );
1196
+ }
1197
+ var Ne = {};
1198
+ function Ke(e, t, r) {
1199
+ !t && !Ne[e] && (Ne[e] = !0, N(!1, r));
1200
+ }
1201
+ c.memo(er);
1202
+ function er({
1203
+ routes: e,
1204
+ future: t,
1205
+ state: r
1206
+ }) {
1207
+ return Ge(e, void 0, r, t);
1208
+ }
1209
+ function Xe(e) {
1210
+ S(
1211
+ !1,
1212
+ "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."
1213
+ );
1214
+ }
1215
+ function tr({
1216
+ basename: e = "/",
1217
+ children: t = null,
1218
+ location: r,
1219
+ navigationType: a = "POP",
1220
+ navigator: n,
1221
+ static: o = !1
1222
+ }) {
1223
+ S(
1224
+ !ee(),
1225
+ "You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
1226
+ );
1227
+ let i = e.replace(/^\/*/, "/"), u = c.useMemo(
1228
+ () => ({
1229
+ basename: i,
1230
+ navigator: n,
1231
+ static: o,
1232
+ future: {}
1233
+ }),
1234
+ [i, n, o]
1235
+ );
1236
+ typeof r == "string" && (r = Y(r));
1237
+ let {
1238
+ pathname: l = "/",
1239
+ search: s = "",
1240
+ hash: h = "",
1241
+ state: y = null,
1242
+ key: d = "default"
1243
+ } = r, v = c.useMemo(() => {
1244
+ let p = H(l, i);
1245
+ return p == null ? null : {
1246
+ location: {
1247
+ pathname: p,
1248
+ search: s,
1249
+ hash: h,
1250
+ state: y,
1251
+ key: d
1252
+ },
1253
+ navigationType: a
1254
+ };
1255
+ }, [i, l, s, h, y, d, a]);
1256
+ return N(
1257
+ v != null,
1258
+ `<Router basename="${i}"> is not able to match the URL "${l}${s}${h}" because it does not start with the basename, so the <Router> won't render anything.`
1259
+ ), v == null ? null : /* @__PURE__ */ c.createElement(F.Provider, { value: u }, /* @__PURE__ */ c.createElement(Q.Provider, { children: t, value: v }));
1260
+ }
1261
+ function rr({
1262
+ children: e,
1263
+ location: t
1264
+ }) {
1265
+ return Bt(ye(e), t);
1266
+ }
1267
+ function ye(e, t = []) {
1268
+ let r = [];
1269
+ return c.Children.forEach(e, (a, n) => {
1270
+ if (!c.isValidElement(a))
1271
+ return;
1272
+ let o = [...t, n];
1273
+ if (a.type === c.Fragment) {
1274
+ r.push.apply(
1275
+ r,
1276
+ ye(a.props.children, o)
1277
+ );
1278
+ return;
1279
+ }
1280
+ S(
1281
+ a.type === Xe,
1282
+ `[${typeof a.type == "string" ? a.type : a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`
1283
+ ), S(
1284
+ !a.props.index || !a.props.children,
1285
+ "An index route cannot have child routes."
1286
+ );
1287
+ let i = {
1288
+ id: a.props.id || o.join("-"),
1289
+ caseSensitive: a.props.caseSensitive,
1290
+ element: a.props.element,
1291
+ Component: a.props.Component,
1292
+ index: a.props.index,
1293
+ path: a.props.path,
1294
+ loader: a.props.loader,
1295
+ action: a.props.action,
1296
+ hydrateFallbackElement: a.props.hydrateFallbackElement,
1297
+ HydrateFallback: a.props.HydrateFallback,
1298
+ errorElement: a.props.errorElement,
1299
+ ErrorBoundary: a.props.ErrorBoundary,
1300
+ hasErrorBoundary: a.props.hasErrorBoundary === !0 || a.props.ErrorBoundary != null || a.props.errorElement != null,
1301
+ shouldRevalidate: a.props.shouldRevalidate,
1302
+ handle: a.props.handle,
1303
+ lazy: a.props.lazy
1304
+ };
1305
+ a.props.children && (i.children = ye(
1306
+ a.props.children,
1307
+ o
1308
+ )), r.push(i);
1309
+ }), r;
1310
+ }
1311
+ var ae = "get", oe = "application/x-www-form-urlencoded";
1312
+ function se(e) {
1313
+ return e != null && typeof e.tagName == "string";
1314
+ }
1315
+ function nr(e) {
1316
+ return se(e) && e.tagName.toLowerCase() === "button";
1317
+ }
1318
+ function ar(e) {
1319
+ return se(e) && e.tagName.toLowerCase() === "form";
1320
+ }
1321
+ function or(e) {
1322
+ return se(e) && e.tagName.toLowerCase() === "input";
1323
+ }
1324
+ function ir(e) {
1325
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
1326
+ }
1327
+ function lr(e, t) {
1328
+ return e.button === 0 && // Ignore everything but left clicks
1329
+ (!t || t === "_self") && // Let browser handle "target=_blank" etc.
1330
+ !ir(e);
1331
+ }
1332
+ var ne = null;
1333
+ function sr() {
1334
+ if (ne === null)
1335
+ try {
1336
+ new FormData(
1337
+ document.createElement("form"),
1338
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
1339
+ 0
1340
+ ), ne = !1;
1341
+ } catch {
1342
+ ne = !0;
1343
+ }
1344
+ return ne;
1345
+ }
1346
+ var ur = /* @__PURE__ */ new Set([
1347
+ "application/x-www-form-urlencoded",
1348
+ "multipart/form-data",
1349
+ "text/plain"
1350
+ ]);
1351
+ function me(e) {
1352
+ return e != null && !ur.has(e) ? (N(
1353
+ !1,
1354
+ `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oe}"`
1355
+ ), null) : e;
1356
+ }
1357
+ function cr(e, t) {
1358
+ let r, a, n, o, i;
1359
+ if (ar(e)) {
1360
+ let u = e.getAttribute("action");
1361
+ a = u ? H(u, t) : null, r = e.getAttribute("method") || ae, n = me(e.getAttribute("enctype")) || oe, o = new FormData(e);
1362
+ } else if (nr(e) || or(e) && (e.type === "submit" || e.type === "image")) {
1363
+ let u = e.form;
1364
+ if (u == null)
1365
+ throw new Error(
1366
+ 'Cannot submit a <button> or <input type="submit"> without a <form>'
1367
+ );
1368
+ let l = e.getAttribute("formaction") || u.getAttribute("action");
1369
+ if (a = l ? H(l, t) : null, r = e.getAttribute("formmethod") || u.getAttribute("method") || ae, n = me(e.getAttribute("formenctype")) || me(u.getAttribute("enctype")) || oe, o = new FormData(u, e), !sr()) {
1370
+ let { name: s, type: h, value: y } = e;
1371
+ if (h === "image") {
1372
+ let d = s ? `${s}.` : "";
1373
+ o.append(`${d}x`, "0"), o.append(`${d}y`, "0");
1374
+ } else s && o.append(s, y);
1375
+ }
1376
+ } else {
1377
+ if (se(e))
1378
+ throw new Error(
1379
+ 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
1380
+ );
1381
+ r = ae, a = null, n = oe, i = e;
1382
+ }
1383
+ return o && n === "text/plain" && (i = o, o = void 0), { action: a, method: r.toLowerCase(), encType: n, formData: o, body: i };
1384
+ }
1385
+ function xe(e, t) {
1386
+ if (e === !1 || e === null || typeof e > "u")
1387
+ throw new Error(t);
1388
+ }
1389
+ async function fr(e, t) {
1390
+ if (e.id in t)
1391
+ return t[e.id];
1392
+ try {
1393
+ let r = await import(
1394
+ /* @vite-ignore */
1395
+ /* webpackIgnore: true */
1396
+ e.module
1397
+ );
1398
+ return t[e.id] = r, r;
1399
+ } catch (r) {
1400
+ return console.error(
1401
+ `Error loading route module \`${e.module}\`, reloading page...`
1402
+ ), console.error(r), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
1403
+ });
1404
+ }
1405
+ }
1406
+ function dr(e) {
1407
+ 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";
1408
+ }
1409
+ async function hr(e, t, r) {
1410
+ let a = await Promise.all(
1411
+ e.map(async (n) => {
1412
+ let o = t.routes[n.route.id];
1413
+ if (o) {
1414
+ let i = await fr(o, r);
1415
+ return i.links ? i.links() : [];
1416
+ }
1417
+ return [];
1418
+ })
1419
+ );
1420
+ return gr(
1421
+ a.flat(1).filter(dr).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map(
1422
+ (n) => n.rel === "stylesheet" ? { ...n, rel: "prefetch", as: "style" } : { ...n, rel: "prefetch" }
1423
+ )
1424
+ );
1425
+ }
1426
+ function Fe(e, t, r, a, n, o) {
1427
+ let i = (l, s) => r[s] ? l.route.id !== r[s].route.id : !0, u = (l, s) => (
1428
+ // param change, /users/123 -> /users/456
1429
+ r[s].pathname !== l.pathname || // splat param changed, which is not present in match.path
1430
+ // e.g. /files/images/avatar.jpg -> files/finances.xls
1431
+ r[s].route.path?.endsWith("*") && r[s].params["*"] !== l.params["*"]
1432
+ );
1433
+ return o === "assets" ? t.filter(
1434
+ (l, s) => i(l, s) || u(l, s)
1435
+ ) : o === "data" ? t.filter((l, s) => {
1436
+ let h = a.routes[l.route.id];
1437
+ if (!h || !h.hasLoader)
1438
+ return !1;
1439
+ if (i(l, s) || u(l, s))
1440
+ return !0;
1441
+ if (l.route.shouldRevalidate) {
1442
+ let y = l.route.shouldRevalidate({
1443
+ currentUrl: new URL(
1444
+ n.pathname + n.search + n.hash,
1445
+ window.origin
1446
+ ),
1447
+ currentParams: r[0]?.params || {},
1448
+ nextUrl: new URL(e, window.origin),
1449
+ nextParams: l.params,
1450
+ defaultShouldRevalidate: !0
1451
+ });
1452
+ if (typeof y == "boolean")
1453
+ return y;
1454
+ }
1455
+ return !0;
1456
+ }) : [];
1457
+ }
1458
+ function mr(e, t, { includeHydrateFallback: r } = {}) {
1459
+ return pr(
1460
+ e.map((a) => {
1461
+ let n = t.routes[a.route.id];
1462
+ if (!n) return [];
1463
+ let o = [n.module];
1464
+ return n.clientActionModule && (o = o.concat(n.clientActionModule)), n.clientLoaderModule && (o = o.concat(n.clientLoaderModule)), r && n.hydrateFallbackModule && (o = o.concat(n.hydrateFallbackModule)), n.imports && (o = o.concat(n.imports)), o;
1465
+ }).flat(1)
1466
+ );
1467
+ }
1468
+ function pr(e) {
1469
+ return [...new Set(e)];
1470
+ }
1471
+ function yr(e) {
1472
+ let t = {}, r = Object.keys(e).sort();
1473
+ for (let a of r)
1474
+ t[a] = e[a];
1475
+ return t;
1476
+ }
1477
+ function gr(e, t) {
1478
+ let r = /* @__PURE__ */ new Set();
1479
+ return new Set(t), e.reduce((a, n) => {
1480
+ let o = JSON.stringify(yr(n));
1481
+ return r.has(o) || (r.add(o), a.push({ key: o, link: n })), a;
1482
+ }, []);
1483
+ }
1484
+ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
1485
+ var vr = /* @__PURE__ */ new Set([100, 101, 204, 205]);
1486
+ function wr(e, t) {
1487
+ let r = typeof e == "string" ? new URL(
1488
+ e,
1489
+ // This can be called during the SSR flow via PrefetchPageLinksImpl so
1490
+ // don't assume window is available
1491
+ typeof window > "u" ? "server://singlefetch/" : window.location.origin
1492
+ ) : e;
1493
+ return r.pathname === "/" ? r.pathname = "_root.data" : t && H(r.pathname, t) === "/" ? r.pathname = `${t.replace(/\/$/, "")}/_root.data` : r.pathname = `${r.pathname.replace(/\/$/, "")}.data`, r;
1494
+ }
1495
+ function Ze() {
1496
+ let e = c.useContext(J);
1497
+ return xe(
1498
+ e,
1499
+ "You must render this element inside a <DataRouterContext.Provider> element"
1500
+ ), e;
1501
+ }
1502
+ function xr() {
1503
+ let e = c.useContext(le);
1504
+ return xe(
1505
+ e,
1506
+ "You must render this element inside a <DataRouterStateContext.Provider> element"
1507
+ ), e;
1508
+ }
1509
+ var be = c.createContext(void 0);
1510
+ be.displayName = "FrameworkContext";
1511
+ function Qe() {
1512
+ let e = c.useContext(be);
1513
+ return xe(
1514
+ e,
1515
+ "You must render this element inside a <HydratedRouter> element"
1516
+ ), e;
1517
+ }
1518
+ function br(e, t) {
1519
+ let r = c.useContext(be), [a, n] = c.useState(!1), [o, i] = c.useState(!1), { onFocus: u, onBlur: l, onMouseEnter: s, onMouseLeave: h, onTouchStart: y } = t, d = c.useRef(null);
1520
+ c.useEffect(() => {
1521
+ if (e === "render" && i(!0), e === "viewport") {
1522
+ let g = (f) => {
1523
+ f.forEach((b) => {
1524
+ i(b.isIntersecting);
1525
+ });
1526
+ }, w = new IntersectionObserver(g, { threshold: 0.5 });
1527
+ return d.current && w.observe(d.current), () => {
1528
+ w.disconnect();
1529
+ };
1530
+ }
1531
+ }, [e]), c.useEffect(() => {
1532
+ if (a) {
1533
+ let g = setTimeout(() => {
1534
+ i(!0);
1535
+ }, 100);
1536
+ return () => {
1537
+ clearTimeout(g);
1538
+ };
1539
+ }
1540
+ }, [a]);
1541
+ let v = () => {
1542
+ n(!0);
1543
+ }, p = () => {
1544
+ n(!1), i(!1);
1545
+ };
1546
+ return r ? e !== "intent" ? [o, d, {}] : [
1547
+ o,
1548
+ d,
1549
+ {
1550
+ onFocus: X(u, v),
1551
+ onBlur: X(l, p),
1552
+ onMouseEnter: X(s, v),
1553
+ onMouseLeave: X(h, p),
1554
+ onTouchStart: X(y, v)
1555
+ }
1556
+ ] : [!1, d, {}];
1557
+ }
1558
+ function X(e, t) {
1559
+ return (r) => {
1560
+ e && e(r), r.defaultPrevented || t(r);
1561
+ };
1562
+ }
1563
+ function Rr({
1564
+ page: e,
1565
+ ...t
1566
+ }) {
1567
+ let { router: r } = Ze(), a = c.useMemo(
1568
+ () => He(r.routes, e, r.basename),
1569
+ [r.routes, e, r.basename]
1570
+ );
1571
+ return a ? /* @__PURE__ */ c.createElement(Cr, { page: e, matches: a, ...t }) : null;
1572
+ }
1573
+ function Er(e) {
1574
+ let { manifest: t, routeModules: r } = Qe(), [a, n] = c.useState([]);
1575
+ return c.useEffect(() => {
1576
+ let o = !1;
1577
+ return hr(e, t, r).then(
1578
+ (i) => {
1579
+ o || n(i);
1580
+ }
1581
+ ), () => {
1582
+ o = !0;
1583
+ };
1584
+ }, [e, t, r]), a;
1585
+ }
1586
+ function Cr({
1587
+ page: e,
1588
+ matches: t,
1589
+ ...r
1590
+ }) {
1591
+ let a = W(), { manifest: n, routeModules: o } = Qe(), { basename: i } = Ze(), { loaderData: u, matches: l } = xr(), s = c.useMemo(
1592
+ () => Fe(
1593
+ e,
1594
+ t,
1595
+ l,
1596
+ n,
1597
+ a,
1598
+ "data"
1599
+ ),
1600
+ [e, t, l, n, a]
1601
+ ), h = c.useMemo(
1602
+ () => Fe(
1603
+ e,
1604
+ t,
1605
+ l,
1606
+ n,
1607
+ a,
1608
+ "assets"
1609
+ ),
1610
+ [e, t, l, n, a]
1611
+ ), y = c.useMemo(() => {
1612
+ if (e === a.pathname + a.search + a.hash)
1613
+ return [];
1614
+ let p = /* @__PURE__ */ new Set(), g = !1;
1615
+ if (t.forEach((f) => {
1616
+ let b = n.routes[f.route.id];
1617
+ !b || !b.hasLoader || (!s.some((R) => R.route.id === f.route.id) && f.route.id in u && o[f.route.id]?.shouldRevalidate || b.hasClientLoader ? g = !0 : p.add(f.route.id));
1618
+ }), p.size === 0)
1619
+ return [];
1620
+ let w = wr(e, i);
1621
+ return g && p.size > 0 && w.searchParams.set(
1622
+ "_routes",
1623
+ t.filter((f) => p.has(f.route.id)).map((f) => f.route.id).join(",")
1624
+ ), [w.pathname + w.search];
1625
+ }, [
1626
+ i,
1627
+ u,
1628
+ a,
1629
+ n,
1630
+ s,
1631
+ t,
1632
+ e,
1633
+ o
1634
+ ]), d = c.useMemo(
1635
+ () => mr(h, n),
1636
+ [h, n]
1637
+ ), v = Er(h);
1638
+ return /* @__PURE__ */ c.createElement(c.Fragment, null, y.map((p) => /* @__PURE__ */ c.createElement("link", { key: p, rel: "prefetch", as: "fetch", href: p, ...r })), d.map((p) => /* @__PURE__ */ c.createElement("link", { key: p, rel: "modulepreload", href: p, ...r })), v.map(({ key: p, link: g }) => (
1639
+ // these don't spread `linkProps` because they are full link descriptors
1640
+ // already with their own props
1641
+ /* @__PURE__ */ c.createElement("link", { key: p, ...g })
1642
+ )));
1643
+ }
1644
+ function Sr(...e) {
1645
+ return (t) => {
1646
+ e.forEach((r) => {
1647
+ typeof r == "function" ? r(t) : r != null && (r.current = t);
1648
+ });
1649
+ };
1650
+ }
1651
+ var et = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
1652
+ try {
1653
+ et && (window.__reactRouterVersion = "7.6.3");
1654
+ } catch {
1655
+ }
1656
+ function kr({
1657
+ basename: e,
1658
+ children: t,
1659
+ window: r
1660
+ }) {
1661
+ let a = c.useRef();
1662
+ a.current == null && (a.current = ht({ window: r, v5Compat: !0 }));
1663
+ let n = a.current, [o, i] = c.useState({
1664
+ action: n.action,
1665
+ location: n.location
1666
+ }), u = c.useCallback(
1667
+ (l) => {
1668
+ c.startTransition(() => i(l));
1669
+ },
1670
+ [i]
1671
+ );
1672
+ return c.useLayoutEffect(() => n.listen(u), [n, u]), /* @__PURE__ */ c.createElement(
1673
+ tr,
1674
+ {
1675
+ basename: e,
1676
+ children: t,
1677
+ location: o.location,
1678
+ navigationType: o.action,
1679
+ navigator: n
1680
+ }
1681
+ );
1682
+ }
1683
+ var tt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, rt = c.forwardRef(
1684
+ function({
1685
+ onClick: t,
1686
+ discover: r = "render",
1687
+ prefetch: a = "none",
1688
+ relative: n,
1689
+ reloadDocument: o,
1690
+ replace: i,
1691
+ state: u,
1692
+ target: l,
1693
+ to: s,
1694
+ preventScrollReset: h,
1695
+ viewTransition: y,
1696
+ ...d
1697
+ }, v) {
1698
+ let { basename: p } = c.useContext(F), g = typeof s == "string" && tt.test(s), w, f = !1;
1699
+ if (typeof s == "string" && g && (w = s, et))
1700
+ try {
1701
+ let $ = new URL(window.location.href), A = s.startsWith("//") ? new URL($.protocol + s) : new URL(s), V = H(A.pathname, p);
1702
+ A.origin === $.origin && V != null ? s = V + A.search + A.hash : f = !0;
1703
+ } catch {
1704
+ N(
1705
+ !1,
1706
+ `<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1707
+ );
1708
+ }
1709
+ let b = Mt(s, { relative: n }), [R, k, T] = br(
1710
+ a,
1711
+ d
1712
+ ), U = Lr(s, {
1713
+ replace: i,
1714
+ state: u,
1715
+ target: l,
1716
+ preventScrollReset: h,
1717
+ relative: n,
1718
+ viewTransition: y
1719
+ });
1720
+ function O($) {
1721
+ t && t($), $.defaultPrevented || U($);
1722
+ }
1723
+ let _ = (
1724
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
1725
+ /* @__PURE__ */ c.createElement(
1726
+ "a",
1727
+ {
1728
+ ...d,
1729
+ ...T,
1730
+ href: w || b,
1731
+ onClick: f || o ? t : O,
1732
+ ref: Sr(v, k),
1733
+ target: l,
1734
+ "data-discover": !g && r === "render" ? "true" : void 0
1735
+ }
1736
+ )
1737
+ );
1738
+ return R && !g ? /* @__PURE__ */ c.createElement(c.Fragment, null, _, /* @__PURE__ */ c.createElement(Rr, { page: b })) : _;
1739
+ }
1740
+ );
1741
+ rt.displayName = "Link";
1742
+ var Pr = c.forwardRef(
1743
+ function({
1744
+ "aria-current": t = "page",
1745
+ caseSensitive: r = !1,
1746
+ className: a = "",
1747
+ end: n = !1,
1748
+ style: o,
1749
+ to: i,
1750
+ viewTransition: u,
1751
+ children: l,
1752
+ ...s
1753
+ }, h) {
1754
+ let y = te(i, { relative: s.relative }), d = W(), v = c.useContext(le), { navigator: p, basename: g } = c.useContext(F), w = v != null && // Conditional usage is OK here because the usage of a data router is static
1755
+ // eslint-disable-next-line react-hooks/rules-of-hooks
1756
+ Dr(y) && u === !0, f = p.encodeLocation ? p.encodeLocation(y).pathname : y.pathname, b = d.pathname, R = v && v.navigation && v.navigation.location ? v.navigation.location.pathname : null;
1757
+ r || (b = b.toLowerCase(), R = R ? R.toLowerCase() : null, f = f.toLowerCase()), R && g && (R = H(R, g) || R);
1758
+ const k = f !== "/" && f.endsWith("/") ? f.length - 1 : f.length;
1759
+ let T = b === f || !n && b.startsWith(f) && b.charAt(k) === "/", U = R != null && (R === f || !n && R.startsWith(f) && R.charAt(f.length) === "/"), O = {
1760
+ isActive: T,
1761
+ isPending: U,
1762
+ isTransitioning: w
1763
+ }, _ = T ? t : void 0, $;
1764
+ typeof a == "function" ? $ = a(O) : $ = [
1765
+ a,
1766
+ T ? "active" : null,
1767
+ U ? "pending" : null,
1768
+ w ? "transitioning" : null
1769
+ ].filter(Boolean).join(" ");
1770
+ let A = typeof o == "function" ? o(O) : o;
1771
+ return /* @__PURE__ */ c.createElement(
1772
+ rt,
1773
+ {
1774
+ ...s,
1775
+ "aria-current": _,
1776
+ className: $,
1777
+ ref: h,
1778
+ style: A,
1779
+ to: i,
1780
+ viewTransition: u
1781
+ },
1782
+ typeof l == "function" ? l(O) : l
1783
+ );
1784
+ }
1785
+ );
1786
+ Pr.displayName = "NavLink";
1787
+ var Tr = c.forwardRef(
1788
+ ({
1789
+ discover: e = "render",
1790
+ fetcherKey: t,
1791
+ navigate: r,
1792
+ reloadDocument: a,
1793
+ replace: n,
1794
+ state: o,
1795
+ method: i = ae,
1796
+ action: u,
1797
+ onSubmit: l,
1798
+ relative: s,
1799
+ preventScrollReset: h,
1800
+ viewTransition: y,
1801
+ ...d
1802
+ }, v) => {
1803
+ let p = _r(), g = Ar(u, { relative: s }), w = i.toLowerCase() === "get" ? "get" : "post", f = typeof u == "string" && tt.test(u), b = (R) => {
1804
+ if (l && l(R), R.defaultPrevented) return;
1805
+ R.preventDefault();
1806
+ let k = R.nativeEvent.submitter, T = k?.getAttribute("formmethod") || i;
1807
+ p(k || R.currentTarget, {
1808
+ fetcherKey: t,
1809
+ method: T,
1810
+ navigate: r,
1811
+ replace: n,
1812
+ state: o,
1813
+ relative: s,
1814
+ preventScrollReset: h,
1815
+ viewTransition: y
1816
+ });
1817
+ };
1818
+ return /* @__PURE__ */ c.createElement(
1819
+ "form",
1820
+ {
1821
+ ref: v,
1822
+ method: w,
1823
+ action: g,
1824
+ onSubmit: a ? l : b,
1825
+ ...d,
1826
+ "data-discover": !f && e === "render" ? "true" : void 0
1827
+ }
1828
+ );
1829
+ }
1830
+ );
1831
+ Tr.displayName = "Form";
1832
+ function Ir(e) {
1833
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1834
+ }
1835
+ function nt(e) {
1836
+ let t = c.useContext(J);
1837
+ return S(t, Ir(e)), t;
1838
+ }
1839
+ function Lr(e, {
1840
+ target: t,
1841
+ replace: r,
1842
+ state: a,
1843
+ preventScrollReset: n,
1844
+ relative: o,
1845
+ viewTransition: i
1846
+ } = {}) {
1847
+ let u = qe(), l = W(), s = te(e, { relative: o });
1848
+ return c.useCallback(
1849
+ (h) => {
1850
+ if (lr(h, t)) {
1851
+ h.preventDefault();
1852
+ let y = r !== void 0 ? r : Z(l) === Z(s);
1853
+ u(e, {
1854
+ replace: y,
1855
+ state: a,
1856
+ preventScrollReset: n,
1857
+ relative: o,
1858
+ viewTransition: i
1859
+ });
1860
+ }
1861
+ },
1862
+ [
1863
+ l,
1864
+ u,
1865
+ s,
1866
+ r,
1867
+ a,
1868
+ t,
1869
+ e,
1870
+ n,
1871
+ o,
1872
+ i
1873
+ ]
1874
+ );
1875
+ }
1876
+ var $r = 0, Or = () => `__${String(++$r)}__`;
1877
+ function _r() {
1878
+ let { router: e } = nt(
1879
+ "useSubmit"
1880
+ /* UseSubmit */
1881
+ ), { basename: t } = c.useContext(F), r = Xt();
1882
+ return c.useCallback(
1883
+ async (a, n = {}) => {
1884
+ let { action: o, method: i, encType: u, formData: l, body: s } = cr(
1885
+ a,
1886
+ t
1887
+ );
1888
+ if (n.navigate === !1) {
1889
+ let h = n.fetcherKey || Or();
1890
+ await e.fetch(h, r, n.action || o, {
1891
+ preventScrollReset: n.preventScrollReset,
1892
+ formData: l,
1893
+ body: s,
1894
+ formMethod: n.method || i,
1895
+ formEncType: n.encType || u,
1896
+ flushSync: n.flushSync
1897
+ });
1898
+ } else
1899
+ await e.navigate(n.action || o, {
1900
+ preventScrollReset: n.preventScrollReset,
1901
+ formData: l,
1902
+ body: s,
1903
+ formMethod: n.method || i,
1904
+ formEncType: n.encType || u,
1905
+ replace: n.replace,
1906
+ state: n.state,
1907
+ fromRouteId: r,
1908
+ flushSync: n.flushSync,
1909
+ viewTransition: n.viewTransition
1910
+ });
1911
+ },
1912
+ [e, t, r]
1913
+ );
1914
+ }
1915
+ function Ar(e, { relative: t } = {}) {
1916
+ let { basename: r } = c.useContext(F), a = c.useContext(M);
1917
+ S(a, "useFormAction must be used inside a RouteContext");
1918
+ let [n] = a.matches.slice(-1), o = { ...te(e || ".", { relative: t }) }, i = W();
1919
+ if (e == null) {
1920
+ o.search = i.search;
1921
+ let u = new URLSearchParams(o.search), l = u.getAll("index");
1922
+ if (l.some((h) => h === "")) {
1923
+ u.delete("index"), l.filter((y) => y).forEach((y) => u.append("index", y));
1924
+ let h = u.toString();
1925
+ o.search = h ? `?${h}` : "";
1926
+ }
1927
+ }
1928
+ return (!e || e === ".") && n.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : j([r, o.pathname])), Z(o);
1929
+ }
1930
+ function Dr(e, t = {}) {
1931
+ let r = c.useContext(ze);
1932
+ S(
1933
+ r != null,
1934
+ "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
1935
+ );
1936
+ let { basename: a } = nt(
1937
+ "useViewTransitionState"
1938
+ /* useViewTransitionState */
1939
+ ), n = te(e, { relative: t.relative });
1940
+ if (!r.isTransitioning)
1941
+ return !1;
1942
+ let o = H(r.currentLocation.pathname, a) || r.currentLocation.pathname, i = H(r.nextLocation.pathname, a) || r.nextLocation.pathname;
1943
+ return ie(n.pathname, i) != null || ie(n.pathname, o) != null;
1944
+ }
1945
+ [
1946
+ ...vr
1947
+ ];
1948
+ const at = E.createContext({
1949
+ history: [],
1950
+ addToHistory: () => {
1951
+ },
1952
+ popFromHistory: () => "",
1953
+ replaceHistory: () => {
1954
+ }
1955
+ }), Mr = ({
1956
+ routes: e,
1957
+ children: t
1958
+ }) => {
1959
+ const r = E.useRef(["/"]), [a, n] = E.useState(["/"]), o = E.useCallback((h) => {
1960
+ r.current = h, n(h);
1961
+ }, []), i = (h) => {
1962
+ o([...r.current, h]);
1963
+ }, u = (h) => {
1964
+ let y = "", d = [];
1965
+ return r.current.length === 0 ? "/" : (r.current.length <= h ? (y = r.current[0], d = [y]) : (d = r.current.slice(
1966
+ 0,
1967
+ r.current.length - h
1968
+ ), y = d[d.length - 1]), o(d), y);
1969
+ }, l = (h) => {
1970
+ o(h);
1971
+ }, s = e.map((h) => /* @__PURE__ */ P.jsx(Xe, { path: h.path, element: h.render }));
1972
+ return /* @__PURE__ */ P.jsx(
1973
+ at.Provider,
1974
+ {
1975
+ value: {
1976
+ history: a,
1977
+ addToHistory: i,
1978
+ popFromHistory: u,
1979
+ replaceHistory: l
1980
+ },
1981
+ children: /* @__PURE__ */ P.jsxs(kr, { children: [
1982
+ t,
1983
+ /* @__PURE__ */ P.jsx(rr, { children: s })
1984
+ ] })
1985
+ }
1986
+ );
1987
+ }, Ur = () => {
1988
+ const e = qe(), t = W(), r = je(at), a = E.useCallback(
1989
+ (i, u = !0) => {
1990
+ i !== t.pathname && e(i, { replace: !0 }), u && r.addToHistory(i);
1991
+ },
1992
+ [t.pathname, e, r]
1993
+ ), n = E.useCallback(
1994
+ (i) => {
1995
+ const u = i || 1, l = r.popFromHistory(u);
1996
+ a(l, !1);
1997
+ },
1998
+ [a, r]
1999
+ ), o = E.useCallback(
2000
+ (i) => {
2001
+ r.replaceHistory(i);
2002
+ },
2003
+ [r]
2004
+ );
2005
+ return {
2006
+ currentPath: t.pathname,
2007
+ history: r.history,
2008
+ goBack: n,
2009
+ goTo: a,
2010
+ replaceHistory: o
2011
+ };
2012
+ }, ot = E.createContext(
2013
+ {
2014
+ visibleItems: [],
2015
+ isItemVisible: () => !1,
2016
+ showItem: () => {
2017
+ },
2018
+ hideItem: () => {
2019
+ }
2020
+ }
2021
+ ), Br = ({ children: e }) => {
2022
+ const t = E.useRef([]), [r, a] = E.useState([]), n = E.useCallback((l) => {
2023
+ console.log("ZAU UPDATING VISIBLE ITEMS", l), t.current = l, a(l);
2024
+ }, []), o = E.useCallback((l) => t.current.some((s) => s === l), []), i = E.useCallback(
2025
+ (l) => {
2026
+ o(l) || n([...t.current, l]);
2027
+ },
2028
+ [o, n]
2029
+ ), u = E.useCallback(
2030
+ (l) => {
2031
+ o(l) && n(
2032
+ t.current.filter((h) => h !== l)
2033
+ );
2034
+ },
2035
+ [o, n]
2036
+ );
2037
+ return /* @__PURE__ */ P.jsx(
2038
+ ot.Provider,
2039
+ {
2040
+ value: {
2041
+ visibleItems: r,
2042
+ isItemVisible: o,
2043
+ showItem: i,
2044
+ hideItem: u
2045
+ },
2046
+ children: e
2047
+ }
2048
+ );
2049
+ }, Re = () => {
2050
+ const e = je(ot), t = (n) => e.visibleItems.some((o) => o === n), r = (n) => {
2051
+ e.showItem(n);
2052
+ }, a = (n) => {
2053
+ e.hideItem(n);
2054
+ };
2055
+ return {
2056
+ visibleItems: e.visibleItems,
2057
+ isItemVisible: t,
2058
+ showItem: r,
2059
+ hideItem: a
2060
+ };
2061
+ }, Nr = ({
2062
+ id: e,
2063
+ onCloseDrawer: t,
2064
+ drawerCloseOffset: r = 15
2065
+ }) => {
2066
+ const { isItemVisible: a } = Re(), n = E.useRef(!1), o = E.useRef(null), i = E.useRef(null), u = E.useRef(null), [l, s] = E.useState(0), h = E.useRef(void 0), y = (p) => {
2067
+ n.current = !0;
2068
+ const g = p.clientY;
2069
+ h.current = g;
2070
+ }, d = (p) => {
2071
+ n.current = !1, h.current = void 0, s(0);
2072
+ }, v = (p) => {
2073
+ if (!(!o || !i || !u) && n.current && h.current !== void 0) {
2074
+ const g = p.clientY, w = i.current?.clientHeight || 0;
2075
+ let f = h.current - g;
2076
+ f = -f, s(
2077
+ f < 0 ? 0 : -f
2078
+ ), f >= w - r && (t?.(), d());
2079
+ }
2080
+ };
2081
+ return {
2082
+ isVisible: a(e),
2083
+ drawerParentRef: o,
2084
+ drawerRef: i,
2085
+ drawerBottomDistance: l,
2086
+ handleRef: u,
2087
+ onDragStart: y,
2088
+ onDrag: v,
2089
+ onDragEnd: d
2090
+ };
2091
+ }, Wr = (e) => {
2092
+ const { children: t, backgroundStyles: r, contentStyles: a, handle: n } = e, {
2093
+ isVisible: o,
2094
+ drawerParentRef: i,
2095
+ drawerRef: u,
2096
+ handleRef: l,
2097
+ drawerBottomDistance: s,
2098
+ onDragStart: h,
2099
+ onDrag: y,
2100
+ onDragEnd: d
2101
+ } = Nr(e);
2102
+ return /* @__PURE__ */ P.jsx(P.Fragment, { children: o && /* @__PURE__ */ P.jsx(
2103
+ "div",
2104
+ {
2105
+ ref: i,
2106
+ style: {
2107
+ width: "100%",
2108
+ height: "100%",
2109
+ minHeight: "100vh",
2110
+ left: 0,
2111
+ top: 0,
2112
+ background: "#00000068",
2113
+ position: "fixed",
2114
+ zIndex: 1e3,
2115
+ display: "flex",
2116
+ flexDirection: "column",
2117
+ touchAction: "none",
2118
+ ...r
2119
+ },
2120
+ onPointerUp: d,
2121
+ onPointerMoveCapture: y,
2122
+ children: /* @__PURE__ */ P.jsxs(
2123
+ "div",
2124
+ {
2125
+ ref: u,
2126
+ style: {
2127
+ width: "100%",
2128
+ height: "fit-content",
2129
+ minHeight: "80px",
2130
+ maxHeight: "90%",
2131
+ background: "#ffffff",
2132
+ borderTopLeftRadius: "16px",
2133
+ borderTopRightRadius: "16px",
2134
+ display: "flex",
2135
+ flexDirection: "column",
2136
+ alignItems: "center",
2137
+ justifyContent: "center",
2138
+ padding: "24px",
2139
+ zIndex: 1001,
2140
+ position: "absolute",
2141
+ bottom: `${s}px`,
2142
+ ...a
2143
+ },
2144
+ onClick: (v) => {
2145
+ v.stopPropagation();
2146
+ },
2147
+ children: [
2148
+ /* @__PURE__ */ P.jsx(
2149
+ "div",
2150
+ {
2151
+ ref: l,
2152
+ style: {
2153
+ display: "flex",
2154
+ alignItems: "center",
2155
+ justifyContent: "center",
2156
+ position: "absolute",
2157
+ top: "0px",
2158
+ height: "24px",
2159
+ width: "100%",
2160
+ cursor: "pointer",
2161
+ ...n?.styles
2162
+ },
2163
+ onPointerDown: h,
2164
+ children: n?.render
2165
+ }
2166
+ ),
2167
+ t
2168
+ ]
2169
+ }
2170
+ )
2171
+ }
2172
+ ) });
2173
+ }, Vr = ({
2174
+ id: e,
2175
+ children: t,
2176
+ backgroundStyles: r,
2177
+ contentStyles: a,
2178
+ onClickOutsideModal: n
2179
+ }) => {
2180
+ const { isItemVisible: o } = Re();
2181
+ return /* @__PURE__ */ P.jsx(P.Fragment, { children: o(e) && /* @__PURE__ */ P.jsx(
2182
+ "div",
2183
+ {
2184
+ style: {
2185
+ width: "100%",
2186
+ height: "100%",
2187
+ minHeight: "100vh",
2188
+ background: "#00000068",
2189
+ position: "fixed",
2190
+ top: "50%",
2191
+ left: "50%",
2192
+ transform: "translate(-50%, -50%)",
2193
+ zIndex: 1e3,
2194
+ display: "flex",
2195
+ flexDirection: "column",
2196
+ alignItems: "center",
2197
+ justifyContent: "center",
2198
+ ...r
2199
+ },
2200
+ onClick: () => {
2201
+ n?.();
2202
+ },
2203
+ children: /* @__PURE__ */ P.jsx(
2204
+ "div",
2205
+ {
2206
+ style: {
2207
+ width: "90%",
2208
+ maxWidth: "375px",
2209
+ height: "fit-content",
2210
+ minHeight: "80px",
2211
+ maxHeight: "50%",
2212
+ background: "#ffffff",
2213
+ borderRadius: "16px",
2214
+ display: "flex",
2215
+ flexDirection: "column",
2216
+ alignItems: "center",
2217
+ justifyContent: "center",
2218
+ zIndex: 1001,
2219
+ position: "relative",
2220
+ padding: "24px",
2221
+ ...a
2222
+ },
2223
+ onClick: (i) => {
2224
+ i.stopPropagation();
2225
+ },
2226
+ children: t
2227
+ }
2228
+ )
2229
+ }
2230
+ ) });
2231
+ }, zr = ({
2232
+ id: e,
2233
+ children: t,
2234
+ styles: r,
2235
+ durationInSeconds: a = 3
2236
+ }) => {
2237
+ const n = E.useRef(!1), { isItemVisible: o, hideItem: i } = Re();
2238
+ return E.useEffect(() => {
2239
+ const u = o(e);
2240
+ n.current !== u && (n.current = u, u && setTimeout(() => i(e), a * 1e3));
2241
+ }, [n, o, i]), /* @__PURE__ */ P.jsx(P.Fragment, { children: o(e) && /* @__PURE__ */ P.jsx(
2242
+ "div",
2243
+ {
2244
+ style: {
2245
+ width: "100px",
2246
+ height: "40px",
2247
+ background: "#534a4aff",
2248
+ color: "#ffffff",
2249
+ position: "fixed",
2250
+ top: "10px",
2251
+ left: "50%",
2252
+ transform: "translateX(-50%)",
2253
+ zIndex: 1e3,
2254
+ borderRadius: "20px",
2255
+ display: "flex",
2256
+ flexDirection: "column",
2257
+ alignItems: "center",
2258
+ justifyContent: "center",
2259
+ border: "solid 3px #000000ff",
2260
+ ...r
2261
+ },
2262
+ onClick: (u) => {
2263
+ u.stopPropagation();
2264
+ },
2265
+ children: t
2266
+ }
2267
+ ) });
2268
+ }, Yr = ({
2269
+ overflowEllipsis: e,
2270
+ children: t,
2271
+ styles: r
2272
+ }) => /* @__PURE__ */ P.jsx(
2273
+ "p",
2274
+ {
2275
+ style: {
2276
+ maxWidth: "100%",
2277
+ overflow: "hidden",
2278
+ whiteSpace: e ? "nowrap" : "normal",
2279
+ textOverflow: "ellipsis",
2280
+ fontSize: "16px",
2281
+ fontStyle: "normal",
2282
+ lineHeight: "normal",
2283
+ color: "inherit",
2284
+ ...r
2285
+ },
2286
+ children: t
2287
+ }
2288
+ );
2289
+ class Jr {
2290
+ static isScrollEnabled = () => document.body.style.overflow === "unset" || document.body.style.overflow === "auto";
2291
+ static disableScroll = () => {
2292
+ document.body.style.overflow = "hidden";
2293
+ };
2294
+ static enableScroll = () => {
2295
+ document.body.style.overflow = "unset";
2296
+ };
2297
+ }
2298
+ class qr {
2299
+ static getPascalCase = (t) => t.replace(/\w+/g, function(r) {
2300
+ return r[0].toUpperCase() + r.slice(1).toLowerCase();
2301
+ });
2302
+ static isEqual = (t, r, a = !0) => a ? t === r : t.toUpperCase() === r.toUpperCase();
2303
+ }
2304
+ const Gr = (e) => st(e, []), Kr = () => {
2305
+ const e = (r, a) => {
2306
+ let n = 0, o = `${r}?`;
2307
+ for (const i in a) {
2308
+ const u = a[i];
2309
+ n > 0 && (o = `${o}&`), o = `${o}${i}=${u}`, n++;
2310
+ }
2311
+ return o;
2312
+ };
2313
+ return async (r, a) => {
2314
+ const n = e(r, a);
2315
+ return await (await fetch(n)).json();
2316
+ };
2317
+ }, Fr = 480, jr = 768, Xr = () => {
2318
+ const [e, t] = E.useState("desktop");
2319
+ return E.useEffect(() => {
2320
+ const r = () => {
2321
+ window.innerWidth <= Fr ? t("mobile") : window.innerWidth <= jr ? t("tablet") : t("desktop");
2322
+ };
2323
+ return window.addEventListener("resize", r), () => {
2324
+ window.removeEventListener("resize", r);
2325
+ };
2326
+ }, []), {
2327
+ device: e
2328
+ };
2329
+ };
2330
+ export {
2331
+ Wr as Drawer,
2332
+ Br as FeedbackProvider,
2333
+ Vr as Modal,
2334
+ Mr as NavigationProvider,
2335
+ Jr as ScrollHelper,
2336
+ qr as TextHelper,
2337
+ zr as Toast,
2338
+ Yr as Typography,
2339
+ Gr as useDidMount,
2340
+ Re as useFeedback,
2341
+ Kr as useFetch,
2342
+ Ur as useNavigation,
2343
+ Xr as useResponsive
2344
+ };