@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.
- package/dist/ActivityHeader-R6Mlx-dA.js +9 -0
- package/dist/ActivityHeader.css +23 -0
- package/dist/ActivityHeader.layered.css +24 -0
- package/dist/{CameraSource-DbyO6GoK.js → CameraSource-DDwj1jCV.js} +106 -76
- package/dist/CameraSource-n1tun2Df.js +10 -0
- package/dist/CameraSource.css +180 -0
- package/dist/CameraSource.layered.css +209 -0
- package/dist/{CloudImageEditor-BIxf1V4M.js → CloudImageEditor-DcVoIRb3.js} +66 -65
- package/dist/{CloudImageEditorActivity-d4DpK6fQ.js → CloudImageEditorActivity-Csij4nlC.js} +4 -4
- package/dist/{CloudImageEditorActivity-CJxP5N0S.js → CloudImageEditorActivity-DD4NdU0P.js} +4 -4
- package/dist/CloudImageEditorActivity.css +14 -0
- package/dist/CloudImageEditorActivity.layered.css +15 -0
- package/dist/{Config-DuWre5p3.js → Config-DKOromHY.js} +27 -27
- package/dist/Config.css +4 -0
- package/dist/Config.layered.css +5 -0
- package/dist/ExternalSource-6MSUgxqy.js +10 -0
- package/dist/{ExternalSource-BKTFp95O.js → ExternalSource-DVEjSkPB.js} +56 -51
- package/dist/ExternalSource.css +98 -0
- package/dist/ExternalSource.layered.css +116 -0
- package/dist/{Icon-CqTVC82Q.js → Icon-tXRTvEF2.js} +7 -8
- package/dist/Icon.css +14 -0
- package/dist/Icon.layered.css +15 -0
- package/dist/{LitUploaderBlock-BA34rzeU.js → LitUploaderBlock-LxeOZ0ya.js} +65 -65
- package/dist/{UrlSource-DZK5EBwT.js → UrlSource-BkyX00I2.js} +5 -5
- package/dist/UrlSource-RI8TSD48.js +10 -0
- package/dist/UrlSource.css +17 -0
- package/dist/UrlSource.layered.css +18 -0
- package/dist/abstract/loadFileUploaderFrom.js +3 -3
- package/dist/cameraPlugin-weRKO7eG.js +8 -0
- package/dist/{cloud-image-editor-fNswWrI4.js → cloud-image-editor-hhbyNWLG.js} +6 -6
- package/dist/cloud-image-editor.css +1380 -0
- package/dist/cloud-image-editor.layered.css +1549 -0
- package/dist/cloudImageEditorPlugin-FjUgbMK3.js +8 -0
- package/dist/{en-DNCwRJsB.js → en-8OWEmZim.js} +2 -2
- package/dist/env-mM-ksNPq.js +8 -0
- package/dist/env.js +3 -3
- package/dist/externalSourcesPlugin-CMBmLT8S.js +8 -0
- package/dist/imageShrinkPlugin-BN6loiP2.js +8 -0
- package/dist/index-base.css +2497 -0
- package/dist/index-base.layered.css +2837 -0
- package/dist/index.css +9 -3964
- package/dist/index.d.ts +13 -0
- package/dist/index.js +827 -42
- package/dist/index.layered.css +9 -4478
- package/dist/instagramPlugin-CXRm8MGL.js +8 -0
- package/dist/{loadFileUploaderFrom-BWJM43Yq.js → loadFileUploaderFrom-Bfz8L3VB.js} +3 -3
- package/dist/locales/file-uploader/ar.js +2 -2
- package/dist/locales/file-uploader/az.js +2 -2
- package/dist/locales/file-uploader/ca.js +2 -2
- package/dist/locales/file-uploader/cs.js +2 -2
- package/dist/locales/file-uploader/da.js +2 -2
- package/dist/locales/file-uploader/de.js +2 -2
- package/dist/locales/file-uploader/el.js +2 -2
- package/dist/locales/file-uploader/en.js +3 -3
- package/dist/locales/file-uploader/es.js +2 -2
- package/dist/locales/file-uploader/et.js +2 -2
- package/dist/locales/file-uploader/fi.js +2 -2
- package/dist/locales/file-uploader/fr.js +2 -2
- package/dist/locales/file-uploader/he.js +2 -2
- package/dist/locales/file-uploader/hy.js +2 -2
- package/dist/locales/file-uploader/is.js +2 -2
- package/dist/locales/file-uploader/it.js +2 -2
- package/dist/locales/file-uploader/ja.js +2 -2
- package/dist/locales/file-uploader/ka.js +2 -2
- package/dist/locales/file-uploader/kk.js +2 -2
- package/dist/locales/file-uploader/ko.js +2 -2
- package/dist/locales/file-uploader/lv.js +2 -2
- package/dist/locales/file-uploader/nb.js +2 -2
- package/dist/locales/file-uploader/nl.js +2 -2
- package/dist/locales/file-uploader/pl.js +2 -2
- package/dist/locales/file-uploader/pt.js +2 -2
- package/dist/locales/file-uploader/ro.js +2 -2
- package/dist/locales/file-uploader/ru.js +2 -2
- package/dist/locales/file-uploader/sk.js +2 -2
- package/dist/locales/file-uploader/sr.js +2 -2
- package/dist/locales/file-uploader/sv.js +2 -2
- package/dist/locales/file-uploader/tr.js +2 -2
- package/dist/locales/file-uploader/uk.js +2 -2
- package/dist/locales/file-uploader/vi.js +2 -2
- package/dist/locales/file-uploader/zh-TW.js +2 -2
- package/dist/locales/file-uploader/zh.js +2 -2
- package/dist/{plugins-DxjsQUa8.js → plugins-CGUls7EV.js} +6 -6
- package/dist/urlSourcePlugin-_WdbEhq2.js +8 -0
- package/package.json +1 -1
- package/web/ActivityHeader-BFdTdVfD.js +9 -0
- package/web/ActivityHeader-DQy6rII1.js +9 -0
- package/web/ActivityHeader-DvzMl0uj.js +9 -0
- package/web/ActivityHeader-i4x6_Fne.js +9 -0
- package/web/CameraSource-BAWIA4Wm.js +508 -0
- package/web/CameraSource-BqZCQcij.js +11 -0
- package/web/CameraSource-Brxr4tz4.js +508 -0
- package/web/CameraSource-BvBJ5Uzy.js +508 -0
- package/web/CameraSource-CkHzIE-h.js +11 -0
- package/web/CameraSource-D964yPLu.js +508 -0
- package/web/CameraSource-DE48Az-f.js +11 -0
- package/web/CameraSource-DyPebtRF.js +478 -0
- package/web/CameraSource-pj7Xo81m.js +11 -0
- package/web/CloudImageEditor-CTgUWB07.js +2192 -0
- package/web/CloudImageEditor-CxqV9Lwm.js +2192 -0
- package/web/CloudImageEditor-DoLWHpqV.js +2192 -0
- package/web/CloudImageEditor-Drywn265.js +2192 -0
- package/web/CloudImageEditor-MXcaDtMx.js +2187 -0
- package/web/CloudImageEditorActivity-BPzmfaJV.js +85 -0
- package/web/CloudImageEditorActivity-Br8pU5gd.js +11 -0
- package/web/CloudImageEditorActivity-Cw8b2CEz.js +11 -0
- package/web/CloudImageEditorActivity-Df1ySGq0.js +86 -0
- package/web/CloudImageEditorActivity-DinG5r0y.js +11 -0
- package/web/CloudImageEditorActivity-DmnLLINR.js +85 -0
- package/web/CloudImageEditorActivity-U90BGCek.js +85 -0
- package/web/CloudImageEditorActivity-dNLQZRZI.js +11 -0
- package/web/CloudImageEditorActivity-ur-hQ-6p.js +85 -0
- package/web/Config-8hlBNhvs.js +455 -0
- package/web/Config-BDZhPIyz.js +455 -0
- package/web/Config-CJVNrrjj.js +455 -0
- package/web/Config-DvkVtlQ7.js +455 -0
- package/web/ExternalSource-B9ycBFiD.js +10 -0
- package/web/ExternalSource-BE7HX47E.js +250 -0
- package/web/ExternalSource-BL5GSlol.js +250 -0
- package/web/ExternalSource-BXQY6Dlc.js +10 -0
- package/web/ExternalSource-BXxH3JCD.js +250 -0
- package/web/ExternalSource-BYSS-PPV.js +245 -0
- package/web/ExternalSource-C57a61QN.js +10 -0
- package/web/ExternalSource-CKfMtOgU.js +250 -0
- package/web/ExternalSource-DP6q8ylB.js +10 -0
- package/web/LitUploaderBlock-AX6jOdAS.js +996 -0
- package/web/LitUploaderBlock-BjAaoLl2.js +996 -0
- package/web/LitUploaderBlock-D8E5HuwH.js +996 -0
- package/web/LitUploaderBlock-Dl3ce0Tc.js +996 -0
- package/web/LitUploaderBlock-Oi33U0uf.js +996 -0
- package/web/UrlSource-B9SX3K0L.js +10 -0
- package/web/UrlSource-C3zB1rCb.js +70 -0
- package/web/UrlSource-C7bEU6Xv.js +10 -0
- package/web/UrlSource-CE389CBz.js +70 -0
- package/web/UrlSource-CnvAJ58Y.js +10 -0
- package/web/UrlSource-CqF0h6B-.js +10 -0
- package/web/UrlSource-D-971Nut.js +70 -0
- package/web/UrlSource-DhI3YCt5.js +70 -0
- package/web/UrlSource-hWV7jtB2.js +70 -0
- package/web/abstract/CTX.d.ts +40 -0
- package/web/abstract/TypedCollection.d.ts +47 -0
- package/web/abstract/TypedCollection.test.d.ts +1 -0
- package/web/abstract/TypedData.d.ts +12 -0
- package/web/abstract/TypedData.test.d.ts +1 -0
- package/web/abstract/UploaderPublicApi.d.ts +41 -0
- package/web/abstract/buildOutputCollectionState.d.ts +3 -0
- package/web/abstract/customConfigOptions.d.ts +65 -0
- package/web/abstract/defineComponents.d.ts +1 -0
- package/web/abstract/features/ClipboardLayer.d.ts +12 -0
- package/web/abstract/loadFileUploaderFrom.d.ts +13 -0
- package/web/abstract/localeRegistry.d.ts +5 -0
- package/web/abstract/managers/LocaleManager.d.ts +10 -0
- package/web/abstract/managers/ModalManager.d.ts +53 -0
- package/web/abstract/managers/SecureUploadsManager.d.ts +7 -0
- package/web/abstract/managers/TelemetryManager.d.ts +41 -0
- package/web/abstract/managers/ValidationManager.d.ts +34 -0
- package/web/abstract/managers/__tests__/ModalManager.test.d.ts +13 -0
- package/web/abstract/managers/__tests__/SecureUploadsManager.test.d.ts +1 -0
- package/web/abstract/managers/a11y.d.ts +9 -0
- package/web/abstract/managers/plugin/PluginManager.d.ts +25 -0
- package/web/abstract/managers/plugin/PluginTypes.d.ts +146 -0
- package/web/abstract/managers/plugin/index.d.ts +2 -0
- package/web/abstract/sharedConfigKey.d.ts +2 -0
- package/web/abstract/uploadEntrySchema.d.ts +34 -0
- package/web/blocks/ActivityHeader/ActivityHeader.d.ts +8 -0
- package/web/blocks/CameraSource/CameraSource.d.ts +121 -0
- package/web/blocks/CameraSource/__tests__/calcCameraModes.test.d.ts +1 -0
- package/web/blocks/CameraSource/calcCameraModes.d.ts +5 -0
- package/web/blocks/CameraSource/constants.d.ts +15 -0
- package/web/blocks/CloudImageEditor/index.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +60 -0
- package/web/blocks/CloudImageEditor/src/CropFrame.d.ts +56 -0
- package/web/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +24 -0
- package/web/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +14 -0
- package/web/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +13 -0
- package/web/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +35 -0
- package/web/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +56 -0
- package/web/blocks/CloudImageEditor/src/EditorImageFader.d.ts +63 -0
- package/web/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +15 -0
- package/web/blocks/CloudImageEditor/src/EditorScroller.d.ts +15 -0
- package/web/blocks/CloudImageEditor/src/EditorSlider.d.ts +33 -0
- package/web/blocks/CloudImageEditor/src/EditorToolbar.d.ts +68 -0
- package/web/blocks/CloudImageEditor/src/crop-utils.d.ts +36 -0
- package/web/blocks/CloudImageEditor/src/crop-utils.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/cropper-constants.d.ts +10 -0
- package/web/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +31 -0
- package/web/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +19 -0
- package/web/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +27 -0
- package/web/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +38 -0
- package/web/blocks/CloudImageEditor/src/index.d.ts +15 -0
- package/web/blocks/CloudImageEditor/src/lib/classNames.d.ts +5 -0
- package/web/blocks/CloudImageEditor/src/lib/classNames.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/linspace.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/linspace.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +4 -0
- package/web/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +2 -0
- package/web/blocks/CloudImageEditor/src/lib/pick.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/pick.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +7 -0
- package/web/blocks/CloudImageEditor/src/state.d.ts +20 -0
- package/web/blocks/CloudImageEditor/src/svg-sprite.d.ts +2 -0
- package/web/blocks/CloudImageEditor/src/toolbar-constants.d.ts +61 -0
- package/web/blocks/CloudImageEditor/src/types.d.ts +60 -0
- package/web/blocks/CloudImageEditor/src/util.d.ts +2 -0
- package/web/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +7 -0
- package/web/blocks/CloudImageEditor/src/utils/parseFilterValue.test.d.ts +1 -0
- package/web/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +25 -0
- package/web/blocks/Config/Config.d.ts +60 -0
- package/web/blocks/Config/assertions.d.ts +5 -0
- package/web/blocks/Config/computed-properties.d.ts +24 -0
- package/web/blocks/Config/computed-properties.test.d.ts +1 -0
- package/web/blocks/Config/initialConfig.d.ts +6 -0
- package/web/blocks/Config/normalizeConfigValue.d.ts +2 -0
- package/web/blocks/Config/validatorsType.d.ts +18 -0
- package/web/blocks/Copyright/Copyright.d.ts +10 -0
- package/web/blocks/DropArea/DropArea.d.ts +47 -0
- package/web/blocks/DropArea/addDropzone.d.ts +17 -0
- package/web/blocks/DropArea/getDropItems.d.ts +12 -0
- package/web/blocks/ExternalSource/ExternalSource.d.ts +45 -0
- package/web/blocks/ExternalSource/MessageBridge.d.ts +11 -0
- package/web/blocks/ExternalSource/buildThemeDefinition.d.ts +4 -0
- package/web/blocks/ExternalSource/query-string.d.ts +1 -0
- package/web/blocks/ExternalSource/types.d.ts +105 -0
- package/web/blocks/FileItem/FileItem.d.ts +50 -0
- package/web/blocks/FileItem/FileItemConfig.d.ts +10 -0
- package/web/blocks/FormInput/FormInput.d.ts +18 -0
- package/web/blocks/Icon/Icon.d.ts +19 -0
- package/web/blocks/Img/Img.d.ts +14 -0
- package/web/blocks/Img/ImgBase.d.ts +29 -0
- package/web/blocks/Img/ImgConfig.d.ts +28 -0
- package/web/blocks/Img/configurations.d.ts +11 -0
- package/web/blocks/Img/props-map.d.ts +28 -0
- package/web/blocks/Img/utils/parseObjectToString.d.ts +2 -0
- package/web/blocks/Modal/Modal.d.ts +34 -0
- package/web/blocks/PluginActivityRenderer/PluginActivityRenderer.d.ts +32 -0
- package/web/blocks/PluginActivityRenderer/index.d.ts +1 -0
- package/web/blocks/ProgressBar/ProgressBar.d.ts +21 -0
- package/web/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +17 -0
- package/web/blocks/Select/Select.d.ts +18 -0
- package/web/blocks/SimpleBtn/SimpleBtn.d.ts +15 -0
- package/web/blocks/SourceBtn/SourceBtn.d.ts +23 -0
- package/web/blocks/SourceList/SourceList.d.ts +24 -0
- package/web/blocks/Spinner/Spinner.d.ts +9 -0
- package/web/blocks/StartFrom/StartFrom.d.ts +12 -0
- package/web/blocks/Thumb/Thumb.d.ts +35 -0
- package/web/blocks/UploadCtxProvider/EventEmitter.d.ts +70 -0
- package/web/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +44 -0
- package/web/blocks/UploadList/UploadList.d.ts +39 -0
- package/web/blocks/UrlSource/UrlSource.d.ts +14 -0
- package/web/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -0
- package/web/blocks/themes/uc-basic/svg-sprite.d.ts +2 -0
- package/web/cameraPlugin-DeedXMWV.js +8 -0
- package/web/cameraPlugin-Duy1QwjB.js +8 -0
- package/web/cameraPlugin-QS9SUOtO.js +8 -0
- package/web/cameraPlugin-bq8ggY04.js +8 -0
- package/web/cameraPlugin-cel9YgP_.js +8 -0
- package/web/cloud-image-editor-8DrVRZ7E.js +12 -0
- package/web/cloud-image-editor-BX50EK1U.js +12 -0
- package/web/cloud-image-editor-DSW3oWq-.js +12 -0
- package/web/cloud-image-editor-DuI2Lx4M.js +12 -0
- package/web/cloudImageEditorPlugin-5my6aD36.js +8 -0
- package/web/cloudImageEditorPlugin-Bk19DmJv.js +8 -0
- package/web/cloudImageEditorPlugin-CcdnmtBW.js +8 -0
- package/web/cloudImageEditorPlugin-DQJmDl03.js +8 -0
- package/web/cloudImageEditorPlugin-kojghfqw.js +8 -0
- package/web/constants-BCfCF0cJ.js +4025 -0
- package/web/core.d.ts +42 -0
- package/web/env.d.ts +2 -0
- package/web/externalSourcesPlugin-BTeRm5C0.js +8 -0
- package/web/externalSourcesPlugin-BXgVeojg.js +8 -0
- package/web/externalSourcesPlugin-BgLpuIK9.js +8 -0
- package/web/externalSourcesPlugin-DMc9zs4T.js +8 -0
- package/web/externalSourcesPlugin-Dm9vnTBv.js +8 -0
- package/web/file-uploader.iife.min.js +697 -0
- package/web/file-uploader.min.js +1859 -0
- package/web/imageShrinkPlugin-BdHgEGZH.js +8 -0
- package/web/imageShrinkPlugin-BjkMGfvT.js +8 -0
- package/web/imageShrinkPlugin-CCkGHL2w.js +8 -0
- package/web/imageShrinkPlugin-D4WjaRGo.js +8 -0
- package/web/imageShrinkPlugin-DqYGutVx.js +8 -0
- package/web/index.d.ts +42 -0
- package/web/instagramPlugin-BTMz0K2a.js +8 -0
- package/web/instagramPlugin-BbIKgTH7.js +8 -0
- package/web/instagramPlugin-CQQhsEJa.js +8 -0
- package/web/instagramPlugin-Cm7lWKae.js +8 -0
- package/web/instagramPlugin-DcclxM_d.js +8 -0
- package/web/lit/BaseComponent.d.ts +12 -0
- package/web/lit/Constructor.d.ts +1 -0
- package/web/lit/CssDataMixin.d.ts +7 -0
- package/web/lit/LightDomMixin.d.ts +8 -0
- package/web/lit/LitActivityBlock.d.ts +53 -0
- package/web/lit/LitBlock.d.ts +83 -0
- package/web/lit/LitSolutionBlock.d.ts +21 -0
- package/web/lit/LitUploaderBlock.d.ts +53 -0
- package/web/lit/PubSubCompat.d.ts +18 -0
- package/web/lit/RegisterableElementMixin.d.ts +7 -0
- package/web/lit/SharedState.d.ts +119 -0
- package/web/lit/SymbioteCompatMixin.d.ts +40 -0
- package/web/lit/TestModeController.d.ts +16 -0
- package/web/lit/Uid.d.ts +3 -0
- package/web/lit/activity-constants.d.ts +11 -0
- package/web/lit/createDebugPrinter.d.ts +3 -0
- package/web/lit/findBlockInCtx.d.ts +3 -0
- package/web/lit/getOutputData.d.ts +2 -0
- package/web/lit/hasBlockInCtx.d.ts +3 -0
- package/web/lit/l10n.d.ts +5 -0
- package/web/lit/parseCssPropertyValue.d.ts +1 -0
- package/web/lit/shared-instances.d.ts +65 -0
- package/web/locales/file-uploader/ar.d.ts +137 -0
- package/web/locales/file-uploader/az.d.ts +129 -0
- package/web/locales/file-uploader/ca.d.ts +131 -0
- package/web/locales/file-uploader/cs.d.ts +133 -0
- package/web/locales/file-uploader/da.d.ts +129 -0
- package/web/locales/file-uploader/de.d.ts +129 -0
- package/web/locales/file-uploader/el.d.ts +129 -0
- package/web/locales/file-uploader/en.d.ts +129 -0
- package/web/locales/file-uploader/es.d.ts +131 -0
- package/web/locales/file-uploader/et.d.ts +129 -0
- package/web/locales/file-uploader/fi.d.ts +129 -0
- package/web/locales/file-uploader/fr.d.ts +131 -0
- package/web/locales/file-uploader/he.d.ts +131 -0
- package/web/locales/file-uploader/hy.d.ts +129 -0
- package/web/locales/file-uploader/is.d.ts +129 -0
- package/web/locales/file-uploader/it.d.ts +131 -0
- package/web/locales/file-uploader/ja.d.ts +129 -0
- package/web/locales/file-uploader/ka.d.ts +129 -0
- package/web/locales/file-uploader/kk.d.ts +129 -0
- package/web/locales/file-uploader/ko.d.ts +129 -0
- package/web/locales/file-uploader/lv.d.ts +131 -0
- package/web/locales/file-uploader/nb.d.ts +129 -0
- package/web/locales/file-uploader/nl.d.ts +129 -0
- package/web/locales/file-uploader/pl.d.ts +133 -0
- package/web/locales/file-uploader/pt.d.ts +131 -0
- package/web/locales/file-uploader/ro.d.ts +131 -0
- package/web/locales/file-uploader/ru.d.ts +133 -0
- package/web/locales/file-uploader/sk.d.ts +133 -0
- package/web/locales/file-uploader/sr.d.ts +131 -0
- package/web/locales/file-uploader/sv.d.ts +129 -0
- package/web/locales/file-uploader/tr.d.ts +129 -0
- package/web/locales/file-uploader/uk.d.ts +133 -0
- package/web/locales/file-uploader/vi.d.ts +129 -0
- package/web/locales/file-uploader/zh-TW.d.ts +129 -0
- package/web/locales/file-uploader/zh.d.ts +129 -0
- package/web/plugins/cameraPlugin.d.ts +2 -0
- package/web/plugins/cloudImageEditorPlugin.d.ts +2 -0
- package/web/plugins/externalSourcesPlugin.d.ts +2 -0
- package/web/plugins/imageShrinkPlugin.d.ts +2 -0
- package/web/plugins/instagramPlugin.d.ts +2 -0
- package/web/plugins/unsplashPlugin.d.ts +16 -0
- package/web/plugins/urlSourcePlugin.d.ts +2 -0
- package/web/plugins-Bt7FXHKx.js +562 -0
- package/web/plugins-CaaolyMk.js +562 -0
- package/web/plugins-Cjgw5oWg.js +562 -0
- package/web/plugins-CzNtrVQB.js +562 -0
- package/web/plugins-DS0hIs2V.js +563 -0
- package/web/ref-BOnG19ns.js +4040 -0
- package/web/ref-BejJFG7m.js +4040 -0
- package/web/ref-DcRg7zo9.js +4040 -0
- package/web/ref-ZWPcLQB9.js +4040 -0
- package/web/solutions/adaptive-image/index.d.ts +2 -0
- package/web/solutions/cloud-image-editor/CloudImageEditor.d.ts +11 -0
- package/web/solutions/cloud-image-editor/index.d.ts +5 -0
- package/web/solutions/file-uploader/inline/FileUploaderInline.d.ts +20 -0
- package/web/solutions/file-uploader/inline/index.d.ts +1 -0
- package/web/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +23 -0
- package/web/solutions/file-uploader/minimal/index.d.ts +1 -0
- package/web/solutions/file-uploader/regular/FileUploaderRegular.d.ts +17 -0
- package/web/solutions/file-uploader/regular/index.d.ts +1 -0
- package/web/style-map-BmZdux7T.js +37 -0
- package/web/style-map-CZ6fSV6e.js +37 -0
- package/web/style-map-Dk7mLCrB.js +37 -0
- package/web/style-map-HkHnu9oA.js +37 -0
- package/web/style-map-tw1yUEaj.js +37 -0
- package/web/types/dom.d.ts +1 -0
- package/web/types/events.d.ts +4 -0
- package/web/types/exported.d.ts +492 -0
- package/web/types/index.d.ts +5 -0
- package/web/uc-basic.layered.min.css +6046 -0
- package/web/uc-basic.min.css +5487 -0
- package/web/uc-cloud-image-editor.layered.min.css +1884 -0
- package/web/uc-cloud-image-editor.min.css +1675 -0
- package/web/uc-cloud-image-editor.min.js +457 -0
- package/web/uc-file-uploader-inline.layered.min.css +4352 -0
- package/web/uc-file-uploader-inline.min.css +3836 -0
- package/web/uc-file-uploader-inline.min.js +1859 -0
- package/web/uc-file-uploader-minimal.layered.min.css +4352 -0
- package/web/uc-file-uploader-minimal.min.css +3836 -0
- package/web/uc-file-uploader-minimal.min.js +1859 -0
- package/web/uc-file-uploader-regular.layered.min.css +4352 -0
- package/web/uc-file-uploader-regular.min.css +3836 -0
- package/web/uc-file-uploader-regular.min.js +1859 -0
- package/web/uc-img.min.js +895 -0
- package/web/urlSourcePlugin-9lhcr02f.js +8 -0
- package/web/urlSourcePlugin-C-sLGhGb.js +8 -0
- package/web/urlSourcePlugin-DNXDpnRD.js +8 -0
- package/web/urlSourcePlugin-JnD0cnxb.js +8 -0
- package/web/urlSourcePlugin-hcMU2K6T.js +8 -0
- package/web/utils/UID.d.ts +5 -0
- package/web/utils/UID.test.d.ts +1 -0
- package/web/utils/UploadSource.d.ts +37 -0
- package/web/utils/WindowHeightTracker.d.ts +9 -0
- package/web/utils/abilities.d.ts +1 -0
- package/web/utils/applyStyles.d.ts +1 -0
- package/web/utils/browser-info.d.ts +12 -0
- package/web/utils/browser-info.test.d.ts +1 -0
- package/web/utils/cdn-utils.d.ts +53 -0
- package/web/utils/cdn-utils.test.d.ts +1 -0
- package/web/utils/comma-separated.d.ts +2 -0
- package/web/utils/debounce.d.ts +3 -0
- package/web/utils/delay.d.ts +1 -0
- package/web/utils/fileTypes.d.ts +11 -0
- package/web/utils/fileTypes.test.d.ts +1 -0
- package/web/utils/get-top-level-origin.d.ts +1 -0
- package/web/utils/get-top-level-origin.test.d.ts +1 -0
- package/web/utils/getLocaleDirection.d.ts +1 -0
- package/web/utils/getPluralForm.d.ts +1 -0
- package/web/utils/getPluralForm.test.d.ts +1 -0
- package/web/utils/isPromiseLike.d.ts +1 -0
- package/web/utils/isPromiseLike.test.d.ts +1 -0
- package/web/utils/isSecureTokenExpired.d.ts +8 -0
- package/web/utils/isSecureTokenExpired.test.d.ts +1 -0
- package/web/utils/memoize.d.ts +1 -0
- package/web/utils/memoize.test.d.ts +1 -0
- package/web/utils/mixinClass.d.ts +8 -0
- package/web/utils/parseCdnUrl.d.ts +11 -0
- package/web/utils/parseCdnUrl.test.d.ts +1 -0
- package/web/utils/parseShrink.d.ts +7 -0
- package/web/utils/parseShrink.test.d.ts +1 -0
- package/web/utils/preloadImage.d.ts +10 -0
- package/web/utils/prettyBytes.d.ts +11 -0
- package/web/utils/prettyBytes.test.d.ts +1 -0
- package/web/utils/resizeImage.d.ts +1 -0
- package/web/utils/stringToArray.d.ts +1 -0
- package/web/utils/stringToArray.test.d.ts +1 -0
- package/web/utils/template-utils.d.ts +16 -0
- package/web/utils/template-utils.test.d.ts +1 -0
- package/web/utils/throttle.d.ts +3 -0
- package/web/utils/toKebabCase.d.ts +2 -0
- package/web/utils/toKebabCase.test.d.ts +1 -0
- package/web/utils/transparentPixelSrc.d.ts +1 -0
- package/web/utils/uniqueArray.d.ts +1 -0
- package/web/utils/uniqueArray.test.d.ts +1 -0
- package/web/utils/userAgent.d.ts +2 -0
- package/web/utils/validators/collection/index.d.ts +2 -0
- package/web/utils/validators/collection/validateCollectionUploadError.d.ts +2 -0
- package/web/utils/validators/collection/validateMultiple.d.ts +2 -0
- package/web/utils/validators/file/index.d.ts +4 -0
- package/web/utils/validators/file/validateFileType.d.ts +2 -0
- package/web/utils/validators/file/validateIsImage.d.ts +2 -0
- package/web/utils/validators/file/validateMaxSizeLimit.d.ts +2 -0
- package/web/utils/validators/file/validateUploadError.d.ts +2 -0
- package/web/utils/warnOnce.d.ts +1 -0
- package/web/utils/wildcardRegexp.d.ts +1 -0
- package/web/utils/wildcardRegexp.test.d.ts +1 -0
- package/web/utils/withResolvers.d.ts +5 -0
- package/web/utils/withResolvers.test.d.ts +1 -0
- package/dist/CameraSource-px4BzEMI.js +0 -9
- package/dist/ExternalSource-CR5DG0Jv.js +0 -9
- package/dist/UrlSource-BxVL9Pve.js +0 -9
- package/dist/cameraPlugin-dGash48Q.js +0 -8
- package/dist/cloudImageEditorPlugin-2EU0Pm_j.js +0 -8
- package/dist/env-B1nfXy9i.js +0 -8
- package/dist/externalSourcesPlugin-DKQqk3AC.js +0 -8
- package/dist/imageShrinkPlugin-DAx8eRen.js +0 -8
- package/dist/instagramPlugin-k67tMAo3.js +0 -8
- package/dist/urlSourcePlugin-9xdB7Pvw.js +0 -8
package/dist/index.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Package: @uploadcare/file-uploader@1.28.0-alpha.
|
|
3
|
+
* Package: @uploadcare/file-uploader@1.28.0-alpha.1 (MIT)
|
|
4
4
|
* License: https://github.com/uploadcare/blob/main/LICENSE
|
|
5
|
-
* Built: 2026-03-
|
|
5
|
+
* Built: 2026-03-02T20:26:07.910Z
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import { c as UploadSource, m as defineComponents, s as ExternalUploadSource } from "./plugins-
|
|
9
|
-
import { n as loadFileUploaderFrom } from "./loadFileUploaderFrom-
|
|
10
|
-
import { n as toKebabCase, t as Config } from "./Config-
|
|
11
|
-
import { n as PACKAGE_VERSION, t as PACKAGE_NAME } from "./env-
|
|
12
|
-
import { n as LitActivityBlock, t as LitUploaderBlock } from "./LitUploaderBlock-
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
17
|
-
import "./
|
|
7
|
+
import { $ as stringToArray, B as ModalEvents, F as EventType, I as InternalEventType, P as applyTemplateData, R as solutionBlockCtx, ct as SymbioteMixin, dt as RegisterableElementMixin, et as createCdnUrl, ft as LightDomMixin, j as LitBlock, lt as __decorate, mt as PubSub, nt as createOriginalUrl, ot as defineLocale, pt as CssDataMixin, st as UID, t as Icon, tt as createCdnUrlModifiers, ut as debounce } from "./Icon-tXRTvEF2.js";
|
|
8
|
+
import { c as UploadSource, m as defineComponents, s as ExternalUploadSource } from "./plugins-CGUls7EV.js";
|
|
9
|
+
import { n as loadFileUploaderFrom } from "./loadFileUploaderFrom-Bfz8L3VB.js";
|
|
10
|
+
import { n as toKebabCase, t as Config } from "./Config-DKOromHY.js";
|
|
11
|
+
import { n as PACKAGE_VERSION, t as PACKAGE_NAME } from "./env-mM-ksNPq.js";
|
|
12
|
+
import { n as LitActivityBlock, r as applyStyles, t as LitUploaderBlock } from "./LitUploaderBlock-LxeOZ0ya.js";
|
|
13
|
+
import { n as Select, t as CameraSource } from "./CameraSource-DDwj1jCV.js";
|
|
14
|
+
import { n as Spinner, t as ExternalSource } from "./ExternalSource-DVEjSkPB.js";
|
|
15
|
+
import { b as TRANSPARENT_PIXEL_SRC, v as throttle, y as preloadImage } from "./CloudImageEditor-DcVoIRb3.js";
|
|
16
|
+
import { t as ActivityHeader } from "./ActivityHeader-R6Mlx-dA.js";
|
|
17
|
+
import { t as UrlSource } from "./UrlSource-BkyX00I2.js";
|
|
18
|
+
import "./CloudImageEditorActivity-Csij4nlC.js";
|
|
18
19
|
import { LitElement, html } from "lit";
|
|
19
20
|
import { property, state } from "lit/decorators.js";
|
|
20
21
|
import { CancelError, UploadcareError, uploadFile } from "@uploadcare/upload-client";
|
|
21
22
|
import { unsafeSVG } from "lit/directives/unsafe-svg.js";
|
|
22
|
-
import { repeat } from "lit/directives/repeat.js";
|
|
23
23
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
24
|
+
import { repeat } from "lit/directives/repeat.js";
|
|
24
25
|
var BaseComponent = class extends RegisterableElementMixin(SymbioteMixin()(CssDataMixin(LightDomMixin(LitElement)))) {}, 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 {
|
|
25
26
|
constructor(...f) {
|
|
26
27
|
super(...f), this.init$ = solutionBlockCtx(this);
|
|
@@ -34,33 +35,613 @@ var BaseComponent = class extends RegisterableElementMixin(SymbioteMixin()(CssDa
|
|
|
34
35
|
render() {
|
|
35
36
|
return html`${unsafeSVG(svg_sprite_default)}`;
|
|
36
37
|
}
|
|
37
|
-
}
|
|
38
|
+
};
|
|
39
|
+
const uniqueArray = (f) => [...new Set(f)], 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({
|
|
40
|
+
PREVIEW: "PREVIEW",
|
|
41
|
+
MAIN: "MAIN"
|
|
42
|
+
});
|
|
43
|
+
var DEFAULT_CDN_BASE = "https://ucarecdn.com";
|
|
44
|
+
const PROPS_MAP = Object.freeze({
|
|
45
|
+
"dev-mode": {},
|
|
46
|
+
pubkey: {},
|
|
47
|
+
uuid: {},
|
|
48
|
+
src: {},
|
|
49
|
+
lazy: { default: 1 },
|
|
50
|
+
intersection: {},
|
|
51
|
+
breakpoints: {},
|
|
52
|
+
"cdn-cname": { default: DEFAULT_CDN_BASE },
|
|
53
|
+
"proxy-cname": {},
|
|
54
|
+
"secure-delivery-proxy": {},
|
|
55
|
+
"hi-res-support": { default: 1 },
|
|
56
|
+
"ultra-res-support": {},
|
|
57
|
+
format: {},
|
|
58
|
+
"cdn-operations": {},
|
|
59
|
+
progressive: {},
|
|
60
|
+
quality: {},
|
|
61
|
+
"is-background-for": {},
|
|
62
|
+
"is-preview-blur": { default: 1 }
|
|
63
|
+
});
|
|
64
|
+
var ImgConfig = class extends CssDataMixin(RegisterableElementMixin(LitElement)) {
|
|
65
|
+
createRenderRoot() {
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
constructor() {
|
|
69
|
+
for (let f in super(), this._state = {}, this._subscribers = /* @__PURE__ */ new Map(), this._isnObserver = null, this._observed = null, PROPS_MAP) {
|
|
70
|
+
let V = PROPS_MAP[f];
|
|
71
|
+
this._state[CSS_PREF + f] = V?.default || "";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
$$(f) {
|
|
75
|
+
return this._state[CSS_PREF + f];
|
|
76
|
+
}
|
|
77
|
+
set$$(f) {
|
|
78
|
+
for (let V in f) {
|
|
79
|
+
let H = CSS_PREF + V, U = f[V];
|
|
80
|
+
this._state[H] = U, this._notify(H, U);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
sub$$(f, V) {
|
|
84
|
+
let H = CSS_PREF + f;
|
|
85
|
+
this._subscribers.has(H) || this._subscribers.set(H, /* @__PURE__ */ new Set()), this._subscribers.get(H)?.add(V);
|
|
86
|
+
let U = this._state[H];
|
|
87
|
+
U !== null && U !== "" && V(U);
|
|
88
|
+
}
|
|
89
|
+
_notify(f, V) {
|
|
90
|
+
this._subscribers.has(f) && this._subscribers.get(f)?.forEach((f) => {
|
|
91
|
+
V === null || V === "" || f(V);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
analyticsParams() {
|
|
95
|
+
return `-/@clib/${PACKAGE_NAME}/${PACKAGE_VERSION}/uc-img/`;
|
|
96
|
+
}
|
|
97
|
+
initAttributes(f) {
|
|
98
|
+
Array.from(this.attributes).forEach((V) => {
|
|
99
|
+
let H = V;
|
|
100
|
+
PROPS_MAP[H.name] || f.setAttribute(H.name, H.value);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
initIntersection(f, V) {
|
|
104
|
+
this._isnObserver = new IntersectionObserver((H) => {
|
|
105
|
+
H.forEach((H) => {
|
|
106
|
+
H.isIntersecting && (V(), this._isnObserver?.unobserve(f));
|
|
107
|
+
});
|
|
108
|
+
}, {
|
|
109
|
+
root: null,
|
|
110
|
+
rootMargin: "0px"
|
|
111
|
+
}), this._isnObserver.observe(f), this._observed ||= /* @__PURE__ */ new Set(), this._observed.add(f);
|
|
112
|
+
}
|
|
113
|
+
connectedCallback() {
|
|
114
|
+
super.connectedCallback(), this._initCssProperties();
|
|
115
|
+
}
|
|
116
|
+
_initCssProperties() {
|
|
117
|
+
for (let f in PROPS_MAP) {
|
|
118
|
+
let V = CSS_PREF + f, H = this.getCssData(V, !0);
|
|
119
|
+
H != null && (this._state[V] = H);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
disconnectedCallback() {
|
|
123
|
+
super.disconnectedCallback(), this._isnObserver &&= (this._observed?.forEach((f) => {
|
|
124
|
+
this._isnObserver?.unobserve(f);
|
|
125
|
+
}), null), this._subscribers.clear();
|
|
126
|
+
}
|
|
127
|
+
static get observedAttributes() {
|
|
128
|
+
return Object.keys(PROPS_MAP);
|
|
129
|
+
}
|
|
130
|
+
attributeChangedCallback(f, V, H) {
|
|
131
|
+
window.setTimeout(() => {
|
|
132
|
+
let V = CSS_PREF + f;
|
|
133
|
+
this._state[V] = H, this._notify(V, H);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const parseObjectToString = (f) => Object.entries(f).filter(([f, V]) => V !== void 0 && V !== "").map(([f, V]) => f === "cdn-operations" || f === "analytics" ? V : `${f}/${V}`);
|
|
138
|
+
var ImgBase = class extends ImgConfig {
|
|
38
139
|
constructor(...f) {
|
|
39
|
-
super(...f), this.
|
|
140
|
+
super(...f), this._img = new Image(), this._imgPreview = new Image();
|
|
141
|
+
}
|
|
142
|
+
_fmtAbs(f) {
|
|
143
|
+
return !f.includes("//") && !DEV_MODE && (f = new URL(f, document.baseURI).href), f;
|
|
144
|
+
}
|
|
145
|
+
_validateSize(f) {
|
|
146
|
+
if (!f) return;
|
|
147
|
+
let V = f, H = V.match(/\d+/)?.[0], U = V.match(/[a-zA-Z]+/)?.[0];
|
|
148
|
+
if (!H || !U) return;
|
|
149
|
+
let W = parseInt(H, 10);
|
|
150
|
+
return Number(W) > 5e3 && this._hasFormatJPG ? 5e3 + U : Number(W) > 3e3 && !this._hasFormatJPG ? 3e3 + U : f;
|
|
151
|
+
}
|
|
152
|
+
_getCdnModifiers(f, V) {
|
|
153
|
+
return createCdnUrlModifiers(...parseObjectToString({
|
|
154
|
+
format: this._getTypedCssValue("format"),
|
|
155
|
+
quality: this._getTypedCssValue("quality"),
|
|
156
|
+
resize: this._validateSize(f),
|
|
157
|
+
blur: V,
|
|
158
|
+
"cdn-operations": this._getTypedCssValue("cdn-operations") ?? void 0,
|
|
159
|
+
analytics: this.analyticsParams()
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
_getTypedCssValue(f) {
|
|
163
|
+
let V = this.$$(f);
|
|
164
|
+
if (V == null || typeof V == "string" || typeof V == "number" || typeof V == "boolean") return V;
|
|
165
|
+
}
|
|
166
|
+
_getUrlBase(f = "", V = "") {
|
|
167
|
+
let H = this.$$("src");
|
|
168
|
+
if (H.startsWith("data:") || H.startsWith("blob:")) return H;
|
|
169
|
+
if (DEV_MODE && H && !H.includes("//")) return this._proxyUrl(H);
|
|
170
|
+
let U = this._getCdnModifiers(f, V), W = this.$$("cdn-cname"), G = W;
|
|
171
|
+
if (H.startsWith(String(W))) return createCdnUrl(H, U);
|
|
172
|
+
let K = this.$$("uuid");
|
|
173
|
+
if (G && K || K) return this._proxyUrl(createCdnUrl(createOriginalUrl(G, K), U));
|
|
174
|
+
let q = this.$$("proxy-cname");
|
|
175
|
+
if (q) return this._proxyUrl(createCdnUrl(q, U, this._fmtAbs(H)));
|
|
176
|
+
let Y = this.$$("pubkey");
|
|
177
|
+
if (Y) return this._proxyUrl(createCdnUrl(`https://${Y}.ucr.io/`, U, this._fmtAbs(H)));
|
|
178
|
+
}
|
|
179
|
+
_proxyUrl(f) {
|
|
180
|
+
let V = this.$$("secure-delivery-proxy");
|
|
181
|
+
return V ? applyTemplateData(V, { previewUrl: f }, { transform: (f) => window.encodeURIComponent(f) }) : f;
|
|
182
|
+
}
|
|
183
|
+
_getElSize(f, V = 1, H = !0) {
|
|
184
|
+
let U = f.getBoundingClientRect(), W = V * Math.round(U.width), G = H ? "" : V * Math.round(U.height);
|
|
185
|
+
return W || G ? `${W || ""}x${G || ""}` : null;
|
|
186
|
+
}
|
|
187
|
+
_setupEventProxy(f) {
|
|
188
|
+
let V = (f) => {
|
|
189
|
+
f.stopPropagation();
|
|
190
|
+
let V = new Event(f.type, f);
|
|
191
|
+
this.dispatchEvent(V);
|
|
192
|
+
};
|
|
193
|
+
for (let H of ["load", "error"]) f.addEventListener(H, V);
|
|
194
|
+
}
|
|
195
|
+
get img() {
|
|
196
|
+
return this._hasPreviewImage || (this._setupConfigForImage({ elNode: this._img }), this.appendChild(this._img)), this._img;
|
|
197
|
+
}
|
|
198
|
+
get _currentImg() {
|
|
199
|
+
return this._hasPreviewImage ? {
|
|
200
|
+
type: ImgTypeEnum.PREVIEW,
|
|
201
|
+
img: this._imgPreview
|
|
202
|
+
} : {
|
|
203
|
+
type: ImgTypeEnum.MAIN,
|
|
204
|
+
img: this.img
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
get _hasPreviewImage() {
|
|
208
|
+
return this.$$("is-preview-blur");
|
|
209
|
+
}
|
|
210
|
+
get _bgSelector() {
|
|
211
|
+
return this.$$("is-background-for");
|
|
212
|
+
}
|
|
213
|
+
get _breakpoints() {
|
|
214
|
+
let V = this.$$("breakpoints");
|
|
215
|
+
return V ? uniqueArray(stringToArray(V).map((f) => parseInt(f, 10))) : null;
|
|
216
|
+
}
|
|
217
|
+
get _hasFormatJPG() {
|
|
218
|
+
return this.$$("format").toLowerCase() === "jpeg";
|
|
219
|
+
}
|
|
220
|
+
_renderBg(f) {
|
|
221
|
+
let V = /* @__PURE__ */ new Set();
|
|
222
|
+
V.add(`url("${this._getUrlBase(this._getElSize(f))}") 1x`), this.$$("hi-res-support") && V.add(`url("${this._getUrlBase(this._getElSize(f, 2))}") 2x`), this.$$("ultra-res-support") && V.add(`url("${this._getUrlBase(this._getElSize(f, 3))}") 3x`);
|
|
223
|
+
let H = `image-set(${[...V].join(", ")})`;
|
|
224
|
+
f.style.setProperty("background-image", H), f.style.setProperty("background-image", `-webkit-${H}`);
|
|
225
|
+
}
|
|
226
|
+
_getSrcset() {
|
|
227
|
+
let f = /* @__PURE__ */ new Set();
|
|
228
|
+
return this._breakpoints ? this._breakpoints.forEach((V) => {
|
|
229
|
+
f.add(`${this._getUrlBase(`${V}x`)} ${this._validateSize(`${V}w`)}`), this.$$("hi-res-support") && f.add(`${this._getUrlBase(`${V * 2}x`)} ${this._validateSize(`${V * 2}w`)}`), this.$$("ultra-res-support") && f.add(`${this._getUrlBase(`${V * 3}x`)} ${this._validateSize(`${V * 3}w`)}`);
|
|
230
|
+
}) : (f.add(`${this._getUrlBase(this._getElSize(this._currentImg.img))} 1x`), this.$$("hi-res-support") && f.add(`${this._getUrlBase(this._getElSize(this._currentImg.img, 2))} 2x`), this.$$("ultra-res-support") && f.add(`${this._getUrlBase(this._getElSize(this._currentImg.img, 3))} 3x`)), [...f].join();
|
|
231
|
+
}
|
|
232
|
+
_getSrc() {
|
|
233
|
+
return this._getUrlBase();
|
|
234
|
+
}
|
|
235
|
+
get _srcUrlPreview() {
|
|
236
|
+
return this._getUrlBase("100x", "100");
|
|
237
|
+
}
|
|
238
|
+
_renderBackground() {
|
|
239
|
+
let f = this._bgSelector;
|
|
240
|
+
[...document.querySelectorAll(f)].forEach((f) => {
|
|
241
|
+
this.$$("intersection") ? this.initIntersection(f, () => {
|
|
242
|
+
this._renderBg(f);
|
|
243
|
+
}) : this._renderBg(f);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
_appendURL({ elNode: f, src: V, srcset: H }) {
|
|
247
|
+
V && (f.src = V), H && (f.srcset = H);
|
|
248
|
+
}
|
|
249
|
+
_setupConfigForImage({ elNode: f }) {
|
|
250
|
+
this._setupEventProxy(f), this.initAttributes(f);
|
|
251
|
+
}
|
|
252
|
+
_loaderImage({ src: f, srcset: V, elNode: H }) {
|
|
253
|
+
return new Promise((U, W) => {
|
|
254
|
+
this._setupConfigForImage({ elNode: H }), H.setAttribute(UNRESOLVED_ATTR, ""), H.addEventListener("load", () => {
|
|
255
|
+
H.removeAttribute(UNRESOLVED_ATTR), U(H);
|
|
256
|
+
}), H.addEventListener("error", () => {
|
|
257
|
+
W(!1);
|
|
258
|
+
}), this._appendURL({
|
|
259
|
+
elNode: H,
|
|
260
|
+
src: f,
|
|
261
|
+
srcset: V
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
async _renderImage() {
|
|
266
|
+
if (this.$$("intersection")) {
|
|
267
|
+
this._hasPreviewImage && (this._setupConfigForImage({ elNode: this._imgPreview }), this.appendChild(this._imgPreview)), this.initIntersection(this._currentImg.img, async () => {
|
|
268
|
+
this._hasPreviewImage && (this._imgPreview.src = this._srcUrlPreview);
|
|
269
|
+
try {
|
|
270
|
+
await this._loaderImage({
|
|
271
|
+
src: this._getSrc(),
|
|
272
|
+
srcset: this._getSrcset(),
|
|
273
|
+
elNode: this._img
|
|
274
|
+
}), this._hasPreviewImage && await this._imgPreview.remove(), this.appendChild(this._img);
|
|
275
|
+
} catch {
|
|
276
|
+
this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
try {
|
|
282
|
+
this._hasPreviewImage && (await this._loaderImage({
|
|
283
|
+
src: this._srcUrlPreview,
|
|
284
|
+
elNode: this._imgPreview
|
|
285
|
+
}), this.appendChild(this._imgPreview)), await this._loaderImage({
|
|
286
|
+
src: this._getSrc(),
|
|
287
|
+
srcset: this._getSrcset(),
|
|
288
|
+
elNode: this._img
|
|
289
|
+
}), this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
|
|
290
|
+
} catch {
|
|
291
|
+
this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
init() {
|
|
295
|
+
this._bgSelector ? this._renderBackground() : this._renderImage();
|
|
296
|
+
}
|
|
297
|
+
}, Img = class extends ImgBase {
|
|
298
|
+
connectedCallback() {
|
|
299
|
+
super.connectedCallback(), this.sub$$("src", () => {
|
|
300
|
+
this.init();
|
|
301
|
+
}), this.sub$$("uuid", () => {
|
|
302
|
+
this.init();
|
|
303
|
+
}), this.sub$$("lazy", (f) => {
|
|
304
|
+
!this.$$("is-background-for") && !this.$$("is-preview-blur") && (this.img.loading = f ? "lazy" : "eager");
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}, LAST_ACTIVE_MODAL_ID = null, Modal = class extends LitBlock {
|
|
308
|
+
constructor(...f) {
|
|
309
|
+
super(...f), this.dialogEl = createRef(), this.strokes = !1, this.blockBodyScrolling = !1, this.closeDialog = () => {
|
|
310
|
+
this.modalManager?.close(this.id), this.modalManager?.hasActiveModals || (document.body.style.overflow = "", this.$["*currentActivity"] = null);
|
|
311
|
+
}, this._handleDialogClose = () => {
|
|
312
|
+
this.closeDialog();
|
|
313
|
+
}, this._handleDialogMouseDown = (f) => {
|
|
314
|
+
this._mouseDownTarget = f.target;
|
|
315
|
+
}, this._handleDialogMouseUp = (f) => {
|
|
316
|
+
let V = f.target;
|
|
317
|
+
V === this.dialogEl.value && V === this._mouseDownTarget && this.closeDialog();
|
|
318
|
+
}, this._handleModalOpen = ({ id: f }) => {
|
|
319
|
+
f === this.id ? (LAST_ACTIVE_MODAL_ID = f, this.show(), this.emit(EventType.MODAL_OPEN, { modalId: f }, { debounce: !0 })) : this.hide();
|
|
320
|
+
}, this._handleModalClose = ({ id: f }) => {
|
|
321
|
+
f === this.id && (this.hide(), this.emit(EventType.MODAL_CLOSE, {
|
|
322
|
+
modalId: f,
|
|
323
|
+
hasActiveModals: this.modalManager?.hasActiveModals
|
|
324
|
+
}, { debounce: !0 }));
|
|
325
|
+
}, this._handleModalCloseAll = (f) => {
|
|
326
|
+
this.hide(), LAST_ACTIVE_MODAL_ID === this.id && this.emit(EventType.MODAL_CLOSE, {
|
|
327
|
+
modalId: LAST_ACTIVE_MODAL_ID,
|
|
328
|
+
hasActiveModals: this.modalManager?.hasActiveModals
|
|
329
|
+
}, { debounce: !0 });
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
static {
|
|
333
|
+
this.styleAttrs = [...super.styleAttrs, "uc-modal"];
|
|
334
|
+
}
|
|
335
|
+
show() {
|
|
336
|
+
let f = this.dialogEl.value;
|
|
337
|
+
typeof f.showModal == "function" ? (this.setAttribute("aria-modal", "true"), f.showModal()) : f.setAttribute("open", ""), this.cfg.modalScrollLock && (document.body.style.overflow = "hidden");
|
|
338
|
+
}
|
|
339
|
+
hide() {
|
|
340
|
+
let f = this.dialogEl.value;
|
|
341
|
+
f && (typeof f.close == "function" ? (this.setAttribute("aria-modal", "false"), f.close()) : f.removeAttribute("open"));
|
|
40
342
|
}
|
|
41
343
|
initCallback() {
|
|
42
|
-
super.initCallback(), this.
|
|
344
|
+
super.initCallback(), this.modalManager?.registerModal(this.id, this), this.subConfigValue("modalBackdropStrokes", (f) => {
|
|
345
|
+
f ? this.setAttribute("strokes", "") : this.removeAttribute("strokes");
|
|
346
|
+
}), this.modalManager?.subscribe(ModalEvents.OPEN, this._handleModalOpen), this.modalManager?.subscribe(ModalEvents.CLOSE, this._handleModalClose), this.modalManager?.subscribe(ModalEvents.CLOSE_ALL, this._handleModalCloseAll);
|
|
347
|
+
}
|
|
348
|
+
disconnectedCallback() {
|
|
349
|
+
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);
|
|
350
|
+
}
|
|
351
|
+
_handleDialogRef(f) {
|
|
352
|
+
this.dialogEl = { value: f }, this.dialogEl.value?.addEventListener("close", this._handleDialogClose), this.dialogEl.value?.addEventListener("mousedown", this._handleDialogMouseDown), this.dialogEl.value?.addEventListener("mouseup", this._handleDialogMouseUp);
|
|
43
353
|
}
|
|
44
354
|
render() {
|
|
45
|
-
return html`
|
|
355
|
+
return html`
|
|
356
|
+
<dialog ${ref(this._handleDialogRef)}>
|
|
357
|
+
${this.yield("")}
|
|
358
|
+
</dialog>
|
|
359
|
+
`;
|
|
46
360
|
}
|
|
47
|
-
}
|
|
361
|
+
};
|
|
362
|
+
__decorate([property({
|
|
363
|
+
type: Boolean,
|
|
364
|
+
noAccessor: !0
|
|
365
|
+
})], Modal.prototype, "strokes", void 0), __decorate([property({
|
|
366
|
+
type: Boolean,
|
|
367
|
+
attribute: "block-body-scrolling",
|
|
368
|
+
noAccessor: !0
|
|
369
|
+
})], Modal.prototype, "blockBodyScrolling", void 0);
|
|
370
|
+
var FormInput = class extends LitUploaderBlock {
|
|
48
371
|
constructor(...f) {
|
|
49
|
-
super(...f), this.
|
|
372
|
+
super(...f), this._validationInputElement = null, this._dynamicInputsContainer = null;
|
|
50
373
|
}
|
|
51
|
-
|
|
52
|
-
this.
|
|
374
|
+
get _inputName() {
|
|
375
|
+
return this.nameAttrValue ?? this.ctxName;
|
|
53
376
|
}
|
|
54
|
-
|
|
55
|
-
|
|
377
|
+
_createValidationInput() {
|
|
378
|
+
let f = document.createElement("input");
|
|
379
|
+
return f.type = "text", f.name = this._inputName, f.required = this.cfg.multipleMin > 0, f.tabIndex = -1, applyStyles(f, {
|
|
380
|
+
opacity: 0,
|
|
381
|
+
height: 0,
|
|
382
|
+
width: 0
|
|
383
|
+
}), f;
|
|
56
384
|
}
|
|
57
385
|
initCallback() {
|
|
58
|
-
super.initCallback(), this.
|
|
386
|
+
super.initCallback(), this._validationInputElement = this._createValidationInput(), this.appendChild(this._validationInputElement), this.sub("*collectionState", (f) => {
|
|
387
|
+
if (!f) return;
|
|
388
|
+
if (!this._dynamicInputsContainer) {
|
|
389
|
+
let f = document.createElement("div");
|
|
390
|
+
this.appendChild(f), this._dynamicInputsContainer = f;
|
|
391
|
+
}
|
|
392
|
+
if (!this._validationInputElement) {
|
|
393
|
+
let f = this._createValidationInput();
|
|
394
|
+
this.appendChild(f), this._validationInputElement = f;
|
|
395
|
+
}
|
|
396
|
+
if (this._dynamicInputsContainer.innerHTML = "", f.status === "uploading" || f.status === "idle") {
|
|
397
|
+
this._validationInputElement.value = "", this._validationInputElement.setCustomValidity("");
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
if (f.status === "failed") {
|
|
401
|
+
let V = f.errors[0]?.message;
|
|
402
|
+
this._validationInputElement.value = "", this._validationInputElement.setCustomValidity(V ?? "");
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
let V = f.group ? f.group : null;
|
|
406
|
+
if (V) {
|
|
407
|
+
this._validationInputElement.value = V.cdnUrl ?? "", this._validationInputElement.setCustomValidity("");
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
let H = f.allEntries.map((f) => f.cdnUrl).filter((f) => typeof f == "string");
|
|
411
|
+
if (!this.cfg.multiple && H.length === 1 && H[0]) {
|
|
412
|
+
this._validationInputElement.value = H[0], this._validationInputElement.setCustomValidity("");
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
this._validationInputElement.remove(), this._validationInputElement = null;
|
|
416
|
+
let U = new DocumentFragment();
|
|
417
|
+
for (let f of H) {
|
|
418
|
+
let V = document.createElement("input");
|
|
419
|
+
V.type = "hidden", V.name = `${this._inputName}[]`, V.value = f, U.appendChild(V);
|
|
420
|
+
}
|
|
421
|
+
this._dynamicInputsContainer.replaceChildren(U);
|
|
422
|
+
}, !1);
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
__decorate([property({
|
|
426
|
+
type: String,
|
|
427
|
+
noAccessor: !0,
|
|
428
|
+
attribute: "name"
|
|
429
|
+
})], FormInput.prototype, "nameAttrValue", void 0);
|
|
430
|
+
var Copyright = class extends LitBlock {
|
|
431
|
+
initCallback() {
|
|
432
|
+
super.initCallback(), this.subConfigValue("removeCopyright", (f) => {
|
|
433
|
+
this.toggleAttribute("hidden", !!f);
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
render() {
|
|
437
|
+
return html`
|
|
438
|
+
<a
|
|
439
|
+
href="https://uploadcare.com/?utm_source=copyright&utm_medium=referral&utm_campaign=v4"
|
|
440
|
+
target="_blank noopener"
|
|
441
|
+
class="uc-credits"
|
|
442
|
+
>Powered by Uploadcare</a
|
|
443
|
+
>
|
|
444
|
+
`;
|
|
445
|
+
}
|
|
446
|
+
}, ProgressBar = class extends LitBlock {
|
|
447
|
+
constructor(...f) {
|
|
448
|
+
super(...f), this.hasFileName = !1, this.value = 0, this.visible = !0, this._progressValue = 0, this._fakeProgressLineRef = createRef(), this._handleFakeProgressAnimation = () => {
|
|
449
|
+
let f = this._fakeProgressLineRef.value;
|
|
450
|
+
if (f) {
|
|
451
|
+
if (!this.visible) {
|
|
452
|
+
f.classList.add("uc-fake-progress--hidden");
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
this._progressValue > 0 && f.classList.add("uc-fake-progress--hidden");
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
firstUpdated(f) {
|
|
460
|
+
super.firstUpdated(f), this._progressValue = this._normalizeProgressValue(this.value), this._updateProgressValueStyle(), this._fakeProgressLineRef.value?.addEventListener("animationiteration", this._handleFakeProgressAnimation);
|
|
461
|
+
}
|
|
462
|
+
updated(f) {
|
|
463
|
+
if (super.updated(f), f.has("value")) {
|
|
464
|
+
let f = this._normalizeProgressValue(this.value);
|
|
465
|
+
if (!this.visible) this._progressValue = f;
|
|
466
|
+
else {
|
|
467
|
+
let V = Math.max(this._progressValue, f);
|
|
468
|
+
V !== this._progressValue && (this._progressValue = V, this._updateProgressValueStyle());
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
f.has("visible") && (this.classList.toggle("uc-progress-bar--hidden", !this.visible), this.visible ? this._updateProgressValueStyle() : this._progressValue = this._normalizeProgressValue(this.value));
|
|
59
472
|
}
|
|
60
473
|
disconnectedCallback() {
|
|
61
|
-
super.disconnectedCallback(), this.
|
|
474
|
+
super.disconnectedCallback(), this._fakeProgressLineRef.value?.removeEventListener("animationiteration", this._handleFakeProgressAnimation);
|
|
475
|
+
}
|
|
476
|
+
_normalizeProgressValue(f) {
|
|
477
|
+
return Number.isFinite(f) ? Math.min(100, Math.max(0, f)) : 0;
|
|
478
|
+
}
|
|
479
|
+
_updateProgressValueStyle() {
|
|
480
|
+
this.visible && this.style.setProperty("--l-progress-value", this._progressValue.toString());
|
|
481
|
+
}
|
|
482
|
+
render() {
|
|
483
|
+
return html`
|
|
484
|
+
<div ${ref(this._fakeProgressLineRef)} class="uc-fake-progress"></div>
|
|
485
|
+
<div class="uc-progress"></div>
|
|
486
|
+
`;
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
__decorate([property({
|
|
490
|
+
type: Boolean,
|
|
491
|
+
noAccessor: !0
|
|
492
|
+
})], ProgressBar.prototype, "hasFileName", void 0), __decorate([property({ type: Number })], ProgressBar.prototype, "value", void 0), __decorate([property({
|
|
493
|
+
type: Boolean,
|
|
494
|
+
reflect: !0
|
|
495
|
+
})], ProgressBar.prototype, "visible", void 0);
|
|
496
|
+
var ProgressBarCommon = class extends LitUploaderBlock {
|
|
497
|
+
constructor() {
|
|
498
|
+
super(), this._visible = !1, this._value = 0, this.init$ = {
|
|
499
|
+
...this.init$,
|
|
500
|
+
"*commonProgress": 0
|
|
501
|
+
};
|
|
62
502
|
}
|
|
63
|
-
|
|
503
|
+
initCallback() {
|
|
504
|
+
super.initCallback(), this._unobserveCollectionCb = this.uploadCollection.observeProperties(() => {
|
|
505
|
+
this._visible = this.uploadCollection.items().some((f) => this.uploadCollection.read(f)?.getValue("isUploading") ?? !1);
|
|
506
|
+
}), this.sub("*commonProgress", (f) => {
|
|
507
|
+
this._value = f;
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
updated(f) {
|
|
511
|
+
super.updated(f), f.has("visible") && (this._visible ? this.setAttribute("active", "") : this.removeAttribute("active"));
|
|
512
|
+
}
|
|
513
|
+
disconnectedCallback() {
|
|
514
|
+
super.disconnectedCallback(), this._unobserveCollectionCb?.(), this._unobserveCollectionCb = void 0;
|
|
515
|
+
}
|
|
516
|
+
render() {
|
|
517
|
+
return html` <uc-progress-bar .value=${this._value} .visible=${this._visible}></uc-progress-bar> `;
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
__decorate([state()], ProgressBarCommon.prototype, "_visible", void 0), __decorate([state()], ProgressBarCommon.prototype, "_value", void 0);
|
|
521
|
+
var SourceBtn = class extends LitUploaderBlock {
|
|
522
|
+
constructor(...f) {
|
|
523
|
+
super(...f), this.couldBeCtxOwner = !0, this._iconName = "default", this._srcTypeKey = "";
|
|
524
|
+
}
|
|
525
|
+
willUpdate(f) {
|
|
526
|
+
super.willUpdate(f), f.has("source") && this._applySource(this.source);
|
|
527
|
+
}
|
|
528
|
+
_applySource(f) {
|
|
529
|
+
if (!f) {
|
|
530
|
+
this._srcTypeKey = "", this._iconName = "default";
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
let { label: V, icon: H, id: U } = f;
|
|
534
|
+
this._srcTypeKey = V, this._iconName = H ?? U ?? "default";
|
|
535
|
+
}
|
|
536
|
+
activate() {
|
|
537
|
+
this.source && this.source.onClick();
|
|
538
|
+
}
|
|
539
|
+
render() {
|
|
540
|
+
return html`
|
|
541
|
+
<button type="button" @click=${this.activate}>
|
|
542
|
+
<uc-icon name=${this._iconName}></uc-icon>
|
|
543
|
+
<div class="uc-txt">${this.l10n(this._srcTypeKey)}</div>
|
|
544
|
+
</button>
|
|
545
|
+
`;
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
__decorate([property({ attribute: !1 })], SourceBtn.prototype, "source", void 0), __decorate([state()], SourceBtn.prototype, "_iconName", void 0), __decorate([state()], SourceBtn.prototype, "_srcTypeKey", void 0);
|
|
549
|
+
var SourceList = class extends LitUploaderBlock {
|
|
550
|
+
constructor(...f) {
|
|
551
|
+
super(...f), this._rawSourceList = [], this._sources = [], this.wrap = !1;
|
|
552
|
+
}
|
|
553
|
+
initCallback() {
|
|
554
|
+
super.initCallback(), this.subConfigValue("sourceList", (V) => {
|
|
555
|
+
this._rawSourceList = stringToArray(V), this._updateSources();
|
|
556
|
+
});
|
|
557
|
+
let V = this._sharedInstancesBag.pluginManager;
|
|
558
|
+
V?.onPluginsChange && (this._unsubscribePlugins = V.onPluginsChange(() => this._updateSources()));
|
|
559
|
+
}
|
|
560
|
+
updated(f) {
|
|
561
|
+
super.updated(f), this.cfg.sourceListWrap ? this.style.removeProperty("display") : this.style.display = "contents";
|
|
562
|
+
}
|
|
563
|
+
_updateSources() {
|
|
564
|
+
let f = this._sharedInstancesBag.pluginManager?.snapshot().sources ?? [], V = new Map(f.map((f) => [f.id, f])), H = [];
|
|
565
|
+
this._rawSourceList.forEach((f) => {
|
|
566
|
+
let U = this._expandSource(f, V);
|
|
567
|
+
if (U.length !== 1 || U[0] !== f) {
|
|
568
|
+
for (let f of U) {
|
|
569
|
+
let U = this._makeBuiltInSourceConfig(f);
|
|
570
|
+
if (U) {
|
|
571
|
+
H.push(U);
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
let W = V.get(f);
|
|
575
|
+
W && H.push(this._makePluginSourceConfig(W));
|
|
576
|
+
}
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
let W = this._makeBuiltInSourceConfig(f);
|
|
580
|
+
if (W) {
|
|
581
|
+
H.push(W);
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
let G = V.get(f);
|
|
585
|
+
G && H.push(this._makePluginSourceConfig(G));
|
|
586
|
+
}), this._sources = H;
|
|
587
|
+
}
|
|
588
|
+
_expandSource(f, V) {
|
|
589
|
+
let H = V.get(f);
|
|
590
|
+
return H?.expand ? H.expand() : [f];
|
|
591
|
+
}
|
|
592
|
+
_makeBuiltInSourceConfig(f) {
|
|
593
|
+
switch (f) {
|
|
594
|
+
case UploadSource.LOCAL: return {
|
|
595
|
+
id: f,
|
|
596
|
+
label: `src-type-${f}`,
|
|
597
|
+
icon: f,
|
|
598
|
+
onClick: () => this.api.openSystemDialog()
|
|
599
|
+
};
|
|
600
|
+
default: break;
|
|
601
|
+
}
|
|
602
|
+
return null;
|
|
603
|
+
}
|
|
604
|
+
_makePluginSourceConfig(f) {
|
|
605
|
+
return {
|
|
606
|
+
id: f.id,
|
|
607
|
+
label: f.label,
|
|
608
|
+
icon: f.icon,
|
|
609
|
+
onClick: () => f.onSelect()
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
render() {
|
|
613
|
+
return html`${this._sources.map((f) => html`<uc-source-btn role="listitem" .source=${f} data-source-id=${f.id}></uc-source-btn>`)}`;
|
|
614
|
+
}
|
|
615
|
+
disconnectedCallback() {
|
|
616
|
+
this._unsubscribePlugins?.(), this._unsubscribePlugins = void 0, super.disconnectedCallback();
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
__decorate([state()], SourceList.prototype, "_sources", void 0), __decorate([property({
|
|
620
|
+
type: Boolean,
|
|
621
|
+
attribute: "wrap",
|
|
622
|
+
noAccessor: !0
|
|
623
|
+
})], SourceList.prototype, "wrap", void 0);
|
|
624
|
+
function generateThumb(f, V = 40) {
|
|
625
|
+
if (f.type === "image/svg+xml") return URL.createObjectURL(f);
|
|
626
|
+
let H = document.createElement("canvas"), U = H.getContext("2d");
|
|
627
|
+
if (!U) return Promise.reject(/* @__PURE__ */ Error("Canvas context not supported"));
|
|
628
|
+
let W = new Image(), G = new Promise((f, G) => {
|
|
629
|
+
W.onload = () => {
|
|
630
|
+
let K = W.height / W.width;
|
|
631
|
+
K > 1 ? (H.width = V, H.height = V * K) : (H.height = V, H.width = V / K), U.fillStyle = "rgb(240, 240, 240)", U.fillRect(0, 0, H.width, H.height), U.drawImage(W, 0, 0, H.width, H.height), H.toBlob((V) => {
|
|
632
|
+
if (!V) {
|
|
633
|
+
G();
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
f(URL.createObjectURL(V));
|
|
637
|
+
});
|
|
638
|
+
}, W.onerror = (f) => {
|
|
639
|
+
G(f);
|
|
640
|
+
};
|
|
641
|
+
});
|
|
642
|
+
return W.src = URL.createObjectURL(f), G;
|
|
643
|
+
}
|
|
644
|
+
var FileItemConfig = class extends LitUploaderBlock {
|
|
64
645
|
constructor(...f) {
|
|
65
646
|
super(...f), this._entrySubs = /* @__PURE__ */ new Set(), this.entry = null;
|
|
66
647
|
}
|
|
@@ -89,6 +670,210 @@ var BaseComponent = class extends RegisterableElementMixin(SymbioteMixin()(CssDa
|
|
|
89
670
|
disconnectedCallback() {
|
|
90
671
|
super.disconnectedCallback(), this._entrySubs = /* @__PURE__ */ new Set();
|
|
91
672
|
}
|
|
673
|
+
};
|
|
674
|
+
function createSvgBlobUrl(f) {
|
|
675
|
+
let V = new Blob([f], { type: "image/svg+xml" });
|
|
676
|
+
return URL.createObjectURL(V);
|
|
677
|
+
}
|
|
678
|
+
function fileCssBg(f = "hsl(209, 21%, 65%)", V = 32, H = 32) {
|
|
679
|
+
return createSvgBlobUrl(`
|
|
680
|
+
<svg width="${V}" height="${H}" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
681
|
+
<path fill-rule="evenodd" fill="${f}" 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"/>
|
|
682
|
+
</svg>
|
|
683
|
+
`);
|
|
684
|
+
}
|
|
685
|
+
var CDN_MAX_OUTPUT_DIMENSION = 3e3, Thumb = class extends FileItemConfig {
|
|
686
|
+
constructor(...f) {
|
|
687
|
+
super(...f), 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 (f, V = !1) => {
|
|
688
|
+
let H = f.getValue("fileInfo"), U = f.getValue("isImage"), W = f.getValue("uuid"), G = f.getValue("thumbUrl"), K = this._calculateThumbSize(V);
|
|
689
|
+
if (H && U && W) {
|
|
690
|
+
let V = await this.proxyUrl(createCdnUrl(createOriginalUrl(this.cfg.cdnCname, W), createCdnUrlModifiers(f.getValue("cdnUrlModifiers"), "stretch/off", `scale_crop/${K}x${K}/center`)));
|
|
691
|
+
if (G === V) return;
|
|
692
|
+
let { promise: H } = preloadImage(V);
|
|
693
|
+
H.then(() => {
|
|
694
|
+
f.setValue("thumbUrl", V), G?.startsWith("blob:") && URL.revokeObjectURL(G);
|
|
695
|
+
}).catch(async () => {
|
|
696
|
+
if (!G?.startsWith("blob:")) try {
|
|
697
|
+
let V = f.getValue("file");
|
|
698
|
+
if (!V) return;
|
|
699
|
+
let H = await generateThumb(V, K);
|
|
700
|
+
f.setValue("thumbUrl", H);
|
|
701
|
+
} catch (V) {
|
|
702
|
+
this.telemetryManager.sendEventError(V, "thumbnail generation. Failed to generate thumb from file");
|
|
703
|
+
let H = window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");
|
|
704
|
+
f.setValue("thumbUrl", fileCssBg(H));
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
if (f.getValue("thumbUrl")) return;
|
|
710
|
+
let q = f.getValue("file");
|
|
711
|
+
if (q?.type.includes("image")) try {
|
|
712
|
+
let V = await generateThumb(q, K);
|
|
713
|
+
f.setValue("thumbUrl", V);
|
|
714
|
+
} catch (V) {
|
|
715
|
+
this.telemetryManager.sendEventError(V, "thumbnail generation. Failed to generate thumb from file");
|
|
716
|
+
let H = window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");
|
|
717
|
+
f.setValue("thumbUrl", fileCssBg(H));
|
|
718
|
+
}
|
|
719
|
+
else {
|
|
720
|
+
let V = window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");
|
|
721
|
+
f.setValue("thumbUrl", fileCssBg(V));
|
|
722
|
+
}
|
|
723
|
+
}), this._debouncedGenerateThumb = debounce(this._generateThumbnail.bind(this), 100);
|
|
724
|
+
}
|
|
725
|
+
_calculateThumbSize(f = !1) {
|
|
726
|
+
f && (this._thumbRect = this.getBoundingClientRect());
|
|
727
|
+
let V = Math.max(parseInt(String(this?._thumbRect?.height || 0), 10), parseInt(String(this?._thumbRect?.width || 0), 10), this.cfg.thumbSize);
|
|
728
|
+
return window.devicePixelRatio > 1 && (V *= window.devicePixelRatio), Math.min(V, CDN_MAX_OUTPUT_DIMENSION);
|
|
729
|
+
}
|
|
730
|
+
_decodeImage(f, V) {
|
|
731
|
+
return new Promise((H, U) => {
|
|
732
|
+
let W = new Image();
|
|
733
|
+
W.decoding = "async";
|
|
734
|
+
let G = () => {
|
|
735
|
+
W &&= (W.onload = null, W.onerror = null, W.src = TRANSPARENT_PIXEL_SRC, V?.removeEventListener("abort", K), null);
|
|
736
|
+
}, K = () => {
|
|
737
|
+
G(), U(new DOMException("Aborted", "AbortError"));
|
|
738
|
+
};
|
|
739
|
+
if (V) {
|
|
740
|
+
if (V.aborted) {
|
|
741
|
+
K();
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
V.addEventListener("abort", K, { once: !0 });
|
|
745
|
+
}
|
|
746
|
+
let q = () => {
|
|
747
|
+
G(), H();
|
|
748
|
+
}, J = (f) => {
|
|
749
|
+
G(), U(f);
|
|
750
|
+
};
|
|
751
|
+
if (typeof W.decode == "function") {
|
|
752
|
+
W.src = f, W.decode().then(q).catch(J);
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
W.onload = q, W.onerror = J, W.src = f;
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
_cancelPendingThumbUpdate() {
|
|
759
|
+
this._pendingThumbUpdate?.cancel(), this._pendingThumbUpdate = void 0;
|
|
760
|
+
}
|
|
761
|
+
_scheduleThumbUpdate(f) {
|
|
762
|
+
if (this._cancelPendingThumbUpdate(), !f) {
|
|
763
|
+
this._thumbUrl &&= "";
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
if (f === this._thumbUrl) return;
|
|
767
|
+
let V = new AbortController(), H = {
|
|
768
|
+
controller: V,
|
|
769
|
+
cancel: () => {
|
|
770
|
+
V.abort(), H.rafId !== void 0 && window.cancelAnimationFrame(H.rafId);
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
this._pendingThumbUpdate = H, this._decodeImage(f, V.signal).then(() => {
|
|
774
|
+
V.signal.aborted || (H.rafId = window.requestAnimationFrame(() => {
|
|
775
|
+
V.signal.aborted || (this._thumbUrl = f);
|
|
776
|
+
}));
|
|
777
|
+
}).catch((f) => {
|
|
778
|
+
V.signal.aborted || f instanceof DOMException && f.name === "AbortError" || console.warn("[Thumb] Failed to decode thumbnail image", f);
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
_requestThumbGeneration(f = !1) {
|
|
782
|
+
if (this.entry) {
|
|
783
|
+
if (f) {
|
|
784
|
+
this._generateThumbnail(!0);
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
this._isIntersecting && this._debouncedGenerateThumb();
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
firstUpdated(f) {
|
|
791
|
+
super.firstUpdated(f), this._bindToEntry();
|
|
792
|
+
}
|
|
793
|
+
updated(f) {
|
|
794
|
+
super.updated(f), f.has("uid") && this._bindToEntry();
|
|
795
|
+
}
|
|
796
|
+
_observerCallback(f) {
|
|
797
|
+
let [V] = f;
|
|
798
|
+
V && (this._isIntersecting = V.isIntersecting, V.isIntersecting && (this._thumbRect = V.boundingClientRect, this._requestThumbGeneration(), this._observer?.disconnect()), V.intersectionRatio === 0 && this._debouncedGenerateThumb.cancel());
|
|
799
|
+
}
|
|
800
|
+
reset() {
|
|
801
|
+
super.reset(), this._debouncedGenerateThumb.cancel(), this._cancelPendingThumbUpdate(), this._thumbUrl &&= "";
|
|
802
|
+
}
|
|
803
|
+
_bindToEntry() {
|
|
804
|
+
let f = this.uid?.trim();
|
|
805
|
+
if (!f) {
|
|
806
|
+
this.entry && this.reset();
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
let V = this.uploadCollection?.read(f);
|
|
810
|
+
if (!V || V === this.entry) return;
|
|
811
|
+
this.reset(), this.entry = V;
|
|
812
|
+
let H = () => {
|
|
813
|
+
this._requestThumbGeneration();
|
|
814
|
+
};
|
|
815
|
+
this.subEntry("fileInfo", (f) => {
|
|
816
|
+
f?.isImage && H();
|
|
817
|
+
}), this.subEntry("thumbUrl", (f) => {
|
|
818
|
+
this._scheduleThumbUpdate(f ?? void 0);
|
|
819
|
+
}), this.subEntry("cdnUrlModifiers", H), this._requestThumbGeneration(!0);
|
|
820
|
+
}
|
|
821
|
+
initCallback() {
|
|
822
|
+
super.initCallback(), this.subConfigValue("filesViewMode", (f) => {
|
|
823
|
+
f === "grid" && !this._renderedGridOnce && (this._firstViewMode === "list" && this._requestThumbGeneration(!0), this._renderedGridOnce = !0);
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
connectedCallback() {
|
|
827
|
+
super.connectedCallback(), this._observer?.disconnect(), this._observer = new window.IntersectionObserver(this._observerCallback.bind(this), { threshold: .1 }), this._observer.observe(this);
|
|
828
|
+
}
|
|
829
|
+
disconnectedCallback() {
|
|
830
|
+
super.disconnectedCallback(), this._debouncedGenerateThumb.cancel(), this._cancelPendingThumbUpdate(), this._observer?.disconnect();
|
|
831
|
+
}
|
|
832
|
+
render() {
|
|
833
|
+
return html`
|
|
834
|
+
<div class="uc-thumb">
|
|
835
|
+
<img
|
|
836
|
+
class="uc-thumb__img"
|
|
837
|
+
src=${this._thumbUrl || "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}
|
|
838
|
+
role="img"
|
|
839
|
+
alt="Preview of uploaded image"
|
|
840
|
+
?hidden=${!this._thumbUrl}
|
|
841
|
+
draggable="false"
|
|
842
|
+
/>
|
|
843
|
+
<div class="uc-badge">
|
|
844
|
+
<uc-icon name=${this.badgeIcon}></uc-icon>
|
|
845
|
+
</div>
|
|
846
|
+
</div>
|
|
847
|
+
`;
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
__decorate([property({ type: String })], Thumb.prototype, "badgeIcon", void 0), __decorate([property({ attribute: !1 })], Thumb.prototype, "uid", void 0), __decorate([state()], Thumb.prototype, "_thumbUrl", void 0);
|
|
851
|
+
var StartFrom = class extends LitActivityBlock {
|
|
852
|
+
constructor(...f) {
|
|
853
|
+
super(...f), this.historyTracked = !0, this.activityType = LitActivityBlock.activities.START_FROM;
|
|
854
|
+
}
|
|
855
|
+
initCallback() {
|
|
856
|
+
super.initCallback(), this.registerActivity(this.activityType ?? "");
|
|
857
|
+
}
|
|
858
|
+
render() {
|
|
859
|
+
return html` <div class="uc-content">${this.yield("")}</div> `;
|
|
860
|
+
}
|
|
861
|
+
}, UploadCtxProvider = class extends LitUploaderBlock {
|
|
862
|
+
constructor(...f) {
|
|
863
|
+
super(...f), this._unbindEventEmitter = null;
|
|
864
|
+
}
|
|
865
|
+
static {
|
|
866
|
+
this.styleAttrs = ["uc-wgt-common"];
|
|
867
|
+
}
|
|
868
|
+
static {
|
|
869
|
+
this.EventType = EventType;
|
|
870
|
+
}
|
|
871
|
+
initCallback() {
|
|
872
|
+
super.initCallback(), this._unbindEventEmitter = this.eventEmitter.bindTarget(this);
|
|
873
|
+
}
|
|
874
|
+
disconnectedCallback() {
|
|
875
|
+
super.disconnectedCallback(), this._unbindEventEmitter?.();
|
|
876
|
+
}
|
|
92
877
|
}, FileItemState = Object.freeze({
|
|
93
878
|
FINISHED: Symbol("FINISHED"),
|
|
94
879
|
FAILED: Symbol("FAILED"),
|
|
@@ -519,8 +1304,8 @@ var dropAreaRegistry = /* @__PURE__ */ new Set(), DropArea = class extends LitUp
|
|
|
519
1304
|
});
|
|
520
1305
|
}), this.uploadCollection.size && (this.set$({ "*currentActivity": LitActivityBlock.activities.UPLOAD_LIST }), this.modalManager?.open(LitActivityBlock.activities.UPLOAD_LIST)));
|
|
521
1306
|
}
|
|
522
|
-
}), this.updateComplete.then(() => this._setupContentWrapperDropzone()), this.subConfigValue("sourceList", (
|
|
523
|
-
this._sourceListAllowsLocal = stringToArray(
|
|
1307
|
+
}), this.updateComplete.then(() => this._setupContentWrapperDropzone()), this.subConfigValue("sourceList", (V) => {
|
|
1308
|
+
this._sourceListAllowsLocal = stringToArray(V).includes(UploadSource.LOCAL), this._updateIsEnabled(), this._updateVisibility();
|
|
524
1309
|
});
|
|
525
1310
|
}
|
|
526
1311
|
willUpdate(f) {
|
|
@@ -606,8 +1391,8 @@ __decorate([property({
|
|
|
606
1391
|
reflect: !0
|
|
607
1392
|
})], DropArea.prototype, "initflow", void 0), __decorate([property({ type: String })], DropArea.prototype, "text", void 0), __decorate([state()], DropArea.prototype, "_isEnabled", void 0), __decorate([state()], DropArea.prototype, "_isVisible", void 0);
|
|
608
1393
|
var UploadList = class extends LitUploaderBlock {
|
|
609
|
-
constructor(...
|
|
610
|
-
super(...
|
|
1394
|
+
constructor(...f) {
|
|
1395
|
+
super(...f), 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 = () => {
|
|
611
1396
|
this.telemetryManager.sendEvent({
|
|
612
1397
|
eventType: InternalEventType.ACTION_EVENT,
|
|
613
1398
|
payload: { metadata: {
|
|
@@ -912,11 +1697,11 @@ var FileUploaderInline = class extends LitSolutionBlock {
|
|
|
912
1697
|
}
|
|
913
1698
|
initCallback() {
|
|
914
1699
|
super.initCallback(), this.telemetryManager.sendEvent({ eventType: InternalEventType.INIT_SOLUTION });
|
|
915
|
-
let
|
|
916
|
-
this.sub("*currentActivity", (
|
|
917
|
-
|
|
918
|
-
}), this.sub("*uploadList", (
|
|
919
|
-
Array.isArray(
|
|
1700
|
+
let f = this._getInitActivity();
|
|
1701
|
+
this.sub("*currentActivity", (V) => {
|
|
1702
|
+
V || (this.$["*currentActivity"] = f);
|
|
1703
|
+
}), this.sub("*uploadList", (V) => {
|
|
1704
|
+
Array.isArray(V) && V.length > 0 && this.$["*currentActivity"] === f && (this.$["*currentActivity"] = LitActivityBlock.activities.UPLOAD_LIST);
|
|
920
1705
|
}), this.sub("*history", () => {
|
|
921
1706
|
this._couldCancel = this._couldHistoryBack || this._couldShowList;
|
|
922
1707
|
});
|
|
@@ -961,11 +1746,11 @@ var ACTIVE_CLASS = "active", EMPTY_CLASS = "", FileUploaderMinimal = class exten
|
|
|
961
1746
|
}
|
|
962
1747
|
initCallback() {
|
|
963
1748
|
super.initCallback(), this.telemetryManager.sendEvent({ eventType: InternalEventType.INIT_SOLUTION });
|
|
964
|
-
let
|
|
965
|
-
this.sub("*currentActivity", (
|
|
966
|
-
|
|
967
|
-
}), this.sub("*uploadList", (
|
|
968
|
-
Array.isArray(
|
|
1749
|
+
let f = this._getInitActivity();
|
|
1750
|
+
this.sub("*currentActivity", (V) => {
|
|
1751
|
+
V === LitActivityBlock.activities.UPLOAD_LIST && this.modalManager?.closeAll(), V || (this.$["*currentActivity"] = f);
|
|
1752
|
+
}), this.sub("*uploadList", (V) => {
|
|
1753
|
+
Array.isArray(V) && V.length > 0 ? (this.$["*currentActivity"] = LitActivityBlock.activities.UPLOAD_LIST, this._classStartFrom = EMPTY_CLASS) : (this._classUploadList = EMPTY_CLASS, this._isHiddenStartFrom = !1, this.$["*currentActivity"] = f);
|
|
969
1754
|
}), this.subConfigValue("confirmUpload", (f) => {
|
|
970
1755
|
f !== !1 && (this.cfg.confirmUpload = !1);
|
|
971
1756
|
}), this.subConfigValue("filesViewMode", (f) => {
|
|
@@ -1008,4 +1793,4 @@ var ACTIVE_CLASS = "active", EMPTY_CLASS = "", FileUploaderMinimal = class exten
|
|
|
1008
1793
|
}
|
|
1009
1794
|
};
|
|
1010
1795
|
__decorate([state()], FileUploaderMinimal.prototype, "_singleUpload", void 0), __decorate([state()], FileUploaderMinimal.prototype, "_isHiddenStartFrom", void 0), __decorate([state()], FileUploaderMinimal.prototype, "_classUploadList", void 0), __decorate([state()], FileUploaderMinimal.prototype, "_classStartFrom", void 0);
|
|
1011
|
-
export { LitActivityBlock as ActivityBlock, BaseComponent, LitBlock as Block, CameraSource, Config, PubSub as Data, DropArea, ExternalSource, ExternalUploadSource, FileItem, FileUploaderInline, FileUploaderMinimal, FileUploaderRegular, ModalEvents, PACKAGE_NAME, PACKAGE_VERSION, PluginActivityHost, PluginActivityRenderer, SimpleBtn, LitSolutionBlock as SolutionBlock, StartFrom, UID, UploadCtxProvider, UploadList, UploadSource, LitUploaderBlock as UploaderBlock, UrlSource, defineComponents, defineLocale, loadFileUploaderFrom, toKebabCase };
|
|
1796
|
+
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 };
|