@heartlandone/vega 2.80.0 → 2.82.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 (712) hide show
  1. package/dist/cjs/{app-globals-7a48292d.js → app-globals-3350d580.js} +7 -7
  2. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-5a0a78fe.js → aria-dialog-focusable-trap-slimmer-5507f917.js} +15 -70
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-dd0bb8b6.js → child-nodes-event-prevent-slimmer-9b7095a4.js} +1 -1
  4. package/dist/cjs/{child-nodes-notify-observer-slimmer-a8d13f4c.js → child-nodes-notify-observer-slimmer-2631c381.js} +1 -1
  5. package/dist/cjs/{code-block-71a330a1.js → code-block-b1f8aded.js} +804 -63
  6. package/dist/cjs/{component-value-history-controller-slimmer.abstract-fd077a6c.js → component-value-history-controller-slimmer.abstract-99fbd1f2.js} +6 -6
  7. package/dist/cjs/{content-state-afa26456.js → content-state-648652b4.js} +970 -467
  8. package/dist/cjs/{dark-mode-style-controller-3a04af3d.js → dark-mode-style-controller-bd765afb.js} +2 -322
  9. package/dist/cjs/{date-required-rule-9f0e3e99.js → date-required-rule-6addf5dd.js} +1 -1
  10. package/dist/cjs/{design-token-3f9589eb.js → design-token-93070bb8.js} +6 -130
  11. package/dist/cjs/{dom-node-subject-observer-factory-a3a60da4.js → dom-node-subject-observer-factory-9110cb94.js} +1 -1
  12. package/dist/cjs/drop-file-accept-filter-slimmer-cd619cc7.js +64 -0
  13. package/dist/cjs/{element-appender-slimmer-7a66229b.js → element-appender-slimmer-dedd3a34.js} +5 -5
  14. package/dist/cjs/{event-emit-slimmer-024e26bb.js → event-emit-slimmer-bcb458b2.js} +2 -2
  15. package/dist/cjs/{form-field-controller-slimmer-c487cf2b.js → form-field-controller-slimmer-0f3a028e.js} +5 -5
  16. package/dist/cjs/{image-annotation-action-4e72af4b.js → image-annotation-action-0339e983.js} +4 -4
  17. package/dist/cjs/index-58ea899e.js +4 -0
  18. package/dist/cjs/index.cjs.js +21 -18
  19. package/dist/cjs/{inject-keyboard-manager-d1a82089.js → inject-keyboard-manager-2d9c4f92.js} +1 -1
  20. package/dist/cjs/{internal-translation-controller-9f58a4e4.js → internal-translation-controller-fb1532f4.js} +3 -0
  21. package/dist/cjs/{internal-vega-event-manager-cc0f511c.js → internal-vega-event-manager-fef893bf.js} +1 -0
  22. package/dist/cjs/{keyboard-manager-9dbbb0d4.js → keyboard-manager-5ed6c472.js} +2 -2
  23. package/dist/cjs/{keyboard-manager-slimmer-68cff676.js → keyboard-manager-slimmer-879ff4f3.js} +1 -1
  24. package/dist/cjs/loader.cjs.js +15 -14
  25. package/dist/cjs/{month-view-generator-65a2f883.js → month-view-generator-d262e6ce.js} +1 -1
  26. package/dist/cjs/page-size-option-utils-d038dd3a.js +68 -0
  27. package/dist/cjs/{public-rules-36f202b3.js → public-rules-bce88d4e.js} +12 -11
  28. package/dist/cjs/{range-fa15d524.js → range-5bd6d72b.js} +2 -2
  29. package/dist/cjs/{responsive-format-facade-4419b4ae.js → responsive-format-facade-2cab7344.js} +3 -3
  30. package/dist/cjs/{rich-text-editor-required-rule-7d4c2973.js → rich-text-editor-required-rule-e8a922be.js} +1 -1
  31. package/dist/cjs/{split-cell-operation-19f98afb.js → split-cell-operation-bb388de6.js} +59 -24
  32. package/dist/cjs/state-border-formatter-4e5e4ed0.js +133 -0
  33. package/dist/cjs/{string-format-strategy.abstract-c65d9861.js → string-format-strategy.abstract-9a35e3b4.js} +1 -1
  34. package/dist/cjs/{string-input-formatter-slimmer-c2e04acc.js → string-input-formatter-slimmer-1018ddec.js} +4 -4
  35. package/dist/cjs/{string-mask-strategy-418fc0b8.js → string-mask-strategy-3aa17744.js} +2 -2
  36. package/dist/cjs/{style-formatter-3c9ce0e5.js → style-formatter-2226c869.js} +2 -2
  37. package/dist/cjs/{sub-state-notify-slimmer-7a4c6061.js → sub-state-notify-slimmer-b33171b0.js} +2 -2
  38. package/dist/cjs/{sub-state-observer-slimmer-f728e068.js → sub-state-observer-slimmer-b8f6f27b.js} +3 -3
  39. package/dist/cjs/{time-required-rule-ad091302.js → time-required-rule-970dfdca.js} +1 -1
  40. package/dist/cjs/tinycolor-polyfill-502efaa8.js +325 -0
  41. package/dist/cjs/{token-extension-90396de7.js → token-extension-9b213b6b.js} +212 -38
  42. package/dist/cjs/{translation-slimmer-c069ca84.js → translation-slimmer-d0c77ad2.js} +1 -1
  43. package/dist/cjs/{type-guard-d760850a.js → type-guard-3ec852d7.js} +51 -1
  44. package/dist/cjs/{ui-9e8c9732.js → ui-ae4ee13d.js} +69 -0
  45. package/dist/cjs/{valid-credit-card-number-rule-5ce8e973.js → valid-credit-card-number-rule-99d1bb34.js} +1 -1
  46. package/dist/cjs/vega-accordion.cjs.entry.js +9 -8
  47. package/dist/cjs/vega-app-footer.cjs.entry.js +2 -1
  48. package/dist/cjs/vega-app-header-button.cjs.entry.js +10 -9
  49. package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
  50. package/dist/cjs/vega-banner.cjs.entry.js +6 -5
  51. package/dist/cjs/vega-box.cjs.entry.js +7 -6
  52. package/dist/cjs/vega-brand-logo.cjs.entry.js +2 -1
  53. package/dist/cjs/vega-breadcrumb.cjs.entry.js +29 -12
  54. package/dist/cjs/vega-button-circle.cjs.entry.js +11 -10
  55. package/dist/cjs/vega-button-group_2.cjs.entry.js +104 -15
  56. package/dist/cjs/vega-button-link.cjs.entry.js +5 -5
  57. package/dist/cjs/vega-button.cjs.entry.js +10 -10
  58. package/dist/cjs/vega-calendar_4.cjs.entry.js +12 -12
  59. package/dist/cjs/vega-card.cjs.entry.js +7 -6
  60. package/dist/cjs/vega-carousel.cjs.entry.js +7 -7
  61. package/dist/cjs/vega-checkbox_2.cjs.entry.js +10 -10
  62. package/dist/cjs/vega-chip.cjs.entry.js +11 -10
  63. package/dist/cjs/vega-code-block.cjs.entry.js +16 -15
  64. package/dist/cjs/vega-color-picker.cjs.entry.js +28 -10
  65. package/dist/cjs/vega-color-swatch.cjs.entry.js +245 -0
  66. package/dist/cjs/vega-combo-box.cjs.entry.js +12 -12
  67. package/dist/cjs/vega-date-picker_2.cjs.entry.js +342 -284
  68. package/dist/cjs/vega-dialog_2.cjs.entry.js +76 -202
  69. package/dist/cjs/vega-divider.cjs.entry.js +7 -6
  70. package/dist/cjs/vega-dropdown_5.cjs.entry.js +75 -19
  71. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  72. package/dist/cjs/vega-field-label.cjs.entry.js +4 -4
  73. package/dist/cjs/vega-file-uploader.cjs.entry.js +42 -92
  74. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -4
  75. package/dist/cjs/vega-flex.cjs.entry.js +8 -7
  76. package/dist/cjs/vega-font.cjs.entry.js +6 -5
  77. package/dist/cjs/vega-form.cjs.entry.js +12 -12
  78. package/dist/cjs/vega-grid.cjs.entry.js +6 -5
  79. package/dist/cjs/vega-icon.cjs.entry.js +6 -5
  80. package/dist/cjs/vega-image-uploader.cjs.entry.js +80 -15
  81. package/dist/cjs/vega-input-credit-card.cjs.entry.js +13 -13
  82. package/dist/cjs/vega-input-numeric.cjs.entry.js +13 -13
  83. package/dist/cjs/vega-input-passcode.cjs.entry.js +12 -12
  84. package/dist/cjs/vega-input-phone-number.cjs.entry.js +11 -11
  85. package/dist/cjs/vega-input-range.cjs.entry.js +10 -10
  86. package/dist/cjs/vega-input-select.cjs.entry.js +52 -17
  87. package/dist/cjs/vega-input.cjs.entry.js +17 -14
  88. package/dist/cjs/{vega-internal-event-id-a1837fa2.js → vega-internal-event-id-87014e4f.js} +2 -0
  89. package/dist/cjs/vega-item-toggle.cjs.entry.js +4 -4
  90. package/dist/cjs/vega-left-nav_5.cjs.entry.js +122 -15
  91. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +4 -4
  92. package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
  93. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
  94. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +26 -10
  95. package/dist/cjs/vega-pagination.cjs.entry.js +48 -24
  96. package/dist/cjs/vega-popover_2.cjs.entry.js +14 -13
  97. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +72 -17
  98. package/dist/cjs/vega-radio_2.cjs.entry.js +13 -13
  99. package/dist/cjs/vega-rich-text-content.cjs.entry.js +104 -22
  100. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +36 -24
  101. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +15 -14
  102. package/dist/cjs/vega-section-title.cjs.entry.js +21 -3
  103. package/dist/cjs/vega-segment-control.cjs.entry.js +4 -4
  104. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +12 -12
  105. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +11 -11
  106. package/dist/cjs/vega-sidenav_3.cjs.entry.js +10 -10
  107. package/dist/cjs/vega-signature-capture.cjs.entry.js +13 -12
  108. package/dist/cjs/vega-stepper.cjs.entry.js +11 -11
  109. package/dist/cjs/vega-tab-group_2.cjs.entry.js +5 -5
  110. package/dist/cjs/vega-table_11.cjs.entry.js +436 -289
  111. package/dist/cjs/vega-text.cjs.entry.js +7 -3
  112. package/dist/cjs/vega-textarea.cjs.entry.js +9 -9
  113. package/dist/cjs/vega-time-picker_2.cjs.entry.js +16 -16
  114. package/dist/cjs/vega-toggle-switch.cjs.entry.js +8 -8
  115. package/dist/cjs/vega-tooltip_2.cjs.entry.js +11 -10
  116. package/dist/cjs/vega.cjs.js +15 -14
  117. package/dist/cjs/{wait-for-component-did-render-b6aba2de.js → wait-for-component-did-render-16863a21.js} +2 -2
  118. package/dist/collection/collection-manifest.json +6 -0
  119. package/dist/collection/components/vega-banner/slimmers/renderers/vega-banner-renderer.js +1 -0
  120. package/dist/collection/components/vega-banner/vega-banner.css +36 -0
  121. package/dist/collection/components/vega-box/vega-box.js +1 -1
  122. package/dist/collection/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-item-renderer.js +9 -6
  123. package/dist/collection/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-renderer.js +4 -0
  124. package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.css +6 -0
  125. package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.js +31 -0
  126. package/dist/collection/components/vega-button/vega-button.css +4 -0
  127. package/dist/collection/components/vega-button-group/slimmers/controllers/vega-button-group-all-items-disabled-controller.js +64 -0
  128. package/dist/collection/components/vega-button-group/vega-button-group-item/slimmers/controllers/vega-button-group-item-sub-state-controller.js +7 -0
  129. package/dist/collection/components/vega-button-group/vega-button-group-item/slimmers/renderers/vega-button-group-item-renderer.js +6 -2
  130. package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +4 -2
  131. package/dist/collection/components/vega-button-group/vega-button-group.js +20 -1
  132. package/dist/collection/components/vega-card/vega-card.css +157 -0
  133. package/dist/collection/components/vega-card/vega-card.js +1 -1
  134. package/dist/collection/components/vega-chip/vega-chip.js +26 -1
  135. package/dist/collection/components/vega-color-picker/vega-color-picker.css +0 -1
  136. package/dist/collection/components/vega-color-picker/vega-color-picker.js +40 -1
  137. package/dist/collection/components/vega-color-swatch/slimmers/renderers/vega-color-swatch-renderer.js +127 -0
  138. package/dist/collection/components/vega-color-swatch/vega-color-swatch.css +155 -0
  139. package/dist/collection/components/vega-color-swatch/vega-color-swatch.js +314 -0
  140. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-current-period-controller.js +5 -10
  141. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-is-dual-months-controller.js +64 -0
  142. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.js +3 -6
  143. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.js +3 -11
  144. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.js +2 -2
  145. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +4 -5
  146. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +13 -15
  147. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +41 -2
  148. package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
  149. package/dist/collection/components/vega-divider/slimmers/controllers/vega-divider-size-controller.js +1 -1
  150. package/dist/collection/components/vega-divider/vega-divider.css +157 -0
  151. package/dist/collection/components/vega-divider/vega-divider.js +1 -1
  152. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.js +37 -1
  153. package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.js +4 -1
  154. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.js +7 -0
  155. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +5 -1
  156. package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +2 -1
  157. package/dist/collection/components/vega-dropdown/vega-dropdown.js +38 -0
  158. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +2 -2
  159. package/dist/collection/components/vega-flex/vega-flex.css +157 -0
  160. package/dist/collection/components/vega-flex/vega-flex.js +1 -1
  161. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-default-content-renderer.js +45 -1
  162. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-preview-content-renderer.js +16 -1
  163. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +5 -0
  164. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +4 -1
  165. package/dist/collection/components/vega-input/vega-input.js +25 -0
  166. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +17 -4
  167. package/dist/collection/components/vega-input-select/vega-input-select.js +76 -0
  168. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +0 -4
  169. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +31 -21
  170. package/dist/collection/components/vega-modal/vega-modal.css +2685 -9
  171. package/dist/collection/components/vega-modal/vega-modal.js +75 -5
  172. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.js +85 -2
  173. package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +23 -0
  174. package/dist/collection/components/vega-pagination/constants/page-size.js +2 -0
  175. package/dist/collection/components/vega-pagination/internal/vega-pagination-page-size-selector.js +11 -7
  176. package/dist/collection/components/vega-pagination/slimmers/controllers/vega-pagination-page-size-observer-controller.js +11 -1
  177. package/dist/collection/components/vega-pagination/utils/page-size-option-utils.js +57 -0
  178. package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-dropdown-renderer.js +15 -5
  179. package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/vega-pagination-page-size-selector-mobile.js +39 -3
  180. package/dist/collection/components/vega-pagination/vega-pagination.js +32 -11
  181. package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-direction-controller.js +34 -3
  182. package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-step-controller.js +10 -2
  183. package/dist/collection/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.js +4 -3
  184. package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +37 -0
  185. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +20 -0
  186. package/dist/collection/components/vega-rich-text-editor/dto/annotations/image-annotation.js +1 -0
  187. package/dist/collection/components/vega-rich-text-editor/dto/annotations/inline-html-annotation.js +12 -0
  188. package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +8 -2
  189. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +15 -4
  190. package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +6 -2
  191. package/dist/collection/components/vega-rich-text-editor/dto/blocks/html-block.js +9 -15
  192. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +3 -3
  193. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +3 -3
  194. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +3 -7
  195. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +50 -9
  196. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +25 -6
  197. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-block-filter-styles-strategy.js +39 -0
  198. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-node-filter-styles-strategy.js +47 -0
  199. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +64 -0
  200. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.js +147 -14
  201. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.js +26 -3
  202. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +24 -0
  203. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-heading-item-block-filter-styles-strategy.js +29 -0
  204. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.js +39 -1
  205. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-title-item-block-filter-styles-strategy.js +29 -0
  206. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/predicate.js +94 -0
  207. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/heading-filter-styles-strategy.js +15 -0
  208. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/paragraph-filter-styles-strategy.js +48 -0
  209. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/title-filter-styles-strategy.js +16 -0
  210. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.js +32 -3
  211. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.js +42 -3
  212. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.js +108 -0
  213. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +7 -2
  214. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +2 -2
  215. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +15 -4
  216. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +84 -14
  217. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +61 -6
  218. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.js +16 -0
  219. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +14 -3
  220. package/dist/collection/components/vega-rich-text-editor/dto/setup.js +36 -6
  221. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +10 -0
  222. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-extension.js +9 -3
  223. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +17 -1
  224. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.js +17 -18
  225. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +19 -0
  226. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +3 -3
  227. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +3 -3
  228. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +21 -4
  229. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +3 -3
  230. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +3 -3
  231. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +3 -3
  232. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +3 -3
  233. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.js +2 -1
  234. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +2 -2
  235. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-block/table-block-filter-styles-strategy.js +39 -0
  236. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-caption/table-caption-filter-styles-strategy.js +39 -0
  237. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-cell/table-cell-filter-styles-strategy.js +63 -0
  238. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +7 -0
  239. package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +24 -0
  240. package/dist/collection/components/vega-rich-text-editor/public-api.js +2 -0
  241. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/custom-style-annotation-handler.js +2 -25
  242. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +8 -2
  243. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/inline-html-annotation-handler.js +30 -53
  244. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/link-annotation-handler.js +2 -1
  245. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +2 -1
  246. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.js +85 -17
  247. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.js +12 -5
  248. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/html-block-strategy.js +95 -43
  249. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-element-to-text-node-strategy.js +1 -2
  250. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/predicate.js +29 -0
  251. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/strategy-tags.js +142 -0
  252. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.js +1 -0
  253. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.js +12 -2
  254. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +1 -1
  255. package/dist/collection/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.js +8 -2
  256. package/dist/collection/components/vega-section-title/vega-section-title.css +35 -0
  257. package/dist/collection/components/vega-section-title/vega-section-title.js +64 -0
  258. package/dist/collection/components/vega-stepper/vega-stepper.css +15 -0
  259. package/dist/collection/components/vega-stepper/vega-stepper.js +2 -1
  260. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-render-input-controller.js +25 -2
  261. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +28 -1
  262. package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +12 -10
  263. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +14 -12
  264. package/dist/collection/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.js +5 -4
  265. package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.js +8 -1
  266. package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +6 -2
  267. package/dist/collection/components/vega-text/vega-text.js +1 -1
  268. package/dist/collection/components/vega-tooltip/slimmers/controllers/vega-tooltip-element-appender-controller.js +1 -0
  269. package/dist/collection/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.css +1 -0
  270. package/dist/collection/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.js +1 -1
  271. package/dist/collection/components/vega-tooltip/vega-tooltip.js +1 -1
  272. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +1 -0
  273. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  274. package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-margin-formatter.js +3 -3
  275. package/dist/collection/helpers/slimmers/aria-dialog-focusable-trap-slimmer.js +13 -68
  276. package/dist/collection/{components/vega-file-uploader/slimmers/controllers/vega-file-uploader-drop-file-filter-controller.js → helpers/slimmers/drop-file-accept-filter-slimmer.js} +13 -5
  277. package/dist/collection/helpers/slimmers/vega-table-child-render-input-consumer-slimmer.js +96 -0
  278. package/dist/collection/helpers/translation/locales/en.js +3 -0
  279. package/dist/collection/types/type-guard.js +47 -0
  280. package/dist/collection/utils/ui.js +68 -0
  281. package/dist/esm/{app-globals-e77015e3.js → app-globals-0b7e8b50.js} +7 -7
  282. package/dist/esm/{aria-dialog-focusable-trap-slimmer-5a2f92be.js → aria-dialog-focusable-trap-slimmer-853a91de.js} +15 -70
  283. package/dist/esm/{child-nodes-event-prevent-slimmer-2ecc3e1f.js → child-nodes-event-prevent-slimmer-9c24d4fc.js} +1 -1
  284. package/dist/esm/{child-nodes-notify-observer-slimmer-b7f0e419.js → child-nodes-notify-observer-slimmer-a8cb19cf.js} +1 -1
  285. package/dist/esm/{code-block-7d6f231b.js → code-block-b8be290a.js} +798 -64
  286. package/dist/esm/{component-value-history-controller-slimmer.abstract-acf65b17.js → component-value-history-controller-slimmer.abstract-10ccf8e6.js} +6 -6
  287. package/dist/esm/{content-state-084cd705.js → content-state-72b513d1.js} +959 -456
  288. package/dist/esm/{dark-mode-style-controller-82e5c1c6.js → dark-mode-style-controller-e9a6b097.js} +1 -321
  289. package/dist/esm/{date-required-rule-29608215.js → date-required-rule-891a6a57.js} +1 -1
  290. package/dist/esm/{design-token-edcd787b.js → design-token-59d07aa2.js} +6 -130
  291. package/dist/esm/{dom-node-subject-observer-factory-cea9248d.js → dom-node-subject-observer-factory-aca0116e.js} +1 -1
  292. package/dist/esm/drop-file-accept-filter-slimmer-ad759e4a.js +62 -0
  293. package/dist/esm/{element-appender-slimmer-08ec429b.js → element-appender-slimmer-5aca1bca.js} +5 -5
  294. package/dist/esm/{event-emit-slimmer-4fba1b35.js → event-emit-slimmer-32da9d90.js} +2 -2
  295. package/dist/esm/{form-field-controller-slimmer-8dd39707.js → form-field-controller-slimmer-899864a8.js} +5 -5
  296. package/dist/esm/{image-annotation-action-a6b33a81.js → image-annotation-action-ebd6c421.js} +4 -4
  297. package/dist/esm/index-090d31ca.js +4 -0
  298. package/dist/esm/index.js +20 -18
  299. package/dist/esm/{inject-keyboard-manager-7557816f.js → inject-keyboard-manager-dc1d7135.js} +1 -1
  300. package/dist/esm/{internal-translation-controller-b08aa9ab.js → internal-translation-controller-4fb104b2.js} +3 -0
  301. package/dist/esm/{internal-vega-event-manager-59f5bd47.js → internal-vega-event-manager-8a657bac.js} +1 -0
  302. package/dist/esm/{keyboard-manager-1846c6a5.js → keyboard-manager-6ea9968b.js} +2 -2
  303. package/dist/esm/{keyboard-manager-slimmer-1ae0aa4d.js → keyboard-manager-slimmer-7eed4734.js} +1 -1
  304. package/dist/esm/loader.js +15 -14
  305. package/dist/esm/{month-view-generator-b700ed08.js → month-view-generator-aaa27fce.js} +1 -1
  306. package/dist/esm/page-size-option-utils-50afc81a.js +61 -0
  307. package/dist/esm/{public-rules-fe2c7934.js → public-rules-f2005e11.js} +12 -11
  308. package/dist/esm/{range-00afe462.js → range-ed532278.js} +2 -2
  309. package/dist/esm/{responsive-format-facade-37d4d850.js → responsive-format-facade-e9926018.js} +3 -3
  310. package/dist/esm/{rich-text-editor-required-rule-6487ec94.js → rich-text-editor-required-rule-b559cf1a.js} +1 -1
  311. package/dist/esm/{split-cell-operation-9445e642.js → split-cell-operation-5587f594.js} +59 -24
  312. package/dist/esm/state-border-formatter-be51463d.js +129 -0
  313. package/dist/esm/{string-format-strategy.abstract-ec6d627b.js → string-format-strategy.abstract-0157b3c5.js} +1 -1
  314. package/dist/esm/{string-input-formatter-slimmer-959dff7a.js → string-input-formatter-slimmer-33ed3478.js} +4 -4
  315. package/dist/esm/{string-mask-strategy-49be41f0.js → string-mask-strategy-b58891b5.js} +2 -2
  316. package/dist/esm/{style-formatter-ad0b2bac.js → style-formatter-9662ae88.js} +2 -2
  317. package/dist/esm/{sub-state-notify-slimmer-ee8c417b.js → sub-state-notify-slimmer-1f907173.js} +2 -2
  318. package/dist/esm/{sub-state-observer-slimmer-4d30fa5c.js → sub-state-observer-slimmer-090c500a.js} +3 -3
  319. package/dist/esm/{time-required-rule-414b1590.js → time-required-rule-a9dc8473.js} +1 -1
  320. package/dist/esm/tinycolor-polyfill-7be0eb93.js +322 -0
  321. package/dist/esm/{token-extension-600b1c88.js → token-extension-9d717a35.js} +212 -38
  322. package/dist/esm/{translation-slimmer-35b1d0fa.js → translation-slimmer-4faae5a3.js} +1 -1
  323. package/dist/esm/{type-guard-23a08026.js → type-guard-152070e9.js} +49 -2
  324. package/dist/esm/{ui-ba5a4758.js → ui-b7600a48.js} +69 -1
  325. package/dist/esm/{valid-credit-card-number-rule-60abddac.js → valid-credit-card-number-rule-a7907cb7.js} +1 -1
  326. package/dist/esm/vega-accordion.entry.js +9 -8
  327. package/dist/esm/vega-app-footer.entry.js +2 -1
  328. package/dist/esm/vega-app-header-button.entry.js +10 -9
  329. package/dist/esm/vega-backdrop.entry.js +1 -1
  330. package/dist/esm/vega-banner.entry.js +6 -5
  331. package/dist/esm/vega-box.entry.js +7 -6
  332. package/dist/esm/vega-brand-logo.entry.js +2 -1
  333. package/dist/esm/vega-breadcrumb.entry.js +29 -12
  334. package/dist/esm/vega-button-circle.entry.js +11 -10
  335. package/dist/esm/vega-button-group_2.entry.js +104 -15
  336. package/dist/esm/vega-button-link.entry.js +5 -5
  337. package/dist/esm/vega-button.entry.js +10 -10
  338. package/dist/esm/vega-calendar_4.entry.js +12 -12
  339. package/dist/esm/vega-card.entry.js +7 -6
  340. package/dist/esm/vega-carousel.entry.js +7 -7
  341. package/dist/esm/vega-checkbox_2.entry.js +10 -10
  342. package/dist/esm/vega-chip.entry.js +11 -10
  343. package/dist/esm/vega-code-block.entry.js +16 -15
  344. package/dist/esm/vega-color-picker.entry.js +28 -10
  345. package/dist/esm/vega-color-swatch.entry.js +241 -0
  346. package/dist/esm/vega-combo-box.entry.js +12 -12
  347. package/dist/esm/vega-date-picker_2.entry.js +342 -284
  348. package/dist/esm/vega-dialog_2.entry.js +76 -202
  349. package/dist/esm/vega-divider.entry.js +7 -6
  350. package/dist/esm/vega-dropdown_5.entry.js +76 -20
  351. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  352. package/dist/esm/vega-field-label.entry.js +4 -4
  353. package/dist/esm/vega-file-uploader.entry.js +42 -92
  354. package/dist/esm/vega-flag-icon.entry.js +5 -4
  355. package/dist/esm/vega-flex.entry.js +8 -7
  356. package/dist/esm/vega-font.entry.js +6 -5
  357. package/dist/esm/vega-form.entry.js +12 -12
  358. package/dist/esm/vega-grid.entry.js +6 -5
  359. package/dist/esm/vega-icon.entry.js +6 -5
  360. package/dist/esm/vega-image-uploader.entry.js +80 -15
  361. package/dist/esm/vega-input-credit-card.entry.js +13 -13
  362. package/dist/esm/vega-input-numeric.entry.js +13 -13
  363. package/dist/esm/vega-input-passcode.entry.js +12 -12
  364. package/dist/esm/vega-input-phone-number.entry.js +11 -11
  365. package/dist/esm/vega-input-range.entry.js +10 -10
  366. package/dist/esm/vega-input-select.entry.js +52 -17
  367. package/dist/esm/vega-input.entry.js +17 -14
  368. package/dist/esm/{vega-internal-event-id-70bd893d.js → vega-internal-event-id-194bac82.js} +2 -1
  369. package/dist/esm/vega-item-toggle.entry.js +4 -4
  370. package/dist/esm/vega-left-nav_5.entry.js +122 -15
  371. package/dist/esm/vega-loader-wrapper_2.entry.js +4 -4
  372. package/dist/esm/vega-page-notification_2.entry.js +2 -2
  373. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
  374. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +26 -10
  375. package/dist/esm/vega-pagination.entry.js +48 -24
  376. package/dist/esm/vega-popover_2.entry.js +14 -13
  377. package/dist/esm/vega-progress-tracker_2.entry.js +72 -17
  378. package/dist/esm/vega-radio_2.entry.js +13 -13
  379. package/dist/esm/vega-rich-text-content.entry.js +104 -22
  380. package/dist/esm/vega-rich-text-editor_4.entry.js +36 -24
  381. package/dist/esm/vega-rich-text-table-properties_3.entry.js +15 -14
  382. package/dist/esm/vega-section-title.entry.js +21 -3
  383. package/dist/esm/vega-segment-control.entry.js +4 -4
  384. package/dist/esm/vega-selection-chip_2.entry.js +12 -12
  385. package/dist/esm/vega-selection-tile_2.entry.js +11 -11
  386. package/dist/esm/vega-sidenav_3.entry.js +10 -10
  387. package/dist/esm/vega-signature-capture.entry.js +13 -12
  388. package/dist/esm/vega-stepper.entry.js +11 -11
  389. package/dist/esm/vega-tab-group_2.entry.js +5 -5
  390. package/dist/esm/vega-table_11.entry.js +436 -289
  391. package/dist/esm/vega-text.entry.js +7 -3
  392. package/dist/esm/vega-textarea.entry.js +9 -9
  393. package/dist/esm/vega-time-picker_2.entry.js +16 -16
  394. package/dist/esm/vega-toggle-switch.entry.js +8 -8
  395. package/dist/esm/vega-tooltip_2.entry.js +11 -10
  396. package/dist/esm/vega.js +15 -14
  397. package/dist/esm/{wait-for-component-did-render-03e7ccb2.js → wait-for-component-did-render-30cde59c.js} +2 -2
  398. package/dist/sri/vega-sri-manifest.json +389 -369
  399. package/dist/types/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-item-renderer.d.ts +1 -0
  400. package/dist/types/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-renderer.d.ts +1 -0
  401. package/dist/types/components/vega-breadcrumb/vega-breadcrumb.d.ts +10 -0
  402. package/dist/types/components/vega-button-group/slimmers/controllers/vega-button-group-all-items-disabled-controller.d.ts +21 -0
  403. package/dist/types/components/vega-button-group/vega-button-group-item/slimmers/controllers/vega-button-group-item-sub-state-controller.d.ts +1 -0
  404. package/dist/types/components/vega-button-group/vega-button-group-item/slimmers/renderers/vega-button-group-item-renderer.d.ts +1 -0
  405. package/dist/types/components/vega-button-group/vega-button-group-item/vega-button-group-item.d.ts +1 -0
  406. package/dist/types/components/vega-button-group/vega-button-group.d.ts +5 -0
  407. package/dist/types/components/vega-chip/vega-chip.d.ts +9 -0
  408. package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +14 -0
  409. package/dist/types/components/vega-color-swatch/slimmers/renderers/vega-color-swatch-renderer.d.ts +48 -0
  410. package/dist/types/components/vega-color-swatch/types.d.ts +5 -0
  411. package/dist/types/components/vega-color-swatch/vega-color-swatch.d.ts +86 -0
  412. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-current-period-controller.d.ts +1 -6
  413. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-is-dual-months-controller.d.ts +28 -0
  414. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.d.ts +1 -2
  415. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +1 -2
  416. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.d.ts +1 -1
  417. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +1 -1
  418. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +12 -0
  419. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.d.ts +12 -0
  420. package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.d.ts +1 -0
  421. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.d.ts +1 -0
  422. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.d.ts +1 -0
  423. package/dist/types/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.d.ts +4 -0
  424. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +10 -0
  425. package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +2 -2
  426. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-default-content-renderer.d.ts +25 -0
  427. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-preview-content-renderer.d.ts +10 -0
  428. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +2 -0
  429. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +1 -0
  430. package/dist/types/components/vega-input/types.d.ts +5 -0
  431. package/dist/types/components/vega-input/vega-input.d.ts +17 -1
  432. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +3 -0
  433. package/dist/types/components/vega-input-select/types.d.ts +14 -0
  434. package/dist/types/components/vega-input-select/vega-input-select.d.ts +19 -1
  435. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +0 -1
  436. package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +4 -0
  437. package/dist/types/components/vega-modal/vega-modal.d.ts +24 -3
  438. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.d.ts +17 -0
  439. package/dist/types/components/vega-pagination/constants/page-size.d.ts +2 -0
  440. package/dist/types/components/vega-pagination/internal/vega-pagination-page-size-selector.d.ts +3 -2
  441. package/dist/types/components/vega-pagination/slimmers/controllers/vega-pagination-page-size-observer-controller.d.ts +2 -0
  442. package/dist/types/components/vega-pagination/types.d.ts +15 -0
  443. package/dist/types/components/vega-pagination/utils/page-size-option-utils.d.ts +42 -0
  444. package/dist/types/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-dropdown-renderer.d.ts +2 -0
  445. package/dist/types/components/vega-pagination/vega-pagination-page-size-selector-mobile/vega-pagination-page-size-selector-mobile.d.ts +9 -2
  446. package/dist/types/components/vega-pagination/vega-pagination.d.ts +8 -3
  447. package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-direction-controller.d.ts +14 -2
  448. package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-step-controller.d.ts +1 -0
  449. package/dist/types/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.d.ts +1 -1
  450. package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +16 -0
  451. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +5 -0
  452. package/dist/types/components/vega-rich-text-editor/dto/annotations/image-annotation.d.ts +1 -0
  453. package/dist/types/components/vega-rich-text-editor/dto/annotations/inline-html-annotation.d.ts +14 -0
  454. package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +8 -2
  455. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +4 -2
  456. package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +2 -2
  457. package/dist/types/components/vega-rich-text-editor/dto/blocks/html-block.d.ts +1 -11
  458. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +1 -1
  459. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +1 -1
  460. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +1 -1
  461. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +15 -2
  462. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +9 -3
  463. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-block-filter-styles-strategy.d.ts +27 -0
  464. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-node-filter-styles-strategy.d.ts +27 -0
  465. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.d.ts +27 -1
  466. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.d.ts +92 -8
  467. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.d.ts +21 -3
  468. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.d.ts +15 -0
  469. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-heading-item-block-filter-styles-strategy.d.ts +19 -0
  470. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.d.ts +25 -0
  471. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-title-item-block-filter-styles-strategy.d.ts +19 -0
  472. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/predicate.d.ts +72 -0
  473. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/heading-filter-styles-strategy.d.ts +10 -0
  474. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/paragraph-filter-styles-strategy.d.ts +34 -0
  475. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/title-filter-styles-strategy.d.ts +11 -0
  476. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.d.ts +25 -2
  477. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.d.ts +24 -4
  478. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.d.ts +62 -0
  479. package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +7 -3
  480. package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +1 -1
  481. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +5 -3
  482. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +43 -4
  483. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.d.ts +25 -0
  484. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.d.ts +5 -0
  485. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +12 -0
  486. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +8 -0
  487. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +8 -0
  488. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.d.ts +7 -1
  489. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +9 -1
  490. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +1 -1
  491. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +1 -1
  492. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +5 -2
  493. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +1 -1
  494. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +1 -1
  495. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +1 -1
  496. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +1 -1
  497. package/dist/types/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-block/table-block-filter-styles-strategy.d.ts +29 -0
  498. package/dist/types/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-caption/table-caption-filter-styles-strategy.d.ts +29 -0
  499. package/dist/types/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-cell/table-cell-filter-styles-strategy.d.ts +46 -0
  500. package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +8 -0
  501. package/dist/types/components/vega-rich-text-editor/interface.d.ts +27 -5
  502. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
  503. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/custom-style-annotation-handler.d.ts +0 -7
  504. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +1 -1
  505. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/inline-html-annotation-handler.d.ts +11 -1
  506. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.d.ts +43 -7
  507. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.d.ts +8 -3
  508. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/html-block-strategy.d.ts +34 -1
  509. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/predicate.d.ts +21 -0
  510. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/strategy-tags.d.ts +83 -0
  511. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.d.ts +6 -0
  512. package/dist/types/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.d.ts +2 -0
  513. package/dist/types/components/vega-section-title/types.d.ts +1 -0
  514. package/dist/types/components/vega-section-title/vega-section-title.d.ts +14 -0
  515. package/dist/types/components/vega-table/slimmers/controllers/vega-table-render-input-controller.d.ts +8 -1
  516. package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +5 -1
  517. package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +5 -0
  518. package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +5 -0
  519. package/dist/types/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.d.ts +1 -0
  520. package/dist/types/components/vega-table/vega-table-head-row/vega-table-head-row.d.ts +4 -0
  521. package/dist/types/components/vega-text/types.d.ts +5 -3
  522. package/dist/types/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.d.ts +4 -0
  523. package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +4 -0
  524. package/dist/types/components.d.ts +247 -13
  525. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  526. package/dist/types/helpers/formatter/string-formatter/string-mask-strategy.d.ts +56 -3
  527. package/dist/types/helpers/slimmers/aria-dialog-focusable-trap-slimmer.d.ts +4 -12
  528. package/dist/types/helpers/slimmers/drop-file-accept-filter-slimmer.d.ts +29 -0
  529. package/dist/types/helpers/slimmers/vega-table-child-render-input-consumer-slimmer.d.ts +48 -0
  530. package/dist/types/helpers/translation/interface.d.ts +4 -1
  531. package/dist/types/types/components.type.d.ts +10 -0
  532. package/dist/types/types/public-api.d.ts +3 -1
  533. package/dist/types/types/type-guard.d.ts +29 -1
  534. package/dist/types/types/ui.type.d.ts +11 -1
  535. package/dist/types/utils/ui.d.ts +14 -0
  536. package/dist/vega/index.esm.js +1 -1
  537. package/dist/vega/{p-7618dde4.js → p-02467b61.js} +1 -1
  538. package/dist/vega/p-075bb809.entry.js +1 -0
  539. package/dist/vega/p-085de8fc.js +1 -0
  540. package/dist/vega/p-0915a8d3.entry.js +1 -0
  541. package/dist/vega/p-0caf52e0.js +1 -0
  542. package/dist/vega/{p-19ad4f15.entry.js → p-0dbd7723.entry.js} +1 -1
  543. package/dist/vega/{p-cf70c57d.js → p-103d20f5.js} +1 -1
  544. package/dist/vega/p-115d6053.entry.js +1 -0
  545. package/dist/vega/p-116e3963.js +1 -0
  546. package/dist/vega/p-14de7ba0.entry.js +1 -0
  547. package/dist/vega/p-19a30f98.entry.js +1 -0
  548. package/dist/vega/{p-90137c68.entry.js → p-1ca95601.entry.js} +1 -1
  549. package/dist/vega/p-1dd6ba67.js +1 -0
  550. package/dist/vega/p-1efb47fe.entry.js +1 -0
  551. package/dist/vega/p-23c840dc.entry.js +1 -0
  552. package/dist/vega/p-246eb001.entry.js +1 -0
  553. package/dist/vega/p-25ab7a33.entry.js +1 -0
  554. package/dist/vega/p-264b3309.entry.js +1 -0
  555. package/dist/vega/{p-c045e4c1.entry.js → p-280f63fa.entry.js} +1 -1
  556. package/dist/vega/p-295326ca.entry.js +1 -0
  557. package/dist/vega/p-29d31c98.entry.js +1 -0
  558. package/dist/vega/{p-382b71a3.entry.js → p-29f42c27.entry.js} +1 -1
  559. package/dist/vega/p-2b5cf2b3.js +1 -0
  560. package/dist/vega/{p-0313393d.entry.js → p-30445cd9.entry.js} +1 -1
  561. package/dist/vega/p-318f0df5.js +1 -0
  562. package/dist/vega/p-337a5e76.js +1 -0
  563. package/dist/vega/p-3505f7cc.entry.js +1 -0
  564. package/dist/vega/p-38af89b9.js +1 -0
  565. package/dist/vega/p-3fae8d3f.entry.js +1 -0
  566. package/dist/vega/{p-b696a861.js → p-42141782.js} +1 -1
  567. package/dist/vega/{p-d1ca70a1.js → p-44044ed7.js} +1 -1
  568. package/dist/vega/p-475bd8bf.entry.js +1 -0
  569. package/dist/vega/{p-df5bfbc4.entry.js → p-47611a83.entry.js} +1 -1
  570. package/dist/vega/p-4e95248c.entry.js +1 -0
  571. package/dist/vega/p-4f938ee4.entry.js +1 -0
  572. package/dist/vega/{p-f3456993.entry.js → p-513f51ec.entry.js} +1 -1
  573. package/dist/vega/{p-ba415db6.entry.js → p-51d2e0ab.entry.js} +1 -1
  574. package/dist/vega/{p-ab21fdf6.entry.js → p-58b6ac33.entry.js} +1 -1
  575. package/dist/vega/{p-7362723e.entry.js → p-596bc4f6.entry.js} +1 -1
  576. package/dist/vega/{p-70f1cf4e.entry.js → p-597588d0.entry.js} +1 -1
  577. package/dist/vega/p-5f377954.js +1 -1
  578. package/dist/vega/p-5ffdea8e.js +1 -0
  579. package/dist/vega/{p-3224e47c.js → p-6572e038.js} +1 -1
  580. package/dist/vega/{p-b5c2fff3.entry.js → p-6d95390b.entry.js} +1 -1
  581. package/dist/vega/p-6e70d3cc.js +1 -0
  582. package/dist/vega/p-6e9f832f.js +1 -0
  583. package/dist/vega/{p-c9201bf4.js → p-76063dcb.js} +1 -1
  584. package/dist/vega/p-783531cf.entry.js +1 -0
  585. package/dist/vega/{p-35386999.entry.js → p-7d85cc74.entry.js} +1 -1
  586. package/dist/vega/p-7df43192.entry.js +1 -0
  587. package/dist/vega/p-7faaa5e1.entry.js +1 -0
  588. package/dist/vega/{p-517434d4.entry.js → p-8583dd34.entry.js} +1 -1
  589. package/dist/vega/p-85abe824.entry.js +1 -0
  590. package/dist/vega/p-874bf8b2.js +1 -0
  591. package/dist/vega/p-88b6184c.entry.js +1 -0
  592. package/dist/vega/p-8aee6b74.js +1 -0
  593. package/dist/vega/{p-1557ed92.entry.js → p-8b217c7e.entry.js} +1 -1
  594. package/dist/vega/p-8da66d41.entry.js +1 -0
  595. package/dist/vega/{p-b3e40faf.js → p-956b170c.js} +1 -1
  596. package/dist/vega/{p-1c45565d.js → p-9751c801.js} +1 -1
  597. package/dist/vega/{p-7ceab8c7.entry.js → p-97f36f4e.entry.js} +1 -1
  598. package/dist/vega/p-988401c3.entry.js +1 -0
  599. package/dist/vega/{p-47ca1f69.entry.js → p-9c1a48b9.entry.js} +1 -1
  600. package/dist/vega/p-9d854d43.js +1 -0
  601. package/dist/vega/p-9dcecdd3.js +1 -0
  602. package/dist/vega/{p-612e3ded.js → p-a07c0f8c.js} +1 -1
  603. package/dist/vega/{p-576fe408.js → p-a0c3968b.js} +1 -1
  604. package/dist/vega/p-a30ae8a1.js +1 -0
  605. package/dist/vega/p-a5bd3ecd.entry.js +1 -0
  606. package/dist/vega/p-a6dbc63d.entry.js +1 -0
  607. package/dist/vega/p-aa985d73.js +1 -0
  608. package/dist/vega/{p-44c5cbb7.js → p-ab829745.js} +1 -1
  609. package/dist/vega/p-b08a70e6.entry.js +1 -0
  610. package/dist/vega/p-b19b1c08.js +1 -0
  611. package/dist/vega/p-b5497af2.entry.js +1 -0
  612. package/dist/vega/p-b7624ce4.js +1 -0
  613. package/dist/vega/p-b9386dd0.js +1 -0
  614. package/dist/vega/{p-e84b95d4.js → p-b9947846.js} +1 -1
  615. package/dist/vega/p-b9a95aca.entry.js +1 -0
  616. package/dist/vega/{p-dc9b5063.entry.js → p-bb46d8e6.entry.js} +1 -1
  617. package/dist/vega/{p-ec1d76c6.entry.js → p-c366e7f7.entry.js} +1 -1
  618. package/dist/vega/p-c36afa21.entry.js +1 -0
  619. package/dist/vega/{p-60cf2a68.js → p-c8435185.js} +1 -1
  620. package/dist/vega/{p-04e56b0c.entry.js → p-c8d41cdc.entry.js} +1 -1
  621. package/dist/vega/p-cab70b95.entry.js +1 -0
  622. package/dist/vega/p-cc18970f.entry.js +1 -0
  623. package/dist/vega/p-d320496e.entry.js +1 -0
  624. package/dist/vega/{p-89e56502.js → p-d32e83e7.js} +1 -1
  625. package/dist/vega/{p-65900dbf.entry.js → p-d456386a.entry.js} +1 -1
  626. package/dist/vega/p-d4f1f007.js +3 -0
  627. package/dist/vega/{p-82016096.js → p-d5531d3c.js} +1 -1
  628. package/dist/vega/{p-4eb282ef.entry.js → p-d7bd2470.entry.js} +1 -1
  629. package/dist/vega/p-d872beb1.entry.js +1 -0
  630. package/dist/vega/p-d9d5c693.entry.js +1 -0
  631. package/dist/vega/{p-be3517be.entry.js → p-da742a7f.entry.js} +1 -1
  632. package/dist/vega/{p-204c7d41.js → p-dd6211cd.js} +1 -1
  633. package/dist/vega/{p-f48c43f4.entry.js → p-e340d58c.entry.js} +1 -1
  634. package/dist/vega/p-e71864ff.js +1 -0
  635. package/dist/vega/{p-7912741f.entry.js → p-e7a4b760.entry.js} +1 -1
  636. package/dist/vega/{p-ffa2e3a6.entry.js → p-ea564928.entry.js} +1 -1
  637. package/dist/vega/p-eb0ebf50.entry.js +1 -0
  638. package/dist/vega/p-ebdb489c.entry.js +1 -0
  639. package/dist/vega/{p-7c2fecfd.entry.js → p-ed01657b.entry.js} +1 -1
  640. package/dist/vega/p-eda7cd76.entry.js +1 -0
  641. package/dist/vega/{p-68a531cf.js → p-edda10f7.js} +1 -1
  642. package/dist/vega/{p-2c2df248.js → p-ef59f6f0.js} +1 -1
  643. package/dist/vega/{p-1a2f92a3.entry.js → p-efc8c09e.entry.js} +1 -1
  644. package/dist/vega/p-f020738c.entry.js +1 -0
  645. package/dist/vega/{p-878851f6.js → p-f28a6074.js} +1 -1
  646. package/dist/vega/{p-07a2b42a.js → p-f7a5746b.js} +1 -1
  647. package/dist/vega/{p-9dc23325.entry.js → p-f89cf75a.entry.js} +1 -1
  648. package/dist/vega/p-fb5ea4b2.js +1 -0
  649. package/dist/vega/p-fc7ab79d.js +1 -0
  650. package/dist/vega/vega.esm.js +1 -1
  651. package/package.json +1 -1
  652. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.js +0 -146
  653. package/dist/types/components/vega-file-uploader/slimmers/controllers/vega-file-uploader-drop-file-filter-controller.d.ts +0 -22
  654. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.d.ts +0 -42
  655. package/dist/vega/p-010b5e74.js +0 -1
  656. package/dist/vega/p-01883ffc.entry.js +0 -1
  657. package/dist/vega/p-02578a59.js +0 -1
  658. package/dist/vega/p-043e685a.entry.js +0 -1
  659. package/dist/vega/p-08780df0.entry.js +0 -1
  660. package/dist/vega/p-10fa4eac.js +0 -1
  661. package/dist/vega/p-18619467.js +0 -1
  662. package/dist/vega/p-1feb4f2a.entry.js +0 -1
  663. package/dist/vega/p-203bc4db.entry.js +0 -1
  664. package/dist/vega/p-21c9e1ca.entry.js +0 -1
  665. package/dist/vega/p-22336063.js +0 -1
  666. package/dist/vega/p-224b67ff.entry.js +0 -1
  667. package/dist/vega/p-2d917e2d.entry.js +0 -1
  668. package/dist/vega/p-2e73582d.entry.js +0 -1
  669. package/dist/vega/p-334e3b02.entry.js +0 -1
  670. package/dist/vega/p-33860e54.js +0 -1
  671. package/dist/vega/p-365d21ac.entry.js +0 -1
  672. package/dist/vega/p-367d44d9.entry.js +0 -1
  673. package/dist/vega/p-3d2d267d.js +0 -1
  674. package/dist/vega/p-3f3c771a.entry.js +0 -1
  675. package/dist/vega/p-434fc427.entry.js +0 -1
  676. package/dist/vega/p-559197f8.js +0 -1
  677. package/dist/vega/p-5ae4ea20.entry.js +0 -1
  678. package/dist/vega/p-68124bc5.js +0 -1
  679. package/dist/vega/p-6af55f1c.entry.js +0 -1
  680. package/dist/vega/p-6c5250b3.js +0 -1
  681. package/dist/vega/p-6f2e5bc6.js +0 -1
  682. package/dist/vega/p-716c71e6.js +0 -1
  683. package/dist/vega/p-76b80a0c.js +0 -1
  684. package/dist/vega/p-7942c042.entry.js +0 -1
  685. package/dist/vega/p-8327635d.js +0 -1
  686. package/dist/vega/p-840ad046.entry.js +0 -1
  687. package/dist/vega/p-8ac2d165.js +0 -1
  688. package/dist/vega/p-8adf9732.entry.js +0 -1
  689. package/dist/vega/p-8b891f36.entry.js +0 -1
  690. package/dist/vega/p-9341c1a9.js +0 -1
  691. package/dist/vega/p-9390a94b.entry.js +0 -1
  692. package/dist/vega/p-9551da9c.entry.js +0 -1
  693. package/dist/vega/p-9862d1a8.entry.js +0 -1
  694. package/dist/vega/p-a4dbf2cc.js +0 -1
  695. package/dist/vega/p-a99e75a1.entry.js +0 -1
  696. package/dist/vega/p-b5a6bd0f.entry.js +0 -1
  697. package/dist/vega/p-c4e32125.entry.js +0 -1
  698. package/dist/vega/p-c5b698f6.entry.js +0 -1
  699. package/dist/vega/p-c61279a7.entry.js +0 -1
  700. package/dist/vega/p-c6d62f0d.js +0 -1
  701. package/dist/vega/p-c8feb644.entry.js +0 -1
  702. package/dist/vega/p-cc055723.entry.js +0 -1
  703. package/dist/vega/p-cca5042b.entry.js +0 -1
  704. package/dist/vega/p-cda45d2a.entry.js +0 -1
  705. package/dist/vega/p-cdf5b2f0.entry.js +0 -1
  706. package/dist/vega/p-d1494c7c.entry.js +0 -1
  707. package/dist/vega/p-d202e69d.entry.js +0 -1
  708. package/dist/vega/p-dcd18ab1.js +0 -1
  709. package/dist/vega/p-e4726dcd.entry.js +0 -1
  710. package/dist/vega/p-ea21462f.js +0 -1
  711. package/dist/vega/p-f4190826.entry.js +0 -1
  712. package/dist/vega/p-fdac91c4.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{h as t,F as e,r as n,c as o,H as i,g as r}from"./p-6b2342e0.js";import{c as s,V as a,M as c,I as l}from"./p-6e1ab235.js";import{V as d,I as p}from"./p-4415ad28.js";import{s as u}from"./p-519a7d55.js";import{V as h}from"./p-e1fbfd20.js";import{t as f}from"./p-aacf6920.js";import{D as v,d as b}from"./p-878851f6.js";import{h as g,a as m,n as y}from"./p-c5eb0fa6.js";import{a3 as x}from"./p-68124bc5.js";import{a as C}from"./p-dcd18ab1.js";import{C as w}from"./p-2d0d575f.js";import{y as j,x as k}from"./p-33860e54.js";import{c as R}from"./p-d1ca70a1.js";import{d as O}from"./p-a841cf13.js";import{T as E}from"./p-3224e47c.js";import{S,a as F,C as $}from"./p-a4dbf2cc.js";import{A as L}from"./p-4d65756f.js";import{d as A}from"./p-1bc5b3bc.js";import{C as T}from"./p-68a531cf.js";import{C as D}from"./p-2bb5a232.js";import"./p-e6adf829.js";import"./p-593e0f80.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-331a62d5.js";import"./p-02841589.js";import"./p-c6d62f0d.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-82016096.js";import"./p-a528714c.js";import"./p-8ac2d165.js";import"./p-4866e390.js";import"./p-b75ee3ba.js";import"./p-f0e828d8.js";import"./p-3d2d267d.js";import"./p-89e56502.js";import"./p-1c45565d.js";import"./p-22336063.js";import"./p-1fb56e14.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";var H=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class P extends a{constructor(){super(...arguments),this.languageDropdownProps={searchable:!1},this.languageOptions=Object.keys(x).map((t=>({id:x[t],displayName:t}))),this.handleLanguageChange=t=>{v.addUniqueObserverToNode(t,g,(t=>{var e;this.valueController.updateValue(null===(e=this.value)||void 0===e?void 0:e.code,t.detail)}))},this.handleDeleteClick=t=>{v.addUniqueObserverToNode(t,m,(()=>{this.removeEventEmitter.emit().defaultPrevented||this.host.remove()}))}}getToolbarContainerRef(){return this.toolbarContainerRef}render(){return t(e,null,t("div",{part:"editor-toolbar",contenteditable:!1,class:{"editor-toolbar":!this.readOnly,"copy-button-container":this.showCopyButton&&this.readOnly},ref:t=>this.toolbarContainerRef=t},this.renderEditorToolbar(),this.copyButtonRenderer.render()),this.contentRenderer.render())}renderEditorToolbar(){var n,o;if(!this.readOnly)return t(e,null,t("vega-input-select",{source:this.languageOptions,value:null!==(o=null===(n=this.value)||void 0===n?void 0:n.language)&&void 0!==o?o:"",disabled:this.disabled,placeholder:this.translationSlimmer.t("Select Language"),size:"small",vegaDropdownProps:this.languageDropdownProps,exportparts:"select-container, selected-box, placeholder, toggle-icon-container, toggle-icon",ref:this.handleLanguageChange}),t("vega-button-circle",{key:"delete-button",disabled:this.disabled,label:this.translationSlimmer.t("Delete Code"),icon:h.getIconKey("trash-can"),iconColor:"text-secondary",variant:"icon-only",size:"extra-small",ref:this.handleDeleteClick}))}}h.register({"trash-can":f}),H([s()],P.prototype,"readOnly",void 0),H([s()],P.prototype,"host",void 0),H([s()],P.prototype,"disabled",void 0),H([s()],P.prototype,"showCopyButton",void 0),H([s()],P.prototype,"value",void 0),H([s()],P.prototype,"contentRenderer",void 0),H([s()],P.prototype,"valueController",void 0),H([s()],P.prototype,"removeEventEmitter",void 0),H([s()],P.prototype,"translationSlimmer",void 0),H([s()],P.prototype,"copyButtonRenderer",void 0);var N=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class _ extends a{constructor(){super(...arguments),this.handleFocus=()=>{this.readOnly||this.disabled||this.host.classList.add("focus")},this.handleBlur=()=>{this.host.classList.remove("focus"),w.notify(b.getSubject(this.host,j),null)}}getCodeContentContainerRef(){return this.codeContentContainerRef}registerEventListener(){this.codeContentContainerRef&&(this.codeContentContainerRef.addEventListener("focusin",this.handleFocus),this.codeContentContainerRef.addEventListener("focusout",this.handleBlur))}unregisterEventListener(){this.codeContentContainerRef&&(this.codeContentContainerRef.removeEventListener("focusin",this.handleFocus),this.codeContentContainerRef.removeEventListener("focusout",this.handleBlur))}render(){var n;const o=this.contentParseController.parseCode(),i=(null===(n=this.value)||void 0===n?void 0:n.language)||"";return t(e,null,t("style",null,this.getLineNumberStyleVariable(o)),t("code",{role:"textbox",tabIndex:0,spellcheck:!1,ref:t=>this.codeContentContainerRef=t,contenteditable:!this.readOnly&&!this.disabled,"data-language":i,innerHTML:o.map((t=>this.renderCodeNode(t))).join("")}))}renderCodeNode(t){const{key:e,className:n,mark:o,text:i}=t;return`<span key='${e}' class='${n}' data-mark='${o}' data-index='${e}'>${i}</span>`}getLineNumberStyleVariable(t){const e=10*(t.filter((t=>"\n"===t.text)).length+1).toString().length;return`code{--v-code-line-number-width:${e}px;--v-code-line-number-ml:-${e+16}px;--v-code-block-pl:${e+16}px}`}}N([s()],_.prototype,"host",void 0),N([s()],_.prototype,"readOnly",void 0),N([s()],_.prototype,"disabled",void 0),N([s()],_.prototype,"value",void 0),N([s()],_.prototype,"contentParseController",void 0),N([c("componentDidLoad")],_.prototype,"registerEventListener",null),N([c("disconnectedCallback")],_.prototype,"unregisterEventListener",null);var z=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class B extends a{updateValue(t,e,n){this.value&&this.value.code===t&&this.value.language===e||(this.value={language:e,code:t},this.changeEventEmitter.emit(this.value),n&&n.recordHistory&&this.historyController.registerHistory({value:this.value,offset:n.offset}))}initialValue(){this.value||(this.value={code:"",language:"plainText"})}}z([s({writable:!0})],B.prototype,"value",void 0),z([s()],B.prototype,"changeEventEmitter",void 0),z([s()],B.prototype,"historyController",void 0),z([c("connectedCallback")],B.prototype,"initialValue",null);var I=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class M extends a{constructor(){super(...arguments),this.codeNodes=[]}getCurrentCodeNodes(){return this.codeNodes}parseCode(){const t=[this.prismCodeHighlightParser,this.defaultCodeHighlightParser];let e=[];for(const n of t)if(n.canParse()){e=n.parse();break}return this.codeNodes=e,e}}I([s()],M.prototype,"prismCodeHighlightParser",void 0),I([s()],M.prototype,"defaultCodeHighlightParser",void 0);class V{constructor(t){this.contentOffset=0,this.selectedText="",this.codeContainerRef=t}updateRange(t,e,n,o=""){const i=new V(this.codeContainerRef);return i.selectedText=o,i.contentOffset=i.getContentOffset(t,e,n),i}updateContentOffset(t){return this.contentOffset=Math.max(0,t),this.selectedText="",this.contentOffset}createNativeRange(t){const{nodeIndex:e,offset:n}=this.getFocusNodeState(t,this.contentOffset),o=new Range,i=this.codeContainerRef.querySelector(`span[data-index="${e}"]`);if(i){const t=Math.min(i.firstChild.textContent.length,n);return o.setStart(i.firstChild,t),o.setEnd(i.firstChild,t),o}}getContentOffset(t,e,n){let o=t.nodeType===Node.TEXT_NODE?t.parentElement:t;if("CODE"===o.nodeName&&o.childNodes&&o.childNodes.length&&(o=o.childNodes[Math.min(e,o.childNodes.length-1)],e=0),o&&o.hasAttribute("data-index")){const t=Number(o.dataset.index);let i="";for(let e=0;e<t;e++)i+=n[e].text;return i.length+e}return 0}getFocusNodeState(t,e){const n=this.getCodeContent(t),o={nodeIndex:0,offset:0};if(!n||e>=n.length)o.nodeIndex=t.length-1,o.offset=t[o.nodeIndex].text.length;else{let n="";for(let i=0;i<t.length;i++)if(n+=t[i].text,n.length>=e){o.offset=Math.max(0,t[i].text.length-(n.length-e)),o.nodeIndex=i;break}}return"\n"===t[o.nodeIndex].text&&o.offset>0&&t[o.nodeIndex+1]&&(o.nodeIndex+=1,o.offset=0),o}getCodeContent(t){return t.map((t=>t.text)).join("")}}var Z=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class U extends L{constructor(){super(1),this.handleSelectionWithDebounce=A(this.handleSelectionChange,U.SELECTION_CHANGE_DEBOUNCE_TIME,this),this.doTask=async()=>{await Promise.resolve();const t=this.getSelection(),e=this.codeBlockRange.createNativeRange(this.contentParseController.getCurrentCodeNodes());t&&e&&(t.removeAllRanges(),t.addRange(e))}}getCurrentRange(){return this.codeBlockRange}setNextCodeBlockRange(t,e=!1){this.codeBlockRange.updateContentOffset(t),super.enqueueTheTaskIntoQueue(e)}addSelectionChangeEventListener(){this.codeBlockRange=new V(this.contentRenderer.getCodeContentContainerRef()),document.addEventListener("selectionchange",this.handleSelectionWithDebounce)}removeSelectionChangeEventListener(){document.removeEventListener("selectionchange",this.handleSelectionWithDebounce)}getSelection(){return S.getSelection(this.host.shadowRoot)}handleSelectionChange(){const t=this.getSelection();t&&t.rangeCount>0?(this.syncCodeRangeByNativeRange(),w.notify(b.getSubject(this.host,k),{detail:!0})):w.notify(b.getSubject(this.host,k),{detail:!1})}syncCodeRangeByNativeRange(){const t=this.getSelection();if(this.isCodeBlockActive()&&0===this.autoRunTaskQueue.queue.length&&!this.insertCompositionTextController.isComposing()){const e=t.getRangeAt(0),{startContainer:n,startOffset:o}=e;this.codeBlockRange=this.codeBlockRange.updateRange(n,o,this.contentParseController.getCurrentCodeNodes(),e.toString())}}isCodeBlockActive(){return this.host&&this.host.classList.contains("focus")}}U.SELECTION_CHANGE_DEBOUNCE_TIME=Math.min(F.SELECTION_CHANGE_DEBOUNCE_TIME,40),Z([s()],U.prototype,"host",void 0),Z([s()],U.prototype,"contentRenderer",void 0),Z([s()],U.prototype,"contentParseController",void 0),Z([s()],U.prototype,"insertCompositionTextController",void 0),Z([c("componentDidLoad")],U.prototype,"addSelectionChangeEventListener",null),Z([c("disconnectedCallback")],U.prototype,"removeSelectionChangeEventListener",null);class Y extends a{deleteSelectedText(t,e,n){return n>=t.length?"":t.slice(0,e)+t.slice(e+n)}getCodeNodesContent(t){return t.map((t=>t.text)).join("")}stopEventPropagation(t){t&&"function"==typeof t.stopPropagation&&t.stopPropagation()}reCalculateRangeAndContent(t,e,n){let o=t.contentOffset,i=e;return t&&(t.selectedText.length&&(i=this.deleteSelectedText(i,t.contentOffset,t.selectedText.length)),i=i.slice(0,t.contentOffset)+n+i.slice(t.contentOffset),o=t.contentOffset+n.length),{nextOffset:o,updatedContent:i}}}var G=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class q extends Y{constructor(){super(...arguments),this.handleInputEvent=t=>{this.stopEventPropagation(t),this.updateCodeContent()},this.handleBeforeInput=t=>{switch(t.stopPropagation(),t.inputType){case"deleteContentBackward":return void(this.value&&this.value.code&&""!==this.value.code?this.handleDeleteAction(t):t.preventDefault());case"historyUndo":case"historyRedo":return void t.preventDefault()}this.updateCodeBlockRange(t)}}registerInputEvent(){const t=this.contentRenderer.getCodeContentContainerRef();t&&(t.addEventListener("beforeinput",this.handleBeforeInput),t.addEventListener("input",this.handleInputEvent))}unregisterEventListener(){const t=this.contentRenderer.getCodeContentContainerRef();t&&(t.removeEventListener("beforeinput",this.handleBeforeInput),t.removeEventListener("input",this.handleInputEvent))}handleDeleteAction(t){const e=this.selectionController.getCurrentRange();if(e){t.preventDefault();const n=e.contentOffset,o=this.contentParseController.getCurrentCodeNodes();let i=this.getCodeNodesContent(o),r=n;e.selectedText.length?i=this.deleteSelectedText(i,n,e.selectedText.length):n>0&&(i=i.slice(0,n-1)+i.slice(n),r-=1),this.selectionController.setNextCodeBlockRange(r),this.valueController.updateValue(i,this.value.language,{recordHistory:!0,offset:r})}}updateCodeBlockRange(t){const e=this.selectionController.getCurrentRange();!this.insertCompositionTextController.isComposing()&&e&&this.selectionController.setNextCodeBlockRange(e.contentOffset+this.getInsertDataLength(t))}getInsertDataLength(t){const{data:e,inputType:n}=t;switch(n){case"insertText":return e.length;case"insertParagraph":case"insertLineBreak":return 1;default:return 0}}updateCodeContent(){var t;if(!this.insertCompositionTextController.isComposing()){let e=this.contentRenderer.getCodeContentContainerRef().innerText;this.isInsertLineBreakInLowVersionFirefox(e)&&(e+="\n"),this.valueController.updateValue(e,null===(t=this.value)||void 0===t?void 0:t.language,{recordHistory:!0,offset:this.selectionController.getCurrentRange().contentOffset})}}isInsertLineBreakInLowVersionFirefox(t){var e;const n=(null===(e=this.value)||void 0===e?void 0:e.code)||"";return!n.endsWith("\n")&&t===n+"\n"}}G([s()],q.prototype,"selectionController",void 0),G([s()],q.prototype,"contentRenderer",void 0),G([s()],q.prototype,"valueController",void 0),G([s()],q.prototype,"contentParseController",void 0),G([s()],q.prototype,"insertCompositionTextController",void 0),G([s()],q.prototype,"value",void 0),G([c("componentDidLoad")],q.prototype,"registerInputEvent",null),G([c("disconnectedCallback")],q.prototype,"unregisterEventListener",null);var W=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class X extends a{focusAndUpdateSelection(){if(!this.disabled&&!this.readOnly){const t=this.contentRenderer.getCodeContentContainerRef();t&&(t.focus(),this.selectionController.setNextCodeBlockRange(this.value&&this.value.code&&" "!==this.value.code?this.value.code.length:0,!0))}}removeFocusAfterDisabled(){(this.disabled||this.readOnly)&&this.host.classList.remove("focus")}}W([s()],X.prototype,"host",void 0),W([s()],X.prototype,"value",void 0),W([s()],X.prototype,"readOnly",void 0),W([s()],X.prototype,"disabled",void 0),W([s()],X.prototype,"contentRenderer",void 0),W([s()],X.prototype,"selectionController",void 0),W([c("doFocus")],X.prototype,"focusAndUpdateSelection",null),W([c("watchEditableChange")],X.prototype,"removeFocusAfterDisabled",null);var J=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class K extends a{constructor(){super(...arguments),this.handleCopyClick=t=>{v.addUniqueObserverToNode(t,m,(async()=>{var e;const n=(null===(e=this.value)||void 0===e?void 0:e.code)||"";if(n&&globalThis.navigator&&globalThis.navigator.clipboard){clearTimeout(this.updateLabelTimer),await globalThis.navigator.clipboard.writeText(n);const e=t.label;t.label=this.translationSlimmer.t("Copied"),this.updateLabelTimer=setTimeout((()=>{t&&(t.label=e)}),K.RESET_TOOLTIP_TIME)}}))}}render(){if(this.showCopyButton&&this.readOnly)return t("vega-button-circle",{key:"copy-button",label:this.translationSlimmer.t("Copy Code"),class:"copy-code-button",icon:h.getIconKey("copy"),iconColor:"text-secondary",variant:"icon-only",size:"extra-small",ref:this.handleCopyClick})}}function Q(t,e){if(!t||!e)return[t];const n=[t];return function(t,e){const n=[],o=[];for(const t of Object.keys(e)){const i=e[t],r=Array.isArray(i)?i:[i];for(const e of r)e.greedy?n.push({tokenType:t,patternDef:e}):o.push({tokenType:t,patternDef:e})}n.length>0&&function(t,e){for(let n=0;n<t.length;n++){const o=t[n];if("string"!=typeof o)continue;const i=o;let r=i;const s=[];for(const{tokenType:t,patternDef:n}of e){const{pattern:e,lookbehind:o,inside:a}=n,c=new RegExp(e.source,e.flags.replace(/g/g,"")+"g");let l;for(;null!==(l=c.exec(r));){let e=l.index,n=l[0];if(0===n.length){c.lastIndex++;continue}if(-1!==n.indexOf("\0GREEDY_PLACEHOLDER\0"))continue;if(o&&l[1]){const t=l[1].length;e+=t,n=n.slice(t)}const d=e+n.length;s.push({tokenType:t,matchStart:e,matchEnd:d,matchText:i.slice(e,d),inside:a}),r=r.slice(0,e)+"\0GREEDY_PLACEHOLDER\0".repeat(n.length).slice(0,n.length)+r.slice(d)}}if(0===s.length)continue;s.sort(((t,e)=>t.matchStart-e.matchStart));const a=[];let c=0;for(const t of s){t.matchStart>c&&a.push(i.slice(c,t.matchStart));let e=t.matchText;if(t.inside){const n=Q(t.matchText,t.inside);e=1===n.length?n[0]:n}a.push({type:t.tokenType,content:e}),c=t.matchEnd}c<i.length&&a.push(i.slice(c)),t.splice(n,1,...a),n+=a.length-1}}(t,n);for(const{tokenType:e,patternDef:n}of o)tt(t,e,n)}(n,e),n}function tt(t,e,n){for(let o=0;o<t.length;o++){const i=t[o];if("string"!=typeof i)continue;const r=et(i,e,n);1===r.length&&"string"==typeof r[0]||(t.splice(o,1,...r),o+=r.length-1)}}function et(t,e,n){const{pattern:o,lookbehind:i,inside:r}=n,s=new RegExp(o.source,o.flags.replace(/g/g,"")+"g"),a=[];let c,l=0;for(;null!==(c=s.exec(t));){let n=c.index,o=c[0];if(0===o.length){s.lastIndex++;continue}if(i&&c[1]){const t=c[1].length;n+=t,o=o.slice(t)}n>l&&a.push(t.slice(l,n));let d=o;if(r){const t=Q(o,r);d=1===t.length?t[0]:t}a.push({type:e,content:d}),l=n+o.length}return l<t.length&&a.push(t.slice(l)),0===a.length?[t]:a}h.register({copy:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><g clip-path="url(#clip0_70002_574)"><path fill="currentColor" d="M11.7794 1.65539L10.3439 0.219844C10.2044 0.0790078 10.0122 0 9.81303 0H5.97865C5.15014 0 4.47865 0.671719 4.47865 1.5L4.47911 7.5C4.49975 8.32969 5.1724 9 5.99975 9H10.4997C11.3247 9 11.9997 8.325 11.9997 7.5V2.18555C11.9997 1.9868 11.9201 1.79602 11.7794 1.65539ZM10.8747 7.5C10.8747 7.70709 10.7068 7.875 10.4997 7.875H5.97865C5.77151 7.875 5.60365 7.70709 5.60365 7.5V1.50305C5.60365 1.29595 5.77156 1.12805 5.97865 1.12805H8.97865L8.99975 2.25C8.99975 2.66414 9.33561 3 9.74975 3H10.8537V7.5H10.8747ZM6.37475 10.5C6.37475 10.7071 6.20684 10.875 5.99975 10.875H1.47865C1.27151 10.875 1.10365 10.7071 1.10365 10.5L1.12428 4.50234C1.12428 4.29525 1.29218 4.12734 1.49928 4.12734H3.74975V3H1.49951C0.670996 3 -0.000488281 3.67148 -0.000488281 4.5L-0.000258594 10.5C-0.000207031 11.3273 0.671465 12 1.49975 12H5.99975C6.82475 12 7.49975 11.325 7.49975 10.5V9.75H6.39584L6.37475 10.5Z"/></g><defs><clipPath id="clip0_70002_574"><rect width="12" height="12" fill="currentColor"/></clipPath></defs></svg>'}}),K.RESET_TOOLTIP_TIME=1e3,J([s()],K.prototype,"value",void 0),J([s()],K.prototype,"readOnly",void 0),J([s()],K.prototype,"showCopyButton",void 0),J([s()],K.prototype,"translationSlimmer",void 0);const nt={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"']|"[^"]*"|'[^']*')+(?:>|$)/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0},punctuation:{pattern:/^<!|>$|[[\]]/},"doctype-tag":{pattern:/^DOCTYPE/i},name:{pattern:/[^\s<>'"/]+/},string:{pattern:/("|')[\s\S]*?\1/,greedy:!0}}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>/=$<%]+(?:\s(?:\s*[^\s>/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>/]+/,inside:{punctuation:{pattern:/^<\/?/},namespace:{pattern:/^[^\s>/:]+:/}}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:{pattern:/\/?>/},"attr-name":{pattern:/[^\s>/]+/,inside:{namespace:{pattern:/^[^\s>/:]+:/}}}}},entity:[{pattern:/&[\da-z]{1,8};/i},{pattern:/&#x?[\da-f]{1,8};/i}]},ot={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:[{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\\r\n])*\1/,greedy:!0}],"template-string":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/},interpolation:{pattern:/\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/}}},string:{pattern:/[\s\S]+/}}},regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[.\r\n,;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0},"regex-delimiter":{pattern:/^\/|\/$/},"regex-flags":{pattern:/^[a-z]+$/}}},"class-name":[{pattern:/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,lookbehind:!0,inside:{punctuation:{pattern:/[.\\]/}}}],keyword:[{pattern:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/}],boolean:{pattern:/\b(?:false|true)\b/},number:{pattern:/\b(?:(?:0[xX][\dA-Fa-f](?:_[\dA-Fa-f])*|0[bB][01](?:_[01])*|0[oO][0-7](?:_[0-7])*)n?|(?:\d(?:_\d)*\.?\d*|\.\d+)(?:[Ee][+-]?\d(?:_\d)*)?n?|NaN|Infinity)\b/},function:{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/},operator:{pattern:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%|&^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/},punctuation:{pattern:/[{}[\];(),.:]/},constant:{pattern:/\b[A-Z](?:[A-Z_]|\dx)*\b/}};const{function:it,punctuation:rt}=ot,st=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}(ot,["keyword","function","operator","punctuation"]),at=Object.assign(Object.assign({},st),{"class-name":[{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:{punctuation:{pattern:/[<>.,]/}}}],builtin:{pattern:/\b(?:Array|Boolean|Date|Function|Map|Number|Object|Promise|RegExp|Set|String|WeakMap|WeakSet|bigint|boolean|never|null|number|string|symbol|undefined|unknown|void)\b/},keyword:[{pattern:/\b(?:abstract|as|asserts|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|infer|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/}],function:it,"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:{pattern:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/},generic:{pattern:/<[\s\S]+/,inside:{punctuation:{pattern:/[<>(),.]/},keyword:{pattern:/\b(?:extends|infer|keyof)\b/},builtin:{pattern:/\b(?:boolean|never|null|number|string|symbol|undefined|unknown|void)\b/}}}}},operator:{pattern:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%|&^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]|!(?=\s*[^=])/},punctuation:rt}),ct=Object.assign(Object.assign({tag:{pattern:/<\/?(?:[\w.:-]+(?:\s+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[\w$]+)*\}))*\s*\/?)?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>/]*/,inside:{punctuation:{pattern:/^<\/?/},namespace:{pattern:/^[^\s>/:]+:/}}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/,inside:{punctuation:[{pattern:/^=/},{pattern:/^(\s*)["'{]|[}"']$/,lookbehind:!0}],script:{pattern:/[\s\S]+/,inside:ot}}},spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[\w$]+)*\}/,inside:{punctuation:{pattern:/^\{\.{3}|\}$/},"attr-name":{pattern:/[\s\S]+/}}},"attr-name":{pattern:/[^\s>/]+/,inside:{namespace:{pattern:/^[^\s>/:]+:/}}},punctuation:{pattern:/\/?>/}}}},ot),{entity:nt.entity}),lt={css:{comment:{pattern:/\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\\n\r])*\1/,greedy:!0},atrule:[{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:{pattern:/^@[\w-]+/},"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0},punctuation:{pattern:/[;:(){}]/}}}],url:{pattern:/\burl\((?:("|')(?:\\[\s\S]|(?!\1)[^\\\n\r])*\1|(?:[^\\\r\n()"']|\\[\s\S])*)\)/i,greedy:!0,inside:{function:{pattern:/^url/i},punctuation:{pattern:/^\(|\)$/},string:{pattern:/^("|')[\s\S]+(?=\1$)/,lookbehind:!0}}},selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?![\s{])|\((?:[^()]|\([^()]*\))*\))*(?=\s*\{)/,inside:{"pseudo-element":{pattern:/(?:::)[\w-]+/},"pseudo-class":{pattern:/(?::)[\w-]+/},class:{pattern:/\.[\w-]+/},id:{pattern:/#[\w-]+/},attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\[\s\S]|(?!\1)[^\\\n\r])*\1)*\]/,greedy:!0,inside:{punctuation:{pattern:/^\[|\]$/},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\u00B7\u00C0-\u024F])+/i,lookbehind:!0},"attr-value":[{pattern:/(=\s*)(?:"[^"]*"|'[^']*'|[^\s'"=]+)/,lookbehind:!0}],operator:{pattern:/[|~*^$]?=/}}}}},property:{pattern:/(?!\s)[-_a-z\u00B7\u00C0-\u024F][-\w\u00B7\u00C0-\u024F]*(?=\s*:)/i},important:{pattern:/!important\b/i},function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},number:{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?/i,lookbehind:!0},unit:{pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},punctuation:{pattern:/[(){};:,]/},operator:{pattern:/[+\-*/=><~^|]+/}},html:nt,markup:nt,javascript:ot,js:ot,typescript:at,ts:at,jsx:ct,tsx:Object.assign(Object.assign({tag:ct.tag},at),{entity:ct.entity}),c:ot,clike:ot};const dt=Object.values(x);class pt extends a{splitTag(t){if(!this.hasSpecialCharacter(t)||t.length<2)return[t];{const e=[],n=t.split("");let o=0;return n.forEach((t=>{"<"===t||">"===t||"/"===t?(e.push(t),o=e.length):e[o]=e[o]?e[o]+t:t})),e}}isHighlightLanguage(t){return"plainText"!==t&&dt.includes(t)}markLineNumberNodes(t){0===t.length&&t.push({text:"\n",key:"0",className:""});let e=0;return t.map(((n,o)=>{let i=n.className;return 0!==o&&"\n"!==t[o-1].text||(e++,i=`v-code-line-number ${n.className}`),{text:n.text,key:`${o}`,className:i,mark:`${e}`}}))}hasSpecialCharacter(t){return/[<|>|\\/]/.test(t)}}!function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);r>3&&s&&Object.defineProperty(e,n,s)}([s()],pt.prototype,"value",void 0);class ut extends pt{canParse(){const{code:t,language:e}=this.value||{code:""};return t&&e&&this.isHighlightLanguage(e)}parse(){const{code:t,language:e}=this.value;let n=[];const o=Q(t,function(t){return lt[t]}(e));return n=this.getHighlightNodes(o),this.markLineNumberNodes(n)}getHighlightNodes(t,e){const n=[];for(const o of t)if("string"==typeof o){const t=o.split(/(\n|\t)/),i=t.length;for(let o=0;o<i;o++){const i=t[o];if(i){const t=this.splitTag(i);n.push(...t.map((t=>this.createCodeNode(t,e))))}}}else{const{content:t}=o;"string"==typeof t?n.push(...this.getHighlightNodes([t],o.type)):Array.isArray(t)&&n.push(...this.getHighlightNodes(t,o.type))}return n}createCodeNode(t,e){return{text:t,key:"",className:`token ${e||""}`,mark:""}}}class ht extends pt{canParse(){const{code:t,language:e}=this.value||{code:""};return!t||!e||"plainText"===e||!this.isHighlightLanguage(e)}parse(){var t,e;const n=(null!==(e=null===(t=this.value)||void 0===t?void 0:t.code)&&void 0!==e?e:"").split(/(\n)/);let o=[];return n.forEach((t=>{if(t){const e=this.splitTag(t);o.push(...e.map((t=>({text:t,key:"",className:""}))))}})),o=this.markLineNumberNodes(o),o}}var ft=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class vt extends a{constructor(){super(...arguments),this.insertCompositionTextEndFlag=!0,this.handleCompositionStart=t=>{this.insertCompositionTextEndFlag=!1,this.stopEventPropagation(t)},this.handleCompositionEnd=t=>{var e;this.insertCompositionTextEndFlag=!0,this.stopEventPropagation(t);const n=this.selectionController.getCurrentRange();n&&this.selectionController.setNextCodeBlockRange(n.contentOffset+t.data.length);const o=this.contentRenderer.getCodeContentContainerRef().innerText;this.valueController.updateValue(o,null===(e=this.value)||void 0===e?void 0:e.language)}}isComposing(){return!this.insertCompositionTextEndFlag}registerInputEvent(){const t=this.contentRenderer.getCodeContentContainerRef();t&&(t.addEventListener("compositionstart",this.handleCompositionStart),t.addEventListener("compositionend",this.handleCompositionEnd))}unregisterEventListener(){const t=this.contentRenderer.getCodeContentContainerRef();t&&(t.removeEventListener("compositionstart",this.handleCompositionStart),t.removeEventListener("compositionend",this.handleCompositionEnd))}stopEventPropagation(t){t.stopPropagation()}}ft([s()],vt.prototype,"selectionController",void 0),ft([s()],vt.prototype,"contentRenderer",void 0),ft([s()],vt.prototype,"valueController",void 0),ft([s()],vt.prototype,"contentParseController",void 0),ft([s()],vt.prototype,"value",void 0),ft([c("componentDidLoad")],vt.prototype,"registerInputEvent",null),ft([c("disconnectedCallback")],vt.prototype,"unregisterEventListener",null);var bt=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class gt extends ${constructor(){super(...arguments),this.getEffectiveTargets=()=>[this.contentRenderer.getCodeContentContainerRef()]}async undo(){if(this.undoStack.length>1){const t=this.undoStack.pop();this.redoStack.push(t);const e=this.undoStack[this.undoStack.length-1];e&&await this.restoreState(e)}}async redo(){const t=this.redoStack.pop();this.undoStack.push(t),await this.restoreState(t)}initialHistory(){this.registerHistory({value:this.value,offset:this.value.code.length},!0)}getIneffectiveTargets(){return[]}async restoreState(t){const{value:e,offset:n}=t;this.selectionController.setNextCodeBlockRange(n),this.valueController.updateValue(e.code,e.language)}}bt([s()],gt.prototype,"contentRenderer",void 0),bt([s()],gt.prototype,"value",void 0),bt([s()],gt.prototype,"valueController",void 0),bt([s()],gt.prototype,"selectionController",void 0),bt([c("componentDidLoad")],gt.prototype,"initialHistory",null);var mt=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};class yt extends Y{constructor(){super(...arguments),this.handlePasteEvent=t=>{var e,n;t.preventDefault(),this.stopEventPropagation(t);const o=t.clipboardData;if(null===(e=null==o?void 0:o.files)||void 0===e?void 0:e.length)return;const i=null!==(n=null==o?void 0:o.getData("text/plain"))&&void 0!==n?n:"";i&&this.updateCodeBlockRangeAndContent(i)}}registerInputEvent(){const t=this.contentRenderer.getCodeContentContainerRef();t&&t.addEventListener("paste",this.handlePasteEvent)}unregisterEventListener(){const t=this.contentRenderer.getCodeContentContainerRef();t&&t.removeEventListener("paste",this.handlePasteEvent)}updateCodeBlockRangeAndContent(t){const{nextOffset:e,updatedContent:n}=this.getLatestRangeAndContent(t);this.selectionController.setNextCodeBlockRange(e),this.valueController.updateValue(n,this.value.language,{recordHistory:!0,offset:this.selectionController.getCurrentRange().contentOffset})}getLatestRangeAndContent(t){const e=this.selectionController.getCurrentRange(),n=this.contentParseController.getCurrentCodeNodes(),o=this.getCodeNodesContent(n);return this.reCalculateRangeAndContent(e,o,t)}}mt([s()],yt.prototype,"host",void 0),mt([s()],yt.prototype,"valueController",void 0),mt([s()],yt.prototype,"contentRenderer",void 0),mt([s()],yt.prototype,"value",void 0),mt([s()],yt.prototype,"selectionController",void 0),mt([s()],yt.prototype,"contentParseController",void 0),mt([s()],yt.prototype,"inputController",void 0),mt([c("componentDidLoad")],yt.prototype,"registerInputEvent",null),mt([c("disconnectedCallback")],yt.prototype,"unregisterEventListener",null);var xt=function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};const Ct=class{constructor(t){n(this,t),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.vegaRemove=o(this,"vegaRemove",7),this.remove=o(this,"remove",7),this.globalSlimmers={},this.componentGlobalStyleSlimmer=new D(":root{--code-orange:#cd3e00;--code-green:#007e7e;--code-purple:#6851f5;--code-gray:#67727e;--code-neutral:rgb(15, 36, 51);--code-neutral-8:rgba(15, 36, 51, 0.8);--code-neutral-7:rgba(15, 36, 51, 0.7)}.dark{--code-orange:#ff9571;--code-green:#73e6dc;--code-purple:#c7bdff;--code-gray:#8b959f;--code-neutral:rgb(252, 252, 252);--code-neutral-8:rgba(252, 252, 252, 0.8);--code-neutral-7:rgba(252, 252, 252, 0.7)}"),this.translationSlimmer=new E,this.vegaComponentUsageRuntimeMetricsSlimmer=new d,this.codeBlockRenderer=new P,this.contentRenderer=new _,this.copyButtonRenderer=new K,this.valueController=new B,this.contentParseController=new M,this.prismCodeHighlightParser=new ut,this.defaultCodeHighlightParser=new ht,this.selectionController=new U,this.inputController=new q,this.insertCompositionTextController=new vt,this.focusController=new X,this.historyController=new gt,this.changeEventEmitter=R(Ct,g),this.removeEventEmitter=R(Ct,y),this.codeBlockPasteController=new yt,this.eventPreventSlimmer=new T([g],(()=>this.codeBlockRenderer.getToolbarContainerRef())),this.readOnly=!1,this.disabled=!1,this.showCopyButton=!0,this.showLineNumber=!0}watchEditableChange(){}componentShouldUpdate(t,e,n){return"value"!==n||!O(t,e)}async doFocus(){}render(){const e=C([this.readOnly?"readonly":"",this.disabled?"disabled":"",this.showLineNumber?"show-line-number":"",this.prismCodeHighlightParser.canParse()?"highlight":""]);return u(t(i,{contenteditable:!1,class:e},this.codeBlockRenderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{readOnly:["watchEditableChange"],disabled:["watchEditableChange"]}}};xt([p()],Ct.prototype,"globalSlimmers",void 0),xt([l()],Ct.prototype,"componentGlobalStyleSlimmer",void 0),xt([l()],Ct.prototype,"translationSlimmer",void 0),xt([l()],Ct.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),xt([l()],Ct.prototype,"codeBlockRenderer",void 0),xt([l()],Ct.prototype,"contentRenderer",void 0),xt([l()],Ct.prototype,"copyButtonRenderer",void 0),xt([l()],Ct.prototype,"valueController",void 0),xt([l()],Ct.prototype,"contentParseController",void 0),xt([l()],Ct.prototype,"prismCodeHighlightParser",void 0),xt([l()],Ct.prototype,"defaultCodeHighlightParser",void 0),xt([l()],Ct.prototype,"selectionController",void 0),xt([l()],Ct.prototype,"inputController",void 0),xt([l()],Ct.prototype,"insertCompositionTextController",void 0),xt([l()],Ct.prototype,"focusController",void 0),xt([l()],Ct.prototype,"historyController",void 0),xt([l()],Ct.prototype,"changeEventEmitter",void 0),xt([l()],Ct.prototype,"removeEventEmitter",void 0),xt([l()],Ct.prototype,"codeBlockPasteController",void 0),xt([l()],Ct.prototype,"eventPreventSlimmer",void 0),Ct.style=':host{display:block;border-radius:2px;background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));padding-left:12px;padding-right:12px;padding-top:12px;padding-bottom:12px}:host code{display:block;box-sizing:border-box;color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:left;font-family:"Roboto Mono";font-weight:400;line-height:22px;font-size:16px;white-space:pre-wrap;min-height:22px;tab-size:2px;word-break:break-word}:host code:focus-visible{outline:none}:host .editor-toolbar{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px;border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px;margin-bottom:12px;user-select:none}:host .editor-toolbar vega-input-select{width:auto;min-width:161px}:host(.show-line-number) code .v-code-line-number::before{content:attr(data-mark);width:var(--v-code-line-number-width);margin-left:var(--v-code-line-number-ml);padding-right:16px;text-align:right;user-select:none;font-style:normal;word-break:keep-all;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));display:inline-block}:host(.show-line-number) code{padding-left:var(--v-code-block-pl)}:host::part(select-container){padding-top:0px;padding-bottom:0px;padding-left:8px;padding-right:8px;border-radius:4px}:host::part(selected-box),:host::part(placeholder){font-size:14px;user-select:none}:host::part(toggle-icon-container){width:12px;height:12px;line-height:12px}:host::part(toggle-icon){width:12px;height:12px}:host(.readonly) .copy-button-container{position:relative}:host(.readonly) .copy-button-container .copy-code-button{position:absolute;top:0px;right:0px}:host(.disabled:not(.highlight)) code{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host(.disabled.highlight){opacity:0.5}:host(.focus:not(.disabled,.readonly)){outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host(.highlight) code{color:var(--code-neutral)}code .comment,code .prolog,code .doctype,code .cdata{color:var(--code-gray);font-style:italic}code .namespace{color:var(--code-neutral-7)}code .string,code .attr-value,code .builtin{color:var(--code-green)}code .punctuation,code .operator,code .attr-equals{color:var(--code-gray)}code .entity,code .url,code .symbol,code .number,code .boolean,code .variable,code .constant,code .property,code .regex,code .inserted{color:var(--code-neutral-8)}code .atrule,code .function,code .attr-name{color:var(--code-orange)}code .deleted{color:var(--code-neutral)}code .function-variable{color:#ff0000}code .tag,code .selector,code .keyword{color:var(--code-purple)}';export{Ct as vega_code_block}
@@ -1 +0,0 @@
1
- import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-878851f6.js";import{d as s,e as n}from"./p-33860e54.js";import{c as r}from"./p-02841589.js";import{L as i}from"./p-6e1ab235.js";import{i as o}from"./p-c6d62f0d.js";import{g as c}from"./p-8b5d3a52.js";import{V as a}from"./p-8ac2d165.js";import{c as l}from"./p-a841cf13.js";import{f as h}from"./p-dcd18ab1.js";var u,d;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(u||(u={}));class p{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(d||(d={}));class f extends p{}const T=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.constructor.name}};var E,x,g,w;!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"}(E||(E={}));class A{constructor(){this.isFlushable=!1}}class O extends p{constructor(t){super(),this.type=u.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 O("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){const s=this.toJsx(t,e);return Object.entries(s).map((([t,e])=>{const s="string"==typeof e?e:this.formatStyleToString(e);return`${r(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,O.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])=>`${r(t)}: ${e};`)).join(" ")}}class N extends f{constructor(t){super(),this.type=d.ALIGNMENT,this.textAlign=t}static from(t){return[d.ALIGNMENT,new N(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 N(this.textAlign)}renderStyle(t){return(null==t?void 0:t.standalone)?N.getDefaultStyles(this.textAlign):null}}class R extends f{constructor(t){super(),this.type=d.INDENT,this.indent=Math.max(0,t)}static from(t){return[d.INDENT,new R(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new R(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class m{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 A?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)))}}}m.registry=new Map;class y{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=m.get(t,e),n=()=>{const s=t instanceof A?t.type:t.constructor.name,n=y.get(s,e.constructor.name);if(n)return t.executedFlag=!0,n.execute(t,e);i.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!!y.get(t,e.constructor.name)}}y.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(x||(x={}));class S extends p{}class C extends S{constructor(t){super(),this.type=x.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[x.CUSTOM_ATTRIBUTE,new C(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new C(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(o)}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 S{constructor(t){super(),this.type=x.CUSTOM_CLASS,this.customClass=t}static from(t){return[x.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 k extends S{constructor(t){super(),this.type=x.CUSTOM_STYLE,this.customStyle=t}static from(t){return[x.CUSTOM_STYLE,new k(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new k(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 B extends f{constructor(t){super(),this.type=d.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[d.INTERNAL_WRAPPER,new B(t)]}clone(){return new B(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}!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"}(g||(g={}));class v extends p{}class _{constructor(t){this.dtoType=t instanceof RTEBlock?"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])=>`${r(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const s=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof k)).map((e=>e.renderStyle(t))).filter(o);return e&&e.length>0?this.mergeAnnotationStyles(s,e):s.reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})}filterAnnotation(t){return"block"===this.dtoType?t instanceof f:t instanceof v}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}}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(w||(w={}));class RTENode{constructor(t,e){this.annotationMap=new Map,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 C.from(e);case"customClass":return b.from(e);case"customStyle":return k.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 _(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof b)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return T.getDOMByEntity(this)}generateAttributeString(...t){var e;const s=new _(this).toCssText({standalone:!0},["textDecoration"]),n=this.annotationMap.get(x.CUSTOM_CLASS),r=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==n?void 0:n.toString(),s?`style="${s}"`:null,...t].filter(o);return r.length?` ${r.join(" ")}`:""}doApply(t){t instanceof A?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const n=T.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 L=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 RTEBlock)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof RTENode))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 RTEBlock{constructor(t){this.annotationMap=new Map,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=L.getRTEBlockClass(t.type);if(n){const r=n.from(t,e);return r.parent=s,r}})).filter(o)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return N.from(e);case"indent":return R.from(e);case"customAttribute":return C.from(e);case"customClass":return b.from(e);case"customStyle":return k.from(e);case"internalWrapper":return B.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,s])=>{const n=this.createAnnotationEntity(e,s);o(n)&&t.set(...n)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(d.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof O||t instanceof B))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof S)).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=T.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 RTEBlock?t.getFirstNode():t}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){const e=new _(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 f||t instanceof b)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.CUSTOM_ATTRIBUTE)}generateAttributeString(...t){var e;const s=new _(this).toCssText({standalone:!0}),n=this.annotationMap.get(x.CUSTOM_CLASS),r=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==n?void 0:n.toString(),s?`style="${s}"`:null,...t].filter(o);return r.length?` ${r.join(" ")}`:""}doApply(t){t instanceof A?y.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof O||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=y.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 D{}class j extends D{constructor(){super(...arguments),this.doSplit=!0}}class I extends p{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}clone(){return new I(this.range)}}const $="700",M="bold",P="italic",H="underline",F="line-through";class J extends v{constructor(t){super(),this.type=g.STRIKETHROUGH,this.strikethrough=t}static from(t){return[g.STRIKETHROUGH,new J(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new J(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 K extends v{constructor(t){super(),this.type=g.UNDERLINE,this.underline=t}static from(t){return[g.UNDERLINE,new K(t)]}toJSON(){return{underline:this.underline}}clone(){return new K(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 U extends v{constructor(t){super(),this.type=g.ITALIC,this.italic=t}static from(t){return[g.ITALIC,new U(t)]}toJSON(){return{italic:this.italic}}clone(){return new U(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 W extends v{constructor(t){super(),this.type=g.BOLD,this.bold=t}static from(t){return[g.BOLD,new W(t)]}toJSON(){return{bold:this.bold}}clone(){return new W(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 G extends v{constructor(t,e=!0){super(),this.type=g.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[g.CODE,new G(t,e)]}static getDefaultStyles(){return{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}}toJSON(){return{code:this.code}}clone(){return new G(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?G.getDefaultStyles():null}}const z={key:"black",light:"#111128",dark:"#E3E3E8"},V=[z,{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"}],X="​",q=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]];class Y extends v{constructor(t){super(),this.type=g.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[g.TEXT_COLOR,new Y(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new Y(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:a.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return V.find((e=>e.key===t))||V[0]}}class Q extends v{constructor(t,e=!0){super(),this.type=g.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[g.LINK,new Q(t,e)]}toJSON(){return{link:this.link}}clone(){return new Q(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class Z extends D{constructor(t,e,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=s}toAnnotation(){return new O(this.groupKey)}}class tt extends D{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class et{execute(t,e){return i.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const s=t.annotationMap.get(x.CUSTOM_STYLE);s&&this.isCustomStyle(s,e)&&t.annotationMap.set(s.type,new k(s.removeStyles(e)))}createNewParagraph(t){const e=L.getRTEBlockClass("paragraph");if(e)return e.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.constructor.name?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 T.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 st extends A{constructor(t){super(),this.type=E.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class nt extends et{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(u.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof j&&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 st(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,c=(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)]},a=i&&T.getEntityByDOM(i),l=o&&T.getEntityByDOM(o);if(a&&a.id===e.id){const i=s===n?t.endOffset:e.text.length,[o,a,l]=c(e.text,r,i);return this.setApplyTargetNode(a),[o,a,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[s,n,r]=c(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 rt extends j{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new W(this.bold)}}class it extends p{constructor(){super(...arguments),this.type=u.CLEAR_FORMATTING,this.items=[g.BOLD,g.ITALIC,g.UNDERLINE,g.STRIKETHROUGH,g.TEXT_COLOR,g.CODE,x.CUSTOM_STYLE]}}class ot extends j{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new it}}class ct extends j{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new G(this.code)}}class at extends D{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class lt extends j{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new U(this.italic)}}class ht extends j{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,o(n)&&(this.doSplit=n)}toAnnotation(){return new Q(this.link)}}class ut extends j{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new J(this.strikethrough)}}class dt extends j{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new K(this.underline)}}class pt extends et{handleAction(t,e){const s=t.toAnnotation();if(t instanceof at)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof it))return s instanceof v||s instanceof I?(t instanceof ht&&(o(t.newText)&&(e.text=t.newText),e.parent.apply(new Z(t.link.groupKey,[e],t.type))),t instanceof ct&&this.handleAction(new ot,e),t instanceof rt&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof lt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof dt||t instanceof ut)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(s.type,s)):void 0;s.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class ft extends A{constructor(){super(...arguments),this.type=E.DELETE_LINK_GROUP}}class Tt extends et{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new ft)}}class Et extends A{constructor(t){super(),this.type=E.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class xt extends et{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 c=s.text;if(n===r&&i===o&&t)c=s.text.slice(0,i)+t+s.text.slice(i);else{const e=n.parentElement,a=r.parentElement,l=e&&T.getEntityByDOM(e),h=a&&T.getEntityByDOM(a);let u=0,d=s.text.length;l&&l===s?(u=i,d=n===r?o:d):h&&h===s&&(d=o),c=s.text.slice(0,u)+t+s.text.slice(d)}s.apply(new Et(c))}}}class gt extends p{constructor(t){super(),this.type=g.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:s,customStyle:n,customClass:r,customAttribute:i}=t,o=new gt(e);return o.child=s?gt.from(s)[1]:void 0,o.customAttribute=i?C.from(i)[1]:void 0,o.customClass=r?b.from(r)[1]:void 0,o.customStyle=n?k.from(n)[1]:void 0,[g.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new gt(this.htmlTag);return 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}toJSON(){var t,e,s,n;return{inlineHtml:l({htmlTag:this.htmlTag,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 wt extends et{handleAction(t,e){const s=e.parent.getAnnotationByType(u.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 At extends et{handleAction(t,e){const s=e.parent.getAnnotationByType(u.LINK_GROUP);if(s){const t=e.annotationMap.get(g.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(u.LINK_GROUP)}}e.annotationMap.delete(g.LINK)}}class Ot extends v{constructor(t){super(),this.type=g.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[g.PLAIN_TEXT,new Ot(t)]}clone(){return new Ot(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class Nt extends j{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new Y(this.textColor)}}class RTETextNode extends RTENode{constructor(t,e,s,n){super(t,n),this.type=w.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 RTETextNode(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 Z(t.link.groupKey,[n],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(o))}static createAnnotationEntity(t,e,s){const n=!(!s||!s.autoMatchFormat);switch(t){case"bold":return W.from(e);case"italic":return U.from(e);case"underline":return K.from(e);case"strikethrough":return J.from(e);case"code":return G.from(e,n);case"textColor":return Y.from(e);case"link":return Q.from(e,n);case"inlineHtml":return gt.from(e);case"plainText":return Ot.from(e)}return RTENode.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof S||t instanceof gt)).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(){const t=this.getAnnotationByType(g.INLINE_HTML);return t?this.renderWithWrapperStr(t):this.renderTextStr()}cloneWithText(t){return new RTETextNode(c(),t,this.parent,super.cloneAnnotations())}clone(t){return new RTETextNode(this.id,this.text,t,super.cloneAnnotations())}isEmpty(){return!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}registerModifyStrategy(){const t=this.constructor.name;RTETextNode.registerActionStrategyStatus[t]||(this.isContentEditable()&&(y.register(E.UPDATE_TEXT,t,new Tt),y.register(E.REPLACE_SELECTED_TEXT,t,new xt),y.register(E.LINK_GROUP_NODE_SPLIT,t,new wt),y.register(ht.name,t,new pt)),y.register(j.name,t,new nt),y.register(E.DELETE_LINK_GROUP,t,new At),y.register(rt.name,t,new pt),y.register(ot.name,t,new pt),y.register(lt.name,t,new pt),y.register(dt.name,t,new pt),y.register(Nt.name,t,new pt),y.register(ut.name,t,new pt),y.register(ct.name,t,new pt),y.register(D.name,t,new pt),RTETextNode.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof j&&t.doSplit&&e){const e=y.get(j.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){y.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof tt)return void this.syncUpSelectedNodes(t);s instanceof I||this.syncUpSelectedNodes(t);const n=y.get(e.constructor.name,t.constructor.name);if(n)return void n.execute(e,t);const r=y.get(D.name,RTETextNode.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){const{htmlTag:e,customAttribute:s,customClass:n,customStyle:r,child:i}=t,c=[...(null==s?void 0:s.toString())||[],null==n?void 0:n.toString(),null==r?void 0:r.toString()].filter(o),a=c.length>0?` ${c.join(" ")}`:"";return i?`<${e}${a}>${this.renderWithWrapperStr(i)}</${e}>`:`<${e}${a}>${this.renderTextStr()}</${e}>`}renderTextStr(){var t;const e=(null===(t=this.getAnnotationByType(g.CODE))||void 0===t?void 0:t.code)?"code":"span",s=super.generateAttributeString();return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${e}${s}>${this.text}</${e}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(g.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof v&&!(t instanceof Q)&&!(t instanceof Ot)||t instanceof S)).length}}RTETextNode.registerActionStrategyStatus={},RTETextNode.htmlTag="span";class Rt extends A{constructor(t){super(),this.type=E.APPEND_CHILDREN,this.entityToBeAppended=t}}class mt extends f{constructor(t){super(),this.type=d.TEXT_STYLE,this.textStyle=t}static from(t){return[d.TEXT_STYLE,new mt(t)]}static getDefaultStyles(t){const e={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",minHeight:"22px",fontWeight:"500"},s=Object.assign(Object.assign({},e),{marginTop:"0px",marginBottom:"0px"});switch(t){case"paragraph":return s;case"title":return Object.assign(Object.assign({},e),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"});case"subtitle":return Object.assign(Object.assign({},e),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"});case"heading-1":return Object.assign(Object.assign({},s),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"});case"heading-2":return Object.assign(Object.assign({},s),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"});case"heading-3":return Object.assign(Object.assign({},s),{fontSize:"18px"});case"heading-4":return Object.assign({},s);case"heading-5":return Object.assign(Object.assign({},s),{fontSize:"14px"});case"heading-6":return Object.assign(Object.assign({},s),{fontSize:"12px"});default:return null}}toJSON(){return{textStyle:this.textStyle}}clone(){return new mt(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?mt.getDefaultStyles(this.textStyle):null}}class yt extends D{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new mt(this.textStyle)}}class St extends et{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new rt(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new at(g.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class Ct extends A{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class bt extends A{constructor(t){super(),this.type=E.REPLACE_CHILD_NODES,this.newChildNodes=t}}class kt extends et{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 bt(e));const c=s.cloneWithNodes(o);return s.parent.apply(new Ct(s,c)),c}}}}class Bt extends et{handleAction(t,e){e.children=[],e.apply(new Rt(t.newChildNodes))}}class vt extends A{constructor(t){super(),this.type=E.DELETE_CHILDREN,this.entityToBeRemoved=t}}class _t extends et{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 Rt(t)),s.parent.apply(new vt(s))}}}class Lt extends et{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new RTETextNode(c(),"\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),c=s.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&c.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,n,c,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(c(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new bt([...t,e,...s]))}}class Dt extends et{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new RTETextNode(c(),"\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 vt(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(c(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new bt([...t,e,...s]))}}class jt extends A{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class It extends A{constructor(t,e){super(),this.type=E.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class $t extends D{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new N(this.textAlign)}}class Mt extends et{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class Pt extends D{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new R(this.indent)}}class RTETextBlock extends RTEBlock{constructor(t,e,s){super(t),this.children=[],this.type=e;const{autoMatchFormat:n}=s||{autoMatchFormat:!0};n&&(this.annotationMap=RTETextBlock.isAcceptableTextStyle(e)?new Map([mt.from(e)]):new Map([mt.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var s,n;const r=new RTETextBlock(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=L.getRTENodeClass(t.type);if(s)return s.from(t,r,e)})).filter(o),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?mt.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 ht&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(g.LINK),r=s.getAnnotationByType(g.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(){const t=this.getBlockTag(),e=super.generateAttributeString(),s=this.getChildrenHtml();return super.shouldRenderAsInternalWrapper()?s:[`<${t}${e}>`,s,`</${t}>`].join("")}cloneWithNodes(t){const e=new RTETextBlock(c(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Rt(t)),e}clone(t){const e=new RTETextBlock(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(){const t=this.getAnnotationByType(u.LINK_GROUP);let e=this.children.map((t=>t.toHtml())).join("");return t&&this.children.length>0&&(e=this.generateLinkHtml(t,e)),e}doAnnotationActionApply(t){const e=y.get(t.constructor.name,RTETextBlock.name);e&&e.execute(t,this)}generateLinkHtml(t,e){e="";let s=[];for(let n=0;n<this.children.length;n++){const r=this.children[n].getAnnotationByType(g.LINK),i=this.children[n+1]?this.children[n+1].getAnnotationByType(g.LINK):null;if(r){if(s.push(this.children[n]),!i||r.link.groupKey!==i.link.groupKey){const n=t.toString(r,{standalone:!0});e+=[`<a${n?` ${n}`:""}>`,s.map((t=>t.toHtml())).join(""),"</a>"].join(""),s=[]}}else e+=this.children[n].toHtml()}return e}}y.register(yt.name,RTETextBlock.name,new St),y.register($t.name,RTETextBlock.name,new Mt),y.register(Pt.name,RTETextBlock.name,new class extends et{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),y.register(Z.name,RTETextBlock.name,new class extends et{handleAction(t,e){let s=e.getAnnotationByType(u.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(u.LINK_GROUP,s)}}}),y.register(E.UNLINK_LINK_GROUP,RTETextBlock.name,new class extends et{handleAction(t,e){const s=e.getAnnotationByType(u.LINK_GROUP);s&&(s.linkGroups.size>1?s.linkGroups.delete(t.groupKey):e.annotationMap.delete(u.LINK_GROUP))}}),y.register(E.SPLIT_BLOCK_WITH_NODE,RTETextBlock.name,new kt),y.register(E.REPLACE_CHILD_NODES,RTETextBlock.name,new Bt),y.register(E.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new _t),y.register(E.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new Lt),y.register(E.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Dt),y.register(E.INSERT_IMAGE_TO_BLOCK,RTETextBlock.name,new class extends et{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new Ct(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new jt(e,r));else{const t=new It(s,n);e.apply(t),e.parent.apply(new Ct(e,r))}}}),y.register(E.TRANSFORM_LIST_BLOCK,RTETextBlock.name,new class extends et{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 Rt(i)),s.apply(new Ct(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new vt(t))}))}});class Ht extends et{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.constructor.name}}class Ft extends A{constructor(t,e){super(),this.isFlushable=!0,this.type=E.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class Jt extends D{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new I(this.range)}}class RTEDecoratorNode extends RTENode{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(RTEDecoratorNode.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${RTEDecoratorNode.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return h(t,`.${RTEDecoratorNode.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}RTEDecoratorNode.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",RTEDecoratorNode.DECORATOR_NODE_CLASS="v-internal-decorator-node";class RTECodeBlockNode extends RTEDecoratorNode{constructor(t,e,s,n){super(t),this.type=w.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(){return`<code style='box-sizing: border-box;color: rgba(var(--v-text-primary, 32, 54, 69, 1));text-align: left;font-family: "Roboto Mono";font-weight: 400;line-height: 22px;font-size: 16px;white-space: pre-wrap;min-height: 22px;tab-size: 2px;'>${this.text}</code>`}clone(t){return new RTECodeBlockNode(this.id,this.text,this.language,t)}doAnnotationActionApply(t){y.executeTheStrategy(t,this)}doModifyActionApply(t){y.executeTheStrategy(t,this)}}y.register(E.UPDATE_CODE_BLOCK,RTECodeBlockNode.name,new class extends et{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),y.register(Jt.name,RTECodeBlockNode.name,new class extends et{handleAction(t,e){e.annotationMap.set(u.SELECTION_RANGE,t.toAnnotation())}});var Kt;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(Kt||(Kt={}));class Ut extends et{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 vt(e)))}}class RTECodeBlock extends RTEBlock{constructor(t,e,s){super(t),this.type="code-block",this.children=[new RTECodeBlockNode(`${t}-1`,e,s,this)]}static from(t){return new RTECodeBlock(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(){const{language:t=Kt["Plain Text"]}=this.children[0];return`<pre data-language="${t}" style="background-color: rgba(var(--v-bg-secondary, 245, 247, 247, 1)); padding: 12px">${this.children.map((t=>t.toHtml()))}</pre>`}clone(t){const e=RTECodeBlock.from(this.toJSON());return e.parent=t,e}apply(n){if(n instanceof A&&y.executeTheStrategy(n,this),n.isFlushable){const n=T.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(u.SELECTION_RANGE)}}y.register(E.DELETE_CODE_BLOCK,RTECodeBlock.name,new class extends Ht{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 vt(e));const i=t?T.getDOMByEntity(t):null;if(0===n.children.length){const s=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:""}]});e.parent.apply(new Rt([s])),t=s.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(s,r,i,o){const c=T.getDOMByEntity(o);if(c){const o=e.getSubjectFromParentNodeByEventId(c,n);o&&t.notify(o,{node:s,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),y.register(E.DELETE_CHILDREN,RTECodeBlock.name,new Ut),y.register(E.SWITCH_OUT_FROM_CODE_BLOCK,RTECodeBlock.name,new class extends et{handleAction(s,r){const{content:i,language:o}=s,a=i.split("\n"),l=new Ft(a.slice(0,a.length-2).join("\n"),o);l.isFlushable=!1,r.children[0].apply(l);const h=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),text:"",type:"text"}]});r.parent.apply(new Ct(r,h));const u=T.getDOMByEntity(r);if(u){const s=e.getSubjectFromParentNodeByEventId(u,n);s&&t.notify(s,{node:h.children[0]})}}}),y.register(E.INSERT_IMAGE_TO_BLOCK,RTECodeBlock.name,new class extends et{handleAction(t,e){e.parent.apply(new Ct(e,t.imageBlockToBeInserted))}}),RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{mt as $,y as A,f as B,x as C,g as D,RTEDecoratorNode as E,w as F,S as G,$t as H,Ct as I,bt as J,It as K,Ht as L,A as M,v as N,Ut as O,M as P,$ as Q,L as R,tt as S,yt as T,Et as U,q as V,V as W,z as X,P as Y,F as Z,H as _,m as a,N as a0,G as a1,O as a2,Kt as a3,X as a4,ht as a5,Ft as a6,Jt as a7,Nt as a8,RTECodeBlockNode as a9,rt as aa,lt as ab,dt as ac,W as ad,ot as ae,ct as af,ut as ag,Pt as ah,RTETextNode as b,RTEBlock as c,RTETextBlock as d,_ as e,et as f,Rt as g,RTENode as h,jt as i,u as j,E as k,D as l,vt as m,C as n,St as o,Mt as p,Lt as q,Dt as r,T as s,kt as t,Bt as u,_t as v,d as w,k as x,b as y,RTECodeBlock as z}
@@ -1 +0,0 @@
1
- import{r as t,h as i,H as s,g as e}from"./p-6b2342e0.js";import{c as o,M as h,I as a}from"./p-6e1ab235.js";import{V as l,I as r}from"./p-4415ad28.js";import{j as n,k as c}from"./p-dcd18ab1.js";import{P as p}from"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";var d=function(t,i,s,e){var o,h=arguments.length,a=h<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,s,e);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(h<3?o(a):h>3?o(i,s,a):o(i,s))||a);return h>3&&a&&Object.defineProperty(i,s,a),a};class f extends p{constructor(){super({callback:()=>{"ellipsis"===this.overflow&&(this.tooltipRef&&(this.tooltipRef.innerText=this.content),this.handleTooltip())},isDeferred:!0}),this.handleTooltip=async()=>{n(this.host)?this.createTooltip().componentOnReady().then((()=>{this.updateTooltipDisplayText()})):(this.tooltipRef&&this.tooltipRef.classList.contains("hydrated")&&(this.host.innerText=this.content,this.tooltipRef.remove(),this.tooltipRef=null),this.host.style.minWidth="auto")},this.createTooltip=()=>{var t;return this.tooltipRef=this.host.querySelector("vega-tooltip"),this.tooltipRef||(this.tooltipRef=document.createElement("vega-tooltip"),this.tooltipRef.text=this.content,this.tooltipRef.innerText=this.content,this.tooltipRef.placement=null===(t=this.tooltip)||void 0===t?void 0:t.placement,this.host.replaceChildren(this.tooltipRef)),this.tooltipRef},this.updateTooltipDisplayText=async()=>{let t=parseFloat(c(this.host,"font-size"));t=isNaN(t)?f.DEFAULT_FONT_SIZE:t;const i=Math.floor(this.host.getBoundingClientRect().width/Math.floor(t/2));if(n(this.tooltipRef))for(let t=i;t>=1&&(this.tooltipRef.textContent=this.truncateStringWithEllipsis(t),n(this.tooltipRef));t--)if(t<=1){this.insertMinWidthStyle();break}},this.truncateStringWithEllipsis=t=>this.content.substring(0,t)+"...",this.initTextContent=()=>{this.content=this.host.textContent}}componentDidLoad(){this.initTextContent()}watchTooltip(){var t;this.tooltipRef&&(this.tooltipRef.placement=null===(t=this.tooltip)||void 0===t?void 0:t.placement)}insertMinWidthStyle(){let t=this.host.shadowRoot.querySelector("#min-width-placeholder");t||(t=document.createElement("span"),t.id="min-width-placeholder",t.style.cssText="position:absolute; visibility:hidden; word-break:keep-all;",this.host.shadowRoot.appendChild(t)),t.textContent=this.truncateStringWithEllipsis(1),this.host.style.minWidth=t.getBoundingClientRect().width+"px"}}f.DEFAULT_FONT_SIZE=16,d([o()],f.prototype,"host",void 0),d([o()],f.prototype,"tooltip",void 0),d([o()],f.prototype,"overflow",void 0),d([h("componentDidLoad")],f.prototype,"componentDidLoad",null),d([h("watchTooltip")],f.prototype,"watchTooltip",null);var v=function(t,i,s,e){var o,h=arguments.length,a=h<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,s,e);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(h<3?o(a):h>3?o(i,s,a):o(i,s))||a);return h>3&&a&&Object.defineProperty(i,s,a),a};const m=class{constructor(i){t(this,i),this.globalSlimmers={},this.tooltipRenderer=new f,this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.overflow="newline"}watchTooltip(){}componentDidLoad(){}render(){return i(s,{class:{"vega-container-text-ellipsis":"ellipsis"===this.overflow,"vega-container-text-newline":"newline"===this.overflow}},i("slot",null))}get host(){return e(this)}static get watchers(){return{tooltip:["watchTooltip"]}}};v([r()],m.prototype,"globalSlimmers",void 0),v([a()],m.prototype,"tooltipRenderer",void 0),v([a()],m.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),m.style=":host{display:block}:host(.vega-container-text-newline){overflow-wrap:break-word}:host(.vega-container-text-ellipsis){word-break:break-all}";export{m as vega_text}
@@ -1 +0,0 @@
1
- import{g as t}from"./p-8b5d3a52.js";import{a as e,g as n,D as s,f as o,r as i}from"./p-dcd18ab1.js";import{L as r,I as a}from"./p-6e1ab235.js";import{I as l,c}from"./p-593e0f80.js";import{I as h}from"./p-781fd6e0.js";import{c as d}from"./p-6a334573.js";import{P as u}from"./p-81dd00d0.js";import{i as p}from"./p-3d2d267d.js";import{V as f}from"./p-82016096.js";import{R as g,E as b,h as w,U as y,V as m,B as v,a as C,I as x,b as T,c as E,P as S,A as k,d as A}from"./p-559197f8.js";import{s as R,A as O,a as I,R as L,M as B,b as j,c as N,d as _,e as M,f as D,I as V,g as P,h as H,i as F,j as K,k as $,B as z,l as W,m as G,C as U,n as Z}from"./p-68124bc5.js";import{i as J}from"./p-c6d62f0d.js";import{R as X}from"./p-fcabf0dc.js";import{V as q}from"./p-a7b5f497.js";import{V as Q}from"./p-e1fbfd20.js";import{v as Y}from"./p-4866e390.js";import{D as tt,d as et}from"./p-878851f6.js";import{V as nt,a as st,b as ot,c as it}from"./p-c5eb0fa6.js";import{R as rt,a as at,S as lt,T as ct,b as ht,C as dt,M as ut,c as pt,d as ft,e as gt,f as bt,g as wt,h as yt,i as mt,j as vt,k as Ct,l as xt,m as Tt,n as Et,o as St,p as kt,q as At,s as Rt,r as Ot,t as It,I as Lt,u as Bt,v as jt,w as Nt,x as _t,y as Mt,z as Dt,A as Vt,B as Pt,D as Ht,E as Ft,F as Kt,G as $t,H as zt,J as Wt,K as Gt,L as Ut,N as Zt,O as Jt,P as Xt,Q as qt,U as Qt,W as Yt,X as te,Y as ee}from"./p-02578a59.js";import{r as ne}from"./p-77e64f26.js";import{V as se,a as oe,b as ie}from"./p-33860e54.js";import{V as re}from"./p-8ac2d165.js";import{t as ae}from"./p-b75ee3ba.js";import{p as le}from"./p-0c667d6a.js";import{c as ce}from"./p-a841cf13.js";import{C as he}from"./p-2d0d575f.js";import{d as de}from"./p-1bc5b3bc.js";const ue=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"close"===e,payloadValue:()=>!0}];class pe{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(pe,["load","close"],ue)}load(t={}){let e=t.containerSelector||"body",n=document.querySelector(e);if(n&&pe.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY.includes(n.tagName)&&(e="body",n=document.querySelector("body")),!n)return r.error("Container is not found by selector: ",e),null;const s=this.createLoadingIndicator(t.indicatorOptions),o=this.createLoader(e);return o.append(s),this.appendLoader(o,n)}close(t){const e=this.findLoader(t);if(e){if(e.dataset.container){const t=document.querySelector(e.dataset.container);t&&t.dataset.vegaLoaderOriginPosition&&(t.style.position=t.dataset.vegaLoaderOriginPosition)}e.remove()}}findLoader(t){var e,n;let s;if(t.includes(">>>")){const[o,i]=t.split(">>>");s=null===(n=null===(e=document.querySelector(o))||void 0===e?void 0:e.shadowRoot)||void 0===n?void 0:n.getElementById(i)}else s=document.getElementById(t);return s}createLoader(n){const s=document.createElement("vega-loader-wrapper");return s.className=e(["body"===n?"fixed-wrapper":"absolute-wrapper"]),s.dataset.container=n,s.id=`vega-loader-${t()}`,s}createLoadingIndicator(t={}){const e=document.createElement("vega-loading-indicator");return Object.assign(e,t),e}appendLoader(t,e){return e.dataset.vegaLoaderOriginPosition=e.style.position,e.style.position="relative",e.shadowRoot?(e.shadowRoot.append(t),`${t.dataset.container}>>>${t.id}`):(e.append(t),t.id)}}pe.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY=["VEGA-MODAL"],function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],pe.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const fe=new pe,ge=[{payloadKey:"IS_OPEN_METHOD_CALLED",payloadDescription:"Indicate if the method open of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"open"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"close"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSEALL_METHOD_CALLED",payloadDescription:"Indicate if the method closeAll of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"closeAll"===e,payloadValue:()=>!0}];var be=function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r};class we{constructor(){this.resizeObserverSlimmer=d(we,u,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{var e;!(t[0].contentRect.height>0)&&(null===(e=this.container)||void 0===e?void 0:e.classList.contains("hydrated"))&&(h.removeZIndex(this.container,"top"),this.container.remove(),this.container=null)},target:()=>this.container}]),this.vegaPublicAPIRuntimeMetricsSlimmer=c(we,["open","close","closeAll"],ge)}async open(t){const e=this.createPageNotification(t);return this.getContainer().append(e),e.id}async closeAll(){this.container&&Array.from(this.container.children).forEach((t=>{t.close()}))}async close(t){await document.getElementById(t).close()}connectResizeObserver(){}createPageNotification(e){const o=document.createElement("vega-page-notification");return Object.keys(e).forEach((t=>{void 0!==e[t]&&(o[t]=e[t])})),o.style.marginBottom=n()===s.MOBILE?"12px":"16px",o.id=`vega-page-notification-${t()}`,o}getContainer(){return this.container||(this.container=document.createElement("vega-page-notification-list"),h.setZIndex(this.container,"top"),n()===s.MOBILE?this.container.classList.add("vega-page-notification-list-bottom"):this.container.classList.add("vega-page-notification-list-topRight"),document.body.append(this.container),this.connectResizeObserver()),this.container}}be([a()],we.prototype,"resizeObserverSlimmer",void 0),be([l()],we.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const ye=new we,me=[{payloadKey:"IS_SETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method setSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method getSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETENABLEDEVENTIDSBYCOMPONENT_METHOD_CALLED",payloadDescription:"Indicate if the method getEnabledEventIdsByComponent of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getEnabledEventIdsByComponent"===e,payloadValue:()=>!0},{payloadKey:"globalEventIsNative",payloadDescription:"Indicate if the vega components will emit events without the vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||"native"!==t.global.namespace)},{payloadKey:"eventOfSpecificComponentsIsNative",payloadDescription:"Indicate if the vega components will emit events with the vega prefix, but special components will emit events without vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&"native"===e.components[t[0]].namespace)}return!1}},{payloadKey:"eventOfSpecificComponentsIsVega",payloadDescription:"Indicate if the vega components will emit events without the vega prefix, but special components will emit events with vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.global&&e.components){const t=Object.keys(e.components);return!!("native"===e.global.namespace&&t.length>0&&"vega"===e.components[t[0]].namespace)}return!1}},{payloadKey:"globalJqueryDelegatedEventIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||!0!==t.global.jqueryDelegatedEvent)},{payloadKey:"jqueryDelegatedEventIsCustomStrategy",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;return!!(e.global&&Array.isArray(e.global.jqueryDelegatedEvent)&&e.global.jqueryDelegatedEvent.length>0)}},{payloadKey:"jqueryDelegatedEventOfSpecialComponentsIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&!0===e.components[t[0]].jqueryDelegatedEvent)}return!1}}];class ve{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(ve,["setSemantics","getSemantics","getEnabledEventIdsByComponent"],me)}setSemantics(t){p.setSemantics(t)}getSemantics(t){return p.getSemantics(t)}getEnabledEventIdsByComponent(t){return p.getEnabledEventIdsByComponent(t)}}!function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],ve.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ce=new ve,xe=[{payloadKey:"IS_OVERRIDEZINDEXBASICVALUES_METHOD_CALLED",payloadDescription:"Indicate if the method overrideZIndexBasicValues of public API ZIndexManager is called",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:()=>!0},{payloadKey:"zIndexBasicValuesGreatThanTenThousand",payloadDescription:"Indicate if the basic z-index value is great than ten thousand",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:t=>t.base>1e4}];class Te{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Te,["overrideZIndexBasicValues"],xe)}overrideZIndexBasicValues(t){h.overrideZIndexBasicValues(t)}}!function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],Te.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ee=new Te,Se=[{payloadKey:"IS_WAITFORVEGA_METHOD_CALLED",payloadDescription:"Indicate if the method waitForVega of public API WaitForVegaHandler is called",canAccept:(t,e)=>"WaitForVegaHandler"===t&&"handle"===e,payloadValue:()=>!0}];class ke{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(ke,["handle"],Se)}async handle(){return await Promise.all(Array.from(document.querySelectorAll("*:not(.hydrated)")).filter((t=>t.tagName.startsWith("VEGA"))).map((t=>{var e;return null===(e=t.componentOnReady)||void 0===e?void 0:e.call(t)})))}}!function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],ke.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ae=new ke,Re=async()=>Ae.handle(),Oe=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOAD_METHOD_CALLED",payloadDescription:"Indicate if the method unLoad of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoad"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOADALL_METHOD_CALLED",payloadDescription:"Indicate if the method unLoadAll of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoadAll"===e,payloadValue:()=>!0}];class Ie{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Ie,["load","unLoad","unLoadAll"],Oe),this.loaderMap=new Map}load({target:e,type:n="text",width:s,height:o,items:i,layout:r}){const a=Array.from(document.body.querySelectorAll(e)),l=`vega-skeleton-loader-${t()}`,c=[];return a.forEach((t=>{const e=i?i.map(this.createSkeleton):[this.createSkeleton({type:n,width:s,height:o})],a=(r?[this.wrapLayout(e,r)]:e).map((t=>(t.dataset[Ie.LOADER_DATA_SET_KEY]=l,t)));c.push(...a),t.append(...a)})),this.loaderMap.set(l,c),l}unLoad(t){this.loaderMap.has(t)&&(this.loaderMap.get(t).forEach((t=>t.remove())),this.loaderMap.delete(t))}unLoadAll(){for(const t of this.loaderMap.values())t.forEach((t=>t.remove()));this.loaderMap.clear()}createSkeleton(t){const{type:e,width:n,height:s}=t,o=document.createElement("vega-skeleton");return Object.assign(o,{animated:!0,type:e,width:n,height:s}),o}wrapLayout(t,e){const n=document.createElement("vega-flex");return Object.assign(n,Object.assign({className:"vega-skeleton-loader-template-container"},e.props)),Object.assign(n.style,e.style),n.append(...t),n}}Ie.LOADER_DATA_SET_KEY="vegaSkeletonLoaderKey",function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],Ie.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Le=new Ie,Be=[{payloadKey:"IS_INIT_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.init is called",canAccept:(t,e)=>"TranslationController"===t&&"init"===e,payloadValue:()=>!0},{payloadKey:"IS_CHANGE_LANGUAGE_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.changeLanguage is called",canAccept:(t,e)=>"TranslationController"===t&&"changeLanguage"===e,payloadValue:()=>!0}];class je{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(je,["init","changeLanguage"],Be)}get currentLanguage(){return f.currentLanguage}init(t){f.init(t)}changeLanguage(t){f.changeLanguage(t)}}!function(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);i>3&&r&&Object.defineProperty(e,n,r)}([l()],je.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ne=new je,_e=new class{constructor(){this.extensionContextMap=new WeakMap}setExtensionContext(t){t&&t.host&&this.extensionContextMap.set(t.host,t)}getExtensionContext(t){return t?this.extensionContextMap.get(t):null}};class Me extends q{injectRTEScopeStyles(){return""}render(t,e,n){var s;const o=this.doRender(n,t,e);return this.fallbackRegisterRef(o,t),this.appendChildren((null===(s=o.childrenContainerGetter)||void 0===s?void 0:s.call(o))||o,t,e,n),o}useRef(t){return t[Me.REGISTER_REF_FLAG]=!0,function(e){e&&R.register(e,t)}}getDTORenderer(t){return X.getRTERenderer(t)}getExtensionContext(t){return _e.getExtensionContext(t)}appendChildren(t,e,n,s){Array.isArray(e.children)&&e.children.length&&!t.t&&(t.t=e.children.map((t=>this.renderChildren(t,n,s))).filter(J))}renderChildren(t,e,n){const s=this.getDTORenderer(t.type);if(s)return s.render(t,e,n)}fallbackRegisterRef(t,e){e[Me.REGISTER_REF_FLAG]||!t.o||t.o.ref||(t.o.ref=this.useRef(e))}}Me.REGISTER_REF_FLAG="__registeredRef__";class De{constructor(){this.extensionContext=null,this.hasCustomStylesRenderers=new Set}static registerActionHandleStrategy(t,e,n){O.register(e,t,n)}static registerActionHandlerInterceptor(t,e,n){I.register(e,t,n)}initialExtension(t){this.extensionContext=t,_e.setExtensionContext(t)}destroyExtension(){}collectExtensionRendererStyles(){let t="";return this.hasCustomStylesRenderers.size>0&&this.hasCustomStylesRenderers.forEach((e=>{t+=`${e.injectRTEScopeStyles()}\n`})),t}registerNode(t,e){L.registerRTEDTOClass(t,e)}registerRenderer(t,e){X.registerRTEDTORenderer(t,e),e instanceof Me&&e.injectRTEScopeStyles()&&this.hasCustomStylesRenderers.add(e)}registerToolbarButtonRenderer(t,e){X.registerRTEToolbarButtonRenderer(t,e)}registerBlockBasicStrategies(t){g.registerBlockBasicStrategies(t)}unRegisterStrategy(t,e){O.unregister(t,e)}unRegisterInterceptor(t,e,n){I.unregister(t,e,n)}registerElementToBlockDTOClassStrategy(t){b.registerElementToBlockStrategy(t)}registerElementToNodeDTOClassStrategy(t){b.registerElementToNodeStrategy(t)}getElementToNodeDTOClassStrategies(){return b.getElementToNodeStrategies()}registerAnnotationHandler(t){w.registerHandler(t)}}class Ve{isHidden(t){return t.sourceEditMode}getExtensionContext(t){return _e.getExtensionContext(t)}renderDropdown(t,e,n,s){return t("vega-dropdown",Object.assign({trigger:"click",searchable:!1,maxWidth:"200",itemDisplayRule:"ellipsis",ref:t=>{tt.addUniqueObserverToNode(t,nt,(t=>{this.handleDropdownClick(t.detail,e)}))}},n),s)}renderDropdownListTemplate(t,e){return t("div",{slot:"items",onMouseDown:this.preventDefault,class:"rte-dropdown-list"},[t("style",{nonce:Y.nonce},".rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }"),...e.map((e=>"children"in e?this.renderDropdownGroup(t,e):this.renderDropdownItem(t,e)))])}renderDropdownItem(t,e){return t("vega-dropdown-item",{key:e.key,itemKey:e.key,label:e.label,prefixIcon:e.icon})}renderDropdownGroup(t,e){return t("vega-dropdown-group",{key:e.key,label:e.label,divide:!1},e.children.map((e=>"children"in e?this.renderDropdownGroup(t,e):this.renderDropdownItem(t,e))))}renderButton(t,e,n){const{icon:s,label:o,showArrowIcon:i}=n,r=this.isDisabled(e);return t("vega-rich-text-editor-toolbar-button",{disabled:r,icon:s,hidden:this.isHidden(e),selected:this.isSelected(e),ref:t=>{tt.addUniqueObserverToNode(t,st,(()=>this.handleButtonClick(e)))},onMouseDown:this.preventDefault},[this.renderButtonLabel(t,e,o),i?t("vega-icon",{size:"size-8",color:r?"text-disabled":"text-secondary",style:{marginLeft:"8px"},icon:Q.getIconKey("chevron-down")}):null].filter(J))}renderButtonLabel(t,e,n){return n?t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary"},n):null}isDisabled(t){return t.host.disabled}isSelected(t){return!1}preventDefault(t){t.preventDefault()}getListItemByKey(t,e){for(const n of t)if("children"in n){const t=this.getListItemByKey(n.children,e);if(t)return t}else if(n.key===e)return n;return null}}class Pe extends B{constructor(t,e){super(),this.type="INSERT_TOKEN_NODE",this.rteRange=null,this.actionHandleResult=!1,this.rteRange=t,this.token=e}}class He extends Ve{constructor(t){super(),this.tokenList=[],this.tokenList=t}render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Tokens",showArrowIcon:!0}),this.renderDropdownListTemplate(t,this.tokenList)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,[s]=n();return s?t.disabled||!O.canHandle("INSERT_TOKEN_NODE",s.parent):t.disabled}return!1}handleButtonClick(t){}handleDropdownClick(t,e){const n=this.getListItemByKey(this.tokenList,t),{rteRange:s}=e,{startNode:o}=s;if(o&&o.parent){const t=new Pe(s,n);o.parent.apply(t),t.actionHandleResult&&this.flushEditorUI(e)}}flushEditorUI(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,flushValue:n}=e;n(t.value)}}}class RTETokenNode extends j{constructor(t,e,n,s,o){super(t,n,s,o),this.type="token",this.token=e,this.text=n}static from(t,e){const n=new RTETokenNode(t.id,t.token,t.text,e);return t.annotations&&(n.annotationMap=this.generateTextAnnotationMap(t.annotations)),n}toJSON(){const t=super.toJSON();return Object.assign({id:this.id,type:this.type,text:this.text,token:this.token},t.annotations?{annotations:t.annotations}:{})}isContentEditable(){return!1}clone(t){return new RTETokenNode(this.id,this.token,this.text,t,this.annotationMap)}toHtml(){return`<span class="token" contenteditable="false" template-token-key="${this.token}" token-key="${this.token}"${super.generateAttributeString()}>${this.text}</span>`}}class Fe extends Me{doRender(t,e,n){const{id:s,token:o}=e;return t("span",Object.assign(Object.assign({key:s,"template-token-key":o,"token-key":o,contenteditable:"false",style:e.getStyles(),class:`token ${e.getClasses()}`},this.additionalAttributes(e)),{ref:this.useRef(e),onClick:t=>{t.preventDefault(),n&&!1!==n.editable&&this.handleTokenElementClick(t,e,n.host)}}),e.text)}injectRTEScopeStyles(){return"span[token-key]{padding: 0 2px; margin: 0 1px; background-color: rgba(var(--v-bg-status-info, 205,209,211))}"}handleTokenElementClick(t,e,n){t.preventDefault(),n&&n.value.apply(new y(e,void 0,!0))}additionalAttributes(t){const e=t.getCustomAttributesAnnotation();let n={wrapped:"true"};return e&&(n=Object.assign(Object.assign({},n),e.render())),n}}class Ke extends Ve{constructor(t,e,n){super(),this.languageList=[],this.selectedLanguage="Select Language",this.labelRef=null,this.handleDropdownClick=t=>{this.setSelectedLanguage(t),"function"==typeof this.languageChangeCallback&&this.languageChangeCallback(this.selectedLanguage)},this.languageList=t,this.selectedLanguage=n,this.languageChangeCallback=e}setSelectedLanguage(t){this.selectedLanguage=t,this.labelRef&&(this.labelRef.textContent=this.getLanguageLabelByKey(t))}isHidden(){return!1}render(t,e){return this.renderDropdown(t,e,{source:this.languageList},[this.renderButton(t,e,{label:this.getLanguageLabelByKey(this.selectedLanguage),showArrowIcon:!0})])}renderButtonLabel(t,e,n){return t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary",ref:t=>this.labelRef=t},n)}handleButtonClick(t){}getLanguageLabelByKey(t){return this.getListItemByKey(this.languageList,t).label}}class $e extends De{constructor(t,e){super(),this.languageState={selectedLanguage:"",contentMap:{}},this.languageChangeCallBack=t=>{const e=this.languageState.selectedLanguage;this.extensionContext&&e&&(this.languageState.contentMap[e]=this.getRTELatestValue(this.extensionContext.host)),this.languageState.selectedLanguage=t,this.applyLanguageContent(t,this.languageState.contentMap)},e&&(this.languageState=Object.assign(Object.assign({},this.languageState),e)),!this.languageState.selectedLanguage&&t.length>0&&(this.languageState.selectedLanguage=t[0].key),this.languageToolbarButtonRenderer=new Ke(t,this.languageChangeCallBack,this.languageState.selectedLanguage),this.registerToolbarButtonRenderer("languages",this.languageToolbarButtonRenderer)}initialExtension(t){super.initialExtension(t);const{selectedLanguage:e,contentMap:n}=this.languageState;n&&n[e]&&this.applyLanguageContent(this.languageState.selectedLanguage,this.languageState.contentMap)}setState(t){const{selectedLanguage:e,contentMap:n}=t;this.languageToolbarButtonRenderer.setSelectedLanguage(e),this.languageState.selectedLanguage=e,this.languageState.contentMap=Object.assign({},n),this.applyLanguageContent(e,n)}getState(){const{selectedLanguage:t,contentMap:e}=this.languageState;return this.extensionContext&&(e[t]=this.getRTELatestValue(this.extensionContext.host)),this.languageState}applyLanguageContent(t,e){if(this.extensionContext&&e){let n=e[t];const{host:s,flushValue:o}=this.extensionContext;n=n?n instanceof m?n:m.fromJSON(n,s.sourceEditConfig):m.createEmptyContent(),s.value!==n&&o(n,!0)}}getRTELatestValue(t){let e=t.value;if(this.extensionContext&&this.extensionContext.isSourceEditMode()&&t.shadowRoot){const n=t.shadowRoot.querySelector(".source-view-container vega-code-block");n&&(e=m.fromHtml(n.value.code,{autoMatchFormat:t.sourceEditConfig.autoMatchFormat}))}return e}}class ze extends B{constructor(t){super(),this.type="INSERT_FUNCTION_BLOCK",this.functionType=t}}class RTEFunctionBlock extends N{constructor(t){super(t),this.type="function-block",this.children=[]}static from(t,e){const n=new RTEFunctionBlock(t.id),s={customClass:["statement"]};let{annotations:o}=t;return o=o?Object.assign(Object.assign({},o),s):s,super.convertAnnotationsToMap(n.annotationMap,o),n.children=this.generateBlockChildren(t.children,e,n),n}toHtml(){return`<div class="statement">${this.children.map((t=>t instanceof _?`<div class="statementelement"${this.getFunctionContentStyle(t)}>${t.getChildrenHtml()}</div>`:t.toHtml())).join("")}</div>`}clone(e){const n=new RTEFunctionBlock(t());return n.parent=e,n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,children:this.children.map((t=>t.toJSON()))})}getFunctionContentStyle(t){const e=new M(t);let n=e.toCssText({standalone:!0});const s=t.getAnnotationByType("TEXT_STYLE");if(s&&"paragraph"===s.textStyle){const t=e.toCssText(void 0,void 0,s.renderStyle({standalone:!0}));n=n.replace(t,"").trim()}return n?` style="${n}"`:""}}class We extends D{handleAction(t,e){const{functionType:n}=t,s=this.getFunctionBlock(n),o=this.createNewParagraph(""),i=this.getReferenceBlock(e);i?i.parent.apply(new V(i,s,o)):e.apply(new P([s,o])),o&&(t.nextFocusNode=o.children[0])}getFunctionBlock(e){const n=t();return RTEFunctionBlock.from({id:n,type:"function-block",children:[{id:`${n}-1`,type:"logic-control-block",statementText:e.toUpperCase()},{id:`${n}-2`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-2-1`,type:"text",text:" "}]},{id:`${n}-3`,type:"logic-control-block",statementText:"SHOW"},{id:`${n}-4`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-4-1`,type:"text",text:" "}]}]})}getReferenceBlock(t){if(!(t instanceof m)){const e=t.parent;return e instanceof RTEFunctionBlock?e:t}}}class RTELogicControlNode extends H{constructor(t,e,n){super(t),this.type="logic-control-node",this.text="",this.text=e,this.parent=n}clone(){return new RTELogicControlNode(this.id,this.text,this.parent)}toHtml(){return this.text}toJSON(){return{id:this.id,type:this.type,text:this.text}}getRangeEndOffset(){return 1}getRangeContainer(){const t=R.getDOMByEntity(this);if(t)return t.parentElement}isContentEditable(){return!1}}class RTELogicControlBlock extends N{constructor(t,e,n){super(t),this.type="logic-control-block",this.children=[],this.statementText="",this.statementText=e,this.children=[new RTELogicControlNode(`${t}-node-1`,e,this)],n&&(this.parent=n)}static from(t){return new RTELogicControlBlock(t.id,t.statementText)}isNotEmpty(){return!0}getLastNode(){return this.children[this.children.length-1]}toHtml(){return`<div class='statementsyntax' contenteditable='false'>${this.statementText}</div>`}clone(t){return new RTELogicControlBlock(this.id,this.statementText,t)}toJSON(){return{id:this.id,type:this.type,statementText:this.statementText}}}class Ge extends Ve{render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Functions",showArrowIcon:!0}),this.renderDropdownListTemplate(t,Ge.FUNCTION_LIST)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,s=n()[0];let o=!0;return s&&(o=O.canHandle("INSERT_FUNCTION_BLOCK",s.parent)),t.disabled||!o}return!1}handleButtonClick(){throw new Error("Method not implemented.")}handleDropdownClick(t,e){if(e){const n=this.getExtensionContext(e.host);if(n){const{host:e,getSelectedNodes:s}=n,o=s()[0],i=new ze(t);o?o.parent&&o.parent.apply(i):e.value.apply(i),i.nextFocusNode&&e.value.apply(new y(i.nextFocusNode,1))}}}}Ge.FUNCTION_LIST=[{key:"IF",label:"Conditional"},{key:"FOREACH",label:"Foreach"}];class Ue extends Me{doRender(t,e){return t("div",{key:e.id,class:"statementsyntax",ref:this.useRef(e)},t("span",{key:`${e.id}-1`,contenteditable:"false",ref:this.useRef(e.children[0])},e.statementText))}}class Ze extends v{constructor(){super(...arguments),this.blockClassName="statementsyntax"}canHandle(t,e){const n=t[e];return n&&n.nodeType===Node.ELEMENT_NODE&&n.classList.contains(this.blockClassName)&&this.isFunctionBlockChild(n)?1:0}handle(e){const n=e[0];return RTELogicControlBlock.from({id:t(),type:"logic-control-block",statementText:n.innerText})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isFunctionBlockChild(t){return!(!t.parentElement||!t.parentElement.classList.contains("statement"))}}class Je extends Me{doRender(t,e){return t("div",{key:e.id,class:this.getElementClassName(e),ref:this.useRef(e)})}injectRTEScopeStyles(){return"div.statement{padding:2px 4px;background:rgba(var(--v-bg-accent3-secondary, 255, 239, 200));border:1px solid rgba(var(--v-bg-accent3-primary, 255, 220, 131));border-radius:4px;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;gap:4px}div.statement .statementsyntax{padding:3px 0;line-height:22px}.rich-text-content div.statement .statementsyntax,.rich-text-content div.statement .statementelement{display:inline-block}div.statement+div.statement{margin-top:2px}div.statement .statementsyntax span{color:rgb(38, 42, 255);font-weight:bold}div.statement .statementelement{padding:2px 4px;background:rgba(var(--v-bg-secondary, 245, 247, 247));border:1px solid rgba(var(--v-border-color-input-field, 171, 198, 216));border-radius:4px;margin:0;min-width:8px}"}getElementClassName(t){let e=t.getClasses();return e.indexOf("statement")<0&&(e="statement "+e),e.trim()}}class Xe{}class qe extends Xe{canIntercept(t,e){return e.parent&&e.parent instanceof RTEFunctionBlock}intercept(t,e,n){const s=new x(n.children[0],0);s.isFlushable=!0,n.parent.apply(s)}}class Qe extends D{handleAction(t,e){const n=this.createNewParagraph("");n&&(e.parent.apply(new V(e,n)),t.newBlock=n,this.focusToNextLine(n))}focusToNextLine(t){const e=this.getRootContent(t);e&&e.apply(new y(t.children[0],1))}}class Ye extends B{constructor(t,e,n){super(),this.type="PASTE_PLAIN_TEXT",this.blocksToBeInserted=t,this.startNode=e,this.startOffset=n}}class tn extends qe{intercept(t,e,n){const{blocksToBeInserted:s,rteRange:o}=e;let{startNode:i,startOffset:r}=e;o&&(i=o.startNode,r=o.startOffset);const a=new Ye(s,i,r);n.apply(a)}}class en extends D{handleAction(t,e){const{blocksToBeInserted:n,startNode:s,startOffset:o}=t;if(s instanceof j){const t=n.flatMap((t=>t instanceof _?(this.copyLinkGroupAnnotations(e.annotationMap,t.annotationMap),t.children):[]));t.length>0&&(e.apply(o>0?new V(s,...t):new F(s,...t)),this.focusToNextLine(t[t.length-1],t[t.length-1].getRangeEndOffset()))}}focusToNextLine(t,e){const n=this.getRootContent(t);n&&n.apply(new y(t,e))}copyLinkGroupAnnotations(t,e){if(e&&e.has(K.LINK_GROUP)){const n=e.get(K.LINK_GROUP);t.has(K.LINK_GROUP)?n.linkGroups.forEach(((e,n)=>{t.get(K.LINK_GROUP).linkGroups.set(n,e)})):t.set(K.LINK_GROUP,e.get(K.LINK_GROUP))}}}const nn=new Ze,sn=new class extends Ze{constructor(){super(...arguments),this.blockClassName="statementelement"}handle(e,n){const s=w.generate(_,e[0]),o=Array.from(e[0].childNodes);return _.from({id:t(),type:"paragraph",annotations:Object.assign({customClass:[this.blockClassName]},s),nodes:this.generateChildNodes(o,void 0,n)})}},on=new class extends C{canHandle(t,e){const n=t[e];return n&&"DIV"===n.tagName&&n.classList.contains("statement")&&n.childNodes.length&&n.querySelector(".statementsyntax")?1:0}handle(){return RTEFunctionBlock.from({id:t(),type:"function-block",annotations:{customClass:["statement"]},children:[]})}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}};class rn extends De{constructor(){super(),this.toolbarButtonRenderer=new Ge,this.registerBlockBasicStrategies(RTELogicControlBlock.name),this.registerBlockBasicStrategies(RTEFunctionBlock.name),this.preventFunctionBlockDefaultInsertNewParagraph(),this.registerNode("logic-control-block",RTELogicControlBlock),this.registerRenderer("logic-control-block",new Ue),this.registerNode("function-block",RTEFunctionBlock),this.registerRenderer("function-block",new Je),this.registerToolbarButtonRenderer("functions",this.toolbarButtonRenderer),this.registerElementToBlockDTOClassStrategy(nn),this.registerElementToBlockDTOClassStrategy(sn),this.registerElementToBlockDTOClassStrategy(on)}preventFunctionBlockDefaultInsertNewParagraph(){this.unRegisterStrategy($.INSERT_NEW_PARAGRAPH,RTELogicControlBlock.name),this.unRegisterStrategy($.APPEND_CHILDREN,RTEFunctionBlock.name),this.unRegisterStrategy($.INSERT_CHILDREN_AFTER,RTEFunctionBlock.name),this.unRegisterStrategy($.INSERT_CHILDREN_BEFORE,RTEFunctionBlock.name),this.unRegisterStrategy($.PASTE_CONTENT,RTELogicControlBlock.name),De.registerActionHandleStrategy(RTEFunctionBlock.name,$.INSERT_NEW_PARAGRAPH,new Qe)}}(()=>{const t=new We;De.registerActionHandleStrategy(m.name,"INSERT_FUNCTION_BLOCK",t),De.registerActionHandleStrategy(_.name,"INSERT_FUNCTION_BLOCK",t),De.registerActionHandleStrategy(T.name,"INSERT_FUNCTION_BLOCK",t),De.registerActionHandleStrategy(RTELogicControlBlock.name,"INSERT_FUNCTION_BLOCK",t),De.registerActionHandleStrategy(_.name,"PASTE_PLAIN_TEXT",new en),De.registerActionHandlerInterceptor(_.name,$.INSERT_NEW_PARAGRAPH,new qe),De.registerActionHandlerInterceptor(_.name,$.PASTE_CONTENT,new tn)})();class an extends B{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_BLOCK",this.tableBlock=t}}class ln extends z{constructor(){super(...arguments),this.type=rt.CAPTION}clone(){return new ln}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--extension-table-caption"}renderStyle(t){return(null==t?void 0:t.standalone)?{padding:"8px",border:"1px solid #ddd",borderBottom:"none",backgroundColor:this.getCaptionBackgroundColor(),position:"relative",textAlign:"center",minHeight:"22px"}:null}toJSON(){return{caption:{padding:"8px 12px",border:"1px solid #ddd",borderBottom:"none",backgroundColor:this.getCaptionBackgroundColor(),position:"relative",textAlign:"center",minHeight:"22px"}}}getCaptionBackgroundColor(){return re.isDarkMode()?at.dark:at.light}}class RTETableCaptionBlock extends N{constructor(t,e){super(t),this.type="table-caption";const{autoMatchFormat:n}=e||{autoMatchFormat:!0};n&&this.annotationMap.set(rt.CAPTION,new ln)}static from(t,e){const n=new RTETableCaptionBlock(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new RTETableCaptionBlock(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.isNotEmpty()))}toHtml(){const t=this.children.map((t=>t.toHtml())).join("");return`<caption${super.generateAttributeString()}>${t}</caption>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}O.register($.INSERT_CHILDREN_BEFORE,RTETableCaptionBlock.name,new E),O.register($.PASTE_CONTENT,RTETableCaptionBlock.name,new S);class cn extends B{constructor(t){super(),this.type="TOGGLE_TABLE_CAPTION",this.isFlushable=!0,this.shouldEnable=t}}class hn extends lt{canHandle(t){return t[0]===ct.CAPTION}execute(t,e,n){const s="rte-table-caption"===t[1],o=new cn(s),i=n.getCaption();if(s){const t=i&&i.isNotEmpty()?i:this.createCaptionBlock(null==i?void 0:i.id);i&&t===i||n.setCaption(t),o.nextFocusNode=t.getLastNode()}else i&&(n.setCaption(null),o.nextFocusNode=n.getFirstNode());this.syncCursorPosition(n,o.nextFocusNode)}syncCursorPosition(t,e){super.syncCursorPosition(t,e)}createCaptionBlock(e){const n={id:null!=e?e:t(),type:"table-caption",children:[{id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]}]};return RTETableCaptionBlock.from(n)}}class dn{constructor(t){this.renderContext=t}getTableExtensionContext(){return this.renderContext?_e.getExtensionContext(this.renderContext.host):null}}class un extends dn{constructor(){super(...arguments),this.settingHandlers=[new ht,new hn,new dt,new ut,new pt],this.handleTableClick=(t,e)=>{const n=t.target.closest("table");if(e!==n)return this.popoverRef.hide(),void this.tableDynamicPopover.hide();this.tableDynamicPopover.hide(),this.popoverShow||(ne.call(et.getSubject(this.popoverRef,se),n),this.popoverRef.show())},this.syncSelectedCells=()=>{if(this.tableSettingRef){const t=this.getTableSelectedCells();this.tableSettingRef.selectedCells=t}},this.handleSettingMenuClick=t=>{const e=this.settingHandlers.find((e=>e.canHandle(t.detail)));if(e){const n=this.getTableExtensionContext();n&&e.execute(t.detail,n,this.tableData),t.detail[0]===ct.CAPTION&&this.updateTableSettingCaption()}t.detail[0]!==ct.TABLE&&t.detail[0]!==ct.CELL||(this.popoverRef.hide(),this.tableDynamicPopover.show(t.detail[0]))},this.handleTableSettingPopoverShow=()=>{this.syncSelectedCells(),this.popoverShow=!0}}render(t,e,n,s){return this.tableData=e,this.tableDynamicPopover=s,t("vega-popover",{trigger:"click",isScreenPosition:!0,class:"rte-table-setting-popover",ref:t=>{this.popoverRef=t,this.popoverRef&&(tt.addUniqueObserverToNode(t,ot,this.handleTableSettingPopoverShow),tt.addUniqueObserverToNode(t,it,(()=>this.popoverShow=!1)))}},[t("div",{slot:"popover"},[t("vega-rich-text-table-setting",{ref:t=>{this.tableSettingRef=t,t&&(t.target=n())},selectedCells:this.getTableSelectedCells(),onVegaClick:this.handleSettingMenuClick})])])}updateTableSettingCaption(){const t=this.tableData.hasCaption();this.tableSettingRef&&this.tableSettingRef.hasCaption!==t&&(this.tableSettingRef.hasCaption=t)}getTableSelectedCells(){let t=[];const e=this.getTableExtensionContext();if(e&&e.tableSelection){const{tableSelection:n}=e;t=n.getSelectedCells()}return t}}class pn{static generateTablePropertiesForm(t){const e=t.annotationMap.get(rt.TABLE);let n={borderStyle:"none",borderColor:"",borderWidth:"",backgroundColor:"",width:"",height:"",textAlign:"center"};if(e){const t=e.toJSON().table,{style:s="none",color:o="",width:i=""}=t.border||{style:"none",color:"",width:""};n={backgroundColor:t.backgroundColor||"",width:t.width||"",height:t.height||"",textAlign:t.alignment,borderStyle:s,borderColor:o,borderWidth:i}}return n}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new y(e,0))}}class fn extends W{constructor(t){super(),this.isFlushable=!0;const{textAlign:e,width:n,borderWidth:s,borderColor:o,borderStyle:i,height:r}=t,a=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 o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(n[s[o]]=t[s[o]])}return n}(t,["textAlign","width","borderWidth","borderColor","borderStyle","height"]);this.tableProperties=Object.assign(Object.assign({},a),{alignment:e,border:{style:i,color:o,width:s?le(s):""},width:n?le(n):"",height:r?le(r):""})}toAnnotation(){return new ft(this.tableProperties)}}class gn extends pn{handle(t,e,n,s){e.apply(new fn(n)),this.updateCursorPosition(t,s)}}class bn extends pn{handle(t,e,n,s){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,s))}}class wn extends pn{handle(t,e,n){const s=new fn(n);s.isFlushable=!1,e.apply(s)}}class yn extends W{constructor(t,e){super(),this.isFlushable=!0,this.cellAnnotation=t,this.originAnnotation=e}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}updateOriginAnnotation(){Object.keys(this.cellAnnotation).forEach((t=>{this.originAnnotation[t]=this.cellAnnotation[t]}))}}class mn extends yn{constructor(t,e){super(t,e),this.isFlushable=!0}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}}var vn=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 o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(n[s[o]]=t[s[o]])}return n};class Cn{static getStyleCollectionFromCell(t){return t.reduce(((t,e)=>{const n=e.getAnnotationByType(rt.CELL);if(t[e.id]={},n){const s=n.toJSON().tableCell,{border:o}=s,i=vn(s,["border"]),r={};o&&(r.borderStyle=o.style,r.borderColor=o.color,r.borderWidth=o.width),t[e.id]=ce(Object.assign(Object.assign({},i),r))}return t}),{})}static convertStyleMapToFormField(t){const e={};for(const n in t){const s=t[n];for(const t in s)e[t]?e[t].push(s[t]):e[t]=[s[t]]}const n=Object.keys(t).length,s={};for(const t in e){const o=e[t],i=new Set(o);o.length===n&&1===i.size&&(s[t]=o[0])}return s}applyProperties(t,e,n){t.tableSelection.getSelectedCells().forEach((t=>{const s=e[t.id];if(s){const e=this.convertToVegaTableCellAnnotation(Object.assign({},s));this.applyAnnotation(t,e,n)}}))}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new y(e,0))}convertToVegaTableCellAnnotation(t){const{borderStyle:e,borderWidth:n,borderColor:s}=t,o=vn(t,["borderStyle","borderWidth","borderColor"]),i=ce({style:e,width:n?le(n):"",color:s});return ce(Object.assign(Object.assign({},o),{backgroundColor:o.backgroundColor||"",padding:o.padding?le(o.padding):"",width:o.width?le(o.width):"",height:o.height?le(o.height):"",verticalAlign:o.verticalAlign||"",textAlign:o.textAlign||"",border:i}))}applyAnnotation(t,e,n){const s=t.getAnnotationByType(rt.CELL)||new gt({},!1),o=t instanceof bt?new mn(e,s):new yn(e,s);o.isFlushable=n,t.apply(o)}}class xn extends Cn{handle(t,e,n){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,n))}}class Tn extends Cn{handle(t,e){this.applyProperties(t,e,!1)}}class En extends Cn{handle(t,e,n){this.applyProperties(t,e,!0),this.updateCursorPosition(t,n)}}class Sn extends dn{constructor(t,e){super(e),this.tableColorSchema=[],this.popoverCloseType="none",this.tablePropertiesHandlerMap={save:new bn,cancel:new gn,change:new wn},this.cellPropertiesHandlerMap={save:new xn,cancel:new En,change:new Tn},this.handleTablePropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.tablePropertiesHandlerMap[e].handle(n,this.currentTableBlock,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef&&this.popoverRef.show(!0)},this.handleCellPropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.cellPropertiesHandlerMap[e].handle(n,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef&&this.popoverRef.show(!0)},this.tableColorSchema=t}destroy(){this.selectionAnchorRef&&this.selectionAnchorRef.parentNode&&(tt.removeUniqueObserverFromNode(this.selectionAnchorRef,oe),this.selectionAnchorRef.parentNode.removeChild(this.selectionAnchorRef),this.selectionAnchorRef=null)}async show(t){let e=this.getTableRef();const n=this.getTableExtensionContext();let s=[];if(n&&(s=n.tableSelection.getSelectedCells()),t===ct.CELL&&s.length>1){const t=this.getOrCreateSelectionAnchor(s,e);t&&(e=t)}else t===ct.CELL&&1===s.length&&(e=R.getDOMByEntity(s[0]));this.updateContent(t),this.storeCurrentFocusNode(),ne.call(et.getSubject(this.popoverRef,se),e),await this.popoverRef.show()}async hide(){await this.popoverRef.hide()}render(t,e,n){return this.getTableRef=e,this.currentTableBlock=n,t("vega-popover",{trigger:"click",isScreenPosition:!0,class:"rte-table-dynamic-popover",ref:t=>{this.popoverRef=t,tt.addUniqueObserverToNode(t,it,(()=>{const t=this.getTableExtensionContext();"change"===this.popoverCloseType&&t&&t.flushValue(t.host.value)}))}},[t("div",{slot:"popover",class:"rte-table-dynamic-popover-content"},[t("vega-rich-text-table-properties",{ref:t=>this.tablePropertiesFormRef=t,colors:this.tableColorSchema,type:ct.TABLE,onVegaCancel:this.handleTablePropertiesUpdate,onVegaChange:this.handleTablePropertiesUpdate,onVegaSave:this.handleTablePropertiesUpdate}),t("vega-rich-text-table-properties",{ref:t=>this.cellPropertiesFormRef=t,colors:this.tableColorSchema,type:ct.CELL,onVegaCancel:this.handleCellPropertiesUpdate,onVegaChange:this.handleCellPropertiesUpdate,onVegaSave:this.handleCellPropertiesUpdate})])])}updateContent(t){this.popoverCloseType="none";const e=this.getTableExtensionContext();this.tablePropertiesFormRef&&"TABLE"===t?(this.tablePropertiesFormRef.classList.remove("vega-hidden"),this.cellPropertiesFormRef.classList.add("vega-hidden"),this.tablePropertiesFormRef.defaultValue=pn.generateTablePropertiesForm(this.currentTableBlock)):this.cellPropertiesFormRef&&"CELL"===t&&(this.cellPropertiesFormRef.classList.remove("vega-hidden"),this.tablePropertiesFormRef.classList.add("vega-hidden"),e&&(this.cellPropertiesFormRef.styleMap=Cn.getStyleCollectionFromCell(e.tableSelection.getSelectedCells())),this.cellPropertiesFormRef.defaultValue=Cn.convertStyleMapToFormField(this.cellPropertiesFormRef.styleMap)),e&&e.getSelection().removeAllRanges()}storeCurrentFocusNode(){const t=this.getTableExtensionContext();t&&(this.currentFocusNode=t.getSelectedNodes()[0])}getOrCreateSelectionAnchor(t,e){const n=ae();if(n&&e){const s=e.closest(".rich-text-content"),o=s.getBoundingClientRect();let i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;t.map((t=>R.getDOMByEntity(t))).filter(J).forEach((t=>{const e=t.getBoundingClientRect();i=Math.min(i,e.left-o.left),r=Math.max(r,e.right-o.left),a=Math.min(a,e.top-o.top),l=Math.max(l,e.bottom-o.top)}));const c=r-i,h=l-a;return this.selectionAnchorRef=s.querySelector(".rte-table-selection-popover-anchor"),this.selectionAnchorRef||(this.selectionAnchorRef=n.createElement("div"),this.selectionAnchorRef.className="rte-table-selection-popover-anchor",this.selectionAnchorRef.style.position="absolute",this.selectionAnchorRef.style.pointerEvents="none",s.appendChild(this.selectionAnchorRef),tt.addUniqueObserverToNode(this.selectionAnchorRef,oe,(()=>{this.destroy()}))),this.selectionAnchorRef.style.left=`${i}px`,this.selectionAnchorRef.style.top=`${a}px`,this.selectionAnchorRef.style.width=`${c}px`,this.selectionAnchorRef.style.height=`${h}px`,this.selectionAnchorRef}}}class kn extends Me{doRender(t,e,n){const s=new un(n),o=new Sn(wt.getTableColors(),n);let i;const r=this.renderTable(t,e,(t=>i=t)),a=s.render(t,e,(()=>i),o),l=o.render(t,(()=>i),e),c=e.getAnnotationByType(rt.TABLE),h=n.editable?[t("vega-rich-text-table-selection-widget",{onVegaRemove:t=>{t.stopPropagation(),this.handleTableRemove(e,i)},onClick:t=>s.handleTableClick(t,i),onMouseLeave:()=>{s.syncSelectedCells()}},[t("div",{contentEditable:!0,ref:this.useRef(e)},[r,a,l])])]:[r],d={};if(c){const t=c.renderStyle();d.width=t.width,d.margin=t.margin}const u=t("div",{class:"v-rte--extension-table-container",style:Object.assign({},d)},h);return u.childrenContainerGetter=()=>r,u}injectRTEScopeStyles(){return".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 24, 24, 48));position:relative;display:table-caption;caption-side:top;min-height:22px;text-align:center;word-break:break-word;overflow-wrap:break-word}.v-rte--extension-table-caption.showPlaceholder::before{position:absolute;left:0;right:0;content:attr(data-placeholder);font-family:'Inter', sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"}renderTable(t,e,n){var s;return t("table",Object.assign(Object.assign({key:e.id},null===(s=e.getCustomAttributesAnnotation())||void 0===s?void 0:s.render()),{style:e.getStyles(),class:e.getClasses(),ref:t=>{this.useRef(e)(t),n(t)}}))}handleTableRemove(t,e){t.parent.apply(new an(t)),this.destroySelectionAnchor(e)}destroySelectionAnchor(t){const e=t.closest(".rich-text-content");if(e){const t=e.querySelector(".rte-table-selection-popover-anchor");t&&he.notify(et.getSubject(t,oe),{host:t})}}}class An extends Me{doRender(t,e){return t("thead",{key:e.id,ref:this.useRef(e)})}}class Rn extends Me{doRender(t,e){return t("tr",{key:e.id,ref:this.useRef(e)})}}class On extends Me{doRender(t,e,n){return this.renderByCellType(t,e,n,"td")}renderByCellType(t,e,n,s){var o;return t(s,Object.assign(Object.assign(Object.assign({key:`${e.id}-${s}`,ref:this.useRef(e)},null===(o=e.getCustomAttributesAnnotation())||void 0===o?void 0:o.render()),{style:e.getStyles(n),class:e.getClasses()}),n.editable?this.onSelectionListeners(e,n):void 0))}onSelectionListeners(t,e){return{onMouseDown:t=>{const n=o(t.target,"table"),s=o(t.currentTarget,"table")===n,i=t.target.closest("td, th");if(s&&i){const t=this.getExtensionContext(e.host);t&&t.tableSelection.focusCell(i)}},onMouseMove:n=>{n.stopPropagation(),n.preventDefault();const s=this.getExtensionContext(e.host);s&&s.tableSelection.dragOver(t)},onMouseUp:()=>{const t=this.getExtensionContext(e.host);t&&t.tableSelection.endDrag()}}}}class In extends Me{doRender(t,e){return t("tbody",{key:e.id,ref:this.useRef(e)})}}class Ln extends On{doRender(t,e,n){return super.renderByCellType(t,e,n,"th")}}class Bn extends B{constructor(t,e){super(),this.type="INSERT_TABLE_BLOCK",this.rowCount=t,this.columnCount=e}}class jn extends dn{constructor(){super(...arguments),this.hoveredRows=1,this.hoveredCols=1}render(t,e){return t("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,ref:t=>{t&&(this.tablePickerPopoverRef=t,tt.addUniqueObserverToNode(t,ot,(()=>{this.resetPicker()})))}},[t("div",{slot:"popover"},[this.generatePickerStyles(t),this.generateTableSizeGrid(t)]),t("div",{slot:"popover-content"},e)])}generateTableSizeGrid(t){const e=[];for(let n=1;n<=10;n++)for(let s=1;s<=10;s++)e.push(t("button",{class:"rte-table-picker__cell","data-row":n,"data-col":s,onMouseenter:this.handlePickerCellHover.bind(this,n,s),onClick:this.handlePickerClick.bind(this,n,s)},[]));return t("div",{class:"rte-table-picker"},[t("div",{class:"rte-table-picker__grid",ref:t=>{t&&(this.tablePickerGridRef=t)},style:{gridTemplateColumns:"repeat(10, 16px)",gridTemplateRows:"repeat(10, 16px)"}},e),t("div",{class:"rte-table-picker__hint"},t("vega-hint",{ref:t=>{t&&(this.selectedHintRef=t)}},[`${this.hoveredRows} × ${this.hoveredCols}`]))])}generatePickerStyles(t){return t("style",{},["\n.rte-table-picker__grid { display: grid; gap: 2px; }\n.rte-table-picker__cell {\n box-sizing: border-box;\n border: 1px solid #ccc;\n background-color: transparent;\n cursor: pointer;\n}\n.rte-table-picker__cell:hover {\n background-color: #cae1fc;\n}\n.rte-table-picker__cell.active {\n background-color: #cae1fc;\n}\n.rte-table-picker__hint {\n text-align: center;\n}\n "])}createTable(t,e){const n=this.getTableExtensionContext();if(n){const{host:s,getSelectedNodes:o}=n,i=o()[0],r=new Bn(t,e);i?i.parent&&i.parent.apply(r):s.value.apply(r),r.nextFocusNode&&s.value.apply(new y(r.nextFocusNode,1))}}handlePickerClick(t,e){this.createTable(t,e),this.tablePickerPopoverRef.hide()}handlePickerCellHover(t,e){this.hoveredRows=t,this.hoveredCols=e,Array.from(this.tablePickerGridRef.children).forEach((t=>{const e=Number(t.dataset.row),n=Number(t.dataset.col);e<=this.hoveredRows&&n<=this.hoveredCols?t.classList.add("active"):t.classList.remove("active")})),this.selectedHintRef.textContent=`${this.hoveredRows} × ${this.hoveredCols}`}resetPicker(){this.handlePickerCellHover(1,1)}}class Nn extends Ve{render(t,e){return new jn(e).render(t,super.renderButton(t,e,{showArrowIcon:!0,icon:"rte-table"}))}isDisabled(t){let e=super.isDisabled(t);const n=this.getExtensionContext(t.host);if(n){const{host:t,getSelectedNodes:s}=n,o=s()[0];let i=!0;o&&(i=O.canHandle("INSERT_TABLE_BLOCK",o.parent)&&O.canHandle($.INSERT_CHILDREN_AFTER,o.parent.parent)),e=t.disabled||!i}return e}handleButtonClick(){}handleDropdownClick(){}}Q.register({"rte-table":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 264V160H232V264H48zm0 48H232V432H64c-8.8 0-16-7.2-16-16V312zM280 432V312H464V416c0 8.8-7.2 16-16 16H280zM464 264H280V160H464V264zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"/></svg>'}});class _n extends D{handleAction(t,e){const n=this.createTableBlock(t.rowCount,t.columnCount),s=super.createNewParagraph(""),o=this.getReferenceBlock(e);o?o.parent.apply(new V(o,n,s)):e.apply(new P([n,s])),t.nextFocusNode=n.getFirstNode()}createTableBlock(e,n){const s=Math.max(e,1),o=Math.max(n,1);return yt.from({id:t(),type:"table-block",children:[mt(s,o)]})}getReferenceBlock(t){if(!(t instanceof m))return t}}class Mn extends Xe{canIntercept(t,e){const n=e.parent;return n instanceof vt&&1===n.children.length&&0===t.startOffset}intercept(){}}class Dn extends D{handleAction(t){const e=t.tableBlock,n=e.parent,s=super.getRootContent(e),o=super.createNewParagraph("");n.apply(new V(e,o)),n.apply(new G(e)),s&&s.apply(new y(o.getLastNode()))}}class Vn extends Xe{canIntercept(t,e){return t.entityToBeRemoved&&1===e.children.length}intercept(e,n,s){if(!(n.entityToBeRemoved instanceof _)){const e=_.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]});return s.children=[],void s.apply(new P([e]))}n.entityToBeRemoved.apply(new P([new j(t(),"",n.entityToBeRemoved)]))}}class Pn extends Me{doRender(t,e){return t("caption",{key:e.id,ref:this.useRef(e),style:e.getStyles(),class:[e.getClasses(),e.isNotEmpty()?null:"showPlaceholder"].filter(J).join(" "),"data-placeholder":"Enter table caption"})}}class Hn extends D{getRowsMaxCellCount(t){let e=0;for(const n of t){let t=0;for(const e of n.children)t+=e.colSpan;e=Math.max(e,t)}return e}getRowCellStartCols(t){const e=this.getRowsMaxCellCount(t),n=new Array(t.length),s=new Array(e).fill(0);for(let e=0;e<t.length;e++){const o=t[e].children,i=new Array(o.length);let r=0;for(let t=0;t<o.length;t++){const e=o[t];for(;r<s.length&&s[r]>0;)r++;i[t]=r;const n=Math.max(e.colSpan,Hn.DEFAULT_CELLSPAN);if(e.rowSpan>Hn.DEFAULT_CELLSPAN)for(let t=0;t<n;t++){const n=r+t;n<s.length&&(s[n]=Math.max(s[n],e.rowSpan))}r+=n}n[e]=i;for(let t=0;t<s.length;t++)s[t]>0&&s[t]--}return n}updateCellSpan(t,e,n){const s=t.getCustomAttributesAnnotation();if(n<=Hn.DEFAULT_CELLSPAN){if(s){const n=s.render();delete n[e],t.annotationMap.set(U.CUSTOM_ATTRIBUTE,new Z(n))}}else{const o=s?s.render():{};o[e]=n.toString(),t.annotationMap.set(U.CUSTOM_ATTRIBUTE,new Z(o))}}insertMovedCells(t,e,n){t.forEach(((t,s)=>{const o=e[s];if(o){const e=n[s]||[];t.sort(((t,e)=>t.logicalStartCol===e.logicalStartCol?e.cellIndex-t.cellIndex:e.logicalStartCol-t.logicalStartCol)),t.forEach((t=>{const{cell:n,logicalStartCol:s}=t;if(0===o.children.length)return o.apply(new P([n])),void(e[0]=s);const i=e.findIndex((t=>t>=s));-1===i?(o.apply(new V(o.children[o.children.length-1],n)),e.push(s)):0===i?(o.apply(new F(o.children[0],n)),e.unshift(s)):(o.apply(new F(o.children[i],n)),e.splice(i,0,s))}))}}))}splitRowsBySection(t){const e=[],n=[];return t.forEach((t=>{t.parent instanceof Ct?e.push(t):n.push(t)})),[e,n]}buildSelectedIndices(t,e){return new Set(t.map((t=>e.indexOf(t))).filter((t=>t>=0)))}intersectsRemovalRange(t,e,n,s){return t<=s&&e>=n}countRemovedRows(t,e,n){let s=0;for(let o=t;o<=e;o++)n.has(o)&&s++;return s}getHeadCellLength(t){let e=0;for(let n=0;n<t.children.length;n++){const s=t.children[n];if(!(s instanceof bt))break;e+=s.colSpan}return e}getTheStartSpanCell(t,e,n,s){const o={rowIndex:n};for(let i=n;i>=0;i--){const n=e[i];if(n.includes(s)){o.cell=t[i].children[n.indexOf(s)],o.rowIndex=i;break}}return o}getDefaultCellBlockTemplate(e,n,s=1){const o=ce({colspan:n>1?n.toString():null,rowspan:s>1?s.toString():null}),i=t(),r={id:i,type:e,children:[{id:`${i}-p`,type:"paragraph",nodes:[{id:`${i}-p-t`,type:"text",text:""}]}]};return Object.keys(o).length>0&&(r.annotations={customAttribute:o}),r}getSortedValuesByNumericKey(t){return Array.from(t.entries()).sort((([t],[e])=>t-e)).map((([,t])=>t))}}Hn.DEFAULT_CELLSPAN=1;class Fn extends Hn{handleAction(t,e){const{rowsToBeRemoved:n}=t,s=this.getFutureFocusRow(n[0],n[n.length-1],e),o=this.splitRowsBySection(n);if(this.removeRows(o[0]),this.removeRows(o[1]),s){const t=this.getRootContent(e);if(t){const e=s.getLastNode();t.apply(new y(e,e.getRangeEndOffset()))}}}removeRows(t){if(0===t.length)return;const e=t[0].parent,n=e.children,s=this.buildSelectedIndices(t,n);if(s.size>0){if(n.length===t.length)return void e.parent.apply(new G(e));const o=Math.min(...s),i=Math.max(...s),r=this.getRowCellStartCols(n),a=this.collectCellsToMove(n,r,s,o,i);this.insertMovedCells(a,n,r),t.forEach((t=>{t.parent.apply(new G(t))}))}}collectCellsToMove(t,e,n,s,o){const i=new Map,r=t.length;for(let a=0;a<r;a++){const l=t[a],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=Hn.DEFAULT_CELLSPAN)continue;const d=a+h-1;if(!this.intersectsRemovalRange(a,d,s,o))continue;const u=h-this.countRemovedRows(a,d,n);if(a<s&&d>=s)this.updateCellSpan(c,"rowspan",u);else if(a>=s&&d>o){const s=o+1;if(s<r&&!n.has(s)){const n=e[a][t];i.has(s)||i.set(s,[]),i.get(s).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}}}return i}cloneCellWithRowSpan(t,e){const n=t.clone(t.parent);return this.updateCellSpan(n,"rowspan",e),n}getFutureFocusRow(t,e,n){const s=n.children.filter((t=>t instanceof Ct||t instanceof xt)).flatMap((t=>t.children)),o=s.indexOf(t),i=s.indexOf(e);return s[o-1]?s[o-1]:s[i+1]?s[i+1]:void 0}}class Kn{constructor(){this.dragging=!1,this.anchorCell=null,this.selectedCells=new Set,this.syncRTESelectionWithDebounce=de(this.syncRTESelection,100,this),this.handleSelectionChangeWithDebounce=de(this.handleSelectionChange,10,this),this.filterSelectedCell=(t,e)=>{const n=new Set;if(t.intersectsNode(e)){if(e.nodeType===Node.TEXT_NODE){const t=R.getEntityByDOM(e.parentElement);if(t){const e=Tt(t.parent,vt);if(e)return n.add(e),Array.from(n)}}e.childNodes.forEach((e=>this.filterSelectedCell(t,e).forEach((t=>{n.add(t)}))))}return Array.from(n)},this.updateSelectedStyles=(t,e)=>{const n=1===e?"v-rte-table-cell-focused":"v-rte-table-cell-selected",s=R.getDOMByEntity(t);s&&s.classList.add(n)},this.handleDocMouseUp=()=>{this.endDrag();const t=ae();t&&t.removeEventListener("mouseup",this.handleDocMouseUp)},this.handleContentClick=()=>{this.clearSelection();const t=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");t&&t.removeEventListener("mousedown",this.handleContentClick,!0)}}static computeRectRange(t,e){const n=t.parent.parent.parent;if(n!==e.parent.parent.parent)return[];const s=[];n.children.forEach((t=>{t.children.forEach((t=>s.push(t)))}));const{grid:o,cellMeta:i}=Kn.buildCellGrid(s),r=i.get(t),a=i.get(e);if(!r||!a)return[];const l=r.row+r.rowSpan-1,c=r.col,h=r.col+r.colSpan-1,d=a.row+a.rowSpan-1,u=a.col,p=a.col+a.colSpan-1,f=Math.min(r.row,a.row),g=Math.max(l,d),b=Math.min(c,u),w=Math.max(h,p),y=new Set;for(let t=f;t<=g;t++){const e=o[t];for(let t=b;t<=w;t++){const n=e[t];n&&y.add(n)}}return Array.from(y)}static getCellSpan(t){let e=1,n=1;const s=t.getAnnotationByType(U.CUSTOM_ATTRIBUTE);if(s&&s.customAttribute){const t=s.customAttribute;t.rowSpan&&(e=parseInt(t.rowSpan,10)),t.colSpan&&(n=parseInt(t.colSpan,10))}if(1===e&&1===n){const s=R.getDOMByEntity(t);if(s){const t=s.getAttribute("rowSpan"),o=s.getAttribute("colSpan");t&&(e=parseInt(t,10)),o&&(n=parseInt(o,10))}}return{rowSpan:Number.isFinite(e)&&e>0?e:1,colSpan:Number.isFinite(n)&&n>0?n:1}}static buildCellGrid(t){const e=[],n=new Map;for(let s=0;s<t.length;s++){const o=t[s];e[s]||(e[s]=[]);let i=0;for(let t=0;t<o.children.length;t++){const r=o.children[t];for(;e[s][i];)i+=1;const{rowSpan:a,colSpan:l}=Kn.getCellSpan(r);n.set(r,{row:s,col:i,rowSpan:a,colSpan:l});for(let t=0;t<a;t++){const n=s+t;e[n]||(e[n]=[]);for(let t=0;t<l;t++)e[n][i+t]=r}i+=l}}return{grid:e,cellMeta:n}}destroy(){this.removeSelectionChangeListener()}init(t){this.context=t,this.addSelectionChangeListener()}setSelectedCells(t){const e=Array.from(this.selectedCells)[0]||t[0];this.updateSelectedCells(t),this.emitCellSelectionChange(e,t)}getSelectedCells(){return Array.from(this.selectedCells)}focusCell(t){const e=R.getEntityByDOM(t);e&&(this.anchorCell=e,this.setSelectedCells([e]),this.addListeners())}dragOver(t){if(!this.anchorCell)return;const e=Kn.computeRectRange(this.anchorCell,t);e.length>1&&this.startDrag(),this.dragging&&(this.preventTextSelection(e),this.updateSelectedCells(e,{debounceSync:!0}))}endDrag(){this.dragging=!1,this.anchorCell=null}emitCellSelectionChange(t,e){const n=Tt(t,yt);if(n){const t=R.getDOMByEntity(n);t&&he.notify(et.getSubject(t,ie),{host:t,detail:e})}}clearSelection(){this.selectedCells.forEach((t=>{const e=R.getDOMByEntity(t);e&&e.classList.remove("v-rte-table-cell-selected","v-rte-table-cell-focused")})),this.selectedCells.clear()}addSelectionChangeListener(){const t=ae();t&&t.addEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}removeSelectionChangeListener(){const t=ae();t&&t.removeEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}handleSelectionChange(){if(this.dragging)return void this.syncRTESelectionWithDebounce();const t=this.context.getSelection();if(t.rangeCount>0){const e=t.getRangeAt(0),n=e.commonAncestorContainer;if(o(n,"table")){const t=this.filterSelectedCell(e,n);this.setSelectedCells(t)}}}startDrag(){this.dragging=!0}updateSelectedCells(t,{debounceSync:e}={}){this.clearSelection(),t.forEach((e=>{this.selectedCells.add(e),this.updateSelectedStyles(e,t.length)})),e?this.syncRTESelectionWithDebounce():this.syncRTESelection()}syncRTESelection(){const t=Array.from(this.selectedCells),e=t.flatMap((t=>t.children.flatMap((t=>t.children.flatMap((t=>{if(t instanceof H)return t})))))).filter(J);t.length>1&&this.context.setSelectedNodes(e,{startNode:e[0],endNode:e[e.length-1],startOffset:0,endOffset:e[e.length-1].getRangeEndOffset()})}preventTextSelection(t){const e=this.context.getSelection();if(e.removeAllRanges(),t.length>0){const n=R.getDOMByEntity(t[0]);if(n){const t=new Range;t.setStart(n,0),t.setEnd(n,0),e.addRange(t)}}}addListeners(){const t=ae();t&&t.addEventListener("mouseup",this.handleDocMouseUp);const e=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");e&&e.addEventListener("mousedown",this.handleContentClick,!0)}}class $n extends Hn{handleAction(t,e){const{selectedRows:n}=t,[s,o]=this.splitRowsBySection(n);o.length>0?this.convertToHeaderRows(o,e):this.revertToBodyRows(s,e);const i=this.getRootContent(e);if(i){const t=n[0].getFirstNode();t&&i.apply(new y(t,0))}}convertToHeaderRows(e,n){let s=n.children.find((t=>t instanceof Ct));const o=e[0].parent;s||(s=Ct.from({id:t(),type:"table-head",children:[]}),n.apply(new F(o,s)));const i=o.children.indexOf(e[e.length-1]),r=o.children.slice(0,i+1),a=this.buildSelectedIndices(r,o.children),l=Math.min(...a),c=Math.max(...a);if(a.size>0){if(a.size<o.children.length){const t=this.getRowCellStartCols(o.children),e=this.collectCellsToMove(o.children,t,a,l,c);this.insertMovedCells(e,o.children,t)}this.convertBodyRowsToHeaderRows(o,s,r)}}convertBodyRowsToHeaderRows(t,e,n){for(let e=0;e<n.length;e++){const s=n[e];s.children=s.children.map((t=>this.convertTdToTh(t))),t.apply(new G(s))}e.apply(new P(n))}revertToBodyRows(e,n){let s=n.children.find((t=>t instanceof xt));const o=e[0].parent;s||(s=xt.from({id:t(),type:"table-body",children:[]}),n.apply(new V(o,s)));const i=o.children.indexOf(e[0]),r=o.children.slice(i),a=this.buildSelectedIndices(r,o.children);if(a.size>0){const t=this.getRowCellStartCols(o.children),e=this.collectCellsToMove(o.children,t,a,Math.min(...a),Math.max(...a));this.insertMovedCells(e,o.children,t),this.convertHeadRowsToBodyRows(o,s,r)}}convertHeadRowsToBodyRows(t,e,n){const s=e.children[0],o=this.getRowCellStartCols(n);for(let i=0;i<n.length;i++){const r=n[i];t.apply(new G(r));const a=s?this.getHeadCellLength(s):0;r.children=this.convertThToTd(r,o[i],a),s&&e.apply(new F(s,r))}s||e.apply(new P(n))}collectCellsToMove(t,e,n,s,o){const i=new Map,r=t.length;for(let a=0;a<r;a++){const l=t[a],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=Hn.DEFAULT_CELLSPAN)continue;const d=a+h-1;if(!this.intersectsRemovalRange(a,d,s,o))continue;const u=this.countRemovedRows(a,d,n),p=h-u;if(a<s&&d>=s){this.updateCellSpan(c,"rowspan",p);const o=s;if(o<r&&n.has(o)){const n=e[a][t];i.has(o)||i.set(o,[]),i.get(o).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}else if(a>=s&&d>o){this.updateCellSpan(c,"rowspan",u);const s=o+1;if(s<r&&!n.has(s)){const n=e[a][t];i.has(s)||i.set(s,[]),i.get(s).push({cell:this.cloneCellWithRowSpan(c,p),newRowSpan:p,cellIndex:t,logicalStartCol:n})}}}}return i}convertTdToTh(t){if(t instanceof bt)return t;const e=bt.from(t.toJSON());return e.parent=t.parent,e}convertThToTd(t,e,n){return t.children.map(((s,o)=>{let i=s;const r=e[o]<n,a=s.toJSON();return i=r?s:vt.from(this.deleteHeadCellDefaultBackground(a)),i.parent=t,i}))}cloneCellWithRowSpan(e,n){const s=e.clone(e.parent);s.id=t(),s.children=[];const o=this.createNewParagraph("");return o&&s.apply(new P([o])),this.updateCellSpan(s,"rowspan",n),s}deleteHeadCellDefaultBackground(t){var e;if(t&&t.annotations&&t.annotations.customStyle){delete t.annotations.tableCell;const n=t.annotations.customStyle.backgroundColor,s=Et.getDefaultBackgroundColor();!n||n!==s&&(null===(e=i(n))||void 0===e?void 0:e.toUpperCase())!==s||delete t.annotations.customStyle.backgroundColor}return t}}class zn extends St{handleAction(t,e){const{insertDirection:n,tableCellInsertRange:s}=t,o=new Set(s.map((t=>t.id))),i=kt(e),r=At(i),[a,l]=this.getBoundaryCellColumnRange(s,i,r),c=n===Lt.LEFT?a:l+1,h=this.hasSelectedCellInsideTargetColumn(i,r,c,o),d=new Set;i.forEach(((t,s)=>{if(d.has(s))return;const a=this.findExpandableCell(t,s,c,r,n,o,h);if(a){const t=a.rowSpan;if(Rt(a,a.colSpan+1,a.rowSpan,e,!0),t>1)for(let e=1;e<t;e++)d.add(s+e);return}const l=this.findInsertPosition(t,s,c,r,i);if(l){const e=this.generateTableCell(l.templateCell);t.apply(l.before?new F(l.anchorCell,e):new V(l.anchorCell,e))}}))}findExpandableCell(t,e,n,s,o,i,r){const a=s[e],l=t.children.reduce(((t,e)=>t+(i.has(e.id)?1:0)),0);for(const c of t.children){const t=a.indexOf(c.id),h=t+c.colSpan,d=n===h,u=e+c.rowSpan>=s.length,p=i.has(c.id),f=n>t&&n<h;if(o===Lt.LEFT?f:f&&(!p||!u)||d&&c.colSpan>1&&p&&!u&&1===l&&!r)return c}return null}hasSelectedCellInsideTargetColumn(t,e,n,s){for(let o=0;o<t.length;o++){const i=t[o],r=e[o];for(const t of i.children){if(!s.has(t.id))continue;const e=r.indexOf(t.id),o=e+t.colSpan;if(n>e&&n<o)return!0}}return!1}findInsertPosition(t,e,n,s,o){const i=s[e];let r=t.children[0];if(n>=0&&n<i.length){const t=Ot(o,i[n]);t&&(r=t)}let a=0;for(let e=0;e<t.children.length;e++){const s=t.children[e];for(;a<i.length&&i[a]!==s.id;)a++;if(a>=n)return{anchorCell:s,templateCell:r,before:!0};const o=a+s.colSpan;if(o>n||e===t.children.length-1)return{anchorCell:s,templateCell:r,before:!1};a=o}return null}generateTableCell(t){return t instanceof bt?bt.from(It(t.type)):vt.from(It(t.type))}}class Wn extends St{handleAction(t,e){const n=kt(e),s=At(n),[o,i]=this.getBoundaryCellColumnRange(t.tableCellDeleteRange,n,s),r=Math.max(n.indexOf(t.tableCellDeleteRange[t.tableCellDeleteRange.length-1].parent),0),{coveredCellIds:a,coveredCells:l,adjustmentCellInfo:c}=this.getDeleteCellsInfo(n,o,i,s),h=this.findNextFocusableCell(n,s,o,i,a,r);this.deleteCells(l,c,e);const d=this.getRootContent(e),u=Nt(h);d&&u&&d.apply(new y(u))}getDeleteCellsInfo(t,e,n,s){const o=[],i=new Set,r=[],a=Bt(s);return t.forEach((t=>{t.children.forEach((t=>{const s=a.get(t.id);if(void 0===s)return;const{colSpan:l,rowSpan:c}=_t(t),h=this.getColumnOverlapCount(s,l,e,n);if(h<=0)return;if(h===l)return o.push(t),void i.add(t.id);const d=Math.max(1,l-h);r.push({cell:t,nextColSpan:d,rowSpan:c})}))})),{coveredCells:o,coveredCellIds:i,adjustmentCellInfo:r}}findNextFocusableCell(t,e,n,s,o,i){for(let r=0;r<t.length;r++){const a=this.findFocusableCellIdInGridRow(e[(i+r)%t.length],n,s,o);if(!a)continue;const l=Ot(t,a);if(l)return l}return null}findFocusableCellIdInGridRow(t,e,n,s){for(let e=n+1;e<t.length;e++){const n=t[e];if(n&&!s.has(n))return n}for(let n=e-1;n>=0;n--){const e=t[n];if(e&&!s.has(e))return e}return null}deleteCells(t,e,n){t.forEach((t=>{t.parent.apply(new G(t))}));const s=new Set;e.forEach((({cell:t,nextColSpan:e,rowSpan:o})=>{s.add(t.id),Rt(t,e,o,n)})),this.normalizeRemainingCellSpans(n,s)}normalizeRemainingCellSpans(t,e){kt(t).forEach((n=>{n.children.forEach((n=>{const{colSpan:s,rowSpan:o}=_t(n);if(e.has(n.id)){const e=jt(t);if(!(o>1&&s===e))return}Rt(n,s,o,t)}))}))}getColumnOverlapCount(t,e,n,s){const o=t+e-1,i=Math.max(t,n),r=Math.min(o,s);return i<=r?r-i+1:0}}class Gn extends B{constructor(t){super(),this.isFlushable=!0,this.type="CREATE_SEGMENT_TABLE_CELL",this.payload=t}}class Un extends D{handleAction(t,e){const{table:n,sourceCell:s,colSpan:o,cellType:i,keepSourceContent:r}=t.payload,a=r?this.convertCellType(s,i):Mt(i);Rt(a,o,s.rowSpan,n),e.apply(new F(s,a))}convertCellType(t,e){return"table-head-cell"===e?bt.from(t.toJSON()):vt.from(t.toJSON())}}class Zn extends D{handleAction(t,e){const{cell:n,targetCellType:s}=t.payload,o="table-head-cell"===s?bt.from(n.toJSON()):vt.from(n.toJSON());e.apply(new F(n,o)),e.apply(new G(n))}}class Jn extends D{handleAction(t,e){const{table:n,cell:s,col:o,cellStartCol:i,endCol:r,targetCellType:a}=t.payload,l=i+s.colSpan-1,c=o>i?o-i:0,h=Math.min(r,l),d=h-o+1,u=l-h;c>0&&e.apply(new Gn({table:n,sourceCell:s,colSpan:c,cellType:s.type,keepSourceContent:!0})),e.apply(new Gn({table:n,sourceCell:s,colSpan:d,cellType:a,keepSourceContent:0===c})),u>0&&e.apply(new Gn({table:n,sourceCell:s,colSpan:u,cellType:s.type,keepSourceContent:0===c&&d===s.colSpan})),e.apply(new G(s))}}class Xn extends St{handleAction(t,e){const n=kt(e),s=At(n),o=Bt(s),[i,r]=this.getBoundaryCellColumnRange(t.tableCellSelectRange,n,s),a=[],l=new Set;n.forEach((t=>{t.children.forEach((t=>{const e=o.get(t.id);void 0!==e&&e>=i&&e<=r&&!l.has(t.id)&&(l.add(t.id),a.push(t))}))})),t.selectCellCallback(a)}}class qn extends Xe{canIntercept(t){return t.childrenToBeInserted.some((t=>!(t instanceof vt)))}intercept(){}}class Qn extends D{handleAction(t,e){const{targetCell:n,mergeCells:s,colSpan:o,rowSpan:i,direction:r}=t;this.mergeContentToTargetCell(n,s),Rt(n,o,i,e),this.deleteOtherSelectedCells(s,n),r!==Dt.MERGE_CELL_LEFT&&r!==Dt.MERGE_CELL_RIGHT&&i>1&&this.clearRowSpanIfUniformAcrossRow(n,e,i);const a=this.getRootContent(e),l=Nt(n);a&&l&&a.apply(new y(l))}mergeContentToTargetCell(t,e){const n=e.flatMap((t=>t.children)),s=n.filter((t=>t.isNotEmpty()));t.children=(s.length>0?s:[n[0]]).map((e=>e.clone(t)))}deleteOtherSelectedCells(t,e){t.forEach((t=>{t!==e&&t.parent.apply(new G(t))}))}clearRowSpanIfUniformAcrossRow(t,e,n){const s=t.parent.parent.children,o=At(s),i=[];for(let e=0;e<o.length;e++)o[e].includes(t.id)&&i.push(e);if(i.length>1){const t=i[0],r=t+n-1,a=new Set;let l=Number.POSITIVE_INFINITY;for(let e=0;e<o[0].length;e++){let n=o[t][e],s=1,i=!1;for(let c=t+1;c<=r;c++)o[c][e]!==n?(s>1&&(i=!0,l=Math.min(l,s),a.add(n)),s=1,n=o[c][e]):s++;if(s<2&&!i){a.clear();break}s>1&&(l=Math.min(l,s),a.add(n))}a.size>0&&s.forEach((t=>{t.children.forEach((t=>{if(a.has(t.id)){const{rowSpan:n,colSpan:s}=_t(t);Rt(t,s,n-l+1,e)}}))}))}}}class Yn extends C{canHandle(t,e){const n=t[e];return n&&"TABLE"===n.tagName?1:0}handle(e,n){return yt.from({id:t(),type:"table-block",annotations:w.generate(yt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ts extends v{canHandle(t,e){const n=t[e];return n&&"THEAD"===n.tagName?1:0}handle(e,n){return Ct.from({id:t(),type:"table-head",annotations:w.generate(Ct,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class es extends v{canHandle(t,e){const n=t[e];return n&&"TBODY"===n.tagName?1:0}handle(e,n){return xt.from({id:t(),type:"table-body",annotations:w.generate(xt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ns extends v{canHandle(t,e){const n=t[e];return n&&"TR"===n.tagName?1:0}handle(e,n){return Vt.from({id:t(),type:"table-row",annotations:w.generate(Vt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ss extends v{canHandle(t,e){const n=t[e];return!n||"TD"!==n.tagName&&"TH"!==n.tagName?0:1}handle(e,n){const s=e[0],o=[{id:t(),type:"paragraph",annotations:{internalWrapper:n&&!n.autoMatchFormat},nodes:[{id:t(),type:"text",annotations:{plainText:n&&!n.autoMatchFormat},text:""}]}];return"TH"===s.tagName?bt.from({id:t(),type:"table-head-cell",annotations:this.getTableHeadCellAnnotations(s,n),children:o},n):vt.from({id:t(),type:"table-cell",annotations:w.generate(bt,s,n),children:o},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableHeadCellAnnotations(t,e){const n=w.generate(vt,t,e);return n&&n.tableCell&&wt.getColorKey(n.tableCell.backgroundColor,!0)===at.key&&(delete n.tableCell.backgroundColor,n.customStyle&&delete n.customStyle.backgroundColor),n}}class os extends C{canHandle(t,e){const n=t[e];return n&&n.parentElement&&"TABLE"===n.parentElement.tagName&&"CAPTION"===n.tagName?1:0}handle(e,n){return RTETableCaptionBlock.from({id:t(),type:"table-caption",annotations:this.getTableCaptionAnnotations(e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableCaptionAnnotations(t,e){const n=w.generate(RTETableCaptionBlock,t,e);return n&&n.customStyle&&n.customStyle.backgroundColor&&wt.getColorKey(n.customStyle.backgroundColor,!0)===at.key&&delete n.customStyle.backgroundColor,n}}class is extends k{getBackgroundColor(t){return t.style.backgroundColor?wt.getColorKey(t.style.backgroundColor)||t.style.backgroundColor:null}getBorder(t){const e=t.style,n=e.borderStyle,s=e.borderWidth,o=e.borderColor;if(o||n||s){const t="initial"===o?"":o;return{style:"initial"===n?"":n,width:"initial"===s?"":s,color:wt.getColorKey(t)||t}}return null}getWidth(t){if(t.style.width)return t.style.width;const e=t.getAttribute("width");return e?/^\d+$/.test(e)?`${e}px`:e:null}getHeight(t){if(t.style.height)return t.style.height;const e=t.getAttribute("height");return e?/^\d+$/.test(e)?`${e}px`:e:null}}class rs extends is{canHandle(t){return"RTETableBlock"===t.name}handle(t){const e=ce({backgroundColor:this.getBackgroundColor(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),alignment:this.getAlignment(t)});return Object.keys(e).length>0?{table:e}:{}}getAlignment(t){const e=t.classList;if(e.contains("v-rte--extension-table-align-left"))return"left";if(e.contains("v-rte--extension-table-align-center"))return"center";if(e.contains("v-rte--extension-table-align-right"))return"right";const n=t.style,s=n.marginLeft,o=n.marginRight;if("auto"===s&&"auto"===o)return"center";if("0"===s||"0px"===s)return"left";if("0"===o||"0px"===o)return"right";const i=t.getAttribute("align");return i&&["left","center","right"].includes(i)?i:null}}class as extends is{canHandle(t){return"RTETableCellBlock"===t.name}handle(t){const e=ce({backgroundColor:this.getBackgroundColor(t),padding:this.getPadding(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),textAlign:this.getTextAlign(t),verticalAlign:this.getVerticalAlign(t),minWidth:this.getMinWidth(t),boxSizing:this.getBoxSizing(t)});return Object.keys(e).length>0?{tableCell:e}:{}}getMinWidth(t){return t.style.minWidth?t.style.minWidth:null}getBoxSizing(t){return t.style.boxSizing?t.style.boxSizing:null}getPadding(t){return t.style.padding?t.style.padding:null}getTextAlign(t){if(t.style.textAlign){const e=t.style.textAlign;if(["left","center","right","justify"].includes(e))return e}const e=t.getAttribute("align");return e&&["left","center","right","justify"].includes(e)?e:null}getVerticalAlign(t){if(t.style.verticalAlign){const e=t.style.verticalAlign;if(["top","middle","bottom"].includes(e))return e}return null}}class ls extends as{canHandle(t){return"RTETableHeadCellBlock"===t.name}}class cs extends D{handleAction(t,e){const n=t.toAnnotation(),s=this.getDOMByEntity(e);if(s){const t=s.closest(".v-rte--extension-table-container"),{backgroundColorAnnotation:o,width:i,height:r}=n;s.style.backgroundColor=o.renderStyle().color,s.style.border=n.borderStr,s.style.width=i,s.style.height=r;const a=n.renderAlignmentStyle().margin;s.style.margin=a,t&&(t.style.width=i,t.style.height=r,t.style.margin=a),this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","margin"])}}}class hs extends D{handleAction(t,e){const n=t.toAnnotation(),s=this.getDOMByEntity(e);if(s){const{width:t,height:o,borderStr:i,padding:r,textAlign:a,verticalAlign:l}=n,c=n.renderStyle().backgroundColor||"";s.style.backgroundColor=c,s.style.border=i,s.style.width=t,s.style.height=o,s.style.padding=r,s.style.textAlign=a,s.style.verticalAlign=l,this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","padding","textAlign","verticalAlign"])}}}class ds extends D{handleAction(t,e){const n=e.parent,s=n.parent,o=Tt(n,yt),i=kt(o),r=i.indexOf(n),{colSpan:a,rowSpan:l}=_t(e),c=Pt(e,i),h=Math.ceil(l/2),d=Math.max(1,l-h),u=1===l;Rt(e,a,h,o);const p=r+h,f=Mt(e.type);if(Rt(f,a,d,o),u){const t=this.createNewRowWithCell(s,f),r=s.children.indexOf(n);s.apply(new V(s.children[r],t)),i.splice(p,0,t),this.updateCellsSpanningThroughInsertionPoint(i,p,e,o)}else{const t=i[p],e=this.findInsertPosition(t,c,i,p);t.children.splice(e,0,f),f.parent=t}}findInsertPosition(t,e,n,s){let o=0;for(let t=0;t<s;t++){const i=n[t];for(const r of i.children){const{colSpan:i,rowSpan:a}=_t(r);t+a>s&&Pt(r,n)<e&&(o+=i)}}let i=o;for(let n=0;n<t.children.length;n++){if(i>=e)return n;const s=t.children[n],{colSpan:o}=_t(s);i+=o}return t.children.length}createNewRowWithCell(e,n){const s={id:t(),type:"table-row",children:[]},o=Vt.from(s);return o.parent=e,o.children.push(n),n.parent=o,o}updateCellsSpanningThroughInsertionPoint(t,e,n,s){for(let o=0;o<e;o++){const i=t[o];for(const t of i.children){if(t===n)continue;const{colSpan:i,rowSpan:r}=_t(t);o+r>=e&&Rt(t,i,r+1,s)}}}}class us extends D{handleAction(t,e){const n=e.parent,s=Tt(n,yt),o=kt(s),i=o.indexOf(n),{colSpan:r,rowSpan:a}=_t(e),l=Pt(e,o),c=l+r-1,h=Math.ceil(r/2),d=Math.floor(r/2);Rt(e,h,a,s);const u=Mt(e.type);Rt(u,d,a,s),n.apply(new V(e,u));const p=1===r?1:0;p>0&&this.updateOtherRowsCells(o,i,l,c,a,p,s)}updateOtherRowsCells(t,e,n,s,o,i,r){for(let a=0;a<t.length;a++){const l=t[a];if(!(a>=e&&a<e+o))for(const e of l.children){const o=Pt(e,t),{colSpan:a,rowSpan:l}=_t(e);if(o+a-1>=n&&o<=s){Rt(e,a+i,l,r);break}}}}}class ps extends Hn{handleAction(e,n){const{selectedRows:s}=e,o=s[s.length-1];let i=n.children.find((t=>t instanceof xt));const r={id:t(),type:"table-row",children:[]};let a=0,l=null;i?(l=i.children[0],a=this.getHeadCellLength(l)):(i=xt.from({id:t(),type:"table-body",children:[]}),n.apply(new P([i])));const c=o.parent.children,h=this.getRowsMaxCellCount(c);if(this.getRowsMaxCellCount([o])<h){const t=c.indexOf(o),e=this.getRowCellStartCols(c),n=new Map;for(let s=0;s<h;s++){const o=s<a?"table-head-cell":"table-cell",{cell:i}=this.getTheStartSpanCell(c,e,t,s);if(i){const t=i.colSpan;n.set(s,this.getDefaultCellBlockTemplate(o,t)),s+=t-1}}r.children=this.getSortedValuesByNumericKey(n)}else r.children=this.createTableCells(o,a);const d=l?new F(l,Vt.from(r)):new P([Vt.from(r)]);i.apply(d)}createTableCells(t,e){const n=[];let s=0;for(const o of t.children)n.push(this.getDefaultCellBlockTemplate(s<e?"table-head-cell":"table-cell",o.colSpan)),s+=o.colSpan;return n}}class fs extends Hn{handleAction(e){const{insertDirection:n,selectedRows:s}=e,o=n===Ht.ABOVE?s[0]:s[s.length-1],i={id:t(),type:"table-row",children:[]},r=o.parent.children,a=this.getRowsMaxCellCount(r),l=r.indexOf(o),c=this.getRowCellStartCols(r),h=new Map;for(let t=0;t<a;t++){const{cell:e,rowIndex:s}=this.getTheStartSpanCell(r,c,l,t);if(e){const{colSpan:o,rowSpan:i}=e;if(n===Ht.ABOVE?s!==l:s+i>l+1){this.updateCellSpan(e,"rowspan",i+1),t+=o-1;continue}h.set(t,this.getDefaultCellBlockTemplate(e.type,o)),t+=o-1}}i.children=this.getSortedValuesByNumericKey(h);const d=Vt.from(i),u=n===Ht.ABOVE?new F(o,d):new V(o,d);o.parent.apply(u)}}class gs extends Xe{canIntercept(t,e){return Boolean(e.parent)}intercept(t,e,n){const s=this.createNewParagraph("");s&&(n.parent.apply(0===e.startOffset?new F(n,s):new V(n,s)),e.newBlock=s)}createNewParagraph(e){const n=L.getRTEBlockClass("paragraph");if(n)return n.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:e}]})}}class bs extends De{constructor(t=Ft){super(),this.toolbarButtonRenderer=new Nn,this.tableBlockRenderer=new kn,this.tableRowBlockRenderer=new Rn,this.tableCellRenderer=new On,this.tableHeadCellRenderer=new Ln,this.tableSelection=new Kn,wt.setTableColors(t),this.registerToolbarButtonRenderer("table",this.toolbarButtonRenderer),this.registerBlockBasicStrategies(yt.name),this.registerBlockBasicStrategies(Ct.name),this.registerBlockBasicStrategies(bt.name),this.registerBlockBasicStrategies(Vt.name),this.registerBlockBasicStrategies(vt.name),this.registerBlockBasicStrategies(xt.name),this.registerRenderer("table-block",this.tableBlockRenderer),this.registerRenderer("table-head",new An),this.registerRenderer("table-head-cell",this.tableHeadCellRenderer),this.registerRenderer("table-row",this.tableRowBlockRenderer),this.registerRenderer("table-cell",this.tableCellRenderer),this.registerRenderer("table-body",new In),this.registerRenderer("table-caption",new Pn),this.registerNode("table-block",yt),this.registerNode("table-head",Ct),this.registerNode("table-head-cell",bt),this.registerNode("table-row",Vt),this.registerNode("table-cell",vt),this.registerNode("table-body",xt),this.registerNode("table-caption",RTETableCaptionBlock),this.registerElementToBlockDTOClassStrategy(new Yn),this.registerElementToBlockDTOClassStrategy(new ts),this.registerElementToBlockDTOClassStrategy(new es),this.registerElementToBlockDTOClassStrategy(new ns),this.registerElementToBlockDTOClassStrategy(new ss),this.registerElementToBlockDTOClassStrategy(new os),this.registerAnnotationHandler(new rs),this.registerAnnotationHandler(new as),this.registerAnnotationHandler(new ls)}initialExtension(t){this.tableSelection.init(t);const e=Object.assign(Object.assign({},t),{tableSelection:this.tableSelection});super.initialExtension(e)}destroyExtension(){this.tableSelection.destroy()}}(()=>{const t=new _n,e=new Dn;De.registerActionHandleStrategy(m.name,"INSERT_TABLE_BLOCK",t),De.registerActionHandleStrategy(m.name,"DELETE_TABLE_BLOCK",e),De.registerActionHandleStrategy(vt.name,"DELETE_TABLE_BLOCK",e),De.registerActionHandleStrategy(bt.name,"DELETE_TABLE_BLOCK",e),De.registerActionHandleStrategy(_.name,"INSERT_TABLE_BLOCK",t),De.registerActionHandleStrategy(T.name,"INSERT_TABLE_BLOCK",t),De.registerActionHandleStrategy(yt.name,Kt,new ps),De.registerActionHandleStrategy(yt.name,$t,new fs),De.registerActionHandleStrategy(yt.name,zt,new Fn),De.registerActionHandleStrategy(yt.name,Wt,new $n),De.registerActionHandleStrategy(yt.name,Gt,new zn),De.registerActionHandleStrategy(yt.name,Ut,new Wn),De.registerActionHandleStrategy(yt.name,Zt,new Jt),De.registerActionHandleStrategy(Vt.name,Xt,new Jn),De.registerActionHandleStrategy(Vt.name,"CREATE_SEGMENT_TABLE_CELL",new Un),De.registerActionHandleStrategy(Vt.name,qt,new Zn),De.registerActionHandleStrategy(vt.name,Qt,new ds),De.registerActionHandleStrategy(vt.name,Yt,new us),De.registerActionHandleStrategy(bt.name,Qt,new ds),De.registerActionHandleStrategy(bt.name,Yt,new us),De.registerActionHandleStrategy(yt.name,te,new Xn),De.registerActionHandleStrategy(yt.name,ee,new Qn),De.registerActionHandleStrategy(yt.name,fn.name,new cs),De.registerActionHandleStrategy(vt.name,yn.name,new hs),De.registerActionHandleStrategy(bt.name,mn.name,new hs),De.registerActionHandlerInterceptor(_.name,$.DELETE_BLOCK_CONTENT,new Mn),De.registerActionHandlerInterceptor(Vt.name,$.INSERT_CHILDREN_BEFORE,new qn),De.registerActionHandlerInterceptor(vt.name,$.DELETE_CHILDREN,new Vn),De.registerActionHandlerInterceptor(bt.name,$.DELETE_CHILDREN,new Vn),De.registerActionHandlerInterceptor(yt.name,$.INSERT_NEW_PARAGRAPH,new gs)})();class ws extends B{constructor(t,e){super(),this.type=$.INSERT_NODE_TO_NEAREST_ROOT,this.rteRange=t,this.nodeToBeInserted=e}}class ys extends D{handleAction(e,n){const{rteRange:s,token:o}=e;if(s&&s.startNode){const{key:i,label:r,customAttrs:a={wrapped:"true"}}=o,l=new RTETokenNode(t(),i,r,n);l.annotationMap.set("CUSTOM_ATTRIBUTE",new Z(a)),n.apply(new ws(s,l)),e.actionHandleResult=!0}}}const ms=new class extends C{canHandle(t,e){const n=t[e];return"SPAN"===n.nodeName&&n.classList.contains("token")&&n.hasAttribute("token-key")?1:0}handle(e){const n=e[0],s=n.getAttribute("token-key"),o=n.textContent,i=w.generate(j,n),{customAttribute:r}=i,a=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 o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(n[s[o]]=t[s[o]])}return n}(i,["customAttribute","customClass"]);return{id:t(),type:"token",token:s,text:o,annotations:Object.assign(Object.assign({},a),{customAttribute:this.createCustomAttrs(r)})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}createCustomAttrs(t){const e=Object.assign(Object.assign({},t),{contenteditable:null,"template-token-key":null,"token-key":null,wrapped:"false"===t.wrapped?"false":"true"});return ce(e)}};class vs extends De{constructor(t=[]){super(),this.tokenRenderer=new Fe,this.registerNode("token",RTETokenNode),this.registerRenderer("token",this.tokenRenderer),this.tokenToolbarButtonRenderer=new He(t),this.registerToolbarButtonRenderer("token",this.tokenToolbarButtonRenderer),this.registerElementToNodeDTOClassStrategy(ms)}}(()=>{const t=new ys;De.registerActionHandleStrategy(_.name,"INSERT_TOKEN_NODE",t),De.registerActionHandleStrategy(A.name,"INSERT_TOKEN_NODE",t)})();export{Xe as A,ws as I,He as R,fe as V,ye as a,Ce as b,Ee as c,Le as d,Ne as e,vs as f,$e as g,rn as h,bs as i,De as j,Me as k,Ve as l,RTETokenNode as m,Fe as n,Ke as o,Re as w}
@@ -1 +0,0 @@
1
- import{M as t,V as i}from"./p-6e1ab235.js";import{l as s,e}from"./p-dcd18ab1.js";import{S as n}from"./p-1fb56e14.js";import{O as a}from"./p-331a62d5.js";import{C as o}from"./p-2d0d575f.js";import{C as c}from"./p-33860e54.js";import{d as h}from"./p-878851f6.js";var l=function(t,i,s,e){var n,a=arguments.length,o=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var c=t.length-1;c>=0;c--)(n=t[c])&&(o=(a<3?n(o):a>3?n(i,s,o):n(i,s))||o);return a>3&&o&&Object.defineProperty(i,s,o),o};const r=["a[href]","area[href]","button","input","select","textarea","iframe","object","embed",'[contenteditable="true"]','[contenteditable=""]',"[tabindex]"].join(",");class d extends i{constructor(t){super(),this.isVoiceOverClick=!1,this.focusTriggerElement=null,this.focusDialogTaskQueue=new n,this.dialogContentReadyObserver=null,this.dialogContentReadySubject=null,this.isChildFocused=!1,this.eventListenerHandler=()=>{(this.entry.triggerEl()||window).addEventListener("click",this.handleClickEvent,{capture:!0})},this.eventListenerRemover=()=>{const t=this.entry.triggerEl();t&&t.removeEventListener("click",this.handleClickEvent,{capture:!0}),window.removeEventListener("click",this.handleClickEvent,{capture:!0})},this.handleClickEvent=t=>{this.isVoiceOverClick=s(t),this.isVoiceOverClick||(this.focusTriggerElement=null)},this.getFirstFocusableElement=t=>{const i=t=>{if(t instanceof HTMLElement&&this.isFocusableElement(t))return t;const s=Array.from(t.querySelectorAll("*"));for(const t of s){if(this.isFocusableElement(t))return t;if(t.shadowRoot){const s=i(t.shadowRoot);if(s)return s}}return null};return t instanceof HTMLElement&&t.shadowRoot?this.isFocusableElement(t)?t:i(t)||i(t.shadowRoot):i(t)},this.isFocusableElement=t=>!!t.matches(r)&&!t.hasAttribute("disabled")&&!t.hasAttribute("inert")&&"true"!==t.getAttribute("aria-hidden")&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&t.tabIndex>=0,this.focusOnFirstFocusableElement=()=>{if(!this.isChildFocused){const t=this.entry.dialogEl(),i=this.getFirstFocusableElement(t);i?(this.isChildFocused=!0,i.focus()):t.focus()}},this.entry=t}connectedCallback(){this.eventListenerHandler(),this.subscribeDialogContentReady()}disconnectedCallback(){this.eventListenerRemover(),this.unsubscribeDialogContentReady()}componentDidLoad(){this.eventListenerHandler(),this.subscribeDialogContentReady()}async componentDidRender(){await this.focusDialogTaskQueue.runTask()}async toggle(t){t?await this.show():await this.hide()}async show(){const t=e(document,!0);t&&(this.isChildFocused=!1,await this.focusDialogTaskQueue.enqueue({run:async()=>{this.isVoiceOverClick&&(this.focusTriggerElement=t,this.focusOnFirstFocusableElement())}},!1))}async hide(){this.focusTriggerElement&&await this.focusDialogTaskQueue.enqueue({run:async()=>{this.focusTriggerElement&&this.focusTriggerElement.focus(),this.focusTriggerElement=null}},!1)}subscribeDialogContentReady(){this.entry.dialogEl()&&!this.dialogContentReadySubject&&(this.dialogContentReadySubject=h.getSubject(this.entry.dialogEl(),c),this.dialogContentReadyObserver=new a((()=>!0),(()=>{this.isVoiceOverClick&&this.focusOnFirstFocusableElement()})),o.register(this.dialogContentReadySubject,this.dialogContentReadyObserver))}unsubscribeDialogContentReady(){this.dialogContentReadyObserver&&this.dialogContentReadySubject&&(o.unregister(this.dialogContentReadySubject,this.dialogContentReadyObserver),this.dialogContentReadyObserver=null,this.dialogContentReadySubject=null)}}l([t("connectedCallback")],d.prototype,"connectedCallback",null),l([t("disconnectedCallback")],d.prototype,"disconnectedCallback",null),l([t("componentDidLoad")],d.prototype,"componentDidLoad",null),l([t("componentDidRender")],d.prototype,"componentDidRender",null);export{d as A}
@@ -1 +0,0 @@
1
- import{x as t,y as e,q as a,z as r,h as s,E as o,G as n,H as i,I as u,J as d,K as l,L as m,N as c,O as f,r as p,P as $,B as b,Q as v}from"./p-c6d62f0d.js";import{L as g}from"./p-6e1ab235.js";import{G as h,F as x,a as T,b as w,c as y,d as j,T as k}from"./p-d4ea8e22.js";import{g as O,c as I}from"./p-49a2e141.js";import{i as N}from"./p-262ec334.js";import{p as C}from"./p-0c667d6a.js";import{B as E}from"./p-ed45b3b6.js";import{s as R}from"./p-d27ae9ff.js";import{F as A}from"./p-18e8d9b7.js";class F{format(e){return t(e)?Object.keys(e).map((t=>this.formatToken(e[t],"default"!==t?t:void 0))).join(" "):this.formatToken(e)}}const S={top:"pt",bottom:"pb",left:"pl",right:"pr",x:"px",y:"py"},D=new class extends F{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-p-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${S[e]}-${t[e]}`)).join(" "):(g.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},G={top:"mt",bottom:"mb",left:"ml",right:"mr",x:"mx",y:"my"},_=new class extends F{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-m-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${G[e]}-${t[e]}`)).join(" "):(g.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},B={x:"gap-col",y:"gap-row"},H=new class extends F{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-gap-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${B[e]}-${t[e]}`)).join(" "):(g.warn(`The gap value ${t} is invalid, it must be a value of: `,s),"")}},J=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],L=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],z=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return o(t)?`${r}v-grid-cols-${t}`:(g.warn(`The column value ${t} is invalid, it must be a value of: `,L),"")}},K=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return n(t)?`${r}v-grid-rows-${t}`:(g.warn(`The row value ${t} is invalid, it must be a value of: `,J),"")}},P=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return i(t)?`${r}v-justify-items-${t}`:(g.warn(`The grid justifyItems value ${t} is invalid, it must be a value of: `,h),"")}},V=new class{format(e){const a=O();return"number"!=typeof e&&"string"!=typeof e||isNaN(e)?"string"==typeof e&&N(e)?e:t(e)?(e=I(e))[a]:null:Number(e)}},W=new class{format(e){if(u(e))return e;if(t(e)){const t=O();return(e=I(e))[t]}return null}},q=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return"string"==typeof t&&"false"===t||!1===t?`${r}v-hidden`:"string"==typeof t&&"true"===t||!0===t?`${r}v-block`:(g.warn(`The display value ${t} is invalid, it must be a boolean`),"")}},M=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return d(t)?`${r}v-flex-${t}`:(g.warn(`The direction value ${t} is invalid, it must be a value of: `,x),"")}},Q=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return l(t)?`${r}v-items-${t}`:(g.warn(`The flex alignItem value ${t} is invalid, it must be a value of: `,T),"")}},U=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return m(t)?`${r}v-justify-${this.mapInput(t)}`:(g.warn(`The flex justifyContent value ${t} is invalid, it must be a value of: `,w),"")}mapInput(t){switch(t){case"start":return"start";case"center":return"center";case"end":return"end";case"space-around":return"around";case"space-between":return"between";case"space-evenly":return"evenly"}}},X=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return c(t)?`${r}v-flex-${t}`:(g.warn(`The flex flexWrap value ${t} is invalid, it must be a value of: `,y),"")}},Y=new class{format(e){const a=O();return t(e)?(e=I(e))[a]:e}},Z=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return f(t)?"none"==t?`${r}v-hidden`:`${r}v-${t}`:(g.warn(`The box display value ${t} is invalid, it must be a value of: `,j),"")}},tt=new class{format(e){const a=O();return t(e)?(e=I(e),C(e[a])):C(e)}},et={top:"t",right:"r",bottom:"b",left:"l","top-left":"tl","top-right":"tr","bottom-left":"bl","bottom-right":"br"},at=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return p(t)?`${r}v-${this.transformRoundedNoneAndFill(t)}`:$(t)?Object.keys(t).map((e=>`${r}v-rounded-${et[e]}-${this.transformRoundedNoneAndFill(t[e]).replace("rounded-","")}`)).join(" "):(g.warn(`The border radius value ${t} is invalid, it must be a value of: `,b),"")}transformRoundedNoneAndFill(t){return t.replace("rounded-none","rounded-0").replace("rounded-full","rounded-9999")}},rt=new class extends F{formatToken(t,a){const r=e(a)?`${a}:`:"";return v(t)?`${r}v-text-${t}`:(g.warn(`The text align value ${t} is invalid, it must be a value of: `,k),"")}};class st{format(e){return t(e)?Object.keys(e).map((t=>this.generateCssText(this.formatToken(e[t],"default"!==t?t:void 0),t))).join(" "):this.generateCssText(this.formatToken(e))}generateCssText(t,e){let a="";return t&&(a=e&&"default"!==e?`@media (min-width:${E[e]}px){:host{${t}}}`:`:host{${t}}`),a}}const ot={top:["padding-top"],bottom:["padding-bottom"],left:["padding-left"],right:["padding-right"],x:["padding-left","padding-right"],y:["padding-top","padding-bottom"]},nt=new class extends st{formatToken(t){return a(t)?`padding:${s[t]}px`:r(t)?Object.keys(t).map((e=>ot[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(g.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},it={top:["margin-top"],bottom:["margin-bottom"],left:["margin-left"],right:["margin-right"],x:["margin-left","margin-right"],y:["margin-top","margin-bottom"]},ut=new class extends st{formatToken(t){return a(t)?`margin:${s[t]}px`:r(t)?Object.keys(t).map((e=>it[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(g.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},dt={top:["border-top-left-radius","border-top-right-radius"],right:["border-top-right-radius","border-bottom-right-radius"],bottom:["border-bottom-left-radius","border-bottom-right-radius"],left:["border-top-left-radius","border-bottom-left-radius"],"top-left":["border-top-left-radius"],"top-right":["border-top-right-radius"],"bottom-left":["border-bottom-left-radius"],"bottom-right":["border-bottom-right-radius"]},lt=new class extends st{formatToken(t){return p(t)?`border-radius:${b[t]}px`:$(t)?this.getDirectionKeys(t).map((e=>dt[e].map((a=>`${a}:${b[t[e]]}px`)).join(";"))).join(";"):(g.warn(`The border radius value ${t} is invalid, it must be a value of: `,b),"")}getDirectionKeys(t){const e=Object.keys(t);return A.isEnabled("VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR")?R(e,(e=>t[e]),void 0,Object.keys(b)):e}},mt=new class{format(t,e){switch(e){case"padding":return D.format(t);case"margin":return _.format(t);case"gap":return H.format(t);case"gridColumn":return z.format(t);case"gridRow":return K.format(t);case"gridJustifyItems":return P.format(t);case"size":return V.format(t);case"translocation":return W.format(t);case"display":return q.format(t);case"flexDirection":return M.format(t);case"flexAlignItem":return Q.format(t);case"flexJustifyContent":return U.format(t);case"flexWrap":return X.format(t);case"boxDisplay":return Z.format(t);case"widthAndHeight":return tt.format(t);case"corners":return at.format(t);case"textAlign":return rt.format(t);case"paddingStyle":return nt.format(t);case"marginStyle":return ut.format(t);case"cornersStyle":return lt.format(t);default:throw new Error(`Invalid flag ${e} passed into ResponsiveFormatFacade`)}}formatCustom(t){return Y.format(t)}};export{L as G,mt as R,J as a}
@@ -1 +0,0 @@
1
- import{O as s}from"./p-331a62d5.js";import{C as o}from"./p-2d0d575f.js";import{d as r}from"./p-878851f6.js";import{s as m}from"./p-33860e54.js";const p=async p=>new Promise((n=>{const t=new s(a.bind(null),(()=>{o.unregister(r.getSubject(p,m),t),n(null)}));o.register(r.getSubject(p,m),t)})),a=()=>!0;export{p as w}
@@ -1 +0,0 @@
1
- import{h as e,r as t,H as i,g as r}from"./p-6b2342e0.js";import{c as o,V as s,I as n}from"./p-6e1ab235.js";import{V as a,I as l}from"./p-4415ad28.js";import{s as c}from"./p-519a7d55.js";import{T as p}from"./p-3224e47c.js";import{V as d}from"./p-82016096.js";import{D as f,d as h}from"./p-878851f6.js";import{V as m}from"./p-c5eb0fa6.js";import{f as g}from"./p-dcd18ab1.js";import{C as v}from"./p-2d0d575f.js";import{t as b}from"./p-33860e54.js";import"./p-a528714c.js";import"./p-331a62d5.js";var u=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};class S extends s{render(){return"pageSizeSelectorMobile"===this.type?this.renderPageSizeSelectorMobile():this.renderPageSizeSelectorMobileAndCurrentPageLabel()}renderPageSizeSelectorMobile(){const e=d.tWithPreservedBlocks("Show [{0} items / page]",S.clickableReg,this.pageSize);return this.renderTranslatedMessage(e)}renderPageSizeSelectorMobileAndCurrentPageLabel(){const e=this.total>0?this.pageSize*(this.current-1)+1:0,t=Math.min(this.current*this.pageSize,this.total),i=d.tWithPreservedBlocks("Viewing [{0}-{1}] of {2}",S.clickableReg,e,t,this.total);return this.renderTranslatedMessage(i)}renderTranslatedMessage(t){return e("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-4"},t.map((t=>t.isPreserved?this.pageSizeSelectorMobileDropdownRenderer.render(e("vega-button-link",{label:t.content})):e("vega-font",{variant:"font-field-label",color:"text-primary"},t.content))))}}S.clickableReg=/(\[[^\]]*\])/g,u([o()],S.prototype,"translationSlimmer",void 0),u([o()],S.prototype,"type",void 0),u([o()],S.prototype,"pageSize",void 0),u([o()],S.prototype,"total",void 0),u([o()],S.prototype,"current",void 0),u([o()],S.prototype,"pageSizeSelectorMobileDropdownRenderer",void 0);var j=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};class y extends s{render(t){var i;const r=(this.pageSizeSelectorOptions.includes(this.pageSize)?this.pageSizeSelectorOptions:[...this.pageSizeSelectorOptions,this.pageSize]).sort(((e,t)=>e-t)),o=this.translationSlimmer.t("Items Per Page");return e("vega-dropdown",{trigger:"click",selectType:"single",alignment:"center",minWidth:160,selectedSourceKey:this.pageSize.toString(),source:[{key:"items-per-page",label:o,children:[...r.map((e=>({key:e.toString(),label:e.toString()})))]}],ref:e=>{f.addUniqueObserverToNode(e,m,(e=>{this.notifyParentPagination(e.detail)}))},isScreenPosition:null===(i=this.dropdownProps)||void 0===i?void 0:i.isScreenPosition},t)}notifyParentPagination(e){const t=g(this.host,"vega-pagination");t&&v.notify(h.getSubject(t,b),{host:this.host,detail:e})}}j([o()],y.prototype,"host",void 0),j([o()],y.prototype,"translationSlimmer",void 0),j([o()],y.prototype,"pageSizeSelectorOptions",void 0),j([o({writable:!0})],y.prototype,"pageSize",void 0),j([o()],y.prototype,"dropdownProps",void 0);var R=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};const w=class{constructor(e){t(this,e),this.globalSlimmers={},this.translationSlimmer=new p,this.vegaComponentUsageRuntimeMetricsSlimmer=new a,this.pageSizeSelectorMobileRenderer=new S,this.pageSizeSelectorMobileDropdownRenderer=new y,this.pageSize=10,this.pageSizeSelectorOptions=[10,20,50,100],this.total=0,this.current=1}render(){return c(e(i,null,this.pageSizeSelectorMobileRenderer.render()),this.host)}get host(){return r(this)}};R([l()],w.prototype,"globalSlimmers",void 0),R([n()],w.prototype,"translationSlimmer",void 0),R([n()],w.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),R([n()],w.prototype,"pageSizeSelectorMobileRenderer",void 0),R([n()],w.prototype,"pageSizeSelectorMobileDropdownRenderer",void 0),w.style=":host{display:inline-block}";export{w as vega_pagination_page_size_selector_mobile}
@@ -1 +0,0 @@
1
- import{F as s}from"./p-18e8d9b7.js";import{V as o,a as t,b as l,c as a,w as c,d as i,e,f as n,g as r,h as f,i as b}from"./p-6c5250b3.js";import{V as h}from"./p-02578a59.js";import{M as p,V as d,s as m,G as u}from"./p-6e1ab235.js";import{V as T}from"./p-c801c85d.js";import{T as g}from"./p-d884c644.js";import{V as j}from"./p-e6adf829.js";import{V as C,s as O}from"./p-82016096.js";import{V as E}from"./p-2c2df248.js";import{v as k}from"./p-5f377954.js";import{U as v}from"./p-a528714c.js";import{C as R}from"./p-2d0d575f.js";import{O as _}from"./p-331a62d5.js";import{f as V}from"./p-6b2342e0.js";import{V as A}from"./p-559197f8.js";import{v as L,s as y}from"./p-4866e390.js";import{V as D}from"./p-68124bc5.js";var M=function(s,o,t,l){var a,c=arguments.length,i=c<3?o:null===l?l=Object.getOwnPropertyDescriptor(o,t):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(s,o,t,l);else for(var e=s.length-1;e>=0;e--)(a=s[e])&&(i=(c<3?a(i):c>3?a(o,t,i):a(o,t))||i);return c>3&&i&&Object.defineProperty(o,t,i),i};class N extends d{constructor(o){super(),this.originalWatchers=new Map,this.hasDisconnected=!1,this.isEnabled=s.isEnabled("VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD")&&s.isEnabled("VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD"),this.component=o.component}connectedCallback(){if(!this.isEnabled)return;if(this.hasDisconnected)return;const s=this.component.constructor.watchers;for(const o in s)s[o].forEach((s=>{this.originalWatchers.has(s)||(this.originalWatchers.set(s,this.component[s]),this.component[s]=function(){})}))}disconnectedCallback(){this.isEnabled&&(this.hasDisconnected=!0)}componentDidLoad(){this.isEnabled&&this.originalWatchers.forEach(((s,o)=>{const t=s;this.component[o]=function(...s){return t.apply(this,s)}}))}}M([p("connectedCallback")],N.prototype,"connectedCallback",null),M([p("disconnectedCallback")],N.prototype,"disconnectedCallback",null),M([p("componentDidLoad")],N.prototype,"componentDidLoad",null);var x=function(s,o,t,l){var a,c=arguments.length,i=c<3?o:null===l?l=Object.getOwnPropertyDescriptor(o,t):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(s,o,t,l);else for(var e=s.length-1;e>=0;e--)(a=s[e])&&(i=(c<3?a(i):c>3?a(o,t,i):a(o,t))||i);return c>3&&i&&Object.defineProperty(o,t,i),i};class F extends d{constructor(s){super(),this.component=s.component}connectedCallback(){this.observer=new _(this.isAcceptable.bind(this),(()=>{V(this.component)})),R.register(v,this.observer)}disconnectedCallback(){this.observer&&(R.unregister(v,this.observer),this.observer=null)}isAcceptable(){var s,o;const t=this.component.host;return null!==(o=null===(s=C.getConnectedComponents().get(t.tagName))||void 0===s?void 0:s.has(t))&&void 0!==o&&o}}x([p("connectedCallback")],F.prototype,"connectedCallback",null),x([p("disconnectedCallback")],F.prototype,"disconnectedCallback",null);class H extends d{constructor(s){super(),this.component=s.component}connectedCallback(){const s=this.component.host.shadowRoot,o=s.insertBefore;s.insertBefore=function(s,t){if("STYLE"===s.nodeName){const o=L.nonce;void 0!==o&&s.setAttribute("nonce",o)}return o.call(this,s,t)}}}!function(s,o,t,l){var a,c=arguments.length,i=c<3?o:null===l?l=Object.getOwnPropertyDescriptor(o,t):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(s,o,t,l);else for(var e=s.length-1;e>=0;e--)(a=s[e])&&(i=(c<3?a(i):c>3?a(o,t,i):a(o,t))||i);c>3&&i&&Object.defineProperty(o,t,i)}([p("connectedCallback")],H.prototype,"connectedCallback",null);const P=function(){globalThis.VegaDisabledFeatureKeys&&s.disable(...globalThis.VegaDisabledFeatureKeys),globalThis.VegaEnabledFeatureKeys&&s.enable(...globalThis.VegaEnabledFeatureKeys),globalThis.VegaLoader=o,globalThis.VegaNotify=t,globalThis.VegaThemeManager=h,globalThis.setVegaLogLevel=m,globalThis.VegaDialog=T,u.register([N,F,H]),globalThis.VegaEventManager=l,Object.keys(g).forEach((s=>{const{url:o}=g[s],t="vega-typography-"+s;if(!document.querySelector("#"+t)){const s=document.createElement("link");s.id=t,s.href=o,s.rel="stylesheet",document.head.append(s)}})),globalThis.VegaIconManager=j,globalThis.VegaZIndexManager=a,globalThis.ValidCreditCardNumberRule=E,globalThis.VegaEnvInfo=k.getVegaEnv(),import("./p-5a25014f.js").then((o=>{o.default.init(s)})),globalThis.waitForVega=c,globalThis.VegaSkeletonLoader=i,globalThis.VegaTranslation=e,globalThis.VegaTranslationResourceEN=O,globalThis.VegaRTEContent=A,globalThis.VegaRTETokenExtension=n,globalThis.VegaRTELanguageExtension=r,globalThis.VegaRTEPresetToolbarItems=D,globalThis.VegaRTEFunctionExtension=f,globalThis.VegaRTETableExtension=b,import("./p-10fa4eac.js").then((s=>{Object.entries(s).forEach((([s,o])=>{globalThis[s]=o}))})),globalThis.VegaThemeManagerApplyBranding&&h.applyBranding(globalThis.VegaThemeManagerApplyBranding),globalThis.setVegaNonce=y,L.patchHeadInsertBeforeWithNonceToStencil()};export{P as g}