@globalpayments/vega 2.90.0 → 2.92.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-08924736.js → app-globals-2f326662.js} +23 -12
- package/dist/cjs/{aria-dialog-focusable-trap-slimmer-a0ff1263.js → aria-dialog-focusable-trap-slimmer-73b4c0cb.js} +1 -1
- package/dist/cjs/{child-nodes-event-prevent-slimmer-85a7fdb0.js → child-nodes-event-prevent-slimmer-b9a5b3e2.js} +2 -2
- package/dist/cjs/{code-block-89850671.js → code-block-6435d641.js} +32 -3
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-a8da4087.js → component-value-history-controller-slimmer.abstract-e4c9a5ba.js} +59 -4
- package/dist/cjs/{content-state-e1c3efe6.js → content-state-96ec9114.js} +33 -4
- package/dist/cjs/copy-d021c780.js +7 -0
- package/dist/cjs/{create-public-api-runtime-metrics-slimmer-122350c3.js → create-public-api-runtime-metrics-slimmer-91b0cbfb.js} +3 -2
- package/dist/cjs/{date-required-rule-3437acbc.js → date-required-rule-8c9e312b.js} +1 -1
- package/dist/cjs/{design-token-939bf72c.js → design-token-3548af29.js} +4 -4
- package/dist/cjs/{element-appender-slimmer-14e85a91.js → element-appender-slimmer-3bf69990.js} +4 -4
- package/dist/cjs/{event-emit-slimmer-146316b2.js → event-emit-slimmer-5bab10c2.js} +1 -1
- package/dist/cjs/{feature-flag-controller-5fa21654.js → feature-flag-controller-c19d0b58.js} +12 -0
- package/dist/cjs/{file-uploader-required-rule-313ec9e3.js → file-uploader-required-rule-5520bbec.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-c4ebee27.js → form-field-controller-slimmer-e0efac05.js} +3 -3
- package/dist/cjs/{icon-manager-e855446d.js → icon-manager-be358b32.js} +2 -2
- package/dist/cjs/{image-annotation-action-f86690fd.js → image-annotation-action-853f72c8.js} +4 -4
- package/dist/cjs/index-58ea899e.js +8 -4
- package/dist/cjs/index.cjs.js +34 -27
- package/dist/cjs/{inject-keyboard-manager-743de047.js → inject-keyboard-manager-0dccff1a.js} +1 -1
- package/dist/cjs/internal-calendar-period-factory-6187ec4c.js +78 -0
- package/dist/cjs/{internal-icon-manager-66c48800.js → internal-icon-manager-40bcac72.js} +1 -1
- package/dist/cjs/{internal-translation-controller-9785d4e8.js → internal-translation-controller-48ebfd0f.js} +19 -0
- package/dist/cjs/{internal-vega-event-manager-6e49d1ca.js → internal-vega-event-manager-7196a847.js} +3 -1
- package/dist/cjs/{keyboard-manager-5396083a.js → keyboard-manager-dfe8d924.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-eedcfbc8.js → keyboard-manager-slimmer-4a2560a1.js} +1 -1
- package/dist/cjs/{legend-input-processor-1e53e5bc.js → legend-input-processor-ce9b38f8.js} +1 -1
- package/dist/cjs/{link-extension-dafeeed0.js → link-extension-28d95849.js} +3 -3
- package/dist/cjs/loader.cjs.js +22 -20
- package/dist/cjs/month-view-generator-2e59b188.js +33 -0
- package/dist/cjs/{public-rules-b032050f.js → public-rules-8727c42c.js} +13 -11
- package/dist/cjs/{range-efdf6f78.js → range-5cb3d1e4.js} +25 -3
- package/dist/cjs/{replace-selected-text-action-0f7b7c78.js → replace-selected-text-action-a31563ed.js} +1 -1
- package/dist/cjs/{required-field-rule-d73c1d8c.js → required-field-rule-400690c3.js} +10 -1
- package/dist/cjs/{responsive-format-facade-d112aa9f.js → responsive-format-facade-98b89142.js} +2 -2
- package/dist/cjs/{rich-text-editor-required-rule-86d9cd4d.js → rich-text-editor-required-rule-8e4d577d.js} +1 -1
- package/dist/cjs/{split-cell-operation-b41344bd.js → split-cell-operation-9e3ab88d.js} +5 -5
- package/dist/cjs/{state-border-formatter-c3c9b90d.js → state-border-formatter-626b0a14.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-d51050cd.js → string-format-strategy.abstract-981f43e1.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-23fdb50e.js → string-input-formatter-slimmer-fc4a0ba5.js} +3 -3
- package/dist/cjs/{string-mask-strategy-10fe0f6d.js → string-mask-strategy-b47fa159.js} +2 -2
- package/dist/cjs/{style-formatter-11c95331.js → style-formatter-baf18624.js} +2 -2
- package/dist/cjs/{sub-state-notify-slimmer-450277b6.js → sub-state-notify-slimmer-18891389.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-5bfe8e97.js → sub-state-observer-slimmer-eee2f0ae.js} +1 -1
- package/dist/cjs/{time-required-rule-2fd7c828.js → time-required-rule-e77d174f.js} +1 -1
- package/dist/cjs/{token-extension-2e3e1631.js → token-extension-3aec039f.js} +1826 -211
- package/dist/cjs/{translation-slimmer-e8549aff.js → translation-slimmer-1e05769e.js} +1 -1
- package/dist/cjs/{type-guard-9917b11f.js → type-guard-7ab48d6c.js} +119 -4
- package/dist/cjs/{typography-4560e7f1.js → typography-3ea4fe41.js} +10 -10
- package/dist/cjs/{valid-credit-card-number-rule-8c541bcd.js → valid-credit-card-number-rule-52ba9c67.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +25 -17
- package/dist/cjs/vega-app-footer.cjs.entry.js +61 -7
- package/dist/cjs/vega-app-header-button.cjs.entry.js +14 -14
- package/dist/cjs/vega-banner.cjs.entry.js +9 -12
- package/dist/cjs/vega-bar-chart.cjs.entry.js +3 -3
- package/dist/cjs/vega-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-brand-logo.cjs.entry.js +3 -3
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +5 -5
- package/dist/cjs/vega-button-circle.cjs.entry.js +12 -12
- package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-button-link.cjs.entry.js +5 -5
- package/dist/cjs/vega-button.cjs.entry.js +10 -10
- package/dist/cjs/{vega-calendar_4.cjs.entry.js → vega-calendar_5.cjs.entry.js} +669 -398
- package/dist/cjs/vega-card.cjs.entry.js +7 -7
- package/dist/cjs/vega-carousel.cjs.entry.js +8 -8
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-chip.cjs.entry.js +11 -11
- package/dist/cjs/vega-code-block.cjs.entry.js +20 -23
- package/dist/cjs/vega-color-picker.cjs.entry.js +10 -8
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +15 -15
- package/dist/cjs/vega-color-swatch.cjs.entry.js +5 -5
- package/dist/cjs/vega-combo-box.cjs.entry.js +18 -18
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +26 -26
- package/dist/cjs/{vega-dialog-controller-6df7825e.js → vega-dialog-controller-16be85d5.js} +2 -2
- package/dist/cjs/vega-dialog_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-divider.cjs.entry.js +7 -7
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +17 -17
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/{vega-event-id-37c1716f.js → vega-event-id-df22d80e.js} +2 -0
- package/dist/cjs/vega-field-label.cjs.entry.js +16 -12
- package/dist/cjs/vega-file-uploader.cjs.entry.js +15 -13
- package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -10
- package/dist/cjs/vega-flex.cjs.entry.js +8 -8
- package/dist/cjs/vega-font.cjs.entry.js +14 -8
- package/dist/cjs/vega-form.cjs.entry.js +12 -12
- package/dist/cjs/vega-grid.cjs.entry.js +7 -7
- package/dist/cjs/vega-icon.cjs.entry.js +9 -9
- package/dist/cjs/vega-image-uploader.cjs.entry.js +17 -17
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +18 -18
- package/dist/cjs/vega-input-numeric.cjs.entry.js +15 -15
- package/dist/cjs/vega-input-passcode.cjs.entry.js +14 -14
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +15 -15
- package/dist/cjs/vega-input-range.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-select.cjs.entry.js +19 -27
- package/dist/cjs/vega-input.cjs.entry.js +20 -18
- package/dist/cjs/{vega-internal-event-id-e138d4d6.js → vega-internal-event-id-ecc5b87a.js} +2 -0
- package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +18 -18
- package/dist/cjs/vega-line-chart.cjs.entry.js +3 -3
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +4 -4
- package/dist/cjs/vega-pagination.cjs.entry.js +11 -11
- package/dist/cjs/vega-pie-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-radio_2.cjs.entry.js +15 -15
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +15 -15
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +243 -69
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +233 -0
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +9 -9
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +18 -18
- package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +14 -14
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +14 -14
- package/dist/cjs/vega-signature-capture.cjs.entry.js +18 -18
- package/dist/cjs/vega-stepper.cjs.entry.js +9 -9
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-table_11.cjs.entry.js +16 -16
- package/dist/cjs/vega-textarea.cjs.entry.js +11 -11
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +17 -17
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +7 -7
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +9 -9
- package/dist/cjs/vega.cjs.js +22 -20
- package/dist/cjs/{wait-for-component-did-render-762084fc.js → wait-for-component-did-render-02ca4bee.js} +1 -1
- package/dist/cjs/xmark-large-faae5a80.js +7 -0
- package/dist/cjs/{y-axis-input-processor-54a26515.js → y-axis-input-processor-d3a3839c.js} +1 -1
- package/dist/collection/collection-manifest.json +16 -8
- package/dist/collection/components/vega-accordion/slimmers/vega-accordion-renderer.js +11 -3
- package/dist/collection/components/vega-app-footer/slimmers/renderers/vega-app-footer-additional-links-renderer.js +45 -0
- package/dist/collection/components/vega-app-footer/vega-app-footer.js +63 -12
- package/dist/collection/components/vega-box/vega-box.js +3 -3
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.js +21 -24
- package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.js +13 -79
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-current-period-controller.js +153 -0
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-state-controller.js +32 -0
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/slimmers/renderers/vega-calendar-period-renderer.js +55 -0
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.css +20 -0
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.js +309 -0
- package/dist/collection/components/vega-calendar/vega-calendar.css +0 -9
- package/dist/collection/components/vega-calendar/vega-calendar.js +73 -1
- package/dist/collection/components/vega-code-block/slimmers/renderers/vega-code-block-copy-button-renderer.js +1 -1
- package/dist/collection/components/vega-combo-box/vega-combo-box.js +1 -1
- package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.js +5 -4
- package/dist/collection/components/vega-field-label/vega-field-label.css +20 -0
- package/dist/collection/components/vega-field-label/vega-field-label.js +6 -3
- package/dist/collection/components/vega-font/slimmers/controllers/vega-font-classes-controller.js +7 -0
- package/dist/collection/components/vega-font/vega-font.css +72 -10
- package/dist/collection/components/vega-input/vega-input.css +1 -0
- package/dist/collection/components/vega-input/vega-input.js +1 -1
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +1 -9
- package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
- package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.css +3 -1
- package/dist/collection/components/vega-rich-text-editor/assets/cut.js +3 -0
- package/dist/collection/components/vega-rich-text-editor/constants/constant.js +5 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-or-decorator-node-strategy.js +16 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +25 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/delete-selected-content-strategy.js +16 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/delete-selected-content-action.js +17 -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/content-state.js +2 -0
- package/dist/collection/components/vega-rich-text-editor/dto/range.js +24 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/copy/action-handler-strategies/copy-selected-content-strategy.js +226 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/copy/actions/copy-selected-content-action.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/copy/copy-extension.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/copy/copy-toolbar-button-renderer.js +58 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/cut/cut-extension.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/cut/cut-toolbar-button-renderer.js +44 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/assets/find-and-replace.js +3 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/find-replace-extension.js +18 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-controller.js +105 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-replace-controller.abstract.js +68 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/block-search-strategy.abstract.js +8 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/code-block-search-strategy.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/container-block-search-strategy.js +23 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/list-item-block-search-strategy.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/text-block-search-strategy.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.js +266 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-state.js +346 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/replace-controller.js +113 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.js +194 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/slimmers/renderers/find-replace-panel-renderer.js +153 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.css +50 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.js +156 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/public-api.js +4 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +133 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.js +35 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.js +93 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +9 -3
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +10 -1
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +2 -2
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +3 -10
- package/dist/collection/components/vega-textarea/vega-textarea.js +1 -1
- package/dist/collection/constants/tokens/typography.js +10 -10
- package/dist/collection/constants/ui.js +1 -0
- package/dist/collection/global/scripts/before-vega-load.js +14 -0
- package/dist/collection/helpers/calendar/calendar-period/day-period.js +9 -0
- package/dist/collection/helpers/calendar/calendar-period/internal-calendar-period-factory.js +76 -0
- package/dist/collection/helpers/calendar/calendar-period/month-period.js +9 -0
- package/dist/collection/helpers/calendar/calendar-period/vega-calendar-period-factory.js +19 -0
- package/dist/collection/helpers/calendar/calendar-period/week-period.js +14 -0
- package/dist/collection/helpers/calendar/index.js +1 -0
- package/dist/collection/helpers/common/wait-for-vega-handler.js +1 -1
- package/dist/collection/helpers/dialog/vega-dialog-controller.js +1 -1
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -1
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
- package/dist/collection/helpers/event-manager/vega-event-manager.js +1 -1
- package/dist/collection/helpers/feature-control/feature-flags-map.js +12 -0
- package/dist/collection/helpers/icon/icon-manager.js +1 -1
- package/dist/collection/helpers/loading-indicator/vega-loader-controller.js +1 -1
- package/dist/collection/helpers/notify/vega-notify-controller.js +1 -1
- package/dist/collection/helpers/public-api.js +1 -0
- package/dist/collection/helpers/skeleton-loader/vega-skeleton-loader-controller.js +1 -1
- package/dist/collection/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.js +3 -2
- package/dist/collection/helpers/theme/theme-manager.js +1 -1
- package/dist/collection/helpers/translation/locales/en.js +19 -0
- package/dist/collection/helpers/translation/translation.js +1 -1
- package/dist/collection/helpers/validator/rules/required-field-rule.js +10 -1
- package/dist/collection/helpers/zindex/vega-z-index-manager.js +1 -1
- package/dist/esm/{app-globals-a4134d21.js → app-globals-5e0d319a.js} +23 -12
- package/dist/esm/{aria-dialog-focusable-trap-slimmer-7db3d5a7.js → aria-dialog-focusable-trap-slimmer-9eae86c6.js} +1 -1
- package/dist/esm/{child-nodes-event-prevent-slimmer-1e3ac106.js → child-nodes-event-prevent-slimmer-f24618c5.js} +2 -2
- package/dist/esm/{code-block-9a17d89b.js → code-block-b71b2aa4.js} +32 -4
- package/dist/esm/{component-value-history-controller-slimmer.abstract-a64c3678.js → component-value-history-controller-slimmer.abstract-282df6e5.js} +59 -4
- package/dist/esm/{content-state-d59b4560.js → content-state-909099f8.js} +33 -4
- package/dist/esm/copy-54e45e2d.js +5 -0
- package/dist/esm/{create-public-api-runtime-metrics-slimmer-da6615bf.js → create-public-api-runtime-metrics-slimmer-48f85199.js} +3 -2
- package/dist/esm/{date-required-rule-cb960229.js → date-required-rule-15edb04a.js} +1 -1
- package/dist/esm/{design-token-f73ebce9.js → design-token-cb5ed6b9.js} +4 -4
- package/dist/esm/{element-appender-slimmer-c62cf540.js → element-appender-slimmer-e41120ee.js} +4 -4
- package/dist/esm/{event-emit-slimmer-3eb4d8ad.js → event-emit-slimmer-03deba18.js} +1 -1
- package/dist/esm/{feature-flag-controller-5ebc0cec.js → feature-flag-controller-3fd04ea9.js} +12 -0
- package/dist/esm/{file-uploader-required-rule-ad886d01.js → file-uploader-required-rule-96952e1a.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-514a3195.js → form-field-controller-slimmer-cfe1d8a7.js} +3 -3
- package/dist/esm/{icon-manager-691c8682.js → icon-manager-4ef3f6dd.js} +2 -2
- package/dist/esm/{image-annotation-action-f4ea265c.js → image-annotation-action-98232dc4.js} +4 -4
- package/dist/esm/index-090d31ca.js +8 -4
- package/dist/esm/index.js +29 -27
- package/dist/esm/{inject-keyboard-manager-6522df5c.js → inject-keyboard-manager-13cc77ab.js} +1 -1
- package/dist/esm/internal-calendar-period-factory-c3d70f3b.js +76 -0
- package/dist/esm/{internal-icon-manager-276f968f.js → internal-icon-manager-e7c57096.js} +1 -1
- package/dist/esm/{internal-translation-controller-653bd7e3.js → internal-translation-controller-8e8a514a.js} +19 -0
- package/dist/esm/{internal-vega-event-manager-a9758b6e.js → internal-vega-event-manager-75e5e3bb.js} +3 -1
- package/dist/esm/{keyboard-manager-9615fa9b.js → keyboard-manager-fe885db1.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-21bdc3a4.js → keyboard-manager-slimmer-61d4c79b.js} +1 -1
- package/dist/esm/{legend-input-processor-122008c5.js → legend-input-processor-3b2de4b7.js} +1 -1
- package/dist/esm/{link-extension-be164793.js → link-extension-f1a3bea7.js} +3 -3
- package/dist/esm/loader.js +22 -20
- package/dist/esm/month-view-generator-85eecb95.js +31 -0
- package/dist/esm/{public-rules-58f31834.js → public-rules-323bea4b.js} +13 -11
- package/dist/esm/{range-1c1c20fa.js → range-e63068d1.js} +25 -3
- package/dist/esm/{replace-selected-text-action-1abc5200.js → replace-selected-text-action-c0817b2b.js} +1 -1
- package/dist/esm/{required-field-rule-ab4bdc47.js → required-field-rule-897fe8d1.js} +10 -1
- package/dist/esm/{responsive-format-facade-12697af2.js → responsive-format-facade-fb424f5b.js} +2 -2
- package/dist/esm/{rich-text-editor-required-rule-050d292b.js → rich-text-editor-required-rule-0edb8ba7.js} +1 -1
- package/dist/esm/{split-cell-operation-8251d2a1.js → split-cell-operation-93b4d775.js} +5 -5
- package/dist/esm/{state-border-formatter-55cee24d.js → state-border-formatter-1a528ca4.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-14c1e874.js → string-format-strategy.abstract-72fc98aa.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-ec297247.js → string-input-formatter-slimmer-b0c480d8.js} +3 -3
- package/dist/esm/{string-mask-strategy-18760123.js → string-mask-strategy-4e00c173.js} +2 -2
- package/dist/esm/{style-formatter-6073ae27.js → style-formatter-5c1bea8d.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-d5a21bb3.js → sub-state-notify-slimmer-0f72ce74.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-d924288a.js → sub-state-observer-slimmer-64532d94.js} +1 -1
- package/dist/esm/{time-required-rule-9b775d24.js → time-required-rule-df500b14.js} +1 -1
- package/dist/esm/{token-extension-6cb7dcb2.js → token-extension-32d1fa56.js} +1823 -213
- package/dist/esm/{translation-slimmer-d32eb861.js → translation-slimmer-60408f13.js} +1 -1
- package/dist/esm/{type-guard-fd1f4760.js → type-guard-91087018.js} +117 -3
- package/dist/esm/{typography-396de03f.js → typography-19c3b9be.js} +10 -10
- package/dist/esm/{valid-credit-card-number-rule-dfd3e0a6.js → valid-credit-card-number-rule-681ecb75.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +25 -17
- package/dist/esm/vega-app-footer.entry.js +63 -9
- package/dist/esm/vega-app-header-button.entry.js +14 -14
- package/dist/esm/vega-banner.entry.js +8 -11
- package/dist/esm/vega-bar-chart.entry.js +3 -3
- package/dist/esm/vega-box.entry.js +8 -8
- package/dist/esm/vega-brand-logo.entry.js +3 -3
- package/dist/esm/vega-breadcrumb.entry.js +5 -5
- package/dist/esm/vega-button-circle.entry.js +12 -12
- package/dist/esm/vega-button-group_2.entry.js +8 -8
- package/dist/esm/vega-button-link.entry.js +5 -5
- package/dist/esm/vega-button.entry.js +10 -10
- package/dist/esm/{vega-calendar_4.entry.js → vega-calendar_5.entry.js} +666 -396
- package/dist/esm/vega-card.entry.js +7 -7
- package/dist/esm/vega-carousel.entry.js +8 -8
- package/dist/esm/vega-checkbox_2.entry.js +10 -10
- package/dist/esm/vega-chip.entry.js +11 -11
- package/dist/esm/vega-code-block.entry.js +19 -22
- package/dist/esm/vega-color-picker.entry.js +10 -8
- package/dist/esm/vega-color-swatch-picker.entry.js +15 -15
- package/dist/esm/vega-color-swatch.entry.js +5 -5
- package/dist/esm/vega-combo-box.entry.js +18 -18
- package/dist/esm/vega-date-picker_2.entry.js +26 -26
- package/dist/esm/{vega-dialog-controller-389e7f7c.js → vega-dialog-controller-726b74f9.js} +2 -2
- package/dist/esm/vega-dialog_2.entry.js +11 -11
- package/dist/esm/vega-divider.entry.js +7 -7
- package/dist/esm/vega-dropdown_5.entry.js +17 -17
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-92848bf5.js → vega-event-id-d3017041.js} +2 -1
- package/dist/esm/vega-field-label.entry.js +16 -12
- package/dist/esm/vega-file-uploader.entry.js +15 -13
- package/dist/esm/vega-flag-icon.entry.js +10 -10
- package/dist/esm/vega-flex.entry.js +8 -8
- package/dist/esm/vega-font.entry.js +14 -8
- package/dist/esm/vega-form.entry.js +12 -12
- package/dist/esm/vega-grid.entry.js +7 -7
- package/dist/esm/vega-icon.entry.js +9 -9
- package/dist/esm/vega-image-uploader.entry.js +17 -17
- package/dist/esm/vega-input-credit-card.entry.js +18 -18
- package/dist/esm/vega-input-numeric.entry.js +15 -15
- package/dist/esm/vega-input-passcode.entry.js +14 -14
- package/dist/esm/vega-input-phone-number.entry.js +15 -15
- package/dist/esm/vega-input-range.entry.js +10 -10
- package/dist/esm/vega-input-select.entry.js +19 -27
- package/dist/esm/vega-input.entry.js +20 -18
- package/dist/esm/{vega-internal-event-id-913e8be6.js → vega-internal-event-id-827eb1ce.js} +2 -1
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +18 -18
- package/dist/esm/vega-line-chart.entry.js +3 -3
- package/dist/esm/vega-loader-wrapper_2.entry.js +5 -5
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +4 -4
- package/dist/esm/vega-pagination.entry.js +11 -11
- package/dist/esm/vega-pie-chart.entry.js +2 -2
- package/dist/esm/vega-popover_2.entry.js +15 -15
- package/dist/esm/vega-progress-tracker_2.entry.js +11 -11
- package/dist/esm/vega-radio_2.entry.js +15 -15
- package/dist/esm/vega-rich-text-content.entry.js +15 -15
- package/dist/esm/vega-rich-text-editor_4.entry.js +243 -69
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +229 -0
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +9 -9
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +18 -18
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +14 -14
- package/dist/esm/vega-selection-tile_2.entry.js +11 -11
- package/dist/esm/vega-sidenav_3.entry.js +14 -14
- package/dist/esm/vega-signature-capture.entry.js +18 -18
- package/dist/esm/vega-stepper.entry.js +9 -9
- package/dist/esm/vega-tab-group_2.entry.js +5 -5
- package/dist/esm/vega-table_11.entry.js +16 -16
- package/dist/esm/vega-textarea.entry.js +11 -11
- package/dist/esm/vega-time-picker_2.entry.js +17 -17
- package/dist/esm/vega-toggle-switch.entry.js +7 -7
- package/dist/esm/vega-tooltip_2.entry.js +9 -9
- package/dist/esm/vega.js +22 -20
- package/dist/esm/{wait-for-component-did-render-b378bf16.js → wait-for-component-did-render-0c237cb8.js} +1 -1
- package/dist/esm/xmark-large-c5ae7944.js +5 -0
- package/dist/esm/{y-axis-input-processor-c7e05353.js → y-axis-input-processor-c6b2a914.js} +1 -1
- package/dist/sri/vega-sri-manifest.json +420 -404
- package/dist/types/components/vega-accordion/slimmers/vega-accordion-renderer.d.ts +2 -0
- package/dist/types/components/vega-app-footer/slimmers/renderers/vega-app-footer-additional-links-renderer.d.ts +13 -0
- package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +18 -1
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.d.ts +11 -6
- package/dist/types/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.d.ts +2 -29
- package/dist/types/components/vega-calendar/types.d.ts +7 -1
- package/dist/types/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-current-period-controller.d.ts +63 -0
- package/dist/types/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-state-controller.d.ts +10 -0
- package/dist/types/components/vega-calendar/vega-calendar-period-switcher/slimmers/renderers/vega-calendar-period-renderer.d.ts +11 -0
- package/dist/types/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.d.ts +82 -0
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +15 -1
- package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +2 -10
- package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.d.ts +1 -0
- package/dist/types/components/vega-field-label/types.d.ts +12 -0
- package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +5 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.d.ts +9 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/delete-selected-content-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/delete-selected-content-action.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -1
- package/dist/types/components/vega-rich-text-editor/dto/range.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/extensions/copy/action-handler-strategies/copy-selected-content-strategy.d.ts +79 -0
- package/dist/types/components/vega-rich-text-editor/extensions/copy/actions/copy-selected-content-action.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/copy/copy-extension.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/copy/copy-toolbar-button-renderer.d.ts +36 -0
- package/dist/types/components/vega-rich-text-editor/extensions/cut/cut-extension.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/extensions/cut/cut-toolbar-button-renderer.d.ts +24 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/assets/find-and-replace.d.ts +3 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/find-replace-extension.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-controller.d.ts +65 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-replace-controller.abstract.d.ts +65 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/block-search-strategy.abstract.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/code-block-search-strategy.d.ts +17 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/container-block-search-strategy.d.ts +21 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/list-item-block-search-strategy.d.ts +21 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/text-block-search-strategy.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.d.ts +88 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-state.d.ts +200 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/replace-controller.d.ts +73 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.d.ts +64 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/slimmers/renderers/find-replace-panel-renderer.d.ts +28 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.d.ts +56 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/function-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/languages/language-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/line-height/line-height-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/public-api.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.d.ts +60 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +22 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +2 -1
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +5 -2
- package/dist/types/components.d.ts +133 -6
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/global/icons/copy.d.ts +3 -0
- package/dist/types/helpers/calendar/calendar-period/calendar-period.abstract.d.ts +6 -0
- package/dist/types/helpers/calendar/calendar-period/day-period.d.ts +4 -0
- package/dist/types/helpers/calendar/calendar-period/internal-calendar-period-factory.d.ts +33 -0
- package/dist/types/helpers/calendar/calendar-period/month-period.d.ts +4 -0
- package/dist/types/helpers/calendar/calendar-period/vega-calendar-period-factory.d.ts +16 -0
- package/dist/types/helpers/calendar/calendar-period/week-period.d.ts +5 -0
- package/dist/types/helpers/calendar/index.d.ts +1 -0
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
- package/dist/types/helpers/feature-control/feature-flag.d.ts +3 -1
- package/dist/types/helpers/public-api.d.ts +1 -0
- package/dist/types/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.d.ts +2 -1
- package/dist/types/helpers/translation/interface.d.ts +20 -1
- package/dist/types/types/components.type.d.ts +1 -0
- package/dist/types/types/ui.type.d.ts +1 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-fcefb62c.js → p-0179f55d.js} +1 -1
- package/dist/vega/{p-44f81987.entry.js → p-06c2ce2c.entry.js} +1 -1
- package/dist/vega/{p-0cc4a052.entry.js → p-07b56f2b.entry.js} +1 -1
- package/dist/vega/{p-881622fd.js → p-136226f8.js} +1 -1
- package/dist/vega/{p-fe573f85.entry.js → p-18413b62.entry.js} +1 -1
- package/dist/vega/p-209e0166.js +1 -0
- package/dist/vega/{p-97e7da55.js → p-228c5de8.js} +1 -1
- package/dist/vega/{p-02492864.entry.js → p-22f73e6e.entry.js} +1 -1
- package/dist/vega/p-2314494a.entry.js +1 -0
- package/dist/vega/p-2353b64f.entry.js +1 -0
- package/dist/vega/p-29e3eb12.js +1 -0
- package/dist/vega/{p-d76cb9da.entry.js → p-2da12975.entry.js} +1 -1
- package/dist/vega/{p-b7c90543.js → p-2def8e3e.js} +1 -1
- package/dist/vega/{p-f9ae396b.entry.js → p-2e58d99e.entry.js} +1 -1
- package/dist/vega/{p-600f0316.entry.js → p-30561e1d.entry.js} +1 -1
- package/dist/vega/p-35df0f0a.entry.js +1 -0
- package/dist/vega/p-37dffdf6.entry.js +1 -0
- package/dist/vega/{p-740f3325.entry.js → p-3911e760.entry.js} +1 -1
- package/dist/vega/{p-3a93730e.js → p-3a68b729.js} +1 -1
- package/dist/vega/p-3cf4339a.entry.js +1 -0
- package/dist/vega/{p-46e0c6ca.js → p-3f183b52.js} +1 -1
- package/dist/vega/{p-6d99a0b3.entry.js → p-40501057.entry.js} +1 -1
- package/dist/vega/{p-d6422004.entry.js → p-438b7404.entry.js} +1 -1
- package/dist/vega/p-43c3848f.entry.js +1 -0
- package/dist/vega/{p-e8c5a446.entry.js → p-450bf94d.entry.js} +1 -1
- package/dist/vega/{p-a809b33a.js → p-45ab490c.js} +1 -1
- package/dist/vega/{p-a9a70696.entry.js → p-481601c0.entry.js} +1 -1
- package/dist/vega/p-4953bb1a.js +1 -0
- package/dist/vega/p-4d9061fb.js +1 -0
- package/dist/vega/{p-8d9c4338.entry.js → p-4e39adf5.entry.js} +1 -1
- package/dist/vega/{p-ed1dbc98.entry.js → p-5038b6d7.entry.js} +1 -1
- package/dist/vega/{p-8666f206.entry.js → p-5319da71.entry.js} +1 -1
- package/dist/vega/{p-c1c5bd2c.entry.js → p-53c76d9d.entry.js} +1 -1
- package/dist/vega/{p-6fec4d46.entry.js → p-5545a235.entry.js} +1 -1
- package/dist/vega/{p-0278cd2b.entry.js → p-56cf1a65.entry.js} +1 -1
- package/dist/vega/{p-6528739f.entry.js → p-5829a66d.entry.js} +1 -1
- package/dist/vega/p-590c8720.entry.js +1 -0
- package/dist/vega/{p-f0d6e2f2.js → p-5946fadf.js} +1 -1
- package/dist/vega/{p-328dbe8e.js → p-5beec481.js} +1 -1
- package/dist/vega/p-5de1acdb.js +1 -0
- package/dist/vega/p-5df9047c.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-724df1f5.js → p-6031bed1.js} +1 -1
- package/dist/vega/{p-8e34b266.js → p-6096ffc3.js} +1 -1
- package/dist/vega/{p-616d7096.entry.js → p-625351a3.entry.js} +1 -1
- package/dist/vega/p-683cfe24.js +1 -0
- package/dist/vega/{p-8258dc37.entry.js → p-68e16c70.entry.js} +1 -1
- package/dist/vega/{p-d7790113.js → p-70817cf5.js} +1 -1
- package/dist/vega/p-71e2a3ec.js +1 -0
- package/dist/vega/{p-c5621f60.entry.js → p-7798254d.entry.js} +1 -1
- package/dist/vega/{p-e4917e76.js → p-7b9ed949.js} +1 -1
- package/dist/vega/p-7be548a7.js +1 -0
- package/dist/vega/{p-2c7e1bcb.js → p-802bf369.js} +1 -1
- package/dist/vega/{p-dfda6e01.entry.js → p-82279b03.entry.js} +1 -1
- package/dist/vega/p-8509c140.entry.js +1 -0
- package/dist/vega/{p-dcf162e9.js → p-87a4d75f.js} +1 -1
- package/dist/vega/p-88a6c89a.js +1 -0
- package/dist/vega/p-890a5254.js +1 -0
- package/dist/vega/p-8aa07ed0.js +1 -0
- package/dist/vega/p-8b9a8603.entry.js +1 -0
- package/dist/vega/p-8bc15ed0.js +1 -0
- package/dist/vega/{p-277c306b.js → p-8d69b201.js} +1 -1
- package/dist/vega/p-8da860f6.js +1 -0
- package/dist/vega/{p-1827a459.entry.js → p-8f078d0d.entry.js} +1 -1
- package/dist/vega/p-916dfa7e.entry.js +1 -0
- package/dist/vega/p-9219201a.entry.js +1 -0
- package/dist/vega/{p-844b7826.js → p-92823583.js} +1 -1
- package/dist/vega/{p-788a7a5a.js → p-93dfab05.js} +1 -1
- package/dist/vega/{p-99545fd7.entry.js → p-9440a8a5.entry.js} +1 -1
- package/dist/vega/p-970115d6.js +1 -0
- package/dist/vega/{p-00d2a013.entry.js → p-9abf7d0a.entry.js} +1 -1
- package/dist/vega/{p-6845ed5c.entry.js → p-9b1d718c.entry.js} +1 -1
- package/dist/vega/{p-92e493ea.entry.js → p-9cdedcfb.entry.js} +1 -1
- package/dist/vega/{p-456890f5.entry.js → p-9fafc956.entry.js} +1 -1
- package/dist/vega/p-9fb3aeeb.entry.js +1 -0
- package/dist/vega/p-a268a4fb.entry.js +1 -0
- package/dist/vega/{p-d2916121.js → p-a2bd621e.js} +1 -1
- package/dist/vega/p-a361456d.js +1 -0
- package/dist/vega/p-aa32f2f3.js +1 -0
- package/dist/vega/{p-9a6bd32c.js → p-afcd8f04.js} +1 -1
- package/dist/vega/p-b438e68b.js +1 -0
- package/dist/vega/p-b6225d01.js +1 -0
- package/dist/vega/p-b6ebfd5c.entry.js +1 -0
- package/dist/vega/{p-0a1c7f80.js → p-b730bf6e.js} +1 -1
- package/dist/vega/p-b799fc1f.entry.js +1 -0
- package/dist/vega/{p-1be90bab.entry.js → p-c04a90d8.entry.js} +1 -1
- package/dist/vega/{p-465590d1.entry.js → p-c0629528.entry.js} +1 -1
- package/dist/vega/{p-f5c8024e.entry.js → p-c2e0f8b7.entry.js} +1 -1
- package/dist/vega/p-c67ce78c.entry.js +1 -0
- package/dist/vega/{p-4694fe27.entry.js → p-c78aeaf3.entry.js} +1 -1
- package/dist/vega/{p-7fe292af.entry.js → p-c78e8081.entry.js} +1 -1
- package/dist/vega/{p-bcd3bd79.entry.js → p-c8eaf91c.entry.js} +1 -1
- package/dist/vega/p-ca9852bb.js +1 -0
- package/dist/vega/{p-285e5e52.entry.js → p-cd1844ad.entry.js} +1 -1
- package/dist/vega/{p-1d16a7fa.entry.js → p-cd9fb2ca.entry.js} +1 -1
- package/dist/vega/{p-350d1b75.entry.js → p-ce7e9515.entry.js} +1 -1
- package/dist/vega/p-d0ce752f.entry.js +1 -0
- package/dist/vega/{p-88c29aae.entry.js → p-d20587b4.entry.js} +1 -1
- package/dist/vega/{p-bce9f489.entry.js → p-d3c8b871.entry.js} +1 -1
- package/dist/vega/{p-30487f0e.js → p-d7369441.js} +1 -1
- package/dist/vega/{p-c9c42a07.js → p-de885ef2.js} +1 -1
- package/dist/vega/{p-fd2a49be.entry.js → p-dee38163.entry.js} +1 -1
- package/dist/vega/{p-54141828.entry.js → p-e160a727.entry.js} +1 -1
- package/dist/vega/p-e371738b.js +1 -0
- package/dist/vega/{p-566ba295.js → p-e3803943.js} +1 -1
- package/dist/vega/p-e41d9d0e.entry.js +1 -0
- package/dist/vega/p-e5502873.entry.js +1 -0
- package/dist/vega/p-e8f50fc5.js +1 -0
- package/dist/vega/{p-850ea38b.entry.js → p-e9cee498.entry.js} +1 -1
- package/dist/vega/p-ea22cba0.js +1 -0
- package/dist/vega/p-ea54ce0a.js +3 -0
- package/dist/vega/p-ee3155bd.js +1 -0
- package/dist/vega/{p-99ea0fa0.entry.js → p-eee01ba7.entry.js} +1 -1
- package/dist/vega/{p-d0e7c14b.entry.js → p-ef2b9846.entry.js} +1 -1
- package/dist/vega/p-f0bc2bbb.js +1 -0
- package/dist/vega/p-f365601c.entry.js +1 -0
- package/dist/vega/p-f4a01959.js +1 -0
- package/dist/vega/{p-1b4abd76.entry.js → p-f515d189.entry.js} +1 -1
- package/dist/vega/p-f5aefb2f.entry.js +1 -0
- package/dist/vega/{p-581d89bb.entry.js → p-f6bccb06.entry.js} +1 -1
- package/dist/vega/p-f70f7ad8.entry.js +1 -0
- package/dist/vega/{p-c0a6ed53.entry.js → p-f7739cbb.entry.js} +1 -1
- package/dist/vega/{p-4386625c.entry.js → p-fc5dfb52.entry.js} +1 -1
- package/dist/vega/p-fd70418f.js +1 -0
- package/dist/vega/{p-1704ff25.js → p-ffdc25ec.js} +1 -1
- package/dist/vega/vega.css +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/style/vega.css +1 -1
- package/dist/cjs/month-view-generator-c7492e06.js +0 -101
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/delete-content-handler.js +0 -92
- package/dist/esm/month-view-generator-1b7c9bb8.js +0 -97
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/delete-content-handler.d.ts +0 -26
- package/dist/vega/p-018756ad.entry.js +0 -1
- package/dist/vega/p-0542b8ac.js +0 -1
- package/dist/vega/p-0bb860cc.js +0 -1
- package/dist/vega/p-1ee185d9.entry.js +0 -1
- package/dist/vega/p-203f4ce9.entry.js +0 -1
- package/dist/vega/p-2620a164.js +0 -1
- package/dist/vega/p-2649051e.entry.js +0 -1
- package/dist/vega/p-280cbcdb.js +0 -1
- package/dist/vega/p-30a6b7aa.entry.js +0 -1
- package/dist/vega/p-355ea330.entry.js +0 -1
- package/dist/vega/p-35d617d5.js +0 -1
- package/dist/vega/p-3755d8d3.entry.js +0 -1
- package/dist/vega/p-3e956269.entry.js +0 -1
- package/dist/vega/p-3ed6a602.js +0 -1
- package/dist/vega/p-44f39eee.js +0 -1
- package/dist/vega/p-46cab60a.js +0 -1
- package/dist/vega/p-47ffdc0f.entry.js +0 -1
- package/dist/vega/p-4fdd0a71.js +0 -1
- package/dist/vega/p-5a6e2c08.entry.js +0 -1
- package/dist/vega/p-5f048811.entry.js +0 -1
- package/dist/vega/p-667c980d.entry.js +0 -1
- package/dist/vega/p-6cedb325.js +0 -1
- package/dist/vega/p-716a393e.entry.js +0 -1
- package/dist/vega/p-73ce8fef.js +0 -1
- package/dist/vega/p-820ff54c.js +0 -1
- package/dist/vega/p-82c133aa.js +0 -1
- package/dist/vega/p-85dcd07b.js +0 -3
- package/dist/vega/p-8a054a13.js +0 -1
- package/dist/vega/p-8a34c08a.js +0 -1
- package/dist/vega/p-939c486f.entry.js +0 -1
- package/dist/vega/p-a58cacca.js +0 -1
- package/dist/vega/p-aae71499.entry.js +0 -1
- package/dist/vega/p-b0f55f5f.js +0 -1
- package/dist/vega/p-b5c08306.entry.js +0 -1
- package/dist/vega/p-b6be1f33.js +0 -1
- package/dist/vega/p-c596bb49.js +0 -1
- package/dist/vega/p-d871e8eb.entry.js +0 -1
- package/dist/vega/p-d884c644.js +0 -1
- package/dist/vega/p-d905159c.entry.js +0 -1
- package/dist/vega/p-e30a4f3e.js +0 -1
- package/dist/vega/p-eb927e2b.js +0 -1
- package/dist/vega/p-ecea4d24.js +0 -1
- package/dist/vega/p-f0b99c3a.entry.js +0 -1
- package/dist/vega/p-f251a907.entry.js +0 -1
- package/dist/vega/p-f70cfac5.entry.js +0 -1
- package/dist/vega/p-f830deb8.js +0 -1
- /package/dist/collection/{components/vega-code-block/assets → global/icons}/copy.js +0 -0
- /package/dist/types/components/{vega-code-block/assets/copy.d.ts → vega-rich-text-editor/assets/cut.d.ts} +0 -0
package/dist/vega/p-2620a164.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t}from"./p-8b5d3a52.js";import{a as e,g as n,D as i,f as a,r}from"./p-528748fa.js";import{L as s,I as o}from"./p-6e1ab235.js";import{I as l,c}from"./p-9a6bd32c.js";import{I as h}from"./p-781fd6e0.js";import{c as d}from"./p-6a334573.js";import{P as u}from"./p-81dd00d0.js";import{i as p}from"./p-46cab60a.js";import{V as w}from"./p-eb927e2b.js";import{U as f,V as g,B as b,E as m,h as v,I as y,R as x,a as L,P as C,A as S,b as k}from"./p-85dcd07b.js";import{R as T,a as A,b as E}from"./p-788a7a5a.js";import{M as O,A as I,R,a as N,b as j,c as D,d as _,I as B,e as M,f as H,s as V,g as P,h as K,i as z,B as F,j as $,k as q,C as G,l as W,m as U,n as Z,o as J,S as Q,U as X,N as Y,p as tt,q as et,r as nt}from"./p-35d617d5.js";import{i as it}from"./p-b0f55f5f.js";import{V as at}from"./p-724df1f5.js";import{v as rt}from"./p-4866e390.js";import{D as st,d as ot}from"./p-526e3634.js";import{V as lt,a as ct,b as ht,c as dt}from"./p-fcefb62c.js";import{R as ut,a as pt,S as wt,T as ft,b as gt,c as bt,d as mt,e as vt,C as yt,M as xt,f as Lt,g as Ct,h as St,i as kt,j as Tt,k as At,l as Et,m as Ot,n as It,o as Rt,p as Nt,q as jt,s as Dt,r as _t,t as Bt,I as Mt,u as Ht,v as Vt,w as Pt,x as Kt,y as zt,z as Ft,A as $t,B as qt,D as Gt,E as Wt,F as Ut,G as Zt,H as Jt,J as Qt,K as Xt,L as Yt,N as te,O as ee,P as ne,Q as ie,U as ae,W as re,X as se,Y as oe}from"./p-f830deb8.js";import{C as le}from"./p-2d0d575f.js";import{V as ce,a as he,b as de}from"./p-3a93730e.js";import{r as ue}from"./p-77e64f26.js";import{V as pe}from"./p-3e09aeed.js";import{t as we}from"./p-b75ee3ba.js";import{p as fe}from"./p-0c667d6a.js";import{c as ge}from"./p-a841cf13.js";import{d as be}from"./p-1bc5b3bc.js";import{R as me}from"./p-2c7e1bcb.js";const ve=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"close"===e,payloadValue:()=>!0}];class ye{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(ye,["load","close"],ve)}load(t={}){let e=t.containerSelector||"body",n=document.querySelector(e);if(n&&ye.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY.includes(n.tagName)&&(e="body",n=document.querySelector("body")),!n)return s.error("Container is not found by selector: ",e),null;const i=this.createLoadingIndicator(t.indicatorOptions),a=this.createLoader(e);return a.append(i),this.appendLoader(a,n)}close(t){const e=this.findLoader(t);if(e){if(e.dataset.container){const t=document.querySelector(e.dataset.container);t&&t.dataset.vegaLoaderOriginPosition&&(t.style.position=t.dataset.vegaLoaderOriginPosition)}e.remove()}}findLoader(t){var e,n;let i;if(t.includes(">>>")){const[a,r]=t.split(">>>");i=null===(n=null===(e=document.querySelector(a))||void 0===e?void 0:e.shadowRoot)||void 0===n?void 0:n.getElementById(r)}else i=document.getElementById(t);return i}createLoader(n){const i=document.createElement("vega-loader-wrapper");return i.className=e(["body"===n?"fixed-wrapper":"absolute-wrapper"]),i.dataset.container=n,i.id=`vega-loader-${t()}`,i}createLoadingIndicator(t={}){const e=document.createElement("vega-loading-indicator");return Object.assign(e,t),e}appendLoader(t,e){return e.dataset.vegaLoaderOriginPosition=e.style.position,e.style.position="relative",e.shadowRoot?(e.shadowRoot.append(t),`${t.dataset.container}>>>${t.id}`):(e.append(t),t.id)}}ye.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY=["VEGA-MODAL"],function(t,e,n,i){var a,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,n,s):a(e,n))||s);r>3&&s&&Object.defineProperty(e,n,s)}([l()],ye.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const xe=new ye,Le=[{payloadKey:"IS_OPEN_METHOD_CALLED",payloadDescription:"Indicate if the method open of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"open"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"close"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSEALL_METHOD_CALLED",payloadDescription:"Indicate if the method closeAll of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"closeAll"===e,payloadValue:()=>!0}];var Ce=function(t,e,n,i){var a,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,n,s):a(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class Se{constructor(){this.resizeObserverSlimmer=d(Se,u,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{var e;!(t[0].contentRect.height>0)&&(null===(e=this.container)||void 0===e?void 0:e.classList.contains("hydrated"))&&(h.removeZIndex(this.container,"top"),this.container.remove(),this.container=null)},target:()=>this.container}]),this.vegaPublicAPIRuntimeMetricsSlimmer=c(Se,["open","close","closeAll"],Le)}async open(t){const e=this.createPageNotification(t);return this.getContainer().append(e),e.id}async closeAll(){this.container&&Array.from(this.container.children).forEach((t=>{t.close()}))}async close(t){await document.getElementById(t).close()}connectResizeObserver(){}createPageNotification(e){const a=document.createElement("vega-page-notification");return Object.keys(e).forEach((t=>{void 0!==e[t]&&(a[t]=e[t])})),a.style.marginBottom=n()===i.MOBILE?"12px":"16px",a.id=`vega-page-notification-${t()}`,a}getContainer(){return this.container||(this.container=document.createElement("vega-page-notification-list"),h.setZIndex(this.container,"top"),n()===i.MOBILE?this.container.classList.add("vega-page-notification-list-bottom"):this.container.classList.add("vega-page-notification-list-topRight"),document.body.append(this.container),this.connectResizeObserver()),this.container}}Ce([o()],Se.prototype,"resizeObserverSlimmer",void 0),Ce([l()],Se.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const ke=new Se,Te=[{payloadKey:"IS_SETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method setSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method getSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETENABLEDEVENTIDSBYCOMPONENT_METHOD_CALLED",payloadDescription:"Indicate if the method getEnabledEventIdsByComponent of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getEnabledEventIdsByComponent"===e,payloadValue:()=>!0},{payloadKey:"globalEventIsNative",payloadDescription:"Indicate if the vega components will emit events without the vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||"native"!==t.global.namespace)},{payloadKey:"eventOfSpecificComponentsIsNative",payloadDescription:"Indicate if the vega components will emit events with the vega prefix, but special components will emit events without vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&"native"===e.components[t[0]].namespace)}return!1}},{payloadKey:"eventOfSpecificComponentsIsVega",payloadDescription:"Indicate if the vega components will emit events without the vega prefix, but special components will emit events with vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.global&&e.components){const t=Object.keys(e.components);return!!("native"===e.global.namespace&&t.length>0&&"vega"===e.components[t[0]].namespace)}return!1}},{payloadKey:"globalJqueryDelegatedEventIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||!0!==t.global.jqueryDelegatedEvent)},{payloadKey:"jqueryDelegatedEventIsCustomStrategy",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;return!!(e.global&&Array.isArray(e.global.jqueryDelegatedEvent)&&e.global.jqueryDelegatedEvent.length>0)}},{payloadKey:"jqueryDelegatedEventOfSpecialComponentsIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&!0===e.components[t[0]].jqueryDelegatedEvent)}return!1}}];class Ae{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Ae,["setSemantics","getSemantics","getEnabledEventIdsByComponent"],Te)}setSemantics(t){p.setSemantics(t)}getSemantics(t){return p.getSemantics(t)}getEnabledEventIdsByComponent(t){return p.getEnabledEventIdsByComponent(t)}}!function(t,e,n,i){var a,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,n,s):a(e,n))||s);r>3&&s&&Object.defineProperty(e,n,s)}([l()],Ae.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ee=new Ae,Oe=[{payloadKey:"IS_OVERRIDEZINDEXBASICVALUES_METHOD_CALLED",payloadDescription:"Indicate if the method overrideZIndexBasicValues of public API ZIndexManager is called",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:()=>!0},{payloadKey:"zIndexBasicValuesGreatThanTenThousand",payloadDescription:"Indicate if the basic z-index value is great than ten thousand",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:t=>t.base>1e4}];class Ie{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Ie,["overrideZIndexBasicValues"],Oe)}overrideZIndexBasicValues(t){h.overrideZIndexBasicValues(t)}}!function(t,e,n,i){var a,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,n,s):a(e,n))||s);r>3&&s&&Object.defineProperty(e,n,s)}([l()],Ie.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Re=new Ie,Ne=[{payloadKey:"IS_WAITFORVEGA_METHOD_CALLED",payloadDescription:"Indicate if the method waitForVega of public API WaitForVegaHandler is called",canAccept:(t,e)=>"WaitForVegaHandler"===t&&"handle"===e,payloadValue:()=>!0}];class je{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(je,["handle"],Ne)}async handle(){return await Promise.all(Array.from(document.querySelectorAll("*:not(.hydrated)")).filter((t=>t.tagName.startsWith("VEGA"))).map((t=>{var e;return null===(e=t.componentOnReady)||void 0===e?void 0:e.call(t)})))}}!function(t,e,n,i){var a,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,n,s):a(e,n))||s);r>3&&s&&Object.defineProperty(e,n,s)}([l()],je.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const De=new je,_e=async()=>De.handle(),Be=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOAD_METHOD_CALLED",payloadDescription:"Indicate if the method unLoad of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoad"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOADALL_METHOD_CALLED",payloadDescription:"Indicate if the method unLoadAll of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoadAll"===e,payloadValue:()=>!0}];class Me{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Me,["load","unLoad","unLoadAll"],Be),this.loaderMap=new Map}load({target:e,type:n="text",width:i,height:a,items:r,layout:s}){const o=Array.from(document.body.querySelectorAll(e)),l=`vega-skeleton-loader-${t()}`,c=[];return o.forEach((t=>{const e=r?r.map(this.createSkeleton):[this.createSkeleton({type:n,width:i,height:a})],o=(s?[this.wrapLayout(e,s)]:e).map((t=>(t.dataset[Me.LOADER_DATA_SET_KEY]=l,t)));c.push(...o),t.append(...o)})),this.loaderMap.set(l,c),l}unLoad(t){this.loaderMap.has(t)&&(this.loaderMap.get(t).forEach((t=>t.remove())),this.loaderMap.delete(t))}unLoadAll(){for(const t of this.loaderMap.values())t.forEach((t=>t.remove()));this.loaderMap.clear()}createSkeleton(t){const{type:e,width:n,height:i}=t,a=document.createElement("vega-skeleton");return Object.assign(a,{animated:!0,type:e,width:n,height:i}),a}wrapLayout(t,e){const n=document.createElement("vega-flex");return Object.assign(n,Object.assign({className:"vega-skeleton-loader-template-container"},e.props)),Object.assign(n.style,e.style),n.append(...t),n}}Me.LOADER_DATA_SET_KEY="vegaSkeletonLoaderKey",function(t,e,n,i){var a,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,n,s):a(e,n))||s);r>3&&s&&Object.defineProperty(e,n,s)}([l()],Me.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const He=new Me,Ve=[{payloadKey:"IS_INIT_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.init is called",canAccept:(t,e)=>"TranslationController"===t&&"init"===e,payloadValue:()=>!0},{payloadKey:"IS_CHANGE_LANGUAGE_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.changeLanguage is called",canAccept:(t,e)=>"TranslationController"===t&&"changeLanguage"===e,payloadValue:()=>!0}];class Pe{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Pe,["init","changeLanguage"],Ve)}get currentLanguage(){return w.currentLanguage}init(t){w.init(t)}changeLanguage(t){w.changeLanguage(t)}}!function(t,e,n,i){var a,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,n,s):a(e,n))||s);r>3&&s&&Object.defineProperty(e,n,s)}([l()],Pe.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ke=new Pe;class ze{constructor(){this.dropdownEl=null,this.itemsContainerEl=null,this.buttonEl=null}isHidden(t){return t.sourceEditMode}getExtensionContext(t){return T.getExtensionContext(t)}renderDropdown(t,e,n,i){return t("vega-dropdown",Object.assign({trigger:"click",searchable:!1,maxWidth:"200",itemDisplayRule:"ellipsis",ref:t=>{this.dropdownEl=t,st.addUniqueObserverToNode(t,lt,(t=>{this.handleDropdownClick(t.detail,e)}))}},n),i)}renderDropdownListTemplate(t,e,n){return t("div",{slot:"items",onMouseDown:this.preventDefault,onKeyDown:t=>this.handleItemsKeyDown(t),ref:t=>{this.itemsContainerEl=t},class:"rte-dropdown-list"},[t("style",{nonce:rt.nonce},".rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }"),...e.map((e=>"children"in e?this.renderDropdownGroup(t,e,n):this.renderDropdownItem(t,e,n)))])}renderDropdownItem(t,e,n){return t("vega-dropdown-item",{key:e.key,itemKey:e.key,label:n.translation.t(e.label),prefixIcon:e.icon})}renderDropdownGroup(t,e,n){return t("vega-dropdown-group",{key:e.key,label:n.translation.t(e.label),divide:!1},e.children.map((e=>"children"in e?this.renderDropdownGroup(t,e,n):this.renderDropdownItem(t,e,n))))}renderButton(t,e,n){const{icon:i,label:a,showArrowIcon:r,tooltip:s}=n,o=this.isDisabled(e),l=t("vega-rich-text-editor-toolbar-button",{disabled:o,icon:i,hidden:this.isHidden(e),selected:this.isSelected(e),ref:t=>{this.buttonEl=t,st.addUniqueObserverToNode(t,ct,(()=>this.handleButtonClick(e)))},onMouseDown:this.preventDefault,onKeyDown:t=>this.handleButtonKeyDown(t)},[this.renderButtonLabel(t,e,a),r?t("vega-icon",{size:"size-8",color:o?"text-disabled":"text-secondary",style:{marginLeft:"8px"},icon:at.getIconKey("chevron-down")}):null].filter(it));return(null==s?void 0:s.text)?t("vega-tooltip",{text:e.translation.t(s.text),placement:["bottom","top"]},[l]):l}renderButtonLabel(t,e,n){return n?t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary"},e.translation.t(n)):null}isDisabled(t){return t.host.disabled}isSelected(t){return!1}preventDefault(t){t.preventDefault()}getListItemByKey(t,e){for(const n of t)if("children"in n){const t=this.getListItemByKey(n.children,e);if(t)return t}else if(n.key===e)return n;return null}handleButtonKeyDown(t){this.dropdownEl&&("Enter"===t.code||"Space"===t.code?(t.preventDefault(),t.stopPropagation(),this.dropdownEl.dispatchEvent(new MouseEvent("click",{bubbles:!0}))):"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(t.preventDefault(),t.stopPropagation(),this.dropdownEl.show().then((()=>{this.focusDropdownItem("ArrowDown"===t.code?"first":"last")}))))}handleItemsKeyDown(t){var e,n,i;if("Escape"===t.code)return t.preventDefault(),t.stopPropagation(),this.dropdownEl&&this.dropdownEl.hide(),void(null===(e=this.buttonEl)||void 0===e||e.focus());if("ArrowDown"!==t.code&&"ArrowUp"!==t.code)return;t.preventDefault(),t.stopPropagation();const a=this.getDropdownItems();if(0===a.length)return;const r=a.findIndex((t=>{var e,n;return(null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))===(null===(n=t.shadowRoot)||void 0===n?void 0:n.activeElement)})),s="ArrowDown"===t.code?1:-1,o=-1===r?"ArrowDown"===t.code?0:a.length-1:r+s;for(let t=0;t<a.length;t++){const e=(o+t*s+a.length)%a.length;if(!a[e].disabled)return void(null===(i=null===(n=a[e].shadowRoot)||void 0===n?void 0:n.querySelector("li"))||void 0===i||i.focus())}}focusDropdownItem(t){var e,n;const i=this.getDropdownItems(),a="first"===t?i:[...i].reverse();for(const t of a)if(!t.disabled)return void(null===(n=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))||void 0===n||n.focus())}getDropdownItems(){return this.itemsContainerEl?Array.from(this.itemsContainerEl.querySelectorAll("vega-dropdown-item")):[]}}class Fe extends O{constructor(t,e){super(),this.type="INSERT_TOKEN_NODE",this.rteRange=null,this.actionHandleResult=!1,this.rteRange=t,this.token=e}}class $e extends ze{constructor(t){super(),this.tokenList=[],this.tokenList=t}render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Tokens",showArrowIcon:!0,tooltip:{text:"Insert token"}}),this.renderDropdownListTemplate(t,this.tokenList,e)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,[i]=n();return i?t.disabled||!I.canHandle("INSERT_TOKEN_NODE",i.parent):t.disabled}return!1}handleButtonClick(t){}handleDropdownClick(t,e){const n=this.getListItemByKey(this.tokenList,t),{rteRange:i}=e,{startNode:a}=i;if(a&&a.parent){const t=new Fe(i,n);a.parent.apply(t),t.actionHandleResult&&this.flushEditorUI(e)}}flushEditorUI(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,flushValue:n}=e;n(t.value)}}}class qe extends R{constructor(t,e,n,i,a){super(t,n,i,a),this.dtoName=qe.dtoName,this.type="token",this.token=e,this.text=n}static from(t,e){const n=new qe(t.id,t.token,t.text,e);return t.annotations&&(n.annotationMap=this.generateTextAnnotationMap(t.annotations)),n}toJSON(){const t=super.toJSON();return Object.assign({id:this.id,type:this.type,text:this.text,token:this.token},t.annotations?{annotations:t.annotations}:{})}isContentEditable(){return!1}clone(t){return new qe(this.id,this.token,this.text,t,this.annotationMap)}toHtml(){return`<span class="token" contenteditable="false" template-token-key="${this.token}" token-key="${this.token}"${super.generateAttributeString()}>${this.text}</span>`}}qe.dtoName="RTETokenNode";class Ge extends A{doRender(t,e,n){const{id:i,token:a}=e;return t("span",Object.assign(Object.assign({key:i,"template-token-key":a,"token-key":a,contenteditable:"false",style:e.getStyles(),class:`token ${e.getClasses()}`},this.additionalAttributes(e)),{ref:this.useRef(e),onClick:t=>{t.preventDefault(),n&&!1!==n.editable&&this.handleTokenElementClick(t,e,n.host)}}),e.text)}injectRTEScopeStyles(){return"span[token-key]{padding: 0 2px; margin: 0 1px; background-color: rgba(var(--v-bg-status-info, 205,209,211))}"}handleTokenElementClick(t,e,n){t.preventDefault(),n&&n.value.apply(new f(e,void 0,!0))}additionalAttributes(t){const e=t.getCustomAttributesAnnotation();let n={wrapped:"true"};return e&&(n=Object.assign(Object.assign({},n),e.render())),n}}class We extends ze{constructor(t,e,n=""){super(),this.languageList=[],this.languageChangeCallback=null,this.selectedLanguage="",this.labelRef=null,this.translation=null,this.handleDropdownClick=t=>{this.setSelectedLanguage(t),"function"==typeof this.languageChangeCallback&&this.languageChangeCallback(t)},this.languageList=t,this.languageChangeCallback=e,this.selectedLanguage=n}setSelectedLanguage(t){var e;if(this.selectedLanguage=t,(null===(e=this.labelRef)||void 0===e?void 0:e.firstChild)&&this.translation){const e=this.getLanguageLabelByKey(t);this.labelRef.firstChild.nodeValue=this.translation.t(e)}}isHidden(){return!1}render(t,e){const n=this.languageList.map((t=>this.translateDropdownEntry(t,e)));return this.renderDropdown(t,e,{source:n},[this.renderButton(t,e,{label:this.getLanguageLabelByKey(this.selectedLanguage),showArrowIcon:!0,tooltip:{text:"Select language"}})])}renderButtonLabel(t,e,n){return this.translation=e.translation,t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary",ref:t=>{this.labelRef=t}},e.translation.t(n))}handleButtonClick(t){}getLanguageLabelByKey(t){var e;const n=this.getListItemByKey(this.languageList,t);return null!==(e=null==n?void 0:n.label)&&void 0!==e?e:"Select Language"}translateDropdownEntry(t,e){const n=e.translation.t(t.label);return Object.assign(Object.assign({},t),"children"in t?{label:n,children:t.children.map((t=>this.translateDropdownEntry(t,e)))}:{label:n})}}class Ue extends E{constructor(t,e){super(),this.languageToolbarButtonRenderer=null,this.languageState={selectedLanguage:"",contentMap:{}},this.languageChangeCallBack=t=>{const e=this.languageState.selectedLanguage;this.extensionContext&&e&&(this.languageState.contentMap[e]=this.getRTELatestValue(this.extensionContext.host)),this.languageState.selectedLanguage=t,this.applyLanguageContent(t,this.languageState.contentMap)},this.languageList=t,e&&(this.languageState=Object.assign(Object.assign({},this.languageState),e)),!this.languageState.selectedLanguage&&t.length>0&&(this.languageState.selectedLanguage=t[0].key)}prepareBeforeLoad(t){this.languageToolbarButtonRenderer=new We(this.languageList,this.languageChangeCallBack,this.languageState.selectedLanguage),this.registerToolbarButtonRenderer("languages",this.languageToolbarButtonRenderer,t)}initialExtensionAfterLoad(t){super.initialExtensionAfterLoad(t);const{selectedLanguage:e,contentMap:n}=this.languageState;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(e),n&&n[e]&&this.applyLanguageContent(this.languageState.selectedLanguage,this.languageState.contentMap)}setState(t){const{selectedLanguage:e,contentMap:n}=t;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(e),this.languageState.selectedLanguage=e,this.languageState.contentMap=Object.assign({},n),this.applyLanguageContent(e,n)}getState(){const{selectedLanguage:t,contentMap:e}=this.languageState;return this.extensionContext&&(e[t]=this.getRTELatestValue(this.extensionContext.host)),this.languageState}applyLanguageContent(t,e){if(this.extensionContext&&e){let n=e[t];const{host:i,flushValue:a}=this.extensionContext;n=n?n instanceof g?n:g.fromJSON(n,i.sourceEditConfig):g.createEmptyContent(),i.value!==n&&a(n,!0)}}getRTELatestValue(t){var e;let n=t.value;if(this.extensionContext&&this.extensionContext.isSourceEditMode()&&t.shadowRoot){const i=t.shadowRoot.querySelector(".source-view-container vega-code-block");if(i){let a;t.sourceEditConfig&&(a={autoMatchFormat:null===(e=t.sourceEditConfig.autoMatchFormat)||void 0===e||e,filterInlineStyles:t.sourceEditConfig.filterInlineStyles}),n=g.fromHtml(i.value.code,a)}}return n}}class Ze extends O{constructor(t){super(),this.type="INSERT_FUNCTION_BLOCK",this.functionType=t}}class Je extends N{constructor(t){super(t),this.dtoName=Je.dtoName,this.type="function-block",this.children=[]}static from(t,e){const n=new Je(t.id),i={customClass:["statement"]};let{annotations:a}=t;return a=a?Object.assign(Object.assign({},a),i):i,super.convertAnnotationsToMap(n.annotationMap,a),n.children=this.generateBlockChildren(t.children,e,n),n}toHtml(){return`<div class="statement">${this.children.map((t=>t instanceof j?`<div class="statementelement"${this.getFunctionContentStyle(t)}>${t.getChildrenHtml()}</div>`:t.toHtml())).join("")}</div>`}clone(e){const n=new Je(t());return n.parent=e,n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,children:this.children.map((t=>t.toJSON()))})}getFunctionContentStyle(t){const e=new D(t);let n=e.toCssText({standalone:!0});const i=t.getAnnotationByType("TEXT_STYLE");if(i&&"paragraph"===i.textStyle){const t=e.toCssText(void 0,void 0,i.renderStyle({standalone:!0}));n=n.replace(t,"").trim()}return n?` style="${n}"`:""}}Je.dtoName="RTEFunctionBlock";class Qe extends _{handleAction(t,e){const{functionType:n}=t,i=this.getFunctionBlock(n),a=this.createNewParagraph(""),r=this.getReferenceBlock(e);r?r.parent.apply(new B(r,i,a)):e.apply(new M([i,a])),a&&(t.nextFocusNode=a.children[0])}getFunctionBlock(e){const n=t();return Je.from({id:n,type:"function-block",children:[{id:`${n}-1`,type:"logic-control-block",statementText:e.toUpperCase()},{id:`${n}-2`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-2-1`,type:"text",text:" "}]},{id:`${n}-3`,type:"logic-control-block",statementText:"SHOW"},{id:`${n}-4`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-4-1`,type:"text",text:" "}]}]})}getReferenceBlock(t){if(!(t instanceof g)){const e=t.parent;return e instanceof Je?e:t}}}class Xe extends H{constructor(t,e,n){super(t),this.dtoName=Xe.dtoName,this.type="logic-control-node",this.text="",this.text=e,this.parent=n}clone(){return new Xe(this.id,this.text,this.parent)}toHtml(){return this.text}toJSON(){return{id:this.id,type:this.type,text:this.text}}getRangeEndOffset(){return 1}getRangeContainer(){const t=V.getDOMByEntity(this);if(t)return t.parentElement}isContentEditable(){return!1}}Xe.dtoName="RTELogicControlNode";class Ye extends N{constructor(t,e,n){super(t),this.dtoName=Ye.dtoName,this.type="logic-control-block",this.children=[],this.statementText="",this.statementText=e,this.children=[new Xe(`${t}-node-1`,e,this)],n&&(this.parent=n)}static from(t){return new Ye(t.id,t.statementText)}isNotEmpty(){return!0}getLastNode(){return this.children[this.children.length-1]}toHtml(){return`<div class='statementsyntax' contenteditable='false'>${this.statementText}</div>`}clone(t){return new Ye(this.id,this.statementText,t)}toJSON(){return{id:this.id,type:this.type,statementText:this.statementText}}}Ye.dtoName="RTELogicControlBlock";class tn extends ze{render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Functions",showArrowIcon:!0,tooltip:{text:"Insert function"}}),this.renderDropdownListTemplate(t,tn.FUNCTION_LIST,e)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,i=n()[0];let a=!0;return i&&(a=I.canHandle("INSERT_FUNCTION_BLOCK",i.parent)),t.disabled||!a}return!1}handleButtonClick(){throw new Error("Method not implemented.")}handleDropdownClick(t,e){if(e){const n=this.getExtensionContext(e.host);if(n){const{host:e,getSelectedNodes:i}=n,a=i()[0],r=new Ze(t);a?a.parent&&a.parent.apply(r):e.value.apply(r),r.nextFocusNode&&e.value.apply(new f(r.nextFocusNode,1))}}}}tn.FUNCTION_LIST=[{key:"IF",label:"Conditional"},{key:"FOREACH",label:"Foreach"}];class en extends A{doRender(t,e){return t("div",{key:e.id,class:"statementsyntax",ref:this.useRef(e)},t("span",{key:`${e.id}-1`,contenteditable:"false",ref:this.useRef(e.children[0])},e.statementText))}}class nn extends b{constructor(){super(...arguments),this.blockClassName="statementsyntax"}canHandle(t,e){const n=t[e];return n&&n.nodeType===Node.ELEMENT_NODE&&n.classList.contains(this.blockClassName)&&this.isFunctionBlockChild(n)?1:0}handle(e){const n=e[0];return Ye.from({id:t(),type:"logic-control-block",statementText:n.innerText})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isFunctionBlockChild(t){return!(!t.parentElement||!t.parentElement.classList.contains("statement"))}}class an extends A{doRender(t,e){return t("div",{key:e.id,class:this.getElementClassName(e),ref:this.useRef(e)})}injectRTEScopeStyles(){return"div.statement{padding:2px 4px;background:rgba(var(--v-bg-accent3-secondary, 255, 239, 200));border:1px solid rgba(var(--v-bg-accent3-primary, 255, 220, 131));border-radius:4px;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;gap:4px}div.statement .statementsyntax{padding:3px 0;line-height:22px}.rich-text-content div.statement .statementsyntax,.rich-text-content div.statement .statementelement{display:inline-block}div.statement+div.statement{margin-top:2px}div.statement .statementsyntax span{color:rgb(38, 42, 255);font-weight:bold}div.statement .statementelement{padding:2px 4px;background:rgba(var(--v-bg-secondary, 245, 247, 247));border:1px solid rgba(var(--v-border-color-input-field, 171, 198, 216));border-radius:4px;margin:0;min-width:8px}"}getElementClassName(t){let e=t.getClasses();return e.indexOf("statement")<0&&(e="statement "+e),e.trim()}}class rn{}class sn extends rn{canIntercept(t,e){return e.parent&&e.parent instanceof Je}intercept(t,e,n){const i=new y(n.children[0],0);i.isFlushable=!0,n.parent.apply(i)}}class on extends _{handleAction(t,e){const n=this.createNewParagraph("");n&&(e.parent.apply(new B(e,n)),t.newBlock=n,this.focusToNextLine(n))}focusToNextLine(t){const e=this.getRootContent(t);e&&e.apply(new f(t.children[0],1))}}class ln extends O{constructor(t,e,n){super(),this.type="PASTE_PLAIN_TEXT",this.blocksToBeInserted=t,this.startNode=e,this.startOffset=n}}class cn extends sn{intercept(t,e,n){const{blocksToBeInserted:i,rteRange:a}=e;let{startNode:r,startOffset:s}=e;a&&(r=a.startNode,s=a.startOffset);const o=new ln(i,r,s);n.apply(o)}}class hn extends _{handleAction(t,e){const{blocksToBeInserted:n,startNode:i,startOffset:a}=t;if(i instanceof R){const t=n.flatMap((t=>t instanceof j?(this.copyLinkGroupAnnotations(e.annotationMap,t.annotationMap),t.children):[]));t.length>0&&(e.apply(a>0?new B(i,...t):new P(i,...t)),this.focusToNextLine(t[t.length-1],t[t.length-1].getRangeEndOffset()))}}focusToNextLine(t,e){const n=this.getRootContent(t);n&&n.apply(new f(t,e))}copyLinkGroupAnnotations(t,e){if(e&&e.has(K.LINK_GROUP)){const n=e.get(K.LINK_GROUP);t.has(K.LINK_GROUP)?n.linkGroups.forEach(((e,n)=>{t.get(K.LINK_GROUP).linkGroups.set(n,e)})):t.set(K.LINK_GROUP,e.get(K.LINK_GROUP))}}}const dn=new nn,un=new class extends nn{constructor(){super(...arguments),this.blockClassName="statementelement"}handle(e,n){const i=v.generate(j,e[0]),a=Array.from(e[0].childNodes);return j.from({id:t(),type:"paragraph",annotations:Object.assign({customClass:[this.blockClassName]},i),nodes:this.generateChildNodes(a,void 0,n)})}},pn=new class extends m{canHandle(t,e){const n=t[e];return n&&"DIV"===n.tagName&&n.classList.contains("statement")&&n.childNodes.length&&n.querySelector(".statementsyntax")?1:0}handle(){return Je.from({id:t(),type:"function-block",annotations:{customClass:["statement"]},children:[]})}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}};class wn extends E{constructor(){super(),this.registerBlockBasicStrategies(Ye.name),this.registerBlockBasicStrategies(Je.name),this.preventFunctionBlockDefaultInsertNewParagraph(),this.registerNode("logic-control-block",Ye),this.registerRenderer("logic-control-block",new en),this.registerNode("function-block",Je),this.registerRenderer("function-block",new an),this.registerElementToBlockDTOClassStrategy(dn),this.registerElementToBlockDTOClassStrategy(un),this.registerElementToBlockDTOClassStrategy(pn)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer("functions",new tn,t)}preventFunctionBlockDefaultInsertNewParagraph(){this.unRegisterStrategy(z.INSERT_NEW_PARAGRAPH,Ye.name),this.unRegisterStrategy(z.APPEND_CHILDREN,Je.name),this.unRegisterStrategy(z.INSERT_CHILDREN_AFTER,Je.name),this.unRegisterStrategy(z.INSERT_CHILDREN_BEFORE,Je.name),this.unRegisterStrategy(z.PASTE_CONTENT,Ye.name),E.registerActionHandleStrategy(Je.name,z.INSERT_NEW_PARAGRAPH,new on)}}(()=>{const t=new Qe;E.registerActionHandleStrategy(g.name,"INSERT_FUNCTION_BLOCK",t),E.registerActionHandleStrategy(j.name,"INSERT_FUNCTION_BLOCK",t),E.registerActionHandleStrategy(x.name,"INSERT_FUNCTION_BLOCK",t),E.registerActionHandleStrategy(Ye.name,"INSERT_FUNCTION_BLOCK",t),E.registerActionHandleStrategy(j.name,"PASTE_PLAIN_TEXT",new hn),E.registerActionHandlerInterceptor(j.name,z.INSERT_NEW_PARAGRAPH,new sn),E.registerActionHandlerInterceptor(j.name,z.PASTE_CONTENT,new cn)})();class fn extends O{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_BLOCK",this.tableBlock=t}}class gn extends F{constructor(){super(...arguments),this.type=ut.CAPTION}static getDefaultStyles(){return{padding:"8px",border:"1px solid #ddd",borderBottom:"none",position:"relative",textAlign:"center",minHeight:"22px"}}clone(){return new gn}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--extension-table-caption"}renderStyle(t){return(null==t?void 0:t.standalone)?Object.assign(Object.assign({},gn.getDefaultStyles()),{backgroundColor:this.getCaptionBackgroundColor()}):null}toJSON(){return{caption:!0}}getCaptionBackgroundColor(){return pe.isDarkMode()?pt.dark:pt.light}}class bn extends N{constructor(t,e){super(t),this.dtoName=bn.dtoName,this.type="table-caption";const{autoMatchFormat:n}=e||{autoMatchFormat:!0};n&&this.annotationMap.set(ut.CAPTION,new gn)}static from(t,e){const n=new bn(t.id,e),i=t.annotations||{},{caption:a}=i,r=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]])}return n}(i,["caption"]);return a&&n.annotationMap.set(ut.CAPTION,new gn),super.convertAnnotationsToMap(n.annotationMap,Object.assign({},r)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new bn(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.isNotEmpty()))}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<caption${super.generateAttributeString(t)}>${e}</caption>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}I.register(z.INSERT_CHILDREN_BEFORE,bn.name,new L),I.register(z.PASTE_CONTENT,bn.name,new C),bn.dtoName="RTETableCaptionBlock";class mn extends O{constructor(t){super(),this.type="TOGGLE_TABLE_CAPTION",this.isFlushable=!0,this.shouldEnable=t}}class vn extends wt{canHandle(t){return t[0]===ft.CAPTION}execute(t,e,n){const i="rte-table-caption"===t[1],a=new mn(i),r=n.getCaption();if(i){const t=r&&r.isNotEmpty()?r:this.createCaptionBlock(null==r?void 0:r.id);r&&t===r||n.setCaption(t),a.nextFocusNode=t.getLastNode()}else r&&(n.setCaption(null),a.nextFocusNode=n.getFirstNode());this.syncCursorPosition(n,a.nextFocusNode)}syncCursorPosition(t,e){super.syncCursorPosition(t,e)}createCaptionBlock(e){const n={id:null!=e?e:t(),type:"table-caption",children:[{id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]}]};return bn.from(n)}}class yn{static generateTablePropertiesForm(t){const e=t.annotationMap.get(ut.TABLE);let n={borderStyle:"none",borderColor:"",borderWidth:"",backgroundColor:"",width:"",height:"",textAlign:"center"};if(e){const t=e.toJSON().table,{style:i="none",color:a="",width:r=""}=t.border||{style:"none",color:"",width:""};n={backgroundColor:t.backgroundColor||"",width:t.width||"",height:t.height||"",textAlign:t.alignment,borderStyle:i,borderColor:a,borderWidth:r}}return n}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new f(e,0))}}class xn extends ${constructor(t){super(),this.isFlushable=!0;const{textAlign:e,width:n,borderWidth:i,borderColor:a,borderStyle:r,height:s}=t,o=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]])}return n}(t,["textAlign","width","borderWidth","borderColor","borderStyle","height"]);this.tableProperties=Object.assign(Object.assign({},o),{alignment:e,border:{style:r,color:a,width:i?fe(i):""},width:n?fe(n):"",height:s?fe(s):""})}toAnnotation(){return new gt(this.tableProperties)}}class Ln extends yn{handle(t,e,n,i){e.apply(new xn(n)),this.updateCursorPosition(t,i)}}class Cn extends yn{handle(t,e,n,i){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,i))}}class Sn extends yn{handle(t,e,n){const i=new xn(n);i.isFlushable=!1,e.apply(i)}}class kn extends ${constructor(t,e){super(),this.isFlushable=!0,this.cellAnnotation=t,this.originAnnotation=e}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}updateOriginAnnotation(){Object.keys(this.cellAnnotation).forEach((t=>{this.originAnnotation[t]=this.cellAnnotation[t]}))}}class Tn extends kn{constructor(t,e){super(t,e),this.isFlushable=!0}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}}var An=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]])}return n};class En{static getStyleCollectionFromCell(t){return t.reduce(((t,e)=>{const n=e.getAnnotationByType(ut.CELL);if(t[e.id]={},n){const i=n.toJSON().tableCell,{border:a}=i,r=An(i,["border"]),s={};a&&(s.borderStyle=a.style,s.borderColor=a.color,s.borderWidth=a.width),t[e.id]=ge(Object.assign(Object.assign({},r),s))}return t}),{})}static convertStyleMapToFormField(t){const e={};for(const n in t){const i=t[n];for(const t in i)e[t]?e[t].push(i[t]):e[t]=[i[t]]}const n=Object.keys(t).length,i={};for(const t in e){const a=e[t],r=new Set(a);a.length===n&&1===r.size&&(i[t]=a[0])}return i}applyProperties(t,e,n){t.tableSelection.getSelectedCells().forEach((t=>{const i=e[t.id];if(i){const e=this.convertToVegaTableCellAnnotation(Object.assign({},i));this.applyAnnotation(t,e,n)}}))}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new f(e,0))}convertToVegaTableCellAnnotation(t){const{borderStyle:e,borderWidth:n,borderColor:i}=t,a=An(t,["borderStyle","borderWidth","borderColor"]),r=ge({style:e,width:n?fe(n):"",color:i});return ge(Object.assign(Object.assign({},a),{backgroundColor:a.backgroundColor||"",padding:a.padding?fe(a.padding):"",width:a.width?fe(a.width):"",height:a.height?fe(a.height):"",verticalAlign:a.verticalAlign||"",textAlign:a.textAlign||"",border:r}))}applyAnnotation(t,e,n){const i=t.getAnnotationByType(ut.CELL)||new bt({},!1),a=t instanceof mt?new Tn(e,i):new kn(e,i);a.isFlushable=n,t.apply(a)}}class On extends En{handle(t,e,n){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,n))}}class In extends En{handle(t,e){this.applyProperties(t,e,!1)}}class Rn extends En{handle(t,e,n){this.applyProperties(t,e,!0),this.updateCursorPosition(t,n)}}class Nn{constructor(t){this.renderContext=t}getTableExtensionContext(){return this.renderContext?T.getExtensionContext(this.renderContext.host):null}}class jn extends Nn{constructor(t,e){super(e),this.popoverCloseType="none",this.tablePropertiesHandlerMap={save:new Cn,cancel:new Ln,change:new Sn},this.cellPropertiesHandlerMap={save:new On,cancel:new Rn,change:new In},this.handleTablePropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.tablePropertiesHandlerMap[e].handle(n,this.currentTableBlock,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef.show(!0)},this.handleCellPropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.cellPropertiesHandlerMap[e].handle(n,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef.show(!0)},this.tableColorSchema=t}destroy(){this.selectionAnchorRef&&this.selectionAnchorRef.parentNode&&(st.removeUniqueObserverFromNode(this.selectionAnchorRef,ce),this.selectionAnchorRef.parentNode.removeChild(this.selectionAnchorRef),this.selectionAnchorRef=null)}async show(t){let e=this.getTableRef();const n=this.getTableExtensionContext();let i=[];if(n&&(i=n.tableSelection.getSelectedCells()),t===ft.CELL&&i.length>1){const t=this.getOrCreateSelectionAnchor(i,e);t&&(e=t)}else t===ft.CELL&&1===i.length&&(e=V.getDOMByEntity(i[0]));this.updateContent(t),this.storeCurrentFocusNode(),ue.call(ot.getSubject(this.popoverRef,he),e),await this.popoverRef.show()}async hide(){await this.popoverRef.hide()}reTarget(t,e){this.getTableRef=e,this.currentTableBlock=t}render(){const t=we();if(t){const e=t.createElement("vega-popover");e.trigger="click",e.isScreenPosition=!0,e.className="rte-table-dynamic-popover",st.addUniqueObserverToNode(e,ht,(()=>{const t=this.getTableExtensionContext();"change"===this.popoverCloseType&&t&&t.flushValue(t.host.value)}));const n=t.createElement("div");n.setAttribute("slot","popover"),n.className="rte-table-dynamic-popover-content";const i=t.createElement("vega-rich-text-table-properties");i.colors=this.tableColorSchema,i.type=ft.TABLE,i.setAttribute("type",ft.TABLE),i.addEventListener("vegaCancel",this.handleTablePropertiesUpdate),i.addEventListener("vegaChange",this.handleTablePropertiesUpdate),i.addEventListener("vegaSave",this.handleTablePropertiesUpdate);const a=t.createElement("vega-rich-text-table-properties");return a.colors=this.tableColorSchema,a.type=ft.CELL,a.setAttribute("type",ft.CELL),a.addEventListener("vegaCancel",this.handleCellPropertiesUpdate),a.addEventListener("vegaChange",this.handleCellPropertiesUpdate),a.addEventListener("vegaSave",this.handleCellPropertiesUpdate),n.appendChild(i),n.appendChild(a),e.appendChild(n),this.popoverRef=e,this.tablePropertiesFormRef=i,this.cellPropertiesFormRef=a,e}}updateContent(t){this.popoverCloseType="none";const e=this.getTableExtensionContext();"TABLE"===t?(this.tablePropertiesFormRef.classList.remove("vega-hidden"),this.cellPropertiesFormRef.classList.add("vega-hidden"),this.tablePropertiesFormRef.defaultValue=yn.generateTablePropertiesForm(this.currentTableBlock)):"CELL"===t&&(this.cellPropertiesFormRef.classList.remove("vega-hidden"),this.tablePropertiesFormRef.classList.add("vega-hidden"),e&&(this.cellPropertiesFormRef.styleMap=En.getStyleCollectionFromCell(e.tableSelection.getSelectedCells())),this.cellPropertiesFormRef.defaultValue=En.convertStyleMapToFormField(this.cellPropertiesFormRef.styleMap)),e&&e.getSelection().removeAllRanges()}storeCurrentFocusNode(){const t=this.getTableExtensionContext();t&&(this.currentFocusNode=t.getSelectedNodes()[0])}getOrCreateSelectionAnchor(t,e){const n=we();if(n&&e){const i=e.closest(".rich-text-content"),a=i.getBoundingClientRect();let r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;t.map((t=>V.getDOMByEntity(t))).filter(it).forEach((t=>{const e=t.getBoundingClientRect();r=Math.min(r,e.left-a.left),s=Math.max(s,e.right-a.left),o=Math.min(o,e.top-a.top),l=Math.max(l,e.bottom-a.top)}));const c=s-r,h=l-o;return this.selectionAnchorRef=i.querySelector(".rte-table-selection-popover-anchor"),this.selectionAnchorRef||(this.selectionAnchorRef=n.createElement("div"),this.selectionAnchorRef.className="rte-table-selection-popover-anchor",this.selectionAnchorRef.style.position="absolute",this.selectionAnchorRef.style.pointerEvents="none",i.appendChild(this.selectionAnchorRef),st.addUniqueObserverToNode(this.selectionAnchorRef,ce,(()=>{this.destroy()}))),this.selectionAnchorRef.style.left=`${r}px`,this.selectionAnchorRef.style.top=`${o}px`,this.selectionAnchorRef.style.width=`${c}px`,this.selectionAnchorRef.style.height=`${h}px`,this.selectionAnchorRef}}}class Dn extends Nn{constructor(t){super(t),this.settingHandlers=[new vt,new vn,new yt,new xt,new Lt],this.handleTableClick=(t,e,n)=>{const i=t.target.closest("table");i===n()&&(t.stopPropagation(),this.reTarget(e,n),this.tableDynamicPopover.hide(),ue.call(ot.getSubject(this.popoverRef,he),i),this.popoverRef.show(!0))},this.syncSelectedCells=()=>{this.tableSettingRef&&(this.tableSettingRef.selectedCells=this.getTableSelectedCells())},this.handleSettingMenuClick=t=>{const e=this.settingHandlers.find((e=>e.canHandle(t.detail)));if(e){const n=this.getTableExtensionContext();n&&e.execute(t.detail,n,this.tableBlock),t.detail[0]===ft.CAPTION&&this.updateTableSettingCaption()}t.detail[0]!==ft.TABLE&&t.detail[0]!==ft.CELL||(this.popoverRef.hide(),this.tableDynamicPopover.show(t.detail[0]))},this.handleTableSettingPopoverShow=()=>{this.syncSelectedCells()},this.tableDynamicPopover=new jn(Ct.getTableColors(),t)}destroy(){this.tableDynamicPopover.destroy(),this.popoverContainer&&this.popoverContainer.remove()}render(){const t=we();if(t&&this.renderContext){this.popoverContainer=t.createElement("div"),this.renderContext.host.appendChild(this.popoverContainer);const e=this.tableDynamicPopover.render(),n=t.createElement("vega-popover");n.trigger="click",n.isScreenPosition=!0,n.className="rte-table-setting-popover",st.addUniqueObserverToNode(n,dt,this.handleTableSettingPopoverShow);const i=t.createElement("div");i.setAttribute("slot","popover");const a=t.createElement("vega-rich-text-table-setting");a.addEventListener("vegaClick",this.handleSettingMenuClick),i.appendChild(a),n.appendChild(i),this.popoverContainer.appendChild(n),this.popoverContainer.appendChild(e),this.popoverRef=n,this.tableSettingRef=a}}updateTableSettingCaption(){const t=this.tableBlock.hasCaption();this.tableSettingRef&&this.tableSettingRef.hasCaption!==t&&(this.tableSettingRef.hasCaption=t)}reTarget(t,e){this.tableSettingRef&&(this.tableBlock=t,this.tableSettingRef.target=e(),this.tableSettingRef.selectedCells=this.getTableSelectedCells(),this.tableDynamicPopover.reTarget(t,e))}getTableSelectedCells(){let t=[];const e=this.getTableExtensionContext();if(e&&e.tableSelection){const{tableSelection:n}=e;t=n.getSelectedCells()}return t}}class _n extends A{doRender(t,e,n){let i;const a=this.renderTable(t,e,(t=>i=t));this.renderTableToolbar(n);const r=e.getAnnotationByType(ut.TABLE),s=n.editable?[t("vega-rich-text-table-selection-widget",{onVegaRemove:t=>{t.stopPropagation(),this.handleTableRemove(e,i)},onClick:t=>{this.tableToolbar&&this.tableToolbar.handleTableClick(t,e,(()=>i))},onMouseLeave:()=>{this.tableToolbar&&this.tableToolbar.syncSelectedCells()}},[t("div",{contentEditable:!0,ref:this.useRef(e)},[a])])]:[a],o={};if(r){const t=r.renderStyle();o.width=t.width,o.margin=t.margin}const l=t("div",{class:"v-rte--extension-table-container",style:Object.assign({},o)},s);return l.childrenContainerGetter=()=>a,l}destroy(){this.destroyTableToolbar()}injectRTEScopeStyles(){return".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));position:relative;display:table-caption;caption-side:top;min-height:22px;text-align:center;word-break:break-word;overflow-wrap:break-word}.v-rte--extension-table-caption.showPlaceholder::before{position:absolute;left:0;right:0;content:attr(data-placeholder);font-family:'Inter', sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"}renderTable(t,e,n){var i;return t("table",Object.assign(Object.assign({key:e.id},null===(i=e.getCustomAttributesAnnotation())||void 0===i?void 0:i.render()),{style:e.getStyles(),class:e.getClasses(),ref:t=>{this.useRef(e)(t),n(t)}}))}handleTableRemove(t,e){t.parent.apply(new fn(t)),this.destroySelectionAnchor(e)}destroySelectionAnchor(t){const e=t.closest(".rich-text-content");if(e){const t=e.querySelector(".rte-table-selection-popover-anchor");t&&le.notify(ot.getSubject(t,ce),{host:t})}}renderTableToolbar(t){t.editable?this.tableToolbar||(this.tableToolbar=new Dn(t),this.tableToolbar.render()):this.destroyTableToolbar()}destroyTableToolbar(){var t;null===(t=this.tableToolbar)||void 0===t||t.destroy(),this.tableToolbar=null}}class Bn extends A{doRender(t,e){return t("thead",{key:e.id,ref:this.useRef(e)})}}class Mn extends A{doRender(t,e){return t("tr",{key:e.id,ref:this.useRef(e)})}}class Hn extends A{doRender(t,e,n){return this.renderByCellType(t,e,n,"td")}renderByCellType(t,e,n,i){var a;return t(i,Object.assign(Object.assign(Object.assign({key:`${e.id}-${i}`,ref:this.useRef(e)},null===(a=e.getCustomAttributesAnnotation())||void 0===a?void 0:a.render()),{style:e.getStyles(n),class:e.getClasses()}),n.editable?this.onSelectionListeners(e,n):void 0))}onSelectionListeners(t,e){return{onMouseDown:t=>{const n=a(t.target,"table"),i=a(t.currentTarget,"table")===n,r=t.target.closest("td, th");if(i&&r){const t=this.getExtensionContext(e.host);t&&t.tableSelection.focusCell(r)}},onMouseMove:n=>{n.stopPropagation(),n.preventDefault();const i=this.getExtensionContext(e.host);i&&i.tableSelection.dragOver(t)},onMouseUp:()=>{const t=this.getExtensionContext(e.host);t&&t.tableSelection.endDrag()}}}}class Vn extends A{doRender(t,e){return t("tbody",{key:e.id,ref:this.useRef(e)})}}class Pn extends Hn{doRender(t,e,n){return super.renderByCellType(t,e,n,"th")}}class Kn extends O{constructor(t,e){super(),this.type="INSERT_TABLE_BLOCK",this.rowCount=t,this.columnCount=e}}class zn extends Nn{constructor(){super(...arguments),this.hoveredRows=1,this.hoveredCols=1}render(t,e){return t("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,ref:t=>{t&&(this.tablePickerPopoverRef=t,st.addUniqueObserverToNode(t,dt,(()=>{this.resetPicker()})))}},[t("div",{slot:"popover"},[this.generatePickerStyles(t),this.generateTableSizeGrid(t)]),t("div",{slot:"popover-content"},e)])}generateTableSizeGrid(t){const e=[];for(let n=1;n<=10;n++)for(let i=1;i<=10;i++)e.push(t("button",{class:"rte-table-picker__cell","data-row":n,"data-col":i,onMouseenter:this.handlePickerCellHover.bind(this,n,i),onClick:this.handlePickerClick.bind(this,n,i)},[]));return t("div",{class:"rte-table-picker"},[t("div",{class:"rte-table-picker__grid",ref:t=>{t&&(this.tablePickerGridRef=t)},style:{gridTemplateColumns:"repeat(10, 16px)",gridTemplateRows:"repeat(10, 16px)"}},e),t("div",{class:"rte-table-picker__hint"},t("vega-hint",{ref:t=>{t&&(this.selectedHintRef=t)}},[`${this.hoveredRows} × ${this.hoveredCols}`]))])}generatePickerStyles(t){return t("style",{},["\n.rte-table-picker__grid { display: grid; gap: 2px; }\n.rte-table-picker__cell {\n box-sizing: border-box;\n border: 1px solid #ccc;\n background-color: transparent;\n cursor: pointer;\n}\n.rte-table-picker__cell:hover {\n background-color: #cae1fc;\n}\n.rte-table-picker__cell.active {\n background-color: #cae1fc;\n}\n.rte-table-picker__hint {\n text-align: center;\n}\n "])}createTable(t,e){const n=this.getTableExtensionContext();if(n){const{host:i,getSelectedNodes:a}=n,r=a()[0],s=new Kn(t,e);r?r.parent&&r.parent.apply(s):i.value.apply(s),s.nextFocusNode&&i.value.apply(new f(s.nextFocusNode,1))}}handlePickerClick(t,e){this.createTable(t,e),this.tablePickerPopoverRef.hide()}handlePickerCellHover(t,e){this.hoveredRows=t,this.hoveredCols=e,Array.from(this.tablePickerGridRef.children).forEach((t=>{const e=Number(t.dataset.row),n=Number(t.dataset.col);e<=this.hoveredRows&&n<=this.hoveredCols?t.classList.add("active"):t.classList.remove("active")})),this.selectedHintRef.textContent=`${this.hoveredRows} × ${this.hoveredCols}`}resetPicker(){this.handlePickerCellHover(1,1)}}class Fn extends ze{render(t,e){return new zn(e).render(t,super.renderButton(t,e,{showArrowIcon:!0,icon:"rte-table",tooltip:{text:"Insert table"}}))}isDisabled(t){let e=super.isDisabled(t);const n=this.getExtensionContext(t.host);if(n){const{host:t,getSelectedNodes:i}=n,a=i()[0];let r=!0;a&&(r=I.canHandle("INSERT_TABLE_BLOCK",a.parent)&&I.canHandle(z.INSERT_CHILDREN_AFTER,a.parent.parent)),e=t.disabled||!r}return e}handleButtonClick(){}handleDropdownClick(){}}at.register({"rte-table":{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="M48 264V160H232V264H48zm0 48H232V432H64c-8.8 0-16-7.2-16-16V312zM280 432V312H464V416c0 8.8-7.2 16-16 16H280zM464 264H280V160H464V264zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"/></svg>'}});class $n extends _{handleAction(t,e){const n=this.createTableBlock(t.rowCount,t.columnCount),i=super.createNewParagraph(""),a=this.getReferenceBlock(e);a?a.parent.apply(new B(a,n,i)):e.apply(new M([n,i])),t.nextFocusNode=n.getFirstNode()}createTableBlock(e,n){const i=Math.max(e,1),a=Math.max(n,1);return St.from({id:t(),type:"table-block",children:[kt(i,a)]})}getReferenceBlock(t){if(!(t instanceof g))return t}}class qn extends rn{canIntercept(t,e){const n=e.parent;return n instanceof Tt&&1===n.children.length&&0===t.startOffset}intercept(){}}class Gn extends _{handleAction(t){const e=t.tableBlock,n=e.parent,i=super.getRootContent(e),a=super.createNewParagraph("");n.apply(new B(e,a)),n.apply(new q(e)),i&&i.apply(new f(a.getLastNode()))}}class Wn extends rn{canIntercept(t,e){return t.entityToBeRemoved&&1===e.children.length}intercept(e,n,i){if(!(n.entityToBeRemoved instanceof j)){const e=j.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]});return i.children=[],void i.apply(new M([e]))}n.entityToBeRemoved.apply(new M([new R(t(),"",n.entityToBeRemoved)]))}}class Un extends A{doRender(t,e){return t("caption",{key:e.id,ref:this.useRef(e),style:e.getStyles(),class:[e.getClasses(),e.isNotEmpty()?null:"showPlaceholder"].filter(it).join(" "),"data-placeholder":"Enter table caption"})}}class Zn extends _{getRowsMaxCellCount(t){let e=0;for(const n of t){let t=0;for(const e of n.children)t+=e.colSpan;e=Math.max(e,t)}return e}getRowCellStartCols(t){const e=this.getRowsMaxCellCount(t),n=new Array(t.length),i=new Array(e).fill(0);for(let e=0;e<t.length;e++){const a=t[e].children,r=new Array(a.length);let s=0;for(let t=0;t<a.length;t++){const e=a[t];for(;s<i.length&&i[s]>0;)s++;r[t]=s;const n=Math.max(e.colSpan,Zn.DEFAULT_CELLSPAN);if(e.rowSpan>Zn.DEFAULT_CELLSPAN)for(let t=0;t<n;t++){const n=s+t;n<i.length&&(i[n]=Math.max(i[n],e.rowSpan))}s+=n}n[e]=r;for(let t=0;t<i.length;t++)i[t]>0&&i[t]--}return n}updateCellSpan(t,e,n){const i=t.getCustomAttributesAnnotation();if(n<=Zn.DEFAULT_CELLSPAN){if(i){const n=i.render();delete n[e],t.annotationMap.set(G.CUSTOM_ATTRIBUTE,new W(n))}}else{const a=i?i.render():{};a[e]=n.toString(),t.annotationMap.set(G.CUSTOM_ATTRIBUTE,new W(a))}}insertMovedCells(t,e,n){t.forEach(((t,i)=>{const a=e[i];if(a){const e=n[i]||[];t.sort(((t,e)=>t.logicalStartCol===e.logicalStartCol?e.cellIndex-t.cellIndex:e.logicalStartCol-t.logicalStartCol)),t.forEach((t=>{const{cell:n,logicalStartCol:i}=t;if(0===a.children.length)return a.apply(new M([n])),void(e[0]=i);const r=e.findIndex((t=>t>=i));-1===r?(a.apply(new B(a.children[a.children.length-1],n)),e.push(i)):0===r?(a.apply(new P(a.children[0],n)),e.unshift(i)):(a.apply(new P(a.children[r],n)),e.splice(r,0,i))}))}}))}splitRowsBySection(t){const e=[],n=[];return t.forEach((t=>{t.parent instanceof At?e.push(t):n.push(t)})),[e,n]}buildSelectedIndices(t,e){return new Set(t.map((t=>e.indexOf(t))).filter((t=>t>=0)))}intersectsRemovalRange(t,e,n,i){return t<=i&&e>=n}countRemovedRows(t,e,n){let i=0;for(let a=t;a<=e;a++)n.has(a)&&i++;return i}getHeadCellLength(t){let e=0;for(let n=0;n<t.children.length;n++){const i=t.children[n];if(!(i instanceof mt))break;e+=i.colSpan}return e}getTheStartSpanCell(t,e,n,i){const a={rowIndex:n};for(let r=n;r>=0;r--){const n=e[r];if(n.includes(i)){a.cell=t[r].children[n.indexOf(i)],a.rowIndex=r;break}}return a}getDefaultCellBlockTemplate(e,n,i=1){const a=ge({colspan:n>1?n.toString():null,rowspan:i>1?i.toString():null}),r=t(),s={id:r,type:e,children:[{id:`${r}-p`,type:"paragraph",nodes:[{id:`${r}-p-t`,type:"text",text:""}]}]};return Object.keys(a).length>0&&(s.annotations={customAttribute:a}),s}getSortedValuesByNumericKey(t){return Array.from(t.entries()).sort((([t],[e])=>t-e)).map((([,t])=>t))}}Zn.DEFAULT_CELLSPAN=1;class Jn extends Zn{handleAction(t,e){const{rowsToBeRemoved:n}=t,i=this.getFutureFocusRow(n[0],n[n.length-1],e),a=this.splitRowsBySection(n);if(this.removeRows(a[0]),this.removeRows(a[1]),i){const t=this.getRootContent(e);if(t){const e=i.getLastNode();t.apply(new f(e,e.getRangeEndOffset()))}}}removeRows(t){if(0===t.length)return;const e=t[0].parent,n=e.children,i=this.buildSelectedIndices(t,n);if(i.size>0){if(n.length===t.length)return void e.parent.apply(new q(e));const a=Math.min(...i),r=Math.max(...i),s=this.getRowCellStartCols(n),o=this.collectCellsToMove(n,s,i,a,r);this.insertMovedCells(o,n,s),t.forEach((t=>{t.parent.apply(new q(t))}))}}collectCellsToMove(t,e,n,i,a){const r=new Map,s=t.length;for(let o=0;o<s;o++){const l=t[o],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=Zn.DEFAULT_CELLSPAN)continue;const d=o+h-1;if(!this.intersectsRemovalRange(o,d,i,a))continue;const u=h-this.countRemovedRows(o,d,n);if(o<i&&d>=i)this.updateCellSpan(c,"rowspan",u);else if(o>=i&&d>a){const i=a+1;if(i<s&&!n.has(i)){const n=e[o][t];r.has(i)||r.set(i,[]),r.get(i).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}}}return r}cloneCellWithRowSpan(t,e){const n=t.clone(t.parent);return this.updateCellSpan(n,"rowspan",e),n}getFutureFocusRow(t,e,n){const i=n.children.filter((t=>t instanceof At||t instanceof Et)).flatMap((t=>t.children)),a=i.indexOf(t),r=i.indexOf(e);return i[a-1]?i[a-1]:i[r+1]?i[r+1]:void 0}}class Qn{constructor(){this.dragging=!1,this.anchorCell=null,this.selectedCells=new Set,this.syncRTESelectionWithDebounce=be(this.syncRTESelection,100,this),this.handleSelectionChangeWithDebounce=be(this.handleSelectionChange,10,this),this.filterSelectedCell=(t,e)=>{const n=new Set;if(t.intersectsNode(e)){if(e.nodeType===Node.TEXT_NODE){const t=V.getEntityByDOM(e.parentElement);if(t){const e=Ot(t.parent,Tt);if(e)return n.add(e),Array.from(n)}}e.childNodes.forEach((e=>this.filterSelectedCell(t,e).forEach((t=>{n.add(t)}))))}return Array.from(n)},this.updateSelectedStyles=(t,e)=>{const n=1===e?"v-rte-table-cell-focused":"v-rte-table-cell-selected",i=V.getDOMByEntity(t);i&&i.classList.add(n)},this.handleDocMouseUp=()=>{this.endDrag();const t=we();t&&t.removeEventListener("mouseup",this.handleDocMouseUp)},this.handleContentClick=()=>{this.clearSelection();const t=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");t&&t.removeEventListener("mousedown",this.handleContentClick,!0)}}static computeRectRange(t,e){const n=t.parent.parent.parent;if(n!==e.parent.parent.parent)return[];const i=[];n.children.forEach((t=>{t.children.forEach((t=>i.push(t)))}));const{grid:a,cellMeta:r}=Qn.buildCellGrid(i),s=r.get(t),o=r.get(e);if(!s||!o)return[];const l=s.row+s.rowSpan-1,c=s.col,h=s.col+s.colSpan-1,d=o.row+o.rowSpan-1,u=o.col,p=o.col+o.colSpan-1,w=Math.min(s.row,o.row),f=Math.max(l,d),g=Math.min(c,u),b=Math.max(h,p),m=new Set;for(let t=w;t<=f;t++){const e=a[t];for(let t=g;t<=b;t++){const n=e[t];n&&m.add(n)}}return Array.from(m)}static getCellSpan(t){let e=1,n=1;const i=t.getAnnotationByType(G.CUSTOM_ATTRIBUTE);if(i&&i.customAttribute){const t=i.customAttribute;t.rowSpan&&(e=parseInt(t.rowSpan,10)),t.colSpan&&(n=parseInt(t.colSpan,10))}if(1===e&&1===n){const i=V.getDOMByEntity(t);if(i){const t=i.getAttribute("rowSpan"),a=i.getAttribute("colSpan");t&&(e=parseInt(t,10)),a&&(n=parseInt(a,10))}}return{rowSpan:Number.isFinite(e)&&e>0?e:1,colSpan:Number.isFinite(n)&&n>0?n:1}}static buildCellGrid(t){const e=[],n=new Map;for(let i=0;i<t.length;i++){const a=t[i];e[i]||(e[i]=[]);let r=0;for(let t=0;t<a.children.length;t++){const s=a.children[t];for(;e[i][r];)r+=1;const{rowSpan:o,colSpan:l}=Qn.getCellSpan(s);n.set(s,{row:i,col:r,rowSpan:o,colSpan:l});for(let t=0;t<o;t++){const n=i+t;e[n]||(e[n]=[]);for(let t=0;t<l;t++)e[n][r+t]=s}r+=l}}return{grid:e,cellMeta:n}}destroy(){this.removeSelectionChangeListener()}init(t){this.context=t,this.addSelectionChangeListener()}setSelectedCells(t){const e=Array.from(this.selectedCells)[0]||t[0];this.updateSelectedCells(t),this.emitCellSelectionChange(e,t)}getSelectedCells(){return Array.from(this.selectedCells)}focusCell(t){const e=V.getEntityByDOM(t);e&&(this.anchorCell=e,this.setSelectedCells([e]),this.addListeners())}dragOver(t){if(!this.anchorCell)return;const e=Qn.computeRectRange(this.anchorCell,t);e.length>1&&this.startDrag(),this.dragging&&(this.preventTextSelection(e),this.updateSelectedCells(e,{debounceSync:!0}))}endDrag(){this.dragging=!1,this.anchorCell=null}emitCellSelectionChange(t,e){const n=Ot(t,St);if(n){const t=V.getDOMByEntity(n);t&&le.notify(ot.getSubject(t,de),{host:t,detail:e})}}clearSelection(){this.selectedCells.forEach((t=>{const e=V.getDOMByEntity(t);e&&e.classList.remove("v-rte-table-cell-selected","v-rte-table-cell-focused")})),this.selectedCells.clear()}addSelectionChangeListener(){const t=we();t&&t.addEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}removeSelectionChangeListener(){const t=we();t&&t.removeEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}handleSelectionChange(){if(this.dragging)return void this.syncRTESelectionWithDebounce();const t=this.context.getSelection();if(t.rangeCount>0){const e=t.getRangeAt(0),n=e.commonAncestorContainer;if(a(n,"table")){const t=this.filterSelectedCell(e,n);this.setSelectedCells(t)}}}startDrag(){this.dragging=!0}updateSelectedCells(t,{debounceSync:e}={}){this.clearSelection(),t.forEach((e=>{this.selectedCells.add(e),this.updateSelectedStyles(e,t.length)})),e?this.syncRTESelectionWithDebounce():this.syncRTESelection()}syncRTESelection(){const t=Array.from(this.selectedCells),e=t.flatMap((t=>t.children.flatMap((t=>t.children.flatMap((t=>{if(t instanceof H)return t})))))).filter(it);t.length>1&&this.context.setSelectedNodes(e,{startNode:e[0],endNode:e[e.length-1],startOffset:0,endOffset:e[e.length-1].getRangeEndOffset()})}preventTextSelection(t){const e=this.context.getSelection();if(e.removeAllRanges(),t.length>0){const n=V.getDOMByEntity(t[0]);if(n){const t=new Range;t.setStart(n,0),t.setEnd(n,0),e.addRange(t)}}}addListeners(){const t=we();t&&t.addEventListener("mouseup",this.handleDocMouseUp);const e=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");e&&e.addEventListener("mousedown",this.handleContentClick,!0)}}class Xn extends Zn{handleAction(t,e){const{selectedRows:n}=t,[i,a]=this.splitRowsBySection(n);a.length>0?this.convertToHeaderRows(a,e):this.revertToBodyRows(i,e);const r=this.getRootContent(e);if(r){const t=n[0].getFirstNode();t&&r.apply(new f(t,0))}}convertToHeaderRows(e,n){let i=n.children.find((t=>t instanceof At));const a=e[0].parent;i||(i=At.from({id:t(),type:"table-head",children:[]}),n.apply(new P(a,i)));const r=a.children.indexOf(e[e.length-1]),s=a.children.slice(0,r+1),o=this.buildSelectedIndices(s,a.children),l=Math.min(...o),c=Math.max(...o);if(o.size>0){if(o.size<a.children.length){const t=this.getRowCellStartCols(a.children),e=this.collectCellsToMove(a.children,t,o,l,c);this.insertMovedCells(e,a.children,t)}this.convertBodyRowsToHeaderRows(a,i,s)}}convertBodyRowsToHeaderRows(t,e,n){for(let e=0;e<n.length;e++){const i=n[e];i.children=i.children.map((t=>this.convertTdToTh(t))),t.apply(new q(i))}e.apply(new M(n))}revertToBodyRows(e,n){let i=n.children.find((t=>t instanceof Et));const a=e[0].parent;i||(i=Et.from({id:t(),type:"table-body",children:[]}),n.apply(new B(a,i)));const r=a.children.indexOf(e[0]),s=a.children.slice(r),o=this.buildSelectedIndices(s,a.children);if(o.size>0){const t=this.getRowCellStartCols(a.children),e=this.collectCellsToMove(a.children,t,o,Math.min(...o),Math.max(...o));this.insertMovedCells(e,a.children,t),this.convertHeadRowsToBodyRows(a,i,s)}}convertHeadRowsToBodyRows(t,e,n){const i=e.children[0],a=this.getRowCellStartCols(n);for(let r=0;r<n.length;r++){const s=n[r];t.apply(new q(s));const o=i?this.getHeadCellLength(i):0;s.children=this.convertThToTd(s,a[r],o),i&&e.apply(new P(i,s))}i||e.apply(new M(n))}collectCellsToMove(t,e,n,i,a){const r=new Map,s=t.length;for(let o=0;o<s;o++){const l=t[o],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=Zn.DEFAULT_CELLSPAN)continue;const d=o+h-1;if(!this.intersectsRemovalRange(o,d,i,a))continue;const u=this.countRemovedRows(o,d,n),p=h-u;if(o<i&&d>=i){this.updateCellSpan(c,"rowspan",p);const a=i;if(a<s&&n.has(a)){const n=e[o][t];r.has(a)||r.set(a,[]),r.get(a).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}else if(o>=i&&d>a){this.updateCellSpan(c,"rowspan",u);const i=a+1;if(i<s&&!n.has(i)){const n=e[o][t];r.has(i)||r.set(i,[]),r.get(i).push({cell:this.cloneCellWithRowSpan(c,p),newRowSpan:p,cellIndex:t,logicalStartCol:n})}}}}return r}convertTdToTh(t){if(t instanceof mt)return t;const e=mt.from(t.toJSON());return e.parent=t.parent,e}convertThToTd(t,e,n){return t.children.map(((i,a)=>{let r=i;const s=e[a]<n,o=i.toJSON();return r=s?i:Tt.from(this.deleteHeadCellDefaultBackground(o)),r.parent=t,r}))}cloneCellWithRowSpan(e,n){const i=e.clone(e.parent);i.id=t(),i.children=[];const a=this.createNewParagraph("");return a&&i.apply(new M([a])),this.updateCellSpan(i,"rowspan",n),i}deleteHeadCellDefaultBackground(t){var e;if(t&&t.annotations&&t.annotations.customStyle){delete t.annotations.tableCell;const n=t.annotations.customStyle.backgroundColor,i=It.getDefaultBackgroundColor();!n||n!==i&&(null===(e=r(n))||void 0===e?void 0:e.toUpperCase())!==i||delete t.annotations.customStyle.backgroundColor}return t}}class Yn extends Rt{handleAction(t,e){const{insertDirection:n,tableCellInsertRange:i}=t,a=new Set(i.map((t=>t.id))),r=Nt(e),s=jt(r),[o,l]=this.getBoundaryCellColumnRange(i,r,s),c=n===Mt.LEFT?o:l+1,h=this.hasSelectedCellInsideTargetColumn(r,s,c,a),d=new Set;r.forEach(((t,i)=>{if(d.has(i))return;const o=this.findExpandableCell(t,i,c,s,n,a,h);if(o){const t=o.rowSpan;if(Dt(o,o.colSpan+1,o.rowSpan,e,!0),t>1)for(let e=1;e<t;e++)d.add(i+e);return}const l=this.findInsertPosition(t,i,c,s,r);if(l){const e=this.generateTableCell(l.templateCell);t.apply(l.before?new P(l.anchorCell,e):new B(l.anchorCell,e))}}))}findExpandableCell(t,e,n,i,a,r,s){const o=i[e],l=t.children.reduce(((t,e)=>t+(r.has(e.id)?1:0)),0);for(const c of t.children){const t=o.indexOf(c.id),h=t+c.colSpan,d=n===h,u=e+c.rowSpan>=i.length,p=r.has(c.id),w=n>t&&n<h;if(a===Mt.LEFT?w:w&&(!p||!u)||d&&c.colSpan>1&&p&&!u&&1===l&&!s)return c}return null}hasSelectedCellInsideTargetColumn(t,e,n,i){for(let a=0;a<t.length;a++){const r=t[a],s=e[a];for(const t of r.children){if(!i.has(t.id))continue;const e=s.indexOf(t.id),a=e+t.colSpan;if(n>e&&n<a)return!0}}return!1}findInsertPosition(t,e,n,i,a){const r=i[e];let s=t.children[0];if(n>=0&&n<r.length){const t=_t(a,r[n]);t&&(s=t)}let o=0;for(let e=0;e<t.children.length;e++){const i=t.children[e];for(;o<r.length&&r[o]!==i.id;)o++;if(o>=n)return{anchorCell:i,templateCell:s,before:!0};const a=o+i.colSpan;if(a>n||e===t.children.length-1)return{anchorCell:i,templateCell:s,before:!1};o=a}return null}generateTableCell(t){return t instanceof mt?mt.from(Bt(t.type)):Tt.from(Bt(t.type))}}class ti extends Rt{handleAction(t,e){const n=Nt(e),i=jt(n),[a,r]=this.getBoundaryCellColumnRange(t.tableCellDeleteRange,n,i),s=Math.max(n.indexOf(t.tableCellDeleteRange[t.tableCellDeleteRange.length-1].parent),0),{coveredCellIds:o,coveredCells:l,adjustmentCellInfo:c}=this.getDeleteCellsInfo(n,a,r,i),h=this.findNextFocusableCell(n,i,a,r,o,s);this.deleteCells(l,c,e);const d=this.getRootContent(e),u=Pt(h);d&&u&&d.apply(new f(u))}getDeleteCellsInfo(t,e,n,i){const a=[],r=new Set,s=[],o=Ht(i);return t.forEach((t=>{t.children.forEach((t=>{const i=o.get(t.id);if(void 0===i)return;const{colSpan:l,rowSpan:c}=Kt(t),h=this.getColumnOverlapCount(i,l,e,n);if(h<=0)return;if(h===l)return a.push(t),void r.add(t.id);const d=Math.max(1,l-h);s.push({cell:t,nextColSpan:d,rowSpan:c})}))})),{coveredCells:a,coveredCellIds:r,adjustmentCellInfo:s}}findNextFocusableCell(t,e,n,i,a,r){for(let s=0;s<t.length;s++){const o=this.findFocusableCellIdInGridRow(e[(r+s)%t.length],n,i,a);if(!o)continue;const l=_t(t,o);if(l)return l}return null}findFocusableCellIdInGridRow(t,e,n,i){for(let e=n+1;e<t.length;e++){const n=t[e];if(n&&!i.has(n))return n}for(let n=e-1;n>=0;n--){const e=t[n];if(e&&!i.has(e))return e}return null}deleteCells(t,e,n){t.forEach((t=>{t.parent.apply(new q(t))}));const i=new Set;e.forEach((({cell:t,nextColSpan:e,rowSpan:a})=>{i.add(t.id),Dt(t,e,a,n)})),this.normalizeRemainingCellSpans(n,i)}normalizeRemainingCellSpans(t,e){Nt(t).forEach((n=>{n.children.forEach((n=>{const{colSpan:i,rowSpan:a}=Kt(n);if(e.has(n.id)){const e=Vt(t);if(!(a>1&&i===e))return}Dt(n,i,a,t)}))}))}getColumnOverlapCount(t,e,n,i){const a=t+e-1,r=Math.max(t,n),s=Math.min(a,i);return r<=s?s-r+1:0}}class ei extends O{constructor(t){super(),this.isFlushable=!0,this.type="CREATE_SEGMENT_TABLE_CELL",this.payload=t}}class ni extends _{handleAction(t,e){const{table:n,sourceCell:i,colSpan:a,cellType:r,keepSourceContent:s}=t.payload,o=s?this.convertCellType(i,r):zt(r);Dt(o,a,i.rowSpan,n),e.apply(new P(i,o))}convertCellType(t,e){return"table-head-cell"===e?mt.from(t.toJSON()):Tt.from(t.toJSON())}}class ii extends _{handleAction(t,e){const{cell:n,targetCellType:i}=t.payload,a="table-head-cell"===i?mt.from(n.toJSON()):Tt.from(n.toJSON());e.apply(new P(n,a)),e.apply(new q(n))}}class ai extends _{handleAction(t,e){const{table:n,cell:i,col:a,cellStartCol:r,endCol:s,targetCellType:o}=t.payload,l=r+i.colSpan-1,c=a>r?a-r:0,h=Math.min(s,l),d=h-a+1,u=l-h;c>0&&e.apply(new ei({table:n,sourceCell:i,colSpan:c,cellType:i.type,keepSourceContent:!0})),e.apply(new ei({table:n,sourceCell:i,colSpan:d,cellType:o,keepSourceContent:0===c})),u>0&&e.apply(new ei({table:n,sourceCell:i,colSpan:u,cellType:i.type,keepSourceContent:0===c&&d===i.colSpan})),e.apply(new q(i))}}class ri extends Rt{handleAction(t,e){const n=Nt(e),i=jt(n),a=Ht(i),[r,s]=this.getBoundaryCellColumnRange(t.tableCellSelectRange,n,i),o=[],l=new Set;n.forEach((t=>{t.children.forEach((t=>{const e=a.get(t.id);void 0!==e&&e>=r&&e<=s&&!l.has(t.id)&&(l.add(t.id),o.push(t))}))})),t.selectCellCallback(o)}}class si extends rn{canIntercept(t){return t.childrenToBeInserted.some((t=>!(t instanceof Tt)))}intercept(){}}class oi extends _{handleAction(t,e){const{targetCell:n,mergeCells:i,colSpan:a,rowSpan:r,direction:s}=t;this.mergeContentToTargetCell(n,i),Dt(n,a,r,e),this.deleteOtherSelectedCells(i,n),s!==Ft.MERGE_CELL_LEFT&&s!==Ft.MERGE_CELL_RIGHT&&r>1&&this.clearRowSpanIfUniformAcrossRow(n,e,r);const o=this.getRootContent(e),l=Pt(n);o&&l&&o.apply(new f(l))}mergeContentToTargetCell(t,e){const n=e.flatMap((t=>t.children)),i=n.filter((t=>t.isNotEmpty()));t.children=(i.length>0?i:[n[0]]).map((e=>e.clone(t)))}deleteOtherSelectedCells(t,e){t.forEach((t=>{t!==e&&t.parent.apply(new q(t))}))}clearRowSpanIfUniformAcrossRow(t,e,n){const i=t.parent.parent.children,a=jt(i),r=[];for(let e=0;e<a.length;e++)a[e].includes(t.id)&&r.push(e);if(r.length>1){const t=r[0],s=t+n-1,o=new Set;let l=Number.POSITIVE_INFINITY;for(let e=0;e<a[0].length;e++){let n=a[t][e],i=1,r=!1;for(let c=t+1;c<=s;c++)a[c][e]!==n?(i>1&&(r=!0,l=Math.min(l,i),o.add(n)),i=1,n=a[c][e]):i++;if(i<2&&!r){o.clear();break}i>1&&(l=Math.min(l,i),o.add(n))}o.size>0&&i.forEach((t=>{t.children.forEach((t=>{if(o.has(t.id)){const{rowSpan:n,colSpan:i}=Kt(t);Dt(t,i,n-l+1,e)}}))}))}}}class li extends m{canHandle(t,e){const n=t[e];return n&&"TABLE"===n.tagName?1:0}handle(e,n){return St.from({id:t(),type:"table-block",annotations:v.generate(St,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ci extends b{canHandle(t,e){const n=t[e];return n&&"THEAD"===n.tagName?1:0}handle(e,n){return At.from({id:t(),type:"table-head",annotations:v.generate(At,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class hi extends b{canHandle(t,e){const n=t[e];return n&&"TBODY"===n.tagName?1:0}handle(e,n){return Et.from({id:t(),type:"table-body",annotations:v.generate(Et,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class di extends b{canHandle(t,e){const n=t[e];return n&&"TR"===n.tagName?1:0}handle(e,n){return $t.from({id:t(),type:"table-row",annotations:v.generate($t,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ui extends b{canHandle(t,e){const n=t[e];return!n||"TD"!==n.tagName&&"TH"!==n.tagName?0:1}handle(e,n){const i=e[0],a=[{id:t(),type:"paragraph",annotations:{internalWrapper:n&&!n.autoMatchFormat},nodes:[{id:t(),type:"text",annotations:{plainText:n&&!n.autoMatchFormat},text:""}]}];return"TH"===i.tagName?mt.from({id:t(),type:"table-head-cell",annotations:this.getTableHeadCellAnnotations(i,n),children:a},n):Tt.from({id:t(),type:"table-cell",annotations:v.generate(Tt,i,n),children:a},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableHeadCellAnnotations(t,e){const n=v.generate(mt,t,e);return n&&n.tableCell&&Ct.getColorKey(n.tableCell.backgroundColor,!0)===pt.key&&(delete n.tableCell.backgroundColor,n.customStyle&&delete n.customStyle.backgroundColor),n}}class pi extends m{canHandle(t,e){const n=t[e];return n&&n.parentElement&&"TABLE"===n.parentElement.tagName&&"CAPTION"===n.tagName?1:0}handle(e,n){const i=this.getTableCaptionAnnotations(e[0],n);return bn.from({id:t(),type:"table-caption",annotations:Object.assign(Object.assign({},i),{caption:!0}),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableCaptionAnnotations(t,e){const n=v.generate(bn,t,e);return n&&n.customStyle&&n.customStyle.backgroundColor&&Ct.getColorKey(n.customStyle.backgroundColor,!0)===pt.key&&delete n.customStyle.backgroundColor,n}}class wi extends S{getBackgroundColor(t){return t.style.backgroundColor?Ct.getColorKey(t.style.backgroundColor)||t.style.backgroundColor:null}getBorder(t){const e=t.style,n=e.borderStyle,i=e.borderWidth,a=e.borderColor;if(a||n||i){const t="initial"===a?"":a;return{style:"initial"===n?"":n,width:"initial"===i?"":i,color:Ct.getColorKey(t)||t}}return null}getWidth(t){if(t.style.width)return t.style.width;const e=t.getAttribute("width");return e?/^\d+$/.test(e)?`${e}px`:e:null}getHeight(t){if(t.style.height)return t.style.height;const e=t.getAttribute("height");return e?/^\d+$/.test(e)?`${e}px`:e:null}}class fi extends wi{canHandle(t){return"RTETableBlock"===t.dtoName}handle(t){const e=ge({backgroundColor:this.getBackgroundColor(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),alignment:this.getAlignment(t)});return Object.keys(e).length>0?{table:e}:{}}getAlignment(t){const e=t.classList;if(e.contains("v-rte--extension-table-align-left"))return"left";if(e.contains("v-rte--extension-table-align-center"))return"center";if(e.contains("v-rte--extension-table-align-right"))return"right";const n=t.style,i=n.marginLeft,a=n.marginRight;if("auto"===i&&"auto"===a)return"center";if("0"===i||"0px"===i)return"left";if("0"===a||"0px"===a)return"right";const r=t.getAttribute("align");return r&&["left","center","right"].includes(r)?r:null}}class gi extends wi{canHandle(t){return"RTETableCellBlock"===t.dtoName}handle(t){const e=ge({backgroundColor:this.getBackgroundColor(t),padding:this.getPadding(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),textAlign:this.getTextAlign(t),verticalAlign:this.getVerticalAlign(t),minWidth:this.getMinWidth(t),boxSizing:this.getBoxSizing(t)});return Object.keys(e).length>0?{tableCell:e}:{}}getMinWidth(t){return t.style.minWidth?t.style.minWidth:null}getBoxSizing(t){return t.style.boxSizing?t.style.boxSizing:null}getPadding(t){return t.style.padding?t.style.padding:null}getTextAlign(t){if(t.style.textAlign){const e=t.style.textAlign;if(["left","center","right","justify"].includes(e))return e}const e=t.getAttribute("align");return e&&["left","center","right","justify"].includes(e)?e:null}getVerticalAlign(t){if(t.style.verticalAlign){const e=t.style.verticalAlign;if(["top","middle","bottom"].includes(e))return e}return null}}class bi extends gi{canHandle(t){return"RTETableHeadCellBlock"===t.dtoName}}class mi extends _{handleAction(t,e){const n=t.toAnnotation(),i=this.getDOMByEntity(e);if(i){const t=i.closest(".v-rte--extension-table-container"),{backgroundColorAnnotation:a,width:r,height:s}=n;i.style.backgroundColor=a.renderStyle().color,i.style.border=n.borderStr,i.style.width=r,i.style.height=s;const o=n.renderAlignmentStyle().margin;i.style.margin=o,t&&(t.style.width=r,t.style.height=s,t.style.margin=o),this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","margin"])}}}class vi extends _{handleAction(t,e){const n=t.toAnnotation(),i=this.getDOMByEntity(e);if(i){const{width:t,height:a,borderStr:r,padding:s,textAlign:o,verticalAlign:l}=n,c=n.renderStyle().backgroundColor||"";i.style.backgroundColor=c,i.style.border=r,i.style.width=t,i.style.height=a,i.style.padding=s,i.style.textAlign=o,i.style.verticalAlign=l,this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","padding","textAlign","verticalAlign"])}}}class yi extends _{handleAction(t,e){const n=e.parent,i=n.parent,a=Ot(n,St),r=Nt(a),s=r.indexOf(n),{colSpan:o,rowSpan:l}=Kt(e),c=qt(e,r),h=Math.ceil(l/2),d=Math.max(1,l-h),u=1===l;Dt(e,o,h,a);const p=s+h,w=zt(e.type);if(Dt(w,o,d,a),u){const t=this.createNewRowWithCell(i,w),s=i.children.indexOf(n);i.apply(new B(i.children[s],t)),r.splice(p,0,t),this.updateCellsSpanningThroughInsertionPoint(r,p,e,a)}else{const t=r[p],e=this.findInsertPosition(t,c,r,p);t.children.splice(e,0,w),w.parent=t}}findInsertPosition(t,e,n,i){let a=0;for(let t=0;t<i;t++){const r=n[t];for(const s of r.children){const{colSpan:r,rowSpan:o}=Kt(s);t+o>i&&qt(s,n)<e&&(a+=r)}}let r=a;for(let n=0;n<t.children.length;n++){if(r>=e)return n;const i=t.children[n],{colSpan:a}=Kt(i);r+=a}return t.children.length}createNewRowWithCell(e,n){const i={id:t(),type:"table-row",children:[]},a=$t.from(i);return a.parent=e,a.children.push(n),n.parent=a,a}updateCellsSpanningThroughInsertionPoint(t,e,n,i){for(let a=0;a<e;a++){const r=t[a];for(const t of r.children){if(t===n)continue;const{colSpan:r,rowSpan:s}=Kt(t);a+s>=e&&Dt(t,r,s+1,i)}}}}class xi extends _{handleAction(t,e){const n=e.parent,i=Ot(n,St),a=Nt(i),r=a.indexOf(n),{colSpan:s,rowSpan:o}=Kt(e),l=qt(e,a),c=l+s-1,h=Math.ceil(s/2),d=Math.floor(s/2);Dt(e,h,o,i);const u=zt(e.type);Dt(u,d,o,i),n.apply(new B(e,u));const p=1===s?1:0;p>0&&this.updateOtherRowsCells(a,r,l,c,o,p,i)}updateOtherRowsCells(t,e,n,i,a,r,s){for(let o=0;o<t.length;o++){const l=t[o];if(!(o>=e&&o<e+a))for(const e of l.children){const a=qt(e,t),{colSpan:o,rowSpan:l}=Kt(e);if(a+o-1>=n&&a<=i){Dt(e,o+r,l,s);break}}}}}class Li extends Zn{handleAction(e,n){const{selectedRows:i}=e,a=i[i.length-1];let r=n.children.find((t=>t instanceof Et));const s={id:t(),type:"table-row",children:[]};let o=0,l=null;r?(l=r.children[0],o=this.getHeadCellLength(l)):(r=Et.from({id:t(),type:"table-body",children:[]}),n.apply(new M([r])));const c=a.parent.children,h=this.getRowsMaxCellCount(c);if(this.getRowsMaxCellCount([a])<h){const t=c.indexOf(a),e=this.getRowCellStartCols(c),n=new Map;for(let i=0;i<h;i++){const a=i<o?"table-head-cell":"table-cell",{cell:r}=this.getTheStartSpanCell(c,e,t,i);if(r){const t=r.colSpan;n.set(i,this.getDefaultCellBlockTemplate(a,t)),i+=t-1}}s.children=this.getSortedValuesByNumericKey(n)}else s.children=this.createTableCells(a,o);const d=l?new P(l,$t.from(s)):new M([$t.from(s)]);r.apply(d)}createTableCells(t,e){const n=[];let i=0;for(const a of t.children)n.push(this.getDefaultCellBlockTemplate(i<e?"table-head-cell":"table-cell",a.colSpan)),i+=a.colSpan;return n}}class Ci extends Zn{handleAction(e){const{insertDirection:n,selectedRows:i}=e,a=n===Gt.ABOVE?i[0]:i[i.length-1],r={id:t(),type:"table-row",children:[]},s=a.parent.children,o=this.getRowsMaxCellCount(s),l=s.indexOf(a),c=this.getRowCellStartCols(s),h=new Map;for(let t=0;t<o;t++){const{cell:e,rowIndex:i}=this.getTheStartSpanCell(s,c,l,t);if(e){const{colSpan:a,rowSpan:r}=e;if(n===Gt.ABOVE?i!==l:i+r>l+1){this.updateCellSpan(e,"rowspan",r+1),t+=a-1;continue}h.set(t,this.getDefaultCellBlockTemplate(e.type,a)),t+=a-1}}r.children=this.getSortedValuesByNumericKey(h);const d=$t.from(r),u=n===Gt.ABOVE?new P(a,d):new B(a,d);a.parent.apply(u)}}class Si extends rn{canIntercept(t,e){return Boolean(e.parent)}intercept(t,e,n){const i=this.createNewParagraph("");i&&(n.parent.apply(0===e.startOffset?new P(n,i):new B(n,i)),e.newBlock=i)}createNewParagraph(e){const n=U.getRTEBlockClass("paragraph");if(n)return n.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:e}]})}}class ki extends Z{constructor(){super(...arguments),this.stylesToBeFiltered=gt.getDefaultStyles(),this.elementTagName="table"}canFilter(t){return this.isTableBlock(t.dtoName)}canRefill(t,e){return this.isTableBlock(t)&&e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableBlock(t){return"RTETableBlock"===t}}class Ti extends Z{constructor(){super(...arguments),this.stylesToBeFiltered=gn.getDefaultStyles(),this.elementTagName="table caption"}canFilter(t){return this.isTableCaption(t.dtoName)}canRefill(t,e){return this.isTableCaption(t)&&"CAPTION"===e.nodeName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCaption(t){return"RTETableCaptionBlock"===t}}class Ai extends Z{constructor(t="td"){super(),this.stylesToBeFiltered=bt.getDefaultStyles(),this.elementTagName="",this.stylesWithRGBColor=bt.getDefaultStyles(!1),this.cellBlockClassName="",this.elementTagName=t,this.cellBlockClassName="td"===t?"RTETableCellBlock":"RTETableHeadCellBlock"}canFilter(t){return this.isTableCell(t.dtoName)}filterAndDeleteStyles(t,e){return this.convertDefaultBorderColorFromRGBToHex(t),super.filterAndDeleteStyles(t,e)}canRefill(t,e){return this.isTableCell(t)&&e.nodeName===this.elementTagName.toUpperCase()}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCell(t){return t===this.cellBlockClassName}convertDefaultBorderColorFromRGBToHex(t){t&&t.border&&t.border===this.stylesWithRGBColor.border&&(t.border=this.stylesToBeFiltered.border)}}class Ei extends E{constructor(t=Wt){super(),this.toolbarButtonRenderer=new Fn,this.tableBlockRenderer=new _n,this.tableRowBlockRenderer=new Mn,this.tableCellRenderer=new Hn,this.tableHeadCellRenderer=new Pn,this.tableSelection=new Qn,Ct.setTableColors(t),this.registerToolbarButtonRenderer("table",this.toolbarButtonRenderer),this.registerBlockBasicStrategies(St.name),this.registerBlockBasicStrategies(At.name),this.registerBlockBasicStrategies(mt.name),this.registerBlockBasicStrategies($t.name),this.registerBlockBasicStrategies(Tt.name),this.registerBlockBasicStrategies(Et.name),this.registerRenderer("table-block",this.tableBlockRenderer),this.registerRenderer("table-head",new Bn),this.registerRenderer("table-head-cell",this.tableHeadCellRenderer),this.registerRenderer("table-row",this.tableRowBlockRenderer),this.registerRenderer("table-cell",this.tableCellRenderer),this.registerRenderer("table-body",new Vn),this.registerRenderer("table-caption",new Un),this.registerNode("table-block",St),this.registerNode("table-head",At),this.registerNode("table-head-cell",mt),this.registerNode("table-row",$t),this.registerNode("table-cell",Tt),this.registerNode("table-body",Et),this.registerNode("table-caption",bn),this.registerElementToBlockDTOClassStrategy(new li),this.registerElementToBlockDTOClassStrategy(new ci),this.registerElementToBlockDTOClassStrategy(new hi),this.registerElementToBlockDTOClassStrategy(new di),this.registerElementToBlockDTOClassStrategy(new ui),this.registerElementToBlockDTOClassStrategy(new pi),this.registerAnnotationHandler(new fi),this.registerAnnotationHandler(new gi),this.registerAnnotationHandler(new bi)}initialExtensionAfterLoad(t){this.tableSelection.init(t);const e=Object.assign(Object.assign({},t),{tableSelection:this.tableSelection});super.initialExtensionAfterLoad(e)}destroyExtension(){this.tableBlockRenderer.destroy(),this.tableSelection.destroy()}}(()=>{const t=new $n,e=new Gn;E.registerActionHandleStrategy(g.name,"INSERT_TABLE_BLOCK",t),E.registerActionHandleStrategy(g.name,"DELETE_TABLE_BLOCK",e),E.registerActionHandleStrategy(Tt.name,"DELETE_TABLE_BLOCK",e),E.registerActionHandleStrategy(mt.name,"DELETE_TABLE_BLOCK",e),E.registerActionHandleStrategy(j.name,"INSERT_TABLE_BLOCK",t),E.registerActionHandleStrategy(x.name,"INSERT_TABLE_BLOCK",t),E.registerActionHandleStrategy(St.name,Ut,new Li),E.registerActionHandleStrategy(St.name,Zt,new Ci),E.registerActionHandleStrategy(St.name,Jt,new Jn),E.registerActionHandleStrategy(St.name,Qt,new Xn),E.registerActionHandleStrategy(St.name,Xt,new Yn),E.registerActionHandleStrategy(St.name,Yt,new ti),E.registerActionHandleStrategy(St.name,te,new ee),E.registerActionHandleStrategy($t.name,ne,new ai),E.registerActionHandleStrategy($t.name,"CREATE_SEGMENT_TABLE_CELL",new ni),E.registerActionHandleStrategy($t.name,ie,new ii),E.registerActionHandleStrategy(Tt.name,ae,new yi),E.registerActionHandleStrategy(Tt.name,re,new xi),E.registerActionHandleStrategy(mt.name,ae,new yi),E.registerActionHandleStrategy(mt.name,re,new xi),E.registerActionHandleStrategy(St.name,se,new ri),E.registerActionHandleStrategy(St.name,oe,new oi),E.registerActionHandleStrategy(St.name,xn.name,new mi),E.registerActionHandleStrategy(Tt.name,kn.name,new vi),E.registerActionHandleStrategy(mt.name,Tn.name,new vi),E.registerActionHandlerInterceptor(j.name,z.DELETE_BLOCK_CONTENT,new qn),E.registerActionHandlerInterceptor($t.name,z.INSERT_CHILDREN_BEFORE,new si),E.registerActionHandlerInterceptor(Tt.name,z.DELETE_CHILDREN,new Wn),E.registerActionHandlerInterceptor(mt.name,z.DELETE_CHILDREN,new Wn),E.registerActionHandlerInterceptor(St.name,z.INSERT_NEW_PARAGRAPH,new Si),E.registerFilterStylesStrategy(St.dtoName,new ki),E.registerFilterStylesStrategy(bn.dtoName,new Ti),E.registerFilterStylesStrategy(Tt.dtoName,new Ai),E.registerFilterStylesStrategy(mt.dtoName,new Ai("th"))})();class Oi extends J{constructor(t,e,n){super(t,n),this.type="horizontal-line",this.parent=e}toJSON(){return{id:this.id,type:"horizontal-line"}}clone(t){return new Oi(this.id,t,super.cloneAnnotations())}toHtml(){return"<hr>"}}const Ii={display:"inline-block",width:"100%",height:"4px",backgroundColor:"rgb(222, 222, 222)",borderWidth:"0px"};class Ri extends Z{constructor(){super(...arguments),this.stylesToBeFiltered=Ii,this.elementTagName="hr"}canFilter(t){return class{static isHorizontalLineBlock(t){return"RTEHorizontalLineBlock"===t}}.isHorizontalLineBlock(t.dtoName)}canRefill(t,e){return e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}var Ni;!function(t){t.HORIZONTAL_LINE="HORIZONTAL_LINE"}(Ni||(Ni={}));class ji extends F{constructor(){super(...arguments),this.type=Ni.HORIZONTAL_LINE}static from(){return[Ni.HORIZONTAL_LINE,new ji]}static getDefaultStyles(){return Ii}toJSON(){return null}clone(){return new ji}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte-horizontal-line-hr"}renderStyle(t){return(null==t?void 0:t.standalone)?ji.getDefaultStyles():null}}class Di extends N{constructor(t,e){super(t),this.dtoName=Di.dtoName,this.type="horizontal-line",this.children=[];const{autoMatchFormat:n=!0}=null!=e?e:{};n&&(this.annotationMap=new Map([ji.from()]))}static from(e,n={autoMatchFormat:!0}){var i,a;const r=new Di(e.id,n),s=(null===(a=null===(i=e.children)||void 0===i?void 0:i[0])||void 0===a?void 0:a.id)||t(),o=new Oi(s,r);return r.children=[o],e.annotations&&N.convertAnnotationsToMap(r.annotationMap,e.annotations),r}static create(e,n={autoMatchFormat:!0}){const i=new Di(t(),n),a=new Oi(t(),i);return i.children=[a],e&&N.convertAnnotationsToMap(i.annotationMap,e),i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"horizontal-line",children:this.children.map((t=>t.toJSON()))})}toHtml(t){return`<hr${super.generateAttributeString(t)}>`}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1]}clone(t){const e=new Di(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}Di.dtoName="RTEHorizontalLineBlock";class _i extends A{doRender(t,e,n){const i=e.children[0],a=e.getStyles(n),r=e.getClasses(n),s=[J.DECORATOR_NODE_CLASS,r].filter(Boolean).join(" ");return t("div",{key:e.id,class:`v-rte-horizontal-line ${J.DECORATOR_CONTAINER_CLASS}`,ref:this.useRef(e)},[t("hr",{key:(null==i?void 0:i.id)||e.id+"-hr",class:s,style:Object.keys(a).length>0?a:void 0,ref:i?this.useRef(i):void 0})])}injectRTEScopeStyles(){return".v-rte-horizontal-line{padding:8px 0;overflow:hidden}.v-rte-horizontal-line .v-rte-horizontal-line-hr{display:inline-block;width:100%;height:4px;border-width:0px;background-color:rgb(222, 222, 222)}"}}class Bi extends O{constructor(t,e=0){super(),this.type="INSERT_HORIZONTAL_LINE_BLOCK",this.splitPointNode=t,this.startOffsetOfNode=e}}class Mi extends ze{render(t,e){return this.renderButton(t,e,{icon:"horizontal-line",tooltip:{text:w.t("Horizontal line")}})}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,[i]=n();return i?t.disabled||!I.canHandle("INSERT_HORIZONTAL_LINE_BLOCK",i.parent):t.disabled}return!1}handleButtonClick(t){if(this.isDisabled(t))return;const e=this.getExtensionContext(t.host);if(e){const{host:n,getSelectedNodes:i,flushValue:a}=e,r=i()[0],s=new Bi(r,t.rteRange.startOffset);r?r.parent&&r.parent.apply(s):n.value.apply(s),s.nextFocusNode&&n.value.apply(new f(s.nextFocusNode,0)),a(n.value)}}handleDropdownClick(){}}at.register({"horizontal-line":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 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="M0 224H32 608h32v64H608 32 0V224z"/></svg>'}});class Hi extends m{canHandle(t,e){return"HR"===t[e].tagName?1:0}handle(t,e){const n=v.generate(Di,t[0],e);return Di.create(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class Vi extends _{handleAction(t,e){const n=Di.create();if(t.splitPointNode instanceof R){const i=t.splitPointNode,a=t.startOffsetOfNode;if(this.isCaretPositionAtBlockEnd(e,i,a))this.insertAfterWithFocus(t,e,n);else if(this.isCaretPositionAtBlockStart(e,i,a))e.parent.apply(new P(e,n)),t.nextFocusNode=e.getFirstNode();else{const r=new Q(i,a);e.apply(r);const s=this.getNextSiblingBlock(e);e.parent.apply(new B(e,n)),t.nextFocusNode=s.getFirstNode()}}else if(t.splitPointNode)this.insertAfterWithFocus(t,e,n);else{const i=super.createNewParagraph("");e.apply(new M([n,i])),t.nextFocusNode=i.children[0]}}insertAfterWithFocus(t,e,n){const i=this.getNextSiblingBlock(e),a=null==i?void 0:i.getFirstNode();if(a instanceof R)e.parent.apply(new B(e,n)),t.nextFocusNode=a;else{const i=super.createNewParagraph("");e.parent.apply(new B(e,n,i)),t.nextFocusNode=i.children[0]}}getNextSiblingBlock(t){const e=t.parent.children,n=e.indexOf(t);return e[n+1]}}class Pi extends E{constructor(){super(),this.blockRenderer=new _i,this.toolbarButtonRenderer=new Mi,this.registerBlockBasicStrategies(Di.name),this.registerNode("horizontal-line",Di),this.registerRenderer("horizontal-line",this.blockRenderer),this.registerToolbarButtonRenderer("horizontalLine",this.toolbarButtonRenderer),this.registerElementToBlockDTOClassStrategy(new Hi),E.registerFilterStylesStrategy(Di.dtoName,new Ri)}}(()=>{const t=new Vi;E.registerActionHandleStrategy(g.name,"INSERT_HORIZONTAL_LINE_BLOCK",t),E.registerActionHandleStrategy(j.name,"INSERT_HORIZONTAL_LINE_BLOCK",t),E.registerActionHandleStrategy(x.name,"INSERT_HORIZONTAL_LINE_BLOCK",t),E.registerActionHandleStrategy(Di.name,"INSERT_HORIZONTAL_LINE_BLOCK",t)})();const Ki={key:"latin",label:"Latin",characters:[{character:"Ā",title:"Latin capital letter a with macron"},{character:"ā",title:"Latin small letter a with macron"},{character:"Ă",title:"Latin capital letter a with breve"},{character:"ă",title:"Latin small letter a with breve"},{character:"Ą",title:"Latin capital letter a with ogonek"},{character:"ą",title:"Latin small letter a with ogonek"},{character:"Ć",title:"Latin capital letter c with acute"},{character:"ć",title:"Latin small letter c with acute"},{character:"Ĉ",title:"Latin capital letter c with circumflex"},{character:"ĉ",title:"Latin small letter c with circumflex"},{character:"Ċ",title:"Latin capital letter c with dot above"},{character:"ċ",title:"Latin small letter c with dot above"},{character:"Č",title:"Latin capital letter c with caron"},{character:"č",title:"Latin small letter c with caron"},{character:"Ď",title:"Latin capital letter d with caron"},{character:"ď",title:"Latin small letter d with caron"},{character:"Đ",title:"Latin capital letter d with stroke"},{character:"đ",title:"Latin small letter d with stroke"},{character:"Ē",title:"Latin capital letter e with macron"},{character:"ē",title:"Latin small letter e with macron"},{character:"Ĕ",title:"Latin capital letter e with breve"},{character:"ĕ",title:"Latin small letter e with breve"},{character:"Ė",title:"Latin capital letter e with dot above"},{character:"ė",title:"Latin small letter e with dot above"},{character:"Ę",title:"Latin capital letter e with ogonek"},{character:"ę",title:"Latin small letter e with ogonek"},{character:"Ě",title:"Latin capital letter e with caron"},{character:"ě",title:"Latin small letter e with caron"},{character:"Ĝ",title:"Latin capital letter g with circumflex"},{character:"ĝ",title:"Latin small letter g with circumflex"},{character:"Ğ",title:"Latin capital letter g with breve"},{character:"ğ",title:"Latin small letter g with breve"},{character:"Ġ",title:"Latin capital letter g with dot above"},{character:"ġ",title:"Latin small letter g with dot above"},{character:"Ģ",title:"Latin capital letter g with cedilla"},{character:"ģ",title:"Latin small letter g with cedilla"},{character:"Ĥ",title:"Latin capital letter h with circumflex"},{character:"ĥ",title:"Latin small letter h with circumflex"},{character:"Ħ",title:"Latin capital letter h with stroke"},{character:"ħ",title:"Latin small letter h with stroke"},{character:"Ĩ",title:"Latin capital letter i with tilde"},{character:"ĩ",title:"Latin small letter i with tilde"},{character:"Ī",title:"Latin capital letter i with macron"},{character:"ī",title:"Latin small letter i with macron"},{character:"Ĭ",title:"Latin capital letter i with breve"},{character:"ĭ",title:"Latin small letter i with breve"},{character:"Į",title:"Latin capital letter i with ogonek"},{character:"į",title:"Latin small letter i with ogonek"},{character:"İ",title:"Latin capital letter i with dot above"},{character:"ı",title:"Latin small letter dotless i"},{character:"IJ",title:"Latin capital ligature ij"},{character:"ij",title:"Latin small ligature ij"},{character:"Ĵ",title:"Latin capital letter j with circumflex"},{character:"ĵ",title:"Latin small letter j with circumflex"},{character:"Ķ",title:"Latin capital letter k with cedilla"},{character:"ķ",title:"Latin small letter k with cedilla"},{character:"ĸ",title:"Latin small letter kra"},{character:"Ĺ",title:"Latin capital letter l with acute"},{character:"ĺ",title:"Latin small letter l with acute"},{character:"Ļ",title:"Latin capital letter l with cedilla"},{character:"ļ",title:"Latin small letter l with cedilla"},{character:"Ľ",title:"Latin capital letter l with caron"},{character:"ľ",title:"Latin small letter l with caron"},{character:"Ŀ",title:"Latin capital letter l with middle dot"},{character:"ŀ",title:"Latin small letter l with middle dot"},{character:"Ł",title:"Latin capital letter l with stroke"},{character:"ł",title:"Latin small letter l with stroke"},{character:"Ń",title:"Latin capital letter n with acute"},{character:"ń",title:"Latin small letter n with acute"},{character:"Ņ",title:"Latin capital letter n with cedilla"},{character:"ņ",title:"Latin small letter n with cedilla"},{character:"Ň",title:"Latin capital letter n with caron"},{character:"ň",title:"Latin small letter n with caron"},{character:"ʼn",title:"Latin small letter n preceded by apostrophe"},{character:"Ŋ",title:"Latin capital letter eng"},{character:"ŋ",title:"Latin small letter eng"},{character:"Ō",title:"Latin capital letter o with macron"},{character:"ō",title:"Latin small letter o with macron"},{character:"Ŏ",title:"Latin capital letter o with breve"},{character:"ŏ",title:"Latin small letter o with breve"},{character:"Ő",title:"Latin capital letter o with double acute"},{character:"ő",title:"Latin small letter o with double acute"},{character:"Œ",title:"Latin capital ligature oe"},{character:"œ",title:"Latin small ligature oe"},{character:"Ŕ",title:"Latin capital letter r with acute"},{character:"ŕ",title:"Latin small letter r with acute"},{character:"Ŗ",title:"Latin capital letter r with cedilla"},{character:"ŗ",title:"Latin small letter r with cedilla"},{character:"Ř",title:"Latin capital letter r with caron"},{character:"ř",title:"Latin small letter r with caron"},{character:"Ś",title:"Latin capital letter s with acute"},{character:"ś",title:"Latin small letter s with acute"},{character:"Ŝ",title:"Latin capital letter s with circumflex"},{character:"ŝ",title:"Latin small letter s with circumflex"},{character:"Ş",title:"Latin capital letter s with cedilla"},{character:"ş",title:"Latin small letter s with cedilla"},{character:"Š",title:"Latin capital letter s with caron"},{character:"š",title:"Latin small letter s with caron"},{character:"Ţ",title:"Latin capital letter t with cedilla"},{character:"ţ",title:"Latin small letter t with cedilla"},{character:"Ť",title:"Latin capital letter t with caron"},{character:"ť",title:"Latin small letter t with caron"},{character:"Ŧ",title:"Latin capital letter t with stroke"},{character:"ŧ",title:"Latin small letter t with stroke"},{character:"Ũ",title:"Latin capital letter u with tilde"},{character:"ũ",title:"Latin small letter u with tilde"},{character:"Ū",title:"Latin capital letter u with macron"},{character:"ū",title:"Latin small letter u with macron"},{character:"Ŭ",title:"Latin capital letter u with breve"},{character:"ŭ",title:"Latin small letter u with breve"},{character:"Ů",title:"Latin capital letter u with ring above"},{character:"ů",title:"Latin small letter u with ring above"},{character:"Ű",title:"Latin capital letter u with double acute"},{character:"ű",title:"Latin small letter u with double acute"},{character:"Ų",title:"Latin capital letter u with ogonek"},{character:"ų",title:"Latin small letter u with ogonek"},{character:"Ŵ",title:"Latin capital letter w with circumflex"},{character:"ŵ",title:"Latin small letter w with circumflex"},{character:"Ŷ",title:"Latin capital letter y with circumflex"},{character:"ŷ",title:"Latin small letter y with circumflex"},{character:"Ÿ",title:"Latin capital letter y with diaeresis"},{character:"Ź",title:"Latin capital letter z with acute"},{character:"ź",title:"Latin small letter z with acute"},{character:"Ż",title:"Latin capital letter z with dot above"},{character:"ż",title:"Latin small letter z with dot above"},{character:"Ž",title:"Latin capital letter z with caron"},{character:"ž",title:"Latin small letter z with caron"},{character:"ſ",title:"Latin small letter long s"}]},zi={key:"mathematical",label:"Mathematical",characters:[{character:"<",title:"Less-than sign"},{character:">",title:"Greater-than sign"},{character:"≤",title:"Less-than or equal to"},{character:"≥",title:"Greater-than or equal to"},{character:"–",title:"En dash"},{character:"—",title:"Em dash"},{character:"¯",title:"Macron"},{character:"‾",title:"Overline"},{character:"°",title:"Degree sign"},{character:"−",title:"Minus sign"},{character:"±",title:"Plus-minus sign"},{character:"÷",title:"Division sign"},{character:"⁄",title:"Fraction slash"},{character:"×",title:"Multiplication sign"},{character:"ƒ",title:"Latin small letter f with hook"},{character:"∫",title:"Integral"},{character:"∑",title:"N-ary summation"},{character:"∞",title:"Infinity"},{character:"√",title:"Square root"},{character:"∼",title:"Tilde operator"},{character:"≅",title:"Approximately equal to"},{character:"≈",title:"Almost equal to"},{character:"≠",title:"Not equal to"},{character:"≡",title:"Identical to"},{character:"∈",title:"Element of"},{character:"∉",title:"Not an element of"},{character:"∋",title:"Contains as member"},{character:"∏",title:"N-ary product"},{character:"∧",title:"Logical and"},{character:"∨",title:"Logical or"},{character:"¬",title:"Not sign"},{character:"∩",title:"Intersection"},{character:"∪",title:"Union"},{character:"∂",title:"Partial differential"},{character:"∀",title:"For all"},{character:"∃",title:"There exists"},{character:"∅",title:"Empty set"},{character:"∇",title:"Nabla"},{character:"∗",title:"Asterisk operator"},{character:"∝",title:"Proportional to"},{character:"∠",title:"Angle"},{character:"¼",title:"Vulgar fraction one quarter"},{character:"½",title:"Vulgar fraction one half"},{character:"¾",title:"Vulgar fraction three quarters"}]},Fi={key:"arrows",label:"Arrows",characters:[{character:"←",title:"leftwards simple arrow"},{character:"→",title:"rightwards simple arrow"},{character:"↑",title:"upwards simple arrow"},{character:"↓",title:"downwards simple arrow"},{character:"⇐",title:"leftwards double arrow"},{character:"⇒",title:"rightwards double arrow"},{character:"⇑",title:"upwards double arrow"},{character:"⇓",title:"downwards double arrow"},{character:"⇠",title:"leftwards dashed arrow"},{character:"⇢",title:"rightwards dashed arrow"},{character:"⇡",title:"upwards dashed arrow"},{character:"⇣",title:"downwards dashed arrow"},{character:"⇤",title:"leftwards arrow to bar"},{character:"⇥",title:"rightwards arrow to bar"},{character:"⤒",title:"upwards arrow to bar"},{character:"⤓",title:"downwards arrow to bar"},{character:"↨",title:"up down arrow with base"},{character:"🔙",title:"back with leftwards arrow above"},{character:"🔚",title:"end with leftwards arrow above"},{character:"🔛",title:"on with exclamation mark with left right arrow above"},{character:"🔜",title:"soon with rightwards arrow above"},{character:"🔝",title:"top with upwards arrow above"}]},$i={key:"currency",label:"Currency",characters:[{character:"$",title:"Dollar sign"},{character:"€",title:"Euro sign"},{character:"¥",title:"Yen sign"},{character:"£",title:"Pound sign"},{character:"¢",title:"Cent sign"},{character:"₠",title:"Euro-currency sign"},{character:"₡",title:"Colon sign"},{character:"₢",title:"Cruzeiro sign"},{character:"₣",title:"French franc sign"},{character:"₤",title:"Lira sign"},{character:"¤",title:"Currency sign"},{character:"₿",title:"Bitcoin sign"},{character:"₥",title:"Mill sign"},{character:"₦",title:"Naira sign"},{character:"₧",title:"Peseta sign"},{character:"₨",title:"Rupee sign"},{character:"₩",title:"Won sign"},{character:"₪",title:"New sheqel sign"},{character:"₫",title:"Dong sign"},{character:"₭",title:"Kip sign"},{character:"₮",title:"Tugrik sign"},{character:"₯",title:"Drachma sign"},{character:"₰",title:"German penny sign"},{character:"₱",title:"Peso sign"},{character:"₲",title:"Guarani sign"},{character:"₳",title:"Austral sign"},{character:"₴",title:"Hryvnia sign"},{character:"₵",title:"Cedi sign"},{character:"₶",title:"Livre tournois sign"},{character:"₷",title:"Spesmilo sign"},{character:"₸",title:"Tenge sign"},{character:"₹",title:"Indian rupee sign"},{character:"₺",title:"Turkish lira sign"},{character:"₻",title:"Nordic mark sign"},{character:"₼",title:"Manat sign"},{character:"₽",title:"Ruble sign"}]},qi={key:"text",label:"Text",characters:[{character:"‹",title:"Single left-pointing angle quotation mark"},{character:"›",title:"Single right-pointing angle quotation mark"},{character:"«",title:"Left-pointing double angle quotation mark"},{character:"»",title:"Right-pointing double angle quotation mark"},{character:"‘",title:"Left single quotation mark"},{character:"’",title:"Right single quotation mark"},{character:"“",title:"Left double quotation mark"},{character:"”",title:"Right double quotation mark"},{character:"‚",title:"Single low-9 quotation mark"},{character:"„",title:"Double low-9 quotation mark"},{character:"¡",title:"Inverted exclamation mark"},{character:"¿",title:"Inverted question mark"},{character:"‥",title:"Two dot leader"},{character:"…",title:"Horizontal ellipsis"},{character:"‡",title:"Double dagger"},{character:"‰",title:"Per mille sign"},{character:"‱",title:"Per ten thousand sign"},{character:"‼",title:"Double exclamation mark"},{character:"⁈",title:"Question exclamation mark"},{character:"⁉",title:"Exclamation question mark"},{character:"⁇",title:"Double question mark"},{character:"©",title:"Copyright sign"},{character:"®",title:"Registered sign"},{character:"™",title:"Trade mark sign"},{character:"§",title:"Section sign"},{character:"¶",title:"Paragraph sign"},{character:"⁋",title:"Reversed paragraph sign"}]},Gi=[$i,qi,zi,Fi,Ki];class Wi extends ze{constructor(t){super(),this.panelRef=null,this.categories=t}render(t,e){return t("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,isScreenPosition:!0,ref:t=>{t&&st.addUniqueObserverToNode(t,dt,(()=>{this.handlePopoverShow()}))}},[t("div",{slot:"popover"},[t("vega-rich-text-special-characters-panel",{categories:this.categories,ref:t=>{t&&(this.panelRef=t,st.addUniqueObserverToNode(t,ct,(t=>{this.insertCharacter(e,t.detail)})))}})]),t("div",{slot:"popover-content"},this.renderButton(t,e,{icon:"rte-special-characters",tooltip:{text:"Special Characters"}}))])}handleButtonClick(){}handleDropdownClick(){}handlePopoverShow(){this.panelRef&&this.panelRef.resetPanel()}insertCharacter(t,e){const n=t.rteRange,i=n.startNode;if(!i)return;const a=this.isCaretOnLineBreak(i,n)?this.insertAtLineBreak(i,e,n):this.insertAtTextNode(i,e,n);t.host.value.apply(new f(a.node,a.offset))}isCaretOnLineBreak(t,e){return t instanceof R&&"\n"===t.text&&e.startOffset===e.endOffset}insertAtTextNode(t,e,n){const i=new me(e,n);return i.isFlushable=!0,t.apply(i),{node:t,offset:Math.min(n.startOffset+e.length,t.getRangeEndOffset())}}insertAtLineBreak(t,e,n){return{node:this.insertTextToLineBreakNode(t,e,n),offset:e.length}}insertTextToLineBreakNode(t,e,n){const i=t.parent,a=i.children.indexOf(t);if(0===n.startOffset&&i.children[a+1]){const n=t.cloneWithText(e),a=new P(t,n);return a.isFlushable=!0,i.apply(a),n}const r=new X(e);return r.isFlushable=!0,t.apply(r),t}}at.register({"rte-special-characters":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 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="M224 80C126.8 80 48 158.8 48 256c0 63.7 33.8 119.5 84.6 150.4c11.4 7 19.4 19.6 19.4 34.2c0 21.8-17.6 39.4-39.4 39.4H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H85.4C33.4 391 0 327.4 0 256C0 132.3 100.3 32 224 32s224 100.3 224 224c0 71.4-33.4 135-85.4 176H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H335.4c-21.8 0-39.4-17.6-39.4-39.4c0-14.6 8-27.2 19.4-34.2C366.2 375.5 400 319.7 400 256c0-97.2-78.8-176-176-176z"/></svg>'}});class Ui extends E{constructor(t){super(),this.categories=this.buildCategories(t)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer("special-characters",new Wi(this.categories),t)}buildCategories(t){const e=!1!==(null==t?void 0:t.includeDefaults)?Gi:[];return(null==t?void 0:t.categories)?[...e,...t.categories]:e}}const Zi=[{title:"0.5",value:"0.5"},{title:"1",value:"1"},{title:"1.5",value:"1.5"},{title:"2",value:"2"},{title:"2.5",value:"2.5"}];var Ji;!function(t){t.LINE_HEIGHT="LINE_HEIGHT"}(Ji||(Ji={}));class Qi extends F{constructor(t){super(),this.type=Ji.LINE_HEIGHT,this.lineHeight=t}static from(t){return[Ji.LINE_HEIGHT,new Qi(t)]}static getDefaultStyles(t){return{lineHeight:t}}toJSON(){return{lineHeight:this.lineHeight}}renderClass(){return null}clone(){return new Qi(this.lineHeight)}renderStyle(){return Qi.getDefaultStyles(this.lineHeight)}}class Xi extends ${constructor(t){super(),this.isFlushable=!0,this.lineHeight=t}toAnnotation(){return new Qi(this.lineHeight)}}class Yi extends _{handleAction(t,e){this.updateCustomStyleAnnotation(e,["lineHeight"])}}class ta extends ze{constructor(t){super(),this.options=t}render(t,e){const n=this.options.map((t=>{var e;return{key:t.value,label:null!==(e=t.title)&&void 0!==e?e:t.value}}));return this.renderDropdown(t,e,{selectType:"single",selectedSourceKey:this.getSelectedSourceValue(e)},[this.renderButton(t,e,{icon:"line-height",showArrowIcon:!0,tooltip:{text:w.t("Line Height")}}),this.renderDropdownListTemplate(t,n,e)])}isSelected(){return!1}isDisabled(t){var e;if(t.host.disabled)return!0;const n=this.getExtensionContext(t.host);return!!(null!==(e=null==n?void 0:n.getSelectedNodes())&&void 0!==e?e:[]).some((t=>{var e;return(null===(e=t.getAnnotationByType(Y.CODE))||void 0===e?void 0:e.code)||t.parent instanceof tt}))||this.getSelectedBlocks(t).some((t=>t instanceof tt||t instanceof x||!I.canHandle(Xi.name,t)))}handleDropdownClick(t,e){const n=t;this.getSelectedBlocks(e).forEach((t=>{t.apply(new Xi(n))}))}handleButtonClick(){}getSelectedSourceValue(t){const e=this.getSelectedBlocks(t);if(0===e.length)return"";const n=e[0].getAnnotationByType(Ji.LINE_HEIGHT);return e.every((t=>{const e=t.getAnnotationByType(Ji.LINE_HEIGHT);return(null==e?void 0:e.lineHeight)===(null==n?void 0:n.lineHeight)}))&&n?n.lineHeight:""}getSelectedBlocks(t){var e,n;const i=this.getExtensionContext(t.host),a=null!==(e=null==i?void 0:i.getSelectedNodes())&&void 0!==e?e:[],r=[];return a.forEach((t=>{t.parent instanceof N&&!r.includes(t.parent)&&r.push(t.parent)})),0===r.length&&(null===(n=t.rteRange.startNode)||void 0===n?void 0:n.parent)instanceof N&&r.push(t.rteRange.startNode.parent),r}}at.register({"line-height":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 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="M113.8 39.9c-4.6-5.1-11-7.9-17.8-7.9s-13.3 2.9-17.8 7.9l-72 80c-8.9 9.9-8.1 25 1.8 33.9s25 8.1 33.9-1.8L72 118.5V393.5L41.8 359.9c-8.9-9.9-24-10.7-33.9-1.8s-10.7 24-1.8 33.9l72 80c4.6 5.1 11 7.9 17.8 7.9s13.3-2.9 17.8-7.9l72-80c8.9-9.9 8.1-25-1.8-33.9s-25-8.1-33.9 1.8L120 393.5V118.5l30.2 33.5c8.9 9.9 24 10.7 33.9 1.8s10.7-24 1.8-33.9l-72-80zM248 72c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zm0 160c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zM224 416c0 13.3 10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248c-13.3 0-24 10.7-24 24z"/></svg>'}});const ea=new Set([j.name,k.name]);class na extends S{constructor(t=Zi){super(),this.allowedLineHeights=new Set(t.map((t=>t.value)))}canHandle(t){return ea.has(t.name)}handle(t){var e,n;const i=null!==(n=null===(e=null==t?void 0:t.style.lineHeight)||void 0===e?void 0:e.trim())&&void 0!==n?n:"";return i&&this.allowedLineHeights.has(i)?{lineHeight:i}:{}}}class ia extends Z{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const e=t,n=e.lineHeight,i=e.customStyle;return n&&i&&i.lineHeight===n&&delete i.lineHeight,i&&0===Object.keys(i).length&&delete e.customStyle,t}}const aa=new WeakMap,ra=new WeakSet;class sa extends E{constructor(t=Zi){super(),this.options=t,this.toolbarButtonRenderer=null,this.registerAnnotationHandler(new na(this.options)),[j,k].forEach((t=>{!function(t,e){aa.set(t,new Set(e.map((t=>t.value))))}(t,this.options)}))}prepareBeforeLoad(t){this.toolbarButtonRenderer=new ta(this.options),this.registerToolbarButtonRenderer("lineHeight",this.toolbarButtonRenderer,t)}}[j,k].forEach((t=>{E.registerActionHandleStrategy(t.name,Xi.name,new Yi),nt.register(t.name,new ia),function(t){ra.has(t)||(ra.add(t),E.attachAnnotationFromJson(t,"lineHeight",((e,n)=>{if("string"!=typeof n||""===n)return;e.annotationMap.set(...Qi.from(n));const i=aa.get(t);i&&i.size>0&&function(t,e){const n=t.annotationMap.get(Ji.LINE_HEIGHT);if(!n||e.has(n.lineHeight))return;const i=n.lineHeight;t.annotationMap.delete(Ji.LINE_HEIGHT);const a=t.annotationMap.get(G.CUSTOM_STYLE);a?a.customStyle=Object.assign(Object.assign({},a.customStyle),{lineHeight:i}):t.annotationMap.set(...et.from({lineHeight:i}))}(e,i)})))}(t)}));class oa extends O{constructor(t,e){super(),this.type=z.INSERT_NODE_TO_NEAREST_ROOT,this.rteRange=t,this.nodeToBeInserted=e}}class la extends _{handleAction(e,n){const{rteRange:i,token:a}=e;if(i&&i.startNode){const{key:r,label:s,customAttrs:o={wrapped:"true"}}=a,l=new qe(t(),r,s,n);l.annotationMap.set("CUSTOM_ATTRIBUTE",new W(o)),n.apply(new oa(i,l)),e.actionHandleResult=!0}}}const ca=new class extends m{canHandle(t,e){const n=t[e];return"SPAN"===n.nodeName&&n.classList.contains("token")&&n.hasAttribute("token-key")?1:0}handle(e){const n=e[0],i=n.getAttribute("token-key"),a=n.textContent,r=v.generate(R,n),{customAttribute:s}=r,o=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(t);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(n[i[a]]=t[i[a]])}return n}(r,["customAttribute","customClass"]);return{id:t(),type:"token",token:i,text:a,annotations:Object.assign(Object.assign({},o),{customAttribute:this.createCustomAttrs(s)})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}createCustomAttrs(t){const e=Object.assign(Object.assign({},t),{contenteditable:null,"template-token-key":null,"token-key":null,wrapped:"false"===t.wrapped?"false":"true"});return ge(e)}};class ha extends E{constructor(t=[]){super(),this.tokenRenderer=new Ge,this.tokenList=t,this.registerNode("token",qe),this.registerRenderer("token",this.tokenRenderer),this.registerElementToNodeDTOClassStrategy(ca)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer("token",new $e(this.tokenList),t)}}(()=>{const t=new la;E.registerActionHandleStrategy(j.name,"INSERT_TOKEN_NODE",t),E.registerActionHandleStrategy(k.name,"INSERT_TOKEN_NODE",t)})();export{rn as A,oa as I,$e as R,xe as V,ke as a,Ee as b,Re as c,He as d,Ke as e,ha as f,Ue as g,Zi as h,wn as i,Ei as j,Pi as k,Ui as l,Gi as m,Ki as n,zi as o,Fi as p,$i as q,qi as r,sa as s,ze as t,qe as u,Ge as v,_e as w,We as x}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,F as s,g as a}from"./p-6b2342e0.js";import{s as n}from"./p-519a7d55.js";import{I as r}from"./p-6e1ab235.js";import{V as o,I as p}from"./p-8ce9e214.js";import{V as l}from"./p-3e09aeed.js";import{B as h}from"./p-b3420fcf.js";import"./p-cb378636.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-fb5ea4b2.js";import"./p-4866e390.js";import"./p-b75ee3ba.js";import"./p-f0e828d8.js";const c=`© ${(new Date).getFullYear()} Heartland Payment Systems, LLC – a Global Payments company. All rights reserved.`,f=`© ${(new Date).getFullYear()} Global Payments Inc. All rights reserved.`;var d=function(t,e,i,s){var a,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const g=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new o,this.brandSwitchControllerSlimmer=new h,this.googlePrivacyPolicyUrl="https://policies.google.com/privacy",this.googleTermsOfServiceUrl="https://policies.google.com/terms",this.currentBranding=l.getBranding(),this.content=this.getDefaultContent(),this.termOfUseLabel="Terms of Use",this.termOfUseUrl=this.getDefaultTermsOfUseUrl(),this.termOfUseUrlTarget="_self",this.privacyPolicyLabel="Privacy Policy",this.privacyPolicyUrl=this.getDefaultPrivacyPolicyUrl(),this.privacyPolicyUrlTarget="_self",this.hideDefaultLinks=!1,this.additionalLinks=[],this.showDisclaimer=!1,this.disclaimerUrlTarget="_self"}render(){return n(e(i,{class:"v-text-center"},this.renderContent(),this.renderLinks(),this.renderDisclaimer()),this.host)}getDefaultContent(){return"heartland"===l.getBranding()?c:f}getDefaultTermsOfUseUrl(){return"heartland"===l.getBranding()?"https://www.heartland.us/terms":"https://www.globalpayments.com/terms-of-use"}getDefaultPrivacyPolicyUrl(){return"heartland"===l.getBranding()?"https://www.heartland.us/privacy-policy":"https://www.globalpayments.com/privacy-statement"}renderContent(){return e("div",{class:"vega-app-footer-content"},this.content!==f&&this.content!==c?this.content:this.getDefaultContent())}renderLinks(){return e("div",{class:"vega-link"},this.hideDefaultLinks?null:this.renderDefaultLinks(),this.additionalLinks.length?this.renderAdditionalLinks():null)}renderDefaultLinks(){return e(s,null,e("a",{id:this.termOfUseUrlId,target:this.termOfUseUrlTarget,href:this.getTermsOfUseUrl()},this.termOfUseLabel),e("span",{class:"v-separator"}),e("a",{id:this.privacyPolicyUrlId,target:this.privacyPolicyUrlTarget,href:this.getPrivacyPolicyUrl()},this.privacyPolicyLabel))}getTermsOfUseUrl(){return"https://www.heartland.us/terms"!==this.termOfUseUrl&&"https://www.globalpayments.com/terms-of-use"!==this.termOfUseUrl?this.termOfUseUrl:this.getDefaultTermsOfUseUrl()}getPrivacyPolicyUrl(){return"https://www.heartland.us/privacy-policy"!==this.privacyPolicyUrl&&"https://www.globalpayments.com/privacy-statement"!==this.privacyPolicyUrl?this.privacyPolicyUrl:this.getDefaultPrivacyPolicyUrl()}renderAdditionalLinks(){return e(s,null,this.hideDefaultLinks?null:e("span",{class:"v-separator"}),this.additionalLinks.map(((t,i)=>t.URL&&t.label&&e(s,null,e("a",{id:t.id,target:t.target,href:t.URL},t.label),this.additionalLinks.length===i+1?null:e("span",{class:"v-separator"})))))}renderDisclaimer(){return this.showDisclaimer&&e("div",{class:"vega-app-footer-disclaimer"},e("div",{class:"h-separator"}),e("div",{class:"vega-app-footer-disclaimer-content vega-link"},"This site is protected by reCAPTCHA and the"," ",e("a",{target:this.disclaimerUrlTarget,href:this.googlePrivacyPolicyUrl}," ","Google Privacy Policy"," ")," ","and"," ",e("a",{target:this.disclaimerUrlTarget,href:this.googleTermsOfServiceUrl}," ","Google Terms of Service"," "),"apply."))}get host(){return a(this)}};d([p()],g.prototype,"globalSlimmers",void 0),d([r()],g.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),d([r()],g.prototype,"brandSwitchControllerSlimmer",void 0),g.style=':host{display:block;padding-left:0px;padding-right:0px}:host .h-separator{height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1));margin-top:20px;margin-bottom:20px}:host .v-separator{display:inline-block;width:1px;margin-left:8px;margin-right:8px;background-color:rgba(70, 71, 101, 0.8)}:host>.vega-link{display:flex;align-items:stretch;justify-content:center;flex-wrap:wrap}:host>.vega-link a{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host>.vega-link a{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host>.vega-link a{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host>.vega-link a{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-app-footer-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));margin-bottom:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-app-footer-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-app-footer-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-app-footer-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-app-footer-disclaimer-content{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-app-footer-disclaimer-content{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-app-footer-disclaimer-content{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-app-footer-disclaimer-content{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}}:host(.v-text-center){text-align:center}:host .vega-link a{color:rgba(var(--v-text-link, 19, 98, 226, 1));border-radius:4px;text-decoration:none}:host .vega-link a:visited{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}:host .vega-link a:hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1));text-decoration:underline}:host .vega-link a:focus{color:rgba(var(--v-text-link-focus, 4, 112, 236, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-link a:active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1));text-decoration:underline}';export{g as vega_app_footer}
|
package/dist/vega/p-280cbcdb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e}from"./p-abd7aeaa.js";class r extends e{constructor(){super(...arguments),this.checkArrayItemType=e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e}evaluate(e){if(this.isAcceptedInputType(e))return"number"==typeof e||"boolean"==typeof e?{isValid:!0,message:""}:"string"==typeof e||Array.isArray(e)?{isValid:e.length>0,message:e.length<=0?"This field is required":""}:{isValid:!1,message:"This field is required"};throw new Error(`Unexpected type of input: ${typeof e}: ${e}`)}canEvaluate(e,r){return r?this.isAcceptedInputType(e)&&!r.disabled&&r.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||Array.isArray(e)&&e.every(this.checkArrayItemType)||null==e}}export{r as R}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,H as t,r as i,c as s,g as o}from"./p-6b2342e0.js";import{R as r}from"./p-280cbcdb.js";import{s as n}from"./p-519a7d55.js";import{g as a}from"./p-49a2e141.js";import{c as l,V as p,M as d,L as h,I as c}from"./p-6e1ab235.js";import{a as v}from"./p-528748fa.js";import{R as u}from"./p-c596bb49.js";import{D as f,d as g}from"./p-526e3634.js";import{A as m,x,y as b,V as w,f as y,z as j,e as I,i as S,s as R,P as T,Q as C}from"./p-fcefb62c.js";import{V as D,I as O}from"./p-8ce9e214.js";import{l as E,m as L,n as V}from"./p-3a93730e.js";import{i as z}from"./p-d27ae9ff.js";import{C as P}from"./p-2d0d575f.js";import{F as k}from"./p-cb378636.js";import{c as A}from"./p-3a620268.js";import{c as _}from"./p-1ec763ab.js";import{c as N}from"./p-613ddaab.js";import{V as B}from"./p-724df1f5.js";import{h as F,l as U}from"./p-f0e828d8.js";import{F as G}from"./p-881622fd.js";import{P as M}from"./p-81dd00d0.js";import{c as K}from"./p-d7790113.js";import{C as W}from"./p-328dbe8e.js";import{Z as $,$ as q}from"./p-b0f55f5f.js";import{M as H}from"./p-78a57a17.js";import{T as J}from"./p-52b8f2d2.js";import{T as Q}from"./p-0a1c7f80.js";import{r as Z}from"./p-77e64f26.js";import{I as X}from"./p-abd7aeaa.js";import{V as Y}from"./p-eb927e2b.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-dcf162e9.js";import"./p-982747ef.js";import"./p-331a62d5.js";import"./p-1704ff25.js";import"./p-9a6bd32c.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-a58cacca.js";import"./p-46cab60a.js";import"./p-5f377954.js";import"./p-d884c644.js";var ee=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class te extends p{constructor(){super(...arguments),this.renderErrorMessage=()=>e("div",{class:"vega-input-select-error-message"}),this.renderHelpMessage=()=>e("div",{class:"vega-input-select-hint"},this.hint),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()}}render(){return e(t,{class:v([this.disabled?"vega-input-select-disabled":"",u.formatCustom(this.size)])},this.renderLabel(),this.dropdownRenderer.render(),this.renderErrorMessage(),this.hint&&this.renderHelpMessage())}renderLabel(){return this.label&&e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,optional:this.optional,label:this.label,suffixButtonConfig:this.labelSuffixButtonConfig,ref:e=>{f.addUniqueObserverToNode(e,m,this.handleLabelButtonClick)}})}}ee([l()],te.prototype,"disabled",void 0),ee([l()],te.prototype,"size",void 0),ee([l()],te.prototype,"hint",void 0),ee([l()],te.prototype,"label",void 0),ee([l()],te.prototype,"required",void 0),ee([l()],te.prototype,"optional",void 0),ee([l()],te.prototype,"labelSuffixButtonConfig",void 0),ee([l()],te.prototype,"labelButtonClickEventEmitter",void 0),ee([l({componentFieldName:"vegaInputSelectDropdownRenderer"})],te.prototype,"dropdownRenderer",void 0);var ie=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class se extends p{constructor(){super(...arguments),this.onDropdownShow=()=>{this.isDropdownShow=!0},this.onDropdownHide=()=>{this.isDropdownShow=!1}}addDropdownObserver(e){f.addUniqueObserverToNode(e,x,(e=>{this.onDropdownShow(),this.showEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,b,(e=>{this.onDropdownHide(),this.hideEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,w,(async e=>{this.vegaInputSelectValueController.setValue(await e.host.getSelection())})),f.addUniqueObserverToNode(e,y,(e=>{this.searchEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,j,(e=>{this.searchTriggerEventEmitter.emit(e.detail)})),f.addUniqueObserverToNode(e,E,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.id===e.itemKey)))).map((e=>({id:e.itemKey,displayName:e.label})));this.sourceController.appendSourceItems(t)})),f.addUniqueObserverToNode(e,I,(async()=>{this.vegaInputSelectValueController.setValue("multiple"===this.selectType?[]:"")}))}}ie([l({writable:!0})],se.prototype,"isDropdownShow",void 0),ie([l()],se.prototype,"vegaSearch",void 0),ie([l()],se.prototype,"searchEventEmitter",void 0),ie([l()],se.prototype,"searchTriggerEventEmitter",void 0),ie([l()],se.prototype,"vegaInputSelectValueController",void 0),ie([l()],se.prototype,"sourceController",void 0),ie([l()],se.prototype,"source",void 0),ie([l()],se.prototype,"showEventEmitter",void 0),ie([l()],se.prototype,"hideEventEmitter",void 0),ie([l()],se.prototype,"selectType",void 0);var oe=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class re extends p{constructor(){super(...arguments),this.handleValueChange=(e,t)=>{if("multiple"===this.selectType){let i;t=t,i=(e=e)?this.vegaDropdownProps.preserveValueIfNotInSource?e:e.filter((e=>this.sourceController.getItem(e))):[],z(i,t,!0)?z(i,e,!0)||this.setValue(i):(this.setValue(i),this.changeEventEmitter.emit(i),P.notify(k,{host:this.host,detail:i}))}else if(e!==t){const t=this.sourceController.getItem(e);this.setValue(this.vegaDropdownProps.preserveValueIfNotInSource?e:t?t.id:""),this.changeEventEmitter.emit(this.value),P.notify(k,{host:this.host,detail:this.value})}}}setValue(e){this.valueGuard(e)&&(this.value=e,this.vegaInputSelectItemController.setSelectedItem())}valueGuard(e){switch(this.selectType){case"single":return null===e||"string"==typeof e;case"multiple":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return h.warn(`Invalid input select value ${e} for ${this.selectType} mode`),!1}}}oe([l({writable:!0})],re.prototype,"value",void 0),oe([l()],re.prototype,"selectType",void 0),oe([l()],re.prototype,"changeEventEmitter",void 0),oe([l()],re.prototype,"host",void 0),oe([l()],re.prototype,"sourceController",void 0),oe([l()],re.prototype,"vegaInputSelectItemController",void 0),oe([l()],re.prototype,"vegaDropdownProps",void 0),oe([d("watchValue")],re.prototype,"handleValueChange",void 0);var ne=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ae extends p{componentWillLoad(){this.setSelectedItem()}watchSelectType(){"multiple"===this.selectType?(this.selectedItem=[],this.vegaInputSelectValueController.setValue([])):(this.selectedItem=null,this.vegaInputSelectValueController.setValue(""))}setSelectedItem(){var e;if("multiple"===this.selectType){const e=this.value.map((e=>this.sourceController.getItem(e))),t=this.selectedItem?this.selectedItem.filter((e=>this.value.includes(null==e?void 0:e.id))):[];this.selectedItem=this.updateSelectedItemUnderMultiple(t,e)}else{const t=this.sourceController.getItem(this.value);this.value&&this.value===(null===(e=this.selectedItem)||void 0===e?void 0:e.id)||(this.selectedItem=null),t&&(this.selectedItem=t)}}updateSelectedItemUnderMultiple(e,t){const i=new Map(e.map((e=>[e.id,e])));return t.forEach((e=>{i.set(null==e?void 0:e.id,e)})),Array.from(i.values())}}ne([l()],ae.prototype,"value",void 0),ne([l()],ae.prototype,"selectType",void 0),ne([l({writable:!0})],ae.prototype,"selectedItem",void 0),ne([l()],ae.prototype,"sourceController",void 0),ne([l()],ae.prototype,"vegaInputSelectValueController",void 0),ne([d("componentWillLoad")],ae.prototype,"componentWillLoad",null),ne([d("watchSelectType")],ae.prototype,"watchSelectType",null);var le=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class pe extends p{constructor(){super(...arguments),this.renderContainer=()=>e("div",{role:"button",class:"vega-input-select-container",ref:e=>this.inputSelectContainer=e,tabIndex:0,"aria-disabled":`${this.disabled}`,onKeyDown:A(),onBlur:this.preventBlur,part:"select-container"},this.renderPrefixIcon(),this.renderSelectContainer(),this.renderToggleIcon()),this.renderPrefixIcon=()=>this.vegaInputSelectPrefixIconRenderer.render(),this.renderToggleIcon=()=>e("div",{class:"vega-input-select-toggle-icon",part:"toggle-icon-container"},e("vega-icon",{part:"toggle-icon",icon:B.getIconKey(this.isDropdownShow?"chevron-up":"chevron-down")})),this.renderSelectContainer=()=>{var t,i;return"function"!=typeof this.selectedLabel&&((null===(t=this.selectedLabel)||void 0===t?void 0:t.single)||(this.selectedLabel.single=(e,t)=>t.displayName),(null===(i=this.selectedLabel)||void 0===i?void 0:i.multiple)||(this.selectedLabel.multiple=e=>`${e.length} Selected`)),e("div",{class:"vega-input-select-select-container"},e("div",{class:"vega-input-select-selected-box"},"multiple"===this.selectType?this.renderMultipleSelected():this.renderSingleSelected()))},this.renderMultipleSelected=()=>{if(this.value.length>0){const t="function"==typeof this.selectedLabel?this.selectedLabel(this.value):this.selectedLabel.multiple(this.value,this.selectedItem);return e("span",{class:"vega-input-select-selected"},e("vega-text",{overflow:"ellipsis",tooltip:this.getSelectedLabelTooltipProps(),text:t,key:t}))}return e("div",{class:"vega-input-select-placeholder"},this.translationSlimmer.t(this.placeholder))},this.renderSingleSelected=()=>{var t,i;const s=this.selectedItem;(null==s?void 0:s.displayName)&&(s.displayName=F.sanitize(s.displayName,U));const o=null===(i=(t=this.selectedLabel).single)||void 0===i?void 0:i.call(t,this.value,s);return"function"==typeof this.selectedLabel&&this.selectedItem||"function"!=typeof this.selectedLabel&&o?e("span",{class:"vega-input-select-selected",part:"selected-box"},e("vega-text","function"==typeof this.selectedLabel?{overflow:"ellipsis",tooltip:this.getSelectedLabelTooltipProps(),text:s.displayName,key:s.displayName}:{overflow:"ellipsis",tooltip:this.getSelectedLabelTooltipProps(),text:o,key:o})):e("div",{class:"vega-input-select-placeholder",part:"placeholder"},this.translationSlimmer.t(this.placeholder))},this.getVegaDropdownProperties=()=>{const e=Object.assign({searchable:!0,caseSensitive:!1},this.vegaDropdownProps);return this.dropdownItemTooltipProps&&Object.keys(this.dropdownItemTooltipProps).length>0&&(e.itemTooltipProps=this.dropdownItemTooltipProps),e},this.getSelectedLabelTooltipProps=()=>Object.assign({placement:"bottom"},this.selectedLabelTooltipProps)}watchVegaDropdownProps(){this.vegaDropdownProps&&void 0!==this.vegaDropdownProps.preserveValueIfNotInSource&&(this.dropdown.preserveValueIfNotInSource=this.vegaDropdownProps.preserveValueIfNotInSource,this.dropdown.selectedSourceKey=this.value)}show(){return this.dropdown.show()}hide(){return this.dropdown.hide()}getDropdownRef(){return this.dropdown}getInputSelectContainerRef(){return this.inputSelectContainer}getItemsSlotRef(){return this.itemsSlotRef}render(){return e("vega-dropdown",Object.assign({trigger:"click",source:this.getDropdownSource(),selectType:this.selectType,selectedSourceKey:this.value,matchTargetWidth:!0},this.getVegaDropdownProperties(),{ref:e=>{this.dropdown=e,this.vegaInputSelectDropdownController.addDropdownObserver(e)},isLazyLoading:this.isLazyLoading}),this.renderContainer(),this.renderItemsSlot())}renderItemsSlot(){return this.host.querySelector("[slot=items]")&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}preventBlur(e){e.stopImmediatePropagation()}getDropdownSource(){return this.source.map((e=>({key:e.id,label:e.displayName})))}}B.register({"chevron-up":_,"chevron-down":N}),le([l()],pe.prototype,"value",void 0),le([l()],pe.prototype,"source",void 0),le([l()],pe.prototype,"host",void 0),le([l()],pe.prototype,"selectType",void 0),le([l()],pe.prototype,"isDropdownShow",void 0),le([l()],pe.prototype,"vegaDropdownProps",void 0),le([l()],pe.prototype,"placeholder",void 0),le([l()],pe.prototype,"selectedLabel",void 0),le([l()],pe.prototype,"isLazyLoading",void 0),le([l()],pe.prototype,"vegaInputSelectDropdownController",void 0),le([l()],pe.prototype,"vegaInputSelectPrefixIconRenderer",void 0),le([l()],pe.prototype,"translationSlimmer",void 0),le([l()],pe.prototype,"disabled",void 0),le([l()],pe.prototype,"selectedItem",void 0),le([l()],pe.prototype,"selectedLabelTooltipProps",void 0),le([l()],pe.prototype,"dropdownItemTooltipProps",void 0),le([d("watchVegaDropdownProps")],pe.prototype,"watchVegaDropdownProps",null);var de=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class he extends p{constructor(){super(...arguments),this.hasMore=!0}componentDidLoad(){const e=this.getVirtualScroll();e&&f.addUniqueObserverToNode(e,L,this.onScrollToBottom.bind(this))}getVirtualScroll(){var e,t,i;return null===(i=null===(t=null===(e=this.vegaInputSelectDropdownRenderer.getDropdownRef().shadowRoot)||void 0===e?void 0:e.querySelector("vega-dropdown-content-box"))||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("vega-virtual-scroll")}async onScrollToBottom(e){if(this.sourceLazyLoadCallback&&this.hasMore){this.isLazyLoading=!0;const t=await this.sourceLazyLoadCallback(e.endIndex);this.hasMore=t.hasMore,t.items.length>0&&this.sourceController.appendSourceItems(t.items),this.isLazyLoading=!1}}}de([l()],he.prototype,"sourceLazyLoadCallback",void 0),de([l({writable:!0})],he.prototype,"isLazyLoading",void 0),de([l()],he.prototype,"sourceController",void 0),de([l()],he.prototype,"vegaInputSelectDropdownRenderer",void 0),de([d("componentDidLoad")],he.prototype,"componentDidLoad",null);const ce=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!1===e.autoValidation},{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>e.source.length>0}];var ve=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ue extends p{constructor(){super(...arguments),this.handleSourceChange=()=>{this.host.dataset.source=JSON.stringify(this.source),this.source=$(this.source,q)?this.source:[],this.vegaInputSelectItemController.setSelectedItem()}}appendSourceItems(e){this.source=[...this.source,...e]}getItem(e){return this.source.find((t=>t.id===e))}}ve([l()],ue.prototype,"host",void 0),ve([l({writable:!0})],ue.prototype,"source",void 0),ve([l()],ue.prototype,"vegaInputSelectItemController",void 0),ve([d("watchSource")],ue.prototype,"handleSourceChange",void 0);var fe=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class ge extends p{constructor(){super(...arguments),this.mutationObserver=new H({mutationFilter:J("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){const e=this.host.querySelector("[slot=items]"),t=this.vegaInputSelectDropdownRenderer.getItemsSlotRef();e&&t&&(t.remove(),this.vegaInputSelectDropdownRenderer.getDropdownRef().append(e))}}fe([c()],ge.prototype,"mutationObserver",void 0),fe([l()],ge.prototype,"host",void 0),fe([l()],ge.prototype,"vegaInputSelectDropdownRenderer",void 0),fe([d("componentDidLoad")],ge.prototype,"componentDidLoad",null);var me=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class xe extends p{connectedCallback(){this.remotePhoneNumberPrefixIconRenderSubject=g.getSubjectFromParentNodeByEventId(this.host,V)}callRemotePrefixIconRender(...e){if(this.remotePhoneNumberPrefixIconRenderSubject){const t=Z.call(this.remotePhoneNumberPrefixIconRenderSubject,...e);if(t)return t}return null}render(){const t=this.callRemotePrefixIconRender(this.prefixIcon);return this.prefixIcon&&e("div",{class:"vega-input-select-prefix-icon"},t||e("vega-icon",{icon:this.prefixIcon,size:"size-16"}))}}me([l()],xe.prototype,"host",void 0),me([l()],xe.prototype,"prefixIcon",void 0),me([d("connectedCallback")],xe.prototype,"connectedCallback",null);class be extends X{constructor(e){super(),this.inputSelectSourceGetter=e,this.invalidResult=e=>({isValid:!1,message:e}),this.validResult=()=>({isValid:!0,message:""})}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}evaluate(e){return"string"!=typeof e||this.inputSelectSourceGetter().find((t=>t.id===e))?Array.isArray(e)&&!e.every((e=>this.inputSelectSourceGetter().find((t=>t.id===e))))?this.invalidResult("There are values that do not exist in the source"):this.validResult():this.invalidResult("The value does not exist in the source")}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return("string"==typeof e||Array.isArray(e)&&e.every((e=>"string"==typeof e)))&&e.length>0}}var we=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const ye=class{constructor(e){i(this,e),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaSearch=s(this,"vegaSearch",7),this.search=s(this,"search",7),this.vegaSearchTrigger=s(this,"vegaSearchTrigger",7),this.searchTrigger=s(this,"searchTrigger",7),this.vegaShow=s(this,"vegaShow",7),this.vegaHide=s(this,"vegaHide",7),this.vegaLabelButtonClick=s(this,"vegaLabelButtonClick",7),this.labelButtonClick=s(this,"labelButtonClick",7),this.globalSlimmers={},this.translationSlimmer=new Q,this.sourceController=new ue,this.vegaInputSelectRenderer=new te,this.vegaInputSelectPrefixIconRenderer=new xe,this.vegaInputSelectDropdownController=new se,this.vegaInputSelectValueController=new re,this.vegaInputSelectDropdownRenderer=new pe,this.vegaInputSelectItemsSlotController=new ge,this.vegaInputSelectItemController=new ae,this.formFieldControllerSlimmer=new G({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new r:null},{propertyName:"data-source",ruleFactory:()=>new be((()=>this.source))}],validationRulesName:"validationRules",defaultValue:e=>"multiple"===e.selectType?[]:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaInputSelectDropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.vegaInputSelectDropdownRenderer.getInputSelectContainerRef()]}),this.pageResizeObserverSlimmer=new M,this.lazyLoadController=new he,this.changeEventEmitter=K(ye,S),this.searchEventEmitter=K(ye,R),this.searchTriggerEventEmitter=K(ye,j),this.showEventEmitter=K(ye,T),this.hideEventEmitter=K(ye,C),this.labelButtonClickEventEmitter=K(ye,m),this.eventPrevent=new W([R,j,T,C],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new D(ce),this.isDropdownShow=!1,this.currentBreakpoint=a(),this.isLazyLoading=!1,this.label="",this.labelSuffixButtonConfig=null,this.required=!1,this.optional=!1,this.selectedLabel=e=>Y.t("{0} Selected",e.length),this.selectType="single",this.source=[],this.value="multiple"===this.selectType?[]:"",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="Please select",this.vegaDropdownProps={},this.selectedLabelTooltipProps={},this.dropdownItemTooltipProps={},this.size="default"}watchSelectType(){}watchSource(){}watchValue(e,t){}watchValidationRules(){}watchVegaDropdownProps(){}watchSelectedLabelTooltipProps(){}watchDropdownItemTooltipProps(){}componentWillLoad(){}async doClose(){await this.vegaInputSelectDropdownRenderer.hide()}async doOpen(){await this.vegaInputSelectDropdownRenderer.show()}async doChange(e){this.vegaInputSelectValueController.setValue(e)}render(){return n(this.vegaInputSelectRenderer.render(),this.host)}get host(){return o(this)}static get watchers(){return{selectType:["watchSelectType"],source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"],vegaDropdownProps:["watchVegaDropdownProps"],selectedLabelTooltipProps:["watchSelectedLabelTooltipProps"],dropdownItemTooltipProps:["watchDropdownItemTooltipProps"]}}};we([O()],ye.prototype,"globalSlimmers",void 0),we([c()],ye.prototype,"translationSlimmer",void 0),we([c()],ye.prototype,"sourceController",void 0),we([c()],ye.prototype,"vegaInputSelectRenderer",void 0),we([c()],ye.prototype,"vegaInputSelectPrefixIconRenderer",void 0),we([c()],ye.prototype,"vegaInputSelectDropdownController",void 0),we([c()],ye.prototype,"vegaInputSelectValueController",void 0),we([c()],ye.prototype,"vegaInputSelectDropdownRenderer",void 0),we([c()],ye.prototype,"vegaInputSelectItemsSlotController",void 0),we([c()],ye.prototype,"vegaInputSelectItemController",void 0),we([c()],ye.prototype,"formFieldControllerSlimmer",void 0),we([c()],ye.prototype,"pageResizeObserverSlimmer",void 0),we([c()],ye.prototype,"lazyLoadController",void 0),we([c()],ye.prototype,"changeEventEmitter",void 0),we([c()],ye.prototype,"searchEventEmitter",void 0),we([c()],ye.prototype,"searchTriggerEventEmitter",void 0),we([c()],ye.prototype,"showEventEmitter",void 0),we([c()],ye.prototype,"hideEventEmitter",void 0),we([c()],ye.prototype,"labelButtonClickEventEmitter",void 0),we([c()],ye.prototype,"eventPrevent",void 0),we([c()],ye.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ye.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal;vertical-align:middle}:host(.default) .vega-input-select-container{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px}:host(.small) .vega-input-select-container{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px}vega-field-label{margin-bottom:8px}:host .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;gap:8px;display:block;display:flex;align-items:center;cursor:pointer}:host .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .error .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .error .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .error .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.vega-input-select-disabled) vega-dropdown{pointer-events:none}:host(.vega-input-select-disabled) .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-input-select-disabled) .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-input-select-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-input-select-select-container{flex-grow:1;min-width:0px}:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));display:block;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.vega-input-select-disabled) .vega-input-select-selected{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-input-select-prefix-icon{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}:host .vega-input-select-toggle-icon{width:16px;height:16px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-input-select-hint{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-dropdown{display:block}';export{ye as vega_input_select}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as i,F as o,r as t,c as n,H as e,g as a}from"./p-6b2342e0.js";import{c as r,V as s,M as c,I as d}from"./p-6e1ab235.js";import{s as l}from"./p-6bd5c49b.js";import{V as p,I as h}from"./p-8ce9e214.js";import{s as m}from"./p-519a7d55.js";import{f}from"./p-820ff54c.js";import{a as b}from"./p-528748fa.js";import{D as v}from"./p-526e3634.js";import{a as x,d as g}from"./p-fcefb62c.js";import{c as u}from"./p-1ec763ab.js";import{c as j}from"./p-613ddaab.js";import{V as k}from"./p-724df1f5.js";import{O as w}from"./p-331a62d5.js";import{C as y}from"./p-2d0d575f.js";import{A as E}from"./p-cb378636.js";import{Y as I}from"./p-b0f55f5f.js";import{c as L}from"./p-d7790113.js";import{T as z}from"./p-0a1c7f80.js";import"./p-ed45b3b6.js";import"./p-c596bb49.js";import"./p-d4ea8e22.js";import"./p-49a2e141.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-dcf162e9.js";import"./p-982747ef.js";import"./p-d884c644.js";import"./p-e30a4f3e.js";import"./p-1704ff25.js";import"./p-9a6bd32c.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-eb927e2b.js";import"./p-46cab60a.js";import"./p-b75ee3ba.js";var O=function(i,o,t,n){var e,a=arguments.length,r=a<3?o:null===n?n=Object.getOwnPropertyDescriptor(o,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(i,o,t,n);else for(var s=i.length-1;s>=0;s--)(e=i[s])&&(r=(a<3?e(r):a>3?e(o,t,r):e(o,t))||r);return a>3&&r&&Object.defineProperty(o,t,r),r};class S extends s{render(){return i("div",{class:{accordion:!0,background:this.drawsBackground,"has-title-bg":!!this.titleBackgroundColor,expanded:this.expand,collapsed:!this.expand,"icon-position-center":"center"===this.iconPosition}},this.renderHeader(),this.renderContent())}renderHeader(){const t=i(o,null,this.renderPrefixIcon(),this.accordionTitle?this.renderTitle():this.renderTitleSlot()),n=i("vega-flex",{gap:"size-8","align-items":"start"},"left"===this.expandIconAlign&&this.renderExpandIcon(),t,"right"===this.expandIconAlign&&this.renderExpandIcon());return this.titleBackgroundColor?i("vega-box",{class:"accordion-header","background-color":this.titleBackgroundColor},n):i("div",{class:"accordion-header"},n)}renderPrefixIcon(){return this.prefixIcon&&i("div",{class:"accordion-prefix-icon"},i("vega-icon",{icon:this.prefixIcon,size:"size-24"}))}renderTitle(){return i("div",{class:"accordion-title"},this.accordionTitle)}renderExpandIcon(){const o=["accordion-expand-icon",`accordion-expand-icon-align-${this.expandIconAlign}`,f(this.showExpandIcon,"display")];return i("div",{class:`${b(o)}`},i("vega-button-circle",{size:"small","icon-color":"text-link",variant:"icon-only","data-aria-label":this.getExpandIconAriaLabel(),"data-aria-expanded":`${this.expand}`,icon:k.getIconKey("left"===this.expandIconAlign?"chevron-down":"chevron-up"),ref:i=>{v.addUniqueObserverToNode(i,x,(()=>{this.expandController.flipExpand()}))}}))}renderContent(){return i("div",{class:"accordion-content"},i("slot",{name:"content"}),i("slot",{name:"accordion-content"}))}renderTitleSlot(){return i("div",{class:"accordion-title-slot"},i("slot",{name:"title"}),i("slot",{name:"accordion-title"}))}getExpandIconAriaLabel(){return this.accordionTitle?this.translationSlimmer.t(this.expand?"Collapse {0} accordion":"Expand {0} accordion",this.accordionTitle):this.translationSlimmer.t(this.expand?"Collapse accordion":"Expand accordion")}}k.register({"chevron-up":u,"chevron-down":j}),O([r()],S.prototype,"drawsBackground",void 0),O([r()],S.prototype,"prefixIcon",void 0),O([r()],S.prototype,"accordionTitle",void 0),O([r()],S.prototype,"titleBackgroundColor",void 0),O([r()],S.prototype,"expandIconAlign",void 0),O([r()],S.prototype,"expand",void 0),O([r()],S.prototype,"iconPosition",void 0),O([r()],S.prototype,"showExpandIcon",void 0),O([r()],S.prototype,"expandController",void 0),O([r()],S.prototype,"translationSlimmer",void 0);var C=function(i,o,t,n){var e,a=arguments.length,r=a<3?o:null===n?n=Object.getOwnPropertyDescriptor(o,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(i,o,t,n);else for(var s=i.length-1;s>=0;s--)(e=i[s])&&(r=(a<3?e(r):a>3?e(o,t,r):e(o,t))||r);return a>3&&r&&Object.defineProperty(o,t,r),r};class R extends s{flipExpand(){this.expand=!this.expand}onExpand(){this.groupId&&this.expand&&y.notify(E,{groupId:this.groupId,element:this.host}),this.expandEventEmitter.emit(this.expand)}registerObserver(){this.observer=new w(I,this.shouldCollapseSelfIfOtherExpand.bind(this)),y.register(E,this.observer)}unregisterObserver(){this.observer&&(y.unregister(E,this.observer),this.observer=null)}shouldCollapseSelfIfOtherExpand(i){this.groupId===i.groupId&&this.host!==i.element&&(this.expand=!1)}}C([r()],R.prototype,"host",void 0),C([r()],R.prototype,"groupId",void 0),C([r({writable:!0})],R.prototype,"expand",void 0),C([r()],R.prototype,"expandEventEmitter",void 0),C([c("watchExpand")],R.prototype,"onExpand",null),C([c("componentWillLoad")],R.prototype,"registerObserver",null),C([c("disconnectedCallback")],R.prototype,"unregisterObserver",null);var M=function(i,o,t,n){var e,a=arguments.length,r=a<3?o:null===n?n=Object.getOwnPropertyDescriptor(o,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(i,o,t,n);else for(var s=i.length-1;s>=0;s--)(e=i[s])&&(r=(a<3?e(r):a>3?e(o,t,r):e(o,t))||r);return a>3&&r&&Object.defineProperty(o,t,r),r};const X=class{constructor(i){t(this,i),this.vegaExpand=n(this,"vegaExpand",7),this.accordionExpand=n(this,"accordionExpand",7),this.globalSlimmers={},this.renderer=new S,this.expandController=new R,this.translationSlimmer=new z,this.expandEventEmitter=L(X,g,"accordionExpand"),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.drawsBackground=!0,this.expandIconAlign="right",this.expand=!0,this.iconPosition="top",this.showExpandIcon=!0}watchExpand(){}render(){return l(i("slot",null)),m(i(e,null,this.renderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{expand:["watchExpand"]}}};M([h()],X.prototype,"globalSlimmers",void 0),M([d()],X.prototype,"renderer",void 0),M([d()],X.prototype,"expandController",void 0),M([d()],X.prototype,"translationSlimmer",void 0),M([d()],X.prototype,"expandEventEmitter",void 0),M([d()],X.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),X.style=':host(.v-block),.v-block{display:block}:host(.v-inline-block),.v-inline-block{display:inline-block}:host(.v-hidden),.v-hidden{display:none}@media (min-width: 320px){:host(.S\\:v-block),.S\\:v-block{display:block}:host(.S\\:v-inline-block),.S\\:v-inline-block{display:inline-block}:host(.S\\:v-hidden),.S\\:v-hidden{display:none}}@media (min-width: 768px){:host(.M\\:v-block),.M\\:v-block{display:block}:host(.M\\:v-inline-block),.M\\:v-inline-block{display:inline-block}:host(.M\\:v-hidden),.M\\:v-hidden{display:none}}@media (min-width: 1024px){:host(.L\\:v-block),.L\\:v-block{display:block}:host(.L\\:v-inline-block),.L\\:v-inline-block{display:inline-block}:host(.L\\:v-hidden),.L\\:v-hidden{display:none}}@media (min-width: 1440px){:host(.XL\\:v-block),.XL\\:v-block{display:block}:host(.XL\\:v-inline-block),.XL\\:v-inline-block{display:inline-block}:host(.XL\\:v-hidden),.XL\\:v-hidden{display:none}}:host{display:block;text-align:left;line-height:normal}.accordion{display:block;border-radius:16px}.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));overflow:hidden;flex-basis:0;flex-grow:1;padding-top:2px;padding-bottom:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.accordion-title,.accordion-title-slot{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:28px;letter-spacing:0px}}.accordion-prefix-icon{width:24px;height:32px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));box-sizing:border-box;padding-top:4px;padding-bottom:4px;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}.icon-position-center .accordion-prefix-icon{align-self:center}.accordion-content{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.accordion.background{padding:24px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.accordion.has-title-bg{overflow:hidden}.accordion.has-title-bg.background{padding:0}.accordion.has-title-bg .accordion-header{padding:24px}.accordion.has-title-bg.expanded .accordion-content{padding:24px;margin-top:0}.accordion.expanded .accordion-content{margin-top:24px}.accordion.collapsed .accordion-content{max-height:0px;overflow:hidden;display:none}.accordion.collapsed .accordion-expand-icon-align-left{transform:rotate(-90deg)}.accordion.collapsed .accordion-expand-icon-align-right{transform:rotate(180deg)}.accordion-expand-icon{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}.icon-position-center .accordion-expand-icon{align-self:center}.hidden{display:none}';export{X as vega_accordion}
|
package/dist/vega/p-35d617d5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-526e3634.js";import{d as s,e as n}from"./p-3a93730e.js";import{d as r,c as i}from"./p-02841589.js";import{L as o}from"./p-6e1ab235.js";import{i as a}from"./p-b0f55f5f.js";import{T as c}from"./p-d884c644.js";import{g as l}from"./p-8b5d3a52.js";import{V as h}from"./p-3e09aeed.js";import{c as u}from"./p-a841cf13.js";import{f as d}from"./p-528748fa.js";var p,f;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(p||(p={}));class g{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(f||(f={}));class x extends g{}const w=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(t,e){this.isVegaRTEContent(e)?this.registerRootDomAndContentEntity(t,e):(this.domToEntity.set(t,e),this.entityToDOM.set(e,t))}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.isVegaRTEContent(t)?this.contentEntityToRootDom.get(t):this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}registerRootDomAndContentEntity(t,e){const s=this.rootDomToContentEntity.get(t);s&&s!==e&&this.contentEntityToRootDom.delete(s),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.dtoName}};var A,O,y,m;!function(t){t.DELETE_CHILDREN="DELETE_CHILDREN",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILDREN="APPEND_CHILDREN",t.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",t.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",t.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",t.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",t.DELETE_LINK_GROUP="DELETE_LINK_GROUP",t.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",t.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE",t.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT",t.PASTE_CONTENT="PASTE_CONTENT"}(A||(A={}));class E{constructor(){this.isFlushable=!1}}function S(t){const e=t.getAttribute("style");return e?e.split(";").filter(Boolean).filter((t=>" "!==t)).map((t=>{const e=t.replace(/(['"])(.*?)\1/g,"$2").split(":");return{[r(e[0].trim())]:e[1].trim().replace(";","")}})).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}):{}}class T{constructor(){this.classNameToBeAdded=""}filterAnnotations(t){const e=t.customStyle;return e?(this.extractAndDeleteMatchedStyles(e),0===Object.keys(e).length&&delete t.customStyle,t):t}filterAndDeleteStyles(t,e){const s=new Set(e);return this.extractAndDeleteMatchedStyles(t)&&this.classNameToBeAdded&&s.add(this.classNameToBeAdded),{styles:t,classNames:Array.from(s)}}refillStyles(t){this.classNameToBeAdded&&t.classList.remove(this.classNameToBeAdded);const e=S(t),s=Object.assign(Object.assign({},this.stylesToBeFiltered),e),n=Object.entries(Object.assign({},s)).map((([t,e])=>`${i(t)}: ${e};`)).join("");t.setAttribute("style",n)}canFilter(t){return!1}canRefill(t,e){return!1}toCssText(){return""}get alwaysFilter(){return!1}extractAndDeleteMatchedStyles(t){let e=!1;const s=this.stylesToBeFiltered;if(t&&s){const n=Object.keys(s);for(const r of n)t[r]===s[r]&&(delete t[r],e=!0)}return e}buildCssTextForStyles(t,e){return`${`.${T.RTE_CONTENT_CONTAINER_CLASS_NAME}`+(e?` .${e}`:` ${t}`)} { ${Object.entries(this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")} }`}convertStylesMapToCssText(t){return Object.entries(t||this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}isBlockOrNodeStylesMatchFilterStyles(t,e){const s=t.getStyles({standalone:!0});return this.isMatchFilterStyles(s,e)}isMatchFilterStyles(t,e){return(e&&e.length>0?e:Object.keys(this.stylesToBeFiltered)).every((e=>t[e]===this.stylesToBeFiltered[e]))}}T.RTE_CONTENT_CONTAINER_CLASS_NAME="vega-rte-content",function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(O||(O={}));class N extends g{}class b{static isTextBlock(t){return t===this.RTE_TEXT_BLOCK_CLASS_NAME}static isCodeBlock(t){return"RTECodeBlock"===t}static isListBlock(t){return"RTEListBlock"===t}static isListItemBlock(t){return"RTEListItemBlock"===t}static isTextNode(t){return t===this.RTE_TEXT_NODE_CLASS_NAME}static isLinkNode(t){return this.isTextNode(t.dtoName)&&!!t.getAnnotationByType(O.LINK)}static isCodeNode(t){if(this.isTextNode(t.dtoName)){const e=t.getAnnotationByType(O.CODE);return!!e&&e.code}return!1}static isImageNode(t){return"RTEImageNode"===t.dtoName}static isCodeBlockNode(t){return"RTECodeBlockNode"===t.dtoName}}b.RTE_TEXT_NODE_CLASS_NAME="RTETextNode",b.RTE_TEXT_BLOCK_CLASS_NAME="RTETextBlock";class C extends T{constructor(){super(...arguments),this.stylesToBeFiltered=v.getDefaultStyles(),this.elementTagName="a"}filterAnnotations(t){const e=t.link;return(null==e?void 0:e.customStyle)?(this.extractAndDeleteMatchedStyles(e.customStyle),0===Object.keys(e.customStyle).length&&delete e.customStyle,t):t}canFilter(t){return b.isLinkNode(t)}canRefill(t,e){return"RTETextNode"===t&&e.matches(this.elementTagName)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}filterLinkGroupInlineStyles(t){const e=t.style,s=t.class?t.class.split(" "):[],n=this.filterAndDeleteStyles(e,s);return n.styles&&Object.keys(n.styles).length>0&&(t.style=n.styles),n.classNames&&n.classNames.length>0&&(t.class=n.classNames.join(" ")),t.style&&0===Object.keys(t.style).length&&delete t.style,t}}class v extends g{constructor(t){super(),this.type=p.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}static getDefaultStyles(){return{color:"rgba(var(--v-text-link, 19, 98, 226, 1))"}}clone(){const t=new v("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){let s=this.toJsx(t,e);return(null==e?void 0:e.filterInlineStyles)&&(s=v.linkGroupFilterStylesStrategy.filterLinkGroupInlineStyles(s)),Object.entries(s).map((([t,e])=>{const s="string"==typeof e?e:this.formatStyleToString(e);return`${i(t)}="${s}"`})).join(" ")}toJsx(t,e){const s=this.getStyle(t,e),n=this.getClass(t,e),r=this.getAttribute(t);return n.length>0&&(r.class=n.join(" ")),s&&Object.keys(s).length>0&&(r.style=s),r}getClass(t,e){const s=[];return t.link.customClass&&s.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&s.push("v-rte--link"),s}getStyle(t,e){const s={};return t.link.customStyle&&Object.assign(s,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&Object.assign(s,v.getDefaultStyles()),s}getAttribute(t){const{href:e,customAttribute:s={}}=t.link,n=t.useInternalStyle,r=s.target||(n?"_blank":"");return Object.assign(Object.assign(Object.assign({},s),e||n?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}}v.linkGroupFilterStylesStrategy=new C;class R extends x{constructor(t){super(),this.type=f.ALIGNMENT,this.textAlign=t}static from(t){return[f.ALIGNMENT,new R(t)]}static getDefaultStyles(t){switch(t){case"right":case"center":case"justify":return{textAlign:t};case"left":default:return{textAlign:"left"}}}toJSON(){return{textAlign:this.textAlign}}renderClass(t){if(null==t?void 0:t.standalone)return null;switch(this.textAlign){case"right":case"center":case"justify":return`v-rte--horizontal-alignment-${this.textAlign}`;case"left":default:return"v-rte--horizontal-alignment-left"}}clone(){return new R(this.textAlign)}renderStyle(t){return(null==t?void 0:t.standalone)?R.getDefaultStyles(this.textAlign):null}}class j extends x{constructor(t){super(),this.type=f.INDENT,this.indent=Math.max(0,t)}static from(t){return[f.INDENT,new j(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new j(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class _{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).has(t)||this.registry.get(e).set(t,new Set),this.registry.get(e).get(t).add(s)}static unregister(t,e,s){const n=this.registry.get(e);if(n){const e=n.get(t);e&&e.delete(s)}}static get(t,e){const s=t instanceof E?t.type:t.constructor.name,n=this.registry.get(e.constructor.name);if(n){const r=n.get(s);if(r&&r.size>0)return Array.from(r).find((s=>s.canIntercept(t,e)))}}}_.registry=new Map;class k{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static unregister(t,e){const s=this.registry.get(e);s&&s.delete(t)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=_.get(t,e),n=()=>{const s=t instanceof E?t.type:t.constructor.name,n=k.get(s,e.constructor.name);if(n)return t.executedFlag=!0,n.execute(t,e);o.warn(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)};return s?s.intercept(n,t,e):n()}static canHandle(t,e){return!!k.get(t,e.constructor.name)}}k.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(y||(y={}));class $ extends g{}class L extends ${constructor(t){super(),this.type=y.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[y.CUSTOM_ATTRIBUTE,new L(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new L(this.customAttribute)}toString(t=[]){const e=t.map((t=>t.split("=")[0]));return Object.keys(this.customAttribute).map((t=>e.includes(t)?null:`${t}="${this.customAttribute[t]}"`)).filter(a)}render(t={}){var e;const s=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete s[t])),Object.keys(s).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===s[t]&&(s[t]="true")})),s}}class B extends ${constructor(t){super(),this.type=y.CUSTOM_CLASS,this.customClass=t}static from(t){return[y.CUSTOM_CLASS,new B(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new B(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class I extends ${constructor(t){super(),this.type=y.CUSTOM_STYLE,this.customStyle=t}static from(t){return[y.CUSTOM_STYLE,new I(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new I(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(t){const e=Object.assign({},this.customStyle);return t.forEach((t=>delete e[t])),e}toString(){return`style="${Object.entries(this.customStyle).map((([t,e])=>`${t}: ${e};`)).join(" ")}"`}}class D extends x{constructor(t){super(),this.type=f.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[f.INTERNAL_WRAPPER,new D(t)]}clone(){return new D(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class M{constructor(t){this.dtoName=t instanceof J?"block":"node",this.annotationMap=t.annotationMap}toCssText(t={standalone:!1},e,s){return s=s||this.toJSON(t,e),Object.entries(Object.assign({},s)).map((([t,e])=>`${i(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const s=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof I)).map((e=>e.renderStyle(t))).filter(a);return e&&e.length>0?this.mergeAnnotationStyles(s,e):s.reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})}filterAnnotation(t){return"block"===this.dtoName?t instanceof x:t instanceof N}mergeAnnotationStyles(t,e){const s={};for(const n of t)for(const t in n){const r=n[t],i=s[t];s[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return s}}class F{static register(t,e){var s;const n=null!==(s=this.registry.get(t))&&void 0!==s?s:new Set;n.add(e),this.registry.set(t,n)}static getStrategies(t){var e;return Array.from(null!==(e=this.registry.get(t))&&void 0!==e?e:[])}static executeTheStrategyFilterAction(t,e,s){return this.getStrategies(t.dtoName).filter((e=>e.canFilter(t))).reduce(((t,e)=>e.filterAndDeleteStyles(t.styles,t.classNames)),{styles:e,classNames:s})}static executeTheStrategyRefillAction(t,e){this.getStrategies(t).filter((s=>s.canRefill(t,e))).forEach((t=>{t.refillStyles(e)}))}static generateAllStylesContent(t=!1){const e=[];return t&&(e.push("/* Font-face imports begin */\n"),e.push(Object.keys(c).map((t=>`@import url('${c[t].url}');\n`)).join(" ")),e.push("/* Font-face imports end */\n")),this.registry.forEach((t=>{t.forEach((t=>{const s=t.toCssText();s&&!e.includes(s)&&e.push(s)}))})),e.join(" ")}}F.registry=new Map,function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(m||(m={}));class H{constructor(t,e){this.annotationMap=new Map,this.dtoName=this.constructor.name,this.id=t,e&&(this.annotationMap=e)}static from(t,e,s){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${s}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return L.from(e);case"customClass":return B.from(e);case"customStyle":return I.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){return new M(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof N||t instanceof B)).map((e=>e.renderClass(t))).filter(a).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(y.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return w.getDOMByEntity(this)}generateAttributeString(t,...e){var s;const n=new M(this),r=n.toJSON({standalone:!0},["textDecoration"]),i=this.annotationMap.get(y.CUSTOM_CLASS);let o=r,c=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=F.executeTheStrategyFilterAction(this,r,c);o=t.styles,c=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],c&&c.length>0?`class="${c.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${n.toCssText({standalone:!0},void 0,o)}"`:null,...e].filter(a);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof E?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const n=w.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}}const P=new class{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(t,e){if(e.prototype instanceof J)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof H))throw new Error(`Invalid RTE DTO class type: ${t}`);this.RTE_NODE_DTO_CLASS_MAP.set(t,e)}}getRTEBlockClass(t){return this.RTE_BLOCK_DTO_CLASS_MAP.get(t)}getRTENodeClass(t){return this.RTE_NODE_DTO_CLASS_MAP.get(t)}};class J{constructor(t){this.annotationMap=new Map,this.dtoName=this.constructor.name,this.id=t}static from(t,e){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}) is not implemented. Please implement this method in the subclass.`)}static generateBlockChildren(t,e,s){return t.map((t=>{const n=P.getRTEBlockClass(t.type);if(n){const r=n.from(t,e);return r.parent=s,r}})).filter(a)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return R.from(e);case"indent":return j.from(e);case"customAttribute":return L.from(e);case"customClass":return B.from(e);case"customStyle":return I.from(e);case"internalWrapper":return D.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,s])=>{const n=this.createAnnotationEntity(e,s);a(n)&&t.set(...n)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(f.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof v||t instanceof D))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof x||t instanceof $)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(n){if(this.doApply(n),n.isFlushable){const n=w.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}getFirstNode(){if(!this.children||!this.children[0])return null;const t=this.children[0];return t instanceof J?t.getFirstNode():t}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){const e=new M(this).toJSON(t);return Object.assign(Object.assign({},e),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof x||t instanceof B)).map((e=>e.renderClass(t))).filter(a).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(y.CUSTOM_ATTRIBUTE)}generateAttributeString(t,...e){var s;const n=new M(this),r=n.toJSON({standalone:!0}),i=this.annotationMap.get(y.CUSTOM_CLASS);let o=r,c=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=F.executeTheStrategyFilterAction(this,r,c);o=t.styles,c=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],c&&c.length>0?`class="${c.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${n.toCssText({standalone:!0},void 0,o)}"`:null,...e].filter(a);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof E?k.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof v||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=k.get(t.constructor.name,this.constructor.name);e&&e.execute(t,this)}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}class K{}class U extends K{constructor(){super(...arguments),this.doSplit=!0}}class W extends g{constructor(t){super(),this.type=p.SELECTION_RANGE,this.range=t}clone(){return new W(this.range)}}const G="700",z="bold",V="italic",X="underline",q="line-through";class Y extends N{constructor(t){super(),this.type=O.STRIKETHROUGH,this.strikethrough=t}static from(t){return[O.STRIKETHROUGH,new Y(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new Y(this.strikethrough)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.strikethrough?{textDecoration:"line-through"}:null}}class Q extends N{constructor(t){super(),this.type=O.UNDERLINE,this.underline=t}static from(t){return[O.UNDERLINE,new Q(t)]}toJSON(){return{underline:this.underline}}clone(){return new Q(this.underline)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.underline?"v-rte--underline":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.underline?{textDecoration:"underline"}:null}}class Z extends N{constructor(t){super(),this.type=O.ITALIC,this.italic=t}static from(t){return[O.ITALIC,new Z(t)]}toJSON(){return{italic:this.italic}}clone(){return new Z(this.italic)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.italic?"v-rte--italic":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.italic?{fontStyle:"italic"}:null}}class tt extends N{constructor(t){super(),this.type=O.BOLD,this.bold=t}static from(t){return[O.BOLD,new tt(t)]}toJSON(){return{bold:this.bold}}clone(){return new tt(this.bold)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.bold?"v-rte--bold":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.bold?{fontWeight:"700"}:null}}class et extends N{constructor(t,e=!0){super(),this.type=O.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[O.CODE,new et(t,e)]}static getDefaultStyles(){return{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}}toJSON(){return{code:this.code}}clone(){return new et(this.code,this.useInternalStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.code&&this.useInternalStyle?"v-rte--code":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.code&&this.useInternalStyle?et.getDefaultStyles():null}}const st={key:"black",light:"#111128",dark:"#E3E3E8"},nt=[st,{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],rt="",it=[{key:"title"},{key:"subtitle"},{key:"heading-1"},{key:"heading-2"},{key:"heading-3"},{key:"paragraph"}],ot=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]],at=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);class ct extends N{constructor(t){super(),this.type=O.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[O.TEXT_COLOR,new ct(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new ct(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:h.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return nt.find((e=>e.key===t))||nt[0]}}class lt extends N{constructor(t,e=!0){super(),this.type=O.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[O.LINK,new lt(t,e)]}toJSON(){return{link:this.link}}clone(){return new lt(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class ht extends K{constructor(t,e,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=s}toAnnotation(){return new v(this.groupKey)}}class ut extends K{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class dt{execute(t,e){return o.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const s=t.annotationMap.get(y.CUSTOM_STYLE);s&&this.isCustomStyle(s,e)&&t.annotationMap.set(s.type,new I(s.removeStyles(e)))}createNewParagraph(t){const e=P.getRTEBlockClass("paragraph");if(e)return e.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.dtoName?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtBlockEnd(t,e,s){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,s):this.isCaretPositionAtDecoratorBlockEnd(t,e,s)}getDOMByEntity(t){return w.getDOMByEntity(t)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&0!==s}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class pt extends E{constructor(t){super(),this.type=A.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class ft extends dt{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(p.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof U&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:r,endOffset:i}=s.range,o=t===n&&r===i;e.parent.children=e.parent.children.flatMap((t=>{if(t.id===e.id){if(o)return this.insertNewNode(r,e);if(this.shouldSplitSelection(s.range)&&e.isContentEditable()){const n=this.splitTextNode(s.range,e);return t.annotationMap.has("LINK")&&t.apply(new pt(n)),n}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");this.setApplyTargetNode(s);const n=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===n?[s,e]:t===e.text.length||!e.isContentEditable()&&t===n+1?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:r}=t;return e!==s||n>0||r<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:r}=t,i=s.parentElement,o=n.parentElement,a=(t,s,n)=>{const r=t.substring(0,s),i=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},c=i&&w.getEntityByDOM(i),l=o&&w.getEntityByDOM(o);if(c&&c.id===e.id){const i=s===n?t.endOffset:e.text.length,[o,c,l]=a(e.text,r,i);return this.setApplyTargetNode(c),[o,c,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[s,n,r]=a(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class gt extends U{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new tt(this.bold)}}class xt extends g{constructor(){super(...arguments),this.type=p.CLEAR_FORMATTING,this.items=[O.BOLD,O.ITALIC,O.UNDERLINE,O.STRIKETHROUGH,O.TEXT_COLOR,O.CODE,y.CUSTOM_STYLE]}}class wt extends U{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new xt}}class At extends U{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new et(this.code)}}class Ot extends K{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class yt extends U{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new Z(this.italic)}}class mt extends U{constructor({link:t,newText:e,needMergeNode:s,doSplit:n,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=s,this.newText=e,this.type=r,a(n)&&(this.doSplit=n)}toAnnotation(){return new lt(this.link)}}class Et extends U{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new Y(this.strikethrough)}}class St extends U{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new Q(this.underline)}}class Tt extends dt{handleAction(t,e){const s=t.toAnnotation();if(t instanceof Ot)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof xt))return s instanceof N||s instanceof W?(t instanceof mt&&(a(t.newText)&&(e.text=t.newText),e.parent.apply(new ht(t.link.groupKey,[e],t.type))),t instanceof At&&this.handleAction(new wt,e),t instanceof gt&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof yt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof St||t instanceof Et)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(s.type,s)):void 0;s.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class Nt extends E{constructor(){super(...arguments),this.type=A.DELETE_LINK_GROUP}}class bt extends dt{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new Nt)}}class Ct extends E{constructor(t){super(),this.type=A.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class vt extends dt{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:r,startOffset:i,endOffset:o}=e;let a=s.text;if(n===r&&i===o&&t)a=s.text.slice(0,i)+t+s.text.slice(i);else{const e=n.parentElement,c=r.parentElement,l=e&&w.getEntityByDOM(e),h=c&&w.getEntityByDOM(c);let u=0,d=s.text.length;l&&l===s?(u=i,d=n===r?o:d):h&&h===s&&(d=o),a=s.text.slice(0,u)+t+s.text.slice(d)}s.apply(new Ct(a))}}}class Rt extends g{constructor(t){super(),this.type=O.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:s,customStyle:n,customClass:r,customAttribute:i}=t,o=new Rt(e);return o.groupId=t.groupId,o.child=s?Rt.from(s)[1]:void 0,o.customAttribute=i?L.from(i)[1]:void 0,o.customClass=r?B.from(r)[1]:void 0,o.customStyle=n?I.from(n)[1]:void 0,[O.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new Rt(this.htmlTag);return r.groupId=this.groupId,r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(s=this.customClass)||void 0===s?void 0:s.clone(),r.customStyle=null===(n=this.customStyle)||void 0===n?void 0:n.clone(),r}renderProps(){var t,e,s;return Object.assign(Object.assign({},null===(t=this.customAttribute)||void 0===t?void 0:t.render()),{style:null===(e=this.customStyle)||void 0===e?void 0:e.renderStyle(),class:null===(s=this.customClass)||void 0===s?void 0:s.renderClass().join(" ")})}toJSON(){var t,e,s,n;return{inlineHtml:u({htmlTag:this.htmlTag,groupId:this.groupId,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(s=this.customClass)||void 0===s?void 0:s.toJSON().customClass,customStyle:null===(n=this.customStyle)||void 0===n?void 0:n.toJSON().customStyle})}}}class jt extends dt{handleAction(t,e){const s=e.parent.getAnnotationByType(p.LINK_GROUP);if(s){const n=e.annotationMap.get("LINK").link.groupKey,r=s.linkGroups.get(n);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),s.linkGroups.set(n,r))}}}}class _t extends dt{handleAction(t,e){const s=e.parent.getAnnotationByType(p.LINK_GROUP);if(s){const t=e.annotationMap.get(O.LINK).link.groupKey,n=s.linkGroups.get(t);if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&s.linkGroups.delete(t),0===s.linkGroups.size&&e.parent.annotationMap.delete(p.LINK_GROUP)}}e.annotationMap.delete(O.LINK)}}class kt extends N{constructor(t){super(),this.type=O.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[O.PLAIN_TEXT,new kt(t)]}clone(){return new kt(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class $t extends U{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new ct(this.textColor)}}class Lt extends H{constructor(t,e,s,n){super(t,n),this.dtoName=Lt.dtoName,this.type=m.TEXT,this.parent=s,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,s={autoMatchFormat:!0}){const n=new Lt(t.id,t.text,e),{annotations:r}=t;return r&&(n.annotationMap=this.generateTextAnnotationMap(r,s,e,n)),n}static generateTextAnnotationMap(t,e,s,n){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&s&&n&&s.apply(new ht(t.link.groupKey,[n],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(a))}static createAnnotationEntity(t,e,s){const n=!(!s||!s.autoMatchFormat);switch(t){case"bold":return tt.from(e);case"italic":return Z.from(e);case"underline":return Q.from(e);case"strikethrough":return Y.from(e);case"code":return et.from(e,n);case"textColor":return ct.from(e);case"link":return lt.from(e,n);case"inlineHtml":return Rt.from(e);case"plainText":return kt.from(e)}return H.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof N||t instanceof $||t instanceof Rt)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(t){const e=this.getAnnotationByType(O.INLINE_HTML);return e?this.renderWithWrapperStr(e,t):this.renderTextStr(t)}cloneWithText(t){return new Lt(l(),t,this.parent,super.cloneAnnotations())}clone(t){return new Lt(this.id,this.text,t,super.cloneAnnotations())}isEmpty(){return!(this.getAnnotationByType(O.INLINE_HTML)||this.text&&""!==this.text&&"\n"!==this.text)}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}getInlineHtmlTagAtDepth(t){const e=this.getInlineHtmlAnnotationAtDepth(t);return e?at.has(e.htmlTag)?null:{htmlTag:e.htmlTag,attrStr:this.annotationAttrStr(e),groupId:e.groupId,annotation:e}:null}renderHtmlFromDepth(t,e){if(0===t)return this.toHtml(e);const s=this.getInlineHtmlAnnotationAtDepth(t);return s?this.renderWithWrapperStr(s,e):this.renderTextStr(e)}getInlineHtmlAnnotationAtDepth(t){let e=this.getAnnotationByType(O.INLINE_HTML);for(let s=0;s<t&&e;s++)e=e.child;return e}registerModifyStrategy(){const t=this.constructor.name;Lt.registerActionStrategyStatus[t]||(this.isContentEditable()&&(k.register(A.UPDATE_TEXT,t,new bt),k.register(A.REPLACE_SELECTED_TEXT,t,new vt),k.register(A.LINK_GROUP_NODE_SPLIT,t,new jt),k.register(mt.name,t,new Tt)),k.register(U.name,t,new ft),k.register(A.DELETE_LINK_GROUP,t,new _t),k.register(gt.name,t,new Tt),k.register(wt.name,t,new Tt),k.register(yt.name,t,new Tt),k.register(St.name,t,new Tt),k.register($t.name,t,new Tt),k.register(Et.name,t,new Tt),k.register(At.name,t,new Tt),k.register(K.name,t,new Tt),Lt.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(p.SELECTION_RANGE);if(t instanceof U&&t.doSplit&&e){const e=k.get(U.name,this.constructor.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){k.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof ut)return void this.syncUpSelectedNodes(t);s instanceof W||this.syncUpSelectedNodes(t);const n=k.get(e.constructor.name,t.constructor.name);if(n)return void n.execute(e,t);const r=k.get(K.name,Lt.name);r&&r.execute(e,t)}syncUpSelectedNodes(s){const r=this.getElementRef();if(r){const i=e.getSubjectFromParentNodeByEventId(r,n);i&&t.notify(i,{node:s})}}renderWithWrapperStr(t,e){const{htmlTag:s,child:n}=t,r=this.annotationAttrStr(t);return n?`<${s}${r}>${this.renderWithWrapperStr(n,e)}</${s}>`:at.has(s)?`<${s}${r}>`:this.text?`<${s}${r}>${this.renderTextStr(e)}</${s}>`:`<${s}${r}></${s}>`}annotationAttrStr(t){const{customAttribute:e,customClass:s,customStyle:n}=t,r=[...(null==e?void 0:e.toString())||[],null==s?void 0:s.toString(),null==n?void 0:n.toString()].filter(a);return r.length>0?` ${r.join(" ")}`:""}renderTextStr(t){var e;const s=(null===(e=this.getAnnotationByType(O.CODE))||void 0===e?void 0:e.code)?"code":"span",n=super.generateAttributeString(t);return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${s}${n}>${this.text}</${s}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(O.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof N&&!(t instanceof lt)&&!(t instanceof kt)||t instanceof $)).length}}Lt.registerActionStrategyStatus={},Lt.htmlTag="span",Lt.dtoName="RTETextNode";class Bt extends E{constructor(t){super(),this.type=A.APPEND_CHILDREN,this.entityToBeAppended=t}}const It={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",minHeight:"22px",fontWeight:"500"},Dt=Object.assign(Object.assign({},It),{marginTop:"0px",marginBottom:"0px"}),Mt={paragraph:Dt,title:Object.assign(Object.assign({},It),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"}),subtitle:Object.assign(Object.assign({},It),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"}),"heading-1":Object.assign(Object.assign({},Dt),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"}),"heading-2":Object.assign(Object.assign({},Dt),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"}),"heading-3":Object.assign(Object.assign({},Dt),{fontSize:"18px"}),"heading-4":Object.assign({},Dt),"heading-5":Object.assign(Object.assign({},Dt),{fontSize:"14px"}),"heading-6":Object.assign(Object.assign({},Dt),{fontSize:"12px"})};class Ft extends x{constructor(t){super(),this.type=f.TEXT_STYLE,this.textStyle=t}static from(t){return[f.TEXT_STYLE,new Ft(t)]}static getDefaultStyles(t){return t?Mt[t]:null}toJSON(){return{textStyle:this.textStyle}}clone(){return new Ft(this.textStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.textStyle?`v-rte--text-style-${this.textStyle}`:null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.textStyle?Ft.getDefaultStyles(this.textStyle):null}}class Ht extends K{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new Ft(this.textStyle)}}class Pt extends dt{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new gt(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new Ot(O.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class Jt extends E{constructor(t,...e){super(),this.type=A.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Kt extends E{constructor(t){super(),this.type=A.REPLACE_CHILD_NODES,this.newChildNodes=t}}class Ut extends dt{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),r=t.text.slice(e),i=s.children.indexOf(t);if(i>-1){const e=s.children.slice(0,i),o=s.children.slice(i+1);n&&e.push(t.cloneWithText(n)),r&&o.unshift(t.cloneWithText(r)),s.apply(new Kt(e));const a=s.cloneWithNodes(o);return s.parent.apply(new Jt(s,a)),a}}}}class Wt extends dt{handleAction(t,e){e.children=[],e.apply(new Bt(t.newChildNodes))}}class Gt extends E{constructor(t){super(),this.type=A.DELETE_CHILDREN,this.entityToBeRemoved=t}}class zt extends dt{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new Bt(t)),s.parent.apply(new Gt(s))}}}class Vt extends dt{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new Lt(l(),"\n",s),r=t.text.slice(0,e),i=t.text.slice(e),o=s.children.indexOf(t);if(o>-1){const e=s.children.slice(0,o),a=s.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&a.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,n,a,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new Lt(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Kt([...t,e,...s]))}}class Xt extends dt{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new Lt(l(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,r,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new Gt(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new Lt(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Kt([...t,e,...s]))}}class qt extends E{constructor(t,...e){super(),this.type=A.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class Yt extends E{constructor(t,e){super(),this.type=A.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Qt extends K{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new R(this.textAlign)}}class Zt extends dt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class te extends K{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new j(this.indent)}}class ee extends J{constructor(t,e,s){super(t),this.dtoName=ee.dtoName,this.children=[],this.type=e;const{autoMatchFormat:n}=s||{autoMatchFormat:!0};n&&(this.annotationMap=ee.isAcceptableTextStyle(e)?new Map([Ft.from(e)]):new Map([Ft.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var s,n;const r=new ee(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(n=null===(s=t.annotations)||void 0===s?void 0:s.textStyle)&&void 0!==n?n:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const s=P.getRTENodeClass(t.type);if(s)return s.from(t,r,e)})).filter(a),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?Ft.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,s)=>{const n=e.at(-1);if(t instanceof mt&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(O.LINK),r=s.getAnnotationByType(O.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag(),s=super.generateAttributeString(t),n=this.getChildrenHtml(t);return super.shouldRenderAsInternalWrapper()?n:[`<${e}${s}>`,n,`</${e}>`].join("")}cloneWithNodes(t){const e=new ee(l(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Bt(t)),e}clone(t){const e=new ee(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}getBlockTag(){switch(this.type){case"title":case"subtitle":return"div";case"heading-1":return"h1";case"heading-2":return"h2";case"heading-3":return"h3";case"heading-4":return"h4";case"heading-5":return"h5";case"heading-6":return"h6";case"paragraph":default:return"p"}}getChildrenHtml(t){const e=this.getAnnotationByType(p.LINK_GROUP);let s=this.renderGroupedNodesAtDepth(this.children,0,t);return e&&this.children.length>0&&(s=this.generateLinkHtml(e,s,t)),s}doAnnotationActionApply(t){const e=k.get(t.constructor.name,ee.name);e&&e.execute(t,this)}renderGroupedNodesAtDepth(t,e,s){var n;let r="",i=0;for(;i<t.length;){const o=t[i].getInlineHtmlTagAtDepth(e);if(!(null==o?void 0:o.groupId)){r+=t[i].renderHtmlFromDepth(e,s),i++;continue}let a=i+1;for(;a<t.length&&(null===(n=t[a].getInlineHtmlTagAtDepth(e))||void 0===n?void 0:n.groupId)===o.groupId;)a++;if(a===i+1)r+=t[i].renderHtmlFromDepth(e,s);else{const n=this.renderGroupedNodesAtDepth(t.slice(i,a),e+1,s);r+=`<${o.htmlTag}${o.attrStr}>${n}</${o.htmlTag}>`}i=a}return r}generateLinkHtml(t,e,s){e="";let n=[];for(let r=0;r<this.children.length;r++){const i=this.children[r].getAnnotationByType(O.LINK),o=this.children[r+1]?this.children[r+1].getAnnotationByType(O.LINK):null;if(i){if(n.push(this.children[r]),!o||i.link.groupKey!==o.link.groupKey){const r=t.toString(i,{standalone:!0,filterInlineStyles:null==s?void 0:s.filterInlineStyles});e+=[`<a${r?` ${r}`:""}>`,this.renderGroupedNodesAtDepth(n,0,s),"</a>"].join(""),n=[]}}else e+=this.children[r].toHtml(s)}return e}}k.register(Ht.name,ee.name,new Pt),k.register(Qt.name,ee.name,new Zt),k.register(te.name,ee.name,new class extends dt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),k.register(ht.name,ee.name,new class extends dt{handleAction(t,e){let s=e.getAnnotationByType(p.LINK_GROUP);if("update_link"===t.type){if(s){const e=s.linkGroups.get(t.groupKey);e&&s.linkGroups.set(t.groupKey,[e[0]])}}else{if(s){const e=s.linkGroups.get(t.groupKey)||[];s.linkGroups.set(t.groupKey,[...e,...t.nodes])}else s=t.toAnnotation(),s.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(p.LINK_GROUP,s)}}}),k.register(A.UNLINK_LINK_GROUP,ee.name,new class extends dt{handleAction(t,e){const s=e.getAnnotationByType(p.LINK_GROUP);s&&(s.linkGroups.size>1?s.linkGroups.delete(t.groupKey):e.annotationMap.delete(p.LINK_GROUP))}}),k.register(A.SPLIT_BLOCK_WITH_NODE,ee.name,new Ut),k.register(A.REPLACE_CHILD_NODES,ee.name,new Wt),k.register(A.MERGE_TWO_BLOCKS_NODES,ee.name,new zt),k.register(A.LINE_BREAK_SINGLE_BLOCK,ee.name,new Vt),k.register(A.LINE_BREAK_MULTIPLE_BLOCKS,ee.name,new Xt),k.register(A.INSERT_IMAGE_TO_BLOCK,ee.name,new class extends dt{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new Jt(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new qt(e,r));else{const t=new Yt(s,n);e.apply(t),e.parent.apply(new Jt(e,r))}}}),k.register(A.TRANSFORM_LIST_BLOCK,ee.name,new class extends dt{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),r=t.selectedBlocks,i=r.map((t=>s.toListItem(t)));n.apply(new Bt(i)),s.apply(new Jt(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new Gt(t))}))}}),ee.dtoName="RTETextBlock";class se extends dt{getPreviousNode(t){const e=t.parent,s=e.children.indexOf(t);if(s>0)return e.children[s-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(this.isRTEBlock(t.parent)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}isRTEBlock(t){return t&&"VegaRTEContent"!==t.dtoName}}class ne extends E{constructor(t,e){super(),this.isFlushable=!0,this.type=A.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class re extends K{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new W(this.range)}}class ie extends H{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(ie.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${ie.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return d(t,`.${ie.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}ie.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",ie.DECORATOR_NODE_CLASS="v-internal-decorator-node";class oe extends T{constructor(){super(...arguments),this.stylesToBeFiltered=oe.STYLES,this.elementTagName="pre code"}canFilter(t){return b.isCodeBlockNode(t)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}oe.STYLES={boxSizing:"border-box",color:"rgba(var(--v-text-primary, 32, 54, 69, 1))",textAlign:"left",fontFamily:'"Roboto Mono"',fontWeight:"400",lineHeight:"22px",fontSize:"16px",whiteSpace:"pre-wrap",minHeight:"22px",tabSize:"2px"};class ae extends ie{constructor(t,e,s,n){super(t),this.dtoName=ae.dtoName,this.type=m.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s,this.annotationMap.set(y.CUSTOM_STYLE,new I(oe.STYLES))}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(t){return`<code${this.generateAttributeString(t)}>${this.text}</code>`}clone(t){return new ae(this.id,this.text,this.language,t)}doAnnotationActionApply(t){k.executeTheStrategy(t,this)}doModifyActionApply(t){k.executeTheStrategy(t,this)}}k.register(A.UPDATE_CODE_BLOCK,ae.name,new class extends dt{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),k.register(re.name,ae.name,new class extends dt{handleAction(t,e){e.annotationMap.set(p.SELECTION_RANGE,t.toAnnotation())}}),ae.dtoName="RTECodeBlockNode";var ce;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(ce||(ce={}));class le extends dt{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&"parent"in e&&e.parent&&(e.isListItemBlock()&&e.nestList&&e.nestList.length||e.parent.apply(new Gt(e)))}}class he extends T{constructor(){super(...arguments),this.stylesToBeFiltered=he.STYLES,this.elementTagName="pre"}canFilter(t){return b.isCodeBlock(t.dtoName)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}he.STYLES={backgroundColor:"rgba(var(--v-bg-secondary, 245, 247, 247, 1))",padding:"12px"};class ue extends J{constructor(t,e,s){super(t),this.dtoName=ue.dtoName,this.type="code-block",this.annotationMap=new Map([I.from(he.STYLES)]),this.children=[new ae(`${t}-1`,e,s,this)]}static from(t){return new ue(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}toHtml(t){const{language:e=ce["Plain Text"]}=this.children[0];return`<pre data-language="${e}"${super.generateAttributeString(t)}>${this.children.map((e=>e.toHtml(t)))}</pre>`}clone(t){const e=ue.from(this.toJSON());return e.parent=t,e}apply(n){if(n instanceof E&&k.executeTheStrategy(n,this),n.isFlushable){const n=w.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(p.SELECTION_RANGE)}}k.register(A.DELETE_CODE_BLOCK,ue.name,new class extends se{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),r=0),n.apply(new Gt(e));const i=t?w.getDOMByEntity(t):null;if(0===n.children.length){const s=ee.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:""}]});e.parent.apply(new Bt([s])),t=s.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(s,r,i,o){const a=w.getDOMByEntity(o);if(a){const o=e.getSubjectFromParentNodeByEventId(a,n);o&&t.notify(o,{node:s,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),k.register(A.DELETE_CHILDREN,ue.name,new le),k.register(A.SWITCH_OUT_FROM_CODE_BLOCK,ue.name,new class extends dt{handleAction(s,r){const{content:i,language:o}=s,a=i.split("\n"),c=new ne(a.slice(0,a.length-2).join("\n"),o);c.isFlushable=!1,r.children[0].apply(c);const h=ee.from({id:l(),type:"paragraph",nodes:[{id:l(),text:"",type:"text"}]});r.parent.apply(new Jt(r,h));const u=w.getDOMByEntity(r);if(u){const s=e.getSubjectFromParentNodeByEventId(u,n);s&&t.notify(s,{node:h.children[0]})}}}),k.register(A.INSERT_IMAGE_TO_BLOCK,ue.name,new class extends dt{handleAction(t,e){e.parent.apply(new Jt(e,t.imageBlockToBeInserted))}}),ue.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element",ue.dtoName="RTECodeBlock";export{V as $,k as A,x as B,y as C,ut as D,f as E,B as F,N as G,Qt as H,Jt as I,m as J,$ as K,Kt as L,E as M,O as N,at as O,se as P,le as Q,Lt as R,Yt as S,Ht as T,Ct as U,ot as V,z as W,G as X,S as Y,nt as Z,st as _,J as a,q as a0,X as a1,Ft as a2,b as a3,R as a4,et as a5,C as a6,he as a7,ae as a8,oe as a9,_ as aa,ce as ab,it as ac,rt as ad,mt as ae,ne as af,re as ag,$t as ah,gt as ai,yt as aj,St as ak,tt as al,wt as am,At as an,Et as ao,te as ap,ee as b,M as c,dt as d,Bt as e,H as f,qt as g,p as h,A as i,K as j,Gt as k,L as l,P as m,T as n,ie as o,ue as p,I as q,F as r,w as s,Pt as t,Zt as u,Vt as v,Xt as w,Ut as x,Wt as y,zt as z}
|