@pawanr/shadcn-file-upload 0.1.0 → 0.1.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.
- package/README.md +5 -5
- package/dist/hooks/use-file-upload.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +192 -195
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as Q, jsxs as d0 } from "react/jsx-runtime";
|
|
2
|
-
import B2, { useMemo as w0, useRef as _0, useReducer as ze, useEffect as X0, useCallback as U, forwardRef as K2, useImperativeHandle as Ee, Fragment as je, createElement as
|
|
2
|
+
import B2, { useMemo as w0, useRef as _0, useReducer as ze, useEffect as X0, useCallback as U, forwardRef as K2, useImperativeHandle as Ee, Fragment as je, createElement as b2, useState as Q0 } from "react";
|
|
3
3
|
function Me(e) {
|
|
4
4
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5
5
|
}
|
|
6
|
-
var
|
|
6
|
+
var c2 = { exports: {} }, R0 = { exports: {} }, H = {};
|
|
7
7
|
/** @license React v16.13.1
|
|
8
8
|
* react-is.production.min.js
|
|
9
9
|
*
|
|
@@ -12,12 +12,12 @@ var p2 = { exports: {} }, R0 = { exports: {} }, H = {};
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
15
|
+
var w2;
|
|
16
16
|
function Ce() {
|
|
17
|
-
if (
|
|
18
|
-
|
|
17
|
+
if (w2) return H;
|
|
18
|
+
w2 = 1;
|
|
19
19
|
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, a = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, n = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, r = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, s = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, y = e ? Symbol.for("react.suspense_list") : 60120, A = e ? Symbol.for("react.memo") : 60115, T = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, S = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
20
|
-
function
|
|
20
|
+
function x(p) {
|
|
21
21
|
if (typeof p == "object" && p !== null) {
|
|
22
22
|
var Z = p.$$typeof;
|
|
23
23
|
switch (Z) {
|
|
@@ -47,36 +47,36 @@ function Ce() {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
50
|
+
function b(p) {
|
|
51
|
+
return x(p) === s;
|
|
52
52
|
}
|
|
53
53
|
return H.AsyncMode = f, H.ConcurrentMode = s, H.ContextConsumer = r, H.ContextProvider = l, H.Element = t, H.ForwardRef = d, H.Fragment = i, H.Lazy = T, H.Memo = A, H.Portal = a, H.Profiler = n, H.StrictMode = o, H.Suspense = h, H.isAsyncMode = function(p) {
|
|
54
|
-
return
|
|
55
|
-
}, H.isConcurrentMode =
|
|
56
|
-
return
|
|
54
|
+
return b(p) || x(p) === f;
|
|
55
|
+
}, H.isConcurrentMode = b, H.isContextConsumer = function(p) {
|
|
56
|
+
return x(p) === r;
|
|
57
57
|
}, H.isContextProvider = function(p) {
|
|
58
|
-
return
|
|
58
|
+
return x(p) === l;
|
|
59
59
|
}, H.isElement = function(p) {
|
|
60
60
|
return typeof p == "object" && p !== null && p.$$typeof === t;
|
|
61
61
|
}, H.isForwardRef = function(p) {
|
|
62
|
-
return
|
|
62
|
+
return x(p) === d;
|
|
63
63
|
}, H.isFragment = function(p) {
|
|
64
|
-
return
|
|
64
|
+
return x(p) === i;
|
|
65
65
|
}, H.isLazy = function(p) {
|
|
66
|
-
return
|
|
66
|
+
return x(p) === T;
|
|
67
67
|
}, H.isMemo = function(p) {
|
|
68
|
-
return
|
|
68
|
+
return x(p) === A;
|
|
69
69
|
}, H.isPortal = function(p) {
|
|
70
|
-
return
|
|
70
|
+
return x(p) === a;
|
|
71
71
|
}, H.isProfiler = function(p) {
|
|
72
|
-
return
|
|
72
|
+
return x(p) === n;
|
|
73
73
|
}, H.isStrictMode = function(p) {
|
|
74
|
-
return
|
|
74
|
+
return x(p) === o;
|
|
75
75
|
}, H.isSuspense = function(p) {
|
|
76
|
-
return
|
|
76
|
+
return x(p) === h;
|
|
77
77
|
}, H.isValidElementType = function(p) {
|
|
78
78
|
return typeof p == "string" || typeof p == "function" || p === i || p === s || p === n || p === o || p === h || p === y || typeof p == "object" && p !== null && (p.$$typeof === T || p.$$typeof === A || p.$$typeof === l || p.$$typeof === r || p.$$typeof === d || p.$$typeof === w || p.$$typeof === S || p.$$typeof === E || p.$$typeof === g);
|
|
79
|
-
}, H.typeOf =
|
|
79
|
+
}, H.typeOf = x, H;
|
|
80
80
|
}
|
|
81
81
|
var F = {};
|
|
82
82
|
/** @license React v16.13.1
|
|
@@ -87,15 +87,15 @@ var F = {};
|
|
|
87
87
|
* This source code is licensed under the MIT license found in the
|
|
88
88
|
* LICENSE file in the root directory of this source tree.
|
|
89
89
|
*/
|
|
90
|
-
var
|
|
90
|
+
var y2;
|
|
91
91
|
function Oe() {
|
|
92
|
-
return
|
|
92
|
+
return y2 || (y2 = 1, process.env.NODE_ENV !== "production" && function() {
|
|
93
93
|
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, a = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, n = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, r = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, s = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, y = e ? Symbol.for("react.suspense_list") : 60120, A = e ? Symbol.for("react.memo") : 60115, T = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, S = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
94
|
-
function
|
|
94
|
+
function x(u) {
|
|
95
95
|
return typeof u == "string" || typeof u == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
96
96
|
u === i || u === s || u === n || u === o || u === h || u === y || typeof u == "object" && u !== null && (u.$$typeof === T || u.$$typeof === A || u.$$typeof === l || u.$$typeof === r || u.$$typeof === d || u.$$typeof === w || u.$$typeof === S || u.$$typeof === E || u.$$typeof === g);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function b(u) {
|
|
99
99
|
if (typeof u == "object" && u !== null) {
|
|
100
100
|
var n0 = u.$$typeof;
|
|
101
101
|
switch (n0) {
|
|
@@ -129,60 +129,60 @@ function Oe() {
|
|
|
129
129
|
}
|
|
130
130
|
var p = f, Z = s, J = r, e0 = l, t0 = t, a0 = d, l0 = i, R = T, c0 = A, I = a, G = n, X = o, i0 = h, r0 = !1;
|
|
131
131
|
function N(u) {
|
|
132
|
-
return r0 || (r0 = !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.")), c(u) ||
|
|
132
|
+
return r0 || (r0 = !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.")), c(u) || b(u) === f;
|
|
133
133
|
}
|
|
134
134
|
function c(u) {
|
|
135
|
-
return
|
|
135
|
+
return b(u) === s;
|
|
136
136
|
}
|
|
137
137
|
function m(u) {
|
|
138
|
-
return
|
|
138
|
+
return b(u) === r;
|
|
139
139
|
}
|
|
140
140
|
function j(u) {
|
|
141
|
-
return
|
|
141
|
+
return b(u) === l;
|
|
142
142
|
}
|
|
143
143
|
function M(u) {
|
|
144
144
|
return typeof u == "object" && u !== null && u.$$typeof === t;
|
|
145
145
|
}
|
|
146
146
|
function D(u) {
|
|
147
|
-
return
|
|
147
|
+
return b(u) === d;
|
|
148
148
|
}
|
|
149
149
|
function P(u) {
|
|
150
|
-
return
|
|
150
|
+
return b(u) === i;
|
|
151
151
|
}
|
|
152
152
|
function q(u) {
|
|
153
|
-
return
|
|
153
|
+
return b(u) === T;
|
|
154
154
|
}
|
|
155
155
|
function C(u) {
|
|
156
|
-
return
|
|
156
|
+
return b(u) === A;
|
|
157
157
|
}
|
|
158
158
|
function _(u) {
|
|
159
|
-
return
|
|
159
|
+
return b(u) === a;
|
|
160
160
|
}
|
|
161
161
|
function V(u) {
|
|
162
|
-
return
|
|
162
|
+
return b(u) === n;
|
|
163
163
|
}
|
|
164
164
|
function O(u) {
|
|
165
|
-
return
|
|
165
|
+
return b(u) === o;
|
|
166
166
|
}
|
|
167
167
|
function B(u) {
|
|
168
|
-
return
|
|
168
|
+
return b(u) === h;
|
|
169
169
|
}
|
|
170
|
-
F.AsyncMode = p, F.ConcurrentMode = Z, F.ContextConsumer = J, F.ContextProvider = e0, F.Element = t0, F.ForwardRef = a0, F.Fragment = l0, F.Lazy = R, F.Memo = c0, F.Portal = I, F.Profiler = G, F.StrictMode = X, F.Suspense = i0, F.isAsyncMode = N, F.isConcurrentMode = c, F.isContextConsumer = m, F.isContextProvider = j, F.isElement = M, F.isForwardRef = D, F.isFragment = P, F.isLazy = q, F.isMemo = C, F.isPortal = _, F.isProfiler = V, F.isStrictMode = O, F.isSuspense = B, F.isValidElementType =
|
|
170
|
+
F.AsyncMode = p, F.ConcurrentMode = Z, F.ContextConsumer = J, F.ContextProvider = e0, F.Element = t0, F.ForwardRef = a0, F.Fragment = l0, F.Lazy = R, F.Memo = c0, F.Portal = I, F.Profiler = G, F.StrictMode = X, F.Suspense = i0, F.isAsyncMode = N, F.isConcurrentMode = c, F.isContextConsumer = m, F.isContextProvider = j, F.isElement = M, F.isForwardRef = D, F.isFragment = P, F.isLazy = q, F.isMemo = C, F.isPortal = _, F.isProfiler = V, F.isStrictMode = O, F.isSuspense = B, F.isValidElementType = x, F.typeOf = b;
|
|
171
171
|
}()), F;
|
|
172
172
|
}
|
|
173
|
-
var
|
|
173
|
+
var k2;
|
|
174
174
|
function U2() {
|
|
175
|
-
return
|
|
175
|
+
return k2 || (k2 = 1, process.env.NODE_ENV === "production" ? R0.exports = Ce() : R0.exports = Oe()), R0.exports;
|
|
176
176
|
}
|
|
177
177
|
/*
|
|
178
178
|
object-assign
|
|
179
179
|
(c) Sindre Sorhus
|
|
180
180
|
@license MIT
|
|
181
181
|
*/
|
|
182
|
-
var Z0,
|
|
182
|
+
var Z0, D2;
|
|
183
183
|
function Te() {
|
|
184
|
-
if (
|
|
185
|
-
|
|
184
|
+
if (D2) return Z0;
|
|
185
|
+
D2 = 1;
|
|
186
186
|
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
|
|
187
187
|
function i(n) {
|
|
188
188
|
if (n == null)
|
|
@@ -225,25 +225,25 @@ function Te() {
|
|
|
225
225
|
return f;
|
|
226
226
|
}, Z0;
|
|
227
227
|
}
|
|
228
|
-
var e2,
|
|
229
|
-
function
|
|
230
|
-
if (
|
|
231
|
-
|
|
228
|
+
var e2, q2;
|
|
229
|
+
function v2() {
|
|
230
|
+
if (q2) return e2;
|
|
231
|
+
q2 = 1;
|
|
232
232
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
233
233
|
return e2 = e, e2;
|
|
234
234
|
}
|
|
235
|
-
var t2,
|
|
235
|
+
var t2, A2;
|
|
236
236
|
function J2() {
|
|
237
|
-
return
|
|
237
|
+
return A2 || (A2 = 1, t2 = Function.call.bind(Object.prototype.hasOwnProperty)), t2;
|
|
238
238
|
}
|
|
239
|
-
var a2,
|
|
239
|
+
var a2, z2;
|
|
240
240
|
function Se() {
|
|
241
|
-
if (
|
|
242
|
-
|
|
241
|
+
if (z2) return a2;
|
|
242
|
+
z2 = 1;
|
|
243
243
|
var e = function() {
|
|
244
244
|
};
|
|
245
245
|
if (process.env.NODE_ENV !== "production") {
|
|
246
|
-
var t =
|
|
246
|
+
var t = v2(), a = {}, i = J2();
|
|
247
247
|
e = function(n) {
|
|
248
248
|
var l = "Warning: " + n;
|
|
249
249
|
typeof console < "u" && console.error(l);
|
|
@@ -285,11 +285,11 @@ function Se() {
|
|
|
285
285
|
process.env.NODE_ENV !== "production" && (a = {});
|
|
286
286
|
}, a2 = o, a2;
|
|
287
287
|
}
|
|
288
|
-
var i2,
|
|
288
|
+
var i2, E2;
|
|
289
289
|
function Pe() {
|
|
290
|
-
if (
|
|
291
|
-
|
|
292
|
-
var e = U2(), t = Te(), a =
|
|
290
|
+
if (E2) return i2;
|
|
291
|
+
E2 = 1;
|
|
292
|
+
var e = U2(), t = Te(), a = v2(), i = J2(), o = Se(), n = function() {
|
|
293
293
|
};
|
|
294
294
|
process.env.NODE_ENV !== "production" && (n = function(r) {
|
|
295
295
|
var f = "Warning: " + r;
|
|
@@ -319,8 +319,8 @@ function Pe() {
|
|
|
319
319
|
string: S("string"),
|
|
320
320
|
symbol: S("symbol"),
|
|
321
321
|
any: E(),
|
|
322
|
-
arrayOf:
|
|
323
|
-
element:
|
|
322
|
+
arrayOf: x,
|
|
323
|
+
element: b(),
|
|
324
324
|
elementType: p(),
|
|
325
325
|
instanceOf: Z,
|
|
326
326
|
node: a0(),
|
|
@@ -377,7 +377,7 @@ function Pe() {
|
|
|
377
377
|
function E() {
|
|
378
378
|
return w(l);
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function x(c) {
|
|
381
381
|
function m(j, M, D, P, q) {
|
|
382
382
|
if (typeof c != "function")
|
|
383
383
|
return new g("Property `" + q + "` of component `" + D + "` has invalid PropType notation inside arrayOf.");
|
|
@@ -395,7 +395,7 @@ function Pe() {
|
|
|
395
395
|
}
|
|
396
396
|
return w(m);
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function b() {
|
|
399
399
|
function c(m, j, M, D, P) {
|
|
400
400
|
var q = m[j];
|
|
401
401
|
if (!r(q)) {
|
|
@@ -606,11 +606,11 @@ Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
|
606
606
|
return A.checkPropTypes = o, A.resetWarningCache = o.resetWarningCache, A.PropTypes = A, A;
|
|
607
607
|
}, i2;
|
|
608
608
|
}
|
|
609
|
-
var n2,
|
|
609
|
+
var n2, j2;
|
|
610
610
|
function _e() {
|
|
611
|
-
if (
|
|
612
|
-
|
|
613
|
-
var e =
|
|
611
|
+
if (j2) return n2;
|
|
612
|
+
j2 = 1;
|
|
613
|
+
var e = v2();
|
|
614
614
|
function t() {
|
|
615
615
|
}
|
|
616
616
|
function a() {
|
|
@@ -656,10 +656,10 @@ function _e() {
|
|
|
656
656
|
}
|
|
657
657
|
if (process.env.NODE_ENV !== "production") {
|
|
658
658
|
var Re = U2(), Ve = !0;
|
|
659
|
-
|
|
659
|
+
c2.exports = Pe()(Re.isElement, Ve);
|
|
660
660
|
} else
|
|
661
|
-
|
|
662
|
-
var He =
|
|
661
|
+
c2.exports = _e()();
|
|
662
|
+
var He = c2.exports;
|
|
663
663
|
const L = /* @__PURE__ */ Me(He);
|
|
664
664
|
function g0(e, t, a, i) {
|
|
665
665
|
function o(n) {
|
|
@@ -1893,7 +1893,7 @@ const Fe = /* @__PURE__ */ new Map([
|
|
|
1893
1893
|
]);
|
|
1894
1894
|
function D0(e, t, a) {
|
|
1895
1895
|
const i = Ie(e), { webkitRelativePath: o } = e, n = typeof t == "string" ? t : typeof o == "string" && o.length > 0 ? o : `./${e.name}`;
|
|
1896
|
-
return typeof i.path != "string" &&
|
|
1896
|
+
return typeof i.path != "string" && M2(i, "path", n), M2(i, "relativePath", n), i;
|
|
1897
1897
|
}
|
|
1898
1898
|
function Ie(e) {
|
|
1899
1899
|
const { name: t } = e;
|
|
@@ -1908,7 +1908,7 @@ function Ie(e) {
|
|
|
1908
1908
|
}
|
|
1909
1909
|
return e;
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1911
|
+
function M2(e, t, a) {
|
|
1912
1912
|
Object.defineProperty(e, t, {
|
|
1913
1913
|
value: a,
|
|
1914
1914
|
writable: !1,
|
|
@@ -1938,7 +1938,7 @@ function I0(e) {
|
|
|
1938
1938
|
return typeof e == "object" && e !== null;
|
|
1939
1939
|
}
|
|
1940
1940
|
function Ye(e) {
|
|
1941
|
-
return
|
|
1941
|
+
return p2(e.target.files).map((t) => D0(t));
|
|
1942
1942
|
}
|
|
1943
1943
|
function Ge(e) {
|
|
1944
1944
|
return g0(this, void 0, void 0, function* () {
|
|
@@ -1948,19 +1948,19 @@ function Ge(e) {
|
|
|
1948
1948
|
function Be(e, t) {
|
|
1949
1949
|
return g0(this, void 0, void 0, function* () {
|
|
1950
1950
|
if (e.items) {
|
|
1951
|
-
const a =
|
|
1951
|
+
const a = p2(e.items).filter((o) => o.kind === "file");
|
|
1952
1952
|
if (t !== "drop")
|
|
1953
1953
|
return a;
|
|
1954
1954
|
const i = yield Promise.all(a.map(Ke));
|
|
1955
|
-
return
|
|
1955
|
+
return C2(X2(i));
|
|
1956
1956
|
}
|
|
1957
|
-
return
|
|
1957
|
+
return C2(p2(e.files).map((a) => D0(a)));
|
|
1958
1958
|
});
|
|
1959
1959
|
}
|
|
1960
|
-
function
|
|
1960
|
+
function C2(e) {
|
|
1961
1961
|
return e.filter((t) => Le.indexOf(t.name) === -1);
|
|
1962
1962
|
}
|
|
1963
|
-
function
|
|
1963
|
+
function p2(e) {
|
|
1964
1964
|
if (e === null)
|
|
1965
1965
|
return [];
|
|
1966
1966
|
const t = [];
|
|
@@ -1972,9 +1972,9 @@ function s2(e) {
|
|
|
1972
1972
|
}
|
|
1973
1973
|
function Ke(e) {
|
|
1974
1974
|
if (typeof e.webkitGetAsEntry != "function")
|
|
1975
|
-
return
|
|
1975
|
+
return O2(e);
|
|
1976
1976
|
const t = e.webkitGetAsEntry();
|
|
1977
|
-
return t && t.isDirectory ? Q2(t) :
|
|
1977
|
+
return t && t.isDirectory ? Q2(t) : O2(e, t);
|
|
1978
1978
|
}
|
|
1979
1979
|
function X2(e) {
|
|
1980
1980
|
return e.reduce((t, a) => [
|
|
@@ -1982,7 +1982,7 @@ function X2(e) {
|
|
|
1982
1982
|
...Array.isArray(a) ? X2(a) : [a]
|
|
1983
1983
|
], []);
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1985
|
+
function O2(e, t) {
|
|
1986
1986
|
return g0(this, void 0, void 0, function* () {
|
|
1987
1987
|
var a;
|
|
1988
1988
|
if (globalThis.isSecureContext && typeof e.getAsFileSystemHandle == "function") {
|
|
@@ -2053,7 +2053,7 @@ var o2 = function(e, t) {
|
|
|
2053
2053
|
}
|
|
2054
2054
|
return !0;
|
|
2055
2055
|
};
|
|
2056
|
-
function
|
|
2056
|
+
function T2(e) {
|
|
2057
2057
|
return Ze(e) || Qe(e) || ee(e) || Xe();
|
|
2058
2058
|
}
|
|
2059
2059
|
function Xe() {
|
|
@@ -2064,9 +2064,9 @@ function Qe(e) {
|
|
|
2064
2064
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
2065
2065
|
}
|
|
2066
2066
|
function Ze(e) {
|
|
2067
|
-
if (Array.isArray(e)) return
|
|
2067
|
+
if (Array.isArray(e)) return s2(e);
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2069
|
+
function S2(e, t) {
|
|
2070
2070
|
var a = Object.keys(e);
|
|
2071
2071
|
if (Object.getOwnPropertySymbols) {
|
|
2072
2072
|
var i = Object.getOwnPropertySymbols(e);
|
|
@@ -2076,12 +2076,12 @@ function P2(e, t) {
|
|
|
2076
2076
|
}
|
|
2077
2077
|
return a;
|
|
2078
2078
|
}
|
|
2079
|
-
function
|
|
2079
|
+
function P2(e) {
|
|
2080
2080
|
for (var t = 1; t < arguments.length; t++) {
|
|
2081
2081
|
var a = arguments[t] != null ? arguments[t] : {};
|
|
2082
|
-
t % 2 ?
|
|
2082
|
+
t % 2 ? S2(Object(a), !0).forEach(function(i) {
|
|
2083
2083
|
Z2(e, i, a[i]);
|
|
2084
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) :
|
|
2084
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : S2(Object(a)).forEach(function(i) {
|
|
2085
2085
|
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(a, i));
|
|
2086
2086
|
});
|
|
2087
2087
|
}
|
|
@@ -2099,13 +2099,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2099
2099
|
}
|
|
2100
2100
|
function ee(e, t) {
|
|
2101
2101
|
if (e) {
|
|
2102
|
-
if (typeof e == "string") return
|
|
2102
|
+
if (typeof e == "string") return s2(e, t);
|
|
2103
2103
|
var a = Object.prototype.toString.call(e).slice(8, -1);
|
|
2104
2104
|
if (a === "Object" && e.constructor && (a = e.constructor.name), a === "Map" || a === "Set") return Array.from(e);
|
|
2105
|
-
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return
|
|
2105
|
+
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return s2(e, t);
|
|
2106
2106
|
}
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2108
|
+
function s2(e, t) {
|
|
2109
2109
|
(t == null || t > e.length) && (t = e.length);
|
|
2110
2110
|
for (var a = 0, i = new Array(t); a < t; a++)
|
|
2111
2111
|
i[a] = e[a];
|
|
@@ -2139,12 +2139,12 @@ var it = typeof o2 == "function" ? o2 : o2.default, nt = "file-invalid-type", ot
|
|
|
2139
2139
|
code: nt,
|
|
2140
2140
|
message: "File type must be ".concat(i)
|
|
2141
2141
|
};
|
|
2142
|
-
},
|
|
2142
|
+
}, _2 = function(t) {
|
|
2143
2143
|
return {
|
|
2144
2144
|
code: ot,
|
|
2145
2145
|
message: "File is larger than ".concat(t, " ").concat(t === 1 ? "byte" : "bytes")
|
|
2146
2146
|
};
|
|
2147
|
-
},
|
|
2147
|
+
}, R2 = function(t) {
|
|
2148
2148
|
return {
|
|
2149
2149
|
code: rt,
|
|
2150
2150
|
message: "File is smaller than ".concat(t, " ").concat(t === 1 ? "byte" : "bytes")
|
|
@@ -2160,11 +2160,11 @@ function te(e, t) {
|
|
|
2160
2160
|
function ae(e, t, a) {
|
|
2161
2161
|
if (h0(e.size))
|
|
2162
2162
|
if (h0(t) && h0(a)) {
|
|
2163
|
-
if (e.size > a) return [!1,
|
|
2164
|
-
if (e.size < t) return [!1,
|
|
2163
|
+
if (e.size > a) return [!1, _2(a)];
|
|
2164
|
+
if (e.size < t) return [!1, R2(t)];
|
|
2165
2165
|
} else {
|
|
2166
|
-
if (h0(t) && e.size < t) return [!1,
|
|
2167
|
-
if (h0(a) && e.size > a) return [!1,
|
|
2166
|
+
if (h0(t) && e.size < t) return [!1, R2(t)];
|
|
2167
|
+
if (h0(a) && e.size > a) return [!1, _2(a)];
|
|
2168
2168
|
}
|
|
2169
2169
|
return [!0, null];
|
|
2170
2170
|
}
|
|
@@ -2186,7 +2186,7 @@ function V0(e) {
|
|
|
2186
2186
|
return t === "Files" || t === "application/x-moz-file";
|
|
2187
2187
|
}) : !!e.target && !!e.target.files;
|
|
2188
2188
|
}
|
|
2189
|
-
function
|
|
2189
|
+
function V2(e) {
|
|
2190
2190
|
e.preventDefault();
|
|
2191
2191
|
}
|
|
2192
2192
|
function dt(e) {
|
|
@@ -2220,7 +2220,7 @@ function vt(e) {
|
|
|
2220
2220
|
return ie(o) || (console.warn('Skipped "'.concat(o, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), l = !1), (!Array.isArray(n) || !n.every(ne)) && (console.warn('Skipped "'.concat(o, '" because an invalid file extension was provided.')), l = !1), l;
|
|
2221
2221
|
}).reduce(function(a, i) {
|
|
2222
2222
|
var o = C0(i, 2), n = o[0], l = o[1];
|
|
2223
|
-
return
|
|
2223
|
+
return P2(P2({}, a), {}, Z2({}, n, l));
|
|
2224
2224
|
}, {});
|
|
2225
2225
|
return [{
|
|
2226
2226
|
// description is required due to https://crbug.com/1264708
|
|
@@ -2234,7 +2234,7 @@ function ht(e) {
|
|
|
2234
2234
|
if (h0(e))
|
|
2235
2235
|
return Object.entries(e).reduce(function(t, a) {
|
|
2236
2236
|
var i = C0(a, 2), o = i[0], n = i[1];
|
|
2237
|
-
return [].concat(
|
|
2237
|
+
return [].concat(T2(t), [o], T2(n));
|
|
2238
2238
|
}, []).filter(function(t) {
|
|
2239
2239
|
return ie(t) || ne(t);
|
|
2240
2240
|
}).join(",");
|
|
@@ -2263,7 +2263,7 @@ function At(e) {
|
|
|
2263
2263
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
2264
2264
|
}
|
|
2265
2265
|
function zt(e) {
|
|
2266
|
-
if (Array.isArray(e)) return
|
|
2266
|
+
if (Array.isArray(e)) return d2(e);
|
|
2267
2267
|
}
|
|
2268
2268
|
function r2(e, t) {
|
|
2269
2269
|
return Mt(e) || jt(e, t) || oe(e, t) || Et();
|
|
@@ -2274,13 +2274,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2274
2274
|
}
|
|
2275
2275
|
function oe(e, t) {
|
|
2276
2276
|
if (e) {
|
|
2277
|
-
if (typeof e == "string") return
|
|
2277
|
+
if (typeof e == "string") return d2(e, t);
|
|
2278
2278
|
var a = Object.prototype.toString.call(e).slice(8, -1);
|
|
2279
2279
|
if (a === "Object" && e.constructor && (a = e.constructor.name), a === "Map" || a === "Set") return Array.from(e);
|
|
2280
|
-
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return
|
|
2280
|
+
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return d2(e, t);
|
|
2281
2281
|
}
|
|
2282
2282
|
}
|
|
2283
|
-
function
|
|
2283
|
+
function d2(e, t) {
|
|
2284
2284
|
(t == null || t > e.length) && (t = e.length);
|
|
2285
2285
|
for (var a = 0, i = new Array(t); a < t; a++)
|
|
2286
2286
|
i[a] = e[a];
|
|
@@ -2308,7 +2308,7 @@ function jt(e, t) {
|
|
|
2308
2308
|
function Mt(e) {
|
|
2309
2309
|
if (Array.isArray(e)) return e;
|
|
2310
2310
|
}
|
|
2311
|
-
function
|
|
2311
|
+
function H2(e, t) {
|
|
2312
2312
|
var a = Object.keys(e);
|
|
2313
2313
|
if (Object.getOwnPropertySymbols) {
|
|
2314
2314
|
var i = Object.getOwnPropertySymbols(e);
|
|
@@ -2321,15 +2321,15 @@ function F2(e, t) {
|
|
|
2321
2321
|
function W(e) {
|
|
2322
2322
|
for (var t = 1; t < arguments.length; t++) {
|
|
2323
2323
|
var a = arguments[t] != null ? arguments[t] : {};
|
|
2324
|
-
t % 2 ?
|
|
2325
|
-
|
|
2326
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) :
|
|
2324
|
+
t % 2 ? H2(Object(a), !0).forEach(function(i) {
|
|
2325
|
+
m2(e, i, a[i]);
|
|
2326
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : H2(Object(a)).forEach(function(i) {
|
|
2327
2327
|
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(a, i));
|
|
2328
2328
|
});
|
|
2329
2329
|
}
|
|
2330
2330
|
return e;
|
|
2331
2331
|
}
|
|
2332
|
-
function
|
|
2332
|
+
function m2(e, t, a) {
|
|
2333
2333
|
return t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = a, e;
|
|
2334
2334
|
}
|
|
2335
2335
|
function $0(e, t) {
|
|
@@ -2349,7 +2349,7 @@ function Ct(e, t) {
|
|
|
2349
2349
|
o = i[n], !(t.indexOf(o) >= 0) && (a[o] = e[o]);
|
|
2350
2350
|
return a;
|
|
2351
2351
|
}
|
|
2352
|
-
var
|
|
2352
|
+
var h2 = /* @__PURE__ */ K2(function(e, t) {
|
|
2353
2353
|
var a = e.children, i = $0(e, bt), o = le(i), n = o.open, l = $0(o, wt);
|
|
2354
2354
|
return Ee(t, function() {
|
|
2355
2355
|
return {
|
|
@@ -2359,7 +2359,7 @@ var g2 = /* @__PURE__ */ K2(function(e, t) {
|
|
|
2359
2359
|
open: n
|
|
2360
2360
|
})));
|
|
2361
2361
|
});
|
|
2362
|
-
|
|
2362
|
+
h2.displayName = "Dropzone";
|
|
2363
2363
|
var re = {
|
|
2364
2364
|
disabled: !1,
|
|
2365
2365
|
getFilesFromEvent: $e,
|
|
@@ -2376,8 +2376,8 @@ var re = {
|
|
|
2376
2376
|
useFsAccessApi: !1,
|
|
2377
2377
|
autoFocus: !1
|
|
2378
2378
|
};
|
|
2379
|
-
|
|
2380
|
-
|
|
2379
|
+
h2.defaultProps = re;
|
|
2380
|
+
h2.propTypes = {
|
|
2381
2381
|
/**
|
|
2382
2382
|
* Render function that exposes the dropzone state and prop getter fns
|
|
2383
2383
|
*
|
|
@@ -2545,7 +2545,7 @@ g2.propTypes = {
|
|
|
2545
2545
|
*/
|
|
2546
2546
|
validator: L.func
|
|
2547
2547
|
};
|
|
2548
|
-
var
|
|
2548
|
+
var u2 = {
|
|
2549
2549
|
isFocused: !1,
|
|
2550
2550
|
isFileDialogActive: !1,
|
|
2551
2551
|
isDragActive: !1,
|
|
@@ -2555,15 +2555,15 @@ var f2 = {
|
|
|
2555
2555
|
fileRejections: []
|
|
2556
2556
|
};
|
|
2557
2557
|
function le() {
|
|
2558
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = W(W({}, re), e), a = t.accept, i = t.disabled, o = t.getFilesFromEvent, n = t.maxSize, l = t.minSize, r = t.multiple, f = t.maxFiles, s = t.onDragEnter, d = t.onDragLeave, h = t.onDragOver, y = t.onDrop, A = t.onDropAccepted, T = t.onDropRejected, g = t.onFileDialogCancel, w = t.onFileDialogOpen, S = t.useFsAccessApi, E = t.autoFocus,
|
|
2558
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = W(W({}, re), e), a = t.accept, i = t.disabled, o = t.getFilesFromEvent, n = t.maxSize, l = t.minSize, r = t.multiple, f = t.maxFiles, s = t.onDragEnter, d = t.onDragLeave, h = t.onDragOver, y = t.onDrop, A = t.onDropAccepted, T = t.onDropRejected, g = t.onFileDialogCancel, w = t.onFileDialogOpen, S = t.useFsAccessApi, E = t.autoFocus, x = t.preventDropOnDocument, b = t.noClick, p = t.noKeyboard, Z = t.noDrag, J = t.noDragEventsBubbling, e0 = t.onError, t0 = t.validator, a0 = w0(function() {
|
|
2559
2559
|
return ht(a);
|
|
2560
2560
|
}, [a]), l0 = w0(function() {
|
|
2561
2561
|
return vt(a);
|
|
2562
2562
|
}, [a]), R = w0(function() {
|
|
2563
|
-
return typeof w == "function" ? w :
|
|
2563
|
+
return typeof w == "function" ? w : F2;
|
|
2564
2564
|
}, [w]), c0 = w0(function() {
|
|
2565
|
-
return typeof g == "function" ? g :
|
|
2566
|
-
}, [g]), I = _0(null), G = _0(null), X = ze(Ot,
|
|
2565
|
+
return typeof g == "function" ? g : F2;
|
|
2566
|
+
}, [g]), I = _0(null), G = _0(null), X = ze(Ot, u2), i0 = r2(X, 2), r0 = i0[0], N = i0[1], c = r0.isFocused, m = r0.isFileDialogActive, j = _0(typeof window < "u" && window.isSecureContext && S && ft()), M = function() {
|
|
2567
2567
|
!j.current && m && setTimeout(function() {
|
|
2568
2568
|
if (G.current) {
|
|
2569
2569
|
var k = G.current.files;
|
|
@@ -2582,10 +2582,10 @@ function le() {
|
|
|
2582
2582
|
I.current && I.current.contains(k.target) || (k.preventDefault(), D.current = []);
|
|
2583
2583
|
};
|
|
2584
2584
|
X0(function() {
|
|
2585
|
-
return
|
|
2586
|
-
|
|
2585
|
+
return x && (document.addEventListener("dragover", V2, !1), document.addEventListener("drop", P, !1)), function() {
|
|
2586
|
+
x && (document.removeEventListener("dragover", V2), document.removeEventListener("drop", P));
|
|
2587
2587
|
};
|
|
2588
|
-
}, [I,
|
|
2588
|
+
}, [I, x]), X0(function() {
|
|
2589
2589
|
return !i && E && I.current && I.current.focus(), function() {
|
|
2590
2590
|
};
|
|
2591
2591
|
}, [I, E, i]);
|
|
@@ -2702,9 +2702,9 @@ function le() {
|
|
|
2702
2702
|
N({
|
|
2703
2703
|
type: "blur"
|
|
2704
2704
|
});
|
|
2705
|
-
}, []),
|
|
2706
|
-
|
|
2707
|
-
}, [
|
|
2705
|
+
}, []), x2 = U(function() {
|
|
2706
|
+
b || (ut() ? setTimeout(u, 0) : u());
|
|
2707
|
+
}, [b, u]), x0 = function(k) {
|
|
2708
2708
|
return i ? null : k;
|
|
2709
2709
|
}, N0 = function(k) {
|
|
2710
2710
|
return p ? null : x0(k);
|
|
@@ -2715,11 +2715,11 @@ function le() {
|
|
|
2715
2715
|
}, ke = w0(function() {
|
|
2716
2716
|
return function() {
|
|
2717
2717
|
var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, k = v.refKey, Y = k === void 0 ? "ref" : k, K = v.role, o0 = v.onKeyDown, z0 = v.onFocus, b0 = v.onBlur, W0 = v.onClick, Y0 = v.onDragEnter, G0 = v.onDragOver, P0 = v.onDragLeave, B0 = v.onDrop, K0 = $0(v, yt);
|
|
2718
|
-
return W(W(
|
|
2718
|
+
return W(W(m2({
|
|
2719
2719
|
onKeyDown: N0(s0(o0, n0)),
|
|
2720
2720
|
onFocus: N0(s0(z0, v0)),
|
|
2721
2721
|
onBlur: N0(s0(b0, A0)),
|
|
2722
|
-
onClick: x0(s0(W0,
|
|
2722
|
+
onClick: x0(s0(W0, x2)),
|
|
2723
2723
|
onDragEnter: T0(s0(Y0, C)),
|
|
2724
2724
|
onDragOver: T0(s0(G0, _)),
|
|
2725
2725
|
onDragLeave: T0(s0(P0, V)),
|
|
@@ -2729,11 +2729,11 @@ function le() {
|
|
|
2729
2729
|
tabIndex: 0
|
|
2730
2730
|
} : {}), K0);
|
|
2731
2731
|
};
|
|
2732
|
-
}, [I, n0, v0, A0,
|
|
2732
|
+
}, [I, n0, v0, A0, x2, C, _, V, B, p, Z, i]), De = U(function(v) {
|
|
2733
2733
|
v.stopPropagation();
|
|
2734
2734
|
}, []), qe = w0(function() {
|
|
2735
2735
|
return function() {
|
|
2736
|
-
var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, k = v.refKey, Y = k === void 0 ? "ref" : k, K = v.onChange, o0 = v.onClick, z0 = $0(v, kt), b0 =
|
|
2736
|
+
var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, k = v.refKey, Y = k === void 0 ? "ref" : k, K = v.onChange, o0 = v.onClick, z0 = $0(v, kt), b0 = m2({
|
|
2737
2737
|
accept: a0,
|
|
2738
2738
|
multiple: r,
|
|
2739
2739
|
type: "file",
|
|
@@ -2776,7 +2776,7 @@ function Ot(e, t) {
|
|
|
2776
2776
|
isFocused: !1
|
|
2777
2777
|
});
|
|
2778
2778
|
case "openDialog":
|
|
2779
|
-
return W(W({},
|
|
2779
|
+
return W(W({}, u2), {}, {
|
|
2780
2780
|
isFileDialogActive: !0
|
|
2781
2781
|
});
|
|
2782
2782
|
case "closeDialog":
|
|
@@ -2796,12 +2796,12 @@ function Ot(e, t) {
|
|
|
2796
2796
|
isDragReject: t.isDragReject
|
|
2797
2797
|
});
|
|
2798
2798
|
case "reset":
|
|
2799
|
-
return W({},
|
|
2799
|
+
return W({}, u2);
|
|
2800
2800
|
default:
|
|
2801
2801
|
return e;
|
|
2802
2802
|
}
|
|
2803
2803
|
}
|
|
2804
|
-
function
|
|
2804
|
+
function F2() {
|
|
2805
2805
|
}
|
|
2806
2806
|
var Tt = {
|
|
2807
2807
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2816,7 +2816,7 @@ var Tt = {
|
|
|
2816
2816
|
};
|
|
2817
2817
|
const St = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Pt = (e, t) => {
|
|
2818
2818
|
const a = K2(
|
|
2819
|
-
({ color: i = "currentColor", size: o = 24, strokeWidth: n = 2, absoluteStrokeWidth: l, children: r, ...f }, s) =>
|
|
2819
|
+
({ color: i = "currentColor", size: o = 24, strokeWidth: n = 2, absoluteStrokeWidth: l, children: r, ...f }, s) => b2(
|
|
2820
2820
|
"svg",
|
|
2821
2821
|
{
|
|
2822
2822
|
ref: s,
|
|
@@ -2829,7 +2829,7 @@ const St = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Pt = (
|
|
|
2829
2829
|
...f
|
|
2830
2830
|
},
|
|
2831
2831
|
[
|
|
2832
|
-
...t.map(([d, h]) =>
|
|
2832
|
+
...t.map(([d, h]) => b2(d, h)),
|
|
2833
2833
|
...(Array.isArray(r) ? r : [r]) || []
|
|
2834
2834
|
]
|
|
2835
2835
|
)
|
|
@@ -2886,13 +2886,13 @@ function pe() {
|
|
|
2886
2886
|
for (var e, t, a = 0, i = "", o = arguments.length; a < o; a++) (e = arguments[a]) && (t = ce(e)) && (i && (i += " "), i += t);
|
|
2887
2887
|
return i;
|
|
2888
2888
|
}
|
|
2889
|
-
const
|
|
2889
|
+
const I2 = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, L2 = pe, se = (e, t) => (a) => {
|
|
2890
2890
|
var i;
|
|
2891
|
-
if ((t == null ? void 0 : t.variants) == null) return
|
|
2891
|
+
if ((t == null ? void 0 : t.variants) == null) return L2(e, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
|
|
2892
2892
|
const { variants: o, defaultVariants: n } = t, l = Object.keys(o).map((s) => {
|
|
2893
2893
|
const d = a == null ? void 0 : a[s], h = n == null ? void 0 : n[s];
|
|
2894
2894
|
if (d === null) return null;
|
|
2895
|
-
const y =
|
|
2895
|
+
const y = I2(d) || I2(h);
|
|
2896
2896
|
return o[s][y];
|
|
2897
2897
|
}), r = a && Object.entries(a).reduce((s, d) => {
|
|
2898
2898
|
let [h, y] = d;
|
|
@@ -2914,15 +2914,15 @@ const L2 = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $2 = pe, s
|
|
|
2914
2914
|
y
|
|
2915
2915
|
] : s;
|
|
2916
2916
|
}, []);
|
|
2917
|
-
return
|
|
2918
|
-
},
|
|
2917
|
+
return L2(e, l, f, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
|
|
2918
|
+
}, g2 = "-", It = (e) => {
|
|
2919
2919
|
const t = $t(e), {
|
|
2920
2920
|
conflictingClassGroups: a,
|
|
2921
2921
|
conflictingClassGroupModifiers: i
|
|
2922
2922
|
} = e;
|
|
2923
2923
|
return {
|
|
2924
2924
|
getClassGroupId: (l) => {
|
|
2925
|
-
const r = l.split(
|
|
2925
|
+
const r = l.split(g2);
|
|
2926
2926
|
return r[0] === "" && r.length !== 1 && r.shift(), de(r, t) || Lt(l);
|
|
2927
2927
|
},
|
|
2928
2928
|
getConflictingClassGroupIds: (l, r) => {
|
|
@@ -2939,13 +2939,13 @@ const L2 = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $2 = pe, s
|
|
|
2939
2939
|
return o;
|
|
2940
2940
|
if (t.validators.length === 0)
|
|
2941
2941
|
return;
|
|
2942
|
-
const n = e.join(
|
|
2942
|
+
const n = e.join(g2);
|
|
2943
2943
|
return (l = t.validators.find(({
|
|
2944
2944
|
validator: r
|
|
2945
2945
|
}) => r(n))) == null ? void 0 : l.classGroupId;
|
|
2946
|
-
},
|
|
2947
|
-
if (
|
|
2948
|
-
const t =
|
|
2946
|
+
}, $2 = /^\[(.+)\]$/, Lt = (e) => {
|
|
2947
|
+
if ($2.test(e)) {
|
|
2948
|
+
const t = $2.exec(e)[1], a = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
2949
2949
|
if (a)
|
|
2950
2950
|
return "arbitrary.." + a;
|
|
2951
2951
|
}
|
|
@@ -2958,18 +2958,18 @@ const L2 = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $2 = pe, s
|
|
|
2958
2958
|
validators: []
|
|
2959
2959
|
};
|
|
2960
2960
|
return Wt(Object.entries(e.classGroups), a).forEach(([n, l]) => {
|
|
2961
|
-
|
|
2961
|
+
f2(l, i, n, t);
|
|
2962
2962
|
}), i;
|
|
2963
|
-
},
|
|
2963
|
+
}, f2 = (e, t, a, i) => {
|
|
2964
2964
|
e.forEach((o) => {
|
|
2965
2965
|
if (typeof o == "string") {
|
|
2966
|
-
const n = o === "" ? t :
|
|
2966
|
+
const n = o === "" ? t : N2(t, o);
|
|
2967
2967
|
n.classGroupId = a;
|
|
2968
2968
|
return;
|
|
2969
2969
|
}
|
|
2970
2970
|
if (typeof o == "function") {
|
|
2971
2971
|
if (Nt(o)) {
|
|
2972
|
-
|
|
2972
|
+
f2(o(i), t, a, i);
|
|
2973
2973
|
return;
|
|
2974
2974
|
}
|
|
2975
2975
|
t.validators.push({
|
|
@@ -2979,12 +2979,12 @@ const L2 = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $2 = pe, s
|
|
|
2979
2979
|
return;
|
|
2980
2980
|
}
|
|
2981
2981
|
Object.entries(o).forEach(([n, l]) => {
|
|
2982
|
-
|
|
2982
|
+
f2(l, N2(t, n), a, i);
|
|
2983
2983
|
});
|
|
2984
2984
|
});
|
|
2985
|
-
},
|
|
2985
|
+
}, N2 = (e, t) => {
|
|
2986
2986
|
let a = e;
|
|
2987
|
-
return t.split(
|
|
2987
|
+
return t.split(g2).forEach((i) => {
|
|
2988
2988
|
a.nextPart.has(i) || a.nextPart.set(i, {
|
|
2989
2989
|
nextPart: /* @__PURE__ */ new Map(),
|
|
2990
2990
|
validators: []
|
|
@@ -3092,9 +3092,9 @@ const L2 = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, $2 = pe, s
|
|
|
3092
3092
|
if (n.includes(E))
|
|
3093
3093
|
continue;
|
|
3094
3094
|
n.push(E);
|
|
3095
|
-
const
|
|
3096
|
-
for (let
|
|
3097
|
-
const p = b
|
|
3095
|
+
const x = o(g, T);
|
|
3096
|
+
for (let b = 0; b < x.length; ++b) {
|
|
3097
|
+
const p = x[b];
|
|
3098
3098
|
n.push(S + p);
|
|
3099
3099
|
}
|
|
3100
3100
|
r = s + (r.length > 0 ? " " + r : r);
|
|
@@ -3144,7 +3144,7 @@ const $ = (e) => {
|
|
|
3144
3144
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
3145
3145
|
aa.test(e) && !ia.test(e)
|
|
3146
3146
|
), ve = () => !1, fa = (e) => na.test(e), va = (e) => oa.test(e), ha = () => {
|
|
3147
|
-
const e = $("colors"), t = $("spacing"), a = $("blur"), i = $("brightness"), o = $("borderColor"), n = $("borderRadius"), l = $("borderSpacing"), r = $("borderWidth"), f = $("contrast"), s = $("grayscale"), d = $("hueRotate"), h = $("invert"), y = $("gap"), A = $("gradientColorStops"), T = $("gradientColorStopPositions"), g = $("inset"), w = $("margin"), S = $("opacity"), E = $("padding"),
|
|
3147
|
+
const e = $("colors"), t = $("spacing"), a = $("blur"), i = $("brightness"), o = $("borderColor"), n = $("borderRadius"), l = $("borderSpacing"), r = $("borderWidth"), f = $("contrast"), s = $("grayscale"), d = $("hueRotate"), h = $("invert"), y = $("gap"), A = $("gradientColorStops"), T = $("gradientColorStopPositions"), g = $("inset"), w = $("margin"), S = $("opacity"), E = $("padding"), x = $("saturate"), b = $("scale"), p = $("sepia"), Z = $("skew"), J = $("space"), e0 = $("translate"), t0 = () => ["auto", "contain", "none"], a0 = () => ["auto", "hidden", "clip", "visible", "scroll"], l0 = () => ["auto", z, t], R = () => [z, t], c0 = () => ["", m0, u0], I = () => ["auto", y0, z], G = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], X = () => ["solid", "dashed", "dotted", "double", "none"], i0 = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], r0 = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], N = () => ["", "0", z], c = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], m = () => [y0, z];
|
|
3148
3148
|
return {
|
|
3149
3149
|
cacheSize: 500,
|
|
3150
3150
|
separator: ":",
|
|
@@ -4610,7 +4610,7 @@ const $ = (e) => {
|
|
|
4610
4610
|
* @see https://tailwindcss.com/docs/saturate
|
|
4611
4611
|
*/
|
|
4612
4612
|
saturate: [{
|
|
4613
|
-
saturate: [
|
|
4613
|
+
saturate: [x]
|
|
4614
4614
|
}],
|
|
4615
4615
|
/**
|
|
4616
4616
|
* Sepia
|
|
@@ -4681,7 +4681,7 @@ const $ = (e) => {
|
|
|
4681
4681
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
4682
4682
|
*/
|
|
4683
4683
|
"backdrop-saturate": [{
|
|
4684
|
-
"backdrop-saturate": [
|
|
4684
|
+
"backdrop-saturate": [x]
|
|
4685
4685
|
}],
|
|
4686
4686
|
/**
|
|
4687
4687
|
* Backdrop Sepia
|
|
@@ -4782,21 +4782,21 @@ const $ = (e) => {
|
|
|
4782
4782
|
* @see https://tailwindcss.com/docs/scale
|
|
4783
4783
|
*/
|
|
4784
4784
|
scale: [{
|
|
4785
|
-
scale: [
|
|
4785
|
+
scale: [b]
|
|
4786
4786
|
}],
|
|
4787
4787
|
/**
|
|
4788
4788
|
* Scale X
|
|
4789
4789
|
* @see https://tailwindcss.com/docs/scale
|
|
4790
4790
|
*/
|
|
4791
4791
|
"scale-x": [{
|
|
4792
|
-
"scale-x": [
|
|
4792
|
+
"scale-x": [b]
|
|
4793
4793
|
}],
|
|
4794
4794
|
/**
|
|
4795
4795
|
* Scale Y
|
|
4796
4796
|
* @see https://tailwindcss.com/docs/scale
|
|
4797
4797
|
*/
|
|
4798
4798
|
"scale-y": [{
|
|
4799
|
-
"scale-y": [
|
|
4799
|
+
"scale-y": [b]
|
|
4800
4800
|
}],
|
|
4801
4801
|
/**
|
|
4802
4802
|
* Rotate
|
|
@@ -5193,7 +5193,7 @@ const he = (e) => {
|
|
|
5193
5193
|
return { valid: !1, error: "File type not accepted" };
|
|
5194
5194
|
}
|
|
5195
5195
|
return { valid: !0 };
|
|
5196
|
-
},
|
|
5196
|
+
}, W2 = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, xa = se(
|
|
5197
5197
|
"relative flex flex-col items-center justify-center border-2 border-dashed rounded-lg transition-all text-center focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",
|
|
5198
5198
|
{
|
|
5199
5199
|
variants: {
|
|
@@ -5233,11 +5233,11 @@ const he = (e) => {
|
|
|
5233
5233
|
const d = U(
|
|
5234
5234
|
(S, E) => {
|
|
5235
5235
|
if (n) return;
|
|
5236
|
-
const
|
|
5237
|
-
S.forEach((
|
|
5238
|
-
const { valid: p } = ge(
|
|
5239
|
-
p &&
|
|
5240
|
-
}), e &&
|
|
5236
|
+
const x = [];
|
|
5237
|
+
S.forEach((b) => {
|
|
5238
|
+
const { valid: p } = ge(b, i, o);
|
|
5239
|
+
p && x.push(b);
|
|
5240
|
+
}), e && x.length > 0 && e(x), t && x.length > 0 && t(x);
|
|
5241
5241
|
},
|
|
5242
5242
|
[e, t, n, i, o]
|
|
5243
5243
|
), { getRootProps: h, getInputProps: y, isDragActive: A, isDragAccept: T, isDragReject: g } = le({
|
|
@@ -5446,64 +5446,61 @@ const he = (e) => {
|
|
|
5446
5446
|
initialFiles: n = []
|
|
5447
5447
|
} = {}) => {
|
|
5448
5448
|
const [l, r] = Q0(
|
|
5449
|
-
() => n.map((E) =>
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5449
|
+
() => n.map((E) => {
|
|
5450
|
+
const x = E;
|
|
5451
|
+
return Object.assign(x, {
|
|
5452
|
+
id: W2(),
|
|
5453
|
+
progress: 0,
|
|
5454
|
+
status: "idle"
|
|
5455
|
+
}), x;
|
|
5456
|
+
})
|
|
5455
5457
|
), [f, s] = Q0(!1), [d, h] = Q0({}), y = U((E) => {
|
|
5456
|
-
const
|
|
5458
|
+
const x = [], b = {};
|
|
5457
5459
|
if (l.length + E.length > e) {
|
|
5458
|
-
|
|
5460
|
+
b.limit = `You can only upload up to ${e} files`, h((p) => ({ ...p, ...b }));
|
|
5459
5461
|
return;
|
|
5460
5462
|
}
|
|
5461
5463
|
E.forEach((p) => {
|
|
5462
5464
|
const { valid: Z, error: J } = ge(p, t, a);
|
|
5463
5465
|
if (Z) {
|
|
5464
|
-
const e0 =
|
|
5465
|
-
|
|
5466
|
-
id:
|
|
5466
|
+
const e0 = p;
|
|
5467
|
+
Object.assign(e0, {
|
|
5468
|
+
id: W2(),
|
|
5467
5469
|
progress: 0,
|
|
5468
5470
|
status: "idle"
|
|
5469
|
-
};
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
progress: { value: 0, writable: !0 },
|
|
5473
|
-
status: { value: "idle", writable: !0 }
|
|
5474
|
-
}), b.push(e0);
|
|
5475
|
-
} else J && (x[p.name] = J);
|
|
5476
|
-
}), r((p) => [...p, ...b]), h((p) => ({ ...p, ...x })), o && b.length > 0 && i && g(b);
|
|
5471
|
+
}), x.push(e0);
|
|
5472
|
+
} else J && (b[p.name] = J);
|
|
5473
|
+
}), r((p) => [...p, ...x]), h((p) => ({ ...p, ...b })), o && x.length > 0 && i && g(x);
|
|
5477
5474
|
}, [l, e, t, a, o, i]), A = U((E) => {
|
|
5478
|
-
r((
|
|
5479
|
-
const
|
|
5480
|
-
return delete
|
|
5475
|
+
r((x) => x.filter((b) => b !== E)), h((x) => {
|
|
5476
|
+
const b = { ...x };
|
|
5477
|
+
return delete b[E.name], b;
|
|
5481
5478
|
});
|
|
5482
5479
|
}, []), T = U(() => {
|
|
5483
5480
|
r([]), h({});
|
|
5484
5481
|
}, []), g = async (E) => {
|
|
5485
5482
|
if (i) {
|
|
5486
|
-
s(!0), r((
|
|
5487
|
-
(
|
|
5483
|
+
s(!0), r((x) => x.map(
|
|
5484
|
+
(b) => E.includes(b) ? Object.assign(b, { status: "uploading" }) : b
|
|
5488
5485
|
));
|
|
5489
5486
|
try {
|
|
5490
|
-
await i(E), r((
|
|
5491
|
-
(
|
|
5487
|
+
await i(E), r((x) => x.map(
|
|
5488
|
+
(b) => E.includes(b) ? Object.assign(b, { status: "success", progress: 100 }) : b
|
|
5492
5489
|
));
|
|
5493
|
-
} catch (
|
|
5494
|
-
r((
|
|
5495
|
-
(p) => E.includes(p) ? Object.assign(p, { status: "error", error: String(
|
|
5490
|
+
} catch (x) {
|
|
5491
|
+
r((b) => b.map(
|
|
5492
|
+
(p) => E.includes(p) ? Object.assign(p, { status: "error", error: String(x) }) : p
|
|
5496
5493
|
));
|
|
5497
5494
|
} finally {
|
|
5498
5495
|
s(!1);
|
|
5499
5496
|
}
|
|
5500
5497
|
}
|
|
5501
5498
|
}, w = U(async () => {
|
|
5502
|
-
const E = l.filter((
|
|
5499
|
+
const E = l.filter((x) => x.status === "idle");
|
|
5503
5500
|
E.length > 0 && await g(E);
|
|
5504
5501
|
}, [l, i]), S = U(async (E) => {
|
|
5505
|
-
const
|
|
5506
|
-
|
|
5502
|
+
const x = l.find((b) => b === E);
|
|
5503
|
+
x && await g([x]);
|
|
5507
5504
|
}, [l, i]);
|
|
5508
5505
|
return {
|
|
5509
5506
|
files: l,
|
|
@@ -5522,7 +5519,7 @@ export {
|
|
|
5522
5519
|
oi as FileUpload,
|
|
5523
5520
|
k0 as cn,
|
|
5524
5521
|
he as formatFileSize,
|
|
5525
|
-
|
|
5522
|
+
W2 as generateFileId,
|
|
5526
5523
|
Za as getFileIcon,
|
|
5527
5524
|
li as useFileUpload,
|
|
5528
5525
|
ge as validateFile
|