@globalpayments/vega 2.92.0 → 2.94.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 (556) hide show
  1. package/dist/cjs/{app-globals-2f326662.js → app-globals-d05c3410.js} +14 -9
  2. package/dist/cjs/{child-nodes-event-prevent-slimmer-b9a5b3e2.js → child-nodes-event-prevent-slimmer-e67ee84c.js} +1 -1
  3. package/dist/cjs/{code-block-6435d641.js → code-block-493c7ce7.js} +117 -31
  4. package/dist/cjs/{component-value-history-controller-slimmer.abstract-e4c9a5ba.js → component-value-history-controller-slimmer.abstract-ab21fcbf.js} +72 -39
  5. package/dist/cjs/{content-state-96ec9114.js → content-state-fc34a814.js} +61 -7
  6. package/dist/cjs/{date-required-rule-8c9e312b.js → date-required-rule-4ab06a82.js} +1 -1
  7. package/dist/cjs/{design-token-3548af29.js → design-token-d3d12fa0.js} +3 -3
  8. package/dist/cjs/{element-appender-slimmer-3bf69990.js → element-appender-slimmer-1d6323c2.js} +17 -8
  9. package/dist/cjs/{event-emit-slimmer-5bab10c2.js → event-emit-slimmer-d234a619.js} +1 -1
  10. package/dist/cjs/{form-field-controller-slimmer-e0efac05.js → form-field-controller-slimmer-d638ba12.js} +1 -1
  11. package/dist/cjs/{image-annotation-action-853f72c8.js → image-annotation-action-7c4cd316.js} +4 -4
  12. package/dist/cjs/image-extension-30a7c10f.js +56 -0
  13. package/dist/cjs/index.cjs.js +24 -19
  14. package/dist/cjs/{inject-keyboard-manager-0dccff1a.js → inject-keyboard-manager-5a105612.js} +1 -1
  15. package/dist/cjs/{internal-calendar-period-factory-6187ec4c.js → internal-calendar-period-factory-b76006f7.js} +1 -1
  16. package/dist/cjs/{internal-translation-controller-48ebfd0f.js → internal-translation-controller-eb02c3b1.js} +6 -0
  17. package/dist/cjs/{internal-vega-event-manager-7196a847.js → internal-vega-event-manager-13c4012b.js} +2 -1
  18. package/dist/cjs/{keyboard-manager-dfe8d924.js → keyboard-manager-ca76d4dc.js} +1 -1
  19. package/dist/cjs/{keyboard-manager-slimmer-4a2560a1.js → keyboard-manager-slimmer-a1223714.js} +1 -1
  20. package/dist/cjs/{link-extension-28d95849.js → link-extension-92a63cb7.js} +3 -3
  21. package/dist/cjs/loader.cjs.js +14 -14
  22. package/dist/cjs/{month-view-generator-2e59b188.js → month-view-generator-876c50d4.js} +1 -1
  23. package/dist/cjs/{public-rules-8727c42c.js → public-rules-9e1ea1d9.js} +7 -7
  24. package/dist/cjs/{range-5cb3d1e4.js → range-30219330.js} +1 -1
  25. package/dist/cjs/{responsive-format-facade-98b89142.js → responsive-format-facade-25e9f30d.js} +1 -1
  26. package/dist/cjs/{rich-text-editor-required-rule-8e4d577d.js → rich-text-editor-required-rule-23bf7485.js} +1 -1
  27. package/dist/cjs/{split-cell-operation-9e3ab88d.js → split-cell-operation-43752212.js} +3 -3
  28. package/dist/cjs/{state-border-formatter-626b0a14.js → state-border-formatter-f1ce0f3b.js} +1 -1
  29. package/dist/cjs/{string-format-strategy.abstract-981f43e1.js → string-format-strategy.abstract-b22f7754.js} +1 -1
  30. package/dist/cjs/{string-input-formatter-slimmer-fc4a0ba5.js → string-input-formatter-slimmer-d2c248f7.js} +1 -1
  31. package/dist/cjs/{string-mask-strategy-b47fa159.js → string-mask-strategy-fc01a500.js} +2 -2
  32. package/dist/cjs/{style-formatter-baf18624.js → style-formatter-73205450.js} +2 -2
  33. package/dist/cjs/{time-required-rule-e77d174f.js → time-required-rule-12d2f394.js} +1 -1
  34. package/dist/cjs/{token-extension-3aec039f.js → token-extension-ea891d54.js} +3318 -1742
  35. package/dist/cjs/{translation-slimmer-1e05769e.js → translation-slimmer-9099f56c.js} +1 -1
  36. package/dist/cjs/{type-guard-7ab48d6c.js → type-guard-f354af8b.js} +1 -1
  37. package/dist/cjs/{valid-credit-card-number-rule-52ba9c67.js → valid-credit-card-number-rule-8d370163.js} +1 -1
  38. package/dist/cjs/vega-accordion.cjs.entry.js +9 -9
  39. package/dist/cjs/vega-app-footer.cjs.entry.js +3 -3
  40. package/dist/cjs/vega-app-header-button.cjs.entry.js +9 -9
  41. package/dist/cjs/vega-banner.cjs.entry.js +3 -3
  42. package/dist/cjs/vega-box.cjs.entry.js +6 -6
  43. package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
  44. package/dist/cjs/vega-button-circle.cjs.entry.js +9 -9
  45. package/dist/cjs/vega-button-group_2.cjs.entry.js +4 -4
  46. package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
  47. package/dist/cjs/vega-button.cjs.entry.js +12 -9
  48. package/dist/cjs/vega-calendar_5.cjs.entry.js +11 -11
  49. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  50. package/dist/cjs/vega-carousel.cjs.entry.js +6 -6
  51. package/dist/cjs/vega-checkbox_2.cjs.entry.js +6 -6
  52. package/dist/cjs/vega-chip.cjs.entry.js +9 -9
  53. package/dist/cjs/vega-code-block.cjs.entry.js +12 -12
  54. package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
  55. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +7 -7
  56. package/dist/cjs/vega-color-swatch.cjs.entry.js +5 -5
  57. package/dist/cjs/vega-combo-box.cjs.entry.js +19 -13
  58. package/dist/cjs/vega-date-picker_2.cjs.entry.js +17 -17
  59. package/dist/cjs/vega-dialog_2.cjs.entry.js +20 -9
  60. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  61. package/dist/cjs/vega-dropdown_5.cjs.entry.js +693 -195
  62. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  63. package/dist/cjs/{vega-event-id-df22d80e.js → vega-event-id-58afed7a.js} +2 -0
  64. package/dist/cjs/vega-field-label.cjs.entry.js +5 -5
  65. package/dist/cjs/vega-file-uploader.cjs.entry.js +6 -6
  66. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  67. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  68. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  69. package/dist/cjs/vega-form.cjs.entry.js +7 -7
  70. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  71. package/dist/cjs/vega-icon.cjs.entry.js +5 -5
  72. package/dist/cjs/vega-image-uploader.cjs.entry.js +9 -9
  73. package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
  74. package/dist/cjs/vega-input-numeric.cjs.entry.js +9 -9
  75. package/dist/cjs/vega-input-passcode.cjs.entry.js +9 -9
  76. package/dist/cjs/vega-input-phone-number.cjs.entry.js +8 -8
  77. package/dist/cjs/vega-input-range.cjs.entry.js +7 -7
  78. package/dist/cjs/vega-input-select.cjs.entry.js +9 -9
  79. package/dist/cjs/vega-input.cjs.entry.js +9 -9
  80. package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
  81. package/dist/cjs/vega-left-nav_5.cjs.entry.js +316 -111
  82. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  83. package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
  84. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
  85. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
  86. package/dist/cjs/vega-pagination.cjs.entry.js +8 -8
  87. package/dist/cjs/vega-popover_2.cjs.entry.js +11 -11
  88. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +6 -6
  89. package/dist/cjs/vega-radio_2.cjs.entry.js +9 -9
  90. package/dist/cjs/vega-rich-text-content.cjs.entry.js +7 -7
  91. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +510 -73
  92. package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +4 -4
  93. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +8 -8
  94. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +15 -15
  95. package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
  96. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +8 -8
  97. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +6 -6
  98. package/dist/cjs/vega-sidenav_3.cjs.entry.js +6 -6
  99. package/dist/cjs/vega-signature-capture.cjs.entry.js +10 -10
  100. package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
  101. package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
  102. package/dist/cjs/vega-table_11.cjs.entry.js +968 -425
  103. package/dist/cjs/vega-textarea.cjs.entry.js +7 -9
  104. package/dist/cjs/vega-time-picker_2.cjs.entry.js +34 -14
  105. package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
  106. package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
  107. package/dist/cjs/vega.cjs.js +14 -14
  108. package/dist/collection/components/vega-button/vega-button.css +4 -0
  109. package/dist/collection/components/vega-button/vega-button.js +4 -1
  110. package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +4 -1
  111. package/dist/collection/components/vega-combo-box/vega-combo-box.js +7 -1
  112. package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
  113. package/dist/collection/components/vega-dropdown/constants.js +1 -0
  114. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.js +9 -0
  115. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-children-controller.js +97 -4
  116. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-select-all-controller.js +219 -0
  117. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.js +78 -13
  118. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.js +13 -1
  119. package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.js +7 -0
  120. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.js +52 -1
  121. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +4 -1
  122. package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +5 -0
  123. package/dist/collection/components/vega-dropdown/vega-dropdown.js +126 -1
  124. package/dist/collection/components/vega-field-label/vega-field-label.js +1 -1
  125. package/dist/collection/components/vega-hint/vega-hint.js +1 -1
  126. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +4 -1
  127. package/dist/collection/components/vega-modal/vega-modal.css +0 -1
  128. package/dist/collection/components/vega-modal/vega-modal.js +38 -0
  129. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-auto-collapse-controller.js +4 -6
  130. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-controller.js +23 -68
  131. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-manager.js +74 -0
  132. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.js +16 -2
  133. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-zindex-controller.js +2 -2
  134. package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +7 -2
  135. package/dist/collection/components/vega-rich-text-editor/assets/redo.js +1 -1
  136. package/dist/collection/components/vega-rich-text-editor/assets/undo.js +1 -1
  137. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.js +11 -5
  138. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.js +9 -4
  139. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/paste-content-strategy.js +61 -5
  140. package/dist/collection/components/vega-rich-text-editor/dto/actions/paste-content-action.js +1 -0
  141. package/dist/collection/components/vega-rich-text-editor/dto/annotations/custom-style-annotation.js +3 -2
  142. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +2 -1
  143. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-node-filter-styles-strategy.js +1 -1
  144. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +2 -1
  145. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +6 -1
  146. package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +1 -1
  147. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/action-handler-interceptors/blockquote-exit-on-enter-interceptor.js +61 -0
  148. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/action-handler-strategies/block-transform-to-blockquote-strategy.js +40 -0
  149. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/action-handler-strategies/remove-blockquote-strategy.js +20 -0
  150. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/actions/remove-blockquote-action.js +17 -0
  151. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/actions/transform-to-blockquote-action.js +19 -0
  152. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/assets/quote-left.js +4 -0
  153. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/blockquote-extension.js +47 -0
  154. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/dto/blockquote-annotation.js +76 -0
  155. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/dto/rte-blockquote-block.js +70 -0
  156. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/element-to-dto-strategies/blockquote-to-blockquote-block-strategy.js +53 -0
  157. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/filter-styles-strategies/blockquote-block/blockquote-filter-styles-strategy.js +41 -0
  158. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-block-renderer.js +21 -0
  159. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-toolbar-button-renderer.js +260 -0
  160. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.js +21 -7
  161. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.js +12 -0
  162. package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/assets/fullscreen-enter.js +3 -0
  163. package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/assets/fullscreen-exit.js +3 -0
  164. package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/controller/fullscreen-controller.js +156 -0
  165. package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/fullscreen-extension.js +31 -0
  166. package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/fullscreen-toolbar-button-renderer.js +73 -0
  167. package/dist/collection/components/vega-rich-text-editor/extensions/image/image-extension.js +34 -0
  168. package/dist/collection/components/vega-rich-text-editor/extensions/image/type.js +1 -0
  169. package/dist/collection/components/vega-rich-text-editor/extensions/paste/assets/paste.js +3 -0
  170. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +145 -0
  171. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-constants.js +6 -0
  172. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +442 -0
  173. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +1 -1
  174. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-toolbar-popover-renderer.js +1 -0
  175. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +4 -3
  176. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.js +1 -1
  177. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.js +1 -1
  178. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.js +1 -1
  179. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +1 -1
  180. package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +85 -15
  181. package/dist/collection/components/vega-rich-text-editor/public-api.js +5 -0
  182. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +2 -0
  183. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +1 -1
  184. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +1 -1
  185. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +385 -25
  186. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +69 -36
  187. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.js +1 -1
  188. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/horizontal-alignment-toolbar-button-slimmer.js +1 -1
  189. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +59 -14
  190. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-color-toolbar-button-slimmer.js +1 -1
  191. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +1 -1
  192. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +11 -1
  193. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.js +19 -1
  194. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/slimmers/renderers/vega-rich-text-editor-toolbar-button-renderer.js +6 -1
  195. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/vega-rich-text-editor-toolbar-button.js +28 -1
  196. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +1 -1
  197. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-image-editor/vega-rich-text-image-editor.js +1 -1
  198. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +1 -1
  199. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.js +1 -1
  200. package/dist/collection/components/vega-table/slimmers/controllers/dto/column-render-input-model.js +32 -0
  201. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-body-col-span-controller.js +77 -0
  202. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-col-span-resolver.js +121 -0
  203. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-cell-renderer.js +41 -14
  204. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +207 -7
  205. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-row-renderer.js +16 -3
  206. package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +113 -11
  207. package/dist/collection/components/vega-table/vega-table-expand-row/slimmers/controllers/vega-table-expand-row-col-span-controller.js +11 -2
  208. package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.js +5 -1
  209. package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.js +22 -1
  210. package/dist/collection/components/vega-table/vega-table.css +5 -0
  211. package/dist/collection/components/vega-table/vega-table.js +5 -0
  212. package/dist/collection/components/vega-text/vega-text.js +1 -1
  213. package/dist/collection/components/vega-textarea/vega-textarea.js +1 -3
  214. package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-range-dropdown-controller.js +4 -0
  215. package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-single-dropdown-controller.js +4 -0
  216. package/dist/collection/components/vega-time-picker/vega-time-picker.js +39 -0
  217. package/dist/collection/constants/ui.js +1 -0
  218. package/dist/collection/global/scripts/before-vega-load.js +8 -0
  219. package/dist/collection/helpers/backdrop/index.js +1 -0
  220. package/dist/collection/helpers/backdrop/shared-backdrop-manager.js +163 -0
  221. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +2 -1
  222. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
  223. package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +11 -4
  224. package/dist/collection/helpers/translation/locales/en.js +6 -0
  225. package/dist/collection/helpers/ui/element-appender.js +5 -2
  226. package/dist/esm/{app-globals-5e0d319a.js → app-globals-f2336686.js} +14 -9
  227. package/dist/esm/{child-nodes-event-prevent-slimmer-f24618c5.js → child-nodes-event-prevent-slimmer-96c14f5a.js} +1 -1
  228. package/dist/esm/{code-block-b71b2aa4.js → code-block-e12588fe.js} +117 -32
  229. package/dist/esm/{component-value-history-controller-slimmer.abstract-282df6e5.js → component-value-history-controller-slimmer.abstract-4e8eb313.js} +72 -39
  230. package/dist/esm/{content-state-909099f8.js → content-state-8032467a.js} +61 -7
  231. package/dist/esm/{date-required-rule-15edb04a.js → date-required-rule-b88e1650.js} +1 -1
  232. package/dist/esm/{design-token-cb5ed6b9.js → design-token-76bd217c.js} +3 -3
  233. package/dist/esm/{element-appender-slimmer-e41120ee.js → element-appender-slimmer-7fcb944b.js} +17 -8
  234. package/dist/esm/{event-emit-slimmer-03deba18.js → event-emit-slimmer-db4a82e0.js} +1 -1
  235. package/dist/esm/{form-field-controller-slimmer-cfe1d8a7.js → form-field-controller-slimmer-395c23e3.js} +1 -1
  236. package/dist/esm/{image-annotation-action-98232dc4.js → image-annotation-action-b3b6c308.js} +4 -4
  237. package/dist/esm/image-extension-b6c7e4a7.js +53 -0
  238. package/dist/esm/index.js +19 -19
  239. package/dist/esm/{inject-keyboard-manager-13cc77ab.js → inject-keyboard-manager-86126b5b.js} +1 -1
  240. package/dist/esm/{internal-calendar-period-factory-c3d70f3b.js → internal-calendar-period-factory-3a07dba0.js} +1 -1
  241. package/dist/esm/{internal-translation-controller-8e8a514a.js → internal-translation-controller-16709132.js} +6 -0
  242. package/dist/esm/{internal-vega-event-manager-75e5e3bb.js → internal-vega-event-manager-48690e5b.js} +2 -1
  243. package/dist/esm/{keyboard-manager-fe885db1.js → keyboard-manager-a0c3e1cf.js} +1 -1
  244. package/dist/esm/{keyboard-manager-slimmer-61d4c79b.js → keyboard-manager-slimmer-f3f66c15.js} +1 -1
  245. package/dist/esm/{link-extension-f1a3bea7.js → link-extension-97fcb8fb.js} +3 -3
  246. package/dist/esm/loader.js +14 -14
  247. package/dist/esm/{month-view-generator-85eecb95.js → month-view-generator-fd0e1856.js} +1 -1
  248. package/dist/esm/{public-rules-323bea4b.js → public-rules-c06f0d2a.js} +7 -7
  249. package/dist/esm/{range-e63068d1.js → range-e999837f.js} +1 -1
  250. package/dist/esm/{responsive-format-facade-fb424f5b.js → responsive-format-facade-ced96b0b.js} +1 -1
  251. package/dist/esm/{rich-text-editor-required-rule-0edb8ba7.js → rich-text-editor-required-rule-71f8ee98.js} +1 -1
  252. package/dist/esm/{split-cell-operation-93b4d775.js → split-cell-operation-359f8082.js} +3 -3
  253. package/dist/esm/{state-border-formatter-1a528ca4.js → state-border-formatter-b680e922.js} +1 -1
  254. package/dist/esm/{string-format-strategy.abstract-72fc98aa.js → string-format-strategy.abstract-23faab71.js} +1 -1
  255. package/dist/esm/{string-input-formatter-slimmer-b0c480d8.js → string-input-formatter-slimmer-4b4866a6.js} +1 -1
  256. package/dist/esm/{string-mask-strategy-4e00c173.js → string-mask-strategy-66586cd8.js} +2 -2
  257. package/dist/esm/{style-formatter-5c1bea8d.js → style-formatter-f4e16af5.js} +2 -2
  258. package/dist/esm/{time-required-rule-df500b14.js → time-required-rule-6e80a9ab.js} +1 -1
  259. package/dist/esm/{token-extension-32d1fa56.js → token-extension-9896879b.js} +3314 -1742
  260. package/dist/esm/{translation-slimmer-60408f13.js → translation-slimmer-21748a0e.js} +1 -1
  261. package/dist/esm/{type-guard-91087018.js → type-guard-ec5e8628.js} +1 -1
  262. package/dist/esm/{valid-credit-card-number-rule-681ecb75.js → valid-credit-card-number-rule-ca5a47d6.js} +1 -1
  263. package/dist/esm/vega-accordion.entry.js +9 -9
  264. package/dist/esm/vega-app-footer.entry.js +3 -3
  265. package/dist/esm/vega-app-header-button.entry.js +9 -9
  266. package/dist/esm/vega-banner.entry.js +3 -3
  267. package/dist/esm/vega-box.entry.js +6 -6
  268. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  269. package/dist/esm/vega-button-circle.entry.js +9 -9
  270. package/dist/esm/vega-button-group_2.entry.js +4 -4
  271. package/dist/esm/vega-button-link.entry.js +4 -4
  272. package/dist/esm/vega-button.entry.js +12 -9
  273. package/dist/esm/vega-calendar_5.entry.js +11 -11
  274. package/dist/esm/vega-card.entry.js +5 -5
  275. package/dist/esm/vega-carousel.entry.js +6 -6
  276. package/dist/esm/vega-checkbox_2.entry.js +6 -6
  277. package/dist/esm/vega-chip.entry.js +9 -9
  278. package/dist/esm/vega-code-block.entry.js +12 -12
  279. package/dist/esm/vega-color-picker.entry.js +5 -5
  280. package/dist/esm/vega-color-swatch-picker.entry.js +7 -7
  281. package/dist/esm/vega-color-swatch.entry.js +5 -5
  282. package/dist/esm/vega-combo-box.entry.js +19 -13
  283. package/dist/esm/vega-date-picker_2.entry.js +17 -17
  284. package/dist/esm/vega-dialog_2.entry.js +20 -9
  285. package/dist/esm/vega-divider.entry.js +5 -5
  286. package/dist/esm/vega-dropdown_5.entry.js +695 -197
  287. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  288. package/dist/esm/{vega-event-id-d3017041.js → vega-event-id-270fe47e.js} +2 -1
  289. package/dist/esm/vega-field-label.entry.js +5 -5
  290. package/dist/esm/vega-file-uploader.entry.js +6 -6
  291. package/dist/esm/vega-flag-icon.entry.js +5 -5
  292. package/dist/esm/vega-flex.entry.js +6 -6
  293. package/dist/esm/vega-font.entry.js +5 -5
  294. package/dist/esm/vega-form.entry.js +7 -7
  295. package/dist/esm/vega-grid.entry.js +5 -5
  296. package/dist/esm/vega-icon.entry.js +5 -5
  297. package/dist/esm/vega-image-uploader.entry.js +9 -9
  298. package/dist/esm/vega-input-credit-card.entry.js +10 -10
  299. package/dist/esm/vega-input-numeric.entry.js +9 -9
  300. package/dist/esm/vega-input-passcode.entry.js +9 -9
  301. package/dist/esm/vega-input-phone-number.entry.js +8 -8
  302. package/dist/esm/vega-input-range.entry.js +7 -7
  303. package/dist/esm/vega-input-select.entry.js +9 -9
  304. package/dist/esm/vega-input.entry.js +9 -9
  305. package/dist/esm/vega-item-toggle.entry.js +3 -3
  306. package/dist/esm/vega-left-nav_5.entry.js +316 -111
  307. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  308. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  309. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
  310. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
  311. package/dist/esm/vega-pagination.entry.js +8 -8
  312. package/dist/esm/vega-popover_2.entry.js +11 -11
  313. package/dist/esm/vega-progress-tracker_2.entry.js +6 -6
  314. package/dist/esm/vega-radio_2.entry.js +9 -9
  315. package/dist/esm/vega-rich-text-content.entry.js +7 -7
  316. package/dist/esm/vega-rich-text-editor_4.entry.js +507 -70
  317. package/dist/esm/vega-rich-text-find-replace-panel.entry.js +4 -4
  318. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +8 -8
  319. package/dist/esm/vega-rich-text-table-properties_3.entry.js +15 -15
  320. package/dist/esm/vega-segment-control.entry.js +3 -3
  321. package/dist/esm/vega-selection-chip_2.entry.js +8 -8
  322. package/dist/esm/vega-selection-tile_2.entry.js +6 -6
  323. package/dist/esm/vega-sidenav_3.entry.js +6 -6
  324. package/dist/esm/vega-signature-capture.entry.js +10 -10
  325. package/dist/esm/vega-stepper.entry.js +6 -6
  326. package/dist/esm/vega-tab-group_2.entry.js +4 -4
  327. package/dist/esm/vega-table_11.entry.js +968 -425
  328. package/dist/esm/vega-textarea.entry.js +7 -9
  329. package/dist/esm/vega-time-picker_2.entry.js +34 -14
  330. package/dist/esm/vega-toggle-switch.entry.js +5 -5
  331. package/dist/esm/vega-tooltip_2.entry.js +6 -6
  332. package/dist/esm/vega.js +14 -14
  333. package/dist/sri/vega-sri-manifest.json +356 -356
  334. package/dist/types/components/vega-combo-box/types.d.ts +6 -1
  335. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +1 -0
  336. package/dist/types/components/vega-dropdown/constants.d.ts +1 -0
  337. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.d.ts +2 -0
  338. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-children-controller.d.ts +36 -0
  339. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-select-all-controller.d.ts +107 -0
  340. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.d.ts +17 -0
  341. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.d.ts +5 -0
  342. package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.d.ts +2 -0
  343. package/dist/types/components/vega-dropdown/types.d.ts +8 -0
  344. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.d.ts +25 -0
  345. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.d.ts +1 -0
  346. package/dist/types/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.d.ts +4 -0
  347. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +48 -0
  348. package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +2 -1
  349. package/dist/types/components/vega-modal/vega-modal.d.ts +9 -1
  350. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-auto-collapse-controller.d.ts +0 -1
  351. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-controller.d.ts +12 -19
  352. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-manager.d.ts +41 -0
  353. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.d.ts +4 -1
  354. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-zindex-controller.d.ts +1 -1
  355. package/dist/types/components/vega-nav/vega-left-nav/vega-left-nav.d.ts +2 -0
  356. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/paste-content-strategy.d.ts +14 -4
  357. package/dist/types/components/vega-rich-text-editor/dto/actions/paste-content-action.d.ts +7 -0
  358. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/action-handler-interceptors/blockquote-exit-on-enter-interceptor.d.ts +34 -0
  359. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/action-handler-strategies/block-transform-to-blockquote-strategy.d.ts +13 -0
  360. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/action-handler-strategies/remove-blockquote-strategy.d.ts +13 -0
  361. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/actions/remove-blockquote-action.d.ts +14 -0
  362. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/actions/transform-to-blockquote-action.d.ts +18 -0
  363. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/assets/quote-left.d.ts +3 -0
  364. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/blockquote-extension.d.ts +9 -0
  365. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/dto/blockquote-annotation.d.ts +48 -0
  366. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/dto/rte-blockquote-block.d.ts +56 -0
  367. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/element-to-dto-strategies/blockquote-to-blockquote-block-strategy.d.ts +35 -0
  368. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/filter-styles-strategies/blockquote-block/blockquote-filter-styles-strategy.d.ts +31 -0
  369. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-block-renderer.d.ts +18 -0
  370. package/dist/types/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-toolbar-button-renderer.d.ts +113 -0
  371. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.d.ts +15 -4
  372. package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/assets/fullscreen-enter.d.ts +3 -0
  373. package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/assets/fullscreen-exit.d.ts +3 -0
  374. package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/controller/fullscreen-controller.d.ts +63 -0
  375. package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/fullscreen-extension.d.ts +20 -0
  376. package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/fullscreen-toolbar-button-renderer.d.ts +40 -0
  377. package/dist/types/components/vega-rich-text-editor/extensions/image/image-extension.d.ts +27 -0
  378. package/dist/types/components/vega-rich-text-editor/extensions/image/type.d.ts +13 -0
  379. package/dist/types/components/vega-rich-text-editor/extensions/paste/assets/paste.d.ts +3 -0
  380. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +58 -0
  381. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-constants.d.ts +6 -0
  382. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +150 -0
  383. package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +26 -0
  384. package/dist/types/components/vega-rich-text-editor/interface.d.ts +20 -0
  385. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +5 -0
  386. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.d.ts +114 -3
  387. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +22 -13
  388. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.d.ts +10 -2
  389. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.d.ts +5 -0
  390. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.d.ts +8 -0
  391. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/slimmers/renderers/vega-rich-text-editor-toolbar-button-renderer.d.ts +1 -0
  392. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/vega-rich-text-editor-toolbar-button.d.ts +6 -0
  393. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +4 -4
  394. package/dist/types/components/vega-rich-text-editor/vega-rich-text-image-editor/vega-rich-text-image-editor.d.ts +1 -1
  395. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.d.ts +1 -1
  396. package/dist/types/components/vega-table/interface.d.ts +31 -0
  397. package/dist/types/components/vega-table/slimmers/controllers/dto/column-render-input-model.d.ts +13 -0
  398. package/dist/types/components/vega-table/slimmers/controllers/vega-table-body-col-span-controller.d.ts +43 -0
  399. package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-col-span-resolver.d.ts +38 -0
  400. package/dist/types/components/vega-table/slimmers/renderers/vega-table-cell-renderer.d.ts +11 -2
  401. package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +4 -0
  402. package/dist/types/components/vega-table/slimmers/renderers/vega-table-row-renderer.d.ts +1 -0
  403. package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-row-state-subscriber.d.ts +1 -1
  404. package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +23 -0
  405. package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.d.ts +1 -0
  406. package/dist/types/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.d.ts +9 -0
  407. package/dist/types/components/vega-table/vega-table.d.ts +2 -0
  408. package/dist/types/components/vega-time-picker/slimmers/controllers/vega-time-picker-range-dropdown-controller.d.ts +1 -0
  409. package/dist/types/components/vega-time-picker/slimmers/controllers/vega-time-picker-single-dropdown-controller.d.ts +1 -0
  410. package/dist/types/components/vega-time-picker/types.d.ts +7 -0
  411. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +11 -1
  412. package/dist/types/components.d.ts +90 -3
  413. package/dist/types/constants/ui.d.ts +1 -1
  414. package/dist/types/helpers/backdrop/index.d.ts +1 -0
  415. package/dist/types/helpers/backdrop/shared-backdrop-manager.d.ts +67 -0
  416. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
  417. package/dist/types/helpers/translation/interface.d.ts +7 -0
  418. package/dist/types/helpers/ui/element-appender.d.ts +4 -1
  419. package/dist/types/types/components.type.d.ts +5 -1
  420. package/dist/vega/index.esm.js +1 -1
  421. package/dist/vega/{p-92823583.js → p-02355de8.js} +1 -1
  422. package/dist/vega/{p-481601c0.entry.js → p-0af32f31.entry.js} +1 -1
  423. package/dist/vega/{p-438b7404.entry.js → p-0b311599.entry.js} +1 -1
  424. package/dist/vega/{p-56cf1a65.entry.js → p-0b9c7c79.entry.js} +1 -1
  425. package/dist/vega/p-0be4df0a.js +1 -0
  426. package/dist/vega/p-0d18368b.js +1 -0
  427. package/dist/vega/{p-9fafc956.entry.js → p-1232b553.entry.js} +1 -1
  428. package/dist/vega/{p-70817cf5.js → p-140616fe.js} +1 -1
  429. package/dist/vega/{p-f365601c.entry.js → p-14559974.entry.js} +1 -1
  430. package/dist/vega/{p-aa32f2f3.js → p-14baa886.js} +1 -1
  431. package/dist/vega/p-2364be92.entry.js +1 -0
  432. package/dist/vega/{p-c0629528.entry.js → p-26c7fe8b.entry.js} +1 -1
  433. package/dist/vega/p-270697c0.entry.js +1 -0
  434. package/dist/vega/p-282b37cb.js +1 -0
  435. package/dist/vega/{p-06c2ce2c.entry.js → p-288d65ad.entry.js} +1 -1
  436. package/dist/vega/p-2bf17505.entry.js +1 -0
  437. package/dist/vega/{p-c78aeaf3.entry.js → p-2dc5edd0.entry.js} +1 -1
  438. package/dist/vega/{p-136226f8.js → p-320091b7.js} +1 -1
  439. package/dist/vega/{p-b799fc1f.entry.js → p-341a6b32.entry.js} +1 -1
  440. package/dist/vega/p-36949349.js +1 -0
  441. package/dist/vega/p-38c9d782.js +1 -0
  442. package/dist/vega/{p-a361456d.js → p-3c309a38.js} +1 -1
  443. package/dist/vega/{p-71e2a3ec.js → p-3dee1e55.js} +1 -1
  444. package/dist/vega/{p-ef2b9846.entry.js → p-3e8baeac.entry.js} +1 -1
  445. package/dist/vega/{p-8f078d0d.entry.js → p-44439ecc.entry.js} +1 -1
  446. package/dist/vega/{p-68e16c70.entry.js → p-45e8424a.entry.js} +1 -1
  447. package/dist/vega/{p-ce7e9515.entry.js → p-46fe3154.entry.js} +1 -1
  448. package/dist/vega/{p-c2e0f8b7.entry.js → p-48ee3e24.entry.js} +1 -1
  449. package/dist/vega/{p-e371738b.js → p-4fe40b76.js} +1 -1
  450. package/dist/vega/p-4ff48b84.js +1 -0
  451. package/dist/vega/{p-2e58d99e.entry.js → p-5107277d.entry.js} +1 -1
  452. package/dist/vega/{p-2def8e3e.js → p-51b68d25.js} +1 -1
  453. package/dist/vega/p-52c6a399.entry.js +1 -0
  454. package/dist/vega/p-579cdeae.js +1 -0
  455. package/dist/vega/{p-e9cee498.entry.js → p-595998d9.entry.js} +1 -1
  456. package/dist/vega/{p-7798254d.entry.js → p-5db61a12.entry.js} +1 -1
  457. package/dist/vega/{p-e41d9d0e.entry.js → p-5df2d6a1.entry.js} +1 -1
  458. package/dist/vega/p-5f377954.js +1 -1
  459. package/dist/vega/{p-d7369441.js → p-61ce8029.js} +1 -1
  460. package/dist/vega/{p-2da12975.entry.js → p-62d6e063.entry.js} +1 -1
  461. package/dist/vega/p-698fbd73.js +1 -0
  462. package/dist/vega/p-6ad7144a.entry.js +1 -0
  463. package/dist/vega/{p-f70f7ad8.entry.js → p-6c9c2f8c.entry.js} +1 -1
  464. package/dist/vega/{p-b730bf6e.js → p-6cde45fc.js} +1 -1
  465. package/dist/vega/p-6dfe2407.js +1 -0
  466. package/dist/vega/{p-d3c8b871.entry.js → p-6f01a71a.entry.js} +1 -1
  467. package/dist/vega/p-6f70a10f.entry.js +1 -0
  468. package/dist/vega/p-73f2c3c0.entry.js +1 -0
  469. package/dist/vega/{p-de885ef2.js → p-75e33859.js} +1 -1
  470. package/dist/vega/p-762ea523.entry.js +1 -0
  471. package/dist/vega/{p-f6bccb06.entry.js → p-782eb312.entry.js} +1 -1
  472. package/dist/vega/p-7a88a3d3.entry.js +1 -0
  473. package/dist/vega/{p-5038b6d7.entry.js → p-7b57a845.entry.js} +1 -1
  474. package/dist/vega/p-83a16285.entry.js +1 -0
  475. package/dist/vega/{p-8da860f6.js → p-8720816e.js} +1 -1
  476. package/dist/vega/{p-9219201a.entry.js → p-892edf88.entry.js} +1 -1
  477. package/dist/vega/{p-625351a3.entry.js → p-8c083255.entry.js} +1 -1
  478. package/dist/vega/{p-4d9061fb.js → p-8db904dc.js} +1 -1
  479. package/dist/vega/{p-22f73e6e.entry.js → p-91287214.entry.js} +1 -1
  480. package/dist/vega/{p-5946fadf.js → p-919cddc3.js} +1 -1
  481. package/dist/vega/{p-fc5dfb52.entry.js → p-95913e3c.entry.js} +1 -1
  482. package/dist/vega/p-97215133.js +1 -0
  483. package/dist/vega/{p-5829a66d.entry.js → p-9bdc6e11.entry.js} +1 -1
  484. package/dist/vega/{p-8b9a8603.entry.js → p-9d18ba7f.entry.js} +1 -1
  485. package/dist/vega/{p-f7739cbb.entry.js → p-9dca874d.entry.js} +1 -1
  486. package/dist/vega/{p-c67ce78c.entry.js → p-9f38448c.entry.js} +1 -1
  487. package/dist/vega/{p-e3803943.js → p-9f7154d2.js} +1 -1
  488. package/dist/vega/{p-2314494a.entry.js → p-a057285e.entry.js} +1 -1
  489. package/dist/vega/{p-f515d189.entry.js → p-a0a58295.entry.js} +1 -1
  490. package/dist/vega/p-a7209700.js +1 -0
  491. package/dist/vega/{p-40501057.entry.js → p-a890d60b.entry.js} +1 -1
  492. package/dist/vega/{p-450bf94d.entry.js → p-addbca58.entry.js} +1 -1
  493. package/dist/vega/{p-45ab490c.js → p-b1eb9ff0.js} +1 -1
  494. package/dist/vega/{p-5beec481.js → p-b1ff70bf.js} +1 -1
  495. package/dist/vega/{p-9cdedcfb.entry.js → p-b39d4a88.entry.js} +1 -1
  496. package/dist/vega/{p-ea22cba0.js → p-b4e7c967.js} +1 -1
  497. package/dist/vega/{p-228c5de8.js → p-b775e51f.js} +1 -1
  498. package/dist/vega/{p-43c3848f.entry.js → p-b8f8e480.entry.js} +1 -1
  499. package/dist/vega/{p-8d69b201.js → p-ba662fe5.js} +1 -1
  500. package/dist/vega/p-c66d2a1e.js +1 -0
  501. package/dist/vega/{p-a268a4fb.entry.js → p-c67b9aba.entry.js} +1 -1
  502. package/dist/vega/{p-2353b64f.entry.js → p-c9c6daa6.entry.js} +1 -1
  503. package/dist/vega/p-c9daabe1.entry.js +1 -0
  504. package/dist/vega/{p-37dffdf6.entry.js → p-cad5222a.entry.js} +1 -1
  505. package/dist/vega/{p-e160a727.entry.js → p-cb90163a.entry.js} +1 -1
  506. package/dist/vega/{p-5545a235.entry.js → p-d08ffdf1.entry.js} +1 -1
  507. package/dist/vega/{p-30561e1d.entry.js → p-d3a36d19.entry.js} +1 -1
  508. package/dist/vega/{p-cd1844ad.entry.js → p-e235020b.entry.js} +1 -1
  509. package/dist/vega/{p-9440a8a5.entry.js → p-e4266b45.entry.js} +1 -1
  510. package/dist/vega/{p-18413b62.entry.js → p-e48a870f.entry.js} +1 -1
  511. package/dist/vega/{p-590c8720.entry.js → p-e8ee70c5.entry.js} +1 -1
  512. package/dist/vega/p-ed103a1a.entry.js +1 -0
  513. package/dist/vega/p-f05a193e.entry.js +1 -0
  514. package/dist/vega/{p-7be548a7.js → p-f1974321.js} +1 -1
  515. package/dist/vega/{p-916dfa7e.entry.js → p-f246f125.entry.js} +1 -1
  516. package/dist/vega/p-f4da615a.js +3 -0
  517. package/dist/vega/{p-d0ce752f.entry.js → p-f5d7b89f.entry.js} +1 -1
  518. package/dist/vega/{p-c8eaf91c.entry.js → p-f651df3b.entry.js} +1 -1
  519. package/dist/vega/{p-93dfab05.js → p-f7e459cd.js} +1 -1
  520. package/dist/vega/{p-b6ebfd5c.entry.js → p-f8a29127.entry.js} +1 -1
  521. package/dist/vega/p-f906a7bc.entry.js +1 -0
  522. package/dist/vega/{p-d20587b4.entry.js → p-f96d0503.entry.js} +1 -1
  523. package/dist/vega/{p-cd9fb2ca.entry.js → p-fbd3be00.entry.js} +1 -1
  524. package/dist/vega/{p-f0bc2bbb.js → p-fe24b459.js} +1 -1
  525. package/dist/vega/vega.esm.js +1 -1
  526. package/package.json +2 -16
  527. package/readme.md +0 -5
  528. package/dist/cjs/replace-selected-text-action-a31563ed.js +0 -20
  529. package/dist/esm/replace-selected-text-action-c0817b2b.js +0 -18
  530. package/dist/vega/p-0179f55d.js +0 -1
  531. package/dist/vega/p-07b56f2b.entry.js +0 -1
  532. package/dist/vega/p-209e0166.js +0 -1
  533. package/dist/vega/p-35df0f0a.entry.js +0 -1
  534. package/dist/vega/p-3cf4339a.entry.js +0 -1
  535. package/dist/vega/p-4953bb1a.js +0 -1
  536. package/dist/vega/p-4e39adf5.entry.js +0 -1
  537. package/dist/vega/p-5319da71.entry.js +0 -1
  538. package/dist/vega/p-53c76d9d.entry.js +0 -1
  539. package/dist/vega/p-5de1acdb.js +0 -1
  540. package/dist/vega/p-5df9047c.js +0 -1
  541. package/dist/vega/p-683cfe24.js +0 -1
  542. package/dist/vega/p-802bf369.js +0 -1
  543. package/dist/vega/p-82279b03.entry.js +0 -1
  544. package/dist/vega/p-8509c140.entry.js +0 -1
  545. package/dist/vega/p-8aa07ed0.js +0 -1
  546. package/dist/vega/p-970115d6.js +0 -1
  547. package/dist/vega/p-9b1d718c.entry.js +0 -1
  548. package/dist/vega/p-c78e8081.entry.js +0 -1
  549. package/dist/vega/p-ca9852bb.js +0 -1
  550. package/dist/vega/p-dee38163.entry.js +0 -1
  551. package/dist/vega/p-e5502873.entry.js +0 -1
  552. package/dist/vega/p-ea54ce0a.js +0 -3
  553. package/dist/vega/p-ee3155bd.js +0 -1
  554. package/dist/vega/p-eee01ba7.entry.js +0 -1
  555. package/dist/vega/p-f4a01959.js +0 -1
  556. package/dist/vega/p-f5aefb2f.entry.js +0 -1
