@uploadcare/file-uploader 1.28.0-alpha.0 → 1.28.0-alpha.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 (466) hide show
  1. package/dist/ActivityHeader-R6Mlx-dA.js +9 -0
  2. package/dist/ActivityHeader.css +23 -0
  3. package/dist/ActivityHeader.layered.css +24 -0
  4. package/dist/{CameraSource-DbyO6GoK.js → CameraSource-DDwj1jCV.js} +106 -76
  5. package/dist/CameraSource-n1tun2Df.js +10 -0
  6. package/dist/CameraSource.css +180 -0
  7. package/dist/CameraSource.layered.css +209 -0
  8. package/dist/{CloudImageEditor-BIxf1V4M.js → CloudImageEditor-DcVoIRb3.js} +66 -65
  9. package/dist/{CloudImageEditorActivity-d4DpK6fQ.js → CloudImageEditorActivity-Csij4nlC.js} +4 -4
  10. package/dist/{CloudImageEditorActivity-CJxP5N0S.js → CloudImageEditorActivity-DD4NdU0P.js} +4 -4
  11. package/dist/CloudImageEditorActivity.css +14 -0
  12. package/dist/CloudImageEditorActivity.layered.css +15 -0
  13. package/dist/{Config-DuWre5p3.js → Config-DKOromHY.js} +27 -27
  14. package/dist/Config.css +4 -0
  15. package/dist/Config.layered.css +5 -0
  16. package/dist/ExternalSource-6MSUgxqy.js +10 -0
  17. package/dist/{ExternalSource-BKTFp95O.js → ExternalSource-DVEjSkPB.js} +56 -51
  18. package/dist/ExternalSource.css +98 -0
  19. package/dist/ExternalSource.layered.css +116 -0
  20. package/dist/{Icon-CqTVC82Q.js → Icon-tXRTvEF2.js} +7 -8
  21. package/dist/Icon.css +14 -0
  22. package/dist/Icon.layered.css +15 -0
  23. package/dist/{LitUploaderBlock-BA34rzeU.js → LitUploaderBlock-LxeOZ0ya.js} +65 -65
  24. package/dist/{UrlSource-DZK5EBwT.js → UrlSource-BkyX00I2.js} +5 -5
  25. package/dist/UrlSource-RI8TSD48.js +10 -0
  26. package/dist/UrlSource.css +17 -0
  27. package/dist/UrlSource.layered.css +18 -0
  28. package/dist/abstract/loadFileUploaderFrom.js +3 -3
  29. package/dist/cameraPlugin-weRKO7eG.js +8 -0
  30. package/dist/{cloud-image-editor-fNswWrI4.js → cloud-image-editor-hhbyNWLG.js} +6 -6
  31. package/dist/cloud-image-editor.css +1380 -0
  32. package/dist/cloud-image-editor.layered.css +1549 -0
  33. package/dist/cloudImageEditorPlugin-FjUgbMK3.js +8 -0
  34. package/dist/{en-DNCwRJsB.js → en-8OWEmZim.js} +2 -2
  35. package/dist/env-mM-ksNPq.js +8 -0
  36. package/dist/env.js +3 -3
  37. package/dist/externalSourcesPlugin-CMBmLT8S.js +8 -0
  38. package/dist/imageShrinkPlugin-BN6loiP2.js +8 -0
  39. package/dist/index-base.css +2497 -0
  40. package/dist/index-base.layered.css +2837 -0
  41. package/dist/index.css +9 -3964
  42. package/dist/index.d.ts +13 -0
  43. package/dist/index.js +827 -42
  44. package/dist/index.layered.css +9 -4478
  45. package/dist/instagramPlugin-CXRm8MGL.js +8 -0
  46. package/dist/{loadFileUploaderFrom-BWJM43Yq.js → loadFileUploaderFrom-Bfz8L3VB.js} +3 -3
  47. package/dist/locales/file-uploader/ar.js +2 -2
  48. package/dist/locales/file-uploader/az.js +2 -2
  49. package/dist/locales/file-uploader/ca.js +2 -2
  50. package/dist/locales/file-uploader/cs.js +2 -2
  51. package/dist/locales/file-uploader/da.js +2 -2
  52. package/dist/locales/file-uploader/de.js +2 -2
  53. package/dist/locales/file-uploader/el.js +2 -2
  54. package/dist/locales/file-uploader/en.js +3 -3
  55. package/dist/locales/file-uploader/es.js +2 -2
  56. package/dist/locales/file-uploader/et.js +2 -2
  57. package/dist/locales/file-uploader/fi.js +2 -2
  58. package/dist/locales/file-uploader/fr.js +2 -2
  59. package/dist/locales/file-uploader/he.js +2 -2
  60. package/dist/locales/file-uploader/hy.js +2 -2
  61. package/dist/locales/file-uploader/is.js +2 -2
  62. package/dist/locales/file-uploader/it.js +2 -2
  63. package/dist/locales/file-uploader/ja.js +2 -2
  64. package/dist/locales/file-uploader/ka.js +2 -2
  65. package/dist/locales/file-uploader/kk.js +2 -2
  66. package/dist/locales/file-uploader/ko.js +2 -2
  67. package/dist/locales/file-uploader/lv.js +2 -2
  68. package/dist/locales/file-uploader/nb.js +2 -2
  69. package/dist/locales/file-uploader/nl.js +2 -2
  70. package/dist/locales/file-uploader/pl.js +2 -2
  71. package/dist/locales/file-uploader/pt.js +2 -2
  72. package/dist/locales/file-uploader/ro.js +2 -2
  73. package/dist/locales/file-uploader/ru.js +2 -2
  74. package/dist/locales/file-uploader/sk.js +2 -2
  75. package/dist/locales/file-uploader/sr.js +2 -2
  76. package/dist/locales/file-uploader/sv.js +2 -2
  77. package/dist/locales/file-uploader/tr.js +2 -2
  78. package/dist/locales/file-uploader/uk.js +2 -2
  79. package/dist/locales/file-uploader/vi.js +2 -2
  80. package/dist/locales/file-uploader/zh-TW.js +2 -2
  81. package/dist/locales/file-uploader/zh.js +2 -2
  82. package/dist/{plugins-DxjsQUa8.js → plugins-CGUls7EV.js} +6 -6
  83. package/dist/urlSourcePlugin-_WdbEhq2.js +8 -0
  84. package/package.json +1 -1
  85. package/web/ActivityHeader-BFdTdVfD.js +9 -0
  86. package/web/ActivityHeader-DQy6rII1.js +9 -0
  87. package/web/ActivityHeader-DvzMl0uj.js +9 -0
  88. package/web/ActivityHeader-i4x6_Fne.js +9 -0
  89. package/web/CameraSource-BAWIA4Wm.js +508 -0
  90. package/web/CameraSource-BqZCQcij.js +11 -0
  91. package/web/CameraSource-Brxr4tz4.js +508 -0
  92. package/web/CameraSource-BvBJ5Uzy.js +508 -0
  93. package/web/CameraSource-CkHzIE-h.js +11 -0
  94. package/web/CameraSource-D964yPLu.js +508 -0
  95. package/web/CameraSource-DE48Az-f.js +11 -0
  96. package/web/CameraSource-DyPebtRF.js +478 -0
  97. package/web/CameraSource-pj7Xo81m.js +11 -0
  98. package/web/CloudImageEditor-CTgUWB07.js +2192 -0
  99. package/web/CloudImageEditor-CxqV9Lwm.js +2192 -0
  100. package/web/CloudImageEditor-DoLWHpqV.js +2192 -0
  101. package/web/CloudImageEditor-Drywn265.js +2192 -0
  102. package/web/CloudImageEditor-MXcaDtMx.js +2187 -0
  103. package/web/CloudImageEditorActivity-BPzmfaJV.js +85 -0
  104. package/web/CloudImageEditorActivity-Br8pU5gd.js +11 -0
  105. package/web/CloudImageEditorActivity-Cw8b2CEz.js +11 -0
  106. package/web/CloudImageEditorActivity-Df1ySGq0.js +86 -0
  107. package/web/CloudImageEditorActivity-DinG5r0y.js +11 -0
  108. package/web/CloudImageEditorActivity-DmnLLINR.js +85 -0
  109. package/web/CloudImageEditorActivity-U90BGCek.js +85 -0
  110. package/web/CloudImageEditorActivity-dNLQZRZI.js +11 -0
  111. package/web/CloudImageEditorActivity-ur-hQ-6p.js +85 -0
  112. package/web/Config-8hlBNhvs.js +455 -0
  113. package/web/Config-BDZhPIyz.js +455 -0
  114. package/web/Config-CJVNrrjj.js +455 -0
  115. package/web/Config-DvkVtlQ7.js +455 -0
  116. package/web/ExternalSource-B9ycBFiD.js +10 -0
  117. package/web/ExternalSource-BE7HX47E.js +250 -0
  118. package/web/ExternalSource-BL5GSlol.js +250 -0
  119. package/web/ExternalSource-BXQY6Dlc.js +10 -0
  120. package/web/ExternalSource-BXxH3JCD.js +250 -0
  121. package/web/ExternalSource-BYSS-PPV.js +245 -0
  122. package/web/ExternalSource-C57a61QN.js +10 -0
  123. package/web/ExternalSource-CKfMtOgU.js +250 -0
  124. package/web/ExternalSource-DP6q8ylB.js +10 -0
  125. package/web/LitUploaderBlock-AX6jOdAS.js +996 -0
  126. package/web/LitUploaderBlock-BjAaoLl2.js +996 -0
  127. package/web/LitUploaderBlock-D8E5HuwH.js +996 -0
  128. package/web/LitUploaderBlock-Dl3ce0Tc.js +996 -0
  129. package/web/LitUploaderBlock-Oi33U0uf.js +996 -0
  130. package/web/UrlSource-B9SX3K0L.js +10 -0
  131. package/web/UrlSource-C3zB1rCb.js +70 -0
  132. package/web/UrlSource-C7bEU6Xv.js +10 -0
  133. package/web/UrlSource-CE389CBz.js +70 -0
  134. package/web/UrlSource-CnvAJ58Y.js +10 -0
  135. package/web/UrlSource-CqF0h6B-.js +10 -0
  136. package/web/UrlSource-D-971Nut.js +70 -0
  137. package/web/UrlSource-DhI3YCt5.js +70 -0
  138. package/web/UrlSource-hWV7jtB2.js +70 -0
  139. package/web/abstract/CTX.d.ts +40 -0
  140. package/web/abstract/TypedCollection.d.ts +47 -0
  141. package/web/abstract/TypedCollection.test.d.ts +1 -0
  142. package/web/abstract/TypedData.d.ts +12 -0
  143. package/web/abstract/TypedData.test.d.ts +1 -0
  144. package/web/abstract/UploaderPublicApi.d.ts +41 -0
  145. package/web/abstract/buildOutputCollectionState.d.ts +3 -0
  146. package/web/abstract/customConfigOptions.d.ts +65 -0
  147. package/web/abstract/defineComponents.d.ts +1 -0
  148. package/web/abstract/features/ClipboardLayer.d.ts +12 -0
  149. package/web/abstract/loadFileUploaderFrom.d.ts +13 -0
  150. package/web/abstract/localeRegistry.d.ts +5 -0
  151. package/web/abstract/managers/LocaleManager.d.ts +10 -0
  152. package/web/abstract/managers/ModalManager.d.ts +53 -0
  153. package/web/abstract/managers/SecureUploadsManager.d.ts +7 -0
  154. package/web/abstract/managers/TelemetryManager.d.ts +41 -0
  155. package/web/abstract/managers/ValidationManager.d.ts +34 -0
  156. package/web/abstract/managers/__tests__/ModalManager.test.d.ts +13 -0
  157. package/web/abstract/managers/__tests__/SecureUploadsManager.test.d.ts +1 -0
  158. package/web/abstract/managers/a11y.d.ts +9 -0
  159. package/web/abstract/managers/plugin/PluginManager.d.ts +25 -0
  160. package/web/abstract/managers/plugin/PluginTypes.d.ts +146 -0
  161. package/web/abstract/managers/plugin/index.d.ts +2 -0
  162. package/web/abstract/sharedConfigKey.d.ts +2 -0
  163. package/web/abstract/uploadEntrySchema.d.ts +34 -0
  164. package/web/blocks/ActivityHeader/ActivityHeader.d.ts +8 -0
  165. package/web/blocks/CameraSource/CameraSource.d.ts +121 -0
  166. package/web/blocks/CameraSource/__tests__/calcCameraModes.test.d.ts +1 -0
  167. package/web/blocks/CameraSource/calcCameraModes.d.ts +5 -0
  168. package/web/blocks/CameraSource/constants.d.ts +15 -0
  169. package/web/blocks/CloudImageEditor/index.d.ts +1 -0
  170. package/web/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +60 -0
  171. package/web/blocks/CloudImageEditor/src/CropFrame.d.ts +56 -0
  172. package/web/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +24 -0
  173. package/web/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +14 -0
  174. package/web/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +13 -0
  175. package/web/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +35 -0
  176. package/web/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +56 -0
  177. package/web/blocks/CloudImageEditor/src/EditorImageFader.d.ts +63 -0
  178. package/web/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +15 -0
  179. package/web/blocks/CloudImageEditor/src/EditorScroller.d.ts +15 -0
  180. package/web/blocks/CloudImageEditor/src/EditorSlider.d.ts +33 -0
  181. package/web/blocks/CloudImageEditor/src/EditorToolbar.d.ts +68 -0
  182. package/web/blocks/CloudImageEditor/src/crop-utils.d.ts +36 -0
  183. package/web/blocks/CloudImageEditor/src/crop-utils.test.d.ts +1 -0
  184. package/web/blocks/CloudImageEditor/src/cropper-constants.d.ts +10 -0
  185. package/web/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +31 -0
  186. package/web/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +19 -0
  187. package/web/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +27 -0
  188. package/web/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +38 -0
  189. package/web/blocks/CloudImageEditor/src/index.d.ts +15 -0
  190. package/web/blocks/CloudImageEditor/src/lib/classNames.d.ts +5 -0
  191. package/web/blocks/CloudImageEditor/src/lib/classNames.test.d.ts +1 -0
  192. package/web/blocks/CloudImageEditor/src/lib/linspace.d.ts +1 -0
  193. package/web/blocks/CloudImageEditor/src/lib/linspace.test.d.ts +1 -0
  194. package/web/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +4 -0
  195. package/web/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +1 -0
  196. package/web/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +2 -0
  197. package/web/blocks/CloudImageEditor/src/lib/pick.d.ts +1 -0
  198. package/web/blocks/CloudImageEditor/src/lib/pick.test.d.ts +1 -0
  199. package/web/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +7 -0
  200. package/web/blocks/CloudImageEditor/src/state.d.ts +20 -0
  201. package/web/blocks/CloudImageEditor/src/svg-sprite.d.ts +2 -0
  202. package/web/blocks/CloudImageEditor/src/toolbar-constants.d.ts +61 -0
  203. package/web/blocks/CloudImageEditor/src/types.d.ts +60 -0
  204. package/web/blocks/CloudImageEditor/src/util.d.ts +2 -0
  205. package/web/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +7 -0
  206. package/web/blocks/CloudImageEditor/src/utils/parseFilterValue.test.d.ts +1 -0
  207. package/web/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +25 -0
  208. package/web/blocks/Config/Config.d.ts +60 -0
  209. package/web/blocks/Config/assertions.d.ts +5 -0
  210. package/web/blocks/Config/computed-properties.d.ts +24 -0
  211. package/web/blocks/Config/computed-properties.test.d.ts +1 -0
  212. package/web/blocks/Config/initialConfig.d.ts +6 -0
  213. package/web/blocks/Config/normalizeConfigValue.d.ts +2 -0
  214. package/web/blocks/Config/validatorsType.d.ts +18 -0
  215. package/web/blocks/Copyright/Copyright.d.ts +10 -0
  216. package/web/blocks/DropArea/DropArea.d.ts +47 -0
  217. package/web/blocks/DropArea/addDropzone.d.ts +17 -0
  218. package/web/blocks/DropArea/getDropItems.d.ts +12 -0
  219. package/web/blocks/ExternalSource/ExternalSource.d.ts +45 -0
  220. package/web/blocks/ExternalSource/MessageBridge.d.ts +11 -0
  221. package/web/blocks/ExternalSource/buildThemeDefinition.d.ts +4 -0
  222. package/web/blocks/ExternalSource/query-string.d.ts +1 -0
  223. package/web/blocks/ExternalSource/types.d.ts +105 -0
  224. package/web/blocks/FileItem/FileItem.d.ts +50 -0
  225. package/web/blocks/FileItem/FileItemConfig.d.ts +10 -0
  226. package/web/blocks/FormInput/FormInput.d.ts +18 -0
  227. package/web/blocks/Icon/Icon.d.ts +19 -0
  228. package/web/blocks/Img/Img.d.ts +14 -0
  229. package/web/blocks/Img/ImgBase.d.ts +29 -0
  230. package/web/blocks/Img/ImgConfig.d.ts +28 -0
  231. package/web/blocks/Img/configurations.d.ts +11 -0
  232. package/web/blocks/Img/props-map.d.ts +28 -0
  233. package/web/blocks/Img/utils/parseObjectToString.d.ts +2 -0
  234. package/web/blocks/Modal/Modal.d.ts +34 -0
  235. package/web/blocks/PluginActivityRenderer/PluginActivityRenderer.d.ts +32 -0
  236. package/web/blocks/PluginActivityRenderer/index.d.ts +1 -0
  237. package/web/blocks/ProgressBar/ProgressBar.d.ts +21 -0
  238. package/web/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +17 -0
  239. package/web/blocks/Select/Select.d.ts +18 -0
  240. package/web/blocks/SimpleBtn/SimpleBtn.d.ts +15 -0
  241. package/web/blocks/SourceBtn/SourceBtn.d.ts +23 -0
  242. package/web/blocks/SourceList/SourceList.d.ts +24 -0
  243. package/web/blocks/Spinner/Spinner.d.ts +9 -0
  244. package/web/blocks/StartFrom/StartFrom.d.ts +12 -0
  245. package/web/blocks/Thumb/Thumb.d.ts +35 -0
  246. package/web/blocks/UploadCtxProvider/EventEmitter.d.ts +70 -0
  247. package/web/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +44 -0
  248. package/web/blocks/UploadList/UploadList.d.ts +39 -0
  249. package/web/blocks/UrlSource/UrlSource.d.ts +14 -0
  250. package/web/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -0
  251. package/web/blocks/themes/uc-basic/svg-sprite.d.ts +2 -0
  252. package/web/cameraPlugin-DeedXMWV.js +8 -0
  253. package/web/cameraPlugin-Duy1QwjB.js +8 -0
  254. package/web/cameraPlugin-QS9SUOtO.js +8 -0
  255. package/web/cameraPlugin-bq8ggY04.js +8 -0
  256. package/web/cameraPlugin-cel9YgP_.js +8 -0
  257. package/web/cloud-image-editor-8DrVRZ7E.js +12 -0
  258. package/web/cloud-image-editor-BX50EK1U.js +12 -0
  259. package/web/cloud-image-editor-DSW3oWq-.js +12 -0
  260. package/web/cloud-image-editor-DuI2Lx4M.js +12 -0
  261. package/web/cloudImageEditorPlugin-5my6aD36.js +8 -0
  262. package/web/cloudImageEditorPlugin-Bk19DmJv.js +8 -0
  263. package/web/cloudImageEditorPlugin-CcdnmtBW.js +8 -0
  264. package/web/cloudImageEditorPlugin-DQJmDl03.js +8 -0
  265. package/web/cloudImageEditorPlugin-kojghfqw.js +8 -0
  266. package/web/constants-BCfCF0cJ.js +4025 -0
  267. package/web/core.d.ts +42 -0
  268. package/web/env.d.ts +2 -0
  269. package/web/externalSourcesPlugin-BTeRm5C0.js +8 -0
  270. package/web/externalSourcesPlugin-BXgVeojg.js +8 -0
  271. package/web/externalSourcesPlugin-BgLpuIK9.js +8 -0
  272. package/web/externalSourcesPlugin-DMc9zs4T.js +8 -0
  273. package/web/externalSourcesPlugin-Dm9vnTBv.js +8 -0
  274. package/web/file-uploader.iife.min.js +697 -0
  275. package/web/file-uploader.min.js +1859 -0
  276. package/web/imageShrinkPlugin-BdHgEGZH.js +8 -0
  277. package/web/imageShrinkPlugin-BjkMGfvT.js +8 -0
  278. package/web/imageShrinkPlugin-CCkGHL2w.js +8 -0
  279. package/web/imageShrinkPlugin-D4WjaRGo.js +8 -0
  280. package/web/imageShrinkPlugin-DqYGutVx.js +8 -0
  281. package/web/index.d.ts +42 -0
  282. package/web/instagramPlugin-BTMz0K2a.js +8 -0
  283. package/web/instagramPlugin-BbIKgTH7.js +8 -0
  284. package/web/instagramPlugin-CQQhsEJa.js +8 -0
  285. package/web/instagramPlugin-Cm7lWKae.js +8 -0
  286. package/web/instagramPlugin-DcclxM_d.js +8 -0
  287. package/web/lit/BaseComponent.d.ts +12 -0
  288. package/web/lit/Constructor.d.ts +1 -0
  289. package/web/lit/CssDataMixin.d.ts +7 -0
  290. package/web/lit/LightDomMixin.d.ts +8 -0
  291. package/web/lit/LitActivityBlock.d.ts +53 -0
  292. package/web/lit/LitBlock.d.ts +83 -0
  293. package/web/lit/LitSolutionBlock.d.ts +21 -0
  294. package/web/lit/LitUploaderBlock.d.ts +53 -0
  295. package/web/lit/PubSubCompat.d.ts +18 -0
  296. package/web/lit/RegisterableElementMixin.d.ts +7 -0
  297. package/web/lit/SharedState.d.ts +119 -0
  298. package/web/lit/SymbioteCompatMixin.d.ts +40 -0
  299. package/web/lit/TestModeController.d.ts +16 -0
  300. package/web/lit/Uid.d.ts +3 -0
  301. package/web/lit/activity-constants.d.ts +11 -0
  302. package/web/lit/createDebugPrinter.d.ts +3 -0
  303. package/web/lit/findBlockInCtx.d.ts +3 -0
  304. package/web/lit/getOutputData.d.ts +2 -0
  305. package/web/lit/hasBlockInCtx.d.ts +3 -0
  306. package/web/lit/l10n.d.ts +5 -0
  307. package/web/lit/parseCssPropertyValue.d.ts +1 -0
  308. package/web/lit/shared-instances.d.ts +65 -0
  309. package/web/locales/file-uploader/ar.d.ts +137 -0
  310. package/web/locales/file-uploader/az.d.ts +129 -0
  311. package/web/locales/file-uploader/ca.d.ts +131 -0
  312. package/web/locales/file-uploader/cs.d.ts +133 -0
  313. package/web/locales/file-uploader/da.d.ts +129 -0
  314. package/web/locales/file-uploader/de.d.ts +129 -0
  315. package/web/locales/file-uploader/el.d.ts +129 -0
  316. package/web/locales/file-uploader/en.d.ts +129 -0
  317. package/web/locales/file-uploader/es.d.ts +131 -0
  318. package/web/locales/file-uploader/et.d.ts +129 -0
  319. package/web/locales/file-uploader/fi.d.ts +129 -0
  320. package/web/locales/file-uploader/fr.d.ts +131 -0
  321. package/web/locales/file-uploader/he.d.ts +131 -0
  322. package/web/locales/file-uploader/hy.d.ts +129 -0
  323. package/web/locales/file-uploader/is.d.ts +129 -0
  324. package/web/locales/file-uploader/it.d.ts +131 -0
  325. package/web/locales/file-uploader/ja.d.ts +129 -0
  326. package/web/locales/file-uploader/ka.d.ts +129 -0
  327. package/web/locales/file-uploader/kk.d.ts +129 -0
  328. package/web/locales/file-uploader/ko.d.ts +129 -0
  329. package/web/locales/file-uploader/lv.d.ts +131 -0
  330. package/web/locales/file-uploader/nb.d.ts +129 -0
  331. package/web/locales/file-uploader/nl.d.ts +129 -0
  332. package/web/locales/file-uploader/pl.d.ts +133 -0
  333. package/web/locales/file-uploader/pt.d.ts +131 -0
  334. package/web/locales/file-uploader/ro.d.ts +131 -0
  335. package/web/locales/file-uploader/ru.d.ts +133 -0
  336. package/web/locales/file-uploader/sk.d.ts +133 -0
  337. package/web/locales/file-uploader/sr.d.ts +131 -0
  338. package/web/locales/file-uploader/sv.d.ts +129 -0
  339. package/web/locales/file-uploader/tr.d.ts +129 -0
  340. package/web/locales/file-uploader/uk.d.ts +133 -0
  341. package/web/locales/file-uploader/vi.d.ts +129 -0
  342. package/web/locales/file-uploader/zh-TW.d.ts +129 -0
  343. package/web/locales/file-uploader/zh.d.ts +129 -0
  344. package/web/plugins/cameraPlugin.d.ts +2 -0
  345. package/web/plugins/cloudImageEditorPlugin.d.ts +2 -0
  346. package/web/plugins/externalSourcesPlugin.d.ts +2 -0
  347. package/web/plugins/imageShrinkPlugin.d.ts +2 -0
  348. package/web/plugins/instagramPlugin.d.ts +2 -0
  349. package/web/plugins/unsplashPlugin.d.ts +16 -0
  350. package/web/plugins/urlSourcePlugin.d.ts +2 -0
  351. package/web/plugins-Bt7FXHKx.js +562 -0
  352. package/web/plugins-CaaolyMk.js +562 -0
  353. package/web/plugins-Cjgw5oWg.js +562 -0
  354. package/web/plugins-CzNtrVQB.js +562 -0
  355. package/web/plugins-DS0hIs2V.js +563 -0
  356. package/web/ref-BOnG19ns.js +4040 -0
  357. package/web/ref-BejJFG7m.js +4040 -0
  358. package/web/ref-DcRg7zo9.js +4040 -0
  359. package/web/ref-ZWPcLQB9.js +4040 -0
  360. package/web/solutions/adaptive-image/index.d.ts +2 -0
  361. package/web/solutions/cloud-image-editor/CloudImageEditor.d.ts +11 -0
  362. package/web/solutions/cloud-image-editor/index.d.ts +5 -0
  363. package/web/solutions/file-uploader/inline/FileUploaderInline.d.ts +20 -0
  364. package/web/solutions/file-uploader/inline/index.d.ts +1 -0
  365. package/web/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +23 -0
  366. package/web/solutions/file-uploader/minimal/index.d.ts +1 -0
  367. package/web/solutions/file-uploader/regular/FileUploaderRegular.d.ts +17 -0
  368. package/web/solutions/file-uploader/regular/index.d.ts +1 -0
  369. package/web/style-map-BmZdux7T.js +37 -0
  370. package/web/style-map-CZ6fSV6e.js +37 -0
  371. package/web/style-map-Dk7mLCrB.js +37 -0
  372. package/web/style-map-HkHnu9oA.js +37 -0
  373. package/web/style-map-tw1yUEaj.js +37 -0
  374. package/web/types/dom.d.ts +1 -0
  375. package/web/types/events.d.ts +4 -0
  376. package/web/types/exported.d.ts +492 -0
  377. package/web/types/index.d.ts +5 -0
  378. package/web/uc-basic.layered.min.css +6046 -0
  379. package/web/uc-basic.min.css +5487 -0
  380. package/web/uc-cloud-image-editor.layered.min.css +1884 -0
  381. package/web/uc-cloud-image-editor.min.css +1675 -0
  382. package/web/uc-cloud-image-editor.min.js +457 -0
  383. package/web/uc-file-uploader-inline.layered.min.css +4352 -0
  384. package/web/uc-file-uploader-inline.min.css +3836 -0
  385. package/web/uc-file-uploader-inline.min.js +1859 -0
  386. package/web/uc-file-uploader-minimal.layered.min.css +4352 -0
  387. package/web/uc-file-uploader-minimal.min.css +3836 -0
  388. package/web/uc-file-uploader-minimal.min.js +1859 -0
  389. package/web/uc-file-uploader-regular.layered.min.css +4352 -0
  390. package/web/uc-file-uploader-regular.min.css +3836 -0
  391. package/web/uc-file-uploader-regular.min.js +1859 -0
  392. package/web/uc-img.min.js +895 -0
  393. package/web/urlSourcePlugin-9lhcr02f.js +8 -0
  394. package/web/urlSourcePlugin-C-sLGhGb.js +8 -0
  395. package/web/urlSourcePlugin-DNXDpnRD.js +8 -0
  396. package/web/urlSourcePlugin-JnD0cnxb.js +8 -0
  397. package/web/urlSourcePlugin-hcMU2K6T.js +8 -0
  398. package/web/utils/UID.d.ts +5 -0
  399. package/web/utils/UID.test.d.ts +1 -0
  400. package/web/utils/UploadSource.d.ts +37 -0
  401. package/web/utils/WindowHeightTracker.d.ts +9 -0
  402. package/web/utils/abilities.d.ts +1 -0
  403. package/web/utils/applyStyles.d.ts +1 -0
  404. package/web/utils/browser-info.d.ts +12 -0
  405. package/web/utils/browser-info.test.d.ts +1 -0
  406. package/web/utils/cdn-utils.d.ts +53 -0
  407. package/web/utils/cdn-utils.test.d.ts +1 -0
  408. package/web/utils/comma-separated.d.ts +2 -0
  409. package/web/utils/debounce.d.ts +3 -0
  410. package/web/utils/delay.d.ts +1 -0
  411. package/web/utils/fileTypes.d.ts +11 -0
  412. package/web/utils/fileTypes.test.d.ts +1 -0
  413. package/web/utils/get-top-level-origin.d.ts +1 -0
  414. package/web/utils/get-top-level-origin.test.d.ts +1 -0
  415. package/web/utils/getLocaleDirection.d.ts +1 -0
  416. package/web/utils/getPluralForm.d.ts +1 -0
  417. package/web/utils/getPluralForm.test.d.ts +1 -0
  418. package/web/utils/isPromiseLike.d.ts +1 -0
  419. package/web/utils/isPromiseLike.test.d.ts +1 -0
  420. package/web/utils/isSecureTokenExpired.d.ts +8 -0
  421. package/web/utils/isSecureTokenExpired.test.d.ts +1 -0
  422. package/web/utils/memoize.d.ts +1 -0
  423. package/web/utils/memoize.test.d.ts +1 -0
  424. package/web/utils/mixinClass.d.ts +8 -0
  425. package/web/utils/parseCdnUrl.d.ts +11 -0
  426. package/web/utils/parseCdnUrl.test.d.ts +1 -0
  427. package/web/utils/parseShrink.d.ts +7 -0
  428. package/web/utils/parseShrink.test.d.ts +1 -0
  429. package/web/utils/preloadImage.d.ts +10 -0
  430. package/web/utils/prettyBytes.d.ts +11 -0
  431. package/web/utils/prettyBytes.test.d.ts +1 -0
  432. package/web/utils/resizeImage.d.ts +1 -0
  433. package/web/utils/stringToArray.d.ts +1 -0
  434. package/web/utils/stringToArray.test.d.ts +1 -0
  435. package/web/utils/template-utils.d.ts +16 -0
  436. package/web/utils/template-utils.test.d.ts +1 -0
  437. package/web/utils/throttle.d.ts +3 -0
  438. package/web/utils/toKebabCase.d.ts +2 -0
  439. package/web/utils/toKebabCase.test.d.ts +1 -0
  440. package/web/utils/transparentPixelSrc.d.ts +1 -0
  441. package/web/utils/uniqueArray.d.ts +1 -0
  442. package/web/utils/uniqueArray.test.d.ts +1 -0
  443. package/web/utils/userAgent.d.ts +2 -0
  444. package/web/utils/validators/collection/index.d.ts +2 -0
  445. package/web/utils/validators/collection/validateCollectionUploadError.d.ts +2 -0
  446. package/web/utils/validators/collection/validateMultiple.d.ts +2 -0
  447. package/web/utils/validators/file/index.d.ts +4 -0
  448. package/web/utils/validators/file/validateFileType.d.ts +2 -0
  449. package/web/utils/validators/file/validateIsImage.d.ts +2 -0
  450. package/web/utils/validators/file/validateMaxSizeLimit.d.ts +2 -0
  451. package/web/utils/validators/file/validateUploadError.d.ts +2 -0
  452. package/web/utils/warnOnce.d.ts +1 -0
  453. package/web/utils/wildcardRegexp.d.ts +1 -0
  454. package/web/utils/wildcardRegexp.test.d.ts +1 -0
  455. package/web/utils/withResolvers.d.ts +5 -0
  456. package/web/utils/withResolvers.test.d.ts +1 -0
  457. package/dist/CameraSource-px4BzEMI.js +0 -9
  458. package/dist/ExternalSource-CR5DG0Jv.js +0 -9
  459. package/dist/UrlSource-BxVL9Pve.js +0 -9
  460. package/dist/cameraPlugin-dGash48Q.js +0 -8
  461. package/dist/cloudImageEditorPlugin-2EU0Pm_j.js +0 -8
  462. package/dist/env-B1nfXy9i.js +0 -8
  463. package/dist/externalSourcesPlugin-DKQqk3AC.js +0 -8
  464. package/dist/imageShrinkPlugin-DAx8eRen.js +0 -8
  465. package/dist/instagramPlugin-k67tMAo3.js +0 -8
  466. package/dist/urlSourcePlugin-9xdB7Pvw.js +0 -8
