@heartlandone/vega 2.102.0 → 2.103.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-49c2a999.js → app-globals-85986306.js} +10 -10
- package/dist/cjs/{code-block-06e6591f.js → code-block-72de6c4d.js} +80 -1
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-f29908f8.js → component-value-history-controller-slimmer.abstract-23d2b3d8.js} +3 -3
- package/dist/cjs/{content-state-8c862e5e.js → content-state-ff40bdc6.js} +38 -5
- package/dist/cjs/{date-required-rule-b672c432.js → date-required-rule-608e704b.js} +1 -1
- package/dist/cjs/{design-token-351ffd2c.js → design-token-a101a8d0.js} +3 -3
- package/dist/cjs/{element-appender-slimmer-f932b166.js → element-appender-slimmer-b93cc564.js} +2 -2
- package/dist/cjs/{form-field-controller-slimmer-5adb86ae.js → form-field-controller-slimmer-124d54ea.js} +1 -1
- package/dist/cjs/{image-annotation-action-25907d6b.js → image-annotation-action-1ee41bc7.js} +2 -2
- package/dist/cjs/{image-extension-1cf84f27.js → image-extension-6a92c524.js} +247 -5
- package/dist/cjs/index.cjs.js +17 -17
- package/dist/cjs/{inject-keyboard-manager-84d33920.js → inject-keyboard-manager-32d7dd0e.js} +1 -1
- package/dist/cjs/{internal-calendar-period-factory-3c5236be.js → internal-calendar-period-factory-c3198ea7.js} +1 -1
- package/dist/cjs/{internal-translation-controller-eae8a8de.js → internal-translation-controller-0d67ca4d.js} +1 -0
- package/dist/cjs/{keyboard-manager-baa83a61.js → keyboard-manager-332eec89.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-d1974b28.js → keyboard-manager-slimmer-a2872981.js} +1 -1
- package/dist/cjs/{link-extension-2a6133b7.js → link-extension-1b4ed437.js} +3 -3
- package/dist/cjs/loader.cjs.js +12 -12
- package/dist/cjs/{month-view-generator-a6827548.js → month-view-generator-b6a2b8be.js} +1 -1
- package/dist/cjs/{public-rules-7f26e0ae.js → public-rules-2066613c.js} +7 -7
- package/dist/cjs/{range-518b95a2.js → range-712fe703.js} +1 -1
- package/dist/cjs/{responsive-format-facade-95c54444.js → responsive-format-facade-44d33457.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-5d0c76ec.js → rich-text-editor-required-rule-1aa75d22.js} +1 -1
- package/dist/cjs/{split-cell-operation-28f6f8d9.js → split-cell-operation-afc82323.js} +3 -3
- package/dist/cjs/{state-border-formatter-6c284859.js → state-border-formatter-49984fd6.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-f15b6196.js → string-format-strategy.abstract-bd563c01.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-5a3f1b55.js → string-input-formatter-slimmer-4faebac9.js} +1 -1
- package/dist/cjs/{string-mask-strategy-af6f3ba0.js → string-mask-strategy-624c4398.js} +2 -2
- package/dist/cjs/{style-formatter-324211fd.js → style-formatter-151d89a3.js} +2 -2
- package/dist/cjs/{time-required-rule-9e714442.js → time-required-rule-8cd8f9b9.js} +1 -1
- package/dist/cjs/{token-extension-86723cad.js → token-extension-72d0cb08.js} +1011 -767
- package/dist/cjs/{translation-slimmer-0227ee24.js → translation-slimmer-1771d01f.js} +1 -1
- package/dist/cjs/{type-guard-29e01bd4.js → type-guard-cce6fe1f.js} +1 -1
- package/dist/cjs/{valid-credit-card-number-rule-4ec364af.js → valid-credit-card-number-rule-b13c2fc4.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
- package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
- package/dist/cjs/vega-box.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
- package/dist/cjs/vega-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-calendar_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-card.cjs.entry.js +5 -5
- package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-chip.cjs.entry.js +5 -5
- package/dist/cjs/vega-code-block.cjs.entry.js +8 -8
- package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
- package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
- package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-dialog_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-divider.cjs.entry.js +5 -5
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
- package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-flex.cjs.entry.js +6 -6
- package/dist/cjs/vega-font.cjs.entry.js +5 -5
- package/dist/cjs/vega-form.cjs.entry.js +2 -2
- package/dist/cjs/vega-grid.cjs.entry.js +5 -5
- package/dist/cjs/vega-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-image-uploader.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-numeric.cjs.entry.js +12 -14
- package/dist/cjs/vega-input-passcode.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +4 -4
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +5 -5
- package/dist/cjs/vega-input.cjs.entry.js +31 -27
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
- package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-bookmark-editor.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +474 -207
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
- package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
- package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-table_11.cjs.entry.js +4 -4
- package/dist/cjs/vega-textarea.cjs.entry.js +2 -2
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
- package/dist/cjs/vega.cjs.js +12 -12
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-state-controller.js +0 -14
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.js +11 -2
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +11 -1
- package/dist/collection/components/vega-input/vega-input.js +52 -8
- package/dist/collection/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.js +7 -1
- package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +0 -8
- package/dist/collection/components/vega-rich-text-editor/constants/constant.js +4 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/sequential-composition-action.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +4 -1
- package/dist/collection/components/vega-rich-text-editor/dto/flush-changes-payload.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +3 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.js +107 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.js +91 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.js +47 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.js +54 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +41 -354
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.js +36 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.js +23 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.js +34 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.js +74 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/type.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +67 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +67 -11
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.js +4 -17
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +34 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.js +13 -32
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +60 -25
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +55 -19
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +165 -59
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.js +55 -21
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +2 -16
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +11 -1
- package/dist/collection/components/vega-rich-text-editor/utils/html-to-plain-text-utils.js +240 -0
- package/dist/collection/helpers/translation/locales/en.js +1 -0
- package/dist/esm/{app-globals-da5c83c2.js → app-globals-8cdfc5c9.js} +10 -10
- package/dist/esm/{code-block-d8f83d85.js → code-block-9360c331.js} +74 -2
- package/dist/esm/{component-value-history-controller-slimmer.abstract-642e7147.js → component-value-history-controller-slimmer.abstract-9ea58806.js} +3 -3
- package/dist/esm/{content-state-486eae1d.js → content-state-67a12e74.js} +38 -5
- package/dist/esm/{date-required-rule-08695d25.js → date-required-rule-66b5bf02.js} +1 -1
- package/dist/esm/{design-token-df3331d9.js → design-token-acd1efeb.js} +3 -3
- package/dist/esm/{element-appender-slimmer-f02a227f.js → element-appender-slimmer-7e5bc1e9.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-a7c0a0f8.js → form-field-controller-slimmer-d653c494.js} +1 -1
- package/dist/esm/{image-annotation-action-df744ba5.js → image-annotation-action-9525be48.js} +2 -2
- package/dist/esm/{image-extension-20b39140.js → image-extension-aea75132.js} +246 -6
- package/dist/esm/index.js +17 -17
- package/dist/esm/{inject-keyboard-manager-399ed867.js → inject-keyboard-manager-f6522d2f.js} +1 -1
- package/dist/esm/{internal-calendar-period-factory-7b866c3b.js → internal-calendar-period-factory-261df2f2.js} +1 -1
- package/dist/esm/{internal-translation-controller-4a7ee4d5.js → internal-translation-controller-3637e47e.js} +1 -0
- package/dist/esm/{keyboard-manager-f5d13a34.js → keyboard-manager-53e8d8d0.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-f40dcb54.js → keyboard-manager-slimmer-b3de042d.js} +1 -1
- package/dist/esm/{link-extension-3f93d70d.js → link-extension-57ba9520.js} +3 -3
- package/dist/esm/loader.js +12 -12
- package/dist/esm/{month-view-generator-0c665987.js → month-view-generator-15215a09.js} +1 -1
- package/dist/esm/{public-rules-470a1dac.js → public-rules-c77a1550.js} +7 -7
- package/dist/esm/{range-8e89fb54.js → range-3c74e1c8.js} +1 -1
- package/dist/esm/{responsive-format-facade-55131a33.js → responsive-format-facade-1b325d06.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-06caf383.js → rich-text-editor-required-rule-cfd32ba2.js} +1 -1
- package/dist/esm/{split-cell-operation-e158366a.js → split-cell-operation-85a036f9.js} +3 -3
- package/dist/esm/{state-border-formatter-2b73fa08.js → state-border-formatter-ce3495b0.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-8c7937e3.js → string-format-strategy.abstract-8ce04558.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-681c6b71.js → string-input-formatter-slimmer-0d60ba7d.js} +1 -1
- package/dist/esm/{string-mask-strategy-b8cceee6.js → string-mask-strategy-cabc1d50.js} +2 -2
- package/dist/esm/{style-formatter-fcd70869.js → style-formatter-00fe4f1c.js} +2 -2
- package/dist/esm/{time-required-rule-ce50859b.js → time-required-rule-57ceeae9.js} +1 -1
- package/dist/esm/{token-extension-2401e753.js → token-extension-645a9520.js} +1011 -767
- package/dist/esm/{translation-slimmer-b3f3cf65.js → translation-slimmer-b69057eb.js} +1 -1
- package/dist/esm/{type-guard-08c82e08.js → type-guard-204094c6.js} +1 -1
- package/dist/esm/{valid-credit-card-number-rule-66bad519.js → valid-credit-card-number-rule-0874e19f.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +6 -6
- package/dist/esm/vega-app-header-button.entry.js +5 -5
- package/dist/esm/vega-box.entry.js +6 -6
- package/dist/esm/vega-button-circle.entry.js +5 -5
- package/dist/esm/vega-button.entry.js +3 -3
- package/dist/esm/vega-calendar_5.entry.js +7 -7
- package/dist/esm/vega-card.entry.js +5 -5
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +2 -2
- package/dist/esm/vega-chip.entry.js +5 -5
- package/dist/esm/vega-code-block.entry.js +8 -8
- package/dist/esm/vega-color-picker.entry.js +2 -2
- package/dist/esm/vega-color-swatch-picker.entry.js +3 -3
- package/dist/esm/vega-color-swatch.entry.js +2 -2
- package/dist/esm/vega-combo-box.entry.js +8 -8
- package/dist/esm/vega-date-picker_2.entry.js +13 -13
- package/dist/esm/vega-dialog_2.entry.js +3 -3
- package/dist/esm/vega-divider.entry.js +5 -5
- package/dist/esm/vega-dropdown_5.entry.js +7 -7
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +2 -2
- package/dist/esm/vega-file-uploader.entry.js +3 -3
- package/dist/esm/vega-flag-icon.entry.js +5 -5
- package/dist/esm/vega-flex.entry.js +6 -6
- package/dist/esm/vega-font.entry.js +5 -5
- package/dist/esm/vega-form.entry.js +2 -2
- package/dist/esm/vega-grid.entry.js +5 -5
- package/dist/esm/vega-icon.entry.js +5 -5
- package/dist/esm/vega-image-uploader.entry.js +5 -5
- package/dist/esm/vega-input-credit-card.entry.js +6 -6
- package/dist/esm/vega-input-numeric.entry.js +12 -14
- package/dist/esm/vega-input-passcode.entry.js +5 -5
- package/dist/esm/vega-input-phone-number.entry.js +4 -4
- package/dist/esm/vega-input-range.entry.js +3 -3
- package/dist/esm/vega-input-select.entry.js +5 -5
- package/dist/esm/vega-input.entry.js +31 -27
- package/dist/esm/vega-left-nav_5.entry.js +7 -7
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
- package/dist/esm/vega-pagination.entry.js +4 -4
- package/dist/esm/vega-popover_2.entry.js +8 -8
- package/dist/esm/vega-progress-tracker_2.entry.js +3 -3
- package/dist/esm/vega-radio_2.entry.js +5 -5
- package/dist/esm/vega-rich-text-bookmark-editor.entry.js +2 -2
- package/dist/esm/vega-rich-text-content.entry.js +6 -6
- package/dist/esm/vega-rich-text-editor_4.entry.js +474 -207
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
- package/dist/esm/vega-selection-chip_2.entry.js +4 -4
- package/dist/esm/vega-selection-tile_2.entry.js +2 -2
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +7 -7
- package/dist/esm/vega-stepper.entry.js +2 -2
- package/dist/esm/vega-tab-group_2.entry.js +6 -6
- package/dist/esm/vega-table_11.entry.js +4 -4
- package/dist/esm/vega-textarea.entry.js +2 -2
- package/dist/esm/vega-time-picker_2.entry.js +9 -9
- package/dist/esm/vega-toggle-switch.entry.js +2 -2
- package/dist/esm/vega-tooltip_2.entry.js +6 -6
- package/dist/esm/vega.js +12 -12
- package/dist/sri/vega-sri-manifest.json +321 -321
- package/dist/types/components/vega-input/slimmers/controllers/vega-input-state-controller.d.ts +0 -2
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.d.ts +4 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +2 -0
- package/dist/types/components/vega-input/vega-input.d.ts +15 -3
- package/dist/types/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.d.ts +2 -0
- package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +0 -2
- package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +4 -1
- package/dist/types/components/vega-rich-text-editor/dto/actions/sequential-composition-action.d.ts +30 -0
- package/dist/types/components/vega-rich-text-editor/dto/flush-changes-payload.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +7 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.d.ts +33 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.d.ts +43 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.d.ts +22 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +28 -93
- package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.d.ts +28 -6
- package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/type.d.ts +35 -0
- package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +47 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.d.ts +17 -6
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.d.ts +5 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.d.ts +30 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.d.ts +5 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.d.ts +21 -4
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.d.ts +12 -4
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.d.ts +38 -5
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.d.ts +7 -2
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/utils/html-to-plain-text-utils.d.ts +31 -0
- package/dist/types/components.d.ts +24 -0
- package/dist/types/helpers/translation/interface.d.ts +1 -0
- package/dist/types/types/public-api.d.ts +2 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-8a4cc7c2.entry.js → p-0169f71c.entry.js} +1 -1
- package/dist/vega/p-018bb83b.entry.js +1 -0
- package/dist/vega/{p-25e51acb.js → p-08bf08d2.js} +1 -1
- package/dist/vega/{p-85a940c0.entry.js → p-0b33753f.entry.js} +1 -1
- package/dist/vega/{p-a5fa260b.js → p-1537b1e4.js} +1 -1
- package/dist/vega/{p-7dfb1481.entry.js → p-17f6dc94.entry.js} +1 -1
- package/dist/vega/{p-dd673eb4.entry.js → p-1a4d1991.entry.js} +1 -1
- package/dist/vega/{p-557b64bd.js → p-1b2e5898.js} +1 -1
- package/dist/vega/{p-2256eb09.entry.js → p-1f1f93bf.entry.js} +1 -1
- package/dist/vega/{p-d86e0b01.js → p-1fb953f8.js} +1 -1
- package/dist/vega/{p-03efc67a.entry.js → p-2171b571.entry.js} +1 -1
- package/dist/vega/p-255fe20b.js +1 -0
- package/dist/vega/{p-cf5c5515.js → p-261cf764.js} +1 -1
- package/dist/vega/{p-f0b49ae4.entry.js → p-27e77ea1.entry.js} +1 -1
- package/dist/vega/{p-109f0e33.entry.js → p-28acbe42.entry.js} +1 -1
- package/dist/vega/{p-27c9c2a5.entry.js → p-2acc600a.entry.js} +1 -1
- package/dist/vega/p-2fc2299f.js +1 -0
- package/dist/vega/{p-b48caf90.entry.js → p-2ff659a1.entry.js} +1 -1
- package/dist/vega/{p-527c3211.entry.js → p-322da1eb.entry.js} +1 -1
- package/dist/vega/{p-dffe47db.js → p-3283fa2f.js} +1 -1
- package/dist/vega/p-3567dc55.entry.js +1 -0
- package/dist/vega/{p-c6419eb3.entry.js → p-36b795c6.entry.js} +1 -1
- package/dist/vega/p-37714a3a.js +1 -0
- package/dist/vega/{p-d7e59f31.js → p-3b4e2ba0.js} +1 -1
- package/dist/vega/{p-3d060d2f.entry.js → p-3b911043.entry.js} +1 -1
- package/dist/vega/{p-5c6d36ef.entry.js → p-3e270b65.entry.js} +1 -1
- package/dist/vega/{p-b68f55e2.js → p-4043508a.js} +1 -1
- package/dist/vega/p-4151d4a8.js +1 -0
- package/dist/vega/{p-c6b6987e.js → p-45af801f.js} +1 -1
- package/dist/vega/p-48c2150b.entry.js +1 -0
- package/dist/vega/p-4b253f74.entry.js +1 -0
- package/dist/vega/{p-75c7f8ea.entry.js → p-4cdc064d.entry.js} +1 -1
- package/dist/vega/{p-1d8a8507.entry.js → p-4e4b50f3.entry.js} +1 -1
- package/dist/vega/{p-d8fa2f19.entry.js → p-564110ba.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-bec31ffc.entry.js → p-608d3559.entry.js} +1 -1
- package/dist/vega/{p-3ce7521e.entry.js → p-64eb05d3.entry.js} +1 -1
- package/dist/vega/{p-2f5c4b61.entry.js → p-66bf209b.entry.js} +1 -1
- package/dist/vega/{p-83f5ef3a.entry.js → p-69eadbd8.entry.js} +1 -1
- package/dist/vega/{p-c66c6fd2.entry.js → p-6c4edee8.entry.js} +1 -1
- package/dist/vega/p-6e16bb3a.js +1 -0
- package/dist/vega/{p-7d748545.entry.js → p-76f4fdba.entry.js} +1 -1
- package/dist/vega/{p-4c6989ae.entry.js → p-7874055b.entry.js} +1 -1
- package/dist/vega/{p-ca60a74b.entry.js → p-7d3d24f6.entry.js} +1 -1
- package/dist/vega/{p-3bfb53e3.js → p-7f9ad7bc.js} +1 -1
- package/dist/vega/{p-18ddc6a4.entry.js → p-8193f4ef.entry.js} +1 -1
- package/dist/vega/{p-816064f2.entry.js → p-8197d172.entry.js} +1 -1
- package/dist/vega/{p-634b138c.entry.js → p-8ac0b1b2.entry.js} +1 -1
- package/dist/vega/{p-553510d8.entry.js → p-8c61db9d.entry.js} +1 -1
- package/dist/vega/{p-061a76c3.entry.js → p-8de29082.entry.js} +1 -1
- package/dist/vega/{p-325b804d.entry.js → p-8e59606f.entry.js} +1 -1
- package/dist/vega/p-8ea41806.js +1 -0
- package/dist/vega/{p-ff9090af.entry.js → p-9153c2f5.entry.js} +1 -1
- package/dist/vega/{p-a0c87e88.entry.js → p-92411f56.entry.js} +1 -1
- package/dist/vega/{p-049e64b1.entry.js → p-94d65dcf.entry.js} +1 -1
- package/dist/vega/{p-a261a675.entry.js → p-9a96fb05.entry.js} +1 -1
- package/dist/vega/{p-7044bb48.js → p-9fcfd738.js} +1 -1
- package/dist/vega/{p-b1e1c7d0.js → p-a2c7a3bc.js} +1 -1
- package/dist/vega/p-a2dcde12.js +1 -0
- package/dist/vega/{p-be0eb72f.js → p-a60d75d9.js} +1 -1
- package/dist/vega/{p-5a347a15.js → p-a9fc4043.js} +1 -1
- package/dist/vega/{p-efef0dfe.entry.js → p-abe5f7f0.entry.js} +1 -1
- package/dist/vega/{p-197388a5.entry.js → p-ac98c189.entry.js} +1 -1
- package/dist/vega/{p-dd273d89.entry.js → p-ade903b3.entry.js} +1 -1
- package/dist/vega/{p-c0eb8c58.js → p-affb40e8.js} +1 -1
- package/dist/vega/{p-277aab9b.js → p-b3a1cd22.js} +1 -1
- package/dist/vega/p-b63a90b3.entry.js +1 -0
- package/dist/vega/{p-f9f96030.entry.js → p-ba050d63.entry.js} +1 -1
- package/dist/vega/{p-bf0b46c1.js → p-ba67eb96.js} +1 -1
- package/dist/vega/{p-f0c6e9c5.entry.js → p-c08ac33f.entry.js} +1 -1
- package/dist/vega/{p-46be74fc.entry.js → p-c7ec97d1.entry.js} +1 -1
- package/dist/vega/{p-effbfc50.entry.js → p-ca1fe571.entry.js} +1 -1
- package/dist/vega/{p-408c3ad4.entry.js → p-cc9fc36a.entry.js} +1 -1
- package/dist/vega/{p-741e064e.entry.js → p-d044d54f.entry.js} +1 -1
- package/dist/vega/{p-0e0e66c9.entry.js → p-d3a9355c.entry.js} +1 -1
- package/dist/vega/p-d5a75228.js +1 -0
- package/dist/vega/{p-76135e80.entry.js → p-dc83fa6b.entry.js} +1 -1
- package/dist/vega/{p-92efdbf0.entry.js → p-dcfce26e.entry.js} +1 -1
- package/dist/vega/p-df9585f6.js +3 -0
- package/dist/vega/{p-f5f26b44.entry.js → p-e2c8a470.entry.js} +1 -1
- package/dist/vega/{p-23781e76.js → p-e33a954f.js} +1 -1
- package/dist/vega/{p-e577dda8.entry.js → p-e5fc6583.entry.js} +1 -1
- package/dist/vega/p-e668cf11.js +1 -0
- package/dist/vega/{p-0338f621.entry.js → p-e6b0a292.entry.js} +1 -1
- package/dist/vega/{p-381d8781.js → p-e84c2589.js} +1 -1
- package/dist/vega/{p-1b97e751.entry.js → p-eb945d34.entry.js} +1 -1
- package/dist/vega/{p-d8a0e3e0.entry.js → p-ebe1dd2b.entry.js} +1 -1
- package/dist/vega/{p-6beaf1c8.entry.js → p-f818bb20.entry.js} +1 -1
- package/dist/vega/p-f981cf2c.js +1 -0
- package/dist/vega/p-f9d09b0c.js +1 -0
- package/dist/vega/{p-4d20a56f.js → p-fdbdf12f.js} +1 -1
- package/dist/vega/{p-48100d38.entry.js → p-fee080b9.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-040bd9ca.js +0 -1
- package/dist/vega/p-087240db.js +0 -1
- package/dist/vega/p-15052b2e.entry.js +0 -1
- package/dist/vega/p-28c16885.js +0 -1
- package/dist/vega/p-30cc31dd.entry.js +0 -1
- package/dist/vega/p-3ec4d710.js +0 -1
- package/dist/vega/p-43ea1e86.js +0 -1
- package/dist/vega/p-7228088b.entry.js +0 -1
- package/dist/vega/p-7f711049.js +0 -1
- package/dist/vega/p-7fd15dd1.js +0 -1
- package/dist/vega/p-85695819.js +0 -1
- package/dist/vega/p-8e1f30ec.entry.js +0 -1
- package/dist/vega/p-9680dfe6.js +0 -1
- package/dist/vega/p-ae12cc3f.js +0 -3
- package/dist/vega/p-c0823f32.js +0 -1
- package/dist/vega/p-c5af2ecc.entry.js +0 -1
- package/dist/vega/p-fa43272c.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,f as e,F as i,H as o,r as l,c as n,g as r}from"./p-6b2342e0.js";import{c as s,V as a,L as d,M as c,I as h}from"./p-6e1ab235.js";import{m as p,s as u}from"./p-6bd5c49b.js";import{V as v,I as b}from"./p-5c8e4e8f.js";import{g as f}from"./p-a841cf13.js";import{e as g}from"./p-d4ea8e22.js";import{C as w}from"./p-2d0d575f.js";import{m,n as x,o as y,p as R,S as C}from"./p-cb378636.js";import{O as S}from"./p-331a62d5.js";import{f as k,a as E,m as j}from"./p-aa135628.js";import{d as D,D as T}from"./p-36a57431.js";import{r as O}from"./p-77e64f26.js";import{T as A,U as L,W as M,X as N,Y as I,Z as W,_ as B,$ as z,a0 as K,a1 as G,a2 as P,a3 as V}from"./p-53e3f259.js";import{b as $,c as _,a0 as H,e as F,a4 as X,a5 as U,a6 as Y,a7 as q,a8 as Z,a9 as J,aa as Q}from"./p-a83cef5a.js";import{R as tt}from"./p-b1e1c7d0.js";import{i as et,s as it,ap as ot}from"./p-4d20a56f.js";import{s as lt}from"./p-519a7d55.js";import{g as nt}from"./p-8b5d3a52.js";import{g as rt}from"./p-49a2e141.js";import{M as st}from"./p-78a57a17.js";import{T as at,a as dt}from"./p-52b8f2d2.js";import{P as ct}from"./p-81dd00d0.js";import{c as ht}from"./p-b1557bbe.js";import{C as pt}from"./p-abad8ffd.js";import{c as ut}from"./p-3b6a6f08.js";import{I as vt}from"./p-48e3be6a.js";import{T as bt}from"./p-7f711049.js";import{S as ft}from"./p-1fb56e14.js";import{c as gt}from"./p-6a334573.js";import{I as wt}from"./p-781fd6e0.js";import{S as mt}from"./p-7d3419c7.js";import{F as xt}from"./p-87a4d75f.js";import{B as yt}from"./p-ed45b3b6.js";import{c as Rt}from"./p-8387896e.js";import{V as Ct}from"./p-44245a36.js";import{c as St}from"./p-1ec763ab.js";import{c as kt}from"./p-613ddaab.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-b438e68b.js";import"./p-c0eb8c58.js";import"./p-b75ee3ba.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-982747ef.js";import"./p-d1d91f1a.js";import"./p-5c285374.js";class Et{constructor(t,e){this.size=0,this.set=new Set,t&&(this.set=t,this.size=t.size),e&&(this.onMutate=e)}onMutate(t){}add(...t){return this.withMutation((e=>{t.forEach((t=>e.add(t)))}))}clear(){this.withMutation((t=>t.clear()))}delete(t){return this.withMutation((e=>{e.delete(t)}))}withMutation(t){const e=new Set(this.set);t(e);const i=new Et(e,this.onMutate);return this.onMutate(i),i}has(t){return this.set.has(t)}toArray(){return[...this.set]}}const jt=["input","input-select","stepper","checkbox","textarea","combo-box","date-picker","time-picker"];class Dt{constructor(t,e,i,o,l,n,r,s,a,d,c,h,p,u,v,b,f=[]){this.key=t,this.label=e,this.pinned=i,this.colSpan=o,this.rowSpan=l,this.isViewStart=n,this.isViewEnd=r,this.isLeftEndPinned=s,this.isRightStartPinned=a,this.isNoPinnedEnd=d,this.headHasGroupColumn=c,this.headHasPinnedColumn=h,this.headMaxDepth=p,this.level=u,this.columnIndex=v,this.parent=b,this.children=f,this.leftOffsetPx=null,this.rightOffsetPx=null,this.isVisibleLeftEndPinned=!1,this.isVisibleRightStartPinned=!1,this.isVisibleRightEndPinned=!1,this.visibleColSpan=null,this.iteratorCacheMap=new Map,this.leaves=[]}static from(t){const e=[],i=[],o=t.getMaxDepth(),l=t.hasGroupColumn(),n=t.hasLeftPinnedColumn()||t.hasRightPinnedColumn();let r=0;return t.iterator().forEach((t=>{const s=t.level>0?i[t.level-1]:null,a=l&&this.isParentStart(t),d=l&&this.isParentEnd(t),c=new Dt(t.key,t.label,s?s.pinned:t.pinned,l?this.getColSpan(t):null,l?t.isLeaf()?o-t.level:1:null,s?s.isViewStart&&a:a,s?s.isViewEnd&&d:d,s?s.isLeftEndPinned&&d:n&&this.isLeftEndPinned(t),s?s.isRightStartPinned&&a:n&&this.isRightStartPinned(t),s?s.isNoPinnedEnd&&d:n&&this.isNoPinnedEnd(t),l,n,o,t.level,r,s);s?s.children.push(c):e.push(c),i[t.level]=c,i.length=t.level+1,t.isLeaf()&&r++})),e}static withMergedBoundaries(t,e){let i=t.isLeftEndPinned,o=t.isRightStartPinned,l=t.isNoPinnedEnd,n=t.isViewEnd;for(const t of e)i=i||t.isLeftEndPinned,o=o||t.isRightStartPinned,l=l||t.isNoPinnedEnd,n=n||t.isViewEnd;const r=new Dt(t.key,t.label,t.pinned,t.colSpan,t.rowSpan,t.isViewStart,n,i,o,l,t.headHasGroupColumn,t.headHasPinnedColumn,t.headMaxDepth,t.level,t.columnIndex,t.parent,t.children);return r.leftOffsetPx=t.leftOffsetPx,r.rightOffsetPx=t.rightOffsetPx,r.isVisibleLeftEndPinned=t.isVisibleLeftEndPinned,r.isVisibleRightStartPinned=t.isVisibleRightStartPinned,r.isVisibleRightEndPinned=t.isVisibleRightEndPinned,r.visibleColSpan=t.visibleColSpan,r}static isLeftEndPinned(t){const e=t.parent.getOrderedChildren().filter((t=>"left"===t.pinned));return e[e.length-1]===t}static isRightStartPinned(t){return t.parent.getOrderedChildren().filter((t=>"right"===t.pinned))[0]===t}static isNoPinnedEnd(t){const e=t.parent.getOrderedChildren().filter((t=>!t.pinned));return e[e.length-1]===t}static isParentStart(t){return t.parent.getOrderedChildren()[0]===t}static isParentEnd(t){const e=t.parent.getOrderedChildren();return e[e.length-1]===t}static getColSpan(t){const e=t.iterator(),i={};return e.forEach((t=>{i[t.level]=(i[t.level]||0)+1})),Math.max(...Object.values(i))}getLeaves(){if(this.leaves.length>0)return this.leaves;const t=this.iterator().filter((t=>t.isLeaf()));return this.leaves=t,t}iterator(t="dfs"){return"dfs"===t?this.dfsIterator():[]}dfsIterator(){if(this.iteratorCacheMap.has("dfs"))return this.iteratorCacheMap.get("dfs");const t=[];return t.push(this),this.children&&this.children.length>0&&this.children.forEach((e=>{t.push(...e.dfsIterator())})),this.iteratorCacheMap.set("dfs",t),t}isLeaf(){return!this.children||0===this.children.length}}var Tt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ot extends a{constructor(){super(...arguments),this.renderTableCellContent=(e,i,o,l)=>{var n,r;const s=f(i,e.prop),a=this.vegaTableDataSourceController.getRecordKey(i),c=!this.vegaTableDataSourceController.getDataSource().find((t=>this.vegaTableDataSourceController.getRecordKey(t)===a)),h=this.vegaTableEditableController.isEditing(a),p=this.vegaTableEditableController.getRowFormRefMap().get(a);if(!l&&h&&p&&e.renderFormItem)return e.renderFormItem(t,e.prop?s:a,i,o,{rowForm:p,isNewRow:c});if(!l&&h&&p&&e.editable){const t=null===(n=e.formItemProps)||void 0===n?void 0:n.call(e,p,{record:i,index:o}),l=Object.assign({dataVegaForm:(null==t?void 0:t.dataVegaForm)||e.prop,size:"small",value:s},null===(r=e.formItemProps)||void 0===r?void 0:r.call(e,p,{record:i,index:o}));return this.generateEditComponentByType(e.formItemType,l)}return e.render?e.render(t,e.prop?s:a,i,o):"string"==typeof s||"number"==typeof s?String(s):null==s?"":void d.error(`Column ${e.prop}'s value has a wrong type(${typeof i[e.prop]}) in table cell. Only 'VegaTableNode | string | number' can be rendered in table cell`)},this.generateEditComponentByType=(e="input",i)=>{const o=`vega-${e}`,{dataVegaForm:l}=i,n=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(t);l<o.length;l++)e.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(i[o[l]]=t[o[l]])}return i}(i,["dataVegaForm"]);if(this.isVegaTableEditableFieldType(o))return t(o,Object.assign(Object.assign({},n),{"data-vega-form":l}));d.error(`Type must be one of the form field types. [${jt.join(",")}]`)},this.isVegaTableEditableFieldType=t=>t.toUpperCase().startsWith("VEGA")&&new RegExp(jt.join("|"),"i").test(t)}render(e,i,o,l){var n;const r=this.vegaTableBodyColSpanController.findColumn(e),s=null!==(n=null==l?void 0:l.htmlColspan)&&void 0!==n?n:1,a=s>1,d=a&&l?this.getMergedRenderInputForSpan(e,l):e;if(r){const e=this.vegaTableDataSourceController.getRecordKey(i),l=r.ellipsisOptions;return t("vega-table-cell",{key:`${e}_${r.key||r.prop}`,textAlign:r.align,breakpoint:r.breakpoint,overflow:r.overflow,ellipsisShowTooltip:!!(null==l?void 0:l.showTooltip),colSpan:a?s:void 0,ref:t=>{this.vegaTableRenderInputController.addCellRenderInputMap(t,d)}},this.renderTableCellContent(r,i,o,a))}return t("vega-table-cell",{key:e.key,ref:t=>{this.vegaTableRenderInputController.addCellRenderInputMap(t,d)}})}getMergedRenderInputForSpan(t,e){const i=this.vegaTableRenderInputController.getLeafRenderInputs(),o=i.indexOf(t);if(o<0)return t;const l=i.slice(o+1,o+1+e.skipCount);return Dt.withMergedBoundaries(t,l)}}Tt([s()],Ot.prototype,"rowKey",void 0),Tt([s()],Ot.prototype,"vegaTableDataSourceController",void 0),Tt([s()],Ot.prototype,"vegaTableEditableController",void 0),Tt([s()],Ot.prototype,"vegaTableRenderInputController",void 0),Tt([s()],Ot.prototype,"vegaTableBodyColSpanController",void 0);const At={htmlColspan:1,skipCount:0};function Lt(t,e,i,o,l,n,r){var s,a,c;const h=function(t,e,i){const o=null==t?void 0:t.colSpan;return null==o?1:function(t){if(!Number.isFinite(t))return 1;const e=Math.floor(t);return e>=1?e:1}("function"!=typeof o?o:o(t.prop?f(e,t.prop):void 0,e,i))}(t,e,i);if(!h||h<=1)return At;const{span:p,clampReason:u}=function(t,e,i,o){var l,n;const r=null===(l=i[e])||void 0===l?void 0:l.pinned;let s=1;for(let l=1;l<t;l++){const t=i[e+l];if(!t)return{span:s,clampReason:`extends past the end of the row (${i.length} columns total)`};if(o[e+l])return{span:s,clampReason:null};if(t.pinned!==r)return{span:s,clampReason:`crosses a pinned-column boundary (pinned="${null!=r?r:"none"}" → pinned="${null!==(n=t.pinned)&&void 0!==n?n:"none"}")`};s++}return{span:s,clampReason:null}}(h,o,l,r),v=Math.min(h,p);return u&&v<h&&function(t,e,i,o,l){l.has(t)||(l.add(t),d.warn(`[vega-table] colSpan for column "${t}" was clamped from ${e} to ${i} because it ${o}.`))}(null!==(c=null!==(a=null!==(s=t.key)&&void 0!==s?s:t.prop)&&void 0!==a?a:t.label)&&void 0!==c?c:"",h,v,u,n),v<=1?At:{htmlColspan:v,skipCount:v-1}}var Mt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Nt extends a{constructor(){super(...arguments),this.warnedColSpanKeys=new Set,this.lastWarnedColumnsRef=null}resolveRow(t,e,i){this.columns!==this.lastWarnedColumnsRef&&(this.warnedColSpanKeys.clear(),this.lastWarnedColumnsRef=this.columns);const o=i.map((t=>this.isColumnHiddenAtBreakpoint(t))),l=new Array(i.length).fill(null);let n=0;return i.forEach(((r,s)=>{if(n>0)return void n--;const a=this.findColumn(r),d=a?Lt(a,t,e,s,i,this.warnedColSpanKeys,o):{htmlColspan:1,skipCount:0};l[s]=d,n=d.skipCount})),l}findColumn(t){return this.columns.find((e=>e.key===t.key||e.prop===t.key||e.label===t.key))}isColumnHiddenAtBreakpoint(t){const e=this.findColumn(t);return!(!e||!e.breakpoint)&&g.indexOf(this.currentBreakpoint)<g.indexOf(e.breakpoint)}}Mt([s()],Nt.prototype,"columns",void 0),Mt([s()],Nt.prototype,"currentBreakpoint",void 0);var It=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Wt extends a{constructor(){super(...arguments),this.toggleExpandRow=t=>{this.isRowExpandable(t)&&this.handleToggleExpandRow(t,!this.isExpanded(t))},this.openExpandRow=t=>{this.isRowExpandable(t)&&this.handleToggleExpandRow(t,!0)},this.closeExpandRow=t=>{this.isRowExpandable(t)&&this.handleToggleExpandRow(t,!1)},this.closeAllExpandRow=()=>{this.hasExpandableRow&&this.handleCloseAllExpandRow()},this.isExpandableRow=t=>this.expandableRows.includes(this.vegaTableDataSourceController.getRecordKey(t)),this.isExpanded=t=>this.expandedRowKeySet.has(t),this.handleCloseAllExpandRow=()=>{this.expandedRowKeySet.toArray().forEach((t=>{w.notify(m,{host:this.host,rowKey:t,expanded:!1})})),this.expandedRowKeySet.clear()},this.handleToggleExpandRow=(t,e)=>{e?this.expandedRowKeySet.add(t):this.expandedRowKeySet.delete(t),w.notify(m,{host:this.host,rowKey:t,expanded:e})},this.initMutationObserver=()=>{this.mutationObserver=new MutationObserver((async t=>{this.expandRowSlotGuard(t)&&e(this.host)})),this.mutationObserver.observe(this.host,{childList:!0,subtree:!0})},this.expandRowSlotGuard=t=>{const e=this.vegaTableDataSourceController.getCurrentData().map((t=>`${Wt.expandRowSlotNamePrefix}${this.vegaTableDataSourceController.getRecordKey(t)}`)),i=[];for(let o=0;o<t.length;o++)Array.from(t[o].addedNodes).filter((t=>t instanceof HTMLElement&&t.getAttribute("slot"))).forEach((t=>{t.removeAttribute("hidden");const o=t.getAttribute("slot");e.includes(o)?i.push(t):d.warn(`The vega-table expand row slot name '${o}' is not as expected, it must be like: vega-table-expand-row-[rowKey]`)}));return i.length>0}}connectedCallback(){this.initRowExpandObserver()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect(),w.unregister(m,this.expandObserver),O.unRegister(D.getSubject(this.host,A))}componentWillLoad(){this.setExpandableRows()}componentDidLoad(){this.initMutationObserver()}watchRowExpandable(){this.setExpandableRows(),this.handleCloseAllExpandRow()}watchCurrentData(){this.setExpandableRows(),this.clearUnusedExpandRowSlot()}initRowExpandObserver(){this.expandObserver=new S(this.isAcceptableTableRowObserver.bind({host:this.host}),(t=>{t.expanded?this.expandedRowKeySet.add(t.rowKey):this.expandedRowKeySet.delete(t.rowKey)})),w.register(m,this.expandObserver),O.register(D.getSubject(this.host,A),(({rowKey:t,expanded:e})=>this.rowExpandEventEmitter.emit({record:this.vegaTableDataSourceController.getRecordByKey(t),expanded:e})))}isAcceptableTableRowObserver(t){return"VEGA-TABLE-ROW"===t.host.tagName&&this.host===k(t.host,"vega-table")}setExpandableRows(){if("boolean"==typeof this.rowExpandable)this.expandableRows=this.rowExpandable?this.currentData.map((t=>this.vegaTableDataSourceController.getRecordKey(t))):[],this.hasExpandableRow=this.rowExpandable;else if("function"==typeof this.rowExpandable){const t=[];this.currentData.forEach((e=>{const i=this.vegaTableDataSourceController.getRecordKey(e);this.rowExpandable(i)&&t.push(i)})),this.expandableRows=t,this.hasExpandableRow=t.length>0}else this.expandableRows=[],this.hasExpandableRow=!1}isRowExpandable(t){return this.expandableRows.includes(t)}clearUnusedExpandRowSlot(){this.expandedRowKeySet.toArray().forEach((t=>{this.isRowExpandable(t)||this.expandedRowKeySet.delete(t)}))}}Wt.expandRowSlotNamePrefix="vega-table-expand-row-",It([s()],Wt.prototype,"host",void 0),It([s()],Wt.prototype,"expandedRowKeySet",void 0),It([s({writable:!0})],Wt.prototype,"expandableRows",void 0),It([s({writable:!0})],Wt.prototype,"hasExpandableRow",void 0),It([s()],Wt.prototype,"rowExpandable",void 0),It([s()],Wt.prototype,"currentData",void 0),It([s()],Wt.prototype,"rowExpandEventEmitter",void 0),It([s()],Wt.prototype,"vegaTableDataSourceController",void 0),It([c("connectedCallback")],Wt.prototype,"connectedCallback",null),It([c("disconnectedCallback")],Wt.prototype,"disconnectedCallback",null),It([c("componentWillLoad")],Wt.prototype,"componentWillLoad",null),It([c("componentDidLoad")],Wt.prototype,"componentDidLoad",null),It([c("toggleExpandRow")],Wt.prototype,"toggleExpandRow",void 0),It([c("openExpandRow")],Wt.prototype,"openExpandRow",void 0),It([c("closeExpandRow")],Wt.prototype,"closeExpandRow",void 0),It([c("closeAllExpandRow")],Wt.prototype,"closeAllExpandRow",void 0),It([c("watchRowExpandable")],Wt.prototype,"watchRowExpandable",null),It([c("watchCurrentData")],Wt.prototype,"watchCurrentData",null);var Bt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class zt extends a{constructor(){super(...arguments),this.handleRowSelect=(t,e)=>{const i=this.vegaTableDataSourceController.getRecordKey(e);let o=!1;t?this.selectedRowKeySet.has(i)||(this.selectedRowKeySet.add(i),o=!0):this.selectedRowKeySet.has(i)&&(this.selectedRowKeySet.delete(i),o=!0),o&&this.selectChangeEventEmitter.emit({selected:t,record:e,selectedRows:this.getSelectedRecords()})},this.getRowSelectionType=()=>{if(this.rowSelection)return this.rowSelection.type||"multiple"},this.handleSingleRowSelect=t=>{const e=this.vegaTableDataSourceController.getRecordKey(t);this.isChecked(e)?this.handleRowSelect(!1,t):(this.selectedRowKeySet.clear(),this.handleRowSelect(!0,t))},this.isChecked=t=>this.selectedRowKeySet.has(t),this.handleSelectAll=t=>{if(t){const t=this.vegaTableDataSourceController.getAllRecordKeys();this.selectedRowKeySet.add(...t.filter((t=>!this.selectedRowKeySet.has(t))))}else this.isCheckedAll()&&this.selectedRowKeySet.clear()},this.isCheckedAll=()=>this.selectedRowKeySet.size>0&&this.vegaTableDataSourceController.getCurrentData().every((t=>this.selectedRowKeySet.has(this.vegaTableDataSourceController.getRecordKey(t)))),this.setupRowSelection=t=>{this.rowSelection=Object.assign({hideSelectAll:!1,type:"multiple"},t)},this.getSelectedRecords=()=>this.selectedRowKeySet.toArray().map(this.vegaTableDataSourceController.getRecordByKey).filter(Boolean),this.syncUpSelectedKeySetWithCurrentData=t=>{this.selectedRowKeySet.withMutation((e=>{e.clear(),t.forEach((t=>{const i=this.vegaTableDataSourceController.getRecordKey(t);this.selectedRowKeySet.has(i)&&e.add(i)}))}))}}connectedCallback(){this.initRowSelection(),this.initRowClickObserver(),this.initRowSelectionAllObserver()}disconnectedCallback(){w.unregister(x,this.rowSelectionObserver),w.unregister(y,this.rowSelectionAllObserver),w.unregister(R,this.rowClickObserver),O.unRegister(D.getSubject(this.host,L)),O.unRegister(D.getSubject(this.host,M))}componentWillLoad(){this.rowSelection&&this.setupRowSelection(this.rowSelection)}watchRowSelection(t,e){(null==e?void 0:e.type)!==(null==t?void 0:t.type)&&this.clearSelection()}setSelection(t){"single"===this.getRowSelectionType()&&t.splice(1),this.selectedRowKeySet.toArray().forEach((t=>{w.notify(x,{host:this.host,rowKey:t,checked:!1})})),this.selectedRowKeySet.clear(),t.forEach((t=>{this.vegaTableDataSourceController.getRecordByKey(t)&&(this.selectedRowKeySet.add(t),w.notify(x,{host:this.host,rowKey:t,checked:!0}))}))}watchCurrentData(t){this.syncUpSelectedKeySetWithCurrentData(t)}clearSelection(){this.selectedRowKeySet.clear(),w.notify(y,{host:this.host,checked:!1,noneChecked:0===this.selectedRowKeySet.size})}getSelection(){return this.selectedRowKeySet.toArray()}watchSelectedRowKeySet(){this.isSelectedAll=this.isCheckedAll()}watchSelectedAll(){w.notify(y,{host:this.host,checked:this.isCheckedAll(),noneChecked:0===this.selectedRowKeySet.size}),this.selectAllChangeEventEmitter.emit({selected:this.isCheckedAll(),selectedRows:this.getSelectedRecords()})}isAcceptableRowSelectionObserver(t){return"VEGA-TABLE"===t.host.tagName?this.host===t.host:"VEGA-TABLE-ROW"===t.host.tagName?this.host===k(t.host,"vega-table"):void 0}isAcceptableRowSelectionAllObserver(t){return"VEGA-TABLE"===t.host.tagName?this.host===t.host:"VEGA-TABLE-HEAD-ROW"===t.host.tagName?this.host===k(t.host,"vega-table"):void 0}initRowSelection(){this.rowSelectionObserver=new S(this.isAcceptableRowSelectionObserver.bind(this),(t=>{const{rowKey:e,checked:i}=t,o=this.vegaTableDataSourceController.getRecordByKey(e);this.handleRowSelect(i,o)})),w.register(x,this.rowSelectionObserver),O.register(D.getSubject(this.host,L),(({rowKey:t,checked:e})=>this.rowSelectEventEmitter.emit({selected:e,record:this.vegaTableDataSourceController.getRecordByKey(t),selectedRows:this.getSelectedRecords()}))),O.register(D.getSubject(this.host,M),(({checked:t})=>this.rowSelectAllEventEmitter.emit({selected:t,selectedRows:this.getSelectedRecords(),changedRows:t?this.vegaTableDataSourceController.getCurrentData().filter((t=>!this.selectedRowKeySet.has(t.key))):this.getSelectedRecords()})))}initRowSelectionAllObserver(){this.rowSelectionAllObserver=new S(this.isAcceptableRowSelectionAllObserver.bind(this),(t=>{this.handleSelectAll(t.checked)})),w.register(y,this.rowSelectionAllObserver)}initRowClickObserver(){this.rowClickObserver=new S(this.isAcceptableRowClickObserver.bind(this),(t=>{if("single"===this.getRowSelectionType()){const e=this.vegaTableDataSourceController.getRecordByKey(t.rowKey);this.handleSingleRowSelect(e)}})),w.register(R,this.rowClickObserver)}isAcceptableRowClickObserver(t){return"VEGA-TABLE-ROW"===t.host.tagName&&this.host===k(t.host,"vega-table")}}Bt([s()],zt.prototype,"host",void 0),Bt([s({writable:!0})],zt.prototype,"isSelectedAll",void 0),Bt([s()],zt.prototype,"selectedRowKeySet",void 0),Bt([s({writable:!0})],zt.prototype,"rowSelection",void 0),Bt([s()],zt.prototype,"rowKey",void 0),Bt([s()],zt.prototype,"selectChangeEventEmitter",void 0),Bt([s()],zt.prototype,"selectAllChangeEventEmitter",void 0),Bt([s()],zt.prototype,"vegaTableDataSourceController",void 0),Bt([s()],zt.prototype,"rowSelectEventEmitter",void 0),Bt([s()],zt.prototype,"rowSelectAllEventEmitter",void 0),Bt([c("connectedCallback")],zt.prototype,"connectedCallback",null),Bt([c("disconnectedCallback")],zt.prototype,"disconnectedCallback",null),Bt([c("componentWillLoad")],zt.prototype,"componentWillLoad",null),Bt([c("watchRowSelection")],zt.prototype,"watchRowSelection",null),Bt([c("setSelection")],zt.prototype,"setSelection",null),Bt([c("watchCurrentData")],zt.prototype,"watchCurrentData",null),Bt([c("clearSelection")],zt.prototype,"clearSelection",null),Bt([c("getSelection")],zt.prototype,"getSelection",null),Bt([c("watchSelectedRowKeySet")],zt.prototype,"watchSelectedRowKeySet",null),Bt([c("watchSelectedAll")],zt.prototype,"watchSelectedAll",null);var Kt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Gt extends a{constructor(){super(...arguments),this.getRecordKey=t=>null!=t[this.rowKey]?String(t[this.rowKey]):"",this.getRecordByKey=t=>this.currentData.find((e=>this.getRecordKey(e)===t)),this.setCurrentData=t=>{this.currentData=this.tableDataValidation(t)?t:[]}}componentWillLoad(){this.vegaTableSortController.syncSortOrder(),this.syncCurrentData()}watchSortersMap(){this.syncCurrentData()}watchDataSource(){this.syncCurrentData()}getAllRecordKeys(){return this.currentData.map(this.getRecordKey)}getDataSource(){return this.dataSource}setDataSource(t){this.dataSource=t}getCurrentData(){return this.currentData}isCurrentDataEmpty(){return 0===this.currentData.length}tableDataValidation(t){return!t.some((t=>!this.getRecordKey(t)))||(d.error('Each item in dataSource should have a unique "key" prop.'," Otherwise, you should specify the primary key of dataSource item via rowKey."," For more details, please refer to: https://heartlandpayments.github.io/Vega/?path=/docs/components-table-v2--basic-table#rowkey"),!1)}syncCurrentData(){if(this.isTemplateRenderMode)return;const t=this.sortersMap.size>0?this.columns.filter((t=>t.sorter&&"event"!==t.sorter&&this.sortersMap.has(t.prop))):[];this.setCurrentData(t.length>0?this.vegaTableSortController.sortData(this.dataSource,Array.from(this.sortersMap.values())):this.dataSource)}}Kt([s()],Gt.prototype,"rowKey",void 0),Kt([s({writable:!0})],Gt.prototype,"currentData",void 0),Kt([s({writable:!0})],Gt.prototype,"dataSource",void 0),Kt([s()],Gt.prototype,"columns",void 0),Kt([s()],Gt.prototype,"sortersMap",void 0),Kt([s()],Gt.prototype,"vegaTableSortController",void 0),Kt([s()],Gt.prototype,"vegaTableRenderer",void 0),Kt([s()],Gt.prototype,"isTemplateRenderMode",void 0),Kt([c("componentWillLoad")],Gt.prototype,"componentWillLoad",null),Kt([c("watchSortersMap")],Gt.prototype,"watchSortersMap",null),Kt([c("watchDataSource")],Gt.prototype,"watchDataSource",null);var Pt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Vt extends a{constructor(){super(...arguments),this.renderTableBody=e=>{const o=this.vegaTableDataSourceController.getCurrentData();return t("vega-table-body",{ref:t=>this.tableBodyRef=t},o.map(((l,n)=>{const r=this.vegaTableDataSourceController.getRecordKey(l),s=this.vegaTablePaginationController.isRowVisible(n);return t(i,null,this.vegaTableRowRenderer.render({rowKey:r,index:n,record:l,isVisibleInCurrentPage:s,isLastRow:n===o.length-1},e),this.vegaTableExpandRowController.isExpandableRow(l)&&t("vega-table-expand-row",{class:{"v-hidden":!s},key:`vega-table-expanded-row-${r}`,rowKey:r,striped:this.striped&&n%2==1,ref:t=>{this.vegaTableRenderInputController.addRowRenderInputMap(t,"expand")}},t("slot",{name:`${Wt.expandRowSlotNamePrefix}${r}`})))})))}}getTableFormRef(){return this.tableFormRef}getTableBodyRef(){return this.tableBodyRef}render(){const e=this.columnStructureModel.generateColumnConfigByLeaves(this.columns).some((t=>null==t?void 0:t.editable));return e?t("vega-form",{ref:t=>this.tableFormRef=t},this.renderTableBody(e)):this.renderTableBody(!1)}}Pt([s()],Vt.prototype,"striped",void 0),Pt([s()],Vt.prototype,"rowDivider",void 0),Pt([s()],Vt.prototype,"columns",void 0),Pt([s()],Vt.prototype,"currentBreakpoint",void 0),Pt([s()],Vt.prototype,"rowClickable",void 0),Pt([s()],Vt.prototype,"vegaTableDataSourceController",void 0),Pt([s()],Vt.prototype,"vegaTablePaginationController",void 0),Pt([s()],Vt.prototype,"vegaTableRowSelectionController",void 0),Pt([s()],Vt.prototype,"vegaTableRowRenderer",void 0),Pt([s()],Vt.prototype,"columnStructureModel",void 0),Pt([s()],Vt.prototype,"vegaTableExpandRowController",void 0),Pt([s()],Vt.prototype,"vegaTableRenderInputController",void 0);var $t=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class _t extends a{constructor(){super(...arguments),this.renderHeaderRows=()=>{const e=[];let i=this.vegaTableRenderInputController.getHeadRenderInputs();for(;i.length>0;)e.push(i),i=i.flatMap((t=>t.children));return e.map((e=>{var i;return t("vega-table-head-row",{hideSelectAll:null===(i=this.rowSelection)||void 0===i?void 0:i.hideSelectAll,ref:t=>{this.vegaTableRenderInputController.addHeadRowRenderInputMap(t,e),this.vegaTableRenderInputController.addRowRenderInputMap(t,"head")}},e.map((t=>{if(t.label)return this.renderGroupCell(t);{const e=this.columns.find((e=>e.key===t.key||e.prop===t.key||e.label===t.key));return this.renderCell(t,e)}})))}))},this.renderGroupCell=e=>t("vega-table-head-cell",{key:e.key,ref:t=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(t,e)}},e.label),this.renderCell=(e,i)=>{var o;return i?t("vega-table-head-cell",{key:i.key||i.prop,textAlign:i.align,sorter:i.sorter,sortOrder:null===(o=this.sortersMap.get(i.prop))||void 0===o?void 0:o.getSortOrder(),sortConfig:this.sortConfig,breakpoint:i.breakpoint,ref:t=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(t,e),T.addUniqueObserverToNode(t,$,(t=>{this.vegaTableSortController.handleHeadSortClick(i,t.detail.sortOrder)}))}},i.label):t("vega-table-head-cell",{key:e.key,ref:t=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(t,e)}})}}render(){return this.showHeader&&t("vega-table-head",null,this.renderHeaderRows())}}$t([s()],_t.prototype,"showHeader",void 0),$t([s()],_t.prototype,"sortersMap",void 0),$t([s()],_t.prototype,"sortConfig",void 0),$t([s()],_t.prototype,"columns",void 0),$t([s()],_t.prototype,"rowSelection",void 0),$t([s()],_t.prototype,"vegaTableSortController",void 0),$t([s()],_t.prototype,"vegaTableDataSourceController",void 0),$t([s()],_t.prototype,"vegaTableRenderInputController",void 0);var Ht=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ft extends a{constructor(){super(...arguments),this.paginationRefCallback=t=>{T.addUniqueObserverToNode(t,_,this.handlePaginationChange),T.addUniqueObserverToNode(t,H,this.handlePaginationPageSizeChange)},this.handlePaginationChange=t=>{var e,i;this.vegaTablePaginationController.setCurrentPage(t.detail);const o=new CustomEvent("vegaChange",{detail:t.detail});null===(i=(e=this.pagination).vegaChange)||void 0===i||i.call(e,o)},this.handlePaginationPageSizeChange=t=>{var e,i;this.vegaTablePaginationController.setPageSize(t.detail);const o=new CustomEvent("vegaPageSizeChange",{detail:t.detail});null===(i=(e=this.pagination).vegaPageSizeChange)||void 0===i||i.call(e,o)},this.getPaginationConfig=()=>{const t=this.pagination,{position:e}=t,i=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(t);l<o.length;l++)e.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(i[o[l]]=t[o[l]])}return i}(t,["position"]),o=tt.formatCustom(this.pagination.extensions);return Object.assign(Object.assign({},i),{position:(null==o?void 0:o.length)>1?void 0:e||"bottom-center",pageSize:this.pageSize})}}render(){if(!this.pagination)return;const{pageSize:e,position:i,extensions:o,pageSizeSelectorOptions:l}=this.getPaginationConfig(),n=["vega-table-pagination-container",i],r=this.vegaTableDataSourceController.getCurrentData().length;return r>0&&t("div",{class:E(n)},t("vega-pagination",{total:r,pageSize:e,current:this.currentPage,extensions:o,pageSizeSelectorOptions:l,ref:this.paginationRefCallback}))}}Ht([s()],Ft.prototype,"pagination",void 0),Ht([s()],Ft.prototype,"pageSize",void 0),Ht([s()],Ft.prototype,"currentPage",void 0),Ht([s()],Ft.prototype,"vegaTablePaginationController",void 0),Ht([s()],Ft.prototype,"vegaTableDataSourceController",void 0);const Xt=({scrollConfig:e={},ref:i,onScroll:o},l)=>{const{maxHeight:n}=e,r=et(n);return t("div",{class:"vega-table-scrollable-container",style:{maxHeight:"number"==typeof n?`${n}px`:n},ref:i,onScroll:t=>{if(!r)return;const e=t.target;0!==e.scrollTop?(e.scrollTop>0&&!e.classList.contains("scrolled")&&e.classList.add("scrolled"),o(t)):e.classList.remove("scrolled")}},l)};var Ut=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Yt extends a{constructor(){super(...arguments),this.scrollContainerToTop=()=>{this.tableScrollContainerRef&&(this.tableScrollContainerRef.scrollTop=0)},this.notifyContentScrolling=()=>{this.isTemplateRenderMode&&w.notify(C,{host:this.host})}}watchCurrentPage(){this.scrollContainerToTop()}render(e){return t(Xt,{scrollConfig:this.scrollConfig,ref:t=>this.setTableScrollContainerRef(t),onScroll:()=>this.notifyContentScrolling()},e)}setTableScrollContainerRef(t){this.tableScrollContainerRef=t}}Ut([s()],Yt.prototype,"scrollConfig",void 0),Ut([s()],Yt.prototype,"host",void 0),Ut([s()],Yt.prototype,"isTemplateRenderMode",void 0),Ut([c("watchCurrentPage")],Yt.prototype,"watchCurrentPage",null);var qt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Zt extends a{constructor(){super(...arguments),this.renderInternalTable=()=>{const e=this.columns.some((t=>t.overflow))||Array.from(this.host.querySelectorAll("vega-table-cell")).some((t=>t.overflow));return t("table",{class:{"v-table-fixed":e,"show-edit-error":this.showEditError}},this.columns.length>0&&[this.vegaTableColGroupRenderer.render(),this.vegaTableHeaderRenderer.render()],(this.dataSource.length>0||this.editingRows.size>0)&&this.vegaTableBodyRenderer.render(),this.isTemplateRenderMode&&t("slot",null))},this.renderEmpty=()=>this.vegaTableDataSourceController.isCurrentDataEmpty()&&this.emptyDescription&&t("div",{class:"vega-table-empty-description"},this.translationSlimmer.t(this.emptyDescription))}render(){const e=E([this.rowDivider&&"row-divider",this.columnDivider&&"column-divider",`density-${tt.formatCustom(this.density)}`,this.striped&&"striped",this.columnStructureModel.hasGroupColumn()&&"is-group-table",(this.columnStructureModel.hasLeftPinnedColumn()||this.columnStructureModel.hasRightPinnedColumn())&&"is-pinned-table"]);return lt(t(o,{class:e},this.vegaTableScrollContainerRenderer.render(this.renderInternalTable()),this.vegaTablePaginationRenderer.render(),this.renderEmpty()),this.host)}}qt([s()],Zt.prototype,"host",void 0),qt([s()],Zt.prototype,"columns",void 0),qt([s()],Zt.prototype,"emptyDescription",void 0),qt([s()],Zt.prototype,"rowDivider",void 0),qt([s()],Zt.prototype,"columnDivider",void 0),qt([s()],Zt.prototype,"density",void 0),qt([s()],Zt.prototype,"dataSource",void 0),qt([s()],Zt.prototype,"striped",void 0),qt([s()],Zt.prototype,"columnStructureModel",void 0),qt([s()],Zt.prototype,"showEditError",void 0),qt([s()],Zt.prototype,"vegaTableHeaderRenderer",void 0),qt([s()],Zt.prototype,"vegaTableBodyRenderer",void 0),qt([s()],Zt.prototype,"vegaTableColGroupRenderer",void 0),qt([s()],Zt.prototype,"vegaTableScrollContainerRenderer",void 0),qt([s()],Zt.prototype,"vegaTablePaginationRenderer",void 0),qt([s()],Zt.prototype,"vegaTableDataSourceController",void 0),qt([s()],Zt.prototype,"translationSlimmer",void 0),qt([s({writable:!0})],Zt.prototype,"vegaTableChildrenController",void 0),qt([s()],Zt.prototype,"isTemplateRenderMode",void 0),qt([s()],Zt.prototype,"editingRows",void 0);var Jt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Qt extends a{componentWillLoad(){var t,e;this.currentPage=(null===(t=this.pagination)||void 0===t?void 0:t.current)||1,this.pageSize=(null===(e=this.pagination)||void 0===e?void 0:e.pageSize)||10}watchPagination(){if(this.pagination){const{pageSize:t,current:e}=this.pagination;t>0&&(this.pageSize=t),e>0&&(this.currentPage=e)}}setPageSize(t){this.pageSize=t}setCurrentPage(t){this.currentPage=t}isRowVisible(t){if(!this.pagination)return!0;const e=this.pageSize,i=this.currentPage;return t>=(i-1)*e&&t<i*e}}Jt([s()],Qt.prototype,"pagination",void 0),Jt([s({writable:!0})],Qt.prototype,"pageSize",void 0),Jt([s({writable:!0})],Qt.prototype,"currentPage",void 0),Jt([c("componentWillLoad")],Qt.prototype,"componentWillLoad",null),Jt([c("watchPagination")],Qt.prototype,"watchPagination",null);var te=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ee extends a{constructor(){super(...arguments),this.rowFormRefMap=new Map}getRowFormRefMap(){return this.rowFormRefMap}async saveAllEditRows(){if(!this.canMethodBeInvokedInCurrentState("saveAllEditRows"))return;const t=this.vegaTableDataSourceController.getCurrentData().slice();for(const e of this.editingRows.toArray()){const i=await this.getRowData(e),o=t.findIndex((t=>this.vegaTableDataSourceController.getRecordKey(t)===e));o>-1&&t.splice(o,1,i)}this.vegaTableDataSourceController.setDataSource([...t]),this.stopAllRowEditMode()}stopAllRowEditMode(){this.canMethodBeInvokedInCurrentState("stopAllRowEditMode")&&this.editingRows.clear()}watchDataSource(t){this.isEditableTable()&&this.getEditingRowsKey().forEach((e=>{t.find((t=>t.key===e))||this.stopRowEditMode(e)}))}async saveEditRow(t){if(!this.canMethodBeInvokedInCurrentState("saveEditRow"))return;const e=await this.getRowData(t),i=this.vegaTableDataSourceController.getCurrentData().slice(),o=i.findIndex((e=>this.vegaTableDataSourceController.getRecordKey(e)===t));o>-1&&(i.splice(o,1,e),this.vegaTableDataSourceController.setDataSource([...i])),this.stopRowEditMode(t)}stopRowEditMode(t){this.canMethodBeInvokedInCurrentState("stopRowEditMode")&&this.editingRows.delete(t)}removeRow(t){this.canMethodBeInvokedInCurrentState("removeRow")&&this.vegaTableDataSourceController.setDataSource(this.vegaTableDataSourceController.getCurrentData().filter((e=>this.vegaTableDataSourceController.getRecordKey(e)!==t)))}startRowEditMode(t){this.canMethodBeInvokedInCurrentState("startRowEditMode")&&this.editingRows.add(t)}addNewRow(t={}){var e;if(!this.canMethodBeInvokedInCurrentState("addNewRow"))return;const i=(null===(e=t[this.rowKey])||void 0===e?void 0:e.toString())||nt(),o=Object.assign({},t);return o[this.rowKey]=i,this.vegaTableDataSourceController.setCurrentData([...this.vegaTableDataSourceController.getCurrentData(),o]),this.editingRows.add(i),i}async getRowsData(){if(!this.canMethodBeInvokedInCurrentState("getRowsData"))return;const t=this.vegaTableBodyRenderer.getTableFormRef(),e=t?await t.getValue():[];return[...this.vegaTableDataSourceController.getCurrentData().map((t=>{const i=e[`${ee.rowFormKeyPrefix}${this.vegaTableDataSourceController.getRecordKey(t)}`];return Object.assign(Object.assign({},t),i)}))]}getEditingRowsKey(){if(this.canMethodBeInvokedInCurrentState("getEditingRowsKey"))return this.editingRows.toArray()}getFormRef(t){if(this.canMethodBeInvokedInCurrentState("getFormRef"))return t?this.rowFormRefMap.get(t):this.vegaTableBodyRenderer.getTableFormRef()}async getRowData(t){if(!this.canMethodBeInvokedInCurrentState("getRowData"))return;const e=await this.rowFormRefMap.get(t).getValue();return Object.assign(Object.assign({},this.vegaTableDataSourceController.getRecordByKey(t)),e)}isEditing(t){return this.editingRows.has(t)}isEditableTable(){return this.columns.some((t=>t.editable))}canMethodBeInvokedInCurrentState(t){return!!this.isEditableTable()||(d.warn(`Method ${t} only works with editable tables`),!1)}}ee.rowFormKeyPrefix="vega-table-row-form-",te([s()],ee.prototype,"editingRows",void 0),te([s()],ee.prototype,"rowKey",void 0),te([s()],ee.prototype,"columns",void 0),te([s()],ee.prototype,"vegaTableDataSourceController",void 0),te([s()],ee.prototype,"vegaTableBodyRenderer",void 0),te([c("saveAllEditRows")],ee.prototype,"saveAllEditRows",null),te([c("stopAllRowEditMode")],ee.prototype,"stopAllRowEditMode",null),te([c("watchDataSource")],ee.prototype,"watchDataSource",null),te([c("saveEditRow")],ee.prototype,"saveEditRow",null),te([c("stopRowEditMode")],ee.prototype,"stopRowEditMode",null),te([c("removeRow")],ee.prototype,"removeRow",null),te([c("startRowEditMode")],ee.prototype,"startRowEditMode",null),te([c("addNewRow")],ee.prototype,"addNewRow",null),te([c("getRowsData")],ee.prototype,"getRowsData",null),te([c("getEditingRowsKey")],ee.prototype,"getEditingRowsKey",null),te([c("getFormRef")],ee.prototype,"getFormRef",null),te([c("getRowData")],ee.prototype,"getRowData",null);class ie{constructor(t,e,i){this.prop=t,this.order=e,this.sorter=i}sort(t,e){const i=this.sorter(t,e);if(0!==i)return"asc"===this.order?i:-i}toExternalFormat(){return{prop:this.prop,order:this.order}}getSortOrder(){return this.order}}var oe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class le extends a{constructor(){super(...arguments),this.clearSorter=()=>{this.sortersMap.size>0&&(this.sortersMap.clear(!1),this.changeEventEmitter.emit({sorters:[]}))}}watchColumns(){this.syncSortOrder()}handleHeadSortClick(t,e){"single"===this.sortConfig.type&&this.sortersMap.clear(),e?this.sortersMap.set(t.prop,new ie(t.prop,e,t.sorter)):this.sortersMap.has(t.prop)&&this.sortersMap.delete(t.prop),"event"!==t.sorter&&this.vegaTableDataSourceController.setCurrentData(this.sortData(this.vegaTableDataSourceController.getDataSource(),Array.from(this.sortersMap.values()))),this.changeEventEmitter.emit({sorters:Array.from(this.sortersMap.values()).map((t=>t.toExternalFormat()))})}syncSortOrder(){this.columns.filter((t=>et(t.sorter)&&et(t.sortOrder))).forEach((t=>{this.sortersMap.set(t.prop,new ie(t.prop,t.sortOrder,t.sorter))}))}sortData(t,e){return[...t].sort(((t,i)=>{for(const o of e){const e=o.sort(t,i);if(et(e))return e}return 0}))}}oe([s({writable:!0})],le.prototype,"sortersMap",void 0),oe([s()],le.prototype,"columns",void 0),oe([s()],le.prototype,"changeEventEmitter",void 0),oe([s()],le.prototype,"vegaTableDataSourceController",void 0),oe([s()],le.prototype,"sortConfig",void 0),oe([c("watchColumns")],le.prototype,"watchColumns",null);var ne=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class re extends a{constructor(){super(...arguments),this.getColResponsiveClass=t=>t.breakpoint&&it(t.breakpoint)?`v-hidden ${t.breakpoint}:v-table-column`:""}render(){return t("colgroup",null,t("col",{style:{minWidth:this.paddingX[0],width:this.paddingX[0]}}),this.rowDraggable&&t("col",{class:"draggable-col"}),"multiple"===this.vegaTableRowSelectionController.getRowSelectionType()&&t("col",{style:{minWidth:"40px",width:"40px"}}),this.columnStructureModel.generateColumnConfigByLeaves(this.columns).map((e=>{if(e){const i=this.getColResponsiveClass(e);return t("col",{class:i,style:{width:e.width?e.width:null}})}return t("col",null)})),this.hasExpandableRow&&t("col",{style:{minWidth:"40px",width:"40px"}}),t("col",{style:{minWidth:this.paddingX[1],width:this.paddingX[1]}}))}}ne([s()],re.prototype,"paddingX",void 0),ne([s()],re.prototype,"columnStructureModel",void 0),ne([s()],re.prototype,"columns",void 0),ne([s()],re.prototype,"hasExpandableRow",void 0),ne([s()],re.prototype,"rowDraggable",void 0),ne([s()],re.prototype,"vegaTableRowSelectionController",void 0);var se=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ae extends a{constructor(){super(...arguments),this.currentDataObserver=new st({target:()=>this.host,options:{childList:!0,subtree:!0},mutationFilter:at("VEGA-TABLE-BODY","VEGA-TABLE-ROW"),callback:()=>{this.syncUpTableCurrentData(),this.syncUpTableHeadRowProps()}}),this.rowStripedObserver=new st({target:()=>this.host,options:{childList:!0,subtree:!0},mutationFilter:at("VEGA-TABLE-BODY","VEGA-TABLE-ROW","VEGA-TABLE-EXPAND-ROW"),callback:()=>{this.syncRowStates()}}),this.syncUpTableCurrentData=()=>{if(!this.isTemplateRenderMode)return;const t=Array.from(this.host.querySelectorAll("vega-table-row")).map((t=>({key:t.rowKey})));this.vegaTableDataSourceController.setCurrentData(t)},this.syncRowStates=()=>{const t=this.host.querySelectorAll("vega-table-row");t.forEach(((e,i)=>{this.updateRowStriped(e,i),this.updateRowDivider(e,i===t.length-1)})),this.host.querySelectorAll("vega-table-expand-row").forEach(((t,e)=>{this.updateRowStriped(t,e)}))},this.syncUpTableHeadRowProps=()=>{var t;if(!this.isTemplateRenderMode)return;const e=this.host.querySelector("vega-table-head-row");e&&(e.hideSelectAll=e.hideSelectAll||(null===(t=this.rowSelection)||void 0===t?void 0:t.hideSelectAll))}}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){this.syncUpTableCurrentData(),this.syncUpTableHeadRowProps(),this.syncRowStates(),this.syncUpTableFootVisibility()}componentDidLoad(){}clearSelection(){w.notify(y,{host:this.host,checked:!1,noneChecked:!0})}watchCurrentData(){this.syncUpTableFootVisibility()}watchStriped(){this.syncRowStates()}watchRowDivider(){this.syncRowStates()}updateRowStriped(t,e){t.striped=this.striped&&e%2==1}updateRowDivider(t,e){t.rowDivider=this.rowDivider&&!e}syncUpTableFootVisibility(){const t=this.host.querySelector("vega-table-foot");t&&(this.vegaTableDataSourceController.isCurrentDataEmpty()?t.classList.add("v-hidden"):t.classList.remove("v-hidden"))}}se([s()],ae.prototype,"host",void 0),se([s()],ae.prototype,"columns",void 0),se([s()],ae.prototype,"dataSource",void 0),se([s()],ae.prototype,"currentData",void 0),se([s()],ae.prototype,"rowSelection",void 0),se([s()],ae.prototype,"striped",void 0),se([s()],ae.prototype,"rowDivider",void 0),se([s()],ae.prototype,"vegaTableDataSourceController",void 0),se([s()],ae.prototype,"vegaTableRenderer",void 0),se([s()],ae.prototype,"isTemplateRenderMode",void 0),se([h()],ae.prototype,"currentDataObserver",void 0),se([h()],ae.prototype,"rowStripedObserver",void 0),se([c("connectedCallback")],ae.prototype,"connectedCallback",null),se([c("disconnectedCallback")],ae.prototype,"disconnectedCallback",null),se([c("componentWillLoad")],ae.prototype,"componentWillLoad",null),se([c("componentDidLoad")],ae.prototype,"componentDidLoad",null),se([c("clearSelection")],ae.prototype,"clearSelection",null),se([c("watchCurrentData")],ae.prototype,"watchCurrentData",null),se([c("watchStriped")],ae.prototype,"watchStriped",null),se([c("watchRowDivider")],ae.prototype,"watchRowDivider",null);var de=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ce extends a{constructor(){super(...arguments),this.renderTableRowComponent=e=>{const{rowKey:i,index:o,record:l,isVisibleInCurrentPage:n}=e,r=this.vegaTableRenderInputController.getLeafRenderInputs(),s=this.vegaTableBodyColSpanController.resolveRow(l,o,r),a=[];return r.forEach(((t,e)=>{const i=s[e];i&&a.push(this.vegaTableCellRenderer.render(t,l,o,i))})),t("vega-table-row",{class:{"v-hidden":!n},key:`vega-table-row-${i}`,rowKey:i,ref:t=>{this.vegaTableRenderInputController.addRowRenderInputMap(t,"body"),T.addUniqueObserverToNode(t,$,(()=>{this.rowClickEventEmitter.emit({record:l,index:o})}))},striped:this.striped&&o%2==1,rowDivider:this.rowDivider&&!e.isLastRow},a)}}render(e,i){const{rowKey:o}=e;return i?t("vega-form",{key:`vega-table-row-form-${o}`,"data-vega-form":`${ee.rowFormKeyPrefix}${o}`,ref:t=>this.vegaTableEditableController.getRowFormRefMap().set(o,t)},this.renderTableRowComponent(e)):this.renderTableRowComponent(e)}}de([s()],ce.prototype,"rowClickEventEmitter",void 0),de([s()],ce.prototype,"vegaTableEditableController",void 0),de([s()],ce.prototype,"vegaTableCellRenderer",void 0),de([s()],ce.prototype,"vegaTableBodyColSpanController",void 0),de([s()],ce.prototype,"striped",void 0),de([s()],ce.prototype,"rowDivider",void 0),de([s()],ce.prototype,"vegaTableRenderInputController",void 0);var he=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class pe extends a{constructor(){super(...arguments),this.currentDataObserver=new st({target:()=>this.host,options:{childList:!0,subtree:!0},mutationFilter:at("VEGA-TABLE-ROW"),callback:()=>{this.isTemplateRenderMode=this.checkIsTemplateRenderMode(this.host)}}),this.checkIsTemplateRenderMode=t=>Array.from(t.children).some((t=>t.tagName.startsWith("VEGA-TABLE-")))}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){this.isTemplateRenderMode=this.checkIsTemplateRenderMode(this.host)}componentDidLoad(){}}he([s()],pe.prototype,"host",void 0),he([s({writable:!0})],pe.prototype,"isTemplateRenderMode",void 0),he([h()],pe.prototype,"currentDataObserver",void 0),he([c("connectedCallback")],pe.prototype,"connectedCallback",null),he([c("disconnectedCallback")],pe.prototype,"disconnectedCallback",null),he([c("componentWillLoad")],pe.prototype,"componentWillLoad",null),he([c("componentDidLoad")],pe.prototype,"componentDidLoad",null);const ue=[{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the table",payloadValue:t=>0===t.dataSource.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the table",payloadValue:t=>t.dataSource.length>0}];class ve{constructor(t,e,i,o,l){this.key=t,this.level=e,this.parent=i,this.label=o,this.pinned=l,this.leaves=[],this.orderedChildren=[],this.iteratorCacheMap=new Map}static from(t,e){const i=new ve(this.ROOT_KEY,ve.ROOT_LEVEL);return e?(i.children=this.fromGroupColumns(i,e),i):t?(i.children=t.map((t=>new ve(t.key||t.prop||t.label,0,i,null,t.pinned))),i):(i.children=[],i)}static fromGroupColumns(t,e,i=0){return e&&e.length>0?e.map((e=>{if(ot(e)){const o=new ve(e.key,i,t,e.label,e.pinned);return o.children=this.fromGroupColumns(o,e.children,i+1),o}return new ve(e.key,i,t)})):[]}generateColumnConfigByLeaves(t){return this.getLeaves().map((e=>t.find((t=>t.key===e.key||t.prop===e.key||t.label===e.key))))}getMaxDepth(){const t=this.dfsIterator();return 0===t.length?0:Math.max(...t.map((t=>t.level)))+1}hasGroupColumn(){return!!this.children.find((t=>!t.isLeaf()))}hasLeftPinnedColumn(){return!!this.children.find((t=>"left"===t.pinned))}hasRightPinnedColumn(){return!!this.children.find((t=>"right"===t.pinned))}isLeaf(){return!this.children||0===this.children.length}iterator(t="dfs"){return"dfs"===t?this.dfsIterator():[]}getLeaves(){if(this.leaves.length>0)return this.leaves;const t=this.dfsIterator().filter((t=>t.isLeaf()));return this.leaves=t,t}getOrderedChildren(){return this.isRoot()?this.orderedChildren:this.children}orderChildrenByPinned(){if(!this.isRoot())return this.children;if(this.orderedChildren.length>0)return this.orderedChildren;const t=[],e=[],i=[];this.children.forEach((o=>{"left"===o.pinned?t.push(o):"right"===o.pinned?i.push(o):e.push(o)}));const o=[...t,...e,...i];return this.orderedChildren=o,o}isRoot(){return this.level===ve.ROOT_LEVEL}dfsIterator(){if(this.iteratorCacheMap.has("dfs"))return this.iteratorCacheMap.get("dfs");const t=[],e=this.orderChildrenByPinned();return this.isRoot()||t.push(this),e&&e.length>0&&e.forEach((e=>{t.push(...e.dfsIterator())})),this.iteratorCacheMap.set("dfs",t),t}}ve.ROOT_LEVEL=-1,ve.ROOT_KEY="#root-model#";var be=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class fe extends a{componentWillLoad(){this.setColumnStructureModel()}watchColumns(){this.setColumnStructureModel()}watchGroupColumns(){this.setColumnStructureModel()}watchTemplateGroupColumns(){this.setColumnStructureModel()}setColumnStructureModel(){var t;this.columnStructureModel=ve.from(this.columns,null!==(t=this.templateGroupColumns)&&void 0!==t?t:this.groupColumns)}}be([s()],fe.prototype,"columns",void 0),be([s()],fe.prototype,"groupColumns",void 0),be([s()],fe.prototype,"templateGroupColumns",void 0),be([s({writable:!0})],fe.prototype,"columnStructureModel",void 0),be([c("componentWillLoad")],fe.prototype,"componentWillLoad",null),be([c("watchColumns")],fe.prototype,"watchColumns",null),be([c("watchGroupColumns")],fe.prototype,"watchGroupColumns",null),be([c("watchTemplateGroupColumns")],fe.prototype,"watchTemplateGroupColumns",null);class ge{constructor(t,e,i,o,l,n,r,s,a,d=null,c=null,h=!1,p=!1){this.kind=t,this.hasLeftPinnedColumn=e,this.hasRightPinnedColumn=i,this.showSelectionCell=o,this.showDraggableCell=l,this.showExpandActionCell=n,this.hasExpandedRowSlot=r,this.leftPaddingPx=s,this.rightPaddingPx=a,this.startRowSpan=d,this.endRowSpan=c,this.isStartHidden=h,this.isEndHidden=p}static from(t,e,i,o=null){const l=null==o?void 0:o[0],n=null==o?void 0:o[o.length-1],r=!!e.rowSelection&&"multiple"===(e.rowSelection.type||"multiple");return new ge(i,t.hasLeftPinnedColumn(),t.hasRightPinnedColumn(),r,!!e.rowDraggable,"expand"!==i&&e.hasExpandableRow,"expand"===i,j(e.paddingX[0]),j(e.paddingX[1]),(null==l?void 0:l.headHasGroupColumn)?r&&0===l.level?l.headMaxDepth:l.rowSpan:null,(null==n?void 0:n.headHasGroupColumn)?n.rowSpan:null,!!(null==l?void 0:l.headHasGroupColumn)&&(r&&l.level>0||!l.isViewStart),!!(null==l?void 0:l.headHasGroupColumn)&&!!(null==n?void 0:n.headHasGroupColumn)&&!n.isViewEnd)}}var we=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class me extends a{constructor(){super(...arguments),this.headRowRenderInputMap=new WeakMap,this.headCellRenderInputMap=new WeakMap,this.bodyCellRenderInputMap=new WeakMap,this.hasPendingCellRenderInputChange=!1,this.rowRenderInputMap=new WeakMap,this.footCellRenderInputMap=new Map,this.cellRenderInputChangeTaskQueue=new ft}connectedCallback(){this.registerRenderInputRICObserver()}disconnectedCallback(){this.unRegisterRenderInputRICObserver()}componentWillLoad(){this.setRenderInputModel()}async componentDidRender(){this.isTemplateRenderMode&&(this.registerTemplateCellRenderInputs(),!this.hasPendingCellRenderInputChange||this.columnStructureModel.hasLeftPinnedColumn()||this.columnStructureModel.hasRightPinnedColumn()||(this.notifyRenderInputChange(),this.hasPendingCellRenderInputChange=!1)),await this.cellRenderInputChangeTaskQueue.runTask()}async watchColumnStructureModel(){this.setRenderInputModel(),this.bodyCellRenderInputMap=new WeakMap,await this.cellRenderInputChangeTaskQueue.enqueue({run:async()=>{w.notify(D.getSubject(this.host,N),{})}},!1)}watchRowStructure(){this.rowRenderInputMap=new WeakMap,w.notify(D.getSubject(this.host,N),{})}getLeafRenderInputs(){return this.leavesRenderInputModels}getHeadRenderInputs(){return this.columnRenderInputModels}addHeadRowRenderInputMap(t,e){t&&this.headRowRenderInputMap.set(t,e)}addHeadCellRenderInputMap(t,e){t&&this.headCellRenderInputMap.set(t,e)}clearHeadRenderInputMaps(){this.headRowRenderInputMap=new WeakMap,this.headCellRenderInputMap=new WeakMap}addCellRenderInputMap(t,e){if(!t)return;const i=this.bodyCellRenderInputMap.get(t),o=this.hasSameCellStructure(i,e)?i:e;i!==o&&(this.hasPendingCellRenderInputChange=!0),this.bodyCellRenderInputMap.set(t,o)}addRowRenderInputMap(t,e){t&&this.rowRenderInputMap.set(t,this.createRowRenderInputModel(e,t))}getHeadCellRenderInputMap(){var t;const e=new Map,i=this.isTemplateRenderMode?this.host:null===(t=this.host)||void 0===t?void 0:t.shadowRoot;return null==i||i.querySelectorAll("vega-table-head-cell").forEach((t=>{const i=this.headCellRenderInputMap.get(t);i&&e.set(t,i)})),e}getPinnedColumnBodyCellRenderInputMap(){var t;const e=new Map,i=this.isTemplateRenderMode?this.host:null===(t=this.host)||void 0===t?void 0:t.shadowRoot;return null==i||i.querySelectorAll("vega-table-cell").forEach((t=>{const i=this.bodyCellRenderInputMap.get(t);i&&e.set(t,i)})),e}recomputePinnedOffsets(t,e,i){var o,l,n;const r=this.getHeadCellRenderInputMap();if(!r.size)return;this.registerTemplateCellRenderInputs();const s=new Array(i.length+1).fill(0);for(let t=0;t<i.length;t++)s[t+1]=s[t]+i[t];const a=i.every((t=>0===t)),d=this.leavesRenderInputModels.filter((t=>"left"===t.pinned&&(a||i[t.columnIndex]>0))),c=this.leavesRenderInputModels.filter((t=>"right"===t.pinned&&(a||i[t.columnIndex]>0))),h=null===(o=d[d.length-1])||void 0===o?void 0:o.columnIndex,p=null===(l=c[0])||void 0===l?void 0:l.columnIndex,u=null===(n=c[c.length-1])||void 0===n?void 0:n.columnIndex;let v=this.hasPendingCellRenderInputChange;const b=(o,l)=>{var n;const r=null!==(n=o.colSpan)&&void 0!==n?n:l.colSpan||1,d=t=>Number.isInteger(t)&&t>=o.columnIndex&&t<o.columnIndex+r,c=d(h),v=d(p),b=d(u),f=r>1&&!a?Math.max(1,i.slice(o.columnIndex,o.columnIndex+r).filter((t=>t>0)).length):null;let g=null,w=null;"left"===o.pinned?g=t+s[o.columnIndex]:"right"===o.pinned&&(w=e+(s[i.length]-s[o.columnIndex+r]));const m=o.isVisibleLeftEndPinned!==c||o.isVisibleRightStartPinned!==v||o.isVisibleRightEndPinned!==b||o.visibleColSpan!==f||o.leftOffsetPx!==g||o.rightOffsetPx!==w;return o.isVisibleLeftEndPinned=c,o.isVisibleRightStartPinned=v,o.isVisibleRightEndPinned=b,o.visibleColSpan=f,o.leftOffsetPx=g,o.rightOffsetPx=w,m};r.forEach(((t,e)=>{v=b(t,e)||v})),this.getPinnedColumnBodyCellRenderInputMap().forEach(((t,e)=>{v=b(t,e)||v})),this.footCellRenderInputMap.forEach(((t,e)=>{v=b(t,e)||v})),this.hasPendingCellRenderInputChange=!1,v&&this.notifyRenderInputChange()}registerRenderInputRICObserver(){O.register(D.getSubject(this.host,I),(t=>this.headRowRenderInputMap.get(t))),O.register(D.getSubject(this.host,W),(t=>this.headCellRenderInputMap.get(t))),O.register(D.getSubject(this.host,B),(t=>this.bodyCellRenderInputMap.get(t))),O.register(D.getSubject(this.host,z),(t=>{var e;return null!==(e=this.rowRenderInputMap.get(t))&&void 0!==e?e:this.createRowRenderInput(t)})),O.register(D.getSubject(this.host,K),(t=>{var e;return null!==(e=this.rowRenderInputMap.get(t))&&void 0!==e?e:this.createRowRenderInput(t)})),O.register(D.getSubject(this.host,G),(t=>this.footCellRenderInputMap.get(t)))}unRegisterRenderInputRICObserver(){O.unRegister(D.getSubject(this.host,I)),O.unRegister(D.getSubject(this.host,W)),O.unRegister(D.getSubject(this.host,B)),O.unRegister(D.getSubject(this.host,z)),O.unRegister(D.getSubject(this.host,K)),O.unRegister(D.getSubject(this.host,G))}registerTemplateCellRenderInputs(){const t=this.host.querySelectorAll("vega-table-row, vega-table-foot-row");if(!t.length)return this.footCellRenderInputMap.size&&(this.hasPendingCellRenderInputChange=!0),void(this.footCellRenderInputMap=new Map);const e=new Map;t.forEach((t=>{this.addRowRenderInputMap(t,t.matches("vega-table-foot-row")?"foot":"body");let i=0;Array.from(t.children).forEach((t=>{if("VEGA-TABLE-CELL"!==t.tagName&&"VEGA-TABLE-FOOT-CELL"!==t.tagName)return;const o=t,l=this.leavesRenderInputModels[i],n=o.colSpan||1;if(l){const r=Dt.withMergedBoundaries(l,this.leavesRenderInputModels.slice(i,i+n));if("VEGA-TABLE-FOOT-CELL"===t.tagName){const t=o,i=this.footCellRenderInputMap.get(t),l=this.hasSameCellStructure(i,r)?i:r;l!==i&&(this.hasPendingCellRenderInputChange=!0),e.set(t,l)}else{const t=o,e=this.bodyCellRenderInputMap.get(t);this.addCellRenderInputMap(t,this.hasSameCellStructure(e,r)?e:r)}}i+=n}))})),e.size!==this.footCellRenderInputMap.size&&(this.hasPendingCellRenderInputChange=!0),this.footCellRenderInputMap=e}hasSameCellStructure(t,e){return!!t&&t.key===e.key&&t.pinned===e.pinned&&t.columnIndex===e.columnIndex&&t.isViewStart===e.isViewStart&&t.isViewEnd===e.isViewEnd&&t.isLeftEndPinned===e.isLeftEndPinned&&t.isRightStartPinned===e.isRightStartPinned&&t.isNoPinnedEnd===e.isNoPinnedEnd}notifyRenderInputChange(){w.notify(D.getSubject(this.host,N),{})}createRowRenderInput(t){const e=t.matches("vega-table-head-row")?"head":t.matches("vega-table-foot-row")?"foot":t.matches("vega-table-expand-row")?"expand":"body",i=this.createRowRenderInputModel(e,t);return this.rowRenderInputMap.set(t,i),i}createRowRenderInputModel(t,e){return ge.from(this.columnStructureModel,{hasExpandableRow:this.hasExpandableRow,paddingX:this.paddingX,rowDraggable:this.rowDraggable,rowExpandable:this.rowExpandable,rowSelection:this.rowSelection},t,"head"===t?this.headRowRenderInputMap.get(e):null)}setRenderInputModel(){this.rowRenderInputMap=new WeakMap,this.footCellRenderInputMap.clear(),this.columnRenderInputModels=Dt.from(this.columnStructureModel),this.leavesRenderInputModels=this.columnRenderInputModels.flatMap((t=>t.getLeaves()))}}we([s()],me.prototype,"host",void 0),we([s()],me.prototype,"columnStructureModel",void 0),we([s()],me.prototype,"hasExpandableRow",void 0),we([s()],me.prototype,"paddingX",void 0),we([s()],me.prototype,"rowDraggable",void 0),we([s()],me.prototype,"rowExpandable",void 0),we([s()],me.prototype,"rowSelection",void 0),we([s()],me.prototype,"isTemplateRenderMode",void 0),we([c("connectedCallback")],me.prototype,"connectedCallback",null),we([c("disconnectedCallback")],me.prototype,"disconnectedCallback",null),we([c("componentWillLoad")],me.prototype,"componentWillLoad",null),we([c("componentDidRender")],me.prototype,"componentDidRender",null),we([c("watchColumnStructureModel")],me.prototype,"watchColumnStructureModel",null),we([c("watchHasExpandableRow"),c("watchPaddingX"),c("watchRowDraggable"),c("watchRowExpandable"),c("watchRowSelection")],me.prototype,"watchRowStructure",null);var xe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ye extends a{constructor(){super(...arguments),this.pageResizeObserverSlimmer=new ct({target:()=>this.host.shadowRoot.querySelector("table"),isDeferred:!0,callback:async()=>{await this.host.componentOnReady(),this.recomputeRenderInputs()}})}componentDidLoad(){}componentDidRender(){this.recomputeRenderInputs()}watchColumnStructureModel(){}recomputeRenderInputs(){if(this.host.style.setProperty("--vega-table-content-width",`${this.host.getBoundingClientRect().width}px`),!this.columnStructureModel.hasLeftPinnedColumn()&&!this.columnStructureModel.hasRightPinnedColumn())return;const t=this.getRowContainerRoot().querySelector("vega-table-head-row");if(!(null==t?void 0:t.shadowRoot))return;const[e,i]=this.getRowFixedWidths(t);this.vegaTableRenderInputController.recomputePinnedOffsets(e,i,this.getLeafWidths())}getRowContainerRoot(){return this.isTemplateRenderMode?this.host:this.host.shadowRoot}getRowFixedWidths(t){const e=t.shadowRoot.querySelector("th:first-of-type"),i=t.shadowRoot.querySelector(".vega-table-draggable-column"),o=t.shadowRoot.querySelector(".vega-table-selection-column"),l=t.shadowRoot.querySelector(".vega-table-expand-action-column"),n=t.shadowRoot.querySelector("th:last-of-type");return e?[e.getBoundingClientRect().width+((null==o?void 0:o.getBoundingClientRect().width)||0)+((null==i?void 0:i.getBoundingClientRect().width)||0),((null==l?void 0:l.getBoundingClientRect().width)||0)+((null==n?void 0:n.getBoundingClientRect().width)||0)]:[0,0]}getLeafWidths(){const t=this.vegaTableRenderInputController.getHeadCellRenderInputMap();return this.vegaTableRenderInputController.getLeafRenderInputs().map((e=>{var i,o;for(const[l,n]of t.entries())if(e===n)return(null===(o=null===(i=l.shadowRoot)||void 0===i?void 0:i.querySelector("th, td"))||void 0===o?void 0:o.getBoundingClientRect().width)||0;return 0}))}}xe([s()],ye.prototype,"host",void 0),xe([s()],ye.prototype,"columnStructureModel",void 0),xe([s()],ye.prototype,"isTemplateRenderMode",void 0),xe([s()],ye.prototype,"vegaTableRenderInputController",void 0),xe([h()],ye.prototype,"pageResizeObserverSlimmer",void 0),xe([c("componentDidLoad")],ye.prototype,"componentDidLoad",null),xe([c("componentDidRender")],ye.prototype,"componentDidRender",null),xe([c("watchColumnStructureModel")],ye.prototype,"watchColumnStructureModel",null);var Re=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ce extends a{constructor(t){super(),this.activePointerId=null,this.activeItem=null,this.isDragging=!1,this.startX=0,this.startY=0,this.dragFromIndex=null,this.dragToIndex=null,this.currentOverItem=null,this.currentOverIndex=null,this.activeItemHeight=0,this.cachedItems=[],this.cachedItemDraggableMap=new WeakMap,this.onPointerDown=t=>{if(0!==t.button)return;const e=this.getItemFromComposedPath(t,!0);e&&(this.startDrag(e,t),t.preventDefault())},this.onPointerMove=t=>{this.isCurrentPointEvent(t)&&this.hasCrossedDragThreshold(t)&&(this.beginDragging(),this.syncActiveVisual(t),this.updateDropTarget(t),this.emitDrag(),t.preventDefault())},this.onPointerUp=t=>{this.isCurrentPointEvent(t)&&this.finishDrag()},this.onPointerCancel=t=>{t.pointerId===this.activePointerId&&this.resetDragState()},this.entry=t}connectedCallback(){this.init()}disconnectedCallback(){this.destroy()}componentDidLoad(){this.init()}watchIsDraggable(){this.isDraggable?this.init():this.destroy()}init(){this.isDraggable&&this.listenPointerEvents()}destroy(){this.removePointerListeners(),this.resetDragState()}listenPointerEvents(){const t=this.getContainer();t&&(t.addEventListener("pointerdown",this.onPointerDown),window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerCancel))}removePointerListeners(){const t=this.getContainer();t&&t.removeEventListener("pointerdown",this.onPointerDown),window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerCancel)}startDrag(t,e){this.activePointerId=e.pointerId,this.activeItem=t,this.isDragging=!1,this.startX=e.clientX,this.startY=e.clientY,this.cacheItems(),this.dragFromIndex=this.getItems().indexOf(t),this.dragToIndex=this.dragFromIndex,this.currentOverItem=t,this.currentOverIndex=this.dragFromIndex,this.activeItemHeight=this.getVisualElement(t).getBoundingClientRect().height}beginDragging(){!this.isDragging&&null!==this.dragFromIndex&&this.activeItem&&(this.isDragging=!0,this.onDragDrop("start"))}syncActiveVisual(t){if(!this.activeItem)return;const e=this.getVisualElement(this.activeItem);e.style.transform=`translateY(${t.clientY-this.startY}px)`,e.style.position="relative",e.style.pointerEvents="none",e.style.boxShadow="0 4px 8px rgba(0, 0, 0, 0.15)",wt.setZIndex(e,"top")}updateDropTarget(t){if(null===this.dragFromIndex||!this.activeItem)return;const e=this.getItemFromComposedPath(t,!1);if(!e)return this.emitDragLeave(this.currentOverIndex,this.currentOverItem),this.currentOverItem=null,void(this.currentOverIndex=null);const i=this.getItemIndex(e),o=this.getResolvedDropIndex(e,t.clientY);this.currentOverItem!==e?(this.emitDragLeave(this.currentOverIndex,this.currentOverItem),this.currentOverItem=e,this.currentOverIndex=i,this.onDragDrop("enter")):this.currentOverIndex=i,this.dragToIndex=o,this.onDragDrop("over"),this.applyLayoutTransforms()}finishDrag(){var t,e,i;const o=this.dragFromIndex,l=this.dragToIndex,n=this.isDragging&&null!=o&&o!==l,r=null!=o&&null!==(t=this.getItems().at(o))&&void 0!==t?t:null,s=this.currentOverItem;this.isDragging&&null!=o&&r&&this.onDragDrop("drop"),this.resetDragState(),n&&null!=o&&r&&(null===(i=(e=this.entry).onDragDrop)||void 0===i||i.call(e,{status:"end",options:{fromIndex:o,fromItem:r,toIndex:l,toItem:s}}))}resetDragState(){if(this.cachedItems.forEach((t=>{const e=this.cachedItemDraggableMap.get(t);if(!e)return;const{visualElement:i,inlineStyle:o}=e;null==o?i.removeAttribute("style"):i.setAttribute("style",o)})),this.activeItem){const t=this.getVisualElement(this.activeItem);wt.removeZIndex(t,"top")}this.activePointerId=null,this.activeItem=null,this.isDragging=!1,this.dragFromIndex=null,this.dragToIndex=null,this.currentOverItem=null,this.currentOverIndex=null,this.activeItemHeight=0,this.cachedItemDraggableMap=new WeakMap,this.cachedItems=[]}getContainer(){return this.entry.container()}queryItems(){const t=this.getContainer();return t?Array.from(t.querySelectorAll(this.entry.itemSelector)):[]}getItems(){return this.cachedItems.length>0?this.cachedItems:this.queryItems()}getItemIndex(t){return this.getItems().indexOf(t)}getVisualElement(t){const e=this.cachedItemDraggableMap.get(t);return e?e.visualElement:this.resolveVisualElement(t)}resolveVisualElement(t){var e,i;const o=this.entry.visualElementSelector;if(!o)return t;return(null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector(o))||(null!==(i=t.querySelector(o))&&void 0!==i?i:t)}cacheItems(){this.cachedItemDraggableMap=new WeakMap,this.cachedItems=this.queryItems(),this.cachedItems.forEach((t=>{const e=this.resolveVisualElement(t);this.cachedItemDraggableMap.set(t,{visualElement:e,inlineStyle:e.getAttribute("style")})}))}getItemFromComposedPath(t,e=!1){const i=this.entry.itemSelector,o=this.entry.triggerElementSelector;let l=null,n=!o;for(const e of t.composedPath())if(e instanceof HTMLElement&&(!l&&e.matches(i)&&(l=e),!n&&o&&e.matches(o)&&(n=!0),l&&n))break;return!l||e&&!n?null:l}applyLayoutTransforms(){if(null==this.dragFromIndex||null==this.dragToIndex||0===this.activeItemHeight)return;const t=this.dragFromIndex,e=this.dragToIndex,i=t<e?-this.activeItemHeight:this.activeItemHeight;this.getItems().forEach(((o,l)=>{o!==this.activeItem&&(this.getVisualElement(o).style.transform=(t<e?l>t&&l<=e:l>=e&&l<t)?`translateY(${i}px)`:"")}))}getResolvedDropIndex(t,e){const i=this.getItemIndex(t),o=this.dragFromIndex;if(i<0||null==o)return i;if(i===o)return i;const l=this.getVisualElement(t).getBoundingClientRect(),n=e>l.top+l.height/2;return i>o?n?i:i-1:n?i+1:i}isCurrentPointEvent(t){return null!==this.activePointerId&&this.activePointerId===t.pointerId}hasCrossedDragThreshold(t){return!!this.isDragging||Math.abs(t.clientX-this.startX)+Math.abs(t.clientY-this.startY)>=Ce.DRAG_THRESHOLD}emitDrag(){null!==this.dragFromIndex&&this.activeItem&&this.onDragDrop("drag")}emitDragLeave(t,e){null!==t&&e&&this.onDragDrop("leave")}onDragDrop(t){var e,i;null!=this.dragFromIndex&&this.activeItem&&(null===(i=(e=this.entry).onDragDrop)||void 0===i||i.call(e,{status:t,options:{fromIndex:this.dragFromIndex,fromItem:this.activeItem,toIndex:this.dragToIndex,toItem:this.currentOverItem}}))}}Ce.DRAG_THRESHOLD=4,Re([c("connectedCallback")],Ce.prototype,"connectedCallback",null),Re([c("disconnectedCallback")],Ce.prototype,"disconnectedCallback",null),Re([c("componentDidLoad")],Ce.prototype,"componentDidLoad",null);var Se=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ke extends a{constructor(){super(...arguments),this.draggableElementSlimmer=gt(ke,Ce,[{mapFrom:"rowDraggable",mapTo:"isDraggable"}],[{mapFrom:"watchRowDraggable",mapTo:"watchIsDraggable"}],[{container:this.getDragContainer.bind(this),itemSelector:"vega-table-row",triggerElementSelector:"td.vega-table-draggable-column",visualElementSelector:"tr.vega-table-row",onDragDrop:this.onDragDrop.bind(this)}])}connectedCallback(){}disconnectedCallback(){}componentDidLoad(){}watchRowDraggable(){}getDragContainer(){return this.isTemplateRenderMode?this.host.querySelector("vega-table-body"):this.vegaTableBodyRenderer.getTableBodyRef()}onDragDrop(t){this.rowDragDropEventEmitter.emit(t).defaultPrevented||"end"===t.status&&this.onDragEnd(t)}onDragEnd(t){const e=t.options.fromIndex,i=t.options.toIndex;if(this.vegaTableSortController.clearSorter(),this.isTemplateRenderMode){const t=Array.from(this.host.querySelectorAll("vega-table-row"));this.host.querySelector("vega-table-body").insertBefore(t[e],e>i?t[i]:t[i].nextSibling)}else{const t=[...this.vegaTableDataSourceController.getCurrentData()],[o]=t.splice(e,1);t.splice(i,0,o),this.vegaTableDataSourceController.setCurrentData(t)}}}Se([s()],ke.prototype,"rowDraggable",void 0),Se([s()],ke.prototype,"host",void 0),Se([s()],ke.prototype,"vegaTableDataSourceController",void 0),Se([s()],ke.prototype,"isTemplateRenderMode",void 0),Se([s()],ke.prototype,"vegaTableBodyRenderer",void 0),Se([s()],ke.prototype,"vegaTableSortController",void 0),Se([s()],ke.prototype,"rowDragDropEventEmitter",void 0),Se([h()],ke.prototype,"draggableElementSlimmer",void 0),Se([c("connectedCallback")],ke.prototype,"connectedCallback",null),Se([c("disconnectedCallback")],ke.prototype,"disconnectedCallback",null),Se([c("componentDidLoad")],ke.prototype,"componentDidLoad",null),Se([c("watchRowDraggable")],ke.prototype,"watchRowDraggable",null);var Ee=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class je extends a{constructor(){super(...arguments),this.templateHeadObserver=new st({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["group-key","parent-group-key","pinned","col-span"]},mutationFilter:dt("VEGA-TABLE-HEAD","VEGA-TABLE-HEAD-ROW","VEGA-TABLE-HEAD-CELL"),callback:()=>this.handleTemplateHeadStructureChange()}),this.observedTemplateHead=null,this.lastTemplateHeadStructureSnapshot=null}connectedCallback(){this.setTemplateGroupColumns(),this.lastTemplateHeadStructureSnapshot=this.getTemplateHeadStructureSnapshot(),this.registerTemplateHeadStructureObserver()}disconnectedCallback(){this.unRegisterTemplateHeadStructureObserver()}componentWillLoad(){this.setTemplateGroupColumns(),this.lastTemplateHeadStructureSnapshot=this.getTemplateHeadStructureSnapshot()}componentDidLoad(){this.registerTemplateHeadMaps(),w.notify(D.getSubject(this.host,N),{})}watchTemplateRenderMode(){this.setTemplateGroupColumns(),this.lastTemplateHeadStructureSnapshot=this.getTemplateHeadStructureSnapshot()}setTemplateGroupColumns(){this.templateGroupColumns=this.getTemplateGroupColumns()}handleTemplateHeadStructureChange(){const t=this.getTemplateHeadStructureSnapshot();this.isSameTemplateHeadStructure(t,this.lastTemplateHeadStructureSnapshot)||(this.lastTemplateHeadStructureSnapshot=t,this.setTemplateGroupColumns(),this.registerTemplateHeadStructureObserver(),this.registerTemplateHeadMaps())}getTemplateHeadStructureSnapshot(){if(!this.isTemplateRenderMode)return null;const t=this.getTemplateHead();return t?Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-ROW"===t.tagName)).flatMap(((t,e)=>Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-CELL"===t.tagName)).map(((t,i)=>({rowIndex:e,cellIndex:i,key:this.getCellProperty(t,"groupKey","group-key"),parentKey:this.getCellProperty(t,"parentGroupKey","parent-group-key"),pinned:this.getCellProperty(t,"pinned","pinned")}))))):null}isSameTemplateHeadStructure(t,e){return t===e||!(!t||!e)&&t.length===e.length&&t.every(((t,i)=>{const o=e[i];return t.rowIndex===o.rowIndex&&t.cellIndex===o.cellIndex&&t.key===o.key&&t.parentKey===o.parentKey&&t.pinned===o.pinned}))}registerTemplateHeadStructureObserver(){const t=this.getTemplateHead();t&&t!==this.observedTemplateHead&&(this.unRegisterTemplateHeadStructureObserver(),this.templateHeadStructureObserver||(this.templateHeadStructureObserver=new S((t=>Boolean(t&&t.host)),(()=>this.handleTemplateHeadStructureChange()))),w.register(D.getSubject(t,P),this.templateHeadStructureObserver),this.observedTemplateHead=t)}unRegisterTemplateHeadStructureObserver(){const t=this.observedTemplateHead;t&&this.templateHeadStructureObserver&&(w.unregister(D.getSubject(t,P),this.templateHeadStructureObserver),this.observedTemplateHead=null)}getTemplateHead(){return Array.from(this.host.children).find((t=>"VEGA-TABLE-HEAD"===t.tagName))}registerTemplateHeadMaps(){if(!this.isTemplateRenderMode)return;const t=this.getTemplateHead();if(!t)return;this.vegaTableRenderInputController.clearHeadRenderInputMaps();const e=this.vegaTableRenderInputController.getHeadRenderInputs()||[],i=new Map(e.flatMap((t=>t.iterator())).map((t=>[t.key,t]))),o=Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-ROW"===t.tagName)),l=this.vegaTableRenderInputController.getLeafRenderInputs()||[];o.forEach((t=>{const e=Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-CELL"===t.tagName)),o=e.some((t=>Boolean(this.getCellProperty(t,"groupKey","group-key")))),n=e.map(((t,e)=>{if(!o)return l[e]||null;const n=this.getCellProperty(t,"groupKey","group-key");return i.get(n)||null}));if(n.some((t=>!t)))return;const r=n;this.vegaTableRenderInputController.addHeadRowRenderInputMap(t,r),this.vegaTableRenderInputController.addRowRenderInputMap(t,"head"),e.forEach(((t,e)=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(t,r[e])}))}))}getTemplateGroupColumns(){if(!this.isTemplateRenderMode)return null;const t=this.getTemplateHead();if(!t)return null;const e=this.collectTemplateNodes(t);if(0===e.length)return null;if(e.every((t=>!t.key)))return this.getFlatPinnedColumns(e);if(e.some((t=>!t.key)))return[];const i=new Map(e.map((t=>[t.key,t])));if(i.size!==e.length)return[];if(!this.linkTemplateNodes(e,i))return[];const o=e.filter((t=>0===t.rowIndex));return this.dropNonEdgePinned(o),o.map((t=>this.toGroupColumnConfig(t)))}getFlatPinnedColumns(t){return t.some((t=>0!==t.rowIndex))?null:(this.dropNonEdgePinned(t),t.every((t=>!t.pinned))?null:t.map(((t,e)=>(t.key=String(e),this.toGroupColumnConfig(t)))))}dropNonEdgePinned(t){let e=0;for(;e<t.length&&"left"===t[e].pinned;)e++;let i=t.length-1;for(;i>=0&&"right"===t[i].pinned;)i--;t.forEach(((t,o)=>{"left"===t.pinned&&o<e||"right"===t.pinned&&o>i||(t.pinned=void 0)}))}collectTemplateNodes(t){return Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-ROW"===t.tagName)).flatMap(((t,e)=>Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-CELL"===t.tagName)).map(((t,i)=>({cell:t,key:this.getCellProperty(t,"groupKey","group-key"),rowIndex:e,cellIndex:i,children:[],pinned:this.getCellProperty(t,"pinned","pinned")})))))}linkTemplateNodes(t,e){var i;const o=new Map;for(const l of t){const t=this.getCellProperty(l.cell,"parentGroupKey","parent-group-key");if(0===l.rowIndex){if(t)return!1;continue}const n=e.get(t);if(!n||n.rowIndex!==l.rowIndex-1)return!1;if(n.cellIndex<(null!==(i=o.get(l.rowIndex))&&void 0!==i?i:-1))return!1;o.set(l.rowIndex,n.cellIndex),n.children.push(l)}return!0}toGroupColumnConfig(t){return 0===t.children.length?t.pinned?{key:t.key,label:(t.cell.textContent||"").trim(),pinned:t.pinned}:{key:t.key}:Object.assign(Object.assign({key:t.key,label:(t.cell.textContent||"").trim()},t.pinned?{pinned:t.pinned}:{}),{children:t.children.map((t=>this.toGroupColumnConfig(t)))})}getCellProperty(t,e,i){const o=(t[e]||t.getAttribute(i)||"").trim();return"pinned"===e?"left"===o||"right"===o?o:void 0:o}}Ee([s()],je.prototype,"host",void 0),Ee([s()],je.prototype,"isTemplateRenderMode",void 0),Ee([s({writable:!0})],je.prototype,"templateGroupColumns",void 0),Ee([s()],je.prototype,"vegaTableRenderInputController",void 0),Ee([h()],je.prototype,"templateHeadObserver",void 0),Ee([c("connectedCallback")],je.prototype,"connectedCallback",null),Ee([c("disconnectedCallback")],je.prototype,"disconnectedCallback",null),Ee([c("componentWillLoad")],je.prototype,"componentWillLoad",null),Ee([c("componentDidLoad")],je.prototype,"componentDidLoad",null),Ee([c("watchTemplateRenderMode")],je.prototype,"watchTemplateRenderMode",null);var De=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Te=class{constructor(t){l(this,t),this.vegaChange=n(this,"vegaChange",7),this.change=n(this,"change",7),this.vegaRowClick=n(this,"vegaRowClick",7),this.rowClick=n(this,"rowClick",7),this.vegaRowExpand=n(this,"vegaRowExpand",7),this.rowExpand=n(this,"rowExpand",7),this.vegaSelectChange=n(this,"vegaSelectChange",7),this.selectChange=n(this,"selectChange",7),this.vegaSelectAllChange=n(this,"vegaSelectAllChange",7),this.selectAllChange=n(this,"selectAllChange",7),this.vegaRowSelect=n(this,"vegaRowSelect",7),this.rowSelect=n(this,"rowSelect",7),this.vegaRowSelectAll=n(this,"vegaRowSelectAll",7),this.rowSelectAll=n(this,"rowSelectAll",7),this.vegaRowDragDrop=n(this,"vegaRowDragDrop",7),this.rowDragDrop=n(this,"rowDragDrop",7),this.globalSlimmers=new Map,this.translationSlimmer=new bt,this.vegaTableRenderModeController=new pe,this.vegaTableHeadTemplateStructureController=new je,this.vegaTableColumnStructureModelController=new fe,this.vegaTableRenderInputController=new me,this.vegaTablePinnedRenderer=new ye,this.vegaTableRenderer=new Zt,this.vegaTableHeaderRenderer=new _t,this.vegaTableBodyRenderer=new Vt,this.vegaTableRowRenderer=new ce,this.vegaTableCellRenderer=new Ot,this.vegaTableBodyColSpanController=new Nt,this.vegaTablePaginationRenderer=new Ft,this.vegaTableScrollContainerRenderer=new Yt,this.vegaTableRowSelectionController=new zt,this.vegaTableDataSourceController=new Gt,this.vegaTablePaginationController=new Qt,this.vegaTableEditableController=new ee,this.vegaTableSortController=new le,this.vegaTableColGroupRenderer=new re,this.vegaTableChildrenController=new ae,this.vegaTableRowDraggableController=new ke,this.vegaTableExpandRowController=new Wt,this.pageResizeObserverSlimmer=new ct,this.rowSelectionNotifySlimmer=ht(Te,"rowSelection","watchRowSelection"),this.expandableRowsNotifySlimmer=ht(Te,"expandableRows","watchExpandableRows"),this.hasExpandableRowNotifySlimmer=ht(Te,"hasExpandableRow","watchHasExpandableRow"),this.paddingXNotifySlimmer=ht(Te,"paddingX","watchPaddingX"),this.rowClickableNotifySlimmer=ht(Te,"rowClickable","watchRowClickable"),this.scrollConfigNotifySlimmer=ht(Te,"scrollConfig","watchScrollConfig"),this.eventsPrevent=new pt([_,H,F],(()=>this.host)),this.changeEventEmitter=ut(Te,_),this.selectChangeEventEmitter=ut(Te,X),this.selectAllChangeEventEmitter=ut(Te,U),this.rowClickEventEmitter=ut(Te,Y),this.rowExpandEventEmitter=ut(Te,q),this.rowDragDropEventEmitter=ut(Te,Z),this.rowDividerNotifySlimmer=ht(Te,"rowDivider","watchRowDivider"),this.columnDividerNotifySlimmer=ht(Te,"columnDivider","watchColumnDivider"),this.densityNotifySlimmer=ht(Te,"density","watchDensity"),this.isTemplateRenderModeNotifySlimmer=ht(Te,"isTemplateRenderMode","watchTemplateRenderMode"),this.currentDataNotifySlimmer=ht(Te,"currentData","watchCurrentData"),this.rowDraggableNotifySlimmer=ht(Te,"rowDraggable","watchRowDraggable"),this.vegaComponentUsageRuntimeMetricsSlimmer=new v(ue),this.rowSelectEventEmitter=ut(Te,J),this.rowSelectAllEventEmitter=ut(Te,Q),this.selectedRowKeySet=new Et(new Set,(t=>{this.selectedRowKeySet=t})),this.expandedRowKeySet=new Et(new Set,(t=>{this.expandedRowKeySet=t})),this.currentBreakpoint=rt(),this.sortersMap=new vt(new Map,(t=>{this.sortersMap=t})),this.currentData=[],this.currentPage=1,this.pageSize=10,this.editingRows=new Et(new Set,(t=>{this.editingRows=t})),this.isSelectedAll=!1,this.templateGroupColumns=null,this.expandableRows=[],this.hasExpandableRow=!1,this.columns=[],this.dataSource=[],this.rowSelection=null,this.rowExpandable=!1,this.rowClickable=!1,this.rowDraggable=!1,this.rowDivider=!1,this.columnDivider=!1,this.striped=!0,this.density="default",this.paddingX=["8px","8px"],this.showHeader=!0,this.pagination=null,this.emptyDescription="There is no data to display",this.rowKey="key",this.sortConfig={type:"multiple"},this.showEditError=!1}watchSelectedRowKeySet(){}watchSortersMap(){}watchCurrentData(t,e){}watchCurrentPage(){}watchSelectedAll(){}watchTemplateRenderMode(){}watchTemplateGroupColumns(){}watchColumnStructureModel(){}watchExpandableRows(){}watchHasExpandableRow(){}watchColumns(){}watchGroupColumns(){}watchDataSource(){}watchRowSelection(){}watchRowExpandable(){}watchRowClickable(){}watchRowDraggable(){}watchRowDivider(){}watchColumnDivider(){}watchStriped(){}watchDensity(){}watchPaddingX(){}watchPagination(){}watchScrollConfig(){}async openExpandRow(t){}async closeExpandRow(t){}async closeAllExpandRow(){}async toggleExpandRow(t){}async clearSelection(){}async getSelection(){return p()}async setSelection(t){}async startRowEditMode(t){}async stopRowEditMode(t){}async stopAllRowEditMode(){}async getRowData(t){return p(t)}async getRowsData(){return p()}async getFormRef(t){return p(t)}async addNewRow(t={}){return p(t)}async saveEditRow(t){return p(t)}async saveAllEditRows(){}async getEditingRowsKey(){return p()}async removeRow(t){}render(){return u(t("slot",null)),this.vegaTableRenderer.render()}get host(){return r(this)}static get watchers(){return{selectedRowKeySet:["watchSelectedRowKeySet"],sortersMap:["watchSortersMap"],currentData:["watchCurrentData"],currentPage:["watchCurrentPage"],isSelectedAll:["watchSelectedAll"],isTemplateRenderMode:["watchTemplateRenderMode"],templateGroupColumns:["watchTemplateGroupColumns"],columnStructureModel:["watchColumnStructureModel"],expandableRows:["watchExpandableRows"],hasExpandableRow:["watchHasExpandableRow"],columns:["watchColumns"],groupColumns:["watchGroupColumns"],dataSource:["watchDataSource"],rowSelection:["watchRowSelection"],rowExpandable:["watchRowExpandable"],rowClickable:["watchRowClickable"],rowDraggable:["watchRowDraggable"],rowDivider:["watchRowDivider"],columnDivider:["watchColumnDivider"],striped:["watchStriped"],density:["watchDensity"],paddingX:["watchPaddingX"],pagination:["watchPagination"],scrollConfig:["watchScrollConfig"]}}};De([b()],Te.prototype,"globalSlimmers",void 0),De([h()],Te.prototype,"translationSlimmer",void 0),De([h()],Te.prototype,"vegaTableRenderModeController",void 0),De([h()],Te.prototype,"vegaTableHeadTemplateStructureController",void 0),De([h()],Te.prototype,"vegaTableColumnStructureModelController",void 0),De([h()],Te.prototype,"vegaTableRenderInputController",void 0),De([h()],Te.prototype,"vegaTablePinnedRenderer",void 0),De([h()],Te.prototype,"vegaTableRenderer",void 0),De([h()],Te.prototype,"vegaTableHeaderRenderer",void 0),De([h()],Te.prototype,"vegaTableBodyRenderer",void 0),De([h()],Te.prototype,"vegaTableRowRenderer",void 0),De([h()],Te.prototype,"vegaTableCellRenderer",void 0),De([h()],Te.prototype,"vegaTableBodyColSpanController",void 0),De([h()],Te.prototype,"vegaTablePaginationRenderer",void 0),De([h()],Te.prototype,"vegaTableScrollContainerRenderer",void 0),De([h()],Te.prototype,"vegaTableRowSelectionController",void 0),De([h()],Te.prototype,"vegaTableDataSourceController",void 0),De([h()],Te.prototype,"vegaTablePaginationController",void 0),De([h()],Te.prototype,"vegaTableEditableController",void 0),De([h()],Te.prototype,"vegaTableSortController",void 0),De([h()],Te.prototype,"vegaTableColGroupRenderer",void 0),De([h()],Te.prototype,"vegaTableChildrenController",void 0),De([h()],Te.prototype,"vegaTableRowDraggableController",void 0),De([h()],Te.prototype,"vegaTableExpandRowController",void 0),De([h()],Te.prototype,"pageResizeObserverSlimmer",void 0),De([h()],Te.prototype,"rowSelectionNotifySlimmer",void 0),De([h()],Te.prototype,"expandableRowsNotifySlimmer",void 0),De([h()],Te.prototype,"hasExpandableRowNotifySlimmer",void 0),De([h()],Te.prototype,"paddingXNotifySlimmer",void 0),De([h()],Te.prototype,"rowClickableNotifySlimmer",void 0),De([h()],Te.prototype,"scrollConfigNotifySlimmer",void 0),De([h()],Te.prototype,"eventsPrevent",void 0),De([h()],Te.prototype,"changeEventEmitter",void 0),De([h()],Te.prototype,"selectChangeEventEmitter",void 0),De([h()],Te.prototype,"selectAllChangeEventEmitter",void 0),De([h()],Te.prototype,"rowClickEventEmitter",void 0),De([h()],Te.prototype,"rowExpandEventEmitter",void 0),De([h()],Te.prototype,"rowDragDropEventEmitter",void 0),De([h()],Te.prototype,"rowDividerNotifySlimmer",void 0),De([h()],Te.prototype,"columnDividerNotifySlimmer",void 0),De([h()],Te.prototype,"densityNotifySlimmer",void 0),De([h()],Te.prototype,"isTemplateRenderModeNotifySlimmer",void 0),De([h()],Te.prototype,"currentDataNotifySlimmer",void 0),De([h()],Te.prototype,"rowDraggableNotifySlimmer",void 0),De([h()],Te.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),De([h()],Te.prototype,"rowSelectEventEmitter",void 0),De([h()],Te.prototype,"rowSelectAllEventEmitter",void 0),Te.style=':host{display:block}table{width:100%;border-spacing:0}.vega-table-empty-description{text-align:center;padding:24px;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-table-empty-description{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-table-empty-description{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-table-empty-description{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}table.v-table-fixed{table-layout:fixed}.vega-table-scrollable-container{overflow:auto}.vega-table-scrollable-container vega-table-head{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.vega-table-scrollable-container.scrolled vega-table-head.fixed-header,.vega-table-scrollable-container.scrolled ::slotted(vega-table-head.fixed-header){box-shadow:0px 4px 0px rgba(0, 0, 0, 0.1);}.vega-table-scrollable-container.scrolled vega-table-foot.fixed-footer::after,.vega-table-scrollable-container.scrolled ::slotted(vega-table-foot.fixed-footer)::after{content:"";position:absolute;top:0;left:0;width:100%;height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1))}vega-form{display:contents}table:not(.show-edit-error) *::part(field-error-message){display:none !important}.vega-table-pagination-container{margin-top:24px}.vega-table-pagination-container.bottom-center{display:flex;justify-content:center}.vega-table-pagination-container.bottom-right{display:flex;justify-content:flex-end}.vega-table-pagination-container.bottom-left{display:flex;justify-content:flex-start}col.v-hidden{display:none;visibility:collapse}@media (min-width: 320px){col.S\\:v-table-column{display:table-column;visibility:visible}}@media (min-width: 768px){col.M\\:v-table-column{display:table-column;visibility:visible}}@media (min-width: 1024px){col.L\\:v-table-column{display:table-column;visibility:visible}}@media (min-width: 1440px){col.XL\\:v-table-column{display:table-column;visibility:visible}}:host(.is-group-table) .vega-table-scrollable-container{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-width:1px;border-style:solid}:host(.is-group-table.density-relaxed) .vega-table-scrollable-container{border-radius:12px}:host(.is-group-table.density-default) .vega-table-scrollable-container{border-radius:12px}:host(.is-group-table.density-compact) .vega-table-scrollable-container{border-radius:4px}:host(.is-pinned-table) table{min-width:max-content}.draggable-col{min-width:16px;width:16px}';var Oe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ae=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.childChangeEventPrevent=new pt([_],(()=>this.host)),this.vegaComponentUsageRuntimeMetricsSlimmer=new v}render(){return lt(t(o,null,t("tbody",null,t("slot",null))),this.host)}get host(){return r(this)}};Oe([b()],Ae.prototype,"globalSlimmers",void 0),Oe([h()],Ae.prototype,"childChangeEventPrevent",void 0),Oe([h()],Ae.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ae.style=":host{display:contents}";const Le=(t,e)=>t&&it(t)?`v-hidden ${t}:${e}`:"";var Me=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ne extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"density",parentStateName:"density"},{subStateName:"columnDivider",parentStateName:"columnDivider",callback:t=>{const e=this.host.parentElement;if(e){const i=e.querySelector("vega-table-cell:last-of-type");this.columnDivider=t&&i!==this.host}}},{subStateName:"clickable",parentStateName:"rowClickable"}]})}}Me([s()],Ne.prototype,"host",void 0),Me([s({writable:!0})],Ne.prototype,"density",void 0),Me([s({writable:!0})],Ne.prototype,"columnDivider",void 0),Me([s({writable:!0})],Ne.prototype,"clickable",void 0);var Ie=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class We extends mt{constructor(){super({parent:"vega-table-row",subStates:[{subStateName:"checked",parentStateName:"checked"},{subStateName:"expanded",parentStateName:"expanded"},{subStateName:"striped",parentStateName:"striped"},{subStateName:"rowDivider",parentStateName:"rowDivider"}]})}}Ie([s({writable:!0})],We.prototype,"checked",void 0),Ie([s({writable:!0})],We.prototype,"expanded",void 0),Ie([s({writable:!0})],We.prototype,"striped",void 0),Ie([s({writable:!0})],We.prototype,"rowDivider",void 0);var Be=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ze extends a{constructor(t){super(),this.observer=null,this.table=null,this.observerSubject=t}componentWillRenderInput(){this.renderInput=this.fetchRenderInput()}connectRenderInputObserver(){this.table=k(this.host,"vega-table"),this.table&&this.registerRenderInputChangeObserver()}disconnectRenderInputObserver(){this.table&&this.observer&&(this.unregisterRenderInputChangeObserver(),this.observer=null,this.table=null)}fetchRenderInput(){return this.table?O.call(D.getSubject(this.table,this.observerSubject),this.host):null}registerRenderInputChangeObserver(){this.observer=new S((()=>!0),(()=>{this.renderInput=this.fetchRenderInput(),e(this.host)})),w.register(D.getSubject(this.table,N),this.observer)}unregisterRenderInputChangeObserver(){w.unregister(D.getSubject(this.table,N),this.observer)}}Be([s()],ze.prototype,"host",void 0),Be([s({writable:!0})],ze.prototype,"renderInput",void 0),Be([c("componentWillRender")],ze.prototype,"componentWillRenderInput",null),Be([c("connectedCallback")],ze.prototype,"connectRenderInputObserver",null),Be([c("disconnectedCallback")],ze.prototype,"disconnectRenderInputObserver",null);var Ke=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ge=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableCellStateController=new Ne,this.vegaTableRowStateSubscriber=new We,this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.vegaTableRenderInputConsumerSlimmer=new ze(B),this.currentBreakpoint=rt(),this.ellipsisTooltipText="",this.ellipsisTooltipTrigger="none",this.ellipsisShowTooltip=!1,this.getCellOverflowClass=()=>{switch(this.overflow){case"ellipsis":return"vega-table-cell-ellipsis";case"scroll":return"vega-table-cell-scroll"}}}componentDidLoad(){"ellipsis"===this.overflow&&this.ellipsisShowTooltip&&requestAnimationFrame((()=>this.updateEllipsisState()))}render(){var e,i,l,n,r,s,a,d,c,h,p;const u=this.renderInput,v=null==u?void 0:u.pinned,b=null!==(e=null==u?void 0:u.leftOffsetPx)&&void 0!==e?e:0,f=null!==(i=null==u?void 0:u.rightOffsetPx)&&void 0!==i?i:0,g=Le(this.breakpoint,"v-table-cell"),w=(()=>{let t;switch(this.textAlign){case"center":t="v-text-center";break;case"left":t="v-text-left";break;case"right":t="v-text-right";break;default:t=""}return t})(),m=this.getCellOverflowClass(),x=[g,w,"vega-table-cell","left"===v&&"pinned-left","right"===v&&"pinned-right"];xt.isEnabled("VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE")||x.push("break-word"),((null===(l=this.renderInput)||void 0===l?void 0:l.isRightStartPinned)||(null===(n=this.renderInput)||void 0===n?void 0:n.isVisibleRightStartPinned))&&x.push("left-divider"),((null===(r=this.renderInput)||void 0===r?void 0:r.isLeftEndPinned)||(null===(s=this.renderInput)||void 0===s?void 0:s.isVisibleLeftEndPinned))&&x.push("right-divider"),((null===(a=this.renderInput)||void 0===a?void 0:a.isNoPinnedEnd)||(null===(d=this.renderInput)||void 0===d?void 0:d.isViewEnd)||(null===(c=this.renderInput)||void 0===c?void 0:c.isVisibleRightEndPinned))&&x.push("hide-right-border");const y=null!==(p=null===(h=this.renderInput)||void 0===h?void 0:h.visibleColSpan)&&void 0!==p?p:this.colSpan;return lt(t(o,{class:E([`density-${tt.formatCustom(this.density)}`,this.rowDivider&&"row-divider",this.columnDivider&&"column-divider",this.clickable&&"clickable",this.checked&&"checked",this.striped&&"striped",this.expanded&&"expanded"]),"aria-colspan":(null!=y?y:0)>1?String(y):null},t("td",{class:E(x),part:"cell",colSpan:(null!=y?y:0)>1?y:null,onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),style:{width:this.width,"--pinned-offset-left":"left"===v?`${b}px`:null,"--pinned-offset-right":"right"===v?`${f}px`:null}},"ellipsis"===this.overflow&&this.ellipsisShowTooltip?t("vega-tooltip",{text:this.ellipsisTooltipText,trigger:this.ellipsisTooltipTrigger,maxWidth:300,style:{display:"block",width:"100%",minWidth:"0"}},t("div",{class:m,ref:t=>{this.overflowContentRef=t}},t("slot",{ref:t=>{this.slotRef=t}}))):t("div",{class:m,ref:t=>{this.overflowContentRef=t}},t("slot",{ref:t=>{this.slotRef=t}})))),this.host)}onMouseEnter(){this.updateEllipsisState(),this.getRowCells().forEach((t=>t.classList.add("hovered")))}onMouseLeave(){this.getRowCells().forEach((t=>t.classList.remove("hovered")))}getRowCells(){const t=this.host.parentElement;return t?Array.from(t.querySelectorAll("vega-table-cell")):[]}updateEllipsisState(){if("ellipsis"!==this.overflow||!this.overflowContentRef)return;const t=this.overflowContentRef.scrollWidth>this.overflowContentRef.clientWidth,e=this.getCellText();this.ellipsisShowTooltip?(this.overflowContentRef.removeAttribute("title"),this.ellipsisTooltipText=e,this.ellipsisTooltipTrigger=t?"hover":"none"):t&&e?this.overflowContentRef.setAttribute("title",e):this.overflowContentRef.removeAttribute("title")}getCellText(){var t,e,i;return(this.slotRef&&"function"==typeof this.slotRef.assignedNodes?this.slotRef.assignedNodes({flatten:!0}):[]).map((t=>{var e;return(null===(e=t.textContent)||void 0===e?void 0:e.trim())||""})).filter((t=>t)).join(" ")||(null===(e=null===(t=this.overflowContentRef)||void 0===t?void 0:t.textContent)||void 0===e?void 0:e.trim())||(null===(i=this.host.textContent)||void 0===i?void 0:i.trim())||""}get host(){return r(this)}};Ke([b()],Ge.prototype,"globalSlimmers",void 0),Ke([h()],Ge.prototype,"vegaTableCellStateController",void 0),Ke([h()],Ge.prototype,"vegaTableRowStateSubscriber",void 0),Ke([h()],Ge.prototype,"pageResizeObserverSlimmer",void 0),Ke([h()],Ge.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ke([h()],Ge.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Ge.style=':host .vega-table-cell.v-hidden{display:none}@media (min-width: 320px){:host .vega-table-cell.S\\:v-table-cell{display:table-cell}}@media (min-width: 768px){:host .vega-table-cell.M\\:v-table-cell{display:table-cell}}@media (min-width: 1024px){:host .vega-table-cell.L\\:v-table-cell{display:table-cell}}@media (min-width: 1440px){:host .vega-table-cell.XL\\:v-table-cell{display:table-cell}}:host{display:contents}.vega-table-cell{padding:12px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-table-cell{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-table-cell{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-table-cell{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-table-cell.break-word{word-break:break-word}td{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:left;padding:0px;vertical-align:middle}td.v-text-center{text-align:center}td.v-text-left{text-align:left}td.v-text-right{text-align:right}:host(.density-default) .vega-table-cell{padding:12px}:host(.density-compact) .vega-table-cell{padding:4px}:host(.density-relaxed) .vega-table-cell{padding:16px}.vega-table-cell-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.vega-table-cell-scroll{overflow:auto}:host(.column-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}:host(.row-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host(.striped) .vega-table-cell{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.clickable.hovered:not(.checked)) .vega-table-cell{cursor:pointer;background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host(.checked) .vega-table-cell{background-color:rgba(var(--v-bg-table-selected-row, 204, 223, 255, 1))}:host(.expanded) .vega-table-cell{border-top-width:1px;border-left-width:0px;border-right-width:0px;border-bottom-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1))}:host .vega-table-cell.pinned-left{position:sticky;z-index:1;left:var(--pinned-offset-left, 0)}:host .vega-table-cell.pinned-right{position:sticky;z-index:1;right:var(--pinned-offset-right, 0)}:host .vega-table-cell.right-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:2px;border-right-style:solid}:host .vega-table-cell.left-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-left-width:2px;border-left-style:solid}:host .vega-table-cell.hide-right-border{border-right-width:0px}';var Pe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ve extends a{render(){var e,i,o,l,n,r,s,a,d,c;return t("tr",{class:{"vega-table-expanded-row":!0,expanded:this.expanded,checked:this.checked,striped:this.striped},key:`vega-table-expanded-row-${this.rowKey}`,"data-expanded-row-key":this.rowKey},t("td",{class:{"pinned-left":null===(e=this.renderInput)||void 0===e?void 0:e.hasLeftPinnedColumn}}),t("td",{colSpan:this.colSpan,key:`${Wt.expandRowSlotNamePrefix}${this.rowKey}`,class:"vega-table-expanded-row-slot-container"},t("div",{class:{"expanded-row-slot-inner":!0,"pinned-left":(null===(i=this.renderInput)||void 0===i?void 0:i.hasLeftPinnedColumn)||(null===(o=this.renderInput)||void 0===o?void 0:o.hasRightPinnedColumn)},style:{"--pinned-offset-left":`${null!==(n=null===(l=this.renderInput)||void 0===l?void 0:l.leftPaddingPx)&&void 0!==n?n:0}px`,"--expand-row-content-width":`calc(var(--vega-table-content-width, 0px) - ${null!==(s=null===(r=this.renderInput)||void 0===r?void 0:r.leftPaddingPx)&&void 0!==s?s:0}px - ${null!==(d=null===(a=this.renderInput)||void 0===a?void 0:a.rightPaddingPx)&&void 0!==d?d:0}px - 2px)`}},t("slot",null))),t("td",{class:{"pinned-right":null===(c=this.renderInput)||void 0===c?void 0:c.hasRightPinnedColumn}}))}}Pe([s()],Ve.prototype,"rowKey",void 0),Pe([s()],Ve.prototype,"expanded",void 0),Pe([s()],Ve.prototype,"checked",void 0),Pe([s()],Ve.prototype,"colSpan",void 0),Pe([s()],Ve.prototype,"striped",void 0),Pe([s()],Ve.prototype,"renderInput",void 0);var $e=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class _e extends a{connectedCallback(){this.expandObserver=new S(this.isAcceptableTableExpandRowObserver.bind(this),(t=>{t.rowKey===this.rowKey&&(this.expanded=t.expanded)})),w.register(m,this.expandObserver)}disconnectedCallback(){w.unregister(m,this.expandObserver)}isAcceptableTableExpandRowObserver(t){return"VEGA-TABLE"===t.host.tagName?"VEGA-TABLE"===t.host.tagName&&t.host===k(this.host,"vega-table"):"VEGA-TABLE-ROW"===t.host.tagName?k(this.host,"vega-table")===k(t.host,"vega-table"):void 0}}function He(t){return"VEGA-TABLE-ROW"===t.host.tagName&&k(this.host,"vega-table")===k(t.host,"vega-table")}function Fe(t){return"VEGA-TABLE"===t.host.tagName&&t.host===k(this.host,"vega-table")}$e([s()],_e.prototype,"host",void 0),$e([s()],_e.prototype,"rowKey",void 0),$e([s({writable:!0})],_e.prototype,"expanded",void 0),$e([c("connectedCallback")],_e.prototype,"connectedCallback",null),$e([c("disconnectedCallback")],_e.prototype,"disconnectedCallback",null);var Xe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ue extends a{connectedCallback(){this.rowSelectionObserver=new S(He.bind(this),(t=>{t.rowKey===this.rowKey&&(this.checked=t.checked)})),w.register(x,this.rowSelectionObserver)}disconnectedCallback(){w.unregister(x,this.rowSelectionObserver)}}Xe([s({writable:!0})],Ue.prototype,"checked",void 0),Xe([s()],Ue.prototype,"host",void 0),Xe([s()],Ue.prototype,"rowKey",void 0),Xe([c("connectedCallback")],Ue.prototype,"connectedCallback",null),Xe([c("disconnectedCallback")],Ue.prototype,"disconnectedCallback",null);var Ye=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class qe extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"withMultipleSelection",parentStateName:"rowSelection",callback:t=>{if(t){const{type:e="multiple"}=t;this.withMultipleSelection="multiple"===e}else this.withMultipleSelection=!1}},{subStateName:"withRowDraggable",parentStateName:"rowDraggable"}]})}}Ye([s()],qe.prototype,"host",void 0),Ye([s({writable:!0})],qe.prototype,"withMultipleSelection",void 0),Ye([s({writable:!0})],qe.prototype,"withRowDraggable",void 0),Ye([s()],qe.prototype,"vegaTableExpandRowColSpanController",void 0);var Ze=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Je extends a{constructor(){super(...arguments),this.updateColSpan=()=>{this.colSpan=this.getVisibleColumnsNumber()+(this.withMultipleSelection?2:1)+(this.withRowDraggable?1:0)}}componentWillLoad(){this.updateColSpan()}watchCurrentBreakpoint(){this.updateColSpan()}watchWithMultipleSelection(){this.updateColSpan()}watchWithRowDraggable(){this.updateColSpan()}getVisibleColumnsNumber(){const t=k(this.host,"vega-table"),e=rt(),i=t.children&&Array.from(t.children).filter((t=>{var e;return!(null===(e=t.getAttribute("slot"))||void 0===e?void 0:e.startsWith("vega-table-expand-row-"))})).length>0?t.querySelectorAll("vega-table-row:nth-of-type(1) vega-table-cell"):t.shadowRoot.querySelectorAll("vega-table-row:nth-of-type(1) vega-table-cell");return Array.from(i).filter((t=>!t.breakpoint||"default"!==e&&yt[e]>=yt[t.breakpoint])).reduce(((t,e)=>{var i;const o=null!==(i=e.colSpan)&&void 0!==i?i:1;return t+(o>1?o:1)}),0)}}Ze([s()],Je.prototype,"host",void 0),Ze([s({writable:!0})],Je.prototype,"colSpan",void 0),Ze([s()],Je.prototype,"withMultipleSelection",void 0),Ze([s()],Je.prototype,"withRowDraggable",void 0),Ze([c("componentWillLoad")],Je.prototype,"componentWillLoad",null),Ze([c("watchCurrentBreakpoint")],Je.prototype,"watchCurrentBreakpoint",null),Ze([c("watchWithMultipleSelection")],Je.prototype,"watchWithMultipleSelection",null),Ze([c("watchWithRowDraggable")],Je.prototype,"watchWithRowDraggable",null);var Qe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ti=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableExpandRowRenderer=new Ve,this.vegaTableExpandRowExpandController=new _e,this.vegaTableExpandRowSelectionController=new Ue,this.vegaTableExpandRowStateController=new qe,this.vegaTableExpandRowColSpanController=new Je,this.pageResizeObserverSlimmer=new ct,this.vegaTableRenderInputConsumerSlimmer=new ze(K),this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.currentBreakpoint=rt(),this.expanded=!1,this.checked=!1}watchCurrentBreakpoint(){}watchWithMultipleSelection(){}watchWithRowDraggable(){}render(){return u(t("slot",null)),lt(t(o,null,this.vegaTableExpandRowRenderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{currentBreakpoint:["watchCurrentBreakpoint"],withMultipleSelection:["watchWithMultipleSelection"],withRowDraggable:["watchWithRowDraggable"]}}};Qe([b()],ti.prototype,"globalSlimmers",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowRenderer",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowExpandController",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowSelectionController",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowStateController",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowColSpanController",void 0),Qe([h()],ti.prototype,"pageResizeObserverSlimmer",void 0),Qe([h()],ti.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Qe([h()],ti.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ti.style=":host{display:contents}td.pinned-left,td.pinned-right,.expanded-row-slot-inner.pinned-left{position:sticky;z-index:1}td.pinned-left{left:0}td.pinned-right{right:0}.expanded-row-slot-inner.pinned-left{left:var(--pinned-offset-left, 0);width:var(--expand-row-content-width)}:host .vega-table-expanded-row.striped:not(.checked) td{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.v-hidden){display:none}.vega-table-expanded-row{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-table-expanded-row:not(.expanded){display:none}.vega-table-expanded-row.expanded td{border-bottom-width:1px;border-top-width:0px;border-right-width:0px;border-left-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1));padding:0px;vertical-align:middle}.vega-table-expanded-row.expanded td:first-of-type{border-left-width:1px;border-bottom-width:1px;border-top-left-radius:12px;border-bottom-left-radius:12px;border-top-left-radius:0px}.vega-table-expanded-row.expanded td:last-of-type{border-right-width:1px;border-bottom-width:1px;border-top-right-radius:12px;border-bottom-right-radius:12px;border-top-right-radius:0px}.vega-table-expanded-row.expanded td.vega-table-expanded-row-slot-container{border-top-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1))}.vega-table-expanded-row.expanded.checked{background-color:rgba(var(--v-bg-table-row-selected-expanded, 229, 239, 255, 1))}:host tr.is-pinned-row td:first-of-type{position:sticky;z-index:1;left:0px}:host tr.is-pinned-row td.vega-table-expanded-row-slot-container div{position:sticky;z-index:1;left:8px}";var ei=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ii extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"fixed",parentStateName:"scrollConfig",callback:t=>{this.fixed=t&&t.maxHeight&&!1!==t.fixedFooter}},{subStateName:"rowDivider",parentStateName:"rowDivider"}]})}handleDisconnectedCallback(){wt.removeZIndex(this.tableFootRef,"base")}handleTableFootRefChange(t){this.tableFootRef&&wt.removeZIndex(this.tableFootRef,"base"),this.fixed&&wt.setZIndex(t,"base"),this.tableFootRef=t}}ei([s()],ii.prototype,"host",void 0),ei([s({writable:!0})],ii.prototype,"fixed",void 0),ei([s({writable:!0})],ii.prototype,"rowDivider",void 0),ei([c("disconnectedCallback")],ii.prototype,"handleDisconnectedCallback",null);var oi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const li=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableFootStateController=new ii,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.childChangeEventPrevent=new pt([_],(()=>this.host)),this.fixed=!1,this.rowDivider=!1}render(){return lt(t(o,{class:{"fixed-footer":this.fixed,"row-divider":this.rowDivider},ref:t=>this.vegaTableFootStateController.handleTableFootRefChange(t)},t("tfoot",null,t("slot",null))),this.host)}get host(){return r(this)}};oi([b()],li.prototype,"globalSlimmers",void 0),oi([h()],li.prototype,"vegaTableFootStateController",void 0),oi([h()],li.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),oi([h()],li.prototype,"childChangeEventPrevent",void 0),li.style=':host{display:table-footer-group;position:sticky;border-top-right-radius:12px;border-bottom-right-radius:12px;border-top-left-radius:12px;border-bottom-left-radius:12px}:host tfoot{display:contents}:host(.fixed-footer){bottom:0px}:host(.row-divider)::after{content:"";position:absolute;top:0;left:0;width:100%;height:1px;z-index:2;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1))}:host(.v-hidden){display:none}';var ni=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ri extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"density",parentStateName:"density"},{subStateName:"columnDivider",parentStateName:"columnDivider",callback:t=>{const e=this.host.parentElement;if(e){const i=e.querySelector("vega-table-foot-cell:last-of-type");this.columnDivider=t&&i!==this.host}}}]})}}ni([s({writable:!0})],ri.prototype,"density",void 0),ni([s({writable:!0})],ri.prototype,"columnDivider",void 0);var si=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ai extends a{render(){var e,i,o,l,n,r,s,a,d,c;const h=this.renderInput,p=null==h?void 0:h.pinned,u=null!==(e=null==h?void 0:h.visibleColSpan)&&void 0!==e?e:this.colSpan,v=null!==(i=null==h?void 0:h.leftOffsetPx)&&void 0!==i?i:0,b=null!==(o=null==h?void 0:h.rightOffsetPx)&&void 0!==o?o:0;return t("td",{class:{"vega-table-cell":!0,"pinned-left":"left"===p,"pinned-right":"right"===p,"right-divider":(null===(l=this.renderInput)||void 0===l?void 0:l.isLeftEndPinned)||(null===(n=this.renderInput)||void 0===n?void 0:n.isVisibleLeftEndPinned),"left-divider":(null===(r=this.renderInput)||void 0===r?void 0:r.isRightStartPinned)||(null===(s=this.renderInput)||void 0===s?void 0:s.isVisibleRightStartPinned),"hide-right-border":(null===(a=this.renderInput)||void 0===a?void 0:a.isNoPinnedEnd)||(null===(d=this.renderInput)||void 0===d?void 0:d.isViewEnd)||(null===(c=this.renderInput)||void 0===c?void 0:c.isVisibleRightEndPinned),"break-word":!xt.isEnabled("VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE"),[Le(this.breakpoint,"v-table-cell")]:!0},colSpan:(null!=u?u:0)>1?u:null,style:{width:this.width,"--pinned-offset-left":"left"===p?`${v}px`:null,"--pinned-offset-right":"right"===p?`${b}px`:null}},t("div",{class:E(["vega-table-column",this.textAlign])},t("span",{class:"vega-table-column-label"},t("slot",null))))}}si([s()],ai.prototype,"host",void 0),si([s()],ai.prototype,"breakpoint",void 0),si([s()],ai.prototype,"textAlign",void 0),si([s()],ai.prototype,"colSpan",void 0),si([s()],ai.prototype,"width",void 0),si([s()],ai.prototype,"renderInput",void 0);var di=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ci=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableFootCellStateController=new ri,this.vegaTableFootCellRenderer=new ai,this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.vegaTableRenderInputConsumerSlimmer=new ze(G),this.currentBreakpoint=rt()}render(){var e;let i=this.colSpan;return null!=(null===(e=this.renderInput)||void 0===e?void 0:e.visibleColSpan)&&(i=this.renderInput.visibleColSpan),lt(t(o,{class:{[`density-${tt.formatCustom(this.density)}`]:!0,"column-divider":this.columnDivider},"aria-colspan":(null!=i?i:0)>1?String(i):null},this.vegaTableFootCellRenderer.render()),this.host)}get host(){return r(this)}};di([b()],ci.prototype,"globalSlimmers",void 0),di([h()],ci.prototype,"vegaTableFootCellStateController",void 0),di([h()],ci.prototype,"vegaTableFootCellRenderer",void 0),di([h()],ci.prototype,"pageResizeObserverSlimmer",void 0),di([h()],ci.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),di([h()],ci.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),ci.style=':host .vega-table-cell.v-hidden{display:none}@media (min-width: 320px){:host .vega-table-cell.S\\:v-table-cell{display:table-cell}}@media (min-width: 768px){:host .vega-table-cell.M\\:v-table-cell{display:table-cell}}@media (min-width: 1024px){:host .vega-table-cell.L\\:v-table-cell{display:table-cell}}@media (min-width: 1440px){:host .vega-table-cell.XL\\:v-table-cell{display:table-cell}}:host{display:contents}td{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:left;vertical-align:middle;padding:12px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){td{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){td{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){td{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}td.break-word{word-break:break-word}.vega-table-column{display:flex;align-items:center}.vega-table-column.center{justify-content:center;text-align:center}.vega-table-column.right{justify-content:flex-end;text-align:right}.vega-table-column.left{justify-content:flex-start;text-align:left}.vega-table-column .vega-table-column-label{min-width:0px}:host(.density-default) .vega-table-cell{padding:12px}:host(.density-compact) .vega-table-cell{padding:4px}:host(.density-relaxed) .vega-table-cell{padding:16px}:host(.column-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}:host .vega-table-cell.pinned-left{position:sticky;z-index:1;left:var(--pinned-offset-left, 0)}:host .vega-table-cell.pinned-right{position:sticky;z-index:1;right:var(--pinned-offset-right, 0)}:host .vega-table-cell.right-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:2px;border-right-style:solid}:host .vega-table-cell.left-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-left-width:2px;border-left-style:solid}:host .vega-table-cell.hide-right-border{border-right-width:0px}';var hi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class pi extends a{constructor(){super(...arguments),this.renderFooterSelectionCell=()=>{const e=this.renderInput;if(null==e?void 0:e.showSelectionCell)return t("td",{class:{"vega-table-selection-column":!0,"pinned-left":e.hasLeftPinnedColumn}})},this.renderFooterExpandableCell=()=>{const e=this.renderInput;return(null==e?void 0:e.showExpandActionCell)&&t("td",{class:{"vega-table-expand-action-column":!0,"pinned-right":e.hasRightPinnedColumn}})},this.renderFooterDraggableCell=()=>{const e=this.renderInput;return(null==e?void 0:e.showDraggableCell)&&t("td",{class:{"vega-table-draggable-column":!0,"pinned-left":e.hasLeftPinnedColumn}})}}render(){var e,i;return t("tr",null,t("td",{class:{"pinned-left":null===(e=this.renderInput)||void 0===e?void 0:e.hasLeftPinnedColumn},style:{width:this.paddingX[0]}}),this.renderFooterDraggableCell(),this.renderFooterSelectionCell(),t("slot",null),this.renderFooterExpandableCell(),t("td",{class:{"pinned-right":null===(i=this.renderInput)||void 0===i?void 0:i.hasRightPinnedColumn},style:{width:this.paddingX[1]}}))}}hi([s()],pi.prototype,"host",void 0),hi([s()],pi.prototype,"paddingX",void 0),hi([s()],pi.prototype,"renderInput",void 0);var ui=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class vi extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"hasExpandableRow",parentStateName:"hasExpandableRow"},{subStateName:"paddingX",parentStateName:"paddingX"},{subStateName:"selectionType",parentStateName:"rowSelection",callback:t=>{this.updateSelectionType(t)}},{subStateName:"columnDivider",parentStateName:"columnDivider"},{subStateName:"density",parentStateName:"density"},{subStateName:"draggable",parentStateName:"rowDraggable"}]}),this.updateSelectionType=t=>{if(t){const{type:e}=t;this.selectionType=e}else this.selectionType=null}}}ui([s()],vi.prototype,"host",void 0),ui([s({writable:!0})],vi.prototype,"selectionType",void 0),ui([s({writable:!0})],vi.prototype,"paddingX",void 0),ui([s({writable:!0})],vi.prototype,"columnDivider",void 0),ui([s({writable:!0})],vi.prototype,"density",void 0),ui([s({writable:!0})],vi.prototype,"hasExpandableRow",void 0),ui([s({writable:!0})],vi.prototype,"draggable",void 0);var bi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const fi=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableFootRowStateController=new vi,this.vegaTableFootRowRenderer=new pi,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.pageResizeObserverSlimmer=new ct,this.vegaTableRenderInputConsumerSlimmer=new ze(z),this.currentBreakpoint=rt(),this.hasExpandableRow=!1}render(){var e,i,l,n,r;return u(t("slot",null)),lt(t(o,{class:{"column-divider":this.columnDivider,[`density-${tt.formatCustom(this.density)}`]:!0},style:{"--row-left-padding":`${null!==(i=null===(e=this.renderInput)||void 0===e?void 0:e.leftPaddingPx)&&void 0!==i?i:0}px`,"--row-right-padding":`${null!==(n=null===(l=this.renderInput)||void 0===l?void 0:l.rightPaddingPx)&&void 0!==n?n:0}px`,"--row-draggable-width":(null===(r=this.renderInput)||void 0===r?void 0:r.showDraggableCell)?"16px":"0px"}},this.vegaTableFootRowRenderer.render()),this.host)}get host(){return r(this)}};bi([b()],fi.prototype,"globalSlimmers",void 0),bi([h()],fi.prototype,"vegaTableFootRowStateController",void 0),bi([h()],fi.prototype,"vegaTableFootRowRenderer",void 0),bi([h()],fi.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),bi([h()],fi.prototype,"pageResizeObserverSlimmer",void 0),bi([h()],fi.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),fi.style=":host{display:contents}td{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));padding:0px;vertical-align:middle}td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}td.pinned-left,td.pinned-right{position:sticky;z-index:1}td.pinned-left:first-of-type{left:0}td.vega-table-draggable-column.pinned-left{left:var(--row-left-padding, 0px)}td.vega-table-selection-column.pinned-left{left:calc(var(--row-left-padding, 0px) + var(--row-draggable-width, 0px))}td.vega-table-expand-action-column.pinned-right{right:var(--row-right-padding, 0px)}td.pinned-right:last-of-type{right:0}:host(.density-default) td:first-of-type,:host(.density-relaxed) td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-default) td:last-of-type,:host(.density-relaxed) td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-compact) td:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.density-compact) td:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}.vega-table-expand-action-column{width:40px;min-width:40px}.vega-table-selection-column{width:40px;min-width:40px}";var gi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class wi extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"fixed",parentStateName:"scrollConfig",callback:t=>{this.fixed=t&&t.maxHeight&&!1!==t.fixedHeader}}]})}}gi([s()],wi.prototype,"host",void 0),gi([s({writable:!0})],wi.prototype,"fixed",void 0);var mi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const xi=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableHeadStateController=new wi,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.headCellEventPrevent=new pt([_],(()=>this.host)),this.fixed=!1,this.handleTableHeadRefChange=t=>{this.tableHeadRef&&wt.removeZIndex(this.tableHeadRef,"base"),this.fixed&&wt.setZIndex(t,"base"),this.tableHeadRef=t}}connectedCallback(){this.tableHeadRef&&this.fixed&&wt.setZIndex(this.tableHeadRef,"base")}disconnectedCallback(){wt.removeZIndex(this.tableHeadRef,"base")}render(){return lt(t(o,{class:{"fixed-header":this.fixed},ref:t=>this.handleTableHeadRefChange(t)},t("thead",null,t("slot",null))),this.host)}get host(){return r(this)}};mi([b()],xi.prototype,"globalSlimmers",void 0),mi([h()],xi.prototype,"vegaTableHeadStateController",void 0),mi([h()],xi.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),mi([h()],xi.prototype,"headCellEventPrevent",void 0),xi.style=":host{display:table-header-group;border-top-right-radius:12px;border-bottom-right-radius:12px;border-top-left-radius:12px;border-bottom-left-radius:12px}:host thead{display:contents}:host(.fixed-header){position:sticky;top:0px}";var yi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ri extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"density",parentStateName:"density"},{subStateName:"columnDivider",parentStateName:"columnDivider",callback:t=>{const e=this.host.parentElement;if(e){const i=e.querySelector("vega-table-head-cell:last-of-type");this.columnDivider=t&&i!==this.host}}}]})}}yi([s({writable:!0})],Ri.prototype,"density",void 0),yi([s({writable:!0})],Ri.prototype,"columnDivider",void 0);var Ci=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Si extends a{render(){if(!this.sorter)return;const{icon:e,color:i}=Si.SORT_ICON_MAP[this.sortOrder||"default"];return t("span",{class:"vega-table-column-sorter"},t("vega-icon",{color:i,icon:Ct.getIconKey(e),size:"size-12"}))}}Si.SORT_ICON_MAP={asc:{icon:"circle-arrow-up",color:"text-link"},desc:{icon:"circle-arrow-down",color:"text-link"},default:{icon:"arrow-up-arrow-down",color:"text-secondary"}},Ci([s()],Si.prototype,"sorter",void 0),Ci([s()],Si.prototype,"sortOrder",void 0);var ki=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ei extends a{disconnectedCallback(){const t=k(this.host,"vega-table-head");t&&w.unregister(D.getSubject(t,V),this.observer)}componentWillLoad(){const t=k(this.host,"vega-table-head");t&&(this.hostTable=k(t,"vega-table"),this.isTemplateRenderMode=this.checkIsTemplateRenderMode(),this.observer=new S(this.isAcceptableObserver.bind(this),this.observerListener.bind(this)),w.register(D.getSubject(t,V),this.observer))}notifyOtherHeadCellOnClickSort(){const t=k(this.host,"vega-table-head");t&&w.notify(D.getSubject(t,V),{host:this.host})}isAcceptableObserver(t){return t.host!==this.host}observerListener(){var t;this.isTemplateRenderMode&&"single"===(null===(t=this.hostTable.sortConfig)||void 0===t?void 0:t.type)&&(this.sortOrder=void 0)}checkIsTemplateRenderMode(){return Array.from(this.hostTable.children).some((t=>t.tagName.startsWith("VEGA-TABLE-")))}}ki([s()],Ei.prototype,"host",void 0),ki([s({writable:!0})],Ei.prototype,"sortOrder",void 0),ki([s()],Ei.prototype,"sortConfig",void 0),ki([c("disconnectedCallback")],Ei.prototype,"disconnectedCallback",null),ki([c("componentWillLoad")],Ei.prototype,"componentWillLoad",null);class ji extends a{notifyTemplateHeadStructureChange(){const t=k(this.host,"vega-table-head");t&&w.notify(D.getSubject(t,P),{host:this.host})}}!function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)}([s()],ji.prototype,"host",void 0);var Di=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ti=class{constructor(t){l(this,t),this.vegaClick=n(this,"vegaClick",7),this.click=n(this,"click",7),this.globalSlimmers=new Map,this.clickEventEmitter=ut(Ti,$),this.vegaTableHeadCellStateController=new Ri,this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.sortIconRenderer=new Si,this.vegaTableHeadCellSortConfigController=new Ei,this.vegaTableHeadCellTemplateStructureController=new ji,this.vegaTableRenderInputConsumerSlimmer=new ze(W),this.currentBreakpoint=rt(),this.handleSort=t=>{this.sortOrder=this.getNextSortOrder(this.sortOrder),this.clickEventEmitter.emit({sortOrder:this.sortOrder},t),this.vegaTableHeadCellSortConfigController.notifyOtherHeadCellOnClickSort()},this.getNextSortOrder=t=>{var e;const i=xt.isEnabled("VEGA_TABLE.REVERSE_SORT_ORDER")?["asc","desc"]:["desc","asc"],o=(null===(e=this.sortConfig)||void 0===e?void 0:e.disableUnsorted)?i:[...i,null];return o[(o.indexOf(t)+1)%o.length]}}watchPinned(){this.vegaTableHeadCellTemplateStructureController.notifyTemplateHeadStructureChange()}watchGroupKey(){this.vegaTableHeadCellTemplateStructureController.notifyTemplateHeadStructureChange()}watchParentGroupKey(){this.vegaTableHeadCellTemplateStructureController.notifyTemplateHeadStructureChange()}render(){var e,i,l,n,r,s,a,d,c,h,p,u;const v=this.renderInput,b=null==v?void 0:v.pinned,f=null!==(e=null==v?void 0:v.leftOffsetPx)&&void 0!==e?e:0,g=null!==(i=null==v?void 0:v.rightOffsetPx)&&void 0!==i?i:0,w=this.sorter?{role:"button",onKeyDown:Rt(),tabIndex:0,onClick:t=>this.handleSort(t)}:null;return lt(t(o,{class:{[`density-${tt.formatCustom(this.density)}`]:!0,sortable:!!this.sorter,"column-divider":this.columnDivider}},t("th",Object.assign({class:{"vega-table-cell":!0,"pinned-left":"left"===b,"pinned-right":"right"===b,"break-word":!xt.isEnabled("VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE"),"is-group-cell":null===(l=this.renderInput)||void 0===l?void 0:l.headHasGroupColumn,"hide-right-border":(null===(n=this.renderInput)||void 0===n?void 0:n.isViewEnd)||(null===(r=this.renderInput)||void 0===r?void 0:r.isNoPinnedEnd)||(null===(s=this.renderInput)||void 0===s?void 0:s.isVisibleRightEndPinned),"right-divider":(null===(a=this.renderInput)||void 0===a?void 0:a.isLeftEndPinned)||(null===(d=this.renderInput)||void 0===d?void 0:d.isVisibleLeftEndPinned),"left-divider":(null===(c=this.renderInput)||void 0===c?void 0:c.isRightStartPinned)||(null===(h=this.renderInput)||void 0===h?void 0:h.isVisibleRightStartPinned),[Le(this.breakpoint,"v-table-cell")]:!0}},w,{colSpan:null===(p=this.renderInput)||void 0===p?void 0:p.colSpan,rowSpan:null===(u=this.renderInput)||void 0===u?void 0:u.rowSpan,style:{width:this.width,"--pinned-offset-left":"left"===b?`${f}px`:null,"--pinned-offset-right":"right"===b?`${g}px`:null}}),t("div",{class:E(["vega-table-column",this.textAlign])},t("span",{class:"vega-table-column-label"},t("slot",null)),this.sortIconRenderer.render()))),this.host)}get host(){return r(this)}static get watchers(){return{pinned:["watchPinned"],groupKey:["watchGroupKey"],parentGroupKey:["watchParentGroupKey"]}}};Ct.register({"chevron-up":St,"chevron-down":kt,"arrow-up-arrow-down":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M489 377c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-55 55V56c0-13.3-10.7-24-24-24s-24 10.7-24 24V398.1l-55-55c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l96 96c9.4 9.4 24.6 9.4 33.9 0l96-96zM137 39c-9.4-9.4-24.6-9.4-33.9 0L7 135c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l55-55V456c0 13.3 10.7 24 24 24s24-10.7 24-24V113.9l55 55c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L137 39z"/></svg>'},"circle-arrow-down":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM127 281c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l71 71L232 136c0-13.3 10.7-24 24-24s24 10.7 24 24l0 182.1 71-71c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 393c-9.4 9.4-24.6 9.4-33.9 0L127 281z"/></svg>'},"circle-arrow-up":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM385 231c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-71-71V376c0 13.3-10.7 24-24 24s-24-10.7-24-24V193.9l-71 71c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 119c9.4-9.4 24.6-9.4 33.9 0L385 231z"/></svg>'}}),Di([b()],Ti.prototype,"globalSlimmers",void 0),Di([h()],Ti.prototype,"clickEventEmitter",void 0),Di([h()],Ti.prototype,"vegaTableHeadCellStateController",void 0),Di([h()],Ti.prototype,"pageResizeObserverSlimmer",void 0),Di([h()],Ti.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Di([h()],Ti.prototype,"sortIconRenderer",void 0),Di([h()],Ti.prototype,"vegaTableHeadCellSortConfigController",void 0),Di([h()],Ti.prototype,"vegaTableHeadCellTemplateStructureController",void 0),Di([h()],Ti.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Ti.style=':host .vega-table-cell.v-hidden{display:none}@media (min-width: 320px){:host .vega-table-cell.S\\:v-table-cell{display:table-cell}}@media (min-width: 768px){:host .vega-table-cell.M\\:v-table-cell{display:table-cell}}@media (min-width: 1024px){:host .vega-table-cell.L\\:v-table-cell{display:table-cell}}@media (min-width: 1440px){:host .vega-table-cell.XL\\:v-table-cell{display:table-cell}}:host{display:contents}:host(.sortable){cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.sortable:hover){background-color:rgba(var(--v-bg-table-row-hover, 241, 248, 251, 1))}th{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:left;vertical-align:middle;padding:0px;padding:12px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){th{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){th{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){th{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}th.break-word{word-break:break-word}.vega-table-column{display:flex;align-items:center}.vega-table-column.center{justify-content:center;text-align:center}.vega-table-column.right{justify-content:flex-end;text-align:right}.vega-table-column.left{justify-content:flex-start;text-align:left}.vega-table-column .vega-table-column-label{min-width:0px}.vega-table-column .vega-table-column-sorter{display:flex;align-items:center;justify-content:center;padding:2px;margin-left:8px;cursor:pointer;outline:none}:host(.density-default) .vega-table-cell{padding:12px}:host(.density-compact) .vega-table-cell{padding:4px}:host(.density-relaxed) .vega-table-cell{padding:16px}:host(.column-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}:host .vega-table-cell.pinned-left{position:sticky;z-index:1;left:var(--pinned-offset-left, 0)}:host .vega-table-cell.pinned-right{position:sticky;z-index:1;right:var(--pinned-offset-right, 0)}:host .vega-table-cell.is-group-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-bottom-width:1px;border-right-style:solid;border-bottom-style:solid}:host .vega-table-cell.hide-right-border{border-right-width:0px}:host .vega-table-cell.bottom-border{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host .vega-table-cell.right-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:2px;border-right-style:solid}:host .vega-table-cell.left-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-left-width:2px;border-left-style:solid}';var Oi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ai extends a{constructor(){super(...arguments),this.renderHeaderSelectionCell=e=>{if(e)return e.showSelectionCell&&t("th",{rowSpan:e.startRowSpan,class:{"vega-table-selection-column":!0,hidden:e.isStartHidden,"pinned-left":e.hasLeftPinnedColumn}},!this.hideSelectAll&&t("div",{class:"vega-table-checkbox-wrapper"},t("vega-checkbox",{size:"small",disabled:this.isEmptyTable||this.selectAllDisabled,checked:this.checkedAll,onClick:this.handleClick,ref:t=>{T.addUniqueObserverToNode(t,_,this.handleSelectAll)}})))},this.handleSelectAll=t=>{if("vegaChange"===t.eventName){const e=t.detail;et(e)&&e!==this.checkedAll&&w.notify(y,{host:this.host,checked:e})}},this.renderHeaderDraggableCell=e=>{if(e)return e.showDraggableCell&&t("th",{rowSpan:e.startRowSpan,class:{"vega-table-draggable-column":!0,hidden:e.isStartHidden,"pinned-left":e.hasLeftPinnedColumn}})},this.renderHeaderExpandableCell=e=>{if(e)return e.showExpandActionCell&&t("th",{rowSpan:e.endRowSpan,class:{"vega-table-expand-action-column":!0,hidden:e.isEndHidden,"pinned-right":e.hasRightPinnedColumn}})},this.handleClick=t=>{t.stopPropagation(),O.call(D.getSubject(k(this.host,"vega-table"),M),{host:this.host,checked:!this.checkedAll}).defaultPrevented&&t.preventDefault()}}connectedCallback(){}disconnectedCallback(){}componentDidLoad(){}render(){var e,i;const o=this.renderInput;return t("tr",{class:{"is-group-row":!!(null==o?void 0:o.startRowSpan),"is-pinned-row":(null==o?void 0:o.hasLeftPinnedColumn)||(null==o?void 0:o.hasRightPinnedColumn)}},t("th",{style:{width:null===(e=this.paddingX)||void 0===e?void 0:e[0]},rowSpan:null==o?void 0:o.startRowSpan,class:{hidden:null==o?void 0:o.isStartHidden,"pinned-left":null==o?void 0:o.hasLeftPinnedColumn}}),this.renderHeaderDraggableCell(o),this.renderHeaderSelectionCell(o),t("slot",null),this.renderHeaderExpandableCell(o),t("th",{style:{width:null===(i=this.paddingX)||void 0===i?void 0:i[1]},rowSpan:null==o?void 0:o.endRowSpan,class:{hidden:null==o?void 0:o.isEndHidden,"pinned-right":null==o?void 0:o.hasRightPinnedColumn}}))}}Oi([s()],Ai.prototype,"host",void 0),Oi([s()],Ai.prototype,"paddingX",void 0),Oi([s()],Ai.prototype,"hideSelectAll",void 0),Oi([s()],Ai.prototype,"selectAllDisabled",void 0),Oi([s()],Ai.prototype,"checkedAll",void 0),Oi([s()],Ai.prototype,"isEmptyTable",void 0),Oi([s()],Ai.prototype,"isTemplateRenderMode",void 0),Oi([s()],Ai.prototype,"renderInput",void 0),Oi([c("connectedCallback")],Ai.prototype,"connectedCallback",null),Oi([c("disconnectedCallback")],Ai.prototype,"disconnectedCallback",null),Oi([c("componentDidLoad")],Ai.prototype,"componentDidLoad",null);var Li=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Mi extends a{connectedCallback(){this.initRowSelectionAllObserver()}disconnectedCallback(){w.unregister(y,this.rowSelectionAllObserver)}initRowSelectionAllObserver(){this.rowSelectionAllObserver=new S(Fe.bind({host:this.host}),(t=>{this.checkedAll=t.noneChecked||!1!==t.checked?t.checked:null})),w.register(y,this.rowSelectionAllObserver)}}Li([s()],Mi.prototype,"host",void 0),Li([s({writable:!0})],Mi.prototype,"checkedAll",void 0),Li([c("connectedCallback")],Mi.prototype,"connectedCallback",null),Li([c("disconnectedCallback")],Mi.prototype,"disconnectedCallback",null);var Ni=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ii extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"hasExpandableRow",parentStateName:"hasExpandableRow"},{subStateName:"paddingX",parentStateName:"paddingX",callback:t=>{const e=k(this.host,"vega-table");0!==e.dataSource.length&&0!==e.columns.length||(this.paddingX=t)}},{subStateName:"selectionType",parentStateName:"rowSelection",callback:t=>{this.updateSelectionType(t)}},{subStateName:"columnDivider",parentStateName:"columnDivider"},{subStateName:"density",parentStateName:"density"},{subStateName:"isTemplateRenderMode",parentStateName:"isTemplateRenderMode"},{subStateName:"isEmptyTable",parentStateName:"currentData",callback:t=>{this.isEmptyTable=0===t.length}},{subStateName:"draggable",parentStateName:"rowDraggable"}]}),this.updateSelectionType=t=>{if(t){const{type:e="multiple"}=t;this.selectionType=e}else this.selectionType=null}}}Ni([s()],Ii.prototype,"host",void 0),Ni([s({writable:!0})],Ii.prototype,"hasExpandableRow",void 0),Ni([s({writable:!0})],Ii.prototype,"selectionType",void 0),Ni([s({writable:!0})],Ii.prototype,"paddingX",void 0),Ni([s({writable:!0})],Ii.prototype,"columnDivider",void 0),Ni([s({writable:!0})],Ii.prototype,"density",void 0),Ni([s({writable:!0})],Ii.prototype,"isTemplateRenderMode",void 0),Ni([s({writable:!0})],Ii.prototype,"isEmptyTable",void 0),Ni([s({writable:!0})],Ii.prototype,"draggable",void 0);var Wi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Bi=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableHeadRowStateController=new Ii,this.vegaTableHeadRowRenderer=new Ai,this.vegaTableHeadRowController=new Mi,this.headCellEventPrevent=new pt([$],(()=>this.host),void 0,!0),this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.vegaTableRenderInputConsumerSlimmer=new ze(z),this.currentBreakpoint=rt(),this.hasExpandableRow=!1}render(){var e,i,l,n,r;return u(t("slot",null)),lt(t(o,{class:{"column-divider":this.columnDivider,[`density-${tt.formatCustom(this.density)}`]:!0},style:{"--row-left-padding":`${null!==(i=null===(e=this.renderInput)||void 0===e?void 0:e.leftPaddingPx)&&void 0!==i?i:0}px`,"--row-right-padding":`${null!==(n=null===(l=this.renderInput)||void 0===l?void 0:l.rightPaddingPx)&&void 0!==n?n:0}px`,"--row-draggable-width":(null===(r=this.renderInput)||void 0===r?void 0:r.showDraggableCell)&&!this.renderInput.isStartHidden?"16px":"0px"}},this.vegaTableHeadRowRenderer.render()),this.host)}get host(){return r(this)}};Wi([b()],Bi.prototype,"globalSlimmers",void 0),Wi([h()],Bi.prototype,"vegaTableHeadRowStateController",void 0),Wi([h()],Bi.prototype,"vegaTableHeadRowRenderer",void 0),Wi([h()],Bi.prototype,"vegaTableHeadRowController",void 0),Wi([h()],Bi.prototype,"headCellEventPrevent",void 0),Wi([h()],Bi.prototype,"pageResizeObserverSlimmer",void 0),Wi([h()],Bi.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Wi([h()],Bi.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Bi.style=":host{display:table-row}:host tr{display:contents}th{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));padding:0px;vertical-align:middle}th:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}th:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.column-divider) ::slotted(vega-table-head-cell:not(:last-of-type)){border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}.vega-table-checkbox-wrapper{display:flex;align-items:center;justify-content:center}:host(.density-default) th:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-default) th:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-compact) th:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.density-compact) th:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}:host(.density-relaxed) th:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-relaxed) th:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}.vega-table-expand-action-column{width:40px;min-width:40px}.vega-table-selection-column{width:40px;min-width:40px}:host tr.is-group-row th{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host tr.is-group-row th.hidden{display:none}:host tr.is-group-row th.vega-table-selection-column{border-right-width:1px;border-right-style:solid}:host tr.is-group-row th:first-of-type{border-top-left-radius:0px;border-bottom-left-radius:0px}:host tr.is-group-row th:last-of-type{border-top-right-radius:0px;border-bottom-right-radius:0px}:host tr.is-pinned-row th.pinned-left,:host tr.is-pinned-row th.pinned-right{position:sticky;z-index:1}:host tr.is-pinned-row th.pinned-left.pinned-left:first-of-type,:host tr.is-pinned-row th.pinned-right.pinned-left:first-of-type{left:0px}:host tr.is-pinned-row th.pinned-left.vega-table-draggable-column.pinned-left,:host tr.is-pinned-row th.pinned-right.vega-table-draggable-column.pinned-left{left:var(--row-left-padding, 8px)}:host tr.is-pinned-row th.pinned-left.vega-table-selection-column.pinned-left,:host tr.is-pinned-row th.pinned-right.vega-table-selection-column.pinned-left{left:calc(var(--row-left-padding, 8px) + var(--row-draggable-width, 0px))}:host tr.is-pinned-row th.pinned-left.vega-table-expand-action-column.pinned-right,:host tr.is-pinned-row th.pinned-right.vega-table-expand-action-column.pinned-right{right:var(--row-right-padding, 8px)}:host tr.is-pinned-row th.pinned-left.pinned-right:last-of-type,:host tr.is-pinned-row th.pinned-right.pinned-right:last-of-type{right:0px}";var zi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ki extends a{constructor(){super(...arguments),this.renderDragIcon=()=>{const e=this.renderInput;return(null==e?void 0:e.showDraggableCell)&&t("td",{class:{"vega-table-draggable-column":!0,"pinned-left":e.hasLeftPinnedColumn}},t("vega-flex",{alignItems:"center"},t("vega-icon",{icon:Ct.getIconKey("grip-dots-vertical"),color:"text-link"})))},this.renderRowSelection=()=>{const e=this.renderInput;if(null==e?void 0:e.showSelectionCell)return t("td",{class:{"vega-table-selection-column":!0,"pinned-left":e.hasLeftPinnedColumn}},t("div",{class:"vega-table-checkbox-wrapper"},t("vega-checkbox",{size:"small",checked:this.checked,onClick:this.handleClick,ref:t=>{T.addUniqueObserverToNode(t,_,this.onRowSelectionChange)}})))},this.renderExpandIcon=()=>{const e=this.renderInput;return(null==e?void 0:e.showExpandActionCell)&&t("td",{class:{"vega-table-expand-action-column":!0,"pinned-right":e.hasRightPinnedColumn}},t("div",{class:"vega-table-expand-icon-wrapper"},this.expandable&&t("vega-icon",{icon:Ct.getIconKey("chevron-down"),color:"text-link",onClick:this.onExpandIconClick})))},this.onRowClick=()=>{this.vegaTableRowClickController.handleRowClick()},this.onRowSelectionChange=t=>{"vegaChange"===t.eventName&&this.vegaTableRowSelectionController.handleRowSelect(t.detail)},this.handleClick=t=>{t.stopPropagation(),O.call(D.getSubject(this.parentTableRef,L),{host:this.host,rowKey:this.rowKey,checked:!this.checked}).defaultPrevented&&t.preventDefault()},this.onExpandIconClick=async t=>{t.stopPropagation();const e=this.expandEventEmitter.emit({expanded:!this.expanded,rowKey:this.rowKey});e&&!e.defaultPrevented&&this.vegaTableRowExpandController.handleExpandIconClick()}}connectedCallback(){this.setParentTableRef()}componentDidRender(){var t,e;const i=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".vega-table-draggable-column");this.host.style.setProperty("--row-draggable-width",`${null!==(e=null==i?void 0:i.getBoundingClientRect().width)&&void 0!==e?e:0}px`)}getParentTableRef(){return this.parentTableRef}render(){var e,o;const l=this.renderInput;return t(i,null,this.renderExpandRowSpace(this.rowKey),t("tr",{class:{"vega-table-row":!0,checked:this.checked,clickable:this.clickable,"current-clicked-row":this.clicked,"expand-row":this.expanded},onClick:this.clickable?this.onRowClick:null},t("td",{class:{"pinned-left":null==l?void 0:l.hasLeftPinnedColumn},style:{width:null===(e=this.paddingX)||void 0===e?void 0:e[0]}}),this.renderDragIcon(),this.renderRowSelection(),t("slot",null),this.renderExpandIcon(),t("td",{class:{"pinned-right":null==l?void 0:l.hasRightPinnedColumn},style:{width:null===(o=this.paddingX)||void 0===o?void 0:o[1]}})))}renderExpandRowSpace(e){return this.expandable&&t("tr",{key:`vega-table-expand-row-space-${e}`,class:"expand-row-space"})}setParentTableRef(){this.parentTableRef=k(this.host,"vega-table")}}Ct.register({"chevron-down":kt,"grip-dots-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M32 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm0 160a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM64 416A32 32 0 1 0 0 416a32 32 0 1 0 64 0zm96-288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 128a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM160 448a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></svg>'}}),zi([s()],Ki.prototype,"host",void 0),zi([s()],Ki.prototype,"rowKey",void 0),zi([s()],Ki.prototype,"checked",void 0),zi([s()],Ki.prototype,"clickable",void 0),zi([s()],Ki.prototype,"clicked",void 0),zi([s()],Ki.prototype,"expanded",void 0),zi([s()],Ki.prototype,"paddingX",void 0),zi([s()],Ki.prototype,"expandable",void 0),zi([s()],Ki.prototype,"vegaClick",void 0),zi([s()],Ki.prototype,"renderInput",void 0),zi([s()],Ki.prototype,"vegaTableRowSelectionController",void 0),zi([s()],Ki.prototype,"vegaTableRowExpandController",void 0),zi([s()],Ki.prototype,"vegaTableRowClickController",void 0),zi([s()],Ki.prototype,"expandEventEmitter",void 0),zi([c("connectedCallback")],Ki.prototype,"connectedCallback",null),zi([c("componentDidRender")],Ki.prototype,"componentDidRender",null);var Gi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Pi extends a{constructor(){super(...arguments),this.handleRowSelect=t=>{this.checked=t,w.notify(x,{host:this.host,checked:t,rowKey:this.rowKey})}}connectedCallback(){this.initRowSelectionObserver()}disconnectedCallback(){w.unregister(y,this.rowSelectionAllObserver),w.unregister(x,this.rowSelectionObserver)}setChecked(t){this.checked=t}initRowSelectionObserver(){this.rowSelectionAllObserver=new S(Fe.bind(this),(t=>{(t.checked||!1===t.checked&&t.noneChecked)&&(this.checked=t.checked)})),w.register(y,this.rowSelectionAllObserver),this.rowSelectionObserver=new S(Fe.bind(this),(t=>{t.rowKey===this.rowKey&&(this.checked=t.checked)})),w.register(x,this.rowSelectionObserver)}}Gi([s()],Pi.prototype,"host",void 0),Gi([s()],Pi.prototype,"selectionType",void 0),Gi([s()],Pi.prototype,"rowKey",void 0),Gi([s({writable:!0})],Pi.prototype,"checked",void 0),Gi([c("connectedCallback")],Pi.prototype,"connectedCallback",null),Gi([c("disconnectedCallback")],Pi.prototype,"disconnectedCallback",null);var Vi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class $i extends a{connectedCallback(){this.initRowExpandObserver()}disconnectedCallback(){w.unregister(m,this.rowExpandObserver)}handleExpandIconClick(){O.call(D.getSubject(this.vegaTableRowRenderer.getParentTableRef(),A),{host:this.host,rowKey:this.rowKey,expanded:!this.expanded}).defaultPrevented||(this.expanded=!this.expanded,w.notify(m,{host:this.host,rowKey:this.rowKey,expanded:this.expanded}))}initRowExpandObserver(){this.rowExpandObserver=new S(Fe.bind({host:this.host}),(t=>{t.rowKey===this.rowKey&&(this.expanded=t.expanded)})),w.register(m,this.rowExpandObserver)}}Vi([s()],$i.prototype,"host",void 0),Vi([s()],$i.prototype,"rowKey",void 0),Vi([s()],$i.prototype,"expandable",void 0),Vi([s({writable:!0})],$i.prototype,"expanded",void 0),Vi([s()],$i.prototype,"vegaTableRowRenderer",void 0),Vi([c("connectedCallback")],$i.prototype,"connectedCallback",null),Vi([c("disconnectedCallback")],$i.prototype,"disconnectedCallback",null);var _i=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Hi extends a{connectedCallback(){this.initRowClickObserver()}disconnectedCallback(){w.unregister(R,this.rowClickObserver)}handleRowClick(){O.call(D.getSubject(this.vegaTableRowRenderer.getParentTableRef(),L),{host:this.host,rowKey:this.rowKey,checked:!this.checked}).defaultPrevented||(w.notify(R,{host:this.host,rowKey:this.rowKey}),this.clickEventEmitter.emit({rowKey:this.rowKey}))}initRowClickObserver(){this.rowClickObserver=new S(He.bind(this),(t=>{this.clicked=t.host===this.host,"single"===this.selectionType&&this.vegaTableRowSelectionController.setChecked(t.host===this.host&&!this.checked)})),w.register(R,this.rowClickObserver)}}_i([s()],Hi.prototype,"host",void 0),_i([s()],Hi.prototype,"rowKey",void 0),_i([s({writable:!0})],Hi.prototype,"clicked",void 0),_i([s()],Hi.prototype,"checked",void 0),_i([s()],Hi.prototype,"selectionType",void 0),_i([s()],Hi.prototype,"vegaClick",void 0),_i([s()],Hi.prototype,"vegaTableRowSelectionController",void 0),_i([s()],Hi.prototype,"clickEventEmitter",void 0),_i([s()],Hi.prototype,"vegaTableRowRenderer",void 0),_i([c("connectedCallback")],Hi.prototype,"connectedCallback",null),_i([c("disconnectedCallback")],Hi.prototype,"disconnectedCallback",null);var Fi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Xi extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"expandable",parentStateName:"expandableRows",callback:t=>{this.expandable=t.includes(this.rowKey)}},{subStateName:"hasExpandableRow",parentStateName:"hasExpandableRow"},{subStateName:"clickable",parentStateName:"rowClickable"},{subStateName:"paddingX",parentStateName:"paddingX",callback:t=>{const e=k(this.host,"vega-table");0!==e.dataSource.length&&0!==e.columns.length||(this.paddingX=t)}},{subStateName:"selectionType",parentStateName:"rowSelection",callback:t=>{if(t){const{type:e="multiple"}=t;this.selectionType=e}else this.selectionType=null}},{subStateName:"columnDivider",parentStateName:"columnDivider"},{subStateName:"density",parentStateName:"density"},{subStateName:"draggable",parentStateName:"rowDraggable"}]})}watchSelectionType(){this.updateClickable()}handleComponentWillLoad(){this.updateClickable()}updateClickable(){this.selectionType&&(this.clickable="single"===this.selectionType||this.clickable)}}Fi([s()],Xi.prototype,"host",void 0),Fi([s({writable:!0})],Xi.prototype,"expandable",void 0),Fi([s({writable:!0})],Xi.prototype,"hasExpandableRow",void 0),Fi([s({writable:!0})],Xi.prototype,"clickable",void 0),Fi([s({writable:!0})],Xi.prototype,"paddingX",void 0),Fi([s({writable:!0})],Xi.prototype,"selectionType",void 0),Fi([s({writable:!0})],Xi.prototype,"columnDivider",void 0),Fi([s({writable:!0})],Xi.prototype,"density",void 0),Fi([s({writable:!0})],Xi.prototype,"draggable",void 0),Fi([s()],Xi.prototype,"rowKey",void 0),Fi([c("watchSelectionType")],Xi.prototype,"watchSelectionType",null),Fi([c("componentWillLoad")],Xi.prototype,"handleComponentWillLoad",null);var Ui=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Yi=class{constructor(t){l(this,t),this.vegaClick=n(this,"vegaClick",7),this.click=n(this,"click",7),this.vegaExpand=n(this,"vegaExpand",7),this.expand=n(this,"expand",7),this.globalSlimmers=new Map,this.vegaTableRowRenderer=new Ki,this.vegaTableRowSelectionController=new Pi,this.vegaTableRowExpandController=new $i,this.vegaTableRowClickController=new Hi,this.vegaTableRowStateController=new Xi,this.vegaTableRenderInputConsumerSlimmer=new ze(z),this.clickEventEmitter=ut(Yi,$),this.expandEventEmitter=ut(Yi,F),this.checkboxValueChangeEventPrevent=new pt([$],(()=>this.host),void 0,!0),this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.checkedNotifySlimmer=ht(Yi,"checked","watchChecked"),this.expandedNotifySlimmer=ht(Yi,"expanded","watchExpanded"),this.stripedNotifySlimmer=ht(Yi,"striped","watchStriped"),this.rowDividerNotifySlimmer=ht(Yi,"rowDivider","watchRowDivider"),this.currentBreakpoint=rt(),this.hasExpandableRow=!1,this.draggable=!1}watchSelectionType(){}watchChecked(){}watchExpanded(){}watchStriped(){}watchRowDivider(){}render(){var e,i,l,n;return u(t("slot",null)),lt(t(o,{class:{"row-divider":this.rowDivider,"column-divider":this.columnDivider,striped:this.striped,[`density-${tt.formatCustom(this.density)}`]:!0},style:{"--row-left-padding":`${null!==(i=null===(e=this.renderInput)||void 0===e?void 0:e.leftPaddingPx)&&void 0!==i?i:0}px`,"--row-right-padding":`${null!==(n=null===(l=this.renderInput)||void 0===l?void 0:l.rightPaddingPx)&&void 0!==n?n:0}px`}},this.vegaTableRowRenderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{selectionType:["watchSelectionType"],checked:["watchChecked"],expanded:["watchExpanded"],striped:["watchStriped"],rowDivider:["watchRowDivider"]}}};Ui([b()],Yi.prototype,"globalSlimmers",void 0),Ui([h()],Yi.prototype,"vegaTableRowRenderer",void 0),Ui([h()],Yi.prototype,"vegaTableRowSelectionController",void 0),Ui([h()],Yi.prototype,"vegaTableRowExpandController",void 0),Ui([h()],Yi.prototype,"vegaTableRowClickController",void 0),Ui([h()],Yi.prototype,"vegaTableRowStateController",void 0),Ui([h()],Yi.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Ui([h()],Yi.prototype,"clickEventEmitter",void 0),Ui([h()],Yi.prototype,"expandEventEmitter",void 0),Ui([h()],Yi.prototype,"checkboxValueChangeEventPrevent",void 0),Ui([h()],Yi.prototype,"pageResizeObserverSlimmer",void 0),Ui([h()],Yi.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ui([h()],Yi.prototype,"checkedNotifySlimmer",void 0),Ui([h()],Yi.prototype,"expandedNotifySlimmer",void 0),Ui([h()],Yi.prototype,"stripedNotifySlimmer",void 0),Ui([h()],Yi.prototype,"rowDividerNotifySlimmer",void 0),Yi.style=":host{display:contents}:host(.v-hidden){display:none}td{padding:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));vertical-align:middle}td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}td.pinned-left,td.pinned-right{position:sticky;z-index:1}td.pinned-left:first-of-type{left:0}td.vega-table-draggable-column.pinned-left{left:var(--row-left-padding, 0px)}td.vega-table-selection-column.pinned-left{left:calc(var(--row-left-padding, 0px) + var(--row-draggable-width, 0px))}td.vega-table-expand-action-column.pinned-right{right:var(--row-right-padding, 0px)}td.pinned-right:last-of-type{right:0}:host(.striped) .vega-table-row:not(.checked):not(.clickable:hover) td{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.checked td{background-color:rgba(var(--v-bg-table-selected-row, 204, 223, 255, 1))}:not(.checked).clickable:hover{cursor:pointer}:not(.checked).clickable:hover td{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}.vega-table-checkbox-wrapper{display:flex;align-items:center;justify-content:center}.vega-table-row .vega-table-expand-icon-wrapper{display:flex;align-items:center;justify-content:center}.vega-table-row .vega-table-expand-icon-wrapper vega-icon{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;cursor:pointer}.vega-table-row.expand-row .vega-table-expand-icon-wrapper vega-icon{transform:rotate(180deg)}:host tr.expand-row td{border-top-width:1px;border-left-width:0px;border-right-width:0px;border-bottom-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1))}:host tr.expand-row td:first-of-type{border-left-width:1px;border-top-width:1px;border-bottom-left-radius:0px}:host tr.expand-row td:last-of-type{border-right-width:1px;border-top-width:1px;border-bottom-right-radius:0px}tr.expand-row-space{display:block;padding-top:8px}:host(.row-divider:not(:last-of-type)) td{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host(.row-divider:not(:last-of-type)) td:first-of-type,:host(.row-divider:not(:last-of-type)) td:last-of-type{border-radius:0px}:host(.density-default) td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-default) td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-default) tr.expand-row-space{display:block;padding-top:8px}:host(.density-compact) td:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.density-compact) td:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}:host(.density-compact) tr.expand-row-space{display:block;padding-top:4px}:host(.density-relaxed) td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-relaxed) td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-relaxed) tr.expand-row-space{display:block;padding-top:12px}.vega-table-expand-action-column{width:40px;min-width:40px}.vega-table-selection-column{width:40px;min-width:40px}.vega-table-draggable-column{width:16px;min-width:16px;cursor:move}";export{Te as vega_table,Ae as vega_table_body,Ge as vega_table_cell,ti as vega_table_expand_row,li as vega_table_foot,ci as vega_table_foot_cell,fi as vega_table_foot_row,xi as vega_table_head,Ti as vega_table_head_cell,Bi as vega_table_head_row,Yi as vega_table_row}
|
|
1
|
+
import{h as t,f as e,F as i,H as o,r as l,c as n,g as r}from"./p-6b2342e0.js";import{c as s,V as a,L as d,M as c,I as h}from"./p-6e1ab235.js";import{m as p,s as u}from"./p-6bd5c49b.js";import{V as v,I as b}from"./p-5c8e4e8f.js";import{g as f}from"./p-a841cf13.js";import{e as g}from"./p-d4ea8e22.js";import{C as w}from"./p-2d0d575f.js";import{m,n as x,o as y,p as R,S as C}from"./p-cb378636.js";import{O as S}from"./p-331a62d5.js";import{f as k,a as E,m as j}from"./p-aa135628.js";import{d as D,D as T}from"./p-36a57431.js";import{r as O}from"./p-77e64f26.js";import{T as A,U as L,W as M,X as N,Y as I,Z as W,_ as B,$ as z,a0 as K,a1 as G,a2 as P,a3 as V}from"./p-53e3f259.js";import{b as $,c as _,a0 as H,e as F,a4 as X,a5 as U,a6 as Y,a7 as q,a8 as Z,a9 as J,aa as Q}from"./p-a83cef5a.js";import{R as tt}from"./p-a2c7a3bc.js";import{i as et,s as it,ap as ot}from"./p-fdbdf12f.js";import{s as lt}from"./p-519a7d55.js";import{g as nt}from"./p-8b5d3a52.js";import{g as rt}from"./p-49a2e141.js";import{M as st}from"./p-78a57a17.js";import{T as at,a as dt}from"./p-52b8f2d2.js";import{P as ct}from"./p-81dd00d0.js";import{c as ht}from"./p-b1557bbe.js";import{C as pt}from"./p-abad8ffd.js";import{c as ut}from"./p-3b6a6f08.js";import{I as vt}from"./p-48e3be6a.js";import{T as bt}from"./p-37714a3a.js";import{S as ft}from"./p-1fb56e14.js";import{c as gt}from"./p-6a334573.js";import{I as wt}from"./p-781fd6e0.js";import{S as mt}from"./p-7d3419c7.js";import{F as xt}from"./p-87a4d75f.js";import{B as yt}from"./p-ed45b3b6.js";import{c as Rt}from"./p-8387896e.js";import{V as Ct}from"./p-44245a36.js";import{c as St}from"./p-1ec763ab.js";import{c as kt}from"./p-613ddaab.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-b438e68b.js";import"./p-affb40e8.js";import"./p-b75ee3ba.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-982747ef.js";import"./p-d1d91f1a.js";import"./p-5c285374.js";class Et{constructor(t,e){this.size=0,this.set=new Set,t&&(this.set=t,this.size=t.size),e&&(this.onMutate=e)}onMutate(t){}add(...t){return this.withMutation((e=>{t.forEach((t=>e.add(t)))}))}clear(){this.withMutation((t=>t.clear()))}delete(t){return this.withMutation((e=>{e.delete(t)}))}withMutation(t){const e=new Set(this.set);t(e);const i=new Et(e,this.onMutate);return this.onMutate(i),i}has(t){return this.set.has(t)}toArray(){return[...this.set]}}const jt=["input","input-select","stepper","checkbox","textarea","combo-box","date-picker","time-picker"];class Dt{constructor(t,e,i,o,l,n,r,s,a,d,c,h,p,u,v,b,f=[]){this.key=t,this.label=e,this.pinned=i,this.colSpan=o,this.rowSpan=l,this.isViewStart=n,this.isViewEnd=r,this.isLeftEndPinned=s,this.isRightStartPinned=a,this.isNoPinnedEnd=d,this.headHasGroupColumn=c,this.headHasPinnedColumn=h,this.headMaxDepth=p,this.level=u,this.columnIndex=v,this.parent=b,this.children=f,this.leftOffsetPx=null,this.rightOffsetPx=null,this.isVisibleLeftEndPinned=!1,this.isVisibleRightStartPinned=!1,this.isVisibleRightEndPinned=!1,this.visibleColSpan=null,this.iteratorCacheMap=new Map,this.leaves=[]}static from(t){const e=[],i=[],o=t.getMaxDepth(),l=t.hasGroupColumn(),n=t.hasLeftPinnedColumn()||t.hasRightPinnedColumn();let r=0;return t.iterator().forEach((t=>{const s=t.level>0?i[t.level-1]:null,a=l&&this.isParentStart(t),d=l&&this.isParentEnd(t),c=new Dt(t.key,t.label,s?s.pinned:t.pinned,l?this.getColSpan(t):null,l?t.isLeaf()?o-t.level:1:null,s?s.isViewStart&&a:a,s?s.isViewEnd&&d:d,s?s.isLeftEndPinned&&d:n&&this.isLeftEndPinned(t),s?s.isRightStartPinned&&a:n&&this.isRightStartPinned(t),s?s.isNoPinnedEnd&&d:n&&this.isNoPinnedEnd(t),l,n,o,t.level,r,s);s?s.children.push(c):e.push(c),i[t.level]=c,i.length=t.level+1,t.isLeaf()&&r++})),e}static withMergedBoundaries(t,e){let i=t.isLeftEndPinned,o=t.isRightStartPinned,l=t.isNoPinnedEnd,n=t.isViewEnd;for(const t of e)i=i||t.isLeftEndPinned,o=o||t.isRightStartPinned,l=l||t.isNoPinnedEnd,n=n||t.isViewEnd;const r=new Dt(t.key,t.label,t.pinned,t.colSpan,t.rowSpan,t.isViewStart,n,i,o,l,t.headHasGroupColumn,t.headHasPinnedColumn,t.headMaxDepth,t.level,t.columnIndex,t.parent,t.children);return r.leftOffsetPx=t.leftOffsetPx,r.rightOffsetPx=t.rightOffsetPx,r.isVisibleLeftEndPinned=t.isVisibleLeftEndPinned,r.isVisibleRightStartPinned=t.isVisibleRightStartPinned,r.isVisibleRightEndPinned=t.isVisibleRightEndPinned,r.visibleColSpan=t.visibleColSpan,r}static isLeftEndPinned(t){const e=t.parent.getOrderedChildren().filter((t=>"left"===t.pinned));return e[e.length-1]===t}static isRightStartPinned(t){return t.parent.getOrderedChildren().filter((t=>"right"===t.pinned))[0]===t}static isNoPinnedEnd(t){const e=t.parent.getOrderedChildren().filter((t=>!t.pinned));return e[e.length-1]===t}static isParentStart(t){return t.parent.getOrderedChildren()[0]===t}static isParentEnd(t){const e=t.parent.getOrderedChildren();return e[e.length-1]===t}static getColSpan(t){const e=t.iterator(),i={};return e.forEach((t=>{i[t.level]=(i[t.level]||0)+1})),Math.max(...Object.values(i))}getLeaves(){if(this.leaves.length>0)return this.leaves;const t=this.iterator().filter((t=>t.isLeaf()));return this.leaves=t,t}iterator(t="dfs"){return"dfs"===t?this.dfsIterator():[]}dfsIterator(){if(this.iteratorCacheMap.has("dfs"))return this.iteratorCacheMap.get("dfs");const t=[];return t.push(this),this.children&&this.children.length>0&&this.children.forEach((e=>{t.push(...e.dfsIterator())})),this.iteratorCacheMap.set("dfs",t),t}isLeaf(){return!this.children||0===this.children.length}}var Tt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ot extends a{constructor(){super(...arguments),this.renderTableCellContent=(e,i,o,l)=>{var n,r;const s=f(i,e.prop),a=this.vegaTableDataSourceController.getRecordKey(i),c=!this.vegaTableDataSourceController.getDataSource().find((t=>this.vegaTableDataSourceController.getRecordKey(t)===a)),h=this.vegaTableEditableController.isEditing(a),p=this.vegaTableEditableController.getRowFormRefMap().get(a);if(!l&&h&&p&&e.renderFormItem)return e.renderFormItem(t,e.prop?s:a,i,o,{rowForm:p,isNewRow:c});if(!l&&h&&p&&e.editable){const t=null===(n=e.formItemProps)||void 0===n?void 0:n.call(e,p,{record:i,index:o}),l=Object.assign({dataVegaForm:(null==t?void 0:t.dataVegaForm)||e.prop,size:"small",value:s},null===(r=e.formItemProps)||void 0===r?void 0:r.call(e,p,{record:i,index:o}));return this.generateEditComponentByType(e.formItemType,l)}return e.render?e.render(t,e.prop?s:a,i,o):"string"==typeof s||"number"==typeof s?String(s):null==s?"":void d.error(`Column ${e.prop}'s value has a wrong type(${typeof i[e.prop]}) in table cell. Only 'VegaTableNode | string | number' can be rendered in table cell`)},this.generateEditComponentByType=(e="input",i)=>{const o=`vega-${e}`,{dataVegaForm:l}=i,n=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(t);l<o.length;l++)e.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(i[o[l]]=t[o[l]])}return i}(i,["dataVegaForm"]);if(this.isVegaTableEditableFieldType(o))return t(o,Object.assign(Object.assign({},n),{"data-vega-form":l}));d.error(`Type must be one of the form field types. [${jt.join(",")}]`)},this.isVegaTableEditableFieldType=t=>t.toUpperCase().startsWith("VEGA")&&new RegExp(jt.join("|"),"i").test(t)}render(e,i,o,l){var n;const r=this.vegaTableBodyColSpanController.findColumn(e),s=null!==(n=null==l?void 0:l.htmlColspan)&&void 0!==n?n:1,a=s>1,d=a&&l?this.getMergedRenderInputForSpan(e,l):e;if(r){const e=this.vegaTableDataSourceController.getRecordKey(i),l=r.ellipsisOptions;return t("vega-table-cell",{key:`${e}_${r.key||r.prop}`,textAlign:r.align,breakpoint:r.breakpoint,overflow:r.overflow,ellipsisShowTooltip:!!(null==l?void 0:l.showTooltip),colSpan:a?s:void 0,ref:t=>{this.vegaTableRenderInputController.addCellRenderInputMap(t,d)}},this.renderTableCellContent(r,i,o,a))}return t("vega-table-cell",{key:e.key,ref:t=>{this.vegaTableRenderInputController.addCellRenderInputMap(t,d)}})}getMergedRenderInputForSpan(t,e){const i=this.vegaTableRenderInputController.getLeafRenderInputs(),o=i.indexOf(t);if(o<0)return t;const l=i.slice(o+1,o+1+e.skipCount);return Dt.withMergedBoundaries(t,l)}}Tt([s()],Ot.prototype,"rowKey",void 0),Tt([s()],Ot.prototype,"vegaTableDataSourceController",void 0),Tt([s()],Ot.prototype,"vegaTableEditableController",void 0),Tt([s()],Ot.prototype,"vegaTableRenderInputController",void 0),Tt([s()],Ot.prototype,"vegaTableBodyColSpanController",void 0);const At={htmlColspan:1,skipCount:0};function Lt(t,e,i,o,l,n,r){var s,a,c;const h=function(t,e,i){const o=null==t?void 0:t.colSpan;return null==o?1:function(t){if(!Number.isFinite(t))return 1;const e=Math.floor(t);return e>=1?e:1}("function"!=typeof o?o:o(t.prop?f(e,t.prop):void 0,e,i))}(t,e,i);if(!h||h<=1)return At;const{span:p,clampReason:u}=function(t,e,i,o){var l,n;const r=null===(l=i[e])||void 0===l?void 0:l.pinned;let s=1;for(let l=1;l<t;l++){const t=i[e+l];if(!t)return{span:s,clampReason:`extends past the end of the row (${i.length} columns total)`};if(o[e+l])return{span:s,clampReason:null};if(t.pinned!==r)return{span:s,clampReason:`crosses a pinned-column boundary (pinned="${null!=r?r:"none"}" → pinned="${null!==(n=t.pinned)&&void 0!==n?n:"none"}")`};s++}return{span:s,clampReason:null}}(h,o,l,r),v=Math.min(h,p);return u&&v<h&&function(t,e,i,o,l){l.has(t)||(l.add(t),d.warn(`[vega-table] colSpan for column "${t}" was clamped from ${e} to ${i} because it ${o}.`))}(null!==(c=null!==(a=null!==(s=t.key)&&void 0!==s?s:t.prop)&&void 0!==a?a:t.label)&&void 0!==c?c:"",h,v,u,n),v<=1?At:{htmlColspan:v,skipCount:v-1}}var Mt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Nt extends a{constructor(){super(...arguments),this.warnedColSpanKeys=new Set,this.lastWarnedColumnsRef=null}resolveRow(t,e,i){this.columns!==this.lastWarnedColumnsRef&&(this.warnedColSpanKeys.clear(),this.lastWarnedColumnsRef=this.columns);const o=i.map((t=>this.isColumnHiddenAtBreakpoint(t))),l=new Array(i.length).fill(null);let n=0;return i.forEach(((r,s)=>{if(n>0)return void n--;const a=this.findColumn(r),d=a?Lt(a,t,e,s,i,this.warnedColSpanKeys,o):{htmlColspan:1,skipCount:0};l[s]=d,n=d.skipCount})),l}findColumn(t){return this.columns.find((e=>e.key===t.key||e.prop===t.key||e.label===t.key))}isColumnHiddenAtBreakpoint(t){const e=this.findColumn(t);return!(!e||!e.breakpoint)&&g.indexOf(this.currentBreakpoint)<g.indexOf(e.breakpoint)}}Mt([s()],Nt.prototype,"columns",void 0),Mt([s()],Nt.prototype,"currentBreakpoint",void 0);var It=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Wt extends a{constructor(){super(...arguments),this.toggleExpandRow=t=>{this.isRowExpandable(t)&&this.handleToggleExpandRow(t,!this.isExpanded(t))},this.openExpandRow=t=>{this.isRowExpandable(t)&&this.handleToggleExpandRow(t,!0)},this.closeExpandRow=t=>{this.isRowExpandable(t)&&this.handleToggleExpandRow(t,!1)},this.closeAllExpandRow=()=>{this.hasExpandableRow&&this.handleCloseAllExpandRow()},this.isExpandableRow=t=>this.expandableRows.includes(this.vegaTableDataSourceController.getRecordKey(t)),this.isExpanded=t=>this.expandedRowKeySet.has(t),this.handleCloseAllExpandRow=()=>{this.expandedRowKeySet.toArray().forEach((t=>{w.notify(m,{host:this.host,rowKey:t,expanded:!1})})),this.expandedRowKeySet.clear()},this.handleToggleExpandRow=(t,e)=>{e?this.expandedRowKeySet.add(t):this.expandedRowKeySet.delete(t),w.notify(m,{host:this.host,rowKey:t,expanded:e})},this.initMutationObserver=()=>{this.mutationObserver=new MutationObserver((async t=>{this.expandRowSlotGuard(t)&&e(this.host)})),this.mutationObserver.observe(this.host,{childList:!0,subtree:!0})},this.expandRowSlotGuard=t=>{const e=this.vegaTableDataSourceController.getCurrentData().map((t=>`${Wt.expandRowSlotNamePrefix}${this.vegaTableDataSourceController.getRecordKey(t)}`)),i=[];for(let o=0;o<t.length;o++)Array.from(t[o].addedNodes).filter((t=>t instanceof HTMLElement&&t.getAttribute("slot"))).forEach((t=>{t.removeAttribute("hidden");const o=t.getAttribute("slot");e.includes(o)?i.push(t):d.warn(`The vega-table expand row slot name '${o}' is not as expected, it must be like: vega-table-expand-row-[rowKey]`)}));return i.length>0}}connectedCallback(){this.initRowExpandObserver()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect(),w.unregister(m,this.expandObserver),O.unRegister(D.getSubject(this.host,A))}componentWillLoad(){this.setExpandableRows()}componentDidLoad(){this.initMutationObserver()}watchRowExpandable(){this.setExpandableRows(),this.handleCloseAllExpandRow()}watchCurrentData(){this.setExpandableRows(),this.clearUnusedExpandRowSlot()}initRowExpandObserver(){this.expandObserver=new S(this.isAcceptableTableRowObserver.bind({host:this.host}),(t=>{t.expanded?this.expandedRowKeySet.add(t.rowKey):this.expandedRowKeySet.delete(t.rowKey)})),w.register(m,this.expandObserver),O.register(D.getSubject(this.host,A),(({rowKey:t,expanded:e})=>this.rowExpandEventEmitter.emit({record:this.vegaTableDataSourceController.getRecordByKey(t),expanded:e})))}isAcceptableTableRowObserver(t){return"VEGA-TABLE-ROW"===t.host.tagName&&this.host===k(t.host,"vega-table")}setExpandableRows(){if("boolean"==typeof this.rowExpandable)this.expandableRows=this.rowExpandable?this.currentData.map((t=>this.vegaTableDataSourceController.getRecordKey(t))):[],this.hasExpandableRow=this.rowExpandable;else if("function"==typeof this.rowExpandable){const t=[];this.currentData.forEach((e=>{const i=this.vegaTableDataSourceController.getRecordKey(e);this.rowExpandable(i)&&t.push(i)})),this.expandableRows=t,this.hasExpandableRow=t.length>0}else this.expandableRows=[],this.hasExpandableRow=!1}isRowExpandable(t){return this.expandableRows.includes(t)}clearUnusedExpandRowSlot(){this.expandedRowKeySet.toArray().forEach((t=>{this.isRowExpandable(t)||this.expandedRowKeySet.delete(t)}))}}Wt.expandRowSlotNamePrefix="vega-table-expand-row-",It([s()],Wt.prototype,"host",void 0),It([s()],Wt.prototype,"expandedRowKeySet",void 0),It([s({writable:!0})],Wt.prototype,"expandableRows",void 0),It([s({writable:!0})],Wt.prototype,"hasExpandableRow",void 0),It([s()],Wt.prototype,"rowExpandable",void 0),It([s()],Wt.prototype,"currentData",void 0),It([s()],Wt.prototype,"rowExpandEventEmitter",void 0),It([s()],Wt.prototype,"vegaTableDataSourceController",void 0),It([c("connectedCallback")],Wt.prototype,"connectedCallback",null),It([c("disconnectedCallback")],Wt.prototype,"disconnectedCallback",null),It([c("componentWillLoad")],Wt.prototype,"componentWillLoad",null),It([c("componentDidLoad")],Wt.prototype,"componentDidLoad",null),It([c("toggleExpandRow")],Wt.prototype,"toggleExpandRow",void 0),It([c("openExpandRow")],Wt.prototype,"openExpandRow",void 0),It([c("closeExpandRow")],Wt.prototype,"closeExpandRow",void 0),It([c("closeAllExpandRow")],Wt.prototype,"closeAllExpandRow",void 0),It([c("watchRowExpandable")],Wt.prototype,"watchRowExpandable",null),It([c("watchCurrentData")],Wt.prototype,"watchCurrentData",null);var Bt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class zt extends a{constructor(){super(...arguments),this.handleRowSelect=(t,e)=>{const i=this.vegaTableDataSourceController.getRecordKey(e);let o=!1;t?this.selectedRowKeySet.has(i)||(this.selectedRowKeySet.add(i),o=!0):this.selectedRowKeySet.has(i)&&(this.selectedRowKeySet.delete(i),o=!0),o&&this.selectChangeEventEmitter.emit({selected:t,record:e,selectedRows:this.getSelectedRecords()})},this.getRowSelectionType=()=>{if(this.rowSelection)return this.rowSelection.type||"multiple"},this.handleSingleRowSelect=t=>{const e=this.vegaTableDataSourceController.getRecordKey(t);this.isChecked(e)?this.handleRowSelect(!1,t):(this.selectedRowKeySet.clear(),this.handleRowSelect(!0,t))},this.isChecked=t=>this.selectedRowKeySet.has(t),this.handleSelectAll=t=>{if(t){const t=this.vegaTableDataSourceController.getAllRecordKeys();this.selectedRowKeySet.add(...t.filter((t=>!this.selectedRowKeySet.has(t))))}else this.isCheckedAll()&&this.selectedRowKeySet.clear()},this.isCheckedAll=()=>this.selectedRowKeySet.size>0&&this.vegaTableDataSourceController.getCurrentData().every((t=>this.selectedRowKeySet.has(this.vegaTableDataSourceController.getRecordKey(t)))),this.setupRowSelection=t=>{this.rowSelection=Object.assign({hideSelectAll:!1,type:"multiple"},t)},this.getSelectedRecords=()=>this.selectedRowKeySet.toArray().map(this.vegaTableDataSourceController.getRecordByKey).filter(Boolean),this.syncUpSelectedKeySetWithCurrentData=t=>{this.selectedRowKeySet.withMutation((e=>{e.clear(),t.forEach((t=>{const i=this.vegaTableDataSourceController.getRecordKey(t);this.selectedRowKeySet.has(i)&&e.add(i)}))}))}}connectedCallback(){this.initRowSelection(),this.initRowClickObserver(),this.initRowSelectionAllObserver()}disconnectedCallback(){w.unregister(x,this.rowSelectionObserver),w.unregister(y,this.rowSelectionAllObserver),w.unregister(R,this.rowClickObserver),O.unRegister(D.getSubject(this.host,L)),O.unRegister(D.getSubject(this.host,M))}componentWillLoad(){this.rowSelection&&this.setupRowSelection(this.rowSelection)}watchRowSelection(t,e){(null==e?void 0:e.type)!==(null==t?void 0:t.type)&&this.clearSelection()}setSelection(t){"single"===this.getRowSelectionType()&&t.splice(1),this.selectedRowKeySet.toArray().forEach((t=>{w.notify(x,{host:this.host,rowKey:t,checked:!1})})),this.selectedRowKeySet.clear(),t.forEach((t=>{this.vegaTableDataSourceController.getRecordByKey(t)&&(this.selectedRowKeySet.add(t),w.notify(x,{host:this.host,rowKey:t,checked:!0}))}))}watchCurrentData(t){this.syncUpSelectedKeySetWithCurrentData(t)}clearSelection(){this.selectedRowKeySet.clear(),w.notify(y,{host:this.host,checked:!1,noneChecked:0===this.selectedRowKeySet.size})}getSelection(){return this.selectedRowKeySet.toArray()}watchSelectedRowKeySet(){this.isSelectedAll=this.isCheckedAll()}watchSelectedAll(){w.notify(y,{host:this.host,checked:this.isCheckedAll(),noneChecked:0===this.selectedRowKeySet.size}),this.selectAllChangeEventEmitter.emit({selected:this.isCheckedAll(),selectedRows:this.getSelectedRecords()})}isAcceptableRowSelectionObserver(t){return"VEGA-TABLE"===t.host.tagName?this.host===t.host:"VEGA-TABLE-ROW"===t.host.tagName?this.host===k(t.host,"vega-table"):void 0}isAcceptableRowSelectionAllObserver(t){return"VEGA-TABLE"===t.host.tagName?this.host===t.host:"VEGA-TABLE-HEAD-ROW"===t.host.tagName?this.host===k(t.host,"vega-table"):void 0}initRowSelection(){this.rowSelectionObserver=new S(this.isAcceptableRowSelectionObserver.bind(this),(t=>{const{rowKey:e,checked:i}=t,o=this.vegaTableDataSourceController.getRecordByKey(e);this.handleRowSelect(i,o)})),w.register(x,this.rowSelectionObserver),O.register(D.getSubject(this.host,L),(({rowKey:t,checked:e})=>this.rowSelectEventEmitter.emit({selected:e,record:this.vegaTableDataSourceController.getRecordByKey(t),selectedRows:this.getSelectedRecords()}))),O.register(D.getSubject(this.host,M),(({checked:t})=>this.rowSelectAllEventEmitter.emit({selected:t,selectedRows:this.getSelectedRecords(),changedRows:t?this.vegaTableDataSourceController.getCurrentData().filter((t=>!this.selectedRowKeySet.has(t.key))):this.getSelectedRecords()})))}initRowSelectionAllObserver(){this.rowSelectionAllObserver=new S(this.isAcceptableRowSelectionAllObserver.bind(this),(t=>{this.handleSelectAll(t.checked)})),w.register(y,this.rowSelectionAllObserver)}initRowClickObserver(){this.rowClickObserver=new S(this.isAcceptableRowClickObserver.bind(this),(t=>{if("single"===this.getRowSelectionType()){const e=this.vegaTableDataSourceController.getRecordByKey(t.rowKey);this.handleSingleRowSelect(e)}})),w.register(R,this.rowClickObserver)}isAcceptableRowClickObserver(t){return"VEGA-TABLE-ROW"===t.host.tagName&&this.host===k(t.host,"vega-table")}}Bt([s()],zt.prototype,"host",void 0),Bt([s({writable:!0})],zt.prototype,"isSelectedAll",void 0),Bt([s()],zt.prototype,"selectedRowKeySet",void 0),Bt([s({writable:!0})],zt.prototype,"rowSelection",void 0),Bt([s()],zt.prototype,"rowKey",void 0),Bt([s()],zt.prototype,"selectChangeEventEmitter",void 0),Bt([s()],zt.prototype,"selectAllChangeEventEmitter",void 0),Bt([s()],zt.prototype,"vegaTableDataSourceController",void 0),Bt([s()],zt.prototype,"rowSelectEventEmitter",void 0),Bt([s()],zt.prototype,"rowSelectAllEventEmitter",void 0),Bt([c("connectedCallback")],zt.prototype,"connectedCallback",null),Bt([c("disconnectedCallback")],zt.prototype,"disconnectedCallback",null),Bt([c("componentWillLoad")],zt.prototype,"componentWillLoad",null),Bt([c("watchRowSelection")],zt.prototype,"watchRowSelection",null),Bt([c("setSelection")],zt.prototype,"setSelection",null),Bt([c("watchCurrentData")],zt.prototype,"watchCurrentData",null),Bt([c("clearSelection")],zt.prototype,"clearSelection",null),Bt([c("getSelection")],zt.prototype,"getSelection",null),Bt([c("watchSelectedRowKeySet")],zt.prototype,"watchSelectedRowKeySet",null),Bt([c("watchSelectedAll")],zt.prototype,"watchSelectedAll",null);var Kt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Gt extends a{constructor(){super(...arguments),this.getRecordKey=t=>null!=t[this.rowKey]?String(t[this.rowKey]):"",this.getRecordByKey=t=>this.currentData.find((e=>this.getRecordKey(e)===t)),this.setCurrentData=t=>{this.currentData=this.tableDataValidation(t)?t:[]}}componentWillLoad(){this.vegaTableSortController.syncSortOrder(),this.syncCurrentData()}watchSortersMap(){this.syncCurrentData()}watchDataSource(){this.syncCurrentData()}getAllRecordKeys(){return this.currentData.map(this.getRecordKey)}getDataSource(){return this.dataSource}setDataSource(t){this.dataSource=t}getCurrentData(){return this.currentData}isCurrentDataEmpty(){return 0===this.currentData.length}tableDataValidation(t){return!t.some((t=>!this.getRecordKey(t)))||(d.error('Each item in dataSource should have a unique "key" prop.'," Otherwise, you should specify the primary key of dataSource item via rowKey."," For more details, please refer to: https://heartlandpayments.github.io/Vega/?path=/docs/components-table-v2--basic-table#rowkey"),!1)}syncCurrentData(){if(this.isTemplateRenderMode)return;const t=this.sortersMap.size>0?this.columns.filter((t=>t.sorter&&"event"!==t.sorter&&this.sortersMap.has(t.prop))):[];this.setCurrentData(t.length>0?this.vegaTableSortController.sortData(this.dataSource,Array.from(this.sortersMap.values())):this.dataSource)}}Kt([s()],Gt.prototype,"rowKey",void 0),Kt([s({writable:!0})],Gt.prototype,"currentData",void 0),Kt([s({writable:!0})],Gt.prototype,"dataSource",void 0),Kt([s()],Gt.prototype,"columns",void 0),Kt([s()],Gt.prototype,"sortersMap",void 0),Kt([s()],Gt.prototype,"vegaTableSortController",void 0),Kt([s()],Gt.prototype,"vegaTableRenderer",void 0),Kt([s()],Gt.prototype,"isTemplateRenderMode",void 0),Kt([c("componentWillLoad")],Gt.prototype,"componentWillLoad",null),Kt([c("watchSortersMap")],Gt.prototype,"watchSortersMap",null),Kt([c("watchDataSource")],Gt.prototype,"watchDataSource",null);var Pt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Vt extends a{constructor(){super(...arguments),this.renderTableBody=e=>{const o=this.vegaTableDataSourceController.getCurrentData();return t("vega-table-body",{ref:t=>this.tableBodyRef=t},o.map(((l,n)=>{const r=this.vegaTableDataSourceController.getRecordKey(l),s=this.vegaTablePaginationController.isRowVisible(n);return t(i,null,this.vegaTableRowRenderer.render({rowKey:r,index:n,record:l,isVisibleInCurrentPage:s,isLastRow:n===o.length-1},e),this.vegaTableExpandRowController.isExpandableRow(l)&&t("vega-table-expand-row",{class:{"v-hidden":!s},key:`vega-table-expanded-row-${r}`,rowKey:r,striped:this.striped&&n%2==1,ref:t=>{this.vegaTableRenderInputController.addRowRenderInputMap(t,"expand")}},t("slot",{name:`${Wt.expandRowSlotNamePrefix}${r}`})))})))}}getTableFormRef(){return this.tableFormRef}getTableBodyRef(){return this.tableBodyRef}render(){const e=this.columnStructureModel.generateColumnConfigByLeaves(this.columns).some((t=>null==t?void 0:t.editable));return e?t("vega-form",{ref:t=>this.tableFormRef=t},this.renderTableBody(e)):this.renderTableBody(!1)}}Pt([s()],Vt.prototype,"striped",void 0),Pt([s()],Vt.prototype,"rowDivider",void 0),Pt([s()],Vt.prototype,"columns",void 0),Pt([s()],Vt.prototype,"currentBreakpoint",void 0),Pt([s()],Vt.prototype,"rowClickable",void 0),Pt([s()],Vt.prototype,"vegaTableDataSourceController",void 0),Pt([s()],Vt.prototype,"vegaTablePaginationController",void 0),Pt([s()],Vt.prototype,"vegaTableRowSelectionController",void 0),Pt([s()],Vt.prototype,"vegaTableRowRenderer",void 0),Pt([s()],Vt.prototype,"columnStructureModel",void 0),Pt([s()],Vt.prototype,"vegaTableExpandRowController",void 0),Pt([s()],Vt.prototype,"vegaTableRenderInputController",void 0);var $t=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class _t extends a{constructor(){super(...arguments),this.renderHeaderRows=()=>{const e=[];let i=this.vegaTableRenderInputController.getHeadRenderInputs();for(;i.length>0;)e.push(i),i=i.flatMap((t=>t.children));return e.map((e=>{var i;return t("vega-table-head-row",{hideSelectAll:null===(i=this.rowSelection)||void 0===i?void 0:i.hideSelectAll,ref:t=>{this.vegaTableRenderInputController.addHeadRowRenderInputMap(t,e),this.vegaTableRenderInputController.addRowRenderInputMap(t,"head")}},e.map((t=>{if(t.label)return this.renderGroupCell(t);{const e=this.columns.find((e=>e.key===t.key||e.prop===t.key||e.label===t.key));return this.renderCell(t,e)}})))}))},this.renderGroupCell=e=>t("vega-table-head-cell",{key:e.key,ref:t=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(t,e)}},e.label),this.renderCell=(e,i)=>{var o;return i?t("vega-table-head-cell",{key:i.key||i.prop,textAlign:i.align,sorter:i.sorter,sortOrder:null===(o=this.sortersMap.get(i.prop))||void 0===o?void 0:o.getSortOrder(),sortConfig:this.sortConfig,breakpoint:i.breakpoint,ref:t=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(t,e),T.addUniqueObserverToNode(t,$,(t=>{this.vegaTableSortController.handleHeadSortClick(i,t.detail.sortOrder)}))}},i.label):t("vega-table-head-cell",{key:e.key,ref:t=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(t,e)}})}}render(){return this.showHeader&&t("vega-table-head",null,this.renderHeaderRows())}}$t([s()],_t.prototype,"showHeader",void 0),$t([s()],_t.prototype,"sortersMap",void 0),$t([s()],_t.prototype,"sortConfig",void 0),$t([s()],_t.prototype,"columns",void 0),$t([s()],_t.prototype,"rowSelection",void 0),$t([s()],_t.prototype,"vegaTableSortController",void 0),$t([s()],_t.prototype,"vegaTableDataSourceController",void 0),$t([s()],_t.prototype,"vegaTableRenderInputController",void 0);var Ht=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ft extends a{constructor(){super(...arguments),this.paginationRefCallback=t=>{T.addUniqueObserverToNode(t,_,this.handlePaginationChange),T.addUniqueObserverToNode(t,H,this.handlePaginationPageSizeChange)},this.handlePaginationChange=t=>{var e,i;this.vegaTablePaginationController.setCurrentPage(t.detail);const o=new CustomEvent("vegaChange",{detail:t.detail});null===(i=(e=this.pagination).vegaChange)||void 0===i||i.call(e,o)},this.handlePaginationPageSizeChange=t=>{var e,i;this.vegaTablePaginationController.setPageSize(t.detail);const o=new CustomEvent("vegaPageSizeChange",{detail:t.detail});null===(i=(e=this.pagination).vegaPageSizeChange)||void 0===i||i.call(e,o)},this.getPaginationConfig=()=>{const t=this.pagination,{position:e}=t,i=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(t);l<o.length;l++)e.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(i[o[l]]=t[o[l]])}return i}(t,["position"]),o=tt.formatCustom(this.pagination.extensions);return Object.assign(Object.assign({},i),{position:(null==o?void 0:o.length)>1?void 0:e||"bottom-center",pageSize:this.pageSize})}}render(){if(!this.pagination)return;const{pageSize:e,position:i,extensions:o,pageSizeSelectorOptions:l}=this.getPaginationConfig(),n=["vega-table-pagination-container",i],r=this.vegaTableDataSourceController.getCurrentData().length;return r>0&&t("div",{class:E(n)},t("vega-pagination",{total:r,pageSize:e,current:this.currentPage,extensions:o,pageSizeSelectorOptions:l,ref:this.paginationRefCallback}))}}Ht([s()],Ft.prototype,"pagination",void 0),Ht([s()],Ft.prototype,"pageSize",void 0),Ht([s()],Ft.prototype,"currentPage",void 0),Ht([s()],Ft.prototype,"vegaTablePaginationController",void 0),Ht([s()],Ft.prototype,"vegaTableDataSourceController",void 0);const Xt=({scrollConfig:e={},ref:i,onScroll:o},l)=>{const{maxHeight:n}=e,r=et(n);return t("div",{class:"vega-table-scrollable-container",style:{maxHeight:"number"==typeof n?`${n}px`:n},ref:i,onScroll:t=>{if(!r)return;const e=t.target;0!==e.scrollTop?(e.scrollTop>0&&!e.classList.contains("scrolled")&&e.classList.add("scrolled"),o(t)):e.classList.remove("scrolled")}},l)};var Ut=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Yt extends a{constructor(){super(...arguments),this.scrollContainerToTop=()=>{this.tableScrollContainerRef&&(this.tableScrollContainerRef.scrollTop=0)},this.notifyContentScrolling=()=>{this.isTemplateRenderMode&&w.notify(C,{host:this.host})}}watchCurrentPage(){this.scrollContainerToTop()}render(e){return t(Xt,{scrollConfig:this.scrollConfig,ref:t=>this.setTableScrollContainerRef(t),onScroll:()=>this.notifyContentScrolling()},e)}setTableScrollContainerRef(t){this.tableScrollContainerRef=t}}Ut([s()],Yt.prototype,"scrollConfig",void 0),Ut([s()],Yt.prototype,"host",void 0),Ut([s()],Yt.prototype,"isTemplateRenderMode",void 0),Ut([c("watchCurrentPage")],Yt.prototype,"watchCurrentPage",null);var qt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Zt extends a{constructor(){super(...arguments),this.renderInternalTable=()=>{const e=this.columns.some((t=>t.overflow))||Array.from(this.host.querySelectorAll("vega-table-cell")).some((t=>t.overflow));return t("table",{class:{"v-table-fixed":e,"show-edit-error":this.showEditError}},this.columns.length>0&&[this.vegaTableColGroupRenderer.render(),this.vegaTableHeaderRenderer.render()],(this.dataSource.length>0||this.editingRows.size>0)&&this.vegaTableBodyRenderer.render(),this.isTemplateRenderMode&&t("slot",null))},this.renderEmpty=()=>this.vegaTableDataSourceController.isCurrentDataEmpty()&&this.emptyDescription&&t("div",{class:"vega-table-empty-description"},this.translationSlimmer.t(this.emptyDescription))}render(){const e=E([this.rowDivider&&"row-divider",this.columnDivider&&"column-divider",`density-${tt.formatCustom(this.density)}`,this.striped&&"striped",this.columnStructureModel.hasGroupColumn()&&"is-group-table",(this.columnStructureModel.hasLeftPinnedColumn()||this.columnStructureModel.hasRightPinnedColumn())&&"is-pinned-table"]);return lt(t(o,{class:e},this.vegaTableScrollContainerRenderer.render(this.renderInternalTable()),this.vegaTablePaginationRenderer.render(),this.renderEmpty()),this.host)}}qt([s()],Zt.prototype,"host",void 0),qt([s()],Zt.prototype,"columns",void 0),qt([s()],Zt.prototype,"emptyDescription",void 0),qt([s()],Zt.prototype,"rowDivider",void 0),qt([s()],Zt.prototype,"columnDivider",void 0),qt([s()],Zt.prototype,"density",void 0),qt([s()],Zt.prototype,"dataSource",void 0),qt([s()],Zt.prototype,"striped",void 0),qt([s()],Zt.prototype,"columnStructureModel",void 0),qt([s()],Zt.prototype,"showEditError",void 0),qt([s()],Zt.prototype,"vegaTableHeaderRenderer",void 0),qt([s()],Zt.prototype,"vegaTableBodyRenderer",void 0),qt([s()],Zt.prototype,"vegaTableColGroupRenderer",void 0),qt([s()],Zt.prototype,"vegaTableScrollContainerRenderer",void 0),qt([s()],Zt.prototype,"vegaTablePaginationRenderer",void 0),qt([s()],Zt.prototype,"vegaTableDataSourceController",void 0),qt([s()],Zt.prototype,"translationSlimmer",void 0),qt([s({writable:!0})],Zt.prototype,"vegaTableChildrenController",void 0),qt([s()],Zt.prototype,"isTemplateRenderMode",void 0),qt([s()],Zt.prototype,"editingRows",void 0);var Jt=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Qt extends a{componentWillLoad(){var t,e;this.currentPage=(null===(t=this.pagination)||void 0===t?void 0:t.current)||1,this.pageSize=(null===(e=this.pagination)||void 0===e?void 0:e.pageSize)||10}watchPagination(){if(this.pagination){const{pageSize:t,current:e}=this.pagination;t>0&&(this.pageSize=t),e>0&&(this.currentPage=e)}}setPageSize(t){this.pageSize=t}setCurrentPage(t){this.currentPage=t}isRowVisible(t){if(!this.pagination)return!0;const e=this.pageSize,i=this.currentPage;return t>=(i-1)*e&&t<i*e}}Jt([s()],Qt.prototype,"pagination",void 0),Jt([s({writable:!0})],Qt.prototype,"pageSize",void 0),Jt([s({writable:!0})],Qt.prototype,"currentPage",void 0),Jt([c("componentWillLoad")],Qt.prototype,"componentWillLoad",null),Jt([c("watchPagination")],Qt.prototype,"watchPagination",null);var te=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ee extends a{constructor(){super(...arguments),this.rowFormRefMap=new Map}getRowFormRefMap(){return this.rowFormRefMap}async saveAllEditRows(){if(!this.canMethodBeInvokedInCurrentState("saveAllEditRows"))return;const t=this.vegaTableDataSourceController.getCurrentData().slice();for(const e of this.editingRows.toArray()){const i=await this.getRowData(e),o=t.findIndex((t=>this.vegaTableDataSourceController.getRecordKey(t)===e));o>-1&&t.splice(o,1,i)}this.vegaTableDataSourceController.setDataSource([...t]),this.stopAllRowEditMode()}stopAllRowEditMode(){this.canMethodBeInvokedInCurrentState("stopAllRowEditMode")&&this.editingRows.clear()}watchDataSource(t){this.isEditableTable()&&this.getEditingRowsKey().forEach((e=>{t.find((t=>t.key===e))||this.stopRowEditMode(e)}))}async saveEditRow(t){if(!this.canMethodBeInvokedInCurrentState("saveEditRow"))return;const e=await this.getRowData(t),i=this.vegaTableDataSourceController.getCurrentData().slice(),o=i.findIndex((e=>this.vegaTableDataSourceController.getRecordKey(e)===t));o>-1&&(i.splice(o,1,e),this.vegaTableDataSourceController.setDataSource([...i])),this.stopRowEditMode(t)}stopRowEditMode(t){this.canMethodBeInvokedInCurrentState("stopRowEditMode")&&this.editingRows.delete(t)}removeRow(t){this.canMethodBeInvokedInCurrentState("removeRow")&&this.vegaTableDataSourceController.setDataSource(this.vegaTableDataSourceController.getCurrentData().filter((e=>this.vegaTableDataSourceController.getRecordKey(e)!==t)))}startRowEditMode(t){this.canMethodBeInvokedInCurrentState("startRowEditMode")&&this.editingRows.add(t)}addNewRow(t={}){var e;if(!this.canMethodBeInvokedInCurrentState("addNewRow"))return;const i=(null===(e=t[this.rowKey])||void 0===e?void 0:e.toString())||nt(),o=Object.assign({},t);return o[this.rowKey]=i,this.vegaTableDataSourceController.setCurrentData([...this.vegaTableDataSourceController.getCurrentData(),o]),this.editingRows.add(i),i}async getRowsData(){if(!this.canMethodBeInvokedInCurrentState("getRowsData"))return;const t=this.vegaTableBodyRenderer.getTableFormRef(),e=t?await t.getValue():[];return[...this.vegaTableDataSourceController.getCurrentData().map((t=>{const i=e[`${ee.rowFormKeyPrefix}${this.vegaTableDataSourceController.getRecordKey(t)}`];return Object.assign(Object.assign({},t),i)}))]}getEditingRowsKey(){if(this.canMethodBeInvokedInCurrentState("getEditingRowsKey"))return this.editingRows.toArray()}getFormRef(t){if(this.canMethodBeInvokedInCurrentState("getFormRef"))return t?this.rowFormRefMap.get(t):this.vegaTableBodyRenderer.getTableFormRef()}async getRowData(t){if(!this.canMethodBeInvokedInCurrentState("getRowData"))return;const e=await this.rowFormRefMap.get(t).getValue();return Object.assign(Object.assign({},this.vegaTableDataSourceController.getRecordByKey(t)),e)}isEditing(t){return this.editingRows.has(t)}isEditableTable(){return this.columns.some((t=>t.editable))}canMethodBeInvokedInCurrentState(t){return!!this.isEditableTable()||(d.warn(`Method ${t} only works with editable tables`),!1)}}ee.rowFormKeyPrefix="vega-table-row-form-",te([s()],ee.prototype,"editingRows",void 0),te([s()],ee.prototype,"rowKey",void 0),te([s()],ee.prototype,"columns",void 0),te([s()],ee.prototype,"vegaTableDataSourceController",void 0),te([s()],ee.prototype,"vegaTableBodyRenderer",void 0),te([c("saveAllEditRows")],ee.prototype,"saveAllEditRows",null),te([c("stopAllRowEditMode")],ee.prototype,"stopAllRowEditMode",null),te([c("watchDataSource")],ee.prototype,"watchDataSource",null),te([c("saveEditRow")],ee.prototype,"saveEditRow",null),te([c("stopRowEditMode")],ee.prototype,"stopRowEditMode",null),te([c("removeRow")],ee.prototype,"removeRow",null),te([c("startRowEditMode")],ee.prototype,"startRowEditMode",null),te([c("addNewRow")],ee.prototype,"addNewRow",null),te([c("getRowsData")],ee.prototype,"getRowsData",null),te([c("getEditingRowsKey")],ee.prototype,"getEditingRowsKey",null),te([c("getFormRef")],ee.prototype,"getFormRef",null),te([c("getRowData")],ee.prototype,"getRowData",null);class ie{constructor(t,e,i){this.prop=t,this.order=e,this.sorter=i}sort(t,e){const i=this.sorter(t,e);if(0!==i)return"asc"===this.order?i:-i}toExternalFormat(){return{prop:this.prop,order:this.order}}getSortOrder(){return this.order}}var oe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class le extends a{constructor(){super(...arguments),this.clearSorter=()=>{this.sortersMap.size>0&&(this.sortersMap.clear(!1),this.changeEventEmitter.emit({sorters:[]}))}}watchColumns(){this.syncSortOrder()}handleHeadSortClick(t,e){"single"===this.sortConfig.type&&this.sortersMap.clear(),e?this.sortersMap.set(t.prop,new ie(t.prop,e,t.sorter)):this.sortersMap.has(t.prop)&&this.sortersMap.delete(t.prop),"event"!==t.sorter&&this.vegaTableDataSourceController.setCurrentData(this.sortData(this.vegaTableDataSourceController.getDataSource(),Array.from(this.sortersMap.values()))),this.changeEventEmitter.emit({sorters:Array.from(this.sortersMap.values()).map((t=>t.toExternalFormat()))})}syncSortOrder(){this.columns.filter((t=>et(t.sorter)&&et(t.sortOrder))).forEach((t=>{this.sortersMap.set(t.prop,new ie(t.prop,t.sortOrder,t.sorter))}))}sortData(t,e){return[...t].sort(((t,i)=>{for(const o of e){const e=o.sort(t,i);if(et(e))return e}return 0}))}}oe([s({writable:!0})],le.prototype,"sortersMap",void 0),oe([s()],le.prototype,"columns",void 0),oe([s()],le.prototype,"changeEventEmitter",void 0),oe([s()],le.prototype,"vegaTableDataSourceController",void 0),oe([s()],le.prototype,"sortConfig",void 0),oe([c("watchColumns")],le.prototype,"watchColumns",null);var ne=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class re extends a{constructor(){super(...arguments),this.getColResponsiveClass=t=>t.breakpoint&&it(t.breakpoint)?`v-hidden ${t.breakpoint}:v-table-column`:""}render(){return t("colgroup",null,t("col",{style:{minWidth:this.paddingX[0],width:this.paddingX[0]}}),this.rowDraggable&&t("col",{class:"draggable-col"}),"multiple"===this.vegaTableRowSelectionController.getRowSelectionType()&&t("col",{style:{minWidth:"40px",width:"40px"}}),this.columnStructureModel.generateColumnConfigByLeaves(this.columns).map((e=>{if(e){const i=this.getColResponsiveClass(e);return t("col",{class:i,style:{width:e.width?e.width:null}})}return t("col",null)})),this.hasExpandableRow&&t("col",{style:{minWidth:"40px",width:"40px"}}),t("col",{style:{minWidth:this.paddingX[1],width:this.paddingX[1]}}))}}ne([s()],re.prototype,"paddingX",void 0),ne([s()],re.prototype,"columnStructureModel",void 0),ne([s()],re.prototype,"columns",void 0),ne([s()],re.prototype,"hasExpandableRow",void 0),ne([s()],re.prototype,"rowDraggable",void 0),ne([s()],re.prototype,"vegaTableRowSelectionController",void 0);var se=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ae extends a{constructor(){super(...arguments),this.currentDataObserver=new st({target:()=>this.host,options:{childList:!0,subtree:!0},mutationFilter:at("VEGA-TABLE-BODY","VEGA-TABLE-ROW"),callback:()=>{this.syncUpTableCurrentData(),this.syncUpTableHeadRowProps()}}),this.rowStripedObserver=new st({target:()=>this.host,options:{childList:!0,subtree:!0},mutationFilter:at("VEGA-TABLE-BODY","VEGA-TABLE-ROW","VEGA-TABLE-EXPAND-ROW"),callback:()=>{this.syncRowStates()}}),this.syncUpTableCurrentData=()=>{if(!this.isTemplateRenderMode)return;const t=Array.from(this.host.querySelectorAll("vega-table-row")).map((t=>({key:t.rowKey})));this.vegaTableDataSourceController.setCurrentData(t)},this.syncRowStates=()=>{const t=this.host.querySelectorAll("vega-table-row");t.forEach(((e,i)=>{this.updateRowStriped(e,i),this.updateRowDivider(e,i===t.length-1)})),this.host.querySelectorAll("vega-table-expand-row").forEach(((t,e)=>{this.updateRowStriped(t,e)}))},this.syncUpTableHeadRowProps=()=>{var t;if(!this.isTemplateRenderMode)return;const e=this.host.querySelector("vega-table-head-row");e&&(e.hideSelectAll=e.hideSelectAll||(null===(t=this.rowSelection)||void 0===t?void 0:t.hideSelectAll))}}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){this.syncUpTableCurrentData(),this.syncUpTableHeadRowProps(),this.syncRowStates(),this.syncUpTableFootVisibility()}componentDidLoad(){}clearSelection(){w.notify(y,{host:this.host,checked:!1,noneChecked:!0})}watchCurrentData(){this.syncUpTableFootVisibility()}watchStriped(){this.syncRowStates()}watchRowDivider(){this.syncRowStates()}updateRowStriped(t,e){t.striped=this.striped&&e%2==1}updateRowDivider(t,e){t.rowDivider=this.rowDivider&&!e}syncUpTableFootVisibility(){const t=this.host.querySelector("vega-table-foot");t&&(this.vegaTableDataSourceController.isCurrentDataEmpty()?t.classList.add("v-hidden"):t.classList.remove("v-hidden"))}}se([s()],ae.prototype,"host",void 0),se([s()],ae.prototype,"columns",void 0),se([s()],ae.prototype,"dataSource",void 0),se([s()],ae.prototype,"currentData",void 0),se([s()],ae.prototype,"rowSelection",void 0),se([s()],ae.prototype,"striped",void 0),se([s()],ae.prototype,"rowDivider",void 0),se([s()],ae.prototype,"vegaTableDataSourceController",void 0),se([s()],ae.prototype,"vegaTableRenderer",void 0),se([s()],ae.prototype,"isTemplateRenderMode",void 0),se([h()],ae.prototype,"currentDataObserver",void 0),se([h()],ae.prototype,"rowStripedObserver",void 0),se([c("connectedCallback")],ae.prototype,"connectedCallback",null),se([c("disconnectedCallback")],ae.prototype,"disconnectedCallback",null),se([c("componentWillLoad")],ae.prototype,"componentWillLoad",null),se([c("componentDidLoad")],ae.prototype,"componentDidLoad",null),se([c("clearSelection")],ae.prototype,"clearSelection",null),se([c("watchCurrentData")],ae.prototype,"watchCurrentData",null),se([c("watchStriped")],ae.prototype,"watchStriped",null),se([c("watchRowDivider")],ae.prototype,"watchRowDivider",null);var de=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ce extends a{constructor(){super(...arguments),this.renderTableRowComponent=e=>{const{rowKey:i,index:o,record:l,isVisibleInCurrentPage:n}=e,r=this.vegaTableRenderInputController.getLeafRenderInputs(),s=this.vegaTableBodyColSpanController.resolveRow(l,o,r),a=[];return r.forEach(((t,e)=>{const i=s[e];i&&a.push(this.vegaTableCellRenderer.render(t,l,o,i))})),t("vega-table-row",{class:{"v-hidden":!n},key:`vega-table-row-${i}`,rowKey:i,ref:t=>{this.vegaTableRenderInputController.addRowRenderInputMap(t,"body"),T.addUniqueObserverToNode(t,$,(()=>{this.rowClickEventEmitter.emit({record:l,index:o})}))},striped:this.striped&&o%2==1,rowDivider:this.rowDivider&&!e.isLastRow},a)}}render(e,i){const{rowKey:o}=e;return i?t("vega-form",{key:`vega-table-row-form-${o}`,"data-vega-form":`${ee.rowFormKeyPrefix}${o}`,ref:t=>this.vegaTableEditableController.getRowFormRefMap().set(o,t)},this.renderTableRowComponent(e)):this.renderTableRowComponent(e)}}de([s()],ce.prototype,"rowClickEventEmitter",void 0),de([s()],ce.prototype,"vegaTableEditableController",void 0),de([s()],ce.prototype,"vegaTableCellRenderer",void 0),de([s()],ce.prototype,"vegaTableBodyColSpanController",void 0),de([s()],ce.prototype,"striped",void 0),de([s()],ce.prototype,"rowDivider",void 0),de([s()],ce.prototype,"vegaTableRenderInputController",void 0);var he=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class pe extends a{constructor(){super(...arguments),this.currentDataObserver=new st({target:()=>this.host,options:{childList:!0,subtree:!0},mutationFilter:at("VEGA-TABLE-ROW"),callback:()=>{this.isTemplateRenderMode=this.checkIsTemplateRenderMode(this.host)}}),this.checkIsTemplateRenderMode=t=>Array.from(t.children).some((t=>t.tagName.startsWith("VEGA-TABLE-")))}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){this.isTemplateRenderMode=this.checkIsTemplateRenderMode(this.host)}componentDidLoad(){}}he([s()],pe.prototype,"host",void 0),he([s({writable:!0})],pe.prototype,"isTemplateRenderMode",void 0),he([h()],pe.prototype,"currentDataObserver",void 0),he([c("connectedCallback")],pe.prototype,"connectedCallback",null),he([c("disconnectedCallback")],pe.prototype,"disconnectedCallback",null),he([c("componentWillLoad")],pe.prototype,"componentWillLoad",null),he([c("componentDidLoad")],pe.prototype,"componentDidLoad",null);const ue=[{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the table",payloadValue:t=>0===t.dataSource.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the table",payloadValue:t=>t.dataSource.length>0}];class ve{constructor(t,e,i,o,l){this.key=t,this.level=e,this.parent=i,this.label=o,this.pinned=l,this.leaves=[],this.orderedChildren=[],this.iteratorCacheMap=new Map}static from(t,e){const i=new ve(this.ROOT_KEY,ve.ROOT_LEVEL);return e?(i.children=this.fromGroupColumns(i,e),i):t?(i.children=t.map((t=>new ve(t.key||t.prop||t.label,0,i,null,t.pinned))),i):(i.children=[],i)}static fromGroupColumns(t,e,i=0){return e&&e.length>0?e.map((e=>{if(ot(e)){const o=new ve(e.key,i,t,e.label,e.pinned);return o.children=this.fromGroupColumns(o,e.children,i+1),o}return new ve(e.key,i,t)})):[]}generateColumnConfigByLeaves(t){return this.getLeaves().map((e=>t.find((t=>t.key===e.key||t.prop===e.key||t.label===e.key))))}getMaxDepth(){const t=this.dfsIterator();return 0===t.length?0:Math.max(...t.map((t=>t.level)))+1}hasGroupColumn(){return!!this.children.find((t=>!t.isLeaf()))}hasLeftPinnedColumn(){return!!this.children.find((t=>"left"===t.pinned))}hasRightPinnedColumn(){return!!this.children.find((t=>"right"===t.pinned))}isLeaf(){return!this.children||0===this.children.length}iterator(t="dfs"){return"dfs"===t?this.dfsIterator():[]}getLeaves(){if(this.leaves.length>0)return this.leaves;const t=this.dfsIterator().filter((t=>t.isLeaf()));return this.leaves=t,t}getOrderedChildren(){return this.isRoot()?this.orderedChildren:this.children}orderChildrenByPinned(){if(!this.isRoot())return this.children;if(this.orderedChildren.length>0)return this.orderedChildren;const t=[],e=[],i=[];this.children.forEach((o=>{"left"===o.pinned?t.push(o):"right"===o.pinned?i.push(o):e.push(o)}));const o=[...t,...e,...i];return this.orderedChildren=o,o}isRoot(){return this.level===ve.ROOT_LEVEL}dfsIterator(){if(this.iteratorCacheMap.has("dfs"))return this.iteratorCacheMap.get("dfs");const t=[],e=this.orderChildrenByPinned();return this.isRoot()||t.push(this),e&&e.length>0&&e.forEach((e=>{t.push(...e.dfsIterator())})),this.iteratorCacheMap.set("dfs",t),t}}ve.ROOT_LEVEL=-1,ve.ROOT_KEY="#root-model#";var be=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class fe extends a{componentWillLoad(){this.setColumnStructureModel()}watchColumns(){this.setColumnStructureModel()}watchGroupColumns(){this.setColumnStructureModel()}watchTemplateGroupColumns(){this.setColumnStructureModel()}setColumnStructureModel(){var t;this.columnStructureModel=ve.from(this.columns,null!==(t=this.templateGroupColumns)&&void 0!==t?t:this.groupColumns)}}be([s()],fe.prototype,"columns",void 0),be([s()],fe.prototype,"groupColumns",void 0),be([s()],fe.prototype,"templateGroupColumns",void 0),be([s({writable:!0})],fe.prototype,"columnStructureModel",void 0),be([c("componentWillLoad")],fe.prototype,"componentWillLoad",null),be([c("watchColumns")],fe.prototype,"watchColumns",null),be([c("watchGroupColumns")],fe.prototype,"watchGroupColumns",null),be([c("watchTemplateGroupColumns")],fe.prototype,"watchTemplateGroupColumns",null);class ge{constructor(t,e,i,o,l,n,r,s,a,d=null,c=null,h=!1,p=!1){this.kind=t,this.hasLeftPinnedColumn=e,this.hasRightPinnedColumn=i,this.showSelectionCell=o,this.showDraggableCell=l,this.showExpandActionCell=n,this.hasExpandedRowSlot=r,this.leftPaddingPx=s,this.rightPaddingPx=a,this.startRowSpan=d,this.endRowSpan=c,this.isStartHidden=h,this.isEndHidden=p}static from(t,e,i,o=null){const l=null==o?void 0:o[0],n=null==o?void 0:o[o.length-1],r=!!e.rowSelection&&"multiple"===(e.rowSelection.type||"multiple");return new ge(i,t.hasLeftPinnedColumn(),t.hasRightPinnedColumn(),r,!!e.rowDraggable,"expand"!==i&&e.hasExpandableRow,"expand"===i,j(e.paddingX[0]),j(e.paddingX[1]),(null==l?void 0:l.headHasGroupColumn)?r&&0===l.level?l.headMaxDepth:l.rowSpan:null,(null==n?void 0:n.headHasGroupColumn)?n.rowSpan:null,!!(null==l?void 0:l.headHasGroupColumn)&&(r&&l.level>0||!l.isViewStart),!!(null==l?void 0:l.headHasGroupColumn)&&!!(null==n?void 0:n.headHasGroupColumn)&&!n.isViewEnd)}}var we=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class me extends a{constructor(){super(...arguments),this.headRowRenderInputMap=new WeakMap,this.headCellRenderInputMap=new WeakMap,this.bodyCellRenderInputMap=new WeakMap,this.hasPendingCellRenderInputChange=!1,this.rowRenderInputMap=new WeakMap,this.footCellRenderInputMap=new Map,this.cellRenderInputChangeTaskQueue=new ft}connectedCallback(){this.registerRenderInputRICObserver()}disconnectedCallback(){this.unRegisterRenderInputRICObserver()}componentWillLoad(){this.setRenderInputModel()}async componentDidRender(){this.isTemplateRenderMode&&(this.registerTemplateCellRenderInputs(),!this.hasPendingCellRenderInputChange||this.columnStructureModel.hasLeftPinnedColumn()||this.columnStructureModel.hasRightPinnedColumn()||(this.notifyRenderInputChange(),this.hasPendingCellRenderInputChange=!1)),await this.cellRenderInputChangeTaskQueue.runTask()}async watchColumnStructureModel(){this.setRenderInputModel(),this.bodyCellRenderInputMap=new WeakMap,await this.cellRenderInputChangeTaskQueue.enqueue({run:async()=>{w.notify(D.getSubject(this.host,N),{})}},!1)}watchRowStructure(){this.rowRenderInputMap=new WeakMap,w.notify(D.getSubject(this.host,N),{})}getLeafRenderInputs(){return this.leavesRenderInputModels}getHeadRenderInputs(){return this.columnRenderInputModels}addHeadRowRenderInputMap(t,e){t&&this.headRowRenderInputMap.set(t,e)}addHeadCellRenderInputMap(t,e){t&&this.headCellRenderInputMap.set(t,e)}clearHeadRenderInputMaps(){this.headRowRenderInputMap=new WeakMap,this.headCellRenderInputMap=new WeakMap}addCellRenderInputMap(t,e){if(!t)return;const i=this.bodyCellRenderInputMap.get(t),o=this.hasSameCellStructure(i,e)?i:e;i!==o&&(this.hasPendingCellRenderInputChange=!0),this.bodyCellRenderInputMap.set(t,o)}addRowRenderInputMap(t,e){t&&this.rowRenderInputMap.set(t,this.createRowRenderInputModel(e,t))}getHeadCellRenderInputMap(){var t;const e=new Map,i=this.isTemplateRenderMode?this.host:null===(t=this.host)||void 0===t?void 0:t.shadowRoot;return null==i||i.querySelectorAll("vega-table-head-cell").forEach((t=>{const i=this.headCellRenderInputMap.get(t);i&&e.set(t,i)})),e}getPinnedColumnBodyCellRenderInputMap(){var t;const e=new Map,i=this.isTemplateRenderMode?this.host:null===(t=this.host)||void 0===t?void 0:t.shadowRoot;return null==i||i.querySelectorAll("vega-table-cell").forEach((t=>{const i=this.bodyCellRenderInputMap.get(t);i&&e.set(t,i)})),e}recomputePinnedOffsets(t,e,i){var o,l,n;const r=this.getHeadCellRenderInputMap();if(!r.size)return;this.registerTemplateCellRenderInputs();const s=new Array(i.length+1).fill(0);for(let t=0;t<i.length;t++)s[t+1]=s[t]+i[t];const a=i.every((t=>0===t)),d=this.leavesRenderInputModels.filter((t=>"left"===t.pinned&&(a||i[t.columnIndex]>0))),c=this.leavesRenderInputModels.filter((t=>"right"===t.pinned&&(a||i[t.columnIndex]>0))),h=null===(o=d[d.length-1])||void 0===o?void 0:o.columnIndex,p=null===(l=c[0])||void 0===l?void 0:l.columnIndex,u=null===(n=c[c.length-1])||void 0===n?void 0:n.columnIndex;let v=this.hasPendingCellRenderInputChange;const b=(o,l)=>{var n;const r=null!==(n=o.colSpan)&&void 0!==n?n:l.colSpan||1,d=t=>Number.isInteger(t)&&t>=o.columnIndex&&t<o.columnIndex+r,c=d(h),v=d(p),b=d(u),f=r>1&&!a?Math.max(1,i.slice(o.columnIndex,o.columnIndex+r).filter((t=>t>0)).length):null;let g=null,w=null;"left"===o.pinned?g=t+s[o.columnIndex]:"right"===o.pinned&&(w=e+(s[i.length]-s[o.columnIndex+r]));const m=o.isVisibleLeftEndPinned!==c||o.isVisibleRightStartPinned!==v||o.isVisibleRightEndPinned!==b||o.visibleColSpan!==f||o.leftOffsetPx!==g||o.rightOffsetPx!==w;return o.isVisibleLeftEndPinned=c,o.isVisibleRightStartPinned=v,o.isVisibleRightEndPinned=b,o.visibleColSpan=f,o.leftOffsetPx=g,o.rightOffsetPx=w,m};r.forEach(((t,e)=>{v=b(t,e)||v})),this.getPinnedColumnBodyCellRenderInputMap().forEach(((t,e)=>{v=b(t,e)||v})),this.footCellRenderInputMap.forEach(((t,e)=>{v=b(t,e)||v})),this.hasPendingCellRenderInputChange=!1,v&&this.notifyRenderInputChange()}registerRenderInputRICObserver(){O.register(D.getSubject(this.host,I),(t=>this.headRowRenderInputMap.get(t))),O.register(D.getSubject(this.host,W),(t=>this.headCellRenderInputMap.get(t))),O.register(D.getSubject(this.host,B),(t=>this.bodyCellRenderInputMap.get(t))),O.register(D.getSubject(this.host,z),(t=>{var e;return null!==(e=this.rowRenderInputMap.get(t))&&void 0!==e?e:this.createRowRenderInput(t)})),O.register(D.getSubject(this.host,K),(t=>{var e;return null!==(e=this.rowRenderInputMap.get(t))&&void 0!==e?e:this.createRowRenderInput(t)})),O.register(D.getSubject(this.host,G),(t=>this.footCellRenderInputMap.get(t)))}unRegisterRenderInputRICObserver(){O.unRegister(D.getSubject(this.host,I)),O.unRegister(D.getSubject(this.host,W)),O.unRegister(D.getSubject(this.host,B)),O.unRegister(D.getSubject(this.host,z)),O.unRegister(D.getSubject(this.host,K)),O.unRegister(D.getSubject(this.host,G))}registerTemplateCellRenderInputs(){const t=this.host.querySelectorAll("vega-table-row, vega-table-foot-row");if(!t.length)return this.footCellRenderInputMap.size&&(this.hasPendingCellRenderInputChange=!0),void(this.footCellRenderInputMap=new Map);const e=new Map;t.forEach((t=>{this.addRowRenderInputMap(t,t.matches("vega-table-foot-row")?"foot":"body");let i=0;Array.from(t.children).forEach((t=>{if("VEGA-TABLE-CELL"!==t.tagName&&"VEGA-TABLE-FOOT-CELL"!==t.tagName)return;const o=t,l=this.leavesRenderInputModels[i],n=o.colSpan||1;if(l){const r=Dt.withMergedBoundaries(l,this.leavesRenderInputModels.slice(i,i+n));if("VEGA-TABLE-FOOT-CELL"===t.tagName){const t=o,i=this.footCellRenderInputMap.get(t),l=this.hasSameCellStructure(i,r)?i:r;l!==i&&(this.hasPendingCellRenderInputChange=!0),e.set(t,l)}else{const t=o,e=this.bodyCellRenderInputMap.get(t);this.addCellRenderInputMap(t,this.hasSameCellStructure(e,r)?e:r)}}i+=n}))})),e.size!==this.footCellRenderInputMap.size&&(this.hasPendingCellRenderInputChange=!0),this.footCellRenderInputMap=e}hasSameCellStructure(t,e){return!!t&&t.key===e.key&&t.pinned===e.pinned&&t.columnIndex===e.columnIndex&&t.isViewStart===e.isViewStart&&t.isViewEnd===e.isViewEnd&&t.isLeftEndPinned===e.isLeftEndPinned&&t.isRightStartPinned===e.isRightStartPinned&&t.isNoPinnedEnd===e.isNoPinnedEnd}notifyRenderInputChange(){w.notify(D.getSubject(this.host,N),{})}createRowRenderInput(t){const e=t.matches("vega-table-head-row")?"head":t.matches("vega-table-foot-row")?"foot":t.matches("vega-table-expand-row")?"expand":"body",i=this.createRowRenderInputModel(e,t);return this.rowRenderInputMap.set(t,i),i}createRowRenderInputModel(t,e){return ge.from(this.columnStructureModel,{hasExpandableRow:this.hasExpandableRow,paddingX:this.paddingX,rowDraggable:this.rowDraggable,rowExpandable:this.rowExpandable,rowSelection:this.rowSelection},t,"head"===t?this.headRowRenderInputMap.get(e):null)}setRenderInputModel(){this.rowRenderInputMap=new WeakMap,this.footCellRenderInputMap.clear(),this.columnRenderInputModels=Dt.from(this.columnStructureModel),this.leavesRenderInputModels=this.columnRenderInputModels.flatMap((t=>t.getLeaves()))}}we([s()],me.prototype,"host",void 0),we([s()],me.prototype,"columnStructureModel",void 0),we([s()],me.prototype,"hasExpandableRow",void 0),we([s()],me.prototype,"paddingX",void 0),we([s()],me.prototype,"rowDraggable",void 0),we([s()],me.prototype,"rowExpandable",void 0),we([s()],me.prototype,"rowSelection",void 0),we([s()],me.prototype,"isTemplateRenderMode",void 0),we([c("connectedCallback")],me.prototype,"connectedCallback",null),we([c("disconnectedCallback")],me.prototype,"disconnectedCallback",null),we([c("componentWillLoad")],me.prototype,"componentWillLoad",null),we([c("componentDidRender")],me.prototype,"componentDidRender",null),we([c("watchColumnStructureModel")],me.prototype,"watchColumnStructureModel",null),we([c("watchHasExpandableRow"),c("watchPaddingX"),c("watchRowDraggable"),c("watchRowExpandable"),c("watchRowSelection")],me.prototype,"watchRowStructure",null);var xe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ye extends a{constructor(){super(...arguments),this.pageResizeObserverSlimmer=new ct({target:()=>this.host.shadowRoot.querySelector("table"),isDeferred:!0,callback:async()=>{await this.host.componentOnReady(),this.recomputeRenderInputs()}})}componentDidLoad(){}componentDidRender(){this.recomputeRenderInputs()}watchColumnStructureModel(){}recomputeRenderInputs(){if(this.host.style.setProperty("--vega-table-content-width",`${this.host.getBoundingClientRect().width}px`),!this.columnStructureModel.hasLeftPinnedColumn()&&!this.columnStructureModel.hasRightPinnedColumn())return;const t=this.getRowContainerRoot().querySelector("vega-table-head-row");if(!(null==t?void 0:t.shadowRoot))return;const[e,i]=this.getRowFixedWidths(t);this.vegaTableRenderInputController.recomputePinnedOffsets(e,i,this.getLeafWidths())}getRowContainerRoot(){return this.isTemplateRenderMode?this.host:this.host.shadowRoot}getRowFixedWidths(t){const e=t.shadowRoot.querySelector("th:first-of-type"),i=t.shadowRoot.querySelector(".vega-table-draggable-column"),o=t.shadowRoot.querySelector(".vega-table-selection-column"),l=t.shadowRoot.querySelector(".vega-table-expand-action-column"),n=t.shadowRoot.querySelector("th:last-of-type");return e?[e.getBoundingClientRect().width+((null==o?void 0:o.getBoundingClientRect().width)||0)+((null==i?void 0:i.getBoundingClientRect().width)||0),((null==l?void 0:l.getBoundingClientRect().width)||0)+((null==n?void 0:n.getBoundingClientRect().width)||0)]:[0,0]}getLeafWidths(){const t=this.vegaTableRenderInputController.getHeadCellRenderInputMap();return this.vegaTableRenderInputController.getLeafRenderInputs().map((e=>{var i,o;for(const[l,n]of t.entries())if(e===n)return(null===(o=null===(i=l.shadowRoot)||void 0===i?void 0:i.querySelector("th, td"))||void 0===o?void 0:o.getBoundingClientRect().width)||0;return 0}))}}xe([s()],ye.prototype,"host",void 0),xe([s()],ye.prototype,"columnStructureModel",void 0),xe([s()],ye.prototype,"isTemplateRenderMode",void 0),xe([s()],ye.prototype,"vegaTableRenderInputController",void 0),xe([h()],ye.prototype,"pageResizeObserverSlimmer",void 0),xe([c("componentDidLoad")],ye.prototype,"componentDidLoad",null),xe([c("componentDidRender")],ye.prototype,"componentDidRender",null),xe([c("watchColumnStructureModel")],ye.prototype,"watchColumnStructureModel",null);var Re=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ce extends a{constructor(t){super(),this.activePointerId=null,this.activeItem=null,this.isDragging=!1,this.startX=0,this.startY=0,this.dragFromIndex=null,this.dragToIndex=null,this.currentOverItem=null,this.currentOverIndex=null,this.activeItemHeight=0,this.cachedItems=[],this.cachedItemDraggableMap=new WeakMap,this.onPointerDown=t=>{if(0!==t.button)return;const e=this.getItemFromComposedPath(t,!0);e&&(this.startDrag(e,t),t.preventDefault())},this.onPointerMove=t=>{this.isCurrentPointEvent(t)&&this.hasCrossedDragThreshold(t)&&(this.beginDragging(),this.syncActiveVisual(t),this.updateDropTarget(t),this.emitDrag(),t.preventDefault())},this.onPointerUp=t=>{this.isCurrentPointEvent(t)&&this.finishDrag()},this.onPointerCancel=t=>{t.pointerId===this.activePointerId&&this.resetDragState()},this.entry=t}connectedCallback(){this.init()}disconnectedCallback(){this.destroy()}componentDidLoad(){this.init()}watchIsDraggable(){this.isDraggable?this.init():this.destroy()}init(){this.isDraggable&&this.listenPointerEvents()}destroy(){this.removePointerListeners(),this.resetDragState()}listenPointerEvents(){const t=this.getContainer();t&&(t.addEventListener("pointerdown",this.onPointerDown),window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerCancel))}removePointerListeners(){const t=this.getContainer();t&&t.removeEventListener("pointerdown",this.onPointerDown),window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerCancel)}startDrag(t,e){this.activePointerId=e.pointerId,this.activeItem=t,this.isDragging=!1,this.startX=e.clientX,this.startY=e.clientY,this.cacheItems(),this.dragFromIndex=this.getItems().indexOf(t),this.dragToIndex=this.dragFromIndex,this.currentOverItem=t,this.currentOverIndex=this.dragFromIndex,this.activeItemHeight=this.getVisualElement(t).getBoundingClientRect().height}beginDragging(){!this.isDragging&&null!==this.dragFromIndex&&this.activeItem&&(this.isDragging=!0,this.onDragDrop("start"))}syncActiveVisual(t){if(!this.activeItem)return;const e=this.getVisualElement(this.activeItem);e.style.transform=`translateY(${t.clientY-this.startY}px)`,e.style.position="relative",e.style.pointerEvents="none",e.style.boxShadow="0 4px 8px rgba(0, 0, 0, 0.15)",wt.setZIndex(e,"top")}updateDropTarget(t){if(null===this.dragFromIndex||!this.activeItem)return;const e=this.getItemFromComposedPath(t,!1);if(!e)return this.emitDragLeave(this.currentOverIndex,this.currentOverItem),this.currentOverItem=null,void(this.currentOverIndex=null);const i=this.getItemIndex(e),o=this.getResolvedDropIndex(e,t.clientY);this.currentOverItem!==e?(this.emitDragLeave(this.currentOverIndex,this.currentOverItem),this.currentOverItem=e,this.currentOverIndex=i,this.onDragDrop("enter")):this.currentOverIndex=i,this.dragToIndex=o,this.onDragDrop("over"),this.applyLayoutTransforms()}finishDrag(){var t,e,i;const o=this.dragFromIndex,l=this.dragToIndex,n=this.isDragging&&null!=o&&o!==l,r=null!=o&&null!==(t=this.getItems().at(o))&&void 0!==t?t:null,s=this.currentOverItem;this.isDragging&&null!=o&&r&&this.onDragDrop("drop"),this.resetDragState(),n&&null!=o&&r&&(null===(i=(e=this.entry).onDragDrop)||void 0===i||i.call(e,{status:"end",options:{fromIndex:o,fromItem:r,toIndex:l,toItem:s}}))}resetDragState(){if(this.cachedItems.forEach((t=>{const e=this.cachedItemDraggableMap.get(t);if(!e)return;const{visualElement:i,inlineStyle:o}=e;null==o?i.removeAttribute("style"):i.setAttribute("style",o)})),this.activeItem){const t=this.getVisualElement(this.activeItem);wt.removeZIndex(t,"top")}this.activePointerId=null,this.activeItem=null,this.isDragging=!1,this.dragFromIndex=null,this.dragToIndex=null,this.currentOverItem=null,this.currentOverIndex=null,this.activeItemHeight=0,this.cachedItemDraggableMap=new WeakMap,this.cachedItems=[]}getContainer(){return this.entry.container()}queryItems(){const t=this.getContainer();return t?Array.from(t.querySelectorAll(this.entry.itemSelector)):[]}getItems(){return this.cachedItems.length>0?this.cachedItems:this.queryItems()}getItemIndex(t){return this.getItems().indexOf(t)}getVisualElement(t){const e=this.cachedItemDraggableMap.get(t);return e?e.visualElement:this.resolveVisualElement(t)}resolveVisualElement(t){var e,i;const o=this.entry.visualElementSelector;if(!o)return t;return(null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector(o))||(null!==(i=t.querySelector(o))&&void 0!==i?i:t)}cacheItems(){this.cachedItemDraggableMap=new WeakMap,this.cachedItems=this.queryItems(),this.cachedItems.forEach((t=>{const e=this.resolveVisualElement(t);this.cachedItemDraggableMap.set(t,{visualElement:e,inlineStyle:e.getAttribute("style")})}))}getItemFromComposedPath(t,e=!1){const i=this.entry.itemSelector,o=this.entry.triggerElementSelector;let l=null,n=!o;for(const e of t.composedPath())if(e instanceof HTMLElement&&(!l&&e.matches(i)&&(l=e),!n&&o&&e.matches(o)&&(n=!0),l&&n))break;return!l||e&&!n?null:l}applyLayoutTransforms(){if(null==this.dragFromIndex||null==this.dragToIndex||0===this.activeItemHeight)return;const t=this.dragFromIndex,e=this.dragToIndex,i=t<e?-this.activeItemHeight:this.activeItemHeight;this.getItems().forEach(((o,l)=>{o!==this.activeItem&&(this.getVisualElement(o).style.transform=(t<e?l>t&&l<=e:l>=e&&l<t)?`translateY(${i}px)`:"")}))}getResolvedDropIndex(t,e){const i=this.getItemIndex(t),o=this.dragFromIndex;if(i<0||null==o)return i;if(i===o)return i;const l=this.getVisualElement(t).getBoundingClientRect(),n=e>l.top+l.height/2;return i>o?n?i:i-1:n?i+1:i}isCurrentPointEvent(t){return null!==this.activePointerId&&this.activePointerId===t.pointerId}hasCrossedDragThreshold(t){return!!this.isDragging||Math.abs(t.clientX-this.startX)+Math.abs(t.clientY-this.startY)>=Ce.DRAG_THRESHOLD}emitDrag(){null!==this.dragFromIndex&&this.activeItem&&this.onDragDrop("drag")}emitDragLeave(t,e){null!==t&&e&&this.onDragDrop("leave")}onDragDrop(t){var e,i;null!=this.dragFromIndex&&this.activeItem&&(null===(i=(e=this.entry).onDragDrop)||void 0===i||i.call(e,{status:t,options:{fromIndex:this.dragFromIndex,fromItem:this.activeItem,toIndex:this.dragToIndex,toItem:this.currentOverItem}}))}}Ce.DRAG_THRESHOLD=4,Re([c("connectedCallback")],Ce.prototype,"connectedCallback",null),Re([c("disconnectedCallback")],Ce.prototype,"disconnectedCallback",null),Re([c("componentDidLoad")],Ce.prototype,"componentDidLoad",null);var Se=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ke extends a{constructor(){super(...arguments),this.draggableElementSlimmer=gt(ke,Ce,[{mapFrom:"rowDraggable",mapTo:"isDraggable"}],[{mapFrom:"watchRowDraggable",mapTo:"watchIsDraggable"}],[{container:this.getDragContainer.bind(this),itemSelector:"vega-table-row",triggerElementSelector:"td.vega-table-draggable-column",visualElementSelector:"tr.vega-table-row",onDragDrop:this.onDragDrop.bind(this)}])}connectedCallback(){}disconnectedCallback(){}componentDidLoad(){}watchRowDraggable(){}getDragContainer(){return this.isTemplateRenderMode?this.host.querySelector("vega-table-body"):this.vegaTableBodyRenderer.getTableBodyRef()}onDragDrop(t){this.rowDragDropEventEmitter.emit(t).defaultPrevented||"end"===t.status&&this.onDragEnd(t)}onDragEnd(t){const e=t.options.fromIndex,i=t.options.toIndex;if(this.vegaTableSortController.clearSorter(),this.isTemplateRenderMode){const t=Array.from(this.host.querySelectorAll("vega-table-row"));this.host.querySelector("vega-table-body").insertBefore(t[e],e>i?t[i]:t[i].nextSibling)}else{const t=[...this.vegaTableDataSourceController.getCurrentData()],[o]=t.splice(e,1);t.splice(i,0,o),this.vegaTableDataSourceController.setCurrentData(t)}}}Se([s()],ke.prototype,"rowDraggable",void 0),Se([s()],ke.prototype,"host",void 0),Se([s()],ke.prototype,"vegaTableDataSourceController",void 0),Se([s()],ke.prototype,"isTemplateRenderMode",void 0),Se([s()],ke.prototype,"vegaTableBodyRenderer",void 0),Se([s()],ke.prototype,"vegaTableSortController",void 0),Se([s()],ke.prototype,"rowDragDropEventEmitter",void 0),Se([h()],ke.prototype,"draggableElementSlimmer",void 0),Se([c("connectedCallback")],ke.prototype,"connectedCallback",null),Se([c("disconnectedCallback")],ke.prototype,"disconnectedCallback",null),Se([c("componentDidLoad")],ke.prototype,"componentDidLoad",null),Se([c("watchRowDraggable")],ke.prototype,"watchRowDraggable",null);var Ee=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class je extends a{constructor(){super(...arguments),this.templateHeadObserver=new st({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["group-key","parent-group-key","pinned","col-span"]},mutationFilter:dt("VEGA-TABLE-HEAD","VEGA-TABLE-HEAD-ROW","VEGA-TABLE-HEAD-CELL"),callback:()=>this.handleTemplateHeadStructureChange()}),this.observedTemplateHead=null,this.lastTemplateHeadStructureSnapshot=null}connectedCallback(){this.setTemplateGroupColumns(),this.lastTemplateHeadStructureSnapshot=this.getTemplateHeadStructureSnapshot(),this.registerTemplateHeadStructureObserver()}disconnectedCallback(){this.unRegisterTemplateHeadStructureObserver()}componentWillLoad(){this.setTemplateGroupColumns(),this.lastTemplateHeadStructureSnapshot=this.getTemplateHeadStructureSnapshot()}componentDidLoad(){this.registerTemplateHeadMaps(),w.notify(D.getSubject(this.host,N),{})}watchTemplateRenderMode(){this.setTemplateGroupColumns(),this.lastTemplateHeadStructureSnapshot=this.getTemplateHeadStructureSnapshot()}setTemplateGroupColumns(){this.templateGroupColumns=this.getTemplateGroupColumns()}handleTemplateHeadStructureChange(){const t=this.getTemplateHeadStructureSnapshot();this.isSameTemplateHeadStructure(t,this.lastTemplateHeadStructureSnapshot)||(this.lastTemplateHeadStructureSnapshot=t,this.setTemplateGroupColumns(),this.registerTemplateHeadStructureObserver(),this.registerTemplateHeadMaps())}getTemplateHeadStructureSnapshot(){if(!this.isTemplateRenderMode)return null;const t=this.getTemplateHead();return t?Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-ROW"===t.tagName)).flatMap(((t,e)=>Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-CELL"===t.tagName)).map(((t,i)=>({rowIndex:e,cellIndex:i,key:this.getCellProperty(t,"groupKey","group-key"),parentKey:this.getCellProperty(t,"parentGroupKey","parent-group-key"),pinned:this.getCellProperty(t,"pinned","pinned")}))))):null}isSameTemplateHeadStructure(t,e){return t===e||!(!t||!e)&&t.length===e.length&&t.every(((t,i)=>{const o=e[i];return t.rowIndex===o.rowIndex&&t.cellIndex===o.cellIndex&&t.key===o.key&&t.parentKey===o.parentKey&&t.pinned===o.pinned}))}registerTemplateHeadStructureObserver(){const t=this.getTemplateHead();t&&t!==this.observedTemplateHead&&(this.unRegisterTemplateHeadStructureObserver(),this.templateHeadStructureObserver||(this.templateHeadStructureObserver=new S((t=>Boolean(t&&t.host)),(()=>this.handleTemplateHeadStructureChange()))),w.register(D.getSubject(t,P),this.templateHeadStructureObserver),this.observedTemplateHead=t)}unRegisterTemplateHeadStructureObserver(){const t=this.observedTemplateHead;t&&this.templateHeadStructureObserver&&(w.unregister(D.getSubject(t,P),this.templateHeadStructureObserver),this.observedTemplateHead=null)}getTemplateHead(){return Array.from(this.host.children).find((t=>"VEGA-TABLE-HEAD"===t.tagName))}registerTemplateHeadMaps(){if(!this.isTemplateRenderMode)return;const t=this.getTemplateHead();if(!t)return;this.vegaTableRenderInputController.clearHeadRenderInputMaps();const e=this.vegaTableRenderInputController.getHeadRenderInputs()||[],i=new Map(e.flatMap((t=>t.iterator())).map((t=>[t.key,t]))),o=Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-ROW"===t.tagName)),l=this.vegaTableRenderInputController.getLeafRenderInputs()||[];o.forEach((t=>{const e=Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-CELL"===t.tagName)),o=e.some((t=>Boolean(this.getCellProperty(t,"groupKey","group-key")))),n=e.map(((t,e)=>{if(!o)return l[e]||null;const n=this.getCellProperty(t,"groupKey","group-key");return i.get(n)||null}));if(n.some((t=>!t)))return;const r=n;this.vegaTableRenderInputController.addHeadRowRenderInputMap(t,r),this.vegaTableRenderInputController.addRowRenderInputMap(t,"head"),e.forEach(((t,e)=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(t,r[e])}))}))}getTemplateGroupColumns(){if(!this.isTemplateRenderMode)return null;const t=this.getTemplateHead();if(!t)return null;const e=this.collectTemplateNodes(t);if(0===e.length)return null;if(e.every((t=>!t.key)))return this.getFlatPinnedColumns(e);if(e.some((t=>!t.key)))return[];const i=new Map(e.map((t=>[t.key,t])));if(i.size!==e.length)return[];if(!this.linkTemplateNodes(e,i))return[];const o=e.filter((t=>0===t.rowIndex));return this.dropNonEdgePinned(o),o.map((t=>this.toGroupColumnConfig(t)))}getFlatPinnedColumns(t){return t.some((t=>0!==t.rowIndex))?null:(this.dropNonEdgePinned(t),t.every((t=>!t.pinned))?null:t.map(((t,e)=>(t.key=String(e),this.toGroupColumnConfig(t)))))}dropNonEdgePinned(t){let e=0;for(;e<t.length&&"left"===t[e].pinned;)e++;let i=t.length-1;for(;i>=0&&"right"===t[i].pinned;)i--;t.forEach(((t,o)=>{"left"===t.pinned&&o<e||"right"===t.pinned&&o>i||(t.pinned=void 0)}))}collectTemplateNodes(t){return Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-ROW"===t.tagName)).flatMap(((t,e)=>Array.from(t.children).filter((t=>"VEGA-TABLE-HEAD-CELL"===t.tagName)).map(((t,i)=>({cell:t,key:this.getCellProperty(t,"groupKey","group-key"),rowIndex:e,cellIndex:i,children:[],pinned:this.getCellProperty(t,"pinned","pinned")})))))}linkTemplateNodes(t,e){var i;const o=new Map;for(const l of t){const t=this.getCellProperty(l.cell,"parentGroupKey","parent-group-key");if(0===l.rowIndex){if(t)return!1;continue}const n=e.get(t);if(!n||n.rowIndex!==l.rowIndex-1)return!1;if(n.cellIndex<(null!==(i=o.get(l.rowIndex))&&void 0!==i?i:-1))return!1;o.set(l.rowIndex,n.cellIndex),n.children.push(l)}return!0}toGroupColumnConfig(t){return 0===t.children.length?t.pinned?{key:t.key,label:(t.cell.textContent||"").trim(),pinned:t.pinned}:{key:t.key}:Object.assign(Object.assign({key:t.key,label:(t.cell.textContent||"").trim()},t.pinned?{pinned:t.pinned}:{}),{children:t.children.map((t=>this.toGroupColumnConfig(t)))})}getCellProperty(t,e,i){const o=(t[e]||t.getAttribute(i)||"").trim();return"pinned"===e?"left"===o||"right"===o?o:void 0:o}}Ee([s()],je.prototype,"host",void 0),Ee([s()],je.prototype,"isTemplateRenderMode",void 0),Ee([s({writable:!0})],je.prototype,"templateGroupColumns",void 0),Ee([s()],je.prototype,"vegaTableRenderInputController",void 0),Ee([h()],je.prototype,"templateHeadObserver",void 0),Ee([c("connectedCallback")],je.prototype,"connectedCallback",null),Ee([c("disconnectedCallback")],je.prototype,"disconnectedCallback",null),Ee([c("componentWillLoad")],je.prototype,"componentWillLoad",null),Ee([c("componentDidLoad")],je.prototype,"componentDidLoad",null),Ee([c("watchTemplateRenderMode")],je.prototype,"watchTemplateRenderMode",null);var De=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Te=class{constructor(t){l(this,t),this.vegaChange=n(this,"vegaChange",7),this.change=n(this,"change",7),this.vegaRowClick=n(this,"vegaRowClick",7),this.rowClick=n(this,"rowClick",7),this.vegaRowExpand=n(this,"vegaRowExpand",7),this.rowExpand=n(this,"rowExpand",7),this.vegaSelectChange=n(this,"vegaSelectChange",7),this.selectChange=n(this,"selectChange",7),this.vegaSelectAllChange=n(this,"vegaSelectAllChange",7),this.selectAllChange=n(this,"selectAllChange",7),this.vegaRowSelect=n(this,"vegaRowSelect",7),this.rowSelect=n(this,"rowSelect",7),this.vegaRowSelectAll=n(this,"vegaRowSelectAll",7),this.rowSelectAll=n(this,"rowSelectAll",7),this.vegaRowDragDrop=n(this,"vegaRowDragDrop",7),this.rowDragDrop=n(this,"rowDragDrop",7),this.globalSlimmers=new Map,this.translationSlimmer=new bt,this.vegaTableRenderModeController=new pe,this.vegaTableHeadTemplateStructureController=new je,this.vegaTableColumnStructureModelController=new fe,this.vegaTableRenderInputController=new me,this.vegaTablePinnedRenderer=new ye,this.vegaTableRenderer=new Zt,this.vegaTableHeaderRenderer=new _t,this.vegaTableBodyRenderer=new Vt,this.vegaTableRowRenderer=new ce,this.vegaTableCellRenderer=new Ot,this.vegaTableBodyColSpanController=new Nt,this.vegaTablePaginationRenderer=new Ft,this.vegaTableScrollContainerRenderer=new Yt,this.vegaTableRowSelectionController=new zt,this.vegaTableDataSourceController=new Gt,this.vegaTablePaginationController=new Qt,this.vegaTableEditableController=new ee,this.vegaTableSortController=new le,this.vegaTableColGroupRenderer=new re,this.vegaTableChildrenController=new ae,this.vegaTableRowDraggableController=new ke,this.vegaTableExpandRowController=new Wt,this.pageResizeObserverSlimmer=new ct,this.rowSelectionNotifySlimmer=ht(Te,"rowSelection","watchRowSelection"),this.expandableRowsNotifySlimmer=ht(Te,"expandableRows","watchExpandableRows"),this.hasExpandableRowNotifySlimmer=ht(Te,"hasExpandableRow","watchHasExpandableRow"),this.paddingXNotifySlimmer=ht(Te,"paddingX","watchPaddingX"),this.rowClickableNotifySlimmer=ht(Te,"rowClickable","watchRowClickable"),this.scrollConfigNotifySlimmer=ht(Te,"scrollConfig","watchScrollConfig"),this.eventsPrevent=new pt([_,H,F],(()=>this.host)),this.changeEventEmitter=ut(Te,_),this.selectChangeEventEmitter=ut(Te,X),this.selectAllChangeEventEmitter=ut(Te,U),this.rowClickEventEmitter=ut(Te,Y),this.rowExpandEventEmitter=ut(Te,q),this.rowDragDropEventEmitter=ut(Te,Z),this.rowDividerNotifySlimmer=ht(Te,"rowDivider","watchRowDivider"),this.columnDividerNotifySlimmer=ht(Te,"columnDivider","watchColumnDivider"),this.densityNotifySlimmer=ht(Te,"density","watchDensity"),this.isTemplateRenderModeNotifySlimmer=ht(Te,"isTemplateRenderMode","watchTemplateRenderMode"),this.currentDataNotifySlimmer=ht(Te,"currentData","watchCurrentData"),this.rowDraggableNotifySlimmer=ht(Te,"rowDraggable","watchRowDraggable"),this.vegaComponentUsageRuntimeMetricsSlimmer=new v(ue),this.rowSelectEventEmitter=ut(Te,J),this.rowSelectAllEventEmitter=ut(Te,Q),this.selectedRowKeySet=new Et(new Set,(t=>{this.selectedRowKeySet=t})),this.expandedRowKeySet=new Et(new Set,(t=>{this.expandedRowKeySet=t})),this.currentBreakpoint=rt(),this.sortersMap=new vt(new Map,(t=>{this.sortersMap=t})),this.currentData=[],this.currentPage=1,this.pageSize=10,this.editingRows=new Et(new Set,(t=>{this.editingRows=t})),this.isSelectedAll=!1,this.templateGroupColumns=null,this.expandableRows=[],this.hasExpandableRow=!1,this.columns=[],this.dataSource=[],this.rowSelection=null,this.rowExpandable=!1,this.rowClickable=!1,this.rowDraggable=!1,this.rowDivider=!1,this.columnDivider=!1,this.striped=!0,this.density="default",this.paddingX=["8px","8px"],this.showHeader=!0,this.pagination=null,this.emptyDescription="There is no data to display",this.rowKey="key",this.sortConfig={type:"multiple"},this.showEditError=!1}watchSelectedRowKeySet(){}watchSortersMap(){}watchCurrentData(t,e){}watchCurrentPage(){}watchSelectedAll(){}watchTemplateRenderMode(){}watchTemplateGroupColumns(){}watchColumnStructureModel(){}watchExpandableRows(){}watchHasExpandableRow(){}watchColumns(){}watchGroupColumns(){}watchDataSource(){}watchRowSelection(){}watchRowExpandable(){}watchRowClickable(){}watchRowDraggable(){}watchRowDivider(){}watchColumnDivider(){}watchStriped(){}watchDensity(){}watchPaddingX(){}watchPagination(){}watchScrollConfig(){}async openExpandRow(t){}async closeExpandRow(t){}async closeAllExpandRow(){}async toggleExpandRow(t){}async clearSelection(){}async getSelection(){return p()}async setSelection(t){}async startRowEditMode(t){}async stopRowEditMode(t){}async stopAllRowEditMode(){}async getRowData(t){return p(t)}async getRowsData(){return p()}async getFormRef(t){return p(t)}async addNewRow(t={}){return p(t)}async saveEditRow(t){return p(t)}async saveAllEditRows(){}async getEditingRowsKey(){return p()}async removeRow(t){}render(){return u(t("slot",null)),this.vegaTableRenderer.render()}get host(){return r(this)}static get watchers(){return{selectedRowKeySet:["watchSelectedRowKeySet"],sortersMap:["watchSortersMap"],currentData:["watchCurrentData"],currentPage:["watchCurrentPage"],isSelectedAll:["watchSelectedAll"],isTemplateRenderMode:["watchTemplateRenderMode"],templateGroupColumns:["watchTemplateGroupColumns"],columnStructureModel:["watchColumnStructureModel"],expandableRows:["watchExpandableRows"],hasExpandableRow:["watchHasExpandableRow"],columns:["watchColumns"],groupColumns:["watchGroupColumns"],dataSource:["watchDataSource"],rowSelection:["watchRowSelection"],rowExpandable:["watchRowExpandable"],rowClickable:["watchRowClickable"],rowDraggable:["watchRowDraggable"],rowDivider:["watchRowDivider"],columnDivider:["watchColumnDivider"],striped:["watchStriped"],density:["watchDensity"],paddingX:["watchPaddingX"],pagination:["watchPagination"],scrollConfig:["watchScrollConfig"]}}};De([b()],Te.prototype,"globalSlimmers",void 0),De([h()],Te.prototype,"translationSlimmer",void 0),De([h()],Te.prototype,"vegaTableRenderModeController",void 0),De([h()],Te.prototype,"vegaTableHeadTemplateStructureController",void 0),De([h()],Te.prototype,"vegaTableColumnStructureModelController",void 0),De([h()],Te.prototype,"vegaTableRenderInputController",void 0),De([h()],Te.prototype,"vegaTablePinnedRenderer",void 0),De([h()],Te.prototype,"vegaTableRenderer",void 0),De([h()],Te.prototype,"vegaTableHeaderRenderer",void 0),De([h()],Te.prototype,"vegaTableBodyRenderer",void 0),De([h()],Te.prototype,"vegaTableRowRenderer",void 0),De([h()],Te.prototype,"vegaTableCellRenderer",void 0),De([h()],Te.prototype,"vegaTableBodyColSpanController",void 0),De([h()],Te.prototype,"vegaTablePaginationRenderer",void 0),De([h()],Te.prototype,"vegaTableScrollContainerRenderer",void 0),De([h()],Te.prototype,"vegaTableRowSelectionController",void 0),De([h()],Te.prototype,"vegaTableDataSourceController",void 0),De([h()],Te.prototype,"vegaTablePaginationController",void 0),De([h()],Te.prototype,"vegaTableEditableController",void 0),De([h()],Te.prototype,"vegaTableSortController",void 0),De([h()],Te.prototype,"vegaTableColGroupRenderer",void 0),De([h()],Te.prototype,"vegaTableChildrenController",void 0),De([h()],Te.prototype,"vegaTableRowDraggableController",void 0),De([h()],Te.prototype,"vegaTableExpandRowController",void 0),De([h()],Te.prototype,"pageResizeObserverSlimmer",void 0),De([h()],Te.prototype,"rowSelectionNotifySlimmer",void 0),De([h()],Te.prototype,"expandableRowsNotifySlimmer",void 0),De([h()],Te.prototype,"hasExpandableRowNotifySlimmer",void 0),De([h()],Te.prototype,"paddingXNotifySlimmer",void 0),De([h()],Te.prototype,"rowClickableNotifySlimmer",void 0),De([h()],Te.prototype,"scrollConfigNotifySlimmer",void 0),De([h()],Te.prototype,"eventsPrevent",void 0),De([h()],Te.prototype,"changeEventEmitter",void 0),De([h()],Te.prototype,"selectChangeEventEmitter",void 0),De([h()],Te.prototype,"selectAllChangeEventEmitter",void 0),De([h()],Te.prototype,"rowClickEventEmitter",void 0),De([h()],Te.prototype,"rowExpandEventEmitter",void 0),De([h()],Te.prototype,"rowDragDropEventEmitter",void 0),De([h()],Te.prototype,"rowDividerNotifySlimmer",void 0),De([h()],Te.prototype,"columnDividerNotifySlimmer",void 0),De([h()],Te.prototype,"densityNotifySlimmer",void 0),De([h()],Te.prototype,"isTemplateRenderModeNotifySlimmer",void 0),De([h()],Te.prototype,"currentDataNotifySlimmer",void 0),De([h()],Te.prototype,"rowDraggableNotifySlimmer",void 0),De([h()],Te.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),De([h()],Te.prototype,"rowSelectEventEmitter",void 0),De([h()],Te.prototype,"rowSelectAllEventEmitter",void 0),Te.style=':host{display:block}table{width:100%;border-spacing:0}.vega-table-empty-description{text-align:center;padding:24px;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-table-empty-description{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-table-empty-description{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-table-empty-description{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}table.v-table-fixed{table-layout:fixed}.vega-table-scrollable-container{overflow:auto}.vega-table-scrollable-container vega-table-head{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.vega-table-scrollable-container.scrolled vega-table-head.fixed-header,.vega-table-scrollable-container.scrolled ::slotted(vega-table-head.fixed-header){box-shadow:0px 4px 0px rgba(0, 0, 0, 0.1);}.vega-table-scrollable-container.scrolled vega-table-foot.fixed-footer::after,.vega-table-scrollable-container.scrolled ::slotted(vega-table-foot.fixed-footer)::after{content:"";position:absolute;top:0;left:0;width:100%;height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1))}vega-form{display:contents}table:not(.show-edit-error) *::part(field-error-message){display:none !important}.vega-table-pagination-container{margin-top:24px}.vega-table-pagination-container.bottom-center{display:flex;justify-content:center}.vega-table-pagination-container.bottom-right{display:flex;justify-content:flex-end}.vega-table-pagination-container.bottom-left{display:flex;justify-content:flex-start}col.v-hidden{display:none;visibility:collapse}@media (min-width: 320px){col.S\\:v-table-column{display:table-column;visibility:visible}}@media (min-width: 768px){col.M\\:v-table-column{display:table-column;visibility:visible}}@media (min-width: 1024px){col.L\\:v-table-column{display:table-column;visibility:visible}}@media (min-width: 1440px){col.XL\\:v-table-column{display:table-column;visibility:visible}}:host(.is-group-table) .vega-table-scrollable-container{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-width:1px;border-style:solid}:host(.is-group-table.density-relaxed) .vega-table-scrollable-container{border-radius:12px}:host(.is-group-table.density-default) .vega-table-scrollable-container{border-radius:12px}:host(.is-group-table.density-compact) .vega-table-scrollable-container{border-radius:4px}:host(.is-pinned-table) table{min-width:max-content}.draggable-col{min-width:16px;width:16px}';var Oe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ae=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.childChangeEventPrevent=new pt([_],(()=>this.host)),this.vegaComponentUsageRuntimeMetricsSlimmer=new v}render(){return lt(t(o,null,t("tbody",null,t("slot",null))),this.host)}get host(){return r(this)}};Oe([b()],Ae.prototype,"globalSlimmers",void 0),Oe([h()],Ae.prototype,"childChangeEventPrevent",void 0),Oe([h()],Ae.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ae.style=":host{display:contents}";const Le=(t,e)=>t&&it(t)?`v-hidden ${t}:${e}`:"";var Me=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ne extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"density",parentStateName:"density"},{subStateName:"columnDivider",parentStateName:"columnDivider",callback:t=>{const e=this.host.parentElement;if(e){const i=e.querySelector("vega-table-cell:last-of-type");this.columnDivider=t&&i!==this.host}}},{subStateName:"clickable",parentStateName:"rowClickable"}]})}}Me([s()],Ne.prototype,"host",void 0),Me([s({writable:!0})],Ne.prototype,"density",void 0),Me([s({writable:!0})],Ne.prototype,"columnDivider",void 0),Me([s({writable:!0})],Ne.prototype,"clickable",void 0);var Ie=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class We extends mt{constructor(){super({parent:"vega-table-row",subStates:[{subStateName:"checked",parentStateName:"checked"},{subStateName:"expanded",parentStateName:"expanded"},{subStateName:"striped",parentStateName:"striped"},{subStateName:"rowDivider",parentStateName:"rowDivider"}]})}}Ie([s({writable:!0})],We.prototype,"checked",void 0),Ie([s({writable:!0})],We.prototype,"expanded",void 0),Ie([s({writable:!0})],We.prototype,"striped",void 0),Ie([s({writable:!0})],We.prototype,"rowDivider",void 0);var Be=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ze extends a{constructor(t){super(),this.observer=null,this.table=null,this.observerSubject=t}componentWillRenderInput(){this.renderInput=this.fetchRenderInput()}connectRenderInputObserver(){this.table=k(this.host,"vega-table"),this.table&&this.registerRenderInputChangeObserver()}disconnectRenderInputObserver(){this.table&&this.observer&&(this.unregisterRenderInputChangeObserver(),this.observer=null,this.table=null)}fetchRenderInput(){return this.table?O.call(D.getSubject(this.table,this.observerSubject),this.host):null}registerRenderInputChangeObserver(){this.observer=new S((()=>!0),(()=>{this.renderInput=this.fetchRenderInput(),e(this.host)})),w.register(D.getSubject(this.table,N),this.observer)}unregisterRenderInputChangeObserver(){w.unregister(D.getSubject(this.table,N),this.observer)}}Be([s()],ze.prototype,"host",void 0),Be([s({writable:!0})],ze.prototype,"renderInput",void 0),Be([c("componentWillRender")],ze.prototype,"componentWillRenderInput",null),Be([c("connectedCallback")],ze.prototype,"connectRenderInputObserver",null),Be([c("disconnectedCallback")],ze.prototype,"disconnectRenderInputObserver",null);var Ke=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ge=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableCellStateController=new Ne,this.vegaTableRowStateSubscriber=new We,this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.vegaTableRenderInputConsumerSlimmer=new ze(B),this.currentBreakpoint=rt(),this.ellipsisTooltipText="",this.ellipsisTooltipTrigger="none",this.ellipsisShowTooltip=!1,this.getCellOverflowClass=()=>{switch(this.overflow){case"ellipsis":return"vega-table-cell-ellipsis";case"scroll":return"vega-table-cell-scroll"}}}componentDidLoad(){"ellipsis"===this.overflow&&this.ellipsisShowTooltip&&requestAnimationFrame((()=>this.updateEllipsisState()))}render(){var e,i,l,n,r,s,a,d,c,h,p;const u=this.renderInput,v=null==u?void 0:u.pinned,b=null!==(e=null==u?void 0:u.leftOffsetPx)&&void 0!==e?e:0,f=null!==(i=null==u?void 0:u.rightOffsetPx)&&void 0!==i?i:0,g=Le(this.breakpoint,"v-table-cell"),w=(()=>{let t;switch(this.textAlign){case"center":t="v-text-center";break;case"left":t="v-text-left";break;case"right":t="v-text-right";break;default:t=""}return t})(),m=this.getCellOverflowClass(),x=[g,w,"vega-table-cell","left"===v&&"pinned-left","right"===v&&"pinned-right"];xt.isEnabled("VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE")||x.push("break-word"),((null===(l=this.renderInput)||void 0===l?void 0:l.isRightStartPinned)||(null===(n=this.renderInput)||void 0===n?void 0:n.isVisibleRightStartPinned))&&x.push("left-divider"),((null===(r=this.renderInput)||void 0===r?void 0:r.isLeftEndPinned)||(null===(s=this.renderInput)||void 0===s?void 0:s.isVisibleLeftEndPinned))&&x.push("right-divider"),((null===(a=this.renderInput)||void 0===a?void 0:a.isNoPinnedEnd)||(null===(d=this.renderInput)||void 0===d?void 0:d.isViewEnd)||(null===(c=this.renderInput)||void 0===c?void 0:c.isVisibleRightEndPinned))&&x.push("hide-right-border");const y=null!==(p=null===(h=this.renderInput)||void 0===h?void 0:h.visibleColSpan)&&void 0!==p?p:this.colSpan;return lt(t(o,{class:E([`density-${tt.formatCustom(this.density)}`,this.rowDivider&&"row-divider",this.columnDivider&&"column-divider",this.clickable&&"clickable",this.checked&&"checked",this.striped&&"striped",this.expanded&&"expanded"]),"aria-colspan":(null!=y?y:0)>1?String(y):null},t("td",{class:E(x),part:"cell",colSpan:(null!=y?y:0)>1?y:null,onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),style:{width:this.width,"--pinned-offset-left":"left"===v?`${b}px`:null,"--pinned-offset-right":"right"===v?`${f}px`:null}},"ellipsis"===this.overflow&&this.ellipsisShowTooltip?t("vega-tooltip",{text:this.ellipsisTooltipText,trigger:this.ellipsisTooltipTrigger,maxWidth:300,style:{display:"block",width:"100%",minWidth:"0"}},t("div",{class:m,ref:t=>{this.overflowContentRef=t}},t("slot",{ref:t=>{this.slotRef=t}}))):t("div",{class:m,ref:t=>{this.overflowContentRef=t}},t("slot",{ref:t=>{this.slotRef=t}})))),this.host)}onMouseEnter(){this.updateEllipsisState(),this.getRowCells().forEach((t=>t.classList.add("hovered")))}onMouseLeave(){this.getRowCells().forEach((t=>t.classList.remove("hovered")))}getRowCells(){const t=this.host.parentElement;return t?Array.from(t.querySelectorAll("vega-table-cell")):[]}updateEllipsisState(){if("ellipsis"!==this.overflow||!this.overflowContentRef)return;const t=this.overflowContentRef.scrollWidth>this.overflowContentRef.clientWidth,e=this.getCellText();this.ellipsisShowTooltip?(this.overflowContentRef.removeAttribute("title"),this.ellipsisTooltipText=e,this.ellipsisTooltipTrigger=t?"hover":"none"):t&&e?this.overflowContentRef.setAttribute("title",e):this.overflowContentRef.removeAttribute("title")}getCellText(){var t,e,i;return(this.slotRef&&"function"==typeof this.slotRef.assignedNodes?this.slotRef.assignedNodes({flatten:!0}):[]).map((t=>{var e;return(null===(e=t.textContent)||void 0===e?void 0:e.trim())||""})).filter((t=>t)).join(" ")||(null===(e=null===(t=this.overflowContentRef)||void 0===t?void 0:t.textContent)||void 0===e?void 0:e.trim())||(null===(i=this.host.textContent)||void 0===i?void 0:i.trim())||""}get host(){return r(this)}};Ke([b()],Ge.prototype,"globalSlimmers",void 0),Ke([h()],Ge.prototype,"vegaTableCellStateController",void 0),Ke([h()],Ge.prototype,"vegaTableRowStateSubscriber",void 0),Ke([h()],Ge.prototype,"pageResizeObserverSlimmer",void 0),Ke([h()],Ge.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ke([h()],Ge.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Ge.style=':host .vega-table-cell.v-hidden{display:none}@media (min-width: 320px){:host .vega-table-cell.S\\:v-table-cell{display:table-cell}}@media (min-width: 768px){:host .vega-table-cell.M\\:v-table-cell{display:table-cell}}@media (min-width: 1024px){:host .vega-table-cell.L\\:v-table-cell{display:table-cell}}@media (min-width: 1440px){:host .vega-table-cell.XL\\:v-table-cell{display:table-cell}}:host{display:contents}.vega-table-cell{padding:12px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-table-cell{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-table-cell{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-table-cell{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-table-cell.break-word{word-break:break-word}td{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:left;padding:0px;vertical-align:middle}td.v-text-center{text-align:center}td.v-text-left{text-align:left}td.v-text-right{text-align:right}:host(.density-default) .vega-table-cell{padding:12px}:host(.density-compact) .vega-table-cell{padding:4px}:host(.density-relaxed) .vega-table-cell{padding:16px}.vega-table-cell-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.vega-table-cell-scroll{overflow:auto}:host(.column-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}:host(.row-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host(.striped) .vega-table-cell{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.clickable.hovered:not(.checked)) .vega-table-cell{cursor:pointer;background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host(.checked) .vega-table-cell{background-color:rgba(var(--v-bg-table-selected-row, 204, 223, 255, 1))}:host(.expanded) .vega-table-cell{border-top-width:1px;border-left-width:0px;border-right-width:0px;border-bottom-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1))}:host .vega-table-cell.pinned-left{position:sticky;z-index:1;left:var(--pinned-offset-left, 0)}:host .vega-table-cell.pinned-right{position:sticky;z-index:1;right:var(--pinned-offset-right, 0)}:host .vega-table-cell.right-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:2px;border-right-style:solid}:host .vega-table-cell.left-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-left-width:2px;border-left-style:solid}:host .vega-table-cell.hide-right-border{border-right-width:0px}';var Pe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ve extends a{render(){var e,i,o,l,n,r,s,a,d,c;return t("tr",{class:{"vega-table-expanded-row":!0,expanded:this.expanded,checked:this.checked,striped:this.striped},key:`vega-table-expanded-row-${this.rowKey}`,"data-expanded-row-key":this.rowKey},t("td",{class:{"pinned-left":null===(e=this.renderInput)||void 0===e?void 0:e.hasLeftPinnedColumn}}),t("td",{colSpan:this.colSpan,key:`${Wt.expandRowSlotNamePrefix}${this.rowKey}`,class:"vega-table-expanded-row-slot-container"},t("div",{class:{"expanded-row-slot-inner":!0,"pinned-left":(null===(i=this.renderInput)||void 0===i?void 0:i.hasLeftPinnedColumn)||(null===(o=this.renderInput)||void 0===o?void 0:o.hasRightPinnedColumn)},style:{"--pinned-offset-left":`${null!==(n=null===(l=this.renderInput)||void 0===l?void 0:l.leftPaddingPx)&&void 0!==n?n:0}px`,"--expand-row-content-width":`calc(var(--vega-table-content-width, 0px) - ${null!==(s=null===(r=this.renderInput)||void 0===r?void 0:r.leftPaddingPx)&&void 0!==s?s:0}px - ${null!==(d=null===(a=this.renderInput)||void 0===a?void 0:a.rightPaddingPx)&&void 0!==d?d:0}px - 2px)`}},t("slot",null))),t("td",{class:{"pinned-right":null===(c=this.renderInput)||void 0===c?void 0:c.hasRightPinnedColumn}}))}}Pe([s()],Ve.prototype,"rowKey",void 0),Pe([s()],Ve.prototype,"expanded",void 0),Pe([s()],Ve.prototype,"checked",void 0),Pe([s()],Ve.prototype,"colSpan",void 0),Pe([s()],Ve.prototype,"striped",void 0),Pe([s()],Ve.prototype,"renderInput",void 0);var $e=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class _e extends a{connectedCallback(){this.expandObserver=new S(this.isAcceptableTableExpandRowObserver.bind(this),(t=>{t.rowKey===this.rowKey&&(this.expanded=t.expanded)})),w.register(m,this.expandObserver)}disconnectedCallback(){w.unregister(m,this.expandObserver)}isAcceptableTableExpandRowObserver(t){return"VEGA-TABLE"===t.host.tagName?"VEGA-TABLE"===t.host.tagName&&t.host===k(this.host,"vega-table"):"VEGA-TABLE-ROW"===t.host.tagName?k(this.host,"vega-table")===k(t.host,"vega-table"):void 0}}function He(t){return"VEGA-TABLE-ROW"===t.host.tagName&&k(this.host,"vega-table")===k(t.host,"vega-table")}function Fe(t){return"VEGA-TABLE"===t.host.tagName&&t.host===k(this.host,"vega-table")}$e([s()],_e.prototype,"host",void 0),$e([s()],_e.prototype,"rowKey",void 0),$e([s({writable:!0})],_e.prototype,"expanded",void 0),$e([c("connectedCallback")],_e.prototype,"connectedCallback",null),$e([c("disconnectedCallback")],_e.prototype,"disconnectedCallback",null);var Xe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ue extends a{connectedCallback(){this.rowSelectionObserver=new S(He.bind(this),(t=>{t.rowKey===this.rowKey&&(this.checked=t.checked)})),w.register(x,this.rowSelectionObserver)}disconnectedCallback(){w.unregister(x,this.rowSelectionObserver)}}Xe([s({writable:!0})],Ue.prototype,"checked",void 0),Xe([s()],Ue.prototype,"host",void 0),Xe([s()],Ue.prototype,"rowKey",void 0),Xe([c("connectedCallback")],Ue.prototype,"connectedCallback",null),Xe([c("disconnectedCallback")],Ue.prototype,"disconnectedCallback",null);var Ye=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class qe extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"withMultipleSelection",parentStateName:"rowSelection",callback:t=>{if(t){const{type:e="multiple"}=t;this.withMultipleSelection="multiple"===e}else this.withMultipleSelection=!1}},{subStateName:"withRowDraggable",parentStateName:"rowDraggable"}]})}}Ye([s()],qe.prototype,"host",void 0),Ye([s({writable:!0})],qe.prototype,"withMultipleSelection",void 0),Ye([s({writable:!0})],qe.prototype,"withRowDraggable",void 0),Ye([s()],qe.prototype,"vegaTableExpandRowColSpanController",void 0);var Ze=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Je extends a{constructor(){super(...arguments),this.updateColSpan=()=>{this.colSpan=this.getVisibleColumnsNumber()+(this.withMultipleSelection?2:1)+(this.withRowDraggable?1:0)}}componentWillLoad(){this.updateColSpan()}watchCurrentBreakpoint(){this.updateColSpan()}watchWithMultipleSelection(){this.updateColSpan()}watchWithRowDraggable(){this.updateColSpan()}getVisibleColumnsNumber(){const t=k(this.host,"vega-table"),e=rt(),i=t.children&&Array.from(t.children).filter((t=>{var e;return!(null===(e=t.getAttribute("slot"))||void 0===e?void 0:e.startsWith("vega-table-expand-row-"))})).length>0?t.querySelectorAll("vega-table-row:nth-of-type(1) vega-table-cell"):t.shadowRoot.querySelectorAll("vega-table-row:nth-of-type(1) vega-table-cell");return Array.from(i).filter((t=>!t.breakpoint||"default"!==e&&yt[e]>=yt[t.breakpoint])).reduce(((t,e)=>{var i;const o=null!==(i=e.colSpan)&&void 0!==i?i:1;return t+(o>1?o:1)}),0)}}Ze([s()],Je.prototype,"host",void 0),Ze([s({writable:!0})],Je.prototype,"colSpan",void 0),Ze([s()],Je.prototype,"withMultipleSelection",void 0),Ze([s()],Je.prototype,"withRowDraggable",void 0),Ze([c("componentWillLoad")],Je.prototype,"componentWillLoad",null),Ze([c("watchCurrentBreakpoint")],Je.prototype,"watchCurrentBreakpoint",null),Ze([c("watchWithMultipleSelection")],Je.prototype,"watchWithMultipleSelection",null),Ze([c("watchWithRowDraggable")],Je.prototype,"watchWithRowDraggable",null);var Qe=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ti=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableExpandRowRenderer=new Ve,this.vegaTableExpandRowExpandController=new _e,this.vegaTableExpandRowSelectionController=new Ue,this.vegaTableExpandRowStateController=new qe,this.vegaTableExpandRowColSpanController=new Je,this.pageResizeObserverSlimmer=new ct,this.vegaTableRenderInputConsumerSlimmer=new ze(K),this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.currentBreakpoint=rt(),this.expanded=!1,this.checked=!1}watchCurrentBreakpoint(){}watchWithMultipleSelection(){}watchWithRowDraggable(){}render(){return u(t("slot",null)),lt(t(o,null,this.vegaTableExpandRowRenderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{currentBreakpoint:["watchCurrentBreakpoint"],withMultipleSelection:["watchWithMultipleSelection"],withRowDraggable:["watchWithRowDraggable"]}}};Qe([b()],ti.prototype,"globalSlimmers",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowRenderer",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowExpandController",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowSelectionController",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowStateController",void 0),Qe([h()],ti.prototype,"vegaTableExpandRowColSpanController",void 0),Qe([h()],ti.prototype,"pageResizeObserverSlimmer",void 0),Qe([h()],ti.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Qe([h()],ti.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ti.style=":host{display:contents}td.pinned-left,td.pinned-right,.expanded-row-slot-inner.pinned-left{position:sticky;z-index:1}td.pinned-left{left:0}td.pinned-right{right:0}.expanded-row-slot-inner.pinned-left{left:var(--pinned-offset-left, 0);width:var(--expand-row-content-width)}:host .vega-table-expanded-row.striped:not(.checked) td{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.v-hidden){display:none}.vega-table-expanded-row{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-table-expanded-row:not(.expanded){display:none}.vega-table-expanded-row.expanded td{border-bottom-width:1px;border-top-width:0px;border-right-width:0px;border-left-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1));padding:0px;vertical-align:middle}.vega-table-expanded-row.expanded td:first-of-type{border-left-width:1px;border-bottom-width:1px;border-top-left-radius:12px;border-bottom-left-radius:12px;border-top-left-radius:0px}.vega-table-expanded-row.expanded td:last-of-type{border-right-width:1px;border-bottom-width:1px;border-top-right-radius:12px;border-bottom-right-radius:12px;border-top-right-radius:0px}.vega-table-expanded-row.expanded td.vega-table-expanded-row-slot-container{border-top-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1))}.vega-table-expanded-row.expanded.checked{background-color:rgba(var(--v-bg-table-row-selected-expanded, 229, 239, 255, 1))}:host tr.is-pinned-row td:first-of-type{position:sticky;z-index:1;left:0px}:host tr.is-pinned-row td.vega-table-expanded-row-slot-container div{position:sticky;z-index:1;left:8px}";var ei=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ii extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"fixed",parentStateName:"scrollConfig",callback:t=>{this.fixed=t&&t.maxHeight&&!1!==t.fixedFooter}},{subStateName:"rowDivider",parentStateName:"rowDivider"}]})}handleDisconnectedCallback(){wt.removeZIndex(this.tableFootRef,"base")}handleTableFootRefChange(t){this.tableFootRef&&wt.removeZIndex(this.tableFootRef,"base"),this.fixed&&wt.setZIndex(t,"base"),this.tableFootRef=t}}ei([s()],ii.prototype,"host",void 0),ei([s({writable:!0})],ii.prototype,"fixed",void 0),ei([s({writable:!0})],ii.prototype,"rowDivider",void 0),ei([c("disconnectedCallback")],ii.prototype,"handleDisconnectedCallback",null);var oi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const li=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableFootStateController=new ii,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.childChangeEventPrevent=new pt([_],(()=>this.host)),this.fixed=!1,this.rowDivider=!1}render(){return lt(t(o,{class:{"fixed-footer":this.fixed,"row-divider":this.rowDivider},ref:t=>this.vegaTableFootStateController.handleTableFootRefChange(t)},t("tfoot",null,t("slot",null))),this.host)}get host(){return r(this)}};oi([b()],li.prototype,"globalSlimmers",void 0),oi([h()],li.prototype,"vegaTableFootStateController",void 0),oi([h()],li.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),oi([h()],li.prototype,"childChangeEventPrevent",void 0),li.style=':host{display:table-footer-group;position:sticky;border-top-right-radius:12px;border-bottom-right-radius:12px;border-top-left-radius:12px;border-bottom-left-radius:12px}:host tfoot{display:contents}:host(.fixed-footer){bottom:0px}:host(.row-divider)::after{content:"";position:absolute;top:0;left:0;width:100%;height:1px;z-index:2;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1))}:host(.v-hidden){display:none}';var ni=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ri extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"density",parentStateName:"density"},{subStateName:"columnDivider",parentStateName:"columnDivider",callback:t=>{const e=this.host.parentElement;if(e){const i=e.querySelector("vega-table-foot-cell:last-of-type");this.columnDivider=t&&i!==this.host}}}]})}}ni([s({writable:!0})],ri.prototype,"density",void 0),ni([s({writable:!0})],ri.prototype,"columnDivider",void 0);var si=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ai extends a{render(){var e,i,o,l,n,r,s,a,d,c;const h=this.renderInput,p=null==h?void 0:h.pinned,u=null!==(e=null==h?void 0:h.visibleColSpan)&&void 0!==e?e:this.colSpan,v=null!==(i=null==h?void 0:h.leftOffsetPx)&&void 0!==i?i:0,b=null!==(o=null==h?void 0:h.rightOffsetPx)&&void 0!==o?o:0;return t("td",{class:{"vega-table-cell":!0,"pinned-left":"left"===p,"pinned-right":"right"===p,"right-divider":(null===(l=this.renderInput)||void 0===l?void 0:l.isLeftEndPinned)||(null===(n=this.renderInput)||void 0===n?void 0:n.isVisibleLeftEndPinned),"left-divider":(null===(r=this.renderInput)||void 0===r?void 0:r.isRightStartPinned)||(null===(s=this.renderInput)||void 0===s?void 0:s.isVisibleRightStartPinned),"hide-right-border":(null===(a=this.renderInput)||void 0===a?void 0:a.isNoPinnedEnd)||(null===(d=this.renderInput)||void 0===d?void 0:d.isViewEnd)||(null===(c=this.renderInput)||void 0===c?void 0:c.isVisibleRightEndPinned),"break-word":!xt.isEnabled("VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE"),[Le(this.breakpoint,"v-table-cell")]:!0},colSpan:(null!=u?u:0)>1?u:null,style:{width:this.width,"--pinned-offset-left":"left"===p?`${v}px`:null,"--pinned-offset-right":"right"===p?`${b}px`:null}},t("div",{class:E(["vega-table-column",this.textAlign])},t("span",{class:"vega-table-column-label"},t("slot",null))))}}si([s()],ai.prototype,"host",void 0),si([s()],ai.prototype,"breakpoint",void 0),si([s()],ai.prototype,"textAlign",void 0),si([s()],ai.prototype,"colSpan",void 0),si([s()],ai.prototype,"width",void 0),si([s()],ai.prototype,"renderInput",void 0);var di=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ci=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableFootCellStateController=new ri,this.vegaTableFootCellRenderer=new ai,this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.vegaTableRenderInputConsumerSlimmer=new ze(G),this.currentBreakpoint=rt()}render(){var e;let i=this.colSpan;return null!=(null===(e=this.renderInput)||void 0===e?void 0:e.visibleColSpan)&&(i=this.renderInput.visibleColSpan),lt(t(o,{class:{[`density-${tt.formatCustom(this.density)}`]:!0,"column-divider":this.columnDivider},"aria-colspan":(null!=i?i:0)>1?String(i):null},this.vegaTableFootCellRenderer.render()),this.host)}get host(){return r(this)}};di([b()],ci.prototype,"globalSlimmers",void 0),di([h()],ci.prototype,"vegaTableFootCellStateController",void 0),di([h()],ci.prototype,"vegaTableFootCellRenderer",void 0),di([h()],ci.prototype,"pageResizeObserverSlimmer",void 0),di([h()],ci.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),di([h()],ci.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),ci.style=':host .vega-table-cell.v-hidden{display:none}@media (min-width: 320px){:host .vega-table-cell.S\\:v-table-cell{display:table-cell}}@media (min-width: 768px){:host .vega-table-cell.M\\:v-table-cell{display:table-cell}}@media (min-width: 1024px){:host .vega-table-cell.L\\:v-table-cell{display:table-cell}}@media (min-width: 1440px){:host .vega-table-cell.XL\\:v-table-cell{display:table-cell}}:host{display:contents}td{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:left;vertical-align:middle;padding:12px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){td{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){td{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){td{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}td.break-word{word-break:break-word}.vega-table-column{display:flex;align-items:center}.vega-table-column.center{justify-content:center;text-align:center}.vega-table-column.right{justify-content:flex-end;text-align:right}.vega-table-column.left{justify-content:flex-start;text-align:left}.vega-table-column .vega-table-column-label{min-width:0px}:host(.density-default) .vega-table-cell{padding:12px}:host(.density-compact) .vega-table-cell{padding:4px}:host(.density-relaxed) .vega-table-cell{padding:16px}:host(.column-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}:host .vega-table-cell.pinned-left{position:sticky;z-index:1;left:var(--pinned-offset-left, 0)}:host .vega-table-cell.pinned-right{position:sticky;z-index:1;right:var(--pinned-offset-right, 0)}:host .vega-table-cell.right-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:2px;border-right-style:solid}:host .vega-table-cell.left-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-left-width:2px;border-left-style:solid}:host .vega-table-cell.hide-right-border{border-right-width:0px}';var hi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class pi extends a{constructor(){super(...arguments),this.renderFooterSelectionCell=()=>{const e=this.renderInput;if(null==e?void 0:e.showSelectionCell)return t("td",{class:{"vega-table-selection-column":!0,"pinned-left":e.hasLeftPinnedColumn}})},this.renderFooterExpandableCell=()=>{const e=this.renderInput;return(null==e?void 0:e.showExpandActionCell)&&t("td",{class:{"vega-table-expand-action-column":!0,"pinned-right":e.hasRightPinnedColumn}})},this.renderFooterDraggableCell=()=>{const e=this.renderInput;return(null==e?void 0:e.showDraggableCell)&&t("td",{class:{"vega-table-draggable-column":!0,"pinned-left":e.hasLeftPinnedColumn}})}}render(){var e,i;return t("tr",null,t("td",{class:{"pinned-left":null===(e=this.renderInput)||void 0===e?void 0:e.hasLeftPinnedColumn},style:{width:this.paddingX[0]}}),this.renderFooterDraggableCell(),this.renderFooterSelectionCell(),t("slot",null),this.renderFooterExpandableCell(),t("td",{class:{"pinned-right":null===(i=this.renderInput)||void 0===i?void 0:i.hasRightPinnedColumn},style:{width:this.paddingX[1]}}))}}hi([s()],pi.prototype,"host",void 0),hi([s()],pi.prototype,"paddingX",void 0),hi([s()],pi.prototype,"renderInput",void 0);var ui=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class vi extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"hasExpandableRow",parentStateName:"hasExpandableRow"},{subStateName:"paddingX",parentStateName:"paddingX"},{subStateName:"selectionType",parentStateName:"rowSelection",callback:t=>{this.updateSelectionType(t)}},{subStateName:"columnDivider",parentStateName:"columnDivider"},{subStateName:"density",parentStateName:"density"},{subStateName:"draggable",parentStateName:"rowDraggable"}]}),this.updateSelectionType=t=>{if(t){const{type:e}=t;this.selectionType=e}else this.selectionType=null}}}ui([s()],vi.prototype,"host",void 0),ui([s({writable:!0})],vi.prototype,"selectionType",void 0),ui([s({writable:!0})],vi.prototype,"paddingX",void 0),ui([s({writable:!0})],vi.prototype,"columnDivider",void 0),ui([s({writable:!0})],vi.prototype,"density",void 0),ui([s({writable:!0})],vi.prototype,"hasExpandableRow",void 0),ui([s({writable:!0})],vi.prototype,"draggable",void 0);var bi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const fi=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableFootRowStateController=new vi,this.vegaTableFootRowRenderer=new pi,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.pageResizeObserverSlimmer=new ct,this.vegaTableRenderInputConsumerSlimmer=new ze(z),this.currentBreakpoint=rt(),this.hasExpandableRow=!1}render(){var e,i,l,n,r;return u(t("slot",null)),lt(t(o,{class:{"column-divider":this.columnDivider,[`density-${tt.formatCustom(this.density)}`]:!0},style:{"--row-left-padding":`${null!==(i=null===(e=this.renderInput)||void 0===e?void 0:e.leftPaddingPx)&&void 0!==i?i:0}px`,"--row-right-padding":`${null!==(n=null===(l=this.renderInput)||void 0===l?void 0:l.rightPaddingPx)&&void 0!==n?n:0}px`,"--row-draggable-width":(null===(r=this.renderInput)||void 0===r?void 0:r.showDraggableCell)?"16px":"0px"}},this.vegaTableFootRowRenderer.render()),this.host)}get host(){return r(this)}};bi([b()],fi.prototype,"globalSlimmers",void 0),bi([h()],fi.prototype,"vegaTableFootRowStateController",void 0),bi([h()],fi.prototype,"vegaTableFootRowRenderer",void 0),bi([h()],fi.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),bi([h()],fi.prototype,"pageResizeObserverSlimmer",void 0),bi([h()],fi.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),fi.style=":host{display:contents}td{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));padding:0px;vertical-align:middle}td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}td.pinned-left,td.pinned-right{position:sticky;z-index:1}td.pinned-left:first-of-type{left:0}td.vega-table-draggable-column.pinned-left{left:var(--row-left-padding, 0px)}td.vega-table-selection-column.pinned-left{left:calc(var(--row-left-padding, 0px) + var(--row-draggable-width, 0px))}td.vega-table-expand-action-column.pinned-right{right:var(--row-right-padding, 0px)}td.pinned-right:last-of-type{right:0}:host(.density-default) td:first-of-type,:host(.density-relaxed) td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-default) td:last-of-type,:host(.density-relaxed) td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-compact) td:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.density-compact) td:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}.vega-table-expand-action-column{width:40px;min-width:40px}.vega-table-selection-column{width:40px;min-width:40px}";var gi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class wi extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"fixed",parentStateName:"scrollConfig",callback:t=>{this.fixed=t&&t.maxHeight&&!1!==t.fixedHeader}}]})}}gi([s()],wi.prototype,"host",void 0),gi([s({writable:!0})],wi.prototype,"fixed",void 0);var mi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const xi=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableHeadStateController=new wi,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.headCellEventPrevent=new pt([_],(()=>this.host)),this.fixed=!1,this.handleTableHeadRefChange=t=>{this.tableHeadRef&&wt.removeZIndex(this.tableHeadRef,"base"),this.fixed&&wt.setZIndex(t,"base"),this.tableHeadRef=t}}connectedCallback(){this.tableHeadRef&&this.fixed&&wt.setZIndex(this.tableHeadRef,"base")}disconnectedCallback(){wt.removeZIndex(this.tableHeadRef,"base")}render(){return lt(t(o,{class:{"fixed-header":this.fixed},ref:t=>this.handleTableHeadRefChange(t)},t("thead",null,t("slot",null))),this.host)}get host(){return r(this)}};mi([b()],xi.prototype,"globalSlimmers",void 0),mi([h()],xi.prototype,"vegaTableHeadStateController",void 0),mi([h()],xi.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),mi([h()],xi.prototype,"headCellEventPrevent",void 0),xi.style=":host{display:table-header-group;border-top-right-radius:12px;border-bottom-right-radius:12px;border-top-left-radius:12px;border-bottom-left-radius:12px}:host thead{display:contents}:host(.fixed-header){position:sticky;top:0px}";var yi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ri extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"density",parentStateName:"density"},{subStateName:"columnDivider",parentStateName:"columnDivider",callback:t=>{const e=this.host.parentElement;if(e){const i=e.querySelector("vega-table-head-cell:last-of-type");this.columnDivider=t&&i!==this.host}}}]})}}yi([s({writable:!0})],Ri.prototype,"density",void 0),yi([s({writable:!0})],Ri.prototype,"columnDivider",void 0);var Ci=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Si extends a{render(){if(!this.sorter)return;const{icon:e,color:i}=Si.SORT_ICON_MAP[this.sortOrder||"default"];return t("span",{class:"vega-table-column-sorter"},t("vega-icon",{color:i,icon:Ct.getIconKey(e),size:"size-12"}))}}Si.SORT_ICON_MAP={asc:{icon:"circle-arrow-up",color:"text-link"},desc:{icon:"circle-arrow-down",color:"text-link"},default:{icon:"arrow-up-arrow-down",color:"text-secondary"}},Ci([s()],Si.prototype,"sorter",void 0),Ci([s()],Si.prototype,"sortOrder",void 0);var ki=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ei extends a{disconnectedCallback(){const t=k(this.host,"vega-table-head");t&&w.unregister(D.getSubject(t,V),this.observer)}componentWillLoad(){const t=k(this.host,"vega-table-head");t&&(this.hostTable=k(t,"vega-table"),this.isTemplateRenderMode=this.checkIsTemplateRenderMode(),this.observer=new S(this.isAcceptableObserver.bind(this),this.observerListener.bind(this)),w.register(D.getSubject(t,V),this.observer))}notifyOtherHeadCellOnClickSort(){const t=k(this.host,"vega-table-head");t&&w.notify(D.getSubject(t,V),{host:this.host})}isAcceptableObserver(t){return t.host!==this.host}observerListener(){var t;this.isTemplateRenderMode&&"single"===(null===(t=this.hostTable.sortConfig)||void 0===t?void 0:t.type)&&(this.sortOrder=void 0)}checkIsTemplateRenderMode(){return Array.from(this.hostTable.children).some((t=>t.tagName.startsWith("VEGA-TABLE-")))}}ki([s()],Ei.prototype,"host",void 0),ki([s({writable:!0})],Ei.prototype,"sortOrder",void 0),ki([s()],Ei.prototype,"sortConfig",void 0),ki([c("disconnectedCallback")],Ei.prototype,"disconnectedCallback",null),ki([c("componentWillLoad")],Ei.prototype,"componentWillLoad",null);class ji extends a{notifyTemplateHeadStructureChange(){const t=k(this.host,"vega-table-head");t&&w.notify(D.getSubject(t,P),{host:this.host})}}!function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)}([s()],ji.prototype,"host",void 0);var Di=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ti=class{constructor(t){l(this,t),this.vegaClick=n(this,"vegaClick",7),this.click=n(this,"click",7),this.globalSlimmers=new Map,this.clickEventEmitter=ut(Ti,$),this.vegaTableHeadCellStateController=new Ri,this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.sortIconRenderer=new Si,this.vegaTableHeadCellSortConfigController=new Ei,this.vegaTableHeadCellTemplateStructureController=new ji,this.vegaTableRenderInputConsumerSlimmer=new ze(W),this.currentBreakpoint=rt(),this.handleSort=t=>{this.sortOrder=this.getNextSortOrder(this.sortOrder),this.clickEventEmitter.emit({sortOrder:this.sortOrder},t),this.vegaTableHeadCellSortConfigController.notifyOtherHeadCellOnClickSort()},this.getNextSortOrder=t=>{var e;const i=xt.isEnabled("VEGA_TABLE.REVERSE_SORT_ORDER")?["asc","desc"]:["desc","asc"],o=(null===(e=this.sortConfig)||void 0===e?void 0:e.disableUnsorted)?i:[...i,null];return o[(o.indexOf(t)+1)%o.length]}}watchPinned(){this.vegaTableHeadCellTemplateStructureController.notifyTemplateHeadStructureChange()}watchGroupKey(){this.vegaTableHeadCellTemplateStructureController.notifyTemplateHeadStructureChange()}watchParentGroupKey(){this.vegaTableHeadCellTemplateStructureController.notifyTemplateHeadStructureChange()}render(){var e,i,l,n,r,s,a,d,c,h,p,u;const v=this.renderInput,b=null==v?void 0:v.pinned,f=null!==(e=null==v?void 0:v.leftOffsetPx)&&void 0!==e?e:0,g=null!==(i=null==v?void 0:v.rightOffsetPx)&&void 0!==i?i:0,w=this.sorter?{role:"button",onKeyDown:Rt(),tabIndex:0,onClick:t=>this.handleSort(t)}:null;return lt(t(o,{class:{[`density-${tt.formatCustom(this.density)}`]:!0,sortable:!!this.sorter,"column-divider":this.columnDivider}},t("th",Object.assign({class:{"vega-table-cell":!0,"pinned-left":"left"===b,"pinned-right":"right"===b,"break-word":!xt.isEnabled("VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE"),"is-group-cell":null===(l=this.renderInput)||void 0===l?void 0:l.headHasGroupColumn,"hide-right-border":(null===(n=this.renderInput)||void 0===n?void 0:n.isViewEnd)||(null===(r=this.renderInput)||void 0===r?void 0:r.isNoPinnedEnd)||(null===(s=this.renderInput)||void 0===s?void 0:s.isVisibleRightEndPinned),"right-divider":(null===(a=this.renderInput)||void 0===a?void 0:a.isLeftEndPinned)||(null===(d=this.renderInput)||void 0===d?void 0:d.isVisibleLeftEndPinned),"left-divider":(null===(c=this.renderInput)||void 0===c?void 0:c.isRightStartPinned)||(null===(h=this.renderInput)||void 0===h?void 0:h.isVisibleRightStartPinned),[Le(this.breakpoint,"v-table-cell")]:!0}},w,{colSpan:null===(p=this.renderInput)||void 0===p?void 0:p.colSpan,rowSpan:null===(u=this.renderInput)||void 0===u?void 0:u.rowSpan,style:{width:this.width,"--pinned-offset-left":"left"===b?`${f}px`:null,"--pinned-offset-right":"right"===b?`${g}px`:null}}),t("div",{class:E(["vega-table-column",this.textAlign])},t("span",{class:"vega-table-column-label"},t("slot",null)),this.sortIconRenderer.render()))),this.host)}get host(){return r(this)}static get watchers(){return{pinned:["watchPinned"],groupKey:["watchGroupKey"],parentGroupKey:["watchParentGroupKey"]}}};Ct.register({"chevron-up":St,"chevron-down":kt,"arrow-up-arrow-down":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M489 377c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-55 55V56c0-13.3-10.7-24-24-24s-24 10.7-24 24V398.1l-55-55c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l96 96c9.4 9.4 24.6 9.4 33.9 0l96-96zM137 39c-9.4-9.4-24.6-9.4-33.9 0L7 135c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l55-55V456c0 13.3 10.7 24 24 24s24-10.7 24-24V113.9l55 55c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L137 39z"/></svg>'},"circle-arrow-down":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM127 281c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l71 71L232 136c0-13.3 10.7-24 24-24s24 10.7 24 24l0 182.1 71-71c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 393c-9.4 9.4-24.6 9.4-33.9 0L127 281z"/></svg>'},"circle-arrow-up":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM385 231c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-71-71V376c0 13.3-10.7 24-24 24s-24-10.7-24-24V193.9l-71 71c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 119c9.4-9.4 24.6-9.4 33.9 0L385 231z"/></svg>'}}),Di([b()],Ti.prototype,"globalSlimmers",void 0),Di([h()],Ti.prototype,"clickEventEmitter",void 0),Di([h()],Ti.prototype,"vegaTableHeadCellStateController",void 0),Di([h()],Ti.prototype,"pageResizeObserverSlimmer",void 0),Di([h()],Ti.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Di([h()],Ti.prototype,"sortIconRenderer",void 0),Di([h()],Ti.prototype,"vegaTableHeadCellSortConfigController",void 0),Di([h()],Ti.prototype,"vegaTableHeadCellTemplateStructureController",void 0),Di([h()],Ti.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Ti.style=':host .vega-table-cell.v-hidden{display:none}@media (min-width: 320px){:host .vega-table-cell.S\\:v-table-cell{display:table-cell}}@media (min-width: 768px){:host .vega-table-cell.M\\:v-table-cell{display:table-cell}}@media (min-width: 1024px){:host .vega-table-cell.L\\:v-table-cell{display:table-cell}}@media (min-width: 1440px){:host .vega-table-cell.XL\\:v-table-cell{display:table-cell}}:host{display:contents}:host(.sortable){cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.sortable:hover){background-color:rgba(var(--v-bg-table-row-hover, 241, 248, 251, 1))}th{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:left;vertical-align:middle;padding:0px;padding:12px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){th{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){th{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){th{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}th.break-word{word-break:break-word}.vega-table-column{display:flex;align-items:center}.vega-table-column.center{justify-content:center;text-align:center}.vega-table-column.right{justify-content:flex-end;text-align:right}.vega-table-column.left{justify-content:flex-start;text-align:left}.vega-table-column .vega-table-column-label{min-width:0px}.vega-table-column .vega-table-column-sorter{display:flex;align-items:center;justify-content:center;padding:2px;margin-left:8px;cursor:pointer;outline:none}:host(.density-default) .vega-table-cell{padding:12px}:host(.density-compact) .vega-table-cell{padding:4px}:host(.density-relaxed) .vega-table-cell{padding:16px}:host(.column-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}:host .vega-table-cell.pinned-left{position:sticky;z-index:1;left:var(--pinned-offset-left, 0)}:host .vega-table-cell.pinned-right{position:sticky;z-index:1;right:var(--pinned-offset-right, 0)}:host .vega-table-cell.is-group-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-bottom-width:1px;border-right-style:solid;border-bottom-style:solid}:host .vega-table-cell.hide-right-border{border-right-width:0px}:host .vega-table-cell.bottom-border{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host .vega-table-cell.right-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:2px;border-right-style:solid}:host .vega-table-cell.left-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-left-width:2px;border-left-style:solid}';var Oi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ai extends a{constructor(){super(...arguments),this.renderHeaderSelectionCell=e=>{if(e)return e.showSelectionCell&&t("th",{rowSpan:e.startRowSpan,class:{"vega-table-selection-column":!0,hidden:e.isStartHidden,"pinned-left":e.hasLeftPinnedColumn}},!this.hideSelectAll&&t("div",{class:"vega-table-checkbox-wrapper"},t("vega-checkbox",{size:"small",disabled:this.isEmptyTable||this.selectAllDisabled,checked:this.checkedAll,onClick:this.handleClick,ref:t=>{T.addUniqueObserverToNode(t,_,this.handleSelectAll)}})))},this.handleSelectAll=t=>{if("vegaChange"===t.eventName){const e=t.detail;et(e)&&e!==this.checkedAll&&w.notify(y,{host:this.host,checked:e})}},this.renderHeaderDraggableCell=e=>{if(e)return e.showDraggableCell&&t("th",{rowSpan:e.startRowSpan,class:{"vega-table-draggable-column":!0,hidden:e.isStartHidden,"pinned-left":e.hasLeftPinnedColumn}})},this.renderHeaderExpandableCell=e=>{if(e)return e.showExpandActionCell&&t("th",{rowSpan:e.endRowSpan,class:{"vega-table-expand-action-column":!0,hidden:e.isEndHidden,"pinned-right":e.hasRightPinnedColumn}})},this.handleClick=t=>{t.stopPropagation(),O.call(D.getSubject(k(this.host,"vega-table"),M),{host:this.host,checked:!this.checkedAll}).defaultPrevented&&t.preventDefault()}}connectedCallback(){}disconnectedCallback(){}componentDidLoad(){}render(){var e,i;const o=this.renderInput;return t("tr",{class:{"is-group-row":!!(null==o?void 0:o.startRowSpan),"is-pinned-row":(null==o?void 0:o.hasLeftPinnedColumn)||(null==o?void 0:o.hasRightPinnedColumn)}},t("th",{style:{width:null===(e=this.paddingX)||void 0===e?void 0:e[0]},rowSpan:null==o?void 0:o.startRowSpan,class:{hidden:null==o?void 0:o.isStartHidden,"pinned-left":null==o?void 0:o.hasLeftPinnedColumn}}),this.renderHeaderDraggableCell(o),this.renderHeaderSelectionCell(o),t("slot",null),this.renderHeaderExpandableCell(o),t("th",{style:{width:null===(i=this.paddingX)||void 0===i?void 0:i[1]},rowSpan:null==o?void 0:o.endRowSpan,class:{hidden:null==o?void 0:o.isEndHidden,"pinned-right":null==o?void 0:o.hasRightPinnedColumn}}))}}Oi([s()],Ai.prototype,"host",void 0),Oi([s()],Ai.prototype,"paddingX",void 0),Oi([s()],Ai.prototype,"hideSelectAll",void 0),Oi([s()],Ai.prototype,"selectAllDisabled",void 0),Oi([s()],Ai.prototype,"checkedAll",void 0),Oi([s()],Ai.prototype,"isEmptyTable",void 0),Oi([s()],Ai.prototype,"isTemplateRenderMode",void 0),Oi([s()],Ai.prototype,"renderInput",void 0),Oi([c("connectedCallback")],Ai.prototype,"connectedCallback",null),Oi([c("disconnectedCallback")],Ai.prototype,"disconnectedCallback",null),Oi([c("componentDidLoad")],Ai.prototype,"componentDidLoad",null);var Li=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Mi extends a{connectedCallback(){this.initRowSelectionAllObserver()}disconnectedCallback(){w.unregister(y,this.rowSelectionAllObserver)}initRowSelectionAllObserver(){this.rowSelectionAllObserver=new S(Fe.bind({host:this.host}),(t=>{this.checkedAll=t.noneChecked||!1!==t.checked?t.checked:null})),w.register(y,this.rowSelectionAllObserver)}}Li([s()],Mi.prototype,"host",void 0),Li([s({writable:!0})],Mi.prototype,"checkedAll",void 0),Li([c("connectedCallback")],Mi.prototype,"connectedCallback",null),Li([c("disconnectedCallback")],Mi.prototype,"disconnectedCallback",null);var Ni=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ii extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"hasExpandableRow",parentStateName:"hasExpandableRow"},{subStateName:"paddingX",parentStateName:"paddingX",callback:t=>{const e=k(this.host,"vega-table");0!==e.dataSource.length&&0!==e.columns.length||(this.paddingX=t)}},{subStateName:"selectionType",parentStateName:"rowSelection",callback:t=>{this.updateSelectionType(t)}},{subStateName:"columnDivider",parentStateName:"columnDivider"},{subStateName:"density",parentStateName:"density"},{subStateName:"isTemplateRenderMode",parentStateName:"isTemplateRenderMode"},{subStateName:"isEmptyTable",parentStateName:"currentData",callback:t=>{this.isEmptyTable=0===t.length}},{subStateName:"draggable",parentStateName:"rowDraggable"}]}),this.updateSelectionType=t=>{if(t){const{type:e="multiple"}=t;this.selectionType=e}else this.selectionType=null}}}Ni([s()],Ii.prototype,"host",void 0),Ni([s({writable:!0})],Ii.prototype,"hasExpandableRow",void 0),Ni([s({writable:!0})],Ii.prototype,"selectionType",void 0),Ni([s({writable:!0})],Ii.prototype,"paddingX",void 0),Ni([s({writable:!0})],Ii.prototype,"columnDivider",void 0),Ni([s({writable:!0})],Ii.prototype,"density",void 0),Ni([s({writable:!0})],Ii.prototype,"isTemplateRenderMode",void 0),Ni([s({writable:!0})],Ii.prototype,"isEmptyTable",void 0),Ni([s({writable:!0})],Ii.prototype,"draggable",void 0);var Wi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Bi=class{constructor(t){l(this,t),this.globalSlimmers=new Map,this.vegaTableHeadRowStateController=new Ii,this.vegaTableHeadRowRenderer=new Ai,this.vegaTableHeadRowController=new Mi,this.headCellEventPrevent=new pt([$],(()=>this.host),void 0,!0),this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.vegaTableRenderInputConsumerSlimmer=new ze(z),this.currentBreakpoint=rt(),this.hasExpandableRow=!1}render(){var e,i,l,n,r;return u(t("slot",null)),lt(t(o,{class:{"column-divider":this.columnDivider,[`density-${tt.formatCustom(this.density)}`]:!0},style:{"--row-left-padding":`${null!==(i=null===(e=this.renderInput)||void 0===e?void 0:e.leftPaddingPx)&&void 0!==i?i:0}px`,"--row-right-padding":`${null!==(n=null===(l=this.renderInput)||void 0===l?void 0:l.rightPaddingPx)&&void 0!==n?n:0}px`,"--row-draggable-width":(null===(r=this.renderInput)||void 0===r?void 0:r.showDraggableCell)&&!this.renderInput.isStartHidden?"16px":"0px"}},this.vegaTableHeadRowRenderer.render()),this.host)}get host(){return r(this)}};Wi([b()],Bi.prototype,"globalSlimmers",void 0),Wi([h()],Bi.prototype,"vegaTableHeadRowStateController",void 0),Wi([h()],Bi.prototype,"vegaTableHeadRowRenderer",void 0),Wi([h()],Bi.prototype,"vegaTableHeadRowController",void 0),Wi([h()],Bi.prototype,"headCellEventPrevent",void 0),Wi([h()],Bi.prototype,"pageResizeObserverSlimmer",void 0),Wi([h()],Bi.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Wi([h()],Bi.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Bi.style=":host{display:table-row}:host tr{display:contents}th{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));padding:0px;vertical-align:middle}th:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}th:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.column-divider) ::slotted(vega-table-head-cell:not(:last-of-type)){border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}.vega-table-checkbox-wrapper{display:flex;align-items:center;justify-content:center}:host(.density-default) th:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-default) th:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-compact) th:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.density-compact) th:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}:host(.density-relaxed) th:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-relaxed) th:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}.vega-table-expand-action-column{width:40px;min-width:40px}.vega-table-selection-column{width:40px;min-width:40px}:host tr.is-group-row th{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host tr.is-group-row th.hidden{display:none}:host tr.is-group-row th.vega-table-selection-column{border-right-width:1px;border-right-style:solid}:host tr.is-group-row th:first-of-type{border-top-left-radius:0px;border-bottom-left-radius:0px}:host tr.is-group-row th:last-of-type{border-top-right-radius:0px;border-bottom-right-radius:0px}:host tr.is-pinned-row th.pinned-left,:host tr.is-pinned-row th.pinned-right{position:sticky;z-index:1}:host tr.is-pinned-row th.pinned-left.pinned-left:first-of-type,:host tr.is-pinned-row th.pinned-right.pinned-left:first-of-type{left:0px}:host tr.is-pinned-row th.pinned-left.vega-table-draggable-column.pinned-left,:host tr.is-pinned-row th.pinned-right.vega-table-draggable-column.pinned-left{left:var(--row-left-padding, 8px)}:host tr.is-pinned-row th.pinned-left.vega-table-selection-column.pinned-left,:host tr.is-pinned-row th.pinned-right.vega-table-selection-column.pinned-left{left:calc(var(--row-left-padding, 8px) + var(--row-draggable-width, 0px))}:host tr.is-pinned-row th.pinned-left.vega-table-expand-action-column.pinned-right,:host tr.is-pinned-row th.pinned-right.vega-table-expand-action-column.pinned-right{right:var(--row-right-padding, 8px)}:host tr.is-pinned-row th.pinned-left.pinned-right:last-of-type,:host tr.is-pinned-row th.pinned-right.pinned-right:last-of-type{right:0px}";var zi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ki extends a{constructor(){super(...arguments),this.renderDragIcon=()=>{const e=this.renderInput;return(null==e?void 0:e.showDraggableCell)&&t("td",{class:{"vega-table-draggable-column":!0,"pinned-left":e.hasLeftPinnedColumn}},t("vega-flex",{alignItems:"center"},t("vega-icon",{icon:Ct.getIconKey("grip-dots-vertical"),color:"text-link"})))},this.renderRowSelection=()=>{const e=this.renderInput;if(null==e?void 0:e.showSelectionCell)return t("td",{class:{"vega-table-selection-column":!0,"pinned-left":e.hasLeftPinnedColumn}},t("div",{class:"vega-table-checkbox-wrapper"},t("vega-checkbox",{size:"small",checked:this.checked,onClick:this.handleClick,ref:t=>{T.addUniqueObserverToNode(t,_,this.onRowSelectionChange)}})))},this.renderExpandIcon=()=>{const e=this.renderInput;return(null==e?void 0:e.showExpandActionCell)&&t("td",{class:{"vega-table-expand-action-column":!0,"pinned-right":e.hasRightPinnedColumn}},t("div",{class:"vega-table-expand-icon-wrapper"},this.expandable&&t("vega-icon",{icon:Ct.getIconKey("chevron-down"),color:"text-link",onClick:this.onExpandIconClick})))},this.onRowClick=()=>{this.vegaTableRowClickController.handleRowClick()},this.onRowSelectionChange=t=>{"vegaChange"===t.eventName&&this.vegaTableRowSelectionController.handleRowSelect(t.detail)},this.handleClick=t=>{t.stopPropagation(),O.call(D.getSubject(this.parentTableRef,L),{host:this.host,rowKey:this.rowKey,checked:!this.checked}).defaultPrevented&&t.preventDefault()},this.onExpandIconClick=async t=>{t.stopPropagation();const e=this.expandEventEmitter.emit({expanded:!this.expanded,rowKey:this.rowKey});e&&!e.defaultPrevented&&this.vegaTableRowExpandController.handleExpandIconClick()}}connectedCallback(){this.setParentTableRef()}componentDidRender(){var t,e;const i=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".vega-table-draggable-column");this.host.style.setProperty("--row-draggable-width",`${null!==(e=null==i?void 0:i.getBoundingClientRect().width)&&void 0!==e?e:0}px`)}getParentTableRef(){return this.parentTableRef}render(){var e,o;const l=this.renderInput;return t(i,null,this.renderExpandRowSpace(this.rowKey),t("tr",{class:{"vega-table-row":!0,checked:this.checked,clickable:this.clickable,"current-clicked-row":this.clicked,"expand-row":this.expanded},onClick:this.clickable?this.onRowClick:null},t("td",{class:{"pinned-left":null==l?void 0:l.hasLeftPinnedColumn},style:{width:null===(e=this.paddingX)||void 0===e?void 0:e[0]}}),this.renderDragIcon(),this.renderRowSelection(),t("slot",null),this.renderExpandIcon(),t("td",{class:{"pinned-right":null==l?void 0:l.hasRightPinnedColumn},style:{width:null===(o=this.paddingX)||void 0===o?void 0:o[1]}})))}renderExpandRowSpace(e){return this.expandable&&t("tr",{key:`vega-table-expand-row-space-${e}`,class:"expand-row-space"})}setParentTableRef(){this.parentTableRef=k(this.host,"vega-table")}}Ct.register({"chevron-down":kt,"grip-dots-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M32 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm0 160a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM64 416A32 32 0 1 0 0 416a32 32 0 1 0 64 0zm96-288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 128a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM160 448a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></svg>'}}),zi([s()],Ki.prototype,"host",void 0),zi([s()],Ki.prototype,"rowKey",void 0),zi([s()],Ki.prototype,"checked",void 0),zi([s()],Ki.prototype,"clickable",void 0),zi([s()],Ki.prototype,"clicked",void 0),zi([s()],Ki.prototype,"expanded",void 0),zi([s()],Ki.prototype,"paddingX",void 0),zi([s()],Ki.prototype,"expandable",void 0),zi([s()],Ki.prototype,"vegaClick",void 0),zi([s()],Ki.prototype,"renderInput",void 0),zi([s()],Ki.prototype,"vegaTableRowSelectionController",void 0),zi([s()],Ki.prototype,"vegaTableRowExpandController",void 0),zi([s()],Ki.prototype,"vegaTableRowClickController",void 0),zi([s()],Ki.prototype,"expandEventEmitter",void 0),zi([c("connectedCallback")],Ki.prototype,"connectedCallback",null),zi([c("componentDidRender")],Ki.prototype,"componentDidRender",null);var Gi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Pi extends a{constructor(){super(...arguments),this.handleRowSelect=t=>{this.checked=t,w.notify(x,{host:this.host,checked:t,rowKey:this.rowKey})}}connectedCallback(){this.initRowSelectionObserver()}disconnectedCallback(){w.unregister(y,this.rowSelectionAllObserver),w.unregister(x,this.rowSelectionObserver)}setChecked(t){this.checked=t}initRowSelectionObserver(){this.rowSelectionAllObserver=new S(Fe.bind(this),(t=>{(t.checked||!1===t.checked&&t.noneChecked)&&(this.checked=t.checked)})),w.register(y,this.rowSelectionAllObserver),this.rowSelectionObserver=new S(Fe.bind(this),(t=>{t.rowKey===this.rowKey&&(this.checked=t.checked)})),w.register(x,this.rowSelectionObserver)}}Gi([s()],Pi.prototype,"host",void 0),Gi([s()],Pi.prototype,"selectionType",void 0),Gi([s()],Pi.prototype,"rowKey",void 0),Gi([s({writable:!0})],Pi.prototype,"checked",void 0),Gi([c("connectedCallback")],Pi.prototype,"connectedCallback",null),Gi([c("disconnectedCallback")],Pi.prototype,"disconnectedCallback",null);var Vi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class $i extends a{connectedCallback(){this.initRowExpandObserver()}disconnectedCallback(){w.unregister(m,this.rowExpandObserver)}handleExpandIconClick(){O.call(D.getSubject(this.vegaTableRowRenderer.getParentTableRef(),A),{host:this.host,rowKey:this.rowKey,expanded:!this.expanded}).defaultPrevented||(this.expanded=!this.expanded,w.notify(m,{host:this.host,rowKey:this.rowKey,expanded:this.expanded}))}initRowExpandObserver(){this.rowExpandObserver=new S(Fe.bind({host:this.host}),(t=>{t.rowKey===this.rowKey&&(this.expanded=t.expanded)})),w.register(m,this.rowExpandObserver)}}Vi([s()],$i.prototype,"host",void 0),Vi([s()],$i.prototype,"rowKey",void 0),Vi([s()],$i.prototype,"expandable",void 0),Vi([s({writable:!0})],$i.prototype,"expanded",void 0),Vi([s()],$i.prototype,"vegaTableRowRenderer",void 0),Vi([c("connectedCallback")],$i.prototype,"connectedCallback",null),Vi([c("disconnectedCallback")],$i.prototype,"disconnectedCallback",null);var _i=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Hi extends a{connectedCallback(){this.initRowClickObserver()}disconnectedCallback(){w.unregister(R,this.rowClickObserver)}handleRowClick(){O.call(D.getSubject(this.vegaTableRowRenderer.getParentTableRef(),L),{host:this.host,rowKey:this.rowKey,checked:!this.checked}).defaultPrevented||(w.notify(R,{host:this.host,rowKey:this.rowKey}),this.clickEventEmitter.emit({rowKey:this.rowKey}))}initRowClickObserver(){this.rowClickObserver=new S(He.bind(this),(t=>{this.clicked=t.host===this.host,"single"===this.selectionType&&this.vegaTableRowSelectionController.setChecked(t.host===this.host&&!this.checked)})),w.register(R,this.rowClickObserver)}}_i([s()],Hi.prototype,"host",void 0),_i([s()],Hi.prototype,"rowKey",void 0),_i([s({writable:!0})],Hi.prototype,"clicked",void 0),_i([s()],Hi.prototype,"checked",void 0),_i([s()],Hi.prototype,"selectionType",void 0),_i([s()],Hi.prototype,"vegaClick",void 0),_i([s()],Hi.prototype,"vegaTableRowSelectionController",void 0),_i([s()],Hi.prototype,"clickEventEmitter",void 0),_i([s()],Hi.prototype,"vegaTableRowRenderer",void 0),_i([c("connectedCallback")],Hi.prototype,"connectedCallback",null),_i([c("disconnectedCallback")],Hi.prototype,"disconnectedCallback",null);var Fi=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Xi extends mt{constructor(){super({parent:"vega-table",subStates:[{subStateName:"expandable",parentStateName:"expandableRows",callback:t=>{this.expandable=t.includes(this.rowKey)}},{subStateName:"hasExpandableRow",parentStateName:"hasExpandableRow"},{subStateName:"clickable",parentStateName:"rowClickable"},{subStateName:"paddingX",parentStateName:"paddingX",callback:t=>{const e=k(this.host,"vega-table");0!==e.dataSource.length&&0!==e.columns.length||(this.paddingX=t)}},{subStateName:"selectionType",parentStateName:"rowSelection",callback:t=>{if(t){const{type:e="multiple"}=t;this.selectionType=e}else this.selectionType=null}},{subStateName:"columnDivider",parentStateName:"columnDivider"},{subStateName:"density",parentStateName:"density"},{subStateName:"draggable",parentStateName:"rowDraggable"}]})}watchSelectionType(){this.updateClickable()}handleComponentWillLoad(){this.updateClickable()}updateClickable(){this.selectionType&&(this.clickable="single"===this.selectionType||this.clickable)}}Fi([s()],Xi.prototype,"host",void 0),Fi([s({writable:!0})],Xi.prototype,"expandable",void 0),Fi([s({writable:!0})],Xi.prototype,"hasExpandableRow",void 0),Fi([s({writable:!0})],Xi.prototype,"clickable",void 0),Fi([s({writable:!0})],Xi.prototype,"paddingX",void 0),Fi([s({writable:!0})],Xi.prototype,"selectionType",void 0),Fi([s({writable:!0})],Xi.prototype,"columnDivider",void 0),Fi([s({writable:!0})],Xi.prototype,"density",void 0),Fi([s({writable:!0})],Xi.prototype,"draggable",void 0),Fi([s()],Xi.prototype,"rowKey",void 0),Fi([c("watchSelectionType")],Xi.prototype,"watchSelectionType",null),Fi([c("componentWillLoad")],Xi.prototype,"handleComponentWillLoad",null);var Ui=function(t,e,i,o){var l,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(l=t[s])&&(r=(n<3?l(r):n>3?l(e,i,r):l(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Yi=class{constructor(t){l(this,t),this.vegaClick=n(this,"vegaClick",7),this.click=n(this,"click",7),this.vegaExpand=n(this,"vegaExpand",7),this.expand=n(this,"expand",7),this.globalSlimmers=new Map,this.vegaTableRowRenderer=new Ki,this.vegaTableRowSelectionController=new Pi,this.vegaTableRowExpandController=new $i,this.vegaTableRowClickController=new Hi,this.vegaTableRowStateController=new Xi,this.vegaTableRenderInputConsumerSlimmer=new ze(z),this.clickEventEmitter=ut(Yi,$),this.expandEventEmitter=ut(Yi,F),this.checkboxValueChangeEventPrevent=new pt([$],(()=>this.host),void 0,!0),this.pageResizeObserverSlimmer=new ct,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.checkedNotifySlimmer=ht(Yi,"checked","watchChecked"),this.expandedNotifySlimmer=ht(Yi,"expanded","watchExpanded"),this.stripedNotifySlimmer=ht(Yi,"striped","watchStriped"),this.rowDividerNotifySlimmer=ht(Yi,"rowDivider","watchRowDivider"),this.currentBreakpoint=rt(),this.hasExpandableRow=!1,this.draggable=!1}watchSelectionType(){}watchChecked(){}watchExpanded(){}watchStriped(){}watchRowDivider(){}render(){var e,i,l,n;return u(t("slot",null)),lt(t(o,{class:{"row-divider":this.rowDivider,"column-divider":this.columnDivider,striped:this.striped,[`density-${tt.formatCustom(this.density)}`]:!0},style:{"--row-left-padding":`${null!==(i=null===(e=this.renderInput)||void 0===e?void 0:e.leftPaddingPx)&&void 0!==i?i:0}px`,"--row-right-padding":`${null!==(n=null===(l=this.renderInput)||void 0===l?void 0:l.rightPaddingPx)&&void 0!==n?n:0}px`}},this.vegaTableRowRenderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{selectionType:["watchSelectionType"],checked:["watchChecked"],expanded:["watchExpanded"],striped:["watchStriped"],rowDivider:["watchRowDivider"]}}};Ui([b()],Yi.prototype,"globalSlimmers",void 0),Ui([h()],Yi.prototype,"vegaTableRowRenderer",void 0),Ui([h()],Yi.prototype,"vegaTableRowSelectionController",void 0),Ui([h()],Yi.prototype,"vegaTableRowExpandController",void 0),Ui([h()],Yi.prototype,"vegaTableRowClickController",void 0),Ui([h()],Yi.prototype,"vegaTableRowStateController",void 0),Ui([h()],Yi.prototype,"vegaTableRenderInputConsumerSlimmer",void 0),Ui([h()],Yi.prototype,"clickEventEmitter",void 0),Ui([h()],Yi.prototype,"expandEventEmitter",void 0),Ui([h()],Yi.prototype,"checkboxValueChangeEventPrevent",void 0),Ui([h()],Yi.prototype,"pageResizeObserverSlimmer",void 0),Ui([h()],Yi.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ui([h()],Yi.prototype,"checkedNotifySlimmer",void 0),Ui([h()],Yi.prototype,"expandedNotifySlimmer",void 0),Ui([h()],Yi.prototype,"stripedNotifySlimmer",void 0),Ui([h()],Yi.prototype,"rowDividerNotifySlimmer",void 0),Yi.style=":host{display:contents}:host(.v-hidden){display:none}td{padding:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));vertical-align:middle}td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}td.pinned-left,td.pinned-right{position:sticky;z-index:1}td.pinned-left:first-of-type{left:0}td.vega-table-draggable-column.pinned-left{left:var(--row-left-padding, 0px)}td.vega-table-selection-column.pinned-left{left:calc(var(--row-left-padding, 0px) + var(--row-draggable-width, 0px))}td.vega-table-expand-action-column.pinned-right{right:var(--row-right-padding, 0px)}td.pinned-right:last-of-type{right:0}:host(.striped) .vega-table-row:not(.checked):not(.clickable:hover) td{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.checked td{background-color:rgba(var(--v-bg-table-selected-row, 204, 223, 255, 1))}:not(.checked).clickable:hover{cursor:pointer}:not(.checked).clickable:hover td{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}.vega-table-checkbox-wrapper{display:flex;align-items:center;justify-content:center}.vega-table-row .vega-table-expand-icon-wrapper{display:flex;align-items:center;justify-content:center}.vega-table-row .vega-table-expand-icon-wrapper vega-icon{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;cursor:pointer}.vega-table-row.expand-row .vega-table-expand-icon-wrapper vega-icon{transform:rotate(180deg)}:host tr.expand-row td{border-top-width:1px;border-left-width:0px;border-right-width:0px;border-bottom-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1))}:host tr.expand-row td:first-of-type{border-left-width:1px;border-top-width:1px;border-bottom-left-radius:0px}:host tr.expand-row td:last-of-type{border-right-width:1px;border-top-width:1px;border-bottom-right-radius:0px}tr.expand-row-space{display:block;padding-top:8px}:host(.row-divider:not(:last-of-type)) td{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host(.row-divider:not(:last-of-type)) td:first-of-type,:host(.row-divider:not(:last-of-type)) td:last-of-type{border-radius:0px}:host(.density-default) td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-default) td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-default) tr.expand-row-space{display:block;padding-top:8px}:host(.density-compact) td:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.density-compact) td:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}:host(.density-compact) tr.expand-row-space{display:block;padding-top:4px}:host(.density-relaxed) td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-relaxed) td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-relaxed) tr.expand-row-space{display:block;padding-top:12px}.vega-table-expand-action-column{width:40px;min-width:40px}.vega-table-selection-column{width:40px;min-width:40px}.vega-table-draggable-column{width:16px;min-width:16px;cursor:move}";export{Te as vega_table,Ae as vega_table_body,Ge as vega_table_cell,ti as vega_table_expand_row,li as vega_table_foot,ci as vega_table_foot_cell,fi as vega_table_foot_row,xi as vega_table_head,Ti as vega_table_head_cell,Bi as vega_table_head_row,Yi as vega_table_row}
|