@heartlandone/vega 2.88.0 → 2.90.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.
Files changed (562) hide show
  1. package/dist/cjs/{action-color-accessibility-validator-15fa91e4.js → action-color-accessibility-validator-24498816.js} +2 -2
  2. package/dist/cjs/{app-globals-6fbbcb2f.js → app-globals-08924736.js} +11 -8
  3. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-c2ca46db.js → aria-dialog-focusable-trap-slimmer-a0ff1263.js} +2 -2
  4. package/dist/cjs/{brand-switch-state-controller-slimmer-3d41b2a4.js → brand-switch-state-controller-slimmer-97882447.js} +1 -1
  5. package/dist/cjs/{child-nodes-event-prevent-slimmer-01930b4e.js → child-nodes-event-prevent-slimmer-85a7fdb0.js} +1 -1
  6. package/dist/cjs/{child-nodes-notify-observer-slimmer-34a606b3.js → child-nodes-notify-observer-slimmer-7ae2a78f.js} +1 -1
  7. package/dist/cjs/{code-block-00fee034.js → code-block-89850671.js} +4 -4
  8. package/dist/cjs/{component-value-history-controller-slimmer.abstract-066645b3.js → component-value-history-controller-slimmer.abstract-a8da4087.js} +5 -5
  9. package/dist/cjs/{content-state-d4f54659.js → content-state-e1c3efe6.js} +32 -7
  10. package/dist/cjs/{dark-mode-state-controller-slimmer-8a87ec08.js → dark-mode-state-controller-slimmer-b454645a.js} +1 -1
  11. package/dist/cjs/{dark-mode-style-controller-ed481250.js → dark-mode-style-controller-32d4054a.js} +2 -2
  12. package/dist/cjs/{date-required-rule-4cea8fc8.js → date-required-rule-3437acbc.js} +1 -1
  13. package/dist/cjs/{design-token-ad9f413c.js → design-token-939bf72c.js} +3 -3
  14. package/dist/cjs/{dom-node-subject-observer-factory-ba6a95f3.js → dom-node-subject-observer-factory-c82df135.js} +1 -1
  15. package/dist/cjs/{element-appender-slimmer-d04aa177.js → element-appender-slimmer-14e85a91.js} +5 -5
  16. package/dist/cjs/{event-emit-slimmer-5fd6e54a.js → event-emit-slimmer-146316b2.js} +2 -2
  17. package/dist/cjs/{form-field-controller-slimmer-23d112bd.js → form-field-controller-slimmer-c4ebee27.js} +5 -5
  18. package/dist/cjs/{image-annotation-action-bcf2a1b4.js → image-annotation-action-f86690fd.js} +29 -5
  19. package/dist/cjs/index.cjs.js +26 -25
  20. package/dist/cjs/{inject-keyboard-manager-acaf1530.js → inject-keyboard-manager-743de047.js} +1 -1
  21. package/dist/cjs/{internal-translation-controller-a1250419.js → internal-translation-controller-9785d4e8.js} +9 -2
  22. package/dist/cjs/{internal-vega-event-manager-c515cf5e.js → internal-vega-event-manager-6e49d1ca.js} +3 -3
  23. package/dist/cjs/{keyboard-manager-6821709a.js → keyboard-manager-5396083a.js} +2 -2
  24. package/dist/cjs/{keyboard-manager-slimmer-74528545.js → keyboard-manager-slimmer-eedcfbc8.js} +1 -1
  25. package/dist/cjs/link-extension-dafeeed0.js +583 -0
  26. package/dist/cjs/loader.cjs.js +17 -18
  27. package/dist/cjs/{month-view-generator-61578283.js → month-view-generator-c7492e06.js} +1 -1
  28. package/dist/cjs/{public-rules-d2fbbbf5.js → public-rules-b032050f.js} +11 -11
  29. package/dist/cjs/{range-e797475c.js → range-efdf6f78.js} +2 -2
  30. package/dist/cjs/{replace-selected-text-action-a098523f.js → replace-selected-text-action-0f7b7c78.js} +1 -1
  31. package/dist/cjs/{responsive-format-facade-bf330592.js → responsive-format-facade-d112aa9f.js} +1 -1
  32. package/dist/cjs/{rich-text-editor-required-rule-ba9d42fa.js → rich-text-editor-required-rule-86d9cd4d.js} +1 -1
  33. package/dist/cjs/{split-cell-operation-91ee6894.js → split-cell-operation-b41344bd.js} +5 -5
  34. package/dist/cjs/{state-border-formatter-fd194e53.js → state-border-formatter-c3c9b90d.js} +1 -1
  35. package/dist/cjs/{static-subject-title-5829a298.js → static-subject-title-70c73b16.js} +2 -0
  36. package/dist/cjs/{string-format-strategy.abstract-af9fc35e.js → string-format-strategy.abstract-d51050cd.js} +1 -1
  37. package/dist/cjs/{string-input-formatter-slimmer-a3fb1292.js → string-input-formatter-slimmer-23fdb50e.js} +3 -3
  38. package/dist/cjs/{string-mask-strategy-2054f3fb.js → string-mask-strategy-10fe0f6d.js} +2 -2
  39. package/dist/cjs/{style-formatter-7d60fb70.js → style-formatter-11c95331.js} +2 -2
  40. package/dist/cjs/{sub-state-notify-slimmer-757e3a76.js → sub-state-notify-slimmer-450277b6.js} +1 -1
  41. package/dist/cjs/{sub-state-observer-slimmer-aa93ab4f.js → sub-state-observer-slimmer-5bfe8e97.js} +2 -2
  42. package/dist/cjs/{time-required-rule-ba450bbd.js → time-required-rule-2fd7c828.js} +1 -1
  43. package/dist/cjs/{token-extension-8b69f7e1.js → token-extension-2e3e1631.js} +637 -497
  44. package/dist/cjs/{translation-slimmer-aee3fb1c.js → translation-slimmer-e8549aff.js} +17 -1
  45. package/dist/cjs/{type-guard-424efe26.js → type-guard-9917b11f.js} +1 -1
  46. package/dist/cjs/{ui-3727d685.js → ui-c91c37a7.js} +1 -31
  47. package/dist/cjs/{valid-credit-card-number-rule-6bd5834c.js → valid-credit-card-number-rule-8c541bcd.js} +1 -1
  48. package/dist/cjs/vega-accordion.cjs.entry.js +12 -12
  49. package/dist/cjs/vega-app-footer.cjs.entry.js +3 -3
  50. package/dist/cjs/vega-app-header-button.cjs.entry.js +15 -15
  51. package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
  52. package/dist/cjs/vega-banner.cjs.entry.js +5 -5
  53. package/dist/cjs/vega-box.cjs.entry.js +8 -8
  54. package/dist/cjs/vega-brand-logo.cjs.entry.js +3 -3
  55. package/dist/cjs/vega-breadcrumb.cjs.entry.js +7 -7
  56. package/dist/cjs/vega-button-circle.cjs.entry.js +12 -12
  57. package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -8
  58. package/dist/cjs/vega-button-link.cjs.entry.js +8 -8
  59. package/dist/cjs/vega-button.cjs.entry.js +10 -10
  60. package/dist/cjs/vega-calendar_4.cjs.entry.js +15 -15
  61. package/dist/cjs/vega-card.cjs.entry.js +7 -7
  62. package/dist/cjs/vega-carousel.cjs.entry.js +9 -9
  63. package/dist/cjs/vega-checkbox_2.cjs.entry.js +159 -23
  64. package/dist/cjs/vega-chip.cjs.entry.js +14 -14
  65. package/dist/cjs/vega-code-block.cjs.entry.js +16 -16
  66. package/dist/cjs/vega-color-picker.cjs.entry.js +21 -11
  67. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +11 -11
  68. package/dist/cjs/vega-color-swatch.cjs.entry.js +8 -8
  69. package/dist/cjs/vega-combo-box.cjs.entry.js +42 -20
  70. package/dist/cjs/vega-date-picker_2.cjs.entry.js +37 -24
  71. package/dist/cjs/vega-dialog_2.cjs.entry.js +11 -11
  72. package/dist/cjs/vega-divider.cjs.entry.js +6 -6
  73. package/dist/cjs/vega-dropdown_5.cjs.entry.js +18 -18
  74. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  75. package/dist/cjs/{vega-event-id-39dedd17.js → vega-event-id-37c1716f.js} +2 -0
  76. package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
  77. package/dist/cjs/vega-field-label.cjs.entry.js +86 -14
  78. package/dist/cjs/vega-file-uploader.cjs.entry.js +10 -10
  79. package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -6
  80. package/dist/cjs/vega-flex.cjs.entry.js +8 -8
  81. package/dist/cjs/vega-font.cjs.entry.js +7 -7
  82. package/dist/cjs/vega-form.cjs.entry.js +13 -13
  83. package/dist/cjs/vega-grid.cjs.entry.js +7 -7
  84. package/dist/cjs/vega-icon.cjs.entry.js +7 -7
  85. package/dist/cjs/vega-image-uploader.cjs.entry.js +29 -16
  86. package/dist/cjs/vega-input-credit-card.cjs.entry.js +25 -15
  87. package/dist/cjs/vega-input-numeric.cjs.entry.js +28 -15
  88. package/dist/cjs/vega-input-passcode.cjs.entry.js +13 -13
  89. package/dist/cjs/vega-input-phone-number.cjs.entry.js +12 -12
  90. package/dist/cjs/vega-input-range.cjs.entry.js +25 -12
  91. package/dist/cjs/vega-input-select.cjs.entry.js +34 -21
  92. package/dist/cjs/vega-input.cjs.entry.js +14 -14
  93. package/dist/cjs/vega-item-toggle.cjs.entry.js +5 -5
  94. package/dist/cjs/vega-left-nav_5.cjs.entry.js +17 -17
  95. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +5 -5
  96. package/dist/cjs/vega-page-notification_2.cjs.entry.js +3 -3
  97. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
  98. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +6 -6
  99. package/dist/cjs/vega-pagination.cjs.entry.js +11 -11
  100. package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
  101. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +11 -11
  102. package/dist/cjs/vega-radio_2.cjs.entry.js +26 -19
  103. package/dist/cjs/vega-rich-text-content.cjs.entry.js +71 -39
  104. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +78 -35
  105. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +11 -11
  106. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +16 -16
  107. package/dist/cjs/vega-segment-control.cjs.entry.js +6 -6
  108. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +27 -14
  109. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +32 -34
  110. package/dist/cjs/vega-sidenav_3.cjs.entry.js +11 -11
  111. package/dist/cjs/vega-signature-capture.cjs.entry.js +28 -15
  112. package/dist/cjs/vega-stepper.cjs.entry.js +10 -10
  113. package/dist/cjs/vega-tab-group_2.cjs.entry.js +15 -12
  114. package/dist/cjs/vega-table_11.cjs.entry.js +13 -13
  115. package/dist/cjs/vega-text.cjs.entry.js +177 -63
  116. package/dist/cjs/vega-textarea.cjs.entry.js +11 -11
  117. package/dist/cjs/vega-time-picker_2.cjs.entry.js +31 -18
  118. package/dist/cjs/vega-toggle-switch.cjs.entry.js +20 -10
  119. package/dist/cjs/vega-tooltip_2.cjs.entry.js +9 -9
  120. package/dist/cjs/vega.cjs.js +17 -18
  121. package/dist/cjs/{wait-for-component-did-render-a13f7eb9.js → wait-for-component-did-render-762084fc.js} +1 -1
  122. package/dist/collection/components/vega-app-header-button/vega-app-header-button.css +1 -0
  123. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +2 -2
  124. package/dist/collection/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-collapsed-item-renderer.js +1 -1
  125. package/dist/collection/components/vega-button-link/vega-button-link.css +3 -0
  126. package/dist/collection/components/vega-button-link/vega-button-link.js +1 -1
  127. package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.css +8 -11
  128. package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +131 -11
  129. package/dist/collection/components/vega-checkbox/vega-checkbox.js +148 -6
  130. package/dist/collection/components/vega-chip/vega-chip.css +1 -0
  131. package/dist/collection/components/vega-chip/vega-chip.js +1 -1
  132. package/dist/collection/components/vega-color-picker/vega-color-picker.js +36 -2
  133. package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +14 -2
  134. package/dist/collection/components/vega-combo-box/vega-combo-box.css +12 -0
  135. package/dist/collection/components/vega-combo-box/vega-combo-box.js +44 -1
  136. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.js +4 -1
  137. package/dist/collection/components/vega-date-picker/vega-date-picker.js +34 -0
  138. package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-label-announcement-renderer.js +69 -0
  139. package/dist/collection/components/vega-field-label/vega-field-label.css +12 -0
  140. package/dist/collection/components/vega-field-label/vega-field-label.js +12 -3
  141. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-renderer.js +4 -1
  142. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +34 -0
  143. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +35 -1
  144. package/dist/collection/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.js +4 -1
  145. package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +34 -0
  146. package/dist/collection/components/vega-input-range/slimmers/renderers/vega-input-range-renderer.js +4 -1
  147. package/dist/collection/components/vega-input-range/vega-input-range.js +34 -0
  148. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +6 -6
  149. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.js +4 -1
  150. package/dist/collection/components/vega-input-select/vega-input-select.css +1 -0
  151. package/dist/collection/components/vega-input-select/vega-input-select.js +34 -0
  152. package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.css +8 -11
  153. package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.js +35 -7
  154. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.js +36 -1
  155. package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +15 -12
  156. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +11 -0
  157. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +1 -1
  158. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/horizontal-line-block-insert-strategy.js +79 -0
  159. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/hr-to-horizontal-line-block-strategy.js +45 -0
  160. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/actions/insert-horizontal-line-block-action.js +14 -0
  161. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/assets/horizontal-line.js +3 -0
  162. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-annotation.js +63 -0
  163. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-block.js +89 -0
  164. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-node.js +32 -0
  165. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/horizontal-line-filter-styles-strategy.js +45 -0
  166. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/predicate.js +14 -0
  167. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.js +41 -0
  168. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-block-renderer.js +37 -0
  169. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-toolbar-button-renderer.js +77 -0
  170. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.js +30 -16
  171. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-toolbar-button-renderer.js +1 -1
  172. package/dist/collection/components/vega-rich-text-editor/extensions/link/link-extension.js +34 -0
  173. package/dist/collection/components/vega-rich-text-editor/extensions/link/type.js +1 -0
  174. package/dist/collection/components/vega-rich-text-editor/extensions/link/utils.js +22 -0
  175. package/dist/collection/components/vega-rich-text-editor/extensions/rte-extension-state-store.js +37 -0
  176. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-toolbar-button-renderer.js +1 -1
  177. package/dist/collection/components/vega-rich-text-editor/public-api.js +2 -0
  178. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/html-block-strategy.js +8 -0
  179. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-element-to-text-node-strategy.js +18 -1
  180. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.js +5 -3
  181. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +1 -1
  182. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +39 -1
  183. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +13 -4
  184. package/dist/collection/components/vega-segment-control/slimmers/renderers/vega-segment-renderer.js +1 -1
  185. package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/slimmers/renderers/vega-selection-chip-group-renderer.js +4 -1
  186. package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.js +34 -0
  187. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.js +9 -21
  188. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.css +1 -38
  189. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.js +34 -0
  190. package/dist/collection/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.js +4 -1
  191. package/dist/collection/components/vega-signature-capture/vega-signature-capture.js +34 -0
  192. package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-pages-controller.js +4 -2
  193. package/dist/collection/components/vega-tab-group/vega-tab-group.js +5 -4
  194. package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +153 -61
  195. package/dist/collection/components/vega-text/vega-text.css +37 -0
  196. package/dist/collection/components/vega-text/vega-text.js +48 -0
  197. package/dist/collection/components/vega-textarea/vega-textarea.js +1 -1
  198. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-label-renderer.js +4 -1
  199. package/dist/collection/components/vega-time-picker/vega-time-picker.js +34 -0
  200. package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +35 -1
  201. package/dist/collection/constants/ui.js +1 -0
  202. package/dist/collection/global/scripts/before-vega-load.js +4 -0
  203. package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js +1 -0
  204. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -3
  205. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
  206. package/dist/collection/helpers/slimmers/translation/translation-slimmer.js +16 -0
  207. package/dist/collection/helpers/translation/locales/en.js +8 -1
  208. package/dist/esm/{action-color-accessibility-validator-3d8efb64.js → action-color-accessibility-validator-ce55cb07.js} +2 -2
  209. package/dist/esm/{app-globals-98c3d676.js → app-globals-a4134d21.js} +11 -8
  210. package/dist/esm/{aria-dialog-focusable-trap-slimmer-7d9a9f5a.js → aria-dialog-focusable-trap-slimmer-7db3d5a7.js} +2 -2
  211. package/dist/esm/{brand-switch-state-controller-slimmer-60249013.js → brand-switch-state-controller-slimmer-9ca03c81.js} +1 -1
  212. package/dist/esm/{child-nodes-event-prevent-slimmer-2f823df2.js → child-nodes-event-prevent-slimmer-1e3ac106.js} +1 -1
  213. package/dist/esm/{child-nodes-notify-observer-slimmer-8822d0d0.js → child-nodes-notify-observer-slimmer-499a3aa7.js} +1 -1
  214. package/dist/esm/{code-block-6261a99d.js → code-block-9a17d89b.js} +5 -5
  215. package/dist/esm/{component-value-history-controller-slimmer.abstract-07488472.js → component-value-history-controller-slimmer.abstract-a64c3678.js} +5 -5
  216. package/dist/esm/{content-state-9bf85e00.js → content-state-d59b4560.js} +33 -8
  217. package/dist/esm/{dark-mode-state-controller-slimmer-f2b4f8ed.js → dark-mode-state-controller-slimmer-778dd929.js} +1 -1
  218. package/dist/esm/{dark-mode-style-controller-fcda24ec.js → dark-mode-style-controller-ca5afd2d.js} +2 -2
  219. package/dist/esm/{date-required-rule-281aab50.js → date-required-rule-cb960229.js} +1 -1
  220. package/dist/esm/{design-token-b7ce7ed4.js → design-token-f73ebce9.js} +3 -3
  221. package/dist/esm/{dom-node-subject-observer-factory-3897e95b.js → dom-node-subject-observer-factory-ddff8662.js} +1 -1
  222. package/dist/esm/{element-appender-slimmer-3926470f.js → element-appender-slimmer-c62cf540.js} +5 -5
  223. package/dist/esm/{event-emit-slimmer-0990037c.js → event-emit-slimmer-3eb4d8ad.js} +2 -2
  224. package/dist/esm/{form-field-controller-slimmer-24aca6c4.js → form-field-controller-slimmer-514a3195.js} +5 -5
  225. package/dist/esm/{image-annotation-action-dadda36f.js → image-annotation-action-f4ea265c.js} +29 -6
  226. package/dist/esm/index.js +22 -23
  227. package/dist/esm/{inject-keyboard-manager-6317d1b3.js → inject-keyboard-manager-6522df5c.js} +1 -1
  228. package/dist/esm/{internal-translation-controller-0b9589d0.js → internal-translation-controller-653bd7e3.js} +9 -2
  229. package/dist/esm/{internal-vega-event-manager-dc4c3a37.js → internal-vega-event-manager-a9758b6e.js} +3 -3
  230. package/dist/esm/{keyboard-manager-69761aa6.js → keyboard-manager-9615fa9b.js} +2 -2
  231. package/dist/esm/{keyboard-manager-slimmer-c2d038f0.js → keyboard-manager-slimmer-21bdc3a4.js} +1 -1
  232. package/dist/esm/link-extension-be164793.js +576 -0
  233. package/dist/esm/loader.js +17 -18
  234. package/dist/esm/{month-view-generator-4c1ee949.js → month-view-generator-1b7c9bb8.js} +1 -1
  235. package/dist/esm/{public-rules-da28b413.js → public-rules-58f31834.js} +11 -11
  236. package/dist/esm/{range-342cbce9.js → range-1c1c20fa.js} +2 -2
  237. package/dist/esm/{replace-selected-text-action-a45bee4b.js → replace-selected-text-action-1abc5200.js} +1 -1
  238. package/dist/esm/{responsive-format-facade-3ca1422d.js → responsive-format-facade-12697af2.js} +1 -1
  239. package/dist/esm/{rich-text-editor-required-rule-46d0bc5b.js → rich-text-editor-required-rule-050d292b.js} +1 -1
  240. package/dist/esm/{split-cell-operation-1d114aa3.js → split-cell-operation-8251d2a1.js} +5 -5
  241. package/dist/esm/{state-border-formatter-3ebc76a4.js → state-border-formatter-55cee24d.js} +1 -1
  242. package/dist/esm/{static-subject-title-52f93124.js → static-subject-title-1c86e974.js} +2 -1
  243. package/dist/esm/{string-format-strategy.abstract-95d691e1.js → string-format-strategy.abstract-14c1e874.js} +1 -1
  244. package/dist/esm/{string-input-formatter-slimmer-e18d202c.js → string-input-formatter-slimmer-ec297247.js} +3 -3
  245. package/dist/esm/{string-mask-strategy-43d846ac.js → string-mask-strategy-18760123.js} +2 -2
  246. package/dist/esm/{style-formatter-197e2fd3.js → style-formatter-6073ae27.js} +2 -2
  247. package/dist/esm/{sub-state-notify-slimmer-80ac7dee.js → sub-state-notify-slimmer-d5a21bb3.js} +1 -1
  248. package/dist/esm/{sub-state-observer-slimmer-81538a8c.js → sub-state-observer-slimmer-d924288a.js} +2 -2
  249. package/dist/esm/{time-required-rule-78d8ecf1.js → time-required-rule-9b775d24.js} +1 -1
  250. package/dist/esm/{token-extension-30011dc4.js → token-extension-6cb7dcb2.js} +576 -435
  251. package/dist/esm/{translation-slimmer-49903fc8.js → translation-slimmer-d32eb861.js} +17 -1
  252. package/dist/esm/{type-guard-b18807dc.js → type-guard-fd1f4760.js} +1 -1
  253. package/dist/esm/{ui-64815a12.js → ui-d73f756a.js} +2 -30
  254. package/dist/esm/{valid-credit-card-number-rule-fe1c8a9c.js → valid-credit-card-number-rule-dfd3e0a6.js} +1 -1
  255. package/dist/esm/vega-accordion.entry.js +12 -12
  256. package/dist/esm/vega-app-footer.entry.js +3 -3
  257. package/dist/esm/vega-app-header-button.entry.js +15 -15
  258. package/dist/esm/vega-backdrop.entry.js +1 -1
  259. package/dist/esm/vega-banner.entry.js +5 -5
  260. package/dist/esm/vega-box.entry.js +8 -8
  261. package/dist/esm/vega-brand-logo.entry.js +3 -3
  262. package/dist/esm/vega-breadcrumb.entry.js +7 -7
  263. package/dist/esm/vega-button-circle.entry.js +12 -12
  264. package/dist/esm/vega-button-group_2.entry.js +8 -8
  265. package/dist/esm/vega-button-link.entry.js +8 -8
  266. package/dist/esm/vega-button.entry.js +10 -10
  267. package/dist/esm/vega-calendar_4.entry.js +15 -15
  268. package/dist/esm/vega-card.entry.js +7 -7
  269. package/dist/esm/vega-carousel.entry.js +9 -9
  270. package/dist/esm/vega-checkbox_2.entry.js +159 -23
  271. package/dist/esm/vega-chip.entry.js +14 -14
  272. package/dist/esm/vega-code-block.entry.js +16 -16
  273. package/dist/esm/vega-color-picker.entry.js +21 -11
  274. package/dist/esm/vega-color-swatch-picker.entry.js +11 -11
  275. package/dist/esm/vega-color-swatch.entry.js +8 -8
  276. package/dist/esm/vega-combo-box.entry.js +42 -20
  277. package/dist/esm/vega-date-picker_2.entry.js +37 -24
  278. package/dist/esm/vega-dialog_2.entry.js +11 -11
  279. package/dist/esm/vega-divider.entry.js +6 -6
  280. package/dist/esm/vega-dropdown_5.entry.js +18 -18
  281. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  282. package/dist/esm/{vega-event-id-20494454.js → vega-event-id-92848bf5.js} +2 -1
  283. package/dist/esm/vega-field-error.entry.js +1 -1
  284. package/dist/esm/vega-field-label.entry.js +86 -14
  285. package/dist/esm/vega-file-uploader.entry.js +10 -10
  286. package/dist/esm/vega-flag-icon.entry.js +6 -6
  287. package/dist/esm/vega-flex.entry.js +8 -8
  288. package/dist/esm/vega-font.entry.js +7 -7
  289. package/dist/esm/vega-form.entry.js +13 -13
  290. package/dist/esm/vega-grid.entry.js +7 -7
  291. package/dist/esm/vega-icon.entry.js +7 -7
  292. package/dist/esm/vega-image-uploader.entry.js +29 -16
  293. package/dist/esm/vega-input-credit-card.entry.js +25 -15
  294. package/dist/esm/vega-input-numeric.entry.js +28 -15
  295. package/dist/esm/vega-input-passcode.entry.js +13 -13
  296. package/dist/esm/vega-input-phone-number.entry.js +12 -12
  297. package/dist/esm/vega-input-range.entry.js +25 -12
  298. package/dist/esm/vega-input-select.entry.js +34 -21
  299. package/dist/esm/vega-input.entry.js +14 -14
  300. package/dist/esm/vega-item-toggle.entry.js +5 -5
  301. package/dist/esm/vega-left-nav_5.entry.js +17 -17
  302. package/dist/esm/vega-loader-wrapper_2.entry.js +5 -5
  303. package/dist/esm/vega-page-notification_2.entry.js +3 -3
  304. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
  305. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +6 -6
  306. package/dist/esm/vega-pagination.entry.js +11 -11
  307. package/dist/esm/vega-popover_2.entry.js +15 -15
  308. package/dist/esm/vega-progress-tracker_2.entry.js +11 -11
  309. package/dist/esm/vega-radio_2.entry.js +26 -19
  310. package/dist/esm/vega-rich-text-content.entry.js +48 -16
  311. package/dist/esm/vega-rich-text-editor_4.entry.js +77 -34
  312. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +11 -11
  313. package/dist/esm/vega-rich-text-table-properties_3.entry.js +16 -16
  314. package/dist/esm/vega-segment-control.entry.js +6 -6
  315. package/dist/esm/vega-selection-chip_2.entry.js +27 -14
  316. package/dist/esm/vega-selection-tile_2.entry.js +32 -34
  317. package/dist/esm/vega-sidenav_3.entry.js +11 -11
  318. package/dist/esm/vega-signature-capture.entry.js +28 -15
  319. package/dist/esm/vega-stepper.entry.js +10 -10
  320. package/dist/esm/vega-tab-group_2.entry.js +15 -12
  321. package/dist/esm/vega-table_11.entry.js +13 -13
  322. package/dist/esm/vega-text.entry.js +177 -63
  323. package/dist/esm/vega-textarea.entry.js +11 -11
  324. package/dist/esm/vega-time-picker_2.entry.js +31 -18
  325. package/dist/esm/vega-toggle-switch.entry.js +20 -10
  326. package/dist/esm/vega-tooltip_2.entry.js +9 -9
  327. package/dist/esm/vega.js +17 -18
  328. package/dist/esm/{wait-for-component-did-render-4069cbea.js → wait-for-component-did-render-b378bf16.js} +1 -1
  329. package/dist/sri/vega-sri-manifest.json +404 -408
  330. package/dist/types/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.d.ts +51 -2
  331. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +60 -0
  332. package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +10 -0
  333. package/dist/types/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.d.ts +1 -0
  334. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +21 -0
  335. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.d.ts +1 -0
  336. package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +10 -0
  337. package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-label-announcement-renderer.d.ts +21 -0
  338. package/dist/types/components/vega-field-label/vega-field-label.d.ts +2 -0
  339. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-renderer.d.ts +1 -0
  340. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +10 -0
  341. package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +10 -0
  342. package/dist/types/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.d.ts +1 -0
  343. package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +10 -0
  344. package/dist/types/components/vega-input-range/slimmers/renderers/vega-input-range-renderer.d.ts +1 -0
  345. package/dist/types/components/vega-input-range/vega-input-range.d.ts +10 -0
  346. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.d.ts +1 -0
  347. package/dist/types/components/vega-input-select/vega-input-select.d.ts +10 -0
  348. package/dist/types/components/vega-radio/vega-radio-group/vega-radio-group.d.ts +10 -1
  349. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.d.ts +3 -1
  350. package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +8 -5
  351. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +9 -0
  352. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/horizontal-line-block-insert-strategy.d.ts +29 -0
  353. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/hr-to-horizontal-line-block-strategy.d.ts +35 -0
  354. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/actions/insert-horizontal-line-block-action.d.ts +15 -0
  355. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/assets/horizontal-line.d.ts +3 -0
  356. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-annotation.d.ts +43 -0
  357. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-block.d.ts +53 -0
  358. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-node.d.ts +26 -0
  359. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/horizontal-line-filter-styles-strategy.d.ts +31 -0
  360. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/predicate.d.ts +12 -0
  361. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.d.ts +9 -0
  362. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-block-renderer.d.ts +16 -0
  363. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-toolbar-button-renderer.d.ts +27 -0
  364. package/dist/types/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.d.ts +16 -12
  365. package/dist/types/components/vega-rich-text-editor/extensions/link/link-extension.d.ts +27 -0
  366. package/dist/types/components/vega-rich-text-editor/extensions/link/type.d.ts +15 -0
  367. package/dist/types/components/vega-rich-text-editor/extensions/link/utils.d.ts +8 -0
  368. package/dist/types/components/vega-rich-text-editor/extensions/rte-extension-state-store.d.ts +30 -0
  369. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +3 -0
  370. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.d.ts +1 -1
  371. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +22 -0
  372. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.d.ts +1 -0
  373. package/dist/types/components/vega-selection-chip/vega-selection-chip-group/slimmers/renderers/vega-selection-chip-group-renderer.d.ts +1 -0
  374. package/dist/types/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.d.ts +10 -0
  375. package/dist/types/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.d.ts +2 -1
  376. package/dist/types/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.d.ts +10 -0
  377. package/dist/types/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.d.ts +1 -0
  378. package/dist/types/components/vega-signature-capture/vega-signature-capture.d.ts +10 -0
  379. package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-pages-controller.d.ts +3 -2
  380. package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +4 -3
  381. package/dist/types/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.d.ts +34 -12
  382. package/dist/types/components/vega-text/vega-text.d.ts +19 -0
  383. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-label-renderer.d.ts +1 -0
  384. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +10 -0
  385. package/dist/types/components/vega-toggle-switch/vega-toggle-switch.d.ts +10 -0
  386. package/dist/types/components.d.ts +222 -2
  387. package/dist/types/constants/ui.d.ts +1 -1
  388. package/dist/types/helpers/change-manager/subject/static-subject/static-subject-title.d.ts +2 -1
  389. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
  390. package/dist/types/helpers/slimmers/translation/translation-slimmer.d.ts +11 -0
  391. package/dist/types/helpers/translation/interface.d.ts +8 -1
  392. package/dist/vega/index.esm.js +1 -1
  393. package/dist/vega/{p-d24892d6.entry.js → p-00d2a013.entry.js} +1 -1
  394. package/dist/vega/{p-77fb5d5c.js → p-014cd411.js} +1 -1
  395. package/dist/vega/p-02492864.entry.js +1 -0
  396. package/dist/vega/{p-5c1a4fd7.entry.js → p-0278cd2b.entry.js} +1 -1
  397. package/dist/vega/{p-6bd37d32.js → p-0542b8ac.js} +1 -1
  398. package/dist/vega/p-0a1c7f80.js +1 -0
  399. package/dist/vega/p-0cc4a052.entry.js +1 -0
  400. package/dist/vega/{p-9e0f8b46.entry.js → p-0e298ee8.entry.js} +1 -1
  401. package/dist/vega/p-1827a459.entry.js +1 -0
  402. package/dist/vega/{p-03b32939.entry.js → p-1b4abd76.entry.js} +1 -1
  403. package/dist/vega/{p-4914a5f8.entry.js → p-1d16a7fa.entry.js} +1 -1
  404. package/dist/vega/{p-e5726df7.entry.js → p-1ee185d9.entry.js} +1 -1
  405. package/dist/vega/{p-ce8a0aa6.entry.js → p-203f4ce9.entry.js} +1 -1
  406. package/dist/vega/p-2620a164.js +1 -0
  407. package/dist/vega/{p-416e89b0.entry.js → p-2649051e.entry.js} +1 -1
  408. package/dist/vega/{p-c93dfe23.js → p-277c306b.js} +1 -1
  409. package/dist/vega/{p-c0c13993.entry.js → p-285e5e52.entry.js} +1 -1
  410. package/dist/vega/p-2c7e1bcb.js +1 -0
  411. package/dist/vega/{p-36e46c4f.js → p-30487f0e.js} +1 -1
  412. package/dist/vega/p-306720b8.entry.js +1 -0
  413. package/dist/vega/p-30a6b7aa.entry.js +1 -0
  414. package/dist/vega/{p-7292ac20.js → p-328dbe8e.js} +1 -1
  415. package/dist/vega/p-350d1b75.entry.js +1 -0
  416. package/dist/vega/{p-b5d00d38.entry.js → p-355ea330.entry.js} +1 -1
  417. package/dist/vega/{p-3312e3dd.js → p-35d617d5.js} +1 -1
  418. package/dist/vega/p-3755d8d3.entry.js +1 -0
  419. package/dist/vega/{p-b565a6a5.js → p-3e09aeed.js} +1 -1
  420. package/dist/vega/{p-92710213.entry.js → p-3e956269.entry.js} +1 -1
  421. package/dist/vega/{p-cacec680.js → p-3ed6a602.js} +1 -1
  422. package/dist/vega/{p-d2237b95.entry.js → p-4386625c.entry.js} +1 -1
  423. package/dist/vega/{p-0d3830f1.js → p-44f39eee.js} +1 -1
  424. package/dist/vega/{p-b72d7b57.entry.js → p-44f81987.entry.js} +1 -1
  425. package/dist/vega/{p-b3e97e2f.entry.js → p-456890f5.entry.js} +1 -1
  426. package/dist/vega/p-465590d1.entry.js +1 -0
  427. package/dist/vega/{p-a53e1a60.entry.js → p-4694fe27.entry.js} +1 -1
  428. package/dist/vega/p-46cab60a.js +1 -0
  429. package/dist/vega/{p-341d5e4e.js → p-46e0c6ca.js} +1 -1
  430. package/dist/vega/p-47ffdc0f.entry.js +1 -0
  431. package/dist/vega/p-4edd7f8c.js +1 -0
  432. package/dist/vega/p-4fdd0a71.js +1 -0
  433. package/dist/vega/{p-11e2dcf5.js → p-526e3634.js} +1 -1
  434. package/dist/vega/p-528748fa.js +1 -0
  435. package/dist/vega/p-54141828.entry.js +1 -0
  436. package/dist/vega/{p-e7fb7eee.js → p-566ba295.js} +1 -1
  437. package/dist/vega/{p-01f617ee.entry.js → p-581d89bb.entry.js} +1 -1
  438. package/dist/vega/{p-4f53b45d.entry.js → p-5a6e2c08.entry.js} +1 -1
  439. package/dist/vega/p-5f048811.entry.js +1 -0
  440. package/dist/vega/p-5f377954.js +1 -1
  441. package/dist/vega/p-600f0316.entry.js +1 -0
  442. package/dist/vega/p-616d7096.entry.js +1 -0
  443. package/dist/vega/{p-df4f9264.entry.js → p-6528739f.entry.js} +1 -1
  444. package/dist/vega/{p-d1641644.entry.js → p-667c980d.entry.js} +1 -1
  445. package/dist/vega/{p-b519b9ab.entry.js → p-6845ed5c.entry.js} +1 -1
  446. package/dist/vega/p-6cedb325.js +1 -0
  447. package/dist/vega/{p-b7f30f68.entry.js → p-6d99a0b3.entry.js} +1 -1
  448. package/dist/vega/{p-18d1d404.entry.js → p-6fec4d46.entry.js} +1 -1
  449. package/dist/vega/p-716a393e.entry.js +1 -0
  450. package/dist/vega/p-73ce8fef.js +1 -0
  451. package/dist/vega/p-788a7a5a.js +1 -0
  452. package/dist/vega/{p-1385da31.entry.js → p-7fe292af.entry.js} +1 -1
  453. package/dist/vega/{p-788ada42.js → p-820ff54c.js} +1 -1
  454. package/dist/vega/{p-a73d8915.entry.js → p-8258dc37.entry.js} +1 -1
  455. package/dist/vega/p-82c133aa.js +1 -0
  456. package/dist/vega/{p-0b2ca33b.js → p-844b7826.js} +1 -1
  457. package/dist/vega/{p-0d248322.entry.js → p-850ea38b.entry.js} +1 -1
  458. package/dist/vega/p-85dcd07b.js +3 -0
  459. package/dist/vega/{p-92468c30.entry.js → p-8666f206.entry.js} +1 -1
  460. package/dist/vega/{p-518e0a24.js → p-881622fd.js} +1 -1
  461. package/dist/vega/p-88c29aae.entry.js +1 -0
  462. package/dist/vega/p-8a054a13.js +1 -0
  463. package/dist/vega/{p-ea48decc.js → p-8a34c08a.js} +1 -1
  464. package/dist/vega/{p-ecbead18.entry.js → p-8d9c4338.entry.js} +1 -1
  465. package/dist/vega/p-92e493ea.entry.js +1 -0
  466. package/dist/vega/{p-a87bc75a.entry.js → p-939c486f.entry.js} +1 -1
  467. package/dist/vega/{p-3d6568cc.js → p-97e7da55.js} +1 -1
  468. package/dist/vega/{p-a36d4199.entry.js → p-99545fd7.entry.js} +1 -1
  469. package/dist/vega/p-99ea0fa0.entry.js +1 -0
  470. package/dist/vega/{p-3967fa98.entry.js → p-a05a2f1e.entry.js} +1 -1
  471. package/dist/vega/{p-10fa27d2.js → p-a58cacca.js} +1 -1
  472. package/dist/vega/{p-81d55efd.js → p-a809b33a.js} +1 -1
  473. package/dist/vega/{p-a0fa5ccc.entry.js → p-a9a70696.entry.js} +1 -1
  474. package/dist/vega/{p-b0fb5099.entry.js → p-aae71499.entry.js} +1 -1
  475. package/dist/vega/{p-f7ad9349.js → p-b0f55f5f.js} +1 -1
  476. package/dist/vega/{p-7cd2b93b.js → p-b3420fcf.js} +1 -1
  477. package/dist/vega/p-b5c08306.entry.js +1 -0
  478. package/dist/vega/{p-abfe46ca.js → p-b7c90543.js} +1 -1
  479. package/dist/vega/{p-b31802b3.entry.js → p-bcd3bd79.entry.js} +1 -1
  480. package/dist/vega/p-bce9f489.entry.js +1 -0
  481. package/dist/vega/{p-1d752c37.entry.js → p-c0a6ed53.entry.js} +1 -1
  482. package/dist/vega/{p-7dcc0b23.entry.js → p-c1c5bd2c.entry.js} +1 -1
  483. package/dist/vega/{p-cdd3af89.entry.js → p-c5621f60.entry.js} +1 -1
  484. package/dist/vega/{p-f0d70de3.js → p-c596bb49.js} +1 -1
  485. package/dist/vega/p-c9c42a07.js +1 -0
  486. package/dist/vega/p-cb378636.js +1 -0
  487. package/dist/vega/p-d0e7c14b.entry.js +1 -0
  488. package/dist/vega/{p-919de162.js → p-d2916121.js} +1 -1
  489. package/dist/vega/{p-5424e837.js → p-d319ebb5.js} +1 -1
  490. package/dist/vega/p-d6422004.entry.js +1 -0
  491. package/dist/vega/p-d76cb9da.entry.js +1 -0
  492. package/dist/vega/{p-6629a68b.js → p-d7790113.js} +1 -1
  493. package/dist/vega/{p-b5a3de00.entry.js → p-d871e8eb.entry.js} +1 -1
  494. package/dist/vega/p-d905159c.entry.js +1 -0
  495. package/dist/vega/{p-ba4f23d8.entry.js → p-dfda6e01.entry.js} +1 -1
  496. package/dist/vega/p-e30a4f3e.js +1 -0
  497. package/dist/vega/{p-b2a0d104.entry.js → p-e8c5a446.entry.js} +1 -1
  498. package/dist/vega/{p-fea75b87.js → p-eb927e2b.js} +1 -1
  499. package/dist/vega/{p-9f03856e.js → p-ecea4d24.js} +1 -1
  500. package/dist/vega/{p-c6201e76.entry.js → p-ed1dbc98.entry.js} +1 -1
  501. package/dist/vega/p-f0b99c3a.entry.js +1 -0
  502. package/dist/vega/{p-9c48e4e5.js → p-f0d6e2f2.js} +1 -1
  503. package/dist/vega/p-f251a907.entry.js +1 -0
  504. package/dist/vega/{p-5a960f83.entry.js → p-f5c8024e.entry.js} +1 -1
  505. package/dist/vega/{p-36f3dd19.entry.js → p-f70cfac5.entry.js} +1 -1
  506. package/dist/vega/p-f830deb8.js +1 -0
  507. package/dist/vega/p-f9ae396b.entry.js +1 -0
  508. package/dist/vega/p-fcefb62c.js +1 -0
  509. package/dist/vega/p-fd2a49be.entry.js +1 -0
  510. package/dist/vega/{p-6be01c6b.entry.js → p-fe573f85.entry.js} +1 -1
  511. package/dist/vega/vega.esm.js +1 -1
  512. package/package.json +1 -1
  513. package/dist/cjs/base-renderer-0a3b62b7.js +0 -9
  514. package/dist/cjs/dto-renderer-manager-7eb5c5ce.js +0 -98
  515. package/dist/esm/base-renderer-101f6d04.js +0 -7
  516. package/dist/esm/dto-renderer-manager-abc7eb5f.js +0 -96
  517. package/dist/vega/p-05dc6718.js +0 -1
  518. package/dist/vega/p-0c460945.js +0 -1
  519. package/dist/vega/p-0dafd071.entry.js +0 -1
  520. package/dist/vega/p-0edf9c6e.entry.js +0 -1
  521. package/dist/vega/p-1f563387.js +0 -1
  522. package/dist/vega/p-296c90bd.entry.js +0 -1
  523. package/dist/vega/p-30f76962.js +0 -3
  524. package/dist/vega/p-3186995a.entry.js +0 -1
  525. package/dist/vega/p-3ab50c06.entry.js +0 -1
  526. package/dist/vega/p-3e2e4b00.entry.js +0 -1
  527. package/dist/vega/p-50958342.js +0 -1
  528. package/dist/vega/p-540bd78a.entry.js +0 -1
  529. package/dist/vega/p-54ed506c.entry.js +0 -1
  530. package/dist/vega/p-5c8522eb.entry.js +0 -1
  531. package/dist/vega/p-6205288e.entry.js +0 -1
  532. package/dist/vega/p-696d7b8f.js +0 -1
  533. package/dist/vega/p-6ab23e89.entry.js +0 -1
  534. package/dist/vega/p-70e0c3eb.entry.js +0 -1
  535. package/dist/vega/p-7168ef16.entry.js +0 -1
  536. package/dist/vega/p-7348a091.entry.js +0 -1
  537. package/dist/vega/p-7cd8d054.entry.js +0 -1
  538. package/dist/vega/p-8ee917b4.js +0 -1
  539. package/dist/vega/p-a0dd5273.entry.js +0 -1
  540. package/dist/vega/p-a32ad1ac.entry.js +0 -1
  541. package/dist/vega/p-a528714c.js +0 -1
  542. package/dist/vega/p-a5713178.js +0 -1
  543. package/dist/vega/p-a7b5f497.js +0 -1
  544. package/dist/vega/p-ad815280.js +0 -1
  545. package/dist/vega/p-b218141f.entry.js +0 -1
  546. package/dist/vega/p-b6c3ce6d.js +0 -1
  547. package/dist/vega/p-b857a661.js +0 -1
  548. package/dist/vega/p-c4675cd2.entry.js +0 -1
  549. package/dist/vega/p-c51e3b9e.js +0 -1
  550. package/dist/vega/p-c84aa55a.js +0 -1
  551. package/dist/vega/p-cd382652.entry.js +0 -1
  552. package/dist/vega/p-cf5c6172.entry.js +0 -1
  553. package/dist/vega/p-d8591207.entry.js +0 -1
  554. package/dist/vega/p-da42fde0.js +0 -1
  555. package/dist/vega/p-dc0f7ef1.entry.js +0 -1
  556. package/dist/vega/p-dcd3b421.entry.js +0 -1
  557. package/dist/vega/p-ea4b5520.entry.js +0 -1
  558. package/dist/vega/p-eb78a2f2.entry.js +0 -1
  559. package/dist/vega/p-ec2a1d4c.js +0 -1
  560. package/dist/vega/p-fdf6f368.js +0 -1
  561. package/dist/vega/p-ffda64ac.js +0 -1
  562. package/dist/vega/p-ffe8a826.entry.js +0 -1
