welcome-ui 8.1.0 → 8.1.1

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.
Files changed (287) hide show
  1. package/dist/{AXB53BZF-XKOjjeWO.mjs → AXB53BZF-BOEe01VW.mjs} +3 -3
  2. package/dist/Accordion.mjs +23 -30
  3. package/dist/Alert.mjs +70 -76
  4. package/dist/AspectRatio.mjs +9 -9
  5. package/dist/Avatar.mjs +47 -48
  6. package/dist/{BYC7LY2E-CWSI38FM.mjs → BYC7LY2E-B1IDizRs.mjs} +127 -128
  7. package/dist/Badge.mjs +25 -25
  8. package/dist/Box.mjs +5 -5
  9. package/dist/Breadcrumb.mjs +168 -172
  10. package/dist/Button.mjs +67 -72
  11. package/dist/ButtonGroup.mjs +12 -13
  12. package/dist/Card.mjs +14 -14
  13. package/dist/Checkbox.mjs +2 -2
  14. package/dist/ClearButton.mjs +15 -15
  15. package/dist/CloseButton.mjs +9 -9
  16. package/dist/{CustomPopper-B2Cqfph4.mjs → CustomInput-IA_gVoXd.mjs} +1445 -1466
  17. package/dist/DatePicker.mjs +80 -81
  18. package/dist/DateTimePicker.mjs +61 -66
  19. package/dist/DateTimePickerCommon.mjs +1 -1
  20. package/dist/Drawer.mjs +172 -188
  21. package/dist/DropdownMenu.mjs +411 -414
  22. package/dist/Field.mjs +91 -103
  23. package/dist/FieldGroup.mjs +9 -12
  24. package/dist/FileDrop.mjs +556 -587
  25. package/dist/FileUpload.mjs +71 -92
  26. package/dist/Files.mjs +46 -46
  27. package/dist/Flex.mjs +13 -13
  28. package/dist/Grid.mjs +29 -29
  29. package/dist/Hint.mjs +12 -12
  30. package/dist/{ITI7HKP4-C89kOQb8.mjs → ITI7HKP4-EL9KXYBU.mjs} +67 -68
  31. package/dist/Icon.mjs +25 -25
  32. package/dist/Icons.mjs +988 -988
  33. package/dist/IconsFont.mjs +22 -22
  34. package/dist/InputText.mjs +58 -66
  35. package/dist/{JC64G2H7-afsomHuH.mjs → JC64G2H7-BzklVBKM.mjs} +46 -47
  36. package/dist/{KUU7WJ55-CzsjuIMv.mjs → KUU7WJ55-CS4NemC6.mjs} +1 -1
  37. package/dist/LVA2YJMS-DDEmK0pp.mjs +1482 -0
  38. package/dist/Label.mjs +35 -37
  39. package/dist/Link.mjs +28 -32
  40. package/dist/Loader.mjs +16 -20
  41. package/dist/Logo.mjs +42 -55
  42. package/dist/{MTZPJQMC-TybFZCho.mjs → MTZPJQMC-CMjAwC0N.mjs} +2 -2
  43. package/dist/Modal.mjs +253 -276
  44. package/dist/{NLEBE274-oSxMftGy.mjs → NLEBE274-QOMV1l7e.mjs} +9 -9
  45. package/dist/{P2CTZE2T-DOT1mNnX.mjs → P2CTZE2T-Cl2w7OLV.mjs} +48 -49
  46. package/dist/{P4IRICAX-CWSZLTGz.mjs → P4IRICAX-DezbJY4s.mjs} +3 -3
  47. package/dist/Pagination.mjs +104 -104
  48. package/dist/PasswordInput.mjs +34 -35
  49. package/dist/Picker.mjs +33 -35
  50. package/dist/Popover.mjs +99 -106
  51. package/dist/{QYJ6MIDR-DJ-vUdAM.mjs → QYJ6MIDR-Bb0O5xUM.mjs} +30 -31
  52. package/dist/Radio.mjs +48 -54
  53. package/dist/RadioGroup.mjs +47 -47
  54. package/dist/RadioTab.mjs +35 -37
  55. package/dist/{SYRFVSLH-B6m278Vb.mjs → SYRFVSLH-jn06-eLy.mjs} +10 -11
  56. package/dist/Search.mjs +159 -175
  57. package/dist/Select.mjs +338 -373
  58. package/dist/Shape.mjs +9 -9
  59. package/dist/Slider.mjs +336 -359
  60. package/dist/Stack.mjs +24 -22
  61. package/dist/Swiper.mjs +224 -231
  62. package/dist/Table.mjs +23 -23
  63. package/dist/Tabs.mjs +200 -205
  64. package/dist/Tag.mjs +53 -55
  65. package/dist/Text.mjs +47 -49
  66. package/dist/Textarea.mjs +40 -40
  67. package/dist/TimePicker.mjs +57 -58
  68. package/dist/Toast.mjs +128 -135
  69. package/dist/Toggle.mjs +24 -27
  70. package/dist/Tooltip.mjs +99 -103
  71. package/dist/UniversalLink.mjs +15 -15
  72. package/dist/{VEVQD5MH-0w9Y7Ytc.mjs → VEVQD5MH-CuegL0m0.mjs} +3 -3
  73. package/dist/{VGCJ63VH-C0UPBY-5.mjs → VGCJ63VH-BMzoZtCu.mjs} +38 -39
  74. package/dist/VariantIcon.mjs +22 -14
  75. package/dist/WelcomeLoader.mjs +121 -122
  76. package/dist/WuiProvider.mjs +58 -69
  77. package/dist/{X5NMLKT6-BJw3xE-K.mjs → X5NMLKT6-CvSCix-_.mjs} +2 -2
  78. package/dist/{YV4JVR4I-DPC8mMuG.mjs → YV4JVR4I-Bh7B7TET.mjs} +57 -57
  79. package/dist/{field-styles-BVlRlvuu.mjs → field-styles-CfVLcVQp.mjs} +1 -1
  80. package/dist/{hex-to-rgba-DU_XzKIK.mjs → hex-to-rgba-BIDK-3ab.mjs} +2 -2
  81. package/dist/hide-focus-rings-root-BNyva1yb.mjs +14 -0
  82. package/dist/{index-5HBq1O6Z.mjs → index-5PUh49rV.mjs} +73 -74
  83. package/dist/index-B0gDDiFm.mjs +66 -0
  84. package/dist/index-B22SHR8h.mjs +26 -0
  85. package/dist/{index-DAZ1SYdj.mjs → index-BNGGwOCo.mjs} +7 -7
  86. package/dist/{index-SQQQ4dEE.mjs → index-BQtDgQBH.mjs} +8 -8
  87. package/dist/index-BhcLigYU.mjs +77 -0
  88. package/dist/{index-QaLwIvZS.mjs → index-Bkl89twW.mjs} +8 -8
  89. package/dist/{index-BaLGEKs7.mjs → index-C7zM96J_.mjs} +8 -8
  90. package/dist/index-CQD9fgf_.mjs +11 -0
  91. package/dist/index-CmsWSKKs.mjs +11 -0
  92. package/dist/{index-DvzWKxKE.mjs → index-DqBUFsqP.mjs} +7 -7
  93. package/dist/index-u1oHKa7X.mjs +16 -0
  94. package/dist/index-wr_b5GSV.mjs +36 -0
  95. package/dist/radio-group-RFyDp0KD.mjs +51 -0
  96. package/dist/theme.mjs +801 -801
  97. package/dist/throttle-BDBzFeFj.mjs +13 -0
  98. package/dist/types/components/Accordion/index.d.ts +1 -1
  99. package/dist/types/components/Accordion/styles.d.ts +2 -2
  100. package/dist/types/components/Accordion/theme.d.ts +1 -1
  101. package/dist/types/components/Alert/index.d.ts +2 -2
  102. package/dist/types/components/Alert/styles.d.ts +9 -9
  103. package/dist/types/components/Alert/theme.d.ts +3 -3
  104. package/dist/types/components/AspectRatio/styles.d.ts +2 -3
  105. package/dist/types/components/Avatar/index.d.ts +3 -2
  106. package/dist/types/components/Avatar/styles.d.ts +8 -8
  107. package/dist/types/components/Avatar/theme.d.ts +3 -3
  108. package/dist/types/components/Avatar/utils.d.ts +1 -1
  109. package/dist/types/components/Badge/index.d.ts +2 -2
  110. package/dist/types/components/Badge/styles.d.ts +5 -5
  111. package/dist/types/components/Badge/theme.d.ts +1 -1
  112. package/dist/types/components/Breadcrumb/Item.d.ts +1 -1
  113. package/dist/types/components/Breadcrumb/index.d.ts +2 -2
  114. package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
  115. package/dist/types/components/Button/index.d.ts +5 -4
  116. package/dist/types/components/Button/styles.d.ts +1 -1
  117. package/dist/types/components/Button/theme.d.ts +7 -7
  118. package/dist/types/components/ButtonGroup/index.d.ts +4 -4
  119. package/dist/types/components/Card/Cover.styles.d.ts +4 -4
  120. package/dist/types/components/Card/index.d.ts +3 -2
  121. package/dist/types/components/Card/theme.d.ts +1 -1
  122. package/dist/types/components/Checkbox/index.d.ts +2 -2
  123. package/dist/types/components/Checkbox/styles.d.ts +1 -1
  124. package/dist/types/components/Checkbox/theme.d.ts +1 -1
  125. package/dist/types/components/ClearButton/index.d.ts +6 -5
  126. package/dist/types/components/ClearButton/styles.d.ts +4 -4
  127. package/dist/types/components/CloseButton/styles.d.ts +4 -4
  128. package/dist/types/components/DatePicker/index.d.ts +3 -3
  129. package/dist/types/components/DateTimePicker/index.d.ts +2 -2
  130. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +1 -1
  131. package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +5 -5
  132. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
  133. package/dist/types/components/DateTimePickerCommon/index.d.ts +2 -2
  134. package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
  135. package/dist/types/components/DateTimePickerCommon/utils.d.ts +2 -2
  136. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +1 -1
  137. package/dist/types/components/Drawer/AssetDrawer/index.d.ts +1 -1
  138. package/dist/types/components/Drawer/index.d.ts +12 -12
  139. package/dist/types/components/Drawer/styles.d.ts +5 -5
  140. package/dist/types/components/Drawer/theme.d.ts +2 -2
  141. package/dist/types/components/DropdownMenu/index.d.ts +4 -4
  142. package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
  143. package/dist/types/components/Field/index.d.ts +8 -8
  144. package/dist/types/components/Field/styles.d.ts +1 -1
  145. package/dist/types/components/Field/utils.d.ts +1 -1
  146. package/dist/types/components/FileDrop/FilePreview.d.ts +2 -2
  147. package/dist/types/components/FileDrop/Message.d.ts +1 -1
  148. package/dist/types/components/FileDrop/index.d.ts +20 -20
  149. package/dist/types/components/FileDrop/theme.d.ts +1 -1
  150. package/dist/types/components/FileUpload/index.d.ts +13 -13
  151. package/dist/types/components/Files/index.d.ts +5 -5
  152. package/dist/types/components/Files/types.d.ts +1 -1
  153. package/dist/types/components/Hint/index.d.ts +2 -1
  154. package/dist/types/components/Hint/theme.d.ts +1 -1
  155. package/dist/types/components/Icon/index.d.ts +3 -3
  156. package/dist/types/components/Icon/styles.d.ts +3 -3
  157. package/dist/types/components/Icon/theme.d.ts +3 -3
  158. package/dist/types/components/Icons/Sun/content.json.d.ts +1 -2
  159. package/dist/types/components/Icons/index.d.ts +2 -2
  160. package/dist/types/components/IconsFont/index.d.ts +3 -2
  161. package/dist/types/components/IconsFont/styles.d.ts +1 -1
  162. package/dist/types/components/InputText/index.d.ts +1 -1
  163. package/dist/types/components/InputText/styles.d.ts +1 -1
  164. package/dist/types/components/Label/index.d.ts +3 -2
  165. package/dist/types/components/Label/theme.d.ts +1 -1
  166. package/dist/types/components/Link/index.d.ts +5 -5
  167. package/dist/types/components/Link/styles.d.ts +4 -4
  168. package/dist/types/components/Link/theme.d.ts +1 -1
  169. package/dist/types/components/Loader/index.d.ts +1 -1
  170. package/dist/types/components/Loader/styles.d.ts +4 -4
  171. package/dist/types/components/Loader/theme.d.ts +4 -4
  172. package/dist/types/components/Logo/Solutions.d.ts +2 -1
  173. package/dist/types/components/Logo/Symbol.d.ts +2 -1
  174. package/dist/types/components/Logo/Wui.d.ts +2 -1
  175. package/dist/types/components/Logo/index.d.ts +5 -5
  176. package/dist/types/components/Modal/Assets/Backdrop.d.ts +6 -5
  177. package/dist/types/components/Modal/Assets/Iframe.d.ts +2 -1
  178. package/dist/types/components/Modal/Assets/index.d.ts +9 -9
  179. package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
  180. package/dist/types/components/Modal/Close.d.ts +4 -3
  181. package/dist/types/components/Modal/Content.d.ts +5 -3
  182. package/dist/types/components/Modal/Footer.d.ts +1 -1
  183. package/dist/types/components/Modal/Header.d.ts +2 -2
  184. package/dist/types/components/Modal/index.d.ts +17 -17
  185. package/dist/types/components/Modal/styles.d.ts +7 -7
  186. package/dist/types/components/Modal/theme.d.ts +2 -2
  187. package/dist/types/components/Pagination/index.d.ts +2 -2
  188. package/dist/types/components/Pagination/theme.d.ts +1 -1
  189. package/dist/types/components/Pagination/utils.d.ts +1 -1
  190. package/dist/types/components/Picker/index.d.ts +1 -1
  191. package/dist/types/components/Picker/styles.d.ts +1 -1
  192. package/dist/types/components/Popover/Arrow.d.ts +2 -1
  193. package/dist/types/components/Popover/Content.d.ts +3 -2
  194. package/dist/types/components/Popover/Popover.d.ts +5 -4
  195. package/dist/types/components/Popover/PopoverHover.d.ts +4 -3
  196. package/dist/types/components/Popover/Trigger.d.ts +1 -1
  197. package/dist/types/components/Popover/styles.d.ts +4 -4
  198. package/dist/types/components/Popover/theme.d.ts +1 -1
  199. package/dist/types/components/Popover/usePopover.d.ts +6 -6
  200. package/dist/types/components/Radio/index.d.ts +3 -3
  201. package/dist/types/components/Radio/styles.d.ts +5 -5
  202. package/dist/types/components/Radio/theme.d.ts +1 -1
  203. package/dist/types/components/RadioGroup/index.d.ts +2 -2
  204. package/dist/types/components/RadioTab/index.d.ts +3 -3
  205. package/dist/types/components/RadioTab/styles.d.ts +9 -3
  206. package/dist/types/components/RadioTab/theme.d.ts +1 -1
  207. package/dist/types/components/Search/index.d.ts +5 -5
  208. package/dist/types/components/Select/index.d.ts +11 -11
  209. package/dist/types/components/Select/styles.d.ts +6 -6
  210. package/dist/types/components/Select/utils.d.ts +7 -11
  211. package/dist/types/components/Shape/index.d.ts +1 -1
  212. package/dist/types/components/Shape/styles.d.ts +3 -3
  213. package/dist/types/components/Slider/Range.d.ts +3 -3
  214. package/dist/types/components/Slider/index.d.ts +2 -2
  215. package/dist/types/components/Slider/styles.d.ts +16 -16
  216. package/dist/types/components/Slider/theme.d.ts +1 -1
  217. package/dist/types/components/Stack/index.d.ts +1 -1
  218. package/dist/types/components/Swiper/index.d.ts +17 -16
  219. package/dist/types/components/Swiper/styles.d.ts +53 -53
  220. package/dist/types/components/Swiper/theme.d.ts +1 -1
  221. package/dist/types/components/System/index.d.ts +14 -14
  222. package/dist/types/components/Table/index.d.ts +7 -6
  223. package/dist/types/components/Table/styles.d.ts +1 -1
  224. package/dist/types/components/Table/theme.d.ts +1 -1
  225. package/dist/types/components/Tabs/ActiveBar.d.ts +5 -5
  226. package/dist/types/components/Tabs/TabList.d.ts +4 -4
  227. package/dist/types/components/Tabs/TabPanel.d.ts +2 -2
  228. package/dist/types/components/Tabs/styles.d.ts +2 -2
  229. package/dist/types/components/Tabs/theme.d.ts +2 -2
  230. package/dist/types/components/Tag/index.d.ts +3 -2
  231. package/dist/types/components/Tag/styles.d.ts +1 -1
  232. package/dist/types/components/Tag/theme.d.ts +2 -2
  233. package/dist/types/components/Text/index.d.ts +2 -2
  234. package/dist/types/components/Textarea/index.d.ts +1 -1
  235. package/dist/types/components/Textarea/theme.d.ts +1 -1
  236. package/dist/types/components/TimePicker/index.d.ts +2 -2
  237. package/dist/types/components/Toast/Growl.d.ts +1 -1
  238. package/dist/types/components/Toast/Snackbar.d.ts +1 -1
  239. package/dist/types/components/Toast/ToastWrapper.d.ts +5 -5
  240. package/dist/types/components/Toast/index.d.ts +6 -6
  241. package/dist/types/components/Toast/styles.d.ts +16 -16
  242. package/dist/types/components/Toast/theme.d.ts +2 -2
  243. package/dist/types/components/Toast/utils.d.ts +13 -13
  244. package/dist/types/components/Toggle/index.d.ts +3 -3
  245. package/dist/types/components/Toggle/styles.d.ts +4 -5
  246. package/dist/types/components/Toggle/theme.d.ts +5 -5
  247. package/dist/types/components/Tooltip/index.d.ts +2 -2
  248. package/dist/types/components/Tooltip/styles.d.ts +1 -1
  249. package/dist/types/components/Tooltip/theme.d.ts +1 -1
  250. package/dist/types/components/VariantIcon/index.d.ts +1 -1
  251. package/dist/types/components/VariantIcon/styles.d.ts +1 -1
  252. package/dist/types/components/VariantIcon/theme.d.ts +2 -2
  253. package/dist/types/components/WuiProvider/font.d.ts +5 -3
  254. package/dist/types/components/WuiProvider/index.d.ts +1 -1
  255. package/dist/types/theme/colors.d.ts +11 -3
  256. package/dist/types/theme/dark.d.ts +1 -1
  257. package/dist/types/theme/defaultFields.d.ts +10 -10
  258. package/dist/types/theme/fonts.d.ts +5 -5
  259. package/dist/types/theme/index.d.ts +31 -31
  260. package/dist/types/theme/screens.d.ts +1 -1
  261. package/dist/types/theme/space.d.ts +1 -1
  262. package/dist/types/theme/typography.d.ts +1 -1
  263. package/dist/types/utils/field-styles.d.ts +6 -6
  264. package/dist/types/utils/index.d.ts +2 -2
  265. package/dist/types/utils/ts-utils.d.ts +1 -1
  266. package/dist/types/utils/use-copy-text.d.ts +1 -1
  267. package/dist/types/utils/use-create-portal.d.ts +1 -1
  268. package/dist/types/utils/use-viewport.d.ts +2 -2
  269. package/dist/types/utils/wrap-children.d.ts +1 -1
  270. package/dist/{use-fork-ref-DvaCTfQ_.mjs → use-fork-ref-CUZErtAC.mjs} +3 -4
  271. package/dist/{use-viewport-CWpjoHXy.mjs → use-viewport-CfklieD-.mjs} +2 -2
  272. package/dist/utils.mjs +29 -102
  273. package/dist/wrap-children-aq69jtFP.mjs +12 -0
  274. package/package.json +28 -4
  275. package/dist/LVA2YJMS-C-kJ1lkr.mjs +0 -873
  276. package/dist/hide-focus-rings-root-CCXdysih.mjs +0 -15
  277. package/dist/index-CYmF7qCH.mjs +0 -11
  278. package/dist/index-C_k-m0Rl.mjs +0 -36
  279. package/dist/index-D8v_VJ9z.mjs +0 -26
  280. package/dist/index-DpkNUfAS.mjs +0 -11
  281. package/dist/index-i_anpNhw.mjs +0 -66
  282. package/dist/index-wl3X6EM1.mjs +0 -16
  283. package/dist/jsx-runtime-B7I4PJ0H.mjs +0 -613
  284. package/dist/radio-group-C0fUHvam.mjs +0 -52
  285. package/dist/throttle-CW18pWlW.mjs +0 -13
  286. package/dist/wrap-children-DBSD-X5-.mjs +0 -9
  287. package/dist/{downshift.esm-B7Jil1wW.mjs → downshift.esm-D0ns_SQs.mjs} +9 -9
