@sme.up/ketchup2 2.0.0-SNAPSHOT-20250603135048 → 2.0.0-SNAPSHOT-20250604085635
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/basic-components/icon/icon.d.ts.map +1 -1
- package/dist/ketchup2.cjs.js +11 -11
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +869 -853
- package/package.json +1 -1
package/dist/ketchup2.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var wr = Object.defineProperty;
|
|
2
|
-
var Er = (
|
|
3
|
-
var xe = (
|
|
4
|
-
import * as
|
|
2
|
+
var Er = (r, e, t) => e in r ? wr(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var xe = (r, e, t) => Er(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import * as ke from "react";
|
|
5
5
|
import ar, { useEffect as oe, useRef as be, useState as Q, useCallback as me, useLayoutEffect as Tr, useId as Or } from "react";
|
|
6
|
-
var
|
|
6
|
+
var Ie = { exports: {} }, De = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.js
|
|
@@ -15,10 +15,10 @@ var ke = { exports: {} }, Re = {};
|
|
|
15
15
|
*/
|
|
16
16
|
var vt;
|
|
17
17
|
function Rr() {
|
|
18
|
-
if (vt) return
|
|
18
|
+
if (vt) return De;
|
|
19
19
|
vt = 1;
|
|
20
|
-
var
|
|
21
|
-
function t(
|
|
20
|
+
var r = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
21
|
+
function t(n, s, a) {
|
|
22
22
|
var o = null;
|
|
23
23
|
if (a !== void 0 && (o = "" + a), s.key !== void 0 && (o = "" + s.key), "key" in s) {
|
|
24
24
|
a = {};
|
|
@@ -26,16 +26,16 @@ function Rr() {
|
|
|
26
26
|
i !== "key" && (a[i] = s[i]);
|
|
27
27
|
} else a = s;
|
|
28
28
|
return s = a.ref, {
|
|
29
|
-
$$typeof:
|
|
30
|
-
type:
|
|
29
|
+
$$typeof: r,
|
|
30
|
+
type: n,
|
|
31
31
|
key: o,
|
|
32
32
|
ref: s !== void 0 ? s : null,
|
|
33
33
|
props: a
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return De.Fragment = e, De.jsx = t, De.jsxs = t, De;
|
|
37
37
|
}
|
|
38
|
-
var
|
|
38
|
+
var Pe = {};
|
|
39
39
|
/**
|
|
40
40
|
* @license React
|
|
41
41
|
* react-jsx-runtime.development.js
|
|
@@ -48,7 +48,7 @@ var De = {};
|
|
|
48
48
|
var bt;
|
|
49
49
|
function Dr() {
|
|
50
50
|
return bt || (bt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
51
|
-
function
|
|
51
|
+
function r(d) {
|
|
52
52
|
if (d == null) return null;
|
|
53
53
|
if (typeof d == "function")
|
|
54
54
|
return d.$$typeof === C ? null : d.displayName || d.name || null;
|
|
@@ -58,7 +58,7 @@ function Dr() {
|
|
|
58
58
|
return "Fragment";
|
|
59
59
|
case E:
|
|
60
60
|
return "Profiler";
|
|
61
|
-
case
|
|
61
|
+
case w:
|
|
62
62
|
return "StrictMode";
|
|
63
63
|
case v:
|
|
64
64
|
return "Suspense";
|
|
@@ -81,11 +81,11 @@ function Dr() {
|
|
|
81
81
|
var m = d.render;
|
|
82
82
|
return d = d.displayName, d || (d = m.displayName || m.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
83
83
|
case j:
|
|
84
|
-
return m = d.displayName || null, m !== null ? m :
|
|
84
|
+
return m = d.displayName || null, m !== null ? m : r(d.type) || "Memo";
|
|
85
85
|
case V:
|
|
86
86
|
m = d._payload, d = d._init;
|
|
87
87
|
try {
|
|
88
|
-
return
|
|
88
|
+
return r(d(m));
|
|
89
89
|
} catch {
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -103,20 +103,20 @@ function Dr() {
|
|
|
103
103
|
}
|
|
104
104
|
if (m) {
|
|
105
105
|
m = console;
|
|
106
|
-
var
|
|
107
|
-
return
|
|
106
|
+
var S = m.error, D = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
107
|
+
return S.call(
|
|
108
108
|
m,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
110
|
D
|
|
111
111
|
), e(d);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function n(d) {
|
|
115
115
|
if (d === y) return "<>";
|
|
116
116
|
if (typeof d == "object" && d !== null && d.$$typeof === V)
|
|
117
117
|
return "<...>";
|
|
118
118
|
try {
|
|
119
|
-
var m =
|
|
119
|
+
var m = r(d);
|
|
120
120
|
return m ? "<" + m + ">" : "<...>";
|
|
121
121
|
} catch {
|
|
122
122
|
return "<...>";
|
|
@@ -137,31 +137,31 @@ function Dr() {
|
|
|
137
137
|
return d.key !== void 0;
|
|
138
138
|
}
|
|
139
139
|
function i(d, m) {
|
|
140
|
-
function
|
|
140
|
+
function S() {
|
|
141
141
|
ne || (ne = !0, console.error(
|
|
142
142
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
143
143
|
m
|
|
144
144
|
));
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
get:
|
|
146
|
+
S.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
147
|
+
get: S,
|
|
148
148
|
configurable: !0
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
function l() {
|
|
152
|
-
var d =
|
|
152
|
+
var d = r(this.type);
|
|
153
153
|
return z[d] || (z[d] = !0, console.error(
|
|
154
154
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
155
155
|
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
156
156
|
}
|
|
157
|
-
function c(d, m,
|
|
158
|
-
return
|
|
157
|
+
function c(d, m, S, D, T, P, N, _) {
|
|
158
|
+
return S = P.ref, d = {
|
|
159
159
|
$$typeof: g,
|
|
160
160
|
type: d,
|
|
161
161
|
key: m,
|
|
162
162
|
props: P,
|
|
163
163
|
_owner: T
|
|
164
|
-
}, (
|
|
164
|
+
}, (S !== void 0 ? S : null) !== null ? Object.defineProperty(d, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
get: l
|
|
167
167
|
}) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
@@ -186,7 +186,7 @@ function Dr() {
|
|
|
186
186
|
value: _
|
|
187
187
|
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
188
188
|
}
|
|
189
|
-
function u(d, m,
|
|
189
|
+
function u(d, m, S, D, T, P, N, _) {
|
|
190
190
|
var L = m.children;
|
|
191
191
|
if (L !== void 0)
|
|
192
192
|
if (D)
|
|
@@ -200,7 +200,7 @@ function Dr() {
|
|
|
200
200
|
);
|
|
201
201
|
else f(L);
|
|
202
202
|
if (Y.call(m, "key")) {
|
|
203
|
-
L =
|
|
203
|
+
L = r(d);
|
|
204
204
|
var K = Object.keys(m).filter(function(re) {
|
|
205
205
|
return re !== "key";
|
|
206
206
|
});
|
|
@@ -217,13 +217,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
217
217
|
L
|
|
218
218
|
), k[L + D] = !0);
|
|
219
219
|
}
|
|
220
|
-
if (L = null,
|
|
221
|
-
|
|
220
|
+
if (L = null, S !== void 0 && (t(S), L = "" + S), o(m) && (t(m.key), L = "" + m.key), "key" in m) {
|
|
221
|
+
S = {};
|
|
222
222
|
for (var W in m)
|
|
223
|
-
W !== "key" && (
|
|
224
|
-
} else
|
|
223
|
+
W !== "key" && (S[W] = m[W]);
|
|
224
|
+
} else S = m;
|
|
225
225
|
return L && i(
|
|
226
|
-
|
|
226
|
+
S,
|
|
227
227
|
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
228
228
|
), c(
|
|
229
229
|
d,
|
|
@@ -231,7 +231,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
231
231
|
P,
|
|
232
232
|
T,
|
|
233
233
|
s(),
|
|
234
|
-
|
|
234
|
+
S,
|
|
235
235
|
N,
|
|
236
236
|
_
|
|
237
237
|
);
|
|
@@ -239,7 +239,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
239
239
|
function f(d) {
|
|
240
240
|
typeof d == "object" && d !== null && d.$$typeof === g && d._store && (d._store.validated = 1);
|
|
241
241
|
}
|
|
242
|
-
var p = ar, g = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), y = Symbol.for("react.fragment"),
|
|
242
|
+
var p = ar, g = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), O = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), $ = Symbol.for("react.suspense_list"), j = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), F = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), I = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, J = Array.isArray, q = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
245
|
p = {
|
|
@@ -250,37 +250,37 @@ React keys must be passed directly to JSX without using spread:
|
|
|
250
250
|
var ne, z = {}, U = p["react-stack-bottom-frame"].bind(
|
|
251
251
|
p,
|
|
252
252
|
a
|
|
253
|
-
)(), B = q(
|
|
254
|
-
|
|
253
|
+
)(), B = q(n(a)), k = {};
|
|
254
|
+
Pe.Fragment = y, Pe.jsx = function(d, m, S, D, T) {
|
|
255
255
|
var P = 1e4 > I.recentlyCreatedOwnerStacks++;
|
|
256
256
|
return u(
|
|
257
257
|
d,
|
|
258
258
|
m,
|
|
259
|
-
|
|
259
|
+
S,
|
|
260
260
|
!1,
|
|
261
261
|
D,
|
|
262
262
|
T,
|
|
263
263
|
P ? Error("react-stack-top-frame") : U,
|
|
264
|
-
P ? q(
|
|
264
|
+
P ? q(n(d)) : B
|
|
265
265
|
);
|
|
266
|
-
},
|
|
266
|
+
}, Pe.jsxs = function(d, m, S, D, T) {
|
|
267
267
|
var P = 1e4 > I.recentlyCreatedOwnerStacks++;
|
|
268
268
|
return u(
|
|
269
269
|
d,
|
|
270
270
|
m,
|
|
271
|
-
|
|
271
|
+
S,
|
|
272
272
|
!0,
|
|
273
273
|
D,
|
|
274
274
|
T,
|
|
275
275
|
P ? Error("react-stack-top-frame") : U,
|
|
276
|
-
P ? q(
|
|
276
|
+
P ? q(n(d)) : B
|
|
277
277
|
);
|
|
278
278
|
};
|
|
279
|
-
}()),
|
|
279
|
+
}()), Pe;
|
|
280
280
|
}
|
|
281
281
|
var xt;
|
|
282
282
|
function Pr() {
|
|
283
|
-
return xt || (xt = 1, process.env.NODE_ENV === "production" ?
|
|
283
|
+
return xt || (xt = 1, process.env.NODE_ENV === "production" ? Ie.exports = Rr() : Ie.exports = Dr()), Ie.exports;
|
|
284
284
|
}
|
|
285
285
|
var x = Pr();
|
|
286
286
|
const le = {
|
|
@@ -296,9 +296,9 @@ const le = {
|
|
|
296
296
|
SPOTLIGHT: "SPL",
|
|
297
297
|
TEXT_FIELD: "ITX",
|
|
298
298
|
PASSWORD: "PWD"
|
|
299
|
-
}, Ar = (
|
|
300
|
-
if (
|
|
301
|
-
const e =
|
|
299
|
+
}, Ar = (r) => r.t == "D8", $r = (r) => {
|
|
300
|
+
if (r) {
|
|
301
|
+
const e = r.split(";");
|
|
302
302
|
if (e.length == 3)
|
|
303
303
|
return {
|
|
304
304
|
t: e[0],
|
|
@@ -312,14 +312,14 @@ const le = {
|
|
|
312
312
|
k: ""
|
|
313
313
|
};
|
|
314
314
|
};
|
|
315
|
-
class
|
|
315
|
+
class We {
|
|
316
316
|
constructor(e, t) {
|
|
317
317
|
xe(this, "class");
|
|
318
318
|
xe(this, "value");
|
|
319
319
|
this.class = e, this.value = t;
|
|
320
320
|
}
|
|
321
321
|
static fromDataObj(e) {
|
|
322
|
-
return new
|
|
322
|
+
return new We(e, e.k == "1" || e.k == "true");
|
|
323
323
|
}
|
|
324
324
|
getValue() {
|
|
325
325
|
return this.value;
|
|
@@ -334,52 +334,52 @@ class Ue {
|
|
|
334
334
|
return this.value ? "true" : "false";
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
function Cr(
|
|
338
|
-
if (ht(
|
|
339
|
-
const u = new Date(
|
|
337
|
+
function Cr(r, e) {
|
|
338
|
+
if (ht(r)) {
|
|
339
|
+
const u = new Date(r);
|
|
340
340
|
if (!isNaN(u.getTime()))
|
|
341
341
|
return u;
|
|
342
342
|
}
|
|
343
|
-
const t = /* @__PURE__ */ new Date(),
|
|
343
|
+
const t = /* @__PURE__ */ new Date(), n = r.replaceAll("/", "").replaceAll("-", "");
|
|
344
344
|
let s = "DDMMYYYY";
|
|
345
345
|
e === "en" && (s = "MMDDYYYY");
|
|
346
346
|
const a = s.indexOf("DD"), o = s.indexOf("MM");
|
|
347
347
|
let i = 0, l = 0, c = "";
|
|
348
|
-
switch (
|
|
348
|
+
switch (n.length) {
|
|
349
349
|
case 1:
|
|
350
350
|
case 2:
|
|
351
|
-
return i = parseInt(
|
|
351
|
+
return i = parseInt(n), t.setDate(i), Ne(t) ? t : r;
|
|
352
352
|
case 3:
|
|
353
353
|
case 4:
|
|
354
|
-
return i = parseInt(
|
|
354
|
+
return i = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), o === 0 ? (t.setMonth(i - 1), t.setDate(l)) : a === 0 && (t.setMonth(l - 1), t.setDate(i)), Ne(t) ? t : r;
|
|
355
355
|
case 5:
|
|
356
356
|
case 6: {
|
|
357
|
-
i = parseInt(
|
|
357
|
+
i = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), Number(n.substring(4)) > 50 ? c = "19" + n.substring(4) : c = "20" + n.substring(4);
|
|
358
358
|
let u = 0, f = 0;
|
|
359
|
-
return o === 0 ? (u = l, f = i - 1, t.setFullYear(parseInt(c), f, u)) : a === 0 && (u = i, f = l - 1, t.setFullYear(parseInt(c), f, u)), ct(i, f, parseInt(c)) &&
|
|
359
|
+
return o === 0 ? (u = l, f = i - 1, t.setFullYear(parseInt(c), f, u)) : a === 0 && (u = i, f = l - 1, t.setFullYear(parseInt(c), f, u)), ct(i, f, parseInt(c)) && Ne(t) ? t : r;
|
|
360
360
|
}
|
|
361
361
|
case 7:
|
|
362
362
|
case 8: {
|
|
363
|
-
i = parseInt(
|
|
363
|
+
i = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), c = n.substring(4);
|
|
364
364
|
let u = 0, f = 0;
|
|
365
|
-
return o === 0 ? (u = l, f = i - 1, t.setFullYear(parseInt(c), f, u)) : a === 0 && (u = i, f = l - 1, t.setFullYear(parseInt(c), f, u)), ct(u, f, parseInt(c)) &&
|
|
365
|
+
return o === 0 ? (u = l, f = i - 1, t.setFullYear(parseInt(c), f, u)) : a === 0 && (u = i, f = l - 1, t.setFullYear(parseInt(c), f, u)), ct(u, f, parseInt(c)) && Ne(t) ? t : r;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
return
|
|
368
|
+
return r;
|
|
369
369
|
}
|
|
370
|
-
function ht(
|
|
371
|
-
return /^\d{4}-\d{2}-\d{2}$/.test(
|
|
370
|
+
function ht(r) {
|
|
371
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(r) && r.length === 10;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
return
|
|
373
|
+
function Ne(r) {
|
|
374
|
+
return r instanceof Date && !isNaN(r.getTime());
|
|
375
375
|
}
|
|
376
|
-
function jr(
|
|
377
|
-
if (!/^\d{8}$/.test(
|
|
378
|
-
const e = parseInt(
|
|
379
|
-
return ct(
|
|
376
|
+
function jr(r) {
|
|
377
|
+
if (!/^\d{8}$/.test(r)) return !1;
|
|
378
|
+
const e = parseInt(r.slice(0, 4), 10), t = parseInt(r.slice(4, 6), 10), n = parseInt(r.slice(6, 8), 10);
|
|
379
|
+
return ct(n, t - 1, e);
|
|
380
380
|
}
|
|
381
|
-
function ct(
|
|
382
|
-
const
|
|
381
|
+
function ct(r, e, t) {
|
|
382
|
+
const n = [
|
|
383
383
|
31,
|
|
384
384
|
// January
|
|
385
385
|
Lr(t) ? 29 : 28,
|
|
@@ -405,16 +405,16 @@ function ct(n, e, t) {
|
|
|
405
405
|
31
|
|
406
406
|
// December
|
|
407
407
|
];
|
|
408
|
-
return !(e < 0 || e > 11 ||
|
|
408
|
+
return !(e < 0 || e > 11 || r < 1 || r > n[e]);
|
|
409
409
|
}
|
|
410
|
-
function Lr(
|
|
411
|
-
return
|
|
410
|
+
function Lr(r) {
|
|
411
|
+
return r % 4 === 0 && (r % 100 !== 0 || r % 400 === 0);
|
|
412
412
|
}
|
|
413
|
-
function kr(
|
|
414
|
-
const e =
|
|
415
|
-
return isNaN(e) || isNaN(Number(t)) || isNaN(Number(
|
|
413
|
+
function kr(r) {
|
|
414
|
+
const e = r.getFullYear(), t = String(r.getMonth() + 1).padStart(2, "0"), n = String(r.getDate()).padStart(2, "0");
|
|
415
|
+
return isNaN(e) || isNaN(Number(t)) || isNaN(Number(n)) ? r.toString() : `${e}-${t}-${n}`;
|
|
416
416
|
}
|
|
417
|
-
class
|
|
417
|
+
class He {
|
|
418
418
|
constructor(e, t) {
|
|
419
419
|
xe(this, "class");
|
|
420
420
|
xe(this, "date");
|
|
@@ -423,7 +423,7 @@ class We {
|
|
|
423
423
|
static fromDataObj(e) {
|
|
424
424
|
const t = St.get(`${e.t}${e.p}`);
|
|
425
425
|
if (t)
|
|
426
|
-
return new
|
|
426
|
+
return new He(e, t.legacyToIso(e.k));
|
|
427
427
|
throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`);
|
|
428
428
|
}
|
|
429
429
|
getLegacyValue() {
|
|
@@ -442,30 +442,30 @@ const St = /* @__PURE__ */ new Map([
|
|
|
442
442
|
[
|
|
443
443
|
"D8*YYMD",
|
|
444
444
|
{
|
|
445
|
-
legacyToIso(
|
|
446
|
-
return jr(
|
|
445
|
+
legacyToIso(r) {
|
|
446
|
+
return jr(r) && `${r.substring(0, 4)}-${r.substring(4, 6)}-${r.substring(6, 8)}` || r;
|
|
447
447
|
},
|
|
448
|
-
isoToLegacy(
|
|
449
|
-
return ht(
|
|
448
|
+
isoToLegacy(r) {
|
|
449
|
+
return ht(r) && r.replaceAll("-", "") || r;
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
]
|
|
453
|
-
]),
|
|
453
|
+
]), qe = (r, e) => {
|
|
454
454
|
oe(() => {
|
|
455
|
-
const t = (
|
|
456
|
-
typeof
|
|
455
|
+
const t = (n) => {
|
|
456
|
+
typeof r == "object" && r !== null && "current" in r && r.current && !r.current.contains(n.target) && e();
|
|
457
457
|
};
|
|
458
458
|
return document.addEventListener("mousedown", t), () => {
|
|
459
459
|
document.removeEventListener("mousedown", t);
|
|
460
460
|
};
|
|
461
|
-
}, [
|
|
461
|
+
}, [r, e]);
|
|
462
462
|
};
|
|
463
463
|
function gt({
|
|
464
|
-
position:
|
|
464
|
+
position: r = "bottom",
|
|
465
465
|
enabled: e = !0
|
|
466
466
|
}) {
|
|
467
|
-
const t = be(null),
|
|
468
|
-
const i = t.current, l =
|
|
467
|
+
const t = be(null), n = be(null), [s, a] = Q(0), o = me(() => {
|
|
468
|
+
const i = t.current, l = n.current;
|
|
469
469
|
if (!i || !l) return;
|
|
470
470
|
const { top: c, left: u, width: f, height: p } = i.getBoundingClientRect();
|
|
471
471
|
a(f);
|
|
@@ -474,8 +474,8 @@ function gt({
|
|
|
474
474
|
requestAnimationFrame(o);
|
|
475
475
|
return;
|
|
476
476
|
}
|
|
477
|
-
let y = c + window.scrollY,
|
|
478
|
-
switch (
|
|
477
|
+
let y = c + window.scrollY, w = u + window.scrollX;
|
|
478
|
+
switch (r) {
|
|
479
479
|
case "top":
|
|
480
480
|
y -= g;
|
|
481
481
|
break;
|
|
@@ -483,84 +483,84 @@ function gt({
|
|
|
483
483
|
y += p;
|
|
484
484
|
break;
|
|
485
485
|
case "left":
|
|
486
|
-
|
|
486
|
+
w -= h;
|
|
487
487
|
break;
|
|
488
488
|
case "right":
|
|
489
|
-
|
|
489
|
+
w += f;
|
|
490
490
|
break;
|
|
491
491
|
}
|
|
492
492
|
requestAnimationFrame(() => {
|
|
493
|
-
l.style.transform = `translate(${
|
|
493
|
+
l.style.transform = `translate(${w}px, ${y}px)`;
|
|
494
494
|
});
|
|
495
|
-
}, [
|
|
495
|
+
}, [r]);
|
|
496
496
|
return Tr(() => {
|
|
497
|
-
e && t.current &&
|
|
497
|
+
e && t.current && n.current && o();
|
|
498
498
|
const i = new MutationObserver(() => {
|
|
499
|
-
|
|
499
|
+
n.current && o();
|
|
500
500
|
});
|
|
501
|
-
return
|
|
501
|
+
return n.current && i.observe(n.current, { childList: !0, subtree: !0 }), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
|
|
502
502
|
window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0), i.disconnect();
|
|
503
503
|
};
|
|
504
|
-
}, [o, e]), { anchorRef: t, targetRef:
|
|
504
|
+
}, [o, e]), { anchorRef: t, targetRef: n, anchorWidth: s };
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const Ke = (r, e, t) => {
|
|
507
507
|
if (t)
|
|
508
508
|
switch (t) {
|
|
509
509
|
case "CodeOnly":
|
|
510
|
-
return
|
|
510
|
+
return r;
|
|
511
511
|
case "DescOnly":
|
|
512
512
|
return e || "";
|
|
513
513
|
case "Both":
|
|
514
|
-
return `${
|
|
514
|
+
return `${r} - ${e}`;
|
|
515
515
|
}
|
|
516
|
-
return
|
|
516
|
+
return r;
|
|
517
517
|
}, Ir = ({
|
|
518
|
-
helperText:
|
|
518
|
+
helperText: r,
|
|
519
519
|
disabled: e,
|
|
520
520
|
state: t
|
|
521
521
|
}) => {
|
|
522
|
-
const
|
|
522
|
+
const n = {
|
|
523
523
|
container: `smp-helper-text ${e ? "smp-helper-text-disabled" : ""} ${t ? `smp-helper-text-${t}` : ""}`
|
|
524
524
|
};
|
|
525
|
-
return /* @__PURE__ */ x.jsx("span", { className:
|
|
526
|
-
}, ir = ({ label:
|
|
525
|
+
return /* @__PURE__ */ x.jsx("span", { className: n.container, children: r });
|
|
526
|
+
}, ir = ({ label: r, disabled: e }) => {
|
|
527
527
|
const t = {
|
|
528
528
|
container: `smp-label ${e ? "smp-label-disabled" : ""}`
|
|
529
529
|
};
|
|
530
|
-
return /* @__PURE__ */ x.jsx("span", { className: t.container, children:
|
|
530
|
+
return /* @__PURE__ */ x.jsx("span", { className: t.container, children: r });
|
|
531
531
|
};
|
|
532
|
-
function Nr(
|
|
533
|
-
if (
|
|
532
|
+
function Nr(r, e) {
|
|
533
|
+
if (r == null) return {};
|
|
534
534
|
var t = {};
|
|
535
|
-
for (var
|
|
536
|
-
if (e.indexOf(
|
|
537
|
-
t[
|
|
535
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
536
|
+
if (e.indexOf(n) !== -1) continue;
|
|
537
|
+
t[n] = r[n];
|
|
538
538
|
}
|
|
539
539
|
return t;
|
|
540
540
|
}
|
|
541
|
-
function
|
|
542
|
-
return
|
|
541
|
+
function Be() {
|
|
542
|
+
return Be = Object.assign ? Object.assign.bind() : function(r) {
|
|
543
543
|
for (var e = 1; e < arguments.length; e++) {
|
|
544
544
|
var t = arguments[e];
|
|
545
|
-
for (var
|
|
545
|
+
for (var n in t) ({}).hasOwnProperty.call(t, n) && (r[n] = t[n]);
|
|
546
546
|
}
|
|
547
|
-
return
|
|
548
|
-
},
|
|
547
|
+
return r;
|
|
548
|
+
}, Be.apply(null, arguments);
|
|
549
549
|
}
|
|
550
|
-
function ut(
|
|
551
|
-
return ut = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t,
|
|
552
|
-
return t.__proto__ =
|
|
553
|
-
}, ut(
|
|
550
|
+
function ut(r, e) {
|
|
551
|
+
return ut = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) {
|
|
552
|
+
return t.__proto__ = n, t;
|
|
553
|
+
}, ut(r, e);
|
|
554
554
|
}
|
|
555
|
-
function _r(
|
|
556
|
-
|
|
555
|
+
function _r(r, e) {
|
|
556
|
+
r.prototype = Object.create(e.prototype), r.prototype.constructor = r, ut(r, e);
|
|
557
557
|
}
|
|
558
|
-
function et(
|
|
559
|
-
if (t || arguments.length === 2) for (var
|
|
560
|
-
(a || !(
|
|
561
|
-
return
|
|
558
|
+
function et(r, e, t) {
|
|
559
|
+
if (t || arguments.length === 2) for (var n = 0, s = e.length, a; n < s; n++)
|
|
560
|
+
(a || !(n in e)) && (a || (a = Array.prototype.slice.call(e, 0, n)), a[n] = e[n]);
|
|
561
|
+
return r.concat(a || Array.prototype.slice.call(e));
|
|
562
562
|
}
|
|
563
|
-
var
|
|
563
|
+
var _e = {};
|
|
564
564
|
/*!
|
|
565
565
|
* content-type
|
|
566
566
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
@@ -568,10 +568,10 @@ var Ne = {};
|
|
|
568
568
|
*/
|
|
569
569
|
var wt;
|
|
570
570
|
function Mr() {
|
|
571
|
-
if (wt) return
|
|
571
|
+
if (wt) return _e;
|
|
572
572
|
wt = 1;
|
|
573
|
-
var
|
|
574
|
-
|
|
573
|
+
var r = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g, e = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/, t = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/, n = /\\([\u000b\u0020-\u00ff])/g, s = /([\\"])/g, a = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
574
|
+
_e.format = o, _e.parse = i;
|
|
575
575
|
function o(f) {
|
|
576
576
|
if (!f || typeof f != "object")
|
|
577
577
|
throw new TypeError("argument obj is required");
|
|
@@ -580,8 +580,8 @@ function Mr() {
|
|
|
580
580
|
throw new TypeError("invalid type");
|
|
581
581
|
var h = g;
|
|
582
582
|
if (p && typeof p == "object")
|
|
583
|
-
for (var y,
|
|
584
|
-
if (y =
|
|
583
|
+
for (var y, w = Object.keys(p).sort(), E = 0; E < w.length; E++) {
|
|
584
|
+
if (y = w[E], !t.test(y))
|
|
585
585
|
throw new TypeError("invalid parameter name");
|
|
586
586
|
h += "; " + y + "=" + c(p[y]);
|
|
587
587
|
}
|
|
@@ -598,11 +598,11 @@ function Mr() {
|
|
|
598
598
|
throw new TypeError("invalid media type");
|
|
599
599
|
var y = new u(h.toLowerCase());
|
|
600
600
|
if (g !== -1) {
|
|
601
|
-
var
|
|
602
|
-
for (
|
|
601
|
+
var w, E, b;
|
|
602
|
+
for (r.lastIndex = g; E = r.exec(p); ) {
|
|
603
603
|
if (E.index !== g)
|
|
604
604
|
throw new TypeError("invalid parameter format");
|
|
605
|
-
g += E[0].length,
|
|
605
|
+
g += E[0].length, w = E[1].toLowerCase(), b = E[2], b.charCodeAt(0) === 34 && (b = b.slice(1, -1), b.indexOf("\\") !== -1 && (b = b.replace(n, "$1"))), y.parameters[w] = b;
|
|
606
606
|
}
|
|
607
607
|
if (g !== p.length)
|
|
608
608
|
throw new TypeError("invalid parameter format");
|
|
@@ -626,13 +626,13 @@ function Mr() {
|
|
|
626
626
|
function u(f) {
|
|
627
627
|
this.parameters = /* @__PURE__ */ Object.create(null), this.type = f;
|
|
628
628
|
}
|
|
629
|
-
return
|
|
629
|
+
return _e;
|
|
630
630
|
}
|
|
631
631
|
var Fr = Mr(), Te = /* @__PURE__ */ new Map(), or = function(e) {
|
|
632
632
|
return e.cloneNode(!0);
|
|
633
633
|
}, Et = function() {
|
|
634
634
|
return window.location.protocol === "file:";
|
|
635
|
-
}, lr = function(e, t,
|
|
635
|
+
}, lr = function(e, t, n) {
|
|
636
636
|
var s = new XMLHttpRequest();
|
|
637
637
|
s.onreadystatechange = function() {
|
|
638
638
|
try {
|
|
@@ -648,13 +648,13 @@ var Fr = Mr(), Te = /* @__PURE__ */ new Map(), or = function(e) {
|
|
|
648
648
|
if (s.status === 404 || s.responseXML === null)
|
|
649
649
|
throw new Error(Et() ? "Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver." : "Unable to load SVG file: " + e);
|
|
650
650
|
if (s.status === 200 || Et() && s.status === 0)
|
|
651
|
-
|
|
651
|
+
n(null, s);
|
|
652
652
|
else
|
|
653
653
|
throw new Error("There was a problem injecting the SVG: " + s.status + " " + s.statusText);
|
|
654
654
|
}
|
|
655
655
|
} catch (i) {
|
|
656
656
|
if (s.abort(), i instanceof Error)
|
|
657
|
-
|
|
657
|
+
n(i, s);
|
|
658
658
|
else
|
|
659
659
|
throw i;
|
|
660
660
|
}
|
|
@@ -669,32 +669,32 @@ var Fr = Mr(), Te = /* @__PURE__ */ new Map(), or = function(e) {
|
|
|
669
669
|
l instanceof SVGSVGElement && c(null, or(l)), l instanceof Error && c(l), o === ve[e].length - 1 && delete ve[e];
|
|
670
670
|
}
|
|
671
671
|
}, 0);
|
|
672
|
-
},
|
|
673
|
-
t(
|
|
674
|
-
}, Yr = function(e, t,
|
|
672
|
+
}, n = 0, s = ve[e].length; n < s; n++)
|
|
673
|
+
t(n);
|
|
674
|
+
}, Yr = function(e, t, n) {
|
|
675
675
|
if (Te.has(e)) {
|
|
676
676
|
var s = Te.get(e);
|
|
677
677
|
if (s === void 0) {
|
|
678
|
-
Tt(e,
|
|
678
|
+
Tt(e, n);
|
|
679
679
|
return;
|
|
680
680
|
}
|
|
681
681
|
if (s instanceof SVGSVGElement) {
|
|
682
|
-
|
|
682
|
+
n(null, or(s));
|
|
683
683
|
return;
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
Te.set(e, void 0), Tt(e,
|
|
686
|
+
Te.set(e, void 0), Tt(e, n), lr(e, t, function(a, o) {
|
|
687
687
|
var i;
|
|
688
688
|
a ? Te.set(e, a) : ((i = o.responseXML) === null || i === void 0 ? void 0 : i.documentElement) instanceof SVGSVGElement && Te.set(e, o.responseXML.documentElement), Vr(e);
|
|
689
689
|
});
|
|
690
|
-
}, Ur = function(e, t,
|
|
690
|
+
}, Ur = function(e, t, n) {
|
|
691
691
|
lr(e, t, function(s, a) {
|
|
692
692
|
var o;
|
|
693
|
-
s ?
|
|
693
|
+
s ? n(s) : ((o = a.responseXML) === null || o === void 0 ? void 0 : o.documentElement) instanceof SVGSVGElement && n(null, a.responseXML.documentElement);
|
|
694
694
|
});
|
|
695
695
|
}, Wr = 0, Hr = function() {
|
|
696
696
|
return ++Wr;
|
|
697
|
-
}, pe = [], Ot = {}, qr = "http://www.w3.org/2000/svg", tt = "http://www.w3.org/1999/xlink", Rt = function(e, t,
|
|
697
|
+
}, pe = [], Ot = {}, qr = "http://www.w3.org/2000/svg", tt = "http://www.w3.org/1999/xlink", Rt = function(e, t, n, s, a, o, i) {
|
|
698
698
|
var l = e.getAttribute("data-src") || e.getAttribute("src");
|
|
699
699
|
if (!l) {
|
|
700
700
|
i(new Error("Invalid data-src or src attribute"));
|
|
@@ -719,8 +719,8 @@ var Fr = Mr(), Te = /* @__PURE__ */ new Map(), or = function(e) {
|
|
|
719
719
|
h && f.setAttribute("width", h);
|
|
720
720
|
var y = e.getAttribute("height");
|
|
721
721
|
y && f.setAttribute("height", y);
|
|
722
|
-
var
|
|
723
|
-
f.setAttribute("class",
|
|
722
|
+
var w = Array.from(new Set(et(et(et([], (f.getAttribute("class") || "").split(" "), !0), ["injected-svg"], !1), (e.getAttribute("class") || "").split(" "), !0))).join(" ").trim();
|
|
723
|
+
f.setAttribute("class", w);
|
|
724
724
|
var E = e.getAttribute("style");
|
|
725
725
|
E && f.setAttribute("style", E), f.setAttribute("data-src", l);
|
|
726
726
|
var b = [].filter.call(e.attributes, function(B) {
|
|
@@ -728,7 +728,7 @@ var Fr = Mr(), Te = /* @__PURE__ */ new Map(), or = function(e) {
|
|
|
728
728
|
});
|
|
729
729
|
if (Array.prototype.forEach.call(b, function(B) {
|
|
730
730
|
B.name && B.value && f.setAttribute(B.name, B.value);
|
|
731
|
-
}),
|
|
731
|
+
}), n) {
|
|
732
732
|
var O = {
|
|
733
733
|
clipPath: ["clip-path"],
|
|
734
734
|
"color-profile": ["color-profile"],
|
|
@@ -782,10 +782,10 @@ var Fr = Mr(), Te = /* @__PURE__ */ new Map(), or = function(e) {
|
|
|
782
782
|
e.parentNode.replaceChild(f, e), pe.splice(pe.indexOf(e), 1), e = null, i(null, f);
|
|
783
783
|
});
|
|
784
784
|
}, Kr = function(e, t) {
|
|
785
|
-
var
|
|
786
|
-
} : s, o =
|
|
787
|
-
} : o, l =
|
|
788
|
-
} : l, u =
|
|
785
|
+
var n = t === void 0 ? {} : t, s = n.afterAll, a = s === void 0 ? function() {
|
|
786
|
+
} : s, o = n.afterEach, i = o === void 0 ? function() {
|
|
787
|
+
} : o, l = n.beforeEach, c = l === void 0 ? function() {
|
|
788
|
+
} : l, u = n.cacheRequests, f = u === void 0 ? !0 : u, p = n.evalScripts, g = p === void 0 ? "never" : p, h = n.httpRequestWithCredentials, y = h === void 0 ? !1 : h, w = n.renumerateIRIElements, E = w === void 0 ? !0 : w;
|
|
789
789
|
if (e && "length" in e)
|
|
790
790
|
for (var b = 0, O = 0, R = e.length; O < R; O++)
|
|
791
791
|
Rt(e[O], g, E, f, y, c, function(v, $) {
|
|
@@ -794,7 +794,7 @@ var Fr = Mr(), Te = /* @__PURE__ */ new Map(), or = function(e) {
|
|
|
794
794
|
else e ? Rt(e, g, E, f, y, c, function(v, $) {
|
|
795
795
|
i(v, $), a(1), e = null;
|
|
796
796
|
}) : a(0);
|
|
797
|
-
},
|
|
797
|
+
}, Me = { exports: {} }, Fe = { exports: {} }, X = {};
|
|
798
798
|
/** @license React v16.13.1
|
|
799
799
|
* react-is.production.min.js
|
|
800
800
|
*
|
|
@@ -807,7 +807,7 @@ var Dt;
|
|
|
807
807
|
function Br() {
|
|
808
808
|
if (Dt) return X;
|
|
809
809
|
Dt = 1;
|
|
810
|
-
var
|
|
810
|
+
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, o = r ? Symbol.for("react.provider") : 60109, i = r ? Symbol.for("react.context") : 60110, l = r ? Symbol.for("react.async_mode") : 60111, c = r ? Symbol.for("react.concurrent_mode") : 60111, u = r ? Symbol.for("react.forward_ref") : 60112, f = r ? Symbol.for("react.suspense") : 60113, p = r ? Symbol.for("react.suspense_list") : 60120, g = r ? Symbol.for("react.memo") : 60115, h = r ? Symbol.for("react.lazy") : 60116, y = r ? Symbol.for("react.block") : 60121, w = r ? Symbol.for("react.fundamental") : 60117, E = r ? Symbol.for("react.responder") : 60118, b = r ? Symbol.for("react.scope") : 60119;
|
|
811
811
|
function O(v) {
|
|
812
812
|
if (typeof v == "object" && v !== null) {
|
|
813
813
|
var $ = v.$$typeof;
|
|
@@ -816,7 +816,7 @@ function Br() {
|
|
|
816
816
|
switch (v = v.type, v) {
|
|
817
817
|
case l:
|
|
818
818
|
case c:
|
|
819
|
-
case
|
|
819
|
+
case n:
|
|
820
820
|
case a:
|
|
821
821
|
case s:
|
|
822
822
|
case f:
|
|
@@ -841,7 +841,7 @@ function Br() {
|
|
|
841
841
|
function R(v) {
|
|
842
842
|
return O(v) === c;
|
|
843
843
|
}
|
|
844
|
-
return X.AsyncMode = l, X.ConcurrentMode = c, X.ContextConsumer = i, X.ContextProvider = o, X.Element = e, X.ForwardRef = u, X.Fragment =
|
|
844
|
+
return X.AsyncMode = l, X.ConcurrentMode = c, X.ContextConsumer = i, X.ContextProvider = o, X.Element = e, X.ForwardRef = u, X.Fragment = n, X.Lazy = h, X.Memo = g, X.Portal = t, X.Profiler = a, X.StrictMode = s, X.Suspense = f, X.isAsyncMode = function(v) {
|
|
845
845
|
return R(v) || O(v) === l;
|
|
846
846
|
}, X.isConcurrentMode = R, X.isContextConsumer = function(v) {
|
|
847
847
|
return O(v) === i;
|
|
@@ -852,7 +852,7 @@ function Br() {
|
|
|
852
852
|
}, X.isForwardRef = function(v) {
|
|
853
853
|
return O(v) === u;
|
|
854
854
|
}, X.isFragment = function(v) {
|
|
855
|
-
return O(v) ===
|
|
855
|
+
return O(v) === n;
|
|
856
856
|
}, X.isLazy = function(v) {
|
|
857
857
|
return O(v) === h;
|
|
858
858
|
}, X.isMemo = function(v) {
|
|
@@ -866,7 +866,7 @@ function Br() {
|
|
|
866
866
|
}, X.isSuspense = function(v) {
|
|
867
867
|
return O(v) === f;
|
|
868
868
|
}, X.isValidElementType = function(v) {
|
|
869
|
-
return typeof v == "string" || typeof v == "function" || v ===
|
|
869
|
+
return typeof v == "string" || typeof v == "function" || v === n || v === c || v === a || v === s || v === f || v === p || typeof v == "object" && v !== null && (v.$$typeof === h || v.$$typeof === g || v.$$typeof === o || v.$$typeof === i || v.$$typeof === u || v.$$typeof === w || v.$$typeof === E || v.$$typeof === b || v.$$typeof === y);
|
|
870
870
|
}, X.typeOf = O, X;
|
|
871
871
|
}
|
|
872
872
|
var Z = {};
|
|
@@ -881,10 +881,10 @@ var Z = {};
|
|
|
881
881
|
var Pt;
|
|
882
882
|
function Gr() {
|
|
883
883
|
return Pt || (Pt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
884
|
-
var
|
|
884
|
+
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, o = r ? Symbol.for("react.provider") : 60109, i = r ? Symbol.for("react.context") : 60110, l = r ? Symbol.for("react.async_mode") : 60111, c = r ? Symbol.for("react.concurrent_mode") : 60111, u = r ? Symbol.for("react.forward_ref") : 60112, f = r ? Symbol.for("react.suspense") : 60113, p = r ? Symbol.for("react.suspense_list") : 60120, g = r ? Symbol.for("react.memo") : 60115, h = r ? Symbol.for("react.lazy") : 60116, y = r ? Symbol.for("react.block") : 60121, w = r ? Symbol.for("react.fundamental") : 60117, E = r ? Symbol.for("react.responder") : 60118, b = r ? Symbol.for("react.scope") : 60119;
|
|
885
885
|
function O(A) {
|
|
886
886
|
return typeof A == "string" || typeof A == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
887
|
-
A ===
|
|
887
|
+
A === n || A === c || A === a || A === s || A === f || A === p || typeof A == "object" && A !== null && (A.$$typeof === h || A.$$typeof === g || A.$$typeof === o || A.$$typeof === i || A.$$typeof === u || A.$$typeof === w || A.$$typeof === E || A.$$typeof === b || A.$$typeof === y);
|
|
888
888
|
}
|
|
889
889
|
function R(A) {
|
|
890
890
|
if (typeof A == "object" && A !== null) {
|
|
@@ -895,7 +895,7 @@ function Gr() {
|
|
|
895
895
|
switch (G) {
|
|
896
896
|
case l:
|
|
897
897
|
case c:
|
|
898
|
-
case
|
|
898
|
+
case n:
|
|
899
899
|
case a:
|
|
900
900
|
case s:
|
|
901
901
|
case f:
|
|
@@ -918,7 +918,7 @@ function Gr() {
|
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
|
-
var v = l, $ = c, j = i, V = o, F = e, C = u, I =
|
|
921
|
+
var v = l, $ = c, j = i, V = o, F = e, C = u, I = n, Y = h, J = g, q = t, ne = a, z = s, U = f, B = !1;
|
|
922
922
|
function k(A) {
|
|
923
923
|
return B || (B = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), d(A) || R(A) === l;
|
|
924
924
|
}
|
|
@@ -928,7 +928,7 @@ function Gr() {
|
|
|
928
928
|
function m(A) {
|
|
929
929
|
return R(A) === i;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function S(A) {
|
|
932
932
|
return R(A) === o;
|
|
933
933
|
}
|
|
934
934
|
function D(A) {
|
|
@@ -938,7 +938,7 @@ function Gr() {
|
|
|
938
938
|
return R(A) === u;
|
|
939
939
|
}
|
|
940
940
|
function P(A) {
|
|
941
|
-
return R(A) ===
|
|
941
|
+
return R(A) === n;
|
|
942
942
|
}
|
|
943
943
|
function N(A) {
|
|
944
944
|
return R(A) === h;
|
|
@@ -958,12 +958,12 @@ function Gr() {
|
|
|
958
958
|
function re(A) {
|
|
959
959
|
return R(A) === f;
|
|
960
960
|
}
|
|
961
|
-
Z.AsyncMode = v, Z.ConcurrentMode = $, Z.ContextConsumer = j, Z.ContextProvider = V, Z.Element = F, Z.ForwardRef = C, Z.Fragment = I, Z.Lazy = Y, Z.Memo = J, Z.Portal = q, Z.Profiler = ne, Z.StrictMode = z, Z.Suspense = U, Z.isAsyncMode = k, Z.isConcurrentMode = d, Z.isContextConsumer = m, Z.isContextProvider =
|
|
961
|
+
Z.AsyncMode = v, Z.ConcurrentMode = $, Z.ContextConsumer = j, Z.ContextProvider = V, Z.Element = F, Z.ForwardRef = C, Z.Fragment = I, Z.Lazy = Y, Z.Memo = J, Z.Portal = q, Z.Profiler = ne, Z.StrictMode = z, Z.Suspense = U, Z.isAsyncMode = k, Z.isConcurrentMode = d, Z.isContextConsumer = m, Z.isContextProvider = S, Z.isElement = D, Z.isForwardRef = T, Z.isFragment = P, Z.isLazy = N, Z.isMemo = _, Z.isPortal = L, Z.isProfiler = K, Z.isStrictMode = W, Z.isSuspense = re, Z.isValidElementType = O, Z.typeOf = R;
|
|
962
962
|
}()), Z;
|
|
963
963
|
}
|
|
964
964
|
var At;
|
|
965
965
|
function cr() {
|
|
966
|
-
return At || (At = 1, process.env.NODE_ENV === "production" ?
|
|
966
|
+
return At || (At = 1, process.env.NODE_ENV === "production" ? Fe.exports = Br() : Fe.exports = Gr()), Fe.exports;
|
|
967
967
|
}
|
|
968
968
|
/*
|
|
969
969
|
object-assign
|
|
@@ -974,8 +974,8 @@ var rt, $t;
|
|
|
974
974
|
function zr() {
|
|
975
975
|
if ($t) return rt;
|
|
976
976
|
$t = 1;
|
|
977
|
-
var
|
|
978
|
-
function
|
|
977
|
+
var r = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
978
|
+
function n(a) {
|
|
979
979
|
if (a == null)
|
|
980
980
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
981
981
|
return Object(a);
|
|
@@ -1003,12 +1003,12 @@ function zr() {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
return rt = s() ? Object.assign : function(a, o) {
|
|
1006
|
-
for (var i, l =
|
|
1006
|
+
for (var i, l = n(a), c, u = 1; u < arguments.length; u++) {
|
|
1007
1007
|
i = Object(arguments[u]);
|
|
1008
1008
|
for (var f in i)
|
|
1009
1009
|
e.call(i, f) && (l[f] = i[f]);
|
|
1010
|
-
if (
|
|
1011
|
-
c =
|
|
1010
|
+
if (r) {
|
|
1011
|
+
c = r(i);
|
|
1012
1012
|
for (var p = 0; p < c.length; p++)
|
|
1013
1013
|
t.call(i, c[p]) && (l[c[p]] = i[c[p]]);
|
|
1014
1014
|
}
|
|
@@ -1020,8 +1020,8 @@ var nt, Ct;
|
|
|
1020
1020
|
function mt() {
|
|
1021
1021
|
if (Ct) return nt;
|
|
1022
1022
|
Ct = 1;
|
|
1023
|
-
var
|
|
1024
|
-
return nt =
|
|
1023
|
+
var r = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
1024
|
+
return nt = r, nt;
|
|
1025
1025
|
}
|
|
1026
1026
|
var st, jt;
|
|
1027
1027
|
function ur() {
|
|
@@ -1031,11 +1031,11 @@ var at, Lt;
|
|
|
1031
1031
|
function Jr() {
|
|
1032
1032
|
if (Lt) return at;
|
|
1033
1033
|
Lt = 1;
|
|
1034
|
-
var
|
|
1034
|
+
var r = function() {
|
|
1035
1035
|
};
|
|
1036
1036
|
if (process.env.NODE_ENV !== "production") {
|
|
1037
|
-
var e = /* @__PURE__ */ mt(), t = {},
|
|
1038
|
-
|
|
1037
|
+
var e = /* @__PURE__ */ mt(), t = {}, n = /* @__PURE__ */ ur();
|
|
1038
|
+
r = function(a) {
|
|
1039
1039
|
var o = "Warning: " + a;
|
|
1040
1040
|
typeof console < "u" && console.error(o);
|
|
1041
1041
|
try {
|
|
@@ -1047,7 +1047,7 @@ function Jr() {
|
|
|
1047
1047
|
function s(a, o, i, l, c) {
|
|
1048
1048
|
if (process.env.NODE_ENV !== "production") {
|
|
1049
1049
|
for (var u in a)
|
|
1050
|
-
if (
|
|
1050
|
+
if (n(a, u)) {
|
|
1051
1051
|
var f;
|
|
1052
1052
|
try {
|
|
1053
1053
|
if (typeof a[u] != "function") {
|
|
@@ -1060,12 +1060,12 @@ function Jr() {
|
|
|
1060
1060
|
} catch (h) {
|
|
1061
1061
|
f = h;
|
|
1062
1062
|
}
|
|
1063
|
-
if (f && !(f instanceof Error) &&
|
|
1063
|
+
if (f && !(f instanceof Error) && r(
|
|
1064
1064
|
(l || "React class") + ": type specification of " + i + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof f + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1065
1065
|
), f instanceof Error && !(f.message in t)) {
|
|
1066
1066
|
t[f.message] = !0;
|
|
1067
1067
|
var g = c ? c() : "";
|
|
1068
|
-
|
|
1068
|
+
r(
|
|
1069
1069
|
"Failed " + i + " type: " + f.message + (g ?? "")
|
|
1070
1070
|
);
|
|
1071
1071
|
}
|
|
@@ -1080,7 +1080,7 @@ var it, kt;
|
|
|
1080
1080
|
function Xr() {
|
|
1081
1081
|
if (kt) return it;
|
|
1082
1082
|
kt = 1;
|
|
1083
|
-
var
|
|
1083
|
+
var r = cr(), e = zr(), t = /* @__PURE__ */ mt(), n = /* @__PURE__ */ ur(), s = /* @__PURE__ */ Jr(), a = function() {
|
|
1084
1084
|
};
|
|
1085
1085
|
process.env.NODE_ENV !== "production" && (a = function(i) {
|
|
1086
1086
|
var l = "Warning: " + i;
|
|
@@ -1128,9 +1128,9 @@ function Xr() {
|
|
|
1128
1128
|
this.message = d, this.data = m && typeof m == "object" ? m : {}, this.stack = "";
|
|
1129
1129
|
}
|
|
1130
1130
|
y.prototype = Error.prototype;
|
|
1131
|
-
function
|
|
1131
|
+
function w(d) {
|
|
1132
1132
|
if (process.env.NODE_ENV !== "production")
|
|
1133
|
-
var m = {},
|
|
1133
|
+
var m = {}, S = 0;
|
|
1134
1134
|
function D(P, N, _, L, K, W, re) {
|
|
1135
1135
|
if (L = L || p, W = W || _, re !== t) {
|
|
1136
1136
|
if (l) {
|
|
@@ -1141,9 +1141,9 @@ function Xr() {
|
|
|
1141
1141
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1142
1142
|
var M = L + ":" + _;
|
|
1143
1143
|
!m[M] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1144
|
-
|
|
1144
|
+
S < 3 && (a(
|
|
1145
1145
|
"You are manually calling a React.PropTypes validation function for the `" + W + "` prop on `" + L + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1146
|
-
), m[M] = !0,
|
|
1146
|
+
), m[M] = !0, S++);
|
|
1147
1147
|
}
|
|
1148
1148
|
}
|
|
1149
1149
|
return N[_] == null ? P ? N[_] === null ? new y("The " + K + " `" + W + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new y("The " + K + " `" + W + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : d(N, _, L, K, W);
|
|
@@ -1152,8 +1152,8 @@ function Xr() {
|
|
|
1152
1152
|
return T.isRequired = D.bind(null, !0), T;
|
|
1153
1153
|
}
|
|
1154
1154
|
function E(d) {
|
|
1155
|
-
function m(
|
|
1156
|
-
var L =
|
|
1155
|
+
function m(S, D, T, P, N, _) {
|
|
1156
|
+
var L = S[D], K = z(L);
|
|
1157
1157
|
if (K !== d) {
|
|
1158
1158
|
var W = U(L);
|
|
1159
1159
|
return new y(
|
|
@@ -1163,16 +1163,16 @@ function Xr() {
|
|
|
1163
1163
|
}
|
|
1164
1164
|
return null;
|
|
1165
1165
|
}
|
|
1166
|
-
return
|
|
1166
|
+
return w(m);
|
|
1167
1167
|
}
|
|
1168
1168
|
function b() {
|
|
1169
|
-
return
|
|
1169
|
+
return w(o);
|
|
1170
1170
|
}
|
|
1171
1171
|
function O(d) {
|
|
1172
|
-
function m(
|
|
1172
|
+
function m(S, D, T, P, N) {
|
|
1173
1173
|
if (typeof d != "function")
|
|
1174
1174
|
return new y("Property `" + N + "` of component `" + T + "` has invalid PropType notation inside arrayOf.");
|
|
1175
|
-
var _ =
|
|
1175
|
+
var _ = S[D];
|
|
1176
1176
|
if (!Array.isArray(_)) {
|
|
1177
1177
|
var L = z(_);
|
|
1178
1178
|
return new y("Invalid " + P + " `" + N + "` of type " + ("`" + L + "` supplied to `" + T + "`, expected an array."));
|
|
@@ -1184,47 +1184,47 @@ function Xr() {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
return null;
|
|
1186
1186
|
}
|
|
1187
|
-
return
|
|
1187
|
+
return w(m);
|
|
1188
1188
|
}
|
|
1189
1189
|
function R() {
|
|
1190
|
-
function d(m,
|
|
1191
|
-
var N = m[
|
|
1190
|
+
function d(m, S, D, T, P) {
|
|
1191
|
+
var N = m[S];
|
|
1192
1192
|
if (!i(N)) {
|
|
1193
1193
|
var _ = z(N);
|
|
1194
1194
|
return new y("Invalid " + T + " `" + P + "` of type " + ("`" + _ + "` supplied to `" + D + "`, expected a single ReactElement."));
|
|
1195
1195
|
}
|
|
1196
1196
|
return null;
|
|
1197
1197
|
}
|
|
1198
|
-
return
|
|
1198
|
+
return w(d);
|
|
1199
1199
|
}
|
|
1200
1200
|
function v() {
|
|
1201
|
-
function d(m,
|
|
1202
|
-
var N = m[
|
|
1203
|
-
if (!
|
|
1201
|
+
function d(m, S, D, T, P) {
|
|
1202
|
+
var N = m[S];
|
|
1203
|
+
if (!r.isValidElementType(N)) {
|
|
1204
1204
|
var _ = z(N);
|
|
1205
1205
|
return new y("Invalid " + T + " `" + P + "` of type " + ("`" + _ + "` supplied to `" + D + "`, expected a single ReactElement type."));
|
|
1206
1206
|
}
|
|
1207
1207
|
return null;
|
|
1208
1208
|
}
|
|
1209
|
-
return
|
|
1209
|
+
return w(d);
|
|
1210
1210
|
}
|
|
1211
1211
|
function $(d) {
|
|
1212
|
-
function m(
|
|
1213
|
-
if (!(
|
|
1214
|
-
var _ = d.name || p, L = k(
|
|
1212
|
+
function m(S, D, T, P, N) {
|
|
1213
|
+
if (!(S[D] instanceof d)) {
|
|
1214
|
+
var _ = d.name || p, L = k(S[D]);
|
|
1215
1215
|
return new y("Invalid " + P + " `" + N + "` of type " + ("`" + L + "` supplied to `" + T + "`, expected ") + ("instance of `" + _ + "`."));
|
|
1216
1216
|
}
|
|
1217
1217
|
return null;
|
|
1218
1218
|
}
|
|
1219
|
-
return
|
|
1219
|
+
return w(m);
|
|
1220
1220
|
}
|
|
1221
1221
|
function j(d) {
|
|
1222
1222
|
if (!Array.isArray(d))
|
|
1223
1223
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
1224
1224
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1225
1225
|
) : a("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
1226
|
-
function m(
|
|
1227
|
-
for (var _ =
|
|
1226
|
+
function m(S, D, T, P, N) {
|
|
1227
|
+
for (var _ = S[D], L = 0; L < d.length; L++)
|
|
1228
1228
|
if (h(_, d[L]))
|
|
1229
1229
|
return null;
|
|
1230
1230
|
var K = JSON.stringify(d, function(re, A) {
|
|
@@ -1233,33 +1233,33 @@ function Xr() {
|
|
|
1233
1233
|
});
|
|
1234
1234
|
return new y("Invalid " + P + " `" + N + "` of value `" + String(_) + "` " + ("supplied to `" + T + "`, expected one of " + K + "."));
|
|
1235
1235
|
}
|
|
1236
|
-
return
|
|
1236
|
+
return w(m);
|
|
1237
1237
|
}
|
|
1238
1238
|
function V(d) {
|
|
1239
|
-
function m(
|
|
1239
|
+
function m(S, D, T, P, N) {
|
|
1240
1240
|
if (typeof d != "function")
|
|
1241
1241
|
return new y("Property `" + N + "` of component `" + T + "` has invalid PropType notation inside objectOf.");
|
|
1242
|
-
var _ =
|
|
1242
|
+
var _ = S[D], L = z(_);
|
|
1243
1243
|
if (L !== "object")
|
|
1244
1244
|
return new y("Invalid " + P + " `" + N + "` of type " + ("`" + L + "` supplied to `" + T + "`, expected an object."));
|
|
1245
1245
|
for (var K in _)
|
|
1246
|
-
if (
|
|
1246
|
+
if (n(_, K)) {
|
|
1247
1247
|
var W = d(_, K, T, P, N + "." + K, t);
|
|
1248
1248
|
if (W instanceof Error)
|
|
1249
1249
|
return W;
|
|
1250
1250
|
}
|
|
1251
1251
|
return null;
|
|
1252
1252
|
}
|
|
1253
|
-
return
|
|
1253
|
+
return w(m);
|
|
1254
1254
|
}
|
|
1255
1255
|
function F(d) {
|
|
1256
1256
|
if (!Array.isArray(d))
|
|
1257
1257
|
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), o;
|
|
1258
1258
|
for (var m = 0; m < d.length; m++) {
|
|
1259
|
-
var
|
|
1260
|
-
if (typeof
|
|
1259
|
+
var S = d[m];
|
|
1260
|
+
if (typeof S != "function")
|
|
1261
1261
|
return a(
|
|
1262
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + B(
|
|
1262
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + B(S) + " at index " + m + "."
|
|
1263
1263
|
), o;
|
|
1264
1264
|
}
|
|
1265
1265
|
function D(T, P, N, _, L) {
|
|
@@ -1267,27 +1267,27 @@ function Xr() {
|
|
|
1267
1267
|
var re = d[W], A = re(T, P, N, _, L, t);
|
|
1268
1268
|
if (A == null)
|
|
1269
1269
|
return null;
|
|
1270
|
-
A.data &&
|
|
1270
|
+
A.data && n(A.data, "expectedType") && K.push(A.data.expectedType);
|
|
1271
1271
|
}
|
|
1272
1272
|
var M = K.length > 0 ? ", expected one of type [" + K.join(", ") + "]" : "";
|
|
1273
1273
|
return new y("Invalid " + _ + " `" + L + "` supplied to " + ("`" + N + "`" + M + "."));
|
|
1274
1274
|
}
|
|
1275
|
-
return
|
|
1275
|
+
return w(D);
|
|
1276
1276
|
}
|
|
1277
1277
|
function C() {
|
|
1278
|
-
function d(m,
|
|
1279
|
-
return q(m[
|
|
1278
|
+
function d(m, S, D, T, P) {
|
|
1279
|
+
return q(m[S]) ? null : new y("Invalid " + T + " `" + P + "` supplied to " + ("`" + D + "`, expected a ReactNode."));
|
|
1280
1280
|
}
|
|
1281
|
-
return
|
|
1281
|
+
return w(d);
|
|
1282
1282
|
}
|
|
1283
|
-
function I(d, m,
|
|
1283
|
+
function I(d, m, S, D, T) {
|
|
1284
1284
|
return new y(
|
|
1285
|
-
(d || "React class") + ": " + m + " type `" +
|
|
1285
|
+
(d || "React class") + ": " + m + " type `" + S + "." + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + T + "`."
|
|
1286
1286
|
);
|
|
1287
1287
|
}
|
|
1288
1288
|
function Y(d) {
|
|
1289
|
-
function m(
|
|
1290
|
-
var _ =
|
|
1289
|
+
function m(S, D, T, P, N) {
|
|
1290
|
+
var _ = S[D], L = z(_);
|
|
1291
1291
|
if (L !== "object")
|
|
1292
1292
|
return new y("Invalid " + P + " `" + N + "` of type `" + L + "` " + ("supplied to `" + T + "`, expected `object`."));
|
|
1293
1293
|
for (var K in d) {
|
|
@@ -1300,21 +1300,21 @@ function Xr() {
|
|
|
1300
1300
|
}
|
|
1301
1301
|
return null;
|
|
1302
1302
|
}
|
|
1303
|
-
return
|
|
1303
|
+
return w(m);
|
|
1304
1304
|
}
|
|
1305
1305
|
function J(d) {
|
|
1306
|
-
function m(
|
|
1307
|
-
var _ =
|
|
1306
|
+
function m(S, D, T, P, N) {
|
|
1307
|
+
var _ = S[D], L = z(_);
|
|
1308
1308
|
if (L !== "object")
|
|
1309
1309
|
return new y("Invalid " + P + " `" + N + "` of type `" + L + "` " + ("supplied to `" + T + "`, expected `object`."));
|
|
1310
|
-
var K = e({},
|
|
1310
|
+
var K = e({}, S[D], d);
|
|
1311
1311
|
for (var W in K) {
|
|
1312
1312
|
var re = d[W];
|
|
1313
|
-
if (
|
|
1313
|
+
if (n(d, W) && typeof re != "function")
|
|
1314
1314
|
return I(T, P, N, W, U(re));
|
|
1315
1315
|
if (!re)
|
|
1316
1316
|
return new y(
|
|
1317
|
-
"Invalid " + P + " `" + N + "` key `" + W + "` supplied to `" + T + "`.\nBad object: " + JSON.stringify(
|
|
1317
|
+
"Invalid " + P + " `" + N + "` key `" + W + "` supplied to `" + T + "`.\nBad object: " + JSON.stringify(S[D], null, " ") + `
|
|
1318
1318
|
Valid keys: ` + JSON.stringify(Object.keys(d), null, " ")
|
|
1319
1319
|
);
|
|
1320
1320
|
var A = re(_, W, T, P, N + "." + W, t);
|
|
@@ -1323,7 +1323,7 @@ Valid keys: ` + JSON.stringify(Object.keys(d), null, " ")
|
|
|
1323
1323
|
}
|
|
1324
1324
|
return null;
|
|
1325
1325
|
}
|
|
1326
|
-
return
|
|
1326
|
+
return w(m);
|
|
1327
1327
|
}
|
|
1328
1328
|
function q(d) {
|
|
1329
1329
|
switch (typeof d) {
|
|
@@ -1340,13 +1340,13 @@ Valid keys: ` + JSON.stringify(Object.keys(d), null, " ")
|
|
|
1340
1340
|
return !0;
|
|
1341
1341
|
var m = f(d);
|
|
1342
1342
|
if (m) {
|
|
1343
|
-
var
|
|
1343
|
+
var S = m.call(d), D;
|
|
1344
1344
|
if (m !== d.entries) {
|
|
1345
|
-
for (; !(D =
|
|
1345
|
+
for (; !(D = S.next()).done; )
|
|
1346
1346
|
if (!q(D.value))
|
|
1347
1347
|
return !1;
|
|
1348
1348
|
} else
|
|
1349
|
-
for (; !(D =
|
|
1349
|
+
for (; !(D = S.next()).done; ) {
|
|
1350
1350
|
var T = D.value;
|
|
1351
1351
|
if (T && !q(T[1]))
|
|
1352
1352
|
return !1;
|
|
@@ -1401,39 +1401,39 @@ var ot, It;
|
|
|
1401
1401
|
function Zr() {
|
|
1402
1402
|
if (It) return ot;
|
|
1403
1403
|
It = 1;
|
|
1404
|
-
var
|
|
1404
|
+
var r = /* @__PURE__ */ mt();
|
|
1405
1405
|
function e() {
|
|
1406
1406
|
}
|
|
1407
1407
|
function t() {
|
|
1408
1408
|
}
|
|
1409
1409
|
return t.resetWarningCache = e, ot = function() {
|
|
1410
|
-
function
|
|
1411
|
-
if (f !==
|
|
1410
|
+
function n(o, i, l, c, u, f) {
|
|
1411
|
+
if (f !== r) {
|
|
1412
1412
|
var p = new Error(
|
|
1413
1413
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1414
1414
|
);
|
|
1415
1415
|
throw p.name = "Invariant Violation", p;
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
|
-
|
|
1418
|
+
n.isRequired = n;
|
|
1419
1419
|
function s() {
|
|
1420
|
-
return
|
|
1420
|
+
return n;
|
|
1421
1421
|
}
|
|
1422
1422
|
var a = {
|
|
1423
|
-
array:
|
|
1424
|
-
bigint:
|
|
1425
|
-
bool:
|
|
1426
|
-
func:
|
|
1427
|
-
number:
|
|
1428
|
-
object:
|
|
1429
|
-
string:
|
|
1430
|
-
symbol:
|
|
1431
|
-
any:
|
|
1423
|
+
array: n,
|
|
1424
|
+
bigint: n,
|
|
1425
|
+
bool: n,
|
|
1426
|
+
func: n,
|
|
1427
|
+
number: n,
|
|
1428
|
+
object: n,
|
|
1429
|
+
string: n,
|
|
1430
|
+
symbol: n,
|
|
1431
|
+
any: n,
|
|
1432
1432
|
arrayOf: s,
|
|
1433
|
-
element:
|
|
1434
|
-
elementType:
|
|
1433
|
+
element: n,
|
|
1434
|
+
elementType: n,
|
|
1435
1435
|
instanceOf: s,
|
|
1436
|
-
node:
|
|
1436
|
+
node: n,
|
|
1437
1437
|
objectOf: s,
|
|
1438
1438
|
oneOf: s,
|
|
1439
1439
|
oneOfType: s,
|
|
@@ -1447,43 +1447,43 @@ function Zr() {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
var Nt;
|
|
1449
1449
|
function Qr() {
|
|
1450
|
-
if (Nt) return
|
|
1450
|
+
if (Nt) return Me.exports;
|
|
1451
1451
|
if (Nt = 1, process.env.NODE_ENV !== "production") {
|
|
1452
|
-
var
|
|
1453
|
-
|
|
1452
|
+
var r = cr(), e = !0;
|
|
1453
|
+
Me.exports = /* @__PURE__ */ Xr()(r.isElement, e);
|
|
1454
1454
|
} else
|
|
1455
|
-
|
|
1456
|
-
return
|
|
1455
|
+
Me.exports = /* @__PURE__ */ Zr()();
|
|
1456
|
+
return Me.exports;
|
|
1457
1457
|
}
|
|
1458
1458
|
var ae = /* @__PURE__ */ Qr(), en = function(e) {
|
|
1459
1459
|
var t = (e == null ? void 0 : e.ownerDocument) || document;
|
|
1460
1460
|
return t.defaultView || window;
|
|
1461
1461
|
}, tn = function(e, t) {
|
|
1462
|
-
for (var
|
|
1463
|
-
if (!(
|
|
1462
|
+
for (var n in e)
|
|
1463
|
+
if (!(n in t))
|
|
1464
1464
|
return !0;
|
|
1465
1465
|
for (var s in t)
|
|
1466
1466
|
if (e[s] !== t[s])
|
|
1467
1467
|
return !0;
|
|
1468
1468
|
return !1;
|
|
1469
|
-
}, rn = ["afterInjection", "beforeInjection", "desc", "evalScripts", "fallback", "httpRequestWithCredentials", "loading", "renumerateIRIElements", "src", "title", "useRequestCache", "wrapper"],
|
|
1469
|
+
}, rn = ["afterInjection", "beforeInjection", "desc", "evalScripts", "fallback", "httpRequestWithCredentials", "loading", "renumerateIRIElements", "src", "title", "useRequestCache", "wrapper"], Ve = "http://www.w3.org/2000/svg", _t = "http://www.w3.org/1999/xlink", Oe = /* @__PURE__ */ function(r) {
|
|
1470
1470
|
function e() {
|
|
1471
|
-
for (var
|
|
1471
|
+
for (var n, s = arguments.length, a = new Array(s), o = 0; o < s; o++)
|
|
1472
1472
|
a[o] = arguments[o];
|
|
1473
|
-
return
|
|
1473
|
+
return n = r.call.apply(r, [this].concat(a)) || this, n.initialState = {
|
|
1474
1474
|
hasError: !1,
|
|
1475
1475
|
isLoading: !0
|
|
1476
|
-
},
|
|
1477
|
-
|
|
1478
|
-
},
|
|
1476
|
+
}, n.state = n.initialState, n._isMounted = !1, n.reactWrapper = void 0, n.nonReactWrapper = void 0, n.refCallback = function(i) {
|
|
1477
|
+
n.reactWrapper = i;
|
|
1478
|
+
}, n;
|
|
1479
1479
|
}
|
|
1480
|
-
_r(e,
|
|
1480
|
+
_r(e, r);
|
|
1481
1481
|
var t = e.prototype;
|
|
1482
1482
|
return t.renderSVG = function() {
|
|
1483
1483
|
var s = this;
|
|
1484
1484
|
if (this.reactWrapper instanceof en(this.reactWrapper).Node) {
|
|
1485
|
-
var a = this.props, o = a.desc, i = a.evalScripts, l = a.httpRequestWithCredentials, c = a.renumerateIRIElements, u = a.src, f = a.title, p = a.useRequestCache, g = this.props.onError, h = this.props.beforeInjection, y = this.props.afterInjection,
|
|
1486
|
-
|
|
1485
|
+
var a = this.props, o = a.desc, i = a.evalScripts, l = a.httpRequestWithCredentials, c = a.renumerateIRIElements, u = a.src, f = a.title, p = a.useRequestCache, g = this.props.onError, h = this.props.beforeInjection, y = this.props.afterInjection, w = this.props.wrapper, E, b;
|
|
1486
|
+
w === "svg" ? (E = document.createElementNS(Ve, w), E.setAttribute("xmlns", Ve), E.setAttribute("xmlns:xlink", _t), b = document.createElementNS(Ve, w)) : (E = document.createElement(w), b = document.createElement(w)), E.appendChild(b), b.dataset.src = u, this.nonReactWrapper = this.reactWrapper.appendChild(E);
|
|
1487
1487
|
var O = function(j) {
|
|
1488
1488
|
if (s.removeSVG(), !s._isMounted) {
|
|
1489
1489
|
g(j);
|
|
@@ -1548,7 +1548,7 @@ var ae = /* @__PURE__ */ Qr(), en = function(e) {
|
|
|
1548
1548
|
this._isMounted = !0, this.renderSVG();
|
|
1549
1549
|
}, t.componentDidUpdate = function(s) {
|
|
1550
1550
|
var a = this;
|
|
1551
|
-
tn(
|
|
1551
|
+
tn(Be({}, s), this.props) && this.setState(function() {
|
|
1552
1552
|
return a.initialState;
|
|
1553
1553
|
}, function() {
|
|
1554
1554
|
a.removeSVG(), a.renderSVG();
|
|
@@ -1563,15 +1563,15 @@ var ae = /* @__PURE__ */ Qr(), en = function(e) {
|
|
|
1563
1563
|
var o = s.loading;
|
|
1564
1564
|
s.renumerateIRIElements, s.src, s.title, s.useRequestCache;
|
|
1565
1565
|
var i = s.wrapper, l = Nr(s, rn), c = i;
|
|
1566
|
-
return /* @__PURE__ */
|
|
1566
|
+
return /* @__PURE__ */ ke.createElement(c, Be({}, l, {
|
|
1567
1567
|
ref: this.refCallback
|
|
1568
1568
|
}, i === "svg" ? {
|
|
1569
|
-
xmlns:
|
|
1569
|
+
xmlns: Ve,
|
|
1570
1570
|
xmlnsXlink: _t
|
|
1571
|
-
} : {}), this.state.isLoading && o && /* @__PURE__ */
|
|
1571
|
+
} : {}), this.state.isLoading && o && /* @__PURE__ */ ke.createElement(o, null), this.state.hasError && a && /* @__PURE__ */ ke.createElement(a, null));
|
|
1572
1572
|
}, e;
|
|
1573
|
-
}(
|
|
1574
|
-
|
|
1573
|
+
}(ke.Component);
|
|
1574
|
+
Oe.defaultProps = {
|
|
1575
1575
|
afterInjection: function() {
|
|
1576
1576
|
},
|
|
1577
1577
|
beforeInjection: function() {
|
|
@@ -1588,7 +1588,7 @@ Be.defaultProps = {
|
|
|
1588
1588
|
useRequestCache: !0,
|
|
1589
1589
|
wrapper: "div"
|
|
1590
1590
|
};
|
|
1591
|
-
|
|
1591
|
+
Oe.propTypes = {
|
|
1592
1592
|
afterInjection: ae.func,
|
|
1593
1593
|
beforeInjection: ae.func,
|
|
1594
1594
|
desc: ae.string,
|
|
@@ -1607,14 +1607,14 @@ let ft = {
|
|
|
1607
1607
|
assets: "/"
|
|
1608
1608
|
// Default for storybook isolation development
|
|
1609
1609
|
};
|
|
1610
|
-
const Qn = (
|
|
1611
|
-
ft = { ...ft, ...
|
|
1612
|
-
}, Mt = (
|
|
1610
|
+
const Qn = (r) => {
|
|
1611
|
+
ft = { ...ft, ...r };
|
|
1612
|
+
}, Mt = (r) => `${ft.assets}/${r}`.replace(/\/+/g, "/"), ge = ar.memo(
|
|
1613
1613
|
({
|
|
1614
|
-
icon:
|
|
1614
|
+
icon: r,
|
|
1615
1615
|
width: e,
|
|
1616
1616
|
height: t,
|
|
1617
|
-
placeholderIcon:
|
|
1617
|
+
placeholderIcon: n,
|
|
1618
1618
|
color: s,
|
|
1619
1619
|
disabled: a,
|
|
1620
1620
|
state: o = "base",
|
|
@@ -1624,15 +1624,30 @@ const Qn = (n) => {
|
|
|
1624
1624
|
spin: u = !1,
|
|
1625
1625
|
title: f
|
|
1626
1626
|
}) => {
|
|
1627
|
-
const [p, g] = Q(
|
|
1628
|
-
`assets/svg/${
|
|
1629
|
-
),
|
|
1627
|
+
const [p, g] = Q(r), h = (r == null ? void 0 : r.startsWith("http")) || (r == null ? void 0 : r.startsWith("/")), y = h && (r == null ? void 0 : r.toLowerCase().endsWith(".svg")), w = Mt(`assets/svg/${r}.svg`), E = Mt(
|
|
1628
|
+
`assets/svg/${n}.svg`
|
|
1629
|
+
), b = {
|
|
1630
1630
|
img: `${c ? "smp-image-interactable" : ""}`,
|
|
1631
1631
|
svg: `smp-icon ${o ? `smp-icon-${o}` : ""} ${i ? "smp-icon-rotated" : ""} ${c ? "smp-icon-interactable" : ""} ${u ? "smp-icon-spin" : ""}`
|
|
1632
|
-
},
|
|
1632
|
+
}, O = () => {
|
|
1633
1633
|
!a && l && l();
|
|
1634
1634
|
};
|
|
1635
|
-
return /* @__PURE__ */ x.jsx(x.Fragment, { children:
|
|
1635
|
+
return /* @__PURE__ */ x.jsx(x.Fragment, { children: y ? /* @__PURE__ */ x.jsx(
|
|
1636
|
+
Oe,
|
|
1637
|
+
{
|
|
1638
|
+
src: r,
|
|
1639
|
+
fallback: () => /* @__PURE__ */ x.jsx(Oe, { src: E, wrapper: "svg" }),
|
|
1640
|
+
width: e || "1rem",
|
|
1641
|
+
height: t || "1rem",
|
|
1642
|
+
wrapper: "svg",
|
|
1643
|
+
title: f,
|
|
1644
|
+
role: "application",
|
|
1645
|
+
fill: s,
|
|
1646
|
+
"aria-disabled": a,
|
|
1647
|
+
className: b.svg,
|
|
1648
|
+
onClick: O
|
|
1649
|
+
}
|
|
1650
|
+
) : h ? (
|
|
1636
1651
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
1637
1652
|
/* @__PURE__ */ x.jsx(
|
|
1638
1653
|
"img",
|
|
@@ -1641,19 +1656,20 @@ const Qn = (n) => {
|
|
|
1641
1656
|
width: e || "16px",
|
|
1642
1657
|
height: t || "auto",
|
|
1643
1658
|
alt: f,
|
|
1644
|
-
onError: () => g(
|
|
1645
|
-
onClick:
|
|
1646
|
-
className:
|
|
1647
|
-
|
|
1648
|
-
|
|
1659
|
+
onError: () => g(E),
|
|
1660
|
+
onClick: O,
|
|
1661
|
+
className: b.img,
|
|
1662
|
+
title: f,
|
|
1663
|
+
onKeyDown: (R) => {
|
|
1664
|
+
(R.key === "Enter" || R.key === " ") && O();
|
|
1649
1665
|
}
|
|
1650
1666
|
}
|
|
1651
1667
|
)
|
|
1652
1668
|
) : /* @__PURE__ */ x.jsx(
|
|
1653
|
-
|
|
1669
|
+
Oe,
|
|
1654
1670
|
{
|
|
1655
|
-
src:
|
|
1656
|
-
fallback: () => /* @__PURE__ */ x.jsx(
|
|
1671
|
+
src: w,
|
|
1672
|
+
fallback: () => /* @__PURE__ */ x.jsx(Oe, { src: E, wrapper: "svg" }),
|
|
1657
1673
|
width: e || "1rem",
|
|
1658
1674
|
height: t || "1rem",
|
|
1659
1675
|
wrapper: "svg",
|
|
@@ -1661,16 +1677,16 @@ const Qn = (n) => {
|
|
|
1661
1677
|
role: "application",
|
|
1662
1678
|
fill: s,
|
|
1663
1679
|
"aria-disabled": a,
|
|
1664
|
-
className:
|
|
1665
|
-
onClick:
|
|
1680
|
+
className: b.svg,
|
|
1681
|
+
onClick: O
|
|
1666
1682
|
}
|
|
1667
1683
|
) });
|
|
1668
1684
|
}
|
|
1669
|
-
),
|
|
1670
|
-
disabled:
|
|
1685
|
+
), Re = ({
|
|
1686
|
+
disabled: r,
|
|
1671
1687
|
readOnly: e,
|
|
1672
1688
|
bindValue: t,
|
|
1673
|
-
icon:
|
|
1689
|
+
icon: n,
|
|
1674
1690
|
onBlur: s,
|
|
1675
1691
|
onChange: a,
|
|
1676
1692
|
placeholder: o,
|
|
@@ -1683,7 +1699,7 @@ const Qn = (n) => {
|
|
|
1683
1699
|
ref: g,
|
|
1684
1700
|
inputRef: h,
|
|
1685
1701
|
onKeyDown: y,
|
|
1686
|
-
inputType:
|
|
1702
|
+
inputType: w = "text",
|
|
1687
1703
|
ariaLabel: E = "input field",
|
|
1688
1704
|
label: b,
|
|
1689
1705
|
helperText: O = !1,
|
|
@@ -1695,23 +1711,23 @@ const Qn = (n) => {
|
|
|
1695
1711
|
a == null || a(Y.target.value);
|
|
1696
1712
|
}, I = {
|
|
1697
1713
|
wrapper: `smp-textfield-wrapper ${$ ? "smp-textfield-fullWidth" : ""}`,
|
|
1698
|
-
container: `smp-textfield ${
|
|
1714
|
+
container: `smp-textfield ${r ? "smp-textfield-disabled" : ""} ${e ? "smp-textfield-readOnly" : ""} ${o ? "smp-textfield-placeholder" : ""} ${l ? `smp-textfield-${l}` : ""} ${j ? `smp-textfield-${j}` : ""} ${u ? `smp-textfield-variant-${u}` : ""} ${v ? `smp-textfield-${v}` : ""}`,
|
|
1699
1715
|
input: "smp-textfield-input "
|
|
1700
1716
|
};
|
|
1701
1717
|
return /* @__PURE__ */ x.jsxs("div", { className: I.wrapper, "data-component": "textfield", children: [
|
|
1702
|
-
b && /* @__PURE__ */ x.jsx(ir, { label: b, disabled:
|
|
1718
|
+
b && /* @__PURE__ */ x.jsx(ir, { label: b, disabled: r }),
|
|
1703
1719
|
/* @__PURE__ */ x.jsxs("div", { className: I.container, ref: g, children: [
|
|
1704
|
-
|
|
1720
|
+
n && /* @__PURE__ */ x.jsx(ge, { icon: n, disabled: r }),
|
|
1705
1721
|
/* @__PURE__ */ x.jsx(
|
|
1706
1722
|
"input",
|
|
1707
1723
|
{
|
|
1708
|
-
type:
|
|
1724
|
+
type: w,
|
|
1709
1725
|
value: t,
|
|
1710
1726
|
placeholder: o,
|
|
1711
1727
|
onChange: C,
|
|
1712
1728
|
onBlur: s,
|
|
1713
1729
|
className: I.input,
|
|
1714
|
-
disabled:
|
|
1730
|
+
disabled: r,
|
|
1715
1731
|
readOnly: e,
|
|
1716
1732
|
onKeyDown: y,
|
|
1717
1733
|
"aria-label": E,
|
|
@@ -1722,7 +1738,7 @@ const Qn = (n) => {
|
|
|
1722
1738
|
ge,
|
|
1723
1739
|
{
|
|
1724
1740
|
icon: V,
|
|
1725
|
-
disabled:
|
|
1741
|
+
disabled: r,
|
|
1726
1742
|
state: j,
|
|
1727
1743
|
onClick: p,
|
|
1728
1744
|
rotated: f
|
|
@@ -1733,25 +1749,25 @@ const Qn = (n) => {
|
|
|
1733
1749
|
Ir,
|
|
1734
1750
|
{
|
|
1735
1751
|
helperText: R,
|
|
1736
|
-
disabled:
|
|
1752
|
+
disabled: r,
|
|
1737
1753
|
state: j
|
|
1738
1754
|
}
|
|
1739
1755
|
)
|
|
1740
1756
|
] });
|
|
1741
1757
|
};
|
|
1742
1758
|
function nn({
|
|
1743
|
-
items:
|
|
1759
|
+
items: r,
|
|
1744
1760
|
itemHeight: e,
|
|
1745
1761
|
containerHeight: t,
|
|
1746
|
-
overscan:
|
|
1762
|
+
overscan: n = 5
|
|
1747
1763
|
}) {
|
|
1748
|
-
const [s, a] = Q(0), o = be(null), i =
|
|
1749
|
-
|
|
1750
|
-
Math.floor((s + t) / e) +
|
|
1764
|
+
const [s, a] = Q(0), o = be(null), i = r.length * e, l = Math.max(0, Math.floor(s / e) - n), c = Math.min(
|
|
1765
|
+
r.length - 1,
|
|
1766
|
+
Math.floor((s + t) / e) + n
|
|
1751
1767
|
), u = [];
|
|
1752
1768
|
for (let g = l; g <= c; g++)
|
|
1753
1769
|
u.push({
|
|
1754
|
-
item:
|
|
1770
|
+
item: r[g],
|
|
1755
1771
|
index: g,
|
|
1756
1772
|
offsetTop: g * e
|
|
1757
1773
|
});
|
|
@@ -1760,8 +1776,8 @@ function nn({
|
|
|
1760
1776
|
a(h);
|
|
1761
1777
|
}, []), p = (g) => {
|
|
1762
1778
|
if (!o.current) return;
|
|
1763
|
-
const h = g * e, y = h + e,
|
|
1764
|
-
h < E ?
|
|
1779
|
+
const h = g * e, y = h + e, w = o.current, E = w.scrollTop, b = E + t;
|
|
1780
|
+
h < E ? w.scrollTop = h : y > b && (w.scrollTop = y - t);
|
|
1765
1781
|
};
|
|
1766
1782
|
return {
|
|
1767
1783
|
virtualItems: u,
|
|
@@ -1793,10 +1809,10 @@ function nn({
|
|
|
1793
1809
|
};
|
|
1794
1810
|
}
|
|
1795
1811
|
const sn = 10, fr = ({
|
|
1796
|
-
id:
|
|
1812
|
+
id: r,
|
|
1797
1813
|
options: e,
|
|
1798
1814
|
displayMode: t,
|
|
1799
|
-
ref:
|
|
1815
|
+
ref: n,
|
|
1800
1816
|
showFilter: s,
|
|
1801
1817
|
selectedIndex: a = null,
|
|
1802
1818
|
// current outline element
|
|
@@ -1809,12 +1825,12 @@ const sn = 10, fr = ({
|
|
|
1809
1825
|
var C;
|
|
1810
1826
|
const [u, f] = Q(""), p = 24, [g, h] = Q(
|
|
1811
1827
|
a !== null ? a : -1
|
|
1812
|
-
), y = s !== void 0 ? s : e.length > sn,
|
|
1828
|
+
), y = s !== void 0 ? s : e.length > sn, w = u ? e.filter(
|
|
1813
1829
|
(I) => I.label.toLowerCase().includes(u.toLowerCase())
|
|
1814
1830
|
) : e, E = (I) => {
|
|
1815
1831
|
f(I);
|
|
1816
1832
|
}, { virtualItems: b, containerProps: O, innerProps: R, scrollToIndex: v } = nn({
|
|
1817
|
-
items:
|
|
1833
|
+
items: w,
|
|
1818
1834
|
itemHeight: p,
|
|
1819
1835
|
containerHeight: 200,
|
|
1820
1836
|
overscan: 5
|
|
@@ -1822,14 +1838,14 @@ const sn = 10, fr = ({
|
|
|
1822
1838
|
oe(() => {
|
|
1823
1839
|
a !== null && a !== g && h(a);
|
|
1824
1840
|
}, [a]), oe(() => {
|
|
1825
|
-
g >= 0 && g <
|
|
1826
|
-
}, [g,
|
|
1841
|
+
g >= 0 && g < w.length && v(g);
|
|
1842
|
+
}, [g, w]);
|
|
1827
1843
|
const $ = (I) => {
|
|
1828
1844
|
if (I.key === "ArrowDown" || I.key === "ArrowUp") {
|
|
1829
1845
|
I.preventDefault();
|
|
1830
1846
|
let Y = g;
|
|
1831
|
-
I.key === "ArrowDown" ? Y = g <
|
|
1832
|
-
} else I.key === "Enter" ? g >= 0 && g <
|
|
1847
|
+
I.key === "ArrowDown" ? Y = g < w.length - 1 ? g + 1 : 0 : I.key === "ArrowUp" && (Y = g > 0 ? g - 1 : w.length - 1), h(Y);
|
|
1848
|
+
} else I.key === "Enter" ? g >= 0 && g < w.length && (l == null || l(w[g])) : I.key === "Escape" && (I.preventDefault(), I.stopPropagation());
|
|
1833
1849
|
c && c(I);
|
|
1834
1850
|
}, j = (I) => {
|
|
1835
1851
|
$(I);
|
|
@@ -1844,8 +1860,8 @@ const sn = 10, fr = ({
|
|
|
1844
1860
|
return /* @__PURE__ */ x.jsxs(
|
|
1845
1861
|
"div",
|
|
1846
1862
|
{
|
|
1847
|
-
id:
|
|
1848
|
-
ref:
|
|
1863
|
+
id: r,
|
|
1864
|
+
ref: n,
|
|
1849
1865
|
className: F.wrapper,
|
|
1850
1866
|
"data-component": "list",
|
|
1851
1867
|
style: {
|
|
@@ -1853,7 +1869,7 @@ const sn = 10, fr = ({
|
|
|
1853
1869
|
},
|
|
1854
1870
|
children: [
|
|
1855
1871
|
y && /* @__PURE__ */ x.jsx(
|
|
1856
|
-
|
|
1872
|
+
Re,
|
|
1857
1873
|
{
|
|
1858
1874
|
bindValue: u,
|
|
1859
1875
|
placeholder: "Search...",
|
|
@@ -1870,7 +1886,7 @@ const sn = 10, fr = ({
|
|
|
1870
1886
|
role: "listbox",
|
|
1871
1887
|
"aria-label": "List",
|
|
1872
1888
|
onKeyDown: V,
|
|
1873
|
-
"aria-activedescendant": g >= 0 && g <
|
|
1889
|
+
"aria-activedescendant": g >= 0 && g < w.length ? (C = w[g]) == null ? void 0 : C.id : void 0,
|
|
1874
1890
|
children: /* @__PURE__ */ x.jsx("div", { ...R, className: F.virtualScroll, children: b.map(({ item: I, index: Y, offsetTop: J }) => {
|
|
1875
1891
|
const q = o.includes(I.id);
|
|
1876
1892
|
return (
|
|
@@ -1894,7 +1910,7 @@ const sn = 10, fr = ({
|
|
|
1894
1910
|
l == null || l(I), h(Y);
|
|
1895
1911
|
},
|
|
1896
1912
|
children: [
|
|
1897
|
-
|
|
1913
|
+
Ke(I.id, I.label, t),
|
|
1898
1914
|
q && /* @__PURE__ */ x.jsx(ge, { icon: "check", width: 16 })
|
|
1899
1915
|
]
|
|
1900
1916
|
},
|
|
@@ -1908,35 +1924,35 @@ const sn = 10, fr = ({
|
|
|
1908
1924
|
}
|
|
1909
1925
|
);
|
|
1910
1926
|
}, dr = ({
|
|
1911
|
-
displayMode:
|
|
1927
|
+
displayMode: r,
|
|
1912
1928
|
bindValue: e,
|
|
1913
1929
|
optionalDisplayValue: t,
|
|
1914
|
-
...
|
|
1930
|
+
...n
|
|
1915
1931
|
}) => {
|
|
1916
1932
|
const [s, a] = Q(
|
|
1917
|
-
|
|
1933
|
+
Ke(e, t, r)
|
|
1918
1934
|
);
|
|
1919
1935
|
return oe(() => {
|
|
1920
1936
|
a(e);
|
|
1921
1937
|
}, [e]), oe(() => {
|
|
1922
1938
|
a(
|
|
1923
|
-
|
|
1939
|
+
Ke(e, t, r)
|
|
1924
1940
|
);
|
|
1925
|
-
}, [t,
|
|
1926
|
-
}, an = (
|
|
1941
|
+
}, [t, r]), /* @__PURE__ */ x.jsx(Re, { ...n, bindValue: s });
|
|
1942
|
+
}, an = (r) => {
|
|
1927
1943
|
const e = be(null);
|
|
1928
1944
|
return oe(() => () => {
|
|
1929
1945
|
e.current && clearTimeout(e.current);
|
|
1930
|
-
}, []), (
|
|
1946
|
+
}, []), (n) => {
|
|
1931
1947
|
e.current && clearTimeout(e.current), e.current = setTimeout(() => {
|
|
1932
|
-
|
|
1933
|
-
},
|
|
1948
|
+
n();
|
|
1949
|
+
}, r);
|
|
1934
1950
|
};
|
|
1935
1951
|
}, pr = ({
|
|
1936
|
-
bindValue:
|
|
1952
|
+
bindValue: r,
|
|
1937
1953
|
optionalDisplayValue: e,
|
|
1938
1954
|
options: t,
|
|
1939
|
-
displayMode:
|
|
1955
|
+
displayMode: n,
|
|
1940
1956
|
listDisplayMode: s = "Both",
|
|
1941
1957
|
minimumChars: a = 3,
|
|
1942
1958
|
placeholder: o,
|
|
@@ -1947,18 +1963,18 @@ const sn = 10, fr = ({
|
|
|
1947
1963
|
_multiActiveIndex: f,
|
|
1948
1964
|
...p
|
|
1949
1965
|
}) => {
|
|
1950
|
-
const [g, h] = Q(
|
|
1966
|
+
const [g, h] = Q(r), [y, w] = Q(e), [E, b] = Q(!1), [O, R] = Q(t || []), [v, $] = Q(0), [j, V] = Q([r]), { anchorRef: F, targetRef: C, anchorWidth: I } = gt({
|
|
1951
1967
|
position: "bottom",
|
|
1952
1968
|
enabled: E
|
|
1953
1969
|
});
|
|
1954
|
-
|
|
1970
|
+
qe(C, () => b(!1));
|
|
1955
1971
|
const Y = an(400), J = (U) => {
|
|
1956
1972
|
U.length >= a ? i && u && Y(async () => {
|
|
1957
1973
|
const B = await u(i, U);
|
|
1958
1974
|
R(B), $(B.length > 0 ? 0 : -1), b(!0);
|
|
1959
|
-
}) : b(!1), h(U),
|
|
1975
|
+
}) : b(!1), h(U), w(e), l || c == null || c(U, e);
|
|
1960
1976
|
}, q = (U) => {
|
|
1961
|
-
l ? (h(""),
|
|
1977
|
+
l ? (h(""), w("")) : (h(U.id), w(U.label)), c == null || c(U.id, U.label);
|
|
1962
1978
|
const B = O.findIndex((k) => k.id === U.id);
|
|
1963
1979
|
$(B), V([U.id]), b(!1);
|
|
1964
1980
|
}, ne = (U) => {
|
|
@@ -1970,7 +1986,7 @@ const sn = 10, fr = ({
|
|
|
1970
1986
|
}
|
|
1971
1987
|
switch (U.key) {
|
|
1972
1988
|
case "Enter":
|
|
1973
|
-
v >= 0 && v < O.length ? q(O[v]) : l && (c == null || c(g, ""), b(!1), h(""),
|
|
1989
|
+
v >= 0 && v < O.length ? q(O[v]) : l && (c == null || c(g, ""), b(!1), h(""), w(""));
|
|
1974
1990
|
break;
|
|
1975
1991
|
case "Escape":
|
|
1976
1992
|
b(!1), $(-1);
|
|
@@ -1984,7 +2000,7 @@ const sn = 10, fr = ({
|
|
|
1984
2000
|
...p,
|
|
1985
2001
|
bindValue: g,
|
|
1986
2002
|
optionalDisplayValue: y,
|
|
1987
|
-
displayMode:
|
|
2003
|
+
displayMode: n,
|
|
1988
2004
|
shapeIcon: "magnify",
|
|
1989
2005
|
placeholder: o,
|
|
1990
2006
|
ref: F,
|
|
@@ -2008,21 +2024,21 @@ const sn = 10, fr = ({
|
|
|
2008
2024
|
}
|
|
2009
2025
|
)
|
|
2010
2026
|
] });
|
|
2011
|
-
}, Ft = (
|
|
2027
|
+
}, Ft = (r) => ({
|
|
2012
2028
|
extraSmall: 12,
|
|
2013
2029
|
small: 14,
|
|
2014
2030
|
base: 18,
|
|
2015
2031
|
large: 20,
|
|
2016
2032
|
extraLarge: 24
|
|
2017
|
-
})[
|
|
2033
|
+
})[r], Vt = (r) => ({
|
|
2018
2034
|
primary: "onPrimary",
|
|
2019
2035
|
danger: "onDanger",
|
|
2020
2036
|
base: "base"
|
|
2021
|
-
})[
|
|
2022
|
-
bindValue:
|
|
2037
|
+
})[r], Ge = ({
|
|
2038
|
+
bindValue: r,
|
|
2023
2039
|
onClick: e,
|
|
2024
2040
|
ariaLabel: t,
|
|
2025
|
-
icon:
|
|
2041
|
+
icon: n,
|
|
2026
2042
|
disabled: s,
|
|
2027
2043
|
sizing: a = "base",
|
|
2028
2044
|
variant: o = "primary",
|
|
@@ -2048,26 +2064,26 @@ const sn = 10, fr = ({
|
|
|
2048
2064
|
"aria-busy": f,
|
|
2049
2065
|
title: p || g,
|
|
2050
2066
|
children: f ? /* @__PURE__ */ x.jsx(ge, { icon: "spinner", state: Vt(o), spin: !0 }) : /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
|
|
2051
|
-
|
|
2067
|
+
n && l && /* @__PURE__ */ x.jsx(
|
|
2052
2068
|
ge,
|
|
2053
2069
|
{
|
|
2054
|
-
icon:
|
|
2070
|
+
icon: n,
|
|
2055
2071
|
disabled: s,
|
|
2056
2072
|
state: Vt(o),
|
|
2057
2073
|
width: Ft(a),
|
|
2058
2074
|
height: Ft(a)
|
|
2059
2075
|
}
|
|
2060
2076
|
),
|
|
2061
|
-
c &&
|
|
2077
|
+
c && r && /* @__PURE__ */ x.jsx("span", { children: r })
|
|
2062
2078
|
] })
|
|
2063
2079
|
}
|
|
2064
2080
|
);
|
|
2065
2081
|
}, on = ({
|
|
2066
|
-
bindValue:
|
|
2082
|
+
bindValue: r,
|
|
2067
2083
|
onChange: e,
|
|
2068
2084
|
onBlur: t
|
|
2069
2085
|
}) => {
|
|
2070
|
-
const
|
|
2086
|
+
const n = (s) => {
|
|
2071
2087
|
e && e(s.target.checked);
|
|
2072
2088
|
};
|
|
2073
2089
|
return /* @__PURE__ */ x.jsx(
|
|
@@ -2075,8 +2091,8 @@ const sn = 10, fr = ({
|
|
|
2075
2091
|
{
|
|
2076
2092
|
"data-component": "checkbox",
|
|
2077
2093
|
type: "checkbox",
|
|
2078
|
-
checked:
|
|
2079
|
-
onChange:
|
|
2094
|
+
checked: r,
|
|
2095
|
+
onChange: n,
|
|
2080
2096
|
onBlur: t
|
|
2081
2097
|
}
|
|
2082
2098
|
);
|
|
@@ -2086,19 +2102,19 @@ const sn = 10, fr = ({
|
|
|
2086
2102
|
body: "h6",
|
|
2087
2103
|
label: "label"
|
|
2088
2104
|
}, cn = ({
|
|
2089
|
-
variant:
|
|
2105
|
+
variant: r = "body",
|
|
2090
2106
|
bindValue: e,
|
|
2091
2107
|
color: t,
|
|
2092
|
-
...
|
|
2108
|
+
...n
|
|
2093
2109
|
}) => {
|
|
2094
|
-
const s = ln[
|
|
2095
|
-
container: `smp-typography ${
|
|
2110
|
+
const s = ln[r], a = {
|
|
2111
|
+
container: `smp-typography ${r ? `smp-typography-${r}` : ""} ${n.disabled ? "smp-typography-disabled" : ""}`
|
|
2096
2112
|
};
|
|
2097
2113
|
return /* @__PURE__ */ x.jsx(
|
|
2098
2114
|
s,
|
|
2099
2115
|
{
|
|
2100
2116
|
className: a.container,
|
|
2101
|
-
disabled:
|
|
2117
|
+
disabled: n.disabled,
|
|
2102
2118
|
style: {
|
|
2103
2119
|
"--smp-typography-color-base": t
|
|
2104
2120
|
},
|
|
@@ -2106,10 +2122,10 @@ const sn = 10, fr = ({
|
|
|
2106
2122
|
}
|
|
2107
2123
|
);
|
|
2108
2124
|
}, hr = ({
|
|
2109
|
-
elements:
|
|
2125
|
+
elements: r,
|
|
2110
2126
|
isEditable: e = !1,
|
|
2111
2127
|
displayMode: t = "Both",
|
|
2112
|
-
onChange:
|
|
2128
|
+
onChange: n,
|
|
2113
2129
|
color: s,
|
|
2114
2130
|
backgroundColor: a
|
|
2115
2131
|
}) => {
|
|
@@ -2117,10 +2133,10 @@ const sn = 10, fr = ({
|
|
|
2117
2133
|
container: `${["smp-chips-container"]}`,
|
|
2118
2134
|
element: "smp-chips-element"
|
|
2119
2135
|
}, i = (l) => {
|
|
2120
|
-
|
|
2136
|
+
n == null || n(r.filter((c, u) => u !== l));
|
|
2121
2137
|
};
|
|
2122
|
-
return /* @__PURE__ */ x.jsx("div", { className: o.container, role: "list", "data-component": "chip", children:
|
|
2123
|
-
const u =
|
|
2138
|
+
return /* @__PURE__ */ x.jsx("div", { className: o.container, role: "list", "data-component": "chip", children: r.map((l, c) => {
|
|
2139
|
+
const u = Ke(
|
|
2124
2140
|
l.bindValue,
|
|
2125
2141
|
l.optionalDisplayValue,
|
|
2126
2142
|
t
|
|
@@ -2157,15 +2173,15 @@ const sn = 10, fr = ({
|
|
|
2157
2173
|
);
|
|
2158
2174
|
}) });
|
|
2159
2175
|
};
|
|
2160
|
-
function gr(
|
|
2176
|
+
function gr(r, e) {
|
|
2161
2177
|
const t = be(null);
|
|
2162
2178
|
oe(() => {
|
|
2163
|
-
if (!n) return;
|
|
2164
|
-
const r = typeof e == "object" && e !== null && "current" in e ? e.current : null;
|
|
2165
2179
|
if (!r) return;
|
|
2180
|
+
const n = typeof e == "object" && e !== null && "current" in e ? e.current : null;
|
|
2181
|
+
if (!n) return;
|
|
2166
2182
|
t.current = document.activeElement;
|
|
2167
|
-
const s = () =>
|
|
2168
|
-
|
|
2183
|
+
const s = () => n ? Array.from(
|
|
2184
|
+
n.querySelectorAll(
|
|
2169
2185
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2170
2186
|
)
|
|
2171
2187
|
).filter((c) => !c.hasAttribute("disabled") && c.offsetParent !== null) : [];
|
|
@@ -2180,7 +2196,7 @@ function gr(n, e) {
|
|
|
2180
2196
|
const f = u[0], p = u[u.length - 1];
|
|
2181
2197
|
c.shiftKey && document.activeElement === f ? (c.preventDefault(), p.focus()) : !c.shiftKey && document.activeElement === p && (c.preventDefault(), f.focus());
|
|
2182
2198
|
}, i = (c) => {
|
|
2183
|
-
if (
|
|
2199
|
+
if (n && !n.contains(c.target)) {
|
|
2184
2200
|
c.preventDefault();
|
|
2185
2201
|
const u = s();
|
|
2186
2202
|
u.length > 0 && u[0].focus();
|
|
@@ -2194,13 +2210,13 @@ function gr(n, e) {
|
|
|
2194
2210
|
(c = t.current) == null || c.focus();
|
|
2195
2211
|
});
|
|
2196
2212
|
};
|
|
2197
|
-
}, [
|
|
2213
|
+
}, [r, e]);
|
|
2198
2214
|
}
|
|
2199
2215
|
const un = ({
|
|
2200
|
-
bindValue:
|
|
2216
|
+
bindValue: r,
|
|
2201
2217
|
onChange: e,
|
|
2202
2218
|
options: t = [],
|
|
2203
|
-
optionalDisplayValue:
|
|
2219
|
+
optionalDisplayValue: n,
|
|
2204
2220
|
displayMode: s,
|
|
2205
2221
|
listDisplayMode: a = "Both",
|
|
2206
2222
|
fun: o,
|
|
@@ -2208,11 +2224,11 @@ const un = ({
|
|
|
2208
2224
|
multiActiveIndex: l,
|
|
2209
2225
|
...c
|
|
2210
2226
|
}) => {
|
|
2211
|
-
const [u, f] = Q(!1), [p, g] = Q(t), [h, y] = Q(-1), [
|
|
2227
|
+
const [u, f] = Q(!1), [p, g] = Q(t), [h, y] = Q(-1), [w, E] = Q([r]), b = Or(), { anchorRef: O, targetRef: R, anchorWidth: v } = gt({
|
|
2212
2228
|
position: "bottom",
|
|
2213
2229
|
enabled: u
|
|
2214
2230
|
});
|
|
2215
|
-
|
|
2231
|
+
qe(R, () => f(!1)), gr(u, R);
|
|
2216
2232
|
const $ = (C) => {
|
|
2217
2233
|
e == null || e(C.id, C.label);
|
|
2218
2234
|
const I = p.findIndex((Y) => Y.id === C.id);
|
|
@@ -2239,8 +2255,8 @@ const un = ({
|
|
|
2239
2255
|
dr,
|
|
2240
2256
|
{
|
|
2241
2257
|
...c,
|
|
2242
|
-
bindValue:
|
|
2243
|
-
optionalDisplayValue:
|
|
2258
|
+
bindValue: r,
|
|
2259
|
+
optionalDisplayValue: n,
|
|
2244
2260
|
displayMode: s,
|
|
2245
2261
|
onShapeIconClick: F,
|
|
2246
2262
|
onKeyDown: V,
|
|
@@ -2260,7 +2276,7 @@ const un = ({
|
|
|
2260
2276
|
displayMode: a,
|
|
2261
2277
|
ref: R,
|
|
2262
2278
|
selectedIndex: h,
|
|
2263
|
-
activeIndex: l ||
|
|
2279
|
+
activeIndex: l || w,
|
|
2264
2280
|
width: v,
|
|
2265
2281
|
onClick: $,
|
|
2266
2282
|
onKeyDown: j
|
|
@@ -2269,62 +2285,62 @@ const un = ({
|
|
|
2269
2285
|
]
|
|
2270
2286
|
}
|
|
2271
2287
|
);
|
|
2272
|
-
}, H = (
|
|
2273
|
-
let
|
|
2274
|
-
const t = new Promise((
|
|
2275
|
-
|
|
2288
|
+
}, H = (r) => typeof r == "string", Ae = () => {
|
|
2289
|
+
let r, e;
|
|
2290
|
+
const t = new Promise((n, s) => {
|
|
2291
|
+
r = n, e = s;
|
|
2276
2292
|
});
|
|
2277
|
-
return t.resolve =
|
|
2278
|
-
}, Yt = (
|
|
2279
|
-
|
|
2280
|
-
e[
|
|
2293
|
+
return t.resolve = r, t.reject = e, t;
|
|
2294
|
+
}, Yt = (r) => r == null ? "" : "" + r, fn = (r, e, t) => {
|
|
2295
|
+
r.forEach((n) => {
|
|
2296
|
+
e[n] && (t[n] = e[n]);
|
|
2281
2297
|
});
|
|
2282
|
-
}, dn = /###/g, Ut = (
|
|
2283
|
-
const
|
|
2298
|
+
}, dn = /###/g, Ut = (r) => r && r.indexOf("###") > -1 ? r.replace(dn, ".") : r, Wt = (r) => !r || H(r), $e = (r, e, t) => {
|
|
2299
|
+
const n = H(e) ? e.split(".") : e;
|
|
2284
2300
|
let s = 0;
|
|
2285
|
-
for (; s <
|
|
2286
|
-
if (Wt(
|
|
2287
|
-
const a = Ut(
|
|
2288
|
-
!
|
|
2301
|
+
for (; s < n.length - 1; ) {
|
|
2302
|
+
if (Wt(r)) return {};
|
|
2303
|
+
const a = Ut(n[s]);
|
|
2304
|
+
!r[a] && t && (r[a] = new t()), Object.prototype.hasOwnProperty.call(r, a) ? r = r[a] : r = {}, ++s;
|
|
2289
2305
|
}
|
|
2290
|
-
return Wt(
|
|
2291
|
-
obj:
|
|
2292
|
-
k: Ut(
|
|
2306
|
+
return Wt(r) ? {} : {
|
|
2307
|
+
obj: r,
|
|
2308
|
+
k: Ut(n[s])
|
|
2293
2309
|
};
|
|
2294
|
-
}, Ht = (
|
|
2310
|
+
}, Ht = (r, e, t) => {
|
|
2295
2311
|
const {
|
|
2296
|
-
obj:
|
|
2312
|
+
obj: n,
|
|
2297
2313
|
k: s
|
|
2298
|
-
} =
|
|
2299
|
-
if (
|
|
2300
|
-
|
|
2314
|
+
} = $e(r, e, Object);
|
|
2315
|
+
if (n !== void 0 || e.length === 1) {
|
|
2316
|
+
n[s] = t;
|
|
2301
2317
|
return;
|
|
2302
2318
|
}
|
|
2303
|
-
let a = e[e.length - 1], o = e.slice(0, e.length - 1), i =
|
|
2319
|
+
let a = e[e.length - 1], o = e.slice(0, e.length - 1), i = $e(r, o, Object);
|
|
2304
2320
|
for (; i.obj === void 0 && o.length; )
|
|
2305
|
-
a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), i =
|
|
2321
|
+
a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), i = $e(r, o, Object), i != null && i.obj && typeof i.obj[`${i.k}.${a}`] < "u" && (i.obj = void 0);
|
|
2306
2322
|
i.obj[`${i.k}.${a}`] = t;
|
|
2307
|
-
}, pn = (
|
|
2323
|
+
}, pn = (r, e, t, n) => {
|
|
2308
2324
|
const {
|
|
2309
2325
|
obj: s,
|
|
2310
2326
|
k: a
|
|
2311
|
-
} =
|
|
2327
|
+
} = $e(r, e, Object);
|
|
2312
2328
|
s[a] = s[a] || [], s[a].push(t);
|
|
2313
|
-
}, ze = (
|
|
2329
|
+
}, ze = (r, e) => {
|
|
2314
2330
|
const {
|
|
2315
2331
|
obj: t,
|
|
2316
|
-
k:
|
|
2317
|
-
} =
|
|
2318
|
-
if (t && Object.prototype.hasOwnProperty.call(t,
|
|
2319
|
-
return t[
|
|
2320
|
-
}, hn = (
|
|
2321
|
-
const
|
|
2322
|
-
return
|
|
2323
|
-
}, mr = (
|
|
2324
|
-
for (const
|
|
2325
|
-
|
|
2326
|
-
return
|
|
2327
|
-
}, Ee = (
|
|
2332
|
+
k: n
|
|
2333
|
+
} = $e(r, e);
|
|
2334
|
+
if (t && Object.prototype.hasOwnProperty.call(t, n))
|
|
2335
|
+
return t[n];
|
|
2336
|
+
}, hn = (r, e, t) => {
|
|
2337
|
+
const n = ze(r, t);
|
|
2338
|
+
return n !== void 0 ? n : ze(e, t);
|
|
2339
|
+
}, mr = (r, e, t) => {
|
|
2340
|
+
for (const n in e)
|
|
2341
|
+
n !== "__proto__" && n !== "constructor" && (n in r ? H(r[n]) || r[n] instanceof String || H(e[n]) || e[n] instanceof String ? t && (r[n] = e[n]) : mr(r[n], e[n], t) : r[n] = e[n]);
|
|
2342
|
+
return r;
|
|
2343
|
+
}, Ee = (r) => r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
2328
2344
|
var gn = {
|
|
2329
2345
|
"&": "&",
|
|
2330
2346
|
"<": "<",
|
|
@@ -2333,7 +2349,7 @@ var gn = {
|
|
|
2333
2349
|
"'": "'",
|
|
2334
2350
|
"/": "/"
|
|
2335
2351
|
};
|
|
2336
|
-
const mn = (
|
|
2352
|
+
const mn = (r) => H(r) ? r.replace(/[&<>"'\/]/g, (e) => gn[e]) : r;
|
|
2337
2353
|
class yn {
|
|
2338
2354
|
constructor(e) {
|
|
2339
2355
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -2342,34 +2358,34 @@ class yn {
|
|
|
2342
2358
|
const t = this.regExpMap.get(e);
|
|
2343
2359
|
if (t !== void 0)
|
|
2344
2360
|
return t;
|
|
2345
|
-
const
|
|
2346
|
-
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e,
|
|
2361
|
+
const n = new RegExp(e);
|
|
2362
|
+
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
|
|
2347
2363
|
}
|
|
2348
2364
|
}
|
|
2349
|
-
const vn = [" ", ",", "?", "!", ";"], bn = new yn(20), xn = (
|
|
2365
|
+
const vn = [" ", ",", "?", "!", ";"], bn = new yn(20), xn = (r, e, t) => {
|
|
2350
2366
|
e = e || "", t = t || "";
|
|
2351
|
-
const
|
|
2352
|
-
if (
|
|
2353
|
-
const s = bn.getRegExp(`(${
|
|
2354
|
-
let a = !s.test(
|
|
2367
|
+
const n = vn.filter((o) => e.indexOf(o) < 0 && t.indexOf(o) < 0);
|
|
2368
|
+
if (n.length === 0) return !0;
|
|
2369
|
+
const s = bn.getRegExp(`(${n.map((o) => o === "?" ? "\\?" : o).join("|")})`);
|
|
2370
|
+
let a = !s.test(r);
|
|
2355
2371
|
if (!a) {
|
|
2356
|
-
const o =
|
|
2357
|
-
o > 0 && !s.test(
|
|
2372
|
+
const o = r.indexOf(t);
|
|
2373
|
+
o > 0 && !s.test(r.substring(0, o)) && (a = !0);
|
|
2358
2374
|
}
|
|
2359
2375
|
return a;
|
|
2360
|
-
}, dt = (
|
|
2361
|
-
if (!
|
|
2362
|
-
if (
|
|
2363
|
-
return Object.prototype.hasOwnProperty.call(
|
|
2364
|
-
const
|
|
2365
|
-
let s =
|
|
2366
|
-
for (let a = 0; a <
|
|
2376
|
+
}, dt = (r, e, t = ".") => {
|
|
2377
|
+
if (!r) return;
|
|
2378
|
+
if (r[e])
|
|
2379
|
+
return Object.prototype.hasOwnProperty.call(r, e) ? r[e] : void 0;
|
|
2380
|
+
const n = e.split(t);
|
|
2381
|
+
let s = r;
|
|
2382
|
+
for (let a = 0; a < n.length; ) {
|
|
2367
2383
|
if (!s || typeof s != "object")
|
|
2368
2384
|
return;
|
|
2369
2385
|
let o, i = "";
|
|
2370
|
-
for (let l = a; l <
|
|
2371
|
-
if (l !== a && (i += t), i +=
|
|
2372
|
-
if (["string", "number", "boolean"].indexOf(typeof o) > -1 && l <
|
|
2386
|
+
for (let l = a; l < n.length; ++l)
|
|
2387
|
+
if (l !== a && (i += t), i += n[l], o = s[i], o !== void 0) {
|
|
2388
|
+
if (["string", "number", "boolean"].indexOf(typeof o) > -1 && l < n.length - 1)
|
|
2373
2389
|
continue;
|
|
2374
2390
|
a += l - a + 1;
|
|
2375
2391
|
break;
|
|
@@ -2377,20 +2393,20 @@ const vn = [" ", ",", "?", "!", ";"], bn = new yn(20), xn = (n, e, t) => {
|
|
|
2377
2393
|
s = o;
|
|
2378
2394
|
}
|
|
2379
2395
|
return s;
|
|
2380
|
-
},
|
|
2396
|
+
}, je = (r) => r == null ? void 0 : r.replace("_", "-"), Sn = {
|
|
2381
2397
|
type: "logger",
|
|
2382
|
-
log(
|
|
2383
|
-
this.output("log",
|
|
2398
|
+
log(r) {
|
|
2399
|
+
this.output("log", r);
|
|
2384
2400
|
},
|
|
2385
|
-
warn(
|
|
2386
|
-
this.output("warn",
|
|
2401
|
+
warn(r) {
|
|
2402
|
+
this.output("warn", r);
|
|
2387
2403
|
},
|
|
2388
|
-
error(
|
|
2389
|
-
this.output("error",
|
|
2404
|
+
error(r) {
|
|
2405
|
+
this.output("error", r);
|
|
2390
2406
|
},
|
|
2391
|
-
output(
|
|
2392
|
-
var t,
|
|
2393
|
-
(
|
|
2407
|
+
output(r, e) {
|
|
2408
|
+
var t, n;
|
|
2409
|
+
(n = (t = console == null ? void 0 : console[r]) == null ? void 0 : t.apply) == null || n.call(t, console, e);
|
|
2394
2410
|
}
|
|
2395
2411
|
};
|
|
2396
2412
|
class Je {
|
|
@@ -2412,8 +2428,8 @@ class Je {
|
|
|
2412
2428
|
deprecate(...e) {
|
|
2413
2429
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
2414
2430
|
}
|
|
2415
|
-
forward(e, t,
|
|
2416
|
-
return s && !this.debug ? null : (H(e[0]) && (e[0] = `${
|
|
2431
|
+
forward(e, t, n, s) {
|
|
2432
|
+
return s && !this.debug ? null : (H(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
2417
2433
|
}
|
|
2418
2434
|
create(e) {
|
|
2419
2435
|
return new Je(this.logger, {
|
|
@@ -2431,10 +2447,10 @@ class Ze {
|
|
|
2431
2447
|
this.observers = {};
|
|
2432
2448
|
}
|
|
2433
2449
|
on(e, t) {
|
|
2434
|
-
return e.split(" ").forEach((
|
|
2435
|
-
this.observers[
|
|
2436
|
-
const s = this.observers[
|
|
2437
|
-
this.observers[
|
|
2450
|
+
return e.split(" ").forEach((n) => {
|
|
2451
|
+
this.observers[n] || (this.observers[n] = /* @__PURE__ */ new Map());
|
|
2452
|
+
const s = this.observers[n].get(t) || 0;
|
|
2453
|
+
this.observers[n].set(t, s + 1);
|
|
2438
2454
|
}), this;
|
|
2439
2455
|
}
|
|
2440
2456
|
off(e, t) {
|
|
@@ -2470,41 +2486,41 @@ class qt extends Ze {
|
|
|
2470
2486
|
const t = this.options.ns.indexOf(e);
|
|
2471
2487
|
t > -1 && this.options.ns.splice(t, 1);
|
|
2472
2488
|
}
|
|
2473
|
-
getResource(e, t,
|
|
2489
|
+
getResource(e, t, n, s = {}) {
|
|
2474
2490
|
var c, u;
|
|
2475
2491
|
const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, o = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
2476
2492
|
let i;
|
|
2477
|
-
e.indexOf(".") > -1 ? i = e.split(".") : (i = [e, t],
|
|
2493
|
+
e.indexOf(".") > -1 ? i = e.split(".") : (i = [e, t], n && (Array.isArray(n) ? i.push(...n) : H(n) && a ? i.push(...n.split(a)) : i.push(n)));
|
|
2478
2494
|
const l = ze(this.data, i);
|
|
2479
|
-
return !l && !t && !
|
|
2495
|
+
return !l && !t && !n && e.indexOf(".") > -1 && (e = i[0], t = i[1], n = i.slice(2).join(".")), l || !o || !H(n) ? l : dt((u = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : u[t], n, a);
|
|
2480
2496
|
}
|
|
2481
|
-
addResource(e, t,
|
|
2497
|
+
addResource(e, t, n, s, a = {
|
|
2482
2498
|
silent: !1
|
|
2483
2499
|
}) {
|
|
2484
2500
|
const o = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator;
|
|
2485
2501
|
let i = [e, t];
|
|
2486
|
-
|
|
2502
|
+
n && (i = i.concat(o ? n.split(o) : n)), e.indexOf(".") > -1 && (i = e.split("."), s = t, t = i[1]), this.addNamespaces(t), Ht(this.data, i, s), a.silent || this.emit("added", e, t, n, s);
|
|
2487
2503
|
}
|
|
2488
|
-
addResources(e, t,
|
|
2504
|
+
addResources(e, t, n, s = {
|
|
2489
2505
|
silent: !1
|
|
2490
2506
|
}) {
|
|
2491
|
-
for (const a in
|
|
2492
|
-
(H(
|
|
2507
|
+
for (const a in n)
|
|
2508
|
+
(H(n[a]) || Array.isArray(n[a])) && this.addResource(e, t, a, n[a], {
|
|
2493
2509
|
silent: !0
|
|
2494
2510
|
});
|
|
2495
|
-
s.silent || this.emit("added", e, t,
|
|
2511
|
+
s.silent || this.emit("added", e, t, n);
|
|
2496
2512
|
}
|
|
2497
|
-
addResourceBundle(e, t,
|
|
2513
|
+
addResourceBundle(e, t, n, s, a, o = {
|
|
2498
2514
|
silent: !1,
|
|
2499
2515
|
skipCopy: !1
|
|
2500
2516
|
}) {
|
|
2501
2517
|
let i = [e, t];
|
|
2502
|
-
e.indexOf(".") > -1 && (i = e.split("."), s =
|
|
2518
|
+
e.indexOf(".") > -1 && (i = e.split("."), s = n, n = t, t = i[1]), this.addNamespaces(t);
|
|
2503
2519
|
let l = ze(this.data, i) || {};
|
|
2504
|
-
o.skipCopy || (
|
|
2520
|
+
o.skipCopy || (n = JSON.parse(JSON.stringify(n))), s ? mr(l, n, a) : l = {
|
|
2505
2521
|
...l,
|
|
2506
|
-
...
|
|
2507
|
-
}, Ht(this.data, i, l), o.silent || this.emit("added", e, t,
|
|
2522
|
+
...n
|
|
2523
|
+
}, Ht(this.data, i, l), o.silent || this.emit("added", e, t, n);
|
|
2508
2524
|
}
|
|
2509
2525
|
removeResourceBundle(e, t) {
|
|
2510
2526
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -2528,17 +2544,17 @@ class qt extends Ze {
|
|
|
2528
2544
|
}
|
|
2529
2545
|
var yr = {
|
|
2530
2546
|
processors: {},
|
|
2531
|
-
addPostProcessor(
|
|
2532
|
-
this.processors[
|
|
2547
|
+
addPostProcessor(r) {
|
|
2548
|
+
this.processors[r.name] = r;
|
|
2533
2549
|
},
|
|
2534
|
-
handle(
|
|
2535
|
-
return
|
|
2550
|
+
handle(r, e, t, n, s) {
|
|
2551
|
+
return r.forEach((a) => {
|
|
2536
2552
|
var o;
|
|
2537
|
-
e = ((o = this.processors[a]) == null ? void 0 : o.process(e, t,
|
|
2553
|
+
e = ((o = this.processors[a]) == null ? void 0 : o.process(e, t, n, s)) ?? e;
|
|
2538
2554
|
}), e;
|
|
2539
2555
|
}
|
|
2540
2556
|
};
|
|
2541
|
-
const Kt = {}, Bt = (
|
|
2557
|
+
const Kt = {}, Bt = (r) => !H(r) && typeof r != "boolean" && typeof r != "number";
|
|
2542
2558
|
class Xe extends Ze {
|
|
2543
2559
|
constructor(e, t = {}) {
|
|
2544
2560
|
super(), fn(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = he.create("translator");
|
|
@@ -2549,19 +2565,19 @@ class Xe extends Ze {
|
|
|
2549
2565
|
exists(e, t = {
|
|
2550
2566
|
interpolation: {}
|
|
2551
2567
|
}) {
|
|
2552
|
-
const
|
|
2568
|
+
const n = {
|
|
2553
2569
|
...t
|
|
2554
2570
|
};
|
|
2555
2571
|
if (e == null) return !1;
|
|
2556
|
-
const s = this.resolve(e,
|
|
2572
|
+
const s = this.resolve(e, n);
|
|
2557
2573
|
return (s == null ? void 0 : s.res) !== void 0;
|
|
2558
2574
|
}
|
|
2559
2575
|
extractFromKey(e, t) {
|
|
2560
|
-
let
|
|
2561
|
-
|
|
2576
|
+
let n = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
|
|
2577
|
+
n === void 0 && (n = ":");
|
|
2562
2578
|
const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
2563
2579
|
let a = t.ns || this.options.defaultNS || [];
|
|
2564
|
-
const o =
|
|
2580
|
+
const o = n && e.indexOf(n) > -1, i = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !xn(e, n, s);
|
|
2565
2581
|
if (o && !i) {
|
|
2566
2582
|
const l = e.match(this.interpolator.nestingRegexp);
|
|
2567
2583
|
if (l && l.length > 0)
|
|
@@ -2569,15 +2585,15 @@ class Xe extends Ze {
|
|
|
2569
2585
|
key: e,
|
|
2570
2586
|
namespaces: H(a) ? [a] : a
|
|
2571
2587
|
};
|
|
2572
|
-
const c = e.split(
|
|
2573
|
-
(
|
|
2588
|
+
const c = e.split(n);
|
|
2589
|
+
(n !== s || n === s && this.options.ns.indexOf(c[0]) > -1) && (a = c.shift()), e = c.join(s);
|
|
2574
2590
|
}
|
|
2575
2591
|
return {
|
|
2576
2592
|
key: e,
|
|
2577
2593
|
namespaces: H(a) ? [a] : a
|
|
2578
2594
|
};
|
|
2579
2595
|
}
|
|
2580
|
-
translate(e, t,
|
|
2596
|
+
translate(e, t, n) {
|
|
2581
2597
|
let s = typeof t == "object" ? {
|
|
2582
2598
|
...t
|
|
2583
2599
|
} : t;
|
|
@@ -2610,7 +2626,7 @@ class Xe extends Ze {
|
|
|
2610
2626
|
} : i;
|
|
2611
2627
|
const g = this.resolve(e, s);
|
|
2612
2628
|
let h = g == null ? void 0 : g.res;
|
|
2613
|
-
const y = (g == null ? void 0 : g.usedKey) || i,
|
|
2629
|
+
const y = (g == null ? void 0 : g.usedKey) || i, w = (g == null ? void 0 : g.exactUsedKey) || i, E = ["[object Number]", "[object Function]", "[object RegExp]"], b = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, O = !this.i18nFormat || this.i18nFormat.handleAsObject, R = s.count !== void 0 && !H(s.count), v = Xe.hasDefaultValue(s), $ = R ? this.pluralResolver.getSuffix(f, s.count, s) : "", j = s.ordinal && R ? this.pluralResolver.getSuffix(f, s.count, {
|
|
2614
2630
|
ordinal: !1
|
|
2615
2631
|
}) : "", V = R && !s.ordinal && s.count === 0, F = V && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${$}`] || s[`defaultValue${j}`] || s.defaultValue;
|
|
2616
2632
|
let C = h;
|
|
@@ -2626,7 +2642,7 @@ class Xe extends Ze {
|
|
|
2626
2642
|
return a ? (g.res = J, g.usedParams = this.getUsedParamsDetails(s), g) : J;
|
|
2627
2643
|
}
|
|
2628
2644
|
if (o) {
|
|
2629
|
-
const J = Array.isArray(C), q = J ? [] : {}, ne = J ?
|
|
2645
|
+
const J = Array.isArray(C), q = J ? [] : {}, ne = J ? w : y;
|
|
2630
2646
|
for (const z in C)
|
|
2631
2647
|
if (Object.prototype.hasOwnProperty.call(C, z)) {
|
|
2632
2648
|
const U = `${ne}${o}${z}`;
|
|
@@ -2644,7 +2660,7 @@ class Xe extends Ze {
|
|
|
2644
2660
|
h = q;
|
|
2645
2661
|
}
|
|
2646
2662
|
} else if (O && H(b) && Array.isArray(h))
|
|
2647
|
-
h = h.join(b), h && (h = this.extendTranslation(h, e, s,
|
|
2663
|
+
h = h.join(b), h && (h = this.extendTranslation(h, e, s, n));
|
|
2648
2664
|
else {
|
|
2649
2665
|
let J = !1, q = !1;
|
|
2650
2666
|
!this.isValidLookup(h) && v && (J = !0, h = F), this.isValidLookup(h) || (q = !0, h = i);
|
|
@@ -2663,82 +2679,82 @@ class Xe extends Ze {
|
|
|
2663
2679
|
for (let m = 0; m < k.length; m++)
|
|
2664
2680
|
B.push(k[m]);
|
|
2665
2681
|
else this.options.saveMissingTo === "all" ? B = this.languageUtils.toResolveHierarchy(s.lng || this.language) : B.push(s.lng || this.language);
|
|
2666
|
-
const d = (m,
|
|
2682
|
+
const d = (m, S, D) => {
|
|
2667
2683
|
var P;
|
|
2668
2684
|
const T = v && D !== h ? D : z;
|
|
2669
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(m, c,
|
|
2685
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(m, c, S, T, U, s) : (P = this.backendConnector) != null && P.saveMissing && this.backendConnector.saveMissing(m, c, S, T, U, s), this.emit("missingKey", m, c, S, h);
|
|
2670
2686
|
};
|
|
2671
2687
|
this.options.saveMissing && (this.options.saveMissingPlurals && R ? B.forEach((m) => {
|
|
2672
|
-
const
|
|
2673
|
-
V && s[`defaultValue${this.options.pluralSeparator}zero`] &&
|
|
2688
|
+
const S = this.pluralResolver.getSuffixes(m, s);
|
|
2689
|
+
V && s[`defaultValue${this.options.pluralSeparator}zero`] && S.indexOf(`${this.options.pluralSeparator}zero`) < 0 && S.push(`${this.options.pluralSeparator}zero`), S.forEach((D) => {
|
|
2674
2690
|
d([m], i + D, s[`defaultValue${D}`] || F);
|
|
2675
2691
|
});
|
|
2676
2692
|
}) : d(B, i, F));
|
|
2677
2693
|
}
|
|
2678
|
-
h = this.extendTranslation(h, e, s, g,
|
|
2694
|
+
h = this.extendTranslation(h, e, s, g, n), q && h === i && this.options.appendNamespaceToMissingKey && (h = `${c}${u}${i}`), (q || J) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${u}${i}` : i, J ? h : void 0, s));
|
|
2679
2695
|
}
|
|
2680
2696
|
return a ? (g.res = h, g.usedParams = this.getUsedParamsDetails(s), g) : h;
|
|
2681
2697
|
}
|
|
2682
|
-
extendTranslation(e, t,
|
|
2698
|
+
extendTranslation(e, t, n, s, a) {
|
|
2683
2699
|
var l, c;
|
|
2684
2700
|
if ((l = this.i18nFormat) != null && l.parse)
|
|
2685
2701
|
e = this.i18nFormat.parse(e, {
|
|
2686
2702
|
...this.options.interpolation.defaultVariables,
|
|
2687
|
-
...
|
|
2688
|
-
},
|
|
2703
|
+
...n
|
|
2704
|
+
}, n.lng || this.language || s.usedLng, s.usedNS, s.usedKey, {
|
|
2689
2705
|
resolved: s
|
|
2690
2706
|
});
|
|
2691
|
-
else if (!
|
|
2692
|
-
|
|
2693
|
-
...
|
|
2707
|
+
else if (!n.skipInterpolation) {
|
|
2708
|
+
n.interpolation && this.interpolator.init({
|
|
2709
|
+
...n,
|
|
2694
2710
|
interpolation: {
|
|
2695
2711
|
...this.options.interpolation,
|
|
2696
|
-
...
|
|
2712
|
+
...n.interpolation
|
|
2697
2713
|
}
|
|
2698
2714
|
});
|
|
2699
|
-
const u = H(e) && (((c =
|
|
2715
|
+
const u = H(e) && (((c = n == null ? void 0 : n.interpolation) == null ? void 0 : c.skipOnVariables) !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
2700
2716
|
let f;
|
|
2701
2717
|
if (u) {
|
|
2702
2718
|
const g = e.match(this.interpolator.nestingRegexp);
|
|
2703
2719
|
f = g && g.length;
|
|
2704
2720
|
}
|
|
2705
|
-
let p =
|
|
2721
|
+
let p = n.replace && !H(n.replace) ? n.replace : n;
|
|
2706
2722
|
if (this.options.interpolation.defaultVariables && (p = {
|
|
2707
2723
|
...this.options.interpolation.defaultVariables,
|
|
2708
2724
|
...p
|
|
2709
|
-
}), e = this.interpolator.interpolate(e, p,
|
|
2725
|
+
}), e = this.interpolator.interpolate(e, p, n.lng || this.language || s.usedLng, n), u) {
|
|
2710
2726
|
const g = e.match(this.interpolator.nestingRegexp), h = g && g.length;
|
|
2711
|
-
f < h && (
|
|
2727
|
+
f < h && (n.nest = !1);
|
|
2712
2728
|
}
|
|
2713
|
-
!
|
|
2729
|
+
!n.lng && s && s.res && (n.lng = this.language || s.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...g) => (a == null ? void 0 : a[0]) === g[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${t[0]}`), null) : this.translate(...g, t), n)), n.interpolation && this.interpolator.reset();
|
|
2714
2730
|
}
|
|
2715
|
-
const o =
|
|
2716
|
-
return e != null && (i != null && i.length) &&
|
|
2731
|
+
const o = n.postProcess || this.options.postProcess, i = H(o) ? [o] : o;
|
|
2732
|
+
return e != null && (i != null && i.length) && n.applyPostProcessor !== !1 && (e = yr.handle(i, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
2717
2733
|
i18nResolved: {
|
|
2718
2734
|
...s,
|
|
2719
|
-
usedParams: this.getUsedParamsDetails(
|
|
2735
|
+
usedParams: this.getUsedParamsDetails(n)
|
|
2720
2736
|
},
|
|
2721
|
-
...
|
|
2722
|
-
} :
|
|
2737
|
+
...n
|
|
2738
|
+
} : n, this)), e;
|
|
2723
2739
|
}
|
|
2724
2740
|
resolve(e, t = {}) {
|
|
2725
|
-
let
|
|
2741
|
+
let n, s, a, o, i;
|
|
2726
2742
|
return H(e) && (e = [e]), e.forEach((l) => {
|
|
2727
|
-
if (this.isValidLookup(
|
|
2743
|
+
if (this.isValidLookup(n)) return;
|
|
2728
2744
|
const c = this.extractFromKey(l, t), u = c.key;
|
|
2729
2745
|
s = u;
|
|
2730
2746
|
let f = c.namespaces;
|
|
2731
2747
|
this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
|
|
2732
2748
|
const p = t.count !== void 0 && !H(t.count), g = p && !t.ordinal && t.count === 0, h = t.context !== void 0 && (H(t.context) || typeof t.context == "number") && t.context !== "", y = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
2733
|
-
f.forEach((
|
|
2749
|
+
f.forEach((w) => {
|
|
2734
2750
|
var E, b;
|
|
2735
|
-
this.isValidLookup(
|
|
2751
|
+
this.isValidLookup(n) || (i = w, !Kt[`${y[0]}-${w}`] && ((E = this.utils) != null && E.hasLoadedNamespace) && !((b = this.utils) != null && b.hasLoadedNamespace(i)) && (Kt[`${y[0]}-${w}`] = !0, this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), y.forEach((O) => {
|
|
2736
2752
|
var $;
|
|
2737
|
-
if (this.isValidLookup(
|
|
2753
|
+
if (this.isValidLookup(n)) return;
|
|
2738
2754
|
o = O;
|
|
2739
2755
|
const R = [u];
|
|
2740
2756
|
if (($ = this.i18nFormat) != null && $.addLookupKeys)
|
|
2741
|
-
this.i18nFormat.addLookupKeys(R, u, O,
|
|
2757
|
+
this.i18nFormat.addLookupKeys(R, u, O, w, t);
|
|
2742
2758
|
else {
|
|
2743
2759
|
let j;
|
|
2744
2760
|
p && (j = this.pluralResolver.getSuffix(O, t.count, t));
|
|
@@ -2750,11 +2766,11 @@ class Xe extends Ze {
|
|
|
2750
2766
|
}
|
|
2751
2767
|
let v;
|
|
2752
2768
|
for (; v = R.pop(); )
|
|
2753
|
-
this.isValidLookup(
|
|
2769
|
+
this.isValidLookup(n) || (a = v, n = this.getResource(O, w, v, t));
|
|
2754
2770
|
}));
|
|
2755
2771
|
});
|
|
2756
2772
|
}), {
|
|
2757
|
-
res:
|
|
2773
|
+
res: n,
|
|
2758
2774
|
usedKey: s,
|
|
2759
2775
|
exactUsedKey: a,
|
|
2760
2776
|
usedLng: o,
|
|
@@ -2764,17 +2780,17 @@ class Xe extends Ze {
|
|
|
2764
2780
|
isValidLookup(e) {
|
|
2765
2781
|
return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
|
|
2766
2782
|
}
|
|
2767
|
-
getResource(e, t,
|
|
2783
|
+
getResource(e, t, n, s = {}) {
|
|
2768
2784
|
var a;
|
|
2769
|
-
return (a = this.i18nFormat) != null && a.getResource ? this.i18nFormat.getResource(e, t,
|
|
2785
|
+
return (a = this.i18nFormat) != null && a.getResource ? this.i18nFormat.getResource(e, t, n, s) : this.resourceStore.getResource(e, t, n, s);
|
|
2770
2786
|
}
|
|
2771
2787
|
getUsedParamsDetails(e = {}) {
|
|
2772
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"],
|
|
2773
|
-
let s =
|
|
2774
|
-
if (
|
|
2788
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !H(e.replace);
|
|
2789
|
+
let s = n ? e.replace : e;
|
|
2790
|
+
if (n && typeof e.count < "u" && (s.count = e.count), this.options.interpolation.defaultVariables && (s = {
|
|
2775
2791
|
...this.options.interpolation.defaultVariables,
|
|
2776
2792
|
...s
|
|
2777
|
-
}), !
|
|
2793
|
+
}), !n) {
|
|
2778
2794
|
s = {
|
|
2779
2795
|
...s
|
|
2780
2796
|
};
|
|
@@ -2785,8 +2801,8 @@ class Xe extends Ze {
|
|
|
2785
2801
|
}
|
|
2786
2802
|
static hasDefaultValue(e) {
|
|
2787
2803
|
const t = "defaultValue";
|
|
2788
|
-
for (const
|
|
2789
|
-
if (Object.prototype.hasOwnProperty.call(e,
|
|
2804
|
+
for (const n in e)
|
|
2805
|
+
if (Object.prototype.hasOwnProperty.call(e, n) && t === n.substring(0, t.length) && e[n] !== void 0)
|
|
2790
2806
|
return !0;
|
|
2791
2807
|
return !1;
|
|
2792
2808
|
}
|
|
@@ -2796,12 +2812,12 @@ class Gt {
|
|
|
2796
2812
|
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = he.create("languageUtils");
|
|
2797
2813
|
}
|
|
2798
2814
|
getScriptPartFromCode(e) {
|
|
2799
|
-
if (e =
|
|
2815
|
+
if (e = je(e), !e || e.indexOf("-") < 0) return null;
|
|
2800
2816
|
const t = e.split("-");
|
|
2801
2817
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
2802
2818
|
}
|
|
2803
2819
|
getLanguagePartFromCode(e) {
|
|
2804
|
-
if (e =
|
|
2820
|
+
if (e = je(e), !e || e.indexOf("-") < 0) return e;
|
|
2805
2821
|
const t = e.split("-");
|
|
2806
2822
|
return this.formatLanguageCode(t[0]);
|
|
2807
2823
|
}
|
|
@@ -2822,15 +2838,15 @@ class Gt {
|
|
|
2822
2838
|
getBestMatchFromCodes(e) {
|
|
2823
2839
|
if (!e) return null;
|
|
2824
2840
|
let t;
|
|
2825
|
-
return e.forEach((
|
|
2841
|
+
return e.forEach((n) => {
|
|
2826
2842
|
if (t) return;
|
|
2827
|
-
const s = this.formatLanguageCode(
|
|
2843
|
+
const s = this.formatLanguageCode(n);
|
|
2828
2844
|
(!this.options.supportedLngs || this.isSupportedCode(s)) && (t = s);
|
|
2829
|
-
}), !t && this.options.supportedLngs && e.forEach((
|
|
2845
|
+
}), !t && this.options.supportedLngs && e.forEach((n) => {
|
|
2830
2846
|
if (t) return;
|
|
2831
|
-
const s = this.getScriptPartFromCode(
|
|
2847
|
+
const s = this.getScriptPartFromCode(n);
|
|
2832
2848
|
if (this.isSupportedCode(s)) return t = s;
|
|
2833
|
-
const a = this.getLanguagePartFromCode(
|
|
2849
|
+
const a = this.getLanguagePartFromCode(n);
|
|
2834
2850
|
if (this.isSupportedCode(a)) return t = a;
|
|
2835
2851
|
t = this.options.supportedLngs.find((o) => {
|
|
2836
2852
|
if (o === a) return o;
|
|
@@ -2843,14 +2859,14 @@ class Gt {
|
|
|
2843
2859
|
if (!e) return [];
|
|
2844
2860
|
if (typeof e == "function" && (e = e(t)), H(e) && (e = [e]), Array.isArray(e)) return e;
|
|
2845
2861
|
if (!t) return e.default || [];
|
|
2846
|
-
let
|
|
2847
|
-
return
|
|
2862
|
+
let n = e[t];
|
|
2863
|
+
return n || (n = e[this.getScriptPartFromCode(t)]), n || (n = e[this.formatLanguageCode(t)]), n || (n = e[this.getLanguagePartFromCode(t)]), n || (n = e.default), n || [];
|
|
2848
2864
|
}
|
|
2849
2865
|
toResolveHierarchy(e, t) {
|
|
2850
|
-
const
|
|
2866
|
+
const n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), s = [], a = (o) => {
|
|
2851
2867
|
o && (this.isSupportedCode(o) ? s.push(o) : this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`));
|
|
2852
2868
|
};
|
|
2853
|
-
return H(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : H(e) && a(this.formatLanguageCode(e)),
|
|
2869
|
+
return H(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : H(e) && a(this.formatLanguageCode(e)), n.forEach((o) => {
|
|
2854
2870
|
s.indexOf(o) < 0 && a(this.formatLanguageCode(o));
|
|
2855
2871
|
}), s;
|
|
2856
2872
|
}
|
|
@@ -2863,7 +2879,7 @@ const zt = {
|
|
|
2863
2879
|
many: 4,
|
|
2864
2880
|
other: 5
|
|
2865
2881
|
}, Jt = {
|
|
2866
|
-
select: (
|
|
2882
|
+
select: (r) => r === 1 ? "one" : "other",
|
|
2867
2883
|
resolvedOptions: () => ({
|
|
2868
2884
|
pluralCategories: ["one", "other"]
|
|
2869
2885
|
})
|
|
@@ -2879,15 +2895,15 @@ class wn {
|
|
|
2879
2895
|
this.pluralRulesCache = {};
|
|
2880
2896
|
}
|
|
2881
2897
|
getRule(e, t = {}) {
|
|
2882
|
-
const
|
|
2883
|
-
cleanedCode:
|
|
2898
|
+
const n = je(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", a = JSON.stringify({
|
|
2899
|
+
cleanedCode: n,
|
|
2884
2900
|
type: s
|
|
2885
2901
|
});
|
|
2886
2902
|
if (a in this.pluralRulesCache)
|
|
2887
2903
|
return this.pluralRulesCache[a];
|
|
2888
2904
|
let o;
|
|
2889
2905
|
try {
|
|
2890
|
-
o = new Intl.PluralRules(
|
|
2906
|
+
o = new Intl.PluralRules(n, {
|
|
2891
2907
|
type: s
|
|
2892
2908
|
});
|
|
2893
2909
|
} catch {
|
|
@@ -2900,29 +2916,29 @@ class wn {
|
|
|
2900
2916
|
return this.pluralRulesCache[a] = o, o;
|
|
2901
2917
|
}
|
|
2902
2918
|
needsPlural(e, t = {}) {
|
|
2903
|
-
let
|
|
2904
|
-
return
|
|
2919
|
+
let n = this.getRule(e, t);
|
|
2920
|
+
return n || (n = this.getRule("dev", t)), (n == null ? void 0 : n.resolvedOptions().pluralCategories.length) > 1;
|
|
2905
2921
|
}
|
|
2906
|
-
getPluralFormsOfKey(e, t,
|
|
2907
|
-
return this.getSuffixes(e,
|
|
2922
|
+
getPluralFormsOfKey(e, t, n = {}) {
|
|
2923
|
+
return this.getSuffixes(e, n).map((s) => `${t}${s}`);
|
|
2908
2924
|
}
|
|
2909
2925
|
getSuffixes(e, t = {}) {
|
|
2910
|
-
let
|
|
2911
|
-
return
|
|
2926
|
+
let n = this.getRule(e, t);
|
|
2927
|
+
return n || (n = this.getRule("dev", t)), n ? n.resolvedOptions().pluralCategories.sort((s, a) => zt[s] - zt[a]).map((s) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${s}`) : [];
|
|
2912
2928
|
}
|
|
2913
|
-
getSuffix(e, t,
|
|
2914
|
-
const s = this.getRule(e,
|
|
2915
|
-
return s ? `${this.options.prepend}${
|
|
2929
|
+
getSuffix(e, t, n = {}) {
|
|
2930
|
+
const s = this.getRule(e, n);
|
|
2931
|
+
return s ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${s.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
|
|
2916
2932
|
}
|
|
2917
2933
|
}
|
|
2918
|
-
const Xt = (
|
|
2919
|
-
let a = hn(
|
|
2920
|
-
return !a && s && H(t) && (a = dt(
|
|
2921
|
-
}, lt = (
|
|
2934
|
+
const Xt = (r, e, t, n = ".", s = !0) => {
|
|
2935
|
+
let a = hn(r, e, t);
|
|
2936
|
+
return !a && s && H(t) && (a = dt(r, t, n), a === void 0 && (a = dt(e, t, n))), a;
|
|
2937
|
+
}, lt = (r) => r.replace(/\$/g, "$$$$");
|
|
2922
2938
|
class En {
|
|
2923
2939
|
constructor(e = {}) {
|
|
2924
2940
|
var t;
|
|
2925
|
-
this.logger = he.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((
|
|
2941
|
+
this.logger = he.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((n) => n), this.init(e);
|
|
2926
2942
|
}
|
|
2927
2943
|
init(e = {}) {
|
|
2928
2944
|
e.interpolation || (e.interpolation = {
|
|
@@ -2930,7 +2946,7 @@ class En {
|
|
|
2930
2946
|
});
|
|
2931
2947
|
const {
|
|
2932
2948
|
escape: t,
|
|
2933
|
-
escapeValue:
|
|
2949
|
+
escapeValue: n,
|
|
2934
2950
|
useRawValueToEscape: s,
|
|
2935
2951
|
prefix: a,
|
|
2936
2952
|
prefixEscaped: o,
|
|
@@ -2943,36 +2959,36 @@ class En {
|
|
|
2943
2959
|
nestingPrefixEscaped: g,
|
|
2944
2960
|
nestingSuffix: h,
|
|
2945
2961
|
nestingSuffixEscaped: y,
|
|
2946
|
-
nestingOptionsSeparator:
|
|
2962
|
+
nestingOptionsSeparator: w,
|
|
2947
2963
|
maxReplaces: E,
|
|
2948
2964
|
alwaysFormat: b
|
|
2949
2965
|
} = e.interpolation;
|
|
2950
|
-
this.escape = t !== void 0 ? t : mn, this.escapeValue =
|
|
2966
|
+
this.escape = t !== void 0 ? t : mn, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? Ee(a) : o || "{{", this.suffix = i ? Ee(i) : l || "}}", this.formatSeparator = c || ",", this.unescapePrefix = u ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : u || "", this.nestingPrefix = p ? Ee(p) : g || Ee("$t("), this.nestingSuffix = h ? Ee(h) : y || Ee(")"), this.nestingOptionsSeparator = w || ",", this.maxReplaces = E || 1e3, this.alwaysFormat = b !== void 0 ? b : !1, this.resetRegExp();
|
|
2951
2967
|
}
|
|
2952
2968
|
reset() {
|
|
2953
2969
|
this.options && this.init(this.options);
|
|
2954
2970
|
}
|
|
2955
2971
|
resetRegExp() {
|
|
2956
|
-
const e = (t,
|
|
2972
|
+
const e = (t, n) => (t == null ? void 0 : t.source) === n ? (t.lastIndex = 0, t) : new RegExp(n, "g");
|
|
2957
2973
|
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
|
|
2958
2974
|
}
|
|
2959
|
-
interpolate(e, t,
|
|
2975
|
+
interpolate(e, t, n, s) {
|
|
2960
2976
|
var g;
|
|
2961
2977
|
let a, o, i;
|
|
2962
2978
|
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (h) => {
|
|
2963
2979
|
if (h.indexOf(this.formatSeparator) < 0) {
|
|
2964
2980
|
const b = Xt(t, l, h, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
2965
|
-
return this.alwaysFormat ? this.format(b, void 0,
|
|
2981
|
+
return this.alwaysFormat ? this.format(b, void 0, n, {
|
|
2966
2982
|
...s,
|
|
2967
2983
|
...t,
|
|
2968
2984
|
interpolationkey: h
|
|
2969
2985
|
}) : b;
|
|
2970
2986
|
}
|
|
2971
|
-
const y = h.split(this.formatSeparator),
|
|
2972
|
-
return this.format(Xt(t, l,
|
|
2987
|
+
const y = h.split(this.formatSeparator), w = y.shift().trim(), E = y.join(this.formatSeparator).trim();
|
|
2988
|
+
return this.format(Xt(t, l, w, this.options.keySeparator, this.options.ignoreJSONStructure), E, n, {
|
|
2973
2989
|
...s,
|
|
2974
2990
|
...t,
|
|
2975
|
-
interpolationkey:
|
|
2991
|
+
interpolationkey: w
|
|
2976
2992
|
});
|
|
2977
2993
|
};
|
|
2978
2994
|
this.resetRegExp();
|
|
@@ -2998,13 +3014,13 @@ class En {
|
|
|
2998
3014
|
} else
|
|
2999
3015
|
this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`), o = "";
|
|
3000
3016
|
else !H(o) && !this.useRawValueToEscape && (o = Yt(o));
|
|
3001
|
-
const
|
|
3002
|
-
if (e = e.replace(a[0],
|
|
3017
|
+
const w = h.safeValue(o);
|
|
3018
|
+
if (e = e.replace(a[0], w), f ? (h.regex.lastIndex += o.length, h.regex.lastIndex -= a[0].length) : h.regex.lastIndex = 0, i++, i >= this.maxReplaces)
|
|
3003
3019
|
break;
|
|
3004
3020
|
}
|
|
3005
3021
|
}), e;
|
|
3006
3022
|
}
|
|
3007
|
-
nest(e, t,
|
|
3023
|
+
nest(e, t, n = {}) {
|
|
3008
3024
|
let s, a, o;
|
|
3009
3025
|
const i = (l, c) => {
|
|
3010
3026
|
const u = this.nestingOptionsSeparator;
|
|
@@ -3027,7 +3043,7 @@ class En {
|
|
|
3027
3043
|
for (; s = this.nestingRegexp.exec(e); ) {
|
|
3028
3044
|
let l = [];
|
|
3029
3045
|
o = {
|
|
3030
|
-
...
|
|
3046
|
+
...n
|
|
3031
3047
|
}, o = o.replace && !H(o.replace) ? o.replace : o, o.applyPostProcessor = !1, delete o.defaultValue;
|
|
3032
3048
|
let c = !1;
|
|
3033
3049
|
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
@@ -3035,21 +3051,21 @@ class En {
|
|
|
3035
3051
|
s[1] = u.shift(), l = u, c = !0;
|
|
3036
3052
|
}
|
|
3037
3053
|
if (a = t(i.call(this, s[1].trim(), o), o), a && s[0] === e && !H(a)) return a;
|
|
3038
|
-
H(a) || (a = Yt(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), c && (a = l.reduce((u, f) => this.format(u, f,
|
|
3039
|
-
...
|
|
3054
|
+
H(a) || (a = Yt(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), c && (a = l.reduce((u, f) => this.format(u, f, n.lng, {
|
|
3055
|
+
...n,
|
|
3040
3056
|
interpolationkey: s[1].trim()
|
|
3041
3057
|
}), a.trim())), e = e.replace(s[0], a), this.regexp.lastIndex = 0;
|
|
3042
3058
|
}
|
|
3043
3059
|
return e;
|
|
3044
3060
|
}
|
|
3045
3061
|
}
|
|
3046
|
-
const Tn = (
|
|
3047
|
-
let e =
|
|
3062
|
+
const Tn = (r) => {
|
|
3063
|
+
let e = r.toLowerCase().trim();
|
|
3048
3064
|
const t = {};
|
|
3049
|
-
if (
|
|
3050
|
-
const
|
|
3051
|
-
e =
|
|
3052
|
-
const s =
|
|
3065
|
+
if (r.indexOf("(") > -1) {
|
|
3066
|
+
const n = r.split("(");
|
|
3067
|
+
e = n[0].toLowerCase().trim();
|
|
3068
|
+
const s = n[1].substring(0, n[1].length - 1);
|
|
3053
3069
|
e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((o) => {
|
|
3054
3070
|
if (o) {
|
|
3055
3071
|
const [i, ...l] = o.split(":"), c = l.join(":").trim().replace(/^'+|'+$/g, ""), u = i.trim();
|
|
@@ -3061,19 +3077,19 @@ const Tn = (n) => {
|
|
|
3061
3077
|
formatName: e,
|
|
3062
3078
|
formatOptions: t
|
|
3063
3079
|
};
|
|
3064
|
-
}, Zt = (
|
|
3080
|
+
}, Zt = (r) => {
|
|
3065
3081
|
const e = {};
|
|
3066
|
-
return (t,
|
|
3082
|
+
return (t, n, s) => {
|
|
3067
3083
|
let a = s;
|
|
3068
3084
|
s && s.interpolationkey && s.formatParams && s.formatParams[s.interpolationkey] && s[s.interpolationkey] && (a = {
|
|
3069
3085
|
...a,
|
|
3070
3086
|
[s.interpolationkey]: void 0
|
|
3071
3087
|
});
|
|
3072
|
-
const o =
|
|
3088
|
+
const o = n + JSON.stringify(a);
|
|
3073
3089
|
let i = e[o];
|
|
3074
|
-
return i || (i =
|
|
3090
|
+
return i || (i = r(je(n), s), e[o] = i), i(t);
|
|
3075
3091
|
};
|
|
3076
|
-
}, On = (
|
|
3092
|
+
}, On = (r) => (e, t, n) => r(je(t), n)(e);
|
|
3077
3093
|
class Rn {
|
|
3078
3094
|
constructor(e = {}) {
|
|
3079
3095
|
this.logger = he.create("formatter"), this.options = e, this.init(e);
|
|
@@ -3082,34 +3098,34 @@ class Rn {
|
|
|
3082
3098
|
interpolation: {}
|
|
3083
3099
|
}) {
|
|
3084
3100
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
3085
|
-
const
|
|
3101
|
+
const n = t.cacheInBuiltFormats ? Zt : On;
|
|
3086
3102
|
this.formats = {
|
|
3087
|
-
number:
|
|
3103
|
+
number: n((s, a) => {
|
|
3088
3104
|
const o = new Intl.NumberFormat(s, {
|
|
3089
3105
|
...a
|
|
3090
3106
|
});
|
|
3091
3107
|
return (i) => o.format(i);
|
|
3092
3108
|
}),
|
|
3093
|
-
currency:
|
|
3109
|
+
currency: n((s, a) => {
|
|
3094
3110
|
const o = new Intl.NumberFormat(s, {
|
|
3095
3111
|
...a,
|
|
3096
3112
|
style: "currency"
|
|
3097
3113
|
});
|
|
3098
3114
|
return (i) => o.format(i);
|
|
3099
3115
|
}),
|
|
3100
|
-
datetime:
|
|
3116
|
+
datetime: n((s, a) => {
|
|
3101
3117
|
const o = new Intl.DateTimeFormat(s, {
|
|
3102
3118
|
...a
|
|
3103
3119
|
});
|
|
3104
3120
|
return (i) => o.format(i);
|
|
3105
3121
|
}),
|
|
3106
|
-
relativetime:
|
|
3122
|
+
relativetime: n((s, a) => {
|
|
3107
3123
|
const o = new Intl.RelativeTimeFormat(s, {
|
|
3108
3124
|
...a
|
|
3109
3125
|
});
|
|
3110
3126
|
return (i) => o.format(i, a.range || "day");
|
|
3111
3127
|
}),
|
|
3112
|
-
list:
|
|
3128
|
+
list: n((s, a) => {
|
|
3113
3129
|
const o = new Intl.ListFormat(s, {
|
|
3114
3130
|
...a
|
|
3115
3131
|
});
|
|
@@ -3123,7 +3139,7 @@ class Rn {
|
|
|
3123
3139
|
addCached(e, t) {
|
|
3124
3140
|
this.formats[e.toLowerCase().trim()] = Zt(t);
|
|
3125
3141
|
}
|
|
3126
|
-
format(e, t,
|
|
3142
|
+
format(e, t, n, s = {}) {
|
|
3127
3143
|
const a = t.split(this.formatSeparator);
|
|
3128
3144
|
if (a.length > 1 && a[0].indexOf("(") > 1 && a[0].indexOf(")") < 0 && a.find((i) => i.indexOf(")") > -1)) {
|
|
3129
3145
|
const i = a.findIndex((l) => l.indexOf(")") > -1);
|
|
@@ -3138,7 +3154,7 @@ class Rn {
|
|
|
3138
3154
|
if (this.formats[c]) {
|
|
3139
3155
|
let p = i;
|
|
3140
3156
|
try {
|
|
3141
|
-
const g = ((f = s == null ? void 0 : s.formatParams) == null ? void 0 : f[s.interpolationkey]) || {}, h = g.locale || g.lng || s.locale || s.lng ||
|
|
3157
|
+
const g = ((f = s == null ? void 0 : s.formatParams) == null ? void 0 : f[s.interpolationkey]) || {}, h = g.locale || g.lng || s.locale || s.lng || n;
|
|
3142
3158
|
p = this.formats[c](i, h, {
|
|
3143
3159
|
...u,
|
|
3144
3160
|
...s,
|
|
@@ -3154,21 +3170,21 @@ class Rn {
|
|
|
3154
3170
|
}, e);
|
|
3155
3171
|
}
|
|
3156
3172
|
}
|
|
3157
|
-
const Dn = (
|
|
3158
|
-
|
|
3173
|
+
const Dn = (r, e) => {
|
|
3174
|
+
r.pending[e] !== void 0 && (delete r.pending[e], r.pendingCount--);
|
|
3159
3175
|
};
|
|
3160
3176
|
class Pn extends Ze {
|
|
3161
|
-
constructor(e, t,
|
|
3177
|
+
constructor(e, t, n, s = {}) {
|
|
3162
3178
|
var a, o;
|
|
3163
|
-
super(), this.backend = e, this.store = t, this.services =
|
|
3179
|
+
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = s, this.logger = he.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], (o = (a = this.backend) == null ? void 0 : a.init) == null || o.call(a, n, s.backend, s);
|
|
3164
3180
|
}
|
|
3165
|
-
queueLoad(e, t,
|
|
3181
|
+
queueLoad(e, t, n, s) {
|
|
3166
3182
|
const a = {}, o = {}, i = {}, l = {};
|
|
3167
3183
|
return e.forEach((c) => {
|
|
3168
3184
|
let u = !0;
|
|
3169
3185
|
t.forEach((f) => {
|
|
3170
3186
|
const p = `${c}|${f}`;
|
|
3171
|
-
!
|
|
3187
|
+
!n.reload && this.store.hasResourceBundle(c, f) ? this.state[p] = 2 : this.state[p] < 0 || (this.state[p] === 1 ? o[p] === void 0 && (o[p] = !0) : (this.state[p] = 1, u = !1, o[p] === void 0 && (o[p] = !0), a[p] === void 0 && (a[p] = !0), l[f] === void 0 && (l[f] = !0)));
|
|
3172
3188
|
}), u || (i[c] = !0);
|
|
3173
3189
|
}), (Object.keys(a).length || Object.keys(o).length) && this.queue.push({
|
|
3174
3190
|
pending: o,
|
|
@@ -3183,11 +3199,11 @@ class Pn extends Ze {
|
|
|
3183
3199
|
toLoadNamespaces: Object.keys(l)
|
|
3184
3200
|
};
|
|
3185
3201
|
}
|
|
3186
|
-
loaded(e, t,
|
|
3202
|
+
loaded(e, t, n) {
|
|
3187
3203
|
const s = e.split("|"), a = s[0], o = s[1];
|
|
3188
|
-
t && this.emit("failedLoading", a, o, t), !t &&
|
|
3204
|
+
t && this.emit("failedLoading", a, o, t), !t && n && this.store.addResourceBundle(a, o, n, void 0, void 0, {
|
|
3189
3205
|
skipCopy: !0
|
|
3190
|
-
}), this.state[e] = t ? -1 : 2, t &&
|
|
3206
|
+
}), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
3191
3207
|
const i = {};
|
|
3192
3208
|
this.queue.forEach((l) => {
|
|
3193
3209
|
pn(l.loaded, [a], o), Dn(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((c) => {
|
|
@@ -3199,13 +3215,13 @@ class Pn extends Ze {
|
|
|
3199
3215
|
}), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
|
|
3200
3216
|
}), this.emit("loaded", i), this.queue = this.queue.filter((l) => !l.done);
|
|
3201
3217
|
}
|
|
3202
|
-
read(e, t,
|
|
3218
|
+
read(e, t, n, s = 0, a = this.retryTimeout, o) {
|
|
3203
3219
|
if (!e.length) return o(null, {});
|
|
3204
3220
|
if (this.readingCalls >= this.maxParallelReads) {
|
|
3205
3221
|
this.waitingReads.push({
|
|
3206
3222
|
lng: e,
|
|
3207
3223
|
ns: t,
|
|
3208
|
-
fcName:
|
|
3224
|
+
fcName: n,
|
|
3209
3225
|
tried: s,
|
|
3210
3226
|
wait: a,
|
|
3211
3227
|
callback: o
|
|
@@ -3220,12 +3236,12 @@ class Pn extends Ze {
|
|
|
3220
3236
|
}
|
|
3221
3237
|
if (c && u && s < this.maxRetries) {
|
|
3222
3238
|
setTimeout(() => {
|
|
3223
|
-
this.read.call(this, e, t,
|
|
3239
|
+
this.read.call(this, e, t, n, s + 1, a * 2, o);
|
|
3224
3240
|
}, a);
|
|
3225
3241
|
return;
|
|
3226
3242
|
}
|
|
3227
3243
|
o(c, u);
|
|
3228
|
-
}, l = this.backend[
|
|
3244
|
+
}, l = this.backend[n].bind(this.backend);
|
|
3229
3245
|
if (l.length === 2) {
|
|
3230
3246
|
try {
|
|
3231
3247
|
const c = l(e, t);
|
|
@@ -3237,39 +3253,39 @@ class Pn extends Ze {
|
|
|
3237
3253
|
}
|
|
3238
3254
|
return l(e, t, i);
|
|
3239
3255
|
}
|
|
3240
|
-
prepareLoading(e, t,
|
|
3256
|
+
prepareLoading(e, t, n = {}, s) {
|
|
3241
3257
|
if (!this.backend)
|
|
3242
3258
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
3243
3259
|
H(e) && (e = this.languageUtils.toResolveHierarchy(e)), H(t) && (t = [t]);
|
|
3244
|
-
const a = this.queueLoad(e, t,
|
|
3260
|
+
const a = this.queueLoad(e, t, n, s);
|
|
3245
3261
|
if (!a.toLoad.length)
|
|
3246
3262
|
return a.pending.length || s(), null;
|
|
3247
3263
|
a.toLoad.forEach((o) => {
|
|
3248
3264
|
this.loadOne(o);
|
|
3249
3265
|
});
|
|
3250
3266
|
}
|
|
3251
|
-
load(e, t,
|
|
3252
|
-
this.prepareLoading(e, t, {},
|
|
3267
|
+
load(e, t, n) {
|
|
3268
|
+
this.prepareLoading(e, t, {}, n);
|
|
3253
3269
|
}
|
|
3254
|
-
reload(e, t,
|
|
3270
|
+
reload(e, t, n) {
|
|
3255
3271
|
this.prepareLoading(e, t, {
|
|
3256
3272
|
reload: !0
|
|
3257
|
-
},
|
|
3273
|
+
}, n);
|
|
3258
3274
|
}
|
|
3259
3275
|
loadOne(e, t = "") {
|
|
3260
|
-
const
|
|
3276
|
+
const n = e.split("|"), s = n[0], a = n[1];
|
|
3261
3277
|
this.read(s, a, "read", void 0, void 0, (o, i) => {
|
|
3262
3278
|
o && this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`, o), !o && i && this.logger.log(`${t}loaded namespace ${a} for language ${s}`, i), this.loaded(e, o, i);
|
|
3263
3279
|
});
|
|
3264
3280
|
}
|
|
3265
|
-
saveMissing(e, t,
|
|
3281
|
+
saveMissing(e, t, n, s, a, o = {}, i = () => {
|
|
3266
3282
|
}) {
|
|
3267
3283
|
var l, c, u, f, p;
|
|
3268
3284
|
if ((c = (l = this.services) == null ? void 0 : l.utils) != null && c.hasLoadedNamespace && !((f = (u = this.services) == null ? void 0 : u.utils) != null && f.hasLoadedNamespace(t))) {
|
|
3269
|
-
this.logger.warn(`did not save key "${
|
|
3285
|
+
this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
|
|
3270
3286
|
return;
|
|
3271
3287
|
}
|
|
3272
|
-
if (!(
|
|
3288
|
+
if (!(n == null || n === "")) {
|
|
3273
3289
|
if ((p = this.backend) != null && p.create) {
|
|
3274
3290
|
const g = {
|
|
3275
3291
|
...o,
|
|
@@ -3278,14 +3294,14 @@ class Pn extends Ze {
|
|
|
3278
3294
|
if (h.length < 6)
|
|
3279
3295
|
try {
|
|
3280
3296
|
let y;
|
|
3281
|
-
h.length === 5 ? y = h(e, t,
|
|
3297
|
+
h.length === 5 ? y = h(e, t, n, s, g) : y = h(e, t, n, s), y && typeof y.then == "function" ? y.then((w) => i(null, w)).catch(i) : i(null, y);
|
|
3282
3298
|
} catch (y) {
|
|
3283
3299
|
i(y);
|
|
3284
3300
|
}
|
|
3285
3301
|
else
|
|
3286
|
-
h(e, t,
|
|
3302
|
+
h(e, t, n, s, i, g);
|
|
3287
3303
|
}
|
|
3288
|
-
!e || !e[0] || this.store.addResource(e[0], t,
|
|
3304
|
+
!e || !e[0] || this.store.addResource(e[0], t, n, s);
|
|
3289
3305
|
}
|
|
3290
3306
|
}
|
|
3291
3307
|
}
|
|
@@ -3322,19 +3338,19 @@ const Qt = () => ({
|
|
|
3322
3338
|
parseMissingKeyHandler: !1,
|
|
3323
3339
|
appendNamespaceToMissingKey: !1,
|
|
3324
3340
|
appendNamespaceToCIMode: !1,
|
|
3325
|
-
overloadTranslationOptionHandler: (
|
|
3341
|
+
overloadTranslationOptionHandler: (r) => {
|
|
3326
3342
|
let e = {};
|
|
3327
|
-
if (typeof
|
|
3328
|
-
const t =
|
|
3329
|
-
Object.keys(t).forEach((
|
|
3330
|
-
e[
|
|
3343
|
+
if (typeof r[1] == "object" && (e = r[1]), H(r[1]) && (e.defaultValue = r[1]), H(r[2]) && (e.tDescription = r[2]), typeof r[2] == "object" || typeof r[3] == "object") {
|
|
3344
|
+
const t = r[3] || r[2];
|
|
3345
|
+
Object.keys(t).forEach((n) => {
|
|
3346
|
+
e[n] = t[n];
|
|
3331
3347
|
});
|
|
3332
3348
|
}
|
|
3333
3349
|
return e;
|
|
3334
3350
|
},
|
|
3335
3351
|
interpolation: {
|
|
3336
3352
|
escapeValue: !0,
|
|
3337
|
-
format: (
|
|
3353
|
+
format: (r) => r,
|
|
3338
3354
|
prefix: "{{",
|
|
3339
3355
|
suffix: "}}",
|
|
3340
3356
|
formatSeparator: ",",
|
|
@@ -3346,16 +3362,16 @@ const Qt = () => ({
|
|
|
3346
3362
|
skipOnVariables: !0
|
|
3347
3363
|
},
|
|
3348
3364
|
cacheInBuiltFormats: !0
|
|
3349
|
-
}), er = (
|
|
3365
|
+
}), er = (r) => {
|
|
3350
3366
|
var e, t;
|
|
3351
|
-
return H(
|
|
3352
|
-
},
|
|
3353
|
-
}, An = (
|
|
3354
|
-
Object.getOwnPropertyNames(Object.getPrototypeOf(
|
|
3355
|
-
typeof
|
|
3367
|
+
return H(r.ns) && (r.ns = [r.ns]), H(r.fallbackLng) && (r.fallbackLng = [r.fallbackLng]), H(r.fallbackNS) && (r.fallbackNS = [r.fallbackNS]), ((t = (e = r.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (r.supportedLngs = r.supportedLngs.concat(["cimode"])), typeof r.initImmediate == "boolean" && (r.initAsync = r.initImmediate), r;
|
|
3368
|
+
}, Ye = () => {
|
|
3369
|
+
}, An = (r) => {
|
|
3370
|
+
Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((t) => {
|
|
3371
|
+
typeof r[t] == "function" && (r[t] = r[t].bind(r));
|
|
3356
3372
|
});
|
|
3357
3373
|
};
|
|
3358
|
-
class
|
|
3374
|
+
class Le extends Ze {
|
|
3359
3375
|
constructor(e = {}, t) {
|
|
3360
3376
|
if (super(), this.options = er(e), this.services = {}, this.logger = he, this.modules = {
|
|
3361
3377
|
external: []
|
|
@@ -3369,13 +3385,13 @@ class je extends Ze {
|
|
|
3369
3385
|
}
|
|
3370
3386
|
init(e = {}, t) {
|
|
3371
3387
|
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (H(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
3372
|
-
const
|
|
3388
|
+
const n = Qt();
|
|
3373
3389
|
this.options = {
|
|
3374
|
-
...
|
|
3390
|
+
...n,
|
|
3375
3391
|
...this.options,
|
|
3376
3392
|
...er(e)
|
|
3377
3393
|
}, this.options.interpolation = {
|
|
3378
|
-
...
|
|
3394
|
+
...n.interpolation,
|
|
3379
3395
|
...this.options.interpolation
|
|
3380
3396
|
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator);
|
|
3381
3397
|
const s = (c) => c ? typeof c == "function" ? new c() : c : null;
|
|
@@ -3389,7 +3405,7 @@ class je extends Ze {
|
|
|
3389
3405
|
f.logger = he, f.resourceStore = this.store, f.languageUtils = u, f.pluralResolver = new wn(u, {
|
|
3390
3406
|
prepend: this.options.pluralSeparator,
|
|
3391
3407
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
3392
|
-
}), c && (!this.options.interpolation.format || this.options.interpolation.format ===
|
|
3408
|
+
}), c && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (f.formatter = s(c), f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new En(this.options), f.utils = {
|
|
3393
3409
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
3394
3410
|
}, f.backendConnector = new Pn(s(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", (p, ...g) => {
|
|
3395
3411
|
this.emit(p, ...g);
|
|
@@ -3399,7 +3415,7 @@ class je extends Ze {
|
|
|
3399
3415
|
p.init && p.init(this);
|
|
3400
3416
|
});
|
|
3401
3417
|
}
|
|
3402
|
-
if (this.format = this.options.interpolation.format, t || (t =
|
|
3418
|
+
if (this.format = this.options.interpolation.format, t || (t = Ye), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
3403
3419
|
const c = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
3404
3420
|
c.length > 0 && c[0] !== "dev" && (this.options.lng = c[0]);
|
|
3405
3421
|
}
|
|
@@ -3408,7 +3424,7 @@ class je extends Ze {
|
|
|
3408
3424
|
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((c) => {
|
|
3409
3425
|
this[c] = (...u) => (this.store[c](...u), this);
|
|
3410
3426
|
});
|
|
3411
|
-
const i =
|
|
3427
|
+
const i = Ae(), l = () => {
|
|
3412
3428
|
const c = (u, f) => {
|
|
3413
3429
|
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(f), t(u, f);
|
|
3414
3430
|
};
|
|
@@ -3417,12 +3433,12 @@ class je extends Ze {
|
|
|
3417
3433
|
};
|
|
3418
3434
|
return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0), i;
|
|
3419
3435
|
}
|
|
3420
|
-
loadResources(e, t =
|
|
3436
|
+
loadResources(e, t = Ye) {
|
|
3421
3437
|
var a, o;
|
|
3422
|
-
let
|
|
3438
|
+
let n = t;
|
|
3423
3439
|
const s = H(e) ? e : this.language;
|
|
3424
|
-
if (typeof e == "function" && (
|
|
3425
|
-
if ((s == null ? void 0 : s.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return
|
|
3440
|
+
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
3441
|
+
if ((s == null ? void 0 : s.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
3426
3442
|
const i = [], l = (c) => {
|
|
3427
3443
|
if (!c || c === "cimode") return;
|
|
3428
3444
|
this.services.languageUtils.toResolveHierarchy(c).forEach((f) => {
|
|
@@ -3430,15 +3446,15 @@ class je extends Ze {
|
|
|
3430
3446
|
});
|
|
3431
3447
|
};
|
|
3432
3448
|
s ? l(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((u) => l(u)), (o = (a = this.options.preload) == null ? void 0 : a.forEach) == null || o.call(a, (c) => l(c)), this.services.backendConnector.load(i, this.options.ns, (c) => {
|
|
3433
|
-
!c && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language),
|
|
3449
|
+
!c && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(c);
|
|
3434
3450
|
});
|
|
3435
3451
|
} else
|
|
3436
|
-
|
|
3452
|
+
n(null);
|
|
3437
3453
|
}
|
|
3438
|
-
reloadResources(e, t,
|
|
3439
|
-
const s =
|
|
3440
|
-
return typeof e == "function" && (
|
|
3441
|
-
s.resolve(),
|
|
3454
|
+
reloadResources(e, t, n) {
|
|
3455
|
+
const s = Ae();
|
|
3456
|
+
return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), n || (n = Ye), this.services.backendConnector.reload(e, t, (a) => {
|
|
3457
|
+
s.resolve(), n(a);
|
|
3442
3458
|
}), s;
|
|
3443
3459
|
}
|
|
3444
3460
|
use(e) {
|
|
@@ -3449,9 +3465,9 @@ class je extends Ze {
|
|
|
3449
3465
|
setResolvedLanguage(e) {
|
|
3450
3466
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
3451
3467
|
for (let t = 0; t < this.languages.length; t++) {
|
|
3452
|
-
const
|
|
3453
|
-
if (!(["cimode", "dev"].indexOf(
|
|
3454
|
-
this.resolvedLanguage =
|
|
3468
|
+
const n = this.languages[t];
|
|
3469
|
+
if (!(["cimode", "dev"].indexOf(n) > -1) && this.store.hasLanguageSomeTranslations(n)) {
|
|
3470
|
+
this.resolvedLanguage = n;
|
|
3455
3471
|
break;
|
|
3456
3472
|
}
|
|
3457
3473
|
}
|
|
@@ -3460,12 +3476,12 @@ class je extends Ze {
|
|
|
3460
3476
|
}
|
|
3461
3477
|
changeLanguage(e, t) {
|
|
3462
3478
|
this.isLanguageChangingTo = e;
|
|
3463
|
-
const
|
|
3479
|
+
const n = Ae();
|
|
3464
3480
|
this.emit("languageChanging", e);
|
|
3465
3481
|
const s = (i) => {
|
|
3466
3482
|
this.language = i, this.languages = this.services.languageUtils.toResolveHierarchy(i), this.resolvedLanguage = void 0, this.setResolvedLanguage(i);
|
|
3467
3483
|
}, a = (i, l) => {
|
|
3468
|
-
l ? this.isLanguageChangingTo === e && (s(l), this.translator.changeLanguage(l), this.isLanguageChangingTo = void 0, this.emit("languageChanged", l), this.logger.log("languageChanged", l)) : this.isLanguageChangingTo = void 0,
|
|
3484
|
+
l ? this.isLanguageChangingTo === e && (s(l), this.translator.changeLanguage(l), this.isLanguageChangingTo = void 0, this.emit("languageChanged", l), this.logger.log("languageChanged", l)) : this.isLanguageChangingTo = void 0, n.resolve((...c) => this.t(...c)), t && t(i, (...c) => this.t(...c));
|
|
3469
3485
|
}, o = (i) => {
|
|
3470
3486
|
var u, f;
|
|
3471
3487
|
!e && !i && this.services.languageDetector && (i = []);
|
|
@@ -3474,19 +3490,19 @@ class je extends Ze {
|
|
|
3474
3490
|
a(p, c);
|
|
3475
3491
|
});
|
|
3476
3492
|
};
|
|
3477
|
-
return !e && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(e),
|
|
3493
|
+
return !e && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(e), n;
|
|
3478
3494
|
}
|
|
3479
|
-
getFixedT(e, t,
|
|
3495
|
+
getFixedT(e, t, n) {
|
|
3480
3496
|
const s = (a, o, ...i) => {
|
|
3481
3497
|
let l;
|
|
3482
3498
|
typeof o != "object" ? l = this.options.overloadTranslationOptionHandler([a, o].concat(i)) : l = {
|
|
3483
3499
|
...o
|
|
3484
|
-
}, l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix ||
|
|
3500
|
+
}, l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || n || s.keyPrefix);
|
|
3485
3501
|
const c = this.options.keySeparator || ".";
|
|
3486
3502
|
let u;
|
|
3487
3503
|
return l.keyPrefix && Array.isArray(a) ? u = a.map((f) => `${l.keyPrefix}${c}${f}`) : u = l.keyPrefix ? `${l.keyPrefix}${c}${a}` : a, this.t(u, l);
|
|
3488
3504
|
};
|
|
3489
|
-
return H(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix =
|
|
3505
|
+
return H(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = n, s;
|
|
3490
3506
|
}
|
|
3491
3507
|
t(...e) {
|
|
3492
3508
|
var t;
|
|
@@ -3504,8 +3520,8 @@ class je extends Ze {
|
|
|
3504
3520
|
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
3505
3521
|
if (!this.languages || !this.languages.length)
|
|
3506
3522
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
3507
|
-
const
|
|
3508
|
-
if (
|
|
3523
|
+
const n = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, a = this.languages[this.languages.length - 1];
|
|
3524
|
+
if (n.toLowerCase() === "cimode") return !0;
|
|
3509
3525
|
const o = (i, l) => {
|
|
3510
3526
|
const c = this.services.backendConnector.state[`${i}|${l}`];
|
|
3511
3527
|
return c === -1 || c === 0 || c === 2;
|
|
@@ -3514,48 +3530,48 @@ class je extends Ze {
|
|
|
3514
3530
|
const i = t.precheck(this, o);
|
|
3515
3531
|
if (i !== void 0) return i;
|
|
3516
3532
|
}
|
|
3517
|
-
return !!(this.hasResourceBundle(
|
|
3533
|
+
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || o(n, e) && (!s || o(a, e)));
|
|
3518
3534
|
}
|
|
3519
3535
|
loadNamespaces(e, t) {
|
|
3520
|
-
const
|
|
3536
|
+
const n = Ae();
|
|
3521
3537
|
return this.options.ns ? (H(e) && (e = [e]), e.forEach((s) => {
|
|
3522
3538
|
this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
|
|
3523
3539
|
}), this.loadResources((s) => {
|
|
3524
|
-
|
|
3525
|
-
}),
|
|
3540
|
+
n.resolve(), t && t(s);
|
|
3541
|
+
}), n) : (t && t(), Promise.resolve());
|
|
3526
3542
|
}
|
|
3527
3543
|
loadLanguages(e, t) {
|
|
3528
|
-
const
|
|
3544
|
+
const n = Ae();
|
|
3529
3545
|
H(e) && (e = [e]);
|
|
3530
3546
|
const s = this.options.preload || [], a = e.filter((o) => s.indexOf(o) < 0 && this.services.languageUtils.isSupportedCode(o));
|
|
3531
3547
|
return a.length ? (this.options.preload = s.concat(a), this.loadResources((o) => {
|
|
3532
|
-
|
|
3533
|
-
}),
|
|
3548
|
+
n.resolve(), t && t(o);
|
|
3549
|
+
}), n) : (t && t(), Promise.resolve());
|
|
3534
3550
|
}
|
|
3535
3551
|
dir(e) {
|
|
3536
3552
|
var s, a;
|
|
3537
3553
|
if (e || (e = this.resolvedLanguage || (((s = this.languages) == null ? void 0 : s.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
|
|
3538
|
-
const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"],
|
|
3539
|
-
return t.indexOf(
|
|
3554
|
+
const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], n = ((a = this.services) == null ? void 0 : a.languageUtils) || new Gt(Qt());
|
|
3555
|
+
return t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
3540
3556
|
}
|
|
3541
3557
|
static createInstance(e = {}, t) {
|
|
3542
|
-
return new
|
|
3558
|
+
return new Le(e, t);
|
|
3543
3559
|
}
|
|
3544
|
-
cloneInstance(e = {}, t =
|
|
3545
|
-
const
|
|
3546
|
-
|
|
3560
|
+
cloneInstance(e = {}, t = Ye) {
|
|
3561
|
+
const n = e.forkResourceStore;
|
|
3562
|
+
n && delete e.forkResourceStore;
|
|
3547
3563
|
const s = {
|
|
3548
3564
|
...this.options,
|
|
3549
3565
|
...e,
|
|
3550
3566
|
isClone: !0
|
|
3551
|
-
}, a = new
|
|
3567
|
+
}, a = new Le(s);
|
|
3552
3568
|
if ((e.debug !== void 0 || e.prefix !== void 0) && (a.logger = a.logger.clone(e)), ["store", "services", "language"].forEach((i) => {
|
|
3553
3569
|
a[i] = this[i];
|
|
3554
3570
|
}), a.services = {
|
|
3555
3571
|
...this.services
|
|
3556
3572
|
}, a.services.utils = {
|
|
3557
3573
|
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
3558
|
-
},
|
|
3574
|
+
}, n) {
|
|
3559
3575
|
const i = Object.keys(this.store.data).reduce((l, c) => (l[c] = {
|
|
3560
3576
|
...this.store.data[c]
|
|
3561
3577
|
}, l[c] = Object.keys(l[c]).reduce((u, f) => (u[f] = {
|
|
@@ -3579,8 +3595,8 @@ class je extends Ze {
|
|
|
3579
3595
|
};
|
|
3580
3596
|
}
|
|
3581
3597
|
}
|
|
3582
|
-
const se =
|
|
3583
|
-
se.createInstance =
|
|
3598
|
+
const se = Le.createInstance();
|
|
3599
|
+
se.createInstance = Le.createInstance;
|
|
3584
3600
|
se.createInstance;
|
|
3585
3601
|
se.dir;
|
|
3586
3602
|
se.init;
|
|
@@ -3606,39 +3622,39 @@ const $n = { Friday: "Venerdì", FridayShort: "Ven", Monday: "Lunedì", MondaySh
|
|
|
3606
3622
|
Month: In,
|
|
3607
3623
|
Generic: Nn
|
|
3608
3624
|
};
|
|
3609
|
-
function tr(
|
|
3610
|
-
return new RegExp(Mn(
|
|
3625
|
+
function tr(r, e) {
|
|
3626
|
+
return new RegExp(Mn(r), e);
|
|
3611
3627
|
}
|
|
3612
|
-
function Mn(
|
|
3613
|
-
return
|
|
3628
|
+
function Mn(r) {
|
|
3629
|
+
return r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3614
3630
|
}
|
|
3615
|
-
function Fn(
|
|
3631
|
+
function Fn(r, e, t, n) {
|
|
3616
3632
|
let s = e;
|
|
3617
|
-
const a = Vn(
|
|
3633
|
+
const a = Vn(r, t);
|
|
3618
3634
|
if (!s) {
|
|
3619
3635
|
const i = Math.abs(a);
|
|
3620
3636
|
i - Math.floor(i) ? s = "0,0.00" : s = "0,0";
|
|
3621
3637
|
}
|
|
3622
3638
|
const o = Yn(s);
|
|
3623
|
-
return new Intl.NumberFormat(
|
|
3639
|
+
return new Intl.NumberFormat(n, o).format(a);
|
|
3624
3640
|
}
|
|
3625
|
-
function Vn(
|
|
3626
|
-
let a =
|
|
3641
|
+
function Vn(r, e, t, n, s) {
|
|
3642
|
+
let a = r;
|
|
3627
3643
|
if (typeof a != "number") {
|
|
3628
3644
|
let i;
|
|
3629
|
-
e &&
|
|
3645
|
+
e && n === void 0 ? i = "," : i = ".";
|
|
3630
3646
|
const l = i == "." ? "," : ".";
|
|
3631
3647
|
a = a.replace(tr(l, "g"), ""), a = a.replace(tr(i, "g"), "."), a = Number(a);
|
|
3632
3648
|
}
|
|
3633
3649
|
const o = Number(a);
|
|
3634
3650
|
return isNaN(o) ? NaN : o;
|
|
3635
3651
|
}
|
|
3636
|
-
function Yn(
|
|
3652
|
+
function Yn(r) {
|
|
3637
3653
|
const e = {};
|
|
3638
|
-
|
|
3639
|
-
const t =
|
|
3654
|
+
r.includes(",") ? e.useGrouping = !0 : e.useGrouping = !1;
|
|
3655
|
+
const t = r.indexOf(".");
|
|
3640
3656
|
if (t > -1) {
|
|
3641
|
-
const s = (
|
|
3657
|
+
const s = (r.substring(t + 1).match(/0/g) || []).length;
|
|
3642
3658
|
e.minimumFractionDigits = s, e.maximumFractionDigits = s;
|
|
3643
3659
|
} else
|
|
3644
3660
|
e.minimumFractionDigits = 0, e.maximumFractionDigits = 0;
|
|
@@ -3650,24 +3666,24 @@ se.init({
|
|
|
3650
3666
|
debug: !1,
|
|
3651
3667
|
interpolation: {
|
|
3652
3668
|
escapeValue: !1,
|
|
3653
|
-
format: (
|
|
3654
|
-
const s = (
|
|
3669
|
+
format: (r, e, t, n) => {
|
|
3670
|
+
const s = (n == null ? void 0 : n.type) ?? "number";
|
|
3655
3671
|
try {
|
|
3656
3672
|
switch (s) {
|
|
3657
3673
|
case "date": {
|
|
3658
|
-
const a =
|
|
3674
|
+
const a = r instanceof Date ? r : new Date(r);
|
|
3659
3675
|
return new Intl.DateTimeFormat(t, {
|
|
3660
3676
|
dateStyle: e || "short"
|
|
3661
3677
|
}).format(a);
|
|
3662
3678
|
}
|
|
3663
3679
|
default:
|
|
3664
3680
|
case "number": {
|
|
3665
|
-
const a = (
|
|
3666
|
-
return Fn(
|
|
3681
|
+
const a = (n == null ? void 0 : n.inputIsLocalized) ?? !1;
|
|
3682
|
+
return Fn(r, e, a, t);
|
|
3667
3683
|
}
|
|
3668
3684
|
}
|
|
3669
3685
|
} catch {
|
|
3670
|
-
return
|
|
3686
|
+
return r;
|
|
3671
3687
|
}
|
|
3672
3688
|
}
|
|
3673
3689
|
},
|
|
@@ -3680,38 +3696,38 @@ se.init({
|
|
|
3680
3696
|
}
|
|
3681
3697
|
}
|
|
3682
3698
|
});
|
|
3683
|
-
const Un = (
|
|
3699
|
+
const Un = (r, e, t, n) => se.format(r, e, t || se.language, n), Wn = (r, e) => se.t(r, e);
|
|
3684
3700
|
function Qe() {
|
|
3685
|
-
const
|
|
3686
|
-
(
|
|
3701
|
+
const r = me(
|
|
3702
|
+
(n, s, a, o) => Un(n, s, a || void 0, o),
|
|
3687
3703
|
[]
|
|
3688
3704
|
), e = me(() => se.languages[0], []), t = me(
|
|
3689
|
-
(
|
|
3705
|
+
(n, s) => Wn(n, s),
|
|
3690
3706
|
[]
|
|
3691
3707
|
);
|
|
3692
|
-
return { format:
|
|
3708
|
+
return { format: r, getCurrentLanguage: e, translate: t };
|
|
3693
3709
|
}
|
|
3694
|
-
var yt = /* @__PURE__ */ ((
|
|
3710
|
+
var yt = /* @__PURE__ */ ((r) => (r.CALENDAR_FOR = "Date.CalendarFor", r.CLOSE = "Generic.Close", r.SPOTLIGHT_DEFAULT_PLACEHOLDER = "Generic.SpotlightDefaultPlaceholder", r))(yt || {}), ie = /* @__PURE__ */ ((r) => (r.MONDAY = "Day.Monday", r.MONDAY_SHORT = "Day.MondayShort", r.TUESDAY = "Day.Tuesday", r.TUESDAY_SHORT = "Day.TuesdayShort", r.WEDNESDAY = "Day.Wednesday", r.WEDNESDAY_SHORT = "Day.WednesdayShort", r.THURSDAY = "Day.Thursday", r.THURSDAY_SHORT = "Day.ThursdayShort", r.FRIDAY = "Day.Friday", r.FRIDAY_SHORT = "Day.FridayShort", r.SATURDAY = "Day.Saturday", r.SATURDAY_SHORT = "Day.SaturdayShort", r.SUNDAY = "Day.Sunday", r.SUNDAY_SHORT = "Day.SundayShort", r))(ie || {}), ce = /* @__PURE__ */ ((r) => (r.JANUARY = "Month.January", r.FEBRUARY = "Month.February", r.MARCH = "Month.March", r.APRIL = "Month.April", r.MAY = "Month.May", r.JUNE = "Month.June", r.JULY = "Month.July", r.AUGUST = "Month.August", r.SEPTEMBER = "Month.September", r.OCTOBER = "Month.October", r.NOVEMBER = "Month.November", r.DECEMBER = "Month.December", r))(ce || {}), pt = /* @__PURE__ */ ((r) => (r.PREVIOUS_DAY = "Date.PreviousDay", r.PREVIOUS_WEEK = "Date.PreviousWeek", r.PREVIOUS_MONTH = "Date.PreviousMonth", r.PREVIOUS_YEAR = "Date.PreviousYear", r.NEXT_DAY = "Date.NextDay", r.NEXT_WEEK = "Date.NextWeek", r.NEXT_MONTH = "Date.NextMonth", r.NEXT_YEAR = "Date.NextYear", r.YESTERDAY = "Date.Yesterday", r.TODAY = "Date.Today", r.TOMORROW = "Date.Tomorrow", r))(pt || {});
|
|
3695
3711
|
function Hn({
|
|
3696
|
-
selectedDate:
|
|
3712
|
+
selectedDate: r,
|
|
3697
3713
|
onDateChange: e,
|
|
3698
3714
|
disabledDateRanges: t = [],
|
|
3699
|
-
initialValue:
|
|
3715
|
+
initialValue: n,
|
|
3700
3716
|
targetRef: s
|
|
3701
3717
|
}) {
|
|
3702
3718
|
const { translate: a } = Qe(), o = () => {
|
|
3703
|
-
if (!
|
|
3704
|
-
const k = new Date(
|
|
3719
|
+
if (!n) return;
|
|
3720
|
+
const k = new Date(n);
|
|
3705
3721
|
return isNaN(k.getTime()) ? void 0 : k;
|
|
3706
3722
|
}, [i] = Q(/* @__PURE__ */ new Date()), [l, c] = Q(
|
|
3707
|
-
|
|
3723
|
+
r || o() || /* @__PURE__ */ new Date()
|
|
3708
3724
|
), [u, f] = Q(
|
|
3709
3725
|
l ? l.getMonth() : (/* @__PURE__ */ new Date()).getMonth()
|
|
3710
3726
|
), [p, g] = Q(
|
|
3711
3727
|
l ? l.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear()
|
|
3712
3728
|
), [h, y] = Q(
|
|
3713
3729
|
l ? l.getDate() : null
|
|
3714
|
-
),
|
|
3730
|
+
), w = be(null), E = be([]), b = [
|
|
3715
3731
|
a(ce.JANUARY),
|
|
3716
3732
|
a(ce.FEBRUARY),
|
|
3717
3733
|
a(ce.MARCH),
|
|
@@ -3754,8 +3770,8 @@ function Hn({
|
|
|
3754
3770
|
full: a(ie.SATURDAY)
|
|
3755
3771
|
}
|
|
3756
3772
|
], R = (k) => t.some((d) => {
|
|
3757
|
-
const m = d.start.getTime(),
|
|
3758
|
-
return D >= m && D <=
|
|
3773
|
+
const m = d.start.getTime(), S = d.end.getTime(), D = k.getTime();
|
|
3774
|
+
return D >= m && D <= S;
|
|
3759
3775
|
}), v = (k) => {
|
|
3760
3776
|
R(k) || (c(k), y(k.getDate()), e && e(kr(k)));
|
|
3761
3777
|
}, $ = () => {
|
|
@@ -3765,19 +3781,19 @@ function Hn({
|
|
|
3765
3781
|
}, V = (k, d) => new Date(k, d + 1, 0).getDate(), F = (k, d) => new Date(k, d, 1).getDay(), C = (k) => {
|
|
3766
3782
|
var m;
|
|
3767
3783
|
const d = q.findIndex(
|
|
3768
|
-
(
|
|
3784
|
+
(S) => S !== null && S.getDate() === k
|
|
3769
3785
|
);
|
|
3770
3786
|
d !== -1 && E.current[d] && ((m = E.current[d]) == null || m.focus(), y(k));
|
|
3771
3787
|
}, I = (k, d) => {
|
|
3772
3788
|
const m = q[d];
|
|
3773
3789
|
if (!m) return;
|
|
3774
|
-
const
|
|
3790
|
+
const S = V(p, u), D = m.getDate();
|
|
3775
3791
|
switch (k.key) {
|
|
3776
3792
|
case "ArrowRight":
|
|
3777
3793
|
k.preventDefault();
|
|
3778
3794
|
{
|
|
3779
3795
|
let T = D + 1, P = new Date(p, u, T);
|
|
3780
|
-
if (T >
|
|
3796
|
+
if (T > S) {
|
|
3781
3797
|
const N = u === 11 ? p + 1 : p, _ = u === 11 ? 0 : u + 1;
|
|
3782
3798
|
T = 1, P = new Date(N, _, T), j(), setTimeout(() => {
|
|
3783
3799
|
Y(1, "forward");
|
|
@@ -3821,9 +3837,9 @@ function Hn({
|
|
|
3821
3837
|
k.preventDefault();
|
|
3822
3838
|
{
|
|
3823
3839
|
let T = D + 7, P = new Date(p, u, T);
|
|
3824
|
-
if (T >
|
|
3840
|
+
if (T > S) {
|
|
3825
3841
|
const N = u === 11 ? p + 1 : p, _ = u === 11 ? 0 : u + 1;
|
|
3826
|
-
T = T -
|
|
3842
|
+
T = T - S, P = new Date(N, _, T), j(), setTimeout(() => {
|
|
3827
3843
|
Y(T, "forward");
|
|
3828
3844
|
}, 0);
|
|
3829
3845
|
return;
|
|
@@ -3835,7 +3851,7 @@ function Hn({
|
|
|
3835
3851
|
k.preventDefault(), Y(1, "forward");
|
|
3836
3852
|
break;
|
|
3837
3853
|
case "End":
|
|
3838
|
-
k.preventDefault(), Y(
|
|
3854
|
+
k.preventDefault(), Y(S, "backward");
|
|
3839
3855
|
break;
|
|
3840
3856
|
case "PageUp":
|
|
3841
3857
|
k.preventDefault(), $(), setTimeout(() => {
|
|
@@ -3867,10 +3883,10 @@ function Hn({
|
|
|
3867
3883
|
}, Y = (k, d) => {
|
|
3868
3884
|
const m = V(p, u);
|
|
3869
3885
|
if (d === "forward") {
|
|
3870
|
-
for (let
|
|
3871
|
-
const D = new Date(p, u,
|
|
3886
|
+
for (let S = k; S <= m; S++) {
|
|
3887
|
+
const D = new Date(p, u, S);
|
|
3872
3888
|
if (!R(D)) {
|
|
3873
|
-
C(
|
|
3889
|
+
C(S);
|
|
3874
3890
|
return;
|
|
3875
3891
|
}
|
|
3876
3892
|
}
|
|
@@ -3885,17 +3901,17 @@ function Hn({
|
|
|
3885
3901
|
return;
|
|
3886
3902
|
}
|
|
3887
3903
|
}
|
|
3888
|
-
const
|
|
3904
|
+
const S = u === 0 ? p - 1 : p, D = u === 0 ? 11 : u - 1, T = V(S, D);
|
|
3889
3905
|
$(), setTimeout(() => {
|
|
3890
3906
|
Y(T, "backward");
|
|
3891
3907
|
}, 0);
|
|
3892
3908
|
}
|
|
3893
3909
|
}, q = (() => {
|
|
3894
3910
|
const k = V(p, u), d = F(p, u), m = [];
|
|
3895
|
-
for (let
|
|
3911
|
+
for (let S = 0; S < d; S++)
|
|
3896
3912
|
m.push(null);
|
|
3897
|
-
for (let
|
|
3898
|
-
const D = new Date(p, u,
|
|
3913
|
+
for (let S = 1; S <= k; S++) {
|
|
3914
|
+
const D = new Date(p, u, S);
|
|
3899
3915
|
m.push(D);
|
|
3900
3916
|
}
|
|
3901
3917
|
return m;
|
|
@@ -3922,11 +3938,11 @@ function Hn({
|
|
|
3922
3938
|
calendar: "smp-datepickercalendar",
|
|
3923
3939
|
table: "smp-datepickercalendar-table",
|
|
3924
3940
|
th: "smp-datepickercalendar-th",
|
|
3925
|
-
td: (k, d, m,
|
|
3941
|
+
td: (k, d, m, S) => `smp-datepickercalendar-td
|
|
3926
3942
|
${k ? "smp-datepickercalendar-td-today" : ""}
|
|
3927
3943
|
${d ? "smp-datepickercalendar-td-selected" : ""}
|
|
3928
3944
|
${m ? "smp-datepickercalendar-td-focused" : ""}
|
|
3929
|
-
${
|
|
3945
|
+
${S ? "smp-datepickercalendar-td-disabled" : ""}`
|
|
3930
3946
|
}, B = () => `${b[u]} ${p.toString()}`;
|
|
3931
3947
|
return /* @__PURE__ */ x.jsxs(
|
|
3932
3948
|
"div",
|
|
@@ -3982,7 +3998,7 @@ function Hn({
|
|
|
3982
3998
|
/* @__PURE__ */ x.jsxs(
|
|
3983
3999
|
"table",
|
|
3984
4000
|
{
|
|
3985
|
-
ref:
|
|
4001
|
+
ref: w,
|
|
3986
4002
|
role: "grid",
|
|
3987
4003
|
"aria-label": `${a(yt.CALENDAR_FOR)} ${b[u]} ${p}`,
|
|
3988
4004
|
className: U.table,
|
|
@@ -3997,8 +4013,8 @@ function Hn({
|
|
|
3997
4013
|
},
|
|
3998
4014
|
k.value
|
|
3999
4015
|
)) }) }),
|
|
4000
|
-
/* @__PURE__ */ x.jsx("tbody", { children: ne.map((k, d) => /* @__PURE__ */ x.jsx("tr", { children: k.map((m,
|
|
4001
|
-
const D = d * 7 +
|
|
4016
|
+
/* @__PURE__ */ x.jsx("tbody", { children: ne.map((k, d) => /* @__PURE__ */ x.jsx("tr", { children: k.map((m, S) => {
|
|
4017
|
+
const D = d * 7 + S;
|
|
4002
4018
|
if (m === null)
|
|
4003
4019
|
return /* @__PURE__ */ x.jsx(
|
|
4004
4020
|
"td",
|
|
@@ -4010,7 +4026,7 @@ function Hn({
|
|
|
4010
4026
|
!0
|
|
4011
4027
|
)
|
|
4012
4028
|
},
|
|
4013
|
-
`empty-${
|
|
4029
|
+
`empty-${S}`
|
|
4014
4030
|
);
|
|
4015
4031
|
const T = m.getDate() === i.getDate() && m.getMonth() === i.getMonth() && m.getFullYear() === i.getFullYear(), P = l && m.getDate() === l.getDate() && m.getMonth() === l.getMonth() && m.getFullYear() === l.getFullYear(), N = h === m.getDate(), _ = R(m);
|
|
4016
4032
|
return /* @__PURE__ */ x.jsx(
|
|
@@ -4035,7 +4051,7 @@ function Hn({
|
|
|
4035
4051
|
),
|
|
4036
4052
|
children: m.getDate()
|
|
4037
4053
|
},
|
|
4038
|
-
`day-${
|
|
4054
|
+
`day-${S}`
|
|
4039
4055
|
);
|
|
4040
4056
|
}) }, `week-${d}`)) })
|
|
4041
4057
|
]
|
|
@@ -4046,19 +4062,19 @@ function Hn({
|
|
|
4046
4062
|
);
|
|
4047
4063
|
}
|
|
4048
4064
|
const qn = ({
|
|
4049
|
-
bindValue:
|
|
4065
|
+
bindValue: r,
|
|
4050
4066
|
placeholder: e,
|
|
4051
4067
|
onChange: t,
|
|
4052
|
-
disabledDateRanges:
|
|
4068
|
+
disabledDateRanges: n,
|
|
4053
4069
|
...s
|
|
4054
4070
|
}) => {
|
|
4055
|
-
const [a, o] = Q(!1), [i, l] = Q(
|
|
4071
|
+
const [a, o] = Q(!1), [i, l] = Q(r || ""), [c, u] = Q(""), { anchorRef: f, targetRef: p } = gt({
|
|
4056
4072
|
position: "bottom",
|
|
4057
4073
|
enabled: a
|
|
4058
4074
|
});
|
|
4059
|
-
|
|
4075
|
+
qe(p, () => {
|
|
4060
4076
|
o(!1);
|
|
4061
|
-
}),
|
|
4077
|
+
}), qe(f, () => {
|
|
4062
4078
|
if (
|
|
4063
4079
|
// FIXME: Copied from useClickOutside.
|
|
4064
4080
|
typeof f == "object" && f !== null && "current" in f
|
|
@@ -4082,10 +4098,10 @@ const qn = ({
|
|
|
4082
4098
|
[h, g]
|
|
4083
4099
|
);
|
|
4084
4100
|
oe(() => {
|
|
4085
|
-
const { formattedDate: $, isoDate: j, isValid: V } = y(
|
|
4086
|
-
l(V && j ||
|
|
4087
|
-
}, [
|
|
4088
|
-
const
|
|
4101
|
+
const { formattedDate: $, isoDate: j, isValid: V } = y(r);
|
|
4102
|
+
l(V && j || r), u(V && $ || r);
|
|
4103
|
+
}, [r, g, y]);
|
|
4104
|
+
const w = () => o(($) => !$), E = () => {
|
|
4089
4105
|
O(c);
|
|
4090
4106
|
}, b = ($) => {
|
|
4091
4107
|
O($), o(!1);
|
|
@@ -4099,7 +4115,7 @@ const qn = ({
|
|
|
4099
4115
|
};
|
|
4100
4116
|
return /* @__PURE__ */ x.jsxs("div", { "data-component": "date-picker", children: [
|
|
4101
4117
|
/* @__PURE__ */ x.jsx(
|
|
4102
|
-
|
|
4118
|
+
Re,
|
|
4103
4119
|
{
|
|
4104
4120
|
bindValue: c,
|
|
4105
4121
|
placeholder: e,
|
|
@@ -4107,7 +4123,7 @@ const qn = ({
|
|
|
4107
4123
|
onChange: R,
|
|
4108
4124
|
onKeyDown: v,
|
|
4109
4125
|
shapeIcon: "calendar",
|
|
4110
|
-
onShapeIconClick:
|
|
4126
|
+
onShapeIconClick: w,
|
|
4111
4127
|
ref: f,
|
|
4112
4128
|
...s
|
|
4113
4129
|
}
|
|
@@ -4115,7 +4131,7 @@ const qn = ({
|
|
|
4115
4131
|
a && /* @__PURE__ */ x.jsx(
|
|
4116
4132
|
Hn,
|
|
4117
4133
|
{
|
|
4118
|
-
disabledDateRanges:
|
|
4134
|
+
disabledDateRanges: n,
|
|
4119
4135
|
onDateChange: b,
|
|
4120
4136
|
initialValue: ht(i) && i || "",
|
|
4121
4137
|
targetRef: p
|
|
@@ -4123,17 +4139,17 @@ const qn = ({
|
|
|
4123
4139
|
)
|
|
4124
4140
|
] });
|
|
4125
4141
|
}, Kn = ({
|
|
4126
|
-
elements:
|
|
4142
|
+
elements: r,
|
|
4127
4143
|
displayMode: e,
|
|
4128
4144
|
minimumChars: t,
|
|
4129
|
-
listDisplayMode:
|
|
4145
|
+
listDisplayMode: n,
|
|
4130
4146
|
placeholder: s,
|
|
4131
4147
|
fun: a,
|
|
4132
4148
|
onOptionsRequest: o,
|
|
4133
4149
|
onChange: i
|
|
4134
4150
|
}) => {
|
|
4135
|
-
const l =
|
|
4136
|
-
const g = [...
|
|
4151
|
+
const l = r.map((f) => f.bindValue), c = (f, p) => {
|
|
4152
|
+
const g = [...r];
|
|
4137
4153
|
if (f == "")
|
|
4138
4154
|
g.pop();
|
|
4139
4155
|
else {
|
|
@@ -4158,7 +4174,7 @@ const qn = ({
|
|
|
4158
4174
|
/* @__PURE__ */ x.jsx(
|
|
4159
4175
|
hr,
|
|
4160
4176
|
{
|
|
4161
|
-
elements:
|
|
4177
|
+
elements: r,
|
|
4162
4178
|
displayMode: e,
|
|
4163
4179
|
isEditable: !0,
|
|
4164
4180
|
onChange: (f) => {
|
|
@@ -4173,7 +4189,7 @@ const qn = ({
|
|
|
4173
4189
|
fun: a,
|
|
4174
4190
|
onChange: c,
|
|
4175
4191
|
_changeOnEnter: !0,
|
|
4176
|
-
listDisplayMode:
|
|
4192
|
+
listDisplayMode: n,
|
|
4177
4193
|
minimumChars: t,
|
|
4178
4194
|
placeholder: s,
|
|
4179
4195
|
onOptionsRequest: o,
|
|
@@ -4183,29 +4199,29 @@ const qn = ({
|
|
|
4183
4199
|
]
|
|
4184
4200
|
}
|
|
4185
4201
|
);
|
|
4186
|
-
}, Bn = ({ ...
|
|
4187
|
-
const [e, t] = Q(!1),
|
|
4202
|
+
}, Bn = ({ ...r }) => {
|
|
4203
|
+
const [e, t] = Q(!1), n = e ? "visibility-off" : "visibility";
|
|
4188
4204
|
return /* @__PURE__ */ x.jsx(
|
|
4189
|
-
|
|
4205
|
+
Re,
|
|
4190
4206
|
{
|
|
4191
|
-
...
|
|
4207
|
+
...r,
|
|
4192
4208
|
inputType: e ? "text" : "password",
|
|
4193
|
-
shapeIcon:
|
|
4209
|
+
shapeIcon: n,
|
|
4194
4210
|
onShapeIconClick: () => t(!e),
|
|
4195
4211
|
ariaLabel: "password",
|
|
4196
4212
|
"data-component": "password"
|
|
4197
4213
|
}
|
|
4198
4214
|
);
|
|
4199
|
-
}, Gn = ({ ...
|
|
4200
|
-
const [e, t] = Q(
|
|
4215
|
+
}, Gn = ({ ...r }) => {
|
|
4216
|
+
const [e, t] = Q(r.bindValue), { translate: n } = Qe(), s = (a) => {
|
|
4201
4217
|
var o;
|
|
4202
|
-
a.key === "Enter" && (a.preventDefault(), (o =
|
|
4218
|
+
a.key === "Enter" && (a.preventDefault(), (o = r.onEnter) == null || o.call(r, e));
|
|
4203
4219
|
};
|
|
4204
4220
|
return /* @__PURE__ */ x.jsx(
|
|
4205
|
-
|
|
4221
|
+
Re,
|
|
4206
4222
|
{
|
|
4207
|
-
...
|
|
4208
|
-
placeholder:
|
|
4223
|
+
...r,
|
|
4224
|
+
placeholder: r.placeholder ? r.placeholder : n(yt.SPOTLIGHT_DEFAULT_PLACEHOLDER),
|
|
4209
4225
|
icon: "magnify",
|
|
4210
4226
|
inputType: "search",
|
|
4211
4227
|
bindValue: e,
|
|
@@ -4241,34 +4257,34 @@ class Se {
|
|
|
4241
4257
|
return this.value.join(";");
|
|
4242
4258
|
}
|
|
4243
4259
|
}
|
|
4244
|
-
const
|
|
4260
|
+
const Ue = (r, e, t) => ({
|
|
4245
4261
|
obj: {
|
|
4246
|
-
t:
|
|
4247
|
-
p:
|
|
4262
|
+
t: r.obj.t,
|
|
4263
|
+
p: r.obj.p,
|
|
4248
4264
|
k: e
|
|
4249
4265
|
},
|
|
4250
|
-
decode: t ||
|
|
4251
|
-
shape:
|
|
4252
|
-
}), rr = (
|
|
4253
|
-
const e = Se.fromDataObj(
|
|
4254
|
-
return e.getValue().map((
|
|
4255
|
-
bindValue:
|
|
4266
|
+
decode: t || r.decode,
|
|
4267
|
+
shape: r.shape
|
|
4268
|
+
}), rr = (r) => {
|
|
4269
|
+
const e = Se.fromDataObj(r.obj), t = r.decode ? Se.fromString(r.decode).getValue() : [];
|
|
4270
|
+
return e.getValue().map((n, s) => ({
|
|
4271
|
+
bindValue: n,
|
|
4256
4272
|
optionalDisplayValue: t.length >= s ? t[s] : ""
|
|
4257
4273
|
}));
|
|
4258
|
-
}, zn = (
|
|
4274
|
+
}, zn = (r, e) => {
|
|
4259
4275
|
const t = new Se(
|
|
4260
|
-
|
|
4276
|
+
r.obj,
|
|
4261
4277
|
e.map((s) => s.bindValue)
|
|
4262
|
-
).getLegacyValue(),
|
|
4263
|
-
|
|
4278
|
+
).getLegacyValue(), n = new Se(
|
|
4279
|
+
r.obj,
|
|
4264
4280
|
e.map((s) => s.optionalDisplayValue ? s.optionalDisplayValue : "")
|
|
4265
4281
|
).getLegacyValue();
|
|
4266
|
-
return
|
|
4282
|
+
return Ue(r, t, n);
|
|
4267
4283
|
}, vr = ({
|
|
4268
|
-
decode:
|
|
4284
|
+
decode: r,
|
|
4269
4285
|
shape: e,
|
|
4270
4286
|
obj: t,
|
|
4271
|
-
data:
|
|
4287
|
+
data: n,
|
|
4272
4288
|
icon: s,
|
|
4273
4289
|
fun: a,
|
|
4274
4290
|
placeholderIcon: o,
|
|
@@ -4282,21 +4298,21 @@ const Ye = (n, e, t) => ({
|
|
|
4282
4298
|
const g = {
|
|
4283
4299
|
obj: t,
|
|
4284
4300
|
shape: e,
|
|
4285
|
-
decode:
|
|
4301
|
+
decode: r
|
|
4286
4302
|
}, h = {
|
|
4287
4303
|
onBlur: f,
|
|
4288
4304
|
onOptionsRequest: p,
|
|
4289
4305
|
fun: a,
|
|
4290
4306
|
icon: s,
|
|
4291
4307
|
label: i,
|
|
4292
|
-
...
|
|
4293
|
-
}, y = (b, O) => Ar(t) ?
|
|
4308
|
+
...n
|
|
4309
|
+
}, y = (b, O) => Ar(t) ? Ue(g, new He(t, b).getLegacyValue()) : Ue(g, b, O), w = (b) => Ue(g, new We(t, b).getLegacyValue()), E = (b) => zn(g, b);
|
|
4294
4310
|
switch (e) {
|
|
4295
4311
|
case le.AUTOCOMPLETE: {
|
|
4296
4312
|
const b = {
|
|
4297
4313
|
...h,
|
|
4298
4314
|
bindValue: t.k,
|
|
4299
|
-
optionalDisplayValue:
|
|
4315
|
+
optionalDisplayValue: r,
|
|
4300
4316
|
onChange: (O, R) => {
|
|
4301
4317
|
l == null || l(y(O, R));
|
|
4302
4318
|
}
|
|
@@ -4307,7 +4323,7 @@ const Ye = (n, e, t) => ({
|
|
|
4307
4323
|
const b = {
|
|
4308
4324
|
...h,
|
|
4309
4325
|
bindValue: t.k,
|
|
4310
|
-
optionalDisplayValue:
|
|
4326
|
+
optionalDisplayValue: r,
|
|
4311
4327
|
onClick: () => {
|
|
4312
4328
|
c == null || c(y(t.k));
|
|
4313
4329
|
}
|
|
@@ -4318,7 +4334,7 @@ const Ye = (n, e, t) => ({
|
|
|
4318
4334
|
const b = {
|
|
4319
4335
|
...h,
|
|
4320
4336
|
bindValue: t.k,
|
|
4321
|
-
optionalDisplayValue:
|
|
4337
|
+
optionalDisplayValue: r,
|
|
4322
4338
|
onChange: (O, R) => {
|
|
4323
4339
|
l == null || l(y(O, R));
|
|
4324
4340
|
}
|
|
@@ -4328,10 +4344,10 @@ const Ye = (n, e, t) => ({
|
|
|
4328
4344
|
case le.CHECKBOX: {
|
|
4329
4345
|
const b = {
|
|
4330
4346
|
...h,
|
|
4331
|
-
bindValue:
|
|
4332
|
-
optionalDisplayValue:
|
|
4347
|
+
bindValue: We.fromDataObj(t).getValue(),
|
|
4348
|
+
optionalDisplayValue: r,
|
|
4333
4349
|
onChange: (O) => {
|
|
4334
|
-
l == null || l(
|
|
4350
|
+
l == null || l(w(O));
|
|
4335
4351
|
}
|
|
4336
4352
|
};
|
|
4337
4353
|
return /* @__PURE__ */ x.jsx(on, { ...b });
|
|
@@ -4346,7 +4362,7 @@ const Ye = (n, e, t) => ({
|
|
|
4346
4362
|
case le.DATE: {
|
|
4347
4363
|
const b = {
|
|
4348
4364
|
...h,
|
|
4349
|
-
bindValue:
|
|
4365
|
+
bindValue: He.fromDataObj(t).getValue(),
|
|
4350
4366
|
onChange: (O) => {
|
|
4351
4367
|
l == null || l(y(O));
|
|
4352
4368
|
}
|
|
@@ -4405,15 +4421,15 @@ const Ye = (n, e, t) => ({
|
|
|
4405
4421
|
l == null || l(y(O));
|
|
4406
4422
|
}
|
|
4407
4423
|
};
|
|
4408
|
-
return /* @__PURE__ */ x.jsx(
|
|
4424
|
+
return /* @__PURE__ */ x.jsx(Re, { ...b });
|
|
4409
4425
|
}
|
|
4410
4426
|
}
|
|
4411
|
-
}, Jn = (
|
|
4427
|
+
}, Jn = (r, e) => {
|
|
4412
4428
|
const t = [];
|
|
4413
|
-
for (let
|
|
4414
|
-
t.push(
|
|
4429
|
+
for (let n = 0; n < r.length; n += e)
|
|
4430
|
+
t.push(r.slice(n, n + e));
|
|
4415
4431
|
return t;
|
|
4416
|
-
}, br = (
|
|
4432
|
+
}, br = (r, e) => r.map((t) => {
|
|
4417
4433
|
var a, o;
|
|
4418
4434
|
if ((a = t.sections) != null && a.length)
|
|
4419
4435
|
return {
|
|
@@ -4421,8 +4437,8 @@ const Ye = (n, e, t) => ({
|
|
|
4421
4437
|
sections: br(t.sections, e),
|
|
4422
4438
|
content: t.content
|
|
4423
4439
|
};
|
|
4424
|
-
let
|
|
4425
|
-
return (o = t.content) != null && o.length && t.columns && +t.columns > 1 && (
|
|
4440
|
+
let n = t.sections, s = t.content;
|
|
4441
|
+
return (o = t.content) != null && o.length && t.columns && +t.columns > 1 && (n = Jn(
|
|
4426
4442
|
t.content.filter((l) => !!e[l.id]),
|
|
4427
4443
|
+t.columns
|
|
4428
4444
|
).map(
|
|
@@ -4435,17 +4451,17 @@ const Ye = (n, e, t) => ({
|
|
|
4435
4451
|
})
|
|
4436
4452
|
), s = []), {
|
|
4437
4453
|
...t,
|
|
4438
|
-
sections:
|
|
4454
|
+
sections: n,
|
|
4439
4455
|
content: s
|
|
4440
4456
|
};
|
|
4441
|
-
}), nr = (
|
|
4457
|
+
}), nr = (r, e) => {
|
|
4442
4458
|
if (!e)
|
|
4443
4459
|
return {};
|
|
4444
|
-
const t =
|
|
4460
|
+
const t = r.some((n) => n.dim) ? r.map((n) => n.dim || "auto").join(" ") : `repeat(${r.length}, 1fr)`;
|
|
4445
4461
|
return {
|
|
4446
4462
|
[e]: t
|
|
4447
4463
|
};
|
|
4448
|
-
}, sr = (
|
|
4464
|
+
}, sr = (r) => r.some((e) => e.dim && !e.dim.endsWith("%")), fe = {
|
|
4449
4465
|
"smp-layout": "_smp-layout_xrjwg_1",
|
|
4450
4466
|
"smp-layout-horizontal": "_smp-layout-horizontal_xrjwg_9",
|
|
4451
4467
|
"smp-layout-vertical": "_smp-layout-vertical_xrjwg_13",
|
|
@@ -4458,32 +4474,32 @@ const Ye = (n, e, t) => ({
|
|
|
4458
4474
|
"smp-grid-template-rows": "_smp-grid-template-rows_xrjwg_48",
|
|
4459
4475
|
"smp-layout-section-with-title": "_smp-layout-section-with-title_xrjwg_52",
|
|
4460
4476
|
"smp-layout-section-title": "_smp-layout-section-title_xrjwg_58"
|
|
4461
|
-
}, xr = ({ layout:
|
|
4477
|
+
}, xr = ({ layout: r, cells: e }) => {
|
|
4462
4478
|
var f;
|
|
4463
|
-
if (!((f =
|
|
4479
|
+
if (!((f = r.sections) != null && f.length))
|
|
4464
4480
|
return /* @__PURE__ */ x.jsx(x.Fragment, {});
|
|
4465
|
-
const t = "--smp-grid-template-cols",
|
|
4481
|
+
const t = "--smp-grid-template-cols", n = "--smp-grid-template-rows", s = br(r.sections, e), a = (p) => p == null ? void 0 : p.reduce((g, h) => {
|
|
4466
4482
|
var O, R;
|
|
4467
|
-
let y = "",
|
|
4468
|
-
return (O = h.sections) != null && O.length ? (y = fe["smp-layout-section-grid"],
|
|
4483
|
+
let y = "", w = {}, E = {}, b = "";
|
|
4484
|
+
return (O = h.sections) != null && O.length ? (y = fe["smp-layout-section-grid"], w = a(h.sections), h.gridCols == null && (b = `${fe[h.horizontal ? "smp-grid-template-cols" : "smp-grid-template-rows"]}`, (h.horizontal || sr(h.sections)) && (E = nr(
|
|
4469
4485
|
h.sections,
|
|
4470
|
-
h.horizontal ? t :
|
|
4486
|
+
h.horizontal ? t : n
|
|
4471
4487
|
)))) : (R = h.content) != null && R.length && (h.gridCols !== void 0 && h.gridCols > 0 ? (y = fe["smp-layout-section-grid"], b = `${fe["smp-grid-template-cols"]}`, E = {
|
|
4472
4488
|
[t]: `repeat(${h.gridCols}, 1fr)`
|
|
4473
4489
|
}) : y = fe["smp-layout-section-flex"]), {
|
|
4474
4490
|
...g,
|
|
4475
|
-
...
|
|
4491
|
+
...w,
|
|
4476
4492
|
[h.id]: {
|
|
4477
4493
|
classes: `${y} ${fe[h.horizontal ? "smp-layout-section-horizontal" : "smp-layout-section-vertical"]} ${b} ${h.hdsp ? `smp-justifyContent-${h.hdsp}` : ""} ${h.vdsp ? `smp-alignItems-${h.vdsp}` : ""}`,
|
|
4478
4494
|
styles: E
|
|
4479
4495
|
}
|
|
4480
4496
|
};
|
|
4481
4497
|
}, {}), o = a(s), i = {
|
|
4482
|
-
container: `${fe["smp-layout"]} ${
|
|
4498
|
+
container: `${fe["smp-layout"]} ${r.horizontal ? fe["smp-layout-horizontal"] : fe["smp-layout-vertical"]}`,
|
|
4483
4499
|
sections: o
|
|
4484
|
-
}, l =
|
|
4500
|
+
}, l = r.horizontal || sr(r.sections) ? nr(
|
|
4485
4501
|
s,
|
|
4486
|
-
|
|
4502
|
+
r.horizontal ? t : n
|
|
4487
4503
|
) : {}, c = (p) => {
|
|
4488
4504
|
var h;
|
|
4489
4505
|
const g = /* @__PURE__ */ x.jsx(
|
|
@@ -4509,7 +4525,7 @@ const Ye = (n, e, t) => ({
|
|
|
4509
4525
|
g
|
|
4510
4526
|
] }) : g;
|
|
4511
4527
|
}, u = (p, g, h, y) => {
|
|
4512
|
-
const
|
|
4528
|
+
const w = p.colSpan !== void 0 ? p.colSpan > 0 ? p.colSpan : p.colStart !== void 0 && p.colStart < 1 ? 1 : null : null, E = w !== null ? `span ${w}` : p.colStart, b = p.colEnd !== void 0 && p.colEnd > 0 ? p.colEnd : "", O = {
|
|
4513
4529
|
gridColumnStart: E,
|
|
4514
4530
|
gridColumnEnd: b
|
|
4515
4531
|
}, R = `${fe["smp-layout-cell-container"]} ${h ? `smp-justifyContent-${h}` : ""} ${y ? `smp-alignItems-${y}` : ""}`;
|
|
@@ -4525,9 +4541,9 @@ const Ye = (n, e, t) => ({
|
|
|
4525
4541
|
) : /* @__PURE__ */ x.jsx(x.Fragment, {});
|
|
4526
4542
|
};
|
|
4527
4543
|
return /* @__PURE__ */ x.jsx("div", { className: i.container, style: l, "smp-id": "layout", children: s == null ? void 0 : s.map((p) => c(p)) });
|
|
4528
|
-
}, es = ({ data:
|
|
4544
|
+
}, es = ({ data: r, onClick: e, onEnter: t }) => {
|
|
4529
4545
|
var o, i;
|
|
4530
|
-
const [
|
|
4546
|
+
const [n, s] = Q(), a = me(
|
|
4531
4547
|
(l) => {
|
|
4532
4548
|
var u, f;
|
|
4533
4549
|
if (!((u = l.rows) != null && u.length) || !((f = l.columns) != null && f.length))
|
|
@@ -4536,14 +4552,14 @@ const Ye = (n, e, t) => ({
|
|
|
4536
4552
|
return l.columns.filter((p) => p.visible).reduce((p, g) => {
|
|
4537
4553
|
const h = c.cells[g.name], y = {
|
|
4538
4554
|
...h,
|
|
4539
|
-
onChange: (
|
|
4555
|
+
onChange: (w) => {
|
|
4540
4556
|
s((E) => E && {
|
|
4541
4557
|
...E,
|
|
4542
4558
|
[g.name]: {
|
|
4543
4559
|
...E[g.name],
|
|
4544
4560
|
obj: {
|
|
4545
4561
|
...E[g.name].obj,
|
|
4546
|
-
k:
|
|
4562
|
+
k: w.obj.k
|
|
4547
4563
|
}
|
|
4548
4564
|
}
|
|
4549
4565
|
});
|
|
@@ -4553,8 +4569,8 @@ const Ye = (n, e, t) => ({
|
|
|
4553
4569
|
...h
|
|
4554
4570
|
});
|
|
4555
4571
|
},
|
|
4556
|
-
onEnter: (
|
|
4557
|
-
t && t(
|
|
4572
|
+
onEnter: (w) => {
|
|
4573
|
+
t && t(w);
|
|
4558
4574
|
}
|
|
4559
4575
|
};
|
|
4560
4576
|
return {
|
|
@@ -4566,13 +4582,13 @@ const Ye = (n, e, t) => ({
|
|
|
4566
4582
|
[e, t]
|
|
4567
4583
|
);
|
|
4568
4584
|
return oe(() => {
|
|
4569
|
-
s(a(
|
|
4570
|
-
}, [
|
|
4571
|
-
},
|
|
4572
|
-
ColumnsNumber:
|
|
4585
|
+
s(a(r));
|
|
4586
|
+
}, [r, a]), !((o = r == null ? void 0 : r.rows) != null && o.length) || !((i = r.columns) != null && i.length) ? null : n && /* @__PURE__ */ x.jsx("header", { className: "smp-appbar", "aria-label": "App Bar", children: /* @__PURE__ */ x.jsx(xr, { layout: r.rows[0].layout, cells: n }) });
|
|
4587
|
+
}, Ce = (r) => r == null ? !1 : typeof r == "string" ? r.toLocaleLowerCase() == "yes" : r, ts = ({
|
|
4588
|
+
ColumnsNumber: r = 1,
|
|
4573
4589
|
data: e = {},
|
|
4574
4590
|
ForceText: t,
|
|
4575
|
-
TextColName:
|
|
4591
|
+
TextColName: n,
|
|
4576
4592
|
TextColor: s = "var(--smp-dashList-color-base)",
|
|
4577
4593
|
Fillspace: a,
|
|
4578
4594
|
FontSize: o,
|
|
@@ -4585,7 +4601,7 @@ const Ye = (n, e, t) => ({
|
|
|
4585
4601
|
UmColName: g,
|
|
4586
4602
|
UmColor: h = "var(--smp-dashList-color-base)",
|
|
4587
4603
|
ForceValue: y,
|
|
4588
|
-
ValueColName:
|
|
4604
|
+
ValueColName: w,
|
|
4589
4605
|
ValueColor: E = "var(--smp-dashList-color-base)",
|
|
4590
4606
|
SelectLayout: b = "1",
|
|
4591
4607
|
onClick: O
|
|
@@ -4601,9 +4617,9 @@ const Ye = (n, e, t) => ({
|
|
|
4601
4617
|
value: de
|
|
4602
4618
|
};
|
|
4603
4619
|
},
|
|
4604
|
-
dashList: `smp-dash-list ${
|
|
4605
|
-
${
|
|
4606
|
-
}, { format: k } = Qe(), d = (M) => `${F}-${M}`, m = (M, G) => `${M}__${G}`,
|
|
4620
|
+
dashList: `smp-dash-list ${Ce(a) ? "smp-dash-list-fill-space" : ""}
|
|
4621
|
+
${Ce(i) ? "smp-dash-list-horizontal" : ""}`
|
|
4622
|
+
}, { format: k } = Qe(), d = (M) => `${F}-${M}`, m = (M, G) => `${M}__${G}`, S = (M) => `${V}-${M}`, D = (M) => {
|
|
4607
4623
|
const G = /R(\d{1,3})G(\d{1,3})B(\d{1,3})/;
|
|
4608
4624
|
if (G.test(M)) {
|
|
4609
4625
|
const te = M.match(G) || [];
|
|
@@ -4630,10 +4646,10 @@ const Ye = (n, e, t) => ({
|
|
|
4630
4646
|
return (ye = (ue = M == null ? void 0 : M.cells[v[te].name]) == null ? void 0 : ue.obj) == null ? void 0 : ye.k;
|
|
4631
4647
|
};
|
|
4632
4648
|
return {
|
|
4633
|
-
descr: t || G(
|
|
4649
|
+
descr: t || G(n) || ee(2) || "",
|
|
4634
4650
|
icon: l || G(c) || ee(3) || "",
|
|
4635
4651
|
um: p || G(g) || ee(1) || "",
|
|
4636
|
-
value: y || G(
|
|
4652
|
+
value: y || G(w) || ee(0) || ""
|
|
4637
4653
|
};
|
|
4638
4654
|
}, _ = (M) => {
|
|
4639
4655
|
O == null || O(M);
|
|
@@ -4658,9 +4674,9 @@ const Ye = (n, e, t) => ({
|
|
|
4658
4674
|
};
|
|
4659
4675
|
})(b), re = (M) => {
|
|
4660
4676
|
const { descr: G, icon: ee, um: te, value: ue } = N(M), ye = {
|
|
4661
|
-
[
|
|
4662
|
-
[
|
|
4663
|
-
[
|
|
4677
|
+
[S(C)]: D(s),
|
|
4678
|
+
[S(Y)]: D(h),
|
|
4679
|
+
[S(J)]: D(E)
|
|
4664
4680
|
}, de = [], we = T(ue);
|
|
4665
4681
|
switch (b) {
|
|
4666
4682
|
case "2":
|
|
@@ -4688,15 +4704,15 @@ const Ye = (n, e, t) => ({
|
|
|
4688
4704
|
M.id
|
|
4689
4705
|
);
|
|
4690
4706
|
}, A = {
|
|
4691
|
-
[z]: String(
|
|
4707
|
+
[z]: String(r),
|
|
4692
4708
|
[U]: q
|
|
4693
4709
|
};
|
|
4694
4710
|
return /* @__PURE__ */ x.jsx("div", { className: B.dashList, style: A, children: j ? $.map((M) => re(M)) : R });
|
|
4695
4711
|
}, rs = ({
|
|
4696
|
-
data:
|
|
4712
|
+
data: r,
|
|
4697
4713
|
logo: e,
|
|
4698
4714
|
open: t,
|
|
4699
|
-
minifiedOnClose:
|
|
4715
|
+
minifiedOnClose: n = !0,
|
|
4700
4716
|
customHeight: s = "100vh",
|
|
4701
4717
|
onClick: a,
|
|
4702
4718
|
onEnter: o,
|
|
@@ -4711,7 +4727,7 @@ const Ye = (n, e, t) => ({
|
|
|
4711
4727
|
const v = R.rows[0];
|
|
4712
4728
|
return R.columns.filter((V) => V.visible).reduce((V, F) => {
|
|
4713
4729
|
const C = v.cells[F.name];
|
|
4714
|
-
if (!u &&
|
|
4730
|
+
if (!u && n && C.shape !== le.BUTTON)
|
|
4715
4731
|
return V;
|
|
4716
4732
|
const I = {
|
|
4717
4733
|
...C,
|
|
@@ -4730,25 +4746,25 @@ const Ye = (n, e, t) => ({
|
|
|
4730
4746
|
o && o(Y);
|
|
4731
4747
|
}
|
|
4732
4748
|
};
|
|
4733
|
-
return !u &&
|
|
4749
|
+
return !u && n && (I.data = { ...I.data, showText: !1 }), {
|
|
4734
4750
|
...V,
|
|
4735
4751
|
[F.name]: I
|
|
4736
4752
|
};
|
|
4737
4753
|
}, {});
|
|
4738
4754
|
},
|
|
4739
|
-
[a, o, u,
|
|
4755
|
+
[a, o, u, n]
|
|
4740
4756
|
), y = me(() => {
|
|
4741
4757
|
i == null || i();
|
|
4742
|
-
}, [i]),
|
|
4743
|
-
|
|
4758
|
+
}, [i]), w = () => {
|
|
4759
|
+
n ? f((R) => !R) : (f(!1), i == null || i());
|
|
4744
4760
|
};
|
|
4745
4761
|
if (oe(() => {
|
|
4746
|
-
c(h(
|
|
4747
|
-
}, [
|
|
4762
|
+
c(h(r));
|
|
4763
|
+
}, [r]), oe(() => {
|
|
4748
4764
|
if (!p.current)
|
|
4749
4765
|
return;
|
|
4750
|
-
if (!
|
|
4751
|
-
c(h(
|
|
4766
|
+
if (!n) {
|
|
4767
|
+
c(h(r));
|
|
4752
4768
|
return;
|
|
4753
4769
|
}
|
|
4754
4770
|
const R = getComputedStyle(p.current).getPropertyValue(
|
|
@@ -4756,14 +4772,14 @@ const Ye = (n, e, t) => ({
|
|
|
4756
4772
|
);
|
|
4757
4773
|
let v = Number(R);
|
|
4758
4774
|
R.endsWith("ms") ? v = parseFloat(R) : R.endsWith("s") && (v = parseFloat(R) * 1e3), setTimeout(() => {
|
|
4759
|
-
c(h(
|
|
4775
|
+
c(h(r));
|
|
4760
4776
|
}, v / 2);
|
|
4761
|
-
}, [u,
|
|
4762
|
-
t !== void 0 && !
|
|
4763
|
-
}, [
|
|
4777
|
+
}, [u, n]), oe(() => {
|
|
4778
|
+
t !== void 0 && !n && f(t);
|
|
4779
|
+
}, [n, t]), !((b = r == null ? void 0 : r.rows) != null && b.length) || !((O = r.columns) != null && O.length))
|
|
4764
4780
|
return null;
|
|
4765
4781
|
const E = {
|
|
4766
|
-
drawer: `smp-drawer ${
|
|
4782
|
+
drawer: `smp-drawer ${n ? "smp-drawer-minified" : "smp-drawer-fixed"} ${u ? "smp-drawer-open" : ""}`,
|
|
4767
4783
|
container: "smp-drawer-container",
|
|
4768
4784
|
containerHeader: "smp-drawer-container-header",
|
|
4769
4785
|
containerIcon: `${u ? "" : "smp-drawer-container-icon-close"} smp-drawer-container-icon`,
|
|
@@ -4772,7 +4788,7 @@ const Ye = (n, e, t) => ({
|
|
|
4772
4788
|
backdrop: `smp-drawer-backdrop ${u ? "smp-drawer-backdrop-open" : ""}`
|
|
4773
4789
|
};
|
|
4774
4790
|
return l && /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
|
|
4775
|
-
!
|
|
4791
|
+
!n && /* @__PURE__ */ x.jsx(
|
|
4776
4792
|
"div",
|
|
4777
4793
|
{
|
|
4778
4794
|
"aria-hidden": "true",
|
|
@@ -4802,26 +4818,26 @@ const Ye = (n, e, t) => ({
|
|
|
4802
4818
|
/* @__PURE__ */ x.jsx("div", { className: E.containerIcon, children: /* @__PURE__ */ x.jsx(
|
|
4803
4819
|
ge,
|
|
4804
4820
|
{
|
|
4805
|
-
icon:
|
|
4821
|
+
icon: n ? "menu_close" : "close",
|
|
4806
4822
|
title: "drawer_icon",
|
|
4807
4823
|
rotated: !u,
|
|
4808
4824
|
isInteractable: !0,
|
|
4809
|
-
onClick:
|
|
4825
|
+
onClick: w,
|
|
4810
4826
|
width: 20,
|
|
4811
4827
|
height: 20
|
|
4812
4828
|
}
|
|
4813
4829
|
) })
|
|
4814
4830
|
] }),
|
|
4815
|
-
/* @__PURE__ */ x.jsx("div", { className: E.containerLayout, children: /* @__PURE__ */ x.jsx(xr, { layout:
|
|
4831
|
+
/* @__PURE__ */ x.jsx("div", { className: E.containerLayout, children: /* @__PURE__ */ x.jsx(xr, { layout: r.rows[0].layout, cells: l }) })
|
|
4816
4832
|
] })
|
|
4817
4833
|
}
|
|
4818
4834
|
)
|
|
4819
4835
|
] });
|
|
4820
4836
|
}, ns = ({
|
|
4821
|
-
data:
|
|
4837
|
+
data: r,
|
|
4822
4838
|
Type: e,
|
|
4823
4839
|
ShowSubmit: t = !1,
|
|
4824
|
-
SubmitPosition:
|
|
4840
|
+
SubmitPosition: n = "Right",
|
|
4825
4841
|
DefaultValue: s,
|
|
4826
4842
|
Label: a,
|
|
4827
4843
|
LabelPosition: o = "Left",
|
|
@@ -4832,14 +4848,14 @@ const Ye = (n, e, t) => ({
|
|
|
4832
4848
|
const [u, f] = Q();
|
|
4833
4849
|
oe(() => {
|
|
4834
4850
|
f(() => {
|
|
4835
|
-
const y = { ...
|
|
4851
|
+
const y = { ...r };
|
|
4836
4852
|
return e && (y.shape = e), s && (y.obj = $r(s)), y;
|
|
4837
4853
|
});
|
|
4838
|
-
}, [
|
|
4854
|
+
}, [r, s, e]);
|
|
4839
4855
|
const g = {
|
|
4840
|
-
container: `smp-field-container ${
|
|
4856
|
+
container: `smp-field-container ${Ce(t) ? `smp-field-position-${n}` : ""}`
|
|
4841
4857
|
}, h = () => {
|
|
4842
|
-
|
|
4858
|
+
Ce(t) || i == null || i(u);
|
|
4843
4859
|
};
|
|
4844
4860
|
if (u)
|
|
4845
4861
|
return /* @__PURE__ */ x.jsxs("div", { className: g.container, children: [
|
|
@@ -4858,7 +4874,7 @@ const Ye = (n, e, t) => ({
|
|
|
4858
4874
|
...u,
|
|
4859
4875
|
onChange: f,
|
|
4860
4876
|
onOptionsRequest: c,
|
|
4861
|
-
fun:
|
|
4877
|
+
fun: r.fun,
|
|
4862
4878
|
onBlur: h,
|
|
4863
4879
|
label: a,
|
|
4864
4880
|
labelPosition: o
|
|
@@ -4866,7 +4882,7 @@ const Ye = (n, e, t) => ({
|
|
|
4866
4882
|
)
|
|
4867
4883
|
}
|
|
4868
4884
|
),
|
|
4869
|
-
|
|
4885
|
+
Ce(t) && //TODO: translation
|
|
4870
4886
|
/* @__PURE__ */ x.jsx(Ge, { bindValue: "Confirm", onClick: () => l == null ? void 0 : l(u) })
|
|
4871
4887
|
] });
|
|
4872
4888
|
};
|
|
@@ -4882,6 +4898,6 @@ export {
|
|
|
4882
4898
|
ns as Field,
|
|
4883
4899
|
ge as Icon,
|
|
4884
4900
|
Bn as Password,
|
|
4885
|
-
|
|
4901
|
+
Re as Textfield,
|
|
4886
4902
|
Qn as configurePaths
|
|
4887
4903
|
};
|