@uploadcare/file-uploader 1.27.1 → 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-DDwj1jCV.js +511 -0
- package/dist/CameraSource-n1tun2Df.js +10 -0
- package/dist/CameraSource.css +180 -0
- package/dist/CameraSource.layered.css +209 -0
- package/dist/CloudImageEditor-DcVoIRb3.js +2163 -0
- package/dist/CloudImageEditorActivity-Csij4nlC.js +87 -0
- package/dist/CloudImageEditorActivity-DD4NdU0P.js +9 -0
- package/dist/CloudImageEditorActivity.css +14 -0
- package/dist/CloudImageEditorActivity.layered.css +15 -0
- package/dist/Config-DKOromHY.js +433 -0
- package/dist/Config.css +4 -0
- package/dist/Config.layered.css +5 -0
- package/dist/ExternalSource-6MSUgxqy.js +10 -0
- package/dist/ExternalSource-DVEjSkPB.js +253 -0
- package/dist/ExternalSource.css +98 -0
- package/dist/ExternalSource.layered.css +116 -0
- package/dist/Icon-tXRTvEF2.js +1810 -0
- package/dist/Icon.css +14 -0
- package/dist/Icon.layered.css +15 -0
- package/dist/LitUploaderBlock-LxeOZ0ya.js +998 -0
- package/dist/UrlSource-BkyX00I2.js +73 -0
- package/dist/UrlSource-RI8TSD48.js +10 -0
- package/dist/UrlSource.css +17 -0
- package/dist/UrlSource.layered.css +18 -0
- package/dist/abstract/CTX.d.ts +40 -0
- package/dist/abstract/TypedCollection.d.ts +47 -0
- package/dist/abstract/TypedCollection.test.d.ts +1 -0
- package/dist/abstract/TypedData.d.ts +12 -0
- package/dist/abstract/TypedData.test.d.ts +1 -0
- package/dist/abstract/UploaderPublicApi.d.ts +41 -0
- package/dist/abstract/buildOutputCollectionState.d.ts +3 -0
- package/dist/abstract/customConfigOptions.d.ts +65 -0
- package/dist/abstract/defineComponents.d.ts +1 -0
- package/dist/abstract/features/ClipboardLayer.d.ts +12 -0
- package/dist/abstract/loadFileUploaderFrom.d.ts +3 -4
- package/dist/abstract/loadFileUploaderFrom.js +7 -6
- package/dist/abstract/localeRegistry.d.ts +5 -0
- package/dist/abstract/managers/LocaleManager.d.ts +10 -0
- package/dist/abstract/managers/ModalManager.d.ts +53 -0
- package/dist/abstract/managers/SecureUploadsManager.d.ts +7 -0
- package/dist/abstract/managers/TelemetryManager.d.ts +41 -0
- package/dist/abstract/managers/ValidationManager.d.ts +34 -0
- package/dist/abstract/managers/__tests__/ModalManager.test.d.ts +13 -0
- package/dist/abstract/managers/__tests__/SecureUploadsManager.test.d.ts +1 -0
- package/dist/abstract/managers/a11y.d.ts +9 -0
- package/dist/abstract/managers/plugin/PluginManager.d.ts +25 -0
- package/dist/abstract/managers/plugin/PluginTypes.d.ts +146 -0
- package/dist/abstract/managers/plugin/index.d.ts +2 -0
- package/dist/abstract/sharedConfigKey.d.ts +2 -0
- package/dist/abstract/uploadEntrySchema.d.ts +34 -0
- package/dist/blocks/ActivityHeader/ActivityHeader.d.ts +8 -0
- package/dist/blocks/CameraSource/CameraSource.d.ts +121 -0
- package/dist/blocks/CameraSource/__tests__/calcCameraModes.test.d.ts +1 -0
- package/dist/blocks/CameraSource/calcCameraModes.d.ts +5 -0
- package/dist/blocks/CameraSource/constants.d.ts +15 -0
- package/dist/blocks/CloudImageEditor/index.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +60 -0
- package/dist/blocks/CloudImageEditor/src/CropFrame.d.ts +56 -0
- package/dist/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +24 -0
- package/dist/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +14 -0
- package/dist/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +13 -0
- package/dist/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +35 -0
- package/dist/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +56 -0
- package/dist/blocks/CloudImageEditor/src/EditorImageFader.d.ts +63 -0
- package/dist/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +15 -0
- package/dist/blocks/CloudImageEditor/src/EditorScroller.d.ts +15 -0
- package/dist/blocks/CloudImageEditor/src/EditorSlider.d.ts +33 -0
- package/dist/blocks/CloudImageEditor/src/EditorToolbar.d.ts +68 -0
- package/dist/blocks/CloudImageEditor/src/crop-utils.d.ts +36 -0
- package/dist/blocks/CloudImageEditor/src/crop-utils.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/cropper-constants.d.ts +10 -0
- package/dist/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +31 -0
- package/dist/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +19 -0
- package/dist/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +27 -0
- package/dist/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +38 -0
- package/dist/blocks/CloudImageEditor/src/index.d.ts +15 -0
- package/dist/blocks/CloudImageEditor/src/lib/classNames.d.ts +5 -0
- package/dist/blocks/CloudImageEditor/src/lib/classNames.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/linspace.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/linspace.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +4 -0
- package/dist/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +2 -0
- package/dist/blocks/CloudImageEditor/src/lib/pick.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/pick.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +7 -0
- package/dist/blocks/CloudImageEditor/src/state.d.ts +20 -0
- package/dist/blocks/CloudImageEditor/src/svg-sprite.d.ts +2 -0
- package/dist/blocks/CloudImageEditor/src/toolbar-constants.d.ts +61 -0
- package/dist/blocks/CloudImageEditor/src/types.d.ts +60 -0
- package/dist/blocks/CloudImageEditor/src/util.d.ts +2 -0
- package/dist/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +7 -0
- package/dist/blocks/CloudImageEditor/src/utils/parseFilterValue.test.d.ts +1 -0
- package/dist/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +25 -0
- package/dist/blocks/Config/Config.d.ts +60 -0
- package/dist/blocks/Config/assertions.d.ts +5 -0
- package/dist/blocks/Config/computed-properties.d.ts +24 -0
- package/dist/blocks/Config/computed-properties.test.d.ts +1 -0
- package/dist/blocks/Config/initialConfig.d.ts +6 -0
- package/dist/blocks/Config/normalizeConfigValue.d.ts +2 -0
- package/dist/blocks/Config/validatorsType.d.ts +18 -0
- package/dist/blocks/Copyright/Copyright.d.ts +10 -0
- package/dist/blocks/DropArea/DropArea.d.ts +47 -0
- package/dist/blocks/DropArea/addDropzone.d.ts +17 -0
- package/dist/blocks/DropArea/getDropItems.d.ts +12 -0
- package/dist/blocks/ExternalSource/ExternalSource.d.ts +45 -0
- package/dist/blocks/ExternalSource/MessageBridge.d.ts +11 -0
- package/dist/blocks/ExternalSource/buildThemeDefinition.d.ts +4 -0
- package/dist/blocks/ExternalSource/query-string.d.ts +1 -0
- package/dist/blocks/ExternalSource/types.d.ts +105 -0
- package/dist/blocks/FileItem/FileItem.d.ts +50 -0
- package/dist/blocks/FileItem/FileItemConfig.d.ts +10 -0
- package/dist/blocks/FormInput/FormInput.d.ts +18 -0
- package/dist/blocks/Icon/Icon.d.ts +19 -0
- package/dist/blocks/Img/Img.d.ts +14 -0
- package/dist/blocks/Img/ImgBase.d.ts +29 -0
- package/dist/blocks/Img/ImgConfig.d.ts +28 -0
- package/dist/blocks/Img/configurations.d.ts +11 -0
- package/dist/blocks/Img/props-map.d.ts +28 -0
- package/dist/blocks/Img/utils/parseObjectToString.d.ts +2 -0
- package/dist/blocks/Modal/Modal.d.ts +34 -0
- package/dist/blocks/PluginActivityRenderer/PluginActivityRenderer.d.ts +32 -0
- package/dist/blocks/PluginActivityRenderer/index.d.ts +1 -0
- package/dist/blocks/ProgressBar/ProgressBar.d.ts +21 -0
- package/dist/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +17 -0
- package/dist/blocks/Select/Select.d.ts +18 -0
- package/dist/blocks/SimpleBtn/SimpleBtn.d.ts +15 -0
- package/dist/blocks/SourceBtn/SourceBtn.d.ts +23 -0
- package/dist/blocks/SourceList/SourceList.d.ts +24 -0
- package/dist/blocks/Spinner/Spinner.d.ts +9 -0
- package/dist/blocks/StartFrom/StartFrom.d.ts +12 -0
- package/dist/blocks/Thumb/Thumb.d.ts +35 -0
- package/dist/blocks/UploadCtxProvider/EventEmitter.d.ts +70 -0
- package/dist/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +44 -0
- package/dist/blocks/UploadList/UploadList.d.ts +39 -0
- package/dist/blocks/UrlSource/UrlSource.d.ts +14 -0
- package/dist/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -0
- package/dist/blocks/themes/uc-basic/svg-sprite.d.ts +2 -0
- package/dist/cameraPlugin-weRKO7eG.js +8 -0
- package/dist/cloud-image-editor-hhbyNWLG.js +11 -0
- 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/core.d.ts +42 -0
- package/dist/en-8OWEmZim.js +135 -0
- package/dist/env-mM-ksNPq.js +8 -0
- package/dist/env.d.ts +2 -4
- package/dist/env.js +7 -6
- 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 -6
- package/dist/index.d.ts +42 -2715
- package/dist/index.js +1796 -8
- package/dist/index.layered.css +9 -7
- package/dist/instagramPlugin-CXRm8MGL.js +8 -0
- package/dist/lit/BaseComponent.d.ts +12 -0
- package/dist/lit/Constructor.d.ts +1 -0
- package/dist/lit/CssDataMixin.d.ts +7 -0
- package/dist/lit/LightDomMixin.d.ts +8 -0
- package/dist/lit/LitActivityBlock.d.ts +53 -0
- package/dist/lit/LitBlock.d.ts +83 -0
- package/dist/lit/LitSolutionBlock.d.ts +21 -0
- package/dist/lit/LitUploaderBlock.d.ts +53 -0
- package/dist/lit/PubSubCompat.d.ts +18 -0
- package/dist/lit/RegisterableElementMixin.d.ts +7 -0
- package/dist/lit/SharedState.d.ts +119 -0
- package/dist/lit/SymbioteCompatMixin.d.ts +40 -0
- package/dist/lit/TestModeController.d.ts +16 -0
- package/dist/lit/Uid.d.ts +3 -0
- package/dist/lit/activity-constants.d.ts +11 -0
- package/dist/lit/createDebugPrinter.d.ts +3 -0
- package/dist/lit/findBlockInCtx.d.ts +3 -0
- package/dist/lit/getOutputData.d.ts +2 -0
- package/dist/lit/hasBlockInCtx.d.ts +3 -0
- package/dist/lit/l10n.d.ts +5 -0
- package/dist/lit/parseCssPropertyValue.d.ts +1 -0
- package/dist/lit/shared-instances.d.ts +65 -0
- package/dist/loadFileUploaderFrom-Bfz8L3VB.js +28 -0
- package/dist/locales/file-uploader/ar.d.ts +1 -4
- package/dist/locales/file-uploader/ar.js +142 -6
- package/dist/locales/file-uploader/az.d.ts +1 -4
- package/dist/locales/file-uploader/az.js +134 -6
- package/dist/locales/file-uploader/ca.d.ts +1 -4
- package/dist/locales/file-uploader/ca.js +136 -6
- package/dist/locales/file-uploader/cs.d.ts +1 -4
- package/dist/locales/file-uploader/cs.js +138 -6
- package/dist/locales/file-uploader/da.d.ts +1 -4
- package/dist/locales/file-uploader/da.js +134 -6
- package/dist/locales/file-uploader/de.d.ts +1 -4
- package/dist/locales/file-uploader/de.js +134 -6
- package/dist/locales/file-uploader/el.d.ts +1 -4
- package/dist/locales/file-uploader/el.js +134 -6
- package/dist/locales/file-uploader/en.d.ts +1 -4
- package/dist/locales/file-uploader/en.js +7 -6
- package/dist/locales/file-uploader/es.d.ts +1 -4
- package/dist/locales/file-uploader/es.js +136 -6
- package/dist/locales/file-uploader/et.d.ts +1 -4
- package/dist/locales/file-uploader/et.js +134 -6
- package/dist/locales/file-uploader/fi.d.ts +1 -4
- package/dist/locales/file-uploader/fi.js +134 -6
- package/dist/locales/file-uploader/fr.d.ts +1 -4
- package/dist/locales/file-uploader/fr.js +136 -6
- package/dist/locales/file-uploader/he.d.ts +1 -4
- package/dist/locales/file-uploader/he.js +136 -6
- package/dist/locales/file-uploader/hy.d.ts +1 -4
- package/dist/locales/file-uploader/hy.js +134 -6
- package/dist/locales/file-uploader/is.d.ts +1 -4
- package/dist/locales/file-uploader/is.js +134 -6
- package/dist/locales/file-uploader/it.d.ts +1 -4
- package/dist/locales/file-uploader/it.js +136 -6
- package/dist/locales/file-uploader/ja.d.ts +1 -4
- package/dist/locales/file-uploader/ja.js +134 -6
- package/dist/locales/file-uploader/ka.d.ts +1 -4
- package/dist/locales/file-uploader/ka.js +134 -6
- package/dist/locales/file-uploader/kk.d.ts +1 -4
- package/dist/locales/file-uploader/kk.js +134 -6
- package/dist/locales/file-uploader/ko.d.ts +1 -4
- package/dist/locales/file-uploader/ko.js +134 -6
- package/dist/locales/file-uploader/lv.d.ts +1 -4
- package/dist/locales/file-uploader/lv.js +136 -6
- package/dist/locales/file-uploader/nb.d.ts +1 -4
- package/dist/locales/file-uploader/nb.js +134 -6
- package/dist/locales/file-uploader/nl.d.ts +1 -4
- package/dist/locales/file-uploader/nl.js +134 -6
- package/dist/locales/file-uploader/pl.d.ts +1 -4
- package/dist/locales/file-uploader/pl.js +138 -6
- package/dist/locales/file-uploader/pt.d.ts +1 -4
- package/dist/locales/file-uploader/pt.js +136 -6
- package/dist/locales/file-uploader/ro.d.ts +1 -4
- package/dist/locales/file-uploader/ro.js +136 -6
- package/dist/locales/file-uploader/ru.d.ts +1 -4
- package/dist/locales/file-uploader/ru.js +138 -6
- package/dist/locales/file-uploader/sk.d.ts +1 -4
- package/dist/locales/file-uploader/sk.js +138 -6
- package/dist/locales/file-uploader/sr.d.ts +1 -4
- package/dist/locales/file-uploader/sr.js +136 -6
- package/dist/locales/file-uploader/sv.d.ts +1 -4
- package/dist/locales/file-uploader/sv.js +134 -6
- package/dist/locales/file-uploader/tr.d.ts +1 -4
- package/dist/locales/file-uploader/tr.js +134 -6
- package/dist/locales/file-uploader/uk.d.ts +1 -4
- package/dist/locales/file-uploader/uk.js +138 -6
- package/dist/locales/file-uploader/vi.d.ts +1 -4
- package/dist/locales/file-uploader/vi.js +134 -6
- package/dist/locales/file-uploader/zh-TW.d.ts +1 -4
- package/dist/locales/file-uploader/zh-TW.js +134 -6
- package/dist/locales/file-uploader/zh.d.ts +1 -4
- package/dist/locales/file-uploader/zh.js +134 -6
- package/dist/plugins/cameraPlugin.d.ts +2 -0
- package/dist/plugins/cloudImageEditorPlugin.d.ts +2 -0
- package/dist/plugins/externalSourcesPlugin.d.ts +2 -0
- package/dist/plugins/imageShrinkPlugin.d.ts +2 -0
- package/dist/plugins/instagramPlugin.d.ts +2 -0
- package/dist/plugins/unsplashPlugin.d.ts +16 -0
- package/dist/plugins/urlSourcePlugin.d.ts +2 -0
- package/dist/plugins-CGUls7EV.js +278 -0
- package/dist/solutions/adaptive-image/index.d.ts +2 -0
- package/dist/solutions/cloud-image-editor/CloudImageEditor.d.ts +11 -0
- package/dist/solutions/cloud-image-editor/index.d.ts +5 -0
- package/dist/solutions/file-uploader/inline/FileUploaderInline.d.ts +20 -0
- package/dist/solutions/file-uploader/inline/index.d.ts +1 -0
- package/dist/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +23 -0
- package/dist/solutions/file-uploader/minimal/index.d.ts +1 -0
- package/dist/solutions/file-uploader/regular/FileUploaderRegular.d.ts +17 -0
- package/dist/solutions/file-uploader/regular/index.d.ts +1 -0
- package/dist/types/dom.d.ts +1 -0
- package/dist/types/events.d.ts +4 -0
- package/dist/types/exported.d.ts +492 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/urlSourcePlugin-_WdbEhq2.js +8 -0
- package/dist/utils/UID.d.ts +5 -0
- package/dist/utils/UID.test.d.ts +1 -0
- package/dist/utils/UploadSource.d.ts +37 -0
- package/dist/utils/WindowHeightTracker.d.ts +9 -0
- package/dist/utils/abilities.d.ts +1 -0
- package/dist/utils/applyStyles.d.ts +1 -0
- package/dist/utils/browser-info.d.ts +12 -0
- package/dist/utils/browser-info.test.d.ts +1 -0
- package/dist/utils/cdn-utils.d.ts +53 -0
- package/dist/utils/cdn-utils.test.d.ts +1 -0
- package/dist/utils/comma-separated.d.ts +2 -0
- package/dist/utils/debounce.d.ts +3 -0
- package/dist/utils/delay.d.ts +1 -0
- package/dist/utils/fileTypes.d.ts +11 -0
- package/dist/utils/fileTypes.test.d.ts +1 -0
- package/dist/utils/get-top-level-origin.d.ts +1 -0
- package/dist/utils/get-top-level-origin.test.d.ts +1 -0
- package/dist/utils/getLocaleDirection.d.ts +1 -0
- package/dist/utils/getPluralForm.d.ts +1 -0
- package/dist/utils/getPluralForm.test.d.ts +1 -0
- package/dist/utils/isPromiseLike.d.ts +1 -0
- package/dist/utils/isPromiseLike.test.d.ts +1 -0
- package/dist/utils/isSecureTokenExpired.d.ts +8 -0
- package/dist/utils/isSecureTokenExpired.test.d.ts +1 -0
- package/dist/utils/memoize.d.ts +1 -0
- package/dist/utils/memoize.test.d.ts +1 -0
- package/dist/utils/mixinClass.d.ts +8 -0
- package/dist/utils/parseCdnUrl.d.ts +11 -0
- package/dist/utils/parseCdnUrl.test.d.ts +1 -0
- package/dist/utils/parseShrink.d.ts +7 -0
- package/dist/utils/parseShrink.test.d.ts +1 -0
- package/dist/utils/preloadImage.d.ts +10 -0
- package/dist/utils/prettyBytes.d.ts +11 -0
- package/dist/utils/prettyBytes.test.d.ts +1 -0
- package/dist/utils/resizeImage.d.ts +1 -0
- package/dist/utils/stringToArray.d.ts +1 -0
- package/dist/utils/stringToArray.test.d.ts +1 -0
- package/dist/utils/template-utils.d.ts +16 -0
- package/dist/utils/template-utils.test.d.ts +1 -0
- package/dist/utils/throttle.d.ts +3 -0
- package/dist/utils/toKebabCase.d.ts +2 -0
- package/dist/utils/toKebabCase.test.d.ts +1 -0
- package/dist/utils/transparentPixelSrc.d.ts +1 -0
- package/dist/utils/uniqueArray.d.ts +1 -0
- package/dist/utils/uniqueArray.test.d.ts +1 -0
- package/dist/utils/userAgent.d.ts +2 -0
- package/dist/utils/validators/collection/index.d.ts +2 -0
- package/dist/utils/validators/collection/validateCollectionUploadError.d.ts +2 -0
- package/dist/utils/validators/collection/validateMultiple.d.ts +2 -0
- package/dist/utils/validators/file/index.d.ts +4 -0
- package/dist/utils/validators/file/validateFileType.d.ts +2 -0
- package/dist/utils/validators/file/validateIsImage.d.ts +2 -0
- package/dist/utils/validators/file/validateMaxSizeLimit.d.ts +2 -0
- package/dist/utils/validators/file/validateUploadError.d.ts +2 -0
- package/dist/utils/warnOnce.d.ts +1 -0
- package/dist/utils/wildcardRegexp.d.ts +1 -0
- package/dist/utils/wildcardRegexp.test.d.ts +1 -0
- package/dist/utils/withResolvers.d.ts +5 -0
- package/dist/utils/withResolvers.test.d.ts +1 -0
- package/package.json +8 -2
- 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 -8
- package/web/file-uploader.min.js +1858 -7
- 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 -7
- package/web/uc-basic.min.css +5487 -6
- package/web/uc-cloud-image-editor.layered.min.css +1884 -7
- package/web/uc-cloud-image-editor.min.css +1675 -6
- package/web/uc-cloud-image-editor.min.js +456 -7
- package/web/uc-file-uploader-inline.layered.min.css +4352 -7
- package/web/uc-file-uploader-inline.min.css +3836 -6
- package/web/uc-file-uploader-inline.min.js +1858 -7
- package/web/uc-file-uploader-minimal.layered.min.css +4352 -7
- package/web/uc-file-uploader-minimal.min.css +3836 -6
- package/web/uc-file-uploader-minimal.min.js +1858 -7
- package/web/uc-file-uploader-regular.layered.min.css +4352 -7
- package/web/uc-file-uploader-regular.min.css +3836 -6
- package/web/uc-file-uploader-regular.min.js +1858 -7
- package/web/uc-img.min.js +894 -7
- 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/index.ssr.js +0 -1538
- package/web/file-uploader.iife.min.d.ts +0 -2859
- package/web/file-uploader.iife.min.js.LEGAL.txt +0 -71
- package/web/file-uploader.min.d.ts +0 -2859
- package/web/file-uploader.min.js.LEGAL.txt +0 -71
- package/web/uc-cloud-image-editor.min.d.ts +0 -2816
- package/web/uc-cloud-image-editor.min.js.LEGAL.txt +0 -70
- package/web/uc-file-uploader-inline.min.d.ts +0 -2859
- package/web/uc-file-uploader-inline.min.js.LEGAL.txt +0 -71
- package/web/uc-file-uploader-minimal.min.d.ts +0 -2859
- package/web/uc-file-uploader-minimal.min.js.LEGAL.txt +0 -71
- package/web/uc-file-uploader-regular.min.d.ts +0 -2859
- package/web/uc-file-uploader-regular.min.js.LEGAL.txt +0 -71
- package/web/uc-img.min.d.ts +0 -75
- package/web/uc-img.min.js.LEGAL.txt +0 -24
package/web/uc-img.min.js
CHANGED
|
@@ -1,8 +1,895 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var Kt=n=>{if(typeof n!="string"||!n)return "";let t=n.trim();return t.startsWith("-/")?t=t.slice(2):t.startsWith("/")&&(t=t.slice(1)),t.endsWith("/")&&(t=t.slice(0,t.length-1)),t},Vt=(...n)=>n.filter(t=>typeof t=="string"&&!!t).map(t=>Kt(t)).join("/-/"),lt=(...n)=>{let t=Vt(...n);return t?`-/${t}/`:""};function ct(n){let t=new URL(n),e=t.pathname+t.search+t.hash,s=e.lastIndexOf("http"),i=e.lastIndexOf("/"),r="";return s>=0?r=e.slice(s):i>=0&&(r=e.slice(i+1)),r}function Bt(n){let t=new URL(n),e=ct(n),s=ht(e)?pt(e).pathname:e;return t.pathname=t.pathname.replace(s,""),t.search="",t.hash="",t.toString()}function ht(n){return n.startsWith("http")}function pt(n){let t=new URL(n);return {pathname:`${t.origin}${t.pathname??""}`,search:t.search??"",hash:t.hash??""}}var S=(n,t,e)=>{let s=new URL(Bt(n)),i=e??ct(n),r=t??"";if(s.pathname.startsWith("//")&&(s.pathname=s.pathname.replace("//","/")),i&&ht(i)){let o=pt(i);s.pathname=`${s.pathname}${r}${o.pathname||""}`,s.search=o.search,s.hash=o.hash;}else s.pathname=`${s.pathname}${r}${i||""}`;return s.toString()},H=(n,t)=>{let e=new URL(n);return e.pathname=`${t}/`,e.toString()};var dt=(n,t=",")=>n.trim().split(t).map(e=>e.trim()).filter(e=>e.length>0);var Ht=n=>n;function ut(n,t={},e={}){let{openToken:s="{{",closeToken:i="}}",transform:r=Ht}=e;for(let o in t){let l=t[o],a=l?.toString(),h=typeof a=="string"?r(a):String(a);n=n.replaceAll(s+o+i,h);}return n}var mt=n=>[...new Set(n)];var b="--uc-img-",W="unresolved";var F=!window.location.host.trim()||window.location.host.includes(":")||window.location.hostname.includes("localhost"),Q=3e3,q=5e3,G=Object.freeze({PREVIEW:"PREVIEW",MAIN:"MAIN"});var L=globalThis,j=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gt=Symbol(),ft=new WeakMap,k=class{constructor(t,e,s){if(this.St=true,s!==gt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o,e=this.t;if(j&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=ft.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ft.set(e,t));}return t}toString(){return this.cssText}},yt=n=>new k(typeof n=="string"?n:n+"",void 0,gt);var bt=(n,t)=>{if(j)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=L.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,n.appendChild(s);}},J=j?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return yt(e)})(n):n;var{is:Wt,defineProperty:Ft,getOwnPropertyDescriptor:Qt,getOwnPropertyNames:qt,getOwnPropertySymbols:Gt,getPrototypeOf:Jt}=Object,N=globalThis,vt=N.trustedTypes,Xt=vt?vt.emptyScript:"",Zt=N.reactiveElementPolyfillSupport,$=(n,t)=>n,X={toAttribute(n,t){switch(t){case Boolean:n=n?Xt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n);}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n);}catch{e=null;}}return e}},wt=(n,t)=>!Wt(n,t),xt={attribute:true,type:String,converter:X,reflect:false,useDefault:false,hasChanged:wt};Symbol.metadata??=Symbol("metadata"),N.litPropertyMetadata??=new WeakMap;var m=class extends HTMLElement{static addInitializer(t){this.G(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this.S&&[...this.S.keys()]}static createProperty(t,e=xt){if(e.state&&(e.attribute=false),this.G(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ft(this.prototype,t,i);}}static getPropertyDescriptor(t,e,s){let{get:i,set:r}=Qt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o;}};return {get:i,set(o){let l=i?.call(this);r?.call(this,o),this.requestUpdate(t,l,s);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??xt}static G(){if(this.hasOwnProperty($("elementProperties")))return;let t=Jt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty($("finalized")))return;if(this.finalized=true,this.G(),this.hasOwnProperty($("properties"))){let e=this.properties,s=[...qt(e),...Gt(e)];for(let i of s)this.createProperty(i,e[i]);}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i);}this.S=new Map;for(let[e,s]of this.elementProperties){let i=this.J(e,s);i!==void 0&&this.S.set(i,e);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(J(i));}else t!==void 0&&e.push(J(t));return e}static J(t,e){let s=e.attribute;return s===false?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._=void 0,this.isUpdatePending=false,this.hasUpdated=false,this.f=null,this.Ct();}Ct(){this.X=new Promise(t=>this.enableUpdating=t),this.c=new Map,this.Tt(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this.x??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.();}removeController(t){this.x?.delete(t);}Tt(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._=t);}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return bt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this.x?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this.x?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,e,s){this.Z(t,s);}Pt(t,e){let s=this.constructor.elementProperties.get(t),i=this.constructor.J(t,s);if(i!==void 0&&s.reflect===true){let r=(s.converter?.toAttribute!==void 0?s.converter:X).toAttribute(e,s.type);this.f=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this.f=null;}}Z(t,e){let s=this.constructor,i=s.S.get(t);if(i!==void 0&&this.f!==i){let r=s.getPropertyOptions(i),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:X;this.f=i;let l=o.fromAttribute(e,r.type);this[i]=l??this.Y?.get(i)??l,this.f=null;}}requestUpdate(t,e,s,i=false,r){if(t!==void 0){let o=this.constructor;if(i===false&&(r=this[t]),s??=o.getPropertyOptions(t),!((s.hasChanged??wt)(r,e)||s.useDefault&&s.reflect&&r===this.Y?.get(t)&&!this.hasAttribute(o.J(t,s))))return;this.C(t,e,s);}this.isUpdatePending===false&&(this.X=this.$t());}C(t,e,{useDefault:s,reflect:i,wrapped:r},o){s&&!(this.Y??=new Map).has(t)&&(this.Y.set(t,o??e??this[t]),r!==true||o!==void 0)||(this.c.has(t)||(this.hasUpdated||s||(e=void 0),this.c.set(t,e)),i===true&&this.f!==t&&(this.lt??=new Set).add(t));}async $t(){this.isUpdatePending=true;try{await this.X;}catch(e){Promise.reject(e);}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._){for(let[i,r]of this._)this[i]=r;this._=void 0;}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,r]of s){let{wrapped:o}=r,l=this[i];o!==true||this.c.has(i)||l===void 0||this.C(i,void 0,r,l);}}let t=false,e=this.c;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this.x?.forEach(s=>s.hostUpdate?.()),this.update(e)):this.tt();}catch(s){throw t=false,this.tt(),s}t&&this.Ot(e);}willUpdate(t){}Ot(t){this.x?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}tt(){this.c=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.X}shouldUpdate(t){return true}update(t){this.lt&&=this.lt.forEach(e=>this.Pt(e,this[e])),this.tt();}updated(t){}firstUpdated(t){}};m.elementStyles=[],m.shadowRootOptions={mode:"open"},m[$("elementProperties")]=new Map,m[$("finalized")]=new Map,Zt?.({ReactiveElement:m}),(N.reactiveElementVersions??=[]).push("2.1.2");var nt=globalThis,Et=n=>n,_=nt.trustedTypes,St=_?_.createPolicy("lit-html",{createHTML:n=>n}):void 0,At="$lit$",g=`lit$${Math.random().toFixed(9).slice(2)}$`,Ut="?"+g,Yt=`<${Ut}>`,w=document,A=()=>w.createComment(""),U=n=>n===null||typeof n!="object"&&typeof n!="function",rt=Array.isArray,te=n=>rt(n)||typeof n?.[Symbol.iterator]=="function",Z=`[ \f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ct=/-->/g,Tt=/>/g,v=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),Pt=/'/g,$t=/"/g,Rt=/^(?:script|style|textarea|title)$/i,E=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Ot=new WeakMap,x=w.createTreeWalker(w,129);function Mt(n,t){if(!rt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return St!==void 0?St.createHTML(t):t}var ee=(n,t)=>{let e=n.length-1,s=[],i,r=t===2?"<svg>":t===3?"<math>":"",o=O;for(let l=0;l<e;l++){let a=n[l],h,p,c=-1,u=0;for(;u<a.length&&(o.lastIndex=u,p=o.exec(a),p!==null);)u=o.lastIndex,o===O?p[1]==="!--"?o=Ct:p[1]!==void 0?o=Tt:p[2]!==void 0?(Rt.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=v):p[3]!==void 0&&(o=v):o===v?p[0]===">"?(o=i??O,c=-1):p[1]===void 0?c=-2:(c=o.lastIndex-p[2].length,h=p[1],o=p[3]===void 0?v:p[3]==='"'?$t:Pt):o===$t||o===Pt?o=v:o===Ct||o===Tt?o=O:(o=v,i=void 0);let f=o===v&&n[l+1].startsWith("/>")?" ":"";r+=o===O?a+Yt:c>=0?(s.push(h),a.slice(0,c)+At+a.slice(c)+g+f):a+g+(c===-2?l:f);}return [Mt(n,r+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},R=class n{constructor({strings:t,et:e},s){let i;this.parts=[];let r=0,o=0,l=t.length-1,a=this.parts,[h,p]=ee(t,e);if(this.el=n.createElement(h,s),x.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes);}for(;(i=x.nextNode())!==null&&a.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(let c of i.getAttributeNames())if(c.endsWith(At)){let u=p[o++],f=i.getAttribute(c).split(g),I=/([.?@])?(.*)/.exec(u);a.push({type:1,index:r,name:I[2],strings:f,ctor:I[1]==="."?tt:I[1]==="?"?et:I[1]==="@"?st:T}),i.removeAttribute(c);}else c.startsWith(g)&&(a.push({type:6,index:r}),i.removeAttribute(c));if(Rt.test(i.tagName)){let c=i.textContent.split(g),u=c.length-1;if(u>0){i.textContent=_?_.emptyScript:"";for(let f=0;f<u;f++)i.append(c[f],A()),x.nextNode(),a.push({type:2,index:++r});i.append(c[u],A());}}}else if(i.nodeType===8)if(i.data===Ut)a.push({type:2,index:r});else {let c=-1;for(;(c=i.data.indexOf(g,c+1))!==-1;)a.push({type:7,index:r}),c+=g.length-1;}r++;}}static createElement(t,e){let s=w.createElement("template");return s.innerHTML=t,s}};function C(n,t,e=n,s){if(t===E)return t;let i=s!==void 0?e.At?.[s]:e.Ut,r=U(t)?void 0:t.zt;return i?.constructor!==r&&(i?.Kt?.(false),r===void 0?i=void 0:(i=new r(n),i.Vt(n,e,s)),s!==void 0?(e.At??=[])[s]=i:e.Ut=i),i!==void 0&&(t=C(n,i.Bt(n,t.values),i,s)),t}var Y=class{constructor(t,e){this.ct=[],this.st=void 0,this.ht=t,this.i=e;}get parentNode(){return this.i.parentNode}get d(){return this.i.d}u(t){let{el:{content:e},parts:s}=this.ht,i=(t?.creationScope??w).importNode(e,true);x.currentNode=i;let r=x.nextNode(),o=0,l=0,a=s[0];for(;a!==void 0;){if(o===a.index){let h;a.type===2?h=new M(r,r.nextSibling,this,t):a.type===1?h=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(h=new it(r,this,t)),this.ct.push(h),a=s[++l];}o!==a?.index&&(r=x.nextNode(),o++);}return x.currentNode=w,i}p(t){let e=0;for(let s of this.ct)s!==void 0&&(s.strings!==void 0?(s.m(t,s,e),e+=s.strings.length-2):s.m(t[e])),e++;}},M=class n{get d(){return this.i?.d??this.pt}constructor(t,e,s,i){this.type=2,this.e=d,this.st=void 0,this.w=t,this.z=e,this.i=s,this.options=i,this.pt=i?.isConnected??true;}get parentNode(){let t=this.w.parentNode,e=this.i;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this.w}get endNode(){return this.z}m(t,e=this){t=C(this,t,e),U(t)?t===d||t==null||t===""?(this.e!==d&&this.K(),this.e=d):t!==this.e&&t!==E&&this.dt(t):t.et!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):te(t)?this.k(t):this.dt(t);}O(t){return this.w.parentNode.insertBefore(t,this.z)}T(t){this.e!==t&&(this.K(),this.e=this.O(t));}dt(t){this.e!==d&&U(this.e)?this.w.nextSibling.data=t:this.T(w.createTextNode(t)),this.e=t;}$(t){let{values:e,et:s}=t,i=typeof s=="number"?this.Rt(t):(s.el===void 0&&(s.el=R.createElement(Mt(s.h,s.h[0]),this.options)),s);if(this.e?.ht===i)this.e.p(e);else {let r=new Y(i,this),o=r.u(this.options);r.p(e),this.T(o),this.e=r;}}Rt(t){let e=Ot.get(t.strings);return e===void 0&&Ot.set(t.strings,e=new R(t)),e}k(t){rt(this.e)||(this.e=[],this.K());let e=this.e,s,i=0;for(let r of t)i===e.length?e.push(s=new n(this.O(A()),this.O(A()),this,this.options)):s=e[i],s.m(r),i++;i<e.length&&(this.K(s&&s.z.nextSibling,i),e.length=i);}K(t=this.w.nextSibling,e){for(this.Mt?.(false,true,e);t!==this.z;){let s=Et(t).nextSibling;Et(t).remove(),t=s;}}setConnected(t){this.i===void 0&&(this.pt=t,this.Mt?.(t));}},T=class{get tagName(){return this.element.tagName}get d(){return this.i.d}constructor(t,e,s,i,r){this.type=1,this.e=d,this.st=void 0,this.element=t,this.name=e,this.i=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this.e=Array(s.length-1).fill(new String),this.strings=s):this.e=d;}m(t,e=this,s,i){let r=this.strings,o=false;if(r===void 0)t=C(this,t,e,0),o=!U(t)||t!==this.e&&t!==E,o&&(this.e=t);else {let l=t,a,h;for(t=r[0],a=0;a<r.length-1;a++)h=C(this,l[s+a],e,a),h===E&&(h=this.e[a]),o||=!U(h)||h!==this.e[a],h===d?t=d:t!==d&&(t+=(h??"")+r[a+1]),this.e[a]=h;}o&&!i&&this.j(t);}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}},tt=class extends T{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===d?void 0:t;}},et=class extends T{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d);}},st=class extends T{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5;}m(t,e=this){if((t=C(this,t,e,0)??d)===E)return;let s=this.e,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this.e=t;}handleEvent(t){typeof this.e=="function"?this.e.call(this.options?.host??this.element,t):this.e.handleEvent(t);}},it=class{constructor(t,e,s){this.element=t,this.type=6,this.st=void 0,this.i=e,this.options=s;}get d(){return this.i.d}m(t){C(this,t);}};var se=nt.litHtmlPolyfillSupport;se?.(R,M),(nt.litHtmlVersions??=[]).push("3.3.2");var It=(n,t,e)=>{let s=e?.renderBefore??t,i=s.It;if(i===void 0){let r=e?.renderBefore??null;s.It=i=new M(t.insertBefore(A(),r),r,void 0,e??{});}return i.m(n),i};var at=globalThis,y=class extends m{constructor(){super(...arguments),this.renderOptions={host:this},this.it=void 0;}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.it=It(e,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this.it?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this.it?.setConnected(false);}render(){return E}};y.Ht=true,y.finalized=true,at.litElementHydrateSupport?.({LitElement:y});var ie=at.litElementPolyfillSupport;ie?.({LitElement:y});(at.litElementVersions??=[]).push("4.2.2");var Lt="1.27.1";var kt="blocks",jt=Lt;var re=/\\([0-9a-fA-F]{1,6} ?)/g;function oe(n){return n.length<2?false:(n[0]==='"'||n[0]==="'")&&(n[n.length-1]==='"'||n[n.length-1]==="'")}function ae(n){let t=n;return (t[0]==='"'||t[0]==="'")&&(t=t.slice(1)),(t[t.length-1]==='"'||t[t.length-1]==="'")&&(t=t.slice(0,-1)),t}function le(n){let t="",e="";for(let s=0;s<n.length;s++){let i=n[s+1];n[s]==="\\"&&i==='"'?(t+='\\"',s++):n[s]==='"'&&e!=="\\"?t+='\\"':t+=n[s],e=n[s]??"";}return t}function Nt(n){let t=n;oe(n)&&(t=ae(t),t=t.replace(re,(e,s)=>String.fromCodePoint(parseInt(s.trim(),16))),t=t.replaceAll(`\\ `,"\\n"),t=le(t),t='"'+t+'"');try{return JSON.parse(t)}catch{return}}function _t(n){class t extends n{constructor(){super(...arguments);this.ut=null;this.nt=null;}getCssData(i,r=false){let o=this.ut??Object.create(null);if(!Object.keys(o).includes(i)||!o[i]){this.nt||(this.nt=window.getComputedStyle(this));let l=this.nt.getPropertyValue(i).trim();try{o[i]=Nt(l);}catch(a){r||console.warn(`CSS Data error: ${i}`,a),o[i]=null;}}return this.ut=o,o[i]}}return t}function Dt(n){class t extends n{static reg(s){let i=this,r=window.customElements.get(s);if(r){r!==i&&console.warn([`Element with tag name "${s}" already registered.`,`You're trying to override it with another class "${this.name}".`,"This is most likely a mistake.","New element will not be registered."].join(` `));return}window.customElements.define(s,i);}}return t}var ce="https://ucarecdn.com",P=Object.freeze({"dev-mode":{},pubkey:{},uuid:{},src:{},lazy:{default:1},intersection:{},breakpoints:{},"cdn-cname":{default:ce},"proxy-cname":{},"secure-delivery-proxy":{},"hi-res-support":{default:1},"ultra-res-support":{},format:{},"cdn-operations":{},progressive:{},quality:{},"is-background-for":{},"is-preview-blur":{default:1}});var D=class extends _t(Dt(y)){constructor(){super();this.g={};this.y=new Map;this.b=null;this.W=null;for(let e in P){let s=P[e];this.g[b+e]=s?.default||"";}}createRenderRoot(){return this}$$(e){return this.g[b+e]}set$$(e){for(let s in e){let i=b+s,r=e[s];this.g[i]=r,this.mt(i,r);}}sub$$(e,s){let i=b+e;this.y.has(i)||this.y.set(i,new Set),this.y.get(i)?.add(s);let r=this.g[i];r!==null&&r!==""&&s(r);}mt(e,s){this.y.has(e)&&this.y.get(e)?.forEach(i=>{s===null||s===""||i(s);});}analyticsParams(){return `-/@clib/${kt}/${jt}/uc-img/`}initAttributes(e){Array.from(this.attributes).forEach(s=>{let i=s;P[i.name]||e.setAttribute(i.name,i.value);});}initIntersection(e,s){let i={root:null,rootMargin:"0px"};this.b=new IntersectionObserver(r=>{r.forEach(o=>{o.isIntersecting&&(s(),this.b?.unobserve(e));});},i),this.b.observe(e),this.W||(this.W=new Set),this.W.add(e);}connectedCallback(){super.connectedCallback(),this.Lt();}Lt(){for(let e in P){let s=b+e,i=this.getCssData(s,true);i!=null&&(this.g[s]=i);}}disconnectedCallback(){super.disconnectedCallback(),this.b&&(this.W?.forEach(e=>{this.b?.unobserve(e);}),this.b=null),this.y.clear();}static get observedAttributes(){return Object.keys(P)}attributeChangedCallback(e,s,i){window.setTimeout(()=>{let r=b+e;this.g[r]=i,this.mt(r,i);});}};var zt=n=>Object.entries(n).filter(([t,e])=>e!==void 0&&e!=="").map(([t,e])=>t==="cdn-operations"||t==="analytics"?e:`${t}/${e}`);var V=class extends D{constructor(){super(...arguments);this.r=new Image;this.n=new Image;}ft(e){return !e.includes("//")&&!F&&(e=new URL(e,document.baseURI).href),e}Q(e){if(!e)return;let s=e,i=s.match(/\d+/)?.[0],r=s.match(/[a-zA-Z]+/)?.[0];if(!i||!r)return;let o=parseInt(i,10);return Number(o)>q&&this.gt?q+r:Number(o)>Q&&!this.gt?Q+r:e}kt(e,s){let i={format:this.rt("format"),quality:this.rt("quality"),resize:this.Q(e),blur:s,"cdn-operations":this.rt("cdn-operations")??void 0,analytics:this.analyticsParams()};return lt(...zt(i))}rt(e){let s=this.$$(e);if(s==null||typeof s=="string"||typeof s=="number"||typeof s=="boolean")return s}s(e="",s=""){let i=this.$$("src");if(i.startsWith("data:")||i.startsWith("blob:"))return i;if(F&&i&&!i.includes("//"))return this.E(i);let r=this.kt(e,s),o=this.$$("cdn-cname"),l=o;if(i.startsWith(String(o)))return S(i,r);let a=this.$$("uuid");if(l&&a)return this.E(S(H(l,a),r));if(a)return this.E(S(H(l,a),r));let h=this.$$("proxy-cname");if(h)return this.E(S(h,r,this.ft(i)));let p=this.$$("pubkey");if(p)return this.E(S(`https://${p}.ucr.io/`,r,this.ft(i)))}E(e){let s=this.$$("secure-delivery-proxy");return s?ut(s,{previewUrl:e},{transform:i=>window.encodeURIComponent(i)}):e}v(e,s=1,i=true){let r=e.getBoundingClientRect(),o=s*Math.round(r.width),l=i?"":s*Math.round(r.height);return o||l?`${o||""}x${l||""}`:null}jt(e){let s=r=>{r.stopPropagation();let o=new Event(r.type,r);this.dispatchEvent(o);},i=["load","error"];for(let r of i)e.addEventListener(r,s);}get img(){return this.a||(this.ot({elNode:this.r}),this.appendChild(this.r)),this.r}get q(){return this.a?{type:G.PREVIEW,img:this.n}:{type:G.MAIN,img:this.img}}get a(){return this.$$("is-preview-blur")}get yt(){return this.$$("is-background-for")}get bt(){let e=this.$$("breakpoints");if(e){let s=dt(e);return mt(s.map(i=>parseInt(i,10)))}else return null}get gt(){return this.$$("format").toLowerCase()==="jpeg"}vt(e){let s=new Set;s.add(`url("${this.s(this.v(e))}") 1x`),this.$$("hi-res-support")&&s.add(`url("${this.s(this.v(e,2))}") ${2}x`),this.$$("ultra-res-support")&&s.add(`url("${this.s(this.v(e,3))}") ${3}x`);let i=`image-set(${[...s].join(", ")})`;e.style.setProperty("background-image",i),e.style.setProperty("background-image",`-webkit-${i}`);}xt(){let e=new Set;return this.bt?this.bt.forEach(s=>{e.add(`${this.s(`${s}x`)} ${this.Q(`${s}w`)}`),this.$$("hi-res-support")&&e.add(`${this.s(`${s*2}x`)} ${this.Q(`${s*2}w`)}`),this.$$("ultra-res-support")&&e.add(`${this.s(`${s*3}x`)} ${this.Q(`${s*3}w`)}`);}):(e.add(`${this.s(this.v(this.q.img))} 1x`),this.$$("hi-res-support")&&e.add(`${this.s(this.v(this.q.img,2))} 2x`),this.$$("ultra-res-support")&&e.add(`${this.s(this.v(this.q.img,3))} 3x`)),[...e].join()}wt(){return this.s()}get Et(){return this.s("100x","100")}Nt(){let e=this.yt;[...document.querySelectorAll(e)].forEach(s=>{this.$$("intersection")?this.initIntersection(s,()=>{this.vt(s);}):this.vt(s);});}_t({elNode:e,src:s,srcset:i}){s&&(e.src=s),i&&(e.srcset=i);}ot({elNode:e}){this.jt(e),this.initAttributes(e);}at({src:e,srcset:s,elNode:i}){return new Promise((r,o)=>{this.ot({elNode:i}),i.setAttribute(W,""),i.addEventListener("load",()=>{i.removeAttribute(W),r(i);}),i.addEventListener("error",()=>{o(false);}),this._t({elNode:i,src:e,srcset:s});})}async Dt(){if(this.$$("intersection")){this.a&&(this.ot({elNode:this.n}),this.appendChild(this.n)),this.initIntersection(this.q.img,async()=>{this.a&&(this.n.src=this.Et);try{await this.at({src:this.wt(),srcset:this.xt(),elNode:this.r}),this.a&&await this.n.remove(),this.appendChild(this.r);}catch{this.a&&await this.n?.remove(),this.appendChild(this.r);}});return}try{this.a&&(await this.at({src:this.Et,elNode:this.n}),this.appendChild(this.n)),await this.at({src:this.wt(),srcset:this.xt(),elNode:this.r}),this.a&&await this.n?.remove(),this.appendChild(this.r);}catch{this.a&&await this.n?.remove(),this.appendChild(this.r);}}init(){this.yt?this.Nt():this.Dt();}};var B=class extends V{connectedCallback(){super.connectedCallback(),this.sub$$("src",()=>{this.init();}),this.sub$$("uuid",()=>{this.init();}),this.sub$$("lazy",t=>{!this.$$("is-background-for")&&!this.$$("is-preview-blur")&&(this.img.loading=t?"lazy":"eager");});}};B.reg("uc-img");/*! For license information please see uc-img.min.js.LEGAL.txt */
|
|
8
|
-
|
|
2
|
+
* @license
|
|
3
|
+
* Package: @uploadcare/file-uploader@1.28.0-alpha.1 (MIT)
|
|
4
|
+
* License: https://github.com/uploadcare/blob/main/LICENSE
|
|
5
|
+
* Built: 2026-03-02T20:26:17.187Z
|
|
6
|
+
*/
|
|
7
|
+
const normalizeCdnOperation = (b) => {
|
|
8
|
+
if (typeof b != "string" || !b) return "";
|
|
9
|
+
let j = b.trim();
|
|
10
|
+
return j.startsWith("-/") ? j = j.slice(2) : j.startsWith("/") && (j = j.slice(1)), j.endsWith("/") && (j = j.slice(0, j.length - 1)), j;
|
|
11
|
+
}, joinCdnOperations = (...j) => j.filter((b) => typeof b == "string" && !!b).map((j) => normalizeCdnOperation(j)).join("/-/"), createCdnUrlModifiers = (...b) => {
|
|
12
|
+
let F = joinCdnOperations(...b);
|
|
13
|
+
return F ? `-/${F}/` : "";
|
|
14
|
+
};
|
|
15
|
+
function extractFilename(b) {
|
|
16
|
+
let j = new URL(b), F = j.pathname + j.search + j.hash, U = F.lastIndexOf("http"), W = F.lastIndexOf("/"), G = "";
|
|
17
|
+
return U >= 0 ? G = F.slice(U) : W >= 0 && (G = F.slice(W + 1)), G;
|
|
18
|
+
}
|
|
19
|
+
function trimFilename(b) {
|
|
20
|
+
let j = new URL(b), F = extractFilename(b), W = isFileUrl(F) ? splitFileUrl(F).pathname : F;
|
|
21
|
+
return j.pathname = j.pathname.replace(W, ""), j.search = "", j.hash = "", j.toString();
|
|
22
|
+
}
|
|
23
|
+
function isFileUrl(b) {
|
|
24
|
+
return b.startsWith("http");
|
|
25
|
+
}
|
|
26
|
+
function splitFileUrl(b) {
|
|
27
|
+
let j = new URL(b);
|
|
28
|
+
return {
|
|
29
|
+
pathname: `${j.origin}${j.pathname ?? ""}`,
|
|
30
|
+
search: j.search ?? "",
|
|
31
|
+
hash: j.hash ?? ""
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const createCdnUrl = (b, j, F) => {
|
|
35
|
+
let q = new URL(trimFilename(b)), J = F ?? extractFilename(b), Y = j ?? "";
|
|
36
|
+
if (q.pathname.startsWith("//") && (q.pathname = q.pathname.replace("//", "/")), J && isFileUrl(J)) {
|
|
37
|
+
let b = splitFileUrl(J);
|
|
38
|
+
q.pathname = `${q.pathname}${Y}${b.pathname || ""}`, q.search = b.search, q.hash = b.hash;
|
|
39
|
+
} else q.pathname = `${q.pathname}${Y}${J || ""}`;
|
|
40
|
+
return q.toString();
|
|
41
|
+
}, createOriginalUrl = (b, j) => {
|
|
42
|
+
let F = new URL(b);
|
|
43
|
+
return F.pathname = `${j}/`, F.toString();
|
|
44
|
+
}, stringToArray = (b, j = ",") => b.trim().split(j).map((b) => b.trim()).filter((b) => b.length > 0);
|
|
45
|
+
var DEFAULT_TRANSFORMER = (b) => b, OPEN_TOKEN = "{{", CLOSE_TOKEN = "}}";
|
|
46
|
+
function applyTemplateData(b, j = {}, F = {}) {
|
|
47
|
+
let { openToken: U = OPEN_TOKEN, closeToken: W = CLOSE_TOKEN, transform: G = DEFAULT_TRANSFORMER } = F;
|
|
48
|
+
for (let F in j) {
|
|
49
|
+
let K = j[F]?.toString(), q = typeof K == "string" ? G(K) : String(K);
|
|
50
|
+
b = b.replaceAll(U + F + W, q);
|
|
51
|
+
}
|
|
52
|
+
return b;
|
|
53
|
+
}
|
|
54
|
+
const uniqueArray = (b) => [...new Set(b)], 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({
|
|
55
|
+
PREVIEW: "PREVIEW",
|
|
56
|
+
MAIN: "MAIN"
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* @license
|
|
60
|
+
* Copyright 2019 Google LLC
|
|
61
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
|
+
*/
|
|
63
|
+
var t$1 = globalThis, e$2 = t$1.ShadowRoot && (t$1.ShadyCSS === void 0 || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$3 = /* @__PURE__ */ new WeakMap(), n$2 = class {
|
|
64
|
+
constructor(b, j, F) {
|
|
65
|
+
if (this._$cssResult$ = !0, F !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
66
|
+
this.cssText = b, this.t = j;
|
|
67
|
+
}
|
|
68
|
+
get styleSheet() {
|
|
69
|
+
let b = this.o, j = this.t;
|
|
70
|
+
if (e$2 && b === void 0) {
|
|
71
|
+
let F = j !== void 0 && j.length === 1;
|
|
72
|
+
F && (b = o$3.get(j)), b === void 0 && ((this.o = b = new CSSStyleSheet()).replaceSync(this.cssText), F && o$3.set(j, b));
|
|
73
|
+
}
|
|
74
|
+
return b;
|
|
75
|
+
}
|
|
76
|
+
toString() {
|
|
77
|
+
return this.cssText;
|
|
78
|
+
}
|
|
79
|
+
}, r$2 = (b) => new n$2(typeof b == "string" ? b : b + "", void 0, s$2), S$1 = (b, j) => {
|
|
80
|
+
if (e$2) b.adoptedStyleSheets = j.map((b) => b instanceof CSSStyleSheet ? b : b.styleSheet);
|
|
81
|
+
else for (let F of j) {
|
|
82
|
+
let j = document.createElement("style"), U = t$1.litNonce;
|
|
83
|
+
U !== void 0 && j.setAttribute("nonce", U), j.textContent = F.cssText, b.appendChild(j);
|
|
84
|
+
}
|
|
85
|
+
}, c$1 = e$2 ? (b) => b : (b) => b instanceof CSSStyleSheet ? ((b) => {
|
|
86
|
+
let j = "";
|
|
87
|
+
for (let F of b.cssRules) j += F.cssText;
|
|
88
|
+
return r$2(j);
|
|
89
|
+
})(b) : b, { is: i$2, defineProperty: e$1, getOwnPropertyDescriptor: h$1, getOwnPropertyNames: r$1, getOwnPropertySymbols: o$2, getPrototypeOf: n$1 } = Object, a$1 = globalThis, c$2 = a$1.trustedTypes, l$1 = c$2 ? c$2.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (b, j) => b, u$1 = {
|
|
90
|
+
toAttribute(b, j) {
|
|
91
|
+
switch (j) {
|
|
92
|
+
case Boolean:
|
|
93
|
+
b = b ? l$1 : null;
|
|
94
|
+
break;
|
|
95
|
+
case Object:
|
|
96
|
+
case Array: b = b == null ? b : JSON.stringify(b);
|
|
97
|
+
}
|
|
98
|
+
return b;
|
|
99
|
+
},
|
|
100
|
+
fromAttribute(b, j) {
|
|
101
|
+
let F = b;
|
|
102
|
+
switch (j) {
|
|
103
|
+
case Boolean:
|
|
104
|
+
F = b !== null;
|
|
105
|
+
break;
|
|
106
|
+
case Number:
|
|
107
|
+
F = b === null ? null : Number(b);
|
|
108
|
+
break;
|
|
109
|
+
case Object:
|
|
110
|
+
case Array: try {
|
|
111
|
+
F = JSON.parse(b);
|
|
112
|
+
} catch {
|
|
113
|
+
F = null;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return F;
|
|
117
|
+
}
|
|
118
|
+
}, f$1 = (b, j) => !i$2(b, j), b$1 = {
|
|
119
|
+
attribute: !0,
|
|
120
|
+
type: String,
|
|
121
|
+
converter: u$1,
|
|
122
|
+
reflect: !1,
|
|
123
|
+
useDefault: !1,
|
|
124
|
+
hasChanged: f$1
|
|
125
|
+
};
|
|
126
|
+
Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
127
|
+
var y = class extends HTMLElement {
|
|
128
|
+
static addInitializer(b) {
|
|
129
|
+
this._$Ei(), (this.l ??= []).push(b);
|
|
130
|
+
}
|
|
131
|
+
static get observedAttributes() {
|
|
132
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
133
|
+
}
|
|
134
|
+
static createProperty(b, j = b$1) {
|
|
135
|
+
if (j.state && (j.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(b) && ((j = Object.create(j)).wrapped = !0), this.elementProperties.set(b, j), !j.noAccessor) {
|
|
136
|
+
let F = Symbol(), U = this.getPropertyDescriptor(b, F, j);
|
|
137
|
+
U !== void 0 && e$1(this.prototype, b, U);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
static getPropertyDescriptor(b, j, F) {
|
|
141
|
+
let { get: U, set: W } = h$1(this.prototype, b) ?? {
|
|
142
|
+
get() {
|
|
143
|
+
return this[j];
|
|
144
|
+
},
|
|
145
|
+
set(b) {
|
|
146
|
+
this[j] = b;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
return {
|
|
150
|
+
get: U,
|
|
151
|
+
set(j) {
|
|
152
|
+
let G = U?.call(this);
|
|
153
|
+
W?.call(this, j), this.requestUpdate(b, G, F);
|
|
154
|
+
},
|
|
155
|
+
configurable: !0,
|
|
156
|
+
enumerable: !0
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
static getPropertyOptions(b) {
|
|
160
|
+
return this.elementProperties.get(b) ?? b$1;
|
|
161
|
+
}
|
|
162
|
+
static _$Ei() {
|
|
163
|
+
if (this.hasOwnProperty(d$1("elementProperties"))) return;
|
|
164
|
+
let b = n$1(this);
|
|
165
|
+
b.finalize(), b.l !== void 0 && (this.l = [...b.l]), this.elementProperties = new Map(b.elementProperties);
|
|
166
|
+
}
|
|
167
|
+
static finalize() {
|
|
168
|
+
if (this.hasOwnProperty(d$1("finalized"))) return;
|
|
169
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
|
|
170
|
+
let b = this.properties, j = [...r$1(b), ...o$2(b)];
|
|
171
|
+
for (let F of j) this.createProperty(F, b[F]);
|
|
172
|
+
}
|
|
173
|
+
let b = this[Symbol.metadata];
|
|
174
|
+
if (b !== null) {
|
|
175
|
+
let j = litPropertyMetadata.get(b);
|
|
176
|
+
if (j !== void 0) for (let [b, F] of j) this.elementProperties.set(b, F);
|
|
177
|
+
}
|
|
178
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
179
|
+
for (let [b, j] of this.elementProperties) {
|
|
180
|
+
let F = this._$Eu(b, j);
|
|
181
|
+
F !== void 0 && this._$Eh.set(F, b);
|
|
182
|
+
}
|
|
183
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
184
|
+
}
|
|
185
|
+
static finalizeStyles(b) {
|
|
186
|
+
let j = [];
|
|
187
|
+
if (Array.isArray(b)) {
|
|
188
|
+
let F = new Set(b.flat(Infinity).reverse());
|
|
189
|
+
for (let b of F) j.unshift(c$1(b));
|
|
190
|
+
} else b !== void 0 && j.push(c$1(b));
|
|
191
|
+
return j;
|
|
192
|
+
}
|
|
193
|
+
static _$Eu(b, j) {
|
|
194
|
+
let F = j.attribute;
|
|
195
|
+
return !1 === F ? void 0 : typeof F == "string" ? F : typeof b == "string" ? b.toLowerCase() : void 0;
|
|
196
|
+
}
|
|
197
|
+
constructor() {
|
|
198
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
199
|
+
}
|
|
200
|
+
_$Ev() {
|
|
201
|
+
this._$ES = new Promise((b) => this.enableUpdating = b), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((b) => b(this));
|
|
202
|
+
}
|
|
203
|
+
addController(b) {
|
|
204
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(b), this.renderRoot !== void 0 && this.isConnected && b.hostConnected?.();
|
|
205
|
+
}
|
|
206
|
+
removeController(b) {
|
|
207
|
+
this._$EO?.delete(b);
|
|
208
|
+
}
|
|
209
|
+
_$E_() {
|
|
210
|
+
let b = /* @__PURE__ */ new Map(), j = this.constructor.elementProperties;
|
|
211
|
+
for (let F of j.keys()) this.hasOwnProperty(F) && (b.set(F, this[F]), delete this[F]);
|
|
212
|
+
b.size > 0 && (this._$Ep = b);
|
|
213
|
+
}
|
|
214
|
+
createRenderRoot() {
|
|
215
|
+
let b = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
216
|
+
return S$1(b, this.constructor.elementStyles), b;
|
|
217
|
+
}
|
|
218
|
+
connectedCallback() {
|
|
219
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((b) => b.hostConnected?.());
|
|
220
|
+
}
|
|
221
|
+
enableUpdating(b) {}
|
|
222
|
+
disconnectedCallback() {
|
|
223
|
+
this._$EO?.forEach((b) => b.hostDisconnected?.());
|
|
224
|
+
}
|
|
225
|
+
attributeChangedCallback(b, j, F) {
|
|
226
|
+
this._$AK(b, F);
|
|
227
|
+
}
|
|
228
|
+
_$ET(b, j) {
|
|
229
|
+
let F = this.constructor.elementProperties.get(b), U = this.constructor._$Eu(b, F);
|
|
230
|
+
if (U !== void 0 && !0 === F.reflect) {
|
|
231
|
+
let W = (F.converter?.toAttribute === void 0 ? u$1 : F.converter).toAttribute(j, F.type);
|
|
232
|
+
this._$Em = b, W == null ? this.removeAttribute(U) : this.setAttribute(U, W), this._$Em = null;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
_$AK(b, j) {
|
|
236
|
+
let F = this.constructor, U = F._$Eh.get(b);
|
|
237
|
+
if (U !== void 0 && this._$Em !== U) {
|
|
238
|
+
let b = F.getPropertyOptions(U), W = typeof b.converter == "function" ? { fromAttribute: b.converter } : b.converter?.fromAttribute === void 0 ? u$1 : b.converter;
|
|
239
|
+
this._$Em = U;
|
|
240
|
+
let G = W.fromAttribute(j, b.type);
|
|
241
|
+
this[U] = G ?? this._$Ej?.get(U) ?? G, this._$Em = null;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
requestUpdate(b, j, F, U = !1, W) {
|
|
245
|
+
if (b !== void 0) {
|
|
246
|
+
let G = this.constructor;
|
|
247
|
+
if (!1 === U && (W = this[b]), F ??= G.getPropertyOptions(b), !((F.hasChanged ?? f$1)(W, j) || F.useDefault && F.reflect && W === this._$Ej?.get(b) && !this.hasAttribute(G._$Eu(b, F)))) return;
|
|
248
|
+
this.C(b, j, F);
|
|
249
|
+
}
|
|
250
|
+
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
251
|
+
}
|
|
252
|
+
C(b, j, { useDefault: F, reflect: U, wrapped: W }, G) {
|
|
253
|
+
F && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(b) && (this._$Ej.set(b, G ?? j ?? this[b]), !0 !== W || G !== void 0) || (this._$AL.has(b) || (this.hasUpdated || F || (j = void 0), this._$AL.set(b, j)), !0 === U && this._$Em !== b && (this._$Eq ??= /* @__PURE__ */ new Set()).add(b));
|
|
254
|
+
}
|
|
255
|
+
async _$EP() {
|
|
256
|
+
this.isUpdatePending = !0;
|
|
257
|
+
try {
|
|
258
|
+
await this._$ES;
|
|
259
|
+
} catch (b) {
|
|
260
|
+
Promise.reject(b);
|
|
261
|
+
}
|
|
262
|
+
let b = this.scheduleUpdate();
|
|
263
|
+
return b != null && await b, !this.isUpdatePending;
|
|
264
|
+
}
|
|
265
|
+
scheduleUpdate() {
|
|
266
|
+
return this.performUpdate();
|
|
267
|
+
}
|
|
268
|
+
performUpdate() {
|
|
269
|
+
if (!this.isUpdatePending) return;
|
|
270
|
+
if (!this.hasUpdated) {
|
|
271
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
272
|
+
for (let [b, j] of this._$Ep) this[b] = j;
|
|
273
|
+
this._$Ep = void 0;
|
|
274
|
+
}
|
|
275
|
+
let b = this.constructor.elementProperties;
|
|
276
|
+
if (b.size > 0) for (let [j, F] of b) {
|
|
277
|
+
let { wrapped: b } = F, U = this[j];
|
|
278
|
+
!0 !== b || this._$AL.has(j) || U === void 0 || this.C(j, void 0, F, U);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
let b = !1, j = this._$AL;
|
|
282
|
+
try {
|
|
283
|
+
b = this.shouldUpdate(j), b ? (this.willUpdate(j), this._$EO?.forEach((b) => b.hostUpdate?.()), this.update(j)) : this._$EM();
|
|
284
|
+
} catch (j) {
|
|
285
|
+
throw b = !1, this._$EM(), j;
|
|
286
|
+
}
|
|
287
|
+
b && this._$AE(j);
|
|
288
|
+
}
|
|
289
|
+
willUpdate(b) {}
|
|
290
|
+
_$AE(b) {
|
|
291
|
+
this._$EO?.forEach((b) => b.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(b)), this.updated(b);
|
|
292
|
+
}
|
|
293
|
+
_$EM() {
|
|
294
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
295
|
+
}
|
|
296
|
+
get updateComplete() {
|
|
297
|
+
return this.getUpdateComplete();
|
|
298
|
+
}
|
|
299
|
+
getUpdateComplete() {
|
|
300
|
+
return this._$ES;
|
|
301
|
+
}
|
|
302
|
+
shouldUpdate(b) {
|
|
303
|
+
return !0;
|
|
304
|
+
}
|
|
305
|
+
update(b) {
|
|
306
|
+
this._$Eq &&= this._$Eq.forEach((b) => this._$ET(b, this[b])), this._$EM();
|
|
307
|
+
}
|
|
308
|
+
updated(b) {}
|
|
309
|
+
firstUpdated(b) {}
|
|
310
|
+
};
|
|
311
|
+
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y }), (a$1.reactiveElementVersions ??= []).push("2.1.2");
|
|
312
|
+
/**
|
|
313
|
+
* @license
|
|
314
|
+
* Copyright 2017 Google LLC
|
|
315
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
316
|
+
*/
|
|
317
|
+
var t = globalThis, i$1 = (b) => b, s$1 = t.trustedTypes, e = s$1 ? s$1.createPolicy("lit-html", { createHTML: (b) => b }) : void 0, h = "$lit$", o$1 = `lit$${Math.random().toFixed(9).slice(2)}$`, n = "?" + o$1, r = `<${n}>`, l = document, c = () => l.createComment(""), a = (b) => b === null || typeof b != "object" && typeof b != "function", u = Array.isArray, d = (b) => u(b) || typeof b?.[Symbol.iterator] == "function", f = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y$1 = /^(?:script|style|textarea|title)$/i, E = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l.createTreeWalker(l, 129);
|
|
318
|
+
function V(b, j) {
|
|
319
|
+
if (!u(b) || !b.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
320
|
+
return e === void 0 ? j : e.createHTML(j);
|
|
321
|
+
}
|
|
322
|
+
var N = (b, j) => {
|
|
323
|
+
let F = b.length - 1, U = [], W, G = j === 2 ? "<svg>" : j === 3 ? "<math>" : "", K = v;
|
|
324
|
+
for (let j = 0; j < F; j++) {
|
|
325
|
+
let F = b[j], q, J, Y = -1, X = 0;
|
|
326
|
+
for (; X < F.length && (K.lastIndex = X, J = K.exec(F), J !== null);) X = K.lastIndex, K === v ? J[1] === "!--" ? K = _ : J[1] === void 0 ? J[2] === void 0 ? J[3] !== void 0 && (K = p) : (y$1.test(J[2]) && (W = RegExp("</" + J[2], "g")), K = p) : K = m : K === p ? J[0] === ">" ? (K = W ?? v, Y = -1) : J[1] === void 0 ? Y = -2 : (Y = K.lastIndex - J[2].length, q = J[1], K = J[3] === void 0 ? p : J[3] === "\"" ? $ : g) : K === $ || K === g ? K = p : K === _ || K === m ? K = v : (K = p, W = void 0);
|
|
327
|
+
let Q = K === p && b[j + 1].startsWith("/>") ? " " : "";
|
|
328
|
+
G += K === v ? F + r : Y >= 0 ? (U.push(q), F.slice(0, Y) + h + F.slice(Y) + o$1 + Q) : F + o$1 + (Y === -2 ? j : Q);
|
|
329
|
+
}
|
|
330
|
+
return [V(b, G + (b[F] || "<?>") + (j === 2 ? "</svg>" : j === 3 ? "</math>" : "")), U];
|
|
331
|
+
}, S = class b {
|
|
332
|
+
constructor({ strings: j, _$litType$: F }, U) {
|
|
333
|
+
let W;
|
|
334
|
+
this.parts = [];
|
|
335
|
+
let G = 0, K = 0, q = j.length - 1, J = this.parts, [Y, X] = N(j, F);
|
|
336
|
+
if (this.el = b.createElement(Y, U), P.currentNode = this.el.content, F === 2 || F === 3) {
|
|
337
|
+
let b = this.el.content.firstChild;
|
|
338
|
+
b.replaceWith(...b.childNodes);
|
|
339
|
+
}
|
|
340
|
+
for (; (W = P.nextNode()) !== null && J.length < q;) {
|
|
341
|
+
if (W.nodeType === 1) {
|
|
342
|
+
if (W.hasAttributes()) for (let b of W.getAttributeNames()) if (b.endsWith(h)) {
|
|
343
|
+
let j = X[K++], F = W.getAttribute(b).split(o$1), U = /([.?@])?(.*)/.exec(j);
|
|
344
|
+
J.push({
|
|
345
|
+
type: 1,
|
|
346
|
+
index: G,
|
|
347
|
+
name: U[2],
|
|
348
|
+
strings: F,
|
|
349
|
+
ctor: U[1] === "." ? I : U[1] === "?" ? L : U[1] === "@" ? z : H
|
|
350
|
+
}), W.removeAttribute(b);
|
|
351
|
+
} else b.startsWith(o$1) && (J.push({
|
|
352
|
+
type: 6,
|
|
353
|
+
index: G
|
|
354
|
+
}), W.removeAttribute(b));
|
|
355
|
+
if (y$1.test(W.tagName)) {
|
|
356
|
+
let b = W.textContent.split(o$1), j = b.length - 1;
|
|
357
|
+
if (j > 0) {
|
|
358
|
+
W.textContent = s$1 ? s$1.emptyScript : "";
|
|
359
|
+
for (let F = 0; F < j; F++) W.append(b[F], c()), P.nextNode(), J.push({
|
|
360
|
+
type: 2,
|
|
361
|
+
index: ++G
|
|
362
|
+
});
|
|
363
|
+
W.append(b[j], c());
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
} else if (W.nodeType === 8) if (W.data === n) J.push({
|
|
367
|
+
type: 2,
|
|
368
|
+
index: G
|
|
369
|
+
});
|
|
370
|
+
else {
|
|
371
|
+
let b = -1;
|
|
372
|
+
for (; (b = W.data.indexOf(o$1, b + 1)) !== -1;) J.push({
|
|
373
|
+
type: 7,
|
|
374
|
+
index: G
|
|
375
|
+
}), b += o$1.length - 1;
|
|
376
|
+
}
|
|
377
|
+
G++;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
static createElement(b, j) {
|
|
381
|
+
let F = l.createElement("template");
|
|
382
|
+
return F.innerHTML = b, F;
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
function M(b, j, F = b, U) {
|
|
386
|
+
if (j === E) return j;
|
|
387
|
+
let W = U === void 0 ? F._$Cl : F._$Co?.[U], G = a(j) ? void 0 : j._$litDirective$;
|
|
388
|
+
return W?.constructor !== G && (W?._$AO?.(!1), G === void 0 ? W = void 0 : (W = new G(b), W._$AT(b, F, U)), U === void 0 ? F._$Cl = W : (F._$Co ??= [])[U] = W), W !== void 0 && (j = M(b, W._$AS(b, j.values), W, U)), j;
|
|
389
|
+
}
|
|
390
|
+
var R = class {
|
|
391
|
+
constructor(b, j) {
|
|
392
|
+
this._$AV = [], this._$AN = void 0, this._$AD = b, this._$AM = j;
|
|
393
|
+
}
|
|
394
|
+
get parentNode() {
|
|
395
|
+
return this._$AM.parentNode;
|
|
396
|
+
}
|
|
397
|
+
get _$AU() {
|
|
398
|
+
return this._$AM._$AU;
|
|
399
|
+
}
|
|
400
|
+
u(b) {
|
|
401
|
+
let { el: { content: j }, parts: F } = this._$AD, U = (b?.creationScope ?? l).importNode(j, !0);
|
|
402
|
+
P.currentNode = U;
|
|
403
|
+
let W = P.nextNode(), G = 0, K = 0, q = F[0];
|
|
404
|
+
for (; q !== void 0;) {
|
|
405
|
+
if (G === q.index) {
|
|
406
|
+
let j;
|
|
407
|
+
q.type === 2 ? j = new k(W, W.nextSibling, this, b) : q.type === 1 ? j = new q.ctor(W, q.name, q.strings, this, b) : q.type === 6 && (j = new Z(W, this, b)), this._$AV.push(j), q = F[++K];
|
|
408
|
+
}
|
|
409
|
+
G !== q?.index && (W = P.nextNode(), G++);
|
|
410
|
+
}
|
|
411
|
+
return P.currentNode = l, U;
|
|
412
|
+
}
|
|
413
|
+
p(b) {
|
|
414
|
+
let j = 0;
|
|
415
|
+
for (let F of this._$AV) F !== void 0 && (F.strings === void 0 ? F._$AI(b[j]) : (F._$AI(b, F, j), j += F.strings.length - 2)), j++;
|
|
416
|
+
}
|
|
417
|
+
}, k = class b {
|
|
418
|
+
get _$AU() {
|
|
419
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
420
|
+
}
|
|
421
|
+
constructor(b, j, F, U) {
|
|
422
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = b, this._$AB = j, this._$AM = F, this.options = U, this._$Cv = U?.isConnected ?? !0;
|
|
423
|
+
}
|
|
424
|
+
get parentNode() {
|
|
425
|
+
let b = this._$AA.parentNode, j = this._$AM;
|
|
426
|
+
return j !== void 0 && b?.nodeType === 11 && (b = j.parentNode), b;
|
|
427
|
+
}
|
|
428
|
+
get startNode() {
|
|
429
|
+
return this._$AA;
|
|
430
|
+
}
|
|
431
|
+
get endNode() {
|
|
432
|
+
return this._$AB;
|
|
433
|
+
}
|
|
434
|
+
_$AI(b, j = this) {
|
|
435
|
+
b = M(this, b, j), a(b) ? b === A || b == null || b === "" ? (this._$AH !== A && this._$AR(), this._$AH = A) : b !== this._$AH && b !== E && this._(b) : b._$litType$ === void 0 ? b.nodeType === void 0 ? d(b) ? this.k(b) : this._(b) : this.T(b) : this.$(b);
|
|
436
|
+
}
|
|
437
|
+
O(b) {
|
|
438
|
+
return this._$AA.parentNode.insertBefore(b, this._$AB);
|
|
439
|
+
}
|
|
440
|
+
T(b) {
|
|
441
|
+
this._$AH !== b && (this._$AR(), this._$AH = this.O(b));
|
|
442
|
+
}
|
|
443
|
+
_(b) {
|
|
444
|
+
this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = b : this.T(l.createTextNode(b)), this._$AH = b;
|
|
445
|
+
}
|
|
446
|
+
$(b) {
|
|
447
|
+
let { values: j, _$litType$: F } = b, U = typeof F == "number" ? this._$AC(b) : (F.el === void 0 && (F.el = S.createElement(V(F.h, F.h[0]), this.options)), F);
|
|
448
|
+
if (this._$AH?._$AD === U) this._$AH.p(j);
|
|
449
|
+
else {
|
|
450
|
+
let b = new R(U, this), F = b.u(this.options);
|
|
451
|
+
b.p(j), this.T(F), this._$AH = b;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
_$AC(b) {
|
|
455
|
+
let j = C.get(b.strings);
|
|
456
|
+
return j === void 0 && C.set(b.strings, j = new S(b)), j;
|
|
457
|
+
}
|
|
458
|
+
k(j) {
|
|
459
|
+
u(this._$AH) || (this._$AH = [], this._$AR());
|
|
460
|
+
let F = this._$AH, U, W = 0;
|
|
461
|
+
for (let G of j) W === F.length ? F.push(U = new b(this.O(c()), this.O(c()), this, this.options)) : U = F[W], U._$AI(G), W++;
|
|
462
|
+
W < F.length && (this._$AR(U && U._$AB.nextSibling, W), F.length = W);
|
|
463
|
+
}
|
|
464
|
+
_$AR(b = this._$AA.nextSibling, j) {
|
|
465
|
+
for (this._$AP?.(!1, !0, j); b !== this._$AB;) {
|
|
466
|
+
let j = i$1(b).nextSibling;
|
|
467
|
+
i$1(b).remove(), b = j;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
setConnected(b) {
|
|
471
|
+
this._$AM === void 0 && (this._$Cv = b, this._$AP?.(b));
|
|
472
|
+
}
|
|
473
|
+
}, H = class {
|
|
474
|
+
get tagName() {
|
|
475
|
+
return this.element.tagName;
|
|
476
|
+
}
|
|
477
|
+
get _$AU() {
|
|
478
|
+
return this._$AM._$AU;
|
|
479
|
+
}
|
|
480
|
+
constructor(b, j, F, U, W) {
|
|
481
|
+
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = b, this.name = j, this._$AM = U, this.options = W, F.length > 2 || F[0] !== "" || F[1] !== "" ? (this._$AH = Array(F.length - 1).fill(/* @__PURE__ */ new String()), this.strings = F) : this._$AH = A;
|
|
482
|
+
}
|
|
483
|
+
_$AI(b, j = this, F, U) {
|
|
484
|
+
let W = this.strings, G = !1;
|
|
485
|
+
if (W === void 0) b = M(this, b, j, 0), G = !a(b) || b !== this._$AH && b !== E, G && (this._$AH = b);
|
|
486
|
+
else {
|
|
487
|
+
let U = b, K, q;
|
|
488
|
+
for (b = W[0], K = 0; K < W.length - 1; K++) q = M(this, U[F + K], j, K), q === E && (q = this._$AH[K]), G ||= !a(q) || q !== this._$AH[K], q === A ? b = A : b !== A && (b += (q ?? "") + W[K + 1]), this._$AH[K] = q;
|
|
489
|
+
}
|
|
490
|
+
G && !U && this.j(b);
|
|
491
|
+
}
|
|
492
|
+
j(b) {
|
|
493
|
+
b === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, b ?? "");
|
|
494
|
+
}
|
|
495
|
+
}, I = class extends H {
|
|
496
|
+
constructor() {
|
|
497
|
+
super(...arguments), this.type = 3;
|
|
498
|
+
}
|
|
499
|
+
j(b) {
|
|
500
|
+
this.element[this.name] = b === A ? void 0 : b;
|
|
501
|
+
}
|
|
502
|
+
}, L = class extends H {
|
|
503
|
+
constructor() {
|
|
504
|
+
super(...arguments), this.type = 4;
|
|
505
|
+
}
|
|
506
|
+
j(b) {
|
|
507
|
+
this.element.toggleAttribute(this.name, !!b && b !== A);
|
|
508
|
+
}
|
|
509
|
+
}, z = class extends H {
|
|
510
|
+
constructor(b, j, F, U, W) {
|
|
511
|
+
super(b, j, F, U, W), this.type = 5;
|
|
512
|
+
}
|
|
513
|
+
_$AI(b, j = this) {
|
|
514
|
+
if ((b = M(this, b, j, 0) ?? A) === E) return;
|
|
515
|
+
let F = this._$AH, U = b === A && F !== A || b.capture !== F.capture || b.once !== F.once || b.passive !== F.passive, W = b !== A && (F === A || U);
|
|
516
|
+
U && this.element.removeEventListener(this.name, this, F), W && this.element.addEventListener(this.name, this, b), this._$AH = b;
|
|
517
|
+
}
|
|
518
|
+
handleEvent(b) {
|
|
519
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, b) : this._$AH.handleEvent(b);
|
|
520
|
+
}
|
|
521
|
+
}, Z = class {
|
|
522
|
+
constructor(b, j, F) {
|
|
523
|
+
this.element = b, this.type = 6, this._$AN = void 0, this._$AM = j, this.options = F;
|
|
524
|
+
}
|
|
525
|
+
get _$AU() {
|
|
526
|
+
return this._$AM._$AU;
|
|
527
|
+
}
|
|
528
|
+
_$AI(b) {
|
|
529
|
+
M(this, b);
|
|
530
|
+
}
|
|
531
|
+
}, B = t.litHtmlPolyfillSupport;
|
|
532
|
+
B?.(S, k), (t.litHtmlVersions ??= []).push("3.3.2");
|
|
533
|
+
var D = (b, j, F) => {
|
|
534
|
+
let U = F?.renderBefore ?? j, W = U._$litPart$;
|
|
535
|
+
if (W === void 0) {
|
|
536
|
+
let b = F?.renderBefore ?? null;
|
|
537
|
+
U._$litPart$ = W = new k(j.insertBefore(c(), b), b, void 0, F ?? {});
|
|
538
|
+
}
|
|
539
|
+
return W._$AI(b), W;
|
|
540
|
+
}, s = globalThis, i = class extends y {
|
|
541
|
+
constructor() {
|
|
542
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
543
|
+
}
|
|
544
|
+
createRenderRoot() {
|
|
545
|
+
let b = super.createRenderRoot();
|
|
546
|
+
return this.renderOptions.renderBefore ??= b.firstChild, b;
|
|
547
|
+
}
|
|
548
|
+
update(b) {
|
|
549
|
+
let j = this.render();
|
|
550
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(b), this._$Do = D(j, this.renderRoot, this.renderOptions);
|
|
551
|
+
}
|
|
552
|
+
connectedCallback() {
|
|
553
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
554
|
+
}
|
|
555
|
+
disconnectedCallback() {
|
|
556
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
557
|
+
}
|
|
558
|
+
render() {
|
|
559
|
+
return E;
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
i._$litElement$ = !0, i.finalized = !0, s.litElementHydrateSupport?.({ LitElement: i });
|
|
563
|
+
var o = s.litElementPolyfillSupport;
|
|
564
|
+
o?.({ LitElement: i }), (s.litElementVersions ??= []).push("4.2.2");
|
|
565
|
+
var SINGLE_QUOTE = "'", DOUBLE_QUOTE = "\"", ESCAPED_PATTERN = /\\([0-9a-fA-F]{1,6} ?)/g;
|
|
566
|
+
function hasLeadingTrailingQuotes(b) {
|
|
567
|
+
return b.length < 2 ? !1 : (b[0] === DOUBLE_QUOTE || b[0] === SINGLE_QUOTE) && (b[b.length - 1] === DOUBLE_QUOTE || b[b.length - 1] === SINGLE_QUOTE);
|
|
568
|
+
}
|
|
569
|
+
function trimQuotes(b) {
|
|
570
|
+
let j = b;
|
|
571
|
+
return (j[0] === DOUBLE_QUOTE || j[0] === SINGLE_QUOTE) && (j = j.slice(1)), (j[j.length - 1] === DOUBLE_QUOTE || j[j.length - 1] === SINGLE_QUOTE) && (j = j.slice(0, -1)), j;
|
|
572
|
+
}
|
|
573
|
+
function escapeQuotes(b) {
|
|
574
|
+
let j = "", F = "";
|
|
575
|
+
for (let U = 0; U < b.length; U++) {
|
|
576
|
+
let W = b[U + 1];
|
|
577
|
+
b[U] === "\\" && W === "\"" ? (j += "\\\"", U++) : b[U] === "\"" && F !== "\\" ? j += "\\\"" : j += b[U], F = b[U] ?? "";
|
|
578
|
+
}
|
|
579
|
+
return j;
|
|
580
|
+
}
|
|
581
|
+
function parseCssPropertyValue(b) {
|
|
582
|
+
let j = b;
|
|
583
|
+
hasLeadingTrailingQuotes(b) && (j = trimQuotes(j), j = j.replace(ESCAPED_PATTERN, (b, j) => String.fromCodePoint(parseInt(j.trim(), 16))), j = j.replaceAll("\\\n", "\\n"), j = escapeQuotes(j), j = DOUBLE_QUOTE + j + DOUBLE_QUOTE);
|
|
584
|
+
try {
|
|
585
|
+
return JSON.parse(j);
|
|
586
|
+
} catch {
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
function CssDataMixin(b) {
|
|
591
|
+
class j extends b {
|
|
592
|
+
constructor(...b) {
|
|
593
|
+
super(...b), this._cssDataCache = null, this._computedStyle = null;
|
|
594
|
+
}
|
|
595
|
+
getCssData(b, j = !1) {
|
|
596
|
+
let F = this._cssDataCache ?? Object.create(null);
|
|
597
|
+
if (!Object.keys(F).includes(b) || !F[b]) {
|
|
598
|
+
this._computedStyle ||= window.getComputedStyle(this);
|
|
599
|
+
let U = this._computedStyle.getPropertyValue(b).trim();
|
|
600
|
+
try {
|
|
601
|
+
F[b] = parseCssPropertyValue(U);
|
|
602
|
+
} catch (U) {
|
|
603
|
+
j || console.warn(`CSS Data error: ${b}`, U), F[b] = null;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return this._cssDataCache = F, F[b];
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
return j;
|
|
610
|
+
}
|
|
611
|
+
function RegisterableElementMixin(b) {
|
|
612
|
+
class j extends b {
|
|
613
|
+
static reg(b) {
|
|
614
|
+
let j = this, F = window.customElements.get(b);
|
|
615
|
+
if (F) {
|
|
616
|
+
F !== j && console.warn([
|
|
617
|
+
`Element with tag name "${b}" already registered.`,
|
|
618
|
+
`You're trying to override it with another class "${this.name}".`,
|
|
619
|
+
"This is most likely a mistake.",
|
|
620
|
+
"New element will not be registered."
|
|
621
|
+
].join("\n"));
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
window.customElements.define(b, j);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
return j;
|
|
628
|
+
}
|
|
629
|
+
var DEFAULT_CDN_BASE = "https://ucarecdn.com";
|
|
630
|
+
const PROPS_MAP = Object.freeze({
|
|
631
|
+
"dev-mode": {},
|
|
632
|
+
pubkey: {},
|
|
633
|
+
uuid: {},
|
|
634
|
+
src: {},
|
|
635
|
+
lazy: { default: 1 },
|
|
636
|
+
intersection: {},
|
|
637
|
+
breakpoints: {},
|
|
638
|
+
"cdn-cname": { default: DEFAULT_CDN_BASE },
|
|
639
|
+
"proxy-cname": {},
|
|
640
|
+
"secure-delivery-proxy": {},
|
|
641
|
+
"hi-res-support": { default: 1 },
|
|
642
|
+
"ultra-res-support": {},
|
|
643
|
+
format: {},
|
|
644
|
+
"cdn-operations": {},
|
|
645
|
+
progressive: {},
|
|
646
|
+
quality: {},
|
|
647
|
+
"is-background-for": {},
|
|
648
|
+
"is-preview-blur": { default: 1 }
|
|
649
|
+
});
|
|
650
|
+
var ImgConfig = class extends CssDataMixin(RegisterableElementMixin(i)) {
|
|
651
|
+
createRenderRoot() {
|
|
652
|
+
return this;
|
|
653
|
+
}
|
|
654
|
+
constructor() {
|
|
655
|
+
for (let b in super(), this._state = {}, this._subscribers = /* @__PURE__ */ new Map(), this._isnObserver = null, this._observed = null, PROPS_MAP) {
|
|
656
|
+
let j = PROPS_MAP[b];
|
|
657
|
+
this._state[CSS_PREF + b] = j?.default || "";
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
$$(b) {
|
|
661
|
+
return this._state[CSS_PREF + b];
|
|
662
|
+
}
|
|
663
|
+
set$$(b) {
|
|
664
|
+
for (let j in b) {
|
|
665
|
+
let F = CSS_PREF + j, U = b[j];
|
|
666
|
+
this._state[F] = U, this._notify(F, U);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
sub$$(b, j) {
|
|
670
|
+
let F = CSS_PREF + b;
|
|
671
|
+
this._subscribers.has(F) || this._subscribers.set(F, /* @__PURE__ */ new Set()), this._subscribers.get(F)?.add(j);
|
|
672
|
+
let U = this._state[F];
|
|
673
|
+
U !== null && U !== "" && j(U);
|
|
674
|
+
}
|
|
675
|
+
_notify(b, j) {
|
|
676
|
+
this._subscribers.has(b) && this._subscribers.get(b)?.forEach((b) => {
|
|
677
|
+
j === null || j === "" || b(j);
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
analyticsParams() {
|
|
681
|
+
return "-/@clib/blocks/1.28.0-alpha.1/uc-img/";
|
|
682
|
+
}
|
|
683
|
+
initAttributes(b) {
|
|
684
|
+
Array.from(this.attributes).forEach((j) => {
|
|
685
|
+
let F = j;
|
|
686
|
+
PROPS_MAP[F.name] || b.setAttribute(F.name, F.value);
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
initIntersection(b, j) {
|
|
690
|
+
this._isnObserver = new IntersectionObserver((F) => {
|
|
691
|
+
F.forEach((F) => {
|
|
692
|
+
F.isIntersecting && (j(), this._isnObserver?.unobserve(b));
|
|
693
|
+
});
|
|
694
|
+
}, {
|
|
695
|
+
root: null,
|
|
696
|
+
rootMargin: "0px"
|
|
697
|
+
}), this._isnObserver.observe(b), this._observed ||= /* @__PURE__ */ new Set(), this._observed.add(b);
|
|
698
|
+
}
|
|
699
|
+
connectedCallback() {
|
|
700
|
+
super.connectedCallback(), this._initCssProperties();
|
|
701
|
+
}
|
|
702
|
+
_initCssProperties() {
|
|
703
|
+
for (let b in PROPS_MAP) {
|
|
704
|
+
let j = CSS_PREF + b, F = this.getCssData(j, !0);
|
|
705
|
+
F != null && (this._state[j] = F);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
disconnectedCallback() {
|
|
709
|
+
super.disconnectedCallback(), this._isnObserver &&= (this._observed?.forEach((b) => {
|
|
710
|
+
this._isnObserver?.unobserve(b);
|
|
711
|
+
}), null), this._subscribers.clear();
|
|
712
|
+
}
|
|
713
|
+
static get observedAttributes() {
|
|
714
|
+
return Object.keys(PROPS_MAP);
|
|
715
|
+
}
|
|
716
|
+
attributeChangedCallback(b, j, F) {
|
|
717
|
+
window.setTimeout(() => {
|
|
718
|
+
let j = CSS_PREF + b;
|
|
719
|
+
this._state[j] = F, this._notify(j, F);
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
const parseObjectToString = (b) => Object.entries(b).filter(([b, j]) => j !== void 0 && j !== "").map(([b, j]) => b === "cdn-operations" || b === "analytics" ? j : `${b}/${j}`);
|
|
724
|
+
var ImgBase = class extends ImgConfig {
|
|
725
|
+
constructor(...b) {
|
|
726
|
+
super(...b), this._img = new Image(), this._imgPreview = new Image();
|
|
727
|
+
}
|
|
728
|
+
_fmtAbs(b) {
|
|
729
|
+
return !b.includes("//") && !DEV_MODE && (b = new URL(b, document.baseURI).href), b;
|
|
730
|
+
}
|
|
731
|
+
_validateSize(b) {
|
|
732
|
+
if (!b) return;
|
|
733
|
+
let j = b, F = j.match(/\d+/)?.[0], U = j.match(/[a-zA-Z]+/)?.[0];
|
|
734
|
+
if (!F || !U) return;
|
|
735
|
+
let W = parseInt(F, 10);
|
|
736
|
+
return Number(W) > 5e3 && this._hasFormatJPG ? 5e3 + U : Number(W) > 3e3 && !this._hasFormatJPG ? 3e3 + U : b;
|
|
737
|
+
}
|
|
738
|
+
_getCdnModifiers(b, j) {
|
|
739
|
+
return createCdnUrlModifiers(...parseObjectToString({
|
|
740
|
+
format: this._getTypedCssValue("format"),
|
|
741
|
+
quality: this._getTypedCssValue("quality"),
|
|
742
|
+
resize: this._validateSize(b),
|
|
743
|
+
blur: j,
|
|
744
|
+
"cdn-operations": this._getTypedCssValue("cdn-operations") ?? void 0,
|
|
745
|
+
analytics: this.analyticsParams()
|
|
746
|
+
}));
|
|
747
|
+
}
|
|
748
|
+
_getTypedCssValue(b) {
|
|
749
|
+
let j = this.$$(b);
|
|
750
|
+
if (j == null || typeof j == "string" || typeof j == "number" || typeof j == "boolean") return j;
|
|
751
|
+
}
|
|
752
|
+
_getUrlBase(b = "", j = "") {
|
|
753
|
+
let F = this.$$("src");
|
|
754
|
+
if (F.startsWith("data:") || F.startsWith("blob:")) return F;
|
|
755
|
+
if (DEV_MODE && F && !F.includes("//")) return this._proxyUrl(F);
|
|
756
|
+
let U = this._getCdnModifiers(b, j), W = this.$$("cdn-cname"), G = W;
|
|
757
|
+
if (F.startsWith(String(W))) return createCdnUrl(F, U);
|
|
758
|
+
let K = this.$$("uuid");
|
|
759
|
+
if (G && K || K) return this._proxyUrl(createCdnUrl(createOriginalUrl(G, K), U));
|
|
760
|
+
let Y = this.$$("proxy-cname");
|
|
761
|
+
if (Y) return this._proxyUrl(createCdnUrl(Y, U, this._fmtAbs(F)));
|
|
762
|
+
let X = this.$$("pubkey");
|
|
763
|
+
if (X) return this._proxyUrl(createCdnUrl(`https://${X}.ucr.io/`, U, this._fmtAbs(F)));
|
|
764
|
+
}
|
|
765
|
+
_proxyUrl(b) {
|
|
766
|
+
let j = this.$$("secure-delivery-proxy");
|
|
767
|
+
return j ? applyTemplateData(j, { previewUrl: b }, { transform: (b) => window.encodeURIComponent(b) }) : b;
|
|
768
|
+
}
|
|
769
|
+
_getElSize(b, j = 1, F = !0) {
|
|
770
|
+
let U = b.getBoundingClientRect(), W = j * Math.round(U.width), G = F ? "" : j * Math.round(U.height);
|
|
771
|
+
return W || G ? `${W || ""}x${G || ""}` : null;
|
|
772
|
+
}
|
|
773
|
+
_setupEventProxy(b) {
|
|
774
|
+
let j = (b) => {
|
|
775
|
+
b.stopPropagation();
|
|
776
|
+
let j = new Event(b.type, b);
|
|
777
|
+
this.dispatchEvent(j);
|
|
778
|
+
};
|
|
779
|
+
for (let F of ["load", "error"]) b.addEventListener(F, j);
|
|
780
|
+
}
|
|
781
|
+
get img() {
|
|
782
|
+
return this._hasPreviewImage || (this._setupConfigForImage({ elNode: this._img }), this.appendChild(this._img)), this._img;
|
|
783
|
+
}
|
|
784
|
+
get _currentImg() {
|
|
785
|
+
return this._hasPreviewImage ? {
|
|
786
|
+
type: ImgTypeEnum.PREVIEW,
|
|
787
|
+
img: this._imgPreview
|
|
788
|
+
} : {
|
|
789
|
+
type: ImgTypeEnum.MAIN,
|
|
790
|
+
img: this.img
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
get _hasPreviewImage() {
|
|
794
|
+
return this.$$("is-preview-blur");
|
|
795
|
+
}
|
|
796
|
+
get _bgSelector() {
|
|
797
|
+
return this.$$("is-background-for");
|
|
798
|
+
}
|
|
799
|
+
get _breakpoints() {
|
|
800
|
+
let b = this.$$("breakpoints");
|
|
801
|
+
return b ? uniqueArray(stringToArray(b).map((b) => parseInt(b, 10))) : null;
|
|
802
|
+
}
|
|
803
|
+
get _hasFormatJPG() {
|
|
804
|
+
return this.$$("format").toLowerCase() === "jpeg";
|
|
805
|
+
}
|
|
806
|
+
_renderBg(b) {
|
|
807
|
+
let j = /* @__PURE__ */ new Set();
|
|
808
|
+
j.add(`url("${this._getUrlBase(this._getElSize(b))}") 1x`), this.$$("hi-res-support") && j.add(`url("${this._getUrlBase(this._getElSize(b, 2))}") 2x`), this.$$("ultra-res-support") && j.add(`url("${this._getUrlBase(this._getElSize(b, 3))}") 3x`);
|
|
809
|
+
let F = `image-set(${[...j].join(", ")})`;
|
|
810
|
+
b.style.setProperty("background-image", F), b.style.setProperty("background-image", `-webkit-${F}`);
|
|
811
|
+
}
|
|
812
|
+
_getSrcset() {
|
|
813
|
+
let b = /* @__PURE__ */ new Set();
|
|
814
|
+
return this._breakpoints ? this._breakpoints.forEach((j) => {
|
|
815
|
+
b.add(`${this._getUrlBase(`${j}x`)} ${this._validateSize(`${j}w`)}`), this.$$("hi-res-support") && b.add(`${this._getUrlBase(`${j * 2}x`)} ${this._validateSize(`${j * 2}w`)}`), this.$$("ultra-res-support") && b.add(`${this._getUrlBase(`${j * 3}x`)} ${this._validateSize(`${j * 3}w`)}`);
|
|
816
|
+
}) : (b.add(`${this._getUrlBase(this._getElSize(this._currentImg.img))} 1x`), this.$$("hi-res-support") && b.add(`${this._getUrlBase(this._getElSize(this._currentImg.img, 2))} 2x`), this.$$("ultra-res-support") && b.add(`${this._getUrlBase(this._getElSize(this._currentImg.img, 3))} 3x`)), [...b].join();
|
|
817
|
+
}
|
|
818
|
+
_getSrc() {
|
|
819
|
+
return this._getUrlBase();
|
|
820
|
+
}
|
|
821
|
+
get _srcUrlPreview() {
|
|
822
|
+
return this._getUrlBase("100x", "100");
|
|
823
|
+
}
|
|
824
|
+
_renderBackground() {
|
|
825
|
+
let b = this._bgSelector;
|
|
826
|
+
[...document.querySelectorAll(b)].forEach((b) => {
|
|
827
|
+
this.$$("intersection") ? this.initIntersection(b, () => {
|
|
828
|
+
this._renderBg(b);
|
|
829
|
+
}) : this._renderBg(b);
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
_appendURL({ elNode: b, src: j, srcset: F }) {
|
|
833
|
+
j && (b.src = j), F && (b.srcset = F);
|
|
834
|
+
}
|
|
835
|
+
_setupConfigForImage({ elNode: b }) {
|
|
836
|
+
this._setupEventProxy(b), this.initAttributes(b);
|
|
837
|
+
}
|
|
838
|
+
_loaderImage({ src: b, srcset: j, elNode: F }) {
|
|
839
|
+
return new Promise((U, W) => {
|
|
840
|
+
this._setupConfigForImage({ elNode: F }), F.setAttribute(UNRESOLVED_ATTR, ""), F.addEventListener("load", () => {
|
|
841
|
+
F.removeAttribute(UNRESOLVED_ATTR), U(F);
|
|
842
|
+
}), F.addEventListener("error", () => {
|
|
843
|
+
W(!1);
|
|
844
|
+
}), this._appendURL({
|
|
845
|
+
elNode: F,
|
|
846
|
+
src: b,
|
|
847
|
+
srcset: j
|
|
848
|
+
});
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
async _renderImage() {
|
|
852
|
+
if (this.$$("intersection")) {
|
|
853
|
+
this._hasPreviewImage && (this._setupConfigForImage({ elNode: this._imgPreview }), this.appendChild(this._imgPreview)), this.initIntersection(this._currentImg.img, async () => {
|
|
854
|
+
this._hasPreviewImage && (this._imgPreview.src = this._srcUrlPreview);
|
|
855
|
+
try {
|
|
856
|
+
await this._loaderImage({
|
|
857
|
+
src: this._getSrc(),
|
|
858
|
+
srcset: this._getSrcset(),
|
|
859
|
+
elNode: this._img
|
|
860
|
+
}), this._hasPreviewImage && await this._imgPreview.remove(), this.appendChild(this._img);
|
|
861
|
+
} catch {
|
|
862
|
+
this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
|
|
863
|
+
}
|
|
864
|
+
});
|
|
865
|
+
return;
|
|
866
|
+
}
|
|
867
|
+
try {
|
|
868
|
+
this._hasPreviewImage && (await this._loaderImage({
|
|
869
|
+
src: this._srcUrlPreview,
|
|
870
|
+
elNode: this._imgPreview
|
|
871
|
+
}), this.appendChild(this._imgPreview)), await this._loaderImage({
|
|
872
|
+
src: this._getSrc(),
|
|
873
|
+
srcset: this._getSrcset(),
|
|
874
|
+
elNode: this._img
|
|
875
|
+
}), this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
|
|
876
|
+
} catch {
|
|
877
|
+
this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
init() {
|
|
881
|
+
this._bgSelector ? this._renderBackground() : this._renderImage();
|
|
882
|
+
}
|
|
883
|
+
}, Img = class extends ImgBase {
|
|
884
|
+
connectedCallback() {
|
|
885
|
+
super.connectedCallback(), this.sub$$("src", () => {
|
|
886
|
+
this.init();
|
|
887
|
+
}), this.sub$$("uuid", () => {
|
|
888
|
+
this.init();
|
|
889
|
+
}), this.sub$$("lazy", (b) => {
|
|
890
|
+
!this.$$("is-background-for") && !this.$$("is-preview-blur") && (this.img.loading = b ? "lazy" : "eager");
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
};
|
|
894
|
+
Img.reg("uc-img");
|
|
895
|
+
export { Img };
|