package/dist/FileDrop.mjs CHANGED
@@ -1,19 +1,18 @@
1
1
  "use client";
2
- import { j as d } from "./jsx-runtime-B7I4PJ0H.mjs";
3
- import Aa, { forwardRef as Fa, useMemo as V, useRef as vi, useReducer as Oa, useEffect as ai, useCallback as E, useImperativeHandle as _a, Fragment as Pa, useState as Vi } from "react";
4
- import { P as s } from "./index-DgSynio4.mjs";
5
- import { g as Ia } from "./_commonjsHelpers-CXJ7dpIk.mjs";
6
- import { Button as gi } from "./Button.mjs";
2
+ import s, { forwardRef as Ai, useMemo as V, useRef as va, useReducer as Fi, useEffect as ia, useCallback as E, useImperativeHandle as Oi, Fragment as _i, useState as Va } from "react";
3
+ import { P as d } from "./index-DgSynio4.mjs";
4
+ import { g as Pi } from "./_commonjsHelpers-CXJ7dpIk.mjs";
5
+ import { c as Ga } from "./create-event-rXDe5aCQ.mjs";
6
+ import ka, { th as _, css as Ia } from "@xstyled/styled-components";
7
+ import { shouldForwardProp as Ii, forwardRef as Ri } from "./System.mjs";
8
+ import { Text as ga } from "./Text.mjs";
9
+ import { Button as ba } from "./Button.mjs";
7
10
  import "./Icon.mjs";
