@arthurzakharov/ui-kit 1.3.3 → 1.3.4
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,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as Q, jsx as z } from "react/jsx-runtime";
|
|
2
2
|
import ze, { useRef as Fe, useState as Se, useCallback as re, useEffect as de } from "react";
|
|
3
3
|
import { g as qe, a as Be } from "../../input.component-C5xcmnfu.js";
|
|
4
4
|
import { useResizeObserver as Ue } from "usehooks-ts";
|
|
5
5
|
import { RefreshCw as Ne, Check as Ye } from "lucide-react";
|
|
6
6
|
import Pe from "clsx";
|
|
7
|
-
import { Animation as
|
|
7
|
+
import { Animation as ee } from "../../animations/animation.component.js";
|
|
8
8
|
import { C as oe } from "../../control.component-B9Ao9mfl.js";
|
|
9
9
|
import { Flex as ie } from "../flex/flex.component.js";
|
|
10
10
|
import { Text as we } from "../text/text.component.js";
|
|
@@ -14,11 +14,11 @@ var Ee;
|
|
|
14
14
|
function Ve() {
|
|
15
15
|
if (Ee) return I;
|
|
16
16
|
Ee = 1;
|
|
17
|
-
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, x = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121,
|
|
17
|
+
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, x = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, C = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, q = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
18
18
|
function $(f) {
|
|
19
19
|
if (typeof f == "object" && f !== null) {
|
|
20
|
-
var
|
|
21
|
-
switch (
|
|
20
|
+
var Z = f.$$typeof;
|
|
21
|
+
switch (Z) {
|
|
22
22
|
case a:
|
|
23
23
|
switch (f = f.type, f) {
|
|
24
24
|
case p:
|
|
@@ -37,20 +37,20 @@ function Ve() {
|
|
|
37
37
|
case u:
|
|
38
38
|
return f;
|
|
39
39
|
default:
|
|
40
|
-
return
|
|
40
|
+
return Z;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
case r:
|
|
44
|
-
return
|
|
44
|
+
return Z;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function k(f) {
|
|
49
49
|
return $(f) === c;
|
|
50
50
|
}
|
|
51
51
|
return I.AsyncMode = p, I.ConcurrentMode = c, I.ContextConsumer = i, I.ContextProvider = u, I.Element = a, I.ForwardRef = l, I.Fragment = t, I.Lazy = b, I.Memo = x, I.Portal = r, I.Profiler = o, I.StrictMode = n, I.Suspense = v, I.isAsyncMode = function(f) {
|
|
52
|
-
return
|
|
53
|
-
}, I.isConcurrentMode =
|
|
52
|
+
return k(f) || $(f) === p;
|
|
53
|
+
}, I.isConcurrentMode = k, I.isContextConsumer = function(f) {
|
|
54
54
|
return $(f) === i;
|
|
55
55
|
}, I.isContextProvider = function(f) {
|
|
56
56
|
return $(f) === u;
|
|
@@ -73,22 +73,22 @@ function Ve() {
|
|
|
73
73
|
}, I.isSuspense = function(f) {
|
|
74
74
|
return $(f) === v;
|
|
75
75
|
}, I.isValidElementType = function(f) {
|
|
76
|
-
return typeof f == "string" || typeof f == "function" || f === t || f === c || f === o || f === n || f === v || f === m || typeof f == "object" && f !== null && (f.$$typeof === b || f.$$typeof === x || f.$$typeof === u || f.$$typeof === i || f.$$typeof === l || f.$$typeof ===
|
|
76
|
+
return typeof f == "string" || typeof f == "function" || f === t || f === c || f === o || f === n || f === v || f === m || typeof f == "object" && f !== null && (f.$$typeof === b || f.$$typeof === x || f.$$typeof === u || f.$$typeof === i || f.$$typeof === l || f.$$typeof === C || f.$$typeof === g || f.$$typeof === q || f.$$typeof === y);
|
|
77
77
|
}, I.typeOf = $, I;
|
|
78
78
|
}
|
|
79
79
|
var j = {};
|
|
80
80
|
var Te;
|
|
81
81
|
function Xe() {
|
|
82
82
|
return Te || (Te = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
83
|
-
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, x = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121,
|
|
83
|
+
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, x = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, C = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, q = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
84
84
|
function $(h) {
|
|
85
85
|
return typeof h == "string" || typeof h == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
86
|
-
h === t || h === c || h === o || h === n || h === v || h === m || typeof h == "object" && h !== null && (h.$$typeof === b || h.$$typeof === x || h.$$typeof === u || h.$$typeof === i || h.$$typeof === l || h.$$typeof ===
|
|
86
|
+
h === t || h === c || h === o || h === n || h === v || h === m || typeof h == "object" && h !== null && (h.$$typeof === b || h.$$typeof === x || h.$$typeof === u || h.$$typeof === i || h.$$typeof === l || h.$$typeof === C || h.$$typeof === g || h.$$typeof === q || h.$$typeof === y);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function k(h) {
|
|
89
89
|
if (typeof h == "object" && h !== null) {
|
|
90
|
-
var
|
|
91
|
-
switch (
|
|
90
|
+
var G = h.$$typeof;
|
|
91
|
+
switch (G) {
|
|
92
92
|
case a:
|
|
93
93
|
var se = h.type;
|
|
94
94
|
switch (se) {
|
|
@@ -109,55 +109,55 @@ function Xe() {
|
|
|
109
109
|
case u:
|
|
110
110
|
return be;
|
|
111
111
|
default:
|
|
112
|
-
return
|
|
112
|
+
return G;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
case r:
|
|
116
|
-
return
|
|
116
|
+
return G;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
var f = p,
|
|
121
|
-
function
|
|
122
|
-
return U || (U = !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.")), s(h) ||
|
|
120
|
+
var f = p, Z = c, te = i, N = u, E = a, w = l, B = t, F = b, _ = x, K = r, ae = o, H = n, X = v, U = !1;
|
|
121
|
+
function J(h) {
|
|
122
|
+
return U || (U = !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.")), s(h) || k(h) === p;
|
|
123
123
|
}
|
|
124
124
|
function s(h) {
|
|
125
|
-
return
|
|
125
|
+
return k(h) === c;
|
|
126
126
|
}
|
|
127
127
|
function d(h) {
|
|
128
|
-
return
|
|
128
|
+
return k(h) === i;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
130
|
+
function S(h) {
|
|
131
|
+
return k(h) === u;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function R(h) {
|
|
134
134
|
return typeof h == "object" && h !== null && h.$$typeof === a;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return
|
|
136
|
+
function P(h) {
|
|
137
|
+
return k(h) === l;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return
|
|
139
|
+
function M(h) {
|
|
140
|
+
return k(h) === t;
|
|
141
141
|
}
|
|
142
142
|
function T(h) {
|
|
143
|
-
return
|
|
143
|
+
return k(h) === b;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
145
|
+
function O(h) {
|
|
146
|
+
return k(h) === x;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
return
|
|
148
|
+
function A(h) {
|
|
149
|
+
return k(h) === r;
|
|
150
150
|
}
|
|
151
151
|
function W(h) {
|
|
152
|
-
return
|
|
152
|
+
return k(h) === o;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
return
|
|
154
|
+
function D(h) {
|
|
155
|
+
return k(h) === n;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
157
|
+
function Y(h) {
|
|
158
|
+
return k(h) === v;
|
|
159
159
|
}
|
|
160
|
-
j.AsyncMode = f, j.ConcurrentMode =
|
|
160
|
+
j.AsyncMode = f, j.ConcurrentMode = Z, j.ContextConsumer = te, j.ContextProvider = N, j.Element = E, j.ForwardRef = w, j.Fragment = B, j.Lazy = F, j.Memo = _, j.Portal = K, j.Profiler = ae, j.StrictMode = H, j.Suspense = X, j.isAsyncMode = J, j.isConcurrentMode = s, j.isContextConsumer = d, j.isContextProvider = S, j.isElement = R, j.isForwardRef = P, j.isFragment = M, j.isLazy = T, j.isMemo = O, j.isPortal = A, j.isProfiler = W, j.isStrictMode = D, j.isSuspense = Y, j.isValidElementType = $, j.typeOf = k;
|
|
161
161
|
})()), j;
|
|
162
162
|
}
|
|
163
163
|
var Ce;
|
|
@@ -295,25 +295,25 @@ function Ge() {
|
|
|
295
295
|
return d;
|
|
296
296
|
}
|
|
297
297
|
var m = "<<anonymous>>", x = {
|
|
298
|
-
array:
|
|
299
|
-
bigint:
|
|
300
|
-
bool:
|
|
301
|
-
func:
|
|
302
|
-
number:
|
|
303
|
-
object:
|
|
304
|
-
string:
|
|
305
|
-
symbol:
|
|
298
|
+
array: g("array"),
|
|
299
|
+
bigint: g("bigint"),
|
|
300
|
+
bool: g("boolean"),
|
|
301
|
+
func: g("function"),
|
|
302
|
+
number: g("number"),
|
|
303
|
+
object: g("object"),
|
|
304
|
+
string: g("string"),
|
|
305
|
+
symbol: g("symbol"),
|
|
306
306
|
any: q(),
|
|
307
307
|
arrayOf: $,
|
|
308
|
-
element:
|
|
308
|
+
element: k(),
|
|
309
309
|
elementType: f(),
|
|
310
|
-
instanceOf:
|
|
311
|
-
node:
|
|
312
|
-
objectOf:
|
|
313
|
-
oneOf:
|
|
314
|
-
oneOfType:
|
|
310
|
+
instanceOf: Z,
|
|
311
|
+
node: w(),
|
|
312
|
+
objectOf: N,
|
|
313
|
+
oneOf: te,
|
|
314
|
+
oneOfType: E,
|
|
315
315
|
shape: F,
|
|
316
|
-
exact:
|
|
316
|
+
exact: _
|
|
317
317
|
};
|
|
318
318
|
function b(s, d) {
|
|
319
319
|
return s === d ? s !== 0 || 1 / s === 1 / d : s !== s && d !== d;
|
|
@@ -322,204 +322,204 @@ function Ge() {
|
|
|
322
322
|
this.message = s, this.data = d && typeof d == "object" ? d : {}, this.stack = "";
|
|
323
323
|
}
|
|
324
324
|
y.prototype = Error.prototype;
|
|
325
|
-
function
|
|
325
|
+
function C(s) {
|
|
326
326
|
if (process.env.NODE_ENV !== "production")
|
|
327
|
-
var d = {},
|
|
328
|
-
function
|
|
329
|
-
if (
|
|
327
|
+
var d = {}, S = 0;
|
|
328
|
+
function R(M, T, O, A, W, D, Y) {
|
|
329
|
+
if (A = A || m, D = D || O, Y !== r) {
|
|
330
330
|
if (p) {
|
|
331
331
|
var h = new Error(
|
|
332
332
|
"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"
|
|
333
333
|
);
|
|
334
334
|
throw h.name = "Invariant Violation", h;
|
|
335
335
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
336
|
-
var
|
|
337
|
-
!d[
|
|
338
|
-
|
|
339
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
340
|
-
), d[
|
|
336
|
+
var G = A + ":" + O;
|
|
337
|
+
!d[G] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
338
|
+
S < 3 && (o(
|
|
339
|
+
"You are manually calling a React.PropTypes validation function for the `" + D + "` prop on `" + A + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
340
|
+
), d[G] = !0, S++);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
return T[
|
|
343
|
+
return T[O] == null ? M ? T[O] === null ? new y("The " + W + " `" + D + "` is marked as required " + ("in `" + A + "`, but its value is `null`.")) : new y("The " + W + " `" + D + "` is marked as required in " + ("`" + A + "`, but its value is `undefined`.")) : null : s(T, O, A, W, D);
|
|
344
344
|
}
|
|
345
|
-
var
|
|
346
|
-
return
|
|
345
|
+
var P = R.bind(null, !1);
|
|
346
|
+
return P.isRequired = R.bind(null, !0), P;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
function d(
|
|
350
|
-
var
|
|
348
|
+
function g(s) {
|
|
349
|
+
function d(S, R, P, M, T, O) {
|
|
350
|
+
var A = S[R], W = H(A);
|
|
351
351
|
if (W !== s) {
|
|
352
|
-
var
|
|
352
|
+
var D = X(A);
|
|
353
353
|
return new y(
|
|
354
|
-
"Invalid " +
|
|
354
|
+
"Invalid " + M + " `" + T + "` of type " + ("`" + D + "` supplied to `" + P + "`, expected ") + ("`" + s + "`."),
|
|
355
355
|
{ expectedType: s }
|
|
356
356
|
);
|
|
357
357
|
}
|
|
358
358
|
return null;
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return C(d);
|
|
361
361
|
}
|
|
362
362
|
function q() {
|
|
363
|
-
return
|
|
363
|
+
return C(u);
|
|
364
364
|
}
|
|
365
365
|
function $(s) {
|
|
366
|
-
function d(
|
|
366
|
+
function d(S, R, P, M, T) {
|
|
367
367
|
if (typeof s != "function")
|
|
368
|
-
return new y("Property `" + T + "` of component `" +
|
|
369
|
-
var
|
|
370
|
-
if (!Array.isArray(
|
|
371
|
-
var
|
|
372
|
-
return new y("Invalid " +
|
|
368
|
+
return new y("Property `" + T + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
|
|
369
|
+
var O = S[R];
|
|
370
|
+
if (!Array.isArray(O)) {
|
|
371
|
+
var A = H(O);
|
|
372
|
+
return new y("Invalid " + M + " `" + T + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected an array."));
|
|
373
373
|
}
|
|
374
|
-
for (var W = 0; W <
|
|
375
|
-
var
|
|
376
|
-
if (
|
|
377
|
-
return
|
|
374
|
+
for (var W = 0; W < O.length; W++) {
|
|
375
|
+
var D = s(O, W, P, M, T + "[" + W + "]", r);
|
|
376
|
+
if (D instanceof Error)
|
|
377
|
+
return D;
|
|
378
378
|
}
|
|
379
379
|
return null;
|
|
380
380
|
}
|
|
381
|
-
return
|
|
381
|
+
return C(d);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
function s(d,
|
|
385
|
-
var T = d[
|
|
383
|
+
function k() {
|
|
384
|
+
function s(d, S, R, P, M) {
|
|
385
|
+
var T = d[S];
|
|
386
386
|
if (!i(T)) {
|
|
387
|
-
var
|
|
388
|
-
return new y("Invalid " +
|
|
387
|
+
var O = H(T);
|
|
388
|
+
return new y("Invalid " + P + " `" + M + "` of type " + ("`" + O + "` supplied to `" + R + "`, expected a single ReactElement."));
|
|
389
389
|
}
|
|
390
390
|
return null;
|
|
391
391
|
}
|
|
392
|
-
return
|
|
392
|
+
return C(s);
|
|
393
393
|
}
|
|
394
394
|
function f() {
|
|
395
|
-
function s(d,
|
|
396
|
-
var T = d[
|
|
395
|
+
function s(d, S, R, P, M) {
|
|
396
|
+
var T = d[S];
|
|
397
397
|
if (!e.isValidElementType(T)) {
|
|
398
|
-
var
|
|
399
|
-
return new y("Invalid " +
|
|
398
|
+
var O = H(T);
|
|
399
|
+
return new y("Invalid " + P + " `" + M + "` of type " + ("`" + O + "` supplied to `" + R + "`, expected a single ReactElement type."));
|
|
400
400
|
}
|
|
401
401
|
return null;
|
|
402
402
|
}
|
|
403
|
-
return
|
|
403
|
+
return C(s);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
function d(
|
|
407
|
-
if (!(
|
|
408
|
-
var
|
|
409
|
-
return new y("Invalid " +
|
|
405
|
+
function Z(s) {
|
|
406
|
+
function d(S, R, P, M, T) {
|
|
407
|
+
if (!(S[R] instanceof s)) {
|
|
408
|
+
var O = s.name || m, A = J(S[R]);
|
|
409
|
+
return new y("Invalid " + M + " `" + T + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected ") + ("instance of `" + O + "`."));
|
|
410
410
|
}
|
|
411
411
|
return null;
|
|
412
412
|
}
|
|
413
|
-
return
|
|
413
|
+
return C(d);
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function te(s) {
|
|
416
416
|
if (!Array.isArray(s))
|
|
417
417
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
418
418
|
"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])."
|
|
419
419
|
) : o("Invalid argument supplied to oneOf, expected an array.")), u;
|
|
420
|
-
function d(
|
|
421
|
-
for (var
|
|
422
|
-
if (b(
|
|
420
|
+
function d(S, R, P, M, T) {
|
|
421
|
+
for (var O = S[R], A = 0; A < s.length; A++)
|
|
422
|
+
if (b(O, s[A]))
|
|
423
423
|
return null;
|
|
424
|
-
var W = JSON.stringify(s, function(
|
|
425
|
-
var
|
|
426
|
-
return
|
|
424
|
+
var W = JSON.stringify(s, function(Y, h) {
|
|
425
|
+
var G = X(h);
|
|
426
|
+
return G === "symbol" ? String(h) : h;
|
|
427
427
|
});
|
|
428
|
-
return new y("Invalid " +
|
|
428
|
+
return new y("Invalid " + M + " `" + T + "` of value `" + String(O) + "` " + ("supplied to `" + P + "`, expected one of " + W + "."));
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return C(d);
|
|
431
431
|
}
|
|
432
|
-
function
|
|
433
|
-
function d(
|
|
432
|
+
function N(s) {
|
|
433
|
+
function d(S, R, P, M, T) {
|
|
434
434
|
if (typeof s != "function")
|
|
435
|
-
return new y("Property `" + T + "` of component `" +
|
|
436
|
-
var
|
|
437
|
-
if (
|
|
438
|
-
return new y("Invalid " +
|
|
439
|
-
for (var W in
|
|
440
|
-
if (t(
|
|
441
|
-
var
|
|
442
|
-
if (
|
|
443
|
-
return
|
|
435
|
+
return new y("Property `" + T + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
|
|
436
|
+
var O = S[R], A = H(O);
|
|
437
|
+
if (A !== "object")
|
|
438
|
+
return new y("Invalid " + M + " `" + T + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected an object."));
|
|
439
|
+
for (var W in O)
|
|
440
|
+
if (t(O, W)) {
|
|
441
|
+
var D = s(O, W, P, M, T + "." + W, r);
|
|
442
|
+
if (D instanceof Error)
|
|
443
|
+
return D;
|
|
444
444
|
}
|
|
445
445
|
return null;
|
|
446
446
|
}
|
|
447
|
-
return
|
|
447
|
+
return C(d);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function E(s) {
|
|
450
450
|
if (!Array.isArray(s))
|
|
451
451
|
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), u;
|
|
452
452
|
for (var d = 0; d < s.length; d++) {
|
|
453
|
-
var
|
|
454
|
-
if (typeof
|
|
453
|
+
var S = s[d];
|
|
454
|
+
if (typeof S != "function")
|
|
455
455
|
return o(
|
|
456
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + U(
|
|
456
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + U(S) + " at index " + d + "."
|
|
457
457
|
), u;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
for (var W = [],
|
|
461
|
-
var
|
|
459
|
+
function R(P, M, T, O, A) {
|
|
460
|
+
for (var W = [], D = 0; D < s.length; D++) {
|
|
461
|
+
var Y = s[D], h = Y(P, M, T, O, A, r);
|
|
462
462
|
if (h == null)
|
|
463
463
|
return null;
|
|
464
464
|
h.data && t(h.data, "expectedType") && W.push(h.data.expectedType);
|
|
465
465
|
}
|
|
466
|
-
var
|
|
467
|
-
return new y("Invalid " +
|
|
466
|
+
var G = W.length > 0 ? ", expected one of type [" + W.join(", ") + "]" : "";
|
|
467
|
+
return new y("Invalid " + O + " `" + A + "` supplied to " + ("`" + T + "`" + G + "."));
|
|
468
468
|
}
|
|
469
|
-
return
|
|
469
|
+
return C(R);
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
function s(d,
|
|
473
|
-
return
|
|
471
|
+
function w() {
|
|
472
|
+
function s(d, S, R, P, M) {
|
|
473
|
+
return K(d[S]) ? null : new y("Invalid " + P + " `" + M + "` supplied to " + ("`" + R + "`, expected a ReactNode."));
|
|
474
474
|
}
|
|
475
|
-
return
|
|
475
|
+
return C(s);
|
|
476
476
|
}
|
|
477
|
-
function B(s, d,
|
|
477
|
+
function B(s, d, S, R, P) {
|
|
478
478
|
return new y(
|
|
479
|
-
(s || "React class") + ": " + d + " type `" +
|
|
479
|
+
(s || "React class") + ": " + d + " type `" + S + "." + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
482
|
function F(s) {
|
|
483
|
-
function d(
|
|
484
|
-
var
|
|
485
|
-
if (
|
|
486
|
-
return new y("Invalid " +
|
|
483
|
+
function d(S, R, P, M, T) {
|
|
484
|
+
var O = S[R], A = H(O);
|
|
485
|
+
if (A !== "object")
|
|
486
|
+
return new y("Invalid " + M + " `" + T + "` of type `" + A + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
487
487
|
for (var W in s) {
|
|
488
|
-
var
|
|
489
|
-
if (typeof
|
|
490
|
-
return B(
|
|
491
|
-
var
|
|
492
|
-
if (
|
|
493
|
-
return
|
|
488
|
+
var D = s[W];
|
|
489
|
+
if (typeof D != "function")
|
|
490
|
+
return B(P, M, T, W, X(D));
|
|
491
|
+
var Y = D(O, W, P, M, T + "." + W, r);
|
|
492
|
+
if (Y)
|
|
493
|
+
return Y;
|
|
494
494
|
}
|
|
495
495
|
return null;
|
|
496
496
|
}
|
|
497
|
-
return
|
|
497
|
+
return C(d);
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
function d(
|
|
501
|
-
var
|
|
502
|
-
if (
|
|
503
|
-
return new y("Invalid " +
|
|
504
|
-
var W = a({},
|
|
505
|
-
for (var
|
|
506
|
-
var
|
|
507
|
-
if (t(s,
|
|
508
|
-
return B(
|
|
509
|
-
if (!
|
|
499
|
+
function _(s) {
|
|
500
|
+
function d(S, R, P, M, T) {
|
|
501
|
+
var O = S[R], A = H(O);
|
|
502
|
+
if (A !== "object")
|
|
503
|
+
return new y("Invalid " + M + " `" + T + "` of type `" + A + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
504
|
+
var W = a({}, S[R], s);
|
|
505
|
+
for (var D in W) {
|
|
506
|
+
var Y = s[D];
|
|
507
|
+
if (t(s, D) && typeof Y != "function")
|
|
508
|
+
return B(P, M, T, D, X(Y));
|
|
509
|
+
if (!Y)
|
|
510
510
|
return new y(
|
|
511
|
-
"Invalid " +
|
|
511
|
+
"Invalid " + M + " `" + T + "` key `" + D + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(S[R], null, " ") + `
|
|
512
512
|
Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
513
513
|
);
|
|
514
|
-
var h =
|
|
514
|
+
var h = Y(O, D, P, M, T + "." + D, r);
|
|
515
515
|
if (h)
|
|
516
516
|
return h;
|
|
517
517
|
}
|
|
518
518
|
return null;
|
|
519
519
|
}
|
|
520
|
-
return
|
|
520
|
+
return C(d);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function K(s) {
|
|
523
523
|
switch (typeof s) {
|
|
524
524
|
case "number":
|
|
525
525
|
case "string":
|
|
@@ -529,20 +529,20 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
529
529
|
return !s;
|
|
530
530
|
case "object":
|
|
531
531
|
if (Array.isArray(s))
|
|
532
|
-
return s.every(
|
|
532
|
+
return s.every(K);
|
|
533
533
|
if (s === null || i(s))
|
|
534
534
|
return !0;
|
|
535
535
|
var d = v(s);
|
|
536
536
|
if (d) {
|
|
537
|
-
var
|
|
537
|
+
var S = d.call(s), R;
|
|
538
538
|
if (d !== s.entries) {
|
|
539
|
-
for (; !(
|
|
540
|
-
if (!
|
|
539
|
+
for (; !(R = S.next()).done; )
|
|
540
|
+
if (!K(R.value))
|
|
541
541
|
return !1;
|
|
542
542
|
} else
|
|
543
|
-
for (; !(
|
|
544
|
-
var
|
|
545
|
-
if (
|
|
543
|
+
for (; !(R = S.next()).done; ) {
|
|
544
|
+
var P = R.value;
|
|
545
|
+
if (P && !K(P[1]))
|
|
546
546
|
return !1;
|
|
547
547
|
}
|
|
548
548
|
} else
|
|
@@ -555,14 +555,14 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
555
555
|
function ae(s, d) {
|
|
556
556
|
return s === "symbol" ? !0 : d ? d["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && d instanceof Symbol : !1;
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function H(s) {
|
|
559
559
|
var d = typeof s;
|
|
560
560
|
return Array.isArray(s) ? "array" : s instanceof RegExp ? "object" : ae(d, s) ? "symbol" : d;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function X(s) {
|
|
563
563
|
if (typeof s > "u" || s === null)
|
|
564
564
|
return "" + s;
|
|
565
|
-
var d =
|
|
565
|
+
var d = H(s);
|
|
566
566
|
if (d === "object") {
|
|
567
567
|
if (s instanceof Date)
|
|
568
568
|
return "date";
|
|
@@ -572,7 +572,7 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
572
572
|
return d;
|
|
573
573
|
}
|
|
574
574
|
function U(s) {
|
|
575
|
-
var d =
|
|
575
|
+
var d = X(s);
|
|
576
576
|
switch (d) {
|
|
577
577
|
case "array":
|
|
578
578
|
case "object":
|
|
@@ -585,7 +585,7 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
585
585
|
return d;
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function J(s) {
|
|
589
589
|
return !s.constructor || !s.constructor.name ? m : s.constructor.name;
|
|
590
590
|
}
|
|
591
591
|
return x.checkPropTypes = n, x.resetWarningCache = n.resetWarningCache, x.PropTypes = x, x;
|
|
@@ -798,10 +798,10 @@ L.prototype._addPoint = function(e) {
|
|
|
798
798
|
return {};
|
|
799
799
|
};
|
|
800
800
|
L.prototype._calculateCurveControlPoints = function(e, a, r) {
|
|
801
|
-
var t = e.x - a.x, n = e.y - a.y, o = a.x - r.x, u = a.y - r.y, i = { x: (e.x + a.x) / 2, y: (e.y + a.y) / 2 }, p = { x: (a.x + r.x) / 2, y: (a.y + r.y) / 2 }, c = Math.sqrt(t * t + n * n), l = Math.sqrt(o * o + u * u), v = i.x - p.x, m = i.y - p.y, x = l / (c + l), b = { x: p.x + v * x, y: p.y + m * x }, y = a.x - b.x,
|
|
801
|
+
var t = e.x - a.x, n = e.y - a.y, o = a.x - r.x, u = a.y - r.y, i = { x: (e.x + a.x) / 2, y: (e.y + a.y) / 2 }, p = { x: (a.x + r.x) / 2, y: (a.y + r.y) / 2 }, c = Math.sqrt(t * t + n * n), l = Math.sqrt(o * o + u * u), v = i.x - p.x, m = i.y - p.y, x = l / (c + l), b = { x: p.x + v * x, y: p.y + m * x }, y = a.x - b.x, C = a.y - b.y;
|
|
802
802
|
return {
|
|
803
|
-
c1: new ne(i.x + y, i.y +
|
|
804
|
-
c2: new ne(p.x + y, p.y +
|
|
803
|
+
c1: new ne(i.x + y, i.y + C),
|
|
804
|
+
c2: new ne(p.x + y, p.y + C)
|
|
805
805
|
};
|
|
806
806
|
};
|
|
807
807
|
L.prototype._calculateCurveWidths = function(e) {
|
|
@@ -854,15 +854,15 @@ L.prototype._fromData = function(e, a, r) {
|
|
|
854
854
|
};
|
|
855
855
|
L.prototype._toSVG = function() {
|
|
856
856
|
var e = this, a = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), n = 0, o = 0, u = r.width / t, i = r.height / t, p = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
857
|
-
p.setAttributeNS(null, "width", r.width), p.setAttributeNS(null, "height", r.height), this._fromData(a, function(
|
|
858
|
-
var
|
|
859
|
-
if (!isNaN(
|
|
860
|
-
var f = "M " +
|
|
861
|
-
|
|
857
|
+
p.setAttributeNS(null, "width", r.width), p.setAttributeNS(null, "height", r.height), this._fromData(a, function(g, q, $) {
|
|
858
|
+
var k = document.createElement("path");
|
|
859
|
+
if (!isNaN(g.control1.x) && !isNaN(g.control1.y) && !isNaN(g.control2.x) && !isNaN(g.control2.y)) {
|
|
860
|
+
var f = "M " + g.startPoint.x.toFixed(3) + "," + g.startPoint.y.toFixed(3) + " " + ("C " + g.control1.x.toFixed(3) + "," + g.control1.y.toFixed(3) + " ") + (g.control2.x.toFixed(3) + "," + g.control2.y.toFixed(3) + " ") + (g.endPoint.x.toFixed(3) + "," + g.endPoint.y.toFixed(3));
|
|
861
|
+
k.setAttribute("d", f), k.setAttribute("stroke-width", (q.end * 2.25).toFixed(3)), k.setAttribute("stroke", $), k.setAttribute("fill", "none"), k.setAttribute("stroke-linecap", "round"), p.appendChild(k);
|
|
862
862
|
}
|
|
863
|
-
}, function(
|
|
863
|
+
}, function(g) {
|
|
864
864
|
var q = document.createElement("circle"), $ = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
|
|
865
|
-
q.setAttribute("r", $), q.setAttribute("cx",
|
|
865
|
+
q.setAttribute("r", $), q.setAttribute("cx", g.x), q.setAttribute("cy", g.y), q.setAttribute("fill", g.color), p.appendChild(q);
|
|
866
866
|
});
|
|
867
867
|
var c = "data:image/svg+xml;base64,", l = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + n + " " + o + " " + u + " " + i + '"') + (' width="' + u + '"') + (' height="' + i + '"') + ">", v = p.innerHTML;
|
|
868
868
|
if (v === void 0) {
|
|
@@ -872,8 +872,8 @@ L.prototype._toSVG = function() {
|
|
|
872
872
|
m.appendChild(x[b].cloneNode(!0));
|
|
873
873
|
v = m.innerHTML;
|
|
874
874
|
}
|
|
875
|
-
var y = "</svg>",
|
|
876
|
-
return c + btoa(
|
|
875
|
+
var y = "</svg>", C = l + v + y;
|
|
876
|
+
return c + btoa(C);
|
|
877
877
|
};
|
|
878
878
|
L.prototype.fromData = function(e) {
|
|
879
879
|
var a = this;
|
|
@@ -906,8 +906,8 @@ function at() {
|
|
|
906
906
|
return t.m = r, t.c = n, t.p = "", t(0);
|
|
907
907
|
})([function(r, t) {
|
|
908
908
|
function n(c) {
|
|
909
|
-
var l = c.getContext("2d"), v = c.width, m = c.height, x = l.getImageData(0, 0, v, m).data, b = i(!0, v, m, x), y = i(!1, v, m, x),
|
|
910
|
-
return c.width = q, c.height = $, l.clearRect(0, 0, q, $), l.putImageData(
|
|
909
|
+
var l = c.getContext("2d"), v = c.width, m = c.height, x = l.getImageData(0, 0, v, m).data, b = i(!0, v, m, x), y = i(!1, v, m, x), C = p(!0, v, m, x), g = p(!1, v, m, x), q = g - C + 1, $ = y - b + 1, k = l.getImageData(C, b, q, $);
|
|
910
|
+
return c.width = q, c.height = $, l.clearRect(0, 0, q, $), l.putImageData(k, 0, 0), c;
|
|
911
911
|
}
|
|
912
912
|
function o(c, l, v, m) {
|
|
913
913
|
return { red: m[4 * (v * l + c)], green: m[4 * (v * l + c) + 1], blue: m[4 * (v * l + c) + 2], alpha: m[4 * (v * l + c) + 3] };
|
|
@@ -916,11 +916,11 @@ function at() {
|
|
|
916
916
|
return o(c, l, v, m).alpha;
|
|
917
917
|
}
|
|
918
918
|
function i(c, l, v, m) {
|
|
919
|
-
for (var x = c ? 1 : -1, b = c ? 0 : v - 1, y = b; c ? y < v : y > -1; y += x) for (var
|
|
919
|
+
for (var x = c ? 1 : -1, b = c ? 0 : v - 1, y = b; c ? y < v : y > -1; y += x) for (var C = 0; C < l; C++) if (u(C, y, l, m)) return y;
|
|
920
920
|
return null;
|
|
921
921
|
}
|
|
922
922
|
function p(c, l, v, m) {
|
|
923
|
-
for (var x = c ? 1 : -1, b = c ? 0 : l - 1, y = b; c ? y < l : y > -1; y += x) for (var
|
|
923
|
+
for (var x = c ? 1 : -1, b = c ? 0 : l - 1, y = b; c ? y < l : y > -1; y += x) for (var C = 0; C < v; C++) if (u(y, C, l, m)) return y;
|
|
924
924
|
return null;
|
|
925
925
|
}
|
|
926
926
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.default = n;
|
|
@@ -943,84 +943,84 @@ function it() {
|
|
|
943
943
|
var p = {};
|
|
944
944
|
return i.m = u, i.c = p, i.p = "", i(0);
|
|
945
945
|
})([function(u, i, p) {
|
|
946
|
-
function c(
|
|
947
|
-
return
|
|
946
|
+
function c(E) {
|
|
947
|
+
return E && E.__esModule ? E : { default: E };
|
|
948
948
|
}
|
|
949
|
-
function l(
|
|
949
|
+
function l(E, w) {
|
|
950
950
|
var B = {};
|
|
951
|
-
for (var F in
|
|
951
|
+
for (var F in E) w.indexOf(F) >= 0 || Object.prototype.hasOwnProperty.call(E, F) && (B[F] = E[F]);
|
|
952
952
|
return B;
|
|
953
953
|
}
|
|
954
|
-
function v(
|
|
955
|
-
if (!(
|
|
954
|
+
function v(E, w) {
|
|
955
|
+
if (!(E instanceof w)) throw new TypeError("Cannot call a class as a function");
|
|
956
956
|
}
|
|
957
|
-
function m(
|
|
958
|
-
if (!
|
|
959
|
-
return !
|
|
957
|
+
function m(E, w) {
|
|
958
|
+
if (!E) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
959
|
+
return !w || typeof w != "object" && typeof w != "function" ? E : w;
|
|
960
960
|
}
|
|
961
|
-
function x(
|
|
962
|
-
if (typeof
|
|
963
|
-
|
|
961
|
+
function x(E, w) {
|
|
962
|
+
if (typeof w != "function" && w !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof w);
|
|
963
|
+
E.prototype = Object.create(w && w.prototype, { constructor: { value: E, enumerable: !1, writable: !0, configurable: !0 } }), w && (Object.setPrototypeOf ? Object.setPrototypeOf(E, w) : E.__proto__ = w);
|
|
964
964
|
}
|
|
965
965
|
Object.defineProperty(i, "__esModule", { value: !0 });
|
|
966
|
-
var b = Object.assign || function(
|
|
967
|
-
for (var
|
|
968
|
-
var B = arguments[
|
|
969
|
-
for (var F in B) Object.prototype.hasOwnProperty.call(B, F) && (
|
|
966
|
+
var b = Object.assign || function(E) {
|
|
967
|
+
for (var w = 1; w < arguments.length; w++) {
|
|
968
|
+
var B = arguments[w];
|
|
969
|
+
for (var F in B) Object.prototype.hasOwnProperty.call(B, F) && (E[F] = B[F]);
|
|
970
970
|
}
|
|
971
|
-
return
|
|
971
|
+
return E;
|
|
972
972
|
}, y = /* @__PURE__ */ (function() {
|
|
973
|
-
function
|
|
973
|
+
function E(w, B) {
|
|
974
974
|
for (var F = 0; F < B.length; F++) {
|
|
975
|
-
var
|
|
976
|
-
|
|
975
|
+
var _ = B[F];
|
|
976
|
+
_.enumerable = _.enumerable || !1, _.configurable = !0, "value" in _ && (_.writable = !0), Object.defineProperty(w, _.key, _);
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
return function(
|
|
980
|
-
return B &&
|
|
979
|
+
return function(w, B, F) {
|
|
980
|
+
return B && E(w.prototype, B), F && E(w, F), w;
|
|
981
981
|
};
|
|
982
|
-
})(),
|
|
983
|
-
function
|
|
984
|
-
var B, F,
|
|
985
|
-
v(this,
|
|
986
|
-
for (var ae = arguments.length,
|
|
987
|
-
return F =
|
|
988
|
-
var U =
|
|
989
|
-
return
|
|
990
|
-
},
|
|
991
|
-
return
|
|
992
|
-
},
|
|
982
|
+
})(), C = p(1), g = c(C), q = p(2), $ = c(q), k = p(3), f = c(k), Z = p(4), te = c(Z), N = (function(E) {
|
|
983
|
+
function w() {
|
|
984
|
+
var B, F, _, K;
|
|
985
|
+
v(this, w);
|
|
986
|
+
for (var ae = arguments.length, H = Array(ae), X = 0; X < ae; X++) H[X] = arguments[X];
|
|
987
|
+
return F = _ = m(this, (B = w.__proto__ || Object.getPrototypeOf(w)).call.apply(B, [this].concat(H))), _._sigPad = null, _._excludeOurProps = function() {
|
|
988
|
+
var U = _.props, J = (U.canvasProps, U.clearOnResize, l(U, ["canvasProps", "clearOnResize"]));
|
|
989
|
+
return J;
|
|
990
|
+
}, _.getCanvas = function() {
|
|
991
|
+
return _._canvas;
|
|
992
|
+
}, _.getTrimmedCanvas = function() {
|
|
993
993
|
var U = document.createElement("canvas");
|
|
994
|
-
return U.width =
|
|
995
|
-
},
|
|
996
|
-
return
|
|
997
|
-
},
|
|
998
|
-
|
|
999
|
-
},
|
|
1000
|
-
var U =
|
|
1001
|
-
if (!
|
|
1002
|
-
var d =
|
|
1003
|
-
|
|
994
|
+
return U.width = _._canvas.width, U.height = _._canvas.height, U.getContext("2d").drawImage(_._canvas, 0, 0), (0, te.default)(U);
|
|
995
|
+
}, _.getSignaturePad = function() {
|
|
996
|
+
return _._sigPad;
|
|
997
|
+
}, _._checkClearOnResize = function() {
|
|
998
|
+
_.props.clearOnResize && _._resizeCanvas();
|
|
999
|
+
}, _._resizeCanvas = function() {
|
|
1000
|
+
var U = _.props.canvasProps || {}, J = U.width, s = U.height;
|
|
1001
|
+
if (!J || !s) {
|
|
1002
|
+
var d = _._canvas, S = Math.max(window.devicePixelRatio || 1, 1);
|
|
1003
|
+
J || (d.width = d.offsetWidth * S), s || (d.height = d.offsetHeight * S), d.getContext("2d").scale(S, S), _.clear();
|
|
1004
1004
|
}
|
|
1005
|
-
},
|
|
1006
|
-
return window.addEventListener("resize",
|
|
1007
|
-
},
|
|
1008
|
-
return window.removeEventListener("resize",
|
|
1009
|
-
},
|
|
1010
|
-
return
|
|
1011
|
-
},
|
|
1012
|
-
return
|
|
1013
|
-
},
|
|
1014
|
-
return
|
|
1015
|
-
},
|
|
1016
|
-
return
|
|
1017
|
-
},
|
|
1018
|
-
return
|
|
1019
|
-
},
|
|
1020
|
-
return
|
|
1021
|
-
},
|
|
1005
|
+
}, _.on = function() {
|
|
1006
|
+
return window.addEventListener("resize", _._checkClearOnResize), _._sigPad.on();
|
|
1007
|
+
}, _.off = function() {
|
|
1008
|
+
return window.removeEventListener("resize", _._checkClearOnResize), _._sigPad.off();
|
|
1009
|
+
}, _.clear = function() {
|
|
1010
|
+
return _._sigPad.clear();
|
|
1011
|
+
}, _.isEmpty = function() {
|
|
1012
|
+
return _._sigPad.isEmpty();
|
|
1013
|
+
}, _.fromDataURL = function(U, J) {
|
|
1014
|
+
return _._sigPad.fromDataURL(U, J);
|
|
1015
|
+
}, _.toDataURL = function(U, J) {
|
|
1016
|
+
return _._sigPad.toDataURL(U, J);
|
|
1017
|
+
}, _.fromData = function(U) {
|
|
1018
|
+
return _._sigPad.fromData(U);
|
|
1019
|
+
}, _.toData = function() {
|
|
1020
|
+
return _._sigPad.toData();
|
|
1021
|
+
}, K = F, m(_, K);
|
|
1022
1022
|
}
|
|
1023
|
-
return x(
|
|
1023
|
+
return x(w, E), y(w, [{ key: "componentDidMount", value: function() {
|
|
1024
1024
|
this._sigPad = new f.default(this._canvas, this._excludeOurProps()), this._resizeCanvas(), this.on();
|
|
1025
1025
|
} }, { key: "componentWillUnmount", value: function() {
|
|
1026
1026
|
this.off();
|
|
@@ -1028,12 +1028,12 @@ function it() {
|
|
|
1028
1028
|
Object.assign(this._sigPad, this._excludeOurProps());
|
|
1029
1029
|
} }, { key: "render", value: function() {
|
|
1030
1030
|
var B = this, F = this.props.canvasProps;
|
|
1031
|
-
return $.default.createElement("canvas", b({ ref: function(
|
|
1032
|
-
B._canvas =
|
|
1031
|
+
return $.default.createElement("canvas", b({ ref: function(_) {
|
|
1032
|
+
B._canvas = _;
|
|
1033
1033
|
} }, F));
|
|
1034
|
-
} }]),
|
|
1034
|
+
} }]), w;
|
|
1035
1035
|
})(q.Component);
|
|
1036
|
-
|
|
1036
|
+
N.propTypes = { velocityFilterWeight: g.default.number, minWidth: g.default.number, maxWidth: g.default.number, minDistance: g.default.number, dotSize: g.default.oneOfType([g.default.number, g.default.func]), penColor: g.default.string, throttle: g.default.number, onEnd: g.default.func, onBegin: g.default.func, canvasProps: g.default.object, clearOnResize: g.default.bool }, N.defaultProps = { clearOnResize: !0 }, i.default = N;
|
|
1037
1037
|
}, function(u, i) {
|
|
1038
1038
|
u.exports = r;
|
|
1039
1039
|
}, function(u, i) {
|
|
@@ -1047,7 +1047,7 @@ function it() {
|
|
|
1047
1047
|
})(le)), le.exports;
|
|
1048
1048
|
}
|
|
1049
1049
|
var st = it();
|
|
1050
|
-
const ut = /* @__PURE__ */ Be(st), ct = "_Signature_mhdg5_1", lt = "_SignatureMain_mhdg5_5", ft = "_SignatureMainAuto_mhdg5_15", dt = "_SignatureMainManual_mhdg5_19", ht = "_SignatureHeader_mhdg5_26", pt = "_SignatureHeaderReset_mhdg5_34", vt = "_SignatureManualPanel_mhdg5_41", yt = "_SignatureManualPanelPlaceholder_mhdg5_48", mt = "_SignatureManualPanelButton_mhdg5_52", gt = "_SignatureAutoPanelImage_mhdg5_67", _t = "_SignatureAutoPanelLoader_mhdg5_72", xt = "_SignatureAutoPanelNoteIcon_mhdg5_77", bt = "_SignatureAutoPanelButton_mhdg5_81",
|
|
1050
|
+
const ut = /* @__PURE__ */ Be(st), ct = "_Signature_mhdg5_1", lt = "_SignatureMain_mhdg5_5", ft = "_SignatureMainAuto_mhdg5_15", dt = "_SignatureMainManual_mhdg5_19", ht = "_SignatureHeader_mhdg5_26", pt = "_SignatureHeaderReset_mhdg5_34", vt = "_SignatureManualPanel_mhdg5_41", yt = "_SignatureManualPanelPlaceholder_mhdg5_48", mt = "_SignatureManualPanelButton_mhdg5_52", gt = "_SignatureAutoPanelImage_mhdg5_67", _t = "_SignatureAutoPanelLoader_mhdg5_72", xt = "_SignatureAutoPanelNoteIcon_mhdg5_77", bt = "_SignatureAutoPanelButton_mhdg5_81", V = {
|
|
1051
1051
|
Signature: ct,
|
|
1052
1052
|
SignatureMain: lt,
|
|
1053
1053
|
SignatureMainAuto: ft,
|
|
@@ -1062,60 +1062,60 @@ const ut = /* @__PURE__ */ Be(st), ct = "_Signature_mhdg5_1", lt = "_SignatureMa
|
|
|
1062
1062
|
SignatureAutoPanelNoteIcon: xt,
|
|
1063
1063
|
SignatureAutoPanelButton: bt
|
|
1064
1064
|
}, kt = (e) => {
|
|
1065
|
-
const { modes: a, isInAutoMode: r, valueAuto: t, valueManual: n, onUpdateAuto: o, onUpdateManual: u, onChange: i, className: p = "" } = e, c = Fe(null), [l, v] = Se(null), [m, x] = Se("auto-generated"), { width: b = 0, height: y = 0 } = Ue({ ref: c, box: "border-box" }),
|
|
1065
|
+
const { modes: a, isInAutoMode: r, valueAuto: t, valueManual: n, onUpdateAuto: o, onUpdateManual: u, onChange: i, className: p = "" } = e, c = Fe(null), [l, v] = Se(null), [m, x] = Se("auto-generated"), { width: b = 0, height: y = 0 } = Ue({ ref: c, box: "border-box" }), C = r ? "auto-generated" : m === "manual-drawn" ? "manual-drawn" : n ? "manual-stored" : "manual-blank", g = re(() => {
|
|
1066
1066
|
l && b && y && n && l.fromDataURL(n, {
|
|
1067
1067
|
width: +b.toFixed(),
|
|
1068
1068
|
height: +y.toFixed()
|
|
1069
1069
|
});
|
|
1070
|
-
}, [l, b, y, n]),
|
|
1070
|
+
}, [l, b, y, n]), q = re(() => {
|
|
1071
1071
|
if (l) {
|
|
1072
|
-
const
|
|
1073
|
-
x("manual-drawn"), u(
|
|
1072
|
+
const E = l.getCanvas().toDataURL("image/png");
|
|
1073
|
+
x("manual-drawn"), u(E), i(E);
|
|
1074
1074
|
}
|
|
1075
|
-
}, [l, i, u]), q = re(() => {
|
|
1076
|
-
l && (l.clear(), u(""), i(""));
|
|
1077
1075
|
}, [l, i, u]), $ = re(() => {
|
|
1076
|
+
l && (l.clear(), u(""), i(""));
|
|
1077
|
+
}, [l, i, u]), k = re(() => {
|
|
1078
1078
|
o(!0), x("auto-generated"), t && i(t);
|
|
1079
|
-
}, [o, t, i]),
|
|
1080
|
-
o(!1), x(n ? "manual-stored" : "manual-blank"), n ? (i(n), setTimeout(
|
|
1081
|
-
}, [o, n, i,
|
|
1079
|
+
}, [o, t, i]), f = re(() => {
|
|
1080
|
+
o(!1), x(n ? "manual-stored" : "manual-blank"), n ? (i(n), setTimeout(g, 0)) : i("");
|
|
1081
|
+
}, [o, n, i, g]), Z = re(() => {
|
|
1082
1082
|
o(!1), x("manual-blank"), u(""), i("");
|
|
1083
|
-
}, [o, u, i]),
|
|
1084
|
-
x("manual-stored"),
|
|
1085
|
-
}, [
|
|
1083
|
+
}, [o, u, i]), te = re(() => {
|
|
1084
|
+
x("manual-stored"), g();
|
|
1085
|
+
}, [g]), N = (E) => E.includes(C);
|
|
1086
1086
|
return de(() => {
|
|
1087
1087
|
!a.includes("auto") && r && o(!1);
|
|
1088
1088
|
}, [a, r, o]), de(() => {
|
|
1089
|
-
!r && n && b && y &&
|
|
1090
|
-
}, [r, n, b, y,
|
|
1089
|
+
!r && n && b && y && g();
|
|
1090
|
+
}, [r, n, b, y, g]), de(() => {
|
|
1091
1091
|
r && t ? i(t) : !r && !n && i("");
|
|
1092
|
-
}, [r, t, n, i]), /* @__PURE__ */
|
|
1093
|
-
/* @__PURE__ */
|
|
1092
|
+
}, [r, t, n, i]), /* @__PURE__ */ Q("div", { className: Pe(V.Signature, p), children: [
|
|
1093
|
+
/* @__PURE__ */ Q(
|
|
1094
1094
|
"div",
|
|
1095
1095
|
{
|
|
1096
1096
|
className: Pe(
|
|
1097
|
-
|
|
1098
|
-
N(["auto-generated"]) ?
|
|
1097
|
+
V.SignatureMain,
|
|
1098
|
+
N(["auto-generated"]) ? V.SignatureMainAuto : V.SignatureMainManual
|
|
1099
1099
|
),
|
|
1100
1100
|
ref: c,
|
|
1101
1101
|
children: [
|
|
1102
|
-
/* @__PURE__ */
|
|
1103
|
-
/* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */ z(
|
|
1105
|
-
/* @__PURE__ */ z(
|
|
1102
|
+
/* @__PURE__ */ Q(ie, { direction: "row", justify: N(["manual-drawn"]) ? "end" : "center", className: V.SignatureHeader, children: [
|
|
1103
|
+
/* @__PURE__ */ Q(we.Tag, { tag: "h6", weight: "medium", size: "regular", color: "primary", align: "center", children: [
|
|
1104
|
+
/* @__PURE__ */ z(ee.FadeScale, { name: "generated-signature", condition: N(["auto-generated"]), children: "Wir haben eine digitale Signature Sie generiert." }),
|
|
1105
|
+
/* @__PURE__ */ z(ee.FadeScale, { flex: !0, name: "create-signature", condition: N(["manual-blank", "manual-stored"]), children: "Ihre Signatur:" })
|
|
1106
1106
|
] }),
|
|
1107
|
-
/* @__PURE__ */ z(
|
|
1107
|
+
/* @__PURE__ */ z(ee.FadeSlide, { flex: !0, name: "reset", direction: "rtl", condition: N(["manual-drawn"]), children: /* @__PURE__ */ z("div", { className: V.SignatureHeaderReset, children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, icon: /* @__PURE__ */ z(Ne, {}), onClick: $, children: "Neu starten" }) }) })
|
|
1108
1108
|
] }),
|
|
1109
|
-
/* @__PURE__ */ z(ie, { direction: "row", align: "end", justify: "center", children: N(["auto-generated"]) ? /* @__PURE__ */
|
|
1110
|
-
/* @__PURE__ */ z(
|
|
1111
|
-
/* @__PURE__ */ z(
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
/* @__PURE__ */ z(Ye, { size: 24, className:
|
|
1109
|
+
/* @__PURE__ */ z(ie, { direction: "row", align: "end", justify: "center", children: N(["auto-generated"]) ? /* @__PURE__ */ Q(ie, { direction: "column", align: "center", justify: "start", children: [
|
|
1110
|
+
/* @__PURE__ */ z(ee.FadeScale, { flex: !0, name: "signature", condition: t !== "", children: /* @__PURE__ */ z("img", { className: V.SignatureAutoPanelImage, src: t, alt: "signature" }) }),
|
|
1111
|
+
/* @__PURE__ */ z(ee.FadeScale, { flex: !0, name: "signature", condition: t === "", children: /* @__PURE__ */ z("div", { className: V.SignatureAutoPanelLoader, children: /* @__PURE__ */ z(He, { size: "sm", color: "primary" }) }) }),
|
|
1112
|
+
/* @__PURE__ */ Q(ie, { direction: "row", align: "center", justify: "center", gap: "xxs", mt: "xs", children: [
|
|
1113
|
+
/* @__PURE__ */ z(Ye, { size: 24, className: V.SignatureAutoPanelNoteIcon }),
|
|
1114
1114
|
/* @__PURE__ */ z(we.Tag, { weight: "regular", size: "small", color: "secondary", children: "Diese Unterschrift ist ausreichend" })
|
|
1115
1115
|
] }),
|
|
1116
|
-
/* @__PURE__ */ z(
|
|
1117
|
-
] }) : /* @__PURE__ */
|
|
1118
|
-
/* @__PURE__ */ z("div", { className:
|
|
1116
|
+
/* @__PURE__ */ z(ee.FadeScale, { flex: !0, name: "signature", condition: a.includes("manual"), children: /* @__PURE__ */ z("div", { className: V.SignatureAutoPanelButton, children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, onClick: f, children: "per Hand/Maus unterschreiben" }) }) })
|
|
1117
|
+
] }) : /* @__PURE__ */ Q("div", { className: V.SignatureManualPanel, children: [
|
|
1118
|
+
/* @__PURE__ */ z("div", { className: V.SignatureManualPanelPlaceholder }),
|
|
1119
1119
|
N(["manual-stored"]) ? /* @__PURE__ */ z("img", { width: b, height: y, alt: "signature", src: n }) : /* @__PURE__ */ z(
|
|
1120
1120
|
ut,
|
|
1121
1121
|
{
|
|
@@ -1125,27 +1125,27 @@ const ut = /* @__PURE__ */ Be(st), ct = "_Signature_mhdg5_1", lt = "_SignatureMa
|
|
|
1125
1125
|
maxWidth: 2.75,
|
|
1126
1126
|
throttle: 12,
|
|
1127
1127
|
canvasProps: { width: +(b || 0).toFixed(), height: +(y || 0).toFixed() },
|
|
1128
|
-
ref: (
|
|
1128
|
+
ref: (E) => v(E),
|
|
1129
1129
|
clearOnResize: !0,
|
|
1130
|
-
onEnd:
|
|
1130
|
+
onEnd: q
|
|
1131
1131
|
}
|
|
1132
1132
|
),
|
|
1133
1133
|
/* @__PURE__ */ z(
|
|
1134
|
-
|
|
1134
|
+
ee.FadeScale,
|
|
1135
1135
|
{
|
|
1136
1136
|
name: "to-generated",
|
|
1137
1137
|
condition: N(["manual-stored"]),
|
|
1138
|
-
className:
|
|
1139
|
-
children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, onClick:
|
|
1138
|
+
className: V.SignatureManualPanelButton,
|
|
1139
|
+
children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, onClick: Z, children: "Zurücksetzen" })
|
|
1140
1140
|
}
|
|
1141
1141
|
)
|
|
1142
1142
|
] }) })
|
|
1143
1143
|
]
|
|
1144
1144
|
}
|
|
1145
1145
|
),
|
|
1146
|
-
/* @__PURE__ */ z(
|
|
1147
|
-
a.includes("auto") ? /* @__PURE__ */ z(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "tertiary", onClick:
|
|
1148
|
-
/* @__PURE__ */ z(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "primary", disabled: !n, onClick:
|
|
1146
|
+
/* @__PURE__ */ z(ee.FadeScale, { name: "footer", condition: N(["manual-blank", "manual-drawn"]), children: /* @__PURE__ */ Q(ie, { direction: "row", align: "center", justify: "space-between", gap: "md", mt: "md", children: [
|
|
1147
|
+
a.includes("auto") ? /* @__PURE__ */ z(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "tertiary", onClick: k, children: "Abbrechen" }) : null,
|
|
1148
|
+
/* @__PURE__ */ z(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "primary", disabled: !n, onClick: te, children: "Speichern" })
|
|
1149
1149
|
] }) })
|
|
1150
1150
|
] });
|
|
1151
1151
|
};
|