@standardbeagle/edit-db 0.3.159
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/dist/common/fetcher.d.ts +24 -0
- package/dist/common/schema.d.ts +2 -0
- package/dist/data-data-table.d.ts +8 -0
- package/dist/data-edit.d.ts +2 -0
- package/dist/data-panel.d.ts +1 -0
- package/dist/edit-db.css +1 -0
- package/dist/editor.d.ts +9 -0
- package/dist/editor.es.js +3511 -0
- package/dist/editor.stories.d.ts +8 -0
- package/dist/editor.umd.cjs +506 -0
- package/dist/error-boundary.d.ts +19 -0
- package/dist/error-panel.d.ts +1 -0
- package/dist/header.d.ts +1 -0
- package/dist/hooks/useDataTable.d.ts +31 -0
- package/dist/hooks/usePath.d.ts +47 -0
- package/dist/hooks/useSchema.d.ts +6 -0
- package/dist/hooks/useTableMutation.d.ts +12 -0
- package/dist/hooks/useTableRef.d.ts +11 -0
- package/dist/index.d.ts +7 -0
- package/dist/main-frame.d.ts +5 -0
- package/dist/tableList.d.ts +1 -0
- package/dist/types/schema.d.ts +55 -0
- package/package.json +72 -0
|
@@ -0,0 +1,3511 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import A, { useMemo as ae, useDebugValue as Or, createElement as ua, useRef as Wt, useContext as Te, createContext as qt, forwardRef as da, useReducer as pa, Children as fa, isValidElement as ga, useState as Lt, useCallback as Un, useEffect as En, Component as ha } from "react";
|
|
3
|
+
import { useQuery as jn, useQueryClient as ma, useMutation as Pr, QueryClient as ba, QueryClientProvider as ya } from "@tanstack/react-query";
|
|
4
|
+
var ln = { exports: {} }, It = {};
|
|
5
|
+
var jr;
|
|
6
|
+
function va() {
|
|
7
|
+
if (jr) return It;
|
|
8
|
+
jr = 1;
|
|
9
|
+
var e = A, t = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
10
|
+
function i(l, c, f) {
|
|
11
|
+
var d, g = {}, y = null, b = null;
|
|
12
|
+
f !== void 0 && (y = "" + f), c.key !== void 0 && (y = "" + c.key), c.ref !== void 0 && (b = c.ref);
|
|
13
|
+
for (d in c) r.call(c, d) && !a.hasOwnProperty(d) && (g[d] = c[d]);
|
|
14
|
+
if (l && l.defaultProps) for (d in c = l.defaultProps, c) g[d] === void 0 && (g[d] = c[d]);
|
|
15
|
+
return { $$typeof: t, type: l, key: y, ref: b, props: g, _owner: o.current };
|
|
16
|
+
}
|
|
17
|
+
return It.Fragment = n, It.jsx = i, It.jsxs = i, It;
|
|
18
|
+
}
|
|
19
|
+
var Nt = {};
|
|
20
|
+
var kr;
|
|
21
|
+
function wa() {
|
|
22
|
+
return kr || (kr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
23
|
+
var e = A, t = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.portal"), r = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), a = /* @__PURE__ */ Symbol.for("react.profiler"), i = /* @__PURE__ */ Symbol.for("react.provider"), l = /* @__PURE__ */ Symbol.for("react.context"), c = /* @__PURE__ */ Symbol.for("react.forward_ref"), f = /* @__PURE__ */ Symbol.for("react.suspense"), d = /* @__PURE__ */ Symbol.for("react.suspense_list"), g = /* @__PURE__ */ Symbol.for("react.memo"), y = /* @__PURE__ */ Symbol.for("react.lazy"), b = /* @__PURE__ */ Symbol.for("react.offscreen"), E = Symbol.iterator, S = "@@iterator";
|
|
24
|
+
function $(s) {
|
|
25
|
+
if (s === null || typeof s != "object")
|
|
26
|
+
return null;
|
|
27
|
+
var h = E && s[E] || s[S];
|
|
28
|
+
return typeof h == "function" ? h : null;
|
|
29
|
+
}
|
|
30
|
+
var P = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
31
|
+
function C(s) {
|
|
32
|
+
{
|
|
33
|
+
for (var h = arguments.length, x = new Array(h > 1 ? h - 1 : 0), R = 1; R < h; R++)
|
|
34
|
+
x[R - 1] = arguments[R];
|
|
35
|
+
O("error", s, x);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function O(s, h, x) {
|
|
39
|
+
{
|
|
40
|
+
var R = P.ReactDebugCurrentFrame, M = R.getStackAddendum();
|
|
41
|
+
M !== "" && (h += "%s", x = x.concat([M]));
|
|
42
|
+
var V = x.map(function(D) {
|
|
43
|
+
return String(D);
|
|
44
|
+
});
|
|
45
|
+
V.unshift("Warning: " + h), Function.prototype.apply.call(console[s], console, V);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
var j = !1, _ = !1, w = !1, v = !1, N = !1, Q;
|
|
49
|
+
Q = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
50
|
+
function re(s) {
|
|
51
|
+
return !!(typeof s == "string" || typeof s == "function" || s === r || s === a || N || s === o || s === f || s === d || v || s === b || j || _ || w || typeof s == "object" && s !== null && (s.$$typeof === y || s.$$typeof === g || s.$$typeof === i || s.$$typeof === l || s.$$typeof === c || // This needs to include all possible module reference object
|
|
52
|
+
// types supported by any Flight configuration anywhere since
|
|
53
|
+
// we don't know which Flight build this will end up being used
|
|
54
|
+
// with.
|
|
55
|
+
s.$$typeof === Q || s.getModuleId !== void 0));
|
|
56
|
+
}
|
|
57
|
+
function ge(s, h, x) {
|
|
58
|
+
var R = s.displayName;
|
|
59
|
+
if (R)
|
|
60
|
+
return R;
|
|
61
|
+
var M = h.displayName || h.name || "";
|
|
62
|
+
return M !== "" ? x + "(" + M + ")" : x;
|
|
63
|
+
}
|
|
64
|
+
function be(s) {
|
|
65
|
+
return s.displayName || "Context";
|
|
66
|
+
}
|
|
67
|
+
function H(s) {
|
|
68
|
+
if (s == null)
|
|
69
|
+
return null;
|
|
70
|
+
if (typeof s.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
|
|
71
|
+
return s.displayName || s.name || null;
|
|
72
|
+
if (typeof s == "string")
|
|
73
|
+
return s;
|
|
74
|
+
switch (s) {
|
|
75
|
+
case r:
|
|
76
|
+
return "Fragment";
|
|
77
|
+
case n:
|
|
78
|
+
return "Portal";
|
|
79
|
+
case a:
|
|
80
|
+
return "Profiler";
|
|
81
|
+
case o:
|
|
82
|
+
return "StrictMode";
|
|
83
|
+
case f:
|
|
84
|
+
return "Suspense";
|
|
85
|
+
case d:
|
|
86
|
+
return "SuspenseList";
|
|
87
|
+
}
|
|
88
|
+
if (typeof s == "object")
|
|
89
|
+
switch (s.$$typeof) {
|
|
90
|
+
case l:
|
|
91
|
+
var h = s;
|
|
92
|
+
return be(h) + ".Consumer";
|
|
93
|
+
case i:
|
|
94
|
+
var x = s;
|
|
95
|
+
return be(x._context) + ".Provider";
|
|
96
|
+
case c:
|
|
97
|
+
return ge(s, s.render, "ForwardRef");
|
|
98
|
+
case g:
|
|
99
|
+
var R = s.displayName || null;
|
|
100
|
+
return R !== null ? R : H(s.type) || "Memo";
|
|
101
|
+
case y: {
|
|
102
|
+
var M = s, V = M._payload, D = M._init;
|
|
103
|
+
try {
|
|
104
|
+
return H(D(V));
|
|
105
|
+
} catch {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
var ie = Object.assign, ye = 0, $e, ve, Ae, se, xe, Se, q;
|
|
113
|
+
function Oe() {
|
|
114
|
+
}
|
|
115
|
+
Oe.__reactDisabledLog = !0;
|
|
116
|
+
function ue() {
|
|
117
|
+
{
|
|
118
|
+
if (ye === 0) {
|
|
119
|
+
$e = console.log, ve = console.info, Ae = console.warn, se = console.error, xe = console.group, Se = console.groupCollapsed, q = console.groupEnd;
|
|
120
|
+
var s = {
|
|
121
|
+
configurable: !0,
|
|
122
|
+
enumerable: !0,
|
|
123
|
+
value: Oe,
|
|
124
|
+
writable: !0
|
|
125
|
+
};
|
|
126
|
+
Object.defineProperties(console, {
|
|
127
|
+
info: s,
|
|
128
|
+
log: s,
|
|
129
|
+
warn: s,
|
|
130
|
+
error: s,
|
|
131
|
+
group: s,
|
|
132
|
+
groupCollapsed: s,
|
|
133
|
+
groupEnd: s
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
ye++;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function Pe() {
|
|
140
|
+
{
|
|
141
|
+
if (ye--, ye === 0) {
|
|
142
|
+
var s = {
|
|
143
|
+
configurable: !0,
|
|
144
|
+
enumerable: !0,
|
|
145
|
+
writable: !0
|
|
146
|
+
};
|
|
147
|
+
Object.defineProperties(console, {
|
|
148
|
+
log: ie({}, s, {
|
|
149
|
+
value: $e
|
|
150
|
+
}),
|
|
151
|
+
info: ie({}, s, {
|
|
152
|
+
value: ve
|
|
153
|
+
}),
|
|
154
|
+
warn: ie({}, s, {
|
|
155
|
+
value: Ae
|
|
156
|
+
}),
|
|
157
|
+
error: ie({}, s, {
|
|
158
|
+
value: se
|
|
159
|
+
}),
|
|
160
|
+
group: ie({}, s, {
|
|
161
|
+
value: xe
|
|
162
|
+
}),
|
|
163
|
+
groupCollapsed: ie({}, s, {
|
|
164
|
+
value: Se
|
|
165
|
+
}),
|
|
166
|
+
groupEnd: ie({}, s, {
|
|
167
|
+
value: q
|
|
168
|
+
})
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
ye < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
var oe = P.ReactCurrentDispatcher, Ce;
|
|
175
|
+
function de(s, h, x) {
|
|
176
|
+
{
|
|
177
|
+
if (Ce === void 0)
|
|
178
|
+
try {
|
|
179
|
+
throw Error();
|
|
180
|
+
} catch (M) {
|
|
181
|
+
var R = M.stack.trim().match(/\n( *(at )?)/);
|
|
182
|
+
Ce = R && R[1] || "";
|
|
183
|
+
}
|
|
184
|
+
return `
|
|
185
|
+
` + Ce + s;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
var le = !1, Ee;
|
|
189
|
+
{
|
|
190
|
+
var pe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
191
|
+
Ee = new pe();
|
|
192
|
+
}
|
|
193
|
+
function Z(s, h) {
|
|
194
|
+
if (!s || le)
|
|
195
|
+
return "";
|
|
196
|
+
{
|
|
197
|
+
var x = Ee.get(s);
|
|
198
|
+
if (x !== void 0)
|
|
199
|
+
return x;
|
|
200
|
+
}
|
|
201
|
+
var R;
|
|
202
|
+
le = !0;
|
|
203
|
+
var M = Error.prepareStackTrace;
|
|
204
|
+
Error.prepareStackTrace = void 0;
|
|
205
|
+
var V;
|
|
206
|
+
V = oe.current, oe.current = null, ue();
|
|
207
|
+
try {
|
|
208
|
+
if (h) {
|
|
209
|
+
var D = function() {
|
|
210
|
+
throw Error();
|
|
211
|
+
};
|
|
212
|
+
if (Object.defineProperty(D.prototype, "props", {
|
|
213
|
+
set: function() {
|
|
214
|
+
throw Error();
|
|
215
|
+
}
|
|
216
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
217
|
+
try {
|
|
218
|
+
Reflect.construct(D, []);
|
|
219
|
+
} catch (z) {
|
|
220
|
+
R = z;
|
|
221
|
+
}
|
|
222
|
+
Reflect.construct(s, [], D);
|
|
223
|
+
} else {
|
|
224
|
+
try {
|
|
225
|
+
D.call();
|
|
226
|
+
} catch (z) {
|
|
227
|
+
R = z;
|
|
228
|
+
}
|
|
229
|
+
s.call(D.prototype);
|
|
230
|
+
}
|
|
231
|
+
} else {
|
|
232
|
+
try {
|
|
233
|
+
throw Error();
|
|
234
|
+
} catch (z) {
|
|
235
|
+
R = z;
|
|
236
|
+
}
|
|
237
|
+
s();
|
|
238
|
+
}
|
|
239
|
+
} catch (z) {
|
|
240
|
+
if (z && R && typeof z.stack == "string") {
|
|
241
|
+
for (var F = z.stack.split(`
|
|
242
|
+
`), J = R.stack.split(`
|
|
243
|
+
`), Y = F.length - 1, K = J.length - 1; Y >= 1 && K >= 0 && F[Y] !== J[K]; )
|
|
244
|
+
K--;
|
|
245
|
+
for (; Y >= 1 && K >= 0; Y--, K--)
|
|
246
|
+
if (F[Y] !== J[K]) {
|
|
247
|
+
if (Y !== 1 || K !== 1)
|
|
248
|
+
do
|
|
249
|
+
if (Y--, K--, K < 0 || F[Y] !== J[K]) {
|
|
250
|
+
var he = `
|
|
251
|
+
` + F[Y].replace(" at new ", " at ");
|
|
252
|
+
return s.displayName && he.includes("<anonymous>") && (he = he.replace("<anonymous>", s.displayName)), typeof s == "function" && Ee.set(s, he), he;
|
|
253
|
+
}
|
|
254
|
+
while (Y >= 1 && K >= 0);
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
} finally {
|
|
259
|
+
le = !1, oe.current = V, Pe(), Error.prepareStackTrace = M;
|
|
260
|
+
}
|
|
261
|
+
var Be = s ? s.displayName || s.name : "", Ne = Be ? de(Be) : "";
|
|
262
|
+
return typeof s == "function" && Ee.set(s, Ne), Ne;
|
|
263
|
+
}
|
|
264
|
+
function nt(s, h, x) {
|
|
265
|
+
return Z(s, !1);
|
|
266
|
+
}
|
|
267
|
+
function rt(s) {
|
|
268
|
+
var h = s.prototype;
|
|
269
|
+
return !!(h && h.isReactComponent);
|
|
270
|
+
}
|
|
271
|
+
function He(s, h, x) {
|
|
272
|
+
if (s == null)
|
|
273
|
+
return "";
|
|
274
|
+
if (typeof s == "function")
|
|
275
|
+
return Z(s, rt(s));
|
|
276
|
+
if (typeof s == "string")
|
|
277
|
+
return de(s);
|
|
278
|
+
switch (s) {
|
|
279
|
+
case f:
|
|
280
|
+
return de("Suspense");
|
|
281
|
+
case d:
|
|
282
|
+
return de("SuspenseList");
|
|
283
|
+
}
|
|
284
|
+
if (typeof s == "object")
|
|
285
|
+
switch (s.$$typeof) {
|
|
286
|
+
case c:
|
|
287
|
+
return nt(s.render);
|
|
288
|
+
case g:
|
|
289
|
+
return He(s.type, h, x);
|
|
290
|
+
case y: {
|
|
291
|
+
var R = s, M = R._payload, V = R._init;
|
|
292
|
+
try {
|
|
293
|
+
return He(V(M), h, x);
|
|
294
|
+
} catch {
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return "";
|
|
299
|
+
}
|
|
300
|
+
var Ie = Object.prototype.hasOwnProperty, ot = {}, U = P.ReactDebugCurrentFrame;
|
|
301
|
+
function at(s) {
|
|
302
|
+
if (s) {
|
|
303
|
+
var h = s._owner, x = He(s.type, s._source, h ? h.type : null);
|
|
304
|
+
U.setExtraStackFrame(x);
|
|
305
|
+
} else
|
|
306
|
+
U.setExtraStackFrame(null);
|
|
307
|
+
}
|
|
308
|
+
function it(s, h, x, R, M) {
|
|
309
|
+
{
|
|
310
|
+
var V = Function.call.bind(Ie);
|
|
311
|
+
for (var D in s)
|
|
312
|
+
if (V(s, D)) {
|
|
313
|
+
var F = void 0;
|
|
314
|
+
try {
|
|
315
|
+
if (typeof s[D] != "function") {
|
|
316
|
+
var J = Error((R || "React class") + ": " + x + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
317
|
+
throw J.name = "Invariant Violation", J;
|
|
318
|
+
}
|
|
319
|
+
F = s[D](h, D, R, x, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
320
|
+
} catch (Y) {
|
|
321
|
+
F = Y;
|
|
322
|
+
}
|
|
323
|
+
F && !(F instanceof Error) && (at(M), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", R || "React class", x, D, typeof F), at(null)), F instanceof Error && !(F.message in ot) && (ot[F.message] = !0, at(M), C("Failed %s type: %s", x, F.message), at(null));
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
var Yt = Array.isArray;
|
|
328
|
+
function st(s) {
|
|
329
|
+
return Yt(s);
|
|
330
|
+
}
|
|
331
|
+
function Ut(s) {
|
|
332
|
+
{
|
|
333
|
+
var h = typeof Symbol == "function" && Symbol.toStringTag, x = h && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
334
|
+
return x;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
function Kt(s) {
|
|
338
|
+
try {
|
|
339
|
+
return Qt(s), !1;
|
|
340
|
+
} catch {
|
|
341
|
+
return !0;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function Qt(s) {
|
|
345
|
+
return "" + s;
|
|
346
|
+
}
|
|
347
|
+
function Jt(s) {
|
|
348
|
+
if (Kt(s))
|
|
349
|
+
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ut(s)), Qt(s);
|
|
350
|
+
}
|
|
351
|
+
var Ot = P.ReactCurrentOwner, Pt = {
|
|
352
|
+
key: !0,
|
|
353
|
+
ref: !0,
|
|
354
|
+
__self: !0,
|
|
355
|
+
__source: !0
|
|
356
|
+
}, Xt, Zt;
|
|
357
|
+
function en(s) {
|
|
358
|
+
if (Ie.call(s, "ref")) {
|
|
359
|
+
var h = Object.getOwnPropertyDescriptor(s, "ref").get;
|
|
360
|
+
if (h && h.isReactWarning)
|
|
361
|
+
return !1;
|
|
362
|
+
}
|
|
363
|
+
return s.ref !== void 0;
|
|
364
|
+
}
|
|
365
|
+
function tn(s) {
|
|
366
|
+
if (Ie.call(s, "key")) {
|
|
367
|
+
var h = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
368
|
+
if (h && h.isReactWarning)
|
|
369
|
+
return !1;
|
|
370
|
+
}
|
|
371
|
+
return s.key !== void 0;
|
|
372
|
+
}
|
|
373
|
+
function Ln(s, h) {
|
|
374
|
+
typeof s.ref == "string" && Ot.current;
|
|
375
|
+
}
|
|
376
|
+
function Mn(s, h) {
|
|
377
|
+
{
|
|
378
|
+
var x = function() {
|
|
379
|
+
Xt || (Xt = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
380
|
+
};
|
|
381
|
+
x.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
382
|
+
get: x,
|
|
383
|
+
configurable: !0
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function nn(s, h) {
|
|
388
|
+
{
|
|
389
|
+
var x = function() {
|
|
390
|
+
Zt || (Zt = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
391
|
+
};
|
|
392
|
+
x.isReactWarning = !0, Object.defineProperty(s, "ref", {
|
|
393
|
+
get: x,
|
|
394
|
+
configurable: !0
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
var Hn = function(s, h, x, R, M, V, D) {
|
|
399
|
+
var F = {
|
|
400
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
401
|
+
$$typeof: t,
|
|
402
|
+
// Built-in properties that belong on the element
|
|
403
|
+
type: s,
|
|
404
|
+
key: h,
|
|
405
|
+
ref: x,
|
|
406
|
+
props: D,
|
|
407
|
+
// Record the component responsible for creating this element.
|
|
408
|
+
_owner: V
|
|
409
|
+
};
|
|
410
|
+
return F._store = {}, Object.defineProperty(F._store, "validated", {
|
|
411
|
+
configurable: !1,
|
|
412
|
+
enumerable: !1,
|
|
413
|
+
writable: !0,
|
|
414
|
+
value: !1
|
|
415
|
+
}), Object.defineProperty(F, "_self", {
|
|
416
|
+
configurable: !1,
|
|
417
|
+
enumerable: !1,
|
|
418
|
+
writable: !1,
|
|
419
|
+
value: R
|
|
420
|
+
}), Object.defineProperty(F, "_source", {
|
|
421
|
+
configurable: !1,
|
|
422
|
+
enumerable: !1,
|
|
423
|
+
writable: !1,
|
|
424
|
+
value: M
|
|
425
|
+
}), Object.freeze && (Object.freeze(F.props), Object.freeze(F)), F;
|
|
426
|
+
};
|
|
427
|
+
function zn(s, h, x, R, M) {
|
|
428
|
+
{
|
|
429
|
+
var V, D = {}, F = null, J = null;
|
|
430
|
+
x !== void 0 && (Jt(x), F = "" + x), tn(h) && (Jt(h.key), F = "" + h.key), en(h) && (J = h.ref, Ln(h, M));
|
|
431
|
+
for (V in h)
|
|
432
|
+
Ie.call(h, V) && !Pt.hasOwnProperty(V) && (D[V] = h[V]);
|
|
433
|
+
if (s && s.defaultProps) {
|
|
434
|
+
var Y = s.defaultProps;
|
|
435
|
+
for (V in Y)
|
|
436
|
+
D[V] === void 0 && (D[V] = Y[V]);
|
|
437
|
+
}
|
|
438
|
+
if (F || J) {
|
|
439
|
+
var K = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
|
|
440
|
+
F && Mn(D, K), J && nn(D, K);
|
|
441
|
+
}
|
|
442
|
+
return Hn(s, F, J, M, R, Ot.current, D);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
var jt = P.ReactCurrentOwner, kt = P.ReactDebugCurrentFrame;
|
|
446
|
+
function ze(s) {
|
|
447
|
+
if (s) {
|
|
448
|
+
var h = s._owner, x = He(s.type, s._source, h ? h.type : null);
|
|
449
|
+
kt.setExtraStackFrame(x);
|
|
450
|
+
} else
|
|
451
|
+
kt.setExtraStackFrame(null);
|
|
452
|
+
}
|
|
453
|
+
var lt;
|
|
454
|
+
lt = !1;
|
|
455
|
+
function ct(s) {
|
|
456
|
+
return typeof s == "object" && s !== null && s.$$typeof === t;
|
|
457
|
+
}
|
|
458
|
+
function We() {
|
|
459
|
+
{
|
|
460
|
+
if (jt.current) {
|
|
461
|
+
var s = H(jt.current.type);
|
|
462
|
+
if (s)
|
|
463
|
+
return `
|
|
464
|
+
|
|
465
|
+
Check the render method of \`` + s + "`.";
|
|
466
|
+
}
|
|
467
|
+
return "";
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
function Wn(s) {
|
|
471
|
+
return "";
|
|
472
|
+
}
|
|
473
|
+
var rn = {};
|
|
474
|
+
function on(s) {
|
|
475
|
+
{
|
|
476
|
+
var h = We();
|
|
477
|
+
if (!h) {
|
|
478
|
+
var x = typeof s == "string" ? s : s.displayName || s.name;
|
|
479
|
+
x && (h = `
|
|
480
|
+
|
|
481
|
+
Check the top-level render call using <` + x + ">.");
|
|
482
|
+
}
|
|
483
|
+
return h;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
function Tt(s, h) {
|
|
487
|
+
{
|
|
488
|
+
if (!s._store || s._store.validated || s.key != null)
|
|
489
|
+
return;
|
|
490
|
+
s._store.validated = !0;
|
|
491
|
+
var x = on(h);
|
|
492
|
+
if (rn[x])
|
|
493
|
+
return;
|
|
494
|
+
rn[x] = !0;
|
|
495
|
+
var R = "";
|
|
496
|
+
s && s._owner && s._owner !== jt.current && (R = " It was passed a child from " + H(s._owner.type) + "."), ze(s), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, R), ze(null);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
function _t(s, h) {
|
|
500
|
+
{
|
|
501
|
+
if (typeof s != "object")
|
|
502
|
+
return;
|
|
503
|
+
if (st(s))
|
|
504
|
+
for (var x = 0; x < s.length; x++) {
|
|
505
|
+
var R = s[x];
|
|
506
|
+
ct(R) && Tt(R, h);
|
|
507
|
+
}
|
|
508
|
+
else if (ct(s))
|
|
509
|
+
s._store && (s._store.validated = !0);
|
|
510
|
+
else if (s) {
|
|
511
|
+
var M = $(s);
|
|
512
|
+
if (typeof M == "function" && M !== s.entries)
|
|
513
|
+
for (var V = M.call(s), D; !(D = V.next()).done; )
|
|
514
|
+
ct(D.value) && Tt(D.value, h);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
function an(s) {
|
|
519
|
+
{
|
|
520
|
+
var h = s.type;
|
|
521
|
+
if (h == null || typeof h == "string")
|
|
522
|
+
return;
|
|
523
|
+
var x;
|
|
524
|
+
if (typeof h == "function")
|
|
525
|
+
x = h.propTypes;
|
|
526
|
+
else if (typeof h == "object" && (h.$$typeof === c || // Note: Memo only checks outer props here.
|
|
527
|
+
// Inner props are checked in the reconciler.
|
|
528
|
+
h.$$typeof === g))
|
|
529
|
+
x = h.propTypes;
|
|
530
|
+
else
|
|
531
|
+
return;
|
|
532
|
+
if (x) {
|
|
533
|
+
var R = H(h);
|
|
534
|
+
it(x, s.props, "prop", R, s);
|
|
535
|
+
} else if (h.PropTypes !== void 0 && !lt) {
|
|
536
|
+
lt = !0;
|
|
537
|
+
var M = H(h);
|
|
538
|
+
C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
|
|
539
|
+
}
|
|
540
|
+
typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
function sn(s) {
|
|
544
|
+
{
|
|
545
|
+
for (var h = Object.keys(s.props), x = 0; x < h.length; x++) {
|
|
546
|
+
var R = h[x];
|
|
547
|
+
if (R !== "children" && R !== "key") {
|
|
548
|
+
ze(s), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", R), ze(null);
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
s.ref !== null && (ze(s), C("Invalid attribute `ref` supplied to `React.Fragment`."), ze(null));
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
var Dt = {};
|
|
556
|
+
function At(s, h, x, R, M, V) {
|
|
557
|
+
{
|
|
558
|
+
var D = re(s);
|
|
559
|
+
if (!D) {
|
|
560
|
+
var F = "";
|
|
561
|
+
(s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (F += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
562
|
+
var J = Wn();
|
|
563
|
+
J ? F += J : F += We();
|
|
564
|
+
var Y;
|
|
565
|
+
s === null ? Y = "null" : st(s) ? Y = "array" : s !== void 0 && s.$$typeof === t ? (Y = "<" + (H(s.type) || "Unknown") + " />", F = " Did you accidentally export a JSX literal instead of a component?") : Y = typeof s, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Y, F);
|
|
566
|
+
}
|
|
567
|
+
var K = zn(s, h, x, M, V);
|
|
568
|
+
if (K == null)
|
|
569
|
+
return K;
|
|
570
|
+
if (D) {
|
|
571
|
+
var he = h.children;
|
|
572
|
+
if (he !== void 0)
|
|
573
|
+
if (R)
|
|
574
|
+
if (st(he)) {
|
|
575
|
+
for (var Be = 0; Be < he.length; Be++)
|
|
576
|
+
_t(he[Be], s);
|
|
577
|
+
Object.freeze && Object.freeze(he);
|
|
578
|
+
} else
|
|
579
|
+
C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
580
|
+
else
|
|
581
|
+
_t(he, s);
|
|
582
|
+
}
|
|
583
|
+
if (Ie.call(h, "key")) {
|
|
584
|
+
var Ne = H(s), z = Object.keys(h).filter(function(Gn) {
|
|
585
|
+
return Gn !== "key";
|
|
586
|
+
}), Fe = z.length > 0 ? "{key: someKey, " + z.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
587
|
+
if (!Dt[Ne + Fe]) {
|
|
588
|
+
var qn = z.length > 0 ? "{" + z.join(": ..., ") + ": ...}" : "{}";
|
|
589
|
+
C(`A props object containing a "key" prop is being spread into JSX:
|
|
590
|
+
let props = %s;
|
|
591
|
+
<%s {...props} />
|
|
592
|
+
React keys must be passed directly to JSX without using spread:
|
|
593
|
+
let props = %s;
|
|
594
|
+
<%s key={someKey} {...props} />`, Fe, Ne, qn, Ne), Dt[Ne + Fe] = !0;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return s === r ? sn(K) : an(K), K;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
function Bn(s, h, x) {
|
|
601
|
+
return At(s, h, x, !0);
|
|
602
|
+
}
|
|
603
|
+
function Vn(s, h, x) {
|
|
604
|
+
return At(s, h, x, !1);
|
|
605
|
+
}
|
|
606
|
+
var _e = Vn, we = Bn;
|
|
607
|
+
Nt.Fragment = r, Nt.jsx = _e, Nt.jsxs = we;
|
|
608
|
+
})()), Nt;
|
|
609
|
+
}
|
|
610
|
+
var Tr;
|
|
611
|
+
function xa() {
|
|
612
|
+
return Tr || (Tr = 1, process.env.NODE_ENV === "production" ? ln.exports = va() : ln.exports = wa()), ln.exports;
|
|
613
|
+
}
|
|
614
|
+
var p = xa(), ce = function() {
|
|
615
|
+
return ce = Object.assign || function(t) {
|
|
616
|
+
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
617
|
+
n = arguments[r];
|
|
618
|
+
for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
|
|
619
|
+
}
|
|
620
|
+
return t;
|
|
621
|
+
}, ce.apply(this, arguments);
|
|
622
|
+
};
|
|
623
|
+
function ht(e, t, n) {
|
|
624
|
+
if (n || arguments.length === 2) for (var r = 0, o = t.length, a; r < o; r++)
|
|
625
|
+
(a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
|
|
626
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
627
|
+
}
|
|
628
|
+
function Sa(e) {
|
|
629
|
+
var t = /* @__PURE__ */ Object.create(null);
|
|
630
|
+
return function(n) {
|
|
631
|
+
return t[n] === void 0 && (t[n] = e(n)), t[n];
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
var Ca = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Ea = /* @__PURE__ */ Sa(
|
|
635
|
+
function(e) {
|
|
636
|
+
return Ca.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
|
|
637
|
+
}
|
|
638
|
+
/* Z+1 */
|
|
639
|
+
), G = "-ms-", Mt = "-moz-", B = "-webkit-", fo = "comm", kn = "rule", hr = "decl", Ra = "@import", go = "@keyframes", $a = "@layer", ho = Math.abs, mr = String.fromCharCode, ar = Object.assign;
|
|
640
|
+
function Oa(e, t) {
|
|
641
|
+
return ne(e, 0) ^ 45 ? (((t << 2 ^ ne(e, 0)) << 2 ^ ne(e, 1)) << 2 ^ ne(e, 2)) << 2 ^ ne(e, 3) : 0;
|
|
642
|
+
}
|
|
643
|
+
function mo(e) {
|
|
644
|
+
return e.trim();
|
|
645
|
+
}
|
|
646
|
+
function Le(e, t) {
|
|
647
|
+
return (e = t.exec(e)) ? e[0] : e;
|
|
648
|
+
}
|
|
649
|
+
function I(e, t, n) {
|
|
650
|
+
return e.replace(t, n);
|
|
651
|
+
}
|
|
652
|
+
function bn(e, t, n) {
|
|
653
|
+
return e.indexOf(t, n);
|
|
654
|
+
}
|
|
655
|
+
function ne(e, t) {
|
|
656
|
+
return e.charCodeAt(t) | 0;
|
|
657
|
+
}
|
|
658
|
+
function mt(e, t, n) {
|
|
659
|
+
return e.slice(t, n);
|
|
660
|
+
}
|
|
661
|
+
function De(e) {
|
|
662
|
+
return e.length;
|
|
663
|
+
}
|
|
664
|
+
function bo(e) {
|
|
665
|
+
return e.length;
|
|
666
|
+
}
|
|
667
|
+
function Ft(e, t) {
|
|
668
|
+
return t.push(e), e;
|
|
669
|
+
}
|
|
670
|
+
function Pa(e, t) {
|
|
671
|
+
return e.map(t).join("");
|
|
672
|
+
}
|
|
673
|
+
function _r(e, t) {
|
|
674
|
+
return e.filter(function(n) {
|
|
675
|
+
return !Le(n, t);
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
var Tn = 1, bt = 1, yo = 0, Re = 0, X = 0, Et = "";
|
|
679
|
+
function _n(e, t, n, r, o, a, i, l) {
|
|
680
|
+
return { value: e, root: t, parent: n, type: r, props: o, children: a, line: Tn, column: bt, length: i, return: "", siblings: l };
|
|
681
|
+
}
|
|
682
|
+
function qe(e, t) {
|
|
683
|
+
return ar(_n("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
|
|
684
|
+
}
|
|
685
|
+
function pt(e) {
|
|
686
|
+
for (; e.root; )
|
|
687
|
+
e = qe(e.root, { children: [e] });
|
|
688
|
+
Ft(e, e.siblings);
|
|
689
|
+
}
|
|
690
|
+
function ja() {
|
|
691
|
+
return X;
|
|
692
|
+
}
|
|
693
|
+
function ka() {
|
|
694
|
+
return X = Re > 0 ? ne(Et, --Re) : 0, bt--, X === 10 && (bt = 1, Tn--), X;
|
|
695
|
+
}
|
|
696
|
+
function ke() {
|
|
697
|
+
return X = Re < yo ? ne(Et, Re++) : 0, bt++, X === 10 && (bt = 1, Tn++), X;
|
|
698
|
+
}
|
|
699
|
+
function Qe() {
|
|
700
|
+
return ne(Et, Re);
|
|
701
|
+
}
|
|
702
|
+
function yn() {
|
|
703
|
+
return Re;
|
|
704
|
+
}
|
|
705
|
+
function Dn(e, t) {
|
|
706
|
+
return mt(Et, e, t);
|
|
707
|
+
}
|
|
708
|
+
function ir(e) {
|
|
709
|
+
switch (e) {
|
|
710
|
+
// \0 \t \n \r \s whitespace token
|
|
711
|
+
case 0:
|
|
712
|
+
case 9:
|
|
713
|
+
case 10:
|
|
714
|
+
case 13:
|
|
715
|
+
case 32:
|
|
716
|
+
return 5;
|
|
717
|
+
// ! + , / > @ ~ isolate token
|
|
718
|
+
case 33:
|
|
719
|
+
case 43:
|
|
720
|
+
case 44:
|
|
721
|
+
case 47:
|
|
722
|
+
case 62:
|
|
723
|
+
case 64:
|
|
724
|
+
case 126:
|
|
725
|
+
// ; { } breakpoint token
|
|
726
|
+
case 59:
|
|
727
|
+
case 123:
|
|
728
|
+
case 125:
|
|
729
|
+
return 4;
|
|
730
|
+
// : accompanied token
|
|
731
|
+
case 58:
|
|
732
|
+
return 3;
|
|
733
|
+
// " ' ( [ opening delimit token
|
|
734
|
+
case 34:
|
|
735
|
+
case 39:
|
|
736
|
+
case 40:
|
|
737
|
+
case 91:
|
|
738
|
+
return 2;
|
|
739
|
+
// ) ] closing delimit token
|
|
740
|
+
case 41:
|
|
741
|
+
case 93:
|
|
742
|
+
return 1;
|
|
743
|
+
}
|
|
744
|
+
return 0;
|
|
745
|
+
}
|
|
746
|
+
function Ta(e) {
|
|
747
|
+
return Tn = bt = 1, yo = De(Et = e), Re = 0, [];
|
|
748
|
+
}
|
|
749
|
+
function _a(e) {
|
|
750
|
+
return Et = "", e;
|
|
751
|
+
}
|
|
752
|
+
function Kn(e) {
|
|
753
|
+
return mo(Dn(Re - 1, sr(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
754
|
+
}
|
|
755
|
+
function Da(e) {
|
|
756
|
+
for (; (X = Qe()) && X < 33; )
|
|
757
|
+
ke();
|
|
758
|
+
return ir(e) > 2 || ir(X) > 3 ? "" : " ";
|
|
759
|
+
}
|
|
760
|
+
function Aa(e, t) {
|
|
761
|
+
for (; --t && ke() && !(X < 48 || X > 102 || X > 57 && X < 65 || X > 70 && X < 97); )
|
|
762
|
+
;
|
|
763
|
+
return Dn(e, yn() + (t < 6 && Qe() == 32 && ke() == 32));
|
|
764
|
+
}
|
|
765
|
+
function sr(e) {
|
|
766
|
+
for (; ke(); )
|
|
767
|
+
switch (X) {
|
|
768
|
+
// ] ) " '
|
|
769
|
+
case e:
|
|
770
|
+
return Re;
|
|
771
|
+
// " '
|
|
772
|
+
case 34:
|
|
773
|
+
case 39:
|
|
774
|
+
e !== 34 && e !== 39 && sr(X);
|
|
775
|
+
break;
|
|
776
|
+
// (
|
|
777
|
+
case 40:
|
|
778
|
+
e === 41 && sr(e);
|
|
779
|
+
break;
|
|
780
|
+
// \
|
|
781
|
+
case 92:
|
|
782
|
+
ke();
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
return Re;
|
|
786
|
+
}
|
|
787
|
+
function Ia(e, t) {
|
|
788
|
+
for (; ke() && e + X !== 57; )
|
|
789
|
+
if (e + X === 84 && Qe() === 47)
|
|
790
|
+
break;
|
|
791
|
+
return "/*" + Dn(t, Re - 1) + "*" + mr(e === 47 ? e : ke());
|
|
792
|
+
}
|
|
793
|
+
function Na(e) {
|
|
794
|
+
for (; !ir(Qe()); )
|
|
795
|
+
ke();
|
|
796
|
+
return Dn(e, Re);
|
|
797
|
+
}
|
|
798
|
+
function Fa(e) {
|
|
799
|
+
return _a(vn("", null, null, null, [""], e = Ta(e), 0, [0], e));
|
|
800
|
+
}
|
|
801
|
+
function vn(e, t, n, r, o, a, i, l, c) {
|
|
802
|
+
for (var f = 0, d = 0, g = i, y = 0, b = 0, E = 0, S = 1, $ = 1, P = 1, C = 0, O = "", j = o, _ = a, w = r, v = O; $; )
|
|
803
|
+
switch (E = C, C = ke()) {
|
|
804
|
+
// (
|
|
805
|
+
case 40:
|
|
806
|
+
if (E != 108 && ne(v, g - 1) == 58) {
|
|
807
|
+
bn(v += I(Kn(C), "&", "&\f"), "&\f", ho(f ? l[f - 1] : 0)) != -1 && (P = -1);
|
|
808
|
+
break;
|
|
809
|
+
}
|
|
810
|
+
// " ' [
|
|
811
|
+
case 34:
|
|
812
|
+
case 39:
|
|
813
|
+
case 91:
|
|
814
|
+
v += Kn(C);
|
|
815
|
+
break;
|
|
816
|
+
// \t \n \r \s
|
|
817
|
+
case 9:
|
|
818
|
+
case 10:
|
|
819
|
+
case 13:
|
|
820
|
+
case 32:
|
|
821
|
+
v += Da(E);
|
|
822
|
+
break;
|
|
823
|
+
// \
|
|
824
|
+
case 92:
|
|
825
|
+
v += Aa(yn() - 1, 7);
|
|
826
|
+
continue;
|
|
827
|
+
// /
|
|
828
|
+
case 47:
|
|
829
|
+
switch (Qe()) {
|
|
830
|
+
case 42:
|
|
831
|
+
case 47:
|
|
832
|
+
Ft(La(Ia(ke(), yn()), t, n, c), c);
|
|
833
|
+
break;
|
|
834
|
+
default:
|
|
835
|
+
v += "/";
|
|
836
|
+
}
|
|
837
|
+
break;
|
|
838
|
+
// {
|
|
839
|
+
case 123 * S:
|
|
840
|
+
l[f++] = De(v) * P;
|
|
841
|
+
// } ; \0
|
|
842
|
+
case 125 * S:
|
|
843
|
+
case 59:
|
|
844
|
+
case 0:
|
|
845
|
+
switch (C) {
|
|
846
|
+
// \0 }
|
|
847
|
+
case 0:
|
|
848
|
+
case 125:
|
|
849
|
+
$ = 0;
|
|
850
|
+
// ;
|
|
851
|
+
case 59 + d:
|
|
852
|
+
P == -1 && (v = I(v, /\f/g, "")), b > 0 && De(v) - g && Ft(b > 32 ? Ar(v + ";", r, n, g - 1, c) : Ar(I(v, " ", "") + ";", r, n, g - 2, c), c);
|
|
853
|
+
break;
|
|
854
|
+
// @ ;
|
|
855
|
+
case 59:
|
|
856
|
+
v += ";";
|
|
857
|
+
// { rule/at-rule
|
|
858
|
+
default:
|
|
859
|
+
if (Ft(w = Dr(v, t, n, f, d, o, l, O, j = [], _ = [], g, a), a), C === 123)
|
|
860
|
+
if (d === 0)
|
|
861
|
+
vn(v, t, w, w, j, a, g, l, _);
|
|
862
|
+
else
|
|
863
|
+
switch (y === 99 && ne(v, 3) === 110 ? 100 : y) {
|
|
864
|
+
// d l m s
|
|
865
|
+
case 100:
|
|
866
|
+
case 108:
|
|
867
|
+
case 109:
|
|
868
|
+
case 115:
|
|
869
|
+
vn(e, w, w, r && Ft(Dr(e, w, w, 0, 0, o, l, O, o, j = [], g, _), _), o, _, g, l, r ? j : _);
|
|
870
|
+
break;
|
|
871
|
+
default:
|
|
872
|
+
vn(v, w, w, w, [""], _, 0, l, _);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
f = d = b = 0, S = P = 1, O = v = "", g = i;
|
|
876
|
+
break;
|
|
877
|
+
// :
|
|
878
|
+
case 58:
|
|
879
|
+
g = 1 + De(v), b = E;
|
|
880
|
+
default:
|
|
881
|
+
if (S < 1) {
|
|
882
|
+
if (C == 123)
|
|
883
|
+
--S;
|
|
884
|
+
else if (C == 125 && S++ == 0 && ka() == 125)
|
|
885
|
+
continue;
|
|
886
|
+
}
|
|
887
|
+
switch (v += mr(C), C * S) {
|
|
888
|
+
// &
|
|
889
|
+
case 38:
|
|
890
|
+
P = d > 0 ? 1 : (v += "\f", -1);
|
|
891
|
+
break;
|
|
892
|
+
// ,
|
|
893
|
+
case 44:
|
|
894
|
+
l[f++] = (De(v) - 1) * P, P = 1;
|
|
895
|
+
break;
|
|
896
|
+
// @
|
|
897
|
+
case 64:
|
|
898
|
+
Qe() === 45 && (v += Kn(ke())), y = Qe(), d = g = De(O = v += Na(yn())), C++;
|
|
899
|
+
break;
|
|
900
|
+
// -
|
|
901
|
+
case 45:
|
|
902
|
+
E === 45 && De(v) == 2 && (S = 0);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
return a;
|
|
906
|
+
}
|
|
907
|
+
function Dr(e, t, n, r, o, a, i, l, c, f, d, g) {
|
|
908
|
+
for (var y = o - 1, b = o === 0 ? a : [""], E = bo(b), S = 0, $ = 0, P = 0; S < r; ++S)
|
|
909
|
+
for (var C = 0, O = mt(e, y + 1, y = ho($ = i[S])), j = e; C < E; ++C)
|
|
910
|
+
(j = mo($ > 0 ? b[C] + " " + O : I(O, /&\f/g, b[C]))) && (c[P++] = j);
|
|
911
|
+
return _n(e, t, n, o === 0 ? kn : l, c, f, d, g);
|
|
912
|
+
}
|
|
913
|
+
function La(e, t, n, r) {
|
|
914
|
+
return _n(e, t, n, fo, mr(ja()), mt(e, 2, -2), 0, r);
|
|
915
|
+
}
|
|
916
|
+
function Ar(e, t, n, r, o) {
|
|
917
|
+
return _n(e, t, n, hr, mt(e, 0, r), mt(e, r + 1, -1), r, o);
|
|
918
|
+
}
|
|
919
|
+
function vo(e, t, n) {
|
|
920
|
+
switch (Oa(e, t)) {
|
|
921
|
+
// color-adjust
|
|
922
|
+
case 5103:
|
|
923
|
+
return B + "print-" + e + e;
|
|
924
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
925
|
+
case 5737:
|
|
926
|
+
case 4201:
|
|
927
|
+
case 3177:
|
|
928
|
+
case 3433:
|
|
929
|
+
case 1641:
|
|
930
|
+
case 4457:
|
|
931
|
+
case 2921:
|
|
932
|
+
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
933
|
+
case 5572:
|
|
934
|
+
case 6356:
|
|
935
|
+
case 5844:
|
|
936
|
+
case 3191:
|
|
937
|
+
case 6645:
|
|
938
|
+
case 3005:
|
|
939
|
+
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
940
|
+
case 6391:
|
|
941
|
+
case 5879:
|
|
942
|
+
case 5623:
|
|
943
|
+
case 6135:
|
|
944
|
+
case 4599:
|
|
945
|
+
case 4855:
|
|
946
|
+
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
947
|
+
case 4215:
|
|
948
|
+
case 6389:
|
|
949
|
+
case 5109:
|
|
950
|
+
case 5365:
|
|
951
|
+
case 5621:
|
|
952
|
+
case 3829:
|
|
953
|
+
return B + e + e;
|
|
954
|
+
// tab-size
|
|
955
|
+
case 4789:
|
|
956
|
+
return Mt + e + e;
|
|
957
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
958
|
+
case 5349:
|
|
959
|
+
case 4246:
|
|
960
|
+
case 4810:
|
|
961
|
+
case 6968:
|
|
962
|
+
case 2756:
|
|
963
|
+
return B + e + Mt + e + G + e + e;
|
|
964
|
+
// writing-mode
|
|
965
|
+
case 5936:
|
|
966
|
+
switch (ne(e, t + 11)) {
|
|
967
|
+
// vertical-l(r)
|
|
968
|
+
case 114:
|
|
969
|
+
return B + e + G + I(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
970
|
+
// vertical-r(l)
|
|
971
|
+
case 108:
|
|
972
|
+
return B + e + G + I(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
973
|
+
// horizontal(-)tb
|
|
974
|
+
case 45:
|
|
975
|
+
return B + e + G + I(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
976
|
+
}
|
|
977
|
+
// flex, flex-direction, scroll-snap-type, writing-mode
|
|
978
|
+
case 6828:
|
|
979
|
+
case 4268:
|
|
980
|
+
case 2903:
|
|
981
|
+
return B + e + G + e + e;
|
|
982
|
+
// order
|
|
983
|
+
case 6165:
|
|
984
|
+
return B + e + G + "flex-" + e + e;
|
|
985
|
+
// align-items
|
|
986
|
+
case 5187:
|
|
987
|
+
return B + e + I(e, /(\w+).+(:[^]+)/, B + "box-$1$2" + G + "flex-$1$2") + e;
|
|
988
|
+
// align-self
|
|
989
|
+
case 5443:
|
|
990
|
+
return B + e + G + "flex-item-" + I(e, /flex-|-self/g, "") + (Le(e, /flex-|baseline/) ? "" : G + "grid-row-" + I(e, /flex-|-self/g, "")) + e;
|
|
991
|
+
// align-content
|
|
992
|
+
case 4675:
|
|
993
|
+
return B + e + G + "flex-line-pack" + I(e, /align-content|flex-|-self/g, "") + e;
|
|
994
|
+
// flex-shrink
|
|
995
|
+
case 5548:
|
|
996
|
+
return B + e + G + I(e, "shrink", "negative") + e;
|
|
997
|
+
// flex-basis
|
|
998
|
+
case 5292:
|
|
999
|
+
return B + e + G + I(e, "basis", "preferred-size") + e;
|
|
1000
|
+
// flex-grow
|
|
1001
|
+
case 6060:
|
|
1002
|
+
return B + "box-" + I(e, "-grow", "") + B + e + G + I(e, "grow", "positive") + e;
|
|
1003
|
+
// transition
|
|
1004
|
+
case 4554:
|
|
1005
|
+
return B + I(e, /([^-])(transform)/g, "$1" + B + "$2") + e;
|
|
1006
|
+
// cursor
|
|
1007
|
+
case 6187:
|
|
1008
|
+
return I(I(I(e, /(zoom-|grab)/, B + "$1"), /(image-set)/, B + "$1"), e, "") + e;
|
|
1009
|
+
// background, background-image
|
|
1010
|
+
case 5495:
|
|
1011
|
+
case 3959:
|
|
1012
|
+
return I(e, /(image-set\([^]*)/, B + "$1$`$1");
|
|
1013
|
+
// justify-content
|
|
1014
|
+
case 4968:
|
|
1015
|
+
return I(I(e, /(.+:)(flex-)?(.*)/, B + "box-pack:$3" + G + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + B + e + e;
|
|
1016
|
+
// justify-self
|
|
1017
|
+
case 4200:
|
|
1018
|
+
if (!Le(e, /flex-|baseline/)) return G + "grid-column-align" + mt(e, t) + e;
|
|
1019
|
+
break;
|
|
1020
|
+
// grid-template-(columns|rows)
|
|
1021
|
+
case 2592:
|
|
1022
|
+
case 3360:
|
|
1023
|
+
return G + I(e, "template-", "") + e;
|
|
1024
|
+
// grid-(row|column)-start
|
|
1025
|
+
case 4384:
|
|
1026
|
+
case 3616:
|
|
1027
|
+
return n && n.some(function(r, o) {
|
|
1028
|
+
return t = o, Le(r.props, /grid-\w+-end/);
|
|
1029
|
+
}) ? ~bn(e + (n = n[t].value), "span", 0) ? e : G + I(e, "-start", "") + e + G + "grid-row-span:" + (~bn(n, "span", 0) ? Le(n, /\d+/) : +Le(n, /\d+/) - +Le(e, /\d+/)) + ";" : G + I(e, "-start", "") + e;
|
|
1030
|
+
// grid-(row|column)-end
|
|
1031
|
+
case 4896:
|
|
1032
|
+
case 4128:
|
|
1033
|
+
return n && n.some(function(r) {
|
|
1034
|
+
return Le(r.props, /grid-\w+-start/);
|
|
1035
|
+
}) ? e : G + I(I(e, "-end", "-span"), "span ", "") + e;
|
|
1036
|
+
// (margin|padding)-inline-(start|end)
|
|
1037
|
+
case 4095:
|
|
1038
|
+
case 3583:
|
|
1039
|
+
case 4068:
|
|
1040
|
+
case 2532:
|
|
1041
|
+
return I(e, /(.+)-inline(.+)/, B + "$1$2") + e;
|
|
1042
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
1043
|
+
case 8116:
|
|
1044
|
+
case 7059:
|
|
1045
|
+
case 5753:
|
|
1046
|
+
case 5535:
|
|
1047
|
+
case 5445:
|
|
1048
|
+
case 5701:
|
|
1049
|
+
case 4933:
|
|
1050
|
+
case 4677:
|
|
1051
|
+
case 5533:
|
|
1052
|
+
case 5789:
|
|
1053
|
+
case 5021:
|
|
1054
|
+
case 4765:
|
|
1055
|
+
if (De(e) - 1 - t > 6)
|
|
1056
|
+
switch (ne(e, t + 1)) {
|
|
1057
|
+
// (m)ax-content, (m)in-content
|
|
1058
|
+
case 109:
|
|
1059
|
+
if (ne(e, t + 4) !== 45)
|
|
1060
|
+
break;
|
|
1061
|
+
// (f)ill-available, (f)it-content
|
|
1062
|
+
case 102:
|
|
1063
|
+
return I(e, /(.+:)(.+)-([^]+)/, "$1" + B + "$2-$3$1" + Mt + (ne(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
1064
|
+
// (s)tretch
|
|
1065
|
+
case 115:
|
|
1066
|
+
return ~bn(e, "stretch", 0) ? vo(I(e, "stretch", "fill-available"), t, n) + e : e;
|
|
1067
|
+
}
|
|
1068
|
+
break;
|
|
1069
|
+
// grid-(column|row)
|
|
1070
|
+
case 5152:
|
|
1071
|
+
case 5920:
|
|
1072
|
+
return I(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(r, o, a, i, l, c, f) {
|
|
1073
|
+
return G + o + ":" + a + f + (i ? G + o + "-span:" + (l ? c : +c - +a) + f : "") + e;
|
|
1074
|
+
});
|
|
1075
|
+
// position: sticky
|
|
1076
|
+
case 4949:
|
|
1077
|
+
if (ne(e, t + 6) === 121)
|
|
1078
|
+
return I(e, ":", ":" + B) + e;
|
|
1079
|
+
break;
|
|
1080
|
+
// display: (flex|inline-flex|grid|inline-grid)
|
|
1081
|
+
case 6444:
|
|
1082
|
+
switch (ne(e, ne(e, 14) === 45 ? 18 : 11)) {
|
|
1083
|
+
// (inline-)?fle(x)
|
|
1084
|
+
case 120:
|
|
1085
|
+
return I(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + B + (ne(e, 14) === 45 ? "inline-" : "") + "box$3$1" + B + "$2$3$1" + G + "$2box$3") + e;
|
|
1086
|
+
// (inline-)?gri(d)
|
|
1087
|
+
case 100:
|
|
1088
|
+
return I(e, ":", ":" + G) + e;
|
|
1089
|
+
}
|
|
1090
|
+
break;
|
|
1091
|
+
// scroll-margin, scroll-margin-(top|right|bottom|left)
|
|
1092
|
+
case 5719:
|
|
1093
|
+
case 2647:
|
|
1094
|
+
case 2135:
|
|
1095
|
+
case 3927:
|
|
1096
|
+
case 2391:
|
|
1097
|
+
return I(e, "scroll-", "scroll-snap-") + e;
|
|
1098
|
+
}
|
|
1099
|
+
return e;
|
|
1100
|
+
}
|
|
1101
|
+
function Rn(e, t) {
|
|
1102
|
+
for (var n = "", r = 0; r < e.length; r++)
|
|
1103
|
+
n += t(e[r], r, e, t) || "";
|
|
1104
|
+
return n;
|
|
1105
|
+
}
|
|
1106
|
+
function Ma(e, t, n, r) {
|
|
1107
|
+
switch (e.type) {
|
|
1108
|
+
case $a:
|
|
1109
|
+
if (e.children.length) break;
|
|
1110
|
+
case Ra:
|
|
1111
|
+
case hr:
|
|
1112
|
+
return e.return = e.return || e.value;
|
|
1113
|
+
case fo:
|
|
1114
|
+
return "";
|
|
1115
|
+
case go:
|
|
1116
|
+
return e.return = e.value + "{" + Rn(e.children, r) + "}";
|
|
1117
|
+
case kn:
|
|
1118
|
+
if (!De(e.value = e.props.join(","))) return "";
|
|
1119
|
+
}
|
|
1120
|
+
return De(n = Rn(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
|
|
1121
|
+
}
|
|
1122
|
+
function Ha(e) {
|
|
1123
|
+
var t = bo(e);
|
|
1124
|
+
return function(n, r, o, a) {
|
|
1125
|
+
for (var i = "", l = 0; l < t; l++)
|
|
1126
|
+
i += e[l](n, r, o, a) || "";
|
|
1127
|
+
return i;
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
function za(e) {
|
|
1131
|
+
return function(t) {
|
|
1132
|
+
t.root || (t = t.return) && e(t);
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
function Wa(e, t, n, r) {
|
|
1136
|
+
if (e.length > -1 && !e.return)
|
|
1137
|
+
switch (e.type) {
|
|
1138
|
+
case hr:
|
|
1139
|
+
e.return = vo(e.value, e.length, n);
|
|
1140
|
+
return;
|
|
1141
|
+
case go:
|
|
1142
|
+
return Rn([qe(e, { value: I(e.value, "@", "@" + B) })], r);
|
|
1143
|
+
case kn:
|
|
1144
|
+
if (e.length)
|
|
1145
|
+
return Pa(n = e.props, function(o) {
|
|
1146
|
+
switch (Le(o, r = /(::plac\w+|:read-\w+)/)) {
|
|
1147
|
+
// :read-(only|write)
|
|
1148
|
+
case ":read-only":
|
|
1149
|
+
case ":read-write":
|
|
1150
|
+
pt(qe(e, { props: [I(o, /:(read-\w+)/, ":" + Mt + "$1")] })), pt(qe(e, { props: [o] })), ar(e, { props: _r(n, r) });
|
|
1151
|
+
break;
|
|
1152
|
+
// :placeholder
|
|
1153
|
+
case "::placeholder":
|
|
1154
|
+
pt(qe(e, { props: [I(o, /:(plac\w+)/, ":" + B + "input-$1")] })), pt(qe(e, { props: [I(o, /:(plac\w+)/, ":" + Mt + "$1")] })), pt(qe(e, { props: [I(o, /:(plac\w+)/, G + "input-$1")] })), pt(qe(e, { props: [o] })), ar(e, { props: _r(n, r) });
|
|
1155
|
+
break;
|
|
1156
|
+
}
|
|
1157
|
+
return "";
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
var Ba = {
|
|
1162
|
+
animationIterationCount: 1,
|
|
1163
|
+
aspectRatio: 1,
|
|
1164
|
+
borderImageOutset: 1,
|
|
1165
|
+
borderImageSlice: 1,
|
|
1166
|
+
borderImageWidth: 1,
|
|
1167
|
+
boxFlex: 1,
|
|
1168
|
+
boxFlexGroup: 1,
|
|
1169
|
+
boxOrdinalGroup: 1,
|
|
1170
|
+
columnCount: 1,
|
|
1171
|
+
columns: 1,
|
|
1172
|
+
flex: 1,
|
|
1173
|
+
flexGrow: 1,
|
|
1174
|
+
flexPositive: 1,
|
|
1175
|
+
flexShrink: 1,
|
|
1176
|
+
flexNegative: 1,
|
|
1177
|
+
flexOrder: 1,
|
|
1178
|
+
gridRow: 1,
|
|
1179
|
+
gridRowEnd: 1,
|
|
1180
|
+
gridRowSpan: 1,
|
|
1181
|
+
gridRowStart: 1,
|
|
1182
|
+
gridColumn: 1,
|
|
1183
|
+
gridColumnEnd: 1,
|
|
1184
|
+
gridColumnSpan: 1,
|
|
1185
|
+
gridColumnStart: 1,
|
|
1186
|
+
msGridRow: 1,
|
|
1187
|
+
msGridRowSpan: 1,
|
|
1188
|
+
msGridColumn: 1,
|
|
1189
|
+
msGridColumnSpan: 1,
|
|
1190
|
+
fontWeight: 1,
|
|
1191
|
+
lineHeight: 1,
|
|
1192
|
+
opacity: 1,
|
|
1193
|
+
order: 1,
|
|
1194
|
+
orphans: 1,
|
|
1195
|
+
tabSize: 1,
|
|
1196
|
+
widows: 1,
|
|
1197
|
+
zIndex: 1,
|
|
1198
|
+
zoom: 1,
|
|
1199
|
+
WebkitLineClamp: 1,
|
|
1200
|
+
// SVG-related properties
|
|
1201
|
+
fillOpacity: 1,
|
|
1202
|
+
floodOpacity: 1,
|
|
1203
|
+
stopOpacity: 1,
|
|
1204
|
+
strokeDasharray: 1,
|
|
1205
|
+
strokeDashoffset: 1,
|
|
1206
|
+
strokeMiterlimit: 1,
|
|
1207
|
+
strokeOpacity: 1,
|
|
1208
|
+
strokeWidth: 1
|
|
1209
|
+
}, et = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", wo = "active", xo = "data-styled-version", An = "6.1.11", br = `/*!sc*/
|
|
1210
|
+
`, yr = typeof window < "u" && "HTMLElement" in window, Va = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), Ir = /invalid hook call/i, cn = /* @__PURE__ */ new Set(), qa = function(e, t) {
|
|
1211
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1212
|
+
var n = t ? ' with the id of "'.concat(t, '"') : "", r = "The component ".concat(e).concat(n, ` has been created dynamically.
|
|
1213
|
+
`) + `You may see this warning because you've called styled inside another component.
|
|
1214
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`, o = console.error;
|
|
1215
|
+
try {
|
|
1216
|
+
var a = !0;
|
|
1217
|
+
console.error = function(i) {
|
|
1218
|
+
for (var l = [], c = 1; c < arguments.length; c++) l[c - 1] = arguments[c];
|
|
1219
|
+
Ir.test(i) ? (a = !1, cn.delete(r)) : o.apply(void 0, ht([i], l, !1));
|
|
1220
|
+
}, Wt(), a && !cn.has(r) && (console.warn(r), cn.add(r));
|
|
1221
|
+
} catch (i) {
|
|
1222
|
+
Ir.test(i.message) && cn.delete(r);
|
|
1223
|
+
} finally {
|
|
1224
|
+
console.error = o;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}, In = Object.freeze([]), yt = Object.freeze({});
|
|
1228
|
+
function Ga(e, t, n) {
|
|
1229
|
+
return n === void 0 && (n = yt), e.theme !== n.theme && e.theme || t || n.theme;
|
|
1230
|
+
}
|
|
1231
|
+
var lr = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), Ya = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Ua = /(^-|-$)/g;
|
|
1232
|
+
function Nr(e) {
|
|
1233
|
+
return e.replace(Ya, "-").replace(Ua, "");
|
|
1234
|
+
}
|
|
1235
|
+
var Ka = /(a)(d)/gi, un = 52, Fr = function(e) {
|
|
1236
|
+
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
1237
|
+
};
|
|
1238
|
+
function cr(e) {
|
|
1239
|
+
var t, n = "";
|
|
1240
|
+
for (t = Math.abs(e); t > un; t = t / un | 0) n = Fr(t % un) + n;
|
|
1241
|
+
return (Fr(t % un) + n).replace(Ka, "$1-$2");
|
|
1242
|
+
}
|
|
1243
|
+
var Qn, So = 5381, Ue = function(e, t) {
|
|
1244
|
+
for (var n = t.length; n; ) e = 33 * e ^ t.charCodeAt(--n);
|
|
1245
|
+
return e;
|
|
1246
|
+
}, Co = function(e) {
|
|
1247
|
+
return Ue(So, e);
|
|
1248
|
+
};
|
|
1249
|
+
function Qa(e) {
|
|
1250
|
+
return cr(Co(e) >>> 0);
|
|
1251
|
+
}
|
|
1252
|
+
function Eo(e) {
|
|
1253
|
+
return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
|
|
1254
|
+
}
|
|
1255
|
+
function Jn(e) {
|
|
1256
|
+
return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
|
|
1257
|
+
}
|
|
1258
|
+
var Ro = typeof Symbol == "function" && Symbol.for, $o = Ro ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, Ja = Ro ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, Xa = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, Za = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, Oo = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, ei = ((Qn = {})[Ja] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, Qn[$o] = Oo, Qn);
|
|
1259
|
+
function Lr(e) {
|
|
1260
|
+
return ("type" in (t = e) && t.type.$$typeof) === $o ? Oo : "$$typeof" in e ? ei[e.$$typeof] : Xa;
|
|
1261
|
+
var t;
|
|
1262
|
+
}
|
|
1263
|
+
var ti = Object.defineProperty, ni = Object.getOwnPropertyNames, Mr = Object.getOwnPropertySymbols, ri = Object.getOwnPropertyDescriptor, oi = Object.getPrototypeOf, Hr = Object.prototype;
|
|
1264
|
+
function Po(e, t, n) {
|
|
1265
|
+
if (typeof t != "string") {
|
|
1266
|
+
if (Hr) {
|
|
1267
|
+
var r = oi(t);
|
|
1268
|
+
r && r !== Hr && Po(e, r, n);
|
|
1269
|
+
}
|
|
1270
|
+
var o = ni(t);
|
|
1271
|
+
Mr && (o = o.concat(Mr(t)));
|
|
1272
|
+
for (var a = Lr(e), i = Lr(t), l = 0; l < o.length; ++l) {
|
|
1273
|
+
var c = o[l];
|
|
1274
|
+
if (!(c in Za || n && n[c] || i && c in i || a && c in a)) {
|
|
1275
|
+
var f = ri(t, c);
|
|
1276
|
+
try {
|
|
1277
|
+
ti(e, c, f);
|
|
1278
|
+
} catch {
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
return e;
|
|
1284
|
+
}
|
|
1285
|
+
function tt(e) {
|
|
1286
|
+
return typeof e == "function";
|
|
1287
|
+
}
|
|
1288
|
+
function vr(e) {
|
|
1289
|
+
return typeof e == "object" && "styledComponentId" in e;
|
|
1290
|
+
}
|
|
1291
|
+
function Ke(e, t) {
|
|
1292
|
+
return e && t ? "".concat(e, " ").concat(t) : e || t || "";
|
|
1293
|
+
}
|
|
1294
|
+
function zr(e, t) {
|
|
1295
|
+
if (e.length === 0) return "";
|
|
1296
|
+
for (var n = e[0], r = 1; r < e.length; r++) n += e[r];
|
|
1297
|
+
return n;
|
|
1298
|
+
}
|
|
1299
|
+
function vt(e) {
|
|
1300
|
+
return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
|
|
1301
|
+
}
|
|
1302
|
+
function ur(e, t, n) {
|
|
1303
|
+
if (n === void 0 && (n = !1), !n && !vt(e) && !Array.isArray(e)) return t;
|
|
1304
|
+
if (Array.isArray(t)) for (var r = 0; r < t.length; r++) e[r] = ur(e[r], t[r]);
|
|
1305
|
+
else if (vt(t)) for (var r in t) e[r] = ur(e[r], t[r]);
|
|
1306
|
+
return e;
|
|
1307
|
+
}
|
|
1308
|
+
function wr(e, t) {
|
|
1309
|
+
Object.defineProperty(e, "toString", { value: t });
|
|
1310
|
+
}
|
|
1311
|
+
var ai = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
|
|
1312
|
+
|
|
1313
|
+
`, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
1314
|
+
|
|
1315
|
+
- Are you trying to reuse it across renders?
|
|
1316
|
+
- Are you accidentally calling collectStyles twice?
|
|
1317
|
+
|
|
1318
|
+
`, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
|
|
1319
|
+
|
|
1320
|
+
`, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
|
|
1321
|
+
|
|
1322
|
+
- Does this error occur on the client and is your target falsy?
|
|
1323
|
+
- Does this error occur on the server and is the sheet falsy?
|
|
1324
|
+
|
|
1325
|
+
`, 5: `The clone method cannot be used on the client!
|
|
1326
|
+
|
|
1327
|
+
- Are you running in a client-like environment on the server?
|
|
1328
|
+
- Are you trying to run SSR on the client?
|
|
1329
|
+
|
|
1330
|
+
`, 6: `Trying to insert a new style tag, but the given Node is unmounted!
|
|
1331
|
+
|
|
1332
|
+
- Are you using a custom target that isn't mounted?
|
|
1333
|
+
- Does your document not have a valid head element?
|
|
1334
|
+
- Have you accidentally removed a style tag manually?
|
|
1335
|
+
|
|
1336
|
+
`, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.
|
|
1337
|
+
|
|
1338
|
+
`, 9: "Missing document `<head>`\n\n", 10: `Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
|
|
1339
|
+
|
|
1340
|
+
`, 11: `_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
|
|
1341
|
+
|
|
1342
|
+
`, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: `%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
|
|
1343
|
+
|
|
1344
|
+
`, 14: `ThemeProvider: "theme" prop is required.
|
|
1345
|
+
|
|
1346
|
+
`, 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: `Reached the limit of how many styled components may be created at group %s.
|
|
1347
|
+
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
|
|
1348
|
+
as for instance in your render method then you may be running into this limitation.
|
|
1349
|
+
|
|
1350
|
+
`, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
|
|
1351
|
+
Has styled-components' style tag been unmounted or altered by another script?
|
|
1352
|
+
`, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
|
|
1353
|
+
function ii() {
|
|
1354
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
1355
|
+
for (var n = e[0], r = [], o = 1, a = e.length; o < a; o += 1) r.push(e[o]);
|
|
1356
|
+
return r.forEach(function(i) {
|
|
1357
|
+
n = n.replace(/%[a-z]/, i);
|
|
1358
|
+
}), n;
|
|
1359
|
+
}
|
|
1360
|
+
function Me(e) {
|
|
1361
|
+
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
1362
|
+
return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(t.length > 0 ? " Args: ".concat(t.join(", ")) : "")) : new Error(ii.apply(void 0, ht([ai[e]], t, !1)).trim());
|
|
1363
|
+
}
|
|
1364
|
+
var si = (function() {
|
|
1365
|
+
function e(t) {
|
|
1366
|
+
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
|
|
1367
|
+
}
|
|
1368
|
+
return e.prototype.indexOfGroup = function(t) {
|
|
1369
|
+
for (var n = 0, r = 0; r < t; r++) n += this.groupSizes[r];
|
|
1370
|
+
return n;
|
|
1371
|
+
}, e.prototype.insertRules = function(t, n) {
|
|
1372
|
+
if (t >= this.groupSizes.length) {
|
|
1373
|
+
for (var r = this.groupSizes, o = r.length, a = o; t >= a; ) if ((a <<= 1) < 0) throw Me(16, "".concat(t));
|
|
1374
|
+
this.groupSizes = new Uint32Array(a), this.groupSizes.set(r), this.length = a;
|
|
1375
|
+
for (var i = o; i < a; i++) this.groupSizes[i] = 0;
|
|
1376
|
+
}
|
|
1377
|
+
for (var l = this.indexOfGroup(t + 1), c = (i = 0, n.length); i < c; i++) this.tag.insertRule(l, n[i]) && (this.groupSizes[t]++, l++);
|
|
1378
|
+
}, e.prototype.clearGroup = function(t) {
|
|
1379
|
+
if (t < this.length) {
|
|
1380
|
+
var n = this.groupSizes[t], r = this.indexOfGroup(t), o = r + n;
|
|
1381
|
+
this.groupSizes[t] = 0;
|
|
1382
|
+
for (var a = r; a < o; a++) this.tag.deleteRule(r);
|
|
1383
|
+
}
|
|
1384
|
+
}, e.prototype.getGroup = function(t) {
|
|
1385
|
+
var n = "";
|
|
1386
|
+
if (t >= this.length || this.groupSizes[t] === 0) return n;
|
|
1387
|
+
for (var r = this.groupSizes[t], o = this.indexOfGroup(t), a = o + r, i = o; i < a; i++) n += "".concat(this.tag.getRule(i)).concat(br);
|
|
1388
|
+
return n;
|
|
1389
|
+
}, e;
|
|
1390
|
+
})(), li = 1 << 30, wn = /* @__PURE__ */ new Map(), $n = /* @__PURE__ */ new Map(), xn = 1, dn = function(e) {
|
|
1391
|
+
if (wn.has(e)) return wn.get(e);
|
|
1392
|
+
for (; $n.has(xn); ) xn++;
|
|
1393
|
+
var t = xn++;
|
|
1394
|
+
if (process.env.NODE_ENV !== "production" && ((0 | t) < 0 || t > li)) throw Me(16, "".concat(t));
|
|
1395
|
+
return wn.set(e, t), $n.set(t, e), t;
|
|
1396
|
+
}, ci = function(e, t) {
|
|
1397
|
+
xn = t + 1, wn.set(e, t), $n.set(t, e);
|
|
1398
|
+
}, ui = "style[".concat(et, "][").concat(xo, '="').concat(An, '"]'), di = new RegExp("^".concat(et, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), pi = function(e, t, n) {
|
|
1399
|
+
for (var r, o = n.split(","), a = 0, i = o.length; a < i; a++) (r = o[a]) && e.registerName(t, r);
|
|
1400
|
+
}, fi = function(e, t) {
|
|
1401
|
+
for (var n, r = ((n = t.textContent) !== null && n !== void 0 ? n : "").split(br), o = [], a = 0, i = r.length; a < i; a++) {
|
|
1402
|
+
var l = r[a].trim();
|
|
1403
|
+
if (l) {
|
|
1404
|
+
var c = l.match(di);
|
|
1405
|
+
if (c) {
|
|
1406
|
+
var f = 0 | parseInt(c[1], 10), d = c[2];
|
|
1407
|
+
f !== 0 && (ci(d, f), pi(e, d, c[3]), e.getTag().insertRules(f, o)), o.length = 0;
|
|
1408
|
+
} else o.push(l);
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
};
|
|
1412
|
+
function gi() {
|
|
1413
|
+
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
|
|
1414
|
+
}
|
|
1415
|
+
var jo = function(e) {
|
|
1416
|
+
var t = document.head, n = e || t, r = document.createElement("style"), o = (function(l) {
|
|
1417
|
+
var c = Array.from(l.querySelectorAll("style[".concat(et, "]")));
|
|
1418
|
+
return c[c.length - 1];
|
|
1419
|
+
})(n), a = o !== void 0 ? o.nextSibling : null;
|
|
1420
|
+
r.setAttribute(et, wo), r.setAttribute(xo, An);
|
|
1421
|
+
var i = gi();
|
|
1422
|
+
return i && r.setAttribute("nonce", i), n.insertBefore(r, a), r;
|
|
1423
|
+
}, hi = (function() {
|
|
1424
|
+
function e(t) {
|
|
1425
|
+
this.element = jo(t), this.element.appendChild(document.createTextNode("")), this.sheet = (function(n) {
|
|
1426
|
+
if (n.sheet) return n.sheet;
|
|
1427
|
+
for (var r = document.styleSheets, o = 0, a = r.length; o < a; o++) {
|
|
1428
|
+
var i = r[o];
|
|
1429
|
+
if (i.ownerNode === n) return i;
|
|
1430
|
+
}
|
|
1431
|
+
throw Me(17);
|
|
1432
|
+
})(this.element), this.length = 0;
|
|
1433
|
+
}
|
|
1434
|
+
return e.prototype.insertRule = function(t, n) {
|
|
1435
|
+
try {
|
|
1436
|
+
return this.sheet.insertRule(n, t), this.length++, !0;
|
|
1437
|
+
} catch {
|
|
1438
|
+
return !1;
|
|
1439
|
+
}
|
|
1440
|
+
}, e.prototype.deleteRule = function(t) {
|
|
1441
|
+
this.sheet.deleteRule(t), this.length--;
|
|
1442
|
+
}, e.prototype.getRule = function(t) {
|
|
1443
|
+
var n = this.sheet.cssRules[t];
|
|
1444
|
+
return n && n.cssText ? n.cssText : "";
|
|
1445
|
+
}, e;
|
|
1446
|
+
})(), mi = (function() {
|
|
1447
|
+
function e(t) {
|
|
1448
|
+
this.element = jo(t), this.nodes = this.element.childNodes, this.length = 0;
|
|
1449
|
+
}
|
|
1450
|
+
return e.prototype.insertRule = function(t, n) {
|
|
1451
|
+
if (t <= this.length && t >= 0) {
|
|
1452
|
+
var r = document.createTextNode(n);
|
|
1453
|
+
return this.element.insertBefore(r, this.nodes[t] || null), this.length++, !0;
|
|
1454
|
+
}
|
|
1455
|
+
return !1;
|
|
1456
|
+
}, e.prototype.deleteRule = function(t) {
|
|
1457
|
+
this.element.removeChild(this.nodes[t]), this.length--;
|
|
1458
|
+
}, e.prototype.getRule = function(t) {
|
|
1459
|
+
return t < this.length ? this.nodes[t].textContent : "";
|
|
1460
|
+
}, e;
|
|
1461
|
+
})(), bi = (function() {
|
|
1462
|
+
function e(t) {
|
|
1463
|
+
this.rules = [], this.length = 0;
|
|
1464
|
+
}
|
|
1465
|
+
return e.prototype.insertRule = function(t, n) {
|
|
1466
|
+
return t <= this.length && (this.rules.splice(t, 0, n), this.length++, !0);
|
|
1467
|
+
}, e.prototype.deleteRule = function(t) {
|
|
1468
|
+
this.rules.splice(t, 1), this.length--;
|
|
1469
|
+
}, e.prototype.getRule = function(t) {
|
|
1470
|
+
return t < this.length ? this.rules[t] : "";
|
|
1471
|
+
}, e;
|
|
1472
|
+
})(), Wr = yr, yi = { isServer: !yr, useCSSOMInjection: !Va }, ko = (function() {
|
|
1473
|
+
function e(t, n, r) {
|
|
1474
|
+
t === void 0 && (t = yt), n === void 0 && (n = {});
|
|
1475
|
+
var o = this;
|
|
1476
|
+
this.options = ce(ce({}, yi), t), this.gs = n, this.names = new Map(r), this.server = !!t.isServer, !this.server && yr && Wr && (Wr = !1, (function(a) {
|
|
1477
|
+
for (var i = document.querySelectorAll(ui), l = 0, c = i.length; l < c; l++) {
|
|
1478
|
+
var f = i[l];
|
|
1479
|
+
f && f.getAttribute(et) !== wo && (fi(a, f), f.parentNode && f.parentNode.removeChild(f));
|
|
1480
|
+
}
|
|
1481
|
+
})(this)), wr(this, function() {
|
|
1482
|
+
return (function(a) {
|
|
1483
|
+
for (var i = a.getTag(), l = i.length, c = "", f = function(g) {
|
|
1484
|
+
var y = (function(P) {
|
|
1485
|
+
return $n.get(P);
|
|
1486
|
+
})(g);
|
|
1487
|
+
if (y === void 0) return "continue";
|
|
1488
|
+
var b = a.names.get(y), E = i.getGroup(g);
|
|
1489
|
+
if (b === void 0 || E.length === 0) return "continue";
|
|
1490
|
+
var S = "".concat(et, ".g").concat(g, '[id="').concat(y, '"]'), $ = "";
|
|
1491
|
+
b !== void 0 && b.forEach(function(P) {
|
|
1492
|
+
P.length > 0 && ($ += "".concat(P, ","));
|
|
1493
|
+
}), c += "".concat(E).concat(S, '{content:"').concat($, '"}').concat(br);
|
|
1494
|
+
}, d = 0; d < l; d++) f(d);
|
|
1495
|
+
return c;
|
|
1496
|
+
})(o);
|
|
1497
|
+
});
|
|
1498
|
+
}
|
|
1499
|
+
return e.registerId = function(t) {
|
|
1500
|
+
return dn(t);
|
|
1501
|
+
}, e.prototype.reconstructWithOptions = function(t, n) {
|
|
1502
|
+
return n === void 0 && (n = !0), new e(ce(ce({}, this.options), t), this.gs, n && this.names || void 0);
|
|
1503
|
+
}, e.prototype.allocateGSInstance = function(t) {
|
|
1504
|
+
return this.gs[t] = (this.gs[t] || 0) + 1;
|
|
1505
|
+
}, e.prototype.getTag = function() {
|
|
1506
|
+
return this.tag || (this.tag = (t = (function(n) {
|
|
1507
|
+
var r = n.useCSSOMInjection, o = n.target;
|
|
1508
|
+
return n.isServer ? new bi(o) : r ? new hi(o) : new mi(o);
|
|
1509
|
+
})(this.options), new si(t)));
|
|
1510
|
+
var t;
|
|
1511
|
+
}, e.prototype.hasNameForId = function(t, n) {
|
|
1512
|
+
return this.names.has(t) && this.names.get(t).has(n);
|
|
1513
|
+
}, e.prototype.registerName = function(t, n) {
|
|
1514
|
+
if (dn(t), this.names.has(t)) this.names.get(t).add(n);
|
|
1515
|
+
else {
|
|
1516
|
+
var r = /* @__PURE__ */ new Set();
|
|
1517
|
+
r.add(n), this.names.set(t, r);
|
|
1518
|
+
}
|
|
1519
|
+
}, e.prototype.insertRules = function(t, n, r) {
|
|
1520
|
+
this.registerName(t, n), this.getTag().insertRules(dn(t), r);
|
|
1521
|
+
}, e.prototype.clearNames = function(t) {
|
|
1522
|
+
this.names.has(t) && this.names.get(t).clear();
|
|
1523
|
+
}, e.prototype.clearRules = function(t) {
|
|
1524
|
+
this.getTag().clearGroup(dn(t)), this.clearNames(t);
|
|
1525
|
+
}, e.prototype.clearTag = function() {
|
|
1526
|
+
this.tag = void 0;
|
|
1527
|
+
}, e;
|
|
1528
|
+
})(), vi = /&/g, wi = /^\s*\/\/.*$/gm;
|
|
1529
|
+
function To(e, t) {
|
|
1530
|
+
return e.map(function(n) {
|
|
1531
|
+
return n.type === "rule" && (n.value = "".concat(t, " ").concat(n.value), n.value = n.value.replaceAll(",", ",".concat(t, " ")), n.props = n.props.map(function(r) {
|
|
1532
|
+
return "".concat(t, " ").concat(r);
|
|
1533
|
+
})), Array.isArray(n.children) && n.type !== "@keyframes" && (n.children = To(n.children, t)), n;
|
|
1534
|
+
});
|
|
1535
|
+
}
|
|
1536
|
+
function xi(e) {
|
|
1537
|
+
var t, n, r, o = yt, a = o.options, i = a === void 0 ? yt : a, l = o.plugins, c = l === void 0 ? In : l, f = function(y, b, E) {
|
|
1538
|
+
return E.startsWith(n) && E.endsWith(n) && E.replaceAll(n, "").length > 0 ? ".".concat(t) : y;
|
|
1539
|
+
}, d = c.slice();
|
|
1540
|
+
d.push(function(y) {
|
|
1541
|
+
y.type === kn && y.value.includes("&") && (y.props[0] = y.props[0].replace(vi, n).replace(r, f));
|
|
1542
|
+
}), i.prefix && d.push(Wa), d.push(Ma);
|
|
1543
|
+
var g = function(y, b, E, S) {
|
|
1544
|
+
b === void 0 && (b = ""), E === void 0 && (E = ""), S === void 0 && (S = "&"), t = S, n = b, r = new RegExp("\\".concat(n, "\\b"), "g");
|
|
1545
|
+
var $ = y.replace(wi, ""), P = Fa(E || b ? "".concat(E, " ").concat(b, " { ").concat($, " }") : $);
|
|
1546
|
+
i.namespace && (P = To(P, i.namespace));
|
|
1547
|
+
var C = [];
|
|
1548
|
+
return Rn(P, Ha(d.concat(za(function(O) {
|
|
1549
|
+
return C.push(O);
|
|
1550
|
+
})))), C;
|
|
1551
|
+
};
|
|
1552
|
+
return g.hash = c.length ? c.reduce(function(y, b) {
|
|
1553
|
+
return b.name || Me(15), Ue(y, b.name);
|
|
1554
|
+
}, So).toString() : "", g;
|
|
1555
|
+
}
|
|
1556
|
+
var Si = new ko(), dr = xi(), _o = A.createContext({ shouldForwardProp: void 0, styleSheet: Si, stylis: dr });
|
|
1557
|
+
_o.Consumer;
|
|
1558
|
+
A.createContext(void 0);
|
|
1559
|
+
function Br() {
|
|
1560
|
+
return Te(_o);
|
|
1561
|
+
}
|
|
1562
|
+
var Vr = (function() {
|
|
1563
|
+
function e(t, n) {
|
|
1564
|
+
var r = this;
|
|
1565
|
+
this.inject = function(o, a) {
|
|
1566
|
+
a === void 0 && (a = dr);
|
|
1567
|
+
var i = r.name + a.hash;
|
|
1568
|
+
o.hasNameForId(r.id, i) || o.insertRules(r.id, i, a(r.rules, i, "@keyframes"));
|
|
1569
|
+
}, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = n, wr(this, function() {
|
|
1570
|
+
throw Me(12, String(r.name));
|
|
1571
|
+
});
|
|
1572
|
+
}
|
|
1573
|
+
return e.prototype.getName = function(t) {
|
|
1574
|
+
return t === void 0 && (t = dr), this.name + t.hash;
|
|
1575
|
+
}, e;
|
|
1576
|
+
})(), Ci = function(e) {
|
|
1577
|
+
return e >= "A" && e <= "Z";
|
|
1578
|
+
};
|
|
1579
|
+
function qr(e) {
|
|
1580
|
+
for (var t = "", n = 0; n < e.length; n++) {
|
|
1581
|
+
var r = e[n];
|
|
1582
|
+
if (n === 1 && r === "-" && e[0] === "-") return e;
|
|
1583
|
+
Ci(r) ? t += "-" + r.toLowerCase() : t += r;
|
|
1584
|
+
}
|
|
1585
|
+
return t.startsWith("ms-") ? "-" + t : t;
|
|
1586
|
+
}
|
|
1587
|
+
var Do = function(e) {
|
|
1588
|
+
return e == null || e === !1 || e === "";
|
|
1589
|
+
}, Ao = function(e) {
|
|
1590
|
+
var t, n, r = [];
|
|
1591
|
+
for (var o in e) {
|
|
1592
|
+
var a = e[o];
|
|
1593
|
+
e.hasOwnProperty(o) && !Do(a) && (Array.isArray(a) && a.isCss || tt(a) ? r.push("".concat(qr(o), ":"), a, ";") : vt(a) ? r.push.apply(r, ht(ht(["".concat(o, " {")], Ao(a), !1), ["}"], !1)) : r.push("".concat(qr(o), ": ").concat((t = o, (n = a) == null || typeof n == "boolean" || n === "" ? "" : typeof n != "number" || n === 0 || t in Ba || t.startsWith("--") ? String(n).trim() : "".concat(n, "px")), ";")));
|
|
1594
|
+
}
|
|
1595
|
+
return r;
|
|
1596
|
+
};
|
|
1597
|
+
function Je(e, t, n, r) {
|
|
1598
|
+
if (Do(e)) return [];
|
|
1599
|
+
if (vr(e)) return [".".concat(e.styledComponentId)];
|
|
1600
|
+
if (tt(e)) {
|
|
1601
|
+
if (!tt(a = e) || a.prototype && a.prototype.isReactComponent || !t) return [e];
|
|
1602
|
+
var o = e(t);
|
|
1603
|
+
return process.env.NODE_ENV === "production" || typeof o != "object" || Array.isArray(o) || o instanceof Vr || vt(o) || o === null || console.error("".concat(Eo(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), Je(o, t, n, r);
|
|
1604
|
+
}
|
|
1605
|
+
var a;
|
|
1606
|
+
return e instanceof Vr ? n ? (e.inject(n, r), [e.getName(r)]) : [e] : vt(e) ? Ao(e) : Array.isArray(e) ? Array.prototype.concat.apply(In, e.map(function(i) {
|
|
1607
|
+
return Je(i, t, n, r);
|
|
1608
|
+
})) : [e.toString()];
|
|
1609
|
+
}
|
|
1610
|
+
function Ei(e) {
|
|
1611
|
+
for (var t = 0; t < e.length; t += 1) {
|
|
1612
|
+
var n = e[t];
|
|
1613
|
+
if (tt(n) && !vr(n)) return !1;
|
|
1614
|
+
}
|
|
1615
|
+
return !0;
|
|
1616
|
+
}
|
|
1617
|
+
var Ri = Co(An), $i = (function() {
|
|
1618
|
+
function e(t, n, r) {
|
|
1619
|
+
this.rules = t, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (r === void 0 || r.isStatic) && Ei(t), this.componentId = n, this.baseHash = Ue(Ri, n), this.baseStyle = r, ko.registerId(n);
|
|
1620
|
+
}
|
|
1621
|
+
return e.prototype.generateAndInjectStyles = function(t, n, r) {
|
|
1622
|
+
var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, n, r) : "";
|
|
1623
|
+
if (this.isStatic && !r.hash) if (this.staticRulesId && n.hasNameForId(this.componentId, this.staticRulesId)) o = Ke(o, this.staticRulesId);
|
|
1624
|
+
else {
|
|
1625
|
+
var a = zr(Je(this.rules, t, n, r)), i = cr(Ue(this.baseHash, a) >>> 0);
|
|
1626
|
+
if (!n.hasNameForId(this.componentId, i)) {
|
|
1627
|
+
var l = r(a, ".".concat(i), void 0, this.componentId);
|
|
1628
|
+
n.insertRules(this.componentId, i, l);
|
|
1629
|
+
}
|
|
1630
|
+
o = Ke(o, i), this.staticRulesId = i;
|
|
1631
|
+
}
|
|
1632
|
+
else {
|
|
1633
|
+
for (var c = Ue(this.baseHash, r.hash), f = "", d = 0; d < this.rules.length; d++) {
|
|
1634
|
+
var g = this.rules[d];
|
|
1635
|
+
if (typeof g == "string") f += g, process.env.NODE_ENV !== "production" && (c = Ue(c, g));
|
|
1636
|
+
else if (g) {
|
|
1637
|
+
var y = zr(Je(g, t, n, r));
|
|
1638
|
+
c = Ue(c, y + d), f += y;
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
if (f) {
|
|
1642
|
+
var b = cr(c >>> 0);
|
|
1643
|
+
n.hasNameForId(this.componentId, b) || n.insertRules(this.componentId, b, r(f, ".".concat(b), void 0, this.componentId)), o = Ke(o, b);
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
return o;
|
|
1647
|
+
}, e;
|
|
1648
|
+
})(), On = A.createContext(void 0);
|
|
1649
|
+
On.Consumer;
|
|
1650
|
+
function Oi(e) {
|
|
1651
|
+
var t = A.useContext(On), n = ae(function() {
|
|
1652
|
+
return (function(r, o) {
|
|
1653
|
+
if (!r) throw Me(14);
|
|
1654
|
+
if (tt(r)) {
|
|
1655
|
+
var a = r(o);
|
|
1656
|
+
if (process.env.NODE_ENV !== "production" && (a === null || Array.isArray(a) || typeof a != "object")) throw Me(7);
|
|
1657
|
+
return a;
|
|
1658
|
+
}
|
|
1659
|
+
if (Array.isArray(r) || typeof r != "object") throw Me(8);
|
|
1660
|
+
return o ? ce(ce({}, o), r) : r;
|
|
1661
|
+
})(e.theme, t);
|
|
1662
|
+
}, [e.theme, t]);
|
|
1663
|
+
return e.children ? A.createElement(On.Provider, { value: n }, e.children) : null;
|
|
1664
|
+
}
|
|
1665
|
+
var Xn = {}, Gr = /* @__PURE__ */ new Set();
|
|
1666
|
+
function Pi(e, t, n) {
|
|
1667
|
+
var r = vr(e), o = e, a = !Jn(e), i = t.attrs, l = i === void 0 ? In : i, c = t.componentId, f = c === void 0 ? (function(j, _) {
|
|
1668
|
+
var w = typeof j != "string" ? "sc" : Nr(j);
|
|
1669
|
+
Xn[w] = (Xn[w] || 0) + 1;
|
|
1670
|
+
var v = "".concat(w, "-").concat(Qa(An + w + Xn[w]));
|
|
1671
|
+
return _ ? "".concat(_, "-").concat(v) : v;
|
|
1672
|
+
})(t.displayName, t.parentComponentId) : c, d = t.displayName, g = d === void 0 ? (function(j) {
|
|
1673
|
+
return Jn(j) ? "styled.".concat(j) : "Styled(".concat(Eo(j), ")");
|
|
1674
|
+
})(e) : d, y = t.displayName && t.componentId ? "".concat(Nr(t.displayName), "-").concat(t.componentId) : t.componentId || f, b = r && o.attrs ? o.attrs.concat(l).filter(Boolean) : l, E = t.shouldForwardProp;
|
|
1675
|
+
if (r && o.shouldForwardProp) {
|
|
1676
|
+
var S = o.shouldForwardProp;
|
|
1677
|
+
if (t.shouldForwardProp) {
|
|
1678
|
+
var $ = t.shouldForwardProp;
|
|
1679
|
+
E = function(j, _) {
|
|
1680
|
+
return S(j, _) && $(j, _);
|
|
1681
|
+
};
|
|
1682
|
+
} else E = S;
|
|
1683
|
+
}
|
|
1684
|
+
var P = new $i(n, y, r ? o.componentStyle : void 0);
|
|
1685
|
+
function C(j, _) {
|
|
1686
|
+
return (function(w, v, N) {
|
|
1687
|
+
var Q = w.attrs, re = w.componentStyle, ge = w.defaultProps, be = w.foldedComponentIds, H = w.styledComponentId, ie = w.target, ye = A.useContext(On), $e = Br(), ve = w.shouldForwardProp || $e.shouldForwardProp;
|
|
1688
|
+
process.env.NODE_ENV !== "production" && Or(H);
|
|
1689
|
+
var Ae = Ga(v, ye, ge) || yt, se = (function(Pe, oe, Ce) {
|
|
1690
|
+
for (var de, le = ce(ce({}, oe), { className: void 0, theme: Ce }), Ee = 0; Ee < Pe.length; Ee += 1) {
|
|
1691
|
+
var pe = tt(de = Pe[Ee]) ? de(le) : de;
|
|
1692
|
+
for (var Z in pe) le[Z] = Z === "className" ? Ke(le[Z], pe[Z]) : Z === "style" ? ce(ce({}, le[Z]), pe[Z]) : pe[Z];
|
|
1693
|
+
}
|
|
1694
|
+
return oe.className && (le.className = Ke(le.className, oe.className)), le;
|
|
1695
|
+
})(Q, v, Ae), xe = se.as || ie, Se = {};
|
|
1696
|
+
for (var q in se) se[q] === void 0 || q[0] === "$" || q === "as" || q === "theme" && se.theme === Ae || (q === "forwardedAs" ? Se.as = se.forwardedAs : ve && !ve(q, xe) || (Se[q] = se[q], ve || process.env.NODE_ENV !== "development" || Ea(q) || Gr.has(q) || !lr.has(xe) || (Gr.add(q), console.warn('styled-components: it looks like an unknown prop "'.concat(q, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
|
|
1697
|
+
var Oe = (function(Pe, oe) {
|
|
1698
|
+
var Ce = Br(), de = Pe.generateAndInjectStyles(oe, Ce.styleSheet, Ce.stylis);
|
|
1699
|
+
return process.env.NODE_ENV !== "production" && Or(de), de;
|
|
1700
|
+
})(re, se);
|
|
1701
|
+
process.env.NODE_ENV !== "production" && w.warnTooManyClasses && w.warnTooManyClasses(Oe);
|
|
1702
|
+
var ue = Ke(be, H);
|
|
1703
|
+
return Oe && (ue += " " + Oe), se.className && (ue += " " + se.className), Se[Jn(xe) && !lr.has(xe) ? "class" : "className"] = ue, Se.ref = N, ua(xe, Se);
|
|
1704
|
+
})(O, j, _);
|
|
1705
|
+
}
|
|
1706
|
+
C.displayName = g;
|
|
1707
|
+
var O = A.forwardRef(C);
|
|
1708
|
+
return O.attrs = b, O.componentStyle = P, O.displayName = g, O.shouldForwardProp = E, O.foldedComponentIds = r ? Ke(o.foldedComponentIds, o.styledComponentId) : "", O.styledComponentId = y, O.target = r ? o.target : e, Object.defineProperty(O, "defaultProps", { get: function() {
|
|
1709
|
+
return this._foldedDefaultProps;
|
|
1710
|
+
}, set: function(j) {
|
|
1711
|
+
this._foldedDefaultProps = r ? (function(_) {
|
|
1712
|
+
for (var w = [], v = 1; v < arguments.length; v++) w[v - 1] = arguments[v];
|
|
1713
|
+
for (var N = 0, Q = w; N < Q.length; N++) ur(_, Q[N], !0);
|
|
1714
|
+
return _;
|
|
1715
|
+
})({}, o.defaultProps, j) : j;
|
|
1716
|
+
} }), process.env.NODE_ENV !== "production" && (qa(g, y), O.warnTooManyClasses = /* @__PURE__ */ (function(j, _) {
|
|
1717
|
+
var w = {}, v = !1;
|
|
1718
|
+
return function(N) {
|
|
1719
|
+
if (!v && (w[N] = !0, Object.keys(w).length >= 200)) {
|
|
1720
|
+
var Q = _ ? ' with the id of "'.concat(_, '"') : "";
|
|
1721
|
+
console.warn("Over ".concat(200, " classes were generated for component ").concat(j).concat(Q, `.
|
|
1722
|
+
`) + `Consider using the attrs method, together with a style object for frequently changed styles.
|
|
1723
|
+
Example:
|
|
1724
|
+
const Component = styled.div.attrs(props => ({
|
|
1725
|
+
style: {
|
|
1726
|
+
background: props.background,
|
|
1727
|
+
},
|
|
1728
|
+
}))\`width: 100%;\`
|
|
1729
|
+
|
|
1730
|
+
<Component />`), v = !0, w = {};
|
|
1731
|
+
}
|
|
1732
|
+
};
|
|
1733
|
+
})(g, y)), wr(O, function() {
|
|
1734
|
+
return ".".concat(O.styledComponentId);
|
|
1735
|
+
}), a && Po(O, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), O;
|
|
1736
|
+
}
|
|
1737
|
+
function Yr(e, t) {
|
|
1738
|
+
for (var n = [e[0]], r = 0, o = t.length; r < o; r += 1) n.push(t[r], e[r + 1]);
|
|
1739
|
+
return n;
|
|
1740
|
+
}
|
|
1741
|
+
var Ur = function(e) {
|
|
1742
|
+
return Object.assign(e, { isCss: !0 });
|
|
1743
|
+
};
|
|
1744
|
+
function te(e) {
|
|
1745
|
+
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
1746
|
+
if (tt(e) || vt(e)) return Ur(Je(Yr(In, ht([e], t, !0))));
|
|
1747
|
+
var r = e;
|
|
1748
|
+
return t.length === 0 && r.length === 1 && typeof r[0] == "string" ? Je(r) : Ur(Je(Yr(r, t)));
|
|
1749
|
+
}
|
|
1750
|
+
function pr(e, t, n) {
|
|
1751
|
+
if (n === void 0 && (n = yt), !t) throw Me(1, t);
|
|
1752
|
+
var r = function(o) {
|
|
1753
|
+
for (var a = [], i = 1; i < arguments.length; i++) a[i - 1] = arguments[i];
|
|
1754
|
+
return e(t, n, te.apply(void 0, ht([o], a, !1)));
|
|
1755
|
+
};
|
|
1756
|
+
return r.attrs = function(o) {
|
|
1757
|
+
return pr(e, t, ce(ce({}, n), { attrs: Array.prototype.concat(n.attrs, o).filter(Boolean) }));
|
|
1758
|
+
}, r.withConfig = function(o) {
|
|
1759
|
+
return pr(e, t, ce(ce({}, n), o));
|
|
1760
|
+
}, r;
|
|
1761
|
+
}
|
|
1762
|
+
var Io = function(e) {
|
|
1763
|
+
return pr(Pi, e);
|
|
1764
|
+
}, L = Io;
|
|
1765
|
+
lr.forEach(function(e) {
|
|
1766
|
+
L[e] = Io(e);
|
|
1767
|
+
});
|
|
1768
|
+
process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
1769
|
+
Perhaps you're looking to import 'styled-components/native'?
|
|
1770
|
+
Read more about this at https://www.styled-components.com/docs/basics#react-native`);
|
|
1771
|
+
var pn = "__sc-".concat(et, "__");
|
|
1772
|
+
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[pn] || (window[pn] = 0), window[pn] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
1773
|
+
|
|
1774
|
+
See https://s-c.sh/2BAXzed for more info.`), window[pn] += 1);
|
|
1775
|
+
var Ge;
|
|
1776
|
+
function wt(e, t) {
|
|
1777
|
+
return e[t];
|
|
1778
|
+
}
|
|
1779
|
+
function ji(e = [], t, n = 0) {
|
|
1780
|
+
return [...e.slice(0, n), t, ...e.slice(n)];
|
|
1781
|
+
}
|
|
1782
|
+
function ki(e = [], t, n = "id") {
|
|
1783
|
+
const r = e.slice(), o = wt(t, n);
|
|
1784
|
+
return o ? r.splice(r.findIndex(((a) => wt(a, n) === o)), 1) : r.splice(r.findIndex(((a) => a === t)), 1), r;
|
|
1785
|
+
}
|
|
1786
|
+
function Kr(e) {
|
|
1787
|
+
return e.map(((t, n) => {
|
|
1788
|
+
const r = Object.assign(Object.assign({}, t), { sortable: t.sortable || !!t.sortFunction || void 0 });
|
|
1789
|
+
return t.id || (r.id = n + 1), r;
|
|
1790
|
+
}));
|
|
1791
|
+
}
|
|
1792
|
+
function Ht(e, t) {
|
|
1793
|
+
return Math.ceil(e / t);
|
|
1794
|
+
}
|
|
1795
|
+
function Zn(e, t) {
|
|
1796
|
+
return Math.min(e, t);
|
|
1797
|
+
}
|
|
1798
|
+
(function(e) {
|
|
1799
|
+
e.ASC = "asc", e.DESC = "desc";
|
|
1800
|
+
})(Ge || (Ge = {}));
|
|
1801
|
+
const ee = () => null;
|
|
1802
|
+
function No(e, t = [], n = []) {
|
|
1803
|
+
let r = {}, o = [...n];
|
|
1804
|
+
return t.length && t.forEach(((a) => {
|
|
1805
|
+
if (!a.when || typeof a.when != "function") throw new Error('"when" must be defined in the conditional style object and must be function');
|
|
1806
|
+
a.when(e) && (r = a.style || {}, a.classNames && (o = [...o, ...a.classNames]), typeof a.style == "function" && (r = a.style(e) || {}));
|
|
1807
|
+
})), { conditionalStyle: r, classNames: o.join(" ") };
|
|
1808
|
+
}
|
|
1809
|
+
function Sn(e, t = [], n = "id") {
|
|
1810
|
+
const r = wt(e, n);
|
|
1811
|
+
return r ? t.some(((o) => wt(o, n) === r)) : t.some(((o) => o === e));
|
|
1812
|
+
}
|
|
1813
|
+
function fn(e, t) {
|
|
1814
|
+
return t ? e.findIndex(((n) => zt(n.id, t))) : -1;
|
|
1815
|
+
}
|
|
1816
|
+
function zt(e, t) {
|
|
1817
|
+
return e == t;
|
|
1818
|
+
}
|
|
1819
|
+
function Ti(e, t) {
|
|
1820
|
+
const n = !e.toggleOnSelectedRowsChange;
|
|
1821
|
+
switch (t.type) {
|
|
1822
|
+
case "SELECT_ALL_ROWS": {
|
|
1823
|
+
const { keyField: r, rows: o, rowCount: a, mergeSelections: i } = t, l = !e.allSelected, c = !e.toggleOnSelectedRowsChange;
|
|
1824
|
+
if (i) {
|
|
1825
|
+
const f = l ? [...e.selectedRows, ...o.filter(((d) => !Sn(d, e.selectedRows, r)))] : e.selectedRows.filter(((d) => !Sn(d, o, r)));
|
|
1826
|
+
return Object.assign(Object.assign({}, e), { allSelected: l, selectedCount: f.length, selectedRows: f, toggleOnSelectedRowsChange: c });
|
|
1827
|
+
}
|
|
1828
|
+
return Object.assign(Object.assign({}, e), { allSelected: l, selectedCount: l ? a : 0, selectedRows: l ? o : [], toggleOnSelectedRowsChange: c });
|
|
1829
|
+
}
|
|
1830
|
+
case "SELECT_SINGLE_ROW": {
|
|
1831
|
+
const { keyField: r, row: o, isSelected: a, rowCount: i, singleSelect: l } = t;
|
|
1832
|
+
return l ? a ? Object.assign(Object.assign({}, e), { selectedCount: 0, allSelected: !1, selectedRows: [], toggleOnSelectedRowsChange: n }) : Object.assign(Object.assign({}, e), { selectedCount: 1, allSelected: !1, selectedRows: [o], toggleOnSelectedRowsChange: n }) : a ? Object.assign(Object.assign({}, e), { selectedCount: e.selectedRows.length > 0 ? e.selectedRows.length - 1 : 0, allSelected: !1, selectedRows: ki(e.selectedRows, o, r), toggleOnSelectedRowsChange: n }) : Object.assign(Object.assign({}, e), { selectedCount: e.selectedRows.length + 1, allSelected: e.selectedRows.length + 1 === i, selectedRows: ji(e.selectedRows, o), toggleOnSelectedRowsChange: n });
|
|
1833
|
+
}
|
|
1834
|
+
case "SELECT_MULTIPLE_ROWS": {
|
|
1835
|
+
const { keyField: r, selectedRows: o, totalRows: a, mergeSelections: i } = t;
|
|
1836
|
+
if (i) {
|
|
1837
|
+
const l = [...e.selectedRows, ...o.filter(((c) => !Sn(c, e.selectedRows, r)))];
|
|
1838
|
+
return Object.assign(Object.assign({}, e), { selectedCount: l.length, allSelected: !1, selectedRows: l, toggleOnSelectedRowsChange: n });
|
|
1839
|
+
}
|
|
1840
|
+
return Object.assign(Object.assign({}, e), { selectedCount: o.length, allSelected: o.length === a, selectedRows: o, toggleOnSelectedRowsChange: n });
|
|
1841
|
+
}
|
|
1842
|
+
case "CLEAR_SELECTED_ROWS": {
|
|
1843
|
+
const { selectedRowsFlag: r } = t;
|
|
1844
|
+
return Object.assign(Object.assign({}, e), { allSelected: !1, selectedCount: 0, selectedRows: [], selectedRowsFlag: r });
|
|
1845
|
+
}
|
|
1846
|
+
case "SORT_CHANGE": {
|
|
1847
|
+
const { sortDirection: r, selectedColumn: o, clearSelectedOnSort: a } = t;
|
|
1848
|
+
return Object.assign(Object.assign(Object.assign({}, e), { selectedColumn: o, sortDirection: r, currentPage: 1 }), a && { allSelected: !1, selectedCount: 0, selectedRows: [], toggleOnSelectedRowsChange: n });
|
|
1849
|
+
}
|
|
1850
|
+
case "CHANGE_PAGE": {
|
|
1851
|
+
const { page: r, paginationServer: o, visibleOnly: a, persistSelectedOnPageChange: i } = t, l = o && i, c = o && !i || a;
|
|
1852
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, e), { currentPage: r }), l && { allSelected: !1 }), c && { allSelected: !1, selectedCount: 0, selectedRows: [], toggleOnSelectedRowsChange: n });
|
|
1853
|
+
}
|
|
1854
|
+
case "CHANGE_ROWS_PER_PAGE": {
|
|
1855
|
+
const { rowsPerPage: r, page: o } = t;
|
|
1856
|
+
return Object.assign(Object.assign({}, e), { currentPage: o, rowsPerPage: r });
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
const _i = te`
|
|
1861
|
+
pointer-events: none;
|
|
1862
|
+
opacity: 0.4;
|
|
1863
|
+
`, Di = L.div`
|
|
1864
|
+
position: relative;
|
|
1865
|
+
box-sizing: border-box;
|
|
1866
|
+
display: flex;
|
|
1867
|
+
flex-direction: column;
|
|
1868
|
+
width: 100%;
|
|
1869
|
+
height: 100%;
|
|
1870
|
+
max-width: 100%;
|
|
1871
|
+
${({ disabled: e }) => e && _i};
|
|
1872
|
+
${({ theme: e }) => e.table.style};
|
|
1873
|
+
`, Ai = te`
|
|
1874
|
+
position: sticky;
|
|
1875
|
+
position: -webkit-sticky; /* Safari */
|
|
1876
|
+
top: 0;
|
|
1877
|
+
z-index: 1;
|
|
1878
|
+
`, Ii = L.div`
|
|
1879
|
+
display: flex;
|
|
1880
|
+
width: 100%;
|
|
1881
|
+
${({ $fixedHeader: e }) => e && Ai};
|
|
1882
|
+
${({ theme: e }) => e.head.style};
|
|
1883
|
+
`, Ni = L.div`
|
|
1884
|
+
display: flex;
|
|
1885
|
+
align-items: stretch;
|
|
1886
|
+
width: 100%;
|
|
1887
|
+
${({ theme: e }) => e.headRow.style};
|
|
1888
|
+
${({ $dense: e, theme: t }) => e && t.headRow.denseStyle};
|
|
1889
|
+
`, Fo = (e, ...t) => te`
|
|
1890
|
+
@media screen and (max-width: ${599}px) {
|
|
1891
|
+
${te(e, ...t)}
|
|
1892
|
+
}
|
|
1893
|
+
`, Fi = (e, ...t) => te`
|
|
1894
|
+
@media screen and (max-width: ${959}px) {
|
|
1895
|
+
${te(e, ...t)}
|
|
1896
|
+
}
|
|
1897
|
+
`, Li = (e, ...t) => te`
|
|
1898
|
+
@media screen and (max-width: ${1280}px) {
|
|
1899
|
+
${te(e, ...t)}
|
|
1900
|
+
}
|
|
1901
|
+
`, Mi = (e) => (t, ...n) => te`
|
|
1902
|
+
@media screen and (max-width: ${e}px) {
|
|
1903
|
+
${te(t, ...n)}
|
|
1904
|
+
}
|
|
1905
|
+
`, Rt = L.div`
|
|
1906
|
+
position: relative;
|
|
1907
|
+
display: flex;
|
|
1908
|
+
align-items: center;
|
|
1909
|
+
box-sizing: border-box;
|
|
1910
|
+
line-height: normal;
|
|
1911
|
+
${({ theme: e, $headCell: t }) => e[t ? "headCells" : "cells"].style};
|
|
1912
|
+
${({ $noPadding: e }) => e && "padding: 0"};
|
|
1913
|
+
`, Lo = L(Rt)`
|
|
1914
|
+
flex-grow: ${({ button: e, grow: t }) => t === 0 || e ? 0 : t || 1};
|
|
1915
|
+
flex-shrink: 0;
|
|
1916
|
+
flex-basis: 0;
|
|
1917
|
+
max-width: ${({ maxWidth: e }) => e || "100%"};
|
|
1918
|
+
min-width: ${({ minWidth: e }) => e || "100px"};
|
|
1919
|
+
${({ width: e }) => e && te`
|
|
1920
|
+
min-width: ${e};
|
|
1921
|
+
max-width: ${e};
|
|
1922
|
+
`};
|
|
1923
|
+
${({ right: e }) => e && "justify-content: flex-end"};
|
|
1924
|
+
${({ button: e, center: t }) => (t || e) && "justify-content: center"};
|
|
1925
|
+
${({ compact: e, button: t }) => (e || t) && "padding: 0"};
|
|
1926
|
+
|
|
1927
|
+
/* handle hiding cells */
|
|
1928
|
+
${({ hide: e }) => e && e === "sm" && Fo`
|
|
1929
|
+
display: none;
|
|
1930
|
+
`};
|
|
1931
|
+
${({ hide: e }) => e && e === "md" && Fi`
|
|
1932
|
+
display: none;
|
|
1933
|
+
`};
|
|
1934
|
+
${({ hide: e }) => e && e === "lg" && Li`
|
|
1935
|
+
display: none;
|
|
1936
|
+
`};
|
|
1937
|
+
${({ hide: e }) => e && Number.isInteger(e) && Mi(e)`
|
|
1938
|
+
display: none;
|
|
1939
|
+
`};
|
|
1940
|
+
`, Hi = te`
|
|
1941
|
+
div:first-child {
|
|
1942
|
+
white-space: ${({ $wrapCell: e }) => e ? "normal" : "nowrap"};
|
|
1943
|
+
overflow: ${({ $allowOverflow: e }) => e ? "visible" : "hidden"};
|
|
1944
|
+
text-overflow: ellipsis;
|
|
1945
|
+
}
|
|
1946
|
+
`, zi = L(Lo).attrs(((e) => ({ style: e.style })))`
|
|
1947
|
+
${({ $renderAsCell: e }) => !e && Hi};
|
|
1948
|
+
${({ theme: e, $isDragging: t }) => t && e.cells.draggingStyle};
|
|
1949
|
+
${({ $cellStyle: e }) => e};
|
|
1950
|
+
`;
|
|
1951
|
+
var Wi = u.memo((function({ id: e, column: t, row: n, rowIndex: r, dataTag: o, isDragging: a, onDragStart: i, onDragOver: l, onDragEnd: c, onDragEnter: f, onDragLeave: d }) {
|
|
1952
|
+
const { conditionalStyle: g, classNames: y } = No(n, t.conditionalCellStyles, ["rdt_TableCell"]);
|
|
1953
|
+
return u.createElement(zi, { id: e, "data-column-id": t.id, role: "cell", className: y, "data-tag": o, $cellStyle: t.style, $renderAsCell: !!t.cell, $allowOverflow: t.allowOverflow, button: t.button, center: t.center, compact: t.compact, grow: t.grow, hide: t.hide, maxWidth: t.maxWidth, minWidth: t.minWidth, right: t.right, width: t.width, $wrapCell: t.wrap, style: g, $isDragging: a, onDragStart: i, onDragOver: l, onDragEnd: c, onDragEnter: f, onDragLeave: d }, !t.cell && u.createElement("div", { "data-tag": o }, (function(b, E, S, $) {
|
|
1954
|
+
return E ? S && typeof S == "function" ? S(b, $) : E(b, $) : null;
|
|
1955
|
+
})(n, t.selector, t.format, r)), t.cell && t.cell(n, r, t, e));
|
|
1956
|
+
}));
|
|
1957
|
+
const Qr = "input";
|
|
1958
|
+
var Mo = u.memo((function({ name: e, component: t = Qr, componentOptions: n = { style: {} }, indeterminate: r = !1, checked: o = !1, disabled: a = !1, onClick: i = ee }) {
|
|
1959
|
+
const l = t, c = l !== Qr ? n.style : ((d) => Object.assign(Object.assign({ fontSize: "18px" }, !d && { cursor: "pointer" }), { padding: 0, marginTop: "1px", verticalAlign: "middle", position: "relative" }))(a), f = u.useMemo((() => (function(d, ...g) {
|
|
1960
|
+
let y;
|
|
1961
|
+
return Object.keys(d).map(((b) => d[b])).forEach(((b, E) => {
|
|
1962
|
+
typeof b == "function" && (y = Object.assign(Object.assign({}, d), { [Object.keys(d)[E]]: b(...g) }));
|
|
1963
|
+
})), y || d;
|
|
1964
|
+
})(n, r)), [n, r]);
|
|
1965
|
+
return u.createElement(l, Object.assign({ type: "checkbox", ref: (d) => {
|
|
1966
|
+
d && (d.indeterminate = r);
|
|
1967
|
+
}, style: c, onClick: a ? ee : i, name: e, "aria-label": e, checked: o, disabled: a }, f, { onChange: ee }));
|
|
1968
|
+
}));
|
|
1969
|
+
const Bi = L(Rt)`
|
|
1970
|
+
flex: 0 0 48px;
|
|
1971
|
+
min-width: 48px;
|
|
1972
|
+
justify-content: center;
|
|
1973
|
+
align-items: center;
|
|
1974
|
+
user-select: none;
|
|
1975
|
+
white-space: nowrap;
|
|
1976
|
+
`;
|
|
1977
|
+
function Vi({ name: e, keyField: t, row: n, rowCount: r, selected: o, selectableRowsComponent: a, selectableRowsComponentProps: i, selectableRowsSingle: l, selectableRowDisabled: c, onSelectedRow: f }) {
|
|
1978
|
+
const d = !(!c || !c(n));
|
|
1979
|
+
return u.createElement(Bi, { onClick: (g) => g.stopPropagation(), className: "rdt_TableCell", $noPadding: !0 }, u.createElement(Mo, { name: e, component: a, componentOptions: i, checked: o, "aria-checked": o, onClick: () => {
|
|
1980
|
+
f({ type: "SELECT_SINGLE_ROW", row: n, isSelected: o, keyField: t, rowCount: r, singleSelect: l });
|
|
1981
|
+
}, disabled: d }));
|
|
1982
|
+
}
|
|
1983
|
+
const qi = L.button`
|
|
1984
|
+
display: inline-flex;
|
|
1985
|
+
align-items: center;
|
|
1986
|
+
user-select: none;
|
|
1987
|
+
white-space: nowrap;
|
|
1988
|
+
border: none;
|
|
1989
|
+
background-color: transparent;
|
|
1990
|
+
${({ theme: e }) => e.expanderButton.style};
|
|
1991
|
+
`;
|
|
1992
|
+
function Gi({ disabled: e = !1, expanded: t = !1, expandableIcon: n, id: r, row: o, onToggled: a }) {
|
|
1993
|
+
const i = t ? n.expanded : n.collapsed;
|
|
1994
|
+
return u.createElement(qi, { "aria-disabled": e, onClick: () => a && a(o), "data-testid": `expander-button-${r}`, disabled: e, "aria-label": t ? "Collapse Row" : "Expand Row", role: "button", type: "button" }, i);
|
|
1995
|
+
}
|
|
1996
|
+
const Yi = L(Rt)`
|
|
1997
|
+
white-space: nowrap;
|
|
1998
|
+
font-weight: 400;
|
|
1999
|
+
min-width: 48px;
|
|
2000
|
+
${({ theme: e }) => e.expanderCell.style};
|
|
2001
|
+
`;
|
|
2002
|
+
function Ui({ row: e, expanded: t = !1, expandableIcon: n, id: r, onToggled: o, disabled: a = !1 }) {
|
|
2003
|
+
return u.createElement(Yi, { onClick: (i) => i.stopPropagation(), $noPadding: !0 }, u.createElement(Gi, { id: r, row: e, expanded: t, expandableIcon: n, disabled: a, onToggled: o }));
|
|
2004
|
+
}
|
|
2005
|
+
const Ki = L.div`
|
|
2006
|
+
width: 100%;
|
|
2007
|
+
box-sizing: border-box;
|
|
2008
|
+
${({ theme: e }) => e.expanderRow.style};
|
|
2009
|
+
${({ $extendedRowStyle: e }) => e};
|
|
2010
|
+
`;
|
|
2011
|
+
var Qi = u.memo((function({ data: e, ExpanderComponent: t, expanderComponentProps: n, extendedRowStyle: r, extendedClassNames: o }) {
|
|
2012
|
+
const a = ["rdt_ExpanderRow", ...o.split(" ").filter(((i) => i !== "rdt_TableRow"))].join(" ");
|
|
2013
|
+
return u.createElement(Ki, { className: a, $extendedRowStyle: r }, u.createElement(t, Object.assign({ data: e }, n)));
|
|
2014
|
+
}));
|
|
2015
|
+
const er = "allowRowEvents";
|
|
2016
|
+
var Pn, fr, Jr;
|
|
2017
|
+
(function(e) {
|
|
2018
|
+
e.LTR = "ltr", e.RTL = "rtl", e.AUTO = "auto";
|
|
2019
|
+
})(Pn || (Pn = {})), (function(e) {
|
|
2020
|
+
e.LEFT = "left", e.RIGHT = "right", e.CENTER = "center";
|
|
2021
|
+
})(fr || (fr = {})), (function(e) {
|
|
2022
|
+
e.SM = "sm", e.MD = "md", e.LG = "lg";
|
|
2023
|
+
})(Jr || (Jr = {}));
|
|
2024
|
+
const Ji = te`
|
|
2025
|
+
&:hover {
|
|
2026
|
+
${({ $highlightOnHover: e, theme: t }) => e && t.rows.highlightOnHoverStyle};
|
|
2027
|
+
}
|
|
2028
|
+
`, Xi = te`
|
|
2029
|
+
&:hover {
|
|
2030
|
+
cursor: pointer;
|
|
2031
|
+
}
|
|
2032
|
+
`, Zi = L.div.attrs(((e) => ({ style: e.style })))`
|
|
2033
|
+
display: flex;
|
|
2034
|
+
align-items: stretch;
|
|
2035
|
+
align-content: stretch;
|
|
2036
|
+
width: 100%;
|
|
2037
|
+
box-sizing: border-box;
|
|
2038
|
+
${({ theme: e }) => e.rows.style};
|
|
2039
|
+
${({ $dense: e, theme: t }) => e && t.rows.denseStyle};
|
|
2040
|
+
${({ $striped: e, theme: t }) => e && t.rows.stripedStyle};
|
|
2041
|
+
${({ $highlightOnHover: e }) => e && Ji};
|
|
2042
|
+
${({ $pointerOnHover: e }) => e && Xi};
|
|
2043
|
+
${({ $selected: e, theme: t }) => e && t.rows.selectedHighlightStyle};
|
|
2044
|
+
${({ $conditionalStyle: e }) => e};
|
|
2045
|
+
`;
|
|
2046
|
+
function es({ columns: e = [], conditionalRowStyles: t = [], defaultExpanded: n = !1, defaultExpanderDisabled: r = !1, dense: o = !1, expandableIcon: a, expandableRows: i = !1, expandableRowsComponent: l, expandableRowsComponentProps: c, expandableRowsHideExpander: f, expandOnRowClicked: d = !1, expandOnRowDoubleClicked: g = !1, highlightOnHover: y = !1, id: b, expandableInheritConditionalStyles: E, keyField: S, onRowClicked: $ = ee, onRowDoubleClicked: P = ee, onRowMouseEnter: C = ee, onRowMouseLeave: O = ee, onRowExpandToggled: j = ee, onSelectedRow: _ = ee, pointerOnHover: w = !1, row: v, rowCount: N, rowIndex: Q, selectableRowDisabled: re = null, selectableRows: ge = !1, selectableRowsComponent: be, selectableRowsComponentProps: H, selectableRowsHighlight: ie = !1, selectableRowsSingle: ye = !1, selected: $e, striped: ve = !1, draggingColumnId: Ae, onDragStart: se, onDragOver: xe, onDragEnd: Se, onDragEnter: q, onDragLeave: Oe }) {
|
|
2047
|
+
const [ue, Pe] = u.useState(n);
|
|
2048
|
+
u.useEffect((() => {
|
|
2049
|
+
Pe(n);
|
|
2050
|
+
}), [n]);
|
|
2051
|
+
const oe = u.useCallback((() => {
|
|
2052
|
+
Pe(!ue), j(!ue, v);
|
|
2053
|
+
}), [ue, j, v]), Ce = w || i && (d || g), de = u.useCallback(((U) => {
|
|
2054
|
+
U.target.getAttribute("data-tag") === er && ($(v, U), !r && i && d && oe());
|
|
2055
|
+
}), [r, d, i, oe, $, v]), le = u.useCallback(((U) => {
|
|
2056
|
+
U.target.getAttribute("data-tag") === er && (P(v, U), !r && i && g && oe());
|
|
2057
|
+
}), [r, g, i, oe, P, v]), Ee = u.useCallback(((U) => {
|
|
2058
|
+
C(v, U);
|
|
2059
|
+
}), [C, v]), pe = u.useCallback(((U) => {
|
|
2060
|
+
O(v, U);
|
|
2061
|
+
}), [O, v]), Z = wt(v, S), { conditionalStyle: nt, classNames: rt } = No(v, t, ["rdt_TableRow"]), He = ie && $e, Ie = E ? nt : {}, ot = ve && Q % 2 == 0;
|
|
2062
|
+
return u.createElement(u.Fragment, null, u.createElement(Zi, { id: `row-${b}`, role: "row", $striped: ot, $highlightOnHover: y, $pointerOnHover: !r && Ce, $dense: o, onClick: de, onDoubleClick: le, onMouseEnter: Ee, onMouseLeave: pe, className: rt, $selected: He, $conditionalStyle: nt }, ge && u.createElement(Vi, { name: `select-row-${Z}`, keyField: S, row: v, rowCount: N, selected: $e, selectableRowsComponent: be, selectableRowsComponentProps: H, selectableRowDisabled: re, selectableRowsSingle: ye, onSelectedRow: _ }), i && !f && u.createElement(Ui, { id: Z, expandableIcon: a, expanded: ue, row: v, onToggled: oe, disabled: r }), e.map(((U) => U.omit ? null : u.createElement(Wi, { id: `cell-${U.id}-${Z}`, key: `cell-${U.id}-${Z}`, dataTag: U.ignoreRowClick || U.button ? null : er, column: U, row: v, rowIndex: Q, isDragging: zt(Ae, U.id), onDragStart: se, onDragOver: xe, onDragEnd: Se, onDragEnter: q, onDragLeave: Oe })))), i && ue && u.createElement(Qi, { key: `expander-${Z}`, data: v, extendedRowStyle: Ie, extendedClassNames: rt, ExpanderComponent: l, expanderComponentProps: c }));
|
|
2063
|
+
}
|
|
2064
|
+
const ts = L.span`
|
|
2065
|
+
padding: 2px;
|
|
2066
|
+
color: inherit;
|
|
2067
|
+
flex-grow: 0;
|
|
2068
|
+
flex-shrink: 0;
|
|
2069
|
+
${({ $sortActive: e }) => e ? "opacity: 1" : "opacity: 0"};
|
|
2070
|
+
${({ $sortDirection: e }) => e === "desc" && "transform: rotate(180deg)"};
|
|
2071
|
+
`, ns = ({ sortActive: e, sortDirection: t }) => A.createElement(ts, { $sortActive: e, $sortDirection: t }, "▲"), rs = L(Lo)`
|
|
2072
|
+
${({ button: e }) => e && "text-align: center"};
|
|
2073
|
+
${({ theme: e, $isDragging: t }) => t && e.headCells.draggingStyle};
|
|
2074
|
+
`, os = te`
|
|
2075
|
+
cursor: pointer;
|
|
2076
|
+
span.__rdt_custom_sort_icon__ {
|
|
2077
|
+
i,
|
|
2078
|
+
svg {
|
|
2079
|
+
transform: 'translate3d(0, 0, 0)';
|
|
2080
|
+
${({ $sortActive: e }) => e ? "opacity: 1" : "opacity: 0"};
|
|
2081
|
+
color: inherit;
|
|
2082
|
+
font-size: 18px;
|
|
2083
|
+
height: 18px;
|
|
2084
|
+
width: 18px;
|
|
2085
|
+
backface-visibility: hidden;
|
|
2086
|
+
transform-style: preserve-3d;
|
|
2087
|
+
transition-duration: 95ms;
|
|
2088
|
+
transition-property: transform;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
&.asc i,
|
|
2092
|
+
&.asc svg {
|
|
2093
|
+
transform: rotate(180deg);
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
${({ $sortActive: e }) => !e && te`
|
|
2098
|
+
&:hover,
|
|
2099
|
+
&:focus {
|
|
2100
|
+
opacity: 0.7;
|
|
2101
|
+
|
|
2102
|
+
span,
|
|
2103
|
+
span.__rdt_custom_sort_icon__ * {
|
|
2104
|
+
opacity: 0.7;
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
`};
|
|
2108
|
+
`, as = L.div`
|
|
2109
|
+
display: inline-flex;
|
|
2110
|
+
align-items: center;
|
|
2111
|
+
justify-content: inherit;
|
|
2112
|
+
height: 100%;
|
|
2113
|
+
width: 100%;
|
|
2114
|
+
outline: none;
|
|
2115
|
+
user-select: none;
|
|
2116
|
+
overflow: hidden;
|
|
2117
|
+
${({ disabled: e }) => !e && os};
|
|
2118
|
+
`, is = L.div`
|
|
2119
|
+
overflow: hidden;
|
|
2120
|
+
white-space: nowrap;
|
|
2121
|
+
text-overflow: ellipsis;
|
|
2122
|
+
`;
|
|
2123
|
+
var ss = u.memo((function({ column: e, disabled: t, draggingColumnId: n, selectedColumn: r = {}, sortDirection: o, sortIcon: a, sortServer: i, pagination: l, paginationServer: c, persistSelectedOnSort: f, selectableRowsVisibleOnly: d, onSort: g, onDragStart: y, onDragOver: b, onDragEnd: E, onDragEnter: S, onDragLeave: $ }) {
|
|
2124
|
+
u.useEffect((() => {
|
|
2125
|
+
typeof e.selector == "string" && console.error(`Warning: ${e.selector} is a string based column selector which has been deprecated as of v7 and will be removed in v8. Instead, use a selector function e.g. row => row[field]...`);
|
|
2126
|
+
}), []);
|
|
2127
|
+
const [P, C] = u.useState(!1), O = u.useRef(null);
|
|
2128
|
+
if (u.useEffect((() => {
|
|
2129
|
+
O.current && C(O.current.scrollWidth > O.current.clientWidth);
|
|
2130
|
+
}), [P]), e.omit) return null;
|
|
2131
|
+
const j = () => {
|
|
2132
|
+
if (!e.sortable && !e.selector) return;
|
|
2133
|
+
let H = o;
|
|
2134
|
+
zt(r.id, e.id) && (H = o === Ge.ASC ? Ge.DESC : Ge.ASC), g({ type: "SORT_CHANGE", sortDirection: H, selectedColumn: e, clearSelectedOnSort: l && c && !f || i || d });
|
|
2135
|
+
}, _ = (H) => u.createElement(ns, { sortActive: H, sortDirection: o }), w = () => u.createElement("span", { className: [o, "__rdt_custom_sort_icon__"].join(" ") }, a), v = !(!e.sortable || !zt(r.id, e.id)), N = !e.sortable || t, Q = e.sortable && !a && !e.right, re = e.sortable && !a && e.right, ge = e.sortable && a && !e.right, be = e.sortable && a && e.right;
|
|
2136
|
+
return u.createElement(rs, { "data-column-id": e.id, className: "rdt_TableCol", $headCell: !0, allowOverflow: e.allowOverflow, button: e.button, compact: e.compact, grow: e.grow, hide: e.hide, maxWidth: e.maxWidth, minWidth: e.minWidth, right: e.right, center: e.center, width: e.width, draggable: e.reorder, $isDragging: zt(e.id, n), onDragStart: y, onDragOver: b, onDragEnd: E, onDragEnter: S, onDragLeave: $ }, e.name && u.createElement(as, { "data-column-id": e.id, "data-sort-id": e.id, role: "columnheader", tabIndex: 0, className: "rdt_TableCol_Sortable", onClick: N ? void 0 : j, onKeyPress: N ? void 0 : (H) => {
|
|
2137
|
+
H.key === "Enter" && j();
|
|
2138
|
+
}, $sortActive: !N && v, disabled: N }, !N && be && w(), !N && re && _(v), typeof e.name == "string" ? u.createElement(is, { title: P ? e.name : void 0, ref: O, "data-column-id": e.id }, e.name) : e.name, !N && ge && w(), !N && Q && _(v)));
|
|
2139
|
+
}));
|
|
2140
|
+
const ls = L(Rt)`
|
|
2141
|
+
flex: 0 0 48px;
|
|
2142
|
+
justify-content: center;
|
|
2143
|
+
align-items: center;
|
|
2144
|
+
user-select: none;
|
|
2145
|
+
white-space: nowrap;
|
|
2146
|
+
font-size: unset;
|
|
2147
|
+
`;
|
|
2148
|
+
function cs({ headCell: e = !0, rowData: t, keyField: n, allSelected: r, mergeSelections: o, selectedRows: a, selectableRowsComponent: i, selectableRowsComponentProps: l, selectableRowDisabled: c, onSelectAllRows: f }) {
|
|
2149
|
+
const d = a.length > 0 && !r, g = c ? t.filter(((E) => !c(E))) : t, y = g.length === 0, b = Math.min(t.length, g.length);
|
|
2150
|
+
return u.createElement(ls, { className: "rdt_TableCol", $headCell: e, $noPadding: !0 }, u.createElement(Mo, { name: "select-all-rows", component: i, componentOptions: l, onClick: () => {
|
|
2151
|
+
f({ type: "SELECT_ALL_ROWS", rows: g, rowCount: b, mergeSelections: o, keyField: n });
|
|
2152
|
+
}, checked: r, indeterminate: d, disabled: y }));
|
|
2153
|
+
}
|
|
2154
|
+
function Ho(e = Pn.AUTO) {
|
|
2155
|
+
const t = typeof window == "object", [n, r] = u.useState(!1);
|
|
2156
|
+
return u.useEffect((() => {
|
|
2157
|
+
if (t) if (e !== "auto") r(e === "rtl");
|
|
2158
|
+
else {
|
|
2159
|
+
const o = !(!window.document || !window.document.createElement), a = document.getElementsByTagName("BODY")[0], i = document.getElementsByTagName("HTML")[0], l = a.dir === "rtl" || i.dir === "rtl";
|
|
2160
|
+
r(o && l);
|
|
2161
|
+
}
|
|
2162
|
+
}), [e, t]), n;
|
|
2163
|
+
}
|
|
2164
|
+
const us = L.div`
|
|
2165
|
+
display: flex;
|
|
2166
|
+
align-items: center;
|
|
2167
|
+
flex: 1 0 auto;
|
|
2168
|
+
height: 100%;
|
|
2169
|
+
color: ${({ theme: e }) => e.contextMenu.fontColor};
|
|
2170
|
+
font-size: ${({ theme: e }) => e.contextMenu.fontSize};
|
|
2171
|
+
font-weight: 400;
|
|
2172
|
+
`, ds = L.div`
|
|
2173
|
+
display: flex;
|
|
2174
|
+
align-items: center;
|
|
2175
|
+
justify-content: flex-end;
|
|
2176
|
+
flex-wrap: wrap;
|
|
2177
|
+
`, Xr = L.div`
|
|
2178
|
+
position: absolute;
|
|
2179
|
+
top: 0;
|
|
2180
|
+
left: 0;
|
|
2181
|
+
width: 100%;
|
|
2182
|
+
height: 100%;
|
|
2183
|
+
box-sizing: inherit;
|
|
2184
|
+
z-index: 1;
|
|
2185
|
+
align-items: center;
|
|
2186
|
+
justify-content: space-between;
|
|
2187
|
+
display: flex;
|
|
2188
|
+
${({ $rtl: e }) => e && "direction: rtl"};
|
|
2189
|
+
${({ theme: e }) => e.contextMenu.style};
|
|
2190
|
+
${({ theme: e, $visible: t }) => t && e.contextMenu.activeStyle};
|
|
2191
|
+
`;
|
|
2192
|
+
function ps({ contextMessage: e, contextActions: t, contextComponent: n, selectedCount: r, direction: o }) {
|
|
2193
|
+
const a = Ho(o), i = r > 0;
|
|
2194
|
+
return n ? u.createElement(Xr, { $visible: i }, u.cloneElement(n, { selectedCount: r })) : u.createElement(Xr, { $visible: i, $rtl: a }, u.createElement(us, null, ((l, c, f) => {
|
|
2195
|
+
if (c === 0) return null;
|
|
2196
|
+
const d = c === 1 ? l.singular : l.plural;
|
|
2197
|
+
return f ? `${c} ${l.message || ""} ${d}` : `${c} ${d} ${l.message || ""}`;
|
|
2198
|
+
})(e, r, a)), u.createElement(ds, null, t));
|
|
2199
|
+
}
|
|
2200
|
+
const fs = L.div`
|
|
2201
|
+
position: relative;
|
|
2202
|
+
box-sizing: border-box;
|
|
2203
|
+
overflow: hidden;
|
|
2204
|
+
display: flex;
|
|
2205
|
+
flex: 1 1 auto;
|
|
2206
|
+
align-items: center;
|
|
2207
|
+
justify-content: space-between;
|
|
2208
|
+
width: 100%;
|
|
2209
|
+
flex-wrap: wrap;
|
|
2210
|
+
${({ theme: e }) => e.header.style}
|
|
2211
|
+
`, gs = L.div`
|
|
2212
|
+
flex: 1 0 auto;
|
|
2213
|
+
color: ${({ theme: e }) => e.header.fontColor};
|
|
2214
|
+
font-size: ${({ theme: e }) => e.header.fontSize};
|
|
2215
|
+
font-weight: 400;
|
|
2216
|
+
`, hs = L.div`
|
|
2217
|
+
flex: 1 0 auto;
|
|
2218
|
+
display: flex;
|
|
2219
|
+
align-items: center;
|
|
2220
|
+
justify-content: flex-end;
|
|
2221
|
+
|
|
2222
|
+
> * {
|
|
2223
|
+
margin-left: 5px;
|
|
2224
|
+
}
|
|
2225
|
+
`, ms = ({ title: e, actions: t = null, contextMessage: n, contextActions: r, contextComponent: o, selectedCount: a, direction: i, showMenu: l = !0 }) => u.createElement(fs, { className: "rdt_TableHeader", role: "heading", "aria-level": 1 }, u.createElement(gs, null, e), t && u.createElement(hs, null, t), l && u.createElement(ps, { contextMessage: n, contextActions: r, contextComponent: o, direction: i, selectedCount: a }));
|
|
2226
|
+
function zo(e, t) {
|
|
2227
|
+
var n = {};
|
|
2228
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2229
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
2230
|
+
var o = 0;
|
|
2231
|
+
for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
2232
|
+
}
|
|
2233
|
+
return n;
|
|
2234
|
+
}
|
|
2235
|
+
const bs = { left: "flex-start", right: "flex-end", center: "center" }, ys = L.header`
|
|
2236
|
+
position: relative;
|
|
2237
|
+
display: flex;
|
|
2238
|
+
flex: 1 1 auto;
|
|
2239
|
+
box-sizing: border-box;
|
|
2240
|
+
align-items: center;
|
|
2241
|
+
padding: 4px 16px 4px 24px;
|
|
2242
|
+
width: 100%;
|
|
2243
|
+
justify-content: ${({ align: e }) => bs[e]};
|
|
2244
|
+
flex-wrap: ${({ $wrapContent: e }) => e ? "wrap" : "nowrap"};
|
|
2245
|
+
${({ theme: e }) => e.subHeader.style}
|
|
2246
|
+
`, vs = (e) => {
|
|
2247
|
+
var { align: t = "right", wrapContent: n = !0 } = e, r = zo(e, ["align", "wrapContent"]);
|
|
2248
|
+
return u.createElement(ys, Object.assign({ align: t, $wrapContent: n }, r));
|
|
2249
|
+
}, ws = L.div`
|
|
2250
|
+
display: flex;
|
|
2251
|
+
flex-direction: column;
|
|
2252
|
+
`, xs = L.div`
|
|
2253
|
+
position: relative;
|
|
2254
|
+
width: 100%;
|
|
2255
|
+
border-radius: inherit;
|
|
2256
|
+
${({ $responsive: e, $fixedHeader: t }) => e && te`
|
|
2257
|
+
overflow-x: auto;
|
|
2258
|
+
|
|
2259
|
+
// hidden prevents vertical scrolling in firefox when fixedHeader is disabled
|
|
2260
|
+
overflow-y: ${t ? "auto" : "hidden"};
|
|
2261
|
+
min-height: 0;
|
|
2262
|
+
`};
|
|
2263
|
+
|
|
2264
|
+
${({ $fixedHeader: e = !1, $fixedHeaderScrollHeight: t = "100vh" }) => e && te`
|
|
2265
|
+
max-height: ${t};
|
|
2266
|
+
-webkit-overflow-scrolling: touch;
|
|
2267
|
+
`};
|
|
2268
|
+
|
|
2269
|
+
${({ theme: e }) => e.responsiveWrapper.style};
|
|
2270
|
+
`, Zr = L.div`
|
|
2271
|
+
position: relative;
|
|
2272
|
+
box-sizing: border-box;
|
|
2273
|
+
width: 100%;
|
|
2274
|
+
height: 100%;
|
|
2275
|
+
${(e) => e.theme.progress.style};
|
|
2276
|
+
`, Ss = L.div`
|
|
2277
|
+
position: relative;
|
|
2278
|
+
width: 100%;
|
|
2279
|
+
${({ theme: e }) => e.tableWrapper.style};
|
|
2280
|
+
`, Cs = L(Rt)`
|
|
2281
|
+
white-space: nowrap;
|
|
2282
|
+
${({ theme: e }) => e.expanderCell.style};
|
|
2283
|
+
`, Es = L.div`
|
|
2284
|
+
box-sizing: border-box;
|
|
2285
|
+
width: 100%;
|
|
2286
|
+
height: 100%;
|
|
2287
|
+
${({ theme: e }) => e.noData.style};
|
|
2288
|
+
`, Rs = () => A.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }, A.createElement("path", { d: "M7 10l5 5 5-5z" }), A.createElement("path", { d: "M0 0h24v24H0z", fill: "none" })), $s = L.select`
|
|
2289
|
+
cursor: pointer;
|
|
2290
|
+
height: 24px;
|
|
2291
|
+
max-width: 100%;
|
|
2292
|
+
user-select: none;
|
|
2293
|
+
padding-left: 8px;
|
|
2294
|
+
padding-right: 24px;
|
|
2295
|
+
box-sizing: content-box;
|
|
2296
|
+
font-size: inherit;
|
|
2297
|
+
color: inherit;
|
|
2298
|
+
border: none;
|
|
2299
|
+
background-color: transparent;
|
|
2300
|
+
appearance: none;
|
|
2301
|
+
direction: ltr;
|
|
2302
|
+
flex-shrink: 0;
|
|
2303
|
+
|
|
2304
|
+
&::-ms-expand {
|
|
2305
|
+
display: none;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
&:disabled::-ms-expand {
|
|
2309
|
+
background: #f60;
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
option {
|
|
2313
|
+
color: initial;
|
|
2314
|
+
}
|
|
2315
|
+
`, Os = L.div`
|
|
2316
|
+
position: relative;
|
|
2317
|
+
flex-shrink: 0;
|
|
2318
|
+
font-size: inherit;
|
|
2319
|
+
color: inherit;
|
|
2320
|
+
margin-top: 1px;
|
|
2321
|
+
|
|
2322
|
+
svg {
|
|
2323
|
+
top: 0;
|
|
2324
|
+
right: 0;
|
|
2325
|
+
color: inherit;
|
|
2326
|
+
position: absolute;
|
|
2327
|
+
fill: currentColor;
|
|
2328
|
+
width: 24px;
|
|
2329
|
+
height: 24px;
|
|
2330
|
+
display: inline-block;
|
|
2331
|
+
user-select: none;
|
|
2332
|
+
pointer-events: none;
|
|
2333
|
+
}
|
|
2334
|
+
`, Ps = (e) => {
|
|
2335
|
+
var { defaultValue: t, onChange: n } = e, r = zo(e, ["defaultValue", "onChange"]);
|
|
2336
|
+
return u.createElement(Os, null, u.createElement($s, Object.assign({ onChange: n, defaultValue: t }, r)), u.createElement(Rs, null));
|
|
2337
|
+
}, m = { columns: [], data: [], title: "", keyField: "id", selectableRows: !1, selectableRowsHighlight: !1, selectableRowsNoSelectAll: !1, selectableRowSelected: null, selectableRowDisabled: null, selectableRowsComponent: "input", selectableRowsComponentProps: {}, selectableRowsVisibleOnly: !1, selectableRowsSingle: !1, clearSelectedRows: !1, expandableRows: !1, expandableRowDisabled: null, expandableRowExpanded: null, expandOnRowClicked: !1, expandableRowsHideExpander: !1, expandOnRowDoubleClicked: !1, expandableInheritConditionalStyles: !1, expandableRowsComponent: function() {
|
|
2338
|
+
return A.createElement("div", null, "To add an expander pass in a component instance via ", A.createElement("strong", null, "expandableRowsComponent"), ". You can then access props.data from this component.");
|
|
2339
|
+
}, expandableIcon: { collapsed: A.createElement((() => A.createElement("svg", { fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", xmlns: "http://www.w3.org/2000/svg" }, A.createElement("path", { d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z" }), A.createElement("path", { d: "M0-.25h24v24H0z", fill: "none" }))), null), expanded: A.createElement((() => A.createElement("svg", { fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", xmlns: "http://www.w3.org/2000/svg" }, A.createElement("path", { d: "M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z" }), A.createElement("path", { d: "M0-.75h24v24H0z", fill: "none" }))), null) }, expandableRowsComponentProps: {}, progressPending: !1, progressComponent: A.createElement("div", { style: { fontSize: "24px", fontWeight: 700, padding: "24px" } }, "Loading..."), persistTableHead: !1, sortIcon: null, sortFunction: null, sortServer: !1, striped: !1, highlightOnHover: !1, pointerOnHover: !1, noContextMenu: !1, contextMessage: { singular: "item", plural: "items", message: "selected" }, actions: null, contextActions: null, contextComponent: null, defaultSortFieldId: null, defaultSortAsc: !0, responsive: !0, noDataComponent: A.createElement("div", { style: { padding: "24px" } }, "There are no records to display"), disabled: !1, noTableHead: !1, noHeader: !1, subHeader: !1, subHeaderAlign: fr.RIGHT, subHeaderWrap: !0, subHeaderComponent: null, fixedHeader: !1, fixedHeaderScrollHeight: "100vh", pagination: !1, paginationServer: !1, paginationServerOptions: { persistSelectedOnSort: !1, persistSelectedOnPageChange: !1 }, paginationDefaultPage: 1, paginationResetDefaultPage: !1, paginationTotalRows: 0, paginationPerPage: 10, paginationRowsPerPageOptions: [10, 15, 20, 25, 30], paginationComponent: null, paginationComponentOptions: {}, paginationIconFirstPage: A.createElement((() => A.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-hidden": "true", role: "presentation" }, A.createElement("path", { d: "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" }), A.createElement("path", { fill: "none", d: "M24 24H0V0h24v24z" }))), null), paginationIconLastPage: A.createElement((() => A.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-hidden": "true", role: "presentation" }, A.createElement("path", { d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z" }), A.createElement("path", { fill: "none", d: "M0 0h24v24H0V0z" }))), null), paginationIconNext: A.createElement((() => A.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-hidden": "true", role: "presentation" }, A.createElement("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), A.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }))), null), paginationIconPrevious: A.createElement((() => A.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-hidden": "true", role: "presentation" }, A.createElement("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), A.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }))), null), dense: !1, conditionalRowStyles: [], theme: "default", customStyles: {}, direction: Pn.AUTO, onChangePage: ee, onChangeRowsPerPage: ee, onRowClicked: ee, onRowDoubleClicked: ee, onRowMouseEnter: ee, onRowMouseLeave: ee, onRowExpandToggled: ee, onSelectedRowsChange: ee, onSort: ee, onColumnOrderChange: ee }, js = { rowsPerPageText: "Rows per page:", rangeSeparatorText: "of", noRowsPerPage: !1, selectAllRowsItem: !1, selectAllRowsItemText: "All" }, ks = L.nav`
|
|
2340
|
+
display: flex;
|
|
2341
|
+
flex: 1 1 auto;
|
|
2342
|
+
justify-content: flex-end;
|
|
2343
|
+
align-items: center;
|
|
2344
|
+
box-sizing: border-box;
|
|
2345
|
+
padding-right: 8px;
|
|
2346
|
+
padding-left: 8px;
|
|
2347
|
+
width: 100%;
|
|
2348
|
+
${({ theme: e }) => e.pagination.style};
|
|
2349
|
+
`, gn = L.button`
|
|
2350
|
+
position: relative;
|
|
2351
|
+
display: block;
|
|
2352
|
+
user-select: none;
|
|
2353
|
+
border: none;
|
|
2354
|
+
${({ theme: e }) => e.pagination.pageButtonsStyle};
|
|
2355
|
+
${({ $isRTL: e }) => e && "transform: scale(-1, -1)"};
|
|
2356
|
+
`, Ts = L.div`
|
|
2357
|
+
display: flex;
|
|
2358
|
+
align-items: center;
|
|
2359
|
+
border-radius: 4px;
|
|
2360
|
+
white-space: nowrap;
|
|
2361
|
+
${Fo`
|
|
2362
|
+
width: 100%;
|
|
2363
|
+
justify-content: space-around;
|
|
2364
|
+
`};
|
|
2365
|
+
`, Wo = L.span`
|
|
2366
|
+
flex-shrink: 1;
|
|
2367
|
+
user-select: none;
|
|
2368
|
+
`, _s = L(Wo)`
|
|
2369
|
+
margin: 0 24px;
|
|
2370
|
+
`, Ds = L(Wo)`
|
|
2371
|
+
margin: 0 4px;
|
|
2372
|
+
`;
|
|
2373
|
+
var As = u.memo((function({ rowsPerPage: e, rowCount: t, currentPage: n, direction: r = m.direction, paginationRowsPerPageOptions: o = m.paginationRowsPerPageOptions, paginationIconLastPage: a = m.paginationIconLastPage, paginationIconFirstPage: i = m.paginationIconFirstPage, paginationIconNext: l = m.paginationIconNext, paginationIconPrevious: c = m.paginationIconPrevious, paginationComponentOptions: f = m.paginationComponentOptions, onChangeRowsPerPage: d = m.onChangeRowsPerPage, onChangePage: g = m.onChangePage }) {
|
|
2374
|
+
const y = (() => {
|
|
2375
|
+
const H = typeof window == "object";
|
|
2376
|
+
function ie() {
|
|
2377
|
+
return { width: H ? window.innerWidth : void 0, height: H ? window.innerHeight : void 0 };
|
|
2378
|
+
}
|
|
2379
|
+
const [ye, $e] = u.useState(ie);
|
|
2380
|
+
return u.useEffect((() => {
|
|
2381
|
+
if (!H) return () => null;
|
|
2382
|
+
function ve() {
|
|
2383
|
+
$e(ie());
|
|
2384
|
+
}
|
|
2385
|
+
return window.addEventListener("resize", ve), () => window.removeEventListener("resize", ve);
|
|
2386
|
+
}), []), ye;
|
|
2387
|
+
})(), b = Ho(r), E = y.width && y.width > 599, S = Ht(t, e), $ = n * e, P = $ - e + 1, C = n === 1, O = n === S, j = Object.assign(Object.assign({}, js), f), _ = n === S ? `${P}-${t} ${j.rangeSeparatorText} ${t}` : `${P}-${$} ${j.rangeSeparatorText} ${t}`, w = u.useCallback((() => g(n - 1)), [n, g]), v = u.useCallback((() => g(n + 1)), [n, g]), N = u.useCallback((() => g(1)), [g]), Q = u.useCallback((() => g(Ht(t, e))), [g, t, e]), re = u.useCallback(((H) => d(Number(H.target.value), n)), [n, d]), ge = o.map(((H) => u.createElement("option", { key: H, value: H }, H)));
|
|
2388
|
+
j.selectAllRowsItem && ge.push(u.createElement("option", { key: -1, value: t }, j.selectAllRowsItemText));
|
|
2389
|
+
const be = u.createElement(Ps, { onChange: re, defaultValue: e, "aria-label": j.rowsPerPageText }, ge);
|
|
2390
|
+
return u.createElement(ks, { className: "rdt_Pagination" }, !j.noRowsPerPage && E && u.createElement(u.Fragment, null, u.createElement(Ds, null, j.rowsPerPageText), be), E && u.createElement(_s, null, _), u.createElement(Ts, null, u.createElement(gn, { id: "pagination-first-page", type: "button", "aria-label": "First Page", "aria-disabled": C, onClick: N, disabled: C, $isRTL: b }, i), u.createElement(gn, { id: "pagination-previous-page", type: "button", "aria-label": "Previous Page", "aria-disabled": C, onClick: w, disabled: C, $isRTL: b }, c), !j.noRowsPerPage && !E && be, u.createElement(gn, { id: "pagination-next-page", type: "button", "aria-label": "Next Page", "aria-disabled": O, onClick: v, disabled: O, $isRTL: b }, l), u.createElement(gn, { id: "pagination-last-page", type: "button", "aria-label": "Last Page", "aria-disabled": O, onClick: Q, disabled: O, $isRTL: b }, a)));
|
|
2391
|
+
}));
|
|
2392
|
+
const Ye = (e, t) => {
|
|
2393
|
+
const n = u.useRef(!0);
|
|
2394
|
+
u.useEffect((() => {
|
|
2395
|
+
n.current ? n.current = !1 : e();
|
|
2396
|
+
}), t);
|
|
2397
|
+
};
|
|
2398
|
+
function Is(e) {
|
|
2399
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2400
|
+
}
|
|
2401
|
+
var Ns = function(e) {
|
|
2402
|
+
return /* @__PURE__ */ (function(t) {
|
|
2403
|
+
return !!t && typeof t == "object";
|
|
2404
|
+
})(e) && !(function(t) {
|
|
2405
|
+
var n = Object.prototype.toString.call(t);
|
|
2406
|
+
return n === "[object RegExp]" || n === "[object Date]" || (function(r) {
|
|
2407
|
+
return r.$$typeof === Fs;
|
|
2408
|
+
})(t);
|
|
2409
|
+
})(e);
|
|
2410
|
+
}, Fs = typeof Symbol == "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
2411
|
+
function Bt(e, t) {
|
|
2412
|
+
return t.clone !== !1 && t.isMergeableObject(e) ? xt((n = e, Array.isArray(n) ? [] : {}), e, t) : e;
|
|
2413
|
+
var n;
|
|
2414
|
+
}
|
|
2415
|
+
function Ls(e, t, n) {
|
|
2416
|
+
return e.concat(t).map((function(r) {
|
|
2417
|
+
return Bt(r, n);
|
|
2418
|
+
}));
|
|
2419
|
+
}
|
|
2420
|
+
function eo(e) {
|
|
2421
|
+
return Object.keys(e).concat((function(t) {
|
|
2422
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter((function(n) {
|
|
2423
|
+
return Object.propertyIsEnumerable.call(t, n);
|
|
2424
|
+
})) : [];
|
|
2425
|
+
})(e));
|
|
2426
|
+
}
|
|
2427
|
+
function to(e, t) {
|
|
2428
|
+
try {
|
|
2429
|
+
return t in e;
|
|
2430
|
+
} catch {
|
|
2431
|
+
return !1;
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
function Ms(e, t, n) {
|
|
2435
|
+
var r = {};
|
|
2436
|
+
return n.isMergeableObject(e) && eo(e).forEach((function(o) {
|
|
2437
|
+
r[o] = Bt(e[o], n);
|
|
2438
|
+
})), eo(t).forEach((function(o) {
|
|
2439
|
+
(function(a, i) {
|
|
2440
|
+
return to(a, i) && !(Object.hasOwnProperty.call(a, i) && Object.propertyIsEnumerable.call(a, i));
|
|
2441
|
+
})(e, o) || (to(e, o) && n.isMergeableObject(t[o]) ? r[o] = (function(a, i) {
|
|
2442
|
+
if (!i.customMerge) return xt;
|
|
2443
|
+
var l = i.customMerge(a);
|
|
2444
|
+
return typeof l == "function" ? l : xt;
|
|
2445
|
+
})(o, n)(e[o], t[o], n) : r[o] = Bt(t[o], n));
|
|
2446
|
+
})), r;
|
|
2447
|
+
}
|
|
2448
|
+
function xt(e, t, n) {
|
|
2449
|
+
(n = n || {}).arrayMerge = n.arrayMerge || Ls, n.isMergeableObject = n.isMergeableObject || Ns, n.cloneUnlessOtherwiseSpecified = Bt;
|
|
2450
|
+
var r = Array.isArray(t);
|
|
2451
|
+
return r === Array.isArray(e) ? r ? n.arrayMerge(e, t, n) : Ms(e, t, n) : Bt(t, n);
|
|
2452
|
+
}
|
|
2453
|
+
xt.all = function(e, t) {
|
|
2454
|
+
if (!Array.isArray(e)) throw new Error("first argument should be an array");
|
|
2455
|
+
return e.reduce((function(n, r) {
|
|
2456
|
+
return xt(n, r, t);
|
|
2457
|
+
}), {});
|
|
2458
|
+
};
|
|
2459
|
+
var Hs = Is(xt);
|
|
2460
|
+
const no = { text: { primary: "rgba(0, 0, 0, 0.87)", secondary: "rgba(0, 0, 0, 0.54)", disabled: "rgba(0, 0, 0, 0.38)" }, background: { default: "#FFFFFF" }, context: { background: "#e3f2fd", text: "rgba(0, 0, 0, 0.87)" }, divider: { default: "rgba(0,0,0,.12)" }, button: { default: "rgba(0,0,0,.54)", focus: "rgba(0,0,0,.12)", hover: "rgba(0,0,0,.12)", disabled: "rgba(0, 0, 0, .18)" }, selected: { default: "#e3f2fd", text: "rgba(0, 0, 0, 0.87)" }, highlightOnHover: { default: "#EEEEEE", text: "rgba(0, 0, 0, 0.87)" }, striped: { default: "#FAFAFA", text: "rgba(0, 0, 0, 0.87)" } }, ro = { default: no, light: no, dark: { text: { primary: "#FFFFFF", secondary: "rgba(255, 255, 255, 0.7)", disabled: "rgba(0,0,0,.12)" }, background: { default: "#424242" }, context: { background: "#E91E63", text: "#FFFFFF" }, divider: { default: "rgba(81, 81, 81, 1)" }, button: { default: "#FFFFFF", focus: "rgba(255, 255, 255, .54)", hover: "rgba(255, 255, 255, .12)", disabled: "rgba(255, 255, 255, .18)" }, selected: { default: "rgba(0, 0, 0, .7)", text: "#FFFFFF" }, highlightOnHover: { default: "rgba(0, 0, 0, .7)", text: "#FFFFFF" }, striped: { default: "rgba(0, 0, 0, .87)", text: "#FFFFFF" } } };
|
|
2461
|
+
function zs(e, t, n, r) {
|
|
2462
|
+
const [o, a] = u.useState((() => Kr(e))), [i, l] = u.useState(""), c = u.useRef("");
|
|
2463
|
+
Ye((() => {
|
|
2464
|
+
a(Kr(e));
|
|
2465
|
+
}), [e]);
|
|
2466
|
+
const f = u.useCallback((($) => {
|
|
2467
|
+
var P, C, O;
|
|
2468
|
+
const { attributes: j } = $.target, _ = (P = j.getNamedItem("data-column-id")) === null || P === void 0 ? void 0 : P.value;
|
|
2469
|
+
_ && (c.current = ((O = (C = o[fn(o, _)]) === null || C === void 0 ? void 0 : C.id) === null || O === void 0 ? void 0 : O.toString()) || "", l(c.current));
|
|
2470
|
+
}), [o]), d = u.useCallback((($) => {
|
|
2471
|
+
var P;
|
|
2472
|
+
const { attributes: C } = $.target, O = (P = C.getNamedItem("data-column-id")) === null || P === void 0 ? void 0 : P.value;
|
|
2473
|
+
if (O && c.current && O !== c.current) {
|
|
2474
|
+
const j = fn(o, c.current), _ = fn(o, O), w = [...o];
|
|
2475
|
+
w[j] = o[_], w[_] = o[j], a(w), t(w);
|
|
2476
|
+
}
|
|
2477
|
+
}), [t, o]), g = u.useCallback((($) => {
|
|
2478
|
+
$.preventDefault();
|
|
2479
|
+
}), []), y = u.useCallback((($) => {
|
|
2480
|
+
$.preventDefault();
|
|
2481
|
+
}), []), b = u.useCallback((($) => {
|
|
2482
|
+
$.preventDefault(), c.current = "", l("");
|
|
2483
|
+
}), []), E = (function($ = !1) {
|
|
2484
|
+
return $ ? Ge.ASC : Ge.DESC;
|
|
2485
|
+
})(r), S = u.useMemo((() => o[fn(o, n?.toString())] || {}), [n, o]);
|
|
2486
|
+
return { tableColumns: o, draggingColumnId: i, handleDragStart: f, handleDragEnter: d, handleDragOver: g, handleDragLeave: y, handleDragEnd: b, defaultSortDirection: E, defaultSortColumn: S };
|
|
2487
|
+
}
|
|
2488
|
+
var Bo = u.memo((function(e) {
|
|
2489
|
+
const { data: t = m.data, columns: n = m.columns, title: r = m.title, actions: o = m.actions, keyField: a = m.keyField, striped: i = m.striped, highlightOnHover: l = m.highlightOnHover, pointerOnHover: c = m.pointerOnHover, dense: f = m.dense, selectableRows: d = m.selectableRows, selectableRowsSingle: g = m.selectableRowsSingle, selectableRowsHighlight: y = m.selectableRowsHighlight, selectableRowsNoSelectAll: b = m.selectableRowsNoSelectAll, selectableRowsVisibleOnly: E = m.selectableRowsVisibleOnly, selectableRowSelected: S = m.selectableRowSelected, selectableRowDisabled: $ = m.selectableRowDisabled, selectableRowsComponent: P = m.selectableRowsComponent, selectableRowsComponentProps: C = m.selectableRowsComponentProps, onRowExpandToggled: O = m.onRowExpandToggled, onSelectedRowsChange: j = m.onSelectedRowsChange, expandableIcon: _ = m.expandableIcon, onChangeRowsPerPage: w = m.onChangeRowsPerPage, onChangePage: v = m.onChangePage, paginationServer: N = m.paginationServer, paginationServerOptions: Q = m.paginationServerOptions, paginationTotalRows: re = m.paginationTotalRows, paginationDefaultPage: ge = m.paginationDefaultPage, paginationResetDefaultPage: be = m.paginationResetDefaultPage, paginationPerPage: H = m.paginationPerPage, paginationRowsPerPageOptions: ie = m.paginationRowsPerPageOptions, paginationIconLastPage: ye = m.paginationIconLastPage, paginationIconFirstPage: $e = m.paginationIconFirstPage, paginationIconNext: ve = m.paginationIconNext, paginationIconPrevious: Ae = m.paginationIconPrevious, paginationComponent: se = m.paginationComponent, paginationComponentOptions: xe = m.paginationComponentOptions, responsive: Se = m.responsive, progressPending: q = m.progressPending, progressComponent: Oe = m.progressComponent, persistTableHead: ue = m.persistTableHead, noDataComponent: Pe = m.noDataComponent, disabled: oe = m.disabled, noTableHead: Ce = m.noTableHead, noHeader: de = m.noHeader, fixedHeader: le = m.fixedHeader, fixedHeaderScrollHeight: Ee = m.fixedHeaderScrollHeight, pagination: pe = m.pagination, subHeader: Z = m.subHeader, subHeaderAlign: nt = m.subHeaderAlign, subHeaderWrap: rt = m.subHeaderWrap, subHeaderComponent: He = m.subHeaderComponent, noContextMenu: Ie = m.noContextMenu, contextMessage: ot = m.contextMessage, contextActions: U = m.contextActions, contextComponent: at = m.contextComponent, expandableRows: it = m.expandableRows, onRowClicked: Yt = m.onRowClicked, onRowDoubleClicked: st = m.onRowDoubleClicked, onRowMouseEnter: Ut = m.onRowMouseEnter, onRowMouseLeave: Kt = m.onRowMouseLeave, sortIcon: Qt = m.sortIcon, onSort: Jt = m.onSort, sortFunction: Ot = m.sortFunction, sortServer: Pt = m.sortServer, expandableRowsComponent: Xt = m.expandableRowsComponent, expandableRowsComponentProps: Zt = m.expandableRowsComponentProps, expandableRowDisabled: en = m.expandableRowDisabled, expandableRowsHideExpander: tn = m.expandableRowsHideExpander, expandOnRowClicked: Ln = m.expandOnRowClicked, expandOnRowDoubleClicked: Mn = m.expandOnRowDoubleClicked, expandableRowExpanded: nn = m.expandableRowExpanded, expandableInheritConditionalStyles: Hn = m.expandableInheritConditionalStyles, defaultSortFieldId: zn = m.defaultSortFieldId, defaultSortAsc: jt = m.defaultSortAsc, clearSelectedRows: kt = m.clearSelectedRows, conditionalRowStyles: ze = m.conditionalRowStyles, theme: lt = m.theme, customStyles: ct = m.customStyles, direction: We = m.direction, onColumnOrderChange: Wn = m.onColumnOrderChange, className: rn } = e, { tableColumns: on, draggingColumnId: Tt, handleDragStart: _t, handleDragEnter: an, handleDragOver: sn, handleDragLeave: Dt, handleDragEnd: At, defaultSortDirection: Bn, defaultSortColumn: Vn } = zs(n, Wn, zn, jt), [{ rowsPerPage: _e, currentPage: we, selectedRows: s, allSelected: h, selectedCount: x, selectedColumn: R, sortDirection: M, toggleOnSelectedRowsChange: V }, D] = u.useReducer(Ti, { allSelected: !1, selectedCount: 0, selectedRows: [], selectedColumn: Vn, toggleOnSelectedRowsChange: !1, sortDirection: Bn, currentPage: ge, rowsPerPage: H, selectedRowsFlag: !1, contextMessage: m.contextMessage }), { persistSelectedOnSort: F = !1, persistSelectedOnPageChange: J = !1 } = Q, Y = !(!N || !J && !F), K = pe && !q && t.length > 0, he = se || As, Be = u.useMemo((() => ((k = {}, W = "default", fe = "default") => {
|
|
2490
|
+
const je = ro[W] ? W : fe;
|
|
2491
|
+
return Hs({ table: { style: { color: (T = ro[je]).text.primary, backgroundColor: T.background.default } }, tableWrapper: { style: { display: "table" } }, responsiveWrapper: { style: {} }, header: { style: { fontSize: "22px", color: T.text.primary, backgroundColor: T.background.default, minHeight: "56px", paddingLeft: "16px", paddingRight: "8px" } }, subHeader: { style: { backgroundColor: T.background.default, minHeight: "52px" } }, head: { style: { color: T.text.primary, fontSize: "12px", fontWeight: 500 } }, headRow: { style: { backgroundColor: T.background.default, minHeight: "52px", borderBottomWidth: "1px", borderBottomColor: T.divider.default, borderBottomStyle: "solid" }, denseStyle: { minHeight: "32px" } }, headCells: { style: { paddingLeft: "16px", paddingRight: "16px" }, draggingStyle: { cursor: "move" } }, contextMenu: { style: { backgroundColor: T.context.background, fontSize: "18px", fontWeight: 400, color: T.context.text, paddingLeft: "16px", paddingRight: "8px", transform: "translate3d(0, -100%, 0)", transitionDuration: "125ms", transitionTimingFunction: "cubic-bezier(0, 0, 0.2, 1)", willChange: "transform" }, activeStyle: { transform: "translate3d(0, 0, 0)" } }, cells: { style: { paddingLeft: "16px", paddingRight: "16px", wordBreak: "break-word" }, draggingStyle: {} }, rows: { style: { fontSize: "13px", fontWeight: 400, color: T.text.primary, backgroundColor: T.background.default, minHeight: "48px", "&:not(:last-of-type)": { borderBottomStyle: "solid", borderBottomWidth: "1px", borderBottomColor: T.divider.default } }, denseStyle: { minHeight: "32px" }, selectedHighlightStyle: { "&:nth-of-type(n)": { color: T.selected.text, backgroundColor: T.selected.default, borderBottomColor: T.background.default } }, highlightOnHoverStyle: { color: T.highlightOnHover.text, backgroundColor: T.highlightOnHover.default, transitionDuration: "0.15s", transitionProperty: "background-color", borderBottomColor: T.background.default, outlineStyle: "solid", outlineWidth: "1px", outlineColor: T.background.default }, stripedStyle: { color: T.striped.text, backgroundColor: T.striped.default } }, expanderRow: { style: { color: T.text.primary, backgroundColor: T.background.default } }, expanderCell: { style: { flex: "0 0 48px" } }, expanderButton: { style: { color: T.button.default, fill: T.button.default, backgroundColor: "transparent", borderRadius: "2px", transition: "0.25s", height: "100%", width: "100%", "&:hover:enabled": { cursor: "pointer" }, "&:disabled": { color: T.button.disabled }, "&:hover:not(:disabled)": { cursor: "pointer", backgroundColor: T.button.hover }, "&:focus": { outline: "none", backgroundColor: T.button.focus }, svg: { margin: "auto" } } }, pagination: { style: { color: T.text.secondary, fontSize: "13px", minHeight: "56px", backgroundColor: T.background.default, borderTopStyle: "solid", borderTopWidth: "1px", borderTopColor: T.divider.default }, pageButtonsStyle: { borderRadius: "50%", height: "40px", width: "40px", padding: "8px", margin: "px", cursor: "pointer", transition: "0.4s", color: T.button.default, fill: T.button.default, backgroundColor: "transparent", "&:disabled": { cursor: "unset", color: T.button.disabled, fill: T.button.disabled }, "&:hover:not(:disabled)": { backgroundColor: T.button.hover }, "&:focus": { outline: "none", backgroundColor: T.button.focus } } }, noData: { style: { display: "flex", alignItems: "center", justifyContent: "center", color: T.text.primary, backgroundColor: T.background.default } }, progress: { style: { display: "flex", alignItems: "center", justifyContent: "center", color: T.text.primary, backgroundColor: T.background.default } } }, k);
|
|
2492
|
+
var T;
|
|
2493
|
+
})(ct, lt)), [ct, lt]), Ne = u.useMemo((() => Object.assign({}, We !== "auto" && { dir: We })), [We]), z = u.useMemo((() => {
|
|
2494
|
+
if (Pt) return t;
|
|
2495
|
+
if (R?.sortFunction && typeof R.sortFunction == "function") {
|
|
2496
|
+
const k = R.sortFunction, W = M === Ge.ASC ? k : (fe, je) => -1 * k(fe, je);
|
|
2497
|
+
return [...t].sort(W);
|
|
2498
|
+
}
|
|
2499
|
+
return (function(k, W, fe, je) {
|
|
2500
|
+
return W ? je && typeof je == "function" ? je(k.slice(0), W, fe) : k.slice(0).sort(((T, Yn) => {
|
|
2501
|
+
const dt = W(T), Ve = W(Yn);
|
|
2502
|
+
if (fe === "asc") {
|
|
2503
|
+
if (dt < Ve) return -1;
|
|
2504
|
+
if (dt > Ve) return 1;
|
|
2505
|
+
}
|
|
2506
|
+
if (fe === "desc") {
|
|
2507
|
+
if (dt > Ve) return -1;
|
|
2508
|
+
if (dt < Ve) return 1;
|
|
2509
|
+
}
|
|
2510
|
+
return 0;
|
|
2511
|
+
})) : k;
|
|
2512
|
+
})(t, R?.selector, M, Ot);
|
|
2513
|
+
}), [Pt, R, M, t, Ot]), Fe = u.useMemo((() => {
|
|
2514
|
+
if (pe && !N) {
|
|
2515
|
+
const k = we * _e, W = k - _e;
|
|
2516
|
+
return z.slice(W, k);
|
|
2517
|
+
}
|
|
2518
|
+
return z;
|
|
2519
|
+
}), [we, pe, N, _e, z]), qn = u.useCallback(((k) => {
|
|
2520
|
+
D(k);
|
|
2521
|
+
}), []), Gn = u.useCallback(((k) => {
|
|
2522
|
+
D(k);
|
|
2523
|
+
}), []), na = u.useCallback(((k) => {
|
|
2524
|
+
D(k);
|
|
2525
|
+
}), []), ra = u.useCallback(((k, W) => Yt(k, W)), [Yt]), oa = u.useCallback(((k, W) => st(k, W)), [st]), aa = u.useCallback(((k, W) => Ut(k, W)), [Ut]), ia = u.useCallback(((k, W) => Kt(k, W)), [Kt]), ut = u.useCallback(((k) => D({ type: "CHANGE_PAGE", page: k, paginationServer: N, visibleOnly: E, persistSelectedOnPageChange: J })), [N, J, E]), sa = u.useCallback(((k) => {
|
|
2526
|
+
const W = Ht(re || Fe.length, k), fe = Zn(we, W);
|
|
2527
|
+
N || ut(fe), D({ type: "CHANGE_ROWS_PER_PAGE", page: fe, rowsPerPage: k });
|
|
2528
|
+
}), [we, ut, N, re, Fe.length]);
|
|
2529
|
+
if (pe && !N && z.length > 0 && Fe.length === 0) {
|
|
2530
|
+
const k = Ht(z.length, _e), W = Zn(we, k);
|
|
2531
|
+
ut(W);
|
|
2532
|
+
}
|
|
2533
|
+
Ye((() => {
|
|
2534
|
+
j({ allSelected: h, selectedCount: x, selectedRows: s.slice(0) });
|
|
2535
|
+
}), [V]), Ye((() => {
|
|
2536
|
+
Jt(R, M, z.slice(0));
|
|
2537
|
+
}), [R, M]), Ye((() => {
|
|
2538
|
+
v(we, re || z.length);
|
|
2539
|
+
}), [we]), Ye((() => {
|
|
2540
|
+
w(_e, we);
|
|
2541
|
+
}), [_e]), Ye((() => {
|
|
2542
|
+
ut(ge);
|
|
2543
|
+
}), [ge, be]), Ye((() => {
|
|
2544
|
+
if (pe && N && re > 0) {
|
|
2545
|
+
const k = Ht(re, _e), W = Zn(we, k);
|
|
2546
|
+
we !== W && ut(W);
|
|
2547
|
+
}
|
|
2548
|
+
}), [re]), u.useEffect((() => {
|
|
2549
|
+
D({ type: "CLEAR_SELECTED_ROWS", selectedRowsFlag: kt });
|
|
2550
|
+
}), [g, kt]), u.useEffect((() => {
|
|
2551
|
+
if (!S) return;
|
|
2552
|
+
const k = z.filter(((fe) => S(fe))), W = g ? k.slice(0, 1) : k;
|
|
2553
|
+
D({ type: "SELECT_MULTIPLE_ROWS", keyField: a, selectedRows: W, totalRows: z.length, mergeSelections: Y });
|
|
2554
|
+
}), [t, S]);
|
|
2555
|
+
const la = E ? Fe : z, ca = J || g || b;
|
|
2556
|
+
return u.createElement(Oi, { theme: Be }, !de && (!!r || !!o) && u.createElement(ms, { title: r, actions: o, showMenu: !Ie, selectedCount: x, direction: We, contextActions: U, contextComponent: at, contextMessage: ot }), Z && u.createElement(vs, { align: nt, wrapContent: rt }, He), u.createElement(xs, Object.assign({ $responsive: Se, $fixedHeader: le, $fixedHeaderScrollHeight: Ee, className: rn }, Ne), u.createElement(Ss, null, q && !ue && u.createElement(Zr, null, Oe), u.createElement(Di, { disabled: oe, className: "rdt_Table", role: "table" }, !Ce && (!!ue || z.length > 0 && !q) && u.createElement(Ii, { className: "rdt_TableHead", role: "rowgroup", $fixedHeader: le }, u.createElement(Ni, { className: "rdt_TableHeadRow", role: "row", $dense: f }, d && (ca ? u.createElement(Rt, { style: { flex: "0 0 48px" } }) : u.createElement(cs, { allSelected: h, selectedRows: s, selectableRowsComponent: P, selectableRowsComponentProps: C, selectableRowDisabled: $, rowData: la, keyField: a, mergeSelections: Y, onSelectAllRows: Gn })), it && !tn && u.createElement(Cs, null), on.map(((k) => u.createElement(ss, { key: k.id, column: k, selectedColumn: R, disabled: q || z.length === 0, pagination: pe, paginationServer: N, persistSelectedOnSort: F, selectableRowsVisibleOnly: E, sortDirection: M, sortIcon: Qt, sortServer: Pt, onSort: qn, onDragStart: _t, onDragOver: sn, onDragEnd: At, onDragEnter: an, onDragLeave: Dt, draggingColumnId: Tt }))))), !z.length && !q && u.createElement(Es, null, Pe), q && ue && u.createElement(Zr, null, Oe), !q && z.length > 0 && u.createElement(ws, { className: "rdt_TableBody", role: "rowgroup" }, Fe.map(((k, W) => {
|
|
2557
|
+
const fe = wt(k, a), je = (function(Ve = "") {
|
|
2558
|
+
return typeof Ve != "number" && (!Ve || Ve.length === 0);
|
|
2559
|
+
})(fe) ? W : fe, T = Sn(k, s, a), Yn = !!(it && nn && nn(k)), dt = !!(it && en && en(k));
|
|
2560
|
+
return u.createElement(es, { id: je, key: je, keyField: a, "data-row-id": je, columns: on, row: k, rowCount: z.length, rowIndex: W, selectableRows: d, expandableRows: it, expandableIcon: _, highlightOnHover: l, pointerOnHover: c, dense: f, expandOnRowClicked: Ln, expandOnRowDoubleClicked: Mn, expandableRowsComponent: Xt, expandableRowsComponentProps: Zt, expandableRowsHideExpander: tn, defaultExpanderDisabled: dt, defaultExpanded: Yn, expandableInheritConditionalStyles: Hn, conditionalRowStyles: ze, selected: T, selectableRowsHighlight: y, selectableRowsComponent: P, selectableRowsComponentProps: C, selectableRowDisabled: $, selectableRowsSingle: g, striped: i, onRowExpandToggled: O, onRowClicked: ra, onRowDoubleClicked: oa, onRowMouseEnter: aa, onRowMouseLeave: ia, onSelectedRow: na, draggingColumnId: Tt, onDragStart: _t, onDragOver: sn, onDragEnd: At, onDragEnter: an, onDragLeave: Dt });
|
|
2561
|
+
})))))), K && u.createElement("div", null, u.createElement(he, { onChangePage: ut, onChangeRowsPerPage: sa, rowCount: re || z.length, currentPage: we, rowsPerPage: _e, direction: We, paginationRowsPerPageOptions: ie, paginationIconLastPage: ye, paginationIconFirstPage: $e, paginationIconNext: ve, paginationIconPrevious: Ae, paginationComponentOptions: xe })));
|
|
2562
|
+
}));
|
|
2563
|
+
function St(e, t, ...n) {
|
|
2564
|
+
if (!e) {
|
|
2565
|
+
let r;
|
|
2566
|
+
if (t === void 0)
|
|
2567
|
+
r = new Error(
|
|
2568
|
+
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
2569
|
+
);
|
|
2570
|
+
else {
|
|
2571
|
+
let o = 0;
|
|
2572
|
+
r = new Error(
|
|
2573
|
+
t.replace(/%s/g, function() {
|
|
2574
|
+
return n[o++];
|
|
2575
|
+
})
|
|
2576
|
+
), r.name = "Invariant Violation";
|
|
2577
|
+
}
|
|
2578
|
+
throw r.framesToPop = 1, r;
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
const Xe = (e) => typeof e == "function", Ws = (e) => e.length === 0, oo = (e) => e.toString(), tr = (e) => typeof e == "string", xr = "/", Cn = "||", Ze = (e) => e, ao = (e) => e === null;
|
|
2582
|
+
function io(e, t = Ze, n) {
|
|
2583
|
+
St(
|
|
2584
|
+
Xe(t) || ao(t),
|
|
2585
|
+
"Expected payloadCreator to be a function, undefined or null"
|
|
2586
|
+
);
|
|
2587
|
+
const r = ao(t) || t === Ze ? Ze : (l, ...c) => l instanceof Error ? l : t(l, ...c), o = Xe(n), a = e.toString(), i = (...l) => {
|
|
2588
|
+
const c = r(...l), f = { type: e };
|
|
2589
|
+
return c instanceof Error && (f.error = !0), c !== void 0 && (f.payload = c), o && (f.meta = n(...l)), f;
|
|
2590
|
+
};
|
|
2591
|
+
return i.toString = () => a, i;
|
|
2592
|
+
}
|
|
2593
|
+
const Ct = (e) => {
|
|
2594
|
+
if (typeof e != "object" || e === null)
|
|
2595
|
+
return !1;
|
|
2596
|
+
let t = e;
|
|
2597
|
+
for (; Object.getPrototypeOf(t) !== null; )
|
|
2598
|
+
t = Object.getPrototypeOf(t);
|
|
2599
|
+
return Object.getPrototypeOf(e) === t;
|
|
2600
|
+
}, so = (e) => Array.isArray(e), Vo = (e) => e == null, Bs = (e) => e[e.length - 1], Vs = /\s/, qs = /([-.:_])/, Gs = /([a-z][A-Z]|[A-Z][a-z])/, nr = "/", Ys = /[\W_]+(.|$)/g, Us = (e) => e.replace(Ys, (t, n) => n ? " " + n : ""), Ks = /(.)([A-Z]+)/g, Qs = (e) => e.replace(
|
|
2601
|
+
Ks,
|
|
2602
|
+
(t, n, r) => n + " " + r.toLowerCase().split("").join(" ")
|
|
2603
|
+
), Js = (e) => Vs.test(e) ? e.toLowerCase() : qs.test(e) ? (Us(e) || e).toLowerCase() : Gs.test(e) ? Qs(e).toLowerCase() : e.toLowerCase(), Xs = (e) => Js(e).replace(/[\W_]+(.|$)/g, (t, n) => n ? " " + n : "").trim(), lo = (e) => Xs(e).replace(
|
|
2604
|
+
/\s(\w)/g,
|
|
2605
|
+
(t, n) => n.toUpperCase()
|
|
2606
|
+
), qo = (e) => e.includes(nr) ? e.split(nr).map(lo).join(nr) : lo(e), gr = (e, t) => e.reduce(
|
|
2607
|
+
(n, r) => t(n, r),
|
|
2608
|
+
{}
|
|
2609
|
+
), Nn = (e) => typeof Map < "u" && e instanceof Map;
|
|
2610
|
+
function Sr(e) {
|
|
2611
|
+
if (Nn(e))
|
|
2612
|
+
return Array.from(e.keys());
|
|
2613
|
+
if (typeof Reflect < "u" && typeof Reflect.ownKeys == "function")
|
|
2614
|
+
return Reflect.ownKeys(e);
|
|
2615
|
+
let t = Object.getOwnPropertyNames(e);
|
|
2616
|
+
return typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(e))), t;
|
|
2617
|
+
}
|
|
2618
|
+
function Go(e, t) {
|
|
2619
|
+
return Nn(t) ? t.get(e) : t[e];
|
|
2620
|
+
}
|
|
2621
|
+
const Yo = (e) => function t(n, { namespace: r = xr, prefix: o } = {}, a = {}, i = "") {
|
|
2622
|
+
function l(f) {
|
|
2623
|
+
if (!i)
|
|
2624
|
+
return f;
|
|
2625
|
+
const d = f.toString().split(Cn), g = i.split(Cn);
|
|
2626
|
+
return [].concat(
|
|
2627
|
+
...g.map((y) => d.map((b) => `${y}${r}${b}`))
|
|
2628
|
+
).join(Cn);
|
|
2629
|
+
}
|
|
2630
|
+
function c(f) {
|
|
2631
|
+
return i || !o || o && new RegExp(`^${o}${r}`).test(f) ? f : `${o}${r}${f}`;
|
|
2632
|
+
}
|
|
2633
|
+
return Sr(n).forEach((f) => {
|
|
2634
|
+
const d = c(l(f)), g = Go(f, n);
|
|
2635
|
+
e(g) ? t(g, { namespace: r, prefix: o }, a, d) : a[d] = g;
|
|
2636
|
+
}), a;
|
|
2637
|
+
}, Zs = Yo(Ct);
|
|
2638
|
+
function el(e, { namespace: t = xr, prefix: n } = {}) {
|
|
2639
|
+
function r(a, i, l) {
|
|
2640
|
+
const c = qo(l.shift());
|
|
2641
|
+
Ws(l) ? i[c] = e[a] : (i[c] || (i[c] = {}), r(
|
|
2642
|
+
a,
|
|
2643
|
+
i[c],
|
|
2644
|
+
l
|
|
2645
|
+
));
|
|
2646
|
+
}
|
|
2647
|
+
const o = {};
|
|
2648
|
+
return Object.getOwnPropertyNames(e).forEach((a) => {
|
|
2649
|
+
const i = n ? a.replace(`${n}${t}`, "") : a;
|
|
2650
|
+
return r(
|
|
2651
|
+
a,
|
|
2652
|
+
o,
|
|
2653
|
+
i.split(t)
|
|
2654
|
+
);
|
|
2655
|
+
}), o;
|
|
2656
|
+
}
|
|
2657
|
+
function tl(e, ...t) {
|
|
2658
|
+
const n = Ct(Bs(t)) ? t.pop() : {};
|
|
2659
|
+
return St(
|
|
2660
|
+
t.every(tr) && (tr(e) || Ct(e)),
|
|
2661
|
+
"Expected optional object followed by string action types"
|
|
2662
|
+
), tr(e) ? co(
|
|
2663
|
+
[e, ...t],
|
|
2664
|
+
n
|
|
2665
|
+
) : {
|
|
2666
|
+
...nl(e, n),
|
|
2667
|
+
...co(t, n)
|
|
2668
|
+
};
|
|
2669
|
+
}
|
|
2670
|
+
function nl(e, t) {
|
|
2671
|
+
const n = Zs(e, t), r = Uo(n);
|
|
2672
|
+
return el(r, t);
|
|
2673
|
+
}
|
|
2674
|
+
function Uo(e, { prefix: t, namespace: n = xr } = {}) {
|
|
2675
|
+
function r(o) {
|
|
2676
|
+
if (Xe(o) || Vo(o))
|
|
2677
|
+
return !0;
|
|
2678
|
+
if (so(o)) {
|
|
2679
|
+
const [a = Ze, i] = o;
|
|
2680
|
+
return Xe(a) && Xe(i);
|
|
2681
|
+
}
|
|
2682
|
+
return !1;
|
|
2683
|
+
}
|
|
2684
|
+
return gr(
|
|
2685
|
+
Object.keys(e),
|
|
2686
|
+
(o, a) => {
|
|
2687
|
+
const i = e[a];
|
|
2688
|
+
St(
|
|
2689
|
+
r(i),
|
|
2690
|
+
`Expected function, undefined, null, or array with payload and meta functions for ${a}`
|
|
2691
|
+
);
|
|
2692
|
+
const l = t ? `${t}${n}${a}` : a, c = so(i) ? io(l, ...i) : io(l, i);
|
|
2693
|
+
return { ...o, [a]: c };
|
|
2694
|
+
}
|
|
2695
|
+
);
|
|
2696
|
+
}
|
|
2697
|
+
function co(e, t) {
|
|
2698
|
+
const n = gr(
|
|
2699
|
+
e,
|
|
2700
|
+
(o, a) => ({ ...o, [a]: Ze })
|
|
2701
|
+
), r = Uo(n, t);
|
|
2702
|
+
return gr(
|
|
2703
|
+
Object.keys(r),
|
|
2704
|
+
(o, a) => ({
|
|
2705
|
+
...o,
|
|
2706
|
+
[qo(a)]: r[a]
|
|
2707
|
+
})
|
|
2708
|
+
);
|
|
2709
|
+
}
|
|
2710
|
+
const rl = (e) => e === void 0;
|
|
2711
|
+
function ol(e, t = Ze, n) {
|
|
2712
|
+
const r = oo(e).split(Cn);
|
|
2713
|
+
St(
|
|
2714
|
+
!rl(n),
|
|
2715
|
+
`defaultState for reducer handling ${r.join(", ")} should be defined`
|
|
2716
|
+
), St(
|
|
2717
|
+
Xe(t) || Ct(t),
|
|
2718
|
+
"Expected reducer to be a function or object with next and throw reducers"
|
|
2719
|
+
);
|
|
2720
|
+
const [o, a] = Xe(t) ? [t, t] : [t.next, t.throw].map(
|
|
2721
|
+
(i) => Vo(i) ? Ze : i
|
|
2722
|
+
);
|
|
2723
|
+
return (i = n, l) => {
|
|
2724
|
+
const { type: c } = l;
|
|
2725
|
+
return !c || !r.includes(oo(c)) ? i : (l.error === !0 ? a : o)(i, l);
|
|
2726
|
+
};
|
|
2727
|
+
}
|
|
2728
|
+
const al = function() {
|
|
2729
|
+
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++)
|
|
2730
|
+
t[n] = arguments[n];
|
|
2731
|
+
var r = typeof t[0] != "function" && t.shift(), o = t;
|
|
2732
|
+
if (typeof r > "u")
|
|
2733
|
+
throw new TypeError("The initial state may not be undefined. If you do not want to set a value for this reducer, you can use null instead of undefined.");
|
|
2734
|
+
return function(a, i) {
|
|
2735
|
+
for (var l = arguments.length, c = Array(l > 2 ? l - 2 : 0), f = 2; f < l; f++)
|
|
2736
|
+
c[f - 2] = arguments[f];
|
|
2737
|
+
var d = typeof a > "u", g = typeof i > "u";
|
|
2738
|
+
return d && g && r ? r : o.reduce(function(y, b, E) {
|
|
2739
|
+
if (typeof b > "u")
|
|
2740
|
+
throw new TypeError("An undefined reducer was passed in at index " + E);
|
|
2741
|
+
return b.apply(void 0, [y, i].concat(c));
|
|
2742
|
+
}, d && !g && r ? r : a);
|
|
2743
|
+
};
|
|
2744
|
+
};
|
|
2745
|
+
function il(e) {
|
|
2746
|
+
const t = Sr(e), n = t.every(
|
|
2747
|
+
(r) => r === "next" || r === "throw"
|
|
2748
|
+
);
|
|
2749
|
+
return t.length > 0 && t.length <= 2 && n;
|
|
2750
|
+
}
|
|
2751
|
+
const sl = Yo(
|
|
2752
|
+
(e) => (Ct(e) || Nn(e)) && !il(e)
|
|
2753
|
+
);
|
|
2754
|
+
function ll(e, t, n = {}) {
|
|
2755
|
+
St(
|
|
2756
|
+
Ct(e) || Nn(e),
|
|
2757
|
+
"Expected handlers to be a plain object."
|
|
2758
|
+
);
|
|
2759
|
+
const r = sl(e, n), o = Sr(r).map(
|
|
2760
|
+
(i) => ol(i, Go(i, r), t)
|
|
2761
|
+
), a = al(t, ...o);
|
|
2762
|
+
return (i = t, l) => a(i, l);
|
|
2763
|
+
}
|
|
2764
|
+
const Cr = { path: "/", history: [], location: 0 }, Ko = { path: "*", data: {}, hash: "", query: "" }, Fn = qt(Cr), Er = qt(null), Vt = qt(Ko), { navigate: Qo, back: cl, forward: ul } = tl({
|
|
2765
|
+
NAVIGATE: (e) => e,
|
|
2766
|
+
BACK: (e = 1) => e,
|
|
2767
|
+
FORWARD: (e = 1) => e
|
|
2768
|
+
}), dl = ll(
|
|
2769
|
+
{
|
|
2770
|
+
NAVIGATE: (e, t) => {
|
|
2771
|
+
let { history: n, location: r } = e;
|
|
2772
|
+
return r > 0 && (n = n.slice(r)), {
|
|
2773
|
+
path: ml(e.path, t.payload),
|
|
2774
|
+
history: [t.payload, ...n],
|
|
2775
|
+
location: 0
|
|
2776
|
+
};
|
|
2777
|
+
},
|
|
2778
|
+
BACK: (e, t) => {
|
|
2779
|
+
const n = e.location + t.payload, r = e.history.at(n);
|
|
2780
|
+
return r ? {
|
|
2781
|
+
path: r,
|
|
2782
|
+
history: e.history,
|
|
2783
|
+
location: n
|
|
2784
|
+
} : e;
|
|
2785
|
+
},
|
|
2786
|
+
FORWARD: (e, t) => {
|
|
2787
|
+
const n = e.location - t.payload, r = e.history.at(n);
|
|
2788
|
+
return r ? {
|
|
2789
|
+
path: r,
|
|
2790
|
+
history: e.history,
|
|
2791
|
+
location: n
|
|
2792
|
+
} : e;
|
|
2793
|
+
}
|
|
2794
|
+
},
|
|
2795
|
+
Cr
|
|
2796
|
+
);
|
|
2797
|
+
function pl() {
|
|
2798
|
+
return Te(Fn).path;
|
|
2799
|
+
}
|
|
2800
|
+
function Rr() {
|
|
2801
|
+
const e = Te(Er);
|
|
2802
|
+
return (t) => e?.(Qo(t));
|
|
2803
|
+
}
|
|
2804
|
+
function fl() {
|
|
2805
|
+
const e = Te(Er), t = Te(Fn);
|
|
2806
|
+
return {
|
|
2807
|
+
navigate: (n) => e?.(Qo(n)),
|
|
2808
|
+
back: (n = 1) => e?.(cl(n)),
|
|
2809
|
+
forward: (n = 1) => e?.(ul(n)),
|
|
2810
|
+
hasBack: t.location < t.history.length - 1,
|
|
2811
|
+
...t
|
|
2812
|
+
};
|
|
2813
|
+
}
|
|
2814
|
+
function $r() {
|
|
2815
|
+
return Te(Vt).data;
|
|
2816
|
+
}
|
|
2817
|
+
function gl() {
|
|
2818
|
+
const { query: e, hash: t } = Te(Vt);
|
|
2819
|
+
return { search: new URLSearchParams(e), hash: t };
|
|
2820
|
+
}
|
|
2821
|
+
function hl({ path: e, children: t }) {
|
|
2822
|
+
const n = e ? { path: e, history: [], location: 0 } : Cr, [r, o] = pa(dl, n);
|
|
2823
|
+
return /* @__PURE__ */ p.jsx(Fn.Provider, { value: r, children: /* @__PURE__ */ p.jsx(Er.Provider, { value: o, children: /* @__PURE__ */ p.jsx(Vt.Provider, { value: Ko, children: t }) }) });
|
|
2824
|
+
}
|
|
2825
|
+
const gt = da(({ to: e, children: t, ...n }, r) => {
|
|
2826
|
+
const o = Rr(), a = (i) => {
|
|
2827
|
+
i.defaultPrevented || i.preventDefault(), o(e);
|
|
2828
|
+
};
|
|
2829
|
+
return /* @__PURE__ */ p.jsx(
|
|
2830
|
+
"a",
|
|
2831
|
+
{
|
|
2832
|
+
...n,
|
|
2833
|
+
href: e,
|
|
2834
|
+
ref: r,
|
|
2835
|
+
onClick: a,
|
|
2836
|
+
children: t
|
|
2837
|
+
}
|
|
2838
|
+
);
|
|
2839
|
+
});
|
|
2840
|
+
function rr({ children: e }) {
|
|
2841
|
+
const t = Te(Vt), n = Te(Fn), r = Jo(e, t.path).map((o) => [o, vl(o.route, n.path)]).filter(([, o]) => o.isMatch);
|
|
2842
|
+
return /* @__PURE__ */ p.jsx(p.Fragment, { children: r.map(([o, a], i) => /* @__PURE__ */ p.jsx(Vt.Provider, { value: { ...a }, children: o.element }, i)) });
|
|
2843
|
+
}
|
|
2844
|
+
function me({ path: e, element: t }) {
|
|
2845
|
+
return /* @__PURE__ */ p.jsx(p.Fragment, {});
|
|
2846
|
+
}
|
|
2847
|
+
function Jo(e, t) {
|
|
2848
|
+
const n = [];
|
|
2849
|
+
return fa.map(e, (r) => {
|
|
2850
|
+
if (!ga(r)) return;
|
|
2851
|
+
if (r.type === A.Fragment) {
|
|
2852
|
+
n.push.apply(n, Jo(r.props.children, t));
|
|
2853
|
+
return;
|
|
2854
|
+
}
|
|
2855
|
+
const o = r.props;
|
|
2856
|
+
return n.push({
|
|
2857
|
+
route: yl(t, o.path),
|
|
2858
|
+
element: o.element
|
|
2859
|
+
}), r;
|
|
2860
|
+
}), n;
|
|
2861
|
+
}
|
|
2862
|
+
const ml = (e, t) => {
|
|
2863
|
+
if (t.startsWith("/")) return t;
|
|
2864
|
+
if (t.startsWith("?")) {
|
|
2865
|
+
const [o] = e?.split("?") ?? [""];
|
|
2866
|
+
return o + t;
|
|
2867
|
+
}
|
|
2868
|
+
let n = 0;
|
|
2869
|
+
const r = t.split("/").filter((o) => o !== "");
|
|
2870
|
+
for (; r.length > 0 && (r[0] === "." || r[0] === ".."); )
|
|
2871
|
+
r.shift() == ".." && ++n;
|
|
2872
|
+
return bl(e, r.join("/"), n);
|
|
2873
|
+
}, bl = (e, t, n) => {
|
|
2874
|
+
const r = e.split("/").filter((a) => a !== ""), o = t.split("/").filter((a) => a !== "");
|
|
2875
|
+
return n === 0 ? `/${r.join("/")}/${o.join("/")}` : `/${r.slice(0, -n).join("/")}/${o.join("/")}`;
|
|
2876
|
+
}, yl = (e, t) => {
|
|
2877
|
+
const n = e.split("/").filter((o) => o !== ""), r = t.split("/").filter((o) => o !== "");
|
|
2878
|
+
return n.length > 0 && n.at(-1) === "*" && n.pop(), n.length === 0 ? `/${r.join("/")}` : `/${n.join("/")}/${r.join("/")}`;
|
|
2879
|
+
}, vl = (e, t) => {
|
|
2880
|
+
const n = e.split("/");
|
|
2881
|
+
let r = t.split("/");
|
|
2882
|
+
if (r.at(-1) === "" && (r = r.slice(0, -1)), n.length > r.length)
|
|
2883
|
+
return { isMatch: !1, remainer: "", data: {}, query: "", hash: "", path: "" };
|
|
2884
|
+
if (n.length < r.length && n.at(-1) !== "*")
|
|
2885
|
+
return { isMatch: !1, remainer: "", data: {}, query: "", hash: "", path: "" };
|
|
2886
|
+
let o = {}, a = "", i = "";
|
|
2887
|
+
for (let l = 0; l < n.length; ++l) {
|
|
2888
|
+
const c = n[l], d = [...r[l].matchAll(/([?#]?)((?:(?![?#]).)*)/g)], g = d?.find((y) => y[1] === "")?.[2] ?? "";
|
|
2889
|
+
if (a = d?.find((y) => y[1] === "?")?.[2] ?? "", i = d?.find((y) => y[1] === "#")?.[2] ?? "", c.startsWith(":") && g && g !== "") {
|
|
2890
|
+
o[c.substring(1)] = g;
|
|
2891
|
+
continue;
|
|
2892
|
+
}
|
|
2893
|
+
if (c === "*")
|
|
2894
|
+
return { isMatch: !0, data: o, remainer: r.splice(0, l).join("/"), query: a, hash: i, path: r.slice(0, l).join("/") };
|
|
2895
|
+
if (c !== g)
|
|
2896
|
+
return { isMatch: !1, data: {}, remainer: "", query: "", hash: "", path: "" };
|
|
2897
|
+
}
|
|
2898
|
+
return { isMatch: !0, remainer: "", data: o, query: a, hash: i, path: t?.split("?")?.[0] ?? "" };
|
|
2899
|
+
}, wl = `
|
|
2900
|
+
query dbSchema {
|
|
2901
|
+
_dbSchema {
|
|
2902
|
+
dbName
|
|
2903
|
+
graphQlName
|
|
2904
|
+
labelColumn
|
|
2905
|
+
primaryKeys
|
|
2906
|
+
isEditable
|
|
2907
|
+
metadata {
|
|
2908
|
+
key
|
|
2909
|
+
value
|
|
2910
|
+
}
|
|
2911
|
+
columns {
|
|
2912
|
+
dbName
|
|
2913
|
+
graphQlName
|
|
2914
|
+
paramType
|
|
2915
|
+
isPrimaryKey
|
|
2916
|
+
isIdentity
|
|
2917
|
+
isNullable
|
|
2918
|
+
isReadOnly
|
|
2919
|
+
metadata {
|
|
2920
|
+
key
|
|
2921
|
+
value
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
multiJoins {
|
|
2925
|
+
name
|
|
2926
|
+
sourceColumnNames
|
|
2927
|
+
destinationTable
|
|
2928
|
+
destinationColumnNames
|
|
2929
|
+
}
|
|
2930
|
+
singleJoins {
|
|
2931
|
+
name
|
|
2932
|
+
sourceColumnNames
|
|
2933
|
+
destinationTable
|
|
2934
|
+
destinationColumnNames
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
}`;
|
|
2938
|
+
class xl extends Error {
|
|
2939
|
+
constructor(t, n) {
|
|
2940
|
+
super(t.map((r) => r.message).join("; ")), this.errors = t, this.data = n, this.name = "GraphQLRequestError";
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
class Sl {
|
|
2944
|
+
constructor(t) {
|
|
2945
|
+
this.uri = t;
|
|
2946
|
+
}
|
|
2947
|
+
async query(t, n) {
|
|
2948
|
+
const r = await fetch(this.uri, {
|
|
2949
|
+
method: "POST",
|
|
2950
|
+
headers: { "Content-Type": "application/json" },
|
|
2951
|
+
body: JSON.stringify({ query: t, variables: n })
|
|
2952
|
+
});
|
|
2953
|
+
if (!r.ok)
|
|
2954
|
+
throw new Error(`GraphQL request failed: ${r.status} ${r.statusText}`);
|
|
2955
|
+
const o = await r.json();
|
|
2956
|
+
if (o.errors?.length)
|
|
2957
|
+
throw new xl(o.errors, o.data);
|
|
2958
|
+
return o.data;
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
const Xo = qt(null), Cl = Xo.Provider;
|
|
2962
|
+
function Gt() {
|
|
2963
|
+
const e = Te(Xo);
|
|
2964
|
+
if (!e) throw new Error("useFetcher must be used within a FetcherProvider");
|
|
2965
|
+
return e;
|
|
2966
|
+
}
|
|
2967
|
+
const Zo = qt({ loading: !0, error: null, data: [], findTable: () => {
|
|
2968
|
+
} }), El = ({ children: e }) => {
|
|
2969
|
+
const t = Rl();
|
|
2970
|
+
return /* @__PURE__ */ p.jsx(Zo.Provider, { value: t, children: e });
|
|
2971
|
+
};
|
|
2972
|
+
function $t() {
|
|
2973
|
+
return Te(Zo);
|
|
2974
|
+
}
|
|
2975
|
+
function Rl() {
|
|
2976
|
+
const e = Gt(), { isLoading: t, error: n, data: r } = jn({
|
|
2977
|
+
queryKey: ["dbSchema"],
|
|
2978
|
+
queryFn: () => e.query(wl),
|
|
2979
|
+
staleTime: 1 / 0
|
|
2980
|
+
});
|
|
2981
|
+
return ae(() => {
|
|
2982
|
+
if (t) return { loading: !0, error: null, data: [], findTable: () => {
|
|
2983
|
+
} };
|
|
2984
|
+
if (n) return { loading: !1, error: { message: n.message }, data: [], findTable: () => {
|
|
2985
|
+
} };
|
|
2986
|
+
if (!r) return { loading: !1, error: null, data: [], findTable: () => {
|
|
2987
|
+
} };
|
|
2988
|
+
const o = r._dbSchema.map((i) => ({
|
|
2989
|
+
...i,
|
|
2990
|
+
name: i.graphQlName,
|
|
2991
|
+
label: i.dbName,
|
|
2992
|
+
metadata: uo(i.metadata),
|
|
2993
|
+
columns: i.columns.map((l) => ({
|
|
2994
|
+
...l,
|
|
2995
|
+
name: l.graphQlName,
|
|
2996
|
+
label: l.dbName,
|
|
2997
|
+
metadata: uo(l.metadata)
|
|
2998
|
+
}))
|
|
2999
|
+
}));
|
|
3000
|
+
return { loading: !1, error: null, data: o, findTable: (i) => o.find((l) => l.graphQlName === i) };
|
|
3001
|
+
}, [t, n, r]);
|
|
3002
|
+
}
|
|
3003
|
+
function uo(e) {
|
|
3004
|
+
return e.reduce((t, n) => ({ ...t, [n.key]: $l(n) }), {});
|
|
3005
|
+
}
|
|
3006
|
+
function $l({ key: e, value: t }) {
|
|
3007
|
+
return e === "type" ? Ol(t) : t;
|
|
3008
|
+
}
|
|
3009
|
+
function Ol(e) {
|
|
3010
|
+
const t = e.match(/lookup\s*\(\s*(?<id>\w+)\s*,\s*(?<label>\w+)\s*\)/m);
|
|
3011
|
+
if (t?.groups?.id && t?.groups?.label)
|
|
3012
|
+
return {
|
|
3013
|
+
type: "lookup",
|
|
3014
|
+
id: t.groups.id,
|
|
3015
|
+
label: t.groups.label
|
|
3016
|
+
};
|
|
3017
|
+
}
|
|
3018
|
+
const Pl = [
|
|
3019
|
+
{
|
|
3020
|
+
name: "Table",
|
|
3021
|
+
cell: (e) => /* @__PURE__ */ p.jsx(gt, { to: `/${e.name}`, className: "plain-link", children: e.label })
|
|
3022
|
+
}
|
|
3023
|
+
];
|
|
3024
|
+
function jl() {
|
|
3025
|
+
const { loading: e, error: t, data: n } = $t();
|
|
3026
|
+
return e ? /* @__PURE__ */ p.jsx("div", { children: "Loading..." }) : t ? /* @__PURE__ */ p.jsxs("div", { children: [
|
|
3027
|
+
"Error: ",
|
|
3028
|
+
t.message
|
|
3029
|
+
] }) : /* @__PURE__ */ p.jsx("div", { children: /* @__PURE__ */ p.jsx(Bo, { columns: Pl, data: n }) });
|
|
3030
|
+
}
|
|
3031
|
+
const ea = (e) => {
|
|
3032
|
+
try {
|
|
3033
|
+
if (!e) return { variables: {}, param: "", filterText: "" };
|
|
3034
|
+
const [t, n, r, o] = JSON.parse(e);
|
|
3035
|
+
return { variables: { filter: r }, param: `, $filter: ${o}`, filterText: `{${t}: {${n}: $filter} }` };
|
|
3036
|
+
} catch {
|
|
3037
|
+
return { variables: {}, param: "", filterText: "" };
|
|
3038
|
+
}
|
|
3039
|
+
}, kl = (e) => {
|
|
3040
|
+
if (!e) return "";
|
|
3041
|
+
const t = new Date(e);
|
|
3042
|
+
return t.toString() === "Invalid Date" || t < /* @__PURE__ */ new Date("1973-01-01") ? "" : t.toLocaleString();
|
|
3043
|
+
}, Tl = (e, t) => {
|
|
3044
|
+
if (!e || !t) return [];
|
|
3045
|
+
const n = e.columns.map((o) => {
|
|
3046
|
+
const a = {
|
|
3047
|
+
name: o.label,
|
|
3048
|
+
reorder: !0,
|
|
3049
|
+
sortable: !0,
|
|
3050
|
+
sortField: o.name
|
|
3051
|
+
}, i = e.singleJoins.find((l) => l.sourceColumnNames?.[0] === o.name);
|
|
3052
|
+
if (i) {
|
|
3053
|
+
const l = i.destinationTable, c = t.findTable(i.destinationTable);
|
|
3054
|
+
return {
|
|
3055
|
+
cell: (f) => !!f && /* @__PURE__ */ p.jsx(gt, { to: "/" + c?.name + "/" + f?.[l]?.id, children: f?.[l]?.label }),
|
|
3056
|
+
...a
|
|
3057
|
+
};
|
|
3058
|
+
}
|
|
3059
|
+
return o?.joinTable ? {
|
|
3060
|
+
cell: (l) => !!l && /* @__PURE__ */ p.jsx(gt, { to: "/" + o.name + "/" + l?.[o.name]?.id, children: o.name }),
|
|
3061
|
+
...a
|
|
3062
|
+
} : o?.paramType === "DateTime" ? {
|
|
3063
|
+
selector: (l) => !!o?.name && kl(l?.[o?.name]) || "",
|
|
3064
|
+
...a
|
|
3065
|
+
} : {
|
|
3066
|
+
selector: (l) => o?.name ? String(l?.[o?.name] ?? "") : "",
|
|
3067
|
+
...a
|
|
3068
|
+
};
|
|
3069
|
+
}), r = e.multiJoins.map((o) => {
|
|
3070
|
+
const a = t.findTable(o.destinationTable);
|
|
3071
|
+
return {
|
|
3072
|
+
name: a?.name,
|
|
3073
|
+
cell: (i) => !!i && /* @__PURE__ */ p.jsx(gt, { to: "/" + a?.name + "/from/" + e.name + "/" + i?.id, children: a?.name }),
|
|
3074
|
+
reorder: !1,
|
|
3075
|
+
sortable: !1,
|
|
3076
|
+
sortField: o.sourceColumnNames?.[0]
|
|
3077
|
+
};
|
|
3078
|
+
});
|
|
3079
|
+
return e.isEditable === !1 ? [...n, ...r] : [{
|
|
3080
|
+
name: "edit",
|
|
3081
|
+
cell: (o) => /* @__PURE__ */ p.jsx(gt, { to: `/${e.graphQlName}/edit/${o?.id}`, children: "edit" })
|
|
3082
|
+
}, ...n, ...r];
|
|
3083
|
+
}, _l = (e, t, n, r, o) => {
|
|
3084
|
+
if (!e || !t?.data) return null;
|
|
3085
|
+
const a = t.findTable(e.graphQlName);
|
|
3086
|
+
if (!a) return null;
|
|
3087
|
+
const i = a?.primaryKeys?.[0] ?? "id";
|
|
3088
|
+
let { param: l, filterText: c } = ea(n);
|
|
3089
|
+
const f = e.columns.filter((d) => d?.joinTable === void 0).map((d) => {
|
|
3090
|
+
const g = a.singleJoins.find((E) => E.sourceColumnNames?.[0] === d.name);
|
|
3091
|
+
if (!g) return d;
|
|
3092
|
+
const b = t.findTable(g.destinationTable)?.labelColumn ?? "id";
|
|
3093
|
+
return { ...d, joinTable: g, joinLabelColumn: b };
|
|
3094
|
+
}).map((d) => d?.joinTable ? d.name + ` ${d.joinTable.destinationTable} { id: ${d.joinTable.destinationColumnNames?.[0]} label: ${d.joinLabelColumn} }` : d.name).join(" ");
|
|
3095
|
+
return r && !o && (l = ", $id: Int", c = `{ ${i}: { _eq: $id}}`), r && o && (l = ", $id: Int" + l, c ? c = `{and: [${c}, { ${o}: { ${i}: { _eq: $id}}} ]}` : c = `{ ${o}: { ${i}: { _eq: $id}}}`), c && (c = `filter: ${c}`), `query Get${e.name}($sort: [${e.graphQlName}SortEnum!], $limit: Int, $offset: Int ${l}) { ${e.name}(sort: $sort limit: $limit offset: $offset ${c}) { total offset limit data {${f}}}}`;
|
|
3096
|
+
};
|
|
3097
|
+
function Dl(e, t, n) {
|
|
3098
|
+
const { search: r } = gl(), o = r.get("filter") ?? "", { variables: a } = ea(o), i = $t(), l = Gt(), [c, f] = Lt(null), [d, g] = Lt(0), [y, b] = Lt(10), E = c ? [`${c.columnName}_${c.order}`] : e ? [`${e.columns.at(0)?.name ?? "id"}_asc`] : [], S = ae(
|
|
3099
|
+
() => _l(e, i, o, t, n),
|
|
3100
|
+
[e, i, o, t, n]
|
|
3101
|
+
), $ = ae(() => ({
|
|
3102
|
+
sort: E,
|
|
3103
|
+
limit: y,
|
|
3104
|
+
offset: d,
|
|
3105
|
+
...t ? { id: +t } : {},
|
|
3106
|
+
...a
|
|
3107
|
+
}), [E, y, d, t, a]), { isLoading: P, error: C, data: O } = jn({
|
|
3108
|
+
queryKey: ["tableData", e?.name, $],
|
|
3109
|
+
queryFn: () => l.query(S, $),
|
|
3110
|
+
enabled: !!S && !!e && E.length > 0
|
|
3111
|
+
}), j = ae(
|
|
3112
|
+
() => e ? Tl(e, i) : [],
|
|
3113
|
+
[e, i]
|
|
3114
|
+
), _ = Un((N, Q) => {
|
|
3115
|
+
f({ columnName: N.sortField ?? "id", order: Q });
|
|
3116
|
+
}, []), w = Un((N) => {
|
|
3117
|
+
g((N - 1) * y);
|
|
3118
|
+
}, [y]), v = Un((N) => {
|
|
3119
|
+
b(N);
|
|
3120
|
+
}, []);
|
|
3121
|
+
return {
|
|
3122
|
+
tableColumns: j,
|
|
3123
|
+
offset: d,
|
|
3124
|
+
limit: y,
|
|
3125
|
+
handleSort: _,
|
|
3126
|
+
handlePage: w,
|
|
3127
|
+
handlePageSize: v,
|
|
3128
|
+
loading: P,
|
|
3129
|
+
error: C,
|
|
3130
|
+
data: O
|
|
3131
|
+
};
|
|
3132
|
+
}
|
|
3133
|
+
function Al({ table: e, id: t, tableFilter: n }) {
|
|
3134
|
+
const {
|
|
3135
|
+
limit: r,
|
|
3136
|
+
tableColumns: o,
|
|
3137
|
+
handleSort: a,
|
|
3138
|
+
handlePage: i,
|
|
3139
|
+
handlePageSize: l,
|
|
3140
|
+
loading: c,
|
|
3141
|
+
error: f,
|
|
3142
|
+
data: d
|
|
3143
|
+
} = Dl(e, t, n), g = Wt(e.name), y = Wt(0), b = ae(() => (g.current !== e.name && (g.current = e.name, y.current += 1), y.current % 2 === 1), [e.name]);
|
|
3144
|
+
return f ? /* @__PURE__ */ p.jsxs("div", { children: [
|
|
3145
|
+
"Error: ",
|
|
3146
|
+
f.message
|
|
3147
|
+
] }) : /* @__PURE__ */ p.jsx(
|
|
3148
|
+
Bo,
|
|
3149
|
+
{
|
|
3150
|
+
columns: o,
|
|
3151
|
+
data: d?.[e.name]?.data ?? [],
|
|
3152
|
+
progressPending: c,
|
|
3153
|
+
sortServer: !0,
|
|
3154
|
+
onSort: a,
|
|
3155
|
+
pagination: !0,
|
|
3156
|
+
paginationServer: !0,
|
|
3157
|
+
paginationTotalRows: d?.[e.name]?.total ?? 0,
|
|
3158
|
+
paginationPerPage: r,
|
|
3159
|
+
paginationDefaultPage: 1,
|
|
3160
|
+
paginationResetDefaultPage: b,
|
|
3161
|
+
onChangePage: i,
|
|
3162
|
+
onChangeRowsPerPage: l
|
|
3163
|
+
}
|
|
3164
|
+
);
|
|
3165
|
+
}
|
|
3166
|
+
function Il(e, t) {
|
|
3167
|
+
return e.find((r) => r.name == t);
|
|
3168
|
+
}
|
|
3169
|
+
function ft() {
|
|
3170
|
+
const e = $r(), { table: t, id: n, filterTable: r } = e, { loading: o, error: a, data: i } = $t();
|
|
3171
|
+
return t ? o ? /* @__PURE__ */ p.jsx("div", { children: "Loading..." }) : a ? /* @__PURE__ */ p.jsxs("div", { children: [
|
|
3172
|
+
"Error: ",
|
|
3173
|
+
a.message
|
|
3174
|
+
] }) : /* @__PURE__ */ p.jsx(Al, { table: Il(i, t), id: n, tableFilter: r }) : /* @__PURE__ */ p.jsx("div", { children: "Table missing" });
|
|
3175
|
+
}
|
|
3176
|
+
function or() {
|
|
3177
|
+
const e = $r(), { loading: t, error: n, data: r } = $t(), [o, a] = Lt(""), i = Rr(), { back: l, hasBack: c } = fl(), f = e?.table, d = ae(() => r?.find((S) => S.graphQlName === f), [r, f]), g = ae(
|
|
3178
|
+
() => d?.columns?.map((S) => ({ key: S.name, value: `${S.name},${S.paramType}`, label: S.label })),
|
|
3179
|
+
[d]
|
|
3180
|
+
), [y, b] = Lt(g?.at(0)?.value ?? "");
|
|
3181
|
+
En(() => {
|
|
3182
|
+
a(""), b(g?.at(0)?.value ?? "");
|
|
3183
|
+
}, [g]);
|
|
3184
|
+
const E = () => {
|
|
3185
|
+
if (!o) return;
|
|
3186
|
+
const [S, $] = y.split(",");
|
|
3187
|
+
($ === "Int" || $ === "Int!" || $ === "Float" || $ === "Float!") && i(`?filter=["${S}", "_eq", ${o}, "${$}"]`), ($ === "String" || $ === "String!") && i(`?filter=["${S}", "_contains", "${o}", "${$}"]`);
|
|
3188
|
+
};
|
|
3189
|
+
return t ? /* @__PURE__ */ p.jsx("div", { children: "Loading..." }) : n ? /* @__PURE__ */ p.jsxs("div", { children: [
|
|
3190
|
+
"Error: ",
|
|
3191
|
+
n.message
|
|
3192
|
+
] }) : /* @__PURE__ */ p.jsxs("header", { className: "editdb-header", children: [
|
|
3193
|
+
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
3194
|
+
c && /* @__PURE__ */ p.jsx("button", { onClick: () => l(), children: "‹" }),
|
|
3195
|
+
!c && /* @__PURE__ */ p.jsx("span", { children: "‹" })
|
|
3196
|
+
] }),
|
|
3197
|
+
/* @__PURE__ */ p.jsxs("h3", { children: [
|
|
3198
|
+
"Table: ",
|
|
3199
|
+
d?.dbName ?? e?.table ?? "(Select)"
|
|
3200
|
+
] }),
|
|
3201
|
+
g && /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
3202
|
+
/* @__PURE__ */ p.jsx("select", { onChange: (S) => b(S.target.value), children: g.map((S) => /* @__PURE__ */ p.jsx("option", { value: S.value, children: S.label }, S.key)) }),
|
|
3203
|
+
/* @__PURE__ */ p.jsx("input", { type: "search", value: o, onChange: (S) => a(S.target.value) }),
|
|
3204
|
+
/* @__PURE__ */ p.jsx("button", { onClick: E, children: "filter" }),
|
|
3205
|
+
/* @__PURE__ */ p.jsx("button", { onClick: () => i("/"), children: "clear" }),
|
|
3206
|
+
d?.isEditable && /* @__PURE__ */ p.jsx("button", { onClick: () => i("edit/"), children: "add" })
|
|
3207
|
+
] })
|
|
3208
|
+
] });
|
|
3209
|
+
}
|
|
3210
|
+
function Nl(e, t, n) {
|
|
3211
|
+
const r = Gt(), o = ae(
|
|
3212
|
+
() => e?.data?.find((f) => f.graphQlName === t),
|
|
3213
|
+
[e, t]
|
|
3214
|
+
), a = ae(() => e.loading || e.error || !o ? null : `query Get_${t}_Ref {
|
|
3215
|
+
values: ${t}(limit: -1) {
|
|
3216
|
+
data {
|
|
3217
|
+
key: ${n}
|
|
3218
|
+
label: ${o.labelColumn ?? "id"}
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
}`, [n, o, e.loading, e.error, t]), { isLoading: i, error: l, data: c } = jn({
|
|
3222
|
+
queryKey: ["tableRef", t, n],
|
|
3223
|
+
queryFn: () => r.query(a),
|
|
3224
|
+
enabled: !!a
|
|
3225
|
+
});
|
|
3226
|
+
return {
|
|
3227
|
+
loading: i || e.loading,
|
|
3228
|
+
error: l || e.error,
|
|
3229
|
+
data: c?.values?.data ?? []
|
|
3230
|
+
};
|
|
3231
|
+
}
|
|
3232
|
+
const Fl = ["Int", "Int!", "Float", "Float!"], Ll = ["Boolean", "Boolean!"];
|
|
3233
|
+
function po(e, t, n, r, o) {
|
|
3234
|
+
const a = { ...e };
|
|
3235
|
+
for (const { column: i } of t) {
|
|
3236
|
+
if (Fl.some((l) => l === i.paramType)) {
|
|
3237
|
+
const l = a[i.name];
|
|
3238
|
+
a[i.name] = l != null ? +l : void 0;
|
|
3239
|
+
}
|
|
3240
|
+
Ll.some((l) => l === i.paramType) && (a[i.name] = !!a[i.name]);
|
|
3241
|
+
}
|
|
3242
|
+
if (!o)
|
|
3243
|
+
for (const i of n)
|
|
3244
|
+
a[i.name] = i.paramType.startsWith("Int") ? +(r ?? 0) : r;
|
|
3245
|
+
return a;
|
|
3246
|
+
}
|
|
3247
|
+
function Ml(e, t, n, r) {
|
|
3248
|
+
const o = Gt(), a = ma(), i = ae(
|
|
3249
|
+
() => `mutation updateSingle($detail: Update_${e.name}){
|
|
3250
|
+
${e.name}(update: $detail)
|
|
3251
|
+
}`,
|
|
3252
|
+
[e]
|
|
3253
|
+
), l = ae(
|
|
3254
|
+
() => `mutation insertSingle($detail: Insert_${e.name}){
|
|
3255
|
+
${e.name}(insert: $detail)
|
|
3256
|
+
}`,
|
|
3257
|
+
[e]
|
|
3258
|
+
), c = Pr({
|
|
3259
|
+
mutationFn: (b) => o.query(i, { detail: b }),
|
|
3260
|
+
onSuccess: () => a.invalidateQueries({ queryKey: ["tableData", e.name] })
|
|
3261
|
+
}), f = Pr({
|
|
3262
|
+
mutationFn: (b) => o.query(l, { detail: b }),
|
|
3263
|
+
onSuccess: () => a.invalidateQueries({ queryKey: ["tableData", e.name] })
|
|
3264
|
+
}), d = (b) => {
|
|
3265
|
+
const E = po(b, t, n, r, !1);
|
|
3266
|
+
return c.mutateAsync(E);
|
|
3267
|
+
}, g = (b) => {
|
|
3268
|
+
const E = po(b, t, n, r, !0);
|
|
3269
|
+
return f.mutateAsync(E);
|
|
3270
|
+
}, y = c.error ?? f.error;
|
|
3271
|
+
return {
|
|
3272
|
+
update: d,
|
|
3273
|
+
insert: g,
|
|
3274
|
+
isPending: c.isPending || f.isPending,
|
|
3275
|
+
error: y
|
|
3276
|
+
};
|
|
3277
|
+
}
|
|
3278
|
+
const Hl = ["Boolean", "Boolean!"], ta = ["DateTime", "DateTime!"];
|
|
3279
|
+
function zl(e, t) {
|
|
3280
|
+
return ae(() => {
|
|
3281
|
+
const n = e?.data?.find((a) => a.graphQlName == t), o = n.columns.filter((a) => !a.isReadOnly && !a.isIdentity).map((a) => ({ column: a, join: n.singleJoins.find((i) => i.sourceColumnNames[0] === a.graphQlName) }));
|
|
3282
|
+
return [
|
|
3283
|
+
n,
|
|
3284
|
+
o,
|
|
3285
|
+
n.columns.filter((a) => a.isIdentity)
|
|
3286
|
+
];
|
|
3287
|
+
}, [e, t]);
|
|
3288
|
+
}
|
|
3289
|
+
function Wl({ table: e, schema: t, editid: n }) {
|
|
3290
|
+
const r = Rr(), o = Gt(), a = n === void 0 || n === "", [i, l, c] = zl(t, e), f = i.labelColumn, d = i.label, g = Wt(null), y = Wt({}), b = Ml(i, l, c, n), E = ae(
|
|
3291
|
+
() => `query GetSingleEdit_${i.name}($id: Int){
|
|
3292
|
+
value: ${i.name}(filter: {id: { _eq: $id}}) {
|
|
3293
|
+
data { ${l.map(({ column: w }) => w.name).join(" ")} }
|
|
3294
|
+
}
|
|
3295
|
+
}`,
|
|
3296
|
+
[i, l]
|
|
3297
|
+
), { isLoading: S, error: $, data: P } = jn({
|
|
3298
|
+
queryKey: ["editRecord", i.name, n],
|
|
3299
|
+
queryFn: () => o.query(E, { id: +n }),
|
|
3300
|
+
enabled: !!i && !a
|
|
3301
|
+
}), C = ae(() => P?.value?.data?.at(0) ?? {}, [P]);
|
|
3302
|
+
if (En(() => {
|
|
3303
|
+
y.current = Object.fromEntries(l.map(({ column: w }) => {
|
|
3304
|
+
if (ta.some((v) => v === w.paramType)) {
|
|
3305
|
+
const v = C[w.name]?.split("T")?.[0];
|
|
3306
|
+
return [w.name, v === "0001-01-01" ? "" : v];
|
|
3307
|
+
}
|
|
3308
|
+
return [w.name, C[w.name]];
|
|
3309
|
+
}));
|
|
3310
|
+
}, [C, l]), En(() => {
|
|
3311
|
+
const w = g.current;
|
|
3312
|
+
return w?.showModal(), () => w?.close();
|
|
3313
|
+
}, []), S && !a) return /* @__PURE__ */ p.jsx("div", { children: "Loading..." });
|
|
3314
|
+
if ($) return /* @__PURE__ */ p.jsxs("div", { children: [
|
|
3315
|
+
"Error: ",
|
|
3316
|
+
$.message
|
|
3317
|
+
] });
|
|
3318
|
+
if (b.error) return /* @__PURE__ */ p.jsxs("div", { children: [
|
|
3319
|
+
"Error: ",
|
|
3320
|
+
b.error.message
|
|
3321
|
+
] });
|
|
3322
|
+
const O = (w) => {
|
|
3323
|
+
(a ? b.insert : b.update)({ ...y.current }).then(() => {
|
|
3324
|
+
r("../..");
|
|
3325
|
+
});
|
|
3326
|
+
}, j = C?.[f] ?? n, _ = l.map(({ column: w, join: v }) => ({
|
|
3327
|
+
paramType: w.paramType,
|
|
3328
|
+
isReadOnly: w.isReadOnly,
|
|
3329
|
+
name: w.name,
|
|
3330
|
+
required: w.isNullable ? {} : { required: !0 },
|
|
3331
|
+
value: y.current[w.name] ?? (a ? void 0 : C[w.name]),
|
|
3332
|
+
join: v
|
|
3333
|
+
}));
|
|
3334
|
+
return /* @__PURE__ */ p.jsx("dialog", { className: "editdb-dialog-edit", ref: g, children: /* @__PURE__ */ p.jsxs("form", { method: "dialog", onSubmit: O, children: [
|
|
3335
|
+
c.map(
|
|
3336
|
+
(w) => /* @__PURE__ */ p.jsx("input", { type: "hidden", name: w.name, defaultValue: n }, w.name)
|
|
3337
|
+
),
|
|
3338
|
+
/* @__PURE__ */ p.jsxs("h3", { className: "editdb-dialog-edit__heading", children: [
|
|
3339
|
+
d,
|
|
3340
|
+
":",
|
|
3341
|
+
j
|
|
3342
|
+
] }),
|
|
3343
|
+
/* @__PURE__ */ p.jsx(Bl, { fields: _, detailRef: y }),
|
|
3344
|
+
/* @__PURE__ */ p.jsxs("div", { className: "button-row", children: [
|
|
3345
|
+
/* @__PURE__ */ p.jsx(gt, { className: "editdb-dialog-edit__cancel", to: "../..", children: "Cancel" }),
|
|
3346
|
+
/* @__PURE__ */ p.jsx(
|
|
3347
|
+
"button",
|
|
3348
|
+
{
|
|
3349
|
+
type: "submit",
|
|
3350
|
+
className: `editdb-dialog-edit__submit ${b.isPending ? "editdb-dialog-edit__submit--loading" : ""}`,
|
|
3351
|
+
disabled: b.isPending,
|
|
3352
|
+
children: "Save"
|
|
3353
|
+
}
|
|
3354
|
+
)
|
|
3355
|
+
] })
|
|
3356
|
+
] }) });
|
|
3357
|
+
}
|
|
3358
|
+
function hn() {
|
|
3359
|
+
const { table: e, editid: t } = $r(), n = $t();
|
|
3360
|
+
return e ? n.loading ? /* @__PURE__ */ p.jsx("div", { children: "Loading..." }) : n.error ? /* @__PURE__ */ p.jsxs("div", { children: [
|
|
3361
|
+
"Error: ",
|
|
3362
|
+
n.error.message
|
|
3363
|
+
] }) : /* @__PURE__ */ p.jsx(Wl, { table: e, schema: n, editid: t ?? "" }) : /* @__PURE__ */ p.jsx("div", { children: "Table missing" });
|
|
3364
|
+
}
|
|
3365
|
+
function Bl({ fields: e, detailRef: t }) {
|
|
3366
|
+
return /* @__PURE__ */ p.jsx("ul", { className: "editdb-dialog-edit__input-list", children: e.map((n) => /* @__PURE__ */ p.jsx(Vl, { field: n, detailRef: t }, n.name)) });
|
|
3367
|
+
}
|
|
3368
|
+
function Vl({ field: e, detailRef: t }) {
|
|
3369
|
+
let n = Gl;
|
|
3370
|
+
return e.join ? n = Ul : Hl.some((r) => r === e.paramType) ? n = ql : ta.some((r) => r === e.paramType) && (n = Yl), /* @__PURE__ */ p.jsxs("li", { className: "editdb-dialog-edit__input-item", children: [
|
|
3371
|
+
/* @__PURE__ */ p.jsx("label", { children: e.name }),
|
|
3372
|
+
/* @__PURE__ */ p.jsx(n, { field: e, detailRef: t })
|
|
3373
|
+
] });
|
|
3374
|
+
}
|
|
3375
|
+
function ql({ field: e, detailRef: t }) {
|
|
3376
|
+
return /* @__PURE__ */ p.jsx(
|
|
3377
|
+
"input",
|
|
3378
|
+
{
|
|
3379
|
+
type: "checkbox",
|
|
3380
|
+
defaultChecked: e.value,
|
|
3381
|
+
onChange: (n) => {
|
|
3382
|
+
t.current[e.name] = n.target.checked;
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
);
|
|
3386
|
+
}
|
|
3387
|
+
function Gl({ field: e, detailRef: t }) {
|
|
3388
|
+
return /* @__PURE__ */ p.jsx(
|
|
3389
|
+
"input",
|
|
3390
|
+
{
|
|
3391
|
+
type: "text",
|
|
3392
|
+
defaultValue: e.value,
|
|
3393
|
+
...e.required,
|
|
3394
|
+
onChange: (n) => {
|
|
3395
|
+
t.current[e.name] = n.target.value;
|
|
3396
|
+
}
|
|
3397
|
+
}
|
|
3398
|
+
);
|
|
3399
|
+
}
|
|
3400
|
+
function Yl({ field: e, detailRef: t }) {
|
|
3401
|
+
return /* @__PURE__ */ p.jsx(
|
|
3402
|
+
"input",
|
|
3403
|
+
{
|
|
3404
|
+
type: "date",
|
|
3405
|
+
defaultValue: e.value,
|
|
3406
|
+
...e.required,
|
|
3407
|
+
onChange: (n) => {
|
|
3408
|
+
t.current[e.name] = n.target.value;
|
|
3409
|
+
}
|
|
3410
|
+
}
|
|
3411
|
+
);
|
|
3412
|
+
}
|
|
3413
|
+
function Ul({ field: e, detailRef: t }) {
|
|
3414
|
+
const n = $t(), r = Nl(n, e.join.destinationTable, e.join.destinationColumnNames[0]);
|
|
3415
|
+
return /* @__PURE__ */ p.jsx(
|
|
3416
|
+
"select",
|
|
3417
|
+
{
|
|
3418
|
+
defaultValue: e.value,
|
|
3419
|
+
onChange: (o) => {
|
|
3420
|
+
t.current[e.name] = o.target.value;
|
|
3421
|
+
},
|
|
3422
|
+
children: r.data.map((o) => /* @__PURE__ */ p.jsx("option", { value: o.key, children: o.label }, o.key))
|
|
3423
|
+
}
|
|
3424
|
+
);
|
|
3425
|
+
}
|
|
3426
|
+
class mn extends ha {
|
|
3427
|
+
constructor(t) {
|
|
3428
|
+
super(t), this.state = { hasError: !1, error: null };
|
|
3429
|
+
}
|
|
3430
|
+
static getDerivedStateFromError(t) {
|
|
3431
|
+
return { hasError: !0, error: t };
|
|
3432
|
+
}
|
|
3433
|
+
componentDidCatch(t, n) {
|
|
3434
|
+
const { onError: r, section: o } = this.props;
|
|
3435
|
+
console.error(`Error in ${o ?? "component"}:`, t, n), r?.(t, n);
|
|
3436
|
+
}
|
|
3437
|
+
handleRetry = () => {
|
|
3438
|
+
this.setState({ hasError: !1, error: null });
|
|
3439
|
+
};
|
|
3440
|
+
render() {
|
|
3441
|
+
const { hasError: t, error: n } = this.state, { children: r, fallback: o, section: a } = this.props;
|
|
3442
|
+
return t ? o || /* @__PURE__ */ p.jsx("div", { className: "editdb-error-boundary", children: /* @__PURE__ */ p.jsxs("div", { className: "editdb-error-boundary__content", children: [
|
|
3443
|
+
/* @__PURE__ */ p.jsxs("h3", { className: "editdb-error-boundary__title", children: [
|
|
3444
|
+
"Something went wrong",
|
|
3445
|
+
a ? ` in ${a}` : ""
|
|
3446
|
+
] }),
|
|
3447
|
+
/* @__PURE__ */ p.jsx("p", { className: "editdb-error-boundary__message", children: n?.message ?? "An unexpected error occurred" }),
|
|
3448
|
+
/* @__PURE__ */ p.jsx(
|
|
3449
|
+
"button",
|
|
3450
|
+
{
|
|
3451
|
+
className: "editdb-error-boundary__retry",
|
|
3452
|
+
onClick: this.handleRetry,
|
|
3453
|
+
children: "Try Again"
|
|
3454
|
+
}
|
|
3455
|
+
)
|
|
3456
|
+
] }) }) : r;
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
const Kl = () => /* @__PURE__ */ p.jsx("p", { className: "editdb-message", children: "Select a Table" }), Ql = () => /* @__PURE__ */ p.jsxs("div", { className: "editdb-frame-layout", children: [
|
|
3460
|
+
/* @__PURE__ */ p.jsx("div", { className: "editdb-frame-layout-header", children: /* @__PURE__ */ p.jsx(mn, { section: "Header", children: /* @__PURE__ */ p.jsxs(rr, { children: [
|
|
3461
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/*", element: /* @__PURE__ */ p.jsx(or, {}) }),
|
|
3462
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table", element: /* @__PURE__ */ p.jsx(or, {}) }),
|
|
3463
|
+
/* @__PURE__ */ p.jsx(me, { path: "/", element: /* @__PURE__ */ p.jsx(or, {}) })
|
|
3464
|
+
] }) }) }),
|
|
3465
|
+
/* @__PURE__ */ p.jsx("div", { className: "editdb-frame-layout-nav", children: /* @__PURE__ */ p.jsx(mn, { section: "Table List", children: /* @__PURE__ */ p.jsx(jl, {}) }) }),
|
|
3466
|
+
/* @__PURE__ */ p.jsxs("div", { className: "editdb-frame-layout-body", children: [
|
|
3467
|
+
/* @__PURE__ */ p.jsx(mn, { section: "Data Panel", children: /* @__PURE__ */ p.jsxs(rr, { children: [
|
|
3468
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/from/:filterTable/:id/edit/:editid", element: /* @__PURE__ */ p.jsx(ft, {}) }),
|
|
3469
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/from/:filterTable/:id", element: /* @__PURE__ */ p.jsx(ft, {}) }),
|
|
3470
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/:id/edit/:editid", element: /* @__PURE__ */ p.jsx(ft, {}) }),
|
|
3471
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/:id", element: /* @__PURE__ */ p.jsx(ft, {}) }),
|
|
3472
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/edit/:editid", element: /* @__PURE__ */ p.jsx(ft, {}) }),
|
|
3473
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table", element: /* @__PURE__ */ p.jsx(ft, {}) }),
|
|
3474
|
+
/* @__PURE__ */ p.jsx(me, { path: "/", element: /* @__PURE__ */ p.jsx(Kl, {}) })
|
|
3475
|
+
] }) }),
|
|
3476
|
+
/* @__PURE__ */ p.jsx(mn, { section: "Data Edit", children: /* @__PURE__ */ p.jsxs(rr, { children: [
|
|
3477
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/from/:filterTable/:id/edit/:editid", element: /* @__PURE__ */ p.jsx(hn, {}) }),
|
|
3478
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/:id/edit/:editid", element: /* @__PURE__ */ p.jsx(hn, {}) }),
|
|
3479
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/edit/:editid", element: /* @__PURE__ */ p.jsx(hn, {}) }),
|
|
3480
|
+
/* @__PURE__ */ p.jsx(me, { path: "/:table/edit", element: /* @__PURE__ */ p.jsx(hn, {}) })
|
|
3481
|
+
] }) })
|
|
3482
|
+
] })
|
|
3483
|
+
] });
|
|
3484
|
+
function Jl({ onLocate: e }) {
|
|
3485
|
+
const t = pl();
|
|
3486
|
+
return En(() => {
|
|
3487
|
+
e?.(t);
|
|
3488
|
+
}, [t, e]), /* @__PURE__ */ p.jsx(Ql, {});
|
|
3489
|
+
}
|
|
3490
|
+
function ec({
|
|
3491
|
+
uri: e,
|
|
3492
|
+
fetcher: t,
|
|
3493
|
+
uiPath: n,
|
|
3494
|
+
onLocate: r
|
|
3495
|
+
}) {
|
|
3496
|
+
const o = ae(() => t || (e ? new Sl(e) : null), [e, t]), a = ae(() => new ba({
|
|
3497
|
+
defaultOptions: {
|
|
3498
|
+
queries: {
|
|
3499
|
+
staleTime: 300 * 1e3,
|
|
3500
|
+
retry: 1
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
}), []);
|
|
3504
|
+
return o ? /* @__PURE__ */ p.jsx(ya, { client: a, children: /* @__PURE__ */ p.jsx(Cl, { value: o, children: /* @__PURE__ */ p.jsx(hl, { path: n || "/", children: /* @__PURE__ */ p.jsx(El, { children: /* @__PURE__ */ p.jsx("div", { children: /* @__PURE__ */ p.jsx(Jl, { onLocate: r }) }) }) }) }) }) : /* @__PURE__ */ p.jsx("section", { children: "CONFIG MISSING..." });
|
|
3505
|
+
}
|
|
3506
|
+
export {
|
|
3507
|
+
ec as Editor,
|
|
3508
|
+
Sl as HttpGraphQLFetcher,
|
|
3509
|
+
ec as default,
|
|
3510
|
+
Ml as useTableMutation
|
|
3511
|
+
};
|