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