@eliseubatista99/react-scaffold-core 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -21
- package/dist/components/index.d.ts +1 -0
- package/dist/components/pageLayout/index.d.ts +1 -0
- package/dist/components/pageLayout/pageLayout.d.ts +14 -0
- package/dist/components/pageLayout/stories/pageLayout.stories.d.ts +19 -0
- package/dist/components/pageLayout/stories/setup.d.ts +2 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useResponsive/stories/setup.d.ts +2 -1
- package/dist/hooks/useResponsive/stories/useResponsive.stories.d.ts +3 -2
- package/dist/hooks/useResponsive/useResponsive.d.ts +13 -4
- package/dist/hooks/useTranslations/index.d.ts +1 -0
- package/dist/hooks/useTranslations/stories/setup.d.ts +2 -0
- package/dist/hooks/useTranslations/stories/useTranslations.stories.d.ts +18 -0
- package/dist/hooks/useTranslations/useTranslations.d.ts +14 -0
- package/dist/index.cjs.js +6 -6
- package/dist/index.es.js +610 -492
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as c from "react";
|
|
2
|
-
import
|
|
2
|
+
import C, { useContext as He, useEffect as Me, useState as ct, useMemo as ft } from "react";
|
|
3
3
|
var re = { exports: {} }, q = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
@@ -11,7 +11,7 @@ var re = { exports: {} }, q = {};
|
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
13
|
var Ie;
|
|
14
|
-
function
|
|
14
|
+
function dt() {
|
|
15
15
|
if (Ie) return q;
|
|
16
16
|
Ie = 1;
|
|
17
17
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
@@ -43,7 +43,7 @@ var G = {};
|
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
45
|
var Le;
|
|
46
|
-
function
|
|
46
|
+
function ht() {
|
|
47
47
|
return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
48
|
function e(m) {
|
|
49
49
|
if (m == null) return null;
|
|
@@ -51,11 +51,11 @@ function ct() {
|
|
|
51
51
|
return m.$$typeof === A ? null : m.displayName || m.name || null;
|
|
52
52
|
if (typeof m == "string") return m;
|
|
53
53
|
switch (m) {
|
|
54
|
-
case
|
|
54
|
+
case y:
|
|
55
55
|
return "Fragment";
|
|
56
56
|
case f:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case x:
|
|
59
59
|
return "StrictMode";
|
|
60
60
|
case T:
|
|
61
61
|
return "Suspense";
|
|
@@ -74,15 +74,15 @@ function ct() {
|
|
|
74
74
|
return (m.displayName || "Context") + ".Provider";
|
|
75
75
|
case b:
|
|
76
76
|
return (m._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case
|
|
78
|
-
var
|
|
79
|
-
return m = m.displayName, m || (m =
|
|
77
|
+
case P:
|
|
78
|
+
var w = m.render;
|
|
79
|
+
return m = m.displayName, m || (m = w.displayName || w.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
|
|
80
80
|
case O:
|
|
81
|
-
return
|
|
81
|
+
return w = m.displayName || null, w !== null ? w : e(m.type) || "Memo";
|
|
82
82
|
case _:
|
|
83
|
-
|
|
83
|
+
w = m._payload, m = m._init;
|
|
84
84
|
try {
|
|
85
|
-
return e(m(
|
|
85
|
+
return e(m(w));
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -94,33 +94,33 @@ function ct() {
|
|
|
94
94
|
function r(m) {
|
|
95
95
|
try {
|
|
96
96
|
t(m);
|
|
97
|
-
var
|
|
97
|
+
var w = !1;
|
|
98
98
|
} catch {
|
|
99
|
-
|
|
99
|
+
w = !0;
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var
|
|
104
|
-
return
|
|
105
|
-
|
|
101
|
+
if (w) {
|
|
102
|
+
w = console;
|
|
103
|
+
var E = w.error, I = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
104
|
+
return E.call(
|
|
105
|
+
w,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
107
|
I
|
|
108
108
|
), t(m);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
function a(m) {
|
|
112
|
-
if (m ===
|
|
112
|
+
if (m === y) return "<>";
|
|
113
113
|
if (typeof m == "object" && m !== null && m.$$typeof === _)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
|
-
var
|
|
117
|
-
return
|
|
116
|
+
var w = e(m);
|
|
117
|
+
return w ? "<" + w + ">" : "<...>";
|
|
118
118
|
} catch {
|
|
119
119
|
return "<...>";
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function n() {
|
|
123
|
-
var m =
|
|
123
|
+
var m = W.A;
|
|
124
124
|
return m === null ? null : m.getOwner();
|
|
125
125
|
}
|
|
126
126
|
function o() {
|
|
@@ -128,20 +128,20 @@ function ct() {
|
|
|
128
128
|
}
|
|
129
129
|
function i(m) {
|
|
130
130
|
if (Ee.call(m, "key")) {
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
131
|
+
var w = Object.getOwnPropertyDescriptor(m, "key").get;
|
|
132
|
+
if (w && w.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
134
|
return m.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function u(m,
|
|
137
|
-
function
|
|
136
|
+
function u(m, w) {
|
|
137
|
+
function E() {
|
|
138
138
|
Ce || (Ce = !0, console.error(
|
|
139
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
|
-
|
|
140
|
+
w
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
get:
|
|
143
|
+
E.isReactWarning = !0, Object.defineProperty(m, "key", {
|
|
144
|
+
get: E,
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
@@ -151,14 +151,14 @@ function ct() {
|
|
|
151
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
152
|
)), m = this.props.ref, m !== void 0 ? m : null;
|
|
153
153
|
}
|
|
154
|
-
function s(m,
|
|
155
|
-
return
|
|
154
|
+
function s(m, w, E, I, B, D, ce, fe) {
|
|
155
|
+
return E = D.ref, m = {
|
|
156
156
|
$$typeof: v,
|
|
157
157
|
type: m,
|
|
158
|
-
key:
|
|
158
|
+
key: w,
|
|
159
159
|
props: D,
|
|
160
160
|
_owner: B
|
|
161
|
-
}, (
|
|
161
|
+
}, (E !== void 0 ? E : null) !== null ? Object.defineProperty(m, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
163
|
get: l
|
|
164
164
|
}) : Object.defineProperty(m, "ref", { enumerable: !1, value: null }), m._store = {}, Object.defineProperty(m._store, "validated", {
|
|
@@ -183,25 +183,25 @@ function ct() {
|
|
|
183
183
|
value: fe
|
|
184
184
|
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
185
185
|
}
|
|
186
|
-
function h(m,
|
|
187
|
-
var L =
|
|
186
|
+
function h(m, w, E, I, B, D, ce, fe) {
|
|
187
|
+
var L = w.children;
|
|
188
188
|
if (L !== void 0)
|
|
189
189
|
if (I)
|
|
190
|
-
if (
|
|
190
|
+
if (st(L)) {
|
|
191
191
|
for (I = 0; I < L.length; I++)
|
|
192
|
-
|
|
192
|
+
g(L[I]);
|
|
193
193
|
Object.freeze && Object.freeze(L);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
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
197
|
);
|
|
198
|
-
else
|
|
199
|
-
if (Ee.call(
|
|
198
|
+
else g(L);
|
|
199
|
+
if (Ee.call(w, "key")) {
|
|
200
200
|
L = e(m);
|
|
201
|
-
var
|
|
202
|
-
return
|
|
201
|
+
var V = Object.keys(w).filter(function(ut) {
|
|
202
|
+
return ut !== "key";
|
|
203
203
|
});
|
|
204
|
-
I = 0 <
|
|
204
|
+
I = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Te[L + I] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
@@ -210,17 +210,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
211
|
I,
|
|
212
212
|
L,
|
|
213
|
-
|
|
213
|
+
V,
|
|
214
214
|
L
|
|
215
215
|
), Te[L + I] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (L = null,
|
|
218
|
-
|
|
219
|
-
for (var de in
|
|
220
|
-
de !== "key" && (
|
|
221
|
-
} else
|
|
217
|
+
if (L = null, E !== void 0 && (r(E), L = "" + E), i(w) && (r(w.key), L = "" + w.key), "key" in w) {
|
|
218
|
+
E = {};
|
|
219
|
+
for (var de in w)
|
|
220
|
+
de !== "key" && (E[de] = w[de]);
|
|
221
|
+
} else E = w;
|
|
222
222
|
return L && u(
|
|
223
|
-
|
|
223
|
+
E,
|
|
224
224
|
typeof m == "function" ? m.displayName || m.name || "Unknown" : m
|
|
225
225
|
), s(
|
|
226
226
|
m,
|
|
@@ -228,15 +228,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
228
228
|
D,
|
|
229
229
|
B,
|
|
230
230
|
n(),
|
|
231
|
-
|
|
231
|
+
E,
|
|
232
232
|
ce,
|
|
233
233
|
fe
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function g(m) {
|
|
237
237
|
typeof m == "object" && m !== null && m.$$typeof === v && m._store && (m._store.validated = 1);
|
|
238
238
|
}
|
|
239
|
-
var d =
|
|
239
|
+
var d = C, v = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), R = Symbol.for("react.context"), P = 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"), W = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ee = Object.prototype.hasOwnProperty, st = Array.isArray, ue = console.createTask ? console.createTask : function() {
|
|
240
240
|
return null;
|
|
241
241
|
};
|
|
242
242
|
d = {
|
|
@@ -248,24 +248,24 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
d,
|
|
249
249
|
o
|
|
250
250
|
)(), Pe = ue(a(o)), Te = {};
|
|
251
|
-
G.Fragment =
|
|
252
|
-
var D = 1e4 >
|
|
251
|
+
G.Fragment = y, G.jsx = function(m, w, E, I, B) {
|
|
252
|
+
var D = 1e4 > W.recentlyCreatedOwnerStacks++;
|
|
253
253
|
return h(
|
|
254
254
|
m,
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
w,
|
|
256
|
+
E,
|
|
257
257
|
!1,
|
|
258
258
|
I,
|
|
259
259
|
B,
|
|
260
260
|
D ? Error("react-stack-top-frame") : ke,
|
|
261
261
|
D ? ue(a(m)) : Pe
|
|
262
262
|
);
|
|
263
|
-
}, G.jsxs = function(m,
|
|
264
|
-
var D = 1e4 >
|
|
263
|
+
}, G.jsxs = function(m, w, E, I, B) {
|
|
264
|
+
var D = 1e4 > W.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return h(
|
|
266
266
|
m,
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
w,
|
|
268
|
+
E,
|
|
269
269
|
!0,
|
|
270
270
|
I,
|
|
271
271
|
B,
|
|
@@ -276,11 +276,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
276
276
|
}()), G;
|
|
277
277
|
}
|
|
278
278
|
var $e;
|
|
279
|
-
function
|
|
280
|
-
return $e || ($e = 1, process.env.NODE_ENV === "production" ? re.exports =
|
|
279
|
+
function mt() {
|
|
280
|
+
return $e || ($e = 1, process.env.NODE_ENV === "production" ? re.exports = dt() : re.exports = ht()), re.exports;
|
|
281
281
|
}
|
|
282
|
-
var
|
|
283
|
-
function
|
|
282
|
+
var S = mt(), K = {}, Oe;
|
|
283
|
+
function pt() {
|
|
284
284
|
if (Oe) return K;
|
|
285
285
|
Oe = 1, Object.defineProperty(K, "__esModule", { value: !0 }), K.parse = i, K.serialize = s;
|
|
286
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__ */ (() => {
|
|
@@ -289,54 +289,54 @@ function dt() {
|
|
|
289
289
|
return d.prototype = /* @__PURE__ */ Object.create(null), d;
|
|
290
290
|
})();
|
|
291
291
|
function i(d, v) {
|
|
292
|
-
const p = new o(),
|
|
293
|
-
if (
|
|
292
|
+
const p = new o(), y = d.length;
|
|
293
|
+
if (y < 2)
|
|
294
294
|
return p;
|
|
295
|
-
const
|
|
295
|
+
const x = v?.decode || h;
|
|
296
296
|
let f = 0;
|
|
297
297
|
do {
|
|
298
298
|
const b = d.indexOf("=", f);
|
|
299
299
|
if (b === -1)
|
|
300
300
|
break;
|
|
301
|
-
const R = d.indexOf(";", f),
|
|
302
|
-
if (b >
|
|
301
|
+
const R = d.indexOf(";", f), P = R === -1 ? y : R;
|
|
302
|
+
if (b > P) {
|
|
303
303
|
f = d.lastIndexOf(";", b - 1) + 1;
|
|
304
304
|
continue;
|
|
305
305
|
}
|
|
306
306
|
const T = u(d, f, b), U = l(d, b, T), O = d.slice(T, U);
|
|
307
307
|
if (p[O] === void 0) {
|
|
308
|
-
let _ = u(d, b + 1,
|
|
309
|
-
const A =
|
|
308
|
+
let _ = u(d, b + 1, P), $ = l(d, P, _);
|
|
309
|
+
const A = x(d.slice(_, $));
|
|
310
310
|
p[O] = A;
|
|
311
311
|
}
|
|
312
|
-
f =
|
|
313
|
-
} while (f <
|
|
312
|
+
f = P + 1;
|
|
313
|
+
} while (f < y);
|
|
314
314
|
return p;
|
|
315
315
|
}
|
|
316
316
|
function u(d, v, p) {
|
|
317
317
|
do {
|
|
318
|
-
const
|
|
319
|
-
if (
|
|
318
|
+
const y = d.charCodeAt(v);
|
|
319
|
+
if (y !== 32 && y !== 9)
|
|
320
320
|
return v;
|
|
321
321
|
} while (++v < p);
|
|
322
322
|
return p;
|
|
323
323
|
}
|
|
324
324
|
function l(d, v, p) {
|
|
325
325
|
for (; v > p; ) {
|
|
326
|
-
const
|
|
327
|
-
if (
|
|
326
|
+
const y = d.charCodeAt(--v);
|
|
327
|
+
if (y !== 32 && y !== 9)
|
|
328
328
|
return v + 1;
|
|
329
329
|
}
|
|
330
330
|
return p;
|
|
331
331
|
}
|
|
332
332
|
function s(d, v, p) {
|
|
333
|
-
const
|
|
333
|
+
const y = p?.encode || encodeURIComponent;
|
|
334
334
|
if (!e.test(d))
|
|
335
335
|
throw new TypeError(`argument name is invalid: ${d}`);
|
|
336
|
-
const
|
|
337
|
-
if (!t.test(
|
|
336
|
+
const x = y(v);
|
|
337
|
+
if (!t.test(x))
|
|
338
338
|
throw new TypeError(`argument val is invalid: ${v}`);
|
|
339
|
-
let f = d + "=" +
|
|
339
|
+
let f = d + "=" + x;
|
|
340
340
|
if (!p)
|
|
341
341
|
return f;
|
|
342
342
|
if (p.maxAge !== void 0) {
|
|
@@ -355,7 +355,7 @@ function dt() {
|
|
|
355
355
|
f += "; Path=" + p.path;
|
|
356
356
|
}
|
|
357
357
|
if (p.expires) {
|
|
358
|
-
if (!
|
|
358
|
+
if (!g(p.expires) || !Number.isFinite(p.expires.valueOf()))
|
|
359
359
|
throw new TypeError(`option expires is invalid: ${p.expires}`);
|
|
360
360
|
f += "; Expires=" + p.expires.toUTCString();
|
|
361
361
|
}
|
|
@@ -399,12 +399,12 @@ function dt() {
|
|
|
399
399
|
return d;
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function g(d) {
|
|
403
403
|
return n.call(d) === "[object Date]";
|
|
404
404
|
}
|
|
405
405
|
return K;
|
|
406
406
|
}
|
|
407
|
-
|
|
407
|
+
pt();
|
|
408
408
|
/**
|
|
409
409
|
* react-router v7.6.3
|
|
410
410
|
*
|
|
@@ -416,7 +416,7 @@ dt();
|
|
|
416
416
|
* @license MIT
|
|
417
417
|
*/
|
|
418
418
|
var _e = "popstate";
|
|
419
|
-
function
|
|
419
|
+
function gt(e = {}) {
|
|
420
420
|
function t(a, n) {
|
|
421
421
|
let { pathname: o, search: i, hash: u } = a.location;
|
|
422
422
|
return pe(
|
|
@@ -430,14 +430,14 @@ function ht(e = {}) {
|
|
|
430
430
|
function r(a, n) {
|
|
431
431
|
return typeof n == "string" ? n : Z(n);
|
|
432
432
|
}
|
|
433
|
-
return
|
|
433
|
+
return vt(
|
|
434
434
|
t,
|
|
435
435
|
r,
|
|
436
436
|
null,
|
|
437
437
|
e
|
|
438
438
|
);
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function k(e, t) {
|
|
441
441
|
if (e === !1 || e === null || typeof e > "u")
|
|
442
442
|
throw new Error(t);
|
|
443
443
|
}
|
|
@@ -450,7 +450,7 @@ function N(e, t) {
|
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function yt() {
|
|
454
454
|
return Math.random().toString(36).substring(2, 10);
|
|
455
455
|
}
|
|
456
456
|
function Ae(e, t) {
|
|
@@ -471,7 +471,7 @@ function pe(e, t, r = null, a) {
|
|
|
471
471
|
// full Locations now and avoid the need to run through this flow at all
|
|
472
472
|
// But that's a pretty big refactor to the current test suite so going to
|
|
473
473
|
// keep as is for the time being and just let any incoming keys take precedence
|
|
474
|
-
key: t && t.key || a ||
|
|
474
|
+
key: t && t.key || a || yt()
|
|
475
475
|
};
|
|
476
476
|
}
|
|
477
477
|
function Z({
|
|
@@ -491,61 +491,61 @@ function Y(e) {
|
|
|
491
491
|
}
|
|
492
492
|
return t;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function vt(e, t, r, a = {}) {
|
|
495
495
|
let { window: n = document.defaultView, v5Compat: o = !1 } = a, i = n.history, u = "POP", l = null, s = h();
|
|
496
496
|
s == null && (s = 0, i.replaceState({ ...i.state, idx: s }, ""));
|
|
497
497
|
function h() {
|
|
498
498
|
return (i.state || { idx: null }).idx;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function g() {
|
|
501
501
|
u = "POP";
|
|
502
|
-
let
|
|
503
|
-
s =
|
|
502
|
+
let x = h(), f = x == null ? null : x - s;
|
|
503
|
+
s = x, l && l({ action: u, location: y.location, delta: f });
|
|
504
504
|
}
|
|
505
|
-
function d(
|
|
505
|
+
function d(x, f) {
|
|
506
506
|
u = "PUSH";
|
|
507
|
-
let b = pe(
|
|
507
|
+
let b = pe(y.location, x, f);
|
|
508
508
|
s = h() + 1;
|
|
509
|
-
let R = Ae(b, s),
|
|
509
|
+
let R = Ae(b, s), P = y.createHref(b);
|
|
510
510
|
try {
|
|
511
|
-
i.pushState(R, "",
|
|
511
|
+
i.pushState(R, "", P);
|
|
512
512
|
} catch (T) {
|
|
513
513
|
if (T instanceof DOMException && T.name === "DataCloneError")
|
|
514
514
|
throw T;
|
|
515
|
-
n.location.assign(
|
|
515
|
+
n.location.assign(P);
|
|
516
516
|
}
|
|
517
|
-
o && l && l({ action: u, location:
|
|
517
|
+
o && l && l({ action: u, location: y.location, delta: 1 });
|
|
518
518
|
}
|
|
519
|
-
function v(
|
|
519
|
+
function v(x, f) {
|
|
520
520
|
u = "REPLACE";
|
|
521
|
-
let b = pe(
|
|
521
|
+
let b = pe(y.location, x, f);
|
|
522
522
|
s = h();
|
|
523
|
-
let R = Ae(b, s),
|
|
524
|
-
i.replaceState(R, "",
|
|
523
|
+
let R = Ae(b, s), P = y.createHref(b);
|
|
524
|
+
i.replaceState(R, "", P), o && l && l({ action: u, location: y.location, delta: 0 });
|
|
525
525
|
}
|
|
526
|
-
function p(
|
|
527
|
-
return
|
|
526
|
+
function p(x) {
|
|
527
|
+
return xt(x);
|
|
528
528
|
}
|
|
529
|
-
let
|
|
529
|
+
let y = {
|
|
530
530
|
get action() {
|
|
531
531
|
return u;
|
|
532
532
|
},
|
|
533
533
|
get location() {
|
|
534
534
|
return e(n, i);
|
|
535
535
|
},
|
|
536
|
-
listen(
|
|
536
|
+
listen(x) {
|
|
537
537
|
if (l)
|
|
538
538
|
throw new Error("A history only accepts one active listener");
|
|
539
|
-
return n.addEventListener(_e,
|
|
540
|
-
n.removeEventListener(_e,
|
|
539
|
+
return n.addEventListener(_e, g), l = x, () => {
|
|
540
|
+
n.removeEventListener(_e, g), l = null;
|
|
541
541
|
};
|
|
542
542
|
},
|
|
543
|
-
createHref(
|
|
544
|
-
return t(n,
|
|
543
|
+
createHref(x) {
|
|
544
|
+
return t(n, x);
|
|
545
545
|
},
|
|
546
546
|
createURL: p,
|
|
547
|
-
encodeLocation(
|
|
548
|
-
let f = p(
|
|
547
|
+
encodeLocation(x) {
|
|
548
|
+
let f = p(x);
|
|
549
549
|
return {
|
|
550
550
|
pathname: f.pathname,
|
|
551
551
|
search: f.search,
|
|
@@ -554,31 +554,31 @@ function pt(e, t, r, a = {}) {
|
|
|
554
554
|
},
|
|
555
555
|
push: d,
|
|
556
556
|
replace: v,
|
|
557
|
-
go(
|
|
558
|
-
return i.go(
|
|
557
|
+
go(x) {
|
|
558
|
+
return i.go(x);
|
|
559
559
|
}
|
|
560
560
|
};
|
|
561
|
-
return
|
|
561
|
+
return y;
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function xt(e, t = !1) {
|
|
564
564
|
let r = "http://localhost";
|
|
565
|
-
typeof window < "u" && (r = window.location.origin !== "null" ? window.location.origin : window.location.href),
|
|
565
|
+
typeof window < "u" && (r = window.location.origin !== "null" ? window.location.origin : window.location.href), k(r, "No window.location.(origin|href) available to create URL");
|
|
566
566
|
let a = typeof e == "string" ? e : Z(e);
|
|
567
567
|
return a = a.replace(/ $/, "%20"), !t && a.startsWith("//") && (a = r + a), new URL(a, r);
|
|
568
568
|
}
|
|
569
|
-
function
|
|
570
|
-
return
|
|
569
|
+
function Ue(e, t, r = "/") {
|
|
570
|
+
return wt(e, t, r, !1);
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function wt(e, t, r, a) {
|
|
573
573
|
let n = typeof t == "string" ? Y(t) : t, o = H(n.pathname || "/", r);
|
|
574
574
|
if (o == null)
|
|
575
575
|
return null;
|
|
576
|
-
let i =
|
|
577
|
-
|
|
576
|
+
let i = Be(e);
|
|
577
|
+
bt(i);
|
|
578
578
|
let u = null;
|
|
579
579
|
for (let l = 0; u == null && l < i.length; ++l) {
|
|
580
|
-
let s =
|
|
581
|
-
u =
|
|
580
|
+
let s = Ot(o);
|
|
581
|
+
u = Lt(
|
|
582
582
|
i[l],
|
|
583
583
|
s,
|
|
584
584
|
a
|
|
@@ -586,7 +586,7 @@ function gt(e, t, r, a) {
|
|
|
586
586
|
}
|
|
587
587
|
return u;
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function Be(e, t = [], r = [], a = "") {
|
|
590
590
|
let n = (o, i, u) => {
|
|
591
591
|
let l = {
|
|
592
592
|
relativePath: u === void 0 ? o.path || "" : u,
|
|
@@ -594,19 +594,19 @@ function Me(e, t = [], r = [], a = "") {
|
|
|
594
594
|
childrenIndex: i,
|
|
595
595
|
route: o
|
|
596
596
|
};
|
|
597
|
-
l.relativePath.startsWith("/") && (
|
|
597
|
+
l.relativePath.startsWith("/") && (k(
|
|
598
598
|
l.relativePath.startsWith(a),
|
|
599
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
600
|
), l.relativePath = l.relativePath.slice(a.length));
|
|
601
|
-
let s =
|
|
602
|
-
o.children && o.children.length > 0 && (
|
|
601
|
+
let s = F([a, l.relativePath]), h = r.concat(l);
|
|
602
|
+
o.children && o.children.length > 0 && (k(
|
|
603
603
|
// Our types know better, but runtime JS may not!
|
|
604
604
|
// @ts-expect-error
|
|
605
605
|
o.index !== !0,
|
|
606
606
|
`Index routes must not have child routes. Please remove all child routes from route path "${s}".`
|
|
607
|
-
),
|
|
607
|
+
), Be(o.children, t, h, s)), !(o.path == null && !o.index) && t.push({
|
|
608
608
|
path: s,
|
|
609
|
-
score:
|
|
609
|
+
score: Tt(s, o.index),
|
|
610
610
|
routesMeta: h
|
|
611
611
|
});
|
|
612
612
|
};
|
|
@@ -614,17 +614,17 @@ function Me(e, t = [], r = [], a = "") {
|
|
|
614
614
|
if (o.path === "" || !o.path?.includes("?"))
|
|
615
615
|
n(o, i);
|
|
616
616
|
else
|
|
617
|
-
for (let u of
|
|
617
|
+
for (let u of ze(o.path))
|
|
618
618
|
n(o, i, u);
|
|
619
619
|
}), t;
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function ze(e) {
|
|
622
622
|
let t = e.split("/");
|
|
623
623
|
if (t.length === 0) return [];
|
|
624
624
|
let [r, ...a] = t, n = r.endsWith("?"), o = r.replace(/\?$/, "");
|
|
625
625
|
if (a.length === 0)
|
|
626
626
|
return n ? [o, ""] : [o];
|
|
627
|
-
let i =
|
|
627
|
+
let i = ze(a.join("/")), u = [];
|
|
628
628
|
return u.push(
|
|
629
629
|
...i.map(
|
|
630
630
|
(l) => l === "" ? o : [o, l].join("/")
|
|
@@ -633,23 +633,23 @@ function Ue(e) {
|
|
|
633
633
|
(l) => e.startsWith("/") && l === "" ? "/" : l
|
|
634
634
|
);
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function bt(e) {
|
|
637
637
|
e.sort(
|
|
638
|
-
(t, r) => t.score !== r.score ? r.score - t.score :
|
|
638
|
+
(t, r) => t.score !== r.score ? r.score - t.score : It(
|
|
639
639
|
t.routesMeta.map((a) => a.childrenIndex),
|
|
640
640
|
r.routesMeta.map((a) => a.childrenIndex)
|
|
641
641
|
)
|
|
642
642
|
);
|
|
643
643
|
}
|
|
644
|
-
var
|
|
645
|
-
function
|
|
644
|
+
var Rt = /^:[\w-]+$/, Et = 3, Ct = 2, St = 1, kt = 10, Pt = -2, De = (e) => e === "*";
|
|
645
|
+
function Tt(e, t) {
|
|
646
646
|
let r = e.split("/"), a = r.length;
|
|
647
|
-
return r.some(De) && (a +=
|
|
648
|
-
(n, o) => n + (
|
|
647
|
+
return r.some(De) && (a += Pt), t && (a += Ct), r.filter((n) => !De(n)).reduce(
|
|
648
|
+
(n, o) => n + (Rt.test(o) ? Et : o === "" ? St : kt),
|
|
649
649
|
a
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function It(e, t) {
|
|
653
653
|
return e.length === t.length && e.slice(0, -1).every((a, n) => a === t[n]) ? (
|
|
654
654
|
// If two routes are siblings, we should try to match the earlier sibling
|
|
655
655
|
// first. This allows people to have fine-grained control over the matching
|
|
@@ -662,37 +662,37 @@ function kt(e, t) {
|
|
|
662
662
|
0
|
|
663
663
|
);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Lt(e, t, r = !1) {
|
|
666
666
|
let { routesMeta: a } = e, n = {}, o = "/", i = [];
|
|
667
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) || "/",
|
|
668
|
+
let l = a[u], s = u === a.length - 1, h = o === "/" ? t : t.slice(o.length) || "/", g = ie(
|
|
669
669
|
{ path: l.relativePath, caseSensitive: l.caseSensitive, end: s },
|
|
670
670
|
h
|
|
671
671
|
), d = l.route;
|
|
672
|
-
if (!
|
|
672
|
+
if (!g && s && r && !a[a.length - 1].route.index && (g = ie(
|
|
673
673
|
{
|
|
674
674
|
path: l.relativePath,
|
|
675
675
|
caseSensitive: l.caseSensitive,
|
|
676
676
|
end: !1
|
|
677
677
|
},
|
|
678
678
|
h
|
|
679
|
-
)), !
|
|
679
|
+
)), !g)
|
|
680
680
|
return null;
|
|
681
|
-
Object.assign(n,
|
|
681
|
+
Object.assign(n, g.params), i.push({
|
|
682
682
|
// TODO: Can this as be avoided?
|
|
683
683
|
params: n,
|
|
684
|
-
pathname:
|
|
685
|
-
pathnameBase:
|
|
686
|
-
|
|
684
|
+
pathname: F([o, g.pathname]),
|
|
685
|
+
pathnameBase: Nt(
|
|
686
|
+
F([o, g.pathnameBase])
|
|
687
687
|
),
|
|
688
688
|
route: d
|
|
689
|
-
}),
|
|
689
|
+
}), g.pathnameBase !== "/" && (o = F([o, g.pathnameBase]));
|
|
690
690
|
}
|
|
691
691
|
return i;
|
|
692
692
|
}
|
|
693
693
|
function ie(e, t) {
|
|
694
694
|
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
695
|
-
let [r, a] =
|
|
695
|
+
let [r, a] = $t(
|
|
696
696
|
e.path,
|
|
697
697
|
e.caseSensitive,
|
|
698
698
|
e.end
|
|
@@ -701,13 +701,13 @@ function ie(e, t) {
|
|
|
701
701
|
let o = n[0], i = o.replace(/(.)\/+$/, "$1"), u = n.slice(1);
|
|
702
702
|
return {
|
|
703
703
|
params: a.reduce(
|
|
704
|
-
(s, { paramName: h, isOptional:
|
|
704
|
+
(s, { paramName: h, isOptional: g }, d) => {
|
|
705
705
|
if (h === "*") {
|
|
706
706
|
let p = u[d] || "";
|
|
707
707
|
i = o.slice(0, o.length - p.length).replace(/(.)\/+$/, "$1");
|
|
708
708
|
}
|
|
709
709
|
const v = u[d];
|
|
710
|
-
return
|
|
710
|
+
return g && !v ? s[h] = void 0 : s[h] = (v || "").replace(/%2F/g, "/"), s;
|
|
711
711
|
},
|
|
712
712
|
{}
|
|
713
713
|
),
|
|
@@ -716,7 +716,7 @@ function ie(e, t) {
|
|
|
716
716
|
pattern: e
|
|
717
717
|
};
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function $t(e, t = !1, r = !0) {
|
|
720
720
|
N(
|
|
721
721
|
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
722
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(/\*$/, "/*")}".`
|
|
@@ -727,7 +727,7 @@ function Tt(e, t = !1, r = !0) {
|
|
|
727
727
|
);
|
|
728
728
|
return e.endsWith("*") ? (a.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), a];
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Ot(e) {
|
|
731
731
|
try {
|
|
732
732
|
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
733
733
|
} catch (t) {
|
|
@@ -744,19 +744,19 @@ function H(e, t) {
|
|
|
744
744
|
let r = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(r);
|
|
745
745
|
return a && a !== "/" ? null : e.slice(r) || "/";
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function _t(e, t = "/") {
|
|
748
748
|
let {
|
|
749
749
|
pathname: r,
|
|
750
750
|
search: a = "",
|
|
751
751
|
hash: n = ""
|
|
752
752
|
} = typeof e == "string" ? Y(e) : e;
|
|
753
753
|
return {
|
|
754
|
-
pathname: r ? r.startsWith("/") ? r :
|
|
755
|
-
search:
|
|
756
|
-
hash:
|
|
754
|
+
pathname: r ? r.startsWith("/") ? r : At(r, t) : t,
|
|
755
|
+
search: jt(a),
|
|
756
|
+
hash: Ft(n)
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function At(e, t) {
|
|
760
760
|
let r = t.replace(/\/+$/, "").split("/");
|
|
761
761
|
return e.split("/").forEach((n) => {
|
|
762
762
|
n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
|
|
@@ -767,26 +767,26 @@ function he(e, t, r, a) {
|
|
|
767
767
|
a
|
|
768
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
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function Dt(e) {
|
|
771
771
|
return e.filter(
|
|
772
772
|
(t, r) => r === 0 || t.route.path && t.route.path.length > 0
|
|
773
773
|
);
|
|
774
774
|
}
|
|
775
|
-
function
|
|
776
|
-
let t =
|
|
775
|
+
function We(e) {
|
|
776
|
+
let t = Dt(e);
|
|
777
777
|
return t.map(
|
|
778
778
|
(r, a) => a === t.length - 1 ? r.pathname : r.pathnameBase
|
|
779
779
|
);
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function Ve(e, t, r, a = !1) {
|
|
782
782
|
let n;
|
|
783
|
-
typeof e == "string" ? n = Y(e) : (n = { ...e },
|
|
783
|
+
typeof e == "string" ? n = Y(e) : (n = { ...e }, k(
|
|
784
784
|
!n.pathname || !n.pathname.includes("?"),
|
|
785
785
|
he("?", "pathname", "search", n)
|
|
786
|
-
),
|
|
786
|
+
), k(
|
|
787
787
|
!n.pathname || !n.pathname.includes("#"),
|
|
788
788
|
he("#", "pathname", "hash", n)
|
|
789
|
-
),
|
|
789
|
+
), k(
|
|
790
790
|
!n.search || !n.search.includes("#"),
|
|
791
791
|
he("#", "search", "hash", n)
|
|
792
792
|
));
|
|
@@ -794,54 +794,54 @@ function We(e, t, r, a = !1) {
|
|
|
794
794
|
if (i == null)
|
|
795
795
|
u = r;
|
|
796
796
|
else {
|
|
797
|
-
let
|
|
797
|
+
let g = t.length - 1;
|
|
798
798
|
if (!a && i.startsWith("..")) {
|
|
799
799
|
let d = i.split("/");
|
|
800
800
|
for (; d[0] === ".."; )
|
|
801
|
-
d.shift(),
|
|
801
|
+
d.shift(), g -= 1;
|
|
802
802
|
n.pathname = d.join("/");
|
|
803
803
|
}
|
|
804
|
-
u =
|
|
804
|
+
u = g >= 0 ? t[g] : "/";
|
|
805
805
|
}
|
|
806
|
-
let l =
|
|
806
|
+
let l = _t(n, u), s = i && i !== "/" && i.endsWith("/"), h = (o || i === ".") && r.endsWith("/");
|
|
807
807
|
return !l.pathname.endsWith("/") && (s || h) && (l.pathname += "/"), l;
|
|
808
808
|
}
|
|
809
|
-
var
|
|
810
|
-
function
|
|
809
|
+
var F = (e) => e.join("/").replace(/\/\/+/g, "/"), Nt = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), jt = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Ft = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
|
|
810
|
+
function Ht(e) {
|
|
811
811
|
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
812
812
|
}
|
|
813
|
-
var
|
|
813
|
+
var Ye = [
|
|
814
814
|
"POST",
|
|
815
815
|
"PUT",
|
|
816
816
|
"PATCH",
|
|
817
817
|
"DELETE"
|
|
818
818
|
];
|
|
819
819
|
new Set(
|
|
820
|
-
|
|
820
|
+
Ye
|
|
821
821
|
);
|
|
822
|
-
var
|
|
822
|
+
var Mt = [
|
|
823
823
|
"GET",
|
|
824
|
-
...
|
|
824
|
+
...Ye
|
|
825
825
|
];
|
|
826
|
-
new Set(
|
|
826
|
+
new Set(Mt);
|
|
827
827
|
var J = c.createContext(null);
|
|
828
828
|
J.displayName = "DataRouter";
|
|
829
829
|
var le = c.createContext(null);
|
|
830
830
|
le.displayName = "DataRouterState";
|
|
831
|
-
var
|
|
831
|
+
var Je = c.createContext({
|
|
832
832
|
isTransitioning: !1
|
|
833
833
|
});
|
|
834
|
-
|
|
835
|
-
var
|
|
834
|
+
Je.displayName = "ViewTransition";
|
|
835
|
+
var Ut = c.createContext(
|
|
836
836
|
/* @__PURE__ */ new Map()
|
|
837
837
|
);
|
|
838
|
-
|
|
839
|
-
var
|
|
840
|
-
|
|
841
|
-
var
|
|
838
|
+
Ut.displayName = "Fetchers";
|
|
839
|
+
var Bt = c.createContext(null);
|
|
840
|
+
Bt.displayName = "Await";
|
|
841
|
+
var j = c.createContext(
|
|
842
842
|
null
|
|
843
843
|
);
|
|
844
|
-
|
|
844
|
+
j.displayName = "Navigation";
|
|
845
845
|
var Q = c.createContext(
|
|
846
846
|
null
|
|
847
847
|
);
|
|
@@ -852,61 +852,61 @@ var M = c.createContext({
|
|
|
852
852
|
isDataRoute: !1
|
|
853
853
|
});
|
|
854
854
|
M.displayName = "Route";
|
|
855
|
-
var
|
|
856
|
-
|
|
857
|
-
function
|
|
858
|
-
|
|
855
|
+
var ye = c.createContext(null);
|
|
856
|
+
ye.displayName = "RouteError";
|
|
857
|
+
function zt(e, { relative: t } = {}) {
|
|
858
|
+
k(
|
|
859
859
|
ee(),
|
|
860
860
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
861
861
|
// router loaded. We can help them understand how to avoid that.
|
|
862
862
|
"useHref() may be used only in the context of a <Router> component."
|
|
863
863
|
);
|
|
864
|
-
let { basename: r, navigator: a } = c.useContext(
|
|
865
|
-
return r !== "/" && (u = o === "/" ? r :
|
|
864
|
+
let { basename: r, navigator: a } = c.useContext(j), { hash: n, pathname: o, search: i } = te(e, { relative: t }), u = o;
|
|
865
|
+
return r !== "/" && (u = o === "/" ? r : F([r, o])), a.createHref({ pathname: u, search: i, hash: n });
|
|
866
866
|
}
|
|
867
867
|
function ee() {
|
|
868
868
|
return c.useContext(Q) != null;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
return
|
|
870
|
+
function z() {
|
|
871
|
+
return k(
|
|
872
872
|
ee(),
|
|
873
873
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
874
874
|
// router loaded. We can help them understand how to avoid that.
|
|
875
875
|
"useLocation() may be used only in the context of a <Router> component."
|
|
876
876
|
), c.useContext(Q).location;
|
|
877
877
|
}
|
|
878
|
-
var
|
|
879
|
-
function
|
|
880
|
-
c.useContext(
|
|
878
|
+
var qe = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
879
|
+
function Ge(e) {
|
|
880
|
+
c.useContext(j).static || c.useLayoutEffect(e);
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function Ke() {
|
|
883
883
|
let { isDataRoute: e } = c.useContext(M);
|
|
884
|
-
return e ?
|
|
884
|
+
return e ? rr() : Wt();
|
|
885
885
|
}
|
|
886
|
-
function
|
|
887
|
-
|
|
886
|
+
function Wt() {
|
|
887
|
+
k(
|
|
888
888
|
ee(),
|
|
889
889
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
890
890
|
// router loaded. We can help them understand how to avoid that.
|
|
891
891
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
892
892
|
);
|
|
893
|
-
let e = c.useContext(J), { basename: t, navigator: r } = c.useContext(
|
|
894
|
-
return
|
|
893
|
+
let e = c.useContext(J), { basename: t, navigator: r } = c.useContext(j), { matches: a } = c.useContext(M), { pathname: n } = z(), o = JSON.stringify(We(a)), i = c.useRef(!1);
|
|
894
|
+
return Ge(() => {
|
|
895
895
|
i.current = !0;
|
|
896
896
|
}), c.useCallback(
|
|
897
897
|
(l, s = {}) => {
|
|
898
|
-
if (N(i.current,
|
|
898
|
+
if (N(i.current, qe), !i.current) return;
|
|
899
899
|
if (typeof l == "number") {
|
|
900
900
|
r.go(l);
|
|
901
901
|
return;
|
|
902
902
|
}
|
|
903
|
-
let h =
|
|
903
|
+
let h = Ve(
|
|
904
904
|
l,
|
|
905
905
|
JSON.parse(o),
|
|
906
906
|
n,
|
|
907
907
|
s.relative === "path"
|
|
908
908
|
);
|
|
909
|
-
e == null && t !== "/" && (h.pathname = h.pathname === "/" ? t :
|
|
909
|
+
e == null && t !== "/" && (h.pathname = h.pathname === "/" ? t : F([t, h.pathname])), (s.replace ? r.replace : r.push)(
|
|
910
910
|
h,
|
|
911
911
|
s.state,
|
|
912
912
|
s
|
|
@@ -923,9 +923,9 @@ function Ut() {
|
|
|
923
923
|
}
|
|
924
924
|
c.createContext(null);
|
|
925
925
|
function te(e, { relative: t } = {}) {
|
|
926
|
-
let { matches: r } = c.useContext(M), { pathname: a } =
|
|
926
|
+
let { matches: r } = c.useContext(M), { pathname: a } = z(), n = JSON.stringify(We(r));
|
|
927
927
|
return c.useMemo(
|
|
928
|
-
() =>
|
|
928
|
+
() => Ve(
|
|
929
929
|
e,
|
|
930
930
|
JSON.parse(n),
|
|
931
931
|
a,
|
|
@@ -934,20 +934,20 @@ function te(e, { relative: t } = {}) {
|
|
|
934
934
|
[e, n, a, t]
|
|
935
935
|
);
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
return
|
|
937
|
+
function Vt(e, t) {
|
|
938
|
+
return Xe(e, t);
|
|
939
939
|
}
|
|
940
|
-
function
|
|
941
|
-
|
|
940
|
+
function Xe(e, t, r, a) {
|
|
941
|
+
k(
|
|
942
942
|
ee(),
|
|
943
943
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
944
944
|
// router loaded. We can help them understand how to avoid that.
|
|
945
945
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
946
946
|
);
|
|
947
|
-
let { navigator: n } = c.useContext(
|
|
947
|
+
let { navigator: n } = c.useContext(j), { 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
948
|
{
|
|
949
949
|
let f = h && h.path || "";
|
|
950
|
-
|
|
950
|
+
Ze(
|
|
951
951
|
l,
|
|
952
952
|
!h || f.endsWith("*") || f.endsWith("*?"),
|
|
953
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.
|
|
@@ -955,38 +955,38 @@ function Ge(e, t, r, a) {
|
|
|
955
955
|
Please change the parent <Route path="${f}"> to <Route path="${f === "/" ? "*" : `${f}/*`}">.`
|
|
956
956
|
);
|
|
957
957
|
}
|
|
958
|
-
let
|
|
958
|
+
let g = z(), d;
|
|
959
959
|
if (t) {
|
|
960
960
|
let f = typeof t == "string" ? Y(t) : t;
|
|
961
|
-
|
|
961
|
+
k(
|
|
962
962
|
s === "/" || f.pathname?.startsWith(s),
|
|
963
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
964
|
), d = f;
|
|
965
965
|
} else
|
|
966
|
-
d =
|
|
966
|
+
d = g;
|
|
967
967
|
let v = d.pathname || "/", p = v;
|
|
968
968
|
if (s !== "/") {
|
|
969
969
|
let f = s.replace(/^\//, "").split("/");
|
|
970
970
|
p = "/" + v.replace(/^\//, "").split("/").slice(f.length).join("/");
|
|
971
971
|
}
|
|
972
|
-
let
|
|
972
|
+
let y = Ue(e, { pathname: p });
|
|
973
973
|
N(
|
|
974
|
-
h ||
|
|
974
|
+
h || y != null,
|
|
975
975
|
`No routes matched location "${d.pathname}${d.search}${d.hash}" `
|
|
976
976
|
), N(
|
|
977
|
-
|
|
977
|
+
y == null || y[y.length - 1].route.element !== void 0 || y[y.length - 1].route.Component !== void 0 || y[y.length - 1].route.lazy !== void 0,
|
|
978
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
979
|
);
|
|
980
|
-
let
|
|
981
|
-
|
|
980
|
+
let x = Kt(
|
|
981
|
+
y && y.map(
|
|
982
982
|
(f) => Object.assign({}, f, {
|
|
983
983
|
params: Object.assign({}, u, f.params),
|
|
984
|
-
pathname:
|
|
984
|
+
pathname: F([
|
|
985
985
|
s,
|
|
986
986
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
987
987
|
n.encodeLocation ? n.encodeLocation(f.pathname).pathname : f.pathname
|
|
988
988
|
]),
|
|
989
|
-
pathnameBase: f.pathnameBase === "/" ? s :
|
|
989
|
+
pathnameBase: f.pathnameBase === "/" ? s : F([
|
|
990
990
|
s,
|
|
991
991
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
992
992
|
n.encodeLocation ? n.encodeLocation(f.pathnameBase).pathname : f.pathnameBase
|
|
@@ -997,7 +997,7 @@ Please change the parent <Route path="${f}"> to <Route path="${f === "/" ? "*" :
|
|
|
997
997
|
r,
|
|
998
998
|
a
|
|
999
999
|
);
|
|
1000
|
-
return t &&
|
|
1000
|
+
return t && x ? /* @__PURE__ */ c.createElement(
|
|
1001
1001
|
Q.Provider,
|
|
1002
1002
|
{
|
|
1003
1003
|
value: {
|
|
@@ -1013,17 +1013,17 @@ Please change the parent <Route path="${f}"> to <Route path="${f === "/" ? "*" :
|
|
|
1013
1013
|
/* Pop */
|
|
1014
1014
|
}
|
|
1015
1015
|
},
|
|
1016
|
-
|
|
1017
|
-
) :
|
|
1016
|
+
x
|
|
1017
|
+
) : x;
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1020
|
-
let e =
|
|
1019
|
+
function Yt() {
|
|
1020
|
+
let e = tr(), t = Ht(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
1021
|
return console.error(
|
|
1022
1022
|
"Error handled by React Router default ErrorBoundary:",
|
|
1023
1023
|
e
|
|
1024
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
1025
|
}
|
|
1026
|
-
var
|
|
1026
|
+
var Jt = /* @__PURE__ */ c.createElement(Yt, null), qt = class extends c.Component {
|
|
1027
1027
|
constructor(e) {
|
|
1028
1028
|
super(e), this.state = {
|
|
1029
1029
|
location: e.location,
|
|
@@ -1054,7 +1054,7 @@ var Vt = /* @__PURE__ */ c.createElement(Wt, null), zt = class extends c.Compone
|
|
|
1054
1054
|
}
|
|
1055
1055
|
render() {
|
|
1056
1056
|
return this.state.error !== void 0 ? /* @__PURE__ */ c.createElement(M.Provider, { value: this.props.routeContext }, /* @__PURE__ */ c.createElement(
|
|
1057
|
-
|
|
1057
|
+
ye.Provider,
|
|
1058
1058
|
{
|
|
1059
1059
|
value: this.state.error,
|
|
1060
1060
|
children: this.props.component
|
|
@@ -1062,11 +1062,11 @@ var Vt = /* @__PURE__ */ c.createElement(Wt, null), zt = class extends c.Compone
|
|
|
1062
1062
|
)) : this.props.children;
|
|
1063
1063
|
}
|
|
1064
1064
|
};
|
|
1065
|
-
function
|
|
1065
|
+
function Gt({ routeContext: e, match: t, children: r }) {
|
|
1066
1066
|
let a = c.useContext(J);
|
|
1067
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
1068
|
}
|
|
1069
|
-
function
|
|
1069
|
+
function Kt(e, t = [], r = null, a = null) {
|
|
1070
1070
|
if (e == null) {
|
|
1071
1071
|
if (!r)
|
|
1072
1072
|
return null;
|
|
@@ -1082,7 +1082,7 @@ function Jt(e, t = [], r = null, a = null) {
|
|
|
1082
1082
|
let l = n.findIndex(
|
|
1083
1083
|
(s) => s.route.id && o?.[s.route.id] !== void 0
|
|
1084
1084
|
);
|
|
1085
|
-
|
|
1085
|
+
k(
|
|
1086
1086
|
l >= 0,
|
|
1087
1087
|
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
1088
1088
|
o
|
|
@@ -1097,7 +1097,7 @@ function Jt(e, t = [], r = null, a = null) {
|
|
|
1097
1097
|
for (let l = 0; l < n.length; l++) {
|
|
1098
1098
|
let s = n[l];
|
|
1099
1099
|
if ((s.route.HydrateFallback || s.route.hydrateFallbackElement) && (u = l), s.route.id) {
|
|
1100
|
-
let { loaderData: h, errors:
|
|
1100
|
+
let { loaderData: h, errors: g } = r, d = s.route.loader && !h.hasOwnProperty(s.route.id) && (!g || g[s.route.id] === void 0);
|
|
1101
1101
|
if (s.route.lazy || d) {
|
|
1102
1102
|
i = !0, u >= 0 ? n = n.slice(0, u + 1) : n = [n[0]];
|
|
1103
1103
|
break;
|
|
@@ -1105,21 +1105,21 @@ function Jt(e, t = [], r = null, a = null) {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
1107
|
return n.reduceRight((l, s, h) => {
|
|
1108
|
-
let
|
|
1109
|
-
r && (
|
|
1108
|
+
let g, d = !1, v = null, p = null;
|
|
1109
|
+
r && (g = o && s.route.id ? o[s.route.id] : void 0, v = s.route.errorElement || Jt, i && (u < 0 && h === 0 ? (Ze(
|
|
1110
1110
|
"route-fallback",
|
|
1111
1111
|
!1,
|
|
1112
1112
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
1113
1113
|
), d = !0, p = null) : u === h && (d = !0, p = s.route.hydrateFallbackElement || null)));
|
|
1114
|
-
let
|
|
1114
|
+
let y = t.concat(n.slice(0, h + 1)), x = () => {
|
|
1115
1115
|
let f;
|
|
1116
|
-
return
|
|
1117
|
-
|
|
1116
|
+
return g ? 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
|
+
Gt,
|
|
1118
1118
|
{
|
|
1119
1119
|
match: s,
|
|
1120
1120
|
routeContext: {
|
|
1121
1121
|
outlet: l,
|
|
1122
|
-
matches:
|
|
1122
|
+
matches: y,
|
|
1123
1123
|
isDataRoute: r != null
|
|
1124
1124
|
},
|
|
1125
1125
|
children: f
|
|
@@ -1127,92 +1127,92 @@ function Jt(e, t = [], r = null, a = null) {
|
|
|
1127
1127
|
);
|
|
1128
1128
|
};
|
|
1129
1129
|
return r && (s.route.ErrorBoundary || s.route.errorElement || h === 0) ? /* @__PURE__ */ c.createElement(
|
|
1130
|
-
|
|
1130
|
+
qt,
|
|
1131
1131
|
{
|
|
1132
1132
|
location: r.location,
|
|
1133
1133
|
revalidation: r.revalidation,
|
|
1134
1134
|
component: v,
|
|
1135
|
-
error:
|
|
1136
|
-
children:
|
|
1137
|
-
routeContext: { outlet: null, matches:
|
|
1135
|
+
error: g,
|
|
1136
|
+
children: x(),
|
|
1137
|
+
routeContext: { outlet: null, matches: y, isDataRoute: !0 }
|
|
1138
1138
|
}
|
|
1139
|
-
) :
|
|
1139
|
+
) : x();
|
|
1140
1140
|
}, null);
|
|
1141
1141
|
}
|
|
1142
1142
|
function ve(e) {
|
|
1143
1143
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1145
|
+
function Xt(e) {
|
|
1146
1146
|
let t = c.useContext(J);
|
|
1147
|
-
return
|
|
1147
|
+
return k(t, ve(e)), t;
|
|
1148
1148
|
}
|
|
1149
|
-
function
|
|
1149
|
+
function Zt(e) {
|
|
1150
1150
|
let t = c.useContext(le);
|
|
1151
|
-
return
|
|
1151
|
+
return k(t, ve(e)), t;
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1153
|
+
function Qt(e) {
|
|
1154
1154
|
let t = c.useContext(M);
|
|
1155
|
-
return
|
|
1155
|
+
return k(t, ve(e)), t;
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1158
|
-
let t =
|
|
1159
|
-
return
|
|
1157
|
+
function xe(e) {
|
|
1158
|
+
let t = Qt(e), r = t.matches[t.matches.length - 1];
|
|
1159
|
+
return k(
|
|
1160
1160
|
r.route.id,
|
|
1161
1161
|
`${e} can only be used on routes that contain a unique "id"`
|
|
1162
1162
|
), r.route.id;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
return
|
|
1164
|
+
function er() {
|
|
1165
|
+
return xe(
|
|
1166
1166
|
"useRouteId"
|
|
1167
1167
|
/* UseRouteId */
|
|
1168
1168
|
);
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1171
|
-
let e = c.useContext(
|
|
1170
|
+
function tr() {
|
|
1171
|
+
let e = c.useContext(ye), t = Zt(
|
|
1172
1172
|
"useRouteError"
|
|
1173
1173
|
/* UseRouteError */
|
|
1174
|
-
), r =
|
|
1174
|
+
), r = xe(
|
|
1175
1175
|
"useRouteError"
|
|
1176
1176
|
/* UseRouteError */
|
|
1177
1177
|
);
|
|
1178
1178
|
return e !== void 0 ? e : t.errors?.[r];
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
let { router: e } =
|
|
1180
|
+
function rr() {
|
|
1181
|
+
let { router: e } = Xt(
|
|
1182
1182
|
"useNavigate"
|
|
1183
1183
|
/* UseNavigateStable */
|
|
1184
|
-
), t =
|
|
1184
|
+
), t = xe(
|
|
1185
1185
|
"useNavigate"
|
|
1186
1186
|
/* UseNavigateStable */
|
|
1187
1187
|
), r = c.useRef(!1);
|
|
1188
|
-
return
|
|
1188
|
+
return Ge(() => {
|
|
1189
1189
|
r.current = !0;
|
|
1190
1190
|
}), c.useCallback(
|
|
1191
1191
|
async (n, o = {}) => {
|
|
1192
|
-
N(r.current,
|
|
1192
|
+
N(r.current, qe), r.current && (typeof n == "number" ? e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...o }));
|
|
1193
1193
|
},
|
|
1194
1194
|
[e, t]
|
|
1195
1195
|
);
|
|
1196
1196
|
}
|
|
1197
1197
|
var Ne = {};
|
|
1198
|
-
function
|
|
1198
|
+
function Ze(e, t, r) {
|
|
1199
1199
|
!t && !Ne[e] && (Ne[e] = !0, N(!1, r));
|
|
1200
1200
|
}
|
|
1201
|
-
c.memo(
|
|
1202
|
-
function
|
|
1201
|
+
c.memo(nr);
|
|
1202
|
+
function nr({
|
|
1203
1203
|
routes: e,
|
|
1204
1204
|
future: t,
|
|
1205
1205
|
state: r
|
|
1206
1206
|
}) {
|
|
1207
|
-
return
|
|
1207
|
+
return Xe(e, void 0, r, t);
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1210
|
-
|
|
1209
|
+
function Qe(e) {
|
|
1210
|
+
k(
|
|
1211
1211
|
!1,
|
|
1212
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
1213
|
);
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function ar({
|
|
1216
1216
|
basename: e = "/",
|
|
1217
1217
|
children: t = null,
|
|
1218
1218
|
location: r,
|
|
@@ -1220,7 +1220,7 @@ function tr({
|
|
|
1220
1220
|
navigator: n,
|
|
1221
1221
|
static: o = !1
|
|
1222
1222
|
}) {
|
|
1223
|
-
|
|
1223
|
+
k(
|
|
1224
1224
|
!ee(),
|
|
1225
1225
|
"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
|
|
1226
1226
|
);
|
|
@@ -1238,7 +1238,7 @@ function tr({
|
|
|
1238
1238
|
pathname: l = "/",
|
|
1239
1239
|
search: s = "",
|
|
1240
1240
|
hash: h = "",
|
|
1241
|
-
state:
|
|
1241
|
+
state: g = null,
|
|
1242
1242
|
key: d = "default"
|
|
1243
1243
|
} = r, v = c.useMemo(() => {
|
|
1244
1244
|
let p = H(l, i);
|
|
@@ -1247,24 +1247,24 @@ function tr({
|
|
|
1247
1247
|
pathname: p,
|
|
1248
1248
|
search: s,
|
|
1249
1249
|
hash: h,
|
|
1250
|
-
state:
|
|
1250
|
+
state: g,
|
|
1251
1251
|
key: d
|
|
1252
1252
|
},
|
|
1253
1253
|
navigationType: a
|
|
1254
1254
|
};
|
|
1255
|
-
}, [i, l, s, h,
|
|
1255
|
+
}, [i, l, s, h, g, d, a]);
|
|
1256
1256
|
return N(
|
|
1257
1257
|
v != null,
|
|
1258
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(
|
|
1259
|
+
), v == null ? null : /* @__PURE__ */ c.createElement(j.Provider, { value: u }, /* @__PURE__ */ c.createElement(Q.Provider, { children: t, value: v }));
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1261
|
+
function or({
|
|
1262
1262
|
children: e,
|
|
1263
1263
|
location: t
|
|
1264
1264
|
}) {
|
|
1265
|
-
return
|
|
1265
|
+
return Vt(ge(e), t);
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1267
|
+
function ge(e, t = []) {
|
|
1268
1268
|
let r = [];
|
|
1269
1269
|
return c.Children.forEach(e, (a, n) => {
|
|
1270
1270
|
if (!c.isValidElement(a))
|
|
@@ -1273,14 +1273,14 @@ function ye(e, t = []) {
|
|
|
1273
1273
|
if (a.type === c.Fragment) {
|
|
1274
1274
|
r.push.apply(
|
|
1275
1275
|
r,
|
|
1276
|
-
|
|
1276
|
+
ge(a.props.children, o)
|
|
1277
1277
|
);
|
|
1278
1278
|
return;
|
|
1279
1279
|
}
|
|
1280
|
-
|
|
1281
|
-
a.type ===
|
|
1280
|
+
k(
|
|
1281
|
+
a.type === Qe,
|
|
1282
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
|
-
),
|
|
1283
|
+
), k(
|
|
1284
1284
|
!a.props.index || !a.props.children,
|
|
1285
1285
|
"An index route cannot have child routes."
|
|
1286
1286
|
);
|
|
@@ -1302,7 +1302,7 @@ function ye(e, t = []) {
|
|
|
1302
1302
|
handle: a.props.handle,
|
|
1303
1303
|
lazy: a.props.lazy
|
|
1304
1304
|
};
|
|
1305
|
-
a.props.children && (i.children =
|
|
1305
|
+
a.props.children && (i.children = ge(
|
|
1306
1306
|
a.props.children,
|
|
1307
1307
|
o
|
|
1308
1308
|
)), r.push(i);
|
|
@@ -1312,25 +1312,25 @@ var ae = "get", oe = "application/x-www-form-urlencoded";
|
|
|
1312
1312
|
function se(e) {
|
|
1313
1313
|
return e != null && typeof e.tagName == "string";
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function ir(e) {
|
|
1316
1316
|
return se(e) && e.tagName.toLowerCase() === "button";
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function lr(e) {
|
|
1319
1319
|
return se(e) && e.tagName.toLowerCase() === "form";
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function sr(e) {
|
|
1322
1322
|
return se(e) && e.tagName.toLowerCase() === "input";
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function ur(e) {
|
|
1325
1325
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function cr(e, t) {
|
|
1328
1328
|
return e.button === 0 && // Ignore everything but left clicks
|
|
1329
1329
|
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
1330
|
-
!
|
|
1330
|
+
!ur(e);
|
|
1331
1331
|
}
|
|
1332
1332
|
var ne = null;
|
|
1333
|
-
function
|
|
1333
|
+
function fr() {
|
|
1334
1334
|
if (ne === null)
|
|
1335
1335
|
try {
|
|
1336
1336
|
new FormData(
|
|
@@ -1343,35 +1343,35 @@ function sr() {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
return ne;
|
|
1345
1345
|
}
|
|
1346
|
-
var
|
|
1346
|
+
var dr = /* @__PURE__ */ new Set([
|
|
1347
1347
|
"application/x-www-form-urlencoded",
|
|
1348
1348
|
"multipart/form-data",
|
|
1349
1349
|
"text/plain"
|
|
1350
1350
|
]);
|
|
1351
1351
|
function me(e) {
|
|
1352
|
-
return e != null && !
|
|
1352
|
+
return e != null && !dr.has(e) ? (N(
|
|
1353
1353
|
!1,
|
|
1354
1354
|
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oe}"`
|
|
1355
1355
|
), null) : e;
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1357
|
+
function hr(e, t) {
|
|
1358
1358
|
let r, a, n, o, i;
|
|
1359
|
-
if (
|
|
1359
|
+
if (lr(e)) {
|
|
1360
1360
|
let u = e.getAttribute("action");
|
|
1361
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 (
|
|
1362
|
+
} else if (ir(e) || sr(e) && (e.type === "submit" || e.type === "image")) {
|
|
1363
1363
|
let u = e.form;
|
|
1364
1364
|
if (u == null)
|
|
1365
1365
|
throw new Error(
|
|
1366
1366
|
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1367
1367
|
);
|
|
1368
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), !
|
|
1370
|
-
let { name: s, type: h, value:
|
|
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), !fr()) {
|
|
1370
|
+
let { name: s, type: h, value: g } = e;
|
|
1371
1371
|
if (h === "image") {
|
|
1372
1372
|
let d = s ? `${s}.` : "";
|
|
1373
1373
|
o.append(`${d}x`, "0"), o.append(`${d}y`, "0");
|
|
1374
|
-
} else s && o.append(s,
|
|
1374
|
+
} else s && o.append(s, g);
|
|
1375
1375
|
}
|
|
1376
1376
|
} else {
|
|
1377
1377
|
if (se(e))
|
|
@@ -1382,11 +1382,11 @@ function cr(e, t) {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
return o && n === "text/plain" && (i = o, o = void 0), { action: a, method: r.toLowerCase(), encType: n, formData: o, body: i };
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function we(e, t) {
|
|
1386
1386
|
if (e === !1 || e === null || typeof e > "u")
|
|
1387
1387
|
throw new Error(t);
|
|
1388
1388
|
}
|
|
1389
|
-
async function
|
|
1389
|
+
async function mr(e, t) {
|
|
1390
1390
|
if (e.id in t)
|
|
1391
1391
|
return t[e.id];
|
|
1392
1392
|
try {
|
|
@@ -1403,27 +1403,27 @@ async function fr(e, t) {
|
|
|
1403
1403
|
});
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1406
|
+
function pr(e) {
|
|
1407
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
1408
|
}
|
|
1409
|
-
async function
|
|
1409
|
+
async function gr(e, t, r) {
|
|
1410
1410
|
let a = await Promise.all(
|
|
1411
1411
|
e.map(async (n) => {
|
|
1412
1412
|
let o = t.routes[n.route.id];
|
|
1413
1413
|
if (o) {
|
|
1414
|
-
let i = await
|
|
1414
|
+
let i = await mr(o, r);
|
|
1415
1415
|
return i.links ? i.links() : [];
|
|
1416
1416
|
}
|
|
1417
1417
|
return [];
|
|
1418
1418
|
})
|
|
1419
1419
|
);
|
|
1420
|
-
return
|
|
1421
|
-
a.flat(1).filter(
|
|
1420
|
+
return wr(
|
|
1421
|
+
a.flat(1).filter(pr).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map(
|
|
1422
1422
|
(n) => n.rel === "stylesheet" ? { ...n, rel: "prefetch", as: "style" } : { ...n, rel: "prefetch" }
|
|
1423
1423
|
)
|
|
1424
1424
|
);
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function je(e, t, r, a, n, o) {
|
|
1427
1427
|
let i = (l, s) => r[s] ? l.route.id !== r[s].route.id : !0, u = (l, s) => (
|
|
1428
1428
|
// param change, /users/123 -> /users/456
|
|
1429
1429
|
r[s].pathname !== l.pathname || // splat param changed, which is not present in match.path
|
|
@@ -1439,7 +1439,7 @@ function Fe(e, t, r, a, n, o) {
|
|
|
1439
1439
|
if (i(l, s) || u(l, s))
|
|
1440
1440
|
return !0;
|
|
1441
1441
|
if (l.route.shouldRevalidate) {
|
|
1442
|
-
let
|
|
1442
|
+
let g = l.route.shouldRevalidate({
|
|
1443
1443
|
currentUrl: new URL(
|
|
1444
1444
|
n.pathname + n.search + n.hash,
|
|
1445
1445
|
window.origin
|
|
@@ -1449,14 +1449,14 @@ function Fe(e, t, r, a, n, o) {
|
|
|
1449
1449
|
nextParams: l.params,
|
|
1450
1450
|
defaultShouldRevalidate: !0
|
|
1451
1451
|
});
|
|
1452
|
-
if (typeof
|
|
1453
|
-
return
|
|
1452
|
+
if (typeof g == "boolean")
|
|
1453
|
+
return g;
|
|
1454
1454
|
}
|
|
1455
1455
|
return !0;
|
|
1456
1456
|
}) : [];
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1459
|
-
return
|
|
1458
|
+
function yr(e, t, { includeHydrateFallback: r } = {}) {
|
|
1459
|
+
return vr(
|
|
1460
1460
|
e.map((a) => {
|
|
1461
1461
|
let n = t.routes[a.route.id];
|
|
1462
1462
|
if (!n) return [];
|
|
@@ -1465,25 +1465,25 @@ function mr(e, t, { includeHydrateFallback: r } = {}) {
|
|
|
1465
1465
|
}).flat(1)
|
|
1466
1466
|
);
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1468
|
+
function vr(e) {
|
|
1469
1469
|
return [...new Set(e)];
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function xr(e) {
|
|
1472
1472
|
let t = {}, r = Object.keys(e).sort();
|
|
1473
1473
|
for (let a of r)
|
|
1474
1474
|
t[a] = e[a];
|
|
1475
1475
|
return t;
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function wr(e, t) {
|
|
1478
1478
|
let r = /* @__PURE__ */ new Set();
|
|
1479
1479
|
return new Set(t), e.reduce((a, n) => {
|
|
1480
|
-
let o = JSON.stringify(
|
|
1480
|
+
let o = JSON.stringify(xr(n));
|
|
1481
1481
|
return r.has(o) || (r.add(o), a.push({ key: o, link: n })), a;
|
|
1482
1482
|
}, []);
|
|
1483
1483
|
}
|
|
1484
1484
|
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
1485
|
-
var
|
|
1486
|
-
function
|
|
1485
|
+
var br = /* @__PURE__ */ new Set([100, 101, 204, 205]);
|
|
1486
|
+
function Rr(e, t) {
|
|
1487
1487
|
let r = typeof e == "string" ? new URL(
|
|
1488
1488
|
e,
|
|
1489
1489
|
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
@@ -1492,49 +1492,49 @@ function wr(e, t) {
|
|
|
1492
1492
|
) : e;
|
|
1493
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
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function et() {
|
|
1496
1496
|
let e = c.useContext(J);
|
|
1497
|
-
return
|
|
1497
|
+
return we(
|
|
1498
1498
|
e,
|
|
1499
1499
|
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1500
1500
|
), e;
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function Er() {
|
|
1503
1503
|
let e = c.useContext(le);
|
|
1504
|
-
return
|
|
1504
|
+
return we(
|
|
1505
1505
|
e,
|
|
1506
1506
|
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1507
1507
|
), e;
|
|
1508
1508
|
}
|
|
1509
1509
|
var be = c.createContext(void 0);
|
|
1510
1510
|
be.displayName = "FrameworkContext";
|
|
1511
|
-
function
|
|
1511
|
+
function tt() {
|
|
1512
1512
|
let e = c.useContext(be);
|
|
1513
|
-
return
|
|
1513
|
+
return we(
|
|
1514
1514
|
e,
|
|
1515
1515
|
"You must render this element inside a <HydratedRouter> element"
|
|
1516
1516
|
), e;
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
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:
|
|
1518
|
+
function Cr(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: g } = t, d = c.useRef(null);
|
|
1520
1520
|
c.useEffect(() => {
|
|
1521
1521
|
if (e === "render" && i(!0), e === "viewport") {
|
|
1522
|
-
let
|
|
1522
|
+
let y = (f) => {
|
|
1523
1523
|
f.forEach((b) => {
|
|
1524
1524
|
i(b.isIntersecting);
|
|
1525
1525
|
});
|
|
1526
|
-
},
|
|
1527
|
-
return d.current &&
|
|
1528
|
-
|
|
1526
|
+
}, x = new IntersectionObserver(y, { threshold: 0.5 });
|
|
1527
|
+
return d.current && x.observe(d.current), () => {
|
|
1528
|
+
x.disconnect();
|
|
1529
1529
|
};
|
|
1530
1530
|
}
|
|
1531
1531
|
}, [e]), c.useEffect(() => {
|
|
1532
1532
|
if (a) {
|
|
1533
|
-
let
|
|
1533
|
+
let y = setTimeout(() => {
|
|
1534
1534
|
i(!0);
|
|
1535
1535
|
}, 100);
|
|
1536
1536
|
return () => {
|
|
1537
|
-
clearTimeout(
|
|
1537
|
+
clearTimeout(y);
|
|
1538
1538
|
};
|
|
1539
1539
|
}
|
|
1540
1540
|
}, [a]);
|
|
@@ -1551,7 +1551,7 @@ function br(e, t) {
|
|
|
1551
1551
|
onBlur: X(l, p),
|
|
1552
1552
|
onMouseEnter: X(s, v),
|
|
1553
1553
|
onMouseLeave: X(h, p),
|
|
1554
|
-
onTouchStart: X(
|
|
1554
|
+
onTouchStart: X(g, v)
|
|
1555
1555
|
}
|
|
1556
1556
|
] : [!1, d, {}];
|
|
1557
1557
|
}
|
|
@@ -1560,21 +1560,21 @@ function X(e, t) {
|
|
|
1560
1560
|
e && e(r), r.defaultPrevented || t(r);
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function Sr({
|
|
1564
1564
|
page: e,
|
|
1565
1565
|
...t
|
|
1566
1566
|
}) {
|
|
1567
|
-
let { router: r } =
|
|
1568
|
-
() =>
|
|
1567
|
+
let { router: r } = et(), a = c.useMemo(
|
|
1568
|
+
() => Ue(r.routes, e, r.basename),
|
|
1569
1569
|
[r.routes, e, r.basename]
|
|
1570
1570
|
);
|
|
1571
|
-
return a ? /* @__PURE__ */ c.createElement(
|
|
1571
|
+
return a ? /* @__PURE__ */ c.createElement(Pr, { page: e, matches: a, ...t }) : null;
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1574
|
-
let { manifest: t, routeModules: r } =
|
|
1573
|
+
function kr(e) {
|
|
1574
|
+
let { manifest: t, routeModules: r } = tt(), [a, n] = c.useState([]);
|
|
1575
1575
|
return c.useEffect(() => {
|
|
1576
1576
|
let o = !1;
|
|
1577
|
-
return
|
|
1577
|
+
return gr(e, t, r).then(
|
|
1578
1578
|
(i) => {
|
|
1579
1579
|
o || n(i);
|
|
1580
1580
|
}
|
|
@@ -1583,13 +1583,13 @@ function Er(e) {
|
|
|
1583
1583
|
};
|
|
1584
1584
|
}, [e, t, r]), a;
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function Pr({
|
|
1587
1587
|
page: e,
|
|
1588
1588
|
matches: t,
|
|
1589
1589
|
...r
|
|
1590
1590
|
}) {
|
|
1591
|
-
let a =
|
|
1592
|
-
() =>
|
|
1591
|
+
let a = z(), { manifest: n, routeModules: o } = tt(), { basename: i } = et(), { loaderData: u, matches: l } = Er(), s = c.useMemo(
|
|
1592
|
+
() => je(
|
|
1593
1593
|
e,
|
|
1594
1594
|
t,
|
|
1595
1595
|
l,
|
|
@@ -1599,7 +1599,7 @@ function Cr({
|
|
|
1599
1599
|
),
|
|
1600
1600
|
[e, t, l, n, a]
|
|
1601
1601
|
), h = c.useMemo(
|
|
1602
|
-
() =>
|
|
1602
|
+
() => je(
|
|
1603
1603
|
e,
|
|
1604
1604
|
t,
|
|
1605
1605
|
l,
|
|
@@ -1608,20 +1608,20 @@ function Cr({
|
|
|
1608
1608
|
"assets"
|
|
1609
1609
|
),
|
|
1610
1610
|
[e, t, l, n, a]
|
|
1611
|
-
),
|
|
1611
|
+
), g = c.useMemo(() => {
|
|
1612
1612
|
if (e === a.pathname + a.search + a.hash)
|
|
1613
1613
|
return [];
|
|
1614
|
-
let p = /* @__PURE__ */ new Set(),
|
|
1614
|
+
let p = /* @__PURE__ */ new Set(), y = !1;
|
|
1615
1615
|
if (t.forEach((f) => {
|
|
1616
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 ?
|
|
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 ? y = !0 : p.add(f.route.id));
|
|
1618
1618
|
}), p.size === 0)
|
|
1619
1619
|
return [];
|
|
1620
|
-
let
|
|
1621
|
-
return
|
|
1620
|
+
let x = Rr(e, i);
|
|
1621
|
+
return y && p.size > 0 && x.searchParams.set(
|
|
1622
1622
|
"_routes",
|
|
1623
1623
|
t.filter((f) => p.has(f.route.id)).map((f) => f.route.id).join(",")
|
|
1624
|
-
), [
|
|
1624
|
+
), [x.pathname + x.search];
|
|
1625
1625
|
}, [
|
|
1626
1626
|
i,
|
|
1627
1627
|
u,
|
|
@@ -1632,34 +1632,34 @@ function Cr({
|
|
|
1632
1632
|
e,
|
|
1633
1633
|
o
|
|
1634
1634
|
]), d = c.useMemo(
|
|
1635
|
-
() =>
|
|
1635
|
+
() => yr(h, n),
|
|
1636
1636
|
[h, n]
|
|
1637
|
-
), v =
|
|
1638
|
-
return /* @__PURE__ */ c.createElement(c.Fragment, null,
|
|
1637
|
+
), v = kr(h);
|
|
1638
|
+
return /* @__PURE__ */ c.createElement(c.Fragment, null, g.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: y }) => (
|
|
1639
1639
|
// these don't spread `linkProps` because they are full link descriptors
|
|
1640
1640
|
// already with their own props
|
|
1641
|
-
/* @__PURE__ */ c.createElement("link", { key: p, ...
|
|
1641
|
+
/* @__PURE__ */ c.createElement("link", { key: p, ...y })
|
|
1642
1642
|
)));
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function Tr(...e) {
|
|
1645
1645
|
return (t) => {
|
|
1646
1646
|
e.forEach((r) => {
|
|
1647
1647
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
1648
1648
|
});
|
|
1649
1649
|
};
|
|
1650
1650
|
}
|
|
1651
|
-
var
|
|
1651
|
+
var rt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1652
1652
|
try {
|
|
1653
|
-
|
|
1653
|
+
rt && (window.__reactRouterVersion = "7.6.3");
|
|
1654
1654
|
} catch {
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1656
|
+
function Ir({
|
|
1657
1657
|
basename: e,
|
|
1658
1658
|
children: t,
|
|
1659
1659
|
window: r
|
|
1660
1660
|
}) {
|
|
1661
1661
|
let a = c.useRef();
|
|
1662
|
-
a.current == null && (a.current =
|
|
1662
|
+
a.current == null && (a.current = gt({ window: r, v5Compat: !0 }));
|
|
1663
1663
|
let n = a.current, [o, i] = c.useState({
|
|
1664
1664
|
action: n.action,
|
|
1665
1665
|
location: n.location
|
|
@@ -1670,7 +1670,7 @@ function kr({
|
|
|
1670
1670
|
[i]
|
|
1671
1671
|
);
|
|
1672
1672
|
return c.useLayoutEffect(() => n.listen(u), [n, u]), /* @__PURE__ */ c.createElement(
|
|
1673
|
-
|
|
1673
|
+
ar,
|
|
1674
1674
|
{
|
|
1675
1675
|
basename: e,
|
|
1676
1676
|
children: t,
|
|
@@ -1680,7 +1680,7 @@ function kr({
|
|
|
1680
1680
|
}
|
|
1681
1681
|
);
|
|
1682
1682
|
}
|
|
1683
|
-
var
|
|
1683
|
+
var nt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, at = c.forwardRef(
|
|
1684
1684
|
function({
|
|
1685
1685
|
onClick: t,
|
|
1686
1686
|
discover: r = "render",
|
|
@@ -1692,30 +1692,30 @@ var tt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, rt = c.forwardRef(
|
|
|
1692
1692
|
target: l,
|
|
1693
1693
|
to: s,
|
|
1694
1694
|
preventScrollReset: h,
|
|
1695
|
-
viewTransition:
|
|
1695
|
+
viewTransition: g,
|
|
1696
1696
|
...d
|
|
1697
1697
|
}, v) {
|
|
1698
|
-
let { basename: p } = c.useContext(
|
|
1699
|
-
if (typeof s == "string" &&
|
|
1698
|
+
let { basename: p } = c.useContext(j), y = typeof s == "string" && nt.test(s), x, f = !1;
|
|
1699
|
+
if (typeof s == "string" && y && (x = s, rt))
|
|
1700
1700
|
try {
|
|
1701
|
-
let $ = new URL(window.location.href), A = s.startsWith("//") ? new URL($.protocol + s) : new URL(s),
|
|
1702
|
-
A.origin === $.origin &&
|
|
1701
|
+
let $ = new URL(window.location.href), A = s.startsWith("//") ? new URL($.protocol + s) : new URL(s), W = H(A.pathname, p);
|
|
1702
|
+
A.origin === $.origin && W != null ? s = W + A.search + A.hash : f = !0;
|
|
1703
1703
|
} catch {
|
|
1704
1704
|
N(
|
|
1705
1705
|
!1,
|
|
1706
1706
|
`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1707
1707
|
);
|
|
1708
1708
|
}
|
|
1709
|
-
let b =
|
|
1709
|
+
let b = zt(s, { relative: n }), [R, P, T] = Cr(
|
|
1710
1710
|
a,
|
|
1711
1711
|
d
|
|
1712
|
-
), U =
|
|
1712
|
+
), U = _r(s, {
|
|
1713
1713
|
replace: i,
|
|
1714
1714
|
state: u,
|
|
1715
1715
|
target: l,
|
|
1716
1716
|
preventScrollReset: h,
|
|
1717
1717
|
relative: n,
|
|
1718
|
-
viewTransition:
|
|
1718
|
+
viewTransition: g
|
|
1719
1719
|
});
|
|
1720
1720
|
function O($) {
|
|
1721
1721
|
t && t($), $.defaultPrevented || U($);
|
|
@@ -1727,19 +1727,19 @@ var tt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, rt = c.forwardRef(
|
|
|
1727
1727
|
{
|
|
1728
1728
|
...d,
|
|
1729
1729
|
...T,
|
|
1730
|
-
href:
|
|
1730
|
+
href: x || b,
|
|
1731
1731
|
onClick: f || o ? t : O,
|
|
1732
|
-
ref:
|
|
1732
|
+
ref: Tr(v, P),
|
|
1733
1733
|
target: l,
|
|
1734
|
-
"data-discover": !
|
|
1734
|
+
"data-discover": !y && r === "render" ? "true" : void 0
|
|
1735
1735
|
}
|
|
1736
1736
|
)
|
|
1737
1737
|
);
|
|
1738
|
-
return R && !
|
|
1738
|
+
return R && !y ? /* @__PURE__ */ c.createElement(c.Fragment, null, _, /* @__PURE__ */ c.createElement(Sr, { page: b })) : _;
|
|
1739
1739
|
}
|
|
1740
1740
|
);
|
|
1741
|
-
|
|
1742
|
-
var
|
|
1741
|
+
at.displayName = "Link";
|
|
1742
|
+
var Lr = c.forwardRef(
|
|
1743
1743
|
function({
|
|
1744
1744
|
"aria-current": t = "page",
|
|
1745
1745
|
caseSensitive: r = !1,
|
|
@@ -1751,25 +1751,25 @@ var Pr = c.forwardRef(
|
|
|
1751
1751
|
children: l,
|
|
1752
1752
|
...s
|
|
1753
1753
|
}, h) {
|
|
1754
|
-
let
|
|
1754
|
+
let g = te(i, { relative: s.relative }), d = z(), v = c.useContext(le), { navigator: p, basename: y } = c.useContext(j), x = v != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1755
1755
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1756
|
-
|
|
1757
|
-
r || (b = b.toLowerCase(), R = R ? R.toLowerCase() : null, f = f.toLowerCase()), R &&
|
|
1758
|
-
const
|
|
1759
|
-
let T = b === f || !n && b.startsWith(f) && b.charAt(
|
|
1756
|
+
Fr(g) && u === !0, f = p.encodeLocation ? p.encodeLocation(g).pathname : g.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 && y && (R = H(R, y) || R);
|
|
1758
|
+
const P = f !== "/" && f.endsWith("/") ? f.length - 1 : f.length;
|
|
1759
|
+
let T = b === f || !n && b.startsWith(f) && b.charAt(P) === "/", U = R != null && (R === f || !n && R.startsWith(f) && R.charAt(f.length) === "/"), O = {
|
|
1760
1760
|
isActive: T,
|
|
1761
1761
|
isPending: U,
|
|
1762
|
-
isTransitioning:
|
|
1762
|
+
isTransitioning: x
|
|
1763
1763
|
}, _ = T ? t : void 0, $;
|
|
1764
1764
|
typeof a == "function" ? $ = a(O) : $ = [
|
|
1765
1765
|
a,
|
|
1766
1766
|
T ? "active" : null,
|
|
1767
1767
|
U ? "pending" : null,
|
|
1768
|
-
|
|
1768
|
+
x ? "transitioning" : null
|
|
1769
1769
|
].filter(Boolean).join(" ");
|
|
1770
1770
|
let A = typeof o == "function" ? o(O) : o;
|
|
1771
1771
|
return /* @__PURE__ */ c.createElement(
|
|
1772
|
-
|
|
1772
|
+
at,
|
|
1773
1773
|
{
|
|
1774
1774
|
...s,
|
|
1775
1775
|
"aria-current": _,
|
|
@@ -1783,8 +1783,8 @@ var Pr = c.forwardRef(
|
|
|
1783
1783
|
);
|
|
1784
1784
|
}
|
|
1785
1785
|
);
|
|
1786
|
-
|
|
1787
|
-
var
|
|
1786
|
+
Lr.displayName = "NavLink";
|
|
1787
|
+
var $r = c.forwardRef(
|
|
1788
1788
|
({
|
|
1789
1789
|
discover: e = "render",
|
|
1790
1790
|
fetcherKey: t,
|
|
@@ -1797,14 +1797,14 @@ var Tr = c.forwardRef(
|
|
|
1797
1797
|
onSubmit: l,
|
|
1798
1798
|
relative: s,
|
|
1799
1799
|
preventScrollReset: h,
|
|
1800
|
-
viewTransition:
|
|
1800
|
+
viewTransition: g,
|
|
1801
1801
|
...d
|
|
1802
1802
|
}, v) => {
|
|
1803
|
-
let p =
|
|
1803
|
+
let p = Nr(), y = jr(u, { relative: s }), x = i.toLowerCase() === "get" ? "get" : "post", f = typeof u == "string" && nt.test(u), b = (R) => {
|
|
1804
1804
|
if (l && l(R), R.defaultPrevented) return;
|
|
1805
1805
|
R.preventDefault();
|
|
1806
|
-
let
|
|
1807
|
-
p(
|
|
1806
|
+
let P = R.nativeEvent.submitter, T = P?.getAttribute("formmethod") || i;
|
|
1807
|
+
p(P || R.currentTarget, {
|
|
1808
1808
|
fetcherKey: t,
|
|
1809
1809
|
method: T,
|
|
1810
1810
|
navigate: r,
|
|
@@ -1812,15 +1812,15 @@ var Tr = c.forwardRef(
|
|
|
1812
1812
|
state: o,
|
|
1813
1813
|
relative: s,
|
|
1814
1814
|
preventScrollReset: h,
|
|
1815
|
-
viewTransition:
|
|
1815
|
+
viewTransition: g
|
|
1816
1816
|
});
|
|
1817
1817
|
};
|
|
1818
1818
|
return /* @__PURE__ */ c.createElement(
|
|
1819
1819
|
"form",
|
|
1820
1820
|
{
|
|
1821
1821
|
ref: v,
|
|
1822
|
-
method:
|
|
1823
|
-
action:
|
|
1822
|
+
method: x,
|
|
1823
|
+
action: y,
|
|
1824
1824
|
onSubmit: a ? l : b,
|
|
1825
1825
|
...d,
|
|
1826
1826
|
"data-discover": !f && e === "render" ? "true" : void 0
|
|
@@ -1828,15 +1828,15 @@ var Tr = c.forwardRef(
|
|
|
1828
1828
|
);
|
|
1829
1829
|
}
|
|
1830
1830
|
);
|
|
1831
|
-
|
|
1832
|
-
function
|
|
1831
|
+
$r.displayName = "Form";
|
|
1832
|
+
function Or(e) {
|
|
1833
1833
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1834
1834
|
}
|
|
1835
|
-
function
|
|
1835
|
+
function ot(e) {
|
|
1836
1836
|
let t = c.useContext(J);
|
|
1837
|
-
return
|
|
1837
|
+
return k(t, Or(e)), t;
|
|
1838
1838
|
}
|
|
1839
|
-
function
|
|
1839
|
+
function _r(e, {
|
|
1840
1840
|
target: t,
|
|
1841
1841
|
replace: r,
|
|
1842
1842
|
state: a,
|
|
@@ -1844,14 +1844,14 @@ function Lr(e, {
|
|
|
1844
1844
|
relative: o,
|
|
1845
1845
|
viewTransition: i
|
|
1846
1846
|
} = {}) {
|
|
1847
|
-
let u =
|
|
1847
|
+
let u = Ke(), l = z(), s = te(e, { relative: o });
|
|
1848
1848
|
return c.useCallback(
|
|
1849
1849
|
(h) => {
|
|
1850
|
-
if (
|
|
1850
|
+
if (cr(h, t)) {
|
|
1851
1851
|
h.preventDefault();
|
|
1852
|
-
let
|
|
1852
|
+
let g = r !== void 0 ? r : Z(l) === Z(s);
|
|
1853
1853
|
u(e, {
|
|
1854
|
-
replace:
|
|
1854
|
+
replace: g,
|
|
1855
1855
|
state: a,
|
|
1856
1856
|
preventScrollReset: n,
|
|
1857
1857
|
relative: o,
|
|
@@ -1873,20 +1873,20 @@ function Lr(e, {
|
|
|
1873
1873
|
]
|
|
1874
1874
|
);
|
|
1875
1875
|
}
|
|
1876
|
-
var
|
|
1877
|
-
function
|
|
1878
|
-
let { router: e } =
|
|
1876
|
+
var Ar = 0, Dr = () => `__${String(++Ar)}__`;
|
|
1877
|
+
function Nr() {
|
|
1878
|
+
let { router: e } = ot(
|
|
1879
1879
|
"useSubmit"
|
|
1880
1880
|
/* UseSubmit */
|
|
1881
|
-
), { basename: t } = c.useContext(
|
|
1881
|
+
), { basename: t } = c.useContext(j), r = er();
|
|
1882
1882
|
return c.useCallback(
|
|
1883
1883
|
async (a, n = {}) => {
|
|
1884
|
-
let { action: o, method: i, encType: u, formData: l, body: s } =
|
|
1884
|
+
let { action: o, method: i, encType: u, formData: l, body: s } = hr(
|
|
1885
1885
|
a,
|
|
1886
1886
|
t
|
|
1887
1887
|
);
|
|
1888
1888
|
if (n.navigate === !1) {
|
|
1889
|
-
let h = n.fetcherKey ||
|
|
1889
|
+
let h = n.fetcherKey || Dr();
|
|
1890
1890
|
await e.fetch(h, r, n.action || o, {
|
|
1891
1891
|
preventScrollReset: n.preventScrollReset,
|
|
1892
1892
|
formData: l,
|
|
@@ -1912,28 +1912,28 @@ function _r() {
|
|
|
1912
1912
|
[e, t, r]
|
|
1913
1913
|
);
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1916
|
-
let { basename: r } = c.useContext(
|
|
1917
|
-
|
|
1918
|
-
let [n] = a.matches.slice(-1), o = { ...te(e || ".", { relative: t }) }, i =
|
|
1915
|
+
function jr(e, { relative: t } = {}) {
|
|
1916
|
+
let { basename: r } = c.useContext(j), a = c.useContext(M);
|
|
1917
|
+
k(a, "useFormAction must be used inside a RouteContext");
|
|
1918
|
+
let [n] = a.matches.slice(-1), o = { ...te(e || ".", { relative: t }) }, i = z();
|
|
1919
1919
|
if (e == null) {
|
|
1920
1920
|
o.search = i.search;
|
|
1921
1921
|
let u = new URLSearchParams(o.search), l = u.getAll("index");
|
|
1922
1922
|
if (l.some((h) => h === "")) {
|
|
1923
|
-
u.delete("index"), l.filter((
|
|
1923
|
+
u.delete("index"), l.filter((g) => g).forEach((g) => u.append("index", g));
|
|
1924
1924
|
let h = u.toString();
|
|
1925
1925
|
o.search = h ? `?${h}` : "";
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
|
-
return (!e || e === ".") && n.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r :
|
|
1928
|
+
return (!e || e === ".") && n.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : F([r, o.pathname])), Z(o);
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1931
|
-
let r = c.useContext(
|
|
1932
|
-
|
|
1930
|
+
function Fr(e, t = {}) {
|
|
1931
|
+
let r = c.useContext(Je);
|
|
1932
|
+
k(
|
|
1933
1933
|
r != null,
|
|
1934
1934
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1935
1935
|
);
|
|
1936
|
-
let { basename: a } =
|
|
1936
|
+
let { basename: a } = ot(
|
|
1937
1937
|
"useViewTransitionState"
|
|
1938
1938
|
/* useViewTransitionState */
|
|
1939
1939
|
), n = te(e, { relative: t.relative });
|
|
@@ -1943,34 +1943,34 @@ function Dr(e, t = {}) {
|
|
|
1943
1943
|
return ie(n.pathname, i) != null || ie(n.pathname, o) != null;
|
|
1944
1944
|
}
|
|
1945
1945
|
[
|
|
1946
|
-
...
|
|
1946
|
+
...br
|
|
1947
1947
|
];
|
|
1948
|
-
const
|
|
1948
|
+
const it = C.createContext({
|
|
1949
1949
|
history: [],
|
|
1950
1950
|
addToHistory: () => {
|
|
1951
1951
|
},
|
|
1952
1952
|
popFromHistory: () => "",
|
|
1953
1953
|
replaceHistory: () => {
|
|
1954
1954
|
}
|
|
1955
|
-
}),
|
|
1955
|
+
}), Wr = ({
|
|
1956
1956
|
routes: e,
|
|
1957
1957
|
children: t
|
|
1958
1958
|
}) => {
|
|
1959
|
-
const r =
|
|
1959
|
+
const r = C.useRef(["/"]), [a, n] = C.useState(["/"]), o = C.useCallback((h) => {
|
|
1960
1960
|
r.current = h, n(h);
|
|
1961
1961
|
}, []), i = (h) => {
|
|
1962
1962
|
o([...r.current, h]);
|
|
1963
1963
|
}, u = (h) => {
|
|
1964
|
-
let
|
|
1965
|
-
return r.current.length === 0 ? "/" : (r.current.length <= h ? (
|
|
1964
|
+
let g = "", d = [];
|
|
1965
|
+
return r.current.length === 0 ? "/" : (r.current.length <= h ? (g = r.current[0], d = [g]) : (d = r.current.slice(
|
|
1966
1966
|
0,
|
|
1967
1967
|
r.current.length - h
|
|
1968
|
-
),
|
|
1968
|
+
), g = d[d.length - 1]), o(d), g);
|
|
1969
1969
|
}, l = (h) => {
|
|
1970
1970
|
o(h);
|
|
1971
|
-
}, s = e.map((h) => /* @__PURE__ */
|
|
1972
|
-
return /* @__PURE__ */
|
|
1973
|
-
|
|
1971
|
+
}, s = e.map((h) => /* @__PURE__ */ S.jsx(Qe, { path: h.path, element: h.render }));
|
|
1972
|
+
return /* @__PURE__ */ S.jsx(
|
|
1973
|
+
it.Provider,
|
|
1974
1974
|
{
|
|
1975
1975
|
value: {
|
|
1976
1976
|
history: a,
|
|
@@ -1978,25 +1978,25 @@ const at = E.createContext({
|
|
|
1978
1978
|
popFromHistory: u,
|
|
1979
1979
|
replaceHistory: l
|
|
1980
1980
|
},
|
|
1981
|
-
children: /* @__PURE__ */
|
|
1981
|
+
children: /* @__PURE__ */ S.jsxs(Ir, { children: [
|
|
1982
1982
|
t,
|
|
1983
|
-
/* @__PURE__ */
|
|
1983
|
+
/* @__PURE__ */ S.jsx(or, { children: s })
|
|
1984
1984
|
] })
|
|
1985
1985
|
}
|
|
1986
1986
|
);
|
|
1987
|
-
},
|
|
1988
|
-
const e =
|
|
1987
|
+
}, Vr = () => {
|
|
1988
|
+
const e = Ke(), t = z(), r = He(it), a = C.useCallback(
|
|
1989
1989
|
(i, u = !0) => {
|
|
1990
1990
|
i !== t.pathname && e(i, { replace: !0 }), u && r.addToHistory(i);
|
|
1991
1991
|
},
|
|
1992
1992
|
[t.pathname, e, r]
|
|
1993
|
-
), n =
|
|
1993
|
+
), n = C.useCallback(
|
|
1994
1994
|
(i) => {
|
|
1995
1995
|
const u = i || 1, l = r.popFromHistory(u);
|
|
1996
1996
|
a(l, !1);
|
|
1997
1997
|
},
|
|
1998
1998
|
[a, r]
|
|
1999
|
-
), o =
|
|
1999
|
+
), o = C.useCallback(
|
|
2000
2000
|
(i) => {
|
|
2001
2001
|
r.replaceHistory(i);
|
|
2002
2002
|
},
|
|
@@ -2009,7 +2009,7 @@ const at = E.createContext({
|
|
|
2009
2009
|
goTo: a,
|
|
2010
2010
|
replaceHistory: o
|
|
2011
2011
|
};
|
|
2012
|
-
},
|
|
2012
|
+
}, lt = C.createContext(
|
|
2013
2013
|
{
|
|
2014
2014
|
visibleItems: [],
|
|
2015
2015
|
isItemVisible: () => !1,
|
|
@@ -2018,15 +2018,15 @@ const at = E.createContext({
|
|
|
2018
2018
|
hideItem: () => {
|
|
2019
2019
|
}
|
|
2020
2020
|
}
|
|
2021
|
-
),
|
|
2022
|
-
const t =
|
|
2021
|
+
), Yr = ({ children: e }) => {
|
|
2022
|
+
const t = C.useRef([]), [r, a] = C.useState([]), n = C.useCallback((l) => {
|
|
2023
2023
|
console.log("ZAU UPDATING VISIBLE ITEMS", l), t.current = l, a(l);
|
|
2024
|
-
}, []), o =
|
|
2024
|
+
}, []), o = C.useCallback((l) => t.current.some((s) => s === l), []), i = C.useCallback(
|
|
2025
2025
|
(l) => {
|
|
2026
2026
|
o(l) || n([...t.current, l]);
|
|
2027
2027
|
},
|
|
2028
2028
|
[o, n]
|
|
2029
|
-
), u =
|
|
2029
|
+
), u = C.useCallback(
|
|
2030
2030
|
(l) => {
|
|
2031
2031
|
o(l) && n(
|
|
2032
2032
|
t.current.filter((h) => h !== l)
|
|
@@ -2034,8 +2034,8 @@ const at = E.createContext({
|
|
|
2034
2034
|
},
|
|
2035
2035
|
[o, n]
|
|
2036
2036
|
);
|
|
2037
|
-
return /* @__PURE__ */
|
|
2038
|
-
|
|
2037
|
+
return /* @__PURE__ */ S.jsx(
|
|
2038
|
+
lt.Provider,
|
|
2039
2039
|
{
|
|
2040
2040
|
value: {
|
|
2041
2041
|
visibleItems: r,
|
|
@@ -2047,7 +2047,7 @@ const at = E.createContext({
|
|
|
2047
2047
|
}
|
|
2048
2048
|
);
|
|
2049
2049
|
}, Re = () => {
|
|
2050
|
-
const e =
|
|
2050
|
+
const e = He(lt), t = (n) => e.visibleItems.some((o) => o === n), r = (n) => {
|
|
2051
2051
|
e.showItem(n);
|
|
2052
2052
|
}, a = (n) => {
|
|
2053
2053
|
e.hideItem(n);
|
|
@@ -2058,24 +2058,24 @@ const at = E.createContext({
|
|
|
2058
2058
|
showItem: r,
|
|
2059
2059
|
hideItem: a
|
|
2060
2060
|
};
|
|
2061
|
-
},
|
|
2061
|
+
}, Hr = ({
|
|
2062
2062
|
id: e,
|
|
2063
2063
|
onCloseDrawer: t,
|
|
2064
2064
|
drawerCloseOffset: r = 15
|
|
2065
2065
|
}) => {
|
|
2066
|
-
const { isItemVisible: a } = Re(), n =
|
|
2066
|
+
const { isItemVisible: a } = Re(), n = C.useRef(!1), o = C.useRef(null), i = C.useRef(null), u = C.useRef(null), [l, s] = C.useState(0), h = C.useRef(void 0), g = (p) => {
|
|
2067
2067
|
n.current = !0;
|
|
2068
|
-
const
|
|
2069
|
-
h.current =
|
|
2068
|
+
const y = p.clientY;
|
|
2069
|
+
h.current = y;
|
|
2070
2070
|
}, d = (p) => {
|
|
2071
2071
|
n.current = !1, h.current = void 0, s(0);
|
|
2072
2072
|
}, v = (p) => {
|
|
2073
2073
|
if (!(!o || !i || !u) && n.current && h.current !== void 0) {
|
|
2074
|
-
const
|
|
2075
|
-
let f = h.current -
|
|
2074
|
+
const y = p.clientY, x = i.current?.clientHeight || 0;
|
|
2075
|
+
let f = h.current - y;
|
|
2076
2076
|
f = -f, s(
|
|
2077
2077
|
f < 0 ? 0 : -f
|
|
2078
|
-
), f >=
|
|
2078
|
+
), f >= x - r && (t?.(), d());
|
|
2079
2079
|
}
|
|
2080
2080
|
};
|
|
2081
2081
|
return {
|
|
@@ -2084,11 +2084,11 @@ const at = E.createContext({
|
|
|
2084
2084
|
drawerRef: i,
|
|
2085
2085
|
drawerBottomDistance: l,
|
|
2086
2086
|
handleRef: u,
|
|
2087
|
-
onDragStart:
|
|
2087
|
+
onDragStart: g,
|
|
2088
2088
|
onDrag: v,
|
|
2089
2089
|
onDragEnd: d
|
|
2090
2090
|
};
|
|
2091
|
-
},
|
|
2091
|
+
}, Jr = (e) => {
|
|
2092
2092
|
const { children: t, backgroundStyles: r, contentStyles: a, handle: n } = e, {
|
|
2093
2093
|
isVisible: o,
|
|
2094
2094
|
drawerParentRef: i,
|
|
@@ -2096,10 +2096,10 @@ const at = E.createContext({
|
|
|
2096
2096
|
handleRef: l,
|
|
2097
2097
|
drawerBottomDistance: s,
|
|
2098
2098
|
onDragStart: h,
|
|
2099
|
-
onDrag:
|
|
2099
|
+
onDrag: g,
|
|
2100
2100
|
onDragEnd: d
|
|
2101
|
-
} =
|
|
2102
|
-
return /* @__PURE__ */
|
|
2101
|
+
} = Hr(e);
|
|
2102
|
+
return /* @__PURE__ */ S.jsx(S.Fragment, { children: o && /* @__PURE__ */ S.jsx(
|
|
2103
2103
|
"div",
|
|
2104
2104
|
{
|
|
2105
2105
|
ref: i,
|
|
@@ -2118,8 +2118,8 @@ const at = E.createContext({
|
|
|
2118
2118
|
...r
|
|
2119
2119
|
},
|
|
2120
2120
|
onPointerUp: d,
|
|
2121
|
-
onPointerMoveCapture:
|
|
2122
|
-
children: /* @__PURE__ */
|
|
2121
|
+
onPointerMoveCapture: g,
|
|
2122
|
+
children: /* @__PURE__ */ S.jsxs(
|
|
2123
2123
|
"div",
|
|
2124
2124
|
{
|
|
2125
2125
|
ref: u,
|
|
@@ -2145,7 +2145,7 @@ const at = E.createContext({
|
|
|
2145
2145
|
v.stopPropagation();
|
|
2146
2146
|
},
|
|
2147
2147
|
children: [
|
|
2148
|
-
/* @__PURE__ */
|
|
2148
|
+
/* @__PURE__ */ S.jsx(
|
|
2149
2149
|
"div",
|
|
2150
2150
|
{
|
|
2151
2151
|
ref: l,
|
|
@@ -2170,7 +2170,7 @@ const at = E.createContext({
|
|
|
2170
2170
|
)
|
|
2171
2171
|
}
|
|
2172
2172
|
) });
|
|
2173
|
-
},
|
|
2173
|
+
}, qr = ({
|
|
2174
2174
|
id: e,
|
|
2175
2175
|
children: t,
|
|
2176
2176
|
backgroundStyles: r,
|
|
@@ -2178,7 +2178,7 @@ const at = E.createContext({
|
|
|
2178
2178
|
onClickOutsideModal: n
|
|
2179
2179
|
}) => {
|
|
2180
2180
|
const { isItemVisible: o } = Re();
|
|
2181
|
-
return /* @__PURE__ */
|
|
2181
|
+
return /* @__PURE__ */ S.jsx(S.Fragment, { children: o(e) && /* @__PURE__ */ S.jsx(
|
|
2182
2182
|
"div",
|
|
2183
2183
|
{
|
|
2184
2184
|
style: {
|
|
@@ -2200,7 +2200,7 @@ const at = E.createContext({
|
|
|
2200
2200
|
onClick: () => {
|
|
2201
2201
|
n?.();
|
|
2202
2202
|
},
|
|
2203
|
-
children: /* @__PURE__ */
|
|
2203
|
+
children: /* @__PURE__ */ S.jsx(
|
|
2204
2204
|
"div",
|
|
2205
2205
|
{
|
|
2206
2206
|
style: {
|
|
@@ -2228,17 +2228,116 @@ const at = E.createContext({
|
|
|
2228
2228
|
)
|
|
2229
2229
|
}
|
|
2230
2230
|
) });
|
|
2231
|
-
},
|
|
2231
|
+
}, Gr = ({
|
|
2232
|
+
header: e,
|
|
2233
|
+
containerStyles: t,
|
|
2234
|
+
pageStyles: r,
|
|
2235
|
+
children: a,
|
|
2236
|
+
footer: n,
|
|
2237
|
+
floatingContent: o
|
|
2238
|
+
}) => /* @__PURE__ */ S.jsxs(
|
|
2239
|
+
"div",
|
|
2240
|
+
{
|
|
2241
|
+
"data-testid": "page-container",
|
|
2242
|
+
style: {
|
|
2243
|
+
minHeight: "100vh",
|
|
2244
|
+
width: "100%",
|
|
2245
|
+
minWidth: "100%",
|
|
2246
|
+
overflow: "hidden",
|
|
2247
|
+
position: "relative",
|
|
2248
|
+
boxSizing: "border-box",
|
|
2249
|
+
top: 0,
|
|
2250
|
+
bottom: 0,
|
|
2251
|
+
left: 0,
|
|
2252
|
+
right: 0,
|
|
2253
|
+
display: "flex",
|
|
2254
|
+
flexDirection: "column",
|
|
2255
|
+
...t
|
|
2256
|
+
},
|
|
2257
|
+
children: [
|
|
2258
|
+
/* @__PURE__ */ S.jsxs(
|
|
2259
|
+
"div",
|
|
2260
|
+
{
|
|
2261
|
+
"data-testid": "page-layout",
|
|
2262
|
+
style: {
|
|
2263
|
+
minHeight: "100%",
|
|
2264
|
+
width: "100%",
|
|
2265
|
+
overflowY: "auto",
|
|
2266
|
+
display: "flex",
|
|
2267
|
+
flexDirection: "column",
|
|
2268
|
+
boxSizing: "border-box"
|
|
2269
|
+
},
|
|
2270
|
+
children: [
|
|
2271
|
+
e && /* @__PURE__ */ S.jsx(
|
|
2272
|
+
"div",
|
|
2273
|
+
{
|
|
2274
|
+
"data-testid": "page-header",
|
|
2275
|
+
style: {
|
|
2276
|
+
width: "100%",
|
|
2277
|
+
zIndex: 99,
|
|
2278
|
+
position: e.visibility === "fixed" ? "relative" : "fixed",
|
|
2279
|
+
top: 0,
|
|
2280
|
+
left: 0,
|
|
2281
|
+
right: 0,
|
|
2282
|
+
display: "flex",
|
|
2283
|
+
flexDirection: "row",
|
|
2284
|
+
height: "fit-content",
|
|
2285
|
+
boxSizing: "border-box",
|
|
2286
|
+
...e.styles
|
|
2287
|
+
},
|
|
2288
|
+
children: e.content
|
|
2289
|
+
}
|
|
2290
|
+
),
|
|
2291
|
+
/* @__PURE__ */ S.jsx(
|
|
2292
|
+
"div",
|
|
2293
|
+
{
|
|
2294
|
+
style: {
|
|
2295
|
+
width: "100%",
|
|
2296
|
+
flex: 1,
|
|
2297
|
+
minHeight: "fit-content",
|
|
2298
|
+
padding: "24px",
|
|
2299
|
+
boxSizing: "border-box",
|
|
2300
|
+
...r
|
|
2301
|
+
},
|
|
2302
|
+
children: a
|
|
2303
|
+
}
|
|
2304
|
+
)
|
|
2305
|
+
]
|
|
2306
|
+
}
|
|
2307
|
+
),
|
|
2308
|
+
n && /* @__PURE__ */ S.jsx(
|
|
2309
|
+
"div",
|
|
2310
|
+
{
|
|
2311
|
+
"data-testid": "page-footer",
|
|
2312
|
+
style: {
|
|
2313
|
+
width: "100%",
|
|
2314
|
+
zIndex: 99,
|
|
2315
|
+
position: n.visibility === "fixed" ? "relative" : "fixed",
|
|
2316
|
+
bottom: 0,
|
|
2317
|
+
left: 0,
|
|
2318
|
+
right: 0,
|
|
2319
|
+
display: "flex",
|
|
2320
|
+
flexDirection: "row",
|
|
2321
|
+
height: "fit-content",
|
|
2322
|
+
boxSizing: "border-box",
|
|
2323
|
+
...n.styles
|
|
2324
|
+
},
|
|
2325
|
+
children: n.content
|
|
2326
|
+
}
|
|
2327
|
+
)
|
|
2328
|
+
]
|
|
2329
|
+
}
|
|
2330
|
+
), Kr = ({
|
|
2232
2331
|
id: e,
|
|
2233
2332
|
children: t,
|
|
2234
2333
|
styles: r,
|
|
2235
2334
|
durationInSeconds: a = 3
|
|
2236
2335
|
}) => {
|
|
2237
|
-
const n =
|
|
2238
|
-
return
|
|
2336
|
+
const n = C.useRef(!1), { isItemVisible: o, hideItem: i } = Re();
|
|
2337
|
+
return C.useEffect(() => {
|
|
2239
2338
|
const u = o(e);
|
|
2240
2339
|
n.current !== u && (n.current = u, u && setTimeout(() => i(e), a * 1e3));
|
|
2241
|
-
}, [n, o, i]), /* @__PURE__ */
|
|
2340
|
+
}, [n, o, i]), /* @__PURE__ */ S.jsx(S.Fragment, { children: o(e) && /* @__PURE__ */ S.jsx(
|
|
2242
2341
|
"div",
|
|
2243
2342
|
{
|
|
2244
2343
|
style: {
|
|
@@ -2265,11 +2364,11 @@ const at = E.createContext({
|
|
|
2265
2364
|
children: t
|
|
2266
2365
|
}
|
|
2267
2366
|
) });
|
|
2268
|
-
},
|
|
2367
|
+
}, Xr = ({
|
|
2269
2368
|
overflowEllipsis: e,
|
|
2270
2369
|
children: t,
|
|
2271
2370
|
styles: r
|
|
2272
|
-
}) => /* @__PURE__ */
|
|
2371
|
+
}) => /* @__PURE__ */ S.jsx(
|
|
2273
2372
|
"p",
|
|
2274
2373
|
{
|
|
2275
2374
|
style: {
|
|
@@ -2286,7 +2385,7 @@ const at = E.createContext({
|
|
|
2286
2385
|
children: t
|
|
2287
2386
|
}
|
|
2288
2387
|
);
|
|
2289
|
-
class
|
|
2388
|
+
class Zr {
|
|
2290
2389
|
static isScrollEnabled = () => document.body.style.overflow === "unset" || document.body.style.overflow === "auto";
|
|
2291
2390
|
static disableScroll = () => {
|
|
2292
2391
|
document.body.style.overflow = "hidden";
|
|
@@ -2295,13 +2394,13 @@ class Jr {
|
|
|
2295
2394
|
document.body.style.overflow = "unset";
|
|
2296
2395
|
};
|
|
2297
2396
|
}
|
|
2298
|
-
class
|
|
2397
|
+
class Qr {
|
|
2299
2398
|
static getPascalCase = (t) => t.replace(/\w+/g, function(r) {
|
|
2300
2399
|
return r[0].toUpperCase() + r.slice(1).toLowerCase();
|
|
2301
2400
|
});
|
|
2302
2401
|
static isEqual = (t, r, a = !0) => a ? t === r : t.toUpperCase() === r.toUpperCase();
|
|
2303
2402
|
}
|
|
2304
|
-
const
|
|
2403
|
+
const en = (e) => Me(e, []), tn = () => {
|
|
2305
2404
|
const e = (r, a) => {
|
|
2306
2405
|
let n = 0, o = `${r}?`;
|
|
2307
2406
|
for (const i in a) {
|
|
@@ -2314,31 +2413,50 @@ const Gr = (e) => st(e, []), Kr = () => {
|
|
|
2314
2413
|
const n = e(r, a);
|
|
2315
2414
|
return await (await fetch(n)).json();
|
|
2316
2415
|
};
|
|
2317
|
-
},
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2416
|
+
}, Mr = {
|
|
2417
|
+
xs: 0,
|
|
2418
|
+
sm: 420,
|
|
2419
|
+
md: 768,
|
|
2420
|
+
lg: 991,
|
|
2421
|
+
xl: 1200,
|
|
2422
|
+
xxl: 1440
|
|
2423
|
+
}, rn = (e) => {
|
|
2424
|
+
const t = {
|
|
2425
|
+
...Mr,
|
|
2426
|
+
...e?.breakpointConfiguration
|
|
2427
|
+
}, [r, a] = ct(
|
|
2428
|
+
Fe(t)
|
|
2429
|
+
), n = () => {
|
|
2430
|
+
a(Fe(t));
|
|
2431
|
+
};
|
|
2432
|
+
return Me(() => (window.addEventListener("resize", n), () => {
|
|
2433
|
+
window.removeEventListener("resize", n);
|
|
2434
|
+
}), []), ft(() => r, [r]);
|
|
2435
|
+
}, Ur = (e, t) => e < t.sm ? "xs" : e < t.md ? "sm" : e < t.lg ? "md" : e < t.xl ? "lg" : e < t.xxl ? "xl" : "xxl", Br = (e, t) => e <= t.sm ? "mobile" : e <= t.md ? "tablet" : "desktop", Fe = (e) => {
|
|
2436
|
+
const t = window.innerWidth, r = Ur(t, e), a = Br(t, e);
|
|
2437
|
+
return { currentWidth: t, currentBreakpoint: r, currentSize: a };
|
|
2438
|
+
}, nn = (e) => {
|
|
2439
|
+
const t = e.translations, r = e.language, a = (o) => o[r];
|
|
2440
|
+
return {
|
|
2441
|
+
t: (o) => t[o] ? a(t[o]) : o,
|
|
2442
|
+
getTranslation: a
|
|
2328
2443
|
};
|
|
2329
2444
|
};
|
|
2330
2445
|
export {
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2446
|
+
Jr as Drawer,
|
|
2447
|
+
Yr as FeedbackProvider,
|
|
2448
|
+
qr as Modal,
|
|
2449
|
+
Wr as NavigationProvider,
|
|
2450
|
+
Gr as PageLayout,
|
|
2451
|
+
Zr as ScrollHelper,
|
|
2452
|
+
Qr as TextHelper,
|
|
2453
|
+
Kr as Toast,
|
|
2454
|
+
Xr as Typography,
|
|
2455
|
+
Mr as defaultBreakpoints,
|
|
2456
|
+
en as useDidMount,
|
|
2340
2457
|
Re as useFeedback,
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2458
|
+
tn as useFetch,
|
|
2459
|
+
Vr as useNavigation,
|
|
2460
|
+
rn as useResponsive,
|
|
2461
|
+
nn as useTranslations
|
|
2344
2462
|
};
|