ablok-components 0.3.104 → 0.3.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_plugin-vue_export-helper.js +7 -8
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/ablok-components.css +2 -1
- package/dist/ablok-components.umd.js +4 -4
- package/dist/assets/img/guide.js +4 -0
- package/dist/components/atoms/base-button/base-button.js +6 -0
- package/dist/components/atoms/base-button/base-button.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/components/atoms/base-headline/base-headline.js +5 -0
- package/dist/components/atoms/base-headline/base-headline.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/atoms/base-image/base-image.js +6 -0
- package/dist/components/atoms/base-image/base-image.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/atoms/base-input/base-input.js +6 -0
- package/dist/components/atoms/base-input/base-input.vue_vue_type_script_setup_true_lang.js +196 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.js +5 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.js +6 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/atoms/check-group/check-group.js +6 -0
- package/dist/components/atoms/check-group/check-group.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/atoms/custom-html/custom-html.js +5 -0
- package/dist/components/atoms/custom-html/custom-html.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.js +6 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/atoms/input-datetime/input-datetime.js +5 -0
- package/dist/components/atoms/input-datetime/input-datetime.vue_vue_type_script_setup_true_lang.js +104 -0
- package/dist/components/atoms/input-file/input-file.js +5 -0
- package/dist/components/atoms/input-file/input-file.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/components/atoms/input-passcode/input-passcode.js +5 -0
- package/dist/components/atoms/input-passcode/input-passcode.vue_vue_type_script_setup_true_lang.js +158 -0
- package/dist/components/atoms/input-password/input-password.js +5 -0
- package/dist/components/atoms/input-password/input-password.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/atoms/input-textarea/input-textarea.js +5 -0
- package/dist/components/atoms/input-textarea/input-textarea.vue_vue_type_script_setup_true_lang.js +108 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.js +6 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/components/atoms/radio-group/radio-group.js +6 -0
- package/dist/components/atoms/radio-group/radio-group.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/atoms/svg-icon/svg-icon.js +6 -0
- package/dist/components/atoms/svg-icon/svg-icon.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.js +6 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/components/molecules/accordion/accordion-item.js +6 -0
- package/dist/components/molecules/accordion/accordion-item.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/molecules/accordion/accordion.js +10 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.js +6 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/molecules/base-camera/base-camera.js +6 -0
- package/dist/components/molecules/base-camera/base-camera.vue_vue_type_script_async_true_setup_true_lang.js +505 -0
- package/dist/components/molecules/base-map/base-map.js +6 -0
- package/dist/components/molecules/base-map/base-map.vue_vue_type_script_setup_true_lang.js +390 -0
- package/dist/components/molecules/bulk-upload/bulk-upload.js +6 -0
- package/dist/components/molecules/bulk-upload/bulk-upload.vue_vue_type_script_setup_true_lang.js +188 -0
- package/dist/components/molecules/color-palette/color-palette.js +6 -0
- package/dist/components/molecules/color-palette/color-palette.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.js +5 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/components/molecules/file-upload/file-upload.js +6 -0
- package/dist/components/molecules/file-upload/file-upload.vue_vue_type_script_setup_true_lang.js +196 -0
- package/dist/components/molecules/hint-system/hint-system.js +6 -0
- package/dist/components/molecules/hint-system/hint-system.vue_vue_type_script_setup_true_lang.js +96 -0
- package/dist/components/molecules/image-crop/image-crop.js +5 -0
- package/dist/components/molecules/image-crop/image-crop.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.js +5 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/molecules/image-resize/image-resize.js +5 -0
- package/dist/components/molecules/image-resize/image-resize.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/molecules/image-upload/image-upload.js +6 -0
- package/dist/components/molecules/image-upload/image-upload.vue_vue_type_script_setup_true_lang.js +264 -0
- package/dist/components/molecules/image-zoom/image-zoom.js +6 -0
- package/dist/components/molecules/image-zoom/image-zoom.vue_vue_type_script_setup_true_lang.js +195 -0
- package/dist/components/molecules/input-color/input-color.js +6 -0
- package/dist/components/molecules/input-color/input-color.vue_vue_type_script_setup_true_lang.js +118 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.js +6 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.vue_vue_type_script_setup_true_lang.js +337 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.js +6 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.vue_vue_type_script_setup_true_lang.js +169 -0
- package/dist/components/molecules/link-sharing/link-sharing.js +6 -0
- package/dist/components/molecules/link-sharing/link-sharing.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/molecules/location-list/location-list.js +6 -0
- package/dist/components/molecules/location-list/location-list.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.js +6 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.js +6 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.js +6 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/components/molecules/progress-steps/progress-steps.js +6 -0
- package/dist/components/molecules/progress-steps/progress-steps.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/molecules/qr-code/qr-code.js +6 -0
- package/dist/components/molecules/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.js +6 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/molecules/rte-editor/rte-editor.js +6 -0
- package/dist/components/molecules/rte-editor/rte-editor.vue_vue_type_script_setup_true_lang.js +384 -0
- package/dist/components/molecules/select-media/select-media.js +6 -0
- package/dist/components/molecules/select-media/select-media.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/components/molecules/upload-group/upload-group.js +6 -0
- package/dist/components/molecules/upload-group/upload-group.vue_vue_type_script_setup_true_lang.js +184 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.js +5 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/organisms/location-finder/location-finder.js +6 -0
- package/dist/components/organisms/location-finder/location-finder.vue_vue_type_script_setup_true_lang.js +609 -0
- package/dist/components/organisms/preset-uploader/preset-uploader.js +6 -0
- package/dist/components/organisms/preset-uploader/preset-uploader.vue_vue_type_script_setup_true_lang.js +592 -0
- package/dist/components/templates/base-carousel/base-carousel.js +6 -0
- package/dist/components/templates/base-carousel/base-carousel.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/components/templates/base-form/base-form.js +6 -0
- package/dist/components/templates/base-form/base-form.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/templates/modal-dialog/modal-dialog.js +6 -0
- package/dist/components/templates/modal-dialog/modal-dialog.vue_vue_type_script_setup_true_lang.js +117 -0
- package/dist/components/templates/popover-dialog/popover-dialog.js +6 -0
- package/dist/components/templates/popover-dialog/popover-dialog.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/templates/sortable-list/sortable-list.js +6 -0
- package/dist/components/templates/sortable-list/sortable-list.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.js +6 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue_vue_type_script_setup_true_lang.js +54 -0
- package/dist/composables/useCameraFilter.js +60 -55
- package/dist/composables/useConfetti.js +9 -11
- package/dist/composables/useDirections.js +54 -59
- package/dist/composables/useDragAndDrop.js +28 -28
- package/dist/composables/useGeocoding.js +81 -83
- package/dist/composables/useGeolocation.js +61 -70
- package/dist/composables/useLocalFileUrl.js +16 -13
- package/dist/composables/useSanitize.js +81 -21
- package/dist/composables/useUploadTransport.js +28 -27
- package/dist/index.js +60 -161
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +8 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +16 -17
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +19 -28
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +17 -14
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/formatDistance.js +161 -162
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/formatLong.js +31 -36
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/formatRelative.js +11 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/localize.js +210 -158
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/match.js +113 -111
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de.js +18 -18
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +68 -69
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +31 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +200 -153
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +123 -109
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +19 -19
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +68 -69
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +31 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/localize.js +176 -120
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/match.js +122 -108
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr.js +18 -18
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js +9 -11
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +15 -16
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTrim.js +13 -14
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +8 -11
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js +19 -21
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js +12 -13
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js +10 -11
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_trimmedEndIndex.js +13 -15
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js +55 -60
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObject.js +12 -13
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js +11 -12
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isSymbol.js +14 -15
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js +12 -13
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toNumber.js +24 -28
- package/dist/utilities/helpers.js +55 -70
- package/package.json +12 -11
- package/dist/_virtual/_commonjsHelpers.js +0 -8
- package/dist/_virtual/debounce.js +0 -7
- package/dist/assets/img/guide.png.js +0 -4
- package/dist/components/atoms/base-button/base-button.vue.js +0 -92
- package/dist/components/atoms/base-button/base-button3.vue.js +0 -5
- package/dist/components/atoms/base-headline/base-headline.vue.js +0 -30
- package/dist/components/atoms/base-headline/base-headline2.vue.js +0 -4
- package/dist/components/atoms/base-image/base-image.vue.js +0 -75
- package/dist/components/atoms/base-image/base-image3.vue.js +0 -5
- package/dist/components/atoms/base-input/base-input.vue.js +0 -184
- package/dist/components/atoms/base-input/base-input3.vue.js +0 -5
- package/dist/components/atoms/base-paragraph/base-paragraph.vue.js +0 -21
- package/dist/components/atoms/base-paragraph/base-paragraph2.vue.js +0 -4
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue.js +0 -113
- package/dist/components/atoms/canvas-confetti/canvas-confetti3.vue.js +0 -5
- package/dist/components/atoms/check-group/check-group.vue.js +0 -86
- package/dist/components/atoms/check-group/check-group3.vue.js +0 -5
- package/dist/components/atoms/custom-html/custom-html.vue.js +0 -26
- package/dist/components/atoms/custom-html/custom-html2.vue.js +0 -4
- package/dist/components/atoms/input-checkbox/input-checkbox.vue.js +0 -84
- package/dist/components/atoms/input-checkbox/input-checkbox3.vue.js +0 -5
- package/dist/components/atoms/input-datetime/input-datetime.vue.js +0 -99
- package/dist/components/atoms/input-datetime/input-datetime2.vue.js +0 -4
- package/dist/components/atoms/input-file/input-file.vue.js +0 -130
- package/dist/components/atoms/input-file/input-file2.vue.js +0 -4
- package/dist/components/atoms/input-passcode/input-passcode.vue.js +0 -149
- package/dist/components/atoms/input-passcode/input-passcode2.vue.js +0 -4
- package/dist/components/atoms/input-password/input-password.vue.js +0 -118
- package/dist/components/atoms/input-password/input-password2.vue.js +0 -4
- package/dist/components/atoms/input-textarea/input-textarea.vue.js +0 -105
- package/dist/components/atoms/input-textarea/input-textarea2.vue.js +0 -4
- package/dist/components/atoms/loading-spinner/loading-spinner.vue.js +0 -38
- package/dist/components/atoms/loading-spinner/loading-spinner3.vue.js +0 -5
- package/dist/components/atoms/radio-group/radio-group.vue.js +0 -99
- package/dist/components/atoms/radio-group/radio-group3.vue.js +0 -5
- package/dist/components/atoms/svg-icon/svg-icon.vue.js +0 -44
- package/dist/components/atoms/svg-icon/svg-icon3.vue.js +0 -5
- package/dist/components/atoms/zoom-slider/zoom-slider.vue.js +0 -59
- package/dist/components/atoms/zoom-slider/zoom-slider3.vue.js +0 -5
- package/dist/components/molecules/accordion/accordion-item.vue.js +0 -84
- package/dist/components/molecules/accordion/accordion-item3.vue.js +0 -5
- package/dist/components/molecules/accordion/accordion.vue.js +0 -12
- package/dist/components/molecules/auto-suggest/auto-suggest.vue.js +0 -132
- package/dist/components/molecules/auto-suggest/auto-suggest3.vue.js +0 -5
- package/dist/components/molecules/base-camera/base-camera.vue.js +0 -530
- package/dist/components/molecules/base-camera/base-camera3.vue.js +0 -5
- package/dist/components/molecules/base-map/base-map.vue.js +0 -386
- package/dist/components/molecules/base-map/base-map3.vue.js +0 -5
- package/dist/components/molecules/bulk-upload/bulk-upload.vue.js +0 -256
- package/dist/components/molecules/bulk-upload/bulk-upload3.vue.js +0 -5
- package/dist/components/molecules/color-palette/color-palette.vue.js +0 -72
- package/dist/components/molecules/color-palette/color-palette3.vue.js +0 -5
- package/dist/components/molecules/dom-renderer/dom-renderer.vue.js +0 -102
- package/dist/components/molecules/dom-renderer/dom-renderer2.vue.js +0 -4
- package/dist/components/molecules/file-upload/file-upload.vue.js +0 -215
- package/dist/components/molecules/file-upload/file-upload3.vue.js +0 -5
- package/dist/components/molecules/hint-system/hint-system.vue.js +0 -111
- package/dist/components/molecules/hint-system/hint-system3.vue.js +0 -5
- package/dist/components/molecules/image-crop/image-crop.vue.js +0 -82
- package/dist/components/molecules/image-crop/image-crop2.vue.js +0 -4
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue.js +0 -120
- package/dist/components/molecules/image-crop-resize/image-crop-resize2.vue.js +0 -4
- package/dist/components/molecules/image-resize/image-resize.vue.js +0 -143
- package/dist/components/molecules/image-resize/image-resize2.vue.js +0 -4
- package/dist/components/molecules/image-upload/image-upload.vue.js +0 -289
- package/dist/components/molecules/image-upload/image-upload3.vue.js +0 -5
- package/dist/components/molecules/image-zoom/image-zoom.vue.js +0 -209
- package/dist/components/molecules/image-zoom/image-zoom3.vue.js +0 -5
- package/dist/components/molecules/input-color/input-color.vue.js +0 -105
- package/dist/components/molecules/input-color/input-color3.vue.js +0 -5
- package/dist/components/molecules/input-datepicker/input-datepicker.vue.js +0 -291
- package/dist/components/molecules/input-datepicker/input-datepicker3.vue.js +0 -5
- package/dist/components/molecules/input-dropdown/input-dropdown.vue.js +0 -207
- package/dist/components/molecules/input-dropdown/input-dropdown3.vue.js +0 -5
- package/dist/components/molecules/link-sharing/link-sharing.vue.js +0 -177
- package/dist/components/molecules/link-sharing/link-sharing3.vue.js +0 -7
- package/dist/components/molecules/location-list/location-list.vue.js +0 -98
- package/dist/components/molecules/location-list/location-list3.vue.js +0 -5
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue.js +0 -87
- package/dist/components/molecules/media-thumbnails/media-thumbnails3.vue.js +0 -5
- package/dist/components/molecules/popover-notifications/popover-notifications.vue.js +0 -135
- package/dist/components/molecules/popover-notifications/popover-notifications3.vue.js +0 -5
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue.js +0 -134
- package/dist/components/molecules/popover-tooltip/popover-tooltip3.vue.js +0 -5
- package/dist/components/molecules/progress-steps/progress-steps.vue.js +0 -84
- package/dist/components/molecules/progress-steps/progress-steps3.vue.js +0 -5
- package/dist/components/molecules/qr-code/qr-code.vue.js +0 -103
- package/dist/components/molecules/qr-code/qr-code3.vue.js +0 -5
- package/dist/components/molecules/radio-buttons/radio-buttons.vue.js +0 -79
- package/dist/components/molecules/radio-buttons/radio-buttons3.vue.js +0 -5
- package/dist/components/molecules/rte-editor/rte-editor.vue.js +0 -478
- package/dist/components/molecules/rte-editor/rte-editor3.vue.js +0 -5
- package/dist/components/molecules/select-media/select-media.vue.js +0 -87
- package/dist/components/molecules/select-media/select-media3.vue.js +0 -5
- package/dist/components/molecules/upload-group/upload-group.vue.js +0 -193
- package/dist/components/molecules/upload-group/upload-group3.vue.js +0 -5
- package/dist/components/organisms/asset-uploader/asset-uploader.vue.js +0 -160
- package/dist/components/organisms/asset-uploader/asset-uploader2.vue.js +0 -4
- package/dist/components/organisms/location-finder/location-finder.vue.js +0 -634
- package/dist/components/organisms/location-finder/location-finder3.vue.js +0 -5
- package/dist/components/organisms/preset-uploader/preset-uploader.vue.js +0 -569
- package/dist/components/organisms/preset-uploader/preset-uploader3.vue.js +0 -5
- package/dist/components/templates/base-carousel/base-carousel.vue.js +0 -93
- package/dist/components/templates/base-carousel/base-carousel3.vue.js +0 -5
- package/dist/components/templates/base-form/base-form.vue.js +0 -35
- package/dist/components/templates/base-form/base-form3.vue.js +0 -5
- package/dist/components/templates/modal-dialog/modal-dialog.vue.js +0 -123
- package/dist/components/templates/modal-dialog/modal-dialog3.vue.js +0 -5
- package/dist/components/templates/popover-dialog/popover-dialog.vue.js +0 -95
- package/dist/components/templates/popover-dialog/popover-dialog3.vue.js +0 -5
- package/dist/components/templates/sortable-list/sortable-list.vue.js +0 -204
- package/dist/components/templates/sortable-list/sortable-list3.vue.js +0 -5
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue.js +0 -76
- package/dist/components/templates/touch-wrapper/touch-wrapper3.vue.js +0 -5
|
@@ -1,530 +0,0 @@
|
|
|
1
|
-
import { defineComponent as at, ref as u, computed as h, watch as Ie, onMounted as it, nextTick as nt, onBeforeUnmount as ot, openBlock as y, createElementBlock as b, normalizeClass as de, createElementVNode as p, createVNode as ve, withCtx as lt, createCommentVNode as R, withDirectives as xe, normalizeStyle as he, vShow as Re, toDisplayString as me, createBlock as rt, withModifiers as st } from "vue";
|
|
2
|
-
import ut from "../../../_virtual/debounce.js";
|
|
3
|
-
import ct from "../../atoms/loading-spinner/loading-spinner.vue.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import dt from "../../atoms/svg-icon/svg-icon.vue.js";
|
|
6
|
-
/* empty css */
|
|
7
|
-
import vt from "../input-dropdown/input-dropdown.vue.js";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import { dataURItoBlob as ht } from "../../../utilities/helpers.js";
|
|
10
|
-
import { useCameraFilter as mt } from "../../../composables/useCameraFilter.js";
|
|
11
|
-
import ft from "../../atoms/zoom-slider/zoom-slider.vue.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
import gt from "../../../assets/img/guide.png.js";
|
|
14
|
-
const wt = { class: "camera__preview" }, pt = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "camera__bg-notification"
|
|
17
|
-
}, yt = ["innerHTML"], bt = ["width", "height"], _t = {
|
|
18
|
-
key: 1,
|
|
19
|
-
class: "camera__countdown-overlay"
|
|
20
|
-
}, Et = ["innerHTML", "data-countdown"], Ct = ["src"], St = {
|
|
21
|
-
key: 3,
|
|
22
|
-
class: "camera__zoom-slider"
|
|
23
|
-
}, kt = { class: "camera__controls" }, Dt = { class: "container" }, Mt = { class: "row" }, It = { class: "col" }, xt = { class: "btn-group" }, Rt = { key: 0 }, Ot = { key: 1 }, Lt = {
|
|
24
|
-
key: 0,
|
|
25
|
-
class: "camera__select-device"
|
|
26
|
-
}, Tt = { class: "col" }, At = { class: "" }, zt = {
|
|
27
|
-
name: "BaseCamera",
|
|
28
|
-
inheritAttrs: !1
|
|
29
|
-
}, Oe = {
|
|
30
|
-
"1x1": { width: 720, height: 720 },
|
|
31
|
-
"2x3": { width: 720, height: 1080 },
|
|
32
|
-
"3x2": { width: 1080, height: 720 },
|
|
33
|
-
"3x4": { width: 720, height: 960 },
|
|
34
|
-
"4x3": { width: 960, height: 720 },
|
|
35
|
-
"4x5": { width: 960, height: 1200 },
|
|
36
|
-
"5x4": { width: 1200, height: 960 },
|
|
37
|
-
"16x9": { width: 1280, height: 720 },
|
|
38
|
-
"9x16": { width: 720, height: 1280 }
|
|
39
|
-
}, Xt = /* @__PURE__ */ at({
|
|
40
|
-
...zt,
|
|
41
|
-
props: {
|
|
42
|
-
modelValue: {
|
|
43
|
-
type: null
|
|
44
|
-
},
|
|
45
|
-
enableSwitchCamera: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: !0
|
|
48
|
-
},
|
|
49
|
-
defaultRearCamera: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: !1
|
|
52
|
-
},
|
|
53
|
-
enableMirrorCamera: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: !1
|
|
56
|
-
},
|
|
57
|
-
enableGuide: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: !0
|
|
60
|
-
},
|
|
61
|
-
guideSrc: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: () => gt
|
|
64
|
-
},
|
|
65
|
-
countdown: {
|
|
66
|
-
type: Number,
|
|
67
|
-
default: 0
|
|
68
|
-
},
|
|
69
|
-
ratio: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: ""
|
|
72
|
-
},
|
|
73
|
-
filter: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: "none",
|
|
76
|
-
validator: (m) => ["none", "grayscale", "sepia"].includes(m)
|
|
77
|
-
},
|
|
78
|
-
tintColor: {
|
|
79
|
-
type: String,
|
|
80
|
-
default: ""
|
|
81
|
-
},
|
|
82
|
-
tintIntensity: {
|
|
83
|
-
type: Number,
|
|
84
|
-
default: 0.3
|
|
85
|
-
},
|
|
86
|
-
enableAudio: {
|
|
87
|
-
type: Boolean,
|
|
88
|
-
default: !1
|
|
89
|
-
},
|
|
90
|
-
enableSelectDevice: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: !1
|
|
93
|
-
},
|
|
94
|
-
enableCropImage: {
|
|
95
|
-
type: Boolean,
|
|
96
|
-
default: !0
|
|
97
|
-
},
|
|
98
|
-
resolutions: {
|
|
99
|
-
type: Object,
|
|
100
|
-
default: () => Oe
|
|
101
|
-
},
|
|
102
|
-
zoom: {
|
|
103
|
-
type: Number,
|
|
104
|
-
default: 1
|
|
105
|
-
},
|
|
106
|
-
enableZoomSlider: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: !1
|
|
109
|
-
},
|
|
110
|
-
correctOrientation: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: !1
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
emits: ["update:modelValue"],
|
|
116
|
-
setup(m, { expose: Le, emit: Te }) {
|
|
117
|
-
const r = m, Ae = Te, n = u(), o = u(), fe = u(!1), W = u([]), c = u(), O = u(), j = u(), L = u(!1), K = u(!1), X = u(0), J = u(0), k = u(), d = u(r.zoom || 1), ge = u(!1), V = u(!1), ae = u(null), ie = u(!1);
|
|
118
|
-
let $, D;
|
|
119
|
-
const ze = typeof window < "u" && "DeviceMotionEvent" in window && (window.matchMedia?.("(pointer: coarse)")?.matches || "ontouchstart" in window), we = h(() => r.correctOrientation && ze), ne = h(() => fe.value && (!we.value || ie.value));
|
|
120
|
-
function oe() {
|
|
121
|
-
D && (window.removeEventListener("pointerdown", D, !0), window.removeEventListener("touchend", D, !0), D = void 0);
|
|
122
|
-
}
|
|
123
|
-
function Q() {
|
|
124
|
-
ie.value = !0, $ && (clearTimeout($), $ = void 0), oe();
|
|
125
|
-
}
|
|
126
|
-
function Ve() {
|
|
127
|
-
D || (D = () => {
|
|
128
|
-
le();
|
|
129
|
-
}, window.addEventListener("pointerdown", D, !0), window.addEventListener("touchend", D, !0));
|
|
130
|
-
}
|
|
131
|
-
function pe(e) {
|
|
132
|
-
const t = e.accelerationIncludingGravity;
|
|
133
|
-
if (!t || t.x == null || t.y == null) return;
|
|
134
|
-
const a = Math.round(Math.atan2(t.x, t.y) * 180 / Math.PI);
|
|
135
|
-
if (ae.value = a, !(typeof screen < "u" && screen.orientation && screen.orientation.type || "portrait-primary").startsWith("portrait"))
|
|
136
|
-
V.value = !1;
|
|
137
|
-
else {
|
|
138
|
-
const g = Math.abs(Math.abs(a) - 90);
|
|
139
|
-
!V.value && g < 40 ? V.value = !0 : V.value && g > 50 && (V.value = !1);
|
|
140
|
-
}
|
|
141
|
-
ie.value || Q();
|
|
142
|
-
}
|
|
143
|
-
async function le() {
|
|
144
|
-
if (!(!r.correctOrientation || ge.value))
|
|
145
|
-
try {
|
|
146
|
-
const e = window.DeviceOrientationEvent, t = window.DeviceMotionEvent;
|
|
147
|
-
if (e && typeof e.requestPermission == "function" && await e.requestPermission() !== "granted") {
|
|
148
|
-
Q();
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
t && typeof t.requestPermission == "function" && await t.requestPermission().catch(() => {
|
|
152
|
-
}), window.addEventListener("devicemotion", pe, !0), ge.value = !0, oe();
|
|
153
|
-
} catch (e) {
|
|
154
|
-
console.error(e, "enableMotion: failed"), Q();
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
const G = h(() => ({ ...Oe, ...r.resolutions })), $e = h(() => Object.values(G.value)[0]);
|
|
158
|
-
function Be(e) {
|
|
159
|
-
return String(e || "").trim().toLowerCase().replace(/\s+/g, "").replace(/[:/]/g, "x");
|
|
160
|
-
}
|
|
161
|
-
const M = h(() => {
|
|
162
|
-
if (G.value[r.ratio])
|
|
163
|
-
return r.ratio;
|
|
164
|
-
const e = Be(r.ratio);
|
|
165
|
-
if (G.value[e])
|
|
166
|
-
return e;
|
|
167
|
-
}), T = h(() => M.value ? G.value[M.value] : $e.value), He = h(() => {
|
|
168
|
-
const e = M.value ? G.value[M.value] : void 0;
|
|
169
|
-
return e ? `${e.width} / ${e.height}` : void 0;
|
|
170
|
-
}), I = h(() => W.value.filter((e) => e.kind === "videoinput")), ye = h(() => W.value.filter((e) => e.kind === "audioinput")), N = u([]), re = h(() => I.value.filter((e) => !N.value.includes(e.deviceId)));
|
|
171
|
-
function Ue(e) {
|
|
172
|
-
e && !N.value.includes(e) && (N.value = [...N.value, e]);
|
|
173
|
-
}
|
|
174
|
-
function be(e) {
|
|
175
|
-
const t = I.value;
|
|
176
|
-
if (!t.length) return;
|
|
177
|
-
const a = t.findIndex((l) => l.deviceId === e);
|
|
178
|
-
for (let l = 1; l <= t.length; l++) {
|
|
179
|
-
const f = t[(Math.max(a, 0) + l) % t.length];
|
|
180
|
-
if (f && !N.value.includes(f.deviceId))
|
|
181
|
-
return f;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
const We = h(() => re.value.map((e, t) => ({
|
|
185
|
-
text: e.label.slice(0, e.label.indexOf("(")) || `Camera ${t + 1}`,
|
|
186
|
-
value: e.deviceId
|
|
187
|
-
}))), _e = h({
|
|
188
|
-
get() {
|
|
189
|
-
return c.value && c.value.deviceId;
|
|
190
|
-
},
|
|
191
|
-
set(e) {
|
|
192
|
-
c.value = I.value.find((t) => t.deviceId === e), j.value = void 0;
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
h({
|
|
196
|
-
get() {
|
|
197
|
-
return O.value && O.value.deviceId;
|
|
198
|
-
},
|
|
199
|
-
set(e) {
|
|
200
|
-
O.value = ye.value.find((t) => t.deviceId === e);
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
const B = h(() => {
|
|
204
|
-
const e = c.value && I.value.findIndex((t) => t.deviceId === c.value?.deviceId);
|
|
205
|
-
return r.enableMirrorCamera && e === 0 ? "mirror-cam" : "";
|
|
206
|
-
}), je = h(() => {
|
|
207
|
-
const e = c.value && W.value.findIndex((t) => t.deviceId === c.value?.deviceId);
|
|
208
|
-
return B.value ? `${B.value} mirror-device-${e}` : "";
|
|
209
|
-
}), { tintRgb: Vt, applyFilterToCanvas: Ee } = mt(r);
|
|
210
|
-
function Ce() {
|
|
211
|
-
if (M.value && T.value) {
|
|
212
|
-
X.value = T.value.width, J.value = T.value.height;
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
X.value = n.value.parentElement && n.value.parentElement.clientWidth, J.value = n.value.parentElement && n.value.parentElement.clientHeight;
|
|
216
|
-
}
|
|
217
|
-
const Se = ut(() => {
|
|
218
|
-
Ce();
|
|
219
|
-
}, 300, { trailing: !0, leading: !1 });
|
|
220
|
-
function se(e) {
|
|
221
|
-
return new Promise((t) => setTimeout(t, e));
|
|
222
|
-
}
|
|
223
|
-
async function Ge() {
|
|
224
|
-
const e = T.value ? { width: T.value.width, height: T.value.height } : void 0, t = e ? Math.max(e.width, e.height) : void 0, a = e ? Math.min(e.width, e.height) : void 0, l = r.enableAudio && {
|
|
225
|
-
...O.value ? { deviceId: O.value.deviceId } : {}
|
|
226
|
-
// deviceId: activeAudioDevice.value ? { exact: activeAudioDevice.value } : undefined
|
|
227
|
-
}, f = c.value && c.value.deviceId, g = j.value, i = [];
|
|
228
|
-
f ? (t && a && i.push({ deviceId: { exact: f }, width: { ideal: t }, height: { ideal: a } }), i.push({ deviceId: { exact: f } })) : g ? (t && a && i.push({ facingMode: { exact: g }, width: { ideal: t }, height: { ideal: a } }), i.push({ facingMode: { exact: g } }), t && a && i.push({ width: { ideal: t }, height: { ideal: a } }), i.push({})) : (t && a && i.push({ width: { ideal: t }, height: { ideal: a } }), i.push({}));
|
|
229
|
-
for (const s of i)
|
|
230
|
-
for (let v = 0; v < 5; v++)
|
|
231
|
-
try {
|
|
232
|
-
return await navigator.mediaDevices.getUserMedia({ audio: l, video: s });
|
|
233
|
-
} catch (z) {
|
|
234
|
-
const C = z && z.name;
|
|
235
|
-
if (C === "NotReadableError" || C === "AbortError") {
|
|
236
|
-
await se(500);
|
|
237
|
-
continue;
|
|
238
|
-
}
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
function Y() {
|
|
243
|
-
n.value && n.value.srcObject && (n.value.srcObject.getTracks().forEach((t) => {
|
|
244
|
-
t.stop();
|
|
245
|
-
}), n.value.srcObject = null);
|
|
246
|
-
}
|
|
247
|
-
let A = 0;
|
|
248
|
-
const Ne = 350, Pe = 8e3;
|
|
249
|
-
let P, ee;
|
|
250
|
-
function H() {
|
|
251
|
-
P && (clearTimeout(P), P = void 0), ee && (ee(), ee = void 0);
|
|
252
|
-
}
|
|
253
|
-
function Fe(e) {
|
|
254
|
-
Ue(e);
|
|
255
|
-
const t = be(e);
|
|
256
|
-
t && t.deviceId !== e && (c.value = t);
|
|
257
|
-
}
|
|
258
|
-
function qe(e) {
|
|
259
|
-
H();
|
|
260
|
-
const t = c.value && c.value.deviceId, a = n.value;
|
|
261
|
-
if (!t || !a) return;
|
|
262
|
-
const l = a.srcObject && a.srcObject.getVideoTracks?.()[0];
|
|
263
|
-
if (!l || !(typeof l.addEventListener == "function") || a.videoWidth > 0) return;
|
|
264
|
-
const g = () => {
|
|
265
|
-
if (H(), e !== A || !n.value) return;
|
|
266
|
-
const v = be(t);
|
|
267
|
-
v && v.deviceId !== t && (Y(), Fe(t));
|
|
268
|
-
}, i = () => {
|
|
269
|
-
e === A && n.value && n.value.videoWidth > 0 && H();
|
|
270
|
-
}, s = () => {
|
|
271
|
-
g();
|
|
272
|
-
};
|
|
273
|
-
l.addEventListener("unmute", i), l.addEventListener("ended", s), ee = () => {
|
|
274
|
-
l.removeEventListener("unmute", i), l.removeEventListener("ended", s);
|
|
275
|
-
}, P = setTimeout(() => {
|
|
276
|
-
P = void 0, !(e !== A || !n.value) && (n.value.videoWidth === 0 ? g() : H());
|
|
277
|
-
}, Pe);
|
|
278
|
-
}
|
|
279
|
-
const Ze = 2;
|
|
280
|
-
let ue = 0;
|
|
281
|
-
async function U() {
|
|
282
|
-
const e = ++A;
|
|
283
|
-
H();
|
|
284
|
-
const t = !!(n.value && n.value.srcObject);
|
|
285
|
-
if (Y(), t && (await se(Ne), e !== A))
|
|
286
|
-
return;
|
|
287
|
-
const a = await Ge();
|
|
288
|
-
if (e !== A) {
|
|
289
|
-
a?.getTracks?.().forEach((l) => l.stop());
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
if (a && n.value) {
|
|
293
|
-
ue = 0, n.value.srcObject = a, n.value.muted = !0;
|
|
294
|
-
try {
|
|
295
|
-
await n.value.play?.();
|
|
296
|
-
} catch {
|
|
297
|
-
}
|
|
298
|
-
qe(e);
|
|
299
|
-
} else if (!a && c.value) {
|
|
300
|
-
ue < Ze && (ue++, await se(600), e === A && await U());
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
return W.value = await navigator.mediaDevices.enumerateDevices(), { stream: n.value && n.value.srcObject, devices: W.value };
|
|
304
|
-
}
|
|
305
|
-
function Ke() {
|
|
306
|
-
L.value ? (L.value = !1, K.value = !1, Y()) : (L.value = !0, U());
|
|
307
|
-
}
|
|
308
|
-
function Xe() {
|
|
309
|
-
c.value = void 0, j.value = j.value === "user" ? "environment" : "user", U();
|
|
310
|
-
}
|
|
311
|
-
async function ke(e, t) {
|
|
312
|
-
e && (!t || e.deviceId !== t.deviceId) && await U();
|
|
313
|
-
}
|
|
314
|
-
Ie(() => c.value, ke), Ie(() => O.value, ke);
|
|
315
|
-
function ce() {
|
|
316
|
-
r.countdown ? (k.value = k.value ? k.value - 1 : r.countdown, k.value ? setTimeout(ce, 1e3) : De()) : De();
|
|
317
|
-
}
|
|
318
|
-
Le({ onCapture: ce, enableMotion: le, camera: n.value, zoom: d });
|
|
319
|
-
function Je() {
|
|
320
|
-
if (!r.correctOrientation || ae.value == null) return 0;
|
|
321
|
-
const e = ((ae.value - 180) % 360 + 360) % 360;
|
|
322
|
-
return (-1 * (Math.round(e / 90) * 90 % 360) % 360 + 360) % 360;
|
|
323
|
-
}
|
|
324
|
-
function Qe(e, t, a, l, f) {
|
|
325
|
-
const g = o.value.width, i = o.value.height;
|
|
326
|
-
e.translate(g / 2, i / 2), B.value && e.scale(-1, 1), e.rotate(a * Math.PI / 180);
|
|
327
|
-
const s = i, v = g, C = Math.max(s / l, v / f) * (d.value && d.value > 0 ? d.value : 1), F = l * C, S = f * C;
|
|
328
|
-
e.drawImage(t, -F / 2, -S / 2, F, S);
|
|
329
|
-
}
|
|
330
|
-
function De() {
|
|
331
|
-
K.value = !0;
|
|
332
|
-
const e = o.value.getContext("2d"), t = n.value, a = t && t.srcObject && t.srcObject.getTracks(), { aspectRatio: l, width: f, height: g } = a.length && a[0].getSettings(), i = t?.videoWidth || f || X.value, s = t?.videoHeight || g || J.value, v = i && s ? i / s : l, z = T.value || { width: i, height: s }, C = z?.width || i, F = M.value ? z?.height || s : Math.round(C / v), S = C / F;
|
|
333
|
-
if (o.value.width = C, o.value.height = F, !i || !s || !v)
|
|
334
|
-
return;
|
|
335
|
-
const te = Je();
|
|
336
|
-
if (e.save(), te === 90 || te === 270) {
|
|
337
|
-
Qe(e, t, te, i, s), e.restore(), Ee(e, o.value.width, o.value.height), Me(o.value.toDataURL("image/png"));
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
if (te === 180 && (e.translate(o.value.width, o.value.height), e.scale(-1, -1)), B.value && (e.translate(o.value.width, 0), e.scale(-1, 1)), r.enableCropImage) {
|
|
341
|
-
let _ = 0, x = 0, w = i, E = s;
|
|
342
|
-
if (v > S ? (w = s * S, _ = (i - w) / 2) : v < S && (E = i / S, x = (s - E) / 2), d.value && d.value !== 1) {
|
|
343
|
-
const q = w / d.value, Z = E / d.value;
|
|
344
|
-
_ += (w - q) / 2, x += (E - Z) / 2, w = q, E = Z;
|
|
345
|
-
}
|
|
346
|
-
e.drawImage(
|
|
347
|
-
t,
|
|
348
|
-
_,
|
|
349
|
-
x,
|
|
350
|
-
w,
|
|
351
|
-
E,
|
|
352
|
-
0,
|
|
353
|
-
0,
|
|
354
|
-
o.value.width,
|
|
355
|
-
o.value.height
|
|
356
|
-
);
|
|
357
|
-
} else {
|
|
358
|
-
let _ = o.value.width, x = o.value.height, w = 0, E = 0;
|
|
359
|
-
if (v > S ? (x = o.value.width / v, E = (o.value.height - x) / 2) : v < S && (_ = o.value.height * v, w = (o.value.width - _) / 2), d.value && d.value !== 1) {
|
|
360
|
-
const q = i / d.value, Z = s / d.value, et = (i - q) / 2, tt = (s - Z) / 2;
|
|
361
|
-
B.value && (w = o.value.width - w - _), e.drawImage(
|
|
362
|
-
t,
|
|
363
|
-
et,
|
|
364
|
-
tt,
|
|
365
|
-
q,
|
|
366
|
-
Z,
|
|
367
|
-
w,
|
|
368
|
-
E,
|
|
369
|
-
_,
|
|
370
|
-
x
|
|
371
|
-
);
|
|
372
|
-
} else
|
|
373
|
-
B.value && (w = o.value.width - w - _), e.drawImage(
|
|
374
|
-
t,
|
|
375
|
-
0,
|
|
376
|
-
0,
|
|
377
|
-
i,
|
|
378
|
-
s,
|
|
379
|
-
w,
|
|
380
|
-
E,
|
|
381
|
-
_,
|
|
382
|
-
x
|
|
383
|
-
);
|
|
384
|
-
}
|
|
385
|
-
e.restore(), Ee(e, o.value.width, o.value.height);
|
|
386
|
-
const Ye = o.value.toDataURL("image/png");
|
|
387
|
-
Me(Ye);
|
|
388
|
-
}
|
|
389
|
-
function Me(e) {
|
|
390
|
-
const t = ht(e);
|
|
391
|
-
Ae("update:modelValue", {
|
|
392
|
-
name: `cam-pic-${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
393
|
-
id: `cam-pic-${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
394
|
-
blob: t,
|
|
395
|
-
size: t.size
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
return it(async () => {
|
|
399
|
-
await U(), L.value = !0, j.value = r.defaultRearCamera ? "environment" : "user";
|
|
400
|
-
const e = r.defaultRearCamera && I.value.length > 1 ? I.value[I.value.length - 1] : I.value[0];
|
|
401
|
-
if (c.value = e, r.enableAudio && (O.value = ye.value[0]), navigator.mediaDevices.addEventListener("devicechange", async (t) => {
|
|
402
|
-
await U();
|
|
403
|
-
}), window.addEventListener("resize", Se), Ce(), we.value) {
|
|
404
|
-
$ = setTimeout(Q, 3e3);
|
|
405
|
-
const t = window.DeviceOrientationEvent;
|
|
406
|
-
t && typeof t.requestPermission == "function" ? Ve() : le();
|
|
407
|
-
}
|
|
408
|
-
await nt(), fe.value = !0;
|
|
409
|
-
}), ot(() => {
|
|
410
|
-
L.value = !1, K.value = !1, H(), Y(), window.removeEventListener("resize", Se), window.removeEventListener("devicemotion", pe, !0), $ && clearTimeout($), oe();
|
|
411
|
-
}), (e, t) => (y(), b("div", {
|
|
412
|
-
class: de(["camera", je.value])
|
|
413
|
-
}, [
|
|
414
|
-
p("div", wt, [
|
|
415
|
-
ne.value ? R("", !0) : (y(), b("div", pt, [
|
|
416
|
-
ve(ct, { color: "#000" }, {
|
|
417
|
-
default: lt(() => [
|
|
418
|
-
p("span", {
|
|
419
|
-
class: de("d-block text-center"),
|
|
420
|
-
innerHTML: e.$t("camera.waitForCameraNotification")
|
|
421
|
-
}, null, 8, yt)
|
|
422
|
-
]),
|
|
423
|
-
_: 1
|
|
424
|
-
})
|
|
425
|
-
])),
|
|
426
|
-
xe(p("div", {
|
|
427
|
-
class: de(["camera__video-wrapper", M.value ? `aspect-ratio--${M.value}` : ""]),
|
|
428
|
-
style: he({ aspectRatio: He.value || void 0, transform: d.value !== 1 ? `scale(${d.value})` : void 0 })
|
|
429
|
-
}, [
|
|
430
|
-
p("video", {
|
|
431
|
-
ref_key: "camera",
|
|
432
|
-
ref: n,
|
|
433
|
-
class: "camera__video",
|
|
434
|
-
style: he({
|
|
435
|
-
filter: r.filter === "grayscale" ? "grayscale(100%)" : r.filter === "sepia" ? "sepia(100%)" : "none",
|
|
436
|
-
transform: m.correctOrientation && V.value ? "rotate(180deg)" : void 0
|
|
437
|
-
}),
|
|
438
|
-
autoplay: "",
|
|
439
|
-
muted: "",
|
|
440
|
-
playsinline: ""
|
|
441
|
-
}, null, 4),
|
|
442
|
-
m.tintColor ? (y(), b("div", {
|
|
443
|
-
key: 0,
|
|
444
|
-
class: "camera__tint-overlay",
|
|
445
|
-
style: he({
|
|
446
|
-
backgroundColor: m.tintColor,
|
|
447
|
-
opacity: m.tintIntensity,
|
|
448
|
-
mixBlendMode: "multiply"
|
|
449
|
-
})
|
|
450
|
-
}, null, 4)) : R("", !0)
|
|
451
|
-
], 6), [
|
|
452
|
-
[Re, ne.value]
|
|
453
|
-
]),
|
|
454
|
-
xe(p("canvas", {
|
|
455
|
-
ref_key: "canvas",
|
|
456
|
-
ref: o,
|
|
457
|
-
class: "camera__canvas",
|
|
458
|
-
width: X.value,
|
|
459
|
-
height: J.value
|
|
460
|
-
}, null, 8, bt), [
|
|
461
|
-
[Re, K.value]
|
|
462
|
-
]),
|
|
463
|
-
k.value ? (y(), b("div", _t, [
|
|
464
|
-
(y(), b("p", {
|
|
465
|
-
class: "countdown",
|
|
466
|
-
key: k.value,
|
|
467
|
-
innerHTML: k.value,
|
|
468
|
-
"data-countdown": k.value
|
|
469
|
-
}, null, 8, Et))
|
|
470
|
-
])) : R("", !0),
|
|
471
|
-
m.enableGuide && L.value && ne.value ? (y(), b("img", {
|
|
472
|
-
key: 2,
|
|
473
|
-
class: "camera__guide",
|
|
474
|
-
src: m.guideSrc
|
|
475
|
-
}, null, 8, Ct)) : R("", !0),
|
|
476
|
-
m.enableZoomSlider ? (y(), b("div", St, [
|
|
477
|
-
ve(ft, {
|
|
478
|
-
modelValue: d.value,
|
|
479
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) => d.value = a)
|
|
480
|
-
}, null, 8, ["modelValue"])
|
|
481
|
-
])) : R("", !0)
|
|
482
|
-
]),
|
|
483
|
-
p("div", kt, [
|
|
484
|
-
p("div", Dt, [
|
|
485
|
-
p("div", Mt, [
|
|
486
|
-
p("div", It, [
|
|
487
|
-
p("div", xt, [
|
|
488
|
-
p("button", {
|
|
489
|
-
type: "button",
|
|
490
|
-
class: "camera__toggle btn btn-primary",
|
|
491
|
-
onClick: Ke
|
|
492
|
-
}, [
|
|
493
|
-
L.value ? (y(), b("span", Ot, me(e.$t("common.pause")), 1)) : (y(), b("span", Rt, me(e.$t("common.play")), 1))
|
|
494
|
-
]),
|
|
495
|
-
p("button", {
|
|
496
|
-
type: "button",
|
|
497
|
-
class: "camera__capture btn btn-primary",
|
|
498
|
-
onClick: ce
|
|
499
|
-
}, me(e.$t("camera.capture")), 1)
|
|
500
|
-
])
|
|
501
|
-
])
|
|
502
|
-
])
|
|
503
|
-
])
|
|
504
|
-
]),
|
|
505
|
-
(m.enableSwitchCamera || m.enableSelectDevice) && re.value && re.value.length > 1 ? (y(), b("div", Lt, [
|
|
506
|
-
p("div", Tt, [
|
|
507
|
-
m.enableSelectDevice ? (y(), rt(vt, {
|
|
508
|
-
key: 0,
|
|
509
|
-
modelValue: _e.value,
|
|
510
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) => _e.value = a),
|
|
511
|
-
options: We.value,
|
|
512
|
-
class: "w-100"
|
|
513
|
-
}, null, 8, ["modelValue", "options"])) : R("", !0)
|
|
514
|
-
]),
|
|
515
|
-
p("div", At, [
|
|
516
|
-
m.enableSwitchCamera ? (y(), b("button", {
|
|
517
|
-
key: 0,
|
|
518
|
-
class: "btn",
|
|
519
|
-
onClick: st(Xe, ["prevent"])
|
|
520
|
-
}, [
|
|
521
|
-
ve(dt, { symbol: "switch-camera" })
|
|
522
|
-
])) : R("", !0)
|
|
523
|
-
])
|
|
524
|
-
])) : R("", !0)
|
|
525
|
-
], 2));
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
|
-
export {
|
|
529
|
-
Xt as default
|
|
530
|
-
};
|