@akad/design-system 0.1.0-beta.3 → 0.1.0-beta.5
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/package.json +1 -1
- package/react/components/atoms/Card/Card.config.d.ts +10 -0
- package/react/components/atoms/Card/Card.d.ts +5 -1
- package/react/components/atoms/Input/mask.d.ts +12 -0
- package/react/components/atoms/Loading/Loading.config.d.ts +10 -0
- package/react/components/atoms/Loading/Loading.d.ts +5 -1
- package/react/helpers/validator.d.ts +2 -0
- package/react/helpers/validator.test.d.ts +1 -0
- package/react/react-lib.js +676 -634
- package/react/react-lib.umd.cjs +7 -7
package/react/react-lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as P, jsxs as ae, Fragment as ws } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import yt, { useMemo as Ke, useState as Z, useRef as zr, useCallback as de, useEffect as $e, createElement as Au } from "react";
|
|
3
3
|
var Iu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
4
|
function hn(t) {
|
|
5
5
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
@@ -18,7 +18,7 @@ function Du() {
|
|
|
18
18
|
if ($a)
|
|
19
19
|
return ve;
|
|
20
20
|
$a = 1;
|
|
21
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, s = t ? Symbol.for("react.fragment") : 60107, n = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114, i = t ? Symbol.for("react.provider") : 60109, o = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, c = t ? Symbol.for("react.concurrent_mode") : 60111,
|
|
21
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, s = t ? Symbol.for("react.fragment") : 60107, n = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114, i = t ? Symbol.for("react.provider") : 60109, o = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, c = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, p = t ? Symbol.for("react.suspense") : 60113, T = t ? Symbol.for("react.suspense_list") : 60120, S = t ? Symbol.for("react.memo") : 60115, E = t ? Symbol.for("react.lazy") : 60116, k = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, g = t ? Symbol.for("react.responder") : 60118, I = t ? Symbol.for("react.scope") : 60119;
|
|
22
22
|
function D(b) {
|
|
23
23
|
if (typeof b == "object" && b !== null) {
|
|
24
24
|
var x = b.$$typeof;
|
|
@@ -35,7 +35,7 @@ function Du() {
|
|
|
35
35
|
default:
|
|
36
36
|
switch (b = b && b.$$typeof, b) {
|
|
37
37
|
case o:
|
|
38
|
-
case
|
|
38
|
+
case d:
|
|
39
39
|
case E:
|
|
40
40
|
case S:
|
|
41
41
|
case i:
|
|
@@ -52,7 +52,7 @@ function Du() {
|
|
|
52
52
|
function A(b) {
|
|
53
53
|
return D(b) === c;
|
|
54
54
|
}
|
|
55
|
-
return ve.AsyncMode = l, ve.ConcurrentMode = c, ve.ContextConsumer = o, ve.ContextProvider = i, ve.Element = e, ve.ForwardRef =
|
|
55
|
+
return ve.AsyncMode = l, ve.ConcurrentMode = c, ve.ContextConsumer = o, ve.ContextProvider = i, ve.Element = e, ve.ForwardRef = d, ve.Fragment = s, ve.Lazy = E, ve.Memo = S, ve.Portal = r, ve.Profiler = a, ve.StrictMode = n, ve.Suspense = p, ve.isAsyncMode = function(b) {
|
|
56
56
|
return A(b) || D(b) === l;
|
|
57
57
|
}, ve.isConcurrentMode = A, ve.isContextConsumer = function(b) {
|
|
58
58
|
return D(b) === o;
|
|
@@ -61,7 +61,7 @@ function Du() {
|
|
|
61
61
|
}, ve.isElement = function(b) {
|
|
62
62
|
return typeof b == "object" && b !== null && b.$$typeof === e;
|
|
63
63
|
}, ve.isForwardRef = function(b) {
|
|
64
|
-
return D(b) ===
|
|
64
|
+
return D(b) === d;
|
|
65
65
|
}, ve.isFragment = function(b) {
|
|
66
66
|
return D(b) === s;
|
|
67
67
|
}, ve.isLazy = function(b) {
|
|
@@ -77,7 +77,7 @@ function Du() {
|
|
|
77
77
|
}, ve.isSuspense = function(b) {
|
|
78
78
|
return D(b) === p;
|
|
79
79
|
}, ve.isValidElementType = function(b) {
|
|
80
|
-
return typeof b == "string" || typeof b == "function" || b === s || b === c || b === a || b === n || b === p || b === T || typeof b == "object" && b !== null && (b.$$typeof === E || b.$$typeof === S || b.$$typeof === i || b.$$typeof === o || b.$$typeof ===
|
|
80
|
+
return typeof b == "string" || typeof b == "function" || b === s || b === c || b === a || b === n || b === p || b === T || typeof b == "object" && b !== null && (b.$$typeof === E || b.$$typeof === S || b.$$typeof === i || b.$$typeof === o || b.$$typeof === d || b.$$typeof === _ || b.$$typeof === g || b.$$typeof === I || b.$$typeof === k);
|
|
81
81
|
}, ve.typeOf = D, ve;
|
|
82
82
|
}
|
|
83
83
|
var _e = {};
|
|
@@ -92,10 +92,10 @@ var _e = {};
|
|
|
92
92
|
var Sa;
|
|
93
93
|
function Nu() {
|
|
94
94
|
return Sa || (Sa = 1, process.env.NODE_ENV !== "production" && function() {
|
|
95
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, s = t ? Symbol.for("react.fragment") : 60107, n = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114, i = t ? Symbol.for("react.provider") : 60109, o = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, c = t ? Symbol.for("react.concurrent_mode") : 60111,
|
|
95
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, s = t ? Symbol.for("react.fragment") : 60107, n = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114, i = t ? Symbol.for("react.provider") : 60109, o = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, c = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, p = t ? Symbol.for("react.suspense") : 60113, T = t ? Symbol.for("react.suspense_list") : 60120, S = t ? Symbol.for("react.memo") : 60115, E = t ? Symbol.for("react.lazy") : 60116, k = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, g = t ? Symbol.for("react.responder") : 60118, I = t ? Symbol.for("react.scope") : 60119;
|
|
96
96
|
function D(z) {
|
|
97
97
|
return typeof z == "string" || typeof z == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
98
|
-
z === s || z === c || z === a || z === n || z === p || z === T || typeof z == "object" && z !== null && (z.$$typeof === E || z.$$typeof === S || z.$$typeof === i || z.$$typeof === o || z.$$typeof ===
|
|
98
|
+
z === s || z === c || z === a || z === n || z === p || z === T || typeof z == "object" && z !== null && (z.$$typeof === E || z.$$typeof === S || z.$$typeof === i || z.$$typeof === o || z.$$typeof === d || z.$$typeof === _ || z.$$typeof === g || z.$$typeof === I || z.$$typeof === k);
|
|
99
99
|
}
|
|
100
100
|
function A(z) {
|
|
101
101
|
if (typeof z == "object" && z !== null) {
|
|
@@ -115,7 +115,7 @@ function Nu() {
|
|
|
115
115
|
var tt = Xe && Xe.$$typeof;
|
|
116
116
|
switch (tt) {
|
|
117
117
|
case o:
|
|
118
|
-
case
|
|
118
|
+
case d:
|
|
119
119
|
case E:
|
|
120
120
|
case S:
|
|
121
121
|
case i:
|
|
@@ -129,7 +129,7 @@ function Nu() {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
var b = l, x = c, V = o, Q = i, H = e, ce =
|
|
132
|
+
var b = l, x = c, V = o, Q = i, H = e, ce = d, q = s, K = E, se = S, G = r, ge = a, ye = n, be = p, Ne = !1;
|
|
133
133
|
function je(z) {
|
|
134
134
|
return Ne || (Ne = !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.")), O(z) || A(z) === l;
|
|
135
135
|
}
|
|
@@ -146,9 +146,9 @@ function Nu() {
|
|
|
146
146
|
return typeof z == "object" && z !== null && z.$$typeof === e;
|
|
147
147
|
}
|
|
148
148
|
function u(z) {
|
|
149
|
-
return A(z) ===
|
|
149
|
+
return A(z) === d;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function f(z) {
|
|
152
152
|
return A(z) === s;
|
|
153
153
|
}
|
|
154
154
|
function v(z) {
|
|
@@ -169,7 +169,7 @@ function Nu() {
|
|
|
169
169
|
function ee(z) {
|
|
170
170
|
return A(z) === p;
|
|
171
171
|
}
|
|
172
|
-
_e.AsyncMode = b, _e.ConcurrentMode = x, _e.ContextConsumer = V, _e.ContextProvider = Q, _e.Element = H, _e.ForwardRef = ce, _e.Fragment = q, _e.Lazy = K, _e.Memo = se, _e.Portal = G, _e.Profiler = ge, _e.StrictMode = ye, _e.Suspense = be, _e.isAsyncMode = je, _e.isConcurrentMode = O, _e.isContextConsumer = y, _e.isContextProvider = R, _e.isElement = C, _e.isForwardRef = u, _e.isFragment =
|
|
172
|
+
_e.AsyncMode = b, _e.ConcurrentMode = x, _e.ContextConsumer = V, _e.ContextProvider = Q, _e.Element = H, _e.ForwardRef = ce, _e.Fragment = q, _e.Lazy = K, _e.Memo = se, _e.Portal = G, _e.Profiler = ge, _e.StrictMode = ye, _e.Suspense = be, _e.isAsyncMode = je, _e.isConcurrentMode = O, _e.isContextConsumer = y, _e.isContextProvider = R, _e.isElement = C, _e.isForwardRef = u, _e.isFragment = f, _e.isLazy = v, _e.isMemo = N, _e.isPortal = j, _e.isProfiler = B, _e.isStrictMode = L, _e.isSuspense = ee, _e.isValidElementType = D, _e.typeOf = A;
|
|
173
173
|
}()), _e;
|
|
174
174
|
}
|
|
175
175
|
var Ea;
|
|
@@ -201,22 +201,22 @@ function Pu() {
|
|
|
201
201
|
return !1;
|
|
202
202
|
for (var i = {}, o = 0; o < 10; o++)
|
|
203
203
|
i["_" + String.fromCharCode(o)] = o;
|
|
204
|
-
var l = Object.getOwnPropertyNames(i).map(function(
|
|
205
|
-
return i[
|
|
204
|
+
var l = Object.getOwnPropertyNames(i).map(function(d) {
|
|
205
|
+
return i[d];
|
|
206
206
|
});
|
|
207
207
|
if (l.join("") !== "0123456789")
|
|
208
208
|
return !1;
|
|
209
209
|
var c = {};
|
|
210
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
211
|
-
c[
|
|
210
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(d) {
|
|
211
|
+
c[d] = d;
|
|
212
212
|
}), Object.keys(Object.assign({}, c)).join("") === "abcdefghijklmnopqrst";
|
|
213
213
|
} catch {
|
|
214
214
|
return !1;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
return Ms = n() ? Object.assign : function(a, i) {
|
|
218
|
-
for (var o, l = s(a), c,
|
|
219
|
-
o = Object(arguments[
|
|
218
|
+
for (var o, l = s(a), c, d = 1; d < arguments.length; d++) {
|
|
219
|
+
o = Object(arguments[d]);
|
|
220
220
|
for (var p in o)
|
|
221
221
|
e.call(o, p) && (l[p] = o[p]);
|
|
222
222
|
if (t) {
|
|
@@ -260,22 +260,22 @@ function Ru() {
|
|
|
260
260
|
}
|
|
261
261
|
function n(a, i, o, l, c) {
|
|
262
262
|
if (process.env.NODE_ENV !== "production") {
|
|
263
|
-
for (var
|
|
264
|
-
if (s(a,
|
|
263
|
+
for (var d in a)
|
|
264
|
+
if (s(a, d)) {
|
|
265
265
|
var p;
|
|
266
266
|
try {
|
|
267
|
-
if (typeof a[
|
|
267
|
+
if (typeof a[d] != "function") {
|
|
268
268
|
var T = Error(
|
|
269
|
-
(l || "React class") + ": " + o + " type `" +
|
|
269
|
+
(l || "React class") + ": " + o + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
270
270
|
);
|
|
271
271
|
throw T.name = "Invariant Violation", T;
|
|
272
272
|
}
|
|
273
|
-
p = a[
|
|
273
|
+
p = a[d](i, d, l, o, null, e);
|
|
274
274
|
} catch (E) {
|
|
275
275
|
p = E;
|
|
276
276
|
}
|
|
277
277
|
if (p && !(p instanceof Error) && t(
|
|
278
|
-
(l || "React class") + ": type specification of " + o + " `" +
|
|
278
|
+
(l || "React class") + ": type specification of " + o + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
279
279
|
), p instanceof Error && !(p.message in r)) {
|
|
280
280
|
r[p.message] = !0;
|
|
281
281
|
var S = c ? c() : "";
|
|
@@ -309,9 +309,9 @@ function Fu() {
|
|
|
309
309
|
return null;
|
|
310
310
|
}
|
|
311
311
|
return Bs = function(o, l) {
|
|
312
|
-
var c = typeof Symbol == "function" && Symbol.iterator,
|
|
312
|
+
var c = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
313
313
|
function p(O) {
|
|
314
|
-
var y = O && (c && O[c] || O[
|
|
314
|
+
var y = O && (c && O[c] || O[d]);
|
|
315
315
|
if (typeof y == "function")
|
|
316
316
|
return y;
|
|
317
317
|
}
|
|
@@ -346,7 +346,7 @@ function Fu() {
|
|
|
346
346
|
function _(O) {
|
|
347
347
|
if (process.env.NODE_ENV !== "production")
|
|
348
348
|
var y = {}, R = 0;
|
|
349
|
-
function C(
|
|
349
|
+
function C(f, v, N, j, B, L, ee) {
|
|
350
350
|
if (j = j || T, L = L || N, ee !== r) {
|
|
351
351
|
if (l) {
|
|
352
352
|
var z = new Error(
|
|
@@ -361,18 +361,18 @@ function Fu() {
|
|
|
361
361
|
), y[he] = !0, R++);
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
return v[N] == null ?
|
|
364
|
+
return v[N] == null ? f ? v[N] === null ? new k("The " + B + " `" + L + "` is marked as required " + ("in `" + j + "`, but its value is `null`.")) : new k("The " + B + " `" + L + "` is marked as required in " + ("`" + j + "`, but its value is `undefined`.")) : null : O(v, N, j, B, L);
|
|
365
365
|
}
|
|
366
366
|
var u = C.bind(null, !1);
|
|
367
367
|
return u.isRequired = C.bind(null, !0), u;
|
|
368
368
|
}
|
|
369
369
|
function g(O) {
|
|
370
|
-
function y(R, C, u,
|
|
370
|
+
function y(R, C, u, f, v, N) {
|
|
371
371
|
var j = R[C], B = ye(j);
|
|
372
372
|
if (B !== O) {
|
|
373
373
|
var L = be(j);
|
|
374
374
|
return new k(
|
|
375
|
-
"Invalid " +
|
|
375
|
+
"Invalid " + f + " `" + v + "` of type " + ("`" + L + "` supplied to `" + u + "`, expected ") + ("`" + O + "`."),
|
|
376
376
|
{ expectedType: O }
|
|
377
377
|
);
|
|
378
378
|
}
|
|
@@ -384,16 +384,16 @@ function Fu() {
|
|
|
384
384
|
return _(i);
|
|
385
385
|
}
|
|
386
386
|
function D(O) {
|
|
387
|
-
function y(R, C, u,
|
|
387
|
+
function y(R, C, u, f, v) {
|
|
388
388
|
if (typeof O != "function")
|
|
389
389
|
return new k("Property `" + v + "` of component `" + u + "` has invalid PropType notation inside arrayOf.");
|
|
390
390
|
var N = R[C];
|
|
391
391
|
if (!Array.isArray(N)) {
|
|
392
392
|
var j = ye(N);
|
|
393
|
-
return new k("Invalid " +
|
|
393
|
+
return new k("Invalid " + f + " `" + v + "` of type " + ("`" + j + "` supplied to `" + u + "`, expected an array."));
|
|
394
394
|
}
|
|
395
395
|
for (var B = 0; B < N.length; B++) {
|
|
396
|
-
var L = O(N, B, u,
|
|
396
|
+
var L = O(N, B, u, f, v + "[" + B + "]", r);
|
|
397
397
|
if (L instanceof Error)
|
|
398
398
|
return L;
|
|
399
399
|
}
|
|
@@ -402,32 +402,32 @@ function Fu() {
|
|
|
402
402
|
return _(y);
|
|
403
403
|
}
|
|
404
404
|
function A() {
|
|
405
|
-
function O(y, R, C, u,
|
|
405
|
+
function O(y, R, C, u, f) {
|
|
406
406
|
var v = y[R];
|
|
407
407
|
if (!o(v)) {
|
|
408
408
|
var N = ye(v);
|
|
409
|
-
return new k("Invalid " + u + " `" +
|
|
409
|
+
return new k("Invalid " + u + " `" + f + "` of type " + ("`" + N + "` supplied to `" + C + "`, expected a single ReactElement."));
|
|
410
410
|
}
|
|
411
411
|
return null;
|
|
412
412
|
}
|
|
413
413
|
return _(O);
|
|
414
414
|
}
|
|
415
415
|
function b() {
|
|
416
|
-
function O(y, R, C, u,
|
|
416
|
+
function O(y, R, C, u, f) {
|
|
417
417
|
var v = y[R];
|
|
418
418
|
if (!t.isValidElementType(v)) {
|
|
419
419
|
var N = ye(v);
|
|
420
|
-
return new k("Invalid " + u + " `" +
|
|
420
|
+
return new k("Invalid " + u + " `" + f + "` of type " + ("`" + N + "` supplied to `" + C + "`, expected a single ReactElement type."));
|
|
421
421
|
}
|
|
422
422
|
return null;
|
|
423
423
|
}
|
|
424
424
|
return _(O);
|
|
425
425
|
}
|
|
426
426
|
function x(O) {
|
|
427
|
-
function y(R, C, u,
|
|
427
|
+
function y(R, C, u, f, v) {
|
|
428
428
|
if (!(R[C] instanceof O)) {
|
|
429
429
|
var N = O.name || T, j = je(R[C]);
|
|
430
|
-
return new k("Invalid " +
|
|
430
|
+
return new k("Invalid " + f + " `" + v + "` of type " + ("`" + j + "` supplied to `" + u + "`, expected ") + ("instance of `" + N + "`."));
|
|
431
431
|
}
|
|
432
432
|
return null;
|
|
433
433
|
}
|
|
@@ -438,7 +438,7 @@ function Fu() {
|
|
|
438
438
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
439
439
|
"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])."
|
|
440
440
|
) : a("Invalid argument supplied to oneOf, expected an array.")), i;
|
|
441
|
-
function y(R, C, u,
|
|
441
|
+
function y(R, C, u, f, v) {
|
|
442
442
|
for (var N = R[C], j = 0; j < O.length; j++)
|
|
443
443
|
if (E(N, O[j]))
|
|
444
444
|
return null;
|
|
@@ -446,20 +446,20 @@ function Fu() {
|
|
|
446
446
|
var he = be(z);
|
|
447
447
|
return he === "symbol" ? String(z) : z;
|
|
448
448
|
});
|
|
449
|
-
return new k("Invalid " +
|
|
449
|
+
return new k("Invalid " + f + " `" + v + "` of value `" + String(N) + "` " + ("supplied to `" + u + "`, expected one of " + B + "."));
|
|
450
450
|
}
|
|
451
451
|
return _(y);
|
|
452
452
|
}
|
|
453
453
|
function Q(O) {
|
|
454
|
-
function y(R, C, u,
|
|
454
|
+
function y(R, C, u, f, v) {
|
|
455
455
|
if (typeof O != "function")
|
|
456
456
|
return new k("Property `" + v + "` of component `" + u + "` has invalid PropType notation inside objectOf.");
|
|
457
457
|
var N = R[C], j = ye(N);
|
|
458
458
|
if (j !== "object")
|
|
459
|
-
return new k("Invalid " +
|
|
459
|
+
return new k("Invalid " + f + " `" + v + "` of type " + ("`" + j + "` supplied to `" + u + "`, expected an object."));
|
|
460
460
|
for (var B in N)
|
|
461
461
|
if (s(N, B)) {
|
|
462
|
-
var L = O(N, B, u,
|
|
462
|
+
var L = O(N, B, u, f, v + "." + B, r);
|
|
463
463
|
if (L instanceof Error)
|
|
464
464
|
return L;
|
|
465
465
|
}
|
|
@@ -477,9 +477,9 @@ function Fu() {
|
|
|
477
477
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Ne(R) + " at index " + y + "."
|
|
478
478
|
), i;
|
|
479
479
|
}
|
|
480
|
-
function C(u,
|
|
480
|
+
function C(u, f, v, N, j) {
|
|
481
481
|
for (var B = [], L = 0; L < O.length; L++) {
|
|
482
|
-
var ee = O[L], z = ee(u,
|
|
482
|
+
var ee = O[L], z = ee(u, f, v, N, j, r);
|
|
483
483
|
if (z == null)
|
|
484
484
|
return null;
|
|
485
485
|
z.data && s(z.data, "expectedType") && B.push(z.data.expectedType);
|
|
@@ -490,8 +490,8 @@ function Fu() {
|
|
|
490
490
|
return _(C);
|
|
491
491
|
}
|
|
492
492
|
function ce() {
|
|
493
|
-
function O(y, R, C, u,
|
|
494
|
-
return G(y[R]) ? null : new k("Invalid " + u + " `" +
|
|
493
|
+
function O(y, R, C, u, f) {
|
|
494
|
+
return G(y[R]) ? null : new k("Invalid " + u + " `" + f + "` supplied to " + ("`" + C + "`, expected a ReactNode."));
|
|
495
495
|
}
|
|
496
496
|
return _(O);
|
|
497
497
|
}
|
|
@@ -501,15 +501,15 @@ function Fu() {
|
|
|
501
501
|
);
|
|
502
502
|
}
|
|
503
503
|
function K(O) {
|
|
504
|
-
function y(R, C, u,
|
|
504
|
+
function y(R, C, u, f, v) {
|
|
505
505
|
var N = R[C], j = ye(N);
|
|
506
506
|
if (j !== "object")
|
|
507
|
-
return new k("Invalid " +
|
|
507
|
+
return new k("Invalid " + f + " `" + v + "` of type `" + j + "` " + ("supplied to `" + u + "`, expected `object`."));
|
|
508
508
|
for (var B in O) {
|
|
509
509
|
var L = O[B];
|
|
510
510
|
if (typeof L != "function")
|
|
511
|
-
return q(u,
|
|
512
|
-
var ee = L(N, B, u,
|
|
511
|
+
return q(u, f, v, B, be(L));
|
|
512
|
+
var ee = L(N, B, u, f, v + "." + B, r);
|
|
513
513
|
if (ee)
|
|
514
514
|
return ee;
|
|
515
515
|
}
|
|
@@ -518,21 +518,21 @@ function Fu() {
|
|
|
518
518
|
return _(y);
|
|
519
519
|
}
|
|
520
520
|
function se(O) {
|
|
521
|
-
function y(R, C, u,
|
|
521
|
+
function y(R, C, u, f, v) {
|
|
522
522
|
var N = R[C], j = ye(N);
|
|
523
523
|
if (j !== "object")
|
|
524
|
-
return new k("Invalid " +
|
|
524
|
+
return new k("Invalid " + f + " `" + v + "` of type `" + j + "` " + ("supplied to `" + u + "`, expected `object`."));
|
|
525
525
|
var B = e({}, R[C], O);
|
|
526
526
|
for (var L in B) {
|
|
527
527
|
var ee = O[L];
|
|
528
528
|
if (s(O, L) && typeof ee != "function")
|
|
529
|
-
return q(u,
|
|
529
|
+
return q(u, f, v, L, be(ee));
|
|
530
530
|
if (!ee)
|
|
531
531
|
return new k(
|
|
532
|
-
"Invalid " +
|
|
532
|
+
"Invalid " + f + " `" + v + "` key `" + L + "` supplied to `" + u + "`.\nBad object: " + JSON.stringify(R[C], null, " ") + `
|
|
533
533
|
Valid keys: ` + JSON.stringify(Object.keys(O), null, " ")
|
|
534
534
|
);
|
|
535
|
-
var z = ee(N, L, u,
|
|
535
|
+
var z = ee(N, L, u, f, v + "." + L, r);
|
|
536
536
|
if (z)
|
|
537
537
|
return z;
|
|
538
538
|
}
|
|
@@ -623,7 +623,7 @@ function Mu() {
|
|
|
623
623
|
function r() {
|
|
624
624
|
}
|
|
625
625
|
return r.resetWarningCache = e, Ls = function() {
|
|
626
|
-
function s(i, o, l, c,
|
|
626
|
+
function s(i, o, l, c, d, p) {
|
|
627
627
|
if (p !== t) {
|
|
628
628
|
var T = new Error(
|
|
629
629
|
"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"
|
|
@@ -796,7 +796,7 @@ const h = /* @__PURE__ */ hn(Vu), Ia = {
|
|
|
796
796
|
Regular: "regular",
|
|
797
797
|
Light: "light",
|
|
798
798
|
Extralight: "extralight"
|
|
799
|
-
},
|
|
799
|
+
}, at = {
|
|
800
800
|
name: "Icon",
|
|
801
801
|
class: "ds-icon",
|
|
802
802
|
props: {
|
|
@@ -845,43 +845,43 @@ const h = /* @__PURE__ */ hn(Vu), Ia = {
|
|
|
845
845
|
};
|
|
846
846
|
var Ji = /* @__PURE__ */ ((t) => (t[t.bold = 700] = "bold", t[t.semibold = 600] = "semibold", t[t.medium = 500] = "medium", t[t.regular = 400] = "regular", t[t.light = 300] = "light", t[t.extralight = 200] = "extralight", t))(Ji || {});
|
|
847
847
|
const Ae = ({
|
|
848
|
-
image: t =
|
|
849
|
-
color: e =
|
|
848
|
+
image: t = at.props.image.default,
|
|
849
|
+
color: e = at.props.color.default,
|
|
850
850
|
className: r,
|
|
851
|
-
size: s =
|
|
852
|
-
fill: n =
|
|
853
|
-
weight: a =
|
|
851
|
+
size: s = at.props.size.default,
|
|
852
|
+
fill: n = at.props.fill.default,
|
|
853
|
+
weight: a = at.props.weight.default,
|
|
854
854
|
testId: i = "ds-icon-test",
|
|
855
|
-
onClick: o =
|
|
855
|
+
onClick: o = at.props.onClick.default
|
|
856
856
|
}) => {
|
|
857
|
-
const l = "material-symbols-rounded", c = e &&
|
|
857
|
+
const l = "material-symbols-rounded", c = e && at.props.color.options.find((p) => p === e) && `${at.class}__color--${e}`, d = Ke(() => ({
|
|
858
858
|
fontVariationSettings: `'FILL' ${n ? 1 : 0}, 'GRAD' 0,'wght' ${Ji[a]}, 'opsz' 48`
|
|
859
859
|
}), [a, n]);
|
|
860
860
|
return /* @__PURE__ */ P(
|
|
861
861
|
"i",
|
|
862
862
|
{
|
|
863
863
|
className: [
|
|
864
|
-
`${
|
|
865
|
-
|
|
864
|
+
`${at.class}--${s}`,
|
|
865
|
+
at.class,
|
|
866
866
|
l,
|
|
867
867
|
c,
|
|
868
868
|
r && r
|
|
869
869
|
].filter((p) => p).join(" "),
|
|
870
870
|
"data-testid": i,
|
|
871
871
|
onClick: o,
|
|
872
|
-
style:
|
|
872
|
+
style: d,
|
|
873
873
|
translate: "no",
|
|
874
874
|
children: t
|
|
875
875
|
}
|
|
876
876
|
);
|
|
877
877
|
};
|
|
878
878
|
Ae.propTypes = {
|
|
879
|
-
color: h.oneOf(
|
|
879
|
+
color: h.oneOf(at.props.color.options),
|
|
880
880
|
image: h.string,
|
|
881
881
|
fontVariationSettings: h.object,
|
|
882
|
-
size: h.oneOf(
|
|
882
|
+
size: h.oneOf(at.props.size.options),
|
|
883
883
|
fill: h.bool,
|
|
884
|
-
weight: h.oneOf(
|
|
884
|
+
weight: h.oneOf(at.props.weight.options),
|
|
885
885
|
onClick: h.func
|
|
886
886
|
};
|
|
887
887
|
Ae.displayName = "DsIcon";
|
|
@@ -896,12 +896,12 @@ const gs = ({
|
|
|
896
896
|
testId: o = i || "ds-button-test",
|
|
897
897
|
elevation: l,
|
|
898
898
|
variant: c = Se.props.variant.default,
|
|
899
|
-
color:
|
|
899
|
+
color: d = Se.props.color.default,
|
|
900
900
|
iconFill: p = Se.props.iconFill.default,
|
|
901
901
|
iconPosition: T = Se.props.iconPosition.default,
|
|
902
902
|
fullSize: S = Se.props.fullSize.default
|
|
903
903
|
}) => {
|
|
904
|
-
const E = s && Se.props.size.options.find((x) => x === s) ? `${Se.class}--${s}` : `${Se.class}__${Se.props.size.default}`, k = n && `${Se.class}--disabled`, _ = `${Se.class}__${
|
|
904
|
+
const E = s && Se.props.size.options.find((x) => x === s) ? `${Se.class}--${s}` : `${Se.class}__${Se.props.size.default}`, k = n && `${Se.class}--disabled`, _ = `${Se.class}__${d}--${c}`, g = l && `${Se.class}--elevation-${l}`, I = a && `${Se.class}--with-icon`, D = S ? `${Se.class}--full-size` : "", A = T === "right" ? `${Se.class}__icon` : `${Se.class}__icon--left`, b = T === "right" ? `${Se.class}__text` : `${Se.class}__text--reversed`;
|
|
905
905
|
return /* @__PURE__ */ P(
|
|
906
906
|
"button",
|
|
907
907
|
{
|
|
@@ -917,6 +917,7 @@ const gs = ({
|
|
|
917
917
|
e && e
|
|
918
918
|
].filter((x) => x).join(" "),
|
|
919
919
|
"data-testid": o,
|
|
920
|
+
disabled: n,
|
|
920
921
|
id: i,
|
|
921
922
|
onClick: n ? () => {
|
|
922
923
|
} : r,
|
|
@@ -1007,7 +1008,7 @@ const ts = {
|
|
|
1007
1008
|
Info: "info",
|
|
1008
1009
|
InfoLight: "info-light",
|
|
1009
1010
|
InfoLighter: "info-lighter"
|
|
1010
|
-
},
|
|
1011
|
+
}, mt = {
|
|
1011
1012
|
name: "Card",
|
|
1012
1013
|
class: "ds-card",
|
|
1013
1014
|
props: {
|
|
@@ -1025,34 +1026,48 @@ const ts = {
|
|
|
1025
1026
|
type: Number,
|
|
1026
1027
|
default: 0,
|
|
1027
1028
|
options: [0, 1, 2, 3, 4]
|
|
1029
|
+
},
|
|
1030
|
+
id: {
|
|
1031
|
+
type: String,
|
|
1032
|
+
default: ""
|
|
1033
|
+
},
|
|
1034
|
+
testId: {
|
|
1035
|
+
type: String,
|
|
1036
|
+
default: "ds-card"
|
|
1028
1037
|
}
|
|
1029
1038
|
}
|
|
1030
1039
|
}, Qi = ({
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1040
|
+
id: t,
|
|
1041
|
+
testId: e = mt.props.testId.default,
|
|
1042
|
+
children: r,
|
|
1043
|
+
className: s,
|
|
1044
|
+
elevation: n = mt.props.elevation.default,
|
|
1045
|
+
backgroundColor: a = mt.props.backgroundColor.default,
|
|
1046
|
+
borderColor: i = mt.props.borderColor.default
|
|
1036
1047
|
}) => {
|
|
1037
|
-
const
|
|
1048
|
+
const o = n && `${mt.class}--elevation-${n}`, l = i && `${mt.class}--border-${i}`, c = a && `${mt.class}--${a}`;
|
|
1038
1049
|
return /* @__PURE__ */ P(
|
|
1039
1050
|
"div",
|
|
1040
1051
|
{
|
|
1041
1052
|
className: [
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
].filter((
|
|
1048
|
-
|
|
1053
|
+
mt.class,
|
|
1054
|
+
s,
|
|
1055
|
+
o,
|
|
1056
|
+
l,
|
|
1057
|
+
c
|
|
1058
|
+
].filter((d) => d).join(" "),
|
|
1059
|
+
"data-testid": e,
|
|
1060
|
+
id: t,
|
|
1061
|
+
children: r
|
|
1049
1062
|
}
|
|
1050
1063
|
);
|
|
1051
1064
|
};
|
|
1052
1065
|
Qi.propTypes = {
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1066
|
+
id: h.string,
|
|
1067
|
+
testId: h.string,
|
|
1068
|
+
backgroundColor: h.oneOf(mt.props.backgroundColor.options),
|
|
1069
|
+
borderColor: h.oneOf(mt.props.borderColor.options),
|
|
1070
|
+
elevation: h.oneOf(mt.props.elevation.options)
|
|
1056
1071
|
};
|
|
1057
1072
|
Qi.displayName = "DsCard";
|
|
1058
1073
|
const st = {
|
|
@@ -1088,7 +1103,7 @@ const st = {
|
|
|
1088
1103
|
default: () => ({})
|
|
1089
1104
|
}
|
|
1090
1105
|
}
|
|
1091
|
-
}, eo =
|
|
1106
|
+
}, eo = yt.forwardRef(
|
|
1092
1107
|
({
|
|
1093
1108
|
id: t,
|
|
1094
1109
|
className: e,
|
|
@@ -1100,7 +1115,7 @@ const st = {
|
|
|
1100
1115
|
disabled: o = st.props.checked.default,
|
|
1101
1116
|
onChangeHandler: l
|
|
1102
1117
|
}, c) => {
|
|
1103
|
-
const
|
|
1118
|
+
const d = i || !1, [p, T] = Z(d), S = {
|
|
1104
1119
|
image: p ? "check_box" : "check_box_outline_blank",
|
|
1105
1120
|
class: p ? `${st.class}__icon--checked` : `${st.class}__icon--unchecked`
|
|
1106
1121
|
}, E = o && `${st.class}--disabled`, k = (_) => {
|
|
@@ -2008,13 +2023,13 @@ class We {
|
|
|
2008
2023
|
const l = this.state;
|
|
2009
2024
|
if (this.overwrite === !0) {
|
|
2010
2025
|
i = s.state;
|
|
2011
|
-
for (let
|
|
2026
|
+
for (let d = 0; d < a.rawInserted.length; ++d)
|
|
2012
2027
|
s.unshift(this.displayValue.length - a.tailShift);
|
|
2013
2028
|
}
|
|
2014
2029
|
let c = this.appendTail(s);
|
|
2015
2030
|
if (o = c.rawInserted.length === s.toString().length, !(o && c.inserted) && this.overwrite === "shift") {
|
|
2016
2031
|
this.state = l, i = s.state;
|
|
2017
|
-
for (let
|
|
2032
|
+
for (let d = 0; d < a.rawInserted.length; ++d)
|
|
2018
2033
|
s.shift();
|
|
2019
2034
|
c = this.appendTail(s), o = c.rawInserted.length === s.toString().length;
|
|
2020
2035
|
}
|
|
@@ -2094,9 +2109,9 @@ class We {
|
|
|
2094
2109
|
l && (n = Lu(n), c = this.extractInput(0, i, {
|
|
2095
2110
|
raw: !0
|
|
2096
2111
|
}));
|
|
2097
|
-
let
|
|
2112
|
+
let d = e;
|
|
2098
2113
|
const p = new ue();
|
|
2099
|
-
if (n !== X.NONE && (
|
|
2114
|
+
if (n !== X.NONE && (d = this.nearestInputPos(e, r > 1 && e !== 0 && !l ? X.NONE : n), p.tailShift = d - e), p.aggregate(this.remove(d)), l && n !== X.NONE && c === this.rawInputValue)
|
|
2100
2115
|
if (n === X.FORCE_LEFT) {
|
|
2101
2116
|
let T;
|
|
2102
2117
|
for (; c === this.rawInputValue && (T = this.displayValue.length); )
|
|
@@ -2599,9 +2614,9 @@ class Ye extends We {
|
|
|
2599
2614
|
let s = !1, n = !1;
|
|
2600
2615
|
for (let a = 0; a < r.length; ++a) {
|
|
2601
2616
|
if (this.blocks) {
|
|
2602
|
-
const c = r.slice(a),
|
|
2603
|
-
|
|
2604
|
-
const p =
|
|
2617
|
+
const c = r.slice(a), d = Object.keys(this.blocks).filter((T) => c.indexOf(T) === 0);
|
|
2618
|
+
d.sort((T, S) => S.length - T.length);
|
|
2619
|
+
const p = d[0];
|
|
2605
2620
|
if (p) {
|
|
2606
2621
|
const {
|
|
2607
2622
|
expose: T,
|
|
@@ -3101,7 +3116,7 @@ class Os extends We {
|
|
|
3101
3116
|
}
|
|
3102
3117
|
_applyDispatch(e, r, s) {
|
|
3103
3118
|
e === void 0 && (e = ""), r === void 0 && (r = {}), s === void 0 && (s = "");
|
|
3104
|
-
const n = r.tail && r._beforeTailState != null ? r._beforeTailState._value : this.value, a = this.rawInputValue, i = r.tail && r._beforeTailState != null ? r._beforeTailState._rawInputValue : a, o = a.slice(i.length), l = this.currentMask, c = new ue(),
|
|
3119
|
+
const n = r.tail && r._beforeTailState != null ? r._beforeTailState._value : this.value, a = this.rawInputValue, i = r.tail && r._beforeTailState != null ? r._beforeTailState._rawInputValue : a, o = a.slice(i.length), l = this.currentMask, c = new ue(), d = l == null ? void 0 : l.state;
|
|
3105
3120
|
return this.currentMask = this.doDispatch(e, {
|
|
3106
3121
|
...r
|
|
3107
3122
|
}, s), this.currentMask && (this.currentMask !== l ? (this.currentMask.reset(), i && (this.currentMask.append(i, {
|
|
@@ -3109,7 +3124,7 @@ class Os extends We {
|
|
|
3109
3124
|
}), c.tailShift = this.currentMask.value.length - n.length), o && (c.tailShift += this.currentMask.append(o, {
|
|
3110
3125
|
raw: !0,
|
|
3111
3126
|
tail: !0
|
|
3112
|
-
}).tailShift)) :
|
|
3127
|
+
}).tailShift)) : d && (this.currentMask.state = d)), c;
|
|
3113
3128
|
}
|
|
3114
3129
|
_appendPlaceholder() {
|
|
3115
3130
|
const e = this._applyDispatch();
|
|
@@ -3362,7 +3377,7 @@ class Wu extends We {
|
|
|
3362
3377
|
}
|
|
3363
3378
|
te.MaskedFunction = Wu;
|
|
3364
3379
|
var oo;
|
|
3365
|
-
class
|
|
3380
|
+
class it extends We {
|
|
3366
3381
|
/** Single char */
|
|
3367
3382
|
/** Single char */
|
|
3368
3383
|
/** Array of single chars */
|
|
@@ -3379,7 +3394,7 @@ class at extends We {
|
|
|
3379
3394
|
/** Parse string to get typed value */
|
|
3380
3395
|
constructor(e) {
|
|
3381
3396
|
super({
|
|
3382
|
-
...
|
|
3397
|
+
...it.DEFAULTS,
|
|
3383
3398
|
...e
|
|
3384
3399
|
});
|
|
3385
3400
|
}
|
|
@@ -3436,7 +3451,7 @@ class at extends We {
|
|
|
3436
3451
|
let o = !isNaN(i), l = !1;
|
|
3437
3452
|
if (o) {
|
|
3438
3453
|
let T;
|
|
3439
|
-
this.min != null && this.min < 0 && this.number < this.min && (T = this.min), this.max != null && this.max > 0 && this.number > this.max && (T = this.max), T != null && (this.autofix ? (this._value = this.format(T, this).replace(
|
|
3454
|
+
this.min != null && this.min < 0 && this.number < this.min && (T = this.min), this.max != null && this.max > 0 && this.number > this.max && (T = this.max), T != null && (this.autofix ? (this._value = this.format(T, this).replace(it.UNMASKED_RADIX, this.radix), l || (l = a === this._value && !r.tail)) : o = !1), o && (o = !!this._value.match(this._numberRegExp));
|
|
3440
3455
|
}
|
|
3441
3456
|
let c;
|
|
3442
3457
|
o ? c = new ue({
|
|
@@ -3444,7 +3459,7 @@ class at extends We {
|
|
|
3444
3459
|
rawInserted: l ? "" : e,
|
|
3445
3460
|
skip: l
|
|
3446
3461
|
}) : (this._value = a, c = new ue()), this._value = this._insertThousandsSeparators(this._value);
|
|
3447
|
-
const
|
|
3462
|
+
const d = r.tail && r._beforeTailState ? r._beforeTailState._value : this._value, p = this._separatorsCountFromSlice(d);
|
|
3448
3463
|
return c.tailShift += (p - n) * this.thousandsSeparator.length, c;
|
|
3449
3464
|
}
|
|
3450
3465
|
_findSeparatorAround(e) {
|
|
@@ -3516,11 +3531,11 @@ class at extends We {
|
|
|
3516
3531
|
}
|
|
3517
3532
|
doSkipInvalid(e, r, s) {
|
|
3518
3533
|
r === void 0 && (r = {});
|
|
3519
|
-
const n = this.scale === 0 && e !== this.thousandsSeparator && (e === this.radix || e ===
|
|
3534
|
+
const n = this.scale === 0 && e !== this.thousandsSeparator && (e === this.radix || e === it.UNMASKED_RADIX || this.mapToRadix.includes(e));
|
|
3520
3535
|
return super.doSkipInvalid(e, r, s) && !n;
|
|
3521
3536
|
}
|
|
3522
3537
|
get unmaskedValue() {
|
|
3523
|
-
return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,
|
|
3538
|
+
return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, it.UNMASKED_RADIX);
|
|
3524
3539
|
}
|
|
3525
3540
|
set unmaskedValue(e) {
|
|
3526
3541
|
super.unmaskedValue = e;
|
|
@@ -3529,7 +3544,7 @@ class at extends We {
|
|
|
3529
3544
|
return this.parse(this.unmaskedValue, this);
|
|
3530
3545
|
}
|
|
3531
3546
|
set typedValue(e) {
|
|
3532
|
-
this.rawInputValue = this.format(e, this).replace(
|
|
3547
|
+
this.rawInputValue = this.format(e, this).replace(it.UNMASKED_RADIX, this.radix);
|
|
3533
3548
|
}
|
|
3534
3549
|
/** Parsed Number */
|
|
3535
3550
|
get number() {
|
|
@@ -3545,13 +3560,13 @@ class at extends We {
|
|
|
3545
3560
|
return this.min != null && this.min > 0 || this.max != null && this.max > 0;
|
|
3546
3561
|
}
|
|
3547
3562
|
typedValueEquals(e) {
|
|
3548
|
-
return (super.typedValueEquals(e) ||
|
|
3563
|
+
return (super.typedValueEquals(e) || it.EMPTY_VALUES.includes(e) && it.EMPTY_VALUES.includes(this.typedValue)) && !(e === 0 && this.value === "");
|
|
3549
3564
|
}
|
|
3550
3565
|
}
|
|
3551
|
-
oo =
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3566
|
+
oo = it;
|
|
3567
|
+
it.UNMASKED_RADIX = ".";
|
|
3568
|
+
it.EMPTY_VALUES = [...We.EMPTY_VALUES, 0];
|
|
3569
|
+
it.DEFAULTS = {
|
|
3555
3570
|
...We.DEFAULTS,
|
|
3556
3571
|
mask: Number,
|
|
3557
3572
|
radix: ",",
|
|
@@ -3568,7 +3583,7 @@ at.DEFAULTS = {
|
|
|
3568
3583
|
maximumFractionDigits: 20
|
|
3569
3584
|
})
|
|
3570
3585
|
};
|
|
3571
|
-
te.MaskedNumber =
|
|
3586
|
+
te.MaskedNumber = it;
|
|
3572
3587
|
const tn = {
|
|
3573
3588
|
MASKED: "value",
|
|
3574
3589
|
UNMASKED: "unmaskedValue",
|
|
@@ -3631,10 +3646,10 @@ class Xu extends Ye {
|
|
|
3631
3646
|
r === void 0 && (r = {});
|
|
3632
3647
|
const s = new ue();
|
|
3633
3648
|
for (
|
|
3634
|
-
let l = (n = (a = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : a.index) != null ? n : Math.max(this._blocks.length - 1, 0), c,
|
|
3649
|
+
let l = (n = (a = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : a.index) != null ? n : Math.max(this._blocks.length - 1, 0), c, d;
|
|
3635
3650
|
// try to get a block or
|
|
3636
3651
|
// try to allocate a new block if not allocated already
|
|
3637
|
-
c = (i = this._blocks[l]) != null ? i :
|
|
3652
|
+
c = (i = this._blocks[l]) != null ? i : d = !d && this._allocateBlock(l);
|
|
3638
3653
|
++l
|
|
3639
3654
|
) {
|
|
3640
3655
|
var n, a, i, o;
|
|
@@ -3642,7 +3657,7 @@ class Xu extends Ye {
|
|
|
3642
3657
|
...r,
|
|
3643
3658
|
_beforeTailState: (o = r._beforeTailState) == null || (o = o._blocks) == null ? void 0 : o[l]
|
|
3644
3659
|
});
|
|
3645
|
-
if (p.skip &&
|
|
3660
|
+
if (p.skip && d) {
|
|
3646
3661
|
this._blocks.pop(), this.mask = this.mask.slice(1);
|
|
3647
3662
|
break;
|
|
3648
3663
|
}
|
|
@@ -3735,7 +3750,7 @@ const lo = {
|
|
|
3735
3750
|
}, co = Object.keys(lo).filter((t) => t !== "value"), Ju = ["value", "unmask", "onAccept", "onComplete", "inputRef"], Zu = co.filter((t) => Ju.indexOf(t) < 0);
|
|
3736
3751
|
function Qu(t) {
|
|
3737
3752
|
var e;
|
|
3738
|
-
const r = (e = class extends
|
|
3753
|
+
const r = (e = class extends yt.Component {
|
|
3739
3754
|
constructor(a) {
|
|
3740
3755
|
super(a), this._inputRef = this._inputRef.bind(this);
|
|
3741
3756
|
}
|
|
@@ -3792,13 +3807,13 @@ function Qu(t) {
|
|
|
3792
3807
|
this.props.onComplete && this.maskRef && this.props.onComplete(this.maskValue, this.maskRef, a);
|
|
3793
3808
|
}
|
|
3794
3809
|
render() {
|
|
3795
|
-
return
|
|
3810
|
+
return yt.createElement(t, {
|
|
3796
3811
|
...this._extractNonMaskProps(this.props),
|
|
3797
3812
|
inputRef: this._inputRef
|
|
3798
3813
|
});
|
|
3799
3814
|
}
|
|
3800
3815
|
}, e.displayName = void 0, e.propTypes = void 0, e), s = t.displayName || t.name || "Component";
|
|
3801
|
-
return r.displayName = "IMask(" + s + ")", r.propTypes = lo,
|
|
3816
|
+
return r.displayName = "IMask(" + s + ")", r.propTypes = lo, yt.forwardRef((n, a) => yt.createElement(r, {
|
|
3802
3817
|
...n,
|
|
3803
3818
|
ref: a
|
|
3804
3819
|
}));
|
|
@@ -3808,15 +3823,15 @@ const el = Qu((t) => {
|
|
|
3808
3823
|
inputRef: e,
|
|
3809
3824
|
...r
|
|
3810
3825
|
} = t;
|
|
3811
|
-
return
|
|
3826
|
+
return yt.createElement("input", {
|
|
3812
3827
|
...r,
|
|
3813
3828
|
ref: e
|
|
3814
3829
|
});
|
|
3815
|
-
}), tl = (t, e) =>
|
|
3830
|
+
}), tl = (t, e) => yt.createElement(el, {
|
|
3816
3831
|
...t,
|
|
3817
3832
|
ref: e
|
|
3818
3833
|
});
|
|
3819
|
-
|
|
3834
|
+
yt.forwardRef(tl);
|
|
3820
3835
|
function rl(t, e) {
|
|
3821
3836
|
let {
|
|
3822
3837
|
onAccept: r,
|
|
@@ -3826,12 +3841,12 @@ function rl(t, e) {
|
|
|
3826
3841
|
defaultUnmaskedValue: i,
|
|
3827
3842
|
defaultTypedValue: o
|
|
3828
3843
|
} = e === void 0 ? {} : e;
|
|
3829
|
-
const l = zr(null), [c,
|
|
3844
|
+
const l = zr(null), [c, d] = Z({}), [p, T] = Z(""), [S, E] = Z(""), [k, _] = Z(), g = de(() => {
|
|
3830
3845
|
var b;
|
|
3831
3846
|
(b = l.current) == null || b.destroy(), l.current = null;
|
|
3832
3847
|
}, []), I = de(() => {
|
|
3833
3848
|
const b = l.current;
|
|
3834
|
-
b && (
|
|
3849
|
+
b && (d({
|
|
3835
3850
|
value: b.value,
|
|
3836
3851
|
unmaskedValue: b.unmaskedValue,
|
|
3837
3852
|
typedValue: b.typedValue
|
|
@@ -3845,19 +3860,19 @@ function rl(t, e) {
|
|
|
3845
3860
|
value: b,
|
|
3846
3861
|
...x
|
|
3847
3862
|
} = c, V = l.current;
|
|
3848
|
-
!V || p === void 0 || (b !== p && (V.value = p, V.value !== p && D()),
|
|
3863
|
+
!V || p === void 0 || (b !== p && (V.value = p, V.value !== p && D()), d(x));
|
|
3849
3864
|
}, [p]), $e(() => {
|
|
3850
3865
|
const {
|
|
3851
3866
|
unmaskedValue: b,
|
|
3852
3867
|
...x
|
|
3853
3868
|
} = c, V = l.current;
|
|
3854
|
-
!V || S === void 0 || (b !== S && (V.unmaskedValue = S, V.unmaskedValue !== S && D()),
|
|
3869
|
+
!V || S === void 0 || (b !== S && (V.unmaskedValue = S, V.unmaskedValue !== S && D()), d(x));
|
|
3855
3870
|
}, [S]), $e(() => {
|
|
3856
3871
|
const {
|
|
3857
3872
|
typedValue: b,
|
|
3858
3873
|
...x
|
|
3859
3874
|
} = c, V = l.current;
|
|
3860
|
-
!V || k === void 0 || (b !== k && (V.typedValue = k, V.masked.typedValueEquals(k) || D()),
|
|
3875
|
+
!V || k === void 0 || (b !== k && (V.typedValue = k, V.masked.typedValueEquals(k) || D()), d(x));
|
|
3861
3876
|
}, [k]), $e(() => {
|
|
3862
3877
|
const b = n.current;
|
|
3863
3878
|
if (!b || !(t != null && t.mask))
|
|
@@ -4014,7 +4029,7 @@ const Ua = {
|
|
|
4014
4029
|
padFractionalZeros: !0,
|
|
4015
4030
|
normalizeZeros: !1,
|
|
4016
4031
|
radix: ",",
|
|
4017
|
-
mapToRadix: ["
|
|
4032
|
+
mapToRadix: [","]
|
|
4018
4033
|
}
|
|
4019
4034
|
}
|
|
4020
4035
|
}
|
|
@@ -4035,6 +4050,10 @@ const Ua = {
|
|
|
4035
4050
|
// Tamanho máximo do CNPJ
|
|
4036
4051
|
}
|
|
4037
4052
|
]
|
|
4053
|
+
},
|
|
4054
|
+
"phone-br": {
|
|
4055
|
+
mask: [{ mask: "(00) 0000-0000" }, { mask: "(00) 00000-0000" }],
|
|
4056
|
+
dispatch: (t, e) => (e.value + t).replace(/\D/g, "").length <= 10 ? e.compiledMasks[0] : e.compiledMasks[1]
|
|
4038
4057
|
}
|
|
4039
4058
|
}, Xa = {
|
|
4040
4059
|
Top: "top",
|
|
@@ -4073,7 +4092,7 @@ const Ua = {
|
|
|
4073
4092
|
}) => {
|
|
4074
4093
|
const a = zr(null), i = zr(null), [o, l] = Z(!1), c = e && Nt.props.position.options.find(
|
|
4075
4094
|
(b) => b === e
|
|
4076
|
-
) && `${Nt.class}--${e}`,
|
|
4095
|
+
) && `${Nt.class}--${e}`, d = r && Nt.props.placement.options.find(
|
|
4077
4096
|
(b) => b === r
|
|
4078
4097
|
) && `${Nt.class}--${r}`, [p, T] = Z(0), [S, E] = Z(0), [k, _] = Z(0), [g, I] = Z(0);
|
|
4079
4098
|
let D;
|
|
@@ -4146,7 +4165,7 @@ const Ua = {
|
|
|
4146
4165
|
o && /* @__PURE__ */ P(
|
|
4147
4166
|
"span",
|
|
4148
4167
|
{
|
|
4149
|
-
className: [c,
|
|
4168
|
+
className: [c, d].filter((b) => b).join(" "),
|
|
4150
4169
|
children: /* @__PURE__ */ P(
|
|
4151
4170
|
"span",
|
|
4152
4171
|
{
|
|
@@ -4168,7 +4187,7 @@ Sr.propTypes = {
|
|
|
4168
4187
|
text: h.oneOfType([h.string, h.node])
|
|
4169
4188
|
};
|
|
4170
4189
|
Sr.displayName = "DsTooltip";
|
|
4171
|
-
const Ur =
|
|
4190
|
+
const Ur = yt.forwardRef(
|
|
4172
4191
|
({
|
|
4173
4192
|
name: t,
|
|
4174
4193
|
testId: e = t || "ds-input-test",
|
|
@@ -4180,7 +4199,7 @@ const Ur = gt.forwardRef(
|
|
|
4180
4199
|
value: o,
|
|
4181
4200
|
min: l,
|
|
4182
4201
|
max: c,
|
|
4183
|
-
tooltip:
|
|
4202
|
+
tooltip: d = Ie.props.tooltip.default,
|
|
4184
4203
|
tooltipPosition: p = Ie.props.tooltipPosition.default,
|
|
4185
4204
|
tooltipPlacement: T = Ie.props.tooltipPlacement.default,
|
|
4186
4205
|
icon: S = Ie.props.icon.default,
|
|
@@ -4196,7 +4215,7 @@ const Ur = gt.forwardRef(
|
|
|
4196
4215
|
onKeyDownHandler: V,
|
|
4197
4216
|
onFocusHandler: Q
|
|
4198
4217
|
}, H) => {
|
|
4199
|
-
const [ce, q] = Z(!1), [K, se] = Z(Math.random()), [G, ge] = Z(!1), [ye, be] = Z(!1), Ne = !!b && !!A, je = (ie,
|
|
4218
|
+
const [ce, q] = Z(!1), [K, se] = Z(Math.random()), [G, ge] = Z(!1), [ye, be] = Z(!1), Ne = !!b && !!A, je = (ie, _t, rt) => {
|
|
4200
4219
|
if (C(ie), Ne && rt) {
|
|
4201
4220
|
const xt = {
|
|
4202
4221
|
...rt,
|
|
@@ -4204,7 +4223,7 @@ const Ur = gt.forwardRef(
|
|
|
4204
4223
|
...rt.target,
|
|
4205
4224
|
name: t,
|
|
4206
4225
|
maskedValue: ie,
|
|
4207
|
-
value:
|
|
4226
|
+
value: _t.unmaskedValue,
|
|
4208
4227
|
type: "text"
|
|
4209
4228
|
}
|
|
4210
4229
|
};
|
|
@@ -4222,7 +4241,7 @@ const Ur = gt.forwardRef(
|
|
|
4222
4241
|
}
|
|
4223
4242
|
), u = (ie) => {
|
|
4224
4243
|
b && !Ne && b(ie);
|
|
4225
|
-
},
|
|
4244
|
+
}, f = (ie) => {
|
|
4226
4245
|
V && V(ie);
|
|
4227
4246
|
}, v = (ie) => {
|
|
4228
4247
|
q(!1), x && x(ie);
|
|
@@ -4266,7 +4285,7 @@ const Ur = gt.forwardRef(
|
|
|
4266
4285
|
onChange: u,
|
|
4267
4286
|
onFocus: N,
|
|
4268
4287
|
onInput: u,
|
|
4269
|
-
onKeyDown:
|
|
4288
|
+
onKeyDown: f,
|
|
4270
4289
|
placeholder: z(),
|
|
4271
4290
|
ref: y,
|
|
4272
4291
|
type: B
|
|
@@ -4274,13 +4293,13 @@ const Ur = gt.forwardRef(
|
|
|
4274
4293
|
),
|
|
4275
4294
|
/* @__PURE__ */ ae("label", { className: ee, htmlFor: t, children: [
|
|
4276
4295
|
a,
|
|
4277
|
-
|
|
4296
|
+
d && /* @__PURE__ */ P(
|
|
4278
4297
|
Sr,
|
|
4279
4298
|
{
|
|
4280
4299
|
className: "ds-input__tooltip",
|
|
4281
4300
|
placement: T,
|
|
4282
4301
|
position: p,
|
|
4283
|
-
text:
|
|
4302
|
+
text: d,
|
|
4284
4303
|
children: /* @__PURE__ */ P(Ae, { className: "ds-input__icon", image: "info" })
|
|
4285
4304
|
}
|
|
4286
4305
|
)
|
|
@@ -4333,7 +4352,7 @@ const Za = {
|
|
|
4333
4352
|
Neutral10: "neutral-10",
|
|
4334
4353
|
Neutral05: "neutral-05",
|
|
4335
4354
|
Neutral00: "neutral-00"
|
|
4336
|
-
},
|
|
4355
|
+
}, nt = {
|
|
4337
4356
|
name: "Loading",
|
|
4338
4357
|
class: "ds-loading",
|
|
4339
4358
|
props: {
|
|
@@ -4354,37 +4373,49 @@ const Za = {
|
|
|
4354
4373
|
type: String,
|
|
4355
4374
|
default: Qa.Neutral10,
|
|
4356
4375
|
options: Object.values(Qa)
|
|
4376
|
+
},
|
|
4377
|
+
id: {
|
|
4378
|
+
type: String,
|
|
4379
|
+
default: ""
|
|
4380
|
+
},
|
|
4381
|
+
testId: {
|
|
4382
|
+
type: String,
|
|
4383
|
+
default: "ds-loading"
|
|
4357
4384
|
}
|
|
4358
4385
|
}
|
|
4359
4386
|
}, fo = ({
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4387
|
+
id: t,
|
|
4388
|
+
testId: e = nt.props.testId.default,
|
|
4389
|
+
className: r,
|
|
4390
|
+
size: s = nt.props.size.default,
|
|
4391
|
+
opacity: n = nt.props.opacity.default,
|
|
4392
|
+
fullscreen: a = nt.props.fullscreen.default,
|
|
4393
|
+
backgroundColor: i = nt.props.backgroundColor.default
|
|
4365
4394
|
}) => {
|
|
4366
|
-
const
|
|
4367
|
-
(
|
|
4368
|
-
) && `${
|
|
4395
|
+
const o = !a && `${nt.class}--absolute`, l = s && `${nt.class}__dots--${s}`, c = i && nt.props.backgroundColor.options.find(
|
|
4396
|
+
(p) => p === i
|
|
4397
|
+
) && `${nt.class}__background--${i}`, d = n && `${nt.class}__background--opacity`;
|
|
4369
4398
|
return /* @__PURE__ */ ae(
|
|
4370
4399
|
"div",
|
|
4371
4400
|
{
|
|
4372
|
-
className: [
|
|
4401
|
+
className: [nt.class, r, o].filter((p) => p).join(" "),
|
|
4402
|
+
"data-testid": e,
|
|
4403
|
+
id: t,
|
|
4373
4404
|
children: [
|
|
4374
4405
|
/* @__PURE__ */ P(
|
|
4375
4406
|
"div",
|
|
4376
4407
|
{
|
|
4377
4408
|
className: [
|
|
4378
|
-
`${
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
].filter((
|
|
4409
|
+
`${nt.class}__background`,
|
|
4410
|
+
c,
|
|
4411
|
+
d
|
|
4412
|
+
].filter((p) => p).join(" ")
|
|
4382
4413
|
}
|
|
4383
4414
|
),
|
|
4384
4415
|
/* @__PURE__ */ P(
|
|
4385
4416
|
"div",
|
|
4386
4417
|
{
|
|
4387
|
-
className: ["ds-loading__dots",
|
|
4418
|
+
className: ["ds-loading__dots", l].filter((p) => p).join(" "),
|
|
4388
4419
|
role: "status"
|
|
4389
4420
|
}
|
|
4390
4421
|
)
|
|
@@ -4393,7 +4424,9 @@ const Za = {
|
|
|
4393
4424
|
);
|
|
4394
4425
|
};
|
|
4395
4426
|
fo.propTypes = {
|
|
4396
|
-
|
|
4427
|
+
id: h.string,
|
|
4428
|
+
testId: h.string,
|
|
4429
|
+
size: h.oneOf(nt.props.size.options),
|
|
4397
4430
|
opacity: h.bool,
|
|
4398
4431
|
fullscreen: h.bool,
|
|
4399
4432
|
backgroundColor: h.string
|
|
@@ -4691,7 +4724,7 @@ const si = {
|
|
|
4691
4724
|
const c = () => {
|
|
4692
4725
|
const p = [Zt.class, e];
|
|
4693
4726
|
return l && p.push(`${Zt.class}--gap-${l}`), p.join(" ");
|
|
4694
|
-
},
|
|
4727
|
+
}, d = () => ({
|
|
4695
4728
|
display: "flex",
|
|
4696
4729
|
justifyContent: r,
|
|
4697
4730
|
alignItems: s,
|
|
@@ -4701,7 +4734,7 @@ const si = {
|
|
|
4701
4734
|
height: o,
|
|
4702
4735
|
gap: l
|
|
4703
4736
|
});
|
|
4704
|
-
return /* @__PURE__ */ P("div", { className: c(), style:
|
|
4737
|
+
return /* @__PURE__ */ P("div", { className: c(), style: d(), children: t });
|
|
4705
4738
|
};
|
|
4706
4739
|
Gt.propTypes = {
|
|
4707
4740
|
className: h.string,
|
|
@@ -4883,7 +4916,7 @@ const oi = {
|
|
|
4883
4916
|
default: ""
|
|
4884
4917
|
}
|
|
4885
4918
|
}
|
|
4886
|
-
}, mo =
|
|
4919
|
+
}, mo = yt.forwardRef(
|
|
4887
4920
|
({
|
|
4888
4921
|
label: t,
|
|
4889
4922
|
className: e,
|
|
@@ -4895,7 +4928,7 @@ const oi = {
|
|
|
4895
4928
|
options: o,
|
|
4896
4929
|
value: l,
|
|
4897
4930
|
placeholder: c,
|
|
4898
|
-
onChange:
|
|
4931
|
+
onChange: d,
|
|
4899
4932
|
onChangeHandler: p,
|
|
4900
4933
|
size: T = De.props.size.default,
|
|
4901
4934
|
status: S = De.props.status.default,
|
|
@@ -4906,7 +4939,7 @@ const oi = {
|
|
|
4906
4939
|
...I
|
|
4907
4940
|
}, D) => {
|
|
4908
4941
|
const [A, b] = Z(!1), x = (H) => {
|
|
4909
|
-
b(!1),
|
|
4942
|
+
b(!1), d && d(H, H.target.value), p && p(H, H.target.value);
|
|
4910
4943
|
}, V = () => {
|
|
4911
4944
|
const H = [De.class, "select-placeholder"];
|
|
4912
4945
|
return H.push(`${De.class}--${T}`), S && H.push(`${De.class}--${S}`), A && H.push(`${De.class}--active`), r && H.push(`${De.class}--disabled`), e && H.push(e), H.join(" ");
|
|
@@ -5135,7 +5168,7 @@ const fi = {
|
|
|
5135
5168
|
}
|
|
5136
5169
|
}
|
|
5137
5170
|
}
|
|
5138
|
-
}, go =
|
|
5171
|
+
}, go = yt.forwardRef(
|
|
5139
5172
|
({
|
|
5140
5173
|
name: t,
|
|
5141
5174
|
testId: e = t || "ds-textarea-test",
|
|
@@ -5147,7 +5180,7 @@ const fi = {
|
|
|
5147
5180
|
minLength: o,
|
|
5148
5181
|
maxLength: l,
|
|
5149
5182
|
tooltip: c,
|
|
5150
|
-
icon:
|
|
5183
|
+
icon: d,
|
|
5151
5184
|
status: p = Be.props.status.default,
|
|
5152
5185
|
feedback: T,
|
|
5153
5186
|
disabled: S = Be.props.disabled.default,
|
|
@@ -5219,7 +5252,7 @@ const fi = {
|
|
|
5219
5252
|
className: "ds-textarea__tooltip",
|
|
5220
5253
|
placement: "end",
|
|
5221
5254
|
text: c,
|
|
5222
|
-
children: /* @__PURE__ */ P(Ae, { className: "ds-textarea__icon", image:
|
|
5255
|
+
children: /* @__PURE__ */ P(Ae, { className: "ds-textarea__icon", image: d })
|
|
5223
5256
|
}
|
|
5224
5257
|
)
|
|
5225
5258
|
] }, q);
|
|
@@ -5299,9 +5332,9 @@ function al() {
|
|
|
5299
5332
|
}, []), t;
|
|
5300
5333
|
}
|
|
5301
5334
|
const il = ({ children: t, grid: e }) => {
|
|
5302
|
-
const { row: r, col: s, mobileRow: n, mobileCol: a } = e, { width: i } = al(), [o, l] = Z(""), [c,
|
|
5335
|
+
const { row: r, col: s, mobileRow: n, mobileCol: a } = e, { width: i } = al(), [o, l] = Z(""), [c, d] = Z("");
|
|
5303
5336
|
return $e(() => {
|
|
5304
|
-
i <= 768 ? (l(n || r),
|
|
5337
|
+
i <= 768 ? (l(n || r), d(a || s)) : (l(r), d(s));
|
|
5305
5338
|
}, [i]), /* @__PURE__ */ P("div", { style: { gridRow: o, gridColumn: c }, children: t });
|
|
5306
5339
|
};
|
|
5307
5340
|
il.displayName = "DsGridElement";
|
|
@@ -5391,7 +5424,7 @@ const vn = ({
|
|
|
5391
5424
|
width: o,
|
|
5392
5425
|
height: l
|
|
5393
5426
|
}) => {
|
|
5394
|
-
const c = s && `${Le.class}__v-gap--${r}`,
|
|
5427
|
+
const c = s && `${Le.class}__v-gap--${r}`, d = n && `${Le.class}__h-gap--${r}`, p = a && Le.props.horizontalAlign.options.find(
|
|
5395
5428
|
(D) => D === a
|
|
5396
5429
|
) ? `${Le.class}--h-${a}` : null, T = i && Le.props.verticalAlign.options.find(
|
|
5397
5430
|
(D) => D === i
|
|
@@ -5408,7 +5441,7 @@ const vn = ({
|
|
|
5408
5441
|
p,
|
|
5409
5442
|
T,
|
|
5410
5443
|
c,
|
|
5411
|
-
|
|
5444
|
+
d
|
|
5412
5445
|
].filter((D) => D).join(" "),
|
|
5413
5446
|
style: {
|
|
5414
5447
|
width: o,
|
|
@@ -5488,7 +5521,7 @@ const fr = {
|
|
|
5488
5521
|
bottom: n,
|
|
5489
5522
|
left: a
|
|
5490
5523
|
}) => {
|
|
5491
|
-
const i = r && `${dt.class}__top--${r}`, o = s && `${dt.class}__right--${s}`, l = n && `${dt.class}__bottom--${n}`, c = a && `${dt.class}__left--${a}`,
|
|
5524
|
+
const i = r && `${dt.class}__top--${r}`, o = s && `${dt.class}__right--${s}`, l = n && `${dt.class}__bottom--${n}`, c = a && `${dt.class}__left--${a}`, d = e && `${dt.class}--${e}`;
|
|
5492
5525
|
return /* @__PURE__ */ P(
|
|
5493
5526
|
"div",
|
|
5494
5527
|
{
|
|
@@ -5498,7 +5531,7 @@ const fr = {
|
|
|
5498
5531
|
o,
|
|
5499
5532
|
l,
|
|
5500
5533
|
c,
|
|
5501
|
-
|
|
5534
|
+
d
|
|
5502
5535
|
].filter((p) => p).join(" "),
|
|
5503
5536
|
children: t
|
|
5504
5537
|
}
|
|
@@ -5763,7 +5796,7 @@ const xe = {
|
|
|
5763
5796
|
icon: o = xe.props.icon.default,
|
|
5764
5797
|
noOptionsMessage: l = xe.props.noOptionsMessage.default,
|
|
5765
5798
|
disabled: c = xe.props.disabled.default,
|
|
5766
|
-
status:
|
|
5799
|
+
status: d = xe.props.status.default,
|
|
5767
5800
|
onBlurHandler: p = xe.props.onBlurHandler.default,
|
|
5768
5801
|
onFocusHandler: T = xe.props.onFocusHandler.default
|
|
5769
5802
|
}) => {
|
|
@@ -5804,7 +5837,7 @@ const xe = {
|
|
|
5804
5837
|
onBlurHandler: p,
|
|
5805
5838
|
onChangeHandler: D,
|
|
5806
5839
|
onFocusHandler: T,
|
|
5807
|
-
status:
|
|
5840
|
+
status: d,
|
|
5808
5841
|
value: S
|
|
5809
5842
|
},
|
|
5810
5843
|
g
|
|
@@ -5849,7 +5882,7 @@ const Dr = {
|
|
|
5849
5882
|
required: !0
|
|
5850
5883
|
}
|
|
5851
5884
|
}
|
|
5852
|
-
},
|
|
5885
|
+
}, zp = ({
|
|
5853
5886
|
length: t,
|
|
5854
5887
|
current: e = Dr.props.current.default
|
|
5855
5888
|
}) => {
|
|
@@ -5913,7 +5946,7 @@ const Dr = {
|
|
|
5913
5946
|
max: a,
|
|
5914
5947
|
onChangeHandler: i
|
|
5915
5948
|
}) => {
|
|
5916
|
-
const o = zr(null), [l, c] = Z(!1), [
|
|
5949
|
+
const o = zr(null), [l, c] = Z(!1), [d, p] = Z("");
|
|
5917
5950
|
$e(() => {
|
|
5918
5951
|
p(e ?? "");
|
|
5919
5952
|
}, [e]);
|
|
@@ -5921,7 +5954,7 @@ const Dr = {
|
|
|
5921
5954
|
_.key === "Enter" && S(_);
|
|
5922
5955
|
};
|
|
5923
5956
|
function S(_) {
|
|
5924
|
-
c(!1), i && (n && parseInt(n) >= parseInt(
|
|
5957
|
+
c(!1), i && (n && parseInt(n) >= parseInt(d === "" ? n : d) ? (_.currentTarget.value = n, p(n)) : a && parseInt(a) < parseInt(d) ? (_.currentTarget.value = a, p(a)) : _.currentTarget.value = d, i(_));
|
|
5925
5958
|
}
|
|
5926
5959
|
const E = (_) => {
|
|
5927
5960
|
p(_.currentTarget.value);
|
|
@@ -5941,7 +5974,7 @@ const Dr = {
|
|
|
5941
5974
|
onKeyDown: T,
|
|
5942
5975
|
ref: o,
|
|
5943
5976
|
type: "number",
|
|
5944
|
-
value:
|
|
5977
|
+
value: d
|
|
5945
5978
|
}
|
|
5946
5979
|
) : /* @__PURE__ */ P("div", { onClick: k, children: /* @__PURE__ */ ae(Gt, { alignItems: "center", gap: "nano", children: [
|
|
5947
5980
|
/* @__PURE__ */ P(Ge, { children: /* @__PURE__ */ P(Kt, { children: /* @__PURE__ */ ae("b", { children: [
|
|
@@ -5996,10 +6029,10 @@ const cl = [1, 2, 3, 4], _i = {
|
|
|
5996
6029
|
isModalOpen: o = lt.props.isModalOpen.default,
|
|
5997
6030
|
onClose: l,
|
|
5998
6031
|
onCancel: c,
|
|
5999
|
-
onConfirm:
|
|
6032
|
+
onConfirm: d,
|
|
6000
6033
|
...p
|
|
6001
6034
|
}) => {
|
|
6002
|
-
const T = a && lt.props.variant.options.find((_) => _ === a) ? `${lt.class}--${a}` : `${lt.class}--${lt.props.variant.default}`, S = i && `${lt.class}--elevation-${i}`, E =
|
|
6035
|
+
const T = a && lt.props.variant.options.find((_) => _ === a) ? `${lt.class}--${a}` : `${lt.class}--${lt.props.variant.default}`, S = i && `${lt.class}--elevation-${i}`, E = d || c, k = de(
|
|
6003
6036
|
(_) => {
|
|
6004
6037
|
_.keyCode === 27 && l();
|
|
6005
6038
|
},
|
|
@@ -6057,11 +6090,11 @@ const cl = [1, 2, 3, 4], _i = {
|
|
|
6057
6090
|
children: s
|
|
6058
6091
|
}
|
|
6059
6092
|
),
|
|
6060
|
-
|
|
6093
|
+
d && /* @__PURE__ */ P(
|
|
6061
6094
|
gs,
|
|
6062
6095
|
{
|
|
6063
6096
|
onClick: () => {
|
|
6064
|
-
l(),
|
|
6097
|
+
l(), d();
|
|
6065
6098
|
},
|
|
6066
6099
|
children: n
|
|
6067
6100
|
}
|
|
@@ -6145,7 +6178,7 @@ const bi = {
|
|
|
6145
6178
|
autoCloseTimer: o = He.props.autoCloseTimer.default,
|
|
6146
6179
|
dismissible: l = He.props.dismissible.default,
|
|
6147
6180
|
elevation: c,
|
|
6148
|
-
progressBar:
|
|
6181
|
+
progressBar: d = He.props.progressBar.default,
|
|
6149
6182
|
handleClose: p
|
|
6150
6183
|
}) => {
|
|
6151
6184
|
const [T, S] = Z(o), [E, k] = Z(!1), [_, g] = Z(!0), I = [
|
|
@@ -6198,7 +6231,7 @@ const bi = {
|
|
|
6198
6231
|
}
|
|
6199
6232
|
) : /* @__PURE__ */ P(At, { horizontal: "quark" }) })
|
|
6200
6233
|
] }) }),
|
|
6201
|
-
|
|
6234
|
+
d && i && /* @__PURE__ */ P(
|
|
6202
6235
|
"div",
|
|
6203
6236
|
{
|
|
6204
6237
|
className: `${He.class}__progress-bar ${He.class}__progress-bar--${e}`,
|
|
@@ -6264,7 +6297,7 @@ const Gs = {
|
|
|
6264
6297
|
validationList: e = Gs.props.validationList.default,
|
|
6265
6298
|
instructionLabel: r = Gs.props.instructionLabel.default
|
|
6266
6299
|
}) => {
|
|
6267
|
-
const [s, n] = Z(""), [a, i] = Z(""), [o, l] = Z([]), [c,
|
|
6300
|
+
const [s, n] = Z(""), [a, i] = Z(""), [o, l] = Z([]), [c, d] = Z({
|
|
6268
6301
|
score: 0,
|
|
6269
6302
|
color: "danger",
|
|
6270
6303
|
label: "Fraca"
|
|
@@ -6304,7 +6337,7 @@ const Gs = {
|
|
|
6304
6337
|
let q = H;
|
|
6305
6338
|
return ce ? (q++, q) : H;
|
|
6306
6339
|
}, 0), x = A == null ? void 0 : A.length, V = b * 100 / x || 0, Q = g(V);
|
|
6307
|
-
return
|
|
6340
|
+
return d(Q), Q;
|
|
6308
6341
|
}, D = () => /* @__PURE__ */ P("ul", { children: e.map((A, b) => {
|
|
6309
6342
|
const x = o[b] ? "ds-password-confirmation__list" : "ds-password-confirmation__list--disc";
|
|
6310
6343
|
return /* @__PURE__ */ ae("li", { className: x, children: [
|
|
@@ -6523,11 +6556,11 @@ const Si = {
|
|
|
6523
6556
|
t && `${zt.class}__tab--active`,
|
|
6524
6557
|
s && `${zt.class}__tab--disabled`,
|
|
6525
6558
|
e && e
|
|
6526
|
-
].join(" "), c = (
|
|
6527
|
-
o && !s && o(
|
|
6559
|
+
].join(" "), c = (d) => {
|
|
6560
|
+
o && !s && o(d);
|
|
6528
6561
|
};
|
|
6529
6562
|
return /* @__PURE__ */ P("div", { className: l, id: n, onClick: () => c(a), children: i });
|
|
6530
|
-
},
|
|
6563
|
+
}, qp = ({
|
|
6531
6564
|
tabs: t,
|
|
6532
6565
|
color: e,
|
|
6533
6566
|
selectedTab: r = zt.props.selectedTab.default,
|
|
@@ -6601,13 +6634,13 @@ const Ei = {
|
|
|
6601
6634
|
n && n(o);
|
|
6602
6635
|
};
|
|
6603
6636
|
return /* @__PURE__ */ P("div", { className: a, children: s.map((o) => {
|
|
6604
|
-
const l = o.autoClose ?? !0, c = o.autoCloseTimer ?? 4e3,
|
|
6637
|
+
const l = o.autoClose ?? !0, c = o.autoCloseTimer ?? 4e3, d = o.dismissible ?? !0, p = o.elevation ?? 2, T = o.progressBar ?? !0;
|
|
6605
6638
|
return /* @__PURE__ */ P(
|
|
6606
6639
|
bn,
|
|
6607
6640
|
{
|
|
6608
6641
|
autoClose: l,
|
|
6609
6642
|
autoCloseTimer: c,
|
|
6610
|
-
dismissible:
|
|
6643
|
+
dismissible: d,
|
|
6611
6644
|
elevation: p,
|
|
6612
6645
|
handleClose: () => i(o.id),
|
|
6613
6646
|
id: o.id,
|
|
@@ -6699,7 +6732,7 @@ const ki = (t, e) => {
|
|
|
6699
6732
|
} catch {
|
|
6700
6733
|
return { isObj: !1, parsedObj: void 0 };
|
|
6701
6734
|
}
|
|
6702
|
-
},
|
|
6735
|
+
}, Up = (t) => {
|
|
6703
6736
|
const e = /^[0-9]+$/.test(t);
|
|
6704
6737
|
if (t === "true" || t === "false")
|
|
6705
6738
|
return JSON.parse(t);
|
|
@@ -6764,7 +6797,7 @@ function _s(t, e, r = /* @__PURE__ */ new WeakSet()) {
|
|
|
6764
6797
|
return !1;
|
|
6765
6798
|
return !0;
|
|
6766
6799
|
}
|
|
6767
|
-
var sn = { exports: {} }, wo = {},
|
|
6800
|
+
var sn = { exports: {} }, wo = {}, vt = {}, br = {}, Kr = {}, le = {}, Hr = {};
|
|
6768
6801
|
(function(t) {
|
|
6769
6802
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.regexpCode = t.getEsmExportName = t.getProperty = t.safeStringify = t.stringify = t.strConcat = t.addCodeArg = t.str = t._ = t.nil = t._Code = t.Name = t.IDENTIFIER = t._CodeOrName = void 0;
|
|
6770
6803
|
class e {
|
|
@@ -6855,10 +6888,10 @@ var sn = { exports: {} }, wo = {}, yt = {}, br = {}, Kr = {}, le = {}, Hr = {};
|
|
|
6855
6888
|
if (typeof I == "string" && I[0] === '"' && !(g instanceof r))
|
|
6856
6889
|
return `"${g}${I.slice(1)}`;
|
|
6857
6890
|
}
|
|
6858
|
-
function
|
|
6891
|
+
function d(g, I) {
|
|
6859
6892
|
return I.emptyStr() ? g : g.emptyStr() ? I : i`${g}${I}`;
|
|
6860
6893
|
}
|
|
6861
|
-
t.strConcat =
|
|
6894
|
+
t.strConcat = d;
|
|
6862
6895
|
function p(g) {
|
|
6863
6896
|
return typeof g == "number" || typeof g == "boolean" || g === null ? g : S(Array.isArray(g) ? g.join(",") : g);
|
|
6864
6897
|
}
|
|
@@ -6903,8 +6936,8 @@ var nn = {};
|
|
|
6903
6936
|
var: new e.Name("var")
|
|
6904
6937
|
};
|
|
6905
6938
|
class n {
|
|
6906
|
-
constructor({ prefixes: c, parent:
|
|
6907
|
-
this._names = {}, this._prefixes = c, this._parent =
|
|
6939
|
+
constructor({ prefixes: c, parent: d } = {}) {
|
|
6940
|
+
this._names = {}, this._prefixes = c, this._parent = d;
|
|
6908
6941
|
}
|
|
6909
6942
|
toName(c) {
|
|
6910
6943
|
return c instanceof e.Name ? c : this.name(c);
|
|
@@ -6913,23 +6946,23 @@ var nn = {};
|
|
|
6913
6946
|
return new e.Name(this._newName(c));
|
|
6914
6947
|
}
|
|
6915
6948
|
_newName(c) {
|
|
6916
|
-
const
|
|
6917
|
-
return `${c}${
|
|
6949
|
+
const d = this._names[c] || this._nameGroup(c);
|
|
6950
|
+
return `${c}${d.index++}`;
|
|
6918
6951
|
}
|
|
6919
6952
|
_nameGroup(c) {
|
|
6920
|
-
var
|
|
6921
|
-
if (!((p = (
|
|
6953
|
+
var d, p;
|
|
6954
|
+
if (!((p = (d = this._parent) === null || d === void 0 ? void 0 : d._prefixes) === null || p === void 0) && p.has(c) || this._prefixes && !this._prefixes.has(c))
|
|
6922
6955
|
throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);
|
|
6923
6956
|
return this._names[c] = { prefix: c, index: 0 };
|
|
6924
6957
|
}
|
|
6925
6958
|
}
|
|
6926
6959
|
t.Scope = n;
|
|
6927
6960
|
class a extends e.Name {
|
|
6928
|
-
constructor(c,
|
|
6929
|
-
super(
|
|
6961
|
+
constructor(c, d) {
|
|
6962
|
+
super(d), this.prefix = c;
|
|
6930
6963
|
}
|
|
6931
|
-
setValue(c, { property:
|
|
6932
|
-
this.value = c, this.scopePath = (0, e._)`.${new e.Name(
|
|
6964
|
+
setValue(c, { property: d, itemIndex: p }) {
|
|
6965
|
+
this.value = c, this.scopePath = (0, e._)`.${new e.Name(d)}[${p}]`;
|
|
6933
6966
|
}
|
|
6934
6967
|
}
|
|
6935
6968
|
t.ValueScopeName = a;
|
|
@@ -6944,11 +6977,11 @@ var nn = {};
|
|
|
6944
6977
|
name(c) {
|
|
6945
6978
|
return new a(c, this._newName(c));
|
|
6946
6979
|
}
|
|
6947
|
-
value(c,
|
|
6980
|
+
value(c, d) {
|
|
6948
6981
|
var p;
|
|
6949
|
-
if (
|
|
6982
|
+
if (d.ref === void 0)
|
|
6950
6983
|
throw new Error("CodeGen: ref must be passed in value");
|
|
6951
|
-
const T = this.toName(c), { prefix: S } = T, E = (p =
|
|
6984
|
+
const T = this.toName(c), { prefix: S } = T, E = (p = d.key) !== null && p !== void 0 ? p : d.ref;
|
|
6952
6985
|
let k = this._values[S];
|
|
6953
6986
|
if (k) {
|
|
6954
6987
|
const I = k.get(E);
|
|
@@ -6958,28 +6991,28 @@ var nn = {};
|
|
|
6958
6991
|
k = this._values[S] = /* @__PURE__ */ new Map();
|
|
6959
6992
|
k.set(E, T);
|
|
6960
6993
|
const _ = this._scope[S] || (this._scope[S] = []), g = _.length;
|
|
6961
|
-
return _[g] =
|
|
6994
|
+
return _[g] = d.ref, T.setValue(d, { property: S, itemIndex: g }), T;
|
|
6962
6995
|
}
|
|
6963
|
-
getValue(c,
|
|
6996
|
+
getValue(c, d) {
|
|
6964
6997
|
const p = this._values[c];
|
|
6965
6998
|
if (p)
|
|
6966
|
-
return p.get(
|
|
6999
|
+
return p.get(d);
|
|
6967
7000
|
}
|
|
6968
|
-
scopeRefs(c,
|
|
6969
|
-
return this._reduceValues(
|
|
7001
|
+
scopeRefs(c, d = this._values) {
|
|
7002
|
+
return this._reduceValues(d, (p) => {
|
|
6970
7003
|
if (p.scopePath === void 0)
|
|
6971
7004
|
throw new Error(`CodeGen: name "${p}" has no value`);
|
|
6972
7005
|
return (0, e._)`${c}${p.scopePath}`;
|
|
6973
7006
|
});
|
|
6974
7007
|
}
|
|
6975
|
-
scopeCode(c = this._values,
|
|
7008
|
+
scopeCode(c = this._values, d, p) {
|
|
6976
7009
|
return this._reduceValues(c, (T) => {
|
|
6977
7010
|
if (T.value === void 0)
|
|
6978
7011
|
throw new Error(`CodeGen: name "${T}" has no value`);
|
|
6979
7012
|
return T.value.code;
|
|
6980
|
-
},
|
|
7013
|
+
}, d, p);
|
|
6981
7014
|
}
|
|
6982
|
-
_reduceValues(c,
|
|
7015
|
+
_reduceValues(c, d, p = {}, T) {
|
|
6983
7016
|
let S = e.nil;
|
|
6984
7017
|
for (const E in c) {
|
|
6985
7018
|
const k = c[E];
|
|
@@ -6990,7 +7023,7 @@ var nn = {};
|
|
|
6990
7023
|
if (_.has(g))
|
|
6991
7024
|
return;
|
|
6992
7025
|
_.set(g, s.Started);
|
|
6993
|
-
let I =
|
|
7026
|
+
let I = d(g);
|
|
6994
7027
|
if (I) {
|
|
6995
7028
|
const D = this.opts.es5 ? t.varKinds.var : t.varKinds.const;
|
|
6996
7029
|
S = (0, e._)`${S}${D} ${g} = ${I};${this.opts._n}`;
|
|
@@ -7052,36 +7085,36 @@ var nn = {};
|
|
|
7052
7085
|
optimizeNodes() {
|
|
7053
7086
|
return this;
|
|
7054
7087
|
}
|
|
7055
|
-
optimizeNames(u,
|
|
7088
|
+
optimizeNames(u, f) {
|
|
7056
7089
|
return this;
|
|
7057
7090
|
}
|
|
7058
7091
|
}
|
|
7059
7092
|
class i extends a {
|
|
7060
|
-
constructor(u,
|
|
7061
|
-
super(), this.varKind = u, this.name =
|
|
7093
|
+
constructor(u, f, v) {
|
|
7094
|
+
super(), this.varKind = u, this.name = f, this.rhs = v;
|
|
7062
7095
|
}
|
|
7063
|
-
render({ es5: u, _n:
|
|
7096
|
+
render({ es5: u, _n: f }) {
|
|
7064
7097
|
const v = u ? r.varKinds.var : this.varKind, N = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
|
|
7065
|
-
return `${v} ${this.name}${N};` +
|
|
7098
|
+
return `${v} ${this.name}${N};` + f;
|
|
7066
7099
|
}
|
|
7067
|
-
optimizeNames(u,
|
|
7100
|
+
optimizeNames(u, f) {
|
|
7068
7101
|
if (u[this.name.str])
|
|
7069
|
-
return this.rhs && (this.rhs = G(this.rhs, u,
|
|
7102
|
+
return this.rhs && (this.rhs = G(this.rhs, u, f)), this;
|
|
7070
7103
|
}
|
|
7071
7104
|
get names() {
|
|
7072
7105
|
return this.rhs instanceof e._CodeOrName ? this.rhs.names : {};
|
|
7073
7106
|
}
|
|
7074
7107
|
}
|
|
7075
7108
|
class o extends a {
|
|
7076
|
-
constructor(u,
|
|
7077
|
-
super(), this.lhs = u, this.rhs =
|
|
7109
|
+
constructor(u, f, v) {
|
|
7110
|
+
super(), this.lhs = u, this.rhs = f, this.sideEffects = v;
|
|
7078
7111
|
}
|
|
7079
7112
|
render({ _n: u }) {
|
|
7080
7113
|
return `${this.lhs} = ${this.rhs};` + u;
|
|
7081
7114
|
}
|
|
7082
|
-
optimizeNames(u,
|
|
7115
|
+
optimizeNames(u, f) {
|
|
7083
7116
|
if (!(this.lhs instanceof e.Name && !u[this.lhs.str] && !this.sideEffects))
|
|
7084
|
-
return this.rhs = G(this.rhs, u,
|
|
7117
|
+
return this.rhs = G(this.rhs, u, f), this;
|
|
7085
7118
|
}
|
|
7086
7119
|
get names() {
|
|
7087
7120
|
const u = this.lhs instanceof e.Name ? {} : { ...this.lhs.names };
|
|
@@ -7089,8 +7122,8 @@ var nn = {};
|
|
|
7089
7122
|
}
|
|
7090
7123
|
}
|
|
7091
7124
|
class l extends o {
|
|
7092
|
-
constructor(u,
|
|
7093
|
-
super(u, v, N), this.op =
|
|
7125
|
+
constructor(u, f, v, N) {
|
|
7126
|
+
super(u, v, N), this.op = f;
|
|
7094
7127
|
}
|
|
7095
7128
|
render({ _n: u }) {
|
|
7096
7129
|
return `${this.lhs} ${this.op}= ${this.rhs};` + u;
|
|
@@ -7104,7 +7137,7 @@ var nn = {};
|
|
|
7104
7137
|
return `${this.label}:` + u;
|
|
7105
7138
|
}
|
|
7106
7139
|
}
|
|
7107
|
-
class
|
|
7140
|
+
class d extends a {
|
|
7108
7141
|
constructor(u) {
|
|
7109
7142
|
super(), this.label = u, this.names = {};
|
|
7110
7143
|
}
|
|
@@ -7133,8 +7166,8 @@ var nn = {};
|
|
|
7133
7166
|
optimizeNodes() {
|
|
7134
7167
|
return `${this.code}` ? this : void 0;
|
|
7135
7168
|
}
|
|
7136
|
-
optimizeNames(u,
|
|
7137
|
-
return this.code = G(this.code, u,
|
|
7169
|
+
optimizeNames(u, f) {
|
|
7170
|
+
return this.code = G(this.code, u, f), this;
|
|
7138
7171
|
}
|
|
7139
7172
|
get names() {
|
|
7140
7173
|
return this.code instanceof e._CodeOrName ? this.code.names : {};
|
|
@@ -7145,28 +7178,28 @@ var nn = {};
|
|
|
7145
7178
|
super(), this.nodes = u;
|
|
7146
7179
|
}
|
|
7147
7180
|
render(u) {
|
|
7148
|
-
return this.nodes.reduce((
|
|
7181
|
+
return this.nodes.reduce((f, v) => f + v.render(u), "");
|
|
7149
7182
|
}
|
|
7150
7183
|
optimizeNodes() {
|
|
7151
7184
|
const { nodes: u } = this;
|
|
7152
|
-
let
|
|
7153
|
-
for (;
|
|
7154
|
-
const v = u[
|
|
7155
|
-
Array.isArray(v) ? u.splice(
|
|
7185
|
+
let f = u.length;
|
|
7186
|
+
for (; f--; ) {
|
|
7187
|
+
const v = u[f].optimizeNodes();
|
|
7188
|
+
Array.isArray(v) ? u.splice(f, 1, ...v) : v ? u[f] = v : u.splice(f, 1);
|
|
7156
7189
|
}
|
|
7157
7190
|
return u.length > 0 ? this : void 0;
|
|
7158
7191
|
}
|
|
7159
|
-
optimizeNames(u,
|
|
7192
|
+
optimizeNames(u, f) {
|
|
7160
7193
|
const { nodes: v } = this;
|
|
7161
7194
|
let N = v.length;
|
|
7162
7195
|
for (; N--; ) {
|
|
7163
7196
|
const j = v[N];
|
|
7164
|
-
j.optimizeNames(u,
|
|
7197
|
+
j.optimizeNames(u, f) || (ge(u, j.names), v.splice(N, 1));
|
|
7165
7198
|
}
|
|
7166
7199
|
return v.length > 0 ? this : void 0;
|
|
7167
7200
|
}
|
|
7168
7201
|
get names() {
|
|
7169
|
-
return this.nodes.reduce((u,
|
|
7202
|
+
return this.nodes.reduce((u, f) => K(u, f.names), {});
|
|
7170
7203
|
}
|
|
7171
7204
|
}
|
|
7172
7205
|
class E extends S {
|
|
@@ -7180,32 +7213,32 @@ var nn = {};
|
|
|
7180
7213
|
}
|
|
7181
7214
|
_.kind = "else";
|
|
7182
7215
|
class g extends E {
|
|
7183
|
-
constructor(u,
|
|
7184
|
-
super(
|
|
7216
|
+
constructor(u, f) {
|
|
7217
|
+
super(f), this.condition = u;
|
|
7185
7218
|
}
|
|
7186
7219
|
render(u) {
|
|
7187
|
-
let
|
|
7188
|
-
return this.else && (
|
|
7220
|
+
let f = `if(${this.condition})` + super.render(u);
|
|
7221
|
+
return this.else && (f += "else " + this.else.render(u)), f;
|
|
7189
7222
|
}
|
|
7190
7223
|
optimizeNodes() {
|
|
7191
7224
|
super.optimizeNodes();
|
|
7192
7225
|
const u = this.condition;
|
|
7193
7226
|
if (u === !0)
|
|
7194
7227
|
return this.nodes;
|
|
7195
|
-
let
|
|
7196
|
-
if (
|
|
7197
|
-
const v =
|
|
7198
|
-
|
|
7228
|
+
let f = this.else;
|
|
7229
|
+
if (f) {
|
|
7230
|
+
const v = f.optimizeNodes();
|
|
7231
|
+
f = this.else = Array.isArray(v) ? new _(v) : v;
|
|
7199
7232
|
}
|
|
7200
|
-
if (
|
|
7201
|
-
return u === !1 ?
|
|
7233
|
+
if (f)
|
|
7234
|
+
return u === !1 ? f instanceof g ? f : f.nodes : this.nodes.length ? this : new g(ye(u), f instanceof g ? [f] : f.nodes);
|
|
7202
7235
|
if (!(u === !1 || !this.nodes.length))
|
|
7203
7236
|
return this;
|
|
7204
7237
|
}
|
|
7205
|
-
optimizeNames(u,
|
|
7238
|
+
optimizeNames(u, f) {
|
|
7206
7239
|
var v;
|
|
7207
|
-
if (this.else = (v = this.else) === null || v === void 0 ? void 0 : v.optimizeNames(u,
|
|
7208
|
-
return this.condition = G(this.condition, u,
|
|
7240
|
+
if (this.else = (v = this.else) === null || v === void 0 ? void 0 : v.optimizeNames(u, f), !!(super.optimizeNames(u, f) || this.else))
|
|
7241
|
+
return this.condition = G(this.condition, u, f), this;
|
|
7209
7242
|
}
|
|
7210
7243
|
get names() {
|
|
7211
7244
|
const u = super.names;
|
|
@@ -7223,21 +7256,21 @@ var nn = {};
|
|
|
7223
7256
|
render(u) {
|
|
7224
7257
|
return `for(${this.iteration})` + super.render(u);
|
|
7225
7258
|
}
|
|
7226
|
-
optimizeNames(u,
|
|
7227
|
-
if (super.optimizeNames(u,
|
|
7228
|
-
return this.iteration = G(this.iteration, u,
|
|
7259
|
+
optimizeNames(u, f) {
|
|
7260
|
+
if (super.optimizeNames(u, f))
|
|
7261
|
+
return this.iteration = G(this.iteration, u, f), this;
|
|
7229
7262
|
}
|
|
7230
7263
|
get names() {
|
|
7231
7264
|
return K(super.names, this.iteration.names);
|
|
7232
7265
|
}
|
|
7233
7266
|
}
|
|
7234
7267
|
class A extends I {
|
|
7235
|
-
constructor(u,
|
|
7236
|
-
super(), this.varKind = u, this.name =
|
|
7268
|
+
constructor(u, f, v, N) {
|
|
7269
|
+
super(), this.varKind = u, this.name = f, this.from = v, this.to = N;
|
|
7237
7270
|
}
|
|
7238
7271
|
render(u) {
|
|
7239
|
-
const
|
|
7240
|
-
return `for(${
|
|
7272
|
+
const f = u.es5 ? r.varKinds.var : this.varKind, { name: v, from: N, to: j } = this;
|
|
7273
|
+
return `for(${f} ${v}=${N}; ${v}<${j}; ${v}++)` + super.render(u);
|
|
7241
7274
|
}
|
|
7242
7275
|
get names() {
|
|
7243
7276
|
const u = se(super.names, this.from);
|
|
@@ -7245,23 +7278,23 @@ var nn = {};
|
|
|
7245
7278
|
}
|
|
7246
7279
|
}
|
|
7247
7280
|
class b extends I {
|
|
7248
|
-
constructor(u,
|
|
7249
|
-
super(), this.loop = u, this.varKind =
|
|
7281
|
+
constructor(u, f, v, N) {
|
|
7282
|
+
super(), this.loop = u, this.varKind = f, this.name = v, this.iterable = N;
|
|
7250
7283
|
}
|
|
7251
7284
|
render(u) {
|
|
7252
7285
|
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(u);
|
|
7253
7286
|
}
|
|
7254
|
-
optimizeNames(u,
|
|
7255
|
-
if (super.optimizeNames(u,
|
|
7256
|
-
return this.iterable = G(this.iterable, u,
|
|
7287
|
+
optimizeNames(u, f) {
|
|
7288
|
+
if (super.optimizeNames(u, f))
|
|
7289
|
+
return this.iterable = G(this.iterable, u, f), this;
|
|
7257
7290
|
}
|
|
7258
7291
|
get names() {
|
|
7259
7292
|
return K(super.names, this.iterable.names);
|
|
7260
7293
|
}
|
|
7261
7294
|
}
|
|
7262
7295
|
class x extends E {
|
|
7263
|
-
constructor(u,
|
|
7264
|
-
super(), this.name = u, this.args =
|
|
7296
|
+
constructor(u, f, v) {
|
|
7297
|
+
super(), this.name = u, this.args = f, this.async = v;
|
|
7265
7298
|
}
|
|
7266
7299
|
render(u) {
|
|
7267
7300
|
return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(u);
|
|
@@ -7276,16 +7309,16 @@ var nn = {};
|
|
|
7276
7309
|
V.kind = "return";
|
|
7277
7310
|
class Q extends E {
|
|
7278
7311
|
render(u) {
|
|
7279
|
-
let
|
|
7280
|
-
return this.catch && (
|
|
7312
|
+
let f = "try" + super.render(u);
|
|
7313
|
+
return this.catch && (f += this.catch.render(u)), this.finally && (f += this.finally.render(u)), f;
|
|
7281
7314
|
}
|
|
7282
7315
|
optimizeNodes() {
|
|
7283
|
-
var u,
|
|
7284
|
-
return super.optimizeNodes(), (u = this.catch) === null || u === void 0 || u.optimizeNodes(), (
|
|
7316
|
+
var u, f;
|
|
7317
|
+
return super.optimizeNodes(), (u = this.catch) === null || u === void 0 || u.optimizeNodes(), (f = this.finally) === null || f === void 0 || f.optimizeNodes(), this;
|
|
7285
7318
|
}
|
|
7286
|
-
optimizeNames(u,
|
|
7319
|
+
optimizeNames(u, f) {
|
|
7287
7320
|
var v, N;
|
|
7288
|
-
return super.optimizeNames(u,
|
|
7321
|
+
return super.optimizeNames(u, f), (v = this.catch) === null || v === void 0 || v.optimizeNames(u, f), (N = this.finally) === null || N === void 0 || N.optimizeNames(u, f), this;
|
|
7289
7322
|
}
|
|
7290
7323
|
get names() {
|
|
7291
7324
|
const u = super.names;
|
|
@@ -7308,8 +7341,8 @@ var nn = {};
|
|
|
7308
7341
|
}
|
|
7309
7342
|
ce.kind = "finally";
|
|
7310
7343
|
class q {
|
|
7311
|
-
constructor(u,
|
|
7312
|
-
this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...
|
|
7344
|
+
constructor(u, f = {}) {
|
|
7345
|
+
this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...f, _n: f.lines ? `
|
|
7313
7346
|
` : "" }, this._extScope = u, this._scope = new r.Scope({ parent: u }), this._nodes = [new k()];
|
|
7314
7347
|
}
|
|
7315
7348
|
toString() {
|
|
@@ -7324,12 +7357,12 @@ var nn = {};
|
|
|
7324
7357
|
return this._extScope.name(u);
|
|
7325
7358
|
}
|
|
7326
7359
|
// reserves unique name in the external scope and assigns value to it
|
|
7327
|
-
scopeValue(u,
|
|
7328
|
-
const v = this._extScope.value(u,
|
|
7360
|
+
scopeValue(u, f) {
|
|
7361
|
+
const v = this._extScope.value(u, f);
|
|
7329
7362
|
return (this._values[v.prefix] || (this._values[v.prefix] = /* @__PURE__ */ new Set())).add(v), v;
|
|
7330
7363
|
}
|
|
7331
|
-
getScopeValue(u,
|
|
7332
|
-
return this._extScope.getValue(u,
|
|
7364
|
+
getScopeValue(u, f) {
|
|
7365
|
+
return this._extScope.getValue(u, f);
|
|
7333
7366
|
}
|
|
7334
7367
|
// return code that assigns values in the external scope to the names that are used internally
|
|
7335
7368
|
// (same names that were returned by gen.scopeName or gen.scopeValue)
|
|
@@ -7339,29 +7372,29 @@ var nn = {};
|
|
|
7339
7372
|
scopeCode() {
|
|
7340
7373
|
return this._extScope.scopeCode(this._values);
|
|
7341
7374
|
}
|
|
7342
|
-
_def(u,
|
|
7343
|
-
const j = this._scope.toName(
|
|
7375
|
+
_def(u, f, v, N) {
|
|
7376
|
+
const j = this._scope.toName(f);
|
|
7344
7377
|
return v !== void 0 && N && (this._constants[j.str] = v), this._leafNode(new i(u, j, v)), j;
|
|
7345
7378
|
}
|
|
7346
7379
|
// `const` declaration (`var` in es5 mode)
|
|
7347
|
-
const(u,
|
|
7348
|
-
return this._def(r.varKinds.const, u,
|
|
7380
|
+
const(u, f, v) {
|
|
7381
|
+
return this._def(r.varKinds.const, u, f, v);
|
|
7349
7382
|
}
|
|
7350
7383
|
// `let` declaration with optional assignment (`var` in es5 mode)
|
|
7351
|
-
let(u,
|
|
7352
|
-
return this._def(r.varKinds.let, u,
|
|
7384
|
+
let(u, f, v) {
|
|
7385
|
+
return this._def(r.varKinds.let, u, f, v);
|
|
7353
7386
|
}
|
|
7354
7387
|
// `var` declaration with optional assignment
|
|
7355
|
-
var(u,
|
|
7356
|
-
return this._def(r.varKinds.var, u,
|
|
7388
|
+
var(u, f, v) {
|
|
7389
|
+
return this._def(r.varKinds.var, u, f, v);
|
|
7357
7390
|
}
|
|
7358
7391
|
// assignment code
|
|
7359
|
-
assign(u,
|
|
7360
|
-
return this._leafNode(new o(u,
|
|
7392
|
+
assign(u, f, v) {
|
|
7393
|
+
return this._leafNode(new o(u, f, v));
|
|
7361
7394
|
}
|
|
7362
7395
|
// `+=` code
|
|
7363
|
-
add(u,
|
|
7364
|
-
return this._leafNode(new l(u, t.operators.ADD,
|
|
7396
|
+
add(u, f) {
|
|
7397
|
+
return this._leafNode(new l(u, t.operators.ADD, f));
|
|
7365
7398
|
}
|
|
7366
7399
|
// appends passed SafeExpr to code or executes Block
|
|
7367
7400
|
code(u) {
|
|
@@ -7369,17 +7402,17 @@ var nn = {};
|
|
|
7369
7402
|
}
|
|
7370
7403
|
// returns code for object literal for the passed argument list of key-value pairs
|
|
7371
7404
|
object(...u) {
|
|
7372
|
-
const
|
|
7405
|
+
const f = ["{"];
|
|
7373
7406
|
for (const [v, N] of u)
|
|
7374
|
-
|
|
7375
|
-
return
|
|
7407
|
+
f.length > 1 && f.push(","), f.push(v), (v !== N || this.opts.es5) && (f.push(":"), (0, e.addCodeArg)(f, N));
|
|
7408
|
+
return f.push("}"), new e._Code(f);
|
|
7376
7409
|
}
|
|
7377
7410
|
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
|
|
7378
|
-
if(u,
|
|
7379
|
-
if (this._blockNode(new g(u)),
|
|
7380
|
-
this.code(
|
|
7381
|
-
else if (
|
|
7382
|
-
this.code(
|
|
7411
|
+
if(u, f, v) {
|
|
7412
|
+
if (this._blockNode(new g(u)), f && v)
|
|
7413
|
+
this.code(f).else().code(v).endIf();
|
|
7414
|
+
else if (f)
|
|
7415
|
+
this.code(f).endIf();
|
|
7383
7416
|
else if (v)
|
|
7384
7417
|
throw new Error('CodeGen: "else" body without "then" body');
|
|
7385
7418
|
return this;
|
|
@@ -7396,36 +7429,36 @@ var nn = {};
|
|
|
7396
7429
|
endIf() {
|
|
7397
7430
|
return this._endBlockNode(g, _);
|
|
7398
7431
|
}
|
|
7399
|
-
_for(u,
|
|
7400
|
-
return this._blockNode(u),
|
|
7432
|
+
_for(u, f) {
|
|
7433
|
+
return this._blockNode(u), f && this.code(f).endFor(), this;
|
|
7401
7434
|
}
|
|
7402
7435
|
// a generic `for` clause (or statement if `forBody` is passed)
|
|
7403
|
-
for(u,
|
|
7404
|
-
return this._for(new D(u),
|
|
7436
|
+
for(u, f) {
|
|
7437
|
+
return this._for(new D(u), f);
|
|
7405
7438
|
}
|
|
7406
7439
|
// `for` statement for a range of values
|
|
7407
|
-
forRange(u,
|
|
7440
|
+
forRange(u, f, v, N, j = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
|
|
7408
7441
|
const B = this._scope.toName(u);
|
|
7409
|
-
return this._for(new A(j, B,
|
|
7442
|
+
return this._for(new A(j, B, f, v), () => N(B));
|
|
7410
7443
|
}
|
|
7411
7444
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
7412
|
-
forOf(u,
|
|
7445
|
+
forOf(u, f, v, N = r.varKinds.const) {
|
|
7413
7446
|
const j = this._scope.toName(u);
|
|
7414
7447
|
if (this.opts.es5) {
|
|
7415
|
-
const B =
|
|
7448
|
+
const B = f instanceof e.Name ? f : this.var("_arr", f);
|
|
7416
7449
|
return this.forRange("_i", 0, (0, e._)`${B}.length`, (L) => {
|
|
7417
7450
|
this.var(j, (0, e._)`${B}[${L}]`), v(j);
|
|
7418
7451
|
});
|
|
7419
7452
|
}
|
|
7420
|
-
return this._for(new b("of", N, j,
|
|
7453
|
+
return this._for(new b("of", N, j, f), () => v(j));
|
|
7421
7454
|
}
|
|
7422
7455
|
// `for-in` statement.
|
|
7423
7456
|
// With option `ownProperties` replaced with a `for-of` loop for object keys
|
|
7424
|
-
forIn(u,
|
|
7457
|
+
forIn(u, f, v, N = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
|
|
7425
7458
|
if (this.opts.ownProperties)
|
|
7426
|
-
return this.forOf(u, (0, e._)`Object.keys(${
|
|
7459
|
+
return this.forOf(u, (0, e._)`Object.keys(${f})`, v);
|
|
7427
7460
|
const j = this._scope.toName(u);
|
|
7428
|
-
return this._for(new b("in", N, j,
|
|
7461
|
+
return this._for(new b("in", N, j, f), () => v(j));
|
|
7429
7462
|
}
|
|
7430
7463
|
// end `for` loop
|
|
7431
7464
|
endFor() {
|
|
@@ -7437,23 +7470,23 @@ var nn = {};
|
|
|
7437
7470
|
}
|
|
7438
7471
|
// `break` statement
|
|
7439
7472
|
break(u) {
|
|
7440
|
-
return this._leafNode(new
|
|
7473
|
+
return this._leafNode(new d(u));
|
|
7441
7474
|
}
|
|
7442
7475
|
// `return` statement
|
|
7443
7476
|
return(u) {
|
|
7444
|
-
const
|
|
7445
|
-
if (this._blockNode(
|
|
7477
|
+
const f = new V();
|
|
7478
|
+
if (this._blockNode(f), this.code(u), f.nodes.length !== 1)
|
|
7446
7479
|
throw new Error('CodeGen: "return" should have one node');
|
|
7447
7480
|
return this._endBlockNode(V);
|
|
7448
7481
|
}
|
|
7449
7482
|
// `try` statement
|
|
7450
|
-
try(u,
|
|
7451
|
-
if (!
|
|
7483
|
+
try(u, f, v) {
|
|
7484
|
+
if (!f && !v)
|
|
7452
7485
|
throw new Error('CodeGen: "try" without "catch" and "finally"');
|
|
7453
7486
|
const N = new Q();
|
|
7454
|
-
if (this._blockNode(N), this.code(u),
|
|
7487
|
+
if (this._blockNode(N), this.code(u), f) {
|
|
7455
7488
|
const j = this.name("e");
|
|
7456
|
-
this._currNode = N.catch = new H(j),
|
|
7489
|
+
this._currNode = N.catch = new H(j), f(j);
|
|
7457
7490
|
}
|
|
7458
7491
|
return v && (this._currNode = N.finally = new ce(), this.code(v)), this._endBlockNode(H, ce);
|
|
7459
7492
|
}
|
|
@@ -7462,22 +7495,22 @@ var nn = {};
|
|
|
7462
7495
|
return this._leafNode(new p(u));
|
|
7463
7496
|
}
|
|
7464
7497
|
// start self-balancing block
|
|
7465
|
-
block(u,
|
|
7466
|
-
return this._blockStarts.push(this._nodes.length), u && this.code(u).endBlock(
|
|
7498
|
+
block(u, f) {
|
|
7499
|
+
return this._blockStarts.push(this._nodes.length), u && this.code(u).endBlock(f), this;
|
|
7467
7500
|
}
|
|
7468
7501
|
// end the current self-balancing block
|
|
7469
7502
|
endBlock(u) {
|
|
7470
|
-
const
|
|
7471
|
-
if (
|
|
7503
|
+
const f = this._blockStarts.pop();
|
|
7504
|
+
if (f === void 0)
|
|
7472
7505
|
throw new Error("CodeGen: not in self-balancing block");
|
|
7473
|
-
const v = this._nodes.length -
|
|
7506
|
+
const v = this._nodes.length - f;
|
|
7474
7507
|
if (v < 0 || u !== void 0 && v !== u)
|
|
7475
7508
|
throw new Error(`CodeGen: wrong number of nodes: ${v} vs ${u} expected`);
|
|
7476
|
-
return this._nodes.length =
|
|
7509
|
+
return this._nodes.length = f, this;
|
|
7477
7510
|
}
|
|
7478
7511
|
// `function` heading (or definition if funcBody is passed)
|
|
7479
|
-
func(u,
|
|
7480
|
-
return this._blockNode(new x(u,
|
|
7512
|
+
func(u, f = e.nil, v, N) {
|
|
7513
|
+
return this._blockNode(new x(u, f, v)), N && this.code(N).endFunc(), this;
|
|
7481
7514
|
}
|
|
7482
7515
|
// end function definition
|
|
7483
7516
|
endFunc() {
|
|
@@ -7493,17 +7526,17 @@ var nn = {};
|
|
|
7493
7526
|
_blockNode(u) {
|
|
7494
7527
|
this._currNode.nodes.push(u), this._nodes.push(u);
|
|
7495
7528
|
}
|
|
7496
|
-
_endBlockNode(u,
|
|
7529
|
+
_endBlockNode(u, f) {
|
|
7497
7530
|
const v = this._currNode;
|
|
7498
|
-
if (v instanceof u ||
|
|
7531
|
+
if (v instanceof u || f && v instanceof f)
|
|
7499
7532
|
return this._nodes.pop(), this;
|
|
7500
|
-
throw new Error(`CodeGen: not in block "${
|
|
7533
|
+
throw new Error(`CodeGen: not in block "${f ? `${u.kind}/${f.kind}` : u.kind}"`);
|
|
7501
7534
|
}
|
|
7502
7535
|
_elseNode(u) {
|
|
7503
|
-
const
|
|
7504
|
-
if (!(
|
|
7536
|
+
const f = this._currNode;
|
|
7537
|
+
if (!(f instanceof g))
|
|
7505
7538
|
throw new Error('CodeGen: "else" without "if"');
|
|
7506
|
-
return this._currNode =
|
|
7539
|
+
return this._currNode = f.else = u, this;
|
|
7507
7540
|
}
|
|
7508
7541
|
get _root() {
|
|
7509
7542
|
return this._nodes[0];
|
|
@@ -7513,36 +7546,36 @@ var nn = {};
|
|
|
7513
7546
|
return u[u.length - 1];
|
|
7514
7547
|
}
|
|
7515
7548
|
set _currNode(u) {
|
|
7516
|
-
const
|
|
7517
|
-
|
|
7549
|
+
const f = this._nodes;
|
|
7550
|
+
f[f.length - 1] = u;
|
|
7518
7551
|
}
|
|
7519
7552
|
}
|
|
7520
7553
|
t.CodeGen = q;
|
|
7521
7554
|
function K(C, u) {
|
|
7522
|
-
for (const
|
|
7523
|
-
C[
|
|
7555
|
+
for (const f in u)
|
|
7556
|
+
C[f] = (C[f] || 0) + (u[f] || 0);
|
|
7524
7557
|
return C;
|
|
7525
7558
|
}
|
|
7526
7559
|
function se(C, u) {
|
|
7527
7560
|
return u instanceof e._CodeOrName ? K(C, u.names) : C;
|
|
7528
7561
|
}
|
|
7529
|
-
function G(C, u,
|
|
7562
|
+
function G(C, u, f) {
|
|
7530
7563
|
if (C instanceof e.Name)
|
|
7531
7564
|
return v(C);
|
|
7532
7565
|
if (!N(C))
|
|
7533
7566
|
return C;
|
|
7534
7567
|
return new e._Code(C._items.reduce((j, B) => (B instanceof e.Name && (B = v(B)), B instanceof e._Code ? j.push(...B._items) : j.push(B), j), []));
|
|
7535
7568
|
function v(j) {
|
|
7536
|
-
const B =
|
|
7569
|
+
const B = f[j.str];
|
|
7537
7570
|
return B === void 0 || u[j.str] !== 1 ? j : (delete u[j.str], B);
|
|
7538
7571
|
}
|
|
7539
7572
|
function N(j) {
|
|
7540
|
-
return j instanceof e._Code && j._items.some((B) => B instanceof e.Name && u[B.str] === 1 &&
|
|
7573
|
+
return j instanceof e._Code && j._items.some((B) => B instanceof e.Name && u[B.str] === 1 && f[B.str] !== void 0);
|
|
7541
7574
|
}
|
|
7542
7575
|
}
|
|
7543
7576
|
function ge(C, u) {
|
|
7544
|
-
for (const
|
|
7545
|
-
C[
|
|
7577
|
+
for (const f in u)
|
|
7578
|
+
C[f] = (C[f] || 0) - (u[f] || 0);
|
|
7546
7579
|
}
|
|
7547
7580
|
function ye(C) {
|
|
7548
7581
|
return typeof C == "boolean" || typeof C == "number" || C === null ? !C : (0, e._)`!${R(C)}`;
|
|
@@ -7559,7 +7592,7 @@ var nn = {};
|
|
|
7559
7592
|
}
|
|
7560
7593
|
t.or = O;
|
|
7561
7594
|
function y(C) {
|
|
7562
|
-
return (u,
|
|
7595
|
+
return (u, f) => u === e.nil ? f : f === e.nil ? u : (0, e._)`${R(u)} ${C} ${R(f)}`;
|
|
7563
7596
|
}
|
|
7564
7597
|
function R(C) {
|
|
7565
7598
|
return C instanceof e.Name ? C : (0, e._)`(${C})`;
|
|
@@ -7775,7 +7808,7 @@ It.default = Dl;
|
|
|
7775
7808
|
const { gen: I, validateName: D, schemaEnv: A } = _;
|
|
7776
7809
|
A.$async ? I.throw((0, e._)`new ${_.ValidationError}(${g})`) : (I.assign((0, e._)`${D}.errors`, g), I.return(!1));
|
|
7777
7810
|
}
|
|
7778
|
-
const
|
|
7811
|
+
const d = {
|
|
7779
7812
|
keyword: new e.Name("keyword"),
|
|
7780
7813
|
schemaPath: new e.Name("schemaPath"),
|
|
7781
7814
|
// also used in JTD errors
|
|
@@ -7802,11 +7835,11 @@ It.default = Dl;
|
|
|
7802
7835
|
}
|
|
7803
7836
|
function E({ keyword: _, it: { errSchemaPath: g } }, { schemaPath: I, parentSchema: D }) {
|
|
7804
7837
|
let A = D ? g : (0, e.str)`${g}/${_}`;
|
|
7805
|
-
return I && (A = (0, e.str)`${A}${(0, r.getErrorPath)(I, r.Type.Str)}`), [
|
|
7838
|
+
return I && (A = (0, e.str)`${A}${(0, r.getErrorPath)(I, r.Type.Str)}`), [d.schemaPath, A];
|
|
7806
7839
|
}
|
|
7807
7840
|
function k(_, { params: g, message: I }, D) {
|
|
7808
7841
|
const { keyword: A, data: b, schemaValue: x, it: V } = _, { opts: Q, propertyName: H, topSchemaRef: ce, schemaPath: q } = V;
|
|
7809
|
-
D.push([
|
|
7842
|
+
D.push([d.keyword, A], [d.params, typeof g == "function" ? g(_) : g || (0, e._)`{}`]), Q.messages && D.push([d.message, typeof I == "function" ? I(_) : I]), Q.verbose && D.push([d.schema, x], [d.parentSchema, (0, e._)`${ce}${q}`], [s.default.data, b]), H && D.push([d.propertyName, H]);
|
|
7810
7843
|
}
|
|
7811
7844
|
})(Kr);
|
|
7812
7845
|
Object.defineProperty(br, "__esModule", { value: !0 });
|
|
@@ -8097,14 +8130,14 @@ function ic(t, e) {
|
|
|
8097
8130
|
}
|
|
8098
8131
|
fe.schemaProperties = ic;
|
|
8099
8132
|
function oc({ schemaCode: t, data: e, it: { gen: r, topSchemaRef: s, schemaPath: n, errorPath: a }, it: i }, o, l, c) {
|
|
8100
|
-
const
|
|
8133
|
+
const d = c ? (0, Ce._)`${t}, ${e}, ${s}${n}` : e, p = [
|
|
8101
8134
|
[Bt.default.instancePath, (0, Ce.strConcat)(Bt.default.instancePath, a)],
|
|
8102
8135
|
[Bt.default.parentData, i.parentData],
|
|
8103
8136
|
[Bt.default.parentDataProperty, i.parentDataProperty],
|
|
8104
8137
|
[Bt.default.rootData, Bt.default.rootData]
|
|
8105
8138
|
];
|
|
8106
8139
|
i.opts.dynamicRef && p.push([Bt.default.dynamicAnchors, Bt.default.dynamicAnchors]);
|
|
8107
|
-
const T = (0, Ce._)`${
|
|
8140
|
+
const T = (0, Ce._)`${d}, ${r.object(...p)}`;
|
|
8108
8141
|
return l !== Ce.nil ? (0, Ce._)`${o}.call(${l}, ${T})` : (0, Ce._)`${o}(${T})`;
|
|
8109
8142
|
}
|
|
8110
8143
|
fe.callValidateCode = oc;
|
|
@@ -8145,12 +8178,12 @@ function dc(t) {
|
|
|
8145
8178
|
return;
|
|
8146
8179
|
const i = e.let("valid", !1), o = e.name("_valid");
|
|
8147
8180
|
e.block(() => r.forEach((l, c) => {
|
|
8148
|
-
const
|
|
8181
|
+
const d = t.subschema({
|
|
8149
8182
|
keyword: s,
|
|
8150
8183
|
schemaProp: c,
|
|
8151
8184
|
compositeRule: !0
|
|
8152
8185
|
}, o);
|
|
8153
|
-
e.assign(i, (0, Ce._)`${i} || ${o}`), t.mergeValidEvaluated(
|
|
8186
|
+
e.assign(i, (0, Ce._)`${i} || ${o}`), t.mergeValidEvaluated(d, o) || e.if((0, Ce.not)(i));
|
|
8154
8187
|
})), t.result(i, () => t.reset(), () => t.error(!0));
|
|
8155
8188
|
}
|
|
8156
8189
|
fe.validateUnion = dc;
|
|
@@ -8174,7 +8207,7 @@ function mc(t, e) {
|
|
|
8174
8207
|
var r;
|
|
8175
8208
|
const { gen: s, keyword: n, schema: a, parentSchema: i, $data: o, it: l } = t;
|
|
8176
8209
|
yc(l, e);
|
|
8177
|
-
const c = !o && e.compile ? e.compile.call(l.self, a, i, l) : e.validate,
|
|
8210
|
+
const c = !o && e.compile ? e.compile.call(l.self, a, i, l) : e.validate, d = Vo(s, n, c), p = s.let("valid");
|
|
8178
8211
|
t.block$data(p, T), t.ok((r = e.valid) !== null && r !== void 0 ? r : p);
|
|
8179
8212
|
function T() {
|
|
8180
8213
|
if (e.errors === !1)
|
|
@@ -8189,12 +8222,12 @@ function mc(t, e) {
|
|
|
8189
8222
|
return s.try(() => k((0, Je._)`await `), (I) => s.assign(p, !1).if((0, Je._)`${I} instanceof ${l.ValidationError}`, () => s.assign(g, (0, Je._)`${I}.errors`), () => s.throw(I))), g;
|
|
8190
8223
|
}
|
|
8191
8224
|
function E() {
|
|
8192
|
-
const g = (0, Je._)`${
|
|
8225
|
+
const g = (0, Je._)`${d}.errors`;
|
|
8193
8226
|
return s.assign(g, null), k(Je.nil), g;
|
|
8194
8227
|
}
|
|
8195
8228
|
function k(g = e.async ? (0, Je._)`await ` : Je.nil) {
|
|
8196
8229
|
const I = l.opts.passContext ? rr.default.this : rr.default.self, D = !("compile" in e && !o || e.schema === !1);
|
|
8197
|
-
s.assign(p, (0, Je._)`${g}${(0, fc.callValidateCode)(t,
|
|
8230
|
+
s.assign(p, (0, Je._)`${g}${(0, fc.callValidateCode)(t, d, I, D)}`, e.modifying);
|
|
8198
8231
|
}
|
|
8199
8232
|
function _(g) {
|
|
8200
8233
|
var I;
|
|
@@ -8277,8 +8310,8 @@ function $c(t, e, { dataProp: r, dataPropType: s, data: n, dataTypes: a, propert
|
|
|
8277
8310
|
throw new Error('both "data" and "dataProp" passed, only one allowed');
|
|
8278
8311
|
const { gen: o } = e;
|
|
8279
8312
|
if (r !== void 0) {
|
|
8280
|
-
const { errorPath: c, dataPathArr:
|
|
8281
|
-
l(T), t.errorPath = (0, Ct.str)`${c}${(0, Bo.getErrorPath)(r, s, p.jsPropertySyntax)}`, t.parentDataProperty = (0, Ct._)`${r}`, t.dataPathArr = [...
|
|
8313
|
+
const { errorPath: c, dataPathArr: d, opts: p } = e, T = o.let("data", (0, Ct._)`${e.data}${(0, Ct.getProperty)(r)}`, !0);
|
|
8314
|
+
l(T), t.errorPath = (0, Ct.str)`${c}${(0, Bo.getErrorPath)(r, s, p.jsPropertySyntax)}`, t.parentDataProperty = (0, Ct._)`${r}`, t.dataPathArr = [...d, t.parentDataProperty];
|
|
8282
8315
|
}
|
|
8283
8316
|
if (n !== void 0) {
|
|
8284
8317
|
const c = n instanceof Ct.Name ? n : o.let("data", n, !0);
|
|
@@ -8382,18 +8415,18 @@ qt.skipKeywords = {
|
|
|
8382
8415
|
function fs(t, e, r, s, n, a, i, o, l, c) {
|
|
8383
8416
|
if (s && typeof s == "object" && !Array.isArray(s)) {
|
|
8384
8417
|
e(s, n, a, i, o, l, c);
|
|
8385
|
-
for (var
|
|
8386
|
-
var p = s[
|
|
8418
|
+
for (var d in s) {
|
|
8419
|
+
var p = s[d];
|
|
8387
8420
|
if (Array.isArray(p)) {
|
|
8388
|
-
if (
|
|
8421
|
+
if (d in qt.arrayKeywords)
|
|
8389
8422
|
for (var T = 0; T < p.length; T++)
|
|
8390
|
-
fs(t, e, r, p[T], n + "/" +
|
|
8391
|
-
} else if (
|
|
8423
|
+
fs(t, e, r, p[T], n + "/" + d + "/" + T, a, n, d, s, T);
|
|
8424
|
+
} else if (d in qt.propsKeywords) {
|
|
8392
8425
|
if (p && typeof p == "object")
|
|
8393
8426
|
for (var S in p)
|
|
8394
|
-
fs(t, e, r, p[S], n + "/" +
|
|
8427
|
+
fs(t, e, r, p[S], n + "/" + d + "/" + Ec(S), a, n, d, s, S);
|
|
8395
8428
|
} else
|
|
8396
|
-
(
|
|
8429
|
+
(d in qt.keywords || t.allKeys && !(d in qt.skipKeywords)) && fs(t, e, r, p, n + "/" + d, a, n, d, s);
|
|
8397
8430
|
}
|
|
8398
8431
|
r(s, n, a, i, o, l, c);
|
|
8399
8432
|
}
|
|
@@ -8486,7 +8519,7 @@ function Rc(t, e) {
|
|
|
8486
8519
|
function g(D) {
|
|
8487
8520
|
const A = this.opts.uriResolver.resolve;
|
|
8488
8521
|
if (D = _r(_ ? A(_, D) : D), l.has(D))
|
|
8489
|
-
throw
|
|
8522
|
+
throw d(D);
|
|
8490
8523
|
l.add(D);
|
|
8491
8524
|
let b = this.refs[D];
|
|
8492
8525
|
return typeof b == "string" && (b = this.refs[b]), typeof b == "object" ? c(p, b.schema, D) : D !== _r(k) && (D[0] === "#" ? (c(p, o[D], D), o[D] = p) : this.refs[D] = k), D;
|
|
@@ -8501,15 +8534,15 @@ function Rc(t, e) {
|
|
|
8501
8534
|
}), o;
|
|
8502
8535
|
function c(p, T, S) {
|
|
8503
8536
|
if (T !== void 0 && !Cc(p, T))
|
|
8504
|
-
throw
|
|
8537
|
+
throw d(S);
|
|
8505
8538
|
}
|
|
8506
|
-
function
|
|
8539
|
+
function d(p) {
|
|
8507
8540
|
return new Error(`reference "${p}" resolves to more than one schema`);
|
|
8508
8541
|
}
|
|
8509
8542
|
}
|
|
8510
8543
|
qe.getSchemaRefs = Rc;
|
|
8511
|
-
Object.defineProperty(
|
|
8512
|
-
|
|
8544
|
+
Object.defineProperty(vt, "__esModule", { value: !0 });
|
|
8545
|
+
vt.getData = vt.KeywordCxt = vt.validateFunctionCode = void 0;
|
|
8513
8546
|
const Ko = br, Ii = Ve, On = Ft, bs = Ve, Fc = Is, jr = Ot, Ys = Ht, W = le, re = It, Mc = qe, Mt = U, Nr = Kr;
|
|
8514
8547
|
function jc(t) {
|
|
8515
8548
|
if (Yo(t) && (Xo(t), Wo(t))) {
|
|
@@ -8518,7 +8551,7 @@ function jc(t) {
|
|
|
8518
8551
|
}
|
|
8519
8552
|
Go(t, () => (0, Ko.topBoolOrEmptySchema)(t));
|
|
8520
8553
|
}
|
|
8521
|
-
|
|
8554
|
+
vt.validateFunctionCode = jc;
|
|
8522
8555
|
function Go({ gen: t, validateName: e, schema: r, schemaEnv: s, opts: n }, a) {
|
|
8523
8556
|
n.code.es5 ? t.func(e, (0, W._)`${re.default.data}, ${re.default.valCxt}`, s.$async, () => {
|
|
8524
8557
|
t.code((0, W._)`"use strict"; ${Di(r, n)}`), Vc(t, n), t.code(a);
|
|
@@ -8614,15 +8647,15 @@ function Yc({ gen: t, evaluated: e, props: r, items: s }) {
|
|
|
8614
8647
|
r instanceof W.Name && t.assign((0, W._)`${e}.props`, r), s instanceof W.Name && t.assign((0, W._)`${e}.items`, s);
|
|
8615
8648
|
}
|
|
8616
8649
|
function Ni(t, e, r, s) {
|
|
8617
|
-
const { gen: n, schema: a, data: i, allErrors: o, opts: l, self: c } = t, { RULES:
|
|
8618
|
-
if (a.$ref && (l.ignoreKeywordsWithRef || !(0, Mt.schemaHasRulesButRef)(a,
|
|
8619
|
-
n.block(() => tu(t, "$ref",
|
|
8650
|
+
const { gen: n, schema: a, data: i, allErrors: o, opts: l, self: c } = t, { RULES: d } = c;
|
|
8651
|
+
if (a.$ref && (l.ignoreKeywordsWithRef || !(0, Mt.schemaHasRulesButRef)(a, d))) {
|
|
8652
|
+
n.block(() => tu(t, "$ref", d.all.$ref.definition));
|
|
8620
8653
|
return;
|
|
8621
8654
|
}
|
|
8622
8655
|
l.jtd || Xc(t, e), n.block(() => {
|
|
8623
|
-
for (const T of
|
|
8656
|
+
for (const T of d.rules)
|
|
8624
8657
|
p(T);
|
|
8625
|
-
p(
|
|
8658
|
+
p(d.post);
|
|
8626
8659
|
});
|
|
8627
8660
|
function p(T) {
|
|
8628
8661
|
(0, On.shouldUseGroup)(a, T) && (T.type ? (n.if((0, bs.checkDataType)(T.type, i, l.strictNumbers)), Pi(t, T), e.length === 1 && e[0] === T.type && r && (n.else(), (0, bs.reportTypeError)(t)), n.endIf()) : Pi(t, T), o || n.if((0, W._)`${re.default.errors} === ${s || 0}`));
|
|
@@ -8779,7 +8812,7 @@ class eu {
|
|
|
8779
8812
|
return n.if(r, () => this.mergeEvaluated(e, W.Name)), !0;
|
|
8780
8813
|
}
|
|
8781
8814
|
}
|
|
8782
|
-
|
|
8815
|
+
vt.KeywordCxt = eu;
|
|
8783
8816
|
function tu(t, e, r, s) {
|
|
8784
8817
|
const n = new eu(t, r, e);
|
|
8785
8818
|
"code" in r ? r.code(n, s) : n.$data && r.validate ? (0, jr.funcKeywordCode)(n, r) : "macro" in r ? (0, jr.macroKeywordCode)(n, r) : (r.compile || r.validate) && (0, jr.funcKeywordCode)(n, r);
|
|
@@ -8797,15 +8830,15 @@ function ru(t, { dataLevel: e, dataNames: r, dataPathArr: s }) {
|
|
|
8797
8830
|
const c = sd.exec(t);
|
|
8798
8831
|
if (!c)
|
|
8799
8832
|
throw new Error(`Invalid JSON-pointer: ${t}`);
|
|
8800
|
-
const
|
|
8833
|
+
const d = +c[1];
|
|
8801
8834
|
if (n = c[2], n === "#") {
|
|
8802
|
-
if (
|
|
8803
|
-
throw new Error(l("property/index",
|
|
8804
|
-
return s[e -
|
|
8835
|
+
if (d >= e)
|
|
8836
|
+
throw new Error(l("property/index", d));
|
|
8837
|
+
return s[e - d];
|
|
8805
8838
|
}
|
|
8806
|
-
if (
|
|
8807
|
-
throw new Error(l("data",
|
|
8808
|
-
if (a = r[e -
|
|
8839
|
+
if (d > e)
|
|
8840
|
+
throw new Error(l("data", d));
|
|
8841
|
+
if (a = r[e - d], !n)
|
|
8809
8842
|
return a;
|
|
8810
8843
|
}
|
|
8811
8844
|
let i = a;
|
|
@@ -8813,11 +8846,11 @@ function ru(t, { dataLevel: e, dataNames: r, dataPathArr: s }) {
|
|
|
8813
8846
|
for (const c of o)
|
|
8814
8847
|
c && (a = (0, W._)`${a}${(0, W.getProperty)((0, Mt.unescapeJsonPointer)(c))}`, i = (0, W._)`${i} && ${a}`);
|
|
8815
8848
|
return i;
|
|
8816
|
-
function l(c,
|
|
8817
|
-
return `Cannot access ${c} ${
|
|
8849
|
+
function l(c, d) {
|
|
8850
|
+
return `Cannot access ${c} ${d} levels up, current level is ${e}`;
|
|
8818
8851
|
}
|
|
8819
8852
|
}
|
|
8820
|
-
|
|
8853
|
+
vt.getData = ru;
|
|
8821
8854
|
var Gr = {};
|
|
8822
8855
|
Object.defineProperty(Gr, "__esModule", { value: !0 });
|
|
8823
8856
|
class nd extends Error {
|
|
@@ -8838,13 +8871,13 @@ Wr.default = ad;
|
|
|
8838
8871
|
var et = {};
|
|
8839
8872
|
Object.defineProperty(et, "__esModule", { value: !0 });
|
|
8840
8873
|
et.resolveSchema = et.getCompilingSchema = et.resolveRef = et.compileSchema = et.SchemaEnv = void 0;
|
|
8841
|
-
const pt = le, id = Gr, Qt = It,
|
|
8874
|
+
const pt = le, id = Gr, Qt = It, gt = qe, Ri = U, od = vt;
|
|
8842
8875
|
class Ds {
|
|
8843
8876
|
constructor(e) {
|
|
8844
8877
|
var r;
|
|
8845
8878
|
this.refs = {}, this.dynamicAnchors = {};
|
|
8846
8879
|
let s;
|
|
8847
|
-
typeof e.schema == "object" && (s = e.schema), this.schema = e.schema, this.schemaId = e.schemaId, this.root = e.root || this, this.baseId = (r = e.baseId) !== null && r !== void 0 ? r : (0,
|
|
8880
|
+
typeof e.schema == "object" && (s = e.schema), this.schema = e.schema, this.schemaId = e.schemaId, this.root = e.root || this, this.baseId = (r = e.baseId) !== null && r !== void 0 ? r : (0, gt.normalizeId)(s == null ? void 0 : s[e.schemaId || "$id"]), this.schemaPath = e.schemaPath, this.localRefs = e.localRefs, this.meta = e.meta, this.$async = s == null ? void 0 : s.$async, this.refs = {};
|
|
8848
8881
|
}
|
|
8849
8882
|
}
|
|
8850
8883
|
et.SchemaEnv = Ds;
|
|
@@ -8852,7 +8885,7 @@ function In(t) {
|
|
|
8852
8885
|
const e = su.call(this, t);
|
|
8853
8886
|
if (e)
|
|
8854
8887
|
return e;
|
|
8855
|
-
const r = (0,
|
|
8888
|
+
const r = (0, gt.getFullPath)(this.opts.uriResolver, t.root.baseId), { es5: s, lines: n } = this.opts.code, { ownProperties: a } = this.opts, i = new pt.CodeGen(this.scope, { es5: s, lines: n, ownProperties: a });
|
|
8856
8889
|
let o;
|
|
8857
8890
|
t.$async && (o = i.scopeValue("Error", {
|
|
8858
8891
|
ref: id.default,
|
|
@@ -8885,12 +8918,12 @@ function In(t) {
|
|
|
8885
8918
|
opts: this.opts,
|
|
8886
8919
|
self: this
|
|
8887
8920
|
};
|
|
8888
|
-
let
|
|
8921
|
+
let d;
|
|
8889
8922
|
try {
|
|
8890
8923
|
this._compilations.add(t), (0, od.validateFunctionCode)(c), i.optimize(this.opts.code.optimize);
|
|
8891
8924
|
const p = i.toString();
|
|
8892
|
-
|
|
8893
|
-
const S = new Function(`${Qt.default.self}`, `${Qt.default.scope}`,
|
|
8925
|
+
d = `${i.scopeRefs(Qt.default.scope)}return ${p}`, this.opts.code.process && (d = this.opts.code.process(d, t));
|
|
8926
|
+
const S = new Function(`${Qt.default.self}`, `${Qt.default.scope}`, d)(this, this.scope.get());
|
|
8894
8927
|
if (this.scope.value(l, { ref: S }), S.errors = null, S.schema = t.schema, S.schemaEnv = t, t.$async && (S.$async = !0), this.opts.code.source === !0 && (S.source = { validateName: l, validateCode: p, scopeValues: i._values }), this.opts.unevaluated) {
|
|
8895
8928
|
const { props: E, items: k } = c;
|
|
8896
8929
|
S.evaluated = {
|
|
@@ -8902,7 +8935,7 @@ function In(t) {
|
|
|
8902
8935
|
}
|
|
8903
8936
|
return t.validate = S, t;
|
|
8904
8937
|
} catch (p) {
|
|
8905
|
-
throw delete t.validate, delete t.validateName,
|
|
8938
|
+
throw delete t.validate, delete t.validateName, d && this.logger.error("Error compiling schema, function code:", d), p;
|
|
8906
8939
|
} finally {
|
|
8907
8940
|
this._compilations.delete(t);
|
|
8908
8941
|
}
|
|
@@ -8910,7 +8943,7 @@ function In(t) {
|
|
|
8910
8943
|
et.compileSchema = In;
|
|
8911
8944
|
function ud(t, e, r) {
|
|
8912
8945
|
var s;
|
|
8913
|
-
r = (0,
|
|
8946
|
+
r = (0, gt.resolveUrl)(this.opts.uriResolver, e, r);
|
|
8914
8947
|
const n = t.refs[r];
|
|
8915
8948
|
if (n)
|
|
8916
8949
|
return n;
|
|
@@ -8924,7 +8957,7 @@ function ud(t, e, r) {
|
|
|
8924
8957
|
}
|
|
8925
8958
|
et.resolveRef = ud;
|
|
8926
8959
|
function ld(t) {
|
|
8927
|
-
return (0,
|
|
8960
|
+
return (0, gt.inlineRef)(t.schema, this.opts.inlineRefs) ? t.schema : t.validate ? t : In.call(this, t);
|
|
8928
8961
|
}
|
|
8929
8962
|
function su(t) {
|
|
8930
8963
|
for (const e of this._compilations)
|
|
@@ -8942,19 +8975,19 @@ function dd(t, e) {
|
|
|
8942
8975
|
return r || this.schemas[e] || Ns.call(this, t, e);
|
|
8943
8976
|
}
|
|
8944
8977
|
function Ns(t, e) {
|
|
8945
|
-
const r = this.opts.uriResolver.parse(e), s = (0,
|
|
8946
|
-
let n = (0,
|
|
8978
|
+
const r = this.opts.uriResolver.parse(e), s = (0, gt._getFullPath)(this.opts.uriResolver, r);
|
|
8979
|
+
let n = (0, gt.getFullPath)(this.opts.uriResolver, t.baseId, void 0);
|
|
8947
8980
|
if (Object.keys(t.schema).length > 0 && s === n)
|
|
8948
8981
|
return Js.call(this, r, t);
|
|
8949
|
-
const a = (0,
|
|
8982
|
+
const a = (0, gt.normalizeId)(s), i = this.refs[a] || this.schemas[a];
|
|
8950
8983
|
if (typeof i == "string") {
|
|
8951
8984
|
const o = Ns.call(this, t, i);
|
|
8952
8985
|
return typeof (o == null ? void 0 : o.schema) != "object" ? void 0 : Js.call(this, r, o);
|
|
8953
8986
|
}
|
|
8954
8987
|
if (typeof (i == null ? void 0 : i.schema) == "object") {
|
|
8955
|
-
if (i.validate || In.call(this, i), a === (0,
|
|
8988
|
+
if (i.validate || In.call(this, i), a === (0, gt.normalizeId)(e)) {
|
|
8956
8989
|
const { schema: o } = i, { schemaId: l } = this.opts, c = o[l];
|
|
8957
|
-
return c && (n = (0,
|
|
8990
|
+
return c && (n = (0, gt.resolveUrl)(this.opts.uriResolver, n, c)), new Ds({ schema: o, schemaId: l, root: t, baseId: n });
|
|
8958
8991
|
}
|
|
8959
8992
|
return Js.call(this, r, i);
|
|
8960
8993
|
}
|
|
@@ -8979,11 +9012,11 @@ function Js(t, { baseId: e, schema: r, root: s }) {
|
|
|
8979
9012
|
return;
|
|
8980
9013
|
r = l;
|
|
8981
9014
|
const c = typeof r == "object" && r[this.opts.schemaId];
|
|
8982
|
-
!fd.has(o) && c && (e = (0,
|
|
9015
|
+
!fd.has(o) && c && (e = (0, gt.resolveUrl)(this.opts.uriResolver, e, c));
|
|
8983
9016
|
}
|
|
8984
9017
|
let a;
|
|
8985
9018
|
if (typeof r != "boolean" && r.$ref && !(0, Ri.schemaHasRulesButRef)(r, this.RULES)) {
|
|
8986
|
-
const o = (0,
|
|
9019
|
+
const o = (0, gt.resolveUrl)(this.opts.uriResolver, e, r.$ref);
|
|
8987
9020
|
a = Ns.call(this, s, o);
|
|
8988
9021
|
}
|
|
8989
9022
|
const { schemaId: i } = this.opts;
|
|
@@ -9051,7 +9084,7 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9051
9084
|
function c($) {
|
|
9052
9085
|
var m = "[A-Za-z]", w = "[0-9]", M = s(w, "[A-Fa-f]"), F = n(n("%[EFef]" + M + "%" + M + M + "%" + M + M) + "|" + n("%[89A-Fa-f]" + M + "%" + M + M) + "|" + n("%" + M + M)), Y = "[\\:\\/\\?\\#\\[\\]\\@]", J = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", me = s(Y, J), we = $ ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", Pe = $ ? "[\\uE000-\\uF8FF]" : "[]", pe = s(m, w, "[\\-\\.\\_\\~]", we);
|
|
9053
9086
|
n(m + s(m, w, "[\\+\\-\\.]") + "*"), n(n(F + "|" + s(pe, J, "[\\:]")) + "*");
|
|
9054
|
-
var ke = n(n("25[0-5]") + "|" + n("2[0-4]" + w) + "|" + n("1" + w + w) + "|" + n("0?[1-9]" + w) + "|0?0?" + w), Re = n(ke + "\\." + ke + "\\." + ke + "\\." + ke), ne = n(M + "{1,4}"), Te = n(n(ne + "\\:" + ne) + "|" + Re), Me = n(n(ne + "\\:") + "{6}" + Te), Oe = n("\\:\\:" + n(ne + "\\:") + "{5}" + Te), Vt = n(n(ne) + "?\\:\\:" + n(ne + "\\:") + "{4}" + Te),
|
|
9087
|
+
var ke = n(n("25[0-5]") + "|" + n("2[0-4]" + w) + "|" + n("1" + w + w) + "|" + n("0?[1-9]" + w) + "|0?0?" + w), Re = n(ke + "\\." + ke + "\\." + ke + "\\." + ke), ne = n(M + "{1,4}"), Te = n(n(ne + "\\:" + ne) + "|" + Re), Me = n(n(ne + "\\:") + "{6}" + Te), Oe = n("\\:\\:" + n(ne + "\\:") + "{5}" + Te), Vt = n(n(ne) + "?\\:\\:" + n(ne + "\\:") + "{4}" + Te), St = n(n(n(ne + "\\:") + "{0,1}" + ne) + "?\\:\\:" + n(ne + "\\:") + "{3}" + Te), Et = n(n(n(ne + "\\:") + "{0,2}" + ne) + "?\\:\\:" + n(ne + "\\:") + "{2}" + Te), dr = n(n(n(ne + "\\:") + "{0,3}" + ne) + "?\\:\\:" + ne + "\\:" + Te), Xt = n(n(n(ne + "\\:") + "{0,4}" + ne) + "?\\:\\:" + Te), ut = n(n(n(ne + "\\:") + "{0,5}" + ne) + "?\\:\\:" + ne), kt = n(n(n(ne + "\\:") + "{0,6}" + ne) + "?\\:\\:"), Jt = n([Me, Oe, Vt, St, Et, dr, Xt, ut, kt].join("|")), Dt = n(n(pe + "|" + F) + "+");
|
|
9055
9088
|
n("[vV]" + M + "+\\." + s(pe, J, "[\\:]") + "+"), n(n(F + "|" + s(pe, J)) + "*");
|
|
9056
9089
|
var Ar = n(F + "|" + s(pe, J, "[\\:\\@]"));
|
|
9057
9090
|
return n(n(F + "|" + s(pe, J, "[\\@]")) + "+"), n(n(Ar + "|" + s("[\\/\\?]", Pe)) + "*"), {
|
|
@@ -9071,7 +9104,7 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9071
9104
|
//RFC 6874, with relaxed parsing rules
|
|
9072
9105
|
};
|
|
9073
9106
|
}
|
|
9074
|
-
var
|
|
9107
|
+
var d = c(!1), p = c(!0), T = /* @__PURE__ */ function() {
|
|
9075
9108
|
function $(m, w) {
|
|
9076
9109
|
var M = [], F = !0, Y = !1, J = void 0;
|
|
9077
9110
|
try {
|
|
@@ -9195,27 +9228,27 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9195
9228
|
}
|
|
9196
9229
|
var ne = w.length, Te = ne;
|
|
9197
9230
|
for (ne && w.push(x); Te < M; ) {
|
|
9198
|
-
var Me = E, Oe = !0, Vt = !1,
|
|
9231
|
+
var Me = E, Oe = !0, Vt = !1, St = void 0;
|
|
9199
9232
|
try {
|
|
9200
|
-
for (var
|
|
9233
|
+
for (var Et = m[Symbol.iterator](), dr; !(Oe = (dr = Et.next()).done); Oe = !0) {
|
|
9201
9234
|
var Xt = dr.value;
|
|
9202
9235
|
Xt >= F && Xt < Me && (Me = Xt);
|
|
9203
9236
|
}
|
|
9204
9237
|
} catch (Ir) {
|
|
9205
|
-
Vt = !0,
|
|
9238
|
+
Vt = !0, St = Ir;
|
|
9206
9239
|
} finally {
|
|
9207
9240
|
try {
|
|
9208
|
-
!Oe &&
|
|
9241
|
+
!Oe && Et.return && Et.return();
|
|
9209
9242
|
} finally {
|
|
9210
9243
|
if (Vt)
|
|
9211
|
-
throw
|
|
9244
|
+
throw St;
|
|
9212
9245
|
}
|
|
9213
9246
|
}
|
|
9214
|
-
var
|
|
9215
|
-
Me - F > K((E - Y) /
|
|
9216
|
-
var
|
|
9247
|
+
var ut = Te + 1;
|
|
9248
|
+
Me - F > K((E - Y) / ut) && G("overflow"), Y += (Me - F) * ut, F = Me;
|
|
9249
|
+
var kt = !0, Jt = !1, Dt = void 0;
|
|
9217
9250
|
try {
|
|
9218
|
-
for (var Ar = m[Symbol.iterator](), ya; !(
|
|
9251
|
+
for (var Ar = m[Symbol.iterator](), ya; !(kt = (ya = Ar.next()).done); kt = !0) {
|
|
9219
9252
|
var va = ya.value;
|
|
9220
9253
|
if (va < F && ++Y > E && G("overflow"), va == F) {
|
|
9221
9254
|
for (
|
|
@@ -9230,14 +9263,14 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9230
9263
|
var _a = Jr - Qr, ba = k - Qr;
|
|
9231
9264
|
w.push(se(O(Qr + _a % ba, 0))), Jr = K(_a / ba);
|
|
9232
9265
|
}
|
|
9233
|
-
w.push(se(O(Jr, 0))), J = y(Y,
|
|
9266
|
+
w.push(se(O(Jr, 0))), J = y(Y, ut, Te == ne), Y = 0, ++Te;
|
|
9234
9267
|
}
|
|
9235
9268
|
}
|
|
9236
9269
|
} catch (Ir) {
|
|
9237
9270
|
Jt = !0, Dt = Ir;
|
|
9238
9271
|
} finally {
|
|
9239
9272
|
try {
|
|
9240
|
-
!
|
|
9273
|
+
!kt && Ar.return && Ar.return();
|
|
9241
9274
|
} finally {
|
|
9242
9275
|
if (Jt)
|
|
9243
9276
|
throw Dt;
|
|
@@ -9250,7 +9283,7 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9250
9283
|
return ye(m, function(w) {
|
|
9251
9284
|
return V.test(w) ? R(w.slice(4).toLowerCase()) : w;
|
|
9252
9285
|
});
|
|
9253
|
-
},
|
|
9286
|
+
}, f = function(m) {
|
|
9254
9287
|
return ye(m, function(w) {
|
|
9255
9288
|
return Q.test(w) ? "xn--" + C(w) : w;
|
|
9256
9289
|
});
|
|
@@ -9274,7 +9307,7 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9274
9307
|
},
|
|
9275
9308
|
decode: R,
|
|
9276
9309
|
encode: C,
|
|
9277
|
-
toASCII:
|
|
9310
|
+
toASCII: f,
|
|
9278
9311
|
toUnicode: u
|
|
9279
9312
|
}, N = {};
|
|
9280
9313
|
function j($) {
|
|
@@ -9325,27 +9358,27 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9325
9358
|
for (var J = F.toLowerCase().split("::").reverse(), me = T(J, 2), we = me[0], Pe = me[1], pe = Pe ? Pe.split(":").map(ee) : [], ke = we.split(":").map(ee), Re = m.IPV4ADDRESS.test(ke[ke.length - 1]), ne = Re ? 7 : 8, Te = ke.length - ne, Me = Array(ne), Oe = 0; Oe < ne; ++Oe)
|
|
9326
9359
|
Me[Oe] = pe[Oe] || ke[Te + Oe] || "";
|
|
9327
9360
|
Re && (Me[ne - 1] = z(Me[ne - 1], m));
|
|
9328
|
-
var Vt = Me.reduce(function(
|
|
9329
|
-
if (!
|
|
9330
|
-
var Dt =
|
|
9331
|
-
Dt && Dt.index + Dt.length === Jt ? Dt.length++ :
|
|
9361
|
+
var Vt = Me.reduce(function(ut, kt, Jt) {
|
|
9362
|
+
if (!kt || kt === "0") {
|
|
9363
|
+
var Dt = ut[ut.length - 1];
|
|
9364
|
+
Dt && Dt.index + Dt.length === Jt ? Dt.length++ : ut.push({ index: Jt, length: 1 });
|
|
9332
9365
|
}
|
|
9333
|
-
return
|
|
9334
|
-
}, []),
|
|
9335
|
-
return
|
|
9336
|
-
})[0],
|
|
9337
|
-
if (
|
|
9338
|
-
var dr = Me.slice(0,
|
|
9339
|
-
|
|
9366
|
+
return ut;
|
|
9367
|
+
}, []), St = Vt.sort(function(ut, kt) {
|
|
9368
|
+
return kt.length - ut.length;
|
|
9369
|
+
})[0], Et = void 0;
|
|
9370
|
+
if (St && St.length > 1) {
|
|
9371
|
+
var dr = Me.slice(0, St.index), Xt = Me.slice(St.index + St.length);
|
|
9372
|
+
Et = dr.join(":") + "::" + Xt.join(":");
|
|
9340
9373
|
} else
|
|
9341
|
-
|
|
9342
|
-
return Y && (
|
|
9374
|
+
Et = Me.join(":");
|
|
9375
|
+
return Y && (Et += "%" + Y), Et;
|
|
9343
9376
|
} else
|
|
9344
9377
|
return $;
|
|
9345
9378
|
}
|
|
9346
9379
|
var Xe = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i, tt = "".match(/(){0}/)[1] === void 0;
|
|
9347
9380
|
function ie($) {
|
|
9348
|
-
var m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, w = {}, M = m.iri !== !1 ? p :
|
|
9381
|
+
var m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, w = {}, M = m.iri !== !1 ? p : d;
|
|
9349
9382
|
m.reference === "suffix" && ($ = (m.scheme ? m.scheme + ":" : "") + "//" + $);
|
|
9350
9383
|
var F = $.match(Xe);
|
|
9351
9384
|
if (F) {
|
|
@@ -9358,7 +9391,7 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9358
9391
|
} catch (J) {
|
|
9359
9392
|
w.error = w.error || "Host's domain name can not be converted to ASCII via punycode: " + J;
|
|
9360
9393
|
}
|
|
9361
|
-
L(w,
|
|
9394
|
+
L(w, d);
|
|
9362
9395
|
} else
|
|
9363
9396
|
L(w, M);
|
|
9364
9397
|
Y && Y.parse && Y.parse(w, m);
|
|
@@ -9366,14 +9399,14 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9366
9399
|
w.error = w.error || "URI can not be parsed.";
|
|
9367
9400
|
return w;
|
|
9368
9401
|
}
|
|
9369
|
-
function
|
|
9370
|
-
var w = m.iri !== !1 ? p :
|
|
9402
|
+
function _t($, m) {
|
|
9403
|
+
var w = m.iri !== !1 ? p : d, M = [];
|
|
9371
9404
|
return $.userinfo !== void 0 && (M.push($.userinfo), M.push("@")), $.host !== void 0 && M.push(he(z(String($.host), w), w).replace(w.IPV6ADDRESS, function(F, Y, J) {
|
|
9372
9405
|
return "[" + Y + (J ? "%25" + J : "") + "]";
|
|
9373
9406
|
})), (typeof $.port == "number" || typeof $.port == "string") && (M.push(":"), M.push(String($.port))), M.length ? M.join("") : void 0;
|
|
9374
9407
|
}
|
|
9375
9408
|
var rt = /^\.\.?\//, xt = /^\/\.(\/|$)/, ur = /^\/\.\.(\/|$)/, wr = /^\/?(?:.|\n)*?(?=\/|$)/;
|
|
9376
|
-
function
|
|
9409
|
+
function bt($) {
|
|
9377
9410
|
for (var m = []; $.length; )
|
|
9378
9411
|
if ($.match(rt))
|
|
9379
9412
|
$ = $.replace(rt, "");
|
|
@@ -9394,7 +9427,7 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9394
9427
|
return m.join("");
|
|
9395
9428
|
}
|
|
9396
9429
|
function Ze($) {
|
|
9397
|
-
var m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, w = m.iri ? p :
|
|
9430
|
+
var m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, w = m.iri ? p : d, M = [], F = N[(m.scheme || $.scheme || "").toLowerCase()];
|
|
9398
9431
|
if (F && F.serialize && F.serialize($, m), $.host && !w.IPV6ADDRESS.test($.host)) {
|
|
9399
9432
|
if (m.domainHost || F && F.domainHost)
|
|
9400
9433
|
try {
|
|
@@ -9404,16 +9437,16 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9404
9437
|
}
|
|
9405
9438
|
}
|
|
9406
9439
|
L($, w), m.reference !== "suffix" && $.scheme && (M.push($.scheme), M.push(":"));
|
|
9407
|
-
var Y =
|
|
9440
|
+
var Y = _t($, m);
|
|
9408
9441
|
if (Y !== void 0 && (m.reference !== "suffix" && M.push("//"), M.push(Y), $.path && $.path.charAt(0) !== "/" && M.push("/")), $.path !== void 0) {
|
|
9409
9442
|
var J = $.path;
|
|
9410
|
-
!m.absolutePath && (!F || !F.absolutePath) && (J =
|
|
9443
|
+
!m.absolutePath && (!F || !F.absolutePath) && (J = bt(J)), Y === void 0 && (J = J.replace(/^\/\//, "/%2F")), M.push(J);
|
|
9411
9444
|
}
|
|
9412
9445
|
return $.query !== void 0 && (M.push("?"), M.push($.query)), $.fragment !== void 0 && (M.push("#"), M.push($.fragment)), M.join("");
|
|
9413
9446
|
}
|
|
9414
9447
|
function lr($, m) {
|
|
9415
9448
|
var w = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, M = arguments[3], F = {};
|
|
9416
|
-
return M || ($ = ie(Ze($, w), w), m = ie(Ze(m, w), w)), w = w || {}, !w.tolerant && m.scheme ? (F.scheme = m.scheme, F.userinfo = m.userinfo, F.host = m.host, F.port = m.port, F.path =
|
|
9449
|
+
return M || ($ = ie(Ze($, w), w), m = ie(Ze(m, w), w)), w = w || {}, !w.tolerant && m.scheme ? (F.scheme = m.scheme, F.userinfo = m.userinfo, F.host = m.host, F.port = m.port, F.path = bt(m.path || ""), F.query = m.query) : (m.userinfo !== void 0 || m.host !== void 0 || m.port !== void 0 ? (F.userinfo = m.userinfo, F.host = m.host, F.port = m.port, F.path = bt(m.path || ""), F.query = m.query) : (m.path ? (m.path.charAt(0) === "/" ? F.path = bt(m.path) : (($.userinfo !== void 0 || $.host !== void 0 || $.port !== void 0) && !$.path ? F.path = "/" + m.path : $.path ? F.path = $.path.slice(0, $.path.lastIndexOf("/") + 1) + m.path : F.path = m.path, F.path = bt(F.path)), F.query = m.query) : (F.path = $.path, m.query !== void 0 ? F.query = m.query : F.query = $.query), F.userinfo = $.userinfo, F.host = $.host, F.port = $.port), F.scheme = $.scheme), F.fragment = m.fragment, F;
|
|
9417
9450
|
}
|
|
9418
9451
|
function Cr($, m, w) {
|
|
9419
9452
|
var M = l({ scheme: "null" }, w);
|
|
@@ -9426,10 +9459,10 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9426
9459
|
return typeof $ == "string" ? $ = Ze(ie($, w), w) : a($) === "object" && ($ = Ze($, w)), typeof m == "string" ? m = Ze(ie(m, w), w) : a(m) === "object" && (m = Ze(m, w)), $ === m;
|
|
9427
9460
|
}
|
|
9428
9461
|
function Xr($, m) {
|
|
9429
|
-
return $ && $.toString().replace(!m || !m.iri ?
|
|
9462
|
+
return $ && $.toString().replace(!m || !m.iri ? d.ESCAPE : p.ESCAPE, j);
|
|
9430
9463
|
}
|
|
9431
|
-
function
|
|
9432
|
-
return $ && $.toString().replace(!m || !m.iri ?
|
|
9464
|
+
function ot($, m) {
|
|
9465
|
+
return $ && $.toString().replace(!m || !m.iri ? d.PCT_ENCODED : p.PCT_ENCODED, B);
|
|
9433
9466
|
}
|
|
9434
9467
|
var Yt = {
|
|
9435
9468
|
scheme: "http",
|
|
@@ -9469,7 +9502,7 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9469
9502
|
domainHost: Or.domainHost,
|
|
9470
9503
|
parse: Or.parse,
|
|
9471
9504
|
serialize: Or.serialize
|
|
9472
|
-
}, vu = {}, fa = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",
|
|
9505
|
+
}, vu = {}, fa = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]", $t = "[0-9A-Fa-f]", _u = n(n("%[EFef]" + $t + "%" + $t + $t + "%" + $t + $t) + "|" + n("%[89A-Fa-f]" + $t + "%" + $t + $t) + "|" + n("%" + $t + $t)), bu = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]", $u = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", Su = s($u, '[\\"\\\\]'), Eu = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]", ku = new RegExp(fa, "g"), cr = new RegExp(_u, "g"), wu = new RegExp(s("[^]", bu, "[\\.]", '[\\"]', Su), "g"), pa = new RegExp(s("[^]", fa, Eu), "g"), Cu = pa;
|
|
9473
9506
|
function Fs($) {
|
|
9474
9507
|
var m = B($);
|
|
9475
9508
|
return m.match(ku) ? m : $;
|
|
@@ -9487,13 +9520,13 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9487
9520
|
F.push(ke[Re]);
|
|
9488
9521
|
break;
|
|
9489
9522
|
case "subject":
|
|
9490
|
-
M.subject =
|
|
9523
|
+
M.subject = ot(pe[1], w);
|
|
9491
9524
|
break;
|
|
9492
9525
|
case "body":
|
|
9493
|
-
M.body =
|
|
9526
|
+
M.body = ot(pe[1], w);
|
|
9494
9527
|
break;
|
|
9495
9528
|
default:
|
|
9496
|
-
Y = !0, J[
|
|
9529
|
+
Y = !0, J[ot(pe[0], w)] = ot(pe[1], w);
|
|
9497
9530
|
break;
|
|
9498
9531
|
}
|
|
9499
9532
|
}
|
|
@@ -9502,11 +9535,11 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9502
9535
|
M.query = void 0;
|
|
9503
9536
|
for (var Te = 0, Me = F.length; Te < Me; ++Te) {
|
|
9504
9537
|
var Oe = F[Te].split("@");
|
|
9505
|
-
if (Oe[0] =
|
|
9506
|
-
Oe[1] =
|
|
9538
|
+
if (Oe[0] = ot(Oe[0]), w.unicodeSupport)
|
|
9539
|
+
Oe[1] = ot(Oe[1], w).toLowerCase();
|
|
9507
9540
|
else
|
|
9508
9541
|
try {
|
|
9509
|
-
Oe[1] = v.toASCII(
|
|
9542
|
+
Oe[1] = v.toASCII(ot(Oe[1], w).toLowerCase());
|
|
9510
9543
|
} catch (Vt) {
|
|
9511
9544
|
M.error = M.error || "Email address's domain name can not be converted to ASCII via punycode: " + Vt;
|
|
9512
9545
|
}
|
|
@@ -9520,7 +9553,7 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9520
9553
|
for (var Y = 0, J = F.length; Y < J; ++Y) {
|
|
9521
9554
|
var me = String(F[Y]), we = me.lastIndexOf("@"), Pe = me.slice(0, we).replace(cr, Fs).replace(cr, i).replace(wu, j), pe = me.slice(we + 1);
|
|
9522
9555
|
try {
|
|
9523
|
-
pe = w.iri ? v.toUnicode(pe) : v.toASCII(
|
|
9556
|
+
pe = w.iri ? v.toUnicode(pe) : v.toASCII(ot(pe, w).toLowerCase());
|
|
9524
9557
|
} catch (Te) {
|
|
9525
9558
|
M.error = M.error || "Email address's domain name can not be converted to " + (w.iri ? "Unicode" : "ASCII") + " via punycode: " + Te;
|
|
9526
9559
|
}
|
|
@@ -9563,7 +9596,7 @@ var Dn = {}, ln = { exports: {} };
|
|
|
9563
9596
|
return M.nss = (m.uuid || "").toLowerCase(), M;
|
|
9564
9597
|
}
|
|
9565
9598
|
};
|
|
9566
|
-
N[Yt.scheme] = Yt, N[la.scheme] = la, N[Or.scheme] = Or, N[da.scheme] = da, N[ha.scheme] = ha, N[ma.scheme] = ma, N[ga.scheme] = ga, r.SCHEMES = N, r.pctEncChar = j, r.pctDecChars = B, r.parse = ie, r.removeDotSegments =
|
|
9599
|
+
N[Yt.scheme] = Yt, N[la.scheme] = la, N[Or.scheme] = Or, N[da.scheme] = da, N[ha.scheme] = ha, N[ma.scheme] = ma, N[ga.scheme] = ga, r.SCHEMES = N, r.pctEncChar = j, r.pctDecChars = B, r.parse = ie, r.removeDotSegments = bt, r.serialize = Ze, r.resolveComponents = lr, r.resolve = Cr, r.normalize = Wt, r.equal = Tr, r.escapeComponent = Xr, r.unescapeComponent = ot, Object.defineProperty(r, "__esModule", { value: !0 });
|
|
9567
9600
|
});
|
|
9568
9601
|
})(ln, ln.exports);
|
|
9569
9602
|
var bd = ln.exports;
|
|
@@ -9573,7 +9606,7 @@ nu.code = 'require("ajv/dist/runtime/uri").default';
|
|
|
9573
9606
|
Dn.default = nu;
|
|
9574
9607
|
(function(t) {
|
|
9575
9608
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.CodeGen = t.Name = t.nil = t.stringify = t.str = t._ = t.KeywordCxt = void 0;
|
|
9576
|
-
var e =
|
|
9609
|
+
var e = vt;
|
|
9577
9610
|
Object.defineProperty(t, "KeywordCxt", { enumerable: !0, get: function() {
|
|
9578
9611
|
return e.KeywordCxt;
|
|
9579
9612
|
} });
|
|
@@ -9591,7 +9624,7 @@ Dn.default = nu;
|
|
|
9591
9624
|
} }), Object.defineProperty(t, "CodeGen", { enumerable: !0, get: function() {
|
|
9592
9625
|
return r.CodeGen;
|
|
9593
9626
|
} });
|
|
9594
|
-
const s = Gr, n = Wr, a = ir, i = et, o = le, l = qe, c = Ve,
|
|
9627
|
+
const s = Gr, n = Wr, a = ir, i = et, o = le, l = qe, c = Ve, d = U, p = _d, T = Dn, S = (O, y) => new RegExp(O, y);
|
|
9595
9628
|
S.code = "new RegExp";
|
|
9596
9629
|
const E = ["removeAdditional", "useDefaults", "coerceTypes"], k = /* @__PURE__ */ new Set([
|
|
9597
9630
|
"validate",
|
|
@@ -9629,23 +9662,23 @@ Dn.default = nu;
|
|
|
9629
9662
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
9630
9663
|
}, I = 200;
|
|
9631
9664
|
function D(O) {
|
|
9632
|
-
var y, R, C, u,
|
|
9633
|
-
const Wt = O.strict, Tr = (y = O.code) === null || y === void 0 ? void 0 : y.optimize, Xr = Tr === !0 || Tr === void 0 ? 1 : Tr || 0,
|
|
9665
|
+
var y, R, C, u, f, v, N, j, B, L, ee, z, he, Xe, tt, ie, _t, rt, xt, ur, wr, bt, Ze, lr, Cr;
|
|
9666
|
+
const Wt = O.strict, Tr = (y = O.code) === null || y === void 0 ? void 0 : y.optimize, Xr = Tr === !0 || Tr === void 0 ? 1 : Tr || 0, ot = (C = (R = O.code) === null || R === void 0 ? void 0 : R.regExp) !== null && C !== void 0 ? C : S, Yt = (u = O.uriResolver) !== null && u !== void 0 ? u : T.default;
|
|
9634
9667
|
return {
|
|
9635
|
-
strictSchema: (v = (
|
|
9668
|
+
strictSchema: (v = (f = O.strictSchema) !== null && f !== void 0 ? f : Wt) !== null && v !== void 0 ? v : !0,
|
|
9636
9669
|
strictNumbers: (j = (N = O.strictNumbers) !== null && N !== void 0 ? N : Wt) !== null && j !== void 0 ? j : !0,
|
|
9637
9670
|
strictTypes: (L = (B = O.strictTypes) !== null && B !== void 0 ? B : Wt) !== null && L !== void 0 ? L : "log",
|
|
9638
9671
|
strictTuples: (z = (ee = O.strictTuples) !== null && ee !== void 0 ? ee : Wt) !== null && z !== void 0 ? z : "log",
|
|
9639
9672
|
strictRequired: (Xe = (he = O.strictRequired) !== null && he !== void 0 ? he : Wt) !== null && Xe !== void 0 ? Xe : !1,
|
|
9640
|
-
code: O.code ? { ...O.code, optimize: Xr, regExp:
|
|
9673
|
+
code: O.code ? { ...O.code, optimize: Xr, regExp: ot } : { optimize: Xr, regExp: ot },
|
|
9641
9674
|
loopRequired: (tt = O.loopRequired) !== null && tt !== void 0 ? tt : I,
|
|
9642
9675
|
loopEnum: (ie = O.loopEnum) !== null && ie !== void 0 ? ie : I,
|
|
9643
|
-
meta: (
|
|
9676
|
+
meta: (_t = O.meta) !== null && _t !== void 0 ? _t : !0,
|
|
9644
9677
|
messages: (rt = O.messages) !== null && rt !== void 0 ? rt : !0,
|
|
9645
9678
|
inlineRefs: (xt = O.inlineRefs) !== null && xt !== void 0 ? xt : !0,
|
|
9646
9679
|
schemaId: (ur = O.schemaId) !== null && ur !== void 0 ? ur : "$id",
|
|
9647
9680
|
addUsedSchema: (wr = O.addUsedSchema) !== null && wr !== void 0 ? wr : !0,
|
|
9648
|
-
validateSchema: (
|
|
9681
|
+
validateSchema: (bt = O.validateSchema) !== null && bt !== void 0 ? bt : !0,
|
|
9649
9682
|
validateFormats: (Ze = O.validateFormats) !== null && Ze !== void 0 ? Ze : !0,
|
|
9650
9683
|
unicodeRegExp: (lr = O.unicodeRegExp) !== null && lr !== void 0 ? lr : !0,
|
|
9651
9684
|
int32range: (Cr = O.int32range) !== null && Cr !== void 0 ? Cr : !0,
|
|
@@ -9692,11 +9725,11 @@ Dn.default = nu;
|
|
|
9692
9725
|
const { loadSchema: C } = this.opts;
|
|
9693
9726
|
return u.call(this, y, R);
|
|
9694
9727
|
async function u(L, ee) {
|
|
9695
|
-
await
|
|
9728
|
+
await f.call(this, L.$schema);
|
|
9696
9729
|
const z = this._addSchema(L, ee);
|
|
9697
9730
|
return z.validate || v.call(this, z);
|
|
9698
9731
|
}
|
|
9699
|
-
async function
|
|
9732
|
+
async function f(L) {
|
|
9700
9733
|
L && !this.getSchema(L) && await u.call(this, { $ref: L }, !0);
|
|
9701
9734
|
}
|
|
9702
9735
|
async function v(L) {
|
|
@@ -9714,7 +9747,7 @@ Dn.default = nu;
|
|
|
9714
9747
|
}
|
|
9715
9748
|
async function j(L) {
|
|
9716
9749
|
const ee = await B.call(this, L);
|
|
9717
|
-
this.refs[L] || await
|
|
9750
|
+
this.refs[L] || await f.call(this, ee.$schema), this.refs[L] || this.addSchema(ee, L, R);
|
|
9718
9751
|
}
|
|
9719
9752
|
async function B(L) {
|
|
9720
9753
|
const ee = this._loading[L];
|
|
@@ -9734,13 +9767,13 @@ Dn.default = nu;
|
|
|
9734
9767
|
this.addSchema(v, void 0, C, u);
|
|
9735
9768
|
return this;
|
|
9736
9769
|
}
|
|
9737
|
-
let
|
|
9770
|
+
let f;
|
|
9738
9771
|
if (typeof y == "object") {
|
|
9739
9772
|
const { schemaId: v } = this.opts;
|
|
9740
|
-
if (
|
|
9773
|
+
if (f = y[v], f !== void 0 && typeof f != "string")
|
|
9741
9774
|
throw new Error(`schema ${v} must be string`);
|
|
9742
9775
|
}
|
|
9743
|
-
return R = (0, l.normalizeId)(R ||
|
|
9776
|
+
return R = (0, l.normalizeId)(R || f), this._checkUnique(R), this.schemas[R] = this._addSchema(y, C, R, u, !0), this;
|
|
9744
9777
|
}
|
|
9745
9778
|
// Add schema that will be used to validate other schemas
|
|
9746
9779
|
// options in META_IGNORE_OPTIONS are alway set to false
|
|
@@ -9758,11 +9791,11 @@ Dn.default = nu;
|
|
|
9758
9791
|
return this.logger.warn("meta-schema not available"), this.errors = null, !0;
|
|
9759
9792
|
const u = this.validate(C, y);
|
|
9760
9793
|
if (!u && R) {
|
|
9761
|
-
const
|
|
9794
|
+
const f = "schema is invalid: " + this.errorsText();
|
|
9762
9795
|
if (this.opts.validateSchema === "log")
|
|
9763
|
-
this.logger.error(
|
|
9796
|
+
this.logger.error(f);
|
|
9764
9797
|
else
|
|
9765
|
-
throw new Error(
|
|
9798
|
+
throw new Error(f);
|
|
9766
9799
|
}
|
|
9767
9800
|
return u;
|
|
9768
9801
|
}
|
|
@@ -9820,14 +9853,14 @@ Dn.default = nu;
|
|
|
9820
9853
|
} else
|
|
9821
9854
|
throw new Error("invalid addKeywords parameters");
|
|
9822
9855
|
if (G.call(this, C, R), !R)
|
|
9823
|
-
return (0,
|
|
9856
|
+
return (0, d.eachItem)(C, (f) => ge.call(this, f)), this;
|
|
9824
9857
|
be.call(this, R);
|
|
9825
9858
|
const u = {
|
|
9826
9859
|
...R,
|
|
9827
9860
|
type: (0, c.getJSONTypes)(R.type),
|
|
9828
9861
|
schemaType: (0, c.getJSONTypes)(R.schemaType)
|
|
9829
9862
|
};
|
|
9830
|
-
return (0,
|
|
9863
|
+
return (0, d.eachItem)(C, u.type.length === 0 ? (f) => ge.call(this, f, u) : (f) => u.type.forEach((v) => ge.call(this, f, u, v))), this;
|
|
9831
9864
|
}
|
|
9832
9865
|
getKeyword(y) {
|
|
9833
9866
|
const R = this.RULES.all[y];
|
|
@@ -9838,7 +9871,7 @@ Dn.default = nu;
|
|
|
9838
9871
|
const { RULES: R } = this;
|
|
9839
9872
|
delete R.keywords[y], delete R.all[y];
|
|
9840
9873
|
for (const C of R.rules) {
|
|
9841
|
-
const u = C.rules.findIndex((
|
|
9874
|
+
const u = C.rules.findIndex((f) => f.keyword === y);
|
|
9842
9875
|
u >= 0 && C.rules.splice(u, 1);
|
|
9843
9876
|
}
|
|
9844
9877
|
return this;
|
|
@@ -9848,15 +9881,15 @@ Dn.default = nu;
|
|
|
9848
9881
|
return typeof R == "string" && (R = new RegExp(R)), this.formats[y] = R, this;
|
|
9849
9882
|
}
|
|
9850
9883
|
errorsText(y = this.errors, { separator: R = ", ", dataVar: C = "data" } = {}) {
|
|
9851
|
-
return !y || y.length === 0 ? "No errors" : y.map((u) => `${C}${u.instancePath} ${u.message}`).reduce((u,
|
|
9884
|
+
return !y || y.length === 0 ? "No errors" : y.map((u) => `${C}${u.instancePath} ${u.message}`).reduce((u, f) => u + R + f);
|
|
9852
9885
|
}
|
|
9853
9886
|
$dataMetaSchema(y, R) {
|
|
9854
9887
|
const C = this.RULES.all;
|
|
9855
9888
|
y = JSON.parse(JSON.stringify(y));
|
|
9856
9889
|
for (const u of R) {
|
|
9857
|
-
const
|
|
9890
|
+
const f = u.split("/").slice(1);
|
|
9858
9891
|
let v = y;
|
|
9859
|
-
for (const N of
|
|
9892
|
+
for (const N of f)
|
|
9860
9893
|
v = v[N];
|
|
9861
9894
|
for (const N in C) {
|
|
9862
9895
|
const j = C[N];
|
|
@@ -9874,7 +9907,7 @@ Dn.default = nu;
|
|
|
9874
9907
|
(!R || R.test(C)) && (typeof u == "string" ? delete y[C] : u && !u.meta && (this._cache.delete(u.schema), delete y[C]));
|
|
9875
9908
|
}
|
|
9876
9909
|
}
|
|
9877
|
-
_addSchema(y, R, C, u = this.opts.validateSchema,
|
|
9910
|
+
_addSchema(y, R, C, u = this.opts.validateSchema, f = this.opts.addUsedSchema) {
|
|
9878
9911
|
let v;
|
|
9879
9912
|
const { schemaId: N } = this.opts;
|
|
9880
9913
|
if (typeof y == "object")
|
|
@@ -9890,7 +9923,7 @@ Dn.default = nu;
|
|
|
9890
9923
|
return j;
|
|
9891
9924
|
C = (0, l.normalizeId)(v || C);
|
|
9892
9925
|
const B = l.getSchemaRefs.call(this, y, C);
|
|
9893
|
-
return j = new i.SchemaEnv({ schema: y, schemaId: N, meta: R, baseId: C, localRefs: B }), this._cache.set(j.schema, j),
|
|
9926
|
+
return j = new i.SchemaEnv({ schema: y, schemaId: N, meta: R, baseId: C, localRefs: B }), this._cache.set(j.schema, j), f && !C.startsWith("#") && (C && this._checkUnique(C), this.refs[C] = j), u && this.validateSchema(y, !0), j;
|
|
9894
9927
|
}
|
|
9895
9928
|
_checkUnique(y) {
|
|
9896
9929
|
if (this.schemas[y] || this.refs[y])
|
|
@@ -9914,8 +9947,8 @@ Dn.default = nu;
|
|
|
9914
9947
|
A.ValidationError = s.default, A.MissingRefError = n.default, t.default = A;
|
|
9915
9948
|
function b(O, y, R, C = "error") {
|
|
9916
9949
|
for (const u in O) {
|
|
9917
|
-
const
|
|
9918
|
-
|
|
9950
|
+
const f = u;
|
|
9951
|
+
f in y && this.logger[C](`${R}: option ${u}. ${O[f]}`);
|
|
9919
9952
|
}
|
|
9920
9953
|
}
|
|
9921
9954
|
function x(O) {
|
|
@@ -9969,7 +10002,7 @@ Dn.default = nu;
|
|
|
9969
10002
|
const se = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
9970
10003
|
function G(O, y) {
|
|
9971
10004
|
const { RULES: R } = this;
|
|
9972
|
-
if ((0,
|
|
10005
|
+
if ((0, d.eachItem)(O, (C) => {
|
|
9973
10006
|
if (R.keywords[C])
|
|
9974
10007
|
throw new Error(`Keyword ${C} is already defined`);
|
|
9975
10008
|
if (!se.test(C))
|
|
@@ -9982,9 +10015,9 @@ Dn.default = nu;
|
|
|
9982
10015
|
const u = y == null ? void 0 : y.post;
|
|
9983
10016
|
if (R && u)
|
|
9984
10017
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
9985
|
-
const { RULES:
|
|
9986
|
-
let v = u ?
|
|
9987
|
-
if (v || (v = { type: R, rules: [] },
|
|
10018
|
+
const { RULES: f } = this;
|
|
10019
|
+
let v = u ? f.post : f.rules.find(({ type: j }) => j === R);
|
|
10020
|
+
if (v || (v = { type: R, rules: [] }, f.rules.push(v)), f.keywords[O] = !0, !y)
|
|
9988
10021
|
return;
|
|
9989
10022
|
const N = {
|
|
9990
10023
|
keyword: O,
|
|
@@ -9994,7 +10027,7 @@ Dn.default = nu;
|
|
|
9994
10027
|
schemaType: (0, c.getJSONTypes)(y.schemaType)
|
|
9995
10028
|
}
|
|
9996
10029
|
};
|
|
9997
|
-
y.before ? ye.call(this, v, N, y.before) : v.rules.push(N),
|
|
10030
|
+
y.before ? ye.call(this, v, N, y.before) : v.rules.push(N), f.all[O] = N, (C = y.implements) === null || C === void 0 || C.forEach((j) => this.addKeyword(j));
|
|
9998
10031
|
}
|
|
9999
10032
|
function ye(O, y, R) {
|
|
10000
10033
|
const C = O.rules.findIndex((u) => u.keyword === R);
|
|
@@ -10030,12 +10063,12 @@ const Sd = Wr, Fi = fe, Qe = le, mr = It, Mi = et, as = U, Ed = {
|
|
|
10030
10063
|
const { gen: e, schema: r, it: s } = t, { baseId: n, schemaEnv: a, validateName: i, opts: o, self: l } = s, { root: c } = a;
|
|
10031
10064
|
if ((r === "#" || r === "#/") && n === c.baseId)
|
|
10032
10065
|
return p();
|
|
10033
|
-
const
|
|
10034
|
-
if (
|
|
10066
|
+
const d = Mi.resolveRef.call(l, c, n, r);
|
|
10067
|
+
if (d === void 0)
|
|
10035
10068
|
throw new Sd.default(s.opts.uriResolver, n, r);
|
|
10036
|
-
if (
|
|
10037
|
-
return T(
|
|
10038
|
-
return S(
|
|
10069
|
+
if (d instanceof Mi.SchemaEnv)
|
|
10070
|
+
return T(d);
|
|
10071
|
+
return S(d);
|
|
10039
10072
|
function p() {
|
|
10040
10073
|
if (a === c)
|
|
10041
10074
|
return ps(t, i, a, a.$async);
|
|
@@ -10065,8 +10098,8 @@ function au(t, e) {
|
|
|
10065
10098
|
or.getValidate = au;
|
|
10066
10099
|
function ps(t, e, r, s) {
|
|
10067
10100
|
const { gen: n, it: a } = t, { allErrors: i, schemaEnv: o, opts: l } = a, c = l.passContext ? mr.default.this : Qe.nil;
|
|
10068
|
-
s ?
|
|
10069
|
-
function
|
|
10101
|
+
s ? d() : p();
|
|
10102
|
+
function d() {
|
|
10070
10103
|
if (!o.$async)
|
|
10071
10104
|
throw new Error("async schema referenced by sync schema");
|
|
10072
10105
|
const E = n.let("valid");
|
|
@@ -10240,7 +10273,7 @@ const Pr = fe, Br = le, Bd = U, Ld = {
|
|
|
10240
10273
|
if (!a && r.length === 0)
|
|
10241
10274
|
return;
|
|
10242
10275
|
const l = r.length >= o.loopRequired;
|
|
10243
|
-
if (i.allErrors ? c() :
|
|
10276
|
+
if (i.allErrors ? c() : d(), o.strictRequired) {
|
|
10244
10277
|
const S = t.parentSchema.properties, { definedProperties: E } = t.it;
|
|
10245
10278
|
for (const k of r)
|
|
10246
10279
|
if ((S == null ? void 0 : S[k]) === void 0 && !E.has(k)) {
|
|
@@ -10255,7 +10288,7 @@ const Pr = fe, Br = le, Bd = U, Ld = {
|
|
|
10255
10288
|
for (const S of r)
|
|
10256
10289
|
(0, Pr.checkReportMissingProp)(t, S);
|
|
10257
10290
|
}
|
|
10258
|
-
function
|
|
10291
|
+
function d() {
|
|
10259
10292
|
const S = e.let("missing");
|
|
10260
10293
|
if (l || a) {
|
|
10261
10294
|
const E = e.let("valid", !0);
|
|
@@ -10318,8 +10351,8 @@ const Zs = Ve, ze = le, Hd = U, Kd = Yr, Gd = {
|
|
|
10318
10351
|
if (!s && !n)
|
|
10319
10352
|
return;
|
|
10320
10353
|
const l = e.let("valid"), c = a.items ? (0, Zs.getSchemaTypes)(a.items) : [];
|
|
10321
|
-
t.block$data(l,
|
|
10322
|
-
function
|
|
10354
|
+
t.block$data(l, d, (0, ze._)`${i} === false`), t.ok(l);
|
|
10355
|
+
function d() {
|
|
10323
10356
|
const E = e.let("i", (0, ze._)`${r}.length`), k = e.let("j");
|
|
10324
10357
|
t.setParams({ i: E, j: k }), e.assign(l, !0), e.if((0, ze._)`${E} > 1`, () => (p() ? T : S)(E, k));
|
|
10325
10358
|
}
|
|
@@ -10375,18 +10408,18 @@ const Fr = le, Qd = U, ef = Yr, tf = {
|
|
|
10375
10408
|
const o = n.length >= i.opts.loopEnum;
|
|
10376
10409
|
let l;
|
|
10377
10410
|
const c = () => l ?? (l = (0, Qd.useFunc)(e, ef.default));
|
|
10378
|
-
let
|
|
10411
|
+
let d;
|
|
10379
10412
|
if (o || s)
|
|
10380
|
-
|
|
10413
|
+
d = e.let("valid"), t.block$data(d, p);
|
|
10381
10414
|
else {
|
|
10382
10415
|
if (!Array.isArray(n))
|
|
10383
10416
|
throw new Error("ajv implementation error");
|
|
10384
10417
|
const S = e.const("vSchema", a);
|
|
10385
|
-
|
|
10418
|
+
d = (0, Fr.or)(...n.map((E, k) => T(S, k)));
|
|
10386
10419
|
}
|
|
10387
|
-
t.pass(
|
|
10420
|
+
t.pass(d);
|
|
10388
10421
|
function p() {
|
|
10389
|
-
e.assign(
|
|
10422
|
+
e.assign(d, !1), e.forOf("v", a, (S) => e.if((0, Fr._)`${c()}(${r}, ${S})`, () => e.assign(d, !0).break()));
|
|
10390
10423
|
}
|
|
10391
10424
|
function T(S, E) {
|
|
10392
10425
|
const k = n[E];
|
|
@@ -10448,8 +10481,8 @@ function uu(t, e) {
|
|
|
10448
10481
|
r.if((0, nr.not)(c), () => l(c)), t.ok(c);
|
|
10449
10482
|
}
|
|
10450
10483
|
function l(c) {
|
|
10451
|
-
r.forRange("i", e.length, o, (
|
|
10452
|
-
t.subschema({ keyword: a, dataProp:
|
|
10484
|
+
r.forRange("i", e.length, o, (d) => {
|
|
10485
|
+
t.subschema({ keyword: a, dataProp: d, dataPropType: dn.Type.Num }, c), i.allErrors || r.if((0, nr.not)(c), () => r.break());
|
|
10453
10486
|
});
|
|
10454
10487
|
}
|
|
10455
10488
|
}
|
|
@@ -10472,7 +10505,7 @@ const ji = le, hs = U, yf = fe, vf = {
|
|
|
10472
10505
|
};
|
|
10473
10506
|
function lu(t, e, r = t.schema) {
|
|
10474
10507
|
const { gen: s, parentSchema: n, data: a, keyword: i, it: o } = t;
|
|
10475
|
-
|
|
10508
|
+
d(n), o.opts.unevaluated && r.length && o.items !== !0 && (o.items = hs.mergeEvaluated.items(s, r.length, o.items));
|
|
10476
10509
|
const l = s.name("valid"), c = s.const("len", (0, ji._)`${a}.length`);
|
|
10477
10510
|
r.forEach((p, T) => {
|
|
10478
10511
|
(0, hs.alwaysValidSchema)(o, p) || (s.if((0, ji._)`${c} > ${T}`, () => t.subschema({
|
|
@@ -10481,7 +10514,7 @@ function lu(t, e, r = t.schema) {
|
|
|
10481
10514
|
dataProp: T
|
|
10482
10515
|
}, l)), t.ok(l));
|
|
10483
10516
|
});
|
|
10484
|
-
function
|
|
10517
|
+
function d(p) {
|
|
10485
10518
|
const { opts: T, errSchemaPath: S } = o, E = r.length, k = E === p.minItems && (E === p.maxItems || p[e] === !1);
|
|
10486
10519
|
if (T.strictTuples && !k) {
|
|
10487
10520
|
const _ = `"${i}" is ${E}-tuple, but minItems or maxItems/${e} are not specified or different at path "${S}"`;
|
|
@@ -10534,7 +10567,7 @@ const ct = le, is = U, Cf = {
|
|
|
10534
10567
|
let i, o;
|
|
10535
10568
|
const { minContains: l, maxContains: c } = s;
|
|
10536
10569
|
a.opts.next ? (i = l === void 0 ? 1 : l, o = c) : i = 1;
|
|
10537
|
-
const
|
|
10570
|
+
const d = e.const("len", (0, ct._)`${n}.length`);
|
|
10538
10571
|
if (t.setParams({ min: i, max: o }), o === void 0 && i === 0) {
|
|
10539
10572
|
(0, is.checkStrictMode)(a, '"minContains" == 0 without "maxContains": "contains" keyword ignored');
|
|
10540
10573
|
return;
|
|
@@ -10544,8 +10577,8 @@ const ct = le, is = U, Cf = {
|
|
|
10544
10577
|
return;
|
|
10545
10578
|
}
|
|
10546
10579
|
if ((0, is.alwaysValidSchema)(a, r)) {
|
|
10547
|
-
let k = (0, ct._)`${
|
|
10548
|
-
o !== void 0 && (k = (0, ct._)`${k} && ${
|
|
10580
|
+
let k = (0, ct._)`${d} >= ${i}`;
|
|
10581
|
+
o !== void 0 && (k = (0, ct._)`${k} && ${d} <= ${o}`), t.pass(k);
|
|
10549
10582
|
return;
|
|
10550
10583
|
}
|
|
10551
10584
|
a.items = !0;
|
|
@@ -10556,7 +10589,7 @@ const ct = le, is = U, Cf = {
|
|
|
10556
10589
|
S(k, () => e.if(k, () => E(_)));
|
|
10557
10590
|
}
|
|
10558
10591
|
function S(k, _) {
|
|
10559
|
-
e.forRange("i", 0,
|
|
10592
|
+
e.forRange("i", 0, d, (g) => {
|
|
10560
10593
|
t.subschema({
|
|
10561
10594
|
keyword: "contains",
|
|
10562
10595
|
dataProp: g,
|
|
@@ -10576,14 +10609,14 @@ var cu = {};
|
|
|
10576
10609
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.validateSchemaDeps = t.validatePropertyDeps = t.error = void 0;
|
|
10577
10610
|
const e = le, r = U, s = fe;
|
|
10578
10611
|
t.error = {
|
|
10579
|
-
message: ({ params: { property: l, depsCount: c, deps:
|
|
10612
|
+
message: ({ params: { property: l, depsCount: c, deps: d } }) => {
|
|
10580
10613
|
const p = c === 1 ? "property" : "properties";
|
|
10581
|
-
return (0, e.str)`must have ${p} ${
|
|
10614
|
+
return (0, e.str)`must have ${p} ${d} when property ${l} is present`;
|
|
10582
10615
|
},
|
|
10583
|
-
params: ({ params: { property: l, depsCount: c, deps:
|
|
10616
|
+
params: ({ params: { property: l, depsCount: c, deps: d, missingProperty: p } }) => (0, e._)`{property: ${l},
|
|
10584
10617
|
missingProperty: ${p},
|
|
10585
10618
|
depsCount: ${c},
|
|
10586
|
-
deps: ${
|
|
10619
|
+
deps: ${d}}`
|
|
10587
10620
|
// TODO change to reference
|
|
10588
10621
|
};
|
|
10589
10622
|
const n = {
|
|
@@ -10592,51 +10625,51 @@ var cu = {};
|
|
|
10592
10625
|
schemaType: "object",
|
|
10593
10626
|
error: t.error,
|
|
10594
10627
|
code(l) {
|
|
10595
|
-
const [c,
|
|
10596
|
-
i(l, c), o(l,
|
|
10628
|
+
const [c, d] = a(l);
|
|
10629
|
+
i(l, c), o(l, d);
|
|
10597
10630
|
}
|
|
10598
10631
|
};
|
|
10599
10632
|
function a({ schema: l }) {
|
|
10600
|
-
const c = {},
|
|
10633
|
+
const c = {}, d = {};
|
|
10601
10634
|
for (const p in l) {
|
|
10602
10635
|
if (p === "__proto__")
|
|
10603
10636
|
continue;
|
|
10604
|
-
const T = Array.isArray(l[p]) ? c :
|
|
10637
|
+
const T = Array.isArray(l[p]) ? c : d;
|
|
10605
10638
|
T[p] = l[p];
|
|
10606
10639
|
}
|
|
10607
|
-
return [c,
|
|
10640
|
+
return [c, d];
|
|
10608
10641
|
}
|
|
10609
10642
|
function i(l, c = l.schema) {
|
|
10610
|
-
const { gen:
|
|
10643
|
+
const { gen: d, data: p, it: T } = l;
|
|
10611
10644
|
if (Object.keys(c).length === 0)
|
|
10612
10645
|
return;
|
|
10613
|
-
const S =
|
|
10646
|
+
const S = d.let("missing");
|
|
10614
10647
|
for (const E in c) {
|
|
10615
10648
|
const k = c[E];
|
|
10616
10649
|
if (k.length === 0)
|
|
10617
10650
|
continue;
|
|
10618
|
-
const _ = (0, s.propertyInData)(
|
|
10651
|
+
const _ = (0, s.propertyInData)(d, p, E, T.opts.ownProperties);
|
|
10619
10652
|
l.setParams({
|
|
10620
10653
|
property: E,
|
|
10621
10654
|
depsCount: k.length,
|
|
10622
10655
|
deps: k.join(", ")
|
|
10623
|
-
}), T.allErrors ?
|
|
10656
|
+
}), T.allErrors ? d.if(_, () => {
|
|
10624
10657
|
for (const g of k)
|
|
10625
10658
|
(0, s.checkReportMissingProp)(l, g);
|
|
10626
|
-
}) : (
|
|
10659
|
+
}) : (d.if((0, e._)`${_} && (${(0, s.checkMissingProp)(l, k, S)})`), (0, s.reportMissingProp)(l, S), d.else());
|
|
10627
10660
|
}
|
|
10628
10661
|
}
|
|
10629
10662
|
t.validatePropertyDeps = i;
|
|
10630
10663
|
function o(l, c = l.schema) {
|
|
10631
|
-
const { gen:
|
|
10664
|
+
const { gen: d, data: p, keyword: T, it: S } = l, E = d.name("valid");
|
|
10632
10665
|
for (const k in c)
|
|
10633
|
-
(0, r.alwaysValidSchema)(S, c[k]) || (
|
|
10634
|
-
(0, s.propertyInData)(
|
|
10666
|
+
(0, r.alwaysValidSchema)(S, c[k]) || (d.if(
|
|
10667
|
+
(0, s.propertyInData)(d, p, k, S.opts.ownProperties),
|
|
10635
10668
|
() => {
|
|
10636
10669
|
const _ = l.subschema({ keyword: T, schemaProp: k }, E);
|
|
10637
10670
|
l.mergeValidEvaluated(_, E);
|
|
10638
10671
|
},
|
|
10639
|
-
() =>
|
|
10672
|
+
() => d.var(E, !0)
|
|
10640
10673
|
// TODO var
|
|
10641
10674
|
), l.ok(E));
|
|
10642
10675
|
}
|
|
@@ -10690,11 +10723,11 @@ const os = fe, ht = le, Df = It, us = U, Nf = {
|
|
|
10690
10723
|
const { allErrors: o, opts: l } = i;
|
|
10691
10724
|
if (i.props = !0, l.removeAdditional !== "all" && (0, us.alwaysValidSchema)(i, r))
|
|
10692
10725
|
return;
|
|
10693
|
-
const c = (0, os.allSchemaProperties)(s.properties),
|
|
10726
|
+
const c = (0, os.allSchemaProperties)(s.properties), d = (0, os.allSchemaProperties)(s.patternProperties);
|
|
10694
10727
|
p(), t.ok((0, ht._)`${a} === ${Df.default.errors}`);
|
|
10695
10728
|
function p() {
|
|
10696
10729
|
e.forIn("key", n, (_) => {
|
|
10697
|
-
!c.length && !
|
|
10730
|
+
!c.length && !d.length ? E(_) : e.if(T(_), () => E(_));
|
|
10698
10731
|
});
|
|
10699
10732
|
}
|
|
10700
10733
|
function T(_) {
|
|
@@ -10704,7 +10737,7 @@ const os = fe, ht = le, Df = It, us = U, Nf = {
|
|
|
10704
10737
|
g = (0, os.isOwnProperty)(e, I, _);
|
|
10705
10738
|
} else
|
|
10706
10739
|
c.length ? g = (0, ht.or)(...c.map((I) => (0, ht._)`${_} === ${I}`)) : g = ht.nil;
|
|
10707
|
-
return
|
|
10740
|
+
return d.length && (g = (0, ht.or)(g, ...d.map((I) => (0, ht._)`${(0, os.usePattern)(t, I)}.test(${_})`))), (0, ht.not)(g);
|
|
10708
10741
|
}
|
|
10709
10742
|
function S(_) {
|
|
10710
10743
|
e.code((0, ht._)`delete ${n}[${_}]`);
|
|
@@ -10742,7 +10775,7 @@ const os = fe, ht = le, Df = It, us = U, Nf = {
|
|
|
10742
10775
|
Ps.default = Pf;
|
|
10743
10776
|
var Zn = {};
|
|
10744
10777
|
Object.defineProperty(Zn, "__esModule", { value: !0 });
|
|
10745
|
-
const Rf =
|
|
10778
|
+
const Rf = vt, Vi = fe, Qs = U, Bi = Ps, Ff = {
|
|
10746
10779
|
keyword: "properties",
|
|
10747
10780
|
type: "object",
|
|
10748
10781
|
schemaType: "object",
|
|
@@ -10758,11 +10791,11 @@ const Rf = yt, Vi = fe, Qs = U, Bi = Ps, Ff = {
|
|
|
10758
10791
|
return;
|
|
10759
10792
|
const l = e.name("valid");
|
|
10760
10793
|
for (const p of o)
|
|
10761
|
-
c(p) ?
|
|
10794
|
+
c(p) ? d(p) : (e.if((0, Vi.propertyInData)(e, n, p, a.opts.ownProperties)), d(p), a.allErrors || e.else().var(l, !0), e.endIf()), t.it.definedProperties.add(p), t.ok(l);
|
|
10762
10795
|
function c(p) {
|
|
10763
10796
|
return a.opts.useDefaults && !a.compositeRule && r[p].default !== void 0;
|
|
10764
10797
|
}
|
|
10765
|
-
function
|
|
10798
|
+
function d(p) {
|
|
10766
10799
|
t.subschema({
|
|
10767
10800
|
keyword: "properties",
|
|
10768
10801
|
schemaProp: p,
|
|
@@ -10782,13 +10815,13 @@ const Li = fe, ls = le, zi = U, qi = U, Mf = {
|
|
|
10782
10815
|
const { gen: e, schema: r, data: s, parentSchema: n, it: a } = t, { opts: i } = a, o = (0, Li.allSchemaProperties)(r), l = o.filter((k) => (0, zi.alwaysValidSchema)(a, r[k]));
|
|
10783
10816
|
if (o.length === 0 || l.length === o.length && (!a.opts.unevaluated || a.props === !0))
|
|
10784
10817
|
return;
|
|
10785
|
-
const c = i.strictSchema && !i.allowMatchingProperties && n.properties,
|
|
10818
|
+
const c = i.strictSchema && !i.allowMatchingProperties && n.properties, d = e.name("valid");
|
|
10786
10819
|
a.props !== !0 && !(a.props instanceof ls.Name) && (a.props = (0, qi.evaluatedPropsToName)(e, a.props));
|
|
10787
10820
|
const { props: p } = a;
|
|
10788
10821
|
T();
|
|
10789
10822
|
function T() {
|
|
10790
10823
|
for (const k of o)
|
|
10791
|
-
c && S(k), a.allErrors ? E(k) : (e.var(
|
|
10824
|
+
c && S(k), a.allErrors ? E(k) : (e.var(d, !0), E(k), e.if(d));
|
|
10792
10825
|
}
|
|
10793
10826
|
function S(k) {
|
|
10794
10827
|
for (const _ in c)
|
|
@@ -10803,7 +10836,7 @@ const Li = fe, ls = le, zi = U, qi = U, Mf = {
|
|
|
10803
10836
|
schemaProp: k,
|
|
10804
10837
|
dataProp: _,
|
|
10805
10838
|
dataPropType: qi.Type.Str
|
|
10806
|
-
},
|
|
10839
|
+
}, d), a.opts.unevaluated && p !== !0 ? e.assign((0, ls._)`${p}[${_}]`, !0) : !g && !a.allErrors && e.if((0, ls.not)(d), () => e.break());
|
|
10807
10840
|
});
|
|
10808
10841
|
});
|
|
10809
10842
|
}
|
|
@@ -10862,9 +10895,9 @@ const ms = le, Lf = U, zf = {
|
|
|
10862
10895
|
const a = r, i = e.let("valid", !1), o = e.let("passing", null), l = e.name("_valid");
|
|
10863
10896
|
t.setParams({ passing: o }), e.block(c), t.result(i, () => t.reset(), () => t.error(!0));
|
|
10864
10897
|
function c() {
|
|
10865
|
-
a.forEach((
|
|
10898
|
+
a.forEach((d, p) => {
|
|
10866
10899
|
let T;
|
|
10867
|
-
(0, Lf.alwaysValidSchema)(n,
|
|
10900
|
+
(0, Lf.alwaysValidSchema)(n, d) ? e.var(l, !0) : T = t.subschema({
|
|
10868
10901
|
keyword: "oneOf",
|
|
10869
10902
|
schemaProp: p,
|
|
10870
10903
|
compositeRule: !0
|
|
@@ -10913,24 +10946,24 @@ const ks = le, fu = U, Kf = {
|
|
|
10913
10946
|
return;
|
|
10914
10947
|
const i = e.let("valid", !0), o = e.name("_valid");
|
|
10915
10948
|
if (l(), t.reset(), n && a) {
|
|
10916
|
-
const
|
|
10917
|
-
t.setParams({ ifClause:
|
|
10949
|
+
const d = e.let("ifClause");
|
|
10950
|
+
t.setParams({ ifClause: d }), e.if(o, c("then", d), c("else", d));
|
|
10918
10951
|
} else
|
|
10919
10952
|
n ? e.if(o, c("then")) : e.if((0, ks.not)(o), c("else"));
|
|
10920
10953
|
t.pass(i, () => t.error(!0));
|
|
10921
10954
|
function l() {
|
|
10922
|
-
const
|
|
10955
|
+
const d = t.subschema({
|
|
10923
10956
|
keyword: "if",
|
|
10924
10957
|
compositeRule: !0,
|
|
10925
10958
|
createErrors: !1,
|
|
10926
10959
|
allErrors: !1
|
|
10927
10960
|
}, o);
|
|
10928
|
-
t.mergeEvaluated(
|
|
10961
|
+
t.mergeEvaluated(d);
|
|
10929
10962
|
}
|
|
10930
|
-
function c(
|
|
10963
|
+
function c(d, p) {
|
|
10931
10964
|
return () => {
|
|
10932
|
-
const T = t.subschema({ keyword:
|
|
10933
|
-
e.assign(i, o), t.mergeValidEvaluated(T, i), p ? e.assign(p, (0, ks._)`${
|
|
10965
|
+
const T = t.subschema({ keyword: d }, o);
|
|
10966
|
+
e.assign(i, o), t.mergeValidEvaluated(T, i), p ? e.assign(p, (0, ks._)`${d}`) : t.setParams({ ifClause: d });
|
|
10934
10967
|
};
|
|
10935
10968
|
}
|
|
10936
10969
|
}
|
|
@@ -10983,7 +11016,7 @@ const Fe = le, pp = {
|
|
|
10983
11016
|
$data: !0,
|
|
10984
11017
|
error: pp,
|
|
10985
11018
|
code(t, e) {
|
|
10986
|
-
const { gen: r, data: s, $data: n, schema: a, schemaCode: i, it: o } = t, { opts: l, errSchemaPath: c, schemaEnv:
|
|
11019
|
+
const { gen: r, data: s, $data: n, schema: a, schemaCode: i, it: o } = t, { opts: l, errSchemaPath: c, schemaEnv: d, self: p } = o;
|
|
10987
11020
|
if (!l.validateFormats)
|
|
10988
11021
|
return;
|
|
10989
11022
|
n ? T() : S();
|
|
@@ -10997,7 +11030,7 @@ const Fe = le, pp = {
|
|
|
10997
11030
|
return l.strictSchema === !1 ? Fe.nil : (0, Fe._)`${i} && !${g}`;
|
|
10998
11031
|
}
|
|
10999
11032
|
function D() {
|
|
11000
|
-
const A =
|
|
11033
|
+
const A = d.$async ? (0, Fe._)`(${k}.async ? await ${g}(${s}) : ${g}(${s}))` : (0, Fe._)`${g}(${s})`, b = (0, Fe._)`(typeof ${g} == "function" ? ${A} : ${g}.test(${s}))`;
|
|
11001
11034
|
return (0, Fe._)`${g} && ${g} !== true && ${_} === ${e} && !${b}`;
|
|
11002
11035
|
}
|
|
11003
11036
|
}
|
|
@@ -11027,7 +11060,7 @@ const Fe = le, pp = {
|
|
|
11027
11060
|
}
|
|
11028
11061
|
function A() {
|
|
11029
11062
|
if (typeof E == "object" && !(E instanceof RegExp) && E.async) {
|
|
11030
|
-
if (!
|
|
11063
|
+
if (!d.$async)
|
|
11031
11064
|
throw new Error("async format in sync schema");
|
|
11032
11065
|
return (0, Fe._)`await ${g}(${s})`;
|
|
11033
11066
|
}
|
|
@@ -11095,8 +11128,8 @@ const gr = le, fn = Rs, Gi = et, Sp = U, Ep = {
|
|
|
11095
11128
|
if (!i)
|
|
11096
11129
|
throw new Error("discriminator: requires oneOf keyword");
|
|
11097
11130
|
const l = e.let("valid", !1), c = e.const("tag", (0, gr._)`${r}${(0, gr.getProperty)(o)}`);
|
|
11098
|
-
e.if((0, gr._)`typeof ${c} == "string"`, () =>
|
|
11099
|
-
function
|
|
11131
|
+
e.if((0, gr._)`typeof ${c} == "string"`, () => d(), () => t.error(!1, { discrError: fn.DiscrError.Tag, tag: c, tagName: o })), t.ok(l);
|
|
11132
|
+
function d() {
|
|
11100
11133
|
const S = T();
|
|
11101
11134
|
e.if(!1);
|
|
11102
11135
|
for (const E in S)
|
|
@@ -11402,23 +11435,23 @@ const wp = "http://json-schema.org/draft-07/schema#", Cp = "http://json-schema.o
|
|
|
11402
11435
|
}
|
|
11403
11436
|
}
|
|
11404
11437
|
e.Ajv = l, t.exports = e = l, t.exports.Ajv = l, Object.defineProperty(e, "__esModule", { value: !0 }), e.default = l;
|
|
11405
|
-
var c =
|
|
11438
|
+
var c = vt;
|
|
11406
11439
|
Object.defineProperty(e, "KeywordCxt", { enumerable: !0, get: function() {
|
|
11407
11440
|
return c.KeywordCxt;
|
|
11408
11441
|
} });
|
|
11409
|
-
var
|
|
11442
|
+
var d = le;
|
|
11410
11443
|
Object.defineProperty(e, "_", { enumerable: !0, get: function() {
|
|
11411
|
-
return
|
|
11444
|
+
return d._;
|
|
11412
11445
|
} }), Object.defineProperty(e, "str", { enumerable: !0, get: function() {
|
|
11413
|
-
return
|
|
11446
|
+
return d.str;
|
|
11414
11447
|
} }), Object.defineProperty(e, "stringify", { enumerable: !0, get: function() {
|
|
11415
|
-
return
|
|
11448
|
+
return d.stringify;
|
|
11416
11449
|
} }), Object.defineProperty(e, "nil", { enumerable: !0, get: function() {
|
|
11417
|
-
return
|
|
11450
|
+
return d.nil;
|
|
11418
11451
|
} }), Object.defineProperty(e, "Name", { enumerable: !0, get: function() {
|
|
11419
|
-
return
|
|
11452
|
+
return d.Name;
|
|
11420
11453
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
11421
|
-
return
|
|
11454
|
+
return d.CodeGen;
|
|
11422
11455
|
} });
|
|
11423
11456
|
var p = Gr;
|
|
11424
11457
|
Object.defineProperty(e, "ValidationError", { enumerable: !0, get: function() {
|
|
@@ -11443,7 +11476,7 @@ var pn = { exports: {} }, hu = {};
|
|
|
11443
11476
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
11444
11477
|
time: e(l(!0), c),
|
|
11445
11478
|
"date-time": e(T(!0), S),
|
|
11446
|
-
"iso-time": e(l(),
|
|
11479
|
+
"iso-time": e(l(), d),
|
|
11447
11480
|
"iso-date-time": e(T(), E),
|
|
11448
11481
|
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
|
|
11449
11482
|
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
|
@@ -11488,7 +11521,7 @@ var pn = { exports: {} }, hu = {};
|
|
|
11488
11521
|
date: e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, i),
|
|
11489
11522
|
time: e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, c),
|
|
11490
11523
|
"date-time": e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, S),
|
|
11491
|
-
"iso-time": e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
|
|
11524
|
+
"iso-time": e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, d),
|
|
11492
11525
|
"iso-date-time": e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, E),
|
|
11493
11526
|
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
|
11494
11527
|
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
|
@@ -11535,7 +11568,7 @@ var pn = { exports: {} }, hu = {};
|
|
|
11535
11568
|
if (se && G)
|
|
11536
11569
|
return se - G;
|
|
11537
11570
|
}
|
|
11538
|
-
function
|
|
11571
|
+
function d(q, K) {
|
|
11539
11572
|
if (!(q && K))
|
|
11540
11573
|
return;
|
|
11541
11574
|
const se = o.exec(q), G = o.exec(K);
|
|
@@ -11612,7 +11645,7 @@ var mu = {};
|
|
|
11612
11645
|
$data: !0,
|
|
11613
11646
|
error: a,
|
|
11614
11647
|
code(o) {
|
|
11615
|
-
const { gen: l, data: c, schemaCode:
|
|
11648
|
+
const { gen: l, data: c, schemaCode: d, keyword: p, it: T } = o, { opts: S, self: E } = T;
|
|
11616
11649
|
if (!S.validateFormats)
|
|
11617
11650
|
return;
|
|
11618
11651
|
const k = new e.KeywordCxt(T, E.RULES.all.format.definition, "format");
|
|
@@ -11638,7 +11671,7 @@ var mu = {};
|
|
|
11638
11671
|
o.fail$data(I(b));
|
|
11639
11672
|
}
|
|
11640
11673
|
function I(D) {
|
|
11641
|
-
return (0, r._)`${D}.compare(${c}, ${
|
|
11674
|
+
return (0, r._)`${D}.compare(${c}, ${d}) ${n[p].fail} 0`;
|
|
11642
11675
|
}
|
|
11643
11676
|
},
|
|
11644
11677
|
dependencies: ["format"]
|
|
@@ -11648,22 +11681,22 @@ var mu = {};
|
|
|
11648
11681
|
})(mu);
|
|
11649
11682
|
(function(t, e) {
|
|
11650
11683
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
11651
|
-
const r = hu, s = mu, n = le, a = new n.Name("fullFormats"), i = new n.Name("fastFormats"), o = (c,
|
|
11652
|
-
if (Array.isArray(
|
|
11653
|
-
return l(c,
|
|
11654
|
-
const [p, T] =
|
|
11655
|
-
return l(c, S, p, T),
|
|
11684
|
+
const r = hu, s = mu, n = le, a = new n.Name("fullFormats"), i = new n.Name("fastFormats"), o = (c, d = { keywords: !0 }) => {
|
|
11685
|
+
if (Array.isArray(d))
|
|
11686
|
+
return l(c, d, r.fullFormats, a), c;
|
|
11687
|
+
const [p, T] = d.mode === "fast" ? [r.fastFormats, i] : [r.fullFormats, a], S = d.formats || r.formatNames;
|
|
11688
|
+
return l(c, S, p, T), d.keywords && (0, s.default)(c), c;
|
|
11656
11689
|
};
|
|
11657
|
-
o.get = (c,
|
|
11658
|
-
const T = (
|
|
11690
|
+
o.get = (c, d = "full") => {
|
|
11691
|
+
const T = (d === "fast" ? r.fastFormats : r.fullFormats)[c];
|
|
11659
11692
|
if (!T)
|
|
11660
11693
|
throw new Error(`Unknown format "${c}"`);
|
|
11661
11694
|
return T;
|
|
11662
11695
|
};
|
|
11663
|
-
function l(c,
|
|
11696
|
+
function l(c, d, p, T) {
|
|
11664
11697
|
var S, E;
|
|
11665
11698
|
(S = (E = c.opts.code).formats) !== null && S !== void 0 || (E.formats = (0, n._)`require("ajv-formats/dist/formats").${T}`);
|
|
11666
|
-
for (const k of
|
|
11699
|
+
for (const k of d)
|
|
11667
11700
|
c.addFormat(k, p[k]);
|
|
11668
11701
|
}
|
|
11669
11702
|
t.exports = e = o, Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
@@ -11684,7 +11717,7 @@ const Rp = /* @__PURE__ */ hn(Pp), Wi = {
|
|
|
11684
11717
|
},
|
|
11685
11718
|
"phone-br": {
|
|
11686
11719
|
type: "string",
|
|
11687
|
-
validate:
|
|
11720
|
+
validate: xp
|
|
11688
11721
|
},
|
|
11689
11722
|
cpf: {
|
|
11690
11723
|
type: "string",
|
|
@@ -11708,7 +11741,10 @@ const Rp = /* @__PURE__ */ hn(Pp), Wi = {
|
|
|
11708
11741
|
), t;
|
|
11709
11742
|
};
|
|
11710
11743
|
function Mp(t) {
|
|
11711
|
-
|
|
11744
|
+
if (t.length > 254)
|
|
11745
|
+
return !1;
|
|
11746
|
+
const [e, r] = t.split("@");
|
|
11747
|
+
return !e || !r || e.length > 64 || e.startsWith(".") || e.endsWith(".") || e.includes("..") || !/^[a-zA-Z0-9!#$%&'+-/=?^_{|}~.]+$/.test(e) ? !1 : /^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(r);
|
|
11712
11748
|
}
|
|
11713
11749
|
function jp(t) {
|
|
11714
11750
|
return t = t.replace(/[^\d]+/g, ""), t.length == 11 ? gu(t) : t.length == 14 ? yu(t) : !1;
|
|
@@ -11737,14 +11773,20 @@ function yu(t) {
|
|
|
11737
11773
|
a += Number(s.charAt(r - l)) * i--, i < 2 && (i = 9);
|
|
11738
11774
|
return o = a % 11 < 2 ? 0 : 11 - a % 11, String(o) == n.charAt(1);
|
|
11739
11775
|
}
|
|
11740
|
-
|
|
11776
|
+
function xp(t) {
|
|
11777
|
+
if (!t)
|
|
11778
|
+
return !1;
|
|
11779
|
+
const e = t.replace(/\D/g, ""), r = e.slice(0, 2), s = e.slice(2), n = /^[1-9]\d$/.test(r), i = !/^(\d)\1*$/.test(s) && (s.startsWith("9") && s.length === 9 || !s.startsWith("9") && s.length === 8 && /^[23457]/.test(s));
|
|
11780
|
+
return n && i;
|
|
11781
|
+
}
|
|
11782
|
+
const Hp = ({
|
|
11741
11783
|
formSchema: t,
|
|
11742
11784
|
initialValue: e = {}
|
|
11743
11785
|
}) => {
|
|
11744
11786
|
const [r, s] = Z({}), [n, a] = Z({
|
|
11745
11787
|
status: void 0,
|
|
11746
11788
|
fields: {}
|
|
11747
|
-
}), [i, o] = Z({}), [l, c] = Z({}), [
|
|
11789
|
+
}), [i, o] = Z({}), [l, c] = Z({}), [d, p] = Z([]), [T, S] = Z({}), [E, k] = Z(void 0);
|
|
11748
11790
|
$e(() => {
|
|
11749
11791
|
I();
|
|
11750
11792
|
}, []), $e(() => {
|
|
@@ -11753,53 +11795,53 @@ const Up = ({
|
|
|
11753
11795
|
}, [t]);
|
|
11754
11796
|
const _ = de(
|
|
11755
11797
|
(u) => {
|
|
11756
|
-
const
|
|
11757
|
-
return e != null && e[u] ? l[u] !== (e == null ? void 0 : e[u]) ||
|
|
11798
|
+
const f = d.includes(String(u));
|
|
11799
|
+
return e != null && e[u] ? l[u] !== (e == null ? void 0 : e[u]) || f : l[u] !== void 0 || f;
|
|
11758
11800
|
},
|
|
11759
|
-
[
|
|
11801
|
+
[d, l, e]
|
|
11760
11802
|
), g = Ke(() => Object.keys(n.fields).map(
|
|
11761
|
-
(
|
|
11803
|
+
(f) => {
|
|
11762
11804
|
var v, N;
|
|
11763
|
-
return (N = (v = n.fields) == null ? void 0 : v[
|
|
11805
|
+
return (N = (v = n.fields) == null ? void 0 : v[f]) == null ? void 0 : N.touched;
|
|
11764
11806
|
}
|
|
11765
|
-
).some((
|
|
11807
|
+
).some((f) => f), [n]), I = de(() => {
|
|
11766
11808
|
Object.keys(e || []).forEach((u) => {
|
|
11767
|
-
c((
|
|
11768
|
-
...
|
|
11809
|
+
c((f) => ({
|
|
11810
|
+
...f,
|
|
11769
11811
|
[u]: e[u]
|
|
11770
11812
|
}));
|
|
11771
11813
|
});
|
|
11772
11814
|
}, [e]), D = de(
|
|
11773
11815
|
(u) => {
|
|
11774
11816
|
var N, j, B, L;
|
|
11775
|
-
const
|
|
11817
|
+
const f = ((N = u == null ? void 0 : u.target) == null ? void 0 : N.type) === "checkbox" ? (j = u == null ? void 0 : u.target) == null ? void 0 : j.checked : (B = u == null ? void 0 : u.target) == null ? void 0 : B.value, v = wi(
|
|
11776
11818
|
(L = u == null ? void 0 : u.target) == null ? void 0 : L.name,
|
|
11777
11819
|
t
|
|
11778
11820
|
);
|
|
11779
|
-
return (v == null ? void 0 : v.type) === "number" ? Number(
|
|
11821
|
+
return (v == null ? void 0 : v.type) === "number" ? Number(f) : (v == null ? void 0 : v.type) === "boolean" ? JSON.parse(String(f)) : (v == null ? void 0 : v.type) === "string" ? String(f) : f;
|
|
11780
11822
|
},
|
|
11781
11823
|
[t]
|
|
11782
11824
|
), A = de(() => {
|
|
11783
11825
|
const u = {};
|
|
11784
11826
|
return Object.keys(l).forEach(
|
|
11785
|
-
(
|
|
11786
|
-
const v = String(
|
|
11787
|
-
vl(u, v, l[
|
|
11827
|
+
(f) => {
|
|
11828
|
+
const v = String(f).split(".");
|
|
11829
|
+
vl(u, v, l[f]);
|
|
11788
11830
|
}
|
|
11789
11831
|
), { ...u, toJson: () => JSON.stringify(u) };
|
|
11790
11832
|
}, [l]), b = de(() => {
|
|
11791
11833
|
if (!E)
|
|
11792
11834
|
return { result: null, errors: void 0 };
|
|
11793
|
-
const { ...u } = A(),
|
|
11835
|
+
const { ...u } = A(), f = E.compile(t), v = f(u), N = ki(f);
|
|
11794
11836
|
return { result: v, errors: N };
|
|
11795
11837
|
}, [E, A, t]), x = de(
|
|
11796
|
-
(u,
|
|
11838
|
+
(u, f) => {
|
|
11797
11839
|
if (!E)
|
|
11798
11840
|
return { result: null, errors: void 0 };
|
|
11799
11841
|
const v = E.getSchema(u);
|
|
11800
11842
|
if (!v)
|
|
11801
11843
|
return { result: null };
|
|
11802
|
-
const N = v(
|
|
11844
|
+
const N = v(f);
|
|
11803
11845
|
if (!(v != null && v.errors))
|
|
11804
11846
|
return { status: N, errors: {} };
|
|
11805
11847
|
const j = ki(v, u);
|
|
@@ -11808,8 +11850,8 @@ const Up = ({
|
|
|
11808
11850
|
[E]
|
|
11809
11851
|
), V = de(
|
|
11810
11852
|
(u) => {
|
|
11811
|
-
const
|
|
11812
|
-
v == null || delete v.fields[u.target.name], a(v), s((B) => ({ ...B, ...
|
|
11853
|
+
const f = { [u.target.name]: u }, v = { ...n };
|
|
11854
|
+
v == null || delete v.fields[u.target.name], a(v), s((B) => ({ ...B, ...f }));
|
|
11813
11855
|
const N = D(u), j = { [u.target.name]: N };
|
|
11814
11856
|
c((B) => ({
|
|
11815
11857
|
...B,
|
|
@@ -11818,27 +11860,27 @@ const Up = ({
|
|
|
11818
11860
|
},
|
|
11819
11861
|
[n, D]
|
|
11820
11862
|
), Q = de(
|
|
11821
|
-
(u,
|
|
11822
|
-
const v = { [u]:
|
|
11863
|
+
(u, f) => {
|
|
11864
|
+
const v = { [u]: f };
|
|
11823
11865
|
o((N) => ({ ...N, ...v }));
|
|
11824
11866
|
},
|
|
11825
11867
|
[]
|
|
11826
11868
|
), H = de(
|
|
11827
|
-
(u,
|
|
11828
|
-
const v = { [u]:
|
|
11869
|
+
(u, f) => {
|
|
11870
|
+
const v = { [u]: f };
|
|
11829
11871
|
c((N) => ({ ...N, ...v }));
|
|
11830
11872
|
},
|
|
11831
11873
|
[]
|
|
11832
11874
|
), ce = de(
|
|
11833
11875
|
({ touched: u }) => {
|
|
11834
|
-
const { errors:
|
|
11876
|
+
const { errors: f } = b(), v = Object.keys(l).reduce(
|
|
11835
11877
|
(j, B) => ({ ...j, [B]: { status: !0 } }),
|
|
11836
11878
|
{}
|
|
11837
11879
|
), N = {
|
|
11838
|
-
status: !
|
|
11880
|
+
status: !f,
|
|
11839
11881
|
fields: {
|
|
11840
11882
|
...v,
|
|
11841
|
-
...
|
|
11883
|
+
...f
|
|
11842
11884
|
}
|
|
11843
11885
|
};
|
|
11844
11886
|
return Object.keys(N == null ? void 0 : N.fields).forEach(
|
|
@@ -11851,12 +11893,12 @@ const Up = ({
|
|
|
11851
11893
|
},
|
|
11852
11894
|
[l, b]
|
|
11853
11895
|
), q = de(
|
|
11854
|
-
(u) => Object.keys(l).filter((
|
|
11896
|
+
(u) => Object.keys(l).filter((f) => f.split(".").includes(u) || f === u).reduce((f, v) => ({ ...f, [v]: { status: !0 } }), {}),
|
|
11855
11897
|
[l]
|
|
11856
11898
|
), K = de(
|
|
11857
|
-
(u,
|
|
11899
|
+
(u, f) => {
|
|
11858
11900
|
Object.keys(n.fields).forEach((j) => {
|
|
11859
|
-
new RegExp(`(\\.|^)${
|
|
11901
|
+
new RegExp(`(\\.|^)${f}(\\.|$)`).test(j) && delete n.fields[j];
|
|
11860
11902
|
});
|
|
11861
11903
|
const v = {
|
|
11862
11904
|
...n.fields,
|
|
@@ -11872,8 +11914,8 @@ const Up = ({
|
|
|
11872
11914
|
},
|
|
11873
11915
|
[n.fields]
|
|
11874
11916
|
), se = de(
|
|
11875
|
-
(u,
|
|
11876
|
-
const { touched: N } = v, j = x(u,
|
|
11917
|
+
(u, f, v = {}) => {
|
|
11918
|
+
const { touched: N } = v, j = x(u, f), B = q(u);
|
|
11877
11919
|
if (j.status === null)
|
|
11878
11920
|
return console.warn(`Cannot find schemaID: ${u}`), j;
|
|
11879
11921
|
const L = {
|
|
@@ -11898,11 +11940,11 @@ const Up = ({
|
|
|
11898
11940
|
q
|
|
11899
11941
|
]
|
|
11900
11942
|
), G = de((u) => {
|
|
11901
|
-
p((
|
|
11943
|
+
p((f) => [...f, u]);
|
|
11902
11944
|
}, []), ge = de(
|
|
11903
11945
|
(u) => {
|
|
11904
|
-
var
|
|
11905
|
-
return (
|
|
11946
|
+
var f, v, N, j, B;
|
|
11947
|
+
return (f = n == null ? void 0 : n.fields[u]) != null && f.touched && ((v = n == null ? void 0 : n.fields[u]) != null && v.status) ? { status: "", message: "" } : (N = n == null ? void 0 : n.fields[u]) != null && N.touched && !((j = n == null ? void 0 : n.fields[u]) != null && j.status) ? {
|
|
11906
11948
|
status: "error",
|
|
11907
11949
|
message: (B = n == null ? void 0 : n.fields[u]) == null ? void 0 : B.message
|
|
11908
11950
|
} : { status: "", message: "" };
|
|
@@ -11910,14 +11952,14 @@ const Up = ({
|
|
|
11910
11952
|
[n == null ? void 0 : n.fields]
|
|
11911
11953
|
), ye = de(
|
|
11912
11954
|
(u) => {
|
|
11913
|
-
const { status:
|
|
11914
|
-
return
|
|
11955
|
+
const { status: f } = ge(u);
|
|
11956
|
+
return f;
|
|
11915
11957
|
},
|
|
11916
11958
|
[ge]
|
|
11917
11959
|
), be = de(
|
|
11918
11960
|
(u) => {
|
|
11919
|
-
const { message:
|
|
11920
|
-
return
|
|
11961
|
+
const { message: f } = ge(u);
|
|
11962
|
+
return f;
|
|
11921
11963
|
},
|
|
11922
11964
|
[ge]
|
|
11923
11965
|
), Ne = de(
|
|
@@ -11926,33 +11968,33 @@ const Up = ({
|
|
|
11926
11968
|
), je = de(() => {
|
|
11927
11969
|
s({}), o({}), a({ status: void 0, fields: {} }), c({});
|
|
11928
11970
|
}, []), O = de(
|
|
11929
|
-
(u,
|
|
11971
|
+
(u, f) => ({
|
|
11930
11972
|
...u,
|
|
11931
11973
|
onBlurHandler: () => se(
|
|
11932
|
-
|
|
11933
|
-
l[
|
|
11974
|
+
f,
|
|
11975
|
+
l[f]
|
|
11934
11976
|
),
|
|
11935
11977
|
onChangeHandler: V,
|
|
11936
|
-
onFocusHandler: () => G(
|
|
11978
|
+
onFocusHandler: () => G(f)
|
|
11937
11979
|
}),
|
|
11938
11980
|
[l, G, V, se]
|
|
11939
11981
|
), y = de(
|
|
11940
11982
|
(u) => {
|
|
11941
11983
|
if (!u)
|
|
11942
11984
|
return;
|
|
11943
|
-
const
|
|
11985
|
+
const f = u.value ? u : u.querySelectorAll(
|
|
11944
11986
|
"input,select,textarea"
|
|
11945
11987
|
)[0] || u;
|
|
11946
|
-
T[
|
|
11988
|
+
T[f == null ? void 0 : f.name] || S((v) => ({
|
|
11947
11989
|
...v,
|
|
11948
|
-
[
|
|
11990
|
+
[f.name]: f
|
|
11949
11991
|
}));
|
|
11950
11992
|
},
|
|
11951
11993
|
[T]
|
|
11952
11994
|
), R = de(
|
|
11953
11995
|
(u) => {
|
|
11954
11996
|
var Xe, tt;
|
|
11955
|
-
const
|
|
11997
|
+
const f = [
|
|
11956
11998
|
"text",
|
|
11957
11999
|
"email",
|
|
11958
12000
|
"password",
|
|
@@ -11976,12 +12018,12 @@ const Up = ({
|
|
|
11976
12018
|
return he.checked = l[u], O(he, u);
|
|
11977
12019
|
if (ee === "input" && (v == null ? void 0 : v.format) === "date")
|
|
11978
12020
|
return he.type = "date", he.value = String(l[u] || ""), v != null && v.formatMinimum && (he.min = v == null ? void 0 : v.formatMinimum), v != null && v.formatMaximum && (he.max = v == null ? void 0 : v.formatMaximum), O(he, u);
|
|
11979
|
-
if (ee === "input" &&
|
|
12021
|
+
if (ee === "input" && f.includes(z) || ee === "textarea")
|
|
11980
12022
|
return he.type = bl(v), he.value = String(l[u] || ""), O(he, u);
|
|
11981
12023
|
if (ee === "select") {
|
|
11982
12024
|
const ie = v["x-options"] || [];
|
|
11983
|
-
return he.value = l[u], he.onChangeHandler = (
|
|
11984
|
-
const rt = D(
|
|
12025
|
+
return he.value = l[u], he.onChangeHandler = (_t) => {
|
|
12026
|
+
const rt = D(_t);
|
|
11985
12027
|
H(u, rt), se(u, rt, {
|
|
11986
12028
|
touched: !0
|
|
11987
12029
|
});
|
|
@@ -12003,10 +12045,10 @@ const Up = ({
|
|
|
12003
12045
|
]
|
|
12004
12046
|
), C = de(
|
|
12005
12047
|
(u) => {
|
|
12006
|
-
const
|
|
12048
|
+
const f = { ...l }, v = { ...n }, N = new RegExp(`(\\.|^)${u}(\\.|$)`);
|
|
12007
12049
|
Object.keys(l).forEach((j) => {
|
|
12008
|
-
N.test(j) && (delete v.fields[j], delete
|
|
12009
|
-
}), a(v), c(
|
|
12050
|
+
N.test(j) && (delete v.fields[j], delete f[j]);
|
|
12051
|
+
}), a(v), c(f);
|
|
12010
12052
|
},
|
|
12011
12053
|
[l, n]
|
|
12012
12054
|
);
|
|
@@ -12034,7 +12076,7 @@ const Up = ({
|
|
|
12034
12076
|
ajv: E
|
|
12035
12077
|
};
|
|
12036
12078
|
};
|
|
12037
|
-
function
|
|
12079
|
+
function Kp(t) {
|
|
12038
12080
|
const e = (n) => typeof window < "u" ? window.matchMedia(n).matches : !1, [r, s] = Z(e(t));
|
|
12039
12081
|
return $e(() => {
|
|
12040
12082
|
const n = window.matchMedia(t);
|
|
@@ -12046,7 +12088,7 @@ function Hp(t) {
|
|
|
12046
12088
|
};
|
|
12047
12089
|
}, [t]), r;
|
|
12048
12090
|
}
|
|
12049
|
-
const
|
|
12091
|
+
const Gp = () => {
|
|
12050
12092
|
const [t, e] = Z([]);
|
|
12051
12093
|
function r(n) {
|
|
12052
12094
|
const a = { ...n, id: Date.now().toString() };
|
|
@@ -12065,7 +12107,7 @@ const Kp = () => {
|
|
|
12065
12107
|
addNotification: r,
|
|
12066
12108
|
removeNotification: s
|
|
12067
12109
|
};
|
|
12068
|
-
},
|
|
12110
|
+
}, Wp = (t = [], e = 0) => {
|
|
12069
12111
|
const [r, s] = Z(e), [n, a] = Z(t), i = Ke(() => n.length - 1, [n]), o = Ke(
|
|
12070
12112
|
() => r + 1 <= i && !n[r + 1].disabled,
|
|
12071
12113
|
[r, i, n]
|
|
@@ -12074,7 +12116,7 @@ const Kp = () => {
|
|
|
12074
12116
|
[r, n]
|
|
12075
12117
|
), c = de(() => {
|
|
12076
12118
|
o && s((V) => V + 1);
|
|
12077
|
-
}, [o]),
|
|
12119
|
+
}, [o]), d = de(() => {
|
|
12078
12120
|
l && s((V) => V - 1);
|
|
12079
12121
|
}, [l]);
|
|
12080
12122
|
function p(V) {
|
|
@@ -12135,7 +12177,7 @@ const Kp = () => {
|
|
|
12135
12177
|
setSteps: p,
|
|
12136
12178
|
setStepSelected: I,
|
|
12137
12179
|
goToNextStep: c,
|
|
12138
|
-
goToPrevStep:
|
|
12180
|
+
goToPrevStep: d,
|
|
12139
12181
|
canGoToNextStep: o,
|
|
12140
12182
|
canGoToPrevStep: l,
|
|
12141
12183
|
isStep: A,
|
|
@@ -12161,7 +12203,7 @@ export {
|
|
|
12161
12203
|
ro as DsHR,
|
|
12162
12204
|
to as DsHeading,
|
|
12163
12205
|
Ae as DsIcon,
|
|
12164
|
-
|
|
12206
|
+
zp as DsIndicator,
|
|
12165
12207
|
_o as DsInlineEditable,
|
|
12166
12208
|
Ur as DsInput,
|
|
12167
12209
|
fo as DsLoading,
|
|
@@ -12177,7 +12219,7 @@ export {
|
|
|
12177
12219
|
fl as DsStepper,
|
|
12178
12220
|
nl as DsSubtitle,
|
|
12179
12221
|
pl as DsTable,
|
|
12180
|
-
|
|
12222
|
+
qp as DsTabs,
|
|
12181
12223
|
go as DsTextArea,
|
|
12182
12224
|
Sr as DsTooltip,
|
|
12183
12225
|
ko as DsTwoColumns,
|
|
@@ -12188,9 +12230,9 @@ export {
|
|
|
12188
12230
|
wi as getSchemaProperties,
|
|
12189
12231
|
_s as isEqual,
|
|
12190
12232
|
_l as isValidObject,
|
|
12191
|
-
|
|
12192
|
-
|
|
12193
|
-
|
|
12194
|
-
|
|
12195
|
-
|
|
12233
|
+
Up as parseOptionValue,
|
|
12234
|
+
Hp as useForm,
|
|
12235
|
+
Kp as useMediaQuery,
|
|
12236
|
+
Gp as useNotification,
|
|
12237
|
+
Wp as useStepper
|
|
12196
12238
|
};
|