@raspberrypifoundation/design-system-react 1.7.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +64 -10
- package/dist/rpf-design-system-react.css +1 -0
- package/dist/rpf-design-system-react.js +2744 -0
- package/dist/rpf-design-system-react.umd.cjs +35 -0
- package/dist/scss/components/accordion.scss +94 -0
- package/dist/scss/components/alert.scss +131 -0
- package/dist/scss/components/burger-menu.scss +89 -0
- package/dist/scss/components/button.scss +321 -0
- package/dist/scss/components/forms/error-message.scss +20 -0
- package/dist/scss/components/forms/fieldset.scss +42 -0
- package/dist/scss/components/forms/input-checkbox.scss +62 -0
- package/dist/scss/components/forms/input-label.scss +36 -0
- package/dist/scss/components/forms/input-number.scss +61 -0
- package/dist/scss/components/forms/input-password.scss +109 -0
- package/dist/scss/components/forms/input-radio.scss +63 -0
- package/dist/scss/components/forms/input-search.scss +65 -0
- package/dist/scss/components/forms/input-select.scss +14 -0
- package/dist/scss/components/forms/input-text.scss +5 -0
- package/dist/scss/components/forms/input-textarea.scss +12 -0
- package/dist/scss/components/forms/inputs.scss +40 -0
- package/dist/scss/components/layout/decorative-section.scss +185 -0
- package/dist/scss/components/link.scss +51 -0
- package/dist/scss/components/menu-item.scss +66 -0
- package/dist/scss/components/menu-title.scss +25 -0
- package/dist/scss/components/menu.scss +31 -0
- package/dist/scss/components/progress-bar.scss +43 -0
- package/dist/scss/components/squiggle.scss +46 -0
- package/dist/scss/components/table/table-cell.scss +82 -0
- package/dist/scss/components/table/table.scss +32 -0
- package/dist/scss/components/tag.scss +50 -0
- package/dist/scss/design-system-core.scss +37 -0
- package/dist/scss/mixins/_inputs.scss +19 -0
- package/dist/scss/mixins/_typography.scss +75 -0
- package/dist/scss/properties/_border.scss +13 -0
- package/dist/scss/properties/_font-size.scss +14 -0
- package/dist/scss/properties/_font-weight.scss +4 -0
- package/dist/scss/properties/_line-height.scss +15 -0
- package/dist/scss/properties/_shadows.scss +7 -0
- package/dist/scss/properties/_sizing.scss +6 -0
- package/dist/scss/properties/_spacing.scss +16 -0
- package/dist/scss/properties/colors/_alert.scss +10 -0
- package/dist/scss/properties/colors/_brand.scss +14 -0
- package/dist/scss/properties/colors/_decorative.scss +58 -0
- package/dist/scss/properties/colors/_greys.scss +18 -0
- package/dist/scss/properties/colors/_inputs.scss +13 -0
- package/dist/scss/properties/colors/_text.scss +7 -0
- package/package.json +58 -83
- package/dist/cjs/bundle.js +0 -1821
- package/dist/esm/bundle.js +0 -1803
|
@@ -0,0 +1,2744 @@
|
|
|
1
|
+
import { jsxs as q, jsx as R, Fragment as je } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import Tt from "react";
|
|
4
|
+
function st(e) {
|
|
5
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
|
+
}
|
|
7
|
+
var Te = { exports: {} };
|
|
8
|
+
/*!
|
|
9
|
+
Copyright (c) 2018 Jed Watson.
|
|
10
|
+
Licensed under the MIT License (MIT), see
|
|
11
|
+
http://jedwatson.github.io/classnames
|
|
12
|
+
*/
|
|
13
|
+
var Ve;
|
|
14
|
+
function St() {
|
|
15
|
+
return Ve || (Ve = 1, function(e) {
|
|
16
|
+
(function() {
|
|
17
|
+
var t = {}.hasOwnProperty;
|
|
18
|
+
function r() {
|
|
19
|
+
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
20
|
+
var l = arguments[o];
|
|
21
|
+
l && (a = n(a, i(l)));
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
}
|
|
25
|
+
function i(a) {
|
|
26
|
+
if (typeof a == "string" || typeof a == "number")
|
|
27
|
+
return a;
|
|
28
|
+
if (typeof a != "object")
|
|
29
|
+
return "";
|
|
30
|
+
if (Array.isArray(a))
|
|
31
|
+
return r.apply(null, a);
|
|
32
|
+
if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]"))
|
|
33
|
+
return a.toString();
|
|
34
|
+
var o = "";
|
|
35
|
+
for (var l in a)
|
|
36
|
+
t.call(a, l) && a[l] && (o = n(o, l));
|
|
37
|
+
return o;
|
|
38
|
+
}
|
|
39
|
+
function n(a, o) {
|
|
40
|
+
return o ? a ? a + " " + o : a + o : a;
|
|
41
|
+
}
|
|
42
|
+
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
43
|
+
})();
|
|
44
|
+
}(Te)), Te.exports;
|
|
45
|
+
}
|
|
46
|
+
var Pt = St();
|
|
47
|
+
const B = /* @__PURE__ */ st(Pt);
|
|
48
|
+
var fe = { exports: {} }, de = { exports: {} }, j = {};
|
|
49
|
+
/** @license React v16.13.1
|
|
50
|
+
* react-is.production.min.js
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/
|
|
57
|
+
var Je;
|
|
58
|
+
function _t() {
|
|
59
|
+
if (Je) return j;
|
|
60
|
+
Je = 1;
|
|
61
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, n = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, o = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, v = e ? Symbol.for("react.suspense") : 60113, f = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, h = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, N = e ? Symbol.for("react.scope") : 60119;
|
|
62
|
+
function T(g) {
|
|
63
|
+
if (typeof g == "object" && g !== null) {
|
|
64
|
+
var U = g.$$typeof;
|
|
65
|
+
switch (U) {
|
|
66
|
+
case t:
|
|
67
|
+
switch (g = g.type, g) {
|
|
68
|
+
case c:
|
|
69
|
+
case u:
|
|
70
|
+
case i:
|
|
71
|
+
case a:
|
|
72
|
+
case n:
|
|
73
|
+
case v:
|
|
74
|
+
return g;
|
|
75
|
+
default:
|
|
76
|
+
switch (g = g && g.$$typeof, g) {
|
|
77
|
+
case l:
|
|
78
|
+
case d:
|
|
79
|
+
case h:
|
|
80
|
+
case b:
|
|
81
|
+
case o:
|
|
82
|
+
return g;
|
|
83
|
+
default:
|
|
84
|
+
return U;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
case r:
|
|
88
|
+
return U;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function k(g) {
|
|
93
|
+
return T(g) === u;
|
|
94
|
+
}
|
|
95
|
+
return j.AsyncMode = c, j.ConcurrentMode = u, j.ContextConsumer = l, j.ContextProvider = o, j.Element = t, j.ForwardRef = d, j.Fragment = i, j.Lazy = h, j.Memo = b, j.Portal = r, j.Profiler = a, j.StrictMode = n, j.Suspense = v, j.isAsyncMode = function(g) {
|
|
96
|
+
return k(g) || T(g) === c;
|
|
97
|
+
}, j.isConcurrentMode = k, j.isContextConsumer = function(g) {
|
|
98
|
+
return T(g) === l;
|
|
99
|
+
}, j.isContextProvider = function(g) {
|
|
100
|
+
return T(g) === o;
|
|
101
|
+
}, j.isElement = function(g) {
|
|
102
|
+
return typeof g == "object" && g !== null && g.$$typeof === t;
|
|
103
|
+
}, j.isForwardRef = function(g) {
|
|
104
|
+
return T(g) === d;
|
|
105
|
+
}, j.isFragment = function(g) {
|
|
106
|
+
return T(g) === i;
|
|
107
|
+
}, j.isLazy = function(g) {
|
|
108
|
+
return T(g) === h;
|
|
109
|
+
}, j.isMemo = function(g) {
|
|
110
|
+
return T(g) === b;
|
|
111
|
+
}, j.isPortal = function(g) {
|
|
112
|
+
return T(g) === r;
|
|
113
|
+
}, j.isProfiler = function(g) {
|
|
114
|
+
return T(g) === a;
|
|
115
|
+
}, j.isStrictMode = function(g) {
|
|
116
|
+
return T(g) === n;
|
|
117
|
+
}, j.isSuspense = function(g) {
|
|
118
|
+
return T(g) === v;
|
|
119
|
+
}, j.isValidElementType = function(g) {
|
|
120
|
+
return typeof g == "string" || typeof g == "function" || g === i || g === u || g === a || g === n || g === v || g === f || typeof g == "object" && g !== null && (g.$$typeof === h || g.$$typeof === b || g.$$typeof === o || g.$$typeof === l || g.$$typeof === d || g.$$typeof === C || g.$$typeof === y || g.$$typeof === N || g.$$typeof === E);
|
|
121
|
+
}, j.typeOf = T, j;
|
|
122
|
+
}
|
|
123
|
+
var M = {};
|
|
124
|
+
/** @license React v16.13.1
|
|
125
|
+
* react-is.development.js
|
|
126
|
+
*
|
|
127
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the MIT license found in the
|
|
130
|
+
* LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/
|
|
132
|
+
var Ke;
|
|
133
|
+
function Ot() {
|
|
134
|
+
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
135
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, n = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, o = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, v = e ? Symbol.for("react.suspense") : 60113, f = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, h = e ? Symbol.for("react.lazy") : 60116, E = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, N = e ? Symbol.for("react.scope") : 60119;
|
|
136
|
+
function T(w) {
|
|
137
|
+
return typeof w == "string" || typeof w == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
138
|
+
w === i || w === u || w === a || w === n || w === v || w === f || typeof w == "object" && w !== null && (w.$$typeof === h || w.$$typeof === b || w.$$typeof === o || w.$$typeof === l || w.$$typeof === d || w.$$typeof === C || w.$$typeof === y || w.$$typeof === N || w.$$typeof === E);
|
|
139
|
+
}
|
|
140
|
+
function k(w) {
|
|
141
|
+
if (typeof w == "object" && w !== null) {
|
|
142
|
+
var K = w.$$typeof;
|
|
143
|
+
switch (K) {
|
|
144
|
+
case t:
|
|
145
|
+
var ce = w.type;
|
|
146
|
+
switch (ce) {
|
|
147
|
+
case c:
|
|
148
|
+
case u:
|
|
149
|
+
case i:
|
|
150
|
+
case a:
|
|
151
|
+
case n:
|
|
152
|
+
case v:
|
|
153
|
+
return ce;
|
|
154
|
+
default:
|
|
155
|
+
var He = ce && ce.$$typeof;
|
|
156
|
+
switch (He) {
|
|
157
|
+
case l:
|
|
158
|
+
case d:
|
|
159
|
+
case h:
|
|
160
|
+
case b:
|
|
161
|
+
case o:
|
|
162
|
+
return He;
|
|
163
|
+
default:
|
|
164
|
+
return K;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
case r:
|
|
168
|
+
return K;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
var g = c, U = u, Y = l, V = o, F = t, H = d, ee = i, we = h, xe = b, ae = r, Re = a, J = n, te = v, ue = !1;
|
|
173
|
+
function Ce(w) {
|
|
174
|
+
return ue || (ue = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), m(w) || k(w) === c;
|
|
175
|
+
}
|
|
176
|
+
function m(w) {
|
|
177
|
+
return k(w) === u;
|
|
178
|
+
}
|
|
179
|
+
function x(w) {
|
|
180
|
+
return k(w) === l;
|
|
181
|
+
}
|
|
182
|
+
function $(w) {
|
|
183
|
+
return k(w) === o;
|
|
184
|
+
}
|
|
185
|
+
function _(w) {
|
|
186
|
+
return typeof w == "object" && w !== null && w.$$typeof === t;
|
|
187
|
+
}
|
|
188
|
+
function S(w) {
|
|
189
|
+
return k(w) === d;
|
|
190
|
+
}
|
|
191
|
+
function I(w) {
|
|
192
|
+
return k(w) === i;
|
|
193
|
+
}
|
|
194
|
+
function P(w) {
|
|
195
|
+
return k(w) === h;
|
|
196
|
+
}
|
|
197
|
+
function O(w) {
|
|
198
|
+
return k(w) === b;
|
|
199
|
+
}
|
|
200
|
+
function A(w) {
|
|
201
|
+
return k(w) === r;
|
|
202
|
+
}
|
|
203
|
+
function D(w) {
|
|
204
|
+
return k(w) === a;
|
|
205
|
+
}
|
|
206
|
+
function L(w) {
|
|
207
|
+
return k(w) === n;
|
|
208
|
+
}
|
|
209
|
+
function z(w) {
|
|
210
|
+
return k(w) === v;
|
|
211
|
+
}
|
|
212
|
+
M.AsyncMode = g, M.ConcurrentMode = U, M.ContextConsumer = Y, M.ContextProvider = V, M.Element = F, M.ForwardRef = H, M.Fragment = ee, M.Lazy = we, M.Memo = xe, M.Portal = ae, M.Profiler = Re, M.StrictMode = J, M.Suspense = te, M.isAsyncMode = Ce, M.isConcurrentMode = m, M.isContextConsumer = x, M.isContextProvider = $, M.isElement = _, M.isForwardRef = S, M.isFragment = I, M.isLazy = P, M.isMemo = O, M.isPortal = A, M.isProfiler = D, M.isStrictMode = L, M.isSuspense = z, M.isValidElementType = T, M.typeOf = k;
|
|
213
|
+
}()), M;
|
|
214
|
+
}
|
|
215
|
+
var Ge;
|
|
216
|
+
function ut() {
|
|
217
|
+
return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? de.exports = _t() : de.exports = Ot()), de.exports;
|
|
218
|
+
}
|
|
219
|
+
/*
|
|
220
|
+
object-assign
|
|
221
|
+
(c) Sindre Sorhus
|
|
222
|
+
@license MIT
|
|
223
|
+
*/
|
|
224
|
+
var Se, Xe;
|
|
225
|
+
function $t() {
|
|
226
|
+
if (Xe) return Se;
|
|
227
|
+
Xe = 1;
|
|
228
|
+
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
229
|
+
function i(a) {
|
|
230
|
+
if (a == null)
|
|
231
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
232
|
+
return Object(a);
|
|
233
|
+
}
|
|
234
|
+
function n() {
|
|
235
|
+
try {
|
|
236
|
+
if (!Object.assign)
|
|
237
|
+
return !1;
|
|
238
|
+
var a = new String("abc");
|
|
239
|
+
if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
|
|
240
|
+
return !1;
|
|
241
|
+
for (var o = {}, l = 0; l < 10; l++)
|
|
242
|
+
o["_" + String.fromCharCode(l)] = l;
|
|
243
|
+
var c = Object.getOwnPropertyNames(o).map(function(d) {
|
|
244
|
+
return o[d];
|
|
245
|
+
});
|
|
246
|
+
if (c.join("") !== "0123456789")
|
|
247
|
+
return !1;
|
|
248
|
+
var u = {};
|
|
249
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(d) {
|
|
250
|
+
u[d] = d;
|
|
251
|
+
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
252
|
+
} catch {
|
|
253
|
+
return !1;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return Se = n() ? Object.assign : function(a, o) {
|
|
257
|
+
for (var l, c = i(a), u, d = 1; d < arguments.length; d++) {
|
|
258
|
+
l = Object(arguments[d]);
|
|
259
|
+
for (var v in l)
|
|
260
|
+
t.call(l, v) && (c[v] = l[v]);
|
|
261
|
+
if (e) {
|
|
262
|
+
u = e(l);
|
|
263
|
+
for (var f = 0; f < u.length; f++)
|
|
264
|
+
r.call(l, u[f]) && (c[u[f]] = l[u[f]]);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return c;
|
|
268
|
+
}, Se;
|
|
269
|
+
}
|
|
270
|
+
var Pe, Ze;
|
|
271
|
+
function Me() {
|
|
272
|
+
if (Ze) return Pe;
|
|
273
|
+
Ze = 1;
|
|
274
|
+
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
275
|
+
return Pe = e, Pe;
|
|
276
|
+
}
|
|
277
|
+
var _e, Qe;
|
|
278
|
+
function ct() {
|
|
279
|
+
return Qe || (Qe = 1, _e = Function.call.bind(Object.prototype.hasOwnProperty)), _e;
|
|
280
|
+
}
|
|
281
|
+
var Oe, et;
|
|
282
|
+
function kt() {
|
|
283
|
+
if (et) return Oe;
|
|
284
|
+
et = 1;
|
|
285
|
+
var e = function() {
|
|
286
|
+
};
|
|
287
|
+
if (process.env.NODE_ENV !== "production") {
|
|
288
|
+
var t = /* @__PURE__ */ Me(), r = {}, i = /* @__PURE__ */ ct();
|
|
289
|
+
e = function(a) {
|
|
290
|
+
var o = "Warning: " + a;
|
|
291
|
+
typeof console < "u" && console.error(o);
|
|
292
|
+
try {
|
|
293
|
+
throw new Error(o);
|
|
294
|
+
} catch {
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
function n(a, o, l, c, u) {
|
|
299
|
+
if (process.env.NODE_ENV !== "production") {
|
|
300
|
+
for (var d in a)
|
|
301
|
+
if (i(a, d)) {
|
|
302
|
+
var v;
|
|
303
|
+
try {
|
|
304
|
+
if (typeof a[d] != "function") {
|
|
305
|
+
var f = Error(
|
|
306
|
+
(c || "React class") + ": " + l + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
307
|
+
);
|
|
308
|
+
throw f.name = "Invariant Violation", f;
|
|
309
|
+
}
|
|
310
|
+
v = a[d](o, d, c, l, null, t);
|
|
311
|
+
} catch (h) {
|
|
312
|
+
v = h;
|
|
313
|
+
}
|
|
314
|
+
if (v && !(v instanceof Error) && e(
|
|
315
|
+
(c || "React class") + ": type specification of " + l + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof v + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
316
|
+
), v instanceof Error && !(v.message in r)) {
|
|
317
|
+
r[v.message] = !0;
|
|
318
|
+
var b = u ? u() : "";
|
|
319
|
+
e(
|
|
320
|
+
"Failed " + l + " type: " + v.message + (b ?? "")
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return n.resetWarningCache = function() {
|
|
327
|
+
process.env.NODE_ENV !== "production" && (r = {});
|
|
328
|
+
}, Oe = n, Oe;
|
|
329
|
+
}
|
|
330
|
+
var $e, tt;
|
|
331
|
+
function Nt() {
|
|
332
|
+
if (tt) return $e;
|
|
333
|
+
tt = 1;
|
|
334
|
+
var e = ut(), t = $t(), r = /* @__PURE__ */ Me(), i = /* @__PURE__ */ ct(), n = /* @__PURE__ */ kt(), a = function() {
|
|
335
|
+
};
|
|
336
|
+
process.env.NODE_ENV !== "production" && (a = function(l) {
|
|
337
|
+
var c = "Warning: " + l;
|
|
338
|
+
typeof console < "u" && console.error(c);
|
|
339
|
+
try {
|
|
340
|
+
throw new Error(c);
|
|
341
|
+
} catch {
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
function o() {
|
|
345
|
+
return null;
|
|
346
|
+
}
|
|
347
|
+
return $e = function(l, c) {
|
|
348
|
+
var u = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
349
|
+
function v(m) {
|
|
350
|
+
var x = m && (u && m[u] || m[d]);
|
|
351
|
+
if (typeof x == "function")
|
|
352
|
+
return x;
|
|
353
|
+
}
|
|
354
|
+
var f = "<<anonymous>>", b = {
|
|
355
|
+
array: y("array"),
|
|
356
|
+
bigint: y("bigint"),
|
|
357
|
+
bool: y("boolean"),
|
|
358
|
+
func: y("function"),
|
|
359
|
+
number: y("number"),
|
|
360
|
+
object: y("object"),
|
|
361
|
+
string: y("string"),
|
|
362
|
+
symbol: y("symbol"),
|
|
363
|
+
any: N(),
|
|
364
|
+
arrayOf: T,
|
|
365
|
+
element: k(),
|
|
366
|
+
elementType: g(),
|
|
367
|
+
instanceOf: U,
|
|
368
|
+
node: H(),
|
|
369
|
+
objectOf: V,
|
|
370
|
+
oneOf: Y,
|
|
371
|
+
oneOfType: F,
|
|
372
|
+
shape: we,
|
|
373
|
+
exact: xe
|
|
374
|
+
};
|
|
375
|
+
function h(m, x) {
|
|
376
|
+
return m === x ? m !== 0 || 1 / m === 1 / x : m !== m && x !== x;
|
|
377
|
+
}
|
|
378
|
+
function E(m, x) {
|
|
379
|
+
this.message = m, this.data = x && typeof x == "object" ? x : {}, this.stack = "";
|
|
380
|
+
}
|
|
381
|
+
E.prototype = Error.prototype;
|
|
382
|
+
function C(m) {
|
|
383
|
+
if (process.env.NODE_ENV !== "production")
|
|
384
|
+
var x = {}, $ = 0;
|
|
385
|
+
function _(I, P, O, A, D, L, z) {
|
|
386
|
+
if (A = A || f, L = L || O, z !== r) {
|
|
387
|
+
if (c) {
|
|
388
|
+
var w = new Error(
|
|
389
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
390
|
+
);
|
|
391
|
+
throw w.name = "Invariant Violation", w;
|
|
392
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
393
|
+
var K = A + ":" + O;
|
|
394
|
+
!x[K] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
395
|
+
$ < 3 && (a(
|
|
396
|
+
"You are manually calling a React.PropTypes validation function for the `" + L + "` prop on `" + A + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
397
|
+
), x[K] = !0, $++);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return P[O] == null ? I ? P[O] === null ? new E("The " + D + " `" + L + "` is marked as required " + ("in `" + A + "`, but its value is `null`.")) : new E("The " + D + " `" + L + "` is marked as required in " + ("`" + A + "`, but its value is `undefined`.")) : null : m(P, O, A, D, L);
|
|
401
|
+
}
|
|
402
|
+
var S = _.bind(null, !1);
|
|
403
|
+
return S.isRequired = _.bind(null, !0), S;
|
|
404
|
+
}
|
|
405
|
+
function y(m) {
|
|
406
|
+
function x($, _, S, I, P, O) {
|
|
407
|
+
var A = $[_], D = J(A);
|
|
408
|
+
if (D !== m) {
|
|
409
|
+
var L = te(A);
|
|
410
|
+
return new E(
|
|
411
|
+
"Invalid " + I + " `" + P + "` of type " + ("`" + L + "` supplied to `" + S + "`, expected ") + ("`" + m + "`."),
|
|
412
|
+
{ expectedType: m }
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
return null;
|
|
416
|
+
}
|
|
417
|
+
return C(x);
|
|
418
|
+
}
|
|
419
|
+
function N() {
|
|
420
|
+
return C(o);
|
|
421
|
+
}
|
|
422
|
+
function T(m) {
|
|
423
|
+
function x($, _, S, I, P) {
|
|
424
|
+
if (typeof m != "function")
|
|
425
|
+
return new E("Property `" + P + "` of component `" + S + "` has invalid PropType notation inside arrayOf.");
|
|
426
|
+
var O = $[_];
|
|
427
|
+
if (!Array.isArray(O)) {
|
|
428
|
+
var A = J(O);
|
|
429
|
+
return new E("Invalid " + I + " `" + P + "` of type " + ("`" + A + "` supplied to `" + S + "`, expected an array."));
|
|
430
|
+
}
|
|
431
|
+
for (var D = 0; D < O.length; D++) {
|
|
432
|
+
var L = m(O, D, S, I, P + "[" + D + "]", r);
|
|
433
|
+
if (L instanceof Error)
|
|
434
|
+
return L;
|
|
435
|
+
}
|
|
436
|
+
return null;
|
|
437
|
+
}
|
|
438
|
+
return C(x);
|
|
439
|
+
}
|
|
440
|
+
function k() {
|
|
441
|
+
function m(x, $, _, S, I) {
|
|
442
|
+
var P = x[$];
|
|
443
|
+
if (!l(P)) {
|
|
444
|
+
var O = J(P);
|
|
445
|
+
return new E("Invalid " + S + " `" + I + "` of type " + ("`" + O + "` supplied to `" + _ + "`, expected a single ReactElement."));
|
|
446
|
+
}
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
return C(m);
|
|
450
|
+
}
|
|
451
|
+
function g() {
|
|
452
|
+
function m(x, $, _, S, I) {
|
|
453
|
+
var P = x[$];
|
|
454
|
+
if (!e.isValidElementType(P)) {
|
|
455
|
+
var O = J(P);
|
|
456
|
+
return new E("Invalid " + S + " `" + I + "` of type " + ("`" + O + "` supplied to `" + _ + "`, expected a single ReactElement type."));
|
|
457
|
+
}
|
|
458
|
+
return null;
|
|
459
|
+
}
|
|
460
|
+
return C(m);
|
|
461
|
+
}
|
|
462
|
+
function U(m) {
|
|
463
|
+
function x($, _, S, I, P) {
|
|
464
|
+
if (!($[_] instanceof m)) {
|
|
465
|
+
var O = m.name || f, A = Ce($[_]);
|
|
466
|
+
return new E("Invalid " + I + " `" + P + "` of type " + ("`" + A + "` supplied to `" + S + "`, expected ") + ("instance of `" + O + "`."));
|
|
467
|
+
}
|
|
468
|
+
return null;
|
|
469
|
+
}
|
|
470
|
+
return C(x);
|
|
471
|
+
}
|
|
472
|
+
function Y(m) {
|
|
473
|
+
if (!Array.isArray(m))
|
|
474
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
475
|
+
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
476
|
+
) : a("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
477
|
+
function x($, _, S, I, P) {
|
|
478
|
+
for (var O = $[_], A = 0; A < m.length; A++)
|
|
479
|
+
if (h(O, m[A]))
|
|
480
|
+
return null;
|
|
481
|
+
var D = JSON.stringify(m, function(z, w) {
|
|
482
|
+
var K = te(w);
|
|
483
|
+
return K === "symbol" ? String(w) : w;
|
|
484
|
+
});
|
|
485
|
+
return new E("Invalid " + I + " `" + P + "` of value `" + String(O) + "` " + ("supplied to `" + S + "`, expected one of " + D + "."));
|
|
486
|
+
}
|
|
487
|
+
return C(x);
|
|
488
|
+
}
|
|
489
|
+
function V(m) {
|
|
490
|
+
function x($, _, S, I, P) {
|
|
491
|
+
if (typeof m != "function")
|
|
492
|
+
return new E("Property `" + P + "` of component `" + S + "` has invalid PropType notation inside objectOf.");
|
|
493
|
+
var O = $[_], A = J(O);
|
|
494
|
+
if (A !== "object")
|
|
495
|
+
return new E("Invalid " + I + " `" + P + "` of type " + ("`" + A + "` supplied to `" + S + "`, expected an object."));
|
|
496
|
+
for (var D in O)
|
|
497
|
+
if (i(O, D)) {
|
|
498
|
+
var L = m(O, D, S, I, P + "." + D, r);
|
|
499
|
+
if (L instanceof Error)
|
|
500
|
+
return L;
|
|
501
|
+
}
|
|
502
|
+
return null;
|
|
503
|
+
}
|
|
504
|
+
return C(x);
|
|
505
|
+
}
|
|
506
|
+
function F(m) {
|
|
507
|
+
if (!Array.isArray(m))
|
|
508
|
+
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), o;
|
|
509
|
+
for (var x = 0; x < m.length; x++) {
|
|
510
|
+
var $ = m[x];
|
|
511
|
+
if (typeof $ != "function")
|
|
512
|
+
return a(
|
|
513
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ue($) + " at index " + x + "."
|
|
514
|
+
), o;
|
|
515
|
+
}
|
|
516
|
+
function _(S, I, P, O, A) {
|
|
517
|
+
for (var D = [], L = 0; L < m.length; L++) {
|
|
518
|
+
var z = m[L], w = z(S, I, P, O, A, r);
|
|
519
|
+
if (w == null)
|
|
520
|
+
return null;
|
|
521
|
+
w.data && i(w.data, "expectedType") && D.push(w.data.expectedType);
|
|
522
|
+
}
|
|
523
|
+
var K = D.length > 0 ? ", expected one of type [" + D.join(", ") + "]" : "";
|
|
524
|
+
return new E("Invalid " + O + " `" + A + "` supplied to " + ("`" + P + "`" + K + "."));
|
|
525
|
+
}
|
|
526
|
+
return C(_);
|
|
527
|
+
}
|
|
528
|
+
function H() {
|
|
529
|
+
function m(x, $, _, S, I) {
|
|
530
|
+
return ae(x[$]) ? null : new E("Invalid " + S + " `" + I + "` supplied to " + ("`" + _ + "`, expected a ReactNode."));
|
|
531
|
+
}
|
|
532
|
+
return C(m);
|
|
533
|
+
}
|
|
534
|
+
function ee(m, x, $, _, S) {
|
|
535
|
+
return new E(
|
|
536
|
+
(m || "React class") + ": " + x + " type `" + $ + "." + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + S + "`."
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
function we(m) {
|
|
540
|
+
function x($, _, S, I, P) {
|
|
541
|
+
var O = $[_], A = J(O);
|
|
542
|
+
if (A !== "object")
|
|
543
|
+
return new E("Invalid " + I + " `" + P + "` of type `" + A + "` " + ("supplied to `" + S + "`, expected `object`."));
|
|
544
|
+
for (var D in m) {
|
|
545
|
+
var L = m[D];
|
|
546
|
+
if (typeof L != "function")
|
|
547
|
+
return ee(S, I, P, D, te(L));
|
|
548
|
+
var z = L(O, D, S, I, P + "." + D, r);
|
|
549
|
+
if (z)
|
|
550
|
+
return z;
|
|
551
|
+
}
|
|
552
|
+
return null;
|
|
553
|
+
}
|
|
554
|
+
return C(x);
|
|
555
|
+
}
|
|
556
|
+
function xe(m) {
|
|
557
|
+
function x($, _, S, I, P) {
|
|
558
|
+
var O = $[_], A = J(O);
|
|
559
|
+
if (A !== "object")
|
|
560
|
+
return new E("Invalid " + I + " `" + P + "` of type `" + A + "` " + ("supplied to `" + S + "`, expected `object`."));
|
|
561
|
+
var D = t({}, $[_], m);
|
|
562
|
+
for (var L in D) {
|
|
563
|
+
var z = m[L];
|
|
564
|
+
if (i(m, L) && typeof z != "function")
|
|
565
|
+
return ee(S, I, P, L, te(z));
|
|
566
|
+
if (!z)
|
|
567
|
+
return new E(
|
|
568
|
+
"Invalid " + I + " `" + P + "` key `" + L + "` supplied to `" + S + "`.\nBad object: " + JSON.stringify($[_], null, " ") + `
|
|
569
|
+
Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
570
|
+
);
|
|
571
|
+
var w = z(O, L, S, I, P + "." + L, r);
|
|
572
|
+
if (w)
|
|
573
|
+
return w;
|
|
574
|
+
}
|
|
575
|
+
return null;
|
|
576
|
+
}
|
|
577
|
+
return C(x);
|
|
578
|
+
}
|
|
579
|
+
function ae(m) {
|
|
580
|
+
switch (typeof m) {
|
|
581
|
+
case "number":
|
|
582
|
+
case "string":
|
|
583
|
+
case "undefined":
|
|
584
|
+
return !0;
|
|
585
|
+
case "boolean":
|
|
586
|
+
return !m;
|
|
587
|
+
case "object":
|
|
588
|
+
if (Array.isArray(m))
|
|
589
|
+
return m.every(ae);
|
|
590
|
+
if (m === null || l(m))
|
|
591
|
+
return !0;
|
|
592
|
+
var x = v(m);
|
|
593
|
+
if (x) {
|
|
594
|
+
var $ = x.call(m), _;
|
|
595
|
+
if (x !== m.entries) {
|
|
596
|
+
for (; !(_ = $.next()).done; )
|
|
597
|
+
if (!ae(_.value))
|
|
598
|
+
return !1;
|
|
599
|
+
} else
|
|
600
|
+
for (; !(_ = $.next()).done; ) {
|
|
601
|
+
var S = _.value;
|
|
602
|
+
if (S && !ae(S[1]))
|
|
603
|
+
return !1;
|
|
604
|
+
}
|
|
605
|
+
} else
|
|
606
|
+
return !1;
|
|
607
|
+
return !0;
|
|
608
|
+
default:
|
|
609
|
+
return !1;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
function Re(m, x) {
|
|
613
|
+
return m === "symbol" ? !0 : x ? x["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && x instanceof Symbol : !1;
|
|
614
|
+
}
|
|
615
|
+
function J(m) {
|
|
616
|
+
var x = typeof m;
|
|
617
|
+
return Array.isArray(m) ? "array" : m instanceof RegExp ? "object" : Re(x, m) ? "symbol" : x;
|
|
618
|
+
}
|
|
619
|
+
function te(m) {
|
|
620
|
+
if (typeof m > "u" || m === null)
|
|
621
|
+
return "" + m;
|
|
622
|
+
var x = J(m);
|
|
623
|
+
if (x === "object") {
|
|
624
|
+
if (m instanceof Date)
|
|
625
|
+
return "date";
|
|
626
|
+
if (m instanceof RegExp)
|
|
627
|
+
return "regexp";
|
|
628
|
+
}
|
|
629
|
+
return x;
|
|
630
|
+
}
|
|
631
|
+
function ue(m) {
|
|
632
|
+
var x = te(m);
|
|
633
|
+
switch (x) {
|
|
634
|
+
case "array":
|
|
635
|
+
case "object":
|
|
636
|
+
return "an " + x;
|
|
637
|
+
case "boolean":
|
|
638
|
+
case "date":
|
|
639
|
+
case "regexp":
|
|
640
|
+
return "a " + x;
|
|
641
|
+
default:
|
|
642
|
+
return x;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
function Ce(m) {
|
|
646
|
+
return !m.constructor || !m.constructor.name ? f : m.constructor.name;
|
|
647
|
+
}
|
|
648
|
+
return b.checkPropTypes = n, b.resetWarningCache = n.resetWarningCache, b.PropTypes = b, b;
|
|
649
|
+
}, $e;
|
|
650
|
+
}
|
|
651
|
+
var ke, rt;
|
|
652
|
+
function It() {
|
|
653
|
+
if (rt) return ke;
|
|
654
|
+
rt = 1;
|
|
655
|
+
var e = /* @__PURE__ */ Me();
|
|
656
|
+
function t() {
|
|
657
|
+
}
|
|
658
|
+
function r() {
|
|
659
|
+
}
|
|
660
|
+
return r.resetWarningCache = t, ke = function() {
|
|
661
|
+
function i(o, l, c, u, d, v) {
|
|
662
|
+
if (v !== e) {
|
|
663
|
+
var f = new Error(
|
|
664
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
665
|
+
);
|
|
666
|
+
throw f.name = "Invariant Violation", f;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
i.isRequired = i;
|
|
670
|
+
function n() {
|
|
671
|
+
return i;
|
|
672
|
+
}
|
|
673
|
+
var a = {
|
|
674
|
+
array: i,
|
|
675
|
+
bigint: i,
|
|
676
|
+
bool: i,
|
|
677
|
+
func: i,
|
|
678
|
+
number: i,
|
|
679
|
+
object: i,
|
|
680
|
+
string: i,
|
|
681
|
+
symbol: i,
|
|
682
|
+
any: i,
|
|
683
|
+
arrayOf: n,
|
|
684
|
+
element: i,
|
|
685
|
+
elementType: i,
|
|
686
|
+
instanceOf: n,
|
|
687
|
+
node: i,
|
|
688
|
+
objectOf: n,
|
|
689
|
+
oneOf: n,
|
|
690
|
+
oneOfType: n,
|
|
691
|
+
shape: n,
|
|
692
|
+
exact: n,
|
|
693
|
+
checkPropTypes: r,
|
|
694
|
+
resetWarningCache: t
|
|
695
|
+
};
|
|
696
|
+
return a.PropTypes = a, a;
|
|
697
|
+
}, ke;
|
|
698
|
+
}
|
|
699
|
+
var nt;
|
|
700
|
+
function At() {
|
|
701
|
+
if (nt) return fe.exports;
|
|
702
|
+
if (nt = 1, process.env.NODE_ENV !== "production") {
|
|
703
|
+
var e = ut(), t = !0;
|
|
704
|
+
fe.exports = /* @__PURE__ */ Nt()(e.isElement, t);
|
|
705
|
+
} else
|
|
706
|
+
fe.exports = /* @__PURE__ */ It()();
|
|
707
|
+
return fe.exports;
|
|
708
|
+
}
|
|
709
|
+
var Lt = /* @__PURE__ */ At();
|
|
710
|
+
const s = /* @__PURE__ */ st(Lt), jt = ({ content: e, title: t, className: r, id: i = "accordion" }) => {
|
|
711
|
+
const n = B("rpf-accordion", r);
|
|
712
|
+
return /* @__PURE__ */ q("details", { className: n, id: `${i}`, children: [
|
|
713
|
+
/* @__PURE__ */ q("summary", { className: "rpf-accordion__title", role: "button", children: [
|
|
714
|
+
t,
|
|
715
|
+
/* @__PURE__ */ R("span", { className: "rpf-accordion__icon" })
|
|
716
|
+
] }),
|
|
717
|
+
/* @__PURE__ */ R("p", { className: "rpf-accordion__text", children: e })
|
|
718
|
+
] });
|
|
719
|
+
};
|
|
720
|
+
jt.propTypes = {
|
|
721
|
+
content: s.string.isRequired,
|
|
722
|
+
title: s.string.isRequired,
|
|
723
|
+
id: s.string,
|
|
724
|
+
className: s.string
|
|
725
|
+
};
|
|
726
|
+
var oe = {}, at;
|
|
727
|
+
function Mt() {
|
|
728
|
+
if (at) return oe;
|
|
729
|
+
at = 1, Object.defineProperty(oe, "__esModule", { value: !0 }), oe.parse = o, oe.serialize = u;
|
|
730
|
+
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, r = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, i = /^[\u0020-\u003A\u003D-\u007E]*$/, n = Object.prototype.toString, a = /* @__PURE__ */ (() => {
|
|
731
|
+
const f = function() {
|
|
732
|
+
};
|
|
733
|
+
return f.prototype = /* @__PURE__ */ Object.create(null), f;
|
|
734
|
+
})();
|
|
735
|
+
function o(f, b) {
|
|
736
|
+
const h = new a(), E = f.length;
|
|
737
|
+
if (E < 2)
|
|
738
|
+
return h;
|
|
739
|
+
const C = (b == null ? void 0 : b.decode) || d;
|
|
740
|
+
let y = 0;
|
|
741
|
+
do {
|
|
742
|
+
const N = f.indexOf("=", y);
|
|
743
|
+
if (N === -1)
|
|
744
|
+
break;
|
|
745
|
+
const T = f.indexOf(";", y), k = T === -1 ? E : T;
|
|
746
|
+
if (N > k) {
|
|
747
|
+
y = f.lastIndexOf(";", N - 1) + 1;
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
750
|
+
const g = l(f, y, N), U = c(f, N, g), Y = f.slice(g, U);
|
|
751
|
+
if (h[Y] === void 0) {
|
|
752
|
+
let V = l(f, N + 1, k), F = c(f, k, V);
|
|
753
|
+
const H = C(f.slice(V, F));
|
|
754
|
+
h[Y] = H;
|
|
755
|
+
}
|
|
756
|
+
y = k + 1;
|
|
757
|
+
} while (y < E);
|
|
758
|
+
return h;
|
|
759
|
+
}
|
|
760
|
+
function l(f, b, h) {
|
|
761
|
+
do {
|
|
762
|
+
const E = f.charCodeAt(b);
|
|
763
|
+
if (E !== 32 && E !== 9)
|
|
764
|
+
return b;
|
|
765
|
+
} while (++b < h);
|
|
766
|
+
return h;
|
|
767
|
+
}
|
|
768
|
+
function c(f, b, h) {
|
|
769
|
+
for (; b > h; ) {
|
|
770
|
+
const E = f.charCodeAt(--b);
|
|
771
|
+
if (E !== 32 && E !== 9)
|
|
772
|
+
return b + 1;
|
|
773
|
+
}
|
|
774
|
+
return h;
|
|
775
|
+
}
|
|
776
|
+
function u(f, b, h) {
|
|
777
|
+
const E = (h == null ? void 0 : h.encode) || encodeURIComponent;
|
|
778
|
+
if (!e.test(f))
|
|
779
|
+
throw new TypeError(`argument name is invalid: ${f}`);
|
|
780
|
+
const C = E(b);
|
|
781
|
+
if (!t.test(C))
|
|
782
|
+
throw new TypeError(`argument val is invalid: ${b}`);
|
|
783
|
+
let y = f + "=" + C;
|
|
784
|
+
if (!h)
|
|
785
|
+
return y;
|
|
786
|
+
if (h.maxAge !== void 0) {
|
|
787
|
+
if (!Number.isInteger(h.maxAge))
|
|
788
|
+
throw new TypeError(`option maxAge is invalid: ${h.maxAge}`);
|
|
789
|
+
y += "; Max-Age=" + h.maxAge;
|
|
790
|
+
}
|
|
791
|
+
if (h.domain) {
|
|
792
|
+
if (!r.test(h.domain))
|
|
793
|
+
throw new TypeError(`option domain is invalid: ${h.domain}`);
|
|
794
|
+
y += "; Domain=" + h.domain;
|
|
795
|
+
}
|
|
796
|
+
if (h.path) {
|
|
797
|
+
if (!i.test(h.path))
|
|
798
|
+
throw new TypeError(`option path is invalid: ${h.path}`);
|
|
799
|
+
y += "; Path=" + h.path;
|
|
800
|
+
}
|
|
801
|
+
if (h.expires) {
|
|
802
|
+
if (!v(h.expires) || !Number.isFinite(h.expires.valueOf()))
|
|
803
|
+
throw new TypeError(`option expires is invalid: ${h.expires}`);
|
|
804
|
+
y += "; Expires=" + h.expires.toUTCString();
|
|
805
|
+
}
|
|
806
|
+
if (h.httpOnly && (y += "; HttpOnly"), h.secure && (y += "; Secure"), h.partitioned && (y += "; Partitioned"), h.priority)
|
|
807
|
+
switch (typeof h.priority == "string" ? h.priority.toLowerCase() : void 0) {
|
|
808
|
+
case "low":
|
|
809
|
+
y += "; Priority=Low";
|
|
810
|
+
break;
|
|
811
|
+
case "medium":
|
|
812
|
+
y += "; Priority=Medium";
|
|
813
|
+
break;
|
|
814
|
+
case "high":
|
|
815
|
+
y += "; Priority=High";
|
|
816
|
+
break;
|
|
817
|
+
default:
|
|
818
|
+
throw new TypeError(`option priority is invalid: ${h.priority}`);
|
|
819
|
+
}
|
|
820
|
+
if (h.sameSite)
|
|
821
|
+
switch (typeof h.sameSite == "string" ? h.sameSite.toLowerCase() : h.sameSite) {
|
|
822
|
+
case !0:
|
|
823
|
+
case "strict":
|
|
824
|
+
y += "; SameSite=Strict";
|
|
825
|
+
break;
|
|
826
|
+
case "lax":
|
|
827
|
+
y += "; SameSite=Lax";
|
|
828
|
+
break;
|
|
829
|
+
case "none":
|
|
830
|
+
y += "; SameSite=None";
|
|
831
|
+
break;
|
|
832
|
+
default:
|
|
833
|
+
throw new TypeError(`option sameSite is invalid: ${h.sameSite}`);
|
|
834
|
+
}
|
|
835
|
+
return y;
|
|
836
|
+
}
|
|
837
|
+
function d(f) {
|
|
838
|
+
if (f.indexOf("%") === -1)
|
|
839
|
+
return f;
|
|
840
|
+
try {
|
|
841
|
+
return decodeURIComponent(f);
|
|
842
|
+
} catch {
|
|
843
|
+
return f;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
function v(f) {
|
|
847
|
+
return n.call(f) === "[object Date]";
|
|
848
|
+
}
|
|
849
|
+
return oe;
|
|
850
|
+
}
|
|
851
|
+
Mt();
|
|
852
|
+
/**
|
|
853
|
+
* react-router v7.1.1
|
|
854
|
+
*
|
|
855
|
+
* Copyright (c) Remix Software Inc.
|
|
856
|
+
*
|
|
857
|
+
* This source code is licensed under the MIT license found in the
|
|
858
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
859
|
+
*
|
|
860
|
+
* @license MIT
|
|
861
|
+
*/
|
|
862
|
+
function W(e, t) {
|
|
863
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
864
|
+
throw new Error(t);
|
|
865
|
+
}
|
|
866
|
+
function X(e, t) {
|
|
867
|
+
if (!e) {
|
|
868
|
+
typeof console < "u" && console.warn(t);
|
|
869
|
+
try {
|
|
870
|
+
throw new Error(t);
|
|
871
|
+
} catch {
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
function Ae({
|
|
876
|
+
pathname: e = "/",
|
|
877
|
+
search: t = "",
|
|
878
|
+
hash: r = ""
|
|
879
|
+
}) {
|
|
880
|
+
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
|
|
881
|
+
}
|
|
882
|
+
function De(e) {
|
|
883
|
+
let t = {};
|
|
884
|
+
if (e) {
|
|
885
|
+
let r = e.indexOf("#");
|
|
886
|
+
r >= 0 && (t.hash = e.substring(r), e = e.substring(0, r));
|
|
887
|
+
let i = e.indexOf("?");
|
|
888
|
+
i >= 0 && (t.search = e.substring(i), e = e.substring(0, i)), e && (t.pathname = e);
|
|
889
|
+
}
|
|
890
|
+
return t;
|
|
891
|
+
}
|
|
892
|
+
function ft(e, t, r = "/") {
|
|
893
|
+
return Dt(e, t, r, !1);
|
|
894
|
+
}
|
|
895
|
+
function Dt(e, t, r, i) {
|
|
896
|
+
let n = typeof t == "string" ? De(t) : t, a = re(n.pathname || "/", r);
|
|
897
|
+
if (a == null)
|
|
898
|
+
return null;
|
|
899
|
+
let o = dt(e);
|
|
900
|
+
qt(o);
|
|
901
|
+
let l = null;
|
|
902
|
+
for (let c = 0; l == null && c < o.length; ++c) {
|
|
903
|
+
let u = Gt(a);
|
|
904
|
+
l = Jt(
|
|
905
|
+
o[c],
|
|
906
|
+
u,
|
|
907
|
+
i
|
|
908
|
+
);
|
|
909
|
+
}
|
|
910
|
+
return l;
|
|
911
|
+
}
|
|
912
|
+
function dt(e, t = [], r = [], i = "") {
|
|
913
|
+
let n = (a, o, l) => {
|
|
914
|
+
let c = {
|
|
915
|
+
relativePath: l === void 0 ? a.path || "" : l,
|
|
916
|
+
caseSensitive: a.caseSensitive === !0,
|
|
917
|
+
childrenIndex: o,
|
|
918
|
+
route: a
|
|
919
|
+
};
|
|
920
|
+
c.relativePath.startsWith("/") && (W(
|
|
921
|
+
c.relativePath.startsWith(i),
|
|
922
|
+
`Absolute route path "${c.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
923
|
+
), c.relativePath = c.relativePath.slice(i.length));
|
|
924
|
+
let u = G([i, c.relativePath]), d = r.concat(c);
|
|
925
|
+
a.children && a.children.length > 0 && (W(
|
|
926
|
+
// Our types know better, but runtime JS may not!
|
|
927
|
+
// @ts-expect-error
|
|
928
|
+
a.index !== !0,
|
|
929
|
+
`Index routes must not have child routes. Please remove all child routes from route path "${u}".`
|
|
930
|
+
), dt(a.children, t, d, u)), !(a.path == null && !a.index) && t.push({
|
|
931
|
+
path: u,
|
|
932
|
+
score: Ht(u, a.index),
|
|
933
|
+
routesMeta: d
|
|
934
|
+
});
|
|
935
|
+
};
|
|
936
|
+
return e.forEach((a, o) => {
|
|
937
|
+
var l;
|
|
938
|
+
if (a.path === "" || !((l = a.path) != null && l.includes("?")))
|
|
939
|
+
n(a, o);
|
|
940
|
+
else
|
|
941
|
+
for (let c of pt(a.path))
|
|
942
|
+
n(a, o, c);
|
|
943
|
+
}), t;
|
|
944
|
+
}
|
|
945
|
+
function pt(e) {
|
|
946
|
+
let t = e.split("/");
|
|
947
|
+
if (t.length === 0) return [];
|
|
948
|
+
let [r, ...i] = t, n = r.endsWith("?"), a = r.replace(/\?$/, "");
|
|
949
|
+
if (i.length === 0)
|
|
950
|
+
return n ? [a, ""] : [a];
|
|
951
|
+
let o = pt(i.join("/")), l = [];
|
|
952
|
+
return l.push(
|
|
953
|
+
...o.map(
|
|
954
|
+
(c) => c === "" ? a : [a, c].join("/")
|
|
955
|
+
)
|
|
956
|
+
), n && l.push(...o), l.map(
|
|
957
|
+
(c) => e.startsWith("/") && c === "" ? "/" : c
|
|
958
|
+
);
|
|
959
|
+
}
|
|
960
|
+
function qt(e) {
|
|
961
|
+
e.sort(
|
|
962
|
+
(t, r) => t.score !== r.score ? r.score - t.score : Vt(
|
|
963
|
+
t.routesMeta.map((i) => i.childrenIndex),
|
|
964
|
+
r.routesMeta.map((i) => i.childrenIndex)
|
|
965
|
+
)
|
|
966
|
+
);
|
|
967
|
+
}
|
|
968
|
+
var Ft = /^:[\w-]+$/, Wt = 3, Bt = 2, Ut = 1, zt = 10, Yt = -2, it = (e) => e === "*";
|
|
969
|
+
function Ht(e, t) {
|
|
970
|
+
let r = e.split("/"), i = r.length;
|
|
971
|
+
return r.some(it) && (i += Yt), t && (i += Bt), r.filter((n) => !it(n)).reduce(
|
|
972
|
+
(n, a) => n + (Ft.test(a) ? Wt : a === "" ? Ut : zt),
|
|
973
|
+
i
|
|
974
|
+
);
|
|
975
|
+
}
|
|
976
|
+
function Vt(e, t) {
|
|
977
|
+
return e.length === t.length && e.slice(0, -1).every((i, n) => i === t[n]) ? (
|
|
978
|
+
// If two routes are siblings, we should try to match the earlier sibling
|
|
979
|
+
// first. This allows people to have fine-grained control over the matching
|
|
980
|
+
// behavior by simply putting routes with identical paths in the order they
|
|
981
|
+
// want them tried.
|
|
982
|
+
e[e.length - 1] - t[t.length - 1]
|
|
983
|
+
) : (
|
|
984
|
+
// Otherwise, it doesn't really make sense to rank non-siblings by index,
|
|
985
|
+
// so they sort equally.
|
|
986
|
+
0
|
|
987
|
+
);
|
|
988
|
+
}
|
|
989
|
+
function Jt(e, t, r = !1) {
|
|
990
|
+
let { routesMeta: i } = e, n = {}, a = "/", o = [];
|
|
991
|
+
for (let l = 0; l < i.length; ++l) {
|
|
992
|
+
let c = i[l], u = l === i.length - 1, d = a === "/" ? t : t.slice(a.length) || "/", v = ye(
|
|
993
|
+
{ path: c.relativePath, caseSensitive: c.caseSensitive, end: u },
|
|
994
|
+
d
|
|
995
|
+
), f = c.route;
|
|
996
|
+
if (!v && u && r && !i[i.length - 1].route.index && (v = ye(
|
|
997
|
+
{
|
|
998
|
+
path: c.relativePath,
|
|
999
|
+
caseSensitive: c.caseSensitive,
|
|
1000
|
+
end: !1
|
|
1001
|
+
},
|
|
1002
|
+
d
|
|
1003
|
+
)), !v)
|
|
1004
|
+
return null;
|
|
1005
|
+
Object.assign(n, v.params), o.push({
|
|
1006
|
+
// TODO: Can this as be avoided?
|
|
1007
|
+
params: n,
|
|
1008
|
+
pathname: G([a, v.pathname]),
|
|
1009
|
+
pathnameBase: er(
|
|
1010
|
+
G([a, v.pathnameBase])
|
|
1011
|
+
),
|
|
1012
|
+
route: f
|
|
1013
|
+
}), v.pathnameBase !== "/" && (a = G([a, v.pathnameBase]));
|
|
1014
|
+
}
|
|
1015
|
+
return o;
|
|
1016
|
+
}
|
|
1017
|
+
function ye(e, t) {
|
|
1018
|
+
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
1019
|
+
let [r, i] = Kt(
|
|
1020
|
+
e.path,
|
|
1021
|
+
e.caseSensitive,
|
|
1022
|
+
e.end
|
|
1023
|
+
), n = t.match(r);
|
|
1024
|
+
if (!n) return null;
|
|
1025
|
+
let a = n[0], o = a.replace(/(.)\/+$/, "$1"), l = n.slice(1);
|
|
1026
|
+
return {
|
|
1027
|
+
params: i.reduce(
|
|
1028
|
+
(u, { paramName: d, isOptional: v }, f) => {
|
|
1029
|
+
if (d === "*") {
|
|
1030
|
+
let h = l[f] || "";
|
|
1031
|
+
o = a.slice(0, a.length - h.length).replace(/(.)\/+$/, "$1");
|
|
1032
|
+
}
|
|
1033
|
+
const b = l[f];
|
|
1034
|
+
return v && !b ? u[d] = void 0 : u[d] = (b || "").replace(/%2F/g, "/"), u;
|
|
1035
|
+
},
|
|
1036
|
+
{}
|
|
1037
|
+
),
|
|
1038
|
+
pathname: a,
|
|
1039
|
+
pathnameBase: o,
|
|
1040
|
+
pattern: e
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
function Kt(e, t = !1, r = !0) {
|
|
1044
|
+
X(
|
|
1045
|
+
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
1046
|
+
`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(/\*$/, "/*")}".`
|
|
1047
|
+
);
|
|
1048
|
+
let i = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
1049
|
+
/\/:([\w-]+)(\?)?/g,
|
|
1050
|
+
(o, l, c) => (i.push({ paramName: l, isOptional: c != null }), c ? "/?([^\\/]+)?" : "/([^\\/]+)")
|
|
1051
|
+
);
|
|
1052
|
+
return e.endsWith("*") ? (i.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), i];
|
|
1053
|
+
}
|
|
1054
|
+
function Gt(e) {
|
|
1055
|
+
try {
|
|
1056
|
+
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
1057
|
+
} catch (t) {
|
|
1058
|
+
return X(
|
|
1059
|
+
!1,
|
|
1060
|
+
`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
|
|
1061
|
+
), e;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
function re(e, t) {
|
|
1065
|
+
if (t === "/") return e;
|
|
1066
|
+
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
1067
|
+
return null;
|
|
1068
|
+
let r = t.endsWith("/") ? t.length - 1 : t.length, i = e.charAt(r);
|
|
1069
|
+
return i && i !== "/" ? null : e.slice(r) || "/";
|
|
1070
|
+
}
|
|
1071
|
+
function Xt(e, t = "/") {
|
|
1072
|
+
let {
|
|
1073
|
+
pathname: r,
|
|
1074
|
+
search: i = "",
|
|
1075
|
+
hash: n = ""
|
|
1076
|
+
} = typeof e == "string" ? De(e) : e;
|
|
1077
|
+
return {
|
|
1078
|
+
pathname: r ? r.startsWith("/") ? r : Zt(r, t) : t,
|
|
1079
|
+
search: tr(i),
|
|
1080
|
+
hash: rr(n)
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1083
|
+
function Zt(e, t) {
|
|
1084
|
+
let r = t.replace(/\/+$/, "").split("/");
|
|
1085
|
+
return e.split("/").forEach((n) => {
|
|
1086
|
+
n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
|
|
1087
|
+
}), r.length > 1 ? r.join("/") : "/";
|
|
1088
|
+
}
|
|
1089
|
+
function Ne(e, t, r, i) {
|
|
1090
|
+
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
|
|
1091
|
+
i
|
|
1092
|
+
)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
1093
|
+
}
|
|
1094
|
+
function Qt(e) {
|
|
1095
|
+
return e.filter(
|
|
1096
|
+
(t, r) => r === 0 || t.route.path && t.route.path.length > 0
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
function ht(e) {
|
|
1100
|
+
let t = Qt(e);
|
|
1101
|
+
return t.map(
|
|
1102
|
+
(r, i) => i === t.length - 1 ? r.pathname : r.pathnameBase
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
function mt(e, t, r, i = !1) {
|
|
1106
|
+
let n;
|
|
1107
|
+
typeof e == "string" ? n = De(e) : (n = { ...e }, W(
|
|
1108
|
+
!n.pathname || !n.pathname.includes("?"),
|
|
1109
|
+
Ne("?", "pathname", "search", n)
|
|
1110
|
+
), W(
|
|
1111
|
+
!n.pathname || !n.pathname.includes("#"),
|
|
1112
|
+
Ne("#", "pathname", "hash", n)
|
|
1113
|
+
), W(
|
|
1114
|
+
!n.search || !n.search.includes("#"),
|
|
1115
|
+
Ne("#", "search", "hash", n)
|
|
1116
|
+
));
|
|
1117
|
+
let a = e === "" || n.pathname === "", o = a ? "/" : n.pathname, l;
|
|
1118
|
+
if (o == null)
|
|
1119
|
+
l = r;
|
|
1120
|
+
else {
|
|
1121
|
+
let v = t.length - 1;
|
|
1122
|
+
if (!i && o.startsWith("..")) {
|
|
1123
|
+
let f = o.split("/");
|
|
1124
|
+
for (; f[0] === ".."; )
|
|
1125
|
+
f.shift(), v -= 1;
|
|
1126
|
+
n.pathname = f.join("/");
|
|
1127
|
+
}
|
|
1128
|
+
l = v >= 0 ? t[v] : "/";
|
|
1129
|
+
}
|
|
1130
|
+
let c = Xt(n, l), u = o && o !== "/" && o.endsWith("/"), d = (a || o === ".") && r.endsWith("/");
|
|
1131
|
+
return !c.pathname.endsWith("/") && (u || d) && (c.pathname += "/"), c;
|
|
1132
|
+
}
|
|
1133
|
+
var G = (e) => e.join("/").replace(/\/\/+/g, "/"), er = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), tr = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, rr = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
|
|
1134
|
+
function nr(e) {
|
|
1135
|
+
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
1136
|
+
}
|
|
1137
|
+
var yt = [
|
|
1138
|
+
"POST",
|
|
1139
|
+
"PUT",
|
|
1140
|
+
"PATCH",
|
|
1141
|
+
"DELETE"
|
|
1142
|
+
];
|
|
1143
|
+
new Set(
|
|
1144
|
+
yt
|
|
1145
|
+
);
|
|
1146
|
+
var ar = [
|
|
1147
|
+
"GET",
|
|
1148
|
+
...yt
|
|
1149
|
+
];
|
|
1150
|
+
new Set(ar);
|
|
1151
|
+
var ie = p.createContext(null);
|
|
1152
|
+
ie.displayName = "DataRouter";
|
|
1153
|
+
var ve = p.createContext(null);
|
|
1154
|
+
ve.displayName = "DataRouterState";
|
|
1155
|
+
var vt = p.createContext({
|
|
1156
|
+
isTransitioning: !1
|
|
1157
|
+
});
|
|
1158
|
+
vt.displayName = "ViewTransition";
|
|
1159
|
+
var ir = p.createContext(
|
|
1160
|
+
/* @__PURE__ */ new Map()
|
|
1161
|
+
);
|
|
1162
|
+
ir.displayName = "Fetchers";
|
|
1163
|
+
var or = p.createContext(null);
|
|
1164
|
+
or.displayName = "Await";
|
|
1165
|
+
var Z = p.createContext(
|
|
1166
|
+
null
|
|
1167
|
+
);
|
|
1168
|
+
Z.displayName = "Navigation";
|
|
1169
|
+
var qe = p.createContext(
|
|
1170
|
+
null
|
|
1171
|
+
);
|
|
1172
|
+
qe.displayName = "Location";
|
|
1173
|
+
var Q = p.createContext({
|
|
1174
|
+
outlet: null,
|
|
1175
|
+
matches: [],
|
|
1176
|
+
isDataRoute: !1
|
|
1177
|
+
});
|
|
1178
|
+
Q.displayName = "Route";
|
|
1179
|
+
var Fe = p.createContext(null);
|
|
1180
|
+
Fe.displayName = "RouteError";
|
|
1181
|
+
function lr(e, { relative: t } = {}) {
|
|
1182
|
+
W(
|
|
1183
|
+
ge(),
|
|
1184
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
1185
|
+
// router loaded. We can help them understand how to avoid that.
|
|
1186
|
+
"useHref() may be used only in the context of a <Router> component."
|
|
1187
|
+
);
|
|
1188
|
+
let { basename: r, navigator: i } = p.useContext(Z), { hash: n, pathname: a, search: o } = se(e, { relative: t }), l = a;
|
|
1189
|
+
return r !== "/" && (l = a === "/" ? r : G([r, a])), i.createHref({ pathname: l, search: o, hash: n });
|
|
1190
|
+
}
|
|
1191
|
+
function ge() {
|
|
1192
|
+
return p.useContext(qe) != null;
|
|
1193
|
+
}
|
|
1194
|
+
function ne() {
|
|
1195
|
+
return W(
|
|
1196
|
+
ge(),
|
|
1197
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
1198
|
+
// router loaded. We can help them understand how to avoid that.
|
|
1199
|
+
"useLocation() may be used only in the context of a <Router> component."
|
|
1200
|
+
), p.useContext(qe).location;
|
|
1201
|
+
}
|
|
1202
|
+
var gt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
1203
|
+
function bt(e) {
|
|
1204
|
+
p.useContext(Z).static || p.useLayoutEffect(e);
|
|
1205
|
+
}
|
|
1206
|
+
function sr() {
|
|
1207
|
+
let { isDataRoute: e } = p.useContext(Q);
|
|
1208
|
+
return e ? wr() : ur();
|
|
1209
|
+
}
|
|
1210
|
+
function ur() {
|
|
1211
|
+
W(
|
|
1212
|
+
ge(),
|
|
1213
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
1214
|
+
// router loaded. We can help them understand how to avoid that.
|
|
1215
|
+
"useNavigate() may be used only in the context of a <Router> component."
|
|
1216
|
+
);
|
|
1217
|
+
let e = p.useContext(ie), { basename: t, navigator: r } = p.useContext(Z), { matches: i } = p.useContext(Q), { pathname: n } = ne(), a = JSON.stringify(ht(i)), o = p.useRef(!1);
|
|
1218
|
+
return bt(() => {
|
|
1219
|
+
o.current = !0;
|
|
1220
|
+
}), p.useCallback(
|
|
1221
|
+
(c, u = {}) => {
|
|
1222
|
+
if (X(o.current, gt), !o.current) return;
|
|
1223
|
+
if (typeof c == "number") {
|
|
1224
|
+
r.go(c);
|
|
1225
|
+
return;
|
|
1226
|
+
}
|
|
1227
|
+
let d = mt(
|
|
1228
|
+
c,
|
|
1229
|
+
JSON.parse(a),
|
|
1230
|
+
n,
|
|
1231
|
+
u.relative === "path"
|
|
1232
|
+
);
|
|
1233
|
+
e == null && t !== "/" && (d.pathname = d.pathname === "/" ? t : G([t, d.pathname])), (u.replace ? r.replace : r.push)(
|
|
1234
|
+
d,
|
|
1235
|
+
u.state,
|
|
1236
|
+
u
|
|
1237
|
+
);
|
|
1238
|
+
},
|
|
1239
|
+
[
|
|
1240
|
+
t,
|
|
1241
|
+
r,
|
|
1242
|
+
a,
|
|
1243
|
+
n,
|
|
1244
|
+
e
|
|
1245
|
+
]
|
|
1246
|
+
);
|
|
1247
|
+
}
|
|
1248
|
+
p.createContext(null);
|
|
1249
|
+
function se(e, { relative: t } = {}) {
|
|
1250
|
+
let { matches: r } = p.useContext(Q), { pathname: i } = ne(), n = JSON.stringify(ht(r));
|
|
1251
|
+
return p.useMemo(
|
|
1252
|
+
() => mt(
|
|
1253
|
+
e,
|
|
1254
|
+
JSON.parse(n),
|
|
1255
|
+
i,
|
|
1256
|
+
t === "path"
|
|
1257
|
+
),
|
|
1258
|
+
[e, n, i, t]
|
|
1259
|
+
);
|
|
1260
|
+
}
|
|
1261
|
+
function cr(e, t, r, i) {
|
|
1262
|
+
W(
|
|
1263
|
+
ge(),
|
|
1264
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
1265
|
+
// router loaded. We can help them understand how to avoid that.
|
|
1266
|
+
"useRoutes() may be used only in the context of a <Router> component."
|
|
1267
|
+
);
|
|
1268
|
+
let { navigator: n } = p.useContext(Z), { matches: a } = p.useContext(Q), o = a[a.length - 1], l = o ? o.params : {}, c = o ? o.pathname : "/", u = o ? o.pathnameBase : "/", d = o && o.route;
|
|
1269
|
+
{
|
|
1270
|
+
let y = d && d.path || "";
|
|
1271
|
+
Et(
|
|
1272
|
+
c,
|
|
1273
|
+
!d || y.endsWith("*") || y.endsWith("*?"),
|
|
1274
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${y}">) 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.
|
|
1275
|
+
|
|
1276
|
+
Please change the parent <Route path="${y}"> to <Route path="${y === "/" ? "*" : `${y}/*`}">.`
|
|
1277
|
+
);
|
|
1278
|
+
}
|
|
1279
|
+
let v = ne(), f;
|
|
1280
|
+
f = v;
|
|
1281
|
+
let b = f.pathname || "/", h = b;
|
|
1282
|
+
if (u !== "/") {
|
|
1283
|
+
let y = u.replace(/^\//, "").split("/");
|
|
1284
|
+
h = "/" + b.replace(/^\//, "").split("/").slice(y.length).join("/");
|
|
1285
|
+
}
|
|
1286
|
+
let E = ft(e, { pathname: h });
|
|
1287
|
+
return X(
|
|
1288
|
+
d || E != null,
|
|
1289
|
+
`No routes matched location "${f.pathname}${f.search}${f.hash}" `
|
|
1290
|
+
), X(
|
|
1291
|
+
E == null || E[E.length - 1].route.element !== void 0 || E[E.length - 1].route.Component !== void 0 || E[E.length - 1].route.lazy !== void 0,
|
|
1292
|
+
`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
|
|
1293
|
+
), mr(
|
|
1294
|
+
E && E.map(
|
|
1295
|
+
(y) => Object.assign({}, y, {
|
|
1296
|
+
params: Object.assign({}, l, y.params),
|
|
1297
|
+
pathname: G([
|
|
1298
|
+
u,
|
|
1299
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
1300
|
+
n.encodeLocation ? n.encodeLocation(y.pathname).pathname : y.pathname
|
|
1301
|
+
]),
|
|
1302
|
+
pathnameBase: y.pathnameBase === "/" ? u : G([
|
|
1303
|
+
u,
|
|
1304
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
1305
|
+
n.encodeLocation ? n.encodeLocation(y.pathnameBase).pathname : y.pathnameBase
|
|
1306
|
+
])
|
|
1307
|
+
})
|
|
1308
|
+
),
|
|
1309
|
+
a,
|
|
1310
|
+
r,
|
|
1311
|
+
i
|
|
1312
|
+
);
|
|
1313
|
+
}
|
|
1314
|
+
function fr() {
|
|
1315
|
+
let e = Er(), t = nr(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, i = "rgba(200,200,200, 0.5)", n = { padding: "0.5rem", backgroundColor: i }, a = { padding: "2px 4px", backgroundColor: i }, o = null;
|
|
1316
|
+
return console.error(
|
|
1317
|
+
"Error handled by React Router default ErrorBoundary:",
|
|
1318
|
+
e
|
|
1319
|
+
), o = /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ p.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ p.createElement("code", { style: a }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ p.createElement("code", { style: a }, "errorElement"), " prop on your route.")), /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ p.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ p.createElement("pre", { style: n }, r) : null, o);
|
|
1320
|
+
}
|
|
1321
|
+
var dr = /* @__PURE__ */ p.createElement(fr, null), pr = class extends p.Component {
|
|
1322
|
+
constructor(e) {
|
|
1323
|
+
super(e), this.state = {
|
|
1324
|
+
location: e.location,
|
|
1325
|
+
revalidation: e.revalidation,
|
|
1326
|
+
error: e.error
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
static getDerivedStateFromError(e) {
|
|
1330
|
+
return { error: e };
|
|
1331
|
+
}
|
|
1332
|
+
static getDerivedStateFromProps(e, t) {
|
|
1333
|
+
return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
1334
|
+
error: e.error,
|
|
1335
|
+
location: e.location,
|
|
1336
|
+
revalidation: e.revalidation
|
|
1337
|
+
} : {
|
|
1338
|
+
error: e.error !== void 0 ? e.error : t.error,
|
|
1339
|
+
location: t.location,
|
|
1340
|
+
revalidation: e.revalidation || t.revalidation
|
|
1341
|
+
};
|
|
1342
|
+
}
|
|
1343
|
+
componentDidCatch(e, t) {
|
|
1344
|
+
console.error(
|
|
1345
|
+
"React Router caught the following error during render",
|
|
1346
|
+
e,
|
|
1347
|
+
t
|
|
1348
|
+
);
|
|
1349
|
+
}
|
|
1350
|
+
render() {
|
|
1351
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ p.createElement(Q.Provider, { value: this.props.routeContext }, /* @__PURE__ */ p.createElement(
|
|
1352
|
+
Fe.Provider,
|
|
1353
|
+
{
|
|
1354
|
+
value: this.state.error,
|
|
1355
|
+
children: this.props.component
|
|
1356
|
+
}
|
|
1357
|
+
)) : this.props.children;
|
|
1358
|
+
}
|
|
1359
|
+
};
|
|
1360
|
+
function hr({ routeContext: e, match: t, children: r }) {
|
|
1361
|
+
let i = p.useContext(ie);
|
|
1362
|
+
return i && i.static && i.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ p.createElement(Q.Provider, { value: e }, r);
|
|
1363
|
+
}
|
|
1364
|
+
function mr(e, t = [], r = null, i = null) {
|
|
1365
|
+
if (e == null) {
|
|
1366
|
+
if (!r)
|
|
1367
|
+
return null;
|
|
1368
|
+
if (r.errors)
|
|
1369
|
+
e = r.matches;
|
|
1370
|
+
else if (t.length === 0 && !r.initialized && r.matches.length > 0)
|
|
1371
|
+
e = r.matches;
|
|
1372
|
+
else
|
|
1373
|
+
return null;
|
|
1374
|
+
}
|
|
1375
|
+
let n = e, a = r == null ? void 0 : r.errors;
|
|
1376
|
+
if (a != null) {
|
|
1377
|
+
let c = n.findIndex(
|
|
1378
|
+
(u) => u.route.id && (a == null ? void 0 : a[u.route.id]) !== void 0
|
|
1379
|
+
);
|
|
1380
|
+
W(
|
|
1381
|
+
c >= 0,
|
|
1382
|
+
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
1383
|
+
a
|
|
1384
|
+
).join(",")}`
|
|
1385
|
+
), n = n.slice(
|
|
1386
|
+
0,
|
|
1387
|
+
Math.min(n.length, c + 1)
|
|
1388
|
+
);
|
|
1389
|
+
}
|
|
1390
|
+
let o = !1, l = -1;
|
|
1391
|
+
if (r)
|
|
1392
|
+
for (let c = 0; c < n.length; c++) {
|
|
1393
|
+
let u = n[c];
|
|
1394
|
+
if ((u.route.HydrateFallback || u.route.hydrateFallbackElement) && (l = c), u.route.id) {
|
|
1395
|
+
let { loaderData: d, errors: v } = r, f = u.route.loader && !d.hasOwnProperty(u.route.id) && (!v || v[u.route.id] === void 0);
|
|
1396
|
+
if (u.route.lazy || f) {
|
|
1397
|
+
o = !0, l >= 0 ? n = n.slice(0, l + 1) : n = [n[0]];
|
|
1398
|
+
break;
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
return n.reduceRight((c, u, d) => {
|
|
1403
|
+
let v, f = !1, b = null, h = null;
|
|
1404
|
+
r && (v = a && u.route.id ? a[u.route.id] : void 0, b = u.route.errorElement || dr, o && (l < 0 && d === 0 ? (Et(
|
|
1405
|
+
"route-fallback",
|
|
1406
|
+
!1,
|
|
1407
|
+
"No `HydrateFallback` element provided to render during initial hydration"
|
|
1408
|
+
), f = !0, h = null) : l === d && (f = !0, h = u.route.hydrateFallbackElement || null)));
|
|
1409
|
+
let E = t.concat(n.slice(0, d + 1)), C = () => {
|
|
1410
|
+
let y;
|
|
1411
|
+
return v ? y = b : f ? y = h : u.route.Component ? y = /* @__PURE__ */ p.createElement(u.route.Component, null) : u.route.element ? y = u.route.element : y = c, /* @__PURE__ */ p.createElement(
|
|
1412
|
+
hr,
|
|
1413
|
+
{
|
|
1414
|
+
match: u,
|
|
1415
|
+
routeContext: {
|
|
1416
|
+
outlet: c,
|
|
1417
|
+
matches: E,
|
|
1418
|
+
isDataRoute: r != null
|
|
1419
|
+
},
|
|
1420
|
+
children: y
|
|
1421
|
+
}
|
|
1422
|
+
);
|
|
1423
|
+
};
|
|
1424
|
+
return r && (u.route.ErrorBoundary || u.route.errorElement || d === 0) ? /* @__PURE__ */ p.createElement(
|
|
1425
|
+
pr,
|
|
1426
|
+
{
|
|
1427
|
+
location: r.location,
|
|
1428
|
+
revalidation: r.revalidation,
|
|
1429
|
+
component: b,
|
|
1430
|
+
error: v,
|
|
1431
|
+
children: C(),
|
|
1432
|
+
routeContext: { outlet: null, matches: E, isDataRoute: !0 }
|
|
1433
|
+
}
|
|
1434
|
+
) : C();
|
|
1435
|
+
}, null);
|
|
1436
|
+
}
|
|
1437
|
+
function We(e) {
|
|
1438
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1439
|
+
}
|
|
1440
|
+
function yr(e) {
|
|
1441
|
+
let t = p.useContext(ie);
|
|
1442
|
+
return W(t, We(e)), t;
|
|
1443
|
+
}
|
|
1444
|
+
function vr(e) {
|
|
1445
|
+
let t = p.useContext(ve);
|
|
1446
|
+
return W(t, We(e)), t;
|
|
1447
|
+
}
|
|
1448
|
+
function gr(e) {
|
|
1449
|
+
let t = p.useContext(Q);
|
|
1450
|
+
return W(t, We(e)), t;
|
|
1451
|
+
}
|
|
1452
|
+
function Be(e) {
|
|
1453
|
+
let t = gr(e), r = t.matches[t.matches.length - 1];
|
|
1454
|
+
return W(
|
|
1455
|
+
r.route.id,
|
|
1456
|
+
`${e} can only be used on routes that contain a unique "id"`
|
|
1457
|
+
), r.route.id;
|
|
1458
|
+
}
|
|
1459
|
+
function br() {
|
|
1460
|
+
return Be(
|
|
1461
|
+
"useRouteId"
|
|
1462
|
+
/* UseRouteId */
|
|
1463
|
+
);
|
|
1464
|
+
}
|
|
1465
|
+
function Er() {
|
|
1466
|
+
var i;
|
|
1467
|
+
let e = p.useContext(Fe), t = vr(
|
|
1468
|
+
"useRouteError"
|
|
1469
|
+
/* UseRouteError */
|
|
1470
|
+
), r = Be(
|
|
1471
|
+
"useRouteError"
|
|
1472
|
+
/* UseRouteError */
|
|
1473
|
+
);
|
|
1474
|
+
return e !== void 0 ? e : (i = t.errors) == null ? void 0 : i[r];
|
|
1475
|
+
}
|
|
1476
|
+
function wr() {
|
|
1477
|
+
let { router: e } = yr(
|
|
1478
|
+
"useNavigate"
|
|
1479
|
+
/* UseNavigateStable */
|
|
1480
|
+
), t = Be(
|
|
1481
|
+
"useNavigate"
|
|
1482
|
+
/* UseNavigateStable */
|
|
1483
|
+
), r = p.useRef(!1);
|
|
1484
|
+
return bt(() => {
|
|
1485
|
+
r.current = !0;
|
|
1486
|
+
}), p.useCallback(
|
|
1487
|
+
async (n, a = {}) => {
|
|
1488
|
+
X(r.current, gt), r.current && (typeof n == "number" ? e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...a }));
|
|
1489
|
+
},
|
|
1490
|
+
[e, t]
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1493
|
+
var ot = {};
|
|
1494
|
+
function Et(e, t, r) {
|
|
1495
|
+
!t && !ot[e] && (ot[e] = !0, X(!1, r));
|
|
1496
|
+
}
|
|
1497
|
+
p.memo(xr);
|
|
1498
|
+
function xr({
|
|
1499
|
+
routes: e,
|
|
1500
|
+
future: t,
|
|
1501
|
+
state: r
|
|
1502
|
+
}) {
|
|
1503
|
+
return cr(e, void 0, r, t);
|
|
1504
|
+
}
|
|
1505
|
+
var he = "get", me = "application/x-www-form-urlencoded";
|
|
1506
|
+
function be(e) {
|
|
1507
|
+
return e != null && typeof e.tagName == "string";
|
|
1508
|
+
}
|
|
1509
|
+
function Rr(e) {
|
|
1510
|
+
return be(e) && e.tagName.toLowerCase() === "button";
|
|
1511
|
+
}
|
|
1512
|
+
function Cr(e) {
|
|
1513
|
+
return be(e) && e.tagName.toLowerCase() === "form";
|
|
1514
|
+
}
|
|
1515
|
+
function Tr(e) {
|
|
1516
|
+
return be(e) && e.tagName.toLowerCase() === "input";
|
|
1517
|
+
}
|
|
1518
|
+
function Sr(e) {
|
|
1519
|
+
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1520
|
+
}
|
|
1521
|
+
function Pr(e, t) {
|
|
1522
|
+
return e.button === 0 && // Ignore everything but left clicks
|
|
1523
|
+
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
1524
|
+
!Sr(e);
|
|
1525
|
+
}
|
|
1526
|
+
var pe = null;
|
|
1527
|
+
function _r() {
|
|
1528
|
+
if (pe === null)
|
|
1529
|
+
try {
|
|
1530
|
+
new FormData(
|
|
1531
|
+
document.createElement("form"),
|
|
1532
|
+
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
1533
|
+
0
|
|
1534
|
+
), pe = !1;
|
|
1535
|
+
} catch {
|
|
1536
|
+
pe = !0;
|
|
1537
|
+
}
|
|
1538
|
+
return pe;
|
|
1539
|
+
}
|
|
1540
|
+
var Or = /* @__PURE__ */ new Set([
|
|
1541
|
+
"application/x-www-form-urlencoded",
|
|
1542
|
+
"multipart/form-data",
|
|
1543
|
+
"text/plain"
|
|
1544
|
+
]);
|
|
1545
|
+
function Ie(e) {
|
|
1546
|
+
return e != null && !Or.has(e) ? (X(
|
|
1547
|
+
!1,
|
|
1548
|
+
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${me}"`
|
|
1549
|
+
), null) : e;
|
|
1550
|
+
}
|
|
1551
|
+
function $r(e, t) {
|
|
1552
|
+
let r, i, n, a, o;
|
|
1553
|
+
if (Cr(e)) {
|
|
1554
|
+
let l = e.getAttribute("action");
|
|
1555
|
+
i = l ? re(l, t) : null, r = e.getAttribute("method") || he, n = Ie(e.getAttribute("enctype")) || me, a = new FormData(e);
|
|
1556
|
+
} else if (Rr(e) || Tr(e) && (e.type === "submit" || e.type === "image")) {
|
|
1557
|
+
let l = e.form;
|
|
1558
|
+
if (l == null)
|
|
1559
|
+
throw new Error(
|
|
1560
|
+
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1561
|
+
);
|
|
1562
|
+
let c = e.getAttribute("formaction") || l.getAttribute("action");
|
|
1563
|
+
if (i = c ? re(c, t) : null, r = e.getAttribute("formmethod") || l.getAttribute("method") || he, n = Ie(e.getAttribute("formenctype")) || Ie(l.getAttribute("enctype")) || me, a = new FormData(l, e), !_r()) {
|
|
1564
|
+
let { name: u, type: d, value: v } = e;
|
|
1565
|
+
if (d === "image") {
|
|
1566
|
+
let f = u ? `${u}.` : "";
|
|
1567
|
+
a.append(`${f}x`, "0"), a.append(`${f}y`, "0");
|
|
1568
|
+
} else u && a.append(u, v);
|
|
1569
|
+
}
|
|
1570
|
+
} else {
|
|
1571
|
+
if (be(e))
|
|
1572
|
+
throw new Error(
|
|
1573
|
+
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
1574
|
+
);
|
|
1575
|
+
r = he, i = null, n = me, o = e;
|
|
1576
|
+
}
|
|
1577
|
+
return a && n === "text/plain" && (o = a, a = void 0), { action: i, method: r.toLowerCase(), encType: n, formData: a, body: o };
|
|
1578
|
+
}
|
|
1579
|
+
function Ue(e, t) {
|
|
1580
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
1581
|
+
throw new Error(t);
|
|
1582
|
+
}
|
|
1583
|
+
async function kr(e, t) {
|
|
1584
|
+
if (e.id in t)
|
|
1585
|
+
return t[e.id];
|
|
1586
|
+
try {
|
|
1587
|
+
let r = await import(
|
|
1588
|
+
/* @vite-ignore */
|
|
1589
|
+
/* webpackIgnore: true */
|
|
1590
|
+
e.module
|
|
1591
|
+
);
|
|
1592
|
+
return t[e.id] = r, r;
|
|
1593
|
+
} catch (r) {
|
|
1594
|
+
return console.error(
|
|
1595
|
+
`Error loading route module \`${e.module}\`, reloading page...`
|
|
1596
|
+
), console.error(r), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
function Nr(e) {
|
|
1601
|
+
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";
|
|
1602
|
+
}
|
|
1603
|
+
async function Ir(e, t, r) {
|
|
1604
|
+
let i = await Promise.all(
|
|
1605
|
+
e.map(async (n) => {
|
|
1606
|
+
let a = t.routes[n.route.id];
|
|
1607
|
+
if (a) {
|
|
1608
|
+
let o = await kr(a, r);
|
|
1609
|
+
return o.links ? o.links() : [];
|
|
1610
|
+
}
|
|
1611
|
+
return [];
|
|
1612
|
+
})
|
|
1613
|
+
);
|
|
1614
|
+
return Mr(
|
|
1615
|
+
i.flat(1).filter(Nr).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map(
|
|
1616
|
+
(n) => n.rel === "stylesheet" ? { ...n, rel: "prefetch", as: "style" } : { ...n, rel: "prefetch" }
|
|
1617
|
+
)
|
|
1618
|
+
);
|
|
1619
|
+
}
|
|
1620
|
+
function lt(e, t, r, i, n, a) {
|
|
1621
|
+
let o = (c, u) => r[u] ? c.route.id !== r[u].route.id : !0, l = (c, u) => {
|
|
1622
|
+
var d;
|
|
1623
|
+
return (
|
|
1624
|
+
// param change, /users/123 -> /users/456
|
|
1625
|
+
r[u].pathname !== c.pathname || // splat param changed, which is not present in match.path
|
|
1626
|
+
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
1627
|
+
((d = r[u].route.path) == null ? void 0 : d.endsWith("*")) && r[u].params["*"] !== c.params["*"]
|
|
1628
|
+
);
|
|
1629
|
+
};
|
|
1630
|
+
return a === "assets" ? t.filter(
|
|
1631
|
+
(c, u) => o(c, u) || l(c, u)
|
|
1632
|
+
) : a === "data" ? t.filter((c, u) => {
|
|
1633
|
+
var v;
|
|
1634
|
+
let d = i.routes[c.route.id];
|
|
1635
|
+
if (!d || !d.hasLoader)
|
|
1636
|
+
return !1;
|
|
1637
|
+
if (o(c, u) || l(c, u))
|
|
1638
|
+
return !0;
|
|
1639
|
+
if (c.route.shouldRevalidate) {
|
|
1640
|
+
let f = c.route.shouldRevalidate({
|
|
1641
|
+
currentUrl: new URL(
|
|
1642
|
+
n.pathname + n.search + n.hash,
|
|
1643
|
+
window.origin
|
|
1644
|
+
),
|
|
1645
|
+
currentParams: ((v = r[0]) == null ? void 0 : v.params) || {},
|
|
1646
|
+
nextUrl: new URL(e, window.origin),
|
|
1647
|
+
nextParams: c.params,
|
|
1648
|
+
defaultShouldRevalidate: !0
|
|
1649
|
+
});
|
|
1650
|
+
if (typeof f == "boolean")
|
|
1651
|
+
return f;
|
|
1652
|
+
}
|
|
1653
|
+
return !0;
|
|
1654
|
+
}) : [];
|
|
1655
|
+
}
|
|
1656
|
+
function Ar(e, t) {
|
|
1657
|
+
return Lr(
|
|
1658
|
+
e.map((r) => {
|
|
1659
|
+
let i = t.routes[r.route.id];
|
|
1660
|
+
if (!i) return [];
|
|
1661
|
+
let n = [i.module];
|
|
1662
|
+
return i.imports && (n = n.concat(i.imports)), n;
|
|
1663
|
+
}).flat(1)
|
|
1664
|
+
);
|
|
1665
|
+
}
|
|
1666
|
+
function Lr(e) {
|
|
1667
|
+
return [...new Set(e)];
|
|
1668
|
+
}
|
|
1669
|
+
function jr(e) {
|
|
1670
|
+
let t = {}, r = Object.keys(e).sort();
|
|
1671
|
+
for (let i of r)
|
|
1672
|
+
t[i] = e[i];
|
|
1673
|
+
return t;
|
|
1674
|
+
}
|
|
1675
|
+
function Mr(e, t) {
|
|
1676
|
+
let r = /* @__PURE__ */ new Set();
|
|
1677
|
+
return new Set(t), e.reduce((i, n) => {
|
|
1678
|
+
let a = JSON.stringify(jr(n));
|
|
1679
|
+
return r.has(a) || (r.add(a), i.push({ key: a, link: n })), i;
|
|
1680
|
+
}, []);
|
|
1681
|
+
}
|
|
1682
|
+
function Dr(e) {
|
|
1683
|
+
let t = typeof e == "string" ? new URL(
|
|
1684
|
+
e,
|
|
1685
|
+
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
1686
|
+
// don't assume window is available
|
|
1687
|
+
typeof window > "u" ? "server://singlefetch/" : window.location.origin
|
|
1688
|
+
) : e;
|
|
1689
|
+
return t.pathname === "/" ? t.pathname = "_root.data" : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
|
|
1690
|
+
}
|
|
1691
|
+
function qr() {
|
|
1692
|
+
let e = p.useContext(ie);
|
|
1693
|
+
return Ue(
|
|
1694
|
+
e,
|
|
1695
|
+
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1696
|
+
), e;
|
|
1697
|
+
}
|
|
1698
|
+
function Fr() {
|
|
1699
|
+
let e = p.useContext(ve);
|
|
1700
|
+
return Ue(
|
|
1701
|
+
e,
|
|
1702
|
+
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1703
|
+
), e;
|
|
1704
|
+
}
|
|
1705
|
+
var ze = p.createContext(void 0);
|
|
1706
|
+
ze.displayName = "FrameworkContext";
|
|
1707
|
+
function wt() {
|
|
1708
|
+
let e = p.useContext(ze);
|
|
1709
|
+
return Ue(
|
|
1710
|
+
e,
|
|
1711
|
+
"You must render this element inside a <HydratedRouter> element"
|
|
1712
|
+
), e;
|
|
1713
|
+
}
|
|
1714
|
+
function Wr(e, t) {
|
|
1715
|
+
let r = p.useContext(ze), [i, n] = p.useState(!1), [a, o] = p.useState(!1), { onFocus: l, onBlur: c, onMouseEnter: u, onMouseLeave: d, onTouchStart: v } = t, f = p.useRef(null);
|
|
1716
|
+
p.useEffect(() => {
|
|
1717
|
+
if (e === "render" && o(!0), e === "viewport") {
|
|
1718
|
+
let E = (y) => {
|
|
1719
|
+
y.forEach((N) => {
|
|
1720
|
+
o(N.isIntersecting);
|
|
1721
|
+
});
|
|
1722
|
+
}, C = new IntersectionObserver(E, { threshold: 0.5 });
|
|
1723
|
+
return f.current && C.observe(f.current), () => {
|
|
1724
|
+
C.disconnect();
|
|
1725
|
+
};
|
|
1726
|
+
}
|
|
1727
|
+
}, [e]), p.useEffect(() => {
|
|
1728
|
+
if (i) {
|
|
1729
|
+
let E = setTimeout(() => {
|
|
1730
|
+
o(!0);
|
|
1731
|
+
}, 100);
|
|
1732
|
+
return () => {
|
|
1733
|
+
clearTimeout(E);
|
|
1734
|
+
};
|
|
1735
|
+
}
|
|
1736
|
+
}, [i]);
|
|
1737
|
+
let b = () => {
|
|
1738
|
+
n(!0);
|
|
1739
|
+
}, h = () => {
|
|
1740
|
+
n(!1), o(!1);
|
|
1741
|
+
};
|
|
1742
|
+
return r ? e !== "intent" ? [a, f, {}] : [
|
|
1743
|
+
a,
|
|
1744
|
+
f,
|
|
1745
|
+
{
|
|
1746
|
+
onFocus: le(l, b),
|
|
1747
|
+
onBlur: le(c, h),
|
|
1748
|
+
onMouseEnter: le(u, b),
|
|
1749
|
+
onMouseLeave: le(d, h),
|
|
1750
|
+
onTouchStart: le(v, b)
|
|
1751
|
+
}
|
|
1752
|
+
] : [!1, f, {}];
|
|
1753
|
+
}
|
|
1754
|
+
function le(e, t) {
|
|
1755
|
+
return (r) => {
|
|
1756
|
+
e && e(r), r.defaultPrevented || t(r);
|
|
1757
|
+
};
|
|
1758
|
+
}
|
|
1759
|
+
function Br({
|
|
1760
|
+
page: e,
|
|
1761
|
+
...t
|
|
1762
|
+
}) {
|
|
1763
|
+
let { router: r } = qr(), i = p.useMemo(
|
|
1764
|
+
() => ft(r.routes, e, r.basename),
|
|
1765
|
+
[r.routes, e, r.basename]
|
|
1766
|
+
);
|
|
1767
|
+
return i ? /* @__PURE__ */ p.createElement(zr, { page: e, matches: i, ...t }) : null;
|
|
1768
|
+
}
|
|
1769
|
+
function Ur(e) {
|
|
1770
|
+
let { manifest: t, routeModules: r } = wt(), [i, n] = p.useState([]);
|
|
1771
|
+
return p.useEffect(() => {
|
|
1772
|
+
let a = !1;
|
|
1773
|
+
return Ir(e, t, r).then(
|
|
1774
|
+
(o) => {
|
|
1775
|
+
a || n(o);
|
|
1776
|
+
}
|
|
1777
|
+
), () => {
|
|
1778
|
+
a = !0;
|
|
1779
|
+
};
|
|
1780
|
+
}, [e, t, r]), i;
|
|
1781
|
+
}
|
|
1782
|
+
function zr({
|
|
1783
|
+
page: e,
|
|
1784
|
+
matches: t,
|
|
1785
|
+
...r
|
|
1786
|
+
}) {
|
|
1787
|
+
let i = ne(), { manifest: n, routeModules: a } = wt(), { loaderData: o, matches: l } = Fr(), c = p.useMemo(
|
|
1788
|
+
() => lt(
|
|
1789
|
+
e,
|
|
1790
|
+
t,
|
|
1791
|
+
l,
|
|
1792
|
+
n,
|
|
1793
|
+
i,
|
|
1794
|
+
"data"
|
|
1795
|
+
),
|
|
1796
|
+
[e, t, l, n, i]
|
|
1797
|
+
), u = p.useMemo(
|
|
1798
|
+
() => lt(
|
|
1799
|
+
e,
|
|
1800
|
+
t,
|
|
1801
|
+
l,
|
|
1802
|
+
n,
|
|
1803
|
+
i,
|
|
1804
|
+
"assets"
|
|
1805
|
+
),
|
|
1806
|
+
[e, t, l, n, i]
|
|
1807
|
+
), d = p.useMemo(() => {
|
|
1808
|
+
if (e === i.pathname + i.search + i.hash)
|
|
1809
|
+
return [];
|
|
1810
|
+
let b = /* @__PURE__ */ new Set(), h = !1;
|
|
1811
|
+
if (t.forEach((C) => {
|
|
1812
|
+
var N;
|
|
1813
|
+
let y = n.routes[C.route.id];
|
|
1814
|
+
!y || !y.hasLoader || (!c.some((T) => T.route.id === C.route.id) && C.route.id in o && ((N = a[C.route.id]) != null && N.shouldRevalidate) || y.hasClientLoader ? h = !0 : b.add(C.route.id));
|
|
1815
|
+
}), b.size === 0)
|
|
1816
|
+
return [];
|
|
1817
|
+
let E = Dr(e);
|
|
1818
|
+
return h && b.size > 0 && E.searchParams.set(
|
|
1819
|
+
"_routes",
|
|
1820
|
+
t.filter((C) => b.has(C.route.id)).map((C) => C.route.id).join(",")
|
|
1821
|
+
), [E.pathname + E.search];
|
|
1822
|
+
}, [
|
|
1823
|
+
o,
|
|
1824
|
+
i,
|
|
1825
|
+
n,
|
|
1826
|
+
c,
|
|
1827
|
+
t,
|
|
1828
|
+
e,
|
|
1829
|
+
a
|
|
1830
|
+
]), v = p.useMemo(
|
|
1831
|
+
() => Ar(u, n),
|
|
1832
|
+
[u, n]
|
|
1833
|
+
), f = Ur(u);
|
|
1834
|
+
return /* @__PURE__ */ p.createElement(p.Fragment, null, d.map((b) => /* @__PURE__ */ p.createElement("link", { key: b, rel: "prefetch", as: "fetch", href: b, ...r })), v.map((b) => /* @__PURE__ */ p.createElement("link", { key: b, rel: "modulepreload", href: b, ...r })), f.map(({ key: b, link: h }) => (
|
|
1835
|
+
// these don't spread `linkProps` because they are full link descriptors
|
|
1836
|
+
// already with their own props
|
|
1837
|
+
/* @__PURE__ */ p.createElement("link", { key: b, ...h })
|
|
1838
|
+
)));
|
|
1839
|
+
}
|
|
1840
|
+
function Yr(...e) {
|
|
1841
|
+
return (t) => {
|
|
1842
|
+
e.forEach((r) => {
|
|
1843
|
+
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
1844
|
+
});
|
|
1845
|
+
};
|
|
1846
|
+
}
|
|
1847
|
+
var xt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1848
|
+
try {
|
|
1849
|
+
xt && (window.__reactRouterVersion = "7.1.1");
|
|
1850
|
+
} catch {
|
|
1851
|
+
}
|
|
1852
|
+
var Rt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ye = p.forwardRef(
|
|
1853
|
+
function({
|
|
1854
|
+
onClick: t,
|
|
1855
|
+
discover: r = "render",
|
|
1856
|
+
prefetch: i = "none",
|
|
1857
|
+
relative: n,
|
|
1858
|
+
reloadDocument: a,
|
|
1859
|
+
replace: o,
|
|
1860
|
+
state: l,
|
|
1861
|
+
target: c,
|
|
1862
|
+
to: u,
|
|
1863
|
+
preventScrollReset: d,
|
|
1864
|
+
viewTransition: v,
|
|
1865
|
+
...f
|
|
1866
|
+
}, b) {
|
|
1867
|
+
let { basename: h } = p.useContext(Z), E = typeof u == "string" && Rt.test(u), C, y = !1;
|
|
1868
|
+
if (typeof u == "string" && E && (C = u, xt))
|
|
1869
|
+
try {
|
|
1870
|
+
let F = new URL(window.location.href), H = u.startsWith("//") ? new URL(F.protocol + u) : new URL(u), ee = re(H.pathname, h);
|
|
1871
|
+
H.origin === F.origin && ee != null ? u = ee + H.search + H.hash : y = !0;
|
|
1872
|
+
} catch {
|
|
1873
|
+
X(
|
|
1874
|
+
!1,
|
|
1875
|
+
`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1876
|
+
);
|
|
1877
|
+
}
|
|
1878
|
+
let N = lr(u, { relative: n }), [T, k, g] = Wr(
|
|
1879
|
+
i,
|
|
1880
|
+
f
|
|
1881
|
+
), U = Kr(u, {
|
|
1882
|
+
replace: o,
|
|
1883
|
+
state: l,
|
|
1884
|
+
target: c,
|
|
1885
|
+
preventScrollReset: d,
|
|
1886
|
+
relative: n,
|
|
1887
|
+
viewTransition: v
|
|
1888
|
+
});
|
|
1889
|
+
function Y(F) {
|
|
1890
|
+
t && t(F), F.defaultPrevented || U(F);
|
|
1891
|
+
}
|
|
1892
|
+
let V = (
|
|
1893
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1894
|
+
/* @__PURE__ */ p.createElement(
|
|
1895
|
+
"a",
|
|
1896
|
+
{
|
|
1897
|
+
...f,
|
|
1898
|
+
...g,
|
|
1899
|
+
href: C || N,
|
|
1900
|
+
onClick: y || a ? t : Y,
|
|
1901
|
+
ref: Yr(b, k),
|
|
1902
|
+
target: c,
|
|
1903
|
+
"data-discover": !E && r === "render" ? "true" : void 0
|
|
1904
|
+
}
|
|
1905
|
+
)
|
|
1906
|
+
);
|
|
1907
|
+
return T && !E ? /* @__PURE__ */ p.createElement(p.Fragment, null, V, /* @__PURE__ */ p.createElement(Br, { page: N })) : V;
|
|
1908
|
+
}
|
|
1909
|
+
);
|
|
1910
|
+
Ye.displayName = "Link";
|
|
1911
|
+
var Hr = p.forwardRef(
|
|
1912
|
+
function({
|
|
1913
|
+
"aria-current": t = "page",
|
|
1914
|
+
caseSensitive: r = !1,
|
|
1915
|
+
className: i = "",
|
|
1916
|
+
end: n = !1,
|
|
1917
|
+
style: a,
|
|
1918
|
+
to: o,
|
|
1919
|
+
viewTransition: l,
|
|
1920
|
+
children: c,
|
|
1921
|
+
...u
|
|
1922
|
+
}, d) {
|
|
1923
|
+
let v = se(o, { relative: u.relative }), f = ne(), b = p.useContext(ve), { navigator: h, basename: E } = p.useContext(Z), C = b != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1924
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1925
|
+
en(v) && l === !0, y = h.encodeLocation ? h.encodeLocation(v).pathname : v.pathname, N = f.pathname, T = b && b.navigation && b.navigation.location ? b.navigation.location.pathname : null;
|
|
1926
|
+
r || (N = N.toLowerCase(), T = T ? T.toLowerCase() : null, y = y.toLowerCase()), T && E && (T = re(T, E) || T);
|
|
1927
|
+
const k = y !== "/" && y.endsWith("/") ? y.length - 1 : y.length;
|
|
1928
|
+
let g = N === y || !n && N.startsWith(y) && N.charAt(k) === "/", U = T != null && (T === y || !n && T.startsWith(y) && T.charAt(y.length) === "/"), Y = {
|
|
1929
|
+
isActive: g,
|
|
1930
|
+
isPending: U,
|
|
1931
|
+
isTransitioning: C
|
|
1932
|
+
}, V = g ? t : void 0, F;
|
|
1933
|
+
typeof i == "function" ? F = i(Y) : F = [
|
|
1934
|
+
i,
|
|
1935
|
+
g ? "active" : null,
|
|
1936
|
+
U ? "pending" : null,
|
|
1937
|
+
C ? "transitioning" : null
|
|
1938
|
+
].filter(Boolean).join(" ");
|
|
1939
|
+
let H = typeof a == "function" ? a(Y) : a;
|
|
1940
|
+
return /* @__PURE__ */ p.createElement(
|
|
1941
|
+
Ye,
|
|
1942
|
+
{
|
|
1943
|
+
...u,
|
|
1944
|
+
"aria-current": V,
|
|
1945
|
+
className: F,
|
|
1946
|
+
ref: d,
|
|
1947
|
+
style: H,
|
|
1948
|
+
to: o,
|
|
1949
|
+
viewTransition: l
|
|
1950
|
+
},
|
|
1951
|
+
typeof c == "function" ? c(Y) : c
|
|
1952
|
+
);
|
|
1953
|
+
}
|
|
1954
|
+
);
|
|
1955
|
+
Hr.displayName = "NavLink";
|
|
1956
|
+
var Vr = p.forwardRef(
|
|
1957
|
+
({
|
|
1958
|
+
discover: e = "render",
|
|
1959
|
+
fetcherKey: t,
|
|
1960
|
+
navigate: r,
|
|
1961
|
+
reloadDocument: i,
|
|
1962
|
+
replace: n,
|
|
1963
|
+
state: a,
|
|
1964
|
+
method: o = he,
|
|
1965
|
+
action: l,
|
|
1966
|
+
onSubmit: c,
|
|
1967
|
+
relative: u,
|
|
1968
|
+
preventScrollReset: d,
|
|
1969
|
+
viewTransition: v,
|
|
1970
|
+
...f
|
|
1971
|
+
}, b) => {
|
|
1972
|
+
let h = Zr(), E = Qr(l, { relative: u }), C = o.toLowerCase() === "get" ? "get" : "post", y = typeof l == "string" && Rt.test(l), N = (T) => {
|
|
1973
|
+
if (c && c(T), T.defaultPrevented) return;
|
|
1974
|
+
T.preventDefault();
|
|
1975
|
+
let k = T.nativeEvent.submitter, g = (k == null ? void 0 : k.getAttribute("formmethod")) || o;
|
|
1976
|
+
h(k || T.currentTarget, {
|
|
1977
|
+
fetcherKey: t,
|
|
1978
|
+
method: g,
|
|
1979
|
+
navigate: r,
|
|
1980
|
+
replace: n,
|
|
1981
|
+
state: a,
|
|
1982
|
+
relative: u,
|
|
1983
|
+
preventScrollReset: d,
|
|
1984
|
+
viewTransition: v
|
|
1985
|
+
});
|
|
1986
|
+
};
|
|
1987
|
+
return /* @__PURE__ */ p.createElement(
|
|
1988
|
+
"form",
|
|
1989
|
+
{
|
|
1990
|
+
ref: b,
|
|
1991
|
+
method: C,
|
|
1992
|
+
action: E,
|
|
1993
|
+
onSubmit: i ? c : N,
|
|
1994
|
+
...f,
|
|
1995
|
+
"data-discover": !y && e === "render" ? "true" : void 0
|
|
1996
|
+
}
|
|
1997
|
+
);
|
|
1998
|
+
}
|
|
1999
|
+
);
|
|
2000
|
+
Vr.displayName = "Form";
|
|
2001
|
+
function Jr(e) {
|
|
2002
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
2003
|
+
}
|
|
2004
|
+
function Ct(e) {
|
|
2005
|
+
let t = p.useContext(ie);
|
|
2006
|
+
return W(t, Jr(e)), t;
|
|
2007
|
+
}
|
|
2008
|
+
function Kr(e, {
|
|
2009
|
+
target: t,
|
|
2010
|
+
replace: r,
|
|
2011
|
+
state: i,
|
|
2012
|
+
preventScrollReset: n,
|
|
2013
|
+
relative: a,
|
|
2014
|
+
viewTransition: o
|
|
2015
|
+
} = {}) {
|
|
2016
|
+
let l = sr(), c = ne(), u = se(e, { relative: a });
|
|
2017
|
+
return p.useCallback(
|
|
2018
|
+
(d) => {
|
|
2019
|
+
if (Pr(d, t)) {
|
|
2020
|
+
d.preventDefault();
|
|
2021
|
+
let v = r !== void 0 ? r : Ae(c) === Ae(u);
|
|
2022
|
+
l(e, {
|
|
2023
|
+
replace: v,
|
|
2024
|
+
state: i,
|
|
2025
|
+
preventScrollReset: n,
|
|
2026
|
+
relative: a,
|
|
2027
|
+
viewTransition: o
|
|
2028
|
+
});
|
|
2029
|
+
}
|
|
2030
|
+
},
|
|
2031
|
+
[
|
|
2032
|
+
c,
|
|
2033
|
+
l,
|
|
2034
|
+
u,
|
|
2035
|
+
r,
|
|
2036
|
+
i,
|
|
2037
|
+
t,
|
|
2038
|
+
e,
|
|
2039
|
+
n,
|
|
2040
|
+
a,
|
|
2041
|
+
o
|
|
2042
|
+
]
|
|
2043
|
+
);
|
|
2044
|
+
}
|
|
2045
|
+
var Gr = 0, Xr = () => `__${String(++Gr)}__`;
|
|
2046
|
+
function Zr() {
|
|
2047
|
+
let { router: e } = Ct(
|
|
2048
|
+
"useSubmit"
|
|
2049
|
+
/* UseSubmit */
|
|
2050
|
+
), { basename: t } = p.useContext(Z), r = br();
|
|
2051
|
+
return p.useCallback(
|
|
2052
|
+
async (i, n = {}) => {
|
|
2053
|
+
let { action: a, method: o, encType: l, formData: c, body: u } = $r(
|
|
2054
|
+
i,
|
|
2055
|
+
t
|
|
2056
|
+
);
|
|
2057
|
+
if (n.navigate === !1) {
|
|
2058
|
+
let d = n.fetcherKey || Xr();
|
|
2059
|
+
await e.fetch(d, r, n.action || a, {
|
|
2060
|
+
preventScrollReset: n.preventScrollReset,
|
|
2061
|
+
formData: c,
|
|
2062
|
+
body: u,
|
|
2063
|
+
formMethod: n.method || o,
|
|
2064
|
+
formEncType: n.encType || l,
|
|
2065
|
+
flushSync: n.flushSync
|
|
2066
|
+
});
|
|
2067
|
+
} else
|
|
2068
|
+
await e.navigate(n.action || a, {
|
|
2069
|
+
preventScrollReset: n.preventScrollReset,
|
|
2070
|
+
formData: c,
|
|
2071
|
+
body: u,
|
|
2072
|
+
formMethod: n.method || o,
|
|
2073
|
+
formEncType: n.encType || l,
|
|
2074
|
+
replace: n.replace,
|
|
2075
|
+
state: n.state,
|
|
2076
|
+
fromRouteId: r,
|
|
2077
|
+
flushSync: n.flushSync,
|
|
2078
|
+
viewTransition: n.viewTransition
|
|
2079
|
+
});
|
|
2080
|
+
},
|
|
2081
|
+
[e, t, r]
|
|
2082
|
+
);
|
|
2083
|
+
}
|
|
2084
|
+
function Qr(e, { relative: t } = {}) {
|
|
2085
|
+
let { basename: r } = p.useContext(Z), i = p.useContext(Q);
|
|
2086
|
+
W(i, "useFormAction must be used inside a RouteContext");
|
|
2087
|
+
let [n] = i.matches.slice(-1), a = { ...se(e || ".", { relative: t }) }, o = ne();
|
|
2088
|
+
if (e == null) {
|
|
2089
|
+
a.search = o.search;
|
|
2090
|
+
let l = new URLSearchParams(a.search), c = l.getAll("index");
|
|
2091
|
+
if (c.some((d) => d === "")) {
|
|
2092
|
+
l.delete("index"), c.filter((v) => v).forEach((v) => l.append("index", v));
|
|
2093
|
+
let d = l.toString();
|
|
2094
|
+
a.search = d ? `?${d}` : "";
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
return (!e || e === ".") && n.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (a.pathname = a.pathname === "/" ? r : G([r, a.pathname])), Ae(a);
|
|
2098
|
+
}
|
|
2099
|
+
function en(e, t = {}) {
|
|
2100
|
+
let r = p.useContext(vt);
|
|
2101
|
+
W(
|
|
2102
|
+
r != null,
|
|
2103
|
+
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
2104
|
+
);
|
|
2105
|
+
let { basename: i } = Ct(
|
|
2106
|
+
"useViewTransitionState"
|
|
2107
|
+
/* useViewTransitionState */
|
|
2108
|
+
), n = se(e, { relative: t.relative });
|
|
2109
|
+
if (!r.isTransitioning)
|
|
2110
|
+
return !1;
|
|
2111
|
+
let a = re(r.currentLocation.pathname, i) || r.currentLocation.pathname, o = re(r.nextLocation.pathname, i) || r.nextLocation.pathname;
|
|
2112
|
+
return ye(n.pathname, o) != null || ye(n.pathname, a) != null;
|
|
2113
|
+
}
|
|
2114
|
+
new TextEncoder();
|
|
2115
|
+
const Le = ({
|
|
2116
|
+
text: e,
|
|
2117
|
+
href: t,
|
|
2118
|
+
title: r,
|
|
2119
|
+
className: i,
|
|
2120
|
+
type: n = "primary",
|
|
2121
|
+
variant: a = "",
|
|
2122
|
+
size: o = "default",
|
|
2123
|
+
icon: l = "",
|
|
2124
|
+
iconOnly: c = !1,
|
|
2125
|
+
iconPosition: u = "left",
|
|
2126
|
+
fullWidth: d = !1,
|
|
2127
|
+
disabled: v = !1,
|
|
2128
|
+
onClick: f = () => {
|
|
2129
|
+
},
|
|
2130
|
+
"aria-label": b = ""
|
|
2131
|
+
}) => {
|
|
2132
|
+
const h = l && c, E = B(
|
|
2133
|
+
// Static classes
|
|
2134
|
+
"rpf-button",
|
|
2135
|
+
// Conditional classes
|
|
2136
|
+
{
|
|
2137
|
+
[`rpf-button--${n}`]: n,
|
|
2138
|
+
"rpf-button--danger": a === "danger",
|
|
2139
|
+
"rpf-button--sm": o === "small",
|
|
2140
|
+
"rpf-button--icon-only": h,
|
|
2141
|
+
"rpf-button--full-width": d,
|
|
2142
|
+
disabled: v
|
|
2143
|
+
},
|
|
2144
|
+
i
|
|
2145
|
+
);
|
|
2146
|
+
let C = "rpf-button__icon";
|
|
2147
|
+
Tt.isValidElement(l) ? (C += " icon", console.warn(
|
|
2148
|
+
"DEPRECATED: icons as React elements will not be supported in future releases"
|
|
2149
|
+
)) : C += " material-symbols-sharp";
|
|
2150
|
+
const y = (k) => l && u === k && /* @__PURE__ */ R("span", { className: C, children: l }), N = () => e && !h && /* @__PURE__ */ R("span", { className: "text", children: e }), T = /* @__PURE__ */ q(je, { children: [
|
|
2151
|
+
y("left"),
|
|
2152
|
+
N(),
|
|
2153
|
+
y("right")
|
|
2154
|
+
] });
|
|
2155
|
+
return t ? /* @__PURE__ */ R(
|
|
2156
|
+
Ye,
|
|
2157
|
+
{
|
|
2158
|
+
className: E,
|
|
2159
|
+
to: t,
|
|
2160
|
+
onClick: f,
|
|
2161
|
+
"aria-label": b,
|
|
2162
|
+
children: T
|
|
2163
|
+
}
|
|
2164
|
+
) : /* @__PURE__ */ R(
|
|
2165
|
+
"button",
|
|
2166
|
+
{
|
|
2167
|
+
className: E,
|
|
2168
|
+
title: r,
|
|
2169
|
+
onClick: f,
|
|
2170
|
+
disabled: v,
|
|
2171
|
+
"aria-label": b,
|
|
2172
|
+
children: T
|
|
2173
|
+
}
|
|
2174
|
+
);
|
|
2175
|
+
};
|
|
2176
|
+
Le.propTypes = {
|
|
2177
|
+
type: s.string,
|
|
2178
|
+
className: s.string,
|
|
2179
|
+
disabled: s.bool,
|
|
2180
|
+
icon: s.oneOfType([s.string, s.element]),
|
|
2181
|
+
href: s.string,
|
|
2182
|
+
onClick: s.func,
|
|
2183
|
+
text: s.string,
|
|
2184
|
+
iconOnly: s.bool,
|
|
2185
|
+
title: s.string,
|
|
2186
|
+
iconPosition: s.oneOf(["left", "right"]),
|
|
2187
|
+
size: s.oneOf(["default", "small"]),
|
|
2188
|
+
// added size prop
|
|
2189
|
+
"aria-label": s.string,
|
|
2190
|
+
fullWidth: s.bool,
|
|
2191
|
+
variant: s.string
|
|
2192
|
+
};
|
|
2193
|
+
const tn = ({ title: e, text: t, children: r, type: i, actions: n, onClose: a }) => /* @__PURE__ */ q("div", { className: `rpf-alert rpf-alert--${i}`, children: [
|
|
2194
|
+
/* @__PURE__ */ q("div", { className: "rpf-alert__header", children: [
|
|
2195
|
+
/* @__PURE__ */ R("span", { className: "rpf-alert__icon material-symbols-sharp" }),
|
|
2196
|
+
/* @__PURE__ */ R("p", { className: "rpf-alert__title", children: e }),
|
|
2197
|
+
!!a && /* @__PURE__ */ R("div", { className: "rpf-alert__close", children: /* @__PURE__ */ R(
|
|
2198
|
+
Le,
|
|
2199
|
+
{
|
|
2200
|
+
type: "tertiary",
|
|
2201
|
+
icon: "close",
|
|
2202
|
+
size: "small",
|
|
2203
|
+
iconOnly: !0,
|
|
2204
|
+
onClick: a
|
|
2205
|
+
}
|
|
2206
|
+
) })
|
|
2207
|
+
] }),
|
|
2208
|
+
(t || r || n) && /* @__PURE__ */ q("div", { className: "rpf-alert__body", children: [
|
|
2209
|
+
!r && t && /* @__PURE__ */ R("p", { children: t }),
|
|
2210
|
+
r && /* @__PURE__ */ R("div", { children: r }),
|
|
2211
|
+
n && n.length > 0 && /* @__PURE__ */ R("div", { className: "rpf-alert__actions", children: n.map((o) => /* @__PURE__ */ R(
|
|
2212
|
+
Le,
|
|
2213
|
+
{
|
|
2214
|
+
text: o.label,
|
|
2215
|
+
size: "small",
|
|
2216
|
+
type: "tertiary",
|
|
2217
|
+
href: o.href,
|
|
2218
|
+
onClick: o.onClick
|
|
2219
|
+
},
|
|
2220
|
+
o.key || o.label
|
|
2221
|
+
)) })
|
|
2222
|
+
] })
|
|
2223
|
+
] });
|
|
2224
|
+
tn.propTypes = {
|
|
2225
|
+
title: s.string,
|
|
2226
|
+
text: s.string,
|
|
2227
|
+
type: s.oneOf(["error", "warning", "information", "success"]),
|
|
2228
|
+
actions: s.arrayOf(
|
|
2229
|
+
s.shape({
|
|
2230
|
+
href: s.string,
|
|
2231
|
+
label: s.string,
|
|
2232
|
+
onClick: s.func
|
|
2233
|
+
})
|
|
2234
|
+
),
|
|
2235
|
+
children: s.node,
|
|
2236
|
+
onClose: s.func
|
|
2237
|
+
};
|
|
2238
|
+
const rn = ({
|
|
2239
|
+
id: e,
|
|
2240
|
+
label: t,
|
|
2241
|
+
name: r,
|
|
2242
|
+
checked: i = !1,
|
|
2243
|
+
disabled: n = !1,
|
|
2244
|
+
error: a = "",
|
|
2245
|
+
onChange: o = () => {
|
|
2246
|
+
},
|
|
2247
|
+
value: l = ""
|
|
2248
|
+
}) => /* @__PURE__ */ q(je, { children: [
|
|
2249
|
+
/* @__PURE__ */ q(
|
|
2250
|
+
"label",
|
|
2251
|
+
{
|
|
2252
|
+
className: B("rpf-input-checkbox", {
|
|
2253
|
+
"rpf-input-checkbox--error": a
|
|
2254
|
+
}),
|
|
2255
|
+
children: [
|
|
2256
|
+
/* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(
|
|
2257
|
+
"input",
|
|
2258
|
+
{
|
|
2259
|
+
checked: !!i,
|
|
2260
|
+
disabled: n,
|
|
2261
|
+
id: e,
|
|
2262
|
+
name: r,
|
|
2263
|
+
onChange: o,
|
|
2264
|
+
type: "checkbox",
|
|
2265
|
+
value: l
|
|
2266
|
+
}
|
|
2267
|
+
) }),
|
|
2268
|
+
/* @__PURE__ */ R("span", { className: "checkmark" }),
|
|
2269
|
+
t
|
|
2270
|
+
]
|
|
2271
|
+
}
|
|
2272
|
+
),
|
|
2273
|
+
a && /* @__PURE__ */ q("div", { className: "rpf-error-message", children: [
|
|
2274
|
+
/* @__PURE__ */ R("span", { className: "rpf-error-message__icon material-symbols-sharp", children: "error" }),
|
|
2275
|
+
a
|
|
2276
|
+
] })
|
|
2277
|
+
] });
|
|
2278
|
+
rn.propTypes = {
|
|
2279
|
+
checked: s.bool,
|
|
2280
|
+
disabled: s.bool,
|
|
2281
|
+
error: s.string,
|
|
2282
|
+
id: s.string.isRequired,
|
|
2283
|
+
label: s.oneOfType([s.string, s.object]).isRequired,
|
|
2284
|
+
name: s.string.isRequired,
|
|
2285
|
+
onChange: s.func,
|
|
2286
|
+
value: s.string
|
|
2287
|
+
};
|
|
2288
|
+
const nn = ({
|
|
2289
|
+
disabled: e = !1,
|
|
2290
|
+
errorText: t = "",
|
|
2291
|
+
fullWidth: r = !1,
|
|
2292
|
+
legendText: i,
|
|
2293
|
+
legendHintText: n = "",
|
|
2294
|
+
children: a
|
|
2295
|
+
}) => /* @__PURE__ */ q(
|
|
2296
|
+
"fieldset",
|
|
2297
|
+
{
|
|
2298
|
+
className: B("rpf-fieldset", {
|
|
2299
|
+
"rpf-fieldset--disabled": e,
|
|
2300
|
+
"rpf-fieldset--full-width": r,
|
|
2301
|
+
"rpf-fieldset--error": t
|
|
2302
|
+
}),
|
|
2303
|
+
disabled: e,
|
|
2304
|
+
children: [
|
|
2305
|
+
/* @__PURE__ */ q("legend", { className: "rpf-label", children: [
|
|
2306
|
+
i,
|
|
2307
|
+
n.length > 0 ? /* @__PURE__ */ R("small", { className: "rpf-label__hint", children: n }) : null
|
|
2308
|
+
] }),
|
|
2309
|
+
/* @__PURE__ */ R("div", { className: "rpf-fieldset__inputs", children: a }),
|
|
2310
|
+
t.length > 0 ? /* @__PURE__ */ q("div", { className: "rpf-error-message", children: [
|
|
2311
|
+
/* @__PURE__ */ R("span", { className: "rpf-error-message__icon material-symbols-sharp", children: "error" }),
|
|
2312
|
+
t
|
|
2313
|
+
] }) : null
|
|
2314
|
+
]
|
|
2315
|
+
}
|
|
2316
|
+
);
|
|
2317
|
+
nn.propTypes = {
|
|
2318
|
+
disabled: s.bool,
|
|
2319
|
+
errorText: s.string,
|
|
2320
|
+
fullWidth: s.bool,
|
|
2321
|
+
legendText: s.string.isRequired,
|
|
2322
|
+
legendHintText: s.string,
|
|
2323
|
+
children: s.node
|
|
2324
|
+
};
|
|
2325
|
+
const Ee = ({
|
|
2326
|
+
id: e,
|
|
2327
|
+
label: t,
|
|
2328
|
+
children: r,
|
|
2329
|
+
disabled: i = !1,
|
|
2330
|
+
error: n = "",
|
|
2331
|
+
hint: a = ""
|
|
2332
|
+
}) => /* @__PURE__ */ q("div", { className: "rpf-input-field", children: [
|
|
2333
|
+
(t || a) && /* @__PURE__ */ q(
|
|
2334
|
+
"label",
|
|
2335
|
+
{
|
|
2336
|
+
htmlFor: e,
|
|
2337
|
+
className: B("rpf-label", {
|
|
2338
|
+
"rpf-label--disabled": i
|
|
2339
|
+
}),
|
|
2340
|
+
children: [
|
|
2341
|
+
t,
|
|
2342
|
+
/* @__PURE__ */ R("small", { className: "rpf-label__hint", children: a })
|
|
2343
|
+
]
|
|
2344
|
+
}
|
|
2345
|
+
),
|
|
2346
|
+
r,
|
|
2347
|
+
n && /* @__PURE__ */ q("div", { className: "rpf-error-message", children: [
|
|
2348
|
+
/* @__PURE__ */ R("span", { className: "rpf-error-message__icon material-symbols-sharp", children: "error" }),
|
|
2349
|
+
n
|
|
2350
|
+
] })
|
|
2351
|
+
] });
|
|
2352
|
+
Ee.propTypes = {
|
|
2353
|
+
disabled: s.bool,
|
|
2354
|
+
error: s.string,
|
|
2355
|
+
hint: s.oneOfType([s.string, s.object]),
|
|
2356
|
+
label: s.oneOfType([s.string, s.object]).isRequired,
|
|
2357
|
+
id: s.string.isRequired,
|
|
2358
|
+
children: s.node
|
|
2359
|
+
};
|
|
2360
|
+
const an = ({
|
|
2361
|
+
label: e,
|
|
2362
|
+
inputFieldId: t,
|
|
2363
|
+
disabled: r = !1,
|
|
2364
|
+
hint: i = ""
|
|
2365
|
+
}) => /* @__PURE__ */ R("div", { className: "rpf-label", children: /* @__PURE__ */ q(
|
|
2366
|
+
"label",
|
|
2367
|
+
{
|
|
2368
|
+
htmlFor: t,
|
|
2369
|
+
className: B("rpf-label", {
|
|
2370
|
+
"rpf-label--disabled": r
|
|
2371
|
+
}),
|
|
2372
|
+
children: [
|
|
2373
|
+
e,
|
|
2374
|
+
i && /* @__PURE__ */ R("div", { className: "rpf-label__hint", children: i })
|
|
2375
|
+
]
|
|
2376
|
+
}
|
|
2377
|
+
) });
|
|
2378
|
+
an.propTypes = {
|
|
2379
|
+
disabled: s.bool,
|
|
2380
|
+
hint: s.oneOfType([s.string, s.object]),
|
|
2381
|
+
label: s.oneOfType([s.string, s.object]).isRequired,
|
|
2382
|
+
inputFieldId: s.string.isRequired
|
|
2383
|
+
};
|
|
2384
|
+
const on = ({ text: e = "", percent: t }) => /* @__PURE__ */ R("div", { className: "rpf-progress-bar", children: /* @__PURE__ */ q("label", { className: "rpf-progress-bar__label", children: [
|
|
2385
|
+
/* @__PURE__ */ R("span", { children: e }),
|
|
2386
|
+
/* @__PURE__ */ R("progress", { className: "rpf-progress-bar__bar", value: t, max: "100", children: `${t}%` })
|
|
2387
|
+
] }) });
|
|
2388
|
+
on.propTypes = {
|
|
2389
|
+
text: s.string,
|
|
2390
|
+
percent: s.number.isRequired
|
|
2391
|
+
};
|
|
2392
|
+
const ln = ({
|
|
2393
|
+
id: e,
|
|
2394
|
+
label: t,
|
|
2395
|
+
name: r,
|
|
2396
|
+
checked: i = !1,
|
|
2397
|
+
disabled: n = !1,
|
|
2398
|
+
fullWidth: a = !1,
|
|
2399
|
+
onChange: o = () => {
|
|
2400
|
+
},
|
|
2401
|
+
value: l = ""
|
|
2402
|
+
}) => /* @__PURE__ */ R(je, { children: /* @__PURE__ */ q(
|
|
2403
|
+
"label",
|
|
2404
|
+
{
|
|
2405
|
+
className: B("rpf-input-radio", {
|
|
2406
|
+
"rpf-input-radio--disabled": n,
|
|
2407
|
+
"rpf-input--full-width": a
|
|
2408
|
+
}),
|
|
2409
|
+
children: [
|
|
2410
|
+
/* @__PURE__ */ R(
|
|
2411
|
+
"input",
|
|
2412
|
+
{
|
|
2413
|
+
checked: !!i,
|
|
2414
|
+
disabled: n,
|
|
2415
|
+
id: e,
|
|
2416
|
+
name: r,
|
|
2417
|
+
onChange: o,
|
|
2418
|
+
type: "radio",
|
|
2419
|
+
value: l
|
|
2420
|
+
}
|
|
2421
|
+
),
|
|
2422
|
+
t
|
|
2423
|
+
]
|
|
2424
|
+
}
|
|
2425
|
+
) });
|
|
2426
|
+
ln.propTypes = {
|
|
2427
|
+
checked: s.bool,
|
|
2428
|
+
disabled: s.bool,
|
|
2429
|
+
fullWidth: s.bool,
|
|
2430
|
+
id: s.string.isRequired,
|
|
2431
|
+
label: s.oneOfType([s.string, s.object]).isRequired,
|
|
2432
|
+
name: s.string.isRequired,
|
|
2433
|
+
onChange: s.func,
|
|
2434
|
+
value: s.string
|
|
2435
|
+
};
|
|
2436
|
+
const sn = ({
|
|
2437
|
+
label: e,
|
|
2438
|
+
inputFieldId: t,
|
|
2439
|
+
disabled: r = !1,
|
|
2440
|
+
error: i = "",
|
|
2441
|
+
hint: n = "",
|
|
2442
|
+
placeholder: a = "",
|
|
2443
|
+
defaultValue: o = "",
|
|
2444
|
+
onClick: l = () => {
|
|
2445
|
+
},
|
|
2446
|
+
// eslint-disable-next-line no-unused-vars
|
|
2447
|
+
onChange: c = (u) => {
|
|
2448
|
+
}
|
|
2449
|
+
}) => /* @__PURE__ */ q("div", { className: "rpf-input-field", children: [
|
|
2450
|
+
/* @__PURE__ */ q(
|
|
2451
|
+
"label",
|
|
2452
|
+
{
|
|
2453
|
+
htmlFor: t,
|
|
2454
|
+
className: B("rpf-label", {
|
|
2455
|
+
"rpf-label--disabled": r
|
|
2456
|
+
}),
|
|
2457
|
+
children: [
|
|
2458
|
+
e,
|
|
2459
|
+
n && /* @__PURE__ */ R("small", { className: "rpf-label__hint", children: n })
|
|
2460
|
+
]
|
|
2461
|
+
}
|
|
2462
|
+
),
|
|
2463
|
+
/* @__PURE__ */ q("div", { className: "rpf-input-search-container", children: [
|
|
2464
|
+
/* @__PURE__ */ R(
|
|
2465
|
+
"input",
|
|
2466
|
+
{
|
|
2467
|
+
className: B("rpf-input rpf-input-search", {
|
|
2468
|
+
"rpf-input--disabled": r,
|
|
2469
|
+
"rpf-input--error": i
|
|
2470
|
+
}),
|
|
2471
|
+
disabled: r,
|
|
2472
|
+
id: t,
|
|
2473
|
+
name: "search",
|
|
2474
|
+
type: "search",
|
|
2475
|
+
"aria-label": "Search",
|
|
2476
|
+
defaultValue: o,
|
|
2477
|
+
placeholder: a,
|
|
2478
|
+
onChange: c
|
|
2479
|
+
}
|
|
2480
|
+
),
|
|
2481
|
+
/* @__PURE__ */ R(
|
|
2482
|
+
"button",
|
|
2483
|
+
{
|
|
2484
|
+
type: "button",
|
|
2485
|
+
className: B("rpf-button rpf-button-search", {
|
|
2486
|
+
"rpf-button--disabled": r,
|
|
2487
|
+
"rpf-button--error": i
|
|
2488
|
+
}),
|
|
2489
|
+
disabled: r,
|
|
2490
|
+
onClick: l,
|
|
2491
|
+
children: /* @__PURE__ */ R("span", { className: "rpf-button__icon material-symbols-sharp", children: "search" })
|
|
2492
|
+
}
|
|
2493
|
+
)
|
|
2494
|
+
] }),
|
|
2495
|
+
i && /* @__PURE__ */ q("div", { className: "rpf-error-message", children: [
|
|
2496
|
+
/* @__PURE__ */ R("span", { className: "rpf-error-message__icon material-symbols-sharp", children: "info" }),
|
|
2497
|
+
i
|
|
2498
|
+
] })
|
|
2499
|
+
] });
|
|
2500
|
+
sn.propTypes = {
|
|
2501
|
+
disabled: s.bool,
|
|
2502
|
+
error: s.string,
|
|
2503
|
+
hint: s.string,
|
|
2504
|
+
inputFieldId: s.string.isRequired,
|
|
2505
|
+
label: s.string.isRequired,
|
|
2506
|
+
onClick: s.func,
|
|
2507
|
+
onChange: s.func,
|
|
2508
|
+
placeholder: s.string,
|
|
2509
|
+
defaultValue: s.string
|
|
2510
|
+
};
|
|
2511
|
+
const un = ({
|
|
2512
|
+
id: e,
|
|
2513
|
+
label: t,
|
|
2514
|
+
name: r,
|
|
2515
|
+
options: i,
|
|
2516
|
+
disabled: n = !1,
|
|
2517
|
+
error: a = "",
|
|
2518
|
+
fullWidth: o = !1,
|
|
2519
|
+
hint: l = "",
|
|
2520
|
+
onChange: c = () => {
|
|
2521
|
+
},
|
|
2522
|
+
placeholder: u = "",
|
|
2523
|
+
value: d = ""
|
|
2524
|
+
}) => /* @__PURE__ */ R(
|
|
2525
|
+
Ee,
|
|
2526
|
+
{
|
|
2527
|
+
id: e,
|
|
2528
|
+
disabled: n,
|
|
2529
|
+
error: a,
|
|
2530
|
+
hint: l,
|
|
2531
|
+
label: t,
|
|
2532
|
+
children: /* @__PURE__ */ q(
|
|
2533
|
+
"select",
|
|
2534
|
+
{
|
|
2535
|
+
className: B("rpf-input rpf-input-select", {
|
|
2536
|
+
"rpf-input--error": a,
|
|
2537
|
+
"rpf-input--full-width": o
|
|
2538
|
+
}),
|
|
2539
|
+
disabled: n,
|
|
2540
|
+
id: e,
|
|
2541
|
+
name: r,
|
|
2542
|
+
onChange: c,
|
|
2543
|
+
type: "text",
|
|
2544
|
+
value: d,
|
|
2545
|
+
children: [
|
|
2546
|
+
!d && !!u && /* @__PURE__ */ R("option", { value: "", disabled: !0, children: u }),
|
|
2547
|
+
i.map((v) => /* @__PURE__ */ R("option", { value: v.key, children: v.value }, v.key))
|
|
2548
|
+
]
|
|
2549
|
+
}
|
|
2550
|
+
)
|
|
2551
|
+
}
|
|
2552
|
+
);
|
|
2553
|
+
un.propTypes = {
|
|
2554
|
+
disabled: s.bool,
|
|
2555
|
+
error: s.string,
|
|
2556
|
+
fullWidth: s.bool,
|
|
2557
|
+
hint: s.oneOfType([s.string, s.object]),
|
|
2558
|
+
label: s.oneOfType([s.string, s.object]).isRequired,
|
|
2559
|
+
id: s.string.isRequired,
|
|
2560
|
+
name: s.string.isRequired,
|
|
2561
|
+
onChange: s.func,
|
|
2562
|
+
options: s.array.isRequired,
|
|
2563
|
+
placeholder: s.string,
|
|
2564
|
+
value: s.string
|
|
2565
|
+
};
|
|
2566
|
+
const cn = ({ headerRow: e, bodyRows: t, fullWidth: r }) => /* @__PURE__ */ R(
|
|
2567
|
+
"div",
|
|
2568
|
+
{
|
|
2569
|
+
"data-testid": "table-container",
|
|
2570
|
+
className: B("rpf-table", { "rpf-table--full-width": r }),
|
|
2571
|
+
children: /* @__PURE__ */ q(
|
|
2572
|
+
"table",
|
|
2573
|
+
{
|
|
2574
|
+
className: B("rpf-table__table", {
|
|
2575
|
+
"rpf-table__table--full-width": r
|
|
2576
|
+
}),
|
|
2577
|
+
children: [
|
|
2578
|
+
/* @__PURE__ */ R("thead", { children: /* @__PURE__ */ R("tr", { className: "rpf-table-row", children: e }) }),
|
|
2579
|
+
/* @__PURE__ */ R("tbody", { children: t.map((i, n) => /* @__PURE__ */ R("tr", { className: "rpf-table-row", children: i }, n)) })
|
|
2580
|
+
]
|
|
2581
|
+
}
|
|
2582
|
+
)
|
|
2583
|
+
}
|
|
2584
|
+
);
|
|
2585
|
+
cn.propTypes = {
|
|
2586
|
+
headerRow: s.node.isRequired,
|
|
2587
|
+
bodyRows: s.arrayOf(s.node).isRequired,
|
|
2588
|
+
fullWidth: s.bool
|
|
2589
|
+
};
|
|
2590
|
+
const fn = ({ children: e }) => /* @__PURE__ */ R("td", { className: "rpf-table-cell rpf-table-cell--body", children: /* @__PURE__ */ R("div", { className: "rpf-table-cell__content", children: e }) });
|
|
2591
|
+
fn.propTypes = {
|
|
2592
|
+
children: s.node
|
|
2593
|
+
};
|
|
2594
|
+
const dn = ({ sortDirection: e, children: t }) => (e !== void 0 && (t = /* @__PURE__ */ q("div", { className: "rpf-table-cell__sort-header", children: [
|
|
2595
|
+
t,
|
|
2596
|
+
/* @__PURE__ */ R("span", { className: "material-symbols-sharp", children: e === "up" ? "arrow_drop_up" : "arrow_drop_down" })
|
|
2597
|
+
] })), /* @__PURE__ */ R("th", { className: `rpf-table-cell ${e !== void 0 ? "rpf-table-cell--sortable-header" : "rpf-table-cell--header"}`, children: /* @__PURE__ */ R("div", { className: "rpf-table-cell__content", children: t }) }));
|
|
2598
|
+
dn.propTypes = {
|
|
2599
|
+
sortDirection: s.oneOf(["up", "down"]),
|
|
2600
|
+
children: s.node
|
|
2601
|
+
};
|
|
2602
|
+
const pn = ({ text: e, variant: t, secondary: r, icon: i, iconPosition: n }) => (i && (i = /* @__PURE__ */ R("span", { className: "rpf-tag__icon material-symbols-sharp", children: i })), i && !n && (n = "left"), t && t !== "default" ? t = `rpf-tag--${t}` : t = null, /* @__PURE__ */ q(
|
|
2603
|
+
"span",
|
|
2604
|
+
{
|
|
2605
|
+
className: B("rpf-tag", t, {
|
|
2606
|
+
"rpf-tag--secondary": r
|
|
2607
|
+
}),
|
|
2608
|
+
children: [
|
|
2609
|
+
n === "left" && i,
|
|
2610
|
+
e,
|
|
2611
|
+
n === "right" && i
|
|
2612
|
+
]
|
|
2613
|
+
}
|
|
2614
|
+
));
|
|
2615
|
+
pn.propTypes = {
|
|
2616
|
+
text: s.string.isRequired,
|
|
2617
|
+
variant: s.oneOf([
|
|
2618
|
+
"default",
|
|
2619
|
+
"information",
|
|
2620
|
+
"success",
|
|
2621
|
+
"warning",
|
|
2622
|
+
"error"
|
|
2623
|
+
]),
|
|
2624
|
+
secondary: s.bool,
|
|
2625
|
+
icon: s.string,
|
|
2626
|
+
iconPosition: s.oneOf(["left", "right"])
|
|
2627
|
+
};
|
|
2628
|
+
const hn = ({
|
|
2629
|
+
id: e,
|
|
2630
|
+
label: t,
|
|
2631
|
+
name: r,
|
|
2632
|
+
value: i,
|
|
2633
|
+
disabled: n = !1,
|
|
2634
|
+
readOnly: a = !1,
|
|
2635
|
+
error: o = "",
|
|
2636
|
+
fullWidth: l = !1,
|
|
2637
|
+
hint: c = "",
|
|
2638
|
+
onChange: u = () => {
|
|
2639
|
+
}
|
|
2640
|
+
}) => /* @__PURE__ */ R(
|
|
2641
|
+
Ee,
|
|
2642
|
+
{
|
|
2643
|
+
id: e,
|
|
2644
|
+
disabled: n,
|
|
2645
|
+
error: o,
|
|
2646
|
+
hint: c,
|
|
2647
|
+
label: t,
|
|
2648
|
+
children: /* @__PURE__ */ R(
|
|
2649
|
+
"textarea",
|
|
2650
|
+
{
|
|
2651
|
+
className: B("rpf-input rpf-input-textarea", {
|
|
2652
|
+
"rpf-input--error": o,
|
|
2653
|
+
"rpf-input--full-width": l,
|
|
2654
|
+
"rpf-input--disabled": n
|
|
2655
|
+
}),
|
|
2656
|
+
disabled: n,
|
|
2657
|
+
readOnly: a,
|
|
2658
|
+
id: e,
|
|
2659
|
+
name: r,
|
|
2660
|
+
onChange: u,
|
|
2661
|
+
type: "text",
|
|
2662
|
+
value: i
|
|
2663
|
+
}
|
|
2664
|
+
)
|
|
2665
|
+
}
|
|
2666
|
+
);
|
|
2667
|
+
hn.propTypes = {
|
|
2668
|
+
disabled: s.bool,
|
|
2669
|
+
readOnly: s.bool,
|
|
2670
|
+
error: s.string,
|
|
2671
|
+
fullWidth: s.bool,
|
|
2672
|
+
hint: s.oneOfType([s.string, s.object]),
|
|
2673
|
+
label: s.oneOfType([s.string, s.object]).isRequired,
|
|
2674
|
+
id: s.string.isRequired,
|
|
2675
|
+
name: s.string.isRequired,
|
|
2676
|
+
onChange: s.func,
|
|
2677
|
+
value: s.string.isRequired
|
|
2678
|
+
};
|
|
2679
|
+
const mn = ({
|
|
2680
|
+
id: e,
|
|
2681
|
+
label: t,
|
|
2682
|
+
name: r,
|
|
2683
|
+
value: i,
|
|
2684
|
+
disabled: n = !1,
|
|
2685
|
+
error: a = "",
|
|
2686
|
+
fullWidth: o = !1,
|
|
2687
|
+
hint: l = "",
|
|
2688
|
+
onChange: c = () => {
|
|
2689
|
+
}
|
|
2690
|
+
}) => /* @__PURE__ */ R(
|
|
2691
|
+
Ee,
|
|
2692
|
+
{
|
|
2693
|
+
id: e,
|
|
2694
|
+
disabled: n,
|
|
2695
|
+
error: a,
|
|
2696
|
+
hint: l,
|
|
2697
|
+
label: t,
|
|
2698
|
+
children: /* @__PURE__ */ R(
|
|
2699
|
+
"input",
|
|
2700
|
+
{
|
|
2701
|
+
className: B("rpf-input rpf-input-text", {
|
|
2702
|
+
"rpf-input--error": a,
|
|
2703
|
+
"rpf-input--full-width": o
|
|
2704
|
+
}),
|
|
2705
|
+
disabled: n,
|
|
2706
|
+
id: e,
|
|
2707
|
+
name: r,
|
|
2708
|
+
onChange: c,
|
|
2709
|
+
type: "text",
|
|
2710
|
+
value: i
|
|
2711
|
+
}
|
|
2712
|
+
)
|
|
2713
|
+
}
|
|
2714
|
+
);
|
|
2715
|
+
mn.propTypes = {
|
|
2716
|
+
disabled: s.bool,
|
|
2717
|
+
error: s.string,
|
|
2718
|
+
fullWidth: s.bool,
|
|
2719
|
+
hint: s.oneOfType([s.string, s.object]),
|
|
2720
|
+
label: s.oneOfType([s.string, s.object]).isRequired,
|
|
2721
|
+
id: s.string.isRequired,
|
|
2722
|
+
name: s.string.isRequired,
|
|
2723
|
+
onChange: s.func,
|
|
2724
|
+
value: s.string.isRequired
|
|
2725
|
+
};
|
|
2726
|
+
export {
|
|
2727
|
+
jt as Accordion,
|
|
2728
|
+
tn as Alert,
|
|
2729
|
+
Le as Button,
|
|
2730
|
+
rn as CheckboxInput,
|
|
2731
|
+
nn as Fieldset,
|
|
2732
|
+
Ee as InputField,
|
|
2733
|
+
an as InputLabel,
|
|
2734
|
+
on as ProgressBar,
|
|
2735
|
+
ln as RadioInput,
|
|
2736
|
+
sn as SearchInput,
|
|
2737
|
+
un as SelectInput,
|
|
2738
|
+
cn as Table,
|
|
2739
|
+
fn as TableBodyCell,
|
|
2740
|
+
dn as TableHeaderCell,
|
|
2741
|
+
pn as Tag,
|
|
2742
|
+
mn as TextInput,
|
|
2743
|
+
hn as TextareaInput
|
|
2744
|
+
};
|