@globalpayments/vega 2.24.2 → 2.26.0
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/cjs/{app-globals-7e893726.js → app-globals-2bae50fb.js} +2 -2
- package/dist/cjs/{child-nodes-event-prevent-slimmer-176d59ee.js → child-nodes-event-prevent-slimmer-cc557cb3.js} +2 -2
- package/dist/cjs/{child-nodes-notify-observer-slimmer-ce6eb329.js → child-nodes-notify-observer-slimmer-c144a963.js} +1 -1
- package/dist/cjs/{design-token-0d26a52f.js → design-token-2c2cdd7d.js} +1 -1
- package/dist/cjs/{dom-node-subject-observer-factory-92271bc0.js → dom-node-subject-observer-factory-d2698876.js} +19 -1
- package/dist/cjs/{element-appender-slimmer-78fea430.js → element-appender-slimmer-5fa9ff52.js} +1 -1
- package/dist/cjs/{event-emit-slimmer-4fb793e5.js → event-emit-slimmer-54616105.js} +2 -2
- package/dist/cjs/{feature-flag-controller-0e5235e1.js → feature-flag-controller-e031c341.js} +5 -0
- package/dist/cjs/{form-field-controller-slimmer-60346732.js → form-field-controller-slimmer-8b314ba2.js} +3 -3
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/{internal-vega-event-manager-b80fede0.js → internal-vega-event-manager-627b1328.js} +3 -3
- package/dist/cjs/loader.cjs.js +6 -6
- package/dist/cjs/{static-remote-invocation-call-registry-0ac4915d.js → remote-invocation-registry-162044d5.js} +11 -11
- package/dist/cjs/{responsive-format-facade-f7e69718.js → responsive-format-facade-aa849dc7.js} +11 -0
- package/dist/cjs/{static-subject-title-41c88385.js → static-subject-title-35e2a92c.js} +0 -4
- package/dist/cjs/style-formatter-dc0682a4.js +34 -0
- package/dist/cjs/{sub-state-observer-slimmer-60be5379.js → sub-state-observer-slimmer-58217668.js} +2 -2
- package/dist/cjs/synchronize-task-queue-8977cf10.js +41 -0
- package/dist/cjs/vega-accordion.cjs.entry.js +7 -7
- package/dist/cjs/vega-app-header-button.cjs.entry.js +8 -8
- package/dist/cjs/vega-banner.cjs.entry.js +5 -5
- package/dist/cjs/vega-box.cjs.entry.js +4 -19
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-circle.cjs.entry.js +10 -9
- package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-button-link.cjs.entry.js +7 -6
- package/dist/cjs/vega-button.cjs.entry.js +9 -8
- package/dist/cjs/vega-calendar_3.cjs.entry.js +9 -9
- package/dist/cjs/vega-card.cjs.entry.js +2 -2
- package/dist/cjs/vega-carousel.cjs.entry.js +8 -41
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-chip.cjs.entry.js +8 -8
- package/dist/cjs/vega-color-picker.cjs.entry.js +7 -7
- package/dist/cjs/vega-combo-box.cjs.entry.js +9 -9
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -15
- package/dist/cjs/vega-dialog_2.cjs.entry.js +12 -10
- package/dist/cjs/vega-divider.cjs.entry.js +2 -2
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +237 -153
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/{vega-event-id-8aa22611.js → vega-event-id-e40ac8f0.js} +2 -0
- package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
- package/dist/cjs/vega-field-label.cjs.entry.js +74 -13
- package/dist/cjs/vega-file-uploader.cjs.entry.js +120 -41
- package/dist/cjs/vega-flex.cjs.entry.js +12 -5
- package/dist/cjs/vega-font.cjs.entry.js +2 -2
- package/dist/cjs/vega-form.cjs.entry.js +10 -10
- package/dist/cjs/vega-grid.cjs.entry.js +3 -3
- package/dist/cjs/vega-icon.cjs.entry.js +2 -2
- package/dist/cjs/vega-image-uploader.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +9 -9
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +56 -37
- package/dist/cjs/vega-input-range.cjs.entry.js +9 -9
- package/dist/cjs/vega-input-select.cjs.entry.js +10 -10
- package/dist/cjs/vega-input.cjs.entry.js +28 -8
- package/dist/cjs/{vega-internal-event-id-ac20ea74.js → vega-internal-event-id-c98e9a7d.js} +4 -0
- package/dist/cjs/vega-item-toggle.cjs.entry.js +5 -4
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +25 -11
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +6 -6
- package/dist/cjs/vega-popover_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +6 -5
- package/dist/cjs/vega-radio_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-segment-control.cjs.entry.js +5 -4
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-signature-capture.cjs.entry.js +10 -10
- package/dist/cjs/{vega-skeleton-loader-controller-4918bf55.js → vega-skeleton-loader-controller-cb631f0e.js} +1 -1
- package/dist/cjs/vega-stepper.cjs.entry.js +9 -9
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +33 -12
- package/dist/cjs/vega-table_8.cjs.entry.js +21 -21
- package/dist/cjs/vega-text.cjs.entry.js +29 -5
- package/dist/cjs/vega-textarea.cjs.entry.js +9 -9
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +150 -10
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +2 -2
- package/dist/cjs/vega.cjs.js +6 -6
- package/dist/collection/components/vega-box/vega-box.js +2 -17
- package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +1 -1
- package/dist/collection/components/vega-checkbox/vega-checkbox.js +4 -1
- package/dist/collection/components/vega-date-picker/vega-date-picker.js +8 -4
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-remote-invocation-controller.js +54 -0
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-search-controller.js +8 -5
- package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-item-level-renderer.js +5 -5
- package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-search-renderer.js +16 -2
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +6 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +37 -0
- package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.js +50 -0
- package/dist/collection/components/vega-field-label/vega-field-label.css +6 -0
- package/dist/collection/components/vega-field-label/vega-field-label.js +83 -6
- package/dist/collection/components/vega-file-uploader/slimmers/controllers/vega-file-uploader-drop-file-filter-controller.js +51 -0
- package/dist/collection/components/vega-file-uploader/slimmers/controllers/vega-file-uploader-value-controller.js +2 -2
- package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-container-renderer.js +9 -3
- package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +106 -17
- package/dist/collection/components/vega-flex/vega-flex.css +672 -0
- package/dist/collection/components/vega-flex/vega-flex.js +129 -3
- package/dist/collection/components/vega-grid/vega-grid.css +672 -0
- package/dist/collection/components/vega-grid/vega-grid.js +1 -1
- package/dist/collection/components/vega-input/vega-input.js +84 -2
- package/dist/collection/components/vega-input-phone-number/slimmers/controllers/country-select-controller.js +28 -16
- package/dist/collection/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.js +15 -11
- package/dist/collection/components/vega-input-phone-number/slimmers/renderers/country-select-renderer.js +7 -3
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +6 -2
- package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
- package/dist/collection/components/vega-modal/vega-modal.js +8 -3
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.js +14 -1
- package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.css +4 -0
- package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.css +5 -0
- package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.js +1 -1
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-page-index-controller.js +6 -1
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-slider-state-controller.js +20 -4
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-expand-row-controller.js +3 -3
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-row-selection-controller.js +5 -5
- package/dist/collection/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.js +2 -2
- package/dist/collection/components/vega-table/vega-table-row/slimmers/controllers/vega-table-row-click-controller.js +2 -2
- package/dist/collection/components/vega-table/vega-table-row/slimmers/controllers/vega-table-row-expand-controller.js +2 -2
- package/dist/collection/components/vega-table/vega-table-row/slimmers/renderers/vega-table-row-renderer.js +2 -2
- package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +29 -5
- package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.css +42 -0
- package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +189 -6
- package/dist/collection/constants/ui.js +1 -0
- package/dist/collection/helpers/change-manager/subject/dom-node-subject/dom-node-subject-factory.js +19 -1
- package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js +0 -2
- package/dist/collection/helpers/change-manager/test/dom-node-subject-factory.test.js +12 -0
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -3
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +2 -0
- package/dist/collection/helpers/event-manager/test/component-event-id-map.test.js +7 -2
- package/dist/collection/helpers/event-manager/test/vega-event-manager.test.js +2 -1
- package/dist/collection/helpers/feature-control/feature-flags-map.js +5 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-gap-formatter.js +12 -1
- package/dist/collection/helpers/formatter/style-formatter.js +29 -0
- package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-gap-formatter.ts.test.js +10 -0
- package/dist/collection/helpers/formatter/test/style-formatter.test.js +16 -0
- package/dist/collection/helpers/queue/synchronize-task-queue.js +10 -7
- package/dist/collection/helpers/queue/test/synchronize-task-queue.test.js +25 -0
- package/dist/collection/helpers/{change-manager/subject/static-remote-invocation-subject/static-remote-invocation-call-registry.js → remote-invocation/remote-invocation-registry.js} +11 -11
- package/dist/collection/helpers/remote-invocation/remote-invocation-registry.test.js +17 -0
- package/dist/collection/helpers/validator/rules/file-uploader-required-rule.js +1 -1
- package/dist/collection/helpers/validator/rules/toggle-switch-required-rule.js +60 -0
- package/dist/collection/helpers/validator/test/rules/toggle-switch-required-rule.test.js +72 -0
- package/dist/collection/value-model-adapters/angular-ng-model-accessor-adapter.js +1 -0
- package/dist/collection/value-model-adapters/vue-component-v-model-adaptor.js +1 -0
- package/dist/esm/{app-globals-1d66ee80.js → app-globals-b5bc861f.js} +2 -2
- package/dist/esm/{child-nodes-event-prevent-slimmer-d2435342.js → child-nodes-event-prevent-slimmer-d3883004.js} +2 -2
- package/dist/esm/{child-nodes-notify-observer-slimmer-c7b9d3b2.js → child-nodes-notify-observer-slimmer-50cd94b9.js} +2 -2
- package/dist/esm/{design-token-abcaac42.js → design-token-44525832.js} +3 -3
- package/dist/esm/{dom-node-subject-observer-factory-926991a9.js → dom-node-subject-observer-factory-0d4b85b8.js} +19 -1
- package/dist/esm/{element-appender-slimmer-f740e51a.js → element-appender-slimmer-1aa00c06.js} +3 -3
- package/dist/esm/{event-emit-slimmer-79be1c60.js → event-emit-slimmer-0315fa00.js} +2 -2
- package/dist/esm/{feature-flag-controller-9be58397.js → feature-flag-controller-a5fe5022.js} +5 -0
- package/dist/esm/{form-field-controller-slimmer-374541fd.js → form-field-controller-slimmer-bf7441bd.js} +4 -4
- package/dist/esm/index.js +9 -9
- package/dist/esm/{inject-keyboard-manager-d2a96e14.js → inject-keyboard-manager-8a82e8c9.js} +1 -1
- package/dist/esm/{internal-vega-event-manager-c17ae641.js → internal-vega-event-manager-722461c1.js} +3 -3
- package/dist/esm/{keyboard-manager-477122e6.js → keyboard-manager-d1f9ddc1.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-b6072957.js → keyboard-manager-slimmer-8723f20f.js} +1 -1
- package/dist/esm/loader.js +7 -7
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{static-remote-invocation-call-registry-651b0701.js → remote-invocation-registry-cf9c81bb.js} +11 -11
- package/dist/esm/{responsive-format-facade-2fcb7c02.js → responsive-format-facade-4488d609.js} +12 -1
- package/dist/esm/{state-background-color-formatter-0f86292d.js → state-background-color-formatter-de7e6522.js} +1 -1
- package/dist/esm/{static-subject-title-2e153754.js → static-subject-title-2a4d6602.js} +1 -3
- package/dist/esm/{string-input-formatter-slimmer-7170d6b3.js → string-input-formatter-slimmer-633271ed.js} +1 -1
- package/dist/esm/style-formatter-391b4f97.js +32 -0
- package/dist/esm/{sub-state-observer-slimmer-106273ec.js → sub-state-observer-slimmer-46abe492.js} +3 -3
- package/dist/esm/synchronize-task-queue-8f5fbbd9.js +39 -0
- package/dist/esm/{type-guard-4bc3fbf5.js → type-guard-467c9e3e.js} +1 -1
- package/dist/esm/{ui-153f4ae7.js → ui-0132dbb5.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +10 -10
- package/dist/esm/vega-app-header-button.entry.js +11 -11
- package/dist/esm/vega-backdrop.entry.js +1 -1
- package/dist/esm/vega-banner.entry.js +6 -6
- package/dist/esm/vega-box.entry.js +7 -22
- package/dist/esm/vega-breadcrumb.entry.js +7 -7
- package/dist/esm/vega-button-circle.entry.js +12 -11
- package/dist/esm/vega-button-group_2.entry.js +9 -9
- package/dist/esm/vega-button-link.entry.js +7 -6
- package/dist/esm/vega-button.entry.js +10 -9
- package/dist/esm/vega-calendar_3.entry.js +11 -11
- package/dist/esm/vega-card.entry.js +5 -5
- package/dist/esm/vega-carousel.entry.js +8 -41
- package/dist/esm/vega-checkbox_2.entry.js +11 -11
- package/dist/esm/vega-chip.entry.js +11 -11
- package/dist/esm/vega-color-picker.entry.js +8 -8
- package/dist/esm/vega-combo-box.entry.js +13 -13
- package/dist/esm/vega-date-picker_2.entry.js +18 -20
- package/dist/esm/vega-dialog_2.entry.js +15 -13
- package/dist/esm/vega-divider.entry.js +4 -4
- package/dist/esm/vega-dropdown_5.entry.js +241 -157
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-728eb2ac.js → vega-event-id-7465a011.js} +2 -1
- package/dist/esm/vega-field-error.entry.js +1 -1
- package/dist/esm/vega-field-label.entry.js +76 -15
- package/dist/esm/vega-file-uploader.entry.js +120 -41
- package/dist/esm/vega-flex.entry.js +15 -8
- package/dist/esm/vega-font.entry.js +5 -5
- package/dist/esm/vega-form.entry.js +11 -11
- package/dist/esm/vega-grid.entry.js +6 -6
- package/dist/esm/vega-icon.entry.js +5 -5
- package/dist/esm/vega-image-uploader.entry.js +12 -12
- package/dist/esm/vega-input-credit-card.entry.js +10 -10
- package/dist/esm/vega-input-phone-number.entry.js +56 -37
- package/dist/esm/vega-input-range.entry.js +10 -10
- package/dist/esm/vega-input-select.entry.js +12 -12
- package/dist/esm/vega-input.entry.js +31 -11
- package/dist/esm/{vega-internal-event-id-809b4ec8.js → vega-internal-event-id-7e05cf4a.js} +3 -1
- package/dist/esm/vega-item-toggle.entry.js +5 -4
- package/dist/esm/vega-left-nav_5.entry.js +28 -14
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-page-notification_2.entry.js +3 -3
- package/dist/esm/vega-pagination.entry.js +7 -7
- package/dist/esm/vega-popover_2.entry.js +10 -10
- package/dist/esm/vega-progress-tracker.entry.js +6 -5
- package/dist/esm/vega-radio_2.entry.js +13 -13
- package/dist/esm/vega-segment-control.entry.js +5 -4
- package/dist/esm/vega-selection-chip_2.entry.js +13 -13
- package/dist/esm/vega-selection-tile_2.entry.js +12 -12
- package/dist/esm/vega-signature-capture.entry.js +12 -12
- package/dist/esm/{vega-skeleton-loader-controller-987192a1.js → vega-skeleton-loader-controller-74e3d189.js} +2 -2
- package/dist/esm/vega-stepper.entry.js +10 -10
- package/dist/esm/vega-tab-group_2.entry.js +34 -13
- package/dist/esm/vega-table_8.entry.js +23 -23
- package/dist/esm/vega-text.entry.js +30 -6
- package/dist/esm/vega-textarea.entry.js +10 -10
- package/dist/esm/vega-time-picker_2.entry.js +15 -15
- package/dist/esm/vega-toggle-switch.entry.js +150 -10
- package/dist/esm/vega-tooltip_2.entry.js +6 -6
- package/dist/esm/vega.js +7 -7
- package/dist/types/components/vega-app-footer/types.d.ts +7 -0
- package/dist/types/components/vega-app-header-button/types.d.ts +27 -0
- package/dist/types/components/vega-banner/types.d.ts +11 -0
- package/dist/types/components/vega-breadcrumb/types.d.ts +11 -0
- package/dist/types/components/vega-button/types.d.ts +4 -0
- package/dist/types/components/vega-button-circle/types.d.ts +9 -0
- package/dist/types/components/vega-button-group/types.d.ts +21 -0
- package/dist/types/components/vega-calendar/types.d.ts +80 -0
- package/dist/types/components/vega-chart/vega-bar-chart/types.d.ts +4 -0
- package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +2 -0
- package/dist/types/components/vega-chip/types.d.ts +4 -0
- package/dist/types/components/vega-combo-box/types.d.ts +9 -0
- package/dist/types/components/vega-date-picker/types.d.ts +10 -0
- package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +2 -0
- package/dist/types/components/vega-dialog/types.d.ts +14 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-remote-invocation-controller.d.ts +28 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-search-controller.d.ts +2 -0
- package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-item-level-renderer.d.ts +1 -0
- package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-search-renderer.d.ts +1 -0
- package/dist/types/components/vega-dropdown/types.d.ts +23 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-item/types.d.ts +1 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.d.ts +2 -0
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +9 -1
- package/dist/types/components/vega-field-error/types.d.ts +4 -0
- package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.d.ts +27 -0
- package/dist/types/components/vega-field-label/types.d.ts +5 -0
- package/dist/types/components/vega-field-label/vega-field-label.d.ts +26 -3
- package/dist/types/components/vega-file-uploader/slimmers/controllers/vega-file-uploader-drop-file-filter-controller.d.ts +22 -0
- package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-container-renderer.d.ts +2 -1
- package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-file-status-renderer.d.ts +2 -1
- package/dist/types/components/vega-file-uploader/types.d.ts +15 -0
- package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +43 -2
- package/dist/types/components/vega-flex/vega-flex.d.ts +29 -0
- package/dist/types/components/vega-font/types.d.ts +18 -0
- package/dist/types/components/vega-form/types.d.ts +9 -0
- package/dist/types/components/vega-image-uploader/types.d.ts +21 -0
- package/dist/types/components/vega-input/types.d.ts +12 -0
- package/dist/types/components/vega-input/vega-input.d.ts +25 -0
- package/dist/types/components/vega-input-phone-number/slimmers/controllers/country-select-controller.d.ts +14 -9
- package/dist/types/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.d.ts +7 -5
- package/dist/types/components/vega-input-phone-number/slimmers/renderers/country-select-renderer.d.ts +1 -0
- package/dist/types/components/vega-input-phone-number/types.d.ts +13 -0
- package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +2 -1
- package/dist/types/components/vega-input-range/types.d.ts +5 -0
- package/dist/types/components/vega-input-select/types.d.ts +36 -0
- package/dist/types/components/vega-item-toggle/types.d.ts +8 -0
- package/dist/types/components/vega-loading-indicator/types.d.ts +1 -0
- package/dist/types/components/vega-modal/types.d.ts +2 -0
- package/dist/types/components/vega-modal/vega-modal.d.ts +2 -0
- package/dist/types/components/vega-page-notification/types.d.ts +10 -0
- package/dist/types/components/vega-pagination/types.d.ts +1 -0
- package/dist/types/components/vega-segment-control/types.d.ts +8 -0
- package/dist/types/components/vega-signature-capture/types.d.ts +5 -0
- package/dist/types/components/vega-skeleton/interface.d.ts +5 -0
- package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-slider-state-controller.d.ts +8 -3
- package/dist/types/components/vega-tab-group/types.d.ts +12 -0
- package/dist/types/components/vega-table/vega-table-expand-row/types.d.ts +3 -0
- package/dist/types/components/vega-table/vega-table-head/types.d.ts +4 -0
- package/dist/types/components/vega-table/vega-table-head-row/types.d.ts +5 -0
- package/dist/types/components/vega-table/vega-table-row/types.d.ts +7 -0
- package/dist/types/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.d.ts +7 -0
- package/dist/types/components/vega-text/types.d.ts +3 -0
- package/dist/types/components/vega-time-picker/types.d.ts +21 -0
- package/dist/types/components/vega-toggle-switch/vega-toggle-switch.d.ts +42 -1
- package/dist/types/components/vega-virtual-scroll/types.d.ts +14 -0
- package/dist/types/components.d.ts +190 -7
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/helpers/change-manager/subject/dom-node-subject/dom-node-subject-factory.d.ts +9 -0
- package/dist/types/helpers/change-manager/subject/static-subject/static-subject-title.d.ts +0 -2
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +2 -0
- package/dist/types/helpers/feature-control/feature-flag.d.ts +53 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-formatter.d.ts +5 -0
- package/dist/types/helpers/formatter/state-formatter/state-formatter.d.ts +3 -0
- package/dist/types/helpers/formatter/string-formatter/string-format-strategy.d.ts +12 -0
- package/dist/types/helpers/formatter/style-formatter.d.ts +14 -0
- package/dist/types/helpers/icon/interface.d.ts +10 -0
- package/dist/types/helpers/immutable/immutable.d.ts +3 -0
- package/dist/types/helpers/loading-indicator/vega-loader.d.ts +17 -0
- package/dist/types/helpers/notify/vega-notify.d.ts +13 -0
- package/dist/types/helpers/queue/queue.d.ts +4 -0
- package/dist/types/helpers/queue/synchronize-task-queue.d.ts +4 -3
- package/dist/types/helpers/remote-invocation/remote-invocation-registry.d.ts +39 -0
- package/dist/types/helpers/remote-invocation/remote-invocation-registry.test.d.ts +1 -0
- package/dist/types/helpers/skeleton-loader/interface.d.ts +16 -0
- package/dist/types/helpers/slimmers/field-error-ui-controller-strategies/field-error-ui-controller-strategy.d.ts +6 -0
- package/dist/types/helpers/slimmers/types.d.ts +5 -0
- package/dist/types/helpers/theme/theme.d.ts +18 -0
- package/dist/types/helpers/validator/form-validator.d.ts +8 -0
- package/dist/types/helpers/validator/rules/form-field-validation-rule.d.ts +28 -0
- package/dist/types/helpers/validator/rules/toggle-switch-required-rule.d.ts +38 -0
- package/dist/types/helpers/validator/rules/validation-rule.d.ts +9 -0
- package/dist/types/helpers/validator/test/rules/toggle-switch-required-rule.test.d.ts +1 -0
- package/dist/types/helpers/validator/validator.d.ts +8 -0
- package/dist/types/types/components.type.d.ts +192 -0
- package/dist/types/types/general.d.ts +7 -0
- package/dist/types/types/test-polyfill.d.ts +8 -0
- package/dist/types/types/ui.type.d.ts +1 -1
- package/dist/types/types/vega-chart.d.ts +149 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-0134e8c5.js +1 -0
- package/dist/vega/{p-11cbdade.js → p-016045b0.js} +1 -1
- package/dist/vega/{p-09862473.entry.js → p-020baf8d.entry.js} +1 -1
- package/dist/vega/p-0702921a.entry.js +1 -0
- package/dist/vega/{p-8c9a009c.entry.js → p-0f71ffab.entry.js} +1 -1
- package/dist/vega/p-13f2c41c.entry.js +1 -0
- package/dist/vega/{p-dccbe7ee.entry.js → p-16c85ca9.entry.js} +1 -1
- package/dist/vega/p-1878a270.entry.js +1 -0
- package/dist/vega/{p-025ccc18.js → p-191c5c26.js} +1 -1
- package/dist/vega/{p-00cc05ea.js → p-1c1805aa.js} +1 -1
- package/dist/vega/p-1cb8f21a.entry.js +1 -0
- package/dist/vega/{p-9895c8b9.entry.js → p-241bd30d.entry.js} +1 -1
- package/dist/vega/{p-a36db525.entry.js → p-25310239.entry.js} +1 -1
- package/dist/vega/p-2675fb06.entry.js +1 -0
- package/dist/vega/{p-805f70d5.entry.js → p-28b1a294.entry.js} +1 -1
- package/dist/vega/p-29ac203a.js +1 -0
- package/dist/vega/{p-12d5ed36.js → p-2df25c7f.js} +1 -1
- package/dist/vega/{p-7b2e4c94.entry.js → p-396c3e32.entry.js} +1 -1
- package/dist/vega/{p-a163bbf2.entry.js → p-3e1b21ec.entry.js} +1 -1
- package/dist/vega/{p-18e84cc3.entry.js → p-3e6e7fe0.entry.js} +1 -1
- package/dist/vega/p-3f5e44c1.js +1 -0
- package/dist/vega/{p-ad4bd166.js → p-4163c2c2.js} +1 -1
- package/dist/vega/{p-2757e8c3.entry.js → p-41f61205.entry.js} +1 -1
- package/dist/vega/{p-26a7a6ff.entry.js → p-4302b57d.entry.js} +1 -1
- package/dist/vega/p-462a6417.entry.js +1 -0
- package/dist/vega/p-47d106e7.js +1 -0
- package/dist/vega/{p-684579b7.entry.js → p-47ee3c26.entry.js} +1 -1
- package/dist/vega/p-4925ec08.entry.js +1 -0
- package/dist/vega/{p-d417d6a6.entry.js → p-4b29a9c2.entry.js} +1 -1
- package/dist/vega/{p-48b318c4.entry.js → p-4f8ce53e.entry.js} +1 -1
- package/dist/vega/p-5041624e.entry.js +1 -0
- package/dist/vega/p-527fec9b.entry.js +1 -0
- package/dist/vega/p-530f2b72.entry.js +1 -0
- package/dist/vega/{p-3a33d860.js → p-5453f591.js} +1 -1
- package/dist/vega/{p-a45323b9.entry.js → p-54f87b68.entry.js} +1 -1
- package/dist/vega/p-55ccc669.entry.js +1 -0
- package/dist/vega/{p-8d21ddb7.js → p-59a75a4e.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-b52802b5.entry.js → p-5f456ea0.entry.js} +1 -1
- package/dist/vega/p-6168c1e7.js +1 -0
- package/dist/vega/{p-9ddae0f5.entry.js → p-68e87fb4.entry.js} +1 -1
- package/dist/vega/{p-5f2b7ccb.entry.js → p-75c401fe.entry.js} +1 -1
- package/dist/vega/{p-dc24a556.entry.js → p-764be3f6.entry.js} +1 -1
- package/dist/vega/{p-0197e7ec.js → p-770c736e.js} +1 -1
- package/dist/vega/{p-c3ef9d64.js → p-7c316199.js} +1 -1
- package/dist/vega/p-7cbd8367.entry.js +1 -0
- package/dist/vega/{p-bd770a17.entry.js → p-7ff750c0.entry.js} +1 -1
- package/dist/vega/{p-f2314882.entry.js → p-8172bde8.entry.js} +1 -1
- package/dist/vega/{p-3a5145cc.js → p-84fa8466.js} +1 -1
- package/dist/vega/p-8ca2b2a6.js +1 -0
- package/dist/vega/{p-be48508c.js → p-9909e768.js} +1 -1
- package/dist/vega/{p-4826059c.js → p-9f9535d4.js} +1 -1
- package/dist/vega/{p-494bd912.js → p-a1f7484f.js} +1 -1
- package/dist/vega/{p-7a97295d.entry.js → p-a537eaa9.entry.js} +1 -1
- package/dist/vega/p-a73c06f0.js +1 -0
- package/dist/vega/p-a7fdb16a.js +1 -0
- package/dist/vega/{p-2b0642dc.entry.js → p-b34a7f6c.entry.js} +1 -1
- package/dist/vega/p-b441fd2d.entry.js +1 -0
- package/dist/vega/{p-65c55bd3.entry.js → p-b4e92130.entry.js} +1 -1
- package/dist/vega/{p-816c0ad9.entry.js → p-b6ef48be.entry.js} +1 -1
- package/dist/vega/p-b9cb9098.entry.js +1 -0
- package/dist/vega/p-bb491bed.js +1 -0
- package/dist/vega/p-bc5ce560.entry.js +1 -0
- package/dist/vega/{p-cf236fb0.entry.js → p-be893ca7.entry.js} +1 -1
- package/dist/vega/{p-e3bfd4a1.js → p-c093f5d2.js} +1 -1
- package/dist/vega/{p-d50b16d1.js → p-c1dfdc13.js} +1 -1
- package/dist/vega/{p-ae89862d.entry.js → p-c4ebfb95.entry.js} +1 -1
- package/dist/vega/{p-96f5f322.entry.js → p-c6e0ca01.entry.js} +1 -1
- package/dist/vega/p-c946ff64.entry.js +1 -0
- package/dist/vega/{p-0e12b007.entry.js → p-ca656348.entry.js} +1 -1
- package/dist/vega/{p-b01349b0.entry.js → p-d26f7423.entry.js} +1 -1
- package/dist/vega/{p-b2bea27b.entry.js → p-d6893dba.entry.js} +1 -1
- package/dist/vega/p-d9cd543f.entry.js +1 -0
- package/dist/vega/{p-d81f7db0.entry.js → p-d9fc1fff.entry.js} +1 -1
- package/dist/vega/p-e011e457.entry.js +1 -0
- package/dist/vega/p-e4085f89.entry.js +1 -0
- package/dist/vega/p-ea1f50c9.entry.js +1 -0
- package/dist/vega/p-ead1a647.js +1 -0
- package/dist/vega/p-eae4a1c1.js +1 -0
- package/dist/vega/{p-f491581d.entry.js → p-f1a59ae3.entry.js} +1 -1
- package/dist/vega/p-f6fa60f9.entry.js +1 -0
- package/dist/vega/{p-b765896d.entry.js → p-f71aa49e.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +2 -2
- package/dist/collection/helpers/change-manager/test/static-remote-invocation-subject.test.js +0 -14
- package/dist/types/helpers/change-manager/subject/static-remote-invocation-subject/static-remote-invocation-call-registry.d.ts +0 -39
- package/dist/vega/p-133cbd05.entry.js +0 -1
- package/dist/vega/p-17aa1539.entry.js +0 -1
- package/dist/vega/p-1b3a64f7.js +0 -1
- package/dist/vega/p-25fa235b.entry.js +0 -1
- package/dist/vega/p-5ceda06c.entry.js +0 -1
- package/dist/vega/p-604acab8.entry.js +0 -1
- package/dist/vega/p-62ad9511.entry.js +0 -1
- package/dist/vega/p-73acb4f7.entry.js +0 -1
- package/dist/vega/p-76f6f704.entry.js +0 -1
- package/dist/vega/p-781dfe17.entry.js +0 -1
- package/dist/vega/p-8200752c.entry.js +0 -1
- package/dist/vega/p-83a78d32.entry.js +0 -1
- package/dist/vega/p-8b25d84d.js +0 -1
- package/dist/vega/p-8fc66414.entry.js +0 -1
- package/dist/vega/p-981339b3.entry.js +0 -1
- package/dist/vega/p-aa39873f.entry.js +0 -1
- package/dist/vega/p-ad6aafb6.js +0 -1
- package/dist/vega/p-ae3f8fe2.js +0 -1
- package/dist/vega/p-b36887f9.js +0 -1
- package/dist/vega/p-b554d6d9.entry.js +0 -1
- package/dist/vega/p-b8a63b73.js +0 -1
- package/dist/vega/p-b9f4d417.entry.js +0 -1
- package/dist/vega/p-bef39231.entry.js +0 -1
- package/dist/vega/p-c31462a3.entry.js +0 -1
- package/dist/vega/p-d1093d69.entry.js +0 -1
- package/dist/vega/p-d97770c0.js +0 -1
- package/dist/vega/p-da8c63dd.entry.js +0 -1
- package/dist/vega/p-dbc32bd3.js +0 -1
- package/dist/vega/p-eecfad57.js +0 -1
- package/dist/vega/p-fb0c4f80.entry.js +0 -1
- package/style/vega_min.css +0 -1
- /package/dist/types/helpers/{change-manager/test/static-remote-invocation-subject.test.d.ts → formatter/test/style-formatter.test.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as l,V as c,M as d,L as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-61f6167c.js";import{D as m,d as w}from"./p-1b3a64f7.js";import{a as u,e as g,b as x,f as b,g as y,h as k}from"./p-b36887f9.js";import{V as C}from"./p-af26780d.js";import{p as R}from"./p-b5990090.js";import{c as j}from"./p-11cbdade.js";import{C as D}from"./p-025ccc18.js";import{g as E}from"./p-eecfad57.js";import{c as z}from"./p-86194314.js";import{f as I}from"./p-ee68920f.js";import{g as M}from"./p-8b5d3a52.js";import{P as T}from"./p-883a939b.js";import{d as O}from"./p-1bc5b3bc.js";import{C as S}from"./p-2d0d575f.js";import{c as V,S as $}from"./p-ad6aafb6.js";import{s as P}from"./p-6bd5c49b.js";import{p as B}from"./p-12d5ed36.js";import{s as N}from"./p-0197e7ec.js";import{b as L}from"./p-0c667d6a.js";import"./p-66098cf8.js";import"./p-23ec14fe.js";import"./p-6a334573.js";import"./p-d97770c0.js";import"./p-5f377954.js";import"./p-c3ef9d64.js";import"./p-f404aa83.js";import"./p-344ee7cb.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-ad4bd166.js";import"./p-3a0a4d15.js";import"./p-c59042c0.js";var A=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class F extends c{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}A([l()],F.prototype,"switchPanelRenderer",void 0),A([l()],F.prototype,"viewRenderer",void 0);function W(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function H(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}function U(e){return"vega-calendar-event-slot-"+e}var _=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class q extends c{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.currentPeriod.current)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())},this.moreActionMenuClick=e=>{this.moreActionClickEmitter.emit(e.detail)}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch(),this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,u,this.todayButtonClick)}},"Today"),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,u,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,u,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:q.views,size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,g,this.handleViewChange)}})}renderMoreActionMenu(){var t,n;if(null===(n=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===n?void 0:n.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{m.addUniqueObserverToNode(e,x,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:C.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":t=`${e.date} ${W(e.toDate())}, ${e.year}`;break;case"week":{const e=this.currentPeriod.startDate,n=this.currentPeriod.endDate;t=`${e.date} ${W(e.toDate())}${e.year===n.year?"":", "+e.year} - ${n.date} ${W(n.toDate())}, ${n.year}`;break}case"month":t=`${W(e.toDate())}, ${e.year}`}return t}}C.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'},"ellipsis-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/></svg>'}}),q.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],_([l()],q.prototype,"viewMode",void 0),_([l()],q.prototype,"calendarView",void 0),_([l()],q.prototype,"currentPeriod",void 0),_([l()],q.prototype,"moreActionDropdownProps",void 0),_([l()],q.prototype,"moreActionClickEmitter",void 0),_([l()],q.prototype,"currentPeriodController",void 0),_([l()],q.prototype,"calendarViewController",void 0);var K=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Y extends c{render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode}`},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}K([l()],Y.prototype,"viewMode",void 0),K([l()],Y.prototype,"monthViewRenderer",void 0),K([l()],Y.prototype,"viewWithTimeRenderer",void 0);var G=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class J extends c{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},t)))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:!1},key:`${n.month}-${n.date}`,onDblClick:e=>this.handleDateBlockClick(e,n)},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i)))))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},W(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>this.goToCurrentDayView(e,t)},t.date))}goToCurrentDayView(e,t){e.stopPropagation(),this.currentPeriodController.updateCalendarPeriod("day",t)}handleDateBlockClick(e,t){if(this.isMonthBlockBlankArea(e.target)){const{year:e,month:n,date:i}=t;this.dateDblClickEmitter.emit({year:e,month:n,date:i,hour:0})}}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}G([l()],J.prototype,"viewMode",void 0),G([l()],J.prototype,"calendarView",void 0),G([l()],J.prototype,"currentPeriod",void 0),G([l()],J.prototype,"calendarViewController",void 0),G([l()],J.prototype,"currentPeriodController",void 0),G([l()],J.prototype,"monthEventRenderer",void 0),G([l()],J.prototype,"dateDblClickEmitter",void 0);var Q=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class X extends c{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,n[i]),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},"All Day"),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>e("div",{class:"grid-col border-divider-left",key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t))))),this.dayViewTimedEventRenderer.render(),this.timeLineRenderer.renderTimeMarker(t)))}renderHourBlock(t){return Array(24).fill("").map(((n,i)=>e("div",{class:"grid-cell border-divider-top",onDblClick:()=>{this.handleDateBlockClick(t,i)}})))}handleDateBlockClick(e,t){const{year:n,month:i,date:r}=e;this.dateDblClickEmitter.emit({year:n,month:i,date:r,hour:t})}}Q([l()],X.prototype,"viewMode",void 0),Q([l()],X.prototype,"timeLineRenderer",void 0),Q([l()],X.prototype,"dayViewTimedEventRenderer",void 0),Q([l()],X.prototype,"dayViewFullDayEventRenderer",void 0),Q([l()],X.prototype,"calendarView",void 0),Q([l()],X.prototype,"calendarViewController",void 0),Q([l()],X.prototype,"dateDblClickEmitter",void 0);var Z=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ee extends c{renderTimeMarker(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line",ref:e=>this.timeLineRef=e},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(R(t));return e}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{var e,t;const n=(new Date).getHours();null===(t=null===(e=this.timeLineRef)||void 0===e?void 0:e.querySelector(`[data-time='${n<23?n+1:n}']`))||void 0===t||t.scrollIntoView({block:"end"})}),0)}}Z([l()],ee.prototype,"timeFormat",void 0),Z([l()],ee.prototype,"viewMode",void 0),Z([d("watchViewModeChange")],ee.prototype,"updateTimeLine",null),Z([d("disconnectedCallback")],ee.prototype,"clearTimer",null),Z([d("connectedCallback")],ee.prototype,"updateTimeLineIfComponentAddBack",null);const te=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class ne{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=te()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class ie{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class re extends ne{generate(e){return new ie([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class ae{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new ae(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}equal(e){const{year:t,month:n,date:i}=e;return this._year===t&&this._month===n&&this._date===i}}class oe extends ne{generate(e){const t=this.generateDates(e);return new ie(this.generateWeekHead(),[t.map(ae.from)])}}class se extends ne{generate(e){const t=[];let n=[];return this.generateDates(e).forEach(((e,i)=>{i%7||(t[i/7]=n=[]);const r=ae.from(e);n.push(r)})),new ie(this.generateWeekHead(),t)}}class le{constructor(e,t){this._count=e,this._current=t||ae.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}goTo(e){return this.createBy(e)}now(){return this.createBy(ae.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-te().indexOf(t.getDay())),this._startDate=ae.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=ae.from(t)}}class ce extends le{constructor(e){super(ce.DISPLAY_DATE_COUNT,e),this._type="day"}next(){const e=this.current.toDate();return e.setDate(e.getDate()+1),this.createBy(ae.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-1),this.createBy(ae.from(e))}createBy(e){return new ce(e)}}ce.DISPLAY_DATE_COUNT=1;class de extends le{constructor(e){super(de.DISPLAY_DATE_COUNT,e),this._type="week"}next(){const e=this.current.toDate();return e.setDate(e.getDate()-te().indexOf(e.getDay())+7),this.createBy(ae.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-te().indexOf(e.getDay())-7),this.createBy(ae.from(e))}createBy(e){return new de(e)}}de.DISPLAY_DATE_COUNT=7;class he extends le{constructor(e){super(he.DISPLAY_DATE_COUNT,he.getMonthFirstDay(e)),this._type="month"}static getMonthFirstDay(e){const t=e||ae.from(new Date);return new ae(t.year,t.month,1)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(ae.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(ae.from(e))}createBy(e){return new he(e)}}he.DISPLAY_DATE_COUNT=42;var ve=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class pe extends c{constructor(){super(...arguments),this.monthViewGenerator=new se,this.weekViewGenerator=new oe,this.dayViewGenerator=new re}initialCalendarView(){this.setCalendarView(this.getCalendarViewByPeriod(this.currentPeriod))}generateCalendarView(e){this.setCalendarView(this.getCalendarViewByPeriod(e))}getCalendarViewByPeriod(e){switch(e.type){case"week":return this.weekViewGenerator.generate(e);case"day":return this.dayViewGenerator.generate(e);default:return this.monthViewGenerator.generate(e)}}setCalendarView(e){this.calendarView=e}}ve([l({writable:!0})],pe.prototype,"calendarView",void 0),ve([l()],pe.prototype,"currentPeriod",void 0),ve([l()],pe.prototype,"currentPeriodController",void 0),ve([d("componentWillLoad")],pe.prototype,"initialCalendarView",null),ve([d("watchCurrentPeriodChange")],pe.prototype,"generateCalendarView",null);var fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class me extends c{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new he(t));break;case"week":this.setCurrentPeriod(new de(t));break;case"day":this.setCurrentPeriod(new ce(t))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,ae.from(new Date))}emitChangeEvent(e,t){e&&t&&e.startDate.equal(t.startDate)&&e.endDate.equal(t.endDate)||(e&&e.type!==this.viewMode&&(this.viewMode=e.type),this.changeEventEmitter.emit({viewMode:e.type,currentPeriod:this.getCurrentPeriodSummary()}))}updateCurrentPeriodByViewMode(e){this.currentPeriod&&e!==this.currentPeriod.type&&this.updateCalendarPeriod(e,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}}fe([l({writable:!0})],me.prototype,"currentPeriod",void 0),fe([l()],me.prototype,"changeEventEmitter",void 0),fe([l({writable:!0})],me.prototype,"viewMode",void 0),fe([d("componentWillLoad")],me.prototype,"initialCurrentPeriod",null),fe([d("watchCurrentPeriodChange")],me.prototype,"emitChangeEvent",null),fe([d("watchViewModeChange")],me.prototype,"updateCurrentPeriodByViewMode",null);var we=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ue extends c{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${W(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,E,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:z()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}we([l()],ue.prototype,"viewMode",void 0),we([l()],ue.prototype,"host",void 0),we([l()],ue.prototype,"calendarEventController",void 0),we([l()],ue.prototype,"eventItemRenderer",void 0),we([l()],ue.prototype,"fullDayEventLayoutRenderer",void 0),we([d("componentWillLoad")],ue.prototype,"addMaxDisplayCountChange",null);class ge{constructor(e,t,n,i){this.repeatStartDate=e,this.interval=t,this.count=n,this.until=i}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((n=>this.isSeriesInPeriod(n,t,e)))}isSeriesInPeriod(e,t,n){const i=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:a,endDate:o}=n,s=a.toDate(),l=o.toDate();return i>=s&&i<=l||r>=s&&r<=l||i<=s&&r>=l}}ge.daySeconds=864e5;class xe extends ge{constructor(e,t,n,i){super(e,t,n,i),this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate()&&(n=this.getNextRepeatStartDate(n),!("number"==typeof this.count&&this.cache.length>=this.count)););}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=new Date(e.year,e.month-1,e.date+this.interval),n=ae.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}}class be extends ge{constructor(e,t,n,i){super(e,t,n,i),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate()&&(n=this.getNextRepeatStartDate(n),!("number"==typeof this.count&&this.cache.length>=this.count)););}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year,e.month-1+this.interval),n=ae.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e,t){const n=new Date(e,t,this.byMonthDay);return n.getDate()===this.byMonthDay?n:this.getNextStartDate(e,t+1)}}class ye extends ge{constructor(e,t,n,i,r){super(e,t,n,i),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((n=>this.isSeriesInPeriod(n,t,e)))}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t[0].toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n[0].toDate()<e.toDate()&&(n=this.getNextRepeatStartDate(n),!("number"==typeof this.count&&this.getValidCache().length>=this.count)););}}getNextRepeatStartDate(e){const t=this.getNextStartDates(e);if(0===t.length||"number"==typeof this.count&&this.getValidCache().length>=this.count)return null;{const e=t.map((e=>ae.from(e)));return this.cache.push(e),e}}getNextStartDates(e){return e.map((e=>new Date(e.year,e.month-1,e.date+7*this.interval))).filter((e=>!this.until||e<=this.until.toDate()))}initCache(){const e=[],t=this.getCurrentDayIndex(this.repeatStartDate);this.byWeekDay.forEach((n=>{const i=ye.weekDay.indexOf(n)-t,{year:r,month:a,date:o}=this.repeatStartDate,s=ae.from(new Date(r,a-1,o+i));e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>ye.weekDay.indexOf(e)-ye.weekDay.indexOf(t))):[ye.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=I(this.cache.slice(1));return this.cache[0].filter((e=>e.toDate()>=this.repeatStartDate.toDate())).concat(e).slice(0,"number"==typeof this.count?this.count:void 0)}}ye.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class ke extends ge{constructor(e,t,n,i){super(e,t,n,i),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate()&&(n=this.getNextRepeatStartDate(n),!("number"==typeof this.count&&this.cache.length>=this.count)););}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),n=ae.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e){const t=new Date(e,this.matchMonth-1,this.matchDay);return t.getDate()===this.matchDay&&t.getMonth()+1===this.matchMonth?t:this.getNextStartDate(e+1)}initCache(){this.cache=[this.repeatStartDate]}}const Ce=new class{getPattern(e,t){const n=ae.from(e),{frequency:i,interval:r=1,byWeekDay:a,until:o,count:s}=t,l=this.initDate(o);return this.initRepeatPattern(i,n,r<1?1:r,s,l,a)}initDate(e){if(e&&"object"==typeof e)return ae.from(e);if(e&&"string"==typeof e){const[t,n,i]=e.split("/");return new ae(Number(i),Number(t),Number(n))}}initRepeatPattern(e,t,n,i,r,a){switch(e){case"daily":return new xe(t,n,i,r);case"weekly":return new ye(t,n,i,r,a);case"monthly":return new be(t,n,i,r);default:return new ke(t,n,i,r)}}},Re=/^\d{1,2}\/\d{1,2}\/\d{4}/,je=/^\d{1,2}:\d{1,2}/;class De{constructor(e,t){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||M(),this.checkEventRequireField(e),this.initDate(e),this.initEventSpansDays(),this.initRepeatPattern()}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return null!==this.repeatPattern}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}get eventSpansDays(){return this._eventSpansDays}copyTo(e,t){const n=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new De(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:n,startTime:this.startTime,endTime:this.endTime}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=ae.from(t),r=ae.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=e.toDate();return i.toDate()<=a&&r.toDate()>a}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=ae.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!Re.test(n)||i&&"string"==typeof i&&!Re.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!je.test(r)||a&&"string"==typeof a&&!je.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=Ce.getPattern(this._startDate,this._event.repeatOptions))}initEventSpansDays(){const e=ae.from(this.startDate),t=ae.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var Ee=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ze extends c{constructor(){super(...arguments),this.repeatEventMap=new Map}getCurrentDateEvents(e){return this.createRepeatEvents().filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e),this.repeatEventMap.clear()}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new De(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((n=>{n.isRepeatEvent?n.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(n,e))})):e.push(n)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const n=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(n))return this.repeatEventMap.get(n);{const i=e.copyTo(n,t);return this.repeatEventMap.set(n,i),i}}}Ee([l({writable:!0})],ze.prototype,"calendarEvents",void 0),Ee([l()],ze.prototype,"currentPeriod",void 0),Ee([l()],ze.prototype,"events",void 0),Ee([d("watchEventsChange")],ze.prototype,"updateAfterEventChange",null),Ee([d("componentWillLoad")],ze.prototype,"updateWhenComponentWillLoad",null);var Ie=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Me extends c{render(t,n){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:t.eventKey,calendarEvent:t,class:n,onKeyDown:z(),onClick:()=>this.handleEventClick(t)},!t.isRepeatEvent&&e("slot",{name:U(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}Me.backgroundColorModeEventHeight=18,Ie([l()],Me.prototype,"host",void 0),Ie([l()],Me.prototype,"calendarView",void 0),Ie([l()],Me.prototype,"eventClickEmitter",void 0);var Te=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Oe extends T{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=O(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-Oe.monthDateTitleHeight)/Me.backgroundColorModeEventHeight);S.notify(w.getSubject(this.host,E),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}Oe.monthDateTitleHeight=26,Te([l()],Oe.prototype,"host",void 0),Te([l()],Oe.prototype,"monthEventRenderer",void 0),Te([l()],Oe.prototype,"viewMode",void 0),Te([d("componentDidLoad")],Oe.prototype,"updateMaxDisplayCount",null),Te([d("watchViewModeChange")],Oe.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var Se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ve extends c{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n),r=this.filterDisplayEvents(i);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[n],n,i[n])))))}renderCurrentFullDayEvents(n,i,r){const a=n.length*Me.backgroundColorModeEventHeight-2,o=r.slice(n.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i),o>0&&this.dayViewFullDayEventMoreButtonRenderer.render(o))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],n=Ve.maxDisplayEventLength;return e.forEach((e=>{const i=e.length>n?e.slice(0,n):e;t.push(i)})),t}}}Ve.maxDisplayEventLength=2,Se([l()],Ve.prototype,"calendarView",void 0),Se([l()],Ve.prototype,"calendarEventController",void 0),Se([l()],Ve.prototype,"eventItemRenderer",void 0),Se([l()],Ve.prototype,"fullDayEventLayoutRenderer",void 0),Se([l()],Ve.prototype,"showAllEventsInDayOrWeekView",void 0),Se([l()],Ve.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);class $e extends c{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<$e.totalNumberOfCells;s++){const l=i.getEventBySlotIndex(s);l!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=l,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/$e.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/$e.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:null}}}$e.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],$e.prototype,"eventItemRenderer",void 0);class Pe{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Be{get eventLayoutCells(){return this.cells}}class Ne extends Be{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Le{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class Ae extends Le{constructor(){super(...arguments),this.slots=Ae.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[H(t),H(n)]}}Ae.defaultSlots=Array(96).fill(null);class Fe extends Pe{generate(e){const t=[new Ae];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new Ne(t)}createNewLayoutCell(){return new Ae}}class We{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const l=s.filter((e=>e));if(o=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(o),s.length>l.length){const e=o.slice(0,s.length-l.length);o=o.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=H(e.startTime),i=H(t.startTime);return n===i?H(t.endTime)-H(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var He=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ue extends c{constructor(){super(...arguments),this.calendarEventSorter=new We,this.dayViewTimedEventLayoutGenerator=new Fe}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}He([l()],Ue.prototype,"calendarView",void 0),He([l()],Ue.prototype,"calendarEventController",void 0),He([l()],Ue.prototype,"dayViewEventLayoutRenderer",void 0);class _e extends Be{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class qe extends Le{constructor(){super(...arguments),this.slots=qe.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}qe.defaultSlots=Array(7).fill(null);class Ke extends Pe{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[new qe];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new _e(n)}createNewLayoutCell(){return new qe}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ge extends c{constructor(){super(...arguments),this.longEventLayoutGenerator=new Ke,this.calendarEventSorter=new We}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Ge.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let l=!0;const c=this.fullDayEventLayout.getEventRowsIndex(e);if(c>=0){const n=this.fullDayEventLayout.eventLayoutCells[c].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[c].getEventEndIndex(e);n===t?o=i+1:l=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*Me.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:l?"1":"0"}}}Ge.monthViewEventOffsetTop=26,Ye([l()],Ge.prototype,"eventItemRenderer",void 0),Ye([l()],Ge.prototype,"viewMode",void 0),Ye([l()],Ge.prototype,"calendarView",void 0);var Je=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Qe extends c{constructor(){super(...arguments),this.updateShowAllFlag=e=>{e.stopPropagation(),this.showAllEventsInDayOrWeekView=!0}}render(t){if(!this.showAllEventsInDayOrWeekView)return e("div",{tabIndex:0,role:"button",class:"more-button",onKeyDown:z(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}Je([l({writable:!0})],Qe.prototype,"showAllEventsInDayOrWeekView",void 0),Je([d("watchViewModeChange")],Qe.prototype,"resetShowAllFlag",null);var Xe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const Ze=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.vegaDateDblClick=r(this,"vegaDateDblClick",7),this.dateDblClick=r(this,"dateDblClick",7),this.vegaMoreActionClick=r(this,"vegaMoreActionClick",7),this.moreActionClick=r(this,"moreActionClick",7),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new F,this.switchPanelRenderer=new q,this.viewRenderer=new Y,this.monthViewRenderer=new J,this.viewWithTimeRenderer=new X,this.timeLineRenderer=new ee,this.monthEventRenderer=new ue,this.currentPeriodController=new me,this.calendarViewController=new pe,this.dayViewFullDayEventRenderer=new Ve,this.dayViewFullDayEventMoreButtonRenderer=new Qe,this.dayViewTimedEventRenderer=new Ue,this.eventItemRenderer=new Me,this.dayViewEventLayoutRenderer=new $e,this.fullDayEventLayoutRenderer=new Ge,this.calendarEventController=new ze,this.eventResponsiveController=new Oe,this.changeEventEmitter=j(Ze,g),this.eventClickEmitter=j(Ze,b),this.dateDblClickEmitter=j(Ze,y),this.moreActionClickEmitter=j(Ze,k),this.changeEventPrevent=new D([g],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=V(Ze,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=V(Ze,"showEventColorBar","watchShowEventColorBar"),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.showEventColorBar=!0}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"]}}};Xe([f()],Ze.prototype,"globalSlimmer",void 0),Xe([v()],Ze.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Xe([v()],Ze.prototype,"renderer",void 0),Xe([v()],Ze.prototype,"switchPanelRenderer",void 0),Xe([v()],Ze.prototype,"viewRenderer",void 0),Xe([v()],Ze.prototype,"monthViewRenderer",void 0),Xe([v()],Ze.prototype,"viewWithTimeRenderer",void 0),Xe([v()],Ze.prototype,"timeLineRenderer",void 0),Xe([v()],Ze.prototype,"monthEventRenderer",void 0),Xe([v()],Ze.prototype,"currentPeriodController",void 0),Xe([v()],Ze.prototype,"calendarViewController",void 0),Xe([v()],Ze.prototype,"dayViewFullDayEventRenderer",void 0),Xe([v()],Ze.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),Xe([v()],Ze.prototype,"dayViewTimedEventRenderer",void 0),Xe([v()],Ze.prototype,"eventItemRenderer",void 0),Xe([v()],Ze.prototype,"dayViewEventLayoutRenderer",void 0),Xe([v()],Ze.prototype,"fullDayEventLayoutRenderer",void 0),Xe([v()],Ze.prototype,"calendarEventController",void 0),Xe([v()],Ze.prototype,"eventResponsiveController",void 0),Xe([v()],Ze.prototype,"changeEventEmitter",void 0),Xe([v()],Ze.prototype,"eventClickEmitter",void 0),Xe([v()],Ze.prototype,"dateDblClickEmitter",void 0),Xe([v()],Ze.prototype,"moreActionClickEmitter",void 0),Xe([v()],Ze.prototype,"changeEventPrevent",void 0),Xe([v()],Ze.prototype,"timeFormatNotifySlimmer",void 0),Xe([v()],Ze.prototype,"showEventColorBarNotifySlimmer",void 0),Ze.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .calendar-view-event-all .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px;margin-left:2px;padding:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-container .calendar-view-event-all .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all .event-all-col{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}.calendar-event-slot-container{display:none}';var et=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class tt extends c{getEventTitleContainerRef(){return this.eventTitleContainerRef}getSlotContainerRef(){return this.slotContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEventRender())}calendarEventRender(){return this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent()}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"slot-container":this.slotMode,"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t},ref:e=>this.slotContainerRef=e},this.slotMode?this.getSlotElement():this.calendarEvent.title)}renderNormalEvent(){const{variant:t="primary",disabled:n}=this.calendarEvent,i=!this.host.classList.contains("day-event"),r={"slot-container":this.slotMode,"event-container":!0,disabled:n,[t]:!0};if(i)return e("div",{role:"button",tabIndex:0,class:r,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),this.slotMode?this.getSlotElement():this.defaultNormalMonthEventContentRender());{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},r),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),e("div",{class:"cover-block"}),this.slotMode?this.getSlotElement():this.defaultNormalTimedEventContentRender(t))}}renderEventStatus(){if(this.showColorBar){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}}defaultNormalMonthEventContentRender(){const{startTime:t,title:n}=this.calendarEvent;return e("div",{class:"event-title"},`${this.formatDisplayTime(t)} ${n}`)}defaultNormalTimedEventContentRender(t){const{startTime:n,endTime:i,title:r}=this.calendarEvent;return e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},r),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:C.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(n)} - ${this.formatDisplayTime(i)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}C.register({"clock-three":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),et([l()],tt.prototype,"host",void 0),et([l()],tt.prototype,"timeFormat",void 0),et([l()],tt.prototype,"calendarEvent",void 0),et([l()],tt.prototype,"slotMode",void 0),et([l()],tt.prototype,"showColorBar",void 0),et([l()],tt.prototype,"colorController",void 0);class nt extends c{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return B(e)?`.event-bg-color{${N.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],nt.prototype,"calendarEvent",void 0);var it=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class rt extends ${constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}it([l({writable:!0})],rt.prototype,"timeFormat",void 0),it([l({writable:!0})],rt.prototype,"showColorBar",void 0);class at extends c{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=L(t.height),i=L(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],at.prototype,"renderer",void 0);var ot=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class st extends c{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const n=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);n&&(this.slotMode=!0,this.matchSlotElement=n)}}}appendTheRepeatEventSlotToContainer(){const e=this.renderer.getSlotContainerRef();if(this.slotMode&&e&&this.matchSlotElement&&(this.calendarEvent.isRepeatEvent||this.isPopoverContent())){const t=this.matchSlotElement.cloneNode(!0);t.removeAttribute("slot"),e.querySelector("vega-calendar-event-slot")||e.appendChild(t)}}getParentCalendarElement(){return this.host["data-calendar-ref"]}isPopoverContent(){return this.host.classList.contains("calendar-event-in-popover")}}ot([l()],st.prototype,"host",void 0),ot([l()],st.prototype,"calendarEvent",void 0),ot([l({writable:!0})],st.prototype,"slotMode",void 0),ot([l()],st.prototype,"renderer",void 0),ot([d("componentWillLoad")],st.prototype,"findTheCalendarEventSlot",null),ot([d("componentDidLoad")],st.prototype,"appendTheRepeatEventSlotToContainer",null);var lt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const ct=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new T({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new tt,this.colorController=new nt,this.slotController=new st,this.subStateController=new rt,this.titleMaxHeightController=new at,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return P(e("slot",null)),s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};lt([f()],ct.prototype,"globalSlimmer",void 0),lt([v()],ct.prototype,"pageResizeObserverSlimmer",void 0),lt([v()],ct.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),lt([v()],ct.prototype,"renderer",void 0),lt([v()],ct.prototype,"colorController",void 0),lt([v()],ct.prototype,"slotController",void 0),lt([v()],ct.prototype,"subStateController",void 0),lt([v()],ct.prototype,"titleMaxHeightController",void 0),ct.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .background-color-mode:not(.slot-container){padding-left:8px;padding-right:8px}:host .background-color-mode:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host .background-color-mode.slot-container{height:16px;line-height:16px}:host ::slotted(vega-calendar-event-slot){position:relative;pointer-events:none}:host(.month-event) .event-container{display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container:not(.slot-container){padding-left:2px;padding-right:2px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{position:relative}:host(.day-event) .event-container:not(.slot-container){padding-left:8px;padding-right:8px}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .slot-container{min-height:16px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px}:host(.month-event.calendar-event-large-size) .background-color-mode:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .slot-container{height:24px;display:flex;align-items:center;line-height:24px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';var dt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const ht=class{constructor(e){i(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(a,{slot:U(this.eventKey)},e("slot",null)),this.host)}get host(){return o(this)}};dt([f()],ht.prototype,"globalSlimmer",void 0),dt([v()],ht.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ht.style=":host{width:100%;height:100%;position:relative}";export{Ze as vega_calendar,ct as vega_calendar_event,ht as vega_calendar_event_slot}
|
|
1
|
+
import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as l,V as c,M as d,L as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-61f6167c.js";import{D as m,d as w}from"./p-eae4a1c1.js";import{a as u,e as g,b as x,f as b,g as y,h as k}from"./p-3f5e44c1.js";import{V as C}from"./p-af26780d.js";import{p as R}from"./p-b5990090.js";import{c as j}from"./p-016045b0.js";import{C as D}from"./p-191c5c26.js";import{i as E}from"./p-6168c1e7.js";import{c as z}from"./p-86194314.js";import{f as I}from"./p-ee68920f.js";import{g as M}from"./p-8b5d3a52.js";import{P as T}from"./p-883a939b.js";import{d as O}from"./p-1bc5b3bc.js";import{C as S}from"./p-2d0d575f.js";import{c as V,S as $}from"./p-0134e8c5.js";import{s as P}from"./p-6bd5c49b.js";import{p as B}from"./p-2df25c7f.js";import{s as N}from"./p-770c736e.js";import{b as L}from"./p-0c667d6a.js";import"./p-4163c2c2.js";import"./p-66098cf8.js";import"./p-23ec14fe.js";import"./p-6a334573.js";import"./p-ead1a647.js";import"./p-5f377954.js";import"./p-7c316199.js";import"./p-f404aa83.js";import"./p-344ee7cb.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-3a0a4d15.js";import"./p-c59042c0.js";var A=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class F extends c{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}A([l()],F.prototype,"switchPanelRenderer",void 0),A([l()],F.prototype,"viewRenderer",void 0);function W(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function H(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}function U(e){return"vega-calendar-event-slot-"+e}var _=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class q extends c{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.currentPeriod.current)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())},this.moreActionMenuClick=e=>{this.moreActionClickEmitter.emit(e.detail)}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch(),this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,u,this.todayButtonClick)}},"Today"),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,u,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,u,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:q.views,size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,g,this.handleViewChange)}})}renderMoreActionMenu(){var t,n;if(null===(n=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===n?void 0:n.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{m.addUniqueObserverToNode(e,x,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:C.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":t=`${e.date} ${W(e.toDate())}, ${e.year}`;break;case"week":{const e=this.currentPeriod.startDate,n=this.currentPeriod.endDate;t=`${e.date} ${W(e.toDate())}${e.year===n.year?"":", "+e.year} - ${n.date} ${W(n.toDate())}, ${n.year}`;break}case"month":t=`${W(e.toDate())}, ${e.year}`}return t}}C.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'},"ellipsis-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/></svg>'}}),q.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],_([l()],q.prototype,"viewMode",void 0),_([l()],q.prototype,"calendarView",void 0),_([l()],q.prototype,"currentPeriod",void 0),_([l()],q.prototype,"moreActionDropdownProps",void 0),_([l()],q.prototype,"moreActionClickEmitter",void 0),_([l()],q.prototype,"currentPeriodController",void 0),_([l()],q.prototype,"calendarViewController",void 0);var K=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Y extends c{render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode}`},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}K([l()],Y.prototype,"viewMode",void 0),K([l()],Y.prototype,"monthViewRenderer",void 0),K([l()],Y.prototype,"viewWithTimeRenderer",void 0);var G=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class J extends c{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},t)))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:!1},key:`${n.month}-${n.date}`,onDblClick:e=>this.handleDateBlockClick(e,n)},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i)))))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},W(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>this.goToCurrentDayView(e,t)},t.date))}goToCurrentDayView(e,t){e.stopPropagation(),this.currentPeriodController.updateCalendarPeriod("day",t)}handleDateBlockClick(e,t){if(this.isMonthBlockBlankArea(e.target)){const{year:e,month:n,date:i}=t;this.dateDblClickEmitter.emit({year:e,month:n,date:i,hour:0})}}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}G([l()],J.prototype,"viewMode",void 0),G([l()],J.prototype,"calendarView",void 0),G([l()],J.prototype,"currentPeriod",void 0),G([l()],J.prototype,"calendarViewController",void 0),G([l()],J.prototype,"currentPeriodController",void 0),G([l()],J.prototype,"monthEventRenderer",void 0),G([l()],J.prototype,"dateDblClickEmitter",void 0);var Q=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class X extends c{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,n[i]),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},"All Day"),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>e("div",{class:"grid-col border-divider-left",key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t))))),this.dayViewTimedEventRenderer.render(),this.timeLineRenderer.renderTimeMarker(t)))}renderHourBlock(t){return Array(24).fill("").map(((n,i)=>e("div",{class:"grid-cell border-divider-top",onDblClick:()=>{this.handleDateBlockClick(t,i)}})))}handleDateBlockClick(e,t){const{year:n,month:i,date:r}=e;this.dateDblClickEmitter.emit({year:n,month:i,date:r,hour:t})}}Q([l()],X.prototype,"viewMode",void 0),Q([l()],X.prototype,"timeLineRenderer",void 0),Q([l()],X.prototype,"dayViewTimedEventRenderer",void 0),Q([l()],X.prototype,"dayViewFullDayEventRenderer",void 0),Q([l()],X.prototype,"calendarView",void 0),Q([l()],X.prototype,"calendarViewController",void 0),Q([l()],X.prototype,"dateDblClickEmitter",void 0);var Z=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ee extends c{renderTimeMarker(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line",ref:e=>this.timeLineRef=e},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(R(t));return e}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{var e,t;const n=(new Date).getHours();null===(t=null===(e=this.timeLineRef)||void 0===e?void 0:e.querySelector(`[data-time='${n<23?n+1:n}']`))||void 0===t||t.scrollIntoView({block:"end"})}),0)}}Z([l()],ee.prototype,"timeFormat",void 0),Z([l()],ee.prototype,"viewMode",void 0),Z([d("watchViewModeChange")],ee.prototype,"updateTimeLine",null),Z([d("disconnectedCallback")],ee.prototype,"clearTimer",null),Z([d("connectedCallback")],ee.prototype,"updateTimeLineIfComponentAddBack",null);const te=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class ne{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=te()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class ie{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class re extends ne{generate(e){return new ie([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class ae{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new ae(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}equal(e){const{year:t,month:n,date:i}=e;return this._year===t&&this._month===n&&this._date===i}}class oe extends ne{generate(e){const t=this.generateDates(e);return new ie(this.generateWeekHead(),[t.map(ae.from)])}}class se extends ne{generate(e){const t=[];let n=[];return this.generateDates(e).forEach(((e,i)=>{i%7||(t[i/7]=n=[]);const r=ae.from(e);n.push(r)})),new ie(this.generateWeekHead(),t)}}class le{constructor(e,t){this._count=e,this._current=t||ae.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}goTo(e){return this.createBy(e)}now(){return this.createBy(ae.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-te().indexOf(t.getDay())),this._startDate=ae.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=ae.from(t)}}class ce extends le{constructor(e){super(ce.DISPLAY_DATE_COUNT,e),this._type="day"}next(){const e=this.current.toDate();return e.setDate(e.getDate()+1),this.createBy(ae.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-1),this.createBy(ae.from(e))}createBy(e){return new ce(e)}}ce.DISPLAY_DATE_COUNT=1;class de extends le{constructor(e){super(de.DISPLAY_DATE_COUNT,e),this._type="week"}next(){const e=this.current.toDate();return e.setDate(e.getDate()-te().indexOf(e.getDay())+7),this.createBy(ae.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-te().indexOf(e.getDay())-7),this.createBy(ae.from(e))}createBy(e){return new de(e)}}de.DISPLAY_DATE_COUNT=7;class he extends le{constructor(e){super(he.DISPLAY_DATE_COUNT,he.getMonthFirstDay(e)),this._type="month"}static getMonthFirstDay(e){const t=e||ae.from(new Date);return new ae(t.year,t.month,1)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(ae.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(ae.from(e))}createBy(e){return new he(e)}}he.DISPLAY_DATE_COUNT=42;var ve=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class pe extends c{constructor(){super(...arguments),this.monthViewGenerator=new se,this.weekViewGenerator=new oe,this.dayViewGenerator=new re}initialCalendarView(){this.setCalendarView(this.getCalendarViewByPeriod(this.currentPeriod))}generateCalendarView(e){this.setCalendarView(this.getCalendarViewByPeriod(e))}getCalendarViewByPeriod(e){switch(e.type){case"week":return this.weekViewGenerator.generate(e);case"day":return this.dayViewGenerator.generate(e);default:return this.monthViewGenerator.generate(e)}}setCalendarView(e){this.calendarView=e}}ve([l({writable:!0})],pe.prototype,"calendarView",void 0),ve([l()],pe.prototype,"currentPeriod",void 0),ve([l()],pe.prototype,"currentPeriodController",void 0),ve([d("componentWillLoad")],pe.prototype,"initialCalendarView",null),ve([d("watchCurrentPeriodChange")],pe.prototype,"generateCalendarView",null);var fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class me extends c{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new he(t));break;case"week":this.setCurrentPeriod(new de(t));break;case"day":this.setCurrentPeriod(new ce(t))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,ae.from(new Date))}emitChangeEvent(e,t){e&&t&&e.startDate.equal(t.startDate)&&e.endDate.equal(t.endDate)||(e&&e.type!==this.viewMode&&(this.viewMode=e.type),this.changeEventEmitter.emit({viewMode:e.type,currentPeriod:this.getCurrentPeriodSummary()}))}updateCurrentPeriodByViewMode(e){this.currentPeriod&&e!==this.currentPeriod.type&&this.updateCalendarPeriod(e,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}}fe([l({writable:!0})],me.prototype,"currentPeriod",void 0),fe([l()],me.prototype,"changeEventEmitter",void 0),fe([l({writable:!0})],me.prototype,"viewMode",void 0),fe([d("componentWillLoad")],me.prototype,"initialCurrentPeriod",null),fe([d("watchCurrentPeriodChange")],me.prototype,"emitChangeEvent",null),fe([d("watchViewModeChange")],me.prototype,"updateCurrentPeriodByViewMode",null);var we=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ue extends c{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${W(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,E,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:z()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}we([l()],ue.prototype,"viewMode",void 0),we([l()],ue.prototype,"host",void 0),we([l()],ue.prototype,"calendarEventController",void 0),we([l()],ue.prototype,"eventItemRenderer",void 0),we([l()],ue.prototype,"fullDayEventLayoutRenderer",void 0),we([d("componentWillLoad")],ue.prototype,"addMaxDisplayCountChange",null);class ge{constructor(e,t,n,i){this.repeatStartDate=e,this.interval=t,this.count=n,this.until=i}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((n=>this.isSeriesInPeriod(n,t,e)))}isSeriesInPeriod(e,t,n){const i=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:a,endDate:o}=n,s=a.toDate(),l=o.toDate();return i>=s&&i<=l||r>=s&&r<=l||i<=s&&r>=l}}ge.daySeconds=864e5;class xe extends ge{constructor(e,t,n,i){super(e,t,n,i),this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate()&&(n=this.getNextRepeatStartDate(n),!("number"==typeof this.count&&this.cache.length>=this.count)););}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=new Date(e.year,e.month-1,e.date+this.interval),n=ae.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}}class be extends ge{constructor(e,t,n,i){super(e,t,n,i),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate()&&(n=this.getNextRepeatStartDate(n),!("number"==typeof this.count&&this.cache.length>=this.count)););}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year,e.month-1+this.interval),n=ae.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e,t){const n=new Date(e,t,this.byMonthDay);return n.getDate()===this.byMonthDay?n:this.getNextStartDate(e,t+1)}}class ye extends ge{constructor(e,t,n,i,r){super(e,t,n,i),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((n=>this.isSeriesInPeriod(n,t,e)))}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t[0].toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n[0].toDate()<e.toDate()&&(n=this.getNextRepeatStartDate(n),!("number"==typeof this.count&&this.getValidCache().length>=this.count)););}}getNextRepeatStartDate(e){const t=this.getNextStartDates(e);if(0===t.length||"number"==typeof this.count&&this.getValidCache().length>=this.count)return null;{const e=t.map((e=>ae.from(e)));return this.cache.push(e),e}}getNextStartDates(e){return e.map((e=>new Date(e.year,e.month-1,e.date+7*this.interval))).filter((e=>!this.until||e<=this.until.toDate()))}initCache(){const e=[],t=this.getCurrentDayIndex(this.repeatStartDate);this.byWeekDay.forEach((n=>{const i=ye.weekDay.indexOf(n)-t,{year:r,month:a,date:o}=this.repeatStartDate,s=ae.from(new Date(r,a-1,o+i));e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>ye.weekDay.indexOf(e)-ye.weekDay.indexOf(t))):[ye.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=I(this.cache.slice(1));return this.cache[0].filter((e=>e.toDate()>=this.repeatStartDate.toDate())).concat(e).slice(0,"number"==typeof this.count?this.count:void 0)}}ye.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class ke extends ge{constructor(e,t,n,i){super(e,t,n,i),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate()&&(n=this.getNextRepeatStartDate(n),!("number"==typeof this.count&&this.cache.length>=this.count)););}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),n=ae.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e){const t=new Date(e,this.matchMonth-1,this.matchDay);return t.getDate()===this.matchDay&&t.getMonth()+1===this.matchMonth?t:this.getNextStartDate(e+1)}initCache(){this.cache=[this.repeatStartDate]}}const Ce=new class{getPattern(e,t){const n=ae.from(e),{frequency:i,interval:r=1,byWeekDay:a,until:o,count:s}=t,l=this.initDate(o);return this.initRepeatPattern(i,n,r<1?1:r,s,l,a)}initDate(e){if(e&&"object"==typeof e)return ae.from(e);if(e&&"string"==typeof e){const[t,n,i]=e.split("/");return new ae(Number(i),Number(t),Number(n))}}initRepeatPattern(e,t,n,i,r,a){switch(e){case"daily":return new xe(t,n,i,r);case"weekly":return new ye(t,n,i,r,a);case"monthly":return new be(t,n,i,r);default:return new ke(t,n,i,r)}}},Re=/^\d{1,2}\/\d{1,2}\/\d{4}/,je=/^\d{1,2}:\d{1,2}/;class De{constructor(e,t){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||M(),this.checkEventRequireField(e),this.initDate(e),this.initEventSpansDays(),this.initRepeatPattern()}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return null!==this.repeatPattern}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}get eventSpansDays(){return this._eventSpansDays}copyTo(e,t){const n=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new De(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:n,startTime:this.startTime,endTime:this.endTime}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=ae.from(t),r=ae.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=e.toDate();return i.toDate()<=a&&r.toDate()>a}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=ae.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!Re.test(n)||i&&"string"==typeof i&&!Re.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!je.test(r)||a&&"string"==typeof a&&!je.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=Ce.getPattern(this._startDate,this._event.repeatOptions))}initEventSpansDays(){const e=ae.from(this.startDate),t=ae.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var Ee=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ze extends c{constructor(){super(...arguments),this.repeatEventMap=new Map}getCurrentDateEvents(e){return this.createRepeatEvents().filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e),this.repeatEventMap.clear()}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new De(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((n=>{n.isRepeatEvent?n.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(n,e))})):e.push(n)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const n=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(n))return this.repeatEventMap.get(n);{const i=e.copyTo(n,t);return this.repeatEventMap.set(n,i),i}}}Ee([l({writable:!0})],ze.prototype,"calendarEvents",void 0),Ee([l()],ze.prototype,"currentPeriod",void 0),Ee([l()],ze.prototype,"events",void 0),Ee([d("watchEventsChange")],ze.prototype,"updateAfterEventChange",null),Ee([d("componentWillLoad")],ze.prototype,"updateWhenComponentWillLoad",null);var Ie=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Me extends c{render(t,n){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:t.eventKey,calendarEvent:t,class:n,onKeyDown:z(),onClick:()=>this.handleEventClick(t)},!t.isRepeatEvent&&e("slot",{name:U(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}Me.backgroundColorModeEventHeight=18,Ie([l()],Me.prototype,"host",void 0),Ie([l()],Me.prototype,"calendarView",void 0),Ie([l()],Me.prototype,"eventClickEmitter",void 0);var Te=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Oe extends T{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=O(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-Oe.monthDateTitleHeight)/Me.backgroundColorModeEventHeight);S.notify(w.getSubject(this.host,E),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}Oe.monthDateTitleHeight=26,Te([l()],Oe.prototype,"host",void 0),Te([l()],Oe.prototype,"monthEventRenderer",void 0),Te([l()],Oe.prototype,"viewMode",void 0),Te([d("componentDidLoad")],Oe.prototype,"updateMaxDisplayCount",null),Te([d("watchViewModeChange")],Oe.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var Se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ve extends c{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n),r=this.filterDisplayEvents(i);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[n],n,i[n])))))}renderCurrentFullDayEvents(n,i,r){const a=n.length*Me.backgroundColorModeEventHeight-2,o=r.slice(n.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i),o>0&&this.dayViewFullDayEventMoreButtonRenderer.render(o))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],n=Ve.maxDisplayEventLength;return e.forEach((e=>{const i=e.length>n?e.slice(0,n):e;t.push(i)})),t}}}Ve.maxDisplayEventLength=2,Se([l()],Ve.prototype,"calendarView",void 0),Se([l()],Ve.prototype,"calendarEventController",void 0),Se([l()],Ve.prototype,"eventItemRenderer",void 0),Se([l()],Ve.prototype,"fullDayEventLayoutRenderer",void 0),Se([l()],Ve.prototype,"showAllEventsInDayOrWeekView",void 0),Se([l()],Ve.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);class $e extends c{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<$e.totalNumberOfCells;s++){const l=i.getEventBySlotIndex(s);l!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=l,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/$e.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/$e.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:null}}}$e.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],$e.prototype,"eventItemRenderer",void 0);class Pe{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Be{get eventLayoutCells(){return this.cells}}class Ne extends Be{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Le{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class Ae extends Le{constructor(){super(...arguments),this.slots=Ae.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[H(t),H(n)]}}Ae.defaultSlots=Array(96).fill(null);class Fe extends Pe{generate(e){const t=[new Ae];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new Ne(t)}createNewLayoutCell(){return new Ae}}class We{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const l=s.filter((e=>e));if(o=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(o),s.length>l.length){const e=o.slice(0,s.length-l.length);o=o.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=H(e.startTime),i=H(t.startTime);return n===i?H(t.endTime)-H(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var He=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ue extends c{constructor(){super(...arguments),this.calendarEventSorter=new We,this.dayViewTimedEventLayoutGenerator=new Fe}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}He([l()],Ue.prototype,"calendarView",void 0),He([l()],Ue.prototype,"calendarEventController",void 0),He([l()],Ue.prototype,"dayViewEventLayoutRenderer",void 0);class _e extends Be{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class qe extends Le{constructor(){super(...arguments),this.slots=qe.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}qe.defaultSlots=Array(7).fill(null);class Ke extends Pe{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[new qe];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new _e(n)}createNewLayoutCell(){return new qe}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ge extends c{constructor(){super(...arguments),this.longEventLayoutGenerator=new Ke,this.calendarEventSorter=new We}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Ge.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let l=!0;const c=this.fullDayEventLayout.getEventRowsIndex(e);if(c>=0){const n=this.fullDayEventLayout.eventLayoutCells[c].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[c].getEventEndIndex(e);n===t?o=i+1:l=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*Me.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:l?"1":"0"}}}Ge.monthViewEventOffsetTop=26,Ye([l()],Ge.prototype,"eventItemRenderer",void 0),Ye([l()],Ge.prototype,"viewMode",void 0),Ye([l()],Ge.prototype,"calendarView",void 0);var Je=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Qe extends c{constructor(){super(...arguments),this.updateShowAllFlag=e=>{e.stopPropagation(),this.showAllEventsInDayOrWeekView=!0}}render(t){if(!this.showAllEventsInDayOrWeekView)return e("div",{tabIndex:0,role:"button",class:"more-button",onKeyDown:z(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}Je([l({writable:!0})],Qe.prototype,"showAllEventsInDayOrWeekView",void 0),Je([d("watchViewModeChange")],Qe.prototype,"resetShowAllFlag",null);var Xe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const Ze=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.vegaDateDblClick=r(this,"vegaDateDblClick",7),this.dateDblClick=r(this,"dateDblClick",7),this.vegaMoreActionClick=r(this,"vegaMoreActionClick",7),this.moreActionClick=r(this,"moreActionClick",7),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new F,this.switchPanelRenderer=new q,this.viewRenderer=new Y,this.monthViewRenderer=new J,this.viewWithTimeRenderer=new X,this.timeLineRenderer=new ee,this.monthEventRenderer=new ue,this.currentPeriodController=new me,this.calendarViewController=new pe,this.dayViewFullDayEventRenderer=new Ve,this.dayViewFullDayEventMoreButtonRenderer=new Qe,this.dayViewTimedEventRenderer=new Ue,this.eventItemRenderer=new Me,this.dayViewEventLayoutRenderer=new $e,this.fullDayEventLayoutRenderer=new Ge,this.calendarEventController=new ze,this.eventResponsiveController=new Oe,this.changeEventEmitter=j(Ze,g),this.eventClickEmitter=j(Ze,b),this.dateDblClickEmitter=j(Ze,y),this.moreActionClickEmitter=j(Ze,k),this.changeEventPrevent=new D([g],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=V(Ze,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=V(Ze,"showEventColorBar","watchShowEventColorBar"),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.showEventColorBar=!0}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"]}}};Xe([f()],Ze.prototype,"globalSlimmer",void 0),Xe([v()],Ze.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Xe([v()],Ze.prototype,"renderer",void 0),Xe([v()],Ze.prototype,"switchPanelRenderer",void 0),Xe([v()],Ze.prototype,"viewRenderer",void 0),Xe([v()],Ze.prototype,"monthViewRenderer",void 0),Xe([v()],Ze.prototype,"viewWithTimeRenderer",void 0),Xe([v()],Ze.prototype,"timeLineRenderer",void 0),Xe([v()],Ze.prototype,"monthEventRenderer",void 0),Xe([v()],Ze.prototype,"currentPeriodController",void 0),Xe([v()],Ze.prototype,"calendarViewController",void 0),Xe([v()],Ze.prototype,"dayViewFullDayEventRenderer",void 0),Xe([v()],Ze.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),Xe([v()],Ze.prototype,"dayViewTimedEventRenderer",void 0),Xe([v()],Ze.prototype,"eventItemRenderer",void 0),Xe([v()],Ze.prototype,"dayViewEventLayoutRenderer",void 0),Xe([v()],Ze.prototype,"fullDayEventLayoutRenderer",void 0),Xe([v()],Ze.prototype,"calendarEventController",void 0),Xe([v()],Ze.prototype,"eventResponsiveController",void 0),Xe([v()],Ze.prototype,"changeEventEmitter",void 0),Xe([v()],Ze.prototype,"eventClickEmitter",void 0),Xe([v()],Ze.prototype,"dateDblClickEmitter",void 0),Xe([v()],Ze.prototype,"moreActionClickEmitter",void 0),Xe([v()],Ze.prototype,"changeEventPrevent",void 0),Xe([v()],Ze.prototype,"timeFormatNotifySlimmer",void 0),Xe([v()],Ze.prototype,"showEventColorBarNotifySlimmer",void 0),Ze.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(7, minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .calendar-view-event-all .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px;margin-left:2px;padding:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-container .calendar-view-event-all .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all .event-all-col{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}.calendar-event-slot-container{display:none}';var et=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class tt extends c{getEventTitleContainerRef(){return this.eventTitleContainerRef}getSlotContainerRef(){return this.slotContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEventRender())}calendarEventRender(){return this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent()}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"slot-container":this.slotMode,"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t},ref:e=>this.slotContainerRef=e},this.slotMode?this.getSlotElement():this.calendarEvent.title)}renderNormalEvent(){const{variant:t="primary",disabled:n}=this.calendarEvent,i=!this.host.classList.contains("day-event"),r={"slot-container":this.slotMode,"event-container":!0,disabled:n,[t]:!0};if(i)return e("div",{role:"button",tabIndex:0,class:r,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),this.slotMode?this.getSlotElement():this.defaultNormalMonthEventContentRender());{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},r),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),e("div",{class:"cover-block"}),this.slotMode?this.getSlotElement():this.defaultNormalTimedEventContentRender(t))}}renderEventStatus(){if(this.showColorBar){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}}defaultNormalMonthEventContentRender(){const{startTime:t,title:n}=this.calendarEvent;return e("div",{class:"event-title"},`${this.formatDisplayTime(t)} ${n}`)}defaultNormalTimedEventContentRender(t){const{startTime:n,endTime:i,title:r}=this.calendarEvent;return e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},r),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:C.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(n)} - ${this.formatDisplayTime(i)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}C.register({"clock-three":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),et([l()],tt.prototype,"host",void 0),et([l()],tt.prototype,"timeFormat",void 0),et([l()],tt.prototype,"calendarEvent",void 0),et([l()],tt.prototype,"slotMode",void 0),et([l()],tt.prototype,"showColorBar",void 0),et([l()],tt.prototype,"colorController",void 0);class nt extends c{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return B(e)?`.event-bg-color{${N.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],nt.prototype,"calendarEvent",void 0);var it=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class rt extends ${constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}it([l({writable:!0})],rt.prototype,"timeFormat",void 0),it([l({writable:!0})],rt.prototype,"showColorBar",void 0);class at extends c{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=L(t.height),i=L(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],at.prototype,"renderer",void 0);var ot=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class st extends c{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const n=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);n&&(this.slotMode=!0,this.matchSlotElement=n)}}}appendTheRepeatEventSlotToContainer(){const e=this.renderer.getSlotContainerRef();if(this.slotMode&&e&&this.matchSlotElement&&(this.calendarEvent.isRepeatEvent||this.isPopoverContent())){const t=this.matchSlotElement.cloneNode(!0);t.removeAttribute("slot"),e.querySelector("vega-calendar-event-slot")||e.appendChild(t)}}getParentCalendarElement(){return this.host["data-calendar-ref"]}isPopoverContent(){return this.host.classList.contains("calendar-event-in-popover")}}ot([l()],st.prototype,"host",void 0),ot([l()],st.prototype,"calendarEvent",void 0),ot([l({writable:!0})],st.prototype,"slotMode",void 0),ot([l()],st.prototype,"renderer",void 0),ot([d("componentWillLoad")],st.prototype,"findTheCalendarEventSlot",null),ot([d("componentDidLoad")],st.prototype,"appendTheRepeatEventSlotToContainer",null);var lt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const ct=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new T({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new tt,this.colorController=new nt,this.slotController=new st,this.subStateController=new rt,this.titleMaxHeightController=new at,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return P(e("slot",null)),s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};lt([f()],ct.prototype,"globalSlimmer",void 0),lt([v()],ct.prototype,"pageResizeObserverSlimmer",void 0),lt([v()],ct.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),lt([v()],ct.prototype,"renderer",void 0),lt([v()],ct.prototype,"colorController",void 0),lt([v()],ct.prototype,"slotController",void 0),lt([v()],ct.prototype,"subStateController",void 0),lt([v()],ct.prototype,"titleMaxHeightController",void 0),ct.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .background-color-mode:not(.slot-container){padding-left:8px;padding-right:8px}:host .background-color-mode:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host .background-color-mode.slot-container{height:16px;line-height:16px}:host ::slotted(vega-calendar-event-slot){position:relative;pointer-events:none}:host(.month-event) .event-container{display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container:not(.slot-container){padding-left:2px;padding-right:2px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{position:relative}:host(.day-event) .event-container:not(.slot-container){padding-left:8px;padding-right:8px}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .slot-container{min-height:16px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px}:host(.month-event.calendar-event-large-size) .background-color-mode:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .slot-container{height:24px;display:flex;align-items:center;line-height:24px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';var dt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const ht=class{constructor(e){i(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(a,{slot:U(this.eventKey)},e("slot",null)),this.host)}get host(){return o(this)}};dt([f()],ht.prototype,"globalSlimmer",void 0),dt([v()],ht.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ht.style=":host{width:100%;height:100%;position:relative}";export{Ze as vega_calendar,ct as vega_calendar_event,ht as vega_calendar_event_slot}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as n}from"./p-
|
|
1
|
+
import{K as n}from"./p-5453f591.js";function t(t){return i=>{const{connectedCallback:o,componentDidLoad:s,disconnectedCallback:e}=i;i.connectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.register(t),null==o?void 0:o.call(this)},i.componentDidLoad=function(){return this.keyboardEventListeners=t(this),n.register(this.keyboardEventListeners),null==s?void 0:s.call(this)},i.disconnectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.deregister(t),null==e?void 0:e.call(this)}}}export{t as I}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as f}from"./p-2df25c7f.js";import{R as o}from"./p-a73c06f0.js";function r(r,i,s,e){return f(r)?{flex:`${o.formatCustom(r)}`}:{flexGrow:f(i)?`${o.formatCustom(i)}`:void 0,flexShrink:f(s)?`${o.formatCustom(s)}`:void 0,flexBasis:f(e)?`${o.formatCustom(e)}`:void 0}}export{r as f}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as t,c as e,I as i,V as s,M as n}from"./p-6e1ab235.js";import{P as o,A as h}from"./p-3c8b2105.js";import{z as r}from"./p-12d5ed36.js";import{R as c}from"./p-ae3f8fe2.js";import{f as a,i as l,c as u}from"./p-ad4bd166.js";import{I as d}from"./p-152393dd.js";import{c as f}from"./p-6a334573.js";import{P as p}from"./p-883a939b.js";function v(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}function m(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}const g=(e,i,s,n,o)=>{const h=o[0];return o.find((t=>function(t,e,i,s,n){if(["top","bottom"].includes(s))switch(n){case"start":return e.left+i.width<=t.width;case"center":return e.left>=i.width-e.width&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(n){case"start":return e.top+i.height<=t.height;case"center":return e.top>=i.height-e.height&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}(e,s,i,n,t)))||(t.warn(`\n\t\t\tNo enough space found for placing element and we will keep using the defined alignment:\n\t\t\t${h}\n\t\t`),h)};class b{constructor(){this.canRetrieve=()=>!0,this.retrieve=()=>{const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}}!function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);o>3&&h&&Object.defineProperty(e,i,h)}([e()],b.prototype,"showConfig",void 0);class w{constructor(){this.canRetrieve=()=>!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo),this.retrieve=()=>{const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}}!function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);o>3&&h&&Object.defineProperty(e,i,h)}([e()],w.prototype,"showConfig",void 0);class j{constructor(){this.canRetrieve=()=>!!a(this.showConfig.target,"vega-modal"),this.retrieve=()=>this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=a(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);o>3&&h&&Object.defineProperty(e,i,h)}([e({writable:!0})],j.prototype,"showConfig",void 0);class R{constructor(){this.canRetrieve=()=>!!a(this.showConfig.target,".vega-popover"),this.retrieve=()=>{const t=a(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}}!function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);o>3&&h&&Object.defineProperty(e,i,h)}([e()],R.prototype,"showConfig",void 0);var y=function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);return o>3&&h&&Object.defineProperty(e,i,h),h};class C extends s{constructor(){super(...arguments),this.positionRelativeToWrapper=new w,this.vegaPopoverWrapper=new R,this.vegaModalWrapper=new j,this.defaultWrapper=new b}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.defaultWrapper]}}y([e({writable:!0})],C.prototype,"container",void 0),y([e({writable:!0})],C.prototype,"showConfig",void 0),y([i()],C.prototype,"positionRelativeToWrapper",void 0),y([i()],C.prototype,"vegaPopoverWrapper",void 0),y([i()],C.prototype,"vegaModalWrapper",void 0),y([i()],C.prototype,"defaultWrapper",void 0);var O=function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);return o>3&&h&&Object.defineProperty(e,i,h),h};class x{constructor(t,e){var i;this.resizeObserverSlimmer=f(x,p,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{l(this.showConfig.target)&&l(this.showConfig.appendableElement)&&(this.adjustWidth(),this.adjustHeight(),this.adjustPosition())},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new C,this.showConfigCallback=t,this.showConfigCallbackTarget=e,null===(i=this.getShowConfig().appendableElement)||void 0===i||i.classList.add("vega-force-hidden")}show(){this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustWidth(),this.adjustHeight(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):t.error("No appendable element found, please add it at new elementAppender."):t.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.toggleShow(!1),this.resetContainerPosition(),d.removeZIndex(this.showConfig.appendableElement,"base"))}destroy(){this.showConfig&&(this.removeVisibleAppendElement(this.showConfig.appendableElement),d.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showConfig.appendableElement.classList.remove("vega-force-hidden"),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.showConfig.appendableElement.classList.add("vega-force-hidden"),this.removeVisibleAppendElement(this.showConfig.appendableElement))}saveVisibleAppendElement(t){const e=x.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=x.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=x.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,x.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){const t=window.getComputedStyle(this.container).position;x.containerMap.has(this.container)||x.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative"),this.showConfig.appendableElement.style.boxSizing="border-box"}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=c.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}adjustPosition(){const e=this.showConfig.translocation&&c.format(this.showConfig.translocation,"translocation"),i=((e,i,s,n,c,a={X:0,Y:0})=>{"relative"!==window.getComputedStyle(e).position&&t.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate.");const l=function(t){if("string"==typeof t){const e=o.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...o]}(n),u=function(t){if("string"==typeof t){const e=h.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...h]}(c),d=function(t,e){const i=e.getBoundingClientRect(),s=t.getBoundingClientRect();return{width:s.width,height:s.height,top:s.top-i.top+e.scrollTop,left:s.left-i.left+e.scrollLeft}}(s,e),f=function(t){const e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}(i),p=function(t){return{width:t.scrollWidth,height:t.scrollHeight}}(e),b=function(e,i,s,n){const o=n[0];return n.find((t=>function(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}(e,t,s,i)))||(t.warn(`\n\t\t\tNo enough space found for placing element and we will keep using the defined placement:\n\t\t\t${o}\n\t\t`),o)}(p,f,d,l),w=g(p,f,d,b,u),j=function(t,e,i,s){return{top:m(t,e,i,s),left:v(t,e,i,s)}}(f,d,b,w),R=function(t,e,i){const s={X:0,Y:0};if(r(i)){let n=i.X,o=i.Y;(t&&["left","right"].includes(t)&&["top","bottom"].includes(e)||t&&["top","bottom"].includes(t)&&["left","right"].includes(e))&&(n=i.Y,o=i.X),["bottom","top"].includes(e)&&(s.Y="top"===e?-o:o,s.X=n),["left","right"].includes(e)&&(s.X="left"===e?-n:n,s.Y=o)}return s}(Array.isArray(n)?n[0]:n,b,a);return j.placement=b,j.alignment=w,j.left+=R.X,j.top+=R.Y,j})(this.container,this.showConfig.appendableElement,this.showConfig.target,this.showConfig.placement,this.showConfig.alignment,e);this.showConfig.appendableElement.style.left=`${i.left}px`,this.showConfig.appendableElement.style.top=`${i.top}px`,this.showConfig.appendableElement.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom"),this.showConfig.appendableElement.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end"),this.showConfig.appendableElement.classList.add(`vega-placement-${i.placement}`),this.showConfig.appendableElement.classList.add(`vega-alignment-${i.alignment}`)}setZIndex(){d.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}x.containerMap=new Map,O([i()],x.prototype,"resizeObserverSlimmer",void 0),O([i()],x.prototype,"elementAppenderContainerController",void 0);var k=function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);return o>3&&h&&Object.defineProperty(e,i,h),h};class A extends s{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.registerElementAppenderListener=()=>{var t,e,i,s,n,o;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler)},this.targetClickHandler=()=>{this.shouldListenerWork("click")&&(this.isShowing()?this.hide():this.show())},this.targetMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&(!1===this.isShowing()&&this.show(),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&this.createDelayHideTimer()},this.targetFocusoutHandler=t=>{var e;t.relatedTarget!==(null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)&&this.targetMouseLeaveHandler()},this.elementMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer()},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0];this.shouldListenerWork("custom")&&this.isShowing()&&this.showConfig&&!u(e,this.showConfig.appendableElement)&&!u(e,this.showConfig.target)&&a(e,"vega-modal")===a(this.showConfig.target,"vega-modal")&&this.hide()},this.createDelayHideTimer=()=>{this.delayHideTimer=setTimeout((()=>{this.hide(),clearTimeout(this.delayHideTimer)}),A.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.shouldListenerWork=t=>{const e=this.getTrigger();switch(t){case"custom":return"none"!==e;case"click":return"click"===e;case"hover":return"hover"===e}throw new Error(`Unexpected trigger: ${t}. Expected values are custom, click, or hover.`)},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}componentDidLoad(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1}destroy(){this.elementAppender=null,this[this.isDropdownShowName]=!1}setElementAppender(){this.elementAppender=new x(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,n,o;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler)}}A.DELAY_HIDE_TIME=100,k([n("connectedCallback")],A.prototype,"connectedCallback",null),k([n("disconnectedCallback")],A.prototype,"disconnectedCallback",null),k([n("componentDidLoad")],A.prototype,"componentDidLoad",null);export{A as E}
|
|
1
|
+
import{L as t,c as e,I as i,V as s,M as n}from"./p-6e1ab235.js";import{P as o,A as h}from"./p-3c8b2105.js";import{z as r}from"./p-2df25c7f.js";import{R as c}from"./p-a73c06f0.js";import{f as a,c as l,i as u}from"./p-4163c2c2.js";import{I as d}from"./p-152393dd.js";import{c as f}from"./p-6a334573.js";import{P as p}from"./p-883a939b.js";function v(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}function m(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}const g=(e,i,s,n,o)=>{const h=o[0];return o.find((t=>function(t,e,i,s,n){if(["top","bottom"].includes(s))switch(n){case"start":return e.left+i.width<=t.width;case"center":return e.left>=i.width-e.width&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(n){case"start":return e.top+i.height<=t.height;case"center":return e.top>=i.height-e.height&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}(e,s,i,n,t)))||(t.warn(`\n\t\t\tNo enough space found for placing element and we will keep using the defined alignment:\n\t\t\t${h}\n\t\t`),h)};class b{constructor(){this.canRetrieve=()=>!0,this.retrieve=()=>{const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}}!function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);o>3&&h&&Object.defineProperty(e,i,h)}([e()],b.prototype,"showConfig",void 0);class w{constructor(){this.canRetrieve=()=>!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo),this.retrieve=()=>{const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}}!function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);o>3&&h&&Object.defineProperty(e,i,h)}([e()],w.prototype,"showConfig",void 0);class j{constructor(){this.canRetrieve=()=>!!a(this.showConfig.target,"vega-modal"),this.retrieve=()=>this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=a(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);o>3&&h&&Object.defineProperty(e,i,h)}([e({writable:!0})],j.prototype,"showConfig",void 0);class R{constructor(){this.canRetrieve=()=>!!a(this.showConfig.target,".vega-popover"),this.retrieve=()=>{const t=a(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}}!function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);o>3&&h&&Object.defineProperty(e,i,h)}([e()],R.prototype,"showConfig",void 0);var y=function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);return o>3&&h&&Object.defineProperty(e,i,h),h};class C extends s{constructor(){super(...arguments),this.positionRelativeToWrapper=new w,this.vegaPopoverWrapper=new R,this.vegaModalWrapper=new j,this.defaultWrapper=new b}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.defaultWrapper]}}y([e({writable:!0})],C.prototype,"container",void 0),y([e({writable:!0})],C.prototype,"showConfig",void 0),y([i()],C.prototype,"positionRelativeToWrapper",void 0),y([i()],C.prototype,"vegaPopoverWrapper",void 0),y([i()],C.prototype,"vegaModalWrapper",void 0),y([i()],C.prototype,"defaultWrapper",void 0);var O=function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);return o>3&&h&&Object.defineProperty(e,i,h),h};class x{constructor(t,e){var i;this.resizeObserverSlimmer=f(x,p,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{l(this.showConfig.target)&&l(this.showConfig.appendableElement)&&(this.adjustWidth(),this.adjustHeight(),this.adjustPosition())},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new C,this.showConfigCallback=t,this.showConfigCallbackTarget=e,null===(i=this.getShowConfig().appendableElement)||void 0===i||i.classList.add("vega-force-hidden")}show(){this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustWidth(),this.adjustHeight(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):t.error("No appendable element found, please add it at new elementAppender."):t.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.toggleShow(!1),this.resetContainerPosition(),d.removeZIndex(this.showConfig.appendableElement,"base"))}destroy(){this.showConfig&&(this.removeVisibleAppendElement(this.showConfig.appendableElement),d.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showConfig.appendableElement.classList.remove("vega-force-hidden"),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.showConfig.appendableElement.classList.add("vega-force-hidden"),this.removeVisibleAppendElement(this.showConfig.appendableElement))}saveVisibleAppendElement(t){const e=x.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=x.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=x.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,x.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){const t=window.getComputedStyle(this.container).position;x.containerMap.has(this.container)||x.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative"),this.showConfig.appendableElement.style.boxSizing="border-box"}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=c.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}adjustPosition(){const e=this.showConfig.translocation&&c.format(this.showConfig.translocation,"translocation"),i=((e,i,s,n,c,a={X:0,Y:0})=>{"relative"!==window.getComputedStyle(e).position&&t.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate.");const l=function(t){if("string"==typeof t){const e=o.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...o]}(n),u=function(t){if("string"==typeof t){const e=h.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...h]}(c),d=function(t,e){const i=e.getBoundingClientRect(),s=t.getBoundingClientRect();return{width:s.width,height:s.height,top:s.top-i.top+e.scrollTop,left:s.left-i.left+e.scrollLeft}}(s,e),f=function(t){const e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}(i),p=function(t){return{width:t.scrollWidth,height:t.scrollHeight}}(e),b=function(e,i,s,n){const o=n[0];return n.find((t=>function(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}(e,t,s,i)))||(t.warn(`\n\t\t\tNo enough space found for placing element and we will keep using the defined placement:\n\t\t\t${o}\n\t\t`),o)}(p,f,d,l),w=g(p,f,d,b,u),j=function(t,e,i,s){return{top:m(t,e,i,s),left:v(t,e,i,s)}}(f,d,b,w),R=function(t,e,i){const s={X:0,Y:0};if(r(i)){let n=i.X,o=i.Y;(t&&["left","right"].includes(t)&&["top","bottom"].includes(e)||t&&["top","bottom"].includes(t)&&["left","right"].includes(e))&&(n=i.Y,o=i.X),["bottom","top"].includes(e)&&(s.Y="top"===e?-o:o,s.X=n),["left","right"].includes(e)&&(s.X="left"===e?-n:n,s.Y=o)}return s}(Array.isArray(n)?n[0]:n,b,a);return j.placement=b,j.alignment=w,j.left+=R.X,j.top+=R.Y,j})(this.container,this.showConfig.appendableElement,this.showConfig.target,this.showConfig.placement,this.showConfig.alignment,e);this.showConfig.appendableElement.style.left=`${i.left}px`,this.showConfig.appendableElement.style.top=`${i.top}px`,this.showConfig.appendableElement.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom"),this.showConfig.appendableElement.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end"),this.showConfig.appendableElement.classList.add(`vega-placement-${i.placement}`),this.showConfig.appendableElement.classList.add(`vega-alignment-${i.alignment}`)}setZIndex(){d.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}x.containerMap=new Map,O([i()],x.prototype,"resizeObserverSlimmer",void 0),O([i()],x.prototype,"elementAppenderContainerController",void 0);var k=function(t,e,i,s){var n,o=arguments.length,h=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(e,i,h):n(e,i))||h);return o>3&&h&&Object.defineProperty(e,i,h),h};class A extends s{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.registerElementAppenderListener=()=>{var t,e,i,s,n,o;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler)},this.targetClickHandler=()=>{this.shouldListenerWork("click")&&(this.isShowing()?this.hide():this.show())},this.targetMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&(!1===this.isShowing()&&this.show(),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&this.createDelayHideTimer()},this.targetFocusoutHandler=t=>{var e;t.relatedTarget!==(null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)&&this.targetMouseLeaveHandler()},this.elementMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer()},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0];this.shouldListenerWork("custom")&&this.isShowing()&&this.showConfig&&!u(e,this.showConfig.appendableElement)&&!u(e,this.showConfig.target)&&a(e,"vega-modal")===a(this.showConfig.target,"vega-modal")&&this.hide()},this.createDelayHideTimer=()=>{this.delayHideTimer=setTimeout((()=>{this.hide(),clearTimeout(this.delayHideTimer)}),A.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.shouldListenerWork=t=>{const e=this.getTrigger();switch(t){case"custom":return"none"!==e;case"click":return"click"===e;case"hover":return"hover"===e}throw new Error(`Unexpected trigger: ${t}. Expected values are custom, click, or hover.`)},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}componentDidLoad(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1}destroy(){this.elementAppender=null,this[this.isDropdownShowName]=!1}setElementAppender(){this.elementAppender=new x(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,n,o;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler)}}A.DELAY_HIDE_TIME=100,k([n("connectedCallback")],A.prototype,"connectedCallback",null),k([n("disconnectedCallback")],A.prototype,"disconnectedCallback",null),k([n("componentDidLoad")],A.prototype,"componentDidLoad",null);export{A as E}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as s}from"./p-
|
|
1
|
+
import{F as s}from"./p-7c316199.js";import{V as o,a as t,b as a,c as i,d as l,w as n,e as c}from"./p-a1f7484f.js";import{M as e,V as r,s as h,G as f}from"./p-6e1ab235.js";import{V as b}from"./p-f9e456a6.js";import{v as p}from"./p-5f377954.js";import{V as T}from"./p-66098cf8.js";import{T as m}from"./p-c59042c0.js";import{V as u}from"./p-7b40ac07.js";var d=function(s,o,t,a){var i,l=arguments.length,n=l<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(s,o,t,a);else for(var c=s.length-1;c>=0;c--)(i=s[c])&&(n=(l<3?i(n):l>3?i(o,t,n):i(o,t))||n);return l>3&&n&&Object.defineProperty(o,t,n),n};class g extends r{constructor(o){super(),this.originalWatchers=new Map,this.hasDisconnected=!1,this.isEnabled=s.isEnabled("VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD")&&s.isEnabled("VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD"),this.component=o.component}connectedCallback(){if(!this.isEnabled)return;if(this.hasDisconnected)return;const s=this.component.constructor.watchers;for(const o in s)s[o].forEach((s=>{this.originalWatchers.has(s)||(this.originalWatchers.set(s,this.component[s]),this.component[s]=function(){})}))}disconnectedCallback(){this.isEnabled&&(this.hasDisconnected=!0)}componentDidLoad(){this.isEnabled&&this.originalWatchers.forEach(((s,o)=>{const t=s;this.component[o]=function(...s){return t.apply(this,s)}}))}}d([e("connectedCallback")],g.prototype,"connectedCallback",null),d([e("disconnectedCallback")],g.prototype,"disconnectedCallback",null),d([e("componentDidLoad")],g.prototype,"componentDidLoad",null);const E=function(){globalThis.VegaDisabledFeatureKeys&&s.disable(...globalThis.VegaDisabledFeatureKeys),globalThis.VegaEnabledFeatureKeys&&s.enable(...globalThis.VegaEnabledFeatureKeys),globalThis.VegaLoader=o,globalThis.VegaNotify=t,globalThis.VegaThemeManager=a,globalThis.setVegaLogLevel=h,globalThis.VegaDialog=b,f.register([g]),globalThis.VegaEventManager=i,Object.keys(m).forEach((s=>{const{url:o}=m[s],t="vega-typography-"+s;if(!document.querySelector("#"+t)){const s=document.createElement("link");s.id=t,s.href=o,s.rel="stylesheet",document.head.append(s)}})),globalThis.VegaIconManager=T,globalThis.VegaZIndexManager=l,globalThis.ValidCreditCardNumberRule=u,globalThis.VegaEnvInfo=p.getVegaEnv(),import("./p-f404aa83.js").then((function(s){return s.i})).then((o=>{o.default.init(s)})),globalThis.waitForVega=n,globalThis.VegaSkeletonLoader=c};export{E as g}
|