@cgi-learning-hub/ui 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Box-5x1F2S3-.cjs +1 -0
- package/dist/{Box-BHWJ-D81.js → Box-Bawb5zHX.js} +24 -23
- package/dist/Button-C__-QOJY.js +359 -0
- package/dist/Button-DKIRmOzf.cjs +1 -0
- package/dist/{ButtonBase-BpYorbzW.js → ButtonBase-4F5roLHd.js} +36 -37
- package/dist/ButtonBase-Bw3wq81v.cjs +75 -0
- package/dist/{CircularProgress-C8TogtEK.js → CircularProgress-BNazIBar.js} +30 -30
- package/dist/CircularProgress-WnNPMTjD.cjs +28 -0
- package/dist/DatePicker-B0jLSEvZ.cjs +19 -0
- package/dist/DatePicker-DGVeagTz.js +12663 -0
- package/dist/DefaultButton-F67BOmrx.js +258 -0
- package/dist/DefaultButton-y-mHSNFH.cjs +1 -0
- package/dist/{IconButton-Hsn7HKeI.js → IconButton-D_deQOvN.js} +15 -15
- package/dist/IconButton-DhWgsgQ7.cjs +2 -0
- package/dist/InputAdornment-DYqMrYJz.cjs +1 -0
- package/dist/InputAdornment-hNrnvXW9.js +153 -0
- package/dist/InputBase-BeZ70Fbf.cjs +3 -0
- package/dist/{InputBase-BdOkEcEz.js → InputBase-DNkF-TAp.js} +218 -217
- package/dist/Stack-BJ2ths-g.js +172 -0
- package/dist/Stack-BOcvai-O.cjs +1 -0
- package/dist/Tabs-CG428TT3.cjs +4 -0
- package/dist/{Tabs-C8ECGIYh.js → Tabs-CWujD0SK.js} +33 -33
- package/dist/{TextInput-CpnUc54E.js → TextField-DDmGQyEr.js} +3607 -3603
- package/dist/TextField-wYRnAj1v.cjs +12 -0
- package/dist/Tooltip-D42pzHKW.js +7463 -0
- package/dist/Tooltip-O30xWGZU.cjs +95 -0
- package/dist/{Typography-D9Jbc-Y5.js → Typography-B2XMXu83.js} +18 -18
- package/dist/Typography-DR_aF9lJ.cjs +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.d.ts +2 -3
- package/dist/components/Dropzone/Dropzone.es.js +212 -240
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.d.ts +0 -1
- package/dist/components/Loader/Loader.es.js +9 -9
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +0 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +1 -2
- package/dist/components/PaperHeader/PaperHeader.cjs.js +1 -0
- package/dist/components/PaperHeader/PaperHeader.d.ts +13 -0
- package/dist/components/PaperHeader/PaperHeader.es.js +41 -0
- package/dist/components/PaperHeader/PaperHeader.stories.cjs.js +1 -0
- package/dist/components/PaperHeader/PaperHeader.stories.d.ts +5 -0
- package/dist/components/PaperHeader/PaperHeader.stories.es.js +28 -0
- package/dist/components/PaperHeader/index.cjs.js +1 -0
- package/dist/components/PaperHeader/index.d.ts +2 -0
- package/dist/components/PaperHeader/index.es.js +4 -0
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +2 -2
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +14 -14
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.es.js +1 -1
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
- package/dist/components/buttons/IconButton.stories.es.js +3 -3
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.es.js +1 -1
- package/dist/components/feedback/Alert/Alert.d.ts +0 -1
- package/dist/components/feedback/QueryError/QueryError.cjs.js +1 -1
- package/dist/components/feedback/QueryError/QueryError.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +37 -21
- package/dist/components/index.es.js +271 -186
- package/dist/components/inputs/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.es.js +13 -15
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +36 -5
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +4 -4
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.es.js +2 -2
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.es.js +4 -3
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +1 -1
- package/dist/components/inputs/TextInput/index.cjs.js +1 -1
- package/dist/components/inputs/TextInput/index.es.js +2 -2
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.es.js +6 -6
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.es.js +1 -1
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.es.js +6 -6
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.es.js +27 -26
- package/dist/components/pickers/DatePicker/DatePicker.cjs.js +1 -0
- package/dist/components/pickers/DatePicker/DatePicker.d.ts +8 -0
- package/dist/components/pickers/DatePicker/DatePicker.es.js +6 -0
- package/dist/components/pickers/DatePicker/DatePicker.stories.cjs.js +1 -0
- package/dist/components/pickers/DatePicker/DatePicker.stories.d.ts +5 -0
- package/dist/components/pickers/DatePicker/DatePicker.stories.es.js +16 -0
- package/dist/components/pickers/DatePicker/index.cjs.js +1 -0
- package/dist/components/pickers/DatePicker/index.d.ts +2 -0
- package/dist/components/pickers/DatePicker/index.es.js +4 -0
- package/dist/components/pickers/index.cjs.js +1 -0
- package/dist/components/pickers/index.d.ts +1 -0
- package/dist/components/pickers/index.es.js +4 -0
- package/dist/createStyled-CzVedz8V.js +142 -0
- package/dist/createStyled-LobpFGWo.cjs +1 -0
- package/dist/{createSvgIcon-BpzrJYC7.js → createSvgIcon-B8vHI3I6.js} +12 -12
- package/dist/createSvgIcon-BGm-SWUB.cjs +1 -0
- package/dist/createSvgIcon-CKlvKClV.cjs +2 -0
- package/dist/{createSvgIcon-CbXClqUM.js → createSvgIcon-DjuUwmEp.js} +21 -20
- package/dist/fr-By4s91yO.js +307 -0
- package/dist/fr-TRjulm1Q.cjs +1 -0
- package/dist/identifier-4KVhx666.cjs +50 -0
- package/dist/identifier-D-ng7Qqa.js +3047 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +273 -189
- package/dist/refType-BhXrhWFB.cjs +1 -0
- package/dist/{refType-CD9RZ5PF.js → refType-COGEdfch.js} +1 -1
- package/dist/styled-ZF_yhfMW.cjs +17 -0
- package/dist/styled-xiAudcD_.js +533 -0
- package/dist/useForkRef-CGd3Nhyb.cjs +1 -0
- package/dist/{useIsFocusVisible-B2ErvDHn.cjs → useIsFocusVisible-Bv_7uvif.cjs} +1 -1
- package/dist/{useIsFocusVisible-BsjI7Zxf.js → useIsFocusVisible-DhASXQ4o.js} +1 -1
- package/dist/useTheme-B5RCz7rY.cjs +1 -0
- package/dist/useTheme-CjBTq22m.js +18 -0
- package/dist/{useSlotProps-BCdUhJUO.js → useTheme-iNHILPzK.js} +41 -29
- package/dist/useTheme-kqsjFBnC.cjs +1 -0
- package/dist/useThemeProps-B-Oq4Y2j.cjs +1 -0
- package/dist/useThemeProps-BHAsCmc4.cjs +1 -0
- package/dist/useThemeProps-BM4fCFq5.js +27 -0
- package/dist/useThemeProps-BVvSbkPP.js +17 -0
- package/dist/{useTimeout-Dokw0W_A.js → useTimeout-BdvDipeg.js} +1 -1
- package/dist/{useTimeout-D8rbe5ty.cjs → useTimeout-XUWYBnl6.cjs} +1 -1
- package/package.json +18 -16
- package/dist/Box-DjpT-6Yv.cjs +0 -1
- package/dist/ButtonBase-BHN-4x4u.cjs +0 -75
- package/dist/CircularProgress-CjET2rvP.cjs +0 -28
- package/dist/DefaultButton-BoDg7xMm.cjs +0 -1
- package/dist/DefaultButton-y5BL9CKZ.js +0 -601
- package/dist/IconButton-fqTVX40x.cjs +0 -2
- package/dist/InputBase-DLc7Nf1T.cjs +0 -3
- package/dist/LocalizationProvider-B28kINsn.js +0 -575
- package/dist/LocalizationProvider-U4FHK15N.cjs +0 -5
- package/dist/SearchInput-B_Mgl-CJ.cjs +0 -1
- package/dist/SearchInput-DVccMSI6.js +0 -186
- package/dist/Tabs-Cij7O-J8.cjs +0 -4
- package/dist/TextInput-5zTkdX7s.cjs +0 -12
- package/dist/TimePicker-BRY05Sej.cjs +0 -73
- package/dist/TimePicker-CLolXFl8.js +0 -22074
- package/dist/Typography-6WB4M4zs.cjs +0 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +0 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.d.ts +0 -7
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +0 -6
- package/dist/components/LocalizationProvider/index.cjs.js +0 -1
- package/dist/components/LocalizationProvider/index.d.ts +0 -2
- package/dist/components/LocalizationProvider/index.es.js +0 -4
- package/dist/createSvgIcon-DQmDu_xr.cjs +0 -2
- package/dist/createSvgIcon-O41BSqQe.cjs +0 -1
- package/dist/fr-LokUOTE7.cjs +0 -1
- package/dist/fr-ndKV9IhC.js +0 -335
- package/dist/refType-DR4z34r8.cjs +0 -1
- package/dist/styled-D6_yEe4a.cjs +0 -26
- package/dist/styled-DSGBDqKV.js +0 -1218
- package/dist/useForkRef-DfdM2MN5.cjs +0 -1
- package/dist/useSlotProps-CXRrw38p.cjs +0 -1
- package/dist/useThemeProps-BktqG0To.cjs +0 -42
- package/dist/useThemeProps-DJpU2Yr7.js +0 -2428
- package/dist/{useForkRef-CQ5u1_mH.js → useForkRef-DwN_Iz9R.js} +1 -1
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import nr, { jsxs as ve, jsx as T, Fragment as Ue } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { r as ir } from "../../createSvgIcon-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(xe, "__esModule", {
|
|
2
|
+
import { A as or, P as f } from "../../identifier-D-ng7Qqa.js";
|
|
3
|
+
import { r as ir } from "../../createSvgIcon-DjuUwmEp.js";
|
|
4
|
+
import Fr, { useMemo as I, useRef as Q, useReducer as xr, useEffect as ye, useCallback as A, forwardRef as _r, useImperativeHandle as jr, Fragment as Sr } from "react";
|
|
5
|
+
import { S as Pr } from "../../Stack-BJ2ths-g.js";
|
|
6
|
+
import { T as be } from "../../Typography-B2XMXu83.js";
|
|
7
|
+
var Fe = {}, Tr = or;
|
|
8
|
+
Object.defineProperty(Fe, "__esModule", {
|
|
10
9
|
value: !0
|
|
11
10
|
});
|
|
12
|
-
var ar =
|
|
13
|
-
ar =
|
|
11
|
+
var ar = Fe.default = void 0, Ir = Tr(ir()), Cr = nr;
|
|
12
|
+
ar = Fe.default = (0, Ir.default)(/* @__PURE__ */ (0, Cr.jsx)("path", {
|
|
14
13
|
d: "M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"
|
|
15
14
|
}), "FileUpload");
|
|
16
|
-
var
|
|
17
|
-
Object.defineProperty(
|
|
15
|
+
var xe = {}, Rr = or;
|
|
16
|
+
Object.defineProperty(xe, "__esModule", {
|
|
18
17
|
value: !0
|
|
19
18
|
});
|
|
20
|
-
var ur =
|
|
21
|
-
ur =
|
|
19
|
+
var ur = xe.default = void 0, zr = Rr(ir()), kr = nr;
|
|
20
|
+
ur = xe.default = (0, zr.default)(/* @__PURE__ */ (0, kr.jsx)("path", {
|
|
22
21
|
d: "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"
|
|
23
22
|
}), "UploadFile");
|
|
24
23
|
function C(e, r, t, n) {
|
|
@@ -50,8 +49,7 @@ function C(e, r, t, n) {
|
|
|
50
49
|
}
|
|
51
50
|
function R(e, r) {
|
|
52
51
|
var t = { label: 0, sent: function() {
|
|
53
|
-
if (o[0] & 1)
|
|
54
|
-
throw o[1];
|
|
52
|
+
if (o[0] & 1) throw o[1];
|
|
55
53
|
return o[1];
|
|
56
54
|
}, trys: [], ops: [] }, n, i, o, c;
|
|
57
55
|
return c = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
@@ -63,83 +61,75 @@ function R(e, r) {
|
|
|
63
61
|
};
|
|
64
62
|
}
|
|
65
63
|
function d(l) {
|
|
66
|
-
if (n)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
default:
|
|
86
|
-
if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
87
|
-
t = 0;
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
|
|
91
|
-
t.label = l[1];
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
if (l[0] === 6 && t.label < o[1]) {
|
|
95
|
-
t.label = o[1], o = l;
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
if (o && t.label < o[2]) {
|
|
99
|
-
t.label = o[2], t.ops.push(l);
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
o[2] && t.ops.pop(), t.trys.pop();
|
|
64
|
+
if (n) throw new TypeError("Generator is already executing.");
|
|
65
|
+
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
66
|
+
if (n = 1, i && (o = l[0] & 2 ? i.return : l[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, l[1])).done) return o;
|
|
67
|
+
switch (i = 0, o && (l = [l[0] & 2, o.value]), l[0]) {
|
|
68
|
+
case 0:
|
|
69
|
+
case 1:
|
|
70
|
+
o = l;
|
|
71
|
+
break;
|
|
72
|
+
case 4:
|
|
73
|
+
return t.label++, { value: l[1], done: !1 };
|
|
74
|
+
case 5:
|
|
75
|
+
t.label++, i = l[1], l = [0];
|
|
76
|
+
continue;
|
|
77
|
+
case 7:
|
|
78
|
+
l = t.ops.pop(), t.trys.pop();
|
|
79
|
+
continue;
|
|
80
|
+
default:
|
|
81
|
+
if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
82
|
+
t = 0;
|
|
103
83
|
continue;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
84
|
+
}
|
|
85
|
+
if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
|
|
86
|
+
t.label = l[1];
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
if (l[0] === 6 && t.label < o[1]) {
|
|
90
|
+
t.label = o[1], o = l;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
if (o && t.label < o[2]) {
|
|
94
|
+
t.label = o[2], t.ops.push(l);
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
o[2] && t.ops.pop(), t.trys.pop();
|
|
98
|
+
continue;
|
|
110
99
|
}
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
l = r.call(e, t);
|
|
101
|
+
} catch (m) {
|
|
102
|
+
l = [6, m], i = 0;
|
|
103
|
+
} finally {
|
|
104
|
+
n = o = 0;
|
|
105
|
+
}
|
|
106
|
+
if (l[0] & 5) throw l[1];
|
|
113
107
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
114
108
|
}
|
|
115
109
|
}
|
|
116
110
|
function qe(e, r) {
|
|
117
111
|
var t = typeof Symbol == "function" && e[Symbol.iterator];
|
|
118
|
-
if (!t)
|
|
119
|
-
return e;
|
|
112
|
+
if (!t) return e;
|
|
120
113
|
var n = t.call(e), i, o = [], c;
|
|
121
114
|
try {
|
|
122
|
-
for (; (r === void 0 || r-- > 0) && !(i = n.next()).done; )
|
|
123
|
-
o.push(i.value);
|
|
115
|
+
for (; (r === void 0 || r-- > 0) && !(i = n.next()).done; ) o.push(i.value);
|
|
124
116
|
} catch (s) {
|
|
125
117
|
c = { error: s };
|
|
126
118
|
} finally {
|
|
127
119
|
try {
|
|
128
120
|
i && !i.done && (t = n.return) && t.call(n);
|
|
129
121
|
} finally {
|
|
130
|
-
if (c)
|
|
131
|
-
throw c.error;
|
|
122
|
+
if (c) throw c.error;
|
|
132
123
|
}
|
|
133
124
|
}
|
|
134
125
|
return o;
|
|
135
126
|
}
|
|
136
127
|
function Ne(e, r, t) {
|
|
137
|
-
if (t || arguments.length === 2)
|
|
138
|
-
|
|
139
|
-
(o || !(n in r)) && (o || (o = Array.prototype.slice.call(r, 0, n)), o[n] = r[n]);
|
|
128
|
+
if (t || arguments.length === 2) for (var n = 0, i = r.length, o; n < i; n++)
|
|
129
|
+
(o || !(n in r)) && (o || (o = Array.prototype.slice.call(r, 0, n)), o[n] = r[n]);
|
|
140
130
|
return e.concat(o || Array.prototype.slice.call(r));
|
|
141
131
|
}
|
|
142
|
-
var
|
|
132
|
+
var Lr = /* @__PURE__ */ new Map([
|
|
143
133
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
|
144
134
|
["aac", "audio/aac"],
|
|
145
135
|
["abw", "application/x-abiword"],
|
|
@@ -223,8 +213,8 @@ var Mr = /* @__PURE__ */ new Map([
|
|
|
223
213
|
["mov", "video/quicktime"],
|
|
224
214
|
["msg", "application/vnd.ms-outlook"]
|
|
225
215
|
]);
|
|
226
|
-
function
|
|
227
|
-
var t =
|
|
216
|
+
function B(e, r) {
|
|
217
|
+
var t = Mr(e);
|
|
228
218
|
if (typeof t.path != "string") {
|
|
229
219
|
var n = e.webkitRelativePath;
|
|
230
220
|
Object.defineProperty(t, "path", {
|
|
@@ -236,10 +226,10 @@ function W(e, r) {
|
|
|
236
226
|
}
|
|
237
227
|
return t;
|
|
238
228
|
}
|
|
239
|
-
function
|
|
229
|
+
function Mr(e) {
|
|
240
230
|
var r = e.name, t = r && r.lastIndexOf(".") !== -1;
|
|
241
231
|
if (t && !e.type) {
|
|
242
|
-
var n = r.split(".").pop().toLowerCase(), i =
|
|
232
|
+
var n = r.split(".").pop().toLowerCase(), i = Lr.get(n);
|
|
243
233
|
i && Object.defineProperty(e, "type", {
|
|
244
234
|
value: i,
|
|
245
235
|
writable: !1,
|
|
@@ -249,22 +239,22 @@ function $r(e) {
|
|
|
249
239
|
}
|
|
250
240
|
return e;
|
|
251
241
|
}
|
|
252
|
-
var
|
|
242
|
+
var $r = [
|
|
253
243
|
// Thumbnail cache files for macOS and Windows
|
|
254
244
|
".DS_Store",
|
|
255
245
|
"Thumbs.db"
|
|
256
246
|
// Windows
|
|
257
247
|
];
|
|
258
|
-
function
|
|
248
|
+
function Kr(e) {
|
|
259
249
|
return C(this, void 0, void 0, function() {
|
|
260
250
|
return R(this, function(r) {
|
|
261
|
-
return Z(e) &&
|
|
251
|
+
return Z(e) && Hr(e.dataTransfer) ? [2, qr(e.dataTransfer, e.type)] : Wr(e) ? [2, Br(e)] : Array.isArray(e) && e.every(function(t) {
|
|
262
252
|
return "getFile" in t && typeof t.getFile == "function";
|
|
263
|
-
}) ? [2,
|
|
253
|
+
}) ? [2, Ur(e)] : [2, []];
|
|
264
254
|
});
|
|
265
255
|
});
|
|
266
256
|
}
|
|
267
|
-
function
|
|
257
|
+
function Hr(e) {
|
|
268
258
|
return Z(e);
|
|
269
259
|
}
|
|
270
260
|
function Wr(e) {
|
|
@@ -273,12 +263,12 @@ function Wr(e) {
|
|
|
273
263
|
function Z(e) {
|
|
274
264
|
return typeof e == "object" && e !== null;
|
|
275
265
|
}
|
|
276
|
-
function
|
|
266
|
+
function Br(e) {
|
|
277
267
|
return De(e.target.files).map(function(r) {
|
|
278
|
-
return
|
|
268
|
+
return B(r);
|
|
279
269
|
});
|
|
280
270
|
}
|
|
281
|
-
function
|
|
271
|
+
function Ur(e) {
|
|
282
272
|
return C(this, void 0, void 0, function() {
|
|
283
273
|
var r;
|
|
284
274
|
return R(this, function(t) {
|
|
@@ -289,13 +279,13 @@ function qr(e) {
|
|
|
289
279
|
}))];
|
|
290
280
|
case 1:
|
|
291
281
|
return r = t.sent(), [2, r.map(function(n) {
|
|
292
|
-
return
|
|
282
|
+
return B(n);
|
|
293
283
|
})];
|
|
294
284
|
}
|
|
295
285
|
});
|
|
296
286
|
});
|
|
297
287
|
}
|
|
298
|
-
function
|
|
288
|
+
function qr(e, r) {
|
|
299
289
|
return C(this, void 0, void 0, function() {
|
|
300
290
|
var t, n;
|
|
301
291
|
return R(this, function(i) {
|
|
@@ -303,12 +293,12 @@ function Nr(e, r) {
|
|
|
303
293
|
case 0:
|
|
304
294
|
return e.items ? (t = De(e.items).filter(function(o) {
|
|
305
295
|
return o.kind === "file";
|
|
306
|
-
}), r !== "drop" ? [2, t] : [4, Promise.all(t.map(
|
|
296
|
+
}), r !== "drop" ? [2, t] : [4, Promise.all(t.map(Nr))]) : [3, 2];
|
|
307
297
|
case 1:
|
|
308
298
|
return n = i.sent(), [2, Ge(cr(n))];
|
|
309
299
|
case 2:
|
|
310
300
|
return [2, Ge(De(e.files).map(function(o) {
|
|
311
|
-
return
|
|
301
|
+
return B(o);
|
|
312
302
|
}))];
|
|
313
303
|
}
|
|
314
304
|
});
|
|
@@ -316,7 +306,7 @@ function Nr(e, r) {
|
|
|
316
306
|
}
|
|
317
307
|
function Ge(e) {
|
|
318
308
|
return e.filter(function(r) {
|
|
319
|
-
return
|
|
309
|
+
return $r.indexOf(r.name) === -1;
|
|
320
310
|
});
|
|
321
311
|
}
|
|
322
312
|
function De(e) {
|
|
@@ -328,7 +318,7 @@ function De(e) {
|
|
|
328
318
|
}
|
|
329
319
|
return r;
|
|
330
320
|
}
|
|
331
|
-
function
|
|
321
|
+
function Nr(e) {
|
|
332
322
|
if (typeof e.webkitGetAsEntry != "function")
|
|
333
323
|
return Ye(e);
|
|
334
324
|
var r = e.webkitGetAsEntry();
|
|
@@ -343,13 +333,13 @@ function Ye(e) {
|
|
|
343
333
|
var r = e.getAsFile();
|
|
344
334
|
if (!r)
|
|
345
335
|
return Promise.reject("".concat(e, " is not a File"));
|
|
346
|
-
var t =
|
|
336
|
+
var t = B(r);
|
|
347
337
|
return Promise.resolve(t);
|
|
348
338
|
}
|
|
349
|
-
function
|
|
339
|
+
function Gr(e) {
|
|
350
340
|
return C(this, void 0, void 0, function() {
|
|
351
341
|
return R(this, function(r) {
|
|
352
|
-
return [2, e.isDirectory ? lr(e) :
|
|
342
|
+
return [2, e.isDirectory ? lr(e) : Yr(e)];
|
|
353
343
|
});
|
|
354
344
|
});
|
|
355
345
|
}
|
|
@@ -365,8 +355,7 @@ function lr(e) {
|
|
|
365
355
|
return R(this, function(y) {
|
|
366
356
|
switch (y.label) {
|
|
367
357
|
case 0:
|
|
368
|
-
if (s.length)
|
|
369
|
-
return [3, 5];
|
|
358
|
+
if (s.length) return [3, 5];
|
|
370
359
|
y.label = 1;
|
|
371
360
|
case 1:
|
|
372
361
|
return y.trys.push([1, 3, , 4]), [4, Promise.all(i)];
|
|
@@ -377,7 +366,7 @@ function lr(e) {
|
|
|
377
366
|
case 4:
|
|
378
367
|
return [3, 6];
|
|
379
368
|
case 5:
|
|
380
|
-
m = Promise.all(s.map(
|
|
369
|
+
m = Promise.all(s.map(Gr)), i.push(m), o(), y.label = 6;
|
|
381
370
|
case 6:
|
|
382
371
|
return [
|
|
383
372
|
2
|
|
@@ -393,12 +382,12 @@ function lr(e) {
|
|
|
393
382
|
o();
|
|
394
383
|
});
|
|
395
384
|
}
|
|
396
|
-
function
|
|
385
|
+
function Yr(e) {
|
|
397
386
|
return C(this, void 0, void 0, function() {
|
|
398
387
|
return R(this, function(r) {
|
|
399
388
|
return [2, new Promise(function(t, n) {
|
|
400
389
|
e.file(function(i) {
|
|
401
|
-
var o =
|
|
390
|
+
var o = B(i, e.fullPath);
|
|
402
391
|
t(o);
|
|
403
392
|
}, function(i) {
|
|
404
393
|
n(i);
|
|
@@ -407,7 +396,7 @@ function Vr(e) {
|
|
|
407
396
|
});
|
|
408
397
|
});
|
|
409
398
|
}
|
|
410
|
-
var
|
|
399
|
+
var Vr = function(e, r) {
|
|
411
400
|
if (e && r) {
|
|
412
401
|
var t = Array.isArray(r) ? r : r.split(","), n = e.name || "", i = (e.type || "").toLowerCase(), o = i.replace(/\/.*$/, "");
|
|
413
402
|
return t.some(function(c) {
|
|
@@ -418,19 +407,17 @@ var Jr = function(e, r) {
|
|
|
418
407
|
return !0;
|
|
419
408
|
};
|
|
420
409
|
function Ve(e) {
|
|
421
|
-
return
|
|
410
|
+
return Xr(e) || Qr(e) || fr(e) || Jr();
|
|
422
411
|
}
|
|
423
|
-
function
|
|
412
|
+
function Jr() {
|
|
424
413
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
425
414
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
426
415
|
}
|
|
427
|
-
function
|
|
428
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
|
|
429
|
-
return Array.from(e);
|
|
416
|
+
function Qr(e) {
|
|
417
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
430
418
|
}
|
|
431
|
-
function
|
|
432
|
-
if (Array.isArray(e))
|
|
433
|
-
return we(e);
|
|
419
|
+
function Xr(e) {
|
|
420
|
+
if (Array.isArray(e)) return we(e);
|
|
434
421
|
}
|
|
435
422
|
function Je(e, r) {
|
|
436
423
|
var t = Object.keys(e);
|
|
@@ -456,22 +443,19 @@ function Qe(e) {
|
|
|
456
443
|
function sr(e, r, t) {
|
|
457
444
|
return r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
|
|
458
445
|
}
|
|
459
|
-
function
|
|
460
|
-
return
|
|
446
|
+
function W(e, r) {
|
|
447
|
+
return rt(e) || et(e, r) || fr(e, r) || Zr();
|
|
461
448
|
}
|
|
462
|
-
function
|
|
449
|
+
function Zr() {
|
|
463
450
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
464
451
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
465
452
|
}
|
|
466
453
|
function fr(e, r) {
|
|
467
454
|
if (e) {
|
|
468
|
-
if (typeof e == "string")
|
|
469
|
-
return we(e, r);
|
|
455
|
+
if (typeof e == "string") return we(e, r);
|
|
470
456
|
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
471
|
-
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set")
|
|
472
|
-
|
|
473
|
-
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
|
|
474
|
-
return we(e, r);
|
|
457
|
+
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
|
|
458
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return we(e, r);
|
|
475
459
|
}
|
|
476
460
|
}
|
|
477
461
|
function we(e, r) {
|
|
@@ -480,7 +464,7 @@ function we(e, r) {
|
|
|
480
464
|
n[t] = e[t];
|
|
481
465
|
return n;
|
|
482
466
|
}
|
|
483
|
-
function
|
|
467
|
+
function et(e, r) {
|
|
484
468
|
var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
485
469
|
if (t != null) {
|
|
486
470
|
var n = [], i = !0, o = !1, c, s;
|
|
@@ -493,64 +477,58 @@ function rt(e, r) {
|
|
|
493
477
|
try {
|
|
494
478
|
!i && t.return != null && t.return();
|
|
495
479
|
} finally {
|
|
496
|
-
if (o)
|
|
497
|
-
throw s;
|
|
480
|
+
if (o) throw s;
|
|
498
481
|
}
|
|
499
482
|
}
|
|
500
483
|
return n;
|
|
501
484
|
}
|
|
502
485
|
}
|
|
503
|
-
function
|
|
504
|
-
if (Array.isArray(e))
|
|
505
|
-
return e;
|
|
486
|
+
function rt(e) {
|
|
487
|
+
if (Array.isArray(e)) return e;
|
|
506
488
|
}
|
|
507
|
-
var
|
|
489
|
+
var tt = "file-invalid-type", nt = "file-too-large", ot = "file-too-small", it = "too-many-files", at = function(r) {
|
|
508
490
|
r = Array.isArray(r) && r.length === 1 ? r[0] : r;
|
|
509
491
|
var t = Array.isArray(r) ? "one of ".concat(r.join(", ")) : r;
|
|
510
492
|
return {
|
|
511
|
-
code:
|
|
493
|
+
code: tt,
|
|
512
494
|
message: "File type must be ".concat(t)
|
|
513
495
|
};
|
|
514
496
|
}, Xe = function(r) {
|
|
515
497
|
return {
|
|
516
|
-
code:
|
|
498
|
+
code: nt,
|
|
517
499
|
message: "File is larger than ".concat(r, " ").concat(r === 1 ? "byte" : "bytes")
|
|
518
500
|
};
|
|
519
501
|
}, Ze = function(r) {
|
|
520
502
|
return {
|
|
521
|
-
code:
|
|
503
|
+
code: ot,
|
|
522
504
|
message: "File is smaller than ".concat(r, " ").concat(r === 1 ? "byte" : "bytes")
|
|
523
505
|
};
|
|
524
|
-
},
|
|
525
|
-
code:
|
|
506
|
+
}, ut = {
|
|
507
|
+
code: it,
|
|
526
508
|
message: "Too many files"
|
|
527
509
|
};
|
|
528
510
|
function pr(e, r) {
|
|
529
|
-
var t = e.type === "application/x-moz-file" ||
|
|
530
|
-
return [t, t ? null :
|
|
511
|
+
var t = e.type === "application/x-moz-file" || Vr(e, r);
|
|
512
|
+
return [t, t ? null : at(r)];
|
|
531
513
|
}
|
|
532
514
|
function dr(e, r, t) {
|
|
533
|
-
if (
|
|
534
|
-
if (
|
|
535
|
-
if (e.size > t)
|
|
536
|
-
|
|
537
|
-
if (e.size < r)
|
|
538
|
-
return [!1, Ze(r)];
|
|
515
|
+
if (x(e.size))
|
|
516
|
+
if (x(r) && x(t)) {
|
|
517
|
+
if (e.size > t) return [!1, Xe(t)];
|
|
518
|
+
if (e.size < r) return [!1, Ze(r)];
|
|
539
519
|
} else {
|
|
540
|
-
if (
|
|
541
|
-
|
|
542
|
-
if (F(t) && e.size > t)
|
|
543
|
-
return [!1, Xe(t)];
|
|
520
|
+
if (x(r) && e.size < r) return [!1, Ze(r)];
|
|
521
|
+
if (x(t) && e.size > t) return [!1, Xe(t)];
|
|
544
522
|
}
|
|
545
523
|
return [!0, null];
|
|
546
524
|
}
|
|
547
|
-
function
|
|
525
|
+
function x(e) {
|
|
548
526
|
return e != null;
|
|
549
527
|
}
|
|
550
|
-
function
|
|
528
|
+
function ct(e) {
|
|
551
529
|
var r = e.files, t = e.accept, n = e.minSize, i = e.maxSize, o = e.multiple, c = e.maxFiles, s = e.validator;
|
|
552
530
|
return !o && r.length > 1 || o && c >= 1 && r.length > c ? !1 : r.every(function(d) {
|
|
553
|
-
var l = pr(d, t), m =
|
|
531
|
+
var l = pr(d, t), m = W(l, 1), y = m[0], z = dr(d, n, i), k = W(z, 1), L = k[0], M = s ? s(d) : null;
|
|
554
532
|
return y && L && !M;
|
|
555
533
|
});
|
|
556
534
|
}
|
|
@@ -565,15 +543,15 @@ function X(e) {
|
|
|
565
543
|
function er(e) {
|
|
566
544
|
e.preventDefault();
|
|
567
545
|
}
|
|
568
|
-
function
|
|
546
|
+
function lt(e) {
|
|
569
547
|
return e.indexOf("MSIE") !== -1 || e.indexOf("Trident/") !== -1;
|
|
570
548
|
}
|
|
571
|
-
function
|
|
549
|
+
function st(e) {
|
|
572
550
|
return e.indexOf("Edge/") !== -1;
|
|
573
551
|
}
|
|
574
|
-
function
|
|
552
|
+
function ft() {
|
|
575
553
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
576
|
-
return
|
|
554
|
+
return lt(e) || st(e);
|
|
577
555
|
}
|
|
578
556
|
function E() {
|
|
579
557
|
for (var e = arguments.length, r = new Array(e), t = 0; t < e; t++)
|
|
@@ -586,16 +564,16 @@ function E() {
|
|
|
586
564
|
});
|
|
587
565
|
};
|
|
588
566
|
}
|
|
589
|
-
function
|
|
567
|
+
function pt() {
|
|
590
568
|
return "showOpenFilePicker" in window;
|
|
591
569
|
}
|
|
592
|
-
function
|
|
593
|
-
if (
|
|
570
|
+
function dt(e) {
|
|
571
|
+
if (x(e)) {
|
|
594
572
|
var r = Object.entries(e).filter(function(t) {
|
|
595
|
-
var n =
|
|
573
|
+
var n = W(t, 2), i = n[0], o = n[1], c = !0;
|
|
596
574
|
return mr(i) || (console.warn('Skipped "'.concat(i, '" 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.')), c = !1), (!Array.isArray(o) || !o.every(gr)) && (console.warn('Skipped "'.concat(i, '" because an invalid file extension was provided.')), c = !1), c;
|
|
597
575
|
}).reduce(function(t, n) {
|
|
598
|
-
var i =
|
|
576
|
+
var i = W(n, 2), o = i[0], c = i[1];
|
|
599
577
|
return Qe(Qe({}, t), {}, sr({}, o, c));
|
|
600
578
|
}, {});
|
|
601
579
|
return [{
|
|
@@ -606,19 +584,19 @@ function mt(e) {
|
|
|
606
584
|
}
|
|
607
585
|
return e;
|
|
608
586
|
}
|
|
609
|
-
function
|
|
610
|
-
if (
|
|
587
|
+
function mt(e) {
|
|
588
|
+
if (x(e))
|
|
611
589
|
return Object.entries(e).reduce(function(r, t) {
|
|
612
|
-
var n =
|
|
590
|
+
var n = W(t, 2), i = n[0], o = n[1];
|
|
613
591
|
return [].concat(Ve(r), [i], Ve(o));
|
|
614
592
|
}, []).filter(function(r) {
|
|
615
593
|
return mr(r) || gr(r);
|
|
616
594
|
}).join(",");
|
|
617
595
|
}
|
|
618
|
-
function
|
|
596
|
+
function gt(e) {
|
|
619
597
|
return e instanceof DOMException && (e.name === "AbortError" || e.code === e.ABORT_ERR);
|
|
620
598
|
}
|
|
621
|
-
function
|
|
599
|
+
function vt(e) {
|
|
622
600
|
return e instanceof DOMException && (e.name === "SecurityError" || e.code === e.SECURITY_ERR);
|
|
623
601
|
}
|
|
624
602
|
function mr(e) {
|
|
@@ -627,24 +605,22 @@ function mr(e) {
|
|
|
627
605
|
function gr(e) {
|
|
628
606
|
return /^.*\.[\w]+$/.test(e);
|
|
629
607
|
}
|
|
630
|
-
var
|
|
631
|
-
function
|
|
632
|
-
return
|
|
608
|
+
var yt = ["children"], bt = ["open"], ht = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], Dt = ["refKey", "onChange", "onClick"];
|
|
609
|
+
function wt(e) {
|
|
610
|
+
return Ot(e) || Et(e) || vr(e) || At();
|
|
633
611
|
}
|
|
634
|
-
function
|
|
612
|
+
function At() {
|
|
635
613
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
636
614
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
637
615
|
}
|
|
638
|
-
function
|
|
639
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
|
|
640
|
-
return Array.from(e);
|
|
616
|
+
function Et(e) {
|
|
617
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
641
618
|
}
|
|
642
|
-
function
|
|
643
|
-
if (Array.isArray(e))
|
|
644
|
-
return Ae(e);
|
|
619
|
+
function Ot(e) {
|
|
620
|
+
if (Array.isArray(e)) return Ae(e);
|
|
645
621
|
}
|
|
646
622
|
function he(e, r) {
|
|
647
|
-
return
|
|
623
|
+
return _t(e) || xt(e, r) || vr(e, r) || Ft();
|
|
648
624
|
}
|
|
649
625
|
function Ft() {
|
|
650
626
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -652,13 +628,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
652
628
|
}
|
|
653
629
|
function vr(e, r) {
|
|
654
630
|
if (e) {
|
|
655
|
-
if (typeof e == "string")
|
|
656
|
-
return Ae(e, r);
|
|
631
|
+
if (typeof e == "string") return Ae(e, r);
|
|
657
632
|
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
658
|
-
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set")
|
|
659
|
-
|
|
660
|
-
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
|
|
661
|
-
return Ae(e, r);
|
|
633
|
+
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
|
|
634
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ae(e, r);
|
|
662
635
|
}
|
|
663
636
|
}
|
|
664
637
|
function Ae(e, r) {
|
|
@@ -667,7 +640,7 @@ function Ae(e, r) {
|
|
|
667
640
|
n[t] = e[t];
|
|
668
641
|
return n;
|
|
669
642
|
}
|
|
670
|
-
function
|
|
643
|
+
function xt(e, r) {
|
|
671
644
|
var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
672
645
|
if (t != null) {
|
|
673
646
|
var n = [], i = !0, o = !1, c, s;
|
|
@@ -680,16 +653,14 @@ function _t(e, r) {
|
|
|
680
653
|
try {
|
|
681
654
|
!i && t.return != null && t.return();
|
|
682
655
|
} finally {
|
|
683
|
-
if (o)
|
|
684
|
-
throw s;
|
|
656
|
+
if (o) throw s;
|
|
685
657
|
}
|
|
686
658
|
}
|
|
687
659
|
return n;
|
|
688
660
|
}
|
|
689
661
|
}
|
|
690
|
-
function
|
|
691
|
-
if (Array.isArray(e))
|
|
692
|
-
return e;
|
|
662
|
+
function _t(e) {
|
|
663
|
+
if (Array.isArray(e)) return e;
|
|
693
664
|
}
|
|
694
665
|
function rr(e, r) {
|
|
695
666
|
var t = Object.keys(e);
|
|
@@ -716,9 +687,8 @@ function Ee(e, r, t) {
|
|
|
716
687
|
return r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
|
|
717
688
|
}
|
|
718
689
|
function re(e, r) {
|
|
719
|
-
if (e == null)
|
|
720
|
-
|
|
721
|
-
var t = St(e, r), n, i;
|
|
690
|
+
if (e == null) return {};
|
|
691
|
+
var t = jt(e, r), n, i;
|
|
722
692
|
if (Object.getOwnPropertySymbols) {
|
|
723
693
|
var o = Object.getOwnPropertySymbols(e);
|
|
724
694
|
for (i = 0; i < o.length; i++)
|
|
@@ -726,28 +696,27 @@ function re(e, r) {
|
|
|
726
696
|
}
|
|
727
697
|
return t;
|
|
728
698
|
}
|
|
729
|
-
function
|
|
730
|
-
if (e == null)
|
|
731
|
-
return {};
|
|
699
|
+
function jt(e, r) {
|
|
700
|
+
if (e == null) return {};
|
|
732
701
|
var t = {}, n = Object.keys(e), i, o;
|
|
733
702
|
for (o = 0; o < n.length; o++)
|
|
734
703
|
i = n[o], !(r.indexOf(i) >= 0) && (t[i] = e[i]);
|
|
735
704
|
return t;
|
|
736
705
|
}
|
|
737
706
|
var _e = /* @__PURE__ */ _r(function(e, r) {
|
|
738
|
-
var t = e.children, n = re(e,
|
|
707
|
+
var t = e.children, n = re(e, yt), i = br(n), o = i.open, c = re(i, bt);
|
|
739
708
|
return jr(r, function() {
|
|
740
709
|
return {
|
|
741
710
|
open: o
|
|
742
711
|
};
|
|
743
|
-
}, [o]), /* @__PURE__ */
|
|
712
|
+
}, [o]), /* @__PURE__ */ Fr.createElement(Sr, null, t(p(p({}, c), {}, {
|
|
744
713
|
open: o
|
|
745
714
|
})));
|
|
746
715
|
});
|
|
747
716
|
_e.displayName = "Dropzone";
|
|
748
717
|
var yr = {
|
|
749
718
|
disabled: !1,
|
|
750
|
-
getFilesFromEvent:
|
|
719
|
+
getFilesFromEvent: Kr,
|
|
751
720
|
maxSize: 1 / 0,
|
|
752
721
|
minSize: 0,
|
|
753
722
|
multiple: !0,
|
|
@@ -941,14 +910,14 @@ var Oe = {
|
|
|
941
910
|
};
|
|
942
911
|
function br() {
|
|
943
912
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = p(p({}, yr), e), t = r.accept, n = r.disabled, i = r.getFilesFromEvent, o = r.maxSize, c = r.minSize, s = r.multiple, d = r.maxFiles, l = r.onDragEnter, m = r.onDragLeave, y = r.onDragOver, z = r.onDrop, k = r.onDropAccepted, L = r.onDropRejected, M = r.onFileDialogCancel, te = r.onFileDialogOpen, je = r.useFsAccessApi, Se = r.autoFocus, ne = r.preventDropOnDocument, Pe = r.noClick, oe = r.noKeyboard, Te = r.noDrag, O = r.noDragEventsBubbling, ie = r.onError, $ = r.validator, K = I(function() {
|
|
944
|
-
return gt(t);
|
|
945
|
-
}, [t]), Ie = I(function() {
|
|
946
913
|
return mt(t);
|
|
914
|
+
}, [t]), Ie = I(function() {
|
|
915
|
+
return dt(t);
|
|
947
916
|
}, [t]), ae = I(function() {
|
|
948
917
|
return typeof te == "function" ? te : tr;
|
|
949
918
|
}, [te]), U = I(function() {
|
|
950
919
|
return typeof M == "function" ? M : tr;
|
|
951
|
-
}, [M]), b = Q(null), w = Q(null), hr =
|
|
920
|
+
}, [M]), b = Q(null), w = Q(null), hr = xr(St, Oe), Ce = he(hr, 2), ue = Ce[0], h = Ce[1], Dr = ue.isFocused, Re = ue.isFileDialogActive, q = Q(typeof window < "u" && window.isSecureContext && je && pt()), ze = function() {
|
|
952
921
|
!q.current && Re && setTimeout(function() {
|
|
953
922
|
if (w.current) {
|
|
954
923
|
var u = w.current.files;
|
|
@@ -974,12 +943,12 @@ function br() {
|
|
|
974
943
|
return !n && Se && b.current && b.current.focus(), function() {
|
|
975
944
|
};
|
|
976
945
|
}, [b, Se, n]);
|
|
977
|
-
var
|
|
946
|
+
var F = A(function(a) {
|
|
978
947
|
ie ? ie(a) : console.error(a);
|
|
979
948
|
}, [ie]), Le = A(function(a) {
|
|
980
|
-
a.preventDefault(), a.persist(), V(a), _.current = [].concat(
|
|
949
|
+
a.preventDefault(), a.persist(), V(a), _.current = [].concat(wt(_.current), [a.target]), X(a) && Promise.resolve(i(a)).then(function(u) {
|
|
981
950
|
if (!(ee(a) && !O)) {
|
|
982
|
-
var g = u.length, v = g > 0 &&
|
|
951
|
+
var g = u.length, v = g > 0 && ct({
|
|
983
952
|
files: u,
|
|
984
953
|
accept: K,
|
|
985
954
|
minSize: c,
|
|
@@ -996,9 +965,9 @@ function br() {
|
|
|
996
965
|
}), l && l(a);
|
|
997
966
|
}
|
|
998
967
|
}).catch(function(u) {
|
|
999
|
-
return
|
|
968
|
+
return F(u);
|
|
1000
969
|
});
|
|
1001
|
-
}, [i, l,
|
|
970
|
+
}, [i, l, F, O, K, c, o, s, d, $]), Me = A(function(a) {
|
|
1002
971
|
a.preventDefault(), a.persist(), V(a);
|
|
1003
972
|
var u = X(a);
|
|
1004
973
|
if (u && a.dataTransfer)
|
|
@@ -1036,7 +1005,7 @@ function br() {
|
|
|
1036
1005
|
}), (!s && g.length > 1 || s && d >= 1 && g.length > d) && (g.forEach(function(D) {
|
|
1037
1006
|
v.push({
|
|
1038
1007
|
file: D,
|
|
1039
|
-
errors: [
|
|
1008
|
+
errors: [ut]
|
|
1040
1009
|
});
|
|
1041
1010
|
}), g.splice(0)), h({
|
|
1042
1011
|
acceptedFiles: g,
|
|
@@ -1047,11 +1016,11 @@ function br() {
|
|
|
1047
1016
|
a.preventDefault(), a.persist(), V(a), _.current = [], X(a) && Promise.resolve(i(a)).then(function(u) {
|
|
1048
1017
|
ee(a) && !O || N(u, a);
|
|
1049
1018
|
}).catch(function(u) {
|
|
1050
|
-
return
|
|
1019
|
+
return F(u);
|
|
1051
1020
|
}), h({
|
|
1052
1021
|
type: "reset"
|
|
1053
1022
|
});
|
|
1054
|
-
}, [i, N,
|
|
1023
|
+
}, [i, N, F, O]), j = A(function() {
|
|
1055
1024
|
if (q.current) {
|
|
1056
1025
|
h({
|
|
1057
1026
|
type: "openDialog"
|
|
@@ -1067,27 +1036,27 @@ function br() {
|
|
|
1067
1036
|
type: "closeDialog"
|
|
1068
1037
|
});
|
|
1069
1038
|
}).catch(function(u) {
|
|
1070
|
-
|
|
1039
|
+
gt(u) ? (U(u), h({
|
|
1071
1040
|
type: "closeDialog"
|
|
1072
|
-
})) :
|
|
1041
|
+
})) : vt(u) ? (q.current = !1, w.current ? (w.current.value = null, w.current.click()) : F(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : F(u);
|
|
1073
1042
|
});
|
|
1074
1043
|
return;
|
|
1075
1044
|
}
|
|
1076
1045
|
w.current && (h({
|
|
1077
1046
|
type: "openDialog"
|
|
1078
1047
|
}), ae(), w.current.value = null, w.current.click());
|
|
1079
|
-
}, [h, ae, U, je, N,
|
|
1048
|
+
}, [h, ae, U, je, N, F, Ie, s]), Ke = A(function(a) {
|
|
1080
1049
|
!b.current || !b.current.isEqualNode(a.target) || (a.key === " " || a.key === "Enter" || a.keyCode === 32 || a.keyCode === 13) && (a.preventDefault(), j());
|
|
1081
1050
|
}, [b, j]), He = A(function() {
|
|
1082
1051
|
h({
|
|
1083
1052
|
type: "focus"
|
|
1084
1053
|
});
|
|
1085
|
-
}, []),
|
|
1054
|
+
}, []), We = A(function() {
|
|
1086
1055
|
h({
|
|
1087
1056
|
type: "blur"
|
|
1088
1057
|
});
|
|
1089
|
-
}, []),
|
|
1090
|
-
Pe || (
|
|
1058
|
+
}, []), Be = A(function() {
|
|
1059
|
+
Pe || (ft() ? setTimeout(j, 0) : j());
|
|
1091
1060
|
}, [Pe, j]), S = function(u) {
|
|
1092
1061
|
return n ? null : u;
|
|
1093
1062
|
}, ce = function(u) {
|
|
@@ -1098,12 +1067,12 @@ function br() {
|
|
|
1098
1067
|
O && u.stopPropagation();
|
|
1099
1068
|
}, wr = I(function() {
|
|
1100
1069
|
return function() {
|
|
1101
|
-
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, u = a.refKey, g = u === void 0 ? "ref" : u, v = a.role, D = a.onKeyDown, H = a.onFocus, P = a.onBlur, le = a.onClick, se = a.onDragEnter, fe = a.onDragOver, J = a.onDragLeave, pe = a.onDrop, de = re(a,
|
|
1070
|
+
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, u = a.refKey, g = u === void 0 ? "ref" : u, v = a.role, D = a.onKeyDown, H = a.onFocus, P = a.onBlur, le = a.onClick, se = a.onDragEnter, fe = a.onDragOver, J = a.onDragLeave, pe = a.onDrop, de = re(a, ht);
|
|
1102
1071
|
return p(p(Ee({
|
|
1103
1072
|
onKeyDown: ce(E(D, Ke)),
|
|
1104
1073
|
onFocus: ce(E(H, He)),
|
|
1105
|
-
onBlur: ce(E(P,
|
|
1106
|
-
onClick: S(E(le,
|
|
1074
|
+
onBlur: ce(E(P, We)),
|
|
1075
|
+
onClick: S(E(le, Be)),
|
|
1107
1076
|
onDragEnter: Y(E(se, Le)),
|
|
1108
1077
|
onDragOver: Y(E(fe, Me)),
|
|
1109
1078
|
onDragLeave: Y(E(J, $e)),
|
|
@@ -1113,11 +1082,11 @@ function br() {
|
|
|
1113
1082
|
tabIndex: 0
|
|
1114
1083
|
} : {}), de);
|
|
1115
1084
|
};
|
|
1116
|
-
}, [b, Ke, He,
|
|
1085
|
+
}, [b, Ke, He, We, Be, Le, Me, $e, G, oe, Te, n]), Ar = A(function(a) {
|
|
1117
1086
|
a.stopPropagation();
|
|
1118
1087
|
}, []), Er = I(function() {
|
|
1119
1088
|
return function() {
|
|
1120
|
-
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, u = a.refKey, g = u === void 0 ? "ref" : u, v = a.onChange, D = a.onClick, H = re(a,
|
|
1089
|
+
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, u = a.refKey, g = u === void 0 ? "ref" : u, v = a.onChange, D = a.onClick, H = re(a, Dt), P = Ee({
|
|
1121
1090
|
accept: K,
|
|
1122
1091
|
multiple: s,
|
|
1123
1092
|
type: "file",
|
|
@@ -1140,7 +1109,7 @@ function br() {
|
|
|
1140
1109
|
open: S(j)
|
|
1141
1110
|
});
|
|
1142
1111
|
}
|
|
1143
|
-
function
|
|
1112
|
+
function St(e, r) {
|
|
1144
1113
|
switch (r.type) {
|
|
1145
1114
|
case "focus":
|
|
1146
1115
|
return p(p({}, e), {}, {
|
|
@@ -1177,40 +1146,43 @@ function Pt(e, r) {
|
|
|
1177
1146
|
}
|
|
1178
1147
|
function tr() {
|
|
1179
1148
|
}
|
|
1180
|
-
const
|
|
1181
|
-
display: "flex",
|
|
1182
|
-
flexDirection: "column",
|
|
1183
|
-
justifyContent: "center",
|
|
1184
|
-
alignItems: "center",
|
|
1185
|
-
gap: "0.5rem",
|
|
1186
|
-
padding: "0.5rem",
|
|
1187
|
-
width: "20rem",
|
|
1188
|
-
height: "10rem",
|
|
1189
|
-
border: "1px dashed",
|
|
1190
|
-
borderColor: e.palette.grey[500],
|
|
1191
|
-
borderRadius: 4,
|
|
1192
|
-
cursor: "pointer"
|
|
1193
|
-
})), $t = ({
|
|
1149
|
+
const kt = ({
|
|
1194
1150
|
defaultLabel: e = "Glisser et déposer des fichiers ici, ou cliquer pour sélectionner des fichiers",
|
|
1195
1151
|
dragLabel: r = "Déposer les fichiers ici",
|
|
1196
1152
|
information: t,
|
|
1197
1153
|
...n
|
|
1198
1154
|
}) => {
|
|
1199
|
-
const { getRootProps: i, getInputProps: o, isDragActive: c } = br(
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1155
|
+
const { getRootProps: i, getInputProps: o, isDragActive: c } = br(n);
|
|
1156
|
+
return /* @__PURE__ */ ve(
|
|
1157
|
+
Pr,
|
|
1158
|
+
{
|
|
1159
|
+
direction: "column",
|
|
1160
|
+
justifyContent: "center",
|
|
1161
|
+
alignItems: "center",
|
|
1162
|
+
spacing: 1,
|
|
1163
|
+
width: "18rem",
|
|
1164
|
+
padding: 1,
|
|
1165
|
+
border: "1px dashed",
|
|
1166
|
+
borderColor: "grey.main",
|
|
1167
|
+
borderRadius: 1,
|
|
1168
|
+
sx: {
|
|
1169
|
+
cursor: "pointer"
|
|
1170
|
+
},
|
|
1171
|
+
...i(),
|
|
1172
|
+
children: [
|
|
1173
|
+
/* @__PURE__ */ T("input", { ...o() }),
|
|
1174
|
+
c ? /* @__PURE__ */ ve(Ue, { children: [
|
|
1175
|
+
/* @__PURE__ */ T(ar, { color: "primary" }),
|
|
1176
|
+
/* @__PURE__ */ T(be, { children: r })
|
|
1177
|
+
] }) : /* @__PURE__ */ ve(Ue, { children: [
|
|
1178
|
+
/* @__PURE__ */ T(ur, { color: "primary" }),
|
|
1179
|
+
/* @__PURE__ */ T(be, { children: e }),
|
|
1180
|
+
t ? /* @__PURE__ */ T(be, { fontSize: "0.875rem", color: "grey", children: t }) : null
|
|
1181
|
+
] })
|
|
1182
|
+
]
|
|
1183
|
+
}
|
|
1184
|
+
);
|
|
1213
1185
|
};
|
|
1214
1186
|
export {
|
|
1215
|
-
|
|
1187
|
+
kt as default
|
|
1216
1188
|
};
|