@arthurzakharov/ui-kit 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as te, jsx as V } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { useResizeObserver as
|
|
2
|
+
import Ne, { useRef as fe, useState as oe, useCallback as re, useEffect as de } from "react";
|
|
3
|
+
import { useResizeObserver as ze } from "usehooks-ts";
|
|
4
4
|
import { RefreshCw as Fe, RotateCcw as qe, Check as Be } from "lucide-react";
|
|
5
5
|
import he from "clsx";
|
|
6
6
|
import { Button as we } from "../../controls/buttons/button/button.component.js";
|
|
@@ -40,15 +40,15 @@ var Te;
|
|
|
40
40
|
function Ve() {
|
|
41
41
|
if (Te) return I;
|
|
42
42
|
Te = 1;
|
|
43
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111,
|
|
43
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, T = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, _ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
44
44
|
function R(f) {
|
|
45
45
|
if (typeof f == "object" && f !== null) {
|
|
46
|
-
var
|
|
47
|
-
switch (
|
|
46
|
+
var G = f.$$typeof;
|
|
47
|
+
switch (G) {
|
|
48
48
|
case n:
|
|
49
49
|
switch (f = f.type, f) {
|
|
50
50
|
case d:
|
|
51
|
-
case
|
|
51
|
+
case s:
|
|
52
52
|
case t:
|
|
53
53
|
case o:
|
|
54
54
|
case a:
|
|
@@ -63,18 +63,18 @@ function Ve() {
|
|
|
63
63
|
case l:
|
|
64
64
|
return f;
|
|
65
65
|
default:
|
|
66
|
-
return
|
|
66
|
+
return G;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
case r:
|
|
70
|
-
return
|
|
70
|
+
return G;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
function j(f) {
|
|
75
|
-
return R(f) ===
|
|
75
|
+
return R(f) === s;
|
|
76
76
|
}
|
|
77
|
-
return I.AsyncMode = d, I.ConcurrentMode =
|
|
77
|
+
return I.AsyncMode = d, I.ConcurrentMode = s, I.ContextConsumer = c, I.ContextProvider = l, I.Element = n, I.ForwardRef = u, I.Fragment = t, I.Lazy = x, I.Memo = b, I.Portal = r, I.Profiler = o, I.StrictMode = a, I.Suspense = v, I.isAsyncMode = function(f) {
|
|
78
78
|
return j(f) || R(f) === d;
|
|
79
79
|
}, I.isConcurrentMode = j, I.isContextConsumer = function(f) {
|
|
80
80
|
return R(f) === c;
|
|
@@ -99,27 +99,27 @@ function Ve() {
|
|
|
99
99
|
}, I.isSuspense = function(f) {
|
|
100
100
|
return R(f) === v;
|
|
101
101
|
}, I.isValidElementType = function(f) {
|
|
102
|
-
return typeof f == "string" || typeof f == "function" || f === t || f ===
|
|
102
|
+
return typeof f == "string" || typeof f == "function" || f === t || f === s || f === o || f === a || f === v || f === y || typeof f == "object" && f !== null && (f.$$typeof === x || f.$$typeof === b || f.$$typeof === l || f.$$typeof === c || f.$$typeof === u || f.$$typeof === T || f.$$typeof === _ || f.$$typeof === N || f.$$typeof === g);
|
|
103
103
|
}, I.typeOf = R, I;
|
|
104
104
|
}
|
|
105
105
|
var L = {};
|
|
106
106
|
var Se;
|
|
107
107
|
function Xe() {
|
|
108
108
|
return Se || (Se = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
109
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111,
|
|
109
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, T = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, _ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
110
110
|
function R(p) {
|
|
111
111
|
return typeof p == "string" || typeof p == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
112
|
-
p === t || p ===
|
|
112
|
+
p === t || p === s || p === o || p === a || p === v || p === y || typeof p == "object" && p !== null && (p.$$typeof === x || p.$$typeof === b || p.$$typeof === l || p.$$typeof === c || p.$$typeof === u || p.$$typeof === T || p.$$typeof === _ || p.$$typeof === N || p.$$typeof === g);
|
|
113
113
|
}
|
|
114
114
|
function j(p) {
|
|
115
115
|
if (typeof p == "object" && p !== null) {
|
|
116
|
-
var
|
|
117
|
-
switch (
|
|
116
|
+
var Z = p.$$typeof;
|
|
117
|
+
switch (Z) {
|
|
118
118
|
case n:
|
|
119
119
|
var ae = p.type;
|
|
120
120
|
switch (ae) {
|
|
121
121
|
case d:
|
|
122
|
-
case
|
|
122
|
+
case s:
|
|
123
123
|
case t:
|
|
124
124
|
case o:
|
|
125
125
|
case a:
|
|
@@ -135,20 +135,20 @@ function Xe() {
|
|
|
135
135
|
case l:
|
|
136
136
|
return Pe;
|
|
137
137
|
default:
|
|
138
|
-
return
|
|
138
|
+
return Z;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
case r:
|
|
142
|
-
return
|
|
142
|
+
return Z;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
var f = d,
|
|
146
|
+
var f = d, G = s, Q = c, K = l, A = n, P = u, q = t, F = x, m = b, H = r, ee = o, $ = a, Y = v, B = !1;
|
|
147
147
|
function J(p) {
|
|
148
|
-
return B || (B = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
148
|
+
return B || (B = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), i(p) || j(p) === d;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
return j(p) ===
|
|
150
|
+
function i(p) {
|
|
151
|
+
return j(p) === s;
|
|
152
152
|
}
|
|
153
153
|
function h(p) {
|
|
154
154
|
return j(p) === c;
|
|
@@ -183,7 +183,7 @@ function Xe() {
|
|
|
183
183
|
function X(p) {
|
|
184
184
|
return j(p) === v;
|
|
185
185
|
}
|
|
186
|
-
L.AsyncMode = f, L.ConcurrentMode =
|
|
186
|
+
L.AsyncMode = f, L.ConcurrentMode = G, L.ContextConsumer = Q, L.ContextProvider = K, L.Element = A, L.ForwardRef = P, L.Fragment = q, L.Lazy = F, L.Memo = m, L.Portal = H, L.Profiler = ee, L.StrictMode = $, L.Suspense = Y, L.isAsyncMode = J, L.isConcurrentMode = i, L.isContextConsumer = h, L.isContextProvider = w, L.isElement = O, L.isForwardRef = E, L.isFragment = M, L.isLazy = S, L.isMemo = C, L.isPortal = D, L.isProfiler = W, L.isStrictMode = k, L.isSuspense = X, L.isValidElementType = R, L.typeOf = j;
|
|
187
187
|
})()), L;
|
|
188
188
|
}
|
|
189
189
|
var Oe;
|
|
@@ -214,23 +214,23 @@ function Je() {
|
|
|
214
214
|
});
|
|
215
215
|
if (d.join("") !== "0123456789")
|
|
216
216
|
return !1;
|
|
217
|
-
var
|
|
217
|
+
var s = {};
|
|
218
218
|
return "abcdefghijklmnopqrst".split("").forEach(function(u) {
|
|
219
|
-
|
|
220
|
-
}), Object.keys(Object.assign({},
|
|
219
|
+
s[u] = u;
|
|
220
|
+
}), Object.keys(Object.assign({}, s)).join("") === "abcdefghijklmnopqrst";
|
|
221
221
|
} catch {
|
|
222
222
|
return !1;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
return pe = a() ? Object.assign : function(o, l) {
|
|
226
|
-
for (var c, d = t(o),
|
|
226
|
+
for (var c, d = t(o), s, u = 1; u < arguments.length; u++) {
|
|
227
227
|
c = Object(arguments[u]);
|
|
228
228
|
for (var v in c)
|
|
229
229
|
n.call(c, v) && (d[v] = c[v]);
|
|
230
230
|
if (e) {
|
|
231
|
-
|
|
232
|
-
for (var y = 0; y <
|
|
233
|
-
r.call(c,
|
|
231
|
+
s = e(c);
|
|
232
|
+
for (var y = 0; y < s.length; y++)
|
|
233
|
+
r.call(c, s[y]) && (d[s[y]] = c[s[y]]);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
return d;
|
|
@@ -248,7 +248,7 @@ function We() {
|
|
|
248
248
|
return Ae || (Ae = 1, ye = Function.call.bind(Object.prototype.hasOwnProperty)), ye;
|
|
249
249
|
}
|
|
250
250
|
var me, Me;
|
|
251
|
-
function
|
|
251
|
+
function Ge() {
|
|
252
252
|
if (Me) return me;
|
|
253
253
|
Me = 1;
|
|
254
254
|
var e = function() {
|
|
@@ -264,7 +264,7 @@ function Ze() {
|
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function a(o, l, c, d,
|
|
267
|
+
function a(o, l, c, d, s) {
|
|
268
268
|
if (process.env.NODE_ENV !== "production") {
|
|
269
269
|
for (var u in o)
|
|
270
270
|
if (t(o, u)) {
|
|
@@ -284,7 +284,7 @@ function Ze() {
|
|
|
284
284
|
(d || "React class") + ": type specification of " + c + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof v + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
285
285
|
), v instanceof Error && !(v.message in r)) {
|
|
286
286
|
r[v.message] = !0;
|
|
287
|
-
var b =
|
|
287
|
+
var b = s ? s() : "";
|
|
288
288
|
e(
|
|
289
289
|
"Failed " + c + " type: " + v.message + (b ?? "")
|
|
290
290
|
);
|
|
@@ -297,10 +297,10 @@ function Ze() {
|
|
|
297
297
|
}, me = a, me;
|
|
298
298
|
}
|
|
299
299
|
var _e, De;
|
|
300
|
-
function
|
|
300
|
+
function Ze() {
|
|
301
301
|
if (De) return _e;
|
|
302
302
|
De = 1;
|
|
303
|
-
var e = $e(), n = Je(), r = /* @__PURE__ */ be(), t = /* @__PURE__ */ We(), a = /* @__PURE__ */
|
|
303
|
+
var e = $e(), n = Je(), r = /* @__PURE__ */ be(), t = /* @__PURE__ */ We(), a = /* @__PURE__ */ Ge(), o = function() {
|
|
304
304
|
};
|
|
305
305
|
process.env.NODE_ENV !== "production" && (o = function(c) {
|
|
306
306
|
var d = "Warning: " + c;
|
|
@@ -314,9 +314,9 @@ function Ge() {
|
|
|
314
314
|
return null;
|
|
315
315
|
}
|
|
316
316
|
return _e = function(c, d) {
|
|
317
|
-
var
|
|
318
|
-
function v(
|
|
319
|
-
var h =
|
|
317
|
+
var s = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
|
|
318
|
+
function v(i) {
|
|
319
|
+
var h = i && (s && i[s] || i[u]);
|
|
320
320
|
if (typeof h == "function")
|
|
321
321
|
return h;
|
|
322
322
|
}
|
|
@@ -329,11 +329,11 @@ function Ge() {
|
|
|
329
329
|
object: _("object"),
|
|
330
330
|
string: _("string"),
|
|
331
331
|
symbol: _("symbol"),
|
|
332
|
-
any:
|
|
332
|
+
any: N(),
|
|
333
333
|
arrayOf: R,
|
|
334
334
|
element: j(),
|
|
335
335
|
elementType: f(),
|
|
336
|
-
instanceOf:
|
|
336
|
+
instanceOf: G,
|
|
337
337
|
node: P(),
|
|
338
338
|
objectOf: K,
|
|
339
339
|
oneOf: Q,
|
|
@@ -341,14 +341,14 @@ function Ge() {
|
|
|
341
341
|
shape: F,
|
|
342
342
|
exact: m
|
|
343
343
|
};
|
|
344
|
-
function x(
|
|
345
|
-
return
|
|
344
|
+
function x(i, h) {
|
|
345
|
+
return i === h ? i !== 0 || 1 / i === 1 / h : i !== i && h !== h;
|
|
346
346
|
}
|
|
347
|
-
function g(
|
|
348
|
-
this.message =
|
|
347
|
+
function g(i, h) {
|
|
348
|
+
this.message = i, this.data = h && typeof h == "object" ? h : {}, this.stack = "";
|
|
349
349
|
}
|
|
350
350
|
g.prototype = Error.prototype;
|
|
351
|
-
function T(
|
|
351
|
+
function T(i) {
|
|
352
352
|
if (process.env.NODE_ENV !== "production")
|
|
353
353
|
var h = {}, w = 0;
|
|
354
354
|
function O(M, S, C, D, W, k, X) {
|
|
@@ -359,38 +359,38 @@ function Ge() {
|
|
|
359
359
|
);
|
|
360
360
|
throw p.name = "Invariant Violation", p;
|
|
361
361
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
362
|
-
var
|
|
363
|
-
!h[
|
|
362
|
+
var Z = D + ":" + C;
|
|
363
|
+
!h[Z] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
364
364
|
w < 3 && (o(
|
|
365
365
|
"You are manually calling a React.PropTypes validation function for the `" + k + "` prop on `" + D + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
366
|
-
), h[
|
|
366
|
+
), h[Z] = !0, w++);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
return S[C] == null ? M ? S[C] === null ? new g("The " + W + " `" + k + "` is marked as required " + ("in `" + D + "`, but its value is `null`.")) : new g("The " + W + " `" + k + "` is marked as required in " + ("`" + D + "`, but its value is `undefined`.")) : null :
|
|
369
|
+
return S[C] == null ? M ? S[C] === null ? new g("The " + W + " `" + k + "` is marked as required " + ("in `" + D + "`, but its value is `null`.")) : new g("The " + W + " `" + k + "` is marked as required in " + ("`" + D + "`, but its value is `undefined`.")) : null : i(S, C, D, W, k);
|
|
370
370
|
}
|
|
371
371
|
var E = O.bind(null, !1);
|
|
372
372
|
return E.isRequired = O.bind(null, !0), E;
|
|
373
373
|
}
|
|
374
|
-
function _(
|
|
374
|
+
function _(i) {
|
|
375
375
|
function h(w, O, E, M, S, C) {
|
|
376
376
|
var D = w[O], W = $(D);
|
|
377
|
-
if (W !==
|
|
377
|
+
if (W !== i) {
|
|
378
378
|
var k = Y(D);
|
|
379
379
|
return new g(
|
|
380
|
-
"Invalid " + M + " `" + S + "` of type " + ("`" + k + "` supplied to `" + E + "`, expected ") + ("`" +
|
|
381
|
-
{ expectedType:
|
|
380
|
+
"Invalid " + M + " `" + S + "` of type " + ("`" + k + "` supplied to `" + E + "`, expected ") + ("`" + i + "`."),
|
|
381
|
+
{ expectedType: i }
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
384
|
return null;
|
|
385
385
|
}
|
|
386
386
|
return T(h);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function N() {
|
|
389
389
|
return T(l);
|
|
390
390
|
}
|
|
391
|
-
function R(
|
|
391
|
+
function R(i) {
|
|
392
392
|
function h(w, O, E, M, S) {
|
|
393
|
-
if (typeof
|
|
393
|
+
if (typeof i != "function")
|
|
394
394
|
return new g("Property `" + S + "` of component `" + E + "` has invalid PropType notation inside arrayOf.");
|
|
395
395
|
var C = w[O];
|
|
396
396
|
if (!Array.isArray(C)) {
|
|
@@ -398,7 +398,7 @@ function Ge() {
|
|
|
398
398
|
return new g("Invalid " + M + " `" + S + "` of type " + ("`" + D + "` supplied to `" + E + "`, expected an array."));
|
|
399
399
|
}
|
|
400
400
|
for (var W = 0; W < C.length; W++) {
|
|
401
|
-
var k =
|
|
401
|
+
var k = i(C, W, E, M, S + "[" + W + "]", r);
|
|
402
402
|
if (k instanceof Error)
|
|
403
403
|
return k;
|
|
404
404
|
}
|
|
@@ -407,7 +407,7 @@ function Ge() {
|
|
|
407
407
|
return T(h);
|
|
408
408
|
}
|
|
409
409
|
function j() {
|
|
410
|
-
function
|
|
410
|
+
function i(h, w, O, E, M) {
|
|
411
411
|
var S = h[w];
|
|
412
412
|
if (!c(S)) {
|
|
413
413
|
var C = $(S);
|
|
@@ -415,10 +415,10 @@ function Ge() {
|
|
|
415
415
|
}
|
|
416
416
|
return null;
|
|
417
417
|
}
|
|
418
|
-
return T(
|
|
418
|
+
return T(i);
|
|
419
419
|
}
|
|
420
420
|
function f() {
|
|
421
|
-
function
|
|
421
|
+
function i(h, w, O, E, M) {
|
|
422
422
|
var S = h[w];
|
|
423
423
|
if (!e.isValidElementType(S)) {
|
|
424
424
|
var C = $(S);
|
|
@@ -426,45 +426,45 @@ function Ge() {
|
|
|
426
426
|
}
|
|
427
427
|
return null;
|
|
428
428
|
}
|
|
429
|
-
return T(
|
|
429
|
+
return T(i);
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function G(i) {
|
|
432
432
|
function h(w, O, E, M, S) {
|
|
433
|
-
if (!(w[O] instanceof
|
|
434
|
-
var C =
|
|
433
|
+
if (!(w[O] instanceof i)) {
|
|
434
|
+
var C = i.name || y, D = J(w[O]);
|
|
435
435
|
return new g("Invalid " + M + " `" + S + "` of type " + ("`" + D + "` supplied to `" + E + "`, expected ") + ("instance of `" + C + "`."));
|
|
436
436
|
}
|
|
437
437
|
return null;
|
|
438
438
|
}
|
|
439
439
|
return T(h);
|
|
440
440
|
}
|
|
441
|
-
function Q(
|
|
442
|
-
if (!Array.isArray(
|
|
441
|
+
function Q(i) {
|
|
442
|
+
if (!Array.isArray(i))
|
|
443
443
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
444
444
|
"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])."
|
|
445
445
|
) : o("Invalid argument supplied to oneOf, expected an array.")), l;
|
|
446
446
|
function h(w, O, E, M, S) {
|
|
447
|
-
for (var C = w[O], D = 0; D <
|
|
448
|
-
if (x(C,
|
|
447
|
+
for (var C = w[O], D = 0; D < i.length; D++)
|
|
448
|
+
if (x(C, i[D]))
|
|
449
449
|
return null;
|
|
450
|
-
var W = JSON.stringify(
|
|
451
|
-
var
|
|
452
|
-
return
|
|
450
|
+
var W = JSON.stringify(i, function(X, p) {
|
|
451
|
+
var Z = Y(p);
|
|
452
|
+
return Z === "symbol" ? String(p) : p;
|
|
453
453
|
});
|
|
454
454
|
return new g("Invalid " + M + " `" + S + "` of value `" + String(C) + "` " + ("supplied to `" + E + "`, expected one of " + W + "."));
|
|
455
455
|
}
|
|
456
456
|
return T(h);
|
|
457
457
|
}
|
|
458
|
-
function K(
|
|
458
|
+
function K(i) {
|
|
459
459
|
function h(w, O, E, M, S) {
|
|
460
|
-
if (typeof
|
|
460
|
+
if (typeof i != "function")
|
|
461
461
|
return new g("Property `" + S + "` of component `" + E + "` has invalid PropType notation inside objectOf.");
|
|
462
462
|
var C = w[O], D = $(C);
|
|
463
463
|
if (D !== "object")
|
|
464
464
|
return new g("Invalid " + M + " `" + S + "` of type " + ("`" + D + "` supplied to `" + E + "`, expected an object."));
|
|
465
465
|
for (var W in C)
|
|
466
466
|
if (t(C, W)) {
|
|
467
|
-
var k =
|
|
467
|
+
var k = i(C, W, E, M, S + "." + W, r);
|
|
468
468
|
if (k instanceof Error)
|
|
469
469
|
return k;
|
|
470
470
|
}
|
|
@@ -472,46 +472,46 @@ function Ge() {
|
|
|
472
472
|
}
|
|
473
473
|
return T(h);
|
|
474
474
|
}
|
|
475
|
-
function A(
|
|
476
|
-
if (!Array.isArray(
|
|
475
|
+
function A(i) {
|
|
476
|
+
if (!Array.isArray(i))
|
|
477
477
|
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), l;
|
|
478
|
-
for (var h = 0; h <
|
|
479
|
-
var w =
|
|
478
|
+
for (var h = 0; h < i.length; h++) {
|
|
479
|
+
var w = i[h];
|
|
480
480
|
if (typeof w != "function")
|
|
481
481
|
return o(
|
|
482
482
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + B(w) + " at index " + h + "."
|
|
483
483
|
), l;
|
|
484
484
|
}
|
|
485
485
|
function O(E, M, S, C, D) {
|
|
486
|
-
for (var W = [], k = 0; k <
|
|
487
|
-
var X =
|
|
486
|
+
for (var W = [], k = 0; k < i.length; k++) {
|
|
487
|
+
var X = i[k], p = X(E, M, S, C, D, r);
|
|
488
488
|
if (p == null)
|
|
489
489
|
return null;
|
|
490
490
|
p.data && t(p.data, "expectedType") && W.push(p.data.expectedType);
|
|
491
491
|
}
|
|
492
|
-
var
|
|
493
|
-
return new g("Invalid " + C + " `" + D + "` supplied to " + ("`" + S + "`" +
|
|
492
|
+
var Z = W.length > 0 ? ", expected one of type [" + W.join(", ") + "]" : "";
|
|
493
|
+
return new g("Invalid " + C + " `" + D + "` supplied to " + ("`" + S + "`" + Z + "."));
|
|
494
494
|
}
|
|
495
495
|
return T(O);
|
|
496
496
|
}
|
|
497
497
|
function P() {
|
|
498
|
-
function
|
|
498
|
+
function i(h, w, O, E, M) {
|
|
499
499
|
return H(h[w]) ? null : new g("Invalid " + E + " `" + M + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
|
|
500
500
|
}
|
|
501
|
-
return T(
|
|
501
|
+
return T(i);
|
|
502
502
|
}
|
|
503
|
-
function q(
|
|
503
|
+
function q(i, h, w, O, E) {
|
|
504
504
|
return new g(
|
|
505
|
-
(
|
|
505
|
+
(i || "React class") + ": " + h + " type `" + w + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + E + "`."
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function F(
|
|
508
|
+
function F(i) {
|
|
509
509
|
function h(w, O, E, M, S) {
|
|
510
510
|
var C = w[O], D = $(C);
|
|
511
511
|
if (D !== "object")
|
|
512
512
|
return new g("Invalid " + M + " `" + S + "` of type `" + D + "` " + ("supplied to `" + E + "`, expected `object`."));
|
|
513
|
-
for (var W in
|
|
514
|
-
var k =
|
|
513
|
+
for (var W in i) {
|
|
514
|
+
var k = i[W];
|
|
515
515
|
if (typeof k != "function")
|
|
516
516
|
return q(E, M, S, W, Y(k));
|
|
517
517
|
var X = k(C, W, E, M, S + "." + W, r);
|
|
@@ -522,20 +522,20 @@ function Ge() {
|
|
|
522
522
|
}
|
|
523
523
|
return T(h);
|
|
524
524
|
}
|
|
525
|
-
function m(
|
|
525
|
+
function m(i) {
|
|
526
526
|
function h(w, O, E, M, S) {
|
|
527
527
|
var C = w[O], D = $(C);
|
|
528
528
|
if (D !== "object")
|
|
529
529
|
return new g("Invalid " + M + " `" + S + "` of type `" + D + "` " + ("supplied to `" + E + "`, expected `object`."));
|
|
530
|
-
var W = n({}, w[O],
|
|
530
|
+
var W = n({}, w[O], i);
|
|
531
531
|
for (var k in W) {
|
|
532
|
-
var X =
|
|
533
|
-
if (t(
|
|
532
|
+
var X = i[k];
|
|
533
|
+
if (t(i, k) && typeof X != "function")
|
|
534
534
|
return q(E, M, S, k, Y(X));
|
|
535
535
|
if (!X)
|
|
536
536
|
return new g(
|
|
537
537
|
"Invalid " + M + " `" + S + "` key `" + k + "` supplied to `" + E + "`.\nBad object: " + JSON.stringify(w[O], null, " ") + `
|
|
538
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
538
|
+
Valid keys: ` + JSON.stringify(Object.keys(i), null, " ")
|
|
539
539
|
);
|
|
540
540
|
var p = X(C, k, E, M, S + "." + k, r);
|
|
541
541
|
if (p)
|
|
@@ -545,23 +545,23 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
545
545
|
}
|
|
546
546
|
return T(h);
|
|
547
547
|
}
|
|
548
|
-
function H(
|
|
549
|
-
switch (typeof
|
|
548
|
+
function H(i) {
|
|
549
|
+
switch (typeof i) {
|
|
550
550
|
case "number":
|
|
551
551
|
case "string":
|
|
552
552
|
case "undefined":
|
|
553
553
|
return !0;
|
|
554
554
|
case "boolean":
|
|
555
|
-
return !
|
|
555
|
+
return !i;
|
|
556
556
|
case "object":
|
|
557
|
-
if (Array.isArray(
|
|
558
|
-
return
|
|
559
|
-
if (
|
|
557
|
+
if (Array.isArray(i))
|
|
558
|
+
return i.every(H);
|
|
559
|
+
if (i === null || c(i))
|
|
560
560
|
return !0;
|
|
561
|
-
var h = v(
|
|
561
|
+
var h = v(i);
|
|
562
562
|
if (h) {
|
|
563
|
-
var w = h.call(
|
|
564
|
-
if (h !==
|
|
563
|
+
var w = h.call(i), O;
|
|
564
|
+
if (h !== i.entries) {
|
|
565
565
|
for (; !(O = w.next()).done; )
|
|
566
566
|
if (!H(O.value))
|
|
567
567
|
return !1;
|
|
@@ -578,27 +578,27 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
578
578
|
return !1;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
function ee(
|
|
582
|
-
return
|
|
581
|
+
function ee(i, h) {
|
|
582
|
+
return i === "symbol" ? !0 : h ? h["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && h instanceof Symbol : !1;
|
|
583
583
|
}
|
|
584
|
-
function $(
|
|
585
|
-
var h = typeof
|
|
586
|
-
return Array.isArray(
|
|
584
|
+
function $(i) {
|
|
585
|
+
var h = typeof i;
|
|
586
|
+
return Array.isArray(i) ? "array" : i instanceof RegExp ? "object" : ee(h, i) ? "symbol" : h;
|
|
587
587
|
}
|
|
588
|
-
function Y(
|
|
589
|
-
if (typeof
|
|
590
|
-
return "" +
|
|
591
|
-
var h = $(
|
|
588
|
+
function Y(i) {
|
|
589
|
+
if (typeof i > "u" || i === null)
|
|
590
|
+
return "" + i;
|
|
591
|
+
var h = $(i);
|
|
592
592
|
if (h === "object") {
|
|
593
|
-
if (
|
|
593
|
+
if (i instanceof Date)
|
|
594
594
|
return "date";
|
|
595
|
-
if (
|
|
595
|
+
if (i instanceof RegExp)
|
|
596
596
|
return "regexp";
|
|
597
597
|
}
|
|
598
598
|
return h;
|
|
599
599
|
}
|
|
600
|
-
function B(
|
|
601
|
-
var h = Y(
|
|
600
|
+
function B(i) {
|
|
601
|
+
var h = Y(i);
|
|
602
602
|
switch (h) {
|
|
603
603
|
case "array":
|
|
604
604
|
case "object":
|
|
@@ -611,8 +611,8 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
611
611
|
return h;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
function J(
|
|
615
|
-
return !
|
|
614
|
+
function J(i) {
|
|
615
|
+
return !i.constructor || !i.constructor.name ? y : i.constructor.name;
|
|
616
616
|
}
|
|
617
617
|
return b.checkPropTypes = a, b.resetWarningCache = a.resetWarningCache, b.PropTypes = b, b;
|
|
618
618
|
}, _e;
|
|
@@ -627,7 +627,7 @@ function Ke() {
|
|
|
627
627
|
function r() {
|
|
628
628
|
}
|
|
629
629
|
return r.resetWarningCache = n, ge = function() {
|
|
630
|
-
function t(l, c, d,
|
|
630
|
+
function t(l, c, d, s, u, v) {
|
|
631
631
|
if (v !== e) {
|
|
632
632
|
var y = new Error(
|
|
633
633
|
"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"
|
|
@@ -670,7 +670,7 @@ function Qe() {
|
|
|
670
670
|
if (je) return se.exports;
|
|
671
671
|
if (je = 1, process.env.NODE_ENV !== "production") {
|
|
672
672
|
var e = $e(), n = !0;
|
|
673
|
-
se.exports = /* @__PURE__ */
|
|
673
|
+
se.exports = /* @__PURE__ */ Ze()(e.isElement, n);
|
|
674
674
|
} else
|
|
675
675
|
se.exports = /* @__PURE__ */ Ke()();
|
|
676
676
|
return se.exports;
|
|
@@ -694,8 +694,8 @@ xe.prototype.length = function() {
|
|
|
694
694
|
for (var e = 10, n = 0, r = void 0, t = void 0, a = 0; a <= e; a += 1) {
|
|
695
695
|
var o = a / e, l = this._point(o, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), c = this._point(o, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
|
|
696
696
|
if (a > 0) {
|
|
697
|
-
var d = l - r,
|
|
698
|
-
n += Math.sqrt(d * d +
|
|
697
|
+
var d = l - r, s = c - t;
|
|
698
|
+
n += Math.sqrt(d * d + s * s);
|
|
699
699
|
}
|
|
700
700
|
r = l, t = c;
|
|
701
701
|
}
|
|
@@ -711,15 +711,15 @@ function et(e, n, r) {
|
|
|
711
711
|
c = r.leading === !1 ? 0 : Date.now(), l = null, o = e.apply(t, a), l || (t = a = null);
|
|
712
712
|
};
|
|
713
713
|
return function() {
|
|
714
|
-
var
|
|
715
|
-
!c && r.leading === !1 && (c =
|
|
716
|
-
var u = n - (
|
|
717
|
-
return t = this, a = arguments, u <= 0 || u > n ? (l && (clearTimeout(l), l = null), c =
|
|
714
|
+
var s = Date.now();
|
|
715
|
+
!c && r.leading === !1 && (c = s);
|
|
716
|
+
var u = n - (s - c);
|
|
717
|
+
return t = this, a = arguments, u <= 0 || u > n ? (l && (clearTimeout(l), l = null), c = s, o = e.apply(t, a), l || (t = a = null)) : !l && r.trailing !== !1 && (l = setTimeout(d, u)), o;
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function z(e, n) {
|
|
721
721
|
var r = this, t = n || {};
|
|
722
|
-
this.velocityFilterWeight = t.velocityFilterWeight || 0.7, this.minWidth = t.minWidth || 0.5, this.maxWidth = t.maxWidth || 2.5, this.throttle = "throttle" in t ? t.throttle : 16, this.minDistance = "minDistance" in t ? t.minDistance : 5, this.throttle ? this._strokeMoveUpdate = et(
|
|
722
|
+
this.velocityFilterWeight = t.velocityFilterWeight || 0.7, this.minWidth = t.minWidth || 0.5, this.maxWidth = t.maxWidth || 2.5, this.throttle = "throttle" in t ? t.throttle : 16, this.minDistance = "minDistance" in t ? t.minDistance : 5, this.throttle ? this._strokeMoveUpdate = et(z.prototype._strokeUpdate, this.throttle) : this._strokeMoveUpdate = z.prototype._strokeUpdate, this.dotSize = t.dotSize || function() {
|
|
723
723
|
return (this.minWidth + this.maxWidth) / 2;
|
|
724
724
|
}, this.penColor = t.penColor || "black", this.backgroundColor = t.backgroundColor || "rgba(0,0,0,0)", this.onBegin = t.onBegin, this.onEnd = t.onEnd, this._canvas = e, this._ctx = e.getContext("2d"), this.clear(), this._handleMouseDown = function(a) {
|
|
725
725
|
a.which === 1 && (r._mouseButtonDown = !0, r._strokeBegin(a));
|
|
@@ -741,17 +741,17 @@ function N(e, n) {
|
|
|
741
741
|
o && (a.preventDefault(), r._strokeEnd(a));
|
|
742
742
|
}, this.on();
|
|
743
743
|
}
|
|
744
|
-
|
|
744
|
+
z.prototype.clear = function() {
|
|
745
745
|
var e = this._ctx, n = this._canvas;
|
|
746
746
|
e.fillStyle = this.backgroundColor, e.clearRect(0, 0, n.width, n.height), e.fillRect(0, 0, n.width, n.height), this._data = [], this._reset(), this._isEmpty = !0;
|
|
747
747
|
};
|
|
748
|
-
|
|
748
|
+
z.prototype.fromDataURL = function(e) {
|
|
749
749
|
var n = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = new Image(), a = r.ratio || window.devicePixelRatio || 1, o = r.width || this._canvas.width / a, l = r.height || this._canvas.height / a;
|
|
750
750
|
this._reset(), t.src = e, t.onload = function() {
|
|
751
751
|
n._ctx.drawImage(t, 0, 0, o, l);
|
|
752
752
|
}, this._isEmpty = !1;
|
|
753
753
|
};
|
|
754
|
-
|
|
754
|
+
z.prototype.toDataURL = function(e) {
|
|
755
755
|
var n;
|
|
756
756
|
switch (e) {
|
|
757
757
|
case "image/svg+xml":
|
|
@@ -762,23 +762,23 @@ N.prototype.toDataURL = function(e) {
|
|
|
762
762
|
return (n = this._canvas).toDataURL.apply(n, [e].concat(t));
|
|
763
763
|
}
|
|
764
764
|
};
|
|
765
|
-
|
|
765
|
+
z.prototype.on = function() {
|
|
766
766
|
this._handleMouseEvents(), this._handleTouchEvents();
|
|
767
767
|
};
|
|
768
|
-
|
|
768
|
+
z.prototype.off = function() {
|
|
769
769
|
this._canvas.removeEventListener("mousedown", this._handleMouseDown), this._canvas.removeEventListener("mousemove", this._handleMouseMove), document.removeEventListener("mouseup", this._handleMouseUp), this._canvas.removeEventListener("touchstart", this._handleTouchStart), this._canvas.removeEventListener("touchmove", this._handleTouchMove), this._canvas.removeEventListener("touchend", this._handleTouchEnd);
|
|
770
770
|
};
|
|
771
|
-
|
|
771
|
+
z.prototype.isEmpty = function() {
|
|
772
772
|
return this._isEmpty;
|
|
773
773
|
};
|
|
774
|
-
|
|
774
|
+
z.prototype._strokeBegin = function(e) {
|
|
775
775
|
this._data.push([]), this._reset(), this._strokeUpdate(e), typeof this.onBegin == "function" && this.onBegin(e);
|
|
776
776
|
};
|
|
777
|
-
|
|
777
|
+
z.prototype._strokeUpdate = function(e) {
|
|
778
778
|
var n = e.clientX, r = e.clientY, t = this._createPoint(n, r), a = this._data[this._data.length - 1], o = a && a[a.length - 1], l = o && t.distanceTo(o) < this.minDistance;
|
|
779
779
|
if (!(o && l)) {
|
|
780
|
-
var c = this._addPoint(t), d = c.curve,
|
|
781
|
-
d &&
|
|
780
|
+
var c = this._addPoint(t), d = c.curve, s = c.widths;
|
|
781
|
+
d && s && this._drawCurve(d, s.start, s.end), this._data[this._data.length - 1].push({
|
|
782
782
|
x: t.x,
|
|
783
783
|
y: t.y,
|
|
784
784
|
time: t.time,
|
|
@@ -786,7 +786,7 @@ N.prototype._strokeUpdate = function(e) {
|
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
788
|
};
|
|
789
|
-
|
|
789
|
+
z.prototype._strokeEnd = function(e) {
|
|
790
790
|
var n = this.points.length > 2, r = this.points[0];
|
|
791
791
|
if (!n && r && this._drawDot(r), r) {
|
|
792
792
|
var t = this._data[this._data.length - 1], a = t[t.length - 1];
|
|
@@ -799,20 +799,20 @@ N.prototype._strokeEnd = function(e) {
|
|
|
799
799
|
}
|
|
800
800
|
typeof this.onEnd == "function" && this.onEnd(e);
|
|
801
801
|
};
|
|
802
|
-
|
|
802
|
+
z.prototype._handleMouseEvents = function() {
|
|
803
803
|
this._mouseButtonDown = !1, this._canvas.addEventListener("mousedown", this._handleMouseDown), this._canvas.addEventListener("mousemove", this._handleMouseMove), document.addEventListener("mouseup", this._handleMouseUp);
|
|
804
804
|
};
|
|
805
|
-
|
|
805
|
+
z.prototype._handleTouchEvents = function() {
|
|
806
806
|
this._canvas.style.msTouchAction = "none", this._canvas.style.touchAction = "none", this._canvas.addEventListener("touchstart", this._handleTouchStart), this._canvas.addEventListener("touchmove", this._handleTouchMove), this._canvas.addEventListener("touchend", this._handleTouchEnd);
|
|
807
807
|
};
|
|
808
|
-
|
|
808
|
+
z.prototype._reset = function() {
|
|
809
809
|
this.points = [], this._lastVelocity = 0, this._lastWidth = (this.minWidth + this.maxWidth) / 2, this._ctx.fillStyle = this.penColor;
|
|
810
810
|
};
|
|
811
|
-
|
|
811
|
+
z.prototype._createPoint = function(e, n, r) {
|
|
812
812
|
var t = this._canvas.getBoundingClientRect();
|
|
813
813
|
return new ne(e - t.left, n - t.top, r || (/* @__PURE__ */ new Date()).getTime());
|
|
814
814
|
};
|
|
815
|
-
|
|
815
|
+
z.prototype._addPoint = function(e) {
|
|
816
816
|
var n = this.points, r = void 0;
|
|
817
817
|
if (n.push(e), n.length > 2) {
|
|
818
818
|
n.length === 3 && n.unshift(n[0]), r = this._calculateCurveControlPoints(n[0], n[1], n[2]);
|
|
@@ -823,42 +823,42 @@ N.prototype._addPoint = function(e) {
|
|
|
823
823
|
}
|
|
824
824
|
return {};
|
|
825
825
|
};
|
|
826
|
-
|
|
827
|
-
var t = e.x - n.x, a = e.y - n.y, o = n.x - r.x, l = n.y - r.y, c = { x: (e.x + n.x) / 2, y: (e.y + n.y) / 2 }, d = { x: (n.x + r.x) / 2, y: (n.y + r.y) / 2 },
|
|
826
|
+
z.prototype._calculateCurveControlPoints = function(e, n, r) {
|
|
827
|
+
var t = e.x - n.x, a = e.y - n.y, o = n.x - r.x, l = n.y - r.y, c = { x: (e.x + n.x) / 2, y: (e.y + n.y) / 2 }, d = { x: (n.x + r.x) / 2, y: (n.y + r.y) / 2 }, s = Math.sqrt(t * t + a * a), u = Math.sqrt(o * o + l * l), v = c.x - d.x, y = c.y - d.y, b = u / (s + u), x = { x: d.x + v * b, y: d.y + y * b }, g = n.x - x.x, T = n.y - x.y;
|
|
828
828
|
return {
|
|
829
829
|
c1: new ne(c.x + g, c.y + T),
|
|
830
830
|
c2: new ne(d.x + g, d.y + T)
|
|
831
831
|
};
|
|
832
832
|
};
|
|
833
|
-
|
|
833
|
+
z.prototype._calculateCurveWidths = function(e) {
|
|
834
834
|
var n = e.startPoint, r = e.endPoint, t = { start: null, end: null }, a = this.velocityFilterWeight * r.velocityFrom(n) + (1 - this.velocityFilterWeight) * this._lastVelocity, o = this._strokeWidth(a);
|
|
835
835
|
return t.start = this._lastWidth, t.end = o, this._lastVelocity = a, this._lastWidth = o, t;
|
|
836
836
|
};
|
|
837
|
-
|
|
837
|
+
z.prototype._strokeWidth = function(e) {
|
|
838
838
|
return Math.max(this.maxWidth / (e + 1), this.minWidth);
|
|
839
839
|
};
|
|
840
|
-
|
|
840
|
+
z.prototype._drawPoint = function(e, n, r) {
|
|
841
841
|
var t = this._ctx;
|
|
842
842
|
t.moveTo(e, n), t.arc(e, n, r, 0, 2 * Math.PI, !1), this._isEmpty = !1;
|
|
843
843
|
};
|
|
844
|
-
|
|
844
|
+
z.prototype._drawCurve = function(e, n, r) {
|
|
845
845
|
var t = this._ctx, a = r - n, o = Math.floor(e.length());
|
|
846
846
|
t.beginPath();
|
|
847
847
|
for (var l = 0; l < o; l += 1) {
|
|
848
|
-
var c = l / o, d = c * c,
|
|
849
|
-
b += 3 * v * c * e.control1.x, b += 3 * u * d * e.control2.x, b +=
|
|
848
|
+
var c = l / o, d = c * c, s = d * c, u = 1 - c, v = u * u, y = v * u, b = y * e.startPoint.x;
|
|
849
|
+
b += 3 * v * c * e.control1.x, b += 3 * u * d * e.control2.x, b += s * e.endPoint.x;
|
|
850
850
|
var x = y * e.startPoint.y;
|
|
851
|
-
x += 3 * v * c * e.control1.y, x += 3 * u * d * e.control2.y, x +=
|
|
852
|
-
var g = n +
|
|
851
|
+
x += 3 * v * c * e.control1.y, x += 3 * u * d * e.control2.y, x += s * e.endPoint.y;
|
|
852
|
+
var g = n + s * a;
|
|
853
853
|
this._drawPoint(b, x, g);
|
|
854
854
|
}
|
|
855
855
|
t.closePath(), t.fill();
|
|
856
856
|
};
|
|
857
|
-
|
|
857
|
+
z.prototype._drawDot = function(e) {
|
|
858
858
|
var n = this._ctx, r = typeof this.dotSize == "function" ? this.dotSize() : this.dotSize;
|
|
859
859
|
n.beginPath(), this._drawPoint(e.x, e.y, r), n.closePath(), n.fill();
|
|
860
860
|
};
|
|
861
|
-
|
|
861
|
+
z.prototype._fromData = function(e, n, r) {
|
|
862
862
|
for (var t = 0; t < e.length; t += 1) {
|
|
863
863
|
var a = e[t];
|
|
864
864
|
if (a.length > 1)
|
|
@@ -867,7 +867,7 @@ N.prototype._fromData = function(e, n, r) {
|
|
|
867
867
|
if (o === 0)
|
|
868
868
|
this.penColor = d, this._reset(), this._addPoint(c);
|
|
869
869
|
else if (o !== a.length - 1) {
|
|
870
|
-
var
|
|
870
|
+
var s = this._addPoint(c), u = s.curve, v = s.widths;
|
|
871
871
|
u && v && n(u, v, d);
|
|
872
872
|
}
|
|
873
873
|
}
|
|
@@ -878,19 +878,19 @@ N.prototype._fromData = function(e, n, r) {
|
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
};
|
|
881
|
-
|
|
881
|
+
z.prototype._toSVG = function() {
|
|
882
882
|
var e = this, n = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), a = 0, o = 0, l = r.width / t, c = r.height / t, d = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
883
|
-
d.setAttributeNS(null, "width", r.width), d.setAttributeNS(null, "height", r.height), this._fromData(n, function(_,
|
|
883
|
+
d.setAttributeNS(null, "width", r.width), d.setAttributeNS(null, "height", r.height), this._fromData(n, function(_, N, R) {
|
|
884
884
|
var j = document.createElement("path");
|
|
885
885
|
if (!isNaN(_.control1.x) && !isNaN(_.control1.y) && !isNaN(_.control2.x) && !isNaN(_.control2.y)) {
|
|
886
886
|
var f = "M " + _.startPoint.x.toFixed(3) + "," + _.startPoint.y.toFixed(3) + " " + ("C " + _.control1.x.toFixed(3) + "," + _.control1.y.toFixed(3) + " ") + (_.control2.x.toFixed(3) + "," + _.control2.y.toFixed(3) + " ") + (_.endPoint.x.toFixed(3) + "," + _.endPoint.y.toFixed(3));
|
|
887
|
-
j.setAttribute("d", f), j.setAttribute("stroke-width", (
|
|
887
|
+
j.setAttribute("d", f), j.setAttribute("stroke-width", (N.end * 2.25).toFixed(3)), j.setAttribute("stroke", R), j.setAttribute("fill", "none"), j.setAttribute("stroke-linecap", "round"), d.appendChild(j);
|
|
888
888
|
}
|
|
889
889
|
}, function(_) {
|
|
890
|
-
var
|
|
891
|
-
|
|
890
|
+
var N = document.createElement("circle"), R = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
|
|
891
|
+
N.setAttribute("r", R), N.setAttribute("cx", _.x), N.setAttribute("cy", _.y), N.setAttribute("fill", _.color), d.appendChild(N);
|
|
892
892
|
});
|
|
893
|
-
var
|
|
893
|
+
var s = "data:image/svg+xml;base64,", u = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + a + " " + o + " " + l + " " + c + '"') + (' width="' + l + '"') + (' height="' + c + '"') + ">", v = d.innerHTML;
|
|
894
894
|
if (v === void 0) {
|
|
895
895
|
var y = document.createElement("dummy"), b = d.childNodes;
|
|
896
896
|
y.innerHTML = "";
|
|
@@ -899,9 +899,9 @@ N.prototype._toSVG = function() {
|
|
|
899
899
|
v = y.innerHTML;
|
|
900
900
|
}
|
|
901
901
|
var g = "</svg>", T = u + v + g;
|
|
902
|
-
return
|
|
902
|
+
return s + btoa(T);
|
|
903
903
|
};
|
|
904
|
-
|
|
904
|
+
z.prototype.fromData = function(e) {
|
|
905
905
|
var n = this;
|
|
906
906
|
this.clear(), this._fromData(e, function(r, t) {
|
|
907
907
|
return n._drawCurve(r, t.start, t.end);
|
|
@@ -909,12 +909,12 @@ N.prototype.fromData = function(e) {
|
|
|
909
909
|
return n._drawDot(r);
|
|
910
910
|
}), this._data = e;
|
|
911
911
|
};
|
|
912
|
-
|
|
912
|
+
z.prototype.toData = function() {
|
|
913
913
|
return this._data;
|
|
914
914
|
};
|
|
915
915
|
const tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
916
916
|
__proto__: null,
|
|
917
|
-
default:
|
|
917
|
+
default: z
|
|
918
918
|
}, Symbol.toStringTag, { value: "Module" })), rt = /* @__PURE__ */ Ye(tt);
|
|
919
919
|
var le = { exports: {} }, nt = le.exports, Ie;
|
|
920
920
|
function at() {
|
|
@@ -931,22 +931,22 @@ function at() {
|
|
|
931
931
|
var a = {};
|
|
932
932
|
return t.m = r, t.c = a, t.p = "", t(0);
|
|
933
933
|
})([function(r, t) {
|
|
934
|
-
function a(
|
|
935
|
-
var u =
|
|
936
|
-
return
|
|
934
|
+
function a(s) {
|
|
935
|
+
var u = s.getContext("2d"), v = s.width, y = s.height, b = u.getImageData(0, 0, v, y).data, x = c(!0, v, y, b), g = c(!1, v, y, b), T = d(!0, v, y, b), _ = d(!1, v, y, b), N = _ - T + 1, R = g - x + 1, j = u.getImageData(T, x, N, R);
|
|
936
|
+
return s.width = N, s.height = R, u.clearRect(0, 0, N, R), u.putImageData(j, 0, 0), s;
|
|
937
937
|
}
|
|
938
|
-
function o(
|
|
939
|
-
return { red: y[4 * (v * u +
|
|
938
|
+
function o(s, u, v, y) {
|
|
939
|
+
return { red: y[4 * (v * u + s)], green: y[4 * (v * u + s) + 1], blue: y[4 * (v * u + s) + 2], alpha: y[4 * (v * u + s) + 3] };
|
|
940
940
|
}
|
|
941
|
-
function l(
|
|
942
|
-
return o(
|
|
941
|
+
function l(s, u, v, y) {
|
|
942
|
+
return o(s, u, v, y).alpha;
|
|
943
943
|
}
|
|
944
|
-
function c(
|
|
945
|
-
for (var b =
|
|
944
|
+
function c(s, u, v, y) {
|
|
945
|
+
for (var b = s ? 1 : -1, x = s ? 0 : v - 1, g = x; s ? g < v : g > -1; g += b) for (var T = 0; T < u; T++) if (l(T, g, u, y)) return g;
|
|
946
946
|
return null;
|
|
947
947
|
}
|
|
948
|
-
function d(
|
|
949
|
-
for (var b =
|
|
948
|
+
function d(s, u, v, y) {
|
|
949
|
+
for (var b = s ? 1 : -1, x = s ? 0 : u - 1, g = x; s ? g < u : g > -1; g += b) for (var T = 0; T < v; T++) if (l(g, T, u, y)) return g;
|
|
950
950
|
return null;
|
|
951
951
|
}
|
|
952
952
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.default = a;
|
|
@@ -958,18 +958,18 @@ var ot = ce.exports, Le;
|
|
|
958
958
|
function it() {
|
|
959
959
|
return Le || (Le = 1, (function(e, n) {
|
|
960
960
|
(function(r, t) {
|
|
961
|
-
e.exports = t(/* @__PURE__ */ Qe(),
|
|
961
|
+
e.exports = t(/* @__PURE__ */ Qe(), Ne, rt, at());
|
|
962
962
|
})(ot, function(r, t, a, o) {
|
|
963
963
|
return (function(l) {
|
|
964
|
-
function c(
|
|
965
|
-
if (d[
|
|
966
|
-
var u = d[
|
|
967
|
-
return l[
|
|
964
|
+
function c(s) {
|
|
965
|
+
if (d[s]) return d[s].exports;
|
|
966
|
+
var u = d[s] = { exports: {}, id: s, loaded: !1 };
|
|
967
|
+
return l[s].call(u.exports, u, u.exports, c), u.loaded = !0, u.exports;
|
|
968
968
|
}
|
|
969
969
|
var d = {};
|
|
970
970
|
return c.m = l, c.c = d, c.p = "", c(0);
|
|
971
971
|
})([function(l, c, d) {
|
|
972
|
-
function
|
|
972
|
+
function s(A) {
|
|
973
973
|
return A && A.__esModule ? A : { default: A };
|
|
974
974
|
}
|
|
975
975
|
function u(A, P) {
|
|
@@ -1005,7 +1005,7 @@ function it() {
|
|
|
1005
1005
|
return function(P, q, F) {
|
|
1006
1006
|
return q && A(P.prototype, q), F && A(P, F), P;
|
|
1007
1007
|
};
|
|
1008
|
-
})(), T = d(1), _ =
|
|
1008
|
+
})(), T = d(1), _ = s(T), N = d(2), R = s(N), j = d(3), f = s(j), G = d(4), Q = s(G), K = (function(A) {
|
|
1009
1009
|
function P() {
|
|
1010
1010
|
var q, F, m, H;
|
|
1011
1011
|
v(this, P);
|
|
@@ -1023,10 +1023,10 @@ function it() {
|
|
|
1023
1023
|
}, m._checkClearOnResize = function() {
|
|
1024
1024
|
m.props.clearOnResize && m._resizeCanvas();
|
|
1025
1025
|
}, m._resizeCanvas = function() {
|
|
1026
|
-
var B = m.props.canvasProps || {}, J = B.width,
|
|
1027
|
-
if (!J || !
|
|
1026
|
+
var B = m.props.canvasProps || {}, J = B.width, i = B.height;
|
|
1027
|
+
if (!J || !i) {
|
|
1028
1028
|
var h = m._canvas, w = Math.max(window.devicePixelRatio || 1, 1);
|
|
1029
|
-
J || (h.width = h.offsetWidth * w),
|
|
1029
|
+
J || (h.width = h.offsetWidth * w), i || (h.height = h.offsetHeight * w), h.getContext("2d").scale(w, w), m.clear();
|
|
1030
1030
|
}
|
|
1031
1031
|
}, m.on = function() {
|
|
1032
1032
|
return window.addEventListener("resize", m._checkClearOnResize), m._sigPad.on();
|
|
@@ -1058,7 +1058,7 @@ function it() {
|
|
|
1058
1058
|
q._canvas = m;
|
|
1059
1059
|
} }, F));
|
|
1060
1060
|
} }]), P;
|
|
1061
|
-
})(
|
|
1061
|
+
})(N.Component);
|
|
1062
1062
|
K.propTypes = { velocityFilterWeight: _.default.number, minWidth: _.default.number, maxWidth: _.default.number, minDistance: _.default.number, dotSize: _.default.oneOfType([_.default.number, _.default.func]), penColor: _.default.string, throttle: _.default.number, onEnd: _.default.func, onBegin: _.default.func, canvasProps: _.default.object, clearOnResize: _.default.bool }, K.defaultProps = { clearOnResize: !0 }, c.default = K;
|
|
1063
1063
|
}, function(l, c) {
|
|
1064
1064
|
l.exports = r;
|
|
@@ -1095,7 +1095,7 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1095
1095
|
AutoPanelLabelText: Ot,
|
|
1096
1096
|
AutoPanelError: Ct,
|
|
1097
1097
|
AutoPanelErrorTitle: Rt
|
|
1098
|
-
},
|
|
1098
|
+
}, zt = ({
|
|
1099
1099
|
// Signature props
|
|
1100
1100
|
name: e,
|
|
1101
1101
|
auto: n,
|
|
@@ -1106,14 +1106,14 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1106
1106
|
// Base props
|
|
1107
1107
|
...l
|
|
1108
1108
|
}) => {
|
|
1109
|
-
const c = fe(null), d = fe(e),
|
|
1109
|
+
const c = fe(null), d = fe(e), s = fe(!1), [u, v] = oe(null), [y, b] = oe(r ? "manual" : "auto"), [x, g] = oe(""), [T, _] = oe(!1), { width: N = 0, height: R = 0 } = ze({ ref: c, box: "border-box" }), j = y === "auto" ? n ? "auto-generated" : "auto-loading" : x ? "manual-drawn" : r ? "manual-stored" : "manual-blank", f = n !== "" || T, G = r || x, Q = re(
|
|
1110
1110
|
($) => {
|
|
1111
|
-
!u || !
|
|
1112
|
-
width: +
|
|
1111
|
+
!u || !N || !R || !$ || u.fromDataURL($, {
|
|
1112
|
+
width: +N.toFixed(),
|
|
1113
1113
|
height: +R.toFixed()
|
|
1114
1114
|
});
|
|
1115
1115
|
},
|
|
1116
|
-
[u,
|
|
1116
|
+
[u, N, R]
|
|
1117
1117
|
), K = re(() => {
|
|
1118
1118
|
if (!u) return;
|
|
1119
1119
|
const $ = u.getCanvas().toDataURL("image/png");
|
|
@@ -1130,26 +1130,20 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1130
1130
|
x && g("");
|
|
1131
1131
|
}, [x]), H = ($) => $.includes(j);
|
|
1132
1132
|
de(() => {
|
|
1133
|
-
y === "manual" && x &&
|
|
1134
|
-
}, [y, x,
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
const Y = `data:image/png;base64,${$.signature}`;
|
|
1142
|
-
_(!1), o(Y);
|
|
1143
|
-
}).catch(() => {
|
|
1144
|
-
_(!0);
|
|
1145
|
-
});
|
|
1146
|
-
}
|
|
1133
|
+
y === "manual" && x && N && R && Q(x);
|
|
1134
|
+
}, [y, x, N, R, Q]), de(() => {
|
|
1135
|
+
console.log("NAME CHANGED", d.current === e), d.current !== e && (console.log(d.current, e), d.current = e, t().then(($) => {
|
|
1136
|
+
const Y = `data:image/png;base64,${$.signature}`;
|
|
1137
|
+
_(!1), o(Y);
|
|
1138
|
+
}).catch(() => {
|
|
1139
|
+
_(!0);
|
|
1140
|
+
}));
|
|
1147
1141
|
}, [e, o]), de(() => {
|
|
1148
1142
|
if (n) {
|
|
1149
|
-
|
|
1143
|
+
s.current = !1;
|
|
1150
1144
|
return;
|
|
1151
1145
|
}
|
|
1152
|
-
|
|
1146
|
+
s.current || (s.current = !0, t().then(($) => {
|
|
1153
1147
|
const Y = `data:image/png;base64,${$.signature}`;
|
|
1154
1148
|
_(!1), o(Y);
|
|
1155
1149
|
}).catch(() => {
|
|
@@ -1157,7 +1151,7 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1157
1151
|
}));
|
|
1158
1152
|
}, [n, e, t, o]);
|
|
1159
1153
|
const ee = re(() => {
|
|
1160
|
-
_(!1),
|
|
1154
|
+
_(!1), s.current = !0, t().then(($) => {
|
|
1161
1155
|
const Y = `data:image/png;base64,${$.signature}`;
|
|
1162
1156
|
_(!1), o(Y);
|
|
1163
1157
|
}).catch(() => {
|
|
@@ -1225,7 +1219,7 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1225
1219
|
}
|
|
1226
1220
|
)
|
|
1227
1221
|
] }) : /* @__PURE__ */ te("div", { className: U.ManualPanel, children: [
|
|
1228
|
-
H(["manual-stored"]) ? /* @__PURE__ */ V("img", { width:
|
|
1222
|
+
H(["manual-stored"]) ? /* @__PURE__ */ V("img", { width: N, height: R, alt: "signature", src: G }) : /* @__PURE__ */ V(
|
|
1229
1223
|
ut,
|
|
1230
1224
|
{
|
|
1231
1225
|
penColor: "#262626",
|
|
@@ -1233,7 +1227,7 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1233
1227
|
minWidth: 0.25,
|
|
1234
1228
|
maxWidth: 2.75,
|
|
1235
1229
|
throttle: 12,
|
|
1236
|
-
canvasProps: { width: +(
|
|
1230
|
+
canvasProps: { width: +(N || 0).toFixed(), height: +(R || 0).toFixed() },
|
|
1237
1231
|
ref: ($) => v($),
|
|
1238
1232
|
clearOnResize: !0,
|
|
1239
1233
|
onEnd: K
|
|
@@ -1272,5 +1266,5 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1272
1266
|
);
|
|
1273
1267
|
};
|
|
1274
1268
|
export {
|
|
1275
|
-
|
|
1269
|
+
zt as Signature
|
|
1276
1270
|
};
|
|
@@ -1,106 +1,104 @@
|
|
|
1
1
|
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { useBoolean as
|
|
4
|
-
import { FadeScale as
|
|
5
|
-
import { FadeSlide as
|
|
6
|
-
import { Box as
|
|
2
|
+
import c from "clsx";
|
|
3
|
+
import { useBoolean as u } from "usehooks-ts";
|
|
4
|
+
import { FadeScale as L } from "../../../animations/fade-scale/fade-scale.component.js";
|
|
5
|
+
import { FadeSlide as k } from "../../../animations/fade-slide/fade-slide.component.js";
|
|
6
|
+
import { Box as B } from "../../primitives/box/box.component.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import { baseProps as
|
|
8
|
+
import { baseProps as x } from "../../../utils/functions/functions.util.js";
|
|
9
9
|
import "lucide-react";
|
|
10
|
-
import { ErrorMessage as
|
|
11
|
-
import { Label as
|
|
12
|
-
import { Input as
|
|
13
|
-
import '../../../assets/text-field-CMQWxQpy.css';const
|
|
14
|
-
TextField:
|
|
15
|
-
Content:
|
|
10
|
+
import { ErrorMessage as C } from "../../primitives/error-message/error-message.component.js";
|
|
11
|
+
import { Label as $ } from "../../primitives/label/label.component.js";
|
|
12
|
+
import { Input as w } from "../input/input.component.js";
|
|
13
|
+
import '../../../assets/text-field-CMQWxQpy.css';const D = "_TextField_1jd9o_1", O = "_Content_1jd9o_11", q = "_Label_1jd9o_27", y = "_Idle_1jd9o_37", z = "_Active_1jd9o_42", G = "_Placeholder_1jd9o_47", H = "_PlaceholderText_1jd9o_54", J = "_ErrorMessage_1jd9o_62", K = "_Input_1jd9o_66", Q = "_MaskStart_1jd9o_70", e = {
|
|
14
|
+
TextField: D,
|
|
15
|
+
Content: O,
|
|
16
16
|
Label: q,
|
|
17
|
-
Idle:
|
|
18
|
-
Active:
|
|
19
|
-
Placeholder:
|
|
20
|
-
PlaceholderText:
|
|
21
|
-
ErrorMessage:
|
|
22
|
-
Input:
|
|
23
|
-
MaskStart:
|
|
24
|
-
},
|
|
17
|
+
Idle: y,
|
|
18
|
+
Active: z,
|
|
19
|
+
Placeholder: G,
|
|
20
|
+
PlaceholderText: H,
|
|
21
|
+
ErrorMessage: J,
|
|
22
|
+
Input: K,
|
|
23
|
+
MaskStart: Q
|
|
24
|
+
}, ae = ({
|
|
25
25
|
// Interactive props
|
|
26
|
-
id:
|
|
27
|
-
value:
|
|
28
|
-
disabled:
|
|
29
|
-
state:
|
|
30
|
-
onChange:
|
|
31
|
-
onFocus:
|
|
32
|
-
onBlur:
|
|
26
|
+
id: d,
|
|
27
|
+
value: r = "",
|
|
28
|
+
disabled: h = !1,
|
|
29
|
+
state: l = "idle",
|
|
30
|
+
onChange: I,
|
|
31
|
+
onFocus: j,
|
|
32
|
+
onBlur: F,
|
|
33
33
|
// Text props
|
|
34
|
-
mask:
|
|
35
|
-
maxLength:
|
|
36
|
-
label:
|
|
34
|
+
mask: n,
|
|
35
|
+
maxLength: M = -1,
|
|
36
|
+
label: P = "",
|
|
37
37
|
message: m = "",
|
|
38
38
|
placeholder: _ = "",
|
|
39
39
|
// Base props
|
|
40
40
|
...p
|
|
41
41
|
}) => {
|
|
42
|
-
const { value:
|
|
43
|
-
S(),
|
|
44
|
-
},
|
|
45
|
-
b(),
|
|
42
|
+
const { value: f, setTrue: T, setFalse: A } = u(!1), { value: s, setTrue: S, setFalse: b } = u(!1), a = s || !!r || f, g = !n && !!_ && s && !r && !f, E = !!m && l === "error", N = (o) => {
|
|
43
|
+
S(), j?.(o);
|
|
44
|
+
}, v = (o) => {
|
|
45
|
+
b(), F?.(o);
|
|
46
46
|
};
|
|
47
47
|
return /* @__PURE__ */ i(
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
|
-
"data-testid":
|
|
51
|
-
className:
|
|
50
|
+
"data-testid": x(p, "data-testid", "text-field"),
|
|
51
|
+
className: c(e.TextField, x(p, "className")),
|
|
52
52
|
children: [
|
|
53
|
-
/* @__PURE__ */ i(
|
|
53
|
+
/* @__PURE__ */ i(B, { state: l, focused: s, children: [
|
|
54
54
|
/* @__PURE__ */ t(
|
|
55
|
-
|
|
55
|
+
$,
|
|
56
56
|
{
|
|
57
57
|
"data-testid": "text-label",
|
|
58
|
-
text:
|
|
58
|
+
text: P,
|
|
59
59
|
position: a ? "active" : "idle",
|
|
60
|
-
state: a ?
|
|
61
|
-
className:
|
|
60
|
+
state: a ? l : "idle",
|
|
61
|
+
className: c(e.Label, a ? e.Active : e.Idle)
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
64
|
/* @__PURE__ */ i(
|
|
65
65
|
"label",
|
|
66
66
|
{
|
|
67
|
-
htmlFor:
|
|
67
|
+
htmlFor: d,
|
|
68
68
|
className: e.Content,
|
|
69
69
|
onPointerDown: (o) => {
|
|
70
|
-
|
|
71
|
-
const f = document.getElementById(l);
|
|
72
|
-
console.log("input", f), f?.click();
|
|
70
|
+
s && o.preventDefault();
|
|
73
71
|
},
|
|
74
72
|
children: [
|
|
75
|
-
/* @__PURE__ */ t(
|
|
73
|
+
/* @__PURE__ */ t(L, { name: "text-placeholder", condition: g, className: e.Placeholder, children: /* @__PURE__ */ t("span", { "data-testid": "text-placeholder", className: e.PlaceholderText, children: _ }) }),
|
|
76
74
|
/* @__PURE__ */ t(
|
|
77
|
-
|
|
75
|
+
w,
|
|
78
76
|
{
|
|
79
77
|
"data-testid": "text-input",
|
|
80
|
-
mask:
|
|
81
|
-
maxLength:
|
|
82
|
-
disabled:
|
|
83
|
-
id:
|
|
84
|
-
value:
|
|
85
|
-
className:
|
|
86
|
-
[e.MaskStart]:
|
|
78
|
+
mask: n,
|
|
79
|
+
maxLength: M,
|
|
80
|
+
disabled: h,
|
|
81
|
+
id: d,
|
|
82
|
+
value: r,
|
|
83
|
+
className: c(e.Input, {
|
|
84
|
+
[e.MaskStart]: n && r === "" && !a
|
|
87
85
|
}),
|
|
88
|
-
onAnimationStart:
|
|
86
|
+
onAnimationStart: T,
|
|
89
87
|
onAnimationEnd: A,
|
|
90
|
-
onChange:
|
|
91
|
-
onFocus:
|
|
92
|
-
onBlur:
|
|
88
|
+
onChange: I,
|
|
89
|
+
onFocus: N,
|
|
90
|
+
onBlur: v
|
|
93
91
|
}
|
|
94
92
|
)
|
|
95
93
|
]
|
|
96
94
|
}
|
|
97
95
|
)
|
|
98
96
|
] }),
|
|
99
|
-
/* @__PURE__ */ t(
|
|
97
|
+
/* @__PURE__ */ t(k, { name: "text-message", direction: "ltr", condition: E, children: /* @__PURE__ */ t(C, { "data-testid": "text-error-message", text: m, className: e.ErrorMessage }) })
|
|
100
98
|
]
|
|
101
99
|
}
|
|
102
100
|
);
|
|
103
101
|
};
|
|
104
102
|
export {
|
|
105
|
-
|
|
103
|
+
ae as TextField
|
|
106
104
|
};
|