formik-form-components 0.2.14 → 0.2.15
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/index.d.ts +32 -44
- package/dist/index.js +1590 -304
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1588 -302
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var DatePicker = require('@mui/x-date-pickers/DatePicker');
|
|
|
7
7
|
var LocalizationProvider = require('@mui/x-date-pickers/LocalizationProvider');
|
|
8
8
|
var AdapterDayjs = require('@mui/x-date-pickers/AdapterDayjs');
|
|
9
9
|
var dayjs = require('dayjs');
|
|
10
|
-
var
|
|
10
|
+
var _19 = require('lodash');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
var DateTimePicker = require('@mui/x-date-pickers/DateTimePicker');
|
|
13
13
|
var Autocomplete3 = require('@mui/material/Autocomplete');
|
|
@@ -34,12 +34,15 @@ var UndoIcon = require('@mui/icons-material/Undo');
|
|
|
34
34
|
var RedoIcon = require('@mui/icons-material/Redo');
|
|
35
35
|
var CloudUploadIcon = require('@mui/icons-material/CloudUpload');
|
|
36
36
|
var CloseIcon = require('@mui/icons-material/Close');
|
|
37
|
-
var
|
|
37
|
+
var styles = require('@mui/material/styles');
|
|
38
|
+
var reactLazyLoadImageComponent = require('react-lazy-load-image-component');
|
|
39
|
+
var framerMotion = require('framer-motion');
|
|
38
40
|
var reactDropzone = require('react-dropzone');
|
|
41
|
+
var reactI18next = require('react-i18next');
|
|
39
42
|
|
|
40
43
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
41
44
|
|
|
42
|
-
var
|
|
45
|
+
var _19__default = /*#__PURE__*/_interopDefault(_19);
|
|
43
46
|
var Autocomplete3__default = /*#__PURE__*/_interopDefault(Autocomplete3);
|
|
44
47
|
var Typography10__default = /*#__PURE__*/_interopDefault(Typography10);
|
|
45
48
|
var Select__default = /*#__PURE__*/_interopDefault(Select);
|
|
@@ -84,9 +87,9 @@ var AppDatePicker = react.forwardRef(
|
|
|
84
87
|
...otherProps
|
|
85
88
|
}, ref) => {
|
|
86
89
|
const { values, setFieldValue, touched, errors, setFieldTouched } = formik.useFormikContext();
|
|
87
|
-
const fieldValue =
|
|
88
|
-
const fieldError =
|
|
89
|
-
const isTouched =
|
|
90
|
+
const fieldValue = _19__default.default.get(values, name);
|
|
91
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
92
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
90
93
|
const handleChange = (newValue, context) => {
|
|
91
94
|
setFieldValue(name, newValue);
|
|
92
95
|
if (externalOnChange) {
|
|
@@ -224,9 +227,9 @@ var AppDateAndTimePicker = react.forwardRef((props, ref) => {
|
|
|
224
227
|
} = props;
|
|
225
228
|
const theme = material.useTheme();
|
|
226
229
|
const { errors, touched, values, setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
227
|
-
const fieldError =
|
|
228
|
-
const isTouched =
|
|
229
|
-
const val =
|
|
230
|
+
const fieldError = _19.get(errors, name);
|
|
231
|
+
const isTouched = _19.get(touched, name);
|
|
232
|
+
const val = _19.get(values, name);
|
|
230
233
|
const handleChange = (value) => {
|
|
231
234
|
setFieldValue(name, value);
|
|
232
235
|
if (externalOnChange) {
|
|
@@ -402,8 +405,8 @@ function AppFormErrorMessage({
|
|
|
402
405
|
textSx
|
|
403
406
|
}) {
|
|
404
407
|
const { errors, touched } = formik.useFormikContext();
|
|
405
|
-
const fieldError =
|
|
406
|
-
const isTouched =
|
|
408
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
409
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
407
410
|
const showError = fieldError && typeof fieldError === "string";
|
|
408
411
|
if (alwaysShow) {
|
|
409
412
|
return showError ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -480,9 +483,9 @@ var AppTextArea = react.forwardRef(({
|
|
|
480
483
|
}, ref) => {
|
|
481
484
|
var _a, _b, _c, _d;
|
|
482
485
|
const { errors, getFieldProps, touched, setFieldValue } = formik.useFormikContext();
|
|
483
|
-
const fieldError =
|
|
484
|
-
const isTouched =
|
|
485
|
-
const value =
|
|
486
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
487
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
488
|
+
const value = _19__default.default.get(getFieldProps(name), "value", "");
|
|
486
489
|
const handleChange = (e) => {
|
|
487
490
|
const newValue = e.target.value;
|
|
488
491
|
if (maxLength && newValue.length > maxLength)
|
|
@@ -636,9 +639,9 @@ function AppTagsCreator({
|
|
|
636
639
|
inputSx
|
|
637
640
|
}) {
|
|
638
641
|
const { errors, touched, getFieldProps, values, setFieldValue, setTouched } = formik.useFormikContext();
|
|
639
|
-
const fieldError =
|
|
640
|
-
const isTouched =
|
|
641
|
-
const val =
|
|
642
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
643
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
644
|
+
const val = _19__default.default.get(values, name);
|
|
642
645
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
643
646
|
material.FormControl,
|
|
644
647
|
{
|
|
@@ -761,8 +764,8 @@ function AppSwitchInput({
|
|
|
761
764
|
...otherProps
|
|
762
765
|
}) {
|
|
763
766
|
const { errors, touched, setFieldValue, values } = formik.useFormikContext();
|
|
764
|
-
const fieldError =
|
|
765
|
-
const isTouched =
|
|
767
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
768
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
766
769
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
767
770
|
material.Box,
|
|
768
771
|
{
|
|
@@ -851,9 +854,9 @@ function AppSwitch({
|
|
|
851
854
|
...otherProps
|
|
852
855
|
}) {
|
|
853
856
|
const { errors, touched, setFieldValue, values } = formik.useFormikContext();
|
|
854
|
-
const fieldValue =
|
|
855
|
-
const fieldError =
|
|
856
|
-
const isTouched =
|
|
857
|
+
const fieldValue = _19__default.default.get(values, name);
|
|
858
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
859
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
857
860
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
858
861
|
material.Stack,
|
|
859
862
|
{
|
|
@@ -950,9 +953,9 @@ function AppAutoComplete({
|
|
|
950
953
|
errorSx
|
|
951
954
|
}) {
|
|
952
955
|
const { errors, touched, getFieldProps, values, setFieldValue } = formik.useFormikContext();
|
|
953
|
-
const fieldError =
|
|
954
|
-
const isTouched =
|
|
955
|
-
const formikValue =
|
|
956
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
957
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
958
|
+
const formikValue = _19__default.default.get(values, name);
|
|
956
959
|
const val = propValue !== void 0 ? propValue : formikValue || [];
|
|
957
960
|
return /* @__PURE__ */ jsxRuntime.jsxs(material.FormControl, { fullWidth: true, variant: "filled", sx: formControlSx, children: [
|
|
958
961
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1024,9 +1027,9 @@ function AppAutoCompleter({
|
|
|
1024
1027
|
errorSx
|
|
1025
1028
|
}) {
|
|
1026
1029
|
const { errors, touched, values, setFieldValue } = formik.useFormikContext();
|
|
1027
|
-
const fieldError =
|
|
1028
|
-
const isTouched =
|
|
1029
|
-
const value =
|
|
1030
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
1031
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
1032
|
+
const value = _19__default.default.get(values, name);
|
|
1030
1033
|
const selectedOption = options.find((opt) => opt.value === value) || null;
|
|
1031
1034
|
return /* @__PURE__ */ jsxRuntime.jsxs(material.FormControl, { fullWidth: true, variant: "filled", sx: formControlSx, children: [
|
|
1032
1035
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1089,8 +1092,8 @@ var AppCheckBox = ({
|
|
|
1089
1092
|
...rest
|
|
1090
1093
|
}) => {
|
|
1091
1094
|
const { getFieldProps, setFieldValue, touched, errors } = formik.useFormikContext();
|
|
1092
|
-
const fieldError =
|
|
1093
|
-
const isTouched =
|
|
1095
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
1096
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
1094
1097
|
material.useTheme();
|
|
1095
1098
|
const value = getFieldProps(name).value;
|
|
1096
1099
|
const checkedValues = (() => {
|
|
@@ -1253,8 +1256,8 @@ function AppInputField({
|
|
|
1253
1256
|
...otherProps
|
|
1254
1257
|
}) {
|
|
1255
1258
|
const { errors, getFieldProps, touched } = formik.useFormikContext();
|
|
1256
|
-
const fieldError =
|
|
1257
|
-
const isTouched =
|
|
1259
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
1260
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
1258
1261
|
const [showPassword, setShowPassword] = react.useState(false);
|
|
1259
1262
|
const handleShowPassword = () => {
|
|
1260
1263
|
setShowPassword(!showPassword);
|
|
@@ -1345,9 +1348,9 @@ var AppMultiSelector = react.forwardRef(
|
|
|
1345
1348
|
}, ref) => {
|
|
1346
1349
|
const theme = material.useTheme();
|
|
1347
1350
|
const { errors, touched, values, setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
1348
|
-
const fieldError =
|
|
1349
|
-
const isTouched =
|
|
1350
|
-
const val =
|
|
1351
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
1352
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
1353
|
+
const val = _19__default.default.get(values, name);
|
|
1351
1354
|
const selectedValues = Array.isArray(val) ? val : [];
|
|
1352
1355
|
const handleChange = (event, child) => {
|
|
1353
1356
|
const newValue = event.target.value;
|
|
@@ -1605,8 +1608,8 @@ var AppPhoneNoInput = ({
|
|
|
1605
1608
|
...otherProps
|
|
1606
1609
|
}) => {
|
|
1607
1610
|
const { values, errors, touched, setFieldValue, getFieldProps } = formik.useFormikContext();
|
|
1608
|
-
const fieldError =
|
|
1609
|
-
const isTouched =
|
|
1611
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
1612
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
1610
1613
|
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: [{ mb: 2 }, containerSx, sx], children: [
|
|
1611
1614
|
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1612
1615
|
material.Typography,
|
|
@@ -1690,9 +1693,9 @@ var AppRadioGroup = react.forwardRef(({
|
|
|
1690
1693
|
...rest
|
|
1691
1694
|
}, ref) => {
|
|
1692
1695
|
const { errors, touched, getFieldProps, setFieldValue } = formik.useFormikContext();
|
|
1693
|
-
const fieldError =
|
|
1694
|
-
const isTouched =
|
|
1695
|
-
const value =
|
|
1696
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
1697
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
1698
|
+
const value = _19__default.default.get(getFieldProps(name), "value");
|
|
1696
1699
|
const handleChange = (event) => {
|
|
1697
1700
|
const newValue = event.target.value;
|
|
1698
1701
|
setFieldValue(name, newValue);
|
|
@@ -1870,9 +1873,9 @@ var AppRating = react.forwardRef(({
|
|
|
1870
1873
|
}, ref) => {
|
|
1871
1874
|
material.useTheme();
|
|
1872
1875
|
const { errors, touched, setFieldValue, values, setFieldTouched } = formik.useFormikContext();
|
|
1873
|
-
const val =
|
|
1874
|
-
const fieldError =
|
|
1875
|
-
const isTouched =
|
|
1876
|
+
const val = _19__default.default.get(values, name);
|
|
1877
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
1878
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
1876
1879
|
const hasError = Boolean(fieldError) && isTouched;
|
|
1877
1880
|
const handleChange = (event, newValue) => {
|
|
1878
1881
|
setFieldValue(name, newValue);
|
|
@@ -3553,7 +3556,7 @@ var Node = class {
|
|
|
3553
3556
|
copy2 = mark.addToSet(copy2);
|
|
3554
3557
|
}
|
|
3555
3558
|
if (!Mark.sameSet(copy2, this.marks))
|
|
3556
|
-
throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((
|
|
3559
|
+
throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((m2) => m2.type.name)}`);
|
|
3557
3560
|
this.content.forEach((node) => node.check());
|
|
3558
3561
|
}
|
|
3559
3562
|
/**
|
|
@@ -3802,17 +3805,17 @@ var ContentMatch = class {
|
|
|
3802
3805
|
*/
|
|
3803
3806
|
toString() {
|
|
3804
3807
|
let seen = [];
|
|
3805
|
-
function scan(
|
|
3806
|
-
seen.push(
|
|
3807
|
-
for (let i = 0; i <
|
|
3808
|
-
if (seen.indexOf(
|
|
3809
|
-
scan(
|
|
3808
|
+
function scan(m2) {
|
|
3809
|
+
seen.push(m2);
|
|
3810
|
+
for (let i = 0; i < m2.next.length; i++)
|
|
3811
|
+
if (seen.indexOf(m2.next[i].next) == -1)
|
|
3812
|
+
scan(m2.next[i].next);
|
|
3810
3813
|
}
|
|
3811
3814
|
scan(this);
|
|
3812
|
-
return seen.map((
|
|
3813
|
-
let out = i + (
|
|
3814
|
-
for (let i2 = 0; i2 <
|
|
3815
|
-
out += (i2 ? ", " : "") +
|
|
3815
|
+
return seen.map((m2, i) => {
|
|
3816
|
+
let out = i + (m2.validEnd ? "*" : " ") + " ";
|
|
3817
|
+
for (let i2 = 0; i2 < m2.next.length; i2++)
|
|
3818
|
+
out += (i2 ? ", " : "") + m2.next[i2].type.name + "->" + seen.indexOf(m2.next[i2].next);
|
|
3816
3819
|
return out;
|
|
3817
3820
|
}).join("\n");
|
|
3818
3821
|
}
|
|
@@ -4693,13 +4696,13 @@ var NodeContext = class {
|
|
|
4693
4696
|
}
|
|
4694
4697
|
finish(openEnd) {
|
|
4695
4698
|
if (!(this.options & OPT_PRESERVE_WS)) {
|
|
4696
|
-
let last = this.content[this.content.length - 1],
|
|
4697
|
-
if (last && last.isText && (
|
|
4699
|
+
let last = this.content[this.content.length - 1], m2;
|
|
4700
|
+
if (last && last.isText && (m2 = /[ \t\r\n\u000c]+$/.exec(last.text))) {
|
|
4698
4701
|
let text = last;
|
|
4699
|
-
if (last.text.length ==
|
|
4702
|
+
if (last.text.length == m2[0].length)
|
|
4700
4703
|
this.content.pop();
|
|
4701
4704
|
else
|
|
4702
|
-
this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length -
|
|
4705
|
+
this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m2[0].length));
|
|
4703
4706
|
}
|
|
4704
4707
|
}
|
|
4705
4708
|
let content = Fragment2.from(this.content);
|
|
@@ -4851,7 +4854,7 @@ var ParseContext = class {
|
|
|
4851
4854
|
if (rule.ignore)
|
|
4852
4855
|
return null;
|
|
4853
4856
|
if (rule.clearMark)
|
|
4854
|
-
marks = marks.filter((
|
|
4857
|
+
marks = marks.filter((m2) => !rule.clearMark(m2));
|
|
4855
4858
|
else
|
|
4856
4859
|
marks = marks.concat(this.parser.schema.marks[rule.mark].create(rule.attrs));
|
|
4857
4860
|
if (rule.consuming === false)
|
|
@@ -4957,9 +4960,9 @@ var ParseContext = class {
|
|
|
4957
4960
|
if (top.match)
|
|
4958
4961
|
top.match = top.match.matchType(node.type);
|
|
4959
4962
|
let nodeMarks = Mark.none;
|
|
4960
|
-
for (let
|
|
4961
|
-
if (top.type ? top.type.allowsMarkType(
|
|
4962
|
-
nodeMarks =
|
|
4963
|
+
for (let m2 of innerMarks.concat(node.marks))
|
|
4964
|
+
if (top.type ? top.type.allowsMarkType(m2.type) : markMayApply(m2.type, node.type))
|
|
4965
|
+
nodeMarks = m2.addToSet(nodeMarks);
|
|
4963
4966
|
top.content.push(node.mark(nodeMarks));
|
|
4964
4967
|
return true;
|
|
4965
4968
|
}
|
|
@@ -4982,9 +4985,9 @@ var ParseContext = class {
|
|
|
4982
4985
|
if (top.options & OPT_OPEN_LEFT && top.content.length == 0)
|
|
4983
4986
|
options |= OPT_OPEN_LEFT;
|
|
4984
4987
|
let applyMarks = Mark.none;
|
|
4985
|
-
marks = marks.filter((
|
|
4986
|
-
if (top.type ? top.type.allowsMarkType(
|
|
4987
|
-
applyMarks =
|
|
4988
|
+
marks = marks.filter((m2) => {
|
|
4989
|
+
if (top.type ? top.type.allowsMarkType(m2.type) : markMayApply(m2.type, type)) {
|
|
4990
|
+
applyMarks = m2.addToSet(applyMarks);
|
|
4988
4991
|
return false;
|
|
4989
4992
|
}
|
|
4990
4993
|
return true;
|
|
@@ -5372,10 +5375,10 @@ var Mapping = class {
|
|
|
5372
5375
|
/**
|
|
5373
5376
|
@internal
|
|
5374
5377
|
*/
|
|
5375
|
-
setMirror(n,
|
|
5378
|
+
setMirror(n, m2) {
|
|
5376
5379
|
if (!this.mirror)
|
|
5377
5380
|
this.mirror = [];
|
|
5378
|
-
this.mirror.push(n,
|
|
5381
|
+
this.mirror.push(n, m2);
|
|
5379
5382
|
}
|
|
5380
5383
|
/**
|
|
5381
5384
|
Append the inverse of the given mapping to this one.
|
|
@@ -5917,9 +5920,9 @@ function removeMark(tr, from, to, mark) {
|
|
|
5917
5920
|
for (let i = 0; i < toRemove.length; i++) {
|
|
5918
5921
|
let style = toRemove[i], found2;
|
|
5919
5922
|
for (let j = 0; j < matched.length; j++) {
|
|
5920
|
-
let
|
|
5921
|
-
if (
|
|
5922
|
-
found2 =
|
|
5923
|
+
let m2 = matched[j];
|
|
5924
|
+
if (m2.step == step - 1 && style.eq(matched[j].style))
|
|
5925
|
+
found2 = m2;
|
|
5923
5926
|
}
|
|
5924
5927
|
if (found2) {
|
|
5925
5928
|
found2.to = end;
|
|
@@ -5930,7 +5933,7 @@ function removeMark(tr, from, to, mark) {
|
|
|
5930
5933
|
}
|
|
5931
5934
|
}
|
|
5932
5935
|
});
|
|
5933
|
-
matched.forEach((
|
|
5936
|
+
matched.forEach((m2) => tr.step(new RemoveMarkStep(m2.from, m2.to, m2.style)));
|
|
5934
5937
|
}
|
|
5935
5938
|
function clearIncompatible(tr, pos, parentType, match = parentType.contentMatch, clearNewlines = true) {
|
|
5936
5939
|
let node = tr.doc.nodeAt(pos);
|
|
@@ -5946,11 +5949,11 @@ function clearIncompatible(tr, pos, parentType, match = parentType.contentMatch,
|
|
|
5946
5949
|
if (!parentType.allowsMarkType(child.marks[j].type))
|
|
5947
5950
|
tr.step(new RemoveMarkStep(cur, end, child.marks[j]));
|
|
5948
5951
|
if (clearNewlines && child.isText && parentType.whitespace != "pre") {
|
|
5949
|
-
let
|
|
5950
|
-
while (
|
|
5952
|
+
let m2, newline = /\r?\n|\r/g, slice;
|
|
5953
|
+
while (m2 = newline.exec(child.text)) {
|
|
5951
5954
|
if (!slice)
|
|
5952
5955
|
slice = new Slice(Fragment2.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
|
|
5953
|
-
replSteps.push(new ReplaceStep(cur +
|
|
5956
|
+
replSteps.push(new ReplaceStep(cur + m2.index, cur + m2.index + m2[0].length, slice));
|
|
5954
5957
|
}
|
|
5955
5958
|
}
|
|
5956
5959
|
}
|
|
@@ -6082,9 +6085,9 @@ function setBlockType(tr, from, to, type, attrs) {
|
|
|
6082
6085
|
function replaceNewlines(tr, node, pos, mapFrom) {
|
|
6083
6086
|
node.forEach((child, offset) => {
|
|
6084
6087
|
if (child.isText) {
|
|
6085
|
-
let
|
|
6086
|
-
while (
|
|
6087
|
-
let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset +
|
|
6088
|
+
let m2, newline = /\r?\n|\r/g;
|
|
6089
|
+
while (m2 = newline.exec(child.text)) {
|
|
6090
|
+
let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset + m2.index);
|
|
6088
6091
|
tr.replaceWith(start, start + 1, node.type.schema.linebreakReplacement.create());
|
|
6089
6092
|
}
|
|
6090
6093
|
}
|
|
@@ -10150,11 +10153,11 @@ var Mark2 = class _Mark extends Extendable {
|
|
|
10150
10153
|
const isAtEnd = currentPos.pos === currentPos.end();
|
|
10151
10154
|
if (isAtEnd) {
|
|
10152
10155
|
const currentMarks = currentPos.marks();
|
|
10153
|
-
const isInMark = !!currentMarks.find((
|
|
10156
|
+
const isInMark = !!currentMarks.find((m2) => (m2 == null ? void 0 : m2.type.name) === mark.name);
|
|
10154
10157
|
if (!isInMark) {
|
|
10155
10158
|
return false;
|
|
10156
10159
|
}
|
|
10157
|
-
const removeMark2 = currentMarks.find((
|
|
10160
|
+
const removeMark2 = currentMarks.find((m2) => (m2 == null ? void 0 : m2.type.name) === mark.name);
|
|
10158
10161
|
if (removeMark2) {
|
|
10159
10162
|
tr.removeStoredMark(removeMark2);
|
|
10160
10163
|
}
|
|
@@ -11558,10 +11561,10 @@ var AppSearchableMultiSelector = react.forwardRef(
|
|
|
11558
11561
|
}, ref) => {
|
|
11559
11562
|
material.useTheme();
|
|
11560
11563
|
const { values, setFieldValue, errors, touched, setFieldTouched } = formik.useFormikContext();
|
|
11561
|
-
const fieldError =
|
|
11562
|
-
const isTouched = Boolean(
|
|
11564
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
11565
|
+
const isTouched = Boolean(_19__default.default.get(touched, name));
|
|
11563
11566
|
const hasError = Boolean(fieldError) && isTouched;
|
|
11564
|
-
const val =
|
|
11567
|
+
const val = _19__default.default.get(values, name);
|
|
11565
11568
|
const selectedValues = Array.isArray(val) ? val : [];
|
|
11566
11569
|
const selectedCount = selectedValues.length;
|
|
11567
11570
|
const handleChange = (event, value, reason, details) => {
|
|
@@ -11937,9 +11940,9 @@ function AppSearchableSelectInput({
|
|
|
11937
11940
|
...otherProps
|
|
11938
11941
|
}) {
|
|
11939
11942
|
const { errors, touched, setFieldValue, values } = formik.useFormikContext();
|
|
11940
|
-
const fieldError =
|
|
11941
|
-
const isTouched =
|
|
11942
|
-
const val =
|
|
11943
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
11944
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
11945
|
+
const val = _19__default.default.get(values, name);
|
|
11943
11946
|
const selectedOption = options.find((option) => option.value === val) || null;
|
|
11944
11947
|
const handleChange = (event, newValue) => {
|
|
11945
11948
|
setFieldValue(name, newValue ? newValue.value : "");
|
|
@@ -12065,10 +12068,10 @@ var AppSelectInput = react.forwardRef(
|
|
|
12065
12068
|
}, ref) => {
|
|
12066
12069
|
const theme = material.useTheme();
|
|
12067
12070
|
const { errors, touched, values, setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
12068
|
-
const fieldError =
|
|
12069
|
-
const isTouched =
|
|
12071
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
12072
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
12070
12073
|
const hasError = Boolean(fieldError) && isTouched;
|
|
12071
|
-
const value =
|
|
12074
|
+
const value = _19__default.default.get(values, name);
|
|
12072
12075
|
const handleChange = (event, child) => {
|
|
12073
12076
|
setFieldValue(name, event.target.value, true);
|
|
12074
12077
|
if (externalOnChange) {
|
|
@@ -12310,8 +12313,8 @@ var AppSimpleUploadFile = ({
|
|
|
12310
12313
|
onError
|
|
12311
12314
|
}) => {
|
|
12312
12315
|
const { setFieldValue, values, errors, touched } = formik.useFormikContext();
|
|
12313
|
-
const fieldValue =
|
|
12314
|
-
const fieldError =
|
|
12316
|
+
const fieldValue = _19__default.default.get(values, name);
|
|
12317
|
+
const fieldError = _19__default.default.get(touched, name) ? _19__default.default.get(errors, name) : void 0;
|
|
12315
12318
|
const handleChange = (event) => {
|
|
12316
12319
|
const files = event.target.files;
|
|
12317
12320
|
if (!files || files.length === 0)
|
|
@@ -12432,244 +12435,1527 @@ var AppSimpleUploadFile = ({
|
|
|
12432
12435
|
] });
|
|
12433
12436
|
};
|
|
12434
12437
|
var AppSimpleUploadFile_default = AppSimpleUploadFile;
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
+
|
|
12439
|
+
// src/file-thumbnail/utils.ts
|
|
12440
|
+
var FORMAT_PDF = ["pdf"];
|
|
12441
|
+
var FORMAT_TEXT = ["txt"];
|
|
12442
|
+
var FORMAT_PHOTOSHOP = ["psd"];
|
|
12443
|
+
var FORMAT_WORD = ["doc", "docx"];
|
|
12444
|
+
var FORMAT_EXCEL = ["xls", "xlsx"];
|
|
12445
|
+
var FORMAT_ZIP = ["zip", "rar", "iso"];
|
|
12446
|
+
var FORMAT_ILLUSTRATOR = ["ai", "esp"];
|
|
12447
|
+
var FORMAT_POWERPOINT = ["ppt", "pptx"];
|
|
12448
|
+
var FORMAT_AUDIO = ["wav", "aif", "mp3", "aac"];
|
|
12449
|
+
var FORMAT_IMG = ["jpg", "jpeg", "gif", "bmp", "png", "svg"];
|
|
12450
|
+
var FORMAT_VIDEO = ["m4v", "avi", "mpg", "mp4", "webm"];
|
|
12451
|
+
var iconUrl = (icon) => `/assets/icons/files/${icon}.svg`;
|
|
12452
|
+
function fileFormat(fileUrl) {
|
|
12453
|
+
let format;
|
|
12454
|
+
switch (fileUrl == null ? void 0 : fileUrl.includes(fileTypeByUrl(fileUrl))) {
|
|
12455
|
+
case FORMAT_TEXT.includes(fileTypeByUrl(fileUrl)):
|
|
12456
|
+
format = "txt";
|
|
12457
|
+
break;
|
|
12458
|
+
case FORMAT_ZIP.includes(fileTypeByUrl(fileUrl)):
|
|
12459
|
+
format = "zip";
|
|
12460
|
+
break;
|
|
12461
|
+
case FORMAT_AUDIO.includes(fileTypeByUrl(fileUrl)):
|
|
12462
|
+
format = "audio";
|
|
12463
|
+
break;
|
|
12464
|
+
case FORMAT_IMG.includes(fileTypeByUrl(fileUrl)):
|
|
12465
|
+
format = "image";
|
|
12466
|
+
break;
|
|
12467
|
+
case FORMAT_VIDEO.includes(fileTypeByUrl(fileUrl)):
|
|
12468
|
+
format = "video";
|
|
12469
|
+
break;
|
|
12470
|
+
case FORMAT_WORD.includes(fileTypeByUrl(fileUrl)):
|
|
12471
|
+
format = "word";
|
|
12472
|
+
break;
|
|
12473
|
+
case FORMAT_EXCEL.includes(fileTypeByUrl(fileUrl)):
|
|
12474
|
+
format = "excel";
|
|
12475
|
+
break;
|
|
12476
|
+
case FORMAT_POWERPOINT.includes(fileTypeByUrl(fileUrl)):
|
|
12477
|
+
format = "powerpoint";
|
|
12478
|
+
break;
|
|
12479
|
+
case FORMAT_PDF.includes(fileTypeByUrl(fileUrl)):
|
|
12480
|
+
format = "pdf";
|
|
12481
|
+
break;
|
|
12482
|
+
case FORMAT_PHOTOSHOP.includes(fileTypeByUrl(fileUrl)):
|
|
12483
|
+
format = "photoshop";
|
|
12484
|
+
break;
|
|
12485
|
+
case FORMAT_ILLUSTRATOR.includes(fileTypeByUrl(fileUrl)):
|
|
12486
|
+
format = "illustrator";
|
|
12487
|
+
break;
|
|
12488
|
+
default:
|
|
12489
|
+
format = fileTypeByUrl(fileUrl);
|
|
12490
|
+
}
|
|
12491
|
+
return format;
|
|
12492
|
+
}
|
|
12493
|
+
function fileThumb(fileUrl) {
|
|
12494
|
+
let thumb;
|
|
12495
|
+
switch (fileFormat(fileUrl)) {
|
|
12496
|
+
case "folder":
|
|
12497
|
+
thumb = iconUrl("ic_folder");
|
|
12498
|
+
break;
|
|
12499
|
+
case "txt":
|
|
12500
|
+
thumb = iconUrl("ic_txt");
|
|
12501
|
+
break;
|
|
12502
|
+
case "zip":
|
|
12503
|
+
thumb = iconUrl("ic_zip");
|
|
12504
|
+
break;
|
|
12505
|
+
case "audio":
|
|
12506
|
+
thumb = iconUrl("ic_audio");
|
|
12507
|
+
break;
|
|
12508
|
+
case "video":
|
|
12509
|
+
thumb = iconUrl("ic_video");
|
|
12510
|
+
break;
|
|
12511
|
+
case "word":
|
|
12512
|
+
thumb = iconUrl("ic_word");
|
|
12513
|
+
break;
|
|
12514
|
+
case "excel":
|
|
12515
|
+
thumb = iconUrl("ic_excel");
|
|
12516
|
+
break;
|
|
12517
|
+
case "powerpoint":
|
|
12518
|
+
thumb = iconUrl("ic_power_point");
|
|
12519
|
+
break;
|
|
12520
|
+
case "pdf":
|
|
12521
|
+
thumb = iconUrl("ic_pdf");
|
|
12522
|
+
break;
|
|
12523
|
+
case "photoshop":
|
|
12524
|
+
thumb = iconUrl("ic_pts");
|
|
12525
|
+
break;
|
|
12526
|
+
case "illustrator":
|
|
12527
|
+
thumb = iconUrl("ic_ai");
|
|
12528
|
+
break;
|
|
12529
|
+
case "image":
|
|
12530
|
+
thumb = iconUrl("ic_img");
|
|
12531
|
+
break;
|
|
12532
|
+
default:
|
|
12533
|
+
thumb = iconUrl("ic_file");
|
|
12534
|
+
}
|
|
12535
|
+
return thumb;
|
|
12536
|
+
}
|
|
12537
|
+
function fileTypeByUrl(fileUrl = "") {
|
|
12538
|
+
return fileUrl && fileUrl.split(".").pop() || "";
|
|
12539
|
+
}
|
|
12540
|
+
function fileNameByUrl(fileUrl) {
|
|
12541
|
+
return fileUrl.split("/").pop();
|
|
12542
|
+
}
|
|
12543
|
+
function fileData(file) {
|
|
12544
|
+
if (typeof file === "string") {
|
|
12545
|
+
return {
|
|
12546
|
+
key: file,
|
|
12547
|
+
preview: file,
|
|
12548
|
+
name: fileNameByUrl(file),
|
|
12549
|
+
type: fileTypeByUrl(file)
|
|
12550
|
+
};
|
|
12551
|
+
}
|
|
12552
|
+
return {
|
|
12553
|
+
key: file == null ? void 0 : file.preview,
|
|
12554
|
+
name: file == null ? void 0 : file.name,
|
|
12555
|
+
size: file == null ? void 0 : file.size,
|
|
12556
|
+
path: file == null ? void 0 : file.path,
|
|
12557
|
+
type: file == null ? void 0 : file.type,
|
|
12558
|
+
preview: file == null ? void 0 : file.preview,
|
|
12559
|
+
lastModified: file == null ? void 0 : file.lastModified,
|
|
12560
|
+
lastModifiedDate: file == null ? void 0 : file.lastModifiedDate
|
|
12561
|
+
};
|
|
12562
|
+
}
|
|
12563
|
+
function DownloadButton({ onDownload }) {
|
|
12564
|
+
const theme = styles.useTheme();
|
|
12565
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12566
|
+
material.IconButton,
|
|
12567
|
+
{
|
|
12568
|
+
onClick: onDownload,
|
|
12569
|
+
sx: {
|
|
12570
|
+
p: 0,
|
|
12571
|
+
top: 0,
|
|
12572
|
+
right: 0,
|
|
12573
|
+
width: 1,
|
|
12574
|
+
height: 1,
|
|
12575
|
+
zIndex: 9,
|
|
12576
|
+
opacity: 0,
|
|
12577
|
+
position: "absolute",
|
|
12578
|
+
borderRadius: "unset",
|
|
12579
|
+
// color: 'common.white',
|
|
12580
|
+
justifyContent: "center",
|
|
12581
|
+
bgcolor: "grey.800",
|
|
12582
|
+
color: "common.white",
|
|
12583
|
+
transition: theme.transitions.create("opacity"),
|
|
12584
|
+
"&:hover": {
|
|
12585
|
+
opacity: 1,
|
|
12586
|
+
backgroundColor: styles.alpha(theme.palette.grey[900], 0.64),
|
|
12587
|
+
backdropFilter: "blur(6px)"
|
|
12588
|
+
}
|
|
12589
|
+
},
|
|
12590
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Iconify_default, { icon: "eva:arrow-circle-down-fill", width: 24 })
|
|
12591
|
+
}
|
|
12592
|
+
);
|
|
12593
|
+
}
|
|
12594
|
+
function FileThumbnail({
|
|
12595
|
+
file,
|
|
12596
|
+
tooltip,
|
|
12597
|
+
imageView,
|
|
12598
|
+
onDownload,
|
|
12599
|
+
sx,
|
|
12600
|
+
imgSx
|
|
12601
|
+
}) {
|
|
12602
|
+
const { name = "", path = "", preview = "" } = fileData(file);
|
|
12603
|
+
const format = fileFormat(path || preview);
|
|
12604
|
+
const renderContent = format === "image" && imageView === true ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
12605
|
+
material.Box,
|
|
12606
|
+
{
|
|
12607
|
+
component: "img",
|
|
12608
|
+
src: preview,
|
|
12609
|
+
sx: {
|
|
12610
|
+
width: 1,
|
|
12611
|
+
height: 1,
|
|
12612
|
+
flexShrink: 0,
|
|
12613
|
+
objectFit: "cover",
|
|
12614
|
+
...imgSx
|
|
12615
|
+
}
|
|
12616
|
+
}
|
|
12617
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12618
|
+
material.Box,
|
|
12619
|
+
{
|
|
12620
|
+
component: "img",
|
|
12621
|
+
src: fileThumb(format),
|
|
12622
|
+
sx: {
|
|
12623
|
+
width: 32,
|
|
12624
|
+
height: 32,
|
|
12625
|
+
flexShrink: 0,
|
|
12626
|
+
...sx
|
|
12627
|
+
}
|
|
12628
|
+
}
|
|
12629
|
+
);
|
|
12630
|
+
if (tooltip === true) {
|
|
12631
|
+
return /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: name, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12632
|
+
material.Stack,
|
|
12633
|
+
{
|
|
12634
|
+
flexShrink: 0,
|
|
12635
|
+
component: "span",
|
|
12636
|
+
alignItems: "center",
|
|
12637
|
+
justifyContent: "center",
|
|
12638
|
+
sx: {
|
|
12639
|
+
width: "fit-content",
|
|
12640
|
+
height: "inherit"
|
|
12641
|
+
},
|
|
12642
|
+
children: [
|
|
12643
|
+
renderContent,
|
|
12644
|
+
onDownload && /* @__PURE__ */ jsxRuntime.jsx(DownloadButton, { onDownload })
|
|
12645
|
+
]
|
|
12646
|
+
}
|
|
12647
|
+
) });
|
|
12648
|
+
}
|
|
12649
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12650
|
+
renderContent,
|
|
12651
|
+
onDownload && /* @__PURE__ */ jsxRuntime.jsx(DownloadButton, { onDownload })
|
|
12652
|
+
] });
|
|
12653
|
+
}
|
|
12654
|
+
function RejectionFiles({ fileRejections }) {
|
|
12655
|
+
if (!fileRejections.length) {
|
|
12656
|
+
return null;
|
|
12657
|
+
}
|
|
12658
|
+
function formatBytes2(bytes) {
|
|
12659
|
+
const b = bytes != null ? bytes : 0;
|
|
12660
|
+
if (b === 0)
|
|
12661
|
+
return "0 Bytes";
|
|
12662
|
+
const k = 1024;
|
|
12663
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
12664
|
+
const i = Math.floor(Math.log(b) / Math.log(k));
|
|
12665
|
+
return `${parseFloat((b / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;
|
|
12666
|
+
}
|
|
12667
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12668
|
+
material.Paper,
|
|
12669
|
+
{
|
|
12670
|
+
variant: "outlined",
|
|
12671
|
+
sx: {
|
|
12672
|
+
py: 1,
|
|
12673
|
+
px: 2,
|
|
12674
|
+
mt: 3,
|
|
12675
|
+
bgcolor: (theme) => styles.alpha(theme.palette.error.main, 0.08),
|
|
12676
|
+
borderColor: (theme) => styles.alpha(theme.palette.error.main, 0.24)
|
|
12677
|
+
},
|
|
12678
|
+
children: fileRejections.map(({ file, errors }) => {
|
|
12679
|
+
const { path, size } = fileData(file);
|
|
12680
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { my: 1 }, children: [
|
|
12681
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "subtitle2", noWrap: true, children: [
|
|
12682
|
+
path,
|
|
12683
|
+
" - ",
|
|
12684
|
+
size != null ? formatBytes2(size) : ""
|
|
12685
|
+
] }),
|
|
12686
|
+
errors.map((error) => /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { component: "span", sx: { typography: "caption" }, children: [
|
|
12687
|
+
"- ",
|
|
12688
|
+
error.message
|
|
12689
|
+
] }, error.code))
|
|
12690
|
+
] }, path);
|
|
12691
|
+
})
|
|
12692
|
+
}
|
|
12693
|
+
);
|
|
12694
|
+
}
|
|
12695
|
+
|
|
12696
|
+
// src/image/getRatio.ts
|
|
12697
|
+
function getRatio(ratio = "1/1") {
|
|
12698
|
+
return {
|
|
12699
|
+
"4/3": "calc(100% / 4 * 3)",
|
|
12700
|
+
"3/4": "calc(100% / 3 * 4)",
|
|
12701
|
+
"6/4": "calc(100% / 6 * 4)",
|
|
12702
|
+
"4/6": "calc(100% / 4 * 6)",
|
|
12703
|
+
"16/9": "calc(100% / 16 * 9)",
|
|
12704
|
+
"9/16": "calc(100% / 9 * 16)",
|
|
12705
|
+
"21/9": "calc(100% / 21 * 9)",
|
|
12706
|
+
"9/21": "calc(100% / 9 * 21)",
|
|
12707
|
+
"1/1": "100%"
|
|
12708
|
+
}[ratio];
|
|
12709
|
+
}
|
|
12710
|
+
var TRANSPARENT_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8Xw8AApIBgX6cJqkAAAAASUVORK5CYII=";
|
|
12711
|
+
var Image = react.forwardRef(
|
|
12712
|
+
({
|
|
12713
|
+
ratio,
|
|
12714
|
+
disabledEffect = false,
|
|
12715
|
+
effect = "blur",
|
|
12716
|
+
src,
|
|
12717
|
+
wrapperProps,
|
|
12718
|
+
style,
|
|
12719
|
+
sx,
|
|
12720
|
+
...other
|
|
12721
|
+
}, ref) => {
|
|
12722
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx(
|
|
12723
|
+
material.Box,
|
|
12724
|
+
{
|
|
12725
|
+
component: reactLazyLoadImageComponent.LazyLoadImage,
|
|
12726
|
+
wrapperClassName: "wrapper",
|
|
12727
|
+
effect: disabledEffect ? void 0 : effect,
|
|
12728
|
+
placeholderSrc: disabledEffect ? TRANSPARENT_PNG : TRANSPARENT_PNG,
|
|
12729
|
+
src,
|
|
12730
|
+
wrapperProps,
|
|
12731
|
+
style,
|
|
12732
|
+
sx: {
|
|
12733
|
+
width: 1,
|
|
12734
|
+
height: 1,
|
|
12735
|
+
objectFit: "cover",
|
|
12736
|
+
...sx
|
|
12737
|
+
},
|
|
12738
|
+
...other
|
|
12739
|
+
}
|
|
12740
|
+
);
|
|
12741
|
+
if (ratio) {
|
|
12742
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12743
|
+
material.Box,
|
|
12744
|
+
{
|
|
12745
|
+
ref,
|
|
12746
|
+
component: "span",
|
|
12747
|
+
sx: {
|
|
12748
|
+
width: 1,
|
|
12749
|
+
lineHeight: 1,
|
|
12750
|
+
display: "block",
|
|
12751
|
+
overflow: "hidden",
|
|
12752
|
+
position: "relative",
|
|
12753
|
+
pt: getRatio(ratio),
|
|
12754
|
+
"& .wrapper": {
|
|
12755
|
+
top: 0,
|
|
12756
|
+
left: 0,
|
|
12757
|
+
width: 1,
|
|
12758
|
+
height: 1,
|
|
12759
|
+
position: "absolute",
|
|
12760
|
+
backgroundSize: "cover !important"
|
|
12761
|
+
},
|
|
12762
|
+
...sx
|
|
12763
|
+
},
|
|
12764
|
+
children: content
|
|
12765
|
+
}
|
|
12766
|
+
);
|
|
12767
|
+
}
|
|
12768
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12769
|
+
material.Box,
|
|
12770
|
+
{
|
|
12771
|
+
ref,
|
|
12772
|
+
component: "span",
|
|
12773
|
+
sx: {
|
|
12774
|
+
lineHeight: 1,
|
|
12775
|
+
display: "block",
|
|
12776
|
+
overflow: "hidden",
|
|
12777
|
+
position: "relative",
|
|
12778
|
+
"& .wrapper": {
|
|
12779
|
+
width: 1,
|
|
12780
|
+
height: 1,
|
|
12781
|
+
backgroundSize: "cover !important"
|
|
12782
|
+
},
|
|
12783
|
+
...sx
|
|
12784
|
+
},
|
|
12785
|
+
children: content
|
|
12786
|
+
}
|
|
12787
|
+
);
|
|
12788
|
+
}
|
|
12789
|
+
);
|
|
12790
|
+
Image.displayName = "Image";
|
|
12791
|
+
var Image_default = Image;
|
|
12792
|
+
|
|
12793
|
+
// src/animate/variants/transition.ts
|
|
12794
|
+
var varTranEnter = (props) => {
|
|
12795
|
+
const duration = (props == null ? void 0 : props.durationIn) != null ? props == null ? void 0 : props.durationIn : 0.64;
|
|
12796
|
+
const ease = (props == null ? void 0 : props.easeIn) != null ? props == null ? void 0 : props.easeIn : [0.43, 0.13, 0.23, 0.96];
|
|
12797
|
+
return { duration, ease };
|
|
12798
|
+
};
|
|
12799
|
+
var varTranExit = (props) => {
|
|
12800
|
+
const duration = (props == null ? void 0 : props.durationOut) != null ? props == null ? void 0 : props.durationOut : 0.48;
|
|
12801
|
+
const ease = (props == null ? void 0 : props.easeOut) != null ? props == null ? void 0 : props.easeOut : [0.43, 0.13, 0.23, 0.96];
|
|
12802
|
+
return { duration, ease };
|
|
12803
|
+
};
|
|
12804
|
+
|
|
12805
|
+
// src/animate/variants/fade.ts
|
|
12806
|
+
var varFade = (props) => {
|
|
12807
|
+
const distance = (props == null ? void 0 : props.distance) != null ? props == null ? void 0 : props.distance : 120;
|
|
12808
|
+
const durationIn = props == null ? void 0 : props.durationIn;
|
|
12809
|
+
const durationOut = props == null ? void 0 : props.durationOut;
|
|
12810
|
+
const easeIn = props == null ? void 0 : props.easeIn;
|
|
12811
|
+
const easeOut = props == null ? void 0 : props.easeOut;
|
|
12812
|
+
return {
|
|
12813
|
+
// IN
|
|
12814
|
+
in: {
|
|
12815
|
+
initial: { opacity: 0 },
|
|
12816
|
+
animate: { opacity: 1, transition: varTranEnter },
|
|
12817
|
+
exit: { opacity: 0, transition: varTranExit }
|
|
12818
|
+
},
|
|
12819
|
+
inUp: {
|
|
12820
|
+
initial: { y: distance, opacity: 0 },
|
|
12821
|
+
animate: { y: 0, opacity: 1, transition: varTranEnter({ durationIn, easeIn }) },
|
|
12822
|
+
exit: { y: distance, opacity: 0, transition: varTranExit({ durationOut, easeOut }) }
|
|
12823
|
+
},
|
|
12824
|
+
inDown: {
|
|
12825
|
+
initial: { y: -distance, opacity: 0 },
|
|
12826
|
+
animate: { y: 0, opacity: 1, transition: varTranEnter({ durationIn, easeIn }) },
|
|
12827
|
+
exit: { y: -distance, opacity: 0, transition: varTranExit({ durationOut, easeOut }) }
|
|
12828
|
+
},
|
|
12829
|
+
inLeft: {
|
|
12830
|
+
initial: { x: -distance, opacity: 0 },
|
|
12831
|
+
animate: { x: 0, opacity: 1, transition: varTranEnter({ durationIn, easeIn }) },
|
|
12832
|
+
exit: { x: -distance, opacity: 0, transition: varTranExit({ durationOut, easeOut }) }
|
|
12833
|
+
},
|
|
12834
|
+
inRight: {
|
|
12835
|
+
initial: { x: distance, opacity: 0 },
|
|
12836
|
+
animate: { x: 0, opacity: 1, transition: varTranEnter({ durationIn, easeIn }) },
|
|
12837
|
+
exit: { x: distance, opacity: 0, transition: varTranExit({ durationOut, easeOut }) }
|
|
12838
|
+
},
|
|
12839
|
+
// OUT
|
|
12840
|
+
out: {
|
|
12841
|
+
initial: { opacity: 1 },
|
|
12842
|
+
animate: { opacity: 0, transition: varTranEnter({ durationIn, easeIn }) },
|
|
12843
|
+
exit: { opacity: 1, transition: varTranExit({ durationOut, easeOut }) }
|
|
12844
|
+
},
|
|
12845
|
+
outUp: {
|
|
12846
|
+
initial: { y: 0, opacity: 1 },
|
|
12847
|
+
animate: { y: -distance, opacity: 0, transition: varTranEnter({ durationIn, easeIn }) },
|
|
12848
|
+
exit: { y: 0, opacity: 1, transition: varTranExit({ durationOut, easeOut }) }
|
|
12849
|
+
},
|
|
12850
|
+
outDown: {
|
|
12851
|
+
initial: { y: 0, opacity: 1 },
|
|
12852
|
+
animate: { y: distance, opacity: 0, transition: varTranEnter({ durationIn, easeIn }) },
|
|
12853
|
+
exit: { y: 0, opacity: 1, transition: varTranExit({ durationOut, easeOut }) }
|
|
12854
|
+
},
|
|
12855
|
+
outLeft: {
|
|
12856
|
+
initial: { x: 0, opacity: 1 },
|
|
12857
|
+
animate: { x: -distance, opacity: 0, transition: varTranEnter({ durationIn, easeIn }) },
|
|
12858
|
+
exit: { x: 0, opacity: 1, transition: varTranExit({ durationOut, easeOut }) }
|
|
12859
|
+
},
|
|
12860
|
+
outRight: {
|
|
12861
|
+
initial: { x: 0, opacity: 1 },
|
|
12862
|
+
animate: { x: distance, opacity: 0, transition: varTranEnter({ durationIn, easeIn }) },
|
|
12863
|
+
exit: { x: 0, opacity: 1, transition: varTranExit({ durationOut, easeOut }) }
|
|
12864
|
+
}
|
|
12865
|
+
};
|
|
12866
|
+
};
|
|
12867
|
+
function formatBytes(bytes) {
|
|
12868
|
+
const b = bytes != null ? bytes : 0;
|
|
12869
|
+
if (b === 0)
|
|
12870
|
+
return "0 Bytes";
|
|
12871
|
+
const k = 1024;
|
|
12872
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
12873
|
+
const i = Math.floor(Math.log(b) / Math.log(k));
|
|
12874
|
+
return `${parseFloat((b / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;
|
|
12875
|
+
}
|
|
12876
|
+
function MultiFilePreview({
|
|
12877
|
+
thumbnail,
|
|
12878
|
+
files,
|
|
12879
|
+
onRemove,
|
|
12880
|
+
sx,
|
|
12881
|
+
isClickable,
|
|
12882
|
+
isEditable,
|
|
12883
|
+
onDeleteButtonClick,
|
|
12884
|
+
onPrivacyUpdateClick
|
|
12885
|
+
}) {
|
|
12886
|
+
if ((files == null ? void 0 : files.length) == null) {
|
|
12887
|
+
return null;
|
|
12888
|
+
}
|
|
12889
|
+
const [anchorEl, setAnchorEl] = react.useState(null);
|
|
12890
|
+
const [selectedFile, setSelectedFile] = react.useState(null);
|
|
12891
|
+
const canViewPrivate = true;
|
|
12892
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, children: files.map((file) => {
|
|
12893
|
+
const typedFile = file;
|
|
12894
|
+
const { key, name = "", size = 0 } = fileData(typedFile);
|
|
12895
|
+
const isStringFile = typeof file === "string";
|
|
12896
|
+
if (thumbnail === true) {
|
|
12897
|
+
return (
|
|
12898
|
+
// @ts-ignore
|
|
12899
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12900
|
+
material.Stack,
|
|
12901
|
+
{
|
|
12902
|
+
component: framerMotion.m.div,
|
|
12903
|
+
...varFade().inUp,
|
|
12904
|
+
alignItems: "center",
|
|
12905
|
+
display: "inline-flex",
|
|
12906
|
+
justifyContent: "center",
|
|
12907
|
+
sx: {
|
|
12908
|
+
m: 0.5,
|
|
12909
|
+
width: 80,
|
|
12910
|
+
height: 80,
|
|
12911
|
+
borderRadius: 1.25,
|
|
12912
|
+
overflow: "hidden",
|
|
12913
|
+
position: "relative",
|
|
12914
|
+
border: (theme) => `solid 1px ${theme.palette.divider}`,
|
|
12915
|
+
...sx
|
|
12916
|
+
},
|
|
12917
|
+
children: [
|
|
12918
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12919
|
+
FileThumbnail,
|
|
12920
|
+
{
|
|
12921
|
+
tooltip: true,
|
|
12922
|
+
imageView: true,
|
|
12923
|
+
file: typedFile,
|
|
12924
|
+
sx: { position: "absolute" },
|
|
12925
|
+
imgSx: { position: "absolute" }
|
|
12926
|
+
}
|
|
12927
|
+
),
|
|
12928
|
+
onRemove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12929
|
+
material.IconButton,
|
|
12930
|
+
{
|
|
12931
|
+
size: "small",
|
|
12932
|
+
onClick: () => onRemove(typedFile),
|
|
12933
|
+
sx: {
|
|
12934
|
+
top: 4,
|
|
12935
|
+
right: 4,
|
|
12936
|
+
p: "1px",
|
|
12937
|
+
position: "absolute",
|
|
12938
|
+
color: (theme) => styles.alpha(theme.palette.common.white, 0.72),
|
|
12939
|
+
bgcolor: (theme) => styles.alpha(theme.palette.grey[900], 0.48),
|
|
12940
|
+
"&:hover": {
|
|
12941
|
+
bgcolor: (theme) => styles.alpha(theme.palette.grey[900], 0.72)
|
|
12942
|
+
}
|
|
12943
|
+
},
|
|
12944
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Iconify_default, { icon: "eva:close-fill", width: 16 })
|
|
12945
|
+
}
|
|
12946
|
+
)
|
|
12947
|
+
]
|
|
12948
|
+
},
|
|
12949
|
+
key
|
|
12950
|
+
)
|
|
12951
|
+
);
|
|
12952
|
+
}
|
|
12953
|
+
return (
|
|
12954
|
+
// @ts-ignore
|
|
12955
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12956
|
+
material.Stack,
|
|
12957
|
+
{
|
|
12958
|
+
component: framerMotion.m.div,
|
|
12959
|
+
...varFade().inUp,
|
|
12960
|
+
spacing: 2,
|
|
12961
|
+
direction: "row",
|
|
12962
|
+
alignItems: "center",
|
|
12963
|
+
sx: {
|
|
12964
|
+
my: 1,
|
|
12965
|
+
px: 1,
|
|
12966
|
+
py: 0.75,
|
|
12967
|
+
borderRadius: 0.75,
|
|
12968
|
+
border: (theme) => `solid 1px ${theme.palette.divider}`,
|
|
12969
|
+
...sx,
|
|
12970
|
+
opacity: "1 !important",
|
|
12971
|
+
transform: "none !important"
|
|
12972
|
+
},
|
|
12973
|
+
children: [
|
|
12974
|
+
(typedFile == null ? void 0 : typedFile.preview) != null ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (typedFile == null ? void 0 : typedFile.is_private) === true && !canViewPrivate ? /* @__PURE__ */ jsxRuntime.jsx(Iconify_default, { icon: "garden:lock-locked-fill-12", sx: { width: "26px", height: "26px" } }) : (
|
|
12975
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
12976
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12977
|
+
"img",
|
|
12978
|
+
{
|
|
12979
|
+
src: `${typedFile == null ? void 0 : typedFile.preview}`,
|
|
12980
|
+
alt: (typedFile == null ? void 0 : typedFile.name) != null ? typedFile == null ? void 0 : typedFile.name : "",
|
|
12981
|
+
style: { width: "40px", height: "40px" }
|
|
12982
|
+
}
|
|
12983
|
+
)
|
|
12984
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx(FileThumbnail, { file: typedFile }),
|
|
12985
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12986
|
+
material.Stack,
|
|
12987
|
+
{
|
|
12988
|
+
flexGrow: 1,
|
|
12989
|
+
sx: { minWidth: 0, cursor: "pointer" },
|
|
12990
|
+
onClick: () => {
|
|
12991
|
+
if (isClickable === true && typedFile.url != null) {
|
|
12992
|
+
window.open(`${typedFile == null ? void 0 : typedFile.url}`, "_blank");
|
|
12993
|
+
}
|
|
12994
|
+
},
|
|
12995
|
+
children: [
|
|
12996
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "subtitle2", sx: { wordBreak: "break-all", whiteSpace: "break-spaces" }, noWrap: true, children: isStringFile ? file : name }),
|
|
12997
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "caption", sx: { color: "text.secondary" }, children: isStringFile ? "" : formatBytes(size) })
|
|
12998
|
+
]
|
|
12999
|
+
}
|
|
13000
|
+
),
|
|
13001
|
+
onRemove && /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { edge: "end", size: "small", onClick: () => onRemove(typedFile), children: /* @__PURE__ */ jsxRuntime.jsx(Iconify_default, { icon: "eva:close-fill" }) }),
|
|
13002
|
+
isEditable === true && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13003
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13004
|
+
material.IconButton,
|
|
13005
|
+
{
|
|
13006
|
+
edge: "end",
|
|
13007
|
+
size: "small",
|
|
13008
|
+
onClick: (event) => {
|
|
13009
|
+
event.stopPropagation();
|
|
13010
|
+
setAnchorEl(event.currentTarget);
|
|
13011
|
+
setSelectedFile(typedFile);
|
|
13012
|
+
},
|
|
13013
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Iconify_default, { icon: "eva:more-horizontal-fill" })
|
|
13014
|
+
}
|
|
13015
|
+
),
|
|
13016
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13017
|
+
material.Menu,
|
|
13018
|
+
{
|
|
13019
|
+
anchorEl,
|
|
13020
|
+
open: Boolean(anchorEl) && selectedFile === file,
|
|
13021
|
+
onClose: () => setAnchorEl(null),
|
|
13022
|
+
children: [
|
|
13023
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13024
|
+
material.MenuItem,
|
|
13025
|
+
{
|
|
13026
|
+
onClick: (e) => {
|
|
13027
|
+
e.stopPropagation();
|
|
13028
|
+
setAnchorEl(null);
|
|
13029
|
+
if (onDeleteButtonClick) {
|
|
13030
|
+
onDeleteButtonClick(typedFile);
|
|
13031
|
+
}
|
|
13032
|
+
},
|
|
13033
|
+
children: [
|
|
13034
|
+
/* @__PURE__ */ jsxRuntime.jsx(Iconify_default, { icon: "eva:trash-2-outline", width: 20 }),
|
|
13035
|
+
"Delete"
|
|
13036
|
+
]
|
|
13037
|
+
}
|
|
13038
|
+
),
|
|
13039
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13040
|
+
material.MenuItem,
|
|
13041
|
+
{
|
|
13042
|
+
onClick: (e) => {
|
|
13043
|
+
e.stopPropagation();
|
|
13044
|
+
if (onPrivacyUpdateClick) {
|
|
13045
|
+
onPrivacyUpdateClick(typedFile);
|
|
13046
|
+
}
|
|
13047
|
+
},
|
|
13048
|
+
children: [
|
|
13049
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13050
|
+
Iconify_default,
|
|
13051
|
+
{
|
|
13052
|
+
icon: (typedFile == null ? void 0 : typedFile.is_private) === true ? "eva:unlock-outline" : "eva:lock-outline",
|
|
13053
|
+
width: 20
|
|
13054
|
+
}
|
|
13055
|
+
),
|
|
13056
|
+
(typedFile == null ? void 0 : typedFile.is_private) === true ? "Public" : "Private"
|
|
13057
|
+
]
|
|
13058
|
+
}
|
|
13059
|
+
)
|
|
13060
|
+
]
|
|
13061
|
+
}
|
|
13062
|
+
)
|
|
13063
|
+
] })
|
|
13064
|
+
]
|
|
13065
|
+
},
|
|
13066
|
+
key
|
|
13067
|
+
)
|
|
13068
|
+
);
|
|
13069
|
+
}) });
|
|
13070
|
+
}
|
|
13071
|
+
function SingleFilePreview({
|
|
13072
|
+
file
|
|
13073
|
+
}) {
|
|
13074
|
+
if (!file) {
|
|
13075
|
+
return null;
|
|
13076
|
+
}
|
|
13077
|
+
const imgUrl = (typeof file === "string" ? file : file.preview) || "";
|
|
13078
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13079
|
+
material.Box,
|
|
13080
|
+
{
|
|
13081
|
+
sx: {
|
|
13082
|
+
position: "relative",
|
|
13083
|
+
width: "100%",
|
|
13084
|
+
height: "100%",
|
|
13085
|
+
"& .wrapper": {
|
|
13086
|
+
width: "100%",
|
|
13087
|
+
height: "100%",
|
|
13088
|
+
position: "relative"
|
|
13089
|
+
}
|
|
13090
|
+
},
|
|
13091
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13092
|
+
Image_default,
|
|
13093
|
+
{
|
|
13094
|
+
src: imgUrl,
|
|
13095
|
+
effect: "opacity",
|
|
13096
|
+
wrapperProps: {
|
|
13097
|
+
style: {
|
|
13098
|
+
width: "100%",
|
|
13099
|
+
height: "100%",
|
|
13100
|
+
position: "relative"
|
|
13101
|
+
}
|
|
13102
|
+
},
|
|
13103
|
+
style: {
|
|
13104
|
+
top: 8,
|
|
13105
|
+
left: 8,
|
|
13106
|
+
zIndex: 8,
|
|
13107
|
+
borderRadius: 1,
|
|
13108
|
+
position: "absolute",
|
|
13109
|
+
width: "calc(100% - 16px)",
|
|
13110
|
+
height: "calc(100% - 16px)",
|
|
13111
|
+
objectFit: "cover"
|
|
13112
|
+
}
|
|
13113
|
+
}
|
|
13114
|
+
)
|
|
13115
|
+
}
|
|
13116
|
+
);
|
|
13117
|
+
}
|
|
13118
|
+
function BackgroundIllustration() {
|
|
13119
|
+
const theme = styles.useTheme();
|
|
13120
|
+
const PRIMARY_MAIN = theme.palette.primary.main;
|
|
13121
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13122
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: "BG", x1: "19.496%", x2: "77.479%", y1: "71.822%", y2: "16.69%", children: [
|
|
13123
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: PRIMARY_MAIN }),
|
|
13124
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: PRIMARY_MAIN, stopOpacity: "0" })
|
|
13125
|
+
] }) }),
|
|
13126
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13127
|
+
"path",
|
|
13128
|
+
{
|
|
13129
|
+
fill: "url(#BG)",
|
|
13130
|
+
fillRule: "nonzero",
|
|
13131
|
+
d: "M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",
|
|
13132
|
+
opacity: "0.2"
|
|
13133
|
+
}
|
|
13134
|
+
)
|
|
13135
|
+
] });
|
|
13136
|
+
}
|
|
13137
|
+
var BackgroundIllustration_default = react.memo(BackgroundIllustration);
|
|
13138
|
+
function UploadIllustration({ ...other }) {
|
|
13139
|
+
const theme = styles.useTheme();
|
|
13140
|
+
const PRIMARY_MAIN = theme.palette.primary.main;
|
|
13141
|
+
const PRIMARY_DARK = theme.palette.primary.dark;
|
|
13142
|
+
const PRIMARY_DARKER = theme.palette.primary.dark;
|
|
13143
|
+
return /* @__PURE__ */ jsxRuntime.jsx(material.Box, { ...other, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 480 360", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
13144
|
+
/* @__PURE__ */ jsxRuntime.jsx(BackgroundIllustration_default, {}),
|
|
13145
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: "linearGradient-2", x1: "30.113%", x2: "30.113%", y1: "0%", y2: "100%", children: [
|
|
13146
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopOpacity: "0" }),
|
|
13147
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%" })
|
|
13148
|
+
] }) }),
|
|
13149
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13150
|
+
"path",
|
|
13151
|
+
{
|
|
13152
|
+
fill: "#FF4842",
|
|
13153
|
+
fillRule: "nonzero",
|
|
13154
|
+
d: "M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",
|
|
13155
|
+
opacity: "0.05"
|
|
13156
|
+
}
|
|
13157
|
+
),
|
|
13158
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13159
|
+
"path",
|
|
13160
|
+
{
|
|
13161
|
+
fill: "#FF4842",
|
|
13162
|
+
fillRule: "nonzero",
|
|
13163
|
+
d: "M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",
|
|
13164
|
+
opacity: "0.05"
|
|
13165
|
+
}
|
|
13166
|
+
),
|
|
13167
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13168
|
+
"path",
|
|
13169
|
+
{
|
|
13170
|
+
fill: "#FF4842",
|
|
13171
|
+
fillRule: "nonzero",
|
|
13172
|
+
d: "M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",
|
|
13173
|
+
opacity: "0.05"
|
|
13174
|
+
}
|
|
13175
|
+
),
|
|
13176
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13177
|
+
"path",
|
|
13178
|
+
{
|
|
13179
|
+
fill: PRIMARY_DARKER,
|
|
13180
|
+
fillRule: "nonzero",
|
|
13181
|
+
d: "M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"
|
|
13182
|
+
}
|
|
13183
|
+
),
|
|
13184
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13185
|
+
"path",
|
|
13186
|
+
{
|
|
13187
|
+
fill: "#FFF",
|
|
13188
|
+
fillRule: "nonzero",
|
|
13189
|
+
d: "M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",
|
|
13190
|
+
transform: "rotate(34.64 262.678 162.06)"
|
|
13191
|
+
}
|
|
13192
|
+
),
|
|
13193
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13194
|
+
"path",
|
|
13195
|
+
{
|
|
13196
|
+
fill: "#FFC107",
|
|
13197
|
+
fillRule: "nonzero",
|
|
13198
|
+
d: "M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",
|
|
13199
|
+
transform: "rotate(34.804 278.687 137.92)"
|
|
13200
|
+
}
|
|
13201
|
+
),
|
|
13202
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13203
|
+
"path",
|
|
13204
|
+
{
|
|
13205
|
+
fill: "#FFC107",
|
|
13206
|
+
fillRule: "nonzero",
|
|
13207
|
+
d: "M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",
|
|
13208
|
+
opacity: "0.5",
|
|
13209
|
+
transform: "rotate(34.64 268.35 153.887)"
|
|
13210
|
+
}
|
|
13211
|
+
),
|
|
13212
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13213
|
+
"path",
|
|
13214
|
+
{
|
|
13215
|
+
fill: "#FFC107",
|
|
13216
|
+
fillRule: "nonzero",
|
|
13217
|
+
d: "M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",
|
|
13218
|
+
opacity: "0.3",
|
|
13219
|
+
transform: "rotate(34.64 257.265 169.926)"
|
|
13220
|
+
}
|
|
13221
|
+
),
|
|
13222
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13223
|
+
"path",
|
|
13224
|
+
{
|
|
13225
|
+
fill: "#FFF",
|
|
13226
|
+
fillRule: "nonzero",
|
|
13227
|
+
d: "M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",
|
|
13228
|
+
transform: "rotate(16.29 248.893 159.951)"
|
|
13229
|
+
}
|
|
13230
|
+
),
|
|
13231
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13232
|
+
"path",
|
|
13233
|
+
{
|
|
13234
|
+
fill: "#FF4842",
|
|
13235
|
+
fillRule: "nonzero",
|
|
13236
|
+
d: "M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",
|
|
13237
|
+
transform: "rotate(16.29 257.127 131.835)"
|
|
13238
|
+
}
|
|
13239
|
+
),
|
|
13240
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13241
|
+
"path",
|
|
13242
|
+
{
|
|
13243
|
+
fill: "#FF4842",
|
|
13244
|
+
fillRule: "nonzero",
|
|
13245
|
+
d: "M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",
|
|
13246
|
+
opacity: "0.5",
|
|
13247
|
+
transform: "rotate(16.29 251.658 150.547)"
|
|
13248
|
+
}
|
|
13249
|
+
),
|
|
13250
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13251
|
+
"path",
|
|
13252
|
+
{
|
|
13253
|
+
fill: "#FF4842",
|
|
13254
|
+
fillRule: "nonzero",
|
|
13255
|
+
d: "M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",
|
|
13256
|
+
opacity: "0.3",
|
|
13257
|
+
transform: "rotate(16.29 246.19 169.256)"
|
|
13258
|
+
}
|
|
13259
|
+
),
|
|
13260
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13261
|
+
"path",
|
|
13262
|
+
{
|
|
13263
|
+
fill: "#FFF",
|
|
13264
|
+
fillRule: "nonzero",
|
|
13265
|
+
d: "M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",
|
|
13266
|
+
transform: "rotate(4.6 241.52 160.258)"
|
|
13267
|
+
}
|
|
13268
|
+
),
|
|
13269
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13270
|
+
"path",
|
|
13271
|
+
{
|
|
13272
|
+
fill: "#1890FF",
|
|
13273
|
+
fillRule: "nonzero",
|
|
13274
|
+
d: "M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",
|
|
13275
|
+
transform: "rotate(4.6 243.874 131.06)"
|
|
13276
|
+
}
|
|
13277
|
+
),
|
|
13278
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13279
|
+
"path",
|
|
13280
|
+
{
|
|
13281
|
+
fill: "#1890FF",
|
|
13282
|
+
fillRule: "nonzero",
|
|
13283
|
+
d: "M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",
|
|
13284
|
+
opacity: "0.5",
|
|
13285
|
+
transform: "rotate(4.6 242.308 150.487)"
|
|
13286
|
+
}
|
|
13287
|
+
),
|
|
13288
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13289
|
+
"path",
|
|
13290
|
+
{
|
|
13291
|
+
fill: "#1890FF",
|
|
13292
|
+
fillRule: "nonzero",
|
|
13293
|
+
d: "M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",
|
|
13294
|
+
opacity: "0.3",
|
|
13295
|
+
transform: "rotate(4.6 240.746 169.92)"
|
|
13296
|
+
}
|
|
13297
|
+
),
|
|
13298
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13299
|
+
"path",
|
|
13300
|
+
{
|
|
13301
|
+
fill: "#FFF",
|
|
13302
|
+
fillRule: "nonzero",
|
|
13303
|
+
d: "M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",
|
|
13304
|
+
transform: "rotate(-2.61 236.157 162.002)"
|
|
13305
|
+
}
|
|
13306
|
+
),
|
|
13307
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13308
|
+
"path",
|
|
13309
|
+
{
|
|
13310
|
+
fill: PRIMARY_MAIN,
|
|
13311
|
+
fillRule: "nonzero",
|
|
13312
|
+
d: "M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",
|
|
13313
|
+
transform: "rotate(-2.61 234.825 132.734)"
|
|
13314
|
+
}
|
|
13315
|
+
),
|
|
13316
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13317
|
+
"path",
|
|
13318
|
+
{
|
|
13319
|
+
fill: PRIMARY_MAIN,
|
|
13320
|
+
fillRule: "nonzero",
|
|
13321
|
+
d: "M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",
|
|
13322
|
+
opacity: "0.5",
|
|
13323
|
+
transform: "rotate(-2.862 236.39 151.563)"
|
|
13324
|
+
}
|
|
13325
|
+
),
|
|
13326
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13327
|
+
"path",
|
|
13328
|
+
{
|
|
13329
|
+
fill: PRIMARY_MAIN,
|
|
13330
|
+
fillRule: "nonzero",
|
|
13331
|
+
d: "M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",
|
|
13332
|
+
opacity: "0.3",
|
|
13333
|
+
transform: "rotate(-2.61 236.599 171.683)"
|
|
13334
|
+
}
|
|
13335
|
+
),
|
|
13336
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13337
|
+
"path",
|
|
13338
|
+
{
|
|
13339
|
+
fill: "#F4F6F8",
|
|
13340
|
+
fillRule: "nonzero",
|
|
13341
|
+
d: "M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"
|
|
13342
|
+
}
|
|
13343
|
+
),
|
|
13344
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13345
|
+
"path",
|
|
13346
|
+
{
|
|
13347
|
+
fill: "#000",
|
|
13348
|
+
fillRule: "nonzero",
|
|
13349
|
+
d: "M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",
|
|
13350
|
+
opacity: "0.1"
|
|
13351
|
+
}
|
|
13352
|
+
),
|
|
13353
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13354
|
+
"path",
|
|
13355
|
+
{
|
|
13356
|
+
fill: PRIMARY_MAIN,
|
|
13357
|
+
fillRule: "nonzero",
|
|
13358
|
+
d: "M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"
|
|
13359
|
+
}
|
|
13360
|
+
),
|
|
13361
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13362
|
+
"path",
|
|
13363
|
+
{
|
|
13364
|
+
fill: "#FF4842",
|
|
13365
|
+
fillRule: "nonzero",
|
|
13366
|
+
d: "M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",
|
|
13367
|
+
opacity: "0.1"
|
|
13368
|
+
}
|
|
13369
|
+
),
|
|
13370
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13371
|
+
"path",
|
|
13372
|
+
{
|
|
13373
|
+
fill: "#FFF",
|
|
13374
|
+
fillRule: "nonzero",
|
|
13375
|
+
d: "M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"
|
|
13376
|
+
}
|
|
13377
|
+
),
|
|
13378
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13379
|
+
"path",
|
|
13380
|
+
{
|
|
13381
|
+
fill: PRIMARY_MAIN,
|
|
13382
|
+
fillRule: "nonzero",
|
|
13383
|
+
d: "M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",
|
|
13384
|
+
opacity: "0.3"
|
|
13385
|
+
}
|
|
13386
|
+
),
|
|
13387
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13388
|
+
"path",
|
|
13389
|
+
{
|
|
13390
|
+
fill: PRIMARY_MAIN,
|
|
13391
|
+
fillRule: "nonzero",
|
|
13392
|
+
d: "M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"
|
|
13393
|
+
}
|
|
13394
|
+
),
|
|
13395
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: "380.363", cy: "298.487", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1", rx: "8.945", ry: "1.513" }),
|
|
13396
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13397
|
+
"path",
|
|
13398
|
+
{
|
|
13399
|
+
fill: PRIMARY_MAIN,
|
|
13400
|
+
fillRule: "nonzero",
|
|
13401
|
+
d: "M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"
|
|
13402
|
+
}
|
|
13403
|
+
),
|
|
13404
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: "390.052", cy: "264.383", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1", rx: "5.044", ry: "1" }),
|
|
13405
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13406
|
+
"path",
|
|
13407
|
+
{
|
|
13408
|
+
fill: PRIMARY_MAIN,
|
|
13409
|
+
fillRule: "nonzero",
|
|
13410
|
+
d: "M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"
|
|
13411
|
+
}
|
|
13412
|
+
),
|
|
13413
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: "346.97", cy: "270.022", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1", rx: "6.09", ry: "1.028" }),
|
|
13414
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13415
|
+
"rect",
|
|
13416
|
+
{
|
|
13417
|
+
width: "51.026",
|
|
13418
|
+
height: "91.312",
|
|
13419
|
+
x: "303.926",
|
|
13420
|
+
y: "69.211",
|
|
13421
|
+
fill: "#FFF",
|
|
13422
|
+
fillRule: "nonzero",
|
|
13423
|
+
rx: "4.737",
|
|
13424
|
+
transform: "rotate(-71.99 329.44 114.867)"
|
|
13425
|
+
}
|
|
13426
|
+
),
|
|
13427
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "303.613", cy: "103.507", r: "9.376", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.2" }),
|
|
13428
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13429
|
+
"path",
|
|
13430
|
+
{
|
|
13431
|
+
fill: PRIMARY_MAIN,
|
|
13432
|
+
fillRule: "nonzero",
|
|
13433
|
+
d: "M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",
|
|
13434
|
+
opacity: "0.2",
|
|
13435
|
+
transform: "rotate(-71.99 345.867 106.913)"
|
|
13436
|
+
}
|
|
13437
|
+
),
|
|
13438
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13439
|
+
"path",
|
|
13440
|
+
{
|
|
13441
|
+
fill: PRIMARY_MAIN,
|
|
13442
|
+
fillRule: "nonzero",
|
|
13443
|
+
d: "M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",
|
|
13444
|
+
opacity: "0.2",
|
|
13445
|
+
transform: "rotate(-71.99 334.312 110.042)"
|
|
13446
|
+
}
|
|
13447
|
+
),
|
|
13448
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13449
|
+
"path",
|
|
13450
|
+
{
|
|
13451
|
+
fill: PRIMARY_MAIN,
|
|
13452
|
+
fillRule: "nonzero",
|
|
13453
|
+
d: "M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",
|
|
13454
|
+
opacity: "0.2",
|
|
13455
|
+
transform: "rotate(-71.99 338.393 118.259)"
|
|
13456
|
+
}
|
|
13457
|
+
),
|
|
13458
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13459
|
+
"path",
|
|
13460
|
+
{
|
|
13461
|
+
fill: PRIMARY_MAIN,
|
|
13462
|
+
fillRule: "nonzero",
|
|
13463
|
+
d: "M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",
|
|
13464
|
+
opacity: "0.2",
|
|
13465
|
+
transform: "rotate(-71.99 339.79 125.599)"
|
|
13466
|
+
}
|
|
13467
|
+
),
|
|
13468
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13469
|
+
"path",
|
|
13470
|
+
{
|
|
13471
|
+
fill: PRIMARY_MAIN,
|
|
13472
|
+
fillRule: "nonzero",
|
|
13473
|
+
d: "M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",
|
|
13474
|
+
opacity: "0.5",
|
|
13475
|
+
transform: "rotate(-71.99 350.544 140.3)"
|
|
13476
|
+
}
|
|
13477
|
+
),
|
|
13478
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13479
|
+
"rect",
|
|
13480
|
+
{
|
|
13481
|
+
width: "50.3",
|
|
13482
|
+
height: "78.305",
|
|
13483
|
+
x: "291.549",
|
|
13484
|
+
y: "174.486",
|
|
13485
|
+
fill: "#FFF",
|
|
13486
|
+
fillRule: "nonzero",
|
|
13487
|
+
rx: "4",
|
|
13488
|
+
transform: "rotate(-57.265 316.7 213.638)"
|
|
13489
|
+
}
|
|
13490
|
+
),
|
|
13491
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13492
|
+
"path",
|
|
13493
|
+
{
|
|
13494
|
+
fill: "#DFE3E8",
|
|
13495
|
+
fillRule: "nonzero",
|
|
13496
|
+
d: "M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",
|
|
13497
|
+
transform: "rotate(-57.57 285.154 205.563)"
|
|
13498
|
+
}
|
|
13499
|
+
),
|
|
13500
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13501
|
+
"path",
|
|
13502
|
+
{
|
|
13503
|
+
fill: "#DFE3E8",
|
|
13504
|
+
fillRule: "nonzero",
|
|
13505
|
+
d: "M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",
|
|
13506
|
+
transform: "rotate(-57.57 298.635 200.737)"
|
|
13507
|
+
}
|
|
13508
|
+
),
|
|
13509
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13510
|
+
"path",
|
|
13511
|
+
{
|
|
13512
|
+
fill: "#DFE3E8",
|
|
13513
|
+
fillRule: "nonzero",
|
|
13514
|
+
d: "M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",
|
|
13515
|
+
transform: "rotate(-57.57 304.171 204.251)"
|
|
13516
|
+
}
|
|
13517
|
+
),
|
|
13518
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13519
|
+
"path",
|
|
13520
|
+
{
|
|
13521
|
+
fill: "#DFE3E8",
|
|
13522
|
+
fillRule: "nonzero",
|
|
13523
|
+
d: "M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",
|
|
13524
|
+
transform: "rotate(-57.57 309.706 207.771)"
|
|
13525
|
+
}
|
|
13526
|
+
),
|
|
13527
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13528
|
+
"path",
|
|
13529
|
+
{
|
|
13530
|
+
fill: "#DFE3E8",
|
|
13531
|
+
fillRule: "nonzero",
|
|
13532
|
+
d: "M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",
|
|
13533
|
+
transform: "rotate(-57.265 315.485 212.94)"
|
|
13534
|
+
}
|
|
13535
|
+
),
|
|
13536
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13537
|
+
"path",
|
|
13538
|
+
{
|
|
13539
|
+
fill: "#F4F6F8",
|
|
13540
|
+
fillRule: "nonzero",
|
|
13541
|
+
d: "M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",
|
|
13542
|
+
transform: "rotate(-57.57 320.777 214.804)"
|
|
13543
|
+
}
|
|
13544
|
+
),
|
|
13545
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13546
|
+
"path",
|
|
13547
|
+
{
|
|
13548
|
+
fill: "#F4F6F8",
|
|
13549
|
+
fillRule: "nonzero",
|
|
13550
|
+
d: "M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",
|
|
13551
|
+
transform: "rotate(-57.57 326.313 218.318)"
|
|
13552
|
+
}
|
|
13553
|
+
),
|
|
13554
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13555
|
+
"path",
|
|
13556
|
+
{
|
|
13557
|
+
fill: "#DFE3E8",
|
|
13558
|
+
fillRule: "nonzero",
|
|
13559
|
+
d: "M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",
|
|
13560
|
+
transform: "rotate(-57.57 345.465 214.454)"
|
|
13561
|
+
}
|
|
13562
|
+
),
|
|
13563
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13564
|
+
"path",
|
|
13565
|
+
{
|
|
13566
|
+
fill: PRIMARY_MAIN,
|
|
13567
|
+
fillRule: "nonzero",
|
|
13568
|
+
d: "M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"
|
|
13569
|
+
}
|
|
13570
|
+
),
|
|
13571
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13572
|
+
"path",
|
|
13573
|
+
{
|
|
13574
|
+
fill: PRIMARY_DARK,
|
|
13575
|
+
fillRule: "nonzero",
|
|
13576
|
+
d: "M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",
|
|
13577
|
+
opacity: "0.243"
|
|
13578
|
+
}
|
|
13579
|
+
),
|
|
13580
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13581
|
+
"path",
|
|
13582
|
+
{
|
|
13583
|
+
fill: "url(#linearGradient-2)",
|
|
13584
|
+
fillRule: "nonzero",
|
|
13585
|
+
d: "M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",
|
|
13586
|
+
opacity: "0.32"
|
|
13587
|
+
}
|
|
13588
|
+
),
|
|
13589
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: "119.593", cy: "258.664", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1", rx: "4.846", ry: "1" }),
|
|
13590
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: "101.03", cy: "260.545", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1", rx: "4.846", ry: "1" }),
|
|
13591
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: "108.459", cy: "265.905", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1", rx: "3.444", ry: "1" }),
|
|
13592
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: "89.193", cy: "265.433", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1", rx: "3.444", ry: "1" }),
|
|
13593
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13594
|
+
"path",
|
|
13595
|
+
{
|
|
13596
|
+
fill: PRIMARY_MAIN,
|
|
13597
|
+
fillRule: "nonzero",
|
|
13598
|
+
d: "M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"
|
|
13599
|
+
}
|
|
13600
|
+
),
|
|
13601
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13602
|
+
"path",
|
|
13603
|
+
{
|
|
13604
|
+
stroke: PRIMARY_DARKER,
|
|
13605
|
+
strokeLinecap: "round",
|
|
13606
|
+
strokeWidth: "0.5",
|
|
13607
|
+
d: "M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"
|
|
13608
|
+
}
|
|
13609
|
+
),
|
|
13610
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13611
|
+
"path",
|
|
13612
|
+
{
|
|
13613
|
+
fill: PRIMARY_MAIN,
|
|
13614
|
+
fillRule: "nonzero",
|
|
13615
|
+
d: "M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"
|
|
13616
|
+
}
|
|
13617
|
+
),
|
|
13618
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13619
|
+
"path",
|
|
13620
|
+
{
|
|
13621
|
+
stroke: PRIMARY_DARKER,
|
|
13622
|
+
strokeLinecap: "round",
|
|
13623
|
+
strokeWidth: "0.5",
|
|
13624
|
+
d: "M91.113 247.808s8.353 12.115 9.968 12.647"
|
|
13625
|
+
}
|
|
13626
|
+
),
|
|
13627
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { stroke: PRIMARY_DARKER, strokeLinecap: "round", strokeWidth: "0.5", d: "M90.344 249.701L92.293 249.701" }),
|
|
13628
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { stroke: PRIMARY_DARKER, strokeLinecap: "round", strokeWidth: "0.5", d: "M92.68 254.132L95.738 254.263" }),
|
|
13629
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { stroke: PRIMARY_DARKER, strokeLinecap: "round", strokeWidth: "0.5", d: "M94.542 250.586L94.21 252.179" }),
|
|
13630
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { stroke: PRIMARY_DARKER, strokeLinecap: "round", strokeWidth: "0.5", d: "M97.792 255.432L97.732 256.879" }),
|
|
13631
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13632
|
+
"path",
|
|
13633
|
+
{
|
|
13634
|
+
fill: PRIMARY_MAIN,
|
|
13635
|
+
fillRule: "nonzero",
|
|
13636
|
+
d: "M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"
|
|
13637
|
+
}
|
|
13638
|
+
),
|
|
13639
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13640
|
+
"path",
|
|
13641
|
+
{
|
|
13642
|
+
stroke: PRIMARY_DARKER,
|
|
13643
|
+
strokeLinecap: "round",
|
|
13644
|
+
strokeWidth: "0.5",
|
|
13645
|
+
d: "M111.051 247.808s-8.371 12.115-9.97 12.647"
|
|
13646
|
+
}
|
|
13647
|
+
),
|
|
13648
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { stroke: PRIMARY_DARKER, strokeLinecap: "round", strokeWidth: "0.5", d: "M111.82 249.701L109.871 249.701" }),
|
|
13649
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { stroke: PRIMARY_DARKER, strokeLinecap: "round", strokeWidth: "0.5", d: "M109.485 254.132L106.426 254.263" }),
|
|
13650
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { stroke: PRIMARY_DARKER, strokeLinecap: "round", strokeWidth: "0.5", d: "M107.622 250.586L107.954 252.179" }),
|
|
13651
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { stroke: PRIMARY_DARKER, strokeLinecap: "round", strokeWidth: "0.5", d: "M104.372 255.432L104.432 256.879" }),
|
|
13652
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13653
|
+
"path",
|
|
13654
|
+
{
|
|
13655
|
+
fill: PRIMARY_MAIN,
|
|
13656
|
+
fillRule: "nonzero",
|
|
13657
|
+
d: "M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"
|
|
13658
|
+
}
|
|
13659
|
+
),
|
|
13660
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "84.467", cy: "87.003", r: "6.467", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1" }),
|
|
13661
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "395.425", cy: "138.681", r: "6.467", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1" }),
|
|
13662
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "279.178", cy: "66.467", r: "6.467", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1" }),
|
|
13663
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "97.4", cy: "122.68", r: "10.838", fill: PRIMARY_MAIN, fillRule: "nonzero", opacity: "0.1" }),
|
|
13664
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13665
|
+
"path",
|
|
13666
|
+
{
|
|
13667
|
+
fill: PRIMARY_DARK,
|
|
13668
|
+
fillRule: "nonzero",
|
|
13669
|
+
d: "M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"
|
|
13670
|
+
}
|
|
13671
|
+
),
|
|
13672
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13673
|
+
"path",
|
|
13674
|
+
{
|
|
13675
|
+
fill: PRIMARY_MAIN,
|
|
13676
|
+
fillRule: "nonzero",
|
|
13677
|
+
d: "M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",
|
|
13678
|
+
opacity: "0.72"
|
|
13679
|
+
}
|
|
13680
|
+
),
|
|
13681
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13682
|
+
"path",
|
|
13683
|
+
{
|
|
13684
|
+
fill: PRIMARY_DARK,
|
|
13685
|
+
fillRule: "nonzero",
|
|
13686
|
+
d: "M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"
|
|
13687
|
+
}
|
|
13688
|
+
)
|
|
13689
|
+
] }) });
|
|
13690
|
+
}
|
|
13691
|
+
var UploadIllustration_default = react.memo(UploadIllustration);
|
|
13692
|
+
var StyledDropZone = styles.styled("div")(({ theme }) => ({
|
|
13693
|
+
outline: "none",
|
|
13694
|
+
cursor: "pointer",
|
|
13695
|
+
overflow: "hidden",
|
|
13696
|
+
position: "relative",
|
|
13697
|
+
padding: theme.spacing(5),
|
|
13698
|
+
borderRadius: theme.shape.borderRadius,
|
|
13699
|
+
transition: theme.transitions.create("padding"),
|
|
13700
|
+
backgroundColor: theme.palette.background.default,
|
|
13701
|
+
border: `1px dashed ${styles.alpha(theme.palette.grey[500], 0.32)}`,
|
|
13702
|
+
"&:hover": {
|
|
13703
|
+
opacity: 0.72
|
|
13704
|
+
}
|
|
13705
|
+
}));
|
|
13706
|
+
function Upload({
|
|
13707
|
+
disabled,
|
|
12438
13708
|
multiple = false,
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12443
|
-
|
|
13709
|
+
error,
|
|
13710
|
+
helperText,
|
|
13711
|
+
//
|
|
13712
|
+
file,
|
|
13713
|
+
onDelete,
|
|
13714
|
+
//
|
|
13715
|
+
files,
|
|
13716
|
+
thumbnail,
|
|
13717
|
+
onUpload,
|
|
13718
|
+
onRemove,
|
|
13719
|
+
onRemoveAll,
|
|
12444
13720
|
sx,
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
const { errors, touched, setFieldValue, values } = formik.useFormikContext();
|
|
12455
|
-
const fieldError = ___default.default.get(errors, name);
|
|
12456
|
-
const isTouched = ___default.default.get(touched, name);
|
|
12457
|
-
const [isDragging, setIsDragging] = react.useState(false);
|
|
12458
|
-
const currentFiles = ___default.default.get(values, name, multiple ? [] : []) || [];
|
|
12459
|
-
const isMaxFilesReached = multiple && currentFiles && currentFiles.length >= maxFiles;
|
|
12460
|
-
const processFile = async (file) => {
|
|
12461
|
-
if (file.type.startsWith("image/")) {
|
|
12462
|
-
const preview = await new Promise((resolve) => {
|
|
12463
|
-
const reader = new FileReader();
|
|
12464
|
-
reader.onload = () => resolve(reader.result);
|
|
12465
|
-
reader.readAsDataURL(file);
|
|
12466
|
-
});
|
|
12467
|
-
return { file, preview, name: file.name, type: file.type };
|
|
12468
|
-
}
|
|
12469
|
-
return { file, name: file.name, type: file.type };
|
|
12470
|
-
};
|
|
12471
|
-
const handleDrop = react.useCallback(
|
|
12472
|
-
async (acceptedFiles) => {
|
|
12473
|
-
if (disabled || isMaxFilesReached)
|
|
12474
|
-
return;
|
|
12475
|
-
try {
|
|
12476
|
-
const newFiles = await Promise.all(acceptedFiles.map(processFile));
|
|
12477
|
-
if (multiple) {
|
|
12478
|
-
const updatedFiles = [...currentFiles || [], ...newFiles].slice(
|
|
12479
|
-
0,
|
|
12480
|
-
maxFiles
|
|
12481
|
-
);
|
|
12482
|
-
setFieldValue(name, updatedFiles, true);
|
|
12483
|
-
} else {
|
|
12484
|
-
setFieldValue(name, newFiles[0] || null, true);
|
|
12485
|
-
}
|
|
12486
|
-
externalOnDrop == null ? void 0 : externalOnDrop(acceptedFiles);
|
|
12487
|
-
} catch (error) {
|
|
12488
|
-
console.error("Error processing files:", error);
|
|
12489
|
-
}
|
|
12490
|
-
},
|
|
12491
|
-
[
|
|
12492
|
-
currentFiles,
|
|
12493
|
-
disabled,
|
|
12494
|
-
isMaxFilesReached,
|
|
12495
|
-
multiple,
|
|
12496
|
-
name,
|
|
12497
|
-
setFieldValue,
|
|
12498
|
-
maxFiles,
|
|
12499
|
-
externalOnDrop
|
|
12500
|
-
]
|
|
12501
|
-
);
|
|
12502
|
-
const handleRemove = (index) => {
|
|
12503
|
-
if (disabled)
|
|
12504
|
-
return;
|
|
12505
|
-
if (multiple) {
|
|
12506
|
-
const updatedFiles = [...currentFiles || []];
|
|
12507
|
-
updatedFiles.splice(index, 1);
|
|
12508
|
-
setFieldValue(name, updatedFiles, true);
|
|
12509
|
-
} else {
|
|
12510
|
-
setFieldValue(name, null, true);
|
|
12511
|
-
}
|
|
12512
|
-
externalOnDelete == null ? void 0 : externalOnDelete();
|
|
12513
|
-
};
|
|
12514
|
-
const { getRootProps, getInputProps, isDragActive } = reactDropzone.useDropzone({
|
|
12515
|
-
onDrop: handleDrop,
|
|
12516
|
-
accept: accept ? { [accept]: [] } : void 0,
|
|
12517
|
-
maxFiles: multiple ? maxFiles - ((currentFiles == null ? void 0 : currentFiles.length) || 0) : 1,
|
|
12518
|
-
maxSize,
|
|
13721
|
+
...other
|
|
13722
|
+
}) {
|
|
13723
|
+
const {
|
|
13724
|
+
getRootProps,
|
|
13725
|
+
getInputProps,
|
|
13726
|
+
isDragActive,
|
|
13727
|
+
isDragReject,
|
|
13728
|
+
fileRejections
|
|
13729
|
+
} = reactDropzone.useDropzone({
|
|
12519
13730
|
multiple,
|
|
12520
|
-
disabled
|
|
12521
|
-
|
|
12522
|
-
onDragLeave: () => setIsDragging(false),
|
|
12523
|
-
onDropAccepted: () => setIsDragging(false)
|
|
13731
|
+
disabled,
|
|
13732
|
+
...other
|
|
12524
13733
|
});
|
|
12525
|
-
const
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12531
|
-
material.Paper,
|
|
12532
|
-
{
|
|
12533
|
-
sx: [
|
|
12534
|
-
{
|
|
12535
|
-
position: "relative",
|
|
12536
|
-
p: 1,
|
|
12537
|
-
borderRadius: 1,
|
|
12538
|
-
overflow: "hidden",
|
|
12539
|
-
border: "1px solid",
|
|
12540
|
-
borderColor: "divider",
|
|
12541
|
-
"&:hover .file-actions": {
|
|
12542
|
-
opacity: 1
|
|
12543
|
-
}
|
|
12544
|
-
},
|
|
12545
|
-
...Array.isArray(previewSx) ? previewSx : [previewSx]
|
|
12546
|
-
],
|
|
12547
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
12548
|
-
isImage && previewUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
12549
|
-
material.Avatar,
|
|
12550
|
-
{
|
|
12551
|
-
variant: "rounded",
|
|
12552
|
-
src: previewUrl,
|
|
12553
|
-
sx: { width: 48, height: 48, bgcolor: "background.paper" },
|
|
12554
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Image, {})
|
|
12555
|
-
}
|
|
12556
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12557
|
-
material.Avatar,
|
|
12558
|
-
{
|
|
12559
|
-
variant: "rounded",
|
|
12560
|
-
sx: { width: 48, height: 48, bgcolor: "action.hover" },
|
|
12561
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.InsertDriveFile, {})
|
|
12562
|
-
}
|
|
12563
|
-
),
|
|
12564
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", noWrap: true, sx: { flex: 1, maxWidth: 200 }, children: fileName }),
|
|
12565
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12566
|
-
material.Box,
|
|
12567
|
-
{
|
|
12568
|
-
className: "file-actions",
|
|
12569
|
-
sx: { opacity: 0, transition: "opacity 0.2s" },
|
|
12570
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: "Remove", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12571
|
-
material.IconButton,
|
|
12572
|
-
{
|
|
12573
|
-
size: "small",
|
|
12574
|
-
color: "error",
|
|
12575
|
-
onClick: (e) => {
|
|
12576
|
-
e.stopPropagation();
|
|
12577
|
-
handleRemove(index);
|
|
12578
|
-
},
|
|
12579
|
-
disabled,
|
|
12580
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Delete, { fontSize: "small" })
|
|
12581
|
-
}
|
|
12582
|
-
) })
|
|
12583
|
-
}
|
|
12584
|
-
)
|
|
12585
|
-
] })
|
|
12586
|
-
},
|
|
12587
|
-
index
|
|
12588
|
-
);
|
|
12589
|
-
};
|
|
12590
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx, children: [
|
|
13734
|
+
const { t } = reactI18next.useTranslation();
|
|
13735
|
+
const hasFile = !!file && !multiple;
|
|
13736
|
+
const hasFiles = files && multiple && files.length > 0;
|
|
13737
|
+
const isError = isDragReject || !!error;
|
|
13738
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { width: 1, position: "relative", ...sx }, children: [
|
|
12591
13739
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12592
|
-
|
|
13740
|
+
StyledDropZone,
|
|
12593
13741
|
{
|
|
12594
13742
|
...getRootProps(),
|
|
12595
|
-
sx:
|
|
12596
|
-
{
|
|
12597
|
-
|
|
12598
|
-
border: "2px dashed",
|
|
12599
|
-
borderRadius: 1,
|
|
12600
|
-
bgcolor: isDragging ? "action.hover" : "background.paper",
|
|
12601
|
-
borderColor: isDragging ? "primary.main" : "divider",
|
|
12602
|
-
cursor: disabled ? "not-allowed" : "pointer",
|
|
12603
|
-
opacity: disabled ? 0.7 : 1,
|
|
12604
|
-
transition: "all 0.2s ease-in-out",
|
|
12605
|
-
"&:hover": !disabled && {
|
|
12606
|
-
borderColor: "primary.main",
|
|
12607
|
-
bgcolor: "action.hover"
|
|
12608
|
-
}
|
|
13743
|
+
sx: {
|
|
13744
|
+
...isDragActive && {
|
|
13745
|
+
opacity: 0.72
|
|
12609
13746
|
},
|
|
12610
|
-
...
|
|
12611
|
-
|
|
13747
|
+
...isError && {
|
|
13748
|
+
color: "error.main",
|
|
13749
|
+
bgcolor: "error.lighter",
|
|
13750
|
+
borderColor: "error.light"
|
|
13751
|
+
},
|
|
13752
|
+
...disabled && {
|
|
13753
|
+
opacity: 0.48,
|
|
13754
|
+
pointerEvents: "none"
|
|
13755
|
+
},
|
|
13756
|
+
...hasFile && {
|
|
13757
|
+
padding: "12% 0"
|
|
13758
|
+
}
|
|
13759
|
+
},
|
|
12612
13760
|
children: [
|
|
12613
13761
|
/* @__PURE__ */ jsxRuntime.jsx("input", { ...getInputProps() }),
|
|
12614
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12615
|
-
|
|
13762
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13763
|
+
Placeholder,
|
|
12616
13764
|
{
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: isDragActive ? "Drop the files here..." : `Drag & drop ${multiple ? "files" : "a file"} here, or click to select ${multiple ? "files" : "a file"}` }),
|
|
12623
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "caption", color: "text.secondary", children: [
|
|
12624
|
-
accept,
|
|
12625
|
-
" \u2022 Max ",
|
|
12626
|
-
maxSize / (1024 * 1024),
|
|
12627
|
-
"MB per file \u2022",
|
|
12628
|
-
" ",
|
|
12629
|
-
multiple ? `Max ${maxFiles} files` : "Single file only"
|
|
12630
|
-
] })
|
|
12631
|
-
]
|
|
13765
|
+
sx: {
|
|
13766
|
+
...hasFile && {
|
|
13767
|
+
opacity: 0
|
|
13768
|
+
}
|
|
13769
|
+
}
|
|
12632
13770
|
}
|
|
12633
|
-
)
|
|
13771
|
+
),
|
|
13772
|
+
hasFile && /* @__PURE__ */ jsxRuntime.jsx(SingleFilePreview, { file })
|
|
12634
13773
|
]
|
|
12635
13774
|
}
|
|
12636
13775
|
),
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
13776
|
+
helperText && helperText,
|
|
13777
|
+
/* @__PURE__ */ jsxRuntime.jsx(RejectionFiles, { fileRejections }),
|
|
13778
|
+
hasFile && onDelete && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13779
|
+
material.IconButton,
|
|
12640
13780
|
{
|
|
12641
|
-
|
|
12642
|
-
|
|
13781
|
+
size: "small",
|
|
13782
|
+
onClick: onDelete,
|
|
13783
|
+
sx: {
|
|
13784
|
+
top: 16,
|
|
13785
|
+
right: 16,
|
|
13786
|
+
zIndex: 9,
|
|
13787
|
+
position: "absolute",
|
|
13788
|
+
color: (theme) => styles.alpha(theme.palette.common.white, 0.8),
|
|
13789
|
+
bgcolor: (theme) => styles.alpha(theme.palette.grey[900], 0.72),
|
|
13790
|
+
"&:hover": {
|
|
13791
|
+
bgcolor: (theme) => styles.alpha(theme.palette.grey[900], 0.48)
|
|
13792
|
+
}
|
|
13793
|
+
},
|
|
13794
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Iconify_default, { icon: "eva:close-fill", width: 18 })
|
|
13795
|
+
}
|
|
13796
|
+
),
|
|
13797
|
+
hasFiles === true && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13798
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { my: 3 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13799
|
+
MultiFilePreview,
|
|
13800
|
+
{
|
|
13801
|
+
files,
|
|
13802
|
+
thumbnail,
|
|
13803
|
+
onRemove
|
|
13804
|
+
}
|
|
13805
|
+
) }),
|
|
13806
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", justifyContent: "flex-end", spacing: 1.5, children: [
|
|
13807
|
+
onRemoveAll && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13808
|
+
material.Button,
|
|
12643
13809
|
{
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
13810
|
+
color: "inherit",
|
|
13811
|
+
variant: "outlined",
|
|
13812
|
+
size: "small",
|
|
13813
|
+
onClick: onRemoveAll,
|
|
13814
|
+
children: t("Remove all")
|
|
13815
|
+
}
|
|
13816
|
+
),
|
|
13817
|
+
onUpload && /* @__PURE__ */ jsxRuntime.jsx(material.Button, { size: "small", variant: "contained", onClick: onUpload, children: t("Upload files") })
|
|
13818
|
+
] })
|
|
13819
|
+
] })
|
|
13820
|
+
] });
|
|
13821
|
+
}
|
|
13822
|
+
function Placeholder({ sx, ...other }) {
|
|
13823
|
+
const { t } = reactI18next.useTranslation();
|
|
13824
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13825
|
+
material.Stack,
|
|
13826
|
+
{
|
|
13827
|
+
spacing: 5,
|
|
13828
|
+
alignItems: "center",
|
|
13829
|
+
justifyContent: "center",
|
|
13830
|
+
direction: {
|
|
13831
|
+
xs: "column",
|
|
13832
|
+
md: "row"
|
|
13833
|
+
},
|
|
13834
|
+
sx: {
|
|
13835
|
+
width: 1,
|
|
13836
|
+
textAlign: {
|
|
13837
|
+
xs: "center",
|
|
13838
|
+
md: "left"
|
|
13839
|
+
},
|
|
13840
|
+
...sx
|
|
13841
|
+
},
|
|
13842
|
+
...other,
|
|
13843
|
+
children: [
|
|
13844
|
+
/* @__PURE__ */ jsxRuntime.jsx(UploadIllustration_default, { sx: { width: 220 } }),
|
|
13845
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
13846
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { gutterBottom: true, variant: "h5", children: t("Drop or Select file") }),
|
|
13847
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "body2", sx: { color: "text.secondary" }, children: [
|
|
13848
|
+
t("Drop files here or click"),
|
|
13849
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13850
|
+
material.Typography,
|
|
13851
|
+
{
|
|
13852
|
+
variant: "body2",
|
|
13853
|
+
component: "span",
|
|
13854
|
+
sx: {
|
|
13855
|
+
mx: 0.5,
|
|
13856
|
+
textDecoration: "underline"
|
|
13857
|
+
},
|
|
13858
|
+
children: t("browse")
|
|
13859
|
+
}
|
|
13860
|
+
),
|
|
13861
|
+
t("thorough your machine")
|
|
13862
|
+
] })
|
|
13863
|
+
] })
|
|
13864
|
+
]
|
|
13865
|
+
}
|
|
13866
|
+
);
|
|
13867
|
+
}
|
|
13868
|
+
async function blobToBase64(file) {
|
|
13869
|
+
return new Promise((resolve, reject) => {
|
|
13870
|
+
const reader = new FileReader();
|
|
13871
|
+
reader.readAsDataURL(file);
|
|
13872
|
+
reader.onloadend = function() {
|
|
13873
|
+
const base64data = reader.result;
|
|
13874
|
+
resolve(base64data);
|
|
13875
|
+
};
|
|
13876
|
+
reader.onerror = function(err) {
|
|
13877
|
+
reject(err);
|
|
13878
|
+
};
|
|
13879
|
+
});
|
|
13880
|
+
}
|
|
13881
|
+
var AppUploadFile = ({ name, ...rest }) => {
|
|
13882
|
+
var _a, _b, _c, _d, _e;
|
|
13883
|
+
const { errors, touched, setFieldValue, values } = formik.useFormikContext();
|
|
13884
|
+
const fieldError = _19__default.default.get(errors, name);
|
|
13885
|
+
const isTouched = _19__default.default.get(touched, name);
|
|
13886
|
+
let val = _19__default.default.get(values, name);
|
|
13887
|
+
if (((_a = rest.multiple) != null ? _a : false) && typeof val === "string") {
|
|
13888
|
+
val = val ? [val] : [];
|
|
13889
|
+
} else if (!((_b = rest.multiple) != null ? _b : false) && _19__default.default.isArray(val)) {
|
|
13890
|
+
val = val[0];
|
|
13891
|
+
}
|
|
13892
|
+
const value = ((_c = rest.multiple) != null ? _c : false) ? (val != null ? val : []).map((__) => (__ == null ? void 0 : __.file) ? __ == null ? void 0 : __.file : __) : val;
|
|
13893
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13894
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13895
|
+
Upload,
|
|
13896
|
+
{
|
|
13897
|
+
...rest,
|
|
13898
|
+
file: ((_d = rest.multiple) != null ? _d : false) ? void 0 : value,
|
|
13899
|
+
files: ((_e = rest.multiple) != null ? _e : false) ? value : void 0,
|
|
13900
|
+
error: Boolean(fieldError) && isTouched,
|
|
13901
|
+
disabled: (rest == null ? void 0 : rest.maxFiles) !== null && (rest == null ? void 0 : rest.maxFiles) !== void 0 && (value == null ? void 0 : value.length) >= (rest == null ? void 0 : rest.maxFiles),
|
|
13902
|
+
onDrop: (fileVal) => {
|
|
13903
|
+
(async () => {
|
|
13904
|
+
var _a2;
|
|
13905
|
+
const images = await Promise.all(
|
|
13906
|
+
fileVal.map(async (single) => {
|
|
13907
|
+
var _a3;
|
|
13908
|
+
return {
|
|
13909
|
+
preview: ((_a3 = single == null ? void 0 : single.type) == null ? void 0 : _a3.includes("image")) ? await blobToBase64(single) : void 0,
|
|
13910
|
+
file: single
|
|
13911
|
+
};
|
|
13912
|
+
})
|
|
13913
|
+
);
|
|
13914
|
+
const currentValue = Array.isArray(value) ? value : [];
|
|
13915
|
+
if (rest.multiple === true) {
|
|
13916
|
+
if (currentValue.length >= ((_a2 = rest.maxFiles) != null ? _a2 : Infinity))
|
|
13917
|
+
return;
|
|
13918
|
+
setFieldValue(name, [...currentValue, ...images], true);
|
|
13919
|
+
} else {
|
|
13920
|
+
setFieldValue(name, images[0], true);
|
|
13921
|
+
}
|
|
13922
|
+
})();
|
|
13923
|
+
},
|
|
13924
|
+
onDelete: () => {
|
|
13925
|
+
var _a2;
|
|
13926
|
+
if ((_a2 = rest.multiple) != null ? _a2 : false) {
|
|
13927
|
+
setFieldValue(name, [], true);
|
|
13928
|
+
} else {
|
|
13929
|
+
setFieldValue(name, "", true);
|
|
13930
|
+
}
|
|
13931
|
+
},
|
|
13932
|
+
onRemove: (e) => {
|
|
13933
|
+
const afterFilter = val.filter((file) => {
|
|
13934
|
+
var _a2;
|
|
13935
|
+
if ((_a2 = file.file) != null ? _a2 : false) {
|
|
13936
|
+
return !_19__default.default.isEqual(e, file.file);
|
|
13937
|
+
}
|
|
13938
|
+
return !_19__default.default.isEqual(e, file);
|
|
13939
|
+
});
|
|
13940
|
+
setFieldValue(name, afterFilter, true);
|
|
13941
|
+
}
|
|
12651
13942
|
}
|
|
12652
13943
|
),
|
|
12653
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13944
|
+
Boolean(fieldError) && Boolean(isTouched) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12654
13945
|
material.Typography,
|
|
12655
13946
|
{
|
|
13947
|
+
color: "#FF5630",
|
|
12656
13948
|
variant: "caption",
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
color: "text.secondary",
|
|
12661
|
-
mt: 0.5
|
|
12662
|
-
},
|
|
12663
|
-
...Array.isArray(helperTextSx) ? helperTextSx : [helperTextSx]
|
|
12664
|
-
],
|
|
12665
|
-
children: [
|
|
12666
|
-
(currentFiles == null ? void 0 : currentFiles.length) || 0,
|
|
12667
|
-
" of ",
|
|
12668
|
-
maxFiles,
|
|
12669
|
-
" files selected"
|
|
12670
|
-
]
|
|
13949
|
+
display: "block",
|
|
13950
|
+
gutterBottom: true,
|
|
13951
|
+
children: fieldError
|
|
12671
13952
|
}
|
|
12672
|
-
)
|
|
13953
|
+
),
|
|
13954
|
+
rest.maxFiles != null && /* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "caption", display: "block", gutterBottom: true, children: [
|
|
13955
|
+
"Maximum ",
|
|
13956
|
+
rest.maxFiles,
|
|
13957
|
+
" file allowed"
|
|
13958
|
+
] })
|
|
12673
13959
|
] });
|
|
12674
13960
|
};
|
|
12675
13961
|
var AppUploadFile_default = AppUploadFile;
|