@@ -1 +1 @@
1
- import{V as t,M as r,A as s,D as i}from"./p-f7ad9349.js";import{m as e,a,s as d}from"./p-262ec334.js";import{I as n}from"./p-abd7aeaa.js";class o extends n{static validateCreditCardDigits(t){const r=e(t).reverse();return!(r.length<12||r.length>19)&&a(r,(t=>t%2==0)).reduce(d,0)%10==0}evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=this.formatCreditCardNumber(t),s=this.isValidVisaCreditCard(t)||this.isValidAmexCreditCard(t)||this.isValidDiscoverCreditCard(t)||this.isValidMasterCardCreditCard(t)||!this.isSupportedCreditCardType(r)&&o.validateCreditCardDigits(r);return{isValid:s,message:s?"":"Credit card number is invalid"}}canEvaluate(t,r){return r?this.isAcceptedInputType(t)&&!r.disabled&&r.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isValidVisaCreditCard(r){const s=this.formatCreditCardNumber(r);return t.test(s)&&(13===s.length||16===s.length||19===s.length)&&o.validateCreditCardDigits(s)}isValidMasterCardCreditCard(t){const s=this.formatCreditCardNumber(t);return r.test(s)&&16===s.length&&o.validateCreditCardDigits(s)}isValidAmexCreditCard(t){const r=this.formatCreditCardNumber(t);return s.test(r)&&15===r.length&&o.validateCreditCardDigits(r)}isValidDiscoverCreditCard(t){const r=this.formatCreditCardNumber(t);return i.test(r)&&16===r.length&&o.validateCreditCardDigits(r)}isAcceptedInputType(t){return"string"==typeof t}formatCreditCardNumber(t){return t.replace(/\s/g,"")}isSupportedCreditCardType(e){return t.test(e)||r.test(e)||s.test(e)||i.test(e)}}export{o as V}
1
+ import{V as t,M as r,A as s,D as i}from"./p-b0f55f5f.js";import{m as e,a,s as d}from"./p-262ec334.js";import{I as n}from"./p-abd7aeaa.js";class o extends n{static validateCreditCardDigits(t){const r=e(t).reverse();return!(r.length<12||r.length>19)&&a(r,(t=>t%2==0)).reduce(d,0)%10==0}evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const r=this.formatCreditCardNumber(t),s=this.isValidVisaCreditCard(t)||this.isValidAmexCreditCard(t)||this.isValidDiscoverCreditCard(t)||this.isValidMasterCardCreditCard(t)||!this.isSupportedCreditCardType(r)&&o.validateCreditCardDigits(r);return{isValid:s,message:s?"":"Credit card number is invalid"}}canEvaluate(t,r){return r?this.isAcceptedInputType(t)&&!r.disabled&&r.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isValidVisaCreditCard(r){const s=this.formatCreditCardNumber(r);return t.test(s)&&(13===s.length||16===s.length||19===s.length)&&o.validateCreditCardDigits(s)}isValidMasterCardCreditCard(t){const s=this.formatCreditCardNumber(t);return r.test(s)&&16===s.length&&o.validateCreditCardDigits(s)}isValidAmexCreditCard(t){const r=this.formatCreditCardNumber(t);return s.test(r)&&15===r.length&&o.validateCreditCardDigits(r)}isValidDiscoverCreditCard(t){const r=this.formatCreditCardNumber(t);return i.test(r)&&16===r.length&&o.validateCreditCardDigits(r)}isAcceptedInputType(t){return"string"==typeof t}formatCreditCardNumber(t){return t.replace(/\s/g,"")}isSupportedCreditCardType(e){return t.test(e)||r.test(e)||s.test(e)||i.test(e)}}export{o as V}
@@ -1 +1 @@
1
- import{h as t,r as e,H as o,g as a}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{I as i}from"./p-c51e3b9e.js";import{c as n,M as p,I as l}from"./p-6e1ab235.js";import{V as s,I as c}from"./p-8ce9e214.js";import{E as g}from"./p-e7fb7eee.js";import{c as h}from"./p-2a9960c9.js";import"./p-8ee917b4.js";import"./p-ec2a1d4c.js";import"./p-f7ad9349.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-fea75b87.js";import"./p-2d0d575f.js";import"./p-a528714c.js";import"./p-781fd6e0.js";import"./p-262ec334.js";import"./p-6a334573.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-b75ee3ba.js";import"./p-f0d70de3.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-dcf162e9.js";import"./p-982747ef.js";import"./p-331a62d5.js";import"./p-11e2dcf5.js";import"./p-3a93730e.js";import"./p-a841cf13.js";var d=function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class m extends g{constructor(){super((()=>this.getShowConfig()),(()=>this.trigger),"isTooltipShow",(()=>this.disableInteractive)),this.getShowConfig=()=>({target:this.host,appendableElement:this.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef(),positionRelativeTo:this.positionRelativeTo,isScreenPosition:!0,matchTargetWidth:!1,size:this.size,minWidth:this.minWidth,maxWidth:this.maxWidth,placement:this.placement,alignment:this.alignment})}watchTrigger(){"none"===this.trigger&&this.hide()}watchToShowTooltip(){this.isTooltipShow&&this.show()}watchTextChange(t,e){!t&&e&&this.isTooltipShow&&this.hide()}show(){this.deprecatedPropertySlimmer.getValue()&&super.show()}}d([n()],m.prototype,"host",void 0),d([n()],m.prototype,"positionRelativeTo",void 0),d([n()],m.prototype,"size",void 0),d([n()],m.prototype,"minWidth",void 0),d([n()],m.prototype,"maxWidth",void 0),d([n()],m.prototype,"placement",void 0),d([n()],m.prototype,"alignment",void 0),d([n()],m.prototype,"trigger",void 0),d([n()],m.prototype,"disableInteractive",void 0),d([n()],m.prototype,"deprecatedPropertySlimmer",void 0),d([n({writable:!0})],m.prototype,"isTooltipShow",void 0),d([n()],m.prototype,"vegaTooltipContentBoxRenderer",void 0),d([p("watchTrigger")],m.prototype,"watchTrigger",null),d([p("watchToShowTooltip")],m.prototype,"watchToShowTooltip",null),d([p("watchTextChange")],m.prototype,"watchTextChange",null);class v{getTooltipContentBoxRef(){return this.tooltip}render(){return t("vega-tooltip-content-box",{ref:t=>this.tooltip=t,text:this.deprecatedPropertySlimmer.getValue()})}}!function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);i>3&&n&&Object.defineProperty(e,o,n)}([n()],v.prototype,"deprecatedPropertySlimmer",void 0);const f=[{payloadKey:"CONTENT_IS_EMPTY",payloadDescription:"@deprecated Specifies the content that is displayed inside the tooltip.",payloadValue:t=>void 0===t.content||""===t.content},{payloadKey:"CONTENT_IS_NOT_EMPTY",payloadDescription:"@deprecated Specifies the content that is displayed inside the tooltip.",payloadValue:t=>void 0!==t.content&&""!==t.content}];var b=function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};const x=class{constructor(t){e(this,t),this.globalSlimmers={},this.vegaTooltipElementAppenderController=new m,this.vegaTooltipContentBoxRenderer=new v,this.deprecatedPropertySlimmer=h(x,"text","content",void 0),this.vegaComponentUsageRuntimeMetricsSlimmer=new s(f),this.isTooltipShow=!1,this.trigger="hover",this.placement="top",this.alignment="center",this.disableInteractive=!1}watchTrigger(){}watchTextChange(){}watchToShowTooltip(){}render(){return r(t(o,null,t("slot",null),this.vegaTooltipContentBoxRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{trigger:["watchTrigger"],content:["watchTextChange"],text:["watchTextChange"],size:["watchToShowTooltip"],placement:["watchToShowTooltip"],alignment:["watchToShowTooltip"]}}};b([c()],x.prototype,"globalSlimmers",void 0),b([l()],x.prototype,"vegaTooltipElementAppenderController",void 0),b([l()],x.prototype,"vegaTooltipContentBoxRenderer",void 0),b([i((t=>[{keyCode:"Tab",activeElementInScope:[t.host],callback:()=>"hover"===t.trigger&&t.vegaTooltipElementAppenderController.show()},{keyCode:"Escape",activeElementInScope:[t.host,t.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef()],callback:()=>t.vegaTooltipElementAppenderController.hide()},{keyCode:"Tab",activeElementOutScope:[t.host,t.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef()],callback:()=>t.isTooltipShow&&t.vegaTooltipElementAppenderController.hide()}])),l()],x.prototype,"deprecatedPropertySlimmer",void 0),b([l()],x.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),x.style=":host{display:inline-block}";var w=function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};const j=class{constructor(t){e(this,t),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new s}render(){return r(t(o,{class:"vega-tooltip",role:"tooltip"},t("div",{class:"vega-tooltip-content"},this.text)),this.host)}get host(){return a(this)}};w([c()],j.prototype,"globalSlimmers",void 0),w([l()],j.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),j.style=':host{position:absolute}:host(.vega-force-hidden){display:none !important}:host(.vega-placement-bottom){margin-top:8px}:host(.vega-placement-left){margin-left:-8px}:host(.vega-placement-right){margin-left:8px}:host(.vega-placement-top){margin-top:-8px}.vega-tooltip-content{border-radius:4px;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;overflow-wrap:break-word;background-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;white-space:pre-line}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-tooltip-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-tooltip-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-tooltip-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}:host(.vega-no-suitable-placement) .vega-tooltip-content::after,:host(.vega-no-suitable-alignment) .vega-tooltip-content::after{display:none}.vega-tooltip-content::after{content:"";position:absolute;border-style:solid}:host(.vega-placement-bottom) .vega-tooltip-content::after{top:-4px;border-width:0 5px 4px 5px;border-bottom-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-top-color:transparent;border-left-color:transparent;border-right-color:transparent}:host(.vega-placement-left) .vega-tooltip-content::after{left:100%;border-width:5px 0 5px 4px;border-left-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-top-color:transparent;border-bottom-color:transparent;border-right-color:transparent}:host(.vega-placement-right) .vega-tooltip-content::after{left:-4px;border-width:5px 4px 5px 0;border-right-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent}:host(.vega-placement-top) .vega-tooltip-content::after{bottom:-4px;border-width:4px 5px 0px 5px;border-top-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-bottom-color:transparent;border-left-color:transparent;border-right-color:transparent}:host(.vega-placement-bottom.vega-alignment-start) .vega-tooltip-content::after,:host(.vega-placement-top.vega-alignment-start) .vega-tooltip-content::after{left:8px}:host(.vega-placement-bottom.vega-alignment-center) .vega-tooltip-content::after,:host(.vega-placement-top.vega-alignment-center) .vega-tooltip-content::after{left:calc(50% - 5px)}:host(.vega-placement-bottom.vega-alignment-end) .vega-tooltip-content::after,:host(.vega-placement-top.vega-alignment-end) .vega-tooltip-content::after{right:8px}:host(.vega-placement-left.vega-alignment-start) .vega-tooltip-content::after,:host(.vega-placement-right.vega-alignment-start) .vega-tooltip-content::after{top:8px}:host(.vega-placement-left.vega-alignment-center) .vega-tooltip-content::after,:host(.vega-placement-right.vega-alignment-center) .vega-tooltip-content::after{top:calc(50% - 5px)}:host(.vega-placement-left.vega-alignment-end) .vega-tooltip-content::after,:host(.vega-placement-right.vega-alignment-end) .vega-tooltip-content::after{bottom:8px}';export{x as vega_tooltip,j as vega_tooltip_content_box}
1
+ import{h as t,r as e,H as o,g as a}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{I as i}from"./p-8a054a13.js";import{c as n,M as p,I as l}from"./p-6e1ab235.js";import{V as s,I as c}from"./p-8ce9e214.js";import{E as g}from"./p-566ba295.js";import{c as h}from"./p-2a9960c9.js";import"./p-c9c42a07.js";import"./p-528748fa.js";import"./p-b0f55f5f.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-eb927e2b.js";import"./p-2d0d575f.js";import"./p-cb378636.js";import"./p-781fd6e0.js";import"./p-262ec334.js";import"./p-6a334573.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-b75ee3ba.js";import"./p-c596bb49.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-dcf162e9.js";import"./p-982747ef.js";import"./p-331a62d5.js";import"./p-526e3634.js";import"./p-3a93730e.js";import"./p-a841cf13.js";var d=function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class m extends g{constructor(){super((()=>this.getShowConfig()),(()=>this.trigger),"isTooltipShow",(()=>this.disableInteractive)),this.getShowConfig=()=>({target:this.host,appendableElement:this.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef(),positionRelativeTo:this.positionRelativeTo,isScreenPosition:!0,matchTargetWidth:!1,size:this.size,minWidth:this.minWidth,maxWidth:this.maxWidth,placement:this.placement,alignment:this.alignment})}watchTrigger(){"none"===this.trigger&&this.hide()}watchToShowTooltip(){this.isTooltipShow&&this.show()}watchTextChange(t,e){!t&&e&&this.isTooltipShow&&this.hide()}show(){this.deprecatedPropertySlimmer.getValue()&&super.show()}}d([n()],m.prototype,"host",void 0),d([n()],m.prototype,"positionRelativeTo",void 0),d([n()],m.prototype,"size",void 0),d([n()],m.prototype,"minWidth",void 0),d([n()],m.prototype,"maxWidth",void 0),d([n()],m.prototype,"placement",void 0),d([n()],m.prototype,"alignment",void 0),d([n()],m.prototype,"trigger",void 0),d([n()],m.prototype,"disableInteractive",void 0),d([n()],m.prototype,"deprecatedPropertySlimmer",void 0),d([n({writable:!0})],m.prototype,"isTooltipShow",void 0),d([n()],m.prototype,"vegaTooltipContentBoxRenderer",void 0),d([p("watchTrigger")],m.prototype,"watchTrigger",null),d([p("watchToShowTooltip")],m.prototype,"watchToShowTooltip",null),d([p("watchTextChange")],m.prototype,"watchTextChange",null);class v{getTooltipContentBoxRef(){return this.tooltip}render(){return t("vega-tooltip-content-box",{ref:t=>this.tooltip=t,text:this.deprecatedPropertySlimmer.getValue()})}}!function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);i>3&&n&&Object.defineProperty(e,o,n)}([n()],v.prototype,"deprecatedPropertySlimmer",void 0);const f=[{payloadKey:"CONTENT_IS_EMPTY",payloadDescription:"@deprecated Specifies the content that is displayed inside the tooltip.",payloadValue:t=>void 0===t.content||""===t.content},{payloadKey:"CONTENT_IS_NOT_EMPTY",payloadDescription:"@deprecated Specifies the content that is displayed inside the tooltip.",payloadValue:t=>void 0!==t.content&&""!==t.content}];var b=function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};const x=class{constructor(t){e(this,t),this.globalSlimmers={},this.vegaTooltipElementAppenderController=new m,this.vegaTooltipContentBoxRenderer=new v,this.deprecatedPropertySlimmer=h(x,"text","content",void 0),this.vegaComponentUsageRuntimeMetricsSlimmer=new s(f),this.isTooltipShow=!1,this.trigger="hover",this.placement="top",this.alignment="center",this.disableInteractive=!1}watchTrigger(){}watchTextChange(){}watchToShowTooltip(){}render(){return r(t(o,null,t("slot",null),this.vegaTooltipContentBoxRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{trigger:["watchTrigger"],content:["watchTextChange"],text:["watchTextChange"],size:["watchToShowTooltip"],placement:["watchToShowTooltip"],alignment:["watchToShowTooltip"]}}};b([c()],x.prototype,"globalSlimmers",void 0),b([l()],x.prototype,"vegaTooltipElementAppenderController",void 0),b([l()],x.prototype,"vegaTooltipContentBoxRenderer",void 0),b([i((t=>[{keyCode:"Tab",activeElementInScope:[t.host],callback:()=>"hover"===t.trigger&&t.vegaTooltipElementAppenderController.show()},{keyCode:"Escape",activeElementInScope:[t.host,t.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef()],callback:()=>t.vegaTooltipElementAppenderController.hide()},{keyCode:"Tab",activeElementOutScope:[t.host,t.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef()],callback:()=>t.isTooltipShow&&t.vegaTooltipElementAppenderController.hide()}])),l()],x.prototype,"deprecatedPropertySlimmer",void 0),b([l()],x.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),x.style=":host{display:inline-block}";var w=function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};const j=class{constructor(t){e(this,t),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new s}render(){return r(t(o,{class:"vega-tooltip",role:"tooltip"},t("div",{class:"vega-tooltip-content"},this.text)),this.host)}get host(){return a(this)}};w([c()],j.prototype,"globalSlimmers",void 0),w([l()],j.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),j.style=':host{position:absolute}:host(.vega-force-hidden){display:none !important}:host(.vega-placement-bottom){margin-top:8px}:host(.vega-placement-left){margin-left:-8px}:host(.vega-placement-right){margin-left:8px}:host(.vega-placement-top){margin-top:-8px}.vega-tooltip-content{border-radius:4px;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;overflow-wrap:break-word;background-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;white-space:pre-line}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-tooltip-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-tooltip-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-tooltip-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}:host(.vega-no-suitable-placement) .vega-tooltip-content::after,:host(.vega-no-suitable-alignment) .vega-tooltip-content::after{display:none}.vega-tooltip-content::after{content:"";position:absolute;border-style:solid}:host(.vega-placement-bottom) .vega-tooltip-content::after{top:-4px;border-width:0 5px 4px 5px;border-bottom-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-top-color:transparent;border-left-color:transparent;border-right-color:transparent}:host(.vega-placement-left) .vega-tooltip-content::after{left:100%;border-width:5px 0 5px 4px;border-left-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-top-color:transparent;border-bottom-color:transparent;border-right-color:transparent}:host(.vega-placement-right) .vega-tooltip-content::after{left:-4px;border-width:5px 4px 5px 0;border-right-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent}:host(.vega-placement-top) .vega-tooltip-content::after{bottom:-4px;border-width:4px 5px 0px 5px;border-top-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-bottom-color:transparent;border-left-color:transparent;border-right-color:transparent}:host(.vega-placement-bottom.vega-alignment-start) .vega-tooltip-content::after,:host(.vega-placement-top.vega-alignment-start) .vega-tooltip-content::after{left:8px}:host(.vega-placement-bottom.vega-alignment-center) .vega-tooltip-content::after,:host(.vega-placement-top.vega-alignment-center) .vega-tooltip-content::after{left:calc(50% - 5px)}:host(.vega-placement-bottom.vega-alignment-end) .vega-tooltip-content::after,:host(.vega-placement-top.vega-alignment-end) .vega-tooltip-content::after{right:8px}:host(.vega-placement-left.vega-alignment-start) .vega-tooltip-content::after,:host(.vega-placement-right.vega-alignment-start) .vega-tooltip-content::after{top:8px}:host(.vega-placement-left.vega-alignment-center) .vega-tooltip-content::after,:host(.vega-placement-right.vega-alignment-center) .vega-tooltip-content::after{top:calc(50% - 5px)}:host(.vega-placement-left.vega-alignment-end) .vega-tooltip-content::after,:host(.vega-placement-right.vega-alignment-end) .vega-tooltip-content::after{bottom:8px}';export{x as vega_tooltip,j as vega_tooltip_content_box}
@@ -0,0 +1 @@
1
+ import{M as s,i as t}from"./p-35d617d5.js";class i extends s{constructor(s,i){super(),this.type=t.REPLACE_SELECTED_TEXT,this.textToBeInsert="",this.textToBeInsert=s,this.currentRange=i}}export{i as R}
@@ -1 +1 @@
1
- import{Q as r}from"./p-f7ad9349.js";import{I as e}from"./p-abd7aeaa.js";class s extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e} for range mode`);const s=Array.isArray(e)&&2===e.length&&e.every((e=>r(e,this.config.timeFormat)));return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||Array.isArray(r)}}class t extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e}`);const s=r(e,this.config.timeFormat);return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||"string"==typeof r}}export{s as T,t as a}
1
+ import{Q as r}from"./p-b0f55f5f.js";import{I as e}from"./p-abd7aeaa.js";class s extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e} for range mode`);const s=Array.isArray(e)&&2===e.length&&e.every((e=>r(e,this.config.timeFormat)));return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||Array.isArray(r)}}class t extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e}`);const s=r(e,this.config.timeFormat);return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||"string"==typeof r}}export{s as T,t as a}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as e,g as s}from"./p-6b2342e0.js";import{c as o,M as h,I as n}from"./p-6e1ab235.js";import{V as l,I as r}from"./p-8ce9e214.js";import{P as a}from"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";var c=function(t,i,e,s){var o,h=arguments.length,n=h<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,s);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(h<3?o(n):h>3?o(i,e,n):o(i,e))||n);return h>3&&n&&Object.defineProperty(i,e,n),n};class p extends a{constructor(){super({target:()=>[this.host,document.body],callback:()=>{"ellipsis"===this.overflow&&this.handleTooltip()},isDeferred:!0}),this.handleTooltip=async()=>{if(0===this.host.clientWidth)return;this.host.style.minWidth="auto",this.tooltipRef&&(this.tooltipRef.textContent=this.text);const t=this.computeTruncatedText();t!==this.text?(this.createTooltip(t).componentOnReady().then((()=>{this.updateTooltipDisplayText()})),requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.host&&this.host.isConnected&&(this.host.style.minWidth="auto",this.updateTooltipDisplayText())}))}))):this.removeTooltip()},this.createTooltip=t=>{var i,e,s;return this.tooltipRef=this.host.querySelector("vega-tooltip"),this.tooltipRef?this.tooltipRef.textContent=t:(this.tooltipRef=document.createElement("vega-tooltip"),this.tooltipRef.text=this.text,this.tooltipRef.textContent=t,this.tooltipRef.placement=null===(i=this.tooltip)||void 0===i?void 0:i.placement,this.tooltipRef.maxWidth=null===(e=this.tooltip)||void 0===e?void 0:e.maxWidth,this.tooltipRef.minWidth=null===(s=this.tooltip)||void 0===s?void 0:s.minWidth,this.host.replaceChildren(this.tooltipRef)),this.tooltipRef},this.truncateStringWithEllipsis=t=>this.text.substring(0,t)+"...",this.getSafeTextLengthByDom=()=>{const t=this.widthCheckerRef;t.textContent=this.text;const i=this.host.getBoundingClientRect().width;let e=t.getBoundingClientRect().width;if(this.text.length<2||e<=i)return this.text.length;let s=0,o=this.text.length-1;for(let h=0;h<this.text.length&&s<o;h++){const h=Math.floor((s+o+1)/2),n=this.text.substring(0,h)+"...";t.textContent=n,e=t.getBoundingClientRect().width,e<=i?s=h:o=h-1}return Math.max(1,s)}}componentDidLoad(){this.widthCheckerRef=this.host.shadowRoot.querySelector(".width-checker"),this.host.textContent=this.text,"ellipsis"===this.overflow&&this.handleTooltip()}watchText(){this.host.textContent=this.text,"ellipsis"===this.overflow?this.handleTooltip():this.removeTooltip()}watchTooltip(){var t,i,e;this.tooltipRef&&(this.tooltipRef.placement=null===(t=this.tooltip)||void 0===t?void 0:t.placement,this.tooltipRef.maxWidth=null===(i=this.tooltip)||void 0===i?void 0:i.maxWidth,this.tooltipRef.minWidth=null===(e=this.tooltip)||void 0===e?void 0:e.minWidth)}removeTooltip(){this.tooltipRef&&(this.host.textContent=this.text,this.tooltipRef.remove(),this.tooltipRef=null)}updateTooltipDisplayText(){this.tooltipRef&&(this.tooltipRef.textContent=this.text);const t=this.computeTruncatedText();t===this.text?this.removeTooltip():this.tooltipRef&&this.tooltipRef.textContent!==t&&(this.tooltipRef.textContent=t)}computeTruncatedText(){const t=this.getSafeTextLengthByDom();return t===this.text.length?this.text:(t<=1?this.insertMinWidthStyle():this.host.style.minWidth="auto",this.truncateStringWithEllipsis(t))}insertMinWidthStyle(){let t=this.host.shadowRoot.querySelector("#min-width-placeholder");t||(t=document.createElement("span"),t.id="min-width-placeholder",t.style.cssText="position:absolute; visibility:hidden; word-break:keep-all;",this.host.shadowRoot.appendChild(t)),t.textContent=this.truncateStringWithEllipsis(1),this.host.style.minWidth=t.getBoundingClientRect().width+"px"}}c([o()],p.prototype,"host",void 0),c([o()],p.prototype,"text",void 0),c([o()],p.prototype,"tooltip",void 0),c([o()],p.prototype,"overflow",void 0),c([h("componentDidLoad")],p.prototype,"componentDidLoad",null),c([h("watchText")],p.prototype,"watchText",null),c([h("watchTooltip")],p.prototype,"watchTooltip",null);var d=function(t,i,e,s){var o,h=arguments.length,n=h<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,s);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(h<3?o(n):h>3?o(i,e,n):o(i,e))||n);return h>3&&n&&Object.defineProperty(i,e,n),n};const u=class{constructor(i){t(this,i),this.globalSlimmers={},this.tooltipRenderer=new p,this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.overflow="newline",this.text=""}watchText(){}watchTooltip(){}componentDidLoad(){}render(){return i(e,{class:{"vega-container-text-ellipsis":"ellipsis"===this.overflow,"vega-container-text-newline":"newline"===this.overflow}},i("span",{class:"placeholder-text"},this.text),i("span",{class:"width-checker"}),i("slot",null))}get host(){return s(this)}static get watchers(){return{text:["watchText"],tooltip:["watchTooltip"]}}};d([r()],u.prototype,"globalSlimmers",void 0),d([n()],u.prototype,"tooltipRenderer",void 0),d([n()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),u.style=":host{display:block;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;letter-spacing:inherit;line-height:inherit;flex-direction:column;flex-wrap:wrap;gap:0px}:host .placeholder-text{display:block;width:100%;visibility:hidden;overflow:hidden;word-break:break-all;height:0px !important;margin:0;padding:0;line-height:0px;border:none}:host .width-checker{position:absolute;display:block;visibility:hidden;top:0;left:0;white-space:nowrap;height:0px !important;margin:0;padding:0;border:none}:host(.vega-container-text-newline){overflow-wrap:break-word}:host(.vega-container-text-newline) .placeholder-text{display:none}:host(.vega-container-text-ellipsis){word-break:break-all;min-width:0}";export{u as vega_text}
@@ -0,0 +1 @@
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 +1 @@
1
- import{c as t,M as e,V as s}from"./p-6e1ab235.js";import{i,j as n}from"./p-c84aa55a.js";import{v as r}from"./p-5f377954.js";import{F as h}from"./p-dcf162e9.js";var a=function(t,e,s,i){var n,r=arguments.length,h=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(h=(r<3?n(h):r>3?n(e,s,h):n(e,s))||h);return r>3&&h&&Object.defineProperty(e,s,h),h};class o extends s{constructor(t,e,s,i){if(super(),this.eventIds=[],this.useCapture=!1,this.isEventListenerAdded=!1,this.disabled=!1,this.preventChildEvent=t=>{const e=this.getHostElement();if(!this.shouldSkipEventPrevent())if("function"==typeof this.customPreventHandle)this.customPreventHandle(t);else{const s=t.composedPath();e===t.target&&e===s[0]||t.stopImmediatePropagation()}},this.eventIds=t,this.getHostElement=e,!0===s)this.useCapture=!0;else if(s){const{useCapture:t=!1,customPreventHandle:e}=s;this.useCapture=t,this.customPreventHandle=e}this.disabled=!0===i}setup(){this.addOrRemoveEventListener("add")}checkEventListenerStatus(){this.isEventListenerAdded||this.setup(),this.setSkipEventPreventFlag()}destroy(){this.addOrRemoveEventListener("remove")}setSkipEventPreventFlag(){h.isEnabled("VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT")&&this.disabled&&this.host&&"react"===r.getVegaEnv().framework&&"native"===i.getSemantics(this.host).namespace&&this.getHostElement().setAttribute("data-vega-no-event-prevent","true")}addOrRemoveEventListener(t){const e=this.getHostElement();this.eventIds&&this.eventIds.length&&e&&(this.eventIds.filter((t=>this.shouldPrevent(t))).forEach((s=>{e["add"===t?"addEventListener":"removeEventListener"](this.getCurrentEventName(s),this.preventChildEvent,this.useCapture)})),this.isEventListenerAdded="add"===t)}getCurrentEventName(t){return t.getCurrentName(i.getSemantics(this.host))}shouldPrevent(t){const{namespace:e,jqueryDelegatedEvent:s}=i.getSemantics(this.host);return!("native"===e&&s&&n.isSupportDelegated(this.host,t))}shouldSkipEventPrevent(){const t=this.getHostElement();return t&&"true"===t.dataset.vegaNoEventPrevent}}a([t()],o.prototype,"host",void 0),a([e("connectedCallback")],o.prototype,"setup",null),a([e("componentDidLoad")],o.prototype,"checkEventListenerStatus",null),a([e("disconnectedCallback")],o.prototype,"destroy",null);export{o as C}
1
+ import{c as t,M as e,V as s}from"./p-6e1ab235.js";import{i,j as n}from"./p-46cab60a.js";import{v as r}from"./p-5f377954.js";import{F as h}from"./p-dcf162e9.js";var o=function(t,e,s,i){var n,r=arguments.length,h=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,i);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(h=(r<3?n(h):r>3?n(e,s,h):n(e,s))||h);return r>3&&h&&Object.defineProperty(e,s,h),h};class a extends s{constructor(t,e,s,i){if(super(),this.eventIds=[],this.useCapture=!1,this.isEventListenerAdded=!1,this.disabled=!1,this.preventChildEvent=t=>{const e=this.getHostElement();if(!this.shouldSkipEventPrevent())if("function"==typeof this.customPreventHandle)this.customPreventHandle(t);else{const s=t.composedPath();e===t.target&&e===s[0]||t.stopImmediatePropagation()}},this.eventIds=t,this.getHostElement=e,!0===s)this.useCapture=!0;else if(s){const{useCapture:t=!1,customPreventHandle:e}=s;this.useCapture=t,this.customPreventHandle=e}this.disabled=!0===i}setup(){this.addOrRemoveEventListener("add")}checkEventListenerStatus(){this.isEventListenerAdded||this.setup(),this.setSkipEventPreventFlag()}destroy(){this.addOrRemoveEventListener("remove")}setSkipEventPreventFlag(){h.isEnabled("VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT")&&this.disabled&&this.host&&"react"===r.getVegaEnv().framework&&"native"===i.getSemantics(this.host).namespace&&this.getHostElement().setAttribute("data-vega-no-event-prevent","true")}addOrRemoveEventListener(t){const e=this.getHostElement();this.eventIds&&this.eventIds.length&&e&&(this.eventIds.filter((t=>this.shouldPrevent(t))).forEach((s=>{e["add"===t?"addEventListener":"removeEventListener"](this.getCurrentEventName(s),this.preventChildEvent,this.useCapture)})),this.isEventListenerAdded="add"===t)}getCurrentEventName(t){return t.getCurrentName(i.getSemantics(this.host))}shouldPrevent(t){const{namespace:e,jqueryDelegatedEvent:s}=i.getSemantics(this.host);return!("native"===e&&s&&n.isSupportDelegated(this.host,t))}shouldSkipEventPrevent(){const t=this.getHostElement();return t&&"true"===t.dataset.vegaNoEventPrevent}}o([t()],a.prototype,"host",void 0),o([e("connectedCallback")],a.prototype,"setup",null),o([e("componentDidLoad")],a.prototype,"checkEventListenerStatus",null),o([e("disconnectedCallback")],a.prototype,"destroy",null);export{a as C}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as s,g as h}from"./p-6b2342e0.js";import{F as r}from"./p-dcf162e9.js";import{V as a,M as l,A as o,D as c,i as p}from"./p-b0f55f5f.js";import{R as n}from"./p-280cbcdb.js";import{V as d}from"./p-277c306b.js";import{s as m}from"./p-519a7d55.js";import{I as v}from"./p-6e1ab235.js";import{V as f,I as u}from"./p-8ce9e214.js";import{F as g}from"./p-881622fd.js";import{F as _}from"./p-cb378636.js";import{C as A}from"./p-2d0d575f.js";import{c as E}from"./p-d7790113.js";import{C as M}from"./p-328dbe8e.js";import{D as I}from"./p-526e3634.js";import{i as w,K as j,J as D}from"./p-fcefb62c.js";import{V as Z}from"./p-724df1f5.js";import{S as C}from"./p-f0d6e2f2.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-eb927e2b.js";import"./p-abd7aeaa.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-3a93730e.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-a58cacca.js";import"./p-46cab60a.js";import"./p-5f377954.js";import"./p-1704ff25.js";import"./p-9a6bd32c.js";import"./p-97e7da55.js";const R=[{type:"visa",iconName:"visa",pattern:a,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:l,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],b=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];class N extends C{calculateCaretPosition(t,i){if(!p(i))return null;if(this.getCreditCardMaskConfig(t)){if(t.length>this.getLengthLimit())return i-(t.length-this.getLengthLimit());const e=t.substring(0,i);return i+(this.format(e).length-e.length)}return i}format(t,i){const e=this.getCreditCardMaskConfig(t);if(e){this.setMaskConfig(e.options);const s=null==i?void 0:i.caretPosition;if(t.length>this.getLengthLimit()&&p(s)){const i=[...t],e=t.length-this.getLengthLimit();return i.splice(s-e,e),i.join("")}return this.replaceMaskWithMatchedInputSlots(t,this.getMatchedInputSlotValue(t))}return t}getCreditCardType(t){return R.filter((i=>i.pattern.test(t)))[0]}}class y extends N{constructor(){super({mask:"",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")})}getCreditCardMaskConfig(t){let i;const e=this.getCreditCardType(t);return e&&(i=e.maskConfig),i}}class V extends N{constructor(t){super({mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}),this.hideCardNumberOnBlur=t}getCreditCardMaskConfig(t){let i;return this.getCreditCardType(t)&&this.hideCardNumberOnBlur&&t.trim().includes(" ")&&(i=this.generateDynamicMask(t)),i}generateDynamicMask(t){const i={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},e=t.trim().split(" "),s=e.map(((t,i)=>(i===e.length-1?"9":"X").repeat(t.length))).join(" ");return i.options.mask=s,i}}var H=function(t,i,e,s){var h,r=arguments.length,a=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,s);else for(var l=t.length-1;l>=0;l--)(h=t[l])&&(a=(r<3?h(a):r>3?h(i,e,a):h(i,e))||a);return r>3&&a&&Object.defineProperty(i,e,a),a};const T=class{constructor(s){t(this,s),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new n:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=E(T,w),this.blurEventEmitter=E(T,j),this.focusEventEmitter=E(T,D),this.inputCreditCardEventPrevent=new M([w,D,j],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new f(b),this.required=!1,this.optional=!1,this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:Z.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,optional:this.optional,showClearIcon:!1,ref:t=>{this.inputRef=t,I.addUniqueObserverToNode(t,w,(t=>{this.handleVegaChange(t)})),I.addUniqueObserverToNode(t,j,(()=>{this.handleVegaBlur()})),I.addUniqueObserverToNode(t,D,(()=>{this.handleVegaFocus()}))},"data-aria-label":this.label||"Input credit card"})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),A.notify(_,{host:this.host,detail:t})}componentDidLoad(){r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return m(e(s,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return R.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){return[{type:"custom",trigger:"input",strategy:()=>new y},{type:"custom",trigger:"blur",strategy:()=>new V(this.hideCardNumberOnBlur)}]}get host(){return h(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};Z.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" fill=\'rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path fill="rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" fill=\'rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),H([u()],T.prototype,"globalSlimmers",void 0),H([v()],T.prototype,"formFieldController",void 0),H([v()],T.prototype,"changeEventEmitter",void 0),H([v()],T.prototype,"blurEventEmitter",void 0),H([v()],T.prototype,"focusEventEmitter",void 0),H([v()],T.prototype,"inputCreditCardEventPrevent",void 0),H([v()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{T as vega_input_credit_card}
@@ -1 +1 @@
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-788ada42.js";import{a as b}from"./p-ec2a1d4c.js";import{D as v}from"./p-11e2dcf5.js";import{a as x,d as g}from"./p-05dc6718.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-a528714c.js";import{Y as I}from"./p-f7ad9349.js";import{c as L}from"./p-6629a68b.js";import{T as z}from"./p-fdf6f368.js";import"./p-ed45b3b6.js";import"./p-f0d70de3.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-0c460945.js";import"./p-1704ff25.js";import"./p-9a6bd32c.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-fea75b87.js";import"./p-c84aa55a.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}
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}
@@ -1 +1 @@
1
- import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-11e2dcf5.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-f7ad9349.js";import{T as c}from"./p-d884c644.js";import{g as l}from"./p-8b5d3a52.js";import{V as h}from"./p-b565a6a5.js";import{c as u}from"./p-a841cf13.js";import{f as d}from"./p-ec2a1d4c.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{st as $,k as A,x as B,y as C,f as D,B as E,N as F,ie as G,Qt as H,Jt as I,m as J,$ as K,Kt as L,E as M,O as N,Yt as O,at as P,se as Q,F as R,ut as S,Ht as T,Ct as U,ot as V,le as W,z as X,G as Y,S as Z,nt as _,_ as a,V as a0,q as a1,X as a2,Ft as a3,b as a4,R as a5,et as a6,C as a7,he as a8,ae as a9,oe 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,P as b,Lt as c,J as d,ee as e,M as f,dt as g,Bt as h,H as i,qt as j,p as k,A as l,K as m,Gt as n,L as o,T as p,ue as q,I 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}
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}