8
- import { P as Ra, N as Sa, E as qa, T as Ta } from "./index-D8v_VJ9z.mjs";
9
- import { shouldForwardProp as La, forwardRef as Ca } from "./System.mjs";
10
- import { c as Gi } from "./create-event-rXDe5aCQ.mjs";
11
- import { getFileIcon as $a, getFileSize as Ma, getFileName as sa } from "./Files.mjs";
12
- import { E as Ka } from "./index-DvzWKxKE.mjs";
13
- import { Text as bi } from "./Text.mjs";
14
- import ki, { th as P, css as Ii } from "@xstyled/styled-components";
15
- function H(i, a, t, n) {
16
- function e(o) {
11
+ import { E as Si } from "./index-DqBUFsqP.mjs";
12
+ import { getFileIcon as qi, getFileSize as Ti, getFileName as si } from "./Files.mjs";
13
+ import { P as Ci, N as Li, E as $i, T as Mi } from "./index-B22SHR8h.mjs";
14
+ function H(a, i, t, e) {
15
+ function n(o) {
17
16
  return o instanceof t ? o : new t(function(c) {
18
17
  c(o);
19
18
  });
@@ -21,25 +20,25 @@ function H(i, a, t, n) {
21
20
  return new (t || (t = Promise))(function(o, c) {
22
21
  function r(x) {
23
22
  try {
24
- h(n.next(x));
25
- } catch (D) {
26
- c(D);
23
+ h(e.next(x));
24
+ } catch (k) {
25
+ c(k);
27
26
  }
28
27
  }
29
28
  function v(x) {
30
29
  try {
31
- h(n.throw(x));
32
- } catch (D) {
33
- c(D);
30
+ h(e.throw(x));
31
+ } catch (k) {
32
+ c(k);
34
33
  }
35
34
  }
36
35
  function h(x) {
37
- x.done ? o(x.value) : e(x.value).then(r, v);
36
+ x.done ? o(x.value) : n(x.value).then(r, v);
38
37
  }
39
- h((n = n.apply(i, a || [])).next());
38
+ h((e = e.apply(a, i || [])).next());
40
39
  });
41
40
  }
42
- const Ha = /* @__PURE__ */ new Map([
41
+ const Ki = /* @__PURE__ */ new Map([
43
42
  // https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
44
43
  ["1km", "application/vnd.1000minds.decision-model+xml"],
45
44
  ["3dml", "text/vnd.in3d.3dml"],
@@ -1242,478 +1241,478 @@ const Ha = /* @__PURE__ */ new Map([
1242
1241
  ["zmm", "application/vnd.handheld-entertainment+xml"],
1243
1242
  ["zsh", "text/x-scriptzsh"]
1244
1243
  ]);
1245
- function G(i, a, t) {
1246
- const n = Wa(i), { webkitRelativePath: e } = i, o = typeof a == "string" ? a : typeof e == "string" && e.length > 0 ? e : `./${i.name}`;
1247
- return typeof n.path != "string" && Zi(n, "path", o), Zi(n, "relativePath", o), n;
1248
- }
1249
- function Wa(i) {
1250
- const { name: a } = i;
1251
- if (a && a.lastIndexOf(".") !== -1 && !i.type) {
1252
- const n = a.split(".").pop().toLowerCase(), e = Ha.get(n);
1253
- e && Object.defineProperty(i, "type", {
1254
- value: e,
1244
+ function G(a, i, t) {
1245
+ const e = Hi(a), { webkitRelativePath: n } = a, o = typeof i == "string" ? i : typeof n == "string" && n.length > 0 ? n : `./${a.name}`;
1246
+ return typeof e.path != "string" && Za(e, "path", o), Za(e, "relativePath", o), e;
1247
+ }
1248
+ function Hi(a) {
1249
+ const { name: i } = a;
1250
+ if (i && i.lastIndexOf(".") !== -1 && !a.type) {
1251
+ const e = i.split(".").pop().toLowerCase(), n = Ki.get(e);
1252
+ n && Object.defineProperty(a, "type", {
1253
+ value: n,
1255
1254
  writable: !1,
1256
1255
  configurable: !1,
1257
1256
  enumerable: !0
1258
1257
  });
1259
1258
  }
1260
- return i;
1259
+ return a;
1261
1260
  }
1262
- function Zi(i, a, t) {
1263
- Object.defineProperty(i, a, {
1261
+ function Za(a, i, t) {
1262
+ Object.defineProperty(a, i, {
1264
1263
  value: t,
1265
1264
  writable: !1,
1266
1265
  configurable: !1,
1267
1266
  enumerable: !0
1268
1267
  });
1269
1268
  }
1270
- const Na = [
1269
+ const Wi = [
1271
1270
  // Thumbnail cache files for macOS and Windows
1272
1271
  ".DS_Store",
1273
1272
  // macOs
1274
1273
  "Thumbs.db"
1275
1274
  // Windows
1276
1275
  ];
1277
- function Ua(i) {
1276
+ function Bi(a) {
1278
1277
  return H(this, void 0, void 0, function* () {
1279
- return hi(i) && Ba(i.dataTransfer) ? Za(i.dataTransfer, i.type) : Ya(i) ? Va(i) : Array.isArray(i) && i.every((a) => "getFile" in a && typeof a.getFile == "function") ? Ga(i) : [];
1278
+ return ha(a) && Ni(a.dataTransfer) ? Gi(a.dataTransfer, a.type) : Ui(a) ? Yi(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Vi(a) : [];
1280
1279
  });
1281
1280
  }
1282
- function Ba(i) {
1283
- return hi(i);
1281
+ function Ni(a) {
1282
+ return ha(a);
1284
1283
  }
1285
- function Ya(i) {
1286
- return hi(i) && hi(i.target);
1284
+ function Ui(a) {
1285
+ return ha(a) && ha(a.target);
1287
1286
  }
1288
- function hi(i) {
1289
- return typeof i == "object" && i !== null;
1287
+ function ha(a) {
1288
+ return typeof a == "object" && a !== null;
1290
1289
  }
1291
- function Va(i) {
1292
- return qi(i.target.files).map((a) => G(a));
1290
+ function Yi(a) {
1291
+ return qa(a.target.files).map((i) => G(i));
1293
1292
  }
1294
- function Ga(i) {
1293
+ function Vi(a) {
1295
1294
  return H(this, void 0, void 0, function* () {
1296
- return (yield Promise.all(i.map((t) => t.getFile()))).map((t) => G(t));
1295
+ return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => G(t));
1297
1296
  });
1298
1297
  }
1299
- function Za(i, a) {
1298
+ function Gi(a, i) {
1300
1299
  return H(this, void 0, void 0, function* () {
1301
- if (i.items) {
1302
- const t = qi(i.items).filter((e) => e.kind === "file");
1303
- if (a !== "drop")
1300
+ if (a.items) {
1301
+ const t = qa(a.items).filter((n) => n.kind === "file");
1302
+ if (i !== "drop")
1304
1303
  return t;
1305
- const n = yield Promise.all(t.map(Ja));
1306
- return Ji(da(n));
1304
+ const e = yield Promise.all(t.map(Zi));
1305
+ return Ja(di(e));
1307
1306
  }
1308
- return Ji(qi(i.files).map((t) => G(t)));
1307
+ return Ja(qa(a.files).map((t) => G(t)));
1309
1308
  });
1310
1309
  }
1311
- function Ji(i) {
1312
- return i.filter((a) => Na.indexOf(a.name) === -1);
1310
+ function Ja(a) {
1311
+ return a.filter((i) => Wi.indexOf(i.name) === -1);
1313
1312
  }
1314
- function qi(i) {
1315
- if (i === null)
1313
+ function qa(a) {
1314
+ if (a === null)
1316
1315
  return [];
1317
- const a = [];
1318
- for (let t = 0; t < i.length; t++) {
1319
- const n = i[t];
1320
- a.push(n);
1316
+ const i = [];
1317
+ for (let t = 0; t < a.length; t++) {
1318
+ const e = a[t];
1319
+ i.push(e);
1321
1320
  }
1322
- return a;
1321
+ return i;
1323
1322
  }
1324
- function Ja(i) {
1325
- if (typeof i.webkitGetAsEntry != "function")
1326
- return Xi(i);
1327
- const a = i.webkitGetAsEntry();
1328
- return a && a.isDirectory ? ma(a) : Xi(i, a);
1323
+ function Zi(a) {
1324
+ if (typeof a.webkitGetAsEntry != "function")
1325
+ return Xa(a);
1326
+ const i = a.webkitGetAsEntry();
1327
+ return i && i.isDirectory ? mi(i) : Xa(a, i);
1329
1328
  }
1330
- function da(i) {
1331
- return i.reduce((a, t) => [
1332
- ...a,
1333
- ...Array.isArray(t) ? da(t) : [t]
1329
+ function di(a) {
1330
+ return a.reduce((i, t) => [
1331
+ ...i,
1332
+ ...Array.isArray(t) ? di(t) : [t]
1334
1333
  ], []);
1335
1334
  }
1336
- function Xi(i, a) {
1335
+ function Xa(a, i) {
1337
1336
  var t;
1338
- if (typeof i.getAsFileSystemHandle == "function")
1339
- return i.getAsFileSystemHandle().then((o) => H(this, void 0, void 0, function* () {
1337
+ if (typeof a.getAsFileSystemHandle == "function")
1338
+ return a.getAsFileSystemHandle().then((o) => H(this, void 0, void 0, function* () {
1340
1339
  const c = yield o.getFile();
1341
1340
  return c.handle = o, G(c);
1342
1341
  }));
1343
- const n = i.getAsFile();
1344
- if (!n)
1345
- return Promise.reject(`${i} is not a File`);
1346
- const e = G(n, (t = a == null ? void 0 : a.fullPath) !== null && t !== void 0 ? t : void 0);
1347
- return Promise.resolve(e);
1342
+ const e = a.getAsFile();
1343
+ if (!e)
1344
+ return Promise.reject(`${a} is not a File`);
1345
+ const n = G(e, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
1346
+ return Promise.resolve(n);
1348
1347
  }
1349
- function Xa(i) {
1348
+ function Ji(a) {
1350
1349
  return H(this, void 0, void 0, function* () {
1351
- return i.isDirectory ? ma(i) : Qa(i);
1350
+ return a.isDirectory ? mi(a) : Xi(a);
1352
1351
  });
1353
1352
  }
1354
- function ma(i) {
1355
- const a = i.createReader();
1356
- return new Promise((t, n) => {
1357
- const e = [];
1353
+ function mi(a) {
1354
+ const i = a.createReader();
1355
+ return new Promise((t, e) => {
1356
+ const n = [];
1358
1357
  function o() {
1359
- a.readEntries((c) => H(this, void 0, void 0, function* () {
1358
+ i.readEntries((c) => H(this, void 0, void 0, function* () {
1360
1359
  if (c.length) {
1361
- const r = Promise.all(c.map(Xa));
1362
- e.push(r), o();
1360
+ const r = Promise.all(c.map(Ji));
1361
+ n.push(r), o();
1363
1362
  } else
1364
1363
  try {
1365
- const r = yield Promise.all(e);
1364
+ const r = yield Promise.all(n);
1366
1365
  t(r);
1367
1366
  } catch (r) {
1368
- n(r);
1367
+ e(r);
1369
1368
  }
1370
1369
  }), (c) => {
1371
- n(c);
1370
+ e(c);
1372
1371
  });
1373
1372
  }
1374
1373
  o();
1375
1374
  });
1376
1375
  }
1377
- function Qa(i) {
1376
+ function Xi(a) {
1378
1377
  return H(this, void 0, void 0, function* () {
1379
- return new Promise((a, t) => {
1380
- i.file((n) => {
1381
- const e = G(n, i.fullPath);
1382
- a(e);
1383
- }, (n) => {
1384
- t(n);
1378
+ return new Promise((i, t) => {
1379
+ a.file((e) => {
1380
+ const n = G(e, a.fullPath);
1381
+ i(n);
1382
+ }, (e) => {
1383
+ t(e);
1385
1384
  });
1386
1385
  });
1387
1386
  });
1388
1387
  }
1389
- var fi = {}, Qi;
1390
- function it() {
1391
- return Qi || (Qi = 1, fi.__esModule = !0, fi.default = function(i, a) {
1392
- if (i && a) {
1393
- var t = Array.isArray(a) ? a : a.split(",");
1388
+ var fa = {}, Qa;
1389
+ function Qi() {
1390
+ return Qa || (Qa = 1, fa.__esModule = !0, fa.default = function(a, i) {
1391
+ if (a && i) {
1392
+ var t = Array.isArray(i) ? i : i.split(",");
1394
1393
  if (t.length === 0)
1395
1394
  return !0;
1396
- var n = i.name || "", e = (i.type || "").toLowerCase(), o = e.replace(/\/.*$/, "");
1395
+ var e = a.name || "", n = (a.type || "").toLowerCase(), o = n.replace(/\/.*$/, "");
1397
1396
  return t.some(function(c) {
1398
1397
  var r = c.trim().toLowerCase();
1399
- return r.charAt(0) === "." ? n.toLowerCase().endsWith(r) : r.endsWith("/*") ? o === r.replace(/\/.*$/, "") : e === r;
1398
+ return r.charAt(0) === "." ? e.toLowerCase().endsWith(r) : r.endsWith("/*") ? o === r.replace(/\/.*$/, "") : n === r;
1400
1399
  });
1401
1400
  }
1402
1401
  return !0;
1403
- }), fi;
1402
+ }), fa;
1404
1403
  }
1405
- var at = it();
1406
- const Ri = /* @__PURE__ */ Ia(at);
1407
- function ia(i) {
1408
- return et(i) || nt(i) || va(i) || tt();
1404
+ var at = Qi();
1405
+ const Ra = /* @__PURE__ */ Pi(at);
1406
+ function ai(a) {
1407
+ return et(a) || tt(a) || vi(a) || it();
1409
1408
  }
1410
- function tt() {
1409
+ function it() {
1411
1410
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1412
1411
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1413
1412
  }
1414
- function nt(i) {
1415
- if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null) return Array.from(i);
1413
+ function tt(a) {
1414
+ if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1416
1415
  }
1417
- function et(i) {
1418
- if (Array.isArray(i)) return Ti(i);
1416
+ function et(a) {
1417
+ if (Array.isArray(a)) return Ta(a);
1419
1418
  }
1420
- function aa(i, a) {
1421
- var t = Object.keys(i);
1419
+ function ii(a, i) {
1420
+ var t = Object.keys(a);
1422
1421
  if (Object.getOwnPropertySymbols) {
1423
- var n = Object.getOwnPropertySymbols(i);
1424
- a && (n = n.filter(function(e) {
1425
- return Object.getOwnPropertyDescriptor(i, e).enumerable;
1426
- })), t.push.apply(t, n);
1422
+ var e = Object.getOwnPropertySymbols(a);
1423
+ i && (e = e.filter(function(n) {
1424
+ return Object.getOwnPropertyDescriptor(a, n).enumerable;
1425
+ })), t.push.apply(t, e);
1427
1426
  }
1428
1427
  return t;
1429
1428
  }
1430
- function ta(i) {
1431
- for (var a = 1; a < arguments.length; a++) {
1432
- var t = arguments[a] != null ? arguments[a] : {};
1433
- a % 2 ? aa(Object(t), !0).forEach(function(n) {
1434
- ua(i, n, t[n]);
1435
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : aa(Object(t)).forEach(function(n) {
1436
- Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
1429
+ function ti(a) {
1430
+ for (var i = 1; i < arguments.length; i++) {
1431
+ var t = arguments[i] != null ? arguments[i] : {};
1432
+ i % 2 ? ii(Object(t), !0).forEach(function(e) {
1433
+ ui(a, e, t[e]);
1434
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : ii(Object(t)).forEach(function(e) {
1435
+ Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
1437
1436
  });
1438
1437
  }
1439
- return i;
1438
+ return a;
1440
1439
  }
1441
- function ua(i, a, t) {
1442
- return a in i ? Object.defineProperty(i, a, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : i[a] = t, i;
1440
+ function ui(a, i, t) {
1441
+ return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1443
1442
  }
1444
- function ti(i, a) {
1445
- return ct(i) || ot(i, a) || va(i, a) || pt();
1443
+ function ta(a, i) {
1444
+ return ot(a) || pt(a, i) || vi(a, i) || nt();
1446
1445
  }
1447
- function pt() {
1446
+ function nt() {
1448
1447
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1449
1448
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1450
1449
  }
1451
- function va(i, a) {
1452
- if (i) {
1453
- if (typeof i == "string") return Ti(i, a);
1454
- var t = Object.prototype.toString.call(i).slice(8, -1);
1455
- if (t === "Object" && i.constructor && (t = i.constructor.name), t === "Map" || t === "Set") return Array.from(i);
1456
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ti(i, a);
1450
+ function vi(a, i) {
1451
+ if (a) {
1452
+ if (typeof a == "string") return Ta(a, i);
1453
+ var t = Object.prototype.toString.call(a).slice(8, -1);
1454
+ if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
1455
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ta(a, i);
1457
1456
  }
1458
1457
  }
1459
- function Ti(i, a) {
1460
- (a == null || a > i.length) && (a = i.length);
1461
- for (var t = 0, n = new Array(a); t < a; t++)
1462
- n[t] = i[t];
1463
- return n;
1458
+ function Ta(a, i) {
1459
+ (i == null || i > a.length) && (i = a.length);
1460
+ for (var t = 0, e = new Array(i); t < i; t++)
1461
+ e[t] = a[t];
1462
+ return e;
1464
1463
  }
1465
- function ot(i, a) {
1466
- var t = i == null ? null : typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
1464
+ function pt(a, i) {
1465
+ var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1467
1466
  if (t != null) {
1468
- var n = [], e = !0, o = !1, c, r;
1467
+ var e = [], n = !0, o = !1, c, r;
1469
1468
  try {
1470
- for (t = t.call(i); !(e = (c = t.next()).done) && (n.push(c.value), !(a && n.length === a)); e = !0)
1469
+ for (t = t.call(a); !(n = (c = t.next()).done) && (e.push(c.value), !(i && e.length === i)); n = !0)
1471
1470
  ;
1472
1471
  } catch (v) {
1473
1472
  o = !0, r = v;
1474
1473
  } finally {
1475
1474
  try {
1476
- !e && t.return != null && t.return();
1475
+ !n && t.return != null && t.return();
1477
1476
  } finally {
1478
1477
  if (o) throw r;
1479
1478
  }
1480
1479
  }
1481
- return n;
1480
+ return e;
1482
1481
  }
1483
1482
  }
1484
- function ct(i) {
1485
- if (Array.isArray(i)) return i;
1483
+ function ot(a) {
1484
+ if (Array.isArray(a)) return a;
1486
1485
  }
1487
- var lt = typeof Ri == "function" ? Ri : Ri.default, rt = "file-invalid-type", st = "file-too-large", dt = "file-too-small", mt = "too-many-files", ut = function() {
1488
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = a.split(","), n = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
1486
+ var ct = typeof Ra == "function" ? Ra : Ra.default, lt = "file-invalid-type", rt = "file-too-large", st = "file-too-small", dt = "too-many-files", mt = function() {
1487
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = i.split(","), e = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
1489
1488
  return {
1490
- code: rt,
1491
- message: "File type must be ".concat(n)
1489
+ code: lt,
1490
+ message: "File type must be ".concat(e)
1492
1491
  };
1493
- }, na = function(a) {
1492
+ }, ei = function(i) {
1494
1493
  return {
1495
- code: st,
1496
- message: "File is larger than ".concat(a, " ").concat(a === 1 ? "byte" : "bytes")
1494
+ code: rt,
1495
+ message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1497
1496
  };
1498
- }, ea = function(a) {
1497
+ }, ni = function(i) {
1499
1498
  return {
1500
- code: dt,
1501
- message: "File is smaller than ".concat(a, " ").concat(a === 1 ? "byte" : "bytes")
1499
+ code: st,
1500
+ message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1502
1501
  };
1503
- }, vt = {
1504
- code: mt,
1502
+ }, ut = {
1503
+ code: dt,
1505
1504
  message: "Too many files"
1506
1505
  };
1507
- function fa(i, a) {
1508
- var t = i.type === "application/x-moz-file" || lt(i, a);
1509
- return [t, t ? null : ut(a)];
1510
- }
1511
- function xa(i, a, t) {
1512
- if (K(i.size))
1513
- if (K(a) && K(t)) {
1514
- if (i.size > t) return [!1, na(t)];
1515
- if (i.size < a) return [!1, ea(a)];
1506
+ function fi(a, i) {
1507
+ var t = a.type === "application/x-moz-file" || ct(a, i);
1508
+ return [t, t ? null : mt(i)];
1509
+ }
1510
+ function xi(a, i, t) {
1511
+ if (K(a.size))
1512
+ if (K(i) && K(t)) {
1513
+ if (a.size > t) return [!1, ei(t)];
1514
+ if (a.size < i) return [!1, ni(i)];
1516
1515
  } else {
1517
- if (K(a) && i.size < a) return [!1, ea(a)];
1518
- if (K(t) && i.size > t) return [!1, na(t)];
1516
+ if (K(i) && a.size < i) return [!1, ni(i)];
1517
+ if (K(t) && a.size > t) return [!1, ei(t)];
1519
1518
  }
1520
1519
  return [!0, null];
1521
1520
  }
1522
- function K(i) {
1523
- return i != null;
1521
+ function K(a) {
1522
+ return a != null;
1524
1523
  }
1525
- function ft(i) {
1526
- var a = i.files, t = i.accept, n = i.minSize, e = i.maxSize, o = i.multiple, c = i.maxFiles, r = i.validator;
1527
- return !o && a.length > 1 || o && c >= 1 && a.length > c ? !1 : a.every(function(v) {
1528
- var h = fa(v, t), x = ti(h, 1), D = x[0], I = xa(v, n, e), R = ti(I, 1), y = R[0], z = r ? r(v) : null;
1529
- return D && y && !z;
1524
+ function vt(a) {
1525
+ var i = a.files, t = a.accept, e = a.minSize, n = a.maxSize, o = a.multiple, c = a.maxFiles, r = a.validator;
1526
+ return !o && i.length > 1 || o && c >= 1 && i.length > c ? !1 : i.every(function(v) {
1527
+ var h = fi(v, t), x = ta(h, 1), k = x[0], P = xi(v, e, n), R = ta(P, 1), j = R[0], I = r ? r(v) : null;
1528
+ return k && j && !I;
1530
1529
  });
1531
1530
  }
1532
- function yi(i) {
1533
- return typeof i.isPropagationStopped == "function" ? i.isPropagationStopped() : typeof i.cancelBubble < "u" ? i.cancelBubble : !1;
1531
+ function ya(a) {
1532
+ return typeof a.isPropagationStopped == "function" ? a.isPropagationStopped() : typeof a.cancelBubble < "u" ? a.cancelBubble : !1;
1534
1533
  }
1535
- function xi(i) {
1536
- return i.dataTransfer ? Array.prototype.some.call(i.dataTransfer.types, function(a) {
1537
- return a === "Files" || a === "application/x-moz-file";
1538
- }) : !!i.target && !!i.target.files;
1534
+ function xa(a) {
1535
+ return a.dataTransfer ? Array.prototype.some.call(a.dataTransfer.types, function(i) {
1536
+ return i === "Files" || i === "application/x-moz-file";
1537
+ }) : !!a.target && !!a.target.files;
1539
1538
  }
1540
- function pa(i) {
1541
- i.preventDefault();
1539
+ function pi(a) {
1540
+ a.preventDefault();
1542
1541
  }
1543
- function xt(i) {
1544
- return i.indexOf("MSIE") !== -1 || i.indexOf("Trident/") !== -1;
1542
+ function ft(a) {
1543
+ return a.indexOf("MSIE") !== -1 || a.indexOf("Trident/") !== -1;
1545
1544
  }
1546
- function gt(i) {
1547
- return i.indexOf("Edge/") !== -1;
1545
+ function xt(a) {
1546
+ return a.indexOf("Edge/") !== -1;
1548
1547
  }
1549
- function bt() {
1550
- var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
1551
- return xt(i) || gt(i);
1552
- }
1553
- function _() {
1554
- for (var i = arguments.length, a = new Array(i), t = 0; t < i; t++)
1555
- a[t] = arguments[t];
1556
- return function(n) {
1557
- for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), c = 1; c < e; c++)
1548
+ function gt() {
1549
+ var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
1550
+ return ft(a) || xt(a);
1551
+ }
1552
+ function O() {
1553
+ for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
1554
+ i[t] = arguments[t];
1555
+ return function(e) {
1556
+ for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), c = 1; c < n; c++)
1558
1557
  o[c - 1] = arguments[c];
1559
- return a.some(function(r) {
1560
- return !yi(n) && r && r.apply(void 0, [n].concat(o)), yi(n);
1558
+ return i.some(function(r) {
1559
+ return !ya(e) && r && r.apply(void 0, [e].concat(o)), ya(e);
1561
1560
  });
1562
1561
  };
1563
1562
  }
1564
- function ht() {
1563
+ function bt() {
1565
1564
  return "showOpenFilePicker" in window;
1566
1565
  }
1567
- function yt(i) {
1568
- if (K(i)) {
1569
- var a = Object.entries(i).filter(function(t) {
1570
- var n = ti(t, 2), e = n[0], o = n[1], c = !0;
1571
- return ga(e) || (console.warn('Skipped "'.concat(e, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), c = !1), (!Array.isArray(o) || !o.every(ba)) && (console.warn('Skipped "'.concat(e, '" because an invalid file extension was provided.')), c = !1), c;
1572
- }).reduce(function(t, n) {
1573
- var e = ti(n, 2), o = e[0], c = e[1];
1574
- return ta(ta({}, t), {}, ua({}, o, c));
1566
+ function ht(a) {
1567
+ if (K(a)) {
1568
+ var i = Object.entries(a).filter(function(t) {
1569
+ var e = ta(t, 2), n = e[0], o = e[1], c = !0;
1570
+ return gi(n) || (console.warn('Skipped "'.concat(n, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), c = !1), (!Array.isArray(o) || !o.every(bi)) && (console.warn('Skipped "'.concat(n, '" because an invalid file extension was provided.')), c = !1), c;
1571
+ }).reduce(function(t, e) {
1572
+ var n = ta(e, 2), o = n[0], c = n[1];
1573
+ return ti(ti({}, t), {}, ui({}, o, c));
1575
1574
  }, {});
1576
1575
  return [{
1577
1576
  // description is required due to https://crbug.com/1264708
1578
1577
  description: "Files",
1579
- accept: a
1578
+ accept: i
1580
1579
  }];
1581
1580
  }
1582
- return i;
1581
+ return a;
1583
1582
  }
1584
- function wt(i) {
1585
- if (K(i))
1586
- return Object.entries(i).reduce(function(a, t) {
1587
- var n = ti(t, 2), e = n[0], o = n[1];
1588
- return [].concat(ia(a), [e], ia(o));
1589
- }, []).filter(function(a) {
1590
- return ga(a) || ba(a);
1583
+ function yt(a) {
1584
+ if (K(a))
1585
+ return Object.entries(a).reduce(function(i, t) {
1586
+ var e = ta(t, 2), n = e[0], o = e[1];
1587
+ return [].concat(ai(i), [n], ai(o));
1588
+ }, []).filter(function(i) {
1589
+ return gi(i) || bi(i);
1591
1590
  }).join(",");
1592
1591
  }
1593
- function kt(i) {
1594
- return i instanceof DOMException && (i.name === "AbortError" || i.code === i.ABORT_ERR);
1592
+ function wt(a) {
1593
+ return a instanceof DOMException && (a.name === "AbortError" || a.code === a.ABORT_ERR);
1595
1594
  }
1596
- function jt(i) {
1597
- return i instanceof DOMException && (i.name === "SecurityError" || i.code === i.SECURITY_ERR);
1595
+ function kt(a) {
1596
+ return a instanceof DOMException && (a.name === "SecurityError" || a.code === a.SECURITY_ERR);
1598
1597
  }
1599
- function ga(i) {
1600
- return i === "audio/*" || i === "video/*" || i === "image/*" || i === "text/*" || i === "application/*" || /\w+\/[-+.\w]+/g.test(i);
1598
+ function gi(a) {
1599
+ return a === "audio/*" || a === "video/*" || a === "image/*" || a === "text/*" || a === "application/*" || /\w+\/[-+.\w]+/g.test(a);
1601
1600
  }
1602
- function ba(i) {
1603
- return /^.*\.[\w]+$/.test(i);
1601
+ function bi(a) {
1602
+ return /^.*\.[\w]+$/.test(a);
1604
1603
  }
1605
- var Dt = ["children"], zt = ["open"], Et = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], At = ["refKey", "onChange", "onClick"];
1606
- function Ft(i) {
1607
- return Pt(i) || _t(i) || ha(i) || Ot();
1604
+ var jt = ["children"], Dt = ["open"], Et = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], zt = ["refKey", "onChange", "onClick"];
1605
+ function At(a) {
1606
+ return _t(a) || Ot(a) || hi(a) || Ft();
1608
1607
  }
1609
- function Ot() {
1608
+ function Ft() {
1610
1609
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1611
1610
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1612
1611
  }
1613
- function _t(i) {
1614
- if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null) return Array.from(i);
1612
+ function Ot(a) {
1613
+ if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1615
1614
  }
1616
- function Pt(i) {
1617
- if (Array.isArray(i)) return Li(i);
1615
+ function _t(a) {
1616
+ if (Array.isArray(a)) return Ca(a);
1618
1617
  }
1619
- function Si(i, a) {
1620
- return St(i) || Rt(i, a) || ha(i, a) || It();
1618
+ function Sa(a, i) {
1619
+ return Rt(a) || It(a, i) || hi(a, i) || Pt();
1621
1620
  }
1622
- function It() {
1621
+ function Pt() {
1623
1622
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1624
1623
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1625
1624
  }
1626
- function ha(i, a) {
1627
- if (i) {
1628
- if (typeof i == "string") return Li(i, a);
1629
- var t = Object.prototype.toString.call(i).slice(8, -1);
1630
- if (t === "Object" && i.constructor && (t = i.constructor.name), t === "Map" || t === "Set") return Array.from(i);
1631
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Li(i, a);
1625
+ function hi(a, i) {
1626
+ if (a) {
1627
+ if (typeof a == "string") return Ca(a, i);
1628
+ var t = Object.prototype.toString.call(a).slice(8, -1);
1629
+ if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
1630
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ca(a, i);
1632
1631
  }
1633
1632
  }
1634
- function Li(i, a) {
1635
- (a == null || a > i.length) && (a = i.length);
1636
- for (var t = 0, n = new Array(a); t < a; t++)
1637
- n[t] = i[t];
1638
- return n;
1633
+ function Ca(a, i) {
1634
+ (i == null || i > a.length) && (i = a.length);
1635
+ for (var t = 0, e = new Array(i); t < i; t++)
1636
+ e[t] = a[t];
1637
+ return e;
1639
1638
  }
1640
- function Rt(i, a) {
1641
- var t = i == null ? null : typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
1639
+ function It(a, i) {
1640
+ var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1642
1641
  if (t != null) {
1643
- var n = [], e = !0, o = !1, c, r;
1642
+ var e = [], n = !0, o = !1, c, r;
1644
1643
  try {
1645
- for (t = t.call(i); !(e = (c = t.next()).done) && (n.push(c.value), !(a && n.length === a)); e = !0)
1644
+ for (t = t.call(a); !(n = (c = t.next()).done) && (e.push(c.value), !(i && e.length === i)); n = !0)
1646
1645
  ;
1647
1646
  } catch (v) {
1648
1647
  o = !0, r = v;
1649
1648
  } finally {
1650
1649
  try {
1651
- !e && t.return != null && t.return();
1650
+ !n && t.return != null && t.return();
1652
1651
  } finally {
1653
1652
  if (o) throw r;
1654
1653
  }
1655
1654
  }
1656
- return n;
1655
+ return e;
1657
1656
  }
1658
1657
  }
1659
- function St(i) {
1660
- if (Array.isArray(i)) return i;
1658
+ function Rt(a) {
1659
+ if (Array.isArray(a)) return a;
1661
1660
  }
1662
- function oa(i, a) {
1663
- var t = Object.keys(i);
1661
+ function oi(a, i) {
1662
+ var t = Object.keys(a);
1664
1663
  if (Object.getOwnPropertySymbols) {
1665
- var n = Object.getOwnPropertySymbols(i);
1666
- a && (n = n.filter(function(e) {
1667
- return Object.getOwnPropertyDescriptor(i, e).enumerable;
1668
- })), t.push.apply(t, n);
1664
+ var e = Object.getOwnPropertySymbols(a);
1665
+ i && (e = e.filter(function(n) {
1666
+ return Object.getOwnPropertyDescriptor(a, n).enumerable;
1667
+ })), t.push.apply(t, e);
1669
1668
  }
1670
1669
  return t;
1671
1670
  }
1672
- function u(i) {
1673
- for (var a = 1; a < arguments.length; a++) {
1674
- var t = arguments[a] != null ? arguments[a] : {};
1675
- a % 2 ? oa(Object(t), !0).forEach(function(n) {
1676
- Ci(i, n, t[n]);
1677
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : oa(Object(t)).forEach(function(n) {
1678
- Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
1671
+ function u(a) {
1672
+ for (var i = 1; i < arguments.length; i++) {
1673
+ var t = arguments[i] != null ? arguments[i] : {};
1674
+ i % 2 ? oi(Object(t), !0).forEach(function(e) {
1675
+ La(a, e, t[e]);
1676
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : oi(Object(t)).forEach(function(e) {
1677
+ Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
1679
1678
  });
1680
1679
  }
1681
- return i;
1680
+ return a;
1682
1681
  }
1683
- function Ci(i, a, t) {
1684
- return a in i ? Object.defineProperty(i, a, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : i[a] = t, i;
1682
+ function La(a, i, t) {
1683
+ return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1685
1684
  }
1686
- function wi(i, a) {
1687
- if (i == null) return {};
1688
- var t = qt(i, a), n, e;
1685
+ function wa(a, i) {
1686
+ if (a == null) return {};
1687
+ var t = St(a, i), e, n;
1689
1688
  if (Object.getOwnPropertySymbols) {
1690
- var o = Object.getOwnPropertySymbols(i);
1691
- for (e = 0; e < o.length; e++)
1692
- n = o[e], !(a.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(i, n) && (t[n] = i[n]);
1689
+ var o = Object.getOwnPropertySymbols(a);
1690
+ for (n = 0; n < o.length; n++)
1691
+ e = o[n], !(i.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(a, e) && (t[e] = a[e]);
1693
1692
  }
1694
1693
  return t;
1695
1694
  }
1696
- function qt(i, a) {
1697
- if (i == null) return {};
1698
- var t = {}, n = Object.keys(i), e, o;
1699
- for (o = 0; o < n.length; o++)
1700
- e = n[o], !(a.indexOf(e) >= 0) && (t[e] = i[e]);
1695
+ function St(a, i) {
1696
+ if (a == null) return {};
1697
+ var t = {}, e = Object.keys(a), n, o;
1698
+ for (o = 0; o < e.length; o++)
1699
+ n = e[o], !(i.indexOf(n) >= 0) && (t[n] = a[n]);
1701
1700
  return t;
1702
1701
  }
1703
- var ji = /* @__PURE__ */ Fa(function(i, a) {
1704
- var t = i.children, n = wi(i, Dt), e = wa(n), o = e.open, c = wi(e, zt);
1705
- return _a(a, function() {
1702
+ var ja = /* @__PURE__ */ Ai(function(a, i) {
1703
+ var t = a.children, e = wa(a, jt), n = wi(e), o = n.open, c = wa(n, Dt);
1704
+ return Oi(i, function() {
1706
1705
  return {
1707
1706
  open: o
1708
1707
  };
1709
- }, [o]), /* @__PURE__ */ Aa.createElement(Pa, null, t(u(u({}, c), {}, {
1708
+ }, [o]), /* @__PURE__ */ s.createElement(_i, null, t(u(u({}, c), {}, {
1710
1709
  open: o
1711
1710
  })));
1712
1711
  });
1713
- ji.displayName = "Dropzone";
1714
- var ya = {
1712
+ ja.displayName = "Dropzone";
1713
+ var yi = {
1715
1714
  disabled: !1,
1716
- getFilesFromEvent: Ua,
1715
+ getFilesFromEvent: Bi,
1717
1716
  maxSize: 1 / 0,
1718
1717
  minSize: 0,
1719
1718
  multiple: !0,
@@ -1727,8 +1726,8 @@ var ya = {
1727
1726
  useFsAccessApi: !1,
1728
1727
  autoFocus: !1
1729
1728
  };
1730
- ji.defaultProps = ya;
1731
- ji.propTypes = {
1729
+ ja.defaultProps = yi;
1730
+ ja.propTypes = {
1732
1731
  /**
1733
1732
  * Render function that exposes the dropzone state and prop getter fns
1734
1733
  *
@@ -1744,7 +1743,7 @@ ji.propTypes = {
1744
1743
  * @param {File[]} params.acceptedFiles Accepted files
1745
1744
  * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
1746
1745
  */
1747
- children: s.func,
1746
+ children: d.func,
1748
1747
  /**
1749
1748
  * Set accepted file types.
1750
1749
  * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
@@ -1752,90 +1751,90 @@ ji.propTypes = {
1752
1751
  * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
1753
1752
  * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
1754
1753
  */
1755
- accept: s.objectOf(s.arrayOf(s.string)),
1754
+ accept: d.objectOf(d.arrayOf(d.string)),
1756
1755
  /**
1757
1756
  * Allow drag 'n' drop (or selection from the file dialog) of multiple files
1758
1757
  */
1759
- multiple: s.bool,
1758
+ multiple: d.bool,
1760
1759
  /**
1761
1760
  * If false, allow dropped items to take over the current browser window
1762
1761
  */
1763
- preventDropOnDocument: s.bool,
1762
+ preventDropOnDocument: d.bool,
1764
1763
  /**
1765
1764
  * If true, disables click to open the native file selection dialog
1766
1765
  */
1767
- noClick: s.bool,
1766
+ noClick: d.bool,
1768
1767
  /**
1769
1768
  * If true, disables SPACE/ENTER to open the native file selection dialog.
1770
1769
  * Note that it also stops tracking the focus state.
1771
1770
  */
1772
- noKeyboard: s.bool,
1771
+ noKeyboard: d.bool,
1773
1772
  /**
1774
1773
  * If true, disables drag 'n' drop
1775
1774
  */
1776
- noDrag: s.bool,
1775
+ noDrag: d.bool,
1777
1776
  /**
1778
1777
  * If true, stops drag event propagation to parents
1779
1778
  */
1780
- noDragEventsBubbling: s.bool,
1779
+ noDragEventsBubbling: d.bool,
1781
1780
  /**
1782
1781
  * Minimum file size (in bytes)
1783
1782
  */
1784
- minSize: s.number,
1783
+ minSize: d.number,
1785
1784
  /**
1786
1785
  * Maximum file size (in bytes)
1787
1786
  */
1788
- maxSize: s.number,
1787
+ maxSize: d.number,
1789
1788
  /**
1790
1789
  * Maximum accepted number of files
1791
1790
  * The default value is 0 which means there is no limitation to how many files are accepted.
1792
1791
  */
1793
- maxFiles: s.number,
1792
+ maxFiles: d.number,
1794
1793
  /**
1795
1794
  * Enable/disable the dropzone
1796
1795
  */
1797
- disabled: s.bool,
1796
+ disabled: d.bool,
1798
1797
  /**
1799
1798
  * Use this to provide a custom file aggregator
1800
1799
  *
1801
1800
  * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
1802
1801
  */
1803
- getFilesFromEvent: s.func,
1802
+ getFilesFromEvent: d.func,
1804
1803
  /**
1805
1804
  * Cb for when closing the file dialog with no selection
1806
1805
  */
1807
- onFileDialogCancel: s.func,
1806
+ onFileDialogCancel: d.func,
1808
1807
  /**
1809
1808
  * Cb for when opening the file dialog
1810
1809
  */
1811
- onFileDialogOpen: s.func,
1810
+ onFileDialogOpen: d.func,
1812
1811
  /**
1813
1812
  * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
1814
1813
  * to open the file picker instead of using an `<input type="file">` click event.
1815
1814
  */
1816
- useFsAccessApi: s.bool,
1815
+ useFsAccessApi: d.bool,
1817
1816
  /**
1818
1817
  * Set to true to focus the root element on render
1819
1818
  */
1820
- autoFocus: s.bool,
1819
+ autoFocus: d.bool,
1821
1820
  /**
1822
1821
  * Cb for when the `dragenter` event occurs.
1823
1822
  *
1824
1823
  * @param {DragEvent} event
1825
1824
  */
1826
- onDragEnter: s.func,
1825
+ onDragEnter: d.func,
1827
1826
  /**
1828
1827
  * Cb for when the `dragleave` event occurs
1829
1828
  *
1830
1829
  * @param {DragEvent} event
1831
1830
  */
1832
- onDragLeave: s.func,
1831
+ onDragLeave: d.func,
1833
1832
  /**
1834
1833
  * Cb for when the `dragover` event occurs
1835
1834
  *
1836
1835
  * @param {DragEvent} event
1837
1836
  */
1838
- onDragOver: s.func,
1837
+ onDragOver: d.func,
1839
1838
  /**
1840
1839
  * Cb for when the `drop` event occurs.
1841
1840
  * Note that this callback is invoked after the `getFilesFromEvent` callback is done.
@@ -1866,7 +1865,7 @@ ji.propTypes = {
1866
1865
  * @param {FileRejection[]} fileRejections
1867
1866
  * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
1868
1867
  */
1869
- onDrop: s.func,
1868
+ onDrop: d.func,
1870
1869
  /**
1871
1870
  * Cb for when the `drop` event occurs.
1872
1871
  * Note that if no files are accepted, this callback is not invoked.
@@ -1874,7 +1873,7 @@ ji.propTypes = {
1874
1873
  * @param {File[]} files
1875
1874
  * @param {(DragEvent|Event)} event
1876
1875
  */
1877
- onDropAccepted: s.func,
1876
+ onDropAccepted: d.func,
1878
1877
  /**
1879
1878
  * Cb for when the `drop` event occurs.
1880
1879
  * Note that if no files are rejected, this callback is not invoked.
@@ -1882,21 +1881,21 @@ ji.propTypes = {
1882
1881
  * @param {FileRejection[]} fileRejections
1883
1882
  * @param {(DragEvent|Event)} event
1884
1883
  */
1885
- onDropRejected: s.func,
1884
+ onDropRejected: d.func,
1886
1885
  /**
1887
1886
  * Cb for when there's some error from any of the promises.
1888
1887
  *
1889
1888
  * @param {Error} error
1890
1889
  */
1891
- onError: s.func,
1890
+ onError: d.func,
1892
1891
  /**
1893
1892
  * Custom validation function. It must return null if there's no errors.
1894
1893
  * @param {File} file
1895
1894
  * @returns {FileError|FileError[]|null}
1896
1895
  */
1897
- validator: s.func
1896
+ validator: d.func
1898
1897
  };
1899
- var $i = {
1898
+ var $a = {
1900
1899
  isFocused: !1,
1901
1900
  isFileDialogActive: !1,
1902
1901
  isDragActive: !1,
@@ -1905,58 +1904,58 @@ var $i = {
1905
1904
  acceptedFiles: [],
1906
1905
  fileRejections: []
1907
1906
  };
1908
- function wa() {
1909
- var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = u(u({}, ya), i), t = a.accept, n = a.disabled, e = a.getFilesFromEvent, o = a.maxSize, c = a.minSize, r = a.multiple, v = a.maxFiles, h = a.onDragEnter, x = a.onDragLeave, D = a.onDragOver, I = a.onDrop, R = a.onDropAccepted, y = a.onDropRejected, z = a.onFileDialogCancel, T = a.onFileDialogOpen, ni = a.useFsAccessApi, ei = a.autoFocus, Z = a.preventDropOnDocument, k = a.noClick, S = a.noKeyboard, W = a.noDrag, A = a.noDragEventsBubbling, J = a.onError, L = a.validator, C = V(function() {
1910
- return wt(t);
1911
- }, [t]), pi = V(function() {
1907
+ function wi() {
1908
+ var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = u(u({}, yi), a), t = i.accept, e = i.disabled, n = i.getFilesFromEvent, o = i.maxSize, c = i.minSize, r = i.multiple, v = i.maxFiles, h = i.onDragEnter, x = i.onDragLeave, k = i.onDragOver, P = i.onDrop, R = i.onDropAccepted, j = i.onDropRejected, I = i.onFileDialogCancel, T = i.onFileDialogOpen, ea = i.useFsAccessApi, na = i.autoFocus, Z = i.preventDropOnDocument, D = i.noClick, S = i.noKeyboard, W = i.noDrag, z = i.noDragEventsBubbling, J = i.onError, C = i.validator, L = V(function() {
1912
1909
  return yt(t);
1910
+ }, [t]), pa = V(function() {
1911
+ return ht(t);
1913
1912
  }, [t]), X = V(function() {
1914
- return typeof T == "function" ? T : ca;
1913
+ return typeof T == "function" ? T : ci;
1915
1914
  }, [T]), $ = V(function() {
1916
- return typeof z == "function" ? z : ca;
1917
- }, [z]), b = vi(null), w = vi(null), oi = Oa(Tt, $i), ci = Si(oi, 2), F = ci[0], m = ci[1], O = F.isFocused, li = F.isFileDialogActive, N = vi(typeof window < "u" && window.isSecureContext && ni && ht()), Q = function() {
1918
- !N.current && li && setTimeout(function() {
1919
- if (w.current) {
1920
- var l = w.current.files;
1915
+ return typeof I == "function" ? I : ci;
1916
+ }, [I]), b = va(null), y = va(null), oa = Fi(qt, $a), ca = Sa(oa, 2), A = ca[0], m = ca[1], F = A.isFocused, la = A.isFileDialogActive, B = va(typeof window < "u" && window.isSecureContext && ea && bt()), Q = function() {
1917
+ !B.current && la && setTimeout(function() {
1918
+ if (y.current) {
1919
+ var l = y.current.files;
1921
1920
  l.length || (m({
1922
1921
  type: "closeDialog"
1923
1922
  }), $());
1924
1923
  }
1925
1924
  }, 300);
1926
1925
  };
1927
- ai(function() {
1926
+ ia(function() {
1928
1927
  return window.addEventListener("focus", Q, !1), function() {
1929
1928
  window.removeEventListener("focus", Q, !1);
1930
1929
  };
1931
- }, [w, li, $, N]);
1932
- var q = vi([]), Mi = function(l) {
1930
+ }, [y, la, $, B]);
1931
+ var q = va([]), Ma = function(l) {
1933
1932
  b.current && b.current.contains(l.target) || (l.preventDefault(), q.current = []);
1934
1933
  };
1935
- ai(function() {
1936
- return Z && (document.addEventListener("dragover", pa, !1), document.addEventListener("drop", Mi, !1)), function() {
1937
- Z && (document.removeEventListener("dragover", pa), document.removeEventListener("drop", Mi));
1934
+ ia(function() {
1935
+ return Z && (document.addEventListener("dragover", pi, !1), document.addEventListener("drop", Ma, !1)), function() {
1936
+ Z && (document.removeEventListener("dragover", pi), document.removeEventListener("drop", Ma));
1938
1937
  };
1939
- }, [b, Z]), ai(function() {
1940
- return !n && ei && b.current && b.current.focus(), function() {
1938
+ }, [b, Z]), ia(function() {
1939
+ return !e && na && b.current && b.current.focus(), function() {
1941
1940
  };
1942
- }, [b, ei, n]);
1941
+ }, [b, na, e]);
1943
1942
  var M = E(function(p) {
1944
1943
  J ? J(p) : console.error(p);
1945
- }, [J]), Ki = E(function(p) {
1946
- p.preventDefault(), p.persist(), mi(p), q.current = [].concat(Ft(q.current), [p.target]), xi(p) && Promise.resolve(e(p)).then(function(l) {
1947
- if (!(yi(p) && !A)) {
1948
- var f = l.length, g = f > 0 && ft({
1944
+ }, [J]), Ka = E(function(p) {
1945
+ p.preventDefault(), p.persist(), ma(p), q.current = [].concat(At(q.current), [p.target]), xa(p) && Promise.resolve(n(p)).then(function(l) {
1946
+ if (!(ya(p) && !z)) {
1947
+ var f = l.length, g = f > 0 && vt({
1949
1948
  files: l,
1950
- accept: C,
1949
+ accept: L,
1951
1950
  minSize: c,
1952
1951
  maxSize: o,
1953
1952
  multiple: r,
1954
1953
  maxFiles: v,
1955
- validator: L
1956
- }), j = f > 0 && !g;
1954
+ validator: C
1955
+ }), w = f > 0 && !g;
1957
1956
  m({
1958
1957
  isDragAccept: g,
1959
- isDragReject: j,
1958
+ isDragReject: w,
1960
1959
  isDragActive: !0,
1961
1960
  type: "setDraggedFiles"
1962
1961
  }), h && h(p);
@@ -1964,17 +1963,17 @@ function wa() {
1964
1963
  }).catch(function(l) {
1965
1964
  return M(l);
1966
1965
  });
1967
- }, [e, h, M, A, C, c, o, r, v, L]), Hi = E(function(p) {
1968
- p.preventDefault(), p.persist(), mi(p);
1969
- var l = xi(p);
1966
+ }, [n, h, M, z, L, c, o, r, v, C]), Ha = E(function(p) {
1967
+ p.preventDefault(), p.persist(), ma(p);
1968
+ var l = xa(p);
1970
1969
  if (l && p.dataTransfer)
1971
1970
  try {
1972
1971
  p.dataTransfer.dropEffect = "copy";
1973
1972
  } catch {
1974
1973
  }
1975
- return l && D && D(p), !1;
1976
- }, [D, A]), Wi = E(function(p) {
1977
- p.preventDefault(), p.persist(), mi(p);
1974
+ return l && k && k(p), !1;
1975
+ }, [k, z]), Wa = E(function(p) {
1976
+ p.preventDefault(), p.persist(), ma(p);
1978
1977
  var l = q.current.filter(function(g) {
1979
1978
  return b.current && b.current.contains(g);
1980
1979
  }), f = l.indexOf(p.target);
@@ -1983,109 +1982,109 @@ function wa() {
1983
1982
  isDragActive: !1,
1984
1983
  isDragAccept: !1,
1985
1984
  isDragReject: !1
1986
- }), xi(p) && x && x(p));
1987
- }, [b, x, A]), ri = E(function(p, l) {
1985
+ }), xa(p) && x && x(p));
1986
+ }, [b, x, z]), ra = E(function(p, l) {
1988
1987
  var f = [], g = [];
1989
- p.forEach(function(j) {
1990
- var ii = fa(j, C), Y = Si(ii, 2), zi = Y[0], Ei = Y[1], Ai = xa(j, c, o), ui = Si(Ai, 2), Fi = ui[0], Oi = ui[1], _i = L ? L(j) : null;
1991
- if (zi && Fi && !_i)
1992
- f.push(j);
1988
+ p.forEach(function(w) {
1989
+ var aa = fi(w, L), Y = Sa(aa, 2), Ea = Y[0], za = Y[1], Aa = xi(w, c, o), ua = Sa(Aa, 2), Fa = ua[0], Oa = ua[1], _a = C ? C(w) : null;
1990
+ if (Ea && Fa && !_a)
1991
+ f.push(w);
1993
1992
  else {
1994
- var Pi = [Ei, Oi];
1995
- _i && (Pi = Pi.concat(_i)), g.push({
1996
- file: j,
1997
- errors: Pi.filter(function(Ea) {
1998
- return Ea;
1993
+ var Pa = [za, Oa];
1994
+ _a && (Pa = Pa.concat(_a)), g.push({
1995
+ file: w,
1996
+ errors: Pa.filter(function(zi) {
1997
+ return zi;
1999
1998
  })
2000
1999
  });
2001
2000
  }
2002
- }), (!r && f.length > 1 || r && v >= 1 && f.length > v) && (f.forEach(function(j) {
2001
+ }), (!r && f.length > 1 || r && v >= 1 && f.length > v) && (f.forEach(function(w) {
2003
2002
  g.push({
2004
- file: j,
2005
- errors: [vt]
2003
+ file: w,
2004
+ errors: [ut]
2006
2005
  });
2007
2006
  }), f.splice(0)), m({
2008
2007
  acceptedFiles: f,
2009
2008
  fileRejections: g,
2010
2009
  isDragReject: g.length > 0,
2011
2010
  type: "setFiles"
2012
- }), I && I(f, g, l), g.length > 0 && y && y(g, l), f.length > 0 && R && R(f, l);
2013
- }, [m, r, C, c, o, v, I, R, y, L]), si = E(function(p) {
2014
- p.preventDefault(), p.persist(), mi(p), q.current = [], xi(p) && Promise.resolve(e(p)).then(function(l) {
2015
- yi(p) && !A || ri(l, p);
2011
+ }), P && P(f, g, l), g.length > 0 && j && j(g, l), f.length > 0 && R && R(f, l);
2012
+ }, [m, r, L, c, o, v, P, R, j, C]), sa = E(function(p) {
2013
+ p.preventDefault(), p.persist(), ma(p), q.current = [], xa(p) && Promise.resolve(n(p)).then(function(l) {
2014
+ ya(p) && !z || ra(l, p);
2016
2015
  }).catch(function(l) {
2017
2016
  return M(l);
2018
2017
  }), m({
2019
2018
  type: "reset"
2020
2019
  });
2021
- }, [e, ri, M, A]), U = E(function() {
2022
- if (N.current) {
2020
+ }, [n, ra, M, z]), N = E(function() {
2021
+ if (B.current) {
2023
2022
  m({
2024
2023
  type: "openDialog"
2025
2024
  }), X();
2026
2025
  var p = {
2027
2026
  multiple: r,
2028
- types: pi
2027
+ types: pa
2029
2028
  };
2030
2029
  window.showOpenFilePicker(p).then(function(l) {
2031
- return e(l);
2030
+ return n(l);
2032
2031
  }).then(function(l) {
2033
- ri(l, null), m({
2032
+ ra(l, null), m({
2034
2033
  type: "closeDialog"
2035
2034
  });
2036
2035
  }).catch(function(l) {
2037
- kt(l) ? ($(l), m({
2036
+ wt(l) ? ($(l), m({
2038
2037
  type: "closeDialog"
2039
- })) : jt(l) ? (N.current = !1, w.current ? (w.current.value = null, w.current.click()) : M(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : M(l);
2038
+ })) : kt(l) ? (B.current = !1, y.current ? (y.current.value = null, y.current.click()) : M(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : M(l);
2040
2039
  });
2041
2040
  return;
2042
2041
  }
2043
- w.current && (m({
2042
+ y.current && (m({
2044
2043
  type: "openDialog"
2045
- }), X(), w.current.value = null, w.current.click());
2046
- }, [m, X, $, ni, ri, M, pi, r]), Ni = E(function(p) {
2047
- !b.current || !b.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), U());
2048
- }, [b, U]), Ui = E(function() {
2044
+ }), X(), y.current.value = null, y.current.click());
2045
+ }, [m, X, $, ea, ra, M, pa, r]), Ba = E(function(p) {
2046
+ !b.current || !b.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), N());
2047
+ }, [b, N]), Na = E(function() {
2049
2048
  m({
2050
2049
  type: "focus"
2051
2050
  });
2052
- }, []), Bi = E(function() {
2051
+ }, []), Ua = E(function() {
2053
2052
  m({
2054
2053
  type: "blur"
2055
2054
  });
2056
- }, []), Yi = E(function() {
2057
- k || (bt() ? setTimeout(U, 0) : U());
2058
- }, [k, U]), B = function(l) {
2059
- return n ? null : l;
2060
- }, Di = function(l) {
2061
- return S ? null : B(l);
2062
- }, di = function(l) {
2063
- return W ? null : B(l);
2064
- }, mi = function(l) {
2065
- A && l.stopPropagation();
2066
- }, ja = V(function() {
2055
+ }, []), Ya = E(function() {
2056
+ D || (gt() ? setTimeout(N, 0) : N());
2057
+ }, [D, N]), U = function(l) {
2058
+ return e ? null : l;
2059
+ }, Da = function(l) {
2060
+ return S ? null : U(l);
2061
+ }, da = function(l) {
2062
+ return W ? null : U(l);
2063
+ }, ma = function(l) {
2064
+ z && l.stopPropagation();
2065
+ }, ji = V(function() {
2067
2066
  return function() {
2068
- var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, f = l === void 0 ? "ref" : l, g = p.role, j = p.onKeyDown, ii = p.onFocus, Y = p.onBlur, zi = p.onClick, Ei = p.onDragEnter, Ai = p.onDragOver, ui = p.onDragLeave, Fi = p.onDrop, Oi = wi(p, Et);
2069
- return u(u(Ci({
2070
- onKeyDown: Di(_(j, Ni)),
2071
- onFocus: Di(_(ii, Ui)),
2072
- onBlur: Di(_(Y, Bi)),
2073
- onClick: B(_(zi, Yi)),
2074
- onDragEnter: di(_(Ei, Ki)),
2075
- onDragOver: di(_(Ai, Hi)),
2076
- onDragLeave: di(_(ui, Wi)),
2077
- onDrop: di(_(Fi, si)),
2067
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, f = l === void 0 ? "ref" : l, g = p.role, w = p.onKeyDown, aa = p.onFocus, Y = p.onBlur, Ea = p.onClick, za = p.onDragEnter, Aa = p.onDragOver, ua = p.onDragLeave, Fa = p.onDrop, Oa = wa(p, Et);
2068
+ return u(u(La({
2069
+ onKeyDown: Da(O(w, Ba)),
2070
+ onFocus: Da(O(aa, Na)),
2071
+ onBlur: Da(O(Y, Ua)),
2072
+ onClick: U(O(Ea, Ya)),
2073
+ onDragEnter: da(O(za, Ka)),
2074
+ onDragOver: da(O(Aa, Ha)),
2075
+ onDragLeave: da(O(ua, Wa)),
2076
+ onDrop: da(O(Fa, sa)),
2078
2077
  role: typeof g == "string" && g !== "" ? g : "presentation"
2079
- }, f, b), !n && !S ? {
2078
+ }, f, b), !e && !S ? {
2080
2079
  tabIndex: 0
2081
- } : {}), Oi);
2080
+ } : {}), Oa);
2082
2081
  };
2083
- }, [b, Ni, Ui, Bi, Yi, Ki, Hi, Wi, si, S, W, n]), Da = E(function(p) {
2082
+ }, [b, Ba, Na, Ua, Ya, Ka, Ha, Wa, sa, S, W, e]), Di = E(function(p) {
2084
2083
  p.stopPropagation();
2085
- }, []), za = V(function() {
2084
+ }, []), Ei = V(function() {
2086
2085
  return function() {
2087
- var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, f = l === void 0 ? "ref" : l, g = p.onChange, j = p.onClick, ii = wi(p, At), Y = Ci({
2088
- accept: C,
2086
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, f = l === void 0 ? "ref" : l, g = p.onChange, w = p.onClick, aa = wa(p, zt), Y = La({
2087
+ accept: L,
2089
2088
  multiple: r,
2090
2089
  type: "file",
2091
2090
  style: {
@@ -2100,95 +2099,68 @@ function wa() {
2100
2099
  width: "1px",
2101
2100
  whiteSpace: "nowrap"
2102
2101
  },
2103
- onChange: B(_(g, si)),
2104
- onClick: B(_(j, Da)),
2102
+ onChange: U(O(g, sa)),
2103
+ onClick: U(O(w, Di)),
2105
2104
  tabIndex: -1
2106
- }, f, w);
2107
- return u(u({}, Y), ii);
2105
+ }, f, y);
2106
+ return u(u({}, Y), aa);
2108
2107
  };
2109
- }, [w, t, r, si, n]);
2110
- return u(u({}, F), {}, {
2111
- isFocused: O && !n,
2112
- getRootProps: ja,
2113
- getInputProps: za,
2108
+ }, [y, t, r, sa, e]);
2109
+ return u(u({}, A), {}, {
2110
+ isFocused: F && !e,
2111
+ getRootProps: ji,
2112
+ getInputProps: Ei,
2114
2113
  rootRef: b,
2115
- inputRef: w,
2116
- open: B(U)
2114
+ inputRef: y,
2115
+ open: U(N)
2117
2116
  });
2118
2117
  }
2119
- function Tt(i, a) {
2120
- switch (a.type) {
2118
+ function qt(a, i) {
2119
+ switch (i.type) {
2121
2120
  case "focus":
2122
- return u(u({}, i), {}, {
2121
+ return u(u({}, a), {}, {
2123
2122
  isFocused: !0
2124
2123
  });
2125
2124
  case "blur":
2126
- return u(u({}, i), {}, {
2125
+ return u(u({}, a), {}, {
2127
2126
  isFocused: !1
2128
2127
  });
2129
2128
  case "openDialog":
2130
- return u(u({}, $i), {}, {
2129
+ return u(u({}, $a), {}, {
2131
2130
  isFileDialogActive: !0
2132
2131
  });
2133
2132
  case "closeDialog":
2134
- return u(u({}, i), {}, {
2133
+ return u(u({}, a), {}, {
2135
2134
  isFileDialogActive: !1
2136
2135
  });
2137
2136
  case "setDraggedFiles":
2138
- return u(u({}, i), {}, {
2139
- isDragActive: a.isDragActive,
2140
- isDragAccept: a.isDragAccept,
2141
- isDragReject: a.isDragReject
2137
+ return u(u({}, a), {}, {
2138
+ isDragActive: i.isDragActive,
2139
+ isDragAccept: i.isDragAccept,
2140
+ isDragReject: i.isDragReject
2142
2141
  });
2143
2142
  case "setFiles":
2144
- return u(u({}, i), {}, {
2145
- acceptedFiles: a.acceptedFiles,
2146
- fileRejections: a.fileRejections,
2147
- isDragReject: a.isDragReject
2143
+ return u(u({}, a), {}, {
2144
+ acceptedFiles: i.acceptedFiles,
2145
+ fileRejections: i.fileRejections,
2146
+ isDragReject: i.isDragReject
2148
2147
  });
2149
2148
  case "reset":
2150
- return u({}, $i);
2149
+ return u({}, $a);
2151
2150
  default:
2152
- return i;
2151
+ return a;
2153
2152
  }
2154
2153
  }
2155
- function ca() {
2154
+ function ci() {
2156
2155
  }
2157
- const Lt = ({
2158
- file: i,
2159
- fileName: a,
2160
- forceFileType: t,
2161
- previewButtonText: n = "Preview"
2162
- }) => {
2163
- if (!i) return null;
2164
- const e = typeof i == "string", o = $a(i, t), c = i instanceof File ? Ma(i) : null, r = e && a ? a : sa(i);
2165
- return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2166
- /* @__PURE__ */ d.jsx(o, { color: "neutral-90", h: 50, mb: "lg", w: 50 }),
2167
- /* @__PURE__ */ d.jsx(bi, { color: "neutral-90", lines: 1, m: 0, maxWidth: 600, variant: "h4", children: r }),
2168
- !e && /* @__PURE__ */ d.jsx(bi, { color: "beige-70", fontWeight: "medium", lines: 1, m: 0, variant: "sm", children: c }),
2169
- e ? /* @__PURE__ */ d.jsxs(gi, { as: "a", href: i, mt: "md", rel: "noopener", size: "sm", target: "_blank", children: [
2170
- /* @__PURE__ */ d.jsx("span", { children: n }),
2171
- /* @__PURE__ */ d.jsx(Ka, {})
2172
- ] }) : null
2173
- ] });
2174
- }, la = ({
2175
- disabled: i,
2176
- fileButtonText: a = "Browse file",
2177
- hint: t = "Drag & drop a file here or",
2178
- openFile: n,
2179
- title: e = "Add file"
2180
- }) => /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2181
- /* @__PURE__ */ d.jsx(bi, { color: "neutral-90", m: "0", variant: "h4", children: e }),
2182
- /* @__PURE__ */ d.jsx(bi, { color: "beige-70", m: "0", mt: "xs", variant: "sm", children: t }),
2183
- /* @__PURE__ */ d.jsx(gi, { disabled: i, mt: "lg", onClick: n, type: "button", children: a })
2184
- ] }), Ct = ki.divBox.withConfig({ shouldForwardProp: La })(
2185
- ({ disabled: i, isDragAccept: a, isDragReject: t }) => Ii`
2186
- ${P("defaultFields.default")};
2187
- ${P("fileDrops.default")};
2188
- ${a && P("fileDrops.dragAccept")};
2189
- ${t && Ii`
2190
- border-color: ${P("defaultFields.variants.danger.borderColor")};
2191
- ${P("fileDrops.dragReject")}
2156
+ const Tt = ka.divBox.withConfig({ shouldForwardProp: Ii })(
2157
+ ({ disabled: a, isDragAccept: i, isDragReject: t }) => Ia`
2158
+ ${_("defaultFields.default")};
2159
+ ${_("fileDrops.default")};
2160
+ ${i && _("fileDrops.dragAccept")};
2161
+ ${t && Ia`
2162
+ border-color: ${_("defaultFields.variants.danger.borderColor")};
2163
+ ${_("fileDrops.dragReject")}
2192
2164
  `};
2193
2165
  position: relative;
2194
2166
  display: flex;
@@ -2198,166 +2170,163 @@ const Lt = ({
2198
2170
  transition: medium;
2199
2171
 
2200
2172
  &:focus {
2201
- ${P("defaultFields.focused.default")};
2173
+ ${_("defaultFields.focused.default")};
2202
2174
  }
2203
2175
 
2204
- ${i && Ii`
2205
- ${P("defaultFields.disabled")};
2206
- ${P("fileDrops.disabled")};
2176
+ ${a && Ia`
2177
+ ${_("defaultFields.disabled")};
2178
+ ${_("fileDrops.disabled")};
2207
2179
  `};
2208
2180
  `
2209
- ), $t = ki.div`
2181
+ ), Ct = ka.div`
2210
2182
  width: 100%;
2211
2183
  height: 100%;
2212
2184
  display: flex;
2213
2185
  flex-direction: column;
2214
2186
  align-items: center;
2215
2187
  justify-content: center;
2216
- `, ka = ki.imgBox`
2188
+ `, ki = ka.imgBox`
2217
2189
  max-height: 100%;
2218
2190
  max-width: 100%;
2219
2191
  object-fit: contain;
2220
- `, Mt = ki.div`
2192
+ `, Lt = ka.div`
2221
2193
  position: absolute;
2222
- top: ${P.space("md")};
2223
- right: ${P.space("md")};
2194
+ top: ${_.space("md")};
2195
+ right: ${_.space("md")};
2224
2196
  display: flex;
2225
2197
  gap: xs;
2226
- `, Kt = ({
2227
- disabled: i,
2228
- error: a,
2198
+ `, li = ({
2199
+ disabled: a,
2200
+ fileButtonText: i = "Browse file",
2201
+ hint: t = "Drag & drop a file here or",
2202
+ openFile: e,
2203
+ title: n = "Add file"
2204
+ }) => /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(ga, { color: "neutral-90", m: "0", variant: "h4" }, n), /* @__PURE__ */ s.createElement(ga, { color: "beige-70", m: "0", mt: "xs", variant: "sm" }, t), /* @__PURE__ */ s.createElement(ba, { disabled: a, mt: "lg", onClick: e, type: "button" }, i)), $t = ({
2205
+ file: a,
2206
+ fileName: i,
2207
+ forceFileType: t,
2208
+ previewButtonText: e = "Preview"
2209
+ }) => {
2210
+ const n = typeof a == "string", o = qi(a, t), c = a instanceof File ? Ti(a) : null, r = n && i ? i : si(a);
2211
+ return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(o, { color: "neutral-90", h: 50, mb: "lg", w: 50 }), /* @__PURE__ */ s.createElement(ga, { color: "neutral-90", lines: 1, m: 0, maxWidth: 600, variant: "h4" }, r), !n && /* @__PURE__ */ s.createElement(ga, { color: "beige-70", fontWeight: "medium", lines: 1, m: 0, variant: "sm" }, c), n && /* @__PURE__ */ s.createElement(ba, { as: "a", href: a, mt: "md", rel: "noopener", size: "sm", target: "_blank" }, /* @__PURE__ */ s.createElement("span", null, e), /* @__PURE__ */ s.createElement(Si, null)));
2212
+ }, Mt = ({
2213
+ disabled: a,
2214
+ error: i,
2229
2215
  file: t,
2230
- fileName: n,
2231
- fileUrl: e,
2216
+ fileName: e,
2217
+ fileUrl: n,
2232
2218
  forceFileType: o,
2233
2219
  isAnImage: c,
2234
2220
  isHoverAccept: r,
2235
2221
  isHoverReject: v,
2236
2222
  openFile: h,
2237
2223
  wordings: x
2238
- }) => r ? /* @__PURE__ */ d.jsx(Ra, {}) : v ? /* @__PURE__ */ d.jsx(Sa, {}) : a ? /* @__PURE__ */ d.jsx(la, { openFile: h, ...x }) : e ? c ? /* @__PURE__ */ d.jsx(ka, { src: e }) : /* @__PURE__ */ d.jsx(Lt, { file: t, fileName: n, forceFileType: o, ...x }) : /* @__PURE__ */ d.jsx(la, { disabled: i, openFile: h, ...x }), ra = /\.(jpeg|jpg|gif|png|webp)$/, Ht = (i) => {
2239
- if (!i) return !1;
2240
- if (typeof i == "string") {
2241
- const a = sa(i);
2242
- return !!a && !!a.match(ra);
2243
- } else
2244
- return i.name ? !!i.name.match(ra) : !1;
2245
- }, Wt = (i) => {
2246
- let a;
2247
- if (i instanceof File ? a = i.preview : a = i, typeof a != "string" || a.startsWith("blob:"))
2248
- return a;
2224
+ }) => r ? /* @__PURE__ */ s.createElement(Ci, null) : v ? /* @__PURE__ */ s.createElement(Li, null) : i ? /* @__PURE__ */ s.createElement(li, { openFile: h, ...x }) : n ? c ? /* @__PURE__ */ s.createElement(ki, { src: n }) : /* @__PURE__ */ s.createElement($t, { file: t, fileName: e, forceFileType: o, ...x }) : /* @__PURE__ */ s.createElement(li, { disabled: a, openFile: h, ...x }), ri = /\.(jpeg|jpg|gif|png|webp)$/, Kt = (a) => a ? typeof a == "string" ? !!si(a).match(ri) : a.name ? !!a.name.match(ri) : !1 : !1, Ht = (a) => {
2225
+ let i;
2226
+ if (a instanceof File ? i = a.preview : i = a, typeof i != "string" || i.startsWith("blob:"))
2227
+ return i;
2249
2228
  if (typeof window < "u")
2250
2229
  try {
2251
- return new URL(a);
2230
+ return new URL(i);
2252
2231
  } catch {
2253
2232
  return;
2254
2233
  }
2255
- }, Nt = wa || ji.useDropzone, Ut = 2e6, Bt = "ERROR_INVALID_TYPE", Yt = "ERROR_INVALID_SIZE", Vt = Ca(
2234
+ }, Wt = wi || ja.useDropzone, Bt = 2e6, Nt = "ERROR_INVALID_TYPE", Ut = "ERROR_INVALID_SIZE", Yt = Ri(
2256
2235
  ({
2257
- accept: i = {
2236
+ accept: a = {
2258
2237
  "image/*": []
2259
2238
  },
2260
- children: a = Kt,
2239
+ children: i = Mt,
2261
2240
  dataTestId: t,
2262
- disabled: n,
2263
- fileName: e,
2241
+ disabled: e,
2242
+ fileName: n,
2264
2243
  forceFileType: o,
2265
2244
  handleAddFile: c,
2266
2245
  handleRemoveFile: r,
2267
2246
  isClearable: v,
2268
2247
  isEditable: h,
2269
- maxSize: x = Ut,
2270
- multiple: D,
2271
- name: I,
2248
+ maxSize: x = Bt,
2249
+ multiple: k,
2250
+ name: P,
2272
2251
  onBlur: R,
2273
- onChange: y,
2274
- onError: z,
2252
+ onChange: j,
2253
+ onError: I,
2275
2254
  value: T,
2276
- wordings: ni,
2277
- ...ei
2255
+ wordings: ea,
2256
+ ...na
2278
2257
  }, Z) => {
2279
- const [k, S] = Vi(T), [W, A] = Vi(null);
2280
- ai(() => {
2258
+ const [D, S] = Va(T), [W, z] = Va(void 0);
2259
+ ia(() => {
2281
2260
  S(T);
2282
- }, [T]), ai(() => () => {
2283
- k && k instanceof File && k.preview && URL.revokeObjectURL(k.preview);
2284
- }, [k]);
2285
- const J = (F) => {
2286
- const [m] = F;
2287
- m instanceof File && (m.preview = URL.createObjectURL(m)), S(m), A(null);
2288
- const O = Gi({ name: I, value: m });
2289
- y == null || y(O), c == null || c(O);
2290
- }, L = (F, m) => {
2291
- let O = null;
2292
- F.map(({ errors: li }) => {
2293
- li.map((N) => {
2294
- const { code: Q, message: q } = N;
2295
- Q === "file-invalid-type" ? O = Bt : Q === "file-too-large" ? O = Yt : O = q;
2261
+ }, [T]), ia(() => () => D && D instanceof File && URL.revokeObjectURL(D.preview), [D]);
2262
+ const J = (A) => {
2263
+ const [m] = A;
2264
+ m instanceof File && (m.preview = URL.createObjectURL(m)), S(m), z(null);
2265
+ const F = Ga({ name: P, value: m });
2266
+ j && j(F), c && c(F);
2267
+ }, C = (A, m) => {
2268
+ let F;
2269
+ A.map(({ errors: la }) => {
2270
+ la.map((B) => {
2271
+ const { code: Q, message: q } = B;
2272
+ Q === "file-invalid-type" ? F = Nt : Q === "file-too-large" ? F = Ut : F = q;
2296
2273
  });
2297
- }), S(null), A(O), O && (z == null || z(O)), y == null || y(m), R == null || R();
2298
- }, C = (F) => {
2299
- F.preventDefault(), S(null), A(null);
2300
- const m = Gi({ name: I, value: null });
2301
- y == null || y(m), r == null || r(m);
2302
- }, { getInputProps: pi, getRootProps: X, isDragAccept: $, isDragActive: b, isDragReject: w, open: oi } = Nt({
2303
- accept: i,
2304
- disabled: n,
2274
+ }), S(null), z(F), I && I(F), j && j(m), R && R();
2275
+ }, L = (A) => {
2276
+ A.preventDefault(), S(null), z(null);
2277
+ const m = Ga({ name: P, value: null });
2278
+ j && j(m), r && r(m);
2279
+ }, { getInputProps: pa, getRootProps: X, isDragAccept: $, isDragActive: b, isDragReject: y, open: oa } = Wt({
2280
+ accept: a,
2281
+ disabled: e,
2305
2282
  maxSize: x,
2306
- multiple: D,
2283
+ multiple: k,
2307
2284
  noClick: !0,
2308
2285
  onDropAccepted: J,
2309
- onDropRejected: L
2310
- }), ci = (F) => z == null ? void 0 : z(F);
2311
- return /* @__PURE__ */ d.jsxs(
2312
- Ct,
2286
+ onDropRejected: C
2287
+ }), ca = (A) => I(A);
2288
+ return /* @__PURE__ */ s.createElement(
2289
+ Tt,
2313
2290
  {
2314
2291
  ...X({
2315
2292
  "data-testid": t,
2316
- disabled: n,
2317
2293
  handleRemoveFile: r,
2318
- isClearable: v,
2319
- isDragAccept: $,
2320
- isDragActive: b,
2321
- isDragReject: w,
2322
2294
  isEditable: h,
2295
+ isDragActive: b,
2296
+ isDragAccept: $,
2297
+ isDragReject: y,
2298
+ isClearable: v,
2299
+ disabled: e,
2323
2300
  ref: Z
2324
2301
  }),
2325
- ...ei,
2326
- children: [
2327
- /* @__PURE__ */ d.jsx(
2328
- "input",
2329
- {
2330
- ...pi({ disabled: n, multiple: D, name: I, onError: ci }),
2331
- style: { display: "block", height: 0, opacity: 0, width: 0 }
2332
- }
2333
- ),
2334
- /* @__PURE__ */ d.jsxs($t, { children: [
2335
- a({
2336
- disabled: n,
2337
- error: W,
2338
- file: k,
2339
- fileName: e,
2340
- fileUrl: k && Wt(k),
2341
- forceFileType: o,
2342
- isAnImage: o === "image" || Ht(k),
2343
- isHoverAccept: $,
2344
- isHoverReject: w,
2345
- openFile: oi,
2346
- wordings: ni
2347
- }),
2348
- k && (W || h || v) ? /* @__PURE__ */ d.jsxs(Mt, { children: [
2349
- W || h ? /* @__PURE__ */ d.jsx(gi, { onClick: oi, shape: "circle", size: "sm", type: "button", variant: "tertiary", children: /* @__PURE__ */ d.jsx(qa, {}) }) : null,
2350
- v ? /* @__PURE__ */ d.jsx(gi, { danger: !0, onClick: C, shape: "circle", size: "sm", type: "button", children: /* @__PURE__ */ d.jsx(Ta, {}) }) : null
2351
- ] }) : null
2352
- ] })
2353
- ]
2354
- }
2302
+ ...na
2303
+ },
2304
+ /* @__PURE__ */ s.createElement(
2305
+ "input",
2306
+ {
2307
+ ...pa({ disabled: e, multiple: k, name: P, onError: ca }),
2308
+ style: { display: "block", opacity: 0, height: 0, width: 0 }
2309
+ }
2310
+ ),
2311
+ /* @__PURE__ */ s.createElement(Ct, null, i({
2312
+ disabled: e,
2313
+ error: W,
2314
+ file: D,
2315
+ fileName: n,
2316
+ fileUrl: D && Ht(D),
2317
+ forceFileType: o,
2318
+ isAnImage: o === "image" || Kt(D),
2319
+ isHoverAccept: $,
2320
+ isHoverReject: y,
2321
+ openFile: oa,
2322
+ wordings: ea
2323
+ }), !!D && (W || h || v) && /* @__PURE__ */ s.createElement(Lt, null, (W || h) && /* @__PURE__ */ s.createElement(ba, { onClick: oa, shape: "circle", size: "sm", type: "button", variant: "tertiary" }, /* @__PURE__ */ s.createElement($i, null)), v && /* @__PURE__ */ s.createElement(ba, { danger: !0, onClick: L, shape: "circle", size: "sm", type: "button" }, /* @__PURE__ */ s.createElement(Mi, null))))
2355
2324
  );
2356
2325
  }
2357
2326
  );
2358
- Vt.displayName = "FileDrop";
2359
- const rn = ka;
2327
+ Yt.displayName = "FileDrop";
2328
+ const oe = ki;
2360
2329
  export {
2361
- Vt as FileDrop,
2362
- rn as ImagePreview
2330
+ Yt as FileDrop,
2331
+ oe as ImagePreview
2363
2332
  };