@@ -1,3 +0,0 @@
1
- import{d as t,b as e,R as n,e as s,A as r,T as i,u as a,H as o,v as l,i as c,w as h,x as u,y as d,z as w,D as p,I as m,k as f,E as g,g as x,B as T,F as b,a as O,r as y,G as E,l as A,p as k,s as H,J as N,N as j,o as C,K as B,L as v,j as S,O as I,M as R,S as L,P as $,Q as D,U as M,W as P,X as F,Y as z,Z as U,_ as V,$ as W,a0 as G,a1 as J,a2 as K,t as Y,a3 as X,n as Q,a4 as Z,a5 as _,a6 as q,m as tt,a7 as et,a8 as nt,q as st,a9 as rt}from"./p-f4a01959.js";import{g as it}from"./p-8b5d3a52.js";import{i as at}from"./p-4d9061fb.js";import{C as ot}from"./p-2d0d575f.js";import{d as lt}from"./p-526e3634.js";import{c as ct,d as ht,e as ut}from"./p-3a68b729.js";import{r as dt,i as wt}from"./p-528748fa.js";import{c as pt}from"./p-a841cf13.js";import{L as mt}from"./p-6e1ab235.js";class ft extends e{constructor(t,e,n){super(t,"list-item",n),this.dtoName=ft.dtoName,this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new ft(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=xt.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);at(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(t){return[`<li${super.generateAttributeString(t)}>`,this.getChildrenHtml(t),"</li>"].join("")}cloneWithNodes(t){const e=new ft(it());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new ft(it())}clone(t){var e;const n=new ft(this.id);return n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(n))),n.parent=t,n}}r.register(i.name,ft.name,new a),r.register(o.name,ft.name,new l),r.register(c.LINE_BREAK_SINGLE_BLOCK,ft.name,new h),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,ft.name,new u),r.register(c.DELETE_NEST_LIST,ft.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(c.SPLIT_BLOCK_WITH_NODE,ft.name,new d),r.register(c.REPLACE_CHILD_NODES,ft.name,new w),r.register(c.REPLACE_NEST_LIST,ft.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(c.MERGE_TWO_BLOCKS_NODES,ft.name,new p),r.register(c.INSERT_IMAGE_TO_BLOCK,ft.name,new class extends t{handleAction(t,e){e.parent.apply(t)}}),ft.dtoName="RTEListItemBlock";class gt extends T{constructor(){super(...arguments),this.type=b.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?gt.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new gt}toJSON(){}}class xt extends O{constructor(t,e,n){super(t),this.dtoName=xt.dtoName,this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(b.LIST,new gt)}static from(t,e={autoMatchFormat:!0}){const n=new xt(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);at(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=ft.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return A.from(e);case"customClass":return E.from(e);case"customStyle":return y.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag();return[`<${e}${super.generateAttributeString(t)}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new xt(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(c.TRANSFORM_LIST_BLOCK,xt.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new m(e,r)),e.parent.apply(new f(e)),n.forEach((t=>t.children.map((t=>t.apply(new g)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new m(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new f(t))})),0===e.children.length&&e.parent.apply(new f(e))}}}),r.register(c.TRANSFORM_PARAGRAPH_BLOCK,xt.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,a=i.map((t=>(t.children.map((t=>t.apply(new g))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new x(e,...a));else if(r)e.parent.apply(new m(e,...a));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const o=e.parent.createList(e.type);o.apply(new s(e.children.slice(n+1))),e.parent.apply(new x(e,r,...a,o)),e.parent.apply(new f(e))}i.map((t=>{e.apply(new f(t))})),0===e.children.length&&e.parent.apply(new f(e))}toParagraph(t){const n=new e(it(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(c.INSERT_IMAGE_TO_BLOCK,xt.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new m(e,t.imageBlockToBeInserted):t)}}),xt.dtoName="RTEListBlock";class Tt{}class bt{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(at)),e}}const Ot=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},yt=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r],e))continue;let i=0;for(const a of n)if(i=a.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),o=new bt(a,n);1===i&&a.shouldProceedToElementChildren()&&o.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(o),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t,e){return t.nodeType===Node.COMMENT_NODE||!1!==e.autoMatchFormat&&["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return Ot.getElementToBlockStrategies()}};class Et extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class At extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class kt extends At{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class Ht extends N{constructor(t,e){super(),this.type=j.IMAGE,this.size=t,this.alt=e}static from(t,e){return[j.IMAGE,new Ht(t,e)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return at(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new Ht(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e=Ht.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}Ht.BASE_STYLES={verticalAlign:"bottom"};class Nt extends C{constructor(t,e,n,s){super(t,s),this.dtoName=Nt.dtoName,this.type=B.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new Nt(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:a}=i,o=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),l=Object.assign(Object.assign({},o),{size:null!=a?a:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?Ht.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter(at)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof Ht||t instanceof v)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(t){return new Nt(this.id,this.url,t,super.cloneAnnotations())}toHtml(t){const e=this.getAnnotationByType(j.IMAGE);return`<img${super.generateAttributeString(t,...[e&&e.alt?`alt="${e.alt}"`:null,`src="${this.url}"`,e&&e.size?`data-size="${e.size}"`:null].filter(at))}>`}doAnnotationActionApply(t){const e=r.get(S.name,Nt.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(c.UPDATE_IMAGE_NODE_URL,Nt.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(S.name,Nt.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}}),Nt.dtoName="RTEImageNode";class jt extends R{constructor(t,e){super(),this.type=c.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class Ct extends O{constructor(t){super(t),this.dtoName=Ct.dtoName,this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new Ct(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>Nt.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=super.generateAttributeString(t),n=this.children.map((e=>e.toHtml(t))).join("");return super.shouldRenderAsInternalWrapper()?n:[`<div${e}>`,n,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new Ct(it())}clone(t){const e=new Ct(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}r.register(c.MERGE_TWO_BLOCKS_NODES,Ct.name,new p),r.register(c.REPLACE_CHILD_NODES,Ct.name,new w),r.register(c.SPLIT_BLOCK_WITH_NODE,Ct.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new I(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new m(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(c.LINE_BREAK_SINGLE_BLOCK,Ct.name,new class extends t{handleAction(t,e){const n=new jt(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,Ct.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:it(),type:"paragraph",nodes:[{id:it(),type:"text",text:"\n"}]});r.parent.apply(new m(r,i));const a=this.concatBlocksNodes(t.slice(1));return(0===a.length||a[0]&&""===a[0].text)&&a.push(new n(it(),"\n",i)),i.apply(new s(a)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new f(t)))})),e}}),r.register(c.INSERT_IMAGE_TO_BLOCK,Ct.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new m(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new x(e,i)):(e.apply(new L(n,r)),e.parent.apply(new m(e,i)))}}),r.register(o.name,Ct.name,new l),Ct.dtoName="RTEImageBlock";class Bt extends O{constructor(t,e){super(t),this.dtoName=Bt.dtoName,this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new Bt(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}clone(t){const e=new Bt(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(t){const e=this.htmlTag,n=super.generateAttributeString(t);return $.has(this.htmlTag)?`<${e}${n}>`:[`<${e}${n}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}Bt.dtoName="RTEHtmlBlock";class vt extends R{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class St extends D{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new f(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new M(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new f(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;const i=n.isEmpty();if(e.children.length&&s&&s.parent!==e)i&&e.apply(new f(n)),e.type===s.parent.type&&s.parent.apply(new vt(e));else if(this.isContentFirstNode(n)&&i&&(r=this.getNextNode(n)),i&&e.apply(new f(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===e)){const t=s;s=this.getPreviousNode(s),t.parent.apply(new f(t)),s||i||(r=n)}0===e.children.length&&e.parent.apply(new f(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new f(t)):t.apply(new f(n))}else{const s=r;s&&!s.isContentEditable()&&s.parent===e?(r=this.getPreviousNode(s),s.parent.apply(new f(s)),r||(t.nextNode=n)):r&&r.parent!==e&&e.type===r.parent.type&&r.parent.apply(new vt(e))}r?t.previousNode=r:i&&(t.nextNode=i)}}class It extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new m(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new L(t,e);return n.apply(s),s.newBlock}n.parent.apply(new x(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(j.LINK),e.apply(new s([n]))),e}}}class Rt extends R{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class Lt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:i}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==i){const e=r.text.substring(0,i),n=r.text.substring(i),a=r.cloneWithText(e),o=r.cloneWithText(n),l=[a,s];n&&l.push(o),t.apply(new x(r,...l)),t.apply(new f(r))}else t.apply(new x(r,s));else t.apply(0!==i?new m(r,s):new x(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new Rt(t))}}class $t extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new m(r,t):new x(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new Rt(t))}}class Dt extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new L(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new x(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:it(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new m(n.parent,i)),n.parent.apply(new f(n)),i}r.parent.apply(new m(r,t)),n.parent.apply(new f(n))}else n.parent.apply(new m(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(j.LINK),e}}class Mt extends R{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class Pt extends P{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new Mt(e):new f(e))}}class Ft extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let i=e;if(s===e.children[0]&&0===r)e.parent.apply(new x(e,...n));else{const t=new L(s,r);e.apply(t),e.parent.apply(new m(e,...n)),i=t.newBlock}t.futureFocusBlock=i}}}const zt=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===xt.name?new Pt:new P),r.register(c.APPEND_CHILDREN,t,new Et),r.register(c.INSERT_CHILDREN_BEFORE,t,new At),r.register(c.INSERT_CHILDREN_AFTER,t,new kt),r.register(c.DELETE_BLOCK_CONTENT,t,new St),r.register(c.INSERT_NEW_PARAGRAPH,t,t===ft.name?new Dt:new It),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new $t),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new Lt),r.register(c.PASTE_CONTENT,t,new Ft)}};class Ut{}class Vt extends Ut{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||t.style.fontWeight===F||t.style.fontWeight===z||t.classList.contains("v-rte--bold")}}class Wt extends Ut{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Gt extends Ut{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class Jt extends Ut{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=U(t);return Object.keys(e).length>0?{customStyle:e}:{}}}class Kt extends Ut{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.dtoName)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class Yt extends Ut{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.dtoName)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Xt extends Ut{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Qt extends Ut{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=dt(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=V.filter((t=>t.key!==W.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of V)if(t.style.color.includes(e.key))return e.key;return null}}class Zt extends Ut{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||t.style.fontStyle===G||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class _t extends Ut{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.dtoName}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte-(?:-text-style-)?(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class qt{static isTitleOrSubtitle(t){if("DIV"===t.nodeName){const e=qt.textStyleHandler.getTextStyle(t);return"title"===e||"subtitle"===e}return!1}static isLinkElement(t){return"A"===t.nodeName}}qt.textStyleHandler=new _t;class te extends Ut{constructor(){super(...arguments),this.handlers=[new Wt,new Gt,new Jt]}canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return e.link?{link:e.link}:qt.isLinkElement(t)?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:it()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class ee extends Ut{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes(J)||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class ne extends Ut{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes(K)||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class se extends Ut{canHandle(t){return"RTEImageNode"===t.dtoName}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class re extends Ut{canHandle(t){return"RTEImageNode"===t.dtoName}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}const ie=new Set(["P","H1","H2","H3","H4","H5","H6","LI"]),ae=new Set(["P","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","CODE"]),oe=new Set(["BR","VEGA-RICH-TEXT-LINK-EDITOR","CODE","A"]),le=new Set(["TABLE","THEAD","TBODY","TFOOT","TR","DL"]),ce=new Set(["ABBR","B","BDI","BDO","CITE","DEL","DFN","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR"]);function he(t){return ie.has(t.parentElement.nodeName)}class ue extends Ut{constructor(){super(...arguments),this.customAttributeHandler=new Wt,this.customStyleAnnotationHandler=new Jt,this.customClassAnnotationHandler=new Gt}canHandle(t,e){return"RTETextNode"===t.dtoName&&!1===e.autoMatchFormat}handle(t,e){if(ae.has(t.nodeName)&&!oe.has(t.nodeName))return{};const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));return n?{inlineHtml:n}:{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;const r=Array.from(t.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE));if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||r){const e=Object.assign(Object.assign({htmlTag:t.nodeName.toLowerCase()},r?{groupId:it()}:{}),{customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass});s=s?this.appendToInlineHtmlChain(s,e,t.parentNode):e}return s?Object.assign({},s):null}appendToInlineHtmlChain(t,e,n){return t.child&&n&&t.child.htmlTag===n.nodeName.toLowerCase()?Object.assign(Object.assign({},t),{child:this.appendToInlineHtmlChain(t.child,e,n)}):Object.assign(Object.assign({},t),{child:e})}}const de=new class{constructor(){this.handlers=[new Yt,new Kt,new Vt,new Zt,new ne,new ee,new Qt,new te,new Xt,new se,new re,new Wt,new Gt,new Jt,new _t,new ue]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){n&&n.filterInlineStyles&&Y.executeTheStrategyRefillAction(t.dtoName,e);const s=qt.isLinkElement(e)&&"RTETextNode"===t.dtoName,r=this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof te)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{});this.removeTextStyleDefaultsFromCustomStyle(r);const i=Y.getStrategies(t.dtoName);for(const t of i)(n.autoMatchFormat||t.alwaysFilter)&&t.filterAnnotations(r);return r}removeTextStyleDefaultsFromCustomStyle(t){const e="textStyle"in t?t.textStyle:void 0,n=t.customStyle;if(!e||!n)return t;const s=X.getDefaultStyles(e);if(!s)return t;for(const t of Object.keys(s))n[t]===s[t]&&delete n[t];return 0===Object.keys(n).length&&delete t.customStyle,t}};class we extends Tt{constructor(){super(...arguments),this.annotationHandler=new _t}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),a=Object.assign({},e);return t.forEach((t=>{const o=Ot.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(o&&(l=o.handle([t],s,a)),l)r.push(l);else if(wt(t)&&t.childNodes.length>0){const o=de.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:a.inlineHtml,link:a.link,code:a.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),o,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class pe extends we{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return k.from({id:it(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class me extends we{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return Ct.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:t.src,annotations:de.generate(Nt,t,e)}],annotations:Object.assign(Object.assign({},de.generate(Ct,t.parentElement,e)),{internalWrapper:n})},e)}}class fe extends Tt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:it(),type:"text",text:t,annotations:e}}}class ge extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const{textAlign:e,customStyle:n}=t;return e&&n?(this.stylesToBeFiltered=_.getDefaultStyles(e),super.filterAnnotations(t)):t}}class xe extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.type="paragraph",this.elementTagName="p"}filterAnnotations(t){return t}canFilter(t){return Z.isTextBlock(t.dtoName)&&t.type===this.type}canRefill(t,e){const n=this.classNameToBeAdded?`.${this.classNameToBeAdded}`:this.elementTagName;return Z.isTextBlock(t)&&e.matches(n)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class Te extends xe{constructor(t){super(),this.type="heading-1",this.elementTagName="h1",this.type=`heading-${t}`,this.elementTagName=`h${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class be extends xe{constructor(t){super(),this.type="title",this.elementTagName="div",this.classNameToBeAdded="v-rte-title",this.type=t,this.classNameToBeAdded=`v-rte-${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class Oe extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=Oe.BOLD_STYLES,this.elementTagName="span",this.parentBlockTypes=["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title"],this.parentElementSelectors=["h1","h2","h3","h4","h5","h6",".v-rte-title"],this.toBeCheckedSelector=this.parentElementSelectors.join(",")}filterAnnotations(t){return t}canFilter(t){return Z.isTextNode(t.dtoName)&&this.parentBlockIsHeadingOrTitle(t)}canRefill(t,e){return Z.isTextNode(t)&&"SPAN"===e.nodeName&&this.isHeadingOrTitleChild(e)}toCssText(){return`${this.parentElementSelectors.map((t=>`.${Oe.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t}`)).join(",")} { ${this.convertStylesMapToCssText()} }`}parentBlockIsHeadingOrTitle(t){const e=t.parent;return!!e&&this.parentBlockTypes.includes(e.type)}isHeadingOrTitleChild(t){let e=t.parentElement;for(;e;){if(e.matches(this.toBeCheckedSelector))return!0;if(Oe.NON_HEADING_TITLE_ELEMENT_TAGS.includes(e.tagName))return!1;e=e.parentElement}return!1}}Oe.BOLD_STYLES={fontWeight:"700"},Oe.NON_HEADING_TITLE_ELEMENT_TAGS=["TD","TH","TR","TABLE","THEAD","TBODY","DIV","BODY"];class ye extends Te{constructor(t){super(t),this.classNameToBeAdded=`v-rte-h${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}class Ee extends be{constructor(t){super(t),this.classNameToBeAdded=`v-rte-${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}tt.registerRTEDTOClass("paragraph",e),tt.registerRTEDTOClass("title",e),tt.registerRTEDTOClass("subtitle",e),tt.registerRTEDTOClass("heading-1",e),tt.registerRTEDTOClass("heading-2",e),tt.registerRTEDTOClass("heading-3",e),tt.registerRTEDTOClass("heading-4",e),tt.registerRTEDTOClass("heading-5",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("list-item",ft),tt.registerRTEDTOClass("bullet-list",xt),tt.registerRTEDTOClass("number-list",xt),tt.registerRTEDTOClass("image",Ct),tt.registerRTEDTOClass("code-block",k),tt.registerRTEDTOClass("html-block",Bt),tt.registerRTEDTOClass("text",n),tt.registerRTEDTOClass("image",Nt),zt.registerBlockBasicStrategies(e.name),zt.registerBlockBasicStrategies(xt.name),zt.registerBlockBasicStrategies(ft.name),zt.registerBlockBasicStrategies(Ct.name),zt.registerBlockBasicStrategies(Bt.name),Ot.registerElementToBlockStrategy(new class extends we{canHandle(t,e,n){let s=0;for(let r=e;r<t.length&&this.isInlineCandidate(t[r],n);r++)s++;return s}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,a=this.generateChildNodes(t,i?de.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),o=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!i&&!o;return e.from(Object.assign({id:it(),type:o||"paragraph",nodes:a},l?{annotations:{internalWrapper:l}}:{annotations:de.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}isInlineCandidate(t,e){return t.nodeType===Node.TEXT_NODE||!!oe.has(t.nodeName)||!this.isDedicatedBlockTag(t.nodeName)&&(!(!1!==e.autoMatchFormat||!he(t))||this.isInlineLeafOrWrapper(t))}isDedicatedBlockTag(t){return ae.has(t)&&!oe.has(t)}isInlineLeafOrWrapper(t){return 0===t.childNodes.length?ce.has(t.nodeName):this.isTextOnlyElement(t)?ce.has(t.nodeName)||oe.has(t.nodeName):this.hasOnlyInlineDescendants(t)}isTextOnlyElement(t){const e=Array.from(t.childNodes);return!e.some((t=>t.nodeType===Node.ELEMENT_NODE))&&e.some((t=>t.nodeType===Node.TEXT_NODE))}hasOnlyInlineDescendants(t){for(let e=0;e<t.children.length;e++){const n=t.children[e];if(this.isDedicatedBlockTag(n.nodeName))return!1;if(!n.hasChildNodes())return!1;if(!this.hasOnlyInlineDescendants(n))return!1}return!0}}),Ot.registerElementToBlockStrategy(new class extends me{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Ot.registerElementToBlockStrategy(new class extends me{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(at(s))return Ct.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:s.src,annotations:de.generate(Nt,n,e)}],annotations:de.generate(Ct,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Ot.registerElementToBlockStrategy(new class extends me{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Ot.registerElementToBlockStrategy(new class extends we{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:it(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:de.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Ot.registerElementToBlockStrategy(new class extends we{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?ft.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return xt.from({id:it(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:it(),type:"list-item",annotations:de.generate(ft,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),de.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),Ot.registerElementToBlockStrategy(new class extends we{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),a=at(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&a?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return ft.from({id:it(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Ot.registerElementToBlockStrategy(new class extends we{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:xt.from({id:it(),type:"number-list",blocks:[],annotations:de.generate(xt,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof ft)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Ot.registerElementToBlockStrategy(new class extends we{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:xt.from({id:it(),type:"bullet-list",blocks:[],annotations:de.generate(xt,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof ft)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Ot.registerElementToBlockStrategy(new class extends we{canHandle(t,e,n){const s=t[e];return s.nodeType===Node.TEXT_NODE||this.isInlineTagWithoutBlockChildren(s,n)||ae.has(s.nodeName)&&!this.shouldFallBackToHtmlBlock(s)||n.autoMatchFormat||!this.isCustomHtmlContainer(s)||qt.isTitleOrSubtitle(s)?0:1}handle(t,e){return Bt.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}isInlineTagWithoutBlockChildren(t,e){if(oe.has(t.nodeName)&&0===t.childNodes.length)return!0;if(he(t))return!(0===t.childNodes.length&&""===t.textContent&&!oe.has(t.nodeName)&&!ce.has(t.nodeName));const n=Array.from(t.childNodes);return!(n.some((t=>t.nodeType===Node.ELEMENT_NODE))||!n.some((t=>t.nodeType===Node.TEXT_NODE)))&&(!1!==e.autoMatchFormat||!le.has(t.parentElement.nodeName)&&(ce.has(t.nodeName)||oe.has(t.nodeName)))}shouldFallBackToHtmlBlock(t){const e=Array.from(t.childNodes);if(0===e.length)return!1;const n=t.parentElement.nodeName;return"UL"!==n&&"OL"!==n&&e.every((t=>t.nodeType===Node.ELEMENT_NODE&&""===t.textContent&&!oe.has(t.nodeName)&&!ce.has(t.nodeName)))}isCustomHtmlContainer(t){return"DIV"!==t.nodeName||t.childNodes.length>0&&"IMG"!==t.childNodes[0].nodeName}generateHtmlBlock(t,e){return{id:it(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:de.generate(Bt,t,e),children:[]}}}),
2
- //!important: Code block strategies must be registered after HtmlBlockStrategy because registerElementToBlockStrategy uses unshift, giving later registrations higher priority.
3
- Ot.registerElementToBlockStrategy(new pe),Ot.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){return"VEGA-CODE-BLOCK"===t[e].tagName&&0==!!t[e].querySelector("vega-code-block")||this.isCodeBlockContainer(t[e])?1:0}handle(t){const e=this.isCodeBlockContainer(t[0])?t[0].querySelector("vega-code-block"):t[0],n=e.querySelector("code");if(n)return super.handle([n]);if(e.hasAttribute("data-content")){const t=document.createElement("code");return t.textContent=e.dataset.content,t.dataset.language=e.dataset.language,super.handle([t])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(t){return"PRE"===t.tagName&&t.classList.contains("code-block-container")&&1===t.querySelectorAll("vega-code-block").length}}),Ot.registerElementToNodeStrategy(new class extends fe{canHandle(t,e){const n=t[e];return!wt(n)||"BR"!==n.nodeName&&0!==n.childNodes.length?0:1}handle(t,e,s){const r=!(!e||!1!==e.autoMatchFormat),i=Object.assign({},s),a=t[0],o=de.generate(n,a,Object.assign({parentAnnotations:r?{inlineHtml:i.inlineHtml,link:i.link,code:i.code}:s},e));if("BR"===a.nodeName){const{inlineHtml:t}=o,e=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(o,["inlineHtml"]);return this.generateTextNode("\n",t&&"br"===t.htmlTag?e:o)}if(0===a.childNodes.length){const t=r?pt(Object.assign(Object.assign({},n.supportsHtmlTag(a.nodeName.toLowerCase())?o:{}),{inlineHtml:o.inlineHtml})):o;return Object.assign({},this.generateTextNode("",t))}}}),Ot.registerElementToNodeStrategy(new class extends fe{canHandle(t,e){return t[e].nodeType===Node.TEXT_NODE?1:0}handle(t,e,s){const r=Object.assign({},s),i=!(!e||!1!==e.autoMatchFormat),a=t[0],o=a.parentNode.nodeName.toLowerCase(),l=i&&!n.supportsHtmlTag(o),c=this.generateTextNode(String(a.textContent),i?pt(Object.assign(Object.assign({},"span"===o?r:{link:r.link,code:"code"===o?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:l||void 0})):r);return Object.assign({},c)}}),Y.register(e.dtoName,new ge),Y.register(xt.dtoName,new ge),Y.register(ft.dtoName,new ge),Y.register(n.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const e=t,n=e.customStyle;if(!n)return t;e.bold&&n.fontWeight===z&&delete n.fontWeight,e.italic&&n.fontStyle===G&&delete n.fontStyle;const s=this.normalizeTextDecoration(n.textDecoration);return s&&this.shouldRemoveTextDecoration(s,e)&&delete n.textDecoration,0===Object.keys(n).length&&delete e.customStyle,t}normalizeTextDecoration(t){if(!t)return;const e=t.trim().toLowerCase().split(/\s+/);return e.some((t=>t!==K&&t!==J))?void 0:Array.from(new Set(e)).sort().join(" ")}shouldRemoveTextDecoration(t,e){const n=[];return e.underline&&n.push(K),e.strikethrough&&n.push(J),0!==n.length&&t===n.sort().join(" ")}}),Y.register(e.dtoName,new xe),Y.register(e.dtoName,new Te(1)),Y.register(e.dtoName,new Te(2)),Y.register(e.dtoName,new Te(3)),Y.register(e.dtoName,new Te(4)),Y.register(e.dtoName,new Te(5)),Y.register(e.dtoName,new Te(6)),Y.register(e.dtoName,new be("title")),Y.register(e.dtoName,new be("subtitle")),Y.register(n.dtoName,new Oe),Y.register(n.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=q.getDefaultStyles(),this.elementTagName="code"}filterAnnotations(t){const{code:e,customStyle:n}=t;return e&&n?super.filterAnnotations(t):t}canFilter(t){return Z.isCodeNode(t)}canRefill(t,e){return Z.isTextNode(t)&&e.matches(this.elementTagName)}toCssText(){return`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${this.elementTagName} { ${this.convertStylesMapToCssText(Object.assign(Object.assign({},this.stylesToBeFiltered),{fontWeight:"500"}))} }`}}),Y.register(n.dtoName,new et),Y.register(Nt.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=Ht.getDefaultStyles(),this.elementTagName="img"}get alwaysFilter(){return!0}canFilter(t){return Z.isImageNode(t)}canRefill(t,e){return e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}),Y.register(k.dtoName,new nt),Y.register(st.dtoName,new rt),Y.register(xt.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=gt.getDefaultStyles(),this.elementTagName="ol,ul"}canFilter(t){return Z.isListBlock(t.dtoName)}canRefill(t,e){return Z.isListBlock(t)&&e.matches(this.elementTagName)}toCssText(){return`${this.elementTagName.split(",").map((t=>`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t.trim()}`)).join(", ")} { ${this.convertStylesMapToCssText(this.stylesToBeFiltered)} }`}}),Y.register(ft.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.elementTagName="li",this.headingOrTitleClassNamePattern=/^v-rte-(h[1-6]|title|subtitle)$/}canFilter(t){const e=!t.getStyles().fontSize||this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"]);return Z.isListItemBlock(t.dtoName)&&e}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&this.isElementNotHeadingOrTitle(e)}toCssText(){return this.buildCssTextForStyles(this.elementTagName)}isElementNotHeadingOrTitle(t){return!t.className.split(" ").some((t=>this.headingOrTitleClassNamePattern.test(t.trim())))}}),Y.register(ft.dtoName,new ye(1)),Y.register(ft.dtoName,new ye(2)),Y.register(ft.dtoName,new ye(3)),Y.register(ft.dtoName,new ye(4)),Y.register(ft.dtoName,new ye(5)),Y.register(ft.dtoName,new ye(6)),Y.register(ft.dtoName,new Ee("title")),Y.register(ft.dtoName,new Ee("subtitle"));class Ae{static preserve(t){const e=t.replace(/\s+style=/g," data-style=");return new ke(e)}}class ke{constructor(t){this.processedHtml=t}getProcessedHtml(){return this.processedHtml}restore(t){this.walkNodes(t)}walkNodes(t){t.forEach((t=>{if(wt(t)){const e=t.getAttribute("data-style");e&&(t.style.cssText=e,t.removeAttribute("data-style")),t.children.length>0&&this.walkNodes(Array.from(t.children))}}))}}class He{process(t){return t.replace(/(<[^>]+>)(\s+)(<[^>]+>)/g,((t,e,n,s)=>{const r=this.extractOpeningTagName(e),i=this.extractClosingTagName(s);return r&&i&&r===i?`${e}${n}${s}`:`${e}${s}`}))}extractOpeningTagName(t){const e=t.match(/<(\w[\w-]*)/);return e?e[1]:null}extractClosingTagName(t){const e=t.match(/<\/(\w[\w-]*)/);return e?e[1]:null}}class Ne{process(t){return t.replace(/(>)[\n\t]+(?=.)/g,"$1")}}class je{process(t){return t.replace(/(.?)[\n\t]+(?=<)/g,"$1")}}class Ce{constructor(){this.processors=[new He,new Ne,new je]}clean(t){if(!t||0===t.trim().length)return t;let e,n=t;do{e=n;for(const t of this.processors)n=t.process(n)}while(n!==e);return n}}class Be{constructor(t){this.dtoName=Be.dtoName,t.forEach((t=>{t.parent=this})),this.children=t}static fromJSON(t,e={autoMatchFormat:!0}){const n=t.map((t=>{const n=tt.getRTEBlockClass(t.type);if(n)return n.from(t,e);throw new Error(`[Vega] Unknown block type: ${t.type}`)}));return new Be(n)}static createEmptyContent(t={autoMatchFormat:!0}){return Be.fromJSON([{id:it(),type:"paragraph",annotations:{internalWrapper:!t.autoMatchFormat},nodes:[{id:it(),annotations:{plainText:!t.autoMatchFormat},type:"text",text:""}]}],t)}static fromHtml(t,e={autoMatchFormat:!0,skipCustomAnnotations:!1}){const n=(new Ce).clean(t),s=Ae.preserve(n),r=s.getProcessedHtml(),i=(new DOMParser).parseFromString(r,"text/html").body,a=Array.from(i.childNodes);s.restore(a);const o=yt.process(a,e).filter(at).map((t=>t.toDto(e))).filter(at);return new Be(o)}static generateContentStyles(t){return Y.generateAllStylesContent(null==t?void 0:t.enableFontImports)}clone(t=!1){return new Be(t?this.children.map((t=>t.clone(this))):[...this.children])}toJSON(){return this.children.map((t=>t.toJSON()))}toHtml(t){return t&&(at(t.autoMatchFormat)||at(t.skipCustomAnnotations))&&mt.warn("The 'options' parameter's properties 'autoMatchFormat' and 'skipCustomAnnotations' in toHtml method are deprecated and will be removed in the future."),this.isEmpty()?"":this.children.map((e=>e.toHtml({filterInlineStyles:null==t?void 0:t.filterInlineStyles}))).join("")}isEmpty(){return 0===this.children.length||1===this.children.length&&!this.children[0].isNotEmpty()}apply(t){if(r.executeTheStrategy(t,this),t.executedFlag&&t.isFlushable){const t=H.getDOMByEntity(this);t&&ot.notify(lt.getSubject(t,ut),{})}}getLastNode(){return 0===this.children.length?null:this.children[this.children.length-1].getLastNode()}toListItem(t){t.children.map((t=>t.apply(new g)));const e=new ft(it());return e.apply(new s(t.children)),e.annotationMap=t.annotationMap,e}createList(t){return new xt(it(),t)}findNodeById(t){return this.findNodeInBlocksById(t,this.children)}findNodeInBlocksById(t,e){for(const n of e){if("children"in n)for(const e of n.children)if(e.id===t)return e;if(n instanceof ft&&n.nestList)for(const e of n.nestList){const n=this.findNodeInBlocksById(t,e.children);if(n)return n}if(n instanceof xt&&n.children){const e=this.findNodeInBlocksById(t,n.children);if(e)return e}}return null}}r.register(c.DELETE_CHILDREN,Be.name,new P),r.register(c.APPEND_CHILDREN,Be.name,new Et),r.register(c.INSERT_CHILDREN_BEFORE,Be.name,new At),r.register(c.INSERT_CHILDREN_AFTER,Be.name,new kt),r.register(c.TRANSFORM_TO_CODE_BLOCK,Be.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new k(it(),this.getCodeContent(n),"plainText");e.apply(new x(n[0],s)),t.newCodeBlock=s,this.removeSelectBlocks(n,e)}getCodeContent(t){return t.filter((t=>"image"!==t.type&&"list-item"!==t.type)).map((t=>t.children.map((t=>t.text)).join(""))).join("\n")}removeSelectBlocks(t,e){for(let n=0;n<t.length;n++)e.apply(new f(t[n]))}}),r.register(c.UPDATE_CURSOR_POSITION,Be.name,new class extends t{handleAction(t,e){const{offset:n,nextFocusNode:s,immediatelyRun:r}=t,i=H.getDOMByEntity(e);i&&ot.notify(lt.getSubject(i,ct),{node:s,offset:n,updateDirectly:r})}}),r.register(c.DELETE_SELECTED_CONTENT,Be.name,new class extends t{handleAction(t){const{host:e,mergeFlag:n}=t;ot.notify(lt.getSubject(e,ht),{host:e,detail:n})}}),Be.dtoName="VegaRTEContent";export{Ut as A,we as B,Tt as E,jt as I,vt as M,Ft as P,Ct as R,Ae as S,Rt as U,Be as V,At as a,ft as b,zt as c,Ot as d,xt as e,Nt as f,Ht as g,de as h,yt as i}
@@ -1 +0,0 @@
1
- import{V as e}from"./p-ea54ce0a.js";import{I as r}from"./p-abd7aeaa.js";class i extends r{evaluate(e){var r,i;if(!this.isAcceptedInputType(e))throw new Error(`Invalid value ${e} for rich text editor`);const a=(null===(r=null==e?void 0:e.children)||void 0===r?void 0:r.length)>1||1===(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&e.children.some((e=>e.isNotEmpty()));return{isValid:a,message:a?"":"This field is required"}}canEvaluate(e,r){return r?this.isAcceptedInputType(e)&&!r.disabled&&r.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(r){return null==r||r instanceof e}}export{i as R}
@@ -1 +0,0 @@
1
- import{h as t,r as e,c as i,H as s,g as o}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as p,M as n,I as l}from"./p-6e1ab235.js";import{V as h,I as m}from"./p-8ce9e214.js";import{D as f}from"./p-526e3634.js";import{d as c,L as u}from"./p-0179f55d.js";import{n as d,c as v,b as j}from"./p-262ec334.js";import{C as b}from"./p-5beec481.js";import{c as w}from"./p-70817cf5.js";import{F as x}from"./p-cb378636.js";import{C as y}from"./p-2d0d575f.js";import{K as R}from"./p-7be548a7.js";import{F as C}from"./p-136226f8.js";import{R as g}from"./p-8bc15ed0.js";import{c as I}from"./p-3f183b52.js";import{M as V,a as N}from"./p-f0ff4463.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-5de1acdb.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-de885ef2.js";import"./p-4d9061fb.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-683cfe24.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-3a68b729.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-29e3eb12.js";var T=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class S extends p{constructor(){super(...arguments),this.onInputChange=t=>{this.valueController.updateValue(t.detail)},this.onInputBlur=t=>{const e=t.host.value.replace(/,/g,"");if(""!==e&&!isNaN(e)){let t=d(Number(e),this.min,this.max);this.integerOnly&&(t===this.min?t=Math.ceil(this.min):t===this.max&&(t=Math.floor(this.max))),t!==Number(e)&&this.valueController.updateValue(t.toString())}}}getInputRef(){return this.vegaInputRef.shadowRoot.querySelector("input")}getContainerRef(){return this.vegaInputRef.shadowRoot.querySelector(".vega-input-container")}render(){const e={thousandComma:this.thousandComma};return this.integerOnly&&(e.precision=0),t("vega-input",{value:this.value||"",showClearIcon:this.showClearIcon,disabled:this.disabled,label:this.label,hint:this.hint,required:this.required,optional:this.optional,type:"number",placeholder:this.placeholder,size:"small"===this.size?"small":"default",prefixIcon:this.prefixIcon,ref:t=>{this.vegaInputRef=t,f.addUniqueObserverToNode(t,c,(t=>this.onInputChange(t))),f.addUniqueObserverToNode(t,u,(t=>this.onInputBlur(t)))},maskConfig:{type:"number",options:e}})}}T([a()],S.prototype,"prefixIcon",void 0),T([a()],S.prototype,"showClearIcon",void 0),T([a()],S.prototype,"value",void 0),T([a()],S.prototype,"size",void 0),T([a()],S.prototype,"disabled",void 0),T([a()],S.prototype,"placeholder",void 0),T([a()],S.prototype,"label",void 0),T([a()],S.prototype,"optional",void 0),T([a()],S.prototype,"hint",void 0),T([a()],S.prototype,"required",void 0),T([a()],S.prototype,"thousandComma",void 0),T([a()],S.prototype,"integerOnly",void 0),T([a()],S.prototype,"min",void 0),T([a()],S.prototype,"max",void 0),T([a()],S.prototype,"valueController",void 0);var O=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class k extends p{watchValue(){this.changeEventEmitter.emit(this.value),y.notify(x,{host:this.host,detail:this.value})}updateValue(t){this.value=t}}O([a()],k.prototype,"host",void 0),O([a({writable:!0})],k.prototype,"value",void 0),O([a()],k.prototype,"changeEventEmitter",void 0),O([n("watchValue")],k.prototype,"watchValue",null);var E=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class A extends R{constructor(){super((t=>[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[t.host],callback:t.onArrowUpOrDown},{keyCode:["ArrowUp"],eventName:"keydown",activeElementInScope:[t.host],callback:t=>{t.preventDefault()}}])),this.onArrowUpOrDown=t=>{const e=t.shiftKey?this.majorIncrement:this.minorIncrement,i=v(this.value.replace(/,/g,""))||0,s=Math.max(j(i),j(e));"ArrowUp"===t.code?this.valueController.updateValue(`${(i+e).toFixed(s)}`):"ArrowDown"===t.code&&this.valueController.updateValue(`${(i-e).toFixed(s)}`)}}}E([a()],A.prototype,"host",void 0),E([a()],A.prototype,"value",void 0),E([a()],A.prototype,"minorIncrement",void 0),E([a()],A.prototype,"majorIncrement",void 0),E([a()],A.prototype,"valueController",void 0);var F=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const M=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.valueController=new k,this.keyboardController=new A,this.renderer=new S,this.changeEventEmitter=w(M,c),this.inputEventPrevent=new b([c],(()=>this.host),{useCapture:!0}),this.formFieldController=new C({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new g:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new V({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new N({maxValue:t}):null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getContainerRef(),touchableAreaGetter:()=>[this.renderer.getInputRef()],defaultValue:"",attributeGetter:t=>this[t]}),this.prefixTextNotifySlimmer=I(M,"prefixText","watchPrefixText"),this.suffixTextNotifySlimmer=I(M,"suffixText","watchSuffixText"),this.isCompactInputWidthNotifySlimmer=I(M,"isCompactInputWidth"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.isCompactInputWidth=!0,this.prefixText="",this.value="",this.size="medium",this.thousandComma=!1,this.integerOnly=!1,this.disabled=!1,this.minorIncrement=1,this.majorIncrement=10,this.label="",this.optional=!1,this.validationRules=[],this.isValid=null,this.autoValidation=!0,this.showClearIcon=!0,this.min=null,this.max=null}watchPrefixText(){}watchSuffixText(){}watchValue(){}watchValidationRules(){}render(){return r(t(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{prefixText:["watchPrefixText"],suffixText:["watchSuffixText"],value:["watchValue"],validationRules:["watchValidationRules"]}}};F([m()],M.prototype,"globalSlimmers",void 0),F([l()],M.prototype,"valueController",void 0),F([l()],M.prototype,"keyboardController",void 0),F([l()],M.prototype,"renderer",void 0),F([l()],M.prototype,"changeEventEmitter",void 0),F([l()],M.prototype,"inputEventPrevent",void 0),F([l()],M.prototype,"formFieldController",void 0),F([l()],M.prototype,"prefixTextNotifySlimmer",void 0),F([l()],M.prototype,"suffixTextNotifySlimmer",void 0),F([l()],M.prototype,"isCompactInputWidthNotifySlimmer",void 0),F([l()],M.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M.style=":host{display:inline-block;width:100%}";export{M as vega_input_numeric}
@@ -1 +0,0 @@
1
- import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-526e3634.js";import{e as s,f as n}from"./p-3a68b729.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-4d9061fb.js";import{T as c}from"./p-b438e68b.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",t.DELETE_SELECTED_CONTENT="DELETE_SELECTED_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 b extends g{}class N{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}}N.RTE_TEXT_NODE_CLASS_NAME="RTETextNode",N.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 N.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 _ extends x{constructor(t){super(),this.type=f.INDENT,this.indent=Math.max(0,t)}static from(t){return[f.INDENT,new _(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new _(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class j{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)))}}}j.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=j.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 D extends ${constructor(t){super(),this.type=y.CUSTOM_STYLE,this.customStyle=t}static from(t){return[y.CUSTOM_STYLE,new D(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new D(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 I extends x{constructor(t){super(),this.type=f.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[f.INTERNAL_WRAPPER,new I(t)]}clone(){return new I(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 D)).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 b}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 D.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 b||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 _.from(e);case"customAttribute":return L.from(e);case"customClass":return B.from(e);case"customStyle":return D.from(e);case"internalWrapper":return I.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 I))).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 G extends g{constructor(t){super(),this.type=p.SELECTION_RANGE,this.range=t}clone(){return new G(this.range)}}const W="700",z="bold",V="italic",X="underline",q="line-through";class Y extends b{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 b{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 b{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 b{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 b{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"]),ct=22;class lt extends b{constructor(t){super(),this.type=O.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[O.TEXT_COLOR,new lt(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new lt(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 ht extends b{constructor(t,e=!0){super(),this.type=O.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[O.LINK,new ht(t,e)]}toJSON(){return{link:this.link}}clone(){return new ht(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class ut 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 dt extends K{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class pt{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 D(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 ft extends E{constructor(t){super(),this.type=A.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class gt extends pt{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 ft(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 xt extends U{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new tt(this.bold)}}class wt 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 At extends U{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new wt}}class Ot extends U{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new et(this.code)}}class yt extends K{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class mt extends U{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new Z(this.italic)}}class Et 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 ht(this.link)}}class St extends U{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new Y(this.strikethrough)}}class Tt extends U{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new Q(this.underline)}}class bt extends pt{handleAction(t,e){const s=t.toAnnotation();if(t instanceof yt)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof wt))return s instanceof b||s instanceof G?(t instanceof Et&&(a(t.newText)&&(e.text=t.newText),e.parent.apply(new ut(t.link.groupKey,[e],t.type))),t instanceof Ot&&this.handleAction(new At,e),t instanceof xt&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof mt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof Tt||t instanceof St)&&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 Ct extends pt{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new Nt)}}class vt extends E{constructor(t){super(),this.type=A.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class Rt extends pt{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 vt(a))}}}class _t 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 _t(e);return o.groupId=t.groupId,o.child=s?_t.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?D.from(n)[1]:void 0,[O.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new _t(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 pt{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 kt extends pt{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 $t extends b{constructor(t){super(),this.type=O.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[O.PLAIN_TEXT,new $t(t)]}clone(){return new $t(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class Lt extends U{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new lt(this.textColor)}}class Bt extends H{constructor(t,e,s,n){super(t,n),this.dtoName=Bt.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 Bt(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 ut(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 lt.from(e);case"link":return ht.from(e,n);case"inlineHtml":return _t.from(e);case"plainText":return $t.from(e)}return H.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof b||t instanceof $||t instanceof _t)).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 Bt(l(),t,this.parent,super.cloneAnnotations())}clone(t){return new Bt(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;Bt.registerActionStrategyStatus[t]||(this.isContentEditable()&&(k.register(A.UPDATE_TEXT,t,new Ct),k.register(A.REPLACE_SELECTED_TEXT,t,new Rt),k.register(A.LINK_GROUP_NODE_SPLIT,t,new jt),k.register(Et.name,t,new bt)),k.register(U.name,t,new gt),k.register(A.DELETE_LINK_GROUP,t,new kt),k.register(xt.name,t,new bt),k.register(At.name,t,new bt),k.register(mt.name,t,new bt),k.register(Tt.name,t,new bt),k.register(Lt.name,t,new bt),k.register(St.name,t,new bt),k.register(Ot.name,t,new bt),k.register(K.name,t,new bt),Bt.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 dt)return void this.syncUpSelectedNodes(t);s instanceof G||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,Bt.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 b&&!(t instanceof ht)&&!(t instanceof $t)||t instanceof $)).length}}Bt.registerActionStrategyStatus={},Bt.htmlTag="span",Bt.dtoName="RTETextNode";class Dt 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"},Mt=Object.assign(Object.assign({},It),{marginTop:"0px",marginBottom:"0px"}),Ft={paragraph:Mt,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({},Mt),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"}),"heading-2":Object.assign(Object.assign({},Mt),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"}),"heading-3":Object.assign(Object.assign({},Mt),{fontSize:"18px"}),"heading-4":Object.assign({},Mt),"heading-5":Object.assign(Object.assign({},Mt),{fontSize:"14px"}),"heading-6":Object.assign(Object.assign({},Mt),{fontSize:"12px"})};class Ht extends x{constructor(t){super(),this.type=f.TEXT_STYLE,this.textStyle=t}static from(t){return[f.TEXT_STYLE,new Ht(t)]}static getDefaultStyles(t){return t?Ft[t]:null}toJSON(){return{textStyle:this.textStyle}}clone(){return new Ht(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?Ht.getDefaultStyles(this.textStyle):null}}class Pt extends K{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new Ht(this.textStyle)}}class Jt extends pt{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new xt(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new yt(O.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class Kt extends E{constructor(t,...e){super(),this.type=A.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Ut extends E{constructor(t){super(),this.type=A.REPLACE_CHILD_NODES,this.newChildNodes=t}}class Gt extends pt{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 Ut(e));const a=s.cloneWithNodes(o);return s.parent.apply(new Kt(s,a)),a}}}}class Wt extends pt{handleAction(t,e){e.children=[],e.apply(new Dt(t.newChildNodes))}}class zt extends E{constructor(t){super(),this.type=A.DELETE_CHILDREN,this.entityToBeRemoved=t}}class Vt extends pt{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 Dt(t)),"image"!==e.type&&this.transferLinkGroups(t,e),s.parent.apply(new zt(s))}}transferLinkGroups(t,e){t.forEach((t=>{if(!(t instanceof Bt))return;const s=t.getAnnotationByType(O.LINK);s&&e.apply(new ut(s.link.groupKey,[t],"link"))}))}}class Xt extends pt{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new Bt(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 Bt(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Ut([...t,e,...s]))}}class qt extends pt{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new Bt(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 zt(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new Bt(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Ut([...t,e,...s]))}}class Yt extends E{constructor(t,...e){super(),this.type=A.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class Qt extends E{constructor(t,e){super(),this.type=A.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Zt extends K{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new R(this.textAlign)}}class te extends pt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class ee extends K{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new _(this.indent)}}class se extends J{constructor(t,e,s){super(t),this.dtoName=se.dtoName,this.children=[],this.type=e;const{autoMatchFormat:n}=s||{autoMatchFormat:!0};n&&(this.annotationMap=se.isAcceptableTextStyle(e)?new Map([Ht.from(e)]):new Map([Ht.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var s,n;const r=new se(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?Ht.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 Et&&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 se(l(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Dt(t)),e}clone(t){const e=new se(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,se.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(Pt.name,se.name,new Jt),k.register(Zt.name,se.name,new te),k.register(ee.name,se.name,new class extends pt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),k.register(ut.name,se.name,new class extends pt{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,se.name,new class extends pt{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,se.name,new Gt),k.register(A.REPLACE_CHILD_NODES,se.name,new Wt),k.register(A.MERGE_TWO_BLOCKS_NODES,se.name,new Vt),k.register(A.LINE_BREAK_SINGLE_BLOCK,se.name,new Xt),k.register(A.LINE_BREAK_MULTIPLE_BLOCKS,se.name,new qt),k.register(A.INSERT_IMAGE_TO_BLOCK,se.name,new class extends pt{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new Kt(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new Yt(e,r));else{const t=new Qt(s,n);e.apply(t),e.parent.apply(new Kt(e,r))}}}),k.register(A.TRANSFORM_LIST_BLOCK,se.name,new class extends pt{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 Dt(i)),s.apply(new Kt(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new zt(t))}))}}),se.dtoName="RTETextBlock";class ne extends pt{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 re extends E{constructor(t,e){super(),this.isFlushable=!0,this.type=A.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class ie extends K{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new G(this.range)}}class oe extends H{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(oe.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${oe.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return d(t,`.${oe.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}oe.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",oe.DECORATOR_NODE_CLASS="v-internal-decorator-node";class ae extends T{constructor(){super(...arguments),this.stylesToBeFiltered=ae.STYLES,this.elementTagName="pre code"}canFilter(t){return N.isCodeBlockNode(t)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}ae.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 ce extends oe{constructor(t,e,s,n){super(t),this.dtoName=ce.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 D(ae.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 ce(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,ce.name,new class extends pt{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),k.register(ie.name,ce.name,new class extends pt{handleAction(t,e){e.annotationMap.set(p.SELECTION_RANGE,t.toAnnotation())}}),ce.dtoName="RTECodeBlockNode";var le;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(le||(le={}));class he extends pt{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 zt(e)))}}class ue extends T{constructor(){super(...arguments),this.stylesToBeFiltered=ue.STYLES,this.elementTagName="pre"}canFilter(t){return N.isCodeBlock(t.dtoName)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}ue.STYLES={backgroundColor:"rgba(var(--v-bg-secondary, 245, 247, 247, 1))",padding:"12px"};class de extends J{constructor(t,e,s){super(t),this.dtoName=de.dtoName,this.type="code-block",this.annotationMap=new Map([D.from(ue.STYLES)]),this.children=[new ce(`${t}-1`,e,s,this)]}static from(t){return new de(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=le["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=de.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,de.name,new class extends ne{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 zt(e));const i=t?w.getDOMByEntity(t):null;if(0===n.children.length){const s=se.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:""}]});e.parent.apply(new Dt([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,de.name,new he),k.register(A.SWITCH_OUT_FROM_CODE_BLOCK,de.name,new class extends pt{handleAction(s,r){const{content:i,language:o}=s,a=i.split("\n"),c=new re(a.slice(0,a.length-2).join("\n"),o);c.isFlushable=!1,r.children[0].apply(c);const h=se.from({id:l(),type:"paragraph",nodes:[{id:l(),text:"",type:"text"}]});r.parent.apply(new Kt(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,de.name,new class extends pt{handleAction(t,e){e.parent.apply(new Kt(e,t.imageBlockToBeInserted))}}),de.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element",de.dtoName="RTECodeBlock";export{st as $,k as A,x as B,y as C,Vt as D,dt as E,f as F,B as G,Zt as H,Kt as I,b as J,m as K,$ as L,E as M,O as N,Ut as O,at as P,ne as Q,Bt as R,Qt as S,Pt as T,vt as U,ot as V,he as W,z as X,W as Y,S as Z,nt as _,J as a,V as a0,q as a1,X as a2,Ht as a3,N as a4,R as a5,et as a6,C as a7,ue as a8,ae as a9,j as aa,le as ab,it as ac,rt as ad,Et as ae,re as af,ie as ag,Lt as ah,ct as ai,xt as aj,mt as ak,Tt as al,tt as am,At as an,Ot as ao,St as ap,ee as aq,se as b,M as c,pt as d,Dt as e,H as f,Yt as g,p as h,A as i,K as j,zt as k,L as l,P as m,T as n,oe as o,de as p,ce as q,D as r,w as s,F as t,Jt as u,te as v,Xt as w,qt as x,Gt as y,Wt as z}