@globalpayments/vega 2.50.0 → 2.51.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/LICENSE +9 -17
- package/dist/cjs/{app-globals-7f879795.js → app-globals-4ecf85bb.js} +9 -6
- package/dist/cjs/{child-nodes-event-prevent-slimmer-26ecfb15.js → child-nodes-event-prevent-slimmer-29020cc8.js} +1 -1
- package/dist/cjs/{child-nodes-notify-observer-slimmer-5817a53b.js → child-nodes-notify-observer-slimmer-30ba81ac.js} +1 -1
- package/dist/cjs/{code-block-d0b98262.js → code-block-2d014e17.js} +2 -2
- package/dist/cjs/{component-73a88c4e.js → component-1e352960.js} +1 -0
- package/dist/cjs/{component-global-style-slimmer-6749808c.js → component-global-style-slimmer-b0b4b997.js} +3 -0
- package/dist/cjs/{content-state-d2f6a5ac.js → content-state-6a5da7ec.js} +1 -1
- package/dist/cjs/{dark-mode-style-controller-4adb7fb2.js → dark-mode-style-controller-f9a32d68.js} +8 -0
- package/dist/cjs/{design-token-36495784.js → design-token-3f4f0bc3.js} +1 -1
- package/dist/cjs/{dom-node-subject-factory-d5826bff.js → dom-node-subject-factory-769dd00f.js} +1 -1
- package/dist/cjs/{dom-node-subject-observer-factory-a7a3b196.js → dom-node-subject-observer-factory-5aa4cc83.js} +1 -1
- package/dist/cjs/{effect-37695d3d.js → effect-98e88068.js} +2 -8
- package/dist/cjs/{element-appender-slimmer-e5ca155e.js → element-appender-slimmer-5b1d8ffb.js} +12 -7
- package/dist/cjs/{event-emit-slimmer-ee7a8c06.js → event-emit-slimmer-36036ef7.js} +15 -4
- package/dist/cjs/{form-field-controller-slimmer-ff6d7dfc.js → form-field-controller-slimmer-01c01946.js} +7 -5
- package/dist/cjs/{image-annotation-action-e11f242e.js → image-annotation-action-617bbb13.js} +4 -4
- package/dist/cjs/{index-73624bb3.js → index-ebb1bb17.js} +2 -2
- package/dist/cjs/index.cjs.js +13 -13
- package/dist/cjs/{inject-keyboard-manager-b301e887.js → inject-keyboard-manager-dd628ccc.js} +1 -1
- package/dist/cjs/{internal-vega-event-manager-58afcde7.js → internal-vega-event-manager-e98944ac.js} +7 -1
- package/dist/cjs/{keyboard-manager-2ccf4b16.js → keyboard-manager-8c74eeb9.js} +3 -1
- package/dist/cjs/{keyboard-manager-slimmer-900cf2f5.js → keyboard-manager-slimmer-eb364bee.js} +1 -1
- package/dist/cjs/{legend-input-processor-8bcce3bf.js → legend-input-processor-b1f323fa.js} +2 -0
- package/dist/cjs/loader.cjs.js +11 -11
- package/dist/cjs/{page-resize-observer-slimmer-44e08878.js → page-resize-observer-slimmer-efa79728.js} +1 -0
- package/dist/cjs/{public-rules-8e2542d9.js → public-rules-a3b7e267.js} +6 -6
- package/dist/cjs/{responsive-format-facade-325d3d90.js → responsive-format-facade-6b81192d.js} +5 -5
- package/dist/cjs/{rich-text-editor-required-rule-e325cd21.js → rich-text-editor-required-rule-e9c7c379.js} +1 -1
- package/dist/cjs/{selection-controller-93e9b350.js → selection-controller-1d7c0999.js} +7 -4
- package/dist/cjs/{string-input-formatter-slimmer-b28c6bd2.js → string-input-formatter-slimmer-a5feb2ed.js} +2 -2
- package/dist/cjs/{style-formatter-0c3f5ada.js → style-formatter-497d0fa4.js} +1 -1
- package/dist/cjs/{sub-state-notify-slimmer-06e0a8db.js → sub-state-notify-slimmer-f68fbf29.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-66f3038c.js → sub-state-observer-slimmer-e06cdf7e.js} +2 -2
- package/dist/cjs/{ui-13b42af0.js → ui-6c069604.js} +2 -0
- package/dist/cjs/vega-accordion.cjs.entry.js +14 -14
- package/dist/cjs/vega-app-footer.cjs.entry.js +2 -2
- package/dist/cjs/vega-app-header-button.cjs.entry.js +15 -15
- package/dist/cjs/vega-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/vega-banner.cjs.entry.js +6 -6
- package/dist/cjs/vega-bar-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-box.cjs.entry.js +15 -13
- package/dist/cjs/vega-brand-logo.cjs.entry.js +2 -2
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +7 -7
- package/dist/cjs/vega-button-circle.cjs.entry.js +15 -15
- package/dist/cjs/vega-button-group_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-button-link.cjs.entry.js +7 -7
- package/dist/cjs/vega-button.cjs.entry.js +14 -14
- package/dist/cjs/vega-calendar_3.cjs.entry.js +10 -10
- package/dist/cjs/vega-card.cjs.entry.js +12 -12
- package/dist/cjs/vega-carousel.cjs.entry.js +17 -14
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-chip.cjs.entry.js +15 -15
- package/dist/cjs/vega-code-block.cjs.entry.js +96 -102
- package/dist/cjs/vega-color-picker.cjs.entry.js +9 -9
- package/dist/cjs/vega-combo-box.cjs.entry.js +12 -12
- package/dist/cjs/vega-counter-badge.cjs.entry.js +1 -1
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +30 -21
- package/dist/cjs/vega-dialog_2.cjs.entry.js +22 -16
- package/dist/cjs/vega-divider.cjs.entry.js +12 -12
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +21 -21
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
- package/dist/cjs/vega-field-label.cjs.entry.js +6 -6
- package/dist/cjs/vega-file-uploader.cjs.entry.js +9 -9
- package/dist/cjs/vega-flag-icon.cjs.entry.js +12 -12
- package/dist/cjs/vega-flex.cjs.entry.js +13 -13
- package/dist/cjs/vega-font.cjs.entry.js +12 -12
- package/dist/cjs/vega-form.cjs.entry.js +12 -12
- package/dist/cjs/vega-grid.cjs.entry.js +12 -12
- package/dist/cjs/vega-hint.cjs.entry.js +1 -1
- package/dist/cjs/vega-icon.cjs.entry.js +16 -13
- package/dist/cjs/vega-image-uploader.cjs.entry.js +18 -16
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-numeric.cjs.entry.js +13 -13
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +15 -15
- package/dist/cjs/vega-input-range.cjs.entry.js +12 -12
- package/dist/cjs/vega-input-select.cjs.entry.js +16 -16
- package/dist/cjs/vega-input.cjs.entry.js +32 -14
- package/dist/cjs/vega-item-toggle.cjs.entry.js +6 -6
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +23 -18
- package/dist/cjs/vega-line-chart.cjs.entry.js +3 -3
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +12 -11
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +6 -6
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +4 -4
- package/dist/cjs/vega-pagination.cjs.entry.js +14 -14
- package/dist/cjs/vega-pie-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-popover_2.cjs.entry.js +16 -16
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +6 -6
- package/dist/cjs/vega-radio_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -16
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +23 -21
- package/dist/cjs/vega-section-title.cjs.entry.js +1 -1
- package/dist/cjs/vega-segment-control.cjs.entry.js +7 -7
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +17 -17
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +20 -16
- package/dist/cjs/vega-signature-capture.cjs.entry.js +17 -16
- package/dist/cjs/{vega-skeleton-loader-controller-83e05b6c.js → vega-skeleton-loader-controller-ae2ab090.js} +15 -5
- package/dist/cjs/vega-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/vega-stepper.cjs.entry.js +10 -10
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-table_8.cjs.entry.js +16 -16
- package/dist/cjs/vega-text.cjs.entry.js +4 -2
- package/dist/cjs/vega-textarea.cjs.entry.js +10 -10
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +21 -21
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +9 -9
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +15 -15
- package/dist/cjs/vega.cjs.js +11 -11
- package/dist/cjs/{wait-for-vega-handler-0a0738ac.js → wait-for-vega-handler-4491efc9.js} +3 -1
- package/dist/cjs/{y-axis-input-processor-e371c142.js → y-axis-input-processor-19a07af5.js} +1 -1
- package/dist/collection/components/vega-box/slimmers/controllers/vega-box-responsive-style-controller.js +1 -0
- package/dist/collection/components/vega-box/slimmers/controllers/vega-box-state-styles-controller.js +1 -0
- package/dist/collection/components/vega-carousel/vega-carousel.js +3 -0
- package/dist/collection/components/vega-code-block/slimmers/controllers/code-highlight-parser.abstract.js +25 -0
- package/dist/collection/components/vega-code-block/slimmers/controllers/default-code-highlight-parse-controller.js +6 -20
- package/dist/collection/components/vega-code-block/slimmers/controllers/prism-code-highlight-parse-controller.js +1 -14
- package/dist/collection/components/vega-code-block/slimmers/controllers/vega-code-block-input-controller.js +50 -56
- package/dist/collection/components/vega-code-block/slimmers/controllers/vega-code-block-selection-controller.js +2 -0
- package/dist/collection/components/vega-code-block/vega-code-block.css +1 -1
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-month-year-dropdown-renderer.js +5 -0
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +4 -0
- package/dist/collection/components/vega-icon/vega-icon.js +4 -1
- package/dist/collection/components/vega-image-uploader/slimmers/controllers/vega-image-uploader-preview-controller.js +2 -0
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-compact-width-controller.js +1 -0
- package/dist/collection/components/vega-input/vega-input.css +12 -2
- package/dist/collection/components/vega-input/vega-input.js +27 -3
- package/dist/collection/components/vega-input-range/slimmers/renderers/vega-input-range-clear-icon-renderer.js +1 -1
- package/dist/collection/components/vega-input-range/vega-input-range.css +10 -0
- package/dist/collection/components/vega-loader-wrapper/slimmers/controllers/manage-vega-loader-wrapper-z-index-controller.js +1 -0
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-backdrop-controller.js +3 -0
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +2 -0
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-nested-modal-controller.js +1 -0
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-controller.js +3 -0
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.js +2 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/code-block-node-renderer.js +2 -5
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-code-block-to-rte-code-block-strategy.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/test/e2e-utils.js +5 -0
- package/dist/collection/components/vega-sidenav/slimmers/controllers/vega-sidenav-backdrop-controller.js +3 -0
- package/dist/collection/components/vega-sidenav/slimmers/controllers/vega-sidenav-open-status-controller.js +1 -0
- package/dist/collection/components/vega-signature-capture/slimmers/written-mode/controllers/written-mode-svg-controller.js +1 -0
- package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +2 -0
- package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-clear-button-renderer.js +1 -1
- package/dist/collection/components/vega-time-picker/vega-time-picker.css +10 -0
- package/dist/collection/global/scripts/before-vega-load.js +3 -0
- package/dist/collection/helpers/chart/graph-context-factory.js +2 -0
- package/dist/collection/helpers/common/wait-for-vega-handler.js +3 -1
- package/dist/collection/helpers/dialog/vega-dialog-controller.js +2 -0
- package/dist/collection/helpers/event-manager/event-delegated/vega-button-click-strategy.js +1 -0
- package/dist/collection/helpers/event-manager/event-delegated/vega-checkbox-change-strategy.js +1 -0
- package/dist/collection/helpers/event-manager/event-delegated/vega-input-select-change-strategy.js +1 -0
- package/dist/collection/helpers/event-manager/event-delegated/vega-input-strategy.js +1 -0
- package/dist/collection/helpers/event-manager/event-delegated/vega-radio-change-strategy.js +1 -0
- package/dist/collection/helpers/event-manager/event-delegated/vega-textarea-change-strategy.js +1 -0
- package/dist/collection/helpers/event-manager/slimmers/event-emit-slimmer.js +3 -1
- package/dist/collection/helpers/event-manager/test/event-emit-slimmer.test.js +11 -1
- package/dist/collection/helpers/keyboard/keyboard-manager.js +2 -0
- package/dist/collection/helpers/notify/vega-notify-controller.js +6 -1
- package/dist/collection/helpers/skeleton-loader/vega-skeleton-loader-controller.js +3 -0
- package/dist/collection/helpers/slimmers/component-global-style-slimmer.js +3 -0
- package/dist/collection/helpers/slimmers/element-appender/body-positioned-wrapper/default-wrapper.js +1 -0
- package/dist/collection/helpers/slimmers/element-appender/body-positioned-wrapper/position-relative-to-wrapper.js +2 -0
- package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +2 -0
- package/dist/collection/helpers/slimmers/field-error-ui-controller-strategies/sibling-container-error-label-container-retrieval-strategy.js +1 -0
- package/dist/collection/helpers/slimmers/field-error-ui-controller-strategies/sibling-container-self-retrieval-strategy.js +1 -0
- package/dist/collection/helpers/slimmers/page-resize-observer-slimmer.js +1 -0
- package/dist/collection/helpers/theme/controllers/color-schema-overriding-controller.js +2 -0
- package/dist/collection/helpers/theme/controllers/style-controller.abstract.js +3 -0
- package/dist/collection/helpers/theme/internal-theme-manager.js +3 -0
- package/dist/collection/helpers/ui/element-appender.js +1 -1
- package/dist/collection/polyfill/shadow-selection/shadow-selection-polyfill.js +2 -0
- package/dist/collection/utils/component.js +1 -0
- package/dist/collection/utils/e2e-utils.js +3 -0
- package/dist/collection/utils/effect.js +2 -0
- package/dist/collection/utils/safe-document.js +9 -0
- package/dist/collection/utils/test/safe-document.test.js +13 -0
- package/dist/collection/utils/test-utils.js +1 -0
- package/dist/collection/utils/ui.js +3 -0
- package/dist/esm/{app-globals-6614c573.js → app-globals-d96d623d.js} +9 -6
- package/dist/esm/{child-nodes-event-prevent-slimmer-1142fb79.js → child-nodes-event-prevent-slimmer-2b975cbf.js} +1 -1
- package/dist/esm/{child-nodes-notify-observer-slimmer-ddaad39a.js → child-nodes-notify-observer-slimmer-eeed5986.js} +1 -1
- package/dist/esm/{code-block-527df049.js → code-block-ef2f04ca.js} +2 -2
- package/dist/esm/{component-cae24190.js → component-7d906393.js} +1 -0
- package/dist/esm/{component-global-style-slimmer-000e0c11.js → component-global-style-slimmer-dad40b64.js} +3 -0
- package/dist/esm/{content-state-120176f3.js → content-state-69d29a07.js} +1 -1
- package/dist/esm/{dark-mode-style-controller-2ada8e22.js → dark-mode-style-controller-ea798fc8.js} +8 -0
- package/dist/esm/{design-token-5672a708.js → design-token-2060cd0d.js} +1 -1
- package/dist/esm/{dom-node-subject-factory-eb6bba5d.js → dom-node-subject-factory-6374611f.js} +1 -1
- package/dist/esm/{dom-node-subject-observer-factory-6083d518.js → dom-node-subject-observer-factory-c345ca2e.js} +1 -1
- package/dist/esm/{effect-8efd2c3c.js → effect-f50e072d.js} +2 -8
- package/dist/esm/{element-appender-slimmer-be7ccd98.js → element-appender-slimmer-64a77b7f.js} +12 -7
- package/dist/esm/{event-emit-slimmer-480d3b54.js → event-emit-slimmer-7428cc01.js} +15 -4
- package/dist/esm/{form-field-controller-slimmer-ec2000c0.js → form-field-controller-slimmer-87d80e46.js} +7 -5
- package/dist/esm/{image-annotation-action-07f3d354.js → image-annotation-action-1497f70e.js} +4 -4
- package/dist/esm/{index-ae88803d.js → index-f5d2fe61.js} +2 -2
- package/dist/esm/index.js +13 -13
- package/dist/esm/{inject-keyboard-manager-f513be4a.js → inject-keyboard-manager-e39c0fd9.js} +1 -1
- package/dist/esm/{internal-vega-event-manager-56c6469a.js → internal-vega-event-manager-d80c53c5.js} +7 -1
- package/dist/esm/{keyboard-manager-262be5ce.js → keyboard-manager-9564ad83.js} +3 -1
- package/dist/esm/{keyboard-manager-slimmer-42bf9773.js → keyboard-manager-slimmer-2218e6ba.js} +1 -1
- package/dist/esm/{legend-input-processor-8f76ce8a.js → legend-input-processor-1d266967.js} +2 -0
- package/dist/esm/loader.js +11 -11
- package/dist/esm/{page-resize-observer-slimmer-15a84d26.js → page-resize-observer-slimmer-c51f1912.js} +1 -0
- package/dist/esm/{public-rules-b315bf89.js → public-rules-3436034b.js} +6 -6
- package/dist/esm/{responsive-format-facade-738b3413.js → responsive-format-facade-8c0ce819.js} +5 -5
- package/dist/esm/{rich-text-editor-required-rule-3b87fb40.js → rich-text-editor-required-rule-cc5b6a2d.js} +1 -1
- package/dist/esm/{selection-controller-c04f1e18.js → selection-controller-3d6dfc87.js} +7 -4
- package/dist/esm/{string-input-formatter-slimmer-4f0eadb0.js → string-input-formatter-slimmer-e53b6412.js} +2 -2
- package/dist/esm/{style-formatter-5870bbe1.js → style-formatter-1eca1299.js} +1 -1
- package/dist/esm/{sub-state-notify-slimmer-6768a092.js → sub-state-notify-slimmer-b6c8051c.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-2958d1a3.js → sub-state-observer-slimmer-93eeb87d.js} +2 -2
- package/dist/esm/{ui-ed1283bb.js → ui-7d177fb0.js} +2 -0
- package/dist/esm/vega-accordion.entry.js +14 -14
- package/dist/esm/vega-app-footer.entry.js +2 -2
- package/dist/esm/vega-app-header-button.entry.js +15 -15
- package/dist/esm/vega-backdrop.entry.js +2 -2
- package/dist/esm/vega-banner.entry.js +6 -6
- package/dist/esm/vega-bar-chart.entry.js +2 -2
- package/dist/esm/vega-box.entry.js +15 -13
- package/dist/esm/vega-brand-logo.entry.js +2 -2
- package/dist/esm/vega-breadcrumb.entry.js +7 -7
- package/dist/esm/vega-button-circle.entry.js +15 -15
- package/dist/esm/vega-button-group_2.entry.js +9 -9
- package/dist/esm/vega-button-link.entry.js +7 -7
- package/dist/esm/vega-button.entry.js +14 -14
- package/dist/esm/vega-calendar_3.entry.js +10 -10
- package/dist/esm/vega-card.entry.js +12 -12
- package/dist/esm/vega-carousel.entry.js +17 -14
- package/dist/esm/vega-checkbox_2.entry.js +11 -11
- package/dist/esm/vega-chip.entry.js +15 -15
- package/dist/esm/vega-code-block.entry.js +96 -102
- package/dist/esm/vega-color-picker.entry.js +9 -9
- package/dist/esm/vega-combo-box.entry.js +12 -12
- package/dist/esm/vega-counter-badge.entry.js +1 -1
- package/dist/esm/vega-date-picker_2.entry.js +30 -21
- package/dist/esm/vega-dialog_2.entry.js +22 -16
- package/dist/esm/vega-divider.entry.js +12 -12
- package/dist/esm/vega-dropdown_5.entry.js +21 -21
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-error.entry.js +1 -1
- package/dist/esm/vega-field-label.entry.js +6 -6
- package/dist/esm/vega-file-uploader.entry.js +9 -9
- package/dist/esm/vega-flag-icon.entry.js +12 -12
- package/dist/esm/vega-flex.entry.js +13 -13
- package/dist/esm/vega-font.entry.js +12 -12
- package/dist/esm/vega-form.entry.js +12 -12
- package/dist/esm/vega-grid.entry.js +12 -12
- package/dist/esm/vega-hint.entry.js +1 -1
- package/dist/esm/vega-icon.entry.js +16 -13
- package/dist/esm/vega-image-uploader.entry.js +18 -16
- package/dist/esm/vega-input-credit-card.entry.js +10 -10
- package/dist/esm/vega-input-numeric.entry.js +13 -13
- package/dist/esm/vega-input-phone-number.entry.js +15 -15
- package/dist/esm/vega-input-range.entry.js +12 -12
- package/dist/esm/vega-input-select.entry.js +16 -16
- package/dist/esm/vega-input.entry.js +32 -14
- package/dist/esm/vega-item-toggle.entry.js +6 -6
- package/dist/esm/vega-left-nav_5.entry.js +23 -18
- package/dist/esm/vega-line-chart.entry.js +3 -3
- package/dist/esm/vega-loader-wrapper_2.entry.js +12 -11
- package/dist/esm/vega-page-notification_2.entry.js +4 -4
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +6 -6
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +4 -4
- package/dist/esm/vega-pagination.entry.js +14 -14
- package/dist/esm/vega-pie-chart.entry.js +2 -2
- package/dist/esm/vega-popover_2.entry.js +16 -16
- package/dist/esm/vega-progress-tracker.entry.js +6 -6
- package/dist/esm/vega-radio_2.entry.js +13 -13
- package/dist/esm/vega-rich-text-content.entry.js +13 -16
- package/dist/esm/vega-rich-text-editor_4.entry.js +23 -21
- package/dist/esm/vega-section-title.entry.js +1 -1
- package/dist/esm/vega-segment-control.entry.js +7 -7
- package/dist/esm/vega-selection-chip_2.entry.js +17 -17
- package/dist/esm/vega-selection-tile_2.entry.js +12 -12
- package/dist/esm/vega-sidenav_3.entry.js +20 -16
- package/dist/esm/vega-signature-capture.entry.js +17 -16
- package/dist/esm/{vega-skeleton-loader-controller-878e1b28.js → vega-skeleton-loader-controller-06f48dd2.js} +15 -5
- package/dist/esm/vega-skeleton.entry.js +1 -1
- package/dist/esm/vega-stepper.entry.js +10 -10
- package/dist/esm/vega-tab-group_2.entry.js +8 -8
- package/dist/esm/vega-table_8.entry.js +16 -16
- package/dist/esm/vega-text.entry.js +4 -2
- package/dist/esm/vega-textarea.entry.js +10 -10
- package/dist/esm/vega-time-picker_2.entry.js +21 -21
- package/dist/esm/vega-toggle-switch.entry.js +9 -9
- package/dist/esm/vega-tooltip_2.entry.js +15 -15
- package/dist/esm/vega.js +11 -11
- package/dist/esm/{wait-for-vega-handler-b18eb955.js → wait-for-vega-handler-e0a928cd.js} +3 -1
- package/dist/esm/{y-axis-input-processor-e090b01c.js → y-axis-input-processor-95995d34.js} +1 -1
- package/dist/types/components/vega-code-block/slimmers/controllers/code-highlight-parser.abstract.d.ts +7 -0
- package/dist/types/components/vega-code-block/slimmers/controllers/vega-code-block-input-controller.d.ts +15 -14
- package/dist/types/components/vega-input/types.d.ts +2 -0
- package/dist/types/components/vega-input/vega-input.d.ts +9 -2
- package/dist/types/components.d.ts +3 -3
- package/dist/types/types/components.type.d.ts +1 -1
- package/dist/types/utils/safe-document.d.ts +7 -0
- package/dist/types/utils/test/safe-document.test.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-5ce386c8.entry.js → p-06cd4a19.entry.js} +1 -1
- package/dist/vega/p-06fb002a.js +1 -0
- package/dist/vega/{p-5f7e87d8.entry.js → p-07cdaf74.entry.js} +1 -1
- package/dist/vega/{p-4ea06c45.entry.js → p-07e40eea.entry.js} +1 -1
- package/dist/vega/{p-29f9be26.entry.js → p-0ce88865.entry.js} +1 -1
- package/dist/vega/{p-cd437a76.entry.js → p-1071f790.entry.js} +1 -1
- package/dist/vega/{p-45e28b9b.js → p-111d41fe.js} +1 -1
- package/dist/vega/{p-38c9f0a2.entry.js → p-12929d20.entry.js} +1 -1
- package/dist/vega/{p-6934013c.js → p-138fcf6e.js} +1 -1
- package/dist/vega/{p-27ccf34d.entry.js → p-151dec6a.entry.js} +1 -1
- package/dist/vega/p-1b81fc7a.entry.js +1 -0
- package/dist/vega/{p-56a0b13d.js → p-1df029c2.js} +1 -1
- package/dist/vega/{p-539bf755.entry.js → p-21d4f12e.entry.js} +1 -1
- package/dist/vega/{p-9f64b39a.entry.js → p-21d5656d.entry.js} +1 -1
- package/dist/vega/{p-9f002a09.js → p-21e180f2.js} +1 -1
- package/dist/vega/{p-1e172471.entry.js → p-2329cb73.entry.js} +1 -1
- package/dist/vega/{p-dc94d914.entry.js → p-29fe94b6.entry.js} +1 -1
- package/dist/vega/p-2f5d9aab.js +1 -0
- package/dist/vega/{p-b257180d.entry.js → p-30c363d8.entry.js} +2 -2
- package/dist/vega/{p-d00fbc11.entry.js → p-32a24ef1.entry.js} +1 -1
- package/dist/vega/{p-829d0394.js → p-33bd7e31.js} +1 -1
- package/dist/vega/{p-7b0a4688.entry.js → p-36827489.entry.js} +1 -1
- package/dist/vega/{p-8aa7e56e.entry.js → p-388abe56.entry.js} +1 -1
- package/dist/vega/{p-bdd3147b.js → p-3b34389d.js} +1 -1
- package/dist/vega/{p-05373557.js → p-3eb2d433.js} +1 -1
- package/dist/vega/{p-9a72d29f.js → p-3fa7d356.js} +1 -1
- package/dist/vega/{p-2fb5cef7.entry.js → p-447a2b18.entry.js} +1 -1
- package/dist/vega/{p-d3765409.entry.js → p-4bca12ee.entry.js} +1 -1
- package/dist/vega/{p-b518e1a0.entry.js → p-5016b57e.entry.js} +1 -1
- package/dist/vega/{p-01e6e55a.entry.js → p-52905c68.entry.js} +1 -1
- package/dist/vega/{p-efdda17c.entry.js → p-52bdeea0.entry.js} +1 -1
- package/dist/vega/{p-87019626.entry.js → p-53803447.entry.js} +1 -1
- package/dist/vega/{p-854849ea.entry.js → p-53815555.entry.js} +1 -1
- package/dist/vega/{p-d7937711.js → p-55563f5f.js} +1 -1
- package/dist/vega/{p-7f5a85c6.entry.js → p-578ac47f.entry.js} +1 -1
- package/dist/vega/{p-8e66b9b0.entry.js → p-586139ce.entry.js} +1 -1
- package/dist/vega/{p-6c6a91fe.entry.js → p-597732e9.entry.js} +1 -1
- package/dist/vega/{p-64f452fe.entry.js → p-5c9efff8.entry.js} +1 -1
- package/dist/vega/{p-21b18100.js → p-5e530257.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-3f191ec3.entry.js → p-60164904.entry.js} +1 -1
- package/dist/vega/{p-020b04ed.js → p-613ee009.js} +1 -1
- package/dist/vega/{p-6ece526e.entry.js → p-61b72038.entry.js} +1 -1
- package/dist/vega/{p-36499e56.entry.js → p-642da014.entry.js} +1 -1
- package/dist/vega/{p-b8d9d3a0.entry.js → p-647734d1.entry.js} +1 -1
- package/dist/vega/{p-cd205d96.js → p-65cca90f.js} +1 -1
- package/dist/vega/{p-a0e122a6.entry.js → p-66145767.entry.js} +1 -1
- package/dist/vega/{p-872de7ee.js → p-6681efd5.js} +1 -1
- package/dist/vega/{p-419697c6.js → p-6b7dca3e.js} +1 -1
- package/dist/vega/{p-767b257b.entry.js → p-6ceb2d26.entry.js} +1 -1
- package/dist/vega/{p-e1a2a701.js → p-6e01f0a2.js} +1 -1
- package/dist/vega/{p-5eec1e1f.entry.js → p-6f3dd430.entry.js} +1 -1
- package/dist/vega/p-71d897e5.entry.js +1 -0
- package/dist/vega/p-72a4edf2.entry.js +1 -0
- package/dist/vega/{p-67cf7b9d.entry.js → p-7add21f8.entry.js} +1 -1
- package/dist/vega/p-7df1ad72.entry.js +1 -0
- package/dist/vega/p-7e70938a.entry.js +1 -0
- package/dist/vega/{p-5064a804.js → p-864de9a1.js} +1 -1
- package/dist/vega/{p-d2a2af2c.entry.js → p-86713a15.entry.js} +1 -1
- package/dist/vega/{p-acf6908c.entry.js → p-8a0d7805.entry.js} +1 -1
- package/dist/vega/{p-0bc7c935.js → p-8bdc9e75.js} +1 -1
- package/dist/vega/p-8e31e7ea.js +1 -0
- package/dist/vega/{p-4a9a42e7.entry.js → p-901b20d6.entry.js} +1 -1
- package/dist/vega/{p-81ffd087.entry.js → p-90954fe4.entry.js} +1 -1
- package/dist/vega/{p-7893d070.js → p-9c0cda62.js} +1 -1
- package/dist/vega/{p-d516cc5d.entry.js → p-9d3292b7.entry.js} +1 -1
- package/dist/vega/{p-36a19c06.entry.js → p-9eab97ee.entry.js} +1 -1
- package/dist/vega/{p-a88c382b.entry.js → p-a0bd5bd7.entry.js} +1 -1
- package/dist/vega/{p-a6ef59b9.js → p-a0dab2d0.js} +1 -1
- package/dist/vega/{p-12e6173c.entry.js → p-a1fbf49b.entry.js} +1 -1
- package/dist/vega/{p-9524e48a.entry.js → p-aab6f547.entry.js} +1 -1
- package/dist/vega/{p-392cf0cf.entry.js → p-b264d92e.entry.js} +1 -1
- package/dist/vega/{p-9eed80df.entry.js → p-b51fa6ac.entry.js} +1 -1
- package/dist/vega/{p-43701910.entry.js → p-b7594b78.entry.js} +1 -1
- package/dist/vega/{p-055d7856.entry.js → p-c192c2d2.entry.js} +1 -1
- package/dist/vega/{p-b59c8fdf.entry.js → p-c4447540.entry.js} +1 -1
- package/dist/vega/{p-ad1460f2.entry.js → p-c8023434.entry.js} +1 -1
- package/dist/vega/{p-5fbb2aba.entry.js → p-c91190df.entry.js} +1 -1
- package/dist/vega/{p-99b9b320.entry.js → p-cada532e.entry.js} +1 -1
- package/dist/vega/{p-fba8f692.entry.js → p-d0f0a908.entry.js} +1 -1
- package/dist/vega/{p-5477b0ef.entry.js → p-d53b262c.entry.js} +1 -1
- package/dist/vega/{p-e8fc027e.entry.js → p-d9cb6ec4.entry.js} +1 -1
- package/dist/vega/p-e16e23b7.entry.js +1 -0
- package/dist/vega/{p-87a1fc77.entry.js → p-e37ac14f.entry.js} +1 -1
- package/dist/vega/{p-aa7037b1.entry.js → p-e5f1fd0b.entry.js} +1 -1
- package/dist/vega/p-e7b00bf0.js +1 -0
- package/dist/vega/{p-6d073cd2.entry.js → p-e81b672b.entry.js} +1 -1
- package/dist/vega/{p-bc8fd0ee.entry.js → p-e860318d.entry.js} +1 -1
- package/dist/vega/{p-0e1872b7.entry.js → p-ea723616.entry.js} +1 -1
- package/dist/vega/{p-1e194737.js → p-eb832119.js} +1 -1
- package/dist/vega/{p-30dcf606.entry.js → p-ec7d98f0.entry.js} +1 -1
- package/dist/vega/{p-86782109.js → p-eea36d3c.js} +1 -1
- package/dist/vega/{p-7703176f.entry.js → p-f0f787a2.entry.js} +1 -1
- package/dist/vega/p-f2f31686.entry.js +1 -0
- package/dist/vega/{p-fc21fb2d.entry.js → p-f41ae5e0.entry.js} +1 -1
- package/dist/vega/p-f4a13f3f.js +1 -0
- package/dist/vega/{p-0f9b3ffd.entry.js → p-f9a9fca6.entry.js} +1 -1
- package/dist/vega/{p-dbd2a79b.entry.js → p-fac5990f.entry.js} +1 -1
- package/dist/vega/{p-0228c197.entry.js → p-fd0b2509.entry.js} +1 -1
- package/dist/vega/{p-044f6193.js → p-fecb4044.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +2 -2
- package/dist/vega/p-3f5bac0f.entry.js +0 -1
- package/dist/vega/p-66759f4e.js +0 -1
- package/dist/vega/p-6dc2cae8.entry.js +0 -1
- package/dist/vega/p-7f6d6c20.js +0 -1
- package/dist/vega/p-8f4e3a60.js +0 -1
- package/dist/vega/p-9ba14b7c.entry.js +0 -1
- package/dist/vega/p-ae3048da.entry.js +0 -1
- package/dist/vega/p-b4bfbcb9.entry.js +0 -1
- package/dist/vega/p-cd0575c3.entry.js +0 -1
- package/dist/vega/p-d2284b8a.js +0 -1
- package/dist/vega/p-f5a2038f.js +0 -1
- package/dist/vega/p-fed9220b.entry.js +0 -1
- /package/dist/vega/{p-eda5b7fd.js → p-05b10af4.js} +0 -0
- /package/dist/vega/{p-50677c8e.js → p-0c8bd757.js} +0 -0
- /package/dist/vega/{p-af7a3154.js → p-13effc6b.js} +0 -0
- /package/dist/vega/{p-ecfa7534.js → p-272440e8.js} +0 -0
- /package/dist/vega/{p-9b797118.js → p-519a7d55.js} +0 -0
- /package/dist/vega/{p-c0291e2e.js → p-834434d5.js} +0 -0
- /package/dist/vega/{p-bf953152.js → p-d5776087.js} +0 -0
- /package/dist/vega/{p-0fd6c35b.js → p-fa5eb496.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n,i as t,e as r,f as e,g as u,B as i}from"./p-eda5b7fd.js";import{f as o}from"./p-d27ae9ff.js";function a(n,t){return null==n||null==t?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function f(n,t){return null==n||null==t?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function c(n){let t,r,e;function u(n,e,u=0,i=n.length){if(u<i){if(0!==t(e,e))return i;do{const t=u+i>>>1;r(n[t],e)<0?u=t+1:i=t}while(u<i)}return u}return 2!==n.length?(t=a,r=(t,r)=>a(n(t),r),e=(t,r)=>n(t)-r):(t=n===a||n===f?n:s,r=n,e=n),{left:u,center:function(n,t,r=0,i=n.length){const o=u(n,t,r,i-1);return o>r&&e(n[o-1],t)>-e(n[o],t)?o-1:o},right:function(n,e,u=0,i=n.length){if(u<i){if(0!==t(e,e))return i;do{const t=u+i>>>1;r(n[t],e)<=0?u=t+1:i=t}while(u<i)}return u}}}function s(){return 0}const h=c(a).right;function l(n,t){let r,e;if(void 0===t)for(const t of n)null!=t&&(void 0===r?t>=t&&(r=e=t):(r>t&&(r=t),e<t&&(e=t)));else{let u=-1;for(let i of n)null!=(i=t(i,++u,n))&&(void 0===r?i>=i&&(r=e=i):(r>i&&(r=i),e<i&&(e=i)))}return[r,e]}c((function(n){return null===n?NaN:+n}));class v extends Map{constructor(n,t=d){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=n)for(const[t,r]of n)this.set(t,r)}get(n){return super.get(M(this,n))}has(n){return super.has(M(this,n))}set(n,t){return super.set(function({_intern:n,_key:t},r){const e=t(r);return n.has(e)?n.get(e):(n.set(e,r),r)}(this,n),t)}delete(n){return super.delete(function({_intern:n,_key:t},r){const e=t(r);return n.has(e)&&(r=n.get(e),n.delete(e)),r}(this,n))}}function M({_intern:n,_key:t},r){const e=t(r);return n.has(e)?n.get(e):r}function d(n){return null!==n&&"object"==typeof n?n.valueOf():n}const y=Math.sqrt(50),w=Math.sqrt(10),p=Math.sqrt(2);function b(n,t,r){const e=(t-n)/Math.max(0,r),u=Math.floor(Math.log10(e)),i=e/Math.pow(10,u),o=i>=y?10:i>=w?5:i>=p?2:1;let a,f,c;return u<0?(c=Math.pow(10,-u)/o,a=Math.round(n*c),f=Math.round(t*c),a/c<n&&++a,f/c>t&&--f,c=-c):(c=Math.pow(10,u)*o,a=Math.round(n/c),f=Math.round(t/c),a*c<n&&++a,f*c>t&&--f),f<a&&.5<=r&&r<2?b(n,t,2*r):[a,f,c]}function g(n,t,r){return b(n=+n,t=+t,r=+r)[2]}function m(n,t,r){r=+r;const e=(t=+t)<(n=+n),u=e?g(t,n,r):g(n,t,r);return(e?-1:1)*(u<0?1/-u:u)}function N(n,t,r){n=+n,t=+t,r=(u=arguments.length)<2?(t=n,n=0,1):u<3?1:+r;for(var e=-1,u=0|Math.max(0,Math.ceil((t-n)/r)),i=new Array(u);++e<u;)i[e]=n+e*r;return i}function A(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,u=t.slice();return function(i){for(r=0;r<e;++r)u[r]=n[r]*(1-i)+t[r]*i;return u}}function D(n,t){var r,e=t?t.length:0,u=n?Math.min(e,n.length):0,i=new Array(u),o=new Array(e);for(r=0;r<u;++r)i[r]=k(n[r],t[r]);for(;r<e;++r)o[r]=t[r];return function(n){for(r=0;r<u;++r)o[r]=i[r](n);return o}}function S(n,t){var r=new Date;return n=+n,t=+t,function(e){return r.setTime(n*(1-e)+t*e),r}}function x(n,t){var r,e={},u={};for(r in null!==n&&"object"==typeof n||(n={}),null!==t&&"object"==typeof t||(t={}),t)r in n?e[r]=k(n[r],t[r]):u[r]=t[r];return function(n){for(r in e)u[r]=e[r](n);return u}}function k(i,o){var a,f,c=typeof o;return null==o||"boolean"===c?n(o):("number"===c?t:"string"===c?(a=r(o))?(o=a,e):u:o instanceof r?e:o instanceof Date?S:(f=o,!ArrayBuffer.isView(f)||f instanceof DataView?Array.isArray(o)?D:"function"!=typeof o.valueOf&&"function"!=typeof o.toString||isNaN(o)?x:t:A))(i,o)}function F(n,t){return n=+n,t=+t,function(r){return Math.round(n*(1-r)+t*r)}}function W(n,t){if((r=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var r,e=n.slice(0,r);return[e.length>1?e[0]+e.slice(2):e,+n.slice(r+1)]}function j(n){return(n=W(Math.abs(n)))?n[1]:NaN}var I,Z=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _(n){if(!(t=Z.exec(n)))throw new Error("invalid format: "+n);var t;return new H({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function H(n){this.fill=void 0===n.fill?" ":n.fill+"",this.align=void 0===n.align?">":n.align+"",this.sign=void 0===n.sign?"-":n.sign+"",this.symbol=void 0===n.symbol?"":n.symbol+"",this.zero=!!n.zero,this.width=void 0===n.width?void 0:+n.width,this.comma=!!n.comma,this.precision=void 0===n.precision?void 0:+n.precision,this.trim=!!n.trim,this.type=void 0===n.type?"":n.type+""}function L(n,t){var r=W(n,t);if(!r)return n+"";var e=r[0],u=r[1];return u<0?"0."+new Array(-u).join("0")+e:e.length>u+1?e.slice(0,u+1)+"."+e.slice(u+1):e+new Array(u-e.length+2).join("0")}_.prototype=H.prototype,H.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const T={"%":(n,t)=>(100*n).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:function(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)},e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>L(100*n,t),r:L,s:function(n,t){var r=W(n,t);if(!r)return n+"";var e=r[0],u=r[1],i=u-(I=3*Math.max(-8,Math.min(8,Math.floor(u/3))))+1,o=e.length;return i===o?e:i>o?e+new Array(i-o+1).join("0"):i>0?e.slice(0,i)+"."+e.slice(i):"0."+new Array(1-i).join("0")+W(n,Math.max(0,t+i-1))[0]},X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function X(n){return n}var Y,$,B,J=Array.prototype.map,V=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function z(n,t){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(t).domain(n)}return this}Y=function(n){var t,r,e=void 0===n.grouping||void 0===n.thousands?X:(t=J.call(n.grouping,Number),r=n.thousands+"",function(n,e){for(var u=n.length,i=[],o=0,a=t[0],f=0;u>0&&a>0&&(f+a+1>e&&(a=Math.max(1,e-f)),i.push(n.substring(u-=a,u+a)),!((f+=a+1)>e));)a=t[o=(o+1)%t.length];return i.reverse().join(r)}),u=void 0===n.currency?"":n.currency[0]+"",i=void 0===n.currency?"":n.currency[1]+"",o=void 0===n.decimal?".":n.decimal+"",a=void 0===n.numerals?X:function(n){return function(t){return t.replace(/[0-9]/g,(function(t){return n[+t]}))}}(J.call(n.numerals,String)),f=void 0===n.percent?"%":n.percent+"",c=void 0===n.minus?"−":n.minus+"",s=void 0===n.nan?"NaN":n.nan+"";function h(n){var t=(n=_(n)).fill,r=n.align,h=n.sign,l=n.symbol,v=n.zero,M=n.width,d=n.comma,y=n.precision,w=n.trim,p=n.type;"n"===p?(d=!0,p="g"):T[p]||(void 0===y&&(y=12),w=!0,p="g"),(v||"0"===t&&"="===r)&&(v=!0,t="0",r="=");var b="$"===l?u:"#"===l&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",g="$"===l?i:/[%p]/.test(p)?f:"",m=T[p],N=/[defgprs%]/.test(p);function A(n){var u,i,f,l=b,A=g;if("c"===p)A=m(n)+A,n="";else{var D=(n=+n)<0||1/n<0;if(n=isNaN(n)?s:m(Math.abs(n),y),w&&(n=function(n){n:for(var t,r=n.length,e=1,u=-1;e<r;++e)switch(n[e]){case".":u=t=e;break;case"0":0===u&&(u=e),t=e;break;default:if(!+n[e])break n;u>0&&(u=0)}return u>0?n.slice(0,u)+n.slice(t+1):n}(n)),D&&0==+n&&"+"!==h&&(D=!1),l=(D?"("===h?h:c:"-"===h||"("===h?"":h)+l,A=("s"===p?V[8+I/3]:"")+A+(D&&"("===h?")":""),N)for(u=-1,i=n.length;++u<i;)if(48>(f=n.charCodeAt(u))||f>57){A=(46===f?o+n.slice(u+1):n.slice(u))+A,n=n.slice(0,u);break}}d&&!v&&(n=e(n,1/0));var S=l.length+n.length+A.length,x=S<M?new Array(M-S+1).join(t):"";switch(d&&v&&(n=e(x+n,x.length?M-A.length:1/0),x=""),r){case"<":n=l+n+A+x;break;case"=":n=l+x+n+A;break;case"^":n=x.slice(0,S=x.length>>1)+l+n+A+x.slice(S);break;default:n=x+l+n+A}return a(n)}return y=void 0===y?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),A.toString=function(){return n+""},A}return{format:h,formatPrefix:function(n,t){var r=h(((n=_(n)).type="f",n)),e=3*Math.max(-8,Math.min(8,Math.floor(j(t)/3))),u=Math.pow(10,-e),i=V[8+e/3];return function(n){return r(u*n)+i}}}}({thousands:",",grouping:[3],currency:["$",""]}),$=Y.format,B=Y.formatPrefix;const E=Symbol("implicit");function G(){var n=new v,t=[],r=[],e=E;function u(u){let i=n.get(u);if(void 0===i){if(e!==E)return e;n.set(u,i=t.push(u)-1)}return r[i%r.length]}return u.domain=function(r){if(!arguments.length)return t.slice();t=[],n=new v;for(const e of r)n.has(e)||n.set(e,t.push(e)-1);return u},u.range=function(n){return arguments.length?(r=Array.from(n),u):r.slice()},u.unknown=function(n){return arguments.length?(e=n,u):e},u.copy=function(){return G(t,r).unknown(e)},z.apply(u,arguments),u}function q(){var n,t,r=G().unknown(void 0),e=r.domain,u=r.range,i=0,o=1,a=!1,f=0,c=0,s=.5;function h(){var r=e().length,h=o<i,l=h?o:i,v=h?i:o;n=(v-l)/Math.max(1,r-f+2*c),a&&(n=Math.floor(n)),l+=(v-l-n*(r-f))*s,t=n*(1-f),a&&(l=Math.round(l),t=Math.round(t));var M=N(r).map((function(t){return l+n*t}));return u(h?M.reverse():M)}return delete r.unknown,r.domain=function(n){return arguments.length?(e(n),h()):e()},r.range=function(n){return arguments.length?([i,o]=n,i=+i,o=+o,h()):[i,o]},r.rangeRound=function(n){return[i,o]=n,i=+i,o=+o,a=!0,h()},r.bandwidth=function(){return t},r.step=function(){return n},r.round=function(n){return arguments.length?(a=!!n,h()):a},r.padding=function(n){return arguments.length?(f=Math.min(1,c=+n),h()):f},r.paddingInner=function(n){return arguments.length?(f=Math.min(1,n),h()):f},r.paddingOuter=function(n){return arguments.length?(c=+n,h()):c},r.align=function(n){return arguments.length?(s=Math.max(0,Math.min(1,n)),h()):s},r.copy=function(){return q(e(),[i,o]).round(a).paddingInner(f).paddingOuter(c).align(s)},z.apply(h(),arguments)}function P(n){return+n}var Q=[0,1];function U(n){return n}function O(n,t){return(t-=n=+n)?function(r){return(r-n)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function R(n,t,r){var e=n[0],u=n[1],i=t[0],o=t[1];return u<e?(e=O(u,e),i=r(o,i)):(e=O(e,u),i=r(i,o)),function(n){return i(e(n))}}function C(n,t,r){var e=Math.min(n.length,t.length)-1,u=new Array(e),i=new Array(e),o=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<e;)u[o]=O(n[o],n[o+1]),i[o]=r(t[o],t[o+1]);return function(t){var r=h(n,t,1,e)-1;return i[r](u[r](t))}}function K(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function nn(){return function(){var n,r,e,u,i,o,a=Q,f=Q,c=k,s=U;function h(){var n,t,r,e=Math.min(a.length,f.length);return s!==U&&((n=a[0])>(t=a[e-1])&&(r=n,n=t,t=r),s=function(r){return Math.max(n,Math.min(t,r))}),u=e>2?C:R,i=o=null,l}function l(t){return null==t||isNaN(t=+t)?e:(i||(i=u(a.map(n),f,c)))(n(s(t)))}return l.invert=function(e){return s(r((o||(o=u(f,a.map(n),t)))(e)))},l.domain=function(n){return arguments.length?(a=Array.from(n,P),h()):a.slice()},l.range=function(n){return arguments.length?(f=Array.from(n),h()):f.slice()},l.rangeRound=function(n){return f=Array.from(n),c=F,h()},l.clamp=function(n){return arguments.length?(s=!!n||U,h()):s!==U},l.interpolate=function(n){return arguments.length?(c=n,h()):c},l.unknown=function(n){return arguments.length?(e=n,l):e},function(t,e){return n=t,r=e,h()}}()(U,U)}function tn(n){var t=n.domain;return n.ticks=function(n){var r=t();return function(n,t,r){if(!((r=+r)>0))return[];if((n=+n)==(t=+t))return[n];const e=t<n,[u,i,o]=e?b(t,n,r):b(n,t,r);if(!(i>=u))return[];const a=i-u+1,f=new Array(a);if(e)if(o<0)for(let n=0;n<a;++n)f[n]=(i-n)/-o;else for(let n=0;n<a;++n)f[n]=(i-n)*o;else if(o<0)for(let n=0;n<a;++n)f[n]=(u+n)/-o;else for(let n=0;n<a;++n)f[n]=(u+n)*o;return f}(r[0],r[r.length-1],null==n?10:n)},n.tickFormat=function(n,r){var e=t();return function(n,t,r,e){var u,i=m(n,t,r);switch((e=_(null==e?",f":e)).type){case"s":var o=Math.max(Math.abs(n),Math.abs(t));return null!=e.precision||isNaN(u=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(j(t)/3)))-j(Math.abs(n)))}(i,o))||(e.precision=u),B(e,o);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(u=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,j(t)-j(n))+1}(i,Math.max(Math.abs(n),Math.abs(t))))||(e.precision=u-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(u=function(n){return Math.max(0,-j(Math.abs(n)))}(i))||(e.precision=u-2*("%"===e.type))}return $(e)}(e[0],e[e.length-1],null==n?10:n,r)},n.nice=function(r){null==r&&(r=10);var e,u,i=t(),o=0,a=i.length-1,f=i[o],c=i[a],s=10;for(c<f&&(u=f,f=c,c=u,u=o,o=a,a=u);s-- >0;){if((u=g(f,c,r))===e)return i[o]=f,i[a]=c,t(i);if(u>0)f=Math.floor(f/u)*u,c=Math.ceil(c/u)*u;else{if(!(u<0))break;f=Math.ceil(f*u)/u,c=Math.floor(c*u)/u}e=u}return n},n}function rn(){var n=nn();return n.copy=function(){return K(n,rn())},z.apply(n,arguments),tn(n)}const en=new Date,un=new Date;function on(n,t,r,e){function u(t){return n(t=0===arguments.length?new Date:new Date(+t)),t}return u.floor=t=>(n(t=new Date(+t)),t),u.ceil=r=>(n(r=new Date(r-1)),t(r,1),n(r),r),u.round=n=>{const t=u(n),r=u.ceil(n);return n-t<r-n?t:r},u.offset=(n,r)=>(t(n=new Date(+n),null==r?1:Math.floor(r)),n),u.range=(r,e,i)=>{const o=[];if(r=u.ceil(r),i=null==i?1:Math.floor(i),!(r<e&&i>0))return o;let a;do{o.push(a=new Date(+r)),t(r,i),n(r)}while(a<r&&r<e);return o},u.filter=r=>on((t=>{if(t>=t)for(;n(t),!r(t);)t.setTime(t-1)}),((n,e)=>{if(n>=n)if(e<0)for(;++e<=0;)for(;t(n,-1),!r(n););else for(;--e>=0;)for(;t(n,1),!r(n););})),r&&(u.count=(t,e)=>(en.setTime(+t),un.setTime(+e),n(en),n(un),Math.floor(r(en,un))),u.every=n=>(n=Math.floor(n),isFinite(n)&&n>0?n>1?u.filter(e?t=>e(t)%n==0:t=>u.count(0,t)%n==0):u:null)),u}const an=on((()=>{}),((n,t)=>{n.setTime(+n+t)}),((n,t)=>t-n));an.every=n=>(n=Math.floor(n),isFinite(n)&&n>0?n>1?on((t=>{t.setTime(Math.floor(t/n)*n)}),((t,r)=>{t.setTime(+t+r*n)}),((t,r)=>(r-t)/n)):an:null);const fn=on((n=>{n.setTime(n-n.getMilliseconds())}),((n,t)=>{n.setTime(+n+1e3*t)}),((n,t)=>(t-n)/1e3),(n=>n.getUTCSeconds())),cn=on((n=>{n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds())}),((n,t)=>{n.setTime(+n+6e4*t)}),((n,t)=>(t-n)/6e4),(n=>n.getMinutes()));on((n=>{n.setUTCSeconds(0,0)}),((n,t)=>{n.setTime(+n+6e4*t)}),((n,t)=>(t-n)/6e4),(n=>n.getUTCMinutes()));const sn=on((n=>{n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds()-6e4*n.getMinutes())}),((n,t)=>{n.setTime(+n+36e5*t)}),((n,t)=>(t-n)/36e5),(n=>n.getHours()));on((n=>{n.setUTCMinutes(0,0,0)}),((n,t)=>{n.setTime(+n+36e5*t)}),((n,t)=>(t-n)/36e5),(n=>n.getUTCHours()));const hn=on((n=>n.setHours(0,0,0,0)),((n,t)=>n.setDate(n.getDate()+t)),((n,t)=>(t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5),(n=>n.getDate()-1)),ln=on((n=>{n.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCDate(n.getUTCDate()+t)}),((n,t)=>(t-n)/864e5),(n=>n.getUTCDate()-1));function vn(n){return on((t=>{t.setDate(t.getDate()-(t.getDay()+7-n)%7),t.setHours(0,0,0,0)}),((n,t)=>{n.setDate(n.getDate()+7*t)}),((n,t)=>(t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/6048e5))}on((n=>{n.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCDate(n.getUTCDate()+t)}),((n,t)=>(t-n)/864e5),(n=>Math.floor(n/864e5)));const Mn=vn(0),dn=vn(1);vn(2),vn(3);const yn=vn(4);function wn(n){return on((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-n)%7),t.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCDate(n.getUTCDate()+7*t)}),((n,t)=>(t-n)/6048e5))}vn(5),vn(6);const pn=wn(0),bn=wn(1);wn(2),wn(3);const gn=wn(4);wn(5),wn(6);const mn=on((n=>{n.setDate(1),n.setHours(0,0,0,0)}),((n,t)=>{n.setMonth(n.getMonth()+t)}),((n,t)=>t.getMonth()-n.getMonth()+12*(t.getFullYear()-n.getFullYear())),(n=>n.getMonth()));on((n=>{n.setUTCDate(1),n.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCMonth(n.getUTCMonth()+t)}),((n,t)=>t.getUTCMonth()-n.getUTCMonth()+12*(t.getUTCFullYear()-n.getUTCFullYear())),(n=>n.getUTCMonth()));const Nn=on((n=>{n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,t)=>{n.setFullYear(n.getFullYear()+t)}),((n,t)=>t.getFullYear()-n.getFullYear()),(n=>n.getFullYear()));Nn.every=n=>isFinite(n=Math.floor(n))&&n>0?on((t=>{t.setFullYear(Math.floor(t.getFullYear()/n)*n),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,r)=>{t.setFullYear(t.getFullYear()+r*n)})):null;const An=on((n=>{n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t)}),((n,t)=>t.getUTCFullYear()-n.getUTCFullYear()),(n=>n.getUTCFullYear()));An.every=n=>isFinite(n=Math.floor(n))&&n>0?on((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/n)*n),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*n)})):null;const[Dn,Sn]=function(n){const t=[[fn,1,1e3],[fn,5,5e3],[fn,15,15e3],[fn,30,3e4],[cn,1,6e4],[cn,5,3e5],[cn,15,9e5],[cn,30,18e5],[sn,1,36e5],[sn,3,108e5],[sn,6,216e5],[sn,12,432e5],[hn,1,864e5],[hn,2,1728e5],[Mn,1,6048e5],[mn,1,2592e6],[mn,3,7776e6],[n,1,31536e6]];function r(r,e,u){const i=Math.abs(e-r)/u,o=c((([,,n])=>n)).right(t,i);if(o===t.length)return n.every(m(r/31536e6,e/31536e6,u));if(0===o)return an.every(Math.max(m(r,e,u),1));const[a,f]=t[i/t[o-1][2]<t[o][2]/i?o-1:o];return a.every(f)}return[function(n,t,e){const u=t<n;u&&([n,t]=[t,n]);const i=e&&"function"==typeof e.range?e:r(n,t,e),o=i?i.range(n,+t+1):[];return u?o.reverse():o},r]}(Nn);function xn(n){if(0<=n.y&&n.y<100){var t=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return t.setFullYear(n.y),t}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function kn(n){if(0<=n.y&&n.y<100){var t=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return t.setUTCFullYear(n.y),t}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function Fn(n,t,r){return{y:n,m:t,d:r,H:0,M:0,S:0,L:0}}var Wn,jn,In,Zn={"-":"",_:" ",0:"0"},_n=/^\s*\d+/,Hn=/^%/,Ln=/[\\^$*+?|[\]().{}]/g;function Tn(n,t,r){var e=n<0?"-":"",u=(e?-n:n)+"",i=u.length;return e+(i<r?new Array(r-i+1).join(t)+u:u)}function Xn(n){return n.replace(Ln,"\\$&")}function Yn(n){return new RegExp("^(?:"+n.map(Xn).join("|")+")","i")}function $n(n){return new Map(n.map(((n,t)=>[n.toLowerCase(),t])))}function Bn(n,t,r){var e=_n.exec(t.slice(r,r+1));return e?(n.w=+e[0],r+e[0].length):-1}function Jn(n,t,r){var e=_n.exec(t.slice(r,r+1));return e?(n.u=+e[0],r+e[0].length):-1}function Vn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.U=+e[0],r+e[0].length):-1}function zn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.V=+e[0],r+e[0].length):-1}function En(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.W=+e[0],r+e[0].length):-1}function Gn(n,t,r){var e=_n.exec(t.slice(r,r+4));return e?(n.y=+e[0],r+e[0].length):-1}function qn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.y=+e[0]+(+e[0]>68?1900:2e3),r+e[0].length):-1}function Pn(n,t,r){var e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return e?(n.Z=e[1]?0:-(e[2]+(e[3]||"00")),r+e[0].length):-1}function Qn(n,t,r){var e=_n.exec(t.slice(r,r+1));return e?(n.q=3*e[0]-3,r+e[0].length):-1}function Un(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.m=e[0]-1,r+e[0].length):-1}function On(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.d=+e[0],r+e[0].length):-1}function Rn(n,t,r){var e=_n.exec(t.slice(r,r+3));return e?(n.m=0,n.d=+e[0],r+e[0].length):-1}function Cn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.H=+e[0],r+e[0].length):-1}function Kn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.M=+e[0],r+e[0].length):-1}function nt(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.S=+e[0],r+e[0].length):-1}function tt(n,t,r){var e=_n.exec(t.slice(r,r+3));return e?(n.L=+e[0],r+e[0].length):-1}function rt(n,t,r){var e=_n.exec(t.slice(r,r+6));return e?(n.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function et(n,t,r){var e=Hn.exec(t.slice(r,r+1));return e?r+e[0].length:-1}function ut(n,t,r){var e=_n.exec(t.slice(r));return e?(n.Q=+e[0],r+e[0].length):-1}function it(n,t,r){var e=_n.exec(t.slice(r));return e?(n.s=+e[0],r+e[0].length):-1}function ot(n,t){return Tn(n.getDate(),t,2)}function at(n,t){return Tn(n.getHours(),t,2)}function ft(n,t){return Tn(n.getHours()%12||12,t,2)}function ct(n,t){return Tn(1+hn.count(Nn(n),n),t,3)}function st(n,t){return Tn(n.getMilliseconds(),t,3)}function ht(n,t){return st(n,t)+"000"}function lt(n,t){return Tn(n.getMonth()+1,t,2)}function vt(n,t){return Tn(n.getMinutes(),t,2)}function Mt(n,t){return Tn(n.getSeconds(),t,2)}function dt(n){var t=n.getDay();return 0===t?7:t}function yt(n,t){return Tn(Mn.count(Nn(n)-1,n),t,2)}function wt(n){var t=n.getDay();return t>=4||0===t?yn(n):yn.ceil(n)}function pt(n,t){return n=wt(n),Tn(yn.count(Nn(n),n)+(4===Nn(n).getDay()),t,2)}function bt(n){return n.getDay()}function gt(n,t){return Tn(dn.count(Nn(n)-1,n),t,2)}function mt(n,t){return Tn(n.getFullYear()%100,t,2)}function Nt(n,t){return Tn((n=wt(n)).getFullYear()%100,t,2)}function At(n,t){return Tn(n.getFullYear()%1e4,t,4)}function Dt(n,t){var r=n.getDay();return Tn((n=r>=4||0===r?yn(n):yn.ceil(n)).getFullYear()%1e4,t,4)}function St(n){var t=n.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tn(t/60|0,"0",2)+Tn(t%60,"0",2)}function xt(n,t){return Tn(n.getUTCDate(),t,2)}function kt(n,t){return Tn(n.getUTCHours(),t,2)}function Ft(n,t){return Tn(n.getUTCHours()%12||12,t,2)}function Wt(n,t){return Tn(1+ln.count(An(n),n),t,3)}function jt(n,t){return Tn(n.getUTCMilliseconds(),t,3)}function It(n,t){return jt(n,t)+"000"}function Zt(n,t){return Tn(n.getUTCMonth()+1,t,2)}function _t(n,t){return Tn(n.getUTCMinutes(),t,2)}function Ht(n,t){return Tn(n.getUTCSeconds(),t,2)}function Lt(n){var t=n.getUTCDay();return 0===t?7:t}function Tt(n,t){return Tn(pn.count(An(n)-1,n),t,2)}function Xt(n){var t=n.getUTCDay();return t>=4||0===t?gn(n):gn.ceil(n)}function Yt(n,t){return n=Xt(n),Tn(gn.count(An(n),n)+(4===An(n).getUTCDay()),t,2)}function $t(n){return n.getUTCDay()}function Bt(n,t){return Tn(bn.count(An(n)-1,n),t,2)}function Jt(n,t){return Tn(n.getUTCFullYear()%100,t,2)}function Vt(n,t){return Tn((n=Xt(n)).getUTCFullYear()%100,t,2)}function zt(n,t){return Tn(n.getUTCFullYear()%1e4,t,4)}function Et(n,t){var r=n.getUTCDay();return Tn((n=r>=4||0===r?gn(n):gn.ceil(n)).getUTCFullYear()%1e4,t,4)}function Gt(){return"+0000"}function qt(){return"%"}function Pt(n){return+n}function Qt(n){return Math.floor(+n/1e3)}function Ut(n){return new Date(n)}function Ot(n){return n instanceof Date?+n:+new Date(+n)}function Rt(n,t,r,e,u,i,o,a,f,c){var s=nn(),h=s.invert,l=s.domain,v=c(".%L"),M=c(":%S"),d=c("%I:%M"),y=c("%I %p"),w=c("%a %d"),p=c("%b %d"),b=c("%B"),g=c("%Y");function m(n){return(f(n)<n?v:a(n)<n?M:o(n)<n?d:i(n)<n?y:e(n)<n?u(n)<n?w:p:r(n)<n?b:g)(n)}return s.invert=function(n){return new Date(h(n))},s.domain=function(n){return arguments.length?l(Array.from(n,Ot)):l().map(Ut)},s.ticks=function(t){var r=l();return n(r[0],r[r.length-1],null==t?10:t)},s.tickFormat=function(n,t){return null==t?m:c(t)},s.nice=function(n){var r=l();return n&&"function"==typeof n.range||(n=t(r[0],r[r.length-1],null==n?10:n)),n?l(function(n,t){var r,e=0,u=(n=n.slice()).length-1,i=n[e],o=n[u];return o<i&&(r=e,e=u,u=r,r=i,i=o,o=r),n[e]=t.floor(i),n[u]=t.ceil(o),n}(r,n)):s},s.copy=function(){return K(s,Rt(n,t,r,e,u,i,o,a,f,c))},s}Wn=function(n){var t=n.dateTime,r=n.date,e=n.time,u=n.periods,i=n.days,o=n.shortDays,a=n.months,f=n.shortMonths,c=Yn(u),s=$n(u),h=Yn(i),l=$n(i),v=Yn(o),M=$n(o),d=Yn(a),y=$n(a),w=Yn(f),p=$n(f),b={a:function(n){return o[n.getDay()]},A:function(n){return i[n.getDay()]},b:function(n){return f[n.getMonth()]},B:function(n){return a[n.getMonth()]},c:null,d:ot,e:ot,f:ht,g:Nt,G:Dt,H:at,I:ft,j:ct,L:st,m:lt,M:vt,p:function(n){return u[+(n.getHours()>=12)]},q:function(n){return 1+~~(n.getMonth()/3)},Q:Pt,s:Qt,S:Mt,u:dt,U:yt,V:pt,w:bt,W:gt,x:null,X:null,y:mt,Y:At,Z:St,"%":qt},g={a:function(n){return o[n.getUTCDay()]},A:function(n){return i[n.getUTCDay()]},b:function(n){return f[n.getUTCMonth()]},B:function(n){return a[n.getUTCMonth()]},c:null,d:xt,e:xt,f:It,g:Vt,G:Et,H:kt,I:Ft,j:Wt,L:jt,m:Zt,M:_t,p:function(n){return u[+(n.getUTCHours()>=12)]},q:function(n){return 1+~~(n.getUTCMonth()/3)},Q:Pt,s:Qt,S:Ht,u:Lt,U:Tt,V:Yt,w:$t,W:Bt,x:null,X:null,y:Jt,Y:zt,Z:Gt,"%":qt},m={a:function(n,t,r){var e=v.exec(t.slice(r));return e?(n.w=M.get(e[0].toLowerCase()),r+e[0].length):-1},A:function(n,t,r){var e=h.exec(t.slice(r));return e?(n.w=l.get(e[0].toLowerCase()),r+e[0].length):-1},b:function(n,t,r){var e=w.exec(t.slice(r));return e?(n.m=p.get(e[0].toLowerCase()),r+e[0].length):-1},B:function(n,t,r){var e=d.exec(t.slice(r));return e?(n.m=y.get(e[0].toLowerCase()),r+e[0].length):-1},c:function(n,r,e){return D(n,t,r,e)},d:On,e:On,f:rt,g:qn,G:Gn,H:Cn,I:Cn,j:Rn,L:tt,m:Un,M:Kn,p:function(n,t,r){var e=c.exec(t.slice(r));return e?(n.p=s.get(e[0].toLowerCase()),r+e[0].length):-1},q:Qn,Q:ut,s:it,S:nt,u:Jn,U:Vn,V:zn,w:Bn,W:En,x:function(n,t,e){return D(n,r,t,e)},X:function(n,t,r){return D(n,e,t,r)},y:qn,Y:Gn,Z:Pn,"%":et};function N(n,t){return function(r){var e,u,i,o=[],a=-1,f=0,c=n.length;for(r instanceof Date||(r=new Date(+r));++a<c;)37===n.charCodeAt(a)&&(o.push(n.slice(f,a)),null!=(u=Zn[e=n.charAt(++a)])?e=n.charAt(++a):u="e"===e?" ":"0",(i=t[e])&&(e=i(r,u)),o.push(e),f=a+1);return o.push(n.slice(f,a)),o.join("")}}function A(n,t){return function(r){var e,u,i=Fn(1900,void 0,1);if(D(i,n,r+="",0)!=r.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(u=(e=kn(Fn(i.y,0,1))).getUTCDay(),e=u>4||0===u?bn.ceil(e):bn(e),e=ln.offset(e,7*(i.V-1)),i.y=e.getUTCFullYear(),i.m=e.getUTCMonth(),i.d=e.getUTCDate()+(i.w+6)%7):(u=(e=xn(Fn(i.y,0,1))).getDay(),e=u>4||0===u?dn.ceil(e):dn(e),e=hn.offset(e,7*(i.V-1)),i.y=e.getFullYear(),i.m=e.getMonth(),i.d=e.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),u="Z"in i?kn(Fn(i.y,0,1)).getUTCDay():xn(Fn(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(u+5)%7:i.w+7*i.U-(u+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,kn(i)):xn(i)}}function D(n,t,r,e){for(var u,i,o=0,a=t.length,f=r.length;o<a;){if(e>=f)return-1;if(37===(u=t.charCodeAt(o++))){if(u=t.charAt(o++),!(i=m[u in Zn?t.charAt(o++):u])||(e=i(n,r,e))<0)return-1}else if(u!=r.charCodeAt(e++))return-1}return e}return b.x=N(r,b),b.X=N(e,b),b.c=N(t,b),g.x=N(r,g),g.X=N(e,g),g.c=N(t,g),{format:function(n){var t=N(n+="",b);return t.toString=function(){return n},t},parse:function(n){var t=A(n+="",!1);return t.toString=function(){return n},t},utcFormat:function(n){var t=N(n+="",g);return t.toString=function(){return n},t},utcParse:function(n){var t=A(n+="",!0);return t.toString=function(){return n},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),jn=Wn.format,In=Wn.parse;class Ct extends i{addInteractionSupport(){}draw(){this.renderer.drawXAxis(this.options.renderOptions,this.getColorFromToken("bg-tertiary"),this.getStyleTextFromToken("v-font-field-label-sm v-text-secondary"))}}class Kt extends i{addInteractionSupport(){}draw(){this.renderer.drawYAxis(this.options.renderOptions,this.getColorFromToken("bg-tertiary"),this.getStyleTextFromToken("v-font-field-label-sm v-text-secondary"))}}class nr{process(n,t){const{dataSource:r,xAxis:e,container:u}=n,{innerWidth:i,innerHeight:o}=t;return{start:{x:0,y:o},end:{x:i,y:o},tickSize:4,scale:this.getScale(r,i,(null==e?void 0:e.type)||"value","VEGA-LINE-CHART"===u.tagName?1:.1,null==e?void 0:e.sorter),labelFormatter:null==e?void 0:e.labelFormatter,width:i,height:o}}getScale(n,t,r,e=.1,u){const i=o(n).map((n=>n.x));let a;return a="time"===r?function(){return z.apply(Rt(Dn,Sn,Nn,mn,Mn,hn,sn,cn,fn,jn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain(l(i)).range([0,t]):"category"===r?q("function"==typeof u?i.sort(u):i,[0,t]).padding(e):rn().domain(l(i)).range([0,t]),a}}class tr{process(n,t){const{dataSource:r,yAxis:e}=n,{innerWidth:u,innerHeight:i}=t,{scale:o,ticks:a}=this.getScale(r,[i,0],4);return{start:{x:0,y:0},end:{x:0,y:i},tickSize:a,scale:o,labelFormatter:null==e?void 0:e.labelFormatter,width:u,height:i}}getScale(n,t,r){const e=o(n).map((n=>n.y)).concat(0);let u=function(n){let t;for(const r of n)null!=r&&(t<r||void 0===t&&r>=r)&&(t=r);return t}(e),i=function(n){let t;for(const r of n)null!=r&&(t>r||void 0===t&&r>=r)&&(t=r);return t}(e),a=rn().domain([i,u]);const f=a.ticks(r),c=Math.abs(f[f.length-1]-f[f.length-2]),[s,h]=l(f);return i<s&&(i=s-c,r+=1),u>h&&(u=h+c,r+=1),a=rn().domain([i,u]).range(t),{scale:a,ticks:r}}}export{nr as X,tr as Y,jn as a,cn as b,sn as c,hn as d,mn as e,Mn as f,Nn as g,Ct as h,Kt as i,fn as s,In as t}
|
|
1
|
+
import{d as n,i as t,e as r,f as e,g as u,B as i}from"./p-05b10af4.js";import{f as o}from"./p-d27ae9ff.js";function a(n,t){return null==n||null==t?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function f(n,t){return null==n||null==t?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function c(n){let t,r,e;function u(n,e,u=0,i=n.length){if(u<i){if(0!==t(e,e))return i;do{const t=u+i>>>1;r(n[t],e)<0?u=t+1:i=t}while(u<i)}return u}return 2!==n.length?(t=a,r=(t,r)=>a(n(t),r),e=(t,r)=>n(t)-r):(t=n===a||n===f?n:s,r=n,e=n),{left:u,center:function(n,t,r=0,i=n.length){const o=u(n,t,r,i-1);return o>r&&e(n[o-1],t)>-e(n[o],t)?o-1:o},right:function(n,e,u=0,i=n.length){if(u<i){if(0!==t(e,e))return i;do{const t=u+i>>>1;r(n[t],e)<=0?u=t+1:i=t}while(u<i)}return u}}}function s(){return 0}const h=c(a).right;function l(n,t){let r,e;if(void 0===t)for(const t of n)null!=t&&(void 0===r?t>=t&&(r=e=t):(r>t&&(r=t),e<t&&(e=t)));else{let u=-1;for(let i of n)null!=(i=t(i,++u,n))&&(void 0===r?i>=i&&(r=e=i):(r>i&&(r=i),e<i&&(e=i)))}return[r,e]}c((function(n){return null===n?NaN:+n}));class v extends Map{constructor(n,t=d){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=n)for(const[t,r]of n)this.set(t,r)}get(n){return super.get(M(this,n))}has(n){return super.has(M(this,n))}set(n,t){return super.set(function({_intern:n,_key:t},r){const e=t(r);return n.has(e)?n.get(e):(n.set(e,r),r)}(this,n),t)}delete(n){return super.delete(function({_intern:n,_key:t},r){const e=t(r);return n.has(e)&&(r=n.get(e),n.delete(e)),r}(this,n))}}function M({_intern:n,_key:t},r){const e=t(r);return n.has(e)?n.get(e):r}function d(n){return null!==n&&"object"==typeof n?n.valueOf():n}const y=Math.sqrt(50),w=Math.sqrt(10),p=Math.sqrt(2);function b(n,t,r){const e=(t-n)/Math.max(0,r),u=Math.floor(Math.log10(e)),i=e/Math.pow(10,u),o=i>=y?10:i>=w?5:i>=p?2:1;let a,f,c;return u<0?(c=Math.pow(10,-u)/o,a=Math.round(n*c),f=Math.round(t*c),a/c<n&&++a,f/c>t&&--f,c=-c):(c=Math.pow(10,u)*o,a=Math.round(n/c),f=Math.round(t/c),a*c<n&&++a,f*c>t&&--f),f<a&&.5<=r&&r<2?b(n,t,2*r):[a,f,c]}function g(n,t,r){return b(n=+n,t=+t,r=+r)[2]}function m(n,t,r){r=+r;const e=(t=+t)<(n=+n),u=e?g(t,n,r):g(n,t,r);return(e?-1:1)*(u<0?1/-u:u)}function N(n,t,r){n=+n,t=+t,r=(u=arguments.length)<2?(t=n,n=0,1):u<3?1:+r;for(var e=-1,u=0|Math.max(0,Math.ceil((t-n)/r)),i=new Array(u);++e<u;)i[e]=n+e*r;return i}function A(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,u=t.slice();return function(i){for(r=0;r<e;++r)u[r]=n[r]*(1-i)+t[r]*i;return u}}function D(n,t){var r,e=t?t.length:0,u=n?Math.min(e,n.length):0,i=new Array(u),o=new Array(e);for(r=0;r<u;++r)i[r]=k(n[r],t[r]);for(;r<e;++r)o[r]=t[r];return function(n){for(r=0;r<u;++r)o[r]=i[r](n);return o}}function S(n,t){var r=new Date;return n=+n,t=+t,function(e){return r.setTime(n*(1-e)+t*e),r}}function x(n,t){var r,e={},u={};for(r in null!==n&&"object"==typeof n||(n={}),null!==t&&"object"==typeof t||(t={}),t)r in n?e[r]=k(n[r],t[r]):u[r]=t[r];return function(n){for(r in e)u[r]=e[r](n);return u}}function k(i,o){var a,f,c=typeof o;return null==o||"boolean"===c?n(o):("number"===c?t:"string"===c?(a=r(o))?(o=a,e):u:o instanceof r?e:o instanceof Date?S:(f=o,!ArrayBuffer.isView(f)||f instanceof DataView?Array.isArray(o)?D:"function"!=typeof o.valueOf&&"function"!=typeof o.toString||isNaN(o)?x:t:A))(i,o)}function F(n,t){return n=+n,t=+t,function(r){return Math.round(n*(1-r)+t*r)}}function W(n,t){if((r=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var r,e=n.slice(0,r);return[e.length>1?e[0]+e.slice(2):e,+n.slice(r+1)]}function j(n){return(n=W(Math.abs(n)))?n[1]:NaN}var I,Z=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _(n){if(!(t=Z.exec(n)))throw new Error("invalid format: "+n);var t;return new H({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function H(n){this.fill=void 0===n.fill?" ":n.fill+"",this.align=void 0===n.align?">":n.align+"",this.sign=void 0===n.sign?"-":n.sign+"",this.symbol=void 0===n.symbol?"":n.symbol+"",this.zero=!!n.zero,this.width=void 0===n.width?void 0:+n.width,this.comma=!!n.comma,this.precision=void 0===n.precision?void 0:+n.precision,this.trim=!!n.trim,this.type=void 0===n.type?"":n.type+""}function L(n,t){var r=W(n,t);if(!r)return n+"";var e=r[0],u=r[1];return u<0?"0."+new Array(-u).join("0")+e:e.length>u+1?e.slice(0,u+1)+"."+e.slice(u+1):e+new Array(u-e.length+2).join("0")}_.prototype=H.prototype,H.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const T={"%":(n,t)=>(100*n).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:function(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)},e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>L(100*n,t),r:L,s:function(n,t){var r=W(n,t);if(!r)return n+"";var e=r[0],u=r[1],i=u-(I=3*Math.max(-8,Math.min(8,Math.floor(u/3))))+1,o=e.length;return i===o?e:i>o?e+new Array(i-o+1).join("0"):i>0?e.slice(0,i)+"."+e.slice(i):"0."+new Array(1-i).join("0")+W(n,Math.max(0,t+i-1))[0]},X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function X(n){return n}var Y,$,B,J=Array.prototype.map,V=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function z(n,t){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(t).domain(n)}return this}Y=function(n){var t,r,e=void 0===n.grouping||void 0===n.thousands?X:(t=J.call(n.grouping,Number),r=n.thousands+"",function(n,e){for(var u=n.length,i=[],o=0,a=t[0],f=0;u>0&&a>0&&(f+a+1>e&&(a=Math.max(1,e-f)),i.push(n.substring(u-=a,u+a)),!((f+=a+1)>e));)a=t[o=(o+1)%t.length];return i.reverse().join(r)}),u=void 0===n.currency?"":n.currency[0]+"",i=void 0===n.currency?"":n.currency[1]+"",o=void 0===n.decimal?".":n.decimal+"",a=void 0===n.numerals?X:function(n){return function(t){return t.replace(/[0-9]/g,(function(t){return n[+t]}))}}(J.call(n.numerals,String)),f=void 0===n.percent?"%":n.percent+"",c=void 0===n.minus?"−":n.minus+"",s=void 0===n.nan?"NaN":n.nan+"";function h(n){var t=(n=_(n)).fill,r=n.align,h=n.sign,l=n.symbol,v=n.zero,M=n.width,d=n.comma,y=n.precision,w=n.trim,p=n.type;"n"===p?(d=!0,p="g"):T[p]||(void 0===y&&(y=12),w=!0,p="g"),(v||"0"===t&&"="===r)&&(v=!0,t="0",r="=");var b="$"===l?u:"#"===l&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",g="$"===l?i:/[%p]/.test(p)?f:"",m=T[p],N=/[defgprs%]/.test(p);function A(n){var u,i,f,l=b,A=g;if("c"===p)A=m(n)+A,n="";else{var D=(n=+n)<0||1/n<0;if(n=isNaN(n)?s:m(Math.abs(n),y),w&&(n=function(n){n:for(var t,r=n.length,e=1,u=-1;e<r;++e)switch(n[e]){case".":u=t=e;break;case"0":0===u&&(u=e),t=e;break;default:if(!+n[e])break n;u>0&&(u=0)}return u>0?n.slice(0,u)+n.slice(t+1):n}(n)),D&&0==+n&&"+"!==h&&(D=!1),l=(D?"("===h?h:c:"-"===h||"("===h?"":h)+l,A=("s"===p?V[8+I/3]:"")+A+(D&&"("===h?")":""),N)for(u=-1,i=n.length;++u<i;)if(48>(f=n.charCodeAt(u))||f>57){A=(46===f?o+n.slice(u+1):n.slice(u))+A,n=n.slice(0,u);break}}d&&!v&&(n=e(n,1/0));var S=l.length+n.length+A.length,x=S<M?new Array(M-S+1).join(t):"";switch(d&&v&&(n=e(x+n,x.length?M-A.length:1/0),x=""),r){case"<":n=l+n+A+x;break;case"=":n=l+x+n+A;break;case"^":n=x.slice(0,S=x.length>>1)+l+n+A+x.slice(S);break;default:n=x+l+n+A}return a(n)}return y=void 0===y?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),A.toString=function(){return n+""},A}return{format:h,formatPrefix:function(n,t){var r=h(((n=_(n)).type="f",n)),e=3*Math.max(-8,Math.min(8,Math.floor(j(t)/3))),u=Math.pow(10,-e),i=V[8+e/3];return function(n){return r(u*n)+i}}}}({thousands:",",grouping:[3],currency:["$",""]}),$=Y.format,B=Y.formatPrefix;const E=Symbol("implicit");function G(){var n=new v,t=[],r=[],e=E;function u(u){let i=n.get(u);if(void 0===i){if(e!==E)return e;n.set(u,i=t.push(u)-1)}return r[i%r.length]}return u.domain=function(r){if(!arguments.length)return t.slice();t=[],n=new v;for(const e of r)n.has(e)||n.set(e,t.push(e)-1);return u},u.range=function(n){return arguments.length?(r=Array.from(n),u):r.slice()},u.unknown=function(n){return arguments.length?(e=n,u):e},u.copy=function(){return G(t,r).unknown(e)},z.apply(u,arguments),u}function q(){var n,t,r=G().unknown(void 0),e=r.domain,u=r.range,i=0,o=1,a=!1,f=0,c=0,s=.5;function h(){var r=e().length,h=o<i,l=h?o:i,v=h?i:o;n=(v-l)/Math.max(1,r-f+2*c),a&&(n=Math.floor(n)),l+=(v-l-n*(r-f))*s,t=n*(1-f),a&&(l=Math.round(l),t=Math.round(t));var M=N(r).map((function(t){return l+n*t}));return u(h?M.reverse():M)}return delete r.unknown,r.domain=function(n){return arguments.length?(e(n),h()):e()},r.range=function(n){return arguments.length?([i,o]=n,i=+i,o=+o,h()):[i,o]},r.rangeRound=function(n){return[i,o]=n,i=+i,o=+o,a=!0,h()},r.bandwidth=function(){return t},r.step=function(){return n},r.round=function(n){return arguments.length?(a=!!n,h()):a},r.padding=function(n){return arguments.length?(f=Math.min(1,c=+n),h()):f},r.paddingInner=function(n){return arguments.length?(f=Math.min(1,n),h()):f},r.paddingOuter=function(n){return arguments.length?(c=+n,h()):c},r.align=function(n){return arguments.length?(s=Math.max(0,Math.min(1,n)),h()):s},r.copy=function(){return q(e(),[i,o]).round(a).paddingInner(f).paddingOuter(c).align(s)},z.apply(h(),arguments)}function P(n){return+n}var Q=[0,1];function U(n){return n}function O(n,t){return(t-=n=+n)?function(r){return(r-n)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function R(n,t,r){var e=n[0],u=n[1],i=t[0],o=t[1];return u<e?(e=O(u,e),i=r(o,i)):(e=O(e,u),i=r(i,o)),function(n){return i(e(n))}}function C(n,t,r){var e=Math.min(n.length,t.length)-1,u=new Array(e),i=new Array(e),o=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<e;)u[o]=O(n[o],n[o+1]),i[o]=r(t[o],t[o+1]);return function(t){var r=h(n,t,1,e)-1;return i[r](u[r](t))}}function K(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function nn(){return function(){var n,r,e,u,i,o,a=Q,f=Q,c=k,s=U;function h(){var n,t,r,e=Math.min(a.length,f.length);return s!==U&&((n=a[0])>(t=a[e-1])&&(r=n,n=t,t=r),s=function(r){return Math.max(n,Math.min(t,r))}),u=e>2?C:R,i=o=null,l}function l(t){return null==t||isNaN(t=+t)?e:(i||(i=u(a.map(n),f,c)))(n(s(t)))}return l.invert=function(e){return s(r((o||(o=u(f,a.map(n),t)))(e)))},l.domain=function(n){return arguments.length?(a=Array.from(n,P),h()):a.slice()},l.range=function(n){return arguments.length?(f=Array.from(n),h()):f.slice()},l.rangeRound=function(n){return f=Array.from(n),c=F,h()},l.clamp=function(n){return arguments.length?(s=!!n||U,h()):s!==U},l.interpolate=function(n){return arguments.length?(c=n,h()):c},l.unknown=function(n){return arguments.length?(e=n,l):e},function(t,e){return n=t,r=e,h()}}()(U,U)}function tn(n){var t=n.domain;return n.ticks=function(n){var r=t();return function(n,t,r){if(!((r=+r)>0))return[];if((n=+n)==(t=+t))return[n];const e=t<n,[u,i,o]=e?b(t,n,r):b(n,t,r);if(!(i>=u))return[];const a=i-u+1,f=new Array(a);if(e)if(o<0)for(let n=0;n<a;++n)f[n]=(i-n)/-o;else for(let n=0;n<a;++n)f[n]=(i-n)*o;else if(o<0)for(let n=0;n<a;++n)f[n]=(u+n)/-o;else for(let n=0;n<a;++n)f[n]=(u+n)*o;return f}(r[0],r[r.length-1],null==n?10:n)},n.tickFormat=function(n,r){var e=t();return function(n,t,r,e){var u,i=m(n,t,r);switch((e=_(null==e?",f":e)).type){case"s":var o=Math.max(Math.abs(n),Math.abs(t));return null!=e.precision||isNaN(u=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(j(t)/3)))-j(Math.abs(n)))}(i,o))||(e.precision=u),B(e,o);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(u=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,j(t)-j(n))+1}(i,Math.max(Math.abs(n),Math.abs(t))))||(e.precision=u-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(u=function(n){return Math.max(0,-j(Math.abs(n)))}(i))||(e.precision=u-2*("%"===e.type))}return $(e)}(e[0],e[e.length-1],null==n?10:n,r)},n.nice=function(r){null==r&&(r=10);var e,u,i=t(),o=0,a=i.length-1,f=i[o],c=i[a],s=10;for(c<f&&(u=f,f=c,c=u,u=o,o=a,a=u);s-- >0;){if((u=g(f,c,r))===e)return i[o]=f,i[a]=c,t(i);if(u>0)f=Math.floor(f/u)*u,c=Math.ceil(c/u)*u;else{if(!(u<0))break;f=Math.ceil(f*u)/u,c=Math.floor(c*u)/u}e=u}return n},n}function rn(){var n=nn();return n.copy=function(){return K(n,rn())},z.apply(n,arguments),tn(n)}const en=new Date,un=new Date;function on(n,t,r,e){function u(t){return n(t=0===arguments.length?new Date:new Date(+t)),t}return u.floor=t=>(n(t=new Date(+t)),t),u.ceil=r=>(n(r=new Date(r-1)),t(r,1),n(r),r),u.round=n=>{const t=u(n),r=u.ceil(n);return n-t<r-n?t:r},u.offset=(n,r)=>(t(n=new Date(+n),null==r?1:Math.floor(r)),n),u.range=(r,e,i)=>{const o=[];if(r=u.ceil(r),i=null==i?1:Math.floor(i),!(r<e&&i>0))return o;let a;do{o.push(a=new Date(+r)),t(r,i),n(r)}while(a<r&&r<e);return o},u.filter=r=>on((t=>{if(t>=t)for(;n(t),!r(t);)t.setTime(t-1)}),((n,e)=>{if(n>=n)if(e<0)for(;++e<=0;)for(;t(n,-1),!r(n););else for(;--e>=0;)for(;t(n,1),!r(n););})),r&&(u.count=(t,e)=>(en.setTime(+t),un.setTime(+e),n(en),n(un),Math.floor(r(en,un))),u.every=n=>(n=Math.floor(n),isFinite(n)&&n>0?n>1?u.filter(e?t=>e(t)%n==0:t=>u.count(0,t)%n==0):u:null)),u}const an=on((()=>{}),((n,t)=>{n.setTime(+n+t)}),((n,t)=>t-n));an.every=n=>(n=Math.floor(n),isFinite(n)&&n>0?n>1?on((t=>{t.setTime(Math.floor(t/n)*n)}),((t,r)=>{t.setTime(+t+r*n)}),((t,r)=>(r-t)/n)):an:null);const fn=on((n=>{n.setTime(n-n.getMilliseconds())}),((n,t)=>{n.setTime(+n+1e3*t)}),((n,t)=>(t-n)/1e3),(n=>n.getUTCSeconds())),cn=on((n=>{n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds())}),((n,t)=>{n.setTime(+n+6e4*t)}),((n,t)=>(t-n)/6e4),(n=>n.getMinutes()));on((n=>{n.setUTCSeconds(0,0)}),((n,t)=>{n.setTime(+n+6e4*t)}),((n,t)=>(t-n)/6e4),(n=>n.getUTCMinutes()));const sn=on((n=>{n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds()-6e4*n.getMinutes())}),((n,t)=>{n.setTime(+n+36e5*t)}),((n,t)=>(t-n)/36e5),(n=>n.getHours()));on((n=>{n.setUTCMinutes(0,0,0)}),((n,t)=>{n.setTime(+n+36e5*t)}),((n,t)=>(t-n)/36e5),(n=>n.getUTCHours()));const hn=on((n=>n.setHours(0,0,0,0)),((n,t)=>n.setDate(n.getDate()+t)),((n,t)=>(t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5),(n=>n.getDate()-1)),ln=on((n=>{n.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCDate(n.getUTCDate()+t)}),((n,t)=>(t-n)/864e5),(n=>n.getUTCDate()-1));function vn(n){return on((t=>{t.setDate(t.getDate()-(t.getDay()+7-n)%7),t.setHours(0,0,0,0)}),((n,t)=>{n.setDate(n.getDate()+7*t)}),((n,t)=>(t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/6048e5))}on((n=>{n.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCDate(n.getUTCDate()+t)}),((n,t)=>(t-n)/864e5),(n=>Math.floor(n/864e5)));const Mn=vn(0),dn=vn(1);vn(2),vn(3);const yn=vn(4);function wn(n){return on((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-n)%7),t.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCDate(n.getUTCDate()+7*t)}),((n,t)=>(t-n)/6048e5))}vn(5),vn(6);const pn=wn(0),bn=wn(1);wn(2),wn(3);const gn=wn(4);wn(5),wn(6);const mn=on((n=>{n.setDate(1),n.setHours(0,0,0,0)}),((n,t)=>{n.setMonth(n.getMonth()+t)}),((n,t)=>t.getMonth()-n.getMonth()+12*(t.getFullYear()-n.getFullYear())),(n=>n.getMonth()));on((n=>{n.setUTCDate(1),n.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCMonth(n.getUTCMonth()+t)}),((n,t)=>t.getUTCMonth()-n.getUTCMonth()+12*(t.getUTCFullYear()-n.getUTCFullYear())),(n=>n.getUTCMonth()));const Nn=on((n=>{n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,t)=>{n.setFullYear(n.getFullYear()+t)}),((n,t)=>t.getFullYear()-n.getFullYear()),(n=>n.getFullYear()));Nn.every=n=>isFinite(n=Math.floor(n))&&n>0?on((t=>{t.setFullYear(Math.floor(t.getFullYear()/n)*n),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,r)=>{t.setFullYear(t.getFullYear()+r*n)})):null;const An=on((n=>{n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t)}),((n,t)=>t.getUTCFullYear()-n.getUTCFullYear()),(n=>n.getUTCFullYear()));An.every=n=>isFinite(n=Math.floor(n))&&n>0?on((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/n)*n),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*n)})):null;const[Dn,Sn]=function(n){const t=[[fn,1,1e3],[fn,5,5e3],[fn,15,15e3],[fn,30,3e4],[cn,1,6e4],[cn,5,3e5],[cn,15,9e5],[cn,30,18e5],[sn,1,36e5],[sn,3,108e5],[sn,6,216e5],[sn,12,432e5],[hn,1,864e5],[hn,2,1728e5],[Mn,1,6048e5],[mn,1,2592e6],[mn,3,7776e6],[n,1,31536e6]];function r(r,e,u){const i=Math.abs(e-r)/u,o=c((([,,n])=>n)).right(t,i);if(o===t.length)return n.every(m(r/31536e6,e/31536e6,u));if(0===o)return an.every(Math.max(m(r,e,u),1));const[a,f]=t[i/t[o-1][2]<t[o][2]/i?o-1:o];return a.every(f)}return[function(n,t,e){const u=t<n;u&&([n,t]=[t,n]);const i=e&&"function"==typeof e.range?e:r(n,t,e),o=i?i.range(n,+t+1):[];return u?o.reverse():o},r]}(Nn);function xn(n){if(0<=n.y&&n.y<100){var t=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return t.setFullYear(n.y),t}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function kn(n){if(0<=n.y&&n.y<100){var t=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return t.setUTCFullYear(n.y),t}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function Fn(n,t,r){return{y:n,m:t,d:r,H:0,M:0,S:0,L:0}}var Wn,jn,In,Zn={"-":"",_:" ",0:"0"},_n=/^\s*\d+/,Hn=/^%/,Ln=/[\\^$*+?|[\]().{}]/g;function Tn(n,t,r){var e=n<0?"-":"",u=(e?-n:n)+"",i=u.length;return e+(i<r?new Array(r-i+1).join(t)+u:u)}function Xn(n){return n.replace(Ln,"\\$&")}function Yn(n){return new RegExp("^(?:"+n.map(Xn).join("|")+")","i")}function $n(n){return new Map(n.map(((n,t)=>[n.toLowerCase(),t])))}function Bn(n,t,r){var e=_n.exec(t.slice(r,r+1));return e?(n.w=+e[0],r+e[0].length):-1}function Jn(n,t,r){var e=_n.exec(t.slice(r,r+1));return e?(n.u=+e[0],r+e[0].length):-1}function Vn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.U=+e[0],r+e[0].length):-1}function zn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.V=+e[0],r+e[0].length):-1}function En(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.W=+e[0],r+e[0].length):-1}function Gn(n,t,r){var e=_n.exec(t.slice(r,r+4));return e?(n.y=+e[0],r+e[0].length):-1}function qn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.y=+e[0]+(+e[0]>68?1900:2e3),r+e[0].length):-1}function Pn(n,t,r){var e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return e?(n.Z=e[1]?0:-(e[2]+(e[3]||"00")),r+e[0].length):-1}function Qn(n,t,r){var e=_n.exec(t.slice(r,r+1));return e?(n.q=3*e[0]-3,r+e[0].length):-1}function Un(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.m=e[0]-1,r+e[0].length):-1}function On(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.d=+e[0],r+e[0].length):-1}function Rn(n,t,r){var e=_n.exec(t.slice(r,r+3));return e?(n.m=0,n.d=+e[0],r+e[0].length):-1}function Cn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.H=+e[0],r+e[0].length):-1}function Kn(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.M=+e[0],r+e[0].length):-1}function nt(n,t,r){var e=_n.exec(t.slice(r,r+2));return e?(n.S=+e[0],r+e[0].length):-1}function tt(n,t,r){var e=_n.exec(t.slice(r,r+3));return e?(n.L=+e[0],r+e[0].length):-1}function rt(n,t,r){var e=_n.exec(t.slice(r,r+6));return e?(n.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function et(n,t,r){var e=Hn.exec(t.slice(r,r+1));return e?r+e[0].length:-1}function ut(n,t,r){var e=_n.exec(t.slice(r));return e?(n.Q=+e[0],r+e[0].length):-1}function it(n,t,r){var e=_n.exec(t.slice(r));return e?(n.s=+e[0],r+e[0].length):-1}function ot(n,t){return Tn(n.getDate(),t,2)}function at(n,t){return Tn(n.getHours(),t,2)}function ft(n,t){return Tn(n.getHours()%12||12,t,2)}function ct(n,t){return Tn(1+hn.count(Nn(n),n),t,3)}function st(n,t){return Tn(n.getMilliseconds(),t,3)}function ht(n,t){return st(n,t)+"000"}function lt(n,t){return Tn(n.getMonth()+1,t,2)}function vt(n,t){return Tn(n.getMinutes(),t,2)}function Mt(n,t){return Tn(n.getSeconds(),t,2)}function dt(n){var t=n.getDay();return 0===t?7:t}function yt(n,t){return Tn(Mn.count(Nn(n)-1,n),t,2)}function wt(n){var t=n.getDay();return t>=4||0===t?yn(n):yn.ceil(n)}function pt(n,t){return n=wt(n),Tn(yn.count(Nn(n),n)+(4===Nn(n).getDay()),t,2)}function bt(n){return n.getDay()}function gt(n,t){return Tn(dn.count(Nn(n)-1,n),t,2)}function mt(n,t){return Tn(n.getFullYear()%100,t,2)}function Nt(n,t){return Tn((n=wt(n)).getFullYear()%100,t,2)}function At(n,t){return Tn(n.getFullYear()%1e4,t,4)}function Dt(n,t){var r=n.getDay();return Tn((n=r>=4||0===r?yn(n):yn.ceil(n)).getFullYear()%1e4,t,4)}function St(n){var t=n.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tn(t/60|0,"0",2)+Tn(t%60,"0",2)}function xt(n,t){return Tn(n.getUTCDate(),t,2)}function kt(n,t){return Tn(n.getUTCHours(),t,2)}function Ft(n,t){return Tn(n.getUTCHours()%12||12,t,2)}function Wt(n,t){return Tn(1+ln.count(An(n),n),t,3)}function jt(n,t){return Tn(n.getUTCMilliseconds(),t,3)}function It(n,t){return jt(n,t)+"000"}function Zt(n,t){return Tn(n.getUTCMonth()+1,t,2)}function _t(n,t){return Tn(n.getUTCMinutes(),t,2)}function Ht(n,t){return Tn(n.getUTCSeconds(),t,2)}function Lt(n){var t=n.getUTCDay();return 0===t?7:t}function Tt(n,t){return Tn(pn.count(An(n)-1,n),t,2)}function Xt(n){var t=n.getUTCDay();return t>=4||0===t?gn(n):gn.ceil(n)}function Yt(n,t){return n=Xt(n),Tn(gn.count(An(n),n)+(4===An(n).getUTCDay()),t,2)}function $t(n){return n.getUTCDay()}function Bt(n,t){return Tn(bn.count(An(n)-1,n),t,2)}function Jt(n,t){return Tn(n.getUTCFullYear()%100,t,2)}function Vt(n,t){return Tn((n=Xt(n)).getUTCFullYear()%100,t,2)}function zt(n,t){return Tn(n.getUTCFullYear()%1e4,t,4)}function Et(n,t){var r=n.getUTCDay();return Tn((n=r>=4||0===r?gn(n):gn.ceil(n)).getUTCFullYear()%1e4,t,4)}function Gt(){return"+0000"}function qt(){return"%"}function Pt(n){return+n}function Qt(n){return Math.floor(+n/1e3)}function Ut(n){return new Date(n)}function Ot(n){return n instanceof Date?+n:+new Date(+n)}function Rt(n,t,r,e,u,i,o,a,f,c){var s=nn(),h=s.invert,l=s.domain,v=c(".%L"),M=c(":%S"),d=c("%I:%M"),y=c("%I %p"),w=c("%a %d"),p=c("%b %d"),b=c("%B"),g=c("%Y");function m(n){return(f(n)<n?v:a(n)<n?M:o(n)<n?d:i(n)<n?y:e(n)<n?u(n)<n?w:p:r(n)<n?b:g)(n)}return s.invert=function(n){return new Date(h(n))},s.domain=function(n){return arguments.length?l(Array.from(n,Ot)):l().map(Ut)},s.ticks=function(t){var r=l();return n(r[0],r[r.length-1],null==t?10:t)},s.tickFormat=function(n,t){return null==t?m:c(t)},s.nice=function(n){var r=l();return n&&"function"==typeof n.range||(n=t(r[0],r[r.length-1],null==n?10:n)),n?l(function(n,t){var r,e=0,u=(n=n.slice()).length-1,i=n[e],o=n[u];return o<i&&(r=e,e=u,u=r,r=i,i=o,o=r),n[e]=t.floor(i),n[u]=t.ceil(o),n}(r,n)):s},s.copy=function(){return K(s,Rt(n,t,r,e,u,i,o,a,f,c))},s}Wn=function(n){var t=n.dateTime,r=n.date,e=n.time,u=n.periods,i=n.days,o=n.shortDays,a=n.months,f=n.shortMonths,c=Yn(u),s=$n(u),h=Yn(i),l=$n(i),v=Yn(o),M=$n(o),d=Yn(a),y=$n(a),w=Yn(f),p=$n(f),b={a:function(n){return o[n.getDay()]},A:function(n){return i[n.getDay()]},b:function(n){return f[n.getMonth()]},B:function(n){return a[n.getMonth()]},c:null,d:ot,e:ot,f:ht,g:Nt,G:Dt,H:at,I:ft,j:ct,L:st,m:lt,M:vt,p:function(n){return u[+(n.getHours()>=12)]},q:function(n){return 1+~~(n.getMonth()/3)},Q:Pt,s:Qt,S:Mt,u:dt,U:yt,V:pt,w:bt,W:gt,x:null,X:null,y:mt,Y:At,Z:St,"%":qt},g={a:function(n){return o[n.getUTCDay()]},A:function(n){return i[n.getUTCDay()]},b:function(n){return f[n.getUTCMonth()]},B:function(n){return a[n.getUTCMonth()]},c:null,d:xt,e:xt,f:It,g:Vt,G:Et,H:kt,I:Ft,j:Wt,L:jt,m:Zt,M:_t,p:function(n){return u[+(n.getUTCHours()>=12)]},q:function(n){return 1+~~(n.getUTCMonth()/3)},Q:Pt,s:Qt,S:Ht,u:Lt,U:Tt,V:Yt,w:$t,W:Bt,x:null,X:null,y:Jt,Y:zt,Z:Gt,"%":qt},m={a:function(n,t,r){var e=v.exec(t.slice(r));return e?(n.w=M.get(e[0].toLowerCase()),r+e[0].length):-1},A:function(n,t,r){var e=h.exec(t.slice(r));return e?(n.w=l.get(e[0].toLowerCase()),r+e[0].length):-1},b:function(n,t,r){var e=w.exec(t.slice(r));return e?(n.m=p.get(e[0].toLowerCase()),r+e[0].length):-1},B:function(n,t,r){var e=d.exec(t.slice(r));return e?(n.m=y.get(e[0].toLowerCase()),r+e[0].length):-1},c:function(n,r,e){return D(n,t,r,e)},d:On,e:On,f:rt,g:qn,G:Gn,H:Cn,I:Cn,j:Rn,L:tt,m:Un,M:Kn,p:function(n,t,r){var e=c.exec(t.slice(r));return e?(n.p=s.get(e[0].toLowerCase()),r+e[0].length):-1},q:Qn,Q:ut,s:it,S:nt,u:Jn,U:Vn,V:zn,w:Bn,W:En,x:function(n,t,e){return D(n,r,t,e)},X:function(n,t,r){return D(n,e,t,r)},y:qn,Y:Gn,Z:Pn,"%":et};function N(n,t){return function(r){var e,u,i,o=[],a=-1,f=0,c=n.length;for(r instanceof Date||(r=new Date(+r));++a<c;)37===n.charCodeAt(a)&&(o.push(n.slice(f,a)),null!=(u=Zn[e=n.charAt(++a)])?e=n.charAt(++a):u="e"===e?" ":"0",(i=t[e])&&(e=i(r,u)),o.push(e),f=a+1);return o.push(n.slice(f,a)),o.join("")}}function A(n,t){return function(r){var e,u,i=Fn(1900,void 0,1);if(D(i,n,r+="",0)!=r.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(u=(e=kn(Fn(i.y,0,1))).getUTCDay(),e=u>4||0===u?bn.ceil(e):bn(e),e=ln.offset(e,7*(i.V-1)),i.y=e.getUTCFullYear(),i.m=e.getUTCMonth(),i.d=e.getUTCDate()+(i.w+6)%7):(u=(e=xn(Fn(i.y,0,1))).getDay(),e=u>4||0===u?dn.ceil(e):dn(e),e=hn.offset(e,7*(i.V-1)),i.y=e.getFullYear(),i.m=e.getMonth(),i.d=e.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),u="Z"in i?kn(Fn(i.y,0,1)).getUTCDay():xn(Fn(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(u+5)%7:i.w+7*i.U-(u+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,kn(i)):xn(i)}}function D(n,t,r,e){for(var u,i,o=0,a=t.length,f=r.length;o<a;){if(e>=f)return-1;if(37===(u=t.charCodeAt(o++))){if(u=t.charAt(o++),!(i=m[u in Zn?t.charAt(o++):u])||(e=i(n,r,e))<0)return-1}else if(u!=r.charCodeAt(e++))return-1}return e}return b.x=N(r,b),b.X=N(e,b),b.c=N(t,b),g.x=N(r,g),g.X=N(e,g),g.c=N(t,g),{format:function(n){var t=N(n+="",b);return t.toString=function(){return n},t},parse:function(n){var t=A(n+="",!1);return t.toString=function(){return n},t},utcFormat:function(n){var t=N(n+="",g);return t.toString=function(){return n},t},utcParse:function(n){var t=A(n+="",!0);return t.toString=function(){return n},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),jn=Wn.format,In=Wn.parse;class Ct extends i{addInteractionSupport(){}draw(){this.renderer.drawXAxis(this.options.renderOptions,this.getColorFromToken("bg-tertiary"),this.getStyleTextFromToken("v-font-field-label-sm v-text-secondary"))}}class Kt extends i{addInteractionSupport(){}draw(){this.renderer.drawYAxis(this.options.renderOptions,this.getColorFromToken("bg-tertiary"),this.getStyleTextFromToken("v-font-field-label-sm v-text-secondary"))}}class nr{process(n,t){const{dataSource:r,xAxis:e,container:u}=n,{innerWidth:i,innerHeight:o}=t;return{start:{x:0,y:o},end:{x:i,y:o},tickSize:4,scale:this.getScale(r,i,(null==e?void 0:e.type)||"value","VEGA-LINE-CHART"===u.tagName?1:.1,null==e?void 0:e.sorter),labelFormatter:null==e?void 0:e.labelFormatter,width:i,height:o}}getScale(n,t,r,e=.1,u){const i=o(n).map((n=>n.x));let a;return a="time"===r?function(){return z.apply(Rt(Dn,Sn,Nn,mn,Mn,hn,sn,cn,fn,jn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain(l(i)).range([0,t]):"category"===r?q("function"==typeof u?i.sort(u):i,[0,t]).padding(e):rn().domain(l(i)).range([0,t]),a}}class tr{process(n,t){const{dataSource:r,yAxis:e}=n,{innerWidth:u,innerHeight:i}=t,{scale:o,ticks:a}=this.getScale(r,[i,0],4);return{start:{x:0,y:0},end:{x:0,y:i},tickSize:a,scale:o,labelFormatter:null==e?void 0:e.labelFormatter,width:u,height:i}}getScale(n,t,r){const e=o(n).map((n=>n.y)).concat(0);let u=function(n){let t;for(const r of n)null!=r&&(t<r||void 0===t&&r>=r)&&(t=r);return t}(e),i=function(n){let t;for(const r of n)null!=r&&(t>r||void 0===t&&r>=r)&&(t=r);return t}(e),a=rn().domain([i,u]);const f=a.ticks(r),c=Math.abs(f[f.length-1]-f[f.length-2]),[s,h]=l(f);return i<s&&(i=s-c,r+=1),u>h&&(u=h+c,r+=1),a=rn().domain([i,u]).range(t),{scale:a,ticks:r}}}export{nr as X,tr as Y,jn as a,cn as b,sn as c,hn as d,mn as e,Mn as f,Nn as g,Ct as h,Kt as i,fn as s,In as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,g as r}from"./p-21d26bb4.js";import{g as o,I as s}from"./p-16493e5b.js";import{h as a}from"./p-b1f65b13.js";import{s as v}from"./p-9b797118.js";import{i as n}from"./p-a6ef59b9.js";import{a as h}from"./p-bf953152.js";import{V as c}from"./p-cc63e827.js";import{L as p,I as l}from"./p-6e1ab235.js";import{V as x,I as d}from"./p-4387d550.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-8f4e3a60.js";import"./p-c0291e2e.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-1e194737.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-50677c8e.js";import"./p-5773a9a3.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-020b04ed.js";import"./p-e1a2a701.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-0fd6c35b.js";import"./p-4ab3df00.js";import"./p-044f6193.js";import"./p-05373557.js";import"./p-425ba7d6.js";import"./p-2205ee4c.js";var m=function(t,e,i,r){var o,s=arguments.length,a=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var v=t.length-1;v>=0;v--)(o=t[v])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const g=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new x,this.size="size-16",this.cloneFAIconStyles=()=>{if(this.isThirdPartyIcon(this.icon)){const t=this.getIconStyleHTML();t&&this.appendStyles(t);let e=0;const i=window.setInterval((()=>{if(!(e<10))return p.warn("[Vega] Loading Font Awesome timeout.",this.icon),void clearInterval(i);{e++;const t=this.getIconStyleHTML();if(t)return this.appendStyles(t),void clearInterval(i)}}),300)}}}watchIcon(){this.cloneFAIconStyles()}componentWillLoad(){this.cloneFAIconStyles()}render(){const t=s.findIndex((t=>t===this.icon));if(c.hasIcon(this.icon)){const{icon:t,autoSize:e}=c.getIcon(this.icon);return this.renderForVegaIconToken(t,e?null:this.size,e)}return t>-1?this.renderForVegaIconToken(o(this.icon),this.size):this.renderForThirdPartyIcon()}isThirdPartyIcon(t){return!c.hasIcon(t)&&!s.find((e=>e===t))}renderForVegaIconToken(t,r,o=!1){const s=r?this.formatAndValidSize(this.size):null;return v(e(i,{class:h([s,this.color&&n(this.color),o&&"vega-auto-size"]),innerHTML:t},e("slot",null)),this.host)}renderForThirdPartyIcon(){return v(e(i,{class:h([this.color&&n(this.color)]),style:this.formatThirdPartyIconSize(this.size)},e("i",{part:"icon",class:this.icon})),this.host)}formatAndValidSize(t){return`v-w-${t} v-h-${t}`}formatThirdPartyIconSize(t){return{"font-size":`${a[t]}px`}}appendStyles(t){var e;if(t){const i=null!==(e=this.host.shadowRoot.querySelector("#fa-icon-styles"))&&void 0!==e?e:document.createElement("style");i.id="fa-icon-styles",i.innerHTML=t,this.host.shadowRoot.appendChild(i)}}getIconStyleHTML(){var t;if(g.iconStyleCache.has(this.icon))return g.iconStyleCache.get(this.icon);{const e=document.createElement("i");e.className=this.icon,e.style.display="none",document.body.appendChild(e);const i=getComputedStyle(e);if(null===(t=i.fontFamily)||void 0===t?void 0:t.includes("Font Awesome")){const t=getComputedStyle(e,"::before"),r=getComputedStyle(e,"::after"),o=`\n\t\t\t\ti {\n\t\t\t\t\tfont-weight: ${i.fontWeight};\n\t\t\t\t\tfont-family: ${i.fontFamily};\n\t\t\t\t\tfont-style: ${i.fontStyle};\n\t\t\t\t\tposition: ${i.position};\n\t\t\t\t\tletter-spacing: ${i.letterSpacing};\n\t\t\t\t}\n\t\t\t\ti::before {\n\t\t\t\t\tcontent: ${t.content};\n\t\t\t\t\tposition: ${t.position};\n\t\t\t\t\topacity: ${t.opacity};\n\t\t\t\t}\n\t\t\t\ti::after {\n\t\t\t\t\tcontent: ${r.content};\n\t\t\t\t\tposition: ${r.position};\n\t\t\t\t\topacity: ${r.opacity};\n\t\t\t\t}\n\t\t\t`.replace(/[\n\t]/gi,"");return g.iconStyleCache.set(this.icon,o),document.body.removeChild(e),o}return document.body.removeChild(e),null}}get host(){return r(this)}static get watchers(){return{icon:["watchIcon"]}}};g.iconStyleCache=new Map,m([d()],g.prototype,"globalSlimmers",void 0),m([l()],g.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g.style=":host(.v-text-primary),.v-text-primary{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.v-text-secondary),.v-text-secondary{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host(.v-text-inverted-primary),.v-text-inverted-primary{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}:host(.v-text-inverted-secondary),.v-text-inverted-secondary{color:rgba(var(--v-text-inverted-secondary, 188, 186, 213, 1))}:host(.v-text-black),.v-text-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host(.v-text-white),.v-text-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host(.v-text-brand),.v-text-brand{color:rgba(var(--v-text-brand, 51, 57, 61, 1))}:host(.v-text-danger-link),.v-text-danger-link{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}:host(.v-text-danger-link-hover),.v-text-danger-link-hover{color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host(.v-text-danger-link-active),.v-text-danger-link-active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1))}:host(.v-text-danger-link-focus),.v-text-danger-link-focus{color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}:host(.v-text-danger-link-visited),.v-text-danger-link-visited{color:rgba(var(--v-text-danger-link-visited, 230, 50, 87, 1))}:host(.v-text-disabled),.v-text-disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host(.v-text-error),.v-text-error{color:rgba(var(--v-text-error, 189, 41, 71, 1))}:host(.v-text-input-disabled),.v-text-input-disabled{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host(.v-text-input-placeholder),.v-text-input-placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}:host(.v-text-link),.v-text-link{color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host(.v-text-link-hover),.v-text-link-hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host(.v-text-link-active),.v-text-link-active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host(.v-text-link-focus),.v-text-link-focus{color:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}:host(.v-text-link-visited),.v-text-link-visited{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}:host(.v-text-on-action),.v-text-on-action{color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}:host(.v-text-on-danger),.v-text-on-danger{color:rgba(var(--v-text-on-danger, 252, 252, 252, 1))}:host(.v-text-on-disabled),.v-text-on-disabled{color:rgba(var(--v-text-on-disabled, 252, 252, 252, 1))}:host(.v-text-sidebar-link),.v-text-sidebar-link{color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1))}:host(.v-text-sidebar-link-hover),.v-text-sidebar-link-hover{color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host(.v-text-sidebar-link-selected),.v-text-sidebar-link-selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host(.v-text-site-footer-link),.v-text-site-footer-link{color:rgba(var(--v-text-site-footer-link, 171, 198, 216, 1))}:host(.v-text-site-footer-link-hover),.v-text-site-footer-link-hover{color:rgba(var(--v-text-site-footer-link-hover, 199, 217, 229, 1))}:host(.v-text-site-footer-link-active),.v-text-site-footer-link-active{color:rgba(var(--v-text-site-footer-link-active, 143, 179, 203, 1))}:host(.v-text-success),.v-text-success{color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.v-text-inverted-success),.v-text-inverted-success{color:rgba(var(--v-text-inverted-success, 89, 217, 119, 1))}:host(.v-text-accent1-primary),.v-text-accent1-primary{color:rgba(var(--v-text-accent1-primary, 115, 230, 220, 1))}:host(.v-text-accent2-primary),.v-text-accent2-primary{color:rgba(var(--v-text-accent2-primary, 128, 107, 255, 1))}:host(.v-text-accent3-primary),.v-text-accent3-primary{color:rgba(var(--v-text-accent3-primary, 255, 220, 131, 1))}:host(.v-text-accent4-primary),.v-text-accent4-primary{color:rgba(var(--v-text-accent4-primary, 255, 149, 113, 1))}:host(.v-text-accent5-primary),.v-text-accent5-primary{color:rgba(var(--v-text-accent5-primary, 0, 187, 255, 1))}:host(.v-text-accent6-primary),.v-text-accent6-primary{color:rgba(var(--v-text-accent6-primary, 240, 52, 91, 1))}:host(.v-text-accent7-primary),.v-text-accent7-primary{color:rgba(var(--v-text-accent7-primary, 37, 159, 159, 1))}:host(.v-text-accent8-primary),.v-text-accent8-primary{color:rgba(var(--v-text-accent8-primary, 86, 61, 130, 1))}:host(.v-text-accent9-primary),.v-text-accent9-primary{color:rgba(var(--v-text-accent9-primary, 255, 191, 63, 1))}:host(.v-text-accent10-primary),.v-text-accent10-primary{color:rgba(var(--v-text-accent10-primary, 237, 122, 35, 1))}:host(.v-w-0),.v-w-0{width:0px}:host(.v-w-size-0),.v-w-size-0{width:0px}:host(.v-w-size-4),.v-w-size-4{width:4px}:host(.v-w-size-8),.v-w-size-8{width:8px}:host(.v-w-size-12),.v-w-size-12{width:12px}:host(.v-w-size-16),.v-w-size-16{width:16px}:host(.v-w-size-20),.v-w-size-20{width:20px}:host(.v-w-size-24),.v-w-size-24{width:24px}:host(.v-w-size-32),.v-w-size-32{width:32px}:host(.v-w-size-40),.v-w-size-40{width:40px}:host(.v-w-size-48),.v-w-size-48{width:48px}:host(.v-w-size-64),.v-w-size-64{width:64px}:host(.v-w-size-72),.v-w-size-72{width:72px}:host(.v-w-size-80),.v-w-size-80{width:80px}:host(.v-w-size-112),.v-w-size-112{width:112px}:host(.v-w-size-2),.v-w-size-2{width:2px}:host(.v-h-0),.v-h-0{height:0px}:host(.v-h-size-0),.v-h-size-0{height:0px}:host(.v-h-size-4),.v-h-size-4{height:4px}:host(.v-h-size-8),.v-h-size-8{height:8px}:host(.v-h-size-12),.v-h-size-12{height:12px}:host(.v-h-size-16),.v-h-size-16{height:16px}:host(.v-h-size-20),.v-h-size-20{height:20px}:host(.v-h-size-24),.v-h-size-24{height:24px}:host(.v-h-size-32),.v-h-size-32{height:32px}:host(.v-h-size-40),.v-h-size-40{height:40px}:host(.v-h-size-48),.v-h-size-48{height:48px}:host(.v-h-size-64),.v-h-size-64{height:64px}:host(.v-h-size-72),.v-h-size-72{height:72px}:host(.v-h-size-80),.v-h-size-80{height:80px}:host(.v-h-size-112),.v-h-size-112{height:112px}:host(.v-h-size-2),.v-h-size-2{height:2px}:host{display:inline-flex;user-select:none}i{line-height:1}:host(:not(.vega-auto-size)) ::slotted(svg){width:100%;height:100%}";export{g as vega_icon}
|
|
1
|
+
import{r as t,h as e,H as i,g as r}from"./p-21d26bb4.js";import{g as o,I as s}from"./p-16493e5b.js";import{h as a}from"./p-b1f65b13.js";import{s as v}from"./p-519a7d55.js";import{i as n}from"./p-a0dab2d0.js";import{a as h}from"./p-d5776087.js";import{V as c}from"./p-cc63e827.js";import{L as p,I as l}from"./p-6e1ab235.js";import{V as x,I as d}from"./p-4387d550.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-06fb002a.js";import"./p-834434d5.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-eb832119.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-0c8bd757.js";import"./p-5773a9a3.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-613ee009.js";import"./p-6e01f0a2.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-fa5eb496.js";import"./p-4ab3df00.js";import"./p-fecb4044.js";import"./p-3eb2d433.js";import"./p-425ba7d6.js";import"./p-2205ee4c.js";var m=function(t,e,i,r){var o,s=arguments.length,a=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var v=t.length-1;v>=0;v--)(o=t[v])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const g=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new x,this.size="size-16",this.cloneFAIconStyles=()=>{if(this.isThirdPartyIcon(this.icon)){const t=this.getIconStyleHTML();t&&this.appendStyles(t);let e=0;const i=window.setInterval((()=>{if(!(e<10))return p.warn("[Vega] Loading Font Awesome timeout.",this.icon),void clearInterval(i);{e++;const t=this.getIconStyleHTML();if(t)return this.appendStyles(t),void clearInterval(i)}}),300)}}}watchIcon(){this.cloneFAIconStyles()}componentWillLoad(){this.cloneFAIconStyles()}render(){const t=s.findIndex((t=>t===this.icon));if(c.hasIcon(this.icon)){const{icon:t,autoSize:e}=c.getIcon(this.icon);return this.renderForVegaIconToken(t,e?null:this.size,e)}return t>-1?this.renderForVegaIconToken(o(this.icon),this.size):this.renderForThirdPartyIcon()}isThirdPartyIcon(t){return!c.hasIcon(t)&&!s.find((e=>e===t))}renderForVegaIconToken(t,r,o=!1){const s=r?this.formatAndValidSize(this.size):null;return v(e(i,{class:h([s,this.color&&n(this.color),o&&"vega-auto-size"]),innerHTML:t},e("slot",null)),this.host)}renderForThirdPartyIcon(){return v(e(i,{class:h([this.color&&n(this.color)]),style:this.formatThirdPartyIconSize(this.size)},e("i",{part:"icon",class:this.icon})),this.host)}formatAndValidSize(t){return`v-w-${t} v-h-${t}`}formatThirdPartyIconSize(t){return{"font-size":`${a[t]}px`}}appendStyles(t){var e;if(t){const i=null!==(e=this.host.shadowRoot.querySelector("#fa-icon-styles"))&&void 0!==e?e:document.createElement("style");i.id="fa-icon-styles",i.innerHTML=t,this.host.shadowRoot.appendChild(i)}}getIconStyleHTML(){var t;if(g.iconStyleCache.has(this.icon))return g.iconStyleCache.get(this.icon);{const e=document.createElement("i");e.className=this.icon,e.style.display="none",document.body.appendChild(e);const i=getComputedStyle(e);if(null===(t=i.fontFamily)||void 0===t?void 0:t.includes("Font Awesome")){const t=getComputedStyle(e,"::before"),r=getComputedStyle(e,"::after"),o=`\n\t\t\t\ti {\n\t\t\t\t\tfont-weight: ${i.fontWeight};\n\t\t\t\t\tfont-family: ${i.fontFamily};\n\t\t\t\t\tfont-style: ${i.fontStyle};\n\t\t\t\t\tposition: ${i.position};\n\t\t\t\t\tletter-spacing: ${i.letterSpacing};\n\t\t\t\t}\n\t\t\t\ti::before {\n\t\t\t\t\tcontent: ${t.content};\n\t\t\t\t\tposition: ${t.position};\n\t\t\t\t\topacity: ${t.opacity};\n\t\t\t\t}\n\t\t\t\ti::after {\n\t\t\t\t\tcontent: ${r.content};\n\t\t\t\t\tposition: ${r.position};\n\t\t\t\t\topacity: ${r.opacity};\n\t\t\t\t}\n\t\t\t`.replace(/[\n\t]/gi,"");return g.iconStyleCache.set(this.icon,o),document.body.removeChild(e),o}return document.body.removeChild(e),null}}get host(){return r(this)}static get watchers(){return{icon:["watchIcon"]}}};g.iconStyleCache=new Map,m([d()],g.prototype,"globalSlimmers",void 0),m([l()],g.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g.style=":host(.v-text-primary),.v-text-primary{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.v-text-secondary),.v-text-secondary{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host(.v-text-inverted-primary),.v-text-inverted-primary{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}:host(.v-text-inverted-secondary),.v-text-inverted-secondary{color:rgba(var(--v-text-inverted-secondary, 188, 186, 213, 1))}:host(.v-text-black),.v-text-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host(.v-text-white),.v-text-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host(.v-text-brand),.v-text-brand{color:rgba(var(--v-text-brand, 51, 57, 61, 1))}:host(.v-text-danger-link),.v-text-danger-link{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}:host(.v-text-danger-link-hover),.v-text-danger-link-hover{color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host(.v-text-danger-link-active),.v-text-danger-link-active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1))}:host(.v-text-danger-link-focus),.v-text-danger-link-focus{color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}:host(.v-text-danger-link-visited),.v-text-danger-link-visited{color:rgba(var(--v-text-danger-link-visited, 230, 50, 87, 1))}:host(.v-text-disabled),.v-text-disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host(.v-text-error),.v-text-error{color:rgba(var(--v-text-error, 189, 41, 71, 1))}:host(.v-text-input-disabled),.v-text-input-disabled{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host(.v-text-input-placeholder),.v-text-input-placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}:host(.v-text-link),.v-text-link{color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host(.v-text-link-hover),.v-text-link-hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host(.v-text-link-active),.v-text-link-active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host(.v-text-link-focus),.v-text-link-focus{color:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}:host(.v-text-link-visited),.v-text-link-visited{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}:host(.v-text-on-action),.v-text-on-action{color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}:host(.v-text-on-danger),.v-text-on-danger{color:rgba(var(--v-text-on-danger, 252, 252, 252, 1))}:host(.v-text-on-disabled),.v-text-on-disabled{color:rgba(var(--v-text-on-disabled, 252, 252, 252, 1))}:host(.v-text-sidebar-link),.v-text-sidebar-link{color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1))}:host(.v-text-sidebar-link-hover),.v-text-sidebar-link-hover{color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host(.v-text-sidebar-link-selected),.v-text-sidebar-link-selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host(.v-text-site-footer-link),.v-text-site-footer-link{color:rgba(var(--v-text-site-footer-link, 171, 198, 216, 1))}:host(.v-text-site-footer-link-hover),.v-text-site-footer-link-hover{color:rgba(var(--v-text-site-footer-link-hover, 199, 217, 229, 1))}:host(.v-text-site-footer-link-active),.v-text-site-footer-link-active{color:rgba(var(--v-text-site-footer-link-active, 143, 179, 203, 1))}:host(.v-text-success),.v-text-success{color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.v-text-inverted-success),.v-text-inverted-success{color:rgba(var(--v-text-inverted-success, 89, 217, 119, 1))}:host(.v-text-accent1-primary),.v-text-accent1-primary{color:rgba(var(--v-text-accent1-primary, 115, 230, 220, 1))}:host(.v-text-accent2-primary),.v-text-accent2-primary{color:rgba(var(--v-text-accent2-primary, 128, 107, 255, 1))}:host(.v-text-accent3-primary),.v-text-accent3-primary{color:rgba(var(--v-text-accent3-primary, 255, 220, 131, 1))}:host(.v-text-accent4-primary),.v-text-accent4-primary{color:rgba(var(--v-text-accent4-primary, 255, 149, 113, 1))}:host(.v-text-accent5-primary),.v-text-accent5-primary{color:rgba(var(--v-text-accent5-primary, 0, 187, 255, 1))}:host(.v-text-accent6-primary),.v-text-accent6-primary{color:rgba(var(--v-text-accent6-primary, 240, 52, 91, 1))}:host(.v-text-accent7-primary),.v-text-accent7-primary{color:rgba(var(--v-text-accent7-primary, 37, 159, 159, 1))}:host(.v-text-accent8-primary),.v-text-accent8-primary{color:rgba(var(--v-text-accent8-primary, 86, 61, 130, 1))}:host(.v-text-accent9-primary),.v-text-accent9-primary{color:rgba(var(--v-text-accent9-primary, 255, 191, 63, 1))}:host(.v-text-accent10-primary),.v-text-accent10-primary{color:rgba(var(--v-text-accent10-primary, 237, 122, 35, 1))}:host(.v-w-0),.v-w-0{width:0px}:host(.v-w-size-0),.v-w-size-0{width:0px}:host(.v-w-size-4),.v-w-size-4{width:4px}:host(.v-w-size-8),.v-w-size-8{width:8px}:host(.v-w-size-12),.v-w-size-12{width:12px}:host(.v-w-size-16),.v-w-size-16{width:16px}:host(.v-w-size-20),.v-w-size-20{width:20px}:host(.v-w-size-24),.v-w-size-24{width:24px}:host(.v-w-size-32),.v-w-size-32{width:32px}:host(.v-w-size-40),.v-w-size-40{width:40px}:host(.v-w-size-48),.v-w-size-48{width:48px}:host(.v-w-size-64),.v-w-size-64{width:64px}:host(.v-w-size-72),.v-w-size-72{width:72px}:host(.v-w-size-80),.v-w-size-80{width:80px}:host(.v-w-size-112),.v-w-size-112{width:112px}:host(.v-w-size-2),.v-w-size-2{width:2px}:host(.v-h-0),.v-h-0{height:0px}:host(.v-h-size-0),.v-h-size-0{height:0px}:host(.v-h-size-4),.v-h-size-4{height:4px}:host(.v-h-size-8),.v-h-size-8{height:8px}:host(.v-h-size-12),.v-h-size-12{height:12px}:host(.v-h-size-16),.v-h-size-16{height:16px}:host(.v-h-size-20),.v-h-size-20{height:20px}:host(.v-h-size-24),.v-h-size-24{height:24px}:host(.v-h-size-32),.v-h-size-32{height:32px}:host(.v-h-size-40),.v-h-size-40{height:40px}:host(.v-h-size-48),.v-h-size-48{height:48px}:host(.v-h-size-64),.v-h-size-64{height:64px}:host(.v-h-size-72),.v-h-size-72{height:72px}:host(.v-h-size-80),.v-h-size-80{height:80px}:host(.v-h-size-112),.v-h-size-112{height:112px}:host(.v-h-size-2),.v-h-size-2{height:2px}:host{display:inline-flex;user-select:none}i{line-height:1}:host(:not(.vega-auto-size)) ::slotted(svg){width:100%;height:100%}";export{g as vega_icon}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t,M as s,V as e}from"./p-6e1ab235.js";import{O as i}from"./p-331a62d5.js";import{C as
|
|
1
|
+
import{c as t,M as s,V as e}from"./p-6e1ab235.js";import{O as i}from"./p-331a62d5.js";import{C as o}from"./p-2d0d575f.js";import{f as a}from"./p-d5776087.js";import{d as c}from"./p-6e01f0a2.js";import{e as n,f as l}from"./p-425ba7d6.js";var h=function(t,s,e,i){var o,a=arguments.length,c=a<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,s,e,i);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(c=(a<3?o(c):a>3?o(s,e,c):o(s,e))||c);return a>3&&c&&Object.defineProperty(s,e,c),c};class r extends e{constructor(t){super(),this.isAcceptableObserverPayload=t=>"object"==typeof t&&!!t&&t.host===this.parent,this.observerEntry=t}connectedCallback(){if(this.parent=this.getParent(),!this.parent)return;const{subStates:t}=this.observerEntry;this.subStateObserver=new i(this.isAcceptableObserverPayload,(s=>{const e=t.find((t=>t.parentStateName===s.stateName));e&&this.updateState(e,s.value)})),o.register(c.getSubject(this.parent,n),this.subStateObserver),this.observerEntry.pullStatesWhenReattached&&this.host.classList.contains("hydrated")&&(this.parent=this.getParent(),this.pullStates())}disconnectedCallback(){this.parent&&o.unregister(c.getSubject(this.parent,n),this.subStateObserver)}componentWillLoad(){this.pullStates()}getParent(){return"string"==typeof this.observerEntry.parent?a(this.host,this.observerEntry.parent):this.observerEntry.parent()}updateState(t,s){t.callback?t.callback(s):this[t.subStateName]=s}pullStates(){if(!this.parent)return;const{subStates:t}=this.observerEntry;t.forEach((t=>{o.notify(c.getSubject(this.parent,l),{host:this.parent,stateName:t.parentStateName,callback:s=>{this.updateState(t,s)}})}))}}h([t()],r.prototype,"host",void 0),h([s("connectedCallback")],r.prototype,"connectedCallback",null),h([s("disconnectedCallback")],r.prototype,"disconnectedCallback",null),h([s("componentWillLoad")],r.prototype,"componentWillLoad",null);export{r as S}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,H as i,g as n}from"./p-21d26bb4.js";import{s}from"./p-
|
|
1
|
+
import{h as t,r as e,H as i,g as n}from"./p-21d26bb4.js";import{s}from"./p-519a7d55.js";import{c as r,V as o,I as a}from"./p-6e1ab235.js";import{V as l,I as c}from"./p-4387d550.js";var p=function(t,e,i,n){var s,r=arguments.length,o=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,i,o):s(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};class f extends o{render(){return t("vega-flex",{"align-items":"start","justify-content":"start",gap:"size-8"},this.renderPrefixIcon(),this.renderText())}renderPrefixIcon(){return this.icon&&"left"===this.iconAlign&&t("div",{class:"section-title-icon-container"},this.renderIcon())}renderText(){return t("vega-flex",{class:"vega-flex-grow",direction:"col","align-items":"start","justify-content":"start",gap:"size-4"},this.renderTitle(),this.renderDescription())}renderTitle(){return t("div",{class:"section-title-text vega-flex-grow"},t("span",null,this.titleText),this.renderSuffixIcon())}renderDescription(){return t("div",{class:"section-title-description"},this.description)}renderSuffixIcon(){return this.icon&&"right"===this.iconAlign&&t("div",{class:"right-icon-container"},this.renderIcon())}renderIcon(){return t("vega-icon",{icon:this.icon,color:"text-primary",size:"size-20",class:"vega-flex-shrink-0"})}}p([r()],f.prototype,"host",void 0),p([r()],f.prototype,"titleText",void 0),p([r()],f.prototype,"description",void 0),p([r()],f.prototype,"icon",void 0),p([r()],f.prototype,"iconAlign",void 0);var d=function(t,e,i,n){var s,r=arguments.length,o=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,i,o):s(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const h=class{constructor(t){e(this,t),this.globalSlimmers={},this.renderer=new f,this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.titleText="",this.iconAlign="left"}render(){return s(t(i,null,this.renderer.render()),this.host)}get host(){return n(this)}};d([c()],h.prototype,"globalSlimmers",void 0),d([a()],h.prototype,"renderer",void 0),d([a()],h.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),h.style=':host{display:block}.section-title-text{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.section-title-text{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.section-title-text{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.section-title-text{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}.section-title-description{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:28px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.section-title-description{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.section-title-description{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.section-title-description{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.section-title-icon-container{margin-top:4px}.right-icon-container{display:inline-block;margin-left:8px;margin-top:4px;vertical-align:middle}';export{h as vega_section_title}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,H as r,g as o}from"./p-21d26bb4.js";import{R as s}from"./p-280cbcdb.js";import{c as a}from"./p-86194314.js";import{s as n}from"./p-519a7d55.js";import{a as l,h as p,b as h}from"./p-d5776087.js";import{F as d}from"./p-21e180f2.js";import{I as c}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-4387d550.js";import{b as g}from"./p-5773a9a3.js";import{c as b}from"./p-eea36d3c.js";import{C as x}from"./p-2d0d575f.js";import{f as v}from"./p-6e01f0a2.js";import"./p-abd7aeaa.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-425ba7d6.js";import"./p-4ab3df00.js";import"./p-834434d5.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-e7b00bf0.js";import"./p-987fbbd0.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-138fcf6e.js";import"./p-613ee009.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,r){var o,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const y=class{constructor(r){e(this,r),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.globalSlimmers={},this.formFieldController=new d({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.colorPickerContainerRef,touchableAreaGetter:()=>[this.colorPickerTouchableAreaRef]}),this.changeEventEmitter=b(y,v),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(u),this.value="",this.hint="",this.disabled=!1,this.required=!1,this.label="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.colors=["#73E6DC","#806BFF","#FFDC83","#FF9571","#00BBFF","#FF82C9","#259F9F","#563D82"],this.isInline=!1,this.renderColorPickerContainer=()=>i("div",{class:l([this.isInline?null:"color-picker-inline"]),ref:e=>this.colorPickerContainerRef=e},i("vega-flex",{direction:"row",gap:"size-8",alignItems:"center"},this.colors.map((e=>{const t=this.value===e;return i("div",{id:e,class:{"color-picker-inline-items":!0,selected:t},ref:e=>this.colorPickerTouchableAreaRef=e,style:{backgroundColor:e},onClick:this.updateValueProp,role:"button",tabIndex:0,"aria-label":"color",onKeyDown:a()},t?i("vega-icon",{icon:"checkmark",size:"size-16",class:{"v-text-black":this.isDarkColorCheckmark(this.value),"v-text-white":!this.isDarkColorCheckmark(this.value)}}):null)})))),this.renderHintMessage=()=>i("vega-text",null,this.hint),this.updateValueProp=async e=>{this.disabled||(this.value=String(e.currentTarget.getAttribute("id")))}}watchValue(){this.resetValueIfInvalid(),this.changeEventEmitter.emit(this.value),x.notify(g,{host:this.host,detail:this.value})}watchValidationRules(){}connectedCallback(){this.resetValueIfInvalid()}render(){return n(i(r,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderColorPickerContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}isDarkColorCheckmark(e,t="#fcfcfc",i="#203645"){const r=this.getLuminance(e),o=this.getLuminance(t),s=this.getLuminance(i);return r>Math.sqrt((o+.05)*(s+.05))-.05}getLuminance(e){const t=[p(e).r/255,p(e).g/255,p(e).b/255].map((e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4));return.2126*t[0]+.7152*t[1]+.0722*t[2]}resetValueIfInvalid(){this.colors.some((e=>h(e).toUpperCase()==h(this.value).toUpperCase()))||(this.value="")}get host(){return o(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([f()],y.prototype,"globalSlimmers",void 0),w([c()],y.prototype,"formFieldController",void 0),w([c()],y.prototype,"changeEventEmitter",void 0),w([c()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block;text-align:left;line-height:normal}:host vega-field-label{margin-bottom:8px}:host(.disabled) .color-picker-inline{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.disabled) .color-picker-inline-items:hover{box-shadow:none}:host(.disabled) .color-picker-inline-items:focus-within{box-shadow:none}:host .color-picker-inline{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding:12px;max-width:max-content}:host .color-picker-inline-items{display:flex;border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1));border-radius:4px;width:24px;height:24px;cursor:pointer;align-items:center;justify-content:center}:host .color-picker-inline-items.selected{border-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1))}:host .color-picker-inline-items:hover{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host .color-picker-inline-items:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));box-shadow:0px 0px 0px 1px rgba(var(--v-bg-primary, 252, 252, 252, 1)) inset;border:1px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host .checkmark-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .checkmark-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host vega-text{padding-left:8px;padding-right:8px;padding-top:4px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .color-picker-inline.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-hidden{display:none}:host vega-flex{flex-wrap:wrap;max-width:264px}';export{y as vega_color_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as t,d as e}from"./p-
|
|
1
|
+
import{i as t,d as e}from"./p-d5776087.js";import{i as s}from"./p-b1f65b13.js";const i=new class{constructor(){this.listeners=[],this.listenKeyPress()}register(t){t.map((t=>t.eventName||(t.eventName="keyup"))),this.listeners=this.listeners.concat(t)}deregister(t){this.listeners=this.listeners.filter((e=>!t.includes(e)))}listenKeyPress(){document.addEventListener("keydown",(t=>{this.invokeListeners("keydown",t)})),document.addEventListener("keyup",(t=>{this.invokeListeners("keyup",t)}))}invokeListeners(t,e){this.listeners.filter((s=>s.eventName===t&&this.shouldInvokeListener(s,e))).forEach((t=>t.callback(e)))}shouldInvokeListener(i,o){const n=o.code;let r=[],c=[];const h=Array.isArray(i.keyCode)?i.keyCode.includes(n):i.keyCode===n;"function"==typeof i.activeElementInScope?r=i.activeElementInScope():"object"==typeof i.activeElementInScope&&(r=i.activeElementInScope),"function"==typeof i.activeElementOutScope?c=i.activeElementOutScope():"object"==typeof i.activeElementOutScope&&(c=i.activeElementOutScope);const p=!i.activeElementInScope||r.some((s=>t(e(),s))),d=!i.activeElementOutScope||c.every((s=>!t(e(),s))),u=!s(i.modifierPressed)||i.modifierPressed===this.isModifierPressed(o),y=!s(i.shiftKey)||i.shiftKey===o.shiftKey;return h&&p&&d&&u&&y}isModifierPressed(t){return/Mac|iPhone|iPad/.test(navigator.userAgent)?t.metaKey:t.ctrlKey}};export{i as K}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as o,H as r,g as a}from"./p-21d26bb4.js";import{s as p}from"./p-
|
|
1
|
+
import{h as e,r as t,c as o,H as r,g as a}from"./p-21d26bb4.js";import{s as p}from"./p-519a7d55.js";import{I as s}from"./p-65cca90f.js";import{c as i,M as n,V as c,I as l}from"./p-6e1ab235.js";import{V as v,I as h}from"./p-4387d550.js";import{c as m}from"./p-eea36d3c.js";import{d as g,M as d,N as f}from"./p-6e01f0a2.js";import{E as b}from"./p-8bdc9e75.js";import{r as w}from"./p-77e64f26.js";import{r as x}from"./p-425ba7d6.js";import"./p-1df029c2.js";import"./p-d5776087.js";import"./p-b1f65b13.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-e7b00bf0.js";import"./p-331a62d5.js";import"./p-613ee009.js";import"./p-eb832119.js";import"./p-37b05e0b.js";import"./p-834434d5.js";import"./p-0c8bd757.js";import"./p-5773a9a3.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-06fb002a.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-cc63e827.js";import"./p-fa5eb496.js";import"./p-4ab3df00.js";import"./p-fecb4044.js";import"./p-3eb2d433.js";var j=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};class u extends c{appendPopoverSlotContent(){const e=this.host.querySelector("[slot='popover']");e&&this.popoverContentBox.appendChild(e)}getPopoverContentBox(){return this.popoverContentBox}render(){return e("vega-popover-content-box",{ref:e=>this.popoverContentBox=e,showArrow:this.showArrow})}}j([i()],u.prototype,"host",void 0),j([i()],u.prototype,"showArrow",void 0),j([n("componentDidRender")],u.prototype,"appendPopoverSlotContent",null);var R=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};class y extends b{constructor(){super((()=>this.generateShowConfigFactory()),(()=>this.trigger),"isPopoverShow")}connectedCallback(){this.registerRemoteMethod()}disconnectedCallback(){w.unRegister(g.getSubject(this.host,x))}generateShowConfigFactory(){return{target:this.target||this.host,appendableElement:this.appenderRenderer.getPopoverContentBox(),positionRelativeTo:this.positionRelativeTo,matchTargetWidth:!1,size:this.size,placement:this.placement,alignment:this.alignment,isScreenPosition:this.isScreenPosition}}registerRemoteMethod(){w.register(g.getSubject(this.host,x),(e=>{this.target=e,super.updateShowConfigFactory(this.generateShowConfigFactory.bind(this))}))}}R([i()],y.prototype,"host",void 0),R([i()],y.prototype,"trigger",void 0),R([i()],y.prototype,"positionRelativeTo",void 0),R([i()],y.prototype,"placement",void 0),R([i()],y.prototype,"alignment",void 0),R([i()],y.prototype,"size",void 0),R([i()],y.prototype,"isScreenPosition",void 0),R([i({writable:!0})],y.prototype,"isPopoverShow",void 0),R([i()],y.prototype,"appenderRenderer",void 0),R([n("connectedCallback")],y.prototype,"connectedCallback",null),R([n("disconnectedCallback")],y.prototype,"disconnectedCallback",null);var S=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};const k=class{constructor(e){t(this,e),this.vegaPopoverShow=o(this,"vegaPopoverShow",7),this.popoverShow=o(this,"popoverShow",7),this.vegaPopoverHide=o(this,"vegaPopoverHide",7),this.popoverHide=o(this,"popoverHide",7),this.globalSlimmers={},this.appenderRenderer=new u,this.appenderController=new y,this.popoverShowEventEmitter=m(k,d),this.popoverHideEventEmitter=m(k,f),this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.isPopoverShow=!1,this.placement="top",this.alignment="center",this.trigger="click",this.showArrow=!0,this.isScreenPosition=!1,this.showPopover=()=>{this.appenderController.show()},this.hidePopover=()=>{this.appenderController.hide()}}async watchIsPopoverShow(){this.isPopoverShow?this.popoverShowEventEmitter.emit():this.popoverHideEventEmitter.emit()}watchToRefreshPopover(){this.isPopoverShow&&this.appenderController.show()}componentDidRender(){}async show(){this.isPopoverShow||this.showPopover()}async hide(){this.isPopoverShow&&this.hidePopover()}render(){return p(e(r,null,e("slot",{name:"popover-content"}),this.appenderRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{isPopoverShow:["watchIsPopoverShow"],size:["watchToRefreshPopover"],placement:["watchToRefreshPopover"],alignment:["watchToRefreshPopover"]}}};S([h()],k.prototype,"globalSlimmers",void 0),S([l()],k.prototype,"appenderRenderer",void 0),S([l()],k.prototype,"appenderController",void 0),S([l()],k.prototype,"popoverShowEventEmitter",void 0),S([l()],k.prototype,"popoverHideEventEmitter",void 0),S([l()],k.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),S([s((e=>[{keyCode:"Escape",activeElementInScope:[e.host],callback:e.hidePopover},{keyCode:"Tab",activeElementOutScope:[e.host,e.appenderRenderer.getPopoverContentBox()],callback:e.hidePopover},{keyCode:"Tab",activeElementInScope:[e.host],callback:()=>{"hover"===e.trigger&&e.showPopover()}}]))],k.prototype,"host",void 0),k.style=":host{display:inline-block}";var C=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};const P=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.showArrow=!0}render(){return p(e(r,{class:{"vega-popover":!0,"no-arrow":!this.showArrow},role:"tooltip"},e("div",{class:"vega-popover-content"},e("slot",{name:"popover"}),this.showArrow&&e("div",{class:"vega-arrow"})),e("slot",null)),this.host)}get host(){return a(this)}};C([h()],P.prototype,"globalSlimmers",void 0),C([l()],P.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P.style=':host{position:absolute}:host(.vega-force-hidden){display:none !important}.vega-popover-content{border-radius:8px;padding:16px;position:relative;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));box-shadow:var(--v-shadow-popover, 0px 0px 88px 0px rgba(2, 2, 15, 0.01), 0px 0px 32px 0px rgba(2, 2, 15, 0.02), 0px 4px 72px 0px rgba(2, 2, 15, 0.06))}.vega-popover-content .vega-arrow{position:absolute}.vega-popover-content .vega-arrow::after{display:inline-block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));content:"";border-right-width:0px;border-bottom-width:0px;border-radius:4px 1px 0 1px;transform:skewX(18deg);width:18px;height:17.12px;border-right-color:transparent;border-bottom-color:transparent}:host(.vega-placement-left) .vega-arrow{transform:rotate(144deg);right:-9px}:host(.vega-placement-left.vega-alignment-start) .vega-arrow{top:8px}:host(.vega-placement-left.vega-alignment-center) .vega-arrow{top:calc(50% - 14px)}:host(.vega-placement-left.vega-alignment-end) .vega-arrow{bottom:12px}:host(.vega-placement-right) .vega-arrow{transform:rotate(324deg);left:-9px}:host(.vega-placement-right.vega-alignment-start) .vega-arrow{top:12px}:host(.vega-placement-right.vega-alignment-center) .vega-arrow{top:calc(50% - 10px)}:host(.vega-placement-right.vega-alignment-end) .vega-arrow{bottom:8px}:host(.vega-placement-top) .vega-arrow{transform:rotate(234deg);bottom:-10.65px}:host(.vega-placement-top.vega-alignment-start) .vega-arrow{left:24px}:host(.vega-placement-top.vega-alignment-center) .vega-arrow{left:calc(50% - 9px)}:host(.vega-placement-top.vega-alignment-end) .vega-arrow{right:18px}:host(.vega-placement-bottom) .vega-arrow{transform:rotate(54deg);top:-10.65px}:host(.vega-placement-bottom.vega-alignment-start) .vega-arrow{left:18px}:host(.vega-placement-bottom.vega-alignment-center) .vega-arrow{left:calc(50% - 14px)}:host(.vega-placement-bottom.vega-alignment-end) .vega-arrow{right:24px}:host(.vega-placement-top){margin-top:-20px}:host(.vega-placement-bottom){margin-top:20px}:host(.vega-placement-right){margin-left:20px}:host(.vega-placement-left){margin-left:-20px}:host(.no-arrow.vega-placement-top){margin-top:-8px}:host(.no-arrow.vega-placement-bottom){margin-top:8px}:host(.no-arrow.vega-placement-right){margin-left:8px}:host(.no-arrow.vega-placement-left){margin-left:-8px}';export{k as vega_popover,P as vega_popover_content_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as i,H as s,g as o}from"./p-21d26bb4.js";import{s as r}from"./p-9b797118.js";import{c as n,V as a,M as l,I as c}from"./p-6e1ab235.js";import{V as h,I as d}from"./p-4387d550.js";import{c as p}from"./p-86194314.js";import{c as f}from"./p-86782109.js";import{d as v,f as b}from"./p-e1a2a701.js";import{C as g}from"./p-2d0d575f.js";import{k as x,C as m,R as u,b as w}from"./p-5773a9a3.js";import{S as y}from"./p-6934013c.js";import{c as j}from"./p-425ba7d6.js";import{f as k}from"./p-bf953152.js";import{O as R}from"./p-331a62d5.js";import{C}from"./p-419697c6.js";import{C as z}from"./p-5064a804.js";import{c as S}from"./p-7f6d6c20.js";import{F as I}from"./p-9f002a09.js";import{R as O}from"./p-280cbcdb.js";import"./p-6a334573.js";import"./p-66759f4e.js";import"./p-020b04ed.js";import"./p-5f377954.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-4ab3df00.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-987fbbd0.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";var T=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class V extends a{getSelectorContainerRef(){return this.selectorContainerRef}render(){return e("vega-flex",{"align-items":"start","justify-content":"start",gap:"size-16",class:{"selection-tile":!0,disabled:this.disabled,checked:this.checked,error:this.showError},"aria-label":this.titleText||"No label defined",tabIndex:this.disabled?-1:0,onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:p()},e("div",{class:"vega-flex-grow"},this.renderContent()),this.renderSelect())}renderContent(){return this.hasContentSlot()?e("slot",{name:"content"}):e("vega-flex",{gap:"size-12"},e("vega-flex",{class:"vega-flex-shrink-0"},this.renderPrefixIcon()),e("div",{class:"vega-flex-grow"},this.renderText()))}renderPrefixIcon(){return this.hasPrefixSlot()?e("slot",{name:"prefix"}):this.prefixIcon?e("vega-icon",{icon:this.prefixIcon,size:"size-16",color:this.disabled?"text-secondary":"text-primary",class:"selection-tile-icon"}):void 0}renderText(){return e("vega-flex",{class:"vega-flex-grow",direction:"col","align-items":"start","justify-content":"start"},e("div",{class:"selection-tile-title"},this.titleText),this.note&&e("div",{class:"selection-tile-note"},this.note))}renderSelect(){return e("vega-flex",{"align-items":"start",class:"vega-flex-shrink-0 selection-tile-select",ref:e=>this.selectorContainerRef=e},"checkbox"===this.selectType?this.renderCheckbox():this.renderRadio())}renderCheckbox(){return e("vega-checkbox",{size:"small",disabled:this.disabled,checked:this.checked})}renderRadio(){return e("vega-radio",{size:"small",disabled:this.disabled,checked:this.checked})}hasPrefixSlot(){return null!==this.host.querySelector("[slot=prefix]")}hasContentSlot(){return null!==this.host.querySelector("[slot=content]")}}T([n()],V.prototype,"host",void 0),T([n()],V.prototype,"prefixIcon",void 0),T([n()],V.prototype,"titleText",void 0),T([n()],V.prototype,"note",void 0),T([n()],V.prototype,"selectType",void 0),T([n()],V.prototype,"disabled",void 0),T([n()],V.prototype,"checked",void 0),T([n()],V.prototype,"showError",void 0),T([n()],V.prototype,"checkedController",void 0);var E=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends a{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.checked=e,this.changeEventEmitter.emit(t),g.notify(x,{host:this.host,detail:{checked:e,value:this.value}})}}E([n()],N.prototype,"host",void 0),E([n({writable:!0})],N.prototype,"checked",void 0),E([n()],N.prototype,"changeEventEmitter",void 0),E([n()],N.prototype,"value",void 0);var A=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class F extends y{constructor(){super({parent:"vega-selection-tile-group",subStates:[{subStateName:"selectType",parentStateName:"selectType"},{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}A([n()],F.prototype,"host",void 0),A([n({writable:!0})],F.prototype,"selectType",void 0),A([n({writable:!0})],F.prototype,"disabled",void 0),A([n()],F.prototype,"checked",void 0),A([n()],F.prototype,"value",void 0),A([n()],F.prototype,"checkedController",void 0);var q=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class G extends a{connectedCallback(){this.selectionTileGroup=k(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new R(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),g.register(v.getSubject(this.selectionTileGroup||this.host,j),this.fieldErrorObserver)}disconnectedCallback(){g.unregister(v.getSubject(this.selectionTileGroup,j),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}q([n({writable:!0})],G.prototype,"showError",void 0),q([n()],G.prototype,"host",void 0),q([l("connectedCallback")],G.prototype,"connectedCallback",null),q([l("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var _=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const D=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new V,this.checkedController=new N,this.stateController=new F,this.showErrorController=new G,this.changeEventEmitter=f(D,b),this.checkboxEventPrevent=new C([b],(()=>this.renderer.getSelectorContainerRef())),this.checkboxValueChangeObserver=new z(m,(e=>this.checkedController.onCheck(e.detail))),this.radioValueChangeObserver=new z(u,(e=>{e.detail&&this.checkedController.onCheck(e.detail)})),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.showError=!1,this.titleText="",this.disabled=!1,this.selectType="radio"}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}};_([d()],D.prototype,"globalSlimmers",void 0),_([c()],D.prototype,"renderer",void 0),_([c()],D.prototype,"checkedController",void 0),_([c()],D.prototype,"stateController",void 0),_([c()],D.prototype,"showErrorController",void 0),_([c()],D.prototype,"changeEventEmitter",void 0),_([c()],D.prototype,"checkboxEventPrevent",void 0),_([c()],D.prototype,"checkboxValueChangeObserver",void 0),_([c()],D.prototype,"radioValueChangeObserver",void 0),_([c()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=':host{display:block}:host .selection-tile{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));cursor:pointer;margin:1px}:host .selection-tile:not(.disabled):hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled):focus-visible{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .selection-tile:not(.disabled).checked:hover{border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1))}:host .selection-tile:not(.disabled).checked:focus-visible{border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1))}:host .selection-tile:not(.disabled).error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled).error:focus-visible{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .selection-tile.disabled{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));pointer-events:none}:host .selection-tile.disabled .selection-tile-title,:host .selection-tile.disabled .selection-tile-note{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .selection-tile .selection-tile-icon{margin-top:4px;margin-bottom:4px}:host .selection-tile .selection-tile-select{height:24px}:host .selection-tile .selection-tile-select vega-checkbox,:host .selection-tile .selection-tile-select vega-radio{margin-top:4px}';var P=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class L extends a{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return this.label&&e("div",{class:"vega-label"},e("label",{"aria-label":this.label},this.label,this.renderRequire()))}renderRequire(){return this.required&&e("span",{class:"vega-require"},"*")}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("vega-flex",{direction:"horizontal"===this.layout?"row":"col",gap:"size-12"},e("slot",{onSlotchange:()=>this.itemsController.syncTileArrayAndValue()})))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([n()],L.prototype,"host",void 0),P([n()],L.prototype,"label",void 0),P([n()],L.prototype,"required",void 0),P([n()],L.prototype,"hint",void 0),P([n()],L.prototype,"layout",void 0),P([n()],L.prototype,"selectType",void 0),P([n()],L.prototype,"itemsController",void 0);var M=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class H extends a{watchValue(){this.changeEventEmitter.emit(this.value),g.notify(w,{host:this.host,detail:this.value})}onSelectionTilesChanged(){"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems()}onSelectionTileChecked(e){"checkbox"===this.selectType?this.setValueFromCheckbox(e):this.setValueFromRadio(e)}setValueFromCheckbox(e){e.checked&&!this.value.includes(e.value)?this.value=[...this.value,e.value]:!e.checked&&this.value.includes(e.value)&&(this.value=[...this.value.filter((t=>t!==e.value))])}setValueFromRadio(e){e.checked&&(this.value=e.value)}setValueFromCheckboxItems(){0===this.value.length&&(this.value=this.itemsController.getSelectionTileArray().filter((e=>e.checked)).map((e=>e.value)))}setValueFromRadioItems(){if(!this.value){const e=this.itemsController.getSelectionTileArray().find((e=>e.checked));e&&(this.value=e.value)}}}M([n()],H.prototype,"host",void 0),M([n({writable:!0})],H.prototype,"value",void 0),M([n()],H.prototype,"selectType",void 0),M([n()],H.prototype,"changeEventEmitter",void 0),M([n()],H.prototype,"itemsController",void 0),M([l("watchValue")],H.prototype,"watchValue",null);var U=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class K extends a{constructor(){super(...arguments),this.selectionTileArray=[]}initSelectionTileArray(){this.syncTileArrayAndValue()}getSelectionTileArray(){return this.selectionTileArray}syncTileArrayAndValue(){this.selectionTileArray=Array.from(this.host.querySelectorAll("vega-selection-tile")),this.valueController.onSelectionTilesChanged()}touchableAreaGetter(){const e="checkbox"===this.selectType?"vega-checkbox":"vega-radio";return this.selectionTileArray.map((t=>t.shadowRoot.querySelector(e).shadowRoot.querySelector("input")))}}U([n()],K.prototype,"host",void 0),U([n()],K.prototype,"selectType",void 0),U([n()],K.prototype,"valueController",void 0),U([l("componentWillLoad")],K.prototype,"initSelectionTileArray",null);var W=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const B=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.itemsController=new K,this.valueController=new H,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new O:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.touchableAreaGetter(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.changeEventEmitter=f(B,b),this.checkboxEventPrevent=new C([b],(()=>this.renderer.getGroupContainerRef())),this.selectionTileChangeObserver=new z(x,(e=>this.valueController.onSelectionTileChecked(e.detail))),this.selectTypeNotifySlimmer=S(B,"selectType","watchSelectType"),this.disabledNotifySlimmer=S(B,"disabled","watchDisabled"),this.valueNotifySlimmer=S(B,"value","watchValue"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.layout="vertical",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};W([d()],B.prototype,"globalSlimmers",void 0),W([c()],B.prototype,"renderer",void 0),W([c()],B.prototype,"itemsController",void 0),W([c()],B.prototype,"valueController",void 0),W([c()],B.prototype,"formFieldController",void 0),W([c()],B.prototype,"changeEventEmitter",void 0),W([c()],B.prototype,"checkboxEventPrevent",void 0),W([c()],B.prototype,"selectionTileChangeObserver",void 0),W([c()],B.prototype,"selectTypeNotifySlimmer",void 0),W([c()],B.prototype,"disabledNotifySlimmer",void 0),W([c()],B.prototype,"valueNotifySlimmer",void 0),W([c()],B.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B.style=':host{display:block;text-align:left;line-height:normal}:host .vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;margin-bottom:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-label label{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host .vega-label .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:12px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{D as vega_selection_tile,B as vega_selection_tile_group}
|
|
1
|
+
import{h as e,r as t,c as i,H as s,g as o}from"./p-21d26bb4.js";import{s as r}from"./p-519a7d55.js";import{c as n,V as a,M as l,I as c}from"./p-6e1ab235.js";import{V as h,I as d}from"./p-4387d550.js";import{c as p}from"./p-86194314.js";import{c as f}from"./p-eea36d3c.js";import{d as v,f as b}from"./p-6e01f0a2.js";import{C as g}from"./p-2d0d575f.js";import{k as x,C as m,R as u,b as w}from"./p-5773a9a3.js";import{S as y}from"./p-138fcf6e.js";import{c as j}from"./p-425ba7d6.js";import{f as k}from"./p-d5776087.js";import{O as R}from"./p-331a62d5.js";import{C}from"./p-6b7dca3e.js";import{C as z}from"./p-864de9a1.js";import{c as S}from"./p-8e31e7ea.js";import{F as I}from"./p-21e180f2.js";import{R as O}from"./p-280cbcdb.js";import"./p-6a334573.js";import"./p-e7b00bf0.js";import"./p-613ee009.js";import"./p-5f377954.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-4ab3df00.js";import"./p-834434d5.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-987fbbd0.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";var T=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class V extends a{getSelectorContainerRef(){return this.selectorContainerRef}render(){return e("vega-flex",{"align-items":"start","justify-content":"start",gap:"size-16",class:{"selection-tile":!0,disabled:this.disabled,checked:this.checked,error:this.showError},"aria-label":this.titleText||"No label defined",tabIndex:this.disabled?-1:0,onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:p()},e("div",{class:"vega-flex-grow"},this.renderContent()),this.renderSelect())}renderContent(){return this.hasContentSlot()?e("slot",{name:"content"}):e("vega-flex",{gap:"size-12"},e("vega-flex",{class:"vega-flex-shrink-0"},this.renderPrefixIcon()),e("div",{class:"vega-flex-grow"},this.renderText()))}renderPrefixIcon(){return this.hasPrefixSlot()?e("slot",{name:"prefix"}):this.prefixIcon?e("vega-icon",{icon:this.prefixIcon,size:"size-16",color:this.disabled?"text-secondary":"text-primary",class:"selection-tile-icon"}):void 0}renderText(){return e("vega-flex",{class:"vega-flex-grow",direction:"col","align-items":"start","justify-content":"start"},e("div",{class:"selection-tile-title"},this.titleText),this.note&&e("div",{class:"selection-tile-note"},this.note))}renderSelect(){return e("vega-flex",{"align-items":"start",class:"vega-flex-shrink-0 selection-tile-select",ref:e=>this.selectorContainerRef=e},"checkbox"===this.selectType?this.renderCheckbox():this.renderRadio())}renderCheckbox(){return e("vega-checkbox",{size:"small",disabled:this.disabled,checked:this.checked})}renderRadio(){return e("vega-radio",{size:"small",disabled:this.disabled,checked:this.checked})}hasPrefixSlot(){return null!==this.host.querySelector("[slot=prefix]")}hasContentSlot(){return null!==this.host.querySelector("[slot=content]")}}T([n()],V.prototype,"host",void 0),T([n()],V.prototype,"prefixIcon",void 0),T([n()],V.prototype,"titleText",void 0),T([n()],V.prototype,"note",void 0),T([n()],V.prototype,"selectType",void 0),T([n()],V.prototype,"disabled",void 0),T([n()],V.prototype,"checked",void 0),T([n()],V.prototype,"showError",void 0),T([n()],V.prototype,"checkedController",void 0);var E=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends a{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.checked=e,this.changeEventEmitter.emit(t),g.notify(x,{host:this.host,detail:{checked:e,value:this.value}})}}E([n()],N.prototype,"host",void 0),E([n({writable:!0})],N.prototype,"checked",void 0),E([n()],N.prototype,"changeEventEmitter",void 0),E([n()],N.prototype,"value",void 0);var A=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class F extends y{constructor(){super({parent:"vega-selection-tile-group",subStates:[{subStateName:"selectType",parentStateName:"selectType"},{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}A([n()],F.prototype,"host",void 0),A([n({writable:!0})],F.prototype,"selectType",void 0),A([n({writable:!0})],F.prototype,"disabled",void 0),A([n()],F.prototype,"checked",void 0),A([n()],F.prototype,"value",void 0),A([n()],F.prototype,"checkedController",void 0);var q=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class G extends a{connectedCallback(){this.selectionTileGroup=k(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new R(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),g.register(v.getSubject(this.selectionTileGroup||this.host,j),this.fieldErrorObserver)}disconnectedCallback(){g.unregister(v.getSubject(this.selectionTileGroup,j),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}q([n({writable:!0})],G.prototype,"showError",void 0),q([n()],G.prototype,"host",void 0),q([l("connectedCallback")],G.prototype,"connectedCallback",null),q([l("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var _=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const D=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new V,this.checkedController=new N,this.stateController=new F,this.showErrorController=new G,this.changeEventEmitter=f(D,b),this.checkboxEventPrevent=new C([b],(()=>this.renderer.getSelectorContainerRef())),this.checkboxValueChangeObserver=new z(m,(e=>this.checkedController.onCheck(e.detail))),this.radioValueChangeObserver=new z(u,(e=>{e.detail&&this.checkedController.onCheck(e.detail)})),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.showError=!1,this.titleText="",this.disabled=!1,this.selectType="radio"}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}};_([d()],D.prototype,"globalSlimmers",void 0),_([c()],D.prototype,"renderer",void 0),_([c()],D.prototype,"checkedController",void 0),_([c()],D.prototype,"stateController",void 0),_([c()],D.prototype,"showErrorController",void 0),_([c()],D.prototype,"changeEventEmitter",void 0),_([c()],D.prototype,"checkboxEventPrevent",void 0),_([c()],D.prototype,"checkboxValueChangeObserver",void 0),_([c()],D.prototype,"radioValueChangeObserver",void 0),_([c()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=':host{display:block}:host .selection-tile{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));cursor:pointer;margin:1px}:host .selection-tile:not(.disabled):hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled):focus-visible{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .selection-tile:not(.disabled).checked:hover{border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1))}:host .selection-tile:not(.disabled).checked:focus-visible{border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1))}:host .selection-tile:not(.disabled).error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled).error:focus-visible{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .selection-tile.disabled{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));pointer-events:none}:host .selection-tile.disabled .selection-tile-title,:host .selection-tile.disabled .selection-tile-note{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .selection-tile .selection-tile-icon{margin-top:4px;margin-bottom:4px}:host .selection-tile .selection-tile-select{height:24px}:host .selection-tile .selection-tile-select vega-checkbox,:host .selection-tile .selection-tile-select vega-radio{margin-top:4px}';var P=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class L extends a{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return this.label&&e("div",{class:"vega-label"},e("label",{"aria-label":this.label},this.label,this.renderRequire()))}renderRequire(){return this.required&&e("span",{class:"vega-require"},"*")}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("vega-flex",{direction:"horizontal"===this.layout?"row":"col",gap:"size-12"},e("slot",{onSlotchange:()=>this.itemsController.syncTileArrayAndValue()})))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([n()],L.prototype,"host",void 0),P([n()],L.prototype,"label",void 0),P([n()],L.prototype,"required",void 0),P([n()],L.prototype,"hint",void 0),P([n()],L.prototype,"layout",void 0),P([n()],L.prototype,"selectType",void 0),P([n()],L.prototype,"itemsController",void 0);var M=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class H extends a{watchValue(){this.changeEventEmitter.emit(this.value),g.notify(w,{host:this.host,detail:this.value})}onSelectionTilesChanged(){"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems()}onSelectionTileChecked(e){"checkbox"===this.selectType?this.setValueFromCheckbox(e):this.setValueFromRadio(e)}setValueFromCheckbox(e){e.checked&&!this.value.includes(e.value)?this.value=[...this.value,e.value]:!e.checked&&this.value.includes(e.value)&&(this.value=[...this.value.filter((t=>t!==e.value))])}setValueFromRadio(e){e.checked&&(this.value=e.value)}setValueFromCheckboxItems(){0===this.value.length&&(this.value=this.itemsController.getSelectionTileArray().filter((e=>e.checked)).map((e=>e.value)))}setValueFromRadioItems(){if(!this.value){const e=this.itemsController.getSelectionTileArray().find((e=>e.checked));e&&(this.value=e.value)}}}M([n()],H.prototype,"host",void 0),M([n({writable:!0})],H.prototype,"value",void 0),M([n()],H.prototype,"selectType",void 0),M([n()],H.prototype,"changeEventEmitter",void 0),M([n()],H.prototype,"itemsController",void 0),M([l("watchValue")],H.prototype,"watchValue",null);var U=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class K extends a{constructor(){super(...arguments),this.selectionTileArray=[]}initSelectionTileArray(){this.syncTileArrayAndValue()}getSelectionTileArray(){return this.selectionTileArray}syncTileArrayAndValue(){this.selectionTileArray=Array.from(this.host.querySelectorAll("vega-selection-tile")),this.valueController.onSelectionTilesChanged()}touchableAreaGetter(){const e="checkbox"===this.selectType?"vega-checkbox":"vega-radio";return this.selectionTileArray.map((t=>t.shadowRoot.querySelector(e).shadowRoot.querySelector("input")))}}U([n()],K.prototype,"host",void 0),U([n()],K.prototype,"selectType",void 0),U([n()],K.prototype,"valueController",void 0),U([l("componentWillLoad")],K.prototype,"initSelectionTileArray",null);var W=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const B=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.itemsController=new K,this.valueController=new H,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new O:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.touchableAreaGetter(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.changeEventEmitter=f(B,b),this.checkboxEventPrevent=new C([b],(()=>this.renderer.getGroupContainerRef())),this.selectionTileChangeObserver=new z(x,(e=>this.valueController.onSelectionTileChecked(e.detail))),this.selectTypeNotifySlimmer=S(B,"selectType","watchSelectType"),this.disabledNotifySlimmer=S(B,"disabled","watchDisabled"),this.valueNotifySlimmer=S(B,"value","watchValue"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.layout="vertical",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};W([d()],B.prototype,"globalSlimmers",void 0),W([c()],B.prototype,"renderer",void 0),W([c()],B.prototype,"itemsController",void 0),W([c()],B.prototype,"valueController",void 0),W([c()],B.prototype,"formFieldController",void 0),W([c()],B.prototype,"changeEventEmitter",void 0),W([c()],B.prototype,"checkboxEventPrevent",void 0),W([c()],B.prototype,"selectionTileChangeObserver",void 0),W([c()],B.prototype,"selectTypeNotifySlimmer",void 0),W([c()],B.prototype,"disabledNotifySlimmer",void 0),W([c()],B.prototype,"valueNotifySlimmer",void 0),W([c()],B.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B.style=':host{display:block;text-align:left;line-height:normal}:host .vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;margin-bottom:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-label label{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host .vega-label .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:12px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{D as vega_selection_tile,B as vega_selection_tile_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-0bb29d98.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,c as l,d as h,b as c,e as d,F as u,f,g as m}from"./p-5773a9a3.js";import{f as p,c as v}from"./p-bf953152.js";import{i as b,g}from"./p-37b05e0b.js";import{c as R}from"./p-6a334573.js";import{d as j}from"./p-e1a2a701.js";import{c as y,d as w}from"./p-425ba7d6.js";import{V as O}from"./p-4ab3df00.js";import{P as E}from"./p-c0291e2e.js";import{I as F}from"./p-abd7aeaa.js";import{D as V}from"./p-66759f4e.js";import{M as I}from"./p-987fbbd0.js";import{A as C}from"./p-52b8f2d2.js";import{i as S}from"./p-d27ae9ff.js";import{S as A}from"./p-6934013c.js";class k{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:b(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class T{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new k(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=g();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class L{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class M{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class B{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class D extends t{getTranslatedMessage(t){return"string"==typeof t?O.t(t):O.t(t.key,...t.args||[])}}var H=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class U extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new D,this.fieldErrorUiControllerStrategies=[new L,new M,new B],this.initTranslationObserver()}applyInputInvalidUI(t){this.errorMessage=t;const e=this.getInputElementContainer();if(t&&e){const s=this.getErrorContainer(e);s.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),s.classList.remove("vega-hidden"),e.classList.add("error"),o.notify(j.getSubject(this.host,y),{host:this.host,showError:!0})}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(j.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}H([e()],U.prototype,"formFieldMessageTranslatorSlimmer",void 0),H([s()],U.prototype,"host",void 0),H([s()],U.prototype,"options",void 0);var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class P{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new D,this.fieldErrorUIController=new U,this.resizeObserverSlimmer=R(P,E,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&p(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new T,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return p(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!v(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{this.canSubmitFormByEvent(t)&&o.notify(u,{host:this.host})}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof F&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}x([e()],P.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([e()],P.prototype,"fieldErrorUIController",void 0),x([e()],P.prototype,"resizeObserverSlimmer",void 0);var W=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G extends t{constructor(){super(...arguments),this.fieldErrorUIController=new U,this.handleFieldErrorMessageUpdate=t=>{const{message:e}=t;e?this.fieldErrorUIController.applyInputInvalidUI(e):this.fieldErrorUIController.resetInputInvalidUI()}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(f,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(f,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return!(!s||s!==e)}}W([s()],G.prototype,"host",void 0),W([s()],G.prototype,"options",void 0),W([e()],G.prototype,"fieldErrorUIController",void 0),W([i("setInjectFormFieldHelper")],G.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),W([i("disconnectedCallback")],G.prototype,"handleUnregisterObserver",null);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){V.addUniqueObserverToNode(this.host,w,this.handleValidInvocation)}handleUnregisterObserver(){V.removeUniqueObserverFromNode(this.host,w)}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"validator",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"registerValidInvocationObserver",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends A{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"componentWillLoad",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends t{constructor(t){super(),this.fieldErrorSlimmer=new G,this.formFieldValidInvokeSlimmer=new K,this.formFormStateController=new X,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,e){S(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(J.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new P(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(m,{host:this.host,detail:t}))}}),this.validator=e,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new I({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:C(),callback:this.mutationObserverCallBack})}}q([s()],J.prototype,"host",void 0),q([s({writable:!0})],J.prototype,"validationRules",void 0),q([s()],J.prototype,"disabled",void 0),q([s()],J.prototype,"autoValidation",void 0),q([s({writable:!0})],J.prototype,"isValid",void 0),q([e()],J.prototype,"fieldErrorSlimmer",void 0),q([e()],J.prototype,"formFieldValidInvokeSlimmer",void 0),q([e()],J.prototype,"mutationObserverSlimmer",void 0),q([e()],J.prototype,"formFormStateController",void 0),q([i("connectedCallback")],J.prototype,"connectedCallback",null),q([i("disconnectedCallback")],J.prototype,"disconnectedCallback",null),q([i("componentDidLoad")],J.prototype,"componentDidLoad",null),q([i("watchValidationRules")],J.prototype,"watchValidationRulesByFormControllerSlimmer",null),q([i("componentWillLoad")],J.prototype,"setInjectFormFieldHelper",null);export{J as F}
|
|
1
|
+
import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-0bb29d98.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,c as l,d as h,b as c,e as d,F as u,f,g as m}from"./p-5773a9a3.js";import{f as p,c as v}from"./p-d5776087.js";import{i as b,g}from"./p-37b05e0b.js";import{c as R}from"./p-6a334573.js";import{d as j}from"./p-6e01f0a2.js";import{c as y,d as w}from"./p-425ba7d6.js";import{V as O}from"./p-4ab3df00.js";import{P as E}from"./p-834434d5.js";import{I as F}from"./p-abd7aeaa.js";import{D as V}from"./p-e7b00bf0.js";import{M as I}from"./p-987fbbd0.js";import{A as C}from"./p-52b8f2d2.js";import{i as S}from"./p-d27ae9ff.js";import{S as A}from"./p-138fcf6e.js";class k{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:b(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class T{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new k(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=g();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class L{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class M{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class B{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class D extends t{getTranslatedMessage(t){return"string"==typeof t?O.t(t):O.t(t.key,...t.args||[])}}var H=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class U extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new D,this.fieldErrorUiControllerStrategies=[new L,new M,new B],this.initTranslationObserver()}applyInputInvalidUI(t){this.errorMessage=t;const e=this.getInputElementContainer();if(t&&e){const s=this.getErrorContainer(e);s.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),s.classList.remove("vega-hidden"),e.classList.add("error"),o.notify(j.getSubject(this.host,y),{host:this.host,showError:!0})}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(j.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}H([e()],U.prototype,"formFieldMessageTranslatorSlimmer",void 0),H([s()],U.prototype,"host",void 0),H([s()],U.prototype,"options",void 0);var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class P{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new D,this.fieldErrorUIController=new U,this.resizeObserverSlimmer=R(P,E,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&p(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new T,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return p(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!v(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{this.canSubmitFormByEvent(t)&&o.notify(u,{host:this.host})}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof F&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}x([e()],P.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([e()],P.prototype,"fieldErrorUIController",void 0),x([e()],P.prototype,"resizeObserverSlimmer",void 0);var W=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G extends t{constructor(){super(...arguments),this.fieldErrorUIController=new U,this.handleFieldErrorMessageUpdate=t=>{const{message:e}=t;e?this.fieldErrorUIController.applyInputInvalidUI(e):this.fieldErrorUIController.resetInputInvalidUI()}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(f,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(f,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return!(!s||s!==e)}}W([s()],G.prototype,"host",void 0),W([s()],G.prototype,"options",void 0),W([e()],G.prototype,"fieldErrorUIController",void 0),W([i("setInjectFormFieldHelper")],G.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),W([i("disconnectedCallback")],G.prototype,"handleUnregisterObserver",null);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){V.addUniqueObserverToNode(this.host,w,this.handleValidInvocation)}handleUnregisterObserver(){V.removeUniqueObserverFromNode(this.host,w)}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"validator",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"registerValidInvocationObserver",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends A{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"componentWillLoad",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends t{constructor(t){super(),this.fieldErrorSlimmer=new G,this.formFieldValidInvokeSlimmer=new K,this.formFormStateController=new X,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,e){S(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(J.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new P(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(m,{host:this.host,detail:t}))}}),this.validator=e,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new I({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:C(),callback:this.mutationObserverCallBack})}}q([s()],J.prototype,"host",void 0),q([s({writable:!0})],J.prototype,"validationRules",void 0),q([s()],J.prototype,"disabled",void 0),q([s()],J.prototype,"autoValidation",void 0),q([s({writable:!0})],J.prototype,"isValid",void 0),q([e()],J.prototype,"fieldErrorSlimmer",void 0),q([e()],J.prototype,"formFieldValidInvokeSlimmer",void 0),q([e()],J.prototype,"mutationObserverSlimmer",void 0),q([e()],J.prototype,"formFormStateController",void 0),q([i("connectedCallback")],J.prototype,"connectedCallback",null),q([i("disconnectedCallback")],J.prototype,"disconnectedCallback",null),q([i("componentDidLoad")],J.prototype,"componentDidLoad",null),q([i("watchValidationRules")],J.prototype,"watchValidationRulesByFormControllerSlimmer",null),q([i("componentWillLoad")],J.prototype,"setInjectFormFieldHelper",null);export{J as F}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as a}from"./p-21d26bb4.js";import{F as r}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as a}from"./p-21d26bb4.js";import{F as r}from"./p-21e180f2.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{g as h,b as l,d,c as m,e as c,F as p,a as f}from"./p-5773a9a3.js";import{d as u}from"./p-d27ae9ff.js";import{s as b}from"./p-519a7d55.js";import{f as v,c as j,i as w}from"./p-d5776087.js";import{I as g}from"./p-b28d4f7d.js";import{c as V,I as F}from"./p-6e1ab235.js";import{V as y,I as E}from"./p-4387d550.js";import{c as R}from"./p-eea36d3c.js";import{C as S}from"./p-6b7dca3e.js";import{w as C,x as O,y as I,d as P}from"./p-6e01f0a2.js";import{C as B}from"./p-864de9a1.js";import{d as M}from"./p-425ba7d6.js";import{c as A}from"./p-8e31e7ea.js";import{S as D}from"./p-138fcf6e.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-4ab3df00.js";import"./p-834434d5.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-e7b00bf0.js";import"./p-987fbbd0.js";import"./p-52b8f2d2.js";import"./p-262ec334.js";import"./p-613ee009.js";import"./p-5f377954.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-112455b1.js";var N=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};class x extends D{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation"}]})}}N([V()],x.prototype,"host",void 0),N([V({writable:!0})],x.prototype,"disableBlurValidation",void 0);var H=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};const k=class{constructor(s){t(this,s),this.vegaValidate=i(this,"vegaValidate",7),this.validate=i(this,"validate",7),this.vegaFormSubmit=i(this,"vegaFormSubmit",7),this.formSubmit=i(this,"formSubmit",7),this.vegaFormReset=i(this,"vegaFormReset",7),this.formReset=i(this,"formReset",7),this.globalSlimmers={},this.submitEventEmitter=R(k,C),this.resetEventEmitter=R(k,O),this.validateEventEmitter=R(k,I),this.disableBlurValidationNotifySlimmer=A(k,"disableBlurValidation","watchDisableBlurValidation"),this.stateController=new x,this.childEventPrevent=new S([C,O],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new S([I],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.childNotifyObserver=new B(h,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new B(l,(()=>this.updateInternalTouchedStatus())),this.vegaComponentUsageRuntimeMetricsSlimmer=new y,this.invalidFieldPathMap=new g(new Map,(t=>{this.invalidFieldPathMap=t,this.updateIsValidFlag()})),this.pendingValidFieldPathMap=new g(new Map,(t=>{this.pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.controlledFieldPathSet=new Set,this.isValid=null,this.isTouched=!1,this.disableBlurValidation=!1,this.updateInternalValidStatus=t=>{if(t.host!==this.host){const i=t.host,s=t.detail;r.isValidFormField(i)&&this.shouldVisitElement(i,!1,!1)&&(s?this.invalidFieldPathMap.delete(i):this.invalidFieldPathMap.set(i,i.dataset.vegaForm))}}}watchIsValid(){this.validateEventEmitter.emit(this.isValid),o.notify(h,{host:this.host,detail:this.isValid})}watchDisableBlurValidation(){}async disconnectedCallback(){o.notify(d,{host:this.host}),o.unregister(d,this.formFieldDisconnectedObserver),o.unregister(m,this.formFieldPendingValidObserver)}async componentDidLoad(){await this.navigateVegaFormChildren((async(t,i)=>{i||this.controlledFieldPathSet.add(this.getFormFieldName(t,!0))})),this.initFormFieldDisconnectedObserver(),this.registerFormSubmitChangeManager(),this.registerFormResetChangeManager(),this.registerFormFieldPendingValidChangeManager()}async valid(t=!0){const i={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(s,e)=>{if("function"==typeof s.valid&&e){const e=await s.valid(t);e.isValid||(i.isValid=!1,i.invalidFields.push(...e.invalidFields),i.invalidFieldsErrorMessages=Object.assign(Object.assign({},i.invalidFieldsErrorMessages),e.invalidFieldsErrorMessages))}else{const{isValid:e,message:a}=await this.handleChildFormFieldElementValid(s,t);e||(i.isValid=!1,i.invalidFields.push(this.getFormFieldName(s)),i.invalidFieldsErrorMessages||(i.invalidFieldsErrorMessages={}),i.invalidFieldsErrorMessages[this.getFormFieldName(s)]=a)}})),i}async getValue(t){const i={};return await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);i[a]=e?await s.getValue(t):k.getFormFieldValue(s)}),t),u(i)?Object.values(i):i}async setValue(t,i){t&&(await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e?await s.setValue(t[a],i):(await s.componentOnReady(),void 0!==t[a]&&("function"==typeof s.setValue?await s.setValue(t[a]):s.value=t[a]))}),i),this.isTouched=!1)}async reset(t={},i){await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e&&await s.reset(t[a]||{},i)}),i),o.notify(c,{host:this.host,defaultValueMap:t,option:i}),this.isTouched=!1}static getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}render(){return b(s(e,null,s("slot",null)),this.host)}updateInternalTouchedStatus(){this.isTouched=!0}async navigateVegaFormChildren(t,i,s=this.host){const e=[];Array.from(s.children).forEach((s=>{r.isValidFormField(s)?this.shouldVisitElement(s,null==i?void 0:i.skipDisabled,null==i?void 0:i.skipInvisible)&&e.push(t(s,"VEGA-FORM"===s.tagName)):e.push(this.navigateVegaFormChildren(t,i,s))})),await Promise.all(e)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}getFormFieldName(t,i){let s=t.dataset.vegaForm;if(i){let i=v(t,"vega-form");for(;i&&i!==this.host;)s=i.dataset.vegaForm+" -> "+s,i=v(i,"vega-form")}return s}shouldVisitElement(t,i,s){return this.getFormFieldName(t)&&(!i||!t.disabled)&&(!s||j(t))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new n(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),o.register(d,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}registerFormSubmitChangeManager(){this.formEventsObserver=new n(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this)),o.register(p,this.formEventsObserver)}canAcceptFormSubmitEvent(t){return this.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.valid()).isValid){const t=await this.getValue();this.submitEventEmitter.emit(t)}}registerFormResetChangeManager(){this.formEventsObserver=new n(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),o.register(f,this.formEventsObserver)}canAcceptFormResetEvent(t){return this.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.reset(),this.resetEventEmitter.emit()}registerFormFieldPendingValidChangeManager(){this.formFieldPendingValidObserver=new n(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),o.register(m,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,t.host.dataset.vegaForm)}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||w(t,this.host)}async handleChildFormFieldElementValid(t,i){const s=P.getSubject(t,M),{isValid:e,message:a}=await new Promise((e=>{const a=setTimeout((()=>{e({isValid:!0,message:""})}),2e3);o.notify(s,{host:t,message:i,promiseResolve:e,timerId:a})}));return{isValid:e,message:a}}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"],disableBlurValidation:["watchDisableBlurValidation"]}}};H([E()],k.prototype,"globalSlimmers",void 0),H([F()],k.prototype,"submitEventEmitter",void 0),H([F()],k.prototype,"resetEventEmitter",void 0),H([F()],k.prototype,"validateEventEmitter",void 0),H([F()],k.prototype,"disableBlurValidationNotifySlimmer",void 0),H([F()],k.prototype,"stateController",void 0),H([F()],k.prototype,"childEventPrevent",void 0),H([F()],k.prototype,"childFormValidateEventPrevent",void 0),H([F()],k.prototype,"childNotifyObserver",void 0),H([F()],k.prototype,"childNodeValueChangeObserver",void 0),H([F()],k.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),k.style=":host{display:block}";export{k as vega_form}
|