@@ -0,0 +1,1859 @@
1
+ /**
2
+ * @license
3
+ * Package: @uploadcare/file-uploader@1.28.0-alpha.1 (MIT)
4
+ * License: https://github.com/uploadcare/blob/main/LICENSE
5
+ * Built: 2026-03-02T20:26:13.662Z
6
+ */
7
+ import { $ as CancelError, At as __decorate, B as i, Bt as b, Ct as createOriginalUrl, Dt as defineLocale, Ft as LightDomMixin, G as applyTemplateData, H as LitBlock, It as CssDataMixin, J as EventType, K as PACKAGE_NAME, Lt as i$1, Mt as r, Nt as n, Ot as UID, Pt as RegisterableElementMixin, R as o, St as createCdnUrlModifiers, V as t, Vt as PubSub, Y as InternalEventType, Z as solutionBlockCtx, a as p, at as uploadFile, bt as stringToArray, c as Icon, i as h, jt as debounce, kt as SymbioteMixin, n as n$1, o as u, q as PACKAGE_VERSION, r as M, rt as UploadcareError, s as v, st as ModalEvents, t as e, xt as createCdnUrl, z as e$1, zt as E } from "./ref-BOnG19ns.js";
8
+ import { c as UploadSource, m as defineComponents, s as ExternalUploadSource } from "./plugins-Cjgw5oWg.js";
9
+ import { n as toKebabCase, t as Config } from "./Config-8hlBNhvs.js";
10
+ import { n as LitActivityBlock, r as applyStyles, t as LitUploaderBlock } from "./LitUploaderBlock-BjAaoLl2.js";
11
+ import { n as Select, t as CameraSource } from "./CameraSource-D964yPLu.js";
12
+ import { n as Spinner, t as ExternalSource } from "./ExternalSource-CKfMtOgU.js";
13
+ import { b as preloadImage, x as TRANSPARENT_PIXEL_SRC, y as throttle } from "./CloudImageEditor-CTgUWB07.js";
14
+ import { t as ActivityHeader } from "./ActivityHeader-DQy6rII1.js";
15
+ import { t as UrlSource } from "./UrlSource-CE389CBz.js";
16
+ import "./style-map-HkHnu9oA.js";
17
+ import "./CloudImageEditorActivity-DmnLLINR.js";
18
+ var BaseComponent = class extends RegisterableElementMixin(SymbioteMixin()(CssDataMixin(LightDomMixin(i$1)))) {};
19
+ function loadFileUploaderFrom(g, B = !1) {
20
+ return new Promise((V, H) => {
21
+ if (typeof document != "object") {
22
+ V(null);
23
+ return;
24
+ }
25
+ if (typeof window == "object" && window.UC) {
26
+ V(window.UC);
27
+ return;
28
+ }
29
+ let U = document.createElement("script");
30
+ U.async = !0, U.src = g, U.onerror = () => {
31
+ H();
32
+ }, U.onload = () => {
33
+ let g = window.UC;
34
+ B && defineComponents(g), V(g);
35
+ }, document.head.appendChild(U);
36
+ });
37
+ }
38
+ var svg_sprite_default = "<svg width='0' height='0' style='position:absolute'><symbol viewBox='0 0 24 24' id='uc-icon-about' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.152 14.12v.1h1.523v-.1c.007-.409.053-.752.138-1.028.086-.277.22-.517.405-.72.188-.202.434-.397.735-.586.32-.191.593-.412.82-.66.232-.249.41-.531.533-.847.125-.32.187-.678.187-1.076 0-.579-.137-1.085-.41-1.518a2.717 2.717 0 0 0-1.14-1.018c-.49-.245-1.062-.367-1.715-.367-.597 0-1.142.114-1.636.34-.49.228-.884.564-1.182 1.008-.299.44-.46.98-.485 1.619h1.62c.024-.377.118-.684.282-.922a1.48 1.48 0 0 1 .617-.532c.25-.114.51-.17.784-.17.301 0 .575.063.82.191.248.124.447.302.597.533.149.23.223.504.223.82 0 .263-.05.502-.149.72a1.91 1.91 0 0 1-.405.574 3.48 3.48 0 0 1-.575.453 4.22 4.22 0 0 0-.847.66c-.234.242-.415.558-.543.949-.125.39-.19.916-.197 1.577Zm.053 3.03c.21.206.46.31.75.31.196 0 .374-.049.534-.144a1.1 1.1 0 0 0 .383-.384c.1-.163.15-.343.15-.538a1 1 0 0 0-.32-.746 1.019 1.019 0 0 0-.746-.314c-.291 0-.542.105-.751.314-.21.206-.314.455-.314.746 0 .295.104.547.314.756ZM24 12c0 6.627-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0s12 5.373 12 12Zm-1.5 0c0 5.799-4.701 10.5-10.5 10.5S1.5 17.799 1.5 12 6.201 1.5 12 1.5 22.5 6.201 22.5 12Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-add' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M12.75 21a.75.75 0 0 1-1.5 0v-8.25H3a.75.75 0 0 1 0-1.5h8.25V3a.75.75 0 0 1 1.5 0v8.25H21a.75.75 0 0 1 0 1.5h-8.25V21Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-arrow-down' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.5 23.03a.75.75 0 0 0 .999 0l9.29-8.276a.75.75 0 0 0-.998-1.12l-8.042 7.164V1.53a.75.75 0 0 0-1.5 0v19.267l-8.04-7.163a.75.75 0 0 0-.998 1.12z'/></symbol><symbol fill='none' viewBox='0 0 9 6' id='uc-icon-arrow-dropdown' xmlns='http://www.w3.org/2000/svg'><path stroke='currentColor' d='m1.5 1.667 3 2.666 3-2.666' opacity='.5'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-aspect-ratio' xmlns='http://www.w3.org/2000/svg'><path stroke='currentColor' d='M7.395 22.5H2.454v-5.25m14.824 5.25h4.94v-5.25m0-10.5V1.5h-4.94m-9.883 0H2.454v5.25'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-back' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M20.251 12a.75.75 0 0 1-.75.75H6.067l5.72 5.85a.75.75 0 1 1-1.072 1.05L4.136 12.92a1.292 1.292 0 0 1 0-1.842l6.579-6.728a.75.75 0 1 1 1.072 1.048l-5.72 5.851H19.5a.75.75 0 0 1 .75.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-badge-error' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13.6 18.4a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0zM12 4.5A1.5 1.5 0 0 1 13.5 6v7a1.5 1.5 0 0 1-3 0V6A1.5 1.5 0 0 1 12 4.5z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-badge-success' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='m10.5 18.204 7.6-8.183a1.5 1.5 0 0 0-2.2-2.042l-5.4 5.817-2.4-2.586a1.5 1.5 0 1 0-2.2 2.041l4.6 4.953Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-box' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M1.01 4.148a.75.75 0 0 1 .75.75v4.348a4.437 4.437 0 0 1 2.988-1.153c1.734 0 3.23.992 3.978 2.438a4.478 4.478 0 0 1 3.978-2.438c2.49 0 4.488 2.044 4.488 4.543 0 2.5-1.999 4.544-4.488 4.544a4.478 4.478 0 0 1-3.978-2.438 4.478 4.478 0 0 1-3.978 2.438C2.26 17.18.26 15.135.26 12.636V4.898a.75.75 0 0 1 .75-.75Zm.75 8.488c0 1.692 1.348 3.044 2.988 3.044s2.989-1.352 2.989-3.044c0-1.691-1.349-3.043-2.989-3.043S1.76 10.945 1.76 12.636Zm10.944-3.043c-1.64 0-2.988 1.352-2.988 3.043 0 1.692 1.348 3.044 2.988 3.044s2.988-1.352 2.988-3.044c0-1.69-1.348-3.043-2.988-3.043Zm4.328-1.23a.75.75 0 0 1 1.052.128l2.333 2.983 2.333-2.983a.75.75 0 0 1 1.181.924l-2.562 3.277 2.562 3.276a.75.75 0 1 1-1.181.924l-2.333-2.983-2.333 2.983a.75.75 0 1 1-1.181-.924l2.562-3.276-2.562-3.277a.75.75 0 0 1 .129-1.052Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.65 2.55a.75.75 0 0 1 .6-.3h7.5a.75.75 0 0 1 .6.3l2.025 2.7H21a3 3 0 0 1 3 3v10.5a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h2.625zm.975 1.2L6.6 6.45a.75.75 0 0 1-.6.3H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h18a1.5 1.5 0 0 0 1.5-1.5V8.25a1.5 1.5 0 0 0-1.5-1.5h-3a.75.75 0 0 1-.6-.3l-2.025-2.7zm3.375 6a3.375 3.375 0 1 0 0 6.75 3.375 3.375 0 0 0 0-6.75zm-4.875 3.375a4.875 4.875 0 1 1 9.75 0 4.875 4.875 0 0 1-9.75 0z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-camera-full' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M2 4.667a2 2 0 0 0-2 2V16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.667a2 2 0 0 0-2-2h-2.667l-2-2.667H6.667l-2 2.667H2Zm8 10a3.667 3.667 0 1 0 0-7.334 3.667 3.667 0 0 0 0 7.334Z' fill='currentColor'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-close' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M4.604 4.604a.75.75 0 0 1 1.06 0L12 10.939l6.335-6.335a.75.75 0 1 1 1.061 1.06L13.061 12l6.335 6.335a.75.75 0 1 1-1.06 1.061L12 13.061l-6.335 6.335a.75.75 0 0 1-1.061-1.06L10.939 12 4.604 5.665a.75.75 0 0 1 0-1.061z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-collapse' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M3.116 12a.75.75 0 0 1 .75-.75h16.268a.75.75 0 0 1 0 1.5H3.866a.75.75 0 0 1-.75-.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-default' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.501.392a.75.75 0 0 1 .998 0l6.704 5.972a.75.75 0 0 1-.998 1.12l-5.455-4.86v13.439a.75.75 0 0 1-1.5 0V2.625l-5.454 4.86a.75.75 0 1 1-.998-1.12zM.857 16.73a.75.75 0 0 1 .75.75v4.914h20.786v-4.914a.75.75 0 0 1 1.5 0v5.664a.75.75 0 0 1-.75.75H.857a.75.75 0 0 1-.75-.75v-5.664a.75.75 0 0 1 .75-.75z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-dropbox' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.019 1.92a.75.75 0 0 1 .806 0L12 5.219l5.176-3.297a.75.75 0 0 1 .806 0l5.577 3.553a.75.75 0 0 1 0 1.265l-4.574 2.914 4.574 2.914a.75.75 0 0 1 0 1.265l-5.577 3.554a.75.75 0 0 1-.806 0L12 14.089l-5.175 3.297a.75.75 0 0 1-.806 0L.44 13.833a.75.75 0 0 1 0-1.266l4.575-2.914L.44 6.74a.75.75 0 0 1 0-1.265zm.403 8.616L2.24 13.2l4.182 2.664 4.181-2.664zm6.975 2.664 4.182 2.664L21.76 13.2l-4.181-2.664zm2.776-3.547L12 12.311 7.828 9.653 12 6.995zm1.406-.882 4.181-2.664-4.181-2.664-4.182 2.664zm-6.976-2.664L6.422 3.443 2.24 6.107 6.422 8.77zM5.791 18.544a.75.75 0 0 1 1.035-.23l5.175 3.297 5.175-3.297a.75.75 0 1 1 .806 1.265l-5.578 3.554a.75.75 0 0 1-.806 0L6.02 19.579a.75.75 0 0 1-.23-1.035z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-edit-file' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M18.558 2.804a.78.78 0 0 0-.557.235l-.008.007-2.472 2.46 3.847 3.848 2.46-2.473.004-.003a.78.78 0 0 0 0-1.108l-.004-.003-2.712-2.728a.78.78 0 0 0-.558-.235Zm-.248 7.613-3.852-3.852-8.93 8.887-1.516 5.41 5.41-1.515 8.888-8.93Zm-.636-8.934a2.28 2.28 0 0 1 2.512.505l2.702 2.717.002.002a2.278 2.278 0 0 1 0 3.234l-.002.002-12.541 12.602a.75.75 0 0 1-.33.193l-6.884 1.928a.75.75 0 0 1-.925-.924l1.928-6.885a.75.75 0 0 1 .193-.33l12.603-12.54a2.28 2.28 0 0 1 .742-.504Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-error' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-evernote' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M9.804 2.27v-.048c.055-.263.313-.562.85-.562h.44c.142 0 .325.014.526.033.066.009.124.023.267.06l.13.032h.002c.319.079.515.275.644.482a1.461 1.461 0 0 1 .16.356l.004.012a.75.75 0 0 0 .603.577l1.191.207a1988.512 1988.512 0 0 0 2.332.402c.512.083 1.1.178 1.665.442.64.3 1.19.795 1.376 1.77.548 2.931.657 5.829.621 8a39.233 39.233 0 0 1-.125 2.602 17.518 17.518 0 0 1-.092.849.735.735 0 0 0-.024.112c-.378 2.705-1.269 3.796-2.04 4.27-.746.457-1.53.451-2.217.447h-.192c-.46 0-1.073-.23-1.581-.635-.518-.412-.763-.87-.763-1.217 0-.45.188-.688.355-.786.161-.095.436-.137.796.087a.75.75 0 1 0 .792-1.274c-.766-.476-1.64-.52-2.345-.108-.7.409-1.098 1.188-1.098 2.08 0 .996.634 1.84 1.329 2.392.704.56 1.638.96 2.515.96l.185.002c.667.009 1.874.025 3.007-.67 1.283-.786 2.314-2.358 2.733-5.276a4.213 4.213 0 0 0 .056-.335c.023-.184.051-.445.079-.772.055-.655.111-1.585.13-2.704.037-2.234-.074-5.239-.647-8.301v-.002c-.294-1.544-1.233-2.391-2.215-2.85-.777-.363-1.623-.496-2.129-.576a8.872 8.872 0 0 1-.25-.041l-.006-.001-1.99-.345-.761-.132a2.93 2.93 0 0 0-.182-.338A2.532 2.532 0 0 0 12.379.329l-.091-.023a3.967 3.967 0 0 0-.493-.103L11.769.2a7.846 7.846 0 0 0-.675-.04h-.44c-.733 0-1.368.284-1.795.742L2.416 7.431c-.468.428-.751 1.071-.751 1.81 0 .02 0 .041.003.062l.003.034c.017.21.038.468.096.796.107.715.275 1.47.391 1.994.029.13.055.245.075.342l.002.008c.258 1.141.641 1.94.978 2.466.168.263.323.456.444.589a2.808 2.808 0 0 0 .192.194c1.536 1.562 3.713 2.196 5.731 2.08.13-.005.35-.032.537-.073a2.627 2.627 0 0 0 .652-.24c.425-.26.75-.661.992-1.046.184-.294.342-.61.473-.915a3.8 3.8 0 0 0 .627.493 5.022 5.022 0 0 0 1.97.709l.023.002.018.003.11.016c.088.014.205.035.325.058l.056.014c.088.022.164.04.235.061a1.736 1.736 0 0 1 .145.048l.03.014c.765.34 1.302 1.09 1.302 1.871a.75.75 0 0 0 1.5 0c0-1.456-.964-2.69-2.18-3.235a3.595 3.595 0 0 0-.679-.217l-.063-.015a10.616 10.616 0 0 0-.606-.105l-.02-.003-.03-.003h-.002a3.542 3.542 0 0 1-1.331-.485c-.471-.298-.788-.692-.828-1.234a.75.75 0 0 0-1.48-.106l-.001.003-.004.017a8.23 8.23 0 0 1-.092.352 9.963 9.963 0 0 1-.298.892c-.132.34-.29.68-.47.966-.174.276-.339.454-.478.549a1.178 1.178 0 0 1-.221.072 1.949 1.949 0 0 1-.241.036h-.013l-.032.002c-1.684.1-3.423-.437-4.604-1.65a.746.746 0 0 0-.053-.05L4.84 14.6a1.348 1.348 0 0 1-.07-.073 2.99 2.99 0 0 1-.293-.392c-.242-.379-.558-1.014-.778-1.985a54.1 54.1 0 0 0-.083-.376 27.494 27.494 0 0 1-.367-1.872l-.003-.02a6.791 6.791 0 0 1-.08-.67c.004-.277.086-.475.2-.609l.067-.067a.63.63 0 0 1 .292-.145h.05c.18 0 1.095.055 2.013.115l1.207.08.534.037a.747.747 0 0 0 .052.002c.782 0 1.349-.206 1.759-.585l.005-.005c.553-.52.622-1.225.622-1.76V6.24l-.026-.565A774.97 774.97 0 0 1 9.885 4.4c-.042-.961-.081-1.939-.081-2.13ZM4.995 6.953a251.126 251.126 0 0 1 2.102.137l.508.035c.48-.004.646-.122.715-.185.07-.068.146-.209.147-.649l-.024-.548a791.69 791.69 0 0 1-.095-2.187L4.995 6.953Zm16.122 9.996Zm-5.479-5.323a.75.75 0 0 0 1.014.31 2.04 2.04 0 0 1 .304-.089 1.84 1.84 0 0 1 .544-.039c.215.023.321.06.37.085.033.016.039.026.047.04a.75.75 0 0 0 1.289-.767c-.337-.567-.906-.783-1.552-.85a3.334 3.334 0 0 0-1.002.062c-.27.056-.531.14-.705.234a.75.75 0 0 0-.31 1.014Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-expand' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='m12 8.337-8.47 8.47a.75.75 0 0 1-1.06-1.06l8.605-8.606a1.29 1.29 0 0 1 1.85 0l8.605 8.605a.75.75 0 1 1-1.06 1.06L12 8.338Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-external-source-placeholder' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.341 3.27a10.5 10.5 0 0 1 5.834-1.77.75.75 0 0 0 0-1.5 12 12 0 1 0 12 12 .75.75 0 0 0-1.5 0A10.5 10.5 0 1 1 6.34 3.27Zm14.145 1.48a.75.75 0 1 0-1.06-1.062L9.925 13.19V7.95a.75.75 0 1 0-1.5 0V15c0 .414.336.75.75.75h7.05a.75.75 0 0 0 0-1.5h-5.24l9.501-9.5Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-facebook' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M12 1.5C6.201 1.5 1.5 6.201 1.5 12c0 4.943 3.416 9.089 8.016 10.204v-6.108H7.383a.75.75 0 0 1-.75-.75v-3.281a.75.75 0 0 1 .75-.75h2.133V9.393c0-.958.225-2.511 1.38-3.65 1.194-1.177 3.174-1.718 6.254-1.056a.75.75 0 0 1 .592.733v2.754a.75.75 0 0 1-.75.75c-.692 0-1.203.026-1.584.082-.387.057-.578.137-.675.202-.109.073-.237.205-.237 1.029v1.078h2.39a.75.75 0 0 1 .742.866l-.516 3.281a.75.75 0 0 1-.74.634h-1.876v6.106C19.09 21.082 22.5 16.939 22.5 12c0-5.799-4.701-10.5-10.5-10.5zM0 12C0 5.373 5.373 0 12 0s12 5.373 12 12c0 5.995-4.395 10.961-10.138 11.856a.75.75 0 0 1-.866-.74v-7.77a.75.75 0 0 1 .75-.75h1.984l.28-1.781h-2.264a.75.75 0 0 1-.75-.75v-1.828c0-.829.089-1.729.9-2.274.363-.244.807-.37 1.293-.441a9.623 9.623 0 0 1 1.053-.086V6.04c-2.41-.405-3.645.132-4.293.771-.737.728-.933 1.793-.933 2.582v2.672a.75.75 0 0 1-.75.75H8.133v1.78h2.133a.75.75 0 0 1 .75.75v7.772a.75.75 0 0 1-.865.741C4.4 22.968 0 18 0 12z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-file' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M2.895 1.201c0-.473.383-.857.857-.857h8.4c.227 0 .445.09.606.251l8.4 8.4c.16.16.25.379.25.606v13.2a.857.857 0 0 1-.856.857h-16.8a.857.857 0 0 1-.857-.857zm1.714.857v19.886h15.085V10.458h-7.542a.857.857 0 0 1-.858-.857V2.058zm8.4 1.213 5.473 5.473H13.01z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-flickr' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M5.959 7.926c-2.298 0-4.14 1.834-4.14 4.073 0 2.241 1.842 4.075 4.14 4.075 2.302 0 4.145-1.834 4.145-4.075 0-2.238-1.843-4.073-4.145-4.073Zm-5.64 4.073c0-3.086 2.533-5.573 5.64-5.573 3.11 0 5.645 2.486 5.645 5.573 0 3.089-2.535 5.575-5.645 5.575-3.107 0-5.64-2.487-5.64-5.575Zm18.07-4.073c-2.301 0-4.144 1.835-4.144 4.073 0 2.24 1.843 4.075 4.145 4.075 2.299 0 4.141-1.834 4.141-4.075 0-2.239-1.842-4.073-4.141-4.073Zm-5.644 4.073c0-3.087 2.535-5.573 5.645-5.573 3.108 0 5.641 2.487 5.641 5.573 0 3.088-2.533 5.575-5.641 5.575-3.11 0-5.645-2.486-5.645-5.575Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-gdrive' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.736 1.818a.75.75 0 0 1 .647-.37h7.587a.75.75 0 0 1 .655.383l7.233 12.946a.75.75 0 0 1-.003.737l-3.794 6.66a.75.75 0 0 1-.651.378H4.59a.75.75 0 0 1-.651-.378l-3.794-6.66a.75.75 0 0 1 .005-.75zm.64 1.876L1.663 15.148l2.93 5.145 6.655-11.581zm3.736 6.526-2.398 4.173H14.5zm4.116 4.173h5.697L15.53 2.947H9.677zm5.685 1.5H8.852l-2.966 5.16h13.088z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-gphotos' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M12.51 0c-.702 0-1.272.57-1.272 1.273V7.35A6.381 6.381 0 0 0 0 11.489c0 .703.57 1.273 1.273 1.273H7.35A6.381 6.381 0 0 0 11.488 24c.704 0 1.274-.57 1.274-1.273V16.65A6.381 6.381 0 0 0 24 12.51c0-.703-.57-1.273-1.273-1.273H16.65A6.381 6.381 0 0 0 12.511 0Zm.252 11.232V1.53a4.857 4.857 0 0 1 0 9.702Zm-1.53.006H1.53a4.857 4.857 0 0 1 9.702 0Zm1.536 1.524a4.857 4.857 0 0 0 9.702 0h-9.702Zm-6.136 4.857c0-2.598 2.04-4.72 4.606-4.85v9.7a4.857 4.857 0 0 1-4.606-4.85Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-huddle' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.204 2.002c-.252.23-.357.486-.357.67V21.07c0 .15.084.505.313.812.208.28.499.477.929.477.519 0 .796-.174.956-.365.178-.212.286-.535.286-.924v-.013l.117-6.58c.004-1.725 1.419-3.883 3.867-3.883 1.33 0 2.332.581 2.987 1.364.637.762.95 1.717.95 2.526v6.47c0 .392.11.751.305.995.175.22.468.41 1.008.41.52 0 .816-.198 1.002-.437.207-.266.31-.633.31-.969V14.04c0-2.81-1.943-5.108-4.136-5.422a5.971 5.971 0 0 0-3.183.41c-.912.393-1.538.96-1.81 1.489a.75.75 0 0 1-1.417-.344v-7.5c0-.587-.47-1.031-1.242-1.031-.315 0-.638.136-.885.36ZM5.194.892A2.844 2.844 0 0 1 7.09.142c1.328 0 2.742.867 2.742 2.53v5.607a6.358 6.358 0 0 1 1.133-.629 7.47 7.47 0 0 1 3.989-.516c3.056.436 5.425 3.482 5.425 6.906v6.914c0 .602-.177 1.313-.627 1.89-.47.605-1.204 1.016-2.186 1.016-.96 0-1.698-.37-2.179-.973-.46-.575-.633-1.294-.633-1.933v-6.469c0-.456-.19-1.071-.602-1.563-.394-.471-.986-.827-1.836-.827-1.447 0-2.367 1.304-2.367 2.39v.014l-.117 6.58c-.001.64-.177 1.333-.637 1.881-.48.57-1.2.9-2.105.9-.995 0-1.7-.5-2.132-1.081-.41-.552-.61-1.217-.61-1.708V2.672c0-.707.366-1.341.847-1.78Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-info' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-1 15h2v-6h-2v6Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-local' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M3 3.75a1.5 1.5 0 0 0-1.5 1.5v13.5a1.5 1.5 0 0 0 1.5 1.5h18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 21 7.5h-9a.75.75 0 0 1-.643-.364L9.325 3.75zm-3 1.5a3 3 0 0 1 3-3h6.75a.75.75 0 0 1 .643.364L12.425 6H21a3 3 0 0 1 3 3v9.75a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-microphone' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M7.5 4.781a4.5 4.5 0 0 1 9 0v6.469a4.5 4.5 0 1 1-9 0V4.781Zm4.5-3a3 3 0 0 0-3 3v6.469a3 3 0 1 0 6 0V4.781a3 3 0 0 0-3-3Zm-8.156 8.11a.75.75 0 0 1 .75.75 7.406 7.406 0 1 0 14.812 0 .75.75 0 0 1 1.5 0 8.907 8.907 0 0 1-8.156 8.875v2.703h3.258a.75.75 0 1 1 0 1.5H7.992a.75.75 0 0 1 0-1.5h3.258v-2.703a8.907 8.907 0 0 1-8.156-8.875.75.75 0 0 1 .75-.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-microphone-mute' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M7.5 4.781a4.5 4.5 0 0 1 9 0V6l3.524-3.524a.75.75 0 1 1 1.061 1.06L5.036 19.585a.75.75 0 0 1-1.06-1.06l1.656-1.657a8.88 8.88 0 0 1-2.538-6.227.75.75 0 0 1 1.5 0c0 2.009.8 3.83 2.1 5.166l1.771-1.772A4.483 4.483 0 0 1 7.5 11.25V4.781Zm2.037 8.182L15 7.5V4.781a3 3 0 1 0-6 0v6.469c0 .637.198 1.227.537 1.713Zm10.62-3.072a.75.75 0 0 1 .75.75 8.907 8.907 0 0 1-8.157 8.875v2.703h3.258a.75.75 0 1 1 0 1.5H7.992a.75.75 0 0 1 0-1.5h3.258v-2.703a8.855 8.855 0 0 1-3.035-.811.75.75 0 1 1 .638-1.358 7.406 7.406 0 0 0 10.553-6.707.75.75 0 0 1 .75-.75ZM15 10.81a.75.75 0 0 1 1.5 0v.439a4.5 4.5 0 0 1-5 4.473.75.75 0 1 1 .166-1.491A3 3 0 0 0 15 11.25v-.44Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-mobile-photo-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.65 2.55a.75.75 0 0 1 .6-.3h7.5a.75.75 0 0 1 .6.3l2.025 2.7H21a3 3 0 0 1 3 3v10.5a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h2.625zm.975 1.2L6.6 6.45a.75.75 0 0 1-.6.3H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h18a1.5 1.5 0 0 0 1.5-1.5V8.25a1.5 1.5 0 0 0-1.5-1.5h-3a.75.75 0 0 1-.6-.3l-2.025-2.7zm3.375 6a3.375 3.375 0 1 0 0 6.75 3.375 3.375 0 0 0 0-6.75zm-4.875 3.375a4.875 4.875 0 1 1 9.75 0 4.875 4.875 0 0 1-9.75 0z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-mobile-video-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M0 6.75a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v1.078L22.873 5A.75.75 0 0 1 24 5.648v12.704a.75.75 0 0 1-1.123.65L18 16.207v1.043a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V6.75Zm18 7.728 4.5 2.58V6.95L18 9.562v4.916ZM16.5 6.75a1.5 1.5 0 0 0-1.5-1.5H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h12a1.5 1.5 0 0 0 1.5-1.5V6.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-ngdrive' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.736 1.818a.75.75 0 0 1 .647-.37h7.587a.75.75 0 0 1 .655.383l7.233 12.946a.75.75 0 0 1-.003.737l-3.794 6.66a.75.75 0 0 1-.651.378H4.59a.75.75 0 0 1-.651-.378l-3.794-6.66a.75.75 0 0 1 .005-.75zm.64 1.876L1.663 15.148l2.93 5.145 6.655-11.581zm3.736 6.526-2.398 4.173H14.5zm4.116 4.173h5.697L15.53 2.947H9.677zm5.685 1.5H8.852l-2.966 5.16h13.088z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-onedrive' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13.616 4.147a7.689 7.689 0 0 0-7.642 3.285A6.299 6.299 0 0 0 1.455 17.3c.684.894 2.473 2.658 5.17 2.658h12.141c.95 0 1.882-.256 2.697-.743.815-.486 1.514-1.247 1.964-2.083a5.26 5.26 0 0 0-3.713-7.612 7.69 7.69 0 0 0-6.098-5.373ZM3.34 17.15c.674.63 1.761 1.308 3.284 1.308h12.142a3.76 3.76 0 0 0 2.915-1.383l-7.494-4.489L3.34 17.15Zm10.875-6.25 2.47-1.038a5.239 5.239 0 0 1 1.427-.389 6.19 6.19 0 0 0-10.3-1.952 6.338 6.338 0 0 1 2.118.813l4.285 2.567Zm4.55.033c-.512 0-1.019.104-1.489.307l-.006.003-1.414.594 6.521 3.906a3.76 3.76 0 0 0-3.357-4.8l-.254-.01ZM4.097 9.617A4.799 4.799 0 0 1 6.558 8.9c.9 0 1.84.25 2.587.713l3.4 2.037-10.17 4.28a4.799 4.799 0 0 1 1.721-6.312Z'/></symbol><symbol fill='none' viewBox='0 0 10 10' id='uc-icon-pause' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' d='M1 0h2.5v10H1zM6.5 0H9v10H6.5z'/></symbol><symbol fill='none' viewBox='0 0 10 10' id='uc-icon-play' xmlns='http://www.w3.org/2000/svg'><path d='m1 0 9 5-9 5V0Z' fill='currentColor'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-remove-file' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.955 3.3A2.969 2.969 0 0 0 8.998 6h5.914a2.97 2.97 0 0 0-2.957-2.7zM16.416 6a4.47 4.47 0 0 0-8.922 0h-2.32a.755.755 0 0 0-.111.008H3.075a.75.75 0 1 0 0 1.5h1.35V19.35a2.85 2.85 0 0 0 2.85 2.85h9.45a2.85 2.85 0 0 0 2.85-2.85V7.508h1.35a.75.75 0 0 0 0-1.5h-1.989A.754.754 0 0 0 18.825 6zM5.925 7.508V19.35a1.35 1.35 0 0 0 1.35 1.35h9.45a1.35 1.35 0 0 0 1.35-1.35V7.508z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-select' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='m7 10 5 5 5-5H7Z'/></symbol><symbol fill='none' viewBox='0 0 20 20' id='uc-icon-square' xmlns='http://www.w3.org/2000/svg'><rect width='20' height='20' rx='4' fill='#fff'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-upload' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.501.392a.75.75 0 0 1 .998 0l6.704 5.972a.75.75 0 0 1-.998 1.12l-5.455-4.86v13.439a.75.75 0 0 1-1.5 0V2.625l-5.454 4.86a.75.75 0 1 1-.998-1.12zM.857 16.73a.75.75 0 0 1 .75.75v4.914h20.786v-4.914a.75.75 0 0 1 1.5 0v5.664a.75.75 0 0 1-.75.75H.857a.75.75 0 0 1-.75-.75v-5.664a.75.75 0 0 1 .75-.75z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-upload-error' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-url' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M19.11 3.67c-1.71-1.709-4.578-1.682-6.408.148l-2.22 2.22a.75.75 0 0 1-1.062-1.06l2.222-2.221C14.018.381 17.836.276 20.17 2.61l1.22 1.22c2.335 2.334 2.23 6.153-.147 8.529l-2.22 2.22a.75.75 0 0 1-1.062-1.06l2.222-2.221c1.83-1.83 1.856-4.698.147-6.408zm-3.36 4.58a.75.75 0 0 1 0 1.06l-6.439 6.44a.75.75 0 0 1-1.06-1.06l6.439-6.44a.75.75 0 0 1 1.06 0zM6.04 9.42a.75.75 0 0 1 0 1.061l-2.222 2.222c-1.83 1.83-1.856 4.698-.147 6.407l1.22 1.22c1.71 1.71 4.578 1.683 6.408-.147l2.221-2.221a.75.75 0 1 1 1.06 1.06l-2.22 2.222c-2.377 2.376-6.195 2.481-8.53.147l-1.22-1.22c-2.334-2.334-2.228-6.153.148-8.53l2.221-2.22a.75.75 0 0 1 1.06 0z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-video-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M0 6.75a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v1.078L22.873 5A.75.75 0 0 1 24 5.648v12.704a.75.75 0 0 1-1.123.65L18 16.207v1.043a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V6.75Zm18 7.728 4.5 2.58V6.95L18 9.562v4.916ZM16.5 6.75a1.5 1.5 0 0 0-1.5-1.5H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h12a1.5 1.5 0 0 0 1.5-1.5V6.75Z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-video-camera-full' xmlns='http://www.w3.org/2000/svg'><path d='M2 3.333a2 2 0 0 0-2 2v9.334a2 2 0 0 0 2 2h10.938a2 2 0 0 0 2-2v-2.013L20 15.646V4.354l-5.063 3.03v-2.05a2 2 0 0 0-2-2H2Z' fill='currentColor'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-vk' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.341 3.27a10.5 10.5 0 0 1 5.834-1.77.75.75 0 0 0 0-1.5 12 12 0 1 0 12 12 .75.75 0 0 0-1.5 0A10.5 10.5 0 1 1 6.34 3.27Zm14.145 1.48a.75.75 0 1 0-1.06-1.062L9.925 13.19V7.95a.75.75 0 1 0-1.5 0V15c0 .414.336.75.75.75h7.05a.75.75 0 0 0 0-1.5h-5.24l9.501-9.5Z'/></symbol></svg>", LitSolutionBlock = class extends LitBlock {
39
+ constructor(...g) {
40
+ super(...g), this.init$ = solutionBlockCtx(this);
41
+ }
42
+ static {
43
+ this.styleAttrs = ["uc-wgt-common"];
44
+ }
45
+ initCallback() {
46
+ super.initCallback(), this.a11y?.registerBlock(this), this.clipboardLayer?.registerBlock(this), this.sharedCtx.pub("*solution", this.tagName);
47
+ }
48
+ render() {
49
+ return b`${o(svg_sprite_default)}`;
50
+ }
51
+ };
52
+ const uniqueArray = (g) => [...new Set(g)], CSS_PREF = "--uc-img-", UNRESOLVED_ATTR = "unresolved", DEV_MODE = !window.location.host.trim() || window.location.host.includes(":") || window.location.hostname.includes("localhost"), ImgTypeEnum = Object.freeze({
53
+ PREVIEW: "PREVIEW",
54
+ MAIN: "MAIN"
55
+ });
56
+ var DEFAULT_CDN_BASE = "https://ucarecdn.com";
57
+ const PROPS_MAP = Object.freeze({
58
+ "dev-mode": {},
59
+ pubkey: {},
60
+ uuid: {},
61
+ src: {},
62
+ lazy: { default: 1 },
63
+ intersection: {},
64
+ breakpoints: {},
65
+ "cdn-cname": { default: DEFAULT_CDN_BASE },
66
+ "proxy-cname": {},
67
+ "secure-delivery-proxy": {},
68
+ "hi-res-support": { default: 1 },
69
+ "ultra-res-support": {},
70
+ format: {},
71
+ "cdn-operations": {},
72
+ progressive: {},
73
+ quality: {},
74
+ "is-background-for": {},
75
+ "is-preview-blur": { default: 1 }
76
+ });
77
+ var ImgConfig = class extends CssDataMixin(RegisterableElementMixin(i$1)) {
78
+ createRenderRoot() {
79
+ return this;
80
+ }
81
+ constructor() {
82
+ for (let g in super(), this._state = {}, this._subscribers = /* @__PURE__ */ new Map(), this._isnObserver = null, this._observed = null, PROPS_MAP) {
83
+ let B = PROPS_MAP[g];
84
+ this._state[CSS_PREF + g] = B?.default || "";
85
+ }
86
+ }
87
+ $$(g) {
88
+ return this._state[CSS_PREF + g];
89
+ }
90
+ set$$(g) {
91
+ for (let B in g) {
92
+ let V = CSS_PREF + B, H = g[B];
93
+ this._state[V] = H, this._notify(V, H);
94
+ }
95
+ }
96
+ sub$$(g, B) {
97
+ let V = CSS_PREF + g;
98
+ this._subscribers.has(V) || this._subscribers.set(V, /* @__PURE__ */ new Set()), this._subscribers.get(V)?.add(B);
99
+ let H = this._state[V];
100
+ H !== null && H !== "" && B(H);
101
+ }
102
+ _notify(g, B) {
103
+ this._subscribers.has(g) && this._subscribers.get(g)?.forEach((g) => {
104
+ B === null || B === "" || g(B);
105
+ });
106
+ }
107
+ analyticsParams() {
108
+ return `-/@clib/${PACKAGE_NAME}/${PACKAGE_VERSION}/uc-img/`;
109
+ }
110
+ initAttributes(g) {
111
+ Array.from(this.attributes).forEach((B) => {
112
+ let V = B;
113
+ PROPS_MAP[V.name] || g.setAttribute(V.name, V.value);
114
+ });
115
+ }
116
+ initIntersection(g, B) {
117
+ this._isnObserver = new IntersectionObserver((V) => {
118
+ V.forEach((V) => {
119
+ V.isIntersecting && (B(), this._isnObserver?.unobserve(g));
120
+ });
121
+ }, {
122
+ root: null,
123
+ rootMargin: "0px"
124
+ }), this._isnObserver.observe(g), this._observed ||= /* @__PURE__ */ new Set(), this._observed.add(g);
125
+ }
126
+ connectedCallback() {
127
+ super.connectedCallback(), this._initCssProperties();
128
+ }
129
+ _initCssProperties() {
130
+ for (let g in PROPS_MAP) {
131
+ let B = CSS_PREF + g, V = this.getCssData(B, !0);
132
+ V != null && (this._state[B] = V);
133
+ }
134
+ }
135
+ disconnectedCallback() {
136
+ super.disconnectedCallback(), this._isnObserver &&= (this._observed?.forEach((g) => {
137
+ this._isnObserver?.unobserve(g);
138
+ }), null), this._subscribers.clear();
139
+ }
140
+ static get observedAttributes() {
141
+ return Object.keys(PROPS_MAP);
142
+ }
143
+ attributeChangedCallback(g, B, V) {
144
+ window.setTimeout(() => {
145
+ let B = CSS_PREF + g;
146
+ this._state[B] = V, this._notify(B, V);
147
+ });
148
+ }
149
+ };
150
+ const parseObjectToString = (g) => Object.entries(g).filter(([g, B]) => B !== void 0 && B !== "").map(([g, B]) => g === "cdn-operations" || g === "analytics" ? B : `${g}/${B}`);
151
+ var ImgBase = class extends ImgConfig {
152
+ constructor(...g) {
153
+ super(...g), this._img = new Image(), this._imgPreview = new Image();
154
+ }
155
+ _fmtAbs(g) {
156
+ return !g.includes("//") && !DEV_MODE && (g = new URL(g, document.baseURI).href), g;
157
+ }
158
+ _validateSize(g) {
159
+ if (!g) return;
160
+ let B = g, V = B.match(/\d+/)?.[0], H = B.match(/[a-zA-Z]+/)?.[0];
161
+ if (!V || !H) return;
162
+ let U = parseInt(V, 10);
163
+ return Number(U) > 5e3 && this._hasFormatJPG ? 5e3 + H : Number(U) > 3e3 && !this._hasFormatJPG ? 3e3 + H : g;
164
+ }
165
+ _getCdnModifiers(g, B) {
166
+ return createCdnUrlModifiers(...parseObjectToString({
167
+ format: this._getTypedCssValue("format"),
168
+ quality: this._getTypedCssValue("quality"),
169
+ resize: this._validateSize(g),
170
+ blur: B,
171
+ "cdn-operations": this._getTypedCssValue("cdn-operations") ?? void 0,
172
+ analytics: this.analyticsParams()
173
+ }));
174
+ }
175
+ _getTypedCssValue(g) {
176
+ let B = this.$$(g);
177
+ if (B == null || typeof B == "string" || typeof B == "number" || typeof B == "boolean") return B;
178
+ }
179
+ _getUrlBase(g = "", B = "") {
180
+ let V = this.$$("src");
181
+ if (V.startsWith("data:") || V.startsWith("blob:")) return V;
182
+ if (DEV_MODE && V && !V.includes("//")) return this._proxyUrl(V);
183
+ let H = this._getCdnModifiers(g, B), W = this.$$("cdn-cname"), G = W;
184
+ if (V.startsWith(String(W))) return createCdnUrl(V, H);
185
+ let K = this.$$("uuid");
186
+ if (G && K || K) return this._proxyUrl(createCdnUrl(createOriginalUrl(G, K), H));
187
+ let q = this.$$("proxy-cname");
188
+ if (q) return this._proxyUrl(createCdnUrl(q, H, this._fmtAbs(V)));
189
+ let J = this.$$("pubkey");
190
+ if (J) return this._proxyUrl(createCdnUrl(`https://${J}.ucr.io/`, H, this._fmtAbs(V)));
191
+ }
192
+ _proxyUrl(g) {
193
+ let B = this.$$("secure-delivery-proxy");
194
+ return B ? applyTemplateData(B, { previewUrl: g }, { transform: (g) => window.encodeURIComponent(g) }) : g;
195
+ }
196
+ _getElSize(g, B = 1, V = !0) {
197
+ let H = g.getBoundingClientRect(), U = B * Math.round(H.width), W = V ? "" : B * Math.round(H.height);
198
+ return U || W ? `${U || ""}x${W || ""}` : null;
199
+ }
200
+ _setupEventProxy(g) {
201
+ let B = (g) => {
202
+ g.stopPropagation();
203
+ let B = new Event(g.type, g);
204
+ this.dispatchEvent(B);
205
+ };
206
+ for (let V of ["load", "error"]) g.addEventListener(V, B);
207
+ }
208
+ get img() {
209
+ return this._hasPreviewImage || (this._setupConfigForImage({ elNode: this._img }), this.appendChild(this._img)), this._img;
210
+ }
211
+ get _currentImg() {
212
+ return this._hasPreviewImage ? {
213
+ type: ImgTypeEnum.PREVIEW,
214
+ img: this._imgPreview
215
+ } : {
216
+ type: ImgTypeEnum.MAIN,
217
+ img: this.img
218
+ };
219
+ }
220
+ get _hasPreviewImage() {
221
+ return this.$$("is-preview-blur");
222
+ }
223
+ get _bgSelector() {
224
+ return this.$$("is-background-for");
225
+ }
226
+ get _breakpoints() {
227
+ let g = this.$$("breakpoints");
228
+ return g ? uniqueArray(stringToArray(g).map((g) => parseInt(g, 10))) : null;
229
+ }
230
+ get _hasFormatJPG() {
231
+ return this.$$("format").toLowerCase() === "jpeg";
232
+ }
233
+ _renderBg(g) {
234
+ let B = /* @__PURE__ */ new Set();
235
+ B.add(`url("${this._getUrlBase(this._getElSize(g))}") 1x`), this.$$("hi-res-support") && B.add(`url("${this._getUrlBase(this._getElSize(g, 2))}") 2x`), this.$$("ultra-res-support") && B.add(`url("${this._getUrlBase(this._getElSize(g, 3))}") 3x`);
236
+ let V = `image-set(${[...B].join(", ")})`;
237
+ g.style.setProperty("background-image", V), g.style.setProperty("background-image", `-webkit-${V}`);
238
+ }
239
+ _getSrcset() {
240
+ let g = /* @__PURE__ */ new Set();
241
+ return this._breakpoints ? this._breakpoints.forEach((B) => {
242
+ g.add(`${this._getUrlBase(`${B}x`)} ${this._validateSize(`${B}w`)}`), this.$$("hi-res-support") && g.add(`${this._getUrlBase(`${B * 2}x`)} ${this._validateSize(`${B * 2}w`)}`), this.$$("ultra-res-support") && g.add(`${this._getUrlBase(`${B * 3}x`)} ${this._validateSize(`${B * 3}w`)}`);
243
+ }) : (g.add(`${this._getUrlBase(this._getElSize(this._currentImg.img))} 1x`), this.$$("hi-res-support") && g.add(`${this._getUrlBase(this._getElSize(this._currentImg.img, 2))} 2x`), this.$$("ultra-res-support") && g.add(`${this._getUrlBase(this._getElSize(this._currentImg.img, 3))} 3x`)), [...g].join();
244
+ }
245
+ _getSrc() {
246
+ return this._getUrlBase();
247
+ }
248
+ get _srcUrlPreview() {
249
+ return this._getUrlBase("100x", "100");
250
+ }
251
+ _renderBackground() {
252
+ let g = this._bgSelector;
253
+ [...document.querySelectorAll(g)].forEach((g) => {
254
+ this.$$("intersection") ? this.initIntersection(g, () => {
255
+ this._renderBg(g);
256
+ }) : this._renderBg(g);
257
+ });
258
+ }
259
+ _appendURL({ elNode: g, src: B, srcset: V }) {
260
+ B && (g.src = B), V && (g.srcset = V);
261
+ }
262
+ _setupConfigForImage({ elNode: g }) {
263
+ this._setupEventProxy(g), this.initAttributes(g);
264
+ }
265
+ _loaderImage({ src: g, srcset: B, elNode: V }) {
266
+ return new Promise((H, U) => {
267
+ this._setupConfigForImage({ elNode: V }), V.setAttribute(UNRESOLVED_ATTR, ""), V.addEventListener("load", () => {
268
+ V.removeAttribute(UNRESOLVED_ATTR), H(V);
269
+ }), V.addEventListener("error", () => {
270
+ U(!1);
271
+ }), this._appendURL({
272
+ elNode: V,
273
+ src: g,
274
+ srcset: B
275
+ });
276
+ });
277
+ }
278
+ async _renderImage() {
279
+ if (this.$$("intersection")) {
280
+ this._hasPreviewImage && (this._setupConfigForImage({ elNode: this._imgPreview }), this.appendChild(this._imgPreview)), this.initIntersection(this._currentImg.img, async () => {
281
+ this._hasPreviewImage && (this._imgPreview.src = this._srcUrlPreview);
282
+ try {
283
+ await this._loaderImage({
284
+ src: this._getSrc(),
285
+ srcset: this._getSrcset(),
286
+ elNode: this._img
287
+ }), this._hasPreviewImage && await this._imgPreview.remove(), this.appendChild(this._img);
288
+ } catch {
289
+ this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
290
+ }
291
+ });
292
+ return;
293
+ }
294
+ try {
295
+ this._hasPreviewImage && (await this._loaderImage({
296
+ src: this._srcUrlPreview,
297
+ elNode: this._imgPreview
298
+ }), this.appendChild(this._imgPreview)), await this._loaderImage({
299
+ src: this._getSrc(),
300
+ srcset: this._getSrcset(),
301
+ elNode: this._img
302
+ }), this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
303
+ } catch {
304
+ this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
305
+ }
306
+ }
307
+ init() {
308
+ this._bgSelector ? this._renderBackground() : this._renderImage();
309
+ }
310
+ }, Img = class extends ImgBase {
311
+ connectedCallback() {
312
+ super.connectedCallback(), this.sub$$("src", () => {
313
+ this.init();
314
+ }), this.sub$$("uuid", () => {
315
+ this.init();
316
+ }), this.sub$$("lazy", (g) => {
317
+ !this.$$("is-background-for") && !this.$$("is-preview-blur") && (this.img.loading = g ? "lazy" : "eager");
318
+ });
319
+ }
320
+ }, LAST_ACTIVE_MODAL_ID = null, Modal = class extends LitBlock {
321
+ constructor(...g) {
322
+ super(...g), this.dialogEl = e(), this.strokes = !1, this.blockBodyScrolling = !1, this.closeDialog = () => {
323
+ this.modalManager?.close(this.id), this.modalManager?.hasActiveModals || (document.body.style.overflow = "", this.$["*currentActivity"] = null);
324
+ }, this._handleDialogClose = () => {
325
+ this.closeDialog();
326
+ }, this._handleDialogMouseDown = (g) => {
327
+ this._mouseDownTarget = g.target;
328
+ }, this._handleDialogMouseUp = (g) => {
329
+ let B = g.target;
330
+ B === this.dialogEl.value && B === this._mouseDownTarget && this.closeDialog();
331
+ }, this._handleModalOpen = ({ id: g }) => {
332
+ g === this.id ? (LAST_ACTIVE_MODAL_ID = g, this.show(), this.emit(EventType.MODAL_OPEN, { modalId: g }, { debounce: !0 })) : this.hide();
333
+ }, this._handleModalClose = ({ id: g }) => {
334
+ g === this.id && (this.hide(), this.emit(EventType.MODAL_CLOSE, {
335
+ modalId: g,
336
+ hasActiveModals: this.modalManager?.hasActiveModals
337
+ }, { debounce: !0 }));
338
+ }, this._handleModalCloseAll = (g) => {
339
+ this.hide(), LAST_ACTIVE_MODAL_ID === this.id && this.emit(EventType.MODAL_CLOSE, {
340
+ modalId: LAST_ACTIVE_MODAL_ID,
341
+ hasActiveModals: this.modalManager?.hasActiveModals
342
+ }, { debounce: !0 });
343
+ };
344
+ }
345
+ static {
346
+ this.styleAttrs = [...super.styleAttrs, "uc-modal"];
347
+ }
348
+ show() {
349
+ let g = this.dialogEl.value;
350
+ typeof g.showModal == "function" ? (this.setAttribute("aria-modal", "true"), g.showModal()) : g.setAttribute("open", ""), this.cfg.modalScrollLock && (document.body.style.overflow = "hidden");
351
+ }
352
+ hide() {
353
+ let g = this.dialogEl.value;
354
+ g && (typeof g.close == "function" ? (this.setAttribute("aria-modal", "false"), g.close()) : g.removeAttribute("open"));
355
+ }
356
+ initCallback() {
357
+ super.initCallback(), this.modalManager?.registerModal(this.id, this), this.subConfigValue("modalBackdropStrokes", (g) => {
358
+ g ? this.setAttribute("strokes", "") : this.removeAttribute("strokes");
359
+ }), this.modalManager?.subscribe(ModalEvents.OPEN, this._handleModalOpen), this.modalManager?.subscribe(ModalEvents.CLOSE, this._handleModalClose), this.modalManager?.subscribe(ModalEvents.CLOSE_ALL, this._handleModalCloseAll);
360
+ }
361
+ disconnectedCallback() {
362
+ super.disconnectedCallback(), document.body.style.overflow = "", this._mouseDownTarget = void 0, this.modalManager?.unsubscribe(ModalEvents.OPEN, this._handleModalOpen), this.modalManager?.unsubscribe(ModalEvents.CLOSE, this._handleModalClose), this.modalManager?.unsubscribe(ModalEvents.CLOSE_ALL, this._handleModalCloseAll);
363
+ }
364
+ _handleDialogRef(g) {
365
+ this.dialogEl = { value: g }, this.dialogEl.value?.addEventListener("close", this._handleDialogClose), this.dialogEl.value?.addEventListener("mousedown", this._handleDialogMouseDown), this.dialogEl.value?.addEventListener("mouseup", this._handleDialogMouseUp);
366
+ }
367
+ render() {
368
+ return b`
369
+ <dialog ${n$1(this._handleDialogRef)}>
370
+ ${this.yield("")}
371
+ </dialog>
372
+ `;
373
+ }
374
+ };
375
+ __decorate([n({
376
+ type: Boolean,
377
+ noAccessor: !0
378
+ })], Modal.prototype, "strokes", void 0), __decorate([n({
379
+ type: Boolean,
380
+ attribute: "block-body-scrolling",
381
+ noAccessor: !0
382
+ })], Modal.prototype, "blockBodyScrolling", void 0);
383
+ var FormInput = class extends LitUploaderBlock {
384
+ constructor(...g) {
385
+ super(...g), this._validationInputElement = null, this._dynamicInputsContainer = null;
386
+ }
387
+ get _inputName() {
388
+ return this.nameAttrValue ?? this.ctxName;
389
+ }
390
+ _createValidationInput() {
391
+ let g = document.createElement("input");
392
+ return g.type = "text", g.name = this._inputName, g.required = this.cfg.multipleMin > 0, g.tabIndex = -1, applyStyles(g, {
393
+ opacity: 0,
394
+ height: 0,
395
+ width: 0
396
+ }), g;
397
+ }
398
+ initCallback() {
399
+ super.initCallback(), this._validationInputElement = this._createValidationInput(), this.appendChild(this._validationInputElement), this.sub("*collectionState", (g) => {
400
+ if (!g) return;
401
+ if (!this._dynamicInputsContainer) {
402
+ let g = document.createElement("div");
403
+ this.appendChild(g), this._dynamicInputsContainer = g;
404
+ }
405
+ if (!this._validationInputElement) {
406
+ let g = this._createValidationInput();
407
+ this.appendChild(g), this._validationInputElement = g;
408
+ }
409
+ if (this._dynamicInputsContainer.innerHTML = "", g.status === "uploading" || g.status === "idle") {
410
+ this._validationInputElement.value = "", this._validationInputElement.setCustomValidity("");
411
+ return;
412
+ }
413
+ if (g.status === "failed") {
414
+ let B = g.errors[0]?.message;
415
+ this._validationInputElement.value = "", this._validationInputElement.setCustomValidity(B ?? "");
416
+ return;
417
+ }
418
+ let B = g.group ? g.group : null;
419
+ if (B) {
420
+ this._validationInputElement.value = B.cdnUrl ?? "", this._validationInputElement.setCustomValidity("");
421
+ return;
422
+ }
423
+ let V = g.allEntries.map((g) => g.cdnUrl).filter((g) => typeof g == "string");
424
+ if (!this.cfg.multiple && V.length === 1 && V[0]) {
425
+ this._validationInputElement.value = V[0], this._validationInputElement.setCustomValidity("");
426
+ return;
427
+ }
428
+ this._validationInputElement.remove(), this._validationInputElement = null;
429
+ let H = new DocumentFragment();
430
+ for (let g of V) {
431
+ let B = document.createElement("input");
432
+ B.type = "hidden", B.name = `${this._inputName}[]`, B.value = g, H.appendChild(B);
433
+ }
434
+ this._dynamicInputsContainer.replaceChildren(H);
435
+ }, !1);
436
+ }
437
+ };
438
+ __decorate([n({
439
+ type: String,
440
+ noAccessor: !0,
441
+ attribute: "name"
442
+ })], FormInput.prototype, "nameAttrValue", void 0);
443
+ var Copyright = class extends LitBlock {
444
+ initCallback() {
445
+ super.initCallback(), this.subConfigValue("removeCopyright", (g) => {
446
+ this.toggleAttribute("hidden", !!g);
447
+ });
448
+ }
449
+ render() {
450
+ return b`
451
+ <a
452
+ href="https://uploadcare.com/?utm_source=copyright&amp;utm_medium=referral&amp;utm_campaign=v4"
453
+ target="_blank noopener"
454
+ class="uc-credits"
455
+ >Powered by Uploadcare</a
456
+ >
457
+ `;
458
+ }
459
+ }, ProgressBar = class extends LitBlock {
460
+ constructor(...g) {
461
+ super(...g), this.hasFileName = !1, this.value = 0, this.visible = !0, this._progressValue = 0, this._fakeProgressLineRef = e(), this._handleFakeProgressAnimation = () => {
462
+ let g = this._fakeProgressLineRef.value;
463
+ if (g) {
464
+ if (!this.visible) {
465
+ g.classList.add("uc-fake-progress--hidden");
466
+ return;
467
+ }
468
+ this._progressValue > 0 && g.classList.add("uc-fake-progress--hidden");
469
+ }
470
+ };
471
+ }
472
+ firstUpdated(g) {
473
+ super.firstUpdated(g), this._progressValue = this._normalizeProgressValue(this.value), this._updateProgressValueStyle(), this._fakeProgressLineRef.value?.addEventListener("animationiteration", this._handleFakeProgressAnimation);
474
+ }
475
+ updated(g) {
476
+ if (super.updated(g), g.has("value")) {
477
+ let g = this._normalizeProgressValue(this.value);
478
+ if (!this.visible) this._progressValue = g;
479
+ else {
480
+ let B = Math.max(this._progressValue, g);
481
+ B !== this._progressValue && (this._progressValue = B, this._updateProgressValueStyle());
482
+ }
483
+ }
484
+ g.has("visible") && (this.classList.toggle("uc-progress-bar--hidden", !this.visible), this.visible ? this._updateProgressValueStyle() : this._progressValue = this._normalizeProgressValue(this.value));
485
+ }
486
+ disconnectedCallback() {
487
+ super.disconnectedCallback(), this._fakeProgressLineRef.value?.removeEventListener("animationiteration", this._handleFakeProgressAnimation);
488
+ }
489
+ _normalizeProgressValue(g) {
490
+ return Number.isFinite(g) ? Math.min(100, Math.max(0, g)) : 0;
491
+ }
492
+ _updateProgressValueStyle() {
493
+ this.visible && this.style.setProperty("--l-progress-value", this._progressValue.toString());
494
+ }
495
+ render() {
496
+ return b`
497
+ <div ${n$1(this._fakeProgressLineRef)} class="uc-fake-progress"></div>
498
+ <div class="uc-progress"></div>
499
+ `;
500
+ }
501
+ };
502
+ __decorate([n({
503
+ type: Boolean,
504
+ noAccessor: !0
505
+ })], ProgressBar.prototype, "hasFileName", void 0), __decorate([n({ type: Number })], ProgressBar.prototype, "value", void 0), __decorate([n({
506
+ type: Boolean,
507
+ reflect: !0
508
+ })], ProgressBar.prototype, "visible", void 0);
509
+ var ProgressBarCommon = class extends LitUploaderBlock {
510
+ constructor() {
511
+ super(), this._visible = !1, this._value = 0, this.init$ = {
512
+ ...this.init$,
513
+ "*commonProgress": 0
514
+ };
515
+ }
516
+ initCallback() {
517
+ super.initCallback(), this._unobserveCollectionCb = this.uploadCollection.observeProperties(() => {
518
+ this._visible = this.uploadCollection.items().some((g) => this.uploadCollection.read(g)?.getValue("isUploading") ?? !1);
519
+ }), this.sub("*commonProgress", (g) => {
520
+ this._value = g;
521
+ });
522
+ }
523
+ updated(g) {
524
+ super.updated(g), g.has("visible") && (this._visible ? this.setAttribute("active", "") : this.removeAttribute("active"));
525
+ }
526
+ disconnectedCallback() {
527
+ super.disconnectedCallback(), this._unobserveCollectionCb?.(), this._unobserveCollectionCb = void 0;
528
+ }
529
+ render() {
530
+ return b` <uc-progress-bar .value=${this._value} .visible=${this._visible}></uc-progress-bar> `;
531
+ }
532
+ };
533
+ __decorate([r()], ProgressBarCommon.prototype, "_visible", void 0), __decorate([r()], ProgressBarCommon.prototype, "_value", void 0);
534
+ var SourceBtn = class extends LitUploaderBlock {
535
+ constructor(...g) {
536
+ super(...g), this.couldBeCtxOwner = !0, this._iconName = "default", this._srcTypeKey = "";
537
+ }
538
+ willUpdate(g) {
539
+ super.willUpdate(g), g.has("source") && this._applySource(this.source);
540
+ }
541
+ _applySource(g) {
542
+ if (!g) {
543
+ this._srcTypeKey = "", this._iconName = "default";
544
+ return;
545
+ }
546
+ let { label: B, icon: V, id: H } = g;
547
+ this._srcTypeKey = B, this._iconName = V ?? H ?? "default";
548
+ }
549
+ activate() {
550
+ this.source && this.source.onClick();
551
+ }
552
+ render() {
553
+ return b`
554
+ <button type="button" @click=${this.activate}>
555
+ <uc-icon name=${this._iconName}></uc-icon>
556
+ <div class="uc-txt">${this.l10n(this._srcTypeKey)}</div>
557
+ </button>
558
+ `;
559
+ }
560
+ };
561
+ __decorate([n({ attribute: !1 })], SourceBtn.prototype, "source", void 0), __decorate([r()], SourceBtn.prototype, "_iconName", void 0), __decorate([r()], SourceBtn.prototype, "_srcTypeKey", void 0);
562
+ var SourceList = class extends LitUploaderBlock {
563
+ constructor(...g) {
564
+ super(...g), this._rawSourceList = [], this._sources = [], this.wrap = !1;
565
+ }
566
+ initCallback() {
567
+ super.initCallback(), this.subConfigValue("sourceList", (g) => {
568
+ this._rawSourceList = stringToArray(g), this._updateSources();
569
+ });
570
+ let g = this._sharedInstancesBag.pluginManager;
571
+ g?.onPluginsChange && (this._unsubscribePlugins = g.onPluginsChange(() => this._updateSources()));
572
+ }
573
+ updated(g) {
574
+ super.updated(g), this.cfg.sourceListWrap ? this.style.removeProperty("display") : this.style.display = "contents";
575
+ }
576
+ _updateSources() {
577
+ let g = this._sharedInstancesBag.pluginManager?.snapshot().sources ?? [], B = new Map(g.map((g) => [g.id, g])), V = [];
578
+ this._rawSourceList.forEach((g) => {
579
+ let H = this._expandSource(g, B);
580
+ if (H.length !== 1 || H[0] !== g) {
581
+ for (let g of H) {
582
+ let H = this._makeBuiltInSourceConfig(g);
583
+ if (H) {
584
+ V.push(H);
585
+ continue;
586
+ }
587
+ let U = B.get(g);
588
+ U && V.push(this._makePluginSourceConfig(U));
589
+ }
590
+ return;
591
+ }
592
+ let U = this._makeBuiltInSourceConfig(g);
593
+ if (U) {
594
+ V.push(U);
595
+ return;
596
+ }
597
+ let W = B.get(g);
598
+ W && V.push(this._makePluginSourceConfig(W));
599
+ }), this._sources = V;
600
+ }
601
+ _expandSource(g, B) {
602
+ let V = B.get(g);
603
+ return V?.expand ? V.expand() : [g];
604
+ }
605
+ _makeBuiltInSourceConfig(g) {
606
+ switch (g) {
607
+ case UploadSource.LOCAL: return {
608
+ id: g,
609
+ label: `src-type-${g}`,
610
+ icon: g,
611
+ onClick: () => this.api.openSystemDialog()
612
+ };
613
+ default: break;
614
+ }
615
+ return null;
616
+ }
617
+ _makePluginSourceConfig(g) {
618
+ return {
619
+ id: g.id,
620
+ label: g.label,
621
+ icon: g.icon,
622
+ onClick: () => g.onSelect()
623
+ };
624
+ }
625
+ render() {
626
+ return b`${this._sources.map((g) => b`<uc-source-btn role="listitem" .source=${g} data-source-id=${g.id}></uc-source-btn>`)}`;
627
+ }
628
+ disconnectedCallback() {
629
+ this._unsubscribePlugins?.(), this._unsubscribePlugins = void 0, super.disconnectedCallback();
630
+ }
631
+ };
632
+ __decorate([r()], SourceList.prototype, "_sources", void 0), __decorate([n({
633
+ type: Boolean,
634
+ attribute: "wrap",
635
+ noAccessor: !0
636
+ })], SourceList.prototype, "wrap", void 0);
637
+ function generateThumb(g, B = 40) {
638
+ if (g.type === "image/svg+xml") return URL.createObjectURL(g);
639
+ let V = document.createElement("canvas"), H = V.getContext("2d");
640
+ if (!H) return Promise.reject(/* @__PURE__ */ Error("Canvas context not supported"));
641
+ let U = new Image(), W = new Promise((g, W) => {
642
+ U.onload = () => {
643
+ let G = U.height / U.width;
644
+ G > 1 ? (V.width = B, V.height = B * G) : (V.height = B, V.width = B / G), H.fillStyle = "rgb(240, 240, 240)", H.fillRect(0, 0, V.width, V.height), H.drawImage(U, 0, 0, V.width, V.height), V.toBlob((B) => {
645
+ if (!B) {
646
+ W();
647
+ return;
648
+ }
649
+ g(URL.createObjectURL(B));
650
+ });
651
+ }, U.onerror = (g) => {
652
+ W(g);
653
+ };
654
+ });
655
+ return U.src = URL.createObjectURL(g), W;
656
+ }
657
+ var FileItemConfig = class extends LitUploaderBlock {
658
+ constructor(...g) {
659
+ super(...g), this._entrySubs = /* @__PURE__ */ new Set(), this.entry = null;
660
+ }
661
+ withEntry(g) {
662
+ return (...B) => {
663
+ let V = this.entry;
664
+ if (!V) {
665
+ console.warn("No entry found");
666
+ return;
667
+ }
668
+ return g(V, ...B);
669
+ };
670
+ }
671
+ subEntry(g, B) {
672
+ this.withEntry((g, B, V) => {
673
+ let H = g.subscribe(B, (g) => {
674
+ this.isConnected && V(g);
675
+ });
676
+ this._entrySubs.add(H);
677
+ })(g, B);
678
+ }
679
+ reset() {
680
+ for (let g of this._entrySubs) g();
681
+ this._entrySubs = /* @__PURE__ */ new Set(), this.entry = null;
682
+ }
683
+ disconnectedCallback() {
684
+ super.disconnectedCallback(), this._entrySubs = /* @__PURE__ */ new Set();
685
+ }
686
+ };
687
+ function createSvgBlobUrl(g) {
688
+ let B = new Blob([g], { type: "image/svg+xml" });
689
+ return URL.createObjectURL(B);
690
+ }
691
+ function fileCssBg(g = "hsl(209, 21%, 65%)", B = 32, V = 32) {
692
+ return createSvgBlobUrl(`
693
+ <svg width="${B}" height="${V}" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
694
+ <path fill-rule="evenodd" fill="${g}" d="M9.68848 8.70068C9.68848 8.42454 9.91233 8.20068 10.1885 8.20068H15.0885C15.2211 8.20068 15.3483 8.25336 15.442 8.34713L20.342 13.2471C20.4358 13.3409 20.4885 13.4681 20.4885 13.6007V21.3007C20.4885 21.5768 20.2646 21.8007 19.9885 21.8007H10.1885C9.91233 21.8007 9.68848 21.5768 9.68848 21.3007V8.70068ZM10.6885 9.20068V20.8007H19.4885V14.1007L15.0885 14.1007C14.8123 14.1007 14.5885 13.8768 14.5885 13.6007L14.5885 9.20068H10.6885ZM15.5885 9.90779L18.7814 13.1007L15.5885 13.1007L15.5885 9.90779Z"/>
695
+ </svg>
696
+ `);
697
+ }
698
+ var CDN_MAX_OUTPUT_DIMENSION = 3e3, Thumb = class extends FileItemConfig {
699
+ constructor(...g) {
700
+ super(...g), this.badgeIcon = "", this.uid = "", this._thumbUrl = "", this._renderedGridOnce = !1, this._thumbRect = null, this._isIntersecting = !1, this._firstViewMode = this.cfg.filesViewMode, this._generateThumbnail = this.withEntry(async (g, B = !1) => {
701
+ let V = g.getValue("fileInfo"), H = g.getValue("isImage"), W = g.getValue("uuid"), G = g.getValue("thumbUrl"), K = this._calculateThumbSize(B);
702
+ if (V && H && W) {
703
+ let B = await this.proxyUrl(createCdnUrl(createOriginalUrl(this.cfg.cdnCname, W), createCdnUrlModifiers(g.getValue("cdnUrlModifiers"), "stretch/off", `scale_crop/${K}x${K}/center`)));
704
+ if (G === B) return;
705
+ let { promise: V } = preloadImage(B);
706
+ V.then(() => {
707
+ g.setValue("thumbUrl", B), G?.startsWith("blob:") && URL.revokeObjectURL(G);
708
+ }).catch(async () => {
709
+ if (!G?.startsWith("blob:")) try {
710
+ let B = g.getValue("file");
711
+ if (!B) return;
712
+ let V = await generateThumb(B, K);
713
+ g.setValue("thumbUrl", V);
714
+ } catch (B) {
715
+ this.telemetryManager.sendEventError(B, "thumbnail generation. Failed to generate thumb from file");
716
+ let V = window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");
717
+ g.setValue("thumbUrl", fileCssBg(V));
718
+ }
719
+ });
720
+ return;
721
+ }
722
+ if (g.getValue("thumbUrl")) return;
723
+ let q = g.getValue("file");
724
+ if (q?.type.includes("image")) try {
725
+ let B = await generateThumb(q, K);
726
+ g.setValue("thumbUrl", B);
727
+ } catch (B) {
728
+ this.telemetryManager.sendEventError(B, "thumbnail generation. Failed to generate thumb from file");
729
+ let V = window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");
730
+ g.setValue("thumbUrl", fileCssBg(V));
731
+ }
732
+ else {
733
+ let B = window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");
734
+ g.setValue("thumbUrl", fileCssBg(B));
735
+ }
736
+ }), this._debouncedGenerateThumb = debounce(this._generateThumbnail.bind(this), 100);
737
+ }
738
+ _calculateThumbSize(g = !1) {
739
+ g && (this._thumbRect = this.getBoundingClientRect());
740
+ let B = Math.max(parseInt(String(this?._thumbRect?.height || 0), 10), parseInt(String(this?._thumbRect?.width || 0), 10), this.cfg.thumbSize);
741
+ return window.devicePixelRatio > 1 && (B *= window.devicePixelRatio), Math.min(B, CDN_MAX_OUTPUT_DIMENSION);
742
+ }
743
+ _decodeImage(g, B) {
744
+ return new Promise((V, H) => {
745
+ let U = new Image();
746
+ U.decoding = "async";
747
+ let W = () => {
748
+ U &&= (U.onload = null, U.onerror = null, U.src = TRANSPARENT_PIXEL_SRC, B?.removeEventListener("abort", G), null);
749
+ }, G = () => {
750
+ W(), H(new DOMException("Aborted", "AbortError"));
751
+ };
752
+ if (B) {
753
+ if (B.aborted) {
754
+ G();
755
+ return;
756
+ }
757
+ B.addEventListener("abort", G, { once: !0 });
758
+ }
759
+ let K = () => {
760
+ W(), V();
761
+ }, q = (g) => {
762
+ W(), H(g);
763
+ };
764
+ if (typeof U.decode == "function") {
765
+ U.src = g, U.decode().then(K).catch(q);
766
+ return;
767
+ }
768
+ U.onload = K, U.onerror = q, U.src = g;
769
+ });
770
+ }
771
+ _cancelPendingThumbUpdate() {
772
+ this._pendingThumbUpdate?.cancel(), this._pendingThumbUpdate = void 0;
773
+ }
774
+ _scheduleThumbUpdate(g) {
775
+ if (this._cancelPendingThumbUpdate(), !g) {
776
+ this._thumbUrl &&= "";
777
+ return;
778
+ }
779
+ if (g === this._thumbUrl) return;
780
+ let B = new AbortController(), V = {
781
+ controller: B,
782
+ cancel: () => {
783
+ B.abort(), V.rafId !== void 0 && window.cancelAnimationFrame(V.rafId);
784
+ }
785
+ };
786
+ this._pendingThumbUpdate = V, this._decodeImage(g, B.signal).then(() => {
787
+ B.signal.aborted || (V.rafId = window.requestAnimationFrame(() => {
788
+ B.signal.aborted || (this._thumbUrl = g);
789
+ }));
790
+ }).catch((g) => {
791
+ B.signal.aborted || g instanceof DOMException && g.name === "AbortError" || console.warn("[Thumb] Failed to decode thumbnail image", g);
792
+ });
793
+ }
794
+ _requestThumbGeneration(g = !1) {
795
+ if (this.entry) {
796
+ if (g) {
797
+ this._generateThumbnail(!0);
798
+ return;
799
+ }
800
+ this._isIntersecting && this._debouncedGenerateThumb();
801
+ }
802
+ }
803
+ firstUpdated(g) {
804
+ super.firstUpdated(g), this._bindToEntry();
805
+ }
806
+ updated(g) {
807
+ super.updated(g), g.has("uid") && this._bindToEntry();
808
+ }
809
+ _observerCallback(g) {
810
+ let [B] = g;
811
+ B && (this._isIntersecting = B.isIntersecting, B.isIntersecting && (this._thumbRect = B.boundingClientRect, this._requestThumbGeneration(), this._observer?.disconnect()), B.intersectionRatio === 0 && this._debouncedGenerateThumb.cancel());
812
+ }
813
+ reset() {
814
+ super.reset(), this._debouncedGenerateThumb.cancel(), this._cancelPendingThumbUpdate(), this._thumbUrl &&= "";
815
+ }
816
+ _bindToEntry() {
817
+ let g = this.uid?.trim();
818
+ if (!g) {
819
+ this.entry && this.reset();
820
+ return;
821
+ }
822
+ let B = this.uploadCollection?.read(g);
823
+ if (!B || B === this.entry) return;
824
+ this.reset(), this.entry = B;
825
+ let V = () => {
826
+ this._requestThumbGeneration();
827
+ };
828
+ this.subEntry("fileInfo", (g) => {
829
+ g?.isImage && V();
830
+ }), this.subEntry("thumbUrl", (g) => {
831
+ this._scheduleThumbUpdate(g ?? void 0);
832
+ }), this.subEntry("cdnUrlModifiers", V), this._requestThumbGeneration(!0);
833
+ }
834
+ initCallback() {
835
+ super.initCallback(), this.subConfigValue("filesViewMode", (g) => {
836
+ g === "grid" && !this._renderedGridOnce && (this._firstViewMode === "list" && this._requestThumbGeneration(!0), this._renderedGridOnce = !0);
837
+ });
838
+ }
839
+ connectedCallback() {
840
+ super.connectedCallback(), this._observer?.disconnect(), this._observer = new window.IntersectionObserver(this._observerCallback.bind(this), { threshold: .1 }), this._observer.observe(this);
841
+ }
842
+ disconnectedCallback() {
843
+ super.disconnectedCallback(), this._debouncedGenerateThumb.cancel(), this._cancelPendingThumbUpdate(), this._observer?.disconnect();
844
+ }
845
+ render() {
846
+ return b`
847
+ <div class="uc-thumb">
848
+ <img
849
+ class="uc-thumb__img"
850
+ src=${this._thumbUrl || "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}
851
+ role="img"
852
+ alt="Preview of uploaded image"
853
+ ?hidden=${!this._thumbUrl}
854
+ draggable="false"
855
+ />
856
+ <div class="uc-badge">
857
+ <uc-icon name=${this.badgeIcon}></uc-icon>
858
+ </div>
859
+ </div>
860
+ `;
861
+ }
862
+ };
863
+ __decorate([n({ type: String })], Thumb.prototype, "badgeIcon", void 0), __decorate([n({ attribute: !1 })], Thumb.prototype, "uid", void 0), __decorate([r()], Thumb.prototype, "_thumbUrl", void 0);
864
+ var StartFrom = class extends LitActivityBlock {
865
+ constructor(...g) {
866
+ super(...g), this.historyTracked = !0, this.activityType = LitActivityBlock.activities.START_FROM;
867
+ }
868
+ initCallback() {
869
+ super.initCallback(), this.registerActivity(this.activityType ?? "");
870
+ }
871
+ render() {
872
+ return b` <div class="uc-content">${this.yield("")}</div> `;
873
+ }
874
+ }, UploadCtxProvider = class extends LitUploaderBlock {
875
+ constructor(...g) {
876
+ super(...g), this._unbindEventEmitter = null;
877
+ }
878
+ static {
879
+ this.styleAttrs = ["uc-wgt-common"];
880
+ }
881
+ static {
882
+ this.EventType = EventType;
883
+ }
884
+ initCallback() {
885
+ super.initCallback(), this._unbindEventEmitter = this.eventEmitter.bindTarget(this);
886
+ }
887
+ disconnectedCallback() {
888
+ super.disconnectedCallback(), this._unbindEventEmitter?.();
889
+ }
890
+ }, u$1 = (g, B, V) => {
891
+ let H = /* @__PURE__ */ new Map();
892
+ for (let U = B; U <= V; U++) H.set(g[U], U);
893
+ return H;
894
+ }, c = e$1(class extends i {
895
+ constructor(g) {
896
+ if (super(g), g.type !== t.CHILD) throw Error("repeat() can only be used in text expressions");
897
+ }
898
+ dt(g, B, V) {
899
+ let H;
900
+ V === void 0 ? V = B : B !== void 0 && (H = B);
901
+ let U = [], W = [], G = 0;
902
+ for (let B of g) U[G] = H ? H(B, G) : G, W[G] = V(B, G), G++;
903
+ return {
904
+ values: W,
905
+ keys: U
906
+ };
907
+ }
908
+ render(g, B, V) {
909
+ return this.dt(g, B, V).values;
910
+ }
911
+ update(g, [B, V, H]) {
912
+ let U = M(g), { values: W, keys: G } = this.dt(B, V, H);
913
+ if (!Array.isArray(U)) return this.ut = G, W;
914
+ let K = this.ut ??= [], q = [], J, Y, X = 0, Z = U.length - 1, Q = 0, $ = W.length - 1;
915
+ for (; X <= Z && Q <= $;) if (U[X] === null) X++;
916
+ else if (U[Z] === null) Z--;
917
+ else if (K[X] === G[Q]) q[Q] = u(U[X], W[Q]), X++, Q++;
918
+ else if (K[Z] === G[$]) q[$] = u(U[Z], W[$]), Z--, $--;
919
+ else if (K[X] === G[$]) q[$] = u(U[X], W[$]), v(g, q[$ + 1], U[X]), X++, $--;
920
+ else if (K[Z] === G[Q]) q[Q] = u(U[Z], W[Q]), v(g, U[X], U[Z]), Z--, Q++;
921
+ else if (J === void 0 && (J = u$1(G, Q, $), Y = u$1(K, X, Z)), J.has(K[X])) if (J.has(K[Z])) {
922
+ let B = Y.get(G[Q]), V = B === void 0 ? null : U[B];
923
+ if (V === null) {
924
+ let B = v(g, U[X]);
925
+ u(B, W[Q]), q[Q] = B;
926
+ } else q[Q] = u(V, W[Q]), v(g, U[X], V), U[B] = null;
927
+ Q++;
928
+ } else h(U[Z]), Z--;
929
+ else h(U[X]), X++;
930
+ for (; Q <= $;) {
931
+ let B = v(g, q[$ + 1]);
932
+ u(B, W[Q]), q[Q++] = B;
933
+ }
934
+ for (; X <= Z;) {
935
+ let g = U[X++];
936
+ g !== null && h(g);
937
+ }
938
+ return this.ut = G, p(g, q), E;
939
+ }
940
+ }), FileItemState = Object.freeze({
941
+ FINISHED: Symbol("FINISHED"),
942
+ FAILED: Symbol("FAILED"),
943
+ UPLOADING: Symbol("UPLOADING"),
944
+ VALIDATION: Symbol("VALIDATION"),
945
+ QUEUED_UPLOADING: Symbol("QUEUED-UPLOADING"),
946
+ QUEUED_VALIDATION: Symbol("QUEUED-VALIDATION"),
947
+ IDLE: Symbol("IDLE")
948
+ }), FileItem = class B extends FileItemConfig {
949
+ constructor(...B) {
950
+ super(...B), this.couldBeCtxOwner = !0, this._pauseRender = !0, this.uid = "", this._itemName = "", this._errorText = "", this._hint = "", this._progressValue = 0, this._progressVisible = !1, this._badgeIcon = "", this._isFinished = !1, this._isFailed = !1, this._isUploading = !1, this._isFocused = !1, this._showFileNames = !1, this._ariaLabelStatusFile = "", this._pluginFileActions = [], this._renderedOnce = !1, this._handleRemove = () => {
951
+ this.telemetryManager.sendEvent({ payload: { metadata: {
952
+ event: "remove-file",
953
+ node: this.tagName
954
+ } } }), this.uid && this.uploadCollection.hasItem(this.uid) && this.uploadCollection.remove(this.uid);
955
+ }, this._handleUploadClick = () => {
956
+ this._upload();
957
+ }, this._debouncedCalculateState = debounce(() => this._calculateState(), 100), this._updateHintAndProgress = this.withEntry(throttle((g, B) => {
958
+ let V = g.getValue("errors")?.[0]?.message ?? "", H = g.getValue("source"), U = g.getValue("externalUrl"), W = B === FileItemState.FINISHED, G = B === FileItemState.UPLOADING, K = B === FileItemState.QUEUED_UPLOADING, q = B === FileItemState.QUEUED_VALIDATION, J = B === FileItemState.VALIDATION, Y = g.getValue("fileName"), X = "";
959
+ V ? X = "" : !W && U && H && Object.values(ExternalUploadSource).includes(H) && (X = this.l10n("waiting-for", { source: this.l10n(`src-type-${H}`) })), this._hint = X, this._errorText = V, this._progressVisible = G || K || q || J, this._progressValue = q || J ? 0 : g.getValue("uploadProgress"), this._ariaLabelStatusFile = Y ? this.l10n("a11y-file-item-status", {
960
+ fileName: Y,
961
+ status: this.l10n(B?.description?.toLocaleLowerCase() ?? "").toLocaleLowerCase()
962
+ }) : "";
963
+ }, 100)), this._upload = this.withEntry(async (B) => {
964
+ if (!this.uploadCollection.read(B.uid) || B.getValue("fileInfo") || B.getValue("isUploading") || B.getValue("errors").length > 0 || B.getValue("isValidationPending")) return;
965
+ let V = this.cfg.multiple ? this.cfg.multipleMax : 1;
966
+ if (!(V && this.uploadCollection.size > V)) {
967
+ B.setMultipleValues({
968
+ isUploading: !0,
969
+ errors: [],
970
+ isQueuedForUploading: !0
971
+ }), this._debouncedCalculateState();
972
+ try {
973
+ let g = new AbortController();
974
+ B.setValue("abortController", g);
975
+ let V = await this.$["*uploadQueue"].add(async () => {
976
+ B.setValue("isQueuedForUploading", !1);
977
+ let V = B.getValue("file");
978
+ if (V instanceof File || V instanceof Blob) {
979
+ let g = (this._sharedInstancesBag.pluginManager?.snapshot().fileHooks ?? []).filter((g) => g.type === "beforeUpload");
980
+ for (let H of g) try {
981
+ let { file: g, mimeType: U } = await H.handler({
982
+ file: V,
983
+ mimeType: B.getValue("mimeType")
984
+ });
985
+ V = g, U !== B.getValue("mimeType") && B.setValue("mimeType", U);
986
+ } catch (g) {
987
+ this.debugPrint(`File hook "beforeUpload" from plugin "${H.pluginId}" failed`, g);
988
+ }
989
+ }
990
+ let H = V || B.getValue("externalUrl") || B.getValue("uuid");
991
+ if (!H) throw Error("No file input");
992
+ let U = {
993
+ ...await this.getUploadClientOptions(),
994
+ fileName: B.getValue("fileName") ?? void 0,
995
+ source: B.getValue("source") ?? void 0,
996
+ onProgress: (g) => {
997
+ if (g.isComputable) {
998
+ let V = g.value * 100;
999
+ B.setValue("uploadProgress", V);
1000
+ }
1001
+ },
1002
+ signal: g.signal,
1003
+ metadata: await this.getMetadataFor(B.uid)
1004
+ };
1005
+ return this.debugPrint("upload options", H, U), uploadFile(H, U);
1006
+ });
1007
+ B.setMultipleValues({
1008
+ fileInfo: V,
1009
+ isQueuedForUploading: !1,
1010
+ isUploading: !1,
1011
+ fileName: V.originalFilename,
1012
+ fileSize: V.size,
1013
+ isImage: V.isImage ?? !1,
1014
+ mimeType: V.contentInfo?.mime?.mime ?? V.mimeType,
1015
+ uuid: V.uuid,
1016
+ cdnUrl: B.getValue("cdnUrl") ?? V.cdnUrl,
1017
+ cdnUrlModifiers: B.getValue("cdnUrlModifiers") ?? "",
1018
+ uploadProgress: 100,
1019
+ source: B.getValue("source") ?? null
1020
+ }), B === this.entry && this._debouncedCalculateState();
1021
+ } catch (V) {
1022
+ this.telemetryManager.sendEventError(V, "file upload. Failed to upload file"), V instanceof CancelError && V.isCancel ? B.setMultipleValues({
1023
+ isUploading: !1,
1024
+ uploadProgress: 0
1025
+ }) : V instanceof UploadcareError ? B.setMultipleValues({
1026
+ isUploading: !1,
1027
+ uploadProgress: 0,
1028
+ uploadError: V
1029
+ }) : (console.error("Unknown upload error", V), B.setMultipleValues({
1030
+ isUploading: !1,
1031
+ uploadProgress: 0,
1032
+ uploadError: Error("Something went wrong", { cause: V })
1033
+ })), B === this.entry && this._debouncedCalculateState();
1034
+ }
1035
+ }
1036
+ });
1037
+ }
1038
+ _calculateState() {
1039
+ let g = this.entry;
1040
+ if (!g) return;
1041
+ let B = FileItemState.IDLE;
1042
+ g.getValue("errors").length > 0 ? B = FileItemState.FAILED : g.getValue("isQueuedForUploading") ? B = FileItemState.QUEUED_UPLOADING : g.getValue("isQueuedForValidation") ? B = FileItemState.QUEUED_VALIDATION : g.getValue("isValidationPending") ? B = FileItemState.VALIDATION : g.getValue("isUploading") ? B = FileItemState.UPLOADING : g.getValue("fileInfo") && (B = FileItemState.FINISHED), this._handleState(g, B);
1043
+ }
1044
+ _handleState(g, B) {
1045
+ B === FileItemState.FAILED ? this._badgeIcon = "badge-error" : B === FileItemState.FINISHED && (this._badgeIcon = "badge-success"), B === FileItemState.UPLOADING && (this._isFocused = !1, this.removeAttribute("focused")), this._isFailed = B === FileItemState.FAILED, this._isUploading = B === FileItemState.UPLOADING, this._isFinished = B === FileItemState.FINISHED, this._updateHintAndProgress(B);
1046
+ }
1047
+ reset() {
1048
+ super.reset(), this._debouncedCalculateState.cancel();
1049
+ }
1050
+ _observerCallback(g) {
1051
+ let [B] = g;
1052
+ B && B.isIntersecting && !this._renderedOnce && (this._pauseRender = !1, this._renderedOnce = !0);
1053
+ }
1054
+ _handleEntryId(g) {
1055
+ this.reset();
1056
+ let B = this.uploadCollection?.read(g);
1057
+ if (this.entry = B, !B) {
1058
+ this._updatePluginFileActions();
1059
+ return;
1060
+ }
1061
+ this.subEntry("isQueuedForValidation", () => {
1062
+ this._debouncedCalculateState();
1063
+ }), this.subEntry("isValidationPending", () => {
1064
+ this._debouncedCalculateState();
1065
+ }), this.subEntry("uploadProgress", () => {
1066
+ this._debouncedCalculateState();
1067
+ }), this.subEntry("isQueuedForUploading", () => {
1068
+ this._debouncedCalculateState();
1069
+ }), this.subEntry("fileName", (g) => {
1070
+ this._itemName = g || B.getValue("externalUrl") || this.l10n("file-no-name"), this._debouncedCalculateState();
1071
+ }), this.subEntry("externalUrl", (g) => {
1072
+ this._itemName = B.getValue("fileName") || g || this.l10n("file-no-name");
1073
+ }), this.subEntry("fileInfo", () => {
1074
+ this._debouncedCalculateState();
1075
+ }), this.subEntry("errors", () => this._debouncedCalculateState()), this.subEntry("isUploading", () => this._debouncedCalculateState()), this.subEntry("fileSize", () => this._debouncedCalculateState()), this.subEntry("mimeType", () => this._debouncedCalculateState()), this.subEntry("isImage", () => this._debouncedCalculateState()), this.subEntry("fileInfo", () => this._updatePluginFileActions()), this.subEntry("isUploading", () => this._updatePluginFileActions()), this.subEntry("errors", () => this._updatePluginFileActions()), this._calculateState(), this._updatePluginFileActions(), this._applyOnAddHooks(B);
1076
+ }
1077
+ async _applyOnAddHooks(g) {
1078
+ let B = g.getValue("file");
1079
+ if (!B) return;
1080
+ let V = (this._sharedInstancesBag.pluginManager?.snapshot().fileHooks ?? []).filter((g) => g.type === "onAdd"), H = B, U = g.getValue("mimeType");
1081
+ for (let g of V) try {
1082
+ ({file: H, mimeType: U} = await g.handler({
1083
+ file: H,
1084
+ mimeType: U
1085
+ }));
1086
+ } catch (B) {
1087
+ this.debugPrint(`File hook "onAdd" from plugin "${g.pluginId}" failed`, B);
1088
+ }
1089
+ H !== B && (g.setValue("file", H), g.setValue("fileSize", H.size)), U !== g.getValue("mimeType") && g.setValue("mimeType", U);
1090
+ }
1091
+ _updateShowFileNames(g) {
1092
+ if (this.cfg.filesViewMode === "list") {
1093
+ this._showFileNames = !0;
1094
+ return;
1095
+ }
1096
+ this._showFileNames = g;
1097
+ }
1098
+ willUpdate(g) {
1099
+ super.willUpdate(g), g.has("uid") && this._handleEntryId(this.uid);
1100
+ }
1101
+ _updatePluginFileActions() {
1102
+ let g = this._sharedInstancesBag.pluginManager;
1103
+ if (!g || !this.uid) {
1104
+ this._pluginFileActions = [];
1105
+ return;
1106
+ }
1107
+ let B = g.snapshot().fileActions, V = this.api.getOutputItem(this.uid);
1108
+ if (!V) {
1109
+ this._pluginFileActions = [];
1110
+ return;
1111
+ }
1112
+ this._pluginFileActions = B.filter((g) => {
1113
+ try {
1114
+ return g.shouldRender(V);
1115
+ } catch (B) {
1116
+ return console.error(`Error in plugin file action shouldRender (${g.id}):`, B), !1;
1117
+ }
1118
+ });
1119
+ }
1120
+ _handlePluginFileAction(g) {
1121
+ if (!this.uid) return;
1122
+ let B = this.api.getOutputItem(this.uid);
1123
+ if (B) try {
1124
+ g.onClick(B);
1125
+ } catch (B) {
1126
+ console.error(`Error in plugin file action onClick (${g.id}):`, B);
1127
+ }
1128
+ }
1129
+ initCallback() {
1130
+ super.initCallback(), this._handleEntryId(this.uid), this.subConfigValue("filesViewMode", (g) => {
1131
+ this._updateShowFileNames(this.cfg.gridShowFileNames), this.setAttribute("mode", g);
1132
+ }), this.subConfigValue("gridShowFileNames", (g) => {
1133
+ this._updateShowFileNames(g);
1134
+ }), this.onclick = () => {
1135
+ B.activeInstances.forEach((g) => {
1136
+ g === this ? g.setAttribute("focused", "") : g.removeAttribute("focused");
1137
+ });
1138
+ }, this.sub("*uploadTrigger", (g) => {
1139
+ this.entry && !g.has(this.entry.uid) || setTimeout(() => this.isConnected && this._upload());
1140
+ });
1141
+ let g = this._sharedInstancesBag.pluginManager;
1142
+ g?.onPluginsChange && (this._unsubscribePlugins = g.onPluginsChange(() => this._updatePluginFileActions())), this._updatePluginFileActions(), B.activeInstances.add(this);
1143
+ }
1144
+ connectedCallback() {
1145
+ super.connectedCallback(), this._observer = new window.IntersectionObserver(this._observerCallback.bind(this), { threshold: [0, 1] }), this._observer.observe(this);
1146
+ }
1147
+ disconnectedCallback() {
1148
+ this._unsubscribePlugins?.(), this._unsubscribePlugins = void 0, super.disconnectedCallback(), this._observer?.disconnect(), B.activeInstances.delete(this), this.reset();
1149
+ }
1150
+ static {
1151
+ this.activeInstances = /* @__PURE__ */ new Set();
1152
+ }
1153
+ shouldUpdate(g) {
1154
+ return this._pauseRender ? !1 : super.shouldUpdate(g);
1155
+ }
1156
+ render() {
1157
+ return b`
1158
+ <div
1159
+ class="uc-inner"
1160
+ ?data-finished=${this._isFinished}
1161
+ ?data-uploading=${this._isUploading}
1162
+ ?data-failed=${this._isFailed}
1163
+ ?data-focused=${this._isFocused}
1164
+ >
1165
+ <uc-thumb .uid=${this.uid} .badgeIcon=${this._badgeIcon}></uc-thumb>
1166
+
1167
+ <div aria-atomic="true" aria-live="polite" class="uc-file-name-wrapper" aria-label=${this._ariaLabelStatusFile}>
1168
+ <span class="uc-file-name" ?hidden=${!this._showFileNames}>${this._itemName}</span>
1169
+ <span class="uc-file-error" ?hidden=${!this._errorText}>${this._errorText}</span>
1170
+ <span class="uc-file-hint" ?hidden=${!this._hint}>${this._hint}</span>
1171
+ </div>
1172
+ <div class="uc-file-actions">
1173
+ ${this._pluginFileActions.map((g) => b`
1174
+ <button
1175
+ type="button"
1176
+ @click=${() => this._handlePluginFileAction(g)}
1177
+ title=${g.id}
1178
+ aria-label=${g.id}
1179
+ class="uc-plugin-action-btn uc-mini-btn"
1180
+ data-plugin-action-id=${g.id}
1181
+ >
1182
+ <uc-icon name=${g.icon}></uc-icon>
1183
+ </button>
1184
+ `)}
1185
+ <button
1186
+ type="button"
1187
+ @click=${this._handleRemove}
1188
+ title=${this.l10n("file-item-remove-button")}
1189
+ aria-label=${this.l10n("file-item-remove-button")}
1190
+ class="uc-remove-btn uc-mini-btn"
1191
+ >
1192
+ <uc-icon name="remove-file"></uc-icon>
1193
+ </button>
1194
+ <button type="button" class="uc-upload-btn uc-mini-btn" @click=${this._handleUploadClick}>
1195
+ <uc-icon name="upload"></uc-icon>
1196
+ </button>
1197
+ </div>
1198
+ <uc-progress-bar class="uc-progress-bar" .value=${this._progressValue} .visible=${this._progressVisible} ?hasFileName=${this._showFileNames}>
1199
+ </uc-progress-bar>
1200
+ </div>
1201
+ `;
1202
+ }
1203
+ };
1204
+ __decorate([r()], FileItem.prototype, "_pauseRender", void 0), __decorate([n({ attribute: !1 })], FileItem.prototype, "uid", void 0), __decorate([r()], FileItem.prototype, "_itemName", void 0), __decorate([r()], FileItem.prototype, "_errorText", void 0), __decorate([r()], FileItem.prototype, "_hint", void 0), __decorate([r()], FileItem.prototype, "_progressValue", void 0), __decorate([r()], FileItem.prototype, "_progressVisible", void 0), __decorate([r()], FileItem.prototype, "_badgeIcon", void 0), __decorate([r()], FileItem.prototype, "_isFinished", void 0), __decorate([r()], FileItem.prototype, "_isFailed", void 0), __decorate([r()], FileItem.prototype, "_isUploading", void 0), __decorate([r()], FileItem.prototype, "_isFocused", void 0), __decorate([r()], FileItem.prototype, "_showFileNames", void 0), __decorate([r()], FileItem.prototype, "_ariaLabelStatusFile", void 0), __decorate([r()], FileItem.prototype, "_pluginFileActions", void 0);
1205
+ function checkIsDirectory(g) {
1206
+ return new Promise((B) => {
1207
+ typeof window.FileReader != "function" && B(!1);
1208
+ try {
1209
+ let V = new FileReader();
1210
+ V.onerror = () => {
1211
+ B(!0);
1212
+ };
1213
+ let H = (g) => {
1214
+ g.type !== "loadend" && V.abort(), B(!1);
1215
+ };
1216
+ V.onloadend = H, V.onprogress = H, V.readAsDataURL(g);
1217
+ } catch {
1218
+ B(!1);
1219
+ }
1220
+ });
1221
+ }
1222
+ function readEntryContentAsync(g, B) {
1223
+ return new Promise((V) => {
1224
+ let H = 0, U = [], W = (g) => {
1225
+ if (!g) {
1226
+ console.warn("Unexpectedly received empty content entry", { scope: "drag-and-drop" }), V(null);
1227
+ return;
1228
+ }
1229
+ g.isFile ? (H++, g.file((W) => {
1230
+ H--;
1231
+ let G = new File([W], W.name, { type: W.type || B });
1232
+ U.push({
1233
+ type: "file",
1234
+ file: G,
1235
+ fullPath: g.fullPath
1236
+ }), H === 0 && V(U);
1237
+ })) : g.isDirectory && G(g.createReader());
1238
+ }, G = (g) => {
1239
+ H++, g.readEntries((g) => {
1240
+ H--;
1241
+ for (let B of g) W(B);
1242
+ H === 0 && V(U);
1243
+ });
1244
+ };
1245
+ W(g);
1246
+ });
1247
+ }
1248
+ function getDropItems(g) {
1249
+ let B = [], V = [];
1250
+ for (let H = 0; H < g.items.length; H++) {
1251
+ let U = g.items[H];
1252
+ if (U) if (U.kind === "file") {
1253
+ let g = U.type, H = U;
1254
+ if (typeof H.webkitGetAsEntry == "function" || typeof H.getAsEntry == "function") {
1255
+ let U = typeof H.webkitGetAsEntry == "function" ? H.webkitGetAsEntry() : H.getAsEntry?.();
1256
+ U && V.push(readEntryContentAsync(U, g).then((g) => {
1257
+ g && B.push(...g);
1258
+ }));
1259
+ continue;
1260
+ }
1261
+ let W = U.getAsFile();
1262
+ W && V.push(checkIsDirectory(W).then((g) => {
1263
+ g || B.push({
1264
+ type: "file",
1265
+ file: W
1266
+ });
1267
+ }));
1268
+ } else U.kind === "string" && /^text\/uri-list/.test(U.type) && V.push(new Promise((g) => {
1269
+ U.getAsString((V) => {
1270
+ B.push({
1271
+ type: "url",
1272
+ url: V
1273
+ }), g();
1274
+ });
1275
+ }));
1276
+ }
1277
+ return Promise.all(V).then(() => B);
1278
+ }
1279
+ const DropzoneState = Object.freeze({
1280
+ ACTIVE: 0,
1281
+ INACTIVE: 1,
1282
+ NEAR: 2,
1283
+ OVER: 3
1284
+ });
1285
+ var RESET_EVENTS = ["focus"], NEAR_OFFSET = 100, nearnessRegistry = /* @__PURE__ */ new Map();
1286
+ function distance(g, B) {
1287
+ let V = Math.max(Math.min(g[0], B.x + B.width), B.x), H = Math.max(Math.min(g[1], B.y + B.height), B.y);
1288
+ return Math.sqrt((g[0] - V) * (g[0] - V) + (g[1] - H) * (g[1] - H));
1289
+ }
1290
+ function addDropzone(g) {
1291
+ let B = 0, V = document.body, H = /* @__PURE__ */ new Set(), U = (g) => {
1292
+ H.add(g);
1293
+ }, W = DropzoneState.INACTIVE, G = (B) => {
1294
+ g.shouldIgnore() && B !== DropzoneState.INACTIVE || (W !== B && H.forEach((g) => {
1295
+ g(B);
1296
+ }), W = B);
1297
+ }, K = () => B > 0;
1298
+ U((B) => g.onChange(B));
1299
+ let q = () => {
1300
+ B = 0, G(DropzoneState.INACTIVE);
1301
+ }, J = () => {
1302
+ B += 1, W === DropzoneState.INACTIVE && G(DropzoneState.ACTIVE);
1303
+ }, Y = () => {
1304
+ --B, K() || G(DropzoneState.INACTIVE);
1305
+ }, X = (g) => {
1306
+ g.preventDefault(), B = 0, G(DropzoneState.INACTIVE);
1307
+ }, Z = (V) => {
1308
+ if (g.shouldIgnore()) return;
1309
+ K() || (B += 1);
1310
+ let H = [V.x, V.y], U = g.element.getBoundingClientRect(), W = Math.floor(distance(H, U)), q = W < NEAR_OFFSET, J = V.composedPath().includes(g.element);
1311
+ nearnessRegistry.set(g.element, W);
1312
+ let Y = Math.min(...nearnessRegistry.values()) === W;
1313
+ J && Y ? (V.preventDefault(), G(DropzoneState.OVER)) : G(q && Y ? DropzoneState.NEAR : DropzoneState.ACTIVE);
1314
+ }, Q = async (B) => {
1315
+ if (g.shouldIgnore()) return;
1316
+ B.preventDefault();
1317
+ let { dataTransfer: V } = B;
1318
+ if (!V) return;
1319
+ let H = await getDropItems(V);
1320
+ g.onItems(H), G(DropzoneState.INACTIVE);
1321
+ };
1322
+ return V.addEventListener("drop", X), V.addEventListener("dragleave", Y), V.addEventListener("dragenter", J), V.addEventListener("dragover", Z), g.element.addEventListener("drop", Q), RESET_EVENTS.forEach((g) => {
1323
+ window.addEventListener(g, q);
1324
+ }), () => {
1325
+ nearnessRegistry.delete(g.element), V.removeEventListener("drop", X), V.removeEventListener("dragleave", Y), V.removeEventListener("dragenter", J), V.removeEventListener("dragover", Z), g.element.removeEventListener("drop", Q), RESET_EVENTS.forEach((g) => {
1326
+ window.removeEventListener(g, q);
1327
+ });
1328
+ };
1329
+ }
1330
+ var dropAreaRegistry = /* @__PURE__ */ new Set(), DropArea = class extends LitUploaderBlock {
1331
+ constructor(...g) {
1332
+ super(...g), this.single = !1, this.ghost = !1, this.disabled = !1, this.clickable = !1, this.withIcon = !1, this.fullscreen = !1, this.initflow = !1, this._isEnabled = !0, this._isVisible = !0, this._destroyDropzone = null, this._destroyContentWrapperDropzone = null, this._contentWrapperRef = e(), this._handleAreaInteraction = (g) => {
1333
+ if (g instanceof KeyboardEvent) {
1334
+ if (g.code !== "Space" && g.code !== "Enter") return;
1335
+ } else if (!(g instanceof MouseEvent)) return;
1336
+ if (this.initflow) {
1337
+ this.api.initFlow();
1338
+ return;
1339
+ }
1340
+ this.api.openSystemDialog();
1341
+ }, this._sourceListAllowsLocal = !0, this._clickableListenersAttached = !1;
1342
+ }
1343
+ static {
1344
+ this.styleAttrs = [...super.styleAttrs, "uc-drop-area"];
1345
+ }
1346
+ get _localizedText() {
1347
+ let g = this.text;
1348
+ return typeof g == "string" && g.length > 0 ? this.l10n(g) || g : this.l10n("drop-files-here");
1349
+ }
1350
+ isActive() {
1351
+ if (!this._isEnabled) return !1;
1352
+ let g = this.getBoundingClientRect(), B = g.width > 0 && g.height > 0, V = g.top >= 0 && g.left >= 0 && g.bottom <= (window.innerHeight || document.documentElement.clientHeight) && g.right <= (window.innerWidth || document.documentElement.clientWidth), H = window.getComputedStyle(this), U = H.visibility !== "hidden" && H.display !== "none";
1353
+ return B && U && V;
1354
+ }
1355
+ initCallback() {
1356
+ super.initCallback(), dropAreaRegistry.add(this), this._updateIsEnabled(), this._updateVisibility(), this._updateClickableListeners(), this._updateDragStateAttribute(DropzoneState.INACTIVE), this._destroyDropzone = addDropzone({
1357
+ element: this,
1358
+ shouldIgnore: () => this._shouldIgnore(),
1359
+ onChange: (g) => {
1360
+ this._updateDragStateAttribute(g);
1361
+ },
1362
+ onItems: (g) => {
1363
+ g.length && (g.forEach((g) => {
1364
+ g.type === "url" ? this.api.addFileFromUrl(g.url, { source: UploadSource.DROP_AREA }) : g.type === "file" && this.api.addFileFromObject(g.file, {
1365
+ source: UploadSource.DROP_AREA,
1366
+ fullPath: g.fullPath
1367
+ });
1368
+ }), this.uploadCollection.size && (this.set$({ "*currentActivity": LitActivityBlock.activities.UPLOAD_LIST }), this.modalManager?.open(LitActivityBlock.activities.UPLOAD_LIST)));
1369
+ }
1370
+ }), this.updateComplete.then(() => this._setupContentWrapperDropzone()), this.subConfigValue("sourceList", (g) => {
1371
+ this._sourceListAllowsLocal = stringToArray(g).includes(UploadSource.LOCAL), this._updateIsEnabled(), this._updateVisibility();
1372
+ });
1373
+ }
1374
+ willUpdate(g) {
1375
+ super.willUpdate(g), g.has("disabled") && (this._updateIsEnabled(), this._updateVisibility());
1376
+ }
1377
+ updated(g) {
1378
+ super.updated(g), g.has("clickable") && this._updateClickableListeners();
1379
+ }
1380
+ _shouldIgnore() {
1381
+ if (!this._isEnabled || !this._couldHandleFiles()) return !0;
1382
+ if (!this.fullscreen) return !1;
1383
+ let g = dropAreaRegistry;
1384
+ return g.size === 0 ? !1 : [...g].filter((g) => g !== this).filter((g) => g.isActive()).length > 0;
1385
+ }
1386
+ _couldHandleFiles() {
1387
+ let g = this.cfg.multiple, B = this.cfg.multipleMax, V = this.uploadCollection.size;
1388
+ return !(g && B && V >= B || !g && V > 0);
1389
+ }
1390
+ _updateIsEnabled() {
1391
+ this._isEnabled = this._sourceListAllowsLocal && !this.disabled;
1392
+ }
1393
+ _updateVisibility() {
1394
+ let g = this._isEnabled || !this.querySelector("[data-default-slot]");
1395
+ this._isVisible = g, this.hidden = !g;
1396
+ }
1397
+ _updateDragStateAttribute(g) {
1398
+ let B = Object.entries(DropzoneState).find(([, B]) => B === g)?.[0].toLowerCase();
1399
+ B && this.setAttribute("drag-state", B);
1400
+ }
1401
+ _setupContentWrapperDropzone() {
1402
+ if (this._destroyContentWrapperDropzone) return;
1403
+ let g = this._contentWrapperRef.value;
1404
+ g && (this._destroyContentWrapperDropzone = addDropzone({
1405
+ element: g,
1406
+ onChange: (B) => {
1407
+ let V = Object.entries(DropzoneState).find(([, g]) => g === B)?.[0].toLowerCase();
1408
+ V && g.setAttribute("drag-state", V);
1409
+ },
1410
+ onItems: () => {},
1411
+ shouldIgnore: () => this._shouldIgnore()
1412
+ }));
1413
+ }
1414
+ _updateClickableListeners() {
1415
+ this.clickable && !this._clickableListenersAttached ? (this.addEventListener("keydown", this._handleAreaInteraction), this.addEventListener("click", this._handleAreaInteraction), this._clickableListenersAttached = !0) : !this.clickable && this._clickableListenersAttached && (this.removeEventListener("keydown", this._handleAreaInteraction), this.removeEventListener("click", this._handleAreaInteraction), this._clickableListenersAttached = !1);
1416
+ }
1417
+ disconnectedCallback() {
1418
+ super.disconnectedCallback(), dropAreaRegistry.delete(this), this._destroyDropzone?.(), this._destroyContentWrapperDropzone?.(), this._clickableListenersAttached &&= (this.removeEventListener("keydown", this._handleAreaInteraction), this.removeEventListener("click", this._handleAreaInteraction), !1);
1419
+ }
1420
+ render() {
1421
+ return b`
1422
+ ${this.yield("", b`<div data-default-slot hidden></div>
1423
+ <div ${n$1(this._contentWrapperRef)} class="uc-content-wrapper" ?hidden=${!this._isVisible}>
1424
+ <div class="uc-icon-container" ?hidden=${!this.withIcon}>
1425
+ <uc-icon name="default"></uc-icon>
1426
+ <uc-icon name="arrow-down"></uc-icon>
1427
+ </div>
1428
+ <span class="uc-text">${this._localizedText}</span>
1429
+ </div>`)}
1430
+ `;
1431
+ }
1432
+ };
1433
+ __decorate([n({
1434
+ type: Boolean,
1435
+ noAccessor: !0
1436
+ })], DropArea.prototype, "single", void 0), __decorate([n({
1437
+ type: Boolean,
1438
+ noAccessor: !0
1439
+ })], DropArea.prototype, "ghost", void 0), __decorate([n({
1440
+ type: Boolean,
1441
+ reflect: !0
1442
+ })], DropArea.prototype, "disabled", void 0), __decorate([n({
1443
+ type: Boolean,
1444
+ reflect: !0
1445
+ })], DropArea.prototype, "clickable", void 0), __decorate([n({
1446
+ type: Boolean,
1447
+ attribute: "with-icon",
1448
+ reflect: !0
1449
+ })], DropArea.prototype, "withIcon", void 0), __decorate([n({
1450
+ type: Boolean,
1451
+ reflect: !0
1452
+ })], DropArea.prototype, "fullscreen", void 0), __decorate([n({
1453
+ type: Boolean,
1454
+ reflect: !0
1455
+ })], DropArea.prototype, "initflow", void 0), __decorate([n({ type: String })], DropArea.prototype, "text", void 0), __decorate([r()], DropArea.prototype, "_isEnabled", void 0), __decorate([r()], DropArea.prototype, "_isVisible", void 0);
1456
+ var UploadList = class extends LitUploaderBlock {
1457
+ constructor(...g) {
1458
+ super(...g), this.couldBeCtxOwner = !0, this.historyTracked = !0, this.activityType = LitActivityBlock.activities.UPLOAD_LIST, this._doneBtnVisible = !1, this._doneBtnEnabled = !1, this._uploadBtnVisible = !1, this._addMoreBtnVisible = !1, this._addMoreBtnEnabled = !1, this._commonErrorMessage = null, this._hasFiles = !1, this._latestSummary = null, this._handleAdd = () => {
1459
+ this.telemetryManager.sendEvent({
1460
+ eventType: InternalEventType.ACTION_EVENT,
1461
+ payload: { metadata: {
1462
+ event: "add-more",
1463
+ node: this.tagName
1464
+ } }
1465
+ }), this.api.initFlow(!0);
1466
+ }, this._handleUpload = () => {
1467
+ this.emit(EventType.UPLOAD_CLICK), this.api.uploadAll(), this._throttledHandleCollectionUpdate();
1468
+ }, this._handleDone = () => {
1469
+ this.emit(EventType.DONE_CLICK, this.api.getOutputCollectionState()), this.api.doneFlow();
1470
+ }, this._handleCancel = () => {
1471
+ this.telemetryManager.sendEvent({
1472
+ eventType: InternalEventType.ACTION_EVENT,
1473
+ payload: { metadata: {
1474
+ event: "clear-all",
1475
+ node: this.tagName
1476
+ } }
1477
+ }), this.uploadCollection.clearAll();
1478
+ }, this._throttledHandleCollectionUpdate = throttle(() => {
1479
+ this.isConnected && (this._updateUploadsState(), !this.couldOpenActivity && this.$["*currentActivity"] === this.activityType && this.historyBack(), this.cfg.confirmUpload || this.api.uploadAll());
1480
+ }, 300);
1481
+ }
1482
+ get _headerText() {
1483
+ return this._latestSummary ? this._getHeaderText(this._latestSummary) : "";
1484
+ }
1485
+ _updateUploadsState() {
1486
+ let g = this.api.getOutputCollectionState(), B = {
1487
+ total: g.totalCount,
1488
+ succeed: g.successCount,
1489
+ uploading: g.uploadingCount,
1490
+ failed: g.failedCount,
1491
+ validatingBeforeUploading: g.idleEntries.filter((g) => g.isValidationPending).length
1492
+ }, V = !g.errors.some((g) => g.type === "TOO_MANY_FILES" || g.type === "TOO_FEW_FILES"), H = g.errors.some((g) => g.type === "TOO_MANY_FILES"), U = g.totalCount === (this.cfg.multiple ? this.cfg.multipleMax : 1), W = g.allEntries.some((g) => g.isValidationPending), G = B.failed === 0 && g.errors.length === 0 && !W, K = !1, q = !1, J = !1;
1493
+ if (B.total - B.succeed - B.uploading - B.failed > 0 && V && G && this.cfg.confirmUpload) K = !0;
1494
+ else {
1495
+ q = !0;
1496
+ let H = this.cfg.groupOutput ? !!g.group : !0;
1497
+ J = B.total === B.succeed && V && G && H;
1498
+ }
1499
+ this._doneBtnVisible = q, this._doneBtnEnabled = J, this._uploadBtnVisible = K, this._addMoreBtnEnabled = B.total === 0 || !H && !U, this._addMoreBtnVisible = !U || this.cfg.multiple, this._hasFiles = B.total > 0, this._latestSummary = B;
1500
+ }
1501
+ _getHeaderText(g) {
1502
+ let B = (B) => {
1503
+ let V = g[B];
1504
+ return B === "uploading" && (V += g.validatingBeforeUploading), this.l10n(`header-${B}`, { count: V });
1505
+ };
1506
+ return g.uploading > 0 || g.validatingBeforeUploading > 0 ? B("uploading") : g.failed > 0 ? B("failed") : g.succeed > 0 ? B("succeed") : B("total");
1507
+ }
1508
+ get couldOpenActivity() {
1509
+ return this.cfg.showEmptyList || this.uploadCollection.size > 0;
1510
+ }
1511
+ initCallback() {
1512
+ super.initCallback(), this.registerActivity(this.activityType), this.subConfigValue("multiple", this._throttledHandleCollectionUpdate), this.subConfigValue("multipleMin", this._throttledHandleCollectionUpdate), this.subConfigValue("multipleMax", this._throttledHandleCollectionUpdate), this.sub("*groupInfo", (g) => {
1513
+ g && this._throttledHandleCollectionUpdate();
1514
+ }), this.subConfigValue("filesViewMode", (g) => {
1515
+ this.setAttribute("mode", g);
1516
+ }), this.sub("*currentActivity", (g) => {
1517
+ !this.couldOpenActivity && g === this.activityType && (this.$["*currentActivity"] = this.initActivity);
1518
+ }), this.uploadCollection.observeProperties(this._throttledHandleCollectionUpdate), this.uploadCollection.observeCollection(this._throttledHandleCollectionUpdate), this.sub("*collectionErrors", (g) => {
1519
+ let B = g.filter((g) => g.type !== "SOME_FILES_HAS_ERRORS")[0];
1520
+ if (!B) {
1521
+ this._commonErrorMessage = null;
1522
+ return;
1523
+ }
1524
+ this._commonErrorMessage = B.message;
1525
+ });
1526
+ }
1527
+ disconnectedCallback() {
1528
+ super.disconnectedCallback(), this.has("*uploadCollection") && (this.uploadCollection.unobserveProperties(this._throttledHandleCollectionUpdate), this.uploadCollection.unobserveCollection(this._throttledHandleCollectionUpdate));
1529
+ }
1530
+ render() {
1531
+ return b`
1532
+ <uc-activity-header>
1533
+ <span aria-live="polite" class="uc-header-text">${this._headerText}</span>
1534
+ <button
1535
+ type="button"
1536
+ class="uc-mini-btn uc-close-btn"
1537
+ @click=${this.$["*closeModal"]}
1538
+ title=${this.l10n("a11y-activity-header-button-close")}
1539
+ aria-label=${this.l10n("a11y-activity-header-button-close")}
1540
+ >
1541
+ <uc-icon name="close"></uc-icon>
1542
+ </button>
1543
+ </uc-activity-header>
1544
+
1545
+ <div class="uc-no-files" ?hidden=${this._hasFiles}>
1546
+ ${this.yield("empty", b`<span>${this.l10n("no-files")}</span>`)}
1547
+ </div>
1548
+
1549
+ <div class="uc-files">
1550
+ <div class="uc-files-wrapper">
1551
+ ${c(this.$["*uploadList"] ?? [], ({ uid: g }) => g, ({ uid: g }) => b`<uc-file-item .uid=${g}></uc-file-item>`)}
1552
+ </div>
1553
+ <button
1554
+ type="button"
1555
+ class="uc-add-more-btn uc-secondary-btn"
1556
+ @click=${this._handleAdd}
1557
+ ?disabled=${!this._addMoreBtnEnabled}
1558
+ ?hidden=${!this._addMoreBtnVisible}
1559
+ >
1560
+ <uc-icon name="add"></uc-icon><span>${this.l10n("add-more")}</span>
1561
+ </button>
1562
+ </div>
1563
+
1564
+ <div class="uc-common-error"
1565
+ ?hidden=${!this._commonErrorMessage}
1566
+ >
1567
+ ${this._commonErrorMessage ?? ""}
1568
+ </div>
1569
+
1570
+ <div class="uc-toolbar">
1571
+ <button type="button" class="uc-cancel-btn uc-secondary-btn" @click=${this._handleCancel}>${this.l10n("clear")}</button>
1572
+ <div class="uc-toolbar-spacer"></div>
1573
+ <button
1574
+ type="button"
1575
+ class="uc-add-more-btn uc-secondary-btn"
1576
+ ?hidden=${!this._addMoreBtnVisible}
1577
+ ?disabled=${!this._addMoreBtnEnabled}
1578
+ @click=${this._handleAdd}
1579
+ >
1580
+ <uc-icon name="add"></uc-icon><span>${this.l10n("add-more")}</span>
1581
+ </button>
1582
+ <button
1583
+ type="button"
1584
+ class="uc-upload-btn uc-primary-btn"
1585
+ ?hidden=${!this._uploadBtnVisible}
1586
+ @click=${this._handleUpload}
1587
+ >${this.l10n("upload")}</button>
1588
+ <button
1589
+ type="button"
1590
+ class="uc-done-btn uc-primary-btn"
1591
+ ?hidden=${!this._doneBtnVisible}
1592
+ ?disabled=${!this._doneBtnEnabled}
1593
+ @click=${this._handleDone}
1594
+ >
1595
+ ${this.l10n("done")}
1596
+ </button>
1597
+ </div>
1598
+
1599
+ <uc-drop-area ghost></uc-drop-area>
1600
+ `;
1601
+ }
1602
+ };
1603
+ __decorate([r()], UploadList.prototype, "_doneBtnVisible", void 0), __decorate([r()], UploadList.prototype, "_doneBtnEnabled", void 0), __decorate([r()], UploadList.prototype, "_uploadBtnVisible", void 0), __decorate([r()], UploadList.prototype, "_addMoreBtnVisible", void 0), __decorate([r()], UploadList.prototype, "_addMoreBtnEnabled", void 0), __decorate([r()], UploadList.prototype, "_commonErrorMessage", void 0), __decorate([r()], UploadList.prototype, "_hasFiles", void 0), __decorate([r()], UploadList.prototype, "_latestSummary", void 0);
1604
+ var SimpleBtn = class extends LitUploaderBlock {
1605
+ constructor(...g) {
1606
+ super(...g), this.couldBeCtxOwner = !0, this.dropzone = !0, this._buttonTextKey = "upload-file", this._handleClick = () => {
1607
+ this.api.initFlow();
1608
+ };
1609
+ }
1610
+ static {
1611
+ this.styleAttrs = [...super.styleAttrs, "uc-simple-btn"];
1612
+ }
1613
+ initCallback() {
1614
+ super.initCallback(), this.subConfigValue("multiple", (g) => {
1615
+ this._buttonTextKey = g ? "upload-files" : "upload-file";
1616
+ });
1617
+ }
1618
+ render() {
1619
+ return b`
1620
+ <uc-drop-area .disabled=${!this.dropzone}>
1621
+ <button type="button" @click=${this._handleClick}>
1622
+ <uc-icon name="upload"></uc-icon>
1623
+ <span>${this.l10n(this._buttonTextKey)}</span>
1624
+ ${this.yield("")}
1625
+ <div class="uc-visual-drop-area">${this.l10n("drop-files-here")}</div>
1626
+ </button>
1627
+ </uc-drop-area>
1628
+ `;
1629
+ }
1630
+ };
1631
+ __decorate([n({
1632
+ attribute: "dropzone",
1633
+ type: Boolean
1634
+ })], SimpleBtn.prototype, "dropzone", void 0), __decorate([r()], SimpleBtn.prototype, "_buttonTextKey", void 0);
1635
+ var PluginActivityHost = class extends LitActivityBlock {
1636
+ constructor(...g) {
1637
+ super(...g), this.activityType = null, this._containerRef = e();
1638
+ }
1639
+ initCallback() {
1640
+ this.activityType = this.registration?.id ?? null, super.initCallback(), this._ensureRegistered();
1641
+ }
1642
+ willUpdate(g) {
1643
+ super.willUpdate(g), g.has("registration") && (this._ensureRegistered(), this.isActivityActive && (this._disposeActivity(), this._renderActivity()));
1644
+ }
1645
+ _ensureRegistered() {
1646
+ this.registration && (this._isActivityRegistered() || this.registerActivity(this.activityType ?? "", {
1647
+ onActivate: () => this._renderActivity(),
1648
+ onDeactivate: () => this._disposeActivity()
1649
+ }));
1650
+ }
1651
+ _renderActivity() {
1652
+ let g = this._containerRef.value;
1653
+ if (!g || !this.registration) return;
1654
+ this._disposeActivity();
1655
+ let B = this.$["*currentActivityParams"];
1656
+ this._dispose = this.registration.render(g, B) ?? void 0;
1657
+ }
1658
+ _disposeActivity() {
1659
+ this._dispose?.(), this._dispose = void 0;
1660
+ let g = this._containerRef.value;
1661
+ g && g.replaceChildren();
1662
+ }
1663
+ disconnectedCallback() {
1664
+ this._disposeActivity(), super.disconnectedCallback();
1665
+ }
1666
+ render() {
1667
+ return b`<div
1668
+ style="display: flex; flex-direction: column; width: 100%; min-height: 0;"
1669
+ ${n$1(this._containerRef)}
1670
+ ></div>`;
1671
+ }
1672
+ };
1673
+ __decorate([n({ attribute: !1 })], PluginActivityHost.prototype, "registration", void 0);
1674
+ var PluginActivityRenderer = class extends LitBlock {
1675
+ constructor(...g) {
1676
+ super(...g), this.mode = "modal", this._activities = [];
1677
+ }
1678
+ initCallback() {
1679
+ super.initCallback();
1680
+ let g = this._sharedInstancesBag.pluginManager;
1681
+ g?.onPluginsChange && (this._unsubscribePlugins = g.onPluginsChange(() => this._syncActivities())), this._syncActivities();
1682
+ }
1683
+ _syncActivities() {
1684
+ let g = this._sharedInstancesBag.pluginManager;
1685
+ if (!g) {
1686
+ this._activities = [];
1687
+ return;
1688
+ }
1689
+ this._activities = g.snapshot().activities;
1690
+ }
1691
+ disconnectedCallback() {
1692
+ this._unsubscribePlugins?.(), this._unsubscribePlugins = void 0, super.disconnectedCallback();
1693
+ }
1694
+ render() {
1695
+ return this.mode === "inline" ? b`${c(this._activities, (g) => g.id, (g) => b`<uc-plugin-activity-host .registration=${g}></uc-plugin-activity-host>`)}` : b`${c(this._activities, (g) => g.id, (g) => b`
1696
+ <uc-modal id=${g.id} strokes block-body-scrolling>
1697
+ <uc-plugin-activity-host .registration=${g}></uc-plugin-activity-host>
1698
+ </uc-modal>
1699
+ `)}`;
1700
+ }
1701
+ };
1702
+ __decorate([n({ type: String })], PluginActivityRenderer.prototype, "mode", void 0), __decorate([r()], PluginActivityRenderer.prototype, "_activities", void 0);
1703
+ var FileUploaderRegular = class extends LitSolutionBlock {
1704
+ static {
1705
+ this.styleAttrs = [...super.styleAttrs, "uc-file-uploader-regular"];
1706
+ }
1707
+ constructor() {
1708
+ super(), this.headless = !1, this.init$ = { ...this.init$ };
1709
+ }
1710
+ initCallback() {
1711
+ super.initCallback(), this.telemetryManager.sendEvent({ eventType: InternalEventType.INIT_SOLUTION });
1712
+ }
1713
+ render() {
1714
+ return b`
1715
+ ${super.render()}
1716
+ <uc-simple-btn ?hidden=${this.headless}></uc-simple-btn>
1717
+
1718
+ <uc-modal id="start-from" strokes block-body-scrolling>
1719
+ <uc-start-from>
1720
+ <uc-drop-area with-icon clickable></uc-drop-area>
1721
+ <uc-source-list role="list" wrap></uc-source-list>
1722
+ <button type="button" class="uc-secondary-btn" @click=${this.$["*historyBack"]}>${this.l10n("start-from-cancel")}</button>
1723
+ <uc-copyright></uc-copyright>
1724
+ </uc-start-from>
1725
+ </uc-modal>
1726
+
1727
+ <uc-modal id="upload-list" strokes block-body-scrolling>
1728
+ <uc-upload-list></uc-upload-list>
1729
+ </uc-modal>
1730
+
1731
+ <uc-plugin-activity-renderer mode="modal"></uc-plugin-activity-renderer>
1732
+ `;
1733
+ }
1734
+ };
1735
+ __decorate([n({ type: Boolean })], FileUploaderRegular.prototype, "headless", void 0);
1736
+ var FileUploaderInline = class extends LitSolutionBlock {
1737
+ static {
1738
+ this.styleAttrs = [...super.styleAttrs, "uc-file-uploader-inline"];
1739
+ }
1740
+ constructor() {
1741
+ super(), this._couldCancel = !1, this._handleCancel = () => {
1742
+ if (this._couldHistoryBack) {
1743
+ let g = this.$["*historyBack"];
1744
+ g?.();
1745
+ return;
1746
+ }
1747
+ this._couldShowList && (this.$["*currentActivity"] = LitActivityBlock.activities.UPLOAD_LIST);
1748
+ }, this.init$ = { ...this.init$ };
1749
+ }
1750
+ get _couldHistoryBack() {
1751
+ let g = this.$["*history"];
1752
+ return !g || g.length <= 1 ? !1 : g[g.length - 1] !== LitActivityBlock.activities.START_FROM;
1753
+ }
1754
+ get _couldShowList() {
1755
+ let g = this.$["*uploadList"];
1756
+ return this.cfg.showEmptyList || Array.isArray(g) && g.length > 0;
1757
+ }
1758
+ _getInitActivity() {
1759
+ return this.getCssData("--cfg-init-activity") || LitActivityBlock.activities.START_FROM;
1760
+ }
1761
+ initCallback() {
1762
+ super.initCallback(), this.telemetryManager.sendEvent({ eventType: InternalEventType.INIT_SOLUTION });
1763
+ let g = this._getInitActivity();
1764
+ this.sub("*currentActivity", (B) => {
1765
+ B || (this.$["*currentActivity"] = g);
1766
+ }), this.sub("*uploadList", (B) => {
1767
+ Array.isArray(B) && B.length > 0 && this.$["*currentActivity"] === g && (this.$["*currentActivity"] = LitActivityBlock.activities.UPLOAD_LIST);
1768
+ }), this.sub("*history", () => {
1769
+ this._couldCancel = this._couldHistoryBack || this._couldShowList;
1770
+ });
1771
+ }
1772
+ render() {
1773
+ return b`
1774
+ ${super.render()}
1775
+ <uc-start-from>
1776
+ <uc-drop-area with-icon clickable></uc-drop-area>
1777
+ <uc-source-list role="list" wrap></uc-source-list>
1778
+ <button
1779
+ type="button"
1780
+ class="uc-cancel-btn uc-secondary-btn"
1781
+ @click=${this._handleCancel}
1782
+ ?hidden=${!this._couldCancel}
1783
+ >
1784
+ ${this.l10n("start-from-cancel")}
1785
+ </button>
1786
+ <uc-copyright></uc-copyright>
1787
+ </uc-start-from>
1788
+ <uc-upload-list></uc-upload-list>
1789
+ <uc-plugin-activity-renderer mode="inline"></uc-plugin-activity-renderer>
1790
+ `;
1791
+ }
1792
+ };
1793
+ __decorate([r()], FileUploaderInline.prototype, "_couldCancel", void 0);
1794
+ var ACTIVE_CLASS = "active", EMPTY_CLASS = "", FileUploaderMinimal = class extends LitSolutionBlock {
1795
+ static {
1796
+ this.styleAttrs = [...super.styleAttrs, "uc-file-uploader-minimal"];
1797
+ }
1798
+ _getInitActivity() {
1799
+ return this.getCssData("--cfg-init-activity") || LitActivityBlock.activities.START_FROM;
1800
+ }
1801
+ constructor() {
1802
+ super(), this._singleUpload = !1, this._isHiddenStartFrom = !1, this._classUploadList = EMPTY_CLASS, this._classStartFrom = EMPTY_CLASS, this._handleModalOpen = (g) => {
1803
+ g.id === LitActivityBlock.activities.CLOUD_IMG_EDIT && (this._classUploadList = ACTIVE_CLASS), this.$["*currentActivity"] === LitActivityBlock.activities.UPLOAD_LIST && (this._classUploadList = ACTIVE_CLASS, this._isHiddenStartFrom = !0);
1804
+ let B = this.$["*uploadList"];
1805
+ (!B || B.length <= 0) && (this._classStartFrom = ACTIVE_CLASS);
1806
+ }, this._handleModalClose = (g) => {
1807
+ g.id === this.$["*currentActivity"] && (this.$["*currentActivity"] = LitActivityBlock.activities.UPLOAD_LIST, this._isHiddenStartFrom = !1), g.id === LitActivityBlock.activities.CLOUD_IMG_EDIT && (this.$["*currentActivity"] = LitActivityBlock.activities.UPLOAD_LIST);
1808
+ }, this.init$ = { ...this.init$ };
1809
+ }
1810
+ initCallback() {
1811
+ super.initCallback(), this.telemetryManager.sendEvent({ eventType: InternalEventType.INIT_SOLUTION });
1812
+ let g = this._getInitActivity();
1813
+ this.sub("*currentActivity", (B) => {
1814
+ B === LitActivityBlock.activities.UPLOAD_LIST && this.modalManager?.closeAll(), B || (this.$["*currentActivity"] = g);
1815
+ }), this.sub("*uploadList", (B) => {
1816
+ Array.isArray(B) && B.length > 0 ? (this.$["*currentActivity"] = LitActivityBlock.activities.UPLOAD_LIST, this._classStartFrom = EMPTY_CLASS) : (this._classUploadList = EMPTY_CLASS, this._isHiddenStartFrom = !1, this.$["*currentActivity"] = g);
1817
+ }), this.subConfigValue("confirmUpload", (g) => {
1818
+ g !== !1 && (this.cfg.confirmUpload = !1);
1819
+ }), this.subConfigValue("filesViewMode", (g) => {
1820
+ this.setAttribute("mode", g), this.subConfigValue("multiple", (B) => {
1821
+ g === "grid" ? (B ? this.style.removeProperty("--uc-grid-col") : this.style.setProperty("--uc-grid-col", "1"), this._singleUpload = !B) : (this.style.removeProperty("--uc-grid-col"), this._singleUpload = !1);
1822
+ });
1823
+ }), this.modalManager?.subscribe(ModalEvents.OPEN, this._handleModalOpen), this.modalManager?.subscribe(ModalEvents.CLOSE, this._handleModalClose);
1824
+ }
1825
+ disconnectedCallback() {
1826
+ super.disconnectedCallback(), this.modalManager?.unsubscribe(ModalEvents.OPEN, this._handleModalOpen), this.modalManager?.unsubscribe(ModalEvents.CLOSE, this._handleModalClose);
1827
+ }
1828
+ render() {
1829
+ return b`
1830
+ ${super.render()}
1831
+ <uc-start-from ?hidden=${this._isHiddenStartFrom} class=${this._classStartFrom}>
1832
+ <uc-drop-area
1833
+ ?single=${this._singleUpload}
1834
+ initflow
1835
+ clickable
1836
+ tabindex="0"
1837
+ ><span>${this.l10n("choose-file")}</span></uc-drop-area>
1838
+ <uc-copyright></uc-copyright>
1839
+ </uc-start-from>
1840
+ <uc-upload-list class=${this._classUploadList}></uc-upload-list>
1841
+
1842
+ <uc-modal id="start-from" strokes block-body-scrolling>
1843
+ <uc-start-from>
1844
+ <uc-drop-area with-icon clickable></uc-drop-area>
1845
+ <uc-source-list role="list" wrap></uc-source-list>
1846
+ <button
1847
+ type="button"
1848
+ class="uc-secondary-btn"
1849
+ @click=${this.$["*historyBack"]}
1850
+ >${this.l10n("start-from-cancel")}</button>
1851
+ </uc-start-from>
1852
+ </uc-modal>
1853
+
1854
+ <uc-plugin-activity-renderer mode="modal"></uc-plugin-activity-renderer>
1855
+ `;
1856
+ }
1857
+ };
1858
+ __decorate([r()], FileUploaderMinimal.prototype, "_singleUpload", void 0), __decorate([r()], FileUploaderMinimal.prototype, "_isHiddenStartFrom", void 0), __decorate([r()], FileUploaderMinimal.prototype, "_classUploadList", void 0), __decorate([r()], FileUploaderMinimal.prototype, "_classStartFrom", void 0);
1859
+ export { LitActivityBlock as ActivityBlock, ActivityHeader, BaseComponent, LitBlock as Block, CameraSource, Config, Copyright, PubSub as Data, DropArea, ExternalSource, ExternalUploadSource, FileItem, FileUploaderInline, FileUploaderMinimal, FileUploaderRegular, FormInput, Icon, Img, Modal, ModalEvents, PACKAGE_NAME, PACKAGE_VERSION, PluginActivityHost, PluginActivityRenderer, ProgressBar, ProgressBarCommon, Select, SimpleBtn, LitSolutionBlock as SolutionBlock, SourceBtn, SourceList, Spinner, StartFrom, Thumb, UID, UploadCtxProvider, UploadList, UploadSource, LitUploaderBlock as UploaderBlock, UrlSource, defineComponents, defineLocale, loadFileUploaderFrom, toKebabCase };