@dxtmisha/constructor 0.39.7 → 0.52.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/ai-types.txt +4901 -284
- package/dist/ActionsInclude-BzyGXlK7.js +23 -0
- package/dist/AriaStaticInclude-CS1hPGyK.js +89 -0
- package/dist/ArrowInclude-BM_RP5vO.js +14 -0
- package/dist/BadgeInclude-DISlNqBJ.js +17 -0
- package/dist/BarsInclude-rBLacb0J.js +35 -0
- package/dist/BlockDesign-DkbPo-Ey.js +106 -0
- package/dist/ButtonDesign-DTihOCBe.js +87 -0
- package/dist/ButtonInclude-Bq7DNI-R.js +23 -0
- package/dist/CaptionInclude-CunHUsec.js +41 -0
- package/dist/DescriptionInclude-B_Xf_j3l.js +36 -0
- package/dist/EnabledInclude-CkD_lxMY.js +11 -0
- package/dist/EventClickInclude-6I8kuFc9.js +63 -0
- package/dist/FieldCounterInclude-l1o0Bm7V.js +22 -0
- package/dist/FieldEventInclude-DLX__9aJ.js +257 -0
- package/dist/FieldInclude-DCvNorOt.js +87 -0
- package/dist/FieldInputCheckInclude-czZ02ymY.js +170 -0
- package/dist/FieldLabelInclude-BA5H3kib.js +27 -0
- package/dist/FieldMatchInclude-CA716pa4.js +100 -0
- package/dist/FieldMessageInclude-6cxMqgIx.js +27 -0
- package/dist/HorizontalScrollInclude-BN6p9jjq.js +30 -0
- package/dist/IconInclude-BhzGfa3o.js +44 -0
- package/dist/IconTrailingInclude-BwoB_AQn.js +23 -0
- package/dist/ImageInclude-CP-Q4R20.js +18 -0
- package/dist/LabelHighlightInclude-DC9qNAR-.js +30 -0
- package/dist/LabelInclude-DoZ7EUYO.js +56 -0
- package/dist/LabelNumberInclude-VVGMvwYq.js +15 -0
- package/dist/ListGroupOpen-C6J8d4SM.js +12 -0
- package/dist/MaskInclude-DuE6XcDZ.js +48 -0
- package/dist/MenuInclude-BT27rmFW.js +48 -0
- package/dist/ModalDesignAbstract-BaVdtb1N.js +63 -0
- package/dist/ModelInclude-D8LkrhPp.js +32 -0
- package/dist/ModelValueInclude-CQDkIoal.js +20 -0
- package/dist/MotionAxisInclude-DO4t3_lZ.js +18 -0
- package/dist/MotionTransformClassesInclude-BN-T4YKS.js +91 -0
- package/dist/MotionTransformInclude-CFVVig1F.js +52 -0
- package/dist/Plugin-cWn0HZcf.js +205 -0
- package/dist/ProgressInclude-BnPBYwJg.js +15 -0
- package/dist/RippleInclude-BlC1h0Ya.js +10 -0
- package/dist/ScrollToXInclude-yt1sAUrP.js +15 -0
- package/dist/ScrollbarInclude-B4_ZIqkW.js +55 -0
- package/dist/SkeletonInclude-D8on8xmw.js +39 -0
- package/dist/SuffixInclude-VNq8SwAI.js +67 -0
- package/dist/TabIndexInclude-DLSfl7-6.js +88 -0
- package/dist/TabsNavigationInclude-DU9Nb7hG.js +17 -0
- package/dist/TextInclude-OwyVCAbS.js +90 -0
- package/dist/TooltipInclude-3iLdbNcH.js +27 -0
- package/dist/TouchEventInclude-By_ChOIe.js +84 -0
- package/dist/WindowClassesInclude-zm-ITw5d.js +89 -0
- package/dist/WindowEsc-vBFI8pVr.js +28 -0
- package/dist/WindowInclude-GF4aSfrJ.js +66 -0
- package/dist/accordion.js +76 -193
- package/dist/actionSheet.js +61 -137
- package/dist/actions.js +59 -192
- package/dist/anchor.js +134 -360
- package/dist/arrow.js +279 -664
- package/dist/badge.js +47 -140
- package/dist/bars.js +120 -365
- package/dist/block.js +2 -10
- package/dist/button.js +3 -62
- package/dist/cell.js +117 -281
- package/dist/checkbox.js +112 -0
- package/dist/chip.js +24 -81
- package/dist/chipGroup.js +48 -163
- package/dist/classes/CaptionInclude.d.ts +4 -4
- package/dist/classes/EventClickInclude.d.ts +17 -1
- package/dist/classes/Field/FieldAttributesInclude.d.ts +2 -0
- package/dist/classes/Field/FieldEventInclude.d.ts +6 -6
- package/dist/classes/Plugin/PluginCode.d.ts +0 -8
- package/dist/classes/ScrollToXInclude.d.ts +35 -0
- package/dist/constructors/Accordion/Accordion.d.ts +9 -1
- package/dist/constructors/Accordion/props.d.ts +6 -6
- package/dist/constructors/Accordion/types.d.ts +3 -4
- package/dist/constructors/ActionSheet/ActionSheet.d.ts +19 -2
- package/dist/constructors/ActionSheet/props.d.ts +2 -0
- package/dist/constructors/Actions/Actions.d.ts +5 -2
- package/dist/constructors/Actions/basicTypes.d.ts +3 -0
- package/dist/constructors/Actions/props.d.ts +4 -0
- package/dist/constructors/Actions/types.d.ts +2 -0
- package/dist/constructors/Anchor/Anchor.d.ts +17 -8
- package/dist/constructors/Anchor/basicTypes.d.ts +4 -0
- package/dist/constructors/Anchor/index.d.ts +4 -0
- package/dist/constructors/Anchor/props.d.ts +10 -0
- package/dist/constructors/Anchor/types.d.ts +1 -0
- package/dist/constructors/Arrow/Arrow.d.ts +13 -6
- package/dist/constructors/Arrow/basicTypes.d.ts +9 -0
- package/dist/constructors/Arrow/index.d.ts +5 -0
- package/dist/constructors/Arrow/props.d.ts +3 -0
- package/dist/constructors/Arrow/types.d.ts +1 -0
- package/dist/constructors/Badge/Badge.d.ts +7 -3
- package/dist/constructors/Badge/basicTypes.d.ts +11 -0
- package/dist/constructors/Badge/index.d.ts +1 -0
- package/dist/constructors/Badge/props.d.ts +1 -0
- package/dist/constructors/Bars/Bars.d.ts +21 -10
- package/dist/constructors/Bars/basicTypes.d.ts +4 -0
- package/dist/constructors/Bars/index.d.ts +1 -0
- package/dist/constructors/Bars/props.d.ts +14 -0
- package/dist/constructors/Bars/types.d.ts +4 -0
- package/dist/constructors/Block/Block.d.ts +11 -5
- package/dist/constructors/Block/props.d.ts +3 -0
- package/dist/constructors/Button/Button.d.ts +17 -8
- package/dist/constructors/Button/ButtonInclude.d.ts +6 -4
- package/dist/constructors/Button/basicTypes.d.ts +17 -0
- package/dist/constructors/Button/props.d.ts +2 -0
- package/dist/constructors/Button/types.d.ts +2 -2
- package/dist/constructors/Cell/Cell.d.ts +21 -10
- package/dist/constructors/Cell/CellDesign.d.ts +7 -5
- package/dist/constructors/Cell/basicTypes.d.ts +3 -1
- package/dist/constructors/Cell/props.d.ts +4 -0
- package/dist/constructors/Cell/types.d.ts +4 -2
- package/dist/constructors/Checkbox/Checkbox.d.ts +90 -0
- package/dist/constructors/Checkbox/CheckboxDesign.d.ts +73 -0
- package/dist/constructors/Checkbox/CheckboxIcon.d.ts +33 -0
- package/dist/constructors/Checkbox/basicTypes.d.ts +1 -0
- package/dist/constructors/Checkbox/index.d.ts +6 -0
- package/dist/constructors/Checkbox/props.d.ts +44 -0
- package/dist/constructors/Checkbox/types.d.ts +49 -0
- package/dist/constructors/Chip/basicTypes.d.ts +10 -0
- package/dist/constructors/ChipGroup/ChipGroup.d.ts +9 -4
- package/dist/constructors/ChipGroup/basicTypes.d.ts +3 -0
- package/dist/constructors/ChipGroup/props.d.ts +10 -0
- package/dist/constructors/ChipGroup/types.d.ts +1 -0
- package/dist/constructors/Dialog/Dialog.d.ts +31 -3
- package/dist/constructors/Dialog/props.d.ts +11 -0
- package/dist/constructors/Dialog/types.d.ts +2 -0
- package/dist/constructors/Dummy/Dummy.d.ts +29 -0
- package/dist/constructors/Dummy/DummyDesign.d.ts +43 -0
- package/dist/constructors/Dummy/basicTypes.d.ts +1 -0
- package/dist/constructors/Dummy/index.d.ts +5 -0
- package/dist/constructors/Dummy/props.d.ts +15 -0
- package/dist/constructors/Dummy/types.d.ts +37 -0
- package/dist/constructors/Field/Field.d.ts +29 -14
- package/dist/constructors/Field/FieldSize.d.ts +2 -1
- package/dist/constructors/Field/basicTypes.d.ts +15 -2
- package/dist/constructors/Field/index.d.ts +3 -0
- package/dist/constructors/Field/props.d.ts +12 -0
- package/dist/constructors/Field/types.d.ts +3 -0
- package/dist/constructors/FieldCounter/FieldCounter.d.ts +5 -2
- package/dist/constructors/FieldCounter/basicTypes.d.ts +8 -1
- package/dist/constructors/FieldCounter/props.d.ts +6 -0
- package/dist/constructors/FieldLabel/FieldLabel.d.ts +11 -5
- package/dist/constructors/FieldLabel/basicTypes.d.ts +4 -1
- package/dist/constructors/FieldLabel/props.d.ts +4 -0
- package/dist/constructors/FieldMessage/FieldMessage.d.ts +9 -4
- package/dist/constructors/FieldMessage/basicTypes.d.ts +12 -1
- package/dist/constructors/FieldMessage/index.d.ts +1 -0
- package/dist/constructors/FieldMessage/props.d.ts +9 -0
- package/dist/constructors/Grid/Grid.d.ts +29 -0
- package/dist/constructors/Grid/GridDesign.d.ts +43 -0
- package/dist/constructors/Grid/basicTypes.d.ts +1 -0
- package/dist/constructors/Grid/index.d.ts +5 -0
- package/dist/constructors/Grid/props.d.ts +15 -0
- package/dist/constructors/Grid/types.d.ts +37 -0
- package/dist/constructors/GridItem/GridItem.d.ts +29 -0
- package/dist/constructors/GridItem/GridItemDesign.d.ts +43 -0
- package/dist/constructors/GridItem/basicTypes.d.ts +1 -0
- package/dist/constructors/GridItem/index.d.ts +5 -0
- package/dist/constructors/GridItem/props.d.ts +19 -0
- package/dist/constructors/GridItem/types.d.ts +37 -0
- package/dist/constructors/Group/Group.d.ts +6 -0
- package/dist/constructors/Group/GroupDesign.d.ts +18 -0
- package/dist/constructors/Group/basicTypes.d.ts +1 -0
- package/dist/constructors/Group/index.d.ts +5 -0
- package/dist/constructors/Group/props.d.ts +20 -0
- package/dist/constructors/Group/types.d.ts +44 -0
- package/dist/constructors/HorizontalScroll/HorizontalScroll.d.ts +67 -0
- package/dist/constructors/HorizontalScroll/HorizontalScrollDesign.d.ts +43 -0
- package/dist/constructors/HorizontalScroll/HorizontalScrollInclude.d.ts +67 -0
- package/dist/constructors/HorizontalScroll/basicTypes.d.ts +40 -0
- package/dist/constructors/HorizontalScroll/index.d.ts +6 -0
- package/dist/constructors/HorizontalScroll/props.d.ts +29 -0
- package/dist/constructors/HorizontalScroll/types.d.ts +39 -0
- package/dist/constructors/Icon/Icon.d.ts +7 -3
- package/dist/constructors/Icon/basicTypes.d.ts +33 -0
- package/dist/constructors/Icon/index.d.ts +1 -1
- package/dist/constructors/Icon/props.d.ts +5 -0
- package/dist/constructors/Icon/types.d.ts +4 -2
- package/dist/constructors/Image/Image.d.ts +21 -12
- package/dist/constructors/Image/ImageInclude.d.ts +3 -3
- package/dist/constructors/Image/ImageUint8Array.d.ts +47 -0
- package/dist/constructors/Image/basicTypes.d.ts +56 -7
- package/dist/constructors/Image/index.d.ts +15 -1
- package/dist/constructors/Image/types.d.ts +3 -0
- package/dist/constructors/Input/Input.d.ts +37 -18
- package/dist/constructors/Input/basicTypes.d.ts +5 -0
- package/dist/constructors/Input/index.d.ts +1 -0
- package/dist/constructors/List/List.d.ts +21 -12
- package/dist/constructors/List/ListControl.d.ts +12 -0
- package/dist/constructors/List/basicTypes.d.ts +5 -0
- package/dist/constructors/List/index.d.ts +4 -0
- package/dist/constructors/List/props.d.ts +31 -0
- package/dist/constructors/List/types.d.ts +5 -0
- package/dist/constructors/ListGroup/ListGroup.d.ts +5 -2
- package/dist/constructors/ListGroup/basicTypes.d.ts +4 -0
- package/dist/constructors/ListGroup/index.d.ts +1 -0
- package/dist/constructors/ListGroup/props.d.ts +1 -0
- package/dist/constructors/ListGroup/types.d.ts +3 -0
- package/dist/constructors/ListItem/ListItem.d.ts +34 -18
- package/dist/constructors/ListItem/basicTypes.d.ts +5 -0
- package/dist/constructors/ListItem/props.d.ts +13 -0
- package/dist/constructors/ListItem/types.d.ts +5 -2
- package/dist/constructors/ListMenu/ListMenu.d.ts +7 -3
- package/dist/constructors/ListMenu/basicTypes.d.ts +5 -0
- package/dist/constructors/ListMenu/props.d.ts +3 -1
- package/dist/constructors/ListMenu/types.d.ts +2 -0
- package/dist/constructors/Mask/Mask.d.ts +49 -24
- package/dist/constructors/Mask/basicTypes.d.ts +43 -0
- package/dist/constructors/Mask/index.d.ts +24 -0
- package/dist/constructors/Mask/props.d.ts +19 -0
- package/dist/constructors/Mask/types.d.ts +15 -0
- package/dist/constructors/Menu/Menu.d.ts +21 -10
- package/dist/constructors/Menu/MenuInclude.d.ts +1 -0
- package/dist/constructors/Menu/basicTypes.d.ts +15 -0
- package/dist/constructors/Menu/index.d.ts +5 -0
- package/dist/constructors/Menu/props.d.ts +26 -0
- package/dist/constructors/Menu/types.d.ts +2 -0
- package/dist/constructors/Modal/Modal.d.ts +15 -1
- package/dist/constructors/Modal/ModalAbstract.d.ts +9 -1
- package/dist/constructors/Modal/index.d.ts +2 -0
- package/dist/constructors/Modal/props.d.ts +2 -0
- package/dist/constructors/Modal/types.d.ts +1 -0
- package/dist/constructors/MotionAxis/MotionAxis.d.ts +75 -0
- package/dist/constructors/MotionAxis/MotionAxisDesign.d.ts +49 -0
- package/dist/constructors/MotionAxis/MotionAxisElement.d.ts +132 -0
- package/dist/constructors/MotionAxis/MotionAxisGo.d.ts +103 -0
- package/dist/constructors/MotionAxis/MotionAxisInclude.d.ts +49 -0
- package/dist/constructors/MotionAxis/MotionAxisPrevious.d.ts +42 -0
- package/dist/constructors/MotionAxis/MotionAxisSelected.d.ts +31 -0
- package/dist/constructors/MotionAxis/MotionAxisSlides.d.ts +19 -0
- package/dist/constructors/MotionAxis/MotionAxisStatus.d.ts +88 -0
- package/dist/constructors/MotionAxis/MotionAxisStyles.d.ts +38 -0
- package/dist/constructors/MotionAxis/basicTypes.d.ts +42 -0
- package/dist/constructors/MotionAxis/index.d.ts +13 -0
- package/dist/constructors/MotionAxis/props.d.ts +35 -0
- package/dist/constructors/MotionAxis/types.d.ts +64 -0
- package/dist/constructors/MotionTransform/MotionTransform.d.ts +19 -9
- package/dist/constructors/MotionTransform/MotionTransformDesign.d.ts +3 -3
- package/dist/constructors/MotionTransform/basicTypes.d.ts +1 -0
- package/dist/constructors/MotionTransform/index.d.ts +6 -1
- package/dist/constructors/MotionTransform/props.d.ts +18 -12
- package/dist/constructors/MotionTransform/types.d.ts +7 -5
- package/dist/constructors/Progress/Progress.d.ts +5 -1
- package/dist/constructors/Progress/basicTypes.d.ts +4 -0
- package/dist/constructors/Progress/props.d.ts +11 -0
- package/dist/constructors/Ripple/Ripple.d.ts +5 -1
- package/dist/constructors/Ripple/RippleInclude.d.ts +3 -3
- package/dist/constructors/Ripple/basicTypes.d.ts +6 -1
- package/dist/constructors/Ripple/index.d.ts +1 -0
- package/dist/constructors/Ripple/props.d.ts +1 -0
- package/dist/constructors/Scrollbar/Scrollbar.d.ts +7 -3
- package/dist/constructors/Scrollbar/ScrollbarInclude.d.ts +3 -3
- package/dist/constructors/Scrollbar/basicTypes.d.ts +10 -1
- package/dist/constructors/Scrollbar/index.d.ts +2 -0
- package/dist/constructors/Scrollbar/props.d.ts +2 -0
- package/dist/constructors/Scrollbar/types.d.ts +8 -0
- package/dist/constructors/Select/Select.d.ts +25 -12
- package/dist/constructors/Select/index.d.ts +2 -0
- package/dist/constructors/Select/props.d.ts +9 -0
- package/dist/constructors/SelectValue/SelectValue.d.ts +9 -4
- package/dist/constructors/SelectValue/basicTypes.d.ts +3 -0
- package/dist/constructors/SelectValue/props.d.ts +8 -0
- package/dist/constructors/Skeleton/basicTypes.d.ts +13 -0
- package/dist/constructors/Skeleton/index.d.ts +2 -1
- package/dist/constructors/Skeleton/types.d.ts +2 -0
- package/dist/constructors/Snackbar/Snackbar.d.ts +47 -0
- package/dist/constructors/Snackbar/SnackbarData.d.ts +104 -0
- package/dist/constructors/Snackbar/SnackbarDesign.d.ts +63 -0
- package/dist/constructors/Snackbar/SnackbarEvent.d.ts +32 -0
- package/dist/constructors/Snackbar/basicTypes.d.ts +17 -0
- package/dist/constructors/Snackbar/index.d.ts +7 -0
- package/dist/constructors/Snackbar/props.d.ts +27 -0
- package/dist/constructors/Snackbar/types.d.ts +54 -0
- package/dist/constructors/SnackbarItem/SnackbarItem.d.ts +72 -0
- package/dist/constructors/SnackbarItem/SnackbarItemDesign.d.ts +67 -0
- package/dist/constructors/SnackbarItem/basicTypes.d.ts +28 -0
- package/dist/constructors/SnackbarItem/index.d.ts +5 -0
- package/dist/constructors/SnackbarItem/props.d.ts +43 -0
- package/dist/constructors/SnackbarItem/types.d.ts +56 -0
- package/dist/constructors/TabItem/TabItem.d.ts +120 -0
- package/dist/constructors/TabItem/TabItemDesign.d.ts +43 -0
- package/dist/constructors/TabItem/basicTypes.d.ts +8 -0
- package/dist/constructors/TabItem/index.d.ts +5 -0
- package/dist/constructors/TabItem/props.d.ts +40 -0
- package/dist/constructors/TabItem/types.d.ts +44 -0
- package/dist/constructors/Tabs/Tabs.d.ts +50 -0
- package/dist/constructors/Tabs/TabsDesign.d.ts +49 -0
- package/dist/constructors/Tabs/TabsSelected.d.ts +39 -0
- package/dist/constructors/Tabs/basicTypes.d.ts +1 -0
- package/dist/constructors/Tabs/index.d.ts +6 -0
- package/dist/constructors/Tabs/props.d.ts +20 -0
- package/dist/constructors/Tabs/types.d.ts +39 -0
- package/dist/constructors/TabsNavigation/TabsNavigation.d.ts +141 -0
- package/dist/constructors/TabsNavigation/TabsNavigationControl.d.ts +85 -0
- package/dist/constructors/TabsNavigation/TabsNavigationDesign.d.ts +60 -0
- package/dist/constructors/TabsNavigation/TabsNavigationFocus.d.ts +61 -0
- package/dist/constructors/TabsNavigation/TabsNavigationIds.d.ts +32 -0
- package/dist/constructors/TabsNavigation/TabsNavigationInclude.d.ts +43 -0
- package/dist/constructors/TabsNavigation/TabsNavigationIndicator.d.ts +55 -0
- package/dist/constructors/TabsNavigation/TabsNavigationSelected.d.ts +39 -0
- package/dist/constructors/TabsNavigation/basicTypes.d.ts +27 -0
- package/dist/constructors/TabsNavigation/index.d.ts +11 -0
- package/dist/constructors/TabsNavigation/props.d.ts +42 -0
- package/dist/constructors/TabsNavigation/types.d.ts +47 -0
- package/dist/constructors/Textarea/Textarea.d.ts +83 -0
- package/dist/constructors/Textarea/TextareaDesign.d.ts +51 -0
- package/dist/constructors/Textarea/basicTypes.d.ts +1 -0
- package/dist/constructors/Textarea/index.d.ts +5 -0
- package/dist/constructors/Textarea/props.d.ts +26 -0
- package/dist/constructors/Textarea/types.d.ts +38 -0
- package/dist/constructors/TextareaAutosize/TextareaAutosize.d.ts +7 -3
- package/dist/constructors/TextareaAutosize/basicTypes.d.ts +20 -1
- package/dist/constructors/TextareaAutosize/index.d.ts +2 -0
- package/dist/constructors/TextareaAutosize/props.d.ts +7 -2
- package/dist/constructors/TextareaAutosize/types.d.ts +2 -0
- package/dist/constructors/Tooltip/Tooltip.d.ts +27 -16
- package/dist/constructors/Tooltip/{TooltipClasses.d.ts → TooltipClassesData.d.ts} +1 -1
- package/dist/constructors/Tooltip/TooltipEvent.d.ts +4 -4
- package/dist/constructors/Tooltip/TooltipPosition.d.ts +3 -3
- package/dist/constructors/Tooltip/basicTypes.d.ts +15 -0
- package/dist/constructors/Tooltip/index.d.ts +6 -0
- package/dist/constructors/Tooltip/props.d.ts +9 -0
- package/dist/constructors/Tooltip/types.d.ts +4 -0
- package/dist/constructors/Window/Window.d.ts +53 -26
- package/dist/constructors/Window/{WindowClasses.d.ts → WindowClassesData.d.ts} +1 -1
- package/dist/constructors/Window/WindowCoordinates.d.ts +3 -3
- package/dist/constructors/Window/WindowElement.d.ts +3 -3
- package/dist/constructors/Window/WindowEmit.d.ts +3 -3
- package/dist/constructors/Window/WindowFlash.d.ts +3 -3
- package/dist/constructors/Window/WindowHidden.d.ts +3 -3
- package/dist/constructors/Window/WindowPersistent.d.ts +3 -3
- package/dist/constructors/Window/WindowVerification.d.ts +3 -3
- package/dist/constructors/Window/basicTypes.d.ts +10 -0
- package/dist/constructors/Window/index.d.ts +21 -3
- package/dist/constructors/Window/props.d.ts +53 -27
- package/dist/constructors/Window/types.d.ts +7 -7
- package/dist/defineProperty-hmGKPWdq.js +39 -0
- package/dist/dialog.js +89 -210
- package/dist/dummy.js +28 -0
- package/dist/field.js +220 -549
- package/dist/fieldCounter.js +77 -194
- package/dist/fieldLabel.js +63 -175
- package/dist/fieldMessage.js +82 -234
- package/dist/getClassTagAStatic-BPIEWyHY.js +4 -0
- package/dist/grid.js +31 -0
- package/dist/gridItem.js +31 -0
- package/dist/group.js +13 -0
- package/dist/horizontalScroll.js +57 -0
- package/dist/icon.js +82 -227
- package/dist/image.js +648 -1345
- package/dist/input.js +82 -363
- package/dist/library/checkbox.d.ts +1 -0
- package/dist/library/dummy.d.ts +1 -0
- package/dist/library/grid.d.ts +1 -0
- package/dist/library/gridItem.d.ts +1 -0
- package/dist/library/group.d.ts +1 -0
- package/dist/library/horizontalScroll.d.ts +1 -0
- package/dist/library/motionAxis.d.ts +1 -0
- package/dist/library/snackbar.d.ts +1 -0
- package/dist/library/snackbarItem.d.ts +1 -0
- package/dist/library/tabItem.d.ts +1 -0
- package/dist/library/tabs.d.ts +1 -0
- package/dist/library/tabsNavigation.d.ts +1 -0
- package/dist/library/textarea.d.ts +1 -0
- package/dist/library.d.ts +1 -0
- package/dist/library.js +21 -58
- package/dist/list.js +455 -1062
- package/dist/listGroup.js +61 -172
- package/dist/listItem.js +113 -318
- package/dist/listMenu.js +51 -123
- package/dist/mask.js +1015 -2488
- package/dist/menu.js +200 -537
- package/dist/modal.js +28 -72
- package/dist/motionAxis.js +319 -0
- package/dist/motionTransform.js +225 -633
- package/dist/page.js +11 -28
- package/dist/plugin.js +2 -4
- package/dist/progress.js +123 -302
- package/dist/ripple.js +55 -135
- package/dist/scrollbar.js +99 -237
- package/dist/section.js +11 -28
- package/dist/select.js +163 -423
- package/dist/selectValue.js +87 -247
- package/dist/skeleton.js +32 -80
- package/dist/snackbar.js +143 -0
- package/dist/snackbarItem.js +119 -0
- package/dist/tabItem.js +64 -0
- package/dist/tabs.js +69 -0
- package/dist/tabsNavigation.js +212 -0
- package/dist/textarea.js +58 -0
- package/dist/textareaAutosize.js +83 -237
- package/dist/tooltip.js +236 -667
- package/dist/types/ariaTypes.d.ts +45 -25
- package/dist/types/descriptionTypes.d.ts +3 -0
- package/dist/types/eventClickTypes.d.ts +2 -0
- package/dist/types/fieldTypes.d.ts +29 -20
- package/dist/types/modelTypes.d.ts +30 -0
- package/dist/types/pluginTypes.d.ts +5 -1
- package/dist/types/roleTypes.d.ts +1 -0
- package/dist/types/textTypes.d.ts +18 -0
- package/dist/window.js +769 -2037
- package/package.json +56 -2
- package/src/constructors/Accordion/properties.json +16 -0
- package/src/constructors/ActionSheet/properties.json +14 -0
- package/src/constructors/Actions/properties.json +66 -0
- package/src/constructors/Anchor/properties.json +3 -0
- package/src/constructors/Arrow/properties.json +23 -0
- package/src/constructors/Badge/properties.json +36 -0
- package/src/constructors/Bars/properties.json +5 -0
- package/src/constructors/Block/properties.json +10 -0
- package/src/constructors/Button/properties.json +84 -0
- package/src/constructors/Cell/properties.json +52 -0
- package/src/constructors/Cell/style.scss +8 -3
- package/src/constructors/Checkbox/properties.json +65 -0
- package/src/constructors/Checkbox/style.scss +99 -0
- package/src/constructors/Chip/properties.json +3 -0
- package/src/constructors/ChipGroup/properties.json +3 -0
- package/src/constructors/Dialog/properties.json +23 -0
- package/src/constructors/Dummy/properties.json +2 -0
- package/src/constructors/Dummy/style.scss +5 -0
- package/src/constructors/Field/properties.json +92 -0
- package/src/constructors/Field/style.scss +2 -0
- package/src/constructors/FieldCounter/properties.json +4 -0
- package/src/constructors/FieldLabel/properties.json +4 -0
- package/src/constructors/FieldMessage/properties.json +10 -0
- package/src/constructors/Grid/properties.json +6 -0
- package/src/constructors/Grid/style.scss +8 -0
- package/src/constructors/GridItem/properties.json +40 -0
- package/src/constructors/GridItem/style.scss +5 -0
- package/src/constructors/Group/properties.json +3 -0
- package/src/constructors/Group/style.scss +6 -0
- package/src/constructors/HorizontalScroll/properties.json +26 -0
- package/src/constructors/HorizontalScroll/style.scss +27 -0
- package/src/constructors/Icon/properties.json +25 -0
- package/src/constructors/Image/properties.json +17 -0
- package/src/constructors/Input/properties.json +2 -0
- package/src/constructors/List/properties.json +16 -0
- package/src/constructors/ListGroup/properties.json +15 -0
- package/src/constructors/ListItem/properties.json +52 -0
- package/src/constructors/ListItem/style.scss +2 -0
- package/src/constructors/ListMenu/properties.json +19 -0
- package/src/constructors/Mask/properties.json +30 -0
- package/src/constructors/Mask/style.scss +6 -2
- package/src/constructors/Menu/properties.json +17 -0
- package/src/constructors/Modal/properties.json +17 -0
- package/src/constructors/MotionAxis/properties.json +15 -0
- package/src/constructors/MotionAxis/style.scss +110 -0
- package/src/constructors/MotionTransform/properties.json +35 -0
- package/src/constructors/Page/properties.json +3 -0
- package/src/constructors/Progress/properties.json +47 -0
- package/src/constructors/Ripple/properties.json +9 -0
- package/src/constructors/Scrollbar/properties.json +33 -0
- package/src/constructors/Section/properties.json +3 -0
- package/src/constructors/Select/properties.json +3 -0
- package/src/constructors/SelectValue/properties.json +7 -0
- package/src/constructors/Skeleton/properties.json +24 -0
- package/src/constructors/Snackbar/properties.json +95 -0
- package/src/constructors/Snackbar/style.scss +58 -0
- package/src/constructors/SnackbarItem/properties.json +12 -0
- package/src/constructors/SnackbarItem/style.scss +30 -0
- package/src/constructors/TabItem/properties.json +49 -0
- package/src/constructors/TabItem/style.scss +64 -0
- package/src/constructors/Tabs/properties.json +3 -0
- package/src/constructors/Tabs/style.scss +5 -0
- package/src/constructors/TabsNavigation/properties.json +10 -0
- package/src/constructors/TabsNavigation/style.scss +5 -0
- package/src/constructors/Textarea/properties.json +2 -0
- package/src/constructors/Textarea/style.scss +5 -0
- package/src/constructors/TextareaAutosize/properties.json +9 -0
- package/src/constructors/TextareaAutosize/style.scss +9 -6
- package/src/constructors/Tooltip/properties.json +18 -0
- package/src/constructors/Window/properties.json +240 -0
- package/src/library/style.scss +13 -0
- package/dist/ActionsInclude-H5ZWeXJj.js +0 -64
- package/dist/AriaStaticInclude-CAURwJMb.js +0 -257
- package/dist/ArrowInclude-CcpT637l.js +0 -47
- package/dist/BarsInclude-BOEoY-O4.js +0 -74
- package/dist/BlockDesign-CwRNJi0I.js +0 -244
- package/dist/ButtonDesign-DgZNw44L.js +0 -198
- package/dist/CaptionInclude-NzS6EYYj.js +0 -70
- package/dist/DescriptionInclude-D4ane9aR.js +0 -55
- package/dist/EnabledInclude-Dk-rP4jp.js +0 -46
- package/dist/EventClickInclude-WHJqxZ1b.js +0 -103
- package/dist/FieldCounterInclude-D0oojGWY.js +0 -59
- package/dist/FieldEventInclude-DBRqmzpF.js +0 -718
- package/dist/FieldInclude-BKoBWZdj.js +0 -145
- package/dist/FieldInputCheckInclude-CjNYyGTb.js +0 -79
- package/dist/FieldLabelInclude-Bkxf6rRw.js +0 -71
- package/dist/FieldMatchInclude-GgyucDC_.js +0 -318
- package/dist/FieldMessageInclude-BJDnir34.js +0 -77
- package/dist/IconInclude-CLqwI29Q.js +0 -123
- package/dist/IconTrailingInclude-CdsOcDxv.js +0 -83
- package/dist/LabelHighlightInclude-CLmTvW_6.js +0 -75
- package/dist/LabelInclude-D-mLvjK5.js +0 -114
- package/dist/LabelNumberInclude-Cn0qDEgX.js +0 -46
- package/dist/ListGroupOpen-Bl_HIQoV.js +0 -43
- package/dist/MenuInclude-DfGCfr_I.js +0 -94
- package/dist/ModalDesignAbstract-D4A_a_rC.js +0 -179
- package/dist/ModelInclude-BiYm_iCQ.js +0 -73
- package/dist/ModelValueInclude-CJmm5go9.js +0 -48
- package/dist/MotionTransformClassesInclude-B23RIq0Q.js +0 -214
- package/dist/MotionTransformInclude-P_oRs3JZ.js +0 -97
- package/dist/Plugin-CBNCh_iN.js +0 -628
- package/dist/ProgressInclude-9MfZWtGP.js +0 -56
- package/dist/RippleInclude-Du5yIzX_.js +0 -21
- package/dist/SkeletonInclude-BIUzAO2s.js +0 -105
- package/dist/SuffixInclude-maZ7235l.js +0 -125
- package/dist/TabIndexInclude-xcSFV8yP.js +0 -177
- package/dist/TextInclude--GERRCGj.js +0 -146
- package/dist/TooltipInclude--QRSE83v.js +0 -76
- package/dist/TouchEventInclude-DctYCjt8.js +0 -186
- package/dist/WindowClassesInclude-B56usxgx.js +0 -213
- package/dist/WindowEsc-DTwn4Vsz.js +0 -72
- package/dist/WindowInclude-BWm4-0Gh.js +0 -121
- package/dist/getClassTagAStatic-BnVYlXHI.js +0 -4
package/dist/image.js
CHANGED
|
@@ -1,1348 +1,651 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { computed as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
1
|
+
import { t as e } from "./AriaStaticInclude-CS1hPGyK.js";
|
|
2
|
+
import { t } from "./defineProperty-hmGKPWdq.js";
|
|
3
|
+
import { t as n } from "./ImageInclude-CP-Q4R20.js";
|
|
4
|
+
import { computed as r, h as i, onUnmounted as a, ref as o, toRefs as s, watch as c, watchEffect as l } from "vue";
|
|
5
|
+
import { DesignConstructorAbstract as u, EventItem as d, Icons as f, forEach as p, getElementId as m, isArray as h, isDomRuntime as g, isFilled as _, isNumber as v, isString as y, resizeImageByMax as b, toNumber as x, useLazyItemByMarginRef as S } from "@dxtmisha/functional";
|
|
6
|
+
//#region src/constructors/Image/ImageFile.ts
|
|
7
|
+
var C = 1280, w = class {
|
|
8
|
+
static isImage(e) {
|
|
9
|
+
return !!e.type.match(/^image\//);
|
|
10
|
+
}
|
|
11
|
+
static createImage(e) {
|
|
12
|
+
return new Promise((t) => {
|
|
13
|
+
if (e) {
|
|
14
|
+
let n = new Image();
|
|
15
|
+
n.onerror = () => t(void 0), n.onload = () => {
|
|
16
|
+
t({
|
|
17
|
+
image: n,
|
|
18
|
+
src: this.getSRC(n, e),
|
|
19
|
+
width: n.naturalWidth,
|
|
20
|
+
height: n.naturalHeight
|
|
21
|
+
});
|
|
22
|
+
}, (async () => {
|
|
23
|
+
n.src = e instanceof File ? await this.getFileResult(e) : e;
|
|
24
|
+
})();
|
|
25
|
+
} else t(void 0);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
static async getPath(e) {
|
|
29
|
+
return this.createImage(e).then((e) => {
|
|
30
|
+
var t;
|
|
31
|
+
return (t = e == null ? void 0 : e.src) == null ? "" : t;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
static getFileResult(e) {
|
|
35
|
+
return new Promise((t) => {
|
|
36
|
+
this.isImage(e) ? this.getFileReader(e).then((e) => t(e)) : t("");
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
static getFileReader(e) {
|
|
40
|
+
return new Promise((t) => {
|
|
41
|
+
let n = new FileReader();
|
|
42
|
+
n.onload = () => t(typeof n.result == "string" ? n.result : ""), n.readAsDataURL(e);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
static getSRC(e, t, n = C) {
|
|
46
|
+
if (g() && (t instanceof File || t === void 0) && (e.naturalHeight > n || e.naturalWidth > n)) {
|
|
47
|
+
var r;
|
|
48
|
+
return (r = b(e, n)) == null ? "" : r;
|
|
49
|
+
} else return e.src;
|
|
50
|
+
}
|
|
51
|
+
}, T = "#toolbar=0&scrollbar=1", E = class {
|
|
52
|
+
static isPdf(e) {
|
|
53
|
+
return y(e) ? !!e.match(/\.pdf$/i) : g() && !!e.type.match(/\/pdf$/i);
|
|
54
|
+
}
|
|
55
|
+
static async get(e) {
|
|
56
|
+
return y(e) ? `${e}${T}` : this.isPdf(e) ? `${await w.getFileReader(e)}${T}` : "";
|
|
57
|
+
}
|
|
58
|
+
}, D = [], O = class {
|
|
59
|
+
static is(e) {
|
|
60
|
+
return e instanceof Uint8Array || e instanceof ArrayBuffer;
|
|
61
|
+
}
|
|
62
|
+
static createImage(e, t = "image/jpeg") {
|
|
63
|
+
let n = this.getCacheItem(e, t), r = new Image();
|
|
64
|
+
if (n) r.src = n.src;
|
|
65
|
+
else {
|
|
66
|
+
let n = new Blob([this.toUint8Array(e)], { type: t }), i = URL.createObjectURL(n);
|
|
67
|
+
r.src = i, this.addCacheItem(e, t, i);
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
image: r,
|
|
71
|
+
src: r.src,
|
|
72
|
+
width: r.naturalWidth,
|
|
73
|
+
height: r.naturalHeight
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
static toUint8Array(e) {
|
|
77
|
+
return e instanceof ArrayBuffer ? new Uint8Array(e) : e;
|
|
78
|
+
}
|
|
79
|
+
static getCacheItem(e, t) {
|
|
80
|
+
return D.find((n) => n.item === e && n.type === t);
|
|
81
|
+
}
|
|
82
|
+
static addCacheItem(e, t, n) {
|
|
83
|
+
D.push({
|
|
84
|
+
item: e,
|
|
85
|
+
type: t,
|
|
86
|
+
src: n
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}, k = /* @__PURE__ */ function(e) {
|
|
90
|
+
return e.pdf = "pdf", e.file = "file", e.array = "array", e.image = "image", e.flag = "flag", e.flagCompressed = "flag-compressed", e.color = "color", e.public = "public", e.filled = "filled", e.outlined = "outlined", e.round = "round", e.sharp = "sharp", e.twoTone = "two-tone", e.material = "material", e.icon = "icon", e;
|
|
91
|
+
}({}), A = class {
|
|
92
|
+
constructor(e) {
|
|
93
|
+
t(this, "item", r(() => {
|
|
94
|
+
let e = this.props.value;
|
|
95
|
+
if (e instanceof File) return k.file;
|
|
96
|
+
if (O.is(e)) return k.array;
|
|
97
|
+
if (y(e) && _(e)) {
|
|
98
|
+
if (E.isPdf(e)) return k.pdf;
|
|
99
|
+
if (e.match(/\//)) return k.image;
|
|
100
|
+
if (e.match(/^#/)) return k.color;
|
|
101
|
+
if (e.match(/^@/)) return k.public;
|
|
102
|
+
if (e.match(/^\$/)) return k.material;
|
|
103
|
+
if (e.match(/^flag-[a-z]{2}$/)) return k.flag;
|
|
104
|
+
if (e.match(/^f-[a-z]{2}$/)) return k.flagCompressed;
|
|
105
|
+
let t = e.match(/^(outlined|round|sharp|material)-/);
|
|
106
|
+
return t ? t[1] : f.is(e) ? k.public : k.outlined;
|
|
107
|
+
}
|
|
108
|
+
})), this.props = e;
|
|
109
|
+
}
|
|
110
|
+
}, j = {
|
|
111
|
+
adaptiveGroup: "basic",
|
|
112
|
+
preloadOffset: "1024px"
|
|
113
|
+
}, M = class {
|
|
114
|
+
constructor(e, n) {
|
|
115
|
+
t(this, "image", o()), this.props = e, this.type = n, l(async () => {
|
|
116
|
+
this.image.value = await this.init();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
is() {
|
|
120
|
+
return this.image.value !== void 0;
|
|
121
|
+
}
|
|
122
|
+
isLink() {
|
|
123
|
+
return this.is() && typeof this.image.value == "string";
|
|
124
|
+
}
|
|
125
|
+
isImage() {
|
|
126
|
+
return this.is() && typeof this.image.value != "string";
|
|
127
|
+
}
|
|
128
|
+
async init() {
|
|
129
|
+
let e = this.props.value;
|
|
130
|
+
if (e) switch (this.type.item.value) {
|
|
131
|
+
case k.pdf: return await E.get(e);
|
|
132
|
+
case k.array: return await O.createImage(e);
|
|
133
|
+
case k.image:
|
|
134
|
+
case k.file:
|
|
135
|
+
try {
|
|
136
|
+
return this.props.lazy ? this.props.value : await w.createImage(e);
|
|
137
|
+
} catch (t) {
|
|
138
|
+
console.error("ImageData.initImage: ", e);
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
case k.public:
|
|
142
|
+
case k.icon:
|
|
143
|
+
case k.flag:
|
|
144
|
+
if (y(e)) return await f.get(e, this.props.url);
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}, N = class {
|
|
149
|
+
constructor(e) {
|
|
150
|
+
t(this, "coordinator", r(() => {
|
|
151
|
+
if (this.is()) {
|
|
152
|
+
let f = this.props.coordinator;
|
|
153
|
+
switch (f.length) {
|
|
154
|
+
case 1:
|
|
155
|
+
var e, t, n, r;
|
|
156
|
+
return [
|
|
157
|
+
(e = f[0]) == null ? 0 : e,
|
|
158
|
+
(t = f[0]) == null ? 0 : t,
|
|
159
|
+
(n = f[0]) == null ? 0 : n,
|
|
160
|
+
(r = f[0]) == null ? 0 : r
|
|
161
|
+
];
|
|
162
|
+
case 2:
|
|
163
|
+
var i, a, o, s;
|
|
164
|
+
return [
|
|
165
|
+
(i = f[0]) == null ? 0 : i,
|
|
166
|
+
(a = f[1]) == null ? 0 : a,
|
|
167
|
+
(o = f[0]) == null ? 0 : o,
|
|
168
|
+
(s = f[1]) == null ? 0 : s
|
|
169
|
+
];
|
|
170
|
+
case 3:
|
|
171
|
+
var c, l, u, d;
|
|
172
|
+
return [
|
|
173
|
+
(c = f[0]) == null ? 0 : c,
|
|
174
|
+
(l = f[1]) == null ? 0 : l,
|
|
175
|
+
(u = f[2]) == null ? 0 : u,
|
|
176
|
+
(d = f[1]) == null ? 0 : d
|
|
177
|
+
];
|
|
178
|
+
case 4: return f;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return [
|
|
182
|
+
0,
|
|
183
|
+
0,
|
|
184
|
+
0,
|
|
185
|
+
0
|
|
186
|
+
];
|
|
187
|
+
})), t(this, "size", r(() => {
|
|
188
|
+
let e = this.coordinator.value;
|
|
189
|
+
return {
|
|
190
|
+
width: 100 - e[1] - e[3],
|
|
191
|
+
height: 100 - e[2] - e[0]
|
|
192
|
+
};
|
|
193
|
+
})), this.props = e;
|
|
194
|
+
}
|
|
195
|
+
is() {
|
|
196
|
+
let e = this.props.coordinator;
|
|
197
|
+
return h(e) && e.length > 0 && e.length < 5;
|
|
198
|
+
}
|
|
199
|
+
getSize() {
|
|
200
|
+
let e = this.size.value, t = e.width === 0 ? 100 : e.width, n = e.height === 0 ? 100 : e.height;
|
|
201
|
+
return {
|
|
202
|
+
width: `${100 / t * 100}%`,
|
|
203
|
+
height: `${100 / n * 100}%`
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
}, P = class {
|
|
207
|
+
constructor(e, n) {
|
|
208
|
+
t(this, "x", r(() => {
|
|
209
|
+
var e;
|
|
210
|
+
return this.coordinator.is() ? `${this.coordinator.coordinator.value[3] + this.coordinator.size.value.width / 2}%` : ((e = this.props.x) == null ? void 0 : e.toString()) || "center";
|
|
211
|
+
})), t(this, "y", r(() => {
|
|
212
|
+
var e;
|
|
213
|
+
return this.coordinator.is() ? `${this.coordinator.coordinator.value[0] + this.coordinator.size.value.height / 2}%` : ((e = this.props.y) == null ? void 0 : e.toString()) || "center";
|
|
214
|
+
})), this.props = e, this.coordinator = n;
|
|
215
|
+
}
|
|
216
|
+
}, F = class {
|
|
217
|
+
constructor(e) {
|
|
218
|
+
t(this, "factorMax", 1), t(this, "size", {
|
|
219
|
+
width: 0,
|
|
220
|
+
height: 0
|
|
221
|
+
}), t(this, "offset", {
|
|
222
|
+
width: 7680,
|
|
223
|
+
height: 7680
|
|
224
|
+
}), this.name = e;
|
|
225
|
+
}
|
|
226
|
+
is(e) {
|
|
227
|
+
return this.name === e;
|
|
228
|
+
}
|
|
229
|
+
isSize() {
|
|
230
|
+
return !!(this.size.width || this.size.width);
|
|
231
|
+
}
|
|
232
|
+
getWidth() {
|
|
233
|
+
return this.size.width;
|
|
234
|
+
}
|
|
235
|
+
getHeight() {
|
|
236
|
+
return this.size.height;
|
|
237
|
+
}
|
|
238
|
+
getOffsetWidth() {
|
|
239
|
+
return this.offset.width;
|
|
240
|
+
}
|
|
241
|
+
getOffsetHeight() {
|
|
242
|
+
return this.offset.height;
|
|
243
|
+
}
|
|
244
|
+
getFactorMax() {
|
|
245
|
+
return this.factorMax;
|
|
246
|
+
}
|
|
247
|
+
makeWidth(e) {
|
|
248
|
+
return e > this.size.width && (this.size.width = e), this;
|
|
249
|
+
}
|
|
250
|
+
makeHeight(e) {
|
|
251
|
+
return e > this.size.height && (this.size.height = e), this;
|
|
252
|
+
}
|
|
253
|
+
makeOffsetWidth(e) {
|
|
254
|
+
return e < this.offset.width && (this.offset.width = e), this;
|
|
255
|
+
}
|
|
256
|
+
makeOffsetHeight(e) {
|
|
257
|
+
return e < this.offset.height && (this.offset.height = e), this;
|
|
258
|
+
}
|
|
259
|
+
makeFactorMax(e) {
|
|
260
|
+
return e < this.factorMax && (this.factorMax = e), this;
|
|
261
|
+
}
|
|
262
|
+
reset() {
|
|
263
|
+
return this.factorMax = 1, this.size = {
|
|
264
|
+
width: 0,
|
|
265
|
+
height: 0
|
|
266
|
+
}, this.offset = {
|
|
267
|
+
width: 7680,
|
|
268
|
+
height: 7680
|
|
269
|
+
}, this;
|
|
270
|
+
}
|
|
271
|
+
}, I = class {
|
|
272
|
+
static isSize() {
|
|
273
|
+
return this.items.find((e) => e.isSize()) !== void 0;
|
|
274
|
+
}
|
|
275
|
+
static get(e) {
|
|
276
|
+
return this.find(e) || this.init(e);
|
|
277
|
+
}
|
|
278
|
+
static reset() {
|
|
279
|
+
this.items.forEach((e) => e.reset());
|
|
280
|
+
}
|
|
281
|
+
static find(e) {
|
|
282
|
+
return this.items.find((t) => t.is(e));
|
|
283
|
+
}
|
|
284
|
+
static init(e) {
|
|
285
|
+
let t = new F(e);
|
|
286
|
+
return this.items.push(t), t;
|
|
287
|
+
}
|
|
150
288
|
};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
class G {
|
|
221
|
-
/**
|
|
222
|
-
* Constructor
|
|
223
|
-
* @param props input data/ входные данные
|
|
224
|
-
*/
|
|
225
|
-
constructor(t) {
|
|
226
|
-
/**
|
|
227
|
-
* Returns coordinates.
|
|
228
|
-
*
|
|
229
|
-
* Возвращает координаты.
|
|
230
|
-
*/
|
|
231
|
-
i(this, "coordinator", n(() => {
|
|
232
|
-
var t, e, s, h, c, m, p, d, v, y, b, w;
|
|
233
|
-
if (this.is()) {
|
|
234
|
-
const o = this.props.coordinator;
|
|
235
|
-
switch (o.length) {
|
|
236
|
-
case 1:
|
|
237
|
-
return [
|
|
238
|
-
(t = o[0]) != null ? t : 0,
|
|
239
|
-
(e = o[0]) != null ? e : 0,
|
|
240
|
-
(s = o[0]) != null ? s : 0,
|
|
241
|
-
(h = o[0]) != null ? h : 0
|
|
242
|
-
];
|
|
243
|
-
case 2:
|
|
244
|
-
return [
|
|
245
|
-
(c = o[0]) != null ? c : 0,
|
|
246
|
-
(m = o[1]) != null ? m : 0,
|
|
247
|
-
(p = o[0]) != null ? p : 0,
|
|
248
|
-
(d = o[1]) != null ? d : 0
|
|
249
|
-
];
|
|
250
|
-
case 3:
|
|
251
|
-
return [
|
|
252
|
-
(v = o[0]) != null ? v : 0,
|
|
253
|
-
(y = o[1]) != null ? y : 0,
|
|
254
|
-
(b = o[2]) != null ? b : 0,
|
|
255
|
-
(w = o[1]) != null ? w : 0
|
|
256
|
-
];
|
|
257
|
-
case 4:
|
|
258
|
-
return o;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
return [0, 0, 0, 0];
|
|
262
|
-
}));
|
|
263
|
-
/**
|
|
264
|
-
* Returns the sizes for the background-position property by coordinates.
|
|
265
|
-
*
|
|
266
|
-
* Возвращает размеры для свойства background-position по координатам.
|
|
267
|
-
*/
|
|
268
|
-
i(this, "size", n(() => {
|
|
269
|
-
const t = this.coordinator.value;
|
|
270
|
-
return {
|
|
271
|
-
width: 100 - t[1] - t[3],
|
|
272
|
-
height: 100 - t[2] - t[0]
|
|
273
|
-
};
|
|
274
|
-
}));
|
|
275
|
-
this.props = t;
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Checks if there are coordinates for calculation.
|
|
279
|
-
*
|
|
280
|
-
* Проверяет, есть ли координаты для вычисления.
|
|
281
|
-
*/
|
|
282
|
-
is() {
|
|
283
|
-
const t = this.props.coordinator;
|
|
284
|
-
return M(t) && t.length > 0 && t.length < 5;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Returns the values for the background property.
|
|
288
|
-
*
|
|
289
|
-
* Возвращает значения для свойства background.
|
|
290
|
-
*/
|
|
291
|
-
getSize() {
|
|
292
|
-
const t = this.size.value, e = t.width === 0 ? 100 : t.width, s = t.height === 0 ? 100 : t.height;
|
|
293
|
-
return {
|
|
294
|
-
width: `${100 / e * 100}%`,
|
|
295
|
-
height: `${100 / s * 100}%`
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
class Z {
|
|
300
|
-
/**
|
|
301
|
-
* Constructor
|
|
302
|
-
* @param props input data/ входные данные
|
|
303
|
-
* @param coordinator coordinates for margins/ координаты для отступов
|
|
304
|
-
*/
|
|
305
|
-
constructor(t, e) {
|
|
306
|
-
/**
|
|
307
|
-
* Returns the position on the left.
|
|
308
|
-
*
|
|
309
|
-
* Возвращает позицию слева.
|
|
310
|
-
*/
|
|
311
|
-
i(this, "x", n(() => {
|
|
312
|
-
var t;
|
|
313
|
-
return this.coordinator.is() ? `${this.coordinator.coordinator.value[3] + this.coordinator.size.value.width / 2}%` : ((t = this.props.x) == null ? void 0 : t.toString()) || "center";
|
|
314
|
-
}));
|
|
315
|
-
/**
|
|
316
|
-
* Returns the position on the top.
|
|
317
|
-
*
|
|
318
|
-
* Возвращает позицию сверху.
|
|
319
|
-
*/
|
|
320
|
-
i(this, "y", n(() => {
|
|
321
|
-
var t;
|
|
322
|
-
return this.coordinator.is() ? `${this.coordinator.coordinator.value[0] + this.coordinator.size.value.height / 2}%` : ((t = this.props.y) == null ? void 0 : t.toString()) || "center";
|
|
323
|
-
}));
|
|
324
|
-
this.props = t, this.coordinator = e;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
class J {
|
|
328
|
-
/**
|
|
329
|
-
* Constructor
|
|
330
|
-
* @param name group name/ название группы
|
|
331
|
-
*/
|
|
332
|
-
constructor(t) {
|
|
333
|
-
i(this, "factorMax", 1);
|
|
334
|
-
i(this, "size", {
|
|
335
|
-
width: 0,
|
|
336
|
-
height: 0
|
|
337
|
-
});
|
|
338
|
-
i(this, "offset", {
|
|
339
|
-
width: 7680,
|
|
340
|
-
height: 7680
|
|
341
|
-
});
|
|
342
|
-
this.name = t;
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* Checks whether the element belongs to the current group.
|
|
346
|
-
*
|
|
347
|
-
* Проверяет, принадлежит ли элемент к текущей группе.
|
|
348
|
-
* @param name name of the checked group/ название проверяемой группы
|
|
349
|
-
*/
|
|
350
|
-
is(t) {
|
|
351
|
-
return this.name === t;
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Checks if the group has elements with sizes. It is used to check if there is data for work.
|
|
355
|
-
*
|
|
356
|
-
* Проверяет, есть ли у группы элементы с размерами. Используется для проверки, есть ли данные для работы.
|
|
357
|
-
*/
|
|
358
|
-
isSize() {
|
|
359
|
-
return !!(this.size.width || this.size.width);
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Returns the maximum physical width.
|
|
363
|
-
*
|
|
364
|
-
* Возвращает максимальную физическую ширину.
|
|
365
|
-
*/
|
|
366
|
-
getWidth() {
|
|
367
|
-
return this.size.width;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Returns the maximum physical height.
|
|
371
|
-
*
|
|
372
|
-
* Возвращает максимальную физическую высоту.
|
|
373
|
-
*/
|
|
374
|
-
getHeight() {
|
|
375
|
-
return this.size.height;
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Returns the actual width.
|
|
379
|
-
*
|
|
380
|
-
* Возвращает фактическую ширину.
|
|
381
|
-
*/
|
|
382
|
-
getOffsetWidth() {
|
|
383
|
-
return this.offset.width;
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* Returns the actual height.
|
|
387
|
-
*
|
|
388
|
-
* Возвращает фактическую высоту.
|
|
389
|
-
*/
|
|
390
|
-
getOffsetHeight() {
|
|
391
|
-
return this.offset.height;
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* Returns the maximum multiplier for scaling.
|
|
395
|
-
*
|
|
396
|
-
* Возвращает максимальный множитель для масштабирования.
|
|
397
|
-
*/
|
|
398
|
-
getFactorMax() {
|
|
399
|
-
return this.factorMax;
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
* Updating size.width, if it is less than the selected value.
|
|
403
|
-
*
|
|
404
|
-
* Обновление size.width, если она меньше выбранного значения.
|
|
405
|
-
* @param width value of the selected width/ значение выбранной ширины
|
|
406
|
-
*/
|
|
407
|
-
makeWidth(t) {
|
|
408
|
-
return t > this.size.width && (this.size.width = t), this;
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* Updating size.height, if it is less than the selected value.
|
|
412
|
-
*
|
|
413
|
-
* Обновление size.height, если она меньше выбранного значения.
|
|
414
|
-
* @param height value of the selected height/ значение выбранной высоты
|
|
415
|
-
*/
|
|
416
|
-
makeHeight(t) {
|
|
417
|
-
return t > this.size.height && (this.size.height = t), this;
|
|
418
|
-
}
|
|
419
|
-
/**
|
|
420
|
-
* Updating offset.width, if it is larger than the selected value.
|
|
421
|
-
*
|
|
422
|
-
* Обновление offset.width, если она больше выбранного значения.
|
|
423
|
-
* @param width value of the selected width/ значение выбранной ширины
|
|
424
|
-
*/
|
|
425
|
-
makeOffsetWidth(t) {
|
|
426
|
-
return t < this.offset.width && (this.offset.width = t), this;
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* Updating offset.height, if it is larger than the selected value.
|
|
430
|
-
*
|
|
431
|
-
* Обновление offset.height, если она больше выбранного значения.
|
|
432
|
-
* @param height value of the selected height/ значение выбранной высоты
|
|
433
|
-
*/
|
|
434
|
-
makeOffsetHeight(t) {
|
|
435
|
-
return t < this.offset.height && (this.offset.height = t), this;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* Changes the multiplier value if it is greater than the checked value.
|
|
439
|
-
*
|
|
440
|
-
* Изменяет значение множителя, если оно больше проверяемого значения.
|
|
441
|
-
* @param value values for verification/ значения для проверки
|
|
442
|
-
*/
|
|
443
|
-
makeFactorMax(t) {
|
|
444
|
-
return t < this.factorMax && (this.factorMax = t), this;
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* Restoring the value to its original state.
|
|
448
|
-
*
|
|
449
|
-
* Восстановление значения в изначальное состояние.
|
|
450
|
-
*/
|
|
451
|
-
reset() {
|
|
452
|
-
return this.factorMax = 1, this.size = {
|
|
453
|
-
width: 0,
|
|
454
|
-
height: 0
|
|
455
|
-
}, this.offset = {
|
|
456
|
-
width: 7680,
|
|
457
|
-
height: 7680
|
|
458
|
-
}, this;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
class u {
|
|
462
|
-
/**
|
|
463
|
-
* Checks if the group has elements with sizes. It is used to check if there is data for work.
|
|
464
|
-
*
|
|
465
|
-
* Проверяет, есть ли у группы элементы с размерами. Используется для проверки, есть ли данные для работы.
|
|
466
|
-
*/
|
|
467
|
-
static isSize() {
|
|
468
|
-
return this.items.find((t) => t.isSize()) !== void 0;
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* Returns an object with data for calculation by the name of its group.
|
|
472
|
-
*
|
|
473
|
-
* Возвращает объект с данными для вычисления по названию его группы.
|
|
474
|
-
* @param name group name/ название группы
|
|
475
|
-
*/
|
|
476
|
-
static get(t) {
|
|
477
|
-
return this.find(t) || this.init(t);
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* Resets all parameters for all groups.
|
|
481
|
-
*
|
|
482
|
-
* Сбрасывает все параметры для всех групп.
|
|
483
|
-
*/
|
|
484
|
-
static reset() {
|
|
485
|
-
this.items.forEach((t) => t.reset());
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* Search for the ImageCalculation object by the name of the group.
|
|
489
|
-
*
|
|
490
|
-
* Поиск объекта ImageCalculation по названию группы.
|
|
491
|
-
* @param name group name/ название группы
|
|
492
|
-
*/
|
|
493
|
-
static find(t) {
|
|
494
|
-
return this.items.find((e) => e.is(t));
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Creating a new ImageCalculation object by the name of the group.
|
|
498
|
-
*
|
|
499
|
-
* Создание нового объекта ImageCalculation по названию группы.
|
|
500
|
-
* @param name group name/ название группы
|
|
501
|
-
*/
|
|
502
|
-
static init(t) {
|
|
503
|
-
const e = new J(t);
|
|
504
|
-
return this.items.push(e), e;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
i(u, "items", []);
|
|
508
|
-
class l {
|
|
509
|
-
/**
|
|
510
|
-
* Checks if an element is present in the list.
|
|
511
|
-
*
|
|
512
|
-
* Проверяет, присутствует ли элемент в списке.
|
|
513
|
-
* @param item object for working with images/ объект для работы с изображениями
|
|
514
|
-
*/
|
|
515
|
-
static is(t) {
|
|
516
|
-
return this.objects.findIndex((e) => e === t) !== -1;
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Adding a new element for tracking.
|
|
520
|
-
*
|
|
521
|
-
* Добавление нового элемента для отслеживания.
|
|
522
|
-
* @param item object for working with images/ объект для работы с изображениями
|
|
523
|
-
*/
|
|
524
|
-
static add(t) {
|
|
525
|
-
this.is(t) || (this.objects.push(t), this.make());
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* Removal of the element.
|
|
529
|
-
*
|
|
530
|
-
* Удаления элемента.
|
|
531
|
-
* @param item object for working with images/ объект для работы с изображениями
|
|
532
|
-
*/
|
|
533
|
-
static remove(t) {
|
|
534
|
-
const e = this.objects.findIndex((s) => s === t);
|
|
535
|
-
e !== -1 && (this.objects.splice(e, 1), this.cache = []), this.make();
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* Resets all cached data and rereads scaling for all elements.
|
|
539
|
-
*
|
|
540
|
-
* Обнуляет все кэшированные данные и перечитывает масштабирование для всех элементов.
|
|
541
|
-
*/
|
|
542
|
-
static reset() {
|
|
543
|
-
this.cache = [], this.start();
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Starts the calculation process or turns it off if there are no active elements in the list.
|
|
547
|
-
*
|
|
548
|
-
* Запускает процесс вычисления или отключает его, если в списке нет активных элементов.
|
|
549
|
-
*/
|
|
550
|
-
static make() {
|
|
551
|
-
this.event && this.objects.length < 1 ? (this.event.stop(), this.event = void 0) : this.objects.length > 0 && (this.event || (this.event = new L(window, ["scroll-sync"], () => this.start()).start()), this.time || (this.time = !0, requestAnimationFrame(() => {
|
|
552
|
-
this.time = !1, this.start();
|
|
553
|
-
})));
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Returns a list of elements that are visible or constantly being calculated.
|
|
557
|
-
*
|
|
558
|
-
* Возвращает список элементов, которые видны или постоянно вычисляются.
|
|
559
|
-
*/
|
|
560
|
-
static getItemIdByVisible() {
|
|
561
|
-
return P(this.objectsAdaptive, (t) => t.getId());
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* Method for starting the calculation of scaling elements in the list.
|
|
565
|
-
*
|
|
566
|
-
* Метод для запуска вычисления масштабирования элементов в списке.
|
|
567
|
-
*/
|
|
568
|
-
static start() {
|
|
569
|
-
var t;
|
|
570
|
-
if (this.isAdaptive()) {
|
|
571
|
-
this.makeAdaptive();
|
|
572
|
-
const e = this.getItemIdByVisible();
|
|
573
|
-
this.isCache(e) && (this.cache = e, this.makeSize(), this.makePercent(), this.makeFactorMax());
|
|
574
|
-
} else
|
|
575
|
-
(t = this.event) == null || t.stop();
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Updates the list of elements available for calculation. These are the
|
|
579
|
-
* elements that are close to the border of the visible area.
|
|
580
|
-
*
|
|
581
|
-
* Обновляет список доступных для вычисления элементов. Это те элементы,
|
|
582
|
-
* которые близки к границе видимой области.
|
|
583
|
-
*/
|
|
584
|
-
static makeAdaptive() {
|
|
585
|
-
this.objectsAdaptive = [], this.objects.forEach((t) => {
|
|
586
|
-
t.make(), t.isBeyond() && this.objectsAdaptive.push(t);
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* Calculates the dimensions of an element relative to the image size,
|
|
591
|
-
* the size of the element, and its physical location on the image.
|
|
592
|
-
*
|
|
593
|
-
* Вычисляет размеры элемента относительно размера изображения,
|
|
594
|
-
* размера элемента и его физического расположения на изображении.
|
|
595
|
-
*/
|
|
596
|
-
static makeSize() {
|
|
597
|
-
u.reset(), this.objectsAdaptive.forEach((t) => {
|
|
598
|
-
const e = t.element.value;
|
|
599
|
-
e && u.get(t.group.value).makeWidth(t.width.value).makeHeight(t.height.value).makeOffsetWidth(e.offsetWidth).makeOffsetHeight(e.offsetHeight);
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
/**
|
|
603
|
-
* Calculation of the basic scaling of an element without taking into account other elements.
|
|
604
|
-
*
|
|
605
|
-
* Вычисление базового масштабирования элемента без учета других элементов.
|
|
606
|
-
*/
|
|
607
|
-
static makePercent() {
|
|
608
|
-
u.isSize() && this.objectsAdaptive.forEach((t) => {
|
|
609
|
-
const e = t.element.value, s = u.get(t.group.value);
|
|
610
|
-
if (e) {
|
|
611
|
-
const h = s.getWidth(), c = s.getHeight();
|
|
612
|
-
t.setPercent(
|
|
613
|
-
t.width.value * (h ? 1 / h : 0) * (s.getOffsetWidth() / e.offsetWidth),
|
|
614
|
-
t.height.value * (c ? 1 / c : 0) * (s.getOffsetHeight() / e.offsetHeight)
|
|
615
|
-
);
|
|
616
|
-
}
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
/**
|
|
620
|
-
* Calculation of the largest element to determine the base size.
|
|
621
|
-
* This parameter is used for scaling other elements,
|
|
622
|
-
* reducing them to the necessary proportion.
|
|
623
|
-
*
|
|
624
|
-
* Вычисление самого большого элемента для определения базового размера.
|
|
625
|
-
* Этот параметр используется для масштабирования других элементов,
|
|
626
|
-
* уменьшая их до нужной пропорции.
|
|
627
|
-
*/
|
|
628
|
-
static makeFactorMax() {
|
|
629
|
-
u.isSize() && this.objectsAdaptive.forEach((t) => {
|
|
630
|
-
u.get(t.group.value).makeFactorMax(t.factor.value);
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* Checks if there is an active element at the moment.
|
|
635
|
-
*
|
|
636
|
-
* Проверяет, есть ли в текущий момент активный элемент.
|
|
637
|
-
*/
|
|
638
|
-
static isAdaptive() {
|
|
639
|
-
return !!this.objects.find((t) => t.is());
|
|
640
|
-
}
|
|
641
|
-
/**
|
|
642
|
-
* Checks whether the composition of visible elements has changed.
|
|
643
|
-
*
|
|
644
|
-
* Проверяет, изменился ли состав видимых элементов.
|
|
645
|
-
* @param visible list of indices of visible elements/ список индексов видимых элементов
|
|
646
|
-
*/
|
|
647
|
-
static isCache(t) {
|
|
648
|
-
return this.cache.join("|") !== t.join("|");
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
i(l, "objects", []), i(l, "objectsAdaptive", []), i(l, "cache", []), i(l, "event"), i(l, "time");
|
|
652
|
-
const Q = "main", $ = 512;
|
|
653
|
-
class T {
|
|
654
|
-
/**
|
|
655
|
-
* Constructor
|
|
656
|
-
* @param props input data/ входные данные
|
|
657
|
-
* @param element image element for scaling/ элемент изображения для масштабирования
|
|
658
|
-
* @param data image data/ данные изображения
|
|
659
|
-
*/
|
|
660
|
-
constructor(t, e, s) {
|
|
661
|
-
i(this, "percent", I({
|
|
662
|
-
width: 0,
|
|
663
|
-
height: 0
|
|
664
|
-
}));
|
|
665
|
-
i(this, "beyond", !1);
|
|
666
|
-
i(this, "visible", !1);
|
|
667
|
-
/**
|
|
668
|
-
* Is the element active for size alignment.
|
|
669
|
-
*
|
|
670
|
-
* Активен ли элемент для выравнивания размера.
|
|
671
|
-
*/
|
|
672
|
-
i(this, "active", n(
|
|
673
|
-
() => !!(this.props.adaptive && (this.width.value || this.height.value)) && this.data.isImage()
|
|
674
|
-
));
|
|
675
|
-
/**
|
|
676
|
-
* Returns the name of the group.
|
|
677
|
-
*
|
|
678
|
-
* Возвращает название группы.
|
|
679
|
-
*/
|
|
680
|
-
i(this, "group", n(() => {
|
|
681
|
-
var t;
|
|
682
|
-
return (t = this.props.adaptiveGroup) != null ? t : Q;
|
|
683
|
-
}));
|
|
684
|
-
/**
|
|
685
|
-
* Returns the physical width of the object.
|
|
686
|
-
*
|
|
687
|
-
* Возвращает физическую ширину объекта.
|
|
688
|
-
*/
|
|
689
|
-
i(this, "width", n(() => {
|
|
690
|
-
var t;
|
|
691
|
-
return S((t = this.props.objectWidth) != null ? t : 0);
|
|
692
|
-
}));
|
|
693
|
-
/**
|
|
694
|
-
* Returns the physical height of the object.
|
|
695
|
-
*
|
|
696
|
-
* Возвращает физическую высоту объекта.
|
|
697
|
-
*/
|
|
698
|
-
i(this, "height", n(() => {
|
|
699
|
-
var t, e;
|
|
700
|
-
return S((e = (t = this.props) == null ? void 0 : t.objectHeight) != null ? e : 0);
|
|
701
|
-
}));
|
|
702
|
-
/**
|
|
703
|
-
* Returns the axis for scaling.
|
|
704
|
-
*
|
|
705
|
-
* Возвращает ось для масштабирования.
|
|
706
|
-
*/
|
|
707
|
-
i(this, "type", n(() => {
|
|
708
|
-
if (this.width.value && this.percent.value.width > 0)
|
|
709
|
-
return "x";
|
|
710
|
-
if (this.height.value && this.percent.value.height > 0)
|
|
711
|
-
return "y";
|
|
712
|
-
}));
|
|
713
|
-
/**
|
|
714
|
-
* Calculation of the base size of the image to determine how to scale the image.
|
|
715
|
-
*
|
|
716
|
-
* Вычисление базового размера изображения, чтобы определить, как надо масштабировать изображение.
|
|
717
|
-
*/
|
|
718
|
-
i(this, "size", n(() => {
|
|
719
|
-
if (this.element.value && this.data.isImage()) {
|
|
720
|
-
const t = this.data.image.value;
|
|
721
|
-
switch (this.type.value) {
|
|
722
|
-
case "x":
|
|
723
|
-
return t.height * (this.element.value.offsetWidth * this.percent.value.width / t.width);
|
|
724
|
-
case "y":
|
|
725
|
-
return t.width * (this.element.value.offsetHeight * this.percent.value.height / t.height);
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
return 0;
|
|
729
|
-
}));
|
|
730
|
-
/**
|
|
731
|
-
* Multiplier for determining the level of image scaling relative to other elements.
|
|
732
|
-
*
|
|
733
|
-
* Множитель для определения уровня масштабирования изображения относительно других элементов.
|
|
734
|
-
*/
|
|
735
|
-
i(this, "factor", n(() => {
|
|
736
|
-
const t = this.element.value;
|
|
737
|
-
if (t) {
|
|
738
|
-
const e = this.size.value;
|
|
739
|
-
if (this.type.value === "x" && e > t.offsetHeight)
|
|
740
|
-
return t.offsetHeight / e;
|
|
741
|
-
if (this.type.value === "y" && e > t.offsetWidth)
|
|
742
|
-
return t.offsetWidth / e;
|
|
743
|
-
}
|
|
744
|
-
return 1;
|
|
745
|
-
}));
|
|
746
|
-
this.props = t, this.data = e, this.element = s, B(() => {
|
|
747
|
-
this.is() ? l.add(this) : l.remove(this);
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
/**
|
|
751
|
-
* Checks if the element’s conditions are suitable for scaling.
|
|
752
|
-
*
|
|
753
|
-
* Проверяет, подходить ли у элемента условия для масштабирования.
|
|
754
|
-
*/
|
|
755
|
-
is() {
|
|
756
|
-
var t;
|
|
757
|
-
return this.active.value && !!((t = this.element.value) != null && t.closest("body"));
|
|
758
|
-
}
|
|
759
|
-
/**
|
|
760
|
-
* Checks for compliance with the group.
|
|
761
|
-
*
|
|
762
|
-
* Проверяет на соответствие группе.
|
|
763
|
-
* @param name name of the checked group/ название проверяемой группы
|
|
764
|
-
*/
|
|
765
|
-
isGroup(t) {
|
|
766
|
-
return this.group.value === t;
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* Is it available for calculation.
|
|
770
|
-
*
|
|
771
|
-
* Доступен ли для вычисления.
|
|
772
|
-
*/
|
|
773
|
-
isBeyond() {
|
|
774
|
-
return this.beyond;
|
|
775
|
-
}
|
|
776
|
-
/**
|
|
777
|
-
* Is the element visible.
|
|
778
|
-
*
|
|
779
|
-
* Виден ли элемент.
|
|
780
|
-
*/
|
|
781
|
-
isVisible() {
|
|
782
|
-
return this.visible;
|
|
783
|
-
}
|
|
784
|
-
/**
|
|
785
|
-
* Returns the identifier of the element.
|
|
786
|
-
*
|
|
787
|
-
* Возвращает идентификатор элемента.
|
|
788
|
-
*/
|
|
789
|
-
getId() {
|
|
790
|
-
return N(this.element.value);
|
|
791
|
-
}
|
|
792
|
-
/**
|
|
793
|
-
* Returns values for the background-size property.
|
|
794
|
-
*
|
|
795
|
-
* Возвращает значения для свойства background-size.
|
|
796
|
-
*/
|
|
797
|
-
getBackgroundSize() {
|
|
798
|
-
const t = u.get(this.group.value).getFactorMax();
|
|
799
|
-
switch (this.type.value) {
|
|
800
|
-
case "x":
|
|
801
|
-
return `${100 * this.percent.value.width * t}% auto`;
|
|
802
|
-
case "y":
|
|
803
|
-
return `auto ${100 * this.percent.value.height * t}%`;
|
|
804
|
-
}
|
|
805
|
-
return null;
|
|
806
|
-
}
|
|
807
|
-
/**
|
|
808
|
-
* Size change for calculation.
|
|
809
|
-
*
|
|
810
|
-
* Изменение размера для вычисления.
|
|
811
|
-
* @param width width value/ значение ширины
|
|
812
|
-
* @param height height value/ значение высоты
|
|
813
|
-
*/
|
|
814
|
-
setPercent(t, e) {
|
|
815
|
-
return (this.percent.value.width !== t || this.percent.value.height !== e) && (this.percent.value = {
|
|
816
|
-
width: t,
|
|
817
|
-
height: e
|
|
818
|
-
}), this;
|
|
819
|
-
}
|
|
820
|
-
/**
|
|
821
|
-
* Removal of an element from the scaling list.
|
|
822
|
-
*
|
|
823
|
-
* Удаление элемента из списка для масштабирования.
|
|
824
|
-
*/
|
|
825
|
-
remove() {
|
|
826
|
-
this.active.value && l.remove(this);
|
|
827
|
-
}
|
|
828
|
-
/**
|
|
829
|
-
* Updating the visibility and activity status of the element.
|
|
830
|
-
*
|
|
831
|
-
* Обновление статуса видимости и активности элемента.
|
|
832
|
-
*/
|
|
833
|
-
make() {
|
|
834
|
-
if (this.beyond = !1, this.visible = !1, this.element.value && this.is())
|
|
835
|
-
if (this.props.adaptiveAlways)
|
|
836
|
-
this.beyond = !0, this.visible = !0;
|
|
837
|
-
else {
|
|
838
|
-
const t = this.element.value.getBoundingClientRect();
|
|
839
|
-
this.beyond = !(t.bottom < 0 - $ || t.top > window.innerHeight + $), this.visible = !(t.bottom < 0 || t.top > window.innerHeight);
|
|
840
|
-
}
|
|
841
|
-
return this;
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
class V {
|
|
845
|
-
/**
|
|
846
|
-
* Constructor
|
|
847
|
-
* @param props input data/ входные данные
|
|
848
|
-
* @param data image data/ данные изображения
|
|
849
|
-
* @param coordinator object for working with coordinates/ объект для работы с координатами
|
|
850
|
-
* @param adaptive an object for working with adapted scaling/ объект для работы с адаптированным масштабированием
|
|
851
|
-
*/
|
|
852
|
-
constructor(t, e, s, h) {
|
|
853
|
-
/**
|
|
854
|
-
* Returns values for the background-image property.
|
|
855
|
-
*
|
|
856
|
-
* Возвращает значения для свойства background-image.
|
|
857
|
-
*/
|
|
858
|
-
i(this, "image", n(() => {
|
|
859
|
-
const t = this.imageSrc.value;
|
|
860
|
-
return t ? `url("${t}")` : null;
|
|
861
|
-
}));
|
|
862
|
-
/**
|
|
863
|
-
* Returns the image source/ Возвращает источник изображения
|
|
864
|
-
*/
|
|
865
|
-
i(this, "imageSrc", n(() => {
|
|
866
|
-
const t = this.data.image.value;
|
|
867
|
-
switch (typeof t) {
|
|
868
|
-
case "string":
|
|
869
|
-
return t;
|
|
870
|
-
case "object":
|
|
871
|
-
return t.src;
|
|
872
|
-
default:
|
|
873
|
-
return null;
|
|
874
|
-
}
|
|
875
|
-
}));
|
|
876
|
-
/**
|
|
877
|
-
* Returns values for the background property.
|
|
878
|
-
*
|
|
879
|
-
* Возвращает значения для свойства background.
|
|
880
|
-
*/
|
|
881
|
-
i(this, "size", n(() => {
|
|
882
|
-
if (this.coordinator.is())
|
|
883
|
-
return this.getSizeByCoordinator();
|
|
884
|
-
if (this.adaptive.is()) {
|
|
885
|
-
const t = this.adaptive.getBackgroundSize();
|
|
886
|
-
if (t)
|
|
887
|
-
return t;
|
|
888
|
-
}
|
|
889
|
-
return this.getSizeForItem();
|
|
890
|
-
}));
|
|
891
|
-
this.props = t, this.data = e, this.coordinator = s, this.adaptive = h;
|
|
892
|
-
}
|
|
893
|
-
/**
|
|
894
|
-
* Checks if the object is an image.
|
|
895
|
-
*
|
|
896
|
-
* Проверяет, является ли объект изображением.
|
|
897
|
-
*/
|
|
898
|
-
isImage() {
|
|
899
|
-
return !!this.image.value;
|
|
900
|
-
}
|
|
901
|
-
/**
|
|
902
|
-
* Returns the value for the background-size property.
|
|
903
|
-
*
|
|
904
|
-
* Возвращает значение для свойства background-size.
|
|
905
|
-
* @param width width value/ значение ширины
|
|
906
|
-
* @param height height value/ значение высоты
|
|
907
|
-
*/
|
|
908
|
-
getSize(t, e) {
|
|
909
|
-
const s = this.data.image.value;
|
|
910
|
-
return typeof s == "object" ? s.height < s.width ? `auto ${e}` : `${t} auto` : null;
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* Returns sizes according to the coordinator property.
|
|
914
|
-
*
|
|
915
|
-
* Возвращает размеры по свойству координатора.
|
|
916
|
-
*/
|
|
917
|
-
getSizeByCoordinator() {
|
|
918
|
-
const {
|
|
919
|
-
width: t,
|
|
920
|
-
height: e
|
|
921
|
-
} = this.coordinator.getSize();
|
|
922
|
-
return this.getSize(t, e);
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* Returns the scaling sizes.
|
|
926
|
-
*
|
|
927
|
-
* Возвращает размеры масштабирования.
|
|
928
|
-
*/
|
|
929
|
-
getSizeForItem() {
|
|
930
|
-
const t = this.props.size;
|
|
931
|
-
return F(t) ? t.toString().match(/%$/) ? this.getSize(t, t) : t.toString() : null;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
class tt {
|
|
935
|
-
constructor(t, e, s, h, c) {
|
|
936
|
-
i(this, "lazyInit", I(!1));
|
|
937
|
-
i(this, "lazyStatus");
|
|
938
|
-
/**
|
|
939
|
-
* Determines whether to use the img tag/ Определяет, использовать ли тег img
|
|
940
|
-
*/
|
|
941
|
-
i(this, "is", n(() => !!this.props.tagImg && this.isType()));
|
|
942
|
-
/**
|
|
943
|
-
* Determines whether lazy loading is enabled/ Определяет, включена ли ленивя загрузка
|
|
944
|
-
*/
|
|
945
|
-
i(this, "isLazy", n(() => !!this.props.lazy && !this.lazyInit.value));
|
|
946
|
-
/**
|
|
947
|
-
* Determines whether to use the picture tag/ Определяет, использовать ли тег picture
|
|
948
|
-
*/
|
|
949
|
-
i(this, "isPicture", n(() => this.is.value && !!this.props.picture));
|
|
950
|
-
/**
|
|
951
|
-
* Calculates all properties for binding to the element/
|
|
952
|
-
* Вычисляет все свойства для привязки к элементу
|
|
953
|
-
*/
|
|
954
|
-
i(this, "binds", n(
|
|
955
|
-
() => {
|
|
956
|
-
var e;
|
|
957
|
-
const t = {
|
|
958
|
-
key: "img"
|
|
959
|
-
};
|
|
960
|
-
return this.is.value && (t.src = this.background.imageSrc.value, t.alt = (e = this.props.alt) != null ? e : "", t.width = "100%", t.height = "100%", t.style = this.styles.value, this.props.lazy && (t.loading = this.isLazy.value ? "lazy" : "auto"), this.props.srcset && (t.srcset = this.getSrcset())), t;
|
|
961
|
-
}
|
|
962
|
-
));
|
|
963
|
-
/**
|
|
964
|
-
* Calculates the picture sources for different resolutions/
|
|
965
|
-
* Вычисляет источники picture для разных разрешений
|
|
966
|
-
*/
|
|
967
|
-
i(this, "picture", n(() => {
|
|
968
|
-
if (this.props.picture)
|
|
969
|
-
return M(this.props.picture) ? this.props.picture : P(
|
|
970
|
-
this.props.picture,
|
|
971
|
-
(t, e) => ({
|
|
972
|
-
key: e,
|
|
973
|
-
srcset: t,
|
|
974
|
-
media: `(width >= ${e})`
|
|
975
|
-
})
|
|
976
|
-
);
|
|
977
|
-
}));
|
|
978
|
-
/**
|
|
979
|
-
* Calculates styles for binding to the element.
|
|
980
|
-
*
|
|
981
|
-
* Вычисляет стили для привязки к элементу.
|
|
982
|
-
*/
|
|
983
|
-
i(this, "styles", n(() => {
|
|
984
|
-
const t = {
|
|
985
|
-
"object-position": `${this.position.x.value} ${this.position.y.value}`,
|
|
986
|
-
"--sys-transform-originX": this.position.x.value,
|
|
987
|
-
"--sys-transform-originY": this.position.y.value
|
|
988
|
-
};
|
|
989
|
-
return this.isSize() && (t["--sys-transform-scale"] = this.getSize()), t;
|
|
990
|
-
}));
|
|
991
|
-
this.props = t, this.element = e, this.type = s, this.position = h, this.background = c;
|
|
992
|
-
const {
|
|
993
|
-
lazy: m,
|
|
994
|
-
preloadOffset: p
|
|
995
|
-
} = R(t);
|
|
996
|
-
k(
|
|
997
|
-
[m, p, e],
|
|
998
|
-
() => {
|
|
999
|
-
var d;
|
|
1000
|
-
this.props.lazy && this.element.value ? this.makeLazy() : (this.lazyInit.value = !1, (d = this.lazyStatus) == null || d.stop(), this.lazyStatus = void 0);
|
|
1001
|
-
},
|
|
1002
|
-
{ immediate: !0 }
|
|
1003
|
-
);
|
|
1004
|
-
}
|
|
1005
|
-
/**
|
|
1006
|
-
* Checks if the type is file or image.
|
|
1007
|
-
*
|
|
1008
|
-
* Проверяет, является ли тип файлом или изображением.
|
|
1009
|
-
*/
|
|
1010
|
-
isType() {
|
|
1011
|
-
const t = this.type.item.value;
|
|
1012
|
-
return t === a.file || t === a.image;
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* Checks if the size is contained or cover.
|
|
1016
|
-
*
|
|
1017
|
-
* Проверяет, является ли размер contain или cover.
|
|
1018
|
-
*/
|
|
1019
|
-
isSize() {
|
|
1020
|
-
const t = this.background.size.value;
|
|
1021
|
-
return !!(t && t.match("[% ]"));
|
|
1022
|
-
}
|
|
1023
|
-
/**
|
|
1024
|
-
* Returns the value for the transform scale.
|
|
1025
|
-
*
|
|
1026
|
-
* Возвращает значение для свойства transform scale.
|
|
1027
|
-
*/
|
|
1028
|
-
getSize() {
|
|
1029
|
-
var t, e;
|
|
1030
|
-
return (e = (t = this.background.size.value) == null ? void 0 : t.replace("auto", "")) == null ? void 0 : e.trim();
|
|
1031
|
-
}
|
|
1032
|
-
/**
|
|
1033
|
-
* Returns the srcset attribute value.
|
|
1034
|
-
*
|
|
1035
|
-
* Возвращает значение атрибута srcset.
|
|
1036
|
-
*/
|
|
1037
|
-
getSrcset() {
|
|
1038
|
-
if (this.props.srcset)
|
|
1039
|
-
return typeof this.props.srcset == "string" ? this.props.srcset : Object.entries(this.props.srcset).map(([t, e]) => `${e} ${this.toSrcsetKey(t)}`).join(", ");
|
|
1040
|
-
}
|
|
1041
|
-
/**
|
|
1042
|
-
* Converts the srcset key to a string.
|
|
1043
|
-
*
|
|
1044
|
-
* Преобразует ключ srcset в строку.
|
|
1045
|
-
* @param key key/ ключ
|
|
1046
|
-
*/
|
|
1047
|
-
toSrcsetKey(t) {
|
|
1048
|
-
return _(t) ? `${t}w` : String(t);
|
|
1049
|
-
}
|
|
1050
|
-
/**
|
|
1051
|
-
* Initializes lazy loading.
|
|
1052
|
-
*
|
|
1053
|
-
* Инициализирует ленивую загрузку.
|
|
1054
|
-
*/
|
|
1055
|
-
makeLazy() {
|
|
1056
|
-
const t = U(this.element, `${this.props.preloadOffset} 0px`).lazyItemStatus;
|
|
1057
|
-
this.lazyStatus = k(t, () => {
|
|
1058
|
-
this.lazyInit.value = t.value;
|
|
1059
|
-
}, { immediate: !0 });
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
let et = class {
|
|
1063
|
-
/**
|
|
1064
|
-
* Constructor
|
|
1065
|
-
* @param props input data/ входные данные
|
|
1066
|
-
* @param element input element/ элемент ввода
|
|
1067
|
-
* @param className class name/ название класса
|
|
1068
|
-
* @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
|
|
1069
|
-
* @param ImageTypeConstructor class for working with image type/ класс для работы с типом изображения
|
|
1070
|
-
* @param ImageDataConstructor class for working with image data/ класс для работы с данными изображения
|
|
1071
|
-
* @param ImageCoordinatorConstructor class for working with image coordinates/ класс для работы с координатами изображения
|
|
1072
|
-
* @param ImagePositionConstructor class for working with image position/ класс для работы с позицией изображения
|
|
1073
|
-
* @param ImageAdaptiveItemConstructor class for working with adaptive image item/ класс для работы с адаптивным элементом изображения
|
|
1074
|
-
* @param ImageBackgroundConstructor class for working with image background/ класс для работы с фоном изображения
|
|
1075
|
-
* @param ImageImgConstructor class for working with image tag/ класс для работы с тегом изображения
|
|
1076
|
-
*/
|
|
1077
|
-
constructor(t, e, s, h, c = Y, m = q, p = G, d = Z, v = T, y = V, b = tt) {
|
|
1078
|
-
i(this, "type");
|
|
1079
|
-
i(this, "data");
|
|
1080
|
-
i(this, "coordinator");
|
|
1081
|
-
i(this, "position");
|
|
1082
|
-
i(this, "adaptiveItem");
|
|
1083
|
-
i(this, "background");
|
|
1084
|
-
i(this, "img");
|
|
1085
|
-
/**
|
|
1086
|
-
* Determines the tag to use/ Определяет используемый тег
|
|
1087
|
-
*/
|
|
1088
|
-
i(this, "tag", n(() => this.img.is.value ? "img" : "span"));
|
|
1089
|
-
/**
|
|
1090
|
-
* Values for the text. Text is used for the type of icon that works as a background.
|
|
1091
|
-
*
|
|
1092
|
-
* Значения для текста. Текст используется для типа иконки, который работает как фон.
|
|
1093
|
-
*/
|
|
1094
|
-
i(this, "text", n(() => {
|
|
1095
|
-
const t = this.type.item.value;
|
|
1096
|
-
if (t === a.pdf) {
|
|
1097
|
-
const s = this.data.image.value;
|
|
1098
|
-
if (f(s))
|
|
1099
|
-
return s;
|
|
1100
|
-
}
|
|
1101
|
-
const e = this.props.value;
|
|
1102
|
-
if (t === a.flagCompressed && e)
|
|
1103
|
-
return String(e).replace("f-", "").toUpperCase();
|
|
1104
|
-
if (t && f(e) && [
|
|
1105
|
-
"filled",
|
|
1106
|
-
"outlined",
|
|
1107
|
-
"round",
|
|
1108
|
-
"sharp",
|
|
1109
|
-
"two-tone",
|
|
1110
|
-
"material"
|
|
1111
|
-
].indexOf(t) !== -1)
|
|
1112
|
-
return e.replace(/^(filled|outlined|round|sharp|two-tone)-/, "");
|
|
1113
|
-
}));
|
|
1114
|
-
/**
|
|
1115
|
-
* Values for the class.
|
|
1116
|
-
*
|
|
1117
|
-
* Значения для класса.
|
|
1118
|
-
*/
|
|
1119
|
-
i(this, "classes", n(() => {
|
|
1120
|
-
const t = this.type.item.value, e = {
|
|
1121
|
-
[`${this.className}--type--${t}`]: t !== void 0,
|
|
1122
|
-
[`${this.className}--background`]: this.background.isImage(),
|
|
1123
|
-
notranslate: !0
|
|
1124
|
-
};
|
|
1125
|
-
switch (this.img.is.value && (e[`${this.className}--img`] = !0), t) {
|
|
1126
|
-
case "outlined":
|
|
1127
|
-
e["material-symbols-outlined"] = !0;
|
|
1128
|
-
break;
|
|
1129
|
-
case "round":
|
|
1130
|
-
e["material-symbols-rounded"] = !0;
|
|
1131
|
-
break;
|
|
1132
|
-
case "sharp":
|
|
1133
|
-
e["material-symbols-sharp"] = !0;
|
|
1134
|
-
break;
|
|
1135
|
-
case "material":
|
|
1136
|
-
e["material-icons"] = !0;
|
|
1137
|
-
break;
|
|
1138
|
-
}
|
|
1139
|
-
return e;
|
|
1140
|
-
}));
|
|
1141
|
-
/**
|
|
1142
|
-
* Calculates all properties for the style of the element/
|
|
1143
|
-
* Вычисляет все свойства для стиля элемента
|
|
1144
|
-
*/
|
|
1145
|
-
i(this, "styles", n(() => {
|
|
1146
|
-
const t = this.props.value;
|
|
1147
|
-
if (t)
|
|
1148
|
-
switch (this.type.item.value) {
|
|
1149
|
-
case a.file:
|
|
1150
|
-
case a.image:
|
|
1151
|
-
return {
|
|
1152
|
-
"background-image": this.background.image.value,
|
|
1153
|
-
"background-size": this.background.size.value,
|
|
1154
|
-
"background-position-x": this.position.x.value,
|
|
1155
|
-
"background-position-y": this.position.y.value
|
|
1156
|
-
};
|
|
1157
|
-
case a.icon:
|
|
1158
|
-
return {
|
|
1159
|
-
"background-image": this.background.image.value
|
|
1160
|
-
};
|
|
1161
|
-
case a.flag:
|
|
1162
|
-
return {
|
|
1163
|
-
"background-image": this.background.image.value,
|
|
1164
|
-
"background-size": "contain"
|
|
1165
|
-
};
|
|
1166
|
-
case a.public:
|
|
1167
|
-
return { "mask-image": this.background.image.value };
|
|
1168
|
-
case a.color:
|
|
1169
|
-
if (f(t))
|
|
1170
|
-
return { "background-color": t };
|
|
1171
|
-
}
|
|
1172
|
-
return {};
|
|
1173
|
-
}));
|
|
1174
|
-
/**
|
|
1175
|
-
* Computed bindings for the image element.
|
|
1176
|
-
*
|
|
1177
|
-
* Вычисляемые привязки для элемента изображения.
|
|
1178
|
-
*/
|
|
1179
|
-
i(this, "binds", n(() => ({
|
|
1180
|
-
translate: "no",
|
|
1181
|
-
...z.role("img"),
|
|
1182
|
-
...z.label(this.props.alt),
|
|
1183
|
-
...z.hidden()
|
|
1184
|
-
})));
|
|
1185
|
-
/**
|
|
1186
|
-
* Bindings for the image value.
|
|
1187
|
-
*
|
|
1188
|
-
* Привязки для значения изображения.
|
|
1189
|
-
*/
|
|
1190
|
-
i(this, "valueBinds", n(() => ({
|
|
1191
|
-
key: "value",
|
|
1192
|
-
data: this.data.image.value
|
|
1193
|
-
})));
|
|
1194
|
-
this.props = t, this.element = e, this.className = s, this.emits = h, this.type = new c(t), this.data = new m(t, this.type), this.coordinator = new p(t), this.position = new d(t, this.coordinator), this.adaptiveItem = new v(
|
|
1195
|
-
t,
|
|
1196
|
-
this.data,
|
|
1197
|
-
e
|
|
1198
|
-
), this.background = new y(
|
|
1199
|
-
t,
|
|
1200
|
-
this.data,
|
|
1201
|
-
this.coordinator,
|
|
1202
|
-
this.adaptiveItem
|
|
1203
|
-
), this.img = new b(
|
|
1204
|
-
this.props,
|
|
1205
|
-
e,
|
|
1206
|
-
this.type,
|
|
1207
|
-
this.position,
|
|
1208
|
-
this.background
|
|
1209
|
-
), h && k(this.data.image, (w) => {
|
|
1210
|
-
h("load", {
|
|
1211
|
-
type: this.type.item.value,
|
|
1212
|
-
image: w
|
|
1213
|
-
});
|
|
1214
|
-
}), E(() => this.adaptiveItem.remove());
|
|
1215
|
-
}
|
|
289
|
+
t(I, "items", []);
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/constructors/Image/ImageAdaptiveGroup.ts
|
|
292
|
+
var L = class {
|
|
293
|
+
static is(e) {
|
|
294
|
+
return this.objects.findIndex((t) => t === e) !== -1;
|
|
295
|
+
}
|
|
296
|
+
static add(e) {
|
|
297
|
+
this.is(e) || (this.objects.push(e), this.make());
|
|
298
|
+
}
|
|
299
|
+
static remove(e) {
|
|
300
|
+
let t = this.objects.findIndex((t) => t === e);
|
|
301
|
+
t !== -1 && (this.objects.splice(t, 1), this.cache = []), this.make();
|
|
302
|
+
}
|
|
303
|
+
static reset() {
|
|
304
|
+
this.cache = [], this.start();
|
|
305
|
+
}
|
|
306
|
+
static make() {
|
|
307
|
+
this.event && this.objects.length < 1 ? (this.event.stop(), this.event = void 0) : this.objects.length > 0 && (this.event || (this.event = new d(window, ["scroll-sync"], () => this.start()).start()), this.time || (this.time = !0, requestAnimationFrame(() => {
|
|
308
|
+
this.time = !1, this.start();
|
|
309
|
+
})));
|
|
310
|
+
}
|
|
311
|
+
static getItemIdByVisible() {
|
|
312
|
+
return p(this.objectsAdaptive, (e) => e.getId());
|
|
313
|
+
}
|
|
314
|
+
static start() {
|
|
315
|
+
if (this.isAdaptive()) {
|
|
316
|
+
this.makeAdaptive();
|
|
317
|
+
let e = this.getItemIdByVisible();
|
|
318
|
+
this.isCache(e) && (this.cache = e, this.makeSize(), this.makePercent(), this.makeFactorMax());
|
|
319
|
+
} else {
|
|
320
|
+
var e;
|
|
321
|
+
(e = this.event) == null || e.stop();
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
static makeAdaptive() {
|
|
325
|
+
this.objectsAdaptive = [], this.objects.forEach((e) => {
|
|
326
|
+
e.make(), e.isBeyond() && this.objectsAdaptive.push(e);
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
static makeSize() {
|
|
330
|
+
I.reset(), this.objectsAdaptive.forEach((e) => {
|
|
331
|
+
let t = e.element.value;
|
|
332
|
+
t && I.get(e.group.value).makeWidth(e.width.value).makeHeight(e.height.value).makeOffsetWidth(t.offsetWidth).makeOffsetHeight(t.offsetHeight);
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
static makePercent() {
|
|
336
|
+
I.isSize() && this.objectsAdaptive.forEach((e) => {
|
|
337
|
+
let t = e.element.value, n = I.get(e.group.value);
|
|
338
|
+
if (t) {
|
|
339
|
+
let r = n.getWidth(), i = n.getHeight();
|
|
340
|
+
e.setPercent(e.width.value * (r ? 1 / r : 0) * (n.getOffsetWidth() / t.offsetWidth), e.height.value * (i ? 1 / i : 0) * (n.getOffsetHeight() / t.offsetHeight));
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
static makeFactorMax() {
|
|
345
|
+
I.isSize() && this.objectsAdaptive.forEach((e) => {
|
|
346
|
+
I.get(e.group.value).makeFactorMax(e.factor.value);
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
static isAdaptive() {
|
|
350
|
+
return !!this.objects.find((e) => e.is());
|
|
351
|
+
}
|
|
352
|
+
static isCache(e) {
|
|
353
|
+
return this.cache.join("|") !== e.join("|");
|
|
354
|
+
}
|
|
1216
355
|
};
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
356
|
+
t(L, "objects", []), t(L, "objectsAdaptive", []), t(L, "cache", []), t(L, "event", void 0), t(L, "time", void 0);
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region src/constructors/Image/ImageAdaptiveItem.ts
|
|
359
|
+
var R = /* @__PURE__ */ function(e) {
|
|
360
|
+
return e.x = "x", e.y = "y", e;
|
|
361
|
+
}(R || {}), z = "main", B = 512, V = class {
|
|
362
|
+
constructor(e, n, i) {
|
|
363
|
+
t(this, "percent", o({
|
|
364
|
+
width: 0,
|
|
365
|
+
height: 0
|
|
366
|
+
})), t(this, "beyond", !1), t(this, "visible", !1), t(this, "active", r(() => !!(this.props.adaptive && (this.width.value || this.height.value)) && this.data.isImage())), t(this, "group", r(() => {
|
|
367
|
+
var e;
|
|
368
|
+
return (e = this.props.adaptiveGroup) == null ? z : e;
|
|
369
|
+
})), t(this, "width", r(() => {
|
|
370
|
+
var e;
|
|
371
|
+
return x((e = this.props.objectWidth) == null ? 0 : e);
|
|
372
|
+
})), t(this, "height", r(() => {
|
|
373
|
+
var e, t;
|
|
374
|
+
return x((e = (t = this.props) == null ? void 0 : t.objectHeight) == null ? 0 : e);
|
|
375
|
+
})), t(this, "type", r(() => {
|
|
376
|
+
if (this.width.value && this.percent.value.width > 0) return R.x;
|
|
377
|
+
if (this.height.value && this.percent.value.height > 0) return R.y;
|
|
378
|
+
})), t(this, "size", r(() => {
|
|
379
|
+
if (this.element.value && this.data.isImage()) {
|
|
380
|
+
let e = this.data.image.value;
|
|
381
|
+
switch (this.type.value) {
|
|
382
|
+
case R.x: return e.height * (this.element.value.offsetWidth * this.percent.value.width / e.width);
|
|
383
|
+
case R.y: return e.width * (this.element.value.offsetHeight * this.percent.value.height / e.height);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return 0;
|
|
387
|
+
})), t(this, "factor", r(() => {
|
|
388
|
+
let e = this.element.value;
|
|
389
|
+
if (e) {
|
|
390
|
+
let t = this.size.value;
|
|
391
|
+
if (this.type.value === R.x && t > e.offsetHeight) return e.offsetHeight / t;
|
|
392
|
+
if (this.type.value === R.y && t > e.offsetWidth) return e.offsetWidth / t;
|
|
393
|
+
}
|
|
394
|
+
return 1;
|
|
395
|
+
})), this.props = e, this.data = n, this.element = i, l(() => {
|
|
396
|
+
this.is() ? L.add(this) : L.remove(this);
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
is() {
|
|
400
|
+
var e;
|
|
401
|
+
return this.active.value && !!((e = this.element.value) != null && e.closest("body"));
|
|
402
|
+
}
|
|
403
|
+
isGroup(e) {
|
|
404
|
+
return this.group.value === e;
|
|
405
|
+
}
|
|
406
|
+
isBeyond() {
|
|
407
|
+
return this.beyond;
|
|
408
|
+
}
|
|
409
|
+
isVisible() {
|
|
410
|
+
return this.visible;
|
|
411
|
+
}
|
|
412
|
+
getId() {
|
|
413
|
+
return m(this.element.value);
|
|
414
|
+
}
|
|
415
|
+
getBackgroundSize() {
|
|
416
|
+
let e = I.get(this.group.value).getFactorMax();
|
|
417
|
+
switch (this.type.value) {
|
|
418
|
+
case R.x: return `${100 * this.percent.value.width * e}% auto`;
|
|
419
|
+
case R.y: return `auto ${100 * this.percent.value.height * e}%`;
|
|
420
|
+
}
|
|
421
|
+
return null;
|
|
422
|
+
}
|
|
423
|
+
setPercent(e, t) {
|
|
424
|
+
return (this.percent.value.width !== e || this.percent.value.height !== t) && (this.percent.value = {
|
|
425
|
+
width: e,
|
|
426
|
+
height: t
|
|
427
|
+
}), this;
|
|
428
|
+
}
|
|
429
|
+
remove() {
|
|
430
|
+
this.active.value && L.remove(this);
|
|
431
|
+
}
|
|
432
|
+
make() {
|
|
433
|
+
if (this.beyond = !1, this.visible = !1, this.element.value && this.is()) if (this.props.adaptiveAlways) this.beyond = !0, this.visible = !0;
|
|
434
|
+
else {
|
|
435
|
+
let e = this.element.value.getBoundingClientRect();
|
|
436
|
+
this.beyond = !(e.bottom < -512 || e.top > window.innerHeight + 512), this.visible = !(e.bottom < 0 || e.top > window.innerHeight);
|
|
437
|
+
}
|
|
438
|
+
return this;
|
|
439
|
+
}
|
|
440
|
+
}, H = class {
|
|
441
|
+
constructor(e, n, i, a) {
|
|
442
|
+
t(this, "image", r(() => {
|
|
443
|
+
let e = this.imageSrc.value;
|
|
444
|
+
return e ? `url("${e}")` : null;
|
|
445
|
+
})), t(this, "imageSrc", r(() => {
|
|
446
|
+
let e = this.data.image.value;
|
|
447
|
+
switch (typeof e) {
|
|
448
|
+
case "string": return e;
|
|
449
|
+
case "object": return e.src;
|
|
450
|
+
default: return null;
|
|
451
|
+
}
|
|
452
|
+
})), t(this, "size", r(() => {
|
|
453
|
+
if (this.coordinator.is()) return this.getSizeByCoordinator();
|
|
454
|
+
if (this.adaptive.is()) {
|
|
455
|
+
let e = this.adaptive.getBackgroundSize();
|
|
456
|
+
if (e) return e;
|
|
457
|
+
}
|
|
458
|
+
return this.getSizeForItem();
|
|
459
|
+
})), this.props = e, this.data = n, this.coordinator = i, this.adaptive = a;
|
|
460
|
+
}
|
|
461
|
+
isImage() {
|
|
462
|
+
return !!this.image.value;
|
|
463
|
+
}
|
|
464
|
+
getSize(e, t) {
|
|
465
|
+
let n = this.data.image.value;
|
|
466
|
+
return typeof n == "object" ? n.height < n.width ? `auto ${t}` : `${e} auto` : null;
|
|
467
|
+
}
|
|
468
|
+
getSizeByCoordinator() {
|
|
469
|
+
let { width: e, height: t } = this.coordinator.getSize();
|
|
470
|
+
return this.getSize(e, t);
|
|
471
|
+
}
|
|
472
|
+
getSizeForItem() {
|
|
473
|
+
let e = this.props.size;
|
|
474
|
+
return _(e) ? e.toString().match(/%$/) ? this.getSize(e, e) : e.toString() : null;
|
|
475
|
+
}
|
|
476
|
+
}, U = class {
|
|
477
|
+
constructor(e, n, i, a, l) {
|
|
478
|
+
t(this, "lazyInit", o(!1)), t(this, "lazyStatus", void 0), t(this, "is", r(() => !!this.props.tagImg && this.isType())), t(this, "isLazy", r(() => !!this.props.lazy && !this.lazyInit.value)), t(this, "isPicture", r(() => this.is.value && !!this.props.picture)), t(this, "binds", r(() => {
|
|
479
|
+
let e = { key: "img" };
|
|
480
|
+
if (this.is.value) {
|
|
481
|
+
var t;
|
|
482
|
+
e.src = this.background.imageSrc.value, e.alt = (t = this.props.alt) == null ? "" : t, e.width = "100%", e.height = "100%", e.style = this.styles.value, this.props.lazy && (e.loading = this.isLazy.value ? "lazy" : "auto"), this.props.srcset && (e.srcset = this.getSrcset());
|
|
483
|
+
}
|
|
484
|
+
return e;
|
|
485
|
+
})), t(this, "picture", r(() => {
|
|
486
|
+
if (this.props.picture) return h(this.props.picture) ? this.props.picture : p(this.props.picture, (e, t) => ({
|
|
487
|
+
key: t,
|
|
488
|
+
srcset: e,
|
|
489
|
+
media: `(width >= ${t})`
|
|
490
|
+
}));
|
|
491
|
+
})), t(this, "styles", r(() => {
|
|
492
|
+
let e = {
|
|
493
|
+
"object-position": `${this.position.x.value} ${this.position.y.value}`,
|
|
494
|
+
"--sys-transform-originX": this.position.x.value,
|
|
495
|
+
"--sys-transform-originY": this.position.y.value
|
|
496
|
+
};
|
|
497
|
+
return this.isSize() && (e["--sys-transform-scale"] = this.getSize()), e;
|
|
498
|
+
})), this.props = e, this.element = n, this.type = i, this.position = a, this.background = l;
|
|
499
|
+
let { lazy: u, preloadOffset: d } = s(e);
|
|
500
|
+
c([
|
|
501
|
+
u,
|
|
502
|
+
d,
|
|
503
|
+
n
|
|
504
|
+
], () => {
|
|
505
|
+
if (this.props.lazy && this.element.value) this.makeLazy();
|
|
506
|
+
else {
|
|
507
|
+
var e;
|
|
508
|
+
this.lazyInit.value = !1, (e = this.lazyStatus) == null || e.stop(), this.lazyStatus = void 0;
|
|
509
|
+
}
|
|
510
|
+
}, { immediate: !0 });
|
|
511
|
+
}
|
|
512
|
+
isType() {
|
|
513
|
+
let e = this.type.item.value;
|
|
514
|
+
return e === k.file || e === k.image;
|
|
515
|
+
}
|
|
516
|
+
isSize() {
|
|
517
|
+
let e = this.background.size.value;
|
|
518
|
+
return !!(e && e.match("[% ]"));
|
|
519
|
+
}
|
|
520
|
+
getSize() {
|
|
521
|
+
var e;
|
|
522
|
+
return (e = this.background.size.value) == null || (e = e.replace("auto", "")) == null ? void 0 : e.trim();
|
|
523
|
+
}
|
|
524
|
+
getSrcset() {
|
|
525
|
+
if (this.props.srcset) return typeof this.props.srcset == "string" ? this.props.srcset : Object.entries(this.props.srcset).map(([e, t]) => `${t} ${this.toSrcsetKey(e)}`).join(", ");
|
|
526
|
+
}
|
|
527
|
+
toSrcsetKey(e) {
|
|
528
|
+
return v(e) ? `${e}w` : String(e);
|
|
529
|
+
}
|
|
530
|
+
makeLazy() {
|
|
531
|
+
let e = S(this.element, `${this.props.preloadOffset} 0px`).lazyItemStatus;
|
|
532
|
+
this.lazyStatus = c(e, () => {
|
|
533
|
+
this.lazyInit.value = e.value;
|
|
534
|
+
}, { immediate: !0 });
|
|
535
|
+
}
|
|
536
|
+
}, W = class {
|
|
537
|
+
constructor(n, i, o, s, l) {
|
|
538
|
+
t(this, "type", void 0), t(this, "data", void 0), t(this, "coordinator", void 0), t(this, "position", void 0), t(this, "adaptiveItem", void 0), t(this, "background", void 0), t(this, "img", void 0), t(this, "tag", r(() => this.img.is.value ? "img" : "span")), t(this, "text", r(() => {
|
|
539
|
+
let e = this.type.item.value;
|
|
540
|
+
if (e === k.pdf) {
|
|
541
|
+
let e = this.data.image.value;
|
|
542
|
+
if (y(e)) return e;
|
|
543
|
+
}
|
|
544
|
+
let t = this.props.value;
|
|
545
|
+
if (e === k.flagCompressed && t) return String(t).replace("f-", "").toUpperCase();
|
|
546
|
+
if (e && y(t) && [
|
|
547
|
+
"filled",
|
|
548
|
+
"outlined",
|
|
549
|
+
"round",
|
|
550
|
+
"sharp",
|
|
551
|
+
"two-tone",
|
|
552
|
+
"material"
|
|
553
|
+
].indexOf(e) !== -1) return t.replace(/^(filled|outlined|round|sharp|two-tone)-/, "");
|
|
554
|
+
})), t(this, "classes", r(() => {
|
|
555
|
+
let e = this.type.item.value, t = {
|
|
556
|
+
[`${this.className}--type--${e}`]: e !== void 0,
|
|
557
|
+
[`${this.className}--background`]: this.background.isImage(),
|
|
558
|
+
notranslate: !0
|
|
559
|
+
};
|
|
560
|
+
switch (this.img.is.value && (t[`${this.className}--img`] = !0), e) {
|
|
561
|
+
case "outlined":
|
|
562
|
+
t["material-symbols-outlined"] = !0;
|
|
563
|
+
break;
|
|
564
|
+
case "round":
|
|
565
|
+
t["material-symbols-rounded"] = !0;
|
|
566
|
+
break;
|
|
567
|
+
case "sharp":
|
|
568
|
+
t["material-symbols-sharp"] = !0;
|
|
569
|
+
break;
|
|
570
|
+
case "material":
|
|
571
|
+
t["material-icons"] = !0;
|
|
572
|
+
break;
|
|
573
|
+
}
|
|
574
|
+
return t;
|
|
575
|
+
})), t(this, "styles", r(() => {
|
|
576
|
+
let e = this.props.value;
|
|
577
|
+
if (e) switch (this.type.item.value) {
|
|
578
|
+
case k.file:
|
|
579
|
+
case k.image:
|
|
580
|
+
case k.array: return {
|
|
581
|
+
"background-image": this.background.image.value,
|
|
582
|
+
"background-size": this.background.size.value,
|
|
583
|
+
"background-position-x": this.position.x.value,
|
|
584
|
+
"background-position-y": this.position.y.value
|
|
585
|
+
};
|
|
586
|
+
case k.icon: return { "background-image": this.background.image.value };
|
|
587
|
+
case k.flag: return {
|
|
588
|
+
"background-image": this.background.image.value,
|
|
589
|
+
"background-size": "contain"
|
|
590
|
+
};
|
|
591
|
+
case k.public: return { "mask-image": this.background.image.value };
|
|
592
|
+
case k.color: if (y(e)) return { "background-color": e };
|
|
593
|
+
}
|
|
594
|
+
return {};
|
|
595
|
+
})), t(this, "binds", r(() => ({
|
|
596
|
+
translate: "no",
|
|
597
|
+
...e.role("img"),
|
|
598
|
+
...e.label(this.props.alt),
|
|
599
|
+
...e.hidden()
|
|
600
|
+
}))), t(this, "valueBinds", r(() => ({
|
|
601
|
+
key: "value",
|
|
602
|
+
data: this.data.image.value
|
|
603
|
+
}))), this.props = n, this.element = i, this.className = o, this.emits = s;
|
|
604
|
+
let { ImageAdaptiveItemConstructor: u = V, ImageBackgroundConstructor: d = H, ImageCoordinatorConstructor: f = N, ImageDataConstructor: p = M, ImageImgConstructor: m = U, ImagePositionConstructor: h = P, ImageTypeConstructor: g = A } = l == null ? {} : l;
|
|
605
|
+
this.type = new g(n), this.data = new p(n, this.type), this.coordinator = new f(n), this.position = new h(n, this.coordinator), this.adaptiveItem = new u(n, this.data, i), this.background = new d(n, this.data, this.coordinator, this.adaptiveItem), this.img = new m(this.props, i, this.type, this.position, this.background), s && c(this.data.image, (e) => {
|
|
606
|
+
s("load", {
|
|
607
|
+
type: this.type.item.value,
|
|
608
|
+
image: e
|
|
609
|
+
});
|
|
610
|
+
}), a(() => this.adaptiveItem.remove());
|
|
611
|
+
}
|
|
612
|
+
}, G = class extends u {
|
|
613
|
+
constructor(e, n, a, o = W) {
|
|
614
|
+
super(e, n, a), t(this, "item", void 0), t(this, "propsImage", r(() => {
|
|
615
|
+
var e;
|
|
616
|
+
return {
|
|
617
|
+
...this.getAttrs(),
|
|
618
|
+
ref: this.element,
|
|
619
|
+
key: "image",
|
|
620
|
+
class: (e = this.classes) == null ? void 0 : e.value.main
|
|
621
|
+
};
|
|
622
|
+
})), t(this, "propsMain", r(() => {
|
|
623
|
+
var e;
|
|
624
|
+
return {
|
|
625
|
+
...this.propsImage.value,
|
|
626
|
+
...this.item.binds.value,
|
|
627
|
+
style: (e = this.styles) == null ? void 0 : e.value
|
|
628
|
+
};
|
|
629
|
+
})), t(this, "renderPicture", () => {
|
|
630
|
+
let e = this.item.img.picture.value, t = [];
|
|
631
|
+
return e && e.forEach((e) => t.push(i("source", e))), t.push(this.renderImgItem()), i("picture", this.propsImage.value, t);
|
|
632
|
+
}), t(this, "renderImg", () => i("span", this.propsImage.value, this.renderImgItem())), t(this, "renderImgItem", () => i("img", this.item.img.binds.value)), t(this, "renderValue", () => this.item.type.item.value === k.pdf ? i("object", this.item.valueBinds.value) : this.item.type.item.value === k.flagCompressed ? i("span", { class: `ui-sys-flags ui-sys-flags--${this.item.text.value}` }) : this.item.text.value), this.item = new o(this.props, this.element, this.getName(), this.emits), this.init();
|
|
633
|
+
}
|
|
634
|
+
initExpose() {
|
|
635
|
+
return {
|
|
636
|
+
type: this.item.type.item,
|
|
637
|
+
data: this.item.data.image
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
initClasses() {
|
|
641
|
+
return { main: this.item.classes.value };
|
|
642
|
+
}
|
|
643
|
+
initStyles() {
|
|
644
|
+
return this.item.styles.value;
|
|
645
|
+
}
|
|
646
|
+
initRender() {
|
|
647
|
+
return this.item.img.isPicture.value ? this.renderPicture() : this.item.img.is.value ? this.renderImg() : i("span", this.propsMain.value, this.renderValue());
|
|
648
|
+
}
|
|
1348
649
|
};
|
|
650
|
+
//#endregion
|
|
651
|
+
export { W as Image, L as ImageAdaptiveGroup, V as ImageAdaptiveItem, H as ImageBackground, F as ImageCalculation, I as ImageCalculationList, N as ImageCoordinator, M as ImageData, G as ImageDesign, w as ImageFile, U as ImageImg, n as ImageInclude, E as ImagePdf, P as ImagePosition, A as ImageType, k as ImageTypeValue, O as ImageUint8Array, B as MAX_BEYOND, C as MAX_SIZE, j as defaultsImage };
|